better-auth-studio 1.0.57 → 1.0.58-beta.2
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.
|
@@ -38,15 +38,15 @@ function UU(e,t){for(var n=0;n<t.length;n++){const a=t[n];if(typeof a!="string"&
|
|
|
38
38
|
*
|
|
39
39
|
* This source code is licensed under the MIT license found in the
|
|
40
40
|
* LICENSE file in the root directory of this source tree.
|
|
41
|
-
*/var fn=t6,cO=m,s6=Xf;function ce(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function dO(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Wd(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function uO(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 _S(e){if(Wd(e)!==e)throw Error(ce(188))}function i6(e){var t=e.alternate;if(!t){if(t=Wd(e),t===null)throw Error(ce(188));return t!==e?null:e}for(var n=e,a=t;;){var s=n.return;if(s===null)break;var i=s.alternate;if(i===null){if(a=s.return,a!==null){n=a;continue}break}if(s.child===i.child){for(i=s.child;i;){if(i===n)return _S(s),e;if(i===a)return _S(s),t;i=i.sibling}throw Error(ce(188))}if(n.return!==a.return)n=s,a=i;else{for(var o=!1,l=s.child;l;){if(l===n){o=!0,n=s,a=i;break}if(l===a){o=!0,a=s,n=i;break}l=l.sibling}if(!o){for(l=i.child;l;){if(l===n){o=!0,n=i,a=s;break}if(l===a){o=!0,a=i,n=s;break}l=l.sibling}if(!o)throw Error(ce(189))}}if(n.alternate!==a)throw Error(ce(190))}if(n.tag!==3)throw Error(ce(188));return n.stateNode.current===n?e:t}function hO(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=hO(e),t!==null)return t;e=e.sibling}return null}var Lt=Object.assign,o6=Symbol.for("react.element"),_u=Symbol.for("react.transitional.element"),Fc=Symbol.for("react.portal"),Jo=Symbol.for("react.fragment"),fO=Symbol.for("react.strict_mode"),v0=Symbol.for("react.profiler"),l6=Symbol.for("react.provider"),pO=Symbol.for("react.consumer"),is=Symbol.for("react.context"),cN=Symbol.for("react.forward_ref"),w0=Symbol.for("react.suspense"),N0=Symbol.for("react.suspense_list"),dN=Symbol.for("react.memo"),Ys=Symbol.for("react.lazy"),S0=Symbol.for("react.activity"),c6=Symbol.for("react.memo_cache_sentinel"),RS=Symbol.iterator;function bc(e){return e===null||typeof e!="object"?null:(e=RS&&e[RS]||e["@@iterator"],typeof e=="function"?e:null)}var d6=Symbol.for("react.client.reference");function E0(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===d6?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Jo:return"Fragment";case v0:return"Profiler";case fO:return"StrictMode";case w0:return"Suspense";case N0:return"SuspenseList";case S0:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case Fc:return"Portal";case is:return(e.displayName||"Context")+".Provider";case pO:return(e._context.displayName||"Context")+".Consumer";case cN:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case dN:return t=e.displayName||null,t!==null?t:E0(e.type)||"Memo";case Ys:t=e._payload,e=e._init;try{return E0(e(t))}catch{}}return null}var Bc=Array.isArray,qe=cO.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ht=s6.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Ji={pending:!1,data:null,method:null,action:null},T0=[],el=-1;function Pr(e){return{current:e}}function vn(e){0>el||(e.current=T0[el],T0[el]=null,el--)}function Ft(e,t){el++,T0[el]=e.current,e.current=t}var Rr=Pr(null),pd=Pr(null),oi=Pr(null),zh=Pr(null);function $h(e,t){switch(Ft(oi,t),Ft(pd,e),Ft(Rr,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?LE(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=LE(t),e=RD(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}vn(Rr),Ft(Rr,e)}function _l(){vn(Rr),vn(pd),vn(oi)}function C0(e){e.memoizedState!==null&&Ft(zh,e);var t=Rr.current,n=RD(t,e.type);t!==n&&(Ft(pd,e),Ft(Rr,n))}function Hh(e){pd.current===e&&(vn(Rr),vn(pd)),zh.current===e&&(vn(zh),Ed._currentValue=Ji)}var A0=Object.prototype.hasOwnProperty,uN=fn.unstable_scheduleCallback,Zp=fn.unstable_cancelCallback,u6=fn.unstable_shouldYield,h6=fn.unstable_requestPaint,Or=fn.unstable_now,f6=fn.unstable_getCurrentPriorityLevel,mO=fn.unstable_ImmediatePriority,gO=fn.unstable_UserBlockingPriority,qh=fn.unstable_NormalPriority,p6=fn.unstable_LowPriority,bO=fn.unstable_IdlePriority,m6=fn.log,g6=fn.unstable_setDisableYieldValue,Xd=null,ma=null;function ti(e){if(typeof m6=="function"&&g6(e),ma&&typeof ma.setStrictMode=="function")try{ma.setStrictMode(Xd,e)}catch{}}var ga=Math.clz32?Math.clz32:y6,b6=Math.log,x6=Math.LN2;function y6(e){return e>>>=0,e===0?32:31-(b6(e)/x6|0)|0}var Ru=256,Ou=4194304;function Hi(e){var t=e&42;if(t!==0)return t;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:return 64;case 128:return 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&4194048;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Kf(e,t,n){var a=e.pendingLanes;if(a===0)return 0;var s=0,i=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var l=a&134217727;return l!==0?(a=l&~i,a!==0?s=Hi(a):(o&=l,o!==0?s=Hi(o):n||(n=l&~e,n!==0&&(s=Hi(n))))):(l=a&~i,l!==0?s=Hi(l):o!==0?s=Hi(o):n||(n=a&~e,n!==0&&(s=Hi(n)))),s===0?0:t!==0&&t!==s&&!(t&i)&&(i=s&-s,n=t&-t,i>=n||i===32&&(n&4194048)!==0)?t:s}function Kd(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function v6(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32: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:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function xO(){var e=Ru;return Ru<<=1,!(Ru&4194048)&&(Ru=256),e}function yO(){var e=Ou;return Ou<<=1,!(Ou&62914560)&&(Ou=4194304),e}function Qp(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Zd(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function w6(e,t,n,a,s,i){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var l=e.entanglements,c=e.expirationTimes,u=e.hiddenUpdates;for(n=o&~n;0<n;){var h=31-ga(n),d=1<<h;l[h]=0,c[h]=-1;var f=u[h];if(f!==null)for(u[h]=null,h=0;h<f.length;h++){var p=f[h];p!==null&&(p.lane&=-536870913)}n&=~d}a!==0&&vO(e,a,0),i!==0&&s===0&&e.tag!==0&&(e.suspendedLanes|=i&~(o&~t))}function vO(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-ga(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|n&4194090}function wO(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var a=31-ga(n),s=1<<a;s&t|e[a]&t&&(e[a]|=t),n&=~s}}function hN(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;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:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function fN(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function NO(){var e=ht.p;return e!==0?e:(e=window.event,e===void 0?32:zD(e.type))}function N6(e,t){var n=ht.p;try{return ht.p=e,t()}finally{ht.p=n}}var ki=Math.random().toString(36).slice(2),jn="__reactFiber$"+ki,Xn="__reactProps$"+ki,nc="__reactContainer$"+ki,j0="__reactEvents$"+ki,S6="__reactListeners$"+ki,E6="__reactHandles$"+ki,OS="__reactResources$"+ki,Qd="__reactMarker$"+ki;function pN(e){delete e[jn],delete e[Xn],delete e[j0],delete e[S6],delete e[E6]}function tl(e){var t=e[jn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[nc]||n[jn]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=FE(e);e!==null;){if(n=e[jn])return n;e=FE(e)}return t}e=n,n=e.parentNode}return null}function ac(e){if(e=e[jn]||e[nc]){var t=e.tag;if(t===5||t===6||t===13||t===26||t===27||t===3)return e}return null}function zc(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(ce(33))}function ml(e){var t=e[OS];return t||(t=e[OS]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function xn(e){e[Qd]=!0}var SO=new Set,EO={};function To(e,t){Rl(e,t),Rl(e+"Capture",t)}function Rl(e,t){for(EO[e]=t,e=0;e<t.length;e++)SO.add(t[e])}var T6=RegExp("^[: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]*$"),DS={},IS={};function C6(e){return A0.call(IS,e)?!0:A0.call(DS,e)?!1:T6.test(e)?IS[e]=!0:(DS[e]=!0,!1)}function mh(e,t,n){if(C6(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var a=t.toLowerCase().slice(0,5);if(a!=="data-"&&a!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+n)}}function Du(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+n)}}function Qr(e,t,n,a){if(a===null)e.removeAttribute(n);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,""+a)}}var Jp,MS;function Yo(e){if(Jp===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Jp=t&&t[1]||"",MS=-1<n.stack.indexOf(`
|
|
41
|
+
*/var fn=t6,cO=m,s6=Xf;function ce(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function dO(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Wd(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function uO(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 _S(e){if(Wd(e)!==e)throw Error(ce(188))}function i6(e){var t=e.alternate;if(!t){if(t=Wd(e),t===null)throw Error(ce(188));return t!==e?null:e}for(var n=e,a=t;;){var s=n.return;if(s===null)break;var i=s.alternate;if(i===null){if(a=s.return,a!==null){n=a;continue}break}if(s.child===i.child){for(i=s.child;i;){if(i===n)return _S(s),e;if(i===a)return _S(s),t;i=i.sibling}throw Error(ce(188))}if(n.return!==a.return)n=s,a=i;else{for(var o=!1,l=s.child;l;){if(l===n){o=!0,n=s,a=i;break}if(l===a){o=!0,a=s,n=i;break}l=l.sibling}if(!o){for(l=i.child;l;){if(l===n){o=!0,n=i,a=s;break}if(l===a){o=!0,a=i,n=s;break}l=l.sibling}if(!o)throw Error(ce(189))}}if(n.alternate!==a)throw Error(ce(190))}if(n.tag!==3)throw Error(ce(188));return n.stateNode.current===n?e:t}function hO(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=hO(e),t!==null)return t;e=e.sibling}return null}var Lt=Object.assign,o6=Symbol.for("react.element"),_u=Symbol.for("react.transitional.element"),Fc=Symbol.for("react.portal"),Jo=Symbol.for("react.fragment"),fO=Symbol.for("react.strict_mode"),v0=Symbol.for("react.profiler"),l6=Symbol.for("react.provider"),pO=Symbol.for("react.consumer"),is=Symbol.for("react.context"),cN=Symbol.for("react.forward_ref"),w0=Symbol.for("react.suspense"),N0=Symbol.for("react.suspense_list"),dN=Symbol.for("react.memo"),Ys=Symbol.for("react.lazy"),S0=Symbol.for("react.activity"),c6=Symbol.for("react.memo_cache_sentinel"),RS=Symbol.iterator;function bc(e){return e===null||typeof e!="object"?null:(e=RS&&e[RS]||e["@@iterator"],typeof e=="function"?e:null)}var d6=Symbol.for("react.client.reference");function E0(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===d6?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Jo:return"Fragment";case v0:return"Profiler";case fO:return"StrictMode";case w0:return"Suspense";case N0:return"SuspenseList";case S0:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case Fc:return"Portal";case is:return(e.displayName||"Context")+".Provider";case pO:return(e._context.displayName||"Context")+".Consumer";case cN:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case dN:return t=e.displayName||null,t!==null?t:E0(e.type)||"Memo";case Ys:t=e._payload,e=e._init;try{return E0(e(t))}catch{}}return null}var Bc=Array.isArray,qe=cO.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ht=s6.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Ji={pending:!1,data:null,method:null,action:null},T0=[],el=-1;function Pr(e){return{current:e}}function vn(e){0>el||(e.current=T0[el],T0[el]=null,el--)}function Ft(e,t){el++,T0[el]=e.current,e.current=t}var Rr=Pr(null),pd=Pr(null),oi=Pr(null),zh=Pr(null);function $h(e,t){switch(Ft(oi,t),Ft(pd,e),Ft(Rr,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?LE(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=LE(t),e=R4(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}vn(Rr),Ft(Rr,e)}function _l(){vn(Rr),vn(pd),vn(oi)}function C0(e){e.memoizedState!==null&&Ft(zh,e);var t=Rr.current,n=R4(t,e.type);t!==n&&(Ft(pd,e),Ft(Rr,n))}function Hh(e){pd.current===e&&(vn(Rr),vn(pd)),zh.current===e&&(vn(zh),Ed._currentValue=Ji)}var A0=Object.prototype.hasOwnProperty,uN=fn.unstable_scheduleCallback,Zp=fn.unstable_cancelCallback,u6=fn.unstable_shouldYield,h6=fn.unstable_requestPaint,Or=fn.unstable_now,f6=fn.unstable_getCurrentPriorityLevel,mO=fn.unstable_ImmediatePriority,gO=fn.unstable_UserBlockingPriority,qh=fn.unstable_NormalPriority,p6=fn.unstable_LowPriority,bO=fn.unstable_IdlePriority,m6=fn.log,g6=fn.unstable_setDisableYieldValue,Xd=null,ma=null;function ti(e){if(typeof m6=="function"&&g6(e),ma&&typeof ma.setStrictMode=="function")try{ma.setStrictMode(Xd,e)}catch{}}var ga=Math.clz32?Math.clz32:y6,b6=Math.log,x6=Math.LN2;function y6(e){return e>>>=0,e===0?32:31-(b6(e)/x6|0)|0}var Ru=256,Ou=4194304;function Hi(e){var t=e&42;if(t!==0)return t;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:return 64;case 128:return 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&4194048;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Kf(e,t,n){var a=e.pendingLanes;if(a===0)return 0;var s=0,i=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var l=a&134217727;return l!==0?(a=l&~i,a!==0?s=Hi(a):(o&=l,o!==0?s=Hi(o):n||(n=l&~e,n!==0&&(s=Hi(n))))):(l=a&~i,l!==0?s=Hi(l):o!==0?s=Hi(o):n||(n=a&~e,n!==0&&(s=Hi(n)))),s===0?0:t!==0&&t!==s&&!(t&i)&&(i=s&-s,n=t&-t,i>=n||i===32&&(n&4194048)!==0)?t:s}function Kd(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function v6(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32: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:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function xO(){var e=Ru;return Ru<<=1,!(Ru&4194048)&&(Ru=256),e}function yO(){var e=Ou;return Ou<<=1,!(Ou&62914560)&&(Ou=4194304),e}function Qp(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Zd(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function w6(e,t,n,a,s,i){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var l=e.entanglements,c=e.expirationTimes,u=e.hiddenUpdates;for(n=o&~n;0<n;){var h=31-ga(n),d=1<<h;l[h]=0,c[h]=-1;var f=u[h];if(f!==null)for(u[h]=null,h=0;h<f.length;h++){var p=f[h];p!==null&&(p.lane&=-536870913)}n&=~d}a!==0&&vO(e,a,0),i!==0&&s===0&&e.tag!==0&&(e.suspendedLanes|=i&~(o&~t))}function vO(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-ga(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|n&4194090}function wO(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var a=31-ga(n),s=1<<a;s&t|e[a]&t&&(e[a]|=t),n&=~s}}function hN(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;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:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function fN(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function NO(){var e=ht.p;return e!==0?e:(e=window.event,e===void 0?32:z4(e.type))}function N6(e,t){var n=ht.p;try{return ht.p=e,t()}finally{ht.p=n}}var ki=Math.random().toString(36).slice(2),jn="__reactFiber$"+ki,Xn="__reactProps$"+ki,nc="__reactContainer$"+ki,j0="__reactEvents$"+ki,S6="__reactListeners$"+ki,E6="__reactHandles$"+ki,OS="__reactResources$"+ki,Qd="__reactMarker$"+ki;function pN(e){delete e[jn],delete e[Xn],delete e[j0],delete e[S6],delete e[E6]}function tl(e){var t=e[jn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[nc]||n[jn]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=FE(e);e!==null;){if(n=e[jn])return n;e=FE(e)}return t}e=n,n=e.parentNode}return null}function ac(e){if(e=e[jn]||e[nc]){var t=e.tag;if(t===5||t===6||t===13||t===26||t===27||t===3)return e}return null}function zc(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(ce(33))}function ml(e){var t=e[OS];return t||(t=e[OS]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function xn(e){e[Qd]=!0}var SO=new Set,EO={};function To(e,t){Rl(e,t),Rl(e+"Capture",t)}function Rl(e,t){for(EO[e]=t,e=0;e<t.length;e++)SO.add(t[e])}var T6=RegExp("^[: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]*$"),DS={},IS={};function C6(e){return A0.call(IS,e)?!0:A0.call(DS,e)?!1:T6.test(e)?IS[e]=!0:(DS[e]=!0,!1)}function mh(e,t,n){if(C6(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var a=t.toLowerCase().slice(0,5);if(a!=="data-"&&a!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+n)}}function Du(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+n)}}function Qr(e,t,n,a){if(a===null)e.removeAttribute(n);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,""+a)}}var Jp,MS;function Yo(e){if(Jp===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Jp=t&&t[1]||"",MS=-1<n.stack.indexOf(`
|
|
42
42
|
at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
43
|
`+Jp+e+MS}var em=!1;function tm(e,t){if(!e||em)return"";em=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(t){var d=function(){throw Error()};if(Object.defineProperty(d.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(d,[])}catch(p){var f=p}Reflect.construct(e,[],d)}else{try{d.call()}catch(p){f=p}e.call(d.prototype)}}else{try{throw Error()}catch(p){f=p}(d=e())&&typeof d.catch=="function"&&d.catch(function(){})}}catch(p){if(p&&f&&typeof p.stack=="string")return[p.stack,f.stack]}return[null,null]}};a.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var s=Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,"name");s&&s.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var i=a.DetermineComponentFrameRoot(),o=i[0],l=i[1];if(o&&l){var c=o.split(`
|
|
44
44
|
`),u=l.split(`
|
|
45
45
|
`);for(s=a=0;a<c.length&&!c[a].includes("DetermineComponentFrameRoot");)a++;for(;s<u.length&&!u[s].includes("DetermineComponentFrameRoot");)s++;if(a===c.length||s===u.length)for(a=c.length-1,s=u.length-1;1<=a&&0<=s&&c[a]!==u[s];)s--;for(;1<=a&&0<=s;a--,s--)if(c[a]!==u[s]){if(a!==1||s!==1)do if(a--,s--,0>s||c[a]!==u[s]){var h=`
|
|
46
46
|
`+c[a].replace(" at new "," at ");return e.displayName&&h.includes("<anonymous>")&&(h=h.replace("<anonymous>",e.displayName)),h}while(1<=a&&0<=s);break}}}finally{em=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?Yo(n):""}function A6(e){switch(e.tag){case 26:case 27:case 5:return Yo(e.type);case 16:return Yo("Lazy");case 13:return Yo("Suspense");case 19:return Yo("SuspenseList");case 0:case 15:return tm(e.type,!1);case 11:return tm(e.type.render,!1);case 1:return tm(e.type,!0);case 31:return Yo("Activity");default:return""}}function LS(e){try{var t="";do t+=A6(e),e=e.return;while(e);return t}catch(n){return`
|
|
47
47
|
Error generating stack: `+n.message+`
|
|
48
|
-
`+n.stack}}function Ia(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function TO(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function j6(e){var t=TO(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),a=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(o){a=""+o,i.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return a},setValue:function(o){a=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Gh(e){e._valueTracker||(e._valueTracker=j6(e))}function CO(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),a="";return e&&(a=TO(e)?e.checked?"true":"false":e.value),e=a,e!==n?(t.setValue(e),!0):!1}function Vh(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}}var k6=/[\n"\\]/g;function Ba(e){return e.replace(k6,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function k0(e,t,n,a,s,i,o,l){e.name="",o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"?e.type=o:e.removeAttribute("type"),t!=null?o==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Ia(t)):e.value!==""+Ia(t)&&(e.value=""+Ia(t)):o!=="submit"&&o!=="reset"||e.removeAttribute("value"),t!=null?_0(e,o,Ia(t)):n!=null?_0(e,o,Ia(n)):a!=null&&e.removeAttribute("value"),s==null&&i!=null&&(e.defaultChecked=!!i),s!=null&&(e.checked=s&&typeof s!="function"&&typeof s!="symbol"),l!=null&&typeof l!="function"&&typeof l!="symbol"&&typeof l!="boolean"?e.name=""+Ia(l):e.removeAttribute("name")}function AO(e,t,n,a,s,i,o,l){if(i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(e.type=i),t!=null||n!=null){if(!(i!=="submit"&&i!=="reset"||t!=null))return;n=n!=null?""+Ia(n):"",t=t!=null?""+Ia(t):n,l||t===e.value||(e.value=t),e.defaultValue=t}a=a??s,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=l?e.checked:!!a,e.defaultChecked=!!a,o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"&&(e.name=o)}function _0(e,t,n){t==="number"&&Vh(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function gl(e,t,n,a){if(e=e.options,t){t={};for(var s=0;s<n.length;s++)t["$"+n[s]]=!0;for(n=0;n<e.length;n++)s=t.hasOwnProperty("$"+e[n].value),e[n].selected!==s&&(e[n].selected=s),s&&a&&(e[n].defaultSelected=!0)}else{for(n=""+Ia(n),t=null,s=0;s<e.length;s++){if(e[s].value===n){e[s].selected=!0,a&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function jO(e,t,n){if(t!=null&&(t=""+Ia(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+Ia(n):""}function kO(e,t,n,a){if(t==null){if(a!=null){if(n!=null)throw Error(ce(92));if(Bc(a)){if(1<a.length)throw Error(ce(93));a=a[0]}n=a}n==null&&(n=""),t=n}n=Ia(t),e.defaultValue=n,a=e.textContent,a===n&&a!==""&&a!==null&&(e.value=a)}function Ol(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var _6=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function US(e,t,n){var a=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?a?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":a?e.setProperty(t,n):typeof n!="number"||n===0||_6.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function _O(e,t,n){if(t!=null&&typeof t!="object")throw Error(ce(62));if(e=e.style,n!=null){for(var a in n)!n.hasOwnProperty(a)||t!=null&&t.hasOwnProperty(a)||(a.indexOf("--")===0?e.setProperty(a,""):a==="float"?e.cssFloat="":e[a]="");for(var s in t)a=t[s],t.hasOwnProperty(s)&&n[s]!==a&&US(e,s,a)}else for(var i in t)t.hasOwnProperty(i)&&US(e,i,t[i])}function mN(e){if(e.indexOf("-")===-1)return!1;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 R6=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),O6=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function gh(e){return O6.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}var R0=null;function gN(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var nl=null,bl=null;function PS(e){var t=ac(e);if(t&&(e=t.stateNode)){var n=e[Xn]||null;e:switch(e=t.stateNode,t.type){case"input":if(k0(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+Ba(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var a=n[t];if(a!==e&&a.form===e.form){var s=a[Xn]||null;if(!s)throw Error(ce(90));k0(a,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name)}}for(t=0;t<n.length;t++)a=n[t],a.form===e.form&&CO(a)}break e;case"textarea":jO(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&gl(e,!!n.multiple,t,!1)}}}var nm=!1;function RO(e,t,n){if(nm)return e(t,n);nm=!0;try{var a=e(t);return a}finally{if(nm=!1,(nl!==null||bl!==null)&&(ip(),nl&&(t=nl,e=bl,bl=nl=null,PS(t),e)))for(t=0;t<e.length;t++)PS(e[t])}}function md(e,t){var n=e.stateNode;if(n===null)return null;var a=n[Xn]||null;if(a===null)return null;n=a[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":(a=!a.disabled)||(e=e.type,a=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!a;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(ce(231,t,typeof n));return n}var xs=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),O0=!1;if(xs)try{var xc={};Object.defineProperty(xc,"passive",{get:function(){O0=!0}}),window.addEventListener("test",xc,xc),window.removeEventListener("test",xc,xc)}catch{O0=!1}var ni=null,bN=null,bh=null;function OO(){if(bh)return bh;var e,t=bN,n=t.length,a,s="value"in ni?ni.value:ni.textContent,i=s.length;for(e=0;e<n&&t[e]===s[e];e++);var o=n-e;for(a=1;a<=o&&t[n-a]===s[i-a];a++);return bh=s.slice(e,1<a?1-a:void 0)}function xh(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 Iu(){return!0}function FS(){return!1}function Kn(e){function t(n,a,s,i,o){this._reactName=n,this._targetInst=s,this.type=a,this.nativeEvent=i,this.target=o,this.currentTarget=null;for(var l in e)e.hasOwnProperty(l)&&(n=e[l],this[l]=n?n(i):i[l]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?Iu:FS,this.isPropagationStopped=FS,this}return Lt(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Iu)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Iu)},persist:function(){},isPersistent:Iu}),t}var Co={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Zf=Kn(Co),Jd=Lt({},Co,{view:0,detail:0}),D6=Kn(Jd),am,rm,yc,Qf=Lt({},Jd,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:xN,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!==yc&&(yc&&e.type==="mousemove"?(am=e.screenX-yc.screenX,rm=e.screenY-yc.screenY):rm=am=0,yc=e),am)},movementY:function(e){return"movementY"in e?e.movementY:rm}}),BS=Kn(Qf),I6=Lt({},Qf,{dataTransfer:0}),M6=Kn(I6),L6=Lt({},Jd,{relatedTarget:0}),sm=Kn(L6),U6=Lt({},Co,{animationName:0,elapsedTime:0,pseudoElement:0}),P6=Kn(U6),F6=Lt({},Co,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),B6=Kn(F6),z6=Lt({},Co,{data:0}),zS=Kn(z6),$6={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},H6={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"},q6={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function G6(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=q6[e])?!!t[e]:!1}function xN(){return G6}var V6=Lt({},Jd,{key:function(e){if(e.key){var t=$6[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=xh(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?H6[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:xN,charCode:function(e){return e.type==="keypress"?xh(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?xh(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Y6=Kn(V6),W6=Lt({},Qf,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),$S=Kn(W6),X6=Lt({},Jd,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:xN}),K6=Kn(X6),Z6=Lt({},Co,{propertyName:0,elapsedTime:0,pseudoElement:0}),Q6=Kn(Z6),J6=Lt({},Qf,{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}),eP=Kn(J6),tP=Lt({},Co,{newState:0,oldState:0}),nP=Kn(tP),aP=[9,13,27,32],yN=xs&&"CompositionEvent"in window,Xc=null;xs&&"documentMode"in document&&(Xc=document.documentMode);var rP=xs&&"TextEvent"in window&&!Xc,DO=xs&&(!yN||Xc&&8<Xc&&11>=Xc),HS=" ",qS=!1;function IO(e,t){switch(e){case"keyup":return aP.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function MO(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var al=!1;function sP(e,t){switch(e){case"compositionend":return MO(t);case"keypress":return t.which!==32?null:(qS=!0,HS);case"textInput":return e=t.data,e===HS&&qS?null:e;default:return null}}function iP(e,t){if(al)return e==="compositionend"||!yN&&IO(e,t)?(e=OO(),bh=bN=ni=null,al=!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 DO&&t.locale!=="ko"?null:t.data;default:return null}}var oP={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 GS(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!oP[e.type]:t==="textarea"}function LO(e,t,n,a){nl?bl?bl.push(a):bl=[a]:nl=a,t=uf(t,"onChange"),0<t.length&&(n=new Zf("onChange","change",null,n,a),e.push({event:n,listeners:t}))}var Kc=null,gd=null;function lP(e){jD(e,0)}function Jf(e){var t=zc(e);if(CO(t))return e}function VS(e,t){if(e==="change")return t}var UO=!1;if(xs){var im;if(xs){var om="oninput"in document;if(!om){var YS=document.createElement("div");YS.setAttribute("oninput","return;"),om=typeof YS.oninput=="function"}im=om}else im=!1;UO=im&&(!document.documentMode||9<document.documentMode)}function WS(){Kc&&(Kc.detachEvent("onpropertychange",PO),gd=Kc=null)}function PO(e){if(e.propertyName==="value"&&Jf(gd)){var t=[];LO(t,gd,e,gN(e)),RO(lP,t)}}function cP(e,t,n){e==="focusin"?(WS(),Kc=t,gd=n,Kc.attachEvent("onpropertychange",PO)):e==="focusout"&&WS()}function dP(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Jf(gd)}function uP(e,t){if(e==="click")return Jf(t)}function hP(e,t){if(e==="input"||e==="change")return Jf(t)}function fP(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var va=typeof Object.is=="function"?Object.is:fP;function bd(e,t){if(va(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),a=Object.keys(t);if(n.length!==a.length)return!1;for(a=0;a<n.length;a++){var s=n[a];if(!A0.call(t,s)||!va(e[s],t[s]))return!1}return!0}function XS(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function KS(e,t){var n=XS(e);e=0;for(var a;n;){if(n.nodeType===3){if(a=e+n.textContent.length,e<=t&&a>=t)return{node:n,offset:t-e};e=a}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=XS(n)}}function FO(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?FO(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function BO(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Vh(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Vh(e.document)}return t}function vN(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")}var pP=xs&&"documentMode"in document&&11>=document.documentMode,rl=null,D0=null,Zc=null,I0=!1;function ZS(e,t,n){var a=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;I0||rl==null||rl!==Vh(a)||(a=rl,"selectionStart"in a&&vN(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),Zc&&bd(Zc,a)||(Zc=a,a=uf(D0,"onSelect"),0<a.length&&(t=new Zf("onSelect","select",null,t,n),e.push({event:t,listeners:a}),t.target=rl)))}function Fi(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var sl={animationend:Fi("Animation","AnimationEnd"),animationiteration:Fi("Animation","AnimationIteration"),animationstart:Fi("Animation","AnimationStart"),transitionrun:Fi("Transition","TransitionRun"),transitionstart:Fi("Transition","TransitionStart"),transitioncancel:Fi("Transition","TransitionCancel"),transitionend:Fi("Transition","TransitionEnd")},lm={},zO={};xs&&(zO=document.createElement("div").style,"AnimationEvent"in window||(delete sl.animationend.animation,delete sl.animationiteration.animation,delete sl.animationstart.animation),"TransitionEvent"in window||delete sl.transitionend.transition);function Ao(e){if(lm[e])return lm[e];if(!sl[e])return e;var t=sl[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in zO)return lm[e]=t[n];return e}var $O=Ao("animationend"),HO=Ao("animationiteration"),qO=Ao("animationstart"),mP=Ao("transitionrun"),gP=Ao("transitionstart"),bP=Ao("transitioncancel"),GO=Ao("transitionend"),VO=new Map,M0="abort auxClick beforeToggle 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(" ");M0.push("scrollEnd");function dr(e,t){VO.set(e,t),To(t,[e])}var QS=new WeakMap;function za(e,t){if(typeof e=="object"&&e!==null){var n=QS.get(e);return n!==void 0?n:(t={value:e,source:t,stack:LS(t)},QS.set(e,t),t)}return{value:e,source:t,stack:LS(t)}}var ka=[],il=0,wN=0;function ep(){for(var e=il,t=wN=il=0;t<e;){var n=ka[t];ka[t++]=null;var a=ka[t];ka[t++]=null;var s=ka[t];ka[t++]=null;var i=ka[t];if(ka[t++]=null,a!==null&&s!==null){var o=a.pending;o===null?s.next=s:(s.next=o.next,o.next=s),a.pending=s}i!==0&&YO(n,s,i)}}function tp(e,t,n,a){ka[il++]=e,ka[il++]=t,ka[il++]=n,ka[il++]=a,wN|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function NN(e,t,n,a){return tp(e,t,n,a),Yh(e)}function rc(e,t){return tp(e,null,null,t),Yh(e)}function YO(e,t,n){e.lanes|=n;var a=e.alternate;a!==null&&(a.lanes|=n);for(var s=!1,i=e.return;i!==null;)i.childLanes|=n,a=i.alternate,a!==null&&(a.childLanes|=n),i.tag===22&&(e=i.stateNode,e===null||e._visibility&1||(s=!0)),e=i,i=i.return;return e.tag===3?(i=e.stateNode,s&&t!==null&&(s=31-ga(n),e=i.hiddenUpdates,a=e[s],a===null?e[s]=[t]:a.push(t),t.lane=n|536870912),i):null}function Yh(e){if(50<od)throw od=0,nw=null,Error(ce(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ol={};function xP(e,t,n,a){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function fa(e,t,n,a){return new xP(e,t,n,a)}function SN(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ms(e,t){var n=e.alternate;return n===null?(n=fa(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function WO(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function yh(e,t,n,a,s,i){var o=0;if(a=e,typeof e=="function")SN(e)&&(o=1);else if(typeof e=="string")o=vF(e,n,Rr.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case S0:return e=fa(31,n,t,s),e.elementType=S0,e.lanes=i,e;case Jo:return eo(n.children,s,i,t);case fO:o=8,s|=24;break;case v0:return e=fa(12,n,t,s|2),e.elementType=v0,e.lanes=i,e;case w0:return e=fa(13,n,t,s),e.elementType=w0,e.lanes=i,e;case N0:return e=fa(19,n,t,s),e.elementType=N0,e.lanes=i,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case l6:case is:o=10;break e;case pO:o=9;break e;case cN:o=11;break e;case dN:o=14;break e;case Ys:o=16,a=null;break e}o=29,n=Error(ce(130,e===null?"null":typeof e,"")),a=null}return t=fa(o,n,t,s),t.elementType=e,t.type=a,t.lanes=i,t}function eo(e,t,n,a){return e=fa(7,e,a,t),e.lanes=n,e}function cm(e,t,n){return e=fa(6,e,null,t),e.lanes=n,e}function dm(e,t,n){return t=fa(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var ll=[],cl=0,Wh=null,Xh=0,Ma=[],La=0,to=null,os=1,ls="";function qi(e,t){ll[cl++]=Xh,ll[cl++]=Wh,Wh=e,Xh=t}function XO(e,t,n){Ma[La++]=os,Ma[La++]=ls,Ma[La++]=to,to=e;var a=os;e=ls;var s=32-ga(a)-1;a&=~(1<<s),n+=1;var i=32-ga(t)+s;if(30<i){var o=s-s%5;i=(a&(1<<o)-1).toString(32),a>>=o,s-=o,os=1<<32-ga(t)+s|n<<s|a,ls=i+e}else os=1<<i|n<<s|a,ls=e}function EN(e){e.return!==null&&(qi(e,1),XO(e,1,0))}function TN(e){for(;e===Wh;)Wh=ll[--cl],ll[cl]=null,Xh=ll[--cl],ll[cl]=null;for(;e===to;)to=Ma[--La],Ma[La]=null,ls=Ma[--La],Ma[La]=null,os=Ma[--La],Ma[La]=null}var In=null,Gt=null,ut=!1,no=null,Cr=!1,L0=Error(ce(519));function co(e){var t=Error(ce(418,""));throw xd(za(t,e)),L0}function JS(e){var t=e.stateNode,n=e.type,a=e.memoizedProps;switch(t[jn]=e,t[Xn]=a,n){case"dialog":st("cancel",t),st("close",t);break;case"iframe":case"object":case"embed":st("load",t);break;case"video":case"audio":for(n=0;n<wd.length;n++)st(wd[n],t);break;case"source":st("error",t);break;case"img":case"image":case"link":st("error",t),st("load",t);break;case"details":st("toggle",t);break;case"input":st("invalid",t),AO(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0),Gh(t);break;case"select":st("invalid",t);break;case"textarea":st("invalid",t),kO(t,a.value,a.defaultValue,a.children),Gh(t)}n=a.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||a.suppressHydrationWarning===!0||_D(t.textContent,n)?(a.popover!=null&&(st("beforetoggle",t),st("toggle",t)),a.onScroll!=null&&st("scroll",t),a.onScrollEnd!=null&&st("scrollend",t),a.onClick!=null&&(t.onclick=cp),t=!0):t=!1,t||co(e)}function eE(e){for(In=e.return;In;)switch(In.tag){case 5:case 13:Cr=!1;return;case 27:case 3:Cr=!0;return;default:In=In.return}}function vc(e){if(e!==In)return!1;if(!ut)return eE(e),ut=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||lw(e.type,e.memoizedProps)),n=!n),n&&Gt&&co(e),eE(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(ce(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8)if(n=e.data,n==="/$"){if(t===0){Gt=sr(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++;e=e.nextSibling}Gt=null}}else t===27?(t=Gt,_i(e.type)?(e=uw,uw=null,Gt=e):Gt=t):Gt=In?sr(e.stateNode.nextSibling):null;return!0}function eu(){Gt=In=null,ut=!1}function tE(){var e=no;return e!==null&&(Gn===null?Gn=e:Gn.push.apply(Gn,e),no=null),e}function xd(e){no===null?no=[e]:no.push(e)}var U0=Pr(null),jo=null,cs=null;function Ks(e,t,n){Ft(U0,t._currentValue),t._currentValue=n}function gs(e){e._currentValue=U0.current,vn(U0)}function P0(e,t,n){for(;e!==null;){var a=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,a!==null&&(a.childLanes|=t)):a!==null&&(a.childLanes&t)!==t&&(a.childLanes|=t),e===n)break;e=e.return}}function F0(e,t,n,a){var s=e.child;for(s!==null&&(s.return=e);s!==null;){var i=s.dependencies;if(i!==null){var o=s.child;i=i.firstContext;e:for(;i!==null;){var l=i;i=s;for(var c=0;c<t.length;c++)if(l.context===t[c]){i.lanes|=n,l=i.alternate,l!==null&&(l.lanes|=n),P0(i.return,n,e),a||(o=null);break e}i=l.next}}else if(s.tag===18){if(o=s.return,o===null)throw Error(ce(341));o.lanes|=n,i=o.alternate,i!==null&&(i.lanes|=n),P0(o,n,e),o=null}else o=s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===e){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}}function tu(e,t,n,a){e=null;for(var s=t,i=!1;s!==null;){if(!i){if(s.flags&524288)i=!0;else if(s.flags&262144)break}if(s.tag===10){var o=s.alternate;if(o===null)throw Error(ce(387));if(o=o.memoizedProps,o!==null){var l=s.type;va(s.pendingProps.value,o.value)||(e!==null?e.push(l):e=[l])}}else if(s===zh.current){if(o=s.alternate,o===null)throw Error(ce(387));o.memoizedState.memoizedState!==s.memoizedState.memoizedState&&(e!==null?e.push(Ed):e=[Ed])}s=s.return}e!==null&&F0(t,e,n,a),t.flags|=262144}function Kh(e){for(e=e.firstContext;e!==null;){if(!va(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function uo(e){jo=e,cs=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function kn(e){return KO(jo,e)}function Mu(e,t){return jo===null&&uo(e),KO(e,t)}function KO(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},cs===null){if(e===null)throw Error(ce(308));cs=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else cs=cs.next=t;return n}var yP=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,a){e.push(a)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},vP=fn.unstable_scheduleCallback,wP=fn.unstable_NormalPriority,dn={$$typeof:is,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function CN(){return{controller:new yP,data:new Map,refCount:0}}function nu(e){e.refCount--,e.refCount===0&&vP(wP,function(){e.controller.abort()})}var Qc=null,B0=0,Dl=0,xl=null;function NP(e,t){if(Qc===null){var n=Qc=[];B0=0,Dl=XN(),xl={status:"pending",value:void 0,then:function(a){n.push(a)}}}return B0++,t.then(nE,nE),t}function nE(){if(--B0===0&&Qc!==null){xl!==null&&(xl.status="fulfilled");var e=Qc;Qc=null,Dl=0,xl=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function SP(e,t){var n=[],a={status:"pending",value:null,reason:null,then:function(s){n.push(s)}};return e.then(function(){a.status="fulfilled",a.value=t;for(var s=0;s<n.length;s++)(0,n[s])(t)},function(s){for(a.status="rejected",a.reason=s,s=0;s<n.length;s++)(0,n[s])(void 0)}),a}var aE=qe.S;qe.S=function(e,t){typeof t=="object"&&t!==null&&typeof t.then=="function"&&NP(e,t),aE!==null&&aE(e,t)};var ao=Pr(null);function AN(){var e=ao.current;return e!==null?e:Rt.pooledCache}function vh(e,t){t===null?Ft(ao,ao.current):Ft(ao,t.pool)}function ZO(){var e=AN();return e===null?null:{parent:dn._currentValue,pool:e}}var au=Error(ce(460)),QO=Error(ce(474)),np=Error(ce(542)),z0={then:function(){}};function rE(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Lu(){}function JO(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Lu,Lu),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,iE(e),e;default:if(typeof t.status=="string")t.then(Lu,Lu);else{if(e=Rt,e!==null&&100<e.shellSuspendCounter)throw Error(ce(482));e=t,e.status="pending",e.then(function(a){if(t.status==="pending"){var s=t;s.status="fulfilled",s.value=a}},function(a){if(t.status==="pending"){var s=t;s.status="rejected",s.reason=a}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,iE(e),e}throw Jc=t,au}}var Jc=null;function sE(){if(Jc===null)throw Error(ce(459));var e=Jc;return Jc=null,e}function iE(e){if(e===au||e===np)throw Error(ce(483))}var Ws=!1;function jN(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function $0(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function li(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function ci(e,t,n){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,yt&2){var s=a.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),a.pending=t,t=Yh(e),YO(e,null,n),t}return tp(e,a,t,n),Yh(e)}function ed(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var a=t.lanes;a&=e.pendingLanes,n|=a,t.lanes=n,wO(e,n)}}function um(e,t){var n=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,n===a)){var s=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};i===null?s=i=o:i=i.next=o,n=n.next}while(n!==null);i===null?s=i=t:i=i.next=t}else s=i=t;n={baseState:a.baseState,firstBaseUpdate:s,lastBaseUpdate:i,shared:a.shared,callbacks:a.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var H0=!1;function td(){if(H0){var e=xl;if(e!==null)throw e}}function nd(e,t,n,a){H0=!1;var s=e.updateQueue;Ws=!1;var i=s.firstBaseUpdate,o=s.lastBaseUpdate,l=s.shared.pending;if(l!==null){s.shared.pending=null;var c=l,u=c.next;c.next=null,o===null?i=u:o.next=u,o=c;var h=e.alternate;h!==null&&(h=h.updateQueue,l=h.lastBaseUpdate,l!==o&&(l===null?h.firstBaseUpdate=u:l.next=u,h.lastBaseUpdate=c))}if(i!==null){var d=s.baseState;o=0,h=u=c=null,l=i;do{var f=l.lane&-536870913,p=f!==l.lane;if(p?(ot&f)===f:(a&f)===f){f!==0&&f===Dl&&(H0=!0),h!==null&&(h=h.next={lane:0,tag:l.tag,payload:l.payload,callback:null,next:null});e:{var v=e,x=l;f=t;var N=n;switch(x.tag){case 1:if(v=x.payload,typeof v=="function"){d=v.call(N,d,f);break e}d=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=x.payload,f=typeof v=="function"?v.call(N,d,f):v,f==null)break e;d=Lt({},d,f);break e;case 2:Ws=!0}}f=l.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=s.callbacks,p===null?s.callbacks=[f]:p.push(f))}else p={lane:f,tag:l.tag,payload:l.payload,callback:l.callback,next:null},h===null?(u=h=p,c=d):h=h.next=p,o|=f;if(l=l.next,l===null){if(l=s.shared.pending,l===null)break;p=l,l=p.next,p.next=null,s.lastBaseUpdate=p,s.shared.pending=null}}while(!0);h===null&&(c=d),s.baseState=c,s.firstBaseUpdate=u,s.lastBaseUpdate=h,i===null&&(s.shared.lanes=0),Ni|=o,e.lanes=o,e.memoizedState=d}}function e4(e,t){if(typeof e!="function")throw Error(ce(191,e));e.call(t)}function t4(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)e4(n[e],t)}var Il=Pr(null),Zh=Pr(0);function oE(e,t){e=ws,Ft(Zh,e),Ft(Il,t),ws=e|t.baseLanes}function q0(){Ft(Zh,ws),Ft(Il,Il.current)}function kN(){ws=Zh.current,vn(Il),vn(Zh)}var vi=0,Je=null,Nt=null,en=null,Qh=!1,yl=!1,ho=!1,Jh=0,yd=0,vl=null,EP=0;function Zt(){throw Error(ce(321))}function _N(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!va(e[n],t[n]))return!1;return!0}function RN(e,t,n,a,s,i){return vi=i,Je=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,qe.H=e===null||e.memoizedState===null?O4:D4,ho=!1,i=n(a,s),ho=!1,yl&&(i=a4(t,n,a,s)),n4(e),i}function n4(e){qe.H=ef;var t=Nt!==null&&Nt.next!==null;if(vi=0,en=Nt=Je=null,Qh=!1,yd=0,vl=null,t)throw Error(ce(300));e===null||yn||(e=e.dependencies,e!==null&&Kh(e)&&(yn=!0))}function a4(e,t,n,a){Je=e;var s=0;do{if(yl&&(vl=null),yd=0,yl=!1,25<=s)throw Error(ce(301));if(s+=1,en=Nt=null,e.updateQueue!=null){var i=e.updateQueue;i.lastEffect=null,i.events=null,i.stores=null,i.memoCache!=null&&(i.memoCache.index=0)}qe.H=RP,i=t(n,a)}while(yl);return i}function TP(){var e=qe.H,t=e.useState()[0];return t=typeof t.then=="function"?ru(t):t,e=e.useState()[0],(Nt!==null?Nt.memoizedState:null)!==e&&(Je.flags|=1024),t}function ON(){var e=Jh!==0;return Jh=0,e}function DN(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function IN(e){if(Qh){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Qh=!1}vi=0,en=Nt=Je=null,yl=!1,yd=Jh=0,vl=null}function Hn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return en===null?Je.memoizedState=en=e:en=en.next=e,en}function nn(){if(Nt===null){var e=Je.alternate;e=e!==null?e.memoizedState:null}else e=Nt.next;var t=en===null?Je.memoizedState:en.next;if(t!==null)en=t,Nt=e;else{if(e===null)throw Je.alternate===null?Error(ce(467)):Error(ce(310));Nt=e,e={memoizedState:Nt.memoizedState,baseState:Nt.baseState,baseQueue:Nt.baseQueue,queue:Nt.queue,next:null},en===null?Je.memoizedState=en=e:en=en.next=e}return en}function MN(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ru(e){var t=yd;return yd+=1,vl===null&&(vl=[]),e=JO(vl,e,t),t=Je,(en===null?t.memoizedState:en.next)===null&&(t=t.alternate,qe.H=t===null||t.memoizedState===null?O4:D4),e}function ap(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return ru(e);if(e.$$typeof===is)return kn(e)}throw Error(ce(438,String(e)))}function LN(e){var t=null,n=Je.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var a=Je.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(t={data:a.data.map(function(s){return s.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=MN(),Je.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),a=0;a<e;a++)n[a]=c6;return t.index++,n}function ys(e,t){return typeof t=="function"?t(e):t}function wh(e){var t=nn();return UN(t,Nt,e)}function UN(e,t,n){var a=e.queue;if(a===null)throw Error(ce(311));a.lastRenderedReducer=n;var s=e.baseQueue,i=a.pending;if(i!==null){if(s!==null){var o=s.next;s.next=i.next,i.next=o}t.baseQueue=s=i,a.pending=null}if(i=e.baseState,s===null)e.memoizedState=i;else{t=s.next;var l=o=null,c=null,u=t,h=!1;do{var d=u.lane&-536870913;if(d!==u.lane?(ot&d)===d:(vi&d)===d){var f=u.revertLane;if(f===0)c!==null&&(c=c.next={lane:0,revertLane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),d===Dl&&(h=!0);else if((vi&f)===f){u=u.next,f===Dl&&(h=!0);continue}else d={lane:0,revertLane:u.revertLane,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},c===null?(l=c=d,o=i):c=c.next=d,Je.lanes|=f,Ni|=f;d=u.action,ho&&n(i,d),i=u.hasEagerState?u.eagerState:n(i,d)}else f={lane:d,revertLane:u.revertLane,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},c===null?(l=c=f,o=i):c=c.next=f,Je.lanes|=d,Ni|=d;u=u.next}while(u!==null&&u!==t);if(c===null?o=i:c.next=l,!va(i,e.memoizedState)&&(yn=!0,h&&(n=xl,n!==null)))throw n;e.memoizedState=i,e.baseState=o,e.baseQueue=c,a.lastRenderedState=i}return s===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function hm(e){var t=nn(),n=t.queue;if(n===null)throw Error(ce(311));n.lastRenderedReducer=e;var a=n.dispatch,s=n.pending,i=t.memoizedState;if(s!==null){n.pending=null;var o=s=s.next;do i=e(i,o.action),o=o.next;while(o!==s);va(i,t.memoizedState)||(yn=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,a]}function r4(e,t,n){var a=Je,s=nn(),i=ut;if(i){if(n===void 0)throw Error(ce(407));n=n()}else n=t();var o=!va((Nt||s).memoizedState,n);o&&(s.memoizedState=n,yn=!0),s=s.queue;var l=o4.bind(null,a,s,e);if(su(2048,8,l,[e]),s.getSnapshot!==t||o||en!==null&&en.memoizedState.tag&1){if(a.flags|=2048,Ml(9,rp(),i4.bind(null,a,s,n,t),null),Rt===null)throw Error(ce(349));i||vi&124||s4(a,t,n)}return n}function s4(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Je.updateQueue,t===null?(t=MN(),Je.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function i4(e,t,n,a){t.value=n,t.getSnapshot=a,l4(t)&&c4(e)}function o4(e,t,n){return n(function(){l4(t)&&c4(e)})}function l4(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!va(e,n)}catch{return!0}}function c4(e){var t=rc(e,2);t!==null&&xa(t,e,2)}function G0(e){var t=Hn();if(typeof e=="function"){var n=e;if(e=n(),ho){ti(!0);try{n()}finally{ti(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ys,lastRenderedState:e},t}function d4(e,t,n,a){return e.baseState=n,UN(e,Nt,typeof a=="function"?a:ys)}function CP(e,t,n,a,s){if(sp(e))throw Error(ce(485));if(e=t.action,e!==null){var i={payload:s,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(o){i.listeners.push(o)}};qe.T!==null?n(!0):i.isTransition=!1,a(i),n=t.pending,n===null?(i.next=t.pending=i,u4(t,i)):(i.next=n.next,t.pending=n.next=i)}}function u4(e,t){var n=t.action,a=t.payload,s=e.state;if(t.isTransition){var i=qe.T,o={};qe.T=o;try{var l=n(s,a),c=qe.S;c!==null&&c(o,l),lE(e,t,l)}catch(u){V0(e,t,u)}finally{qe.T=i}}else try{i=n(s,a),lE(e,t,i)}catch(u){V0(e,t,u)}}function lE(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(a){cE(e,t,a)},function(a){return V0(e,t,a)}):cE(e,t,n)}function cE(e,t,n){t.status="fulfilled",t.value=n,h4(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,u4(e,n)))}function V0(e,t,n){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=n,h4(t),t=t.next;while(t!==a)}e.action=null}function h4(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function f4(e,t){return t}function dE(e,t){if(ut){var n=Rt.formState;if(n!==null){e:{var a=Je;if(ut){if(Gt){t:{for(var s=Gt,i=Cr;s.nodeType!==8;){if(!i){s=null;break t}if(s=sr(s.nextSibling),s===null){s=null;break t}}i=s.data,s=i==="F!"||i==="F"?s:null}if(s){Gt=sr(s.nextSibling),a=s.data==="F!";break e}}co(a)}a=!1}a&&(t=n[0])}}return n=Hn(),n.memoizedState=n.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:f4,lastRenderedState:t},n.queue=a,n=k4.bind(null,Je,a),a.dispatch=n,a=G0(!1),i=zN.bind(null,Je,!1,a.queue),a=Hn(),s={state:t,dispatch:null,action:e,pending:null},a.queue=s,n=CP.bind(null,Je,s,i,n),s.dispatch=n,a.memoizedState=e,[t,n,!1]}function uE(e){var t=nn();return p4(t,Nt,e)}function p4(e,t,n){if(t=UN(e,t,f4)[0],e=wh(ys)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=ru(t)}catch(o){throw o===au?np:o}else a=t;t=nn();var s=t.queue,i=s.dispatch;return n!==t.memoizedState&&(Je.flags|=2048,Ml(9,rp(),AP.bind(null,s,n),null)),[a,i,e]}function AP(e,t){e.action=t}function hE(e){var t=nn(),n=Nt;if(n!==null)return p4(t,n,e);nn(),t=t.memoizedState,n=nn();var a=n.queue.dispatch;return n.memoizedState=e,[t,a,!1]}function Ml(e,t,n,a){return e={tag:e,create:n,deps:a,inst:t,next:null},t=Je.updateQueue,t===null&&(t=MN(),Je.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(a=n.next,n.next=e,e.next=a,t.lastEffect=e),e}function rp(){return{destroy:void 0,resource:void 0}}function m4(){return nn().memoizedState}function Nh(e,t,n,a){var s=Hn();a=a===void 0?null:a,Je.flags|=e,s.memoizedState=Ml(1|t,rp(),n,a)}function su(e,t,n,a){var s=nn();a=a===void 0?null:a;var i=s.memoizedState.inst;Nt!==null&&a!==null&&_N(a,Nt.memoizedState.deps)?s.memoizedState=Ml(t,i,n,a):(Je.flags|=e,s.memoizedState=Ml(1|t,i,n,a))}function fE(e,t){Nh(8390656,8,e,t)}function g4(e,t){su(2048,8,e,t)}function b4(e,t){return su(4,2,e,t)}function x4(e,t){return su(4,4,e,t)}function y4(e,t){if(typeof t=="function"){e=e();var n=t(e);return function(){typeof n=="function"?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function v4(e,t,n){n=n!=null?n.concat([e]):null,su(4,4,y4.bind(null,t,e),n)}function PN(){}function w4(e,t){var n=nn();t=t===void 0?null:t;var a=n.memoizedState;return t!==null&&_N(t,a[1])?a[0]:(n.memoizedState=[e,t],e)}function N4(e,t){var n=nn();t=t===void 0?null:t;var a=n.memoizedState;if(t!==null&&_N(t,a[1]))return a[0];if(a=e(),ho){ti(!0);try{e()}finally{ti(!1)}}return n.memoizedState=[a,t],a}function FN(e,t,n){return n===void 0||vi&1073741824?e.memoizedState=t:(e.memoizedState=n,e=hD(),Je.lanes|=e,Ni|=e,n)}function S4(e,t,n,a){return va(n,t)?n:Il.current!==null?(e=FN(e,n,a),va(e,t)||(yn=!0),e):vi&42?(e=hD(),Je.lanes|=e,Ni|=e,t):(yn=!0,e.memoizedState=n)}function E4(e,t,n,a,s){var i=ht.p;ht.p=i!==0&&8>i?i:8;var o=qe.T,l={};qe.T=l,zN(e,!1,t,n);try{var c=s(),u=qe.S;if(u!==null&&u(l,c),c!==null&&typeof c=="object"&&typeof c.then=="function"){var h=SP(c,a);ad(e,t,h,ba(e))}else ad(e,t,a,ba(e))}catch(d){ad(e,t,{then:function(){},status:"rejected",reason:d},ba())}finally{ht.p=i,qe.T=o}}function jP(){}function Y0(e,t,n,a){if(e.tag!==5)throw Error(ce(476));var s=T4(e).queue;E4(e,s,t,Ji,n===null?jP:function(){return C4(e),n(a)})}function T4(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:Ji,baseState:Ji,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ys,lastRenderedState:Ji},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ys,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function C4(e){var t=T4(e).next.queue;ad(e,t,{},ba())}function BN(){return kn(Ed)}function A4(){return nn().memoizedState}function j4(){return nn().memoizedState}function kP(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=ba();e=li(n);var a=ci(t,e,n);a!==null&&(xa(a,t,n),ed(a,t,n)),t={cache:CN()},e.payload=t;return}t=t.return}}function _P(e,t,n){var a=ba();n={lane:a,revertLane:0,action:n,hasEagerState:!1,eagerState:null,next:null},sp(e)?_4(t,n):(n=NN(e,t,n,a),n!==null&&(xa(n,e,a),R4(n,t,a)))}function k4(e,t,n){var a=ba();ad(e,t,n,a)}function ad(e,t,n,a){var s={lane:a,revertLane:0,action:n,hasEagerState:!1,eagerState:null,next:null};if(sp(e))_4(t,s);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var o=t.lastRenderedState,l=i(o,n);if(s.hasEagerState=!0,s.eagerState=l,va(l,o))return tp(e,t,s,0),Rt===null&&ep(),!1}catch{}finally{}if(n=NN(e,t,s,a),n!==null)return xa(n,e,a),R4(n,t,a),!0}return!1}function zN(e,t,n,a){if(a={lane:2,revertLane:XN(),action:a,hasEagerState:!1,eagerState:null,next:null},sp(e)){if(t)throw Error(ce(479))}else t=NN(e,n,a,2),t!==null&&xa(t,e,2)}function sp(e){var t=e.alternate;return e===Je||t!==null&&t===Je}function _4(e,t){yl=Qh=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function R4(e,t,n){if(n&4194048){var a=t.lanes;a&=e.pendingLanes,n|=a,t.lanes=n,wO(e,n)}}var ef={readContext:kn,use:ap,useCallback:Zt,useContext:Zt,useEffect:Zt,useImperativeHandle:Zt,useLayoutEffect:Zt,useInsertionEffect:Zt,useMemo:Zt,useReducer:Zt,useRef:Zt,useState:Zt,useDebugValue:Zt,useDeferredValue:Zt,useTransition:Zt,useSyncExternalStore:Zt,useId:Zt,useHostTransitionStatus:Zt,useFormState:Zt,useActionState:Zt,useOptimistic:Zt,useMemoCache:Zt,useCacheRefresh:Zt},O4={readContext:kn,use:ap,useCallback:function(e,t){return Hn().memoizedState=[e,t===void 0?null:t],e},useContext:kn,useEffect:fE,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,Nh(4194308,4,y4.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Nh(4194308,4,e,t)},useInsertionEffect:function(e,t){Nh(4,2,e,t)},useMemo:function(e,t){var n=Hn();t=t===void 0?null:t;var a=e();if(ho){ti(!0);try{e()}finally{ti(!1)}}return n.memoizedState=[a,t],a},useReducer:function(e,t,n){var a=Hn();if(n!==void 0){var s=n(t);if(ho){ti(!0);try{n(t)}finally{ti(!1)}}}else s=t;return a.memoizedState=a.baseState=s,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:s},a.queue=e,e=e.dispatch=_P.bind(null,Je,e),[a.memoizedState,e]},useRef:function(e){var t=Hn();return e={current:e},t.memoizedState=e},useState:function(e){e=G0(e);var t=e.queue,n=k4.bind(null,Je,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:PN,useDeferredValue:function(e,t){var n=Hn();return FN(n,e,t)},useTransition:function(){var e=G0(!1);return e=E4.bind(null,Je,e.queue,!0,!1),Hn().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var a=Je,s=Hn();if(ut){if(n===void 0)throw Error(ce(407));n=n()}else{if(n=t(),Rt===null)throw Error(ce(349));ot&124||s4(a,t,n)}s.memoizedState=n;var i={value:n,getSnapshot:t};return s.queue=i,fE(o4.bind(null,a,i,e),[e]),a.flags|=2048,Ml(9,rp(),i4.bind(null,a,i,n,t),null),n},useId:function(){var e=Hn(),t=Rt.identifierPrefix;if(ut){var n=ls,a=os;n=(a&~(1<<32-ga(a)-1)).toString(32)+n,t="«"+t+"R"+n,n=Jh++,0<n&&(t+="H"+n.toString(32)),t+="»"}else n=EP++,t="«"+t+"r"+n.toString(32)+"»";return e.memoizedState=t},useHostTransitionStatus:BN,useFormState:dE,useActionState:dE,useOptimistic:function(e){var t=Hn();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=zN.bind(null,Je,!0,n),n.dispatch=t,[e,t]},useMemoCache:LN,useCacheRefresh:function(){return Hn().memoizedState=kP.bind(null,Je)}},D4={readContext:kn,use:ap,useCallback:w4,useContext:kn,useEffect:g4,useImperativeHandle:v4,useInsertionEffect:b4,useLayoutEffect:x4,useMemo:N4,useReducer:wh,useRef:m4,useState:function(){return wh(ys)},useDebugValue:PN,useDeferredValue:function(e,t){var n=nn();return S4(n,Nt.memoizedState,e,t)},useTransition:function(){var e=wh(ys)[0],t=nn().memoizedState;return[typeof e=="boolean"?e:ru(e),t]},useSyncExternalStore:r4,useId:A4,useHostTransitionStatus:BN,useFormState:uE,useActionState:uE,useOptimistic:function(e,t){var n=nn();return d4(n,Nt,e,t)},useMemoCache:LN,useCacheRefresh:j4},RP={readContext:kn,use:ap,useCallback:w4,useContext:kn,useEffect:g4,useImperativeHandle:v4,useInsertionEffect:b4,useLayoutEffect:x4,useMemo:N4,useReducer:hm,useRef:m4,useState:function(){return hm(ys)},useDebugValue:PN,useDeferredValue:function(e,t){var n=nn();return Nt===null?FN(n,e,t):S4(n,Nt.memoizedState,e,t)},useTransition:function(){var e=hm(ys)[0],t=nn().memoizedState;return[typeof e=="boolean"?e:ru(e),t]},useSyncExternalStore:r4,useId:A4,useHostTransitionStatus:BN,useFormState:hE,useActionState:hE,useOptimistic:function(e,t){var n=nn();return Nt!==null?d4(n,Nt,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:LN,useCacheRefresh:j4},wl=null,vd=0;function Uu(e){var t=vd;return vd+=1,wl===null&&(wl=[]),JO(wl,e,t)}function wc(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Pu(e,t){throw t.$$typeof===o6?Error(ce(525)):(e=Object.prototype.toString.call(t),Error(ce(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function pE(e){var t=e._init;return t(e._payload)}function I4(e){function t(b,y){if(e){var g=b.deletions;g===null?(b.deletions=[y],b.flags|=16):g.push(y)}}function n(b,y){if(!e)return null;for(;y!==null;)t(b,y),y=y.sibling;return null}function a(b){for(var y=new Map;b!==null;)b.key!==null?y.set(b.key,b):y.set(b.index,b),b=b.sibling;return y}function s(b,y){return b=ms(b,y),b.index=0,b.sibling=null,b}function i(b,y,g){return b.index=g,e?(g=b.alternate,g!==null?(g=g.index,g<y?(b.flags|=67108866,y):g):(b.flags|=67108866,y)):(b.flags|=1048576,y)}function o(b){return e&&b.alternate===null&&(b.flags|=67108866),b}function l(b,y,g,w){return y===null||y.tag!==6?(y=cm(g,b.mode,w),y.return=b,y):(y=s(y,g),y.return=b,y)}function c(b,y,g,w){var S=g.type;return S===Jo?h(b,y,g.props.children,w,g.key):y!==null&&(y.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===Ys&&pE(S)===y.type)?(y=s(y,g.props),wc(y,g),y.return=b,y):(y=yh(g.type,g.key,g.props,null,b.mode,w),wc(y,g),y.return=b,y)}function u(b,y,g,w){return y===null||y.tag!==4||y.stateNode.containerInfo!==g.containerInfo||y.stateNode.implementation!==g.implementation?(y=dm(g,b.mode,w),y.return=b,y):(y=s(y,g.children||[]),y.return=b,y)}function h(b,y,g,w,S){return y===null||y.tag!==7?(y=eo(g,b.mode,w,S),y.return=b,y):(y=s(y,g),y.return=b,y)}function d(b,y,g){if(typeof y=="string"&&y!==""||typeof y=="number"||typeof y=="bigint")return y=cm(""+y,b.mode,g),y.return=b,y;if(typeof y=="object"&&y!==null){switch(y.$$typeof){case _u:return g=yh(y.type,y.key,y.props,null,b.mode,g),wc(g,y),g.return=b,g;case Fc:return y=dm(y,b.mode,g),y.return=b,y;case Ys:var w=y._init;return y=w(y._payload),d(b,y,g)}if(Bc(y)||bc(y))return y=eo(y,b.mode,g,null),y.return=b,y;if(typeof y.then=="function")return d(b,Uu(y),g);if(y.$$typeof===is)return d(b,Mu(b,y),g);Pu(b,y)}return null}function f(b,y,g,w){var S=y!==null?y.key:null;if(typeof g=="string"&&g!==""||typeof g=="number"||typeof g=="bigint")return S!==null?null:l(b,y,""+g,w);if(typeof g=="object"&&g!==null){switch(g.$$typeof){case _u:return g.key===S?c(b,y,g,w):null;case Fc:return g.key===S?u(b,y,g,w):null;case Ys:return S=g._init,g=S(g._payload),f(b,y,g,w)}if(Bc(g)||bc(g))return S!==null?null:h(b,y,g,w,null);if(typeof g.then=="function")return f(b,y,Uu(g),w);if(g.$$typeof===is)return f(b,y,Mu(b,g),w);Pu(b,g)}return null}function p(b,y,g,w,S){if(typeof w=="string"&&w!==""||typeof w=="number"||typeof w=="bigint")return b=b.get(g)||null,l(y,b,""+w,S);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case _u:return b=b.get(w.key===null?g:w.key)||null,c(y,b,w,S);case Fc:return b=b.get(w.key===null?g:w.key)||null,u(y,b,w,S);case Ys:var C=w._init;return w=C(w._payload),p(b,y,g,w,S)}if(Bc(w)||bc(w))return b=b.get(g)||null,h(y,b,w,S,null);if(typeof w.then=="function")return p(b,y,g,Uu(w),S);if(w.$$typeof===is)return p(b,y,g,Mu(y,w),S);Pu(y,w)}return null}function v(b,y,g,w){for(var S=null,C=null,T=y,E=y=0,k=null;T!==null&&E<g.length;E++){T.index>E?(k=T,T=null):k=T.sibling;var O=f(b,T,g[E],w);if(O===null){T===null&&(T=k);break}e&&T&&O.alternate===null&&t(b,T),y=i(O,y,E),C===null?S=O:C.sibling=O,C=O,T=k}if(E===g.length)return n(b,T),ut&&qi(b,E),S;if(T===null){for(;E<g.length;E++)T=d(b,g[E],w),T!==null&&(y=i(T,y,E),C===null?S=T:C.sibling=T,C=T);return ut&&qi(b,E),S}for(T=a(T);E<g.length;E++)k=p(T,b,E,g[E],w),k!==null&&(e&&k.alternate!==null&&T.delete(k.key===null?E:k.key),y=i(k,y,E),C===null?S=k:C.sibling=k,C=k);return e&&T.forEach(function(R){return t(b,R)}),ut&&qi(b,E),S}function x(b,y,g,w){if(g==null)throw Error(ce(151));for(var S=null,C=null,T=y,E=y=0,k=null,O=g.next();T!==null&&!O.done;E++,O=g.next()){T.index>E?(k=T,T=null):k=T.sibling;var R=f(b,T,O.value,w);if(R===null){T===null&&(T=k);break}e&&T&&R.alternate===null&&t(b,T),y=i(R,y,E),C===null?S=R:C.sibling=R,C=R,T=k}if(O.done)return n(b,T),ut&&qi(b,E),S;if(T===null){for(;!O.done;E++,O=g.next())O=d(b,O.value,w),O!==null&&(y=i(O,y,E),C===null?S=O:C.sibling=O,C=O);return ut&&qi(b,E),S}for(T=a(T);!O.done;E++,O=g.next())O=p(T,b,E,O.value,w),O!==null&&(e&&O.alternate!==null&&T.delete(O.key===null?E:O.key),y=i(O,y,E),C===null?S=O:C.sibling=O,C=O);return e&&T.forEach(function(I){return t(b,I)}),ut&&qi(b,E),S}function N(b,y,g,w){if(typeof g=="object"&&g!==null&&g.type===Jo&&g.key===null&&(g=g.props.children),typeof g=="object"&&g!==null){switch(g.$$typeof){case _u:e:{for(var S=g.key;y!==null;){if(y.key===S){if(S=g.type,S===Jo){if(y.tag===7){n(b,y.sibling),w=s(y,g.props.children),w.return=b,b=w;break e}}else if(y.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===Ys&&pE(S)===y.type){n(b,y.sibling),w=s(y,g.props),wc(w,g),w.return=b,b=w;break e}n(b,y);break}else t(b,y);y=y.sibling}g.type===Jo?(w=eo(g.props.children,b.mode,w,g.key),w.return=b,b=w):(w=yh(g.type,g.key,g.props,null,b.mode,w),wc(w,g),w.return=b,b=w)}return o(b);case Fc:e:{for(S=g.key;y!==null;){if(y.key===S)if(y.tag===4&&y.stateNode.containerInfo===g.containerInfo&&y.stateNode.implementation===g.implementation){n(b,y.sibling),w=s(y,g.children||[]),w.return=b,b=w;break e}else{n(b,y);break}else t(b,y);y=y.sibling}w=dm(g,b.mode,w),w.return=b,b=w}return o(b);case Ys:return S=g._init,g=S(g._payload),N(b,y,g,w)}if(Bc(g))return v(b,y,g,w);if(bc(g)){if(S=bc(g),typeof S!="function")throw Error(ce(150));return g=S.call(g),x(b,y,g,w)}if(typeof g.then=="function")return N(b,y,Uu(g),w);if(g.$$typeof===is)return N(b,y,Mu(b,g),w);Pu(b,g)}return typeof g=="string"&&g!==""||typeof g=="number"||typeof g=="bigint"?(g=""+g,y!==null&&y.tag===6?(n(b,y.sibling),w=s(y,g),w.return=b,b=w):(n(b,y),w=cm(g,b.mode,w),w.return=b,b=w),o(b)):n(b,y)}return function(b,y,g,w){try{vd=0;var S=N(b,y,g,w);return wl=null,S}catch(T){if(T===au||T===np)throw T;var C=fa(29,T,null,b.mode);return C.lanes=w,C.return=b,C}finally{}}}var Ll=I4(!0),M4=I4(!1),Ha=Pr(null),Dr=null;function Zs(e){var t=e.alternate;Ft(hn,hn.current&1),Ft(Ha,e),Dr===null&&(t===null||Il.current!==null||t.memoizedState!==null)&&(Dr=e)}function L4(e){if(e.tag===22){if(Ft(hn,hn.current),Ft(Ha,e),Dr===null){var t=e.alternate;t!==null&&t.memoizedState!==null&&(Dr=e)}}else Qs()}function Qs(){Ft(hn,hn.current),Ft(Ha,Ha.current)}function ds(e){vn(Ha),Dr===e&&(Dr=null),vn(hn)}var hn=Pr(0);function tf(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||dw(n)))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}function fm(e,t,n,a){t=e.memoizedState,n=n(a,t),n=n==null?t:Lt({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var W0={enqueueSetState:function(e,t,n){e=e._reactInternals;var a=ba(),s=li(a);s.payload=t,n!=null&&(s.callback=n),t=ci(e,s,a),t!==null&&(xa(t,e,a),ed(t,e,a))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var a=ba(),s=li(a);s.tag=1,s.payload=t,n!=null&&(s.callback=n),t=ci(e,s,a),t!==null&&(xa(t,e,a),ed(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=ba(),a=li(n);a.tag=2,t!=null&&(a.callback=t),t=ci(e,a,n),t!==null&&(xa(t,e,n),ed(t,e,n))}};function mE(e,t,n,a,s,i,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,i,o):t.prototype&&t.prototype.isPureReactComponent?!bd(n,a)||!bd(s,i):!0}function gE(e,t,n,a){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,a),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,a),t.state!==e&&W0.enqueueReplaceState(t,t.state,null)}function fo(e,t){var n=t;if("ref"in t){n={};for(var a in t)a!=="ref"&&(n[a]=t[a])}if(e=e.defaultProps){n===t&&(n=Lt({},n));for(var s in e)n[s]===void 0&&(n[s]=e[s])}return n}var nf=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)};function U4(e){nf(e)}function P4(e){console.error(e)}function F4(e){nf(e)}function af(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function bE(e,t,n){try{var a=e.onCaughtError;a(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(s){setTimeout(function(){throw s})}}function X0(e,t,n){return n=li(n),n.tag=3,n.payload={element:null},n.callback=function(){af(e,t)},n}function B4(e){return e=li(e),e.tag=3,e}function z4(e,t,n,a){var s=n.type.getDerivedStateFromError;if(typeof s=="function"){var i=a.value;e.payload=function(){return s(i)},e.callback=function(){bE(t,n,a)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch=="function"&&(e.callback=function(){bE(t,n,a),typeof s!="function"&&(di===null?di=new Set([this]):di.add(this));var l=a.stack;this.componentDidCatch(a.value,{componentStack:l!==null?l:""})})}function OP(e,t,n,a,s){if(n.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=n.alternate,t!==null&&tu(t,n,s,!0),n=Ha.current,n!==null){switch(n.tag){case 13:return Dr===null?aw():n.alternate===null&&Yt===0&&(Yt=3),n.flags&=-257,n.flags|=65536,n.lanes=s,a===z0?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([a]):t.add(a),Em(e,a,s)),!1;case 22:return n.flags|=65536,a===z0?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([a])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([a]):n.add(a)),Em(e,a,s)),!1}throw Error(ce(435,n.tag))}return Em(e,a,s),aw(),!1}if(ut)return t=Ha.current,t!==null?(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=s,a!==L0&&(e=Error(ce(422),{cause:a}),xd(za(e,n)))):(a!==L0&&(t=Error(ce(423),{cause:a}),xd(za(t,n))),e=e.current.alternate,e.flags|=65536,s&=-s,e.lanes|=s,a=za(a,n),s=X0(e.stateNode,a,s),um(e,s),Yt!==4&&(Yt=2)),!1;var i=Error(ce(520),{cause:a});if(i=za(i,n),id===null?id=[i]:id.push(i),Yt!==4&&(Yt=2),t===null)return!0;a=za(a,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=s&-s,n.lanes|=e,e=X0(n.stateNode,a,e),um(n,e),!1;case 1:if(t=n.type,i=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||i!==null&&typeof i.componentDidCatch=="function"&&(di===null||!di.has(i))))return n.flags|=65536,s&=-s,n.lanes|=s,s=B4(s),z4(s,e,n,a),um(n,s),!1}n=n.return}while(n!==null);return!1}var $4=Error(ce(461)),yn=!1;function Nn(e,t,n,a){t.child=e===null?M4(t,null,n,a):Ll(t,e.child,n,a)}function xE(e,t,n,a,s){n=n.render;var i=t.ref;if("ref"in a){var o={};for(var l in a)l!=="ref"&&(o[l]=a[l])}else o=a;return uo(t),a=RN(e,t,n,o,i,s),l=ON(),e!==null&&!yn?(DN(e,t,s),vs(e,t,s)):(ut&&l&&EN(t),t.flags|=1,Nn(e,t,a,s),t.child)}function yE(e,t,n,a,s){if(e===null){var i=n.type;return typeof i=="function"&&!SN(i)&&i.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=i,H4(e,t,i,a,s)):(e=yh(n.type,null,a,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!$N(e,s)){var o=i.memoizedProps;if(n=n.compare,n=n!==null?n:bd,n(o,a)&&e.ref===t.ref)return vs(e,t,s)}return t.flags|=1,e=ms(i,a),e.ref=t.ref,e.return=t,t.child=e}function H4(e,t,n,a,s){if(e!==null){var i=e.memoizedProps;if(bd(i,a)&&e.ref===t.ref)if(yn=!1,t.pendingProps=a=i,$N(e,s))e.flags&131072&&(yn=!0);else return t.lanes=e.lanes,vs(e,t,s)}return K0(e,t,n,a,s)}function q4(e,t,n){var a=t.pendingProps,s=a.children,i=e!==null?e.memoizedState:null;if(a.mode==="hidden"){if(t.flags&128){if(a=i!==null?i.baseLanes|n:n,e!==null){for(s=t.child=e.child,i=0;s!==null;)i=i|s.lanes|s.childLanes,s=s.sibling;t.childLanes=i&~a}else t.childLanes=0,t.child=null;return vE(e,t,a,n)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&vh(t,i!==null?i.cachePool:null),i!==null?oE(t,i):q0(),L4(t);else return t.lanes=t.childLanes=536870912,vE(e,t,i!==null?i.baseLanes|n:n,n)}else i!==null?(vh(t,i.cachePool),oE(t,i),Qs(),t.memoizedState=null):(e!==null&&vh(t,null),q0(),Qs());return Nn(e,t,s,n),t.child}function vE(e,t,n,a){var s=AN();return s=s===null?null:{parent:dn._currentValue,pool:s},t.memoizedState={baseLanes:n,cachePool:s},e!==null&&vh(t,null),q0(),L4(t),e!==null&&tu(e,t,a,!0),null}function Sh(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(ce(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function K0(e,t,n,a,s){return uo(t),n=RN(e,t,n,a,void 0,s),a=ON(),e!==null&&!yn?(DN(e,t,s),vs(e,t,s)):(ut&&a&&EN(t),t.flags|=1,Nn(e,t,n,s),t.child)}function wE(e,t,n,a,s,i){return uo(t),t.updateQueue=null,n=a4(t,a,n,s),n4(e),a=ON(),e!==null&&!yn?(DN(e,t,i),vs(e,t,i)):(ut&&a&&EN(t),t.flags|=1,Nn(e,t,n,i),t.child)}function NE(e,t,n,a,s){if(uo(t),t.stateNode===null){var i=ol,o=n.contextType;typeof o=="object"&&o!==null&&(i=kn(o)),i=new n(a,i),t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=W0,t.stateNode=i,i._reactInternals=t,i=t.stateNode,i.props=a,i.state=t.memoizedState,i.refs={},jN(t),o=n.contextType,i.context=typeof o=="object"&&o!==null?kn(o):ol,i.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o=="function"&&(fm(t,n,o,a),i.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(o=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),o!==i.state&&W0.enqueueReplaceState(i,i.state,null),nd(t,a,i,s),td(),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308),a=!0}else if(e===null){i=t.stateNode;var l=t.memoizedProps,c=fo(n,l);i.props=c;var u=i.context,h=n.contextType;o=ol,typeof h=="object"&&h!==null&&(o=kn(h));var d=n.getDerivedStateFromProps;h=typeof d=="function"||typeof i.getSnapshotBeforeUpdate=="function",l=t.pendingProps!==l,h||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(l||u!==o)&&gE(t,i,a,o),Ws=!1;var f=t.memoizedState;i.state=f,nd(t,a,i,s),td(),u=t.memoizedState,l||f!==u||Ws?(typeof d=="function"&&(fm(t,n,d,a),u=t.memoizedState),(c=Ws||mE(t,n,c,a,f,u,o))?(h||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=a,t.memoizedState=u),i.props=a,i.state=u,i.context=o,a=c):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{i=t.stateNode,$0(e,t),o=t.memoizedProps,h=fo(n,o),i.props=h,d=t.pendingProps,f=i.context,u=n.contextType,c=ol,typeof u=="object"&&u!==null&&(c=kn(u)),l=n.getDerivedStateFromProps,(u=typeof l=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(o!==d||f!==c)&&gE(t,i,a,c),Ws=!1,f=t.memoizedState,i.state=f,nd(t,a,i,s),td();var p=t.memoizedState;o!==d||f!==p||Ws||e!==null&&e.dependencies!==null&&Kh(e.dependencies)?(typeof l=="function"&&(fm(t,n,l,a),p=t.memoizedState),(h=Ws||mE(t,n,h,a,f,p,c)||e!==null&&e.dependencies!==null&&Kh(e.dependencies))?(u||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(a,p,c),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(a,p,c)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=p),i.props=a,i.state=p,i.context=c,a=h):(typeof i.componentDidUpdate!="function"||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),a=!1)}return i=a,Sh(e,t),a=(t.flags&128)!==0,i||a?(i=t.stateNode,n=a&&typeof n.getDerivedStateFromError!="function"?null:i.render(),t.flags|=1,e!==null&&a?(t.child=Ll(t,e.child,null,s),t.child=Ll(t,null,n,s)):Nn(e,t,n,s),t.memoizedState=i.state,e=t.child):e=vs(e,t,s),e}function SE(e,t,n,a){return eu(),t.flags|=256,Nn(e,t,n,a),t.child}var pm={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function mm(e){return{baseLanes:e,cachePool:ZO()}}function gm(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=$a),e}function G4(e,t,n){var a=t.pendingProps,s=!1,i=(t.flags&128)!==0,o;if((o=i)||(o=e!==null&&e.memoizedState===null?!1:(hn.current&2)!==0),o&&(s=!0,t.flags&=-129),o=(t.flags&32)!==0,t.flags&=-33,e===null){if(ut){if(s?Zs(t):Qs(),ut){var l=Gt,c;if(c=l){e:{for(c=l,l=Cr;c.nodeType!==8;){if(!l){l=null;break e}if(c=sr(c.nextSibling),c===null){l=null;break e}}l=c}l!==null?(t.memoizedState={dehydrated:l,treeContext:to!==null?{id:os,overflow:ls}:null,retryLane:536870912,hydrationErrors:null},c=fa(18,null,null,0),c.stateNode=l,c.return=t,t.child=c,In=t,Gt=null,c=!0):c=!1}c||co(t)}if(l=t.memoizedState,l!==null&&(l=l.dehydrated,l!==null))return dw(l)?t.lanes=32:t.lanes=536870912,null;ds(t)}return l=a.children,a=a.fallback,s?(Qs(),s=t.mode,l=rf({mode:"hidden",children:l},s),a=eo(a,s,n,null),l.return=t,a.return=t,l.sibling=a,t.child=l,s=t.child,s.memoizedState=mm(n),s.childLanes=gm(e,o,n),t.memoizedState=pm,a):(Zs(t),Z0(t,l))}if(c=e.memoizedState,c!==null&&(l=c.dehydrated,l!==null)){if(i)t.flags&256?(Zs(t),t.flags&=-257,t=bm(e,t,n)):t.memoizedState!==null?(Qs(),t.child=e.child,t.flags|=128,t=null):(Qs(),s=a.fallback,l=t.mode,a=rf({mode:"visible",children:a.children},l),s=eo(s,l,n,null),s.flags|=2,a.return=t,s.return=t,a.sibling=s,t.child=a,Ll(t,e.child,null,n),a=t.child,a.memoizedState=mm(n),a.childLanes=gm(e,o,n),t.memoizedState=pm,t=s);else if(Zs(t),dw(l)){if(o=l.nextSibling&&l.nextSibling.dataset,o)var u=o.dgst;o=u,a=Error(ce(419)),a.stack="",a.digest=o,xd({value:a,source:null,stack:null}),t=bm(e,t,n)}else if(yn||tu(e,t,n,!1),o=(n&e.childLanes)!==0,yn||o){if(o=Rt,o!==null&&(a=n&-n,a=a&42?1:hN(a),a=a&(o.suspendedLanes|n)?0:a,a!==0&&a!==c.retryLane))throw c.retryLane=a,rc(e,a),xa(o,e,a),$4;l.data==="$?"||aw(),t=bm(e,t,n)}else l.data==="$?"?(t.flags|=192,t.child=e.child,t=null):(e=c.treeContext,Gt=sr(l.nextSibling),In=t,ut=!0,no=null,Cr=!1,e!==null&&(Ma[La++]=os,Ma[La++]=ls,Ma[La++]=to,os=e.id,ls=e.overflow,to=t),t=Z0(t,a.children),t.flags|=4096);return t}return s?(Qs(),s=a.fallback,l=t.mode,c=e.child,u=c.sibling,a=ms(c,{mode:"hidden",children:a.children}),a.subtreeFlags=c.subtreeFlags&65011712,u!==null?s=ms(u,s):(s=eo(s,l,n,null),s.flags|=2),s.return=t,a.return=t,a.sibling=s,t.child=a,a=s,s=t.child,l=e.child.memoizedState,l===null?l=mm(n):(c=l.cachePool,c!==null?(u=dn._currentValue,c=c.parent!==u?{parent:u,pool:u}:c):c=ZO(),l={baseLanes:l.baseLanes|n,cachePool:c}),s.memoizedState=l,s.childLanes=gm(e,o,n),t.memoizedState=pm,a):(Zs(t),n=e.child,e=n.sibling,n=ms(n,{mode:"visible",children:a.children}),n.return=t,n.sibling=null,e!==null&&(o=t.deletions,o===null?(t.deletions=[e],t.flags|=16):o.push(e)),t.child=n,t.memoizedState=null,n)}function Z0(e,t){return t=rf({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function rf(e,t){return e=fa(22,e,null,t),e.lanes=0,e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},e}function bm(e,t,n){return Ll(t,e.child,null,n),e=Z0(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function EE(e,t,n){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),P0(e.return,t,n)}function xm(e,t,n,a,s){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:n,tailMode:s}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=a,i.tail=n,i.tailMode=s)}function V4(e,t,n){var a=t.pendingProps,s=a.revealOrder,i=a.tail;if(Nn(e,t,a.children,n),a=hn.current,a&2)a=a&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&&EE(e,n,t);else if(e.tag===19)EE(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}a&=1}switch(Ft(hn,a),s){case"forwards":for(n=t.child,s=null;n!==null;)e=n.alternate,e!==null&&tf(e)===null&&(s=n),n=n.sibling;n=s,n===null?(s=t.child,t.child=null):(s=n.sibling,n.sibling=null),xm(t,!1,s,n,i);break;case"backwards":for(n=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&tf(e)===null){t.child=s;break}e=s.sibling,s.sibling=n,n=s,s=e}xm(t,!0,n,null,i);break;case"together":xm(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function vs(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Ni|=t.lanes,!(n&t.childLanes))if(e!==null){if(tu(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(ce(153));if(t.child!==null){for(e=t.child,n=ms(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ms(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function $N(e,t){return e.lanes&t?!0:(e=e.dependencies,!!(e!==null&&Kh(e)))}function DP(e,t,n){switch(t.tag){case 3:$h(t,t.stateNode.containerInfo),Ks(t,dn,e.memoizedState.cache),eu();break;case 27:case 5:C0(t);break;case 4:$h(t,t.stateNode.containerInfo);break;case 10:Ks(t,t.type,t.memoizedProps.value);break;case 13:var a=t.memoizedState;if(a!==null)return a.dehydrated!==null?(Zs(t),t.flags|=128,null):n&t.child.childLanes?G4(e,t,n):(Zs(t),e=vs(e,t,n),e!==null?e.sibling:null);Zs(t);break;case 19:var s=(e.flags&128)!==0;if(a=(n&t.childLanes)!==0,a||(tu(e,t,n,!1),a=(n&t.childLanes)!==0),s){if(a)return V4(e,t,n);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),Ft(hn,hn.current),a)break;return null;case 22:case 23:return t.lanes=0,q4(e,t,n);case 24:Ks(t,dn,e.memoizedState.cache)}return vs(e,t,n)}function Y4(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)yn=!0;else{if(!$N(e,n)&&!(t.flags&128))return yn=!1,DP(e,t,n);yn=!!(e.flags&131072)}else yn=!1,ut&&t.flags&1048576&&XO(t,Xh,t.index);switch(t.lanes=0,t.tag){case 16:e:{e=t.pendingProps;var a=t.elementType,s=a._init;if(a=s(a._payload),t.type=a,typeof a=="function")SN(a)?(e=fo(a,e),t.tag=1,t=NE(null,t,a,e,n)):(t.tag=0,t=K0(null,t,a,e,n));else{if(a!=null){if(s=a.$$typeof,s===cN){t.tag=11,t=xE(null,t,a,e,n);break e}else if(s===dN){t.tag=14,t=yE(null,t,a,e,n);break e}}throw t=E0(a)||a,Error(ce(306,t,""))}}return t;case 0:return K0(e,t,t.type,t.pendingProps,n);case 1:return a=t.type,s=fo(a,t.pendingProps),NE(e,t,a,s,n);case 3:e:{if($h(t,t.stateNode.containerInfo),e===null)throw Error(ce(387));a=t.pendingProps;var i=t.memoizedState;s=i.element,$0(e,t),nd(t,a,null,n);var o=t.memoizedState;if(a=o.cache,Ks(t,dn,a),a!==i.cache&&F0(t,[dn],n,!0),td(),a=o.element,i.isDehydrated)if(i={element:a,isDehydrated:!1,cache:o.cache},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){t=SE(e,t,a,n);break e}else if(a!==s){s=za(Error(ce(424)),t),xd(s),t=SE(e,t,a,n);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(Gt=sr(e.firstChild),In=t,ut=!0,no=null,Cr=!0,n=M4(t,null,a,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(eu(),a===s){t=vs(e,t,n);break e}Nn(e,t,a,n)}t=t.child}return t;case 26:return Sh(e,t),e===null?(n=zE(t.type,null,t.pendingProps,null))?t.memoizedState=n:ut||(n=t.type,e=t.pendingProps,a=hf(oi.current).createElement(n),a[jn]=t,a[Xn]=e,En(a,n,e),xn(a),t.stateNode=a):t.memoizedState=zE(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return C0(t),e===null&&ut&&(a=t.stateNode=DD(t.type,t.pendingProps,oi.current),In=t,Cr=!0,s=Gt,_i(t.type)?(uw=s,Gt=sr(a.firstChild)):Gt=s),Nn(e,t,t.pendingProps.children,n),Sh(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&ut&&((s=a=Gt)&&(a=oF(a,t.type,t.pendingProps,Cr),a!==null?(t.stateNode=a,In=t,Gt=sr(a.firstChild),Cr=!1,s=!0):s=!1),s||co(t)),C0(t),s=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,a=i.children,lw(s,i)?a=null:o!==null&&lw(s,o)&&(t.flags|=32),t.memoizedState!==null&&(s=RN(e,t,TP,null,null,n),Ed._currentValue=s),Sh(e,t),Nn(e,t,a,n),t.child;case 6:return e===null&&ut&&((e=n=Gt)&&(n=lF(n,t.pendingProps,Cr),n!==null?(t.stateNode=n,In=t,Gt=null,e=!0):e=!1),e||co(t)),null;case 13:return G4(e,t,n);case 4:return $h(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=Ll(t,null,a,n):Nn(e,t,a,n),t.child;case 11:return xE(e,t,t.type,t.pendingProps,n);case 7:return Nn(e,t,t.pendingProps,n),t.child;case 8:return Nn(e,t,t.pendingProps.children,n),t.child;case 12:return Nn(e,t,t.pendingProps.children,n),t.child;case 10:return a=t.pendingProps,Ks(t,t.type,a.value),Nn(e,t,a.children,n),t.child;case 9:return s=t.type._context,a=t.pendingProps.children,uo(t),s=kn(s),a=a(s),t.flags|=1,Nn(e,t,a,n),t.child;case 14:return yE(e,t,t.type,t.pendingProps,n);case 15:return H4(e,t,t.type,t.pendingProps,n);case 19:return V4(e,t,n);case 31:return a=t.pendingProps,n=t.mode,a={mode:a.mode,children:a.children},e===null?(n=rf(a,n),n.ref=t.ref,t.child=n,n.return=t,t=n):(n=ms(e.child,a),n.ref=t.ref,t.child=n,n.return=t,t=n),t;case 22:return q4(e,t,n);case 24:return uo(t),a=kn(dn),e===null?(s=AN(),s===null&&(s=Rt,i=CN(),s.pooledCache=i,i.refCount++,i!==null&&(s.pooledCacheLanes|=n),s=i),t.memoizedState={parent:a,cache:s},jN(t),Ks(t,dn,s)):(e.lanes&n&&($0(e,t),nd(t,null,null,n),td()),s=e.memoizedState,i=t.memoizedState,s.parent!==a?(s={parent:a,cache:a},t.memoizedState=s,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=s),Ks(t,dn,a)):(a=i.cache,Ks(t,dn,a),a!==s.cache&&F0(t,[dn],n,!0))),Nn(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(ce(156,t.tag))}function Jr(e){e.flags|=4}function TE(e,t){if(t.type!=="stylesheet"||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!LD(t)){if(t=Ha.current,t!==null&&((ot&4194048)===ot?Dr!==null:(ot&62914560)!==ot&&!(ot&536870912)||t!==Dr))throw Jc=z0,QO;e.flags|=8192}}function Fu(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?yO():536870912,e.lanes|=t,Ul|=t)}function Nc(e,t){if(!ut)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var a=null;n!==null;)n.alternate!==null&&(a=n),n=n.sibling;a===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:a.sibling=null}}function zt(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,a=0;if(t)for(var s=e.child;s!==null;)n|=s.lanes|s.childLanes,a|=s.subtreeFlags&65011712,a|=s.flags&65011712,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)n|=s.lanes|s.childLanes,a|=s.subtreeFlags,a|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=a,e.childLanes=n,t}function IP(e,t,n){var a=t.pendingProps;switch(TN(t),t.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return zt(t),null;case 1:return zt(t),null;case 3:return n=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),gs(dn),_l(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(vc(t)?Jr(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,tE())),zt(t),null;case 26:return n=t.memoizedState,e===null?(Jr(t),n!==null?(zt(t),TE(t,n)):(zt(t),t.flags&=-16777217)):n?n!==e.memoizedState?(Jr(t),zt(t),TE(t,n)):(zt(t),t.flags&=-16777217):(e.memoizedProps!==a&&Jr(t),zt(t),t.flags&=-16777217),null;case 27:Hh(t),n=oi.current;var s=t.type;if(e!==null&&t.stateNode!=null)e.memoizedProps!==a&&Jr(t);else{if(!a){if(t.stateNode===null)throw Error(ce(166));return zt(t),null}e=Rr.current,vc(t)?JS(t):(e=DD(s,a,n),t.stateNode=e,Jr(t))}return zt(t),null;case 5:if(Hh(t),n=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&Jr(t);else{if(!a){if(t.stateNode===null)throw Error(ce(166));return zt(t),null}if(e=Rr.current,vc(t))JS(t);else{switch(s=hf(oi.current),e){case 1:e=s.createElementNS("http://www.w3.org/2000/svg",n);break;case 2:e=s.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;default:switch(n){case"svg":e=s.createElementNS("http://www.w3.org/2000/svg",n);break;case"math":e=s.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;case"script":e=s.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild);break;case"select":e=typeof a.is=="string"?s.createElement("select",{is:a.is}):s.createElement("select"),a.multiple?e.multiple=!0:a.size&&(e.size=a.size);break;default:e=typeof a.is=="string"?s.createElement(n,{is:a.is}):s.createElement(n)}}e[jn]=t,e[Xn]=a;e:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)e.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break e;for(;s.sibling===null;){if(s.return===null||s.return===t)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=e;e:switch(En(e,n,a),n){case"button":case"input":case"select":case"textarea":e=!!a.autoFocus;break e;case"img":e=!0;break e;default:e=!1}e&&Jr(t)}}return zt(t),t.flags&=-16777217,null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&Jr(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(ce(166));if(e=oi.current,vc(t)){if(e=t.stateNode,n=t.memoizedProps,a=null,s=In,s!==null)switch(s.tag){case 27:case 5:a=s.memoizedProps}e[jn]=t,e=!!(e.nodeValue===n||a!==null&&a.suppressHydrationWarning===!0||_D(e.nodeValue,n)),e||co(t)}else e=hf(e).createTextNode(a),e[jn]=t,t.stateNode=e}return zt(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(s=vc(t),a!==null&&a.dehydrated!==null){if(e===null){if(!s)throw Error(ce(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(ce(317));s[jn]=t}else eu(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;zt(t),s=!1}else s=tE(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=s),s=!0;if(!s)return t.flags&256?(ds(t),t):(ds(t),null)}if(ds(t),t.flags&128)return t.lanes=n,t;if(n=a!==null,e=e!==null&&e.memoizedState!==null,n){a=t.child,s=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(s=a.alternate.memoizedState.cachePool.pool);var i=null;a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(i=a.memoizedState.cachePool.pool),i!==s&&(a.flags|=2048)}return n!==e&&n&&(t.child.flags|=8192),Fu(t,t.updateQueue),zt(t),null;case 4:return _l(),e===null&&KN(t.stateNode.containerInfo),zt(t),null;case 10:return gs(t.type),zt(t),null;case 19:if(vn(hn),s=t.memoizedState,s===null)return zt(t),null;if(a=(t.flags&128)!==0,i=s.rendering,i===null)if(a)Nc(s,!1);else{if(Yt!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=tf(e),i!==null){for(t.flags|=128,Nc(s,!1),e=i.updateQueue,t.updateQueue=e,Fu(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)WO(n,e),n=n.sibling;return Ft(hn,hn.current&1|2),t.child}e=e.sibling}s.tail!==null&&Or()>of&&(t.flags|=128,a=!0,Nc(s,!1),t.lanes=4194304)}else{if(!a)if(e=tf(i),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Fu(t,e),Nc(s,!0),s.tail===null&&s.tailMode==="hidden"&&!i.alternate&&!ut)return zt(t),null}else 2*Or()-s.renderingStartTime>of&&n!==536870912&&(t.flags|=128,a=!0,Nc(s,!1),t.lanes=4194304);s.isBackwards?(i.sibling=t.child,t.child=i):(e=s.last,e!==null?e.sibling=i:t.child=i,s.last=i)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=Or(),t.sibling=null,e=hn.current,Ft(hn,a?e&1|2:e&1),t):(zt(t),null);case 22:case 23:return ds(t),kN(),a=t.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?n&536870912&&!(t.flags&128)&&(zt(t),t.subtreeFlags&6&&(t.flags|=8192)):zt(t),n=t.updateQueue,n!==null&&Fu(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),a=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),a!==n&&(t.flags|=2048),e!==null&&vn(ao),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),gs(dn),zt(t),null;case 25:return null;case 30:return null}throw Error(ce(156,t.tag))}function MP(e,t){switch(TN(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return gs(dn),_l(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Hh(t),null;case 13:if(ds(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(ce(340));eu()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return vn(hn),null;case 4:return _l(),null;case 10:return gs(t.type),null;case 22:case 23:return ds(t),kN(),e!==null&&vn(ao),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return gs(dn),null;case 25:return null;default:return null}}function W4(e,t){switch(TN(t),t.tag){case 3:gs(dn),_l();break;case 26:case 27:case 5:Hh(t);break;case 4:_l();break;case 13:ds(t);break;case 19:vn(hn);break;case 10:gs(t.type);break;case 22:case 23:ds(t),kN(),e!==null&&vn(ao);break;case 24:gs(dn)}}function iu(e,t){try{var n=t.updateQueue,a=n!==null?n.lastEffect:null;if(a!==null){var s=a.next;n=s;do{if((n.tag&e)===e){a=void 0;var i=n.create,o=n.inst;a=i(),o.destroy=a}n=n.next}while(n!==s)}}catch(l){At(t,t.return,l)}}function wi(e,t,n){try{var a=t.updateQueue,s=a!==null?a.lastEffect:null;if(s!==null){var i=s.next;a=i;do{if((a.tag&e)===e){var o=a.inst,l=o.destroy;if(l!==void 0){o.destroy=void 0,s=t;var c=n,u=l;try{u()}catch(h){At(s,c,h)}}}a=a.next}while(a!==i)}}catch(h){At(t,t.return,h)}}function X4(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{t4(t,n)}catch(a){At(e,e.return,a)}}}function K4(e,t,n){n.props=fo(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(a){At(e,t,a)}}function rd(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var a=e.stateNode;break;case 30:a=e.stateNode;break;default:a=e.stateNode}typeof n=="function"?e.refCleanup=n(a):n.current=a}}catch(s){At(e,t,s)}}function jr(e,t){var n=e.ref,a=e.refCleanup;if(n!==null)if(typeof a=="function")try{a()}catch(s){At(e,t,s)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(s){At(e,t,s)}else n.current=null}function Z4(e){var t=e.type,n=e.memoizedProps,a=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&a.focus();break e;case"img":n.src?a.src=n.src:n.srcSet&&(a.srcset=n.srcSet)}}catch(s){At(e,e.return,s)}}function ym(e,t,n){try{var a=e.stateNode;nF(a,e.type,n,t),a[Xn]=t}catch(s){At(e,e.return,s)}}function Q4(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&_i(e.type)||e.tag===4}function vm(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Q4(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.tag===27&&_i(e.type)||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 Q0(e,t,n){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=cp));else if(a!==4&&(a===27&&_i(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Q0(e,t,n),e=e.sibling;e!==null;)Q0(e,t,n),e=e.sibling}function sf(e,t,n){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(a!==4&&(a===27&&_i(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(sf(e,t,n),e=e.sibling;e!==null;)sf(e,t,n),e=e.sibling}function J4(e){var t=e.stateNode,n=e.memoizedProps;try{for(var a=e.type,s=t.attributes;s.length;)t.removeAttributeNode(s[0]);En(t,a,n),t[jn]=e,t[Xn]=n}catch(i){At(e,e.return,i)}}var rs=!1,Qt=!1,wm=!1,CE=typeof WeakSet=="function"?WeakSet:Set,bn=null;function LP(e,t){if(e=e.containerInfo,iw=gf,e=BO(e),vN(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var a=n.getSelection&&n.getSelection();if(a&&a.rangeCount!==0){n=a.anchorNode;var s=a.anchorOffset,i=a.focusNode;a=a.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var o=0,l=-1,c=-1,u=0,h=0,d=e,f=null;t:for(;;){for(var p;d!==n||s!==0&&d.nodeType!==3||(l=o+s),d!==i||a!==0&&d.nodeType!==3||(c=o+a),d.nodeType===3&&(o+=d.nodeValue.length),(p=d.firstChild)!==null;)f=d,d=p;for(;;){if(d===e)break t;if(f===n&&++u===s&&(l=o),f===i&&++h===a&&(c=o),(p=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=p}n=l===-1||c===-1?null:{start:l,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(ow={focusedElem:e,selectionRange:n},gf=!1,bn=t;bn!==null;)if(t=bn,e=t.child,(t.subtreeFlags&1024)!==0&&e!==null)e.return=t,bn=e;else for(;bn!==null;){switch(t=bn,i=t.alternate,e=t.flags,t.tag){case 0:break;case 11:case 15:break;case 1:if(e&1024&&i!==null){e=void 0,n=t,s=i.memoizedProps,i=i.memoizedState,a=n.stateNode;try{var v=fo(n.type,s,n.elementType===n.type);e=a.getSnapshotBeforeUpdate(v,i),a.__reactInternalSnapshotBeforeUpdate=e}catch(x){At(n,n.return,x)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)cw(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":cw(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(ce(163))}if(e=t.sibling,e!==null){e.return=t.return,bn=e;break}bn=t.return}}function eD(e,t,n){var a=n.flags;switch(n.tag){case 0:case 11:case 15:Us(e,n),a&4&&iu(5,n);break;case 1:if(Us(e,n),a&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(o){At(n,n.return,o)}else{var s=fo(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(s,t,e.__reactInternalSnapshotBeforeUpdate)}catch(o){At(n,n.return,o)}}a&64&&X4(n),a&512&&rd(n,n.return);break;case 3:if(Us(e,n),a&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{t4(e,t)}catch(o){At(n,n.return,o)}}break;case 27:t===null&&a&4&&J4(n);case 26:case 5:Us(e,n),t===null&&a&4&&Z4(n),a&512&&rd(n,n.return);break;case 12:Us(e,n);break;case 13:Us(e,n),a&4&&aD(e,n),a&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=GP.bind(null,n),cF(e,n))));break;case 22:if(a=n.memoizedState!==null||rs,!a){t=t!==null&&t.memoizedState!==null||Qt,s=rs;var i=Qt;rs=a,(Qt=t)&&!i?qs(e,n,(n.subtreeFlags&8772)!==0):Us(e,n),rs=s,Qt=i}break;case 30:break;default:Us(e,n)}}function tD(e){var t=e.alternate;t!==null&&(e.alternate=null,tD(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&pN(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Ut=null,qn=!1;function es(e,t,n){for(n=n.child;n!==null;)nD(e,t,n),n=n.sibling}function nD(e,t,n){if(ma&&typeof ma.onCommitFiberUnmount=="function")try{ma.onCommitFiberUnmount(Xd,n)}catch{}switch(n.tag){case 26:Qt||jr(n,t),es(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Qt||jr(n,t);var a=Ut,s=qn;_i(n.type)&&(Ut=n.stateNode,qn=!1),es(e,t,n),ld(n.stateNode),Ut=a,qn=s;break;case 5:Qt||jr(n,t);case 6:if(a=Ut,s=qn,Ut=null,es(e,t,n),Ut=a,qn=s,Ut!==null)if(qn)try{(Ut.nodeType===9?Ut.body:Ut.nodeName==="HTML"?Ut.ownerDocument.body:Ut).removeChild(n.stateNode)}catch(i){At(n,t,i)}else try{Ut.removeChild(n.stateNode)}catch(i){At(n,t,i)}break;case 18:Ut!==null&&(qn?(e=Ut,PE(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),Ad(e)):PE(Ut,n.stateNode));break;case 4:a=Ut,s=qn,Ut=n.stateNode.containerInfo,qn=!0,es(e,t,n),Ut=a,qn=s;break;case 0:case 11:case 14:case 15:Qt||wi(2,n,t),Qt||wi(4,n,t),es(e,t,n);break;case 1:Qt||(jr(n,t),a=n.stateNode,typeof a.componentWillUnmount=="function"&&K4(n,t,a)),es(e,t,n);break;case 21:es(e,t,n);break;case 22:Qt=(a=Qt)||n.memoizedState!==null,es(e,t,n),Qt=a;break;default:es(e,t,n)}}function aD(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Ad(e)}catch(n){At(t,t.return,n)}}function UP(e){switch(e.tag){case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new CE),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new CE),t;default:throw Error(ce(435,e.tag))}}function Nm(e,t){var n=UP(e);t.forEach(function(a){var s=VP.bind(null,e,a);n.has(a)||(n.add(a),a.then(s,s))})}function ta(e,t){var n=t.deletions;if(n!==null)for(var a=0;a<n.length;a++){var s=n[a],i=e,o=t,l=o;e:for(;l!==null;){switch(l.tag){case 27:if(_i(l.type)){Ut=l.stateNode,qn=!1;break e}break;case 5:Ut=l.stateNode,qn=!1;break e;case 3:case 4:Ut=l.stateNode.containerInfo,qn=!0;break e}l=l.return}if(Ut===null)throw Error(ce(160));nD(i,o,s),Ut=null,qn=!1,i=s.alternate,i!==null&&(i.return=null),s.return=null}if(t.subtreeFlags&13878)for(t=t.child;t!==null;)rD(t,e),t=t.sibling}var Qa=null;function rD(e,t){var n=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:ta(t,e),na(e),a&4&&(wi(3,e,e.return),iu(3,e),wi(5,e,e.return));break;case 1:ta(t,e),na(e),a&512&&(Qt||n===null||jr(n,n.return)),a&64&&rs&&(e=e.updateQueue,e!==null&&(a=e.callbacks,a!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?a:n.concat(a))));break;case 26:var s=Qa;if(ta(t,e),na(e),a&512&&(Qt||n===null||jr(n,n.return)),a&4){var i=n!==null?n.memoizedState:null;if(a=e.memoizedState,n===null)if(a===null)if(e.stateNode===null){e:{a=e.type,n=e.memoizedProps,s=s.ownerDocument||s;t:switch(a){case"title":i=s.getElementsByTagName("title")[0],(!i||i[Qd]||i[jn]||i.namespaceURI==="http://www.w3.org/2000/svg"||i.hasAttribute("itemprop"))&&(i=s.createElement(a),s.head.insertBefore(i,s.querySelector("head > title"))),En(i,a,n),i[jn]=e,xn(i),a=i;break e;case"link":var o=HE("link","href",s).get(a+(n.href||""));if(o){for(var l=0;l<o.length;l++)if(i=o[l],i.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&i.getAttribute("rel")===(n.rel==null?null:n.rel)&&i.getAttribute("title")===(n.title==null?null:n.title)&&i.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){o.splice(l,1);break t}}i=s.createElement(a),En(i,a,n),s.head.appendChild(i);break;case"meta":if(o=HE("meta","content",s).get(a+(n.content||""))){for(l=0;l<o.length;l++)if(i=o[l],i.getAttribute("content")===(n.content==null?null:""+n.content)&&i.getAttribute("name")===(n.name==null?null:n.name)&&i.getAttribute("property")===(n.property==null?null:n.property)&&i.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&i.getAttribute("charset")===(n.charSet==null?null:n.charSet)){o.splice(l,1);break t}}i=s.createElement(a),En(i,a,n),s.head.appendChild(i);break;default:throw Error(ce(468,a))}i[jn]=e,xn(i),a=i}e.stateNode=a}else qE(s,e.type,e.stateNode);else e.stateNode=$E(s,a,e.memoizedProps);else i!==a?(i===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):i.count--,a===null?qE(s,e.type,e.stateNode):$E(s,a,e.memoizedProps)):a===null&&e.stateNode!==null&&ym(e,e.memoizedProps,n.memoizedProps)}break;case 27:ta(t,e),na(e),a&512&&(Qt||n===null||jr(n,n.return)),n!==null&&a&4&&ym(e,e.memoizedProps,n.memoizedProps);break;case 5:if(ta(t,e),na(e),a&512&&(Qt||n===null||jr(n,n.return)),e.flags&32){s=e.stateNode;try{Ol(s,"")}catch(p){At(e,e.return,p)}}a&4&&e.stateNode!=null&&(s=e.memoizedProps,ym(e,s,n!==null?n.memoizedProps:s)),a&1024&&(wm=!0);break;case 6:if(ta(t,e),na(e),a&4){if(e.stateNode===null)throw Error(ce(162));a=e.memoizedProps,n=e.stateNode;try{n.nodeValue=a}catch(p){At(e,e.return,p)}}break;case 3:if(Ch=null,s=Qa,Qa=ff(t.containerInfo),ta(t,e),Qa=s,na(e),a&4&&n!==null&&n.memoizedState.isDehydrated)try{Ad(t.containerInfo)}catch(p){At(e,e.return,p)}wm&&(wm=!1,sD(e));break;case 4:a=Qa,Qa=ff(e.stateNode.containerInfo),ta(t,e),na(e),Qa=a;break;case 12:ta(t,e),na(e);break;case 13:ta(t,e),na(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(YN=Or()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Nm(e,a)));break;case 22:s=e.memoizedState!==null;var c=n!==null&&n.memoizedState!==null,u=rs,h=Qt;if(rs=u||s,Qt=h||c,ta(t,e),Qt=h,rs=u,na(e),a&8192)e:for(t=e.stateNode,t._visibility=s?t._visibility&-2:t._visibility|1,s&&(n===null||c||rs||Qt||Gi(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){c=n=t;try{if(i=c.stateNode,s)o=i.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none";else{l=c.stateNode;var d=c.memoizedProps.style,f=d!=null&&d.hasOwnProperty("display")?d.display:null;l.style.display=f==null||typeof f=="boolean"?"":(""+f).trim()}}catch(p){At(c,c.return,p)}}}else if(t.tag===6){if(n===null){c=t;try{c.stateNode.nodeValue=s?"":c.memoizedProps}catch(p){At(c,c.return,p)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}a&4&&(a=e.updateQueue,a!==null&&(n=a.retryQueue,n!==null&&(a.retryQueue=null,Nm(e,n))));break;case 19:ta(t,e),na(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Nm(e,a)));break;case 30:break;case 21:break;default:ta(t,e),na(e)}}function na(e){var t=e.flags;if(t&2){try{for(var n,a=e.return;a!==null;){if(Q4(a)){n=a;break}a=a.return}if(n==null)throw Error(ce(160));switch(n.tag){case 27:var s=n.stateNode,i=vm(e);sf(e,i,s);break;case 5:var o=n.stateNode;n.flags&32&&(Ol(o,""),n.flags&=-33);var l=vm(e);sf(e,l,o);break;case 3:case 4:var c=n.stateNode.containerInfo,u=vm(e);Q0(e,u,c);break;default:throw Error(ce(161))}}catch(h){At(e,e.return,h)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function sD(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;sD(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Us(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)eD(e,t.alternate,t),t=t.sibling}function Gi(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:wi(4,t,t.return),Gi(t);break;case 1:jr(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&K4(t,t.return,n),Gi(t);break;case 27:ld(t.stateNode);case 26:case 5:jr(t,t.return),Gi(t);break;case 22:t.memoizedState===null&&Gi(t);break;case 30:Gi(t);break;default:Gi(t)}e=e.sibling}}function qs(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var a=t.alternate,s=e,i=t,o=i.flags;switch(i.tag){case 0:case 11:case 15:qs(s,i,n),iu(4,i);break;case 1:if(qs(s,i,n),a=i,s=a.stateNode,typeof s.componentDidMount=="function")try{s.componentDidMount()}catch(u){At(a,a.return,u)}if(a=i,s=a.updateQueue,s!==null){var l=a.stateNode;try{var c=s.shared.hiddenCallbacks;if(c!==null)for(s.shared.hiddenCallbacks=null,s=0;s<c.length;s++)e4(c[s],l)}catch(u){At(a,a.return,u)}}n&&o&64&&X4(i),rd(i,i.return);break;case 27:J4(i);case 26:case 5:qs(s,i,n),n&&a===null&&o&4&&Z4(i),rd(i,i.return);break;case 12:qs(s,i,n);break;case 13:qs(s,i,n),n&&o&4&&aD(s,i);break;case 22:i.memoizedState===null&&qs(s,i,n),rd(i,i.return);break;case 30:break;default:qs(s,i,n)}t=t.sibling}}function HN(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&nu(n))}function qN(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&nu(e))}function yr(e,t,n,a){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)iD(e,t,n,a),t=t.sibling}function iD(e,t,n,a){var s=t.flags;switch(t.tag){case 0:case 11:case 15:yr(e,t,n,a),s&2048&&iu(9,t);break;case 1:yr(e,t,n,a);break;case 3:yr(e,t,n,a),s&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&nu(e)));break;case 12:if(s&2048){yr(e,t,n,a),e=t.stateNode;try{var i=t.memoizedProps,o=i.id,l=i.onPostCommit;typeof l=="function"&&l(o,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(c){At(t,t.return,c)}}else yr(e,t,n,a);break;case 13:yr(e,t,n,a);break;case 23:break;case 22:i=t.stateNode,o=t.alternate,t.memoizedState!==null?i._visibility&2?yr(e,t,n,a):sd(e,t):i._visibility&2?yr(e,t,n,a):(i._visibility|=2,Wo(e,t,n,a,(t.subtreeFlags&10256)!==0)),s&2048&&HN(o,t);break;case 24:yr(e,t,n,a),s&2048&&qN(t.alternate,t);break;default:yr(e,t,n,a)}}function Wo(e,t,n,a,s){for(s=s&&(t.subtreeFlags&10256)!==0,t=t.child;t!==null;){var i=e,o=t,l=n,c=a,u=o.flags;switch(o.tag){case 0:case 11:case 15:Wo(i,o,l,c,s),iu(8,o);break;case 23:break;case 22:var h=o.stateNode;o.memoizedState!==null?h._visibility&2?Wo(i,o,l,c,s):sd(i,o):(h._visibility|=2,Wo(i,o,l,c,s)),s&&u&2048&&HN(o.alternate,o);break;case 24:Wo(i,o,l,c,s),s&&u&2048&&qN(o.alternate,o);break;default:Wo(i,o,l,c,s)}t=t.sibling}}function sd(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,a=t,s=a.flags;switch(a.tag){case 22:sd(n,a),s&2048&&HN(a.alternate,a);break;case 24:sd(n,a),s&2048&&qN(a.alternate,a);break;default:sd(n,a)}t=t.sibling}}var $c=8192;function Uo(e){if(e.subtreeFlags&$c)for(e=e.child;e!==null;)oD(e),e=e.sibling}function oD(e){switch(e.tag){case 26:Uo(e),e.flags&$c&&e.memoizedState!==null&&NF(Qa,e.memoizedState,e.memoizedProps);break;case 5:Uo(e);break;case 3:case 4:var t=Qa;Qa=ff(e.stateNode.containerInfo),Uo(e),Qa=t;break;case 22:e.memoizedState===null&&(t=e.alternate,t!==null&&t.memoizedState!==null?(t=$c,$c=16777216,Uo(e),$c=t):Uo(e));break;default:Uo(e)}}function lD(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Sc(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var a=t[n];bn=a,dD(a,e)}lD(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)cD(e),e=e.sibling}function cD(e){switch(e.tag){case 0:case 11:case 15:Sc(e),e.flags&2048&&wi(9,e,e.return);break;case 3:Sc(e);break;case 12:Sc(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Eh(e)):Sc(e);break;default:Sc(e)}}function Eh(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var a=t[n];bn=a,dD(a,e)}lD(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:wi(8,t,t.return),Eh(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Eh(t));break;default:Eh(t)}e=e.sibling}}function dD(e,t){for(;bn!==null;){var n=bn;switch(n.tag){case 0:case 11:case 15:wi(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var a=n.memoizedState.cachePool.pool;a!=null&&a.refCount++}break;case 24:nu(n.memoizedState.cache)}if(a=n.child,a!==null)a.return=n,bn=a;else e:for(n=e;bn!==null;){a=bn;var s=a.sibling,i=a.return;if(tD(a),a===n){bn=null;break e}if(s!==null){s.return=i,bn=s;break e}bn=i}}}var PP={getCacheForType:function(e){var t=kn(dn),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n}},FP=typeof WeakMap=="function"?WeakMap:Map,yt=0,Rt=null,it=null,ot=0,bt=0,la=null,ai=!1,sc=!1,GN=!1,ws=0,Yt=0,Ni=0,ro=0,VN=0,$a=0,Ul=0,id=null,Gn=null,J0=!1,YN=0,of=1/0,lf=null,di=null,Sn=0,ui=null,Pl=null,Nl=0,ew=0,tw=null,uD=null,od=0,nw=null;function ba(){if(yt&2&&ot!==0)return ot&-ot;if(qe.T!==null){var e=Dl;return e!==0?e:XN()}return NO()}function hD(){$a===0&&($a=!(ot&536870912)||ut?xO():536870912);var e=Ha.current;return e!==null&&(e.flags|=32),$a}function xa(e,t,n){(e===Rt&&(bt===2||bt===9)||e.cancelPendingCommit!==null)&&(Fl(e,0),ri(e,ot,$a,!1)),Zd(e,n),(!(yt&2)||e!==Rt)&&(e===Rt&&(!(yt&2)&&(ro|=n),Yt===4&&ri(e,ot,$a,!1)),Fr(e))}function fD(e,t,n){if(yt&6)throw Error(ce(327));var a=!n&&(t&124)===0&&(t&e.expiredLanes)===0||Kd(e,t),s=a?$P(e,t):Sm(e,t,!0),i=a;do{if(s===0){sc&&!a&&ri(e,t,0,!1);break}else{if(n=e.current.alternate,i&&!BP(n)){s=Sm(e,t,!1),i=!1;continue}if(s===2){if(i=t,e.errorRecoveryDisabledLanes&i)var o=0;else o=e.pendingLanes&-536870913,o=o!==0?o:o&536870912?536870912:0;if(o!==0){t=o;e:{var l=e;s=id;var c=l.current.memoizedState.isDehydrated;if(c&&(Fl(l,o).flags|=256),o=Sm(l,o,!1),o!==2){if(GN&&!c){l.errorRecoveryDisabledLanes|=i,ro|=i,s=4;break e}i=Gn,Gn=s,i!==null&&(Gn===null?Gn=i:Gn.push.apply(Gn,i))}s=o}if(i=!1,s!==2)continue}}if(s===1){Fl(e,0),ri(e,t,0,!0);break}e:{switch(a=e,i=s,i){case 0:case 1:throw Error(ce(345));case 4:if((t&4194048)!==t)break;case 6:ri(a,t,$a,!ai);break e;case 2:Gn=null;break;case 3:case 5:break;default:throw Error(ce(329))}if((t&62914560)===t&&(s=YN+300-Or(),10<s)){if(ri(a,t,$a,!ai),Kf(a,0,!0)!==0)break e;a.timeoutHandle=OD(AE.bind(null,a,n,Gn,lf,J0,t,$a,ro,Ul,ai,i,2,-0,0),s);break e}AE(a,n,Gn,lf,J0,t,$a,ro,Ul,ai,i,0,-0,0)}}break}while(!0);Fr(e)}function AE(e,t,n,a,s,i,o,l,c,u,h,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,(d&8192||(d&16785408)===16785408)&&(Sd={stylesheets:null,count:0,unsuspend:wF},oD(t),d=SF(),d!==null)){e.cancelPendingCommit=d(kE.bind(null,e,t,i,n,a,s,o,l,c,h,1,f,p)),ri(e,i,o,!u);return}kE(e,t,i,n,a,s,o,l,c)}function BP(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var a=0;a<n.length;a++){var s=n[a],i=s.getSnapshot;s=s.value;try{if(!va(i(),s))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function ri(e,t,n,a){t&=~VN,t&=~ro,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var s=t;0<s;){var i=31-ga(s),o=1<<i;a[i]=-1,s&=~o}n!==0&&vO(e,n,t)}function ip(){return yt&6?!0:(ou(0),!1)}function WN(){if(it!==null){if(bt===0)var e=it.return;else e=it,cs=jo=null,IN(e),wl=null,vd=0,e=it;for(;e!==null;)W4(e.alternate,e),e=e.return;it=null}}function Fl(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,rF(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),WN(),Rt=e,it=n=ms(e.current,null),ot=t,bt=0,la=null,ai=!1,sc=Kd(e,t),GN=!1,Ul=$a=VN=ro=Ni=Yt=0,Gn=id=null,J0=!1,t&8&&(t|=t&32);var a=e.entangledLanes;if(a!==0)for(e=e.entanglements,a&=t;0<a;){var s=31-ga(a),i=1<<s;t|=e[s],a&=~i}return ws=t,ep(),n}function pD(e,t){Je=null,qe.H=ef,t===au||t===np?(t=sE(),bt=3):t===QO?(t=sE(),bt=4):bt=t===$4?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,la=t,it===null&&(Yt=1,af(e,za(t,e.current)))}function mD(){var e=qe.H;return qe.H=ef,e===null?ef:e}function gD(){var e=qe.A;return qe.A=PP,e}function aw(){Yt=4,ai||(ot&4194048)!==ot&&Ha.current!==null||(sc=!0),!(Ni&134217727)&&!(ro&134217727)||Rt===null||ri(Rt,ot,$a,!1)}function Sm(e,t,n){var a=yt;yt|=2;var s=mD(),i=gD();(Rt!==e||ot!==t)&&(lf=null,Fl(e,t)),t=!1;var o=Yt;e:do try{if(bt!==0&&it!==null){var l=it,c=la;switch(bt){case 8:WN(),o=6;break e;case 3:case 2:case 9:case 6:Ha.current===null&&(t=!0);var u=bt;if(bt=0,la=null,dl(e,l,c,u),n&&sc){o=0;break e}break;default:u=bt,bt=0,la=null,dl(e,l,c,u)}}zP(),o=Yt;break}catch(h){pD(e,h)}while(!0);return t&&e.shellSuspendCounter++,cs=jo=null,yt=a,qe.H=s,qe.A=i,it===null&&(Rt=null,ot=0,ep()),o}function zP(){for(;it!==null;)bD(it)}function $P(e,t){var n=yt;yt|=2;var a=mD(),s=gD();Rt!==e||ot!==t?(lf=null,of=Or()+500,Fl(e,t)):sc=Kd(e,t);e:do try{if(bt!==0&&it!==null){t=it;var i=la;t:switch(bt){case 1:bt=0,la=null,dl(e,t,i,1);break;case 2:case 9:if(rE(i)){bt=0,la=null,jE(t);break}t=function(){bt!==2&&bt!==9||Rt!==e||(bt=7),Fr(e)},i.then(t,t);break e;case 3:bt=7;break e;case 4:bt=5;break e;case 7:rE(i)?(bt=0,la=null,jE(t)):(bt=0,la=null,dl(e,t,i,7));break;case 5:var o=null;switch(it.tag){case 26:o=it.memoizedState;case 5:case 27:var l=it;if(!o||LD(o)){bt=0,la=null;var c=l.sibling;if(c!==null)it=c;else{var u=l.return;u!==null?(it=u,op(u)):it=null}break t}}bt=0,la=null,dl(e,t,i,5);break;case 6:bt=0,la=null,dl(e,t,i,6);break;case 8:WN(),Yt=6;break e;default:throw Error(ce(462))}}HP();break}catch(h){pD(e,h)}while(!0);return cs=jo=null,qe.H=a,qe.A=s,yt=n,it!==null?0:(Rt=null,ot=0,ep(),Yt)}function HP(){for(;it!==null&&!u6();)bD(it)}function bD(e){var t=Y4(e.alternate,e,ws);e.memoizedProps=e.pendingProps,t===null?op(e):it=t}function jE(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=wE(n,t,t.pendingProps,t.type,void 0,ot);break;case 11:t=wE(n,t,t.pendingProps,t.type.render,t.ref,ot);break;case 5:IN(t);default:W4(n,t),t=it=WO(t,ws),t=Y4(n,t,ws)}e.memoizedProps=e.pendingProps,t===null?op(e):it=t}function dl(e,t,n,a){cs=jo=null,IN(t),wl=null,vd=0;var s=t.return;try{if(OP(e,s,t,n,ot)){Yt=1,af(e,za(n,e.current)),it=null;return}}catch(i){if(s!==null)throw it=s,i;Yt=1,af(e,za(n,e.current)),it=null;return}t.flags&32768?(ut||a===1?e=!0:sc||ot&536870912?e=!1:(ai=e=!0,(a===2||a===9||a===3||a===6)&&(a=Ha.current,a!==null&&a.tag===13&&(a.flags|=16384))),xD(t,e)):op(t)}function op(e){var t=e;do{if(t.flags&32768){xD(t,ai);return}e=t.return;var n=IP(t.alternate,t,ws);if(n!==null){it=n;return}if(t=t.sibling,t!==null){it=t;return}it=t=e}while(t!==null);Yt===0&&(Yt=5)}function xD(e,t){do{var n=MP(e.alternate,e);if(n!==null){n.flags&=32767,it=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){it=e;return}it=e=n}while(e!==null);Yt=6,it=null}function kE(e,t,n,a,s,i,o,l,c){e.cancelPendingCommit=null;do lp();while(Sn!==0);if(yt&6)throw Error(ce(327));if(t!==null){if(t===e.current)throw Error(ce(177));if(i=t.lanes|t.childLanes,i|=wN,w6(e,n,i,o,l,c),e===Rt&&(it=Rt=null,ot=0),Pl=t,ui=e,Nl=n,ew=i,tw=s,uD=a,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,YP(qh,function(){return SD(),null})):(e.callbackNode=null,e.callbackPriority=0),a=(t.flags&13878)!==0,t.subtreeFlags&13878||a){a=qe.T,qe.T=null,s=ht.p,ht.p=2,o=yt,yt|=4;try{LP(e,t,n)}finally{yt=o,ht.p=s,qe.T=a}}Sn=1,yD(),vD(),wD()}}function yD(){if(Sn===1){Sn=0;var e=ui,t=Pl,n=(t.flags&13878)!==0;if(t.subtreeFlags&13878||n){n=qe.T,qe.T=null;var a=ht.p;ht.p=2;var s=yt;yt|=4;try{rD(t,e);var i=ow,o=BO(e.containerInfo),l=i.focusedElem,c=i.selectionRange;if(o!==l&&l&&l.ownerDocument&&FO(l.ownerDocument.documentElement,l)){if(c!==null&&vN(l)){var u=c.start,h=c.end;if(h===void 0&&(h=u),"selectionStart"in l)l.selectionStart=u,l.selectionEnd=Math.min(h,l.value.length);else{var d=l.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),v=l.textContent.length,x=Math.min(c.start,v),N=c.end===void 0?x:Math.min(c.end,v);!p.extend&&x>N&&(o=N,N=x,x=o);var b=KS(l,x),y=KS(l,N);if(b&&y&&(p.rangeCount!==1||p.anchorNode!==b.node||p.anchorOffset!==b.offset||p.focusNode!==y.node||p.focusOffset!==y.offset)){var g=d.createRange();g.setStart(b.node,b.offset),p.removeAllRanges(),x>N?(p.addRange(g),p.extend(y.node,y.offset)):(g.setEnd(y.node,y.offset),p.addRange(g))}}}}for(d=[],p=l;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof l.focus=="function"&&l.focus(),l=0;l<d.length;l++){var w=d[l];w.element.scrollLeft=w.left,w.element.scrollTop=w.top}}gf=!!iw,ow=iw=null}finally{yt=s,ht.p=a,qe.T=n}}e.current=t,Sn=2}}function vD(){if(Sn===2){Sn=0;var e=ui,t=Pl,n=(t.flags&8772)!==0;if(t.subtreeFlags&8772||n){n=qe.T,qe.T=null;var a=ht.p;ht.p=2;var s=yt;yt|=4;try{eD(e,t.alternate,t)}finally{yt=s,ht.p=a,qe.T=n}}Sn=3}}function wD(){if(Sn===4||Sn===3){Sn=0,h6();var e=ui,t=Pl,n=Nl,a=uD;t.subtreeFlags&10256||t.flags&10256?Sn=5:(Sn=0,Pl=ui=null,ND(e,e.pendingLanes));var s=e.pendingLanes;if(s===0&&(di=null),fN(n),t=t.stateNode,ma&&typeof ma.onCommitFiberRoot=="function")try{ma.onCommitFiberRoot(Xd,t,void 0,(t.current.flags&128)===128)}catch{}if(a!==null){t=qe.T,s=ht.p,ht.p=2,qe.T=null;try{for(var i=e.onRecoverableError,o=0;o<a.length;o++){var l=a[o];i(l.value,{componentStack:l.stack})}}finally{qe.T=t,ht.p=s}}Nl&3&&lp(),Fr(e),s=e.pendingLanes,n&4194090&&s&42?e===nw?od++:(od=0,nw=e):od=0,ou(0)}}function ND(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,nu(t)))}function lp(e){return yD(),vD(),wD(),SD()}function SD(){if(Sn!==5)return!1;var e=ui,t=ew;ew=0;var n=fN(Nl),a=qe.T,s=ht.p;try{ht.p=32>n?32:n,qe.T=null,n=tw,tw=null;var i=ui,o=Nl;if(Sn=0,Pl=ui=null,Nl=0,yt&6)throw Error(ce(331));var l=yt;if(yt|=4,cD(i.current),iD(i,i.current,o,n),yt=l,ou(0,!1),ma&&typeof ma.onPostCommitFiberRoot=="function")try{ma.onPostCommitFiberRoot(Xd,i)}catch{}return!0}finally{ht.p=s,qe.T=a,ND(e,t)}}function _E(e,t,n){t=za(n,t),t=X0(e.stateNode,t,2),e=ci(e,t,2),e!==null&&(Zd(e,2),Fr(e))}function At(e,t,n){if(e.tag===3)_E(e,e,n);else for(;t!==null;){if(t.tag===3){_E(t,e,n);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(di===null||!di.has(a))){e=za(n,e),n=B4(2),a=ci(t,n,2),a!==null&&(z4(n,a,t,e),Zd(a,2),Fr(a));break}}t=t.return}}function Em(e,t,n){var a=e.pingCache;if(a===null){a=e.pingCache=new FP;var s=new Set;a.set(t,s)}else s=a.get(t),s===void 0&&(s=new Set,a.set(t,s));s.has(n)||(GN=!0,s.add(n),e=qP.bind(null,e,t,n),t.then(e,e))}function qP(e,t,n){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Rt===e&&(ot&n)===n&&(Yt===4||Yt===3&&(ot&62914560)===ot&&300>Or()-YN?!(yt&2)&&Fl(e,0):VN|=n,Ul===ot&&(Ul=0)),Fr(e)}function ED(e,t){t===0&&(t=yO()),e=rc(e,t),e!==null&&(Zd(e,t),Fr(e))}function GP(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),ED(e,n)}function VP(e,t){var n=0;switch(e.tag){case 13:var a=e.stateNode,s=e.memoizedState;s!==null&&(n=s.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(ce(314))}a!==null&&a.delete(t),ED(e,n)}function YP(e,t){return uN(e,t)}var cf=null,Xo=null,rw=!1,df=!1,Tm=!1,so=0;function Fr(e){e!==Xo&&e.next===null&&(Xo===null?cf=Xo=e:Xo=Xo.next=e),df=!0,rw||(rw=!0,XP())}function ou(e,t){if(!Tm&&df){Tm=!0;do for(var n=!1,a=cf;a!==null;){if(e!==0){var s=a.pendingLanes;if(s===0)var i=0;else{var o=a.suspendedLanes,l=a.pingedLanes;i=(1<<31-ga(42|e)+1)-1,i&=s&~(o&~l),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(n=!0,RE(a,i))}else i=ot,i=Kf(a,a===Rt?i:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),!(i&3)||Kd(a,i)||(n=!0,RE(a,i));a=a.next}while(n);Tm=!1}}function WP(){TD()}function TD(){df=rw=!1;var e=0;so!==0&&(aF()&&(e=so),so=0);for(var t=Or(),n=null,a=cf;a!==null;){var s=a.next,i=CD(a,t);i===0?(a.next=null,n===null?cf=s:n.next=s,s===null&&(Xo=n)):(n=a,(e!==0||i&3)&&(df=!0)),a=s}ou(e)}function CD(e,t){for(var n=e.suspendedLanes,a=e.pingedLanes,s=e.expirationTimes,i=e.pendingLanes&-62914561;0<i;){var o=31-ga(i),l=1<<o,c=s[o];c===-1?(!(l&n)||l&a)&&(s[o]=v6(l,t)):c<=t&&(e.expiredLanes|=l),i&=~l}if(t=Rt,n=ot,n=Kf(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,n===0||e===t&&(bt===2||bt===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&Zp(a),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||Kd(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(a!==null&&Zp(a),fN(n)){case 2:case 8:n=gO;break;case 32:n=qh;break;case 268435456:n=bO;break;default:n=qh}return a=AD.bind(null,e),n=uN(n,a),e.callbackPriority=t,e.callbackNode=n,t}return a!==null&&a!==null&&Zp(a),e.callbackPriority=2,e.callbackNode=null,2}function AD(e,t){if(Sn!==0&&Sn!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(lp()&&e.callbackNode!==n)return null;var a=ot;return a=Kf(e,e===Rt?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(fD(e,a,t),CD(e,Or()),e.callbackNode!=null&&e.callbackNode===n?AD.bind(null,e):null)}function RE(e,t){if(lp())return null;fD(e,t,!0)}function XP(){sF(function(){yt&6?uN(mO,WP):TD()})}function XN(){return so===0&&(so=xO()),so}function OE(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:gh(""+e)}function DE(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function KP(e,t,n,a,s){if(t==="submit"&&n&&n.stateNode===s){var i=OE((s[Xn]||null).action),o=a.submitter;o&&(t=(t=o[Xn]||null)?OE(t.formAction):o.getAttribute("formAction"),t!==null&&(i=t,o=null));var l=new Zf("action","action",null,a,s);e.push({event:l,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(so!==0){var c=o?DE(s,o):new FormData(s);Y0(n,{pending:!0,data:c,method:s.method,action:i},null,c)}}else typeof i=="function"&&(l.preventDefault(),c=o?DE(s,o):new FormData(s),Y0(n,{pending:!0,data:c,method:s.method,action:i},i,c))},currentTarget:s}]})}}for(var Cm=0;Cm<M0.length;Cm++){var Am=M0[Cm],ZP=Am.toLowerCase(),QP=Am[0].toUpperCase()+Am.slice(1);dr(ZP,"on"+QP)}dr($O,"onAnimationEnd");dr(HO,"onAnimationIteration");dr(qO,"onAnimationStart");dr("dblclick","onDoubleClick");dr("focusin","onFocus");dr("focusout","onBlur");dr(mP,"onTransitionRun");dr(gP,"onTransitionStart");dr(bP,"onTransitionCancel");dr(GO,"onTransitionEnd");Rl("onMouseEnter",["mouseout","mouseover"]);Rl("onMouseLeave",["mouseout","mouseover"]);Rl("onPointerEnter",["pointerout","pointerover"]);Rl("onPointerLeave",["pointerout","pointerover"]);To("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));To("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));To("onBeforeInput",["compositionend","keypress","textInput","paste"]);To("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));To("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));To("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var wd="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(" "),JP=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(wd));function jD(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var a=e[n],s=a.event;a=a.listeners;e:{var i=void 0;if(t)for(var o=a.length-1;0<=o;o--){var l=a[o],c=l.instance,u=l.currentTarget;if(l=l.listener,c!==i&&s.isPropagationStopped())break e;i=l,s.currentTarget=u;try{i(s)}catch(h){nf(h)}s.currentTarget=null,i=c}else for(o=0;o<a.length;o++){if(l=a[o],c=l.instance,u=l.currentTarget,l=l.listener,c!==i&&s.isPropagationStopped())break e;i=l,s.currentTarget=u;try{i(s)}catch(h){nf(h)}s.currentTarget=null,i=c}}}}function st(e,t){var n=t[j0];n===void 0&&(n=t[j0]=new Set);var a=e+"__bubble";n.has(a)||(kD(t,e,2,!1),n.add(a))}function jm(e,t,n){var a=0;t&&(a|=4),kD(n,e,a,t)}var Bu="_reactListening"+Math.random().toString(36).slice(2);function KN(e){if(!e[Bu]){e[Bu]=!0,SO.forEach(function(n){n!=="selectionchange"&&(JP.has(n)||jm(n,!1,e),jm(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Bu]||(t[Bu]=!0,jm("selectionchange",!1,t))}}function kD(e,t,n,a){switch(zD(t)){case 2:var s=CF;break;case 8:s=AF;break;default:s=e1}n=s.bind(null,t,n,e),s=void 0,!O0||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),a?s!==void 0?e.addEventListener(t,n,{capture:!0,passive:s}):e.addEventListener(t,n,!0):s!==void 0?e.addEventListener(t,n,{passive:s}):e.addEventListener(t,n,!1)}function km(e,t,n,a,s){var i=a;if(!(t&1)&&!(t&2)&&a!==null)e:for(;;){if(a===null)return;var o=a.tag;if(o===3||o===4){var l=a.stateNode.containerInfo;if(l===s)break;if(o===4)for(o=a.return;o!==null;){var c=o.tag;if((c===3||c===4)&&o.stateNode.containerInfo===s)return;o=o.return}for(;l!==null;){if(o=tl(l),o===null)return;if(c=o.tag,c===5||c===6||c===26||c===27){a=i=o;continue e}l=l.parentNode}}a=a.return}RO(function(){var u=i,h=gN(n),d=[];e:{var f=VO.get(e);if(f!==void 0){var p=Zf,v=e;switch(e){case"keypress":if(xh(n)===0)break e;case"keydown":case"keyup":p=Y6;break;case"focusin":v="focus",p=sm;break;case"focusout":v="blur",p=sm;break;case"beforeblur":case"afterblur":p=sm;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":p=BS;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=M6;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=K6;break;case $O:case HO:case qO:p=P6;break;case GO:p=Q6;break;case"scroll":case"scrollend":p=D6;break;case"wheel":p=eP;break;case"copy":case"cut":case"paste":p=B6;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=$S;break;case"toggle":case"beforetoggle":p=nP}var x=(t&4)!==0,N=!x&&(e==="scroll"||e==="scrollend"),b=x?f!==null?f+"Capture":null:f;x=[];for(var y=u,g;y!==null;){var w=y;if(g=w.stateNode,w=w.tag,w!==5&&w!==26&&w!==27||g===null||b===null||(w=md(y,b),w!=null&&x.push(Nd(y,w,g))),N)break;y=y.return}0<x.length&&(f=new p(f,v,null,n,h),d.push({event:f,listeners:x}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",f&&n!==R0&&(v=n.relatedTarget||n.fromElement)&&(tl(v)||v[nc]))break e;if((p||f)&&(f=h.window===h?h:(f=h.ownerDocument)?f.defaultView||f.parentWindow:window,p?(v=n.relatedTarget||n.toElement,p=u,v=v?tl(v):null,v!==null&&(N=Wd(v),x=v.tag,v!==N||x!==5&&x!==27&&x!==6)&&(v=null)):(p=null,v=u),p!==v)){if(x=BS,w="onMouseLeave",b="onMouseEnter",y="mouse",(e==="pointerout"||e==="pointerover")&&(x=$S,w="onPointerLeave",b="onPointerEnter",y="pointer"),N=p==null?f:zc(p),g=v==null?f:zc(v),f=new x(w,y+"leave",p,n,h),f.target=N,f.relatedTarget=g,w=null,tl(h)===u&&(x=new x(b,y+"enter",v,n,h),x.target=g,x.relatedTarget=N,w=x),N=w,p&&v)t:{for(x=p,b=v,y=0,g=x;g;g=Po(g))y++;for(g=0,w=b;w;w=Po(w))g++;for(;0<y-g;)x=Po(x),y--;for(;0<g-y;)b=Po(b),g--;for(;y--;){if(x===b||b!==null&&x===b.alternate)break t;x=Po(x),b=Po(b)}x=null}else x=null;p!==null&&IE(d,f,p,x,!1),v!==null&&N!==null&&IE(d,N,v,x,!0)}}e:{if(f=u?zc(u):window,p=f.nodeName&&f.nodeName.toLowerCase(),p==="select"||p==="input"&&f.type==="file")var S=VS;else if(GS(f))if(UO)S=hP;else{S=dP;var C=cP}else p=f.nodeName,!p||p.toLowerCase()!=="input"||f.type!=="checkbox"&&f.type!=="radio"?u&&mN(u.elementType)&&(S=VS):S=uP;if(S&&(S=S(e,u))){LO(d,S,n,h);break e}C&&C(e,f,u),e==="focusout"&&u&&f.type==="number"&&u.memoizedProps.value!=null&&_0(f,"number",f.value)}switch(C=u?zc(u):window,e){case"focusin":(GS(C)||C.contentEditable==="true")&&(rl=C,D0=u,Zc=null);break;case"focusout":Zc=D0=rl=null;break;case"mousedown":I0=!0;break;case"contextmenu":case"mouseup":case"dragend":I0=!1,ZS(d,n,h);break;case"selectionchange":if(pP)break;case"keydown":case"keyup":ZS(d,n,h)}var T;if(yN)e:{switch(e){case"compositionstart":var E="onCompositionStart";break e;case"compositionend":E="onCompositionEnd";break e;case"compositionupdate":E="onCompositionUpdate";break e}E=void 0}else al?IO(e,n)&&(E="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(E="onCompositionStart");E&&(DO&&n.locale!=="ko"&&(al||E!=="onCompositionStart"?E==="onCompositionEnd"&&al&&(T=OO()):(ni=h,bN="value"in ni?ni.value:ni.textContent,al=!0)),C=uf(u,E),0<C.length&&(E=new zS(E,e,null,n,h),d.push({event:E,listeners:C}),T?E.data=T:(T=MO(n),T!==null&&(E.data=T)))),(T=rP?sP(e,n):iP(e,n))&&(E=uf(u,"onBeforeInput"),0<E.length&&(C=new zS("onBeforeInput","beforeinput",null,n,h),d.push({event:C,listeners:E}),C.data=T)),KP(d,e,u,n,h)}jD(d,t)})}function Nd(e,t,n){return{instance:e,listener:t,currentTarget:n}}function uf(e,t){for(var n=t+"Capture",a=[];e!==null;){var s=e,i=s.stateNode;if(s=s.tag,s!==5&&s!==26&&s!==27||i===null||(s=md(e,n),s!=null&&a.unshift(Nd(e,s,i)),s=md(e,t),s!=null&&a.push(Nd(e,s,i))),e.tag===3)return a;e=e.return}return[]}function Po(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function IE(e,t,n,a,s){for(var i=t._reactName,o=[];n!==null&&n!==a;){var l=n,c=l.alternate,u=l.stateNode;if(l=l.tag,c!==null&&c===a)break;l!==5&&l!==26&&l!==27||u===null||(c=u,s?(u=md(n,i),u!=null&&o.unshift(Nd(n,u,c))):s||(u=md(n,i),u!=null&&o.push(Nd(n,u,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var eF=/\r\n?/g,tF=/\u0000|\uFFFD/g;function ME(e){return(typeof e=="string"?e:""+e).replace(eF,`
|
|
49
|
-
`).replace(tF,"")}function _D(e,t){return t=ME(t),ME(e)===t}function cp(){}function wt(e,t,n,a,s,i){switch(n){case"children":typeof a=="string"?t==="body"||t==="textarea"&&a===""||Ol(e,a):(typeof a=="number"||typeof a=="bigint")&&t!=="body"&&Ol(e,""+a);break;case"className":Du(e,"class",a);break;case"tabIndex":Du(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":Du(e,n,a);break;case"style":_O(e,a,i);break;case"data":if(t!=="object"){Du(e,"data",a);break}case"src":case"href":if(a===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(a==null||typeof a=="function"||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(n);break}a=gh(""+a),e.setAttribute(n,a);break;case"action":case"formAction":if(typeof a=="function"){e.setAttribute(n,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof i=="function"&&(n==="formAction"?(t!=="input"&&wt(e,t,"name",s.name,s,null),wt(e,t,"formEncType",s.formEncType,s,null),wt(e,t,"formMethod",s.formMethod,s,null),wt(e,t,"formTarget",s.formTarget,s,null)):(wt(e,t,"encType",s.encType,s,null),wt(e,t,"method",s.method,s,null),wt(e,t,"target",s.target,s,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(n);break}a=gh(""+a),e.setAttribute(n,a);break;case"onClick":a!=null&&(e.onclick=cp);break;case"onScroll":a!=null&&st("scroll",e);break;case"onScrollEnd":a!=null&&st("scrollend",e);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(ce(61));if(n=a.__html,n!=null){if(s.children!=null)throw Error(ce(60));e.innerHTML=n}}break;case"multiple":e.multiple=a&&typeof a!="function"&&typeof a!="symbol";break;case"muted":e.muted=a&&typeof a!="function"&&typeof a!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(a==null||typeof a=="function"||typeof a=="boolean"||typeof a=="symbol"){e.removeAttribute("xlink:href");break}n=gh(""+a),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(n,""+a):e.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":a&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":a===!0?e.setAttribute(n,""):a!==!1&&a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(n,a):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":a!=null&&typeof a!="function"&&typeof a!="symbol"&&!isNaN(a)&&1<=a?e.setAttribute(n,a):e.removeAttribute(n);break;case"rowSpan":case"start":a==null||typeof a=="function"||typeof a=="symbol"||isNaN(a)?e.removeAttribute(n):e.setAttribute(n,a);break;case"popover":st("beforetoggle",e),st("toggle",e),mh(e,"popover",a);break;case"xlinkActuate":Qr(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":Qr(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":Qr(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":Qr(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":Qr(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":Qr(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":Qr(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":Qr(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":Qr(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":mh(e,"is",a);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=R6.get(n)||n,mh(e,n,a))}}function sw(e,t,n,a,s,i){switch(n){case"style":_O(e,a,i);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(ce(61));if(n=a.__html,n!=null){if(s.children!=null)throw Error(ce(60));e.innerHTML=n}}break;case"children":typeof a=="string"?Ol(e,a):(typeof a=="number"||typeof a=="bigint")&&Ol(e,""+a);break;case"onScroll":a!=null&&st("scroll",e);break;case"onScrollEnd":a!=null&&st("scrollend",e);break;case"onClick":a!=null&&(e.onclick=cp);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!EO.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(s=n.endsWith("Capture"),t=n.slice(2,s?n.length-7:void 0),i=e[Xn]||null,i=i!=null?i[n]:null,typeof i=="function"&&e.removeEventListener(t,i,s),typeof a=="function")){typeof i!="function"&&i!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,a,s);break e}n in e?e[n]=a:a===!0?e.setAttribute(n,""):mh(e,n,a)}}}function En(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":st("error",e),st("load",e);var a=!1,s=!1,i;for(i in n)if(n.hasOwnProperty(i)){var o=n[i];if(o!=null)switch(i){case"src":a=!0;break;case"srcSet":s=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(ce(137,t));default:wt(e,t,i,o,n,null)}}s&&wt(e,t,"srcSet",n.srcSet,n,null),a&&wt(e,t,"src",n.src,n,null);return;case"input":st("invalid",e);var l=i=o=s=null,c=null,u=null;for(a in n)if(n.hasOwnProperty(a)){var h=n[a];if(h!=null)switch(a){case"name":s=h;break;case"type":o=h;break;case"checked":c=h;break;case"defaultChecked":u=h;break;case"value":i=h;break;case"defaultValue":l=h;break;case"children":case"dangerouslySetInnerHTML":if(h!=null)throw Error(ce(137,t));break;default:wt(e,t,a,h,n,null)}}AO(e,i,l,c,u,o,s,!1),Gh(e);return;case"select":st("invalid",e),a=o=i=null;for(s in n)if(n.hasOwnProperty(s)&&(l=n[s],l!=null))switch(s){case"value":i=l;break;case"defaultValue":o=l;break;case"multiple":a=l;default:wt(e,t,s,l,n,null)}t=i,n=o,e.multiple=!!a,t!=null?gl(e,!!a,t,!1):n!=null&&gl(e,!!a,n,!0);return;case"textarea":st("invalid",e),i=s=a=null;for(o in n)if(n.hasOwnProperty(o)&&(l=n[o],l!=null))switch(o){case"value":a=l;break;case"defaultValue":s=l;break;case"children":i=l;break;case"dangerouslySetInnerHTML":if(l!=null)throw Error(ce(91));break;default:wt(e,t,o,l,n,null)}kO(e,a,s,i),Gh(e);return;case"option":for(c in n)if(n.hasOwnProperty(c)&&(a=n[c],a!=null))switch(c){case"selected":e.selected=a&&typeof a!="function"&&typeof a!="symbol";break;default:wt(e,t,c,a,n,null)}return;case"dialog":st("beforetoggle",e),st("toggle",e),st("cancel",e),st("close",e);break;case"iframe":case"object":st("load",e);break;case"video":case"audio":for(a=0;a<wd.length;a++)st(wd[a],e);break;case"image":st("error",e),st("load",e);break;case"details":st("toggle",e);break;case"embed":case"source":case"link":st("error",e),st("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(u in n)if(n.hasOwnProperty(u)&&(a=n[u],a!=null))switch(u){case"children":case"dangerouslySetInnerHTML":throw Error(ce(137,t));default:wt(e,t,u,a,n,null)}return;default:if(mN(t)){for(h in n)n.hasOwnProperty(h)&&(a=n[h],a!==void 0&&sw(e,t,h,a,n,void 0));return}}for(l in n)n.hasOwnProperty(l)&&(a=n[l],a!=null&&wt(e,t,l,a,n,null))}function nF(e,t,n,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var s=null,i=null,o=null,l=null,c=null,u=null,h=null;for(p in n){var d=n[p];if(n.hasOwnProperty(p)&&d!=null)switch(p){case"checked":break;case"value":break;case"defaultValue":c=d;default:a.hasOwnProperty(p)||wt(e,t,p,null,a,d)}}for(var f in a){var p=a[f];if(d=n[f],a.hasOwnProperty(f)&&(p!=null||d!=null))switch(f){case"type":i=p;break;case"name":s=p;break;case"checked":u=p;break;case"defaultChecked":h=p;break;case"value":o=p;break;case"defaultValue":l=p;break;case"children":case"dangerouslySetInnerHTML":if(p!=null)throw Error(ce(137,t));break;default:p!==d&&wt(e,t,f,p,a,d)}}k0(e,o,l,c,u,h,i,s);return;case"select":p=o=l=f=null;for(i in n)if(c=n[i],n.hasOwnProperty(i)&&c!=null)switch(i){case"value":break;case"multiple":p=c;default:a.hasOwnProperty(i)||wt(e,t,i,null,a,c)}for(s in a)if(i=a[s],c=n[s],a.hasOwnProperty(s)&&(i!=null||c!=null))switch(s){case"value":f=i;break;case"defaultValue":l=i;break;case"multiple":o=i;default:i!==c&&wt(e,t,s,i,a,c)}t=l,n=o,a=p,f!=null?gl(e,!!n,f,!1):!!a!=!!n&&(t!=null?gl(e,!!n,t,!0):gl(e,!!n,n?[]:"",!1));return;case"textarea":p=f=null;for(l in n)if(s=n[l],n.hasOwnProperty(l)&&s!=null&&!a.hasOwnProperty(l))switch(l){case"value":break;case"children":break;default:wt(e,t,l,null,a,s)}for(o in a)if(s=a[o],i=n[o],a.hasOwnProperty(o)&&(s!=null||i!=null))switch(o){case"value":f=s;break;case"defaultValue":p=s;break;case"children":break;case"dangerouslySetInnerHTML":if(s!=null)throw Error(ce(91));break;default:s!==i&&wt(e,t,o,s,a,i)}jO(e,f,p);return;case"option":for(var v in n)if(f=n[v],n.hasOwnProperty(v)&&f!=null&&!a.hasOwnProperty(v))switch(v){case"selected":e.selected=!1;break;default:wt(e,t,v,null,a,f)}for(c in a)if(f=a[c],p=n[c],a.hasOwnProperty(c)&&f!==p&&(f!=null||p!=null))switch(c){case"selected":e.selected=f&&typeof f!="function"&&typeof f!="symbol";break;default:wt(e,t,c,f,a,p)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var x in n)f=n[x],n.hasOwnProperty(x)&&f!=null&&!a.hasOwnProperty(x)&&wt(e,t,x,null,a,f);for(u in a)if(f=a[u],p=n[u],a.hasOwnProperty(u)&&f!==p&&(f!=null||p!=null))switch(u){case"children":case"dangerouslySetInnerHTML":if(f!=null)throw Error(ce(137,t));break;default:wt(e,t,u,f,a,p)}return;default:if(mN(t)){for(var N in n)f=n[N],n.hasOwnProperty(N)&&f!==void 0&&!a.hasOwnProperty(N)&&sw(e,t,N,void 0,a,f);for(h in a)f=a[h],p=n[h],!a.hasOwnProperty(h)||f===p||f===void 0&&p===void 0||sw(e,t,h,f,a,p);return}}for(var b in n)f=n[b],n.hasOwnProperty(b)&&f!=null&&!a.hasOwnProperty(b)&&wt(e,t,b,null,a,f);for(d in a)f=a[d],p=n[d],!a.hasOwnProperty(d)||f===p||f==null&&p==null||wt(e,t,d,f,a,p)}var iw=null,ow=null;function hf(e){return e.nodeType===9?e:e.ownerDocument}function LE(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function RD(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function lw(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var _m=null;function aF(){var e=window.event;return e&&e.type==="popstate"?e===_m?!1:(_m=e,!0):(_m=null,!1)}var OD=typeof setTimeout=="function"?setTimeout:void 0,rF=typeof clearTimeout=="function"?clearTimeout:void 0,UE=typeof Promise=="function"?Promise:void 0,sF=typeof queueMicrotask=="function"?queueMicrotask:typeof UE<"u"?function(e){return UE.resolve(null).then(e).catch(iF)}:OD;function iF(e){setTimeout(function(){throw e})}function _i(e){return e==="head"}function PE(e,t){var n=t,a=0,s=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(0<a&&8>a){n=a;var o=e.ownerDocument;if(n&1&&ld(o.documentElement),n&2&&ld(o.body),n&4)for(n=o.head,ld(n),o=n.firstChild;o;){var l=o.nextSibling,c=o.nodeName;o[Qd]||c==="SCRIPT"||c==="STYLE"||c==="LINK"&&o.rel.toLowerCase()==="stylesheet"||n.removeChild(o),o=l}}if(s===0){e.removeChild(i),Ad(t);return}s--}else n==="$"||n==="$?"||n==="$!"?s++:a=n.charCodeAt(0)-48;else a=0;n=i}while(n);Ad(t)}function cw(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":cw(n),pN(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function oF(e,t,n,a){for(;e.nodeType===1;){var s=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!a&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(a){if(!e[Qd])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(i=e.getAttribute("rel"),i==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(i!==s.rel||e.getAttribute("href")!==(s.href==null||s.href===""?null:s.href)||e.getAttribute("crossorigin")!==(s.crossOrigin==null?null:s.crossOrigin)||e.getAttribute("title")!==(s.title==null?null:s.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(i=e.getAttribute("src"),(i!==(s.src==null?null:s.src)||e.getAttribute("type")!==(s.type==null?null:s.type)||e.getAttribute("crossorigin")!==(s.crossOrigin==null?null:s.crossOrigin))&&i&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var i=s.name==null?null:""+s.name;if(s.type==="hidden"&&e.getAttribute("name")===i)return e}else return e;if(e=sr(e.nextSibling),e===null)break}return null}function lF(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=sr(e.nextSibling),e===null))return null;return e}function dw(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState==="complete"}function cF(e,t){var n=e.ownerDocument;if(e.data!=="$?"||n.readyState==="complete")t();else{var a=function(){t(),n.removeEventListener("DOMContentLoaded",a)};n.addEventListener("DOMContentLoaded",a),e._reactRetry=a}}function sr(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==="$?"||t==="F!"||t==="F")break;if(t==="/$")return null}}return e}var uw=null;function FE(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}function DD(e,t,n){switch(t=hf(n),e){case"html":if(e=t.documentElement,!e)throw Error(ce(452));return e;case"head":if(e=t.head,!e)throw Error(ce(453));return e;case"body":if(e=t.body,!e)throw Error(ce(454));return e;default:throw Error(ce(451))}}function ld(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);pN(e)}var qa=new Map,BE=new Set;function ff(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Ts=ht.d;ht.d={f:dF,r:uF,D:hF,C:fF,L:pF,m:mF,X:bF,S:gF,M:xF};function dF(){var e=Ts.f(),t=ip();return e||t}function uF(e){var t=ac(e);t!==null&&t.tag===5&&t.type==="form"?C4(t):Ts.r(e)}var ic=typeof document>"u"?null:document;function ID(e,t,n){var a=ic;if(a&&typeof t=="string"&&t){var s=Ba(t);s='link[rel="'+e+'"][href="'+s+'"]',typeof n=="string"&&(s+='[crossorigin="'+n+'"]'),BE.has(s)||(BE.add(s),e={rel:e,crossOrigin:n,href:t},a.querySelector(s)===null&&(t=a.createElement("link"),En(t,"link",e),xn(t),a.head.appendChild(t)))}}function hF(e){Ts.D(e),ID("dns-prefetch",e,null)}function fF(e,t){Ts.C(e,t),ID("preconnect",e,t)}function pF(e,t,n){Ts.L(e,t,n);var a=ic;if(a&&e&&t){var s='link[rel="preload"][as="'+Ba(t)+'"]';t==="image"&&n&&n.imageSrcSet?(s+='[imagesrcset="'+Ba(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(s+='[imagesizes="'+Ba(n.imageSizes)+'"]')):s+='[href="'+Ba(e)+'"]';var i=s;switch(t){case"style":i=Bl(e);break;case"script":i=oc(e)}qa.has(i)||(e=Lt({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),qa.set(i,e),a.querySelector(s)!==null||t==="style"&&a.querySelector(lu(i))||t==="script"&&a.querySelector(cu(i))||(t=a.createElement("link"),En(t,"link",e),xn(t),a.head.appendChild(t)))}}function mF(e,t){Ts.m(e,t);var n=ic;if(n&&e){var a=t&&typeof t.as=="string"?t.as:"script",s='link[rel="modulepreload"][as="'+Ba(a)+'"][href="'+Ba(e)+'"]',i=s;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=oc(e)}if(!qa.has(i)&&(e=Lt({rel:"modulepreload",href:e},t),qa.set(i,e),n.querySelector(s)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(cu(i)))return}a=n.createElement("link"),En(a,"link",e),xn(a),n.head.appendChild(a)}}}function gF(e,t,n){Ts.S(e,t,n);var a=ic;if(a&&e){var s=ml(a).hoistableStyles,i=Bl(e);t=t||"default";var o=s.get(i);if(!o){var l={loading:0,preload:null};if(o=a.querySelector(lu(i)))l.loading=5;else{e=Lt({rel:"stylesheet",href:e,"data-precedence":t},n),(n=qa.get(i))&&ZN(e,n);var c=o=a.createElement("link");xn(c),En(c,"link",e),c._p=new Promise(function(u,h){c.onload=u,c.onerror=h}),c.addEventListener("load",function(){l.loading|=1}),c.addEventListener("error",function(){l.loading|=2}),l.loading|=4,Th(o,t,a)}o={type:"stylesheet",instance:o,count:1,state:l},s.set(i,o)}}}function bF(e,t){Ts.X(e,t);var n=ic;if(n&&e){var a=ml(n).hoistableScripts,s=oc(e),i=a.get(s);i||(i=n.querySelector(cu(s)),i||(e=Lt({src:e,async:!0},t),(t=qa.get(s))&&QN(e,t),i=n.createElement("script"),xn(i),En(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},a.set(s,i))}}function xF(e,t){Ts.M(e,t);var n=ic;if(n&&e){var a=ml(n).hoistableScripts,s=oc(e),i=a.get(s);i||(i=n.querySelector(cu(s)),i||(e=Lt({src:e,async:!0,type:"module"},t),(t=qa.get(s))&&QN(e,t),i=n.createElement("script"),xn(i),En(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},a.set(s,i))}}function zE(e,t,n,a){var s=(s=oi.current)?ff(s):null;if(!s)throw Error(ce(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=Bl(n.href),n=ml(s).hoistableStyles,a=n.get(t),a||(a={type:"style",instance:null,count:0,state:null},n.set(t,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=Bl(n.href);var i=ml(s).hoistableStyles,o=i.get(e);if(o||(s=s.ownerDocument||s,o={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(e,o),(i=s.querySelector(lu(e)))&&!i._p&&(o.instance=i,o.state.loading=5),qa.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},qa.set(e,n),i||yF(s,e,n,o.state))),t&&a===null)throw Error(ce(528,""));return o}if(t&&a!==null)throw Error(ce(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=oc(n),n=ml(s).hoistableScripts,a=n.get(t),a||(a={type:"script",instance:null,count:0,state:null},n.set(t,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(ce(444,e))}}function Bl(e){return'href="'+Ba(e)+'"'}function lu(e){return'link[rel="stylesheet"]['+e+"]"}function MD(e){return Lt({},e,{"data-precedence":e.precedence,precedence:null})}function yF(e,t,n,a){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?a.loading=1:(t=e.createElement("link"),a.preload=t,t.addEventListener("load",function(){return a.loading|=1}),t.addEventListener("error",function(){return a.loading|=2}),En(t,"link",n),xn(t),e.head.appendChild(t))}function oc(e){return'[src="'+Ba(e)+'"]'}function cu(e){return"script[async]"+e}function $E(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+Ba(n.href)+'"]');if(a)return t.instance=a,xn(a),a;var s=Lt({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),xn(a),En(a,"style",s),Th(a,n.precedence,e),t.instance=a;case"stylesheet":s=Bl(n.href);var i=e.querySelector(lu(s));if(i)return t.state.loading|=4,t.instance=i,xn(i),i;a=MD(n),(s=qa.get(s))&&ZN(a,s),i=(e.ownerDocument||e).createElement("link"),xn(i);var o=i;return o._p=new Promise(function(l,c){o.onload=l,o.onerror=c}),En(i,"link",a),t.state.loading|=4,Th(i,n.precedence,e),t.instance=i;case"script":return i=oc(n.src),(s=e.querySelector(cu(i)))?(t.instance=s,xn(s),s):(a=n,(s=qa.get(i))&&(a=Lt({},n),QN(a,s)),e=e.ownerDocument||e,s=e.createElement("script"),xn(s),En(s,"link",a),e.head.appendChild(s),t.instance=s);case"void":return null;default:throw Error(ce(443,t.type))}else t.type==="stylesheet"&&!(t.state.loading&4)&&(a=t.instance,t.state.loading|=4,Th(a,n.precedence,e));return t.instance}function Th(e,t,n){for(var a=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),s=a.length?a[a.length-1]:null,i=s,o=0;o<a.length;o++){var l=a[o];if(l.dataset.precedence===t)i=l;else if(i!==s)break}i?i.parentNode.insertBefore(e,i.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function ZN(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function QN(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Ch=null;function HE(e,t,n){if(Ch===null){var a=new Map,s=Ch=new Map;s.set(n,a)}else s=Ch,a=s.get(n),a||(a=new Map,s.set(n,a));if(a.has(e))return a;for(a.set(e,null),n=n.getElementsByTagName(e),s=0;s<n.length;s++){var i=n[s];if(!(i[Qd]||i[jn]||e==="link"&&i.getAttribute("rel")==="stylesheet")&&i.namespaceURI!=="http://www.w3.org/2000/svg"){var o=i.getAttribute(t)||"";o=e+o;var l=a.get(o);l?l.push(i):a.set(o,[i])}}return a}function qE(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function vF(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function LD(e){return!(e.type==="stylesheet"&&!(e.state.loading&3))}var Sd=null;function wF(){}function NF(e,t,n){if(Sd===null)throw Error(ce(475));var a=Sd;if(t.type==="stylesheet"&&(typeof n.media!="string"||matchMedia(n.media).matches!==!1)&&!(t.state.loading&4)){if(t.instance===null){var s=Bl(n.href),i=e.querySelector(lu(s));if(i){e=i._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(a.count++,a=pf.bind(a),e.then(a,a)),t.state.loading|=4,t.instance=i,xn(i);return}i=e.ownerDocument||e,n=MD(n),(s=qa.get(s))&&ZN(n,s),i=i.createElement("link"),xn(i);var o=i;o._p=new Promise(function(l,c){o.onload=l,o.onerror=c}),En(i,"link",n),t.instance=i}a.stylesheets===null&&(a.stylesheets=new Map),a.stylesheets.set(t,e),(e=t.state.preload)&&!(t.state.loading&3)&&(a.count++,t=pf.bind(a),e.addEventListener("load",t),e.addEventListener("error",t))}}function SF(){if(Sd===null)throw Error(ce(475));var e=Sd;return e.stylesheets&&e.count===0&&hw(e,e.stylesheets),0<e.count?function(t){var n=setTimeout(function(){if(e.stylesheets&&hw(e,e.stylesheets),e.unsuspend){var a=e.unsuspend;e.unsuspend=null,a()}},6e4);return e.unsuspend=t,function(){e.unsuspend=null,clearTimeout(n)}}:null}function pf(){if(this.count--,this.count===0){if(this.stylesheets)hw(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var mf=null;function hw(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,mf=new Map,t.forEach(EF,e),mf=null,pf.call(e))}function EF(e,t){if(!(t.state.loading&4)){var n=mf.get(e);if(n)var a=n.get(null);else{n=new Map,mf.set(e,n);for(var s=e.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i<s.length;i++){var o=s[i];(o.nodeName==="LINK"||o.getAttribute("media")!=="not all")&&(n.set(o.dataset.precedence,o),a=o)}a&&n.set(null,a)}s=t.instance,o=s.getAttribute("data-precedence"),i=n.get(o)||a,i===a&&n.set(null,s),n.set(o,s),this.count++,a=pf.bind(this),s.addEventListener("load",a),s.addEventListener("error",a),i?i.parentNode.insertBefore(s,i.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(s,e.firstChild)),t.state.loading|=4}}var Ed={$$typeof:is,Provider:null,Consumer:null,_currentValue:Ji,_currentValue2:Ji,_threadCount:0};function TF(e,t,n,a,s,i,o,l){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Qp(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Qp(0),this.hiddenUpdates=Qp(null),this.identifierPrefix=a,this.onUncaughtError=s,this.onCaughtError=i,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=l,this.incompleteTransitions=new Map}function UD(e,t,n,a,s,i,o,l,c,u,h,d){return e=new TF(e,t,n,o,l,c,u,d),t=1,i===!0&&(t|=24),i=fa(3,null,null,t),e.current=i,i.stateNode=e,t=CN(),t.refCount++,e.pooledCache=t,t.refCount++,i.memoizedState={element:a,isDehydrated:n,cache:t},jN(i),e}function PD(e){return e?(e=ol,e):ol}function FD(e,t,n,a,s,i){s=PD(s),a.context===null?a.context=s:a.pendingContext=s,a=li(t),a.payload={element:n},i=i===void 0?null:i,i!==null&&(a.callback=i),n=ci(e,a,t),n!==null&&(xa(n,e,t),ed(n,e,t))}function GE(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function JN(e,t){GE(e,t),(e=e.alternate)&&GE(e,t)}function BD(e){if(e.tag===13){var t=rc(e,67108864);t!==null&&xa(t,e,67108864),JN(e,67108864)}}var gf=!0;function CF(e,t,n,a){var s=qe.T;qe.T=null;var i=ht.p;try{ht.p=2,e1(e,t,n,a)}finally{ht.p=i,qe.T=s}}function AF(e,t,n,a){var s=qe.T;qe.T=null;var i=ht.p;try{ht.p=8,e1(e,t,n,a)}finally{ht.p=i,qe.T=s}}function e1(e,t,n,a){if(gf){var s=fw(a);if(s===null)km(e,t,a,bf,n),VE(e,a);else if(kF(s,e,t,n,a))a.stopPropagation();else if(VE(e,a),t&4&&-1<jF.indexOf(e)){for(;s!==null;){var i=ac(s);if(i!==null)switch(i.tag){case 3:if(i=i.stateNode,i.current.memoizedState.isDehydrated){var o=Hi(i.pendingLanes);if(o!==0){var l=i;for(l.pendingLanes|=2,l.entangledLanes|=2;o;){var c=1<<31-ga(o);l.entanglements[1]|=c,o&=~c}Fr(i),!(yt&6)&&(of=Or()+500,ou(0))}}break;case 13:l=rc(i,2),l!==null&&xa(l,i,2),ip(),JN(i,2)}if(i=fw(a),i===null&&km(e,t,a,bf,n),i===s)break;s=i}s!==null&&a.stopPropagation()}else km(e,t,a,null,n)}}function fw(e){return e=gN(e),t1(e)}var bf=null;function t1(e){if(bf=null,e=tl(e),e!==null){var t=Wd(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=uO(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return bf=e,null}function zD(e){switch(e){case"beforetoggle":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"toggle":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 2;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"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(f6()){case mO:return 2;case gO:return 8;case qh:case p6:return 32;case bO:return 268435456;default:return 32}default:return 32}}var pw=!1,hi=null,fi=null,pi=null,Td=new Map,Cd=new Map,Js=[],jF="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".split(" ");function VE(e,t){switch(e){case"focusin":case"focusout":hi=null;break;case"dragenter":case"dragleave":fi=null;break;case"mouseover":case"mouseout":pi=null;break;case"pointerover":case"pointerout":Td.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Cd.delete(t.pointerId)}}function Ec(e,t,n,a,s,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:a,nativeEvent:i,targetContainers:[s]},t!==null&&(t=ac(t),t!==null&&BD(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function kF(e,t,n,a,s){switch(t){case"focusin":return hi=Ec(hi,e,t,n,a,s),!0;case"dragenter":return fi=Ec(fi,e,t,n,a,s),!0;case"mouseover":return pi=Ec(pi,e,t,n,a,s),!0;case"pointerover":var i=s.pointerId;return Td.set(i,Ec(Td.get(i)||null,e,t,n,a,s)),!0;case"gotpointercapture":return i=s.pointerId,Cd.set(i,Ec(Cd.get(i)||null,e,t,n,a,s)),!0}return!1}function $D(e){var t=tl(e.target);if(t!==null){var n=Wd(t);if(n!==null){if(t=n.tag,t===13){if(t=uO(n),t!==null){e.blockedOn=t,N6(e.priority,function(){if(n.tag===13){var a=ba();a=hN(a);var s=rc(n,a);s!==null&&xa(s,n,a),JN(n,a)}});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ah(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=fw(e.nativeEvent);if(n===null){n=e.nativeEvent;var a=new n.constructor(n.type,n);R0=a,n.target.dispatchEvent(a),R0=null}else return t=ac(n),t!==null&&BD(t),e.blockedOn=n,!1;t.shift()}return!0}function YE(e,t,n){Ah(e)&&n.delete(t)}function _F(){pw=!1,hi!==null&&Ah(hi)&&(hi=null),fi!==null&&Ah(fi)&&(fi=null),pi!==null&&Ah(pi)&&(pi=null),Td.forEach(YE),Cd.forEach(YE)}function zu(e,t){e.blockedOn===t&&(e.blockedOn=null,pw||(pw=!0,fn.unstable_scheduleCallback(fn.unstable_NormalPriority,_F)))}var $u=null;function WE(e){$u!==e&&($u=e,fn.unstable_scheduleCallback(fn.unstable_NormalPriority,function(){$u===e&&($u=null);for(var t=0;t<e.length;t+=3){var n=e[t],a=e[t+1],s=e[t+2];if(typeof a!="function"){if(t1(a||n)===null)continue;break}var i=ac(n);i!==null&&(e.splice(t,3),t-=3,Y0(i,{pending:!0,data:s,method:n.method,action:a},a,s))}}))}function Ad(e){function t(c){return zu(c,e)}hi!==null&&zu(hi,e),fi!==null&&zu(fi,e),pi!==null&&zu(pi,e),Td.forEach(t),Cd.forEach(t);for(var n=0;n<Js.length;n++){var a=Js[n];a.blockedOn===e&&(a.blockedOn=null)}for(;0<Js.length&&(n=Js[0],n.blockedOn===null);)$D(n),n.blockedOn===null&&Js.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(a=0;a<n.length;a+=3){var s=n[a],i=n[a+1],o=s[Xn]||null;if(typeof i=="function")o||WE(n);else if(o){var l=null;if(i&&i.hasAttribute("formAction")){if(s=i,o=i[Xn]||null)l=o.formAction;else if(t1(s)!==null)continue}else l=o.action;typeof l=="function"?n[a+1]=l:(n.splice(a,3),a-=3),WE(n)}}}function n1(e){this._internalRoot=e}dp.prototype.render=n1.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(ce(409));var n=t.current,a=ba();FD(n,a,e,t,null,null)};dp.prototype.unmount=n1.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;FD(e.current,2,null,e,null,null),ip(),t[nc]=null}};function dp(e){this._internalRoot=e}dp.prototype.unstable_scheduleHydration=function(e){if(e){var t=NO();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Js.length&&t!==0&&t<Js[n].priority;n++);Js.splice(n,0,e),n===0&&$D(e)}};var XE=cO.version;if(XE!=="19.1.0")throw Error(ce(527,XE,"19.1.0"));ht.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(ce(188)):(e=Object.keys(e).join(","),Error(ce(268,e)));return e=i6(t),e=e!==null?hO(e):null,e=e===null?null:e.stateNode,e};var RF={bundleType:0,version:"19.1.0",rendererPackageName:"react-dom",currentDispatcherRef:qe,reconcilerVersion:"19.1.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Hu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Hu.isDisabled&&Hu.supportsFiber)try{Xd=Hu.inject(RF),ma=Hu}catch{}}Yf.createRoot=function(e,t){if(!dO(e))throw Error(ce(299));var n=!1,a="",s=U4,i=P4,o=F4,l=null;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(a=t.identifierPrefix),t.onUncaughtError!==void 0&&(s=t.onUncaughtError),t.onCaughtError!==void 0&&(i=t.onCaughtError),t.onRecoverableError!==void 0&&(o=t.onRecoverableError),t.unstable_transitionCallbacks!==void 0&&(l=t.unstable_transitionCallbacks)),t=UD(e,1,!1,null,null,n,a,s,i,o,l,null),e[nc]=t.current,KN(e),new n1(t)};Yf.hydrateRoot=function(e,t,n){if(!dO(e))throw Error(ce(299));var a=!1,s="",i=U4,o=P4,l=F4,c=null,u=null;return n!=null&&(n.unstable_strictMode===!0&&(a=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onUncaughtError!==void 0&&(i=n.onUncaughtError),n.onCaughtError!==void 0&&(o=n.onCaughtError),n.onRecoverableError!==void 0&&(l=n.onRecoverableError),n.unstable_transitionCallbacks!==void 0&&(c=n.unstable_transitionCallbacks),n.formState!==void 0&&(u=n.formState)),t=UD(e,1,!0,t,n??null,a,s,i,o,l,c,u),t.context=PD(null),n=t.current,a=ba(),a=hN(a),s=li(a),s.callback=null,ci(n,s,a),n=a,t.current.lanes=n,Zd(t,n),Fr(t),e[nc]=t.current,KN(e),new dp(t)};Yf.version="19.1.0";function HD(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(HD)}catch(e){console.error(e)}}HD(),nO.exports=Yf;var OF=nO.exports;const DF=Yd(OF);/**
|
|
48
|
+
`+n.stack}}function Ia(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function TO(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function j6(e){var t=TO(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),a=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(o){a=""+o,i.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return a},setValue:function(o){a=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Gh(e){e._valueTracker||(e._valueTracker=j6(e))}function CO(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),a="";return e&&(a=TO(e)?e.checked?"true":"false":e.value),e=a,e!==n?(t.setValue(e),!0):!1}function Vh(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}}var k6=/[\n"\\]/g;function Ba(e){return e.replace(k6,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function k0(e,t,n,a,s,i,o,l){e.name="",o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"?e.type=o:e.removeAttribute("type"),t!=null?o==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Ia(t)):e.value!==""+Ia(t)&&(e.value=""+Ia(t)):o!=="submit"&&o!=="reset"||e.removeAttribute("value"),t!=null?_0(e,o,Ia(t)):n!=null?_0(e,o,Ia(n)):a!=null&&e.removeAttribute("value"),s==null&&i!=null&&(e.defaultChecked=!!i),s!=null&&(e.checked=s&&typeof s!="function"&&typeof s!="symbol"),l!=null&&typeof l!="function"&&typeof l!="symbol"&&typeof l!="boolean"?e.name=""+Ia(l):e.removeAttribute("name")}function AO(e,t,n,a,s,i,o,l){if(i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(e.type=i),t!=null||n!=null){if(!(i!=="submit"&&i!=="reset"||t!=null))return;n=n!=null?""+Ia(n):"",t=t!=null?""+Ia(t):n,l||t===e.value||(e.value=t),e.defaultValue=t}a=a??s,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=l?e.checked:!!a,e.defaultChecked=!!a,o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"&&(e.name=o)}function _0(e,t,n){t==="number"&&Vh(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function gl(e,t,n,a){if(e=e.options,t){t={};for(var s=0;s<n.length;s++)t["$"+n[s]]=!0;for(n=0;n<e.length;n++)s=t.hasOwnProperty("$"+e[n].value),e[n].selected!==s&&(e[n].selected=s),s&&a&&(e[n].defaultSelected=!0)}else{for(n=""+Ia(n),t=null,s=0;s<e.length;s++){if(e[s].value===n){e[s].selected=!0,a&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function jO(e,t,n){if(t!=null&&(t=""+Ia(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+Ia(n):""}function kO(e,t,n,a){if(t==null){if(a!=null){if(n!=null)throw Error(ce(92));if(Bc(a)){if(1<a.length)throw Error(ce(93));a=a[0]}n=a}n==null&&(n=""),t=n}n=Ia(t),e.defaultValue=n,a=e.textContent,a===n&&a!==""&&a!==null&&(e.value=a)}function Ol(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var _6=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function US(e,t,n){var a=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?a?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":a?e.setProperty(t,n):typeof n!="number"||n===0||_6.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function _O(e,t,n){if(t!=null&&typeof t!="object")throw Error(ce(62));if(e=e.style,n!=null){for(var a in n)!n.hasOwnProperty(a)||t!=null&&t.hasOwnProperty(a)||(a.indexOf("--")===0?e.setProperty(a,""):a==="float"?e.cssFloat="":e[a]="");for(var s in t)a=t[s],t.hasOwnProperty(s)&&n[s]!==a&&US(e,s,a)}else for(var i in t)t.hasOwnProperty(i)&&US(e,i,t[i])}function mN(e){if(e.indexOf("-")===-1)return!1;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 R6=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),O6=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function gh(e){return O6.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}var R0=null;function gN(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var nl=null,bl=null;function PS(e){var t=ac(e);if(t&&(e=t.stateNode)){var n=e[Xn]||null;e:switch(e=t.stateNode,t.type){case"input":if(k0(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+Ba(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var a=n[t];if(a!==e&&a.form===e.form){var s=a[Xn]||null;if(!s)throw Error(ce(90));k0(a,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name)}}for(t=0;t<n.length;t++)a=n[t],a.form===e.form&&CO(a)}break e;case"textarea":jO(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&gl(e,!!n.multiple,t,!1)}}}var nm=!1;function RO(e,t,n){if(nm)return e(t,n);nm=!0;try{var a=e(t);return a}finally{if(nm=!1,(nl!==null||bl!==null)&&(ip(),nl&&(t=nl,e=bl,bl=nl=null,PS(t),e)))for(t=0;t<e.length;t++)PS(e[t])}}function md(e,t){var n=e.stateNode;if(n===null)return null;var a=n[Xn]||null;if(a===null)return null;n=a[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":(a=!a.disabled)||(e=e.type,a=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!a;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(ce(231,t,typeof n));return n}var xs=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),O0=!1;if(xs)try{var xc={};Object.defineProperty(xc,"passive",{get:function(){O0=!0}}),window.addEventListener("test",xc,xc),window.removeEventListener("test",xc,xc)}catch{O0=!1}var ni=null,bN=null,bh=null;function OO(){if(bh)return bh;var e,t=bN,n=t.length,a,s="value"in ni?ni.value:ni.textContent,i=s.length;for(e=0;e<n&&t[e]===s[e];e++);var o=n-e;for(a=1;a<=o&&t[n-a]===s[i-a];a++);return bh=s.slice(e,1<a?1-a:void 0)}function xh(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 Iu(){return!0}function FS(){return!1}function Kn(e){function t(n,a,s,i,o){this._reactName=n,this._targetInst=s,this.type=a,this.nativeEvent=i,this.target=o,this.currentTarget=null;for(var l in e)e.hasOwnProperty(l)&&(n=e[l],this[l]=n?n(i):i[l]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?Iu:FS,this.isPropagationStopped=FS,this}return Lt(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Iu)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Iu)},persist:function(){},isPersistent:Iu}),t}var Co={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Zf=Kn(Co),Jd=Lt({},Co,{view:0,detail:0}),D6=Kn(Jd),am,rm,yc,Qf=Lt({},Jd,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:xN,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!==yc&&(yc&&e.type==="mousemove"?(am=e.screenX-yc.screenX,rm=e.screenY-yc.screenY):rm=am=0,yc=e),am)},movementY:function(e){return"movementY"in e?e.movementY:rm}}),BS=Kn(Qf),I6=Lt({},Qf,{dataTransfer:0}),M6=Kn(I6),L6=Lt({},Jd,{relatedTarget:0}),sm=Kn(L6),U6=Lt({},Co,{animationName:0,elapsedTime:0,pseudoElement:0}),P6=Kn(U6),F6=Lt({},Co,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),B6=Kn(F6),z6=Lt({},Co,{data:0}),zS=Kn(z6),$6={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},H6={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"},q6={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function G6(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=q6[e])?!!t[e]:!1}function xN(){return G6}var V6=Lt({},Jd,{key:function(e){if(e.key){var t=$6[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=xh(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?H6[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:xN,charCode:function(e){return e.type==="keypress"?xh(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?xh(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Y6=Kn(V6),W6=Lt({},Qf,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),$S=Kn(W6),X6=Lt({},Jd,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:xN}),K6=Kn(X6),Z6=Lt({},Co,{propertyName:0,elapsedTime:0,pseudoElement:0}),Q6=Kn(Z6),J6=Lt({},Qf,{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}),eP=Kn(J6),tP=Lt({},Co,{newState:0,oldState:0}),nP=Kn(tP),aP=[9,13,27,32],yN=xs&&"CompositionEvent"in window,Xc=null;xs&&"documentMode"in document&&(Xc=document.documentMode);var rP=xs&&"TextEvent"in window&&!Xc,DO=xs&&(!yN||Xc&&8<Xc&&11>=Xc),HS=" ",qS=!1;function IO(e,t){switch(e){case"keyup":return aP.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function MO(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var al=!1;function sP(e,t){switch(e){case"compositionend":return MO(t);case"keypress":return t.which!==32?null:(qS=!0,HS);case"textInput":return e=t.data,e===HS&&qS?null:e;default:return null}}function iP(e,t){if(al)return e==="compositionend"||!yN&&IO(e,t)?(e=OO(),bh=bN=ni=null,al=!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 DO&&t.locale!=="ko"?null:t.data;default:return null}}var oP={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 GS(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!oP[e.type]:t==="textarea"}function LO(e,t,n,a){nl?bl?bl.push(a):bl=[a]:nl=a,t=uf(t,"onChange"),0<t.length&&(n=new Zf("onChange","change",null,n,a),e.push({event:n,listeners:t}))}var Kc=null,gd=null;function lP(e){j4(e,0)}function Jf(e){var t=zc(e);if(CO(t))return e}function VS(e,t){if(e==="change")return t}var UO=!1;if(xs){var im;if(xs){var om="oninput"in document;if(!om){var YS=document.createElement("div");YS.setAttribute("oninput","return;"),om=typeof YS.oninput=="function"}im=om}else im=!1;UO=im&&(!document.documentMode||9<document.documentMode)}function WS(){Kc&&(Kc.detachEvent("onpropertychange",PO),gd=Kc=null)}function PO(e){if(e.propertyName==="value"&&Jf(gd)){var t=[];LO(t,gd,e,gN(e)),RO(lP,t)}}function cP(e,t,n){e==="focusin"?(WS(),Kc=t,gd=n,Kc.attachEvent("onpropertychange",PO)):e==="focusout"&&WS()}function dP(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Jf(gd)}function uP(e,t){if(e==="click")return Jf(t)}function hP(e,t){if(e==="input"||e==="change")return Jf(t)}function fP(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var va=typeof Object.is=="function"?Object.is:fP;function bd(e,t){if(va(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),a=Object.keys(t);if(n.length!==a.length)return!1;for(a=0;a<n.length;a++){var s=n[a];if(!A0.call(t,s)||!va(e[s],t[s]))return!1}return!0}function XS(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function KS(e,t){var n=XS(e);e=0;for(var a;n;){if(n.nodeType===3){if(a=e+n.textContent.length,e<=t&&a>=t)return{node:n,offset:t-e};e=a}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=XS(n)}}function FO(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?FO(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function BO(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Vh(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Vh(e.document)}return t}function vN(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")}var pP=xs&&"documentMode"in document&&11>=document.documentMode,rl=null,D0=null,Zc=null,I0=!1;function ZS(e,t,n){var a=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;I0||rl==null||rl!==Vh(a)||(a=rl,"selectionStart"in a&&vN(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),Zc&&bd(Zc,a)||(Zc=a,a=uf(D0,"onSelect"),0<a.length&&(t=new Zf("onSelect","select",null,t,n),e.push({event:t,listeners:a}),t.target=rl)))}function Fi(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var sl={animationend:Fi("Animation","AnimationEnd"),animationiteration:Fi("Animation","AnimationIteration"),animationstart:Fi("Animation","AnimationStart"),transitionrun:Fi("Transition","TransitionRun"),transitionstart:Fi("Transition","TransitionStart"),transitioncancel:Fi("Transition","TransitionCancel"),transitionend:Fi("Transition","TransitionEnd")},lm={},zO={};xs&&(zO=document.createElement("div").style,"AnimationEvent"in window||(delete sl.animationend.animation,delete sl.animationiteration.animation,delete sl.animationstart.animation),"TransitionEvent"in window||delete sl.transitionend.transition);function Ao(e){if(lm[e])return lm[e];if(!sl[e])return e;var t=sl[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in zO)return lm[e]=t[n];return e}var $O=Ao("animationend"),HO=Ao("animationiteration"),qO=Ao("animationstart"),mP=Ao("transitionrun"),gP=Ao("transitionstart"),bP=Ao("transitioncancel"),GO=Ao("transitionend"),VO=new Map,M0="abort auxClick beforeToggle 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(" ");M0.push("scrollEnd");function dr(e,t){VO.set(e,t),To(t,[e])}var QS=new WeakMap;function za(e,t){if(typeof e=="object"&&e!==null){var n=QS.get(e);return n!==void 0?n:(t={value:e,source:t,stack:LS(t)},QS.set(e,t),t)}return{value:e,source:t,stack:LS(t)}}var ka=[],il=0,wN=0;function ep(){for(var e=il,t=wN=il=0;t<e;){var n=ka[t];ka[t++]=null;var a=ka[t];ka[t++]=null;var s=ka[t];ka[t++]=null;var i=ka[t];if(ka[t++]=null,a!==null&&s!==null){var o=a.pending;o===null?s.next=s:(s.next=o.next,o.next=s),a.pending=s}i!==0&&YO(n,s,i)}}function tp(e,t,n,a){ka[il++]=e,ka[il++]=t,ka[il++]=n,ka[il++]=a,wN|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function NN(e,t,n,a){return tp(e,t,n,a),Yh(e)}function rc(e,t){return tp(e,null,null,t),Yh(e)}function YO(e,t,n){e.lanes|=n;var a=e.alternate;a!==null&&(a.lanes|=n);for(var s=!1,i=e.return;i!==null;)i.childLanes|=n,a=i.alternate,a!==null&&(a.childLanes|=n),i.tag===22&&(e=i.stateNode,e===null||e._visibility&1||(s=!0)),e=i,i=i.return;return e.tag===3?(i=e.stateNode,s&&t!==null&&(s=31-ga(n),e=i.hiddenUpdates,a=e[s],a===null?e[s]=[t]:a.push(t),t.lane=n|536870912),i):null}function Yh(e){if(50<od)throw od=0,nw=null,Error(ce(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ol={};function xP(e,t,n,a){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function fa(e,t,n,a){return new xP(e,t,n,a)}function SN(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ms(e,t){var n=e.alternate;return n===null?(n=fa(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function WO(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function yh(e,t,n,a,s,i){var o=0;if(a=e,typeof e=="function")SN(e)&&(o=1);else if(typeof e=="string")o=vF(e,n,Rr.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case S0:return e=fa(31,n,t,s),e.elementType=S0,e.lanes=i,e;case Jo:return eo(n.children,s,i,t);case fO:o=8,s|=24;break;case v0:return e=fa(12,n,t,s|2),e.elementType=v0,e.lanes=i,e;case w0:return e=fa(13,n,t,s),e.elementType=w0,e.lanes=i,e;case N0:return e=fa(19,n,t,s),e.elementType=N0,e.lanes=i,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case l6:case is:o=10;break e;case pO:o=9;break e;case cN:o=11;break e;case dN:o=14;break e;case Ys:o=16,a=null;break e}o=29,n=Error(ce(130,e===null?"null":typeof e,"")),a=null}return t=fa(o,n,t,s),t.elementType=e,t.type=a,t.lanes=i,t}function eo(e,t,n,a){return e=fa(7,e,a,t),e.lanes=n,e}function cm(e,t,n){return e=fa(6,e,null,t),e.lanes=n,e}function dm(e,t,n){return t=fa(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var ll=[],cl=0,Wh=null,Xh=0,Ma=[],La=0,to=null,os=1,ls="";function qi(e,t){ll[cl++]=Xh,ll[cl++]=Wh,Wh=e,Xh=t}function XO(e,t,n){Ma[La++]=os,Ma[La++]=ls,Ma[La++]=to,to=e;var a=os;e=ls;var s=32-ga(a)-1;a&=~(1<<s),n+=1;var i=32-ga(t)+s;if(30<i){var o=s-s%5;i=(a&(1<<o)-1).toString(32),a>>=o,s-=o,os=1<<32-ga(t)+s|n<<s|a,ls=i+e}else os=1<<i|n<<s|a,ls=e}function EN(e){e.return!==null&&(qi(e,1),XO(e,1,0))}function TN(e){for(;e===Wh;)Wh=ll[--cl],ll[cl]=null,Xh=ll[--cl],ll[cl]=null;for(;e===to;)to=Ma[--La],Ma[La]=null,ls=Ma[--La],Ma[La]=null,os=Ma[--La],Ma[La]=null}var In=null,Gt=null,ut=!1,no=null,Cr=!1,L0=Error(ce(519));function co(e){var t=Error(ce(418,""));throw xd(za(t,e)),L0}function JS(e){var t=e.stateNode,n=e.type,a=e.memoizedProps;switch(t[jn]=e,t[Xn]=a,n){case"dialog":st("cancel",t),st("close",t);break;case"iframe":case"object":case"embed":st("load",t);break;case"video":case"audio":for(n=0;n<wd.length;n++)st(wd[n],t);break;case"source":st("error",t);break;case"img":case"image":case"link":st("error",t),st("load",t);break;case"details":st("toggle",t);break;case"input":st("invalid",t),AO(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0),Gh(t);break;case"select":st("invalid",t);break;case"textarea":st("invalid",t),kO(t,a.value,a.defaultValue,a.children),Gh(t)}n=a.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||a.suppressHydrationWarning===!0||_4(t.textContent,n)?(a.popover!=null&&(st("beforetoggle",t),st("toggle",t)),a.onScroll!=null&&st("scroll",t),a.onScrollEnd!=null&&st("scrollend",t),a.onClick!=null&&(t.onclick=cp),t=!0):t=!1,t||co(e)}function eE(e){for(In=e.return;In;)switch(In.tag){case 5:case 13:Cr=!1;return;case 27:case 3:Cr=!0;return;default:In=In.return}}function vc(e){if(e!==In)return!1;if(!ut)return eE(e),ut=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||lw(e.type,e.memoizedProps)),n=!n),n&&Gt&&co(e),eE(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(ce(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8)if(n=e.data,n==="/$"){if(t===0){Gt=sr(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++;e=e.nextSibling}Gt=null}}else t===27?(t=Gt,_i(e.type)?(e=uw,uw=null,Gt=e):Gt=t):Gt=In?sr(e.stateNode.nextSibling):null;return!0}function eu(){Gt=In=null,ut=!1}function tE(){var e=no;return e!==null&&(Gn===null?Gn=e:Gn.push.apply(Gn,e),no=null),e}function xd(e){no===null?no=[e]:no.push(e)}var U0=Pr(null),jo=null,cs=null;function Ks(e,t,n){Ft(U0,t._currentValue),t._currentValue=n}function gs(e){e._currentValue=U0.current,vn(U0)}function P0(e,t,n){for(;e!==null;){var a=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,a!==null&&(a.childLanes|=t)):a!==null&&(a.childLanes&t)!==t&&(a.childLanes|=t),e===n)break;e=e.return}}function F0(e,t,n,a){var s=e.child;for(s!==null&&(s.return=e);s!==null;){var i=s.dependencies;if(i!==null){var o=s.child;i=i.firstContext;e:for(;i!==null;){var l=i;i=s;for(var c=0;c<t.length;c++)if(l.context===t[c]){i.lanes|=n,l=i.alternate,l!==null&&(l.lanes|=n),P0(i.return,n,e),a||(o=null);break e}i=l.next}}else if(s.tag===18){if(o=s.return,o===null)throw Error(ce(341));o.lanes|=n,i=o.alternate,i!==null&&(i.lanes|=n),P0(o,n,e),o=null}else o=s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===e){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}}function tu(e,t,n,a){e=null;for(var s=t,i=!1;s!==null;){if(!i){if(s.flags&524288)i=!0;else if(s.flags&262144)break}if(s.tag===10){var o=s.alternate;if(o===null)throw Error(ce(387));if(o=o.memoizedProps,o!==null){var l=s.type;va(s.pendingProps.value,o.value)||(e!==null?e.push(l):e=[l])}}else if(s===zh.current){if(o=s.alternate,o===null)throw Error(ce(387));o.memoizedState.memoizedState!==s.memoizedState.memoizedState&&(e!==null?e.push(Ed):e=[Ed])}s=s.return}e!==null&&F0(t,e,n,a),t.flags|=262144}function Kh(e){for(e=e.firstContext;e!==null;){if(!va(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function uo(e){jo=e,cs=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function kn(e){return KO(jo,e)}function Mu(e,t){return jo===null&&uo(e),KO(e,t)}function KO(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},cs===null){if(e===null)throw Error(ce(308));cs=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else cs=cs.next=t;return n}var yP=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,a){e.push(a)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},vP=fn.unstable_scheduleCallback,wP=fn.unstable_NormalPriority,dn={$$typeof:is,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function CN(){return{controller:new yP,data:new Map,refCount:0}}function nu(e){e.refCount--,e.refCount===0&&vP(wP,function(){e.controller.abort()})}var Qc=null,B0=0,Dl=0,xl=null;function NP(e,t){if(Qc===null){var n=Qc=[];B0=0,Dl=XN(),xl={status:"pending",value:void 0,then:function(a){n.push(a)}}}return B0++,t.then(nE,nE),t}function nE(){if(--B0===0&&Qc!==null){xl!==null&&(xl.status="fulfilled");var e=Qc;Qc=null,Dl=0,xl=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function SP(e,t){var n=[],a={status:"pending",value:null,reason:null,then:function(s){n.push(s)}};return e.then(function(){a.status="fulfilled",a.value=t;for(var s=0;s<n.length;s++)(0,n[s])(t)},function(s){for(a.status="rejected",a.reason=s,s=0;s<n.length;s++)(0,n[s])(void 0)}),a}var aE=qe.S;qe.S=function(e,t){typeof t=="object"&&t!==null&&typeof t.then=="function"&&NP(e,t),aE!==null&&aE(e,t)};var ao=Pr(null);function AN(){var e=ao.current;return e!==null?e:Rt.pooledCache}function vh(e,t){t===null?Ft(ao,ao.current):Ft(ao,t.pool)}function ZO(){var e=AN();return e===null?null:{parent:dn._currentValue,pool:e}}var au=Error(ce(460)),QO=Error(ce(474)),np=Error(ce(542)),z0={then:function(){}};function rE(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Lu(){}function JO(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Lu,Lu),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,iE(e),e;default:if(typeof t.status=="string")t.then(Lu,Lu);else{if(e=Rt,e!==null&&100<e.shellSuspendCounter)throw Error(ce(482));e=t,e.status="pending",e.then(function(a){if(t.status==="pending"){var s=t;s.status="fulfilled",s.value=a}},function(a){if(t.status==="pending"){var s=t;s.status="rejected",s.reason=a}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,iE(e),e}throw Jc=t,au}}var Jc=null;function sE(){if(Jc===null)throw Error(ce(459));var e=Jc;return Jc=null,e}function iE(e){if(e===au||e===np)throw Error(ce(483))}var Ws=!1;function jN(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function $0(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function li(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function ci(e,t,n){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,yt&2){var s=a.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),a.pending=t,t=Yh(e),YO(e,null,n),t}return tp(e,a,t,n),Yh(e)}function ed(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var a=t.lanes;a&=e.pendingLanes,n|=a,t.lanes=n,wO(e,n)}}function um(e,t){var n=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,n===a)){var s=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};i===null?s=i=o:i=i.next=o,n=n.next}while(n!==null);i===null?s=i=t:i=i.next=t}else s=i=t;n={baseState:a.baseState,firstBaseUpdate:s,lastBaseUpdate:i,shared:a.shared,callbacks:a.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var H0=!1;function td(){if(H0){var e=xl;if(e!==null)throw e}}function nd(e,t,n,a){H0=!1;var s=e.updateQueue;Ws=!1;var i=s.firstBaseUpdate,o=s.lastBaseUpdate,l=s.shared.pending;if(l!==null){s.shared.pending=null;var c=l,u=c.next;c.next=null,o===null?i=u:o.next=u,o=c;var h=e.alternate;h!==null&&(h=h.updateQueue,l=h.lastBaseUpdate,l!==o&&(l===null?h.firstBaseUpdate=u:l.next=u,h.lastBaseUpdate=c))}if(i!==null){var d=s.baseState;o=0,h=u=c=null,l=i;do{var f=l.lane&-536870913,p=f!==l.lane;if(p?(ot&f)===f:(a&f)===f){f!==0&&f===Dl&&(H0=!0),h!==null&&(h=h.next={lane:0,tag:l.tag,payload:l.payload,callback:null,next:null});e:{var v=e,x=l;f=t;var N=n;switch(x.tag){case 1:if(v=x.payload,typeof v=="function"){d=v.call(N,d,f);break e}d=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=x.payload,f=typeof v=="function"?v.call(N,d,f):v,f==null)break e;d=Lt({},d,f);break e;case 2:Ws=!0}}f=l.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=s.callbacks,p===null?s.callbacks=[f]:p.push(f))}else p={lane:f,tag:l.tag,payload:l.payload,callback:l.callback,next:null},h===null?(u=h=p,c=d):h=h.next=p,o|=f;if(l=l.next,l===null){if(l=s.shared.pending,l===null)break;p=l,l=p.next,p.next=null,s.lastBaseUpdate=p,s.shared.pending=null}}while(!0);h===null&&(c=d),s.baseState=c,s.firstBaseUpdate=u,s.lastBaseUpdate=h,i===null&&(s.shared.lanes=0),Ni|=o,e.lanes=o,e.memoizedState=d}}function eD(e,t){if(typeof e!="function")throw Error(ce(191,e));e.call(t)}function tD(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)eD(n[e],t)}var Il=Pr(null),Zh=Pr(0);function oE(e,t){e=ws,Ft(Zh,e),Ft(Il,t),ws=e|t.baseLanes}function q0(){Ft(Zh,ws),Ft(Il,Il.current)}function kN(){ws=Zh.current,vn(Il),vn(Zh)}var vi=0,Je=null,Nt=null,en=null,Qh=!1,yl=!1,ho=!1,Jh=0,yd=0,vl=null,EP=0;function Zt(){throw Error(ce(321))}function _N(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!va(e[n],t[n]))return!1;return!0}function RN(e,t,n,a,s,i){return vi=i,Je=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,qe.H=e===null||e.memoizedState===null?OD:DD,ho=!1,i=n(a,s),ho=!1,yl&&(i=aD(t,n,a,s)),nD(e),i}function nD(e){qe.H=ef;var t=Nt!==null&&Nt.next!==null;if(vi=0,en=Nt=Je=null,Qh=!1,yd=0,vl=null,t)throw Error(ce(300));e===null||yn||(e=e.dependencies,e!==null&&Kh(e)&&(yn=!0))}function aD(e,t,n,a){Je=e;var s=0;do{if(yl&&(vl=null),yd=0,yl=!1,25<=s)throw Error(ce(301));if(s+=1,en=Nt=null,e.updateQueue!=null){var i=e.updateQueue;i.lastEffect=null,i.events=null,i.stores=null,i.memoCache!=null&&(i.memoCache.index=0)}qe.H=RP,i=t(n,a)}while(yl);return i}function TP(){var e=qe.H,t=e.useState()[0];return t=typeof t.then=="function"?ru(t):t,e=e.useState()[0],(Nt!==null?Nt.memoizedState:null)!==e&&(Je.flags|=1024),t}function ON(){var e=Jh!==0;return Jh=0,e}function DN(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function IN(e){if(Qh){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Qh=!1}vi=0,en=Nt=Je=null,yl=!1,yd=Jh=0,vl=null}function Hn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return en===null?Je.memoizedState=en=e:en=en.next=e,en}function nn(){if(Nt===null){var e=Je.alternate;e=e!==null?e.memoizedState:null}else e=Nt.next;var t=en===null?Je.memoizedState:en.next;if(t!==null)en=t,Nt=e;else{if(e===null)throw Je.alternate===null?Error(ce(467)):Error(ce(310));Nt=e,e={memoizedState:Nt.memoizedState,baseState:Nt.baseState,baseQueue:Nt.baseQueue,queue:Nt.queue,next:null},en===null?Je.memoizedState=en=e:en=en.next=e}return en}function MN(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ru(e){var t=yd;return yd+=1,vl===null&&(vl=[]),e=JO(vl,e,t),t=Je,(en===null?t.memoizedState:en.next)===null&&(t=t.alternate,qe.H=t===null||t.memoizedState===null?OD:DD),e}function ap(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return ru(e);if(e.$$typeof===is)return kn(e)}throw Error(ce(438,String(e)))}function LN(e){var t=null,n=Je.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var a=Je.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(t={data:a.data.map(function(s){return s.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=MN(),Je.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),a=0;a<e;a++)n[a]=c6;return t.index++,n}function ys(e,t){return typeof t=="function"?t(e):t}function wh(e){var t=nn();return UN(t,Nt,e)}function UN(e,t,n){var a=e.queue;if(a===null)throw Error(ce(311));a.lastRenderedReducer=n;var s=e.baseQueue,i=a.pending;if(i!==null){if(s!==null){var o=s.next;s.next=i.next,i.next=o}t.baseQueue=s=i,a.pending=null}if(i=e.baseState,s===null)e.memoizedState=i;else{t=s.next;var l=o=null,c=null,u=t,h=!1;do{var d=u.lane&-536870913;if(d!==u.lane?(ot&d)===d:(vi&d)===d){var f=u.revertLane;if(f===0)c!==null&&(c=c.next={lane:0,revertLane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),d===Dl&&(h=!0);else if((vi&f)===f){u=u.next,f===Dl&&(h=!0);continue}else d={lane:0,revertLane:u.revertLane,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},c===null?(l=c=d,o=i):c=c.next=d,Je.lanes|=f,Ni|=f;d=u.action,ho&&n(i,d),i=u.hasEagerState?u.eagerState:n(i,d)}else f={lane:d,revertLane:u.revertLane,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},c===null?(l=c=f,o=i):c=c.next=f,Je.lanes|=d,Ni|=d;u=u.next}while(u!==null&&u!==t);if(c===null?o=i:c.next=l,!va(i,e.memoizedState)&&(yn=!0,h&&(n=xl,n!==null)))throw n;e.memoizedState=i,e.baseState=o,e.baseQueue=c,a.lastRenderedState=i}return s===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function hm(e){var t=nn(),n=t.queue;if(n===null)throw Error(ce(311));n.lastRenderedReducer=e;var a=n.dispatch,s=n.pending,i=t.memoizedState;if(s!==null){n.pending=null;var o=s=s.next;do i=e(i,o.action),o=o.next;while(o!==s);va(i,t.memoizedState)||(yn=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,a]}function rD(e,t,n){var a=Je,s=nn(),i=ut;if(i){if(n===void 0)throw Error(ce(407));n=n()}else n=t();var o=!va((Nt||s).memoizedState,n);o&&(s.memoizedState=n,yn=!0),s=s.queue;var l=oD.bind(null,a,s,e);if(su(2048,8,l,[e]),s.getSnapshot!==t||o||en!==null&&en.memoizedState.tag&1){if(a.flags|=2048,Ml(9,rp(),iD.bind(null,a,s,n,t),null),Rt===null)throw Error(ce(349));i||vi&124||sD(a,t,n)}return n}function sD(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Je.updateQueue,t===null?(t=MN(),Je.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function iD(e,t,n,a){t.value=n,t.getSnapshot=a,lD(t)&&cD(e)}function oD(e,t,n){return n(function(){lD(t)&&cD(e)})}function lD(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!va(e,n)}catch{return!0}}function cD(e){var t=rc(e,2);t!==null&&xa(t,e,2)}function G0(e){var t=Hn();if(typeof e=="function"){var n=e;if(e=n(),ho){ti(!0);try{n()}finally{ti(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ys,lastRenderedState:e},t}function dD(e,t,n,a){return e.baseState=n,UN(e,Nt,typeof a=="function"?a:ys)}function CP(e,t,n,a,s){if(sp(e))throw Error(ce(485));if(e=t.action,e!==null){var i={payload:s,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(o){i.listeners.push(o)}};qe.T!==null?n(!0):i.isTransition=!1,a(i),n=t.pending,n===null?(i.next=t.pending=i,uD(t,i)):(i.next=n.next,t.pending=n.next=i)}}function uD(e,t){var n=t.action,a=t.payload,s=e.state;if(t.isTransition){var i=qe.T,o={};qe.T=o;try{var l=n(s,a),c=qe.S;c!==null&&c(o,l),lE(e,t,l)}catch(u){V0(e,t,u)}finally{qe.T=i}}else try{i=n(s,a),lE(e,t,i)}catch(u){V0(e,t,u)}}function lE(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(a){cE(e,t,a)},function(a){return V0(e,t,a)}):cE(e,t,n)}function cE(e,t,n){t.status="fulfilled",t.value=n,hD(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,uD(e,n)))}function V0(e,t,n){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=n,hD(t),t=t.next;while(t!==a)}e.action=null}function hD(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function fD(e,t){return t}function dE(e,t){if(ut){var n=Rt.formState;if(n!==null){e:{var a=Je;if(ut){if(Gt){t:{for(var s=Gt,i=Cr;s.nodeType!==8;){if(!i){s=null;break t}if(s=sr(s.nextSibling),s===null){s=null;break t}}i=s.data,s=i==="F!"||i==="F"?s:null}if(s){Gt=sr(s.nextSibling),a=s.data==="F!";break e}}co(a)}a=!1}a&&(t=n[0])}}return n=Hn(),n.memoizedState=n.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:fD,lastRenderedState:t},n.queue=a,n=kD.bind(null,Je,a),a.dispatch=n,a=G0(!1),i=zN.bind(null,Je,!1,a.queue),a=Hn(),s={state:t,dispatch:null,action:e,pending:null},a.queue=s,n=CP.bind(null,Je,s,i,n),s.dispatch=n,a.memoizedState=e,[t,n,!1]}function uE(e){var t=nn();return pD(t,Nt,e)}function pD(e,t,n){if(t=UN(e,t,fD)[0],e=wh(ys)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=ru(t)}catch(o){throw o===au?np:o}else a=t;t=nn();var s=t.queue,i=s.dispatch;return n!==t.memoizedState&&(Je.flags|=2048,Ml(9,rp(),AP.bind(null,s,n),null)),[a,i,e]}function AP(e,t){e.action=t}function hE(e){var t=nn(),n=Nt;if(n!==null)return pD(t,n,e);nn(),t=t.memoizedState,n=nn();var a=n.queue.dispatch;return n.memoizedState=e,[t,a,!1]}function Ml(e,t,n,a){return e={tag:e,create:n,deps:a,inst:t,next:null},t=Je.updateQueue,t===null&&(t=MN(),Je.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(a=n.next,n.next=e,e.next=a,t.lastEffect=e),e}function rp(){return{destroy:void 0,resource:void 0}}function mD(){return nn().memoizedState}function Nh(e,t,n,a){var s=Hn();a=a===void 0?null:a,Je.flags|=e,s.memoizedState=Ml(1|t,rp(),n,a)}function su(e,t,n,a){var s=nn();a=a===void 0?null:a;var i=s.memoizedState.inst;Nt!==null&&a!==null&&_N(a,Nt.memoizedState.deps)?s.memoizedState=Ml(t,i,n,a):(Je.flags|=e,s.memoizedState=Ml(1|t,i,n,a))}function fE(e,t){Nh(8390656,8,e,t)}function gD(e,t){su(2048,8,e,t)}function bD(e,t){return su(4,2,e,t)}function xD(e,t){return su(4,4,e,t)}function yD(e,t){if(typeof t=="function"){e=e();var n=t(e);return function(){typeof n=="function"?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function vD(e,t,n){n=n!=null?n.concat([e]):null,su(4,4,yD.bind(null,t,e),n)}function PN(){}function wD(e,t){var n=nn();t=t===void 0?null:t;var a=n.memoizedState;return t!==null&&_N(t,a[1])?a[0]:(n.memoizedState=[e,t],e)}function ND(e,t){var n=nn();t=t===void 0?null:t;var a=n.memoizedState;if(t!==null&&_N(t,a[1]))return a[0];if(a=e(),ho){ti(!0);try{e()}finally{ti(!1)}}return n.memoizedState=[a,t],a}function FN(e,t,n){return n===void 0||vi&1073741824?e.memoizedState=t:(e.memoizedState=n,e=h4(),Je.lanes|=e,Ni|=e,n)}function SD(e,t,n,a){return va(n,t)?n:Il.current!==null?(e=FN(e,n,a),va(e,t)||(yn=!0),e):vi&42?(e=h4(),Je.lanes|=e,Ni|=e,t):(yn=!0,e.memoizedState=n)}function ED(e,t,n,a,s){var i=ht.p;ht.p=i!==0&&8>i?i:8;var o=qe.T,l={};qe.T=l,zN(e,!1,t,n);try{var c=s(),u=qe.S;if(u!==null&&u(l,c),c!==null&&typeof c=="object"&&typeof c.then=="function"){var h=SP(c,a);ad(e,t,h,ba(e))}else ad(e,t,a,ba(e))}catch(d){ad(e,t,{then:function(){},status:"rejected",reason:d},ba())}finally{ht.p=i,qe.T=o}}function jP(){}function Y0(e,t,n,a){if(e.tag!==5)throw Error(ce(476));var s=TD(e).queue;ED(e,s,t,Ji,n===null?jP:function(){return CD(e),n(a)})}function TD(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:Ji,baseState:Ji,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ys,lastRenderedState:Ji},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ys,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function CD(e){var t=TD(e).next.queue;ad(e,t,{},ba())}function BN(){return kn(Ed)}function AD(){return nn().memoizedState}function jD(){return nn().memoizedState}function kP(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=ba();e=li(n);var a=ci(t,e,n);a!==null&&(xa(a,t,n),ed(a,t,n)),t={cache:CN()},e.payload=t;return}t=t.return}}function _P(e,t,n){var a=ba();n={lane:a,revertLane:0,action:n,hasEagerState:!1,eagerState:null,next:null},sp(e)?_D(t,n):(n=NN(e,t,n,a),n!==null&&(xa(n,e,a),RD(n,t,a)))}function kD(e,t,n){var a=ba();ad(e,t,n,a)}function ad(e,t,n,a){var s={lane:a,revertLane:0,action:n,hasEagerState:!1,eagerState:null,next:null};if(sp(e))_D(t,s);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var o=t.lastRenderedState,l=i(o,n);if(s.hasEagerState=!0,s.eagerState=l,va(l,o))return tp(e,t,s,0),Rt===null&&ep(),!1}catch{}finally{}if(n=NN(e,t,s,a),n!==null)return xa(n,e,a),RD(n,t,a),!0}return!1}function zN(e,t,n,a){if(a={lane:2,revertLane:XN(),action:a,hasEagerState:!1,eagerState:null,next:null},sp(e)){if(t)throw Error(ce(479))}else t=NN(e,n,a,2),t!==null&&xa(t,e,2)}function sp(e){var t=e.alternate;return e===Je||t!==null&&t===Je}function _D(e,t){yl=Qh=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function RD(e,t,n){if(n&4194048){var a=t.lanes;a&=e.pendingLanes,n|=a,t.lanes=n,wO(e,n)}}var ef={readContext:kn,use:ap,useCallback:Zt,useContext:Zt,useEffect:Zt,useImperativeHandle:Zt,useLayoutEffect:Zt,useInsertionEffect:Zt,useMemo:Zt,useReducer:Zt,useRef:Zt,useState:Zt,useDebugValue:Zt,useDeferredValue:Zt,useTransition:Zt,useSyncExternalStore:Zt,useId:Zt,useHostTransitionStatus:Zt,useFormState:Zt,useActionState:Zt,useOptimistic:Zt,useMemoCache:Zt,useCacheRefresh:Zt},OD={readContext:kn,use:ap,useCallback:function(e,t){return Hn().memoizedState=[e,t===void 0?null:t],e},useContext:kn,useEffect:fE,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,Nh(4194308,4,yD.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Nh(4194308,4,e,t)},useInsertionEffect:function(e,t){Nh(4,2,e,t)},useMemo:function(e,t){var n=Hn();t=t===void 0?null:t;var a=e();if(ho){ti(!0);try{e()}finally{ti(!1)}}return n.memoizedState=[a,t],a},useReducer:function(e,t,n){var a=Hn();if(n!==void 0){var s=n(t);if(ho){ti(!0);try{n(t)}finally{ti(!1)}}}else s=t;return a.memoizedState=a.baseState=s,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:s},a.queue=e,e=e.dispatch=_P.bind(null,Je,e),[a.memoizedState,e]},useRef:function(e){var t=Hn();return e={current:e},t.memoizedState=e},useState:function(e){e=G0(e);var t=e.queue,n=kD.bind(null,Je,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:PN,useDeferredValue:function(e,t){var n=Hn();return FN(n,e,t)},useTransition:function(){var e=G0(!1);return e=ED.bind(null,Je,e.queue,!0,!1),Hn().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var a=Je,s=Hn();if(ut){if(n===void 0)throw Error(ce(407));n=n()}else{if(n=t(),Rt===null)throw Error(ce(349));ot&124||sD(a,t,n)}s.memoizedState=n;var i={value:n,getSnapshot:t};return s.queue=i,fE(oD.bind(null,a,i,e),[e]),a.flags|=2048,Ml(9,rp(),iD.bind(null,a,i,n,t),null),n},useId:function(){var e=Hn(),t=Rt.identifierPrefix;if(ut){var n=ls,a=os;n=(a&~(1<<32-ga(a)-1)).toString(32)+n,t="«"+t+"R"+n,n=Jh++,0<n&&(t+="H"+n.toString(32)),t+="»"}else n=EP++,t="«"+t+"r"+n.toString(32)+"»";return e.memoizedState=t},useHostTransitionStatus:BN,useFormState:dE,useActionState:dE,useOptimistic:function(e){var t=Hn();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=zN.bind(null,Je,!0,n),n.dispatch=t,[e,t]},useMemoCache:LN,useCacheRefresh:function(){return Hn().memoizedState=kP.bind(null,Je)}},DD={readContext:kn,use:ap,useCallback:wD,useContext:kn,useEffect:gD,useImperativeHandle:vD,useInsertionEffect:bD,useLayoutEffect:xD,useMemo:ND,useReducer:wh,useRef:mD,useState:function(){return wh(ys)},useDebugValue:PN,useDeferredValue:function(e,t){var n=nn();return SD(n,Nt.memoizedState,e,t)},useTransition:function(){var e=wh(ys)[0],t=nn().memoizedState;return[typeof e=="boolean"?e:ru(e),t]},useSyncExternalStore:rD,useId:AD,useHostTransitionStatus:BN,useFormState:uE,useActionState:uE,useOptimistic:function(e,t){var n=nn();return dD(n,Nt,e,t)},useMemoCache:LN,useCacheRefresh:jD},RP={readContext:kn,use:ap,useCallback:wD,useContext:kn,useEffect:gD,useImperativeHandle:vD,useInsertionEffect:bD,useLayoutEffect:xD,useMemo:ND,useReducer:hm,useRef:mD,useState:function(){return hm(ys)},useDebugValue:PN,useDeferredValue:function(e,t){var n=nn();return Nt===null?FN(n,e,t):SD(n,Nt.memoizedState,e,t)},useTransition:function(){var e=hm(ys)[0],t=nn().memoizedState;return[typeof e=="boolean"?e:ru(e),t]},useSyncExternalStore:rD,useId:AD,useHostTransitionStatus:BN,useFormState:hE,useActionState:hE,useOptimistic:function(e,t){var n=nn();return Nt!==null?dD(n,Nt,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:LN,useCacheRefresh:jD},wl=null,vd=0;function Uu(e){var t=vd;return vd+=1,wl===null&&(wl=[]),JO(wl,e,t)}function wc(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Pu(e,t){throw t.$$typeof===o6?Error(ce(525)):(e=Object.prototype.toString.call(t),Error(ce(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function pE(e){var t=e._init;return t(e._payload)}function ID(e){function t(b,y){if(e){var g=b.deletions;g===null?(b.deletions=[y],b.flags|=16):g.push(y)}}function n(b,y){if(!e)return null;for(;y!==null;)t(b,y),y=y.sibling;return null}function a(b){for(var y=new Map;b!==null;)b.key!==null?y.set(b.key,b):y.set(b.index,b),b=b.sibling;return y}function s(b,y){return b=ms(b,y),b.index=0,b.sibling=null,b}function i(b,y,g){return b.index=g,e?(g=b.alternate,g!==null?(g=g.index,g<y?(b.flags|=67108866,y):g):(b.flags|=67108866,y)):(b.flags|=1048576,y)}function o(b){return e&&b.alternate===null&&(b.flags|=67108866),b}function l(b,y,g,w){return y===null||y.tag!==6?(y=cm(g,b.mode,w),y.return=b,y):(y=s(y,g),y.return=b,y)}function c(b,y,g,w){var S=g.type;return S===Jo?h(b,y,g.props.children,w,g.key):y!==null&&(y.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===Ys&&pE(S)===y.type)?(y=s(y,g.props),wc(y,g),y.return=b,y):(y=yh(g.type,g.key,g.props,null,b.mode,w),wc(y,g),y.return=b,y)}function u(b,y,g,w){return y===null||y.tag!==4||y.stateNode.containerInfo!==g.containerInfo||y.stateNode.implementation!==g.implementation?(y=dm(g,b.mode,w),y.return=b,y):(y=s(y,g.children||[]),y.return=b,y)}function h(b,y,g,w,S){return y===null||y.tag!==7?(y=eo(g,b.mode,w,S),y.return=b,y):(y=s(y,g),y.return=b,y)}function d(b,y,g){if(typeof y=="string"&&y!==""||typeof y=="number"||typeof y=="bigint")return y=cm(""+y,b.mode,g),y.return=b,y;if(typeof y=="object"&&y!==null){switch(y.$$typeof){case _u:return g=yh(y.type,y.key,y.props,null,b.mode,g),wc(g,y),g.return=b,g;case Fc:return y=dm(y,b.mode,g),y.return=b,y;case Ys:var w=y._init;return y=w(y._payload),d(b,y,g)}if(Bc(y)||bc(y))return y=eo(y,b.mode,g,null),y.return=b,y;if(typeof y.then=="function")return d(b,Uu(y),g);if(y.$$typeof===is)return d(b,Mu(b,y),g);Pu(b,y)}return null}function f(b,y,g,w){var S=y!==null?y.key:null;if(typeof g=="string"&&g!==""||typeof g=="number"||typeof g=="bigint")return S!==null?null:l(b,y,""+g,w);if(typeof g=="object"&&g!==null){switch(g.$$typeof){case _u:return g.key===S?c(b,y,g,w):null;case Fc:return g.key===S?u(b,y,g,w):null;case Ys:return S=g._init,g=S(g._payload),f(b,y,g,w)}if(Bc(g)||bc(g))return S!==null?null:h(b,y,g,w,null);if(typeof g.then=="function")return f(b,y,Uu(g),w);if(g.$$typeof===is)return f(b,y,Mu(b,g),w);Pu(b,g)}return null}function p(b,y,g,w,S){if(typeof w=="string"&&w!==""||typeof w=="number"||typeof w=="bigint")return b=b.get(g)||null,l(y,b,""+w,S);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case _u:return b=b.get(w.key===null?g:w.key)||null,c(y,b,w,S);case Fc:return b=b.get(w.key===null?g:w.key)||null,u(y,b,w,S);case Ys:var C=w._init;return w=C(w._payload),p(b,y,g,w,S)}if(Bc(w)||bc(w))return b=b.get(g)||null,h(y,b,w,S,null);if(typeof w.then=="function")return p(b,y,g,Uu(w),S);if(w.$$typeof===is)return p(b,y,g,Mu(y,w),S);Pu(y,w)}return null}function v(b,y,g,w){for(var S=null,C=null,T=y,E=y=0,k=null;T!==null&&E<g.length;E++){T.index>E?(k=T,T=null):k=T.sibling;var O=f(b,T,g[E],w);if(O===null){T===null&&(T=k);break}e&&T&&O.alternate===null&&t(b,T),y=i(O,y,E),C===null?S=O:C.sibling=O,C=O,T=k}if(E===g.length)return n(b,T),ut&&qi(b,E),S;if(T===null){for(;E<g.length;E++)T=d(b,g[E],w),T!==null&&(y=i(T,y,E),C===null?S=T:C.sibling=T,C=T);return ut&&qi(b,E),S}for(T=a(T);E<g.length;E++)k=p(T,b,E,g[E],w),k!==null&&(e&&k.alternate!==null&&T.delete(k.key===null?E:k.key),y=i(k,y,E),C===null?S=k:C.sibling=k,C=k);return e&&T.forEach(function(R){return t(b,R)}),ut&&qi(b,E),S}function x(b,y,g,w){if(g==null)throw Error(ce(151));for(var S=null,C=null,T=y,E=y=0,k=null,O=g.next();T!==null&&!O.done;E++,O=g.next()){T.index>E?(k=T,T=null):k=T.sibling;var R=f(b,T,O.value,w);if(R===null){T===null&&(T=k);break}e&&T&&R.alternate===null&&t(b,T),y=i(R,y,E),C===null?S=R:C.sibling=R,C=R,T=k}if(O.done)return n(b,T),ut&&qi(b,E),S;if(T===null){for(;!O.done;E++,O=g.next())O=d(b,O.value,w),O!==null&&(y=i(O,y,E),C===null?S=O:C.sibling=O,C=O);return ut&&qi(b,E),S}for(T=a(T);!O.done;E++,O=g.next())O=p(T,b,E,O.value,w),O!==null&&(e&&O.alternate!==null&&T.delete(O.key===null?E:O.key),y=i(O,y,E),C===null?S=O:C.sibling=O,C=O);return e&&T.forEach(function(I){return t(b,I)}),ut&&qi(b,E),S}function N(b,y,g,w){if(typeof g=="object"&&g!==null&&g.type===Jo&&g.key===null&&(g=g.props.children),typeof g=="object"&&g!==null){switch(g.$$typeof){case _u:e:{for(var S=g.key;y!==null;){if(y.key===S){if(S=g.type,S===Jo){if(y.tag===7){n(b,y.sibling),w=s(y,g.props.children),w.return=b,b=w;break e}}else if(y.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===Ys&&pE(S)===y.type){n(b,y.sibling),w=s(y,g.props),wc(w,g),w.return=b,b=w;break e}n(b,y);break}else t(b,y);y=y.sibling}g.type===Jo?(w=eo(g.props.children,b.mode,w,g.key),w.return=b,b=w):(w=yh(g.type,g.key,g.props,null,b.mode,w),wc(w,g),w.return=b,b=w)}return o(b);case Fc:e:{for(S=g.key;y!==null;){if(y.key===S)if(y.tag===4&&y.stateNode.containerInfo===g.containerInfo&&y.stateNode.implementation===g.implementation){n(b,y.sibling),w=s(y,g.children||[]),w.return=b,b=w;break e}else{n(b,y);break}else t(b,y);y=y.sibling}w=dm(g,b.mode,w),w.return=b,b=w}return o(b);case Ys:return S=g._init,g=S(g._payload),N(b,y,g,w)}if(Bc(g))return v(b,y,g,w);if(bc(g)){if(S=bc(g),typeof S!="function")throw Error(ce(150));return g=S.call(g),x(b,y,g,w)}if(typeof g.then=="function")return N(b,y,Uu(g),w);if(g.$$typeof===is)return N(b,y,Mu(b,g),w);Pu(b,g)}return typeof g=="string"&&g!==""||typeof g=="number"||typeof g=="bigint"?(g=""+g,y!==null&&y.tag===6?(n(b,y.sibling),w=s(y,g),w.return=b,b=w):(n(b,y),w=cm(g,b.mode,w),w.return=b,b=w),o(b)):n(b,y)}return function(b,y,g,w){try{vd=0;var S=N(b,y,g,w);return wl=null,S}catch(T){if(T===au||T===np)throw T;var C=fa(29,T,null,b.mode);return C.lanes=w,C.return=b,C}finally{}}}var Ll=ID(!0),MD=ID(!1),Ha=Pr(null),Dr=null;function Zs(e){var t=e.alternate;Ft(hn,hn.current&1),Ft(Ha,e),Dr===null&&(t===null||Il.current!==null||t.memoizedState!==null)&&(Dr=e)}function LD(e){if(e.tag===22){if(Ft(hn,hn.current),Ft(Ha,e),Dr===null){var t=e.alternate;t!==null&&t.memoizedState!==null&&(Dr=e)}}else Qs()}function Qs(){Ft(hn,hn.current),Ft(Ha,Ha.current)}function ds(e){vn(Ha),Dr===e&&(Dr=null),vn(hn)}var hn=Pr(0);function tf(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||dw(n)))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}function fm(e,t,n,a){t=e.memoizedState,n=n(a,t),n=n==null?t:Lt({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var W0={enqueueSetState:function(e,t,n){e=e._reactInternals;var a=ba(),s=li(a);s.payload=t,n!=null&&(s.callback=n),t=ci(e,s,a),t!==null&&(xa(t,e,a),ed(t,e,a))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var a=ba(),s=li(a);s.tag=1,s.payload=t,n!=null&&(s.callback=n),t=ci(e,s,a),t!==null&&(xa(t,e,a),ed(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=ba(),a=li(n);a.tag=2,t!=null&&(a.callback=t),t=ci(e,a,n),t!==null&&(xa(t,e,n),ed(t,e,n))}};function mE(e,t,n,a,s,i,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,i,o):t.prototype&&t.prototype.isPureReactComponent?!bd(n,a)||!bd(s,i):!0}function gE(e,t,n,a){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,a),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,a),t.state!==e&&W0.enqueueReplaceState(t,t.state,null)}function fo(e,t){var n=t;if("ref"in t){n={};for(var a in t)a!=="ref"&&(n[a]=t[a])}if(e=e.defaultProps){n===t&&(n=Lt({},n));for(var s in e)n[s]===void 0&&(n[s]=e[s])}return n}var nf=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)};function UD(e){nf(e)}function PD(e){console.error(e)}function FD(e){nf(e)}function af(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function bE(e,t,n){try{var a=e.onCaughtError;a(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(s){setTimeout(function(){throw s})}}function X0(e,t,n){return n=li(n),n.tag=3,n.payload={element:null},n.callback=function(){af(e,t)},n}function BD(e){return e=li(e),e.tag=3,e}function zD(e,t,n,a){var s=n.type.getDerivedStateFromError;if(typeof s=="function"){var i=a.value;e.payload=function(){return s(i)},e.callback=function(){bE(t,n,a)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch=="function"&&(e.callback=function(){bE(t,n,a),typeof s!="function"&&(di===null?di=new Set([this]):di.add(this));var l=a.stack;this.componentDidCatch(a.value,{componentStack:l!==null?l:""})})}function OP(e,t,n,a,s){if(n.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=n.alternate,t!==null&&tu(t,n,s,!0),n=Ha.current,n!==null){switch(n.tag){case 13:return Dr===null?aw():n.alternate===null&&Yt===0&&(Yt=3),n.flags&=-257,n.flags|=65536,n.lanes=s,a===z0?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([a]):t.add(a),Em(e,a,s)),!1;case 22:return n.flags|=65536,a===z0?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([a])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([a]):n.add(a)),Em(e,a,s)),!1}throw Error(ce(435,n.tag))}return Em(e,a,s),aw(),!1}if(ut)return t=Ha.current,t!==null?(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=s,a!==L0&&(e=Error(ce(422),{cause:a}),xd(za(e,n)))):(a!==L0&&(t=Error(ce(423),{cause:a}),xd(za(t,n))),e=e.current.alternate,e.flags|=65536,s&=-s,e.lanes|=s,a=za(a,n),s=X0(e.stateNode,a,s),um(e,s),Yt!==4&&(Yt=2)),!1;var i=Error(ce(520),{cause:a});if(i=za(i,n),id===null?id=[i]:id.push(i),Yt!==4&&(Yt=2),t===null)return!0;a=za(a,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=s&-s,n.lanes|=e,e=X0(n.stateNode,a,e),um(n,e),!1;case 1:if(t=n.type,i=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||i!==null&&typeof i.componentDidCatch=="function"&&(di===null||!di.has(i))))return n.flags|=65536,s&=-s,n.lanes|=s,s=BD(s),zD(s,e,n,a),um(n,s),!1}n=n.return}while(n!==null);return!1}var $D=Error(ce(461)),yn=!1;function Nn(e,t,n,a){t.child=e===null?MD(t,null,n,a):Ll(t,e.child,n,a)}function xE(e,t,n,a,s){n=n.render;var i=t.ref;if("ref"in a){var o={};for(var l in a)l!=="ref"&&(o[l]=a[l])}else o=a;return uo(t),a=RN(e,t,n,o,i,s),l=ON(),e!==null&&!yn?(DN(e,t,s),vs(e,t,s)):(ut&&l&&EN(t),t.flags|=1,Nn(e,t,a,s),t.child)}function yE(e,t,n,a,s){if(e===null){var i=n.type;return typeof i=="function"&&!SN(i)&&i.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=i,HD(e,t,i,a,s)):(e=yh(n.type,null,a,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!$N(e,s)){var o=i.memoizedProps;if(n=n.compare,n=n!==null?n:bd,n(o,a)&&e.ref===t.ref)return vs(e,t,s)}return t.flags|=1,e=ms(i,a),e.ref=t.ref,e.return=t,t.child=e}function HD(e,t,n,a,s){if(e!==null){var i=e.memoizedProps;if(bd(i,a)&&e.ref===t.ref)if(yn=!1,t.pendingProps=a=i,$N(e,s))e.flags&131072&&(yn=!0);else return t.lanes=e.lanes,vs(e,t,s)}return K0(e,t,n,a,s)}function qD(e,t,n){var a=t.pendingProps,s=a.children,i=e!==null?e.memoizedState:null;if(a.mode==="hidden"){if(t.flags&128){if(a=i!==null?i.baseLanes|n:n,e!==null){for(s=t.child=e.child,i=0;s!==null;)i=i|s.lanes|s.childLanes,s=s.sibling;t.childLanes=i&~a}else t.childLanes=0,t.child=null;return vE(e,t,a,n)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&vh(t,i!==null?i.cachePool:null),i!==null?oE(t,i):q0(),LD(t);else return t.lanes=t.childLanes=536870912,vE(e,t,i!==null?i.baseLanes|n:n,n)}else i!==null?(vh(t,i.cachePool),oE(t,i),Qs(),t.memoizedState=null):(e!==null&&vh(t,null),q0(),Qs());return Nn(e,t,s,n),t.child}function vE(e,t,n,a){var s=AN();return s=s===null?null:{parent:dn._currentValue,pool:s},t.memoizedState={baseLanes:n,cachePool:s},e!==null&&vh(t,null),q0(),LD(t),e!==null&&tu(e,t,a,!0),null}function Sh(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(ce(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function K0(e,t,n,a,s){return uo(t),n=RN(e,t,n,a,void 0,s),a=ON(),e!==null&&!yn?(DN(e,t,s),vs(e,t,s)):(ut&&a&&EN(t),t.flags|=1,Nn(e,t,n,s),t.child)}function wE(e,t,n,a,s,i){return uo(t),t.updateQueue=null,n=aD(t,a,n,s),nD(e),a=ON(),e!==null&&!yn?(DN(e,t,i),vs(e,t,i)):(ut&&a&&EN(t),t.flags|=1,Nn(e,t,n,i),t.child)}function NE(e,t,n,a,s){if(uo(t),t.stateNode===null){var i=ol,o=n.contextType;typeof o=="object"&&o!==null&&(i=kn(o)),i=new n(a,i),t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=W0,t.stateNode=i,i._reactInternals=t,i=t.stateNode,i.props=a,i.state=t.memoizedState,i.refs={},jN(t),o=n.contextType,i.context=typeof o=="object"&&o!==null?kn(o):ol,i.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o=="function"&&(fm(t,n,o,a),i.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(o=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),o!==i.state&&W0.enqueueReplaceState(i,i.state,null),nd(t,a,i,s),td(),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308),a=!0}else if(e===null){i=t.stateNode;var l=t.memoizedProps,c=fo(n,l);i.props=c;var u=i.context,h=n.contextType;o=ol,typeof h=="object"&&h!==null&&(o=kn(h));var d=n.getDerivedStateFromProps;h=typeof d=="function"||typeof i.getSnapshotBeforeUpdate=="function",l=t.pendingProps!==l,h||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(l||u!==o)&&gE(t,i,a,o),Ws=!1;var f=t.memoizedState;i.state=f,nd(t,a,i,s),td(),u=t.memoizedState,l||f!==u||Ws?(typeof d=="function"&&(fm(t,n,d,a),u=t.memoizedState),(c=Ws||mE(t,n,c,a,f,u,o))?(h||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=a,t.memoizedState=u),i.props=a,i.state=u,i.context=o,a=c):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{i=t.stateNode,$0(e,t),o=t.memoizedProps,h=fo(n,o),i.props=h,d=t.pendingProps,f=i.context,u=n.contextType,c=ol,typeof u=="object"&&u!==null&&(c=kn(u)),l=n.getDerivedStateFromProps,(u=typeof l=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(o!==d||f!==c)&&gE(t,i,a,c),Ws=!1,f=t.memoizedState,i.state=f,nd(t,a,i,s),td();var p=t.memoizedState;o!==d||f!==p||Ws||e!==null&&e.dependencies!==null&&Kh(e.dependencies)?(typeof l=="function"&&(fm(t,n,l,a),p=t.memoizedState),(h=Ws||mE(t,n,h,a,f,p,c)||e!==null&&e.dependencies!==null&&Kh(e.dependencies))?(u||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(a,p,c),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(a,p,c)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=p),i.props=a,i.state=p,i.context=c,a=h):(typeof i.componentDidUpdate!="function"||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),a=!1)}return i=a,Sh(e,t),a=(t.flags&128)!==0,i||a?(i=t.stateNode,n=a&&typeof n.getDerivedStateFromError!="function"?null:i.render(),t.flags|=1,e!==null&&a?(t.child=Ll(t,e.child,null,s),t.child=Ll(t,null,n,s)):Nn(e,t,n,s),t.memoizedState=i.state,e=t.child):e=vs(e,t,s),e}function SE(e,t,n,a){return eu(),t.flags|=256,Nn(e,t,n,a),t.child}var pm={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function mm(e){return{baseLanes:e,cachePool:ZO()}}function gm(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=$a),e}function GD(e,t,n){var a=t.pendingProps,s=!1,i=(t.flags&128)!==0,o;if((o=i)||(o=e!==null&&e.memoizedState===null?!1:(hn.current&2)!==0),o&&(s=!0,t.flags&=-129),o=(t.flags&32)!==0,t.flags&=-33,e===null){if(ut){if(s?Zs(t):Qs(),ut){var l=Gt,c;if(c=l){e:{for(c=l,l=Cr;c.nodeType!==8;){if(!l){l=null;break e}if(c=sr(c.nextSibling),c===null){l=null;break e}}l=c}l!==null?(t.memoizedState={dehydrated:l,treeContext:to!==null?{id:os,overflow:ls}:null,retryLane:536870912,hydrationErrors:null},c=fa(18,null,null,0),c.stateNode=l,c.return=t,t.child=c,In=t,Gt=null,c=!0):c=!1}c||co(t)}if(l=t.memoizedState,l!==null&&(l=l.dehydrated,l!==null))return dw(l)?t.lanes=32:t.lanes=536870912,null;ds(t)}return l=a.children,a=a.fallback,s?(Qs(),s=t.mode,l=rf({mode:"hidden",children:l},s),a=eo(a,s,n,null),l.return=t,a.return=t,l.sibling=a,t.child=l,s=t.child,s.memoizedState=mm(n),s.childLanes=gm(e,o,n),t.memoizedState=pm,a):(Zs(t),Z0(t,l))}if(c=e.memoizedState,c!==null&&(l=c.dehydrated,l!==null)){if(i)t.flags&256?(Zs(t),t.flags&=-257,t=bm(e,t,n)):t.memoizedState!==null?(Qs(),t.child=e.child,t.flags|=128,t=null):(Qs(),s=a.fallback,l=t.mode,a=rf({mode:"visible",children:a.children},l),s=eo(s,l,n,null),s.flags|=2,a.return=t,s.return=t,a.sibling=s,t.child=a,Ll(t,e.child,null,n),a=t.child,a.memoizedState=mm(n),a.childLanes=gm(e,o,n),t.memoizedState=pm,t=s);else if(Zs(t),dw(l)){if(o=l.nextSibling&&l.nextSibling.dataset,o)var u=o.dgst;o=u,a=Error(ce(419)),a.stack="",a.digest=o,xd({value:a,source:null,stack:null}),t=bm(e,t,n)}else if(yn||tu(e,t,n,!1),o=(n&e.childLanes)!==0,yn||o){if(o=Rt,o!==null&&(a=n&-n,a=a&42?1:hN(a),a=a&(o.suspendedLanes|n)?0:a,a!==0&&a!==c.retryLane))throw c.retryLane=a,rc(e,a),xa(o,e,a),$D;l.data==="$?"||aw(),t=bm(e,t,n)}else l.data==="$?"?(t.flags|=192,t.child=e.child,t=null):(e=c.treeContext,Gt=sr(l.nextSibling),In=t,ut=!0,no=null,Cr=!1,e!==null&&(Ma[La++]=os,Ma[La++]=ls,Ma[La++]=to,os=e.id,ls=e.overflow,to=t),t=Z0(t,a.children),t.flags|=4096);return t}return s?(Qs(),s=a.fallback,l=t.mode,c=e.child,u=c.sibling,a=ms(c,{mode:"hidden",children:a.children}),a.subtreeFlags=c.subtreeFlags&65011712,u!==null?s=ms(u,s):(s=eo(s,l,n,null),s.flags|=2),s.return=t,a.return=t,a.sibling=s,t.child=a,a=s,s=t.child,l=e.child.memoizedState,l===null?l=mm(n):(c=l.cachePool,c!==null?(u=dn._currentValue,c=c.parent!==u?{parent:u,pool:u}:c):c=ZO(),l={baseLanes:l.baseLanes|n,cachePool:c}),s.memoizedState=l,s.childLanes=gm(e,o,n),t.memoizedState=pm,a):(Zs(t),n=e.child,e=n.sibling,n=ms(n,{mode:"visible",children:a.children}),n.return=t,n.sibling=null,e!==null&&(o=t.deletions,o===null?(t.deletions=[e],t.flags|=16):o.push(e)),t.child=n,t.memoizedState=null,n)}function Z0(e,t){return t=rf({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function rf(e,t){return e=fa(22,e,null,t),e.lanes=0,e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},e}function bm(e,t,n){return Ll(t,e.child,null,n),e=Z0(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function EE(e,t,n){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),P0(e.return,t,n)}function xm(e,t,n,a,s){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:n,tailMode:s}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=a,i.tail=n,i.tailMode=s)}function VD(e,t,n){var a=t.pendingProps,s=a.revealOrder,i=a.tail;if(Nn(e,t,a.children,n),a=hn.current,a&2)a=a&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&&EE(e,n,t);else if(e.tag===19)EE(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}a&=1}switch(Ft(hn,a),s){case"forwards":for(n=t.child,s=null;n!==null;)e=n.alternate,e!==null&&tf(e)===null&&(s=n),n=n.sibling;n=s,n===null?(s=t.child,t.child=null):(s=n.sibling,n.sibling=null),xm(t,!1,s,n,i);break;case"backwards":for(n=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&tf(e)===null){t.child=s;break}e=s.sibling,s.sibling=n,n=s,s=e}xm(t,!0,n,null,i);break;case"together":xm(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function vs(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Ni|=t.lanes,!(n&t.childLanes))if(e!==null){if(tu(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(ce(153));if(t.child!==null){for(e=t.child,n=ms(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ms(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function $N(e,t){return e.lanes&t?!0:(e=e.dependencies,!!(e!==null&&Kh(e)))}function DP(e,t,n){switch(t.tag){case 3:$h(t,t.stateNode.containerInfo),Ks(t,dn,e.memoizedState.cache),eu();break;case 27:case 5:C0(t);break;case 4:$h(t,t.stateNode.containerInfo);break;case 10:Ks(t,t.type,t.memoizedProps.value);break;case 13:var a=t.memoizedState;if(a!==null)return a.dehydrated!==null?(Zs(t),t.flags|=128,null):n&t.child.childLanes?GD(e,t,n):(Zs(t),e=vs(e,t,n),e!==null?e.sibling:null);Zs(t);break;case 19:var s=(e.flags&128)!==0;if(a=(n&t.childLanes)!==0,a||(tu(e,t,n,!1),a=(n&t.childLanes)!==0),s){if(a)return VD(e,t,n);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),Ft(hn,hn.current),a)break;return null;case 22:case 23:return t.lanes=0,qD(e,t,n);case 24:Ks(t,dn,e.memoizedState.cache)}return vs(e,t,n)}function YD(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)yn=!0;else{if(!$N(e,n)&&!(t.flags&128))return yn=!1,DP(e,t,n);yn=!!(e.flags&131072)}else yn=!1,ut&&t.flags&1048576&&XO(t,Xh,t.index);switch(t.lanes=0,t.tag){case 16:e:{e=t.pendingProps;var a=t.elementType,s=a._init;if(a=s(a._payload),t.type=a,typeof a=="function")SN(a)?(e=fo(a,e),t.tag=1,t=NE(null,t,a,e,n)):(t.tag=0,t=K0(null,t,a,e,n));else{if(a!=null){if(s=a.$$typeof,s===cN){t.tag=11,t=xE(null,t,a,e,n);break e}else if(s===dN){t.tag=14,t=yE(null,t,a,e,n);break e}}throw t=E0(a)||a,Error(ce(306,t,""))}}return t;case 0:return K0(e,t,t.type,t.pendingProps,n);case 1:return a=t.type,s=fo(a,t.pendingProps),NE(e,t,a,s,n);case 3:e:{if($h(t,t.stateNode.containerInfo),e===null)throw Error(ce(387));a=t.pendingProps;var i=t.memoizedState;s=i.element,$0(e,t),nd(t,a,null,n);var o=t.memoizedState;if(a=o.cache,Ks(t,dn,a),a!==i.cache&&F0(t,[dn],n,!0),td(),a=o.element,i.isDehydrated)if(i={element:a,isDehydrated:!1,cache:o.cache},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){t=SE(e,t,a,n);break e}else if(a!==s){s=za(Error(ce(424)),t),xd(s),t=SE(e,t,a,n);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(Gt=sr(e.firstChild),In=t,ut=!0,no=null,Cr=!0,n=MD(t,null,a,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(eu(),a===s){t=vs(e,t,n);break e}Nn(e,t,a,n)}t=t.child}return t;case 26:return Sh(e,t),e===null?(n=zE(t.type,null,t.pendingProps,null))?t.memoizedState=n:ut||(n=t.type,e=t.pendingProps,a=hf(oi.current).createElement(n),a[jn]=t,a[Xn]=e,En(a,n,e),xn(a),t.stateNode=a):t.memoizedState=zE(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return C0(t),e===null&&ut&&(a=t.stateNode=D4(t.type,t.pendingProps,oi.current),In=t,Cr=!0,s=Gt,_i(t.type)?(uw=s,Gt=sr(a.firstChild)):Gt=s),Nn(e,t,t.pendingProps.children,n),Sh(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&ut&&((s=a=Gt)&&(a=oF(a,t.type,t.pendingProps,Cr),a!==null?(t.stateNode=a,In=t,Gt=sr(a.firstChild),Cr=!1,s=!0):s=!1),s||co(t)),C0(t),s=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,a=i.children,lw(s,i)?a=null:o!==null&&lw(s,o)&&(t.flags|=32),t.memoizedState!==null&&(s=RN(e,t,TP,null,null,n),Ed._currentValue=s),Sh(e,t),Nn(e,t,a,n),t.child;case 6:return e===null&&ut&&((e=n=Gt)&&(n=lF(n,t.pendingProps,Cr),n!==null?(t.stateNode=n,In=t,Gt=null,e=!0):e=!1),e||co(t)),null;case 13:return GD(e,t,n);case 4:return $h(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=Ll(t,null,a,n):Nn(e,t,a,n),t.child;case 11:return xE(e,t,t.type,t.pendingProps,n);case 7:return Nn(e,t,t.pendingProps,n),t.child;case 8:return Nn(e,t,t.pendingProps.children,n),t.child;case 12:return Nn(e,t,t.pendingProps.children,n),t.child;case 10:return a=t.pendingProps,Ks(t,t.type,a.value),Nn(e,t,a.children,n),t.child;case 9:return s=t.type._context,a=t.pendingProps.children,uo(t),s=kn(s),a=a(s),t.flags|=1,Nn(e,t,a,n),t.child;case 14:return yE(e,t,t.type,t.pendingProps,n);case 15:return HD(e,t,t.type,t.pendingProps,n);case 19:return VD(e,t,n);case 31:return a=t.pendingProps,n=t.mode,a={mode:a.mode,children:a.children},e===null?(n=rf(a,n),n.ref=t.ref,t.child=n,n.return=t,t=n):(n=ms(e.child,a),n.ref=t.ref,t.child=n,n.return=t,t=n),t;case 22:return qD(e,t,n);case 24:return uo(t),a=kn(dn),e===null?(s=AN(),s===null&&(s=Rt,i=CN(),s.pooledCache=i,i.refCount++,i!==null&&(s.pooledCacheLanes|=n),s=i),t.memoizedState={parent:a,cache:s},jN(t),Ks(t,dn,s)):(e.lanes&n&&($0(e,t),nd(t,null,null,n),td()),s=e.memoizedState,i=t.memoizedState,s.parent!==a?(s={parent:a,cache:a},t.memoizedState=s,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=s),Ks(t,dn,a)):(a=i.cache,Ks(t,dn,a),a!==s.cache&&F0(t,[dn],n,!0))),Nn(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(ce(156,t.tag))}function Jr(e){e.flags|=4}function TE(e,t){if(t.type!=="stylesheet"||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!L4(t)){if(t=Ha.current,t!==null&&((ot&4194048)===ot?Dr!==null:(ot&62914560)!==ot&&!(ot&536870912)||t!==Dr))throw Jc=z0,QO;e.flags|=8192}}function Fu(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?yO():536870912,e.lanes|=t,Ul|=t)}function Nc(e,t){if(!ut)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var a=null;n!==null;)n.alternate!==null&&(a=n),n=n.sibling;a===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:a.sibling=null}}function zt(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,a=0;if(t)for(var s=e.child;s!==null;)n|=s.lanes|s.childLanes,a|=s.subtreeFlags&65011712,a|=s.flags&65011712,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)n|=s.lanes|s.childLanes,a|=s.subtreeFlags,a|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=a,e.childLanes=n,t}function IP(e,t,n){var a=t.pendingProps;switch(TN(t),t.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return zt(t),null;case 1:return zt(t),null;case 3:return n=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),gs(dn),_l(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(vc(t)?Jr(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,tE())),zt(t),null;case 26:return n=t.memoizedState,e===null?(Jr(t),n!==null?(zt(t),TE(t,n)):(zt(t),t.flags&=-16777217)):n?n!==e.memoizedState?(Jr(t),zt(t),TE(t,n)):(zt(t),t.flags&=-16777217):(e.memoizedProps!==a&&Jr(t),zt(t),t.flags&=-16777217),null;case 27:Hh(t),n=oi.current;var s=t.type;if(e!==null&&t.stateNode!=null)e.memoizedProps!==a&&Jr(t);else{if(!a){if(t.stateNode===null)throw Error(ce(166));return zt(t),null}e=Rr.current,vc(t)?JS(t):(e=D4(s,a,n),t.stateNode=e,Jr(t))}return zt(t),null;case 5:if(Hh(t),n=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&Jr(t);else{if(!a){if(t.stateNode===null)throw Error(ce(166));return zt(t),null}if(e=Rr.current,vc(t))JS(t);else{switch(s=hf(oi.current),e){case 1:e=s.createElementNS("http://www.w3.org/2000/svg",n);break;case 2:e=s.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;default:switch(n){case"svg":e=s.createElementNS("http://www.w3.org/2000/svg",n);break;case"math":e=s.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;case"script":e=s.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild);break;case"select":e=typeof a.is=="string"?s.createElement("select",{is:a.is}):s.createElement("select"),a.multiple?e.multiple=!0:a.size&&(e.size=a.size);break;default:e=typeof a.is=="string"?s.createElement(n,{is:a.is}):s.createElement(n)}}e[jn]=t,e[Xn]=a;e:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)e.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break e;for(;s.sibling===null;){if(s.return===null||s.return===t)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=e;e:switch(En(e,n,a),n){case"button":case"input":case"select":case"textarea":e=!!a.autoFocus;break e;case"img":e=!0;break e;default:e=!1}e&&Jr(t)}}return zt(t),t.flags&=-16777217,null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&Jr(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(ce(166));if(e=oi.current,vc(t)){if(e=t.stateNode,n=t.memoizedProps,a=null,s=In,s!==null)switch(s.tag){case 27:case 5:a=s.memoizedProps}e[jn]=t,e=!!(e.nodeValue===n||a!==null&&a.suppressHydrationWarning===!0||_4(e.nodeValue,n)),e||co(t)}else e=hf(e).createTextNode(a),e[jn]=t,t.stateNode=e}return zt(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(s=vc(t),a!==null&&a.dehydrated!==null){if(e===null){if(!s)throw Error(ce(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(ce(317));s[jn]=t}else eu(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;zt(t),s=!1}else s=tE(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=s),s=!0;if(!s)return t.flags&256?(ds(t),t):(ds(t),null)}if(ds(t),t.flags&128)return t.lanes=n,t;if(n=a!==null,e=e!==null&&e.memoizedState!==null,n){a=t.child,s=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(s=a.alternate.memoizedState.cachePool.pool);var i=null;a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(i=a.memoizedState.cachePool.pool),i!==s&&(a.flags|=2048)}return n!==e&&n&&(t.child.flags|=8192),Fu(t,t.updateQueue),zt(t),null;case 4:return _l(),e===null&&KN(t.stateNode.containerInfo),zt(t),null;case 10:return gs(t.type),zt(t),null;case 19:if(vn(hn),s=t.memoizedState,s===null)return zt(t),null;if(a=(t.flags&128)!==0,i=s.rendering,i===null)if(a)Nc(s,!1);else{if(Yt!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=tf(e),i!==null){for(t.flags|=128,Nc(s,!1),e=i.updateQueue,t.updateQueue=e,Fu(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)WO(n,e),n=n.sibling;return Ft(hn,hn.current&1|2),t.child}e=e.sibling}s.tail!==null&&Or()>of&&(t.flags|=128,a=!0,Nc(s,!1),t.lanes=4194304)}else{if(!a)if(e=tf(i),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Fu(t,e),Nc(s,!0),s.tail===null&&s.tailMode==="hidden"&&!i.alternate&&!ut)return zt(t),null}else 2*Or()-s.renderingStartTime>of&&n!==536870912&&(t.flags|=128,a=!0,Nc(s,!1),t.lanes=4194304);s.isBackwards?(i.sibling=t.child,t.child=i):(e=s.last,e!==null?e.sibling=i:t.child=i,s.last=i)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=Or(),t.sibling=null,e=hn.current,Ft(hn,a?e&1|2:e&1),t):(zt(t),null);case 22:case 23:return ds(t),kN(),a=t.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?n&536870912&&!(t.flags&128)&&(zt(t),t.subtreeFlags&6&&(t.flags|=8192)):zt(t),n=t.updateQueue,n!==null&&Fu(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),a=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),a!==n&&(t.flags|=2048),e!==null&&vn(ao),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),gs(dn),zt(t),null;case 25:return null;case 30:return null}throw Error(ce(156,t.tag))}function MP(e,t){switch(TN(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return gs(dn),_l(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Hh(t),null;case 13:if(ds(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(ce(340));eu()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return vn(hn),null;case 4:return _l(),null;case 10:return gs(t.type),null;case 22:case 23:return ds(t),kN(),e!==null&&vn(ao),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return gs(dn),null;case 25:return null;default:return null}}function WD(e,t){switch(TN(t),t.tag){case 3:gs(dn),_l();break;case 26:case 27:case 5:Hh(t);break;case 4:_l();break;case 13:ds(t);break;case 19:vn(hn);break;case 10:gs(t.type);break;case 22:case 23:ds(t),kN(),e!==null&&vn(ao);break;case 24:gs(dn)}}function iu(e,t){try{var n=t.updateQueue,a=n!==null?n.lastEffect:null;if(a!==null){var s=a.next;n=s;do{if((n.tag&e)===e){a=void 0;var i=n.create,o=n.inst;a=i(),o.destroy=a}n=n.next}while(n!==s)}}catch(l){At(t,t.return,l)}}function wi(e,t,n){try{var a=t.updateQueue,s=a!==null?a.lastEffect:null;if(s!==null){var i=s.next;a=i;do{if((a.tag&e)===e){var o=a.inst,l=o.destroy;if(l!==void 0){o.destroy=void 0,s=t;var c=n,u=l;try{u()}catch(h){At(s,c,h)}}}a=a.next}while(a!==i)}}catch(h){At(t,t.return,h)}}function XD(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{tD(t,n)}catch(a){At(e,e.return,a)}}}function KD(e,t,n){n.props=fo(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(a){At(e,t,a)}}function rd(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var a=e.stateNode;break;case 30:a=e.stateNode;break;default:a=e.stateNode}typeof n=="function"?e.refCleanup=n(a):n.current=a}}catch(s){At(e,t,s)}}function jr(e,t){var n=e.ref,a=e.refCleanup;if(n!==null)if(typeof a=="function")try{a()}catch(s){At(e,t,s)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(s){At(e,t,s)}else n.current=null}function ZD(e){var t=e.type,n=e.memoizedProps,a=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&a.focus();break e;case"img":n.src?a.src=n.src:n.srcSet&&(a.srcset=n.srcSet)}}catch(s){At(e,e.return,s)}}function ym(e,t,n){try{var a=e.stateNode;nF(a,e.type,n,t),a[Xn]=t}catch(s){At(e,e.return,s)}}function QD(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&_i(e.type)||e.tag===4}function vm(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||QD(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.tag===27&&_i(e.type)||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 Q0(e,t,n){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=cp));else if(a!==4&&(a===27&&_i(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Q0(e,t,n),e=e.sibling;e!==null;)Q0(e,t,n),e=e.sibling}function sf(e,t,n){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(a!==4&&(a===27&&_i(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(sf(e,t,n),e=e.sibling;e!==null;)sf(e,t,n),e=e.sibling}function JD(e){var t=e.stateNode,n=e.memoizedProps;try{for(var a=e.type,s=t.attributes;s.length;)t.removeAttributeNode(s[0]);En(t,a,n),t[jn]=e,t[Xn]=n}catch(i){At(e,e.return,i)}}var rs=!1,Qt=!1,wm=!1,CE=typeof WeakSet=="function"?WeakSet:Set,bn=null;function LP(e,t){if(e=e.containerInfo,iw=gf,e=BO(e),vN(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var a=n.getSelection&&n.getSelection();if(a&&a.rangeCount!==0){n=a.anchorNode;var s=a.anchorOffset,i=a.focusNode;a=a.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var o=0,l=-1,c=-1,u=0,h=0,d=e,f=null;t:for(;;){for(var p;d!==n||s!==0&&d.nodeType!==3||(l=o+s),d!==i||a!==0&&d.nodeType!==3||(c=o+a),d.nodeType===3&&(o+=d.nodeValue.length),(p=d.firstChild)!==null;)f=d,d=p;for(;;){if(d===e)break t;if(f===n&&++u===s&&(l=o),f===i&&++h===a&&(c=o),(p=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=p}n=l===-1||c===-1?null:{start:l,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(ow={focusedElem:e,selectionRange:n},gf=!1,bn=t;bn!==null;)if(t=bn,e=t.child,(t.subtreeFlags&1024)!==0&&e!==null)e.return=t,bn=e;else for(;bn!==null;){switch(t=bn,i=t.alternate,e=t.flags,t.tag){case 0:break;case 11:case 15:break;case 1:if(e&1024&&i!==null){e=void 0,n=t,s=i.memoizedProps,i=i.memoizedState,a=n.stateNode;try{var v=fo(n.type,s,n.elementType===n.type);e=a.getSnapshotBeforeUpdate(v,i),a.__reactInternalSnapshotBeforeUpdate=e}catch(x){At(n,n.return,x)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)cw(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":cw(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(ce(163))}if(e=t.sibling,e!==null){e.return=t.return,bn=e;break}bn=t.return}}function e4(e,t,n){var a=n.flags;switch(n.tag){case 0:case 11:case 15:Us(e,n),a&4&&iu(5,n);break;case 1:if(Us(e,n),a&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(o){At(n,n.return,o)}else{var s=fo(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(s,t,e.__reactInternalSnapshotBeforeUpdate)}catch(o){At(n,n.return,o)}}a&64&&XD(n),a&512&&rd(n,n.return);break;case 3:if(Us(e,n),a&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{tD(e,t)}catch(o){At(n,n.return,o)}}break;case 27:t===null&&a&4&&JD(n);case 26:case 5:Us(e,n),t===null&&a&4&&ZD(n),a&512&&rd(n,n.return);break;case 12:Us(e,n);break;case 13:Us(e,n),a&4&&a4(e,n),a&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=GP.bind(null,n),cF(e,n))));break;case 22:if(a=n.memoizedState!==null||rs,!a){t=t!==null&&t.memoizedState!==null||Qt,s=rs;var i=Qt;rs=a,(Qt=t)&&!i?qs(e,n,(n.subtreeFlags&8772)!==0):Us(e,n),rs=s,Qt=i}break;case 30:break;default:Us(e,n)}}function t4(e){var t=e.alternate;t!==null&&(e.alternate=null,t4(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&pN(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Ut=null,qn=!1;function es(e,t,n){for(n=n.child;n!==null;)n4(e,t,n),n=n.sibling}function n4(e,t,n){if(ma&&typeof ma.onCommitFiberUnmount=="function")try{ma.onCommitFiberUnmount(Xd,n)}catch{}switch(n.tag){case 26:Qt||jr(n,t),es(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Qt||jr(n,t);var a=Ut,s=qn;_i(n.type)&&(Ut=n.stateNode,qn=!1),es(e,t,n),ld(n.stateNode),Ut=a,qn=s;break;case 5:Qt||jr(n,t);case 6:if(a=Ut,s=qn,Ut=null,es(e,t,n),Ut=a,qn=s,Ut!==null)if(qn)try{(Ut.nodeType===9?Ut.body:Ut.nodeName==="HTML"?Ut.ownerDocument.body:Ut).removeChild(n.stateNode)}catch(i){At(n,t,i)}else try{Ut.removeChild(n.stateNode)}catch(i){At(n,t,i)}break;case 18:Ut!==null&&(qn?(e=Ut,PE(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),Ad(e)):PE(Ut,n.stateNode));break;case 4:a=Ut,s=qn,Ut=n.stateNode.containerInfo,qn=!0,es(e,t,n),Ut=a,qn=s;break;case 0:case 11:case 14:case 15:Qt||wi(2,n,t),Qt||wi(4,n,t),es(e,t,n);break;case 1:Qt||(jr(n,t),a=n.stateNode,typeof a.componentWillUnmount=="function"&&KD(n,t,a)),es(e,t,n);break;case 21:es(e,t,n);break;case 22:Qt=(a=Qt)||n.memoizedState!==null,es(e,t,n),Qt=a;break;default:es(e,t,n)}}function a4(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Ad(e)}catch(n){At(t,t.return,n)}}function UP(e){switch(e.tag){case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new CE),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new CE),t;default:throw Error(ce(435,e.tag))}}function Nm(e,t){var n=UP(e);t.forEach(function(a){var s=VP.bind(null,e,a);n.has(a)||(n.add(a),a.then(s,s))})}function ta(e,t){var n=t.deletions;if(n!==null)for(var a=0;a<n.length;a++){var s=n[a],i=e,o=t,l=o;e:for(;l!==null;){switch(l.tag){case 27:if(_i(l.type)){Ut=l.stateNode,qn=!1;break e}break;case 5:Ut=l.stateNode,qn=!1;break e;case 3:case 4:Ut=l.stateNode.containerInfo,qn=!0;break e}l=l.return}if(Ut===null)throw Error(ce(160));n4(i,o,s),Ut=null,qn=!1,i=s.alternate,i!==null&&(i.return=null),s.return=null}if(t.subtreeFlags&13878)for(t=t.child;t!==null;)r4(t,e),t=t.sibling}var Qa=null;function r4(e,t){var n=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:ta(t,e),na(e),a&4&&(wi(3,e,e.return),iu(3,e),wi(5,e,e.return));break;case 1:ta(t,e),na(e),a&512&&(Qt||n===null||jr(n,n.return)),a&64&&rs&&(e=e.updateQueue,e!==null&&(a=e.callbacks,a!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?a:n.concat(a))));break;case 26:var s=Qa;if(ta(t,e),na(e),a&512&&(Qt||n===null||jr(n,n.return)),a&4){var i=n!==null?n.memoizedState:null;if(a=e.memoizedState,n===null)if(a===null)if(e.stateNode===null){e:{a=e.type,n=e.memoizedProps,s=s.ownerDocument||s;t:switch(a){case"title":i=s.getElementsByTagName("title")[0],(!i||i[Qd]||i[jn]||i.namespaceURI==="http://www.w3.org/2000/svg"||i.hasAttribute("itemprop"))&&(i=s.createElement(a),s.head.insertBefore(i,s.querySelector("head > title"))),En(i,a,n),i[jn]=e,xn(i),a=i;break e;case"link":var o=HE("link","href",s).get(a+(n.href||""));if(o){for(var l=0;l<o.length;l++)if(i=o[l],i.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&i.getAttribute("rel")===(n.rel==null?null:n.rel)&&i.getAttribute("title")===(n.title==null?null:n.title)&&i.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){o.splice(l,1);break t}}i=s.createElement(a),En(i,a,n),s.head.appendChild(i);break;case"meta":if(o=HE("meta","content",s).get(a+(n.content||""))){for(l=0;l<o.length;l++)if(i=o[l],i.getAttribute("content")===(n.content==null?null:""+n.content)&&i.getAttribute("name")===(n.name==null?null:n.name)&&i.getAttribute("property")===(n.property==null?null:n.property)&&i.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&i.getAttribute("charset")===(n.charSet==null?null:n.charSet)){o.splice(l,1);break t}}i=s.createElement(a),En(i,a,n),s.head.appendChild(i);break;default:throw Error(ce(468,a))}i[jn]=e,xn(i),a=i}e.stateNode=a}else qE(s,e.type,e.stateNode);else e.stateNode=$E(s,a,e.memoizedProps);else i!==a?(i===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):i.count--,a===null?qE(s,e.type,e.stateNode):$E(s,a,e.memoizedProps)):a===null&&e.stateNode!==null&&ym(e,e.memoizedProps,n.memoizedProps)}break;case 27:ta(t,e),na(e),a&512&&(Qt||n===null||jr(n,n.return)),n!==null&&a&4&&ym(e,e.memoizedProps,n.memoizedProps);break;case 5:if(ta(t,e),na(e),a&512&&(Qt||n===null||jr(n,n.return)),e.flags&32){s=e.stateNode;try{Ol(s,"")}catch(p){At(e,e.return,p)}}a&4&&e.stateNode!=null&&(s=e.memoizedProps,ym(e,s,n!==null?n.memoizedProps:s)),a&1024&&(wm=!0);break;case 6:if(ta(t,e),na(e),a&4){if(e.stateNode===null)throw Error(ce(162));a=e.memoizedProps,n=e.stateNode;try{n.nodeValue=a}catch(p){At(e,e.return,p)}}break;case 3:if(Ch=null,s=Qa,Qa=ff(t.containerInfo),ta(t,e),Qa=s,na(e),a&4&&n!==null&&n.memoizedState.isDehydrated)try{Ad(t.containerInfo)}catch(p){At(e,e.return,p)}wm&&(wm=!1,s4(e));break;case 4:a=Qa,Qa=ff(e.stateNode.containerInfo),ta(t,e),na(e),Qa=a;break;case 12:ta(t,e),na(e);break;case 13:ta(t,e),na(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(YN=Or()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Nm(e,a)));break;case 22:s=e.memoizedState!==null;var c=n!==null&&n.memoizedState!==null,u=rs,h=Qt;if(rs=u||s,Qt=h||c,ta(t,e),Qt=h,rs=u,na(e),a&8192)e:for(t=e.stateNode,t._visibility=s?t._visibility&-2:t._visibility|1,s&&(n===null||c||rs||Qt||Gi(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){c=n=t;try{if(i=c.stateNode,s)o=i.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none";else{l=c.stateNode;var d=c.memoizedProps.style,f=d!=null&&d.hasOwnProperty("display")?d.display:null;l.style.display=f==null||typeof f=="boolean"?"":(""+f).trim()}}catch(p){At(c,c.return,p)}}}else if(t.tag===6){if(n===null){c=t;try{c.stateNode.nodeValue=s?"":c.memoizedProps}catch(p){At(c,c.return,p)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}a&4&&(a=e.updateQueue,a!==null&&(n=a.retryQueue,n!==null&&(a.retryQueue=null,Nm(e,n))));break;case 19:ta(t,e),na(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Nm(e,a)));break;case 30:break;case 21:break;default:ta(t,e),na(e)}}function na(e){var t=e.flags;if(t&2){try{for(var n,a=e.return;a!==null;){if(QD(a)){n=a;break}a=a.return}if(n==null)throw Error(ce(160));switch(n.tag){case 27:var s=n.stateNode,i=vm(e);sf(e,i,s);break;case 5:var o=n.stateNode;n.flags&32&&(Ol(o,""),n.flags&=-33);var l=vm(e);sf(e,l,o);break;case 3:case 4:var c=n.stateNode.containerInfo,u=vm(e);Q0(e,u,c);break;default:throw Error(ce(161))}}catch(h){At(e,e.return,h)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function s4(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;s4(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Us(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)e4(e,t.alternate,t),t=t.sibling}function Gi(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:wi(4,t,t.return),Gi(t);break;case 1:jr(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&KD(t,t.return,n),Gi(t);break;case 27:ld(t.stateNode);case 26:case 5:jr(t,t.return),Gi(t);break;case 22:t.memoizedState===null&&Gi(t);break;case 30:Gi(t);break;default:Gi(t)}e=e.sibling}}function qs(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var a=t.alternate,s=e,i=t,o=i.flags;switch(i.tag){case 0:case 11:case 15:qs(s,i,n),iu(4,i);break;case 1:if(qs(s,i,n),a=i,s=a.stateNode,typeof s.componentDidMount=="function")try{s.componentDidMount()}catch(u){At(a,a.return,u)}if(a=i,s=a.updateQueue,s!==null){var l=a.stateNode;try{var c=s.shared.hiddenCallbacks;if(c!==null)for(s.shared.hiddenCallbacks=null,s=0;s<c.length;s++)eD(c[s],l)}catch(u){At(a,a.return,u)}}n&&o&64&&XD(i),rd(i,i.return);break;case 27:JD(i);case 26:case 5:qs(s,i,n),n&&a===null&&o&4&&ZD(i),rd(i,i.return);break;case 12:qs(s,i,n);break;case 13:qs(s,i,n),n&&o&4&&a4(s,i);break;case 22:i.memoizedState===null&&qs(s,i,n),rd(i,i.return);break;case 30:break;default:qs(s,i,n)}t=t.sibling}}function HN(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&nu(n))}function qN(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&nu(e))}function yr(e,t,n,a){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)i4(e,t,n,a),t=t.sibling}function i4(e,t,n,a){var s=t.flags;switch(t.tag){case 0:case 11:case 15:yr(e,t,n,a),s&2048&&iu(9,t);break;case 1:yr(e,t,n,a);break;case 3:yr(e,t,n,a),s&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&nu(e)));break;case 12:if(s&2048){yr(e,t,n,a),e=t.stateNode;try{var i=t.memoizedProps,o=i.id,l=i.onPostCommit;typeof l=="function"&&l(o,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(c){At(t,t.return,c)}}else yr(e,t,n,a);break;case 13:yr(e,t,n,a);break;case 23:break;case 22:i=t.stateNode,o=t.alternate,t.memoizedState!==null?i._visibility&2?yr(e,t,n,a):sd(e,t):i._visibility&2?yr(e,t,n,a):(i._visibility|=2,Wo(e,t,n,a,(t.subtreeFlags&10256)!==0)),s&2048&&HN(o,t);break;case 24:yr(e,t,n,a),s&2048&&qN(t.alternate,t);break;default:yr(e,t,n,a)}}function Wo(e,t,n,a,s){for(s=s&&(t.subtreeFlags&10256)!==0,t=t.child;t!==null;){var i=e,o=t,l=n,c=a,u=o.flags;switch(o.tag){case 0:case 11:case 15:Wo(i,o,l,c,s),iu(8,o);break;case 23:break;case 22:var h=o.stateNode;o.memoizedState!==null?h._visibility&2?Wo(i,o,l,c,s):sd(i,o):(h._visibility|=2,Wo(i,o,l,c,s)),s&&u&2048&&HN(o.alternate,o);break;case 24:Wo(i,o,l,c,s),s&&u&2048&&qN(o.alternate,o);break;default:Wo(i,o,l,c,s)}t=t.sibling}}function sd(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,a=t,s=a.flags;switch(a.tag){case 22:sd(n,a),s&2048&&HN(a.alternate,a);break;case 24:sd(n,a),s&2048&&qN(a.alternate,a);break;default:sd(n,a)}t=t.sibling}}var $c=8192;function Uo(e){if(e.subtreeFlags&$c)for(e=e.child;e!==null;)o4(e),e=e.sibling}function o4(e){switch(e.tag){case 26:Uo(e),e.flags&$c&&e.memoizedState!==null&&NF(Qa,e.memoizedState,e.memoizedProps);break;case 5:Uo(e);break;case 3:case 4:var t=Qa;Qa=ff(e.stateNode.containerInfo),Uo(e),Qa=t;break;case 22:e.memoizedState===null&&(t=e.alternate,t!==null&&t.memoizedState!==null?(t=$c,$c=16777216,Uo(e),$c=t):Uo(e));break;default:Uo(e)}}function l4(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Sc(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var a=t[n];bn=a,d4(a,e)}l4(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)c4(e),e=e.sibling}function c4(e){switch(e.tag){case 0:case 11:case 15:Sc(e),e.flags&2048&&wi(9,e,e.return);break;case 3:Sc(e);break;case 12:Sc(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Eh(e)):Sc(e);break;default:Sc(e)}}function Eh(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var a=t[n];bn=a,d4(a,e)}l4(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:wi(8,t,t.return),Eh(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Eh(t));break;default:Eh(t)}e=e.sibling}}function d4(e,t){for(;bn!==null;){var n=bn;switch(n.tag){case 0:case 11:case 15:wi(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var a=n.memoizedState.cachePool.pool;a!=null&&a.refCount++}break;case 24:nu(n.memoizedState.cache)}if(a=n.child,a!==null)a.return=n,bn=a;else e:for(n=e;bn!==null;){a=bn;var s=a.sibling,i=a.return;if(t4(a),a===n){bn=null;break e}if(s!==null){s.return=i,bn=s;break e}bn=i}}}var PP={getCacheForType:function(e){var t=kn(dn),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n}},FP=typeof WeakMap=="function"?WeakMap:Map,yt=0,Rt=null,it=null,ot=0,bt=0,la=null,ai=!1,sc=!1,GN=!1,ws=0,Yt=0,Ni=0,ro=0,VN=0,$a=0,Ul=0,id=null,Gn=null,J0=!1,YN=0,of=1/0,lf=null,di=null,Sn=0,ui=null,Pl=null,Nl=0,ew=0,tw=null,u4=null,od=0,nw=null;function ba(){if(yt&2&&ot!==0)return ot&-ot;if(qe.T!==null){var e=Dl;return e!==0?e:XN()}return NO()}function h4(){$a===0&&($a=!(ot&536870912)||ut?xO():536870912);var e=Ha.current;return e!==null&&(e.flags|=32),$a}function xa(e,t,n){(e===Rt&&(bt===2||bt===9)||e.cancelPendingCommit!==null)&&(Fl(e,0),ri(e,ot,$a,!1)),Zd(e,n),(!(yt&2)||e!==Rt)&&(e===Rt&&(!(yt&2)&&(ro|=n),Yt===4&&ri(e,ot,$a,!1)),Fr(e))}function f4(e,t,n){if(yt&6)throw Error(ce(327));var a=!n&&(t&124)===0&&(t&e.expiredLanes)===0||Kd(e,t),s=a?$P(e,t):Sm(e,t,!0),i=a;do{if(s===0){sc&&!a&&ri(e,t,0,!1);break}else{if(n=e.current.alternate,i&&!BP(n)){s=Sm(e,t,!1),i=!1;continue}if(s===2){if(i=t,e.errorRecoveryDisabledLanes&i)var o=0;else o=e.pendingLanes&-536870913,o=o!==0?o:o&536870912?536870912:0;if(o!==0){t=o;e:{var l=e;s=id;var c=l.current.memoizedState.isDehydrated;if(c&&(Fl(l,o).flags|=256),o=Sm(l,o,!1),o!==2){if(GN&&!c){l.errorRecoveryDisabledLanes|=i,ro|=i,s=4;break e}i=Gn,Gn=s,i!==null&&(Gn===null?Gn=i:Gn.push.apply(Gn,i))}s=o}if(i=!1,s!==2)continue}}if(s===1){Fl(e,0),ri(e,t,0,!0);break}e:{switch(a=e,i=s,i){case 0:case 1:throw Error(ce(345));case 4:if((t&4194048)!==t)break;case 6:ri(a,t,$a,!ai);break e;case 2:Gn=null;break;case 3:case 5:break;default:throw Error(ce(329))}if((t&62914560)===t&&(s=YN+300-Or(),10<s)){if(ri(a,t,$a,!ai),Kf(a,0,!0)!==0)break e;a.timeoutHandle=O4(AE.bind(null,a,n,Gn,lf,J0,t,$a,ro,Ul,ai,i,2,-0,0),s);break e}AE(a,n,Gn,lf,J0,t,$a,ro,Ul,ai,i,0,-0,0)}}break}while(!0);Fr(e)}function AE(e,t,n,a,s,i,o,l,c,u,h,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,(d&8192||(d&16785408)===16785408)&&(Sd={stylesheets:null,count:0,unsuspend:wF},o4(t),d=SF(),d!==null)){e.cancelPendingCommit=d(kE.bind(null,e,t,i,n,a,s,o,l,c,h,1,f,p)),ri(e,i,o,!u);return}kE(e,t,i,n,a,s,o,l,c)}function BP(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var a=0;a<n.length;a++){var s=n[a],i=s.getSnapshot;s=s.value;try{if(!va(i(),s))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function ri(e,t,n,a){t&=~VN,t&=~ro,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var s=t;0<s;){var i=31-ga(s),o=1<<i;a[i]=-1,s&=~o}n!==0&&vO(e,n,t)}function ip(){return yt&6?!0:(ou(0),!1)}function WN(){if(it!==null){if(bt===0)var e=it.return;else e=it,cs=jo=null,IN(e),wl=null,vd=0,e=it;for(;e!==null;)WD(e.alternate,e),e=e.return;it=null}}function Fl(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,rF(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),WN(),Rt=e,it=n=ms(e.current,null),ot=t,bt=0,la=null,ai=!1,sc=Kd(e,t),GN=!1,Ul=$a=VN=ro=Ni=Yt=0,Gn=id=null,J0=!1,t&8&&(t|=t&32);var a=e.entangledLanes;if(a!==0)for(e=e.entanglements,a&=t;0<a;){var s=31-ga(a),i=1<<s;t|=e[s],a&=~i}return ws=t,ep(),n}function p4(e,t){Je=null,qe.H=ef,t===au||t===np?(t=sE(),bt=3):t===QO?(t=sE(),bt=4):bt=t===$D?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,la=t,it===null&&(Yt=1,af(e,za(t,e.current)))}function m4(){var e=qe.H;return qe.H=ef,e===null?ef:e}function g4(){var e=qe.A;return qe.A=PP,e}function aw(){Yt=4,ai||(ot&4194048)!==ot&&Ha.current!==null||(sc=!0),!(Ni&134217727)&&!(ro&134217727)||Rt===null||ri(Rt,ot,$a,!1)}function Sm(e,t,n){var a=yt;yt|=2;var s=m4(),i=g4();(Rt!==e||ot!==t)&&(lf=null,Fl(e,t)),t=!1;var o=Yt;e:do try{if(bt!==0&&it!==null){var l=it,c=la;switch(bt){case 8:WN(),o=6;break e;case 3:case 2:case 9:case 6:Ha.current===null&&(t=!0);var u=bt;if(bt=0,la=null,dl(e,l,c,u),n&&sc){o=0;break e}break;default:u=bt,bt=0,la=null,dl(e,l,c,u)}}zP(),o=Yt;break}catch(h){p4(e,h)}while(!0);return t&&e.shellSuspendCounter++,cs=jo=null,yt=a,qe.H=s,qe.A=i,it===null&&(Rt=null,ot=0,ep()),o}function zP(){for(;it!==null;)b4(it)}function $P(e,t){var n=yt;yt|=2;var a=m4(),s=g4();Rt!==e||ot!==t?(lf=null,of=Or()+500,Fl(e,t)):sc=Kd(e,t);e:do try{if(bt!==0&&it!==null){t=it;var i=la;t:switch(bt){case 1:bt=0,la=null,dl(e,t,i,1);break;case 2:case 9:if(rE(i)){bt=0,la=null,jE(t);break}t=function(){bt!==2&&bt!==9||Rt!==e||(bt=7),Fr(e)},i.then(t,t);break e;case 3:bt=7;break e;case 4:bt=5;break e;case 7:rE(i)?(bt=0,la=null,jE(t)):(bt=0,la=null,dl(e,t,i,7));break;case 5:var o=null;switch(it.tag){case 26:o=it.memoizedState;case 5:case 27:var l=it;if(!o||L4(o)){bt=0,la=null;var c=l.sibling;if(c!==null)it=c;else{var u=l.return;u!==null?(it=u,op(u)):it=null}break t}}bt=0,la=null,dl(e,t,i,5);break;case 6:bt=0,la=null,dl(e,t,i,6);break;case 8:WN(),Yt=6;break e;default:throw Error(ce(462))}}HP();break}catch(h){p4(e,h)}while(!0);return cs=jo=null,qe.H=a,qe.A=s,yt=n,it!==null?0:(Rt=null,ot=0,ep(),Yt)}function HP(){for(;it!==null&&!u6();)b4(it)}function b4(e){var t=YD(e.alternate,e,ws);e.memoizedProps=e.pendingProps,t===null?op(e):it=t}function jE(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=wE(n,t,t.pendingProps,t.type,void 0,ot);break;case 11:t=wE(n,t,t.pendingProps,t.type.render,t.ref,ot);break;case 5:IN(t);default:WD(n,t),t=it=WO(t,ws),t=YD(n,t,ws)}e.memoizedProps=e.pendingProps,t===null?op(e):it=t}function dl(e,t,n,a){cs=jo=null,IN(t),wl=null,vd=0;var s=t.return;try{if(OP(e,s,t,n,ot)){Yt=1,af(e,za(n,e.current)),it=null;return}}catch(i){if(s!==null)throw it=s,i;Yt=1,af(e,za(n,e.current)),it=null;return}t.flags&32768?(ut||a===1?e=!0:sc||ot&536870912?e=!1:(ai=e=!0,(a===2||a===9||a===3||a===6)&&(a=Ha.current,a!==null&&a.tag===13&&(a.flags|=16384))),x4(t,e)):op(t)}function op(e){var t=e;do{if(t.flags&32768){x4(t,ai);return}e=t.return;var n=IP(t.alternate,t,ws);if(n!==null){it=n;return}if(t=t.sibling,t!==null){it=t;return}it=t=e}while(t!==null);Yt===0&&(Yt=5)}function x4(e,t){do{var n=MP(e.alternate,e);if(n!==null){n.flags&=32767,it=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){it=e;return}it=e=n}while(e!==null);Yt=6,it=null}function kE(e,t,n,a,s,i,o,l,c){e.cancelPendingCommit=null;do lp();while(Sn!==0);if(yt&6)throw Error(ce(327));if(t!==null){if(t===e.current)throw Error(ce(177));if(i=t.lanes|t.childLanes,i|=wN,w6(e,n,i,o,l,c),e===Rt&&(it=Rt=null,ot=0),Pl=t,ui=e,Nl=n,ew=i,tw=s,u4=a,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,YP(qh,function(){return S4(),null})):(e.callbackNode=null,e.callbackPriority=0),a=(t.flags&13878)!==0,t.subtreeFlags&13878||a){a=qe.T,qe.T=null,s=ht.p,ht.p=2,o=yt,yt|=4;try{LP(e,t,n)}finally{yt=o,ht.p=s,qe.T=a}}Sn=1,y4(),v4(),w4()}}function y4(){if(Sn===1){Sn=0;var e=ui,t=Pl,n=(t.flags&13878)!==0;if(t.subtreeFlags&13878||n){n=qe.T,qe.T=null;var a=ht.p;ht.p=2;var s=yt;yt|=4;try{r4(t,e);var i=ow,o=BO(e.containerInfo),l=i.focusedElem,c=i.selectionRange;if(o!==l&&l&&l.ownerDocument&&FO(l.ownerDocument.documentElement,l)){if(c!==null&&vN(l)){var u=c.start,h=c.end;if(h===void 0&&(h=u),"selectionStart"in l)l.selectionStart=u,l.selectionEnd=Math.min(h,l.value.length);else{var d=l.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),v=l.textContent.length,x=Math.min(c.start,v),N=c.end===void 0?x:Math.min(c.end,v);!p.extend&&x>N&&(o=N,N=x,x=o);var b=KS(l,x),y=KS(l,N);if(b&&y&&(p.rangeCount!==1||p.anchorNode!==b.node||p.anchorOffset!==b.offset||p.focusNode!==y.node||p.focusOffset!==y.offset)){var g=d.createRange();g.setStart(b.node,b.offset),p.removeAllRanges(),x>N?(p.addRange(g),p.extend(y.node,y.offset)):(g.setEnd(y.node,y.offset),p.addRange(g))}}}}for(d=[],p=l;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof l.focus=="function"&&l.focus(),l=0;l<d.length;l++){var w=d[l];w.element.scrollLeft=w.left,w.element.scrollTop=w.top}}gf=!!iw,ow=iw=null}finally{yt=s,ht.p=a,qe.T=n}}e.current=t,Sn=2}}function v4(){if(Sn===2){Sn=0;var e=ui,t=Pl,n=(t.flags&8772)!==0;if(t.subtreeFlags&8772||n){n=qe.T,qe.T=null;var a=ht.p;ht.p=2;var s=yt;yt|=4;try{e4(e,t.alternate,t)}finally{yt=s,ht.p=a,qe.T=n}}Sn=3}}function w4(){if(Sn===4||Sn===3){Sn=0,h6();var e=ui,t=Pl,n=Nl,a=u4;t.subtreeFlags&10256||t.flags&10256?Sn=5:(Sn=0,Pl=ui=null,N4(e,e.pendingLanes));var s=e.pendingLanes;if(s===0&&(di=null),fN(n),t=t.stateNode,ma&&typeof ma.onCommitFiberRoot=="function")try{ma.onCommitFiberRoot(Xd,t,void 0,(t.current.flags&128)===128)}catch{}if(a!==null){t=qe.T,s=ht.p,ht.p=2,qe.T=null;try{for(var i=e.onRecoverableError,o=0;o<a.length;o++){var l=a[o];i(l.value,{componentStack:l.stack})}}finally{qe.T=t,ht.p=s}}Nl&3&&lp(),Fr(e),s=e.pendingLanes,n&4194090&&s&42?e===nw?od++:(od=0,nw=e):od=0,ou(0)}}function N4(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,nu(t)))}function lp(e){return y4(),v4(),w4(),S4()}function S4(){if(Sn!==5)return!1;var e=ui,t=ew;ew=0;var n=fN(Nl),a=qe.T,s=ht.p;try{ht.p=32>n?32:n,qe.T=null,n=tw,tw=null;var i=ui,o=Nl;if(Sn=0,Pl=ui=null,Nl=0,yt&6)throw Error(ce(331));var l=yt;if(yt|=4,c4(i.current),i4(i,i.current,o,n),yt=l,ou(0,!1),ma&&typeof ma.onPostCommitFiberRoot=="function")try{ma.onPostCommitFiberRoot(Xd,i)}catch{}return!0}finally{ht.p=s,qe.T=a,N4(e,t)}}function _E(e,t,n){t=za(n,t),t=X0(e.stateNode,t,2),e=ci(e,t,2),e!==null&&(Zd(e,2),Fr(e))}function At(e,t,n){if(e.tag===3)_E(e,e,n);else for(;t!==null;){if(t.tag===3){_E(t,e,n);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(di===null||!di.has(a))){e=za(n,e),n=BD(2),a=ci(t,n,2),a!==null&&(zD(n,a,t,e),Zd(a,2),Fr(a));break}}t=t.return}}function Em(e,t,n){var a=e.pingCache;if(a===null){a=e.pingCache=new FP;var s=new Set;a.set(t,s)}else s=a.get(t),s===void 0&&(s=new Set,a.set(t,s));s.has(n)||(GN=!0,s.add(n),e=qP.bind(null,e,t,n),t.then(e,e))}function qP(e,t,n){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Rt===e&&(ot&n)===n&&(Yt===4||Yt===3&&(ot&62914560)===ot&&300>Or()-YN?!(yt&2)&&Fl(e,0):VN|=n,Ul===ot&&(Ul=0)),Fr(e)}function E4(e,t){t===0&&(t=yO()),e=rc(e,t),e!==null&&(Zd(e,t),Fr(e))}function GP(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),E4(e,n)}function VP(e,t){var n=0;switch(e.tag){case 13:var a=e.stateNode,s=e.memoizedState;s!==null&&(n=s.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(ce(314))}a!==null&&a.delete(t),E4(e,n)}function YP(e,t){return uN(e,t)}var cf=null,Xo=null,rw=!1,df=!1,Tm=!1,so=0;function Fr(e){e!==Xo&&e.next===null&&(Xo===null?cf=Xo=e:Xo=Xo.next=e),df=!0,rw||(rw=!0,XP())}function ou(e,t){if(!Tm&&df){Tm=!0;do for(var n=!1,a=cf;a!==null;){if(e!==0){var s=a.pendingLanes;if(s===0)var i=0;else{var o=a.suspendedLanes,l=a.pingedLanes;i=(1<<31-ga(42|e)+1)-1,i&=s&~(o&~l),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(n=!0,RE(a,i))}else i=ot,i=Kf(a,a===Rt?i:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),!(i&3)||Kd(a,i)||(n=!0,RE(a,i));a=a.next}while(n);Tm=!1}}function WP(){T4()}function T4(){df=rw=!1;var e=0;so!==0&&(aF()&&(e=so),so=0);for(var t=Or(),n=null,a=cf;a!==null;){var s=a.next,i=C4(a,t);i===0?(a.next=null,n===null?cf=s:n.next=s,s===null&&(Xo=n)):(n=a,(e!==0||i&3)&&(df=!0)),a=s}ou(e)}function C4(e,t){for(var n=e.suspendedLanes,a=e.pingedLanes,s=e.expirationTimes,i=e.pendingLanes&-62914561;0<i;){var o=31-ga(i),l=1<<o,c=s[o];c===-1?(!(l&n)||l&a)&&(s[o]=v6(l,t)):c<=t&&(e.expiredLanes|=l),i&=~l}if(t=Rt,n=ot,n=Kf(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,n===0||e===t&&(bt===2||bt===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&Zp(a),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||Kd(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(a!==null&&Zp(a),fN(n)){case 2:case 8:n=gO;break;case 32:n=qh;break;case 268435456:n=bO;break;default:n=qh}return a=A4.bind(null,e),n=uN(n,a),e.callbackPriority=t,e.callbackNode=n,t}return a!==null&&a!==null&&Zp(a),e.callbackPriority=2,e.callbackNode=null,2}function A4(e,t){if(Sn!==0&&Sn!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(lp()&&e.callbackNode!==n)return null;var a=ot;return a=Kf(e,e===Rt?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(f4(e,a,t),C4(e,Or()),e.callbackNode!=null&&e.callbackNode===n?A4.bind(null,e):null)}function RE(e,t){if(lp())return null;f4(e,t,!0)}function XP(){sF(function(){yt&6?uN(mO,WP):T4()})}function XN(){return so===0&&(so=xO()),so}function OE(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:gh(""+e)}function DE(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function KP(e,t,n,a,s){if(t==="submit"&&n&&n.stateNode===s){var i=OE((s[Xn]||null).action),o=a.submitter;o&&(t=(t=o[Xn]||null)?OE(t.formAction):o.getAttribute("formAction"),t!==null&&(i=t,o=null));var l=new Zf("action","action",null,a,s);e.push({event:l,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(so!==0){var c=o?DE(s,o):new FormData(s);Y0(n,{pending:!0,data:c,method:s.method,action:i},null,c)}}else typeof i=="function"&&(l.preventDefault(),c=o?DE(s,o):new FormData(s),Y0(n,{pending:!0,data:c,method:s.method,action:i},i,c))},currentTarget:s}]})}}for(var Cm=0;Cm<M0.length;Cm++){var Am=M0[Cm],ZP=Am.toLowerCase(),QP=Am[0].toUpperCase()+Am.slice(1);dr(ZP,"on"+QP)}dr($O,"onAnimationEnd");dr(HO,"onAnimationIteration");dr(qO,"onAnimationStart");dr("dblclick","onDoubleClick");dr("focusin","onFocus");dr("focusout","onBlur");dr(mP,"onTransitionRun");dr(gP,"onTransitionStart");dr(bP,"onTransitionCancel");dr(GO,"onTransitionEnd");Rl("onMouseEnter",["mouseout","mouseover"]);Rl("onMouseLeave",["mouseout","mouseover"]);Rl("onPointerEnter",["pointerout","pointerover"]);Rl("onPointerLeave",["pointerout","pointerover"]);To("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));To("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));To("onBeforeInput",["compositionend","keypress","textInput","paste"]);To("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));To("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));To("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var wd="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(" "),JP=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(wd));function j4(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var a=e[n],s=a.event;a=a.listeners;e:{var i=void 0;if(t)for(var o=a.length-1;0<=o;o--){var l=a[o],c=l.instance,u=l.currentTarget;if(l=l.listener,c!==i&&s.isPropagationStopped())break e;i=l,s.currentTarget=u;try{i(s)}catch(h){nf(h)}s.currentTarget=null,i=c}else for(o=0;o<a.length;o++){if(l=a[o],c=l.instance,u=l.currentTarget,l=l.listener,c!==i&&s.isPropagationStopped())break e;i=l,s.currentTarget=u;try{i(s)}catch(h){nf(h)}s.currentTarget=null,i=c}}}}function st(e,t){var n=t[j0];n===void 0&&(n=t[j0]=new Set);var a=e+"__bubble";n.has(a)||(k4(t,e,2,!1),n.add(a))}function jm(e,t,n){var a=0;t&&(a|=4),k4(n,e,a,t)}var Bu="_reactListening"+Math.random().toString(36).slice(2);function KN(e){if(!e[Bu]){e[Bu]=!0,SO.forEach(function(n){n!=="selectionchange"&&(JP.has(n)||jm(n,!1,e),jm(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Bu]||(t[Bu]=!0,jm("selectionchange",!1,t))}}function k4(e,t,n,a){switch(z4(t)){case 2:var s=CF;break;case 8:s=AF;break;default:s=e1}n=s.bind(null,t,n,e),s=void 0,!O0||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),a?s!==void 0?e.addEventListener(t,n,{capture:!0,passive:s}):e.addEventListener(t,n,!0):s!==void 0?e.addEventListener(t,n,{passive:s}):e.addEventListener(t,n,!1)}function km(e,t,n,a,s){var i=a;if(!(t&1)&&!(t&2)&&a!==null)e:for(;;){if(a===null)return;var o=a.tag;if(o===3||o===4){var l=a.stateNode.containerInfo;if(l===s)break;if(o===4)for(o=a.return;o!==null;){var c=o.tag;if((c===3||c===4)&&o.stateNode.containerInfo===s)return;o=o.return}for(;l!==null;){if(o=tl(l),o===null)return;if(c=o.tag,c===5||c===6||c===26||c===27){a=i=o;continue e}l=l.parentNode}}a=a.return}RO(function(){var u=i,h=gN(n),d=[];e:{var f=VO.get(e);if(f!==void 0){var p=Zf,v=e;switch(e){case"keypress":if(xh(n)===0)break e;case"keydown":case"keyup":p=Y6;break;case"focusin":v="focus",p=sm;break;case"focusout":v="blur",p=sm;break;case"beforeblur":case"afterblur":p=sm;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":p=BS;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=M6;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=K6;break;case $O:case HO:case qO:p=P6;break;case GO:p=Q6;break;case"scroll":case"scrollend":p=D6;break;case"wheel":p=eP;break;case"copy":case"cut":case"paste":p=B6;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=$S;break;case"toggle":case"beforetoggle":p=nP}var x=(t&4)!==0,N=!x&&(e==="scroll"||e==="scrollend"),b=x?f!==null?f+"Capture":null:f;x=[];for(var y=u,g;y!==null;){var w=y;if(g=w.stateNode,w=w.tag,w!==5&&w!==26&&w!==27||g===null||b===null||(w=md(y,b),w!=null&&x.push(Nd(y,w,g))),N)break;y=y.return}0<x.length&&(f=new p(f,v,null,n,h),d.push({event:f,listeners:x}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",f&&n!==R0&&(v=n.relatedTarget||n.fromElement)&&(tl(v)||v[nc]))break e;if((p||f)&&(f=h.window===h?h:(f=h.ownerDocument)?f.defaultView||f.parentWindow:window,p?(v=n.relatedTarget||n.toElement,p=u,v=v?tl(v):null,v!==null&&(N=Wd(v),x=v.tag,v!==N||x!==5&&x!==27&&x!==6)&&(v=null)):(p=null,v=u),p!==v)){if(x=BS,w="onMouseLeave",b="onMouseEnter",y="mouse",(e==="pointerout"||e==="pointerover")&&(x=$S,w="onPointerLeave",b="onPointerEnter",y="pointer"),N=p==null?f:zc(p),g=v==null?f:zc(v),f=new x(w,y+"leave",p,n,h),f.target=N,f.relatedTarget=g,w=null,tl(h)===u&&(x=new x(b,y+"enter",v,n,h),x.target=g,x.relatedTarget=N,w=x),N=w,p&&v)t:{for(x=p,b=v,y=0,g=x;g;g=Po(g))y++;for(g=0,w=b;w;w=Po(w))g++;for(;0<y-g;)x=Po(x),y--;for(;0<g-y;)b=Po(b),g--;for(;y--;){if(x===b||b!==null&&x===b.alternate)break t;x=Po(x),b=Po(b)}x=null}else x=null;p!==null&&IE(d,f,p,x,!1),v!==null&&N!==null&&IE(d,N,v,x,!0)}}e:{if(f=u?zc(u):window,p=f.nodeName&&f.nodeName.toLowerCase(),p==="select"||p==="input"&&f.type==="file")var S=VS;else if(GS(f))if(UO)S=hP;else{S=dP;var C=cP}else p=f.nodeName,!p||p.toLowerCase()!=="input"||f.type!=="checkbox"&&f.type!=="radio"?u&&mN(u.elementType)&&(S=VS):S=uP;if(S&&(S=S(e,u))){LO(d,S,n,h);break e}C&&C(e,f,u),e==="focusout"&&u&&f.type==="number"&&u.memoizedProps.value!=null&&_0(f,"number",f.value)}switch(C=u?zc(u):window,e){case"focusin":(GS(C)||C.contentEditable==="true")&&(rl=C,D0=u,Zc=null);break;case"focusout":Zc=D0=rl=null;break;case"mousedown":I0=!0;break;case"contextmenu":case"mouseup":case"dragend":I0=!1,ZS(d,n,h);break;case"selectionchange":if(pP)break;case"keydown":case"keyup":ZS(d,n,h)}var T;if(yN)e:{switch(e){case"compositionstart":var E="onCompositionStart";break e;case"compositionend":E="onCompositionEnd";break e;case"compositionupdate":E="onCompositionUpdate";break e}E=void 0}else al?IO(e,n)&&(E="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(E="onCompositionStart");E&&(DO&&n.locale!=="ko"&&(al||E!=="onCompositionStart"?E==="onCompositionEnd"&&al&&(T=OO()):(ni=h,bN="value"in ni?ni.value:ni.textContent,al=!0)),C=uf(u,E),0<C.length&&(E=new zS(E,e,null,n,h),d.push({event:E,listeners:C}),T?E.data=T:(T=MO(n),T!==null&&(E.data=T)))),(T=rP?sP(e,n):iP(e,n))&&(E=uf(u,"onBeforeInput"),0<E.length&&(C=new zS("onBeforeInput","beforeinput",null,n,h),d.push({event:C,listeners:E}),C.data=T)),KP(d,e,u,n,h)}j4(d,t)})}function Nd(e,t,n){return{instance:e,listener:t,currentTarget:n}}function uf(e,t){for(var n=t+"Capture",a=[];e!==null;){var s=e,i=s.stateNode;if(s=s.tag,s!==5&&s!==26&&s!==27||i===null||(s=md(e,n),s!=null&&a.unshift(Nd(e,s,i)),s=md(e,t),s!=null&&a.push(Nd(e,s,i))),e.tag===3)return a;e=e.return}return[]}function Po(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function IE(e,t,n,a,s){for(var i=t._reactName,o=[];n!==null&&n!==a;){var l=n,c=l.alternate,u=l.stateNode;if(l=l.tag,c!==null&&c===a)break;l!==5&&l!==26&&l!==27||u===null||(c=u,s?(u=md(n,i),u!=null&&o.unshift(Nd(n,u,c))):s||(u=md(n,i),u!=null&&o.push(Nd(n,u,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var eF=/\r\n?/g,tF=/\u0000|\uFFFD/g;function ME(e){return(typeof e=="string"?e:""+e).replace(eF,`
|
|
49
|
+
`).replace(tF,"")}function _4(e,t){return t=ME(t),ME(e)===t}function cp(){}function wt(e,t,n,a,s,i){switch(n){case"children":typeof a=="string"?t==="body"||t==="textarea"&&a===""||Ol(e,a):(typeof a=="number"||typeof a=="bigint")&&t!=="body"&&Ol(e,""+a);break;case"className":Du(e,"class",a);break;case"tabIndex":Du(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":Du(e,n,a);break;case"style":_O(e,a,i);break;case"data":if(t!=="object"){Du(e,"data",a);break}case"src":case"href":if(a===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(a==null||typeof a=="function"||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(n);break}a=gh(""+a),e.setAttribute(n,a);break;case"action":case"formAction":if(typeof a=="function"){e.setAttribute(n,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof i=="function"&&(n==="formAction"?(t!=="input"&&wt(e,t,"name",s.name,s,null),wt(e,t,"formEncType",s.formEncType,s,null),wt(e,t,"formMethod",s.formMethod,s,null),wt(e,t,"formTarget",s.formTarget,s,null)):(wt(e,t,"encType",s.encType,s,null),wt(e,t,"method",s.method,s,null),wt(e,t,"target",s.target,s,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(n);break}a=gh(""+a),e.setAttribute(n,a);break;case"onClick":a!=null&&(e.onclick=cp);break;case"onScroll":a!=null&&st("scroll",e);break;case"onScrollEnd":a!=null&&st("scrollend",e);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(ce(61));if(n=a.__html,n!=null){if(s.children!=null)throw Error(ce(60));e.innerHTML=n}}break;case"multiple":e.multiple=a&&typeof a!="function"&&typeof a!="symbol";break;case"muted":e.muted=a&&typeof a!="function"&&typeof a!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(a==null||typeof a=="function"||typeof a=="boolean"||typeof a=="symbol"){e.removeAttribute("xlink:href");break}n=gh(""+a),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(n,""+a):e.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":a&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":a===!0?e.setAttribute(n,""):a!==!1&&a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(n,a):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":a!=null&&typeof a!="function"&&typeof a!="symbol"&&!isNaN(a)&&1<=a?e.setAttribute(n,a):e.removeAttribute(n);break;case"rowSpan":case"start":a==null||typeof a=="function"||typeof a=="symbol"||isNaN(a)?e.removeAttribute(n):e.setAttribute(n,a);break;case"popover":st("beforetoggle",e),st("toggle",e),mh(e,"popover",a);break;case"xlinkActuate":Qr(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":Qr(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":Qr(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":Qr(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":Qr(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":Qr(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":Qr(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":Qr(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":Qr(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":mh(e,"is",a);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=R6.get(n)||n,mh(e,n,a))}}function sw(e,t,n,a,s,i){switch(n){case"style":_O(e,a,i);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(ce(61));if(n=a.__html,n!=null){if(s.children!=null)throw Error(ce(60));e.innerHTML=n}}break;case"children":typeof a=="string"?Ol(e,a):(typeof a=="number"||typeof a=="bigint")&&Ol(e,""+a);break;case"onScroll":a!=null&&st("scroll",e);break;case"onScrollEnd":a!=null&&st("scrollend",e);break;case"onClick":a!=null&&(e.onclick=cp);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!EO.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(s=n.endsWith("Capture"),t=n.slice(2,s?n.length-7:void 0),i=e[Xn]||null,i=i!=null?i[n]:null,typeof i=="function"&&e.removeEventListener(t,i,s),typeof a=="function")){typeof i!="function"&&i!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,a,s);break e}n in e?e[n]=a:a===!0?e.setAttribute(n,""):mh(e,n,a)}}}function En(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":st("error",e),st("load",e);var a=!1,s=!1,i;for(i in n)if(n.hasOwnProperty(i)){var o=n[i];if(o!=null)switch(i){case"src":a=!0;break;case"srcSet":s=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(ce(137,t));default:wt(e,t,i,o,n,null)}}s&&wt(e,t,"srcSet",n.srcSet,n,null),a&&wt(e,t,"src",n.src,n,null);return;case"input":st("invalid",e);var l=i=o=s=null,c=null,u=null;for(a in n)if(n.hasOwnProperty(a)){var h=n[a];if(h!=null)switch(a){case"name":s=h;break;case"type":o=h;break;case"checked":c=h;break;case"defaultChecked":u=h;break;case"value":i=h;break;case"defaultValue":l=h;break;case"children":case"dangerouslySetInnerHTML":if(h!=null)throw Error(ce(137,t));break;default:wt(e,t,a,h,n,null)}}AO(e,i,l,c,u,o,s,!1),Gh(e);return;case"select":st("invalid",e),a=o=i=null;for(s in n)if(n.hasOwnProperty(s)&&(l=n[s],l!=null))switch(s){case"value":i=l;break;case"defaultValue":o=l;break;case"multiple":a=l;default:wt(e,t,s,l,n,null)}t=i,n=o,e.multiple=!!a,t!=null?gl(e,!!a,t,!1):n!=null&&gl(e,!!a,n,!0);return;case"textarea":st("invalid",e),i=s=a=null;for(o in n)if(n.hasOwnProperty(o)&&(l=n[o],l!=null))switch(o){case"value":a=l;break;case"defaultValue":s=l;break;case"children":i=l;break;case"dangerouslySetInnerHTML":if(l!=null)throw Error(ce(91));break;default:wt(e,t,o,l,n,null)}kO(e,a,s,i),Gh(e);return;case"option":for(c in n)if(n.hasOwnProperty(c)&&(a=n[c],a!=null))switch(c){case"selected":e.selected=a&&typeof a!="function"&&typeof a!="symbol";break;default:wt(e,t,c,a,n,null)}return;case"dialog":st("beforetoggle",e),st("toggle",e),st("cancel",e),st("close",e);break;case"iframe":case"object":st("load",e);break;case"video":case"audio":for(a=0;a<wd.length;a++)st(wd[a],e);break;case"image":st("error",e),st("load",e);break;case"details":st("toggle",e);break;case"embed":case"source":case"link":st("error",e),st("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(u in n)if(n.hasOwnProperty(u)&&(a=n[u],a!=null))switch(u){case"children":case"dangerouslySetInnerHTML":throw Error(ce(137,t));default:wt(e,t,u,a,n,null)}return;default:if(mN(t)){for(h in n)n.hasOwnProperty(h)&&(a=n[h],a!==void 0&&sw(e,t,h,a,n,void 0));return}}for(l in n)n.hasOwnProperty(l)&&(a=n[l],a!=null&&wt(e,t,l,a,n,null))}function nF(e,t,n,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var s=null,i=null,o=null,l=null,c=null,u=null,h=null;for(p in n){var d=n[p];if(n.hasOwnProperty(p)&&d!=null)switch(p){case"checked":break;case"value":break;case"defaultValue":c=d;default:a.hasOwnProperty(p)||wt(e,t,p,null,a,d)}}for(var f in a){var p=a[f];if(d=n[f],a.hasOwnProperty(f)&&(p!=null||d!=null))switch(f){case"type":i=p;break;case"name":s=p;break;case"checked":u=p;break;case"defaultChecked":h=p;break;case"value":o=p;break;case"defaultValue":l=p;break;case"children":case"dangerouslySetInnerHTML":if(p!=null)throw Error(ce(137,t));break;default:p!==d&&wt(e,t,f,p,a,d)}}k0(e,o,l,c,u,h,i,s);return;case"select":p=o=l=f=null;for(i in n)if(c=n[i],n.hasOwnProperty(i)&&c!=null)switch(i){case"value":break;case"multiple":p=c;default:a.hasOwnProperty(i)||wt(e,t,i,null,a,c)}for(s in a)if(i=a[s],c=n[s],a.hasOwnProperty(s)&&(i!=null||c!=null))switch(s){case"value":f=i;break;case"defaultValue":l=i;break;case"multiple":o=i;default:i!==c&&wt(e,t,s,i,a,c)}t=l,n=o,a=p,f!=null?gl(e,!!n,f,!1):!!a!=!!n&&(t!=null?gl(e,!!n,t,!0):gl(e,!!n,n?[]:"",!1));return;case"textarea":p=f=null;for(l in n)if(s=n[l],n.hasOwnProperty(l)&&s!=null&&!a.hasOwnProperty(l))switch(l){case"value":break;case"children":break;default:wt(e,t,l,null,a,s)}for(o in a)if(s=a[o],i=n[o],a.hasOwnProperty(o)&&(s!=null||i!=null))switch(o){case"value":f=s;break;case"defaultValue":p=s;break;case"children":break;case"dangerouslySetInnerHTML":if(s!=null)throw Error(ce(91));break;default:s!==i&&wt(e,t,o,s,a,i)}jO(e,f,p);return;case"option":for(var v in n)if(f=n[v],n.hasOwnProperty(v)&&f!=null&&!a.hasOwnProperty(v))switch(v){case"selected":e.selected=!1;break;default:wt(e,t,v,null,a,f)}for(c in a)if(f=a[c],p=n[c],a.hasOwnProperty(c)&&f!==p&&(f!=null||p!=null))switch(c){case"selected":e.selected=f&&typeof f!="function"&&typeof f!="symbol";break;default:wt(e,t,c,f,a,p)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var x in n)f=n[x],n.hasOwnProperty(x)&&f!=null&&!a.hasOwnProperty(x)&&wt(e,t,x,null,a,f);for(u in a)if(f=a[u],p=n[u],a.hasOwnProperty(u)&&f!==p&&(f!=null||p!=null))switch(u){case"children":case"dangerouslySetInnerHTML":if(f!=null)throw Error(ce(137,t));break;default:wt(e,t,u,f,a,p)}return;default:if(mN(t)){for(var N in n)f=n[N],n.hasOwnProperty(N)&&f!==void 0&&!a.hasOwnProperty(N)&&sw(e,t,N,void 0,a,f);for(h in a)f=a[h],p=n[h],!a.hasOwnProperty(h)||f===p||f===void 0&&p===void 0||sw(e,t,h,f,a,p);return}}for(var b in n)f=n[b],n.hasOwnProperty(b)&&f!=null&&!a.hasOwnProperty(b)&&wt(e,t,b,null,a,f);for(d in a)f=a[d],p=n[d],!a.hasOwnProperty(d)||f===p||f==null&&p==null||wt(e,t,d,f,a,p)}var iw=null,ow=null;function hf(e){return e.nodeType===9?e:e.ownerDocument}function LE(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function R4(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function lw(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var _m=null;function aF(){var e=window.event;return e&&e.type==="popstate"?e===_m?!1:(_m=e,!0):(_m=null,!1)}var O4=typeof setTimeout=="function"?setTimeout:void 0,rF=typeof clearTimeout=="function"?clearTimeout:void 0,UE=typeof Promise=="function"?Promise:void 0,sF=typeof queueMicrotask=="function"?queueMicrotask:typeof UE<"u"?function(e){return UE.resolve(null).then(e).catch(iF)}:O4;function iF(e){setTimeout(function(){throw e})}function _i(e){return e==="head"}function PE(e,t){var n=t,a=0,s=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(0<a&&8>a){n=a;var o=e.ownerDocument;if(n&1&&ld(o.documentElement),n&2&&ld(o.body),n&4)for(n=o.head,ld(n),o=n.firstChild;o;){var l=o.nextSibling,c=o.nodeName;o[Qd]||c==="SCRIPT"||c==="STYLE"||c==="LINK"&&o.rel.toLowerCase()==="stylesheet"||n.removeChild(o),o=l}}if(s===0){e.removeChild(i),Ad(t);return}s--}else n==="$"||n==="$?"||n==="$!"?s++:a=n.charCodeAt(0)-48;else a=0;n=i}while(n);Ad(t)}function cw(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":cw(n),pN(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function oF(e,t,n,a){for(;e.nodeType===1;){var s=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!a&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(a){if(!e[Qd])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(i=e.getAttribute("rel"),i==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(i!==s.rel||e.getAttribute("href")!==(s.href==null||s.href===""?null:s.href)||e.getAttribute("crossorigin")!==(s.crossOrigin==null?null:s.crossOrigin)||e.getAttribute("title")!==(s.title==null?null:s.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(i=e.getAttribute("src"),(i!==(s.src==null?null:s.src)||e.getAttribute("type")!==(s.type==null?null:s.type)||e.getAttribute("crossorigin")!==(s.crossOrigin==null?null:s.crossOrigin))&&i&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var i=s.name==null?null:""+s.name;if(s.type==="hidden"&&e.getAttribute("name")===i)return e}else return e;if(e=sr(e.nextSibling),e===null)break}return null}function lF(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=sr(e.nextSibling),e===null))return null;return e}function dw(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState==="complete"}function cF(e,t){var n=e.ownerDocument;if(e.data!=="$?"||n.readyState==="complete")t();else{var a=function(){t(),n.removeEventListener("DOMContentLoaded",a)};n.addEventListener("DOMContentLoaded",a),e._reactRetry=a}}function sr(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==="$?"||t==="F!"||t==="F")break;if(t==="/$")return null}}return e}var uw=null;function FE(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}function D4(e,t,n){switch(t=hf(n),e){case"html":if(e=t.documentElement,!e)throw Error(ce(452));return e;case"head":if(e=t.head,!e)throw Error(ce(453));return e;case"body":if(e=t.body,!e)throw Error(ce(454));return e;default:throw Error(ce(451))}}function ld(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);pN(e)}var qa=new Map,BE=new Set;function ff(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Ts=ht.d;ht.d={f:dF,r:uF,D:hF,C:fF,L:pF,m:mF,X:bF,S:gF,M:xF};function dF(){var e=Ts.f(),t=ip();return e||t}function uF(e){var t=ac(e);t!==null&&t.tag===5&&t.type==="form"?CD(t):Ts.r(e)}var ic=typeof document>"u"?null:document;function I4(e,t,n){var a=ic;if(a&&typeof t=="string"&&t){var s=Ba(t);s='link[rel="'+e+'"][href="'+s+'"]',typeof n=="string"&&(s+='[crossorigin="'+n+'"]'),BE.has(s)||(BE.add(s),e={rel:e,crossOrigin:n,href:t},a.querySelector(s)===null&&(t=a.createElement("link"),En(t,"link",e),xn(t),a.head.appendChild(t)))}}function hF(e){Ts.D(e),I4("dns-prefetch",e,null)}function fF(e,t){Ts.C(e,t),I4("preconnect",e,t)}function pF(e,t,n){Ts.L(e,t,n);var a=ic;if(a&&e&&t){var s='link[rel="preload"][as="'+Ba(t)+'"]';t==="image"&&n&&n.imageSrcSet?(s+='[imagesrcset="'+Ba(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(s+='[imagesizes="'+Ba(n.imageSizes)+'"]')):s+='[href="'+Ba(e)+'"]';var i=s;switch(t){case"style":i=Bl(e);break;case"script":i=oc(e)}qa.has(i)||(e=Lt({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),qa.set(i,e),a.querySelector(s)!==null||t==="style"&&a.querySelector(lu(i))||t==="script"&&a.querySelector(cu(i))||(t=a.createElement("link"),En(t,"link",e),xn(t),a.head.appendChild(t)))}}function mF(e,t){Ts.m(e,t);var n=ic;if(n&&e){var a=t&&typeof t.as=="string"?t.as:"script",s='link[rel="modulepreload"][as="'+Ba(a)+'"][href="'+Ba(e)+'"]',i=s;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=oc(e)}if(!qa.has(i)&&(e=Lt({rel:"modulepreload",href:e},t),qa.set(i,e),n.querySelector(s)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(cu(i)))return}a=n.createElement("link"),En(a,"link",e),xn(a),n.head.appendChild(a)}}}function gF(e,t,n){Ts.S(e,t,n);var a=ic;if(a&&e){var s=ml(a).hoistableStyles,i=Bl(e);t=t||"default";var o=s.get(i);if(!o){var l={loading:0,preload:null};if(o=a.querySelector(lu(i)))l.loading=5;else{e=Lt({rel:"stylesheet",href:e,"data-precedence":t},n),(n=qa.get(i))&&ZN(e,n);var c=o=a.createElement("link");xn(c),En(c,"link",e),c._p=new Promise(function(u,h){c.onload=u,c.onerror=h}),c.addEventListener("load",function(){l.loading|=1}),c.addEventListener("error",function(){l.loading|=2}),l.loading|=4,Th(o,t,a)}o={type:"stylesheet",instance:o,count:1,state:l},s.set(i,o)}}}function bF(e,t){Ts.X(e,t);var n=ic;if(n&&e){var a=ml(n).hoistableScripts,s=oc(e),i=a.get(s);i||(i=n.querySelector(cu(s)),i||(e=Lt({src:e,async:!0},t),(t=qa.get(s))&&QN(e,t),i=n.createElement("script"),xn(i),En(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},a.set(s,i))}}function xF(e,t){Ts.M(e,t);var n=ic;if(n&&e){var a=ml(n).hoistableScripts,s=oc(e),i=a.get(s);i||(i=n.querySelector(cu(s)),i||(e=Lt({src:e,async:!0,type:"module"},t),(t=qa.get(s))&&QN(e,t),i=n.createElement("script"),xn(i),En(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},a.set(s,i))}}function zE(e,t,n,a){var s=(s=oi.current)?ff(s):null;if(!s)throw Error(ce(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=Bl(n.href),n=ml(s).hoistableStyles,a=n.get(t),a||(a={type:"style",instance:null,count:0,state:null},n.set(t,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=Bl(n.href);var i=ml(s).hoistableStyles,o=i.get(e);if(o||(s=s.ownerDocument||s,o={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(e,o),(i=s.querySelector(lu(e)))&&!i._p&&(o.instance=i,o.state.loading=5),qa.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},qa.set(e,n),i||yF(s,e,n,o.state))),t&&a===null)throw Error(ce(528,""));return o}if(t&&a!==null)throw Error(ce(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=oc(n),n=ml(s).hoistableScripts,a=n.get(t),a||(a={type:"script",instance:null,count:0,state:null},n.set(t,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(ce(444,e))}}function Bl(e){return'href="'+Ba(e)+'"'}function lu(e){return'link[rel="stylesheet"]['+e+"]"}function M4(e){return Lt({},e,{"data-precedence":e.precedence,precedence:null})}function yF(e,t,n,a){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?a.loading=1:(t=e.createElement("link"),a.preload=t,t.addEventListener("load",function(){return a.loading|=1}),t.addEventListener("error",function(){return a.loading|=2}),En(t,"link",n),xn(t),e.head.appendChild(t))}function oc(e){return'[src="'+Ba(e)+'"]'}function cu(e){return"script[async]"+e}function $E(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+Ba(n.href)+'"]');if(a)return t.instance=a,xn(a),a;var s=Lt({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),xn(a),En(a,"style",s),Th(a,n.precedence,e),t.instance=a;case"stylesheet":s=Bl(n.href);var i=e.querySelector(lu(s));if(i)return t.state.loading|=4,t.instance=i,xn(i),i;a=M4(n),(s=qa.get(s))&&ZN(a,s),i=(e.ownerDocument||e).createElement("link"),xn(i);var o=i;return o._p=new Promise(function(l,c){o.onload=l,o.onerror=c}),En(i,"link",a),t.state.loading|=4,Th(i,n.precedence,e),t.instance=i;case"script":return i=oc(n.src),(s=e.querySelector(cu(i)))?(t.instance=s,xn(s),s):(a=n,(s=qa.get(i))&&(a=Lt({},n),QN(a,s)),e=e.ownerDocument||e,s=e.createElement("script"),xn(s),En(s,"link",a),e.head.appendChild(s),t.instance=s);case"void":return null;default:throw Error(ce(443,t.type))}else t.type==="stylesheet"&&!(t.state.loading&4)&&(a=t.instance,t.state.loading|=4,Th(a,n.precedence,e));return t.instance}function Th(e,t,n){for(var a=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),s=a.length?a[a.length-1]:null,i=s,o=0;o<a.length;o++){var l=a[o];if(l.dataset.precedence===t)i=l;else if(i!==s)break}i?i.parentNode.insertBefore(e,i.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function ZN(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function QN(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Ch=null;function HE(e,t,n){if(Ch===null){var a=new Map,s=Ch=new Map;s.set(n,a)}else s=Ch,a=s.get(n),a||(a=new Map,s.set(n,a));if(a.has(e))return a;for(a.set(e,null),n=n.getElementsByTagName(e),s=0;s<n.length;s++){var i=n[s];if(!(i[Qd]||i[jn]||e==="link"&&i.getAttribute("rel")==="stylesheet")&&i.namespaceURI!=="http://www.w3.org/2000/svg"){var o=i.getAttribute(t)||"";o=e+o;var l=a.get(o);l?l.push(i):a.set(o,[i])}}return a}function qE(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function vF(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function L4(e){return!(e.type==="stylesheet"&&!(e.state.loading&3))}var Sd=null;function wF(){}function NF(e,t,n){if(Sd===null)throw Error(ce(475));var a=Sd;if(t.type==="stylesheet"&&(typeof n.media!="string"||matchMedia(n.media).matches!==!1)&&!(t.state.loading&4)){if(t.instance===null){var s=Bl(n.href),i=e.querySelector(lu(s));if(i){e=i._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(a.count++,a=pf.bind(a),e.then(a,a)),t.state.loading|=4,t.instance=i,xn(i);return}i=e.ownerDocument||e,n=M4(n),(s=qa.get(s))&&ZN(n,s),i=i.createElement("link"),xn(i);var o=i;o._p=new Promise(function(l,c){o.onload=l,o.onerror=c}),En(i,"link",n),t.instance=i}a.stylesheets===null&&(a.stylesheets=new Map),a.stylesheets.set(t,e),(e=t.state.preload)&&!(t.state.loading&3)&&(a.count++,t=pf.bind(a),e.addEventListener("load",t),e.addEventListener("error",t))}}function SF(){if(Sd===null)throw Error(ce(475));var e=Sd;return e.stylesheets&&e.count===0&&hw(e,e.stylesheets),0<e.count?function(t){var n=setTimeout(function(){if(e.stylesheets&&hw(e,e.stylesheets),e.unsuspend){var a=e.unsuspend;e.unsuspend=null,a()}},6e4);return e.unsuspend=t,function(){e.unsuspend=null,clearTimeout(n)}}:null}function pf(){if(this.count--,this.count===0){if(this.stylesheets)hw(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var mf=null;function hw(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,mf=new Map,t.forEach(EF,e),mf=null,pf.call(e))}function EF(e,t){if(!(t.state.loading&4)){var n=mf.get(e);if(n)var a=n.get(null);else{n=new Map,mf.set(e,n);for(var s=e.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i<s.length;i++){var o=s[i];(o.nodeName==="LINK"||o.getAttribute("media")!=="not all")&&(n.set(o.dataset.precedence,o),a=o)}a&&n.set(null,a)}s=t.instance,o=s.getAttribute("data-precedence"),i=n.get(o)||a,i===a&&n.set(null,s),n.set(o,s),this.count++,a=pf.bind(this),s.addEventListener("load",a),s.addEventListener("error",a),i?i.parentNode.insertBefore(s,i.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(s,e.firstChild)),t.state.loading|=4}}var Ed={$$typeof:is,Provider:null,Consumer:null,_currentValue:Ji,_currentValue2:Ji,_threadCount:0};function TF(e,t,n,a,s,i,o,l){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Qp(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Qp(0),this.hiddenUpdates=Qp(null),this.identifierPrefix=a,this.onUncaughtError=s,this.onCaughtError=i,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=l,this.incompleteTransitions=new Map}function U4(e,t,n,a,s,i,o,l,c,u,h,d){return e=new TF(e,t,n,o,l,c,u,d),t=1,i===!0&&(t|=24),i=fa(3,null,null,t),e.current=i,i.stateNode=e,t=CN(),t.refCount++,e.pooledCache=t,t.refCount++,i.memoizedState={element:a,isDehydrated:n,cache:t},jN(i),e}function P4(e){return e?(e=ol,e):ol}function F4(e,t,n,a,s,i){s=P4(s),a.context===null?a.context=s:a.pendingContext=s,a=li(t),a.payload={element:n},i=i===void 0?null:i,i!==null&&(a.callback=i),n=ci(e,a,t),n!==null&&(xa(n,e,t),ed(n,e,t))}function GE(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function JN(e,t){GE(e,t),(e=e.alternate)&&GE(e,t)}function B4(e){if(e.tag===13){var t=rc(e,67108864);t!==null&&xa(t,e,67108864),JN(e,67108864)}}var gf=!0;function CF(e,t,n,a){var s=qe.T;qe.T=null;var i=ht.p;try{ht.p=2,e1(e,t,n,a)}finally{ht.p=i,qe.T=s}}function AF(e,t,n,a){var s=qe.T;qe.T=null;var i=ht.p;try{ht.p=8,e1(e,t,n,a)}finally{ht.p=i,qe.T=s}}function e1(e,t,n,a){if(gf){var s=fw(a);if(s===null)km(e,t,a,bf,n),VE(e,a);else if(kF(s,e,t,n,a))a.stopPropagation();else if(VE(e,a),t&4&&-1<jF.indexOf(e)){for(;s!==null;){var i=ac(s);if(i!==null)switch(i.tag){case 3:if(i=i.stateNode,i.current.memoizedState.isDehydrated){var o=Hi(i.pendingLanes);if(o!==0){var l=i;for(l.pendingLanes|=2,l.entangledLanes|=2;o;){var c=1<<31-ga(o);l.entanglements[1]|=c,o&=~c}Fr(i),!(yt&6)&&(of=Or()+500,ou(0))}}break;case 13:l=rc(i,2),l!==null&&xa(l,i,2),ip(),JN(i,2)}if(i=fw(a),i===null&&km(e,t,a,bf,n),i===s)break;s=i}s!==null&&a.stopPropagation()}else km(e,t,a,null,n)}}function fw(e){return e=gN(e),t1(e)}var bf=null;function t1(e){if(bf=null,e=tl(e),e!==null){var t=Wd(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=uO(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return bf=e,null}function z4(e){switch(e){case"beforetoggle":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"toggle":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 2;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"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(f6()){case mO:return 2;case gO:return 8;case qh:case p6:return 32;case bO:return 268435456;default:return 32}default:return 32}}var pw=!1,hi=null,fi=null,pi=null,Td=new Map,Cd=new Map,Js=[],jF="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".split(" ");function VE(e,t){switch(e){case"focusin":case"focusout":hi=null;break;case"dragenter":case"dragleave":fi=null;break;case"mouseover":case"mouseout":pi=null;break;case"pointerover":case"pointerout":Td.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Cd.delete(t.pointerId)}}function Ec(e,t,n,a,s,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:a,nativeEvent:i,targetContainers:[s]},t!==null&&(t=ac(t),t!==null&&B4(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function kF(e,t,n,a,s){switch(t){case"focusin":return hi=Ec(hi,e,t,n,a,s),!0;case"dragenter":return fi=Ec(fi,e,t,n,a,s),!0;case"mouseover":return pi=Ec(pi,e,t,n,a,s),!0;case"pointerover":var i=s.pointerId;return Td.set(i,Ec(Td.get(i)||null,e,t,n,a,s)),!0;case"gotpointercapture":return i=s.pointerId,Cd.set(i,Ec(Cd.get(i)||null,e,t,n,a,s)),!0}return!1}function $4(e){var t=tl(e.target);if(t!==null){var n=Wd(t);if(n!==null){if(t=n.tag,t===13){if(t=uO(n),t!==null){e.blockedOn=t,N6(e.priority,function(){if(n.tag===13){var a=ba();a=hN(a);var s=rc(n,a);s!==null&&xa(s,n,a),JN(n,a)}});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ah(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=fw(e.nativeEvent);if(n===null){n=e.nativeEvent;var a=new n.constructor(n.type,n);R0=a,n.target.dispatchEvent(a),R0=null}else return t=ac(n),t!==null&&B4(t),e.blockedOn=n,!1;t.shift()}return!0}function YE(e,t,n){Ah(e)&&n.delete(t)}function _F(){pw=!1,hi!==null&&Ah(hi)&&(hi=null),fi!==null&&Ah(fi)&&(fi=null),pi!==null&&Ah(pi)&&(pi=null),Td.forEach(YE),Cd.forEach(YE)}function zu(e,t){e.blockedOn===t&&(e.blockedOn=null,pw||(pw=!0,fn.unstable_scheduleCallback(fn.unstable_NormalPriority,_F)))}var $u=null;function WE(e){$u!==e&&($u=e,fn.unstable_scheduleCallback(fn.unstable_NormalPriority,function(){$u===e&&($u=null);for(var t=0;t<e.length;t+=3){var n=e[t],a=e[t+1],s=e[t+2];if(typeof a!="function"){if(t1(a||n)===null)continue;break}var i=ac(n);i!==null&&(e.splice(t,3),t-=3,Y0(i,{pending:!0,data:s,method:n.method,action:a},a,s))}}))}function Ad(e){function t(c){return zu(c,e)}hi!==null&&zu(hi,e),fi!==null&&zu(fi,e),pi!==null&&zu(pi,e),Td.forEach(t),Cd.forEach(t);for(var n=0;n<Js.length;n++){var a=Js[n];a.blockedOn===e&&(a.blockedOn=null)}for(;0<Js.length&&(n=Js[0],n.blockedOn===null);)$4(n),n.blockedOn===null&&Js.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(a=0;a<n.length;a+=3){var s=n[a],i=n[a+1],o=s[Xn]||null;if(typeof i=="function")o||WE(n);else if(o){var l=null;if(i&&i.hasAttribute("formAction")){if(s=i,o=i[Xn]||null)l=o.formAction;else if(t1(s)!==null)continue}else l=o.action;typeof l=="function"?n[a+1]=l:(n.splice(a,3),a-=3),WE(n)}}}function n1(e){this._internalRoot=e}dp.prototype.render=n1.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(ce(409));var n=t.current,a=ba();F4(n,a,e,t,null,null)};dp.prototype.unmount=n1.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;F4(e.current,2,null,e,null,null),ip(),t[nc]=null}};function dp(e){this._internalRoot=e}dp.prototype.unstable_scheduleHydration=function(e){if(e){var t=NO();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Js.length&&t!==0&&t<Js[n].priority;n++);Js.splice(n,0,e),n===0&&$4(e)}};var XE=cO.version;if(XE!=="19.1.0")throw Error(ce(527,XE,"19.1.0"));ht.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(ce(188)):(e=Object.keys(e).join(","),Error(ce(268,e)));return e=i6(t),e=e!==null?hO(e):null,e=e===null?null:e.stateNode,e};var RF={bundleType:0,version:"19.1.0",rendererPackageName:"react-dom",currentDispatcherRef:qe,reconcilerVersion:"19.1.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Hu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Hu.isDisabled&&Hu.supportsFiber)try{Xd=Hu.inject(RF),ma=Hu}catch{}}Yf.createRoot=function(e,t){if(!dO(e))throw Error(ce(299));var n=!1,a="",s=UD,i=PD,o=FD,l=null;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(a=t.identifierPrefix),t.onUncaughtError!==void 0&&(s=t.onUncaughtError),t.onCaughtError!==void 0&&(i=t.onCaughtError),t.onRecoverableError!==void 0&&(o=t.onRecoverableError),t.unstable_transitionCallbacks!==void 0&&(l=t.unstable_transitionCallbacks)),t=U4(e,1,!1,null,null,n,a,s,i,o,l,null),e[nc]=t.current,KN(e),new n1(t)};Yf.hydrateRoot=function(e,t,n){if(!dO(e))throw Error(ce(299));var a=!1,s="",i=UD,o=PD,l=FD,c=null,u=null;return n!=null&&(n.unstable_strictMode===!0&&(a=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onUncaughtError!==void 0&&(i=n.onUncaughtError),n.onCaughtError!==void 0&&(o=n.onCaughtError),n.onRecoverableError!==void 0&&(l=n.onRecoverableError),n.unstable_transitionCallbacks!==void 0&&(c=n.unstable_transitionCallbacks),n.formState!==void 0&&(u=n.formState)),t=U4(e,1,!0,t,n??null,a,s,i,o,l,c,u),t.context=P4(null),n=t.current,a=ba(),a=hN(a),s=li(a),s.callback=null,ci(n,s,a),n=a,t.current.lanes=n,Zd(t,n),Fr(t),e[nc]=t.current,KN(e),new dp(t)};Yf.version="19.1.0";function H4(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(H4)}catch(e){console.error(e)}}H4(),nO.exports=Yf;var OF=nO.exports;const DF=Yd(OF);/**
|
|
50
50
|
* @remix-run/router v1.23.1
|
|
51
51
|
*
|
|
52
52
|
* Copyright (c) Remix Software Inc.
|
|
@@ -55,7 +55,7 @@ Error generating stack: `+n.message+`
|
|
|
55
55
|
* LICENSE.md file in the root directory of this source tree.
|
|
56
56
|
*
|
|
57
57
|
* @license MIT
|
|
58
|
-
*/function jd(){return jd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},jd.apply(this,arguments)}var si;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(si||(si={}));const KE="popstate";function IF(e){e===void 0&&(e={});function t(a,s){let{pathname:i,search:o,hash:l}=a.location;return mw("",{pathname:i,search:o,hash:l},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function n(a,s){return typeof s=="string"?s:xf(s)}return LF(t,n,null,e)}function an(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function a1(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function MF(){return Math.random().toString(36).substr(2,8)}function ZE(e,t){return{usr:e.state,key:e.key,idx:t}}function mw(e,t,n,a){return n===void 0&&(n=null),jd({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?lc(t):t,{state:n,key:t&&t.key||a||MF()})}function xf(e){let{pathname:t="/",search:n="",hash:a=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),a&&a!=="#"&&(t+=a.charAt(0)==="#"?a:"#"+a),t}function lc(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let a=e.indexOf("?");a>=0&&(t.search=e.substr(a),e=e.substr(0,a)),e&&(t.pathname=e)}return t}function LF(e,t,n,a){a===void 0&&(a={});let{window:s=document.defaultView,v5Compat:i=!1}=a,o=s.history,l=si.Pop,c=null,u=h();u==null&&(u=0,o.replaceState(jd({},o.state,{idx:u}),""));function h(){return(o.state||{idx:null}).idx}function d(){l=si.Pop;let N=h(),b=N==null?null:N-u;u=N,c&&c({action:l,location:x.location,delta:b})}function f(N,b){l=si.Push;let y=mw(x.location,N,b);u=h()+1;let g=ZE(y,u),w=x.createHref(y);try{o.pushState(g,"",w)}catch(S){if(S instanceof DOMException&&S.name==="DataCloneError")throw S;s.location.assign(w)}i&&c&&c({action:l,location:x.location,delta:1})}function p(N,b){l=si.Replace;let y=mw(x.location,N,b);u=h();let g=ZE(y,u),w=x.createHref(y);o.replaceState(g,"",w),i&&c&&c({action:l,location:x.location,delta:0})}function v(N){let b=s.location.origin!=="null"?s.location.origin:s.location.href,y=typeof N=="string"?N:xf(N);return y=y.replace(/ $/,"%20"),an(b,"No window.location.(origin|href) available to create URL for href: "+y),new URL(y,b)}let x={get action(){return l},get location(){return e(s,o)},listen(N){if(c)throw new Error("A history only accepts one active listener");return s.addEventListener(KE,d),c=N,()=>{s.removeEventListener(KE,d),c=null}},createHref(N){return t(s,N)},createURL:v,encodeLocation(N){let b=v(N);return{pathname:b.pathname,search:b.search,hash:b.hash}},push:f,replace:p,go(N){return o.go(N)}};return x}var QE;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(QE||(QE={}));function UF(e,t,n){return n===void 0&&(n="/"),PF(e,t,n)}function PF(e,t,n,a){let s=typeof t=="string"?lc(t):t,i=r1(s.pathname||"/",n);if(i==null)return null;let o=
|
|
58
|
+
*/function jd(){return jd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},jd.apply(this,arguments)}var si;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(si||(si={}));const KE="popstate";function IF(e){e===void 0&&(e={});function t(a,s){let{pathname:i,search:o,hash:l}=a.location;return mw("",{pathname:i,search:o,hash:l},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function n(a,s){return typeof s=="string"?s:xf(s)}return LF(t,n,null,e)}function an(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function a1(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function MF(){return Math.random().toString(36).substr(2,8)}function ZE(e,t){return{usr:e.state,key:e.key,idx:t}}function mw(e,t,n,a){return n===void 0&&(n=null),jd({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?lc(t):t,{state:n,key:t&&t.key||a||MF()})}function xf(e){let{pathname:t="/",search:n="",hash:a=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),a&&a!=="#"&&(t+=a.charAt(0)==="#"?a:"#"+a),t}function lc(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let a=e.indexOf("?");a>=0&&(t.search=e.substr(a),e=e.substr(0,a)),e&&(t.pathname=e)}return t}function LF(e,t,n,a){a===void 0&&(a={});let{window:s=document.defaultView,v5Compat:i=!1}=a,o=s.history,l=si.Pop,c=null,u=h();u==null&&(u=0,o.replaceState(jd({},o.state,{idx:u}),""));function h(){return(o.state||{idx:null}).idx}function d(){l=si.Pop;let N=h(),b=N==null?null:N-u;u=N,c&&c({action:l,location:x.location,delta:b})}function f(N,b){l=si.Push;let y=mw(x.location,N,b);u=h()+1;let g=ZE(y,u),w=x.createHref(y);try{o.pushState(g,"",w)}catch(S){if(S instanceof DOMException&&S.name==="DataCloneError")throw S;s.location.assign(w)}i&&c&&c({action:l,location:x.location,delta:1})}function p(N,b){l=si.Replace;let y=mw(x.location,N,b);u=h();let g=ZE(y,u),w=x.createHref(y);o.replaceState(g,"",w),i&&c&&c({action:l,location:x.location,delta:0})}function v(N){let b=s.location.origin!=="null"?s.location.origin:s.location.href,y=typeof N=="string"?N:xf(N);return y=y.replace(/ $/,"%20"),an(b,"No window.location.(origin|href) available to create URL for href: "+y),new URL(y,b)}let x={get action(){return l},get location(){return e(s,o)},listen(N){if(c)throw new Error("A history only accepts one active listener");return s.addEventListener(KE,d),c=N,()=>{s.removeEventListener(KE,d),c=null}},createHref(N){return t(s,N)},createURL:v,encodeLocation(N){let b=v(N);return{pathname:b.pathname,search:b.search,hash:b.hash}},push:f,replace:p,go(N){return o.go(N)}};return x}var QE;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(QE||(QE={}));function UF(e,t,n){return n===void 0&&(n="/"),PF(e,t,n)}function PF(e,t,n,a){let s=typeof t=="string"?lc(t):t,i=r1(s.pathname||"/",n);if(i==null)return null;let o=q4(e);FF(o);let l=null;for(let c=0;l==null&&c<o.length;++c){let u=ZF(i);l=WF(o[c],u)}return l}function q4(e,t,n,a){t===void 0&&(t=[]),n===void 0&&(n=[]),a===void 0&&(a="");let s=(i,o,l)=>{let c={relativePath:l===void 0?i.path||"":l,caseSensitive:i.caseSensitive===!0,childrenIndex:o,route:i};c.relativePath.startsWith("/")&&(an(c.relativePath.startsWith(a),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+a+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(a.length));let u=mi([a,c.relativePath]),h=n.concat(c);i.children&&i.children.length>0&&(an(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),q4(i.children,t,h,u)),!(i.path==null&&!i.index)&&t.push({path:u,score:VF(u,i.index),routesMeta:h})};return e.forEach((i,o)=>{var l;if(i.path===""||!((l=i.path)!=null&&l.includes("?")))s(i,o);else for(let c of G4(i.path))s(i,o,c)}),t}function G4(e){let t=e.split("/");if(t.length===0)return[];let[n,...a]=t,s=n.endsWith("?"),i=n.replace(/\?$/,"");if(a.length===0)return s?[i,""]:[i];let o=G4(a.join("/")),l=[];return l.push(...o.map(c=>c===""?i:[i,c].join("/"))),s&&l.push(...o),l.map(c=>e.startsWith("/")&&c===""?"/":c)}function FF(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:YF(t.routesMeta.map(a=>a.childrenIndex),n.routesMeta.map(a=>a.childrenIndex)))}const BF=/^:[\w-]+$/,zF=3,$F=2,HF=1,qF=10,GF=-2,JE=e=>e==="*";function VF(e,t){let n=e.split("/"),a=n.length;return n.some(JE)&&(a+=GF),t&&(a+=$F),n.filter(s=>!JE(s)).reduce((s,i)=>s+(BF.test(i)?zF:i===""?HF:qF),a)}function YF(e,t){return e.length===t.length&&e.slice(0,-1).every((a,s)=>a===t[s])?e[e.length-1]-t[t.length-1]:0}function WF(e,t,n){let{routesMeta:a}=e,s={},i="/",o=[];for(let l=0;l<a.length;++l){let c=a[l],u=l===a.length-1,h=i==="/"?t:t.slice(i.length)||"/",d=XF({path:c.relativePath,caseSensitive:c.caseSensitive,end:u},h),f=c.route;if(!d)return null;Object.assign(s,d.params),o.push({params:s,pathname:mi([i,d.pathname]),pathnameBase:nB(mi([i,d.pathnameBase])),route:f}),d.pathnameBase!=="/"&&(i=mi([i,d.pathnameBase]))}return o}function XF(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,a]=KF(e.path,e.caseSensitive,e.end),s=t.match(n);if(!s)return null;let i=s[0],o=i.replace(/(.)\/+$/,"$1"),l=s.slice(1);return{params:a.reduce((u,h,d)=>{let{paramName:f,isOptional:p}=h;if(f==="*"){let x=l[d]||"";o=i.slice(0,i.length-x.length).replace(/(.)\/+$/,"$1")}const v=l[d];return p&&!v?u[f]=void 0:u[f]=(v||"").replace(/%2F/g,"/"),u},{}),pathname:i,pathnameBase:o,pattern:e}}function KF(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),a1(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 a=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,l,c)=>(a.push({paramName:l,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(a.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),a]}function ZF(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return a1(!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 r1(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,a=e.charAt(n);return a&&a!=="/"?null:e.slice(n)||"/"}const QF=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,JF=e=>QF.test(e);function eB(e,t){t===void 0&&(t="/");let{pathname:n,search:a="",hash:s=""}=typeof e=="string"?lc(e):e,i;if(n)if(JF(n))i=n;else{if(n.includes("//")){let o=n;n=n.replace(/\/\/+/g,"/"),a1(!1,"Pathnames cannot have embedded double slashes - normalizing "+(o+" -> "+n))}n.startsWith("/")?i=e2(n.substring(1),"/"):i=e2(n,t)}else i=t;return{pathname:i,search:aB(a),hash:rB(s)}}function e2(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?n.length>1&&n.pop():s!=="."&&n.push(s)}),n.length>1?n.join("/"):"/"}function Rm(e,t,n,a){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(a)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function tB(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function V4(e,t){let n=tB(e);return t?n.map((a,s)=>s===n.length-1?a.pathname:a.pathnameBase):n.map(a=>a.pathnameBase)}function Y4(e,t,n,a){a===void 0&&(a=!1);let s;typeof e=="string"?s=lc(e):(s=jd({},e),an(!s.pathname||!s.pathname.includes("?"),Rm("?","pathname","search",s)),an(!s.pathname||!s.pathname.includes("#"),Rm("#","pathname","hash",s)),an(!s.search||!s.search.includes("#"),Rm("#","search","hash",s)));let i=e===""||s.pathname==="",o=i?"/":s.pathname,l;if(o==null)l=n;else{let d=t.length-1;if(!a&&o.startsWith("..")){let f=o.split("/");for(;f[0]==="..";)f.shift(),d-=1;s.pathname=f.join("/")}l=d>=0?t[d]:"/"}let c=eB(s,l),u=o&&o!=="/"&&o.endsWith("/"),h=(i||o===".")&&n.endsWith("/");return!c.pathname.endsWith("/")&&(u||h)&&(c.pathname+="/"),c}const mi=e=>e.join("/").replace(/\/\/+/g,"/"),nB=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),aB=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,rB=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function sB(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const W4=["post","put","patch","delete"];new Set(W4);const iB=["get",...W4];new Set(iB);/**
|
|
59
59
|
* React Router v6.30.2
|
|
60
60
|
*
|
|
61
61
|
* Copyright (c) Remix Software Inc.
|
|
@@ -64,7 +64,7 @@ Error generating stack: `+n.message+`
|
|
|
64
64
|
* LICENSE.md file in the root directory of this source tree.
|
|
65
65
|
*
|
|
66
66
|
* @license MIT
|
|
67
|
-
*/function kd(){return kd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},kd.apply(this,arguments)}const s1=m.createContext(null),oB=m.createContext(null),ko=m.createContext(null),up=m.createContext(null),Ri=m.createContext({outlet:null,matches:[],isDataRoute:!1}),
|
|
67
|
+
*/function kd(){return kd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},kd.apply(this,arguments)}const s1=m.createContext(null),oB=m.createContext(null),ko=m.createContext(null),up=m.createContext(null),Ri=m.createContext({outlet:null,matches:[],isDataRoute:!1}),X4=m.createContext(null);function lB(e,t){let{relative:n}=t===void 0?{}:t;du()||an(!1);let{basename:a,navigator:s}=m.useContext(ko),{hash:i,pathname:o,search:l}=Z4(e,{relative:n}),c=o;return a!=="/"&&(c=o==="/"?a:mi([a,o])),s.createHref({pathname:c,search:l,hash:i})}function du(){return m.useContext(up)!=null}function cc(){return du()||an(!1),m.useContext(up).location}function K4(e){m.useContext(ko).static||m.useLayoutEffect(e)}function ur(){let{isDataRoute:e}=m.useContext(Ri);return e?wB():cB()}function cB(){du()||an(!1);let e=m.useContext(s1),{basename:t,future:n,navigator:a}=m.useContext(ko),{matches:s}=m.useContext(Ri),{pathname:i}=cc(),o=JSON.stringify(V4(s,n.v7_relativeSplatPath)),l=m.useRef(!1);return K4(()=>{l.current=!0}),m.useCallback(function(u,h){if(h===void 0&&(h={}),!l.current)return;if(typeof u=="number"){a.go(u);return}let d=Y4(u,JSON.parse(o),i,h.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:mi([t,d.pathname])),(h.replace?a.replace:a.push)(d,h.state,h)},[t,a,o,i,e])}function i1(){let{matches:e}=m.useContext(Ri),t=e[e.length-1];return t?t.params:{}}function Z4(e,t){let{relative:n}=t===void 0?{}:t,{future:a}=m.useContext(ko),{matches:s}=m.useContext(Ri),{pathname:i}=cc(),o=JSON.stringify(V4(s,a.v7_relativeSplatPath));return m.useMemo(()=>Y4(e,JSON.parse(o),i,n==="path"),[e,o,i,n])}function dB(e,t){return uB(e,t)}function uB(e,t,n,a){du()||an(!1);let{navigator:s}=m.useContext(ko),{matches:i}=m.useContext(Ri),o=i[i.length-1],l=o?o.params:{};o&&o.pathname;let c=o?o.pathnameBase:"/";o&&o.route;let u=cc(),h;if(t){var d;let N=typeof t=="string"?lc(t):t;c==="/"||(d=N.pathname)!=null&&d.startsWith(c)||an(!1),h=N}else h=u;let f=h.pathname||"/",p=f;if(c!=="/"){let N=c.replace(/^\//,"").split("/");p="/"+f.replace(/^\//,"").split("/").slice(N.length).join("/")}let v=UF(e,{pathname:p}),x=gB(v&&v.map(N=>Object.assign({},N,{params:Object.assign({},l,N.params),pathname:mi([c,s.encodeLocation?s.encodeLocation(N.pathname).pathname:N.pathname]),pathnameBase:N.pathnameBase==="/"?c:mi([c,s.encodeLocation?s.encodeLocation(N.pathnameBase).pathname:N.pathnameBase])})),i,n,a);return t&&x?m.createElement(up.Provider,{value:{location:kd({pathname:"/",search:"",hash:"",state:null,key:"default"},h),navigationType:si.Pop}},x):x}function hB(){let e=vB(),t=sB(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return m.createElement(m.Fragment,null,m.createElement("h2",null,"Unexpected Application Error!"),m.createElement("h3",{style:{fontStyle:"italic"}},t),n?m.createElement("pre",{style:s},n):null,null)}const fB=m.createElement(hB,null);class pB extends m.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?m.createElement(Ri.Provider,{value:this.props.routeContext},m.createElement(X4.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function mB(e){let{routeContext:t,match:n,children:a}=e,s=m.useContext(s1);return s&&s.static&&s.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=n.route.id),m.createElement(Ri.Provider,{value:t},a)}function gB(e,t,n,a){var s;if(t===void 0&&(t=[]),n===void 0&&(n=null),a===void 0&&(a=null),e==null){var i;if(!n)return null;if(n.errors)e=n.matches;else if((i=a)!=null&&i.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let o=e,l=(s=n)==null?void 0:s.errors;if(l!=null){let h=o.findIndex(d=>d.route.id&&(l==null?void 0:l[d.route.id])!==void 0);h>=0||an(!1),o=o.slice(0,Math.min(o.length,h+1))}let c=!1,u=-1;if(n&&a&&a.v7_partialHydration)for(let h=0;h<o.length;h++){let d=o[h];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(u=h),d.route.id){let{loaderData:f,errors:p}=n,v=d.route.loader&&f[d.route.id]===void 0&&(!p||p[d.route.id]===void 0);if(d.route.lazy||v){c=!0,u>=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((h,d,f)=>{let p,v=!1,x=null,N=null;n&&(p=l&&d.route.id?l[d.route.id]:void 0,x=d.route.errorElement||fB,c&&(u<0&&f===0?(NB("route-fallback"),v=!0,N=null):u===f&&(v=!0,N=d.route.hydrateFallbackElement||null)));let b=t.concat(o.slice(0,f+1)),y=()=>{let g;return p?g=x:v?g=N:d.route.Component?g=m.createElement(d.route.Component,null):d.route.element?g=d.route.element:g=h,m.createElement(mB,{match:d,routeContext:{outlet:h,matches:b,isDataRoute:n!=null},children:g})};return n&&(d.route.ErrorBoundary||d.route.errorElement||f===0)?m.createElement(pB,{location:n.location,revalidation:n.revalidation,component:x,error:p,children:y(),routeContext:{outlet:null,matches:b,isDataRoute:!0}}):y()},null)}var Q4=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Q4||{}),J4=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}(J4||{});function bB(e){let t=m.useContext(s1);return t||an(!1),t}function xB(e){let t=m.useContext(oB);return t||an(!1),t}function yB(e){let t=m.useContext(Ri);return t||an(!1),t}function eI(e){let t=yB(),n=t.matches[t.matches.length-1];return n.route.id||an(!1),n.route.id}function vB(){var e;let t=m.useContext(X4),n=xB(),a=eI();return t!==void 0?t:(e=n.errors)==null?void 0:e[a]}function wB(){let{router:e}=bB(Q4.UseNavigateStable),t=eI(J4.UseNavigateStable),n=m.useRef(!1);return K4(()=>{n.current=!0}),m.useCallback(function(s,i){i===void 0&&(i={}),n.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,kd({fromRouteId:t},i)))},[e,t])}const t2={};function NB(e,t,n){t2[e]||(t2[e]=!0)}function SB(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function Dn(e){an(!1)}function EB(e){let{basename:t="/",children:n=null,location:a,navigationType:s=si.Pop,navigator:i,static:o=!1,future:l}=e;du()&&an(!1);let c=t.replace(/^\/*/,"/"),u=m.useMemo(()=>({basename:c,navigator:i,static:o,future:kd({v7_relativeSplatPath:!1},l)}),[c,l,i,o]);typeof a=="string"&&(a=lc(a));let{pathname:h="/",search:d="",hash:f="",state:p=null,key:v="default"}=a,x=m.useMemo(()=>{let N=r1(h,c);return N==null?null:{location:{pathname:N,search:d,hash:f,state:p,key:v},navigationType:s}},[c,h,d,f,p,v,s]);return x==null?null:m.createElement(ko.Provider,{value:u},m.createElement(up.Provider,{children:n,value:x}))}function TB(e){let{children:t,location:n}=e;return dB(gw(t),n)}new Promise(()=>{});function gw(e,t){t===void 0&&(t=[]);let n=[];return m.Children.forEach(e,(a,s)=>{if(!m.isValidElement(a))return;let i=[...t,s];if(a.type===m.Fragment){n.push.apply(n,gw(a.props.children,i));return}a.type!==Dn&&an(!1),!a.props.index||!a.props.children||an(!1);let o={id:a.props.id||i.join("-"),caseSensitive:a.props.caseSensitive,element:a.props.element,Component:a.props.Component,index:a.props.index,path:a.props.path,loader:a.props.loader,action:a.props.action,errorElement:a.props.errorElement,ErrorBoundary:a.props.ErrorBoundary,hasErrorBoundary:a.props.ErrorBoundary!=null||a.props.errorElement!=null,shouldRevalidate:a.props.shouldRevalidate,handle:a.props.handle,lazy:a.props.lazy};a.props.children&&(o.children=gw(a.props.children,i)),n.push(o)}),n}/**
|
|
68
68
|
* React Router DOM v6.30.2
|
|
69
69
|
*
|
|
70
70
|
* Copyright (c) Remix Software Inc.
|
|
@@ -73,7 +73,7 @@ Error generating stack: `+n.message+`
|
|
|
73
73
|
* LICENSE.md file in the root directory of this source tree.
|
|
74
74
|
*
|
|
75
75
|
* @license MIT
|
|
76
|
-
*/function bw(){return bw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},bw.apply(this,arguments)}function CB(e,t){if(e==null)return{};var n={},a=Object.keys(e),s,i;for(i=0;i<a.length;i++)s=a[i],!(t.indexOf(s)>=0)&&(n[s]=e[s]);return n}function AB(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function jB(e,t){return e.button===0&&(!t||t==="_self")&&!AB(e)}function xw(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let a=e[n];return t.concat(Array.isArray(a)?a.map(s=>[n,s]):[[n,a]])},[]))}function kB(e,t){let n=xw(e);return t&&t.forEach((a,s)=>{n.has(s)||t.getAll(s).forEach(i=>{n.append(s,i)})}),n}const _B=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],RB="6";try{window.__reactRouterVersion=RB}catch{}const OB="startTransition",n2=Vf[OB];function DB(e){let{basename:t,children:n,future:a,window:s}=e,i=m.useRef();i.current==null&&(i.current=IF({window:s,v5Compat:!0}));let o=i.current,[l,c]=m.useState({action:o.action,location:o.location}),{v7_startTransition:u}=a||{},h=m.useCallback(d=>{u&&n2?n2(()=>c(d)):c(d)},[c,u]);return m.useLayoutEffect(()=>o.listen(h),[o,h]),m.useEffect(()=>SB(a),[a]),m.createElement(EB,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:o,future:a})}const IB=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",MB=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,o1=m.forwardRef(function(t,n){let{onClick:a,relative:s,reloadDocument:i,replace:o,state:l,target:c,to:u,preventScrollReset:h,viewTransition:d}=t,f=CB(t,_B),{basename:p}=m.useContext(ko),v,x=!1;if(typeof u=="string"&&MB.test(u)&&(v=u,IB))try{let g=new URL(window.location.href),w=u.startsWith("//")?new URL(g.protocol+u):new URL(u),S=r1(w.pathname,p);w.origin===g.origin&&S!=null?u=S+w.search+w.hash:x=!0}catch{}let N=lB(u,{relative:s}),b=LB(u,{replace:o,state:l,target:c,preventScrollReset:h,relative:s,viewTransition:d});function y(g){a&&a(g),g.defaultPrevented||b(g)}return m.createElement("a",bw({},f,{href:v||N,onClick:x||i?a:y,ref:n,target:c}))});var a2;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(a2||(a2={}));var r2;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(r2||(r2={}));function LB(e,t){let{target:n,replace:a,state:s,preventScrollReset:i,relative:o,viewTransition:l}=t===void 0?{}:t,c=ur(),u=cc(),h=ZD(e,{relative:o});return m.useCallback(d=>{if(jB(d,n)){d.preventDefault();let f=a!==void 0?a:xf(u)===xf(h);c(e,{replace:f,state:s,preventScrollReset:i,relative:o,viewTransition:l})}},[u,c,h,a,s,n,e,i,o,l])}function UB(e){let t=m.useRef(xw(e)),n=m.useRef(!1),a=cc(),s=m.useMemo(()=>kB(a.search,n.current?null:t.current),[a.search]),i=ur(),o=m.useCallback((l,c)=>{const u=xw(typeof l=="function"?l(s):l);n.current=!0,i("?"+u,c)},[i,s]);return[s,o]}function PB(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const FB=e=>{switch(e){case"success":return $B;case"info":return qB;case"warning":return HB;case"error":return GB;default:return null}},BB=Array(12).fill(0),zB=({visible:e,className:t})=>J.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},J.createElement("div",{className:"sonner-spinner"},BB.map((n,a)=>J.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${a}`})))),$B=J.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},J.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"})),HB=J.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},J.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"})),qB=J.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},J.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"})),GB=J.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},J.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"})),VB=J.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"},J.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),J.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),YB=()=>{const[e,t]=J.useState(document.hidden);return J.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let yw=1;class WB{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var n;const{message:a,...s}=t,i=typeof(t==null?void 0:t.id)=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:yw++,o=this.toasts.find(c=>c.id===i),l=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(i)&&this.dismissedToasts.delete(i),o?this.toasts=this.toasts.map(c=>c.id===i?(this.publish({...c,...t,id:i,title:a}),{...c,...t,id:i,dismissible:l,title:a}):c):this.addToast({title:a,...s,dismissible:l,id:i}),i},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:t,dismiss:!0})))):this.toasts.forEach(n=>{this.subscribers.forEach(a=>a({id:n.id,dismiss:!0}))}),t),this.message=(t,n)=>this.create({...n,message:t}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let a;n.loading!==void 0&&(a=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const s=Promise.resolve(t instanceof Function?t():t);let i=a!==void 0,o;const l=s.then(async u=>{if(o=["resolve",u],J.isValidElement(u))i=!1,this.create({id:a,type:"default",message:u});else if(KB(u)&&!u.ok){i=!1;const d=typeof n.error=="function"?await n.error(`HTTP error! status: ${u.status}`):n.error,f=typeof n.description=="function"?await n.description(`HTTP error! status: ${u.status}`):n.description,v=typeof d=="object"&&!J.isValidElement(d)?d:{message:d};this.create({id:a,type:"error",description:f,...v})}else if(u instanceof Error){i=!1;const d=typeof n.error=="function"?await n.error(u):n.error,f=typeof n.description=="function"?await n.description(u):n.description,v=typeof d=="object"&&!J.isValidElement(d)?d:{message:d};this.create({id:a,type:"error",description:f,...v})}else if(n.success!==void 0){i=!1;const d=typeof n.success=="function"?await n.success(u):n.success,f=typeof n.description=="function"?await n.description(u):n.description,v=typeof d=="object"&&!J.isValidElement(d)?d:{message:d};this.create({id:a,type:"success",description:f,...v})}}).catch(async u=>{if(o=["reject",u],n.error!==void 0){i=!1;const h=typeof n.error=="function"?await n.error(u):n.error,d=typeof n.description=="function"?await n.description(u):n.description,p=typeof h=="object"&&!J.isValidElement(h)?h:{message:h};this.create({id:a,type:"error",description:d,...p})}}).finally(()=>{i&&(this.dismiss(a),a=void 0),n.finally==null||n.finally.call(n)}),c=()=>new Promise((u,h)=>l.then(()=>o[0]==="reject"?h(o[1]):u(o[1])).catch(h));return typeof a!="string"&&typeof a!="number"?{unwrap:c}:Object.assign(a,{unwrap:c})},this.custom=(t,n)=>{const a=(n==null?void 0:n.id)||yw++;return this.create({jsx:t(a),id:a,...n}),a},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const Vn=new WB,XB=(e,t)=>{const n=(t==null?void 0:t.id)||yw++;return Vn.addToast({title:e,...t,id:n}),n},KB=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",ZB=XB,QB=()=>Vn.toasts,JB=()=>Vn.getActiveToasts(),H=Object.assign(ZB,{success:Vn.success,info:Vn.info,warning:Vn.warning,error:Vn.error,custom:Vn.custom,message:Vn.message,promise:Vn.promise,dismiss:Vn.dismiss,loading:Vn.loading},{getHistory:QB,getToasts:JB});PB("[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 qu(e){return e.label!==void 0}const ez=3,tz="24px",nz="16px",s2=4e3,az=356,rz=14,sz=45,iz=200;function vr(...e){return e.filter(Boolean).join(" ")}function oz(e){const[t,n]=e.split("-"),a=[];return t&&a.push(t),n&&a.push(n),a}const lz=e=>{var t,n,a,s,i,o,l,c,u;const{invert:h,toast:d,unstyled:f,interacting:p,setHeights:v,visibleToasts:x,heights:N,index:b,toasts:y,expanded:g,removeToast:w,defaultRichColors:S,closeButton:C,style:T,cancelButtonStyle:E,actionButtonStyle:k,className:O="",descriptionClassName:R="",duration:I,position:F,gap:j,expandByDefault:U,classNames:_,icons:M,closeButtonAriaLabel:A="Close toast"}=e,[D,B]=J.useState(null),[G,L]=J.useState(null),[q,X]=J.useState(!1),[K,ne]=J.useState(!1),[te,ee]=J.useState(!1),[ae,ge]=J.useState(!1),[se,fe]=J.useState(!1),[me,Re]=J.useState(0),[Me,Ue]=J.useState(0),$e=J.useRef(d.duration||I||s2),pt=J.useRef(null),Ge=J.useRef(null),jt=b===0,vt=b+1<=x,We=d.type,et=d.dismissible!==!1,Ze=d.className||"",Et=d.descriptionClassName||"",Tt=J.useMemo(()=>N.findIndex(Y=>Y.toastId===d.id)||0,[N,d.id]),qt=J.useMemo(()=>{var Y;return(Y=d.closeButton)!=null?Y:C},[d.closeButton,C]),Wt=J.useMemo(()=>d.duration||I||s2,[d.duration,I]),re=J.useRef(0),we=J.useRef(0),Be=J.useRef(0),V=J.useRef(null),[le,he]=F.split("-"),xe=J.useMemo(()=>N.reduce((Y,be,He)=>He>=Tt?Y:Y+be.height,0),[N,Tt]),De=YB(),Ye=d.invert||h,Q=We==="loading";we.current=J.useMemo(()=>Tt*j+xe,[Tt,xe]),J.useEffect(()=>{$e.current=Wt},[Wt]),J.useEffect(()=>{X(!0)},[]),J.useEffect(()=>{const Y=Ge.current;if(Y){const be=Y.getBoundingClientRect().height;return Ue(be),v(He=>[{toastId:d.id,height:be,position:d.position},...He]),()=>v(He=>He.filter(tt=>tt.toastId!==d.id))}},[v,d.id]),J.useLayoutEffect(()=>{if(!q)return;const Y=Ge.current,be=Y.style.height;Y.style.height="auto";const He=Y.getBoundingClientRect().height;Y.style.height=be,Ue(He),v(tt=>tt.find(Qe=>Qe.toastId===d.id)?tt.map(Qe=>Qe.toastId===d.id?{...Qe,height:He}:Qe):[{toastId:d.id,height:He,position:d.position},...tt])},[q,d.title,d.description,v,d.id,d.jsx,d.action,d.cancel]);const ie=J.useCallback(()=>{ne(!0),Re(we.current),v(Y=>Y.filter(be=>be.toastId!==d.id)),setTimeout(()=>{w(d)},iz)},[d,w,v,we]);J.useEffect(()=>{if(d.promise&&We==="loading"||d.duration===1/0||d.type==="loading")return;let Y;return g||p||De?(()=>{if(Be.current<re.current){const tt=new Date().getTime()-re.current;$e.current=$e.current-tt}Be.current=new Date().getTime()})():(()=>{$e.current!==1/0&&(re.current=new Date().getTime(),Y=setTimeout(()=>{d.onAutoClose==null||d.onAutoClose.call(d,d),ie()},$e.current))})(),()=>clearTimeout(Y)},[g,p,d,We,De,ie]),J.useEffect(()=>{d.delete&&(ie(),d.onDismiss==null||d.onDismiss.call(d,d))},[ie,d.delete]);function Ne(){var Y;if(M!=null&&M.loading){var be;return J.createElement("div",{className:vr(_==null?void 0:_.loader,d==null||(be=d.classNames)==null?void 0:be.loader,"sonner-loader"),"data-visible":We==="loading"},M.loading)}return J.createElement(zB,{className:vr(_==null?void 0:_.loader,d==null||(Y=d.classNames)==null?void 0:Y.loader),visible:We==="loading"})}const ue=d.icon||(M==null?void 0:M[We])||FB(We);var ke,W;return J.createElement("li",{tabIndex:0,ref:Ge,className:vr(O,Ze,_==null?void 0:_.toast,d==null||(t=d.classNames)==null?void 0:t.toast,_==null?void 0:_.default,_==null?void 0:_[We],d==null||(n=d.classNames)==null?void 0:n[We]),"data-sonner-toast":"","data-rich-colors":(ke=d.richColors)!=null?ke:S,"data-styled":!(d.jsx||d.unstyled||f),"data-mounted":q,"data-promise":!!d.promise,"data-swiped":se,"data-removed":K,"data-visible":vt,"data-y-position":le,"data-x-position":he,"data-index":b,"data-front":jt,"data-swiping":te,"data-dismissible":et,"data-type":We,"data-invert":Ye,"data-swipe-out":ae,"data-swipe-direction":G,"data-expanded":!!(g||U&&q),"data-testid":d.testId,style:{"--index":b,"--toasts-before":b,"--z-index":y.length-b,"--offset":`${K?me:we.current}px`,"--initial-height":U?"auto":`${Me}px`,...T,...d.style},onDragEnd:()=>{ee(!1),B(null),V.current=null},onPointerDown:Y=>{Y.button!==2&&(Q||!et||(pt.current=new Date,Re(we.current),Y.target.setPointerCapture(Y.pointerId),Y.target.tagName!=="BUTTON"&&(ee(!0),V.current={x:Y.clientX,y:Y.clientY})))},onPointerUp:()=>{var Y,be,He;if(ae||!et)return;V.current=null;const tt=Number(((Y=Ge.current)==null?void 0:Y.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),rt=Number(((be=Ge.current)==null?void 0:be.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Qe=new Date().getTime()-((He=pt.current)==null?void 0:He.getTime()),Jt=D==="x"?tt:rt,pn=Math.abs(Jt)/Qe;if(Math.abs(Jt)>=sz||pn>.11){Re(we.current),d.onDismiss==null||d.onDismiss.call(d,d),L(D==="x"?tt>0?"right":"left":rt>0?"down":"up"),ie(),ge(!0);return}else{var ln,Xt;(ln=Ge.current)==null||ln.style.setProperty("--swipe-amount-x","0px"),(Xt=Ge.current)==null||Xt.style.setProperty("--swipe-amount-y","0px")}fe(!1),ee(!1),B(null)},onPointerMove:Y=>{var be,He,tt;if(!V.current||!et||((be=window.getSelection())==null?void 0:be.toString().length)>0)return;const Qe=Y.clientY-V.current.y,Jt=Y.clientX-V.current.x;var pn;const ln=(pn=e.swipeDirections)!=null?pn:oz(F);!D&&(Math.abs(Jt)>1||Math.abs(Qe)>1)&&B(Math.abs(Jt)>Math.abs(Qe)?"x":"y");let Xt={x:0,y:0};const Gr=wn=>1/(1.5+Math.abs(wn)/20);if(D==="y"){if(ln.includes("top")||ln.includes("bottom"))if(ln.includes("top")&&Qe<0||ln.includes("bottom")&&Qe>0)Xt.y=Qe;else{const wn=Qe*Gr(Qe);Xt.y=Math.abs(wn)<Math.abs(Qe)?wn:Qe}}else if(D==="x"&&(ln.includes("left")||ln.includes("right")))if(ln.includes("left")&&Jt<0||ln.includes("right")&&Jt>0)Xt.x=Jt;else{const wn=Jt*Gr(Jt);Xt.x=Math.abs(wn)<Math.abs(Jt)?wn:Jt}(Math.abs(Xt.x)>0||Math.abs(Xt.y)>0)&&fe(!0),(He=Ge.current)==null||He.style.setProperty("--swipe-amount-x",`${Xt.x}px`),(tt=Ge.current)==null||tt.style.setProperty("--swipe-amount-y",`${Xt.y}px`)}},qt&&!d.jsx&&We!=="loading"?J.createElement("button",{"aria-label":A,"data-disabled":Q,"data-close-button":!0,onClick:Q||!et?()=>{}:()=>{ie(),d.onDismiss==null||d.onDismiss.call(d,d)},className:vr(_==null?void 0:_.closeButton,d==null||(a=d.classNames)==null?void 0:a.closeButton)},(W=M==null?void 0:M.close)!=null?W:VB):null,(We||d.icon||d.promise)&&d.icon!==null&&((M==null?void 0:M[We])!==null||d.icon)?J.createElement("div",{"data-icon":"",className:vr(_==null?void 0:_.icon,d==null||(s=d.classNames)==null?void 0:s.icon)},d.promise||d.type==="loading"&&!d.icon?d.icon||Ne():null,d.type!=="loading"?ue:null):null,J.createElement("div",{"data-content":"",className:vr(_==null?void 0:_.content,d==null||(i=d.classNames)==null?void 0:i.content)},J.createElement("div",{"data-title":"",className:vr(_==null?void 0:_.title,d==null||(o=d.classNames)==null?void 0:o.title)},d.jsx?d.jsx:typeof d.title=="function"?d.title():d.title),d.description?J.createElement("div",{"data-description":"",className:vr(R,Et,_==null?void 0:_.description,d==null||(l=d.classNames)==null?void 0:l.description)},typeof d.description=="function"?d.description():d.description):null),J.isValidElement(d.cancel)?d.cancel:d.cancel&&qu(d.cancel)?J.createElement("button",{"data-button":!0,"data-cancel":!0,style:d.cancelButtonStyle||E,onClick:Y=>{qu(d.cancel)&&et&&(d.cancel.onClick==null||d.cancel.onClick.call(d.cancel,Y),ie())},className:vr(_==null?void 0:_.cancelButton,d==null||(c=d.classNames)==null?void 0:c.cancelButton)},d.cancel.label):null,J.isValidElement(d.action)?d.action:d.action&&qu(d.action)?J.createElement("button",{"data-button":!0,"data-action":!0,style:d.actionButtonStyle||k,onClick:Y=>{qu(d.action)&&(d.action.onClick==null||d.action.onClick.call(d.action,Y),!Y.defaultPrevented&&ie())},className:vr(_==null?void 0:_.actionButton,d==null||(u=d.classNames)==null?void 0:u.actionButton)},d.action.label):null)};function i2(){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 cz(e,t){const n={};return[e,t].forEach((a,s)=>{const i=s===1,o=i?"--mobile-offset":"--offset",l=i?nz:tz;function c(u){["top","right","bottom","left"].forEach(h=>{n[`${o}-${h}`]=typeof u=="number"?`${u}px`:u})}typeof a=="number"||typeof a=="string"?c(a):typeof a=="object"?["top","right","bottom","left"].forEach(u=>{a[u]===void 0?n[`${o}-${u}`]=l:n[`${o}-${u}`]=typeof a[u]=="number"?`${a[u]}px`:a[u]}):c(l)}),n}const dz=J.forwardRef(function(t,n){const{id:a,invert:s,position:i="bottom-right",hotkey:o=["altKey","KeyT"],expand:l,closeButton:c,className:u,offset:h,mobileOffset:d,theme:f="light",richColors:p,duration:v,style:x,visibleToasts:N=ez,toastOptions:b,dir:y=i2(),gap:g=rz,icons:w,containerAriaLabel:S="Notifications"}=t,[C,T]=J.useState([]),E=J.useMemo(()=>a?C.filter(q=>q.toasterId===a):C.filter(q=>!q.toasterId),[C,a]),k=J.useMemo(()=>Array.from(new Set([i].concat(E.filter(q=>q.position).map(q=>q.position)))),[E,i]),[O,R]=J.useState([]),[I,F]=J.useState(!1),[j,U]=J.useState(!1),[_,M]=J.useState(f!=="system"?f:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),A=J.useRef(null),D=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),B=J.useRef(null),G=J.useRef(!1),L=J.useCallback(q=>{T(X=>{var K;return(K=X.find(ne=>ne.id===q.id))!=null&&K.delete||Vn.dismiss(q.id),X.filter(({id:ne})=>ne!==q.id)})},[]);return J.useEffect(()=>Vn.subscribe(q=>{if(q.dismiss){requestAnimationFrame(()=>{T(X=>X.map(K=>K.id===q.id?{...K,delete:!0}:K))});return}setTimeout(()=>{lO.flushSync(()=>{T(X=>{const K=X.findIndex(ne=>ne.id===q.id);return K!==-1?[...X.slice(0,K),{...X[K],...q},...X.slice(K+1)]:[q,...X]})})})}),[C]),J.useEffect(()=>{if(f!=="system"){M(f);return}if(f==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?M("dark"):M("light")),typeof window>"u")return;const q=window.matchMedia("(prefers-color-scheme: dark)");try{q.addEventListener("change",({matches:X})=>{M(X?"dark":"light")})}catch{q.addListener(({matches:K})=>{try{M(K?"dark":"light")}catch(ne){console.error(ne)}})}},[f]),J.useEffect(()=>{C.length<=1&&F(!1)},[C]),J.useEffect(()=>{const q=X=>{var K;if(o.every(ee=>X[ee]||X.code===ee)){var te;F(!0),(te=A.current)==null||te.focus()}X.code==="Escape"&&(document.activeElement===A.current||(K=A.current)!=null&&K.contains(document.activeElement))&&F(!1)};return document.addEventListener("keydown",q),()=>document.removeEventListener("keydown",q)},[o]),J.useEffect(()=>{if(A.current)return()=>{B.current&&(B.current.focus({preventScroll:!0}),B.current=null,G.current=!1)}},[A.current]),J.createElement("section",{ref:n,"aria-label":`${S} ${D}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},k.map((q,X)=>{var K;const[ne,te]=q.split("-");return E.length?J.createElement("ol",{key:q,dir:y==="auto"?i2():y,tabIndex:-1,ref:A,className:u,"data-sonner-toaster":!0,"data-sonner-theme":_,"data-y-position":ne,"data-x-position":te,style:{"--front-toast-height":`${((K=O[0])==null?void 0:K.height)||0}px`,"--width":`${az}px`,"--gap":`${g}px`,...x,...cz(h,d)},onBlur:ee=>{G.current&&!ee.currentTarget.contains(ee.relatedTarget)&&(G.current=!1,B.current&&(B.current.focus({preventScroll:!0}),B.current=null))},onFocus:ee=>{ee.target instanceof HTMLElement&&ee.target.dataset.dismissible==="false"||G.current||(G.current=!0,B.current=ee.relatedTarget)},onMouseEnter:()=>F(!0),onMouseMove:()=>F(!0),onMouseLeave:()=>{j||F(!1)},onDragEnd:()=>F(!1),onPointerDown:ee=>{ee.target instanceof HTMLElement&&ee.target.dataset.dismissible==="false"||U(!0)},onPointerUp:()=>U(!1)},E.filter(ee=>!ee.position&&X===0||ee.position===q).map((ee,ae)=>{var ge,se;return J.createElement(lz,{key:ee.id,icons:w,index:ae,toast:ee,defaultRichColors:p,duration:(ge=b==null?void 0:b.duration)!=null?ge:v,className:b==null?void 0:b.className,descriptionClassName:b==null?void 0:b.descriptionClassName,invert:s,visibleToasts:N,closeButton:(se=b==null?void 0:b.closeButton)!=null?se:c,interacting:j,position:q,style:b==null?void 0:b.style,unstyled:b==null?void 0:b.unstyled,classNames:b==null?void 0:b.classNames,cancelButtonStyle:b==null?void 0:b.cancelButtonStyle,actionButtonStyle:b==null?void 0:b.actionButtonStyle,closeButtonAriaLabel:b==null?void 0:b.closeButtonAriaLabel,removeToast:L,toasts:E.filter(fe=>fe.position==ee.position),heights:O.filter(fe=>fe.position==ee.position),setHeights:R,expandByDefault:l,gap:g,expanded:I,swipeDirections:t.swipeDirections})})):null}))});function on(e){if(typeof e=="string"||typeof e=="number")return""+e;let t="";if(Array.isArray(e))for(let n=0,a;n<e.length;n++)(a=on(e[n]))!==""&&(t+=(t&&" ")+a);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}var uz={value:()=>{}};function hp(){for(var e=0,t=arguments.length,n={},a;e<t;++e){if(!(a=arguments[e]+"")||a in n||/[\s.]/.test(a))throw new Error("illegal type: "+a);n[a]=[]}return new jh(n)}function jh(e){this._=e}function hz(e,t){return e.trim().split(/^|\s+/).map(function(n){var a="",s=n.indexOf(".");if(s>=0&&(a=n.slice(s+1),n=n.slice(0,s)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:a}})}jh.prototype=hp.prototype={constructor:jh,on:function(e,t){var n=this._,a=hz(e+"",n),s,i=-1,o=a.length;if(arguments.length<2){for(;++i<o;)if((s=(e=a[i]).type)&&(s=fz(n[s],e.name)))return s;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++i<o;)if(s=(e=a[i]).type)n[s]=o2(n[s],e.name,t);else if(t==null)for(s in n)n[s]=o2(n[s],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new jh(e)},call:function(e,t){if((s=arguments.length-2)>0)for(var n=new Array(s),a=0,s,i;a<s;++a)n[a]=arguments[a+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(i=this._[e],a=0,s=i.length;a<s;++a)i[a].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var a=this._[e],s=0,i=a.length;s<i;++s)a[s].value.apply(t,n)}};function fz(e,t){for(var n=0,a=e.length,s;n<a;++n)if((s=e[n]).name===t)return s.value}function o2(e,t,n){for(var a=0,s=e.length;a<s;++a)if(e[a].name===t){e[a]=uz,e=e.slice(0,a).concat(e.slice(a+1));break}return n!=null&&e.push({name:t,value:n}),e}var vw="http://www.w3.org/1999/xhtml";const l2={svg:"http://www.w3.org/2000/svg",xhtml:vw,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function fp(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),l2.hasOwnProperty(t)?{space:l2[t],local:e}:e}function pz(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===vw&&t.documentElement.namespaceURI===vw?t.createElement(e):t.createElementNS(n,e)}}function mz(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function tI(e){var t=fp(e);return(t.local?mz:pz)(t)}function gz(){}function l1(e){return e==null?gz:function(){return this.querySelector(e)}}function bz(e){typeof e!="function"&&(e=l1(e));for(var t=this._groups,n=t.length,a=new Array(n),s=0;s<n;++s)for(var i=t[s],o=i.length,l=a[s]=new Array(o),c,u,h=0;h<o;++h)(c=i[h])&&(u=e.call(c,c.__data__,h,i))&&("__data__"in c&&(u.__data__=c.__data__),l[h]=u);return new wa(a,this._parents)}function xz(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function yz(){return[]}function nI(e){return e==null?yz:function(){return this.querySelectorAll(e)}}function vz(e){return function(){return xz(e.apply(this,arguments))}}function wz(e){typeof e=="function"?e=vz(e):e=nI(e);for(var t=this._groups,n=t.length,a=[],s=[],i=0;i<n;++i)for(var o=t[i],l=o.length,c,u=0;u<l;++u)(c=o[u])&&(a.push(e.call(c,c.__data__,u,o)),s.push(c));return new wa(a,s)}function aI(e){return function(){return this.matches(e)}}function rI(e){return function(t){return t.matches(e)}}var Nz=Array.prototype.find;function Sz(e){return function(){return Nz.call(this.children,e)}}function Ez(){return this.firstElementChild}function Tz(e){return this.select(e==null?Ez:Sz(typeof e=="function"?e:rI(e)))}var Cz=Array.prototype.filter;function Az(){return Array.from(this.children)}function jz(e){return function(){return Cz.call(this.children,e)}}function kz(e){return this.selectAll(e==null?Az:jz(typeof e=="function"?e:rI(e)))}function _z(e){typeof e!="function"&&(e=aI(e));for(var t=this._groups,n=t.length,a=new Array(n),s=0;s<n;++s)for(var i=t[s],o=i.length,l=a[s]=[],c,u=0;u<o;++u)(c=i[u])&&e.call(c,c.__data__,u,i)&&l.push(c);return new wa(a,this._parents)}function sI(e){return new Array(e.length)}function Rz(){return new wa(this._enter||this._groups.map(sI),this._parents)}function yf(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}yf.prototype={constructor:yf,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function Oz(e){return function(){return e}}function Dz(e,t,n,a,s,i){for(var o=0,l,c=t.length,u=i.length;o<u;++o)(l=t[o])?(l.__data__=i[o],a[o]=l):n[o]=new yf(e,i[o]);for(;o<c;++o)(l=t[o])&&(s[o]=l)}function Iz(e,t,n,a,s,i,o){var l,c,u=new Map,h=t.length,d=i.length,f=new Array(h),p;for(l=0;l<h;++l)(c=t[l])&&(f[l]=p=o.call(c,c.__data__,l,t)+"",u.has(p)?s[l]=c:u.set(p,c));for(l=0;l<d;++l)p=o.call(e,i[l],l,i)+"",(c=u.get(p))?(a[l]=c,c.__data__=i[l],u.delete(p)):n[l]=new yf(e,i[l]);for(l=0;l<h;++l)(c=t[l])&&u.get(f[l])===c&&(s[l]=c)}function Mz(e){return e.__data__}function Lz(e,t){if(!arguments.length)return Array.from(this,Mz);var n=t?Iz:Dz,a=this._parents,s=this._groups;typeof e!="function"&&(e=Oz(e));for(var i=s.length,o=new Array(i),l=new Array(i),c=new Array(i),u=0;u<i;++u){var h=a[u],d=s[u],f=d.length,p=Uz(e.call(h,h&&h.__data__,u,a)),v=p.length,x=l[u]=new Array(v),N=o[u]=new Array(v),b=c[u]=new Array(f);n(h,d,x,N,b,p,t);for(var y=0,g=0,w,S;y<v;++y)if(w=x[y]){for(y>=g&&(g=y+1);!(S=N[g])&&++g<v;);w._next=S||null}}return o=new wa(o,a),o._enter=l,o._exit=c,o}function Uz(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Pz(){return new wa(this._exit||this._groups.map(sI),this._parents)}function Fz(e,t,n){var a=this.enter(),s=this,i=this.exit();return typeof e=="function"?(a=e(a),a&&(a=a.selection())):a=a.append(e+""),t!=null&&(s=t(s),s&&(s=s.selection())),n==null?i.remove():n(i),a&&s?a.merge(s).order():s}function Bz(e){for(var t=e.selection?e.selection():e,n=this._groups,a=t._groups,s=n.length,i=a.length,o=Math.min(s,i),l=new Array(s),c=0;c<o;++c)for(var u=n[c],h=a[c],d=u.length,f=l[c]=new Array(d),p,v=0;v<d;++v)(p=u[v]||h[v])&&(f[v]=p);for(;c<s;++c)l[c]=n[c];return new wa(l,this._parents)}function zz(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var a=e[t],s=a.length-1,i=a[s],o;--s>=0;)(o=a[s])&&(i&&o.compareDocumentPosition(i)^4&&i.parentNode.insertBefore(o,i),i=o);return this}function $z(e){e||(e=Hz);function t(d,f){return d&&f?e(d.__data__,f.__data__):!d-!f}for(var n=this._groups,a=n.length,s=new Array(a),i=0;i<a;++i){for(var o=n[i],l=o.length,c=s[i]=new Array(l),u,h=0;h<l;++h)(u=o[h])&&(c[h]=u);c.sort(t)}return new wa(s,this._parents).order()}function Hz(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function qz(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Gz(){return Array.from(this)}function Vz(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var a=e[t],s=0,i=a.length;s<i;++s){var o=a[s];if(o)return o}return null}function Yz(){let e=0;for(const t of this)++e;return e}function Wz(){return!this.node()}function Xz(e){for(var t=this._groups,n=0,a=t.length;n<a;++n)for(var s=t[n],i=0,o=s.length,l;i<o;++i)(l=s[i])&&e.call(l,l.__data__,i,s);return this}function Kz(e){return function(){this.removeAttribute(e)}}function Zz(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Qz(e,t){return function(){this.setAttribute(e,t)}}function Jz(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function e$(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function t$(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function n$(e,t){var n=fp(e);if(arguments.length<2){var a=this.node();return n.local?a.getAttributeNS(n.space,n.local):a.getAttribute(n)}return this.each((t==null?n.local?Zz:Kz:typeof t=="function"?n.local?t$:e$:n.local?Jz:Qz)(n,t))}function iI(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function a$(e){return function(){this.style.removeProperty(e)}}function r$(e,t,n){return function(){this.style.setProperty(e,t,n)}}function s$(e,t,n){return function(){var a=t.apply(this,arguments);a==null?this.style.removeProperty(e):this.style.setProperty(e,a,n)}}function i$(e,t,n){return arguments.length>1?this.each((t==null?a$:typeof t=="function"?s$:r$)(e,t,n??"")):zl(this.node(),e)}function zl(e,t){return e.style.getPropertyValue(t)||iI(e).getComputedStyle(e,null).getPropertyValue(t)}function o$(e){return function(){delete this[e]}}function l$(e,t){return function(){this[e]=t}}function c$(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function d$(e,t){return arguments.length>1?this.each((t==null?o$:typeof t=="function"?c$:l$)(e,t)):this.node()[e]}function oI(e){return e.trim().split(/^|\s+/)}function c1(e){return e.classList||new lI(e)}function lI(e){this._node=e,this._names=oI(e.getAttribute("class")||"")}lI.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function cI(e,t){for(var n=c1(e),a=-1,s=t.length;++a<s;)n.add(t[a])}function dI(e,t){for(var n=c1(e),a=-1,s=t.length;++a<s;)n.remove(t[a])}function u$(e){return function(){cI(this,e)}}function h$(e){return function(){dI(this,e)}}function f$(e,t){return function(){(t.apply(this,arguments)?cI:dI)(this,e)}}function p$(e,t){var n=oI(e+"");if(arguments.length<2){for(var a=c1(this.node()),s=-1,i=n.length;++s<i;)if(!a.contains(n[s]))return!1;return!0}return this.each((typeof t=="function"?f$:t?u$:h$)(n,t))}function m$(){this.textContent=""}function g$(e){return function(){this.textContent=e}}function b$(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function x$(e){return arguments.length?this.each(e==null?m$:(typeof e=="function"?b$:g$)(e)):this.node().textContent}function y$(){this.innerHTML=""}function v$(e){return function(){this.innerHTML=e}}function w$(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function N$(e){return arguments.length?this.each(e==null?y$:(typeof e=="function"?w$:v$)(e)):this.node().innerHTML}function S$(){this.nextSibling&&this.parentNode.appendChild(this)}function E$(){return this.each(S$)}function T$(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function C$(){return this.each(T$)}function A$(e){var t=typeof e=="function"?e:tI(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function j$(){return null}function k$(e,t){var n=typeof e=="function"?e:tI(e),a=t==null?j$:typeof t=="function"?t:l1(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),a.apply(this,arguments)||null)})}function _$(){var e=this.parentNode;e&&e.removeChild(this)}function R$(){return this.each(_$)}function O$(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function D$(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function I$(e){return this.select(e?D$:O$)}function M$(e){return arguments.length?this.property("__data__",e):this.node().__data__}function L$(e){return function(t){e.call(this,t,this.__data__)}}function U$(e){return e.trim().split(/^|\s+/).map(function(t){var n="",a=t.indexOf(".");return a>=0&&(n=t.slice(a+1),t=t.slice(0,a)),{type:t,name:n}})}function P$(e){return function(){var t=this.__on;if(t){for(var n=0,a=-1,s=t.length,i;n<s;++n)i=t[n],(!e.type||i.type===e.type)&&i.name===e.name?this.removeEventListener(i.type,i.listener,i.options):t[++a]=i;++a?t.length=a:delete this.__on}}}function F$(e,t,n){return function(){var a=this.__on,s,i=L$(t);if(a){for(var o=0,l=a.length;o<l;++o)if((s=a[o]).type===e.type&&s.name===e.name){this.removeEventListener(s.type,s.listener,s.options),this.addEventListener(s.type,s.listener=i,s.options=n),s.value=t;return}}this.addEventListener(e.type,i,n),s={type:e.type,name:e.name,value:t,listener:i,options:n},a?a.push(s):this.__on=[s]}}function B$(e,t,n){var a=U$(e+""),s,i=a.length,o;if(arguments.length<2){var l=this.node().__on;if(l){for(var c=0,u=l.length,h;c<u;++c)for(s=0,h=l[c];s<i;++s)if((o=a[s]).type===h.type&&o.name===h.name)return h.value}return}for(l=t?F$:P$,s=0;s<i;++s)this.each(l(a[s],t,n));return this}function uI(e,t,n){var a=iI(e),s=a.CustomEvent;typeof s=="function"?s=new s(t,n):(s=a.document.createEvent("Event"),n?(s.initEvent(t,n.bubbles,n.cancelable),s.detail=n.detail):s.initEvent(t,!1,!1)),e.dispatchEvent(s)}function z$(e,t){return function(){return uI(this,e,t)}}function $$(e,t){return function(){return uI(this,e,t.apply(this,arguments))}}function H$(e,t){return this.each((typeof t=="function"?$$:z$)(e,t))}function*q$(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var a=e[t],s=0,i=a.length,o;s<i;++s)(o=a[s])&&(yield o)}var hI=[null];function wa(e,t){this._groups=e,this._parents=t}function uu(){return new wa([[document.documentElement]],hI)}function G$(){return this}wa.prototype=uu.prototype={constructor:wa,select:bz,selectAll:wz,selectChild:Tz,selectChildren:kz,filter:_z,data:Lz,enter:Rz,exit:Pz,join:Fz,merge:Bz,selection:G$,order:zz,sort:$z,call:qz,nodes:Gz,node:Vz,size:Yz,empty:Wz,each:Xz,attr:n$,style:i$,property:d$,classed:p$,text:x$,html:N$,raise:E$,lower:C$,append:A$,insert:k$,remove:R$,clone:I$,datum:M$,on:B$,dispatch:H$,[Symbol.iterator]:q$};function pa(e){return typeof e=="string"?new wa([[document.querySelector(e)]],[document.documentElement]):new wa([[e]],hI)}function V$(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Ja(e,t){if(e=V$(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var a=n.createSVGPoint();return a.x=e.clientX,a.y=e.clientY,a=a.matrixTransform(t.getScreenCTM().inverse()),[a.x,a.y]}if(t.getBoundingClientRect){var s=t.getBoundingClientRect();return[e.clientX-s.left-t.clientLeft,e.clientY-s.top-t.clientTop]}}return[e.pageX,e.pageY]}const Y$={passive:!1},_d={capture:!0,passive:!1};function Om(e){e.stopImmediatePropagation()}function Sl(e){e.preventDefault(),e.stopImmediatePropagation()}function fI(e){var t=e.document.documentElement,n=pa(e).on("dragstart.drag",Sl,_d);"onselectstart"in t?n.on("selectstart.drag",Sl,_d):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function pI(e,t){var n=e.document.documentElement,a=pa(e).on("dragstart.drag",null);t&&(a.on("click.drag",Sl,_d),setTimeout(function(){a.on("click.drag",null)},0)),"onselectstart"in n?a.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const Gu=e=>()=>e;function ww(e,{sourceEvent:t,subject:n,target:a,identifier:s,active:i,x:o,y:l,dx:c,dy:u,dispatch:h}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:a,enumerable:!0,configurable:!0},identifier:{value:s,enumerable:!0,configurable:!0},active:{value:i,enumerable:!0,configurable:!0},x:{value:o,enumerable:!0,configurable:!0},y:{value:l,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:h}})}ww.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function W$(e){return!e.ctrlKey&&!e.button}function X$(){return this.parentNode}function K$(e,t){return t??{x:e.x,y:e.y}}function Z$(){return navigator.maxTouchPoints||"ontouchstart"in this}function mI(){var e=W$,t=X$,n=K$,a=Z$,s={},i=hp("start","drag","end"),o=0,l,c,u,h,d=0;function f(w){w.on("mousedown.drag",p).filter(a).on("touchstart.drag",N).on("touchmove.drag",b,Y$).on("touchend.drag touchcancel.drag",y).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function p(w,S){if(!(h||!e.call(this,w,S))){var C=g(this,t.call(this,w,S),w,S,"mouse");C&&(pa(w.view).on("mousemove.drag",v,_d).on("mouseup.drag",x,_d),fI(w.view),Om(w),u=!1,l=w.clientX,c=w.clientY,C("start",w))}}function v(w){if(Sl(w),!u){var S=w.clientX-l,C=w.clientY-c;u=S*S+C*C>d}s.mouse("drag",w)}function x(w){pa(w.view).on("mousemove.drag mouseup.drag",null),pI(w.view,u),Sl(w),s.mouse("end",w)}function N(w,S){if(e.call(this,w,S)){var C=w.changedTouches,T=t.call(this,w,S),E=C.length,k,O;for(k=0;k<E;++k)(O=g(this,T,w,S,C[k].identifier,C[k]))&&(Om(w),O("start",w,C[k]))}}function b(w){var S=w.changedTouches,C=S.length,T,E;for(T=0;T<C;++T)(E=s[S[T].identifier])&&(Sl(w),E("drag",w,S[T]))}function y(w){var S=w.changedTouches,C=S.length,T,E;for(h&&clearTimeout(h),h=setTimeout(function(){h=null},500),T=0;T<C;++T)(E=s[S[T].identifier])&&(Om(w),E("end",w,S[T]))}function g(w,S,C,T,E,k){var O=i.copy(),R=Ja(k||C,S),I,F,j;if((j=n.call(w,new ww("beforestart",{sourceEvent:C,target:f,identifier:E,active:o,x:R[0],y:R[1],dx:0,dy:0,dispatch:O}),T))!=null)return I=j.x-R[0]||0,F=j.y-R[1]||0,function U(_,M,A){var D=R,B;switch(_){case"start":s[E]=U,B=o++;break;case"end":delete s[E],--o;case"drag":R=Ja(A||M,S),B=o;break}O.call(_,w,new ww(_,{sourceEvent:M,subject:j,target:f,identifier:E,active:B,x:R[0]+I,y:R[1]+F,dx:R[0]-D[0],dy:R[1]-D[1],dispatch:O}),T)}}return f.filter=function(w){return arguments.length?(e=typeof w=="function"?w:Gu(!!w),f):e},f.container=function(w){return arguments.length?(t=typeof w=="function"?w:Gu(w),f):t},f.subject=function(w){return arguments.length?(n=typeof w=="function"?w:Gu(w),f):n},f.touchable=function(w){return arguments.length?(a=typeof w=="function"?w:Gu(!!w),f):a},f.on=function(){var w=i.on.apply(i,arguments);return w===i?f:w},f.clickDistance=function(w){return arguments.length?(d=(w=+w)*w,f):Math.sqrt(d)},f}function d1(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function gI(e,t){var n=Object.create(e.prototype);for(var a in t)n[a]=t[a];return n}function hu(){}var Rd=.7,vf=1/Rd,El="\\s*([+-]?\\d+)\\s*",Od="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ir="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Q$=/^#([0-9a-f]{3,8})$/,J$=new RegExp(`^rgb\\(${El},${El},${El}\\)$`),e8=new RegExp(`^rgb\\(${Ir},${Ir},${Ir}\\)$`),t8=new RegExp(`^rgba\\(${El},${El},${El},${Od}\\)$`),n8=new RegExp(`^rgba\\(${Ir},${Ir},${Ir},${Od}\\)$`),a8=new RegExp(`^hsl\\(${Od},${Ir},${Ir}\\)$`),r8=new RegExp(`^hsla\\(${Od},${Ir},${Ir},${Od}\\)$`),c2={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};d1(hu,po,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:d2,formatHex:d2,formatHex8:s8,formatHsl:i8,formatRgb:u2,toString:u2});function d2(){return this.rgb().formatHex()}function s8(){return this.rgb().formatHex8()}function i8(){return bI(this).formatHsl()}function u2(){return this.rgb().formatRgb()}function po(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Q$.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?h2(t):n===3?new Wn(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Vu(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Vu(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=J$.exec(e))?new Wn(t[1],t[2],t[3],1):(t=e8.exec(e))?new Wn(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=t8.exec(e))?Vu(t[1],t[2],t[3],t[4]):(t=n8.exec(e))?Vu(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=a8.exec(e))?m2(t[1],t[2]/100,t[3]/100,1):(t=r8.exec(e))?m2(t[1],t[2]/100,t[3]/100,t[4]):c2.hasOwnProperty(e)?h2(c2[e]):e==="transparent"?new Wn(NaN,NaN,NaN,0):null}function h2(e){return new Wn(e>>16&255,e>>8&255,e&255,1)}function Vu(e,t,n,a){return a<=0&&(e=t=n=NaN),new Wn(e,t,n,a)}function o8(e){return e instanceof hu||(e=po(e)),e?(e=e.rgb(),new Wn(e.r,e.g,e.b,e.opacity)):new Wn}function Nw(e,t,n,a){return arguments.length===1?o8(e):new Wn(e,t,n,a??1)}function Wn(e,t,n,a){this.r=+e,this.g=+t,this.b=+n,this.opacity=+a}d1(Wn,Nw,gI(hu,{brighter(e){return e=e==null?vf:Math.pow(vf,e),new Wn(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Rd:Math.pow(Rd,e),new Wn(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Wn(io(this.r),io(this.g),io(this.b),wf(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:f2,formatHex:f2,formatHex8:l8,formatRgb:p2,toString:p2}));function f2(){return`#${Ki(this.r)}${Ki(this.g)}${Ki(this.b)}`}function l8(){return`#${Ki(this.r)}${Ki(this.g)}${Ki(this.b)}${Ki((isNaN(this.opacity)?1:this.opacity)*255)}`}function p2(){const e=wf(this.opacity);return`${e===1?"rgb(":"rgba("}${io(this.r)}, ${io(this.g)}, ${io(this.b)}${e===1?")":`, ${e})`}`}function wf(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function io(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ki(e){return e=io(e),(e<16?"0":"")+e.toString(16)}function m2(e,t,n,a){return a<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new er(e,t,n,a)}function bI(e){if(e instanceof er)return new er(e.h,e.s,e.l,e.opacity);if(e instanceof hu||(e=po(e)),!e)return new er;if(e instanceof er)return e;e=e.rgb();var t=e.r/255,n=e.g/255,a=e.b/255,s=Math.min(t,n,a),i=Math.max(t,n,a),o=NaN,l=i-s,c=(i+s)/2;return l?(t===i?o=(n-a)/l+(n<a)*6:n===i?o=(a-t)/l+2:o=(t-n)/l+4,l/=c<.5?i+s:2-i-s,o*=60):l=c>0&&c<1?0:o,new er(o,l,c,e.opacity)}function c8(e,t,n,a){return arguments.length===1?bI(e):new er(e,t,n,a??1)}function er(e,t,n,a){this.h=+e,this.s=+t,this.l=+n,this.opacity=+a}d1(er,c8,gI(hu,{brighter(e){return e=e==null?vf:Math.pow(vf,e),new er(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Rd:Math.pow(Rd,e),new er(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,a=n+(n<.5?n:1-n)*t,s=2*n-a;return new Wn(Dm(e>=240?e-240:e+120,s,a),Dm(e,s,a),Dm(e<120?e+240:e-120,s,a),this.opacity)},clamp(){return new er(g2(this.h),Yu(this.s),Yu(this.l),wf(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=wf(this.opacity);return`${e===1?"hsl(":"hsla("}${g2(this.h)}, ${Yu(this.s)*100}%, ${Yu(this.l)*100}%${e===1?")":`, ${e})`}`}}));function g2(e){return e=(e||0)%360,e<0?e+360:e}function Yu(e){return Math.max(0,Math.min(1,e||0))}function Dm(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const u1=e=>()=>e;function d8(e,t){return function(n){return e+n*t}}function u8(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(a){return Math.pow(e+a*t,n)}}function h8(e){return(e=+e)==1?xI:function(t,n){return n-t?u8(t,n,e):u1(isNaN(t)?n:t)}}function xI(e,t){var n=t-e;return n?d8(e,n):u1(isNaN(e)?t:e)}const Nf=function e(t){var n=h8(t);function a(s,i){var o=n((s=Nw(s)).r,(i=Nw(i)).r),l=n(s.g,i.g),c=n(s.b,i.b),u=xI(s.opacity,i.opacity);return function(h){return s.r=o(h),s.g=l(h),s.b=c(h),s.opacity=u(h),s+""}}return a.gamma=e,a}(1);function f8(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,a=t.slice(),s;return function(i){for(s=0;s<n;++s)a[s]=e[s]*(1-i)+t[s]*i;return a}}function p8(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function m8(e,t){var n=t?t.length:0,a=e?Math.min(n,e.length):0,s=new Array(a),i=new Array(n),o;for(o=0;o<a;++o)s[o]=cd(e[o],t[o]);for(;o<n;++o)i[o]=t[o];return function(l){for(o=0;o<a;++o)i[o]=s[o](l);return i}}function g8(e,t){var n=new Date;return e=+e,t=+t,function(a){return n.setTime(e*(1-a)+t*a),n}}function Tr(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function b8(e,t){var n={},a={},s;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(s in t)s in e?n[s]=cd(e[s],t[s]):a[s]=t[s];return function(i){for(s in n)a[s]=n[s](i);return a}}var Sw=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Im=new RegExp(Sw.source,"g");function x8(e){return function(){return e}}function y8(e){return function(t){return e(t)+""}}function yI(e,t){var n=Sw.lastIndex=Im.lastIndex=0,a,s,i,o=-1,l=[],c=[];for(e=e+"",t=t+"";(a=Sw.exec(e))&&(s=Im.exec(t));)(i=s.index)>n&&(i=t.slice(n,i),l[o]?l[o]+=i:l[++o]=i),(a=a[0])===(s=s[0])?l[o]?l[o]+=s:l[++o]=s:(l[++o]=null,c.push({i:o,x:Tr(a,s)})),n=Im.lastIndex;return n<t.length&&(i=t.slice(n),l[o]?l[o]+=i:l[++o]=i),l.length<2?c[0]?y8(c[0].x):x8(t):(t=c.length,function(u){for(var h=0,d;h<t;++h)l[(d=c[h]).i]=d.x(u);return l.join("")})}function cd(e,t){var n=typeof t,a;return t==null||n==="boolean"?u1(t):(n==="number"?Tr:n==="string"?(a=po(t))?(t=a,Nf):yI:t instanceof po?Nf:t instanceof Date?g8:p8(t)?f8:Array.isArray(t)?m8:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?b8:Tr)(e,t)}var b2=180/Math.PI,Ew={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function vI(e,t,n,a,s,i){var o,l,c;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(c=e*n+t*a)&&(n-=e*c,a-=t*c),(l=Math.sqrt(n*n+a*a))&&(n/=l,a/=l,c/=l),e*a<t*n&&(e=-e,t=-t,c=-c,o=-o),{translateX:s,translateY:i,rotate:Math.atan2(t,e)*b2,skewX:Math.atan(c)*b2,scaleX:o,scaleY:l}}var Wu;function v8(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Ew:vI(t.a,t.b,t.c,t.d,t.e,t.f)}function w8(e){return e==null||(Wu||(Wu=document.createElementNS("http://www.w3.org/2000/svg","g")),Wu.setAttribute("transform",e),!(e=Wu.transform.baseVal.consolidate()))?Ew:(e=e.matrix,vI(e.a,e.b,e.c,e.d,e.e,e.f))}function wI(e,t,n,a){function s(u){return u.length?u.pop()+" ":""}function i(u,h,d,f,p,v){if(u!==d||h!==f){var x=p.push("translate(",null,t,null,n);v.push({i:x-4,x:Tr(u,d)},{i:x-2,x:Tr(h,f)})}else(d||f)&&p.push("translate("+d+t+f+n)}function o(u,h,d,f){u!==h?(u-h>180?h+=360:h-u>180&&(u+=360),f.push({i:d.push(s(d)+"rotate(",null,a)-2,x:Tr(u,h)})):h&&d.push(s(d)+"rotate("+h+a)}function l(u,h,d,f){u!==h?f.push({i:d.push(s(d)+"skewX(",null,a)-2,x:Tr(u,h)}):h&&d.push(s(d)+"skewX("+h+a)}function c(u,h,d,f,p,v){if(u!==d||h!==f){var x=p.push(s(p)+"scale(",null,",",null,")");v.push({i:x-4,x:Tr(u,d)},{i:x-2,x:Tr(h,f)})}else(d!==1||f!==1)&&p.push(s(p)+"scale("+d+","+f+")")}return function(u,h){var d=[],f=[];return u=e(u),h=e(h),i(u.translateX,u.translateY,h.translateX,h.translateY,d,f),o(u.rotate,h.rotate,d,f),l(u.skewX,h.skewX,d,f),c(u.scaleX,u.scaleY,h.scaleX,h.scaleY,d,f),u=h=null,function(p){for(var v=-1,x=f.length,N;++v<x;)d[(N=f[v]).i]=N.x(p);return d.join("")}}}var N8=wI(v8,"px, ","px)","deg)"),S8=wI(w8,", ",")",")"),E8=1e-12;function x2(e){return((e=Math.exp(e))+1/e)/2}function T8(e){return((e=Math.exp(e))-1/e)/2}function C8(e){return((e=Math.exp(2*e))-1)/(e+1)}const kh=function e(t,n,a){function s(i,o){var l=i[0],c=i[1],u=i[2],h=o[0],d=o[1],f=o[2],p=h-l,v=d-c,x=p*p+v*v,N,b;if(x<E8)b=Math.log(f/u)/t,N=function(T){return[l+T*p,c+T*v,u*Math.exp(t*T*b)]};else{var y=Math.sqrt(x),g=(f*f-u*u+a*x)/(2*u*n*y),w=(f*f-u*u-a*x)/(2*f*n*y),S=Math.log(Math.sqrt(g*g+1)-g),C=Math.log(Math.sqrt(w*w+1)-w);b=(C-S)/t,N=function(T){var E=T*b,k=x2(S),O=u/(n*y)*(k*C8(t*E+S)-T8(S));return[l+O*p,c+O*v,u*k/x2(t*E+S)]}}return N.duration=b*1e3*t/Math.SQRT2,N}return s.rho=function(i){var o=Math.max(.001,+i),l=o*o,c=l*l;return e(o,l,c)},s}(Math.SQRT2,2,4);var $l=0,Hc=0,Tc=0,NI=1e3,Sf,qc,Ef=0,mo=0,pp=0,Dd=typeof performance=="object"&&performance.now?performance:Date,SI=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function h1(){return mo||(SI(A8),mo=Dd.now()+pp)}function A8(){mo=0}function Tf(){this._call=this._time=this._next=null}Tf.prototype=EI.prototype={constructor:Tf,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?h1():+n)+(t==null?0:+t),!this._next&&qc!==this&&(qc?qc._next=this:Sf=this,qc=this),this._call=e,this._time=n,Tw()},stop:function(){this._call&&(this._call=null,this._time=1/0,Tw())}};function EI(e,t,n){var a=new Tf;return a.restart(e,t,n),a}function j8(){h1(),++$l;for(var e=Sf,t;e;)(t=mo-e._time)>=0&&e._call.call(void 0,t),e=e._next;--$l}function y2(){mo=(Ef=Dd.now())+pp,$l=Hc=0;try{j8()}finally{$l=0,_8(),mo=0}}function k8(){var e=Dd.now(),t=e-Ef;t>NI&&(pp-=t,Ef=e)}function _8(){for(var e,t=Sf,n,a=1/0;t;)t._call?(a>t._time&&(a=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:Sf=n);qc=e,Tw(a)}function Tw(e){if(!$l){Hc&&(Hc=clearTimeout(Hc));var t=e-mo;t>24?(e<1/0&&(Hc=setTimeout(y2,e-Dd.now()-pp)),Tc&&(Tc=clearInterval(Tc))):(Tc||(Ef=Dd.now(),Tc=setInterval(k8,NI)),$l=1,SI(y2))}}function v2(e,t,n){var a=new Tf;return t=t==null?0:+t,a.restart(s=>{a.stop(),e(s+t)},t,n),a}var R8=hp("start","end","cancel","interrupt"),O8=[],TI=0,w2=1,Cw=2,_h=3,N2=4,Aw=5,Rh=6;function mp(e,t,n,a,s,i){var o=e.__transition;if(!o)e.__transition={};else if(n in o)return;D8(e,n,{name:t,index:a,group:s,on:R8,tween:O8,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:TI})}function f1(e,t){var n=hr(e,t);if(n.state>TI)throw new Error("too late; already scheduled");return n}function Br(e,t){var n=hr(e,t);if(n.state>_h)throw new Error("too late; already running");return n}function hr(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function D8(e,t,n){var a=e.__transition,s;a[t]=n,n.timer=EI(i,0,n.time);function i(u){n.state=w2,n.timer.restart(o,n.delay,n.time),n.delay<=u&&o(u-n.delay)}function o(u){var h,d,f,p;if(n.state!==w2)return c();for(h in a)if(p=a[h],p.name===n.name){if(p.state===_h)return v2(o);p.state===N2?(p.state=Rh,p.timer.stop(),p.on.call("interrupt",e,e.__data__,p.index,p.group),delete a[h]):+h<t&&(p.state=Rh,p.timer.stop(),p.on.call("cancel",e,e.__data__,p.index,p.group),delete a[h])}if(v2(function(){n.state===_h&&(n.state=N2,n.timer.restart(l,n.delay,n.time),l(u))}),n.state=Cw,n.on.call("start",e,e.__data__,n.index,n.group),n.state===Cw){for(n.state=_h,s=new Array(f=n.tween.length),h=0,d=-1;h<f;++h)(p=n.tween[h].value.call(e,e.__data__,n.index,n.group))&&(s[++d]=p);s.length=d+1}}function l(u){for(var h=u<n.duration?n.ease.call(null,u/n.duration):(n.timer.restart(c),n.state=Aw,1),d=-1,f=s.length;++d<f;)s[d].call(e,h);n.state===Aw&&(n.on.call("end",e,e.__data__,n.index,n.group),c())}function c(){n.state=Rh,n.timer.stop(),delete a[t];for(var u in a)return;delete e.__transition}}function Oh(e,t){var n=e.__transition,a,s,i=!0,o;if(n){t=t==null?null:t+"";for(o in n){if((a=n[o]).name!==t){i=!1;continue}s=a.state>Cw&&a.state<Aw,a.state=Rh,a.timer.stop(),a.on.call(s?"interrupt":"cancel",e,e.__data__,a.index,a.group),delete n[o]}i&&delete e.__transition}}function I8(e){return this.each(function(){Oh(this,e)})}function M8(e,t){var n,a;return function(){var s=Br(this,e),i=s.tween;if(i!==n){a=n=i;for(var o=0,l=a.length;o<l;++o)if(a[o].name===t){a=a.slice(),a.splice(o,1);break}}s.tween=a}}function L8(e,t,n){var a,s;if(typeof n!="function")throw new Error;return function(){var i=Br(this,e),o=i.tween;if(o!==a){s=(a=o).slice();for(var l={name:t,value:n},c=0,u=s.length;c<u;++c)if(s[c].name===t){s[c]=l;break}c===u&&s.push(l)}i.tween=s}}function U8(e,t){var n=this._id;if(e+="",arguments.length<2){for(var a=hr(this.node(),n).tween,s=0,i=a.length,o;s<i;++s)if((o=a[s]).name===e)return o.value;return null}return this.each((t==null?M8:L8)(n,e,t))}function p1(e,t,n){var a=e._id;return e.each(function(){var s=Br(this,a);(s.value||(s.value={}))[t]=n.apply(this,arguments)}),function(s){return hr(s,a).value[t]}}function CI(e,t){var n;return(typeof t=="number"?Tr:t instanceof po?Nf:(n=po(t))?(t=n,Nf):yI)(e,t)}function P8(e){return function(){this.removeAttribute(e)}}function F8(e){return function(){this.removeAttributeNS(e.space,e.local)}}function B8(e,t,n){var a,s=n+"",i;return function(){var o=this.getAttribute(e);return o===s?null:o===a?i:i=t(a=o,n)}}function z8(e,t,n){var a,s=n+"",i;return function(){var o=this.getAttributeNS(e.space,e.local);return o===s?null:o===a?i:i=t(a=o,n)}}function $8(e,t,n){var a,s,i;return function(){var o,l=n(this),c;return l==null?void this.removeAttribute(e):(o=this.getAttribute(e),c=l+"",o===c?null:o===a&&c===s?i:(s=c,i=t(a=o,l)))}}function H8(e,t,n){var a,s,i;return function(){var o,l=n(this),c;return l==null?void this.removeAttributeNS(e.space,e.local):(o=this.getAttributeNS(e.space,e.local),c=l+"",o===c?null:o===a&&c===s?i:(s=c,i=t(a=o,l)))}}function q8(e,t){var n=fp(e),a=n==="transform"?S8:CI;return this.attrTween(e,typeof t=="function"?(n.local?H8:$8)(n,a,p1(this,"attr."+e,t)):t==null?(n.local?F8:P8)(n):(n.local?z8:B8)(n,a,t))}function G8(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function V8(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function Y8(e,t){var n,a;function s(){var i=t.apply(this,arguments);return i!==a&&(n=(a=i)&&V8(e,i)),n}return s._value=t,s}function W8(e,t){var n,a;function s(){var i=t.apply(this,arguments);return i!==a&&(n=(a=i)&&G8(e,i)),n}return s._value=t,s}function X8(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var a=fp(e);return this.tween(n,(a.local?Y8:W8)(a,t))}function K8(e,t){return function(){f1(this,e).delay=+t.apply(this,arguments)}}function Z8(e,t){return t=+t,function(){f1(this,e).delay=t}}function Q8(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?K8:Z8)(t,e)):hr(this.node(),t).delay}function J8(e,t){return function(){Br(this,e).duration=+t.apply(this,arguments)}}function e9(e,t){return t=+t,function(){Br(this,e).duration=t}}function t9(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?J8:e9)(t,e)):hr(this.node(),t).duration}function n9(e,t){if(typeof t!="function")throw new Error;return function(){Br(this,e).ease=t}}function a9(e){var t=this._id;return arguments.length?this.each(n9(t,e)):hr(this.node(),t).ease}function r9(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;Br(this,e).ease=n}}function s9(e){if(typeof e!="function")throw new Error;return this.each(r9(this._id,e))}function i9(e){typeof e!="function"&&(e=aI(e));for(var t=this._groups,n=t.length,a=new Array(n),s=0;s<n;++s)for(var i=t[s],o=i.length,l=a[s]=[],c,u=0;u<o;++u)(c=i[u])&&e.call(c,c.__data__,u,i)&&l.push(c);return new Ns(a,this._parents,this._name,this._id)}function o9(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,a=t.length,s=n.length,i=Math.min(a,s),o=new Array(a),l=0;l<i;++l)for(var c=t[l],u=n[l],h=c.length,d=o[l]=new Array(h),f,p=0;p<h;++p)(f=c[p]||u[p])&&(d[p]=f);for(;l<a;++l)o[l]=t[l];return new Ns(o,this._parents,this._name,this._id)}function l9(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function c9(e,t,n){var a,s,i=l9(t)?f1:Br;return function(){var o=i(this,e),l=o.on;l!==a&&(s=(a=l).copy()).on(t,n),o.on=s}}function d9(e,t){var n=this._id;return arguments.length<2?hr(this.node(),n).on.on(e):this.each(c9(n,e,t))}function u9(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function h9(){return this.on("end.remove",u9(this._id))}function f9(e){var t=this._name,n=this._id;typeof e!="function"&&(e=l1(e));for(var a=this._groups,s=a.length,i=new Array(s),o=0;o<s;++o)for(var l=a[o],c=l.length,u=i[o]=new Array(c),h,d,f=0;f<c;++f)(h=l[f])&&(d=e.call(h,h.__data__,f,l))&&("__data__"in h&&(d.__data__=h.__data__),u[f]=d,mp(u[f],t,n,f,u,hr(h,n)));return new Ns(i,this._parents,t,n)}function p9(e){var t=this._name,n=this._id;typeof e!="function"&&(e=nI(e));for(var a=this._groups,s=a.length,i=[],o=[],l=0;l<s;++l)for(var c=a[l],u=c.length,h,d=0;d<u;++d)if(h=c[d]){for(var f=e.call(h,h.__data__,d,c),p,v=hr(h,n),x=0,N=f.length;x<N;++x)(p=f[x])&&mp(p,t,n,x,f,v);i.push(f),o.push(h)}return new Ns(i,o,t,n)}var m9=uu.prototype.constructor;function g9(){return new m9(this._groups,this._parents)}function b9(e,t){var n,a,s;return function(){var i=zl(this,e),o=(this.style.removeProperty(e),zl(this,e));return i===o?null:i===n&&o===a?s:s=t(n=i,a=o)}}function AI(e){return function(){this.style.removeProperty(e)}}function x9(e,t,n){var a,s=n+"",i;return function(){var o=zl(this,e);return o===s?null:o===a?i:i=t(a=o,n)}}function y9(e,t,n){var a,s,i;return function(){var o=zl(this,e),l=n(this),c=l+"";return l==null&&(c=l=(this.style.removeProperty(e),zl(this,e))),o===c?null:o===a&&c===s?i:(s=c,i=t(a=o,l))}}function v9(e,t){var n,a,s,i="style."+t,o="end."+i,l;return function(){var c=Br(this,e),u=c.on,h=c.value[i]==null?l||(l=AI(t)):void 0;(u!==n||s!==h)&&(a=(n=u).copy()).on(o,s=h),c.on=a}}function w9(e,t,n){var a=(e+="")=="transform"?N8:CI;return t==null?this.styleTween(e,b9(e,a)).on("end.style."+e,AI(e)):typeof t=="function"?this.styleTween(e,y9(e,a,p1(this,"style."+e,t))).each(v9(this._id,e)):this.styleTween(e,x9(e,a,t),n).on("end.style."+e,null)}function N9(e,t,n){return function(a){this.style.setProperty(e,t.call(this,a),n)}}function S9(e,t,n){var a,s;function i(){var o=t.apply(this,arguments);return o!==s&&(a=(s=o)&&N9(e,o,n)),a}return i._value=t,i}function E9(e,t,n){var a="style."+(e+="");if(arguments.length<2)return(a=this.tween(a))&&a._value;if(t==null)return this.tween(a,null);if(typeof t!="function")throw new Error;return this.tween(a,S9(e,t,n??""))}function T9(e){return function(){this.textContent=e}}function C9(e){return function(){var t=e(this);this.textContent=t??""}}function A9(e){return this.tween("text",typeof e=="function"?C9(p1(this,"text",e)):T9(e==null?"":e+""))}function j9(e){return function(t){this.textContent=e.call(this,t)}}function k9(e){var t,n;function a(){var s=e.apply(this,arguments);return s!==n&&(t=(n=s)&&j9(s)),t}return a._value=e,a}function _9(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,k9(e))}function R9(){for(var e=this._name,t=this._id,n=jI(),a=this._groups,s=a.length,i=0;i<s;++i)for(var o=a[i],l=o.length,c,u=0;u<l;++u)if(c=o[u]){var h=hr(c,t);mp(c,e,n,u,o,{time:h.time+h.delay+h.duration,delay:0,duration:h.duration,ease:h.ease})}return new Ns(a,this._parents,e,n)}function O9(){var e,t,n=this,a=n._id,s=n.size();return new Promise(function(i,o){var l={value:o},c={value:function(){--s===0&&i()}};n.each(function(){var u=Br(this,a),h=u.on;h!==e&&(t=(e=h).copy(),t._.cancel.push(l),t._.interrupt.push(l),t._.end.push(c)),u.on=t}),s===0&&i()})}var D9=0;function Ns(e,t,n,a){this._groups=e,this._parents=t,this._name=n,this._id=a}function jI(){return++D9}var ts=uu.prototype;Ns.prototype={constructor:Ns,select:f9,selectAll:p9,selectChild:ts.selectChild,selectChildren:ts.selectChildren,filter:i9,merge:o9,selection:g9,transition:R9,call:ts.call,nodes:ts.nodes,node:ts.node,size:ts.size,empty:ts.empty,each:ts.each,on:d9,attr:q8,attrTween:X8,style:w9,styleTween:E9,text:A9,textTween:_9,remove:h9,tween:U8,delay:Q8,duration:t9,ease:a9,easeVarying:s9,end:O9,[Symbol.iterator]:ts[Symbol.iterator]};function I9(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var M9={time:null,delay:0,duration:250,ease:I9};function L9(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function U9(e){var t,n;e instanceof Ns?(t=e._id,e=e._name):(t=jI(),(n=M9).time=h1(),e=e==null?null:e+"");for(var a=this._groups,s=a.length,i=0;i<s;++i)for(var o=a[i],l=o.length,c,u=0;u<l;++u)(c=o[u])&&mp(c,e,t,u,o,n||L9(c,t));return new Ns(a,this._parents,e,t)}uu.prototype.interrupt=I8;uu.prototype.transition=U9;const Xu=e=>()=>e;function P9(e,{sourceEvent:t,target:n,transform:a,dispatch:s}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:a,enumerable:!0,configurable:!0},_:{value:s}})}function us(e,t,n){this.k=e,this.x=t,this.y=n}us.prototype={constructor:us,scale:function(e){return e===1?this:new us(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new us(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var gp=new us(1,0,0);kI.prototype=us.prototype;function kI(e){for(;!e.__zoom;)if(!(e=e.parentNode))return gp;return e.__zoom}function Mm(e){e.stopImmediatePropagation()}function Cc(e){e.preventDefault(),e.stopImmediatePropagation()}function F9(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function B9(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function S2(){return this.__zoom||gp}function z9(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function $9(){return navigator.maxTouchPoints||"ontouchstart"in this}function H9(e,t,n){var a=e.invertX(t[0][0])-n[0][0],s=e.invertX(t[1][0])-n[1][0],i=e.invertY(t[0][1])-n[0][1],o=e.invertY(t[1][1])-n[1][1];return e.translate(s>a?(a+s)/2:Math.min(0,a)||Math.max(0,s),o>i?(i+o)/2:Math.min(0,i)||Math.max(0,o))}function _I(){var e=F9,t=B9,n=H9,a=z9,s=$9,i=[0,1/0],o=[[-1/0,-1/0],[1/0,1/0]],l=250,c=kh,u=hp("start","zoom","end"),h,d,f,p=500,v=150,x=0,N=10;function b(j){j.property("__zoom",S2).on("wheel.zoom",E,{passive:!1}).on("mousedown.zoom",k).on("dblclick.zoom",O).filter(s).on("touchstart.zoom",R).on("touchmove.zoom",I).on("touchend.zoom touchcancel.zoom",F).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}b.transform=function(j,U,_,M){var A=j.selection?j.selection():j;A.property("__zoom",S2),j!==A?S(j,U,_,M):A.interrupt().each(function(){C(this,arguments).event(M).start().zoom(null,typeof U=="function"?U.apply(this,arguments):U).end()})},b.scaleBy=function(j,U,_,M){b.scaleTo(j,function(){var A=this.__zoom.k,D=typeof U=="function"?U.apply(this,arguments):U;return A*D},_,M)},b.scaleTo=function(j,U,_,M){b.transform(j,function(){var A=t.apply(this,arguments),D=this.__zoom,B=_==null?w(A):typeof _=="function"?_.apply(this,arguments):_,G=D.invert(B),L=typeof U=="function"?U.apply(this,arguments):U;return n(g(y(D,L),B,G),A,o)},_,M)},b.translateBy=function(j,U,_,M){b.transform(j,function(){return n(this.__zoom.translate(typeof U=="function"?U.apply(this,arguments):U,typeof _=="function"?_.apply(this,arguments):_),t.apply(this,arguments),o)},null,M)},b.translateTo=function(j,U,_,M,A){b.transform(j,function(){var D=t.apply(this,arguments),B=this.__zoom,G=M==null?w(D):typeof M=="function"?M.apply(this,arguments):M;return n(gp.translate(G[0],G[1]).scale(B.k).translate(typeof U=="function"?-U.apply(this,arguments):-U,typeof _=="function"?-_.apply(this,arguments):-_),D,o)},M,A)};function y(j,U){return U=Math.max(i[0],Math.min(i[1],U)),U===j.k?j:new us(U,j.x,j.y)}function g(j,U,_){var M=U[0]-_[0]*j.k,A=U[1]-_[1]*j.k;return M===j.x&&A===j.y?j:new us(j.k,M,A)}function w(j){return[(+j[0][0]+ +j[1][0])/2,(+j[0][1]+ +j[1][1])/2]}function S(j,U,_,M){j.on("start.zoom",function(){C(this,arguments).event(M).start()}).on("interrupt.zoom end.zoom",function(){C(this,arguments).event(M).end()}).tween("zoom",function(){var A=this,D=arguments,B=C(A,D).event(M),G=t.apply(A,D),L=_==null?w(G):typeof _=="function"?_.apply(A,D):_,q=Math.max(G[1][0]-G[0][0],G[1][1]-G[0][1]),X=A.__zoom,K=typeof U=="function"?U.apply(A,D):U,ne=c(X.invert(L).concat(q/X.k),K.invert(L).concat(q/K.k));return function(te){if(te===1)te=K;else{var ee=ne(te),ae=q/ee[2];te=new us(ae,L[0]-ee[0]*ae,L[1]-ee[1]*ae)}B.zoom(null,te)}})}function C(j,U,_){return!_&&j.__zooming||new T(j,U)}function T(j,U){this.that=j,this.args=U,this.active=0,this.sourceEvent=null,this.extent=t.apply(j,U),this.taps=0}T.prototype={event:function(j){return j&&(this.sourceEvent=j),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(j,U){return this.mouse&&j!=="mouse"&&(this.mouse[1]=U.invert(this.mouse[0])),this.touch0&&j!=="touch"&&(this.touch0[1]=U.invert(this.touch0[0])),this.touch1&&j!=="touch"&&(this.touch1[1]=U.invert(this.touch1[0])),this.that.__zoom=U,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(j){var U=pa(this.that).datum();u.call(j,this.that,new P9(j,{sourceEvent:this.sourceEvent,target:b,transform:this.that.__zoom,dispatch:u}),U)}};function E(j,...U){if(!e.apply(this,arguments))return;var _=C(this,U).event(j),M=this.__zoom,A=Math.max(i[0],Math.min(i[1],M.k*Math.pow(2,a.apply(this,arguments)))),D=Ja(j);if(_.wheel)(_.mouse[0][0]!==D[0]||_.mouse[0][1]!==D[1])&&(_.mouse[1]=M.invert(_.mouse[0]=D)),clearTimeout(_.wheel);else{if(M.k===A)return;_.mouse=[D,M.invert(D)],Oh(this),_.start()}Cc(j),_.wheel=setTimeout(B,v),_.zoom("mouse",n(g(y(M,A),_.mouse[0],_.mouse[1]),_.extent,o));function B(){_.wheel=null,_.end()}}function k(j,...U){if(f||!e.apply(this,arguments))return;var _=j.currentTarget,M=C(this,U,!0).event(j),A=pa(j.view).on("mousemove.zoom",L,!0).on("mouseup.zoom",q,!0),D=Ja(j,_),B=j.clientX,G=j.clientY;fI(j.view),Mm(j),M.mouse=[D,this.__zoom.invert(D)],Oh(this),M.start();function L(X){if(Cc(X),!M.moved){var K=X.clientX-B,ne=X.clientY-G;M.moved=K*K+ne*ne>x}M.event(X).zoom("mouse",n(g(M.that.__zoom,M.mouse[0]=Ja(X,_),M.mouse[1]),M.extent,o))}function q(X){A.on("mousemove.zoom mouseup.zoom",null),pI(X.view,M.moved),Cc(X),M.event(X).end()}}function O(j,...U){if(e.apply(this,arguments)){var _=this.__zoom,M=Ja(j.changedTouches?j.changedTouches[0]:j,this),A=_.invert(M),D=_.k*(j.shiftKey?.5:2),B=n(g(y(_,D),M,A),t.apply(this,U),o);Cc(j),l>0?pa(this).transition().duration(l).call(S,B,M,j):pa(this).call(b.transform,B,M,j)}}function R(j,...U){if(e.apply(this,arguments)){var _=j.touches,M=_.length,A=C(this,U,j.changedTouches.length===M).event(j),D,B,G,L;for(Mm(j),B=0;B<M;++B)G=_[B],L=Ja(G,this),L=[L,this.__zoom.invert(L),G.identifier],A.touch0?!A.touch1&&A.touch0[2]!==L[2]&&(A.touch1=L,A.taps=0):(A.touch0=L,D=!0,A.taps=1+!!h);h&&(h=clearTimeout(h)),D&&(A.taps<2&&(d=L[0],h=setTimeout(function(){h=null},p)),Oh(this),A.start())}}function I(j,...U){if(this.__zooming){var _=C(this,U).event(j),M=j.changedTouches,A=M.length,D,B,G,L;for(Cc(j),D=0;D<A;++D)B=M[D],G=Ja(B,this),_.touch0&&_.touch0[2]===B.identifier?_.touch0[0]=G:_.touch1&&_.touch1[2]===B.identifier&&(_.touch1[0]=G);if(B=_.that.__zoom,_.touch1){var q=_.touch0[0],X=_.touch0[1],K=_.touch1[0],ne=_.touch1[1],te=(te=K[0]-q[0])*te+(te=K[1]-q[1])*te,ee=(ee=ne[0]-X[0])*ee+(ee=ne[1]-X[1])*ee;B=y(B,Math.sqrt(te/ee)),G=[(q[0]+K[0])/2,(q[1]+K[1])/2],L=[(X[0]+ne[0])/2,(X[1]+ne[1])/2]}else if(_.touch0)G=_.touch0[0],L=_.touch0[1];else return;_.zoom("touch",n(g(B,G,L),_.extent,o))}}function F(j,...U){if(this.__zooming){var _=C(this,U).event(j),M=j.changedTouches,A=M.length,D,B;for(Mm(j),f&&clearTimeout(f),f=setTimeout(function(){f=null},p),D=0;D<A;++D)B=M[D],_.touch0&&_.touch0[2]===B.identifier?delete _.touch0:_.touch1&&_.touch1[2]===B.identifier&&delete _.touch1;if(_.touch1&&!_.touch0&&(_.touch0=_.touch1,delete _.touch1),_.touch0)_.touch0[1]=this.__zoom.invert(_.touch0[0]);else if(_.end(),_.taps===2&&(B=Ja(B,this),Math.hypot(d[0]-B[0],d[1]-B[1])<N)){var G=pa(this).on("dblclick.zoom");G&&G.apply(this,arguments)}}}return b.wheelDelta=function(j){return arguments.length?(a=typeof j=="function"?j:Xu(+j),b):a},b.filter=function(j){return arguments.length?(e=typeof j=="function"?j:Xu(!!j),b):e},b.touchable=function(j){return arguments.length?(s=typeof j=="function"?j:Xu(!!j),b):s},b.extent=function(j){return arguments.length?(t=typeof j=="function"?j:Xu([[+j[0][0],+j[0][1]],[+j[1][0],+j[1][1]]]),b):t},b.scaleExtent=function(j){return arguments.length?(i[0]=+j[0],i[1]=+j[1],b):[i[0],i[1]]},b.translateExtent=function(j){return arguments.length?(o[0][0]=+j[0][0],o[1][0]=+j[1][0],o[0][1]=+j[0][1],o[1][1]=+j[1][1],b):[[o[0][0],o[0][1]],[o[1][0],o[1][1]]]},b.constrain=function(j){return arguments.length?(n=j,b):n},b.duration=function(j){return arguments.length?(l=+j,b):l},b.interpolate=function(j){return arguments.length?(c=j,b):c},b.on=function(){var j=u.on.apply(u,arguments);return j===u?b:j},b.clickDistance=function(j){return arguments.length?(x=(j=+j)*j,b):Math.sqrt(x)},b.tapDistance=function(j){return arguments.length?(N=+j,b):N},b}const Lr={error001:()=>"[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001",error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:e=>`Node type "${e}" not found. Using fallback type "default".`,error004:()=>"The React Flow parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:e=>`The old edge with id=${e} does not exist.`,error009:e=>`Marker type "${e}" doesn't exist.`,error008:(e,{id:t,sourceHandle:n,targetHandle:a})=>`Couldn't create edge for ${e} handle id: "${e==="source"?n:a}", edge id: ${t}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:e=>`Edge type "${e}" not found. Using fallback type "default".`,error012:e=>`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(e="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${e}/dist/style.css' or base.css to make sure everything is working properly.`,error014:()=>"useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.",error015:()=>"It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs."},Id=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],RI=["Enter"," ","Escape"],OI={"node.a11yDescription.default":"Press enter or space to select a node. Press delete to remove it and escape to cancel.","node.a11yDescription.keyboardDisabled":"Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.","node.a11yDescription.ariaLiveMessage":({direction:e,x:t,y:n})=>`Moved selected node ${e}. New position, x: ${t}, y: ${n}`,"edge.a11yDescription.default":"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.","controls.ariaLabel":"Control Panel","controls.zoomIn.ariaLabel":"Zoom In","controls.zoomOut.ariaLabel":"Zoom Out","controls.fitView.ariaLabel":"Fit View","controls.interactive.ariaLabel":"Toggle Interactivity","minimap.ariaLabel":"Mini Map","handle.ariaLabel":"Handle"};var Hl;(function(e){e.Strict="strict",e.Loose="loose"})(Hl||(Hl={}));var oo;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(oo||(oo={}));var Md;(function(e){e.Partial="partial",e.Full="full"})(Md||(Md={}));const DI={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var ei;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(ei||(ei={}));var Cf;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(Cf||(Cf={}));var Pe;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(Pe||(Pe={}));const E2={[Pe.Left]:Pe.Right,[Pe.Right]:Pe.Left,[Pe.Top]:Pe.Bottom,[Pe.Bottom]:Pe.Top};function II(e){return e===null?null:e?"valid":"invalid"}const MI=e=>"id"in e&&"source"in e&&"target"in e,q9=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),m1=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),fu=(e,t=[0,0])=>{const{width:n,height:a}=Cs(e),s=e.origin??t,i=n*s[0],o=a*s[1];return{x:e.position.x-i,y:e.position.y-o}},G9=(e,t={nodeOrigin:[0,0]})=>{if(e.length===0)return{x:0,y:0,width:0,height:0};const n=e.reduce((a,s)=>{const i=typeof s=="string";let o=!t.nodeLookup&&!i?s:void 0;t.nodeLookup&&(o=i?t.nodeLookup.get(s):m1(s)?s:t.nodeLookup.get(s.id));const l=o?Af(o,t.nodeOrigin):{x:0,y:0,x2:0,y2:0};return bp(a,l)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return xp(n)},pu=(e,t={})=>{let n={x:1/0,y:1/0,x2:-1/0,y2:-1/0},a=!1;return e.forEach(s=>{(t.filter===void 0||t.filter(s))&&(n=bp(n,Af(s)),a=!0)}),a?xp(n):{x:0,y:0,width:0,height:0}},g1=(e,t,[n,a,s]=[0,0,1],i=!1,o=!1)=>{const l={...gu(t,[n,a,s]),width:t.width/s,height:t.height/s},c=[];for(const u of e.values()){const{measured:h,selectable:d=!0,hidden:f=!1}=u;if(o&&!d||f)continue;const p=h.width??u.width??u.initialWidth??null,v=h.height??u.height??u.initialHeight??null,x=Ld(l,Gl(u)),N=(p??0)*(v??0),b=i&&x>0;(!u.internals.handleBounds||b||x>=N||u.dragging)&&c.push(u)}return c},V9=(e,t)=>{const n=new Set;return e.forEach(a=>{n.add(a.id)}),t.filter(a=>n.has(a.source)||n.has(a.target))};function Y9(e,t){const n=new Map,a=t!=null&&t.nodes?new Set(t.nodes.map(s=>s.id)):null;return e.forEach(s=>{s.measured.width&&s.measured.height&&((t==null?void 0:t.includeHiddenNodes)||!s.hidden)&&(!a||a.has(s.id))&&n.set(s.id,s)}),n}async function W9({nodes:e,width:t,height:n,panZoom:a,minZoom:s,maxZoom:i},o){if(e.size===0)return Promise.resolve(!0);const l=Y9(e,o),c=pu(l),u=b1(c,t,n,(o==null?void 0:o.minZoom)??s,(o==null?void 0:o.maxZoom)??i,(o==null?void 0:o.padding)??.1);return await a.setViewport(u,{duration:o==null?void 0:o.duration,ease:o==null?void 0:o.ease,interpolate:o==null?void 0:o.interpolate}),Promise.resolve(!0)}function LI({nodeId:e,nextPosition:t,nodeLookup:n,nodeOrigin:a=[0,0],nodeExtent:s,onError:i}){const o=n.get(e),l=o.parentId?n.get(o.parentId):void 0,{x:c,y:u}=l?l.internals.positionAbsolute:{x:0,y:0},h=o.origin??a;let d=o.extent||s;if(o.extent==="parent"&&!o.expandParent)if(!l)i==null||i("005",Lr.error005());else{const p=l.measured.width,v=l.measured.height;p&&v&&(d=[[c,u],[c+p,u+v]])}else l&&Vl(o.extent)&&(d=[[o.extent[0][0]+c,o.extent[0][1]+u],[o.extent[1][0]+c,o.extent[1][1]+u]]);const f=Vl(d)?go(t,d,o.measured):t;return(o.measured.width===void 0||o.measured.height===void 0)&&(i==null||i("015",Lr.error015())),{position:{x:f.x-c+(o.measured.width??0)*h[0],y:f.y-u+(o.measured.height??0)*h[1]},positionAbsolute:f}}async function X9({nodesToRemove:e=[],edgesToRemove:t=[],nodes:n,edges:a,onBeforeDelete:s}){const i=new Set(e.map(f=>f.id)),o=[];for(const f of n){if(f.deletable===!1)continue;const p=i.has(f.id),v=!p&&f.parentId&&o.find(x=>x.id===f.parentId);(p||v)&&o.push(f)}const l=new Set(t.map(f=>f.id)),c=a.filter(f=>f.deletable!==!1),h=V9(o,c);for(const f of c)l.has(f.id)&&!h.find(v=>v.id===f.id)&&h.push(f);if(!s)return{edges:h,nodes:o};const d=await s({nodes:o,edges:h});return typeof d=="boolean"?d?{edges:h,nodes:o}:{edges:[],nodes:[]}:d}const ql=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),go=(e={x:0,y:0},t,n)=>({x:ql(e.x,t[0][0],t[1][0]-((n==null?void 0:n.width)??0)),y:ql(e.y,t[0][1],t[1][1]-((n==null?void 0:n.height)??0))});function UI(e,t,n){const{width:a,height:s}=Cs(n),{x:i,y:o}=n.internals.positionAbsolute;return go(e,[[i,o],[i+a,o+s]],t)}const T2=(e,t,n)=>e<t?ql(Math.abs(e-t),1,t)/t:e>n?-ql(Math.abs(e-n),1,t)/t:0,PI=(e,t,n=15,a=40)=>{const s=T2(e.x,a,t.width-a)*n,i=T2(e.y,a,t.height-a)*n;return[s,i]},bp=(e,t)=>({x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}),jw=({x:e,y:t,width:n,height:a})=>({x:e,y:t,x2:e+n,y2:t+a}),xp=({x:e,y:t,x2:n,y2:a})=>({x:e,y:t,width:n-e,height:a-t}),Gl=(e,t=[0,0])=>{var s,i;const{x:n,y:a}=m1(e)?e.internals.positionAbsolute:fu(e,t);return{x:n,y:a,width:((s=e.measured)==null?void 0:s.width)??e.width??e.initialWidth??0,height:((i=e.measured)==null?void 0:i.height)??e.height??e.initialHeight??0}},Af=(e,t=[0,0])=>{var s,i;const{x:n,y:a}=m1(e)?e.internals.positionAbsolute:fu(e,t);return{x:n,y:a,x2:n+(((s=e.measured)==null?void 0:s.width)??e.width??e.initialWidth??0),y2:a+(((i=e.measured)==null?void 0:i.height)??e.height??e.initialHeight??0)}},FI=(e,t)=>xp(bp(jw(e),jw(t))),Ld=(e,t)=>{const n=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),a=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(n*a)},C2=e=>tr(e.width)&&tr(e.height)&&tr(e.x)&&tr(e.y),tr=e=>!isNaN(e)&&isFinite(e),K9=(e,t)=>{},mu=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),gu=({x:e,y:t},[n,a,s],i=!1,o=[1,1])=>{const l={x:(e-n)/s,y:(t-a)/s};return i?mu(l,o):l},jf=({x:e,y:t},[n,a,s])=>({x:e*s+n,y:t*s+a});function Fo(e,t){if(typeof e=="number")return Math.floor((t-t/(1+e))*.5);if(typeof e=="string"&&e.endsWith("px")){const n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(n)}if(typeof e=="string"&&e.endsWith("%")){const n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(t*n*.01)}return console.error(`[React Flow] The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function Z9(e,t,n){if(typeof e=="string"||typeof e=="number"){const a=Fo(e,n),s=Fo(e,t);return{top:a,right:s,bottom:a,left:s,x:s*2,y:a*2}}if(typeof e=="object"){const a=Fo(e.top??e.y??0,n),s=Fo(e.bottom??e.y??0,n),i=Fo(e.left??e.x??0,t),o=Fo(e.right??e.x??0,t);return{top:a,right:o,bottom:s,left:i,x:i+o,y:a+s}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function Q9(e,t,n,a,s,i){const{x:o,y:l}=jf(e,[t,n,a]),{x:c,y:u}=jf({x:e.x+e.width,y:e.y+e.height},[t,n,a]),h=s-c,d=i-u;return{left:Math.floor(o),top:Math.floor(l),right:Math.floor(h),bottom:Math.floor(d)}}const b1=(e,t,n,a,s,i)=>{const o=Z9(i,t,n),l=(t-o.x)/e.width,c=(n-o.y)/e.height,u=Math.min(l,c),h=ql(u,a,s),d=e.x+e.width/2,f=e.y+e.height/2,p=t/2-d*h,v=n/2-f*h,x=Q9(e,p,v,h,t,n),N={left:Math.min(x.left-o.left,0),top:Math.min(x.top-o.top,0),right:Math.min(x.right-o.right,0),bottom:Math.min(x.bottom-o.bottom,0)};return{x:p-N.left+N.right,y:v-N.top+N.bottom,zoom:h}},Ud=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function Vl(e){return e!=null&&e!=="parent"}function Cs(e){var t,n;return{width:((t=e.measured)==null?void 0:t.width)??e.width??e.initialWidth??0,height:((n=e.measured)==null?void 0:n.height)??e.height??e.initialHeight??0}}function BI(e){var t,n;return(((t=e.measured)==null?void 0:t.width)??e.width??e.initialWidth)!==void 0&&(((n=e.measured)==null?void 0:n.height)??e.height??e.initialHeight)!==void 0}function zI(e,t={width:0,height:0},n,a,s){const i={...e},o=a.get(n);if(o){const l=o.origin||s;i.x+=o.internals.positionAbsolute.x-(t.width??0)*l[0],i.y+=o.internals.positionAbsolute.y-(t.height??0)*l[1]}return i}function A2(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function J9(){let e,t;return{promise:new Promise((a,s)=>{e=a,t=s}),resolve:e,reject:t}}function eH(e){return{...OI,...e||{}}}function dd(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:a,containerBounds:s}){const{x:i,y:o}=nr(e),l=gu({x:i-((s==null?void 0:s.left)??0),y:o-((s==null?void 0:s.top)??0)},a),{x:c,y:u}=n?mu(l,t):l;return{xSnapped:c,ySnapped:u,...l}}const x1=e=>({width:e.offsetWidth,height:e.offsetHeight}),$I=e=>{var t;return((t=e==null?void 0:e.getRootNode)==null?void 0:t.call(e))||(window==null?void 0:window.document)},tH=["INPUT","SELECT","TEXTAREA"];function HI(e){var a,s;const t=((s=(a=e.composedPath)==null?void 0:a.call(e))==null?void 0:s[0])||e.target;return(t==null?void 0:t.nodeType)!==1?!1:tH.includes(t.nodeName)||t.hasAttribute("contenteditable")||!!t.closest(".nokey")}const qI=e=>"clientX"in e,nr=(e,t)=>{var i,o;const n=qI(e),a=n?e.clientX:(i=e.touches)==null?void 0:i[0].clientX,s=n?e.clientY:(o=e.touches)==null?void 0:o[0].clientY;return{x:a-((t==null?void 0:t.left)??0),y:s-((t==null?void 0:t.top)??0)}},j2=(e,t,n,a,s)=>{const i=t.querySelectorAll(`.${e}`);return!i||!i.length?null:Array.from(i).map(o=>{const l=o.getBoundingClientRect();return{id:o.getAttribute("data-handleid"),type:e,nodeId:s,position:o.getAttribute("data-handlepos"),x:(l.left-n.left)/a,y:(l.top-n.top)/a,...x1(o)}})};function GI({sourceX:e,sourceY:t,targetX:n,targetY:a,sourceControlX:s,sourceControlY:i,targetControlX:o,targetControlY:l}){const c=e*.125+s*.375+o*.375+n*.125,u=t*.125+i*.375+l*.375+a*.125,h=Math.abs(c-e),d=Math.abs(u-t);return[c,u,h,d]}function Ku(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function k2({pos:e,x1:t,y1:n,x2:a,y2:s,c:i}){switch(e){case Pe.Left:return[t-Ku(t-a,i),n];case Pe.Right:return[t+Ku(a-t,i),n];case Pe.Top:return[t,n-Ku(n-s,i)];case Pe.Bottom:return[t,n+Ku(s-n,i)]}}function VI({sourceX:e,sourceY:t,sourcePosition:n=Pe.Bottom,targetX:a,targetY:s,targetPosition:i=Pe.Top,curvature:o=.25}){const[l,c]=k2({pos:n,x1:e,y1:t,x2:a,y2:s,c:o}),[u,h]=k2({pos:i,x1:a,y1:s,x2:e,y2:t,c:o}),[d,f,p,v]=GI({sourceX:e,sourceY:t,targetX:a,targetY:s,sourceControlX:l,sourceControlY:c,targetControlX:u,targetControlY:h});return[`M${e},${t} C${l},${c} ${u},${h} ${a},${s}`,d,f,p,v]}function YI({sourceX:e,sourceY:t,targetX:n,targetY:a}){const s=Math.abs(n-e)/2,i=n<e?n+s:n-s,o=Math.abs(a-t)/2,l=a<t?a+o:a-o;return[i,l,s,o]}function nH({sourceNode:e,targetNode:t,selected:n=!1,zIndex:a,elevateOnSelect:s=!1}){if(a!==void 0)return a;const i=s&&n?1e3:0,o=Math.max(e.parentId||s&&e.selected?e.internals.z:0,t.parentId||s&&t.selected?t.internals.z:0);return i+o}function aH({sourceNode:e,targetNode:t,width:n,height:a,transform:s}){const i=bp(Af(e),Af(t));i.x===i.x2&&(i.x2+=1),i.y===i.y2&&(i.y2+=1);const o={x:-s[0]/s[2],y:-s[1]/s[2],width:n/s[2],height:a/s[2]};return Ld(o,xp(i))>0}const rH=({source:e,sourceHandle:t,target:n,targetHandle:a})=>`xy-edge__${e}${t||""}-${n}${a||""}`,sH=(e,t)=>t.some(n=>n.source===e.source&&n.target===e.target&&(n.sourceHandle===e.sourceHandle||!n.sourceHandle&&!e.sourceHandle)&&(n.targetHandle===e.targetHandle||!n.targetHandle&&!e.targetHandle)),WI=(e,t)=>{if(!e.source||!e.target)return t;let n;return MI(e)?n={...e}:n={...e,id:rH(e)},sH(n,t)?t:(n.sourceHandle===null&&delete n.sourceHandle,n.targetHandle===null&&delete n.targetHandle,t.concat(n))};function XI({sourceX:e,sourceY:t,targetX:n,targetY:a}){const[s,i,o,l]=YI({sourceX:e,sourceY:t,targetX:n,targetY:a});return[`M ${e},${t}L ${n},${a}`,s,i,o,l]}const _2={[Pe.Left]:{x:-1,y:0},[Pe.Right]:{x:1,y:0},[Pe.Top]:{x:0,y:-1},[Pe.Bottom]:{x:0,y:1}},iH=({source:e,sourcePosition:t=Pe.Bottom,target:n})=>t===Pe.Left||t===Pe.Right?e.x<n.x?{x:1,y:0}:{x:-1,y:0}:e.y<n.y?{x:0,y:1}:{x:0,y:-1},R2=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function oH({source:e,sourcePosition:t=Pe.Bottom,target:n,targetPosition:a=Pe.Top,center:s,offset:i,stepPosition:o}){const l=_2[t],c=_2[a],u={x:e.x+l.x*i,y:e.y+l.y*i},h={x:n.x+c.x*i,y:n.y+c.y*i},d=iH({source:u,sourcePosition:t,target:h}),f=d.x!==0?"x":"y",p=d[f];let v=[],x,N;const b={x:0,y:0},y={x:0,y:0},[,,g,w]=YI({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(l[f]*c[f]===-1){f==="x"?(x=s.x??u.x+(h.x-u.x)*o,N=s.y??(u.y+h.y)/2):(x=s.x??(u.x+h.x)/2,N=s.y??u.y+(h.y-u.y)*o);const C=[{x,y:u.y},{x,y:h.y}],T=[{x:u.x,y:N},{x:h.x,y:N}];l[f]===p?v=f==="x"?C:T:v=f==="x"?T:C}else{const C=[{x:u.x,y:h.y}],T=[{x:h.x,y:u.y}];if(f==="x"?v=l.x===p?T:C:v=l.y===p?C:T,t===a){const I=Math.abs(e[f]-n[f]);if(I<=i){const F=Math.min(i-1,i-I);l[f]===p?b[f]=(u[f]>e[f]?-1:1)*F:y[f]=(h[f]>n[f]?-1:1)*F}}if(t!==a){const I=f==="x"?"y":"x",F=l[f]===c[I],j=u[I]>h[I],U=u[I]<h[I];(l[f]===1&&(!F&&j||F&&U)||l[f]!==1&&(!F&&U||F&&j))&&(v=f==="x"?C:T)}const E={x:u.x+b.x,y:u.y+b.y},k={x:h.x+y.x,y:h.y+y.y},O=Math.max(Math.abs(E.x-v[0].x),Math.abs(k.x-v[0].x)),R=Math.max(Math.abs(E.y-v[0].y),Math.abs(k.y-v[0].y));O>=R?(x=(E.x+k.x)/2,N=v[0].y):(x=v[0].x,N=(E.y+k.y)/2)}return[[e,{x:u.x+b.x,y:u.y+b.y},...v,{x:h.x+y.x,y:h.y+y.y},n],x,N,g,w]}function lH(e,t,n,a){const s=Math.min(R2(e,t)/2,R2(t,n)/2,a),{x:i,y:o}=t;if(e.x===i&&i===n.x||e.y===o&&o===n.y)return`L${i} ${o}`;if(e.y===o){const u=e.x<n.x?-1:1,h=e.y<n.y?1:-1;return`L ${i+s*u},${o}Q ${i},${o} ${i},${o+s*h}`}const l=e.x<n.x?1:-1,c=e.y<n.y?-1:1;return`L ${i},${o+s*c}Q ${i},${o} ${i+s*l},${o}`}function kw({sourceX:e,sourceY:t,sourcePosition:n=Pe.Bottom,targetX:a,targetY:s,targetPosition:i=Pe.Top,borderRadius:o=5,centerX:l,centerY:c,offset:u=20,stepPosition:h=.5}){const[d,f,p,v,x]=oH({source:{x:e,y:t},sourcePosition:n,target:{x:a,y:s},targetPosition:i,center:{x:l,y:c},offset:u,stepPosition:h});return[d.reduce((b,y,g)=>{let w="";return g>0&&g<d.length-1?w=lH(d[g-1],y,d[g+1],o):w=`${g===0?"M":"L"}${y.x} ${y.y}`,b+=w,b},""),f,p,v,x]}function O2(e){var t;return e&&!!(e.internals.handleBounds||(t=e.handles)!=null&&t.length)&&!!(e.measured.width||e.width||e.initialWidth)}function cH(e){var d;const{sourceNode:t,targetNode:n}=e;if(!O2(t)||!O2(n))return null;const a=t.internals.handleBounds||D2(t.handles),s=n.internals.handleBounds||D2(n.handles),i=I2((a==null?void 0:a.source)??[],e.sourceHandle),o=I2(e.connectionMode===Hl.Strict?(s==null?void 0:s.target)??[]:((s==null?void 0:s.target)??[]).concat((s==null?void 0:s.source)??[]),e.targetHandle);if(!i||!o)return(d=e.onError)==null||d.call(e,"008",Lr.error008(i?"target":"source",{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;const l=(i==null?void 0:i.position)||Pe.Bottom,c=(o==null?void 0:o.position)||Pe.Top,u=Pd(t,i,l),h=Pd(n,o,c);return{sourceX:u.x,sourceY:u.y,targetX:h.x,targetY:h.y,sourcePosition:l,targetPosition:c}}function D2(e){if(!e)return null;const t=[],n=[];for(const a of e)a.width=a.width??1,a.height=a.height??1,a.type==="source"?t.push(a):a.type==="target"&&n.push(a);return{source:t,target:n}}function Pd(e,t,n=Pe.Left,a=!1){const s=((t==null?void 0:t.x)??0)+e.internals.positionAbsolute.x,i=((t==null?void 0:t.y)??0)+e.internals.positionAbsolute.y,{width:o,height:l}=t??Cs(e);if(a)return{x:s+o/2,y:i+l/2};switch((t==null?void 0:t.position)??n){case Pe.Top:return{x:s+o/2,y:i};case Pe.Right:return{x:s+o,y:i+l/2};case Pe.Bottom:return{x:s+o/2,y:i+l};case Pe.Left:return{x:s,y:i+l/2}}}function I2(e,t){return e&&(t?e.find(n=>n.id===t):e[0])||null}function _w(e,t){return e?typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(a=>`${a}=${e[a]}`).join("&")}`:""}function dH(e,{id:t,defaultColor:n,defaultMarkerStart:a,defaultMarkerEnd:s}){const i=new Set;return e.reduce((o,l)=>([l.markerStart||a,l.markerEnd||s].forEach(c=>{if(c&&typeof c=="object"){const u=_w(c,t);i.has(u)||(o.push({id:u,color:c.color||n,...c}),i.add(u))}}),o),[]).sort((o,l)=>o.id.localeCompare(l.id))}const KI=1e3,uH=10,y1={nodeOrigin:[0,0],nodeExtent:Id,elevateNodesOnSelect:!0,defaults:{}},hH={...y1,checkEquality:!0};function v1(e,t){const n={...e};for(const a in t)t[a]!==void 0&&(n[a]=t[a]);return n}function fH(e,t,n){const a=v1(y1,n);for(const s of e.values())if(s.parentId)w1(s,e,t,a);else{const i=fu(s,a.nodeOrigin),o=Vl(s.extent)?s.extent:a.nodeExtent,l=go(i,o,Cs(s));s.internals.positionAbsolute=l}}function pH(e,t){if(!e.handles)return e.measured?t==null?void 0:t.internals.handleBounds:void 0;const n=[],a=[];for(const s of e.handles){const i={id:s.id,width:s.width??1,height:s.height??1,nodeId:e.id,x:s.x,y:s.y,position:s.position,type:s.type};s.type==="source"?n.push(i):s.type==="target"&&a.push(i)}return{source:n,target:a}}function Rw(e,t,n,a){var u,h;const s=v1(hH,a);let i={i:-1},o=e.length>0;const l=new Map(t),c=s!=null&&s.elevateNodesOnSelect?KI:0;t.clear(),n.clear();for(const d of e){let f=l.get(d.id);if(s.checkEquality&&d===(f==null?void 0:f.internals.userNode))t.set(d.id,f);else{const p=fu(d,s.nodeOrigin),v=Vl(d.extent)?d.extent:s.nodeExtent,x=go(p,v,Cs(d));f={...s.defaults,...d,measured:{width:(u=d.measured)==null?void 0:u.width,height:(h=d.measured)==null?void 0:h.height},internals:{positionAbsolute:x,handleBounds:pH(d,f),z:ZI(d,c),userNode:d}},t.set(d.id,f)}(f.measured===void 0||f.measured.width===void 0||f.measured.height===void 0)&&!f.hidden&&(o=!1),d.parentId&&w1(f,t,n,a,i)}return o}function mH(e,t){if(!e.parentId)return;const n=t.get(e.parentId);n?n.set(e.id,e):t.set(e.parentId,new Map([[e.id,e]]))}function w1(e,t,n,a,s){const{elevateNodesOnSelect:i,nodeOrigin:o,nodeExtent:l}=v1(y1,a),c=e.parentId,u=t.get(c);if(!u){console.warn(`Parent node ${c} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}mH(e,n),s&&!u.parentId&&u.internals.rootParentIndex===void 0&&(u.internals.rootParentIndex=++s.i,u.internals.z=u.internals.z+s.i*uH),s&&u.internals.rootParentIndex!==void 0&&(s.i=u.internals.rootParentIndex);const h=i?KI:0,{x:d,y:f,z:p}=gH(e,u,o,l,h),{positionAbsolute:v}=e.internals,x=d!==v.x||f!==v.y;(x||p!==e.internals.z)&&t.set(e.id,{...e,internals:{...e.internals,positionAbsolute:x?{x:d,y:f}:v,z:p}})}function ZI(e,t){return(tr(e.zIndex)?e.zIndex:0)+(e.selected?t:0)}function gH(e,t,n,a,s){const{x:i,y:o}=t.internals.positionAbsolute,l=Cs(e),c=fu(e,n),u=Vl(e.extent)?go(c,e.extent,l):c;let h=go({x:i+u.x,y:o+u.y},a,l);e.extent==="parent"&&(h=UI(h,l,t));const d=ZI(e,s),f=t.internals.z??0;return{x:h.x,y:h.y,z:f>=d?f+1:d}}function N1(e,t,n,a=[0,0]){var o;const s=[],i=new Map;for(const l of e){const c=t.get(l.parentId);if(!c)continue;const u=((o=i.get(l.parentId))==null?void 0:o.expandedRect)??Gl(c),h=FI(u,l.rect);i.set(l.parentId,{expandedRect:h,parent:c})}return i.size>0&&i.forEach(({expandedRect:l,parent:c},u)=>{var g;const h=c.internals.positionAbsolute,d=Cs(c),f=c.origin??a,p=l.x<h.x?Math.round(Math.abs(h.x-l.x)):0,v=l.y<h.y?Math.round(Math.abs(h.y-l.y)):0,x=Math.max(d.width,Math.round(l.width)),N=Math.max(d.height,Math.round(l.height)),b=(x-d.width)*f[0],y=(N-d.height)*f[1];(p>0||v>0||b||y)&&(s.push({id:u,type:"position",position:{x:c.position.x-p+b,y:c.position.y-v+y}}),(g=n.get(u))==null||g.forEach(w=>{e.some(S=>S.id===w.id)||s.push({id:w.id,type:"position",position:{x:w.position.x+p,y:w.position.y+v}})})),(d.width<l.width||d.height<l.height||p||v)&&s.push({id:u,type:"dimensions",setAttributes:!0,dimensions:{width:x+(p?f[0]*p-b:0),height:N+(v?f[1]*v-y:0)}})}),s}function bH(e,t,n,a,s,i){const o=a==null?void 0:a.querySelector(".xyflow__viewport");let l=!1;if(!o)return{changes:[],updatedInternals:l};const c=[],u=window.getComputedStyle(o),{m22:h}=new window.DOMMatrixReadOnly(u.transform),d=[];for(const f of e.values()){const p=t.get(f.id);if(!p)continue;if(p.hidden){t.set(p.id,{...p,internals:{...p.internals,handleBounds:void 0}}),l=!0;continue}const v=x1(f.nodeElement),x=p.measured.width!==v.width||p.measured.height!==v.height;if(!!(v.width&&v.height&&(x||!p.internals.handleBounds||f.force))){const b=f.nodeElement.getBoundingClientRect(),y=Vl(p.extent)?p.extent:i;let{positionAbsolute:g}=p.internals;p.parentId&&p.extent==="parent"?g=UI(g,v,t.get(p.parentId)):y&&(g=go(g,y,v));const w={...p,measured:v,internals:{...p.internals,positionAbsolute:g,handleBounds:{source:j2("source",f.nodeElement,b,h,p.id),target:j2("target",f.nodeElement,b,h,p.id)}}};t.set(p.id,w),p.parentId&&w1(w,t,n,{nodeOrigin:s}),l=!0,x&&(c.push({id:p.id,type:"dimensions",dimensions:v}),p.expandParent&&p.parentId&&d.push({id:p.id,parentId:p.parentId,rect:Gl(w,s)}))}}if(d.length>0){const f=N1(d,t,n,s);c.push(...f)}return{changes:c,updatedInternals:l}}async function xH({delta:e,panZoom:t,transform:n,translateExtent:a,width:s,height:i}){if(!t||!e.x&&!e.y)return Promise.resolve(!1);const o=await t.setViewportConstrained({x:n[0]+e.x,y:n[1]+e.y,zoom:n[2]},[[0,0],[s,i]],a),l=!!o&&(o.x!==n[0]||o.y!==n[1]||o.k!==n[2]);return Promise.resolve(l)}function M2(e,t,n,a,s,i){let o=s;const l=a.get(o)||new Map;a.set(o,l.set(n,t)),o=`${s}-${e}`;const c=a.get(o)||new Map;if(a.set(o,c.set(n,t)),i){o=`${s}-${e}-${i}`;const u=a.get(o)||new Map;a.set(o,u.set(n,t))}}function QI(e,t,n){e.clear(),t.clear();for(const a of n){const{source:s,target:i,sourceHandle:o=null,targetHandle:l=null}=a,c={edgeId:a.id,source:s,target:i,sourceHandle:o,targetHandle:l},u=`${s}-${o}--${i}-${l}`,h=`${i}-${l}--${s}-${o}`;M2("source",c,h,e,s,o),M2("target",c,u,e,i,l),t.set(a.id,a)}}function JI(e,t){if(!e.parentId)return!1;const n=t.get(e.parentId);return n?n.selected?!0:JI(n,t):!1}function L2(e,t,n){var s;let a=e;do{if((s=a==null?void 0:a.matches)!=null&&s.call(a,t))return!0;if(a===n)return!1;a=a==null?void 0:a.parentElement}while(a);return!1}function yH(e,t,n,a){const s=new Map;for(const[i,o]of e)if((o.selected||o.id===a)&&(!o.parentId||!JI(o,e))&&(o.draggable||t&&typeof o.draggable>"u")){const l=e.get(i);l&&s.set(i,{id:i,position:l.position||{x:0,y:0},distance:{x:n.x-l.internals.positionAbsolute.x,y:n.y-l.internals.positionAbsolute.y},extent:l.extent,parentId:l.parentId,origin:l.origin,expandParent:l.expandParent,internals:{positionAbsolute:l.internals.positionAbsolute||{x:0,y:0}},measured:{width:l.measured.width??0,height:l.measured.height??0}})}return s}function Lm({nodeId:e,dragItems:t,nodeLookup:n,dragging:a=!0}){var o,l,c;const s=[];for(const[u,h]of t){const d=(o=n.get(u))==null?void 0:o.internals.userNode;d&&s.push({...d,position:h.position,dragging:a})}if(!e)return[s[0],s];const i=(l=n.get(e))==null?void 0:l.internals.userNode;return[i?{...i,position:((c=t.get(e))==null?void 0:c.position)||i.position,dragging:a}:s[0],s]}function vH({dragItems:e,snapGrid:t,x:n,y:a}){const s=e.values().next().value;if(!s)return null;const i={x:n-s.distance.x,y:a-s.distance.y},o=mu(i,t);return{x:o.x-i.x,y:o.y-i.y}}function wH({onNodeMouseDown:e,getStoreItems:t,onDragStart:n,onDrag:a,onDragStop:s}){let i={x:null,y:null},o=0,l=new Map,c=!1,u={x:0,y:0},h=null,d=!1,f=null,p=!1,v=!1,x=null;function N({noDragClassName:y,handleSelector:g,domNode:w,isSelectable:S,nodeId:C,nodeClickDistance:T=0}){f=pa(w);function E({x:I,y:F}){const{nodeLookup:j,nodeExtent:U,snapGrid:_,snapToGrid:M,nodeOrigin:A,onNodeDrag:D,onSelectionDrag:B,onError:G,updateNodePositions:L}=t();i={x:I,y:F};let q=!1;const X=l.size>1,K=X&&U?jw(pu(l)):null,ne=X&&M?vH({dragItems:l,snapGrid:_,x:I,y:F}):null;for(const[te,ee]of l){if(!j.has(te))continue;let ae={x:I-ee.distance.x,y:F-ee.distance.y};M&&(ae=ne?{x:Math.round(ae.x+ne.x),y:Math.round(ae.y+ne.y)}:mu(ae,_));let ge=null;if(X&&U&&!ee.extent&&K){const{positionAbsolute:me}=ee.internals,Re=me.x-K.x+U[0][0],Me=me.x+ee.measured.width-K.x2+U[1][0],Ue=me.y-K.y+U[0][1],$e=me.y+ee.measured.height-K.y2+U[1][1];ge=[[Re,Ue],[Me,$e]]}const{position:se,positionAbsolute:fe}=LI({nodeId:te,nextPosition:ae,nodeLookup:j,nodeExtent:ge||U,nodeOrigin:A,onError:G});q=q||ee.position.x!==se.x||ee.position.y!==se.y,ee.position=se,ee.internals.positionAbsolute=fe}if(v=v||q,!!q&&(L(l,!0),x&&(a||D||!C&&B))){const[te,ee]=Lm({nodeId:C,dragItems:l,nodeLookup:j});a==null||a(x,l,te,ee),D==null||D(x,te,ee),C||B==null||B(x,ee)}}async function k(){if(!h)return;const{transform:I,panBy:F,autoPanSpeed:j,autoPanOnNodeDrag:U}=t();if(!U){c=!1,cancelAnimationFrame(o);return}const[_,M]=PI(u,h,j);(_!==0||M!==0)&&(i.x=(i.x??0)-_/I[2],i.y=(i.y??0)-M/I[2],await F({x:_,y:M})&&E(i)),o=requestAnimationFrame(k)}function O(I){var X;const{nodeLookup:F,multiSelectionActive:j,nodesDraggable:U,transform:_,snapGrid:M,snapToGrid:A,selectNodesOnDrag:D,onNodeDragStart:B,onSelectionDragStart:G,unselectNodesAndEdges:L}=t();d=!0,(!D||!S)&&!j&&C&&((X=F.get(C))!=null&&X.selected||L()),S&&D&&C&&(e==null||e(C));const q=dd(I.sourceEvent,{transform:_,snapGrid:M,snapToGrid:A,containerBounds:h});if(i=q,l=yH(F,U,q,C),l.size>0&&(n||B||!C&&G)){const[K,ne]=Lm({nodeId:C,dragItems:l,nodeLookup:F});n==null||n(I.sourceEvent,l,K,ne),B==null||B(I.sourceEvent,K,ne),C||G==null||G(I.sourceEvent,ne)}}const R=mI().clickDistance(T).on("start",I=>{const{domNode:F,nodeDragThreshold:j,transform:U,snapGrid:_,snapToGrid:M}=t();h=(F==null?void 0:F.getBoundingClientRect())||null,p=!1,v=!1,x=I.sourceEvent,j===0&&O(I),i=dd(I.sourceEvent,{transform:U,snapGrid:_,snapToGrid:M,containerBounds:h}),u=nr(I.sourceEvent,h)}).on("drag",I=>{const{autoPanOnNodeDrag:F,transform:j,snapGrid:U,snapToGrid:_,nodeDragThreshold:M,nodeLookup:A}=t(),D=dd(I.sourceEvent,{transform:j,snapGrid:U,snapToGrid:_,containerBounds:h});if(x=I.sourceEvent,(I.sourceEvent.type==="touchmove"&&I.sourceEvent.touches.length>1||C&&!A.has(C))&&(p=!0),!p){if(!c&&F&&d&&(c=!0,k()),!d){const B=nr(I.sourceEvent,h),G=B.x-u.x,L=B.y-u.y;Math.sqrt(G*G+L*L)>M&&O(I)}(i.x!==D.xSnapped||i.y!==D.ySnapped)&&l&&d&&(u=nr(I.sourceEvent,h),E(D))}}).on("end",I=>{if(!(!d||p)&&(c=!1,d=!1,cancelAnimationFrame(o),l.size>0)){const{nodeLookup:F,updateNodePositions:j,onNodeDragStop:U,onSelectionDragStop:_}=t();if(v&&(j(l,!1),v=!1),s||U||!C&&_){const[M,A]=Lm({nodeId:C,dragItems:l,nodeLookup:F,dragging:!1});s==null||s(I.sourceEvent,l,M,A),U==null||U(I.sourceEvent,M,A),C||_==null||_(I.sourceEvent,A)}}}).filter(I=>{const F=I.target;return!I.button&&(!y||!L2(F,`.${y}`,w))&&(!g||L2(F,g,w))});f.call(R)}function b(){f==null||f.on(".drag",null)}return{update:N,destroy:b}}function NH(e,t,n){const a=[],s={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(const i of t.values())Ld(s,Gl(i))>0&&a.push(i);return a}const SH=250;function EH(e,t,n,a){var l,c;let s=[],i=1/0;const o=NH(e,n,t+SH);for(const u of o){const h=[...((l=u.internals.handleBounds)==null?void 0:l.source)??[],...((c=u.internals.handleBounds)==null?void 0:c.target)??[]];for(const d of h){if(a.nodeId===d.nodeId&&a.type===d.type&&a.id===d.id)continue;const{x:f,y:p}=Pd(u,d,d.position,!0),v=Math.sqrt(Math.pow(f-e.x,2)+Math.pow(p-e.y,2));v>t||(v<i?(s=[{...d,x:f,y:p}],i=v):v===i&&s.push({...d,x:f,y:p}))}}if(!s.length)return null;if(s.length>1){const u=a.type==="source"?"target":"source";return s.find(h=>h.type===u)??s[0]}return s[0]}function eM(e,t,n,a,s,i=!1){var u,h,d;const o=a.get(e);if(!o)return null;const l=s==="strict"?(u=o.internals.handleBounds)==null?void 0:u[t]:[...((h=o.internals.handleBounds)==null?void 0:h.source)??[],...((d=o.internals.handleBounds)==null?void 0:d.target)??[]],c=(n?l==null?void 0:l.find(f=>f.id===n):l==null?void 0:l[0])??null;return c&&i?{...c,...Pd(o,c,c.position,!0)}:c}function tM(e,t){return e||(t!=null&&t.classList.contains("target")?"target":t!=null&&t.classList.contains("source")?"source":null)}function TH(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}const nM=()=>!0;function CH(e,{connectionMode:t,connectionRadius:n,handleId:a,nodeId:s,edgeUpdaterType:i,isTarget:o,domNode:l,nodeLookup:c,lib:u,autoPanOnConnect:h,flowId:d,panBy:f,cancelConnection:p,onConnectStart:v,onConnect:x,onConnectEnd:N,isValidConnection:b=nM,onReconnectEnd:y,updateConnection:g,getTransform:w,getFromHandle:S,autoPanSpeed:C,dragThreshold:T=1,handleDomNode:E}){const k=$I(e.target);let O=0,R;const{x:I,y:F}=nr(e),j=tM(i,E),U=l==null?void 0:l.getBoundingClientRect();let _=!1;if(!U||!j)return;const M=eM(s,j,a,c,t);if(!M)return;let A=nr(e,U),D=!1,B=null,G=!1,L=null;function q(){if(!h||!U)return;const[se,fe]=PI(A,U,C);f({x:se,y:fe}),O=requestAnimationFrame(q)}const X={...M,nodeId:s,type:j,position:M.position},K=c.get(s);let te={inProgress:!0,isValid:null,from:Pd(K,X,Pe.Left,!0),fromHandle:X,fromPosition:X.position,fromNode:K,to:A,toHandle:null,toPosition:E2[X.position],toNode:null,pointer:A};function ee(){_=!0,g(te),v==null||v(e,{nodeId:s,handleId:a,handleType:j})}T===0&&ee();function ae(se){if(!_){const{x:Me,y:Ue}=nr(se),$e=Me-I,pt=Ue-F;if(!($e*$e+pt*pt>T*T))return;ee()}if(!S()||!X){ge(se);return}const fe=w();A=nr(se,U),R=EH(gu(A,fe,!1,[1,1]),n,c,X),D||(q(),D=!0);const me=aM(se,{handle:R,connectionMode:t,fromNodeId:s,fromHandleId:a,fromType:o?"target":"source",isValidConnection:b,doc:k,lib:u,flowId:d,nodeLookup:c});L=me.handleDomNode,B=me.connection,G=TH(!!R,me.isValid);const Re={...te,isValid:G,to:me.toHandle&&G?jf({x:me.toHandle.x,y:me.toHandle.y},fe):A,toHandle:me.toHandle,toPosition:G&&me.toHandle?me.toHandle.position:E2[X.position],toNode:me.toHandle?c.get(me.toHandle.nodeId):null,pointer:A};g(Re),te=Re}function ge(se){if(!("touches"in se&&se.touches.length>0)){if(_){(R||L)&&B&&G&&(x==null||x(B));const{inProgress:fe,...me}=te,Re={...me,toPosition:te.toHandle?te.toPosition:null};N==null||N(se,Re),i&&(y==null||y(se,Re))}p(),cancelAnimationFrame(O),D=!1,G=!1,B=null,L=null,k.removeEventListener("mousemove",ae),k.removeEventListener("mouseup",ge),k.removeEventListener("touchmove",ae),k.removeEventListener("touchend",ge)}}k.addEventListener("mousemove",ae),k.addEventListener("mouseup",ge),k.addEventListener("touchmove",ae),k.addEventListener("touchend",ge)}function aM(e,{handle:t,connectionMode:n,fromNodeId:a,fromHandleId:s,fromType:i,doc:o,lib:l,flowId:c,isValidConnection:u=nM,nodeLookup:h}){const d=i==="target",f=t?o.querySelector(`.${l}-flow__handle[data-id="${c}-${t==null?void 0:t.nodeId}-${t==null?void 0:t.id}-${t==null?void 0:t.type}"]`):null,{x:p,y:v}=nr(e),x=o.elementFromPoint(p,v),N=x!=null&&x.classList.contains(`${l}-flow__handle`)?x:f,b={handleDomNode:N,isValid:!1,connection:null,toHandle:null};if(N){const y=tM(void 0,N),g=N.getAttribute("data-nodeid"),w=N.getAttribute("data-handleid"),S=N.classList.contains("connectable"),C=N.classList.contains("connectableend");if(!g||!y)return b;const T={source:d?g:a,sourceHandle:d?w:s,target:d?a:g,targetHandle:d?s:w};b.connection=T;const k=S&&C&&(n===Hl.Strict?d&&y==="source"||!d&&y==="target":g!==a||w!==s);b.isValid=k&&u(T),b.toHandle=eM(g,y,w,h,n,!0)}return b}const Ow={onPointerDown:CH,isValid:aM};function AH({domNode:e,panZoom:t,getTransform:n,getViewScale:a}){const s=pa(e);function i({translateExtent:l,width:c,height:u,zoomStep:h=1,pannable:d=!0,zoomable:f=!0,inversePan:p=!1}){const v=g=>{if(g.sourceEvent.type!=="wheel"||!t)return;const w=n(),S=g.sourceEvent.ctrlKey&&Ud()?10:1,C=-g.sourceEvent.deltaY*(g.sourceEvent.deltaMode===1?.05:g.sourceEvent.deltaMode?1:.002)*h,T=w[2]*Math.pow(2,C*S);t.scaleTo(T)};let x=[0,0];const N=g=>{(g.sourceEvent.type==="mousedown"||g.sourceEvent.type==="touchstart")&&(x=[g.sourceEvent.clientX??g.sourceEvent.touches[0].clientX,g.sourceEvent.clientY??g.sourceEvent.touches[0].clientY])},b=g=>{const w=n();if(g.sourceEvent.type!=="mousemove"&&g.sourceEvent.type!=="touchmove"||!t)return;const S=[g.sourceEvent.clientX??g.sourceEvent.touches[0].clientX,g.sourceEvent.clientY??g.sourceEvent.touches[0].clientY],C=[S[0]-x[0],S[1]-x[1]];x=S;const T=a()*Math.max(w[2],Math.log(w[2]))*(p?-1:1),E={x:w[0]-C[0]*T,y:w[1]-C[1]*T},k=[[0,0],[c,u]];t.setViewportConstrained({x:E.x,y:E.y,zoom:w[2]},k,l)},y=_I().on("start",N).on("zoom",d?b:null).on("zoom.wheel",f?v:null);s.call(y,{})}function o(){s.on("zoom",null)}return{update:i,destroy:o,pointer:Ja}}const yp=e=>({x:e.x,y:e.y,zoom:e.k}),Um=({x:e,y:t,zoom:n})=>gp.translate(e,t).scale(n),ul=(e,t)=>e.target.closest(`.${t}`),rM=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),jH=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,Pm=(e,t=0,n=jH,a=()=>{})=>{const s=typeof t=="number"&&t>0;return s||a(),s?e.transition().duration(t).ease(n).on("end",a):e},sM=e=>{const t=e.ctrlKey&&Ud()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function kH({zoomPanValues:e,noWheelClassName:t,d3Selection:n,d3Zoom:a,panOnScrollMode:s,panOnScrollSpeed:i,zoomOnPinch:o,onPanZoomStart:l,onPanZoom:c,onPanZoomEnd:u}){return h=>{if(ul(h,t))return h.ctrlKey&&h.preventDefault(),!1;h.preventDefault(),h.stopImmediatePropagation();const d=n.property("__zoom").k||1;if(h.ctrlKey&&o){const N=Ja(h),b=sM(h),y=d*Math.pow(2,b);a.scaleTo(n,y,N,h);return}const f=h.deltaMode===1?20:1;let p=s===oo.Vertical?0:h.deltaX*f,v=s===oo.Horizontal?0:h.deltaY*f;!Ud()&&h.shiftKey&&s!==oo.Vertical&&(p=h.deltaY*f,v=0),a.translateBy(n,-(p/d)*i,-(v/d)*i,{internal:!0});const x=yp(n.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?(c==null||c(h,x),e.panScrollTimeout=setTimeout(()=>{u==null||u(h,x),e.isPanScrolling=!1},150)):(e.isPanScrolling=!0,l==null||l(h,x))}}function _H({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:n}){return function(a,s){const i=a.type==="wheel",o=!t&&i&&!a.ctrlKey,l=ul(a,e);if(a.ctrlKey&&i&&l&&a.preventDefault(),o||l)return null;a.preventDefault(),n.call(this,a,s)}}function RH({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:n}){return a=>{var i,o,l;if((i=a.sourceEvent)!=null&&i.internal)return;const s=yp(a.transform);e.mouseButton=((o=a.sourceEvent)==null?void 0:o.button)||0,e.isZoomingOrPanning=!0,e.prevViewport=s,((l=a.sourceEvent)==null?void 0:l.type)==="mousedown"&&t(!0),n&&(n==null||n(a.sourceEvent,s))}}function OH({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:n,onTransformChange:a,onPanZoom:s}){return i=>{var o,l;e.usedRightMouseButton=!!(n&&rM(t,e.mouseButton??0)),(o=i.sourceEvent)!=null&&o.sync||a([i.transform.x,i.transform.y,i.transform.k]),s&&!((l=i.sourceEvent)!=null&&l.internal)&&(s==null||s(i.sourceEvent,yp(i.transform)))}}function DH({zoomPanValues:e,panOnDrag:t,panOnScroll:n,onDraggingChange:a,onPanZoomEnd:s,onPaneContextMenu:i}){return o=>{var l;if(!((l=o.sourceEvent)!=null&&l.internal)&&(e.isZoomingOrPanning=!1,i&&rM(t,e.mouseButton??0)&&!e.usedRightMouseButton&&o.sourceEvent&&i(o.sourceEvent),e.usedRightMouseButton=!1,a(!1),s)){const c=yp(o.transform);e.prevViewport=c,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{s==null||s(o.sourceEvent,c)},n?150:0)}}}function IH({zoomActivationKeyPressed:e,zoomOnScroll:t,zoomOnPinch:n,panOnDrag:a,panOnScroll:s,zoomOnDoubleClick:i,userSelectionActive:o,noWheelClassName:l,noPanClassName:c,lib:u,connectionInProgress:h}){return d=>{var N;const f=e||t,p=n&&d.ctrlKey,v=d.type==="wheel";if(d.button===1&&d.type==="mousedown"&&(ul(d,`${u}-flow__node`)||ul(d,`${u}-flow__edge`)))return!0;if(!a&&!f&&!s&&!i&&!n||o||h&&!v||ul(d,l)&&v||ul(d,c)&&(!v||s&&v&&!e)||!n&&d.ctrlKey&&v)return!1;if(!n&&d.type==="touchstart"&&((N=d.touches)==null?void 0:N.length)>1)return d.preventDefault(),!1;if(!f&&!s&&!p&&v||!a&&(d.type==="mousedown"||d.type==="touchstart")||Array.isArray(a)&&!a.includes(d.button)&&d.type==="mousedown")return!1;const x=Array.isArray(a)&&a.includes(d.button)||!d.button||d.button<=1;return(!d.ctrlKey||v)&&x}}function MH({domNode:e,minZoom:t,maxZoom:n,translateExtent:a,viewport:s,onPanZoom:i,onPanZoomStart:o,onPanZoomEnd:l,onDraggingChange:c}){const u={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},h=e.getBoundingClientRect(),d=_I().scaleExtent([t,n]).translateExtent(a),f=pa(e).call(d);y({x:s.x,y:s.y,zoom:ql(s.zoom,t,n)},[[0,0],[h.width,h.height]],a);const p=f.on("wheel.zoom"),v=f.on("dblclick.zoom");d.wheelDelta(sM);function x(R,I){return f?new Promise(F=>{d==null||d.interpolate((I==null?void 0:I.interpolate)==="linear"?cd:kh).transform(Pm(f,I==null?void 0:I.duration,I==null?void 0:I.ease,()=>F(!0)),R)}):Promise.resolve(!1)}function N({noWheelClassName:R,noPanClassName:I,onPaneContextMenu:F,userSelectionActive:j,panOnScroll:U,panOnDrag:_,panOnScrollMode:M,panOnScrollSpeed:A,preventScrolling:D,zoomOnPinch:B,zoomOnScroll:G,zoomOnDoubleClick:L,zoomActivationKeyPressed:q,lib:X,onTransformChange:K,connectionInProgress:ne,paneClickDistance:te,selectionOnDrag:ee}){j&&!u.isZoomingOrPanning&&b();const ae=U&&!q&&!j;d.clickDistance(ee?1/0:!tr(te)||te<0?0:te);const ge=ae?kH({zoomPanValues:u,noWheelClassName:R,d3Selection:f,d3Zoom:d,panOnScrollMode:M,panOnScrollSpeed:A,zoomOnPinch:B,onPanZoomStart:o,onPanZoom:i,onPanZoomEnd:l}):_H({noWheelClassName:R,preventScrolling:D,d3ZoomHandler:p});if(f.on("wheel.zoom",ge,{passive:!1}),!j){const fe=RH({zoomPanValues:u,onDraggingChange:c,onPanZoomStart:o});d.on("start",fe);const me=OH({zoomPanValues:u,panOnDrag:_,onPaneContextMenu:!!F,onPanZoom:i,onTransformChange:K});d.on("zoom",me);const Re=DH({zoomPanValues:u,panOnDrag:_,panOnScroll:U,onPaneContextMenu:F,onPanZoomEnd:l,onDraggingChange:c});d.on("end",Re)}const se=IH({zoomActivationKeyPressed:q,panOnDrag:_,zoomOnScroll:G,panOnScroll:U,zoomOnDoubleClick:L,zoomOnPinch:B,userSelectionActive:j,noPanClassName:I,noWheelClassName:R,lib:X,connectionInProgress:ne});d.filter(se),L?f.on("dblclick.zoom",v):f.on("dblclick.zoom",null)}function b(){d.on("zoom",null)}async function y(R,I,F){const j=Um(R),U=d==null?void 0:d.constrain()(j,I,F);return U&&await x(U),new Promise(_=>_(U))}async function g(R,I){const F=Um(R);return await x(F,I),new Promise(j=>j(F))}function w(R){if(f){const I=Um(R),F=f.property("__zoom");(F.k!==R.zoom||F.x!==R.x||F.y!==R.y)&&(d==null||d.transform(f,I,null,{sync:!0}))}}function S(){const R=f?kI(f.node()):{x:0,y:0,k:1};return{x:R.x,y:R.y,zoom:R.k}}function C(R,I){return f?new Promise(F=>{d==null||d.interpolate((I==null?void 0:I.interpolate)==="linear"?cd:kh).scaleTo(Pm(f,I==null?void 0:I.duration,I==null?void 0:I.ease,()=>F(!0)),R)}):Promise.resolve(!1)}function T(R,I){return f?new Promise(F=>{d==null||d.interpolate((I==null?void 0:I.interpolate)==="linear"?cd:kh).scaleBy(Pm(f,I==null?void 0:I.duration,I==null?void 0:I.ease,()=>F(!0)),R)}):Promise.resolve(!1)}function E(R){d==null||d.scaleExtent(R)}function k(R){d==null||d.translateExtent(R)}function O(R){const I=!tr(R)||R<0?0:R;d==null||d.clickDistance(I)}return{update:N,destroy:b,setViewport:g,setViewportConstrained:y,getViewport:S,scaleTo:C,scaleBy:T,setScaleExtent:E,setTranslateExtent:k,syncViewport:w,setClickDistance:O}}var Yl;(function(e){e.Line="line",e.Handle="handle"})(Yl||(Yl={}));function LH({width:e,prevWidth:t,height:n,prevHeight:a,affectsX:s,affectsY:i}){const o=e-t,l=n-a,c=[o>0?1:o<0?-1:0,l>0?1:l<0?-1:0];return o&&s&&(c[0]=c[0]*-1),l&&i&&(c[1]=c[1]*-1),c}function U2(e){const t=e.includes("right")||e.includes("left"),n=e.includes("bottom")||e.includes("top"),a=e.includes("left"),s=e.includes("top");return{isHorizontal:t,isVertical:n,affectsX:a,affectsY:s}}function Ps(e,t){return Math.max(0,t-e)}function Fs(e,t){return Math.max(0,e-t)}function Zu(e,t,n){return Math.max(0,t-e,e-n)}function P2(e,t){return e?!t:t}function UH(e,t,n,a,s,i,o,l){let{affectsX:c,affectsY:u}=t;const{isHorizontal:h,isVertical:d}=t,f=h&&d,{xSnapped:p,ySnapped:v}=n,{minWidth:x,maxWidth:N,minHeight:b,maxHeight:y}=a,{x:g,y:w,width:S,height:C,aspectRatio:T}=e;let E=Math.floor(h?p-e.pointerX:0),k=Math.floor(d?v-e.pointerY:0);const O=S+(c?-E:E),R=C+(u?-k:k),I=-i[0]*S,F=-i[1]*C;let j=Zu(O,x,N),U=Zu(R,b,y);if(o){let A=0,D=0;c&&E<0?A=Ps(g+E+I,o[0][0]):!c&&E>0&&(A=Fs(g+O+I,o[1][0])),u&&k<0?D=Ps(w+k+F,o[0][1]):!u&&k>0&&(D=Fs(w+R+F,o[1][1])),j=Math.max(j,A),U=Math.max(U,D)}if(l){let A=0,D=0;c&&E>0?A=Fs(g+E,l[0][0]):!c&&E<0&&(A=Ps(g+O,l[1][0])),u&&k>0?D=Fs(w+k,l[0][1]):!u&&k<0&&(D=Ps(w+R,l[1][1])),j=Math.max(j,A),U=Math.max(U,D)}if(s){if(h){const A=Zu(O/T,b,y)*T;if(j=Math.max(j,A),o){let D=0;!c&&!u||c&&!u&&f?D=Fs(w+F+O/T,o[1][1])*T:D=Ps(w+F+(c?E:-E)/T,o[0][1])*T,j=Math.max(j,D)}if(l){let D=0;!c&&!u||c&&!u&&f?D=Ps(w+O/T,l[1][1])*T:D=Fs(w+(c?E:-E)/T,l[0][1])*T,j=Math.max(j,D)}}if(d){const A=Zu(R*T,x,N)/T;if(U=Math.max(U,A),o){let D=0;!c&&!u||u&&!c&&f?D=Fs(g+R*T+I,o[1][0])/T:D=Ps(g+(u?k:-k)*T+I,o[0][0])/T,U=Math.max(U,D)}if(l){let D=0;!c&&!u||u&&!c&&f?D=Ps(g+R*T,l[1][0])/T:D=Fs(g+(u?k:-k)*T,l[0][0])/T,U=Math.max(U,D)}}}k=k+(k<0?U:-U),E=E+(E<0?j:-j),s&&(f?O>R*T?k=(P2(c,u)?-E:E)/T:E=(P2(c,u)?-k:k)*T:h?(k=E/T,u=c):(E=k*T,c=u));const _=c?g+E:g,M=u?w+k:w;return{width:S+(c?-E:E),height:C+(u?-k:k),x:i[0]*E*(c?-1:1)+_,y:i[1]*k*(u?-1:1)+M}}const iM={width:0,height:0,x:0,y:0},PH={...iM,pointerX:0,pointerY:0,aspectRatio:1};function FH(e){return[[0,0],[e.measured.width,e.measured.height]]}function BH(e,t,n){const a=t.position.x+e.position.x,s=t.position.y+e.position.y,i=e.measured.width??0,o=e.measured.height??0,l=n[0]*i,c=n[1]*o;return[[a-l,s-c],[a+i-l,s+o-c]]}function zH({domNode:e,nodeId:t,getStoreItems:n,onChange:a,onEnd:s}){const i=pa(e);let o={controlDirection:U2("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function l({controlPosition:u,boundaries:h,keepAspectRatio:d,resizeDirection:f,onResizeStart:p,onResize:v,onResizeEnd:x,shouldResize:N}){let b={...iM},y={...PH};o={boundaries:h,resizeDirection:f,keepAspectRatio:d,controlDirection:U2(u)};let g,w=null,S=[],C,T,E,k=!1;const O=mI().on("start",R=>{const{nodeLookup:I,transform:F,snapGrid:j,snapToGrid:U,nodeOrigin:_,paneDomNode:M}=n();if(g=I.get(t),!g)return;w=(M==null?void 0:M.getBoundingClientRect())??null;const{xSnapped:A,ySnapped:D}=dd(R.sourceEvent,{transform:F,snapGrid:j,snapToGrid:U,containerBounds:w});b={width:g.measured.width??0,height:g.measured.height??0,x:g.position.x??0,y:g.position.y??0},y={...b,pointerX:A,pointerY:D,aspectRatio:b.width/b.height},C=void 0,g.parentId&&(g.extent==="parent"||g.expandParent)&&(C=I.get(g.parentId),T=C&&g.extent==="parent"?FH(C):void 0),S=[],E=void 0;for(const[B,G]of I)if(G.parentId===t&&(S.push({id:B,position:{...G.position},extent:G.extent}),G.extent==="parent"||G.expandParent)){const L=BH(G,g,G.origin??_);E?E=[[Math.min(L[0][0],E[0][0]),Math.min(L[0][1],E[0][1])],[Math.max(L[1][0],E[1][0]),Math.max(L[1][1],E[1][1])]]:E=L}p==null||p(R,{...b})}).on("drag",R=>{const{transform:I,snapGrid:F,snapToGrid:j,nodeOrigin:U}=n(),_=dd(R.sourceEvent,{transform:I,snapGrid:F,snapToGrid:j,containerBounds:w}),M=[];if(!g)return;const{x:A,y:D,width:B,height:G}=b,L={},q=g.origin??U,{width:X,height:K,x:ne,y:te}=UH(y,o.controlDirection,_,o.boundaries,o.keepAspectRatio,q,T,E),ee=X!==B,ae=K!==G,ge=ne!==A&&ee,se=te!==D&&ae;if(!ge&&!se&&!ee&&!ae)return;if((ge||se||q[0]===1||q[1]===1)&&(L.x=ge?ne:b.x,L.y=se?te:b.y,b.x=L.x,b.y=L.y,S.length>0)){const Me=ne-A,Ue=te-D;for(const $e of S)$e.position={x:$e.position.x-Me+q[0]*(X-B),y:$e.position.y-Ue+q[1]*(K-G)},M.push($e)}if((ee||ae)&&(L.width=ee&&(!o.resizeDirection||o.resizeDirection==="horizontal")?X:b.width,L.height=ae&&(!o.resizeDirection||o.resizeDirection==="vertical")?K:b.height,b.width=L.width,b.height=L.height),C&&g.expandParent){const Me=q[0]*(L.width??0);L.x&&L.x<Me&&(b.x=Me,y.x=y.x-(L.x-Me));const Ue=q[1]*(L.height??0);L.y&&L.y<Ue&&(b.y=Ue,y.y=y.y-(L.y-Ue))}const fe=LH({width:b.width,prevWidth:B,height:b.height,prevHeight:G,affectsX:o.controlDirection.affectsX,affectsY:o.controlDirection.affectsY}),me={...b,direction:fe};(N==null?void 0:N(R,me))!==!1&&(k=!0,v==null||v(R,me),a(L,M))}).on("end",R=>{k&&(x==null||x(R,{...b}),s==null||s({...b}),k=!1)});i.call(O)}function c(){i.on(".drag",null)}return{update:l,destroy:c}}var oM={exports:{}},lM={},cM={exports:{}},dM={};/**
|
|
76
|
+
*/function bw(){return bw=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},bw.apply(this,arguments)}function CB(e,t){if(e==null)return{};var n={},a=Object.keys(e),s,i;for(i=0;i<a.length;i++)s=a[i],!(t.indexOf(s)>=0)&&(n[s]=e[s]);return n}function AB(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function jB(e,t){return e.button===0&&(!t||t==="_self")&&!AB(e)}function xw(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let a=e[n];return t.concat(Array.isArray(a)?a.map(s=>[n,s]):[[n,a]])},[]))}function kB(e,t){let n=xw(e);return t&&t.forEach((a,s)=>{n.has(s)||t.getAll(s).forEach(i=>{n.append(s,i)})}),n}const _B=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],RB="6";try{window.__reactRouterVersion=RB}catch{}const OB="startTransition",n2=Vf[OB];function DB(e){let{basename:t,children:n,future:a,window:s}=e,i=m.useRef();i.current==null&&(i.current=IF({window:s,v5Compat:!0}));let o=i.current,[l,c]=m.useState({action:o.action,location:o.location}),{v7_startTransition:u}=a||{},h=m.useCallback(d=>{u&&n2?n2(()=>c(d)):c(d)},[c,u]);return m.useLayoutEffect(()=>o.listen(h),[o,h]),m.useEffect(()=>SB(a),[a]),m.createElement(EB,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:o,future:a})}const IB=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",MB=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,o1=m.forwardRef(function(t,n){let{onClick:a,relative:s,reloadDocument:i,replace:o,state:l,target:c,to:u,preventScrollReset:h,viewTransition:d}=t,f=CB(t,_B),{basename:p}=m.useContext(ko),v,x=!1;if(typeof u=="string"&&MB.test(u)&&(v=u,IB))try{let g=new URL(window.location.href),w=u.startsWith("//")?new URL(g.protocol+u):new URL(u),S=r1(w.pathname,p);w.origin===g.origin&&S!=null?u=S+w.search+w.hash:x=!0}catch{}let N=lB(u,{relative:s}),b=LB(u,{replace:o,state:l,target:c,preventScrollReset:h,relative:s,viewTransition:d});function y(g){a&&a(g),g.defaultPrevented||b(g)}return m.createElement("a",bw({},f,{href:v||N,onClick:x||i?a:y,ref:n,target:c}))});var a2;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(a2||(a2={}));var r2;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(r2||(r2={}));function LB(e,t){let{target:n,replace:a,state:s,preventScrollReset:i,relative:o,viewTransition:l}=t===void 0?{}:t,c=ur(),u=cc(),h=Z4(e,{relative:o});return m.useCallback(d=>{if(jB(d,n)){d.preventDefault();let f=a!==void 0?a:xf(u)===xf(h);c(e,{replace:f,state:s,preventScrollReset:i,relative:o,viewTransition:l})}},[u,c,h,a,s,n,e,i,o,l])}function UB(e){let t=m.useRef(xw(e)),n=m.useRef(!1),a=cc(),s=m.useMemo(()=>kB(a.search,n.current?null:t.current),[a.search]),i=ur(),o=m.useCallback((l,c)=>{const u=xw(typeof l=="function"?l(s):l);n.current=!0,i("?"+u,c)},[i,s]);return[s,o]}function PB(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const FB=e=>{switch(e){case"success":return $B;case"info":return qB;case"warning":return HB;case"error":return GB;default:return null}},BB=Array(12).fill(0),zB=({visible:e,className:t})=>J.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},J.createElement("div",{className:"sonner-spinner"},BB.map((n,a)=>J.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${a}`})))),$B=J.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},J.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"})),HB=J.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},J.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"})),qB=J.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},J.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"})),GB=J.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},J.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"})),VB=J.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"},J.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),J.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),YB=()=>{const[e,t]=J.useState(document.hidden);return J.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let yw=1;class WB{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var n;const{message:a,...s}=t,i=typeof(t==null?void 0:t.id)=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:yw++,o=this.toasts.find(c=>c.id===i),l=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(i)&&this.dismissedToasts.delete(i),o?this.toasts=this.toasts.map(c=>c.id===i?(this.publish({...c,...t,id:i,title:a}),{...c,...t,id:i,dismissible:l,title:a}):c):this.addToast({title:a,...s,dismissible:l,id:i}),i},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:t,dismiss:!0})))):this.toasts.forEach(n=>{this.subscribers.forEach(a=>a({id:n.id,dismiss:!0}))}),t),this.message=(t,n)=>this.create({...n,message:t}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let a;n.loading!==void 0&&(a=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const s=Promise.resolve(t instanceof Function?t():t);let i=a!==void 0,o;const l=s.then(async u=>{if(o=["resolve",u],J.isValidElement(u))i=!1,this.create({id:a,type:"default",message:u});else if(KB(u)&&!u.ok){i=!1;const d=typeof n.error=="function"?await n.error(`HTTP error! status: ${u.status}`):n.error,f=typeof n.description=="function"?await n.description(`HTTP error! status: ${u.status}`):n.description,v=typeof d=="object"&&!J.isValidElement(d)?d:{message:d};this.create({id:a,type:"error",description:f,...v})}else if(u instanceof Error){i=!1;const d=typeof n.error=="function"?await n.error(u):n.error,f=typeof n.description=="function"?await n.description(u):n.description,v=typeof d=="object"&&!J.isValidElement(d)?d:{message:d};this.create({id:a,type:"error",description:f,...v})}else if(n.success!==void 0){i=!1;const d=typeof n.success=="function"?await n.success(u):n.success,f=typeof n.description=="function"?await n.description(u):n.description,v=typeof d=="object"&&!J.isValidElement(d)?d:{message:d};this.create({id:a,type:"success",description:f,...v})}}).catch(async u=>{if(o=["reject",u],n.error!==void 0){i=!1;const h=typeof n.error=="function"?await n.error(u):n.error,d=typeof n.description=="function"?await n.description(u):n.description,p=typeof h=="object"&&!J.isValidElement(h)?h:{message:h};this.create({id:a,type:"error",description:d,...p})}}).finally(()=>{i&&(this.dismiss(a),a=void 0),n.finally==null||n.finally.call(n)}),c=()=>new Promise((u,h)=>l.then(()=>o[0]==="reject"?h(o[1]):u(o[1])).catch(h));return typeof a!="string"&&typeof a!="number"?{unwrap:c}:Object.assign(a,{unwrap:c})},this.custom=(t,n)=>{const a=(n==null?void 0:n.id)||yw++;return this.create({jsx:t(a),id:a,...n}),a},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const Vn=new WB,XB=(e,t)=>{const n=(t==null?void 0:t.id)||yw++;return Vn.addToast({title:e,...t,id:n}),n},KB=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",ZB=XB,QB=()=>Vn.toasts,JB=()=>Vn.getActiveToasts(),H=Object.assign(ZB,{success:Vn.success,info:Vn.info,warning:Vn.warning,error:Vn.error,custom:Vn.custom,message:Vn.message,promise:Vn.promise,dismiss:Vn.dismiss,loading:Vn.loading},{getHistory:QB,getToasts:JB});PB("[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 qu(e){return e.label!==void 0}const ez=3,tz="24px",nz="16px",s2=4e3,az=356,rz=14,sz=45,iz=200;function vr(...e){return e.filter(Boolean).join(" ")}function oz(e){const[t,n]=e.split("-"),a=[];return t&&a.push(t),n&&a.push(n),a}const lz=e=>{var t,n,a,s,i,o,l,c,u;const{invert:h,toast:d,unstyled:f,interacting:p,setHeights:v,visibleToasts:x,heights:N,index:b,toasts:y,expanded:g,removeToast:w,defaultRichColors:S,closeButton:C,style:T,cancelButtonStyle:E,actionButtonStyle:k,className:O="",descriptionClassName:R="",duration:I,position:F,gap:j,expandByDefault:U,classNames:_,icons:M,closeButtonAriaLabel:A="Close toast"}=e,[D,B]=J.useState(null),[G,L]=J.useState(null),[q,X]=J.useState(!1),[K,ne]=J.useState(!1),[te,ee]=J.useState(!1),[ae,ge]=J.useState(!1),[se,fe]=J.useState(!1),[me,Re]=J.useState(0),[Me,Ue]=J.useState(0),$e=J.useRef(d.duration||I||s2),pt=J.useRef(null),Ge=J.useRef(null),jt=b===0,vt=b+1<=x,We=d.type,et=d.dismissible!==!1,Ze=d.className||"",Et=d.descriptionClassName||"",Tt=J.useMemo(()=>N.findIndex(Y=>Y.toastId===d.id)||0,[N,d.id]),qt=J.useMemo(()=>{var Y;return(Y=d.closeButton)!=null?Y:C},[d.closeButton,C]),Wt=J.useMemo(()=>d.duration||I||s2,[d.duration,I]),re=J.useRef(0),we=J.useRef(0),Be=J.useRef(0),V=J.useRef(null),[le,he]=F.split("-"),xe=J.useMemo(()=>N.reduce((Y,be,He)=>He>=Tt?Y:Y+be.height,0),[N,Tt]),De=YB(),Ye=d.invert||h,Q=We==="loading";we.current=J.useMemo(()=>Tt*j+xe,[Tt,xe]),J.useEffect(()=>{$e.current=Wt},[Wt]),J.useEffect(()=>{X(!0)},[]),J.useEffect(()=>{const Y=Ge.current;if(Y){const be=Y.getBoundingClientRect().height;return Ue(be),v(He=>[{toastId:d.id,height:be,position:d.position},...He]),()=>v(He=>He.filter(tt=>tt.toastId!==d.id))}},[v,d.id]),J.useLayoutEffect(()=>{if(!q)return;const Y=Ge.current,be=Y.style.height;Y.style.height="auto";const He=Y.getBoundingClientRect().height;Y.style.height=be,Ue(He),v(tt=>tt.find(Qe=>Qe.toastId===d.id)?tt.map(Qe=>Qe.toastId===d.id?{...Qe,height:He}:Qe):[{toastId:d.id,height:He,position:d.position},...tt])},[q,d.title,d.description,v,d.id,d.jsx,d.action,d.cancel]);const ie=J.useCallback(()=>{ne(!0),Re(we.current),v(Y=>Y.filter(be=>be.toastId!==d.id)),setTimeout(()=>{w(d)},iz)},[d,w,v,we]);J.useEffect(()=>{if(d.promise&&We==="loading"||d.duration===1/0||d.type==="loading")return;let Y;return g||p||De?(()=>{if(Be.current<re.current){const tt=new Date().getTime()-re.current;$e.current=$e.current-tt}Be.current=new Date().getTime()})():(()=>{$e.current!==1/0&&(re.current=new Date().getTime(),Y=setTimeout(()=>{d.onAutoClose==null||d.onAutoClose.call(d,d),ie()},$e.current))})(),()=>clearTimeout(Y)},[g,p,d,We,De,ie]),J.useEffect(()=>{d.delete&&(ie(),d.onDismiss==null||d.onDismiss.call(d,d))},[ie,d.delete]);function Ne(){var Y;if(M!=null&&M.loading){var be;return J.createElement("div",{className:vr(_==null?void 0:_.loader,d==null||(be=d.classNames)==null?void 0:be.loader,"sonner-loader"),"data-visible":We==="loading"},M.loading)}return J.createElement(zB,{className:vr(_==null?void 0:_.loader,d==null||(Y=d.classNames)==null?void 0:Y.loader),visible:We==="loading"})}const ue=d.icon||(M==null?void 0:M[We])||FB(We);var ke,W;return J.createElement("li",{tabIndex:0,ref:Ge,className:vr(O,Ze,_==null?void 0:_.toast,d==null||(t=d.classNames)==null?void 0:t.toast,_==null?void 0:_.default,_==null?void 0:_[We],d==null||(n=d.classNames)==null?void 0:n[We]),"data-sonner-toast":"","data-rich-colors":(ke=d.richColors)!=null?ke:S,"data-styled":!(d.jsx||d.unstyled||f),"data-mounted":q,"data-promise":!!d.promise,"data-swiped":se,"data-removed":K,"data-visible":vt,"data-y-position":le,"data-x-position":he,"data-index":b,"data-front":jt,"data-swiping":te,"data-dismissible":et,"data-type":We,"data-invert":Ye,"data-swipe-out":ae,"data-swipe-direction":G,"data-expanded":!!(g||U&&q),"data-testid":d.testId,style:{"--index":b,"--toasts-before":b,"--z-index":y.length-b,"--offset":`${K?me:we.current}px`,"--initial-height":U?"auto":`${Me}px`,...T,...d.style},onDragEnd:()=>{ee(!1),B(null),V.current=null},onPointerDown:Y=>{Y.button!==2&&(Q||!et||(pt.current=new Date,Re(we.current),Y.target.setPointerCapture(Y.pointerId),Y.target.tagName!=="BUTTON"&&(ee(!0),V.current={x:Y.clientX,y:Y.clientY})))},onPointerUp:()=>{var Y,be,He;if(ae||!et)return;V.current=null;const tt=Number(((Y=Ge.current)==null?void 0:Y.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),rt=Number(((be=Ge.current)==null?void 0:be.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Qe=new Date().getTime()-((He=pt.current)==null?void 0:He.getTime()),Jt=D==="x"?tt:rt,pn=Math.abs(Jt)/Qe;if(Math.abs(Jt)>=sz||pn>.11){Re(we.current),d.onDismiss==null||d.onDismiss.call(d,d),L(D==="x"?tt>0?"right":"left":rt>0?"down":"up"),ie(),ge(!0);return}else{var ln,Xt;(ln=Ge.current)==null||ln.style.setProperty("--swipe-amount-x","0px"),(Xt=Ge.current)==null||Xt.style.setProperty("--swipe-amount-y","0px")}fe(!1),ee(!1),B(null)},onPointerMove:Y=>{var be,He,tt;if(!V.current||!et||((be=window.getSelection())==null?void 0:be.toString().length)>0)return;const Qe=Y.clientY-V.current.y,Jt=Y.clientX-V.current.x;var pn;const ln=(pn=e.swipeDirections)!=null?pn:oz(F);!D&&(Math.abs(Jt)>1||Math.abs(Qe)>1)&&B(Math.abs(Jt)>Math.abs(Qe)?"x":"y");let Xt={x:0,y:0};const Gr=wn=>1/(1.5+Math.abs(wn)/20);if(D==="y"){if(ln.includes("top")||ln.includes("bottom"))if(ln.includes("top")&&Qe<0||ln.includes("bottom")&&Qe>0)Xt.y=Qe;else{const wn=Qe*Gr(Qe);Xt.y=Math.abs(wn)<Math.abs(Qe)?wn:Qe}}else if(D==="x"&&(ln.includes("left")||ln.includes("right")))if(ln.includes("left")&&Jt<0||ln.includes("right")&&Jt>0)Xt.x=Jt;else{const wn=Jt*Gr(Jt);Xt.x=Math.abs(wn)<Math.abs(Jt)?wn:Jt}(Math.abs(Xt.x)>0||Math.abs(Xt.y)>0)&&fe(!0),(He=Ge.current)==null||He.style.setProperty("--swipe-amount-x",`${Xt.x}px`),(tt=Ge.current)==null||tt.style.setProperty("--swipe-amount-y",`${Xt.y}px`)}},qt&&!d.jsx&&We!=="loading"?J.createElement("button",{"aria-label":A,"data-disabled":Q,"data-close-button":!0,onClick:Q||!et?()=>{}:()=>{ie(),d.onDismiss==null||d.onDismiss.call(d,d)},className:vr(_==null?void 0:_.closeButton,d==null||(a=d.classNames)==null?void 0:a.closeButton)},(W=M==null?void 0:M.close)!=null?W:VB):null,(We||d.icon||d.promise)&&d.icon!==null&&((M==null?void 0:M[We])!==null||d.icon)?J.createElement("div",{"data-icon":"",className:vr(_==null?void 0:_.icon,d==null||(s=d.classNames)==null?void 0:s.icon)},d.promise||d.type==="loading"&&!d.icon?d.icon||Ne():null,d.type!=="loading"?ue:null):null,J.createElement("div",{"data-content":"",className:vr(_==null?void 0:_.content,d==null||(i=d.classNames)==null?void 0:i.content)},J.createElement("div",{"data-title":"",className:vr(_==null?void 0:_.title,d==null||(o=d.classNames)==null?void 0:o.title)},d.jsx?d.jsx:typeof d.title=="function"?d.title():d.title),d.description?J.createElement("div",{"data-description":"",className:vr(R,Et,_==null?void 0:_.description,d==null||(l=d.classNames)==null?void 0:l.description)},typeof d.description=="function"?d.description():d.description):null),J.isValidElement(d.cancel)?d.cancel:d.cancel&&qu(d.cancel)?J.createElement("button",{"data-button":!0,"data-cancel":!0,style:d.cancelButtonStyle||E,onClick:Y=>{qu(d.cancel)&&et&&(d.cancel.onClick==null||d.cancel.onClick.call(d.cancel,Y),ie())},className:vr(_==null?void 0:_.cancelButton,d==null||(c=d.classNames)==null?void 0:c.cancelButton)},d.cancel.label):null,J.isValidElement(d.action)?d.action:d.action&&qu(d.action)?J.createElement("button",{"data-button":!0,"data-action":!0,style:d.actionButtonStyle||k,onClick:Y=>{qu(d.action)&&(d.action.onClick==null||d.action.onClick.call(d.action,Y),!Y.defaultPrevented&&ie())},className:vr(_==null?void 0:_.actionButton,d==null||(u=d.classNames)==null?void 0:u.actionButton)},d.action.label):null)};function i2(){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 cz(e,t){const n={};return[e,t].forEach((a,s)=>{const i=s===1,o=i?"--mobile-offset":"--offset",l=i?nz:tz;function c(u){["top","right","bottom","left"].forEach(h=>{n[`${o}-${h}`]=typeof u=="number"?`${u}px`:u})}typeof a=="number"||typeof a=="string"?c(a):typeof a=="object"?["top","right","bottom","left"].forEach(u=>{a[u]===void 0?n[`${o}-${u}`]=l:n[`${o}-${u}`]=typeof a[u]=="number"?`${a[u]}px`:a[u]}):c(l)}),n}const dz=J.forwardRef(function(t,n){const{id:a,invert:s,position:i="bottom-right",hotkey:o=["altKey","KeyT"],expand:l,closeButton:c,className:u,offset:h,mobileOffset:d,theme:f="light",richColors:p,duration:v,style:x,visibleToasts:N=ez,toastOptions:b,dir:y=i2(),gap:g=rz,icons:w,containerAriaLabel:S="Notifications"}=t,[C,T]=J.useState([]),E=J.useMemo(()=>a?C.filter(q=>q.toasterId===a):C.filter(q=>!q.toasterId),[C,a]),k=J.useMemo(()=>Array.from(new Set([i].concat(E.filter(q=>q.position).map(q=>q.position)))),[E,i]),[O,R]=J.useState([]),[I,F]=J.useState(!1),[j,U]=J.useState(!1),[_,M]=J.useState(f!=="system"?f:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),A=J.useRef(null),D=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),B=J.useRef(null),G=J.useRef(!1),L=J.useCallback(q=>{T(X=>{var K;return(K=X.find(ne=>ne.id===q.id))!=null&&K.delete||Vn.dismiss(q.id),X.filter(({id:ne})=>ne!==q.id)})},[]);return J.useEffect(()=>Vn.subscribe(q=>{if(q.dismiss){requestAnimationFrame(()=>{T(X=>X.map(K=>K.id===q.id?{...K,delete:!0}:K))});return}setTimeout(()=>{lO.flushSync(()=>{T(X=>{const K=X.findIndex(ne=>ne.id===q.id);return K!==-1?[...X.slice(0,K),{...X[K],...q},...X.slice(K+1)]:[q,...X]})})})}),[C]),J.useEffect(()=>{if(f!=="system"){M(f);return}if(f==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?M("dark"):M("light")),typeof window>"u")return;const q=window.matchMedia("(prefers-color-scheme: dark)");try{q.addEventListener("change",({matches:X})=>{M(X?"dark":"light")})}catch{q.addListener(({matches:K})=>{try{M(K?"dark":"light")}catch(ne){console.error(ne)}})}},[f]),J.useEffect(()=>{C.length<=1&&F(!1)},[C]),J.useEffect(()=>{const q=X=>{var K;if(o.every(ee=>X[ee]||X.code===ee)){var te;F(!0),(te=A.current)==null||te.focus()}X.code==="Escape"&&(document.activeElement===A.current||(K=A.current)!=null&&K.contains(document.activeElement))&&F(!1)};return document.addEventListener("keydown",q),()=>document.removeEventListener("keydown",q)},[o]),J.useEffect(()=>{if(A.current)return()=>{B.current&&(B.current.focus({preventScroll:!0}),B.current=null,G.current=!1)}},[A.current]),J.createElement("section",{ref:n,"aria-label":`${S} ${D}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},k.map((q,X)=>{var K;const[ne,te]=q.split("-");return E.length?J.createElement("ol",{key:q,dir:y==="auto"?i2():y,tabIndex:-1,ref:A,className:u,"data-sonner-toaster":!0,"data-sonner-theme":_,"data-y-position":ne,"data-x-position":te,style:{"--front-toast-height":`${((K=O[0])==null?void 0:K.height)||0}px`,"--width":`${az}px`,"--gap":`${g}px`,...x,...cz(h,d)},onBlur:ee=>{G.current&&!ee.currentTarget.contains(ee.relatedTarget)&&(G.current=!1,B.current&&(B.current.focus({preventScroll:!0}),B.current=null))},onFocus:ee=>{ee.target instanceof HTMLElement&&ee.target.dataset.dismissible==="false"||G.current||(G.current=!0,B.current=ee.relatedTarget)},onMouseEnter:()=>F(!0),onMouseMove:()=>F(!0),onMouseLeave:()=>{j||F(!1)},onDragEnd:()=>F(!1),onPointerDown:ee=>{ee.target instanceof HTMLElement&&ee.target.dataset.dismissible==="false"||U(!0)},onPointerUp:()=>U(!1)},E.filter(ee=>!ee.position&&X===0||ee.position===q).map((ee,ae)=>{var ge,se;return J.createElement(lz,{key:ee.id,icons:w,index:ae,toast:ee,defaultRichColors:p,duration:(ge=b==null?void 0:b.duration)!=null?ge:v,className:b==null?void 0:b.className,descriptionClassName:b==null?void 0:b.descriptionClassName,invert:s,visibleToasts:N,closeButton:(se=b==null?void 0:b.closeButton)!=null?se:c,interacting:j,position:q,style:b==null?void 0:b.style,unstyled:b==null?void 0:b.unstyled,classNames:b==null?void 0:b.classNames,cancelButtonStyle:b==null?void 0:b.cancelButtonStyle,actionButtonStyle:b==null?void 0:b.actionButtonStyle,closeButtonAriaLabel:b==null?void 0:b.closeButtonAriaLabel,removeToast:L,toasts:E.filter(fe=>fe.position==ee.position),heights:O.filter(fe=>fe.position==ee.position),setHeights:R,expandByDefault:l,gap:g,expanded:I,swipeDirections:t.swipeDirections})})):null}))});function on(e){if(typeof e=="string"||typeof e=="number")return""+e;let t="";if(Array.isArray(e))for(let n=0,a;n<e.length;n++)(a=on(e[n]))!==""&&(t+=(t&&" ")+a);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}var uz={value:()=>{}};function hp(){for(var e=0,t=arguments.length,n={},a;e<t;++e){if(!(a=arguments[e]+"")||a in n||/[\s.]/.test(a))throw new Error("illegal type: "+a);n[a]=[]}return new jh(n)}function jh(e){this._=e}function hz(e,t){return e.trim().split(/^|\s+/).map(function(n){var a="",s=n.indexOf(".");if(s>=0&&(a=n.slice(s+1),n=n.slice(0,s)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:a}})}jh.prototype=hp.prototype={constructor:jh,on:function(e,t){var n=this._,a=hz(e+"",n),s,i=-1,o=a.length;if(arguments.length<2){for(;++i<o;)if((s=(e=a[i]).type)&&(s=fz(n[s],e.name)))return s;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++i<o;)if(s=(e=a[i]).type)n[s]=o2(n[s],e.name,t);else if(t==null)for(s in n)n[s]=o2(n[s],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new jh(e)},call:function(e,t){if((s=arguments.length-2)>0)for(var n=new Array(s),a=0,s,i;a<s;++a)n[a]=arguments[a+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(i=this._[e],a=0,s=i.length;a<s;++a)i[a].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var a=this._[e],s=0,i=a.length;s<i;++s)a[s].value.apply(t,n)}};function fz(e,t){for(var n=0,a=e.length,s;n<a;++n)if((s=e[n]).name===t)return s.value}function o2(e,t,n){for(var a=0,s=e.length;a<s;++a)if(e[a].name===t){e[a]=uz,e=e.slice(0,a).concat(e.slice(a+1));break}return n!=null&&e.push({name:t,value:n}),e}var vw="http://www.w3.org/1999/xhtml";const l2={svg:"http://www.w3.org/2000/svg",xhtml:vw,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function fp(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),l2.hasOwnProperty(t)?{space:l2[t],local:e}:e}function pz(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===vw&&t.documentElement.namespaceURI===vw?t.createElement(e):t.createElementNS(n,e)}}function mz(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function tI(e){var t=fp(e);return(t.local?mz:pz)(t)}function gz(){}function l1(e){return e==null?gz:function(){return this.querySelector(e)}}function bz(e){typeof e!="function"&&(e=l1(e));for(var t=this._groups,n=t.length,a=new Array(n),s=0;s<n;++s)for(var i=t[s],o=i.length,l=a[s]=new Array(o),c,u,h=0;h<o;++h)(c=i[h])&&(u=e.call(c,c.__data__,h,i))&&("__data__"in c&&(u.__data__=c.__data__),l[h]=u);return new wa(a,this._parents)}function xz(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function yz(){return[]}function nI(e){return e==null?yz:function(){return this.querySelectorAll(e)}}function vz(e){return function(){return xz(e.apply(this,arguments))}}function wz(e){typeof e=="function"?e=vz(e):e=nI(e);for(var t=this._groups,n=t.length,a=[],s=[],i=0;i<n;++i)for(var o=t[i],l=o.length,c,u=0;u<l;++u)(c=o[u])&&(a.push(e.call(c,c.__data__,u,o)),s.push(c));return new wa(a,s)}function aI(e){return function(){return this.matches(e)}}function rI(e){return function(t){return t.matches(e)}}var Nz=Array.prototype.find;function Sz(e){return function(){return Nz.call(this.children,e)}}function Ez(){return this.firstElementChild}function Tz(e){return this.select(e==null?Ez:Sz(typeof e=="function"?e:rI(e)))}var Cz=Array.prototype.filter;function Az(){return Array.from(this.children)}function jz(e){return function(){return Cz.call(this.children,e)}}function kz(e){return this.selectAll(e==null?Az:jz(typeof e=="function"?e:rI(e)))}function _z(e){typeof e!="function"&&(e=aI(e));for(var t=this._groups,n=t.length,a=new Array(n),s=0;s<n;++s)for(var i=t[s],o=i.length,l=a[s]=[],c,u=0;u<o;++u)(c=i[u])&&e.call(c,c.__data__,u,i)&&l.push(c);return new wa(a,this._parents)}function sI(e){return new Array(e.length)}function Rz(){return new wa(this._enter||this._groups.map(sI),this._parents)}function yf(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}yf.prototype={constructor:yf,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function Oz(e){return function(){return e}}function Dz(e,t,n,a,s,i){for(var o=0,l,c=t.length,u=i.length;o<u;++o)(l=t[o])?(l.__data__=i[o],a[o]=l):n[o]=new yf(e,i[o]);for(;o<c;++o)(l=t[o])&&(s[o]=l)}function Iz(e,t,n,a,s,i,o){var l,c,u=new Map,h=t.length,d=i.length,f=new Array(h),p;for(l=0;l<h;++l)(c=t[l])&&(f[l]=p=o.call(c,c.__data__,l,t)+"",u.has(p)?s[l]=c:u.set(p,c));for(l=0;l<d;++l)p=o.call(e,i[l],l,i)+"",(c=u.get(p))?(a[l]=c,c.__data__=i[l],u.delete(p)):n[l]=new yf(e,i[l]);for(l=0;l<h;++l)(c=t[l])&&u.get(f[l])===c&&(s[l]=c)}function Mz(e){return e.__data__}function Lz(e,t){if(!arguments.length)return Array.from(this,Mz);var n=t?Iz:Dz,a=this._parents,s=this._groups;typeof e!="function"&&(e=Oz(e));for(var i=s.length,o=new Array(i),l=new Array(i),c=new Array(i),u=0;u<i;++u){var h=a[u],d=s[u],f=d.length,p=Uz(e.call(h,h&&h.__data__,u,a)),v=p.length,x=l[u]=new Array(v),N=o[u]=new Array(v),b=c[u]=new Array(f);n(h,d,x,N,b,p,t);for(var y=0,g=0,w,S;y<v;++y)if(w=x[y]){for(y>=g&&(g=y+1);!(S=N[g])&&++g<v;);w._next=S||null}}return o=new wa(o,a),o._enter=l,o._exit=c,o}function Uz(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Pz(){return new wa(this._exit||this._groups.map(sI),this._parents)}function Fz(e,t,n){var a=this.enter(),s=this,i=this.exit();return typeof e=="function"?(a=e(a),a&&(a=a.selection())):a=a.append(e+""),t!=null&&(s=t(s),s&&(s=s.selection())),n==null?i.remove():n(i),a&&s?a.merge(s).order():s}function Bz(e){for(var t=e.selection?e.selection():e,n=this._groups,a=t._groups,s=n.length,i=a.length,o=Math.min(s,i),l=new Array(s),c=0;c<o;++c)for(var u=n[c],h=a[c],d=u.length,f=l[c]=new Array(d),p,v=0;v<d;++v)(p=u[v]||h[v])&&(f[v]=p);for(;c<s;++c)l[c]=n[c];return new wa(l,this._parents)}function zz(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var a=e[t],s=a.length-1,i=a[s],o;--s>=0;)(o=a[s])&&(i&&o.compareDocumentPosition(i)^4&&i.parentNode.insertBefore(o,i),i=o);return this}function $z(e){e||(e=Hz);function t(d,f){return d&&f?e(d.__data__,f.__data__):!d-!f}for(var n=this._groups,a=n.length,s=new Array(a),i=0;i<a;++i){for(var o=n[i],l=o.length,c=s[i]=new Array(l),u,h=0;h<l;++h)(u=o[h])&&(c[h]=u);c.sort(t)}return new wa(s,this._parents).order()}function Hz(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function qz(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Gz(){return Array.from(this)}function Vz(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var a=e[t],s=0,i=a.length;s<i;++s){var o=a[s];if(o)return o}return null}function Yz(){let e=0;for(const t of this)++e;return e}function Wz(){return!this.node()}function Xz(e){for(var t=this._groups,n=0,a=t.length;n<a;++n)for(var s=t[n],i=0,o=s.length,l;i<o;++i)(l=s[i])&&e.call(l,l.__data__,i,s);return this}function Kz(e){return function(){this.removeAttribute(e)}}function Zz(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Qz(e,t){return function(){this.setAttribute(e,t)}}function Jz(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function e$(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function t$(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function n$(e,t){var n=fp(e);if(arguments.length<2){var a=this.node();return n.local?a.getAttributeNS(n.space,n.local):a.getAttribute(n)}return this.each((t==null?n.local?Zz:Kz:typeof t=="function"?n.local?t$:e$:n.local?Jz:Qz)(n,t))}function iI(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function a$(e){return function(){this.style.removeProperty(e)}}function r$(e,t,n){return function(){this.style.setProperty(e,t,n)}}function s$(e,t,n){return function(){var a=t.apply(this,arguments);a==null?this.style.removeProperty(e):this.style.setProperty(e,a,n)}}function i$(e,t,n){return arguments.length>1?this.each((t==null?a$:typeof t=="function"?s$:r$)(e,t,n??"")):zl(this.node(),e)}function zl(e,t){return e.style.getPropertyValue(t)||iI(e).getComputedStyle(e,null).getPropertyValue(t)}function o$(e){return function(){delete this[e]}}function l$(e,t){return function(){this[e]=t}}function c$(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function d$(e,t){return arguments.length>1?this.each((t==null?o$:typeof t=="function"?c$:l$)(e,t)):this.node()[e]}function oI(e){return e.trim().split(/^|\s+/)}function c1(e){return e.classList||new lI(e)}function lI(e){this._node=e,this._names=oI(e.getAttribute("class")||"")}lI.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function cI(e,t){for(var n=c1(e),a=-1,s=t.length;++a<s;)n.add(t[a])}function dI(e,t){for(var n=c1(e),a=-1,s=t.length;++a<s;)n.remove(t[a])}function u$(e){return function(){cI(this,e)}}function h$(e){return function(){dI(this,e)}}function f$(e,t){return function(){(t.apply(this,arguments)?cI:dI)(this,e)}}function p$(e,t){var n=oI(e+"");if(arguments.length<2){for(var a=c1(this.node()),s=-1,i=n.length;++s<i;)if(!a.contains(n[s]))return!1;return!0}return this.each((typeof t=="function"?f$:t?u$:h$)(n,t))}function m$(){this.textContent=""}function g$(e){return function(){this.textContent=e}}function b$(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function x$(e){return arguments.length?this.each(e==null?m$:(typeof e=="function"?b$:g$)(e)):this.node().textContent}function y$(){this.innerHTML=""}function v$(e){return function(){this.innerHTML=e}}function w$(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function N$(e){return arguments.length?this.each(e==null?y$:(typeof e=="function"?w$:v$)(e)):this.node().innerHTML}function S$(){this.nextSibling&&this.parentNode.appendChild(this)}function E$(){return this.each(S$)}function T$(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function C$(){return this.each(T$)}function A$(e){var t=typeof e=="function"?e:tI(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function j$(){return null}function k$(e,t){var n=typeof e=="function"?e:tI(e),a=t==null?j$:typeof t=="function"?t:l1(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),a.apply(this,arguments)||null)})}function _$(){var e=this.parentNode;e&&e.removeChild(this)}function R$(){return this.each(_$)}function O$(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function D$(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function I$(e){return this.select(e?D$:O$)}function M$(e){return arguments.length?this.property("__data__",e):this.node().__data__}function L$(e){return function(t){e.call(this,t,this.__data__)}}function U$(e){return e.trim().split(/^|\s+/).map(function(t){var n="",a=t.indexOf(".");return a>=0&&(n=t.slice(a+1),t=t.slice(0,a)),{type:t,name:n}})}function P$(e){return function(){var t=this.__on;if(t){for(var n=0,a=-1,s=t.length,i;n<s;++n)i=t[n],(!e.type||i.type===e.type)&&i.name===e.name?this.removeEventListener(i.type,i.listener,i.options):t[++a]=i;++a?t.length=a:delete this.__on}}}function F$(e,t,n){return function(){var a=this.__on,s,i=L$(t);if(a){for(var o=0,l=a.length;o<l;++o)if((s=a[o]).type===e.type&&s.name===e.name){this.removeEventListener(s.type,s.listener,s.options),this.addEventListener(s.type,s.listener=i,s.options=n),s.value=t;return}}this.addEventListener(e.type,i,n),s={type:e.type,name:e.name,value:t,listener:i,options:n},a?a.push(s):this.__on=[s]}}function B$(e,t,n){var a=U$(e+""),s,i=a.length,o;if(arguments.length<2){var l=this.node().__on;if(l){for(var c=0,u=l.length,h;c<u;++c)for(s=0,h=l[c];s<i;++s)if((o=a[s]).type===h.type&&o.name===h.name)return h.value}return}for(l=t?F$:P$,s=0;s<i;++s)this.each(l(a[s],t,n));return this}function uI(e,t,n){var a=iI(e),s=a.CustomEvent;typeof s=="function"?s=new s(t,n):(s=a.document.createEvent("Event"),n?(s.initEvent(t,n.bubbles,n.cancelable),s.detail=n.detail):s.initEvent(t,!1,!1)),e.dispatchEvent(s)}function z$(e,t){return function(){return uI(this,e,t)}}function $$(e,t){return function(){return uI(this,e,t.apply(this,arguments))}}function H$(e,t){return this.each((typeof t=="function"?$$:z$)(e,t))}function*q$(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var a=e[t],s=0,i=a.length,o;s<i;++s)(o=a[s])&&(yield o)}var hI=[null];function wa(e,t){this._groups=e,this._parents=t}function uu(){return new wa([[document.documentElement]],hI)}function G$(){return this}wa.prototype=uu.prototype={constructor:wa,select:bz,selectAll:wz,selectChild:Tz,selectChildren:kz,filter:_z,data:Lz,enter:Rz,exit:Pz,join:Fz,merge:Bz,selection:G$,order:zz,sort:$z,call:qz,nodes:Gz,node:Vz,size:Yz,empty:Wz,each:Xz,attr:n$,style:i$,property:d$,classed:p$,text:x$,html:N$,raise:E$,lower:C$,append:A$,insert:k$,remove:R$,clone:I$,datum:M$,on:B$,dispatch:H$,[Symbol.iterator]:q$};function pa(e){return typeof e=="string"?new wa([[document.querySelector(e)]],[document.documentElement]):new wa([[e]],hI)}function V$(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Ja(e,t){if(e=V$(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var a=n.createSVGPoint();return a.x=e.clientX,a.y=e.clientY,a=a.matrixTransform(t.getScreenCTM().inverse()),[a.x,a.y]}if(t.getBoundingClientRect){var s=t.getBoundingClientRect();return[e.clientX-s.left-t.clientLeft,e.clientY-s.top-t.clientTop]}}return[e.pageX,e.pageY]}const Y$={passive:!1},_d={capture:!0,passive:!1};function Om(e){e.stopImmediatePropagation()}function Sl(e){e.preventDefault(),e.stopImmediatePropagation()}function fI(e){var t=e.document.documentElement,n=pa(e).on("dragstart.drag",Sl,_d);"onselectstart"in t?n.on("selectstart.drag",Sl,_d):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function pI(e,t){var n=e.document.documentElement,a=pa(e).on("dragstart.drag",null);t&&(a.on("click.drag",Sl,_d),setTimeout(function(){a.on("click.drag",null)},0)),"onselectstart"in n?a.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const Gu=e=>()=>e;function ww(e,{sourceEvent:t,subject:n,target:a,identifier:s,active:i,x:o,y:l,dx:c,dy:u,dispatch:h}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:a,enumerable:!0,configurable:!0},identifier:{value:s,enumerable:!0,configurable:!0},active:{value:i,enumerable:!0,configurable:!0},x:{value:o,enumerable:!0,configurable:!0},y:{value:l,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:h}})}ww.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function W$(e){return!e.ctrlKey&&!e.button}function X$(){return this.parentNode}function K$(e,t){return t??{x:e.x,y:e.y}}function Z$(){return navigator.maxTouchPoints||"ontouchstart"in this}function mI(){var e=W$,t=X$,n=K$,a=Z$,s={},i=hp("start","drag","end"),o=0,l,c,u,h,d=0;function f(w){w.on("mousedown.drag",p).filter(a).on("touchstart.drag",N).on("touchmove.drag",b,Y$).on("touchend.drag touchcancel.drag",y).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function p(w,S){if(!(h||!e.call(this,w,S))){var C=g(this,t.call(this,w,S),w,S,"mouse");C&&(pa(w.view).on("mousemove.drag",v,_d).on("mouseup.drag",x,_d),fI(w.view),Om(w),u=!1,l=w.clientX,c=w.clientY,C("start",w))}}function v(w){if(Sl(w),!u){var S=w.clientX-l,C=w.clientY-c;u=S*S+C*C>d}s.mouse("drag",w)}function x(w){pa(w.view).on("mousemove.drag mouseup.drag",null),pI(w.view,u),Sl(w),s.mouse("end",w)}function N(w,S){if(e.call(this,w,S)){var C=w.changedTouches,T=t.call(this,w,S),E=C.length,k,O;for(k=0;k<E;++k)(O=g(this,T,w,S,C[k].identifier,C[k]))&&(Om(w),O("start",w,C[k]))}}function b(w){var S=w.changedTouches,C=S.length,T,E;for(T=0;T<C;++T)(E=s[S[T].identifier])&&(Sl(w),E("drag",w,S[T]))}function y(w){var S=w.changedTouches,C=S.length,T,E;for(h&&clearTimeout(h),h=setTimeout(function(){h=null},500),T=0;T<C;++T)(E=s[S[T].identifier])&&(Om(w),E("end",w,S[T]))}function g(w,S,C,T,E,k){var O=i.copy(),R=Ja(k||C,S),I,F,j;if((j=n.call(w,new ww("beforestart",{sourceEvent:C,target:f,identifier:E,active:o,x:R[0],y:R[1],dx:0,dy:0,dispatch:O}),T))!=null)return I=j.x-R[0]||0,F=j.y-R[1]||0,function U(_,M,A){var D=R,B;switch(_){case"start":s[E]=U,B=o++;break;case"end":delete s[E],--o;case"drag":R=Ja(A||M,S),B=o;break}O.call(_,w,new ww(_,{sourceEvent:M,subject:j,target:f,identifier:E,active:B,x:R[0]+I,y:R[1]+F,dx:R[0]-D[0],dy:R[1]-D[1],dispatch:O}),T)}}return f.filter=function(w){return arguments.length?(e=typeof w=="function"?w:Gu(!!w),f):e},f.container=function(w){return arguments.length?(t=typeof w=="function"?w:Gu(w),f):t},f.subject=function(w){return arguments.length?(n=typeof w=="function"?w:Gu(w),f):n},f.touchable=function(w){return arguments.length?(a=typeof w=="function"?w:Gu(!!w),f):a},f.on=function(){var w=i.on.apply(i,arguments);return w===i?f:w},f.clickDistance=function(w){return arguments.length?(d=(w=+w)*w,f):Math.sqrt(d)},f}function d1(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function gI(e,t){var n=Object.create(e.prototype);for(var a in t)n[a]=t[a];return n}function hu(){}var Rd=.7,vf=1/Rd,El="\\s*([+-]?\\d+)\\s*",Od="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ir="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Q$=/^#([0-9a-f]{3,8})$/,J$=new RegExp(`^rgb\\(${El},${El},${El}\\)$`),e8=new RegExp(`^rgb\\(${Ir},${Ir},${Ir}\\)$`),t8=new RegExp(`^rgba\\(${El},${El},${El},${Od}\\)$`),n8=new RegExp(`^rgba\\(${Ir},${Ir},${Ir},${Od}\\)$`),a8=new RegExp(`^hsl\\(${Od},${Ir},${Ir}\\)$`),r8=new RegExp(`^hsla\\(${Od},${Ir},${Ir},${Od}\\)$`),c2={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};d1(hu,po,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:d2,formatHex:d2,formatHex8:s8,formatHsl:i8,formatRgb:u2,toString:u2});function d2(){return this.rgb().formatHex()}function s8(){return this.rgb().formatHex8()}function i8(){return bI(this).formatHsl()}function u2(){return this.rgb().formatRgb()}function po(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Q$.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?h2(t):n===3?new Wn(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Vu(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Vu(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=J$.exec(e))?new Wn(t[1],t[2],t[3],1):(t=e8.exec(e))?new Wn(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=t8.exec(e))?Vu(t[1],t[2],t[3],t[4]):(t=n8.exec(e))?Vu(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=a8.exec(e))?m2(t[1],t[2]/100,t[3]/100,1):(t=r8.exec(e))?m2(t[1],t[2]/100,t[3]/100,t[4]):c2.hasOwnProperty(e)?h2(c2[e]):e==="transparent"?new Wn(NaN,NaN,NaN,0):null}function h2(e){return new Wn(e>>16&255,e>>8&255,e&255,1)}function Vu(e,t,n,a){return a<=0&&(e=t=n=NaN),new Wn(e,t,n,a)}function o8(e){return e instanceof hu||(e=po(e)),e?(e=e.rgb(),new Wn(e.r,e.g,e.b,e.opacity)):new Wn}function Nw(e,t,n,a){return arguments.length===1?o8(e):new Wn(e,t,n,a??1)}function Wn(e,t,n,a){this.r=+e,this.g=+t,this.b=+n,this.opacity=+a}d1(Wn,Nw,gI(hu,{brighter(e){return e=e==null?vf:Math.pow(vf,e),new Wn(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Rd:Math.pow(Rd,e),new Wn(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Wn(io(this.r),io(this.g),io(this.b),wf(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:f2,formatHex:f2,formatHex8:l8,formatRgb:p2,toString:p2}));function f2(){return`#${Ki(this.r)}${Ki(this.g)}${Ki(this.b)}`}function l8(){return`#${Ki(this.r)}${Ki(this.g)}${Ki(this.b)}${Ki((isNaN(this.opacity)?1:this.opacity)*255)}`}function p2(){const e=wf(this.opacity);return`${e===1?"rgb(":"rgba("}${io(this.r)}, ${io(this.g)}, ${io(this.b)}${e===1?")":`, ${e})`}`}function wf(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function io(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ki(e){return e=io(e),(e<16?"0":"")+e.toString(16)}function m2(e,t,n,a){return a<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new er(e,t,n,a)}function bI(e){if(e instanceof er)return new er(e.h,e.s,e.l,e.opacity);if(e instanceof hu||(e=po(e)),!e)return new er;if(e instanceof er)return e;e=e.rgb();var t=e.r/255,n=e.g/255,a=e.b/255,s=Math.min(t,n,a),i=Math.max(t,n,a),o=NaN,l=i-s,c=(i+s)/2;return l?(t===i?o=(n-a)/l+(n<a)*6:n===i?o=(a-t)/l+2:o=(t-n)/l+4,l/=c<.5?i+s:2-i-s,o*=60):l=c>0&&c<1?0:o,new er(o,l,c,e.opacity)}function c8(e,t,n,a){return arguments.length===1?bI(e):new er(e,t,n,a??1)}function er(e,t,n,a){this.h=+e,this.s=+t,this.l=+n,this.opacity=+a}d1(er,c8,gI(hu,{brighter(e){return e=e==null?vf:Math.pow(vf,e),new er(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Rd:Math.pow(Rd,e),new er(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,a=n+(n<.5?n:1-n)*t,s=2*n-a;return new Wn(Dm(e>=240?e-240:e+120,s,a),Dm(e,s,a),Dm(e<120?e+240:e-120,s,a),this.opacity)},clamp(){return new er(g2(this.h),Yu(this.s),Yu(this.l),wf(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=wf(this.opacity);return`${e===1?"hsl(":"hsla("}${g2(this.h)}, ${Yu(this.s)*100}%, ${Yu(this.l)*100}%${e===1?")":`, ${e})`}`}}));function g2(e){return e=(e||0)%360,e<0?e+360:e}function Yu(e){return Math.max(0,Math.min(1,e||0))}function Dm(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const u1=e=>()=>e;function d8(e,t){return function(n){return e+n*t}}function u8(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(a){return Math.pow(e+a*t,n)}}function h8(e){return(e=+e)==1?xI:function(t,n){return n-t?u8(t,n,e):u1(isNaN(t)?n:t)}}function xI(e,t){var n=t-e;return n?d8(e,n):u1(isNaN(e)?t:e)}const Nf=function e(t){var n=h8(t);function a(s,i){var o=n((s=Nw(s)).r,(i=Nw(i)).r),l=n(s.g,i.g),c=n(s.b,i.b),u=xI(s.opacity,i.opacity);return function(h){return s.r=o(h),s.g=l(h),s.b=c(h),s.opacity=u(h),s+""}}return a.gamma=e,a}(1);function f8(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,a=t.slice(),s;return function(i){for(s=0;s<n;++s)a[s]=e[s]*(1-i)+t[s]*i;return a}}function p8(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function m8(e,t){var n=t?t.length:0,a=e?Math.min(n,e.length):0,s=new Array(a),i=new Array(n),o;for(o=0;o<a;++o)s[o]=cd(e[o],t[o]);for(;o<n;++o)i[o]=t[o];return function(l){for(o=0;o<a;++o)i[o]=s[o](l);return i}}function g8(e,t){var n=new Date;return e=+e,t=+t,function(a){return n.setTime(e*(1-a)+t*a),n}}function Tr(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function b8(e,t){var n={},a={},s;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(s in t)s in e?n[s]=cd(e[s],t[s]):a[s]=t[s];return function(i){for(s in n)a[s]=n[s](i);return a}}var Sw=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Im=new RegExp(Sw.source,"g");function x8(e){return function(){return e}}function y8(e){return function(t){return e(t)+""}}function yI(e,t){var n=Sw.lastIndex=Im.lastIndex=0,a,s,i,o=-1,l=[],c=[];for(e=e+"",t=t+"";(a=Sw.exec(e))&&(s=Im.exec(t));)(i=s.index)>n&&(i=t.slice(n,i),l[o]?l[o]+=i:l[++o]=i),(a=a[0])===(s=s[0])?l[o]?l[o]+=s:l[++o]=s:(l[++o]=null,c.push({i:o,x:Tr(a,s)})),n=Im.lastIndex;return n<t.length&&(i=t.slice(n),l[o]?l[o]+=i:l[++o]=i),l.length<2?c[0]?y8(c[0].x):x8(t):(t=c.length,function(u){for(var h=0,d;h<t;++h)l[(d=c[h]).i]=d.x(u);return l.join("")})}function cd(e,t){var n=typeof t,a;return t==null||n==="boolean"?u1(t):(n==="number"?Tr:n==="string"?(a=po(t))?(t=a,Nf):yI:t instanceof po?Nf:t instanceof Date?g8:p8(t)?f8:Array.isArray(t)?m8:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?b8:Tr)(e,t)}var b2=180/Math.PI,Ew={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function vI(e,t,n,a,s,i){var o,l,c;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(c=e*n+t*a)&&(n-=e*c,a-=t*c),(l=Math.sqrt(n*n+a*a))&&(n/=l,a/=l,c/=l),e*a<t*n&&(e=-e,t=-t,c=-c,o=-o),{translateX:s,translateY:i,rotate:Math.atan2(t,e)*b2,skewX:Math.atan(c)*b2,scaleX:o,scaleY:l}}var Wu;function v8(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Ew:vI(t.a,t.b,t.c,t.d,t.e,t.f)}function w8(e){return e==null||(Wu||(Wu=document.createElementNS("http://www.w3.org/2000/svg","g")),Wu.setAttribute("transform",e),!(e=Wu.transform.baseVal.consolidate()))?Ew:(e=e.matrix,vI(e.a,e.b,e.c,e.d,e.e,e.f))}function wI(e,t,n,a){function s(u){return u.length?u.pop()+" ":""}function i(u,h,d,f,p,v){if(u!==d||h!==f){var x=p.push("translate(",null,t,null,n);v.push({i:x-4,x:Tr(u,d)},{i:x-2,x:Tr(h,f)})}else(d||f)&&p.push("translate("+d+t+f+n)}function o(u,h,d,f){u!==h?(u-h>180?h+=360:h-u>180&&(u+=360),f.push({i:d.push(s(d)+"rotate(",null,a)-2,x:Tr(u,h)})):h&&d.push(s(d)+"rotate("+h+a)}function l(u,h,d,f){u!==h?f.push({i:d.push(s(d)+"skewX(",null,a)-2,x:Tr(u,h)}):h&&d.push(s(d)+"skewX("+h+a)}function c(u,h,d,f,p,v){if(u!==d||h!==f){var x=p.push(s(p)+"scale(",null,",",null,")");v.push({i:x-4,x:Tr(u,d)},{i:x-2,x:Tr(h,f)})}else(d!==1||f!==1)&&p.push(s(p)+"scale("+d+","+f+")")}return function(u,h){var d=[],f=[];return u=e(u),h=e(h),i(u.translateX,u.translateY,h.translateX,h.translateY,d,f),o(u.rotate,h.rotate,d,f),l(u.skewX,h.skewX,d,f),c(u.scaleX,u.scaleY,h.scaleX,h.scaleY,d,f),u=h=null,function(p){for(var v=-1,x=f.length,N;++v<x;)d[(N=f[v]).i]=N.x(p);return d.join("")}}}var N8=wI(v8,"px, ","px)","deg)"),S8=wI(w8,", ",")",")"),E8=1e-12;function x2(e){return((e=Math.exp(e))+1/e)/2}function T8(e){return((e=Math.exp(e))-1/e)/2}function C8(e){return((e=Math.exp(2*e))-1)/(e+1)}const kh=function e(t,n,a){function s(i,o){var l=i[0],c=i[1],u=i[2],h=o[0],d=o[1],f=o[2],p=h-l,v=d-c,x=p*p+v*v,N,b;if(x<E8)b=Math.log(f/u)/t,N=function(T){return[l+T*p,c+T*v,u*Math.exp(t*T*b)]};else{var y=Math.sqrt(x),g=(f*f-u*u+a*x)/(2*u*n*y),w=(f*f-u*u-a*x)/(2*f*n*y),S=Math.log(Math.sqrt(g*g+1)-g),C=Math.log(Math.sqrt(w*w+1)-w);b=(C-S)/t,N=function(T){var E=T*b,k=x2(S),O=u/(n*y)*(k*C8(t*E+S)-T8(S));return[l+O*p,c+O*v,u*k/x2(t*E+S)]}}return N.duration=b*1e3*t/Math.SQRT2,N}return s.rho=function(i){var o=Math.max(.001,+i),l=o*o,c=l*l;return e(o,l,c)},s}(Math.SQRT2,2,4);var $l=0,Hc=0,Tc=0,NI=1e3,Sf,qc,Ef=0,mo=0,pp=0,Dd=typeof performance=="object"&&performance.now?performance:Date,SI=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function h1(){return mo||(SI(A8),mo=Dd.now()+pp)}function A8(){mo=0}function Tf(){this._call=this._time=this._next=null}Tf.prototype=EI.prototype={constructor:Tf,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?h1():+n)+(t==null?0:+t),!this._next&&qc!==this&&(qc?qc._next=this:Sf=this,qc=this),this._call=e,this._time=n,Tw()},stop:function(){this._call&&(this._call=null,this._time=1/0,Tw())}};function EI(e,t,n){var a=new Tf;return a.restart(e,t,n),a}function j8(){h1(),++$l;for(var e=Sf,t;e;)(t=mo-e._time)>=0&&e._call.call(void 0,t),e=e._next;--$l}function y2(){mo=(Ef=Dd.now())+pp,$l=Hc=0;try{j8()}finally{$l=0,_8(),mo=0}}function k8(){var e=Dd.now(),t=e-Ef;t>NI&&(pp-=t,Ef=e)}function _8(){for(var e,t=Sf,n,a=1/0;t;)t._call?(a>t._time&&(a=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:Sf=n);qc=e,Tw(a)}function Tw(e){if(!$l){Hc&&(Hc=clearTimeout(Hc));var t=e-mo;t>24?(e<1/0&&(Hc=setTimeout(y2,e-Dd.now()-pp)),Tc&&(Tc=clearInterval(Tc))):(Tc||(Ef=Dd.now(),Tc=setInterval(k8,NI)),$l=1,SI(y2))}}function v2(e,t,n){var a=new Tf;return t=t==null?0:+t,a.restart(s=>{a.stop(),e(s+t)},t,n),a}var R8=hp("start","end","cancel","interrupt"),O8=[],TI=0,w2=1,Cw=2,_h=3,N2=4,Aw=5,Rh=6;function mp(e,t,n,a,s,i){var o=e.__transition;if(!o)e.__transition={};else if(n in o)return;D8(e,n,{name:t,index:a,group:s,on:R8,tween:O8,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:TI})}function f1(e,t){var n=hr(e,t);if(n.state>TI)throw new Error("too late; already scheduled");return n}function Br(e,t){var n=hr(e,t);if(n.state>_h)throw new Error("too late; already running");return n}function hr(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function D8(e,t,n){var a=e.__transition,s;a[t]=n,n.timer=EI(i,0,n.time);function i(u){n.state=w2,n.timer.restart(o,n.delay,n.time),n.delay<=u&&o(u-n.delay)}function o(u){var h,d,f,p;if(n.state!==w2)return c();for(h in a)if(p=a[h],p.name===n.name){if(p.state===_h)return v2(o);p.state===N2?(p.state=Rh,p.timer.stop(),p.on.call("interrupt",e,e.__data__,p.index,p.group),delete a[h]):+h<t&&(p.state=Rh,p.timer.stop(),p.on.call("cancel",e,e.__data__,p.index,p.group),delete a[h])}if(v2(function(){n.state===_h&&(n.state=N2,n.timer.restart(l,n.delay,n.time),l(u))}),n.state=Cw,n.on.call("start",e,e.__data__,n.index,n.group),n.state===Cw){for(n.state=_h,s=new Array(f=n.tween.length),h=0,d=-1;h<f;++h)(p=n.tween[h].value.call(e,e.__data__,n.index,n.group))&&(s[++d]=p);s.length=d+1}}function l(u){for(var h=u<n.duration?n.ease.call(null,u/n.duration):(n.timer.restart(c),n.state=Aw,1),d=-1,f=s.length;++d<f;)s[d].call(e,h);n.state===Aw&&(n.on.call("end",e,e.__data__,n.index,n.group),c())}function c(){n.state=Rh,n.timer.stop(),delete a[t];for(var u in a)return;delete e.__transition}}function Oh(e,t){var n=e.__transition,a,s,i=!0,o;if(n){t=t==null?null:t+"";for(o in n){if((a=n[o]).name!==t){i=!1;continue}s=a.state>Cw&&a.state<Aw,a.state=Rh,a.timer.stop(),a.on.call(s?"interrupt":"cancel",e,e.__data__,a.index,a.group),delete n[o]}i&&delete e.__transition}}function I8(e){return this.each(function(){Oh(this,e)})}function M8(e,t){var n,a;return function(){var s=Br(this,e),i=s.tween;if(i!==n){a=n=i;for(var o=0,l=a.length;o<l;++o)if(a[o].name===t){a=a.slice(),a.splice(o,1);break}}s.tween=a}}function L8(e,t,n){var a,s;if(typeof n!="function")throw new Error;return function(){var i=Br(this,e),o=i.tween;if(o!==a){s=(a=o).slice();for(var l={name:t,value:n},c=0,u=s.length;c<u;++c)if(s[c].name===t){s[c]=l;break}c===u&&s.push(l)}i.tween=s}}function U8(e,t){var n=this._id;if(e+="",arguments.length<2){for(var a=hr(this.node(),n).tween,s=0,i=a.length,o;s<i;++s)if((o=a[s]).name===e)return o.value;return null}return this.each((t==null?M8:L8)(n,e,t))}function p1(e,t,n){var a=e._id;return e.each(function(){var s=Br(this,a);(s.value||(s.value={}))[t]=n.apply(this,arguments)}),function(s){return hr(s,a).value[t]}}function CI(e,t){var n;return(typeof t=="number"?Tr:t instanceof po?Nf:(n=po(t))?(t=n,Nf):yI)(e,t)}function P8(e){return function(){this.removeAttribute(e)}}function F8(e){return function(){this.removeAttributeNS(e.space,e.local)}}function B8(e,t,n){var a,s=n+"",i;return function(){var o=this.getAttribute(e);return o===s?null:o===a?i:i=t(a=o,n)}}function z8(e,t,n){var a,s=n+"",i;return function(){var o=this.getAttributeNS(e.space,e.local);return o===s?null:o===a?i:i=t(a=o,n)}}function $8(e,t,n){var a,s,i;return function(){var o,l=n(this),c;return l==null?void this.removeAttribute(e):(o=this.getAttribute(e),c=l+"",o===c?null:o===a&&c===s?i:(s=c,i=t(a=o,l)))}}function H8(e,t,n){var a,s,i;return function(){var o,l=n(this),c;return l==null?void this.removeAttributeNS(e.space,e.local):(o=this.getAttributeNS(e.space,e.local),c=l+"",o===c?null:o===a&&c===s?i:(s=c,i=t(a=o,l)))}}function q8(e,t){var n=fp(e),a=n==="transform"?S8:CI;return this.attrTween(e,typeof t=="function"?(n.local?H8:$8)(n,a,p1(this,"attr."+e,t)):t==null?(n.local?F8:P8)(n):(n.local?z8:B8)(n,a,t))}function G8(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function V8(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function Y8(e,t){var n,a;function s(){var i=t.apply(this,arguments);return i!==a&&(n=(a=i)&&V8(e,i)),n}return s._value=t,s}function W8(e,t){var n,a;function s(){var i=t.apply(this,arguments);return i!==a&&(n=(a=i)&&G8(e,i)),n}return s._value=t,s}function X8(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var a=fp(e);return this.tween(n,(a.local?Y8:W8)(a,t))}function K8(e,t){return function(){f1(this,e).delay=+t.apply(this,arguments)}}function Z8(e,t){return t=+t,function(){f1(this,e).delay=t}}function Q8(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?K8:Z8)(t,e)):hr(this.node(),t).delay}function J8(e,t){return function(){Br(this,e).duration=+t.apply(this,arguments)}}function e9(e,t){return t=+t,function(){Br(this,e).duration=t}}function t9(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?J8:e9)(t,e)):hr(this.node(),t).duration}function n9(e,t){if(typeof t!="function")throw new Error;return function(){Br(this,e).ease=t}}function a9(e){var t=this._id;return arguments.length?this.each(n9(t,e)):hr(this.node(),t).ease}function r9(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;Br(this,e).ease=n}}function s9(e){if(typeof e!="function")throw new Error;return this.each(r9(this._id,e))}function i9(e){typeof e!="function"&&(e=aI(e));for(var t=this._groups,n=t.length,a=new Array(n),s=0;s<n;++s)for(var i=t[s],o=i.length,l=a[s]=[],c,u=0;u<o;++u)(c=i[u])&&e.call(c,c.__data__,u,i)&&l.push(c);return new Ns(a,this._parents,this._name,this._id)}function o9(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,a=t.length,s=n.length,i=Math.min(a,s),o=new Array(a),l=0;l<i;++l)for(var c=t[l],u=n[l],h=c.length,d=o[l]=new Array(h),f,p=0;p<h;++p)(f=c[p]||u[p])&&(d[p]=f);for(;l<a;++l)o[l]=t[l];return new Ns(o,this._parents,this._name,this._id)}function l9(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function c9(e,t,n){var a,s,i=l9(t)?f1:Br;return function(){var o=i(this,e),l=o.on;l!==a&&(s=(a=l).copy()).on(t,n),o.on=s}}function d9(e,t){var n=this._id;return arguments.length<2?hr(this.node(),n).on.on(e):this.each(c9(n,e,t))}function u9(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function h9(){return this.on("end.remove",u9(this._id))}function f9(e){var t=this._name,n=this._id;typeof e!="function"&&(e=l1(e));for(var a=this._groups,s=a.length,i=new Array(s),o=0;o<s;++o)for(var l=a[o],c=l.length,u=i[o]=new Array(c),h,d,f=0;f<c;++f)(h=l[f])&&(d=e.call(h,h.__data__,f,l))&&("__data__"in h&&(d.__data__=h.__data__),u[f]=d,mp(u[f],t,n,f,u,hr(h,n)));return new Ns(i,this._parents,t,n)}function p9(e){var t=this._name,n=this._id;typeof e!="function"&&(e=nI(e));for(var a=this._groups,s=a.length,i=[],o=[],l=0;l<s;++l)for(var c=a[l],u=c.length,h,d=0;d<u;++d)if(h=c[d]){for(var f=e.call(h,h.__data__,d,c),p,v=hr(h,n),x=0,N=f.length;x<N;++x)(p=f[x])&&mp(p,t,n,x,f,v);i.push(f),o.push(h)}return new Ns(i,o,t,n)}var m9=uu.prototype.constructor;function g9(){return new m9(this._groups,this._parents)}function b9(e,t){var n,a,s;return function(){var i=zl(this,e),o=(this.style.removeProperty(e),zl(this,e));return i===o?null:i===n&&o===a?s:s=t(n=i,a=o)}}function AI(e){return function(){this.style.removeProperty(e)}}function x9(e,t,n){var a,s=n+"",i;return function(){var o=zl(this,e);return o===s?null:o===a?i:i=t(a=o,n)}}function y9(e,t,n){var a,s,i;return function(){var o=zl(this,e),l=n(this),c=l+"";return l==null&&(c=l=(this.style.removeProperty(e),zl(this,e))),o===c?null:o===a&&c===s?i:(s=c,i=t(a=o,l))}}function v9(e,t){var n,a,s,i="style."+t,o="end."+i,l;return function(){var c=Br(this,e),u=c.on,h=c.value[i]==null?l||(l=AI(t)):void 0;(u!==n||s!==h)&&(a=(n=u).copy()).on(o,s=h),c.on=a}}function w9(e,t,n){var a=(e+="")=="transform"?N8:CI;return t==null?this.styleTween(e,b9(e,a)).on("end.style."+e,AI(e)):typeof t=="function"?this.styleTween(e,y9(e,a,p1(this,"style."+e,t))).each(v9(this._id,e)):this.styleTween(e,x9(e,a,t),n).on("end.style."+e,null)}function N9(e,t,n){return function(a){this.style.setProperty(e,t.call(this,a),n)}}function S9(e,t,n){var a,s;function i(){var o=t.apply(this,arguments);return o!==s&&(a=(s=o)&&N9(e,o,n)),a}return i._value=t,i}function E9(e,t,n){var a="style."+(e+="");if(arguments.length<2)return(a=this.tween(a))&&a._value;if(t==null)return this.tween(a,null);if(typeof t!="function")throw new Error;return this.tween(a,S9(e,t,n??""))}function T9(e){return function(){this.textContent=e}}function C9(e){return function(){var t=e(this);this.textContent=t??""}}function A9(e){return this.tween("text",typeof e=="function"?C9(p1(this,"text",e)):T9(e==null?"":e+""))}function j9(e){return function(t){this.textContent=e.call(this,t)}}function k9(e){var t,n;function a(){var s=e.apply(this,arguments);return s!==n&&(t=(n=s)&&j9(s)),t}return a._value=e,a}function _9(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,k9(e))}function R9(){for(var e=this._name,t=this._id,n=jI(),a=this._groups,s=a.length,i=0;i<s;++i)for(var o=a[i],l=o.length,c,u=0;u<l;++u)if(c=o[u]){var h=hr(c,t);mp(c,e,n,u,o,{time:h.time+h.delay+h.duration,delay:0,duration:h.duration,ease:h.ease})}return new Ns(a,this._parents,e,n)}function O9(){var e,t,n=this,a=n._id,s=n.size();return new Promise(function(i,o){var l={value:o},c={value:function(){--s===0&&i()}};n.each(function(){var u=Br(this,a),h=u.on;h!==e&&(t=(e=h).copy(),t._.cancel.push(l),t._.interrupt.push(l),t._.end.push(c)),u.on=t}),s===0&&i()})}var D9=0;function Ns(e,t,n,a){this._groups=e,this._parents=t,this._name=n,this._id=a}function jI(){return++D9}var ts=uu.prototype;Ns.prototype={constructor:Ns,select:f9,selectAll:p9,selectChild:ts.selectChild,selectChildren:ts.selectChildren,filter:i9,merge:o9,selection:g9,transition:R9,call:ts.call,nodes:ts.nodes,node:ts.node,size:ts.size,empty:ts.empty,each:ts.each,on:d9,attr:q8,attrTween:X8,style:w9,styleTween:E9,text:A9,textTween:_9,remove:h9,tween:U8,delay:Q8,duration:t9,ease:a9,easeVarying:s9,end:O9,[Symbol.iterator]:ts[Symbol.iterator]};function I9(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var M9={time:null,delay:0,duration:250,ease:I9};function L9(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function U9(e){var t,n;e instanceof Ns?(t=e._id,e=e._name):(t=jI(),(n=M9).time=h1(),e=e==null?null:e+"");for(var a=this._groups,s=a.length,i=0;i<s;++i)for(var o=a[i],l=o.length,c,u=0;u<l;++u)(c=o[u])&&mp(c,e,t,u,o,n||L9(c,t));return new Ns(a,this._parents,e,t)}uu.prototype.interrupt=I8;uu.prototype.transition=U9;const Xu=e=>()=>e;function P9(e,{sourceEvent:t,target:n,transform:a,dispatch:s}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:a,enumerable:!0,configurable:!0},_:{value:s}})}function us(e,t,n){this.k=e,this.x=t,this.y=n}us.prototype={constructor:us,scale:function(e){return e===1?this:new us(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new us(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var gp=new us(1,0,0);kI.prototype=us.prototype;function kI(e){for(;!e.__zoom;)if(!(e=e.parentNode))return gp;return e.__zoom}function Mm(e){e.stopImmediatePropagation()}function Cc(e){e.preventDefault(),e.stopImmediatePropagation()}function F9(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function B9(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function S2(){return this.__zoom||gp}function z9(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function $9(){return navigator.maxTouchPoints||"ontouchstart"in this}function H9(e,t,n){var a=e.invertX(t[0][0])-n[0][0],s=e.invertX(t[1][0])-n[1][0],i=e.invertY(t[0][1])-n[0][1],o=e.invertY(t[1][1])-n[1][1];return e.translate(s>a?(a+s)/2:Math.min(0,a)||Math.max(0,s),o>i?(i+o)/2:Math.min(0,i)||Math.max(0,o))}function _I(){var e=F9,t=B9,n=H9,a=z9,s=$9,i=[0,1/0],o=[[-1/0,-1/0],[1/0,1/0]],l=250,c=kh,u=hp("start","zoom","end"),h,d,f,p=500,v=150,x=0,N=10;function b(j){j.property("__zoom",S2).on("wheel.zoom",E,{passive:!1}).on("mousedown.zoom",k).on("dblclick.zoom",O).filter(s).on("touchstart.zoom",R).on("touchmove.zoom",I).on("touchend.zoom touchcancel.zoom",F).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}b.transform=function(j,U,_,M){var A=j.selection?j.selection():j;A.property("__zoom",S2),j!==A?S(j,U,_,M):A.interrupt().each(function(){C(this,arguments).event(M).start().zoom(null,typeof U=="function"?U.apply(this,arguments):U).end()})},b.scaleBy=function(j,U,_,M){b.scaleTo(j,function(){var A=this.__zoom.k,D=typeof U=="function"?U.apply(this,arguments):U;return A*D},_,M)},b.scaleTo=function(j,U,_,M){b.transform(j,function(){var A=t.apply(this,arguments),D=this.__zoom,B=_==null?w(A):typeof _=="function"?_.apply(this,arguments):_,G=D.invert(B),L=typeof U=="function"?U.apply(this,arguments):U;return n(g(y(D,L),B,G),A,o)},_,M)},b.translateBy=function(j,U,_,M){b.transform(j,function(){return n(this.__zoom.translate(typeof U=="function"?U.apply(this,arguments):U,typeof _=="function"?_.apply(this,arguments):_),t.apply(this,arguments),o)},null,M)},b.translateTo=function(j,U,_,M,A){b.transform(j,function(){var D=t.apply(this,arguments),B=this.__zoom,G=M==null?w(D):typeof M=="function"?M.apply(this,arguments):M;return n(gp.translate(G[0],G[1]).scale(B.k).translate(typeof U=="function"?-U.apply(this,arguments):-U,typeof _=="function"?-_.apply(this,arguments):-_),D,o)},M,A)};function y(j,U){return U=Math.max(i[0],Math.min(i[1],U)),U===j.k?j:new us(U,j.x,j.y)}function g(j,U,_){var M=U[0]-_[0]*j.k,A=U[1]-_[1]*j.k;return M===j.x&&A===j.y?j:new us(j.k,M,A)}function w(j){return[(+j[0][0]+ +j[1][0])/2,(+j[0][1]+ +j[1][1])/2]}function S(j,U,_,M){j.on("start.zoom",function(){C(this,arguments).event(M).start()}).on("interrupt.zoom end.zoom",function(){C(this,arguments).event(M).end()}).tween("zoom",function(){var A=this,D=arguments,B=C(A,D).event(M),G=t.apply(A,D),L=_==null?w(G):typeof _=="function"?_.apply(A,D):_,q=Math.max(G[1][0]-G[0][0],G[1][1]-G[0][1]),X=A.__zoom,K=typeof U=="function"?U.apply(A,D):U,ne=c(X.invert(L).concat(q/X.k),K.invert(L).concat(q/K.k));return function(te){if(te===1)te=K;else{var ee=ne(te),ae=q/ee[2];te=new us(ae,L[0]-ee[0]*ae,L[1]-ee[1]*ae)}B.zoom(null,te)}})}function C(j,U,_){return!_&&j.__zooming||new T(j,U)}function T(j,U){this.that=j,this.args=U,this.active=0,this.sourceEvent=null,this.extent=t.apply(j,U),this.taps=0}T.prototype={event:function(j){return j&&(this.sourceEvent=j),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(j,U){return this.mouse&&j!=="mouse"&&(this.mouse[1]=U.invert(this.mouse[0])),this.touch0&&j!=="touch"&&(this.touch0[1]=U.invert(this.touch0[0])),this.touch1&&j!=="touch"&&(this.touch1[1]=U.invert(this.touch1[0])),this.that.__zoom=U,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(j){var U=pa(this.that).datum();u.call(j,this.that,new P9(j,{sourceEvent:this.sourceEvent,target:b,transform:this.that.__zoom,dispatch:u}),U)}};function E(j,...U){if(!e.apply(this,arguments))return;var _=C(this,U).event(j),M=this.__zoom,A=Math.max(i[0],Math.min(i[1],M.k*Math.pow(2,a.apply(this,arguments)))),D=Ja(j);if(_.wheel)(_.mouse[0][0]!==D[0]||_.mouse[0][1]!==D[1])&&(_.mouse[1]=M.invert(_.mouse[0]=D)),clearTimeout(_.wheel);else{if(M.k===A)return;_.mouse=[D,M.invert(D)],Oh(this),_.start()}Cc(j),_.wheel=setTimeout(B,v),_.zoom("mouse",n(g(y(M,A),_.mouse[0],_.mouse[1]),_.extent,o));function B(){_.wheel=null,_.end()}}function k(j,...U){if(f||!e.apply(this,arguments))return;var _=j.currentTarget,M=C(this,U,!0).event(j),A=pa(j.view).on("mousemove.zoom",L,!0).on("mouseup.zoom",q,!0),D=Ja(j,_),B=j.clientX,G=j.clientY;fI(j.view),Mm(j),M.mouse=[D,this.__zoom.invert(D)],Oh(this),M.start();function L(X){if(Cc(X),!M.moved){var K=X.clientX-B,ne=X.clientY-G;M.moved=K*K+ne*ne>x}M.event(X).zoom("mouse",n(g(M.that.__zoom,M.mouse[0]=Ja(X,_),M.mouse[1]),M.extent,o))}function q(X){A.on("mousemove.zoom mouseup.zoom",null),pI(X.view,M.moved),Cc(X),M.event(X).end()}}function O(j,...U){if(e.apply(this,arguments)){var _=this.__zoom,M=Ja(j.changedTouches?j.changedTouches[0]:j,this),A=_.invert(M),D=_.k*(j.shiftKey?.5:2),B=n(g(y(_,D),M,A),t.apply(this,U),o);Cc(j),l>0?pa(this).transition().duration(l).call(S,B,M,j):pa(this).call(b.transform,B,M,j)}}function R(j,...U){if(e.apply(this,arguments)){var _=j.touches,M=_.length,A=C(this,U,j.changedTouches.length===M).event(j),D,B,G,L;for(Mm(j),B=0;B<M;++B)G=_[B],L=Ja(G,this),L=[L,this.__zoom.invert(L),G.identifier],A.touch0?!A.touch1&&A.touch0[2]!==L[2]&&(A.touch1=L,A.taps=0):(A.touch0=L,D=!0,A.taps=1+!!h);h&&(h=clearTimeout(h)),D&&(A.taps<2&&(d=L[0],h=setTimeout(function(){h=null},p)),Oh(this),A.start())}}function I(j,...U){if(this.__zooming){var _=C(this,U).event(j),M=j.changedTouches,A=M.length,D,B,G,L;for(Cc(j),D=0;D<A;++D)B=M[D],G=Ja(B,this),_.touch0&&_.touch0[2]===B.identifier?_.touch0[0]=G:_.touch1&&_.touch1[2]===B.identifier&&(_.touch1[0]=G);if(B=_.that.__zoom,_.touch1){var q=_.touch0[0],X=_.touch0[1],K=_.touch1[0],ne=_.touch1[1],te=(te=K[0]-q[0])*te+(te=K[1]-q[1])*te,ee=(ee=ne[0]-X[0])*ee+(ee=ne[1]-X[1])*ee;B=y(B,Math.sqrt(te/ee)),G=[(q[0]+K[0])/2,(q[1]+K[1])/2],L=[(X[0]+ne[0])/2,(X[1]+ne[1])/2]}else if(_.touch0)G=_.touch0[0],L=_.touch0[1];else return;_.zoom("touch",n(g(B,G,L),_.extent,o))}}function F(j,...U){if(this.__zooming){var _=C(this,U).event(j),M=j.changedTouches,A=M.length,D,B;for(Mm(j),f&&clearTimeout(f),f=setTimeout(function(){f=null},p),D=0;D<A;++D)B=M[D],_.touch0&&_.touch0[2]===B.identifier?delete _.touch0:_.touch1&&_.touch1[2]===B.identifier&&delete _.touch1;if(_.touch1&&!_.touch0&&(_.touch0=_.touch1,delete _.touch1),_.touch0)_.touch0[1]=this.__zoom.invert(_.touch0[0]);else if(_.end(),_.taps===2&&(B=Ja(B,this),Math.hypot(d[0]-B[0],d[1]-B[1])<N)){var G=pa(this).on("dblclick.zoom");G&&G.apply(this,arguments)}}}return b.wheelDelta=function(j){return arguments.length?(a=typeof j=="function"?j:Xu(+j),b):a},b.filter=function(j){return arguments.length?(e=typeof j=="function"?j:Xu(!!j),b):e},b.touchable=function(j){return arguments.length?(s=typeof j=="function"?j:Xu(!!j),b):s},b.extent=function(j){return arguments.length?(t=typeof j=="function"?j:Xu([[+j[0][0],+j[0][1]],[+j[1][0],+j[1][1]]]),b):t},b.scaleExtent=function(j){return arguments.length?(i[0]=+j[0],i[1]=+j[1],b):[i[0],i[1]]},b.translateExtent=function(j){return arguments.length?(o[0][0]=+j[0][0],o[1][0]=+j[1][0],o[0][1]=+j[0][1],o[1][1]=+j[1][1],b):[[o[0][0],o[0][1]],[o[1][0],o[1][1]]]},b.constrain=function(j){return arguments.length?(n=j,b):n},b.duration=function(j){return arguments.length?(l=+j,b):l},b.interpolate=function(j){return arguments.length?(c=j,b):c},b.on=function(){var j=u.on.apply(u,arguments);return j===u?b:j},b.clickDistance=function(j){return arguments.length?(x=(j=+j)*j,b):Math.sqrt(x)},b.tapDistance=function(j){return arguments.length?(N=+j,b):N},b}const Lr={error001:()=>"[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001",error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:e=>`Node type "${e}" not found. Using fallback type "default".`,error004:()=>"The React Flow parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:e=>`The old edge with id=${e} does not exist.`,error009:e=>`Marker type "${e}" doesn't exist.`,error008:(e,{id:t,sourceHandle:n,targetHandle:a})=>`Couldn't create edge for ${e} handle id: "${e==="source"?n:a}", edge id: ${t}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:e=>`Edge type "${e}" not found. Using fallback type "default".`,error012:e=>`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(e="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${e}/dist/style.css' or base.css to make sure everything is working properly.`,error014:()=>"useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.",error015:()=>"It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs."},Id=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],RI=["Enter"," ","Escape"],OI={"node.a11yDescription.default":"Press enter or space to select a node. Press delete to remove it and escape to cancel.","node.a11yDescription.keyboardDisabled":"Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.","node.a11yDescription.ariaLiveMessage":({direction:e,x:t,y:n})=>`Moved selected node ${e}. New position, x: ${t}, y: ${n}`,"edge.a11yDescription.default":"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.","controls.ariaLabel":"Control Panel","controls.zoomIn.ariaLabel":"Zoom In","controls.zoomOut.ariaLabel":"Zoom Out","controls.fitView.ariaLabel":"Fit View","controls.interactive.ariaLabel":"Toggle Interactivity","minimap.ariaLabel":"Mini Map","handle.ariaLabel":"Handle"};var Hl;(function(e){e.Strict="strict",e.Loose="loose"})(Hl||(Hl={}));var oo;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(oo||(oo={}));var Md;(function(e){e.Partial="partial",e.Full="full"})(Md||(Md={}));const DI={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var ei;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(ei||(ei={}));var Cf;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(Cf||(Cf={}));var Pe;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(Pe||(Pe={}));const E2={[Pe.Left]:Pe.Right,[Pe.Right]:Pe.Left,[Pe.Top]:Pe.Bottom,[Pe.Bottom]:Pe.Top};function II(e){return e===null?null:e?"valid":"invalid"}const MI=e=>"id"in e&&"source"in e&&"target"in e,q9=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),m1=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),fu=(e,t=[0,0])=>{const{width:n,height:a}=Cs(e),s=e.origin??t,i=n*s[0],o=a*s[1];return{x:e.position.x-i,y:e.position.y-o}},G9=(e,t={nodeOrigin:[0,0]})=>{if(e.length===0)return{x:0,y:0,width:0,height:0};const n=e.reduce((a,s)=>{const i=typeof s=="string";let o=!t.nodeLookup&&!i?s:void 0;t.nodeLookup&&(o=i?t.nodeLookup.get(s):m1(s)?s:t.nodeLookup.get(s.id));const l=o?Af(o,t.nodeOrigin):{x:0,y:0,x2:0,y2:0};return bp(a,l)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return xp(n)},pu=(e,t={})=>{let n={x:1/0,y:1/0,x2:-1/0,y2:-1/0},a=!1;return e.forEach(s=>{(t.filter===void 0||t.filter(s))&&(n=bp(n,Af(s)),a=!0)}),a?xp(n):{x:0,y:0,width:0,height:0}},g1=(e,t,[n,a,s]=[0,0,1],i=!1,o=!1)=>{const l={...gu(t,[n,a,s]),width:t.width/s,height:t.height/s},c=[];for(const u of e.values()){const{measured:h,selectable:d=!0,hidden:f=!1}=u;if(o&&!d||f)continue;const p=h.width??u.width??u.initialWidth??null,v=h.height??u.height??u.initialHeight??null,x=Ld(l,Gl(u)),N=(p??0)*(v??0),b=i&&x>0;(!u.internals.handleBounds||b||x>=N||u.dragging)&&c.push(u)}return c},V9=(e,t)=>{const n=new Set;return e.forEach(a=>{n.add(a.id)}),t.filter(a=>n.has(a.source)||n.has(a.target))};function Y9(e,t){const n=new Map,a=t!=null&&t.nodes?new Set(t.nodes.map(s=>s.id)):null;return e.forEach(s=>{s.measured.width&&s.measured.height&&((t==null?void 0:t.includeHiddenNodes)||!s.hidden)&&(!a||a.has(s.id))&&n.set(s.id,s)}),n}async function W9({nodes:e,width:t,height:n,panZoom:a,minZoom:s,maxZoom:i},o){if(e.size===0)return Promise.resolve(!0);const l=Y9(e,o),c=pu(l),u=b1(c,t,n,(o==null?void 0:o.minZoom)??s,(o==null?void 0:o.maxZoom)??i,(o==null?void 0:o.padding)??.1);return await a.setViewport(u,{duration:o==null?void 0:o.duration,ease:o==null?void 0:o.ease,interpolate:o==null?void 0:o.interpolate}),Promise.resolve(!0)}function LI({nodeId:e,nextPosition:t,nodeLookup:n,nodeOrigin:a=[0,0],nodeExtent:s,onError:i}){const o=n.get(e),l=o.parentId?n.get(o.parentId):void 0,{x:c,y:u}=l?l.internals.positionAbsolute:{x:0,y:0},h=o.origin??a;let d=o.extent||s;if(o.extent==="parent"&&!o.expandParent)if(!l)i==null||i("005",Lr.error005());else{const p=l.measured.width,v=l.measured.height;p&&v&&(d=[[c,u],[c+p,u+v]])}else l&&Vl(o.extent)&&(d=[[o.extent[0][0]+c,o.extent[0][1]+u],[o.extent[1][0]+c,o.extent[1][1]+u]]);const f=Vl(d)?go(t,d,o.measured):t;return(o.measured.width===void 0||o.measured.height===void 0)&&(i==null||i("015",Lr.error015())),{position:{x:f.x-c+(o.measured.width??0)*h[0],y:f.y-u+(o.measured.height??0)*h[1]},positionAbsolute:f}}async function X9({nodesToRemove:e=[],edgesToRemove:t=[],nodes:n,edges:a,onBeforeDelete:s}){const i=new Set(e.map(f=>f.id)),o=[];for(const f of n){if(f.deletable===!1)continue;const p=i.has(f.id),v=!p&&f.parentId&&o.find(x=>x.id===f.parentId);(p||v)&&o.push(f)}const l=new Set(t.map(f=>f.id)),c=a.filter(f=>f.deletable!==!1),h=V9(o,c);for(const f of c)l.has(f.id)&&!h.find(v=>v.id===f.id)&&h.push(f);if(!s)return{edges:h,nodes:o};const d=await s({nodes:o,edges:h});return typeof d=="boolean"?d?{edges:h,nodes:o}:{edges:[],nodes:[]}:d}const ql=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),go=(e={x:0,y:0},t,n)=>({x:ql(e.x,t[0][0],t[1][0]-((n==null?void 0:n.width)??0)),y:ql(e.y,t[0][1],t[1][1]-((n==null?void 0:n.height)??0))});function UI(e,t,n){const{width:a,height:s}=Cs(n),{x:i,y:o}=n.internals.positionAbsolute;return go(e,[[i,o],[i+a,o+s]],t)}const T2=(e,t,n)=>e<t?ql(Math.abs(e-t),1,t)/t:e>n?-ql(Math.abs(e-n),1,t)/t:0,PI=(e,t,n=15,a=40)=>{const s=T2(e.x,a,t.width-a)*n,i=T2(e.y,a,t.height-a)*n;return[s,i]},bp=(e,t)=>({x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}),jw=({x:e,y:t,width:n,height:a})=>({x:e,y:t,x2:e+n,y2:t+a}),xp=({x:e,y:t,x2:n,y2:a})=>({x:e,y:t,width:n-e,height:a-t}),Gl=(e,t=[0,0])=>{var s,i;const{x:n,y:a}=m1(e)?e.internals.positionAbsolute:fu(e,t);return{x:n,y:a,width:((s=e.measured)==null?void 0:s.width)??e.width??e.initialWidth??0,height:((i=e.measured)==null?void 0:i.height)??e.height??e.initialHeight??0}},Af=(e,t=[0,0])=>{var s,i;const{x:n,y:a}=m1(e)?e.internals.positionAbsolute:fu(e,t);return{x:n,y:a,x2:n+(((s=e.measured)==null?void 0:s.width)??e.width??e.initialWidth??0),y2:a+(((i=e.measured)==null?void 0:i.height)??e.height??e.initialHeight??0)}},FI=(e,t)=>xp(bp(jw(e),jw(t))),Ld=(e,t)=>{const n=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),a=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(n*a)},C2=e=>tr(e.width)&&tr(e.height)&&tr(e.x)&&tr(e.y),tr=e=>!isNaN(e)&&isFinite(e),K9=(e,t)=>{},mu=(e,t=[1,1])=>({x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}),gu=({x:e,y:t},[n,a,s],i=!1,o=[1,1])=>{const l={x:(e-n)/s,y:(t-a)/s};return i?mu(l,o):l},jf=({x:e,y:t},[n,a,s])=>({x:e*s+n,y:t*s+a});function Fo(e,t){if(typeof e=="number")return Math.floor((t-t/(1+e))*.5);if(typeof e=="string"&&e.endsWith("px")){const n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(n)}if(typeof e=="string"&&e.endsWith("%")){const n=parseFloat(e);if(!Number.isNaN(n))return Math.floor(t*n*.01)}return console.error(`[React Flow] The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function Z9(e,t,n){if(typeof e=="string"||typeof e=="number"){const a=Fo(e,n),s=Fo(e,t);return{top:a,right:s,bottom:a,left:s,x:s*2,y:a*2}}if(typeof e=="object"){const a=Fo(e.top??e.y??0,n),s=Fo(e.bottom??e.y??0,n),i=Fo(e.left??e.x??0,t),o=Fo(e.right??e.x??0,t);return{top:a,right:o,bottom:s,left:i,x:i+o,y:a+s}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function Q9(e,t,n,a,s,i){const{x:o,y:l}=jf(e,[t,n,a]),{x:c,y:u}=jf({x:e.x+e.width,y:e.y+e.height},[t,n,a]),h=s-c,d=i-u;return{left:Math.floor(o),top:Math.floor(l),right:Math.floor(h),bottom:Math.floor(d)}}const b1=(e,t,n,a,s,i)=>{const o=Z9(i,t,n),l=(t-o.x)/e.width,c=(n-o.y)/e.height,u=Math.min(l,c),h=ql(u,a,s),d=e.x+e.width/2,f=e.y+e.height/2,p=t/2-d*h,v=n/2-f*h,x=Q9(e,p,v,h,t,n),N={left:Math.min(x.left-o.left,0),top:Math.min(x.top-o.top,0),right:Math.min(x.right-o.right,0),bottom:Math.min(x.bottom-o.bottom,0)};return{x:p-N.left+N.right,y:v-N.top+N.bottom,zoom:h}},Ud=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function Vl(e){return e!=null&&e!=="parent"}function Cs(e){var t,n;return{width:((t=e.measured)==null?void 0:t.width)??e.width??e.initialWidth??0,height:((n=e.measured)==null?void 0:n.height)??e.height??e.initialHeight??0}}function BI(e){var t,n;return(((t=e.measured)==null?void 0:t.width)??e.width??e.initialWidth)!==void 0&&(((n=e.measured)==null?void 0:n.height)??e.height??e.initialHeight)!==void 0}function zI(e,t={width:0,height:0},n,a,s){const i={...e},o=a.get(n);if(o){const l=o.origin||s;i.x+=o.internals.positionAbsolute.x-(t.width??0)*l[0],i.y+=o.internals.positionAbsolute.y-(t.height??0)*l[1]}return i}function A2(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function J9(){let e,t;return{promise:new Promise((a,s)=>{e=a,t=s}),resolve:e,reject:t}}function eH(e){return{...OI,...e||{}}}function dd(e,{snapGrid:t=[0,0],snapToGrid:n=!1,transform:a,containerBounds:s}){const{x:i,y:o}=nr(e),l=gu({x:i-((s==null?void 0:s.left)??0),y:o-((s==null?void 0:s.top)??0)},a),{x:c,y:u}=n?mu(l,t):l;return{xSnapped:c,ySnapped:u,...l}}const x1=e=>({width:e.offsetWidth,height:e.offsetHeight}),$I=e=>{var t;return((t=e==null?void 0:e.getRootNode)==null?void 0:t.call(e))||(window==null?void 0:window.document)},tH=["INPUT","SELECT","TEXTAREA"];function HI(e){var a,s;const t=((s=(a=e.composedPath)==null?void 0:a.call(e))==null?void 0:s[0])||e.target;return(t==null?void 0:t.nodeType)!==1?!1:tH.includes(t.nodeName)||t.hasAttribute("contenteditable")||!!t.closest(".nokey")}const qI=e=>"clientX"in e,nr=(e,t)=>{var i,o;const n=qI(e),a=n?e.clientX:(i=e.touches)==null?void 0:i[0].clientX,s=n?e.clientY:(o=e.touches)==null?void 0:o[0].clientY;return{x:a-((t==null?void 0:t.left)??0),y:s-((t==null?void 0:t.top)??0)}},j2=(e,t,n,a,s)=>{const i=t.querySelectorAll(`.${e}`);return!i||!i.length?null:Array.from(i).map(o=>{const l=o.getBoundingClientRect();return{id:o.getAttribute("data-handleid"),type:e,nodeId:s,position:o.getAttribute("data-handlepos"),x:(l.left-n.left)/a,y:(l.top-n.top)/a,...x1(o)}})};function GI({sourceX:e,sourceY:t,targetX:n,targetY:a,sourceControlX:s,sourceControlY:i,targetControlX:o,targetControlY:l}){const c=e*.125+s*.375+o*.375+n*.125,u=t*.125+i*.375+l*.375+a*.125,h=Math.abs(c-e),d=Math.abs(u-t);return[c,u,h,d]}function Ku(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function k2({pos:e,x1:t,y1:n,x2:a,y2:s,c:i}){switch(e){case Pe.Left:return[t-Ku(t-a,i),n];case Pe.Right:return[t+Ku(a-t,i),n];case Pe.Top:return[t,n-Ku(n-s,i)];case Pe.Bottom:return[t,n+Ku(s-n,i)]}}function VI({sourceX:e,sourceY:t,sourcePosition:n=Pe.Bottom,targetX:a,targetY:s,targetPosition:i=Pe.Top,curvature:o=.25}){const[l,c]=k2({pos:n,x1:e,y1:t,x2:a,y2:s,c:o}),[u,h]=k2({pos:i,x1:a,y1:s,x2:e,y2:t,c:o}),[d,f,p,v]=GI({sourceX:e,sourceY:t,targetX:a,targetY:s,sourceControlX:l,sourceControlY:c,targetControlX:u,targetControlY:h});return[`M${e},${t} C${l},${c} ${u},${h} ${a},${s}`,d,f,p,v]}function YI({sourceX:e,sourceY:t,targetX:n,targetY:a}){const s=Math.abs(n-e)/2,i=n<e?n+s:n-s,o=Math.abs(a-t)/2,l=a<t?a+o:a-o;return[i,l,s,o]}function nH({sourceNode:e,targetNode:t,selected:n=!1,zIndex:a,elevateOnSelect:s=!1}){if(a!==void 0)return a;const i=s&&n?1e3:0,o=Math.max(e.parentId||s&&e.selected?e.internals.z:0,t.parentId||s&&t.selected?t.internals.z:0);return i+o}function aH({sourceNode:e,targetNode:t,width:n,height:a,transform:s}){const i=bp(Af(e),Af(t));i.x===i.x2&&(i.x2+=1),i.y===i.y2&&(i.y2+=1);const o={x:-s[0]/s[2],y:-s[1]/s[2],width:n/s[2],height:a/s[2]};return Ld(o,xp(i))>0}const rH=({source:e,sourceHandle:t,target:n,targetHandle:a})=>`xy-edge__${e}${t||""}-${n}${a||""}`,sH=(e,t)=>t.some(n=>n.source===e.source&&n.target===e.target&&(n.sourceHandle===e.sourceHandle||!n.sourceHandle&&!e.sourceHandle)&&(n.targetHandle===e.targetHandle||!n.targetHandle&&!e.targetHandle)),WI=(e,t)=>{if(!e.source||!e.target)return t;let n;return MI(e)?n={...e}:n={...e,id:rH(e)},sH(n,t)?t:(n.sourceHandle===null&&delete n.sourceHandle,n.targetHandle===null&&delete n.targetHandle,t.concat(n))};function XI({sourceX:e,sourceY:t,targetX:n,targetY:a}){const[s,i,o,l]=YI({sourceX:e,sourceY:t,targetX:n,targetY:a});return[`M ${e},${t}L ${n},${a}`,s,i,o,l]}const _2={[Pe.Left]:{x:-1,y:0},[Pe.Right]:{x:1,y:0},[Pe.Top]:{x:0,y:-1},[Pe.Bottom]:{x:0,y:1}},iH=({source:e,sourcePosition:t=Pe.Bottom,target:n})=>t===Pe.Left||t===Pe.Right?e.x<n.x?{x:1,y:0}:{x:-1,y:0}:e.y<n.y?{x:0,y:1}:{x:0,y:-1},R2=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function oH({source:e,sourcePosition:t=Pe.Bottom,target:n,targetPosition:a=Pe.Top,center:s,offset:i,stepPosition:o}){const l=_2[t],c=_2[a],u={x:e.x+l.x*i,y:e.y+l.y*i},h={x:n.x+c.x*i,y:n.y+c.y*i},d=iH({source:u,sourcePosition:t,target:h}),f=d.x!==0?"x":"y",p=d[f];let v=[],x,N;const b={x:0,y:0},y={x:0,y:0},[,,g,w]=YI({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(l[f]*c[f]===-1){f==="x"?(x=s.x??u.x+(h.x-u.x)*o,N=s.y??(u.y+h.y)/2):(x=s.x??(u.x+h.x)/2,N=s.y??u.y+(h.y-u.y)*o);const C=[{x,y:u.y},{x,y:h.y}],T=[{x:u.x,y:N},{x:h.x,y:N}];l[f]===p?v=f==="x"?C:T:v=f==="x"?T:C}else{const C=[{x:u.x,y:h.y}],T=[{x:h.x,y:u.y}];if(f==="x"?v=l.x===p?T:C:v=l.y===p?C:T,t===a){const I=Math.abs(e[f]-n[f]);if(I<=i){const F=Math.min(i-1,i-I);l[f]===p?b[f]=(u[f]>e[f]?-1:1)*F:y[f]=(h[f]>n[f]?-1:1)*F}}if(t!==a){const I=f==="x"?"y":"x",F=l[f]===c[I],j=u[I]>h[I],U=u[I]<h[I];(l[f]===1&&(!F&&j||F&&U)||l[f]!==1&&(!F&&U||F&&j))&&(v=f==="x"?C:T)}const E={x:u.x+b.x,y:u.y+b.y},k={x:h.x+y.x,y:h.y+y.y},O=Math.max(Math.abs(E.x-v[0].x),Math.abs(k.x-v[0].x)),R=Math.max(Math.abs(E.y-v[0].y),Math.abs(k.y-v[0].y));O>=R?(x=(E.x+k.x)/2,N=v[0].y):(x=v[0].x,N=(E.y+k.y)/2)}return[[e,{x:u.x+b.x,y:u.y+b.y},...v,{x:h.x+y.x,y:h.y+y.y},n],x,N,g,w]}function lH(e,t,n,a){const s=Math.min(R2(e,t)/2,R2(t,n)/2,a),{x:i,y:o}=t;if(e.x===i&&i===n.x||e.y===o&&o===n.y)return`L${i} ${o}`;if(e.y===o){const u=e.x<n.x?-1:1,h=e.y<n.y?1:-1;return`L ${i+s*u},${o}Q ${i},${o} ${i},${o+s*h}`}const l=e.x<n.x?1:-1,c=e.y<n.y?-1:1;return`L ${i},${o+s*c}Q ${i},${o} ${i+s*l},${o}`}function kw({sourceX:e,sourceY:t,sourcePosition:n=Pe.Bottom,targetX:a,targetY:s,targetPosition:i=Pe.Top,borderRadius:o=5,centerX:l,centerY:c,offset:u=20,stepPosition:h=.5}){const[d,f,p,v,x]=oH({source:{x:e,y:t},sourcePosition:n,target:{x:a,y:s},targetPosition:i,center:{x:l,y:c},offset:u,stepPosition:h});return[d.reduce((b,y,g)=>{let w="";return g>0&&g<d.length-1?w=lH(d[g-1],y,d[g+1],o):w=`${g===0?"M":"L"}${y.x} ${y.y}`,b+=w,b},""),f,p,v,x]}function O2(e){var t;return e&&!!(e.internals.handleBounds||(t=e.handles)!=null&&t.length)&&!!(e.measured.width||e.width||e.initialWidth)}function cH(e){var d;const{sourceNode:t,targetNode:n}=e;if(!O2(t)||!O2(n))return null;const a=t.internals.handleBounds||D2(t.handles),s=n.internals.handleBounds||D2(n.handles),i=I2((a==null?void 0:a.source)??[],e.sourceHandle),o=I2(e.connectionMode===Hl.Strict?(s==null?void 0:s.target)??[]:((s==null?void 0:s.target)??[]).concat((s==null?void 0:s.source)??[]),e.targetHandle);if(!i||!o)return(d=e.onError)==null||d.call(e,"008",Lr.error008(i?"target":"source",{id:e.id,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle})),null;const l=(i==null?void 0:i.position)||Pe.Bottom,c=(o==null?void 0:o.position)||Pe.Top,u=Pd(t,i,l),h=Pd(n,o,c);return{sourceX:u.x,sourceY:u.y,targetX:h.x,targetY:h.y,sourcePosition:l,targetPosition:c}}function D2(e){if(!e)return null;const t=[],n=[];for(const a of e)a.width=a.width??1,a.height=a.height??1,a.type==="source"?t.push(a):a.type==="target"&&n.push(a);return{source:t,target:n}}function Pd(e,t,n=Pe.Left,a=!1){const s=((t==null?void 0:t.x)??0)+e.internals.positionAbsolute.x,i=((t==null?void 0:t.y)??0)+e.internals.positionAbsolute.y,{width:o,height:l}=t??Cs(e);if(a)return{x:s+o/2,y:i+l/2};switch((t==null?void 0:t.position)??n){case Pe.Top:return{x:s+o/2,y:i};case Pe.Right:return{x:s+o,y:i+l/2};case Pe.Bottom:return{x:s+o/2,y:i+l};case Pe.Left:return{x:s,y:i+l/2}}}function I2(e,t){return e&&(t?e.find(n=>n.id===t):e[0])||null}function _w(e,t){return e?typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(a=>`${a}=${e[a]}`).join("&")}`:""}function dH(e,{id:t,defaultColor:n,defaultMarkerStart:a,defaultMarkerEnd:s}){const i=new Set;return e.reduce((o,l)=>([l.markerStart||a,l.markerEnd||s].forEach(c=>{if(c&&typeof c=="object"){const u=_w(c,t);i.has(u)||(o.push({id:u,color:c.color||n,...c}),i.add(u))}}),o),[]).sort((o,l)=>o.id.localeCompare(l.id))}const KI=1e3,uH=10,y1={nodeOrigin:[0,0],nodeExtent:Id,elevateNodesOnSelect:!0,defaults:{}},hH={...y1,checkEquality:!0};function v1(e,t){const n={...e};for(const a in t)t[a]!==void 0&&(n[a]=t[a]);return n}function fH(e,t,n){const a=v1(y1,n);for(const s of e.values())if(s.parentId)w1(s,e,t,a);else{const i=fu(s,a.nodeOrigin),o=Vl(s.extent)?s.extent:a.nodeExtent,l=go(i,o,Cs(s));s.internals.positionAbsolute=l}}function pH(e,t){if(!e.handles)return e.measured?t==null?void 0:t.internals.handleBounds:void 0;const n=[],a=[];for(const s of e.handles){const i={id:s.id,width:s.width??1,height:s.height??1,nodeId:e.id,x:s.x,y:s.y,position:s.position,type:s.type};s.type==="source"?n.push(i):s.type==="target"&&a.push(i)}return{source:n,target:a}}function Rw(e,t,n,a){var u,h;const s=v1(hH,a);let i={i:-1},o=e.length>0;const l=new Map(t),c=s!=null&&s.elevateNodesOnSelect?KI:0;t.clear(),n.clear();for(const d of e){let f=l.get(d.id);if(s.checkEquality&&d===(f==null?void 0:f.internals.userNode))t.set(d.id,f);else{const p=fu(d,s.nodeOrigin),v=Vl(d.extent)?d.extent:s.nodeExtent,x=go(p,v,Cs(d));f={...s.defaults,...d,measured:{width:(u=d.measured)==null?void 0:u.width,height:(h=d.measured)==null?void 0:h.height},internals:{positionAbsolute:x,handleBounds:pH(d,f),z:ZI(d,c),userNode:d}},t.set(d.id,f)}(f.measured===void 0||f.measured.width===void 0||f.measured.height===void 0)&&!f.hidden&&(o=!1),d.parentId&&w1(f,t,n,a,i)}return o}function mH(e,t){if(!e.parentId)return;const n=t.get(e.parentId);n?n.set(e.id,e):t.set(e.parentId,new Map([[e.id,e]]))}function w1(e,t,n,a,s){const{elevateNodesOnSelect:i,nodeOrigin:o,nodeExtent:l}=v1(y1,a),c=e.parentId,u=t.get(c);if(!u){console.warn(`Parent node ${c} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}mH(e,n),s&&!u.parentId&&u.internals.rootParentIndex===void 0&&(u.internals.rootParentIndex=++s.i,u.internals.z=u.internals.z+s.i*uH),s&&u.internals.rootParentIndex!==void 0&&(s.i=u.internals.rootParentIndex);const h=i?KI:0,{x:d,y:f,z:p}=gH(e,u,o,l,h),{positionAbsolute:v}=e.internals,x=d!==v.x||f!==v.y;(x||p!==e.internals.z)&&t.set(e.id,{...e,internals:{...e.internals,positionAbsolute:x?{x:d,y:f}:v,z:p}})}function ZI(e,t){return(tr(e.zIndex)?e.zIndex:0)+(e.selected?t:0)}function gH(e,t,n,a,s){const{x:i,y:o}=t.internals.positionAbsolute,l=Cs(e),c=fu(e,n),u=Vl(e.extent)?go(c,e.extent,l):c;let h=go({x:i+u.x,y:o+u.y},a,l);e.extent==="parent"&&(h=UI(h,l,t));const d=ZI(e,s),f=t.internals.z??0;return{x:h.x,y:h.y,z:f>=d?f+1:d}}function N1(e,t,n,a=[0,0]){var o;const s=[],i=new Map;for(const l of e){const c=t.get(l.parentId);if(!c)continue;const u=((o=i.get(l.parentId))==null?void 0:o.expandedRect)??Gl(c),h=FI(u,l.rect);i.set(l.parentId,{expandedRect:h,parent:c})}return i.size>0&&i.forEach(({expandedRect:l,parent:c},u)=>{var g;const h=c.internals.positionAbsolute,d=Cs(c),f=c.origin??a,p=l.x<h.x?Math.round(Math.abs(h.x-l.x)):0,v=l.y<h.y?Math.round(Math.abs(h.y-l.y)):0,x=Math.max(d.width,Math.round(l.width)),N=Math.max(d.height,Math.round(l.height)),b=(x-d.width)*f[0],y=(N-d.height)*f[1];(p>0||v>0||b||y)&&(s.push({id:u,type:"position",position:{x:c.position.x-p+b,y:c.position.y-v+y}}),(g=n.get(u))==null||g.forEach(w=>{e.some(S=>S.id===w.id)||s.push({id:w.id,type:"position",position:{x:w.position.x+p,y:w.position.y+v}})})),(d.width<l.width||d.height<l.height||p||v)&&s.push({id:u,type:"dimensions",setAttributes:!0,dimensions:{width:x+(p?f[0]*p-b:0),height:N+(v?f[1]*v-y:0)}})}),s}function bH(e,t,n,a,s,i){const o=a==null?void 0:a.querySelector(".xyflow__viewport");let l=!1;if(!o)return{changes:[],updatedInternals:l};const c=[],u=window.getComputedStyle(o),{m22:h}=new window.DOMMatrixReadOnly(u.transform),d=[];for(const f of e.values()){const p=t.get(f.id);if(!p)continue;if(p.hidden){t.set(p.id,{...p,internals:{...p.internals,handleBounds:void 0}}),l=!0;continue}const v=x1(f.nodeElement),x=p.measured.width!==v.width||p.measured.height!==v.height;if(!!(v.width&&v.height&&(x||!p.internals.handleBounds||f.force))){const b=f.nodeElement.getBoundingClientRect(),y=Vl(p.extent)?p.extent:i;let{positionAbsolute:g}=p.internals;p.parentId&&p.extent==="parent"?g=UI(g,v,t.get(p.parentId)):y&&(g=go(g,y,v));const w={...p,measured:v,internals:{...p.internals,positionAbsolute:g,handleBounds:{source:j2("source",f.nodeElement,b,h,p.id),target:j2("target",f.nodeElement,b,h,p.id)}}};t.set(p.id,w),p.parentId&&w1(w,t,n,{nodeOrigin:s}),l=!0,x&&(c.push({id:p.id,type:"dimensions",dimensions:v}),p.expandParent&&p.parentId&&d.push({id:p.id,parentId:p.parentId,rect:Gl(w,s)}))}}if(d.length>0){const f=N1(d,t,n,s);c.push(...f)}return{changes:c,updatedInternals:l}}async function xH({delta:e,panZoom:t,transform:n,translateExtent:a,width:s,height:i}){if(!t||!e.x&&!e.y)return Promise.resolve(!1);const o=await t.setViewportConstrained({x:n[0]+e.x,y:n[1]+e.y,zoom:n[2]},[[0,0],[s,i]],a),l=!!o&&(o.x!==n[0]||o.y!==n[1]||o.k!==n[2]);return Promise.resolve(l)}function M2(e,t,n,a,s,i){let o=s;const l=a.get(o)||new Map;a.set(o,l.set(n,t)),o=`${s}-${e}`;const c=a.get(o)||new Map;if(a.set(o,c.set(n,t)),i){o=`${s}-${e}-${i}`;const u=a.get(o)||new Map;a.set(o,u.set(n,t))}}function QI(e,t,n){e.clear(),t.clear();for(const a of n){const{source:s,target:i,sourceHandle:o=null,targetHandle:l=null}=a,c={edgeId:a.id,source:s,target:i,sourceHandle:o,targetHandle:l},u=`${s}-${o}--${i}-${l}`,h=`${i}-${l}--${s}-${o}`;M2("source",c,h,e,s,o),M2("target",c,u,e,i,l),t.set(a.id,a)}}function JI(e,t){if(!e.parentId)return!1;const n=t.get(e.parentId);return n?n.selected?!0:JI(n,t):!1}function L2(e,t,n){var s;let a=e;do{if((s=a==null?void 0:a.matches)!=null&&s.call(a,t))return!0;if(a===n)return!1;a=a==null?void 0:a.parentElement}while(a);return!1}function yH(e,t,n,a){const s=new Map;for(const[i,o]of e)if((o.selected||o.id===a)&&(!o.parentId||!JI(o,e))&&(o.draggable||t&&typeof o.draggable>"u")){const l=e.get(i);l&&s.set(i,{id:i,position:l.position||{x:0,y:0},distance:{x:n.x-l.internals.positionAbsolute.x,y:n.y-l.internals.positionAbsolute.y},extent:l.extent,parentId:l.parentId,origin:l.origin,expandParent:l.expandParent,internals:{positionAbsolute:l.internals.positionAbsolute||{x:0,y:0}},measured:{width:l.measured.width??0,height:l.measured.height??0}})}return s}function Lm({nodeId:e,dragItems:t,nodeLookup:n,dragging:a=!0}){var o,l,c;const s=[];for(const[u,h]of t){const d=(o=n.get(u))==null?void 0:o.internals.userNode;d&&s.push({...d,position:h.position,dragging:a})}if(!e)return[s[0],s];const i=(l=n.get(e))==null?void 0:l.internals.userNode;return[i?{...i,position:((c=t.get(e))==null?void 0:c.position)||i.position,dragging:a}:s[0],s]}function vH({dragItems:e,snapGrid:t,x:n,y:a}){const s=e.values().next().value;if(!s)return null;const i={x:n-s.distance.x,y:a-s.distance.y},o=mu(i,t);return{x:o.x-i.x,y:o.y-i.y}}function wH({onNodeMouseDown:e,getStoreItems:t,onDragStart:n,onDrag:a,onDragStop:s}){let i={x:null,y:null},o=0,l=new Map,c=!1,u={x:0,y:0},h=null,d=!1,f=null,p=!1,v=!1,x=null;function N({noDragClassName:y,handleSelector:g,domNode:w,isSelectable:S,nodeId:C,nodeClickDistance:T=0}){f=pa(w);function E({x:I,y:F}){const{nodeLookup:j,nodeExtent:U,snapGrid:_,snapToGrid:M,nodeOrigin:A,onNodeDrag:D,onSelectionDrag:B,onError:G,updateNodePositions:L}=t();i={x:I,y:F};let q=!1;const X=l.size>1,K=X&&U?jw(pu(l)):null,ne=X&&M?vH({dragItems:l,snapGrid:_,x:I,y:F}):null;for(const[te,ee]of l){if(!j.has(te))continue;let ae={x:I-ee.distance.x,y:F-ee.distance.y};M&&(ae=ne?{x:Math.round(ae.x+ne.x),y:Math.round(ae.y+ne.y)}:mu(ae,_));let ge=null;if(X&&U&&!ee.extent&&K){const{positionAbsolute:me}=ee.internals,Re=me.x-K.x+U[0][0],Me=me.x+ee.measured.width-K.x2+U[1][0],Ue=me.y-K.y+U[0][1],$e=me.y+ee.measured.height-K.y2+U[1][1];ge=[[Re,Ue],[Me,$e]]}const{position:se,positionAbsolute:fe}=LI({nodeId:te,nextPosition:ae,nodeLookup:j,nodeExtent:ge||U,nodeOrigin:A,onError:G});q=q||ee.position.x!==se.x||ee.position.y!==se.y,ee.position=se,ee.internals.positionAbsolute=fe}if(v=v||q,!!q&&(L(l,!0),x&&(a||D||!C&&B))){const[te,ee]=Lm({nodeId:C,dragItems:l,nodeLookup:j});a==null||a(x,l,te,ee),D==null||D(x,te,ee),C||B==null||B(x,ee)}}async function k(){if(!h)return;const{transform:I,panBy:F,autoPanSpeed:j,autoPanOnNodeDrag:U}=t();if(!U){c=!1,cancelAnimationFrame(o);return}const[_,M]=PI(u,h,j);(_!==0||M!==0)&&(i.x=(i.x??0)-_/I[2],i.y=(i.y??0)-M/I[2],await F({x:_,y:M})&&E(i)),o=requestAnimationFrame(k)}function O(I){var X;const{nodeLookup:F,multiSelectionActive:j,nodesDraggable:U,transform:_,snapGrid:M,snapToGrid:A,selectNodesOnDrag:D,onNodeDragStart:B,onSelectionDragStart:G,unselectNodesAndEdges:L}=t();d=!0,(!D||!S)&&!j&&C&&((X=F.get(C))!=null&&X.selected||L()),S&&D&&C&&(e==null||e(C));const q=dd(I.sourceEvent,{transform:_,snapGrid:M,snapToGrid:A,containerBounds:h});if(i=q,l=yH(F,U,q,C),l.size>0&&(n||B||!C&&G)){const[K,ne]=Lm({nodeId:C,dragItems:l,nodeLookup:F});n==null||n(I.sourceEvent,l,K,ne),B==null||B(I.sourceEvent,K,ne),C||G==null||G(I.sourceEvent,ne)}}const R=mI().clickDistance(T).on("start",I=>{const{domNode:F,nodeDragThreshold:j,transform:U,snapGrid:_,snapToGrid:M}=t();h=(F==null?void 0:F.getBoundingClientRect())||null,p=!1,v=!1,x=I.sourceEvent,j===0&&O(I),i=dd(I.sourceEvent,{transform:U,snapGrid:_,snapToGrid:M,containerBounds:h}),u=nr(I.sourceEvent,h)}).on("drag",I=>{const{autoPanOnNodeDrag:F,transform:j,snapGrid:U,snapToGrid:_,nodeDragThreshold:M,nodeLookup:A}=t(),D=dd(I.sourceEvent,{transform:j,snapGrid:U,snapToGrid:_,containerBounds:h});if(x=I.sourceEvent,(I.sourceEvent.type==="touchmove"&&I.sourceEvent.touches.length>1||C&&!A.has(C))&&(p=!0),!p){if(!c&&F&&d&&(c=!0,k()),!d){const B=nr(I.sourceEvent,h),G=B.x-u.x,L=B.y-u.y;Math.sqrt(G*G+L*L)>M&&O(I)}(i.x!==D.xSnapped||i.y!==D.ySnapped)&&l&&d&&(u=nr(I.sourceEvent,h),E(D))}}).on("end",I=>{if(!(!d||p)&&(c=!1,d=!1,cancelAnimationFrame(o),l.size>0)){const{nodeLookup:F,updateNodePositions:j,onNodeDragStop:U,onSelectionDragStop:_}=t();if(v&&(j(l,!1),v=!1),s||U||!C&&_){const[M,A]=Lm({nodeId:C,dragItems:l,nodeLookup:F,dragging:!1});s==null||s(I.sourceEvent,l,M,A),U==null||U(I.sourceEvent,M,A),C||_==null||_(I.sourceEvent,A)}}}).filter(I=>{const F=I.target;return!I.button&&(!y||!L2(F,`.${y}`,w))&&(!g||L2(F,g,w))});f.call(R)}function b(){f==null||f.on(".drag",null)}return{update:N,destroy:b}}function NH(e,t,n){const a=[],s={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(const i of t.values())Ld(s,Gl(i))>0&&a.push(i);return a}const SH=250;function EH(e,t,n,a){var l,c;let s=[],i=1/0;const o=NH(e,n,t+SH);for(const u of o){const h=[...((l=u.internals.handleBounds)==null?void 0:l.source)??[],...((c=u.internals.handleBounds)==null?void 0:c.target)??[]];for(const d of h){if(a.nodeId===d.nodeId&&a.type===d.type&&a.id===d.id)continue;const{x:f,y:p}=Pd(u,d,d.position,!0),v=Math.sqrt(Math.pow(f-e.x,2)+Math.pow(p-e.y,2));v>t||(v<i?(s=[{...d,x:f,y:p}],i=v):v===i&&s.push({...d,x:f,y:p}))}}if(!s.length)return null;if(s.length>1){const u=a.type==="source"?"target":"source";return s.find(h=>h.type===u)??s[0]}return s[0]}function eM(e,t,n,a,s,i=!1){var u,h,d;const o=a.get(e);if(!o)return null;const l=s==="strict"?(u=o.internals.handleBounds)==null?void 0:u[t]:[...((h=o.internals.handleBounds)==null?void 0:h.source)??[],...((d=o.internals.handleBounds)==null?void 0:d.target)??[]],c=(n?l==null?void 0:l.find(f=>f.id===n):l==null?void 0:l[0])??null;return c&&i?{...c,...Pd(o,c,c.position,!0)}:c}function tM(e,t){return e||(t!=null&&t.classList.contains("target")?"target":t!=null&&t.classList.contains("source")?"source":null)}function TH(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}const nM=()=>!0;function CH(e,{connectionMode:t,connectionRadius:n,handleId:a,nodeId:s,edgeUpdaterType:i,isTarget:o,domNode:l,nodeLookup:c,lib:u,autoPanOnConnect:h,flowId:d,panBy:f,cancelConnection:p,onConnectStart:v,onConnect:x,onConnectEnd:N,isValidConnection:b=nM,onReconnectEnd:y,updateConnection:g,getTransform:w,getFromHandle:S,autoPanSpeed:C,dragThreshold:T=1,handleDomNode:E}){const k=$I(e.target);let O=0,R;const{x:I,y:F}=nr(e),j=tM(i,E),U=l==null?void 0:l.getBoundingClientRect();let _=!1;if(!U||!j)return;const M=eM(s,j,a,c,t);if(!M)return;let A=nr(e,U),D=!1,B=null,G=!1,L=null;function q(){if(!h||!U)return;const[se,fe]=PI(A,U,C);f({x:se,y:fe}),O=requestAnimationFrame(q)}const X={...M,nodeId:s,type:j,position:M.position},K=c.get(s);let te={inProgress:!0,isValid:null,from:Pd(K,X,Pe.Left,!0),fromHandle:X,fromPosition:X.position,fromNode:K,to:A,toHandle:null,toPosition:E2[X.position],toNode:null,pointer:A};function ee(){_=!0,g(te),v==null||v(e,{nodeId:s,handleId:a,handleType:j})}T===0&&ee();function ae(se){if(!_){const{x:Me,y:Ue}=nr(se),$e=Me-I,pt=Ue-F;if(!($e*$e+pt*pt>T*T))return;ee()}if(!S()||!X){ge(se);return}const fe=w();A=nr(se,U),R=EH(gu(A,fe,!1,[1,1]),n,c,X),D||(q(),D=!0);const me=aM(se,{handle:R,connectionMode:t,fromNodeId:s,fromHandleId:a,fromType:o?"target":"source",isValidConnection:b,doc:k,lib:u,flowId:d,nodeLookup:c});L=me.handleDomNode,B=me.connection,G=TH(!!R,me.isValid);const Re={...te,isValid:G,to:me.toHandle&&G?jf({x:me.toHandle.x,y:me.toHandle.y},fe):A,toHandle:me.toHandle,toPosition:G&&me.toHandle?me.toHandle.position:E2[X.position],toNode:me.toHandle?c.get(me.toHandle.nodeId):null,pointer:A};g(Re),te=Re}function ge(se){if(!("touches"in se&&se.touches.length>0)){if(_){(R||L)&&B&&G&&(x==null||x(B));const{inProgress:fe,...me}=te,Re={...me,toPosition:te.toHandle?te.toPosition:null};N==null||N(se,Re),i&&(y==null||y(se,Re))}p(),cancelAnimationFrame(O),D=!1,G=!1,B=null,L=null,k.removeEventListener("mousemove",ae),k.removeEventListener("mouseup",ge),k.removeEventListener("touchmove",ae),k.removeEventListener("touchend",ge)}}k.addEventListener("mousemove",ae),k.addEventListener("mouseup",ge),k.addEventListener("touchmove",ae),k.addEventListener("touchend",ge)}function aM(e,{handle:t,connectionMode:n,fromNodeId:a,fromHandleId:s,fromType:i,doc:o,lib:l,flowId:c,isValidConnection:u=nM,nodeLookup:h}){const d=i==="target",f=t?o.querySelector(`.${l}-flow__handle[data-id="${c}-${t==null?void 0:t.nodeId}-${t==null?void 0:t.id}-${t==null?void 0:t.type}"]`):null,{x:p,y:v}=nr(e),x=o.elementFromPoint(p,v),N=x!=null&&x.classList.contains(`${l}-flow__handle`)?x:f,b={handleDomNode:N,isValid:!1,connection:null,toHandle:null};if(N){const y=tM(void 0,N),g=N.getAttribute("data-nodeid"),w=N.getAttribute("data-handleid"),S=N.classList.contains("connectable"),C=N.classList.contains("connectableend");if(!g||!y)return b;const T={source:d?g:a,sourceHandle:d?w:s,target:d?a:g,targetHandle:d?s:w};b.connection=T;const k=S&&C&&(n===Hl.Strict?d&&y==="source"||!d&&y==="target":g!==a||w!==s);b.isValid=k&&u(T),b.toHandle=eM(g,y,w,h,n,!0)}return b}const Ow={onPointerDown:CH,isValid:aM};function AH({domNode:e,panZoom:t,getTransform:n,getViewScale:a}){const s=pa(e);function i({translateExtent:l,width:c,height:u,zoomStep:h=1,pannable:d=!0,zoomable:f=!0,inversePan:p=!1}){const v=g=>{if(g.sourceEvent.type!=="wheel"||!t)return;const w=n(),S=g.sourceEvent.ctrlKey&&Ud()?10:1,C=-g.sourceEvent.deltaY*(g.sourceEvent.deltaMode===1?.05:g.sourceEvent.deltaMode?1:.002)*h,T=w[2]*Math.pow(2,C*S);t.scaleTo(T)};let x=[0,0];const N=g=>{(g.sourceEvent.type==="mousedown"||g.sourceEvent.type==="touchstart")&&(x=[g.sourceEvent.clientX??g.sourceEvent.touches[0].clientX,g.sourceEvent.clientY??g.sourceEvent.touches[0].clientY])},b=g=>{const w=n();if(g.sourceEvent.type!=="mousemove"&&g.sourceEvent.type!=="touchmove"||!t)return;const S=[g.sourceEvent.clientX??g.sourceEvent.touches[0].clientX,g.sourceEvent.clientY??g.sourceEvent.touches[0].clientY],C=[S[0]-x[0],S[1]-x[1]];x=S;const T=a()*Math.max(w[2],Math.log(w[2]))*(p?-1:1),E={x:w[0]-C[0]*T,y:w[1]-C[1]*T},k=[[0,0],[c,u]];t.setViewportConstrained({x:E.x,y:E.y,zoom:w[2]},k,l)},y=_I().on("start",N).on("zoom",d?b:null).on("zoom.wheel",f?v:null);s.call(y,{})}function o(){s.on("zoom",null)}return{update:i,destroy:o,pointer:Ja}}const yp=e=>({x:e.x,y:e.y,zoom:e.k}),Um=({x:e,y:t,zoom:n})=>gp.translate(e,t).scale(n),ul=(e,t)=>e.target.closest(`.${t}`),rM=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),jH=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,Pm=(e,t=0,n=jH,a=()=>{})=>{const s=typeof t=="number"&&t>0;return s||a(),s?e.transition().duration(t).ease(n).on("end",a):e},sM=e=>{const t=e.ctrlKey&&Ud()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t};function kH({zoomPanValues:e,noWheelClassName:t,d3Selection:n,d3Zoom:a,panOnScrollMode:s,panOnScrollSpeed:i,zoomOnPinch:o,onPanZoomStart:l,onPanZoom:c,onPanZoomEnd:u}){return h=>{if(ul(h,t))return h.ctrlKey&&h.preventDefault(),!1;h.preventDefault(),h.stopImmediatePropagation();const d=n.property("__zoom").k||1;if(h.ctrlKey&&o){const N=Ja(h),b=sM(h),y=d*Math.pow(2,b);a.scaleTo(n,y,N,h);return}const f=h.deltaMode===1?20:1;let p=s===oo.Vertical?0:h.deltaX*f,v=s===oo.Horizontal?0:h.deltaY*f;!Ud()&&h.shiftKey&&s!==oo.Vertical&&(p=h.deltaY*f,v=0),a.translateBy(n,-(p/d)*i,-(v/d)*i,{internal:!0});const x=yp(n.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?(c==null||c(h,x),e.panScrollTimeout=setTimeout(()=>{u==null||u(h,x),e.isPanScrolling=!1},150)):(e.isPanScrolling=!0,l==null||l(h,x))}}function _H({noWheelClassName:e,preventScrolling:t,d3ZoomHandler:n}){return function(a,s){const i=a.type==="wheel",o=!t&&i&&!a.ctrlKey,l=ul(a,e);if(a.ctrlKey&&i&&l&&a.preventDefault(),o||l)return null;a.preventDefault(),n.call(this,a,s)}}function RH({zoomPanValues:e,onDraggingChange:t,onPanZoomStart:n}){return a=>{var i,o,l;if((i=a.sourceEvent)!=null&&i.internal)return;const s=yp(a.transform);e.mouseButton=((o=a.sourceEvent)==null?void 0:o.button)||0,e.isZoomingOrPanning=!0,e.prevViewport=s,((l=a.sourceEvent)==null?void 0:l.type)==="mousedown"&&t(!0),n&&(n==null||n(a.sourceEvent,s))}}function OH({zoomPanValues:e,panOnDrag:t,onPaneContextMenu:n,onTransformChange:a,onPanZoom:s}){return i=>{var o,l;e.usedRightMouseButton=!!(n&&rM(t,e.mouseButton??0)),(o=i.sourceEvent)!=null&&o.sync||a([i.transform.x,i.transform.y,i.transform.k]),s&&!((l=i.sourceEvent)!=null&&l.internal)&&(s==null||s(i.sourceEvent,yp(i.transform)))}}function DH({zoomPanValues:e,panOnDrag:t,panOnScroll:n,onDraggingChange:a,onPanZoomEnd:s,onPaneContextMenu:i}){return o=>{var l;if(!((l=o.sourceEvent)!=null&&l.internal)&&(e.isZoomingOrPanning=!1,i&&rM(t,e.mouseButton??0)&&!e.usedRightMouseButton&&o.sourceEvent&&i(o.sourceEvent),e.usedRightMouseButton=!1,a(!1),s)){const c=yp(o.transform);e.prevViewport=c,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{s==null||s(o.sourceEvent,c)},n?150:0)}}}function IH({zoomActivationKeyPressed:e,zoomOnScroll:t,zoomOnPinch:n,panOnDrag:a,panOnScroll:s,zoomOnDoubleClick:i,userSelectionActive:o,noWheelClassName:l,noPanClassName:c,lib:u,connectionInProgress:h}){return d=>{var N;const f=e||t,p=n&&d.ctrlKey,v=d.type==="wheel";if(d.button===1&&d.type==="mousedown"&&(ul(d,`${u}-flow__node`)||ul(d,`${u}-flow__edge`)))return!0;if(!a&&!f&&!s&&!i&&!n||o||h&&!v||ul(d,l)&&v||ul(d,c)&&(!v||s&&v&&!e)||!n&&d.ctrlKey&&v)return!1;if(!n&&d.type==="touchstart"&&((N=d.touches)==null?void 0:N.length)>1)return d.preventDefault(),!1;if(!f&&!s&&!p&&v||!a&&(d.type==="mousedown"||d.type==="touchstart")||Array.isArray(a)&&!a.includes(d.button)&&d.type==="mousedown")return!1;const x=Array.isArray(a)&&a.includes(d.button)||!d.button||d.button<=1;return(!d.ctrlKey||v)&&x}}function MH({domNode:e,minZoom:t,maxZoom:n,translateExtent:a,viewport:s,onPanZoom:i,onPanZoomStart:o,onPanZoomEnd:l,onDraggingChange:c}){const u={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},h=e.getBoundingClientRect(),d=_I().scaleExtent([t,n]).translateExtent(a),f=pa(e).call(d);y({x:s.x,y:s.y,zoom:ql(s.zoom,t,n)},[[0,0],[h.width,h.height]],a);const p=f.on("wheel.zoom"),v=f.on("dblclick.zoom");d.wheelDelta(sM);function x(R,I){return f?new Promise(F=>{d==null||d.interpolate((I==null?void 0:I.interpolate)==="linear"?cd:kh).transform(Pm(f,I==null?void 0:I.duration,I==null?void 0:I.ease,()=>F(!0)),R)}):Promise.resolve(!1)}function N({noWheelClassName:R,noPanClassName:I,onPaneContextMenu:F,userSelectionActive:j,panOnScroll:U,panOnDrag:_,panOnScrollMode:M,panOnScrollSpeed:A,preventScrolling:D,zoomOnPinch:B,zoomOnScroll:G,zoomOnDoubleClick:L,zoomActivationKeyPressed:q,lib:X,onTransformChange:K,connectionInProgress:ne,paneClickDistance:te,selectionOnDrag:ee}){j&&!u.isZoomingOrPanning&&b();const ae=U&&!q&&!j;d.clickDistance(ee?1/0:!tr(te)||te<0?0:te);const ge=ae?kH({zoomPanValues:u,noWheelClassName:R,d3Selection:f,d3Zoom:d,panOnScrollMode:M,panOnScrollSpeed:A,zoomOnPinch:B,onPanZoomStart:o,onPanZoom:i,onPanZoomEnd:l}):_H({noWheelClassName:R,preventScrolling:D,d3ZoomHandler:p});if(f.on("wheel.zoom",ge,{passive:!1}),!j){const fe=RH({zoomPanValues:u,onDraggingChange:c,onPanZoomStart:o});d.on("start",fe);const me=OH({zoomPanValues:u,panOnDrag:_,onPaneContextMenu:!!F,onPanZoom:i,onTransformChange:K});d.on("zoom",me);const Re=DH({zoomPanValues:u,panOnDrag:_,panOnScroll:U,onPaneContextMenu:F,onPanZoomEnd:l,onDraggingChange:c});d.on("end",Re)}const se=IH({zoomActivationKeyPressed:q,panOnDrag:_,zoomOnScroll:G,panOnScroll:U,zoomOnDoubleClick:L,zoomOnPinch:B,userSelectionActive:j,noPanClassName:I,noWheelClassName:R,lib:X,connectionInProgress:ne});d.filter(se),L?f.on("dblclick.zoom",v):f.on("dblclick.zoom",null)}function b(){d.on("zoom",null)}async function y(R,I,F){const j=Um(R),U=d==null?void 0:d.constrain()(j,I,F);return U&&await x(U),new Promise(_=>_(U))}async function g(R,I){const F=Um(R);return await x(F,I),new Promise(j=>j(F))}function w(R){if(f){const I=Um(R),F=f.property("__zoom");(F.k!==R.zoom||F.x!==R.x||F.y!==R.y)&&(d==null||d.transform(f,I,null,{sync:!0}))}}function S(){const R=f?kI(f.node()):{x:0,y:0,k:1};return{x:R.x,y:R.y,zoom:R.k}}function C(R,I){return f?new Promise(F=>{d==null||d.interpolate((I==null?void 0:I.interpolate)==="linear"?cd:kh).scaleTo(Pm(f,I==null?void 0:I.duration,I==null?void 0:I.ease,()=>F(!0)),R)}):Promise.resolve(!1)}function T(R,I){return f?new Promise(F=>{d==null||d.interpolate((I==null?void 0:I.interpolate)==="linear"?cd:kh).scaleBy(Pm(f,I==null?void 0:I.duration,I==null?void 0:I.ease,()=>F(!0)),R)}):Promise.resolve(!1)}function E(R){d==null||d.scaleExtent(R)}function k(R){d==null||d.translateExtent(R)}function O(R){const I=!tr(R)||R<0?0:R;d==null||d.clickDistance(I)}return{update:N,destroy:b,setViewport:g,setViewportConstrained:y,getViewport:S,scaleTo:C,scaleBy:T,setScaleExtent:E,setTranslateExtent:k,syncViewport:w,setClickDistance:O}}var Yl;(function(e){e.Line="line",e.Handle="handle"})(Yl||(Yl={}));function LH({width:e,prevWidth:t,height:n,prevHeight:a,affectsX:s,affectsY:i}){const o=e-t,l=n-a,c=[o>0?1:o<0?-1:0,l>0?1:l<0?-1:0];return o&&s&&(c[0]=c[0]*-1),l&&i&&(c[1]=c[1]*-1),c}function U2(e){const t=e.includes("right")||e.includes("left"),n=e.includes("bottom")||e.includes("top"),a=e.includes("left"),s=e.includes("top");return{isHorizontal:t,isVertical:n,affectsX:a,affectsY:s}}function Ps(e,t){return Math.max(0,t-e)}function Fs(e,t){return Math.max(0,e-t)}function Zu(e,t,n){return Math.max(0,t-e,e-n)}function P2(e,t){return e?!t:t}function UH(e,t,n,a,s,i,o,l){let{affectsX:c,affectsY:u}=t;const{isHorizontal:h,isVertical:d}=t,f=h&&d,{xSnapped:p,ySnapped:v}=n,{minWidth:x,maxWidth:N,minHeight:b,maxHeight:y}=a,{x:g,y:w,width:S,height:C,aspectRatio:T}=e;let E=Math.floor(h?p-e.pointerX:0),k=Math.floor(d?v-e.pointerY:0);const O=S+(c?-E:E),R=C+(u?-k:k),I=-i[0]*S,F=-i[1]*C;let j=Zu(O,x,N),U=Zu(R,b,y);if(o){let A=0,D=0;c&&E<0?A=Ps(g+E+I,o[0][0]):!c&&E>0&&(A=Fs(g+O+I,o[1][0])),u&&k<0?D=Ps(w+k+F,o[0][1]):!u&&k>0&&(D=Fs(w+R+F,o[1][1])),j=Math.max(j,A),U=Math.max(U,D)}if(l){let A=0,D=0;c&&E>0?A=Fs(g+E,l[0][0]):!c&&E<0&&(A=Ps(g+O,l[1][0])),u&&k>0?D=Fs(w+k,l[0][1]):!u&&k<0&&(D=Ps(w+R,l[1][1])),j=Math.max(j,A),U=Math.max(U,D)}if(s){if(h){const A=Zu(O/T,b,y)*T;if(j=Math.max(j,A),o){let D=0;!c&&!u||c&&!u&&f?D=Fs(w+F+O/T,o[1][1])*T:D=Ps(w+F+(c?E:-E)/T,o[0][1])*T,j=Math.max(j,D)}if(l){let D=0;!c&&!u||c&&!u&&f?D=Ps(w+O/T,l[1][1])*T:D=Fs(w+(c?E:-E)/T,l[0][1])*T,j=Math.max(j,D)}}if(d){const A=Zu(R*T,x,N)/T;if(U=Math.max(U,A),o){let D=0;!c&&!u||u&&!c&&f?D=Fs(g+R*T+I,o[1][0])/T:D=Ps(g+(u?k:-k)*T+I,o[0][0])/T,U=Math.max(U,D)}if(l){let D=0;!c&&!u||u&&!c&&f?D=Ps(g+R*T,l[1][0])/T:D=Fs(g+(u?k:-k)*T,l[0][0])/T,U=Math.max(U,D)}}}k=k+(k<0?U:-U),E=E+(E<0?j:-j),s&&(f?O>R*T?k=(P2(c,u)?-E:E)/T:E=(P2(c,u)?-k:k)*T:h?(k=E/T,u=c):(E=k*T,c=u));const _=c?g+E:g,M=u?w+k:w;return{width:S+(c?-E:E),height:C+(u?-k:k),x:i[0]*E*(c?-1:1)+_,y:i[1]*k*(u?-1:1)+M}}const iM={width:0,height:0,x:0,y:0},PH={...iM,pointerX:0,pointerY:0,aspectRatio:1};function FH(e){return[[0,0],[e.measured.width,e.measured.height]]}function BH(e,t,n){const a=t.position.x+e.position.x,s=t.position.y+e.position.y,i=e.measured.width??0,o=e.measured.height??0,l=n[0]*i,c=n[1]*o;return[[a-l,s-c],[a+i-l,s+o-c]]}function zH({domNode:e,nodeId:t,getStoreItems:n,onChange:a,onEnd:s}){const i=pa(e);let o={controlDirection:U2("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function l({controlPosition:u,boundaries:h,keepAspectRatio:d,resizeDirection:f,onResizeStart:p,onResize:v,onResizeEnd:x,shouldResize:N}){let b={...iM},y={...PH};o={boundaries:h,resizeDirection:f,keepAspectRatio:d,controlDirection:U2(u)};let g,w=null,S=[],C,T,E,k=!1;const O=mI().on("start",R=>{const{nodeLookup:I,transform:F,snapGrid:j,snapToGrid:U,nodeOrigin:_,paneDomNode:M}=n();if(g=I.get(t),!g)return;w=(M==null?void 0:M.getBoundingClientRect())??null;const{xSnapped:A,ySnapped:D}=dd(R.sourceEvent,{transform:F,snapGrid:j,snapToGrid:U,containerBounds:w});b={width:g.measured.width??0,height:g.measured.height??0,x:g.position.x??0,y:g.position.y??0},y={...b,pointerX:A,pointerY:D,aspectRatio:b.width/b.height},C=void 0,g.parentId&&(g.extent==="parent"||g.expandParent)&&(C=I.get(g.parentId),T=C&&g.extent==="parent"?FH(C):void 0),S=[],E=void 0;for(const[B,G]of I)if(G.parentId===t&&(S.push({id:B,position:{...G.position},extent:G.extent}),G.extent==="parent"||G.expandParent)){const L=BH(G,g,G.origin??_);E?E=[[Math.min(L[0][0],E[0][0]),Math.min(L[0][1],E[0][1])],[Math.max(L[1][0],E[1][0]),Math.max(L[1][1],E[1][1])]]:E=L}p==null||p(R,{...b})}).on("drag",R=>{const{transform:I,snapGrid:F,snapToGrid:j,nodeOrigin:U}=n(),_=dd(R.sourceEvent,{transform:I,snapGrid:F,snapToGrid:j,containerBounds:w}),M=[];if(!g)return;const{x:A,y:D,width:B,height:G}=b,L={},q=g.origin??U,{width:X,height:K,x:ne,y:te}=UH(y,o.controlDirection,_,o.boundaries,o.keepAspectRatio,q,T,E),ee=X!==B,ae=K!==G,ge=ne!==A&&ee,se=te!==D&&ae;if(!ge&&!se&&!ee&&!ae)return;if((ge||se||q[0]===1||q[1]===1)&&(L.x=ge?ne:b.x,L.y=se?te:b.y,b.x=L.x,b.y=L.y,S.length>0)){const Me=ne-A,Ue=te-D;for(const $e of S)$e.position={x:$e.position.x-Me+q[0]*(X-B),y:$e.position.y-Ue+q[1]*(K-G)},M.push($e)}if((ee||ae)&&(L.width=ee&&(!o.resizeDirection||o.resizeDirection==="horizontal")?X:b.width,L.height=ae&&(!o.resizeDirection||o.resizeDirection==="vertical")?K:b.height,b.width=L.width,b.height=L.height),C&&g.expandParent){const Me=q[0]*(L.width??0);L.x&&L.x<Me&&(b.x=Me,y.x=y.x-(L.x-Me));const Ue=q[1]*(L.height??0);L.y&&L.y<Ue&&(b.y=Ue,y.y=y.y-(L.y-Ue))}const fe=LH({width:b.width,prevWidth:B,height:b.height,prevHeight:G,affectsX:o.controlDirection.affectsX,affectsY:o.controlDirection.affectsY}),me={...b,direction:fe};(N==null?void 0:N(R,me))!==!1&&(k=!0,v==null||v(R,me),a(L,M))}).on("end",R=>{k&&(x==null||x(R,{...b}),s==null||s({...b}),k=!1)});i.call(O)}function c(){i.on(".drag",null)}return{update:l,destroy:c}}var oM={exports:{}},lM={},cM={exports:{}},dM={};/**
|
|
77
77
|
* @license React
|
|
78
78
|
* use-sync-external-store-shim.production.js
|
|
79
79
|
*
|
|
@@ -506,7 +506,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
|
|
|
506
506
|
}
|
|
507
507
|
`;document.head.appendChild(g5);const Te=m.forwardRef(({className:e,type:t,...n},a)=>r.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:a,...n}));Te.displayName="Input";const pe=m.forwardRef(({className:e,...t},n)=>r.jsx("label",{className:`text-sm font-light text-white ${e}`,ref:n,...t}));pe.displayName="Label";function b5({currentPage:e,totalPages:t,onPageChange:n,totalItems:a,startIndex:s,endIndex:i}){const o=()=>{const u=[],h=[];for(let d=Math.max(2,e-2);d<=Math.min(t-1,e+2);d++)u.push(d);return e-2>2?h.push(1,"..."):h.push(1),h.push(...u),e+2<t-1?h.push("...",t):t>1&&h.push(t),h};if(t<=1)return null;const l=o();return r.jsxs("div",{className:"flex items-center justify-between mt-6",children:[r.jsxs("div",{className:"text-sm text-gray-400",children:["Showing ",s+1," to ",Math.min(i,a)," of ",a," items"]}),r.jsxs("div",{className:"flex items-center space-x-1",children:[r.jsxs($,{variant:"outline",size:"sm",onClick:()=>n(e-1),disabled:e===1,className:"border border-dashed border-white/20 text-white hover:bg-white/10 rounded-none",children:[r.jsx(VM,{className:"w-4 h-4"}),"Previous"]}),l.map((c,u)=>{if(c==="...")return r.jsx($,{variant:"outline",size:"sm",disabled:!0,className:"border border-dashed border-white/20 text-white rounded-none",children:r.jsx(HG,{className:"w-4 h-4"})},`dots-${u}`);const h=c,d=e===h;return r.jsx($,{variant:d?"default":"outline",size:"sm",onClick:()=>n(h),className:d?"bg-white text-black rounded-none":"border border-dashed border-white/20 text-white hover:bg-white/10 rounded-none",children:h},h)}),r.jsxs($,{variant:"outline",size:"sm",onClick:()=>n(e+1),disabled:e===t,className:"border border-dashed border-white/20 text-white hover:bg-white/10 rounded-none",children:["Next",r.jsx(T1,{className:"w-4 h-4"})]})]})]})}const Tu=m.createContext({isOpen:!1,setIsOpen:()=>{}}),Ua=m.forwardRef(({className:e,value:t,onValueChange:n,children:a,...s},i)=>{const[o,l]=m.useState(!1);return r.jsx(Tu.Provider,{value:{value:t,onValueChange:n,isOpen:o,setIsOpen:l},children:r.jsx("div",{ref:i,className:`relative ${e}`,...s,children:a})})});Ua.displayName="Select";const Pa=m.forwardRef(({className:e,children:t,...n},a)=>{const{isOpen:s,setIsOpen:i}=m.useContext(Tu);return r.jsxs("button",{ref:a,type:"button",className:`flex h-10 w-full items-center justify-between border 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(!s),...n,children:[t,r.jsx(bu,{className:`h-4 w-4 text-gray-400 transition-transform ${s?"rotate-180":""}`})]})});Pa.displayName="SelectTrigger";const yi=m.forwardRef(({className:e,placeholder:t,...n},a)=>{const{value:s}=m.useContext(Tu);return r.jsx("span",{ref:a,className:`text-sm text-white ${e}`,...n,children:s||t})});yi.displayName="SelectValue";const Fa=m.forwardRef(({className:e,children:t,...n},a)=>{const{isOpen:s}=m.useContext(Tu);return s?r.jsx("div",{ref:a,className:`absolute top-full left-0 right-0 z-[100] mt-1 border border-dashed border-white/20 bg-black rounded-none shadow-lg max-h-60 overflow-y-auto ${e}`,...n,children:t}):null});Fa.displayName="SelectContent";const Ve=m.forwardRef(({className:e,children:t,value:n,...a},s)=>{const{onValueChange:i,setIsOpen:o}=m.useContext(Tu);return r.jsx("div",{ref:s,className:`px-3 py-2 text-sm text-white hover:bg-white/10 cursor-pointer ${e}`,onClick:()=>{i==null||i(n),o(!1)},...a,children:t})});Ve.displayName="SelectItem";function x5(){const e=ur(),{counts:t,refetchCounts:n}=Mp(),[a,s]=m.useState([]),[i,o]=m.useState(!0),[l,c]=m.useState(null),[u,h]=m.useState(""),[d,f]=m.useState("all"),[p,v]=m.useState([]),[x,N]=m.useState(1),[b]=m.useState(20),[y,g]=m.useState(!1),[w,S]=m.useState(!1),[C,T]=m.useState(!1),[E,k]=m.useState(!1),[O,R]=m.useState(!1),[I,F]=m.useState(!1),[j,U]=m.useState(null),[_,M]=m.useState([]),[A,D]=m.useState(!1),[B,G]=m.useState({name:"",slug:""}),[L,q]=m.useState({name:"",slug:""});m.useEffect(()=>{ae();const re=setInterval(()=>{l!=null&&l.enabled||ae()},2e3);return()=>clearInterval(re)},[l==null?void 0:l.enabled]);const X=re=>re.toLowerCase().replace(/\s+/g,"-").replace(/[^a-z0-9-]/g,"").replace(/-+/g,"-").replace(/^-|-$/g,""),K=re=>{const we=X(re);G({name:re,slug:we})},ne=re=>{G(we=>({...we,slug:X(re)}))},te=re=>{const we=X(re);q({name:re,slug:we})},ee=re=>{q(we=>({...we,slug:X(re)}))},ae=async()=>{try{const we=await(await fetch("/api/plugins")).json(),Be=(we==null?void 0:we.plugins).find(V=>V.id==="organization");c({enabled:!!Be,availablePlugins:(we==null?void 0:we.plugins).map(V=>V.id),configPath:we.configPath,organizationPlugin:(we==null?void 0:we.plugins).find(V=>V.id==="organization")}),Be?await ge():o(!1)}catch(re){console.error("Failed to check plugin status:",re),c({enabled:!1,error:"Failed to check plugin status"}),o(!1)}},ge=async()=>{try{const we=await(await fetch("/api/organizations?limit=10000")).json();console.log({lenght:we.organizations.length}),s(we.organizations||[])}catch(re){console.error("Failed to fetch organizations:",re),H.error("Failed to fetch organizations")}finally{o(!1)}},se=async re=>{M([]),D(!0),M([{id:"start",type:"info",message:`Starting organization seeding process for ${re} organizations...`,timestamp:new Date}]);try{const Be=await(await fetch("/api/seed/organizations",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({count:re})})).json();if(Be.success){const V=Be.results.map((he,xe)=>he.success?{id:`org-${xe}`,type:"progress",message:`Creating organization: ${he.organization.name} (${he.organization.slug})`,timestamp:new Date,status:"completed"}:{id:`org-${xe}`,type:"error",message:`Failed to create organization ${xe+1}: ${he.error}`,timestamp:new Date});M(he=>[...he,...V]);const le=Be.results.filter(he=>he.success).length;M(he=>[...he,{id:"complete",type:"success",message:`✅ Seeding completed! Created ${le}/${re} organizations successfully`,timestamp:new Date}]),await ge(),await n()}else M(V=>[...V,{id:"error",type:"error",message:`❌ Seeding failed: ${Be.error||"Unknown error"}`,timestamp:new Date}])}catch(we){M(Be=>[...Be,{id:"error",type:"error",message:`❌ Network error: ${we}`,timestamp:new Date}])}finally{D(!1)}},fe=re=>{U(re),R(!0)},me=re=>{U(re),q({name:re.name,slug:re.slug}),T(!0)},Re=re=>{U(re),k(!0)},Me=async()=>{if(!B.name){H.error("Please fill in the organization name");return}const re=H.loading("Creating organization...");try{const Be=await(await fetch("/api/organizations",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:B.name,slug:B.slug})})).json();Be.success?(await ge(),g(!1),G({name:"",slug:""}),H.success("Organization created successfully!",{id:re})):H.error(`Error creating organization: ${Be.error||"Unknown error"}`,{id:re})}catch(we){console.error("Error creating organization:",we),H.error("Error creating organization",{id:re})}},Ue=async()=>{if(!j){H.error("No organization selected");return}if(!L.name){H.error("Please fill in the organization name");return}const re=H.loading("Updating organization...");try{const Be=await(await fetch(`/api/organizations/${j.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:L.name,slug:L.slug})})).json();Be.success?(await ge(),T(!1),U(null),q({name:"",slug:""}),H.success("Organization updated successfully!",{id:re})):H.error(`Error updating organization: ${Be.error||"Unknown error"}`,{id:re})}catch(we){console.error("Error updating organization:",we),H.error("Error updating organization",{id:re})}},$e=async()=>{if(!j){H.error("No organization selected");return}const re=H.loading("Deleting organization...");try{const Be=await(await fetch(`/api/organizations/${j.id}`,{method:"DELETE",headers:{"Content-Type":"application/json"}})).json();Be.success?(await ge(),await n(),k(!1),U(null),H.success("Organization deleted successfully!",{id:re})):H.error(`Error deleting organization: ${Be.error||"Unknown error"}`,{id:re})}catch(we){console.error("Error deleting organization:",we),H.error("Error deleting organization",{id:re})}},pt=()=>{if(a.length===0){H.error("No organizations to export");return}const re=["ID","Name","Slug","Created At","Updated At"],we=a.map(xe=>[xe.id,xe.name||"",xe.slug||"",new Date(xe.createdAt).toLocaleString(),new Date(xe.updatedAt).toLocaleString()]),Be=[re.join(","),...we.map(xe=>xe.map(De=>`"${De}"`).join(","))].join(`
|
|
508
508
|
`),V=new Blob([Be],{type:"text/csv;charset=utf-8;"}),le=document.createElement("a"),he=URL.createObjectURL(V);le.setAttribute("href",he),le.setAttribute("download",`organizations-export-${new Date().toISOString().split("T")[0]}.csv`),le.style.visibility="hidden",document.body.appendChild(le),le.click(),document.body.removeChild(le),H.success(`Exported ${a.length} organizations to CSV`)},Ge=re=>{p.some(we=>we.type===re)||v([...p,{type:re}])},jt=re=>{v(p.filter(we=>we.type!==re))},vt=()=>{v([])},We=(re,we)=>{v(Be=>Be.map(V=>V.type===re?{...V,dateRange:we}:V))},et=a.filter(re=>{const we=re.name.toLowerCase().includes(u.toLowerCase())||re.slug.toLowerCase().includes(u.toLowerCase());if(p.length===0)return we;const Be=p.every(V=>{var le,he,xe,De;switch(V.type){case"createdAt":{if(!((le=V.dateRange)!=null&&le.from)&&!((he=V.dateRange)!=null&&he.to))return!0;const Ye=new Date(re.createdAt);return!((xe=V.dateRange)!=null&&xe.from&&V.dateRange.from>Ye||(De=V.dateRange)!=null&&De.to&&V.dateRange.to<Ye)}default:return!0}});return we&&Be}),Ze=Math.ceil(et.length/b),Et=(x-1)*b,Tt=Et+b,qt=et.slice(Et,Tt),Wt=re=>{N(re)};return i?r.jsx("div",{className:"flex min-h-screen items-center justify-center h-full",children:r.jsxs("div",{className:"flex flex-col items-center space-y-3",children:[r.jsx(ir,{className:"w-6 h-6 text-white animate-spin"}),r.jsx("div",{className:"text-white text-sm",children:"Loading organizations..."})]})}):l&&!l.enabled?r.jsxs("div",{className:"space-y-6 p-6",children:[r.jsx("div",{className:"flex items-center justify-between",children:r.jsxs("div",{children:[r.jsx("h1",{className:"text-2xl text-white font-light",children:"Organizations"}),r.jsx("p",{className:"text-gray-400 font-light text-sm mt-1 uppercase font-mono",children:"Manage your application organizations"})]})}),r.jsx("div",{className:"bg-black/30 border border-dashed border-white/20 rounded-none p-8",children:r.jsxs("div",{className:"flex items-start space-x-4",children:[r.jsx("div",{className:"flex-shrink-0",children:r.jsx(Er,{className:"w-12 h-12 text-white"})}),r.jsxs("div",{className:"flex-1",children:[r.jsx("h3",{className:"text-xl text-white font-light mb-2",children:"Organization Plugin Required"}),r.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."}),r.jsxs("div",{className:"bg-black/50 border border-dashed border-white/20 rounded-none p-4 mb-6",children:[r.jsx("h4",{className:"text-white font-light mb-3",children:"Follow these steps:"}),r.jsx("ol",{className:"text-gray-300 space-y-2 text-sm list-decimal list-inside",children:r.jsxs("li",{children:["Import the plugin in your auth configuration file",l.configPath&&r.jsxs("span",{className:"text-gray-400",children:[" (",l.configPath,")"]}),":"]})}),r.jsx("div",{className:"mt-4 bg-black/70 border border-dashed border-white/10 rounded-none p-3 overflow-x-auto",children:r.jsxs("pre",{className:"text-sm text-gray-300",children:[r.jsx("span",{className:"text-blue-400",children:"import"})," ","{ betterAuth }"," ",r.jsx("span",{className:"text-blue-400",children:"from"})," ",r.jsx("span",{className:"text-green-400",children:'"better-auth"'})," ",r.jsx("br",{}),r.jsx("span",{className:"text-blue-400",children:"import"})," ","{ organization }"," ",r.jsx("span",{className:"text-blue-400",children:"from"})," ",r.jsx("span",{className:"text-green-400",children:'"better-auth/plugins/organization"'})," ",r.jsx("br",{}),r.jsx("span",{className:"text-blue-400",children:"export const"})," ",r.jsx("span",{className:"text-yellow-300",children:"auth"})," ="," ",r.jsx("span",{className:"text-yellow-300",children:"betterAuth"}),"(","{"," ",r.jsx("br",{}),r.jsx("span",{className:"text-gray-500 pl-10",children:"// ... your existing configuration"})," ",r.jsx("br",{}),r.jsx("span",{className:"text-red-300 pl-10",children:"plugins"}),": [ ",r.jsx("br",{}),r.jsxs("span",{className:"text-yellow-300 pl-12",children:["organization(",")"]}),r.jsx("br",{}),r.jsx("span",{className:"pl-10",children:"]"})," ",r.jsx("br",{}),"}",") ",r.jsx("br",{})]})}),r.jsx("div",{className:"mt-4",children:r.jsx("p",{className:"text-gray-400 text-sm",children:"2. Do migrations to create the organizations table"})}),r.jsx("div",{className:"mt-2",children:r.jsx("p",{className:"text-gray-400 text-sm",children:"3. Restart your application to apply the changes"})})]}),l.availablePlugins&&l.availablePlugins.length>0&&r.jsx("div",{className:"mb-4",children:r.jsxs("p",{className:"text-gray-400 text-sm",children:["Currently enabled plugins: ",l.availablePlugins.join(", ")]})}),r.jsx($,{onClick:ae,className:"bg-white hover:bg-white/90 text-black border border-white/20 rounded-none",children:"Check Again"}),r.jsxs("div",{className:"mt-4 text-xs text-gray-500",children:["Need help? Check the"," ",r.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"})]})]})]})})]}):r.jsxs("div",{className:"space-y-6 p-6",children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsxs("div",{children:[r.jsxs("h1",{className:"text-2xl relative text-white font-light inline-flex items-start",children:["Organizations",r.jsx("sup",{className:"text-xs text-gray-500 ml-1 mt-0 inline-flex items-baseline",children:r.jsx(rr,{value:t.organizations??0,className:"text-white font-mono text-sm",prefix:r.jsx("span",{className:"mr-1 text-gray-500",children:"["}),suffix:r.jsx("span",{className:"ml-1 text-gray-500",children:"]"}),format:{notation:"standard",maximumFractionDigits:0}})})]}),r.jsx("p",{className:"text-gray-400 font-light text-sm mt-1 uppercase font-mono",children:"Manage your organizations and teams"})]}),r.jsxs("div",{className:"flex items-center space-x-3",children:[r.jsxs($,{className:"border border-dashed border-white/20 text-white hover:bg-white/10 bg-transparent rounded-none",onClick:pt,children:[r.jsx(ud,{className:"w-4 h-4 mr-2"}),"Export CSV"]}),r.jsxs($,{className:"border border-dashed border-white/20 text-white hover:bg-white/10 bg-transparent rounded-none",onClick:()=>F(!0),children:[r.jsx(Vt,{className:"w-4 h-4 mr-2"}),"Seed"]}),r.jsxs($,{className:"bg-white hover:bg-white/90 text-black border border-white/20 rounded-none",onClick:()=>g(!0),children:[r.jsx(bi,{className:"w-4 h-4 mr-2"}),"Add Organization"]})]})]}),r.jsxs("div",{className:"space-y-3",children:[r.jsxs("div",{className:"flex items-center space-x-4",children:[r.jsxs("div",{className:"flex-1 relative",children:[r.jsx(xo,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400 w-4 h-4"}),r.jsx(Te,{placeholder:"Search organizations...",value:u,onChange:re=>h(re.target.value),className:"pl-10 border border-dashed border-white/20 bg-black/30 text-white rounded-none"})]}),r.jsx("div",{className:"flex items-center space-x-2",children:r.jsxs(Ua,{value:"",onValueChange:Ge,children:[r.jsx(Pa,{className:"w-[180px]",children:r.jsxs("div",{className:"flex mr-3 items-center space-x-2",children:[r.jsx(bi,{className:"w-4 h-4"}),r.jsx("span",{children:"Add Filter"})]})}),r.jsx(Fa,{children:!p.some(re=>re.type==="createdAt")&&r.jsx(Ve,{value:"createdAt",children:"Created Date"})})]})}),p.length>0&&r.jsx("div",{className:"flex items-center space-x-2",children:r.jsx($,{onClick:vt,children:"Clear all"})})]}),p.length>0&&r.jsx("div",{className:"space-y-3",children:r.jsx("div",{className:"flex flex-wrap gap-3",children:p.map(re=>{var we,Be,V,le;return r.jsxs("div",{className:"inline-flex items-center gap-2 px-3 py-2 bg-white/10 border border-white/20 rounded-sm",children:[r.jsx(C1,{className:"w-3 h-3 text-white"}),re.type==="createdAt"&&r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("span",{className:"text-sm text-white",children:"Created:"}),r.jsxs(Oa,{children:[r.jsx(Da,{asChild:!0,children:r.jsxs($,{variant:"outline",className:"h-8 px-3 text-xs font-mono uppercase text-gray-400 hover:text-white bg-transparent border-white/10 hover:bg-white/5",children:[r.jsx(_f,{className:"mr-1 h-3 w-3"}),(we=re.dateRange)!=null&&we.from?_a(re.dateRange.from,"MMM dd yyyy"):"From"]})}),r.jsx(da,{className:"w-auto p-0 bg-black border-white/10",children:r.jsx(Ra,{mode:"single",selected:(Be=re.dateRange)==null?void 0:Be.from,onSelect:he=>{var xe;return We("createdAt",{from:he,to:(xe=re.dateRange)==null?void 0:xe.to})},initialFocus:!0,className:"rounded-none"})})]}),r.jsxs(Oa,{children:[r.jsx(Da,{asChild:!0,children:r.jsxs($,{variant:"outline",className:"h-8 px-3 text-xs font-mono uppercase text-gray-400 hover:text-white bg-transparent border-white/10 hover:bg-white/5",children:[r.jsx(_f,{className:"mr-1 h-3 w-3"}),(V=re.dateRange)!=null&&V.to?_a(re.dateRange.to,"MMM dd yyyy"):"To"]})}),r.jsx(da,{className:"w-auto p-0 bg-black border-white/10",children:r.jsx(Ra,{mode:"single",selected:(le=re.dateRange)==null?void 0:le.to,onSelect:he=>{var xe;return We("createdAt",{from:(xe=re.dateRange)==null?void 0:xe.from,to:he})},initialFocus:!0,disabled:he=>{var xe;return(xe=re.dateRange)!=null&&xe.from?he<re.dateRange.from:!1},className:"rounded-none"})})]})]}),r.jsx("button",{onClick:()=>jt(re.type),className:"ml-1 hover:bg-white/20 rounded-full p-0.5",children:r.jsx(tn,{className:"w-3 h-3 text-white"})})]},re.type)})})})]}),r.jsxs("div",{className:"bg-black/30 border border-dashed border-white/20 rounded-none",children:[r.jsx("div",{className:"overflow-x-auto",children:r.jsxs("table",{className:"w-full",children:[r.jsx("thead",{children:r.jsxs("tr",{className:"border-b border-dashed border-white/10",children:[r.jsx("th",{className:"text-left py-4 px-4 text-white font-light",children:"Organization"}),r.jsx("th",{className:"text-left py-4 px-4 text-white font-light",children:"Slug"}),r.jsx("th",{className:"text-left py-4 px-4 text-white font-light",children:"Created"}),r.jsx("th",{className:"text-right py-4 px-4 text-white font-light",children:"Actions"})]})}),r.jsx("tbody",{children:et.length===0?r.jsx("tr",{children:r.jsx("td",{colSpan:4,className:"py-12 px-4 text-center",children:r.jsxs("div",{className:"flex flex-col items-center space-y-4",children:[r.jsx("div",{className:"w-16 h-16 rounded-none border border-dashed border-white/20 bg-white/10 flex items-center justify-center",children:r.jsx(Er,{className:"w-8 h-8 text-white/50"})}),r.jsxs("div",{children:[r.jsx("h3",{className:"text-white font-medium text-lg",children:"No organizations found"}),r.jsx("p",{className:"text-gray-400 text-sm mt-1",children:u||d!=="all"?"Try adjusting your search or filter criteria":"Get started by creating your first organization"})]}),!u&&d==="all"&&r.jsxs("div",{className:"flex items-center space-x-3",children:[r.jsxs($,{onClick:()=>g(!0),className:"bg-white text-black hover:bg-gray-200 rounded-none",children:[r.jsx(bi,{className:"w-4 h-4 mr-2"}),"Create Organization"]}),r.jsxs($,{onClick:()=>F(!0),className:"border border-dashed border-white/20 text-white hover:bg-white/10 bg-transparent rounded-none",children:[r.jsx(Vt,{className:"w-4 h-4 mr-2"}),"Seed Data"]})]})]})})}):qt.map(re=>r.jsxs("tr",{className:"border-b border-dashed border-white/5 hover:bg-white/5 cursor-pointer",onClick:()=>e(`/organizations/${re.id}`),children:[r.jsx("td",{className:"py-4 px-4",children:r.jsxs("div",{className:"flex items-center space-x-3",children:[r.jsx("div",{className:"w-10 h-10 rounded-none border border-dashed border-white/20 bg-white/10 flex items-center justify-center",children:r.jsx(Er,{className:"w-5 h-5 text-white"})}),r.jsxs("div",{children:[r.jsx("div",{className:"text-white font-light",children:re.name}),r.jsx(Ln,{id:re.id})]})]})}),r.jsx("td",{className:"py-4 px-4 text-white",children:re.slug}),r.jsx("td",{className:"py-4 px-4 text-sm text-gray-400",children:r.jsxs("div",{className:"flex flex-col",children:[new Date(re.createdAt).toLocaleDateString(),r.jsx("p",{className:"text-xs",children:new Date(re.createdAt).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})})]})}),r.jsx("td",{className:"py-4 px-4 text-right",children:r.jsxs("div",{className:"flex items-center justify-end space-x-2",children:[r.jsx($,{variant:"ghost",size:"sm",className:"text-gray-400 hover:text-white rounded-none",onClick:we=>{we.stopPropagation(),fe(re)},children:r.jsx(gi,{className:"w-4 h-4"})}),r.jsx($,{variant:"ghost",size:"sm",className:"text-gray-400 hover:text-white rounded-none",onClick:we=>{we.stopPropagation(),me(re)},children:r.jsx(bo,{className:"w-4 h-4"})}),r.jsx($,{variant:"ghost",size:"sm",className:"text-red-400 hover:text-red-300 rounded-none",onClick:we=>{we.stopPropagation(),Re(re)},children:r.jsx(xu,{className:"w-4 h-4"})})]})})]},re.id))})]})}),r.jsx(b5,{currentPage:x,totalPages:Ze,onPageChange:Wt,totalItems:et.length,startIndex:Et,endIndex:Tt})]}),I&&r.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:r.jsxs("div",{className:"overflow-x-hidden bg-black/90 border border-white/10 p-6 w-full pt-4 max-w-2xl rounded-none",children:[r.jsxs("div",{className:"flex items-center justify-between mb-6",children:[r.jsxs("h3",{className:"text-sm text-white flex items-center justify-center font-light uppercase",children:[r.jsx("span",{className:"text-white/50 mr-2",children:"["}),r.jsx(Er,{className:"inline mr-2 w-3.5 h-3.5 text-white"}),r.jsx("span",{className:"font-mono text-white/70 uppercase",children:"Seed Organizations"}),r.jsx("span",{className:"text-white/50 ml-2",children:"]"})]}),r.jsx($,{variant:"ghost",size:"sm",onClick:()=>F(!1),className:"text-gray-400 hover:text-white rounded-none",children:r.jsx(tn,{className:"w-4 h-4"})})]}),r.jsx("hr",{className:"border-white/10 -mx-10 border-dashed -mt-4 mb-4"}),r.jsxs("div",{className:"space-y-6",children:[r.jsx("div",{className:"space-y-4",children:r.jsxs("div",{className:"flex items-center space-x-3",children:[r.jsxs("div",{className:"flex-1",children:[r.jsx(pe,{htmlFor:"organization-count",className:"text-sm text-gray-400 font-light",children:"Number of organizations"}),r.jsx(Te,{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"})]}),r.jsx($,{onClick:()=>{var we;const re=parseInt(((we=document.getElementById("organization-count"))==null?void 0:we.value)||"5",10);se(re)},disabled:A,className:"bg-white hover:bg-white/90 text-black border border-white/20 rounded-none mt-6 disabled:opacity-50",children:A?r.jsxs(r.Fragment,{children:[r.jsx(ir,{className:"w-3 h-3 mr-2 animate-spin"}),"Seeding..."]}):r.jsxs(r.Fragment,{children:[r.jsx(Vt,{className:"w-3 h-3 mr-2"}),"Seed Organizations"]})})]})}),_.length>0&&r.jsx("div",{className:"mt-6",children:r.jsx(ji,{title:"Organization Seeding Terminal",lines:_,isRunning:A,className:"w-full",defaultCollapsed:!0})})]}),r.jsx("hr",{className:"border-white/10 -mx-10 border-dashed mt-10"}),r.jsx("div",{className:"flex justify-end mt-6 pt-6",children:r.jsx($,{variant:"outline",onClick:()=>F(!1),className:"border border-dashed border-white/20 text-white hover:bg-white/10 rounded-none",children:"Close"})})]})}),y&&r.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:r.jsxs("div",{className:"bg-black/90 border border-dashed border-white/20 p-6 w-full max-w-md rounded-none",children:[r.jsxs("div",{className:"flex items-center justify-between mb-4",children:[r.jsx("h3",{className:"text-lg text-white font-light",children:"Create Organization"}),r.jsx($,{variant:"ghost",size:"sm",onClick:()=>g(!1),className:"text-gray-400 hover:text-white rounded-none",children:r.jsx(tn,{className:"w-4 h-4"})})]}),r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{children:[r.jsx(pe,{htmlFor:"create-name",className:"text-sm text-gray-400 font-light",children:"Name"}),r.jsx(Te,{id:"create-name",value:B.name,onChange:re=>K(re.target.value),placeholder:"e.g. Acme Corp",className:"mt-1 border border-dashed border-white/20 bg-black/30 text-white rounded-none"})]}),r.jsxs("div",{children:[r.jsx(pe,{htmlFor:"create-slug",className:"text-sm text-gray-400 font-light",children:"Slug"}),r.jsx(Te,{id:"create-slug",value:B.slug,onChange:re=>ne(re.target.value),placeholder:"e.g. acme-corp",className:"mt-1 border border-dashed border-white/20 bg-black/30 text-white rounded-none"}),r.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Auto-generated from name. You can edit it manually."})]})]}),r.jsxs("div",{className:"flex justify-end space-x-3 mt-6",children:[r.jsx($,{variant:"outline",onClick:()=>{g(!1),G({name:"",slug:""})},className:"border border-dashed border-white/20 text-white hover:bg-white/10 rounded-none",children:"Cancel"}),r.jsx($,{onClick:Me,className:"bg-white hover:bg-white/90 text-black border border-white/20 rounded-none",children:"Create"})]})]})}),C&&j&&r.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",onClick:re=>{re.target===re.currentTarget&&(T(!1),U(null),q({name:"",slug:""}))},children:r.jsxs("div",{className:"bg-black/90 border border-dashed border-white/20 p-6 w-full max-w-md rounded-none",onClick:re=>re.stopPropagation(),children:[r.jsxs("div",{className:"flex items-center justify-between mb-4",children:[r.jsx("h3",{className:"text-lg text-white font-light",children:"Edit Organization"}),r.jsx($,{variant:"ghost",size:"sm",onClick:()=>{T(!1),U(null),q({name:"",slug:""})},className:"text-gray-400 hover:text-white rounded-none",children:r.jsx(tn,{className:"w-4 h-4"})})]}),r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{className:"flex items-center space-x-3",children:[r.jsx("div",{className:"w-16 h-16 rounded-none border border-dashed border-white/20 bg-white/10 flex items-center justify-center",children:r.jsx(Er,{className:"w-8 h-8 text-white"})}),r.jsxs("div",{children:[r.jsx("div",{className:"text-white font-light",children:j.name}),r.jsx("div",{className:"text-sm text-gray-400",children:j.slug})]})]}),r.jsxs("div",{children:[r.jsx(pe,{htmlFor:"edit-name",className:"text-sm text-gray-400 font-light",children:"Name"}),r.jsx(Te,{id:"edit-name",value:L.name,onChange:re=>te(re.target.value),placeholder:"e.g. Acme Corp",className:"mt-1 border border-dashed border-white/20 bg-black/30 text-white rounded-none"})]}),r.jsxs("div",{children:[r.jsx(pe,{htmlFor:"edit-slug",className:"text-sm text-gray-400 font-light",children:"Slug"}),r.jsx(Te,{id:"edit-slug",value:L.slug,onChange:re=>ee(re.target.value),placeholder:"e.g. acme-corp",className:"mt-1 border border-dashed border-white/20 bg-black/30 text-white rounded-none"}),r.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Auto-generated from name. You can edit it manually."})]})]}),r.jsxs("div",{className:"flex justify-end space-x-3 mt-6",children:[r.jsx($,{variant:"outline",onClick:()=>{T(!1),q({name:"",slug:""})},className:"border border-dashed border-white/20 text-white hover:bg-white/10 rounded-none",children:"Cancel"}),r.jsx($,{onClick:Ue,className:"bg-white hover:bg-white/90 text-black border border-white/20 rounded-none",children:"Update"})]})]})}),E&&j&&r.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:r.jsxs("div",{className:"bg-black/90 border border-dashed border-white/20 p-6 w-full max-w-md rounded-none",children:[r.jsxs("div",{className:"flex items-center justify-between mb-4",children:[r.jsx("h3",{className:"text-lg text-white font-light",children:"Delete Organization"}),r.jsx($,{variant:"ghost",size:"sm",onClick:()=>k(!1),className:"text-gray-400 hover:text-white rounded-none",children:r.jsx(tn,{className:"w-4 h-4"})})]}),r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{className:"flex items-center space-x-3",children:[r.jsx("div",{className:"w-16 h-16 rounded-none border border-dashed border-white/20 bg-white/10 flex items-center justify-center",children:r.jsx(Er,{className:"w-8 h-8 text-white"})}),r.jsxs("div",{children:[r.jsx("div",{className:"text-white font-light",children:j.name}),r.jsx("div",{className:"text-sm text-gray-400",children:j.slug})]})]}),r.jsx("p",{className:"text-gray-400",children:"Are you sure you want to delete this organization? This action cannot be undone."})]}),r.jsxs("div",{className:"flex justify-end space-x-3 mt-6",children:[r.jsx($,{variant:"outline",onClick:()=>k(!1),className:"border border-dashed border-white/20 text-white hover:bg-white/10 rounded-none",children:"Cancel"}),r.jsx($,{onClick:$e,className:"bg-red-600 hover:bg-red-700 text-white border border-red-600 rounded-none",children:"Delete"})]})]})}),O&&j&&r.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:r.jsxs("div",{className:"bg-black/90 border border-dashed border-white/20 p-6 w-full max-w-md rounded-none",children:[r.jsxs("div",{className:"flex items-center justify-between mb-4",children:[r.jsx("h3",{className:"text-lg text-white font-light",children:"Organization Details"}),r.jsx($,{variant:"ghost",size:"sm",onClick:()=>R(!1),className:"text-gray-400 hover:text-white rounded-none",children:r.jsx(tn,{className:"w-4 h-4"})})]}),r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{className:"flex items-center space-x-3",children:[r.jsx("div",{className:"w-16 h-16 rounded-none border border-dashed border-white/20 bg-white/10 flex items-center justify-center",children:r.jsx(Er,{className:"w-8 h-8 text-white"})}),r.jsxs("div",{children:[r.jsx("div",{className:"text-white font-light",children:j.name}),r.jsx("div",{className:"text-sm text-gray-400",children:j.slug})]})]}),r.jsxs("div",{className:"space-y-2",children:[r.jsx(Ln,{id:j.id,variant:"detail"}),r.jsxs("div",{className:"flex justify-between",children:[r.jsx("span",{className:"text-gray-400",children:"Created:"}),r.jsx("span",{className:"text-white text-sm",children:new Date(j.createdAt).toLocaleString()})]}),r.jsxs("div",{className:"flex justify-between",children:[r.jsx("span",{className:"text-gray-400",children:"Updated:"}),r.jsx("span",{className:"text-white text-sm",children:new Date(j.updatedAt).toLocaleString()})]})]})]}),r.jsx("div",{className:"flex justify-end mt-6",children:r.jsx($,{onClick:()=>R(!1),className:"bg-white hover:bg-white/90 text-black border border-white/20 rounded-none",children:"Close"})})]})})]})}function y5(){const e=ur(),{counts:t,refetchCounts:n}=Mp(),[a,s]=m.useState([]),[i,o]=m.useState(!0),[l,c]=m.useState(""),[u,h]=m.useState([]),[d,f]=m.useState(1),[p]=m.useState(20),[v,x]=m.useState(!1),[N,b]=m.useState(!1),[y,g]=m.useState(!1),[w,S]=m.useState(!1),[C,T]=m.useState(!1),[E,k]=m.useState(!1),[O,R]=m.useState(!1),[I,F]=m.useState(!1),[j,U]=m.useState(null),[_,M]=m.useState(null),[A,D]=m.useState(""),[B,G]=m.useState(),[L,q]=m.useState(!1),[X,K]=m.useState(""),[ne,te]=m.useState(""),[ee,ae]=m.useState(""),[ge,se]=m.useState([]),[fe,me]=m.useState(!1),Re=m.useCallback(async()=>{try{const ie=await(await fetch("/api/users?limit=10000")).json();s(ie.users||[])}catch{}finally{o(!1)}},[]),Me=m.useCallback(async()=>{try{const ie=await(await fetch("/api/admin/status")).json();q(ie.enabled)}catch{q(!1)}},[]);m.useEffect(()=>{Re(),Me();const Q=()=>{_&&M(null)};return document.addEventListener("click",Q),()=>document.removeEventListener("click",Q)},[_,Me,Re]);const Ue=async(Q,ie)=>{se([]),me(!0),se([{id:"start",type:"info",message:`Starting user seeding process for ${Q} users...`,timestamp:new Date}]);try{const ue=await(await fetch("/api/seed/users",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({count:Q,role:ie||void 0})})).json();if(ue.success){const ke=ue.results.map((Y,be)=>Y.success?{id:`user-${be}`,type:"progress",message:`Creating user: ${Y.user.name} (${Y.user.email})`,timestamp:new Date,status:"completed"}:{id:`user-${be}`,type:"error",message:`Failed to create user ${be+1}: ${Y.error}`,timestamp:new Date});se(Y=>[...Y,...ke]);const W=ue.results.filter(Y=>Y.success).length;se(Y=>[...Y,{id:"complete",type:"success",message:`✅ Seeding completed! Created ${W}/${Q} users successfully`,timestamp:new Date}]),await Re(),await n()}else se(ke=>[...ke,{id:"error",type:"error",message:`❌ Seeding failed: ${ue.error||"Unknown error"}`,timestamp:new Date}])}catch(Ne){se(ue=>[...ue,{id:"error",type:"error",message:`❌ Network error: ${Ne}`,timestamp:new Date}])}finally{me(!1)}},$e=Q=>{U(Q),S(!0)},pt=Q=>{U(Q),K(Q.role||""),b(!0)},Ge=Q=>{U(Q),g(!0)},jt=async()=>{var ke,W,Y;const Q=(ke=document.getElementById("create-name"))==null?void 0:ke.value,ie=(W=document.getElementById("create-email"))==null?void 0:W.value,Ne=(Y=document.getElementById("create-password"))==null?void 0:Y.value;if(!Q||!ie||!Ne){H.error("Please fill in all fields");return}const ue=H.loading("Creating user...");try{const He=await(await fetch("/api/users",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:Q,email:ie,password:Ne,role:ee||null})})).json();He.success?(await Re(),x(!1),ae(""),document.getElementById("create-name").value="",document.getElementById("create-email").value="",document.getElementById("create-password").value="",H.success("User created successfully!",{id:ue})):H.error(`Error creating user: ${He.error||"Unknown error"}`,{id:ue})}catch{H.error("Error creating user",{id:ue})}},vt=async()=>{var ue,ke;if(!j){H.error("No user selected");return}const Q=(ue=document.getElementById("edit-name"))==null?void 0:ue.value,ie=(ke=document.getElementById("edit-email"))==null?void 0:ke.value;if(!Q||!ie){H.error("Please fill in all fields");return}const Ne=H.loading("Updating user...");try{const Y=await(await fetch(`/api/users/${j.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:Q,email:ie,role:X||null})})).json();Y.success?(await Re(),b(!1),U(null),K(""),H.success("User updated successfully!",{id:Ne})):H.error(`Error updating user: ${Y.error||"Unknown error"}`,{id:Ne})}catch{H.error("Error updating user",{id:Ne})}},We=async()=>{if(!j){H.error("No user selected");return}const Q=H.loading("Deleting user...");try{const Ne=await(await fetch(`/api/users/${j.id}`,{method:"DELETE",headers:{"Content-Type":"application/json"}})).json();Ne.success?(await Re(),await n(),g(!1),U(null),H.success("User deleted successfully!",{id:Q})):H.error(`Error deleting user: ${Ne.error||"Unknown error"}`,{id:Q})}catch{H.error("Error deleting user",{id:Q})}},et=async()=>{if(!j)return;if(!L){H.error("Admin plugin is not enabled");return}const Q=H.loading("Banning user...");try{const ie=await fetch("/api/admin/ban-user",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({userId:j.id,banReason:A||"No reason provided",banExpiresIn:B})}),Ne=await ie.json();ie.ok?(H.success("User banned successfully!",{id:Q}),k(!1),D(""),G(void 0),U(null),M(null),Re()):H.error(`Error banning user: ${Ne.error||Ne.message||"Unknown error"}`,{id:Q})}catch{H.error("Error banning user",{id:Q})}},Ze=async()=>{if(!j)return;if(!L){H.error("Admin plugin is not enabled");return}const Q=H.loading("Unbanning user...");try{const ie=await fetch("/api/admin/unban-user",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({userId:j.id})}),Ne=await ie.json();ie.ok?(H.success("User unbanned successfully!",{id:Q}),R(!1),U(null),M(null),Re()):H.error(`Error unbanning user: ${Ne.error||Ne.message||"Unknown error"}`,{id:Q})}catch{H.error("Error unbanning user",{id:Q})}},Et=async()=>{var Ne;if(!j){H.error("No user selected");return}const Q=(Ne=document.getElementById("update-password"))==null?void 0:Ne.value;if(!Q){H.error("Please enter a new password");return}const ie=H.loading("Updating password...");try{const ue=await fetch(`/api/users/${j.id}/password`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({password:Q})}),ke=await ue.json();ue.ok&&ke.success?(H.success("Password updated successfully!",{id:ie}),F(!1),U(null),document.getElementById("update-password").value=""):H.error(`Error updating password: ${ke.error||"Unknown error"}`,{id:ie})}catch{H.error("Error updating password",{id:ie})}},Tt=()=>{if(a.length===0){H.error("No users to export");return}const Q=["ID","Name","Email","Email Verified","Created At","Updated At"],ie=a.map(Y=>[Y.id,Y.name||"",Y.email||"",!!Y.emailVerified,new Date(Y.createdAt).toLocaleString(),new Date(Y.updatedAt).toLocaleString()]),Ne=[Q.join(","),...ie.map(Y=>Y.map(be=>`"${be}"`).join(","))].join(`
|
|
509
|
-
`),ue=new Blob([Ne],{type:"text/csv;charset=utf-8;"}),ke=document.createElement("a"),W=URL.createObjectURL(ue);ke.setAttribute("href",W),ke.setAttribute("download",`users-export-${new Date().toISOString().split("T")[0]}.csv`),ke.style.visibility="hidden",document.body.appendChild(ke),ke.click(),document.body.removeChild(ke),H.success(`Exported ${a.length} users to CSV`)},qt=Q=>{u.some(Ne=>Ne.type===Q)||(h(Ne=>[...Ne,{type:Q}]),f(1))},Wt=Q=>{h(ie=>ie.filter(Ne=>Ne.type!==Q)),f(1)},re=(Q,ie)=>{h(Ne=>Ne.map(ue=>ue.type===Q?{...ue,value:ie}:ue))},we=(Q,ie)=>{h(Ne=>Ne.map(ue=>ue.type===Q?{...ue,dateRange:ie}:ue))},Be=a.filter(Q=>{const ie=Q.name.toLowerCase().includes(l.toLowerCase())||Q.email.toLowerCase().includes(l.toLowerCase());if(u.length===0)return ie;const Ne=u.every(ue=>{var ke,W,Y,be,He;switch(ue.type){case"emailVerified":return ue.value===void 0?!0:Q.emailVerified===(ue.value==="true");case"banned":return ue.value===void 0?!0:Q.banned===(ue.value==="true");case"active":return Q.banned!==!0;case"createdAt":{if(!((ke=ue.dateRange)!=null&&ke.from)&&!((W=ue.dateRange)!=null&&W.to))return!0;const tt=new Date(Q.createdAt);return!((Y=ue.dateRange)!=null&&Y.from&&ue.dateRange.from>tt||(be=ue.dateRange)!=null&&be.to&&ue.dateRange.to<tt)}case"role":return ue.value?(He=Q.role)==null?void 0:He.toLowerCase().includes(ue.value.toLowerCase()):!0;default:return!0}});return ie&&Ne}),V=a.filter(Q=>Q.banned).length,le=Math.ceil(Be.length/p),he=(d-1)*p,xe=he+p,De=Be.slice(he,xe),Ye=Q=>{f(Q)};return i?r.jsx("div",{className:"flex min-h-screen items-center justify-center h-full",children:r.jsxs("div",{className:"flex flex-col items-center space-y-3",children:[r.jsx(ir,{className:"w-6 h-6 text-white animate-spin"}),r.jsx("div",{className:"text-white text-sm",children:"Loading users..."})]})}):r.jsxs("div",{className:"space-y-6 p-6",children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsxs("div",{children:[r.jsxs("h1",{className:"text-2xl relative text-white font-light inline-flex items-start",children:["Users",r.jsx("sup",{className:"text-xs text-gray-500 ml-1 mt-0 inline-flex items-baseline",children:r.jsx(rr,{value:t.users??0,className:"text-white font-mono text-sm",prefix:r.jsx("span",{className:"mr-1 text-gray-500",children:"["}),suffix:r.jsx("span",{className:"ml-1 text-gray-500",children:"]"}),format:{notation:"standard",maximumFractionDigits:0}})})]}),r.jsx("p",{className:"text-gray-400 font-light text-sm mt-1 uppercase font-mono",children:"Manage your application users"}),r.jsx("div",{className:"flex items-center space-x-4 mt-2",children:V>0&&r.jsxs("span",{className:"text-sm text-red-400 flex items-center space-x-1",children:[r.jsx(th,{className:"w-3 h-3"}),r.jsxs("span",{children:[V," Banned"]})]})})]}),r.jsxs("div",{className:"flex items-center space-x-3",children:[r.jsxs($,{className:"border border-dashed border-white/20 text-white hover:bg-white/10 bg-transparent rounded-none",onClick:Tt,children:[r.jsx(ud,{className:"w-4 h-4 mr-2"}),"Export CSV"]}),r.jsxs($,{className:"border border-dashed border-white/20 text-white hover:bg-white/10 bg-transparent rounded-none",onClick:()=>T(!0),children:[r.jsx(Vt,{className:"w-4 h-4 mr-2"}),"Seed"]}),r.jsxs($,{className:"bg-white hover:bg-white/90 text-black border border-white/20 rounded-none",onClick:()=>x(!0),children:[r.jsx(Uw,{className:"w-4 h-4 mr-2"}),"Add User"]})]})]}),r.jsxs("div",{className:"space-y-3",children:[r.jsxs("div",{className:"flex items-center space-x-4",children:[r.jsxs("div",{className:"flex-1 relative",children:[r.jsx(xo,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400 w-4 h-4"}),r.jsx(Te,{placeholder:"Search users...",value:l,onChange:Q=>c(Q.target.value),className:"pl-10 border border-dashed border-white/20 bg-black/30 text-white rounded-none"})]}),r.jsx("div",{className:"flex items-center space-x-2",children:r.jsxs(Ua,{value:"",onValueChange:qt,children:[r.jsx(Pa,{className:"w-[180px]",children:r.jsxs("div",{className:"flex mr-3 items-center space-x-2",children:[r.jsx(bi,{className:"w-4 h-4"}),r.jsx("span",{children:"Add Filter"})]})}),r.jsxs(Fa,{children:[!u.some(Q=>Q.type==="emailVerified")&&r.jsx(Ve,{value:"emailVerified",children:"Email Verified"}),!u.some(Q=>Q.type==="banned")&&r.jsx(Ve,{value:"banned",children:"Banned Status"}),!u.some(Q=>Q.type==="createdAt")&&r.jsx(Ve,{value:"createdAt",children:"Created Date"}),!u.some(Q=>Q.type==="role")&&r.jsx(Ve,{value:"role",children:"Role"})]})]})}),u.length>0&&r.jsx("div",{className:"flex items-center space-x-2",children:r.jsx($,{onClick:()=>h([]),className:"",children:"Clear all"})})]}),u.length>0&&r.jsx("div",{className:"space-y-3",children:r.jsx("div",{className:"flex flex-wrap gap-3",children:u.map(Q=>{var ie,Ne,ue,ke;return r.jsxs("div",{className:"inline-flex items-center gap-2 px-3 py-2 bg-white/10 border border-white/20 rounded-sm",children:[r.jsx(C1,{className:"w-3 h-3 text-white"}),Q.type==="emailVerified"&&r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("span",{className:"text-sm text-white",children:"Email Verified:"}),r.jsxs(Ua,{value:Q.value||"",onValueChange:W=>re("emailVerified",W),children:[r.jsx(Pa,{className:"h-7 w-24 text-xs",children:r.jsx("span",{children:Q.value==="true"?"True":Q.value==="false"?"False":"Select"})}),r.jsxs(Fa,{children:[r.jsx(Ve,{value:"true",children:"True"}),r.jsx(Ve,{value:"false",children:"False"})]})]})]}),Q.type==="banned"&&r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("span",{className:"text-sm text-white",children:"Banned:"}),r.jsxs(Ua,{value:Q.value||"",onValueChange:W=>re("banned",W),children:[r.jsx(Pa,{className:"h-7 w-24 text-xs",children:r.jsx("span",{children:Q.value==="true"?"Yes":Q.value==="false"?"No":"Select"})}),r.jsxs(Fa,{children:[r.jsx(Ve,{value:"true",children:"Yes"}),r.jsx(Ve,{value:"false",children:"No"})]})]})]}),Q.type==="createdAt"&&r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("span",{className:"text-sm text-white",children:"Created:"}),r.jsxs(Oa,{children:[r.jsx(Da,{asChild:!0,children:r.jsxs($,{variant:"outline",className:"h-8 px-3 text-xs font-mono uppercase text-gray-400 hover:text-white bg-transparent border-white/10 hover:bg-white/5",children:[r.jsx(_f,{className:"mr-1 h-3 w-3"}),(ie=Q.dateRange)!=null&&ie.from?_a(Q.dateRange.from,"MMM dd yyyy"):"From"]})}),r.jsx(da,{className:"w-auto p-0 bg-black border-white/10",children:r.jsx(Ra,{mode:"single",selected:(Ne=Q.dateRange)==null?void 0:Ne.from,onSelect:W=>{var Y;return we("createdAt",{from:W,to:(Y=Q.dateRange)==null?void 0:Y.to})},initialFocus:!0,className:"rounded-none"})})]}),r.jsxs(Oa,{children:[r.jsx(Da,{asChild:!0,children:r.jsxs($,{variant:"outline",className:"h-8 px-3 text-xs font-mono uppercase text-gray-400 hover:text-white bg-transparent border-white/10 hover:bg-white/5",children:[r.jsx(_f,{className:"mr-1 h-3 w-3"}),(ue=Q.dateRange)!=null&&ue.to?_a(Q.dateRange.to,"MMM dd yyyy"):"To"]})}),r.jsx(da,{className:"w-auto p-0 bg-black border-white/10",children:r.jsx(Ra,{mode:"single",selected:(ke=Q.dateRange)==null?void 0:ke.to,onSelect:W=>{var Y;return we("createdAt",{from:(Y=Q.dateRange)==null?void 0:Y.from,to:W})},initialFocus:!0,disabled:W=>{var Y;return(Y=Q.dateRange)!=null&&Y.from?W<Q.dateRange.from:!1},className:"rounded-none"})})]})]}),Q.type==="role"&&r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("span",{className:"text-sm text-white",children:"Role:"}),r.jsx(Te,{type:"text",value:Q.value||"",onChange:W=>re("role",W.target.value),className:"h-7 w-32 text-xs bg-black border-white/20 text-white",placeholder:"Enter role..."})]}),r.jsx("button",{onClick:()=>Wt(Q.type),className:"ml-1 hover:bg-white/20 rounded-full p-0.5",children:r.jsx(tn,{className:"w-3 h-3 text-white"})})]},Q.type)})})})]}),r.jsxs("div",{className:"bg-black/30 border border-dashed border-white/20 rounded-none",children:[r.jsx("div",{className:"overflow-x-auto overflow-y-hidden",children:r.jsxs("table",{className:"w-full",children:[r.jsx("thead",{children:r.jsxs("tr",{className:"border-b border-dashed border-white/10",children:[r.jsx("th",{className:"text-left py-4 px-4 text-white font-light",children:"User"}),r.jsx("th",{className:"text-left py-4 px-4 text-white font-light",children:"Email Status"}),r.jsx("th",{className:"text-left py-4 px-4 text-white font-light",children:"Role"}),r.jsx("th",{className:"text-left py-4 px-4 text-white font-light",children:"Created"}),r.jsx("th",{className:"text-right py-4 px-4 text-white font-light",children:"Actions"})]})}),r.jsx("tbody",{children:De.length===0?r.jsx("tr",{children:r.jsx("td",{colSpan:5,className:"py-12 px-4 text-center",children:r.jsxs("div",{className:"flex flex-col items-center space-y-4",children:[r.jsx("div",{className:"w-16 h-16 rounded-none border border-dashed border-white/20 bg-white/10 flex items-center justify-center",children:r.jsx(yo,{className:"w-8 h-8 text-white/50"})}),r.jsxs("div",{children:[r.jsx("h3",{className:"text-white font-medium text-lg",children:"No users found"}),r.jsx("p",{className:"text-gray-400 text-sm mt-1",children:l||u.length>0?"Try adjusting your search or filter criteria":"Get started by creating your first user or seeding some data"})]}),!l&&u.length===0&&r.jsxs("div",{className:"flex items-center space-x-3",children:[r.jsxs($,{onClick:()=>x(!0),className:"bg-white text-black hover:bg-gray-200 rounded-none",children:[r.jsx(Uw,{className:"w-4 h-4 mr-2"}),"Create User"]}),r.jsxs($,{onClick:()=>T(!0),className:"border border-dashed border-white/20 text-white hover:bg-white/10 bg-transparent rounded-none",children:[r.jsx(Vt,{className:"w-4 h-4 mr-2"}),"Seed Data"]})]})]})})}):De.map(Q=>r.jsxs("tr",{className:`border-b border-dashed hover:bg-white/5 cursor-pointer ${Q.banned?"border-red-500/30 bg-red-500/5":"border-white/5"}`,onClick:()=>e(`/users/${Q.id}`),children:[r.jsx("td",{className:"py-4 px-4",children:r.jsxs("div",{className:"flex items-center space-x-3",children:[r.jsxs("div",{className:"relative",children:[r.jsx("img",{src:Q.image||`https://api.dicebear.com/7.x/avataaars/svg?seed=${Q.id}`,alt:Q.name,className:`w-10 h-10 rounded-none border border-dashed ${Q.banned?"border-red-400/50 opacity-60":"border-white/20"}`}),Q.banned&&r.jsx("div",{className:"absolute -top-1 -right-1 bg-red-500 rounded-full p-0.5",children:r.jsx(th,{className:"w-3 h-3 text-white"})})]}),r.jsxs("div",{className:"flex-1",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("div",{className:"text-white font-light",children:Q.name}),Q.banned&&r.jsxs("span",{className:"relative group inline-block",children:[r.jsx("span",{className:"px-2 py-0.5 text-[10px] font-semibold bg-red-500/20 border border-red-500/50 text-red-400 rounded-sm uppercase tracking-wide cursor-help",children:"Banned"}),Q.banReason&&r.jsxs("span",{className:"absolute left-1/2 -translate-x-1/2 bottom-full mb-1.5 px-2 py-1 text-[10px] font-mono text-gray-300 bg-black border border-dashed border-white/20 rounded-none whitespace-nowrap opacity-0 invisible group-hover:opacity-100 group-hover:visible transition-all duration-150 pointer-events-none z-50",children:[Q.banReason,r.jsx("span",{className:"absolute left-1/2 -translate-x-1/2 top-full w-0 h-0 border-l-[4px] border-r-[4px] border-t-[4px] border-transparent border-t-white/20"})]})]})]}),r.jsx("div",{className:"text-sm text-gray-400 mt-0.5",children:Q.email})]})]})}),r.jsx("td",{className:"py-4 px-4",children:r.jsxs("div",{className:"flex items-center space-x-2",children:[Q.emailVerified?r.jsx(Rf,{className:"w-4 h-4 text-green-400"}):r.jsx(Xl,{className:"w-4 h-4 text-yellow-400"}),r.jsx("span",{className:"text-sm text-gray-400",children:Q.emailVerified?"Verified":"Not Verified"})]})}),r.jsx("td",{className:"py-4 px-4",children:Q.role?r.jsx("span",{className:"px-2 py-1 text-xs font-mono uppercase bg-white/5 border border-dashed border-white/15 text-white/80 rounded-sm tracking-wide",children:Q.role}):r.jsx("span",{className:"text-sm text-gray-500",children:"—"})}),r.jsx("td",{className:"py-4 px-4 text-sm text-gray-400",children:r.jsxs("div",{className:"flex flex-col",children:[new Date(Q.createdAt).toLocaleDateString(),r.jsx("p",{className:"text-xs",children:new Date(Q.createdAt).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})})]})}),r.jsx("td",{className:"py-4 px-4 text-right",children:r.jsxs("div",{className:"relative flex items-center justify-end",children:[r.jsx($,{variant:"ghost",size:"sm",className:"text-gray-400 hover:text-white rounded-none",onClick:ie=>{ie.stopPropagation(),M(_===Q.id?null:Q.id)},children:r.jsx(WM,{className:"w-4 h-4"})}),_===Q.id&&r.jsxs("div",{className:"absolute z-[999] right-0 top-full mt-1 w-48 bg-black border border-white/20 rounded-none shadow-lg",onClick:ie=>ie.stopPropagation(),children:[r.jsxs("button",{className:"w-full px-4 py-2 text-left text-sm text-white hover:bg-white/10 flex items-center space-x-2",onClick:ie=>{ie.stopPropagation(),M(null),$e(Q)},children:[r.jsx(gi,{className:"w-4 h-4"}),r.jsx("span",{children:"View"})]}),r.jsxs("button",{className:"w-full px-4 py-2 text-left text-sm text-white hover:bg-white/10 flex items-center space-x-2",onClick:ie=>{ie.stopPropagation(),M(null),pt(Q)},children:[r.jsx(bo,{className:"w-4 h-4"}),r.jsx("span",{children:"Edit User"})]}),r.jsxs("button",{className:"w-full px-4 py-2 text-left text-sm text-white hover:bg-white/10 flex items-center space-x-2",onClick:ie=>{ie.stopPropagation(),M(null),U(Q),F(!0)},children:[r.jsx(Cn,{className:"w-4 h-4"}),r.jsx("span",{children:"Update Password"})]}),L&&(Q.banned?r.jsxs("button",{className:"w-full px-4 py-2 text-left text-sm text-green-400 hover:bg-white/10 flex items-center space-x-2",onClick:ie=>{ie.stopPropagation(),U(Q),R(!0),M(null)},children:[r.jsx(th,{className:"w-4 h-4"}),r.jsx("span",{children:"Unban User"})]}):r.jsxs("button",{className:"w-full px-4 py-2 text-left text-sm text-yellow-400 hover:bg-white/10 flex items-center space-x-2",onClick:ie=>{ie.stopPropagation(),U(Q),k(!0),M(null)},children:[r.jsx(th,{className:"w-4 h-4"}),r.jsx("span",{children:"Ban User"})]})),r.jsx("div",{className:"border-t border-white/10 my-1"}),r.jsxs("button",{className:"w-full px-4 py-2 text-left text-sm text-red-400 hover:bg-white/10 flex items-center space-x-2",onClick:ie=>{ie.stopPropagation(),M(null),Ge(Q)},children:[r.jsx(xu,{className:"w-4 h-4"}),r.jsx("span",{children:"Delete User"})]})]})]})})]},Q.id))})]})}),r.jsx(b5,{currentPage:d,totalPages:le,onPageChange:Ye,totalItems:Be.length,startIndex:he,endIndex:xe})]}),C&&r.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:r.jsxs("div",{className:"overflow-x-hidden bg-black/90 border border-white/10 p-6 w-full pt-4 max-w-2xl rounded-none",children:[r.jsxs("div",{className:"flex items-center justify-between mb-6",children:[r.jsxs("h3",{className:"text-sm text-white flex items-center justify-center font-light uppercase",children:[r.jsx("span",{className:"text-white/50 mr-2",children:"["}),r.jsx(yo,{className:"inline mr-2 w-3 h-3 text-white"}),r.jsx("span",{className:"font-mono text-white/70 uppercase",children:"Seed User"}),r.jsx("span",{className:"text-white/50 ml-2",children:"]"})]}),r.jsx($,{variant:"ghost",size:"sm",onClick:()=>{T(!1),te("")},className:"text-gray-400 hover:text-white rounded-none",children:r.jsx(tn,{className:"w-4 h-4"})})]}),r.jsx("hr",{className:"border-white/10 -mx-10 border-dashed -mt-4 mb-4"}),r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{className:"space-y-4",children:[r.jsx("div",{className:"flex items-center space-x-2"}),r.jsxs("div",{className:"space-y-4",children:[r.jsx("div",{className:"flex items-center space-x-3",children:r.jsxs("div",{className:"flex-1",children:[r.jsx(pe,{htmlFor:"user-count",className:"text-sm text-gray-400 font-light",children:"Number of users"}),r.jsx(Te,{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"})]})}),r.jsxs("div",{className:"flex-1",children:[r.jsx(pe,{htmlFor:"seed-role",className:"text-sm text-gray-400 font-light",children:"Role (optional)"}),r.jsxs(Ua,{className:"bg-black text-white",value:ne,onValueChange:te,children:[r.jsx(Pa,{id:"seed-role",className:"mt-1 border border-dashed border-white/20 bg-black text-white rounded-none",children:r.jsx(yi,{placeholder:"Select role (optional)"})}),r.jsxs(Fa,{children:[r.jsx(Ve,{value:"",children:"None"}),r.jsx(Ve,{value:"admin",children:"Admin"}),r.jsx(Ve,{value:"user",children:"User"}),r.jsx(Ve,{value:"mix",children:"Mix (Random)"})]})]})]}),r.jsx($,{onClick:()=>{var ie;const Q=parseInt(((ie=document.getElementById("user-count"))==null?void 0:ie.value)||"5",10);Ue(Q,ne||void 0)},disabled:fe,className:"bg-transparent hover:bg-white/90 bg-white text-black border border-white/20 rounded-none mt-6 disabled:opacity-50",children:fe?r.jsxs(r.Fragment,{children:[r.jsx(ir,{className:"w-3 h-3 mr-2 animate-spin"}),"Seeding..."]}):r.jsxs(r.Fragment,{children:[r.jsx(Vt,{className:"w-3 h-3 mr-2"}),"Seed Users"]})})]})]}),ge.length>0&&r.jsx("div",{className:"mt-6",children:r.jsx(ji,{title:"User Seeding Terminal",lines:ge,isRunning:fe,className:"w-full",defaultCollapsed:!0})})]}),r.jsx("hr",{className:"border-white/10 -mx-10 border-dashed mt-10"}),r.jsx("div",{className:"flex justify-end mt-6 pt-6",children:r.jsx($,{variant:"outline",onClick:()=>{T(!1),te("")},className:"border border-dashed border-white/20 text-white hover:bg-white/10 rounded-none",children:"Close"})})]})}),v&&r.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:r.jsxs("div",{className:"bg-black/90 border border-white/10 p-6 w-full max-w-md rounded-none",children:[r.jsxs("div",{className:"flex items-center justify-between mb-4",children:[r.jsx("h3",{className:"text-lg text-white font-light",children:"Create User"}),r.jsx($,{variant:"ghost",size:"sm",onClick:()=>{x(!1),ae("")},className:"text-gray-400 hover:text-white rounded-none",children:r.jsx(tn,{className:"w-4 h-4"})})]}),r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{children:[r.jsx(pe,{htmlFor:"create-name",className:"text-sm text-gray-400 font-light",children:"Name"}),r.jsx(Te,{id:"create-name",className:"mt-1 border border-dashed border-white/20 bg-black/30 text-white rounded-none"})]}),r.jsxs("div",{children:[r.jsx(pe,{htmlFor:"create-email",className:"text-sm text-gray-400 font-light",children:"Email"}),r.jsx(Te,{id:"create-email",type:"email",className:"mt-1 border border-dashed border-white/20 bg-black/30 text-white rounded-none"})]}),r.jsxs("div",{children:[r.jsx(pe,{htmlFor:"create-password",className:"text-sm text-gray-400 font-light",children:"Password"}),r.jsx(Te,{id:"create-password",type:"password",className:"mt-1 border border-dashed border-white/20 bg-black/30 text-white rounded-none"})]}),r.jsxs("div",{children:[r.jsx(pe,{htmlFor:"create-role",className:"text-sm text-gray-400 font-light",children:"Role"}),r.jsxs(Ua,{className:"bg-black text-white",value:ee,onValueChange:ae,children:[r.jsx(Pa,{id:"create-role",className:"mt-1 border border-dashed border-white/20 bg-black text-white rounded-none",children:r.jsx(yi,{placeholder:"Select role"})}),r.jsxs(Fa,{children:[r.jsx(Ve,{value:"",children:"None"}),r.jsx(Ve,{value:"admin",children:"Admin"}),r.jsx(Ve,{value:"user",children:"User"})]})]})]})]}),r.jsxs("div",{className:"flex justify-end space-x-3 mt-6",children:[r.jsx($,{variant:"outline",onClick:()=>{x(!1),ae("")},className:"border border-dashed border-white/20 text-white hover:bg-white/10 rounded-none",children:"Cancel"}),r.jsx($,{onClick:jt,className:"bg-white hover:bg-white/90 text-black border border-white/20 rounded-none",children:"Create"})]})]})}),N&&j&&r.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:r.jsxs("div",{className:"bg-black/90 border border-dashed border-white/20 p-6 w-full max-w-md rounded-none",children:[r.jsxs("div",{className:"flex items-center justify-between mb-4",children:[r.jsx("h3",{className:"text-lg text-white font-light",children:"Edit User"}),r.jsx($,{variant:"ghost",size:"sm",onClick:()=>{b(!1),K("")},className:"text-gray-400 hover:text-white rounded-none",children:r.jsx(tn,{className:"w-4 h-4"})})]}),r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{className:"flex items-center space-x-3",children:[r.jsx("img",{src:j.image||`https://api.dicebear.com/7.x/avataaars/svg?seed=${j.id}`,alt:j.name,className:"w-16 h-16 rounded-none border border-dashed border-white/20"}),r.jsxs("div",{children:[r.jsx("div",{className:"text-white font-light",children:j.name}),r.jsx("div",{className:"text-sm text-gray-400",children:j.email})]})]}),r.jsxs("div",{children:[r.jsx(pe,{htmlFor:"edit-name",className:"text-sm text-gray-400 font-light",children:"Name"}),r.jsx(Te,{id:"edit-name",defaultValue:j.name,className:"mt-1 border border-dashed border-white/20 bg-black/30 text-white rounded-none"})]}),r.jsxs("div",{children:[r.jsx(pe,{htmlFor:"edit-email",className:"text-sm text-gray-400 font-light",children:"Email"}),r.jsx(Te,{id:"edit-email",type:"email",defaultValue:j.email,className:"mt-1 border border-dashed border-white/20 bg-black/30 text-white rounded-none"})]}),r.jsxs("div",{children:[r.jsx(pe,{htmlFor:"edit-role",className:"text-sm text-gray-400 font-light",children:"Role"}),r.jsxs(Ua,{value:X,onValueChange:K,children:[r.jsx(Pa,{id:"edit-role",className:"mt-1 border border-dashed border-white/20 bg-black/30 text-white rounded-none",children:r.jsx(yi,{placeholder:"Select role"})}),r.jsxs(Fa,{children:[r.jsx(Ve,{value:"",children:"None"}),r.jsx(Ve,{value:"admin",children:"Admin"}),r.jsx(Ve,{value:"user",children:"User"})]})]})]})]}),r.jsxs("div",{className:"flex justify-end space-x-3 mt-6",children:[r.jsx($,{variant:"outline",onClick:()=>{b(!1),K("")},className:"border border-dashed border-white/20 text-white hover:bg-white/10 rounded-none",children:"Cancel"}),r.jsx($,{onClick:vt,className:"bg-white hover:bg-white/90 text-black border border-white/20 rounded-none",children:"Update"})]})]})}),y&&j&&r.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:r.jsxs("div",{className:"bg-black/90 border border-dashed border-white/20 p-6 w-full max-w-md rounded-none",children:[r.jsxs("div",{className:"flex items-center justify-between mb-4",children:[r.jsx("h3",{className:"text-lg text-white font-light",children:"Delete User"}),r.jsx($,{variant:"ghost",size:"sm",onClick:()=>g(!1),className:"text-gray-400 hover:text-white rounded-none",children:r.jsx(tn,{className:"w-4 h-4"})})]}),r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{className:"flex items-center space-x-3",children:[r.jsx("img",{src:j.image||`https://api.dicebear.com/7.x/avataaars/svg?seed=${j.id}`,alt:j.name,className:"w-16 h-16 rounded-none border border-dashed border-white/20"}),r.jsxs("div",{children:[r.jsx("div",{className:"text-white font-light",children:j.name}),r.jsx("div",{className:"text-sm text-gray-400",children:j.email})]})]}),r.jsx("p",{className:"text-gray-400",children:"Are you sure you want to delete this user? This action cannot be undone."})]}),r.jsxs("div",{className:"flex justify-end space-x-3 mt-6",children:[r.jsx($,{variant:"outline",onClick:()=>g(!1),className:"border border-dashed border-white/20 text-white hover:bg-white/10 rounded-none",children:"Cancel"}),r.jsx($,{onClick:We,className:"bg-red-600 hover:bg-red-700 text-white border border-red-600 rounded-none",children:"Delete"})]})]})}),w&&j&&r.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:r.jsxs("div",{className:"bg-black/90 border border-dashed border-white/20 p-6 w-full max-w-md rounded-none",children:[r.jsxs("div",{className:"flex items-center justify-between mb-4",children:[r.jsx("h3",{className:"text-lg text-white font-light",children:"User Details"}),r.jsx($,{variant:"ghost",size:"sm",onClick:()=>S(!1),className:"text-gray-400 hover:text-white rounded-none",children:r.jsx(tn,{className:"w-4 h-4"})})]}),r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{className:"flex items-center space-x-3",children:[r.jsx("img",{src:j.image||`https://api.dicebear.com/7.x/avataaars/svg?seed=${j.id}`,alt:j.name,className:"w-16 h-16 rounded-none border border-dashed border-white/20"}),r.jsxs("div",{children:[r.jsx("div",{className:"text-white font-light",children:j.name}),r.jsx("div",{className:"text-sm text-gray-400",children:j.email})]})]}),r.jsxs("div",{className:"space-y-2",children:[r.jsx(Ln,{id:j.id,variant:"detail"}),r.jsxs("div",{className:"flex justify-between",children:[r.jsx("span",{className:"text-gray-400",children:"Email Verified:"}),r.jsx("span",{className:"text-white text-sm",children:j.emailVerified?"Yes":"No"})]}),r.jsxs("div",{className:"flex justify-between",children:[r.jsx("span",{className:"text-gray-400",children:"Created:"}),r.jsx("span",{className:"text-white text-sm",children:new Date(j.createdAt).toLocaleString()})]}),r.jsxs("div",{className:"flex justify-between",children:[r.jsx("span",{className:"text-gray-400",children:"Updated:"}),r.jsx("span",{className:"text-white text-sm",children:new Date(j.updatedAt).toLocaleString()})]})]})]}),r.jsx("div",{className:"flex justify-end mt-6",children:r.jsx($,{onClick:()=>S(!1),className:"bg-white hover:bg-white/90 text-black border border-white/20 rounded-none",children:"Close"})})]})}),E&&j&&r.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:r.jsxs("div",{className:"bg-black border border-red-400/20 rounded-none p-6 w-full max-w-md",children:[r.jsx("h2",{className:"text-xl font-bold text-white mb-4",children:"Ban User"}),r.jsxs("p",{className:"text-gray-400 mb-4",children:["Ban ",r.jsx("strong",{children:j.name})," from accessing the system."]}),r.jsxs("div",{className:"space-y-4 mb-6",children:[r.jsxs("div",{children:[r.jsx(pe,{htmlFor:"banReason",className:"text-white",children:"Ban Reason"}),r.jsx(Te,{id:"banReason",value:A,onChange:Q=>D(Q.target.value),placeholder:"Enter reason for ban (optional)",className:"bg-black border border-dashed border-white/20 text-white rounded-none"})]}),r.jsxs("div",{children:[r.jsx(pe,{htmlFor:"banExpires",className:"text-white",children:"Ban Duration (seconds)"}),r.jsx(Te,{id:"banExpires",type:"number",value:B||"",onChange:Q=>G(Q.target.value?Number(Q.target.value):void 0),placeholder:"Leave empty for permanent ban",className:"bg-black border border-dashed border-white/20 text-white rounded-none"}),r.jsx("p",{className:"text-xs text-gray-400 mt-1",children:"Examples: 3600 (1 hour), 86400 (1 day), 604800 (1 week)"})]})]}),r.jsxs("div",{className:"flex justify-end space-x-2",children:[r.jsx($,{variant:"outline",onClick:()=>{k(!1),D(""),G(void 0),U(null)},className:"border border-dashed border-white/20 text-white hover:bg-white/10 rounded-none",children:"Cancel"}),r.jsx($,{onClick:et,className:"bg-red-600 text-white hover:bg-red-700 rounded-none",children:"Ban User"})]})]})}),O&&j&&r.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:r.jsxs("div",{className:"bg-black border border-dashed border-green-400/50 rounded-none p-6 w-full max-w-md",children:[r.jsx("h2",{className:"text-xl font-bold text-white mb-4",children:"Unban User"}),r.jsxs("p",{className:"text-gray-400 mb-6",children:["Are you sure you want to unban ",r.jsx("strong",{children:j.name}),"? This will restore their access to the system."]}),r.jsxs("div",{className:"flex justify-end space-x-2",children:[r.jsx($,{variant:"outline",onClick:()=>{R(!1),U(null)},className:"border border-dashed border-white/20 text-white hover:bg-white/10 rounded-none",children:"Cancel"}),r.jsx($,{onClick:Ze,className:"bg-green-600 text-white hover:bg-green-700 rounded-none",children:"Unban User"})]})]})}),I&&j&&r.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:r.jsxs("div",{className:"bg-black/90 border border-dashed border-white/20 p-6 w-full max-w-md rounded-none",children:[r.jsxs("div",{className:"flex items-center justify-between mb-4",children:[r.jsx("h3",{className:"text-lg text-white font-light",children:"Update Password"}),r.jsx($,{variant:"ghost",size:"sm",onClick:()=>{F(!1),U(null),document.getElementById("update-password").value=""},className:"text-gray-400 hover:text-white rounded-none",children:r.jsx(tn,{className:"w-4 h-4"})})]}),r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{className:"flex items-center space-x-3",children:[r.jsx("img",{src:j.image||`https://api.dicebear.com/7.x/avataaars/svg?seed=${j.id}`,alt:j.name,className:"w-16 h-16 rounded-none border border-dashed border-white/20"}),r.jsxs("div",{children:[r.jsx("div",{className:"text-white font-light",children:j.name}),r.jsx("div",{className:"text-sm text-gray-400",children:j.email})]})]}),r.jsxs("div",{children:[r.jsx(pe,{htmlFor:"update-password",className:"text-sm text-gray-400 font-light",children:"New Password"}),r.jsx(Te,{id:"update-password",type:"password",placeholder:"Enter new password",className:"mt-1 border border-dashed border-white/20 bg-black/30 text-white rounded-none"})]})]}),r.jsxs("div",{className:"flex justify-end space-x-3 mt-6",children:[r.jsx($,{variant:"outline",onClick:()=>{F(!1),U(null),document.getElementById("update-password").value=""},className:"border border-dashed border-white/20 text-white hover:bg-white/10 rounded-none",children:"Cancel"}),r.jsx($,{onClick:Et,className:"bg-white hover:bg-white/90 text-black border border-white/20 rounded-none",children:"Update Password"})]})]})})]})}const Lc=[{id:"signups",label:"Signups",analyticsKey:"newUsers",barClass:"bg-white/25 border border-white/10",dotClass:"bg-white/25"},{id:"logins",label:"Logins",analyticsKey:"activeUsers",barClass:"bg-white/20 border border-white/10",dotClass:"bg-white/20"},{id:"organizations",label:"Organizations",analyticsKey:"organizations",barClass:"bg-white/15 border border-white/10",dotClass:"bg-white/15"},{id:"teams",label:"Teams",analyticsKey:"teams",barClass:"bg-white/10 border border-white/10",dotClass:"bg-white/10"},{id:"sessions",label:"Sessions",analyticsKey:"sessions",barClass:"bg-white/5 border border-white/10",dotClass:"bg-white/5"}];function Pte(){const[e]=m.useState("overview"),[t,n]=m.useState(!1),[a,s]=m.useState(0),[i,o]=m.useState(0),[l,c]=m.useState("1D"),[u,h]=m.useState("1D"),[d,f]=m.useState(null),[p,v]=m.useState(!1),[x,N]=m.useState("Daily"),[b,y]=m.useState("Daily"),[g,w]=m.useState("Daily"),[S,C]=m.useState("Daily"),[T,E]=m.useState(!1),[k,O]=m.useState(!1),[R,I]=m.useState(!1),[F,j]=m.useState(!1),[U,_]=m.useState(null),[M,A]=m.useState(null),[D,B]=m.useState(null),[G,L]=m.useState(null),[q,X]=m.useState(null),[K,ne]=m.useState(void 0),[te,ee]=m.useState(void 0),[ae,ge]=m.useState(void 0),[se,fe]=m.useState(void 0),[me,Re]=m.useState(void 0),[Me,Ue]=m.useState(void 0),[$e,pt]=m.useState(void 0),[Ge,jt]=m.useState(void 0),[vt,We]=m.useState([]),[et,Ze]=m.useState([]),[Et,Tt]=m.useState(0),[qt,Wt]=m.useState([]),[re,we]=m.useState([]),[Be,V]=m.useState(0),[le,he]=m.useState(0),[xe,De]=m.useState(0),[Ye,Q]=m.useState(0),[ie,Ne]=m.useState(0),[ue,ke]=m.useState(!1),[W,Y]=m.useState(!1),[be,He]=m.useState({signups:[],logins:[],organizations:[],teams:[],sessions:[]}),[tt,rt]=m.useState([]),[Qe,Jt]=m.useState(!1),[pn,ln]=m.useState(0),[Xt,Gr]=m.useState(0),[wn,Rn]=m.useState(0),[Va,Vr]=m.useState(0),[Do,As]=m.useState(0),[Ya,kt]=m.useState([]),[Yr,Wr]=m.useState(0),[Xr,pr]=m.useState(0),[Kr,mr]=m.useState(0),{counts:Wa,loading:Fn}=Mp(),Bn=ur(),Ea=["Daily","Weekly","Monthly","Yearly","Custom"],js={Daily:"1D",Weekly:"1W",Monthly:"1M",Yearly:"1Y",Custom:"Custom"},Qn=m.useMemo(()=>new Intl.NumberFormat("en-US",{notation:"compact",maximumFractionDigits:1}),[]),Jn=ye=>ye==null?"...":Qn.format(Number(ye)),Xa=ye=>ye==null?"...":Number(ye).toLocaleString(),ks=m.useMemo(()=>Lc.reduce((ye,ve)=>(ye[ve.id]=(be[ve.id]||[]).reduce((Ee,de)=>Ee+de,0),ye),{}),[be]),_s=m.useMemo(()=>Object.values(ks).reduce((ye,ve)=>ye+ve,0),[ks]),Io=(ye,ve)=>{const Ee=ye.currentTarget.getBoundingClientRect();L(ve),X({x:Ee.left+Ee.width/2,y:Ee.top})},Mi=(()=>{const ye=[];return U!=null&&U.isOutdated?ye.push({id:"version-check",title:`Update Better-Auth to v${U.latest}`,severity:"high",date:new Date().toISOString().split("T")[0],description:"Your current version is outdated. Update to the latest version to get the latest security fixes, features, and improvements. Run: `pnpm install better-auth@latest`",affectedComponents:["All Components"],status:"pending",cve:""}):U&&ye.push({id:"version-check",title:"Better-Auth is Up to date",severity:"low",date:new Date().toISOString().split("T")[0],description:"You are running the latest version of better-auth. Great job keeping your dependencies up to date!",affectedComponents:["All Components"],status:"applied",cve:""}),ye.push(),ye.push({id:"3",title:"Rate Limiting Configuration",severity:"medium",date:new Date().toISOString().split("T")[0],description:"Configure rate limiting for authentication endpoints to prevent brute force attacks. Better-auth provides built-in rate limiting middleware.",affectedComponents:["Auth Endpoints"],status:"pending"}),ye})(),dt=m.useCallback(async(ye,ve,Ee,de)=>{try{const je=new URLSearchParams({type:ye,period:ve});return Ee&&je.append("from",Ee.toISOString()),de&&je.append("to",de.toISOString()),await(await fetch(`/api/analytics?${je.toString()}`)).json()}catch{return null}},[]);m.useEffect(()=>{(async()=>{try{const Ee=await(await fetch("/api/users/all")).json();Ee!=null&&Ee.success&&Ee.users&&kt(Ee.users)}catch{kt([])}})()},[]),m.useEffect(()=>{(async()=>{try{const Ee=await(await fetch("/api/stats")).json();Ee&&s(Ee.activeUsers||0)}catch{s(0)}})()},[]),m.useEffect(()=>{(async()=>{const ve=await dt("users",l,K,te);ve&&(We(ve.data||[]),Ze(ve.labels||[]),Tt(ve.percentageChange||0))})()},[l,K,te,dt]),m.useEffect(()=>{if(Ya.length===0){Wr(0),pr(0);return}const ye=new Date;let ve,Ee=ye,de,je;if(b==="Custom"){if(!ae||!se){Wr(0),pr(0);return}ve=new Date(ae),Ee=new Date(se),Ee.setHours(23,59,59,999);const _t=Ee.getTime()-ve.getTime();je=new Date(ve.getTime()-1),de=new Date(je.getTime()-_t)}else switch(b){case"Daily":ve=new Date(ye),ve.setHours(0,0,0,0),je=new Date(ve.getTime()-1),de=new Date(je.getTime()-24*60*60*1e3);break;case"Weekly":ve=new Date(ye),ve.setDate(ye.getDate()-ye.getDay()),ve.setHours(0,0,0,0),je=new Date(ve.getTime()-1),de=new Date(je.getTime()-7*24*60*60*1e3);break;case"Monthly":ve=new Date(ye.getFullYear(),ye.getMonth(),1),ve.setHours(0,0,0,0),je=new Date(ve.getTime()-1),de=new Date(ye.getFullYear(),ye.getMonth()-1,1),de.setHours(0,0,0,0);break;case"Yearly":ve=new Date(ye.getFullYear(),0,1),ve.setHours(0,0,0,0),je=new Date(ve.getTime()-1),de=new Date(ye.getFullYear()-1,0,1),de.setHours(0,0,0,0);break;default:Wr(0),pr(0);return}const Le=Ya.filter(_t=>{if(!_t.createdAt)return!1;const zn=new Date(_t.createdAt);return zn>=ve&&zn<=Ee}),Oe=Ya.filter(_t=>{if(!_t.createdAt)return!1;const zn=new Date(_t.createdAt);return zn>=de&&zn<=je}),Ce=Le.length,nt=Oe.length;let _e=0;nt>0?_e=(Ce-nt)/nt*100:Ce>0&&(_e=100),Wr(Ce),pr(_e)},[Ya,b,ae,se]),m.useEffect(()=>{(async()=>{if(!(u==="Custom"&&(!ae||!se))){Jt(!0);try{const[ve,Ee,de,je,Le]=await Promise.all([dt("newUsers",u,ae,se),dt("activeUsers",u,ae,se),dt("organizations",u,ae,se),dt("teams",u,ae,se),dt("sessions",u,ae,se)]);ve&&(Wt(ve.data||[]),we(ve.labels||[])),He({signups:(ve==null?void 0:ve.data)||[],logins:(Ee==null?void 0:Ee.data)||[],organizations:(de==null?void 0:de.data)||[],teams:(je==null?void 0:je.data)||[],sessions:(Le==null?void 0:Le.data)||[]}),rt((ve==null?void 0:ve.labels)||(Ee==null?void 0:Ee.labels)||(de==null?void 0:de.labels)||(je==null?void 0:je.labels)||(Le==null?void 0:Le.labels)||[])}finally{Jt(!1)}}})()},[u,ae,se,dt]),m.useEffect(()=>{(async()=>{const ve=await dt("activeUsers","1D");ve&&V(ve.percentageChange||0)})()},[dt]),m.useEffect(()=>{},[Wa.organizations,Wa.teams,Fn]),m.useEffect(()=>{(async()=>{const ve=js[g]||"1D",Ee=ve==="Custom";if(!(Ee&&(!me||!Me))){ke(!0);try{const de=await dt("organizations",ve,Ee?me:void 0,Ee?Me:void 0);de&&(Q(de.total||0),he(de.percentageChange||0))}catch{Q(0),he(0)}finally{ke(!1)}}})()},[g,me,Me,dt]),m.useEffect(()=>{(async()=>{const ve=js[S]||"1D",Ee=ve==="Custom";if(!(Ee&&(!$e||!Ge))){Y(!0);try{const de=await dt("teams",ve,Ee?$e:void 0,Ee?Ge:void 0);de&&(Ne(de.total||0),De(de.percentageChange||0))}catch{Ne(0),De(0)}finally{Y(!1)}}})()},[S,$e,Ge,dt]),m.useEffect(()=>{(async()=>{const ve=await dt("users","1D");ve&&ln(ve.percentageChange||0);const Ee=await dt("organizations","1D");Ee&&Gr(Ee.percentageChange||0);const de=await dt("activeUsers","1D");de&&Rn(de.percentageChange||0);const[je,Le,Oe,Ce,nt]=await Promise.all([dt("newUsers","1D"),dt("activeUsers","1D"),dt("organizations","1D"),dt("teams","1D"),dt("sessions","1D")]);je?(o(je.total||0),mr(je.percentageChange||0)):(o(0),mr(0));const _t=[(je==null?void 0:je.total)||0,(Le==null?void 0:Le.total)||0,(Oe==null?void 0:Oe.total)||0,(Ce==null?void 0:Ce.total)||0,(nt==null?void 0:nt.total)||0].reduce((ea,Li)=>ea+Li,0);As(_t);const Ca=[(je==null?void 0:je.previousTotal)||0,(Le==null?void 0:Le.previousTotal)||0,(Oe==null?void 0:Oe.previousTotal)||0,(Ce==null?void 0:Ce.previousTotal)||0,(nt==null?void 0:nt.previousTotal)||0].reduce((ea,Li)=>ea+Li,0);if(Ca>0){const ea=(_t-Ca)/Ca*100;Vr(ea)}else _t>0?Vr(100):Vr(0)})()},[dt]),m.useEffect(()=>{(async()=>{try{const Ee=await(await fetch("/api/version-check")).json();Ee&&_({current:Ee.current||"1.0.0",latest:Ee.latest||"1.0.0",isOutdated:Ee.isOutdated||!1})}catch{try{const je=(await(await fetch("/api/package-info")).json()).betterAuthVersion||"1.0.0",Le="1.5.0";_({current:je,latest:Le,isOutdated:je!==Le})}catch{_({current:"1.0.0",latest:"1.5.0",isOutdated:!0})}}})()},[]);const gr=ye=>{switch(ye){case"critical":return"bg-white/10 text-white border-white/20";case"high":return"bg-white/10 text-white border-white/20";case"medium":return"bg-white/10 text-gray-300 border-white/20";case"low":return"bg-white/10 text-gray-400 border-white/20";default:return"bg-white/10 text-gray-400 border-white/20"}},br=ye=>{switch(ye){case"applied":return"bg-white/10 text-white border-white/20";case"scheduled":return"bg-white/10 text-gray-300 border-white/20";case"pending":return"bg-white/10 text-gray-400 border-white/20";default:return"bg-white/10 text-gray-400 border-white/20"}},Os=ye=>{f(ye),v(!0)},Zr=()=>{v(!1),setTimeout(()=>f(null),300)},Ta=(ye,ve="users")=>{const Ee=ve==="users"?et:re,je={"1D":24,"1W":7,"1M":30,"3M":3,"6M":6,"1Y":12,ALL:7}[ye]||7;if(Ee&&Ee.length>0&&Ee.length===je)return ye==="1D"?Ee.filter((Oe,Ce)=>Ce%4===0).map(Oe=>{const Ce=parseInt(Oe.replace("h",""),10);return Ce===0?"12am":Ce<12?`${Ce}am`:Ce===12?"12pm":`${Ce-12}pm`}):ye==="1W"?Ee.map(Oe=>Oe.length>3?Oe.substring(0,3):Oe):ye==="1M"?Ee.map(Oe=>{const Ce=Oe.split(" ");return Ce.length>=2?Ce[1]:Oe}):ye==="1Y"||ye==="3M"||ye==="6M"?Ee.map(Oe=>Oe.length>3?Oe.substring(0,3):Oe):Ee.map(Oe=>Oe.length>3?Oe.substring(0,3):Oe);const Le=new Date;switch(ye){case"1D":return["12am","4am","8am","12pm","4pm","8pm"];case"1W":return Array.from({length:7},(Oe,Ce)=>new Date(Le.getTime()-(6-Ce)*24*60*60*1e3).toLocaleDateString("en-US",{weekday:"short"}));case"1M":return Array.from({length:30},(Oe,Ce)=>new Date(Le.getTime()-(29-Ce)*24*60*60*1e3).getDate().toString());case"3M":return Array.from({length:3},(Oe,Ce)=>new Date(Le.getFullYear(),Le.getMonth()-(2-Ce),1).toLocaleDateString("en-US",{month:"short"}));case"6M":return Array.from({length:6},(Oe,Ce)=>new Date(Le.getFullYear(),Le.getMonth()-(5-Ce),1).toLocaleDateString("en-US",{month:"short"}));case"1Y":return Array.from({length:12},(Oe,Ce)=>new Date(Le.getFullYear(),Le.getMonth()-(11-Ce),1).toLocaleDateString("en-US",{month:"short"}));case"ALL":return Array.from({length:7},(Oe,Ce)=>new Date(Le.getFullYear(),Le.getMonth()-(6-Ce),1).toLocaleDateString("en-US",{month:"short"}));default:return["Mon","Tue","Wed","Thu","Fri","Sat","Sun"]}},Mo=(ye,ve="users")=>{const Ee=ve==="users"?et:re,je={"1D":24,"1W":7,"1M":30,"3M":3,"6M":6,"1Y":12,ALL:7}[ye]||7;if(Ee&&Ee.length>0&&Ee.length===je)return ye==="1D"?Ee.map(Oe=>{const Ce=parseInt(Oe.replace("h",""),10);return Ce===0?"12am":Ce<12?`${Ce}am`:Ce===12?"12pm":`${Ce-12}pm`}):ye==="1Y"||ye==="3M"||ye==="6M"?Ee.map(Oe=>{const Ce=["January","February","March","April","May","June","July","August","September","October","November","December"],_e=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"].indexOf(Oe);return _e!==-1?Ce[_e]:Oe}):Ee;const Le=new Date;switch(ye){case"1D":return Array.from({length:24},(Oe,Ce)=>{const nt=new Date;return nt.setHours(Ce,0,0,0),nt.toLocaleTimeString("en-US",{hour:"numeric",hour12:!0})});case"1W":return Array.from({length:7},(Oe,Ce)=>new Date(Le.getTime()-(6-Ce)*24*60*60*1e3).toLocaleDateString("en-US",{weekday:"long"}));case"1M":return Array.from({length:30},(Oe,Ce)=>{const nt=new Date(Le.getTime()-(29-Ce)*24*60*60*1e3),_e=nt.toLocaleDateString("en-US",{month:"short"}),_t=nt.getDate();return`${_e} ${_t}`});case"3M":return Array.from({length:3},(Oe,Ce)=>new Date(Le.getFullYear(),Le.getMonth()-(2-Ce),1).toLocaleDateString("en-US",{month:"long"}));case"6M":return Array.from({length:6},(Oe,Ce)=>new Date(Le.getFullYear(),Le.getMonth()-(5-Ce),1).toLocaleDateString("en-US",{month:"long"}));case"1Y":return Array.from({length:12},(Oe,Ce)=>new Date(Le.getFullYear(),Le.getMonth()-(11-Ce),1).toLocaleDateString("en-US",{month:"long"}));case"ALL":return Array.from({length:7},(Oe,Ce)=>new Date(Le.getFullYear(),Le.getMonth()-(6-Ce),1).toLocaleDateString("en-US",{month:"long"}));default:return["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"]}},xr=(ye,ve="users")=>{const Ee=ve==="users"?vt:qt,je={"1D":24,"1W":7,"1M":30,"3M":3,"6M":6,"1Y":12,ALL:7}[ye]||7;if(!Ee||Ee.length===0)return Array(je).fill(0);const Le=[...Ee];for(;Le.length<je;)Le.push(0);const Oe=Le.slice(0,je),Ce=Math.max(...Oe,1);return Oe.map(nt=>nt/Ce*100)},Ds=()=>{const ye=tt.length>0?tt:Ta(u,"users"),ve=ye.map((de,je)=>Lc.reduce((Le,Oe)=>{var Ce;return Le+(((Ce=be[Oe.id])==null?void 0:Ce[je])??0)},0)),Ee=Math.max(...ve,1);return r.jsxs("div",{className:"space-y-6 min-h-screen h-full mt-5 flex-1 overflow-y-hidden overflow-x-hidden px-0",children:[r.jsx("div",{className:"px-6 overflow-hidden",children:r.jsxs("div",{className:"flex items-center justify-between gap-8 py-4 px-6 bg-white/5 border border-white/10 rounded-none overflow-x-auto relative",children:[r.jsx("div",{className:"absolute top-0 left-0 w-[12px] h-[0.5px] bg-white/30"}),r.jsx("div",{className:"absolute top-0 left-0 w-[0.5px] h-[12px] bg-white/30"}),r.jsx("div",{className:"absolute top-0 right-0 w-[12px] h-[0.5px] bg-white/30"}),r.jsx("div",{className:"absolute top-0 right-0 w-[0.5px] h-[12px] bg-white/30"}),r.jsx("div",{className:"absolute bottom-0 left-0 w-[12px] h-[0.5px] bg-white/30"}),r.jsx("div",{className:"absolute bottom-0 left-0 w-[0.5px] h-[12px] bg-white/30"}),r.jsx("div",{className:"absolute bottom-0 right-0 w-[12px] h-[0.5px] bg-white/30"}),r.jsx("div",{className:"absolute bottom-0 right-0 w-[0.5px] h-[12px] bg-white/30"}),r.jsxs("div",{className:"flex items-center gap-3 min-w-fit",children:[r.jsx("div",{className:"w-10 h-10 rounded-none bg-white/5 border border-dashed border-white/10 flex items-center justify-center flex-shrink-0",children:r.jsx(Ct,{className:"w-5 h-5 text-white"})}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("span",{className:"text-gray-400 text-sm uppercase tracking-wide",children:"Users"}),r.jsx("span",{className:"text-white text-lg font-medium",children:Fn?"...":Jn(Wa.users)}),r.jsxs("div",{className:`flex items-center gap-1 ${pn>=0?"text-green-500":"text-red-500"}`,children:[r.jsx("svg",{className:`w-3 h-3 ${pn<0?"rotate-180":""}`,viewBox:"0 0 12 12",fill:"currentColor",children:r.jsx("path",{d:"M6 0 L12 12 L0 12 Z"})}),r.jsxs("span",{className:"text-sm font-medium",children:[Math.abs(pn).toFixed(1),"%"]})]})]})]}),r.jsx("div",{className:"h-8 w-[1px] bg-white/10"}),r.jsxs("div",{className:"flex items-center gap-3 min-w-fit",children:[r.jsx("div",{className:"w-10 h-10 rounded-none bg-white/5 border border-dashed border-white/10 flex items-center justify-center flex-shrink-0",children:r.jsx(ha,{className:"w-5 h-5 text-white"})}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("span",{className:"text-gray-400 text-sm uppercase tracking-wide",children:"Organizations"}),r.jsx("span",{className:"text-white text-lg font-medium",children:Fn?"...":Jn(Wa.organizations)}),r.jsxs("div",{className:`flex items-center gap-1 ${Xt>=0?"text-green-500":"text-red-500"}`,children:[r.jsx("svg",{className:`w-3 h-3 ${Xt<0?"rotate-180":""}`,viewBox:"0 0 12 12",fill:"currentColor",children:r.jsx("path",{d:"M6 0 L12 12 L0 12 Z"})}),r.jsxs("span",{className:"text-sm font-medium",children:[Math.abs(Xt).toFixed(1),"%"]})]})]})]}),r.jsx("div",{className:"h-8 w-[1px] bg-white/10"}),r.jsxs("div",{className:"flex items-center gap-3 min-w-fit",children:[r.jsx("div",{className:"w-10 h-10 rounded-none bg-white/5 border border-dashed border-white/10 flex items-center justify-center flex-shrink-0",children:r.jsx(pC,{className:"w-5 h-5 text-white"})}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("span",{className:"text-gray-400 text-sm uppercase tracking-wide",children:"Sessions"}),r.jsx("span",{className:"text-white text-lg font-medium",children:Fn?"...":Jn(Wa.sessions)}),r.jsxs("div",{className:`flex items-center gap-1 ${wn>=0?"text-green-500":"text-red-500"}`,children:[r.jsx("svg",{className:`w-3 h-3 ${wn<0?"rotate-180":""}`,viewBox:"0 0 12 12",fill:"currentColor",children:r.jsx("path",{d:"M6 0 L12 12 L0 12 Z"})}),r.jsxs("span",{className:"text-sm font-medium",children:[Math.abs(wn).toFixed(1),"%"]})]})]})]}),r.jsx("div",{className:"h-8 w-[1px] bg-white/10"}),r.jsxs("div",{className:"flex items-center gap-3 min-w-fit",children:[r.jsx("div",{className:"w-10 h-10 rounded-none bg-white/5 border border-dashed border-white/10 flex items-center justify-center flex-shrink-0",children:r.jsx(hC,{className:"w-5 h-5 text-white"})}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("span",{className:"text-gray-400 text-sm uppercase tracking-wide",children:"Activity Hits"}),r.jsx("span",{className:"text-white text-lg font-medium",children:Fn?"...":Jn(Do??0)}),r.jsxs("div",{className:`flex items-center gap-1 ${Va>=0?"text-green-500":"text-red-500"}`,children:[r.jsx("svg",{className:`w-3 h-3 ${Va<0?"rotate-180":""}`,viewBox:"0 0 12 12",fill:"currentColor",children:r.jsx("path",{d:"M6 0 L12 12 L0 12 Z"})}),r.jsxs("span",{className:"text-sm font-medium",children:[Math.abs(Va).toFixed(1),"%"]})]})]})]}),r.jsx("div",{className:"h-8 w-[1px] bg-white/10"}),r.jsxs("div",{className:"flex items-center gap-3 min-w-fit",children:[r.jsx("div",{className:"w-10 h-10 rounded-none bg-white/5 border border-dashed border-white/10 flex items-center justify-center flex-shrink-0",children:r.jsx(Ct,{className:"w-5 h-5 text-white"})}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("span",{className:"text-gray-400 text-sm uppercase tracking-wide",children:"New Users"}),r.jsx("span",{className:"text-white text-lg font-medium",children:Fn?"...":Jn(i??0)}),r.jsxs("div",{className:`flex items-center gap-1 ${Kr>=0?"text-green-500":"text-red-500"}`,children:[r.jsx("svg",{className:`w-3 h-3 ${Kr<0?"rotate-180":""}`,viewBox:"0 0 12 12",fill:"currentColor",children:r.jsx("path",{d:"M6 0 L12 12 L0 12 Z"})}),r.jsxs("span",{className:"text-sm font-medium",children:[Math.abs(Kr).toFixed(1),"%"]})]})]})]})]})}),r.jsxs("div",{className:"px-6 pb-10 space-y-6",children:[r.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[r.jsxs("div",{className:"bg-white/5 border border-white/10 p-6 relative",children:[r.jsx("div",{className:"absolute top-0 left-0 w-[12px] h-[0.5px] bg-white/30"}),r.jsx("div",{className:"absolute top-0 left-0 w-[0.5px] h-[12px] bg-white/30"}),r.jsx("div",{className:"absolute top-0 right-0 w-[12px] h-[0.5px] bg-white/30"}),r.jsx("div",{className:"absolute top-0 right-0 w-[0.5px] h-[12px] bg-white/30"}),r.jsx("div",{className:"absolute bottom-0 left-0 w-[12px] h-[0.5px] bg-white/30"}),r.jsx("div",{className:"absolute bottom-0 left-0 w-[0.5px] h-[12px] bg-white/30"}),r.jsx("div",{className:"absolute bottom-0 right-0 w-[12px] h-[0.5px] bg-white/30"}),r.jsx("div",{className:"absolute bottom-0 right-0 w-[0.5px] h-[12px] bg-white/30"}),r.jsxs("div",{className:"flex items-center justify-between mb-4",children:[r.jsx("h3",{className:"text-sm text-white uppercase font-light",children:"TOTAL USER"}),r.jsx("div",{className:"flex items-center space-x-1 overflow-x-auto",children:["1D","1W","6M","1Y"].map(de=>r.jsx("button",{onClick:()=>c(de),className:`px-2 py-1 text-xs font-light transition-colors whitespace-nowrap ${l===de?"bg-white/20 text-white border border-white/30":"text-gray-500 hover:text-white"}`,children:de},de))})]}),r.jsxs("div",{className:"flex justify-between items-end mb-6",children:[r.jsx("p",{className:"text-4xl text-white font-light",children:Fn?"...":Jn(Wa.users)}),r.jsxs("div",{className:"flex items-center gap-1 px-2 py-1",children:[r.jsx("svg",{className:`w-3 h-3 ${Et>=0?"text-green-500":"text-red-500 rotate-180"}`,viewBox:"0 0 12 12",fill:"currentColor",children:r.jsx("path",{d:"M6 0 L12 12 L0 12 Z"})}),r.jsxs("span",{className:`text-xs font-medium ${Et>=0?"text-green-500":"text-red-500"}`,children:[Math.abs(Et).toFixed(1),"%"]})]})]}),r.jsxs("div",{className:"space-y-2 relative",children:[r.jsxs("div",{className:"h-32 relative",children:[r.jsx("svg",{className:"w-full h-full absolute inset-0",viewBox:"0 0 100 100",preserveAspectRatio:"none",children:r.jsx("defs",{children:r.jsxs("linearGradient",{id:"usersBarGradient",x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[r.jsx("stop",{offset:"0%",style:{stopColor:"rgba(255, 255, 255, 0.3)",stopOpacity:1}}),r.jsx("stop",{offset:"100%",style:{stopColor:"rgba(255, 255, 255, 0.05)",stopOpacity:1}})]})})}),r.jsx("div",{className:"h-32 flex items-end justify-between space-x-1 relative z-10",children:xr(l,"users").map((de,je)=>{const Le=M===je;return r.jsx("div",{className:"flex-1 transition-all duration-200 ease-out relative cursor-pointer group",style:{height:`${de}%`,background:"url(#usersBarGradient)"},onMouseEnter:Oe=>{const Ce=Oe.currentTarget.getBoundingClientRect(),nt=Ce.left+Ce.width/2,_e=Ce.top,_t=150,zn=60,Ca=Math.max(_t/2,Math.min(window.innerWidth-_t/2,nt)),ea=Math.max(zn+10,Math.min(window.innerHeight-10,_e));A(je),B({x:Ca,y:ea})},onMouseLeave:()=>{A(null),B(null)},children:r.jsx("div",{className:"w-full h-full",style:{background:"linear-gradient(to bottom, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.05))",opacity:Le?1:.8}})},je)})}),M!==null&&D&&r.jsx("div",{className:"fixed z-50 pointer-events-none transition-all duration-200 ease-out animate-in fade-in",style:{left:`${D.x}px`,top:`${D.y}px`,transform:"translate(-50%, -100%)",maxWidth:"calc(100vw - 20px)"},children:r.jsxs("div",{className:"bg-black border border-white/20 rounded-sm px-3 py-2 shadow-lg whitespace-nowrap",children:[r.jsx("div",{className:"text-xs text-gray-400 mb-1 font-mono uppercase",children:Mo(l,"users")[M]}),r.jsxs("div",{className:"text-sm text-white font-sans font-medium",children:[vt[M]!==void 0?vt[M].toLocaleString():"0"," ",r.jsx("span",{className:"font-mono text-xs text-gray-400",children:"users"})]})]})})]}),r.jsx("div",{className:`flex justify-between ${l==="1M"?"text-[10px]":"text-xs"} text-gray-500 font-mono`,children:Ta(l,"users").map((de,je)=>r.jsx("span",{className:"flex-1 text-center truncate",children:de},je))})]})]}),r.jsxs("div",{className:"bg-white/5 border border-white/10 p-6 relative",children:[r.jsx("div",{className:"absolute top-0 left-0 w-[12px] h-[0.5px] bg-white/30"}),r.jsx("div",{className:"absolute top-0 left-0 w-[0.5px] h-[12px] bg-white/30"}),r.jsx("div",{className:"absolute top-0 right-0 w-[12px] h-[0.5px] bg-white/30"}),r.jsx("div",{className:"absolute top-0 right-0 w-[0.5px] h-[12px] bg-white/30"}),r.jsx("div",{className:"absolute bottom-0 left-0 w-[12px] h-[0.5px] bg-white/30"}),r.jsx("div",{className:"absolute bottom-0 left-0 w-[0.5px] h-[12px] bg-white/30"}),r.jsx("div",{className:"absolute bottom-0 right-0 w-[12px] h-[0.5px] bg-white/30"}),r.jsx("div",{className:"absolute bottom-0 right-0 w-[0.5px] h-[12px] bg-white/30"}),r.jsxs("div",{className:"flex items-center justify-between mb-4",children:[r.jsxs("div",{children:[r.jsx("h3",{className:"text-sm text-white uppercase font-light",children:"Activity Hits"}),r.jsx("p",{className:"text-4xl text-white font-light mt-1",children:Qe?"...":Xa(_s)}),r.jsx("p",{className:"text-xs text-gray-400",children:"Tracked events in selected period"})]}),r.jsx("div",{className:"flex items-center space-x-1 overflow-x-auto",children:["1D","1W","1M","3M","6M","1Y","ALL"].map(de=>r.jsx("button",{onClick:()=>h(de),className:`px-2 py-1 text-xs font-light transition-colors whitespace-nowrap ${u===de?"bg-white/20 text-white border border-white/30":"text-gray-500 hover:text-white"}`,children:de},de))})]}),r.jsxs("div",{className:"space-y-2 relative",children:[r.jsx("div",{className:"h-40 flex items-end gap-1",children:ye.map((de,je)=>{const Le=ve[je]||0;return r.jsx("div",{className:"flex-1 flex flex-col justify-end gap-[1px] h-full cursor-pointer",onMouseEnter:Oe=>Io(Oe,je),onMouseLeave:()=>{L(null),X(null)},children:Lc.map(Oe=>{var _e;const Ce=((_e=be[Oe.id])==null?void 0:_e[je])??0,nt=Le===0||Ee===0?0:Math.max(Ce/Ee*100,Ce>0?4:0);return r.jsx("div",{className:`w-full ${Oe.barClass}`,style:{height:`${nt}%`}},`${Oe.id}-${je}`)})},`${de}-${je}`)})}),Qe&&r.jsx("div",{className:"absolute inset-0 bg-black/40 backdrop-blur-sm flex items-center justify-center text-xs uppercase text-gray-400 pointer-events-none",children:"Loading activity..."}),G!==null&&q&&r.jsx("div",{className:"fixed z-50 pointer-events-none transition-all duration-200 ease-out animate-in fade-in",style:{left:`${q.x}px`,top:`${q.y}px`,transform:"translate(-50%, -100%)",maxWidth:"calc(100vw - 20px)"},children:r.jsxs("div",{className:"bg-black border border-white/20 rounded-sm px-3 py-2 shadow-lg min-w-[180px]",children:[r.jsx("div",{className:"text-xs text-gray-400 mb-2 font-mono uppercase",children:ye[G]||`Bucket ${G+1}`}),r.jsx("div",{className:"space-y-1",children:Lc.map(de=>{var je;return r.jsxs("div",{className:"flex items-center justify-between text-sm",children:[r.jsxs("div",{className:"flex items-center gap-2 text-gray-300",children:[r.jsx("span",{className:`w-2 h-2 rounded-sm ${de.dotClass}`}),de.label]}),r.jsx("span",{className:"text-white font-medium",children:((je=be[de.id])==null?void 0:je[G])??0})]},de.id)})})]})}),r.jsx("div",{className:`flex justify-between ${u==="1M"?"text-[10px]":"text-xs"} text-gray-500 font-mono`,children:ye.map((de,je)=>r.jsx("span",{className:"flex-1 text-center truncate",children:de},je))}),r.jsx("div",{className:"grid grid-cols-2 lg:grid-cols-5 gap-3 mt-4 pt-4 border-t border-white/10",children:Lc.map(de=>r.jsxs("div",{className:"flex items-center justify-between text-xs text-gray-400",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("span",{className:`w-2 h-2 rounded-sm ${de.dotClass}`}),de.label]}),r.jsx("span",{className:"text-white font-medium",children:Qe?"...":Xa(ks[de.id]||0)})]},de.id))})]})]})]}),r.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[r.jsxs("div",{className:"space-y-4 overflow-x-hidden",children:[r.jsxs("div",{className:"bg-white/5 border border-white/10 p-6 pb-2 relative",children:[r.jsx("div",{className:"absolute top-0 left-0 w-[12px] h-[0.5px] bg-white/30"}),r.jsx("div",{className:"absolute top-0 left-0 w-[0.5px] h-[12px] bg-white/30"}),r.jsx("div",{className:"absolute top-0 right-0 w-[12px] h-[0.5px] bg-white/30"}),r.jsx("div",{className:"absolute top-0 right-0 w-[0.5px] h-[12px] bg-white/30"}),r.jsx("div",{className:"absolute bottom-0 left-0 w-[12px] h-[0.5px] bg-white/30"}),r.jsx("div",{className:"absolute bottom-0 left-0 w-[0.5px] h-[12px] bg-white/30"}),r.jsx("div",{className:"absolute bottom-0 right-0 w-[12px] h-[0.5px] bg-white/30"}),r.jsx("div",{className:"absolute bottom-0 right-0 w-[0.5px] h-[12px] bg-white/30"}),r.jsxs("div",{className:"flex items-center justify-between mb-2 relative -mt-2 pb-1",children:[r.jsxs("div",{className:"relative",children:[r.jsxs("button",{onClick:()=>E(!T),className:"text-xs h-full font-mono uppercase text-gray-400 flex items-center space-x-1 hover:text-white transition-colors",children:[r.jsx(ch,{className:"w-3 h-3"}),r.jsx("span",{children:x})]}),T&&r.jsx("div",{className:"absolute top-6 left-0 w-[150px] z-10 bg-black border border-white/10 rounded-none shadow-lg",children:Ea.map(de=>r.jsx("button",{onClick:()=>{N(de),E(!1)},className:"block border-b border-dashed border-white/5 w-full text-left px-4 py-2 text-xs text-white hover:bg-white/10 transition-colors whitespace-nowrap",children:de},de))})]}),x==="Custom"&&r.jsxs("div",{className:"h-0 flex items-center gap-2",children:[r.jsxs(Oa,{children:[r.jsx(Da,{asChild:!0,children:r.jsxs($,{variant:"outline",className:"h-6 px-2 text-xs font-mono uppercase text-gray-400 hover:text-white bg-transparent border-white/10 hover:bg-white/5",children:[r.jsx(Za,{className:"mr-1 h-3 w-3"}),K?_a(K,"MMM dd yyyy"):"From"]})}),r.jsx(da,{className:"w-auto p-0 bg-black border-white/10",children:r.jsx(Ra,{mode:"single",selected:K,onSelect:ne,initialFocus:!0,className:"rounded-none"})})]}),r.jsxs(Oa,{children:[r.jsx(Da,{asChild:!0,children:r.jsxs($,{variant:"outline",className:"h-6 px-2 text-xs font-mono uppercase text-gray-400 hover:text-white bg-transparent border-white/10 hover:bg-white/5",children:[r.jsx(Za,{className:"mr-1 h-3 w-3"}),te?_a(te,"MMM dd yyyy"):"To"]})}),r.jsx(da,{className:"w-auto p-0 bg-black border-white/10",children:r.jsx(Ra,{mode:"single",selected:te,onSelect:ee,initialFocus:!0,disabled:de=>K?de<K:!1,className:"rounded-none"})})]})]})]}),r.jsx("hr",{className:"mb-2 -mx-10 border-white/10"}),r.jsx("h4",{className:"text-md text-white/80 uppercase font-mono font-light mb-1",children:"Active Users"}),r.jsx("p",{className:"text-xs text-gray-400 mb-3",children:"Users with active session in the time frame"}),r.jsxs("div",{className:"flex pt-4 justify-between items-end",children:[r.jsx("p",{className:"text-3xl text-white font-light",children:Xa(a)}),r.jsx("div",{className:"mt-2 mb-1 flex items-center gap-2",children:r.jsxs("div",{className:"flex items-center -mr-5 gap-1 px-2 py-1 border-white/5 rounded-none",children:[r.jsx("svg",{className:`w-3 h-3 ${Be>=0?"text-green-500":"text-red-500 rotate-180"}`,viewBox:"0 0 12 12",fill:"currentColor",children:r.jsx("path",{d:"M6 0 L12 12 L0 12 Z"})}),r.jsxs("span",{className:`text-xs font-medium ${Be>=0?"text-green-500":"text-red-500"}`,children:[Math.abs(Be).toFixed(1),"%"]})]})})]})]}),r.jsxs("div",{className:"bg-white/5 border border-white/10 p-6 pb-2 relative",children:[r.jsx("div",{className:"absolute top-0 left-0 w-[12px] h-[0.5px] bg-white/30"}),r.jsx("div",{className:"absolute top-0 left-0 w-[0.5px] h-[12px] bg-white/30"}),r.jsx("div",{className:"absolute top-0 right-0 w-[12px] h-[0.5px] bg-white/30"}),r.jsx("div",{className:"absolute top-0 right-0 w-[0.5px] h-[12px] bg-white/30"}),r.jsx("div",{className:"absolute bottom-0 left-0 w-[12px] h-[0.5px] bg-white/30"}),r.jsx("div",{className:"absolute bottom-0 left-0 w-[0.5px] h-[12px] bg-white/30"}),r.jsx("div",{className:"absolute bottom-0 right-0 w-[12px] h-[0.5px] bg-white/30"}),r.jsx("div",{className:"absolute bottom-0 right-0 w-[0.5px] h-[12px] bg-white/30"}),r.jsxs("div",{className:"flex items-center justify-between mb-2 relative -mt-2 pb-1",children:[r.jsxs("div",{className:"relative",children:[r.jsxs("button",{onClick:()=>O(!k),className:"text-xs h-full font-mono uppercase text-gray-400 flex items-center space-x-1 hover:text-white transition-colors",children:[r.jsx(ch,{className:"w-3 h-3"}),r.jsx("span",{children:b})]}),k&&r.jsx("div",{className:"absolute top-6 left-0 w-[150px] z-10 bg-black border border-white/10 rounded-none shadow-lg",children:Ea.map(de=>r.jsx("button",{onClick:()=>{y(de),O(!1)},className:"block border-b border-dashed border-white/5 w-full text-left px-4 py-2 text-xs text-white hover:bg-white/10 transition-colors whitespace-nowrap",children:de},de))})]}),b==="Custom"&&r.jsxs("div",{className:"h-0 flex items-center gap-2",children:[r.jsxs(Oa,{children:[r.jsx(Da,{asChild:!0,children:r.jsxs($,{variant:"outline",className:"h-6 px-2 text-xs font-mono uppercase text-gray-400 hover:text-white bg-transparent border-white/10 hover:bg-white/5",children:[r.jsx(Za,{className:"mr-1 h-3 w-3"}),ae?_a(ae,"MMM dd yyyy"):"From"]})}),r.jsx(da,{className:"w-auto p-0 bg-black border-white/10",children:r.jsx(Ra,{mode:"single",selected:ae,onSelect:ge,initialFocus:!0,className:"rounded-none"})})]}),r.jsxs(Oa,{children:[r.jsx(Da,{asChild:!0,children:r.jsxs($,{variant:"outline",className:"h-6 px-2 text-xs font-mono uppercase text-gray-400 hover:text-white bg-transparent border-white/10 hover:bg-white/5",children:[r.jsx(Za,{className:"mr-1 h-3 w-3"}),se?_a(se,"MMM dd yyyy"):"To"]})}),r.jsx(da,{className:"w-auto p-0 bg-black border-white/10",children:r.jsx(Ra,{mode:"single",selected:se,onSelect:fe,initialFocus:!0,disabled:de=>ae?de<ae:!1,className:"rounded-none"})})]})]})]}),r.jsx("hr",{className:"mb-2 -mx-10 border-white/10"}),r.jsx("h4",{className:"text-md text-white/80 uppercase font-mono font-light mb-1",children:"New Users"}),r.jsx("p",{className:"text-xs text-gray-400 mb-3",children:"Newly registered Users in the time frame"}),r.jsxs("div",{className:"flex pt-4 justify-between items-end",children:[r.jsx("p",{className:"text-3xl text-white font-light",children:Xa(Yr)}),r.jsx("div",{className:"mt-2 mb-1 flex items-center gap-2",children:r.jsxs("div",{className:"flex items-center -mr-5 gap-1 px-2 py-1 rounded-none",children:[r.jsx("svg",{className:`w-3 h-3 ${Xr>=0?"text-green-500":"text-red-500 rotate-180"}`,viewBox:"0 0 12 12",fill:"currentColor",style:Xr<0?{transform:"rotate(180deg)"}:{},children:r.jsx("path",{d:"M6 0 L12 12 L0 12 Z"})}),r.jsxs("span",{className:`text-xs font-medium ${Xr>=0?"text-green-500":"text-red-500"}`,children:[Math.abs(Xr).toFixed(1),"%"]})]})})]})]})]}),r.jsxs("div",{className:"space-y-4 overflow-x-hidden",children:[r.jsxs("div",{className:"bg-white/5 border border-white/10 p-6 pb-2 relative",children:[r.jsx("div",{className:"absolute top-0 left-0 w-[12px] h-[0.5px] bg-white/30"}),r.jsx("div",{className:"absolute top-0 left-0 w-[0.5px] h-[12px] bg-white/30"}),r.jsx("div",{className:"absolute top-0 right-0 w-[12px] h-[0.5px] bg-white/30"}),r.jsx("div",{className:"absolute top-0 right-0 w-[0.5px] h-[12px] bg-white/30"}),r.jsx("div",{className:"absolute bottom-0 left-0 w-[12px] h-[0.5px] bg-white/30"}),r.jsx("div",{className:"absolute bottom-0 left-0 w-[0.5px] h-[12px] bg-white/30"}),r.jsx("div",{className:"absolute bottom-0 right-0 w-[12px] h-[0.5px] bg-white/30"}),r.jsx("div",{className:"absolute bottom-0 right-0 w-[0.5px] h-[12px] bg-white/30"}),r.jsxs("div",{className:"flex items-center justify-between mb-2 relative -mt-2 pb-1",children:[r.jsxs("div",{className:"relative",children:[r.jsxs("button",{onClick:()=>I(!R),className:"text-xs h-full font-mono uppercase text-gray-400 flex items-center space-x-1 hover:text-white transition-colors",children:[r.jsx(ch,{className:"w-3 h-3"}),r.jsx("span",{children:g})]}),R&&r.jsx("div",{className:"absolute top-6 left-0 w-[150px] z-10 bg-black border border-white/10 rounded-none shadow-lg",children:Ea.map(de=>r.jsx("button",{onClick:()=>{w(de),I(!1)},className:"block border-b border-dashed border-white/5 w-full text-left px-4 py-2 text-xs text-white hover:bg-white/10 transition-colors whitespace-nowrap",children:de},de))})]}),g==="Custom"&&r.jsxs("div",{className:"h-0 flex items-center gap-2",children:[r.jsxs(Oa,{children:[r.jsx(Da,{asChild:!0,children:r.jsxs($,{variant:"outline",className:"h-6 px-2 text-xs font-mono uppercase text-gray-400 hover:text-white bg-transparent border-white/10 hover:bg-white/5",children:[r.jsx(Za,{className:"mr-1 h-3 w-3"}),me?_a(me,"MMM dd yyyy"):"From"]})}),r.jsx(da,{className:"w-auto p-0 bg-black border-white/10",children:r.jsx(Ra,{mode:"single",selected:me,onSelect:Re,initialFocus:!0,className:"rounded-none"})})]}),r.jsxs(Oa,{children:[r.jsx(Da,{asChild:!0,children:r.jsxs($,{variant:"outline",className:"h-6 px-2 text-xs font-mono uppercase text-gray-400 hover:text-white bg-transparent border-white/10 hover:bg-white/5",children:[r.jsx(Za,{className:"mr-1 h-3 w-3"}),Me?_a(Me,"MMM dd yyyy"):"To"]})}),r.jsx(da,{className:"w-auto p-0 bg-black border-white/10",children:r.jsx(Ra,{mode:"single",selected:Me,onSelect:Ue,initialFocus:!0,disabled:de=>me?de<me:!1,className:"rounded-none"})})]})]})]}),r.jsx("hr",{className:"mb-2 -mx-10 border-white/10"}),r.jsx("h4",{className:"text-md text-white/80 uppercase font-mono font-light mb-1",children:"Organizations"}),r.jsx("p",{className:"text-xs text-gray-400 mb-3",children:"Total organizations in the time frame"}),r.jsxs("div",{className:"flex pt-4 justify-between items-end",children:[r.jsx("p",{className:"text-3xl text-white font-light",children:ue?"...":Xa(Ye)}),r.jsx("div",{className:"mt-2 mb-1 flex items-center gap-2",children:r.jsxs("div",{className:"flex items-center -mr-5 gap-1 px-2 py-1 rounded-none",children:[r.jsx("svg",{className:`w-3 h-3 ${le>=0?"text-green-500":"text-red-500 rotate-180"}`,viewBox:"0 0 12 12",fill:"currentColor",children:r.jsx("path",{d:"M6 0 L12 12 L0 12 Z"})}),r.jsxs("span",{className:`text-xs font-medium ${le>=0?"text-green-500":"text-red-500"}`,children:[Math.abs(le).toFixed(1),"%"]})]})})]})]}),r.jsxs("div",{className:"bg-white/5 border border-white/10 p-6 pb-2 relative",children:[r.jsx("div",{className:"absolute top-0 left-0 w-[12px] h-[0.5px] bg-white/30"}),r.jsx("div",{className:"absolute top-0 left-0 w-[0.5px] h-[12px] bg-white/30"}),r.jsx("div",{className:"absolute top-0 right-0 w-[12px] h-[0.5px] bg-white/30"}),r.jsx("div",{className:"absolute top-0 right-0 w-[0.5px] h-[12px] bg-white/30"}),r.jsx("div",{className:"absolute bottom-0 left-0 w-[12px] h-[0.5px] bg-white/30"}),r.jsx("div",{className:"absolute bottom-0 left-0 w-[0.5px] h-[12px] bg-white/30"}),r.jsx("div",{className:"absolute bottom-0 right-0 w-[12px] h-[0.5px] bg-white/30"}),r.jsx("div",{className:"absolute bottom-0 right-0 w-[0.5px] h-[12px] bg-white/30"}),r.jsxs("div",{className:"flex items-center justify-between mb-2 relative -mt-2 pb-1",children:[r.jsxs("div",{className:"relative",children:[r.jsxs("button",{onClick:()=>j(!F),className:"text-xs h-full font-mono uppercase text-gray-400 flex items-center space-x-1 hover:text-white transition-colors",children:[r.jsx(ch,{className:"w-3 h-3"}),r.jsx("span",{children:S})]}),F&&r.jsx("div",{className:"absolute top-6 left-0 w-[150px] z-10 bg-black border border-white/10 rounded-none shadow-lg",children:Ea.map(de=>r.jsx("button",{onClick:()=>{C(de),j(!1)},className:"block border-b border-dashed border-white/5 w-full text-left px-4 py-2 text-xs text-white hover:bg-white/10 transition-colors whitespace-nowrap",children:de},de))})]}),S==="Custom"&&r.jsxs("div",{className:"h-0 flex items-center gap-2",children:[r.jsxs(Oa,{children:[r.jsx(Da,{asChild:!0,children:r.jsxs($,{variant:"outline",className:"h-6 px-2 text-xs font-mono uppercase text-gray-400 hover:text-white bg-transparent border-white/10 hover:bg-white/5",children:[r.jsx(Za,{className:"mr-1 h-3 w-3"}),$e?_a($e,"MMM dd yyyy"):"From"]})}),r.jsx(da,{className:"w-auto p-0 bg-black border-white/10",children:r.jsx(Ra,{mode:"single",selected:$e,onSelect:pt,initialFocus:!0,className:"rounded-none"})})]}),r.jsxs(Oa,{children:[r.jsx(Da,{asChild:!0,children:r.jsxs($,{variant:"outline",className:"h-6 px-2 text-xs font-mono uppercase text-gray-400 hover:text-white bg-transparent border-white/10 hover:bg-white/5",children:[r.jsx(Za,{className:"mr-1 h-3 w-3"}),Ge?_a(Ge,"MMM dd yyyy"):"To"]})}),r.jsx(da,{className:"w-auto p-0 bg-black border-white/10",children:r.jsx(Ra,{mode:"single",selected:Ge,onSelect:jt,initialFocus:!0,disabled:de=>$e?de<$e:!1,className:"rounded-none"})})]})]})]}),r.jsx("hr",{className:"mb-2 -mx-10 border-white/10"}),r.jsx("h4",{className:"text-md text-white/80 uppercase font-mono font-light mb-1",children:"Teams"}),r.jsx("p",{className:"text-xs text-gray-400 mb-3",children:"Total teams in the time frame"}),r.jsxs("div",{className:"flex pt-4 justify-between items-end",children:[r.jsx("p",{className:"text-3xl text-white font-light",children:W?"...":Xa(ie)}),r.jsx("div",{className:"mt-2 mb-1 flex items-center gap-2",children:r.jsxs("div",{className:"flex items-center -mr-5 gap-1 px-2 py-1 rounded-none",children:[r.jsx("svg",{className:`w-3 h-3 ${xe>=0?"text-green-500":"text-red-500 rotate-180"}`,viewBox:"0 0 12 12",fill:"currentColor",children:r.jsx("path",{d:"M6 0 L12 12 L0 12 Z"})}),r.jsxs("span",{className:`text-xs font-medium ${xe>=0?"text-green-500":"text-red-500"}`,children:[Math.abs(xe).toFixed(1),"%"]})]})})]})]})]}),r.jsxs("div",{className:"bg-white/5 border border-white/10 p-6 pt-4 overflow-hidden relative rounded-none flex flex-col",children:[r.jsx("div",{className:"absolute top-0 left-0 w-[12px] h-[0.5px] bg-white/30"}),r.jsx("div",{className:"absolute top-0 left-0 w-[0.5px] h-[12px] bg-white/30"}),r.jsx("div",{className:"absolute top-0 right-0 w-[12px] h-[0.5px] bg-white/30"}),r.jsx("div",{className:"absolute top-0 right-0 w-[0.5px] h-[12px] bg-white/30"}),r.jsx("div",{className:"absolute bottom-0 left-0 w-[12px] h-[0.5px] bg-white/30"}),r.jsx("div",{className:"absolute bottom-0 left-0 w-[0.5px] h-[12px] bg-white/30"}),r.jsx("div",{className:"absolute bottom-0 right-0 w-[12px] h-[0.5px] bg-white/30"}),r.jsx("div",{className:"absolute bottom-0 right-0 w-[0.5px] h-[12px] bg-white/30"}),r.jsx("div",{className:"flex items-center justify-between mb-4 flex-shrink-0",children:r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(Cn,{className:"w-4 h-4 text-white/60"}),r.jsx("h4",{className:"text-xs text-gray-400 uppercase font-mono font-light",children:"Security Insights"})]})}),r.jsx("hr",{className:"-mx-10 -mt-1 border-white/10"}),r.jsxs("div",{className:"space-y-3 overflow-y-auto custom-scrollbar max-h-[400px]",children:[Mi.length===0&&r.jsx("div",{className:"text-sm flex items-center justify-center text-gray-400",children:r.jsxs("div",{className:"flex mt-5 items-center justify-center",children:[r.jsx(Cn,{className:"w-4 h-4 text-gray-400 mr-2"}),r.jsx("p",{className:"text-center",children:"No security insights found"})]})}),Mi.map((de,je)=>r.jsx("div",{onClick:()=>Os(de),className:"group py-2 border-b border-white/5 cursor-pointer transition-all duration-200 hover:border-white/20",style:{animation:`slideIn 0.3s ease-out ${je*.1}s both`},children:r.jsxs("div",{className:"flex items-start justify-between gap-3",children:[r.jsxs("div",{className:"flex-1 min-w-0",children:[r.jsx("div",{className:"flex items-center gap-2 mb-1.5",children:r.jsx("span",{className:"text-sm text-white/90 font-light truncate group-hover:text-white transition-colors",children:de.title})}),r.jsxs("div",{className:"flex items-center gap-1.5 flex-wrap",children:[r.jsx("span",{className:`text-[9px] px-1.5 py-0.5 border rounded-sm uppercase font-mono ${gr(de.severity)}`,children:de.severity}),r.jsx("span",{className:`text-[9px] px-1.5 py-0.5 border rounded-sm capitalize font-mono ${br(de.status)}`,children:de.status})]})]}),r.jsx(Bd,{className:"w-3.5 h-3.5 text-gray-500 group-hover:text-white transition-all flex-shrink-0 mt-0.5"})]})},de.id))]})]})]})]})]})};return r.jsxs("div",{className:"h-screen bg-black text-white overflow-hidden flex flex-col",style:{overflowX:"hidden"},children:[r.jsx("div",{className:"flex-1 overflow-hidden",children:e==="overview"?Ds():e==="users"?r.jsx(y5,{}):e==="organizations"?r.jsx(x5,{}):Ds()}),t&&r.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:r.jsxs("div",{className:"bg-black/90 border border-dashed border-white/20 p-6 w-full max-w-3xl rounded-none",children:[r.jsxs("div",{className:"flex items-center justify-between mb-6",children:[r.jsxs("div",{className:"flex items-center space-x-3",children:[r.jsx(pC,{className:"w-6 h-6 text-white"}),r.jsx("h3",{className:"text-lg text-white font-light",children:"Quick Actions"})]}),r.jsx($,{variant:"ghost",size:"sm",onClick:()=>n(!1),className:"text-gray-400 hover:text-white rounded-none",children:r.jsx(xt,{className:"w-4 h-4"})})]}),r.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[r.jsxs("button",{onClick:()=>{n(!1),Bn("/users")},className:"flex items-center space-x-4 p-4 bg-black/30 border border-dashed border-white/20 rounded-none hover:bg-black/50 transition-colors text-left group",children:[r.jsx("div",{className:"p-2 bg-white/10 rounded-none group-hover:bg-white/20 transition-colors",children:r.jsx(Ct,{className:"w-6 h-6 text-white"})}),r.jsxs("div",{className:"flex-1",children:[r.jsx("h4",{className:"text-white font-light mb-1",children:"View All Users"}),r.jsx("p",{className:"text-sm text-gray-400",children:"Manage user accounts"})]}),r.jsx(Xs,{className:"w-4 h-4 text-gray-400 group-hover:text-white transition-colors"})]}),r.jsxs("button",{onClick:()=>{n(!1),Bn("/organizations")},className:"flex items-center space-x-4 p-4 bg-black/30 border border-dashed border-white/20 rounded-none hover:bg-black/50 transition-colors text-left group",children:[r.jsx("div",{className:"p-2 bg-white/10 rounded-none group-hover:bg-white/20 transition-colors",children:r.jsx(ha,{className:"w-6 h-6 text-white"})}),r.jsxs("div",{className:"flex-1",children:[r.jsx("h4",{className:"text-white font-light mb-1",children:"View Organizations"}),r.jsx("p",{className:"text-sm text-gray-400",children:"Manage organizations"})]}),r.jsx(Xs,{className:"w-4 h-4 text-gray-400 group-hover:text-white transition-colors"})]}),r.jsxs("button",{onClick:()=>{n(!1),Bn("/sessions")},className:"flex items-center space-x-4 p-4 bg-black/30 border border-dashed border-white/20 rounded-none hover:bg-black/50 transition-colors text-left group",children:[r.jsx("div",{className:"p-2 bg-white/10 rounded-none group-hover:bg-white/20 transition-colors",children:r.jsx(hC,{className:"w-6 h-6 text-white"})}),r.jsxs("div",{className:"flex-1",children:[r.jsx("h4",{className:"text-white font-light mb-1",children:"View Sessions"}),r.jsx("p",{className:"text-sm text-gray-400",children:"Monitor active sessions"})]}),r.jsx(Xs,{className:"w-4 h-4 text-gray-400 group-hover:text-white transition-colors"})]}),r.jsxs("button",{onClick:()=>{n(!1),Bn("/database")},className:"flex items-center space-x-4 p-4 bg-black/30 border border-dashed border-white/20 rounded-none hover:bg-black/50 transition-colors text-left group",children:[r.jsx("div",{className:"p-2 bg-white/10 rounded-none group-hover:bg-white/20 transition-colors",children:r.jsx(ps,{className:"w-6 h-6 text-white"})}),r.jsxs("div",{className:"flex-1",children:[r.jsx("h4",{className:"text-white font-light mb-1",children:"Database Schema"}),r.jsx("p",{className:"text-sm text-gray-400",children:"View schema visualizer"})]}),r.jsx(Xs,{className:"w-4 h-4 text-gray-400 group-hover:text-white transition-colors"})]}),r.jsxs("button",{onClick:()=>{n(!1),Bn("/settings")},className:"flex items-center space-x-4 p-4 bg-black/30 border border-dashed border-white/20 rounded-none hover:bg-black/50 transition-colors text-left group",children:[r.jsx("div",{className:"p-2 bg-white/10 rounded-none group-hover:bg-white/20 transition-colors",children:r.jsx(u5,{className:"w-6 h-6 text-white"})}),r.jsxs("div",{className:"flex-1",children:[r.jsx("h4",{className:"text-white font-light mb-1",children:"Settings"}),r.jsx("p",{className:"text-sm text-gray-400",children:"Configure system"})]}),r.jsx(Xs,{className:"w-4 h-4 text-gray-400 group-hover:text-white transition-colors"})]}),r.jsxs("button",{onClick:()=>{n(!1),Bn("/users")},className:"flex items-center space-x-4 p-4 bg-black/30 border border-dashed border-white/20 rounded-none hover:bg-black/50 transition-colors text-left group",children:[r.jsx("div",{className:"p-2 bg-white/10 rounded-none group-hover:bg-white/20 transition-colors",children:r.jsx(c5,{className:"w-6 h-6 text-white"})}),r.jsxs("div",{className:"flex-1",children:[r.jsx("h4",{className:"text-white font-light mb-1",children:"Search Users"}),r.jsx("p",{className:"text-sm text-gray-400",children:"Find specific users"})]}),r.jsx(Xs,{className:"w-4 h-4 text-gray-400 group-hover:text-white transition-colors"})]})]}),r.jsx("div",{className:"mt-6 pt-6 border-t border-dashed border-white/10",children:r.jsxs("div",{className:"flex items-center justify-between text-sm text-gray-400",children:[r.jsx("span",{children:"Tip: Press Ctrl+K or Cmd+K for command palette"}),r.jsx($,{variant:"ghost",size:"sm",onClick:()=>n(!1),className:"text-gray-400 hover:text-white rounded-none",children:"Close"})]})})]})}),p&&d&&r.jsx("div",{className:"fixed inset-0 bg-black/80 backdrop-blur-sm z-50 flex items-center justify-center p-4",style:{animation:"fadeIn 0.3s ease-out"},onClick:Zr,children:r.jsxs("div",{className:"bg-black border border-white/20 rounded-none max-w-2xl w-full max-h-[80vh] overflow-y-auto",style:{animation:"slideUp 0.3s ease-out"},onClick:ye=>ye.stopPropagation(),children:[r.jsx("div",{className:"sticky top-0 bg-black border-b border-white/10 p-6 z-10",children:r.jsxs("div",{className:"flex items-start justify-between gap-4",children:[r.jsxs("div",{className:"flex-1",children:[r.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[r.jsx(Cn,{className:"w-6 h-6 text-white"}),r.jsx("h3",{className:"text-xl text-white font-light",children:d.title})]}),r.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[r.jsxs("span",{className:`text-xs px-2 py-1 border rounded-none uppercase font-medium ${gr(d.severity)}`,children:[d.severity," Severity"]}),r.jsx("span",{className:`text-xs px-2 py-1 border rounded-none capitalize ${br(d.status)}`,children:d.status}),d.cve&&r.jsx("span",{className:"text-xs text-gray-400 font-mono bg-white/5 px-2 py-1 border border-white/10 rounded-none",children:d.cve})]})]}),r.jsx("button",{onClick:Zr,className:"p-2 hover:bg-white/10 transition-colors rounded-none",children:r.jsx(xt,{className:"w-5 h-5 text-gray-400 hover:text-white"})})]})}),r.jsxs("div",{className:"p-6 space-y-6",children:[r.jsxs("div",{children:[r.jsx("h4",{className:"text-sm text-gray-400 uppercase tracking-wide mb-2",children:"Release Date"}),r.jsx("p",{className:"text-white",children:new Date(d.date).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"})})]}),r.jsxs("div",{children:[r.jsx("h4",{className:"text-sm text-gray-400 uppercase tracking-wide mb-2",children:"Description"}),d.description.includes("npm install")?r.jsxs("div",{children:[r.jsx("p",{className:"text-white leading-relaxed mb-3",children:d.description.split("Run:")[0]}),r.jsx("div",{className:"relative group",children:r.jsx("div",{className:"bg-black border border-white/20 rounded-none p-3 font-mono text-sm",children:r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsxs("code",{children:[r.jsx("span",{className:"text-green-400",children:"$"})," ",r.jsx("span",{className:"text-cyan-400",children:"npm"})," ",r.jsx("span",{className:"text-yellow-400",children:"install"})," ",r.jsx("span",{className:"text-white",children:"better-auth@latest"})]}),r.jsx("button",{onClick:()=>{navigator.clipboard.writeText("npm install better-auth@latest"),H.success("Command copied to clipboard")},className:"opacity-0 group-hover:opacity-100 transition-opacity p-1 hover:bg-white/10 rounded",title:"Copy command",children:r.jsx(aa,{className:"w-4 h-4 text-gray-400 hover:text-white"})})]})})})]}):r.jsx("p",{className:"text-white leading-relaxed",children:d.description})]}),r.jsxs("div",{children:[r.jsx("h4",{className:"text-sm text-gray-400 uppercase tracking-wide mb-3",children:"Affected Components"}),r.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-2",children:d.affectedComponents.map((ye,ve)=>r.jsxs("div",{className:"flex items-center gap-2 p-3 bg-white/5 border border-white/10 rounded-none",style:{animation:`slideIn 0.3s ease-out ${ve*.1}s both`},children:[r.jsx("div",{className:"w-2 h-2 bg-white rounded-none flex-shrink-0"}),r.jsx("span",{className:"text-sm text-white",children:ye})]},ve))})]}),r.jsx("div",{className:"p-4 bg-white/5 border border-white/10 rounded-none",children:r.jsxs("div",{className:"flex items-start gap-3",children:[d.status==="applied"&&r.jsxs(r.Fragment,{children:[r.jsx(zf,{className:"w-5 h-5 text-white flex-shrink-0 mt-0.5"}),r.jsxs("div",{children:[r.jsx("h5",{className:"text-sm text-white font-medium mb-1",children:"Patch Applied"}),r.jsx("p",{className:"text-xs text-gray-400",children:"This security patch has been successfully applied to your system."})]})]}),d.status==="scheduled"&&r.jsxs(r.Fragment,{children:[r.jsx(d5,{className:"w-5 h-5 text-white flex-shrink-0 mt-0.5"}),r.jsxs("div",{children:[r.jsx("h5",{className:"text-sm text-white font-medium mb-1",children:"Scheduled"}),r.jsx("p",{className:"text-xs text-gray-400",children:"This patch is scheduled for deployment in the next maintenance window."})]})]}),d.status==="pending"&&r.jsxs(r.Fragment,{children:[r.jsx(bte,{className:"w-5 h-5 text-white flex-shrink-0 mt-0.5"}),r.jsxs("div",{children:[r.jsx("h5",{className:"text-sm text-white font-medium mb-1",children:"Action Required"}),r.jsx("p",{className:"text-xs text-gray-400",children:"This patch is pending review and requires manual approval before deployment."})]})]})]})}),r.jsx("div",{className:"flex items-center justify-end gap-3 pt-4 border-t border-white/10",children:r.jsx($,{variant:"ghost",onClick:Zr,className:"text-gray-400 hover:text-white rounded-none",children:"Close"})})]})]})}),r.jsx("style",{children:`
|
|
509
|
+
`),ue=new Blob([Ne],{type:"text/csv;charset=utf-8;"}),ke=document.createElement("a"),W=URL.createObjectURL(ue);ke.setAttribute("href",W),ke.setAttribute("download",`users-export-${new Date().toISOString().split("T")[0]}.csv`),ke.style.visibility="hidden",document.body.appendChild(ke),ke.click(),document.body.removeChild(ke),H.success(`Exported ${a.length} users to CSV`)},qt=Q=>{u.some(Ne=>Ne.type===Q)||(h(Ne=>[...Ne,{type:Q}]),f(1))},Wt=Q=>{h(ie=>ie.filter(Ne=>Ne.type!==Q)),f(1)},re=(Q,ie)=>{h(Ne=>Ne.map(ue=>ue.type===Q?{...ue,value:ie}:ue))},we=(Q,ie)=>{h(Ne=>Ne.map(ue=>ue.type===Q?{...ue,dateRange:ie}:ue))},Be=a.filter(Q=>{const ie=Q.name.toLowerCase().includes(l.toLowerCase())||Q.email.toLowerCase().includes(l.toLowerCase());if(u.length===0)return ie;const Ne=u.every(ue=>{var ke,W,Y,be,He;switch(ue.type){case"emailVerified":return ue.value===void 0?!0:Q.emailVerified===(ue.value==="true");case"banned":return ue.value===void 0?!0:Q.banned===(ue.value==="true");case"active":return Q.banned!==!0;case"createdAt":{if(!((ke=ue.dateRange)!=null&&ke.from)&&!((W=ue.dateRange)!=null&&W.to))return!0;const tt=new Date(Q.createdAt);return!((Y=ue.dateRange)!=null&&Y.from&&ue.dateRange.from>tt||(be=ue.dateRange)!=null&&be.to&&ue.dateRange.to<tt)}case"role":return ue.value?(He=Q.role)==null?void 0:He.toLowerCase().includes(ue.value.toLowerCase()):!0;default:return!0}});return ie&&Ne}),V=a.filter(Q=>Q.banned).length,le=Math.ceil(Be.length/p),he=(d-1)*p,xe=he+p,De=Be.slice(he,xe),Ye=Q=>{f(Q)};return i?r.jsx("div",{className:"flex min-h-screen items-center justify-center h-full",children:r.jsxs("div",{className:"flex flex-col items-center space-y-3",children:[r.jsx(ir,{className:"w-6 h-6 text-white animate-spin"}),r.jsx("div",{className:"text-white text-sm",children:"Loading users..."})]})}):r.jsxs("div",{className:"space-y-6 p-6",children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsxs("div",{children:[r.jsxs("h1",{className:"text-2xl relative text-white font-light inline-flex items-start",children:["Users",r.jsx("sup",{className:"text-xs text-gray-500 ml-1 mt-0 inline-flex items-baseline",children:r.jsx(rr,{value:t.users??0,className:"text-white font-mono text-sm",prefix:r.jsx("span",{className:"mr-1 text-gray-500",children:"["}),suffix:r.jsx("span",{className:"ml-1 text-gray-500",children:"]"}),format:{notation:"standard",maximumFractionDigits:0}})})]}),r.jsx("p",{className:"text-gray-400 font-light text-sm mt-1 uppercase font-mono",children:"Manage your application users"}),r.jsx("div",{className:"flex items-center space-x-4 mt-2",children:V>0&&r.jsxs("span",{className:"text-sm text-red-400 flex items-center space-x-1",children:[r.jsx(th,{className:"w-3 h-3"}),r.jsxs("span",{children:[V," Banned"]})]})})]}),r.jsxs("div",{className:"flex items-center space-x-3",children:[r.jsxs($,{className:"border border-dashed border-white/20 text-white hover:bg-white/10 bg-transparent rounded-none",onClick:Tt,children:[r.jsx(ud,{className:"w-4 h-4 mr-2"}),"Export CSV"]}),r.jsxs($,{className:"border border-dashed border-white/20 text-white hover:bg-white/10 bg-transparent rounded-none",onClick:()=>T(!0),children:[r.jsx(Vt,{className:"w-4 h-4 mr-2"}),"Seed"]}),r.jsxs($,{className:"bg-white hover:bg-white/90 text-black border border-white/20 rounded-none",onClick:()=>x(!0),children:[r.jsx(Uw,{className:"w-4 h-4 mr-2"}),"Add User"]})]})]}),r.jsxs("div",{className:"space-y-3",children:[r.jsxs("div",{className:"flex items-center space-x-4",children:[r.jsxs("div",{className:"flex-1 relative",children:[r.jsx(xo,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400 w-4 h-4"}),r.jsx(Te,{placeholder:"Search users...",value:l,onChange:Q=>c(Q.target.value),className:"pl-10 border border-dashed border-white/20 bg-black/30 text-white rounded-none"})]}),r.jsx("div",{className:"flex items-center space-x-2",children:r.jsxs(Ua,{value:"",onValueChange:qt,children:[r.jsx(Pa,{className:"w-[180px]",children:r.jsxs("div",{className:"flex mr-3 items-center space-x-2",children:[r.jsx(bi,{className:"w-4 h-4"}),r.jsx("span",{children:"Add Filter"})]})}),r.jsxs(Fa,{children:[!u.some(Q=>Q.type==="emailVerified")&&r.jsx(Ve,{value:"emailVerified",children:"Email Verified"}),!u.some(Q=>Q.type==="banned")&&r.jsx(Ve,{value:"banned",children:"Banned Status"}),!u.some(Q=>Q.type==="createdAt")&&r.jsx(Ve,{value:"createdAt",children:"Created Date"}),!u.some(Q=>Q.type==="role")&&r.jsx(Ve,{value:"role",children:"Role"})]})]})}),u.length>0&&r.jsx("div",{className:"flex items-center space-x-2",children:r.jsx($,{onClick:()=>h([]),className:"",children:"Clear all"})})]}),u.length>0&&r.jsx("div",{className:"space-y-3",children:r.jsx("div",{className:"flex flex-wrap gap-3",children:u.map(Q=>{var ie,Ne,ue,ke;return r.jsxs("div",{className:"inline-flex items-center gap-2 px-3 py-2 bg-white/10 border border-white/20 rounded-sm",children:[r.jsx(C1,{className:"w-3 h-3 text-white"}),Q.type==="emailVerified"&&r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("span",{className:"text-sm text-white",children:"Email Verified:"}),r.jsxs(Ua,{value:Q.value||"",onValueChange:W=>re("emailVerified",W),children:[r.jsx(Pa,{className:"h-7 w-24 text-xs",children:r.jsx("span",{children:Q.value==="true"?"True":Q.value==="false"?"False":"Select"})}),r.jsxs(Fa,{children:[r.jsx(Ve,{value:"true",children:"True"}),r.jsx(Ve,{value:"false",children:"False"})]})]})]}),Q.type==="banned"&&r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("span",{className:"text-sm text-white",children:"Banned:"}),r.jsxs(Ua,{value:Q.value||"",onValueChange:W=>re("banned",W),children:[r.jsx(Pa,{className:"h-7 w-24 text-xs",children:r.jsx("span",{children:Q.value==="true"?"Yes":Q.value==="false"?"No":"Select"})}),r.jsxs(Fa,{children:[r.jsx(Ve,{value:"true",children:"Yes"}),r.jsx(Ve,{value:"false",children:"No"})]})]})]}),Q.type==="createdAt"&&r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("span",{className:"text-sm text-white",children:"Created:"}),r.jsxs(Oa,{children:[r.jsx(Da,{asChild:!0,children:r.jsxs($,{variant:"outline",className:"h-8 px-3 text-xs font-mono uppercase text-gray-400 hover:text-white bg-transparent border-white/10 hover:bg-white/5",children:[r.jsx(_f,{className:"mr-1 h-3 w-3"}),(ie=Q.dateRange)!=null&&ie.from?_a(Q.dateRange.from,"MMM dd yyyy"):"From"]})}),r.jsx(da,{className:"w-auto p-0 bg-black border-white/10",children:r.jsx(Ra,{mode:"single",selected:(Ne=Q.dateRange)==null?void 0:Ne.from,onSelect:W=>{var Y;return we("createdAt",{from:W,to:(Y=Q.dateRange)==null?void 0:Y.to})},initialFocus:!0,className:"rounded-none"})})]}),r.jsxs(Oa,{children:[r.jsx(Da,{asChild:!0,children:r.jsxs($,{variant:"outline",className:"h-8 px-3 text-xs font-mono uppercase text-gray-400 hover:text-white bg-transparent border-white/10 hover:bg-white/5",children:[r.jsx(_f,{className:"mr-1 h-3 w-3"}),(ue=Q.dateRange)!=null&&ue.to?_a(Q.dateRange.to,"MMM dd yyyy"):"To"]})}),r.jsx(da,{className:"w-auto p-0 bg-black border-white/10",children:r.jsx(Ra,{mode:"single",selected:(ke=Q.dateRange)==null?void 0:ke.to,onSelect:W=>{var Y;return we("createdAt",{from:(Y=Q.dateRange)==null?void 0:Y.from,to:W})},initialFocus:!0,disabled:W=>{var Y;return(Y=Q.dateRange)!=null&&Y.from?W<Q.dateRange.from:!1},className:"rounded-none"})})]})]}),Q.type==="role"&&r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("span",{className:"text-sm text-white",children:"Role:"}),r.jsx(Te,{type:"text",value:Q.value||"",onChange:W=>re("role",W.target.value),className:"h-7 w-32 text-xs bg-black border-white/20 text-white",placeholder:"Enter role..."})]}),r.jsx("button",{onClick:()=>Wt(Q.type),className:"ml-1 hover:bg-white/20 rounded-full p-0.5",children:r.jsx(tn,{className:"w-3 h-3 text-white"})})]},Q.type)})})})]}),r.jsxs("div",{className:"bg-black/30 border border-dashed border-white/20 rounded-none",children:[r.jsx("div",{className:"overflow-x-auto overflow-y-hidden",children:r.jsxs("table",{className:"w-full",children:[r.jsx("thead",{children:r.jsxs("tr",{className:"border-b border-dashed border-white/10",children:[r.jsx("th",{className:"text-left py-4 px-4 text-white font-light",children:"User"}),r.jsx("th",{className:"text-left py-4 px-4 text-white font-light",children:"Email Status"}),r.jsx("th",{className:"text-left py-4 px-4 text-white font-light",children:"Role"}),r.jsx("th",{className:"text-left py-4 px-4 text-white font-light",children:"Created"}),r.jsx("th",{className:"text-right py-4 px-4 text-white font-light",children:"Actions"})]})}),r.jsx("tbody",{children:De.length===0?r.jsx("tr",{children:r.jsx("td",{colSpan:5,className:"py-12 px-4 text-center",children:r.jsxs("div",{className:"flex flex-col items-center space-y-4",children:[r.jsx("div",{className:"w-16 h-16 rounded-none border border-dashed border-white/20 bg-white/10 flex items-center justify-center",children:r.jsx(yo,{className:"w-8 h-8 text-white/50"})}),r.jsxs("div",{children:[r.jsx("h3",{className:"text-white font-medium text-lg",children:"No users found"}),r.jsx("p",{className:"text-gray-400 text-sm mt-1",children:l||u.length>0?"Try adjusting your search or filter criteria":"Get started by creating your first user or seeding some data"})]}),!l&&u.length===0&&r.jsxs("div",{className:"flex items-center space-x-3",children:[r.jsxs($,{onClick:()=>x(!0),className:"bg-white text-black hover:bg-gray-200 rounded-none",children:[r.jsx(Uw,{className:"w-4 h-4 mr-2"}),"Create User"]}),r.jsxs($,{onClick:()=>T(!0),className:"border border-dashed border-white/20 text-white hover:bg-white/10 bg-transparent rounded-none",children:[r.jsx(Vt,{className:"w-4 h-4 mr-2"}),"Seed Data"]})]})]})})}):De.map(Q=>r.jsxs("tr",{className:`border-b border-dashed hover:bg-white/5 cursor-pointer ${Q.banned?"border-red-500/30 bg-red-500/5":"border-white/5"}`,onClick:()=>e(`/users/${Q.id}`),children:[r.jsx("td",{className:"py-4 px-4",children:r.jsxs("div",{className:"flex items-center space-x-3",children:[r.jsxs("div",{className:"relative",children:[r.jsx("img",{src:Q.image||`https://api.dicebear.com/7.x/avataaars/svg?seed=${Q.id}`,alt:Q.name,className:`w-10 h-10 rounded-none border border-dashed ${Q.banned?"border-red-400/50 opacity-60":"border-white/20"}`}),Q.banned&&r.jsx("div",{className:"absolute -top-1 -right-1 bg-red-500 rounded-full p-0.5",children:r.jsx(th,{className:"w-3 h-3 text-white"})})]}),r.jsxs("div",{className:"flex-1",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("div",{className:"text-white font-light",children:Q.name}),Q.banned&&r.jsxs("span",{className:"relative group inline-block",children:[r.jsx("span",{className:"px-2 py-0.5 text-[10px] font-semibold bg-red-500/20 border border-red-500/50 text-red-400 rounded-sm uppercase tracking-wide cursor-help",children:"Banned"}),Q.banReason&&r.jsxs("span",{className:"absolute left-1/2 -translate-x-1/2 bottom-full mb-1.5 px-2 py-1 text-[10px] font-mono text-gray-300 bg-black border border-dashed border-white/20 rounded-none whitespace-nowrap opacity-0 invisible group-hover:opacity-100 group-hover:visible transition-all duration-150 pointer-events-none z-50",children:[Q.banReason,r.jsx("span",{className:"absolute left-1/2 -translate-x-1/2 top-full w-0 h-0 border-l-[4px] border-r-[4px] border-t-[4px] border-transparent border-t-white/20"})]})]})]}),r.jsx("div",{className:"text-sm text-gray-400 mt-0.5",children:Q.email})]})]})}),r.jsx("td",{className:"py-4 px-4",children:r.jsxs("div",{className:"flex items-center space-x-2",children:[Q.emailVerified?r.jsx(Rf,{className:"w-4 h-4 text-green-400"}):r.jsx(Xl,{className:"w-4 h-4 text-yellow-400"}),r.jsx("span",{className:"text-sm text-gray-400",children:Q.emailVerified?"Verified":"Not Verified"})]})}),r.jsx("td",{className:"py-4 px-4",children:Q.role?r.jsx("span",{className:"px-2 py-1 text-xs font-mono uppercase bg-white/5 border border-dashed border-white/15 text-white/80 rounded-sm tracking-wide",children:Q.role}):r.jsx("span",{className:"text-sm text-gray-500",children:"—"})}),r.jsx("td",{className:"py-4 px-4 text-sm text-gray-400",children:r.jsxs("div",{className:"flex flex-col",children:[new Date(Q.createdAt).toLocaleDateString(),r.jsx("p",{className:"text-xs",children:new Date(Q.createdAt).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})})]})}),r.jsx("td",{className:"py-4 px-4 text-right",children:r.jsxs("div",{className:"relative flex items-center justify-end",children:[r.jsx($,{variant:"ghost",size:"sm",className:"text-gray-400 hover:text-white rounded-none",onClick:ie=>{ie.stopPropagation(),M(_===Q.id?null:Q.id)},children:r.jsx(WM,{className:"w-4 h-4"})}),_===Q.id&&r.jsxs("div",{className:"absolute z-[999] right-0 top-full mt-1 w-48 bg-black border border-white/20 rounded-none shadow-lg",onClick:ie=>ie.stopPropagation(),children:[r.jsxs("button",{className:"w-full px-4 py-2 text-left text-sm text-white hover:bg-white/10 flex items-center space-x-2",onClick:ie=>{ie.stopPropagation(),M(null),$e(Q)},children:[r.jsx(gi,{className:"w-4 h-4"}),r.jsx("span",{children:"View"})]}),r.jsxs("button",{className:"w-full px-4 py-2 text-left text-sm text-white hover:bg-white/10 flex items-center space-x-2",onClick:ie=>{ie.stopPropagation(),M(null),pt(Q)},children:[r.jsx(bo,{className:"w-4 h-4"}),r.jsx("span",{children:"Edit User"})]}),r.jsxs("button",{className:"w-full px-4 py-2 text-left text-sm text-white hover:bg-white/10 flex items-center space-x-2",onClick:ie=>{ie.stopPropagation(),M(null),U(Q),F(!0)},children:[r.jsx(Cn,{className:"w-4 h-4"}),r.jsx("span",{children:"Update Password"})]}),L&&(Q.banned?r.jsxs("button",{className:"w-full px-4 py-2 text-left text-sm text-green-400 hover:bg-white/10 flex items-center space-x-2",onClick:ie=>{ie.stopPropagation(),U(Q),R(!0),M(null)},children:[r.jsx(th,{className:"w-4 h-4"}),r.jsx("span",{children:"Unban User"})]}):r.jsxs("button",{className:"w-full px-4 py-2 text-left text-sm text-yellow-400 hover:bg-white/10 flex items-center space-x-2",onClick:ie=>{ie.stopPropagation(),U(Q),k(!0),M(null)},children:[r.jsx(th,{className:"w-4 h-4"}),r.jsx("span",{children:"Ban User"})]})),r.jsx("div",{className:"border-t border-white/10 my-1"}),r.jsxs("button",{className:"w-full px-4 py-2 text-left text-sm text-red-400 hover:bg-white/10 flex items-center space-x-2",onClick:ie=>{ie.stopPropagation(),M(null),Ge(Q)},children:[r.jsx(xu,{className:"w-4 h-4"}),r.jsx("span",{children:"Delete User"})]})]})]})})]},Q.id))})]})}),r.jsx(b5,{currentPage:d,totalPages:le,onPageChange:Ye,totalItems:Be.length,startIndex:he,endIndex:xe})]}),C&&r.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:r.jsxs("div",{className:"overflow-x-hidden bg-black/90 border border-white/10 p-6 w-full pt-4 max-w-2xl rounded-none",children:[r.jsxs("div",{className:"flex items-center justify-between mb-6",children:[r.jsxs("h3",{className:"text-sm text-white flex items-center justify-center font-light uppercase",children:[r.jsx("span",{className:"text-white/50 mr-2",children:"["}),r.jsx(yo,{className:"inline mr-2 w-3 h-3 text-white"}),r.jsx("span",{className:"font-mono text-white/70 uppercase",children:"Seed User"}),r.jsx("span",{className:"text-white/50 ml-2",children:"]"})]}),r.jsx($,{variant:"ghost",size:"sm",onClick:()=>{T(!1),te("")},className:"text-gray-400 hover:text-white rounded-none",children:r.jsx(tn,{className:"w-4 h-4"})})]}),r.jsx("hr",{className:"border-white/10 -mx-10 border-dashed -mt-4 mb-4"}),r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{className:"space-y-4",children:[r.jsx("div",{className:"flex items-center space-x-2"}),r.jsxs("div",{className:"space-y-4",children:[r.jsx("div",{className:"flex items-center space-x-3",children:r.jsxs("div",{className:"flex-1",children:[r.jsx(pe,{htmlFor:"user-count",className:"text-sm text-gray-400 font-light",children:"Number of users"}),r.jsx(Te,{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"})]})}),r.jsxs("div",{className:"flex-1",children:[r.jsx(pe,{htmlFor:"seed-role",className:"text-sm text-gray-400 font-light",children:"Role (optional)"}),r.jsxs(Ua,{className:"bg-black text-white",value:ne,onValueChange:te,children:[r.jsx(Pa,{id:"seed-role",className:"mt-1 border border-dashed border-white/20 bg-black text-white rounded-none",children:r.jsx(yi,{placeholder:"Select role (optional)"})}),r.jsxs(Fa,{children:[r.jsx(Ve,{value:"",children:"None"}),r.jsx(Ve,{value:"admin",children:"Admin"}),r.jsx(Ve,{value:"user",children:"User"}),r.jsx(Ve,{value:"mix",children:"Mix (Random)"})]})]})]}),r.jsx($,{onClick:()=>{var ie;const Q=parseInt(((ie=document.getElementById("user-count"))==null?void 0:ie.value)||"5",10);Ue(Q,ne||void 0)},disabled:fe,className:"bg-transparent hover:bg-white/90 bg-white text-black border border-white/20 rounded-none mt-6 disabled:opacity-50",children:fe?r.jsxs(r.Fragment,{children:[r.jsx(ir,{className:"w-3 h-3 mr-2 animate-spin"}),"Seeding..."]}):r.jsxs(r.Fragment,{children:[r.jsx(Vt,{className:"w-3 h-3 mr-2"}),"Seed Users"]})})]})]}),ge.length>0&&r.jsx("div",{className:"mt-6",children:r.jsx(ji,{title:"User Seeding Terminal",lines:ge,isRunning:fe,className:"w-full",defaultCollapsed:!0})})]}),r.jsx("hr",{className:"border-white/10 -mx-10 border-dashed mt-10"}),r.jsx("div",{className:"flex justify-end mt-6 pt-6",children:r.jsx($,{variant:"outline",onClick:()=>{T(!1),te("")},className:"border border-dashed border-white/20 text-white hover:bg-white/10 rounded-none",children:"Close"})})]})}),v&&r.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:r.jsxs("div",{className:"bg-black/90 border border-white/10 p-6 w-full max-w-md rounded-none",children:[r.jsxs("div",{className:"flex items-center justify-between mb-4",children:[r.jsx("h3",{className:"text-lg text-white font-light",children:"Create User"}),r.jsx($,{variant:"ghost",size:"sm",onClick:()=>{x(!1),ae("")},className:"text-gray-400 hover:text-white rounded-none",children:r.jsx(tn,{className:"w-4 h-4"})})]}),r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{children:[r.jsx(pe,{htmlFor:"create-name",className:"text-sm text-gray-400 font-light",children:"Name"}),r.jsx(Te,{id:"create-name",className:"mt-1 border border-dashed border-white/20 bg-black/30 text-white rounded-none"})]}),r.jsxs("div",{children:[r.jsx(pe,{htmlFor:"create-email",className:"text-sm text-gray-400 font-light",children:"Email"}),r.jsx(Te,{id:"create-email",type:"email",className:"mt-1 border border-dashed border-white/20 bg-black/30 text-white rounded-none"})]}),r.jsxs("div",{children:[r.jsx(pe,{htmlFor:"create-password",className:"text-sm text-gray-400 font-light",children:"Password"}),r.jsx(Te,{id:"create-password",type:"password",className:"mt-1 border border-dashed border-white/20 bg-black/30 text-white rounded-none"})]}),r.jsxs("div",{children:[r.jsx(pe,{htmlFor:"create-role",className:"text-sm text-gray-400 font-light",children:"Role"}),r.jsxs(Ua,{className:"bg-black text-white",value:ee,onValueChange:ae,children:[r.jsx(Pa,{id:"create-role",className:"mt-1 border border-dashed border-white/20 bg-black text-white rounded-none",children:r.jsx(yi,{placeholder:"Select role"})}),r.jsxs(Fa,{children:[r.jsx(Ve,{value:"",children:"None"}),r.jsx(Ve,{value:"admin",children:"Admin"}),r.jsx(Ve,{value:"user",children:"User"})]})]})]})]}),r.jsxs("div",{className:"flex justify-end space-x-3 mt-6",children:[r.jsx($,{variant:"outline",onClick:()=>{x(!1),ae("")},className:"border border-dashed border-white/20 text-white hover:bg-white/10 rounded-none",children:"Cancel"}),r.jsx($,{onClick:jt,className:"bg-white hover:bg-white/90 text-black border border-white/20 rounded-none",children:"Create"})]})]})}),N&&j&&r.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:r.jsxs("div",{className:"bg-black/90 border border-dashed border-white/20 p-6 w-full max-w-md rounded-none",children:[r.jsxs("div",{className:"flex items-center justify-between mb-4",children:[r.jsx("h3",{className:"text-lg text-white font-light",children:"Edit User"}),r.jsx($,{variant:"ghost",size:"sm",onClick:()=>{b(!1),K("")},className:"text-gray-400 hover:text-white rounded-none",children:r.jsx(tn,{className:"w-4 h-4"})})]}),r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{className:"flex items-center space-x-3",children:[r.jsx("img",{src:j.image||`https://api.dicebear.com/7.x/avataaars/svg?seed=${j.id}`,alt:j.name,className:"w-16 h-16 rounded-none border border-dashed border-white/20"}),r.jsxs("div",{children:[r.jsx("div",{className:"text-white font-light",children:j.name}),r.jsx("div",{className:"text-sm text-gray-400",children:j.email})]})]}),r.jsxs("div",{children:[r.jsx(pe,{htmlFor:"edit-name",className:"text-sm text-gray-400 font-light",children:"Name"}),r.jsx(Te,{id:"edit-name",defaultValue:j.name,className:"mt-1 border border-dashed border-white/20 bg-black/30 text-white rounded-none"})]}),r.jsxs("div",{children:[r.jsx(pe,{htmlFor:"edit-email",className:"text-sm text-gray-400 font-light",children:"Email"}),r.jsx(Te,{id:"edit-email",type:"email",defaultValue:j.email,className:"mt-1 border border-dashed border-white/20 bg-black/30 text-white rounded-none"})]}),r.jsxs("div",{children:[r.jsx(pe,{htmlFor:"edit-role",className:"text-sm text-gray-400 font-light",children:"Role"}),r.jsxs(Ua,{value:X,onValueChange:K,children:[r.jsx(Pa,{id:"edit-role",className:"mt-1 border border-dashed border-white/20 bg-black/30 text-white rounded-none",children:r.jsx(yi,{placeholder:"Select role"})}),r.jsxs(Fa,{children:[r.jsx(Ve,{value:"",children:"None"}),r.jsx(Ve,{value:"admin",children:"Admin"}),r.jsx(Ve,{value:"user",children:"User"})]})]})]})]}),r.jsxs("div",{className:"flex justify-end space-x-3 mt-6",children:[r.jsx($,{variant:"outline",onClick:()=>{b(!1),K("")},className:"border border-dashed border-white/20 text-white hover:bg-white/10 rounded-none",children:"Cancel"}),r.jsx($,{onClick:vt,className:"bg-white hover:bg-white/90 text-black border border-white/20 rounded-none",children:"Update"})]})]})}),y&&j&&r.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:r.jsxs("div",{className:"bg-black/90 border border-dashed border-white/20 p-6 w-full max-w-md rounded-none",children:[r.jsxs("div",{className:"flex items-center justify-between mb-4",children:[r.jsx("h3",{className:"text-lg text-white font-light",children:"Delete User"}),r.jsx($,{variant:"ghost",size:"sm",onClick:()=>g(!1),className:"text-gray-400 hover:text-white rounded-none",children:r.jsx(tn,{className:"w-4 h-4"})})]}),r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{className:"flex items-center space-x-3",children:[r.jsx("img",{src:j.image||`https://api.dicebear.com/7.x/avataaars/svg?seed=${j.id}`,alt:j.name,className:"w-16 h-16 rounded-none border border-dashed border-white/20"}),r.jsxs("div",{children:[r.jsx("div",{className:"text-white font-light",children:j.name}),r.jsx("div",{className:"text-sm text-gray-400",children:j.email})]})]}),r.jsx("p",{className:"text-gray-400",children:"Are you sure you want to delete this user? This action cannot be undone."})]}),r.jsxs("div",{className:"flex justify-end space-x-3 mt-6",children:[r.jsx($,{variant:"outline",onClick:()=>g(!1),className:"border border-dashed border-white/20 text-white hover:bg-white/10 rounded-none",children:"Cancel"}),r.jsx($,{onClick:We,className:"bg-red-600 hover:bg-red-700 text-white border border-red-600 rounded-none",children:"Delete"})]})]})}),w&&j&&r.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:r.jsxs("div",{className:"bg-black/90 border border-dashed border-white/20 p-6 w-full max-w-md rounded-none",children:[r.jsxs("div",{className:"flex items-center justify-between mb-4",children:[r.jsx("h3",{className:"text-lg text-white font-light",children:"User Details"}),r.jsx($,{variant:"ghost",size:"sm",onClick:()=>S(!1),className:"text-gray-400 hover:text-white rounded-none",children:r.jsx(tn,{className:"w-4 h-4"})})]}),r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{className:"flex items-center space-x-3",children:[r.jsx("img",{src:j.image||`https://api.dicebear.com/7.x/avataaars/svg?seed=${j.id}`,alt:j.name,className:"w-16 h-16 rounded-none border border-dashed border-white/20"}),r.jsxs("div",{children:[r.jsx("div",{className:"text-white font-light",children:j.name}),r.jsx("div",{className:"text-sm text-gray-400",children:j.email})]})]}),r.jsxs("div",{className:"space-y-2",children:[r.jsx(Ln,{id:j.id,variant:"detail"}),r.jsxs("div",{className:"flex justify-between",children:[r.jsx("span",{className:"text-gray-400",children:"Email Verified:"}),r.jsx("span",{className:"text-white text-sm",children:j.emailVerified?"Yes":"No"})]}),r.jsxs("div",{className:"flex justify-between",children:[r.jsx("span",{className:"text-gray-400",children:"Created:"}),r.jsx("span",{className:"text-white text-sm",children:new Date(j.createdAt).toLocaleString()})]}),r.jsxs("div",{className:"flex justify-between",children:[r.jsx("span",{className:"text-gray-400",children:"Updated:"}),r.jsx("span",{className:"text-white text-sm",children:new Date(j.updatedAt).toLocaleString()})]})]})]}),r.jsx("div",{className:"flex justify-end mt-6",children:r.jsx($,{onClick:()=>S(!1),className:"bg-white hover:bg-white/90 text-black border border-white/20 rounded-none",children:"Close"})})]})}),E&&j&&r.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:r.jsxs("div",{className:"bg-black border border-red-400/20 rounded-none p-6 w-full max-w-md",children:[r.jsx("h2",{className:"text-xl font-bold text-white mb-4",children:"Ban User"}),r.jsxs("p",{className:"text-gray-400 mb-4",children:["Ban ",r.jsx("strong",{children:j.name})," from accessing the system."]}),r.jsxs("div",{className:"space-y-4 mb-6",children:[r.jsxs("div",{children:[r.jsx(pe,{htmlFor:"banReason",className:"text-white",children:"Ban Reason"}),r.jsx(Te,{id:"banReason",value:A,onChange:Q=>D(Q.target.value),placeholder:"Enter reason for ban (optional)",className:"bg-black border border-dashed border-white/20 text-white rounded-none"})]}),r.jsxs("div",{children:[r.jsx(pe,{htmlFor:"banExpires",className:"text-white",children:"Ban Duration (seconds)"}),r.jsx(Te,{id:"banExpires",type:"number",value:B||"",onChange:Q=>G(Q.target.value?Number(Q.target.value):void 0),placeholder:"Leave empty for permanent ban",className:"bg-black border border-dashed border-white/20 text-white rounded-none"}),r.jsx("p",{className:"text-xs text-gray-400 mt-1",children:"Examples: 3600 (1 hour), 86400 (1 day), 604800 (1 week)"})]})]}),r.jsxs("div",{className:"flex justify-end space-x-2",children:[r.jsx($,{variant:"outline",onClick:()=>{k(!1),D(""),G(void 0),U(null)},className:"border border-dashed border-white/20 text-white hover:bg-white/10 rounded-none",children:"Cancel"}),r.jsx($,{onClick:et,className:"bg-red-600 text-white hover:bg-red-700 rounded-none",children:"Ban User"})]})]})}),O&&j&&r.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:r.jsxs("div",{className:"bg-black border border-dashed border-green-400/50 rounded-none p-6 w-full max-w-md",children:[r.jsx("h2",{className:"text-xl font-bold text-white mb-4",children:"Unban User"}),r.jsxs("p",{className:"text-gray-400 mb-6",children:["Are you sure you want to unban ",r.jsx("strong",{children:j.name}),"? This will restore their access to the system."]}),r.jsxs("div",{className:"flex justify-end space-x-2",children:[r.jsx($,{variant:"outline",onClick:()=>{R(!1),U(null)},className:"border border-dashed border-white/20 text-white hover:bg-white/10 rounded-none",children:"Cancel"}),r.jsx($,{onClick:Ze,className:"bg-green-600 text-white hover:bg-green-700 rounded-none",children:"Unban User"})]})]})}),I&&j&&r.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:r.jsxs("div",{className:"bg-black/90 border border-dashed border-white/20 p-6 w-full max-w-md rounded-none",children:[r.jsxs("div",{className:"flex items-center justify-between mb-4",children:[r.jsx("h3",{className:"text-lg text-white font-light",children:"Update Password"}),r.jsx($,{variant:"ghost",size:"sm",onClick:()=>{F(!1),U(null),document.getElementById("update-password").value=""},className:"text-gray-400 hover:text-white rounded-none",children:r.jsx(tn,{className:"w-4 h-4"})})]}),r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{className:"flex items-center space-x-3",children:[r.jsx("img",{src:j.image||`https://api.dicebear.com/7.x/avataaars/svg?seed=${j.id}`,alt:j.name,className:"w-16 h-16 rounded-none border border-dashed border-white/20"}),r.jsxs("div",{children:[r.jsx("div",{className:"text-white font-light",children:j.name}),r.jsx("div",{className:"text-sm text-gray-400",children:j.email})]})]}),r.jsxs("div",{children:[r.jsx(pe,{htmlFor:"update-password",className:"text-sm text-gray-400 font-light",children:"New Password"}),r.jsx(Te,{id:"update-password",type:"password",placeholder:"Enter new password",className:"mt-1 border border-dashed border-white/20 bg-black/30 text-white rounded-none"})]})]}),r.jsxs("div",{className:"flex justify-end space-x-3 mt-6",children:[r.jsx($,{variant:"outline",onClick:()=>{F(!1),U(null),document.getElementById("update-password").value=""},className:"border border-dashed border-white/20 text-white hover:bg-white/10 rounded-none",children:"Cancel"}),r.jsx($,{onClick:Et,className:"bg-white hover:bg-white/90 text-black border border-white/20 rounded-none",children:"Update Password"})]})]})})]})}const Lc=[{id:"signups",label:"Signups",analyticsKey:"newUsers",barClass:"bg-white/25 border border-white/10",dotClass:"bg-white/25"},{id:"logins",label:"Logins",analyticsKey:"activeUsers",barClass:"bg-white/20 border border-white/10",dotClass:"bg-white/20"},{id:"organizations",label:"Organizations",analyticsKey:"organizations",barClass:"bg-white/15 border border-white/10",dotClass:"bg-white/15"},{id:"teams",label:"Teams",analyticsKey:"teams",barClass:"bg-white/10 border border-white/10",dotClass:"bg-white/10"},{id:"sessions",label:"Sessions",analyticsKey:"sessions",barClass:"bg-white/5 border border-white/10",dotClass:"bg-white/5"}];function Pte(){const[e]=m.useState("overview"),[t,n]=m.useState(!1),[a,s]=m.useState(0),[i,o]=m.useState(0),[l,c]=m.useState("1D"),[u,h]=m.useState("1D"),[d,f]=m.useState(null),[p,v]=m.useState(!1),[x,N]=m.useState("Daily"),[b,y]=m.useState("Daily"),[g,w]=m.useState("Daily"),[S,C]=m.useState("Daily"),[T,E]=m.useState(!1),[k,O]=m.useState(!1),[R,I]=m.useState(!1),[F,j]=m.useState(!1),[U,_]=m.useState(null),[M,A]=m.useState(null),[D,B]=m.useState(null),[G,L]=m.useState(null),[q,X]=m.useState(null),[K,ne]=m.useState(void 0),[te,ee]=m.useState(void 0),[ae,ge]=m.useState(void 0),[se,fe]=m.useState(void 0),[me,Re]=m.useState(void 0),[Me,Ue]=m.useState(void 0),[$e,pt]=m.useState(void 0),[Ge,jt]=m.useState(void 0),[vt,We]=m.useState([]),[et,Ze]=m.useState([]),[Et,Tt]=m.useState(0),[qt,Wt]=m.useState([]),[re,we]=m.useState([]),[Be,V]=m.useState(0),[le,he]=m.useState(0),[xe,De]=m.useState(0),[Ye,Q]=m.useState(0),[ie,Ne]=m.useState(0),[ue,ke]=m.useState(!1),[W,Y]=m.useState(!1),[be,He]=m.useState({signups:[],logins:[],organizations:[],teams:[],sessions:[]}),[tt,rt]=m.useState([]),[Qe,Jt]=m.useState(!1),[pn,ln]=m.useState(0),[Xt,Gr]=m.useState(0),[wn,Rn]=m.useState(0),[Va,Vr]=m.useState(0),[Do,As]=m.useState(0),[Ya,kt]=m.useState([]),[Yr,Wr]=m.useState(0),[Xr,pr]=m.useState(0),[Kr,mr]=m.useState(0),{counts:Wa,loading:Fn}=Mp(),Bn=ur(),Ea=["Daily","Weekly","Monthly","Yearly","Custom"],js={Daily:"1D",Weekly:"1W",Monthly:"1M",Yearly:"1Y",Custom:"Custom"},Qn=m.useMemo(()=>new Intl.NumberFormat("en-US",{notation:"compact",maximumFractionDigits:1}),[]),Jn=ye=>ye==null?"...":Qn.format(Number(ye)),Xa=ye=>ye==null?"...":Number(ye).toLocaleString(),ks=m.useMemo(()=>Lc.reduce((ye,ve)=>(ye[ve.id]=(be[ve.id]||[]).reduce((Ee,de)=>Ee+de,0),ye),{}),[be]),_s=m.useMemo(()=>Object.values(ks).reduce((ye,ve)=>ye+ve,0),[ks]),Io=(ye,ve)=>{const Ee=ye.currentTarget.getBoundingClientRect();L(ve),X({x:Ee.left+Ee.width/2,y:Ee.top})},Mi=(()=>{const ye=[];return U!=null&&U.isOutdated?ye.push({id:"version-check",title:`Update Better-Auth to v${U.latest}`,severity:"high",date:new Date().toISOString().split("T")[0],description:"Your current version is outdated. Update to the latest version to get the latest security fixes, features, and improvements. Run: `pnpm install better-auth@latest`",affectedComponents:["All Components"],status:"pending",cve:""}):U&&ye.push({id:"version-check",title:"Better-Auth is Up to date",severity:"low",date:new Date().toISOString().split("T")[0],description:"You are running the latest version of better-auth. Great job keeping your dependencies up to date!",affectedComponents:["All Components"],status:"applied",cve:""}),ye.push(),ye.push({id:"3",title:"Rate Limiting Configuration",severity:"medium",date:new Date().toISOString().split("T")[0],description:"Configure rate limiting for authentication endpoints to prevent brute force attacks. Better-auth provides built-in rate limiting middleware.",affectedComponents:["Auth Endpoints"],status:"pending"}),ye})(),dt=m.useCallback(async(ye,ve,Ee,de)=>{try{const je=new URLSearchParams({type:ye,period:ve});return Ee&&je.append("from",Ee.toISOString()),de&&je.append("to",de.toISOString()),await(await fetch(`/api/analytics?${je.toString()}`)).json()}catch{return null}},[]);m.useEffect(()=>{(async()=>{try{const Ee=await(await fetch("/api/users/all")).json();Ee!=null&&Ee.success&&Ee.users&&kt(Ee.users)}catch{kt([])}})()},[]),m.useEffect(()=>{(async()=>{try{const Ee=await(await fetch("/api/stats")).json();Ee&&s(Ee.activeUsers||0)}catch{s(0)}})()},[]),m.useEffect(()=>{(async()=>{const ve=await dt("users",l,K,te);ve&&(We(ve.data||[]),Ze(ve.labels||[]),Tt(ve.percentageChange||0))})()},[l,K,te,dt]),m.useEffect(()=>{if(Ya.length===0){Wr(0),pr(0);return}const ye=new Date;let ve,Ee=ye,de,je;if(b==="Custom"){if(!ae||!se){Wr(0),pr(0);return}ve=new Date(ae),Ee=new Date(se),Ee.setHours(23,59,59,999);const _t=Ee.getTime()-ve.getTime();je=new Date(ve.getTime()-1),de=new Date(je.getTime()-_t)}else switch(b){case"Daily":ve=new Date(ye),ve.setHours(0,0,0,0),je=new Date(ve.getTime()-1),de=new Date(je.getTime()-24*60*60*1e3);break;case"Weekly":ve=new Date(ye),ve.setDate(ye.getDate()-ye.getDay()),ve.setHours(0,0,0,0),je=new Date(ve.getTime()-1),de=new Date(je.getTime()-7*24*60*60*1e3);break;case"Monthly":ve=new Date(ye.getFullYear(),ye.getMonth(),1),ve.setHours(0,0,0,0),je=new Date(ve.getTime()-1),de=new Date(ye.getFullYear(),ye.getMonth()-1,1),de.setHours(0,0,0,0);break;case"Yearly":ve=new Date(ye.getFullYear(),0,1),ve.setHours(0,0,0,0),je=new Date(ve.getTime()-1),de=new Date(ye.getFullYear()-1,0,1),de.setHours(0,0,0,0);break;default:Wr(0),pr(0);return}const Le=Ya.filter(_t=>{if(!_t.createdAt)return!1;const zn=new Date(_t.createdAt);return zn>=ve&&zn<=Ee}),Oe=Ya.filter(_t=>{if(!_t.createdAt)return!1;const zn=new Date(_t.createdAt);return zn>=de&&zn<=je}),Ce=Le.length,nt=Oe.length;let _e=0;nt>0?_e=(Ce-nt)/nt*100:Ce>0&&(_e=100),Wr(Ce),pr(_e)},[Ya,b,ae,se]),m.useEffect(()=>{(async()=>{if(!(u==="Custom"&&(!ae||!se))){Jt(!0);try{const[ve,Ee,de,je,Le]=await Promise.all([dt("newUsers",u,ae,se),dt("activeUsers",u,ae,se),dt("organizations",u,ae,se),dt("teams",u,ae,se),dt("sessions",u,ae,se)]);ve&&(Wt(ve.data||[]),we(ve.labels||[])),He({signups:(ve==null?void 0:ve.data)||[],logins:(Ee==null?void 0:Ee.data)||[],organizations:(de==null?void 0:de.data)||[],teams:(je==null?void 0:je.data)||[],sessions:(Le==null?void 0:Le.data)||[]}),rt((ve==null?void 0:ve.labels)||(Ee==null?void 0:Ee.labels)||(de==null?void 0:de.labels)||(je==null?void 0:je.labels)||(Le==null?void 0:Le.labels)||[])}finally{Jt(!1)}}})()},[u,ae,se,dt]),m.useEffect(()=>{(async()=>{const ve=await dt("activeUsers","1D");ve&&V(ve.percentageChange||0)})()},[dt]),m.useEffect(()=>{},[Wa.organizations,Wa.teams,Fn]),m.useEffect(()=>{(async()=>{const ve=js[g]||"1D",Ee=ve==="Custom";if(!(Ee&&(!me||!Me))){ke(!0);try{const de=await dt("organizations",ve,Ee?me:void 0,Ee?Me:void 0);de&&(Q(de.total||0),he(de.percentageChange||0))}catch{Q(0),he(0)}finally{ke(!1)}}})()},[g,me,Me,dt]),m.useEffect(()=>{(async()=>{const ve=js[S]||"1D",Ee=ve==="Custom";if(!(Ee&&(!$e||!Ge))){Y(!0);try{const de=await dt("teams",ve,Ee?$e:void 0,Ee?Ge:void 0);de&&(Ne(de.total||0),De(de.percentageChange||0))}catch{Ne(0),De(0)}finally{Y(!1)}}})()},[S,$e,Ge,dt]),m.useEffect(()=>{(async()=>{const ve=await dt("users","1D");ve&&ln(ve.percentageChange||0);const Ee=await dt("organizations","1D");Ee&&Gr(Ee.percentageChange||0);const de=await dt("activeUsers","1D");de&&Rn(de.percentageChange||0);const[je,Le,Oe,Ce,nt]=await Promise.all([dt("newUsers","1D"),dt("activeUsers","1D"),dt("organizations","1D"),dt("teams","1D"),dt("sessions","1D")]);je?(o(je.total||0),mr(je.percentageChange||0)):(o(0),mr(0));const _t=[(je==null?void 0:je.total)||0,(Le==null?void 0:Le.total)||0,(Oe==null?void 0:Oe.total)||0,(Ce==null?void 0:Ce.total)||0,(nt==null?void 0:nt.total)||0].reduce((ea,Li)=>ea+Li,0);As(_t);const Ca=[(je==null?void 0:je.previousTotal)||0,(Le==null?void 0:Le.previousTotal)||0,(Oe==null?void 0:Oe.previousTotal)||0,(Ce==null?void 0:Ce.previousTotal)||0,(nt==null?void 0:nt.previousTotal)||0].reduce((ea,Li)=>ea+Li,0);if(Ca>0){const ea=(_t-Ca)/Ca*100;Vr(ea)}else _t>0?Vr(100):Vr(0)})()},[dt]),m.useEffect(()=>{(async()=>{try{const Ee=await(await fetch("/api/version-check")).json();Ee&&_({current:Ee.current||"1.0.0",latest:Ee.latest||"1.0.0",isOutdated:Ee.isOutdated||!1})}catch{try{const je=(await(await fetch("/api/package-info")).json()).betterAuthVersion||"1.0.0",Le="1.5.0";_({current:je,latest:Le,isOutdated:je!==Le})}catch{_({current:"1.0.0",latest:"1.5.0",isOutdated:!0})}}})()},[]);const gr=ye=>{switch(ye){case"critical":return"bg-white/10 text-white border-white/20";case"high":return"bg-white/10 text-white border-white/20";case"medium":return"bg-white/10 text-gray-300 border-white/20";case"low":return"bg-white/10 text-gray-400 border-white/20";default:return"bg-white/10 text-gray-400 border-white/20"}},br=ye=>{switch(ye){case"applied":return"bg-white/10 text-white border-white/20";case"scheduled":return"bg-white/10 text-gray-300 border-white/20";case"pending":return"bg-white/10 text-gray-400 border-white/20";default:return"bg-white/10 text-gray-400 border-white/20"}},Os=ye=>{f(ye),v(!0)},Zr=()=>{v(!1),setTimeout(()=>f(null),300)},Ta=(ye,ve="users")=>{const Ee=ve==="users"?et:re,je={"1D":24,"1W":7,"1M":30,"3M":3,"6M":6,"1Y":12,ALL:7}[ye]||7;if(Ee&&Ee.length>0&&Ee.length===je)return ye==="1D"?Ee.filter((Oe,Ce)=>Ce%4===0).map(Oe=>{const Ce=parseInt(Oe.replace("h",""),10);return Ce===0?"12am":Ce<12?`${Ce}am`:Ce===12?"12pm":`${Ce-12}pm`}):ye==="1W"?Ee.map(Oe=>Oe.length>3?Oe.substring(0,3):Oe):ye==="1M"?Ee.map(Oe=>{const Ce=Oe.split(" ");return Ce.length>=2?Ce[1]:Oe}):ye==="1Y"||ye==="3M"||ye==="6M"?Ee.map(Oe=>Oe.length>3?Oe.substring(0,3):Oe):Ee.map(Oe=>Oe.length>3?Oe.substring(0,3):Oe);const Le=new Date;switch(ye){case"1D":return["12am","4am","8am","12pm","4pm","8pm"];case"1W":return Array.from({length:7},(Oe,Ce)=>new Date(Le.getTime()-(6-Ce)*24*60*60*1e3).toLocaleDateString("en-US",{weekday:"short"}));case"1M":return Array.from({length:30},(Oe,Ce)=>new Date(Le.getTime()-(29-Ce)*24*60*60*1e3).getDate().toString());case"3M":return Array.from({length:3},(Oe,Ce)=>new Date(Le.getFullYear(),Le.getMonth()-(2-Ce),1).toLocaleDateString("en-US",{month:"short"}));case"6M":return Array.from({length:6},(Oe,Ce)=>new Date(Le.getFullYear(),Le.getMonth()-(5-Ce),1).toLocaleDateString("en-US",{month:"short"}));case"1Y":return Array.from({length:12},(Oe,Ce)=>new Date(Le.getFullYear(),Le.getMonth()-(11-Ce),1).toLocaleDateString("en-US",{month:"short"}));case"ALL":return Array.from({length:7},(Oe,Ce)=>new Date(Le.getFullYear(),Le.getMonth()-(6-Ce),1).toLocaleDateString("en-US",{month:"short"}));default:return["Mon","Tue","Wed","Thu","Fri","Sat","Sun"]}},Mo=(ye,ve="users")=>{const Ee=ve==="users"?et:re,je={"1D":24,"1W":7,"1M":30,"3M":3,"6M":6,"1Y":12,ALL:7}[ye]||7;if(Ee&&Ee.length>0&&Ee.length===je)return ye==="1D"?Ee.map(Oe=>{const Ce=parseInt(Oe.replace("h",""),10);return Ce===0?"12am":Ce<12?`${Ce}am`:Ce===12?"12pm":`${Ce-12}pm`}):ye==="1Y"||ye==="3M"||ye==="6M"?Ee.map(Oe=>{const Ce=["January","February","March","April","May","June","July","August","September","October","November","December"],_e=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"].indexOf(Oe);return _e!==-1?Ce[_e]:Oe}):Ee;const Le=new Date;switch(ye){case"1D":return Array.from({length:24},(Oe,Ce)=>{const nt=new Date;return nt.setHours(Ce,0,0,0),nt.toLocaleTimeString("en-US",{hour:"numeric",hour12:!0})});case"1W":return Array.from({length:7},(Oe,Ce)=>new Date(Le.getTime()-(6-Ce)*24*60*60*1e3).toLocaleDateString("en-US",{weekday:"long"}));case"1M":return Array.from({length:30},(Oe,Ce)=>{const nt=new Date(Le.getTime()-(29-Ce)*24*60*60*1e3),_e=nt.toLocaleDateString("en-US",{month:"short"}),_t=nt.getDate();return`${_e} ${_t}`});case"3M":return Array.from({length:3},(Oe,Ce)=>new Date(Le.getFullYear(),Le.getMonth()-(2-Ce),1).toLocaleDateString("en-US",{month:"long"}));case"6M":return Array.from({length:6},(Oe,Ce)=>new Date(Le.getFullYear(),Le.getMonth()-(5-Ce),1).toLocaleDateString("en-US",{month:"long"}));case"1Y":return Array.from({length:12},(Oe,Ce)=>new Date(Le.getFullYear(),Le.getMonth()-(11-Ce),1).toLocaleDateString("en-US",{month:"long"}));case"ALL":return Array.from({length:7},(Oe,Ce)=>new Date(Le.getFullYear(),Le.getMonth()-(6-Ce),1).toLocaleDateString("en-US",{month:"long"}));default:return["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"]}},xr=(ye,ve="users")=>{const Ee=ve==="users"?vt:qt,je={"1D":24,"1W":7,"1M":30,"3M":3,"6M":6,"1Y":12,ALL:7}[ye]||7;if(!Ee||Ee.length===0)return Array(je).fill(0);const Le=[...Ee];for(;Le.length<je;)Le.push(0);const Oe=Le.slice(0,je),Ce=Math.max(...Oe,1);return Oe.map(nt=>nt/Ce*100)},Ds=()=>{const ye=tt.length>0?tt:Ta(u,"users"),ve=ye.map((de,je)=>Lc.reduce((Le,Oe)=>{var Ce;return Le+(((Ce=be[Oe.id])==null?void 0:Ce[je])??0)},0)),Ee=Math.max(...ve,1);return r.jsxs("div",{className:"space-y-6 min-h-screen h-full mt-5 flex-1 overflow-y-hidden overflow-x-hidden px-0",children:[r.jsx("div",{className:"px-6 overflow-hidden",children:r.jsxs("div",{className:"flex items-center justify-between gap-8 py-4 px-6 bg-white/5 border border-white/10 rounded-none overflow-x-auto relative",children:[r.jsx("div",{className:"absolute top-0 left-0 w-[12px] h-[0.5px] bg-white/30"}),r.jsx("div",{className:"absolute top-0 left-0 w-[0.5px] h-[12px] bg-white/30"}),r.jsx("div",{className:"absolute top-0 right-0 w-[12px] h-[0.5px] bg-white/30"}),r.jsx("div",{className:"absolute top-0 right-0 w-[0.5px] h-[12px] bg-white/30"}),r.jsx("div",{className:"absolute bottom-0 left-0 w-[12px] h-[0.5px] bg-white/30"}),r.jsx("div",{className:"absolute bottom-0 left-0 w-[0.5px] h-[12px] bg-white/30"}),r.jsx("div",{className:"absolute bottom-0 right-0 w-[12px] h-[0.5px] bg-white/30"}),r.jsx("div",{className:"absolute bottom-0 right-0 w-[0.5px] h-[12px] bg-white/30"}),r.jsxs("div",{className:"flex items-center gap-3 min-w-fit",children:[r.jsx("div",{className:"w-10 h-10 rounded-none bg-white/5 border border-dashed border-white/10 flex items-center justify-center flex-shrink-0",children:r.jsx(Ct,{className:"w-5 h-5 text-white"})}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("span",{className:"text-gray-400 text-sm uppercase tracking-wide",children:"Users"}),r.jsx("span",{className:"text-white text-lg font-medium",children:Fn?"...":Jn(Wa.users)}),r.jsxs("div",{className:`flex items-center gap-1 ${pn>=0?"text-green-500":"text-red-500"}`,children:[r.jsx("svg",{className:`w-3 h-3 ${pn<0?"rotate-180":""}`,viewBox:"0 0 12 12",fill:"currentColor",children:r.jsx("path",{d:"M6 0 L12 12 L0 12 Z"})}),r.jsxs("span",{className:"text-sm font-medium",children:[Math.abs(pn).toFixed(1),"%"]})]})]})]}),r.jsx("div",{className:"h-8 w-[1px] bg-white/10"}),r.jsxs("div",{className:"flex items-center gap-3 min-w-fit",children:[r.jsx("div",{className:"w-10 h-10 rounded-none bg-white/5 border border-dashed border-white/10 flex items-center justify-center flex-shrink-0",children:r.jsx(ha,{className:"w-5 h-5 text-white"})}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("span",{className:"text-gray-400 text-sm uppercase tracking-wide",children:"Organizations"}),r.jsx("span",{className:"text-white text-lg font-medium",children:Fn?"...":Jn(Wa.organizations)}),r.jsxs("div",{className:`flex items-center gap-1 ${Xt>=0?"text-green-500":"text-red-500"}`,children:[r.jsx("svg",{className:`w-3 h-3 ${Xt<0?"rotate-180":""}`,viewBox:"0 0 12 12",fill:"currentColor",children:r.jsx("path",{d:"M6 0 L12 12 L0 12 Z"})}),r.jsxs("span",{className:"text-sm font-medium",children:[Math.abs(Xt).toFixed(1),"%"]})]})]})]}),r.jsx("div",{className:"h-8 w-[1px] bg-white/10"}),r.jsxs("div",{className:"flex items-center gap-3 min-w-fit",children:[r.jsx("div",{className:"w-10 h-10 rounded-none bg-white/5 border border-dashed border-white/10 flex items-center justify-center flex-shrink-0",children:r.jsx(pC,{className:"w-5 h-5 text-white"})}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("span",{className:"text-gray-400 text-sm uppercase tracking-wide",children:"Sessions"}),r.jsx("span",{className:"text-white text-lg font-medium",children:Fn?"...":Jn(Wa.sessions)}),r.jsxs("div",{className:`flex items-center gap-1 ${wn>=0?"text-green-500":"text-red-500"}`,children:[r.jsx("svg",{className:`w-3 h-3 ${wn<0?"rotate-180":""}`,viewBox:"0 0 12 12",fill:"currentColor",children:r.jsx("path",{d:"M6 0 L12 12 L0 12 Z"})}),r.jsxs("span",{className:"text-sm font-medium",children:[Math.abs(wn).toFixed(1),"%"]})]})]})]}),r.jsx("div",{className:"h-8 w-[1px] bg-white/10"}),r.jsxs("div",{className:"flex items-center gap-3 min-w-fit",children:[r.jsx("div",{className:"w-10 h-10 rounded-none bg-white/5 border border-dashed border-white/10 flex items-center justify-center flex-shrink-0",children:r.jsx(hC,{className:"w-5 h-5 text-white"})}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("span",{className:"text-gray-400 text-sm uppercase tracking-wide",children:"Activity Hits"}),r.jsx("span",{className:"text-white text-lg font-medium",children:Fn?"...":Jn(Do??0)}),r.jsxs("div",{className:`flex items-center gap-1 ${Va>=0?"text-green-500":"text-red-500"}`,children:[r.jsx("svg",{className:`w-3 h-3 ${Va<0?"rotate-180":""}`,viewBox:"0 0 12 12",fill:"currentColor",children:r.jsx("path",{d:"M6 0 L12 12 L0 12 Z"})}),r.jsxs("span",{className:"text-sm font-medium",children:[Math.abs(Va).toFixed(1),"%"]})]})]})]}),r.jsx("div",{className:"h-8 w-[1px] bg-white/10"}),r.jsxs("div",{className:"flex items-center gap-3 min-w-fit",children:[r.jsx("div",{className:"w-10 h-10 rounded-none bg-white/5 border border-dashed border-white/10 flex items-center justify-center flex-shrink-0",children:r.jsx(Ct,{className:"w-5 h-5 text-white"})}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("span",{className:"text-gray-400 text-sm uppercase tracking-wide",children:"New Users"}),r.jsx("span",{className:"text-white text-lg font-medium",children:Fn?"...":Jn(i??0)}),r.jsxs("div",{className:`flex items-center gap-1 ${Kr>=0?"text-green-500":"text-red-500"}`,children:[r.jsx("svg",{className:`w-3 h-3 ${Kr<0?"rotate-180":""}`,viewBox:"0 0 12 12",fill:"currentColor",children:r.jsx("path",{d:"M6 0 L12 12 L0 12 Z"})}),r.jsxs("span",{className:"text-sm font-medium",children:[Math.abs(Kr).toFixed(1),"%"]})]})]})]})]})}),r.jsxs("div",{className:"px-6 pb-10 space-y-6",children:[r.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[r.jsxs("div",{className:"bg-white/5 border border-white/10 p-6 relative",children:[r.jsx("div",{className:"absolute top-0 left-0 w-[12px] h-[0.5px] bg-white/30"}),r.jsx("div",{className:"absolute top-0 left-0 w-[0.5px] h-[12px] bg-white/30"}),r.jsx("div",{className:"absolute top-0 right-0 w-[12px] h-[0.5px] bg-white/30"}),r.jsx("div",{className:"absolute top-0 right-0 w-[0.5px] h-[12px] bg-white/30"}),r.jsx("div",{className:"absolute bottom-0 left-0 w-[12px] h-[0.5px] bg-white/30"}),r.jsx("div",{className:"absolute bottom-0 left-0 w-[0.5px] h-[12px] bg-white/30"}),r.jsx("div",{className:"absolute bottom-0 right-0 w-[12px] h-[0.5px] bg-white/30"}),r.jsx("div",{className:"absolute bottom-0 right-0 w-[0.5px] h-[12px] bg-white/30"}),r.jsxs("div",{className:"flex items-center justify-between mb-4",children:[r.jsx("h3",{className:"text-sm text-white uppercase font-light",children:"TOTAL USER"}),r.jsx("div",{className:"flex items-center space-x-1 overflow-x-auto",children:["1D","1W","6M","1Y"].map(de=>r.jsx("button",{onClick:()=>c(de),className:`px-2 py-1 text-xs font-light transition-colors whitespace-nowrap ${l===de?"bg-white/20 text-white border border-white/30":"text-gray-500 hover:text-white"}`,children:de},de))})]}),r.jsxs("div",{className:"flex justify-between items-end mb-6",children:[r.jsx("p",{className:"text-4xl text-white font-light",children:Fn?"...":Jn(Wa.users)}),r.jsxs("div",{className:"flex items-center gap-1 px-2 py-1",children:[r.jsx("svg",{className:`w-3 h-3 ${Et>=0?"text-green-500":"text-red-500 rotate-180"}`,viewBox:"0 0 12 12",fill:"currentColor",children:r.jsx("path",{d:"M6 0 L12 12 L0 12 Z"})}),r.jsxs("span",{className:`text-xs font-medium ${Et>=0?"text-green-500":"text-red-500"}`,children:[Math.abs(Et).toFixed(1),"%"]})]})]}),r.jsxs("div",{className:"space-y-2 relative",children:[r.jsxs("div",{className:"h-32 relative",children:[r.jsx("svg",{className:"w-full h-full absolute inset-0",viewBox:"0 0 100 100",preserveAspectRatio:"none",children:r.jsx("defs",{children:r.jsxs("linearGradient",{id:"usersBarGradient",x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[r.jsx("stop",{offset:"0%",style:{stopColor:"rgba(255, 255, 255, 0.3)",stopOpacity:1}}),r.jsx("stop",{offset:"100%",style:{stopColor:"rgba(255, 255, 255, 0.05)",stopOpacity:1}})]})})}),r.jsx("div",{className:"h-32 flex items-end justify-between space-x-1 relative z-10",children:xr(l,"users").map((de,je)=>{const Le=M===je;return r.jsx("div",{className:"flex-1 transition-all duration-200 ease-out relative cursor-pointer group",style:{height:`${de}%`,background:"url(#usersBarGradient)"},onMouseEnter:Oe=>{const Ce=Oe.currentTarget.getBoundingClientRect(),nt=Ce.left+Ce.width/2,_e=Ce.top,_t=150,zn=60,Ca=Math.max(_t/2,Math.min(window.innerWidth-_t/2,nt)),ea=Math.max(zn+10,Math.min(window.innerHeight-10,_e));A(je),B({x:Ca,y:ea})},onMouseLeave:()=>{A(null),B(null)},children:r.jsx("div",{className:"w-full h-full",style:{background:"linear-gradient(to bottom, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.05))",opacity:Le?1:.8}})},je)})}),M!==null&&D&&r.jsx("div",{className:"fixed z-50 pointer-events-none transition-all duration-200 ease-out animate-in fade-in",style:{left:`${D.x}px`,top:`${D.y}px`,transform:"translate(-50%, -100%)",maxWidth:"calc(100vw - 20px)"},children:r.jsxs("div",{className:"bg-black border border-white/20 rounded-sm px-3 py-2 shadow-lg whitespace-nowrap",children:[r.jsx("div",{className:"text-xs text-gray-400 mb-1 font-mono uppercase",children:Mo(l,"users")[M]}),r.jsxs("div",{className:"text-sm text-white font-sans font-medium",children:[vt[M]!==void 0?vt[M].toLocaleString():"0"," ",r.jsx("span",{className:"font-mono text-xs text-gray-400",children:"users"})]})]})})]}),r.jsx("div",{className:`flex justify-between ${l==="1M"?"text-[10px]":"text-xs"} text-gray-500 font-mono`,children:Ta(l,"users").map((de,je)=>r.jsx("span",{className:"flex-1 text-center truncate",children:de},je))})]})]}),r.jsxs("div",{className:"bg-white/5 border border-white/10 p-6 relative",children:[r.jsx("div",{className:"absolute top-0 left-0 w-[12px] h-[0.5px] bg-white/30"}),r.jsx("div",{className:"absolute top-0 left-0 w-[0.5px] h-[12px] bg-white/30"}),r.jsx("div",{className:"absolute top-0 right-0 w-[12px] h-[0.5px] bg-white/30"}),r.jsx("div",{className:"absolute top-0 right-0 w-[0.5px] h-[12px] bg-white/30"}),r.jsx("div",{className:"absolute bottom-0 left-0 w-[12px] h-[0.5px] bg-white/30"}),r.jsx("div",{className:"absolute bottom-0 left-0 w-[0.5px] h-[12px] bg-white/30"}),r.jsx("div",{className:"absolute bottom-0 right-0 w-[12px] h-[0.5px] bg-white/30"}),r.jsx("div",{className:"absolute bottom-0 right-0 w-[0.5px] h-[12px] bg-white/30"}),r.jsxs("div",{className:"flex items-center justify-between mb-4",children:[r.jsxs("div",{children:[r.jsx("h3",{className:"text-sm text-white uppercase font-light",children:"Activity Hits"}),r.jsx("p",{className:"text-4xl text-white font-light mt-1",children:Qe?"...":Xa(_s)}),r.jsx("p",{className:"text-xs text-gray-400",children:"Tracked events in selected period"})]}),r.jsx("div",{className:"flex items-center space-x-1 overflow-x-auto",children:["1D","1W","3M","6M","1Y"].map(de=>r.jsx("button",{onClick:()=>h(de),className:`px-2 py-1 text-xs font-light transition-colors whitespace-nowrap ${u===de?"bg-white/20 text-white border border-white/30":"text-gray-500 hover:text-white"}`,children:de},de))})]}),r.jsxs("div",{className:"space-y-2 relative",children:[r.jsx("div",{className:"h-40 flex items-end gap-1",children:ye.map((de,je)=>{const Le=ve[je]||0;return r.jsx("div",{className:"flex-1 flex flex-col justify-end gap-[1px] h-full cursor-pointer",onMouseEnter:Oe=>Io(Oe,je),onMouseLeave:()=>{L(null),X(null)},children:Lc.map(Oe=>{var _e;const Ce=((_e=be[Oe.id])==null?void 0:_e[je])??0,nt=Le===0||Ee===0?0:Math.max(Ce/Ee*100,Ce>0?4:0);return r.jsx("div",{className:`w-full ${Oe.barClass}`,style:{height:`${nt}%`}},`${Oe.id}-${je}`)})},`${de}-${je}`)})}),Qe&&r.jsx("div",{className:"absolute inset-0 bg-black/40 backdrop-blur-sm flex items-center justify-center text-xs uppercase text-gray-400 pointer-events-none",children:"Loading activity..."}),G!==null&&q&&r.jsx("div",{className:"fixed z-50 pointer-events-none transition-all duration-200 ease-out animate-in fade-in",style:{left:`${q.x}px`,top:`${q.y}px`,transform:"translate(-50%, -100%)",maxWidth:"calc(100vw - 20px)"},children:r.jsxs("div",{className:"bg-black border border-white/20 rounded-sm px-3 py-2 shadow-lg min-w-[180px]",children:[r.jsx("div",{className:"text-xs text-gray-400 mb-2 font-mono uppercase",children:ye[G]||`Bucket ${G+1}`}),r.jsx("div",{className:"space-y-1",children:Lc.map(de=>{var je;return r.jsxs("div",{className:"flex items-center justify-between text-sm",children:[r.jsxs("div",{className:"flex items-center gap-2 text-gray-300",children:[r.jsx("span",{className:`w-2 h-2 rounded-sm ${de.dotClass}`}),de.label]}),r.jsx("span",{className:"text-white font-medium",children:((je=be[de.id])==null?void 0:je[G])??0})]},de.id)})})]})}),r.jsx("div",{className:`flex justify-between ${u==="1M"?"text-[10px]":"text-xs"} text-gray-500 font-mono`,children:ye.map((de,je)=>r.jsx("span",{className:"flex-1 text-center truncate",children:de},je))}),r.jsx("div",{className:"grid grid-cols-2 lg:grid-cols-5 gap-3 mt-4 pt-4 border-t border-white/10",children:Lc.map(de=>r.jsxs("div",{className:"flex items-center justify-between text-xs text-gray-400",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("span",{className:`w-2 h-2 rounded-sm ${de.dotClass}`}),de.label]}),r.jsx("span",{className:"text-white font-medium",children:Qe?"...":Xa(ks[de.id]||0)})]},de.id))})]})]})]}),r.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[r.jsxs("div",{className:"space-y-4 overflow-x-hidden",children:[r.jsxs("div",{className:"bg-white/5 border border-white/10 p-6 pb-2 relative",children:[r.jsx("div",{className:"absolute top-0 left-0 w-[12px] h-[0.5px] bg-white/30"}),r.jsx("div",{className:"absolute top-0 left-0 w-[0.5px] h-[12px] bg-white/30"}),r.jsx("div",{className:"absolute top-0 right-0 w-[12px] h-[0.5px] bg-white/30"}),r.jsx("div",{className:"absolute top-0 right-0 w-[0.5px] h-[12px] bg-white/30"}),r.jsx("div",{className:"absolute bottom-0 left-0 w-[12px] h-[0.5px] bg-white/30"}),r.jsx("div",{className:"absolute bottom-0 left-0 w-[0.5px] h-[12px] bg-white/30"}),r.jsx("div",{className:"absolute bottom-0 right-0 w-[12px] h-[0.5px] bg-white/30"}),r.jsx("div",{className:"absolute bottom-0 right-0 w-[0.5px] h-[12px] bg-white/30"}),r.jsxs("div",{className:"flex items-center justify-between mb-2 relative -mt-2 pb-1",children:[r.jsxs("div",{className:"relative",children:[r.jsxs("button",{onClick:()=>E(!T),className:"text-xs h-full font-mono uppercase text-gray-400 flex items-center space-x-1 hover:text-white transition-colors",children:[r.jsx(ch,{className:"w-3 h-3"}),r.jsx("span",{children:x})]}),T&&r.jsx("div",{className:"absolute top-6 left-0 w-[150px] z-10 bg-black border border-white/10 rounded-none shadow-lg",children:Ea.map(de=>r.jsx("button",{onClick:()=>{N(de),E(!1)},className:"block border-b border-dashed border-white/5 w-full text-left px-4 py-2 text-xs text-white hover:bg-white/10 transition-colors whitespace-nowrap",children:de},de))})]}),x==="Custom"&&r.jsxs("div",{className:"h-0 flex items-center gap-2",children:[r.jsxs(Oa,{children:[r.jsx(Da,{asChild:!0,children:r.jsxs($,{variant:"outline",className:"h-6 px-2 text-xs font-mono uppercase text-gray-400 hover:text-white bg-transparent border-white/10 hover:bg-white/5",children:[r.jsx(Za,{className:"mr-1 h-3 w-3"}),K?_a(K,"MMM dd yyyy"):"From"]})}),r.jsx(da,{className:"w-auto p-0 bg-black border-white/10",children:r.jsx(Ra,{mode:"single",selected:K,onSelect:ne,initialFocus:!0,className:"rounded-none"})})]}),r.jsxs(Oa,{children:[r.jsx(Da,{asChild:!0,children:r.jsxs($,{variant:"outline",className:"h-6 px-2 text-xs font-mono uppercase text-gray-400 hover:text-white bg-transparent border-white/10 hover:bg-white/5",children:[r.jsx(Za,{className:"mr-1 h-3 w-3"}),te?_a(te,"MMM dd yyyy"):"To"]})}),r.jsx(da,{className:"w-auto p-0 bg-black border-white/10",children:r.jsx(Ra,{mode:"single",selected:te,onSelect:ee,initialFocus:!0,disabled:de=>K?de<K:!1,className:"rounded-none"})})]})]})]}),r.jsx("hr",{className:"mb-2 -mx-10 border-white/10"}),r.jsx("h4",{className:"text-md text-white/80 uppercase font-mono font-light mb-1",children:"Active Users"}),r.jsx("p",{className:"text-xs text-gray-400 mb-3",children:"Users with active session in the time frame"}),r.jsxs("div",{className:"flex pt-4 justify-between items-end",children:[r.jsx("p",{className:"text-3xl text-white font-light",children:Xa(a)}),r.jsx("div",{className:"mt-2 mb-1 flex items-center gap-2",children:r.jsxs("div",{className:"flex items-center -mr-5 gap-1 px-2 py-1 border-white/5 rounded-none",children:[r.jsx("svg",{className:`w-3 h-3 ${Be>=0?"text-green-500":"text-red-500 rotate-180"}`,viewBox:"0 0 12 12",fill:"currentColor",children:r.jsx("path",{d:"M6 0 L12 12 L0 12 Z"})}),r.jsxs("span",{className:`text-xs font-medium ${Be>=0?"text-green-500":"text-red-500"}`,children:[Math.abs(Be).toFixed(1),"%"]})]})})]})]}),r.jsxs("div",{className:"bg-white/5 border border-white/10 p-6 pb-2 relative",children:[r.jsx("div",{className:"absolute top-0 left-0 w-[12px] h-[0.5px] bg-white/30"}),r.jsx("div",{className:"absolute top-0 left-0 w-[0.5px] h-[12px] bg-white/30"}),r.jsx("div",{className:"absolute top-0 right-0 w-[12px] h-[0.5px] bg-white/30"}),r.jsx("div",{className:"absolute top-0 right-0 w-[0.5px] h-[12px] bg-white/30"}),r.jsx("div",{className:"absolute bottom-0 left-0 w-[12px] h-[0.5px] bg-white/30"}),r.jsx("div",{className:"absolute bottom-0 left-0 w-[0.5px] h-[12px] bg-white/30"}),r.jsx("div",{className:"absolute bottom-0 right-0 w-[12px] h-[0.5px] bg-white/30"}),r.jsx("div",{className:"absolute bottom-0 right-0 w-[0.5px] h-[12px] bg-white/30"}),r.jsxs("div",{className:"flex items-center justify-between mb-2 relative -mt-2 pb-1",children:[r.jsxs("div",{className:"relative",children:[r.jsxs("button",{onClick:()=>O(!k),className:"text-xs h-full font-mono uppercase text-gray-400 flex items-center space-x-1 hover:text-white transition-colors",children:[r.jsx(ch,{className:"w-3 h-3"}),r.jsx("span",{children:b})]}),k&&r.jsx("div",{className:"absolute top-6 left-0 w-[150px] z-10 bg-black border border-white/10 rounded-none shadow-lg",children:Ea.map(de=>r.jsx("button",{onClick:()=>{y(de),O(!1)},className:"block border-b border-dashed border-white/5 w-full text-left px-4 py-2 text-xs text-white hover:bg-white/10 transition-colors whitespace-nowrap",children:de},de))})]}),b==="Custom"&&r.jsxs("div",{className:"h-0 flex items-center gap-2",children:[r.jsxs(Oa,{children:[r.jsx(Da,{asChild:!0,children:r.jsxs($,{variant:"outline",className:"h-6 px-2 text-xs font-mono uppercase text-gray-400 hover:text-white bg-transparent border-white/10 hover:bg-white/5",children:[r.jsx(Za,{className:"mr-1 h-3 w-3"}),ae?_a(ae,"MMM dd yyyy"):"From"]})}),r.jsx(da,{className:"w-auto p-0 bg-black border-white/10",children:r.jsx(Ra,{mode:"single",selected:ae,onSelect:ge,initialFocus:!0,className:"rounded-none"})})]}),r.jsxs(Oa,{children:[r.jsx(Da,{asChild:!0,children:r.jsxs($,{variant:"outline",className:"h-6 px-2 text-xs font-mono uppercase text-gray-400 hover:text-white bg-transparent border-white/10 hover:bg-white/5",children:[r.jsx(Za,{className:"mr-1 h-3 w-3"}),se?_a(se,"MMM dd yyyy"):"To"]})}),r.jsx(da,{className:"w-auto p-0 bg-black border-white/10",children:r.jsx(Ra,{mode:"single",selected:se,onSelect:fe,initialFocus:!0,disabled:de=>ae?de<ae:!1,className:"rounded-none"})})]})]})]}),r.jsx("hr",{className:"mb-2 -mx-10 border-white/10"}),r.jsx("h4",{className:"text-md text-white/80 uppercase font-mono font-light mb-1",children:"New Users"}),r.jsx("p",{className:"text-xs text-gray-400 mb-3",children:"Newly registered Users in the time frame"}),r.jsxs("div",{className:"flex pt-4 justify-between items-end",children:[r.jsx("p",{className:"text-3xl text-white font-light",children:Xa(Yr)}),r.jsx("div",{className:"mt-2 mb-1 flex items-center gap-2",children:r.jsxs("div",{className:"flex items-center -mr-5 gap-1 px-2 py-1 rounded-none",children:[r.jsx("svg",{className:`w-3 h-3 ${Xr>=0?"text-green-500":"text-red-500 rotate-180"}`,viewBox:"0 0 12 12",fill:"currentColor",style:Xr<0?{transform:"rotate(180deg)"}:{},children:r.jsx("path",{d:"M6 0 L12 12 L0 12 Z"})}),r.jsxs("span",{className:`text-xs font-medium ${Xr>=0?"text-green-500":"text-red-500"}`,children:[Math.abs(Xr).toFixed(1),"%"]})]})})]})]})]}),r.jsxs("div",{className:"space-y-4 overflow-x-hidden",children:[r.jsxs("div",{className:"bg-white/5 border border-white/10 p-6 pb-2 relative",children:[r.jsx("div",{className:"absolute top-0 left-0 w-[12px] h-[0.5px] bg-white/30"}),r.jsx("div",{className:"absolute top-0 left-0 w-[0.5px] h-[12px] bg-white/30"}),r.jsx("div",{className:"absolute top-0 right-0 w-[12px] h-[0.5px] bg-white/30"}),r.jsx("div",{className:"absolute top-0 right-0 w-[0.5px] h-[12px] bg-white/30"}),r.jsx("div",{className:"absolute bottom-0 left-0 w-[12px] h-[0.5px] bg-white/30"}),r.jsx("div",{className:"absolute bottom-0 left-0 w-[0.5px] h-[12px] bg-white/30"}),r.jsx("div",{className:"absolute bottom-0 right-0 w-[12px] h-[0.5px] bg-white/30"}),r.jsx("div",{className:"absolute bottom-0 right-0 w-[0.5px] h-[12px] bg-white/30"}),r.jsxs("div",{className:"flex items-center justify-between mb-2 relative -mt-2 pb-1",children:[r.jsxs("div",{className:"relative",children:[r.jsxs("button",{onClick:()=>I(!R),className:"text-xs h-full font-mono uppercase text-gray-400 flex items-center space-x-1 hover:text-white transition-colors",children:[r.jsx(ch,{className:"w-3 h-3"}),r.jsx("span",{children:g})]}),R&&r.jsx("div",{className:"absolute top-6 left-0 w-[150px] z-10 bg-black border border-white/10 rounded-none shadow-lg",children:Ea.map(de=>r.jsx("button",{onClick:()=>{w(de),I(!1)},className:"block border-b border-dashed border-white/5 w-full text-left px-4 py-2 text-xs text-white hover:bg-white/10 transition-colors whitespace-nowrap",children:de},de))})]}),g==="Custom"&&r.jsxs("div",{className:"h-0 flex items-center gap-2",children:[r.jsxs(Oa,{children:[r.jsx(Da,{asChild:!0,children:r.jsxs($,{variant:"outline",className:"h-6 px-2 text-xs font-mono uppercase text-gray-400 hover:text-white bg-transparent border-white/10 hover:bg-white/5",children:[r.jsx(Za,{className:"mr-1 h-3 w-3"}),me?_a(me,"MMM dd yyyy"):"From"]})}),r.jsx(da,{className:"w-auto p-0 bg-black border-white/10",children:r.jsx(Ra,{mode:"single",selected:me,onSelect:Re,initialFocus:!0,className:"rounded-none"})})]}),r.jsxs(Oa,{children:[r.jsx(Da,{asChild:!0,children:r.jsxs($,{variant:"outline",className:"h-6 px-2 text-xs font-mono uppercase text-gray-400 hover:text-white bg-transparent border-white/10 hover:bg-white/5",children:[r.jsx(Za,{className:"mr-1 h-3 w-3"}),Me?_a(Me,"MMM dd yyyy"):"To"]})}),r.jsx(da,{className:"w-auto p-0 bg-black border-white/10",children:r.jsx(Ra,{mode:"single",selected:Me,onSelect:Ue,initialFocus:!0,disabled:de=>me?de<me:!1,className:"rounded-none"})})]})]})]}),r.jsx("hr",{className:"mb-2 -mx-10 border-white/10"}),r.jsx("h4",{className:"text-md text-white/80 uppercase font-mono font-light mb-1",children:"Organizations"}),r.jsx("p",{className:"text-xs text-gray-400 mb-3",children:"Total organizations in the time frame"}),r.jsxs("div",{className:"flex pt-4 justify-between items-end",children:[r.jsx("p",{className:"text-3xl text-white font-light",children:ue?"...":Xa(Ye)}),r.jsx("div",{className:"mt-2 mb-1 flex items-center gap-2",children:r.jsxs("div",{className:"flex items-center -mr-5 gap-1 px-2 py-1 rounded-none",children:[r.jsx("svg",{className:`w-3 h-3 ${le>=0?"text-green-500":"text-red-500 rotate-180"}`,viewBox:"0 0 12 12",fill:"currentColor",children:r.jsx("path",{d:"M6 0 L12 12 L0 12 Z"})}),r.jsxs("span",{className:`text-xs font-medium ${le>=0?"text-green-500":"text-red-500"}`,children:[Math.abs(le).toFixed(1),"%"]})]})})]})]}),r.jsxs("div",{className:"bg-white/5 border border-white/10 p-6 pb-2 relative",children:[r.jsx("div",{className:"absolute top-0 left-0 w-[12px] h-[0.5px] bg-white/30"}),r.jsx("div",{className:"absolute top-0 left-0 w-[0.5px] h-[12px] bg-white/30"}),r.jsx("div",{className:"absolute top-0 right-0 w-[12px] h-[0.5px] bg-white/30"}),r.jsx("div",{className:"absolute top-0 right-0 w-[0.5px] h-[12px] bg-white/30"}),r.jsx("div",{className:"absolute bottom-0 left-0 w-[12px] h-[0.5px] bg-white/30"}),r.jsx("div",{className:"absolute bottom-0 left-0 w-[0.5px] h-[12px] bg-white/30"}),r.jsx("div",{className:"absolute bottom-0 right-0 w-[12px] h-[0.5px] bg-white/30"}),r.jsx("div",{className:"absolute bottom-0 right-0 w-[0.5px] h-[12px] bg-white/30"}),r.jsxs("div",{className:"flex items-center justify-between mb-2 relative -mt-2 pb-1",children:[r.jsxs("div",{className:"relative",children:[r.jsxs("button",{onClick:()=>j(!F),className:"text-xs h-full font-mono uppercase text-gray-400 flex items-center space-x-1 hover:text-white transition-colors",children:[r.jsx(ch,{className:"w-3 h-3"}),r.jsx("span",{children:S})]}),F&&r.jsx("div",{className:"absolute top-6 left-0 w-[150px] z-10 bg-black border border-white/10 rounded-none shadow-lg",children:Ea.map(de=>r.jsx("button",{onClick:()=>{C(de),j(!1)},className:"block border-b border-dashed border-white/5 w-full text-left px-4 py-2 text-xs text-white hover:bg-white/10 transition-colors whitespace-nowrap",children:de},de))})]}),S==="Custom"&&r.jsxs("div",{className:"h-0 flex items-center gap-2",children:[r.jsxs(Oa,{children:[r.jsx(Da,{asChild:!0,children:r.jsxs($,{variant:"outline",className:"h-6 px-2 text-xs font-mono uppercase text-gray-400 hover:text-white bg-transparent border-white/10 hover:bg-white/5",children:[r.jsx(Za,{className:"mr-1 h-3 w-3"}),$e?_a($e,"MMM dd yyyy"):"From"]})}),r.jsx(da,{className:"w-auto p-0 bg-black border-white/10",children:r.jsx(Ra,{mode:"single",selected:$e,onSelect:pt,initialFocus:!0,className:"rounded-none"})})]}),r.jsxs(Oa,{children:[r.jsx(Da,{asChild:!0,children:r.jsxs($,{variant:"outline",className:"h-6 px-2 text-xs font-mono uppercase text-gray-400 hover:text-white bg-transparent border-white/10 hover:bg-white/5",children:[r.jsx(Za,{className:"mr-1 h-3 w-3"}),Ge?_a(Ge,"MMM dd yyyy"):"To"]})}),r.jsx(da,{className:"w-auto p-0 bg-black border-white/10",children:r.jsx(Ra,{mode:"single",selected:Ge,onSelect:jt,initialFocus:!0,disabled:de=>$e?de<$e:!1,className:"rounded-none"})})]})]})]}),r.jsx("hr",{className:"mb-2 -mx-10 border-white/10"}),r.jsx("h4",{className:"text-md text-white/80 uppercase font-mono font-light mb-1",children:"Teams"}),r.jsx("p",{className:"text-xs text-gray-400 mb-3",children:"Total teams in the time frame"}),r.jsxs("div",{className:"flex pt-4 justify-between items-end",children:[r.jsx("p",{className:"text-3xl text-white font-light",children:W?"...":Xa(ie)}),r.jsx("div",{className:"mt-2 mb-1 flex items-center gap-2",children:r.jsxs("div",{className:"flex items-center -mr-5 gap-1 px-2 py-1 rounded-none",children:[r.jsx("svg",{className:`w-3 h-3 ${xe>=0?"text-green-500":"text-red-500 rotate-180"}`,viewBox:"0 0 12 12",fill:"currentColor",children:r.jsx("path",{d:"M6 0 L12 12 L0 12 Z"})}),r.jsxs("span",{className:`text-xs font-medium ${xe>=0?"text-green-500":"text-red-500"}`,children:[Math.abs(xe).toFixed(1),"%"]})]})})]})]})]}),r.jsxs("div",{className:"bg-white/5 border border-white/10 p-6 pt-4 overflow-hidden relative rounded-none flex flex-col",children:[r.jsx("div",{className:"absolute top-0 left-0 w-[12px] h-[0.5px] bg-white/30"}),r.jsx("div",{className:"absolute top-0 left-0 w-[0.5px] h-[12px] bg-white/30"}),r.jsx("div",{className:"absolute top-0 right-0 w-[12px] h-[0.5px] bg-white/30"}),r.jsx("div",{className:"absolute top-0 right-0 w-[0.5px] h-[12px] bg-white/30"}),r.jsx("div",{className:"absolute bottom-0 left-0 w-[12px] h-[0.5px] bg-white/30"}),r.jsx("div",{className:"absolute bottom-0 left-0 w-[0.5px] h-[12px] bg-white/30"}),r.jsx("div",{className:"absolute bottom-0 right-0 w-[12px] h-[0.5px] bg-white/30"}),r.jsx("div",{className:"absolute bottom-0 right-0 w-[0.5px] h-[12px] bg-white/30"}),r.jsx("div",{className:"flex items-center justify-between mb-4 flex-shrink-0",children:r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(Cn,{className:"w-4 h-4 text-white/60"}),r.jsx("h4",{className:"text-xs text-gray-400 uppercase font-mono font-light",children:"Security Insights"})]})}),r.jsx("hr",{className:"-mx-10 -mt-1 border-white/10"}),r.jsxs("div",{className:"space-y-3 overflow-y-auto custom-scrollbar max-h-[400px]",children:[Mi.length===0&&r.jsx("div",{className:"text-sm flex items-center justify-center text-gray-400",children:r.jsxs("div",{className:"flex mt-5 items-center justify-center",children:[r.jsx(Cn,{className:"w-4 h-4 text-gray-400 mr-2"}),r.jsx("p",{className:"text-center",children:"No security insights found"})]})}),Mi.map((de,je)=>r.jsx("div",{onClick:()=>Os(de),className:"group py-2 border-b border-white/5 cursor-pointer transition-all duration-200 hover:border-white/20",style:{animation:`slideIn 0.3s ease-out ${je*.1}s both`},children:r.jsxs("div",{className:"flex items-start justify-between gap-3",children:[r.jsxs("div",{className:"flex-1 min-w-0",children:[r.jsx("div",{className:"flex items-center gap-2 mb-1.5",children:r.jsx("span",{className:"text-sm text-white/90 font-light truncate group-hover:text-white transition-colors",children:de.title})}),r.jsxs("div",{className:"flex items-center gap-1.5 flex-wrap",children:[r.jsx("span",{className:`text-[9px] px-1.5 py-0.5 border rounded-sm uppercase font-mono ${gr(de.severity)}`,children:de.severity}),r.jsx("span",{className:`text-[9px] px-1.5 py-0.5 border rounded-sm capitalize font-mono ${br(de.status)}`,children:de.status})]})]}),r.jsx(Bd,{className:"w-3.5 h-3.5 text-gray-500 group-hover:text-white transition-all flex-shrink-0 mt-0.5"})]})},de.id))]})]})]})]})]})};return r.jsxs("div",{className:"h-screen bg-black text-white overflow-hidden flex flex-col",style:{overflowX:"hidden"},children:[r.jsx("div",{className:"flex-1 overflow-hidden",children:e==="overview"?Ds():e==="users"?r.jsx(y5,{}):e==="organizations"?r.jsx(x5,{}):Ds()}),t&&r.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:r.jsxs("div",{className:"bg-black/90 border border-dashed border-white/20 p-6 w-full max-w-3xl rounded-none",children:[r.jsxs("div",{className:"flex items-center justify-between mb-6",children:[r.jsxs("div",{className:"flex items-center space-x-3",children:[r.jsx(pC,{className:"w-6 h-6 text-white"}),r.jsx("h3",{className:"text-lg text-white font-light",children:"Quick Actions"})]}),r.jsx($,{variant:"ghost",size:"sm",onClick:()=>n(!1),className:"text-gray-400 hover:text-white rounded-none",children:r.jsx(xt,{className:"w-4 h-4"})})]}),r.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[r.jsxs("button",{onClick:()=>{n(!1),Bn("/users")},className:"flex items-center space-x-4 p-4 bg-black/30 border border-dashed border-white/20 rounded-none hover:bg-black/50 transition-colors text-left group",children:[r.jsx("div",{className:"p-2 bg-white/10 rounded-none group-hover:bg-white/20 transition-colors",children:r.jsx(Ct,{className:"w-6 h-6 text-white"})}),r.jsxs("div",{className:"flex-1",children:[r.jsx("h4",{className:"text-white font-light mb-1",children:"View All Users"}),r.jsx("p",{className:"text-sm text-gray-400",children:"Manage user accounts"})]}),r.jsx(Xs,{className:"w-4 h-4 text-gray-400 group-hover:text-white transition-colors"})]}),r.jsxs("button",{onClick:()=>{n(!1),Bn("/organizations")},className:"flex items-center space-x-4 p-4 bg-black/30 border border-dashed border-white/20 rounded-none hover:bg-black/50 transition-colors text-left group",children:[r.jsx("div",{className:"p-2 bg-white/10 rounded-none group-hover:bg-white/20 transition-colors",children:r.jsx(ha,{className:"w-6 h-6 text-white"})}),r.jsxs("div",{className:"flex-1",children:[r.jsx("h4",{className:"text-white font-light mb-1",children:"View Organizations"}),r.jsx("p",{className:"text-sm text-gray-400",children:"Manage organizations"})]}),r.jsx(Xs,{className:"w-4 h-4 text-gray-400 group-hover:text-white transition-colors"})]}),r.jsxs("button",{onClick:()=>{n(!1),Bn("/sessions")},className:"flex items-center space-x-4 p-4 bg-black/30 border border-dashed border-white/20 rounded-none hover:bg-black/50 transition-colors text-left group",children:[r.jsx("div",{className:"p-2 bg-white/10 rounded-none group-hover:bg-white/20 transition-colors",children:r.jsx(hC,{className:"w-6 h-6 text-white"})}),r.jsxs("div",{className:"flex-1",children:[r.jsx("h4",{className:"text-white font-light mb-1",children:"View Sessions"}),r.jsx("p",{className:"text-sm text-gray-400",children:"Monitor active sessions"})]}),r.jsx(Xs,{className:"w-4 h-4 text-gray-400 group-hover:text-white transition-colors"})]}),r.jsxs("button",{onClick:()=>{n(!1),Bn("/database")},className:"flex items-center space-x-4 p-4 bg-black/30 border border-dashed border-white/20 rounded-none hover:bg-black/50 transition-colors text-left group",children:[r.jsx("div",{className:"p-2 bg-white/10 rounded-none group-hover:bg-white/20 transition-colors",children:r.jsx(ps,{className:"w-6 h-6 text-white"})}),r.jsxs("div",{className:"flex-1",children:[r.jsx("h4",{className:"text-white font-light mb-1",children:"Database Schema"}),r.jsx("p",{className:"text-sm text-gray-400",children:"View schema visualizer"})]}),r.jsx(Xs,{className:"w-4 h-4 text-gray-400 group-hover:text-white transition-colors"})]}),r.jsxs("button",{onClick:()=>{n(!1),Bn("/settings")},className:"flex items-center space-x-4 p-4 bg-black/30 border border-dashed border-white/20 rounded-none hover:bg-black/50 transition-colors text-left group",children:[r.jsx("div",{className:"p-2 bg-white/10 rounded-none group-hover:bg-white/20 transition-colors",children:r.jsx(u5,{className:"w-6 h-6 text-white"})}),r.jsxs("div",{className:"flex-1",children:[r.jsx("h4",{className:"text-white font-light mb-1",children:"Settings"}),r.jsx("p",{className:"text-sm text-gray-400",children:"Configure system"})]}),r.jsx(Xs,{className:"w-4 h-4 text-gray-400 group-hover:text-white transition-colors"})]}),r.jsxs("button",{onClick:()=>{n(!1),Bn("/users")},className:"flex items-center space-x-4 p-4 bg-black/30 border border-dashed border-white/20 rounded-none hover:bg-black/50 transition-colors text-left group",children:[r.jsx("div",{className:"p-2 bg-white/10 rounded-none group-hover:bg-white/20 transition-colors",children:r.jsx(c5,{className:"w-6 h-6 text-white"})}),r.jsxs("div",{className:"flex-1",children:[r.jsx("h4",{className:"text-white font-light mb-1",children:"Search Users"}),r.jsx("p",{className:"text-sm text-gray-400",children:"Find specific users"})]}),r.jsx(Xs,{className:"w-4 h-4 text-gray-400 group-hover:text-white transition-colors"})]})]}),r.jsx("div",{className:"mt-6 pt-6 border-t border-dashed border-white/10",children:r.jsxs("div",{className:"flex items-center justify-between text-sm text-gray-400",children:[r.jsx("span",{children:"Tip: Press Ctrl+K or Cmd+K for command palette"}),r.jsx($,{variant:"ghost",size:"sm",onClick:()=>n(!1),className:"text-gray-400 hover:text-white rounded-none",children:"Close"})]})})]})}),p&&d&&r.jsx("div",{className:"fixed inset-0 bg-black/80 backdrop-blur-sm z-50 flex items-center justify-center p-4",style:{animation:"fadeIn 0.3s ease-out"},onClick:Zr,children:r.jsxs("div",{className:"bg-black border border-white/20 rounded-none max-w-2xl w-full max-h-[80vh] overflow-y-auto",style:{animation:"slideUp 0.3s ease-out"},onClick:ye=>ye.stopPropagation(),children:[r.jsx("div",{className:"sticky top-0 bg-black border-b border-white/10 p-6 z-10",children:r.jsxs("div",{className:"flex items-start justify-between gap-4",children:[r.jsxs("div",{className:"flex-1",children:[r.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[r.jsx(Cn,{className:"w-6 h-6 text-white"}),r.jsx("h3",{className:"text-xl text-white font-light",children:d.title})]}),r.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[r.jsxs("span",{className:`text-xs px-2 py-1 border rounded-none uppercase font-medium ${gr(d.severity)}`,children:[d.severity," Severity"]}),r.jsx("span",{className:`text-xs px-2 py-1 border rounded-none capitalize ${br(d.status)}`,children:d.status}),d.cve&&r.jsx("span",{className:"text-xs text-gray-400 font-mono bg-white/5 px-2 py-1 border border-white/10 rounded-none",children:d.cve})]})]}),r.jsx("button",{onClick:Zr,className:"p-2 hover:bg-white/10 transition-colors rounded-none",children:r.jsx(xt,{className:"w-5 h-5 text-gray-400 hover:text-white"})})]})}),r.jsxs("div",{className:"p-6 space-y-6",children:[r.jsxs("div",{children:[r.jsx("h4",{className:"text-sm text-gray-400 uppercase tracking-wide mb-2",children:"Release Date"}),r.jsx("p",{className:"text-white",children:new Date(d.date).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"})})]}),r.jsxs("div",{children:[r.jsx("h4",{className:"text-sm text-gray-400 uppercase tracking-wide mb-2",children:"Description"}),d.description.includes("npm install")?r.jsxs("div",{children:[r.jsx("p",{className:"text-white leading-relaxed mb-3",children:d.description.split("Run:")[0]}),r.jsx("div",{className:"relative group",children:r.jsx("div",{className:"bg-black border border-white/20 rounded-none p-3 font-mono text-sm",children:r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsxs("code",{children:[r.jsx("span",{className:"text-green-400",children:"$"})," ",r.jsx("span",{className:"text-cyan-400",children:"npm"})," ",r.jsx("span",{className:"text-yellow-400",children:"install"})," ",r.jsx("span",{className:"text-white",children:"better-auth@latest"})]}),r.jsx("button",{onClick:()=>{navigator.clipboard.writeText("npm install better-auth@latest"),H.success("Command copied to clipboard")},className:"opacity-0 group-hover:opacity-100 transition-opacity p-1 hover:bg-white/10 rounded",title:"Copy command",children:r.jsx(aa,{className:"w-4 h-4 text-gray-400 hover:text-white"})})]})})})]}):r.jsx("p",{className:"text-white leading-relaxed",children:d.description})]}),r.jsxs("div",{children:[r.jsx("h4",{className:"text-sm text-gray-400 uppercase tracking-wide mb-3",children:"Affected Components"}),r.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-2",children:d.affectedComponents.map((ye,ve)=>r.jsxs("div",{className:"flex items-center gap-2 p-3 bg-white/5 border border-white/10 rounded-none",style:{animation:`slideIn 0.3s ease-out ${ve*.1}s both`},children:[r.jsx("div",{className:"w-2 h-2 bg-white rounded-none flex-shrink-0"}),r.jsx("span",{className:"text-sm text-white",children:ye})]},ve))})]}),r.jsx("div",{className:"p-4 bg-white/5 border border-white/10 rounded-none",children:r.jsxs("div",{className:"flex items-start gap-3",children:[d.status==="applied"&&r.jsxs(r.Fragment,{children:[r.jsx(zf,{className:"w-5 h-5 text-white flex-shrink-0 mt-0.5"}),r.jsxs("div",{children:[r.jsx("h5",{className:"text-sm text-white font-medium mb-1",children:"Patch Applied"}),r.jsx("p",{className:"text-xs text-gray-400",children:"This security patch has been successfully applied to your system."})]})]}),d.status==="scheduled"&&r.jsxs(r.Fragment,{children:[r.jsx(d5,{className:"w-5 h-5 text-white flex-shrink-0 mt-0.5"}),r.jsxs("div",{children:[r.jsx("h5",{className:"text-sm text-white font-medium mb-1",children:"Scheduled"}),r.jsx("p",{className:"text-xs text-gray-400",children:"This patch is scheduled for deployment in the next maintenance window."})]})]}),d.status==="pending"&&r.jsxs(r.Fragment,{children:[r.jsx(bte,{className:"w-5 h-5 text-white flex-shrink-0 mt-0.5"}),r.jsxs("div",{children:[r.jsx("h5",{className:"text-sm text-white font-medium mb-1",children:"Action Required"}),r.jsx("p",{className:"text-xs text-gray-400",children:"This patch is pending review and requires manual approval before deployment."})]})]})]})}),r.jsx("div",{className:"flex items-center justify-end gap-3 pt-4 border-t border-white/10",children:r.jsx($,{variant:"ghost",onClick:Zr,className:"text-gray-400 hover:text-white rounded-none",children:"Close"})})]})]})}),r.jsx("style",{children:`
|
|
510
510
|
@keyframes fadeIn {
|
|
511
511
|
from {
|
|
512
512
|
opacity: 0;
|
|
@@ -1087,4 +1087,4 @@ migrateFromClerk()
|
|
|
1087
1087
|
}`),be(null),Be(!0)},CU=async()=>{try{const Z=await(await fetch("/api/database/schema")).json();if(Z.success&&Z.schema&&Z.schema.tables){const oe=Z.schema.tables.map(Se=>({name:Se.name,displayName:Se.displayName||Se.name}));ae(oe)}}catch{H.error("Failed to fetch available tables")}};m.useEffect(()=>{ne&&(CU(),se(new Set))},[ne]);const AU=z=>{se(Z=>{const oe=new Set(Z);return oe.has(z)?oe.delete(z):oe.add(z),oe})},jU=()=>{se(new Set(ee.map(z=>z.name)))},kU=()=>{se(new Set)},_U=async()=>{if(!jt.trim()){H.error("Please paste a JWT to decode");return}qt(!0),re(null),Et(null);try{const Z=await(await fetch("/api/tools/jwt/decode",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:jt.trim(),secret:We.trim()||void 0})})).json();if(Z.success)Et(Z),H.success("JWT decoded successfully");else{const oe=Z.error||"Failed to decode JWT";re(oe),H.error(oe)}}catch(z){const Z=z instanceof Error?z.message:"Failed to decode JWT";re(Z),H.error(Z)}finally{qt(!1)}},RU=async()=>{const z=parseInt(Q,10);if(isNaN(z)||z<=0){H.error("Please provide a valid expiration (minutes)");return}let Z;if(V==="jwt"){const oe=ke.trim();if(oe.length>0&&oe!=="{"&&oe!=="}")try{Z=JSON.parse(oe)}catch{H.error("Custom claims must be valid JSON");return}}tt(!0),be(null);try{const Se=await(await fetch("/api/tools/token-generator",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({type:V,subject:he||void 0,audience:De||void 0,expiresInMinutes:z,customClaims:Z,secretOverride:Ne||void 0})})).json();if(Se.success)be(Se),_e("success",`✅ Generated ${V.replace("_"," ")} token`,"completed"),H.success("Token generated successfully");else throw new Error(Se.error||"Failed to generate token")}catch(oe){const Se=oe instanceof Error?oe.message:"Failed to generate token";_e("error",`❌ ${Se}`,"failed"),H.error(Se)}finally{tt(!1)}},OU=async()=>{if(ge.size===0){H.error("Please select at least one table to export");return}const z=parseInt(Re,10);if(isNaN(z)||z<=0){H.error("Please enter a valid limit (greater than 0)");return}if(z>1e4){H.error("Limit cannot exceed 10,000 rows per table");return}$e(!0),a("export-data"),l(!0),i([]);try{_e("info",`📦 Starting export of ${ge.size} table(s)...`,"running"),_e("progress",`Format: ${fe.toUpperCase()} | Limit: ${z} rows per table`,"running");const oe=await(await fetch("/api/tools/export",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({tables:Array.from(ge),format:fe,limit:z})})).json();if(oe.success){_e("success","✅ Export completed successfully!","completed"),oe.rowCounts&&Object.entries(oe.rowCounts).forEach(([Kt,Tn])=>{_e("info",` • ${Kt}: ${Tn} rows`,"completed")}),_e("info",`Downloading ${oe.filename}...`,"completed");const Se=new Blob([oe.data],{type:oe.contentType||(fe==="json"?"application/json":"text/csv")}),ze=window.URL.createObjectURL(Se),ct=document.createElement("a");ct.href=ze,ct.download=oe.filename,document.body.appendChild(ct),ct.click(),document.body.removeChild(ct),window.URL.revokeObjectURL(ze),H.success("Export downloaded successfully"),te(!1)}else throw new Error(oe.error||"Export failed")}catch(Z){_e("error",`❌ Export failed: ${Z instanceof Error?Z.message:Z}`,"failed"),H.error("Export failed")}finally{$e(!1),a(null)}},DU=async()=>{a("health-check"),l(!0),i([]),_e("info","Running Better Auth health check...","running");try{_e("progress","Testing Better Auth endpoints...","running");const z=await fetch("/api/tools/health-check",{method:"POST"}),Z=await z.json();if(!z.ok)throw new Error(Z.error||Z.message||"Health check failed");Z.success?(_e("success","✅ Better Auth health check passed","completed"),H.success("Health check passed")):(_e("error","❌ Better Auth health check failed","failed"),Z.failedEndpoints&&Z.failedEndpoints.length>0&&Z.failedEndpoints.forEach(oe=>{const Se=oe.status?` (Status: ${oe.status})`:"",ze=oe.error?` - ${oe.error}`:"";_e("error",` • Endpoint ${oe.endpoint}${Se}${ze}`,"failed")}),H.error("Health check failed"))}catch(z){_e("error",`❌ Health check failed: ${z instanceof Error?z.message:z}`,"failed"),H.error("Health check failed")}finally{a(null)}},IU=new Set(["test-oauth","test-db","hash-password","health-check","export-data","jwt-decoder","token-generator","validate-config","uuid-generator","password-strength","oauth-credentials","secret-generator"]),MU=[{id:"test-oauth",name:"Test OAuth",description:"Test OAuth provider connections",icon:Yn,action:oU,category:"oauth"},{id:"hash-password",name:"Hash Password",description:"Generate SHA hashes",icon:Zi,action:sU,category:"utilities"},{id:"run-migration",name:"Run Migration",description:"Run database migrations",icon:ps,action:cU,category:"database"},{id:"test-db",name:"Test Database",description:"Test database connection",icon:ps,action:uU,category:"database"},{id:"validate-config",name:"Validate Config",description:"Validate Better Auth configuration",icon:zf,action:dU,category:"utilities"},{id:"health-check",name:"Health Check",description:"Run system health check",icon:pT,action:DU,category:"testing"},{id:"export-data",name:"Export Data",description:"Export database tables to JSON or CSV",icon:ud,action:fU,category:"database"},{id:"jwt-decoder",name:"JWT Decoder",description:"Inspect tokens and verify claims",icon:Cn,action:pU,category:"utilities"},{id:"token-generator",name:"Token Generator",description:"Mint short-lived test tokens",icon:hd,action:TU,category:"utilities"},{id:"uuid-generator",name:"UUID Generator",description:"Generate and validate UUIDs",icon:$m,action:mU,category:"utilities"},{id:"password-strength",name:"Password Strength Checker",description:"Validate passwords against your config",icon:Tl,action:gU,category:"utilities"},{id:"oauth-credentials",name:"OAuth Credentials",description:"View and test OAuth provider credentials",icon:Yn,action:vU,category:"oauth"},{id:"secret-generator",name:"Secret Generator",description:"Generate secure AUTH_SECRET for Better Auth",icon:Zi,action:xU,category:"utilities"}],LU=[{id:"oauth",name:"OAuth",icon:Yn},{id:"database",name:"Database",icon:ps},{id:"testing",name:"Testing",icon:pT},{id:"utilities",name:"Utilities",icon:u5}].map(z=>({...z,tools:MU.filter(Z=>Z.category===z.id)}));return r.jsxs("div",{className:"space-y-8 bg-black w-full min-h-screen",children:[r.jsxs("div",{className:"w-full flex flex-col",children:[r.jsx("div",{className:"flex items-center justify-between p-5 pt-7",children:r.jsxs("div",{className:"pb-8",children:[r.jsx("h1",{className:"text-3xl font-normal text-white tracking-tight",children:"Tools"}),r.jsx("p",{className:"text-gray-300 mt-2 uppercase font-mono font-light text-xs",children:"Utility tools for managing and testing your Better Auth setup"})]})}),r.jsxs("div",{className:"flex flex-col items-center space-y-8",children:[r.jsx("hr",{className:"w-full border-white/15 h-px"}),r.jsx("hr",{className:"w-full border-white/15 h-px"})]}),o&&s.length>0&&r.jsxs("div",{className:"mb-6 p-6 gap-8",children:[r.jsxs("div",{className:"flex items-center justify-between mb-2",children:[r.jsx("h3",{className:"text-sm uppercase font-mono text-gray-400 tracking-wider",children:"Tool Output"}),r.jsx($,{variant:"ghost",size:"sm",onClick:()=>l(!1),className:"text-gray-400 hover:text-white rounded-none",children:r.jsx(xt,{className:"w-4 h-4"})})]}),r.jsx(ji,{title:"Tool Execution Logs",lines:s,isRunning:n!==null,className:"w-full",defaultCollapsed:!1})]}),r.jsx("div",{className:"space-y-8 p-6 gap-8",children:LU.map(z=>r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{className:"flex items-center space-x-2",children:[r.jsx(z.icon,{className:"w-5 h-5 text-white"}),r.jsx("h2",{className:"text-lg font-light text-white uppercase tracking-wider",children:z.name})]}),r.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:z.tools.map(Z=>{const oe=Z.icon,Se=n===Z.id,ze=IU.has(Z.id),ct=!ze||n!==null&&n!==Z.id||Se;return r.jsxs("button",{onClick:()=>Z.action(),disabled:ct,className:`relative flex items-center space-x-4 p-4 bg-black/30 border border-dashed border-white/20 rounded-none transition-colors text-left group ${ze?"hover:bg-black/50 disabled:opacity-50 disabled:cursor-not-allowed":"opacity-60 cursor-not-allowed"}`,children:[r.jsx("div",{className:"p-2 bg-white/10 rounded-none group-hover:bg-white/20 transition-colors",children:Se?r.jsx(gn,{className:"w-6 h-6 text-white animate-spin"}):r.jsx(oe,{className:"w-6 h-6 text-white"})}),r.jsxs("div",{className:"flex-1",children:[r.jsx("h4",{className:"text-white font-light mb-1",children:Z.name}),r.jsxs("p",{className:"text-xs uppercase font-mono flex items-center text-gray-400",children:[r.jsx(uC,{className:"w-4 h-4 mr-2"}),Z.description]})]}),!ze&&r.jsx("span",{className:"absolute top-2 right-3 text-[10px] font-mono uppercase tracking-[0.2em] text-white/60",children:"Coming Soon"}),r.jsx(Xs,{className:"w-4 h-4 text-gray-400 group-hover:text-white transition-colors"})]},Z.id)})})]},z.id))})]}),w&&r.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:r.jsxs("div",{className:"bg-black/90 border border-dashed border-white/20 p-6 w-full max-w-2xl rounded-none",children:[r.jsxs("div",{className:"flex items-center justify-between mb-6",children:[r.jsxs("div",{className:"flex items-center space-x-2",children:[r.jsx(Zi,{className:"w-5 h-5 text-white"}),r.jsx("h3",{className:"text-xl text-white font-light uppercase tracking-wider",children:"Password Hasher"})]}),r.jsx($,{variant:"ghost",size:"sm",onClick:()=>S(!1),className:"text-gray-400 hover:text-white rounded-none",children:r.jsx(xt,{className:"w-5 h-5"})})]}),r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[r.jsxs("div",{children:[r.jsx(pe,{className:"text-xs uppercase font-mono text-gray-400",children:"Algorithm"}),r.jsxs("select",{value:O,onChange:z=>R(z.target.value),className:"mt-2 w-full bg-black border border-dashed border-white/20 text-white px-3 py-2 text-sm focus:outline-none",children:[r.jsx("option",{value:"SHA-256",children:"SHA-256"}),r.jsx("option",{value:"SHA-384",children:"SHA-384"}),r.jsx("option",{value:"SHA-512",children:"SHA-512"})]})]}),r.jsxs("div",{children:[r.jsx(pe,{className:"text-xs uppercase font-mono text-gray-400",children:"Encoding"}),r.jsxs("select",{value:I,onChange:z=>F(z.target.value),className:"mt-2 w-full bg-black border border-dashed border-white/20 text-white px-3 py-2 text-sm focus:outline-none",children:[r.jsx("option",{value:"hex",children:"Hex"}),r.jsx("option",{value:"base64",children:"Base64"}),r.jsx("option",{value:"base64url",children:"Base64 URL"})]})]})]}),r.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[r.jsxs("div",{children:[r.jsx(pe,{className:"text-xs uppercase font-mono text-gray-400",children:"Salt (optional)"}),r.jsx(Te,{value:E,onChange:z=>k(z.target.value),placeholder:"e.g. project-specific-salt",className:"mt-2 bg-black border border-dashed border-white/20 text-white rounded-none"}),r.jsxs("p",{className:"text-[11px] text-gray-500 mt-1 font-mono",children:["Salt is prepended (",r.jsx("span",{className:"text-white/80",children:"salt:password"}),")"]})]}),r.jsxs("div",{children:[r.jsx(pe,{className:"text-xs uppercase font-mono text-gray-400",children:"Password"}),r.jsxs("div",{className:"relative mt-2",children:[r.jsx(Te,{type:A?"text":"password",value:C,onChange:z=>T(z.target.value),placeholder:"Enter password",className:"bg-black border border-dashed border-white/20 text-white rounded-none pr-10"}),r.jsx("button",{type:"button",onClick:()=>D(z=>!z),className:"absolute inset-y-0 right-0 px-3 flex items-center text-gray-400 hover:text-white","aria-label":A?"Hide password":"Show password",children:A?r.jsx(Dh,{className:"w-4 h-4"}):r.jsx(gi,{className:"w-4 h-4"})})]})]})]}),j&&r.jsxs("div",{children:[r.jsx(pe,{className:"text-xs uppercase font-mono text-gray-400",children:"Hash Result"}),r.jsxs("div",{className:"mt-2 flex items-center space-x-2",children:[r.jsx(Te,{value:j,readOnly:!0,className:"flex-1 bg-black border border-dashed border-white/20 text-white rounded-none"}),r.jsx($,{variant:"outline",size:"icon",onClick:()=>j&&Aa(j),className:"border border-dashed border-white/20 text-white hover:bg-white/10 rounded-none",children:r.jsx(aa,{className:"w-4 h-4"})})]})]})]}),r.jsxs("div",{className:"flex justify-end space-x-3 mt-8 border-t border-dashed border-white/10 pt-6",children:[r.jsx($,{variant:"outline",onClick:()=>S(!1),className:"border border-dashed border-white/20 text-white hover:bg-white/10 rounded-none",children:"Close"}),r.jsx($,{onClick:iU,disabled:_,className:"rounded-none",children:_?r.jsxs(r.Fragment,{children:[r.jsx(gn,{className:"w-4 h-4 mr-2 animate-spin"}),"Hashing..."]}):"Hash Password"})]})]})}),c&&r.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:r.jsxs("div",{className:"bg-black/90 border border-dashed border-white/20 p-8 w-full max-w-2xl rounded-none",children:[r.jsxs("div",{className:"flex items-center justify-between mb-6",children:[r.jsxs("div",{className:"flex items-center space-x-2",children:[r.jsx(Yn,{className:"w-6 h-6 text-white"}),r.jsx("h3",{className:"text-xl text-white font-light",children:"Select OAuth Provider"})]}),r.jsx($,{variant:"ghost",size:"sm",onClick:()=>{u(!1),p("")},className:"text-gray-400 hover:text-white rounded-none",children:r.jsx(xt,{className:"w-5 h-5"})})]}),r.jsx("div",{className:"space-y-4",children:h.length===0?r.jsxs("div",{className:"text-center py-12",children:[r.jsx(Yn,{className:"w-16 h-16 text-gray-400 mx-auto mb-4"}),r.jsx("p",{className:"text-gray-400 mb-2 text-lg",children:"No OAuth providers configured"}),r.jsx("p",{className:"text-sm text-gray-500",children:"Please configure OAuth providers in your Better Auth configuration"})]}):r.jsxs("div",{children:[r.jsxs("label",{className:"block text-sm font-medium text-gray-400 mb-4 uppercase font-mono",children:["Available Providers (",h.length,")"]}),r.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3 max-h-96 overflow-y-auto",children:h.map(z=>r.jsxs("button",{onClick:()=>{p(z.id),setTimeout(()=>{lU(z.id)},100)},className:`w-full flex items-center space-x-4 p-4 border rounded-none transition-all text-left group ${f===z.id?"border-white/50 bg-white/10":"border-dashed border-white/20 hover:bg-white/5 hover:border-white/30"}`,children:[r.jsx("div",{className:"flex-shrink-0",children:aU(z.id)}),r.jsx("div",{className:"flex-1 min-w-0",children:r.jsx("p",{className:"text-white uppercase font-mono font-light text-base",children:z.name||z.id})}),r.jsx(Xs,{className:`w-5 h-5 transition-colors flex-shrink-0 ${f===z.id?"text-white":"text-gray-400 group-hover:text-white"}`})]},z.id))}),r.jsx("p",{className:"text-xs text-gray-500 mt-4 font-mono uppercase",children:"Click on a provider to start the OAuth test"})]})}),r.jsx("div",{className:"flex justify-end space-x-3 mt-8 pt-6 border-t border-dashed border-white/10",children:r.jsx($,{variant:"outline",onClick:()=>{u(!1),p("")},className:"border border-dashed border-white/20 text-white hover:bg-white/10 rounded-none",children:"Cancel"})})]})}),v&&r.jsx("div",{className:"fixed inset-0 bg-black/60 flex items-center justify-center z-50",children:r.jsxs("div",{className:"bg-black/95 border border-dashed border-white/20 p-8 w-full max-w-5xl rounded-none",children:[r.jsxs("div",{className:"flex items-center justify-between mb-6",children:[r.jsxs("div",{className:"flex items-center space-x-2",children:[r.jsx(ps,{className:"w-6 h-6 text-white"}),r.jsx("h3",{className:"text-xl text-white font-light uppercase tracking-wider",children:"Select Migration"})]}),r.jsx($,{variant:"ghost",size:"sm",onClick:()=>x(!1),className:"text-gray-400 hover:text-white rounded-none",children:r.jsx(xt,{className:"w-5 h-5"})})]}),r.jsxs("div",{className:"grid md:grid-cols-3 gap-4",children:[r.jsx("div",{className:"space-y-3",children:Pc.map(z=>{const Z=(mn==null?void 0:mn.id)===z.id;return r.jsxs("button",{onClick:()=>rU(z.id),disabled:z.disabled,className:`w-full flex items-center space-x-3 p-4 border transition-colors rounded-none text-left ${z.disabled?"border-dashed border-white/10 bg-black/30 cursor-not-allowed opacity-60":Z?"border-white/60 bg-white/10":"border-dashed border-white/20 hover:bg-white/5 hover:border-white/40"}`,children:[r.jsx("div",{className:"flex-shrink-0 w-10 h-10 bg-white/10 flex items-center justify-center",children:z.logo?z.logo:r.jsx(Mw,{className:"w-6 h-6 text-white"})}),r.jsxs("div",{className:"flex-1 min-w-0",children:[r.jsx("p",{className:"text-white uppercase font-mono text-sm",children:z.name}),r.jsx("p",{className:"text-xs uppercase text-gray-400 font-mono mt-1 truncate",children:z.description})]}),z.disabled&&r.jsx("span",{className:"text-[10px] font-mono text-gray-400 uppercase",children:"Coming Soon"})]},z.id)})}),r.jsxs("div",{className:"md:col-span-2 space-y-4",children:[r.jsxs("div",{className:"flex items-start space-x-3",children:[r.jsx("div",{className:"w-12 h-12 bg-white/10 flex items-center justify-center",children:mn.logo?mn.logo:r.jsx(Mw,{className:"w-8 h-8 text-white"})}),r.jsxs("div",{className:"space-y-2",children:[r.jsx("h4",{className:"text-white -mb-2 text-lg font-light uppercase tracking-wider",children:mn.name}),r.jsx("p",{className:"text-sm mt-0 text-gray-400 uppercase font-mono leading-relaxed",children:mn.description}),r.jsx("div",{className:"flex items-center space-x-2",children:mn.docs&&r.jsx($,{variant:"ghost",size:"sm",asChild:!0,className:"rounded-none border border-dashed",children:r.jsx("a",{href:mn.docs,target:"_blank",rel:"noreferrer",children:"View Docs"})})})]})]}),mn.highlights&&r.jsx("ul",{className:"space-y-2 text-xs text-gray-300 font-mono bg-black/40 border border-white/10 p-4",children:mn.highlights.map(z=>r.jsxs("li",{className:"flex items-start space-x-2",children:[r.jsx("span",{className:"text-white/60 mt-0.5",children:"•"}),r.jsx("span",{children:z})]},z))}),mn.disabled?r.jsxs("div",{className:"space-y-4 text-gray-400 font-mono text-xs",children:[r.jsx("p",{children:"This migration provider is coming soon."}),r.jsxs("p",{children:["Subscribe to updates at"," ",r.jsx("a",{href:"https://better-auth.com",target:"_blank",rel:"noreferrer",className:"text-white underline",children:"better-auth.com"}),"."]})]}):mn.custom?r.jsxs("div",{className:"space-y-3",children:[r.jsx("label",{className:"text-xs uppercase font-mono text-gray-400",children:"Custom Migration Script"}),r.jsx("textarea",{value:y,onChange:z=>g(z.target.value),className:"w-full h-64 bg-black/70 border border-white/10 text-xs text-gray-200 font-mono p-3 rounded-none focus:outline-none focus:ring-0"}),r.jsxs("div",{className:"flex items-center justify-end space-x-2",children:[r.jsx($,{variant:"outline",size:"sm",className:"rounded-none",onClick:()=>g(y0),children:"Reset"}),r.jsxs($,{variant:"ghost",size:"sm",className:"rounded-none text-gray-400 hover:text-white",onClick:()=>Aa(y),children:[r.jsx(aa,{className:"w-4 h-4"}),"Copy Script"]}),r.jsx($,{className:"rounded-none",onClick:()=>ES("custom",y),children:"Run Custom Script"})]})]}):r.jsxs("div",{className:"space-y-3",children:[mn.script&&r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"flex items-center justify-between text-xs uppercase font-mono text-gray-400",children:[r.jsx("span",{children:"Migration Script Preview"}),r.jsxs($,{variant:"ghost",size:"sm",className:"rounded-none text-gray-400 hover:text-white",onClick:()=>Aa(mn.script),children:[r.jsx(aa,{className:"w-4 h-4"}),"Copy Script"]})]}),r.jsx("pre",{className:"bg-black/70 border border-white/10 text-[11px] text-green-200 font-mono p-4 overflow-auto leading-relaxed h-64",children:r.jsx("code",{children:mn.script})})]}),r.jsx("div",{className:"flex items-center justify-end space-x-2",children:r.jsxs($,{className:"rounded-none",onClick:()=>ES(mn.id),children:["Run ",mn.name," Migration"]})})]})]})]})]})}),ne&&r.jsx("div",{className:"fixed inset-0 bg-black/80 flex items-center justify-center z-50",children:r.jsxs("div",{className:"bg-black border border-dashed border-white/20 rounded-none p-6 w-full max-w-3xl max-h-[85vh] overflow-y-auto",children:[r.jsxs("div",{className:"flex items-center justify-between mb-6",children:[r.jsxs("div",{className:"flex items-center space-x-2",children:[r.jsx(ud,{className:"w-5 h-5 text-white"}),r.jsx("h3",{className:"text-xl text-white font-light uppercase tracking-wider",children:"Export Data"})]}),r.jsx($,{variant:"ghost",size:"sm",onClick:()=>te(!1),className:"text-gray-400 hover:text-white rounded-none",children:r.jsx(xt,{className:"w-4 h-4"})})]}),r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{children:[r.jsx(pe,{className:"text-xs uppercase font-mono text-gray-400 mb-3 block",children:"Export Format"}),r.jsxs("div",{className:"flex space-x-4",children:[r.jsx("button",{onClick:()=>me("json"),className:`px-4 py-2 border rounded-none transition-colors ${fe==="json"?"border-white/50 bg-white/10 text-white":"border-dashed border-white/20 text-gray-400 hover:border-white/30"}`,children:"JSON"}),r.jsx("button",{onClick:()=>me("csv"),className:`px-4 py-2 border rounded-none transition-colors ${fe==="csv"?"border-white/50 bg-white/10 text-white":"border-dashed border-white/20 text-gray-400 hover:border-white/30"}`,children:"CSV"})]})]}),r.jsxs("div",{children:[r.jsx(pe,{htmlFor:"export-limit",className:"text-xs uppercase font-mono text-gray-400 mb-2 block",children:"Row Limit Per Table"}),r.jsx(Te,{id:"export-limit",type:"number",value:Re,onChange:z=>Me(z.target.value),min:"1",max:"10000",placeholder:"1000",className:"bg-black border border-dashed border-white/20 text-white rounded-none"}),r.jsx("p",{className:"text-[11px] text-gray-500 mt-1 font-mono",children:"Maximum 10,000 rows per table (default: 1000)"})]}),r.jsxs("div",{children:[r.jsxs("div",{className:"flex items-center justify-between mb-3",children:[r.jsxs(pe,{className:"text-xs uppercase font-mono text-gray-400",children:["Select Tables (",ge.size," selected)"]}),r.jsxs("div",{className:"flex space-x-2",children:[r.jsx($,{variant:"ghost",size:"sm",onClick:jU,className:"text-xs text-gray-400 hover:text-white rounded-none",children:"Select All"}),r.jsx($,{variant:"ghost",size:"sm",onClick:kU,className:"text-xs text-gray-400 hover:text-white rounded-none",children:"Deselect All"})]})]}),r.jsx("div",{className:"border border-dashed border-white/20 rounded-none max-h-64 overflow-y-auto",children:ee.length===0?r.jsx("div",{className:"p-4 text-center text-gray-400 text-sm",children:"Loading tables..."}):r.jsx("div",{className:"space-y-0",children:ee.map(z=>{const Z=ge.has(z.name);return r.jsx("button",{onClick:()=>AU(z.name),className:`w-full text-left p-3 border-b border-dashed border-white/10 last:border-b-0 transition-colors ${Z?"bg-white/10 border-white/30":"hover:bg-white/5"}`,children:r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsxs("div",{children:[r.jsx("span",{className:"text-white text-sm font-mono",children:z.displayName}),r.jsxs("span",{className:"text-xs text-gray-400 ml-2 font-mono",children:["(",z.name,")"]})]}),Z&&r.jsx(dh,{className:"w-4 h-4 text-white"})]})},z.name)})})})]})]}),r.jsxs("div",{className:"flex justify-end space-x-3 mt-8 border-t border-dashed border-white/10 pt-6",children:[r.jsx($,{variant:"outline",onClick:()=>te(!1),className:"border border-dashed border-white/20 text-white hover:bg-white/10 rounded-none",children:"Cancel"}),r.jsx($,{onClick:OU,disabled:Ue||ge.size===0,className:"rounded-none",children:Ue?r.jsxs(r.Fragment,{children:[r.jsx(gn,{className:"w-4 h-4 mr-2 animate-spin"}),"Exporting..."]}):r.jsxs(r.Fragment,{children:[r.jsx(ud,{className:"w-4 h-4 mr-2"}),"Export"]})})]})]})}),pt&&r.jsx("div",{className:"fixed inset-0 bg-black/80 flex items-center justify-center z-[60]",children:r.jsxs("div",{className:"bg-black border border-dashed border-white/20 rounded-none p-6 w-full max-w-4xl max-h-[90vh] overflow-y-auto",children:[r.jsxs("div",{className:"flex items-center justify-between mb-6",children:[r.jsxs("div",{className:"flex items-center space-x-2",children:[r.jsx(Cn,{className:"w-5 h-5 text-white"}),r.jsx("h3",{className:"text-xl text-white font-light uppercase tracking-wider",children:"JWT Decoder"})]}),r.jsx($,{variant:"ghost",size:"sm",onClick:()=>Ge(!1),className:"text-gray-400 hover:text-white rounded-none",children:r.jsx(xt,{className:"w-4 h-4"})})]}),r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{children:[r.jsx(pe,{className:"text-xs uppercase font-mono text-gray-400 mb-2 block",children:"JWT Token"}),r.jsx("textarea",{value:jt,onChange:z=>vt(z.target.value),placeholder:"Paste JWT here",className:"w-full min-h-[120px] bg-black border border-dashed border-white/20 text-white font-mono text-xs p-3 rounded-none focus:outline-none"})]}),r.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[r.jsxs("div",{children:[r.jsx(pe,{className:"text-xs uppercase font-mono text-gray-400 mb-2 block",children:"HMAC Secret (optional)"}),r.jsx(Te,{value:We,onChange:z=>et(z.target.value),placeholder:"Defaults to Better Auth secret if omitted",className:"bg-black border border-dashed border-white/20 text-white rounded-none"})]}),r.jsxs("div",{className:"flex items-end justify-end space-x-2",children:[r.jsx($,{variant:"outline",onClick:()=>{vt(""),et(""),Et(null),re(null)},className:"border border-dashed border-white/20 text-white hover:bg-white/10 rounded-none",children:"Clear"}),r.jsx($,{onClick:_U,disabled:Tt,className:"rounded-none",children:Tt?r.jsxs(r.Fragment,{children:[r.jsx(gn,{className:"w-4 h-4 mr-2 animate-spin"}),"Decoding..."]}):"Decode JWT"})]})]}),Wt&&r.jsx("div",{className:"border border-dashed border-red-500/30 bg-red-500/10 text-red-300 text-xs font-mono p-3 rounded-none",children:Wt}),Ze&&r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4 text-xs font-mono",children:[r.jsxs("div",{className:"border border-dashed border-white/10 p-3 space-y-2",children:[r.jsx("div",{className:"text-gray-400 uppercase tracking-wider",children:"Signature"}),r.jsx("p",{className:`text-sm ${Ze.verified?"text-green-400":"text-yellow-300"}`,children:Ze.verified?"Verified (HS256)":"Not verified"}),r.jsx("p",{className:"text-gray-400 break-all",children:Ze.signature||"None"})]}),r.jsxs("div",{className:"border border-dashed border-white/10 p-3 space-y-2",children:[r.jsx("div",{className:"text-gray-400 uppercase tracking-wider",children:"Issued"}),r.jsx("p",{className:"text-white",children:Ze.issuedAtFormatted||"Unknown"}),r.jsx("p",{className:"text-gray-500",children:Ze.issuedAgo||""})]}),r.jsxs("div",{className:"border border-dashed border-white/10 p-3 space-y-2",children:[r.jsx("div",{className:"text-gray-400 uppercase tracking-wider",children:"Expires"}),r.jsx("p",{className:`text-white ${Ze.expired?"text-red-300":""}`,children:Ze.expiresAtFormatted||"No expiry"}),r.jsx("p",{className:"text-gray-500",children:Ze.expiresIn||""})]})]}),r.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[r.jsxs("div",{className:"border border-dashed border-white/10 p-3",children:[r.jsxs("div",{className:"flex items-center justify-between mb-2",children:[r.jsx("span",{className:"text-xs uppercase font-mono text-gray-400",children:"Header"}),r.jsx($,{variant:"ghost",size:"sm",onClick:()=>Aa(JSON.stringify(Ze.header,null,2)),className:"text-gray-400 hover:text-white rounded-none",children:r.jsx(aa,{className:"w-4 h-4"})})]}),r.jsx("pre",{className:"text-[11px] text-gray-100 font-mono bg-black/40 p-3 overflow-x-auto max-h-64",children:JSON.stringify(Ze.header,null,2)})]}),r.jsxs("div",{className:"border border-dashed border-white/10 p-3",children:[r.jsxs("div",{className:"flex items-center justify-between mb-2",children:[r.jsx("span",{className:"text-xs uppercase font-mono text-gray-400",children:"Payload"}),r.jsx($,{variant:"ghost",size:"sm",onClick:()=>Aa(JSON.stringify(Ze.payload,null,2)),className:"text-gray-400 hover:text-white rounded-none",children:r.jsx(aa,{className:"w-4 h-4"})})]}),r.jsx("pre",{className:"text-[11px] text-gray-100 font-mono bg-black/40 p-3 overflow-x-auto max-h-64",children:JSON.stringify(Ze.payload,null,2)})]})]}),Ze.customClaims&&Object.keys(Ze.customClaims).length>0&&r.jsxs("div",{className:"border border-dashed border-white/10 p-3",children:[r.jsx("div",{className:"text-xs uppercase font-mono text-gray-400 mb-2",children:"Custom Claims"}),r.jsx("pre",{className:"text-[11px] text-gray-100 font-mono bg-black/40 p-3 overflow-x-auto max-h-64",children:JSON.stringify(Ze.customClaims,null,2)})]})]})]})]})}),we&&r.jsx("div",{className:"fixed inset-0 bg-black/70 flex items-center justify-center z-[60]",children:r.jsxs("div",{className:"bg-black border border-dashed border-white/20 rounded-none p-6 w-full max-w-4xl max-h-[90vh] overflow-y-auto",children:[r.jsxs("div",{className:"flex items-center justify-between mb-6",children:[r.jsxs("div",{className:"flex items-center space-x-2",children:[r.jsx(hd,{className:"w-5 h-5 text-white"}),r.jsx("h3",{className:"text-xl text-white font-light uppercase tracking-wider",children:"Token Generator"})]}),r.jsx($,{variant:"ghost",size:"sm",onClick:()=>Be(!1),className:"text-gray-400 hover:text-white rounded-none",children:r.jsx(xt,{className:"w-4 h-4"})})]}),r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{children:[r.jsx(pe,{className:"text-xs uppercase font-mono text-gray-400 mb-3 block",children:"Token Type"}),r.jsx("div",{className:"flex flex-wrap gap-3",children:[{id:"api_key",label:"API Key"},{id:"jwt",label:"JWT"}].map(z=>r.jsx("button",{onClick:()=>le(z.id),className:`px-4 py-2 border rounded-none text-sm uppercase font-mono transition-colors ${V===z.id?"border-white/60 bg-white/10 text-white":"border-dashed border-white/20 text-gray-400 hover:border-white/40"}`,children:z.label},z.id))})]}),r.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[r.jsxs("div",{children:[r.jsx(pe,{className:"text-xs uppercase font-mono text-gray-400 mb-2 block",children:"Subject / User ID (optional)"}),r.jsx(Te,{value:he,onChange:z=>xe(z.target.value),placeholder:"User identifier or email",className:"bg-black border border-dashed border-white/20 text-white rounded-none"})]}),r.jsxs("div",{children:[r.jsx(pe,{className:"text-xs uppercase font-mono text-gray-400 mb-2 block",children:"Audience (optional)"}),r.jsx(Te,{value:De,onChange:z=>Ye(z.target.value),placeholder:"Audience / app id",className:"bg-black border border-dashed border-white/20 text-white rounded-none"})]}),r.jsxs("div",{children:[r.jsx(pe,{className:"text-xs uppercase font-mono text-gray-400 mb-2 block",children:"Expires In (minutes)"}),r.jsx(Te,{type:"number",value:Q,onChange:z=>ie(z.target.value),min:"1",max:"1440",className:"bg-black border border-dashed border-white/20 text-white rounded-none"})]}),V==="jwt"&&r.jsxs("div",{children:[r.jsx(pe,{className:"text-xs uppercase font-mono text-gray-400 mb-2 block",children:"Override Secret (optional)"}),r.jsx(Te,{value:Ne,onChange:z=>ue(z.target.value),placeholder:"Defaults to Better Auth secret",className:"bg-black border border-dashed border-white/20 text-white rounded-none"})]})]}),V==="jwt"&&r.jsxs("div",{children:[r.jsx(pe,{className:"text-xs uppercase font-mono text-gray-400 mb-2 block",children:"Custom Claims (JSON)"}),r.jsx("textarea",{value:ke,onChange:z=>W(z.target.value),placeholder:'{"role":"admin"}',className:"w-full min-h-[120px] bg-black border border-dashed border-white/20 text-white font-mono text-xs p-3 rounded-none focus:outline-none"}),r.jsx("p",{className:"text-[11px] text-gray-500 mt-1 font-mono",children:"Leave empty to include only default claims (iss, sub, aud, exp, iat, jti)."})]}),r.jsxs("div",{className:"flex items-center justify-end space-x-2",children:[r.jsx($,{variant:"outline",onClick:()=>{be(null),xe(""),Ye(""),W(`{
|
|
1088
1088
|
|
|
1089
1089
|
}`)},className:"border border-dashed border-white/20 text-white hover:bg-white/10 rounded-none",children:"Reset"}),r.jsx($,{onClick:RU,disabled:He,className:"rounded-none",children:He?r.jsxs(r.Fragment,{children:[r.jsx(gn,{className:"w-4 h-4 mr-2 animate-spin"}),"Generating..."]}):"Generate Token"})]}),Y&&r.jsxs("div",{className:"space-y-4 border border-dashed border-white/15 p-4",children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsxs("div",{children:[r.jsx("p",{className:"text-xs uppercase font-mono text-gray-400",children:"Generated Token"}),r.jsx("p",{className:"text-white font-mono text-sm break-all mt-1",children:Y.token})]}),r.jsx($,{variant:"ghost",size:"sm",onClick:()=>Aa(Y.token),className:"text-gray-400 hover:text-white rounded-none",children:r.jsx(aa,{className:"w-4 h-4"})})]}),r.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4 text-xs font-mono",children:[r.jsxs("div",{children:[r.jsx("p",{className:"text-gray-400 uppercase tracking-wider",children:"Type"}),r.jsx("p",{className:"text-white mt-1 capitalize",children:Y.type.replace("_"," ")})]}),r.jsxs("div",{children:[r.jsx("p",{className:"text-gray-400 uppercase tracking-wider",children:"Expires"}),r.jsx("p",{className:"text-white mt-1",children:hU(Y.expiresAt)})]}),Y.url&&r.jsxs("div",{className:"col-span-1",children:[r.jsx("p",{className:"text-gray-400 uppercase tracking-wider",children:"URL"}),r.jsx("p",{className:"text-white mt-1 break-all",children:Y.url})]})]}),Y.metadata&&r.jsxs("div",{className:"border border-dashed border-white/10 p-3",children:[r.jsx("p",{className:"text-xs uppercase font-mono text-gray-400 mb-2",children:"Metadata"}),r.jsx("pre",{className:"text-[11px] text-gray-100 font-mono bg-black/40 p-3 overflow-x-auto",children:JSON.stringify(Y.metadata,null,2)})]})]})]})]})}),B&&L&&r.jsx("div",{className:"fixed inset-0 bg-black/80 flex items-center justify-center z-50 overflow-hidden",onClick:z=>{z.target===z.currentTarget&&(G(!1),q(null))},children:r.jsxs("div",{className:"bg-black border border-dashed border-white/20 rounded-none p-6 w-full max-w-4xl max-h-[90vh] overflow-y-auto",onClick:z=>z.stopPropagation(),children:[r.jsxs("div",{className:"flex items-center justify-between mb-6",children:[r.jsxs("div",{className:"flex items-center space-x-2",children:[r.jsx(zf,{className:"w-5 h-5 text-white"}),r.jsx("h3",{className:"text-xl text-white font-light uppercase tracking-wider",children:"Configuration Validator"})]}),r.jsx($,{variant:"ghost",size:"sm",onClick:()=>{G(!1),q(null)},className:"text-gray-400 hover:text-white rounded-none",children:r.jsx(xt,{className:"w-4 h-4"})})]}),r.jsxs("div",{className:"mb-6 p-4 border border-dashed border-white/10",children:[r.jsx("div",{className:"text-xs uppercase font-mono text-gray-400 mb-3",children:"Summary"}),r.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:[r.jsxs("div",{className:"text-left border-r border-dashed border-white/10 pr-4 last:border-r-0",children:[r.jsx("div",{className:"text-2xl font-mono text-white",children:L.summary.total}),r.jsx("div",{className:"text-xs text-gray-400 uppercase mt-1 font-mono",children:"Total Checks"})]}),r.jsxs("div",{className:"text-left border-r border-dashed border-white/10 pr-4 last:border-r-0",children:[r.jsx("div",{className:"text-2xl font-mono text-white",children:L.summary.passes}),r.jsx("div",{className:"text-xs text-gray-400 uppercase mt-1 font-mono",children:"Passed"})]}),r.jsxs("div",{className:"text-left border-r border-dashed border-white/10 pr-4 last:border-r-0",children:[r.jsx("div",{className:"text-2xl font-mono text-white",children:L.summary.errors}),r.jsx("div",{className:"text-xs text-gray-400 uppercase mt-1 font-mono",children:"Errors"})]}),r.jsxs("div",{className:"text-left",children:[r.jsx("div",{className:"text-2xl font-mono text-white",children:L.summary.warnings}),r.jsx("div",{className:"text-xs text-gray-400 uppercase mt-1 font-mono",children:"Warnings"})]})]})]}),r.jsx("div",{className:"space-y-4",children:Object.entries(L.results.reduce((z,Z)=>(z[Z.category]||(z[Z.category]=[]),z[Z.category].push(Z),z),{})).map(([z,Z])=>{if(z==="OAuth Providers"){const oe=Z.reduce((Se,ze)=>{const ct=ze.check.match(/^(.+?)\s*-\s*(.+)$/);if(ct){const Kt=ct[1],Tn=ct[2];Se[Kt]||(Se[Kt]=[]),Se[Kt].push({...ze,check:Tn})}else Se.General||(Se.General=[]),Se.General.push(ze);return Se},{});return r.jsxs("div",{className:"border border-dashed border-white/10 p-4",children:[r.jsxs("h4",{className:"text-white font-mono uppercase text-xs mb-4 text-left",children:[z,r.jsxs("span",{className:"text-gray-500 font-normal ml-2",children:["(",Z.length," check",Z.length!==1?"s":"",")"]})]}),r.jsx("div",{className:"space-y-2",children:Object.entries(oe).map(([Se,ze])=>{const ct=X.has(Se),Kt=ze.some(ft=>ft.severity==="error"),Tn=ze.some(ft=>ft.severity==="warning"),Ms=ze.every(ft=>ft.status==="pass");return r.jsxs("div",{className:"border border-dashed border-white/10",children:[r.jsxs("button",{onClick:()=>{K(ft=>{const Ot=new Set(ft);return Ot.has(Se)?Ot.delete(Se):Ot.add(Se),Ot})},className:"w-full flex items-center justify-between p-3 hover:bg-white/5 transition-colors text-left",children:[r.jsxs("div",{className:"flex items-center space-x-2",children:[r.jsx(uC,{className:`w-4 h-4 text-white/60 transition-transform ${ct?"rotate-90":""}`}),r.jsx("span",{className:"text-white font-mono text-sm",children:Se}),r.jsxs("span",{className:"text-xs text-gray-500 font-mono",children:["(",ze.length," check",ze.length!==1?"s":"",")"]})]}),r.jsxs("div",{className:"flex items-center space-x-2",children:[Kt&&r.jsx("span",{className:"text-xs text-white/60 font-mono",children:"Error"}),Tn&&!Kt&&r.jsx("span",{className:"text-xs text-white/60 font-mono",children:"Warning"}),Ms&&!Kt&&!Tn&&r.jsx(dh,{className:"w-4 h-4 text-white/60"})]})]}),ct&&r.jsx("div",{className:"border-t border-dashed border-white/10 space-y-2 p-2",children:ze.map((ft,Ot)=>r.jsx("div",{className:`p-3 border-l border-dashed border-white/15 ${ft.status==="pass"?"bg-green-600/[8%]":"bg-red-600/[8%]"}`,children:r.jsxs("div",{className:"flex items-start space-x-3",children:[r.jsx("div",{className:"mt-0.5",children:ft.severity==="error"?r.jsx(ss,{className:"w-4 h-4 text-white/60"}):ft.severity==="warning"?r.jsx(eh,{className:"w-4 h-4 text-white/60"}):ft.status==="pass"?r.jsx(dh,{className:"w-4 h-4 text-white/60"}):r.jsx(fl,{className:"w-4 h-4 text-white/40"})}),r.jsxs("div",{className:"flex-1 text-left",children:[r.jsxs("div",{className:"flex items-center space-x-2 mb-1",children:[r.jsx("span",{className:"text-white font-mono text-sm",children:ft.check}),r.jsx("span",{className:"text-xs px-2 py-0.5 border border-dashed border-white/20 text-white/60 font-mono",children:ft.status.toUpperCase()})]}),r.jsx("p",{className:"text-gray-300 text-sm",children:ft.message}),ft.suggestion&&r.jsxs("div",{className:"mt-2 p-2 bg-black/40 border border-dashed border-white/10",children:[r.jsx("p",{className:"text-xs text-gray-400 uppercase mb-1 font-mono",children:"Suggestion"}),r.jsx("p",{className:"text-xs text-gray-300",children:ft.suggestion})]})]})]})},`${Se}-${ft.check}-${Ot}`))})]},Se)})})]},z)}return r.jsxs("div",{className:"border border-dashed border-white/10 p-4",children:[r.jsxs("h4",{className:"text-white font-mono uppercase text-xs mb-4 text-left",children:[z,r.jsxs("span",{className:"text-gray-500 font-normal ml-2",children:["(",Z.length," check",Z.length!==1?"s":"",")"]})]}),r.jsx("div",{className:"space-y-3",children:Z.map((oe,Se)=>r.jsx("div",{className:`p-3 border-l border-dashed border-white/15 ${oe.status==="pass"?"bg-green-600/[8%]":"bg-red-600/[8%]"}`,children:r.jsxs("div",{className:"flex items-start space-x-3",children:[r.jsx("div",{className:"mt-0.5",children:oe.severity==="error"?r.jsx(ss,{className:"w-4 h-4 text-white/60"}):oe.severity==="warning"?r.jsx(eh,{className:"w-4 h-4 text-white/60"}):oe.status==="pass"?r.jsx(dh,{className:"w-4 h-4 text-white/60"}):r.jsx(fl,{className:"w-4 h-4 text-white/40"})}),r.jsxs("div",{className:"flex-1 text-left",children:[r.jsxs("div",{className:"flex items-center space-x-2 mb-1",children:[r.jsx("span",{className:"text-white font-mono text-sm",children:oe.check}),r.jsx("span",{className:"text-xs px-2 py-0.5 border border-dashed border-white/20 text-white/60 font-mono",children:oe.status.toUpperCase()})]}),r.jsx("p",{className:"text-gray-300 text-sm",children:oe.message}),oe.suggestion&&r.jsxs("div",{className:"mt-2 p-2 bg-black/40 border border-dashed border-white/10",children:[r.jsx("p",{className:"text-xs text-gray-400 uppercase mb-1 font-mono",children:"Suggestion"}),r.jsx("p",{className:"text-xs text-gray-300",children:oe.suggestion})]})]})]})},`${oe.category}-${oe.check}-${Se}`))})]},z)})}),r.jsx("div",{className:"mt-6 flex justify-end",children:r.jsx($,{variant:"outline",onClick:()=>{G(!1),q(null)},className:"border border-dashed border-white/20 text-white hover:bg-white/10 rounded-none",children:"Close"})})]})}),rt&&r.jsx("div",{className:"fixed inset-0 bg-black/80 flex items-center justify-center z-[60] overflow-hidden",onClick:z=>{z.target===z.currentTarget&&Qe(!1)},children:r.jsxs("div",{className:"bg-black border border-dashed border-white/20 rounded-none p-6 w-full max-w-4xl max-h-[90vh] overflow-y-auto",onClick:z=>z.stopPropagation(),children:[r.jsxs("div",{className:"flex items-center justify-between mb-6",children:[r.jsxs("div",{className:"flex items-center space-x-2",children:[r.jsx($m,{className:"w-5 h-5 text-white"}),r.jsx("h3",{className:"text-xl text-white font-light uppercase tracking-wider",children:"UUID Generator"})]}),r.jsx($,{variant:"ghost",size:"sm",onClick:()=>Qe(!1),className:"text-gray-400 hover:text-white rounded-none",children:r.jsx(xt,{className:"w-4 h-4"})})]}),r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{children:[r.jsx(pe,{className:"text-xs uppercase font-mono text-gray-400 mb-2 block",children:"Generate UUIDs"}),r.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[r.jsxs("div",{children:[r.jsx(pe,{className:"text-xs uppercase font-mono text-gray-400 mb-2 block",children:"Count (1-100)"}),r.jsx(Te,{type:"number",value:Jt,onChange:z=>{const Z=z.target.value;if(Z===""){pn("");return}const oe=parseInt(Z);isNaN(oe)||pn(Z)},onBlur:z=>{const Z=z.target.value,oe=parseInt(Z);isNaN(oe)||oe<1?pn("1"):oe>100?pn("100"):pn(String(oe))},min:"1",max:"100",className:"bg-black border border-dashed border-white/20 text-white rounded-none"})]}),r.jsxs("div",{className:"flex items-end justify-end space-x-2",children:[r.jsx($,{variant:"outline",onClick:()=>{pn("1"),Xt([])},className:"border border-dashed border-white/20 text-white hover:bg-white/10 rounded-none",children:"Clear"}),r.jsx($,{onClick:SU,className:"rounded-none",children:"Generate UUIDs"})]})]})]}),r.jsxs("div",{children:[r.jsx(pe,{className:"text-xs uppercase font-mono text-gray-400 mb-2 block",children:"Validate UUID"}),r.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[r.jsx("div",{children:r.jsx(Te,{value:Gr,onChange:z=>{wn(z.target.value)},onBlur:EU,placeholder:"Paste UUID to validate",className:"bg-black border border-dashed border-white/20 text-white font-mono text-xs rounded-none"})}),r.jsx("div",{className:"flex items-end justify-end space-x-2",children:r.jsx($,{variant:"outline",onClick:()=>{wn(""),Va(null)},className:"border border-dashed border-white/20 text-white hover:bg-white/10 rounded-none",children:"Clear"})})]}),Rn&&r.jsx("div",{className:`mt-2 border border-dashed p-3 rounded-none ${Rn.isValid?"border-white/10 bg-black/40":"border-red-500/30 bg-red-500/10"}`,children:r.jsxs("div",{className:"text-xs font-mono space-y-1",children:[r.jsx("div",{className:`${Rn.isValid?"text-green-400":"text-red-300"}`,children:Rn.isValid?"✓ Valid UUID":"✗ Invalid UUID"}),Rn.isValid&&Rn.version&&r.jsxs("div",{className:"text-gray-400",children:["Version: ",Rn.version]}),Rn.isValid&&Rn.variant&&r.jsxs("div",{className:"text-gray-400",children:["Variant: ",Rn.variant]})]})})]}),ln.length>0&&r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx(pe,{className:"text-xs uppercase font-mono text-gray-400",children:"Generated UUIDs"}),r.jsxs($,{variant:"ghost",size:"sm",onClick:()=>Aa(ln.join(`
|
|
1090
|
-
`)),className:"text-gray-400 hover:text-white rounded-none",children:[r.jsx(aa,{className:"w-4 h-4 mr-1"}),"Copy All"]})]}),r.jsx("div",{className:"border border-dashed border-white/10 p-3",children:r.jsx("div",{className:"space-y-2 max-h-64 overflow-y-auto",children:ln.map((z,Z)=>r.jsxs("div",{className:"flex items-center justify-between p-2 bg-black/40 border border-dashed border-white/10",children:[r.jsx("span",{className:"text-white font-mono text-xs break-all",children:z}),r.jsx($,{variant:"ghost",size:"sm",onClick:()=>Aa(z),className:"text-gray-400 hover:text-white rounded-none ml-2",children:r.jsx(aa,{className:"w-3 h-3"})})]},Z))})})]}),r.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4 text-xs font-mono",children:[r.jsxs("div",{className:"border border-dashed border-white/10 p-3 space-y-2",children:[r.jsx("div",{className:"text-gray-400 uppercase tracking-wider",children:"Version"}),r.jsx("p",{className:"text-white text-sm",children:"v4 (Random)"}),r.jsx("p",{className:"text-gray-500 text-xs",children:"Cryptographically random"})]}),r.jsxs("div",{className:"border border-dashed border-white/10 p-3 space-y-2",children:[r.jsx("div",{className:"text-gray-400 uppercase tracking-wider",children:"Format"}),r.jsx("p",{className:"text-white text-sm",children:"8-4-4-4-12"}),r.jsx("p",{className:"text-gray-500 text-xs",children:"36 characters"})]}),r.jsxs("div",{className:"border border-dashed border-white/10 p-3 space-y-2",children:[r.jsx("div",{className:"text-gray-400 uppercase tracking-wider",children:"Standard"}),r.jsx("p",{className:"text-white text-sm",children:"RFC 4122"}),r.jsx("p",{className:"text-gray-500 text-xs",children:"Universally unique"})]})]})]})]})}),Vr&&r.jsx("div",{className:"fixed inset-0 bg-black/80 flex items-center justify-center z-[60] overflow-hidden",children:r.jsxs("div",{className:"bg-black border border-dashed border-white/20 rounded-none p-6 w-full max-w-4xl max-h-[90vh] overflow-y-auto",children:[r.jsxs("div",{className:"flex items-center justify-between mb-6",children:[r.jsxs("div",{className:"flex items-center space-x-2",children:[r.jsx(Tl,{className:"w-5 h-5 text-white"}),r.jsx("h3",{className:"text-xl text-white font-light uppercase tracking-wider",children:"Password Strength Checker"})]}),r.jsx($,{variant:"ghost",size:"sm",onClick:()=>Do(!1),className:"text-gray-400 hover:text-white rounded-none",children:r.jsx(xt,{className:"w-4 h-4"})})]}),r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{children:[r.jsx(pe,{className:"text-xs uppercase font-mono text-gray-400 mb-2 block",children:"Password"}),r.jsxs("div",{className:"relative",children:[r.jsx(Te,{type:pr?"text":"password",value:As,onChange:z=>Ya(z.target.value),placeholder:"Enter password to check",className:"w-full bg-black border border-dashed border-white/20 text-white font-mono text-xs pr-10 rounded-none"}),r.jsx($,{variant:"ghost",size:"sm",onClick:()=>Kr(!pr),className:"absolute right-0 top-0 h-full px-3 text-gray-400 hover:text-white rounded-none",children:pr?r.jsx(Dh,{className:"w-4 h-4"}):r.jsx(gi,{className:"w-4 h-4"})})]})]}),r.jsxs("div",{className:"flex items-end justify-end space-x-2",children:[r.jsx($,{variant:"outline",onClick:()=>{Ya(""),Yr(null),Kr(!1)},className:"border border-dashed border-white/20 text-white hover:bg-white/10 rounded-none",children:"Clear"}),r.jsx($,{onClick:bU,disabled:Wr||!As.trim(),className:"rounded-none",children:Wr?r.jsxs(r.Fragment,{children:[r.jsx(gn,{className:"w-4 h-4 mr-2 animate-spin"}),"Checking..."]}):"Check Strength"})]}),kt&&r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4 text-xs font-mono",children:[r.jsxs("div",{className:"border border-dashed border-white/10 p-3 space-y-2",children:[r.jsx("div",{className:"text-gray-400 uppercase tracking-wider",children:"Strength"}),r.jsx("p",{className:`text-sm font-medium ${kt.strength==="very-strong"?"text-green-400":kt.strength==="strong"?"text-green-300":kt.strength==="good"?"text-yellow-300":kt.strength==="fair"?"text-orange-300":"text-red-300"}`,children:kt.strength.split("-").map(z=>z.charAt(0).toUpperCase()+z.slice(1)).join(" ")}),r.jsx("div",{className:"w-full bg-black/40 h-2 rounded-none",children:r.jsx("div",{className:`h-full transition-all ${kt.strength==="very-strong"?"bg-green-400 w-full":kt.strength==="strong"?"bg-green-300 w-4/5":kt.strength==="good"?"bg-yellow-300 w-3/5":kt.strength==="fair"?"bg-orange-300 w-2/5":"bg-red-300 w-1/5"}`})})]}),r.jsxs("div",{className:"border border-dashed border-white/10 p-3 space-y-2",children:[r.jsx("div",{className:"text-gray-400 uppercase tracking-wider",children:"Score"}),r.jsxs("p",{className:"text-white text-sm",children:[kt.score," / 5"]}),r.jsx("p",{className:"text-gray-500 text-xs",children:kt.score===5?"Excellent":kt.score===4?"Very Good":kt.score===3?"Good":kt.score===2?"Fair":"Weak"})]}),r.jsxs("div",{className:"border border-dashed border-white/10 p-3 space-y-2",children:[r.jsx("div",{className:"text-gray-400 uppercase tracking-wider",children:"Config Match"}),r.jsx("p",{className:`text-sm ${kt.meetsConfig?"text-green-400":"text-red-300"}`,children:kt.meetsConfig?"✓ Meets Requirements":"✗ Fails Requirements"}),r.jsxs("p",{className:"text-gray-500 text-xs",children:[kt.configRequirements.minLength," -"," ",kt.configRequirements.maxLength," chars"]})]})]}),r.jsxs("div",{className:"border border-dashed border-white/10 p-3",children:[r.jsx("div",{className:"text-xs uppercase font-mono text-gray-400 mb-3",children:"Checks"}),r.jsx("div",{className:"space-y-2",children:kt.checks.map((z,Z)=>r.jsxs("div",{className:"flex items-center justify-between p-2 bg-black/40 border border-dashed border-white/10",children:[r.jsx("span",{className:"text-white font-mono text-xs",children:z.name}),r.jsxs("div",{className:"flex items-center space-x-2",children:[r.jsx("span",{className:`text-xs font-mono ${z.passed?"text-green-400":"text-red-300"}`,children:z.passed?"✓":"✗"}),r.jsx("span",{className:"text-xs text-gray-400 font-mono",children:z.message})]})]},Z))})]})]})]})]})}),mr&&r.jsx("div",{className:"fixed inset-0 bg-black/80 flex items-center justify-center z-[60] overflow-hidden",children:r.jsxs("div",{className:"bg-black border border-dashed border-white/20 rounded-none p-6 w-full max-w-4xl max-h-[90vh] overflow-y-auto",children:[r.jsxs("div",{className:"flex items-center justify-between mb-6",children:[r.jsxs("div",{className:"flex items-center space-x-2",children:[r.jsx(Yn,{className:"w-5 h-5 text-white"}),r.jsx("h3",{className:"text-xl text-white font-light uppercase tracking-wider",children:"OAuth Credentials"})]}),r.jsx($,{variant:"ghost",size:"sm",onClick:()=>Wa(!1),className:"text-gray-400 hover:text-white rounded-none",children:r.jsx(xt,{className:"w-4 h-4"})})]}),r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{children:[r.jsx(pe,{className:"text-xs uppercase font-mono text-gray-400 mb-2 block",children:"Select Provider"}),r.jsx("div",{className:"flex flex-wrap gap-3",children:["google","github"].map(z=>{const Z=f===z;return r.jsx("button",{onClick:()=>p(z),className:`px-4 py-2 border rounded-none text-sm uppercase font-mono transition-colors ${Z?"border-white/60 bg-white/10 text-white":"border-dashed border-white/20 text-gray-400 hover:border-white/40"}`,children:z.charAt(0).toUpperCase()+z.slice(1)},z)})})]}),r.jsxs("div",{children:[r.jsx(pe,{className:"text-xs uppercase font-mono text-gray-400 mb-2 block",children:"Origin"}),r.jsx(Te,{value:Fn,onChange:z=>Bn(z.target.value),placeholder:`http://${Ea}`,className:"bg-black border border-dashed border-white/20 text-white font-mono text-xs rounded-none"}),r.jsxs("p",{className:"text-[11px] text-gray-500 font-mono mt-1",children:["The default will be http://",Ea]})]}),r.jsxs("div",{className:"flex items-end justify-end space-x-2",children:[r.jsx($,{variant:"outline",onClick:()=>{Jn(null),Bn(Ea)},className:"border border-dashed border-white/20 text-white hover:bg-white/10 rounded-none",children:"Clear"}),r.jsx($,{onClick:wU,disabled:Xa||!f||!Fn.trim()&&!Ea,className:"rounded-none",children:Xa?r.jsxs(r.Fragment,{children:[r.jsx(gn,{className:"w-4 h-4 mr-2 animate-spin"}),"Fetching..."]}):"Fetch Credentials"})]}),Qn&&r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[r.jsxs("div",{children:[r.jsx(pe,{className:"text-xs uppercase font-mono text-gray-400 mb-2 block",children:"Client ID"}),r.jsxs("div",{className:"relative",children:[r.jsx(Te,{value:Qn.clientId,readOnly:!0,className:"bg-black border border-dashed border-white/20 text-white font-mono text-xs pr-10 rounded-none"}),r.jsx($,{variant:"ghost",size:"sm",onClick:()=>Aa(Qn.clientId),className:"absolute right-0 top-0 h-full px-3 text-gray-400 hover:text-white rounded-none",children:r.jsx(aa,{className:"w-4 h-4"})})]})]}),r.jsxs("div",{children:[r.jsx(pe,{className:"text-xs uppercase font-mono text-gray-400 mb-2 block",children:"Client Secret"}),r.jsxs("div",{className:"relative",children:[r.jsx(Te,{type:_s?"text":"password",value:Qn.clientSecret,readOnly:!0,className:"bg-black border border-dashed border-white/20 text-white font-mono text-xs pr-20 rounded-none"}),r.jsxs("div",{className:"absolute right-0 top-0 h-full flex items-center",children:[r.jsx($,{variant:"ghost",size:"sm",onClick:()=>Io(!_s),className:"px-2 text-gray-400 hover:text-white rounded-none",children:_s?r.jsx(Dh,{className:"w-4 h-4"}):r.jsx(gi,{className:"w-4 h-4"})}),r.jsx($,{variant:"ghost",size:"sm",onClick:()=>Aa(Qn.clientSecret),className:"px-2 text-gray-400 hover:text-white rounded-none",children:r.jsx(aa,{className:"w-4 h-4"})})]})]})]})]}),r.jsxs("div",{className:"flex items-center justify-between pt-2 border-t border-dashed border-white/10",children:[r.jsx("div",{className:"flex-1",children:dt&&r.jsx("div",{className:"text-xs font-mono",children:dt.success?r.jsxs("span",{className:"text-green-400 uppercase",children:["✓ ",dt.message.toLowerCase(),r.jsxs("span",{className:"block normal-case text-gray-400",children:[r.jsx("span",{className:"text-gray-400 mr-1",children:">"})," ",dt.path]})]}):r.jsxs("span",{className:"text-red-300",children:["✗ ",dt.message]})})}),r.jsx($,{onClick:NU,disabled:Rs||Mo,className:"rounded-none",children:Mo?r.jsxs(r.Fragment,{children:[r.jsx(gn,{className:"w-4 h-4 mr-2 animate-spin"}),"Checking..."]}):Rs?r.jsxs(r.Fragment,{children:[r.jsx(gn,{className:"w-4 h-4 mr-2 animate-spin"}),"Writing..."]}):r.jsxs(r.Fragment,{children:[r.jsx($m,{className:"w-4 h-4 mr-2"}),"Write to .env"]})})]})]})]})]})}),Ds&&r.jsx("div",{className:"fixed inset-0 bg-black/80 flex items-center justify-center z-[60] overflow-hidden",children:r.jsxs("div",{className:"bg-black border border-dashed border-white/20 rounded-none p-6 w-full max-w-4xl max-h-[90vh] overflow-y-auto",children:[r.jsxs("div",{className:"flex items-center justify-between mb-6",children:[r.jsxs("div",{className:"flex items-center space-x-2",children:[r.jsx(Zi,{className:"w-5 h-5 text-white"}),r.jsx("h3",{className:"text-xl text-white font-light uppercase tracking-wider",children:"Secret Generator"})]}),r.jsx($,{variant:"ghost",size:"sm",onClick:()=>ye(!1),className:"text-gray-400 hover:text-white rounded-none",children:r.jsx(xt,{className:"w-4 h-4"})})]}),r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[r.jsxs("div",{children:[r.jsx(pe,{className:"text-xs uppercase font-mono text-gray-400 mb-2 block",children:"Length (bytes)"}),r.jsx(Te,{type:"number",value:Le,onChange:z=>{const Z=parseInt(z.target.value,10);Z>=16&&Z<=128&&Oe(Z)},min:"16",max:"128",className:"bg-black border border-dashed border-white/20 text-white font-mono text-xs rounded-none"}),r.jsx("p",{className:"text-[11px] text-gray-500 font-mono mt-1",children:"Recommended: 32 bytes (256 bits)"})]}),r.jsxs("div",{children:[r.jsx(pe,{className:"text-xs uppercase font-mono text-gray-400 mb-2 block",children:"Format"}),r.jsx("div",{className:"flex gap-3",children:[{id:"hex",label:"Hex"},{id:"base64",label:"Base64"}].map(z=>r.jsx("button",{onClick:()=>nt(z.id),className:`px-4 py-2 border rounded-none text-sm uppercase font-mono transition-colors flex-1 ${Ce===z.id?"border-white/60 bg-white/10 text-white":"border-dashed border-white/20 text-gray-400 hover:border-white/40"}`,children:z.label},z.id))})]})]}),r.jsxs("div",{className:"flex justify-end space-x-2",children:[r.jsx($,{variant:"outline",onClick:()=>{Ee(null),Oe(32),nt("hex")},className:"border border-dashed border-white/20 text-white hover:bg-white/10 rounded-none",children:"Clear"}),r.jsx($,{onClick:yU,disabled:de,className:"rounded-none",children:de?r.jsxs(r.Fragment,{children:[r.jsx(gn,{className:"w-4 h-4 mr-2 animate-spin"}),"Generating..."]}):"Generate Secret"})]}),ve&&r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4 text-xs font-mono",children:[r.jsxs("div",{className:"border border-dashed border-white/10 p-3 space-y-2",children:[r.jsx("div",{className:"text-gray-400 uppercase tracking-wider",children:"Length"}),r.jsxs("p",{className:"text-white text-sm",children:[ve.length," bytes"]})]}),r.jsxs("div",{className:"border border-dashed border-white/10 p-3 space-y-2",children:[r.jsx("div",{className:"text-gray-400 uppercase tracking-wider",children:"Entropy"}),r.jsxs("p",{className:"text-white text-sm",children:[ve.entropy," bits"]})]}),r.jsxs("div",{className:"border border-dashed border-white/10 p-3 space-y-2",children:[r.jsx("div",{className:"text-gray-400 uppercase tracking-wider",children:"Format"}),r.jsx("p",{className:"text-white text-sm uppercase",children:ve.format})]})]}),r.jsxs("div",{children:[r.jsx(pe,{className:"text-xs uppercase font-mono text-gray-400 mb-2 block",children:"Generated Secret"}),r.jsxs("div",{className:"relative",children:[r.jsx(Te,{value:ve.secret,readOnly:!0,className:"bg-black border border-dashed border-white/20 text-white font-mono text-xs pr-10 rounded-none"}),r.jsx($,{variant:"ghost",size:"sm",onClick:()=>Aa(ve.secret),className:"absolute right-0 top-0 h-full px-3 text-gray-400 hover:text-white rounded-none",children:r.jsx(aa,{className:"w-4 h-4"})})]})]}),r.jsxs("div",{children:[r.jsx(pe,{className:"text-xs uppercase font-mono text-gray-400 mb-2 block",children:"Environment Variable Format"}),r.jsxs("div",{className:"relative",children:[r.jsx(Te,{value:ve.envFormat,readOnly:!0,className:"bg-black border border-dashed border-white/20 text-white font-mono text-xs pr-10 rounded-none"}),r.jsx($,{variant:"ghost",size:"sm",onClick:()=>Aa(ve.envFormat),className:"absolute right-0 top-0 h-full px-3 text-gray-400 hover:text-white rounded-none",children:r.jsx(aa,{className:"w-4 h-4"})})]}),r.jsxs("p",{className:"text-[11px] text-gray-500 font-mono mt-2",children:["Add this to your ",r.jsx("code",{className:"text-gray-400",children:".env"})," file. Keep it secret and never commit it to version control."]})]}),r.jsx("div",{className:"border border-dashed border-white/20 bg-black text-gray-300 text-xs font-mono p-3 rounded-none",children:r.jsxs("div",{className:"flex items-start space-x-2",children:[r.jsx(eh,{className:"w-4 h-4 mt-0.5 flex-shrink-0 text-gray-400"}),r.jsxs("div",{children:[r.jsx("div",{className:"uppercase font-mono mb-2 text-gray-400 tracking-wider",children:"Security Best Practices"}),r.jsxs("ul",{className:"list-disc list-inside space-y-1 text-[11px] text-gray-300",children:[r.jsx("li",{children:"Use a minimum of 32 bytes (256 bits) for production"}),r.jsx("li",{children:"Store secrets in environment variables, never in code"}),r.jsx("li",{children:"Use different secrets for development and production"}),r.jsx("li",{children:"Rotate secrets periodically for enhanced security"})]})]})]})})]})]})]})}),br&&Zr&&r.jsx("div",{className:"fixed inset-0 bg-black/80 flex items-center justify-center z-[70] overflow-hidden",children:r.jsxs("div",{className:"bg-black border border-dashed border-white/20 rounded-none p-6 w-full max-w-2xl",children:[r.jsxs("div",{className:"flex items-center justify-between mb-6",children:[r.jsxs("div",{className:"flex items-center space-x-2",children:[r.jsx(eh,{className:"w-5 h-5 text-yellow-400"}),r.jsx("h3",{className:"text-xl text-white font-light uppercase tracking-wider",children:"Overwrite Existing Credentials?"})]}),r.jsx($,{variant:"ghost",size:"sm",onClick:()=>{Os(!1),Ta(null),xr(!1)},className:"text-gray-400 hover:text-white rounded-none",children:r.jsx(xt,{className:"w-4 h-4"})})]}),r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{className:"border border-dashed border-white/20 p-4",children:[r.jsxs("p",{className:"text-sm border-b border-dashed border-white/20 pb-5 text-gray-300 font-mono mb-3",children:["The following"," ",r.jsx("span",{className:"text-white uppercase",children:(f==null?void 0:f.charAt(0).toUpperCase())+(f==null?void 0:f.slice(1))})," ","credentials already exist in"," ",r.jsx("span",{className:"text-gray-400 normal-case",children:Zr.path}),":"]}),r.jsx("div",{className:"space-y-2 pt-2",children:Object.entries(Zr.credentials).map(([z,Z])=>r.jsxs("div",{className:"flex items-center justify-between text-xs font-mono",children:[r.jsx("span",{className:"text-gray-400 uppercase",children:z}),r.jsx("span",{className:"text-gray-500",children:Z.length>20?`${Z.substring(0,20)}...`:Z})]},z))})]}),r.jsxs("div",{className:"flex items-center justify-end space-x-3 pt-4 border-t border-dashed border-white/10",children:[r.jsx($,{variant:"outline",onClick:()=>{Os(!1),Ta(null),xr(!1)},className:"border border-dashed border-white/20 text-white hover:bg-white/10 rounded-none",children:"No, Cancel"}),r.jsx($,{variant:"outline",onClick:()=>Yp("append"),disabled:Rs,className:"border border-dashed border-white/20 text-white hover:bg-white/10 rounded-none",children:"Append"}),r.jsx($,{onClick:()=>Yp("override"),disabled:Rs,className:"rounded-none",children:Rs?r.jsxs(r.Fragment,{children:[r.jsx(gn,{className:"w-4 h-4 mr-2 animate-spin"}),"Writing..."]}):"Yes, Overwrite"})]})]})]})})]})}function Aue(){const{userId:e}=i1(),t=ur(),[n,a]=m.useState(null),[s,i]=m.useState([]),[o,l]=m.useState([]),[c,u]=m.useState([]),[h,d]=m.useState([]),[f,p]=m.useState(!0),[v,x]=m.useState("details"),[N,b]=m.useState(!1),[y,g]=m.useState(!1),[w,S]=m.useState(!1),[C,T]=m.useState(!1),[E,k]=m.useState(!1),[O,R]=m.useState("random"),[I,F]=m.useState(!1),[j,U]=m.useState(!1),[_,M]=m.useState(!1),[A,D]=m.useState(""),[B,G]=m.useState(),[L,q]=m.useState(!1),[X,K]=m.useState(""),[ne,te]=m.useState([]),[ee,ae]=m.useState(!1),[ge,se]=m.useState({}),fe=m.useRef({}),me=m.useCallback(async()=>{try{const le=await(await fetch("/api/admin/status")).json();q(le.enabled)}catch{q(!1)}},[]),Re=m.useCallback(async V=>{try{const le=await fetch("/api/geo/resolve",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({ipAddress:V})});if(le.ok){const he=await le.json();if(he.success&&he.location)return he.location}return null}catch{return null}},[]),Me=m.useCallback(async V=>{const le=V.filter(De=>!fe.current[De.id]);if(le.length===0)return;const he=await Promise.all(le.map(async De=>{const Ye=await Re(De.ipAddress);return Ye?{sessionId:De.id,location:Ye}:null})),xe={};he.forEach(De=>{De&&(xe[De.sessionId]=De.location)}),Object.keys(xe).length>0&&(fe.current={...fe.current,...xe},se(fe.current))},[Re]),Ue=V=>{if(!V)return"🌍";const le=V.toUpperCase().split("").map(he=>127397+he.charCodeAt(0));return String.fromCodePoint(...le)},$e=V=>V?V.replace(/[_-]/g," ").replace(/\b\w/g,le=>le.toUpperCase()):"Unknown Provider",pt=V=>{if(!V)return"Unknown";const le=new Date(V);return Number.isNaN(le.getTime())?"Unknown":le.toLocaleString("en-US",{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})},Ge=m.useCallback(async()=>{try{const V=await fetch(`/api/users/${e}`);if(V.ok){const le=await V.json();a(le.user)}else H.error("Failed to fetch user details"),t("/users")}catch{H.error("Failed to fetch user details"),t("/users")}finally{p(!1)}},[e,t]),jt=m.useCallback(async()=>{try{const[V,le,he]=await Promise.all([fetch(`/api/users/${e}/organizations`),fetch(`/api/users/${e}/teams`),fetch(`/api/users/${e}/sessions`)]);if(V.ok){const xe=await V.json();i(xe.memberships||[])}if(le.ok){const xe=await le.json();l(xe.memberships||[])}if(he.ok){const De=(await he.json()).sessions||[];u(De),Me(De)}}catch{}},[e,Me]),vt=m.useCallback(async()=>{try{const V=await fetch(`/api/users/${e}/accounts`);if(V.ok){const le=await V.json();d(le.accounts||[])}}catch{}},[e]),We=async()=>{var xe,De;if(!n)return;const V=(xe=document.getElementById("edit-name"))==null?void 0:xe.value,le=(De=document.getElementById("edit-email"))==null?void 0:De.value;if(!V||!le){H.error("Please fill in all fields");return}const he=H.loading("Updating user...");try{const Q=await(await fetch(`/api/users/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:V,email:le,role:X||null})})).json();Q.success?(a({...n,name:V,email:le,role:X||void 0}),b(!1),K(""),H.success("User updated successfully!",{id:he})):H.error(`Error updating user: ${Q.error||"Unknown error"}`,{id:he})}catch{H.error("Error updating user",{id:he})}},et=async()=>{if(!n)return;const V=H.loading("Deleting user...");try{const he=await(await fetch(`/api/users/${e}`,{method:"DELETE",headers:{"Content-Type":"application/json"}})).json();he.success?(H.success("User deleted successfully!",{id:V}),t("/users")):H.error(`Error deleting user: ${he.error||"Unknown error"}`,{id:V})}catch{H.error("Error deleting user",{id:V})}},Ze=async()=>{if(!n)return;if(!L){H.error("Admin plugin is not enabled. Please enable the admin plugin in your Better Auth configuration to use ban functionality.");return}const V=H.loading("Banning user...");try{const le=await fetch("/api/admin/ban-user",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({userId:e,banReason:A||"No reason provided",banExpiresIn:B})}),he=await le.json();le.ok?(H.success("User banned successfully!",{id:V}),g(!1),D(""),G(void 0),Ge()):le.status===403?H.error("You do not have permission to ban users. Admin role required.",{id:V}):he.adminPluginEnabled&&he.instructions?H.error(`${he.error}`,{id:V,duration:6e3,description:`Use: ${he.instructions.example}`}):H.error(`Error banning user: ${he.error||he.message||"Unknown error"}`,{id:V})}catch{H.error("Error banning user",{id:V})}},Et=async()=>{if(!n)return;if(!L){H.error("Admin plugin is not enabled. Please enable the admin plugin in your Better Auth configuration to use unban functionality.");return}const V=H.loading("Unbanning user...");try{const le=await fetch("/api/admin/unban-user",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({userId:e})}),he=await le.json();le.ok?(H.success("User unbanned successfully!",{id:V}),S(!1),Ge()):le.status===403?H.error("You do not have permission to unban users. Admin role required.",{id:V}):he.adminPluginEnabled&&he.instructions?H.error(`${he.error}`,{id:V,duration:6e3,description:`Use: ${he.instructions.example}`}):H.error(`Error unbanning user: ${he.error||he.message||"Unknown error"}`,{id:V})}catch{H.error("Error unbanning user",{id:V})}},Tt=async V=>{const le=H.loading("Removing user from organization...");try{const xe=await(await fetch(`/api/organizations/members/${V}`,{method:"DELETE"})).json();xe.success?(i(De=>De.filter(Ye=>Ye.id!==V)),jt(),H.success("User removed from organization!",{id:le})):H.error(`Error removing user: ${xe.error||"Unknown error"}`,{id:le})}catch{H.error("Error removing user from organization",{id:le})}},qt=async V=>{const le=H.loading("Removing user from team...");try{const xe=await(await fetch(`/api/teams/members/${V}`,{method:"DELETE"})).json();xe.success?(l(De=>De.filter(Ye=>Ye.id!==V)),jt(),H.success("User removed from team!",{id:le})):H.error(`Error removing user: ${xe.error||"Unknown error"}`,{id:le})}catch{H.error("Error removing user from team",{id:le})}},Wt=async V=>{const le=H.loading("Deleting session...");try{const xe=await(await fetch(`/api/sessions/${V}`,{method:"DELETE"})).json();xe.success?(u(De=>De.filter(Ye=>Ye.id!==V)),H.success("Session deleted successfully!",{id:le})):H.error(`Error deleting session: ${xe.error||"Unknown error"}`,{id:le})}catch{H.error("Error deleting session",{id:le})}},re=async V=>{if(!e)return;const le=H.loading("Unlinking account...");try{const he=await fetch(`/api/users/${e}/accounts/${V}`,{method:"DELETE"}),xe=await he.json();he.ok&&xe.success?(d(De=>De.filter(Ye=>Ye.id!==V)),await vt(),H.success("Account unlinked successfully",{id:le})):H.error(xe.error||"Failed to unlink account",{id:le})}catch{H.error("Failed to unlink account",{id:le})}};m.useEffect(()=>{e&&(Ge(),jt(),vt(),me())},[e,me,Ge,jt,vt]);const we=async(V=3)=>{if(e){te([]),ae(!0),te([{id:"start",type:"info",message:`Starting session seeding process for ${V} sessions...`,timestamp:new Date}]);try{const he=await(await fetch(`/api/users/${e}/seed-sessions`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({count:V})})).json();if(he.success){const xe=he.results.map((Ye,Q)=>Ye.success?{id:`session-${Q}`,type:"progress",message:`Creating session ${Q+1}: ${Ye.session.token.substring(0,20)}... from ${Ye.session.ipAddress}`,timestamp:new Date,status:"completed"}:{id:`session-${Q}`,type:"error",message:`Failed to create session ${Q+1}: ${Ye.error}`,timestamp:new Date});te(Ye=>[...Ye,...xe]);const De=he.results.filter(Ye=>Ye.success).length;te(Ye=>[...Ye,{id:"complete",type:"success",message:`✅ Session seeding completed! Created ${De}/${V} sessions successfully`,timestamp:new Date}]),jt()}else te(xe=>[...xe,{id:"error",type:"error",message:`❌ Session seeding failed: ${he.error||"Unknown error"}`,timestamp:new Date}])}catch(le){te(he=>[...he,{id:"error",type:"error",message:`❌ Network error: ${le}`,timestamp:new Date}])}finally{ae(!1)}}},Be=async(V=3,le="random")=>{if(e){te([]),ae(!0),te([{id:"start",type:"info",message:`Starting account seeding process for ${V} accounts...`,timestamp:new Date}]);try{const xe=await(await fetch(`/api/users/${e}/seed-accounts`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({count:V,providerId:le})})).json();if(xe.success){const De=xe.results.map((Q,ie)=>{var Ne;return Q.success?{id:`account-${ie}`,type:"progress",message:`Creating account ${ie+1}: ${Q.account.providerId||Q.account.provider} (${((Ne=Q.account.accountId)==null?void 0:Ne.substring(0,20))||Q.account.id.substring(0,20)}...)`,timestamp:new Date,status:"completed"}:{id:`account-${ie}`,type:"error",message:`Failed to create account ${ie+1}: ${Q.error}`,timestamp:new Date}});te(Q=>[...Q,...De]);const Ye=xe.results.filter(Q=>Q.success).length;te(Q=>[...Q,{id:"complete",type:"success",message:`✅ Account seeding completed! Created ${Ye}/${V} accounts successfully`,timestamp:new Date}]),vt()}else te(De=>[...De,{id:"error",type:"error",message:`❌ Account seeding failed: ${xe.error||"Unknown error"}`,timestamp:new Date}])}catch(he){te(xe=>[...xe,{id:"error",type:"error",message:`❌ Network error: ${he}`,timestamp:new Date}])}finally{ae(!1)}}};return f?r.jsx("div",{className:"min-h-screen bg-black flex items-center justify-center",children:r.jsx("div",{className:"text-white text-lg",children:"Loading user details..."})}):n?r.jsxs("div",{className:"space-y-6 p-6 bg-black w-full",children:[r.jsxs("div",{className:"w-full flex flex-col",children:[r.jsx("span",{className:"mb-4 ml-0 flex justify-start items-start text-left border-none text-white",children:r.jsxs("span",{className:"font-light",children:[r.jsxs("span",{onClick:()=>t("/users"),className:"uppercase cursor-pointer text-white/80 font-mono text-sm",children:["users /"," "]}),r.jsx("span",{className:"text-white font-mono text-sm",children:n.id})]})}),r.jsx("div",{className:"mb-8 mt-4",children:r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsxs("div",{className:"flex items-center space-x-4",children:[r.jsx("div",{className:"w-16 h-16 bg-gray-800 border border-dashed border-white/20 flex items-center justify-center",children:n.image?r.jsx("img",{src:n.image,alt:n.name,className:"w-16 h-16 object-cover"}):r.jsx(Mc,{className:"w-8 h-8 text-white"})}),r.jsxs("div",{children:[r.jsxs("h1",{className:"text-3xl font-light text-white inline-flex items-center",children:[n.name,r.jsx(Ln,{id:n.id,variant:"subscript"}),n.role&&r.jsx("sup",{className:"ml-2 px-2 pt-2 pb-2 -mt-1 py-0.5 text-[10px] font-mono uppercase border border-dashed border-white/15 bg-white/5 text-white/80 rounded-none",children:n.role}),n.banned&&r.jsxs("sup",{className:"relative group inline-block ml-2 px-2 pt-2 pb-2 -mt-1 py-0.5 text-[10px] font-mono uppercase border border-dashed border-red-500/30 bg-red-500/10 text-red-400/80 rounded-none cursor-help",children:["Banned",n.banReason&&r.jsxs("span",{className:"absolute lowercase left-1/2 -translate-x-1/2 bottom-full mb-3 px-2 py-2 text-[10px] font-mono text-gray-300 bg-black border border-dashed border-white/20 rounded-none whitespace-nowrap opacity-0 invisible group-hover:opacity-100 group-hover:visible transition-all duration-150 pointer-events-none z-50",children:[r.jsx("span",{className:"text-gray-400 font-mono text-xs uppercase mr-1",children:"Banned Reason:"}),n.banReason,r.jsx("span",{className:"absolute left-1/2 -translate-x-1/2 top-full w-0 h-0 border-l-[4px] border-r-[4px] border-t-[4px] border-transparent border-t-white/20"})]})]})]}),r.jsx("p",{className:"text-gray-400 font-mono text-sm",children:n.email})]})]}),r.jsx("div",{className:"flex items-center space-x-2",children:r.jsxs("div",{className:"relative",children:[r.jsx($,{variant:"ghost",size:"sm",className:"text-gray-400 hover:text-white rounded-none",onClick:V=>{V.stopPropagation(),M(!_)},children:r.jsx(WM,{className:"w-4 h-4"})}),_&&r.jsxs("div",{className:"absolute z-[999] right-0 top-full mt-1 w-48 bg-black border border-white/20 rounded-none shadow-lg",onClick:V=>V.stopPropagation(),children:[r.jsxs("button",{className:"w-full px-4 py-2 text-left text-sm text-white hover:bg-white/10 flex items-center space-x-2",onClick:V=>{V.stopPropagation(),M(!1),b(!0),K(n.role||"")},children:[r.jsx(bo,{className:"w-4 h-4"}),r.jsx("span",{children:"Edit User"})]}),r.jsxs("button",{className:"w-full px-4 py-2 text-left text-sm text-white hover:bg-white/10 flex items-center space-x-2",onClick:V=>{V.stopPropagation(),M(!1),F(!0)},children:[r.jsx(Cn,{className:"w-4 h-4"}),r.jsx("span",{children:"Update Password"})]}),L&&(n.banned?r.jsxs("button",{className:"w-full px-4 py-2 text-left text-sm text-green-400 hover:bg-white/10 flex items-center space-x-2",onClick:V=>{V.stopPropagation(),M(!1),S(!0)},children:[r.jsx(hg,{className:"w-4 h-4"}),r.jsx("span",{children:"Unban User"})]}):r.jsxs("button",{className:"w-full px-4 py-2 text-left text-sm text-yellow-400 hover:bg-white/10 flex items-center space-x-2",onClick:V=>{V.stopPropagation(),M(!1),g(!0)},children:[r.jsx(hg,{className:"w-4 h-4"}),r.jsx("span",{children:"Ban User"})]})),r.jsx("div",{className:"border-t border-white/10 my-1"}),r.jsxs("button",{className:"w-full px-4 py-2 text-left text-sm text-red-400 hover:bg-white/10 flex items-center space-x-2",onClick:V=>{V.stopPropagation(),M(!1),U(!0)},children:[r.jsx(xu,{className:"w-4 h-4"}),r.jsx("span",{children:"Delete User"})]})]})]})})]})}),r.jsxs("div",{className:"border border-dashed border-white/20 rounded-none",children:[r.jsx("div",{className:"border-b border-dashed border-white/20",children:r.jsx("nav",{className:"flex space-x-8 px-6",children:[{id:"details",name:"Details",icon:Mc},{id:"organizations",name:"Organizations",icon:ha,count:s.length},{id:"teams",name:"Teams",icon:Ct,count:o.length},{id:"accounts",name:"Accounts",icon:Xi,count:h.length},{id:"sessions",name:"Sessions",icon:Iw,count:c.length}].map(V=>r.jsxs("button",{onClick:()=>x(V.id),className:`flex items-center space-x-2 py-4 px-2 border-b-2 font-medium text-sm ${v===V.id?"border-white text-white":"border-transparent text-gray-400 hover:text-white hover:border-white/50"}`,children:[r.jsx(V.icon,{className:"w-4 h-4 text-white/90"}),r.jsxs("span",{className:"inline-flex items-start",children:[r.jsx("span",{className:"",children:V.name}),V.count!==void 0&&r.jsx("sup",{className:"text-xs text-gray-500 ml-1 inline-flex items-baseline",children:r.jsx(rr,{value:V.count,className:"text-white/80 font-mono text-xs",prefix:r.jsx("span",{className:"mr-0.5 text-gray-500",children:"["}),suffix:r.jsx("span",{className:"ml-0.5 text-gray-500",children:"]"}),format:{notation:"standard",maximumFractionDigits:0}})})]})]},V.id))})}),r.jsxs("div",{className:"p-6",children:[v==="details"&&r.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[r.jsxs("div",{className:"overflow-x-hidden bg-white/[3%] border border-white/10 p-6 rounded-none",children:[r.jsx("h3",{className:"text-sm uppercase font-mono text-gray-400 mb-4 tracking-wider",children:"BASIC INFORMATION"}),r.jsx("hr",{className:"border-white/10 -mx-10 border-dashed my-4"}),r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{className:"flex items-start space-x-3",children:[r.jsx(Mc,{className:"w-4 h-4 text-gray-400 mt-1"}),r.jsxs("div",{className:"flex-1",children:[r.jsx("div",{className:"text-xs uppercase font-mono text-gray-500 mb-1",children:"Name"}),r.jsx("div",{className:"text-white font-sans text-sm",children:n.name})]})]}),r.jsxs("div",{className:"flex items-start space-x-3",children:[r.jsx(as,{className:"w-4 h-4 text-gray-400 mt-1"}),r.jsxs("div",{className:"flex-1",children:[r.jsx("div",{className:"text-xs uppercase font-mono text-gray-500 mb-1",children:"Email"}),r.jsx("div",{className:"text-white font-mono text-sm",children:n.email})]})]}),n.username&&r.jsxs("div",{className:"flex items-start space-x-3",children:[r.jsx(gte,{className:"w-4 h-4 text-gray-400 mt-1"}),r.jsxs("div",{className:"flex-1",children:[r.jsx("div",{className:"text-xs uppercase font-mono text-gray-500 mb-1",children:"Username"}),r.jsx("div",{className:"text-white font-mono text-sm",children:n.username})]})]}),n.phoneNumber&&r.jsxs("div",{className:"flex items-start space-x-3",children:[r.jsx(mte,{className:"w-4 h-4 text-gray-400 mt-1"}),r.jsxs("div",{className:"flex-1",children:[r.jsx("div",{className:"text-xs uppercase font-mono text-gray-500 mb-1",children:"Phone"}),r.jsx("div",{className:"text-white font-mono text-sm",children:"+251 91 234 5678"})]})]}),r.jsxs("div",{className:"flex items-start space-x-3",children:[r.jsx(Za,{className:"w-4 h-4 text-gray-400 mt-1"}),r.jsxs("div",{className:"flex-1",children:[r.jsx("div",{className:"text-xs uppercase font-mono text-gray-500 mb-1",children:"Member Since"}),r.jsx("div",{className:"text-white font-mono text-sm",children:new Date(n.createdAt).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit"})})]})]})]})]}),r.jsxs("div",{className:"overflow-x-hidden bg-white/[3%] border border-white/10 p-6 rounded-none",children:[r.jsx("h3",{className:"text-sm uppercase font-mono text-gray-400 mb-4 tracking-wider",children:"SECURITY"}),r.jsx("hr",{className:"border-white/10 -mx-10 border-dashed my-4"}),r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{className:"flex items-center justify-between p-3 bg-black/30 border border-white/10 rounded-none",children:[r.jsxs("div",{className:"flex items-center space-x-3",children:[r.jsx(as,{className:"w-4 h-4 text-gray-400"}),r.jsx("div",{children:r.jsx("div",{className:"text-xs uppercase font-mono text-gray-500",children:"Email Verification"})})]}),r.jsx("div",{className:`px-2 rounded-none border border-dashed border-white/20 uppercase py-1 text-xs font-mono ${n.emailVerified?"bg-green-500/20 text-green-400":"bg-red-500/20 text-red-400"}`,children:n.emailVerified?"Verified":"Unverified"})]}),r.jsxs("div",{className:"flex items-center justify-between p-3 bg-black/30 border border-white/10 rounded-none",children:[r.jsxs("div",{className:"flex items-center space-x-3",children:[r.jsx(ps,{className:"w-4 h-4 text-gray-400"}),r.jsx("div",{children:r.jsx("div",{className:"text-xs uppercase font-mono text-gray-500",children:"Two-Factor Authentication"})})]}),r.jsx("div",{className:`px-2 rounded-none border border-dashed border-white/20 uppercase py-1 text-xs font-mono ${n.twoFactorEnabled?"bg-green-500/20 text-green-400":"bg-red-500/20 text-red-400"}`,children:n.twoFactorEnabled?"Enabled":"Disabled"})]})]})]})]}),v==="organizations"&&r.jsx("div",{className:"space-y-4",children:s.length===0?r.jsxs("div",{className:"text-center py-12",children:[r.jsx(ha,{className:"w-12 h-12 text-gray-400 mx-auto mb-4"}),r.jsx("h3",{className:"text-lg font-medium text-white mb-2",children:"No Organizations"}),r.jsx("p",{className:"text-gray-400",children:"This user is not a member of any organizations."})]}):r.jsx("div",{className:"grid gap-4",children:s.map(V=>r.jsxs("div",{className:"border border-dashed border-white/10 rounded-none p-4 hover:bg-white/5 transition-colors",children:[r.jsxs("div",{className:"flex items-start justify-between mb-3",children:[r.jsxs("div",{className:"flex items-center space-x-4 flex-1",children:[r.jsx("div",{className:"w-12 h-12 bg-black/80 border border-dashed border-white/20 flex items-center justify-center rounded-none",children:V.organization.image?r.jsx("img",{src:V.organization.image,alt:V.organization.name,className:"w-12 h-12 object-cover"}):r.jsx(ha,{className:"w-6 h-6 text-white"})}),r.jsxs("div",{className:"flex-1",children:[r.jsxs("h3",{className:"text-white font-light inline-flex items-start",children:[V.organization.name,r.jsxs("sup",{className:"text-xs text-gray-500 ml-2 mt-0.5",children:[r.jsx("span",{className:"mr-1",children:"["}),r.jsx("span",{className:"text-white/80 font-mono text-xs",children:V.organization.slug}),r.jsx("span",{className:"ml-1",children:"]"})]})]}),r.jsxs("p",{className:"text-gray-400 text-sm font-sans mt-1 flex items-center gap-2",children:[r.jsxs("span",{children:["in ",V.organization.slug]}),r.jsx("button",{onClick:le=>{le.stopPropagation(),t(`/organizations/${V.organization.id}`)},className:"text-white/60 hover:text-white transition-colors",title:"View organization details",children:r.jsx(Bd,{className:"w-3.5 h-3.5"})})]})]})]}),r.jsx("div",{className:"flex flex-col items-end space-y-2",children:r.jsxs("div",{className:"flex items-center space-x-2",children:[r.jsxs("span",{className:"text-gray-500 font-mono text-xs uppercase",children:["Joined:"," "]}),r.jsxs("span",{className:"text-white font-mono text-xs",children:[new Date(V.joinedAt).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}),","," ",new Date(V.joinedAt).toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0})]})]})})]}),r.jsx("div",{className:"flex items-center justify-end",children:r.jsxs($,{variant:"outline",size:"sm",onClick:()=>Tt(V.id),className:"border border-dashed border-red-400/20 text-red-400 hover:bg-red-400/10 rounded-none",children:[r.jsx(ug,{className:"w-4 h-4 mr-1"}),"Remove"]})})]},V.id))})}),v==="teams"&&r.jsx("div",{className:"space-y-4",children:o.length===0?r.jsxs("div",{className:"text-center py-12",children:[r.jsx(Ct,{className:"w-12 h-12 text-gray-400 mx-auto mb-4"}),r.jsx("h3",{className:"text-lg font-medium text-white mb-2",children:"No Teams"}),r.jsx("p",{className:"text-gray-400",children:"This user is not a member of any teams."})]}):r.jsx("div",{className:"grid gap-4",children:o.map(V=>r.jsxs("div",{className:"border border-dashed border-white/10 rounded-none p-4 hover:bg-white/5 transition-colors",children:[r.jsxs("div",{className:"flex items-start justify-between mb-3",children:[r.jsxs("div",{className:"flex items-center space-x-4 flex-1",children:[r.jsx("div",{className:"w-12 h-12 bg-black/80 border border-dashed border-white/20 flex items-center justify-center rounded-none",children:r.jsx(Ct,{className:"w-6 h-6 text-white"})}),r.jsxs("div",{className:"flex-1",children:[r.jsxs("h3",{className:"text-white font-light inline-flex items-start",children:[V.team.name,r.jsx(Ln,{id:V.team.id,variant:"subscript",nonSliced:!!(V.team.organizationSlug||V.team.organizationName)})]}),r.jsxs("p",{className:"text-gray-400 text-sm font-sans mt-1 flex items-center gap-2",children:[r.jsxs("span",{children:["in"," ",V.team.organizationSlug||V.team.organizationName]}),r.jsx("button",{onClick:le=>{le.stopPropagation(),V.team.organizationId?t(`/organizations/${V.team.organizationId}/teams/${V.team.id}`):t(`/teams/${V.team.id}`)},className:"text-white/60 hover:text-white transition-colors",title:"View team details",children:r.jsx(Bd,{className:"w-3.5 h-3.5"})})]})]})]}),r.jsx("div",{className:"flex flex-col items-end space-y-2",children:r.jsxs("div",{className:"flex items-center space-x-2",children:[r.jsxs("span",{className:"text-gray-500 font-mono text-xs uppercase",children:["Joined:"," "]}),r.jsxs("span",{className:"text-white font-mono text-xs",children:[new Date(V.joinedAt).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}),","," ",new Date(V.joinedAt).toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0})]})]})})]}),r.jsx("div",{className:"flex items-center justify-end",children:r.jsxs($,{variant:"outline",size:"sm",onClick:()=>qt(V.id),className:"border border-dashed border-red-400/20 text-red-400 hover:bg-red-400/10 rounded-none",children:[r.jsx(ug,{className:"w-4 h-4 mr-1"}),"Remove"]})})]},V.id))})}),v==="accounts"&&r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{className:"flex items-center justify-between mb-4",children:[r.jsxs("div",{children:[r.jsx("h3",{className:"text-lg font-medium text-white",children:"Linked Accounts"}),r.jsx("p",{className:"text-gray-400 text-sm",children:"Manage user OAuth account connections"})]}),r.jsxs($,{variant:"outline",onClick:()=>{te([]),ae(!1),k(!0)},className:"border border-dashed border-white/20 text-white hover:bg-white/10 rounded-none",children:[r.jsx(Xi,{className:"w-4 h-4 mr-2"}),"Seed Accounts"]})]}),h.length===0?r.jsxs("div",{className:"text-center py-12",children:[r.jsx(Xi,{className:"w-12 h-12 text-gray-400 mx-auto mb-4"}),r.jsx("h3",{className:"text-lg font-medium text-white mb-2",children:"No Linked Accounts"}),r.jsx("p",{className:"text-gray-400",children:"This user has not connected any accounts yet."})]}):r.jsx("div",{className:"grid gap-4",children:h.map(V=>r.jsxs("div",{className:"border border-dashed border-white/10 rounded-none p-4 hover:bg-white/5 transition-colors",children:[r.jsxs("div",{className:"flex items-start justify-between mb-3",children:[r.jsxs("div",{className:"flex items-center space-x-4 flex-1",children:[r.jsx("div",{className:"w-12 h-12 bg-black/80 border border-dashed border-white/20 flex items-center justify-center rounded-none",children:aU(V.providerId)}),r.jsxs("div",{className:"flex-1",children:[r.jsxs("h3",{className:"text-white font-light inline-flex items-start",children:[$e(V.providerId),r.jsx(Ln,{id:V.accountId,variant:"subscript",nonSliced:!!(V.email||n.email)})]}),r.jsx("p",{className:"text-gray-400 tracking-tight uppercase text-xs font-mono mt-1",children:`ID: ${V.id}`})]})]}),r.jsx("div",{className:"flex flex-col items-end space-y-2 text-right",children:r.jsxs("div",{className:"flex items-center space-x-2 text-xs font-mono text-gray-400",children:[r.jsx("span",{children:"Linked:"}),r.jsx("span",{className:"text-white",children:pt(V.createdAt||V.updatedAt)})]})})]}),r.jsx("div",{className:"flex items-center justify-end",children:r.jsxs($,{variant:"outline",size:"sm",onClick:()=>re(V.id),className:"border border-dashed border-red-400/20 text-red-400 hover:bg-red-400/10 rounded-none",children:[r.jsx(ug,{className:"w-4 h-4 mr-1"}),"Unlink"]})})]},V.id))})]}),v==="sessions"&&r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{className:"flex items-center justify-between mb-4",children:[r.jsxs("div",{children:[r.jsx("h3",{className:"text-lg font-medium text-white",children:"Sessions"}),r.jsx("p",{className:"text-gray-400 text-sm",children:"Manage user authentication sessions"})]}),r.jsxs($,{variant:"outline",onClick:()=>{te([]),ae(!1),T(!0)},className:"border border-dashed border-white/20 text-white hover:bg-white/10 rounded-none",children:[r.jsx(ps,{className:"w-4 h-4 mr-2"}),"Seed Sessions"]})]}),c.length===0?r.jsxs("div",{className:"text-center py-12",children:[r.jsx(Iw,{className:"w-12 h-12 text-gray-400 mx-auto mb-4"}),r.jsx("h3",{className:"text-lg font-medium text-white mb-2",children:"No Sessions"}),r.jsx("p",{className:"text-gray-400",children:"This user has no active sessions."})]}):r.jsx("div",{className:"grid gap-4",children:c.map(V=>{var le,he,xe,De;return r.jsxs("div",{className:"border border-dashed border-white/10 rounded-none p-4 hover:bg-white/5 transition-colors",children:[r.jsxs("div",{className:"flex items-start justify-between mb-3",children:[r.jsxs("div",{className:"flex items-center space-x-4 flex-1",children:[r.jsx("div",{className:"w-12 h-12 bg-black/80 border border-dashed border-white/20 flex items-center justify-center rounded-none",children:r.jsx(dC,{className:"w-6 h-6 text-white"})}),r.jsxs("div",{className:"flex-1",children:[r.jsxs("h3",{className:"text-white font-light inline-flex items-start",children:["Session ",V.id.substring(0,8),"...",r.jsxs("sup",{className:"text-xs text-gray-500 ml-2 mt-0.5",children:[r.jsx("span",{className:"mr-1",children:"["}),r.jsx("span",{className:"text-white/80 font-mono text-xs",children:V.ipAddress}),r.jsx("span",{className:"ml-1",children:"]"})]})]}),r.jsxs("div",{className:"flex items-center space-x-2 mt-2",children:[r.jsx(pte,{className:"w-3.5 h-3.5 text-gray-400"}),r.jsxs("span",{className:"text-gray-400 uppercase font-mono text-xs",children:[((le=ge[V.id])==null?void 0:le.city)||"...",","," ",((he=ge[V.id])==null?void 0:he.country)||"..."]}),((xe=ge[V.id])==null?void 0:xe.countryCode)&&r.jsx("span",{className:"text-xs ml-1",children:Ue((De=ge[V.id])==null?void 0:De.countryCode)})]})]})]}),r.jsx("div",{className:"flex flex-col items-end space-y-2",children:r.jsxs("div",{className:"flex items-center space-x-2",children:[r.jsxs("span",{className:"text-gray-500 font-mono text-xs uppercase",children:["Expires:"," "]}),r.jsxs("span",{className:"text-white font-mono text-xs",children:[new Date(V.expiresAt).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}),","," ",new Date(V.expiresAt).toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0})]})]})})]}),r.jsx("div",{className:"flex items-center justify-end",children:r.jsxs($,{variant:"outline",size:"sm",onClick:()=>Wt(V.id),className:"border border-dashed border-red-400/20 text-red-400 hover:bg-red-400/10 rounded-none",children:[r.jsx(hg,{className:"w-4 h-4 mr-1"}),"Revoke"]})})]},V.id)})})]})]})]})]}),N&&r.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:r.jsxs("div",{className:"bg-black/90 border border-dashed border-white/20 rounded-none p-6 w-full max-w-md",children:[r.jsxs("div",{className:"flex items-center justify-between mb-4",children:[r.jsx("h3",{className:"text-lg text-white font-light",children:"Edit User"}),r.jsx($,{variant:"ghost",size:"sm",onClick:()=>{b(!1),K("")},className:"text-gray-400 hover:text-white rounded-none",children:"×"})]}),r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{className:"flex items-center space-x-3",children:[r.jsx("div",{className:"w-16 h-16 bg-black/80 border border-dashed border-white/20 flex items-center justify-center",children:n!=null&&n.image?r.jsx("img",{src:n.image,alt:n.name,className:"w-16 h-16 object-cover"}):r.jsx(Mc,{className:"w-8 h-8 text-white"})}),r.jsxs("div",{className:"flex-1",children:[r.jsx("h4",{className:"text-white font-medium",children:n==null?void 0:n.name}),r.jsx("p",{className:"text-gray-400 text-sm",children:n==null?void 0:n.email})]})]}),r.jsxs("div",{children:[r.jsx("label",{className:"block text-sm font-medium text-gray-400 mb-2",children:"Name"}),r.jsx("input",{id:"edit-name",type:"text",defaultValue:(n==null?void 0:n.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"})]}),r.jsxs("div",{children:[r.jsx("label",{className:"block text-sm font-medium text-gray-400 mb-2",children:"Email"}),r.jsx("input",{id:"edit-email",type:"email",defaultValue:(n==null?void 0:n.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"})]}),r.jsxs("div",{children:[r.jsx("label",{className:"block text-sm font-medium text-gray-400 mb-2",children:"Role"}),r.jsxs(Ua,{className:"bg-black text-white",value:X,onValueChange:K,children:[r.jsx(Pa,{className:"w-full border border-dashed border-white/20 bg-black text-white rounded-none",children:r.jsx(yi,{placeholder:"Select role"})}),r.jsxs(Fa,{children:[r.jsx(Ve,{value:"",children:"None"}),r.jsx(Ve,{value:"admin",children:"Admin"}),r.jsx(Ve,{value:"user",children:"User"})]})]})]})]}),r.jsxs("div",{className:"flex justify-end space-x-2 mt-6",children:[r.jsx($,{variant:"outline",onClick:()=>{b(!1),K("")},className:"border border-dashed border-white/20 text-white hover:bg-white/10 rounded-none",children:"Cancel"}),r.jsx($,{onClick:We,className:"bg-white hover:bg-white/90 text-black border border-white/20 rounded-none",children:"Update"})]})]})}),y&&r.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:r.jsxs("div",{className:"bg-black border border-red-400/20 rounded-none p-6 w-full max-w-md",children:[r.jsx("h2",{className:"text-xl font-bold text-white mb-4",children:"Ban User"}),r.jsxs("p",{className:"text-gray-400 mb-4",children:["Ban ",r.jsx("strong",{children:n.name})," from accessing the system."]}),r.jsxs("div",{className:"space-y-4 mb-6",children:[r.jsxs("div",{children:[r.jsx(pe,{htmlFor:"banReason",className:"text-white",children:"Ban Reason"}),r.jsx(Te,{id:"banReason",value:A,onChange:V=>D(V.target.value),placeholder:"Enter reason for ban (optional)",className:"bg-black border border-dashed border-white/20 text-white rounded-none"})]}),r.jsxs("div",{children:[r.jsx(pe,{htmlFor:"banExpires",className:"text-white",children:"Ban Duration (seconds)"}),r.jsx(Te,{id:"banExpires",type:"number",value:B||"",onChange:V=>G(V.target.value?Number(V.target.value):void 0),placeholder:"Leave empty for permanent ban",className:"bg-black border border-dashed border-white/20 text-white rounded-none"}),r.jsx("p",{className:"text-xs text-gray-400 mt-1",children:"Examples: 3600 (1 hour), 86400 (1 day), 604800 (1 week)"})]})]}),r.jsxs("div",{className:"flex justify-end space-x-2",children:[r.jsx($,{variant:"outline",onClick:()=>{g(!1),D(""),G(void 0)},className:"border border-dashed border-white/20 text-white hover:bg-white/10 rounded-none",children:"Cancel"}),r.jsx($,{onClick:Ze,className:"bg-red-600 text-white hover:bg-red-700 rounded-none",children:"Ban User"})]})]})}),w&&r.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:r.jsxs("div",{className:"bg-black border border-green-400/20 rounded-none p-6 w-full max-w-md",children:[r.jsx("h2",{className:"text-xl font-bold text-white mb-4",children:"Unban User"}),r.jsxs("p",{className:"text-gray-400 mb-6",children:["Are you sure you want to unban ",r.jsx("strong",{children:n.name}),"? This will restore their access to the system."]}),r.jsxs("div",{className:"flex justify-end space-x-2",children:[r.jsx($,{variant:"outline",onClick:()=>S(!1),className:"border border-dashed border-white/20 text-white hover:bg-white/10 rounded-none",children:"Cancel"}),r.jsx($,{onClick:Et,className:"bg-green-400 text-white hover:bg-green-700 rounded-none",children:"Unban User"})]})]})}),j&&n&&r.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:r.jsxs("div",{className:"bg-black/90 border border-dashed border-white/20 p-6 w-full max-w-md rounded-none",children:[r.jsxs("div",{className:"flex items-center justify-between mb-4",children:[r.jsx("h3",{className:"text-lg text-white font-light",children:"Delete User"}),r.jsx($,{variant:"ghost",size:"sm",onClick:()=>U(!1),className:"text-gray-400 hover:text-white rounded-none",children:r.jsx(xt,{className:"w-4 h-4"})})]}),r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{className:"flex items-center space-x-3",children:[r.jsx("div",{className:"w-16 h-16 bg-black/80 border border-dashed border-white/20 flex items-center justify-center",children:n.image?r.jsx("img",{src:n.image,alt:n.name,className:"w-16 h-16 object-cover"}):r.jsx(Mc,{className:"w-8 h-8 text-white"})}),r.jsxs("div",{children:[r.jsx("div",{className:"text-white font-light",children:n.name}),r.jsx("div",{className:"text-sm text-gray-400",children:n.email})]})]}),r.jsx("p",{className:"text-gray-400",children:"Are you sure you want to delete this user? This action cannot be undone."})]}),r.jsxs("div",{className:"flex justify-end space-x-3 mt-6",children:[r.jsx($,{variant:"outline",onClick:()=>U(!1),className:"border border-dashed border-white/20 text-white hover:bg-white/10 rounded-none",children:"Cancel"}),r.jsx($,{onClick:et,className:"bg-red-500 hover:bg-red-600 text-white border border-red-500 rounded-none",children:"Delete"})]})]})}),I&&n&&r.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:r.jsxs("div",{className:"bg-black/90 border border-dashed border-white/20 p-6 w-full max-w-md rounded-none",children:[r.jsxs("div",{className:"flex items-center justify-between mb-4",children:[r.jsx("h3",{className:"text-lg text-white font-light",children:"Update Password"}),r.jsx($,{variant:"ghost",size:"sm",onClick:()=>F(!1),className:"text-gray-400 hover:text-white rounded-none",children:r.jsx(xt,{className:"w-4 h-4"})})]}),r.jsx("div",{className:"space-y-4",children:r.jsxs("div",{children:[r.jsx(pe,{htmlFor:"new-password",className:"text-sm text-gray-400 font-light",children:"New Password"}),r.jsx(Te,{id:"new-password",type:"password",className:"mt-1 border border-dashed border-white/20 bg-black/30 text-white rounded-none"})]})}),r.jsxs("div",{className:"flex justify-end space-x-3 mt-6",children:[r.jsx($,{variant:"outline",onClick:()=>F(!1),className:"border border-dashed border-white/20 text-white hover:bg-white/10 rounded-none",children:"Cancel"}),r.jsx($,{onClick:async()=>{var he;const V=(he=document.getElementById("new-password"))==null?void 0:he.value;if(!V){H.error("Please enter a password");return}const le=H.loading("Updating password...");try{const De=await(await fetch(`/api/users/${e}/password`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({password:V})})).json();De.success?(F(!1),document.getElementById("new-password").value="",H.success("Password updated successfully!",{id:le})):H.error(`Error updating password: ${De.error||"Unknown error"}`,{id:le})}catch{H.error("Error updating password",{id:le})}},className:"bg-white hover:bg-white/90 text-black border border-white/20 rounded-none",children:"Update"})]})]})}),C&&r.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50 overflow-hidden",children:r.jsxs("div",{className:"overflow-x-hidden overflow-y-auto bg-black/90 border border-white/10 p-6 w-full pt-4 max-w-2xl rounded-none max-h-[90vh]",children:[r.jsxs("div",{className:"flex items-center justify-between mb-6",children:[r.jsxs("h3",{className:"text-sm text-white flex items-center justify-center font-light uppercase",children:[r.jsx("span",{className:"text-white/50 mr-2",children:"["}),r.jsx(dC,{className:"inline mr-2 w-3 h-3 text-white"}),r.jsx("span",{className:"font-mono text-white/70 uppercase",children:"Seed Sessions"}),r.jsx("span",{className:"text-white/50 ml-2",children:"]"})]}),r.jsx($,{variant:"ghost",size:"sm",onClick:()=>T(!1),className:"text-gray-400 hover:text-white rounded-none",children:r.jsx(xt,{className:"w-4 h-4"})})]}),r.jsx("hr",{className:"border-white/10 -mx-10 border-dashed -mt-4 mb-4"}),r.jsxs("div",{className:"space-y-6",children:[r.jsx("div",{className:"space-y-4",children:r.jsxs("div",{className:"flex items-center space-x-3",children:[r.jsxs("div",{className:"flex-1",children:[r.jsx(pe,{htmlFor:"session-count",className:"text-sm text-gray-400 font-light",children:"Number of sessions"}),r.jsx(Te,{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"})]}),r.jsx($,{onClick:()=>{var le;const V=parseInt(((le=document.getElementById("session-count"))==null?void 0:le.value)||"3",10);we(V)},disabled:ee,className:"bg-transparent hover:bg-white/90 bg-white text-black border border-white/20 rounded-none mt-6 disabled:opacity-50",children:ee?r.jsxs(r.Fragment,{children:[r.jsx(gn,{className:"w-3 h-3 mr-2 animate-spin"}),"Seeding..."]}):r.jsxs(r.Fragment,{children:[r.jsx(ps,{className:"w-3 h-3 mr-2"}),"Seed Sessions"]})})]})}),ne.length>0&&r.jsx("div",{className:"mt-6",children:r.jsx(ji,{title:"Session Seeding Terminal",lines:ne,isRunning:ee,className:"w-full",defaultCollapsed:!0})})]}),r.jsx("hr",{className:"border-white/10 -mx-10 border-dashed mt-10"}),r.jsx("div",{className:"flex justify-end mt-6 pt-6",children:r.jsx($,{variant:"outline",onClick:()=>T(!1),className:"border border-dashed border-white/20 text-white hover:bg-white/10 rounded-none",children:"Close"})})]})}),E&&r.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50 overflow-hidden",children:r.jsxs("div",{className:"overflow-x-hidden overflow-y-auto bg-black/90 border border-white/10 p-6 w-full pt-4 max-w-2xl rounded-none max-h-[90vh]",children:[r.jsxs("div",{className:"flex items-center justify-between mb-6",children:[r.jsxs("h3",{className:"text-sm text-white flex items-center justify-center font-light uppercase",children:[r.jsx("span",{className:"text-white/50 mr-2",children:"["}),r.jsx(Xi,{className:"inline mr-2 w-3 h-3 text-white"}),r.jsx("span",{className:"font-mono text-white/70 uppercase",children:"Seed Accounts"}),r.jsx("span",{className:"text-white/50 ml-2",children:"]"})]}),r.jsx($,{variant:"ghost",size:"sm",onClick:()=>k(!1),className:"text-gray-400 hover:text-white rounded-none",children:r.jsx(xt,{className:"w-4 h-4"})})]}),r.jsx("hr",{className:"border-white/10 -mx-10 border-dashed -mt-4 mb-4"}),r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[r.jsxs("div",{children:[r.jsx(pe,{htmlFor:"account-count",className:"text-sm text-gray-400 font-light",children:"Number of accounts"}),r.jsx(Te,{id:"account-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"})]}),r.jsxs("div",{children:[r.jsx(pe,{htmlFor:"account-provider",className:"text-sm text-gray-400 font-light",children:"Provider"}),r.jsxs(Ua,{value:O,onValueChange:R,children:[r.jsx(Pa,{className:"mt-1 border border-dashed border-white/20 bg-black/30 text-white rounded-none",children:r.jsx(yi,{placeholder:"Select provider"})}),r.jsxs(Fa,{className:"bg-black border border-dashed border-white/20",children:[r.jsx(Ve,{value:"random",children:"Mix (Random)"}),r.jsx(Ve,{value:"github",children:"GitHub"}),r.jsx(Ve,{value:"google",children:"Google"}),r.jsx(Ve,{value:"discord",children:"Discord"}),r.jsx(Ve,{value:"facebook",children:"Facebook"}),r.jsx(Ve,{value:"twitter",children:"Twitter"}),r.jsx(Ve,{value:"linkedin",children:"LinkedIn"}),r.jsx(Ve,{value:"apple",children:"Apple"}),r.jsx(Ve,{value:"microsoft",children:"Microsoft"}),r.jsx(Ve,{value:"gitlab",children:"GitLab"}),r.jsx(Ve,{value:"bitbucket",children:"Bitbucket"}),r.jsx(Ve,{value:"spotify",children:"Spotify"}),r.jsx(Ve,{value:"twitch",children:"Twitch"}),r.jsx(Ve,{value:"reddit",children:"Reddit"}),r.jsx(Ve,{value:"slack",children:"Slack"}),r.jsx(Ve,{value:"notion",children:"Notion"}),r.jsx(Ve,{value:"tiktok",children:"TikTok"}),r.jsx(Ve,{value:"zoom",children:"Zoom"})]})]})]})]}),r.jsx($,{onClick:()=>{var le;const V=parseInt(((le=document.getElementById("account-count"))==null?void 0:le.value)||"3",10);Be(V,O)},disabled:ee,className:"bg-white hover:bg-white/90 text-black border border-white/20 rounded-none disabled:opacity-50",children:ee?r.jsxs(r.Fragment,{children:[r.jsx(gn,{className:"w-3 h-3 mr-2 animate-spin"}),"Seeding..."]}):r.jsxs(r.Fragment,{children:[r.jsx(Xi,{className:"w-3 h-3 mr-2"}),"Seed Accounts"]})})]}),ne.length>0&&r.jsx("div",{className:"mt-6",children:r.jsx(ji,{title:"Account Seeding Terminal",lines:ne,isRunning:ee,className:"w-full",defaultCollapsed:!0})})]}),r.jsx("hr",{className:"border-white/10 -mx-10 border-dashed mt-10"}),r.jsx("div",{className:"flex justify-end mt-6 pt-6",children:r.jsx($,{variant:"outline",onClick:()=>k(!1),className:"border border-dashed border-white/20 text-white hover:bg-white/10 rounded-none",children:"Close"})})]})})]}):r.jsx("div",{className:"min-h-screen bg-black flex items-center justify-center",children:r.jsx("div",{className:"text-white text-lg",children:"User not found"})})}function jue(){return r.jsx(YW,{children:r.jsxs(DB,{children:[r.jsx(zK,{children:r.jsxs(TB,{children:[r.jsx(Dn,{path:"/",element:r.jsx(Pte,{})}),r.jsx(Dn,{path:"/users",element:r.jsx(y5,{})}),r.jsx(Dn,{path:"/users/:userId",element:r.jsx(Aue,{})}),r.jsx(Dn,{path:"/organizations",element:r.jsx(x5,{})}),r.jsx(Dn,{path:"/organizations/:orgId",element:r.jsx(xue,{})}),r.jsx(Dn,{path:"/teams",element:r.jsx(wue,{})}),r.jsx(Dn,{path:"/teams/:teamId",element:r.jsx(GR,{})}),r.jsx(Dn,{path:"/organizations/:orgId/teams/:teamId",element:r.jsx(GR,{})}),r.jsx(Dn,{path:"/sessions",element:r.jsx(yue,{})}),r.jsx(Dn,{path:"/database",element:r.jsx(zte,{})}),r.jsx(Dn,{path:"/database/demo",element:r.jsx(VW,{})}),r.jsx(Dn,{path:"/emails",element:r.jsx(gue,{})}),r.jsx(Dn,{path:"/tools",element:r.jsx(Cue,{})}),r.jsx(Dn,{path:"/settings",element:r.jsx(vue,{})})]})}),r.jsx(dz,{className:"rounded-none border-dashed border-white/20",theme:"dark",position:"top-right",richColors:!0,toastOptions:{style:{border:"dashed 1px #ffffff20",borderRadius:"0"},className:"font-mono uppercase"},closeButton:!0})]})})}DF.createRoot(document.getElementById("root")).render(r.jsx(J.StrictMode,{children:r.jsx(jue,{})}));
|
|
1090
|
+
`)),className:"text-gray-400 hover:text-white rounded-none",children:[r.jsx(aa,{className:"w-4 h-4 mr-1"}),"Copy All"]})]}),r.jsx("div",{className:"border border-dashed border-white/10 p-3",children:r.jsx("div",{className:"space-y-2 max-h-64 overflow-y-auto",children:ln.map((z,Z)=>r.jsxs("div",{className:"flex items-center justify-between p-2 bg-black/40 border border-dashed border-white/10",children:[r.jsx("span",{className:"text-white font-mono text-xs break-all",children:z}),r.jsx($,{variant:"ghost",size:"sm",onClick:()=>Aa(z),className:"text-gray-400 hover:text-white rounded-none ml-2",children:r.jsx(aa,{className:"w-3 h-3"})})]},Z))})})]}),r.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4 text-xs font-mono",children:[r.jsxs("div",{className:"border border-dashed border-white/10 p-3 space-y-2",children:[r.jsx("div",{className:"text-gray-400 uppercase tracking-wider",children:"Version"}),r.jsx("p",{className:"text-white text-sm",children:"v4 (Random)"}),r.jsx("p",{className:"text-gray-500 text-xs",children:"Cryptographically random"})]}),r.jsxs("div",{className:"border border-dashed border-white/10 p-3 space-y-2",children:[r.jsx("div",{className:"text-gray-400 uppercase tracking-wider",children:"Format"}),r.jsx("p",{className:"text-white text-sm",children:"8-4-4-4-12"}),r.jsx("p",{className:"text-gray-500 text-xs",children:"36 characters"})]}),r.jsxs("div",{className:"border border-dashed border-white/10 p-3 space-y-2",children:[r.jsx("div",{className:"text-gray-400 uppercase tracking-wider",children:"Standard"}),r.jsx("p",{className:"text-white text-sm",children:"RFC 4122"}),r.jsx("p",{className:"text-gray-500 text-xs",children:"Universally unique"})]})]})]})]})}),Vr&&r.jsx("div",{className:"fixed inset-0 bg-black/80 flex items-center justify-center z-[60] overflow-hidden",children:r.jsxs("div",{className:"bg-black border border-dashed border-white/20 rounded-none p-6 w-full max-w-4xl max-h-[90vh] overflow-y-auto",children:[r.jsxs("div",{className:"flex items-center justify-between mb-6",children:[r.jsxs("div",{className:"flex items-center space-x-2",children:[r.jsx(Tl,{className:"w-5 h-5 text-white"}),r.jsx("h3",{className:"text-xl text-white font-light uppercase tracking-wider",children:"Password Strength Checker"})]}),r.jsx($,{variant:"ghost",size:"sm",onClick:()=>Do(!1),className:"text-gray-400 hover:text-white rounded-none",children:r.jsx(xt,{className:"w-4 h-4"})})]}),r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{children:[r.jsx(pe,{className:"text-xs uppercase font-mono text-gray-400 mb-2 block",children:"Password"}),r.jsxs("div",{className:"relative",children:[r.jsx(Te,{type:pr?"text":"password",value:As,onChange:z=>Ya(z.target.value),placeholder:"Enter password to check",className:"w-full bg-black border border-dashed border-white/20 text-white font-mono text-xs pr-10 rounded-none"}),r.jsx($,{variant:"ghost",size:"sm",onClick:()=>Kr(!pr),className:"absolute right-0 top-0 h-full px-3 text-gray-400 hover:text-white rounded-none",children:pr?r.jsx(Dh,{className:"w-4 h-4"}):r.jsx(gi,{className:"w-4 h-4"})})]})]}),r.jsxs("div",{className:"flex items-end justify-end space-x-2",children:[r.jsx($,{variant:"outline",onClick:()=>{Ya(""),Yr(null),Kr(!1)},className:"border border-dashed border-white/20 text-white hover:bg-white/10 rounded-none",children:"Clear"}),r.jsx($,{onClick:bU,disabled:Wr||!As.trim(),className:"rounded-none",children:Wr?r.jsxs(r.Fragment,{children:[r.jsx(gn,{className:"w-4 h-4 mr-2 animate-spin"}),"Checking..."]}):"Check Strength"})]}),kt&&r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4 text-xs font-mono",children:[r.jsxs("div",{className:"border border-dashed border-white/10 p-3 space-y-2",children:[r.jsx("div",{className:"text-gray-400 uppercase tracking-wider",children:"Strength"}),r.jsx("p",{className:`text-sm font-medium ${kt.strength==="very-strong"?"text-green-400":kt.strength==="strong"?"text-green-300":kt.strength==="good"?"text-yellow-300":kt.strength==="fair"?"text-orange-300":"text-red-300"}`,children:kt.strength.split("-").map(z=>z.charAt(0).toUpperCase()+z.slice(1)).join(" ")}),r.jsx("div",{className:"w-full bg-black/40 h-2 rounded-none",children:r.jsx("div",{className:`h-full transition-all ${kt.strength==="very-strong"?"bg-green-400 w-full":kt.strength==="strong"?"bg-green-300 w-4/5":kt.strength==="good"?"bg-yellow-300 w-3/5":kt.strength==="fair"?"bg-orange-300 w-2/5":"bg-red-300 w-1/5"}`})})]}),r.jsxs("div",{className:"border border-dashed border-white/10 p-3 space-y-2",children:[r.jsx("div",{className:"text-gray-400 uppercase tracking-wider",children:"Score"}),r.jsxs("p",{className:"text-white text-sm",children:[kt.score," / 5"]}),r.jsx("p",{className:"text-gray-500 text-xs",children:kt.score===5?"Excellent":kt.score===4?"Very Good":kt.score===3?"Good":kt.score===2?"Fair":"Weak"})]}),r.jsxs("div",{className:"border border-dashed border-white/10 p-3 space-y-2",children:[r.jsx("div",{className:"text-gray-400 uppercase tracking-wider",children:"Config Match"}),r.jsx("p",{className:`text-sm ${kt.meetsConfig?"text-green-400":"text-red-300"}`,children:kt.meetsConfig?"✓ Meets Requirements":"✗ Fails Requirements"}),r.jsxs("p",{className:"text-gray-500 text-xs",children:[kt.configRequirements.minLength," -"," ",kt.configRequirements.maxLength," chars"]})]})]}),r.jsxs("div",{className:"border border-dashed border-white/10 p-3",children:[r.jsx("div",{className:"text-xs uppercase font-mono text-gray-400 mb-3",children:"Checks"}),r.jsx("div",{className:"space-y-2",children:kt.checks.map((z,Z)=>r.jsxs("div",{className:"flex items-center justify-between p-2 bg-black/40 border border-dashed border-white/10",children:[r.jsx("span",{className:"text-white font-mono text-xs",children:z.name}),r.jsxs("div",{className:"flex items-center space-x-2",children:[r.jsx("span",{className:`text-xs font-mono ${z.passed?"text-green-400":"text-red-300"}`,children:z.passed?"✓":"✗"}),r.jsx("span",{className:"text-xs text-gray-400 font-mono",children:z.message})]})]},Z))})]})]})]})]})}),mr&&r.jsx("div",{className:"fixed inset-0 bg-black/80 flex items-center justify-center z-[60] overflow-hidden",children:r.jsxs("div",{className:"bg-black border border-dashed border-white/20 rounded-none p-6 w-full max-w-4xl max-h-[90vh] overflow-y-auto",children:[r.jsxs("div",{className:"flex items-center justify-between mb-6",children:[r.jsxs("div",{className:"flex items-center space-x-2",children:[r.jsx(Yn,{className:"w-5 h-5 text-white"}),r.jsx("h3",{className:"text-xl text-white font-light uppercase tracking-wider",children:"OAuth Credentials"})]}),r.jsx($,{variant:"ghost",size:"sm",onClick:()=>Wa(!1),className:"text-gray-400 hover:text-white rounded-none",children:r.jsx(xt,{className:"w-4 h-4"})})]}),r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{children:[r.jsx(pe,{className:"text-xs uppercase font-mono text-gray-400 mb-2 block",children:"Select Provider"}),r.jsx("div",{className:"flex flex-wrap gap-3",children:["google","github"].map(z=>{const Z=f===z;return r.jsx("button",{onClick:()=>p(z),className:`px-4 py-2 border rounded-none text-sm uppercase font-mono transition-colors ${Z?"border-white/60 bg-white/10 text-white":"border-dashed border-white/20 text-gray-400 hover:border-white/40"}`,children:z.charAt(0).toUpperCase()+z.slice(1)},z)})})]}),r.jsxs("div",{children:[r.jsx(pe,{className:"text-xs uppercase font-mono text-gray-400 mb-2 block",children:"Origin"}),r.jsx(Te,{value:Fn,onChange:z=>Bn(z.target.value),placeholder:`http://${Ea}`,className:"bg-black border border-dashed border-white/20 text-white font-mono text-xs rounded-none"}),r.jsxs("p",{className:"text-[11px] text-gray-500 font-mono mt-1",children:["The default will be http://",Ea]})]}),r.jsxs("div",{className:"flex items-end justify-end space-x-2",children:[r.jsx($,{variant:"outline",onClick:()=>{Jn(null),Bn(Ea)},className:"border border-dashed border-white/20 text-white hover:bg-white/10 rounded-none",children:"Clear"}),r.jsx($,{onClick:wU,disabled:Xa||!f||!Fn.trim()&&!Ea,className:"rounded-none",children:Xa?r.jsxs(r.Fragment,{children:[r.jsx(gn,{className:"w-4 h-4 mr-2 animate-spin"}),"Fetching..."]}):"Fetch Credentials"})]}),Qn&&r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[r.jsxs("div",{children:[r.jsx(pe,{className:"text-xs uppercase font-mono text-gray-400 mb-2 block",children:"Client ID"}),r.jsxs("div",{className:"relative",children:[r.jsx(Te,{value:Qn.clientId,readOnly:!0,className:"bg-black border border-dashed border-white/20 text-white font-mono text-xs pr-10 rounded-none"}),r.jsx($,{variant:"ghost",size:"sm",onClick:()=>Aa(Qn.clientId),className:"absolute right-0 top-0 h-full px-3 text-gray-400 hover:text-white rounded-none",children:r.jsx(aa,{className:"w-4 h-4"})})]})]}),r.jsxs("div",{children:[r.jsx(pe,{className:"text-xs uppercase font-mono text-gray-400 mb-2 block",children:"Client Secret"}),r.jsxs("div",{className:"relative",children:[r.jsx(Te,{type:_s?"text":"password",value:Qn.clientSecret,readOnly:!0,className:"bg-black border border-dashed border-white/20 text-white font-mono text-xs pr-20 rounded-none"}),r.jsxs("div",{className:"absolute right-0 top-0 h-full flex items-center",children:[r.jsx($,{variant:"ghost",size:"sm",onClick:()=>Io(!_s),className:"px-2 text-gray-400 hover:text-white rounded-none",children:_s?r.jsx(Dh,{className:"w-4 h-4"}):r.jsx(gi,{className:"w-4 h-4"})}),r.jsx($,{variant:"ghost",size:"sm",onClick:()=>Aa(Qn.clientSecret),className:"px-2 text-gray-400 hover:text-white rounded-none",children:r.jsx(aa,{className:"w-4 h-4"})})]})]})]})]}),r.jsxs("div",{className:"flex items-center justify-between pt-2 border-t border-dashed border-white/10",children:[r.jsx("div",{className:"flex-1",children:dt&&r.jsx("div",{className:"text-xs font-mono",children:dt.success?r.jsxs("span",{className:"text-green-400 uppercase",children:["✓ ",dt.message.toLowerCase(),r.jsxs("span",{className:"block normal-case text-gray-400",children:[r.jsx("span",{className:"text-gray-400 mr-1",children:">"})," ",dt.path]})]}):r.jsxs("span",{className:"text-red-300",children:["✗ ",dt.message]})})}),r.jsx($,{onClick:NU,disabled:Rs||Mo,className:"rounded-none",children:Mo?r.jsxs(r.Fragment,{children:[r.jsx(gn,{className:"w-4 h-4 mr-2 animate-spin"}),"Checking..."]}):Rs?r.jsxs(r.Fragment,{children:[r.jsx(gn,{className:"w-4 h-4 mr-2 animate-spin"}),"Writing..."]}):r.jsxs(r.Fragment,{children:[r.jsx($m,{className:"w-4 h-4 mr-2"}),"Write to .env"]})})]})]})]})]})}),Ds&&r.jsx("div",{className:"fixed inset-0 bg-black/80 flex items-center justify-center z-[60] overflow-hidden",children:r.jsxs("div",{className:"bg-black border border-dashed border-white/20 rounded-none p-6 w-full max-w-4xl max-h-[90vh] overflow-y-auto",children:[r.jsxs("div",{className:"flex items-center justify-between mb-6",children:[r.jsxs("div",{className:"flex items-center space-x-2",children:[r.jsx(Zi,{className:"w-5 h-5 text-white"}),r.jsx("h3",{className:"text-xl text-white font-light uppercase tracking-wider",children:"Secret Generator"})]}),r.jsx($,{variant:"ghost",size:"sm",onClick:()=>ye(!1),className:"text-gray-400 hover:text-white rounded-none",children:r.jsx(xt,{className:"w-4 h-4"})})]}),r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[r.jsxs("div",{children:[r.jsx(pe,{className:"text-xs uppercase font-mono text-gray-400 mb-2 block",children:"Length (bytes)"}),r.jsx(Te,{type:"number",value:Le,onChange:z=>{const Z=parseInt(z.target.value,10);Z>=16&&Z<=128&&Oe(Z)},min:"16",max:"128",className:"bg-black border border-dashed border-white/20 text-white font-mono text-xs rounded-none"}),r.jsx("p",{className:"text-[11px] text-gray-500 font-mono mt-1",children:"Recommended: 32 bytes (256 bits)"})]}),r.jsxs("div",{children:[r.jsx(pe,{className:"text-xs uppercase font-mono text-gray-400 mb-2 block",children:"Format"}),r.jsx("div",{className:"flex gap-3",children:[{id:"hex",label:"Hex"},{id:"base64",label:"Base64"}].map(z=>r.jsx("button",{onClick:()=>nt(z.id),className:`px-4 py-2 border rounded-none text-sm uppercase font-mono transition-colors flex-1 ${Ce===z.id?"border-white/60 bg-white/10 text-white":"border-dashed border-white/20 text-gray-400 hover:border-white/40"}`,children:z.label},z.id))})]})]}),r.jsxs("div",{className:"flex justify-end space-x-2",children:[r.jsx($,{variant:"outline",onClick:()=>{Ee(null),Oe(32),nt("hex")},className:"border border-dashed border-white/20 text-white hover:bg-white/10 rounded-none",children:"Clear"}),r.jsx($,{onClick:yU,disabled:de,className:"rounded-none",children:de?r.jsxs(r.Fragment,{children:[r.jsx(gn,{className:"w-4 h-4 mr-2 animate-spin"}),"Generating..."]}):"Generate Secret"})]}),ve&&r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4 text-xs font-mono",children:[r.jsxs("div",{className:"border border-dashed border-white/10 p-3 space-y-2",children:[r.jsx("div",{className:"text-gray-400 uppercase tracking-wider",children:"Length"}),r.jsxs("p",{className:"text-white text-sm",children:[ve.length," bytes"]})]}),r.jsxs("div",{className:"border border-dashed border-white/10 p-3 space-y-2",children:[r.jsx("div",{className:"text-gray-400 uppercase tracking-wider",children:"Entropy"}),r.jsxs("p",{className:"text-white text-sm",children:[ve.entropy," bits"]})]}),r.jsxs("div",{className:"border border-dashed border-white/10 p-3 space-y-2",children:[r.jsx("div",{className:"text-gray-400 uppercase tracking-wider",children:"Format"}),r.jsx("p",{className:"text-white text-sm uppercase",children:ve.format})]})]}),r.jsxs("div",{children:[r.jsx(pe,{className:"text-xs uppercase font-mono text-gray-400 mb-2 block",children:"Generated Secret"}),r.jsxs("div",{className:"relative",children:[r.jsx(Te,{value:ve.secret,readOnly:!0,className:"bg-black border border-dashed border-white/20 text-white font-mono text-xs pr-10 rounded-none"}),r.jsx($,{variant:"ghost",size:"sm",onClick:()=>Aa(ve.secret),className:"absolute right-0 top-0 h-full px-3 text-gray-400 hover:text-white rounded-none",children:r.jsx(aa,{className:"w-3 h-3"})})]})]}),r.jsxs("div",{children:[r.jsx(pe,{className:"text-xs uppercase font-mono text-gray-400 mb-2 block",children:"Environment Variable Format"}),r.jsxs("div",{className:"relative",children:[r.jsx(Te,{value:ve.envFormat,readOnly:!0,className:"bg-black border border-dashed border-white/20 text-white font-mono text-xs pr-10 rounded-none"}),r.jsx($,{variant:"ghost",size:"sm",onClick:()=>Aa(ve.envFormat),className:"absolute right-0 top-0 h-full px-3 text-gray-400 hover:text-white rounded-none",children:r.jsx(aa,{className:"w-3 h-3"})})]}),r.jsxs("p",{className:"text-[11px] text-gray-500 font-mono mt-2",children:["Add this to your ",r.jsx("code",{className:"text-gray-400",children:".env"})," file. Keep it secret and never commit it to version control."]})]}),r.jsx("div",{className:"border border-dashed border-white/20 bg-black text-gray-300 text-xs font-mono p-3 rounded-none",children:r.jsxs("div",{className:"flex items-start space-x-2",children:[r.jsx(eh,{className:"w-4 h-4 mt-0.5 flex-shrink-0 text-gray-400"}),r.jsxs("div",{children:[r.jsx("div",{className:"uppercase font-mono mb-2 text-gray-400 tracking-wider",children:"Security Best Practices"}),r.jsxs("ul",{className:"list-disc list-inside space-y-1 text-[11px] text-gray-300",children:[r.jsx("li",{children:"Use a minimum of 32 bytes (256 bits) for production"}),r.jsx("li",{children:"Store secrets in environment variables, never in code"}),r.jsx("li",{children:"Use different secrets for development and production"}),r.jsx("li",{children:"Rotate secrets periodically for enhanced security"})]})]})]})})]})]})]})}),br&&Zr&&r.jsx("div",{className:"fixed inset-0 bg-black/80 flex items-center justify-center z-[70] overflow-hidden",children:r.jsxs("div",{className:"bg-black border border-dashed border-white/20 rounded-none p-6 w-full max-w-2xl",children:[r.jsxs("div",{className:"flex items-center justify-between mb-6",children:[r.jsxs("div",{className:"flex items-center space-x-2",children:[r.jsx(eh,{className:"w-5 h-5 text-yellow-400"}),r.jsx("h3",{className:"text-xl text-white font-light uppercase tracking-wider",children:"Overwrite Existing Credentials?"})]}),r.jsx($,{variant:"ghost",size:"sm",onClick:()=>{Os(!1),Ta(null),xr(!1)},className:"text-gray-400 hover:text-white rounded-none",children:r.jsx(xt,{className:"w-4 h-4"})})]}),r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{className:"border border-dashed border-white/20 p-4",children:[r.jsxs("p",{className:"text-sm border-b border-dashed border-white/20 pb-5 text-gray-300 font-mono mb-3",children:["The following"," ",r.jsx("span",{className:"text-white uppercase",children:(f==null?void 0:f.charAt(0).toUpperCase())+(f==null?void 0:f.slice(1))})," ","credentials already exist in"," ",r.jsx("span",{className:"text-gray-400 normal-case",children:Zr.path}),":"]}),r.jsx("div",{className:"space-y-2 pt-2",children:Object.entries(Zr.credentials).map(([z,Z])=>r.jsxs("div",{className:"flex items-center justify-between text-xs font-mono",children:[r.jsx("span",{className:"text-gray-400 uppercase",children:z}),r.jsx("span",{className:"text-gray-500",children:Z.length>20?`${Z.substring(0,20)}...`:Z})]},z))})]}),r.jsxs("div",{className:"flex items-center justify-end space-x-3 pt-4 border-t border-dashed border-white/10",children:[r.jsx($,{variant:"outline",onClick:()=>{Os(!1),Ta(null),xr(!1)},className:"border border-dashed border-white/20 text-white hover:bg-white/10 rounded-none",children:"No, Cancel"}),r.jsx($,{variant:"outline",onClick:()=>Yp("append"),disabled:Rs,className:"border border-dashed border-white/20 text-white hover:bg-white/10 rounded-none",children:"Append"}),r.jsx($,{onClick:()=>Yp("override"),disabled:Rs,className:"rounded-none",children:Rs?r.jsxs(r.Fragment,{children:[r.jsx(gn,{className:"w-4 h-4 mr-2 animate-spin"}),"Writing..."]}):"Yes, Overwrite"})]})]})]})})]})}function Aue(){const{userId:e}=i1(),t=ur(),[n,a]=m.useState(null),[s,i]=m.useState([]),[o,l]=m.useState([]),[c,u]=m.useState([]),[h,d]=m.useState([]),[f,p]=m.useState(!0),[v,x]=m.useState("details"),[N,b]=m.useState(!1),[y,g]=m.useState(!1),[w,S]=m.useState(!1),[C,T]=m.useState(!1),[E,k]=m.useState(!1),[O,R]=m.useState("random"),[I,F]=m.useState(!1),[j,U]=m.useState(!1),[_,M]=m.useState(!1),[A,D]=m.useState(""),[B,G]=m.useState(),[L,q]=m.useState(!1),[X,K]=m.useState(""),[ne,te]=m.useState([]),[ee,ae]=m.useState(!1),[ge,se]=m.useState({}),fe=m.useRef({}),me=m.useCallback(async()=>{try{const le=await(await fetch("/api/admin/status")).json();q(le.enabled)}catch{q(!1)}},[]),Re=m.useCallback(async V=>{try{const le=await fetch("/api/geo/resolve",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({ipAddress:V})});if(le.ok){const he=await le.json();if(he.success&&he.location)return he.location}return null}catch{return null}},[]),Me=m.useCallback(async V=>{const le=V.filter(De=>!fe.current[De.id]);if(le.length===0)return;const he=await Promise.all(le.map(async De=>{const Ye=await Re(De.ipAddress);return Ye?{sessionId:De.id,location:Ye}:null})),xe={};he.forEach(De=>{De&&(xe[De.sessionId]=De.location)}),Object.keys(xe).length>0&&(fe.current={...fe.current,...xe},se(fe.current))},[Re]),Ue=V=>{if(!V)return"🌍";const le=V.toUpperCase().split("").map(he=>127397+he.charCodeAt(0));return String.fromCodePoint(...le)},$e=V=>V?V.replace(/[_-]/g," ").replace(/\b\w/g,le=>le.toUpperCase()):"Unknown Provider",pt=V=>{if(!V)return"Unknown";const le=new Date(V);return Number.isNaN(le.getTime())?"Unknown":le.toLocaleString("en-US",{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})},Ge=m.useCallback(async()=>{try{const V=await fetch(`/api/users/${e}`);if(V.ok){const le=await V.json();a(le.user)}else H.error("Failed to fetch user details"),t("/users")}catch{H.error("Failed to fetch user details"),t("/users")}finally{p(!1)}},[e,t]),jt=m.useCallback(async()=>{try{const[V,le,he]=await Promise.all([fetch(`/api/users/${e}/organizations`),fetch(`/api/users/${e}/teams`),fetch(`/api/users/${e}/sessions`)]);if(V.ok){const xe=await V.json();i(xe.memberships||[])}if(le.ok){const xe=await le.json();l(xe.memberships||[])}if(he.ok){const De=(await he.json()).sessions||[];u(De),Me(De)}}catch{}},[e,Me]),vt=m.useCallback(async()=>{try{const V=await fetch(`/api/users/${e}/accounts`);if(V.ok){const le=await V.json();d(le.accounts||[])}}catch{}},[e]),We=async()=>{var xe,De;if(!n)return;const V=(xe=document.getElementById("edit-name"))==null?void 0:xe.value,le=(De=document.getElementById("edit-email"))==null?void 0:De.value;if(!V||!le){H.error("Please fill in all fields");return}const he=H.loading("Updating user...");try{const Q=await(await fetch(`/api/users/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:V,email:le,role:X||null})})).json();Q.success?(a({...n,name:V,email:le,role:X||void 0}),b(!1),K(""),H.success("User updated successfully!",{id:he})):H.error(`Error updating user: ${Q.error||"Unknown error"}`,{id:he})}catch{H.error("Error updating user",{id:he})}},et=async()=>{if(!n)return;const V=H.loading("Deleting user...");try{const he=await(await fetch(`/api/users/${e}`,{method:"DELETE",headers:{"Content-Type":"application/json"}})).json();he.success?(H.success("User deleted successfully!",{id:V}),t("/users")):H.error(`Error deleting user: ${he.error||"Unknown error"}`,{id:V})}catch{H.error("Error deleting user",{id:V})}},Ze=async()=>{if(!n)return;if(!L){H.error("Admin plugin is not enabled. Please enable the admin plugin in your Better Auth configuration to use ban functionality.");return}const V=H.loading("Banning user...");try{const le=await fetch("/api/admin/ban-user",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({userId:e,banReason:A||"No reason provided",banExpiresIn:B})}),he=await le.json();le.ok?(H.success("User banned successfully!",{id:V}),g(!1),D(""),G(void 0),Ge()):le.status===403?H.error("You do not have permission to ban users. Admin role required.",{id:V}):he.adminPluginEnabled&&he.instructions?H.error(`${he.error}`,{id:V,duration:6e3,description:`Use: ${he.instructions.example}`}):H.error(`Error banning user: ${he.error||he.message||"Unknown error"}`,{id:V})}catch{H.error("Error banning user",{id:V})}},Et=async()=>{if(!n)return;if(!L){H.error("Admin plugin is not enabled. Please enable the admin plugin in your Better Auth configuration to use unban functionality.");return}const V=H.loading("Unbanning user...");try{const le=await fetch("/api/admin/unban-user",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({userId:e})}),he=await le.json();le.ok?(H.success("User unbanned successfully!",{id:V}),S(!1),Ge()):le.status===403?H.error("You do not have permission to unban users. Admin role required.",{id:V}):he.adminPluginEnabled&&he.instructions?H.error(`${he.error}`,{id:V,duration:6e3,description:`Use: ${he.instructions.example}`}):H.error(`Error unbanning user: ${he.error||he.message||"Unknown error"}`,{id:V})}catch{H.error("Error unbanning user",{id:V})}},Tt=async V=>{const le=H.loading("Removing user from organization...");try{const xe=await(await fetch(`/api/organizations/members/${V}`,{method:"DELETE"})).json();xe.success?(i(De=>De.filter(Ye=>Ye.id!==V)),jt(),H.success("User removed from organization!",{id:le})):H.error(`Error removing user: ${xe.error||"Unknown error"}`,{id:le})}catch{H.error("Error removing user from organization",{id:le})}},qt=async V=>{const le=H.loading("Removing user from team...");try{const xe=await(await fetch(`/api/teams/members/${V}`,{method:"DELETE"})).json();xe.success?(l(De=>De.filter(Ye=>Ye.id!==V)),jt(),H.success("User removed from team!",{id:le})):H.error(`Error removing user: ${xe.error||"Unknown error"}`,{id:le})}catch{H.error("Error removing user from team",{id:le})}},Wt=async V=>{const le=H.loading("Deleting session...");try{const xe=await(await fetch(`/api/sessions/${V}`,{method:"DELETE"})).json();xe.success?(u(De=>De.filter(Ye=>Ye.id!==V)),H.success("Session deleted successfully!",{id:le})):H.error(`Error deleting session: ${xe.error||"Unknown error"}`,{id:le})}catch{H.error("Error deleting session",{id:le})}},re=async V=>{if(!e)return;const le=H.loading("Unlinking account...");try{const he=await fetch(`/api/users/${e}/accounts/${V}`,{method:"DELETE"}),xe=await he.json();he.ok&&xe.success?(d(De=>De.filter(Ye=>Ye.id!==V)),await vt(),H.success("Account unlinked successfully",{id:le})):H.error(xe.error||"Failed to unlink account",{id:le})}catch{H.error("Failed to unlink account",{id:le})}};m.useEffect(()=>{e&&(Ge(),jt(),vt(),me())},[e,me,Ge,jt,vt]);const we=async(V=3)=>{if(e){te([]),ae(!0),te([{id:"start",type:"info",message:`Starting session seeding process for ${V} sessions...`,timestamp:new Date}]);try{const he=await(await fetch(`/api/users/${e}/seed-sessions`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({count:V})})).json();if(he.success){const xe=he.results.map((Ye,Q)=>Ye.success?{id:`session-${Q}`,type:"progress",message:`Creating session ${Q+1}: ${Ye.session.token.substring(0,20)}... from ${Ye.session.ipAddress}`,timestamp:new Date,status:"completed"}:{id:`session-${Q}`,type:"error",message:`Failed to create session ${Q+1}: ${Ye.error}`,timestamp:new Date});te(Ye=>[...Ye,...xe]);const De=he.results.filter(Ye=>Ye.success).length;te(Ye=>[...Ye,{id:"complete",type:"success",message:`✅ Session seeding completed! Created ${De}/${V} sessions successfully`,timestamp:new Date}]),jt()}else te(xe=>[...xe,{id:"error",type:"error",message:`❌ Session seeding failed: ${he.error||"Unknown error"}`,timestamp:new Date}])}catch(le){te(he=>[...he,{id:"error",type:"error",message:`❌ Network error: ${le}`,timestamp:new Date}])}finally{ae(!1)}}},Be=async(V=3,le="random")=>{if(e){te([]),ae(!0),te([{id:"start",type:"info",message:`Starting account seeding process for ${V} accounts...`,timestamp:new Date}]);try{const xe=await(await fetch(`/api/users/${e}/seed-accounts`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({count:V,providerId:le})})).json();if(xe.success){const De=xe.results.map((Q,ie)=>{var Ne;return Q.success?{id:`account-${ie}`,type:"progress",message:`Creating account ${ie+1}: ${Q.account.providerId||Q.account.provider} (${((Ne=Q.account.accountId)==null?void 0:Ne.substring(0,20))||Q.account.id.substring(0,20)}...)`,timestamp:new Date,status:"completed"}:{id:`account-${ie}`,type:"error",message:`Failed to create account ${ie+1}: ${Q.error}`,timestamp:new Date}});te(Q=>[...Q,...De]);const Ye=xe.results.filter(Q=>Q.success).length;te(Q=>[...Q,{id:"complete",type:"success",message:`✅ Account seeding completed! Created ${Ye}/${V} accounts successfully`,timestamp:new Date}]),vt()}else te(De=>[...De,{id:"error",type:"error",message:`❌ Account seeding failed: ${xe.error||"Unknown error"}`,timestamp:new Date}])}catch(he){te(xe=>[...xe,{id:"error",type:"error",message:`❌ Network error: ${he}`,timestamp:new Date}])}finally{ae(!1)}}};return f?r.jsx("div",{className:"min-h-screen bg-black flex items-center justify-center",children:r.jsx("div",{className:"text-white text-lg",children:"Loading user details..."})}):n?r.jsxs("div",{className:"space-y-6 p-6 bg-black w-full",children:[r.jsxs("div",{className:"w-full flex flex-col",children:[r.jsx("span",{className:"mb-4 ml-0 flex justify-start items-start text-left border-none text-white",children:r.jsxs("span",{className:"font-light",children:[r.jsxs("span",{onClick:()=>t("/users"),className:"uppercase cursor-pointer text-white/80 font-mono text-sm",children:["users /"," "]}),r.jsx("span",{className:"text-white font-mono text-sm",children:n.id})]})}),r.jsx("div",{className:"mb-8 mt-4",children:r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsxs("div",{className:"flex items-center space-x-4",children:[r.jsx("div",{className:"w-16 h-16 bg-gray-800 border border-dashed border-white/20 flex items-center justify-center",children:n.image?r.jsx("img",{src:n.image,alt:n.name,className:"w-16 h-16 object-cover"}):r.jsx(Mc,{className:"w-8 h-8 text-white"})}),r.jsxs("div",{children:[r.jsxs("h1",{className:"text-3xl font-light text-white inline-flex items-center",children:[n.name,r.jsx(Ln,{id:n.id,variant:"subscript"}),n.role&&r.jsx("sup",{className:"ml-2 px-2 pt-2 pb-2 -mt-1 py-0.5 text-[10px] font-mono uppercase border border-dashed border-white/15 bg-white/5 text-white/80 rounded-none",children:n.role}),n.banned&&r.jsxs("sup",{className:"relative group inline-block ml-2 px-2 pt-2 pb-2 -mt-1 py-0.5 text-[10px] font-mono uppercase border border-dashed border-red-500/30 bg-red-500/10 text-red-400/80 rounded-none cursor-help",children:["Banned",n.banReason&&r.jsxs("span",{className:"absolute lowercase left-1/2 -translate-x-1/2 bottom-full mb-3 px-2 py-2 text-[10px] font-mono text-gray-300 bg-black border border-dashed border-white/20 rounded-none whitespace-nowrap opacity-0 invisible group-hover:opacity-100 group-hover:visible transition-all duration-150 pointer-events-none z-50",children:[r.jsx("span",{className:"text-gray-400 font-mono text-xs uppercase mr-1",children:"Banned Reason:"}),n.banReason,r.jsx("span",{className:"absolute left-1/2 -translate-x-1/2 top-full w-0 h-0 border-l-[4px] border-r-[4px] border-t-[4px] border-transparent border-t-white/20"})]})]})]}),r.jsx("p",{className:"text-gray-400 font-mono text-sm",children:n.email})]})]}),r.jsx("div",{className:"flex items-center space-x-2",children:r.jsxs("div",{className:"relative",children:[r.jsx($,{variant:"ghost",size:"sm",className:"text-gray-400 hover:text-white rounded-none",onClick:V=>{V.stopPropagation(),M(!_)},children:r.jsx(WM,{className:"w-4 h-4"})}),_&&r.jsxs("div",{className:"absolute z-[999] right-0 top-full mt-1 w-48 bg-black border border-white/20 rounded-none shadow-lg",onClick:V=>V.stopPropagation(),children:[r.jsxs("button",{className:"w-full px-4 py-2 text-left text-sm text-white hover:bg-white/10 flex items-center space-x-2",onClick:V=>{V.stopPropagation(),M(!1),b(!0),K(n.role||"")},children:[r.jsx(bo,{className:"w-4 h-4"}),r.jsx("span",{children:"Edit User"})]}),r.jsxs("button",{className:"w-full px-4 py-2 text-left text-sm text-white hover:bg-white/10 flex items-center space-x-2",onClick:V=>{V.stopPropagation(),M(!1),F(!0)},children:[r.jsx(Cn,{className:"w-4 h-4"}),r.jsx("span",{children:"Update Password"})]}),L&&(n.banned?r.jsxs("button",{className:"w-full px-4 py-2 text-left text-sm text-green-400 hover:bg-white/10 flex items-center space-x-2",onClick:V=>{V.stopPropagation(),M(!1),S(!0)},children:[r.jsx(hg,{className:"w-4 h-4"}),r.jsx("span",{children:"Unban User"})]}):r.jsxs("button",{className:"w-full px-4 py-2 text-left text-sm text-yellow-400 hover:bg-white/10 flex items-center space-x-2",onClick:V=>{V.stopPropagation(),M(!1),g(!0)},children:[r.jsx(hg,{className:"w-4 h-4"}),r.jsx("span",{children:"Ban User"})]})),r.jsx("div",{className:"border-t border-white/10 my-1"}),r.jsxs("button",{className:"w-full px-4 py-2 text-left text-sm text-red-400 hover:bg-white/10 flex items-center space-x-2",onClick:V=>{V.stopPropagation(),M(!1),U(!0)},children:[r.jsx(xu,{className:"w-4 h-4"}),r.jsx("span",{children:"Delete User"})]})]})]})})]})}),r.jsxs("div",{className:"border border-dashed border-white/20 rounded-none",children:[r.jsx("div",{className:"border-b border-dashed border-white/20",children:r.jsx("nav",{className:"flex space-x-8 px-6",children:[{id:"details",name:"Details",icon:Mc},{id:"organizations",name:"Organizations",icon:ha,count:s.length},{id:"teams",name:"Teams",icon:Ct,count:o.length},{id:"accounts",name:"Accounts",icon:Xi,count:h.length},{id:"sessions",name:"Sessions",icon:Iw,count:c.length}].map(V=>r.jsxs("button",{onClick:()=>x(V.id),className:`flex items-center space-x-2 py-4 px-2 border-b-2 font-medium text-sm ${v===V.id?"border-white text-white":"border-transparent text-gray-400 hover:text-white hover:border-white/50"}`,children:[r.jsx(V.icon,{className:"w-4 h-4 text-white/90"}),r.jsxs("span",{className:"inline-flex items-start",children:[r.jsx("span",{className:"",children:V.name}),V.count!==void 0&&r.jsx("sup",{className:"text-xs text-gray-500 ml-1 inline-flex items-baseline",children:r.jsx(rr,{value:V.count,className:"text-white/80 font-mono text-xs",prefix:r.jsx("span",{className:"mr-0.5 text-gray-500",children:"["}),suffix:r.jsx("span",{className:"ml-0.5 text-gray-500",children:"]"}),format:{notation:"standard",maximumFractionDigits:0}})})]})]},V.id))})}),r.jsxs("div",{className:"p-6",children:[v==="details"&&r.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[r.jsxs("div",{className:"overflow-x-hidden bg-white/[3%] border border-white/10 p-6 rounded-none",children:[r.jsx("h3",{className:"text-sm uppercase font-mono text-gray-400 mb-4 tracking-wider",children:"BASIC INFORMATION"}),r.jsx("hr",{className:"border-white/10 -mx-10 border-dashed my-4"}),r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{className:"flex items-start space-x-3",children:[r.jsx(Mc,{className:"w-4 h-4 text-gray-400 mt-1"}),r.jsxs("div",{className:"flex-1",children:[r.jsx("div",{className:"text-xs uppercase font-mono text-gray-500 mb-1",children:"Name"}),r.jsx("div",{className:"text-white font-sans text-sm",children:n.name})]})]}),r.jsxs("div",{className:"flex items-start space-x-3",children:[r.jsx(as,{className:"w-4 h-4 text-gray-400 mt-1"}),r.jsxs("div",{className:"flex-1",children:[r.jsx("div",{className:"text-xs uppercase font-mono text-gray-500 mb-1",children:"Email"}),r.jsx("div",{className:"text-white font-mono text-sm",children:n.email})]})]}),n.username&&r.jsxs("div",{className:"flex items-start space-x-3",children:[r.jsx(gte,{className:"w-4 h-4 text-gray-400 mt-1"}),r.jsxs("div",{className:"flex-1",children:[r.jsx("div",{className:"text-xs uppercase font-mono text-gray-500 mb-1",children:"Username"}),r.jsx("div",{className:"text-white font-mono text-sm",children:n.username})]})]}),n.phoneNumber&&r.jsxs("div",{className:"flex items-start space-x-3",children:[r.jsx(mte,{className:"w-4 h-4 text-gray-400 mt-1"}),r.jsxs("div",{className:"flex-1",children:[r.jsx("div",{className:"text-xs uppercase font-mono text-gray-500 mb-1",children:"Phone"}),r.jsx("div",{className:"text-white font-mono text-sm",children:"+251 91 234 5678"})]})]}),r.jsxs("div",{className:"flex items-start space-x-3",children:[r.jsx(Za,{className:"w-4 h-4 text-gray-400 mt-1"}),r.jsxs("div",{className:"flex-1",children:[r.jsx("div",{className:"text-xs uppercase font-mono text-gray-500 mb-1",children:"Member Since"}),r.jsx("div",{className:"text-white font-mono text-sm",children:new Date(n.createdAt).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit"})})]})]})]})]}),r.jsxs("div",{className:"overflow-x-hidden bg-white/[3%] border border-white/10 p-6 rounded-none",children:[r.jsx("h3",{className:"text-sm uppercase font-mono text-gray-400 mb-4 tracking-wider",children:"SECURITY"}),r.jsx("hr",{className:"border-white/10 -mx-10 border-dashed my-4"}),r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{className:"flex items-center justify-between p-3 bg-black/30 border border-white/10 rounded-none",children:[r.jsxs("div",{className:"flex items-center space-x-3",children:[r.jsx(as,{className:"w-4 h-4 text-gray-400"}),r.jsx("div",{children:r.jsx("div",{className:"text-xs uppercase font-mono text-gray-500",children:"Email Verification"})})]}),r.jsx("div",{className:`px-2 rounded-none border border-dashed border-white/20 uppercase py-1 text-xs font-mono ${n.emailVerified?"bg-green-500/20 text-green-400":"bg-red-500/20 text-red-400"}`,children:n.emailVerified?"Verified":"Unverified"})]}),r.jsxs("div",{className:"flex items-center justify-between p-3 bg-black/30 border border-white/10 rounded-none",children:[r.jsxs("div",{className:"flex items-center space-x-3",children:[r.jsx(ps,{className:"w-4 h-4 text-gray-400"}),r.jsx("div",{children:r.jsx("div",{className:"text-xs uppercase font-mono text-gray-500",children:"Two-Factor Authentication"})})]}),r.jsx("div",{className:`px-2 rounded-none border border-dashed border-white/20 uppercase py-1 text-xs font-mono ${n.twoFactorEnabled?"bg-green-500/20 text-green-400":"bg-red-500/20 text-red-400"}`,children:n.twoFactorEnabled?"Enabled":"Disabled"})]})]})]})]}),v==="organizations"&&r.jsx("div",{className:"space-y-4",children:s.length===0?r.jsxs("div",{className:"text-center py-12",children:[r.jsx(ha,{className:"w-12 h-12 text-gray-400 mx-auto mb-4"}),r.jsx("h3",{className:"text-lg font-medium text-white mb-2",children:"No Organizations"}),r.jsx("p",{className:"text-gray-400",children:"This user is not a member of any organizations."})]}):r.jsx("div",{className:"grid gap-4",children:s.map(V=>r.jsxs("div",{className:"border border-dashed border-white/10 rounded-none p-4 hover:bg-white/5 transition-colors",children:[r.jsxs("div",{className:"flex items-start justify-between mb-3",children:[r.jsxs("div",{className:"flex items-center space-x-4 flex-1",children:[r.jsx("div",{className:"w-12 h-12 bg-black/80 border border-dashed border-white/20 flex items-center justify-center rounded-none",children:V.organization.image?r.jsx("img",{src:V.organization.image,alt:V.organization.name,className:"w-12 h-12 object-cover"}):r.jsx(ha,{className:"w-6 h-6 text-white"})}),r.jsxs("div",{className:"flex-1",children:[r.jsxs("h3",{className:"text-white font-light inline-flex items-start",children:[V.organization.name,r.jsxs("sup",{className:"text-xs text-gray-500 ml-2 mt-0.5",children:[r.jsx("span",{className:"mr-1",children:"["}),r.jsx("span",{className:"text-white/80 font-mono text-xs",children:V.organization.slug}),r.jsx("span",{className:"ml-1",children:"]"})]})]}),r.jsxs("p",{className:"text-gray-400 text-sm font-sans mt-1 flex items-center gap-2",children:[r.jsxs("span",{children:["in ",V.organization.slug]}),r.jsx("button",{onClick:le=>{le.stopPropagation(),t(`/organizations/${V.organization.id}`)},className:"text-white/60 hover:text-white transition-colors",title:"View organization details",children:r.jsx(Bd,{className:"w-3.5 h-3.5"})})]})]})]}),r.jsx("div",{className:"flex flex-col items-end space-y-2",children:r.jsxs("div",{className:"flex items-center space-x-2",children:[r.jsxs("span",{className:"text-gray-500 font-mono text-xs uppercase",children:["Joined:"," "]}),r.jsxs("span",{className:"text-white font-mono text-xs",children:[new Date(V.joinedAt).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}),","," ",new Date(V.joinedAt).toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0})]})]})})]}),r.jsx("div",{className:"flex items-center justify-end",children:r.jsxs($,{variant:"outline",size:"sm",onClick:()=>Tt(V.id),className:"border border-dashed border-red-400/20 text-red-400 hover:bg-red-400/10 rounded-none",children:[r.jsx(ug,{className:"w-4 h-4 mr-1"}),"Remove"]})})]},V.id))})}),v==="teams"&&r.jsx("div",{className:"space-y-4",children:o.length===0?r.jsxs("div",{className:"text-center py-12",children:[r.jsx(Ct,{className:"w-12 h-12 text-gray-400 mx-auto mb-4"}),r.jsx("h3",{className:"text-lg font-medium text-white mb-2",children:"No Teams"}),r.jsx("p",{className:"text-gray-400",children:"This user is not a member of any teams."})]}):r.jsx("div",{className:"grid gap-4",children:o.map(V=>r.jsxs("div",{className:"border border-dashed border-white/10 rounded-none p-4 hover:bg-white/5 transition-colors",children:[r.jsxs("div",{className:"flex items-start justify-between mb-3",children:[r.jsxs("div",{className:"flex items-center space-x-4 flex-1",children:[r.jsx("div",{className:"w-12 h-12 bg-black/80 border border-dashed border-white/20 flex items-center justify-center rounded-none",children:r.jsx(Ct,{className:"w-6 h-6 text-white"})}),r.jsxs("div",{className:"flex-1",children:[r.jsxs("h3",{className:"text-white font-light inline-flex items-start",children:[V.team.name,r.jsx(Ln,{id:V.team.id,variant:"subscript",nonSliced:!!(V.team.organizationSlug||V.team.organizationName)})]}),r.jsxs("p",{className:"text-gray-400 text-sm font-sans mt-1 flex items-center gap-2",children:[r.jsxs("span",{children:["in"," ",V.team.organizationSlug||V.team.organizationName]}),r.jsx("button",{onClick:le=>{le.stopPropagation(),V.team.organizationId?t(`/organizations/${V.team.organizationId}/teams/${V.team.id}`):t(`/teams/${V.team.id}`)},className:"text-white/60 hover:text-white transition-colors",title:"View team details",children:r.jsx(Bd,{className:"w-3.5 h-3.5"})})]})]})]}),r.jsx("div",{className:"flex flex-col items-end space-y-2",children:r.jsxs("div",{className:"flex items-center space-x-2",children:[r.jsxs("span",{className:"text-gray-500 font-mono text-xs uppercase",children:["Joined:"," "]}),r.jsxs("span",{className:"text-white font-mono text-xs",children:[new Date(V.joinedAt).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}),","," ",new Date(V.joinedAt).toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0})]})]})})]}),r.jsx("div",{className:"flex items-center justify-end",children:r.jsxs($,{variant:"outline",size:"sm",onClick:()=>qt(V.id),className:"border border-dashed border-red-400/20 text-red-400 hover:bg-red-400/10 rounded-none",children:[r.jsx(ug,{className:"w-4 h-4 mr-1"}),"Remove"]})})]},V.id))})}),v==="accounts"&&r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{className:"flex items-center justify-between mb-4",children:[r.jsxs("div",{children:[r.jsx("h3",{className:"text-lg font-medium text-white",children:"Linked Accounts"}),r.jsx("p",{className:"text-gray-400 text-sm",children:"Manage user OAuth account connections"})]}),r.jsxs($,{variant:"outline",onClick:()=>{te([]),ae(!1),k(!0)},className:"border border-dashed border-white/20 text-white hover:bg-white/10 rounded-none",children:[r.jsx(Xi,{className:"w-4 h-4 mr-2"}),"Seed Accounts"]})]}),h.length===0?r.jsxs("div",{className:"text-center py-12",children:[r.jsx(Xi,{className:"w-12 h-12 text-gray-400 mx-auto mb-4"}),r.jsx("h3",{className:"text-lg font-medium text-white mb-2",children:"No Linked Accounts"}),r.jsx("p",{className:"text-gray-400",children:"This user has not connected any accounts yet."})]}):r.jsx("div",{className:"grid gap-4",children:h.map(V=>r.jsxs("div",{className:"border border-dashed border-white/10 rounded-none p-4 hover:bg-white/5 transition-colors",children:[r.jsxs("div",{className:"flex items-start justify-between mb-3",children:[r.jsxs("div",{className:"flex items-center space-x-4 flex-1",children:[r.jsx("div",{className:"w-12 h-12 bg-black/80 border border-dashed border-white/20 flex items-center justify-center rounded-none",children:aU(V.providerId)}),r.jsxs("div",{className:"flex-1",children:[r.jsxs("h3",{className:"text-white font-light inline-flex items-start",children:[$e(V.providerId),r.jsx(Ln,{id:V.accountId,variant:"subscript",nonSliced:!!(V.email||n.email)})]}),r.jsx("p",{className:"text-gray-400 tracking-tight uppercase text-xs font-mono mt-1",children:`ID: ${V.id}`})]})]}),r.jsx("div",{className:"flex flex-col items-end space-y-2 text-right",children:r.jsxs("div",{className:"flex items-center space-x-2 text-xs font-mono text-gray-400",children:[r.jsx("span",{children:"Linked:"}),r.jsx("span",{className:"text-white",children:pt(V.createdAt||V.updatedAt)})]})})]}),r.jsx("div",{className:"flex items-center justify-end",children:r.jsxs($,{variant:"outline",size:"sm",onClick:()=>re(V.id),className:"border border-dashed border-red-400/20 text-red-400 hover:bg-red-400/10 rounded-none",children:[r.jsx(ug,{className:"w-4 h-4 mr-1"}),"Unlink"]})})]},V.id))})]}),v==="sessions"&&r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{className:"flex items-center justify-between mb-4",children:[r.jsxs("div",{children:[r.jsx("h3",{className:"text-lg font-medium text-white",children:"Sessions"}),r.jsx("p",{className:"text-gray-400 text-sm",children:"Manage user authentication sessions"})]}),r.jsxs($,{variant:"outline",onClick:()=>{te([]),ae(!1),T(!0)},className:"border border-dashed border-white/20 text-white hover:bg-white/10 rounded-none",children:[r.jsx(ps,{className:"w-4 h-4 mr-2"}),"Seed Sessions"]})]}),c.length===0?r.jsxs("div",{className:"text-center py-12",children:[r.jsx(Iw,{className:"w-12 h-12 text-gray-400 mx-auto mb-4"}),r.jsx("h3",{className:"text-lg font-medium text-white mb-2",children:"No Sessions"}),r.jsx("p",{className:"text-gray-400",children:"This user has no active sessions."})]}):r.jsx("div",{className:"grid gap-4",children:c.map(V=>{var le,he,xe,De;return r.jsxs("div",{className:"border border-dashed border-white/10 rounded-none p-4 hover:bg-white/5 transition-colors",children:[r.jsxs("div",{className:"flex items-start justify-between mb-3",children:[r.jsxs("div",{className:"flex items-center space-x-4 flex-1",children:[r.jsx("div",{className:"w-12 h-12 bg-black/80 border border-dashed border-white/20 flex items-center justify-center rounded-none",children:r.jsx(dC,{className:"w-6 h-6 text-white"})}),r.jsxs("div",{className:"flex-1",children:[r.jsxs("h3",{className:"text-white font-light inline-flex items-start",children:["Session ",V.id.substring(0,8),"...",r.jsxs("sup",{className:"text-xs text-gray-500 ml-2 mt-0.5",children:[r.jsx("span",{className:"mr-1",children:"["}),r.jsx("span",{className:"text-white/80 font-mono text-xs",children:V.ipAddress}),r.jsx("span",{className:"ml-1",children:"]"})]})]}),r.jsxs("div",{className:"flex items-center space-x-2 mt-2",children:[r.jsx(pte,{className:"w-3.5 h-3.5 text-gray-400"}),r.jsxs("span",{className:"text-gray-400 uppercase font-mono text-xs",children:[((le=ge[V.id])==null?void 0:le.city)||"...",","," ",((he=ge[V.id])==null?void 0:he.country)||"..."]}),((xe=ge[V.id])==null?void 0:xe.countryCode)&&r.jsx("span",{className:"text-xs ml-1",children:Ue((De=ge[V.id])==null?void 0:De.countryCode)})]})]})]}),r.jsx("div",{className:"flex flex-col items-end space-y-2",children:r.jsxs("div",{className:"flex items-center space-x-2",children:[r.jsxs("span",{className:"text-gray-500 font-mono text-xs uppercase",children:["Expires:"," "]}),r.jsxs("span",{className:"text-white font-mono text-xs",children:[new Date(V.expiresAt).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"}),","," ",new Date(V.expiresAt).toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0})]})]})})]}),r.jsx("div",{className:"flex items-center justify-end",children:r.jsxs($,{variant:"outline",size:"sm",onClick:()=>Wt(V.id),className:"border border-dashed border-red-400/20 text-red-400 hover:bg-red-400/10 rounded-none",children:[r.jsx(hg,{className:"w-4 h-4 mr-1"}),"Revoke"]})})]},V.id)})})]})]})]})]}),N&&r.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:r.jsxs("div",{className:"bg-black/90 border border-dashed border-white/20 rounded-none p-6 w-full max-w-md",children:[r.jsxs("div",{className:"flex items-center justify-between mb-4",children:[r.jsx("h3",{className:"text-lg text-white font-light",children:"Edit User"}),r.jsx($,{variant:"ghost",size:"sm",onClick:()=>{b(!1),K("")},className:"text-gray-400 hover:text-white rounded-none",children:"×"})]}),r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{className:"flex items-center space-x-3",children:[r.jsx("div",{className:"w-16 h-16 bg-black/80 border border-dashed border-white/20 flex items-center justify-center",children:n!=null&&n.image?r.jsx("img",{src:n.image,alt:n.name,className:"w-16 h-16 object-cover"}):r.jsx(Mc,{className:"w-8 h-8 text-white"})}),r.jsxs("div",{className:"flex-1",children:[r.jsx("h4",{className:"text-white font-medium",children:n==null?void 0:n.name}),r.jsx("p",{className:"text-gray-400 text-sm",children:n==null?void 0:n.email})]})]}),r.jsxs("div",{children:[r.jsx("label",{className:"block text-sm font-medium text-gray-400 mb-2",children:"Name"}),r.jsx("input",{id:"edit-name",type:"text",defaultValue:(n==null?void 0:n.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"})]}),r.jsxs("div",{children:[r.jsx("label",{className:"block text-sm font-medium text-gray-400 mb-2",children:"Email"}),r.jsx("input",{id:"edit-email",type:"email",defaultValue:(n==null?void 0:n.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"})]}),r.jsxs("div",{children:[r.jsx("label",{className:"block text-sm font-medium text-gray-400 mb-2",children:"Role"}),r.jsxs(Ua,{className:"bg-black text-white",value:X,onValueChange:K,children:[r.jsx(Pa,{className:"w-full border border-dashed border-white/20 bg-black text-white rounded-none",children:r.jsx(yi,{placeholder:"Select role"})}),r.jsxs(Fa,{children:[r.jsx(Ve,{value:"",children:"None"}),r.jsx(Ve,{value:"admin",children:"Admin"}),r.jsx(Ve,{value:"user",children:"User"})]})]})]})]}),r.jsxs("div",{className:"flex justify-end space-x-2 mt-6",children:[r.jsx($,{variant:"outline",onClick:()=>{b(!1),K("")},className:"border border-dashed border-white/20 text-white hover:bg-white/10 rounded-none",children:"Cancel"}),r.jsx($,{onClick:We,className:"bg-white hover:bg-white/90 text-black border border-white/20 rounded-none",children:"Update"})]})]})}),y&&r.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:r.jsxs("div",{className:"bg-black border border-red-400/20 rounded-none p-6 w-full max-w-md",children:[r.jsx("h2",{className:"text-xl font-bold text-white mb-4",children:"Ban User"}),r.jsxs("p",{className:"text-gray-400 mb-4",children:["Ban ",r.jsx("strong",{children:n.name})," from accessing the system."]}),r.jsxs("div",{className:"space-y-4 mb-6",children:[r.jsxs("div",{children:[r.jsx(pe,{htmlFor:"banReason",className:"text-white",children:"Ban Reason"}),r.jsx(Te,{id:"banReason",value:A,onChange:V=>D(V.target.value),placeholder:"Enter reason for ban (optional)",className:"bg-black border border-dashed border-white/20 text-white rounded-none"})]}),r.jsxs("div",{children:[r.jsx(pe,{htmlFor:"banExpires",className:"text-white",children:"Ban Duration (seconds)"}),r.jsx(Te,{id:"banExpires",type:"number",value:B||"",onChange:V=>G(V.target.value?Number(V.target.value):void 0),placeholder:"Leave empty for permanent ban",className:"bg-black border border-dashed border-white/20 text-white rounded-none"}),r.jsx("p",{className:"text-xs text-gray-400 mt-1",children:"Examples: 3600 (1 hour), 86400 (1 day), 604800 (1 week)"})]})]}),r.jsxs("div",{className:"flex justify-end space-x-2",children:[r.jsx($,{variant:"outline",onClick:()=>{g(!1),D(""),G(void 0)},className:"border border-dashed border-white/20 text-white hover:bg-white/10 rounded-none",children:"Cancel"}),r.jsx($,{onClick:Ze,className:"bg-red-600 text-white hover:bg-red-700 rounded-none",children:"Ban User"})]})]})}),w&&r.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:r.jsxs("div",{className:"bg-black border border-green-400/20 rounded-none p-6 w-full max-w-md",children:[r.jsx("h2",{className:"text-xl font-bold text-white mb-4",children:"Unban User"}),r.jsxs("p",{className:"text-gray-400 mb-6",children:["Are you sure you want to unban ",r.jsx("strong",{children:n.name}),"? This will restore their access to the system."]}),r.jsxs("div",{className:"flex justify-end space-x-2",children:[r.jsx($,{variant:"outline",onClick:()=>S(!1),className:"border border-dashed border-white/20 text-white hover:bg-white/10 rounded-none",children:"Cancel"}),r.jsx($,{onClick:Et,className:"bg-green-400 text-white hover:bg-green-700 rounded-none",children:"Unban User"})]})]})}),j&&n&&r.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:r.jsxs("div",{className:"bg-black/90 border border-dashed border-white/20 p-6 w-full max-w-md rounded-none",children:[r.jsxs("div",{className:"flex items-center justify-between mb-4",children:[r.jsx("h3",{className:"text-lg text-white font-light",children:"Delete User"}),r.jsx($,{variant:"ghost",size:"sm",onClick:()=>U(!1),className:"text-gray-400 hover:text-white rounded-none",children:r.jsx(xt,{className:"w-4 h-4"})})]}),r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{className:"flex items-center space-x-3",children:[r.jsx("div",{className:"w-16 h-16 bg-black/80 border border-dashed border-white/20 flex items-center justify-center",children:n.image?r.jsx("img",{src:n.image,alt:n.name,className:"w-16 h-16 object-cover"}):r.jsx(Mc,{className:"w-8 h-8 text-white"})}),r.jsxs("div",{children:[r.jsx("div",{className:"text-white font-light",children:n.name}),r.jsx("div",{className:"text-sm text-gray-400",children:n.email})]})]}),r.jsx("p",{className:"text-gray-400",children:"Are you sure you want to delete this user? This action cannot be undone."})]}),r.jsxs("div",{className:"flex justify-end space-x-3 mt-6",children:[r.jsx($,{variant:"outline",onClick:()=>U(!1),className:"border border-dashed border-white/20 text-white hover:bg-white/10 rounded-none",children:"Cancel"}),r.jsx($,{onClick:et,className:"bg-red-500 hover:bg-red-600 text-white border border-red-500 rounded-none",children:"Delete"})]})]})}),I&&n&&r.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:r.jsxs("div",{className:"bg-black/90 border border-dashed border-white/20 p-6 w-full max-w-md rounded-none",children:[r.jsxs("div",{className:"flex items-center justify-between mb-4",children:[r.jsx("h3",{className:"text-lg text-white font-light",children:"Update Password"}),r.jsx($,{variant:"ghost",size:"sm",onClick:()=>F(!1),className:"text-gray-400 hover:text-white rounded-none",children:r.jsx(xt,{className:"w-4 h-4"})})]}),r.jsx("div",{className:"space-y-4",children:r.jsxs("div",{children:[r.jsx(pe,{htmlFor:"new-password",className:"text-sm text-gray-400 font-light",children:"New Password"}),r.jsx(Te,{id:"new-password",type:"password",className:"mt-1 border border-dashed border-white/20 bg-black/30 text-white rounded-none"})]})}),r.jsxs("div",{className:"flex justify-end space-x-3 mt-6",children:[r.jsx($,{variant:"outline",onClick:()=>F(!1),className:"border border-dashed border-white/20 text-white hover:bg-white/10 rounded-none",children:"Cancel"}),r.jsx($,{onClick:async()=>{var he;const V=(he=document.getElementById("new-password"))==null?void 0:he.value;if(!V){H.error("Please enter a password");return}const le=H.loading("Updating password...");try{const De=await(await fetch(`/api/users/${e}/password`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({password:V})})).json();De.success?(F(!1),document.getElementById("new-password").value="",H.success("Password updated successfully!",{id:le})):H.error(`Error updating password: ${De.error||"Unknown error"}`,{id:le})}catch{H.error("Error updating password",{id:le})}},className:"bg-white hover:bg-white/90 text-black border border-white/20 rounded-none",children:"Update"})]})]})}),C&&r.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50 overflow-hidden",children:r.jsxs("div",{className:"overflow-x-hidden overflow-y-auto bg-black/90 border border-white/10 p-6 w-full pt-4 max-w-2xl rounded-none max-h-[90vh]",children:[r.jsxs("div",{className:"flex items-center justify-between mb-6",children:[r.jsxs("h3",{className:"text-sm text-white flex items-center justify-center font-light uppercase",children:[r.jsx("span",{className:"text-white/50 mr-2",children:"["}),r.jsx(dC,{className:"inline mr-2 w-3 h-3 text-white"}),r.jsx("span",{className:"font-mono text-white/70 uppercase",children:"Seed Sessions"}),r.jsx("span",{className:"text-white/50 ml-2",children:"]"})]}),r.jsx($,{variant:"ghost",size:"sm",onClick:()=>T(!1),className:"text-gray-400 hover:text-white rounded-none",children:r.jsx(xt,{className:"w-4 h-4"})})]}),r.jsx("hr",{className:"border-white/10 -mx-10 border-dashed -mt-4 mb-4"}),r.jsxs("div",{className:"space-y-6",children:[r.jsx("div",{className:"space-y-4",children:r.jsxs("div",{className:"flex items-center space-x-3",children:[r.jsxs("div",{className:"flex-1",children:[r.jsx(pe,{htmlFor:"session-count",className:"text-sm text-gray-400 font-light",children:"Number of sessions"}),r.jsx(Te,{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"})]}),r.jsx($,{onClick:()=>{var le;const V=parseInt(((le=document.getElementById("session-count"))==null?void 0:le.value)||"3",10);we(V)},disabled:ee,className:"bg-transparent hover:bg-white/90 bg-white text-black border border-white/20 rounded-none mt-6 disabled:opacity-50",children:ee?r.jsxs(r.Fragment,{children:[r.jsx(gn,{className:"w-3 h-3 mr-2 animate-spin"}),"Seeding..."]}):r.jsxs(r.Fragment,{children:[r.jsx(ps,{className:"w-3 h-3 mr-2"}),"Seed Sessions"]})})]})}),ne.length>0&&r.jsx("div",{className:"mt-6",children:r.jsx(ji,{title:"Session Seeding Terminal",lines:ne,isRunning:ee,className:"w-full",defaultCollapsed:!0})})]}),r.jsx("hr",{className:"border-white/10 -mx-10 border-dashed mt-10"}),r.jsx("div",{className:"flex justify-end mt-6 pt-6",children:r.jsx($,{variant:"outline",onClick:()=>T(!1),className:"border border-dashed border-white/20 text-white hover:bg-white/10 rounded-none",children:"Close"})})]})}),E&&r.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50 overflow-hidden",children:r.jsxs("div",{className:"overflow-x-hidden overflow-y-auto bg-black/90 border border-white/10 p-6 w-full pt-4 max-w-2xl rounded-none max-h-[90vh]",children:[r.jsxs("div",{className:"flex items-center justify-between mb-6",children:[r.jsxs("h3",{className:"text-sm text-white flex items-center justify-center font-light uppercase",children:[r.jsx("span",{className:"text-white/50 mr-2",children:"["}),r.jsx(Xi,{className:"inline mr-2 w-3 h-3 text-white"}),r.jsx("span",{className:"font-mono text-white/70 uppercase",children:"Seed Accounts"}),r.jsx("span",{className:"text-white/50 ml-2",children:"]"})]}),r.jsx($,{variant:"ghost",size:"sm",onClick:()=>k(!1),className:"text-gray-400 hover:text-white rounded-none",children:r.jsx(xt,{className:"w-4 h-4"})})]}),r.jsx("hr",{className:"border-white/10 -mx-10 border-dashed -mt-4 mb-4"}),r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[r.jsxs("div",{children:[r.jsx(pe,{htmlFor:"account-count",className:"text-sm text-gray-400 font-light",children:"Number of accounts"}),r.jsx(Te,{id:"account-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"})]}),r.jsxs("div",{children:[r.jsx(pe,{htmlFor:"account-provider",className:"text-sm text-gray-400 font-light",children:"Provider"}),r.jsxs(Ua,{value:O,onValueChange:R,children:[r.jsx(Pa,{className:"mt-1 border border-dashed border-white/20 bg-black/30 text-white rounded-none",children:r.jsx(yi,{placeholder:"Select provider"})}),r.jsxs(Fa,{className:"bg-black border border-dashed border-white/20",children:[r.jsx(Ve,{value:"random",children:"Mix (Random)"}),r.jsx(Ve,{value:"github",children:"GitHub"}),r.jsx(Ve,{value:"google",children:"Google"}),r.jsx(Ve,{value:"discord",children:"Discord"}),r.jsx(Ve,{value:"facebook",children:"Facebook"}),r.jsx(Ve,{value:"twitter",children:"Twitter"}),r.jsx(Ve,{value:"linkedin",children:"LinkedIn"}),r.jsx(Ve,{value:"apple",children:"Apple"}),r.jsx(Ve,{value:"microsoft",children:"Microsoft"}),r.jsx(Ve,{value:"gitlab",children:"GitLab"}),r.jsx(Ve,{value:"bitbucket",children:"Bitbucket"}),r.jsx(Ve,{value:"spotify",children:"Spotify"}),r.jsx(Ve,{value:"twitch",children:"Twitch"}),r.jsx(Ve,{value:"reddit",children:"Reddit"}),r.jsx(Ve,{value:"slack",children:"Slack"}),r.jsx(Ve,{value:"notion",children:"Notion"}),r.jsx(Ve,{value:"tiktok",children:"TikTok"}),r.jsx(Ve,{value:"zoom",children:"Zoom"})]})]})]})]}),r.jsx($,{onClick:()=>{var le;const V=parseInt(((le=document.getElementById("account-count"))==null?void 0:le.value)||"3",10);Be(V,O)},disabled:ee,className:"bg-white hover:bg-white/90 text-black border border-white/20 rounded-none disabled:opacity-50",children:ee?r.jsxs(r.Fragment,{children:[r.jsx(gn,{className:"w-3 h-3 mr-2 animate-spin"}),"Seeding..."]}):r.jsxs(r.Fragment,{children:[r.jsx(Xi,{className:"w-3 h-3 mr-2"}),"Seed Accounts"]})})]}),ne.length>0&&r.jsx("div",{className:"mt-6",children:r.jsx(ji,{title:"Account Seeding Terminal",lines:ne,isRunning:ee,className:"w-full",defaultCollapsed:!0})})]}),r.jsx("hr",{className:"border-white/10 -mx-10 border-dashed mt-10"}),r.jsx("div",{className:"flex justify-end mt-6 pt-6",children:r.jsx($,{variant:"outline",onClick:()=>k(!1),className:"border border-dashed border-white/20 text-white hover:bg-white/10 rounded-none",children:"Close"})})]})})]}):r.jsx("div",{className:"min-h-screen bg-black flex items-center justify-center",children:r.jsx("div",{className:"text-white text-lg",children:"User not found"})})}function jue(){return r.jsx(YW,{children:r.jsxs(DB,{children:[r.jsx(zK,{children:r.jsxs(TB,{children:[r.jsx(Dn,{path:"/",element:r.jsx(Pte,{})}),r.jsx(Dn,{path:"/users",element:r.jsx(y5,{})}),r.jsx(Dn,{path:"/users/:userId",element:r.jsx(Aue,{})}),r.jsx(Dn,{path:"/organizations",element:r.jsx(x5,{})}),r.jsx(Dn,{path:"/organizations/:orgId",element:r.jsx(xue,{})}),r.jsx(Dn,{path:"/teams",element:r.jsx(wue,{})}),r.jsx(Dn,{path:"/teams/:teamId",element:r.jsx(GR,{})}),r.jsx(Dn,{path:"/organizations/:orgId/teams/:teamId",element:r.jsx(GR,{})}),r.jsx(Dn,{path:"/sessions",element:r.jsx(yue,{})}),r.jsx(Dn,{path:"/database",element:r.jsx(zte,{})}),r.jsx(Dn,{path:"/database/demo",element:r.jsx(VW,{})}),r.jsx(Dn,{path:"/emails",element:r.jsx(gue,{})}),r.jsx(Dn,{path:"/tools",element:r.jsx(Cue,{})}),r.jsx(Dn,{path:"/settings",element:r.jsx(vue,{})})]})}),r.jsx(dz,{className:"rounded-none border-dashed border-white/20",theme:"dark",position:"top-right",richColors:!0,toastOptions:{style:{border:"dashed 1px #ffffff20",borderRadius:"0"},className:"font-mono uppercase"},closeButton:!0})]})})}DF.createRoot(document.getElementById("root")).render(r.jsx(J.StrictMode,{children:r.jsx(jue,{})}));
|