Linux websever 5.15.0-153-generic #163-Ubuntu SMP Thu Aug 7 16:37:18 UTC 2025 x86_64
Apache/2.4.52 (Ubuntu)
: 192.168.3.70 | : 192.168.1.99
Cant Read [ /etc/named.conf ]
8.1.2-1ubuntu2.23
urlab
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
var /
www /
html /
cqt /
dist /
assets /
[ HOME SHELL ]
Name
Size
Permission
Action
hero-quantum-k-Qg8pgU.jpg
115.28
KB
-rw-r--r--
index-B9J1erVf.js
729.17
KB
-rw-r--r--
index-DJEP7qM-.css
99.58
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : index-B9J1erVf.js
var Og=e=>{throw TypeError(e)};var yd=(e,t,n)=>t.has(e)||Og("Cannot "+n);var P=(e,t,n)=>(yd(e,t,"read from private field"),n?n.call(e):t.get(e)),oe=(e,t,n)=>t.has(e)?Og("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),J=(e,t,n,r)=>(yd(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),ve=(e,t,n)=>(yd(e,t,"access private method"),n);var Il=(e,t,n,r)=>({set _(i){J(e,t,i,n)},get _(){return P(e,t,r)}});function LC(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const a=Object.getOwnPropertyDescriptor(r,i);a&&Object.defineProperty(e,i,a.get?a:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function r(i){if(i.ep)return;i.ep=!0;const a=n(i);fetch(i.href,a)}})();function Fv(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Lv={exports:{}},Au={},Ov={exports:{}},xe={};/** * @license React * react.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var gl=Symbol.for("react.element"),OC=Symbol.for("react.portal"),IC=Symbol.for("react.fragment"),_C=Symbol.for("react.strict_mode"),VC=Symbol.for("react.profiler"),zC=Symbol.for("react.provider"),$C=Symbol.for("react.context"),BC=Symbol.for("react.forward_ref"),UC=Symbol.for("react.suspense"),WC=Symbol.for("react.memo"),HC=Symbol.for("react.lazy"),Ig=Symbol.iterator;function qC(e){return e===null||typeof e!="object"?null:(e=Ig&&e[Ig]||e["@@iterator"],typeof e=="function"?e:null)}var Iv={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_v=Object.assign,Vv={};function La(e,t,n){this.props=e,this.context=t,this.refs=Vv,this.updater=n||Iv}La.prototype.isReactComponent={};La.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};La.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function zv(){}zv.prototype=La.prototype;function bm(e,t,n){this.props=e,this.context=t,this.refs=Vv,this.updater=n||Iv}var wm=bm.prototype=new zv;wm.constructor=bm;_v(wm,La.prototype);wm.isPureReactComponent=!0;var _g=Array.isArray,$v=Object.prototype.hasOwnProperty,jm={current:null},Bv={key:!0,ref:!0,__self:!0,__source:!0};function Uv(e,t,n){var r,i={},a=null,o=null;if(t!=null)for(r in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(a=""+t.key),t)$v.call(t,r)&&!Bv.hasOwnProperty(r)&&(i[r]=t[r]);var l=arguments.length-2;if(l===1)i.children=n;else if(1<l){for(var c=Array(l),u=0;u<l;u++)c[u]=arguments[u+2];i.children=c}if(e&&e.defaultProps)for(r in l=e.defaultProps,l)i[r]===void 0&&(i[r]=l[r]);return{$$typeof:gl,type:e,key:a,ref:o,props:i,_owner:jm.current}}function KC(e,t){return{$$typeof:gl,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Nm(e){return typeof e=="object"&&e!==null&&e.$$typeof===gl}function QC(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Vg=/\/+/g;function vd(e,t){return typeof e=="object"&&e!==null&&e.key!=null?QC(""+e.key):t.toString(36)}function gc(e,t,n,r,i){var a=typeof e;(a==="undefined"||a==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(a){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case gl:case OC:o=!0}}if(o)return o=e,i=i(o),e=r===""?"."+vd(o,0):r,_g(i)?(n="",e!=null&&(n=e.replace(Vg,"$&/")+"/"),gc(i,t,n,"",function(u){return u})):i!=null&&(Nm(i)&&(i=KC(i,n+(!i.key||o&&o.key===i.key?"":(""+i.key).replace(Vg,"$&/")+"/")+e)),t.push(i)),1;if(o=0,r=r===""?".":r+":",_g(e))for(var l=0;l<e.length;l++){a=e[l];var c=r+vd(a,l);o+=gc(a,t,n,c,i)}else if(c=qC(e),typeof c=="function")for(e=c.call(e),l=0;!(a=e.next()).done;)a=a.value,c=r+vd(a,l++),o+=gc(a,t,n,c,i);else if(a==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return o}function _l(e,t,n){if(e==null)return e;var r=[],i=0;return gc(e,r,"","",function(a){return t.call(n,a,i++)}),r}function GC(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var At={current:null},xc={transition:null},YC={ReactCurrentDispatcher:At,ReactCurrentBatchConfig:xc,ReactCurrentOwner:jm};function Wv(){throw Error("act(...) is not supported in production builds of React.")}xe.Children={map:_l,forEach:function(e,t,n){_l(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return _l(e,function(){t++}),t},toArray:function(e){return _l(e,function(t){return t})||[]},only:function(e){if(!Nm(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};xe.Component=La;xe.Fragment=IC;xe.Profiler=VC;xe.PureComponent=bm;xe.StrictMode=_C;xe.Suspense=UC;xe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=YC;xe.act=Wv;xe.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=_v({},e.props),i=e.key,a=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(a=t.ref,o=jm.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(c in t)$v.call(t,c)&&!Bv.hasOwnProperty(c)&&(r[c]=t[c]===void 0&&l!==void 0?l[c]:t[c])}var c=arguments.length-2;if(c===1)r.children=n;else if(1<c){l=Array(c);for(var u=0;u<c;u++)l[u]=arguments[u+2];r.children=l}return{$$typeof:gl,type:e.type,key:i,ref:a,props:r,_owner:o}};xe.createContext=function(e){return e={$$typeof:$C,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:zC,_context:e},e.Consumer=e};xe.createElement=Uv;xe.createFactory=function(e){var t=Uv.bind(null,e);return t.type=e,t};xe.createRef=function(){return{current:null}};xe.forwardRef=function(e){return{$$typeof:BC,render:e}};xe.isValidElement=Nm;xe.lazy=function(e){return{$$typeof:HC,_payload:{_status:-1,_result:e},_init:GC}};xe.memo=function(e,t){return{$$typeof:WC,type:e,compare:t===void 0?null:t}};xe.startTransition=function(e){var t=xc.transition;xc.transition={};try{e()}finally{xc.transition=t}};xe.unstable_act=Wv;xe.useCallback=function(e,t){return At.current.useCallback(e,t)};xe.useContext=function(e){return At.current.useContext(e)};xe.useDebugValue=function(){};xe.useDeferredValue=function(e){return At.current.useDeferredValue(e)};xe.useEffect=function(e,t){return At.current.useEffect(e,t)};xe.useId=function(){return At.current.useId()};xe.useImperativeHandle=function(e,t,n){return At.current.useImperativeHandle(e,t,n)};xe.useInsertionEffect=function(e,t){return At.current.useInsertionEffect(e,t)};xe.useLayoutEffect=function(e,t){return At.current.useLayoutEffect(e,t)};xe.useMemo=function(e,t){return At.current.useMemo(e,t)};xe.useReducer=function(e,t,n){return At.current.useReducer(e,t,n)};xe.useRef=function(e){return At.current.useRef(e)};xe.useState=function(e){return At.current.useState(e)};xe.useSyncExternalStore=function(e,t,n){return At.current.useSyncExternalStore(e,t,n)};xe.useTransition=function(){return At.current.useTransition()};xe.version="18.3.1";Ov.exports=xe;var p=Ov.exports;const V=Fv(p),Cm=LC({__proto__:null,default:V},[p]);/** * @license React * react-jsx-runtime.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var XC=p,ZC=Symbol.for("react.element"),JC=Symbol.for("react.fragment"),eS=Object.prototype.hasOwnProperty,tS=XC.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,nS={key:!0,ref:!0,__self:!0,__source:!0};function Hv(e,t,n){var r,i={},a=null,o=null;n!==void 0&&(a=""+n),t.key!==void 0&&(a=""+t.key),t.ref!==void 0&&(o=t.ref);for(r in t)eS.call(t,r)&&!nS.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:ZC,type:e,key:a,ref:o,props:i,_owner:tS.current}}Au.Fragment=JC;Au.jsx=Hv;Au.jsxs=Hv;Lv.exports=Au;var s=Lv.exports,qv={exports:{}},Jt={},Kv={exports:{}},Qv={};/** * @license React * scheduler.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */(function(e){function t(D,L){var H=D.length;D.push(L);e:for(;0<H;){var ce=H-1>>>1,se=D[ce];if(0<i(se,L))D[ce]=L,D[H]=se,H=ce;else break e}}function n(D){return D.length===0?null:D[0]}function r(D){if(D.length===0)return null;var L=D[0],H=D.pop();if(H!==L){D[0]=H;e:for(var ce=0,se=D.length,me=se>>>1;ce<me;){var pe=2*(ce+1)-1,ze=D[pe],at=pe+1,we=D[at];if(0>i(ze,H))at<se&&0>i(we,ze)?(D[ce]=we,D[at]=H,ce=at):(D[ce]=ze,D[pe]=H,ce=pe);else if(at<se&&0>i(we,H))D[ce]=we,D[at]=H,ce=at;else break e}}return L}function i(D,L){var H=D.sortIndex-L.sortIndex;return H!==0?H:D.id-L.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,l=o.now();e.unstable_now=function(){return o.now()-l}}var c=[],u=[],d=1,h=null,f=3,m=!1,b=!1,g=!1,v=typeof setTimeout=="function"?setTimeout:null,x=typeof clearTimeout=="function"?clearTimeout:null,y=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function w(D){for(var L=n(u);L!==null;){if(L.callback===null)r(u);else if(L.startTime<=D)r(u),L.sortIndex=L.expirationTime,t(c,L);else break;L=n(u)}}function j(D){if(g=!1,w(D),!b)if(n(c)!==null)b=!0,Y(C);else{var L=n(u);L!==null&&G(j,L.startTime-D)}}function C(D,L){b=!1,g&&(g=!1,x(T),T=-1),m=!0;var H=f;try{for(w(L),h=n(c);h!==null&&(!(h.expirationTime>L)||D&&!z());){var ce=h.callback;if(typeof ce=="function"){h.callback=null,f=h.priorityLevel;var se=ce(h.expirationTime<=L);L=e.unstable_now(),typeof se=="function"?h.callback=se:h===n(c)&&r(c),w(L)}else r(c);h=n(c)}if(h!==null)var me=!0;else{var pe=n(u);pe!==null&&G(j,pe.startTime-L),me=!1}return me}finally{h=null,f=H,m=!1}}var N=!1,S=null,T=-1,k=5,A=-1;function z(){return!(e.unstable_now()-A<k)}function O(){if(S!==null){var D=e.unstable_now();A=D;var L=!0;try{L=S(!0,D)}finally{L?W():(N=!1,S=null)}}else N=!1}var W;if(typeof y=="function")W=function(){y(O)};else if(typeof MessageChannel<"u"){var _=new MessageChannel,re=_.port2;_.port1.onmessage=O,W=function(){re.postMessage(null)}}else W=function(){v(O,0)};function Y(D){S=D,N||(N=!0,W())}function G(D,L){T=v(function(){D(e.unstable_now())},L)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(D){D.callback=null},e.unstable_continueExecution=function(){b||m||(b=!0,Y(C))},e.unstable_forceFrameRate=function(D){0>D||125<D?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):k=0<D?Math.floor(1e3/D):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(c)},e.unstable_next=function(D){switch(f){case 1:case 2:case 3:var L=3;break;default:L=f}var H=f;f=L;try{return D()}finally{f=H}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(D,L){switch(D){case 1:case 2:case 3:case 4:case 5:break;default:D=3}var H=f;f=D;try{return L()}finally{f=H}},e.unstable_scheduleCallback=function(D,L,H){var ce=e.unstable_now();switch(typeof H=="object"&&H!==null?(H=H.delay,H=typeof H=="number"&&0<H?ce+H:ce):H=ce,D){case 1:var se=-1;break;case 2:se=250;break;case 5:se=1073741823;break;case 4:se=1e4;break;default:se=5e3}return se=H+se,D={id:d++,callback:L,priorityLevel:D,startTime:H,expirationTime:se,sortIndex:-1},H>ce?(D.sortIndex=H,t(u,D),n(c)===null&&D===n(u)&&(g?(x(T),T=-1):g=!0,G(j,H-ce))):(D.sortIndex=se,t(c,D),b||m||(b=!0,Y(C))),D},e.unstable_shouldYield=z,e.unstable_wrapCallback=function(D){var L=f;return function(){var H=f;f=L;try{return D.apply(this,arguments)}finally{f=H}}}})(Qv);Kv.exports=Qv;var rS=Kv.exports;/** * @license React * react-dom.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var sS=p,Xt=rS;function B(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var Gv=new Set,Oo={};function wi(e,t){ja(e,t),ja(e+"Capture",t)}function ja(e,t){for(Oo[e]=t,e=0;e<t.length;e++)Gv.add(t[e])}var Nr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),kf=Object.prototype.hasOwnProperty,iS=/^[: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]*$/,zg={},$g={};function aS(e){return kf.call($g,e)?!0:kf.call(zg,e)?!1:iS.test(e)?$g[e]=!0:(zg[e]=!0,!1)}function oS(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function lS(e,t,n,r){if(t===null||typeof t>"u"||oS(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Rt(e,t,n,r,i,a,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=o}var gt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){gt[e]=new Rt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];gt[t]=new Rt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){gt[e]=new Rt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){gt[e]=new Rt(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){gt[e]=new Rt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){gt[e]=new Rt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){gt[e]=new Rt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){gt[e]=new Rt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){gt[e]=new Rt(e,5,!1,e.toLowerCase(),null,!1,!1)});var Sm=/[\-:]([a-z])/g;function km(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Sm,km);gt[t]=new Rt(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Sm,km);gt[t]=new Rt(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Sm,km);gt[t]=new Rt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){gt[e]=new Rt(e,1,!1,e.toLowerCase(),null,!1,!1)});gt.xlinkHref=new Rt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){gt[e]=new Rt(e,1,!1,e.toLowerCase(),null,!0,!0)});function Em(e,t,n,r){var i=gt.hasOwnProperty(t)?gt[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(lS(t,n,i,r)&&(n=null),r||i===null?aS(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type===3?!1:"":n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var Dr=sS.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Vl=Symbol.for("react.element"),Li=Symbol.for("react.portal"),Oi=Symbol.for("react.fragment"),Tm=Symbol.for("react.strict_mode"),Ef=Symbol.for("react.profiler"),Yv=Symbol.for("react.provider"),Xv=Symbol.for("react.context"),Pm=Symbol.for("react.forward_ref"),Tf=Symbol.for("react.suspense"),Pf=Symbol.for("react.suspense_list"),Am=Symbol.for("react.memo"),qr=Symbol.for("react.lazy"),Zv=Symbol.for("react.offscreen"),Bg=Symbol.iterator;function Ga(e){return e===null||typeof e!="object"?null:(e=Bg&&e[Bg]||e["@@iterator"],typeof e=="function"?e:null)}var He=Object.assign,bd;function co(e){if(bd===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);bd=t&&t[1]||""}return` `+bd+e}var wd=!1;function jd(e,t){if(!e||wd)return"";wd=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&typeof u.stack=="string"){for(var i=u.stack.split(` `),a=r.stack.split(` `),o=i.length-1,l=a.length-1;1<=o&&0<=l&&i[o]!==a[l];)l--;for(;1<=o&&0<=l;o--,l--)if(i[o]!==a[l]){if(o!==1||l!==1)do if(o--,l--,0>l||i[o]!==a[l]){var c=` `+i[o].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=o&&0<=l);break}}}finally{wd=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?co(e):""}function cS(e){switch(e.tag){case 5:return co(e.type);case 16:return co("Lazy");case 13:return co("Suspense");case 19:return co("SuspenseList");case 0:case 2:case 15:return e=jd(e.type,!1),e;case 11:return e=jd(e.type.render,!1),e;case 1:return e=jd(e.type,!0),e;default:return""}}function Af(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Oi:return"Fragment";case Li:return"Portal";case Ef:return"Profiler";case Tm:return"StrictMode";case Tf:return"Suspense";case Pf:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Xv:return(e.displayName||"Context")+".Consumer";case Yv:return(e._context.displayName||"Context")+".Provider";case Pm:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Am:return t=e.displayName||null,t!==null?t:Af(e.type)||"Memo";case qr:t=e._payload,e=e._init;try{return Af(e(t))}catch{}}return null}function uS(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Af(t);case 8:return t===Tm?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function ws(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Jv(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function dS(e){var t=Jv(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(o){r=""+o,a.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function zl(e){e._valueTracker||(e._valueTracker=dS(e))}function eb(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Jv(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function $c(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Rf(e,t){var n=t.checked;return He({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Ug(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=ws(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function tb(e,t){t=t.checked,t!=null&&Em(e,"checked",t,!1)}function Df(e,t){tb(e,t);var n=ws(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Mf(e,t.type,n):t.hasOwnProperty("defaultValue")&&Mf(e,t.type,ws(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Wg(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Mf(e,t,n){(t!=="number"||$c(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var uo=Array.isArray;function ea(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+ws(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Ff(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(B(91));return He({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Hg(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(B(92));if(uo(n)){if(1<n.length)throw Error(B(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:ws(n)}}function nb(e,t){var n=ws(t.value),r=ws(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function qg(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function rb(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Lf(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?rb(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var $l,sb=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for($l=$l||document.createElement("div"),$l.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=$l.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Io(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var xo={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},fS=["Webkit","ms","Moz","O"];Object.keys(xo).forEach(function(e){fS.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),xo[t]=xo[e]})});function ib(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||xo.hasOwnProperty(e)&&xo[e]?(""+t).trim():t+"px"}function ab(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=ib(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var hS=He({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Of(e,t){if(t){if(hS[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(B(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(B(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(B(61))}if(t.style!=null&&typeof t.style!="object")throw Error(B(62))}}function If(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var _f=null;function Rm(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Vf=null,ta=null,na=null;function Kg(e){if(e=vl(e)){if(typeof Vf!="function")throw Error(B(280));var t=e.stateNode;t&&(t=Lu(t),Vf(e.stateNode,e.type,t))}}function ob(e){ta?na?na.push(e):na=[e]:ta=e}function lb(){if(ta){var e=ta,t=na;if(na=ta=null,Kg(e),t)for(e=0;e<t.length;e++)Kg(t[e])}}function cb(e,t){return e(t)}function ub(){}var Nd=!1;function db(e,t,n){if(Nd)return e(t,n);Nd=!0;try{return cb(e,t,n)}finally{Nd=!1,(ta!==null||na!==null)&&(ub(),lb())}}function _o(e,t){var n=e.stateNode;if(n===null)return null;var r=Lu(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(B(231,t,typeof n));return n}var zf=!1;if(Nr)try{var Ya={};Object.defineProperty(Ya,"passive",{get:function(){zf=!0}}),window.addEventListener("test",Ya,Ya),window.removeEventListener("test",Ya,Ya)}catch{zf=!1}function mS(e,t,n,r,i,a,o,l,c){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(d){this.onError(d)}}var yo=!1,Bc=null,Uc=!1,$f=null,pS={onError:function(e){yo=!0,Bc=e}};function gS(e,t,n,r,i,a,o,l,c){yo=!1,Bc=null,mS.apply(pS,arguments)}function xS(e,t,n,r,i,a,o,l,c){if(gS.apply(this,arguments),yo){if(yo){var u=Bc;yo=!1,Bc=null}else throw Error(B(198));Uc||(Uc=!0,$f=u)}}function ji(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 fb(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 Qg(e){if(ji(e)!==e)throw Error(B(188))}function yS(e){var t=e.alternate;if(!t){if(t=ji(e),t===null)throw Error(B(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var a=i.alternate;if(a===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===a.child){for(a=i.child;a;){if(a===n)return Qg(i),e;if(a===r)return Qg(i),t;a=a.sibling}throw Error(B(188))}if(n.return!==r.return)n=i,r=a;else{for(var o=!1,l=i.child;l;){if(l===n){o=!0,n=i,r=a;break}if(l===r){o=!0,r=i,n=a;break}l=l.sibling}if(!o){for(l=a.child;l;){if(l===n){o=!0,n=a,r=i;break}if(l===r){o=!0,r=a,n=i;break}l=l.sibling}if(!o)throw Error(B(189))}}if(n.alternate!==r)throw Error(B(190))}if(n.tag!==3)throw Error(B(188));return n.stateNode.current===n?e:t}function hb(e){return e=yS(e),e!==null?mb(e):null}function mb(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=mb(e);if(t!==null)return t;e=e.sibling}return null}var pb=Xt.unstable_scheduleCallback,Gg=Xt.unstable_cancelCallback,vS=Xt.unstable_shouldYield,bS=Xt.unstable_requestPaint,Ye=Xt.unstable_now,wS=Xt.unstable_getCurrentPriorityLevel,Dm=Xt.unstable_ImmediatePriority,gb=Xt.unstable_UserBlockingPriority,Wc=Xt.unstable_NormalPriority,jS=Xt.unstable_LowPriority,xb=Xt.unstable_IdlePriority,Ru=null,er=null;function NS(e){if(er&&typeof er.onCommitFiberRoot=="function")try{er.onCommitFiberRoot(Ru,e,void 0,(e.current.flags&128)===128)}catch{}}var Rn=Math.clz32?Math.clz32:kS,CS=Math.log,SS=Math.LN2;function kS(e){return e>>>=0,e===0?32:31-(CS(e)/SS|0)|0}var Bl=64,Ul=4194304;function fo(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Hc(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,a=e.pingedLanes,o=n&268435455;if(o!==0){var l=o&~i;l!==0?r=fo(l):(a&=o,a!==0&&(r=fo(a)))}else o=n&~i,o!==0?r=fo(o):a!==0&&(r=fo(a));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,a=t&-t,i>=a||i===16&&(a&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Rn(t),i=1<<n,r|=e[n],t&=~i;return r}function ES(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function TS(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes;0<a;){var o=31-Rn(a),l=1<<o,c=i[o];c===-1?(!(l&n)||l&r)&&(i[o]=ES(l,t)):c<=t&&(e.expiredLanes|=l),a&=~l}}function Bf(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function yb(){var e=Bl;return Bl<<=1,!(Bl&4194240)&&(Bl=64),e}function Cd(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function xl(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Rn(t),e[t]=n}function PS(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-Rn(n),a=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~a}}function Mm(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Rn(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var Ee=0;function vb(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var bb,Fm,wb,jb,Nb,Uf=!1,Wl=[],us=null,ds=null,fs=null,Vo=new Map,zo=new Map,Qr=[],AS="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Yg(e,t){switch(e){case"focusin":case"focusout":us=null;break;case"dragenter":case"dragleave":ds=null;break;case"mouseover":case"mouseout":fs=null;break;case"pointerover":case"pointerout":Vo.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":zo.delete(t.pointerId)}}function Xa(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=vl(t),t!==null&&Fm(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function RS(e,t,n,r,i){switch(t){case"focusin":return us=Xa(us,e,t,n,r,i),!0;case"dragenter":return ds=Xa(ds,e,t,n,r,i),!0;case"mouseover":return fs=Xa(fs,e,t,n,r,i),!0;case"pointerover":var a=i.pointerId;return Vo.set(a,Xa(Vo.get(a)||null,e,t,n,r,i)),!0;case"gotpointercapture":return a=i.pointerId,zo.set(a,Xa(zo.get(a)||null,e,t,n,r,i)),!0}return!1}function Cb(e){var t=Ws(e.target);if(t!==null){var n=ji(t);if(n!==null){if(t=n.tag,t===13){if(t=fb(n),t!==null){e.blockedOn=t,Nb(e.priority,function(){wb(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function yc(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Wf(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);_f=r,n.target.dispatchEvent(r),_f=null}else return t=vl(n),t!==null&&Fm(t),e.blockedOn=n,!1;t.shift()}return!0}function Xg(e,t,n){yc(e)&&n.delete(t)}function DS(){Uf=!1,us!==null&&yc(us)&&(us=null),ds!==null&&yc(ds)&&(ds=null),fs!==null&&yc(fs)&&(fs=null),Vo.forEach(Xg),zo.forEach(Xg)}function Za(e,t){e.blockedOn===t&&(e.blockedOn=null,Uf||(Uf=!0,Xt.unstable_scheduleCallback(Xt.unstable_NormalPriority,DS)))}function $o(e){function t(i){return Za(i,e)}if(0<Wl.length){Za(Wl[0],e);for(var n=1;n<Wl.length;n++){var r=Wl[n];r.blockedOn===e&&(r.blockedOn=null)}}for(us!==null&&Za(us,e),ds!==null&&Za(ds,e),fs!==null&&Za(fs,e),Vo.forEach(t),zo.forEach(t),n=0;n<Qr.length;n++)r=Qr[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Qr.length&&(n=Qr[0],n.blockedOn===null);)Cb(n),n.blockedOn===null&&Qr.shift()}var ra=Dr.ReactCurrentBatchConfig,qc=!0;function MS(e,t,n,r){var i=Ee,a=ra.transition;ra.transition=null;try{Ee=1,Lm(e,t,n,r)}finally{Ee=i,ra.transition=a}}function FS(e,t,n,r){var i=Ee,a=ra.transition;ra.transition=null;try{Ee=4,Lm(e,t,n,r)}finally{Ee=i,ra.transition=a}}function Lm(e,t,n,r){if(qc){var i=Wf(e,t,n,r);if(i===null)Fd(e,t,r,Kc,n),Yg(e,r);else if(RS(i,e,t,n,r))r.stopPropagation();else if(Yg(e,r),t&4&&-1<AS.indexOf(e)){for(;i!==null;){var a=vl(i);if(a!==null&&bb(a),a=Wf(e,t,n,r),a===null&&Fd(e,t,r,Kc,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Fd(e,t,r,null,n)}}var Kc=null;function Wf(e,t,n,r){if(Kc=null,e=Rm(r),e=Ws(e),e!==null)if(t=ji(e),t===null)e=null;else if(n=t.tag,n===13){if(e=fb(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 Kc=e,null}function Sb(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(wS()){case Dm:return 1;case gb:return 4;case Wc:case jS:return 16;case xb:return 536870912;default:return 16}default:return 16}}var os=null,Om=null,vc=null;function kb(){if(vc)return vc;var e,t=Om,n=t.length,r,i="value"in os?os.value:os.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return vc=i.slice(e,1<r?1-r:void 0)}function bc(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 Hl(){return!0}function Zg(){return!1}function en(e){function t(n,r,i,a,o){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=a,this.target=o,this.currentTarget=null;for(var l in e)e.hasOwnProperty(l)&&(n=e[l],this[l]=n?n(a):a[l]);return this.isDefaultPrevented=(a.defaultPrevented!=null?a.defaultPrevented:a.returnValue===!1)?Hl:Zg,this.isPropagationStopped=Zg,this}return He(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=Hl)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Hl)},persist:function(){},isPersistent:Hl}),t}var Oa={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Im=en(Oa),yl=He({},Oa,{view:0,detail:0}),LS=en(yl),Sd,kd,Ja,Du=He({},yl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:_m,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!==Ja&&(Ja&&e.type==="mousemove"?(Sd=e.screenX-Ja.screenX,kd=e.screenY-Ja.screenY):kd=Sd=0,Ja=e),Sd)},movementY:function(e){return"movementY"in e?e.movementY:kd}}),Jg=en(Du),OS=He({},Du,{dataTransfer:0}),IS=en(OS),_S=He({},yl,{relatedTarget:0}),Ed=en(_S),VS=He({},Oa,{animationName:0,elapsedTime:0,pseudoElement:0}),zS=en(VS),$S=He({},Oa,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),BS=en($S),US=He({},Oa,{data:0}),ex=en(US),WS={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},HS={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"},qS={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function KS(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=qS[e])?!!t[e]:!1}function _m(){return KS}var QS=He({},yl,{key:function(e){if(e.key){var t=WS[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=bc(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?HS[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:_m,charCode:function(e){return e.type==="keypress"?bc(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?bc(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),GS=en(QS),YS=He({},Du,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),tx=en(YS),XS=He({},yl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:_m}),ZS=en(XS),JS=He({},Oa,{propertyName:0,elapsedTime:0,pseudoElement:0}),ek=en(JS),tk=He({},Du,{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}),nk=en(tk),rk=[9,13,27,32],Vm=Nr&&"CompositionEvent"in window,vo=null;Nr&&"documentMode"in document&&(vo=document.documentMode);var sk=Nr&&"TextEvent"in window&&!vo,Eb=Nr&&(!Vm||vo&&8<vo&&11>=vo),nx=" ",rx=!1;function Tb(e,t){switch(e){case"keyup":return rk.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Pb(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ii=!1;function ik(e,t){switch(e){case"compositionend":return Pb(t);case"keypress":return t.which!==32?null:(rx=!0,nx);case"textInput":return e=t.data,e===nx&&rx?null:e;default:return null}}function ak(e,t){if(Ii)return e==="compositionend"||!Vm&&Tb(e,t)?(e=kb(),vc=Om=os=null,Ii=!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 Eb&&t.locale!=="ko"?null:t.data;default:return null}}var ok={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 sx(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!ok[e.type]:t==="textarea"}function Ab(e,t,n,r){ob(r),t=Qc(t,"onChange"),0<t.length&&(n=new Im("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var bo=null,Bo=null;function lk(e){$b(e,0)}function Mu(e){var t=zi(e);if(eb(t))return e}function ck(e,t){if(e==="change")return t}var Rb=!1;if(Nr){var Td;if(Nr){var Pd="oninput"in document;if(!Pd){var ix=document.createElement("div");ix.setAttribute("oninput","return;"),Pd=typeof ix.oninput=="function"}Td=Pd}else Td=!1;Rb=Td&&(!document.documentMode||9<document.documentMode)}function ax(){bo&&(bo.detachEvent("onpropertychange",Db),Bo=bo=null)}function Db(e){if(e.propertyName==="value"&&Mu(Bo)){var t=[];Ab(t,Bo,e,Rm(e)),db(lk,t)}}function uk(e,t,n){e==="focusin"?(ax(),bo=t,Bo=n,bo.attachEvent("onpropertychange",Db)):e==="focusout"&&ax()}function dk(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Mu(Bo)}function fk(e,t){if(e==="click")return Mu(t)}function hk(e,t){if(e==="input"||e==="change")return Mu(t)}function mk(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Fn=typeof Object.is=="function"?Object.is:mk;function Uo(e,t){if(Fn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!kf.call(t,i)||!Fn(e[i],t[i]))return!1}return!0}function ox(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function lx(e,t){var n=ox(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=ox(n)}}function Mb(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Mb(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Fb(){for(var e=window,t=$c();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=$c(e.document)}return t}function zm(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function pk(e){var t=Fb(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Mb(n.ownerDocument.documentElement,n)){if(r!==null&&zm(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,a=Math.min(r.start,i);r=r.end===void 0?a:Math.min(r.end,i),!e.extend&&a>r&&(i=r,r=a,a=i),i=lx(n,a);var o=lx(n,r);i&&o&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),a>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var gk=Nr&&"documentMode"in document&&11>=document.documentMode,_i=null,Hf=null,wo=null,qf=!1;function cx(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;qf||_i==null||_i!==$c(r)||(r=_i,"selectionStart"in r&&zm(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),wo&&Uo(wo,r)||(wo=r,r=Qc(Hf,"onSelect"),0<r.length&&(t=new Im("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=_i)))}function ql(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Vi={animationend:ql("Animation","AnimationEnd"),animationiteration:ql("Animation","AnimationIteration"),animationstart:ql("Animation","AnimationStart"),transitionend:ql("Transition","TransitionEnd")},Ad={},Lb={};Nr&&(Lb=document.createElement("div").style,"AnimationEvent"in window||(delete Vi.animationend.animation,delete Vi.animationiteration.animation,delete Vi.animationstart.animation),"TransitionEvent"in window||delete Vi.transitionend.transition);function Fu(e){if(Ad[e])return Ad[e];if(!Vi[e])return e;var t=Vi[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Lb)return Ad[e]=t[n];return e}var Ob=Fu("animationend"),Ib=Fu("animationiteration"),_b=Fu("animationstart"),Vb=Fu("transitionend"),zb=new Map,ux="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Es(e,t){zb.set(e,t),wi(t,[e])}for(var Rd=0;Rd<ux.length;Rd++){var Dd=ux[Rd],xk=Dd.toLowerCase(),yk=Dd[0].toUpperCase()+Dd.slice(1);Es(xk,"on"+yk)}Es(Ob,"onAnimationEnd");Es(Ib,"onAnimationIteration");Es(_b,"onAnimationStart");Es("dblclick","onDoubleClick");Es("focusin","onFocus");Es("focusout","onBlur");Es(Vb,"onTransitionEnd");ja("onMouseEnter",["mouseout","mouseover"]);ja("onMouseLeave",["mouseout","mouseover"]);ja("onPointerEnter",["pointerout","pointerover"]);ja("onPointerLeave",["pointerout","pointerover"]);wi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));wi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));wi("onBeforeInput",["compositionend","keypress","textInput","paste"]);wi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));wi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));wi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ho="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(" "),vk=new Set("cancel close invalid load scroll toggle".split(" ").concat(ho));function dx(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,xS(r,t,void 0,e),e.currentTarget=null}function $b(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var l=r[o],c=l.instance,u=l.currentTarget;if(l=l.listener,c!==a&&i.isPropagationStopped())break e;dx(i,l,u),a=c}else for(o=0;o<r.length;o++){if(l=r[o],c=l.instance,u=l.currentTarget,l=l.listener,c!==a&&i.isPropagationStopped())break e;dx(i,l,u),a=c}}}if(Uc)throw e=$f,Uc=!1,$f=null,e}function Fe(e,t){var n=t[Xf];n===void 0&&(n=t[Xf]=new Set);var r=e+"__bubble";n.has(r)||(Bb(t,e,2,!1),n.add(r))}function Md(e,t,n){var r=0;t&&(r|=4),Bb(n,e,r,t)}var Kl="_reactListening"+Math.random().toString(36).slice(2);function Wo(e){if(!e[Kl]){e[Kl]=!0,Gv.forEach(function(n){n!=="selectionchange"&&(vk.has(n)||Md(n,!1,e),Md(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Kl]||(t[Kl]=!0,Md("selectionchange",!1,t))}}function Bb(e,t,n,r){switch(Sb(t)){case 1:var i=MS;break;case 4:i=FS;break;default:i=Lm}n=i.bind(null,t,n,e),i=void 0,!zf||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),r?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function Fd(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var l=r.stateNode.containerInfo;if(l===i||l.nodeType===8&&l.parentNode===i)break;if(o===4)for(o=r.return;o!==null;){var c=o.tag;if((c===3||c===4)&&(c=o.stateNode.containerInfo,c===i||c.nodeType===8&&c.parentNode===i))return;o=o.return}for(;l!==null;){if(o=Ws(l),o===null)return;if(c=o.tag,c===5||c===6){r=a=o;continue e}l=l.parentNode}}r=r.return}db(function(){var u=a,d=Rm(n),h=[];e:{var f=zb.get(e);if(f!==void 0){var m=Im,b=e;switch(e){case"keypress":if(bc(n)===0)break e;case"keydown":case"keyup":m=GS;break;case"focusin":b="focus",m=Ed;break;case"focusout":b="blur",m=Ed;break;case"beforeblur":case"afterblur":m=Ed;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":m=Jg;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":m=IS;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":m=ZS;break;case Ob:case Ib:case _b:m=zS;break;case Vb:m=ek;break;case"scroll":m=LS;break;case"wheel":m=nk;break;case"copy":case"cut":case"paste":m=BS;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":m=tx}var g=(t&4)!==0,v=!g&&e==="scroll",x=g?f!==null?f+"Capture":null:f;g=[];for(var y=u,w;y!==null;){w=y;var j=w.stateNode;if(w.tag===5&&j!==null&&(w=j,x!==null&&(j=_o(y,x),j!=null&&g.push(Ho(y,j,w)))),v)break;y=y.return}0<g.length&&(f=new m(f,b,null,n,d),h.push({event:f,listeners:g}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",m=e==="mouseout"||e==="pointerout",f&&n!==_f&&(b=n.relatedTarget||n.fromElement)&&(Ws(b)||b[Cr]))break e;if((m||f)&&(f=d.window===d?d:(f=d.ownerDocument)?f.defaultView||f.parentWindow:window,m?(b=n.relatedTarget||n.toElement,m=u,b=b?Ws(b):null,b!==null&&(v=ji(b),b!==v||b.tag!==5&&b.tag!==6)&&(b=null)):(m=null,b=u),m!==b)){if(g=Jg,j="onMouseLeave",x="onMouseEnter",y="mouse",(e==="pointerout"||e==="pointerover")&&(g=tx,j="onPointerLeave",x="onPointerEnter",y="pointer"),v=m==null?f:zi(m),w=b==null?f:zi(b),f=new g(j,y+"leave",m,n,d),f.target=v,f.relatedTarget=w,j=null,Ws(d)===u&&(g=new g(x,y+"enter",b,n,d),g.target=w,g.relatedTarget=v,j=g),v=j,m&&b)t:{for(g=m,x=b,y=0,w=g;w;w=Ai(w))y++;for(w=0,j=x;j;j=Ai(j))w++;for(;0<y-w;)g=Ai(g),y--;for(;0<w-y;)x=Ai(x),w--;for(;y--;){if(g===x||x!==null&&g===x.alternate)break t;g=Ai(g),x=Ai(x)}g=null}else g=null;m!==null&&fx(h,f,m,g,!1),b!==null&&v!==null&&fx(h,v,b,g,!0)}}e:{if(f=u?zi(u):window,m=f.nodeName&&f.nodeName.toLowerCase(),m==="select"||m==="input"&&f.type==="file")var C=ck;else if(sx(f))if(Rb)C=hk;else{C=dk;var N=uk}else(m=f.nodeName)&&m.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(C=fk);if(C&&(C=C(e,u))){Ab(h,C,n,d);break e}N&&N(e,f,u),e==="focusout"&&(N=f._wrapperState)&&N.controlled&&f.type==="number"&&Mf(f,"number",f.value)}switch(N=u?zi(u):window,e){case"focusin":(sx(N)||N.contentEditable==="true")&&(_i=N,Hf=u,wo=null);break;case"focusout":wo=Hf=_i=null;break;case"mousedown":qf=!0;break;case"contextmenu":case"mouseup":case"dragend":qf=!1,cx(h,n,d);break;case"selectionchange":if(gk)break;case"keydown":case"keyup":cx(h,n,d)}var S;if(Vm)e:{switch(e){case"compositionstart":var T="onCompositionStart";break e;case"compositionend":T="onCompositionEnd";break e;case"compositionupdate":T="onCompositionUpdate";break e}T=void 0}else Ii?Tb(e,n)&&(T="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(T="onCompositionStart");T&&(Eb&&n.locale!=="ko"&&(Ii||T!=="onCompositionStart"?T==="onCompositionEnd"&&Ii&&(S=kb()):(os=d,Om="value"in os?os.value:os.textContent,Ii=!0)),N=Qc(u,T),0<N.length&&(T=new ex(T,e,null,n,d),h.push({event:T,listeners:N}),S?T.data=S:(S=Pb(n),S!==null&&(T.data=S)))),(S=sk?ik(e,n):ak(e,n))&&(u=Qc(u,"onBeforeInput"),0<u.length&&(d=new ex("onBeforeInput","beforeinput",null,n,d),h.push({event:d,listeners:u}),d.data=S))}$b(h,t)})}function Ho(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Qc(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,a=i.stateNode;i.tag===5&&a!==null&&(i=a,a=_o(e,n),a!=null&&r.unshift(Ho(e,a,i)),a=_o(e,t),a!=null&&r.push(Ho(e,a,i))),e=e.return}return r}function Ai(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function fx(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var l=n,c=l.alternate,u=l.stateNode;if(c!==null&&c===r)break;l.tag===5&&u!==null&&(l=u,i?(c=_o(n,a),c!=null&&o.unshift(Ho(n,c,l))):i||(c=_o(n,a),c!=null&&o.push(Ho(n,c,l)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var bk=/\r\n?/g,wk=/\u0000|\uFFFD/g;function hx(e){return(typeof e=="string"?e:""+e).replace(bk,` `).replace(wk,"")}function Ql(e,t,n){if(t=hx(t),hx(e)!==t&&n)throw Error(B(425))}function Gc(){}var Kf=null,Qf=null;function Gf(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Yf=typeof setTimeout=="function"?setTimeout:void 0,jk=typeof clearTimeout=="function"?clearTimeout:void 0,mx=typeof Promise=="function"?Promise:void 0,Nk=typeof queueMicrotask=="function"?queueMicrotask:typeof mx<"u"?function(e){return mx.resolve(null).then(e).catch(Ck)}:Yf;function Ck(e){setTimeout(function(){throw e})}function Ld(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){e.removeChild(i),$o(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);$o(t)}function hs(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function px(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Ia=Math.random().toString(36).slice(2),Yn="__reactFiber$"+Ia,qo="__reactProps$"+Ia,Cr="__reactContainer$"+Ia,Xf="__reactEvents$"+Ia,Sk="__reactListeners$"+Ia,kk="__reactHandles$"+Ia;function Ws(e){var t=e[Yn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Cr]||n[Yn]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=px(e);e!==null;){if(n=e[Yn])return n;e=px(e)}return t}e=n,n=e.parentNode}return null}function vl(e){return e=e[Yn]||e[Cr],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function zi(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(B(33))}function Lu(e){return e[qo]||null}var Zf=[],$i=-1;function Ts(e){return{current:e}}function Le(e){0>$i||(e.current=Zf[$i],Zf[$i]=null,$i--)}function De(e,t){$i++,Zf[$i]=e.current,e.current=t}var js={},jt=Ts(js),zt=Ts(!1),ui=js;function Na(e,t){var n=e.type.contextTypes;if(!n)return js;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},a;for(a in n)i[a]=t[a];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function $t(e){return e=e.childContextTypes,e!=null}function Yc(){Le(zt),Le(jt)}function gx(e,t,n){if(jt.current!==js)throw Error(B(168));De(jt,t),De(zt,n)}function Ub(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(B(108,uS(e)||"Unknown",i));return He({},n,r)}function Xc(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||js,ui=jt.current,De(jt,e),De(zt,zt.current),!0}function xx(e,t,n){var r=e.stateNode;if(!r)throw Error(B(169));n?(e=Ub(e,t,ui),r.__reactInternalMemoizedMergedChildContext=e,Le(zt),Le(jt),De(jt,e)):Le(zt),De(zt,n)}var yr=null,Ou=!1,Od=!1;function Wb(e){yr===null?yr=[e]:yr.push(e)}function Ek(e){Ou=!0,Wb(e)}function Ps(){if(!Od&&yr!==null){Od=!0;var e=0,t=Ee;try{var n=yr;for(Ee=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}yr=null,Ou=!1}catch(i){throw yr!==null&&(yr=yr.slice(e+1)),pb(Dm,Ps),i}finally{Ee=t,Od=!1}}return null}var Bi=[],Ui=0,Zc=null,Jc=0,on=[],ln=0,di=null,br=1,wr="";function $s(e,t){Bi[Ui++]=Jc,Bi[Ui++]=Zc,Zc=e,Jc=t}function Hb(e,t,n){on[ln++]=br,on[ln++]=wr,on[ln++]=di,di=e;var r=br;e=wr;var i=32-Rn(r)-1;r&=~(1<<i),n+=1;var a=32-Rn(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,br=1<<32-Rn(t)+i|n<<i|r,wr=a+e}else br=1<<a|n<<i|r,wr=e}function $m(e){e.return!==null&&($s(e,1),Hb(e,1,0))}function Bm(e){for(;e===Zc;)Zc=Bi[--Ui],Bi[Ui]=null,Jc=Bi[--Ui],Bi[Ui]=null;for(;e===di;)di=on[--ln],on[ln]=null,wr=on[--ln],on[ln]=null,br=on[--ln],on[ln]=null}var Gt=null,Kt=null,Ve=!1,En=null;function qb(e,t){var n=cn(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function yx(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Gt=e,Kt=hs(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Gt=e,Kt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=di!==null?{id:br,overflow:wr}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=cn(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Gt=e,Kt=null,!0):!1;default:return!1}}function Jf(e){return(e.mode&1)!==0&&(e.flags&128)===0}function eh(e){if(Ve){var t=Kt;if(t){var n=t;if(!yx(e,t)){if(Jf(e))throw Error(B(418));t=hs(n.nextSibling);var r=Gt;t&&yx(e,t)?qb(r,n):(e.flags=e.flags&-4097|2,Ve=!1,Gt=e)}}else{if(Jf(e))throw Error(B(418));e.flags=e.flags&-4097|2,Ve=!1,Gt=e}}}function vx(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Gt=e}function Gl(e){if(e!==Gt)return!1;if(!Ve)return vx(e),Ve=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Gf(e.type,e.memoizedProps)),t&&(t=Kt)){if(Jf(e))throw Kb(),Error(B(418));for(;t;)qb(e,t),t=hs(t.nextSibling)}if(vx(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(B(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Kt=hs(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Kt=null}}else Kt=Gt?hs(e.stateNode.nextSibling):null;return!0}function Kb(){for(var e=Kt;e;)e=hs(e.nextSibling)}function Ca(){Kt=Gt=null,Ve=!1}function Um(e){En===null?En=[e]:En.push(e)}var Tk=Dr.ReactCurrentBatchConfig;function eo(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(B(309));var r=n.stateNode}if(!r)throw Error(B(147,e));var i=r,a=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===a?t.ref:(t=function(o){var l=i.refs;o===null?delete l[a]:l[a]=o},t._stringRef=a,t)}if(typeof e!="string")throw Error(B(284));if(!n._owner)throw Error(B(290,e))}return e}function Yl(e,t){throw e=Object.prototype.toString.call(t),Error(B(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function bx(e){var t=e._init;return t(e._payload)}function Qb(e){function t(x,y){if(e){var w=x.deletions;w===null?(x.deletions=[y],x.flags|=16):w.push(y)}}function n(x,y){if(!e)return null;for(;y!==null;)t(x,y),y=y.sibling;return null}function r(x,y){for(x=new Map;y!==null;)y.key!==null?x.set(y.key,y):x.set(y.index,y),y=y.sibling;return x}function i(x,y){return x=xs(x,y),x.index=0,x.sibling=null,x}function a(x,y,w){return x.index=w,e?(w=x.alternate,w!==null?(w=w.index,w<y?(x.flags|=2,y):w):(x.flags|=2,y)):(x.flags|=1048576,y)}function o(x){return e&&x.alternate===null&&(x.flags|=2),x}function l(x,y,w,j){return y===null||y.tag!==6?(y=Ud(w,x.mode,j),y.return=x,y):(y=i(y,w),y.return=x,y)}function c(x,y,w,j){var C=w.type;return C===Oi?d(x,y,w.props.children,j,w.key):y!==null&&(y.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===qr&&bx(C)===y.type)?(j=i(y,w.props),j.ref=eo(x,y,w),j.return=x,j):(j=Ec(w.type,w.key,w.props,null,x.mode,j),j.ref=eo(x,y,w),j.return=x,j)}function u(x,y,w,j){return y===null||y.tag!==4||y.stateNode.containerInfo!==w.containerInfo||y.stateNode.implementation!==w.implementation?(y=Wd(w,x.mode,j),y.return=x,y):(y=i(y,w.children||[]),y.return=x,y)}function d(x,y,w,j,C){return y===null||y.tag!==7?(y=oi(w,x.mode,j,C),y.return=x,y):(y=i(y,w),y.return=x,y)}function h(x,y,w){if(typeof y=="string"&&y!==""||typeof y=="number")return y=Ud(""+y,x.mode,w),y.return=x,y;if(typeof y=="object"&&y!==null){switch(y.$$typeof){case Vl:return w=Ec(y.type,y.key,y.props,null,x.mode,w),w.ref=eo(x,null,y),w.return=x,w;case Li:return y=Wd(y,x.mode,w),y.return=x,y;case qr:var j=y._init;return h(x,j(y._payload),w)}if(uo(y)||Ga(y))return y=oi(y,x.mode,w,null),y.return=x,y;Yl(x,y)}return null}function f(x,y,w,j){var C=y!==null?y.key:null;if(typeof w=="string"&&w!==""||typeof w=="number")return C!==null?null:l(x,y,""+w,j);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case Vl:return w.key===C?c(x,y,w,j):null;case Li:return w.key===C?u(x,y,w,j):null;case qr:return C=w._init,f(x,y,C(w._payload),j)}if(uo(w)||Ga(w))return C!==null?null:d(x,y,w,j,null);Yl(x,w)}return null}function m(x,y,w,j,C){if(typeof j=="string"&&j!==""||typeof j=="number")return x=x.get(w)||null,l(y,x,""+j,C);if(typeof j=="object"&&j!==null){switch(j.$$typeof){case Vl:return x=x.get(j.key===null?w:j.key)||null,c(y,x,j,C);case Li:return x=x.get(j.key===null?w:j.key)||null,u(y,x,j,C);case qr:var N=j._init;return m(x,y,w,N(j._payload),C)}if(uo(j)||Ga(j))return x=x.get(w)||null,d(y,x,j,C,null);Yl(y,j)}return null}function b(x,y,w,j){for(var C=null,N=null,S=y,T=y=0,k=null;S!==null&&T<w.length;T++){S.index>T?(k=S,S=null):k=S.sibling;var A=f(x,S,w[T],j);if(A===null){S===null&&(S=k);break}e&&S&&A.alternate===null&&t(x,S),y=a(A,y,T),N===null?C=A:N.sibling=A,N=A,S=k}if(T===w.length)return n(x,S),Ve&&$s(x,T),C;if(S===null){for(;T<w.length;T++)S=h(x,w[T],j),S!==null&&(y=a(S,y,T),N===null?C=S:N.sibling=S,N=S);return Ve&&$s(x,T),C}for(S=r(x,S);T<w.length;T++)k=m(S,x,T,w[T],j),k!==null&&(e&&k.alternate!==null&&S.delete(k.key===null?T:k.key),y=a(k,y,T),N===null?C=k:N.sibling=k,N=k);return e&&S.forEach(function(z){return t(x,z)}),Ve&&$s(x,T),C}function g(x,y,w,j){var C=Ga(w);if(typeof C!="function")throw Error(B(150));if(w=C.call(w),w==null)throw Error(B(151));for(var N=C=null,S=y,T=y=0,k=null,A=w.next();S!==null&&!A.done;T++,A=w.next()){S.index>T?(k=S,S=null):k=S.sibling;var z=f(x,S,A.value,j);if(z===null){S===null&&(S=k);break}e&&S&&z.alternate===null&&t(x,S),y=a(z,y,T),N===null?C=z:N.sibling=z,N=z,S=k}if(A.done)return n(x,S),Ve&&$s(x,T),C;if(S===null){for(;!A.done;T++,A=w.next())A=h(x,A.value,j),A!==null&&(y=a(A,y,T),N===null?C=A:N.sibling=A,N=A);return Ve&&$s(x,T),C}for(S=r(x,S);!A.done;T++,A=w.next())A=m(S,x,T,A.value,j),A!==null&&(e&&A.alternate!==null&&S.delete(A.key===null?T:A.key),y=a(A,y,T),N===null?C=A:N.sibling=A,N=A);return e&&S.forEach(function(O){return t(x,O)}),Ve&&$s(x,T),C}function v(x,y,w,j){if(typeof w=="object"&&w!==null&&w.type===Oi&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case Vl:e:{for(var C=w.key,N=y;N!==null;){if(N.key===C){if(C=w.type,C===Oi){if(N.tag===7){n(x,N.sibling),y=i(N,w.props.children),y.return=x,x=y;break e}}else if(N.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===qr&&bx(C)===N.type){n(x,N.sibling),y=i(N,w.props),y.ref=eo(x,N,w),y.return=x,x=y;break e}n(x,N);break}else t(x,N);N=N.sibling}w.type===Oi?(y=oi(w.props.children,x.mode,j,w.key),y.return=x,x=y):(j=Ec(w.type,w.key,w.props,null,x.mode,j),j.ref=eo(x,y,w),j.return=x,x=j)}return o(x);case Li:e:{for(N=w.key;y!==null;){if(y.key===N)if(y.tag===4&&y.stateNode.containerInfo===w.containerInfo&&y.stateNode.implementation===w.implementation){n(x,y.sibling),y=i(y,w.children||[]),y.return=x,x=y;break e}else{n(x,y);break}else t(x,y);y=y.sibling}y=Wd(w,x.mode,j),y.return=x,x=y}return o(x);case qr:return N=w._init,v(x,y,N(w._payload),j)}if(uo(w))return b(x,y,w,j);if(Ga(w))return g(x,y,w,j);Yl(x,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,y!==null&&y.tag===6?(n(x,y.sibling),y=i(y,w),y.return=x,x=y):(n(x,y),y=Ud(w,x.mode,j),y.return=x,x=y),o(x)):n(x,y)}return v}var Sa=Qb(!0),Gb=Qb(!1),eu=Ts(null),tu=null,Wi=null,Wm=null;function Hm(){Wm=Wi=tu=null}function qm(e){var t=eu.current;Le(eu),e._currentValue=t}function th(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function sa(e,t){tu=e,Wm=Wi=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(_t=!0),e.firstContext=null)}function fn(e){var t=e._currentValue;if(Wm!==e)if(e={context:e,memoizedValue:t,next:null},Wi===null){if(tu===null)throw Error(B(308));Wi=e,tu.dependencies={lanes:0,firstContext:e}}else Wi=Wi.next=e;return t}var Hs=null;function Km(e){Hs===null?Hs=[e]:Hs.push(e)}function Yb(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,Km(t)):(n.next=i.next,i.next=n),t.interleaved=n,Sr(e,r)}function Sr(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Kr=!1;function Qm(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Xb(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function jr(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function ms(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Ne&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,Sr(e,n)}return i=r.interleaved,i===null?(t.next=t,Km(r)):(t.next=i.next,i.next=t),r.interleaved=t,Sr(e,n)}function wc(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Mm(e,n)}}function wx(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function nu(e,t,n,r){var i=e.updateQueue;Kr=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,l=i.shared.pending;if(l!==null){i.shared.pending=null;var c=l,u=c.next;c.next=null,o===null?a=u:o.next=u,o=c;var d=e.alternate;d!==null&&(d=d.updateQueue,l=d.lastBaseUpdate,l!==o&&(l===null?d.firstBaseUpdate=u:l.next=u,d.lastBaseUpdate=c))}if(a!==null){var h=i.baseState;o=0,d=u=c=null,l=a;do{var f=l.lane,m=l.eventTime;if((r&f)===f){d!==null&&(d=d.next={eventTime:m,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var b=e,g=l;switch(f=t,m=n,g.tag){case 1:if(b=g.payload,typeof b=="function"){h=b.call(m,h,f);break e}h=b;break e;case 3:b.flags=b.flags&-65537|128;case 0:if(b=g.payload,f=typeof b=="function"?b.call(m,h,f):b,f==null)break e;h=He({},h,f);break e;case 2:Kr=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,f=i.effects,f===null?i.effects=[l]:f.push(l))}else m={eventTime:m,lane:f,tag:l.tag,payload:l.payload,callback:l.callback,next:null},d===null?(u=d=m,c=h):d=d.next=m,o|=f;if(l=l.next,l===null){if(l=i.shared.pending,l===null)break;f=l,l=f.next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}while(!0);if(d===null&&(c=h),i.baseState=c,i.firstBaseUpdate=u,i.lastBaseUpdate=d,t=i.shared.interleaved,t!==null){i=t;do o|=i.lane,i=i.next;while(i!==t)}else a===null&&(i.shared.lanes=0);hi|=o,e.lanes=o,e.memoizedState=h}}function jx(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(B(191,i));i.call(r)}}}var bl={},tr=Ts(bl),Ko=Ts(bl),Qo=Ts(bl);function qs(e){if(e===bl)throw Error(B(174));return e}function Gm(e,t){switch(De(Qo,t),De(Ko,e),De(tr,bl),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Lf(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Lf(t,e)}Le(tr),De(tr,t)}function ka(){Le(tr),Le(Ko),Le(Qo)}function Zb(e){qs(Qo.current);var t=qs(tr.current),n=Lf(t,e.type);t!==n&&(De(Ko,e),De(tr,n))}function Ym(e){Ko.current===e&&(Le(tr),Le(Ko))}var $e=Ts(0);function ru(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Id=[];function Xm(){for(var e=0;e<Id.length;e++)Id[e]._workInProgressVersionPrimary=null;Id.length=0}var jc=Dr.ReactCurrentDispatcher,_d=Dr.ReactCurrentBatchConfig,fi=0,Ue=null,st=null,ct=null,su=!1,jo=!1,Go=0,Pk=0;function xt(){throw Error(B(321))}function Zm(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Fn(e[n],t[n]))return!1;return!0}function Jm(e,t,n,r,i,a){if(fi=a,Ue=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,jc.current=e===null||e.memoizedState===null?Mk:Fk,e=n(r,i),jo){a=0;do{if(jo=!1,Go=0,25<=a)throw Error(B(301));a+=1,ct=st=null,t.updateQueue=null,jc.current=Lk,e=n(r,i)}while(jo)}if(jc.current=iu,t=st!==null&&st.next!==null,fi=0,ct=st=Ue=null,su=!1,t)throw Error(B(300));return e}function ep(){var e=Go!==0;return Go=0,e}function Hn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ct===null?Ue.memoizedState=ct=e:ct=ct.next=e,ct}function hn(){if(st===null){var e=Ue.alternate;e=e!==null?e.memoizedState:null}else e=st.next;var t=ct===null?Ue.memoizedState:ct.next;if(t!==null)ct=t,st=e;else{if(e===null)throw Error(B(310));st=e,e={memoizedState:st.memoizedState,baseState:st.baseState,baseQueue:st.baseQueue,queue:st.queue,next:null},ct===null?Ue.memoizedState=ct=e:ct=ct.next=e}return ct}function Yo(e,t){return typeof t=="function"?t(e):t}function Vd(e){var t=hn(),n=t.queue;if(n===null)throw Error(B(311));n.lastRenderedReducer=e;var r=st,i=r.baseQueue,a=n.pending;if(a!==null){if(i!==null){var o=i.next;i.next=a.next,a.next=o}r.baseQueue=i=a,n.pending=null}if(i!==null){a=i.next,r=r.baseState;var l=o=null,c=null,u=a;do{var d=u.lane;if((fi&d)===d)c!==null&&(c=c.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var h={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};c===null?(l=c=h,o=r):c=c.next=h,Ue.lanes|=d,hi|=d}u=u.next}while(u!==null&&u!==a);c===null?o=r:c.next=l,Fn(r,t.memoizedState)||(_t=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=c,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do a=i.lane,Ue.lanes|=a,hi|=a,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function zd(e){var t=hn(),n=t.queue;if(n===null)throw Error(B(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,a=t.memoizedState;if(i!==null){n.pending=null;var o=i=i.next;do a=e(a,o.action),o=o.next;while(o!==i);Fn(a,t.memoizedState)||(_t=!0),t.memoizedState=a,t.baseQueue===null&&(t.baseState=a),n.lastRenderedState=a}return[a,r]}function Jb(){}function ew(e,t){var n=Ue,r=hn(),i=t(),a=!Fn(r.memoizedState,i);if(a&&(r.memoizedState=i,_t=!0),r=r.queue,tp(rw.bind(null,n,r,e),[e]),r.getSnapshot!==t||a||ct!==null&&ct.memoizedState.tag&1){if(n.flags|=2048,Xo(9,nw.bind(null,n,r,i,t),void 0,null),dt===null)throw Error(B(349));fi&30||tw(n,t,i)}return i}function tw(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Ue.updateQueue,t===null?(t={lastEffect:null,stores:null},Ue.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function nw(e,t,n,r){t.value=n,t.getSnapshot=r,sw(t)&&iw(e)}function rw(e,t,n){return n(function(){sw(t)&&iw(e)})}function sw(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Fn(e,n)}catch{return!0}}function iw(e){var t=Sr(e,1);t!==null&&Dn(t,e,1,-1)}function Nx(e){var t=Hn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Yo,lastRenderedState:e},t.queue=e,e=e.dispatch=Dk.bind(null,Ue,e),[t.memoizedState,e]}function Xo(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Ue.updateQueue,t===null?(t={lastEffect:null,stores:null},Ue.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function aw(){return hn().memoizedState}function Nc(e,t,n,r){var i=Hn();Ue.flags|=e,i.memoizedState=Xo(1|t,n,void 0,r===void 0?null:r)}function Iu(e,t,n,r){var i=hn();r=r===void 0?null:r;var a=void 0;if(st!==null){var o=st.memoizedState;if(a=o.destroy,r!==null&&Zm(r,o.deps)){i.memoizedState=Xo(t,n,a,r);return}}Ue.flags|=e,i.memoizedState=Xo(1|t,n,a,r)}function Cx(e,t){return Nc(8390656,8,e,t)}function tp(e,t){return Iu(2048,8,e,t)}function ow(e,t){return Iu(4,2,e,t)}function lw(e,t){return Iu(4,4,e,t)}function cw(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function uw(e,t,n){return n=n!=null?n.concat([e]):null,Iu(4,4,cw.bind(null,t,e),n)}function np(){}function dw(e,t){var n=hn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Zm(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function fw(e,t){var n=hn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Zm(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function hw(e,t,n){return fi&21?(Fn(n,t)||(n=yb(),Ue.lanes|=n,hi|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,_t=!0),e.memoizedState=n)}function Ak(e,t){var n=Ee;Ee=n!==0&&4>n?n:4,e(!0);var r=_d.transition;_d.transition={};try{e(!1),t()}finally{Ee=n,_d.transition=r}}function mw(){return hn().memoizedState}function Rk(e,t,n){var r=gs(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},pw(e))gw(t,n);else if(n=Yb(e,t,n,r),n!==null){var i=Pt();Dn(n,e,r,i),xw(n,t,r)}}function Dk(e,t,n){var r=gs(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(pw(e))gw(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,l=a(o,n);if(i.hasEagerState=!0,i.eagerState=l,Fn(l,o)){var c=t.interleaved;c===null?(i.next=i,Km(t)):(i.next=c.next,c.next=i),t.interleaved=i;return}}catch{}finally{}n=Yb(e,t,i,r),n!==null&&(i=Pt(),Dn(n,e,r,i),xw(n,t,r))}}function pw(e){var t=e.alternate;return e===Ue||t!==null&&t===Ue}function gw(e,t){jo=su=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function xw(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Mm(e,n)}}var iu={readContext:fn,useCallback:xt,useContext:xt,useEffect:xt,useImperativeHandle:xt,useInsertionEffect:xt,useLayoutEffect:xt,useMemo:xt,useReducer:xt,useRef:xt,useState:xt,useDebugValue:xt,useDeferredValue:xt,useTransition:xt,useMutableSource:xt,useSyncExternalStore:xt,useId:xt,unstable_isNewReconciler:!1},Mk={readContext:fn,useCallback:function(e,t){return Hn().memoizedState=[e,t===void 0?null:t],e},useContext:fn,useEffect:Cx,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Nc(4194308,4,cw.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Nc(4194308,4,e,t)},useInsertionEffect:function(e,t){return Nc(4,2,e,t)},useMemo:function(e,t){var n=Hn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Hn();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Rk.bind(null,Ue,e),[r.memoizedState,e]},useRef:function(e){var t=Hn();return e={current:e},t.memoizedState=e},useState:Nx,useDebugValue:np,useDeferredValue:function(e){return Hn().memoizedState=e},useTransition:function(){var e=Nx(!1),t=e[0];return e=Ak.bind(null,e[1]),Hn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Ue,i=Hn();if(Ve){if(n===void 0)throw Error(B(407));n=n()}else{if(n=t(),dt===null)throw Error(B(349));fi&30||tw(r,t,n)}i.memoizedState=n;var a={value:n,getSnapshot:t};return i.queue=a,Cx(rw.bind(null,r,a,e),[e]),r.flags|=2048,Xo(9,nw.bind(null,r,a,n,t),void 0,null),n},useId:function(){var e=Hn(),t=dt.identifierPrefix;if(Ve){var n=wr,r=br;n=(r&~(1<<32-Rn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Go++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=Pk++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Fk={readContext:fn,useCallback:dw,useContext:fn,useEffect:tp,useImperativeHandle:uw,useInsertionEffect:ow,useLayoutEffect:lw,useMemo:fw,useReducer:Vd,useRef:aw,useState:function(){return Vd(Yo)},useDebugValue:np,useDeferredValue:function(e){var t=hn();return hw(t,st.memoizedState,e)},useTransition:function(){var e=Vd(Yo)[0],t=hn().memoizedState;return[e,t]},useMutableSource:Jb,useSyncExternalStore:ew,useId:mw,unstable_isNewReconciler:!1},Lk={readContext:fn,useCallback:dw,useContext:fn,useEffect:tp,useImperativeHandle:uw,useInsertionEffect:ow,useLayoutEffect:lw,useMemo:fw,useReducer:zd,useRef:aw,useState:function(){return zd(Yo)},useDebugValue:np,useDeferredValue:function(e){var t=hn();return st===null?t.memoizedState=e:hw(t,st.memoizedState,e)},useTransition:function(){var e=zd(Yo)[0],t=hn().memoizedState;return[e,t]},useMutableSource:Jb,useSyncExternalStore:ew,useId:mw,unstable_isNewReconciler:!1};function Nn(e,t){if(e&&e.defaultProps){t=He({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function nh(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:He({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var _u={isMounted:function(e){return(e=e._reactInternals)?ji(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Pt(),i=gs(e),a=jr(r,i);a.payload=t,n!=null&&(a.callback=n),t=ms(e,a,i),t!==null&&(Dn(t,e,i,r),wc(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Pt(),i=gs(e),a=jr(r,i);a.tag=1,a.payload=t,n!=null&&(a.callback=n),t=ms(e,a,i),t!==null&&(Dn(t,e,i,r),wc(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Pt(),r=gs(e),i=jr(n,r);i.tag=2,t!=null&&(i.callback=t),t=ms(e,i,r),t!==null&&(Dn(t,e,r,n),wc(t,e,r))}};function Sx(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!Uo(n,r)||!Uo(i,a):!0}function yw(e,t,n){var r=!1,i=js,a=t.contextType;return typeof a=="object"&&a!==null?a=fn(a):(i=$t(t)?ui:jt.current,r=t.contextTypes,a=(r=r!=null)?Na(e,i):js),t=new t(n,a),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=_u,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=a),t}function kx(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&_u.enqueueReplaceState(t,t.state,null)}function rh(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},Qm(e);var a=t.contextType;typeof a=="object"&&a!==null?i.context=fn(a):(a=$t(t)?ui:jt.current,i.context=Na(e,a)),i.state=e.memoizedState,a=t.getDerivedStateFromProps,typeof a=="function"&&(nh(e,t,a,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&_u.enqueueReplaceState(i,i.state,null),nu(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function Ea(e,t){try{var n="",r=t;do n+=cS(r),r=r.return;while(r);var i=n}catch(a){i=` Error generating stack: `+a.message+` `+a.stack}return{value:e,source:t,stack:i,digest:null}}function $d(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function sh(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Ok=typeof WeakMap=="function"?WeakMap:Map;function vw(e,t,n){n=jr(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){ou||(ou=!0,mh=r),sh(e,t)},n}function bw(e,t,n){n=jr(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){sh(e,t)}}var a=e.stateNode;return a!==null&&typeof a.componentDidCatch=="function"&&(n.callback=function(){sh(e,t),typeof r!="function"&&(ps===null?ps=new Set([this]):ps.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function Ex(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Ok;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=Yk.bind(null,e,t,n),t.then(e,e))}function Tx(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Px(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=jr(-1,1),t.tag=2,ms(n,t,1))),n.lanes|=1),e)}var Ik=Dr.ReactCurrentOwner,_t=!1;function kt(e,t,n,r){t.child=e===null?Gb(t,null,n,r):Sa(t,e.child,n,r)}function Ax(e,t,n,r,i){n=n.render;var a=t.ref;return sa(t,i),r=Jm(e,t,n,r,a,i),n=ep(),e!==null&&!_t?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,kr(e,t,i)):(Ve&&n&&$m(t),t.flags|=1,kt(e,t,r,i),t.child)}function Rx(e,t,n,r,i){if(e===null){var a=n.type;return typeof a=="function"&&!up(a)&&a.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=a,ww(e,t,a,r,i)):(e=Ec(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!(e.lanes&i)){var o=a.memoizedProps;if(n=n.compare,n=n!==null?n:Uo,n(o,r)&&e.ref===t.ref)return kr(e,t,i)}return t.flags|=1,e=xs(a,r),e.ref=t.ref,e.return=t,t.child=e}function ww(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Uo(a,r)&&e.ref===t.ref)if(_t=!1,t.pendingProps=r=a,(e.lanes&i)!==0)e.flags&131072&&(_t=!0);else return t.lanes=e.lanes,kr(e,t,i)}return ih(e,t,n,r,i)}function jw(e,t,n){var r=t.pendingProps,i=r.children,a=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},De(qi,Ht),Ht|=n;else{if(!(n&1073741824))return e=a!==null?a.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,De(qi,Ht),Ht|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=a!==null?a.baseLanes:n,De(qi,Ht),Ht|=r}else a!==null?(r=a.baseLanes|n,t.memoizedState=null):r=n,De(qi,Ht),Ht|=r;return kt(e,t,i,n),t.child}function Nw(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function ih(e,t,n,r,i){var a=$t(n)?ui:jt.current;return a=Na(t,a),sa(t,i),n=Jm(e,t,n,r,a,i),r=ep(),e!==null&&!_t?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,kr(e,t,i)):(Ve&&r&&$m(t),t.flags|=1,kt(e,t,n,i),t.child)}function Dx(e,t,n,r,i){if($t(n)){var a=!0;Xc(t)}else a=!1;if(sa(t,i),t.stateNode===null)Cc(e,t),yw(t,n,r),rh(t,n,r,i),r=!0;else if(e===null){var o=t.stateNode,l=t.memoizedProps;o.props=l;var c=o.context,u=n.contextType;typeof u=="object"&&u!==null?u=fn(u):(u=$t(n)?ui:jt.current,u=Na(t,u));var d=n.getDerivedStateFromProps,h=typeof d=="function"||typeof o.getSnapshotBeforeUpdate=="function";h||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(l!==r||c!==u)&&kx(t,o,r,u),Kr=!1;var f=t.memoizedState;o.state=f,nu(t,r,o,i),c=t.memoizedState,l!==r||f!==c||zt.current||Kr?(typeof d=="function"&&(nh(t,n,d,r),c=t.memoizedState),(l=Kr||Sx(t,n,l,r,f,c,u))?(h||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),o.props=r,o.state=c,o.context=u,r=l):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,Xb(e,t),l=t.memoizedProps,u=t.type===t.elementType?l:Nn(t.type,l),o.props=u,h=t.pendingProps,f=o.context,c=n.contextType,typeof c=="object"&&c!==null?c=fn(c):(c=$t(n)?ui:jt.current,c=Na(t,c));var m=n.getDerivedStateFromProps;(d=typeof m=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(l!==h||f!==c)&&kx(t,o,r,c),Kr=!1,f=t.memoizedState,o.state=f,nu(t,r,o,i);var b=t.memoizedState;l!==h||f!==b||zt.current||Kr?(typeof m=="function"&&(nh(t,n,m,r),b=t.memoizedState),(u=Kr||Sx(t,n,u,r,f,b,c)||!1)?(d||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,b,c),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,b,c)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=b),o.props=r,o.state=b,o.context=c,r=u):(typeof o.componentDidUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return ah(e,t,n,r,a,i)}function ah(e,t,n,r,i,a){Nw(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return i&&xx(t,n,!1),kr(e,t,a);r=t.stateNode,Ik.current=t;var l=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=Sa(t,e.child,null,a),t.child=Sa(t,null,l,a)):kt(e,t,l,a),t.memoizedState=r.state,i&&xx(t,n,!0),t.child}function Cw(e){var t=e.stateNode;t.pendingContext?gx(e,t.pendingContext,t.pendingContext!==t.context):t.context&&gx(e,t.context,!1),Gm(e,t.containerInfo)}function Mx(e,t,n,r,i){return Ca(),Um(i),t.flags|=256,kt(e,t,n,r),t.child}var oh={dehydrated:null,treeContext:null,retryLane:0};function lh(e){return{baseLanes:e,cachePool:null,transitions:null}}function Sw(e,t,n){var r=t.pendingProps,i=$e.current,a=!1,o=(t.flags&128)!==0,l;if((l=o)||(l=e!==null&&e.memoizedState===null?!1:(i&2)!==0),l?(a=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),De($e,i&1),e===null)return eh(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=r.children,e=r.fallback,a?(r=t.mode,a=t.child,o={mode:"hidden",children:o},!(r&1)&&a!==null?(a.childLanes=0,a.pendingProps=o):a=$u(o,r,0,null),e=oi(e,r,n,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=lh(n),t.memoizedState=oh,e):rp(t,o));if(i=e.memoizedState,i!==null&&(l=i.dehydrated,l!==null))return _k(e,t,o,r,l,i,n);if(a){a=r.fallback,o=t.mode,i=e.child,l=i.sibling;var c={mode:"hidden",children:r.children};return!(o&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=c,t.deletions=null):(r=xs(i,c),r.subtreeFlags=i.subtreeFlags&14680064),l!==null?a=xs(l,a):(a=oi(a,o,n,null),a.flags|=2),a.return=t,r.return=t,r.sibling=a,t.child=r,r=a,a=t.child,o=e.child.memoizedState,o=o===null?lh(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},a.memoizedState=o,a.childLanes=e.childLanes&~n,t.memoizedState=oh,r}return a=e.child,e=a.sibling,r=xs(a,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function rp(e,t){return t=$u({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Xl(e,t,n,r){return r!==null&&Um(r),Sa(t,e.child,null,n),e=rp(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function _k(e,t,n,r,i,a,o){if(n)return t.flags&256?(t.flags&=-257,r=$d(Error(B(422))),Xl(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(a=r.fallback,i=t.mode,r=$u({mode:"visible",children:r.children},i,0,null),a=oi(a,i,o,null),a.flags|=2,r.return=t,a.return=t,r.sibling=a,t.child=r,t.mode&1&&Sa(t,e.child,null,o),t.child.memoizedState=lh(o),t.memoizedState=oh,a);if(!(t.mode&1))return Xl(e,t,o,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var l=r.dgst;return r=l,a=Error(B(419)),r=$d(a,r,void 0),Xl(e,t,o,r)}if(l=(o&e.childLanes)!==0,_t||l){if(r=dt,r!==null){switch(o&-o){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|o)?0:i,i!==0&&i!==a.retryLane&&(a.retryLane=i,Sr(e,i),Dn(r,e,i,-1))}return cp(),r=$d(Error(B(421))),Xl(e,t,o,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=Xk.bind(null,e),i._reactRetry=t,null):(e=a.treeContext,Kt=hs(i.nextSibling),Gt=t,Ve=!0,En=null,e!==null&&(on[ln++]=br,on[ln++]=wr,on[ln++]=di,br=e.id,wr=e.overflow,di=t),t=rp(t,r.children),t.flags|=4096,t)}function Fx(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),th(e.return,t,n)}function Bd(e,t,n,r,i){var a=e.memoizedState;a===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=i)}function kw(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;if(kt(e,t,r.children,n),r=$e.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Fx(e,n,t);else if(e.tag===19)Fx(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(De($e,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&ru(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Bd(t,!1,i,n,a);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&ru(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Bd(t,!0,n,null,a);break;case"together":Bd(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Cc(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function kr(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),hi|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(B(153));if(t.child!==null){for(e=t.child,n=xs(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=xs(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Vk(e,t,n){switch(t.tag){case 3:Cw(t),Ca();break;case 5:Zb(t);break;case 1:$t(t.type)&&Xc(t);break;case 4:Gm(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;De(eu,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(De($e,$e.current&1),t.flags|=128,null):n&t.child.childLanes?Sw(e,t,n):(De($e,$e.current&1),e=kr(e,t,n),e!==null?e.sibling:null);De($e,$e.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return kw(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),De($e,$e.current),r)break;return null;case 22:case 23:return t.lanes=0,jw(e,t,n)}return kr(e,t,n)}var Ew,ch,Tw,Pw;Ew=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};ch=function(){};Tw=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,qs(tr.current);var a=null;switch(n){case"input":i=Rf(e,i),r=Rf(e,r),a=[];break;case"select":i=He({},i,{value:void 0}),r=He({},r,{value:void 0}),a=[];break;case"textarea":i=Ff(e,i),r=Ff(e,r),a=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Gc)}Of(n,r);var o;n=null;for(u in i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var l=i[u];for(o in l)l.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Oo.hasOwnProperty(u)?a||(a=[]):(a=a||[]).push(u,null));for(u in r){var c=r[u];if(l=i!=null?i[u]:void 0,r.hasOwnProperty(u)&&c!==l&&(c!=null||l!=null))if(u==="style")if(l){for(o in l)!l.hasOwnProperty(o)||c&&c.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in c)c.hasOwnProperty(o)&&l[o]!==c[o]&&(n||(n={}),n[o]=c[o])}else n||(a||(a=[]),a.push(u,n)),n=c;else u==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,l=l?l.__html:void 0,c!=null&&l!==c&&(a=a||[]).push(u,c)):u==="children"?typeof c!="string"&&typeof c!="number"||(a=a||[]).push(u,""+c):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Oo.hasOwnProperty(u)?(c!=null&&u==="onScroll"&&Fe("scroll",e),a||l===c||(a=[])):(a=a||[]).push(u,c))}n&&(a=a||[]).push("style",n);var u=a;(t.updateQueue=u)&&(t.flags|=4)}};Pw=function(e,t,n,r){n!==r&&(t.flags|=4)};function to(e,t){if(!Ve)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function yt(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function zk(e,t,n){var r=t.pendingProps;switch(Bm(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return yt(t),null;case 1:return $t(t.type)&&Yc(),yt(t),null;case 3:return r=t.stateNode,ka(),Le(zt),Le(jt),Xm(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Gl(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,En!==null&&(xh(En),En=null))),ch(e,t),yt(t),null;case 5:Ym(t);var i=qs(Qo.current);if(n=t.type,e!==null&&t.stateNode!=null)Tw(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(B(166));return yt(t),null}if(e=qs(tr.current),Gl(t)){r=t.stateNode,n=t.type;var a=t.memoizedProps;switch(r[Yn]=t,r[qo]=a,e=(t.mode&1)!==0,n){case"dialog":Fe("cancel",r),Fe("close",r);break;case"iframe":case"object":case"embed":Fe("load",r);break;case"video":case"audio":for(i=0;i<ho.length;i++)Fe(ho[i],r);break;case"source":Fe("error",r);break;case"img":case"image":case"link":Fe("error",r),Fe("load",r);break;case"details":Fe("toggle",r);break;case"input":Ug(r,a),Fe("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!a.multiple},Fe("invalid",r);break;case"textarea":Hg(r,a),Fe("invalid",r)}Of(n,a),i=null;for(var o in a)if(a.hasOwnProperty(o)){var l=a[o];o==="children"?typeof l=="string"?r.textContent!==l&&(a.suppressHydrationWarning!==!0&&Ql(r.textContent,l,e),i=["children",l]):typeof l=="number"&&r.textContent!==""+l&&(a.suppressHydrationWarning!==!0&&Ql(r.textContent,l,e),i=["children",""+l]):Oo.hasOwnProperty(o)&&l!=null&&o==="onScroll"&&Fe("scroll",r)}switch(n){case"input":zl(r),Wg(r,a,!0);break;case"textarea":zl(r),qg(r);break;case"select":case"option":break;default:typeof a.onClick=="function"&&(r.onclick=Gc)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{o=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=rb(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[Yn]=t,e[qo]=r,Ew(e,t,!1,!1),t.stateNode=e;e:{switch(o=If(n,r),n){case"dialog":Fe("cancel",e),Fe("close",e),i=r;break;case"iframe":case"object":case"embed":Fe("load",e),i=r;break;case"video":case"audio":for(i=0;i<ho.length;i++)Fe(ho[i],e);i=r;break;case"source":Fe("error",e),i=r;break;case"img":case"image":case"link":Fe("error",e),Fe("load",e),i=r;break;case"details":Fe("toggle",e),i=r;break;case"input":Ug(e,r),i=Rf(e,r),Fe("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=He({},r,{value:void 0}),Fe("invalid",e);break;case"textarea":Hg(e,r),i=Ff(e,r),Fe("invalid",e);break;default:i=r}Of(n,i),l=i;for(a in l)if(l.hasOwnProperty(a)){var c=l[a];a==="style"?ab(e,c):a==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&sb(e,c)):a==="children"?typeof c=="string"?(n!=="textarea"||c!=="")&&Io(e,c):typeof c=="number"&&Io(e,""+c):a!=="suppressContentEditableWarning"&&a!=="suppressHydrationWarning"&&a!=="autoFocus"&&(Oo.hasOwnProperty(a)?c!=null&&a==="onScroll"&&Fe("scroll",e):c!=null&&Em(e,a,c,o))}switch(n){case"input":zl(e),Wg(e,r,!1);break;case"textarea":zl(e),qg(e);break;case"option":r.value!=null&&e.setAttribute("value",""+ws(r.value));break;case"select":e.multiple=!!r.multiple,a=r.value,a!=null?ea(e,!!r.multiple,a,!1):r.defaultValue!=null&&ea(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=Gc)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return yt(t),null;case 6:if(e&&t.stateNode!=null)Pw(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(B(166));if(n=qs(Qo.current),qs(tr.current),Gl(t)){if(r=t.stateNode,n=t.memoizedProps,r[Yn]=t,(a=r.nodeValue!==n)&&(e=Gt,e!==null))switch(e.tag){case 3:Ql(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Ql(r.nodeValue,n,(e.mode&1)!==0)}a&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Yn]=t,t.stateNode=r}return yt(t),null;case 13:if(Le($e),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Ve&&Kt!==null&&t.mode&1&&!(t.flags&128))Kb(),Ca(),t.flags|=98560,a=!1;else if(a=Gl(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(B(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(B(317));a[Yn]=t}else Ca(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;yt(t),a=!1}else En!==null&&(xh(En),En=null),a=!0;if(!a)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||$e.current&1?it===0&&(it=3):cp())),t.updateQueue!==null&&(t.flags|=4),yt(t),null);case 4:return ka(),ch(e,t),e===null&&Wo(t.stateNode.containerInfo),yt(t),null;case 10:return qm(t.type._context),yt(t),null;case 17:return $t(t.type)&&Yc(),yt(t),null;case 19:if(Le($e),a=t.memoizedState,a===null)return yt(t),null;if(r=(t.flags&128)!==0,o=a.rendering,o===null)if(r)to(a,!1);else{if(it!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=ru(e),o!==null){for(t.flags|=128,to(a,!1),r=o.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)a=n,e=r,a.flags&=14680066,o=a.alternate,o===null?(a.childLanes=0,a.lanes=e,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=o.childLanes,a.lanes=o.lanes,a.child=o.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=o.memoizedProps,a.memoizedState=o.memoizedState,a.updateQueue=o.updateQueue,a.type=o.type,e=o.dependencies,a.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return De($e,$e.current&1|2),t.child}e=e.sibling}a.tail!==null&&Ye()>Ta&&(t.flags|=128,r=!0,to(a,!1),t.lanes=4194304)}else{if(!r)if(e=ru(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),to(a,!0),a.tail===null&&a.tailMode==="hidden"&&!o.alternate&&!Ve)return yt(t),null}else 2*Ye()-a.renderingStartTime>Ta&&n!==1073741824&&(t.flags|=128,r=!0,to(a,!1),t.lanes=4194304);a.isBackwards?(o.sibling=t.child,t.child=o):(n=a.last,n!==null?n.sibling=o:t.child=o,a.last=o)}return a.tail!==null?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=Ye(),t.sibling=null,n=$e.current,De($e,r?n&1|2:n&1),t):(yt(t),null);case 22:case 23:return lp(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Ht&1073741824&&(yt(t),t.subtreeFlags&6&&(t.flags|=8192)):yt(t),null;case 24:return null;case 25:return null}throw Error(B(156,t.tag))}function $k(e,t){switch(Bm(t),t.tag){case 1:return $t(t.type)&&Yc(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ka(),Le(zt),Le(jt),Xm(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Ym(t),null;case 13:if(Le($e),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(B(340));Ca()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Le($e),null;case 4:return ka(),null;case 10:return qm(t.type._context),null;case 22:case 23:return lp(),null;case 24:return null;default:return null}}var Zl=!1,bt=!1,Bk=typeof WeakSet=="function"?WeakSet:Set,Z=null;function Hi(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Qe(e,t,r)}else n.current=null}function uh(e,t,n){try{n()}catch(r){Qe(e,t,r)}}var Lx=!1;function Uk(e,t){if(Kf=qc,e=Fb(),zm(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{n.nodeType,a.nodeType}catch{n=null;break e}var o=0,l=-1,c=-1,u=0,d=0,h=e,f=null;t:for(;;){for(var m;h!==n||i!==0&&h.nodeType!==3||(l=o+i),h!==a||r!==0&&h.nodeType!==3||(c=o+r),h.nodeType===3&&(o+=h.nodeValue.length),(m=h.firstChild)!==null;)f=h,h=m;for(;;){if(h===e)break t;if(f===n&&++u===i&&(l=o),f===a&&++d===r&&(c=o),(m=h.nextSibling)!==null)break;h=f,f=h.parentNode}h=m}n=l===-1||c===-1?null:{start:l,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(Qf={focusedElem:e,selectionRange:n},qc=!1,Z=t;Z!==null;)if(t=Z,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Z=e;else for(;Z!==null;){t=Z;try{var b=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(b!==null){var g=b.memoizedProps,v=b.memoizedState,x=t.stateNode,y=x.getSnapshotBeforeUpdate(t.elementType===t.type?g:Nn(t.type,g),v);x.__reactInternalSnapshotBeforeUpdate=y}break;case 3:var w=t.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(B(163))}}catch(j){Qe(t,t.return,j)}if(e=t.sibling,e!==null){e.return=t.return,Z=e;break}Z=t.return}return b=Lx,Lx=!1,b}function No(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var a=i.destroy;i.destroy=void 0,a!==void 0&&uh(t,n,a)}i=i.next}while(i!==r)}}function Vu(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function dh(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Aw(e){var t=e.alternate;t!==null&&(e.alternate=null,Aw(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Yn],delete t[qo],delete t[Xf],delete t[Sk],delete t[kk])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Rw(e){return e.tag===5||e.tag===3||e.tag===4}function Ox(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Rw(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function fh(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Gc));else if(r!==4&&(e=e.child,e!==null))for(fh(e,t,n),e=e.sibling;e!==null;)fh(e,t,n),e=e.sibling}function hh(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(hh(e,t,n),e=e.sibling;e!==null;)hh(e,t,n),e=e.sibling}var ft=null,kn=!1;function Vr(e,t,n){for(n=n.child;n!==null;)Dw(e,t,n),n=n.sibling}function Dw(e,t,n){if(er&&typeof er.onCommitFiberUnmount=="function")try{er.onCommitFiberUnmount(Ru,n)}catch{}switch(n.tag){case 5:bt||Hi(n,t);case 6:var r=ft,i=kn;ft=null,Vr(e,t,n),ft=r,kn=i,ft!==null&&(kn?(e=ft,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):ft.removeChild(n.stateNode));break;case 18:ft!==null&&(kn?(e=ft,n=n.stateNode,e.nodeType===8?Ld(e.parentNode,n):e.nodeType===1&&Ld(e,n),$o(e)):Ld(ft,n.stateNode));break;case 4:r=ft,i=kn,ft=n.stateNode.containerInfo,kn=!0,Vr(e,t,n),ft=r,kn=i;break;case 0:case 11:case 14:case 15:if(!bt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var a=i,o=a.destroy;a=a.tag,o!==void 0&&(a&2||a&4)&&uh(n,t,o),i=i.next}while(i!==r)}Vr(e,t,n);break;case 1:if(!bt&&(Hi(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){Qe(n,t,l)}Vr(e,t,n);break;case 21:Vr(e,t,n);break;case 22:n.mode&1?(bt=(r=bt)||n.memoizedState!==null,Vr(e,t,n),bt=r):Vr(e,t,n);break;default:Vr(e,t,n)}}function Ix(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Bk),t.forEach(function(r){var i=Zk.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function bn(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var a=e,o=t,l=o;e:for(;l!==null;){switch(l.tag){case 5:ft=l.stateNode,kn=!1;break e;case 3:ft=l.stateNode.containerInfo,kn=!0;break e;case 4:ft=l.stateNode.containerInfo,kn=!0;break e}l=l.return}if(ft===null)throw Error(B(160));Dw(a,o,i),ft=null,kn=!1;var c=i.alternate;c!==null&&(c.return=null),i.return=null}catch(u){Qe(i,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Mw(t,e),t=t.sibling}function Mw(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(bn(t,e),Wn(e),r&4){try{No(3,e,e.return),Vu(3,e)}catch(g){Qe(e,e.return,g)}try{No(5,e,e.return)}catch(g){Qe(e,e.return,g)}}break;case 1:bn(t,e),Wn(e),r&512&&n!==null&&Hi(n,n.return);break;case 5:if(bn(t,e),Wn(e),r&512&&n!==null&&Hi(n,n.return),e.flags&32){var i=e.stateNode;try{Io(i,"")}catch(g){Qe(e,e.return,g)}}if(r&4&&(i=e.stateNode,i!=null)){var a=e.memoizedProps,o=n!==null?n.memoizedProps:a,l=e.type,c=e.updateQueue;if(e.updateQueue=null,c!==null)try{l==="input"&&a.type==="radio"&&a.name!=null&&tb(i,a),If(l,o);var u=If(l,a);for(o=0;o<c.length;o+=2){var d=c[o],h=c[o+1];d==="style"?ab(i,h):d==="dangerouslySetInnerHTML"?sb(i,h):d==="children"?Io(i,h):Em(i,d,h,u)}switch(l){case"input":Df(i,a);break;case"textarea":nb(i,a);break;case"select":var f=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!a.multiple;var m=a.value;m!=null?ea(i,!!a.multiple,m,!1):f!==!!a.multiple&&(a.defaultValue!=null?ea(i,!!a.multiple,a.defaultValue,!0):ea(i,!!a.multiple,a.multiple?[]:"",!1))}i[qo]=a}catch(g){Qe(e,e.return,g)}}break;case 6:if(bn(t,e),Wn(e),r&4){if(e.stateNode===null)throw Error(B(162));i=e.stateNode,a=e.memoizedProps;try{i.nodeValue=a}catch(g){Qe(e,e.return,g)}}break;case 3:if(bn(t,e),Wn(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{$o(t.containerInfo)}catch(g){Qe(e,e.return,g)}break;case 4:bn(t,e),Wn(e);break;case 13:bn(t,e),Wn(e),i=e.child,i.flags&8192&&(a=i.memoizedState!==null,i.stateNode.isHidden=a,!a||i.alternate!==null&&i.alternate.memoizedState!==null||(ap=Ye())),r&4&&Ix(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(bt=(u=bt)||d,bn(t,e),bt=u):bn(t,e),Wn(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for(Z=e,d=e.child;d!==null;){for(h=Z=d;Z!==null;){switch(f=Z,m=f.child,f.tag){case 0:case 11:case 14:case 15:No(4,f,f.return);break;case 1:Hi(f,f.return);var b=f.stateNode;if(typeof b.componentWillUnmount=="function"){r=f,n=f.return;try{t=r,b.props=t.memoizedProps,b.state=t.memoizedState,b.componentWillUnmount()}catch(g){Qe(r,n,g)}}break;case 5:Hi(f,f.return);break;case 22:if(f.memoizedState!==null){Vx(h);continue}}m!==null?(m.return=f,Z=m):Vx(h)}d=d.sibling}e:for(d=null,h=e;;){if(h.tag===5){if(d===null){d=h;try{i=h.stateNode,u?(a=i.style,typeof a.setProperty=="function"?a.setProperty("display","none","important"):a.display="none"):(l=h.stateNode,c=h.memoizedProps.style,o=c!=null&&c.hasOwnProperty("display")?c.display:null,l.style.display=ib("display",o))}catch(g){Qe(e,e.return,g)}}}else if(h.tag===6){if(d===null)try{h.stateNode.nodeValue=u?"":h.memoizedProps}catch(g){Qe(e,e.return,g)}}else if((h.tag!==22&&h.tag!==23||h.memoizedState===null||h===e)&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===e)break e;for(;h.sibling===null;){if(h.return===null||h.return===e)break e;d===h&&(d=null),h=h.return}d===h&&(d=null),h.sibling.return=h.return,h=h.sibling}}break;case 19:bn(t,e),Wn(e),r&4&&Ix(e);break;case 21:break;default:bn(t,e),Wn(e)}}function Wn(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Rw(n)){var r=n;break e}n=n.return}throw Error(B(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(Io(i,""),r.flags&=-33);var a=Ox(e);hh(e,a,i);break;case 3:case 4:var o=r.stateNode.containerInfo,l=Ox(e);fh(e,l,o);break;default:throw Error(B(161))}}catch(c){Qe(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Wk(e,t,n){Z=e,Fw(e)}function Fw(e,t,n){for(var r=(e.mode&1)!==0;Z!==null;){var i=Z,a=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||Zl;if(!o){var l=i.alternate,c=l!==null&&l.memoizedState!==null||bt;l=Zl;var u=bt;if(Zl=o,(bt=c)&&!u)for(Z=i;Z!==null;)o=Z,c=o.child,o.tag===22&&o.memoizedState!==null?zx(i):c!==null?(c.return=o,Z=c):zx(i);for(;a!==null;)Z=a,Fw(a),a=a.sibling;Z=i,Zl=l,bt=u}_x(e)}else i.subtreeFlags&8772&&a!==null?(a.return=i,Z=a):_x(e)}}function _x(e){for(;Z!==null;){var t=Z;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:bt||Vu(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!bt)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:Nn(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;a!==null&&jx(t,a,r);break;case 3:var o=t.updateQueue;if(o!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}jx(t,o,n)}break;case 5:var l=t.stateNode;if(n===null&&t.flags&4){n=l;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&n.focus();break;case"img":c.src&&(n.src=c.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var d=u.memoizedState;if(d!==null){var h=d.dehydrated;h!==null&&$o(h)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(B(163))}bt||t.flags&512&&dh(t)}catch(f){Qe(t,t.return,f)}}if(t===e){Z=null;break}if(n=t.sibling,n!==null){n.return=t.return,Z=n;break}Z=t.return}}function Vx(e){for(;Z!==null;){var t=Z;if(t===e){Z=null;break}var n=t.sibling;if(n!==null){n.return=t.return,Z=n;break}Z=t.return}}function zx(e){for(;Z!==null;){var t=Z;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Vu(4,t)}catch(c){Qe(t,n,c)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(c){Qe(t,i,c)}}var a=t.return;try{dh(t)}catch(c){Qe(t,a,c)}break;case 5:var o=t.return;try{dh(t)}catch(c){Qe(t,o,c)}}}catch(c){Qe(t,t.return,c)}if(t===e){Z=null;break}var l=t.sibling;if(l!==null){l.return=t.return,Z=l;break}Z=t.return}}var Hk=Math.ceil,au=Dr.ReactCurrentDispatcher,sp=Dr.ReactCurrentOwner,dn=Dr.ReactCurrentBatchConfig,Ne=0,dt=null,rt=null,pt=0,Ht=0,qi=Ts(0),it=0,Zo=null,hi=0,zu=0,ip=0,Co=null,It=null,ap=0,Ta=1/0,xr=null,ou=!1,mh=null,ps=null,Jl=!1,ls=null,lu=0,So=0,ph=null,Sc=-1,kc=0;function Pt(){return Ne&6?Ye():Sc!==-1?Sc:Sc=Ye()}function gs(e){return e.mode&1?Ne&2&&pt!==0?pt&-pt:Tk.transition!==null?(kc===0&&(kc=yb()),kc):(e=Ee,e!==0||(e=window.event,e=e===void 0?16:Sb(e.type)),e):1}function Dn(e,t,n,r){if(50<So)throw So=0,ph=null,Error(B(185));xl(e,n,r),(!(Ne&2)||e!==dt)&&(e===dt&&(!(Ne&2)&&(zu|=n),it===4&&Gr(e,pt)),Bt(e,r),n===1&&Ne===0&&!(t.mode&1)&&(Ta=Ye()+500,Ou&&Ps()))}function Bt(e,t){var n=e.callbackNode;TS(e,t);var r=Hc(e,e===dt?pt:0);if(r===0)n!==null&&Gg(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Gg(n),t===1)e.tag===0?Ek($x.bind(null,e)):Wb($x.bind(null,e)),Nk(function(){!(Ne&6)&&Ps()}),n=null;else{switch(vb(r)){case 1:n=Dm;break;case 4:n=gb;break;case 16:n=Wc;break;case 536870912:n=xb;break;default:n=Wc}n=Bw(n,Lw.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Lw(e,t){if(Sc=-1,kc=0,Ne&6)throw Error(B(327));var n=e.callbackNode;if(ia()&&e.callbackNode!==n)return null;var r=Hc(e,e===dt?pt:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=cu(e,r);else{t=r;var i=Ne;Ne|=2;var a=Iw();(dt!==e||pt!==t)&&(xr=null,Ta=Ye()+500,ai(e,t));do try{Qk();break}catch(l){Ow(e,l)}while(!0);Hm(),au.current=a,Ne=i,rt!==null?t=0:(dt=null,pt=0,t=it)}if(t!==0){if(t===2&&(i=Bf(e),i!==0&&(r=i,t=gh(e,i))),t===1)throw n=Zo,ai(e,0),Gr(e,r),Bt(e,Ye()),n;if(t===6)Gr(e,r);else{if(i=e.current.alternate,!(r&30)&&!qk(i)&&(t=cu(e,r),t===2&&(a=Bf(e),a!==0&&(r=a,t=gh(e,a))),t===1))throw n=Zo,ai(e,0),Gr(e,r),Bt(e,Ye()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(B(345));case 2:Bs(e,It,xr);break;case 3:if(Gr(e,r),(r&130023424)===r&&(t=ap+500-Ye(),10<t)){if(Hc(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){Pt(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=Yf(Bs.bind(null,e,It,xr),t);break}Bs(e,It,xr);break;case 4:if(Gr(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var o=31-Rn(r);a=1<<o,o=t[o],o>i&&(i=o),r&=~a}if(r=i,r=Ye()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Hk(r/1960))-r,10<r){e.timeoutHandle=Yf(Bs.bind(null,e,It,xr),r);break}Bs(e,It,xr);break;case 5:Bs(e,It,xr);break;default:throw Error(B(329))}}}return Bt(e,Ye()),e.callbackNode===n?Lw.bind(null,e):null}function gh(e,t){var n=Co;return e.current.memoizedState.isDehydrated&&(ai(e,t).flags|=256),e=cu(e,t),e!==2&&(t=It,It=n,t!==null&&xh(t)),e}function xh(e){It===null?It=e:It.push.apply(It,e)}function qk(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Fn(a(),i))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 Gr(e,t){for(t&=~ip,t&=~zu,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Rn(t),r=1<<n;e[n]=-1,t&=~r}}function $x(e){if(Ne&6)throw Error(B(327));ia();var t=Hc(e,0);if(!(t&1))return Bt(e,Ye()),null;var n=cu(e,t);if(e.tag!==0&&n===2){var r=Bf(e);r!==0&&(t=r,n=gh(e,r))}if(n===1)throw n=Zo,ai(e,0),Gr(e,t),Bt(e,Ye()),n;if(n===6)throw Error(B(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Bs(e,It,xr),Bt(e,Ye()),null}function op(e,t){var n=Ne;Ne|=1;try{return e(t)}finally{Ne=n,Ne===0&&(Ta=Ye()+500,Ou&&Ps())}}function mi(e){ls!==null&&ls.tag===0&&!(Ne&6)&&ia();var t=Ne;Ne|=1;var n=dn.transition,r=Ee;try{if(dn.transition=null,Ee=1,e)return e()}finally{Ee=r,dn.transition=n,Ne=t,!(Ne&6)&&Ps()}}function lp(){Ht=qi.current,Le(qi)}function ai(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,jk(n)),rt!==null)for(n=rt.return;n!==null;){var r=n;switch(Bm(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Yc();break;case 3:ka(),Le(zt),Le(jt),Xm();break;case 5:Ym(r);break;case 4:ka();break;case 13:Le($e);break;case 19:Le($e);break;case 10:qm(r.type._context);break;case 22:case 23:lp()}n=n.return}if(dt=e,rt=e=xs(e.current,null),pt=Ht=t,it=0,Zo=null,ip=zu=hi=0,It=Co=null,Hs!==null){for(t=0;t<Hs.length;t++)if(n=Hs[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,a=n.pending;if(a!==null){var o=a.next;a.next=i,r.next=o}n.pending=r}Hs=null}return e}function Ow(e,t){do{var n=rt;try{if(Hm(),jc.current=iu,su){for(var r=Ue.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}su=!1}if(fi=0,ct=st=Ue=null,jo=!1,Go=0,sp.current=null,n===null||n.return===null){it=1,Zo=t,rt=null;break}e:{var a=e,o=n.return,l=n,c=t;if(t=pt,l.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){var u=c,d=l,h=d.tag;if(!(d.mode&1)&&(h===0||h===11||h===15)){var f=d.alternate;f?(d.updateQueue=f.updateQueue,d.memoizedState=f.memoizedState,d.lanes=f.lanes):(d.updateQueue=null,d.memoizedState=null)}var m=Tx(o);if(m!==null){m.flags&=-257,Px(m,o,l,a,t),m.mode&1&&Ex(a,u,t),t=m,c=u;var b=t.updateQueue;if(b===null){var g=new Set;g.add(c),t.updateQueue=g}else b.add(c);break e}else{if(!(t&1)){Ex(a,u,t),cp();break e}c=Error(B(426))}}else if(Ve&&l.mode&1){var v=Tx(o);if(v!==null){!(v.flags&65536)&&(v.flags|=256),Px(v,o,l,a,t),Um(Ea(c,l));break e}}a=c=Ea(c,l),it!==4&&(it=2),Co===null?Co=[a]:Co.push(a),a=o;do{switch(a.tag){case 3:a.flags|=65536,t&=-t,a.lanes|=t;var x=vw(a,c,t);wx(a,x);break e;case 1:l=c;var y=a.type,w=a.stateNode;if(!(a.flags&128)&&(typeof y.getDerivedStateFromError=="function"||w!==null&&typeof w.componentDidCatch=="function"&&(ps===null||!ps.has(w)))){a.flags|=65536,t&=-t,a.lanes|=t;var j=bw(a,l,t);wx(a,j);break e}}a=a.return}while(a!==null)}Vw(n)}catch(C){t=C,rt===n&&n!==null&&(rt=n=n.return);continue}break}while(!0)}function Iw(){var e=au.current;return au.current=iu,e===null?iu:e}function cp(){(it===0||it===3||it===2)&&(it=4),dt===null||!(hi&268435455)&&!(zu&268435455)||Gr(dt,pt)}function cu(e,t){var n=Ne;Ne|=2;var r=Iw();(dt!==e||pt!==t)&&(xr=null,ai(e,t));do try{Kk();break}catch(i){Ow(e,i)}while(!0);if(Hm(),Ne=n,au.current=r,rt!==null)throw Error(B(261));return dt=null,pt=0,it}function Kk(){for(;rt!==null;)_w(rt)}function Qk(){for(;rt!==null&&!vS();)_w(rt)}function _w(e){var t=$w(e.alternate,e,Ht);e.memoizedProps=e.pendingProps,t===null?Vw(e):rt=t,sp.current=null}function Vw(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=$k(n,t),n!==null){n.flags&=32767,rt=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{it=6,rt=null;return}}else if(n=zk(n,t,Ht),n!==null){rt=n;return}if(t=t.sibling,t!==null){rt=t;return}rt=t=e}while(t!==null);it===0&&(it=5)}function Bs(e,t,n){var r=Ee,i=dn.transition;try{dn.transition=null,Ee=1,Gk(e,t,n,r)}finally{dn.transition=i,Ee=r}return null}function Gk(e,t,n,r){do ia();while(ls!==null);if(Ne&6)throw Error(B(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(B(177));e.callbackNode=null,e.callbackPriority=0;var a=n.lanes|n.childLanes;if(PS(e,a),e===dt&&(rt=dt=null,pt=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Jl||(Jl=!0,Bw(Wc,function(){return ia(),null})),a=(n.flags&15990)!==0,n.subtreeFlags&15990||a){a=dn.transition,dn.transition=null;var o=Ee;Ee=1;var l=Ne;Ne|=4,sp.current=null,Uk(e,n),Mw(n,e),pk(Qf),qc=!!Kf,Qf=Kf=null,e.current=n,Wk(n),bS(),Ne=l,Ee=o,dn.transition=a}else e.current=n;if(Jl&&(Jl=!1,ls=e,lu=i),a=e.pendingLanes,a===0&&(ps=null),NS(n.stateNode),Bt(e,Ye()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(ou)throw ou=!1,e=mh,mh=null,e;return lu&1&&e.tag!==0&&ia(),a=e.pendingLanes,a&1?e===ph?So++:(So=0,ph=e):So=0,Ps(),null}function ia(){if(ls!==null){var e=vb(lu),t=dn.transition,n=Ee;try{if(dn.transition=null,Ee=16>e?16:e,ls===null)var r=!1;else{if(e=ls,ls=null,lu=0,Ne&6)throw Error(B(331));var i=Ne;for(Ne|=4,Z=e.current;Z!==null;){var a=Z,o=a.child;if(Z.flags&16){var l=a.deletions;if(l!==null){for(var c=0;c<l.length;c++){var u=l[c];for(Z=u;Z!==null;){var d=Z;switch(d.tag){case 0:case 11:case 15:No(8,d,a)}var h=d.child;if(h!==null)h.return=d,Z=h;else for(;Z!==null;){d=Z;var f=d.sibling,m=d.return;if(Aw(d),d===u){Z=null;break}if(f!==null){f.return=m,Z=f;break}Z=m}}}var b=a.alternate;if(b!==null){var g=b.child;if(g!==null){b.child=null;do{var v=g.sibling;g.sibling=null,g=v}while(g!==null)}}Z=a}}if(a.subtreeFlags&2064&&o!==null)o.return=a,Z=o;else e:for(;Z!==null;){if(a=Z,a.flags&2048)switch(a.tag){case 0:case 11:case 15:No(9,a,a.return)}var x=a.sibling;if(x!==null){x.return=a.return,Z=x;break e}Z=a.return}}var y=e.current;for(Z=y;Z!==null;){o=Z;var w=o.child;if(o.subtreeFlags&2064&&w!==null)w.return=o,Z=w;else e:for(o=y;Z!==null;){if(l=Z,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:Vu(9,l)}}catch(C){Qe(l,l.return,C)}if(l===o){Z=null;break e}var j=l.sibling;if(j!==null){j.return=l.return,Z=j;break e}Z=l.return}}if(Ne=i,Ps(),er&&typeof er.onPostCommitFiberRoot=="function")try{er.onPostCommitFiberRoot(Ru,e)}catch{}r=!0}return r}finally{Ee=n,dn.transition=t}}return!1}function Bx(e,t,n){t=Ea(n,t),t=vw(e,t,1),e=ms(e,t,1),t=Pt(),e!==null&&(xl(e,1,t),Bt(e,t))}function Qe(e,t,n){if(e.tag===3)Bx(e,e,n);else for(;t!==null;){if(t.tag===3){Bx(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(ps===null||!ps.has(r))){e=Ea(n,e),e=bw(t,e,1),t=ms(t,e,1),e=Pt(),t!==null&&(xl(t,1,e),Bt(t,e));break}}t=t.return}}function Yk(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Pt(),e.pingedLanes|=e.suspendedLanes&n,dt===e&&(pt&n)===n&&(it===4||it===3&&(pt&130023424)===pt&&500>Ye()-ap?ai(e,0):ip|=n),Bt(e,t)}function zw(e,t){t===0&&(e.mode&1?(t=Ul,Ul<<=1,!(Ul&130023424)&&(Ul=4194304)):t=1);var n=Pt();e=Sr(e,t),e!==null&&(xl(e,t,n),Bt(e,n))}function Xk(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),zw(e,n)}function Zk(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(B(314))}r!==null&&r.delete(t),zw(e,n)}var $w;$w=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||zt.current)_t=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return _t=!1,Vk(e,t,n);_t=!!(e.flags&131072)}else _t=!1,Ve&&t.flags&1048576&&Hb(t,Jc,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Cc(e,t),e=t.pendingProps;var i=Na(t,jt.current);sa(t,n),i=Jm(null,t,r,e,i,n);var a=ep();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,$t(r)?(a=!0,Xc(t)):a=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Qm(t),i.updater=_u,t.stateNode=i,i._reactInternals=t,rh(t,r,e,n),t=ah(null,t,r,!0,a,n)):(t.tag=0,Ve&&a&&$m(t),kt(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Cc(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=eE(r),e=Nn(r,e),i){case 0:t=ih(null,t,r,e,n);break e;case 1:t=Dx(null,t,r,e,n);break e;case 11:t=Ax(null,t,r,e,n);break e;case 14:t=Rx(null,t,r,Nn(r.type,e),n);break e}throw Error(B(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Nn(r,i),ih(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Nn(r,i),Dx(e,t,r,i,n);case 3:e:{if(Cw(t),e===null)throw Error(B(387));r=t.pendingProps,a=t.memoizedState,i=a.element,Xb(e,t),nu(t,r,null,n);var o=t.memoizedState;if(r=o.element,a.isDehydrated)if(a={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){i=Ea(Error(B(423)),t),t=Mx(e,t,r,n,i);break e}else if(r!==i){i=Ea(Error(B(424)),t),t=Mx(e,t,r,n,i);break e}else for(Kt=hs(t.stateNode.containerInfo.firstChild),Gt=t,Ve=!0,En=null,n=Gb(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Ca(),r===i){t=kr(e,t,n);break e}kt(e,t,r,n)}t=t.child}return t;case 5:return Zb(t),e===null&&eh(t),r=t.type,i=t.pendingProps,a=e!==null?e.memoizedProps:null,o=i.children,Gf(r,i)?o=null:a!==null&&Gf(r,a)&&(t.flags|=32),Nw(e,t),kt(e,t,o,n),t.child;case 6:return e===null&&eh(t),null;case 13:return Sw(e,t,n);case 4:return Gm(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Sa(t,null,r,n):kt(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Nn(r,i),Ax(e,t,r,i,n);case 7:return kt(e,t,t.pendingProps,n),t.child;case 8:return kt(e,t,t.pendingProps.children,n),t.child;case 12:return kt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,a=t.memoizedProps,o=i.value,De(eu,r._currentValue),r._currentValue=o,a!==null)if(Fn(a.value,o)){if(a.children===i.children&&!zt.current){t=kr(e,t,n);break e}}else for(a=t.child,a!==null&&(a.return=t);a!==null;){var l=a.dependencies;if(l!==null){o=a.child;for(var c=l.firstContext;c!==null;){if(c.context===r){if(a.tag===1){c=jr(-1,n&-n),c.tag=2;var u=a.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?c.next=c:(c.next=d.next,d.next=c),u.pending=c}}a.lanes|=n,c=a.alternate,c!==null&&(c.lanes|=n),th(a.return,n,t),l.lanes|=n;break}c=c.next}}else if(a.tag===10)o=a.type===t.type?null:a.child;else if(a.tag===18){if(o=a.return,o===null)throw Error(B(341));o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),th(o,n,t),o=a.sibling}else o=a.child;if(o!==null)o.return=a;else for(o=a;o!==null;){if(o===t){o=null;break}if(a=o.sibling,a!==null){a.return=o.return,o=a;break}o=o.return}a=o}kt(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,sa(t,n),i=fn(i),r=r(i),t.flags|=1,kt(e,t,r,n),t.child;case 14:return r=t.type,i=Nn(r,t.pendingProps),i=Nn(r.type,i),Rx(e,t,r,i,n);case 15:return ww(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Nn(r,i),Cc(e,t),t.tag=1,$t(r)?(e=!0,Xc(t)):e=!1,sa(t,n),yw(t,r,i),rh(t,r,i,n),ah(null,t,r,!0,e,n);case 19:return kw(e,t,n);case 22:return jw(e,t,n)}throw Error(B(156,t.tag))};function Bw(e,t){return pb(e,t)}function Jk(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function cn(e,t,n,r){return new Jk(e,t,n,r)}function up(e){return e=e.prototype,!(!e||!e.isReactComponent)}function eE(e){if(typeof e=="function")return up(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Pm)return 11;if(e===Am)return 14}return 2}function xs(e,t){var n=e.alternate;return n===null?(n=cn(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Ec(e,t,n,r,i,a){var o=2;if(r=e,typeof e=="function")up(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case Oi:return oi(n.children,i,a,t);case Tm:o=8,i|=8;break;case Ef:return e=cn(12,n,t,i|2),e.elementType=Ef,e.lanes=a,e;case Tf:return e=cn(13,n,t,i),e.elementType=Tf,e.lanes=a,e;case Pf:return e=cn(19,n,t,i),e.elementType=Pf,e.lanes=a,e;case Zv:return $u(n,i,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Yv:o=10;break e;case Xv:o=9;break e;case Pm:o=11;break e;case Am:o=14;break e;case qr:o=16,r=null;break e}throw Error(B(130,e==null?e:typeof e,""))}return t=cn(o,n,t,i),t.elementType=e,t.type=r,t.lanes=a,t}function oi(e,t,n,r){return e=cn(7,e,r,t),e.lanes=n,e}function $u(e,t,n,r){return e=cn(22,e,r,t),e.elementType=Zv,e.lanes=n,e.stateNode={isHidden:!1},e}function Ud(e,t,n){return e=cn(6,e,null,t),e.lanes=n,e}function Wd(e,t,n){return t=cn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function tE(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Cd(0),this.expirationTimes=Cd(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Cd(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function dp(e,t,n,r,i,a,o,l,c){return e=new tE(e,t,n,l,c),t===1?(t=1,a===!0&&(t|=8)):t=0,a=cn(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Qm(a),e}function nE(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Li,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Uw(e){if(!e)return js;e=e._reactInternals;e:{if(ji(e)!==e||e.tag!==1)throw Error(B(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if($t(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(B(171))}if(e.tag===1){var n=e.type;if($t(n))return Ub(e,n,t)}return t}function Ww(e,t,n,r,i,a,o,l,c){return e=dp(n,r,!0,e,i,a,o,l,c),e.context=Uw(null),n=e.current,r=Pt(),i=gs(n),a=jr(r,i),a.callback=t??null,ms(n,a,i),e.current.lanes=i,xl(e,i,r),Bt(e,r),e}function Bu(e,t,n,r){var i=t.current,a=Pt(),o=gs(i);return n=Uw(n),t.context===null?t.context=n:t.pendingContext=n,t=jr(a,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=ms(i,t,o),e!==null&&(Dn(e,i,o,a),wc(e,i,o)),o}function uu(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Ux(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function fp(e,t){Ux(e,t),(e=e.alternate)&&Ux(e,t)}function rE(){return null}var Hw=typeof reportError=="function"?reportError:function(e){console.error(e)};function hp(e){this._internalRoot=e}Uu.prototype.render=hp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(B(409));Bu(e,t,null,null)};Uu.prototype.unmount=hp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;mi(function(){Bu(null,e,null,null)}),t[Cr]=null}};function Uu(e){this._internalRoot=e}Uu.prototype.unstable_scheduleHydration=function(e){if(e){var t=jb();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Qr.length&&t!==0&&t<Qr[n].priority;n++);Qr.splice(n,0,e),n===0&&Cb(e)}};function mp(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Wu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Wx(){}function sE(e,t,n,r,i){if(i){if(typeof r=="function"){var a=r;r=function(){var u=uu(o);a.call(u)}}var o=Ww(t,r,e,0,null,!1,!1,"",Wx);return e._reactRootContainer=o,e[Cr]=o.current,Wo(e.nodeType===8?e.parentNode:e),mi(),o}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var l=r;r=function(){var u=uu(c);l.call(u)}}var c=dp(e,0,!1,null,null,!1,!1,"",Wx);return e._reactRootContainer=c,e[Cr]=c.current,Wo(e.nodeType===8?e.parentNode:e),mi(function(){Bu(t,c,n,r)}),c}function Hu(e,t,n,r,i){var a=n._reactRootContainer;if(a){var o=a;if(typeof i=="function"){var l=i;i=function(){var c=uu(o);l.call(c)}}Bu(t,o,e,i)}else o=sE(n,t,e,i,r);return uu(o)}bb=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=fo(t.pendingLanes);n!==0&&(Mm(t,n|1),Bt(t,Ye()),!(Ne&6)&&(Ta=Ye()+500,Ps()))}break;case 13:mi(function(){var r=Sr(e,1);if(r!==null){var i=Pt();Dn(r,e,1,i)}}),fp(e,1)}};Fm=function(e){if(e.tag===13){var t=Sr(e,134217728);if(t!==null){var n=Pt();Dn(t,e,134217728,n)}fp(e,134217728)}};wb=function(e){if(e.tag===13){var t=gs(e),n=Sr(e,t);if(n!==null){var r=Pt();Dn(n,e,t,r)}fp(e,t)}};jb=function(){return Ee};Nb=function(e,t){var n=Ee;try{return Ee=e,t()}finally{Ee=n}};Vf=function(e,t,n){switch(t){case"input":if(Df(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=Lu(r);if(!i)throw Error(B(90));eb(r),Df(r,i)}}}break;case"textarea":nb(e,n);break;case"select":t=n.value,t!=null&&ea(e,!!n.multiple,t,!1)}};cb=op;ub=mi;var iE={usingClientEntryPoint:!1,Events:[vl,zi,Lu,ob,lb,op]},no={findFiberByHostInstance:Ws,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},aE={bundleType:no.bundleType,version:no.version,rendererPackageName:no.rendererPackageName,rendererConfig:no.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Dr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=hb(e),e===null?null:e.stateNode},findFiberByHostInstance:no.findFiberByHostInstance||rE,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ec=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ec.isDisabled&&ec.supportsFiber)try{Ru=ec.inject(aE),er=ec}catch{}}Jt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=iE;Jt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!mp(t))throw Error(B(200));return nE(e,t,null,n)};Jt.createRoot=function(e,t){if(!mp(e))throw Error(B(299));var n=!1,r="",i=Hw;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=dp(e,1,!1,null,null,n,!1,r,i),e[Cr]=t.current,Wo(e.nodeType===8?e.parentNode:e),new hp(t)};Jt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(B(188)):(e=Object.keys(e).join(","),Error(B(268,e)));return e=hb(t),e=e===null?null:e.stateNode,e};Jt.flushSync=function(e){return mi(e)};Jt.hydrate=function(e,t,n){if(!Wu(t))throw Error(B(200));return Hu(null,e,t,!0,n)};Jt.hydrateRoot=function(e,t,n){if(!mp(e))throw Error(B(405));var r=n!=null&&n.hydratedSources||null,i=!1,a="",o=Hw;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(a=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=Ww(t,null,e,1,n??null,i,!1,a,o),e[Cr]=t.current,Wo(e),r)for(e=0;e<r.length;e++)n=r[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new Uu(t)};Jt.render=function(e,t,n){if(!Wu(t))throw Error(B(200));return Hu(null,e,t,!1,n)};Jt.unmountComponentAtNode=function(e){if(!Wu(e))throw Error(B(40));return e._reactRootContainer?(mi(function(){Hu(null,null,e,!1,function(){e._reactRootContainer=null,e[Cr]=null})}),!0):!1};Jt.unstable_batchedUpdates=op;Jt.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Wu(n))throw Error(B(200));if(e==null||e._reactInternals===void 0)throw Error(B(38));return Hu(e,t,n,!1,r)};Jt.version="18.3.1-next-f1338f8080-20240426";function qw(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(qw)}catch(e){console.error(e)}}qw(),qv.exports=Jt;var wl=qv.exports;const Kw=Fv(wl);var Qw,Hx=wl;Qw=Hx.createRoot,Hx.hydrateRoot;const oE=1,lE=1e6;let Hd=0;function cE(){return Hd=(Hd+1)%Number.MAX_SAFE_INTEGER,Hd.toString()}const qd=new Map,qx=e=>{if(qd.has(e))return;const t=setTimeout(()=>{qd.delete(e),ko({type:"REMOVE_TOAST",toastId:e})},lE);qd.set(e,t)},uE=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,oE)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=t;return n?qx(n):e.toasts.forEach(r=>{qx(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},Tc=[];let Pc={toasts:[]};function ko(e){Pc=uE(Pc,e),Tc.forEach(t=>{t(Pc)})}function dE({...e}){const t=cE(),n=i=>ko({type:"UPDATE_TOAST",toast:{...i,id:t}}),r=()=>ko({type:"DISMISS_TOAST",toastId:t});return ko({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:i=>{i||r()}}}),{id:t,dismiss:r,update:n}}function Mr(){const[e,t]=p.useState(Pc);return p.useEffect(()=>(Tc.push(t),()=>{const n=Tc.indexOf(t);n>-1&&Tc.splice(n,1)}),[e]),{...e,toast:dE,dismiss:n=>ko({type:"DISMISS_TOAST",toastId:n})}}function je(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function Kx(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Gw(...e){return t=>{let n=!1;const r=e.map(i=>{const a=Kx(i,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let i=0;i<r.length;i++){const a=r[i];typeof a=="function"?a():Kx(e[i],null)}}}}function Nt(...e){return p.useCallback(Gw(...e),e)}function fE(e,t){const n=p.createContext(t),r=a=>{const{children:o,...l}=a,c=p.useMemo(()=>l,Object.values(l));return s.jsx(n.Provider,{value:c,children:o})};r.displayName=e+"Provider";function i(a){const o=p.useContext(n);if(o)return o;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[r,i]}function Ni(e,t=[]){let n=[];function r(a,o){const l=p.createContext(o),c=n.length;n=[...n,o];const u=h=>{var x;const{scope:f,children:m,...b}=h,g=((x=f==null?void 0:f[e])==null?void 0:x[c])||l,v=p.useMemo(()=>b,Object.values(b));return s.jsx(g.Provider,{value:v,children:m})};u.displayName=a+"Provider";function d(h,f){var g;const m=((g=f==null?void 0:f[e])==null?void 0:g[c])||l,b=p.useContext(m);if(b)return b;if(o!==void 0)return o;throw new Error(`\`${h}\` must be used within \`${a}\``)}return[u,d]}const i=()=>{const a=n.map(o=>p.createContext(o));return function(l){const c=(l==null?void 0:l[e])||a;return p.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return i.scopeName=e,[r,hE(i,...t)]}function hE(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(a){const o=r.reduce((l,{useScope:c,scopeName:u})=>{const h=c(a)[`__scope${u}`];return{...l,...h}},{});return p.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}function Jo(e){const t=pE(e),n=p.forwardRef((r,i)=>{const{children:a,...o}=r,l=p.Children.toArray(a),c=l.find(xE);if(c){const u=c.props.children,d=l.map(h=>h===c?p.Children.count(u)>1?p.Children.only(null):p.isValidElement(u)?u.props.children:null:h);return s.jsx(t,{...o,ref:i,children:p.isValidElement(u)?p.cloneElement(u,void 0,d):null})}return s.jsx(t,{...o,ref:i,children:a})});return n.displayName=`${e}.Slot`,n}var mE=Jo("Slot");function pE(e){const t=p.forwardRef((n,r)=>{const{children:i,...a}=n;if(p.isValidElement(i)){const o=vE(i),l=yE(a,i.props);return i.type!==p.Fragment&&(l.ref=r?Gw(r,o):o),p.cloneElement(i,l)}return p.Children.count(i)>1?p.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Yw=Symbol("radix.slottable");function gE(e){const t=({children:n})=>s.jsx(s.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Yw,t}function xE(e){return p.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Yw}function yE(e,t){const n={...t};for(const r in t){const i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...l)=>{const c=a(...l);return i(...l),c}:i&&(n[r]=i):r==="style"?n[r]={...i,...a}:r==="className"&&(n[r]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}function vE(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Xw(e){const t=e+"CollectionProvider",[n,r]=Ni(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=g=>{const{scope:v,children:x}=g,y=V.useRef(null),w=V.useRef(new Map).current;return s.jsx(i,{scope:v,itemMap:w,collectionRef:y,children:x})};o.displayName=t;const l=e+"CollectionSlot",c=Jo(l),u=V.forwardRef((g,v)=>{const{scope:x,children:y}=g,w=a(l,x),j=Nt(v,w.collectionRef);return s.jsx(c,{ref:j,children:y})});u.displayName=l;const d=e+"CollectionItemSlot",h="data-radix-collection-item",f=Jo(d),m=V.forwardRef((g,v)=>{const{scope:x,children:y,...w}=g,j=V.useRef(null),C=Nt(v,j),N=a(d,x);return V.useEffect(()=>(N.itemMap.set(j,{ref:j,...w}),()=>void N.itemMap.delete(j))),s.jsx(f,{[h]:"",ref:C,children:y})});m.displayName=d;function b(g){const v=a(e+"CollectionConsumer",g);return V.useCallback(()=>{const y=v.collectionRef.current;if(!y)return[];const w=Array.from(y.querySelectorAll(`[${h}]`));return Array.from(v.itemMap.values()).sort((N,S)=>w.indexOf(N.ref.current)-w.indexOf(S.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:o,Slot:u,ItemSlot:m},b,r]}var bE=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Re=bE.reduce((e,t)=>{const n=Jo(`Primitive.${t}`),r=p.forwardRef((i,a)=>{const{asChild:o,...l}=i,c=o?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),s.jsx(c,{...l,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Zw(e,t){e&&wl.flushSync(()=>e.dispatchEvent(t))}function Ln(e){const t=p.useRef(e);return p.useEffect(()=>{t.current=e}),p.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function wE(e,t=globalThis==null?void 0:globalThis.document){const n=Ln(e);p.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var jE="DismissableLayer",yh="dismissableLayer.update",NE="dismissableLayer.pointerDownOutside",CE="dismissableLayer.focusOutside",Qx,Jw=p.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),qu=p.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:l,...c}=e,u=p.useContext(Jw),[d,h]=p.useState(null),f=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=p.useState({}),b=Nt(t,S=>h(S)),g=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),x=g.indexOf(v),y=d?g.indexOf(d):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,j=y>=x,C=kE(S=>{const T=S.target,k=[...u.branches].some(A=>A.contains(T));!j||k||(i==null||i(S),o==null||o(S),S.defaultPrevented||l==null||l())},f),N=EE(S=>{const T=S.target;[...u.branches].some(A=>A.contains(T))||(a==null||a(S),o==null||o(S),S.defaultPrevented||l==null||l())},f);return wE(S=>{y===u.layers.size-1&&(r==null||r(S),!S.defaultPrevented&&l&&(S.preventDefault(),l()))},f),p.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Qx=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),Gx(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=Qx)}},[d,f,n,u]),p.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),Gx())},[d,u]),p.useEffect(()=>{const S=()=>m({});return document.addEventListener(yh,S),()=>document.removeEventListener(yh,S)},[]),s.jsx(Re.div,{...c,ref:b,style:{pointerEvents:w?j?"auto":"none":void 0,...e.style},onFocusCapture:je(e.onFocusCapture,N.onFocusCapture),onBlurCapture:je(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:je(e.onPointerDownCapture,C.onPointerDownCapture)})});qu.displayName=jE;var SE="DismissableLayerBranch",e1=p.forwardRef((e,t)=>{const n=p.useContext(Jw),r=p.useRef(null),i=Nt(t,r);return p.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),s.jsx(Re.div,{...e,ref:i})});e1.displayName=SE;function kE(e,t=globalThis==null?void 0:globalThis.document){const n=Ln(e),r=p.useRef(!1),i=p.useRef(()=>{});return p.useEffect(()=>{const a=l=>{if(l.target&&!r.current){let c=function(){t1(NE,n,u,{discrete:!0})};const u={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=c,t.addEventListener("click",i.current,{once:!0})):c()}else t.removeEventListener("click",i.current);r.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",a),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function EE(e,t=globalThis==null?void 0:globalThis.document){const n=Ln(e),r=p.useRef(!1);return p.useEffect(()=>{const i=a=>{a.target&&!r.current&&t1(CE,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Gx(){const e=new CustomEvent(yh);document.dispatchEvent(e)}function t1(e,t,n,{discrete:r}){const i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?Zw(i,a):i.dispatchEvent(a)}var TE=qu,PE=e1,Er=globalThis!=null&&globalThis.document?p.useLayoutEffect:()=>{},AE="Portal",pp=p.forwardRef((e,t)=>{var l;const{container:n,...r}=e,[i,a]=p.useState(!1);Er(()=>a(!0),[]);const o=n||i&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return o?Kw.createPortal(s.jsx(Re.div,{...r,ref:t}),o):null});pp.displayName=AE;function RE(e,t){return p.useReducer((n,r)=>t[n][r]??n,e)}var Ci=e=>{const{present:t,children:n}=e,r=DE(t),i=typeof n=="function"?n({present:r.isPresent}):p.Children.only(n),a=Nt(r.ref,ME(i));return typeof n=="function"||r.isPresent?p.cloneElement(i,{ref:a}):null};Ci.displayName="Presence";function DE(e){const[t,n]=p.useState(),r=p.useRef(null),i=p.useRef(e),a=p.useRef("none"),o=e?"mounted":"unmounted",[l,c]=RE(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return p.useEffect(()=>{const u=tc(r.current);a.current=l==="mounted"?u:"none"},[l]),Er(()=>{const u=r.current,d=i.current;if(d!==e){const f=a.current,m=tc(u);e?c("MOUNT"):m==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(d&&f!==m?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,c]),Er(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,h=m=>{const g=tc(r.current).includes(m.animationName);if(m.target===t&&g&&(c("ANIMATION_END"),!i.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},f=m=>{m.target===t&&(a.current=tc(r.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",h),t.addEventListener("animationend",h),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",h),t.removeEventListener("animationend",h)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:p.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function tc(e){return(e==null?void 0:e.animationName)||"none"}function ME(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var FE=Cm[" useInsertionEffect ".trim().toString()]||Er;function Ku({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[i,a,o]=LE({defaultProp:t,onChange:n}),l=e!==void 0,c=l?e:i;{const d=p.useRef(e!==void 0);p.useEffect(()=>{const h=d.current;h!==l&&console.warn(`${r} is changing from ${h?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),d.current=l},[l,r])}const u=p.useCallback(d=>{var h;if(l){const f=OE(d)?d(e):d;f!==e&&((h=o.current)==null||h.call(o,f))}else a(d)},[l,e,a,o]);return[c,u]}function LE({defaultProp:e,onChange:t}){const[n,r]=p.useState(e),i=p.useRef(n),a=p.useRef(t);return FE(()=>{a.current=t},[t]),p.useEffect(()=>{var o;i.current!==n&&((o=a.current)==null||o.call(a,n),i.current=n)},[n,i]),[n,r,a]}function OE(e){return typeof e=="function"}var IE=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),_E="VisuallyHidden",Qu=p.forwardRef((e,t)=>s.jsx(Re.span,{...e,ref:t,style:{...IE,...e.style}}));Qu.displayName=_E;var VE=Qu,gp="ToastProvider",[xp,zE,$E]=Xw("Toast"),[n1,N_]=Ni("Toast",[$E]),[BE,Gu]=n1(gp),r1=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:i="right",swipeThreshold:a=50,children:o}=e,[l,c]=p.useState(null),[u,d]=p.useState(0),h=p.useRef(!1),f=p.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${gp}\`. Expected non-empty \`string\`.`),s.jsx(xp.Provider,{scope:t,children:s.jsx(BE,{scope:t,label:n,duration:r,swipeDirection:i,swipeThreshold:a,toastCount:u,viewport:l,onViewportChange:c,onToastAdd:p.useCallback(()=>d(m=>m+1),[]),onToastRemove:p.useCallback(()=>d(m=>m-1),[]),isFocusedToastEscapeKeyDownRef:h,isClosePausedRef:f,children:o})})};r1.displayName=gp;var s1="ToastViewport",UE=["F8"],vh="toast.viewportPause",bh="toast.viewportResume",i1=p.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=UE,label:i="Notifications ({hotkey})",...a}=e,o=Gu(s1,n),l=zE(n),c=p.useRef(null),u=p.useRef(null),d=p.useRef(null),h=p.useRef(null),f=Nt(t,h,o.onViewportChange),m=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),b=o.toastCount>0;p.useEffect(()=>{const v=x=>{var w;r.length!==0&&r.every(j=>x[j]||x.code===j)&&((w=h.current)==null||w.focus())};return document.addEventListener("keydown",v),()=>document.removeEventListener("keydown",v)},[r]),p.useEffect(()=>{const v=c.current,x=h.current;if(b&&v&&x){const y=()=>{if(!o.isClosePausedRef.current){const N=new CustomEvent(vh);x.dispatchEvent(N),o.isClosePausedRef.current=!0}},w=()=>{if(o.isClosePausedRef.current){const N=new CustomEvent(bh);x.dispatchEvent(N),o.isClosePausedRef.current=!1}},j=N=>{!v.contains(N.relatedTarget)&&w()},C=()=>{v.contains(document.activeElement)||w()};return v.addEventListener("focusin",y),v.addEventListener("focusout",j),v.addEventListener("pointermove",y),v.addEventListener("pointerleave",C),window.addEventListener("blur",y),window.addEventListener("focus",w),()=>{v.removeEventListener("focusin",y),v.removeEventListener("focusout",j),v.removeEventListener("pointermove",y),v.removeEventListener("pointerleave",C),window.removeEventListener("blur",y),window.removeEventListener("focus",w)}}},[b,o.isClosePausedRef]);const g=p.useCallback(({tabbingDirection:v})=>{const y=l().map(w=>{const j=w.ref.current,C=[j,...nT(j)];return v==="forwards"?C:C.reverse()});return(v==="forwards"?y.reverse():y).flat()},[l]);return p.useEffect(()=>{const v=h.current;if(v){const x=y=>{var C,N,S;const w=y.altKey||y.ctrlKey||y.metaKey;if(y.key==="Tab"&&!w){const T=document.activeElement,k=y.shiftKey;if(y.target===v&&k){(C=u.current)==null||C.focus();return}const O=g({tabbingDirection:k?"backwards":"forwards"}),W=O.findIndex(_=>_===T);Kd(O.slice(W+1))?y.preventDefault():k?(N=u.current)==null||N.focus():(S=d.current)==null||S.focus()}};return v.addEventListener("keydown",x),()=>v.removeEventListener("keydown",x)}},[l,g]),s.jsxs(PE,{ref:c,role:"region","aria-label":i.replace("{hotkey}",m),tabIndex:-1,style:{pointerEvents:b?void 0:"none"},children:[b&&s.jsx(wh,{ref:u,onFocusFromOutsideViewport:()=>{const v=g({tabbingDirection:"forwards"});Kd(v)}}),s.jsx(xp.Slot,{scope:n,children:s.jsx(Re.ol,{tabIndex:-1,...a,ref:f})}),b&&s.jsx(wh,{ref:d,onFocusFromOutsideViewport:()=>{const v=g({tabbingDirection:"backwards"});Kd(v)}})]})});i1.displayName=s1;var a1="ToastFocusProxy",wh=p.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...i}=e,a=Gu(a1,n);return s.jsx(Qu,{"aria-hidden":!0,tabIndex:0,...i,ref:t,style:{position:"fixed"},onFocus:o=>{var u;const l=o.relatedTarget;!((u=a.viewport)!=null&&u.contains(l))&&r()}})});wh.displayName=a1;var jl="Toast",WE="toast.swipeStart",HE="toast.swipeMove",qE="toast.swipeCancel",KE="toast.swipeEnd",o1=p.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:i,onOpenChange:a,...o}=e,[l,c]=Ku({prop:r,defaultProp:i??!0,onChange:a,caller:jl});return s.jsx(Ci,{present:n||l,children:s.jsx(YE,{open:l,...o,ref:t,onClose:()=>c(!1),onPause:Ln(e.onPause),onResume:Ln(e.onResume),onSwipeStart:je(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:je(e.onSwipeMove,u=>{const{x:d,y:h}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${d}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${h}px`)}),onSwipeCancel:je(e.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:je(e.onSwipeEnd,u=>{const{x:d,y:h}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${d}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${h}px`),c(!1)})})})});o1.displayName=jl;var[QE,GE]=n1(jl,{onClose(){}}),YE=p.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:i,open:a,onClose:o,onEscapeKeyDown:l,onPause:c,onResume:u,onSwipeStart:d,onSwipeMove:h,onSwipeCancel:f,onSwipeEnd:m,...b}=e,g=Gu(jl,n),[v,x]=p.useState(null),y=Nt(t,_=>x(_)),w=p.useRef(null),j=p.useRef(null),C=i||g.duration,N=p.useRef(0),S=p.useRef(C),T=p.useRef(0),{onToastAdd:k,onToastRemove:A}=g,z=Ln(()=>{var re;(v==null?void 0:v.contains(document.activeElement))&&((re=g.viewport)==null||re.focus()),o()}),O=p.useCallback(_=>{!_||_===1/0||(window.clearTimeout(T.current),N.current=new Date().getTime(),T.current=window.setTimeout(z,_))},[z]);p.useEffect(()=>{const _=g.viewport;if(_){const re=()=>{O(S.current),u==null||u()},Y=()=>{const G=new Date().getTime()-N.current;S.current=S.current-G,window.clearTimeout(T.current),c==null||c()};return _.addEventListener(vh,Y),_.addEventListener(bh,re),()=>{_.removeEventListener(vh,Y),_.removeEventListener(bh,re)}}},[g.viewport,C,c,u,O]),p.useEffect(()=>{a&&!g.isClosePausedRef.current&&O(C)},[a,C,g.isClosePausedRef,O]),p.useEffect(()=>(k(),()=>A()),[k,A]);const W=p.useMemo(()=>v?m1(v):null,[v]);return g.viewport?s.jsxs(s.Fragment,{children:[W&&s.jsx(XE,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:W}),s.jsx(QE,{scope:n,onClose:z,children:wl.createPortal(s.jsx(xp.ItemSlot,{scope:n,children:s.jsx(TE,{asChild:!0,onEscapeKeyDown:je(l,()=>{g.isFocusedToastEscapeKeyDownRef.current||z(),g.isFocusedToastEscapeKeyDownRef.current=!1}),children:s.jsx(Re.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":a?"open":"closed","data-swipe-direction":g.swipeDirection,...b,ref:y,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:je(e.onKeyDown,_=>{_.key==="Escape"&&(l==null||l(_.nativeEvent),_.nativeEvent.defaultPrevented||(g.isFocusedToastEscapeKeyDownRef.current=!0,z()))}),onPointerDown:je(e.onPointerDown,_=>{_.button===0&&(w.current={x:_.clientX,y:_.clientY})}),onPointerMove:je(e.onPointerMove,_=>{if(!w.current)return;const re=_.clientX-w.current.x,Y=_.clientY-w.current.y,G=!!j.current,D=["left","right"].includes(g.swipeDirection),L=["left","up"].includes(g.swipeDirection)?Math.min:Math.max,H=D?L(0,re):0,ce=D?0:L(0,Y),se=_.pointerType==="touch"?10:2,me={x:H,y:ce},pe={originalEvent:_,delta:me};G?(j.current=me,nc(HE,h,pe,{discrete:!1})):Yx(me,g.swipeDirection,se)?(j.current=me,nc(WE,d,pe,{discrete:!1}),_.target.setPointerCapture(_.pointerId)):(Math.abs(re)>se||Math.abs(Y)>se)&&(w.current=null)}),onPointerUp:je(e.onPointerUp,_=>{const re=j.current,Y=_.target;if(Y.hasPointerCapture(_.pointerId)&&Y.releasePointerCapture(_.pointerId),j.current=null,w.current=null,re){const G=_.currentTarget,D={originalEvent:_,delta:re};Yx(re,g.swipeDirection,g.swipeThreshold)?nc(KE,m,D,{discrete:!0}):nc(qE,f,D,{discrete:!0}),G.addEventListener("click",L=>L.preventDefault(),{once:!0})}})})})}),g.viewport)})]}):null}),XE=e=>{const{__scopeToast:t,children:n,...r}=e,i=Gu(jl,t),[a,o]=p.useState(!1),[l,c]=p.useState(!1);return eT(()=>o(!0)),p.useEffect(()=>{const u=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(u)},[]),l?null:s.jsx(pp,{asChild:!0,children:s.jsx(Qu,{...r,children:a&&s.jsxs(s.Fragment,{children:[i.label," ",n]})})})},ZE="ToastTitle",l1=p.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return s.jsx(Re.div,{...r,ref:t})});l1.displayName=ZE;var JE="ToastDescription",c1=p.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return s.jsx(Re.div,{...r,ref:t})});c1.displayName=JE;var u1="ToastAction",d1=p.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?s.jsx(h1,{altText:n,asChild:!0,children:s.jsx(yp,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${u1}\`. Expected non-empty \`string\`.`),null)});d1.displayName=u1;var f1="ToastClose",yp=p.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,i=GE(f1,n);return s.jsx(h1,{asChild:!0,children:s.jsx(Re.button,{type:"button",...r,ref:t,onClick:je(e.onClick,i.onClose)})})});yp.displayName=f1;var h1=p.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...i}=e;return s.jsx(Re.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...i,ref:t})});function m1(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),tT(r)){const i=r.ariaHidden||r.hidden||r.style.display==="none",a=r.dataset.radixToastAnnounceExclude==="";if(!i)if(a){const o=r.dataset.radixToastAnnounceAlt;o&&t.push(o)}else t.push(...m1(r))}}),t}function nc(e,t,n,{discrete:r}){const i=n.originalEvent.currentTarget,a=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?Zw(i,a):i.dispatchEvent(a)}var Yx=(e,t,n=0)=>{const r=Math.abs(e.x),i=Math.abs(e.y),a=r>i;return t==="left"||t==="right"?a&&r>n:!a&&i>n};function eT(e=()=>{}){const t=Ln(e);Er(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function tT(e){return e.nodeType===e.ELEMENT_NODE}function nT(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Kd(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var rT=r1,p1=i1,g1=o1,x1=l1,y1=c1,v1=d1,b1=yp;function w1(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=w1(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function j1(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=w1(e))&&(r&&(r+=" "),r+=t);return r}const Xx=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Zx=j1,Nl=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Zx(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:a}=t,o=Object.keys(i).map(u=>{const d=n==null?void 0:n[u],h=a==null?void 0:a[u];if(d===null)return null;const f=Xx(d)||Xx(h);return i[u][f]}),l=n&&Object.entries(n).reduce((u,d)=>{let[h,f]=d;return f===void 0||(u[h]=f),u},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,d)=>{let{class:h,className:f,...m}=d;return Object.entries(m).every(b=>{let[g,v]=b;return Array.isArray(v)?v.includes({...a,...l}[g]):{...a,...l}[g]===v})?[...u,h,f]:u},[]);return Zx(e,o,c,n==null?void 0:n.class,n==null?void 0:n.className)};/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const sT=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),N1=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var iT={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const aT=p.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:a,iconNode:o,...l},c)=>p.createElement("svg",{ref:c,...iT,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:N1("lucide",i),...l},[...o.map(([u,d])=>p.createElement(u,d)),...Array.isArray(a)?a:[a]]));/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const ae=(e,t)=>{const n=p.forwardRef(({className:r,...i},a)=>p.createElement(aT,{ref:a,iconNode:t,className:N1(`lucide-${sT(e)}`,r),...i}));return n.displayName=`${e}`,n};/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Mn=ae("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const pi=ae("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const oT=ae("Atom",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["path",{d:"M20.2 20.2c2.04-2.03.02-7.36-4.5-11.9-4.54-4.52-9.87-6.54-11.9-4.5-2.04 2.03-.02 7.36 4.5 11.9 4.54 4.52 9.87 6.54 11.9 4.5Z",key:"1l2ple"}],["path",{d:"M15.7 15.7c4.52-4.54 6.54-9.87 4.5-11.9-2.03-2.04-7.36-.02-11.9 4.5-4.52 4.54-6.54 9.87-4.5 11.9 2.03 2.04 7.36.02 11.9-4.5Z",key:"1wam0m"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const vp=ae("Award",[["path",{d:"m15.477 12.89 1.515 8.526a.5.5 0 0 1-.81.47l-3.58-2.687a1 1 0 0 0-1.197 0l-3.586 2.686a.5.5 0 0 1-.81-.469l1.514-8.526",key:"1yiouv"}],["circle",{cx:"12",cy:"8",r:"6",key:"1vp47v"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const el=ae("BookOpen",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Jx=ae("Building2",[["path",{d:"M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z",key:"1b4qmf"}],["path",{d:"M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2",key:"i71pzd"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2",key:"10jefs"}],["path",{d:"M10 6h4",key:"1itunk"}],["path",{d:"M10 10h4",key:"tcdvrf"}],["path",{d:"M10 14h4",key:"kelpxr"}],["path",{d:"M10 18h4",key:"1ulq68"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const lT=ae("Building",[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",ry:"2",key:"76otgf"}],["path",{d:"M9 22v-4h6v4",key:"r93iot"}],["path",{d:"M8 6h.01",key:"1dz90k"}],["path",{d:"M16 6h.01",key:"1x0f13"}],["path",{d:"M12 6h.01",key:"1vi96p"}],["path",{d:"M12 10h.01",key:"1nrarc"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 10h.01",key:"19clt8"}],["path",{d:"M8 14h.01",key:"6423bh"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const ut=ae("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const jh=ae("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Ks=ae("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const cT=ae("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const uT=ae("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const gi=ae("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const dT=ae("Cpu",[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const bp=ae("DollarSign",[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const fT=ae("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Zt=ae("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Yr=ae("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Nh=ae("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const ys=ae("FlaskConical",[["path",{d:"M10 2v7.527a2 2 0 0 1-.211.896L4.72 20.55a1 1 0 0 0 .9 1.45h12.76a1 1 0 0 0 .9-1.45l-5.069-10.127A2 2 0 0 1 14 9.527V2",key:"pzvekw"}],["path",{d:"M8.5 2h7",key:"csnxdl"}],["path",{d:"M7 16h10",key:"wp8him"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const du=ae("GraduationCap",[["path",{d:"M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0z",key:"j76jl0"}],["path",{d:"M22 10v6",key:"1lu8f3"}],["path",{d:"M6 12.5V16a6 3 0 0 0 12 0v-3.5",key:"1r8lef"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const hT=ae("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const C1=ae("Linkedin",[["path",{d:"M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z",key:"c2jq9f"}],["rect",{width:"4",height:"12",x:"2",y:"9",key:"mk3on5"}],["circle",{cx:"4",cy:"4",r:"2",key:"bt5ra8"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Fr=ae("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const mT=ae("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const pT=ae("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const xi=ae("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Ns=ae("MapPin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const S1=ae("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const gT=ae("Microscope",[["path",{d:"M6 18h8",key:"1borvv"}],["path",{d:"M3 22h18",key:"8prr45"}],["path",{d:"M14 22a7 7 0 1 0 0-14h-1",key:"1jwaiy"}],["path",{d:"M9 14h2",key:"197e7h"}],["path",{d:"M9 12a2 2 0 0 1-2-2V6h6v4a2 2 0 0 1-2 2Z",key:"1bmzmy"}],["path",{d:"M12 6V3a1 1 0 0 0-1-1H9a1 1 0 0 0-1 1v3",key:"1drr47"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const ey=ae("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const wp=ae("Newspaper",[["path",{d:"M4 22h16a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v16a2 2 0 0 1-2 2Zm0 0a2 2 0 0 1-2-2v-9c0-1.1.9-2 2-2h2",key:"7pis2x"}],["path",{d:"M18 14h-8",key:"sponae"}],["path",{d:"M15 18h-5",key:"95g1m2"}],["path",{d:"M10 6h8v4h-8V6Z",key:"smlsk5"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const xT=ae("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const k1=ae("Phone",[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const yT=ae("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const vT=ae("Radio",[["path",{d:"M4.9 19.1C1 15.2 1 8.8 4.9 4.9",key:"1vaf9d"}],["path",{d:"M7.8 16.2c-2.3-2.3-2.3-6.1 0-8.5",key:"u1ii0m"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"M16.2 7.8c2.3 2.3 2.3 6.1 0 8.5",key:"1j5fej"}],["path",{d:"M19.1 4.9C23 8.8 23 15.1 19.1 19",key:"10b0cb"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const ty=ae("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Qt=ae("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const bT=ae("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const ny=ae("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const wT=ae("Tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const jT=ae("Target",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const NT=ae("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const E1=ae("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const jp=ae("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const mt=ae("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const CT=ae("Video",[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Yu=ae("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/** * @license lucide-react v0.462.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const ST=ae("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]),Np="-",kT=e=>{const t=TT(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:o=>{const l=o.split(Np);return l[0]===""&&l.length!==1&&l.shift(),T1(l,t)||ET(o)},getConflictingClassGroupIds:(o,l)=>{const c=n[o]||[];return l&&r[o]?[...c,...r[o]]:c}}},T1=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?T1(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const a=e.join(Np);return(o=t.validators.find(({validator:l})=>l(a)))==null?void 0:o.classGroupId},ry=/^\[(.+)\]$/,ET=e=>{if(ry.test(e)){const t=ry.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},TT=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return AT(Object.entries(e.classGroups),n).forEach(([a,o])=>{Ch(o,r,a,t)}),r},Ch=(e,t,n,r)=>{e.forEach(i=>{if(typeof i=="string"){const a=i===""?t:sy(t,i);a.classGroupId=n;return}if(typeof i=="function"){if(PT(i)){Ch(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([a,o])=>{Ch(o,sy(t,a),n,r)})})},sy=(e,t)=>{let n=e;return t.split(Np).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},PT=e=>e.isThemeGetter,AT=(e,t)=>t?e.map(([n,r])=>{const i=r.map(a=>typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([o,l])=>[t+o,l])):a);return[n,i]}):e,RT=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const i=(a,o)=>{n.set(a,o),t++,t>e&&(t=0,r=n,n=new Map)};return{get(a){let o=n.get(a);if(o!==void 0)return o;if((o=r.get(a))!==void 0)return i(a,o),o},set(a,o){n.has(a)?n.set(a,o):i(a,o)}}},P1="!",DT=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,i=t[0],a=t.length,o=l=>{const c=[];let u=0,d=0,h;for(let v=0;v<l.length;v++){let x=l[v];if(u===0){if(x===i&&(r||l.slice(v,v+a)===t)){c.push(l.slice(d,v)),d=v+a;continue}if(x==="/"){h=v;continue}}x==="["?u++:x==="]"&&u--}const f=c.length===0?l:l.substring(d),m=f.startsWith(P1),b=m?f.substring(1):f,g=h&&h>d?h-d:void 0;return{modifiers:c,hasImportantModifier:m,baseClassName:b,maybePostfixModifierPosition:g}};return n?l=>n({className:l,parseClassName:o}):o},MT=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},FT=e=>({cache:RT(e.cacheSize),parseClassName:DT(e),...kT(e)}),LT=/\s+/,OT=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,a=[],o=e.trim().split(LT);let l="";for(let c=o.length-1;c>=0;c-=1){const u=o[c],{modifiers:d,hasImportantModifier:h,baseClassName:f,maybePostfixModifierPosition:m}=n(u);let b=!!m,g=r(b?f.substring(0,m):f);if(!g){if(!b){l=u+(l.length>0?" "+l:l);continue}if(g=r(f),!g){l=u+(l.length>0?" "+l:l);continue}b=!1}const v=MT(d).join(":"),x=h?v+P1:v,y=x+g;if(a.includes(y))continue;a.push(y);const w=i(g,b);for(let j=0;j<w.length;++j){const C=w[j];a.push(x+C)}l=u+(l.length>0?" "+l:l)}return l};function IT(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=A1(t))&&(r&&(r+=" "),r+=n);return r}const A1=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=A1(e[r]))&&(n&&(n+=" "),n+=t);return n};function _T(e,...t){let n,r,i,a=o;function o(c){const u=t.reduce((d,h)=>h(d),e());return n=FT(u),r=n.cache.get,i=n.cache.set,a=l,l(c)}function l(c){const u=r(c);if(u)return u;const d=OT(c,n);return i(c,d),d}return function(){return a(IT.apply(null,arguments))}}const Me=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},R1=/^\[(?:([a-z-]+):)?(.+)\]$/i,VT=/^\d+\/\d+$/,zT=new Set(["px","full","screen"]),$T=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,BT=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,UT=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,WT=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,HT=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,mr=e=>aa(e)||zT.has(e)||VT.test(e),zr=e=>_a(e,"length",JT),aa=e=>!!e&&!Number.isNaN(Number(e)),Qd=e=>_a(e,"number",aa),ro=e=>!!e&&Number.isInteger(Number(e)),qT=e=>e.endsWith("%")&&aa(e.slice(0,-1)),he=e=>R1.test(e),$r=e=>$T.test(e),KT=new Set(["length","size","percentage"]),QT=e=>_a(e,KT,D1),GT=e=>_a(e,"position",D1),YT=new Set(["image","url"]),XT=e=>_a(e,YT,tP),ZT=e=>_a(e,"",eP),so=()=>!0,_a=(e,t,n)=>{const r=R1.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},JT=e=>BT.test(e)&&!UT.test(e),D1=()=>!1,eP=e=>WT.test(e),tP=e=>HT.test(e),nP=()=>{const e=Me("colors"),t=Me("spacing"),n=Me("blur"),r=Me("brightness"),i=Me("borderColor"),a=Me("borderRadius"),o=Me("borderSpacing"),l=Me("borderWidth"),c=Me("contrast"),u=Me("grayscale"),d=Me("hueRotate"),h=Me("invert"),f=Me("gap"),m=Me("gradientColorStops"),b=Me("gradientColorStopPositions"),g=Me("inset"),v=Me("margin"),x=Me("opacity"),y=Me("padding"),w=Me("saturate"),j=Me("scale"),C=Me("sepia"),N=Me("skew"),S=Me("space"),T=Me("translate"),k=()=>["auto","contain","none"],A=()=>["auto","hidden","clip","visible","scroll"],z=()=>["auto",he,t],O=()=>[he,t],W=()=>["",mr,zr],_=()=>["auto",aa,he],re=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],Y=()=>["solid","dashed","dotted","double","none"],G=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],D=()=>["start","end","center","between","around","evenly","stretch"],L=()=>["","0",he],H=()=>["auto","avoid","all","avoid-page","page","left","right","column"],ce=()=>[aa,he];return{cacheSize:500,separator:":",theme:{colors:[so],spacing:[mr,zr],blur:["none","",$r,he],brightness:ce(),borderColor:[e],borderRadius:["none","","full",$r,he],borderSpacing:O(),borderWidth:W(),contrast:ce(),grayscale:L(),hueRotate:ce(),invert:L(),gap:O(),gradientColorStops:[e],gradientColorStopPositions:[qT,zr],inset:z(),margin:z(),opacity:ce(),padding:O(),saturate:ce(),scale:ce(),sepia:L(),skew:ce(),space:O(),translate:O()},classGroups:{aspect:[{aspect:["auto","square","video",he]}],container:["container"],columns:[{columns:[$r]}],"break-after":[{"break-after":H()}],"break-before":[{"break-before":H()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...re(),he]}],overflow:[{overflow:A()}],"overflow-x":[{"overflow-x":A()}],"overflow-y":[{"overflow-y":A()}],overscroll:[{overscroll:k()}],"overscroll-x":[{"overscroll-x":k()}],"overscroll-y":[{"overscroll-y":k()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",ro,he]}],basis:[{basis:z()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",he]}],grow:[{grow:L()}],shrink:[{shrink:L()}],order:[{order:["first","last","none",ro,he]}],"grid-cols":[{"grid-cols":[so]}],"col-start-end":[{col:["auto",{span:["full",ro,he]},he]}],"col-start":[{"col-start":_()}],"col-end":[{"col-end":_()}],"grid-rows":[{"grid-rows":[so]}],"row-start-end":[{row:["auto",{span:[ro,he]},he]}],"row-start":[{"row-start":_()}],"row-end":[{"row-end":_()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",he]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",he]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...D()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...D(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...D(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[y]}],px:[{px:[y]}],py:[{py:[y]}],ps:[{ps:[y]}],pe:[{pe:[y]}],pt:[{pt:[y]}],pr:[{pr:[y]}],pb:[{pb:[y]}],pl:[{pl:[y]}],m:[{m:[v]}],mx:[{mx:[v]}],my:[{my:[v]}],ms:[{ms:[v]}],me:[{me:[v]}],mt:[{mt:[v]}],mr:[{mr:[v]}],mb:[{mb:[v]}],ml:[{ml:[v]}],"space-x":[{"space-x":[S]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[S]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",he,t]}],"min-w":[{"min-w":[he,t,"min","max","fit"]}],"max-w":[{"max-w":[he,t,"none","full","min","max","fit","prose",{screen:[$r]},$r]}],h:[{h:[he,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[he,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[he,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[he,t,"auto","min","max","fit"]}],"font-size":[{text:["base",$r,zr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Qd]}],"font-family":[{font:[so]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",he]}],"line-clamp":[{"line-clamp":["none",aa,Qd]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",mr,he]}],"list-image":[{"list-image":["none",he]}],"list-style-type":[{list:["none","disc","decimal",he]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[x]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[x]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Y(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",mr,zr]}],"underline-offset":[{"underline-offset":["auto",mr,he]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:O()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",he]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",he]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[x]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...re(),GT]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",QT]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},XT]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[b]}],"gradient-via-pos":[{via:[b]}],"gradient-to-pos":[{to:[b]}],"gradient-from":[{from:[m]}],"gradient-via":[{via:[m]}],"gradient-to":[{to:[m]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-s":[{"border-s":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[x]}],"border-style":[{border:[...Y(),"hidden"]}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[x]}],"divide-style":[{divide:Y()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...Y()]}],"outline-offset":[{"outline-offset":[mr,he]}],"outline-w":[{outline:[mr,zr]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:W()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[x]}],"ring-offset-w":[{"ring-offset":[mr,zr]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",$r,ZT]}],"shadow-color":[{shadow:[so]}],opacity:[{opacity:[x]}],"mix-blend":[{"mix-blend":[...G(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":G()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",$r,he]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[h]}],saturate:[{saturate:[w]}],sepia:[{sepia:[C]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[h]}],"backdrop-opacity":[{"backdrop-opacity":[x]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[C]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",he]}],duration:[{duration:ce()}],ease:[{ease:["linear","in","out","in-out",he]}],delay:[{delay:ce()}],animate:[{animate:["none","spin","ping","pulse","bounce",he]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[j]}],"scale-x":[{"scale-x":[j]}],"scale-y":[{"scale-y":[j]}],rotate:[{rotate:[ro,he]}],"translate-x":[{"translate-x":[T]}],"translate-y":[{"translate-y":[T]}],"skew-x":[{"skew-x":[N]}],"skew-y":[{"skew-y":[N]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",he]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",he]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":O()}],"scroll-mx":[{"scroll-mx":O()}],"scroll-my":[{"scroll-my":O()}],"scroll-ms":[{"scroll-ms":O()}],"scroll-me":[{"scroll-me":O()}],"scroll-mt":[{"scroll-mt":O()}],"scroll-mr":[{"scroll-mr":O()}],"scroll-mb":[{"scroll-mb":O()}],"scroll-ml":[{"scroll-ml":O()}],"scroll-p":[{"scroll-p":O()}],"scroll-px":[{"scroll-px":O()}],"scroll-py":[{"scroll-py":O()}],"scroll-ps":[{"scroll-ps":O()}],"scroll-pe":[{"scroll-pe":O()}],"scroll-pt":[{"scroll-pt":O()}],"scroll-pr":[{"scroll-pr":O()}],"scroll-pb":[{"scroll-pb":O()}],"scroll-pl":[{"scroll-pl":O()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",he]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[mr,zr,Qd]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},rP=_T(nP);function ge(...e){return rP(j1(e))}const sP=rT,M1=p.forwardRef(({className:e,...t},n)=>s.jsx(p1,{ref:n,className:ge("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));M1.displayName=p1.displayName;const iP=Nl("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),F1=p.forwardRef(({className:e,variant:t,...n},r)=>s.jsx(g1,{ref:r,className:ge(iP({variant:t}),e),...n}));F1.displayName=g1.displayName;const aP=p.forwardRef(({className:e,...t},n)=>s.jsx(v1,{ref:n,className:ge("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors group-[.destructive]:border-muted/40 hover:bg-secondary group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 group-[.destructive]:focus:ring-destructive disabled:pointer-events-none disabled:opacity-50",e),...t}));aP.displayName=v1.displayName;const L1=p.forwardRef(({className:e,...t},n)=>s.jsx(b1,{ref:n,className:ge("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity group-hover:opacity-100 group-[.destructive]:text-red-300 hover:text-foreground group-[.destructive]:hover:text-red-50 focus:opacity-100 focus:outline-none focus:ring-2 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:s.jsx(Yu,{className:"h-4 w-4"})}));L1.displayName=b1.displayName;const O1=p.forwardRef(({className:e,...t},n)=>s.jsx(x1,{ref:n,className:ge("text-sm font-semibold",e),...t}));O1.displayName=x1.displayName;const I1=p.forwardRef(({className:e,...t},n)=>s.jsx(y1,{ref:n,className:ge("text-sm opacity-90",e),...t}));I1.displayName=y1.displayName;function oP(){const{toasts:e}=Mr();return s.jsxs(sP,{children:[e.map(function({id:t,title:n,description:r,action:i,...a}){return s.jsxs(F1,{...a,children:[s.jsxs("div",{className:"grid gap-1",children:[n&&s.jsx(O1,{children:n}),r&&s.jsx(I1,{children:r})]}),i,s.jsx(L1,{})]},t)}),s.jsx(M1,{})]})}var iy=["light","dark"],lP="(prefers-color-scheme: dark)",cP=p.createContext(void 0),uP={setTheme:e=>{},themes:[]},dP=()=>{var e;return(e=p.useContext(cP))!=null?e:uP};p.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:i,defaultTheme:a,value:o,attrs:l,nonce:c})=>{let u=a==="system",d=n==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${l.map(b=>`'${b}'`).join(",")})`};`:`var d=document.documentElement,n='${n}',s='setAttribute';`,h=i?iy.includes(a)&&a?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${a}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",f=(b,g=!1,v=!0)=>{let x=o?o[b]:b,y=g?b+"|| ''":`'${x}'`,w="";return i&&v&&!g&&iy.includes(b)&&(w+=`d.style.colorScheme = '${b}';`),n==="class"?g||x?w+=`c.add(${y})`:w+="null":x&&(w+=`d[s](n,${y})`),w},m=e?`!function(){${d}${f(e)}}()`:r?`!function(){try{${d}var e=localStorage.getItem('${t}');if('system'===e||(!e&&${u})){var t='${lP}',m=window.matchMedia(t);if(m.media!==t||m.matches){${f("dark")}}else{${f("light")}}}else if(e){${o?`var x=${JSON.stringify(o)};`:""}${f(o?"x[e]":"e",!0)}}${u?"":"else{"+f(a,!1,!1)+"}"}${h}}catch(e){}}()`:`!function(){try{${d}var e=localStorage.getItem('${t}');if(e){${o?`var x=${JSON.stringify(o)};`:""}${f(o?"x[e]":"e",!0)}}else{${f(a,!1,!1)};}${h}}catch(t){}}();`;return p.createElement("script",{nonce:c,dangerouslySetInnerHTML:{__html:m}})});var fP=e=>{switch(e){case"success":return pP;case"info":return xP;case"warning":return gP;case"error":return yP;default:return null}},hP=Array(12).fill(0),mP=({visible:e,className:t})=>V.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},V.createElement("div",{className:"sonner-spinner"},hP.map((n,r)=>V.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),pP=V.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},V.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),gP=V.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},V.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),xP=V.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},V.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),yP=V.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},V.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),vP=V.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},V.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),V.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),bP=()=>{let[e,t]=V.useState(document.hidden);return V.useEffect(()=>{let n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},Sh=1,wP=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:n,...r}=e,i=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:Sh++,a=this.toasts.find(l=>l.id===i),o=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(i)&&this.dismissedToasts.delete(i),a?this.toasts=this.toasts.map(l=>l.id===i?(this.publish({...l,...e,id:i,title:n}),{...l,...e,id:i,dismissible:o,title:n}):l):this.addToast({title:n,...r,dismissible:o,id:i}),i},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let r=e instanceof Promise?e:e(),i=n!==void 0,a,o=r.then(async c=>{if(a=["resolve",c],V.isValidElement(c))i=!1,this.create({id:n,type:"default",message:c});else if(NP(c)&&!c.ok){i=!1;let u=typeof t.error=="function"?await t.error(`HTTP error! status: ${c.status}`):t.error,d=typeof t.description=="function"?await t.description(`HTTP error! status: ${c.status}`):t.description;this.create({id:n,type:"error",message:u,description:d})}else if(t.success!==void 0){i=!1;let u=typeof t.success=="function"?await t.success(c):t.success,d=typeof t.description=="function"?await t.description(c):t.description;this.create({id:n,type:"success",message:u,description:d})}}).catch(async c=>{if(a=["reject",c],t.error!==void 0){i=!1;let u=typeof t.error=="function"?await t.error(c):t.error,d=typeof t.description=="function"?await t.description(c):t.description;this.create({id:n,type:"error",message:u,description:d})}}).finally(()=>{var c;i&&(this.dismiss(n),n=void 0),(c=t.finally)==null||c.call(t)}),l=()=>new Promise((c,u)=>o.then(()=>a[0]==="reject"?u(a[1]):c(a[1])).catch(u));return typeof n!="string"&&typeof n!="number"?{unwrap:l}:Object.assign(n,{unwrap:l})},this.custom=(e,t)=>{let n=(t==null?void 0:t.id)||Sh++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},Lt=new wP,jP=(e,t)=>{let n=(t==null?void 0:t.id)||Sh++;return Lt.addToast({title:e,...t,id:n}),n},NP=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",CP=jP,SP=()=>Lt.toasts,kP=()=>Lt.getActiveToasts();Object.assign(CP,{success:Lt.success,info:Lt.info,warning:Lt.warning,error:Lt.error,custom:Lt.custom,message:Lt.message,promise:Lt.promise,dismiss:Lt.dismiss,loading:Lt.loading},{getHistory:SP,getToasts:kP});function EP(e,{insertAt:t}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}EP(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)} `);function rc(e){return e.label!==void 0}var TP=3,PP="32px",AP="16px",ay=4e3,RP=356,DP=14,MP=20,FP=200;function wn(...e){return e.filter(Boolean).join(" ")}function LP(e){let[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}var OP=e=>{var t,n,r,i,a,o,l,c,u,d,h;let{invert:f,toast:m,unstyled:b,interacting:g,setHeights:v,visibleToasts:x,heights:y,index:w,toasts:j,expanded:C,removeToast:N,defaultRichColors:S,closeButton:T,style:k,cancelButtonStyle:A,actionButtonStyle:z,className:O="",descriptionClassName:W="",duration:_,position:re,gap:Y,loadingIcon:G,expandByDefault:D,classNames:L,icons:H,closeButtonAriaLabel:ce="Close toast",pauseWhenPageIsHidden:se}=e,[me,pe]=V.useState(null),[ze,at]=V.useState(null),[we,cr]=V.useState(!1),[tn,gn]=V.useState(!1),[zn,ur]=V.useState(!1),[$n,Os]=V.useState(!1),[Ei,Ti]=V.useState(!1),[Qa,Pi]=V.useState(0),[dr,E]=V.useState(0),R=V.useRef(m.duration||_||ay),F=V.useRef(null),K=V.useRef(null),q=w===0,U=w+1<=x,X=m.type,ye=m.dismissible!==!1,Te=m.className||"",Dt=m.descriptionClassName||"",fr=V.useMemo(()=>y.findIndex(fe=>fe.toastId===m.id)||0,[y,m.id]),Bn=V.useMemo(()=>{var fe;return(fe=m.closeButton)!=null?fe:T},[m.closeButton,T]),Fl=V.useMemo(()=>m.duration||_||ay,[m.duration,_]),Is=V.useRef(0),Un=V.useRef(0),Ll=V.useRef(0),hr=V.useRef(null),[gd,Ol]=re.split("-"),Fg=V.useMemo(()=>y.reduce((fe,Pe,Oe)=>Oe>=fr?fe:fe+Pe.height,0),[y,fr]),Lg=bP(),MC=m.invert||f,xd=X==="loading";Un.current=V.useMemo(()=>fr*Y+Fg,[fr,Fg]),V.useEffect(()=>{R.current=Fl},[Fl]),V.useEffect(()=>{cr(!0)},[]),V.useEffect(()=>{let fe=K.current;if(fe){let Pe=fe.getBoundingClientRect().height;return E(Pe),v(Oe=>[{toastId:m.id,height:Pe,position:m.position},...Oe]),()=>v(Oe=>Oe.filter(xn=>xn.toastId!==m.id))}},[v,m.id]),V.useLayoutEffect(()=>{if(!we)return;let fe=K.current,Pe=fe.style.height;fe.style.height="auto";let Oe=fe.getBoundingClientRect().height;fe.style.height=Pe,E(Oe),v(xn=>xn.find(yn=>yn.toastId===m.id)?xn.map(yn=>yn.toastId===m.id?{...yn,height:Oe}:yn):[{toastId:m.id,height:Oe,position:m.position},...xn])},[we,m.title,m.description,v,m.id]);let Or=V.useCallback(()=>{gn(!0),Pi(Un.current),v(fe=>fe.filter(Pe=>Pe.toastId!==m.id)),setTimeout(()=>{N(m)},FP)},[m,N,v,Un]);V.useEffect(()=>{if(m.promise&&X==="loading"||m.duration===1/0||m.type==="loading")return;let fe;return C||g||se&&Lg?(()=>{if(Ll.current<Is.current){let Pe=new Date().getTime()-Is.current;R.current=R.current-Pe}Ll.current=new Date().getTime()})():R.current!==1/0&&(Is.current=new Date().getTime(),fe=setTimeout(()=>{var Pe;(Pe=m.onAutoClose)==null||Pe.call(m,m),Or()},R.current)),()=>clearTimeout(fe)},[C,g,m,X,se,Lg,Or]),V.useEffect(()=>{m.delete&&Or()},[Or,m.delete]);function FC(){var fe,Pe,Oe;return H!=null&&H.loading?V.createElement("div",{className:wn(L==null?void 0:L.loader,(fe=m==null?void 0:m.classNames)==null?void 0:fe.loader,"sonner-loader"),"data-visible":X==="loading"},H.loading):G?V.createElement("div",{className:wn(L==null?void 0:L.loader,(Pe=m==null?void 0:m.classNames)==null?void 0:Pe.loader,"sonner-loader"),"data-visible":X==="loading"},G):V.createElement(mP,{className:wn(L==null?void 0:L.loader,(Oe=m==null?void 0:m.classNames)==null?void 0:Oe.loader),visible:X==="loading"})}return V.createElement("li",{tabIndex:0,ref:K,className:wn(O,Te,L==null?void 0:L.toast,(t=m==null?void 0:m.classNames)==null?void 0:t.toast,L==null?void 0:L.default,L==null?void 0:L[X],(n=m==null?void 0:m.classNames)==null?void 0:n[X]),"data-sonner-toast":"","data-rich-colors":(r=m.richColors)!=null?r:S,"data-styled":!(m.jsx||m.unstyled||b),"data-mounted":we,"data-promise":!!m.promise,"data-swiped":Ei,"data-removed":tn,"data-visible":U,"data-y-position":gd,"data-x-position":Ol,"data-index":w,"data-front":q,"data-swiping":zn,"data-dismissible":ye,"data-type":X,"data-invert":MC,"data-swipe-out":$n,"data-swipe-direction":ze,"data-expanded":!!(C||D&&we),style:{"--index":w,"--toasts-before":w,"--z-index":j.length-w,"--offset":`${tn?Qa:Un.current}px`,"--initial-height":D?"auto":`${dr}px`,...k,...m.style},onDragEnd:()=>{ur(!1),pe(null),hr.current=null},onPointerDown:fe=>{xd||!ye||(F.current=new Date,Pi(Un.current),fe.target.setPointerCapture(fe.pointerId),fe.target.tagName!=="BUTTON"&&(ur(!0),hr.current={x:fe.clientX,y:fe.clientY}))},onPointerUp:()=>{var fe,Pe,Oe,xn;if($n||!ye)return;hr.current=null;let yn=Number(((fe=K.current)==null?void 0:fe.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Ir=Number(((Pe=K.current)==null?void 0:Pe.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),_s=new Date().getTime()-((Oe=F.current)==null?void 0:Oe.getTime()),vn=me==="x"?yn:Ir,_r=Math.abs(vn)/_s;if(Math.abs(vn)>=MP||_r>.11){Pi(Un.current),(xn=m.onDismiss)==null||xn.call(m,m),at(me==="x"?yn>0?"right":"left":Ir>0?"down":"up"),Or(),Os(!0),Ti(!1);return}ur(!1),pe(null)},onPointerMove:fe=>{var Pe,Oe,xn,yn;if(!hr.current||!ye||((Pe=window.getSelection())==null?void 0:Pe.toString().length)>0)return;let Ir=fe.clientY-hr.current.y,_s=fe.clientX-hr.current.x,vn=(Oe=e.swipeDirections)!=null?Oe:LP(re);!me&&(Math.abs(_s)>1||Math.abs(Ir)>1)&&pe(Math.abs(_s)>Math.abs(Ir)?"x":"y");let _r={x:0,y:0};me==="y"?(vn.includes("top")||vn.includes("bottom"))&&(vn.includes("top")&&Ir<0||vn.includes("bottom")&&Ir>0)&&(_r.y=Ir):me==="x"&&(vn.includes("left")||vn.includes("right"))&&(vn.includes("left")&&_s<0||vn.includes("right")&&_s>0)&&(_r.x=_s),(Math.abs(_r.x)>0||Math.abs(_r.y)>0)&&Ti(!0),(xn=K.current)==null||xn.style.setProperty("--swipe-amount-x",`${_r.x}px`),(yn=K.current)==null||yn.style.setProperty("--swipe-amount-y",`${_r.y}px`)}},Bn&&!m.jsx?V.createElement("button",{"aria-label":ce,"data-disabled":xd,"data-close-button":!0,onClick:xd||!ye?()=>{}:()=>{var fe;Or(),(fe=m.onDismiss)==null||fe.call(m,m)},className:wn(L==null?void 0:L.closeButton,(i=m==null?void 0:m.classNames)==null?void 0:i.closeButton)},(a=H==null?void 0:H.close)!=null?a:vP):null,m.jsx||p.isValidElement(m.title)?m.jsx?m.jsx:typeof m.title=="function"?m.title():m.title:V.createElement(V.Fragment,null,X||m.icon||m.promise?V.createElement("div",{"data-icon":"",className:wn(L==null?void 0:L.icon,(o=m==null?void 0:m.classNames)==null?void 0:o.icon)},m.promise||m.type==="loading"&&!m.icon?m.icon||FC():null,m.type!=="loading"?m.icon||(H==null?void 0:H[X])||fP(X):null):null,V.createElement("div",{"data-content":"",className:wn(L==null?void 0:L.content,(l=m==null?void 0:m.classNames)==null?void 0:l.content)},V.createElement("div",{"data-title":"",className:wn(L==null?void 0:L.title,(c=m==null?void 0:m.classNames)==null?void 0:c.title)},typeof m.title=="function"?m.title():m.title),m.description?V.createElement("div",{"data-description":"",className:wn(W,Dt,L==null?void 0:L.description,(u=m==null?void 0:m.classNames)==null?void 0:u.description)},typeof m.description=="function"?m.description():m.description):null),p.isValidElement(m.cancel)?m.cancel:m.cancel&&rc(m.cancel)?V.createElement("button",{"data-button":!0,"data-cancel":!0,style:m.cancelButtonStyle||A,onClick:fe=>{var Pe,Oe;rc(m.cancel)&&ye&&((Oe=(Pe=m.cancel).onClick)==null||Oe.call(Pe,fe),Or())},className:wn(L==null?void 0:L.cancelButton,(d=m==null?void 0:m.classNames)==null?void 0:d.cancelButton)},m.cancel.label):null,p.isValidElement(m.action)?m.action:m.action&&rc(m.action)?V.createElement("button",{"data-button":!0,"data-action":!0,style:m.actionButtonStyle||z,onClick:fe=>{var Pe,Oe;rc(m.action)&&((Oe=(Pe=m.action).onClick)==null||Oe.call(Pe,fe),!fe.defaultPrevented&&Or())},className:wn(L==null?void 0:L.actionButton,(h=m==null?void 0:m.classNames)==null?void 0:h.actionButton)},m.action.label):null))};function oy(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function IP(e,t){let n={};return[e,t].forEach((r,i)=>{let a=i===1,o=a?"--mobile-offset":"--offset",l=a?AP:PP;function c(u){["top","right","bottom","left"].forEach(d=>{n[`${o}-${d}`]=typeof u=="number"?`${u}px`:u})}typeof r=="number"||typeof r=="string"?c(r):typeof r=="object"?["top","right","bottom","left"].forEach(u=>{r[u]===void 0?n[`${o}-${u}`]=l:n[`${o}-${u}`]=typeof r[u]=="number"?`${r[u]}px`:r[u]}):c(l)}),n}var _P=p.forwardRef(function(e,t){let{invert:n,position:r="bottom-right",hotkey:i=["altKey","KeyT"],expand:a,closeButton:o,className:l,offset:c,mobileOffset:u,theme:d="light",richColors:h,duration:f,style:m,visibleToasts:b=TP,toastOptions:g,dir:v=oy(),gap:x=DP,loadingIcon:y,icons:w,containerAriaLabel:j="Notifications",pauseWhenPageIsHidden:C}=e,[N,S]=V.useState([]),T=V.useMemo(()=>Array.from(new Set([r].concat(N.filter(se=>se.position).map(se=>se.position)))),[N,r]),[k,A]=V.useState([]),[z,O]=V.useState(!1),[W,_]=V.useState(!1),[re,Y]=V.useState(d!=="system"?d:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),G=V.useRef(null),D=i.join("+").replace(/Key/g,"").replace(/Digit/g,""),L=V.useRef(null),H=V.useRef(!1),ce=V.useCallback(se=>{S(me=>{var pe;return(pe=me.find(ze=>ze.id===se.id))!=null&&pe.delete||Lt.dismiss(se.id),me.filter(({id:ze})=>ze!==se.id)})},[]);return V.useEffect(()=>Lt.subscribe(se=>{if(se.dismiss){S(me=>me.map(pe=>pe.id===se.id?{...pe,delete:!0}:pe));return}setTimeout(()=>{Kw.flushSync(()=>{S(me=>{let pe=me.findIndex(ze=>ze.id===se.id);return pe!==-1?[...me.slice(0,pe),{...me[pe],...se},...me.slice(pe+1)]:[se,...me]})})})}),[]),V.useEffect(()=>{if(d!=="system"){Y(d);return}if(d==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?Y("dark"):Y("light")),typeof window>"u")return;let se=window.matchMedia("(prefers-color-scheme: dark)");try{se.addEventListener("change",({matches:me})=>{Y(me?"dark":"light")})}catch{se.addListener(({matches:pe})=>{try{Y(pe?"dark":"light")}catch(ze){console.error(ze)}})}},[d]),V.useEffect(()=>{N.length<=1&&O(!1)},[N]),V.useEffect(()=>{let se=me=>{var pe,ze;i.every(at=>me[at]||me.code===at)&&(O(!0),(pe=G.current)==null||pe.focus()),me.code==="Escape"&&(document.activeElement===G.current||(ze=G.current)!=null&&ze.contains(document.activeElement))&&O(!1)};return document.addEventListener("keydown",se),()=>document.removeEventListener("keydown",se)},[i]),V.useEffect(()=>{if(G.current)return()=>{L.current&&(L.current.focus({preventScroll:!0}),L.current=null,H.current=!1)}},[G.current]),V.createElement("section",{ref:t,"aria-label":`${j} ${D}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},T.map((se,me)=>{var pe;let[ze,at]=se.split("-");return N.length?V.createElement("ol",{key:se,dir:v==="auto"?oy():v,tabIndex:-1,ref:G,className:l,"data-sonner-toaster":!0,"data-theme":re,"data-y-position":ze,"data-lifted":z&&N.length>1&&!a,"data-x-position":at,style:{"--front-toast-height":`${((pe=k[0])==null?void 0:pe.height)||0}px`,"--width":`${RP}px`,"--gap":`${x}px`,...m,...IP(c,u)},onBlur:we=>{H.current&&!we.currentTarget.contains(we.relatedTarget)&&(H.current=!1,L.current&&(L.current.focus({preventScroll:!0}),L.current=null))},onFocus:we=>{we.target instanceof HTMLElement&&we.target.dataset.dismissible==="false"||H.current||(H.current=!0,L.current=we.relatedTarget)},onMouseEnter:()=>O(!0),onMouseMove:()=>O(!0),onMouseLeave:()=>{W||O(!1)},onDragEnd:()=>O(!1),onPointerDown:we=>{we.target instanceof HTMLElement&&we.target.dataset.dismissible==="false"||_(!0)},onPointerUp:()=>_(!1)},N.filter(we=>!we.position&&me===0||we.position===se).map((we,cr)=>{var tn,gn;return V.createElement(OP,{key:we.id,icons:w,index:cr,toast:we,defaultRichColors:h,duration:(tn=g==null?void 0:g.duration)!=null?tn:f,className:g==null?void 0:g.className,descriptionClassName:g==null?void 0:g.descriptionClassName,invert:n,visibleToasts:b,closeButton:(gn=g==null?void 0:g.closeButton)!=null?gn:o,interacting:W,position:se,style:g==null?void 0:g.style,unstyled:g==null?void 0:g.unstyled,classNames:g==null?void 0:g.classNames,cancelButtonStyle:g==null?void 0:g.cancelButtonStyle,actionButtonStyle:g==null?void 0:g.actionButtonStyle,removeToast:ce,toasts:N.filter(zn=>zn.position==we.position),heights:k.filter(zn=>zn.position==we.position),setHeights:A,expandByDefault:a,gap:x,loadingIcon:y,expanded:z,pauseWhenPageIsHidden:C,swipeDirections:e.swipeDirections})})):null}))});const VP=({...e})=>{const{theme:t="system"}=dP();return s.jsx(_P,{theme:t,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...e})};var zP=Cm[" useId ".trim().toString()]||(()=>{}),$P=0;function Eo(e){const[t,n]=p.useState(zP());return Er(()=>{e||n(r=>r??String($P++))},[e]),e||(t?`radix-${t}`:"")}const BP=["top","right","bottom","left"],Cs=Math.min,qt=Math.max,fu=Math.round,sc=Math.floor,nr=e=>({x:e,y:e}),UP={left:"right",right:"left",bottom:"top",top:"bottom"},WP={start:"end",end:"start"};function kh(e,t,n){return qt(e,Cs(t,n))}function Tr(e,t){return typeof e=="function"?e(t):e}function Pr(e){return e.split("-")[0]}function Va(e){return e.split("-")[1]}function Cp(e){return e==="x"?"y":"x"}function Sp(e){return e==="y"?"height":"width"}const HP=new Set(["top","bottom"]);function Zn(e){return HP.has(Pr(e))?"y":"x"}function kp(e){return Cp(Zn(e))}function qP(e,t,n){n===void 0&&(n=!1);const r=Va(e),i=kp(e),a=Sp(i);let o=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(o=hu(o)),[o,hu(o)]}function KP(e){const t=hu(e);return[Eh(e),t,Eh(t)]}function Eh(e){return e.replace(/start|end/g,t=>WP[t])}const ly=["left","right"],cy=["right","left"],QP=["top","bottom"],GP=["bottom","top"];function YP(e,t,n){switch(e){case"top":case"bottom":return n?t?cy:ly:t?ly:cy;case"left":case"right":return t?QP:GP;default:return[]}}function XP(e,t,n,r){const i=Va(e);let a=YP(Pr(e),n==="start",r);return i&&(a=a.map(o=>o+"-"+i),t&&(a=a.concat(a.map(Eh)))),a}function hu(e){return e.replace(/left|right|bottom|top/g,t=>UP[t])}function ZP(e){return{top:0,right:0,bottom:0,left:0,...e}}function _1(e){return typeof e!="number"?ZP(e):{top:e,right:e,bottom:e,left:e}}function mu(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function uy(e,t,n){let{reference:r,floating:i}=e;const a=Zn(t),o=kp(t),l=Sp(o),c=Pr(t),u=a==="y",d=r.x+r.width/2-i.width/2,h=r.y+r.height/2-i.height/2,f=r[l]/2-i[l]/2;let m;switch(c){case"top":m={x:d,y:r.y-i.height};break;case"bottom":m={x:d,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:h};break;case"left":m={x:r.x-i.width,y:h};break;default:m={x:r.x,y:r.y}}switch(Va(t)){case"start":m[o]-=f*(n&&u?-1:1);break;case"end":m[o]+=f*(n&&u?-1:1);break}return m}const JP=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:a=[],platform:o}=n,l=a.filter(Boolean),c=await(o.isRTL==null?void 0:o.isRTL(t));let u=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:d,y:h}=uy(u,r,c),f=r,m={},b=0;for(let g=0;g<l.length;g++){const{name:v,fn:x}=l[g],{x:y,y:w,data:j,reset:C}=await x({x:d,y:h,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:u,platform:o,elements:{reference:e,floating:t}});d=y??d,h=w??h,m={...m,[v]:{...m[v],...j}},C&&b<=50&&(b++,typeof C=="object"&&(C.placement&&(f=C.placement),C.rects&&(u=C.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):C.rects),{x:d,y:h}=uy(u,f,c)),g=-1)}return{x:d,y:h,placement:f,strategy:i,middlewareData:m}};async function tl(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:a,rects:o,elements:l,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:h="floating",altBoundary:f=!1,padding:m=0}=Tr(t,e),b=_1(m),v=l[f?h==="floating"?"reference":"floating":h],x=mu(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(v)))==null||n?v:v.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(l.floating)),boundary:u,rootBoundary:d,strategy:c})),y=h==="floating"?{x:r,y:i,width:o.floating.width,height:o.floating.height}:o.reference,w=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l.floating)),j=await(a.isElement==null?void 0:a.isElement(w))?await(a.getScale==null?void 0:a.getScale(w))||{x:1,y:1}:{x:1,y:1},C=mu(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:y,offsetParent:w,strategy:c}):y);return{top:(x.top-C.top+b.top)/j.y,bottom:(C.bottom-x.bottom+b.bottom)/j.y,left:(x.left-C.left+b.left)/j.x,right:(C.right-x.right+b.right)/j.x}}const e4=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:a,platform:o,elements:l,middlewareData:c}=t,{element:u,padding:d=0}=Tr(e,t)||{};if(u==null)return{};const h=_1(d),f={x:n,y:r},m=kp(i),b=Sp(m),g=await o.getDimensions(u),v=m==="y",x=v?"top":"left",y=v?"bottom":"right",w=v?"clientHeight":"clientWidth",j=a.reference[b]+a.reference[m]-f[m]-a.floating[b],C=f[m]-a.reference[m],N=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u));let S=N?N[w]:0;(!S||!await(o.isElement==null?void 0:o.isElement(N)))&&(S=l.floating[w]||a.floating[b]);const T=j/2-C/2,k=S/2-g[b]/2-1,A=Cs(h[x],k),z=Cs(h[y],k),O=A,W=S-g[b]-z,_=S/2-g[b]/2+T,re=kh(O,_,W),Y=!c.arrow&&Va(i)!=null&&_!==re&&a.reference[b]/2-(_<O?A:z)-g[b]/2<0,G=Y?_<O?_-O:_-W:0;return{[m]:f[m]+G,data:{[m]:re,centerOffset:_-re-G,...Y&&{alignmentOffset:G}},reset:Y}}}),t4=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:a,rects:o,initialPlacement:l,platform:c,elements:u}=t,{mainAxis:d=!0,crossAxis:h=!0,fallbackPlacements:f,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:g=!0,...v}=Tr(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const x=Pr(i),y=Zn(l),w=Pr(l)===l,j=await(c.isRTL==null?void 0:c.isRTL(u.floating)),C=f||(w||!g?[hu(l)]:KP(l)),N=b!=="none";!f&&N&&C.push(...XP(l,g,b,j));const S=[l,...C],T=await tl(t,v),k=[];let A=((r=a.flip)==null?void 0:r.overflows)||[];if(d&&k.push(T[x]),h){const _=qP(i,o,j);k.push(T[_[0]],T[_[1]])}if(A=[...A,{placement:i,overflows:k}],!k.every(_=>_<=0)){var z,O;const _=(((z=a.flip)==null?void 0:z.index)||0)+1,re=S[_];if(re&&(!(h==="alignment"?y!==Zn(re):!1)||A.every(D=>D.overflows[0]>0&&Zn(D.placement)===y)))return{data:{index:_,overflows:A},reset:{placement:re}};let Y=(O=A.filter(G=>G.overflows[0]<=0).sort((G,D)=>G.overflows[1]-D.overflows[1])[0])==null?void 0:O.placement;if(!Y)switch(m){case"bestFit":{var W;const G=(W=A.filter(D=>{if(N){const L=Zn(D.placement);return L===y||L==="y"}return!0}).map(D=>[D.placement,D.overflows.filter(L=>L>0).reduce((L,H)=>L+H,0)]).sort((D,L)=>D[1]-L[1])[0])==null?void 0:W[0];G&&(Y=G);break}case"initialPlacement":Y=l;break}if(i!==Y)return{reset:{placement:Y}}}return{}}}};function dy(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function fy(e){return BP.some(t=>e[t]>=0)}const n4=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...i}=Tr(e,t);switch(r){case"referenceHidden":{const a=await tl(t,{...i,elementContext:"reference"}),o=dy(a,n.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:fy(o)}}}case"escaped":{const a=await tl(t,{...i,altBoundary:!0}),o=dy(a,n.floating);return{data:{escapedOffsets:o,escaped:fy(o)}}}default:return{}}}}},V1=new Set(["left","top"]);async function r4(e,t){const{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Pr(n),l=Va(n),c=Zn(n)==="y",u=V1.has(o)?-1:1,d=a&&c?-1:1,h=Tr(t,e);let{mainAxis:f,crossAxis:m,alignmentAxis:b}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return l&&typeof b=="number"&&(m=l==="end"?b*-1:b),c?{x:m*d,y:f*u}:{x:f*u,y:m*d}}const s4=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:a,placement:o,middlewareData:l}=t,c=await r4(t,e);return o===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:i+c.x,y:a+c.y,data:{...c,placement:o}}}}},i4=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:a=!0,crossAxis:o=!1,limiter:l={fn:v=>{let{x,y}=v;return{x,y}}},...c}=Tr(e,t),u={x:n,y:r},d=await tl(t,c),h=Zn(Pr(i)),f=Cp(h);let m=u[f],b=u[h];if(a){const v=f==="y"?"top":"left",x=f==="y"?"bottom":"right",y=m+d[v],w=m-d[x];m=kh(y,m,w)}if(o){const v=h==="y"?"top":"left",x=h==="y"?"bottom":"right",y=b+d[v],w=b-d[x];b=kh(y,b,w)}const g=l.fn({...t,[f]:m,[h]:b});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[f]:a,[h]:o}}}}}},a4=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:l=0,mainAxis:c=!0,crossAxis:u=!0}=Tr(e,t),d={x:n,y:r},h=Zn(i),f=Cp(h);let m=d[f],b=d[h];const g=Tr(l,t),v=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(c){const w=f==="y"?"height":"width",j=a.reference[f]-a.floating[w]+v.mainAxis,C=a.reference[f]+a.reference[w]-v.mainAxis;m<j?m=j:m>C&&(m=C)}if(u){var x,y;const w=f==="y"?"width":"height",j=V1.has(Pr(i)),C=a.reference[h]-a.floating[w]+(j&&((x=o.offset)==null?void 0:x[h])||0)+(j?0:v.crossAxis),N=a.reference[h]+a.reference[w]+(j?0:((y=o.offset)==null?void 0:y[h])||0)-(j?v.crossAxis:0);b<C?b=C:b>N&&(b=N)}return{[f]:m,[h]:b}}}},o4=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:a,platform:o,elements:l}=t,{apply:c=()=>{},...u}=Tr(e,t),d=await tl(t,u),h=Pr(i),f=Va(i),m=Zn(i)==="y",{width:b,height:g}=a.floating;let v,x;h==="top"||h==="bottom"?(v=h,x=f===(await(o.isRTL==null?void 0:o.isRTL(l.floating))?"start":"end")?"left":"right"):(x=h,v=f==="end"?"top":"bottom");const y=g-d.top-d.bottom,w=b-d.left-d.right,j=Cs(g-d[v],y),C=Cs(b-d[x],w),N=!t.middlewareData.shift;let S=j,T=C;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(T=w),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(S=y),N&&!f){const A=qt(d.left,0),z=qt(d.right,0),O=qt(d.top,0),W=qt(d.bottom,0);m?T=b-2*(A!==0||z!==0?A+z:qt(d.left,d.right)):S=g-2*(O!==0||W!==0?O+W:qt(d.top,d.bottom))}await c({...t,availableWidth:T,availableHeight:S});const k=await o.getDimensions(l.floating);return b!==k.width||g!==k.height?{reset:{rects:!0}}:{}}}};function Xu(){return typeof window<"u"}function za(e){return z1(e)?(e.nodeName||"").toLowerCase():"#document"}function Yt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function or(e){var t;return(t=(z1(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function z1(e){return Xu()?e instanceof Node||e instanceof Yt(e).Node:!1}function On(e){return Xu()?e instanceof Element||e instanceof Yt(e).Element:!1}function ir(e){return Xu()?e instanceof HTMLElement||e instanceof Yt(e).HTMLElement:!1}function hy(e){return!Xu()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Yt(e).ShadowRoot}const l4=new Set(["inline","contents"]);function Cl(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=In(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!l4.has(i)}const c4=new Set(["table","td","th"]);function u4(e){return c4.has(za(e))}const d4=[":popover-open",":modal"];function Zu(e){return d4.some(t=>{try{return e.matches(t)}catch{return!1}})}const f4=["transform","translate","scale","rotate","perspective"],h4=["transform","translate","scale","rotate","perspective","filter"],m4=["paint","layout","strict","content"];function Ep(e){const t=Tp(),n=On(e)?In(e):e;return f4.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||h4.some(r=>(n.willChange||"").includes(r))||m4.some(r=>(n.contain||"").includes(r))}function p4(e){let t=Ss(e);for(;ir(t)&&!Pa(t);){if(Ep(t))return t;if(Zu(t))return null;t=Ss(t)}return null}function Tp(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const g4=new Set(["html","body","#document"]);function Pa(e){return g4.has(za(e))}function In(e){return Yt(e).getComputedStyle(e)}function Ju(e){return On(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ss(e){if(za(e)==="html")return e;const t=e.assignedSlot||e.parentNode||hy(e)&&e.host||or(e);return hy(t)?t.host:t}function $1(e){const t=Ss(e);return Pa(t)?e.ownerDocument?e.ownerDocument.body:e.body:ir(t)&&Cl(t)?t:$1(t)}function nl(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=$1(e),a=i===((r=e.ownerDocument)==null?void 0:r.body),o=Yt(i);if(a){const l=Th(o);return t.concat(o,o.visualViewport||[],Cl(i)?i:[],l&&n?nl(l):[])}return t.concat(i,nl(i,[],n))}function Th(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function B1(e){const t=In(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=ir(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,l=fu(n)!==a||fu(r)!==o;return l&&(n=a,r=o),{width:n,height:r,$:l}}function Pp(e){return On(e)?e:e.contextElement}function oa(e){const t=Pp(e);if(!ir(t))return nr(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:a}=B1(t);let o=(a?fu(n.width):n.width)/r,l=(a?fu(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!l||!Number.isFinite(l))&&(l=1),{x:o,y:l}}const x4=nr(0);function U1(e){const t=Yt(e);return!Tp()||!t.visualViewport?x4:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function y4(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Yt(e)?!1:t}function yi(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),a=Pp(e);let o=nr(1);t&&(r?On(r)&&(o=oa(r)):o=oa(e));const l=y4(a,n,r)?U1(a):nr(0);let c=(i.left+l.x)/o.x,u=(i.top+l.y)/o.y,d=i.width/o.x,h=i.height/o.y;if(a){const f=Yt(a),m=r&&On(r)?Yt(r):r;let b=f,g=Th(b);for(;g&&r&&m!==b;){const v=oa(g),x=g.getBoundingClientRect(),y=In(g),w=x.left+(g.clientLeft+parseFloat(y.paddingLeft))*v.x,j=x.top+(g.clientTop+parseFloat(y.paddingTop))*v.y;c*=v.x,u*=v.y,d*=v.x,h*=v.y,c+=w,u+=j,b=Yt(g),g=Th(b)}}return mu({width:d,height:h,x:c,y:u})}function Ap(e,t){const n=Ju(e).scrollLeft;return t?t.left+n:yi(or(e)).left+n}function W1(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),i=r.left+t.scrollLeft-(n?0:Ap(e,r)),a=r.top+t.scrollTop;return{x:i,y:a}}function v4(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const a=i==="fixed",o=or(r),l=t?Zu(t.floating):!1;if(r===o||l&&a)return n;let c={scrollLeft:0,scrollTop:0},u=nr(1);const d=nr(0),h=ir(r);if((h||!h&&!a)&&((za(r)!=="body"||Cl(o))&&(c=Ju(r)),ir(r))){const m=yi(r);u=oa(r),d.x=m.x+r.clientLeft,d.y=m.y+r.clientTop}const f=o&&!h&&!a?W1(o,c,!0):nr(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-c.scrollLeft*u.x+d.x+f.x,y:n.y*u.y-c.scrollTop*u.y+d.y+f.y}}function b4(e){return Array.from(e.getClientRects())}function w4(e){const t=or(e),n=Ju(e),r=e.ownerDocument.body,i=qt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=qt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+Ap(e);const l=-n.scrollTop;return In(r).direction==="rtl"&&(o+=qt(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:l}}function j4(e,t){const n=Yt(e),r=or(e),i=n.visualViewport;let a=r.clientWidth,o=r.clientHeight,l=0,c=0;if(i){a=i.width,o=i.height;const u=Tp();(!u||u&&t==="fixed")&&(l=i.offsetLeft,c=i.offsetTop)}return{width:a,height:o,x:l,y:c}}const N4=new Set(["absolute","fixed"]);function C4(e,t){const n=yi(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=ir(e)?oa(e):nr(1),o=e.clientWidth*a.x,l=e.clientHeight*a.y,c=i*a.x,u=r*a.y;return{width:o,height:l,x:c,y:u}}function my(e,t,n){let r;if(t==="viewport")r=j4(e,n);else if(t==="document")r=w4(or(e));else if(On(t))r=C4(t,n);else{const i=U1(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return mu(r)}function H1(e,t){const n=Ss(e);return n===t||!On(n)||Pa(n)?!1:In(n).position==="fixed"||H1(n,t)}function S4(e,t){const n=t.get(e);if(n)return n;let r=nl(e,[],!1).filter(l=>On(l)&&za(l)!=="body"),i=null;const a=In(e).position==="fixed";let o=a?Ss(e):e;for(;On(o)&&!Pa(o);){const l=In(o),c=Ep(o);!c&&l.position==="fixed"&&(i=null),(a?!c&&!i:!c&&l.position==="static"&&!!i&&N4.has(i.position)||Cl(o)&&!c&&H1(e,o))?r=r.filter(d=>d!==o):i=l,o=Ss(o)}return t.set(e,r),r}function k4(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const o=[...n==="clippingAncestors"?Zu(t)?[]:S4(t,this._c):[].concat(n),r],l=o[0],c=o.reduce((u,d)=>{const h=my(t,d,i);return u.top=qt(h.top,u.top),u.right=Cs(h.right,u.right),u.bottom=Cs(h.bottom,u.bottom),u.left=qt(h.left,u.left),u},my(t,l,i));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function E4(e){const{width:t,height:n}=B1(e);return{width:t,height:n}}function T4(e,t,n){const r=ir(t),i=or(t),a=n==="fixed",o=yi(e,!0,a,t);let l={scrollLeft:0,scrollTop:0};const c=nr(0);function u(){c.x=Ap(i)}if(r||!r&&!a)if((za(t)!=="body"||Cl(i))&&(l=Ju(t)),r){const m=yi(t,!0,a,t);c.x=m.x+t.clientLeft,c.y=m.y+t.clientTop}else i&&u();a&&!r&&i&&u();const d=i&&!r&&!a?W1(i,l):nr(0),h=o.left+l.scrollLeft-c.x-d.x,f=o.top+l.scrollTop-c.y-d.y;return{x:h,y:f,width:o.width,height:o.height}}function Gd(e){return In(e).position==="static"}function py(e,t){if(!ir(e)||In(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return or(e)===n&&(n=n.ownerDocument.body),n}function q1(e,t){const n=Yt(e);if(Zu(e))return n;if(!ir(e)){let i=Ss(e);for(;i&&!Pa(i);){if(On(i)&&!Gd(i))return i;i=Ss(i)}return n}let r=py(e,t);for(;r&&u4(r)&&Gd(r);)r=py(r,t);return r&&Pa(r)&&Gd(r)&&!Ep(r)?n:r||p4(e)||n}const P4=async function(e){const t=this.getOffsetParent||q1,n=this.getDimensions,r=await n(e.floating);return{reference:T4(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function A4(e){return In(e).direction==="rtl"}const R4={convertOffsetParentRelativeRectToViewportRelativeRect:v4,getDocumentElement:or,getClippingRect:k4,getOffsetParent:q1,getElementRects:P4,getClientRects:b4,getDimensions:E4,getScale:oa,isElement:On,isRTL:A4};function K1(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function D4(e,t){let n=null,r;const i=or(e);function a(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function o(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),a();const u=e.getBoundingClientRect(),{left:d,top:h,width:f,height:m}=u;if(l||t(),!f||!m)return;const b=sc(h),g=sc(i.clientWidth-(d+f)),v=sc(i.clientHeight-(h+m)),x=sc(d),w={rootMargin:-b+"px "+-g+"px "+-v+"px "+-x+"px",threshold:qt(0,Cs(1,c))||1};let j=!0;function C(N){const S=N[0].intersectionRatio;if(S!==c){if(!j)return o();S?o(!1,S):r=setTimeout(()=>{o(!1,1e-7)},1e3)}S===1&&!K1(u,e.getBoundingClientRect())&&o(),j=!1}try{n=new IntersectionObserver(C,{...w,root:i.ownerDocument})}catch{n=new IntersectionObserver(C,w)}n.observe(e)}return o(!0),a}function M4(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,u=Pp(e),d=i||a?[...u?nl(u):[],...nl(t)]:[];d.forEach(x=>{i&&x.addEventListener("scroll",n,{passive:!0}),a&&x.addEventListener("resize",n)});const h=u&&l?D4(u,n):null;let f=-1,m=null;o&&(m=new ResizeObserver(x=>{let[y]=x;y&&y.target===u&&m&&(m.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var w;(w=m)==null||w.observe(t)})),n()}),u&&!c&&m.observe(u),m.observe(t));let b,g=c?yi(e):null;c&&v();function v(){const x=yi(e);g&&!K1(g,x)&&n(),g=x,b=requestAnimationFrame(v)}return n(),()=>{var x;d.forEach(y=>{i&&y.removeEventListener("scroll",n),a&&y.removeEventListener("resize",n)}),h==null||h(),(x=m)==null||x.disconnect(),m=null,c&&cancelAnimationFrame(b)}}const F4=s4,L4=i4,O4=t4,I4=o4,_4=n4,gy=e4,V4=a4,z4=(e,t,n)=>{const r=new Map,i={platform:R4,...n},a={...i.platform,_c:r};return JP(e,t,{...i,platform:a})};var $4=typeof document<"u",B4=function(){},Ac=$4?p.useLayoutEffect:B4;function pu(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!pu(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const a=i[r];if(!(a==="_owner"&&e.$$typeof)&&!pu(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function Q1(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function xy(e,t){const n=Q1(e);return Math.round(t*n)/n}function Yd(e){const t=p.useRef(e);return Ac(()=>{t.current=e}),t}function U4(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:l=!0,whileElementsMounted:c,open:u}=e,[d,h]=p.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,m]=p.useState(r);pu(f,r)||m(r);const[b,g]=p.useState(null),[v,x]=p.useState(null),y=p.useCallback(D=>{D!==N.current&&(N.current=D,g(D))},[]),w=p.useCallback(D=>{D!==S.current&&(S.current=D,x(D))},[]),j=a||b,C=o||v,N=p.useRef(null),S=p.useRef(null),T=p.useRef(d),k=c!=null,A=Yd(c),z=Yd(i),O=Yd(u),W=p.useCallback(()=>{if(!N.current||!S.current)return;const D={placement:t,strategy:n,middleware:f};z.current&&(D.platform=z.current),z4(N.current,S.current,D).then(L=>{const H={...L,isPositioned:O.current!==!1};_.current&&!pu(T.current,H)&&(T.current=H,wl.flushSync(()=>{h(H)}))})},[f,t,n,z,O]);Ac(()=>{u===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,h(D=>({...D,isPositioned:!1})))},[u]);const _=p.useRef(!1);Ac(()=>(_.current=!0,()=>{_.current=!1}),[]),Ac(()=>{if(j&&(N.current=j),C&&(S.current=C),j&&C){if(A.current)return A.current(j,C,W);W()}},[j,C,W,A,k]);const re=p.useMemo(()=>({reference:N,floating:S,setReference:y,setFloating:w}),[y,w]),Y=p.useMemo(()=>({reference:j,floating:C}),[j,C]),G=p.useMemo(()=>{const D={position:n,left:0,top:0};if(!Y.floating)return D;const L=xy(Y.floating,d.x),H=xy(Y.floating,d.y);return l?{...D,transform:"translate("+L+"px, "+H+"px)",...Q1(Y.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:L,top:H}},[n,l,Y.floating,d.x,d.y]);return p.useMemo(()=>({...d,update:W,refs:re,elements:Y,floatingStyles:G}),[d,W,re,Y,G])}const W4=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:i}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?gy({element:r.current,padding:i}).fn(n):{}:r?gy({element:r,padding:i}).fn(n):{}}}},H4=(e,t)=>({...F4(e),options:[e,t]}),q4=(e,t)=>({...L4(e),options:[e,t]}),K4=(e,t)=>({...V4(e),options:[e,t]}),Q4=(e,t)=>({...O4(e),options:[e,t]}),G4=(e,t)=>({...I4(e),options:[e,t]}),Y4=(e,t)=>({..._4(e),options:[e,t]}),X4=(e,t)=>({...W4(e),options:[e,t]});var Z4="Arrow",G1=p.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...a}=e;return s.jsx(Re.svg,{...a,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:s.jsx("polygon",{points:"0,0 30,0 15,10"})})});G1.displayName=Z4;var J4=G1;function eA(e){const[t,n]=p.useState(void 0);return Er(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const a=i[0];let o,l;if("borderBoxSize"in a){const c=a.borderBoxSize,u=Array.isArray(c)?c[0]:c;o=u.inlineSize,l=u.blockSize}else o=e.offsetWidth,l=e.offsetHeight;n({width:o,height:l})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Y1="Popper",[X1,Z1]=Ni(Y1),[C_,J1]=X1(Y1),ej="PopperAnchor",tj=p.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,a=J1(ej,n),o=p.useRef(null),l=Nt(t,o);return p.useEffect(()=>{a.onAnchorChange((r==null?void 0:r.current)||o.current)}),r?null:s.jsx(Re.div,{...i,ref:l})});tj.displayName=ej;var Rp="PopperContent",[tA,nA]=X1(Rp),nj=p.forwardRef((e,t)=>{var we,cr,tn,gn,zn,ur;const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:a="center",alignOffset:o=0,arrowPadding:l=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:h="partial",hideWhenDetached:f=!1,updatePositionStrategy:m="optimized",onPlaced:b,...g}=e,v=J1(Rp,n),[x,y]=p.useState(null),w=Nt(t,$n=>y($n)),[j,C]=p.useState(null),N=eA(j),S=(N==null?void 0:N.width)??0,T=(N==null?void 0:N.height)??0,k=r+(a!=="center"?"-"+a:""),A=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},z=Array.isArray(u)?u:[u],O=z.length>0,W={padding:A,boundary:z.filter(sA),altBoundary:O},{refs:_,floatingStyles:re,placement:Y,isPositioned:G,middlewareData:D}=U4({strategy:"fixed",placement:k,whileElementsMounted:(...$n)=>M4(...$n,{animationFrame:m==="always"}),elements:{reference:v.anchor},middleware:[H4({mainAxis:i+T,alignmentAxis:o}),c&&q4({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?K4():void 0,...W}),c&&Q4({...W}),G4({...W,apply:({elements:$n,rects:Os,availableWidth:Ei,availableHeight:Ti})=>{const{width:Qa,height:Pi}=Os.reference,dr=$n.floating.style;dr.setProperty("--radix-popper-available-width",`${Ei}px`),dr.setProperty("--radix-popper-available-height",`${Ti}px`),dr.setProperty("--radix-popper-anchor-width",`${Qa}px`),dr.setProperty("--radix-popper-anchor-height",`${Pi}px`)}}),j&&X4({element:j,padding:l}),iA({arrowWidth:S,arrowHeight:T}),f&&Y4({strategy:"referenceHidden",...W})]}),[L,H]=ij(Y),ce=Ln(b);Er(()=>{G&&(ce==null||ce())},[G,ce]);const se=(we=D.arrow)==null?void 0:we.x,me=(cr=D.arrow)==null?void 0:cr.y,pe=((tn=D.arrow)==null?void 0:tn.centerOffset)!==0,[ze,at]=p.useState();return Er(()=>{x&&at(window.getComputedStyle(x).zIndex)},[x]),s.jsx("div",{ref:_.setFloating,"data-radix-popper-content-wrapper":"",style:{...re,transform:G?re.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ze,"--radix-popper-transform-origin":[(gn=D.transformOrigin)==null?void 0:gn.x,(zn=D.transformOrigin)==null?void 0:zn.y].join(" "),...((ur=D.hide)==null?void 0:ur.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:s.jsx(tA,{scope:n,placedSide:L,onArrowChange:C,arrowX:se,arrowY:me,shouldHideArrow:pe,children:s.jsx(Re.div,{"data-side":L,"data-align":H,...g,ref:w,style:{...g.style,animation:G?void 0:"none"}})})})});nj.displayName=Rp;var rj="PopperArrow",rA={top:"bottom",right:"left",bottom:"top",left:"right"},sj=p.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,a=nA(rj,r),o=rA[a.placedSide];return s.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:s.jsx(J4,{...i,ref:n,style:{...i.style,display:"block"}})})});sj.displayName=rj;function sA(e){return e!==null}var iA=e=>({name:"transformOrigin",options:e,fn(t){var v,x,y;const{placement:n,rects:r,middlewareData:i}=t,o=((v=i.arrow)==null?void 0:v.centerOffset)!==0,l=o?0:e.arrowWidth,c=o?0:e.arrowHeight,[u,d]=ij(n),h={start:"0%",center:"50%",end:"100%"}[d],f=(((x=i.arrow)==null?void 0:x.x)??0)+l/2,m=(((y=i.arrow)==null?void 0:y.y)??0)+c/2;let b="",g="";return u==="bottom"?(b=o?h:`${f}px`,g=`${-c}px`):u==="top"?(b=o?h:`${f}px`,g=`${r.floating.height+c}px`):u==="right"?(b=`${-c}px`,g=o?h:`${m}px`):u==="left"&&(b=`${r.floating.width+c}px`,g=o?h:`${m}px`),{data:{x:b,y:g}}}});function ij(e){const[t,n="center"]=e.split("-");return[t,n]}var aA=tj,oA=nj,lA=sj,[ed,S_]=Ni("Tooltip",[Z1]),Dp=Z1(),aj="TooltipProvider",cA=700,yy="tooltip.open",[uA,oj]=ed(aj),lj=e=>{const{__scopeTooltip:t,delayDuration:n=cA,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:a}=e,o=p.useRef(!0),l=p.useRef(!1),c=p.useRef(0);return p.useEffect(()=>{const u=c.current;return()=>window.clearTimeout(u)},[]),s.jsx(uA,{scope:t,isOpenDelayedRef:o,delayDuration:n,onOpen:p.useCallback(()=>{window.clearTimeout(c.current),o.current=!1},[]),onClose:p.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.current=!0,r)},[r]),isPointerInTransitRef:l,onPointerInTransitChange:p.useCallback(u=>{l.current=u},[]),disableHoverableContent:i,children:a})};lj.displayName=aj;var cj="Tooltip",[k_,td]=ed(cj),Ph="TooltipTrigger",dA=p.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=td(Ph,n),a=oj(Ph,n),o=Dp(n),l=p.useRef(null),c=Nt(t,l,i.onTriggerChange),u=p.useRef(!1),d=p.useRef(!1),h=p.useCallback(()=>u.current=!1,[]);return p.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),s.jsx(aA,{asChild:!0,...o,children:s.jsx(Re.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:c,onPointerMove:je(e.onPointerMove,f=>{f.pointerType!=="touch"&&!d.current&&!a.isPointerInTransitRef.current&&(i.onTriggerEnter(),d.current=!0)}),onPointerLeave:je(e.onPointerLeave,()=>{i.onTriggerLeave(),d.current=!1}),onPointerDown:je(e.onPointerDown,()=>{i.open&&i.onClose(),u.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:je(e.onFocus,()=>{u.current||i.onOpen()}),onBlur:je(e.onBlur,i.onClose),onClick:je(e.onClick,i.onClose)})})});dA.displayName=Ph;var fA="TooltipPortal",[E_,hA]=ed(fA,{forceMount:void 0}),Aa="TooltipContent",uj=p.forwardRef((e,t)=>{const n=hA(Aa,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i="top",...a}=e,o=td(Aa,e.__scopeTooltip);return s.jsx(Ci,{present:r||o.open,children:o.disableHoverableContent?s.jsx(dj,{side:i,...a,ref:t}):s.jsx(mA,{side:i,...a,ref:t})})}),mA=p.forwardRef((e,t)=>{const n=td(Aa,e.__scopeTooltip),r=oj(Aa,e.__scopeTooltip),i=p.useRef(null),a=Nt(t,i),[o,l]=p.useState(null),{trigger:c,onClose:u}=n,d=i.current,{onPointerInTransitChange:h}=r,f=p.useCallback(()=>{l(null),h(!1)},[h]),m=p.useCallback((b,g)=>{const v=b.currentTarget,x={x:b.clientX,y:b.clientY},y=vA(x,v.getBoundingClientRect()),w=bA(x,y),j=wA(g.getBoundingClientRect()),C=NA([...w,...j]);l(C),h(!0)},[h]);return p.useEffect(()=>()=>f(),[f]),p.useEffect(()=>{if(c&&d){const b=v=>m(v,d),g=v=>m(v,c);return c.addEventListener("pointerleave",b),d.addEventListener("pointerleave",g),()=>{c.removeEventListener("pointerleave",b),d.removeEventListener("pointerleave",g)}}},[c,d,m,f]),p.useEffect(()=>{if(o){const b=g=>{const v=g.target,x={x:g.clientX,y:g.clientY},y=(c==null?void 0:c.contains(v))||(d==null?void 0:d.contains(v)),w=!jA(x,o);y?f():w&&(f(),u())};return document.addEventListener("pointermove",b),()=>document.removeEventListener("pointermove",b)}},[c,d,o,u,f]),s.jsx(dj,{...e,ref:a})}),[pA,gA]=ed(cj,{isInside:!1}),xA=gE("TooltipContent"),dj=p.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:a,onPointerDownOutside:o,...l}=e,c=td(Aa,n),u=Dp(n),{onClose:d}=c;return p.useEffect(()=>(document.addEventListener(yy,d),()=>document.removeEventListener(yy,d)),[d]),p.useEffect(()=>{if(c.trigger){const h=f=>{const m=f.target;m!=null&&m.contains(c.trigger)&&d()};return window.addEventListener("scroll",h,{capture:!0}),()=>window.removeEventListener("scroll",h,{capture:!0})}},[c.trigger,d]),s.jsx(qu,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:h=>h.preventDefault(),onDismiss:d,children:s.jsxs(oA,{"data-state":c.stateAttribute,...u,...l,ref:t,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[s.jsx(xA,{children:r}),s.jsx(pA,{scope:n,isInside:!0,children:s.jsx(VE,{id:c.contentId,role:"tooltip",children:i||r})})]})})});uj.displayName=Aa;var fj="TooltipArrow",yA=p.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=Dp(n);return gA(fj,n).isInside?null:s.jsx(lA,{...i,...r,ref:t})});yA.displayName=fj;function vA(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,i,a)){case a:return"left";case i:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function bA(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function wA(e){const{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function jA(e,t){const{x:n,y:r}=e;let i=!1;for(let a=0,o=t.length-1;a<t.length;o=a++){const l=t[a],c=t[o],u=l.x,d=l.y,h=c.x,f=c.y;d>r!=f>r&&n<(h-u)*(r-d)/(f-d)+u&&(i=!i)}return i}function NA(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),CA(t)}function CA(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const i=e[r];for(;t.length>=2;){const a=t[t.length-1],o=t[t.length-2];if((a.x-o.x)*(i.y-o.y)>=(a.y-o.y)*(i.x-o.x))t.pop();else break}t.push(i)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const i=e[r];for(;n.length>=2;){const a=n[n.length-1],o=n[n.length-2];if((a.x-o.x)*(i.y-o.y)>=(a.y-o.y)*(i.x-o.x))n.pop();else break}n.push(i)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var SA=lj,hj=uj;const kA=SA,EA=p.forwardRef(({className:e,sideOffset:t=4,...n},r)=>s.jsx(hj,{ref:r,sideOffset:t,className:ge("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n}));EA.displayName=hj.displayName;var Sl=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},vi=typeof window>"u"||"Deno"in globalThis;function Ot(){}function TA(e,t){return typeof e=="function"?e(t):e}function Ah(e){return typeof e=="number"&&e>=0&&e!==1/0}function mj(e,t){return Math.max(e+(t||0)-Date.now(),0)}function vs(e,t){return typeof e=="function"?e(t):e}function an(e,t){return typeof e=="function"?e(t):e}function vy(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:l}=e;if(o){if(r){if(t.queryHash!==Mp(o,t.options))return!1}else if(!sl(t.queryKey,o))return!1}if(n!=="all"){const c=t.isActive();if(n==="active"&&!c||n==="inactive"&&c)return!1}return!(typeof l=="boolean"&&t.isStale()!==l||i&&i!==t.state.fetchStatus||a&&!a(t))}function by(e,t){const{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(rl(t.options.mutationKey)!==rl(a))return!1}else if(!sl(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function Mp(e,t){return((t==null?void 0:t.queryKeyHashFn)||rl)(e)}function rl(e){return JSON.stringify(e,(t,n)=>Dh(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function sl(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>sl(e[n],t[n])):!1}function pj(e,t){if(e===t)return e;const n=wy(e)&&wy(t);if(n||Dh(e)&&Dh(t)){const r=n?e:Object.keys(e),i=r.length,a=n?t:Object.keys(t),o=a.length,l=n?[]:{},c=new Set(r);let u=0;for(let d=0;d<o;d++){const h=n?d:a[d];(!n&&c.has(h)||n)&&e[h]===void 0&&t[h]===void 0?(l[h]=void 0,u++):(l[h]=pj(e[h],t[h]),l[h]===e[h]&&e[h]!==void 0&&u++)}return i===o&&u===i?e:l}return t}function Rh(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function wy(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Dh(e){if(!jy(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!jy(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function jy(e){return Object.prototype.toString.call(e)==="[object Object]"}function PA(e){return new Promise(t=>{setTimeout(t,e)})}function Mh(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?pj(e,t):t}function AA(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function RA(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Fp=Symbol();function gj(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Fp?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function DA(e,t){return typeof e=="function"?e(...t):!!e}var Xs,Jr,ua,Sv,MA=(Sv=class extends Sl{constructor(){super();oe(this,Xs);oe(this,Jr);oe(this,ua);J(this,ua,t=>{if(!vi&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){P(this,Jr)||this.setEventListener(P(this,ua))}onUnsubscribe(){var t;this.hasListeners()||((t=P(this,Jr))==null||t.call(this),J(this,Jr,void 0))}setEventListener(t){var n;J(this,ua,t),(n=P(this,Jr))==null||n.call(this),J(this,Jr,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){P(this,Xs)!==t&&(J(this,Xs,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof P(this,Xs)=="boolean"?P(this,Xs):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Xs=new WeakMap,Jr=new WeakMap,ua=new WeakMap,Sv),Lp=new MA,da,es,fa,kv,FA=(kv=class extends Sl{constructor(){super();oe(this,da,!0);oe(this,es);oe(this,fa);J(this,fa,t=>{if(!vi&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){P(this,es)||this.setEventListener(P(this,fa))}onUnsubscribe(){var t;this.hasListeners()||((t=P(this,es))==null||t.call(this),J(this,es,void 0))}setEventListener(t){var n;J(this,fa,t),(n=P(this,es))==null||n.call(this),J(this,es,t(this.setOnline.bind(this)))}setOnline(t){P(this,da)!==t&&(J(this,da,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return P(this,da)}},da=new WeakMap,es=new WeakMap,fa=new WeakMap,kv),gu=new FA;function Fh(){let e,t;const n=new Promise((i,a)=>{e=i,t=a});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},n.reject=i=>{r({status:"rejected",reason:i}),t(i)},n}function LA(e){return Math.min(1e3*2**e,3e4)}function xj(e){return(e??"online")==="online"?gu.isOnline():!0}var yj=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Xd(e){return e instanceof yj}function vj(e){let t=!1,n=0,r=!1,i;const a=Fh(),o=g=>{var v;r||(f(new yj(g)),(v=e.abort)==null||v.call(e))},l=()=>{t=!0},c=()=>{t=!1},u=()=>Lp.isFocused()&&(e.networkMode==="always"||gu.isOnline())&&e.canRun(),d=()=>xj(e.networkMode)&&e.canRun(),h=g=>{var v;r||(r=!0,(v=e.onSuccess)==null||v.call(e,g),i==null||i(),a.resolve(g))},f=g=>{var v;r||(r=!0,(v=e.onError)==null||v.call(e,g),i==null||i(),a.reject(g))},m=()=>new Promise(g=>{var v;i=x=>{(r||u())&&g(x)},(v=e.onPause)==null||v.call(e)}).then(()=>{var g;i=void 0,r||(g=e.onContinue)==null||g.call(e)}),b=()=>{if(r)return;let g;const v=n===0?e.initialPromise:void 0;try{g=v??e.fn()}catch(x){g=Promise.reject(x)}Promise.resolve(g).then(h).catch(x=>{var N;if(r)return;const y=e.retry??(vi?0:3),w=e.retryDelay??LA,j=typeof w=="function"?w(n,x):w,C=y===!0||typeof y=="number"&&n<y||typeof y=="function"&&y(n,x);if(t||!C){f(x);return}n++,(N=e.onFail)==null||N.call(e,n,x),PA(j).then(()=>u()?void 0:m()).then(()=>{t?f(x):b()})})};return{promise:a,cancel:o,continue:()=>(i==null||i(),a),cancelRetry:l,continueRetry:c,canStart:d,start:()=>(d()?b():m().then(b),a)}}var OA=e=>setTimeout(e,0);function IA(){let e=[],t=0,n=l=>{l()},r=l=>{l()},i=OA;const a=l=>{t?e.push(l):i(()=>{n(l)})},o=()=>{const l=e;e=[],l.length&&i(()=>{r(()=>{l.forEach(c=>{n(c)})})})};return{batch:l=>{let c;t++;try{c=l()}finally{t--,t||o()}return c},batchCalls:l=>(...c)=>{a(()=>{l(...c)})},schedule:a,setNotifyFunction:l=>{n=l},setBatchNotifyFunction:l=>{r=l},setScheduler:l=>{i=l}}}var ht=IA(),Zs,Ev,bj=(Ev=class{constructor(){oe(this,Zs)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Ah(this.gcTime)&&J(this,Zs,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(vi?1/0:5*60*1e3))}clearGcTimeout(){P(this,Zs)&&(clearTimeout(P(this,Zs)),J(this,Zs,void 0))}},Zs=new WeakMap,Ev),ha,Js,sn,ei,vt,fl,ti,Cn,gr,Tv,_A=(Tv=class extends bj{constructor(t){super();oe(this,Cn);oe(this,ha);oe(this,Js);oe(this,sn);oe(this,ei);oe(this,vt);oe(this,fl);oe(this,ti);J(this,ti,!1),J(this,fl,t.defaultOptions),this.setOptions(t.options),this.observers=[],J(this,ei,t.client),J(this,sn,P(this,ei).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,J(this,ha,VA(this.options)),this.state=t.state??P(this,ha),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=P(this,vt))==null?void 0:t.promise}setOptions(t){this.options={...P(this,fl),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&P(this,sn).remove(this)}setData(t,n){const r=Mh(this.state.data,t,this.options);return ve(this,Cn,gr).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){ve(this,Cn,gr).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,i;const n=(r=P(this,vt))==null?void 0:r.promise;return(i=P(this,vt))==null||i.cancel(t),n?n.then(Ot).catch(Ot):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(P(this,ha))}isActive(){return this.observers.some(t=>an(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Fp||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>vs(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!mj(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=P(this,vt))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=P(this,vt))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),P(this,sn).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(P(this,vt)&&(P(this,ti)?P(this,vt).cancel({revert:!0}):P(this,vt).cancelRetry()),this.scheduleGc()),P(this,sn).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||ve(this,Cn,gr).call(this,{type:"invalidate"})}fetch(t,n){var u,d,h;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(P(this,vt))return P(this,vt).continueRetry(),P(this,vt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const f=this.observers.find(m=>m.options.queryFn);f&&this.setOptions(f.options)}const r=new AbortController,i=f=>{Object.defineProperty(f,"signal",{enumerable:!0,get:()=>(J(this,ti,!0),r.signal)})},a=()=>{const f=gj(this.options,n),b=(()=>{const g={client:P(this,ei),queryKey:this.queryKey,meta:this.meta};return i(g),g})();return J(this,ti,!1),this.options.persister?this.options.persister(f,b,this):f(b)},l=(()=>{const f={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:P(this,ei),state:this.state,fetchFn:a};return i(f),f})();(u=this.options.behavior)==null||u.onFetch(l,this),J(this,Js,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((d=l.fetchOptions)==null?void 0:d.meta))&&ve(this,Cn,gr).call(this,{type:"fetch",meta:(h=l.fetchOptions)==null?void 0:h.meta});const c=f=>{var m,b,g,v;Xd(f)&&f.silent||ve(this,Cn,gr).call(this,{type:"error",error:f}),Xd(f)||((b=(m=P(this,sn).config).onError)==null||b.call(m,f,this),(v=(g=P(this,sn).config).onSettled)==null||v.call(g,this.state.data,f,this)),this.scheduleGc()};return J(this,vt,vj({initialPromise:n==null?void 0:n.initialPromise,fn:l.fetchFn,abort:r.abort.bind(r),onSuccess:f=>{var m,b,g,v;if(f===void 0){c(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(f)}catch(x){c(x);return}(b=(m=P(this,sn).config).onSuccess)==null||b.call(m,f,this),(v=(g=P(this,sn).config).onSettled)==null||v.call(g,f,this.state.error,this),this.scheduleGc()},onError:c,onFail:(f,m)=>{ve(this,Cn,gr).call(this,{type:"failed",failureCount:f,error:m})},onPause:()=>{ve(this,Cn,gr).call(this,{type:"pause"})},onContinue:()=>{ve(this,Cn,gr).call(this,{type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0})),P(this,vt).start()}},ha=new WeakMap,Js=new WeakMap,sn=new WeakMap,ei=new WeakMap,vt=new WeakMap,fl=new WeakMap,ti=new WeakMap,Cn=new WeakSet,gr=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...wj(r.data,this.options),fetchMeta:t.meta??null};case"success":return J(this,Js,void 0),{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const i=t.error;return Xd(i)&&i.revert&&P(this,Js)?{...P(this,Js),fetchStatus:"idle"}:{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),ht.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),P(this,sn).notify({query:this,type:"updated",action:t})})},Tv);function wj(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:xj(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function VA(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Kn,Pv,zA=(Pv=class extends Sl{constructor(t={}){super();oe(this,Kn);this.config=t,J(this,Kn,new Map)}build(t,n,r){const i=n.queryKey,a=n.queryHash??Mp(i,n);let o=this.get(a);return o||(o=new _A({client:t,queryKey:i,queryHash:a,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(o)),o}add(t){P(this,Kn).has(t.queryHash)||(P(this,Kn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=P(this,Kn).get(t.queryHash);n&&(t.destroy(),n===t&&P(this,Kn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){ht.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return P(this,Kn).get(t)}getAll(){return[...P(this,Kn).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>vy(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>vy(t,r)):n}notify(t){ht.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){ht.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){ht.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Kn=new WeakMap,Pv),Qn,Ct,ni,Gn,Br,Av,$A=(Av=class extends bj{constructor(t){super();oe(this,Gn);oe(this,Qn);oe(this,Ct);oe(this,ni);this.mutationId=t.mutationId,J(this,Ct,t.mutationCache),J(this,Qn,[]),this.state=t.state||BA(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){P(this,Qn).includes(t)||(P(this,Qn).push(t),this.clearGcTimeout(),P(this,Ct).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){J(this,Qn,P(this,Qn).filter(n=>n!==t)),this.scheduleGc(),P(this,Ct).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){P(this,Qn).length||(this.state.status==="pending"?this.scheduleGc():P(this,Ct).remove(this))}continue(){var t;return((t=P(this,ni))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var a,o,l,c,u,d,h,f,m,b,g,v,x,y,w,j,C,N,S,T;const n=()=>{ve(this,Gn,Br).call(this,{type:"continue"})};J(this,ni,vj({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(k,A)=>{ve(this,Gn,Br).call(this,{type:"failed",failureCount:k,error:A})},onPause:()=>{ve(this,Gn,Br).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>P(this,Ct).canRun(this)}));const r=this.state.status==="pending",i=!P(this,ni).canStart();try{if(r)n();else{ve(this,Gn,Br).call(this,{type:"pending",variables:t,isPaused:i}),await((o=(a=P(this,Ct).config).onMutate)==null?void 0:o.call(a,t,this));const A=await((c=(l=this.options).onMutate)==null?void 0:c.call(l,t));A!==this.state.context&&ve(this,Gn,Br).call(this,{type:"pending",context:A,variables:t,isPaused:i})}const k=await P(this,ni).start();return await((d=(u=P(this,Ct).config).onSuccess)==null?void 0:d.call(u,k,t,this.state.context,this)),await((f=(h=this.options).onSuccess)==null?void 0:f.call(h,k,t,this.state.context)),await((b=(m=P(this,Ct).config).onSettled)==null?void 0:b.call(m,k,null,this.state.variables,this.state.context,this)),await((v=(g=this.options).onSettled)==null?void 0:v.call(g,k,null,t,this.state.context)),ve(this,Gn,Br).call(this,{type:"success",data:k}),k}catch(k){try{throw await((y=(x=P(this,Ct).config).onError)==null?void 0:y.call(x,k,t,this.state.context,this)),await((j=(w=this.options).onError)==null?void 0:j.call(w,k,t,this.state.context)),await((N=(C=P(this,Ct).config).onSettled)==null?void 0:N.call(C,void 0,k,this.state.variables,this.state.context,this)),await((T=(S=this.options).onSettled)==null?void 0:T.call(S,void 0,k,t,this.state.context)),k}finally{ve(this,Gn,Br).call(this,{type:"error",error:k})}}finally{P(this,Ct).runNext(this)}}},Qn=new WeakMap,Ct=new WeakMap,ni=new WeakMap,Gn=new WeakSet,Br=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),ht.batch(()=>{P(this,Qn).forEach(r=>{r.onMutationUpdate(t)}),P(this,Ct).notify({mutation:this,type:"updated",action:t})})},Av);function BA(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var vr,Sn,hl,Rv,UA=(Rv=class extends Sl{constructor(t={}){super();oe(this,vr);oe(this,Sn);oe(this,hl);this.config=t,J(this,vr,new Set),J(this,Sn,new Map),J(this,hl,0)}build(t,n,r){const i=new $A({mutationCache:this,mutationId:++Il(this,hl)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){P(this,vr).add(t);const n=ic(t);if(typeof n=="string"){const r=P(this,Sn).get(n);r?r.push(t):P(this,Sn).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(P(this,vr).delete(t)){const n=ic(t);if(typeof n=="string"){const r=P(this,Sn).get(n);if(r)if(r.length>1){const i=r.indexOf(t);i!==-1&&r.splice(i,1)}else r[0]===t&&P(this,Sn).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=ic(t);if(typeof n=="string"){const r=P(this,Sn).get(n),i=r==null?void 0:r.find(a=>a.state.status==="pending");return!i||i===t}else return!0}runNext(t){var r;const n=ic(t);if(typeof n=="string"){const i=(r=P(this,Sn).get(n))==null?void 0:r.find(a=>a!==t&&a.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){ht.batch(()=>{P(this,vr).forEach(t=>{this.notify({type:"removed",mutation:t})}),P(this,vr).clear(),P(this,Sn).clear()})}getAll(){return Array.from(P(this,vr))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>by(n,r))}findAll(t={}){return this.getAll().filter(n=>by(t,n))}notify(t){ht.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return ht.batch(()=>Promise.all(t.map(n=>n.continue().catch(Ot))))}},vr=new WeakMap,Sn=new WeakMap,hl=new WeakMap,Rv);function ic(e){var t;return(t=e.options.scope)==null?void 0:t.id}function Ny(e){return{onFetch:(t,n)=>{var d,h,f,m,b;const r=t.options,i=(f=(h=(d=t.fetchOptions)==null?void 0:d.meta)==null?void 0:h.fetchMore)==null?void 0:f.direction,a=((m=t.state.data)==null?void 0:m.pages)||[],o=((b=t.state.data)==null?void 0:b.pageParams)||[];let l={pages:[],pageParams:[]},c=0;const u=async()=>{let g=!1;const v=w=>{Object.defineProperty(w,"signal",{enumerable:!0,get:()=>(t.signal.aborted?g=!0:t.signal.addEventListener("abort",()=>{g=!0}),t.signal)})},x=gj(t.options,t.fetchOptions),y=async(w,j,C)=>{if(g)return Promise.reject();if(j==null&&w.pages.length)return Promise.resolve(w);const S=(()=>{const z={client:t.client,queryKey:t.queryKey,pageParam:j,direction:C?"backward":"forward",meta:t.options.meta};return v(z),z})(),T=await x(S),{maxPages:k}=t.options,A=C?RA:AA;return{pages:A(w.pages,T,k),pageParams:A(w.pageParams,j,k)}};if(i&&a.length){const w=i==="backward",j=w?WA:Cy,C={pages:a,pageParams:o},N=j(r,C);l=await y(C,N,w)}else{const w=e??a.length;do{const j=c===0?o[0]??r.initialPageParam:Cy(r,l);if(c>0&&j==null)break;l=await y(l,j),c++}while(c<w)}return l};t.options.persister?t.fetchFn=()=>{var g,v;return(v=(g=t.options).persister)==null?void 0:v.call(g,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=u}}}function Cy(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function WA(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var qe,ts,ns,ma,pa,rs,ga,xa,Dv,HA=(Dv=class{constructor(e={}){oe(this,qe);oe(this,ts);oe(this,ns);oe(this,ma);oe(this,pa);oe(this,rs);oe(this,ga);oe(this,xa);J(this,qe,e.queryCache||new zA),J(this,ts,e.mutationCache||new UA),J(this,ns,e.defaultOptions||{}),J(this,ma,new Map),J(this,pa,new Map),J(this,rs,0)}mount(){Il(this,rs)._++,P(this,rs)===1&&(J(this,ga,Lp.subscribe(async e=>{e&&(await this.resumePausedMutations(),P(this,qe).onFocus())})),J(this,xa,gu.subscribe(async e=>{e&&(await this.resumePausedMutations(),P(this,qe).onOnline())})))}unmount(){var e,t;Il(this,rs)._--,P(this,rs)===0&&((e=P(this,ga))==null||e.call(this),J(this,ga,void 0),(t=P(this,xa))==null||t.call(this),J(this,xa,void 0))}isFetching(e){return P(this,qe).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return P(this,ts).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=P(this,qe).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=P(this,qe).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(vs(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return P(this,qe).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),i=P(this,qe).get(r.queryHash),a=i==null?void 0:i.state.data,o=TA(t,a);if(o!==void 0)return P(this,qe).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return ht.batch(()=>P(this,qe).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=P(this,qe).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=P(this,qe);ht.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=P(this,qe);return ht.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=ht.batch(()=>P(this,qe).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(Ot).catch(Ot)}invalidateQueries(e,t={}){return ht.batch(()=>(P(this,qe).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=ht.batch(()=>P(this,qe).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let a=i.fetch(void 0,n);return n.throwOnError||(a=a.catch(Ot)),i.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(r).then(Ot)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=P(this,qe).build(this,t);return n.isStaleByTime(vs(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Ot).catch(Ot)}fetchInfiniteQuery(e){return e.behavior=Ny(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Ot).catch(Ot)}ensureInfiniteQueryData(e){return e.behavior=Ny(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return gu.isOnline()?P(this,ts).resumePausedMutations():Promise.resolve()}getQueryCache(){return P(this,qe)}getMutationCache(){return P(this,ts)}getDefaultOptions(){return P(this,ns)}setDefaultOptions(e){J(this,ns,e)}setQueryDefaults(e,t){P(this,ma).set(rl(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...P(this,ma).values()],n={};return t.forEach(r=>{sl(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){P(this,pa).set(rl(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...P(this,pa).values()],n={};return t.forEach(r=>{sl(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...P(this,ns).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Mp(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Fp&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...P(this,ns).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){P(this,qe).clear(),P(this,ts).clear()}},qe=new WeakMap,ts=new WeakMap,ns=new WeakMap,ma=new WeakMap,pa=new WeakMap,rs=new WeakMap,ga=new WeakMap,xa=new WeakMap,Dv),Mt,be,ml,St,ri,ya,ss,is,pl,va,ba,si,ii,as,wa,Se,mo,Lh,Oh,Ih,_h,Vh,zh,$h,jj,Mv,qA=(Mv=class extends Sl{constructor(t,n){super();oe(this,Se);oe(this,Mt);oe(this,be);oe(this,ml);oe(this,St);oe(this,ri);oe(this,ya);oe(this,ss);oe(this,is);oe(this,pl);oe(this,va);oe(this,ba);oe(this,si);oe(this,ii);oe(this,as);oe(this,wa,new Set);this.options=n,J(this,Mt,t),J(this,is,null),J(this,ss,Fh()),this.options.experimental_prefetchInRender||P(this,ss).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(P(this,be).addObserver(this),Sy(P(this,be),this.options)?ve(this,Se,mo).call(this):this.updateResult(),ve(this,Se,_h).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Bh(P(this,be),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Bh(P(this,be),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,ve(this,Se,Vh).call(this),ve(this,Se,zh).call(this),P(this,be).removeObserver(this)}setOptions(t){const n=this.options,r=P(this,be);if(this.options=P(this,Mt).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof an(this.options.enabled,P(this,be))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");ve(this,Se,$h).call(this),P(this,be).setOptions(this.options),n._defaulted&&!Rh(this.options,n)&&P(this,Mt).getQueryCache().notify({type:"observerOptionsUpdated",query:P(this,be),observer:this});const i=this.hasListeners();i&&ky(P(this,be),r,this.options,n)&&ve(this,Se,mo).call(this),this.updateResult(),i&&(P(this,be)!==r||an(this.options.enabled,P(this,be))!==an(n.enabled,P(this,be))||vs(this.options.staleTime,P(this,be))!==vs(n.staleTime,P(this,be)))&&ve(this,Se,Lh).call(this);const a=ve(this,Se,Oh).call(this);i&&(P(this,be)!==r||an(this.options.enabled,P(this,be))!==an(n.enabled,P(this,be))||a!==P(this,as))&&ve(this,Se,Ih).call(this,a)}getOptimisticResult(t){const n=P(this,Mt).getQueryCache().build(P(this,Mt),t),r=this.createResult(n,t);return QA(this,r)&&(J(this,St,r),J(this,ya,this.options),J(this,ri,P(this,be).state)),r}getCurrentResult(){return P(this,St)}trackResult(t,n){return new Proxy(t,{get:(r,i)=>(this.trackProp(i),n==null||n(i),Reflect.get(r,i))})}trackProp(t){P(this,wa).add(t)}getCurrentQuery(){return P(this,be)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=P(this,Mt).defaultQueryOptions(t),r=P(this,Mt).getQueryCache().build(P(this,Mt),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return ve(this,Se,mo).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),P(this,St)))}createResult(t,n){var k;const r=P(this,be),i=this.options,a=P(this,St),o=P(this,ri),l=P(this,ya),u=t!==r?t.state:P(this,ml),{state:d}=t;let h={...d},f=!1,m;if(n._optimisticResults){const A=this.hasListeners(),z=!A&&Sy(t,n),O=A&&ky(t,r,n,i);(z||O)&&(h={...h,...wj(d.data,t.options)}),n._optimisticResults==="isRestoring"&&(h.fetchStatus="idle")}let{error:b,errorUpdatedAt:g,status:v}=h;m=h.data;let x=!1;if(n.placeholderData!==void 0&&m===void 0&&v==="pending"){let A;a!=null&&a.isPlaceholderData&&n.placeholderData===(l==null?void 0:l.placeholderData)?(A=a.data,x=!0):A=typeof n.placeholderData=="function"?n.placeholderData((k=P(this,ba))==null?void 0:k.state.data,P(this,ba)):n.placeholderData,A!==void 0&&(v="success",m=Mh(a==null?void 0:a.data,A,n),f=!0)}if(n.select&&m!==void 0&&!x)if(a&&m===(o==null?void 0:o.data)&&n.select===P(this,pl))m=P(this,va);else try{J(this,pl,n.select),m=n.select(m),m=Mh(a==null?void 0:a.data,m,n),J(this,va,m),J(this,is,null)}catch(A){J(this,is,A)}P(this,is)&&(b=P(this,is),m=P(this,va),g=Date.now(),v="error");const y=h.fetchStatus==="fetching",w=v==="pending",j=v==="error",C=w&&y,N=m!==void 0,T={status:v,fetchStatus:h.fetchStatus,isPending:w,isSuccess:v==="success",isError:j,isInitialLoading:C,isLoading:C,data:m,dataUpdatedAt:h.dataUpdatedAt,error:b,errorUpdatedAt:g,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdateCount:h.errorUpdateCount,isFetched:h.dataUpdateCount>0||h.errorUpdateCount>0,isFetchedAfterMount:h.dataUpdateCount>u.dataUpdateCount||h.errorUpdateCount>u.errorUpdateCount,isFetching:y,isRefetching:y&&!w,isLoadingError:j&&!N,isPaused:h.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:j&&N,isStale:Op(t,n),refetch:this.refetch,promise:P(this,ss),isEnabled:an(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const A=W=>{T.status==="error"?W.reject(T.error):T.data!==void 0&&W.resolve(T.data)},z=()=>{const W=J(this,ss,T.promise=Fh());A(W)},O=P(this,ss);switch(O.status){case"pending":t.queryHash===r.queryHash&&A(O);break;case"fulfilled":(T.status==="error"||T.data!==O.value)&&z();break;case"rejected":(T.status!=="error"||T.error!==O.reason)&&z();break}}return T}updateResult(){const t=P(this,St),n=this.createResult(P(this,be),this.options);if(J(this,ri,P(this,be).state),J(this,ya,this.options),P(this,ri).data!==void 0&&J(this,ba,P(this,be)),Rh(n,t))return;J(this,St,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,a=typeof i=="function"?i():i;if(a==="all"||!a&&!P(this,wa).size)return!0;const o=new Set(a??P(this,wa));return this.options.throwOnError&&o.add("error"),Object.keys(P(this,St)).some(l=>{const c=l;return P(this,St)[c]!==t[c]&&o.has(c)})};ve(this,Se,jj).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&ve(this,Se,_h).call(this)}},Mt=new WeakMap,be=new WeakMap,ml=new WeakMap,St=new WeakMap,ri=new WeakMap,ya=new WeakMap,ss=new WeakMap,is=new WeakMap,pl=new WeakMap,va=new WeakMap,ba=new WeakMap,si=new WeakMap,ii=new WeakMap,as=new WeakMap,wa=new WeakMap,Se=new WeakSet,mo=function(t){ve(this,Se,$h).call(this);let n=P(this,be).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Ot)),n},Lh=function(){ve(this,Se,Vh).call(this);const t=vs(this.options.staleTime,P(this,be));if(vi||P(this,St).isStale||!Ah(t))return;const r=mj(P(this,St).dataUpdatedAt,t)+1;J(this,si,setTimeout(()=>{P(this,St).isStale||this.updateResult()},r))},Oh=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(P(this,be)):this.options.refetchInterval)??!1},Ih=function(t){ve(this,Se,zh).call(this),J(this,as,t),!(vi||an(this.options.enabled,P(this,be))===!1||!Ah(P(this,as))||P(this,as)===0)&&J(this,ii,setInterval(()=>{(this.options.refetchIntervalInBackground||Lp.isFocused())&&ve(this,Se,mo).call(this)},P(this,as)))},_h=function(){ve(this,Se,Lh).call(this),ve(this,Se,Ih).call(this,ve(this,Se,Oh).call(this))},Vh=function(){P(this,si)&&(clearTimeout(P(this,si)),J(this,si,void 0))},zh=function(){P(this,ii)&&(clearInterval(P(this,ii)),J(this,ii,void 0))},$h=function(){const t=P(this,Mt).getQueryCache().build(P(this,Mt),this.options);if(t===P(this,be))return;const n=P(this,be);J(this,be,t),J(this,ml,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},jj=function(t){ht.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(P(this,St))}),P(this,Mt).getQueryCache().notify({query:P(this,be),type:"observerResultsUpdated"})})},Mv);function KA(e,t){return an(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Sy(e,t){return KA(e,t)||e.state.data!==void 0&&Bh(e,t,t.refetchOnMount)}function Bh(e,t,n){if(an(t.enabled,e)!==!1&&vs(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Op(e,t)}return!1}function ky(e,t,n,r){return(e!==t||an(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Op(e,n)}function Op(e,t){return an(t.enabled,e)!==!1&&e.isStaleByTime(vs(t.staleTime,e))}function QA(e,t){return!Rh(e.getCurrentResult(),t)}var Nj=p.createContext(void 0),GA=e=>{const t=p.useContext(Nj);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},YA=({client:e,children:t})=>(p.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),s.jsx(Nj.Provider,{value:e,children:t})),Cj=p.createContext(!1),XA=()=>p.useContext(Cj);Cj.Provider;function ZA(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var JA=p.createContext(ZA()),eR=()=>p.useContext(JA),tR=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},nR=e=>{p.useEffect(()=>{e.clearReset()},[e])},rR=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||DA(n,[e.error,r])),sR=e=>{if(e.suspense){const t=r=>r==="static"?r:Math.max(r??1e3,1e3),n=e.staleTime;e.staleTime=typeof n=="function"?(...r)=>t(n(...r)):t(n),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},iR=(e,t)=>e.isLoading&&e.isFetching&&!t,aR=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Ey=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function oR(e,t,n){var h,f,m,b,g;const r=XA(),i=eR(),a=GA(),o=a.defaultQueryOptions(e);(f=(h=a.getDefaultOptions().queries)==null?void 0:h._experimental_beforeQuery)==null||f.call(h,o),o._optimisticResults=r?"isRestoring":"optimistic",sR(o),tR(o,i),nR(i);const l=!a.getQueryCache().get(o.queryHash),[c]=p.useState(()=>new t(a,o)),u=c.getOptimisticResult(o),d=!r&&e.subscribed!==!1;if(p.useSyncExternalStore(p.useCallback(v=>{const x=d?c.subscribe(ht.batchCalls(v)):Ot;return c.updateResult(),x},[c,d]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),p.useEffect(()=>{c.setOptions(o)},[o,c]),aR(o,u))throw Ey(o,c,i);if(rR({result:u,errorResetBoundary:i,throwOnError:o.throwOnError,query:a.getQueryCache().get(o.queryHash),suspense:o.suspense}))throw u.error;if((b=(m=a.getDefaultOptions().queries)==null?void 0:m._experimental_afterQuery)==null||b.call(m,o,u),o.experimental_prefetchInRender&&!vi&&iR(u,r)){const v=l?Ey(o,c,i):(g=a.getQueryCache().get(o.queryHash))==null?void 0:g.promise;v==null||v.catch(Ot).finally(()=>{c.updateResult()})}return o.notifyOnChangeProps?u:c.trackResult(u)}function mn(e,t){return oR(e,qA)}/** * @remix-run/router v1.23.0 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function il(){return il=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},il.apply(this,arguments)}var cs;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(cs||(cs={}));const Ty="popstate";function lR(e){e===void 0&&(e={});function t(r,i){let{pathname:a,search:o,hash:l}=r.location;return Uh("",{pathname:a,search:o,hash:l},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function n(r,i){return typeof i=="string"?i:xu(i)}return uR(t,n,null,e)}function We(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Sj(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function cR(){return Math.random().toString(36).substr(2,8)}function Py(e,t){return{usr:e.state,key:e.key,idx:t}}function Uh(e,t,n,r){return n===void 0&&(n=null),il({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?$a(t):t,{state:n,key:t&&t.key||r||cR()})}function xu(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function $a(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function uR(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,l=cs.Pop,c=null,u=d();u==null&&(u=0,o.replaceState(il({},o.state,{idx:u}),""));function d(){return(o.state||{idx:null}).idx}function h(){l=cs.Pop;let v=d(),x=v==null?null:v-u;u=v,c&&c({action:l,location:g.location,delta:x})}function f(v,x){l=cs.Push;let y=Uh(g.location,v,x);u=d()+1;let w=Py(y,u),j=g.createHref(y);try{o.pushState(w,"",j)}catch(C){if(C instanceof DOMException&&C.name==="DataCloneError")throw C;i.location.assign(j)}a&&c&&c({action:l,location:g.location,delta:1})}function m(v,x){l=cs.Replace;let y=Uh(g.location,v,x);u=d();let w=Py(y,u),j=g.createHref(y);o.replaceState(w,"",j),a&&c&&c({action:l,location:g.location,delta:0})}function b(v){let x=i.location.origin!=="null"?i.location.origin:i.location.href,y=typeof v=="string"?v:xu(v);return y=y.replace(/ $/,"%20"),We(x,"No window.location.(origin|href) available to create URL for href: "+y),new URL(y,x)}let g={get action(){return l},get location(){return e(i,o)},listen(v){if(c)throw new Error("A history only accepts one active listener");return i.addEventListener(Ty,h),c=v,()=>{i.removeEventListener(Ty,h),c=null}},createHref(v){return t(i,v)},createURL:b,encodeLocation(v){let x=b(v);return{pathname:x.pathname,search:x.search,hash:x.hash}},push:f,replace:m,go(v){return o.go(v)}};return g}var Ay;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Ay||(Ay={}));function dR(e,t,n){return n===void 0&&(n="/"),fR(e,t,n,!1)}function fR(e,t,n,r){let i=typeof t=="string"?$a(t):t,a=Ra(i.pathname||"/",n);if(a==null)return null;let o=kj(e);hR(o);let l=null;for(let c=0;l==null&&c<o.length;++c){let u=CR(a);l=jR(o[c],u,r)}return l}function kj(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let i=(a,o,l)=>{let c={relativePath:l===void 0?a.path||"":l,caseSensitive:a.caseSensitive===!0,childrenIndex:o,route:a};c.relativePath.startsWith("/")&&(We(c.relativePath.startsWith(r),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(r.length));let u=bs([r,c.relativePath]),d=n.concat(c);a.children&&a.children.length>0&&(We(a.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),kj(a.children,t,d,u)),!(a.path==null&&!a.index)&&t.push({path:u,score:bR(u,a.index),routesMeta:d})};return e.forEach((a,o)=>{var l;if(a.path===""||!((l=a.path)!=null&&l.includes("?")))i(a,o);else for(let c of Ej(a.path))i(a,o,c)}),t}function Ej(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),a=n.replace(/\?$/,"");if(r.length===0)return i?[a,""]:[a];let o=Ej(r.join("/")),l=[];return l.push(...o.map(c=>c===""?a:[a,c].join("/"))),i&&l.push(...o),l.map(c=>e.startsWith("/")&&c===""?"/":c)}function hR(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:wR(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const mR=/^:[\w-]+$/,pR=3,gR=2,xR=1,yR=10,vR=-2,Ry=e=>e==="*";function bR(e,t){let n=e.split("/"),r=n.length;return n.some(Ry)&&(r+=vR),t&&(r+=gR),n.filter(i=>!Ry(i)).reduce((i,a)=>i+(mR.test(a)?pR:a===""?xR:yR),r)}function wR(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function jR(e,t,n){let{routesMeta:r}=e,i={},a="/",o=[];for(let l=0;l<r.length;++l){let c=r[l],u=l===r.length-1,d=a==="/"?t:t.slice(a.length)||"/",h=yu({path:c.relativePath,caseSensitive:c.caseSensitive,end:u},d),f=c.route;if(!h&&u&&n&&!r[r.length-1].route.index&&(h=yu({path:c.relativePath,caseSensitive:c.caseSensitive,end:!1},d)),!h)return null;Object.assign(i,h.params),o.push({params:i,pathname:bs([a,h.pathname]),pathnameBase:TR(bs([a,h.pathnameBase])),route:f}),h.pathnameBase!=="/"&&(a=bs([a,h.pathnameBase]))}return o}function yu(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=NR(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let a=i[0],o=a.replace(/(.)\/+$/,"$1"),l=i.slice(1);return{params:r.reduce((u,d,h)=>{let{paramName:f,isOptional:m}=d;if(f==="*"){let g=l[h]||"";o=a.slice(0,a.length-g.length).replace(/(.)\/+$/,"$1")}const b=l[h];return m&&!b?u[f]=void 0:u[f]=(b||"").replace(/%2F/g,"/"),u},{}),pathname:a,pathnameBase:o,pattern:e}}function NR(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Sj(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,l,c)=>(r.push({paramName:l,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function CR(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Sj(!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 Ra(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function SR(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?$a(e):e;return{pathname:n?n.startsWith("/")?n:kR(n,t):t,search:PR(r),hash:AR(i)}}function kR(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function Zd(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function ER(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Ip(e,t){let n=ER(e);return t?n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function _p(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=$a(e):(i=il({},e),We(!i.pathname||!i.pathname.includes("?"),Zd("?","pathname","search",i)),We(!i.pathname||!i.pathname.includes("#"),Zd("#","pathname","hash",i)),We(!i.search||!i.search.includes("#"),Zd("#","search","hash",i)));let a=e===""||i.pathname==="",o=a?"/":i.pathname,l;if(o==null)l=n;else{let h=t.length-1;if(!r&&o.startsWith("..")){let f=o.split("/");for(;f[0]==="..";)f.shift(),h-=1;i.pathname=f.join("/")}l=h>=0?t[h]:"/"}let c=SR(i,l),u=o&&o!=="/"&&o.endsWith("/"),d=(a||o===".")&&n.endsWith("/");return!c.pathname.endsWith("/")&&(u||d)&&(c.pathname+="/"),c}const bs=e=>e.join("/").replace(/\/\/+/g,"/"),TR=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),PR=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,AR=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function RR(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Tj=["post","put","patch","delete"];new Set(Tj);const DR=["get",...Tj];new Set(DR);/** * React Router v6.30.1 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function al(){return al=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},al.apply(this,arguments)}const nd=p.createContext(null),Pj=p.createContext(null),Lr=p.createContext(null),rd=p.createContext(null),lr=p.createContext({outlet:null,matches:[],isDataRoute:!1}),Aj=p.createContext(null);function MR(e,t){let{relative:n}=t===void 0?{}:t;Ba()||We(!1);let{basename:r,navigator:i}=p.useContext(Lr),{hash:a,pathname:o,search:l}=sd(e,{relative:n}),c=o;return r!=="/"&&(c=o==="/"?r:bs([r,o])),i.createHref({pathname:c,search:l,hash:a})}function Ba(){return p.useContext(rd)!=null}function Wt(){return Ba()||We(!1),p.useContext(rd).location}function Rj(e){p.useContext(Lr).static||p.useLayoutEffect(e)}function Ua(){let{isDataRoute:e}=p.useContext(lr);return e?QR():FR()}function FR(){Ba()||We(!1);let e=p.useContext(nd),{basename:t,future:n,navigator:r}=p.useContext(Lr),{matches:i}=p.useContext(lr),{pathname:a}=Wt(),o=JSON.stringify(Ip(i,n.v7_relativeSplatPath)),l=p.useRef(!1);return Rj(()=>{l.current=!0}),p.useCallback(function(u,d){if(d===void 0&&(d={}),!l.current)return;if(typeof u=="number"){r.go(u);return}let h=_p(u,JSON.parse(o),a,d.relative==="path");e==null&&t!=="/"&&(h.pathname=h.pathname==="/"?t:bs([t,h.pathname])),(d.replace?r.replace:r.push)(h,d.state,d)},[t,r,o,a,e])}const LR=p.createContext(null);function OR(e){let t=p.useContext(lr).outlet;return t&&p.createElement(LR.Provider,{value:e},t)}function kl(){let{matches:e}=p.useContext(lr),t=e[e.length-1];return t?t.params:{}}function sd(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=p.useContext(Lr),{matches:i}=p.useContext(lr),{pathname:a}=Wt(),o=JSON.stringify(Ip(i,r.v7_relativeSplatPath));return p.useMemo(()=>_p(e,JSON.parse(o),a,n==="path"),[e,o,a,n])}function IR(e,t){return _R(e,t)}function _R(e,t,n,r){Ba()||We(!1);let{navigator:i}=p.useContext(Lr),{matches:a}=p.useContext(lr),o=a[a.length-1],l=o?o.params:{};o&&o.pathname;let c=o?o.pathnameBase:"/";o&&o.route;let u=Wt(),d;if(t){var h;let v=typeof t=="string"?$a(t):t;c==="/"||(h=v.pathname)!=null&&h.startsWith(c)||We(!1),d=v}else d=u;let f=d.pathname||"/",m=f;if(c!=="/"){let v=c.replace(/^\//,"").split("/");m="/"+f.replace(/^\//,"").split("/").slice(v.length).join("/")}let b=dR(e,{pathname:m}),g=UR(b&&b.map(v=>Object.assign({},v,{params:Object.assign({},l,v.params),pathname:bs([c,i.encodeLocation?i.encodeLocation(v.pathname).pathname:v.pathname]),pathnameBase:v.pathnameBase==="/"?c:bs([c,i.encodeLocation?i.encodeLocation(v.pathnameBase).pathname:v.pathnameBase])})),a,n,r);return t&&g?p.createElement(rd.Provider,{value:{location:al({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:cs.Pop}},g):g}function VR(){let e=KR(),t=RR(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return p.createElement(p.Fragment,null,p.createElement("h2",null,"Unexpected Application Error!"),p.createElement("h3",{style:{fontStyle:"italic"}},t),n?p.createElement("pre",{style:i},n):null,null)}const zR=p.createElement(VR,null);class $R extends p.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?p.createElement(lr.Provider,{value:this.props.routeContext},p.createElement(Aj.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function BR(e){let{routeContext:t,match:n,children:r}=e,i=p.useContext(nd);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),p.createElement(lr.Provider,{value:t},r)}function UR(e,t,n,r){var i;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var a;if(!n)return null;if(n.errors)e=n.matches;else if((a=r)!=null&&a.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let o=e,l=(i=n)==null?void 0:i.errors;if(l!=null){let d=o.findIndex(h=>h.route.id&&(l==null?void 0:l[h.route.id])!==void 0);d>=0||We(!1),o=o.slice(0,Math.min(o.length,d+1))}let c=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let d=0;d<o.length;d++){let h=o[d];if((h.route.HydrateFallback||h.route.hydrateFallbackElement)&&(u=d),h.route.id){let{loaderData:f,errors:m}=n,b=h.route.loader&&f[h.route.id]===void 0&&(!m||m[h.route.id]===void 0);if(h.route.lazy||b){c=!0,u>=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((d,h,f)=>{let m,b=!1,g=null,v=null;n&&(m=l&&h.route.id?l[h.route.id]:void 0,g=h.route.errorElement||zR,c&&(u<0&&f===0?(b=!0,v=null):u===f&&(b=!0,v=h.route.hydrateFallbackElement||null)));let x=t.concat(o.slice(0,f+1)),y=()=>{let w;return m?w=g:b?w=v:h.route.Component?w=p.createElement(h.route.Component,null):h.route.element?w=h.route.element:w=d,p.createElement(BR,{match:h,routeContext:{outlet:d,matches:x,isDataRoute:n!=null},children:w})};return n&&(h.route.ErrorBoundary||h.route.errorElement||f===0)?p.createElement($R,{location:n.location,revalidation:n.revalidation,component:g,error:m,children:y(),routeContext:{outlet:null,matches:x,isDataRoute:!0}}):y()},null)}var Dj=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Dj||{}),vu=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}(vu||{});function WR(e){let t=p.useContext(nd);return t||We(!1),t}function HR(e){let t=p.useContext(Pj);return t||We(!1),t}function qR(e){let t=p.useContext(lr);return t||We(!1),t}function Mj(e){let t=qR(),n=t.matches[t.matches.length-1];return n.route.id||We(!1),n.route.id}function KR(){var e;let t=p.useContext(Aj),n=HR(vu.UseRouteError),r=Mj(vu.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function QR(){let{router:e}=WR(Dj.UseNavigateStable),t=Mj(vu.UseNavigateStable),n=p.useRef(!1);return Rj(()=>{n.current=!0}),p.useCallback(function(i,a){a===void 0&&(a={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,al({fromRouteId:t},a)))},[e,t])}function GR(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function YR(e){let{to:t,replace:n,state:r,relative:i}=e;Ba()||We(!1);let{future:a,static:o}=p.useContext(Lr),{matches:l}=p.useContext(lr),{pathname:c}=Wt(),u=Ua(),d=_p(t,Ip(l,a.v7_relativeSplatPath),c,i==="path"),h=JSON.stringify(d);return p.useEffect(()=>u(JSON.parse(h),{replace:n,state:r,relative:i}),[u,h,i,n,r]),null}function XR(e){return OR(e.context)}function Ae(e){We(!1)}function ZR(e){let{basename:t="/",children:n=null,location:r,navigationType:i=cs.Pop,navigator:a,static:o=!1,future:l}=e;Ba()&&We(!1);let c=t.replace(/^\/*/,"/"),u=p.useMemo(()=>({basename:c,navigator:a,static:o,future:al({v7_relativeSplatPath:!1},l)}),[c,l,a,o]);typeof r=="string"&&(r=$a(r));let{pathname:d="/",search:h="",hash:f="",state:m=null,key:b="default"}=r,g=p.useMemo(()=>{let v=Ra(d,c);return v==null?null:{location:{pathname:v,search:h,hash:f,state:m,key:b},navigationType:i}},[c,d,h,f,m,b,i]);return g==null?null:p.createElement(Lr.Provider,{value:u},p.createElement(rd.Provider,{children:n,value:g}))}function JR(e){let{children:t,location:n}=e;return IR(Wh(t),n)}new Promise(()=>{});function Wh(e,t){t===void 0&&(t=[]);let n=[];return p.Children.forEach(e,(r,i)=>{if(!p.isValidElement(r))return;let a=[...t,i];if(r.type===p.Fragment){n.push.apply(n,Wh(r.props.children,a));return}r.type!==Ae&&We(!1),!r.props.index||!r.props.children||We(!1);let o={id:r.props.id||a.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(o.children=Wh(r.props.children,a)),n.push(o)}),n}/** * React Router DOM v6.30.1 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function bu(){return bu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},bu.apply(this,arguments)}function Fj(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function e5(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function t5(e,t){return e.button===0&&(!t||t==="_self")&&!e5(e)}const n5=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],r5=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],s5="6";try{window.__reactRouterVersion=s5}catch{}const i5=p.createContext({isTransitioning:!1}),a5="startTransition",Dy=Cm[a5];function o5(e){let{basename:t,children:n,future:r,window:i}=e,a=p.useRef();a.current==null&&(a.current=lR({window:i,v5Compat:!0}));let o=a.current,[l,c]=p.useState({action:o.action,location:o.location}),{v7_startTransition:u}=r||{},d=p.useCallback(h=>{u&&Dy?Dy(()=>c(h)):c(h)},[c,u]);return p.useLayoutEffect(()=>o.listen(d),[o,d]),p.useEffect(()=>GR(r),[r]),p.createElement(ZR,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:o,future:r})}const l5=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",c5=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ce=p.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:a,replace:o,state:l,target:c,to:u,preventScrollReset:d,viewTransition:h}=t,f=Fj(t,n5),{basename:m}=p.useContext(Lr),b,g=!1;if(typeof u=="string"&&c5.test(u)&&(b=u,l5))try{let w=new URL(window.location.href),j=u.startsWith("//")?new URL(w.protocol+u):new URL(u),C=Ra(j.pathname,m);j.origin===w.origin&&C!=null?u=C+j.search+j.hash:g=!0}catch{}let v=MR(u,{relative:i}),x=f5(u,{replace:o,state:l,target:c,preventScrollReset:d,relative:i,viewTransition:h});function y(w){r&&r(w),w.defaultPrevented||x(w)}return p.createElement("a",bu({},f,{href:b||v,onClick:g||a?r:y,ref:n,target:c}))}),u5=p.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:i=!1,className:a="",end:o=!1,style:l,to:c,viewTransition:u,children:d}=t,h=Fj(t,r5),f=sd(c,{relative:h.relative}),m=Wt(),b=p.useContext(Pj),{navigator:g,basename:v}=p.useContext(Lr),x=b!=null&&h5(f)&&u===!0,y=g.encodeLocation?g.encodeLocation(f).pathname:f.pathname,w=m.pathname,j=b&&b.navigation&&b.navigation.location?b.navigation.location.pathname:null;i||(w=w.toLowerCase(),j=j?j.toLowerCase():null,y=y.toLowerCase()),j&&v&&(j=Ra(j,v)||j);const C=y!=="/"&&y.endsWith("/")?y.length-1:y.length;let N=w===y||!o&&w.startsWith(y)&&w.charAt(C)==="/",S=j!=null&&(j===y||!o&&j.startsWith(y)&&j.charAt(y.length)==="/"),T={isActive:N,isPending:S,isTransitioning:x},k=N?r:void 0,A;typeof a=="function"?A=a(T):A=[a,N?"active":null,S?"pending":null,x?"transitioning":null].filter(Boolean).join(" ");let z=typeof l=="function"?l(T):l;return p.createElement(Ce,bu({},h,{"aria-current":k,className:A,ref:n,style:z,to:c,viewTransition:u}),typeof d=="function"?d(T):d)});var Hh;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Hh||(Hh={}));var My;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(My||(My={}));function d5(e){let t=p.useContext(nd);return t||We(!1),t}function f5(e,t){let{target:n,replace:r,state:i,preventScrollReset:a,relative:o,viewTransition:l}=t===void 0?{}:t,c=Ua(),u=Wt(),d=sd(e,{relative:o});return p.useCallback(h=>{if(t5(h,n)){h.preventDefault();let f=r!==void 0?r:xu(u)===xu(d);c(e,{replace:f,state:i,preventScrollReset:a,relative:o,viewTransition:l})}},[u,c,d,r,i,n,e,a,o,l])}function h5(e,t){t===void 0&&(t={});let n=p.useContext(i5);n==null&&We(!1);let{basename:r}=d5(Hh.useViewTransitionState),i=sd(e,{relative:t.relative});if(!n.isTransitioning)return!1;let a=Ra(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=Ra(n.nextLocation.pathname,r)||n.nextLocation.pathname;return yu(i.pathname,o)!=null||yu(i.pathname,a)!=null}const Lj=p.createContext(void 0),m5=({children:e})=>{const[t,n]=p.useState(null),[r,i]=p.useState(null),[a,o]=p.useState(!0);p.useEffect(()=>{const u=localStorage.getItem("admin_token"),d=localStorage.getItem("admin_user");u&&d&&(i(u),n(JSON.parse(d))),o(!1)},[]);const l=async(u,d)=>{const f=await fetch("https://cqt.iiitd.ac.in/api/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:u,password:d})});if(!f.ok){const b=await f.json();throw new Error(b.error||"Login failed")}const m=await f.json();i(m.token),n({username:m.username}),localStorage.setItem("admin_token",m.token),localStorage.setItem("admin_user",JSON.stringify({username:m.username}))},c=()=>{n(null),i(null),localStorage.removeItem("admin_token"),localStorage.removeItem("admin_user")};return s.jsx(Lj.Provider,{value:{user:t,token:r,login:l,logout:c,isLoading:a},children:e})},El=()=>{const e=p.useContext(Lj);if(e===void 0)throw new Error("useAuth must be used within an AuthProvider");return e},p5=({children:e})=>{const{user:t,isLoading:n}=El();return n?s.jsx("div",{className:"min-h-screen bg-gradient-to-br from-blue-950 via-slate-900 to-black flex items-center justify-center",children:s.jsxs("div",{className:"text-center",children:[s.jsx(Fr,{className:"w-12 h-12 animate-spin text-blue-500 mx-auto mb-4"}),s.jsx("p",{className:"text-slate-400",children:"Loading..."})]})}):t?s.jsx(s.Fragment,{children:e}):s.jsx(YR,{to:"/admin/login",replace:!0})},Vp=p.createContext({});function Wa(e){const t=p.useRef(null);return t.current===null&&(t.current=e()),t.current}const zp=typeof window<"u",id=zp?p.useLayoutEffect:p.useEffect,ad=p.createContext(null);function $p(e,t){e.indexOf(t)===-1&&e.push(t)}function Bp(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}const ar=(e,t,n)=>n>t?t:n<e?e:n;let Da=()=>{};const Ar={},Oj=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function Ij(e){return typeof e=="object"&&e!==null}const _j=e=>/^0[^.\s]+$/u.test(e);function Up(e){let t;return()=>(t===void 0&&(t=e()),t)}const Ut=e=>e,g5=(e,t)=>n=>t(e(n)),Tl=(...e)=>e.reduce(g5),Ma=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r};class Wp{constructor(){this.subscriptions=[]}add(t){return $p(this.subscriptions,t),()=>Bp(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let a=0;a<i;a++){const o=this.subscriptions[a];o&&o(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const rr=e=>e*1e3,un=e=>e/1e3;function Hp(e,t){return t?e*(1e3/t):0}const Vj=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,x5=1e-7,y5=12;function v5(e,t,n,r,i){let a,o,l=0;do o=t+(n-t)/2,a=Vj(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>x5&&++l<y5);return o}function Pl(e,t,n,r){if(e===t&&n===r)return Ut;const i=a=>v5(a,0,1,e,n);return a=>a===0||a===1?a:Vj(i(a),t,r)}const zj=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,$j=e=>t=>1-e(1-t),Bj=Pl(.33,1.53,.69,.99),qp=$j(Bj),Uj=zj(qp),Wj=e=>(e*=2)<1?.5*qp(e):.5*(2-Math.pow(2,-10*(e-1))),Kp=e=>1-Math.sin(Math.acos(e)),Hj=$j(Kp),qj=zj(Kp),b5=Pl(.42,0,1,1),w5=Pl(0,0,.58,1),Kj=Pl(.42,0,.58,1),j5=e=>Array.isArray(e)&&typeof e[0]!="number",Qj=e=>Array.isArray(e)&&typeof e[0]=="number",Fy={linear:Ut,easeIn:b5,easeInOut:Kj,easeOut:w5,circIn:Kp,circInOut:qj,circOut:Hj,backIn:qp,backInOut:Uj,backOut:Bj,anticipate:Wj},N5=e=>typeof e=="string",Ly=e=>{if(Qj(e)){Da(e.length===4);const[t,n,r,i]=e;return Pl(t,n,r,i)}else if(N5(e))return Da(Fy[e]!==void 0),Fy[e];return e},ac=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],Oy={value:null,addProjectionMetrics:null};function C5(e,t){let n=new Set,r=new Set,i=!1,a=!1;const o=new WeakSet;let l={delta:0,timestamp:0,isProcessing:!1},c=0;function u(h){o.has(h)&&(d.schedule(h),e()),c++,h(l)}const d={schedule:(h,f=!1,m=!1)=>{const g=m&&i?n:r;return f&&o.add(h),g.has(h)||g.add(h),h},cancel:h=>{r.delete(h),o.delete(h)},process:h=>{if(l=h,i){a=!0;return}i=!0,[n,r]=[r,n],n.forEach(u),t&&Oy.value&&Oy.value.frameloop[t].push(c),c=0,n.clear(),i=!1,a&&(a=!1,d.process(h))}};return d}const S5=40;function Gj(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,o=ac.reduce((w,j)=>(w[j]=C5(a,t?j:void 0),w),{}),{setup:l,read:c,resolveKeyframes:u,preUpdate:d,update:h,preRender:f,render:m,postRender:b}=o,g=()=>{const w=Ar.useManualTiming?i.timestamp:performance.now();n=!1,Ar.useManualTiming||(i.delta=r?1e3/60:Math.max(Math.min(w-i.timestamp,S5),1)),i.timestamp=w,i.isProcessing=!0,l.process(i),c.process(i),u.process(i),d.process(i),h.process(i),f.process(i),m.process(i),b.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(g))},v=()=>{n=!0,r=!0,i.isProcessing||e(g)};return{schedule:ac.reduce((w,j)=>{const C=o[j];return w[j]=(N,S=!1,T=!1)=>(n||v(),C.schedule(N,S,T)),w},{}),cancel:w=>{for(let j=0;j<ac.length;j++)o[ac[j]].cancel(w)},state:i,steps:o}}const{schedule:ke,cancel:_n,state:lt,steps:Jd}=Gj(typeof requestAnimationFrame<"u"?requestAnimationFrame:Ut,!0);let Rc;function k5(){Rc=void 0}const Vt={now:()=>(Rc===void 0&&Vt.set(lt.isProcessing||Ar.useManualTiming?lt.timestamp:performance.now()),Rc),set:e=>{Rc=e,queueMicrotask(k5)}},Yj=e=>t=>typeof t=="string"&&t.startsWith(e),Qp=Yj("--"),E5=Yj("var(--"),Gp=e=>E5(e)?T5.test(e.split("/*")[0].trim()):!1,T5=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Ha={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},ol={...Ha,transform:e=>ar(0,1,e)},oc={...Ha,default:1},To=e=>Math.round(e*1e5)/1e5,Yp=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function P5(e){return e==null}const A5=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Xp=(e,t)=>n=>!!(typeof n=="string"&&A5.test(n)&&n.startsWith(e)||t&&!P5(n)&&Object.prototype.hasOwnProperty.call(n,t)),Xj=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,a,o,l]=r.match(Yp);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:l!==void 0?parseFloat(l):1}},R5=e=>ar(0,255,e),ef={...Ha,transform:e=>Math.round(R5(e))},Qs={test:Xp("rgb","red"),parse:Xj("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+ef.transform(e)+", "+ef.transform(t)+", "+ef.transform(n)+", "+To(ol.transform(r))+")"};function D5(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const qh={test:Xp("#"),parse:D5,transform:Qs.transform},Al=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Ur=Al("deg"),sr=Al("%"),le=Al("px"),M5=Al("vh"),F5=Al("vw"),Iy={...sr,parse:e=>sr.parse(e)/100,transform:e=>sr.transform(e*100)},Ki={test:Xp("hsl","hue"),parse:Xj("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+sr.transform(To(t))+", "+sr.transform(To(n))+", "+To(ol.transform(r))+")"},tt={test:e=>Qs.test(e)||qh.test(e)||Ki.test(e),parse:e=>Qs.test(e)?Qs.parse(e):Ki.test(e)?Ki.parse(e):qh.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Qs.transform(e):Ki.transform(e),getAnimatableNone:e=>{const t=tt.parse(e);return t.alpha=0,tt.transform(t)}},L5=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function O5(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Yp))==null?void 0:t.length)||0)+(((n=e.match(L5))==null?void 0:n.length)||0)>0}const Zj="number",Jj="color",I5="var",_5="var(",_y="${}",V5=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function ll(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let a=0;const l=t.replace(V5,c=>(tt.test(c)?(r.color.push(a),i.push(Jj),n.push(tt.parse(c))):c.startsWith(_5)?(r.var.push(a),i.push(I5),n.push(c)):(r.number.push(a),i.push(Zj),n.push(parseFloat(c))),++a,_y)).split(_y);return{values:n,split:l,indexes:r,types:i}}function eN(e){return ll(e).values}function tN(e){const{split:t,types:n}=ll(e),r=t.length;return i=>{let a="";for(let o=0;o<r;o++)if(a+=t[o],i[o]!==void 0){const l=n[o];l===Zj?a+=To(i[o]):l===Jj?a+=tt.transform(i[o]):a+=i[o]}return a}}const z5=e=>typeof e=="number"?0:tt.test(e)?tt.getAnimatableNone(e):e;function $5(e){const t=eN(e);return tN(e)(t.map(z5))}const ks={test:O5,parse:eN,createTransformer:tN,getAnimatableNone:$5};function tf(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function B5({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,o=0;if(!t)i=a=o=n;else{const l=n<.5?n*(1+t):n+t-n*t,c=2*n-l;i=tf(c,l,e+1/3),a=tf(c,l,e),o=tf(c,l,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function wu(e,t){return n=>n>0?t:e}const Be=(e,t,n)=>e+(t-e)*n,nf=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},U5=[qh,Qs,Ki],W5=e=>U5.find(t=>t.test(e));function Vy(e){const t=W5(e);if(!t)return!1;let n=t.parse(e);return t===Ki&&(n=B5(n)),n}const zy=(e,t)=>{const n=Vy(e),r=Vy(t);if(!n||!r)return wu(e,t);const i={...n};return a=>(i.red=nf(n.red,r.red,a),i.green=nf(n.green,r.green,a),i.blue=nf(n.blue,r.blue,a),i.alpha=Be(n.alpha,r.alpha,a),Qs.transform(i))},Kh=new Set(["none","hidden"]);function H5(e,t){return Kh.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function q5(e,t){return n=>Be(e,t,n)}function Zp(e){return typeof e=="number"?q5:typeof e=="string"?Gp(e)?wu:tt.test(e)?zy:G5:Array.isArray(e)?nN:typeof e=="object"?tt.test(e)?zy:K5:wu}function nN(e,t){const n=[...e],r=n.length,i=e.map((a,o)=>Zp(a)(a,t[o]));return a=>{for(let o=0;o<r;o++)n[o]=i[o](a);return n}}function K5(e,t){const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=Zp(e[i])(e[i],t[i]));return i=>{for(const a in r)n[a]=r[a](i);return n}}function Q5(e,t){const n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const a=t.types[i],o=e.indexes[a][r[a]],l=e.values[o]??0;n[i]=l,r[a]++}return n}const G5=(e,t)=>{const n=ks.createTransformer(t),r=ll(e),i=ll(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?Kh.has(e)&&!i.values.length||Kh.has(t)&&!r.values.length?H5(e,t):Tl(nN(Q5(r,i),i.values),n):wu(e,t)};function rN(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Be(e,t,n):Zp(e)(e,t)}const Y5=e=>{const t=({timestamp:n})=>e(n);return{start:(n=!0)=>ke.update(t,n),stop:()=>_n(t),now:()=>lt.isProcessing?lt.timestamp:Vt.now()}},sN=(e,t,n=10)=>{let r="";const i=Math.max(Math.round(t/n),2);for(let a=0;a<i;a++)r+=Math.round(e(a/(i-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},ju=2e4;function Jp(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<ju;)t+=n,r=e.next(t);return t>=ju?1/0:t}function X5(e,t=100,n){const r=n({...e,keyframes:[0,t]}),i=Math.min(Jp(r),ju);return{type:"keyframes",ease:a=>r.next(i*a).value/t,duration:un(i)}}const Z5=5;function iN(e,t,n){const r=Math.max(t-Z5,0);return Hp(n-e(r),t-r)}const Ke={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},rf=.001;function J5({duration:e=Ke.duration,bounce:t=Ke.bounce,velocity:n=Ke.velocity,mass:r=Ke.mass}){let i,a,o=1-t;o=ar(Ke.minDamping,Ke.maxDamping,o),e=ar(Ke.minDuration,Ke.maxDuration,un(e)),o<1?(i=u=>{const d=u*o,h=d*e,f=d-n,m=Qh(u,o),b=Math.exp(-h);return rf-f/m*b},a=u=>{const h=u*o*e,f=h*n+n,m=Math.pow(o,2)*Math.pow(u,2)*e,b=Math.exp(-h),g=Qh(Math.pow(u,2),o);return(-i(u)+rf>0?-1:1)*((f-m)*b)/g}):(i=u=>{const d=Math.exp(-u*e),h=(u-n)*e+1;return-rf+d*h},a=u=>{const d=Math.exp(-u*e),h=(n-u)*(e*e);return d*h});const l=5/e,c=tD(i,a,l);if(e=rr(e),isNaN(c))return{stiffness:Ke.stiffness,damping:Ke.damping,duration:e};{const u=Math.pow(c,2)*r;return{stiffness:u,damping:o*2*Math.sqrt(r*u),duration:e}}}const eD=12;function tD(e,t,n){let r=n;for(let i=1;i<eD;i++)r=r-e(r)/t(r);return r}function Qh(e,t){return e*Math.sqrt(1-t*t)}const nD=["duration","bounce"],rD=["stiffness","damping","mass"];function $y(e,t){return t.some(n=>e[n]!==void 0)}function sD(e){let t={velocity:Ke.velocity,stiffness:Ke.stiffness,damping:Ke.damping,mass:Ke.mass,isResolvedFromDuration:!1,...e};if(!$y(e,rD)&&$y(e,nD))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,a=2*ar(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:Ke.mass,stiffness:i,damping:a}}else{const n=J5(e);t={...t,...n,mass:Ke.mass},t.isResolvedFromDuration=!0}return t}function Nu(e=Ke.visualDuration,t=Ke.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:i}=n;const a=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],l={done:!1,value:a},{stiffness:c,damping:u,mass:d,duration:h,velocity:f,isResolvedFromDuration:m}=sD({...n,velocity:-un(n.velocity||0)}),b=f||0,g=u/(2*Math.sqrt(c*d)),v=o-a,x=un(Math.sqrt(c/d)),y=Math.abs(v)<5;r||(r=y?Ke.restSpeed.granular:Ke.restSpeed.default),i||(i=y?Ke.restDelta.granular:Ke.restDelta.default);let w;if(g<1){const C=Qh(x,g);w=N=>{const S=Math.exp(-g*x*N);return o-S*((b+g*x*v)/C*Math.sin(C*N)+v*Math.cos(C*N))}}else if(g===1)w=C=>o-Math.exp(-x*C)*(v+(b+x*v)*C);else{const C=x*Math.sqrt(g*g-1);w=N=>{const S=Math.exp(-g*x*N),T=Math.min(C*N,300);return o-S*((b+g*x*v)*Math.sinh(T)+C*v*Math.cosh(T))/C}}const j={calculatedDuration:m&&h||null,next:C=>{const N=w(C);if(m)l.done=C>=h;else{let S=C===0?b:0;g<1&&(S=C===0?rr(b):iN(w,C,N));const T=Math.abs(S)<=r,k=Math.abs(o-N)<=i;l.done=T&&k}return l.value=l.done?o:N,l},toString:()=>{const C=Math.min(Jp(j),ju),N=sN(S=>j.next(C*S).value,C,30);return C+"ms "+N},toTransition:()=>{}};return j}Nu.applyToOptions=e=>{const t=X5(e,100,Nu);return e.ease=t.ease,e.duration=rr(t.duration),e.type="keyframes",e};function Gh({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:l,max:c,restDelta:u=.5,restSpeed:d}){const h=e[0],f={done:!1,value:h},m=T=>l!==void 0&&T<l||c!==void 0&&T>c,b=T=>l===void 0?c:c===void 0||Math.abs(l-T)<Math.abs(c-T)?l:c;let g=n*t;const v=h+g,x=o===void 0?v:o(v);x!==v&&(g=x-h);const y=T=>-g*Math.exp(-T/r),w=T=>x+y(T),j=T=>{const k=y(T),A=w(T);f.done=Math.abs(k)<=u,f.value=f.done?x:A};let C,N;const S=T=>{m(f.value)&&(C=T,N=Nu({keyframes:[f.value,b(f.value)],velocity:iN(w,T,f.value),damping:i,stiffness:a,restDelta:u,restSpeed:d}))};return S(0),{calculatedDuration:null,next:T=>{let k=!1;return!N&&C===void 0&&(k=!0,j(T),S(T)),C!==void 0&&T>=C?N.next(T-C):(!k&&j(T),f)}}}function iD(e,t,n){const r=[],i=n||Ar.mix||rN,a=e.length-1;for(let o=0;o<a;o++){let l=i(e[o],e[o+1]);if(t){const c=Array.isArray(t)?t[o]||Ut:t;l=Tl(c,l)}r.push(l)}return r}function eg(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const a=e.length;if(Da(a===t.length),a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];const o=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());const l=iD(t,r,i),c=l.length,u=d=>{if(o&&d<e[0])return t[0];let h=0;if(c>1)for(;h<e.length-2&&!(d<e[h+1]);h++);const f=Ma(e[h],e[h+1],d);return l[h](f)};return n?d=>u(ar(e[0],e[a-1],d)):u}function aD(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=Ma(0,t,r);e.push(Be(n,1,i))}}function aN(e){const t=[0];return aD(t,e.length-1),t}function oD(e,t){return e.map(n=>n*t)}function lD(e,t){return e.map(()=>t||Kj).splice(0,e.length-1)}function Po({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=j5(r)?r.map(Ly):Ly(r),a={done:!1,value:t[0]},o=oD(n&&n.length===t.length?n:aN(t),e),l=eg(o,t,{ease:Array.isArray(i)?i:lD(t,i)});return{calculatedDuration:e,next:c=>(a.value=l(c),a.done=c>=e,a)}}const cD=e=>e!==null;function tg(e,{repeat:t,repeatType:n="loop"},r,i=1){const a=e.filter(cD),l=i<0||t&&n!=="loop"&&t%2===1?0:a.length-1;return!l||r===void 0?a[l]:r}const uD={decay:Gh,inertia:Gh,tween:Po,keyframes:Po,spring:Nu};function oN(e){typeof e.type=="string"&&(e.type=uD[e.type])}class ng{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,n){return this.finished.then(t,n)}}const dD=e=>e/100;class rg extends ng{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var r,i;const{motionValue:n}=this.options;n&&n.updatedAt!==Vt.now()&&this.tick(Vt.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(i=(r=this.options).onStop)==null||i.call(r))},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){const{options:t}=this;oN(t);const{type:n=Po,repeat:r=0,repeatDelay:i=0,repeatType:a,velocity:o=0}=t;let{keyframes:l}=t;const c=n||Po;c!==Po&&typeof l[0]!="number"&&(this.mixKeyframes=Tl(dD,rN(l[0],l[1])),l=[0,100]);const u=c({...t,keyframes:l});a==="mirror"&&(this.mirroredGenerator=c({...t,keyframes:[...l].reverse(),velocity:-o})),u.calculatedDuration===null&&(u.calculatedDuration=Jp(u));const{calculatedDuration:d}=u;this.calculatedDuration=d,this.resolvedDuration=d+i,this.totalDuration=this.resolvedDuration*(r+1)-i,this.generator=u}updateTime(t){const n=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(t,n=!1){const{generator:r,totalDuration:i,mixKeyframes:a,mirroredGenerator:o,resolvedDuration:l,calculatedDuration:c}=this;if(this.startTime===null)return r.next(0);const{delay:u=0,keyframes:d,repeat:h,repeatType:f,repeatDelay:m,type:b,onUpdate:g,finalKeyframe:v}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-i/this.speed,this.startTime)),n?this.currentTime=t:this.updateTime(t);const x=this.currentTime-u*(this.playbackSpeed>=0?1:-1),y=this.playbackSpeed>=0?x<0:x>i;this.currentTime=Math.max(x,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let w=this.currentTime,j=r;if(h){const T=Math.min(this.currentTime,i)/l;let k=Math.floor(T),A=T%1;!A&&T>=1&&(A=1),A===1&&k--,k=Math.min(k,h+1),!!(k%2)&&(f==="reverse"?(A=1-A,m&&(A-=m/l)):f==="mirror"&&(j=o)),w=ar(0,1,A)*l}const C=y?{done:!1,value:d[0]}:j.next(w);a&&(C.value=a(C.value));let{done:N}=C;!y&&c!==null&&(N=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const S=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&N);return S&&b!==Gh&&(C.value=tg(d,this.options,v,this.speed)),g&&g(C.value),S&&this.finish(),C}then(t,n){return this.finished.then(t,n)}get duration(){return un(this.calculatedDuration)}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+un(t)}get time(){return un(this.currentTime)}set time(t){var n;t=rr(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),(n=this.driver)==null||n.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(Vt.now());const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=un(this.currentTime))}play(){var i,a;if(this.isStopped)return;const{driver:t=Y5,startTime:n}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),(a=(i=this.options).onPlay)==null||a.call(i);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Vt.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var t,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(t=this.options).onComplete)==null||n.call(t)}cancel(){var t,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(t=this.options).onCancel)==null||n.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),t.observe(this)}}function fD(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}const Gs=e=>e*180/Math.PI,Yh=e=>{const t=Gs(Math.atan2(e[1],e[0]));return Xh(t)},hD={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Yh,rotateZ:Yh,skewX:e=>Gs(Math.atan(e[1])),skewY:e=>Gs(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Xh=e=>(e=e%360,e<0&&(e+=360),e),By=Yh,Uy=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Wy=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),mD={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Uy,scaleY:Wy,scale:e=>(Uy(e)+Wy(e))/2,rotateX:e=>Xh(Gs(Math.atan2(e[6],e[5]))),rotateY:e=>Xh(Gs(Math.atan2(-e[2],e[0]))),rotateZ:By,rotate:By,skewX:e=>Gs(Math.atan(e[4])),skewY:e=>Gs(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Zh(e){return e.includes("scale")?1:0}function Jh(e,t){if(!e||e==="none")return Zh(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=mD,i=n;else{const l=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=hD,i=l}if(!i)return Zh(t);const a=r[t],o=i[1].split(",").map(gD);return typeof a=="function"?a(o):o[a]}const pD=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return Jh(n,t)};function gD(e){return parseFloat(e.trim())}const qa=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ka=new Set(qa),Hy=e=>e===Ha||e===le,xD=new Set(["x","y","z"]),yD=qa.filter(e=>!xD.has(e));function vD(e){const t=[];return yD.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const li={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Jh(t,"x"),y:(e,{transform:t})=>Jh(t,"y")};li.translateX=li.x;li.translateY=li.y;const ci=new Set;let em=!1,tm=!1,nm=!1;function lN(){if(tm){const e=Array.from(ci).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=vD(r);i.length&&(n.set(r,i),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const i=n.get(r);i&&i.forEach(([a,o])=>{var l;(l=r.getValue(a))==null||l.set(o)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}tm=!1,em=!1,ci.forEach(e=>e.complete(nm)),ci.clear()}function cN(){ci.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(tm=!0)})}function bD(){nm=!0,cN(),lN(),nm=!1}class sg{constructor(t,n,r,i,a,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=i,this.element=a,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(ci.add(this),em||(em=!0,ke.read(cN),ke.resolveKeyframes(lN))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:i}=this;if(t[0]===null){const a=i==null?void 0:i.get(),o=t[t.length-1];if(a!==void 0)t[0]=a;else if(r&&n){const l=r.readValue(n,o);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=o),i&&a===void 0&&i.set(t[0])}fD(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),ci.delete(this)}cancel(){this.state==="scheduled"&&(ci.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const wD=e=>e.startsWith("--");function jD(e,t,n){wD(t)?e.style.setProperty(t,n):e.style[t]=n}const uN=Up(()=>window.ScrollTimeline!==void 0),ND={};function CD(e,t){const n=Up(e);return()=>ND[t]??n()}const dN=CD(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),po=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,qy={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:po([0,.65,.55,1]),circOut:po([.55,0,1,.45]),backIn:po([.31,.01,.66,-.59]),backOut:po([.33,1.53,.69,.99])};function fN(e,t){if(e)return typeof e=="function"?dN()?sN(e,t):"ease-out":Qj(e)?po(e):Array.isArray(e)?e.map(n=>fN(n,t)||qy.easeOut):qy[e]}function SD(e,t,n,{delay:r=0,duration:i=300,repeat:a=0,repeatType:o="loop",ease:l="easeOut",times:c}={},u=void 0){const d={[t]:n};c&&(d.offset=c);const h=fN(l,i);Array.isArray(h)&&(d.easing=h);const f={delay:r,duration:i,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:a+1,direction:o==="reverse"?"alternate":"normal"};return u&&(f.pseudoElement=u),e.animate(d,f)}function hN(e){return typeof e=="function"&&"applyToOptions"in e}function kD({type:e,...t}){return hN(e)&&dN()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class ED extends ng{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;const{element:n,name:r,keyframes:i,pseudoElement:a,allowFlatten:o=!1,finalKeyframe:l,onComplete:c}=t;this.isPseudoElement=!!a,this.allowFlatten=o,this.options=t,Da(typeof t.type!="string");const u=kD(t);this.animation=SD(n,r,i,u,a),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!a){const d=tg(i,this.options,l,this.speed);this.updateMotionValue?this.updateMotionValue(d):jD(n,r,d),this.animation.cancel()}c==null||c(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var t,n;(n=(t=this.animation).finish)==null||n.call(t)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var t,n;this.isPseudoElement||(n=(t=this.animation).commitStyles)==null||n.call(t)}get duration(){var n,r;const t=((r=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:r.call(n).duration)||0;return un(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+un(t)}get time(){return un(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=rr(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:n}){var r;return this.allowFlatten&&((r=this.animation.effect)==null||r.updateTiming({easing:"linear"})),this.animation.onfinish=null,t&&uN()?(this.animation.timeline=t,Ut):n(this)}}const mN={anticipate:Wj,backInOut:Uj,circInOut:qj};function TD(e){return e in mN}function PD(e){typeof e.ease=="string"&&TD(e.ease)&&(e.ease=mN[e.ease])}const Ky=10;class AD extends ED{constructor(t){PD(t),oN(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){const{motionValue:n,onUpdate:r,onComplete:i,element:a,...o}=this.options;if(!n)return;if(t!==void 0){n.set(t);return}const l=new rg({...o,autoplay:!1}),c=rr(this.finishedTime??this.time);n.setWithVelocity(l.sample(c-Ky).value,l.sample(c).value,Ky),l.stop()}}const Qy=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(ks.test(e)||e==="0")&&!e.startsWith("url("));function RD(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function DD(e,t,n,r){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const a=e[e.length-1],o=Qy(i,t),l=Qy(a,t);return!o||!l?!1:RD(e)||(n==="spring"||hN(n))&&r}function rm(e){e.duration=0,e.type="keyframes"}const MD=new Set(["opacity","clipPath","filter","transform"]),FD=Up(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function LD(e){var d;const{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:a,type:o}=e;if(!(((d=t==null?void 0:t.owner)==null?void 0:d.current)instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:u}=t.owner.getProps();return FD()&&n&&MD.has(n)&&(n!=="transform"||!u)&&!c&&!r&&i!=="mirror"&&a!==0&&o!=="inertia"}const OD=40;class ID extends ng{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:a=0,repeatType:o="loop",keyframes:l,name:c,motionValue:u,element:d,...h}){var b;super(),this.stop=()=>{var g,v;this._animation&&(this._animation.stop(),(g=this.stopTimeline)==null||g.call(this)),(v=this.keyframeResolver)==null||v.cancel()},this.createdAt=Vt.now();const f={autoplay:t,delay:n,type:r,repeat:i,repeatDelay:a,repeatType:o,name:c,motionValue:u,element:d,...h},m=(d==null?void 0:d.KeyframeResolver)||sg;this.keyframeResolver=new m(l,(g,v,x)=>this.onKeyframesResolved(g,v,f,!x),c,u,d),(b=this.keyframeResolver)==null||b.scheduleResolve()}onKeyframesResolved(t,n,r,i){this.keyframeResolver=void 0;const{name:a,type:o,velocity:l,delay:c,isHandoff:u,onUpdate:d}=r;this.resolvedAt=Vt.now(),DD(t,a,o,l)||((Ar.instantAnimations||!c)&&(d==null||d(tg(t,r,n))),t[0]=t[t.length-1],rm(r),r.repeat=0);const f={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>OD?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:t},m=!u&&LD(f)?new AD({...f,element:f.motionValue.owner.current}):new rg(f);m.finished.then(()=>this.notifyFinished()).catch(Ut),this.pendingTimeline&&(this.stopTimeline=m.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=m}get finished(){return this._animation?this.animation.finished:this._finished}then(t,n){return this.finished.finally(t).then(()=>{})}get animation(){var t;return this._animation||((t=this.keyframeResolver)==null||t.resume(),bD()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var t;this._animation&&this.animation.cancel(),(t=this.keyframeResolver)==null||t.cancel()}}const _D=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function VD(e){const t=_D.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function pN(e,t,n=1){const[r,i]=VD(e);if(!r)return;const a=window.getComputedStyle(t).getPropertyValue(r);if(a){const o=a.trim();return Oj(o)?parseFloat(o):o}return Gp(i)?pN(i,t,n+1):i}function ig(e,t){return(e==null?void 0:e[t])??(e==null?void 0:e.default)??e}const gN=new Set(["width","height","top","left","right","bottom",...qa]),zD={test:e=>e==="auto",parse:e=>e},xN=e=>t=>t.test(e),yN=[Ha,le,sr,Ur,F5,M5,zD],Gy=e=>yN.find(xN(e));function $D(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||_j(e):!0}const BD=new Set(["brightness","contrast","saturate","opacity"]);function UD(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Yp)||[];if(!r)return e;const i=n.replace(r,"");let a=BD.has(t)?1:0;return r!==n&&(a*=100),t+"("+a+i+")"}const WD=/\b([a-z-]*)\(.*?\)/gu,sm={...ks,getAnimatableNone:e=>{const t=e.match(WD);return t?t.map(UD).join(" "):e}},Yy={...Ha,transform:Math.round},HD={rotate:Ur,rotateX:Ur,rotateY:Ur,rotateZ:Ur,scale:oc,scaleX:oc,scaleY:oc,scaleZ:oc,skew:Ur,skewX:Ur,skewY:Ur,distance:le,translateX:le,translateY:le,translateZ:le,x:le,y:le,z:le,perspective:le,transformPerspective:le,opacity:ol,originX:Iy,originY:Iy,originZ:le},ag={borderWidth:le,borderTopWidth:le,borderRightWidth:le,borderBottomWidth:le,borderLeftWidth:le,borderRadius:le,radius:le,borderTopLeftRadius:le,borderTopRightRadius:le,borderBottomRightRadius:le,borderBottomLeftRadius:le,width:le,maxWidth:le,height:le,maxHeight:le,top:le,right:le,bottom:le,left:le,padding:le,paddingTop:le,paddingRight:le,paddingBottom:le,paddingLeft:le,margin:le,marginTop:le,marginRight:le,marginBottom:le,marginLeft:le,backgroundPositionX:le,backgroundPositionY:le,...HD,zIndex:Yy,fillOpacity:ol,strokeOpacity:ol,numOctaves:Yy},qD={...ag,color:tt,backgroundColor:tt,outlineColor:tt,fill:tt,stroke:tt,borderColor:tt,borderTopColor:tt,borderRightColor:tt,borderBottomColor:tt,borderLeftColor:tt,filter:sm,WebkitFilter:sm},vN=e=>qD[e];function bN(e,t){let n=vN(e);return n!==sm&&(n=ks),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const KD=new Set(["auto","none","0"]);function QD(e,t,n){let r=0,i;for(;r<e.length&&!i;){const a=e[r];typeof a=="string"&&!KD.has(a)&&ll(a).values.length&&(i=e[r]),r++}if(i&&n)for(const a of t)e[a]=bN(n,i)}class GD extends sg{constructor(t,n,r,i,a){super(t,n,r,i,a,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let c=0;c<t.length;c++){let u=t[c];if(typeof u=="string"&&(u=u.trim(),Gp(u))){const d=pN(u,n.current);d!==void 0&&(t[c]=d),c===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!gN.has(r)||t.length!==2)return;const[i,a]=t,o=Gy(i),l=Gy(a);if(o!==l)if(Hy(o)&&Hy(l))for(let c=0;c<t.length;c++){const u=t[c];typeof u=="string"&&(t[c]=parseFloat(u))}else li[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let i=0;i<t.length;i++)(t[i]===null||$D(t[i]))&&r.push(i);r.length&&QD(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=li[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&t.getValue(r,i).jump(i,!1)}measureEndState(){var l;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const i=t.getValue(n);i&&i.jump(this.measuredOrigin,!1);const a=r.length-1,o=r[a];r[a]=li[n](t.measureViewportBox(),window.getComputedStyle(t.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),(l=this.removedTransforms)!=null&&l.length&&this.removedTransforms.forEach(([c,u])=>{t.getValue(c).set(u)}),this.resolveNoneKeyframes()}}function og(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){const i=document.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e)}const wN=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function lg(e){return Ij(e)&&"offsetHeight"in e}const Xy=30,YD=e=>!isNaN(parseFloat(e)),Ao={current:void 0};class XD{constructor(t,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var a;const i=Vt.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((a=this.events.change)==null||a.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Vt.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=YD(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Wp);const r=this.events[t].add(n);return t==="change"?()=>{r(),ke.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var t;(t=this.events.change)==null||t.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return Ao.current&&Ao.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=Vt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Xy)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Xy);return Hp(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var t,n;(t=this.dependents)==null||t.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function An(e,t){return new XD(e,t)}const{schedule:cg,cancel:T_}=Gj(queueMicrotask,!1),jn={x:!1,y:!1};function jN(){return jn.x||jn.y}function ZD(e){return e==="x"||e==="y"?jn[e]?null:(jn[e]=!0,()=>{jn[e]=!1}):jn.x||jn.y?null:(jn.x=jn.y=!0,()=>{jn.x=jn.y=!1})}function NN(e,t){const n=og(e),r=new AbortController,i={passive:!0,...t,signal:r.signal};return[n,i,()=>r.abort()]}function Zy(e){return!(e.pointerType==="touch"||jN())}function JD(e,t,n={}){const[r,i,a]=NN(e,n),o=l=>{if(!Zy(l))return;const{target:c}=l,u=t(c,l);if(typeof u!="function"||!c)return;const d=h=>{Zy(h)&&(u(h),c.removeEventListener("pointerleave",d))};c.addEventListener("pointerleave",d,i)};return r.forEach(l=>{l.addEventListener("pointerenter",o,i)}),a}const CN=(e,t)=>t?e===t?!0:CN(e,t.parentElement):!1,ug=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,eM=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function tM(e){return eM.has(e.tagName)||e.tabIndex!==-1}const Dc=new WeakSet;function Jy(e){return t=>{t.key==="Enter"&&e(t)}}function sf(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const nM=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=Jy(()=>{if(Dc.has(n))return;sf(n,"down");const i=Jy(()=>{sf(n,"up")}),a=()=>sf(n,"cancel");n.addEventListener("keyup",i,t),n.addEventListener("blur",a,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function e0(e){return ug(e)&&!jN()}function rM(e,t,n={}){const[r,i,a]=NN(e,n),o=l=>{const c=l.currentTarget;if(!e0(l))return;Dc.add(c);const u=t(c,l),d=(m,b)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",f),Dc.has(c)&&Dc.delete(c),e0(m)&&typeof u=="function"&&u(m,{success:b})},h=m=>{d(m,c===window||c===document||n.useGlobalTarget||CN(c,m.target))},f=m=>{d(m,!1)};window.addEventListener("pointerup",h,i),window.addEventListener("pointercancel",f,i)};return r.forEach(l=>{(n.useGlobalTarget?window:l).addEventListener("pointerdown",o,i),lg(l)&&(l.addEventListener("focus",u=>nM(u,i)),!tM(l)&&!l.hasAttribute("tabindex")&&(l.tabIndex=0))}),a}function dg(e){return Ij(e)&&"ownerSVGElement"in e}const Mc=new WeakMap;let Wr;const SN=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+"Size"]:dg(r)&&"getBBox"in r?r.getBBox()[t]:r[n],sM=SN("inline","width","offsetWidth"),iM=SN("block","height","offsetHeight");function aM({target:e,borderBoxSize:t}){var n;(n=Mc.get(e))==null||n.forEach(r=>{r(e,{get width(){return sM(e,t)},get height(){return iM(e,t)}})})}function oM(e){e.forEach(aM)}function lM(){typeof ResizeObserver>"u"||(Wr=new ResizeObserver(oM))}function cM(e,t){Wr||lM();const n=og(e);return n.forEach(r=>{let i=Mc.get(r);i||(i=new Set,Mc.set(r,i)),i.add(t),Wr==null||Wr.observe(r)}),()=>{n.forEach(r=>{const i=Mc.get(r);i==null||i.delete(t),i!=null&&i.size||Wr==null||Wr.unobserve(r)})}}const Fc=new Set;let Qi;function uM(){Qi=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};Fc.forEach(t=>t(e))},window.addEventListener("resize",Qi)}function dM(e){return Fc.add(e),Qi||uM(),()=>{Fc.delete(e),!Fc.size&&typeof Qi=="function"&&(window.removeEventListener("resize",Qi),Qi=void 0)}}function fM(e,t){return typeof e=="function"?dM(e):cM(e,t)}function kN(e,t){let n;const r=()=>{const{currentTime:i}=t,o=(i===null?0:i.value)/100;n!==o&&e(o),n=o};return ke.preUpdate(r,!0),()=>_n(r)}function hM(e){return dg(e)&&e.tagName==="svg"}function mM(...e){const t=!Array.isArray(e[0]),n=t?0:-1,r=e[0+n],i=e[1+n],a=e[2+n],o=e[3+n],l=eg(i,a,o);return t?l(r):l}const wt=e=>!!(e&&e.getVelocity),pM=[...yN,tt,ks],gM=e=>pM.find(xN(e)),od=p.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function t0(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function xM(...e){return t=>{let n=!1;const r=e.map(i=>{const a=t0(i,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let i=0;i<r.length;i++){const a=r[i];typeof a=="function"?a():t0(e[i],null)}}}}function yM(...e){return p.useCallback(xM(...e),e)}class vM extends p.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=n.offsetParent,i=lg(r)&&r.offsetWidth||0,a=this.props.sizeRef.current;a.height=n.offsetHeight||0,a.width=n.offsetWidth||0,a.top=n.offsetTop,a.left=n.offsetLeft,a.right=i-a.width-a.left}return null}componentDidUpdate(){}render(){return this.props.children}}function bM({children:e,isPresent:t,anchorX:n,root:r}){const i=p.useId(),a=p.useRef(null),o=p.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:l}=p.useContext(od),c=yM(a,e==null?void 0:e.ref);return p.useInsertionEffect(()=>{const{width:u,height:d,top:h,left:f,right:m}=o.current;if(t||!a.current||!u||!d)return;const b=n==="left"?`left: ${f}`:`right: ${m}`;a.current.dataset.motionPopId=i;const g=document.createElement("style");l&&(g.nonce=l);const v=r??document.head;return v.appendChild(g),g.sheet&&g.sheet.insertRule(` [data-motion-pop-id="${i}"] { position: absolute !important; width: ${u}px !important; height: ${d}px !important; ${b}px !important; top: ${h}px !important; } `),()=>{v.contains(g)&&v.removeChild(g)}},[t]),s.jsx(vM,{isPresent:t,childRef:a,sizeRef:o,children:p.cloneElement(e,{ref:c})})}const wM=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:a,mode:o,anchorX:l,root:c})=>{const u=Wa(jM),d=p.useId();let h=!0,f=p.useMemo(()=>(h=!1,{id:d,initial:t,isPresent:n,custom:i,onExitComplete:m=>{u.set(m,!0);for(const b of u.values())if(!b)return;r&&r()},register:m=>(u.set(m,!1),()=>u.delete(m))}),[n,u,r]);return a&&h&&(f={...f}),p.useMemo(()=>{u.forEach((m,b)=>u.set(b,!1))},[n]),p.useEffect(()=>{!n&&!u.size&&r&&r()},[n]),o==="popLayout"&&(e=s.jsx(bM,{isPresent:n,anchorX:l,root:c,children:e})),s.jsx(ad.Provider,{value:f,children:e})};function jM(){return new Map}function EN(e=!0){const t=p.useContext(ad);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=t,a=p.useId();p.useEffect(()=>{if(e)return i(a)},[e]);const o=p.useCallback(()=>e&&r&&r(a),[a,r,e]);return!n&&r?[!1,o]:[!0]}const lc=e=>e.key||"";function n0(e){const t=[];return p.Children.forEach(e,n=>{p.isValidElement(n)&&t.push(n)}),t}const af=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:a="sync",propagate:o=!1,anchorX:l="left",root:c})=>{const[u,d]=EN(o),h=p.useMemo(()=>n0(e),[e]),f=o&&!u?[]:h.map(lc),m=p.useRef(!0),b=p.useRef(h),g=Wa(()=>new Map),[v,x]=p.useState(h),[y,w]=p.useState(h);id(()=>{m.current=!1,b.current=h;for(let N=0;N<y.length;N++){const S=lc(y[N]);f.includes(S)?g.delete(S):g.get(S)!==!0&&g.set(S,!1)}},[y,f.length,f.join("-")]);const j=[];if(h!==v){let N=[...h];for(let S=0;S<y.length;S++){const T=y[S],k=lc(T);f.includes(k)||(N.splice(S,0,T),j.push(T))}return a==="wait"&&j.length&&(N=j),w(n0(N)),x(h),null}const{forceRender:C}=p.useContext(Vp);return s.jsx(s.Fragment,{children:y.map(N=>{const S=lc(N),T=o&&!u?!1:h===y||f.includes(S),k=()=>{if(g.has(S))g.set(S,!0);else return;let A=!0;g.forEach(z=>{z||(A=!1)}),A&&(C==null||C(),w(b.current),o&&(d==null||d()),r&&r())};return s.jsx(wM,{isPresent:T,initial:!m.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:a,root:c,onExitComplete:T?void 0:k,anchorX:l,children:N},S)})})},TN=p.createContext({strict:!1}),r0={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Fa={};for(const e in r0)Fa[e]={isEnabled:t=>r0[e].some(n=>!!t[n])};function NM(e){for(const t in e)Fa[t]={...Fa[t],...e[t]}}const CM=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Cu(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||CM.has(e)}let PN=e=>!Cu(e);function SM(e){typeof e=="function"&&(PN=t=>t.startsWith("on")?!Cu(t):e(t))}try{SM(require("@emotion/is-prop-valid").default)}catch{}function kM(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(PN(i)||n===!0&&Cu(i)||!t&&!Cu(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}const ld=p.createContext({});function cd(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function cl(e){return typeof e=="string"||Array.isArray(e)}const fg=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],hg=["initial",...fg];function ud(e){return cd(e.animate)||hg.some(t=>cl(e[t]))}function AN(e){return!!(ud(e)||e.variants)}function EM(e,t){if(ud(e)){const{initial:n,animate:r}=e;return{initial:n===!1||cl(n)?n:void 0,animate:cl(r)?r:void 0}}return e.inherit!==!1?t:{}}function TM(e){const{initial:t,animate:n}=EM(e,p.useContext(ld));return p.useMemo(()=>({initial:t,animate:n}),[s0(t),s0(n)])}function s0(e){return Array.isArray(e)?e.join(" "):e}const ul={};function PM(e){for(const t in e)ul[t]=e[t],Qp(t)&&(ul[t].isCSSVariable=!0)}function RN(e,{layout:t,layoutId:n}){return Ka.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!ul[e]||e==="opacity")}const AM={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},RM=qa.length;function DM(e,t,n){let r="",i=!0;for(let a=0;a<RM;a++){const o=qa[a],l=e[o];if(l===void 0)continue;let c=!0;if(typeof l=="number"?c=l===(o.startsWith("scale")?1:0):c=parseFloat(l)===0,!c||n){const u=wN(l,ag[o]);if(!c){i=!1;const d=AM[o]||o;r+=`${d}(${u}) `}n&&(t[o]=u)}}return r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}function mg(e,t,n){const{style:r,vars:i,transformOrigin:a}=e;let o=!1,l=!1;for(const c in t){const u=t[c];if(Ka.has(c)){o=!0;continue}else if(Qp(c)){i[c]=u;continue}else{const d=wN(u,ag[c]);c.startsWith("origin")?(l=!0,a[c]=d):r[c]=d}}if(t.transform||(o||n?r.transform=DM(t,e.transform,n):r.transform&&(r.transform="none")),l){const{originX:c="50%",originY:u="50%",originZ:d=0}=a;r.transformOrigin=`${c} ${u} ${d}`}}const pg=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function DN(e,t,n){for(const r in t)!wt(t[r])&&!RN(r,n)&&(e[r]=t[r])}function MM({transformTemplate:e},t){return p.useMemo(()=>{const n=pg();return mg(n,t,e),Object.assign({},n.vars,n.style)},[t])}function FM(e,t){const n=e.style||{},r={};return DN(r,n,e),Object.assign(r,MM(e,t)),r}function LM(e,t){const n={},r=FM(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const OM={offset:"stroke-dashoffset",array:"stroke-dasharray"},IM={offset:"strokeDashoffset",array:"strokeDasharray"};function _M(e,t,n=1,r=0,i=!0){e.pathLength=1;const a=i?OM:IM;e[a.offset]=le.transform(-r);const o=le.transform(t),l=le.transform(n);e[a.array]=`${o} ${l}`}function MN(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...l},c,u,d){if(mg(e,l,u),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:h,style:f}=e;h.transform&&(f.transform=h.transform,delete h.transform),(f.transform||h.transformOrigin)&&(f.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),f.transform&&(f.transformBox=(d==null?void 0:d.transformBox)??"fill-box",delete h.transformBox),t!==void 0&&(h.x=t),n!==void 0&&(h.y=n),r!==void 0&&(h.scale=r),i!==void 0&&_M(h,i,a,o,!1)}const FN=()=>({...pg(),attrs:{}}),LN=e=>typeof e=="string"&&e.toLowerCase()==="svg";function VM(e,t,n,r){const i=p.useMemo(()=>{const a=FN();return MN(a,t,LN(r),e.transformTemplate,e.style),{...a.attrs,style:{...a.style}}},[t]);if(e.style){const a={};DN(a,e.style,e),i.style={...a,...i.style}}return i}const zM=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function gg(e){return typeof e!="string"||e.includes("-")?!1:!!(zM.indexOf(e)>-1||/[A-Z]/u.test(e))}function $M(e,t,n,{latestValues:r},i,a=!1){const l=(gg(e)?VM:LM)(t,r,i,e),c=kM(t,typeof e=="string",a),u=e!==p.Fragment?{...c,...l,ref:n}:{},{children:d}=t,h=p.useMemo(()=>wt(d)?d.get():d,[d]);return p.createElement(e,{...u,children:h})}function i0(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function xg(e,t,n,r){if(typeof t=="function"){const[i,a]=i0(r);t=t(n!==void 0?n:e.custom,i,a)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,a]=i0(r);t=t(n!==void 0?n:e.custom,i,a)}return t}function Lc(e){return wt(e)?e.get():e}function BM({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:UM(n,r,i,e),renderState:t()}}function UM(e,t,n,r){const i={},a=r(e,{});for(const f in a)i[f]=Lc(a[f]);let{initial:o,animate:l}=e;const c=ud(e),u=AN(e);t&&u&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),l===void 0&&(l=t.animate));let d=n?n.initial===!1:!1;d=d||o===!1;const h=d?l:o;if(h&&typeof h!="boolean"&&!cd(h)){const f=Array.isArray(h)?h:[h];for(let m=0;m<f.length;m++){const b=xg(e,f[m]);if(b){const{transitionEnd:g,transition:v,...x}=b;for(const y in x){let w=x[y];if(Array.isArray(w)){const j=d?w.length-1:0;w=w[j]}w!==null&&(i[y]=w)}for(const y in g)i[y]=g[y]}}}return i}const ON=e=>(t,n)=>{const r=p.useContext(ld),i=p.useContext(ad),a=()=>BM(e,t,r,i);return n?a():Wa(a)};function yg(e,t,n){var a;const{style:r}=e,i={};for(const o in r)(wt(r[o])||t.style&&wt(t.style[o])||RN(o,e)||((a=n==null?void 0:n.getValue(o))==null?void 0:a.liveStyle)!==void 0)&&(i[o]=r[o]);return i}const WM=ON({scrapeMotionValuesFromProps:yg,createRenderState:pg});function IN(e,t,n){const r=yg(e,t,n);for(const i in e)if(wt(e[i])||wt(t[i])){const a=qa.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[a]=e[i]}return r}const HM=ON({scrapeMotionValuesFromProps:IN,createRenderState:FN}),qM=Symbol.for("motionComponentSymbol");function Gi(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function KM(e,t,n){return p.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):Gi(n)&&(n.current=r))},[t])}const vg=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),QM="framerAppearId",_N="data-"+vg(QM),VN=p.createContext({});function GM(e,t,n,r,i){var g,v;const{visualElement:a}=p.useContext(ld),o=p.useContext(TN),l=p.useContext(ad),c=p.useContext(od).reducedMotion,u=p.useRef(null);r=r||o.renderer,!u.current&&r&&(u.current=r(e,{visualState:t,parent:a,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:c}));const d=u.current,h=p.useContext(VN);d&&!d.projection&&i&&(d.type==="html"||d.type==="svg")&&YM(u.current,n,i,h);const f=p.useRef(!1);p.useInsertionEffect(()=>{d&&f.current&&d.update(n,l)});const m=n[_N],b=p.useRef(!!m&&!((g=window.MotionHandoffIsComplete)!=null&&g.call(window,m))&&((v=window.MotionHasOptimisedAnimation)==null?void 0:v.call(window,m)));return id(()=>{d&&(f.current=!0,window.MotionIsMounted=!0,d.updateFeatures(),d.scheduleRenderMicrotask(),b.current&&d.animationState&&d.animationState.animateChanges())}),p.useEffect(()=>{d&&(!b.current&&d.animationState&&d.animationState.animateChanges(),b.current&&(queueMicrotask(()=>{var x;(x=window.MotionHandoffMarkAsComplete)==null||x.call(window,m)}),b.current=!1),d.enteringChildren=void 0)}),d}function YM(e,t,n,r){const{layoutId:i,layout:a,drag:o,dragConstraints:l,layoutScroll:c,layoutRoot:u,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:zN(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||l&&Gi(l),visualElement:e,animationType:typeof a=="string"?a:"both",initialPromotionConfig:r,crossfade:d,layoutScroll:c,layoutRoot:u})}function zN(e){if(e)return e.options.allowProjection!==!1?e.projection:zN(e.parent)}function of(e,{forwardMotionProps:t=!1}={},n,r){n&&NM(n);const i=gg(e)?HM:WM;function a(l,c){let u;const d={...p.useContext(od),...l,layoutId:XM(l)},{isStatic:h}=d,f=TM(l),m=i(l,h);if(!h&&zp){ZM();const b=JM(d);u=b.MeasureLayout,f.visualElement=GM(e,m,d,r,b.ProjectionNode)}return s.jsxs(ld.Provider,{value:f,children:[u&&f.visualElement?s.jsx(u,{visualElement:f.visualElement,...d}):null,$M(e,l,KM(m,f.visualElement,c),m,h,t)]})}a.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const o=p.forwardRef(a);return o[qM]=e,o}function XM({layoutId:e}){const t=p.useContext(Vp).id;return t&&e!==void 0?t+"-"+e:e}function ZM(e,t){p.useContext(TN).strict}function JM(e){const{drag:t,layout:n}=Fa;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function eF(e,t){if(typeof Proxy>"u")return of;const n=new Map,r=(a,o)=>of(a,o,e,t),i=(a,o)=>r(a,o);return new Proxy(i,{get:(a,o)=>o==="create"?r:(n.has(o)||n.set(o,of(o,void 0,e,t)),n.get(o))})}function $N({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function tF({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function nF(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function lf(e){return e===void 0||e===1}function im({scale:e,scaleX:t,scaleY:n}){return!lf(e)||!lf(t)||!lf(n)}function Us(e){return im(e)||BN(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function BN(e){return a0(e.x)||a0(e.y)}function a0(e){return e&&e!=="0%"}function Su(e,t,n){const r=e-n,i=t*r;return n+i}function o0(e,t,n,r,i){return i!==void 0&&(e=Su(e,i,r)),Su(e,n,r)+t}function am(e,t=0,n=1,r,i){e.min=o0(e.min,t,n,r,i),e.max=o0(e.max,t,n,r,i)}function UN(e,{x:t,y:n}){am(e.x,t.translate,t.scale,t.originPoint),am(e.y,n.translate,n.scale,n.originPoint)}const l0=.999999999999,c0=1.0000000000001;function rF(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let a,o;for(let l=0;l<i;l++){a=n[l],o=a.projectionDelta;const{visualElement:c}=a.options;c&&c.props.style&&c.props.style.display==="contents"||(r&&a.options.layoutScroll&&a.scroll&&a!==a.root&&Xi(e,{x:-a.scroll.offset.x,y:-a.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,UN(e,o)),r&&Us(a.latestValues)&&Xi(e,a.latestValues))}t.x<c0&&t.x>l0&&(t.x=1),t.y<c0&&t.y>l0&&(t.y=1)}function Yi(e,t){e.min=e.min+t,e.max=e.max+t}function u0(e,t,n,r,i=.5){const a=Be(e.min,e.max,i);am(e,t,n,a,r)}function Xi(e,t){u0(e.x,t.x,t.scaleX,t.scale,t.originX),u0(e.y,t.y,t.scaleY,t.scale,t.originY)}function WN(e,t){return $N(nF(e.getBoundingClientRect(),t))}function sF(e,t,n){const r=WN(e,n),{scroll:i}=t;return i&&(Yi(r.x,i.offset.x),Yi(r.y,i.offset.y)),r}const d0=()=>({translate:0,scale:1,origin:0,originPoint:0}),Zi=()=>({x:d0(),y:d0()}),f0=()=>({min:0,max:0}),Ge=()=>({x:f0(),y:f0()}),om={current:null},HN={current:!1};function iF(){if(HN.current=!0,!!zp)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>om.current=e.matches;e.addEventListener("change",t),t()}else om.current=!1}const aF=new WeakMap;function oF(e,t,n){for(const r in t){const i=t[r],a=n[r];if(wt(i))e.addValue(r,i);else if(wt(a))e.addValue(r,An(i,{owner:e}));else if(a!==i)if(e.hasValue(r)){const o=e.getValue(r);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=e.getStaticValue(r);e.addValue(r,An(o!==void 0?o:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const h0=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class lF{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,blockInitialAnimation:a,visualState:o},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=sg,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const f=Vt.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,ke.render(this.render,!1,!0))};const{latestValues:c,renderState:u}=o;this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=l,this.blockInitialAnimation=!!a,this.isControllingVariants=ud(n),this.isVariantNode=AN(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:d,...h}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in h){const m=h[f];c[f]!==void 0&&wt(m)&&m.set(c[f])}}mount(t){var n;this.current=t,aF.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((r,i)=>this.bindToMotionValue(i,r)),HN.current||iF(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:om.current,(n=this.parent)==null||n.addChild(this),this.update(this.props,this.presenceContext)}unmount(){var t;this.projection&&this.projection.unmount(),_n(this.notifyUpdate),_n(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(t=this.parent)==null||t.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const r=this.features[n];r&&(r.unmount(),r.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=Ka.has(t);r&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&ke.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let a;window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),a&&a(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Fa){const n=Fa[t];if(!n)continue;const{isEnabled:r,Feature:i}=n;if(!this.features[t]&&i&&r(this.props)&&(this.features[t]=new i(this)),this.features[t]){const a=this.features[t];a.isMounted?a.update():(a.mount(),a.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Ge()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<h0.length;r++){const i=h0[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const a="on"+i,o=t[a];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=oF(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=An(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(Oj(r)||_j(r))?r=parseFloat(r):!gM(r)&&ks.test(n)&&(r=bN(t,n)),this.setBaseTarget(t,wt(r)?r.get():r)),wt(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var a;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const o=xg(this.props,n,(a=this.presenceContext)==null?void 0:a.custom);o&&(r=o[t])}if(n&&r!==void 0)return r;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!wt(i)?i:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Wp),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}scheduleRenderMicrotask(){cg.render(this.render)}}class qN extends lF{constructor(){super(...arguments),this.KeyframeResolver=GD}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;wt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function KN(e,{style:t,vars:n},r,i){const a=e.style;let o;for(o in t)a[o]=t[o];i==null||i.applyProjectionStyles(a,r);for(o in n)a.setProperty(o,n[o])}function cF(e){return window.getComputedStyle(e)}class uF extends qN{constructor(){super(...arguments),this.type="html",this.renderInstance=KN}readValueFromInstance(t,n){var r;if(Ka.has(n))return(r=this.projection)!=null&&r.isProjecting?Zh(n):pD(t,n);{const i=cF(t),a=(Qp(n)?i.getPropertyValue(n):i[n])||0;return typeof a=="string"?a.trim():a}}measureInstanceViewportBox(t,{transformPagePoint:n}){return WN(t,n)}build(t,n,r){mg(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return yg(t,n,r)}}const QN=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function dF(e,t,n,r){KN(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(QN.has(i)?i:vg(i),t.attrs[i])}class fF extends qN{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ge}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Ka.has(n)){const r=vN(n);return r&&r.default||0}return n=QN.has(n)?n:vg(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return IN(t,n,r)}build(t,n,r){MN(t,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,n,r,i){dF(t,n,r,i)}mount(t){this.isSVGTag=LN(t.tagName),super.mount(t)}}const hF=(e,t)=>gg(e)?new fF(t):new uF(t,{allowProjection:e!==p.Fragment});function la(e,t,n){const r=e.getProps();return xg(r,t,n!==void 0?n:r.custom,e)}const lm=e=>Array.isArray(e);function mF(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,An(n))}function pF(e){return lm(e)?e[e.length-1]||0:e}function gF(e,t){const n=la(e,t);let{transitionEnd:r={},transition:i={},...a}=n||{};a={...a,...r};for(const o in a){const l=pF(a[o]);mF(e,o,l)}}function xF(e){return!!(wt(e)&&e.add)}function cm(e,t){const n=e.getValue("willChange");if(xF(n))return n.add(t);if(!n&&Ar.WillChange){const r=new Ar.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function GN(e){return e.props[_N]}const yF=e=>e!==null;function vF(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(yF),a=t&&n!=="loop"&&t%2===1?0:i.length-1;return!a||r===void 0?i[a]:r}const bF={type:"spring",stiffness:500,damping:25,restSpeed:10},wF=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),jF={type:"keyframes",duration:.8},NF={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},CF=(e,{keyframes:t})=>t.length>2?jF:Ka.has(e)?e.startsWith("scale")?wF(t[1]):bF:NF;function SF({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:a,repeatType:o,repeatDelay:l,from:c,elapsed:u,...d}){return!!Object.keys(d).length}const bg=(e,t,n,r={},i,a)=>o=>{const l=ig(r,e)||{},c=l.delay||r.delay||0;let{elapsed:u=0}=r;u=u-rr(c);const d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-u,onUpdate:f=>{t.set(f),l.onUpdate&&l.onUpdate(f)},onComplete:()=>{o(),l.onComplete&&l.onComplete()},name:e,motionValue:t,element:a?void 0:i};SF(l)||Object.assign(d,CF(e,d)),d.duration&&(d.duration=rr(d.duration)),d.repeatDelay&&(d.repeatDelay=rr(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let h=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(rm(d),d.delay===0&&(h=!0)),(Ar.instantAnimations||Ar.skipAnimations)&&(h=!0,rm(d),d.delay=0),d.allowFlatten=!l.type&&!l.ease,h&&!a&&t.get()!==void 0){const f=vF(d.keyframes,l);if(f!==void 0){ke.update(()=>{d.onUpdate(f),d.onComplete()});return}}return l.isSync?new rg(d):new ID(d)};function kF({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function YN(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a=e.getDefaultTransition(),transitionEnd:o,...l}=t;r&&(a=r);const c=[],u=i&&e.animationState&&e.animationState.getState()[i];for(const d in l){const h=e.getValue(d,e.latestValues[d]??null),f=l[d];if(f===void 0||u&&kF(u,d))continue;const m={delay:n,...ig(a||{},d)},b=h.get();if(b!==void 0&&!h.isAnimating&&!Array.isArray(f)&&f===b&&!m.velocity)continue;let g=!1;if(window.MotionHandoffAnimation){const x=GN(e);if(x){const y=window.MotionHandoffAnimation(x,d,ke);y!==null&&(m.startTime=y,g=!0)}}cm(e,d),h.start(bg(d,h,f,e.shouldReduceMotion&&gN.has(d)?{type:!1}:m,e,g));const v=h.animation;v&&c.push(v)}return o&&Promise.all(c).then(()=>{ke.update(()=>{o&&gF(e,o)})}),c}function XN(e,t,n,r=0,i=1){const a=Array.from(e).sort((u,d)=>u.sortNodePosition(d)).indexOf(t),o=e.size,l=(o-1)*r;return typeof n=="function"?n(a,o):i===1?a*r:l-a*r}function um(e,t,n={}){var c;const r=la(e,t,n.type==="exit"?(c=e.presenceContext)==null?void 0:c.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const a=r?()=>Promise.all(YN(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:d=0,staggerChildren:h,staggerDirection:f}=i;return EF(e,t,u,d,h,f,n)}:()=>Promise.resolve(),{when:l}=i;if(l){const[u,d]=l==="beforeChildren"?[a,o]:[o,a];return u().then(()=>d())}else return Promise.all([a(),o(n.delay)])}function EF(e,t,n=0,r=0,i=0,a=1,o){const l=[];for(const c of e.variantChildren)c.notify("AnimationStart",t),l.push(um(c,t,{...o,delay:n+(typeof r=="function"?0:r)+XN(e.variantChildren,c,r,i,a)}).then(()=>c.notify("AnimationComplete",t)));return Promise.all(l)}function TF(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(a=>um(e,a,n));r=Promise.all(i)}else if(typeof t=="string")r=um(e,t,n);else{const i=typeof t=="function"?la(e,t,n.custom):t;r=Promise.all(YN(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function ZN(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const PF=hg.length;function JN(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?JN(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<PF;n++){const r=hg[n],i=e.props[r];(cl(i)||i===!1)&&(t[r]=i)}return t}const AF=[...fg].reverse(),RF=fg.length;function DF(e){return t=>Promise.all(t.map(({animation:n,options:r})=>TF(e,n,r)))}function MF(e){let t=DF(e),n=m0(),r=!0;const i=c=>(u,d)=>{var f;const h=la(e,d,c==="exit"?(f=e.presenceContext)==null?void 0:f.custom:void 0);if(h){const{transition:m,transitionEnd:b,...g}=h;u={...u,...g,...b}}return u};function a(c){t=c(e)}function o(c){const{props:u}=e,d=JN(e.parent)||{},h=[],f=new Set;let m={},b=1/0;for(let v=0;v<RF;v++){const x=AF[v],y=n[x],w=u[x]!==void 0?u[x]:d[x],j=cl(w),C=x===c?y.isActive:null;C===!1&&(b=v);let N=w===d[x]&&w!==u[x]&&j;if(N&&r&&e.manuallyAnimateOnMount&&(N=!1),y.protectedKeys={...m},!y.isActive&&C===null||!w&&!y.prevProp||cd(w)||typeof w=="boolean")continue;const S=FF(y.prevProp,w);let T=S||x===c&&y.isActive&&!N&&j||v>b&&j,k=!1;const A=Array.isArray(w)?w:[w];let z=A.reduce(i(x),{});C===!1&&(z={});const{prevResolvedValues:O={}}=y,W={...O,...z},_=G=>{T=!0,f.has(G)&&(k=!0,f.delete(G)),y.needsAnimating[G]=!0;const D=e.getValue(G);D&&(D.liveStyle=!1)};for(const G in W){const D=z[G],L=O[G];if(m.hasOwnProperty(G))continue;let H=!1;lm(D)&&lm(L)?H=!ZN(D,L):H=D!==L,H?D!=null?_(G):f.add(G):D!==void 0&&f.has(G)?_(G):y.protectedKeys[G]=!0}y.prevProp=w,y.prevResolvedValues=z,y.isActive&&(m={...m,...z}),r&&e.blockInitialAnimation&&(T=!1);const re=N&&S;T&&(!re||k)&&h.push(...A.map(G=>{const D={type:x};if(typeof G=="string"&&r&&!re&&e.manuallyAnimateOnMount&&e.parent){const{parent:L}=e,H=la(L,G);if(L.enteringChildren&&H){const{delayChildren:ce}=H.transition||{};D.delay=XN(L.enteringChildren,e,ce)}}return{animation:G,options:D}}))}if(f.size){const v={};if(typeof u.initial!="boolean"){const x=la(e,Array.isArray(u.initial)?u.initial[0]:u.initial);x&&x.transition&&(v.transition=x.transition)}f.forEach(x=>{const y=e.getBaseTarget(x),w=e.getValue(x);w&&(w.liveStyle=!0),v[x]=y??null}),h.push({animation:v})}let g=!!h.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(g=!1),r=!1,g?t(h):Promise.resolve()}function l(c,u){var h;if(n[c].isActive===u)return Promise.resolve();(h=e.variantChildren)==null||h.forEach(f=>{var m;return(m=f.animationState)==null?void 0:m.setActive(c,u)}),n[c].isActive=u;const d=o(c);for(const f in n)n[f].protectedKeys={};return d}return{animateChanges:o,setActive:l,setAnimateFunction:a,getState:()=>n,reset:()=>{n=m0()}}}function FF(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!ZN(t,e):!1}function Vs(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function m0(){return{animate:Vs(!0),whileInView:Vs(),whileHover:Vs(),whileTap:Vs(),whileDrag:Vs(),whileFocus:Vs(),exit:Vs()}}class As{constructor(t){this.isMounted=!1,this.node=t}update(){}}class LF extends As{constructor(t){super(t),t.animationState||(t.animationState=MF(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();cd(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let OF=0;class IF extends As{constructor(){super(...arguments),this.id=OF++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const _F={animation:{Feature:LF},exit:{Feature:IF}};function dl(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Rl(e){return{point:{x:e.pageX,y:e.pageY}}}const VF=e=>t=>ug(t)&&e(t,Rl(t));function Ro(e,t,n,r){return dl(e,t,VF(n),r)}const e2=1e-4,zF=1-e2,$F=1+e2,t2=.01,BF=0-t2,UF=0+t2;function Tt(e){return e.max-e.min}function WF(e,t,n){return Math.abs(e-t)<=n}function p0(e,t,n,r=.5){e.origin=r,e.originPoint=Be(t.min,t.max,e.origin),e.scale=Tt(n)/Tt(t),e.translate=Be(n.min,n.max,e.origin)-e.originPoint,(e.scale>=zF&&e.scale<=$F||isNaN(e.scale))&&(e.scale=1),(e.translate>=BF&&e.translate<=UF||isNaN(e.translate))&&(e.translate=0)}function Do(e,t,n,r){p0(e.x,t.x,n.x,r?r.originX:void 0),p0(e.y,t.y,n.y,r?r.originY:void 0)}function g0(e,t,n){e.min=n.min+t.min,e.max=e.min+Tt(t)}function HF(e,t,n){g0(e.x,t.x,n.x),g0(e.y,t.y,n.y)}function x0(e,t,n){e.min=t.min-n.min,e.max=e.min+Tt(t)}function Mo(e,t,n){x0(e.x,t.x,n.x),x0(e.y,t.y,n.y)}function rn(e){return[e("x"),e("y")]}const n2=({current:e})=>e?e.ownerDocument.defaultView:null,y0=(e,t)=>Math.abs(e-t);function qF(e,t){const n=y0(e.x,t.x),r=y0(e.y,t.y);return Math.sqrt(n**2+r**2)}class r2{constructor(t,n,{transformPagePoint:r,contextWindow:i=window,dragSnapToOrigin:a=!1,distanceThreshold:o=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const f=uf(this.lastMoveEventInfo,this.history),m=this.startEvent!==null,b=qF(f.offset,{x:0,y:0})>=this.distanceThreshold;if(!m&&!b)return;const{point:g}=f,{timestamp:v}=lt;this.history.push({...g,timestamp:v});const{onStart:x,onMove:y}=this.handlers;m||(x&&x(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,f)},this.handlePointerMove=(f,m)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=cf(m,this.transformPagePoint),ke.update(this.updatePoint,!0)},this.handlePointerUp=(f,m)=>{this.end();const{onEnd:b,onSessionEnd:g,resumeAnimation:v}=this.handlers;if(this.dragSnapToOrigin&&v&&v(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const x=uf(f.type==="pointercancel"?this.lastMoveEventInfo:cf(m,this.transformPagePoint),this.history);this.startEvent&&b&&b(f,x),g&&g(f,x)},!ug(t))return;this.dragSnapToOrigin=a,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=o,this.contextWindow=i||window;const l=Rl(t),c=cf(l,this.transformPagePoint),{point:u}=c,{timestamp:d}=lt;this.history=[{...u,timestamp:d}];const{onSessionStart:h}=n;h&&h(t,uf(c,this.history)),this.removeListeners=Tl(Ro(this.contextWindow,"pointermove",this.handlePointerMove),Ro(this.contextWindow,"pointerup",this.handlePointerUp),Ro(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),_n(this.updatePoint)}}function cf(e,t){return t?{point:t(e.point)}:e}function v0(e,t){return{x:e.x-t.x,y:e.y-t.y}}function uf({point:e},t){return{point:e,delta:v0(e,s2(t)),offset:v0(e,KF(t)),velocity:QF(t,.1)}}function KF(e){return e[0]}function s2(e){return e[e.length-1]}function QF(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=s2(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>rr(t)));)n--;if(!r)return{x:0,y:0};const a=un(i.timestamp-r.timestamp);if(a===0)return{x:0,y:0};const o={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function GF(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Be(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Be(n,e,r.max):Math.min(e,n)),e}function b0(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function YF(e,{top:t,left:n,bottom:r,right:i}){return{x:b0(e.x,n,i),y:b0(e.y,t,r)}}function w0(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function XF(e,t){return{x:w0(e.x,t.x),y:w0(e.y,t.y)}}function ZF(e,t){let n=.5;const r=Tt(e),i=Tt(t);return i>r?n=Ma(t.min,t.max-r,e.min):r>i&&(n=Ma(e.min,e.max-i,t.min)),ar(0,1,n)}function JF(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const dm=.35;function eL(e=dm){return e===!1?e=0:e===!0&&(e=dm),{x:j0(e,"left","right"),y:j0(e,"top","bottom")}}function j0(e,t,n){return{min:N0(e,t),max:N0(e,n)}}function N0(e,t){return typeof e=="number"?e:e[t]||0}const tL=new WeakMap;class nL{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Ge(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const a=h=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Rl(h).point)},o=(h,f)=>{const{drag:m,dragPropagation:b,onDragStart:g}=this.getProps();if(m&&!b&&(this.openDragLock&&this.openDragLock(),this.openDragLock=ZD(m),!this.openDragLock))return;this.latestPointerEvent=h,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),rn(x=>{let y=this.getAxisMotionValue(x).get()||0;if(sr.test(y)){const{projection:w}=this.visualElement;if(w&&w.layout){const j=w.layout.layoutBox[x];j&&(y=Tt(j)*(parseFloat(y)/100))}}this.originPoint[x]=y}),g&&ke.postRender(()=>g(h,f)),cm(this.visualElement,"transform");const{animationState:v}=this.visualElement;v&&v.setActive("whileDrag",!0)},l=(h,f)=>{this.latestPointerEvent=h,this.latestPanInfo=f;const{dragPropagation:m,dragDirectionLock:b,onDirectionLock:g,onDrag:v}=this.getProps();if(!m&&!this.openDragLock)return;const{offset:x}=f;if(b&&this.currentDirection===null){this.currentDirection=rL(x),this.currentDirection!==null&&g&&g(this.currentDirection);return}this.updateAxis("x",f.point,x),this.updateAxis("y",f.point,x),this.visualElement.render(),v&&v(h,f)},c=(h,f)=>{this.latestPointerEvent=h,this.latestPanInfo=f,this.stop(h,f),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>rn(h=>{var f;return this.getAnimationState(h)==="paused"&&((f=this.getAxisMotionValue(h).animation)==null?void 0:f.play())}),{dragSnapToOrigin:d}=this.getProps();this.panSession=new r2(t,{onSessionStart:a,onStart:o,onMove:l,onSessionEnd:c,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:d,distanceThreshold:r,contextWindow:n2(this.visualElement)})}stop(t,n){const r=t||this.latestPointerEvent,i=n||this.latestPanInfo,a=this.isDragging;if(this.cancel(),!a||!i||!r)return;const{velocity:o}=i;this.startAnimation(o);const{onDragEnd:l}=this.getProps();l&&ke.postRender(()=>l(r,i))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!cc(t,i,this.currentDirection))return;const a=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=GF(o,this.constraints[t],this.elastic[t])),a.set(o)}resolveConstraints(){var a;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(a=this.visualElement.projection)==null?void 0:a.layout,i=this.constraints;t&&Gi(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=YF(r.layoutBox,t):this.constraints=!1,this.elastic=eL(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&rn(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=JF(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Gi(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const a=sF(r,i.root,this.visualElement.getTransformPagePoint());let o=XF(i.layout.layoutBox,a);if(n){const l=n(tF(o));this.hasMutatedConstraints=!!l,l&&(o=$N(l))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:a,dragSnapToOrigin:o,onDragTransitionEnd:l}=this.getProps(),c=this.constraints||{},u=rn(d=>{if(!cc(d,n,this.currentDirection))return;let h=c&&c[d]||{};o&&(h={min:0,max:0});const f=i?200:1e6,m=i?40:1e7,b={type:"inertia",velocity:r?t[d]:0,bounceStiffness:f,bounceDamping:m,timeConstant:750,restDelta:1,restSpeed:10,...a,...h};return this.startAxisValueAnimation(d,b)});return Promise.all(u).then(l)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return cm(this.visualElement,t),r.start(bg(t,r,0,n,this.visualElement,!1))}stopAnimation(){rn(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){rn(t=>{var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){rn(n=>{const{drag:r}=this.getProps();if(!cc(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,a=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:l}=i.layout.layoutBox[n];a.set(t[n]-Be(o,l,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Gi(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};rn(o=>{const l=this.getAxisMotionValue(o);if(l&&this.constraints!==!1){const c=l.get();i[o]=ZF({min:c,max:c},this.constraints[o])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),rn(o=>{if(!cc(o,t,null))return;const l=this.getAxisMotionValue(o),{min:c,max:u}=this.constraints[o];l.set(Be(c,u,i[o]))})}addListeners(){if(!this.visualElement.current)return;tL.set(this.visualElement,this);const t=this.visualElement.current,n=Ro(t,"pointerdown",c=>{const{drag:u,dragListener:d=!0}=this.getProps();u&&d&&this.start(c)}),r=()=>{const{dragConstraints:c}=this.getProps();Gi(c)&&c.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,a=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),ke.read(r);const o=dl(window,"resize",()=>this.scalePositionWithinConstraints()),l=i.addEventListener("didUpdate",({delta:c,hasLayoutChanged:u})=>{this.isDragging&&u&&(rn(d=>{const h=this.getAxisMotionValue(d);h&&(this.originPoint[d]+=c[d].translate,h.set(h.get()+c[d].translate))}),this.visualElement.render())});return()=>{o(),n(),a(),l&&l()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:a=!1,dragElastic:o=dm,dragMomentum:l=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:a,dragElastic:o,dragMomentum:l}}}function cc(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function rL(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class sL extends As{constructor(t){super(t),this.removeGroupControls=Ut,this.removeListeners=Ut,this.controls=new nL(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ut}unmount(){this.removeGroupControls(),this.removeListeners()}}const C0=e=>(t,n)=>{e&&ke.postRender(()=>e(t,n))};class iL extends As{constructor(){super(...arguments),this.removePointerDownListener=Ut}onPointerDown(t){this.session=new r2(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:n2(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:C0(t),onStart:C0(n),onMove:r,onEnd:(a,o)=>{delete this.session,i&&ke.postRender(()=>i(a,o))}}}mount(){this.removePointerDownListener=Ro(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Oc={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function S0(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const io={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(le.test(e))e=parseFloat(e);else return e;const n=S0(e,t.target.x),r=S0(e,t.target.y);return`${n}% ${r}%`}},aL={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=ks.parse(e);if(i.length>5)return r;const a=ks.createTransformer(e),o=typeof i[0]!="number"?1:0,l=n.x.scale*t.x,c=n.y.scale*t.y;i[0+o]/=l,i[1+o]/=c;const u=Be(l,c,.5);return typeof i[2+o]=="number"&&(i[2+o]/=u),typeof i[3+o]=="number"&&(i[3+o]/=u),a(i)}};let df=!1;class oL extends p.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:a}=t;PM(lL),a&&(n.group&&n.group.add(a),r&&r.register&&i&&r.register(a),df&&a.root.didUpdate(),a.addEventListener("animationComplete",()=>{this.safeToRemove()}),a.setOptions({...a.options,onExitComplete:()=>this.safeToRemove()})),Oc.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:a}=this.props,{projection:o}=r;return o&&(o.isPresent=a,df=!0,i||t.layoutDependency!==n||n===void 0||t.isPresent!==a?o.willUpdate():this.safeToRemove(),t.isPresent!==a&&(a?o.promote():o.relegate()||ke.postRender(()=>{const l=o.getStack();(!l||!l.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),cg.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;df=!0,i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function i2(e){const[t,n]=EN(),r=p.useContext(Vp);return s.jsx(oL,{...e,layoutGroup:r,switchLayoutGroup:p.useContext(VN),isPresent:t,safeToRemove:n})}const lL={borderRadius:{...io,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:io,borderTopRightRadius:io,borderBottomLeftRadius:io,borderBottomRightRadius:io,boxShadow:aL};function cL(e,t,n){const r=wt(e)?e:An(e);return r.start(bg("",r,t,n)),r.animation}const uL=(e,t)=>e.depth-t.depth;class dL{constructor(){this.children=[],this.isDirty=!1}add(t){$p(this.children,t),this.isDirty=!0}remove(t){Bp(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(uL),this.isDirty=!1,this.children.forEach(t)}}function fL(e,t){const n=Vt.now(),r=({timestamp:i})=>{const a=i-n;a>=t&&(_n(r),e(a-t))};return ke.setup(r,!0),()=>_n(r)}const a2=["TopLeft","TopRight","BottomLeft","BottomRight"],hL=a2.length,k0=e=>typeof e=="string"?parseFloat(e):e,E0=e=>typeof e=="number"||le.test(e);function mL(e,t,n,r,i,a){i?(e.opacity=Be(0,n.opacity??1,pL(r)),e.opacityExit=Be(t.opacity??1,0,gL(r))):a&&(e.opacity=Be(t.opacity??1,n.opacity??1,r));for(let o=0;o<hL;o++){const l=`border${a2[o]}Radius`;let c=T0(t,l),u=T0(n,l);if(c===void 0&&u===void 0)continue;c||(c=0),u||(u=0),c===0||u===0||E0(c)===E0(u)?(e[l]=Math.max(Be(k0(c),k0(u),r),0),(sr.test(u)||sr.test(c))&&(e[l]+="%")):e[l]=u}(t.rotate||n.rotate)&&(e.rotate=Be(t.rotate||0,n.rotate||0,r))}function T0(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const pL=o2(0,.5,Hj),gL=o2(.5,.95,Ut);function o2(e,t,n){return r=>r<e?0:r>t?1:n(Ma(e,t,r))}function P0(e,t){e.min=t.min,e.max=t.max}function nn(e,t){P0(e.x,t.x),P0(e.y,t.y)}function A0(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function R0(e,t,n,r,i){return e-=t,e=Su(e,1/n,r),i!==void 0&&(e=Su(e,1/i,r)),e}function xL(e,t=0,n=1,r=.5,i,a=e,o=e){if(sr.test(t)&&(t=parseFloat(t),t=Be(o.min,o.max,t/100)-o.min),typeof t!="number")return;let l=Be(a.min,a.max,r);e===a&&(l-=t),e.min=R0(e.min,t,n,l,i),e.max=R0(e.max,t,n,l,i)}function D0(e,t,[n,r,i],a,o){xL(e,t[n],t[r],t[i],t.scale,a,o)}const yL=["x","scaleX","originX"],vL=["y","scaleY","originY"];function M0(e,t,n,r){D0(e.x,t,yL,n?n.x:void 0,r?r.x:void 0),D0(e.y,t,vL,n?n.y:void 0,r?r.y:void 0)}function F0(e){return e.translate===0&&e.scale===1}function l2(e){return F0(e.x)&&F0(e.y)}function L0(e,t){return e.min===t.min&&e.max===t.max}function bL(e,t){return L0(e.x,t.x)&&L0(e.y,t.y)}function O0(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function c2(e,t){return O0(e.x,t.x)&&O0(e.y,t.y)}function I0(e){return Tt(e.x)/Tt(e.y)}function _0(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class wL{constructor(){this.members=[]}add(t){$p(this.members,t),t.scheduleRender()}remove(t){if(Bp(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const a=this.members[i];if(a.isPresent!==!1){r=a;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function jL(e,t,n){let r="";const i=e.x.translate/t.x,a=e.y.translate/t.y,o=(n==null?void 0:n.z)||0;if((i||a||o)&&(r=`translate3d(${i}px, ${a}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:d,rotateX:h,rotateY:f,skewX:m,skewY:b}=n;u&&(r=`perspective(${u}px) ${r}`),d&&(r+=`rotate(${d}deg) `),h&&(r+=`rotateX(${h}deg) `),f&&(r+=`rotateY(${f}deg) `),m&&(r+=`skewX(${m}deg) `),b&&(r+=`skewY(${b}deg) `)}const l=e.x.scale*t.x,c=e.y.scale*t.y;return(l!==1||c!==1)&&(r+=`scale(${l}, ${c})`),r||"none"}const ff=["","X","Y","Z"],NL=1e3;let CL=0;function hf(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function u2(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=GN(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:a}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",ke,!(i||a))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&u2(r)}function d2({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(o={},l=t==null?void 0:t()){this.id=CL++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(EL),this.nodes.forEach(RL),this.nodes.forEach(DL),this.nodes.forEach(TL)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new dL)}addEventListener(o,l){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new Wp),this.eventHandlers.get(o).add(l)}notifyListeners(o,...l){const c=this.eventHandlers.get(o);c&&c.notify(...l)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=dg(o)&&!hM(o),this.instance=o;const{layoutId:l,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(c||l)&&(this.isLayoutDirty=!0),e){let d,h=0;const f=()=>this.root.updateBlockedByResize=!1;ke.read(()=>{h=window.innerWidth}),e(o,()=>{const m=window.innerWidth;m!==h&&(h=m,this.root.updateBlockedByResize=!0,d&&d(),d=fL(f,250),Oc.hasAnimatedSinceResize&&(Oc.hasAnimatedSinceResize=!1,this.nodes.forEach($0)))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:h,hasRelativeLayoutChanged:f,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const b=this.options.transition||u.getDefaultTransition()||IL,{onLayoutAnimationStart:g,onLayoutAnimationComplete:v}=u.getProps(),x=!this.targetLayout||!c2(this.targetLayout,m),y=!h&&f;if(this.options.layoutRoot||this.resumeFrom||y||h&&(x||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const w={...ig(b,"layout"),onPlay:g,onComplete:v};(u.shouldReduceMotion||this.options.layoutRoot)&&(w.delay=0,w.type=!1),this.startAnimation(w),this.setAnimationOrigin(d,y)}else h||$0(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),_n(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(ML),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&u2(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d<this.path.length;d++){const h=this.path[d];h.shouldResetTransform=!0,h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:l,layout:c}=this.options;if(l===void 0&&!c)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(V0);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(z0);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(AL),this.nodes.forEach(SL),this.nodes.forEach(kL)):this.nodes.forEach(z0),this.clearAllSnapshots();const l=Vt.now();lt.delta=ar(0,1e3/60,l-lt.timestamp),lt.timestamp=l,lt.isProcessing=!0,Jd.update.process(lt),Jd.preRender.process(lt),Jd.render.process(lt),lt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,cg.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(PL),this.sharedNodes.forEach(FL)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ke.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ke.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Tt(this.snapshot.measuredBox.x)&&!Tt(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c<this.path.length;c++)this.path[c].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Ge(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:l}=this.options;l&&l.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let l=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(l=!1),l&&this.instance){const c=r(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!i)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,l=this.projectionDelta&&!l2(this.projectionDelta),c=this.getTransformTemplate(),u=c?c(this.latestValues,""):void 0,d=u!==this.prevTransformTemplateValue;o&&this.instance&&(l||Us(this.latestValues)||d)&&(i(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const l=this.measurePageBox();let c=this.removeElementScroll(l);return o&&(c=this.removeTransform(c)),_L(c),{animationId:this.root.animationId,measuredBox:l,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){var u;const{visualElement:o}=this.options;if(!o)return Ge();const l=o.measureViewportBox();if(!(((u=this.scroll)==null?void 0:u.wasRoot)||this.path.some(VL))){const{scroll:d}=this.root;d&&(Yi(l.x,d.offset.x),Yi(l.y,d.offset.y))}return l}removeElementScroll(o){var c;const l=Ge();if(nn(l,o),(c=this.scroll)!=null&&c.wasRoot)return l;for(let u=0;u<this.path.length;u++){const d=this.path[u],{scroll:h,options:f}=d;d!==this.root&&h&&f.layoutScroll&&(h.wasRoot&&nn(l,o),Yi(l.x,h.offset.x),Yi(l.y,h.offset.y))}return l}applyTransform(o,l=!1){const c=Ge();nn(c,o);for(let u=0;u<this.path.length;u++){const d=this.path[u];!l&&d.options.layoutScroll&&d.scroll&&d!==d.root&&Xi(c,{x:-d.scroll.offset.x,y:-d.scroll.offset.y}),Us(d.latestValues)&&Xi(c,d.latestValues)}return Us(this.latestValues)&&Xi(c,this.latestValues),c}removeTransform(o){const l=Ge();nn(l,o);for(let c=0;c<this.path.length;c++){const u=this.path[c];if(!u.instance||!Us(u.latestValues))continue;im(u.latestValues)&&u.updateSnapshot();const d=Ge(),h=u.measurePageBox();nn(d,h),M0(l,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,d)}return Us(this.latestValues)&&M0(l,this.latestValues),l}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==lt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var f;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==l;if(!(o||c&&this.isSharedProjectionDirty||this.isProjectionDirty||(f=this.parent)!=null&&f.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:h}=this.options;if(!(!this.layout||!(d||h))){if(this.resolvedRelativeTargetAt=lt.timestamp,!this.targetDelta&&!this.relativeTarget){const m=this.getClosestProjectingParent();m&&m.layout&&this.animationProgress!==1?(this.relativeParent=m,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ge(),this.relativeTargetOrigin=Ge(),Mo(this.relativeTargetOrigin,this.layout.layoutBox,m.layout.layoutBox),nn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Ge(),this.targetWithTransforms=Ge()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),HF(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):nn(this.target,this.layout.layoutBox),UN(this.target,this.targetDelta)):nn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const m=this.getClosestProjectingParent();m&&!!m.resumingFrom==!!this.resumingFrom&&!m.options.layoutScroll&&m.target&&this.animationProgress!==1?(this.relativeParent=m,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ge(),this.relativeTargetOrigin=Ge(),Mo(this.relativeTargetOrigin,this.target,m.target),nn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||im(this.parent.latestValues)||BN(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var b;const o=this.getLead(),l=!!this.resumingFrom||this!==o;let c=!0;if((this.isProjectionDirty||(b=this.parent)!=null&&b.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===lt.timestamp&&(c=!1),c)return;const{layout:u,layoutId:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||d))return;nn(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,f=this.treeScale.y;rF(this.layoutCorrected,this.treeScale,this.path,l),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=Ge());const{target:m}=o;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(A0(this.prevProjectionDelta.x,this.projectionDelta.x),A0(this.prevProjectionDelta.y,this.projectionDelta.y)),Do(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==f||!_0(this.projectionDelta.x,this.prevProjectionDelta.x)||!_0(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var l;if((l=this.options.visualElement)==null||l.scheduleRender(),o){const c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Zi(),this.projectionDelta=Zi(),this.projectionDeltaWithTransform=Zi()}setAnimationOrigin(o,l=!1){const c=this.snapshot,u=c?c.latestValues:{},d={...this.latestValues},h=Zi();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!l;const f=Ge(),m=c?c.source:void 0,b=this.layout?this.layout.source:void 0,g=m!==b,v=this.getStack(),x=!v||v.members.length<=1,y=!!(g&&!x&&this.options.crossfade===!0&&!this.path.some(OL));this.animationProgress=0;let w;this.mixTargetDelta=j=>{const C=j/1e3;B0(h.x,o.x,C),B0(h.y,o.y,C),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Mo(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),LL(this.relativeTarget,this.relativeTargetOrigin,f,C),w&&bL(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=Ge()),nn(w,this.relativeTarget)),g&&(this.animationValues=d,mL(d,u,this.latestValues,C,y,x)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=C},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){var l,c,u;this.notifyListeners("animationStart"),(l=this.currentAnimation)==null||l.stop(),(u=(c=this.resumingFrom)==null?void 0:c.currentAnimation)==null||u.stop(),this.pendingAnimation&&(_n(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ke.update(()=>{Oc.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=An(0)),this.currentAnimation=cL(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:d=>{this.mixTargetDelta(d),o.onUpdate&&o.onUpdate(d)},onStop:()=>{},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(NL),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:l,target:c,layout:u,latestValues:d}=o;if(!(!l||!c||!u)){if(this!==o&&this.layout&&u&&f2(this.options.animationType,this.layout.layoutBox,u.layoutBox)){c=this.target||Ge();const h=Tt(this.layout.layoutBox.x);c.x.min=o.target.x.min,c.x.max=c.x.min+h;const f=Tt(this.layout.layoutBox.y);c.y.min=o.target.y.min,c.y.max=c.y.min+f}nn(l,c),Xi(l,d),Do(this.projectionDeltaWithTransform,this.layoutCorrected,l,d)}}registerSharedNode(o,l){this.sharedNodes.has(o)||this.sharedNodes.set(o,new wL),this.sharedNodes.get(o).add(l);const u=l.options.initialPromotionConfig;l.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(l):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var l;const{layoutId:o}=this.options;return o?((l=this.getStack())==null?void 0:l.lead)||this:this}getPrevLead(){var l;const{layoutId:o}=this.options;return o?(l=this.getStack())==null?void 0:l.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:l,preserveFollowOpacity:c}={}){const u=this.getStack();u&&u.promote(this,c),o&&(this.projectionDelta=void 0,this.needsReset=!0),l&&this.setOptions({transition:l})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let l=!1;const{latestValues:c}=o;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(l=!0),!l)return;const u={};c.z&&hf("z",o,u,this.animationValues);for(let d=0;d<ff.length;d++)hf(`rotate${ff[d]}`,o,u,this.animationValues),hf(`skew${ff[d]}`,o,u,this.animationValues);o.render();for(const d in u)o.setStaticValue(d,u[d]),this.animationValues&&(this.animationValues[d]=u[d]);o.scheduleRender()}applyProjectionStyles(o,l){if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const c=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=Lc(l==null?void 0:l.pointerEvents)||"",o.transform=c?c(this.latestValues,""):"none";return}const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=Lc(l==null?void 0:l.pointerEvents)||""),this.hasProjected&&!Us(this.latestValues)&&(o.transform=c?c({},""):"none",this.hasProjected=!1);return}o.visibility="";const d=u.animationValues||u.latestValues;this.applyTransformsToTarget();let h=jL(this.projectionDeltaWithTransform,this.treeScale,d);c&&(h=c(d,h)),o.transform=h;const{x:f,y:m}=this.projectionDelta;o.transformOrigin=`${f.origin*100}% ${m.origin*100}% 0`,u.animationValues?o.opacity=u===this?d.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:o.opacity=u===this?d.opacity!==void 0?d.opacity:"":d.opacityExit!==void 0?d.opacityExit:0;for(const b in ul){if(d[b]===void 0)continue;const{correct:g,applyTo:v,isCSSVariable:x}=ul[b],y=h==="none"?d[b]:g(d[b],u);if(v){const w=v.length;for(let j=0;j<w;j++)o[v[j]]=y}else x?this.options.visualElement.renderState.vars[b]=y:o[b]=y}this.options.layoutId&&(o.pointerEvents=u===this?Lc(l==null?void 0:l.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var l;return(l=o.currentAnimation)==null?void 0:l.stop()}),this.root.nodes.forEach(V0),this.root.sharedNodes.clear()}}}function SL(e){e.updateLayout()}function kL(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=e.layout,{animationType:a}=e.options,o=t.source!==e.layout.source;a==="size"?rn(h=>{const f=o?t.measuredBox[h]:t.layoutBox[h],m=Tt(f);f.min=r[h].min,f.max=f.min+m}):f2(a,t.layoutBox,r)&&rn(h=>{const f=o?t.measuredBox[h]:t.layoutBox[h],m=Tt(r[h]);f.max=f.min+m,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[h].max=e.relativeTarget[h].min+m)});const l=Zi();Do(l,r,t.layoutBox);const c=Zi();o?Do(c,e.applyTransform(i,!0),t.measuredBox):Do(c,r,t.layoutBox);const u=!l2(l);let d=!1;if(!e.resumeFrom){const h=e.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:f,layout:m}=h;if(f&&m){const b=Ge();Mo(b,t.layoutBox,f.layoutBox);const g=Ge();Mo(g,r,m.layoutBox),c2(b,g)||(d=!0),h.options.layoutRoot&&(e.relativeTarget=g,e.relativeTargetOrigin=b,e.relativeParent=h)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:c,layoutDelta:l,hasLayoutChanged:u,hasRelativeLayoutChanged:d})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function EL(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function TL(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function PL(e){e.clearSnapshot()}function V0(e){e.clearMeasurements()}function z0(e){e.isLayoutDirty=!1}function AL(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function $0(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function RL(e){e.resolveTargetDelta()}function DL(e){e.calcProjection()}function ML(e){e.resetSkewAndRotation()}function FL(e){e.removeLeadSnapshot()}function B0(e,t,n){e.translate=Be(t.translate,0,n),e.scale=Be(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function U0(e,t,n,r){e.min=Be(t.min,n.min,r),e.max=Be(t.max,n.max,r)}function LL(e,t,n,r){U0(e.x,t.x,n.x,r),U0(e.y,t.y,n.y,r)}function OL(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const IL={duration:.45,ease:[.4,0,.1,1]},W0=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),H0=W0("applewebkit/")&&!W0("chrome/")?Math.round:Ut;function q0(e){e.min=H0(e.min),e.max=H0(e.max)}function _L(e){q0(e.x),q0(e.y)}function f2(e,t,n){return e==="position"||e==="preserve-aspect"&&!WF(I0(t),I0(n),.2)}function VL(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const zL=d2({attachResizeListener:(e,t)=>dl(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),mf={current:void 0},h2=d2({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!mf.current){const e=new zL({});e.mount(window),e.setOptions({layoutScroll:!0}),mf.current=e}return mf.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),$L={pan:{Feature:iL},drag:{Feature:sL,ProjectionNode:h2,MeasureLayout:i2}};function K0(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,a=r[i];a&&ke.postRender(()=>a(t,Rl(t)))}class BL extends As{mount(){const{current:t}=this.node;t&&(this.unmount=JD(t,(n,r)=>(K0(this.node,r,"Start"),i=>K0(this.node,i,"End"))))}unmount(){}}class UL extends As{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Tl(dl(this.node.current,"focus",()=>this.onFocus()),dl(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Q0(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),a=r[i];a&&ke.postRender(()=>a(t,Rl(t)))}class WL extends As{mount(){const{current:t}=this.node;t&&(this.unmount=rM(t,(n,r)=>(Q0(this.node,r,"Start"),(i,{success:a})=>Q0(this.node,i,a?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const fm=new WeakMap,pf=new WeakMap,HL=e=>{const t=fm.get(e.target);t&&t(e)},qL=e=>{e.forEach(HL)};function KL({root:e,...t}){const n=e||document;pf.has(n)||pf.set(n,{});const r=pf.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(qL,{root:e,...t})),r[i]}function QL(e,t,n){const r=KL(t);return fm.set(e,n),r.observe(e),()=>{fm.delete(e),r.unobserve(e)}}const GL={some:0,all:1};class YL extends As{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:a}=t,o={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:GL[i]},l=c=>{const{isIntersecting:u}=c;if(this.isInView===u||(this.isInView=u,a&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:d,onViewportLeave:h}=this.node.getProps(),f=u?d:h;f&&f(c)};return QL(this.node.current,o,l)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(XL(t,n))&&this.startObserver()}unmount(){}}function XL({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const ZL={inView:{Feature:YL},tap:{Feature:WL},focus:{Feature:UL},hover:{Feature:BL}},JL={layout:{ProjectionNode:h2,MeasureLayout:i2}},e3={..._F,...ZL,...$L,...JL},M=eF(e3,hF);function t3(e,t,n){p.useInsertionEffect(()=>e.on(t,n),[e,t,n])}const n3=50,G0=()=>({current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}),r3=()=>({time:0,x:G0(),y:G0()}),s3={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function Y0(e,t,n,r){const i=n[t],{length:a,position:o}=s3[t],l=i.current,c=n.time;i.current=e[`scroll${o}`],i.scrollLength=e[`scroll${a}`]-e[`client${a}`],i.offset.length=0,i.offset[0]=0,i.offset[1]=i.scrollLength,i.progress=Ma(0,i.scrollLength,i.current);const u=r-c;i.velocity=u>n3?0:Hp(i.current-l,u)}function i3(e,t,n){Y0(e,"x",t,n),Y0(e,"y",t,n),t.time=n}function a3(e,t){const n={x:0,y:0};let r=e;for(;r&&r!==t;)if(lg(r))n.x+=r.offsetLeft,n.y+=r.offsetTop,r=r.offsetParent;else if(r.tagName==="svg"){const i=r.getBoundingClientRect();r=r.parentElement;const a=r.getBoundingClientRect();n.x+=i.left-a.left,n.y+=i.top-a.top}else if(r instanceof SVGGraphicsElement){const{x:i,y:a}=r.getBBox();n.x+=i,n.y+=a;let o=null,l=r.parentNode;for(;!o;)l.tagName==="svg"&&(o=l),l=r.parentNode;r=o}else break;return n}const hm={start:0,center:.5,end:1};function X0(e,t,n=0){let r=0;if(e in hm&&(e=hm[e]),typeof e=="string"){const i=parseFloat(e);e.endsWith("px")?r=i:e.endsWith("%")?e=i/100:e.endsWith("vw")?r=i/100*document.documentElement.clientWidth:e.endsWith("vh")?r=i/100*document.documentElement.clientHeight:e=i}return typeof e=="number"&&(r=t*e),n+r}const o3=[0,0];function l3(e,t,n,r){let i=Array.isArray(e)?e:o3,a=0,o=0;return typeof e=="number"?i=[e,e]:typeof e=="string"&&(e=e.trim(),e.includes(" ")?i=e.split(" "):i=[e,hm[e]?e:"0"]),a=X0(i[0],n,r),o=X0(i[1],t),a-o}const c3={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},u3={x:0,y:0};function d3(e){return"getBBox"in e&&e.tagName!=="svg"?e.getBBox():{width:e.clientWidth,height:e.clientHeight}}function f3(e,t,n){const{offset:r=c3.All}=n,{target:i=e,axis:a="y"}=n,o=a==="y"?"height":"width",l=i!==e?a3(i,e):u3,c=i===e?{width:e.scrollWidth,height:e.scrollHeight}:d3(i),u={width:e.clientWidth,height:e.clientHeight};t[a].offset.length=0;let d=!t[a].interpolate;const h=r.length;for(let f=0;f<h;f++){const m=l3(r[f],u[o],c[o],l[a]);!d&&m!==t[a].interpolatorOffsets[f]&&(d=!0),t[a].offset[f]=m}d&&(t[a].interpolate=eg(t[a].offset,aN(r),{clamp:!1}),t[a].interpolatorOffsets=[...t[a].offset]),t[a].progress=ar(0,1,t[a].interpolate(t[a].current))}function h3(e,t=e,n){if(n.x.targetOffset=0,n.y.targetOffset=0,t!==e){let r=t;for(;r&&r!==e;)n.x.targetOffset+=r.offsetLeft,n.y.targetOffset+=r.offsetTop,r=r.offsetParent}n.x.targetLength=t===e?t.scrollWidth:t.clientWidth,n.y.targetLength=t===e?t.scrollHeight:t.clientHeight,n.x.containerLength=e.clientWidth,n.y.containerLength=e.clientHeight}function m3(e,t,n,r={}){return{measure:i=>{h3(e,r.target,n),i3(e,n,i),(r.offset||r.target)&&f3(e,n,r)},notify:()=>t(n)}}const ao=new WeakMap,Z0=new WeakMap,gf=new WeakMap,J0=e=>e===document.scrollingElement?window:e;function m2(e,{container:t=document.scrollingElement,...n}={}){if(!t)return Ut;let r=gf.get(t);r||(r=new Set,gf.set(t,r));const i=r3(),a=m3(t,e,i,n);if(r.add(a),!ao.has(t)){const l=()=>{for(const h of r)h.measure(lt.timestamp);ke.preUpdate(c)},c=()=>{for(const h of r)h.notify()},u=()=>ke.read(l);ao.set(t,u);const d=J0(t);window.addEventListener("resize",u,{passive:!0}),t!==document.documentElement&&Z0.set(t,fM(t,u)),d.addEventListener("scroll",u,{passive:!0}),u()}const o=ao.get(t);return ke.read(o,!1,!0),()=>{var u;_n(o);const l=gf.get(t);if(!l||(l.delete(a),l.size))return;const c=ao.get(t);ao.delete(t),c&&(J0(t).removeEventListener("scroll",c),(u=Z0.get(t))==null||u(),window.removeEventListener("resize",c))}}const ev=new Map;function p3(e){const t={value:0},n=m2(r=>{t.value=r[e.axis].progress*100},e);return{currentTime:t,cancel:n}}function p2({source:e,container:t,...n}){const{axis:r}=n;e&&(t=e);const i=ev.get(t)??new Map;ev.set(t,i);const a=n.target??"self",o=i.get(a)??{},l=r+(n.offset??[]).join(",");return o[l]||(o[l]=!n.target&&uN()?new ScrollTimeline({source:t,axis:r}):p3({container:t,...n})),o[l]}function g3(e,t){const n=p2(t);return e.attachTimeline({timeline:t.target?void 0:n,observe:r=>(r.pause(),kN(i=>{r.time=r.iterationDuration*i},n))})}function x3(e){return e.length===2}function y3(e,t){return x3(e)?m2(n=>{e(n[t.axis].progress,n)},t):kN(e,p2(t))}function v3(e,{axis:t="y",container:n=document.scrollingElement,...r}={}){if(!n)return Ut;const i={axis:t,container:n,...r};return typeof e=="function"?y3(e,i):g3(e,i)}const b3=()=>({scrollX:An(0),scrollY:An(0),scrollXProgress:An(0),scrollYProgress:An(0)}),uc=e=>e?!e.current:!1;function g2({container:e,target:t,...n}={}){const r=Wa(b3),i=p.useRef(null),a=p.useRef(!1),o=p.useCallback(()=>(i.current=v3((l,{x:c,y:u})=>{r.scrollX.set(c.current),r.scrollXProgress.set(c.progress),r.scrollY.set(u.current),r.scrollYProgress.set(u.progress)},{...n,container:(e==null?void 0:e.current)||void 0,target:(t==null?void 0:t.current)||void 0}),()=>{var l;(l=i.current)==null||l.call(i)}),[e,t,JSON.stringify(n.offset)]);return id(()=>{if(a.current=!1,uc(e)||uc(t)){a.current=!0;return}else return o()},[o]),p.useEffect(()=>{if(a.current)return Da(!uc(e)),Da(!uc(t)),o()},[o]),r}function w3(e){const t=Wa(()=>An(e)),{isStatic:n}=p.useContext(od);if(n){const[,r]=p.useState(e);p.useEffect(()=>t.on("change",r),[])}return t}function x2(e,t){const n=w3(t()),r=()=>n.set(t());return r(),id(()=>{const i=()=>ke.preRender(r,!1,!0),a=e.map(o=>o.on("change",i));return()=>{a.forEach(o=>o()),_n(r)}}),n}function j3(e){Ao.current=[],e();const t=x2(Ao.current,e);return Ao.current=void 0,t}function tv(e,t,n,r){if(typeof e=="function")return j3(e);const i=typeof t=="function"?t:mM(t,n,r);return Array.isArray(e)?nv(e,i):nv([e],([a])=>i(a))}function nv(e,t){const n=Wa(()=>[]);return x2(e,()=>{n.length=0;const r=e.length;for(let i=0;i<r;i++)n[i]=e[i].get();return t(n)})}const N3={some:0,all:1};function C3(e,t,{root:n,margin:r,amount:i="some"}={}){const a=og(e),o=new WeakMap,l=u=>{u.forEach(d=>{const h=o.get(d.target);if(d.isIntersecting!==!!h)if(d.isIntersecting){const f=t(d.target,d);typeof f=="function"?o.set(d.target,f):c.unobserve(d.target)}else typeof h=="function"&&(h(d),o.delete(d.target))})},c=new IntersectionObserver(l,{root:n,rootMargin:r,threshold:typeof i=="number"?i:N3[i]});return a.forEach(u=>c.observe(u)),()=>c.disconnect()}function S3(e,{root:t,margin:n,amount:r,once:i=!1,initial:a=!1}={}){const[o,l]=p.useState(a);return p.useEffect(()=>{if(!e.current||i&&o)return;const c=()=>(l(!0),i?void 0:()=>l(!1)),u={root:t&&t.current||void 0,margin:n,amount:r};return C3(e.current,c,u)},[t,e,n,i,r]),o}const k3=Nl("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),Q=p.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...i},a)=>{const o=r?mE:"button";return s.jsx(o,{className:ge(k3({variant:t,size:n,className:e})),ref:a,...i})});Q.displayName="Button";const Xr=p.forwardRef(({className:e,activeClassName:t,pendingClassName:n,to:r,...i},a)=>s.jsx(u5,{ref:a,to:r,className:({isActive:o,isPending:l})=>ge(e,o&&t,l&&n),...i}));Xr.displayName="NavLink";const $=p.forwardRef(({className:e,type:t,...n},r)=>s.jsx("input",{type:t,className:ge("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:r,...n}));$.displayName="Input";const E3="/cqt_logo_with_iiitd.png",Xe=()=>{const[e,t]=p.useState(!1),[n,r]=p.useState(!1),[i,a]=p.useState(""),[o,l]=p.useState(!1),[c,u]=p.useState(!1),[d,h]=p.useState(null),[f,m]=p.useState("light"),[b,g]=p.useState(0),v=p.useRef(null),x=Wt(),y=Ua(),{scrollY:w}=g2(),j=[{name:"Home",to:"/"},{name:"Research",to:"/research",dropdown:[{name:"Projects",to:"/research#projects"},{name:"Publications",to:"/publications"},{name:"Labs & Facilities",to:"/labs"}]},{name:"Education",to:"/education",dropdown:[{name:"All Programs",to:"/education"},{name:"Courses",to:"/education#courses"},{name:"Workshops & Events",to:"/workshops"}]},{name:"People",to:"/team",dropdown:[{name:"Faculty",to:"/team#faculty"},{name:"Staff",to:"/team#staff"},{name:"PhD Scholar",to:"/team#phd-scholar"}]},{name:"News",to:"/news"},{name:"Contact Us",to:"/contact"}],C=[{title:"Home",description:"Centre for Quantum Technology main page",path:"/",icon:Yr,type:"Page"},{title:"Research",description:"Our research projects and publications",path:"/research",icon:ys,type:"Page"},{title:"Education",description:"Courses, workshops, and training programs",path:"/education",icon:Yr,type:"Page"},{title:"People",description:"Our team members and faculty",path:"/team",icon:mt,type:"Page"},{title:"News",description:"Latest news and updates",path:"/news",icon:wp,type:"Page"},{title:"Publications",description:"Research publications and papers",path:"/publications",icon:Yr,type:"Page"},{title:"Labs & Facilities",description:"Our state-of-the-art laboratories and facilities",path:"/labs",icon:ys,type:"Page"},{title:"Contact Us",description:"Get in touch with us",path:"/contact",icon:xi,type:"Page"},{title:"Admin Portal",description:"Content management system for administrators",path:"/admin/login",icon:mt,type:"Portal"},{title:"Courses",description:"Academic courses in quantum technology",path:"/education#courses",icon:Yr,type:"Section"},{title:"Workshops",description:"Workshops and training events",path:"/education#workshops",icon:Yr,type:"Section"},{title:"Faculty",description:"View all faculty members",path:"/team#faculty",icon:mt,type:"Section"},{title:"Staff",description:"View all staff members",path:"/team#staff",icon:mt,type:"Section"},{title:"Projects",description:"Research projects",path:"/research#projects",icon:ys,type:"Section"}],N=i.length>0?C.filter(k=>k.title.toLowerCase().includes(i.toLowerCase())||k.description.toLowerCase().includes(i.toLowerCase())):C.slice(0,6),S=k=>{y(k),r(!1),a("")};t3(w,"change",k=>{const A=w.getPrevious()??0;l(k>50),!(window.innerWidth<1024)&&k>A&&k>150?u(!0):u(!1);const O=document.documentElement.scrollHeight-document.documentElement.clientHeight,W=k/O*100;g(W)}),p.useEffect(()=>{const k=A=>{(A.metaKey||A.ctrlKey)&&A.key==="k"&&(A.preventDefault(),r(!0),setTimeout(()=>{var z;return(z=v.current)==null?void 0:z.focus()},100)),A.key==="Escape"&&r(!1)};return window.addEventListener("keydown",k),()=>window.removeEventListener("keydown",k)},[]),p.useEffect(()=>{t(!1),h(null)},[x]),p.useEffect(()=>{const k=()=>{window.innerWidth<1024&&u(!1)};return window.addEventListener("resize",k),k(),()=>window.removeEventListener("resize",k)},[]);const T=()=>{m(f==="light"?"dark":"light"),document.documentElement.classList.toggle("dark")};return s.jsxs(s.Fragment,{children:[s.jsx("a",{href:"#main-content",className:"sr-only focus:not-sr-only focus:absolute focus:top-4 focus:left-4 focus:z-[100] focus:px-4 focus:py-2 focus:bg-primary focus:text-primary-foreground focus:rounded-md",children:"Skip to content"}),s.jsx(M.div,{className:"fixed top-0 left-0 right-0 h-1 bg-gradient-to-r from-primary via-secondary to-accent origin-left z-[60]",style:{scaleX:b/100},initial:{scaleX:0}}),s.jsx(M.nav,{variants:{visible:{y:0},hidden:{y:"-100%"}},animate:c?"hidden":"visible",transition:{duration:.3,ease:"easeInOut"},className:`fixed top-0 left-0 right-0 z-50 transition-all duration-300 ${o?"bg-background/98 backdrop-blur-md shadow-lg border-b border-border/50":"bg-background/95 backdrop-blur-sm border-b border-border"}`,children:s.jsxs("div",{className:"container mx-auto px-4",children:[s.jsxs(M.div,{animate:{height:o?"64px":"80px"},transition:{duration:.3},className:"flex items-center justify-between",children:[s.jsxs(Xr,{to:"/",className:"flex items-center gap-3 group",children:[s.jsx(M.div,{whileHover:{rotate:5,scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:10},children:s.jsx(M.img,{src:E3,alt:"CQT Logo",className:`transition-all duration-300 object-contain ${o?"h-10 w-auto":"h-12 w-auto"} group-hover:drop-shadow-[0_0_8px_rgba(59,130,246,0.5)]"`,initial:{scale:.8,opacity:0},animate:{scale:1,opacity:1},transition:{duration:.5,type:"spring"}})}),s.jsxs("div",{className:"flex flex-col",children:[s.jsx("span",{className:`font-semibold text-primary transition-all duration-300 ${o?"text-xs":"text-sm"}`,children:"Centre for"}),s.jsx("span",{className:`font-bold text-primary leading-tight transition-all duration-300 ${o?"text-base":"text-lg"}`,children:"Quantum Technology"})]})]}),s.jsxs("div",{className:"hidden lg:flex items-center gap-2",children:[j.map((k,A)=>s.jsxs("div",{className:"relative",onMouseEnter:()=>k.dropdown&&h(k.name),onMouseLeave:()=>h(null),children:[s.jsxs(Xr,{to:k.to,className:"relative px-4 py-2 text-sm font-medium text-foreground transition-colors rounded-md group",activeClassName:"text-primary font-semibold",children:[s.jsxs(M.span,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},transition:{delay:A*.05},className:"flex items-center gap-1",children:[k.name,k.dropdown&&s.jsx(jh,{className:"h-3 w-3"})]}),s.jsx(M.span,{className:"absolute bottom-0 left-0 h-0.5 bg-gradient-to-r from-primary to-secondary",initial:{width:0},whileHover:{width:"100%"},transition:{duration:.3}}),s.jsx(M.span,{className:"absolute inset-0 bg-primary/5 rounded-md -z-10",initial:{opacity:0,scale:.8},whileHover:{opacity:1,scale:1},transition:{duration:.2}})]}),s.jsx(af,{children:k.dropdown&&d===k.name&&s.jsx(M.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},className:"absolute top-full left-0 mt-2 w-56 bg-card backdrop-blur-md border-2 border-border rounded-lg shadow-2xl overflow-hidden z-50",children:k.dropdown.map((z,O)=>s.jsx(M.div,{initial:{opacity:0,x:-10},animate:{opacity:1,x:0},transition:{delay:O*.05},children:s.jsx(Xr,{to:z.to,className:"block px-4 py-3 text-sm font-medium text-card-foreground hover:bg-primary/10 hover:text-primary transition-colors border-b border-border/50 last:border-b-0",children:z.name})},z.name))})})]},k.name)),s.jsx(M.div,{whileHover:{scale:1.05},whileTap:{scale:.95},children:s.jsxs(Q,{variant:"ghost",size:"icon",onClick:()=>r(!0),className:"relative","aria-label":"Search",children:[s.jsx(Qt,{className:"h-4 w-4"}),s.jsx("span",{className:"absolute -bottom-1 -right-1 text-[10px] bg-muted px-1 rounded text-muted-foreground",children:"⌘K"})]})}),s.jsx(M.div,{whileHover:{scale:1.05},whileTap:{scale:.95},children:s.jsx(Q,{variant:"ghost",size:"icon",onClick:T,"aria-label":"Toggle theme",children:s.jsx(M.div,{initial:{rotate:0},animate:{rotate:f==="dark"?180:0},transition:{duration:.3},children:f==="light"?s.jsx(ny,{className:"h-4 w-4"}):s.jsx(ey,{className:"h-4 w-4"})})})}),s.jsxs("div",{className:"flex items-center gap-1 ml-2 pl-2 border-l border-border",children:[s.jsx(M.a,{href:"https://www.linkedin.com/company/center-for-quantum-technologies-iiit-delhi/?trk=public_post_main-feed-card-text",target:"_blank",rel:"noopener noreferrer",className:"p-2 text-muted-foreground hover:text-primary transition-colors",whileHover:{scale:1.1,y:-2},whileTap:{scale:.9},"aria-label":"LinkedIn",children:s.jsx(C1,{className:"h-4 w-4"})}),s.jsx("a",{href:"mailto:admin-cqt@iiitd.ac.in",className:"p-2 text-muted-foreground hover:text-primary transition-colors","aria-label":"Email",children:s.jsx(xi,{className:"h-4 w-4"})})]}),s.jsx(M.div,{whileHover:{scale:1.05},whileTap:{scale:.95},children:s.jsxs(Q,{className:"ml-2 bg-gradient-to-r from-primary to-secondary text-white font-semibold shadow-lg hover:shadow-xl hover:shadow-primary/50 transition-all duration-300",onClick:()=>y("/admin/login"),children:["Admin Portal",s.jsx(Zt,{className:"ml-2 h-4 w-4"})]})})]}),s.jsxs("div",{className:"flex items-center gap-2 lg:hidden",children:[s.jsx(Q,{variant:"ghost",size:"icon",onClick:()=>r(!0),"aria-label":"Search",children:s.jsx(Qt,{className:"h-5 w-5"})}),s.jsx(Q,{variant:"ghost",size:"icon",onClick:()=>t(!e),"aria-label":"Toggle menu",children:s.jsx(M.div,{animate:{rotate:e?90:0},transition:{duration:.3},children:e?s.jsx(Yu,{className:"h-6 w-6"}):s.jsx(S1,{className:"h-6 w-6"})})})]})]}),s.jsx(af,{children:e&&s.jsx(M.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.3},className:"lg:hidden border-t border-border",style:{maxHeight:"calc(100vh - 80px)"},children:s.jsxs("div",{className:"py-4 flex flex-col gap-2 overflow-y-auto max-h-[calc(100vh-80px)]",children:[j.map((k,A)=>s.jsxs(M.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:A*.05},children:[s.jsx(Xr,{to:k.to,className:"block px-4 py-3 text-sm font-medium text-foreground hover:text-primary hover:bg-muted rounded-md transition-colors",activeClassName:"text-primary font-semibold bg-primary/10",onClick:()=>t(!1),children:k.name}),k.dropdown&&s.jsx("div",{className:"ml-4 mt-1 flex flex-col gap-1",children:k.dropdown.map(z=>s.jsx(Xr,{to:z.to,className:"block px-4 py-2 text-xs text-muted-foreground hover:text-primary transition-colors",onClick:()=>t(!1),children:z.name},z.name))})]},k.name)),s.jsx(M.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:j.length*.05},className:"px-4 py-2",children:s.jsxs(Q,{variant:"outline",className:"w-full justify-start",onClick:T,children:[f==="light"?s.jsx(ny,{className:"h-4 w-4 mr-2"}):s.jsx(ey,{className:"h-4 w-4 mr-2"}),f==="light"?"Light Mode":"Dark Mode"]})}),s.jsx(M.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:j.length*.05},className:"mt-4 px-4 pb-2",children:s.jsxs(Q,{className:"w-full bg-gradient-to-r from-primary to-secondary text-white font-semibold",onClick:()=>{y("/admin/login"),t(!1)},children:["Admin Portal",s.jsx(Zt,{className:"ml-2 h-4 w-4"})]})})]})})})]})}),s.jsx(af,{children:n&&s.jsxs(s.Fragment,{children:[s.jsx(M.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 bg-black/50 backdrop-blur-sm z-[60]",onClick:()=>r(!1)}),s.jsx(M.div,{initial:{opacity:0,scale:.9,y:-20},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.9,y:-20},transition:{type:"spring",duration:.3},className:"fixed top-20 left-1/2 -translate-x-1/2 w-full max-w-2xl z-[70] px-4",children:s.jsxs("div",{className:"bg-card border-2 border-border rounded-lg shadow-2xl overflow-hidden",children:[s.jsxs("div",{className:"flex items-center gap-3 p-4 border-b border-border",children:[s.jsx(Qt,{className:"h-5 w-5 text-muted-foreground flex-shrink-0"}),s.jsx($,{ref:v,type:"text",placeholder:"Search pages, people, research...",className:"flex-1 border-0 focus-visible:ring-0 text-base bg-transparent text-card-foreground placeholder:text-muted-foreground",value:i,onChange:k=>a(k.target.value),autoFocus:!0}),s.jsx("kbd",{className:"px-2 py-1 text-xs bg-muted text-muted-foreground rounded border border-border",children:"ESC"})]}),s.jsx("div",{className:"max-h-96 overflow-y-auto",children:N.length>0?s.jsx("div",{className:"p-2",children:N.map((k,A)=>{const z=k.icon;return s.jsxs(M.button,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},transition:{delay:A*.03},onClick:()=>S(k.path),className:"w-full flex items-start gap-3 p-3 rounded-lg hover:bg-primary/10 transition-colors text-left group",children:[s.jsx("div",{className:"flex-shrink-0 w-10 h-10 rounded-md bg-primary/10 flex items-center justify-center group-hover:bg-primary/20 transition-colors",children:s.jsx(z,{className:"h-5 w-5 text-primary"})}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[s.jsx("h4",{className:"font-semibold text-sm text-card-foreground group-hover:text-primary transition-colors",children:k.title}),s.jsx("span",{className:"px-2 py-0.5 text-xs bg-muted text-muted-foreground rounded",children:k.type})]}),s.jsx("p",{className:"text-xs text-muted-foreground line-clamp-1",children:k.description})]}),s.jsx(jh,{className:"h-4 w-4 text-muted-foreground rotate-[-90deg] flex-shrink-0 opacity-0 group-hover:opacity-100 transition-opacity"})]},k.path)})}):s.jsxs("div",{className:"p-8 text-center",children:[s.jsx(Qt,{className:"h-12 w-12 text-muted-foreground mx-auto mb-3 opacity-50"}),s.jsxs("p",{className:"text-sm text-muted-foreground",children:['No results found for "',i,'"']})]})}),s.jsx("div",{className:"p-3 border-t border-border bg-muted/30",children:s.jsxs("div",{className:"flex items-center justify-between text-xs text-muted-foreground",children:[s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx("kbd",{className:"px-1.5 py-0.5 bg-background border border-border rounded text-[10px]",children:"↑"}),s.jsx("kbd",{className:"px-1.5 py-0.5 bg-background border border-border rounded text-[10px]",children:"↓"}),"to navigate"]}),s.jsxs("span",{className:"flex items-center gap-1",children:[s.jsx("kbd",{className:"px-1.5 py-0.5 bg-background border border-border rounded text-[10px]",children:"↵"}),"to select"]})]}),s.jsxs("span",{children:[N.length," result",N.length!==1?"s":""]})]})})]})})]})})]})},T3="/assets/hero-quantum-k-Qg8pgU.jpg";function P3({particleCount:e=80,maxDistance:t=150,particleColor:n="rgba(59, 130, 246, 0.6)",lineColor:r="rgba(59, 130, 246, 0.2)"}){const i=p.useRef(null),a=p.useRef([]),o=p.useRef({x:0,y:0}),l=p.useRef(),[c,u]=p.useState({width:0,height:0});return p.useEffect(()=>{const d=()=>{u({width:window.innerWidth,height:window.innerHeight})};return d(),window.addEventListener("resize",d),()=>window.removeEventListener("resize",d)},[]),p.useEffect(()=>{const d=i.current;if(!d)return;const h=d.getContext("2d");if(!h)return;a.current=Array.from({length:e},()=>({x:Math.random()*c.width,y:Math.random()*c.height,vx:(Math.random()-.5)*.5,vy:(Math.random()-.5)*.5,radius:Math.random()*2+1}));const f=b=>{o.current={x:b.clientX,y:b.clientY}};window.addEventListener("mousemove",f);const m=()=>{h.clearRect(0,0,c.width,c.height),a.current.forEach((b,g)=>{b.x+=b.vx,b.y+=b.vy,(b.x<0||b.x>c.width)&&(b.vx*=-1),(b.y<0||b.y>c.height)&&(b.vy*=-1);const v=o.current.x-b.x,x=o.current.y-b.y,y=Math.sqrt(v*v+x*x);if(y<200){const j=(200-y)/200;b.vx+=v/y*j*.02,b.vy+=x/y*j*.02}const w=Math.sqrt(b.vx*b.vx+b.vy*b.vy);w>2&&(b.vx=b.vx/w*2,b.vy=b.vy/w*2),h.beginPath(),h.arc(b.x,b.y,b.radius,0,Math.PI*2),h.fillStyle=n,h.fill(),a.current.slice(g+1).forEach(j=>{const C=b.x-j.x,N=b.y-j.y,S=Math.sqrt(C*C+N*N);S<t&&(h.beginPath(),h.moveTo(b.x,b.y),h.lineTo(j.x,j.y),h.strokeStyle=r,h.lineWidth=1-S/t,h.stroke())})}),l.current=requestAnimationFrame(m)};return m(),()=>{window.removeEventListener("mousemove",f),l.current&&cancelAnimationFrame(l.current)}},[c,e,t,n,r]),s.jsx("canvas",{ref:i,width:c.width,height:c.height,className:"absolute inset-0 pointer-events-none",style:{opacity:.6}})}function A3(){const e=p.useRef(null);return p.useEffect(()=>{const t=e.current;if(!t)return;const n=t.getContext("2d");if(!n)return;const r=t.width,i=t.height,a=60,o=3,l=8,c=()=>{n.clearRect(0,0,r,i),n.strokeStyle="rgba(59, 130, 246, 0.08)",n.lineWidth=1;for(let h=0;h<r;h+=a)n.beginPath(),n.moveTo(h,0),n.lineTo(h,i),n.stroke();for(let h=0;h<i;h+=a)n.beginPath(),n.moveTo(0,h),n.lineTo(r,h),n.stroke();for(let h=0;h<r;h+=a)for(let f=0;f<i;f+=a){if(Math.random()>.7){const m=n.createRadialGradient(h,f,0,h,f,l);m.addColorStop(0,"rgba(59, 130, 246, 0.4)"),m.addColorStop(1,"rgba(59, 130, 246, 0)"),n.fillStyle=m,n.beginPath(),n.arc(h,f,l,0,Math.PI*2),n.fill()}n.fillStyle="rgba(59, 130, 246, 0.3)",n.beginPath(),n.arc(h,f,o,0,Math.PI*2),n.fill()}n.strokeStyle="rgba(59, 130, 246, 0.2)",n.lineWidth=2;for(let h=0;h<8;h++){const f=Math.floor(Math.random()*(r/a))*a,m=Math.floor(Math.random()*(i/a))*a,b=f+(Math.random()>.5?a:-a),g=m+(Math.random()>.5?a:-a);n.beginPath(),n.moveTo(f,m),n.lineTo(b,g),n.stroke()}};let u=0;const d=()=>{c(),n.fillStyle="rgba(59, 130, 246, 0.8)";for(let h=0;h<5;h++){const f=(u+h*200)%r,m=Math.sin((u+h*200)/100)*50+i/2,b=n.createRadialGradient(f,m,0,f,m,10);b.addColorStop(0,"rgba(59, 130, 246, 0.9)"),b.addColorStop(1,"rgba(59, 130, 246, 0)"),n.fillStyle=b,n.beginPath(),n.arc(f,m,10,0,Math.PI*2),n.fill(),n.fillStyle="rgba(255, 255, 255, 0.9)",n.beginPath(),n.arc(f,m,3,0,Math.PI*2),n.fill()}u+=2,requestAnimationFrame(d)};d()},[]),s.jsx("canvas",{ref:e,width:1920,height:1080,className:"absolute inset-0 w-full h-full pointer-events-none opacity-20"})}function dc({icon:e,value:t,suffix:n="",label:r,delay:i=0,color:a="rgba(59, 130, 246, 0.8)"}){const[o,l]=p.useState(0),[c,u]=p.useState({x:0,y:0}),d=p.useRef(null),h=S3(d,{once:!0});p.useEffect(()=>{if(!h)return;const b=2e3,g=60,v=t/g;let x=0;const y=setInterval(()=>{x++,x>=g?(l(t),clearInterval(y)):l(Math.floor(v*x))},b/g);return()=>clearInterval(y)},[h,t]);const f=b=>{if(!d.current)return;const g=d.current.getBoundingClientRect(),v=b.clientX-g.left,x=b.clientY-g.top,y=g.width/2,w=g.height/2,j=(x-w)/10,C=(y-v)/10;u({x:j,y:C})},m=()=>{u({x:0,y:0})};return s.jsxs(M.div,{ref:d,initial:{opacity:0,y:50,scale:.8},animate:h?{opacity:1,y:0,scale:1}:{},transition:{duration:.6,delay:i,ease:[.25,.46,.45,.94]},onMouseMove:f,onMouseLeave:m,style:{transform:`perspective(1000px) rotateX(${c.x}deg) rotateY(${c.y}deg)`,transition:"transform 0.2s ease-out"},className:"relative group",children:[s.jsx("div",{className:"absolute inset-0 rounded-2xl blur-xl opacity-0 group-hover:opacity-50 transition-opacity duration-500",style:{backgroundColor:a}}),s.jsxs("div",{className:"relative backdrop-blur-md bg-white/10 border border-white/20 rounded-2xl p-6 shadow-2xl hover:shadow-3xl transition-all duration-300",children:[s.jsx("div",{className:"absolute inset-0 rounded-2xl opacity-10",style:{background:`linear-gradient(135deg, ${a} 0%, transparent 100%)`}}),s.jsx("div",{className:"absolute inset-0 rounded-2xl overflow-hidden",children:s.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-transparent via-white/10 to-transparent translate-x-[-100%] group-hover:translate-x-[100%] transition-transform duration-1000"})}),s.jsxs("div",{className:"relative z-10",children:[s.jsxs("div",{className:"flex items-center justify-between mb-4",children:[s.jsx("div",{className:"p-3 rounded-xl",style:{backgroundColor:a},children:s.jsx(e,{className:"h-6 w-6 text-white"})}),s.jsx("div",{className:"relative",children:s.jsx("div",{className:"w-2 h-2 rounded-full animate-quantum-pulse",style:{backgroundColor:a}})})]}),s.jsxs("div",{className:"space-y-1",children:[s.jsxs("div",{className:"text-4xl font-bold text-white flex items-baseline gap-1",children:[s.jsx(M.span,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},transition:{duration:.2},children:o},o),n&&s.jsx("span",{className:"text-2xl",children:n})]}),s.jsx("p",{className:"text-gray-300 text-sm font-medium",children:r})]}),s.jsxs("div",{className:"absolute top-2 right-2 w-16 h-16 opacity-20",children:[s.jsx("div",{className:"absolute top-0 right-0 w-8 h-0.5",style:{backgroundColor:a}}),s.jsx("div",{className:"absolute top-0 right-0 w-0.5 h-8",style:{backgroundColor:a}})]}),s.jsxs("div",{className:"absolute bottom-2 left-2 w-16 h-16 opacity-20",children:[s.jsx("div",{className:"absolute bottom-0 left-0 w-8 h-0.5",style:{backgroundColor:a}}),s.jsx("div",{className:"absolute bottom-0 left-0 w-0.5 h-8",style:{backgroundColor:a}})]})]})]})]})}async function pn(e){const t=await fetch(e);if(!t.ok)throw new Error(`Failed to load ${e}`);return t.json()}function wg(){return mn({queryKey:["news"],queryFn:()=>pn("/data/news.json"),staleTime:1e3*60*5})}function jg(){return mn({queryKey:["research"],queryFn:()=>pn("/data/research.json"),staleTime:1e3*60*5})}function y2(){return mn({queryKey:["people"],queryFn:()=>pn("/data/people.json"),staleTime:1e3*60*5})}function R3(e){return mn({queryKey:["people",e],queryFn:async()=>e?(await pn("/data/people.json")).find(n=>n.id===e)??null:null,enabled:!!e})}function D3(e){return mn({queryKey:["research",e],queryFn:async()=>e?(await pn("/data/research.json")).find(n=>n.id===e)??null:null,enabled:!!e,staleTime:1e3*60*5})}function M3(e){return mn({queryKey:["news",e],queryFn:async()=>e?(await pn("/data/news.json")).find(n=>n.id===e)??null:null,enabled:!!e,staleTime:1e3*60*5})}function F3(){return mn({queryKey:["courses"],queryFn:()=>pn("/data/courses.json"),staleTime:1e3*60*5})}function L3(e){return mn({queryKey:["courses",e],queryFn:async()=>e?(await pn("/data/courses.json")).find(n=>n.id===e)??null:null,enabled:!!e,staleTime:1e3*60*5})}function v2(){return mn({queryKey:["workshops"],queryFn:()=>pn("/data/workshops.json"),staleTime:1e3*60*5})}function O3(e){return mn({queryKey:["workshops",e],queryFn:async()=>e?(await pn("/data/workshops.json")).find(n=>n.id===e)??null:null,enabled:!!e,staleTime:1e3*60*5})}function I3(){return mn({queryKey:["publications"],queryFn:()=>pn("/data/publications.json"),staleTime:1e3*60*5})}function _3(){return mn({queryKey:["labs"],queryFn:()=>pn("/data/labs.json"),staleTime:1e3*60*5})}const V3=()=>{const[e,t]=p.useState(""),[n,r]=p.useState(!1),[i,a]=p.useState({x:0,y:0}),o="Quantum Future",l=p.useRef(null),{data:c=[]}=jg(),{data:u=[]}=I3(),{data:d=[]}=y2(),{data:h=[]}=_3(),{scrollYProgress:f}=g2({target:l,offset:["start start","end start"]}),m=tv(f,[0,1],["0%","50%"]),b=tv(f,[0,.5,1],[1,.5,0]);p.useEffect(()=>{let x=0;const y=setInterval(()=>{x<=o.length?(t(o.slice(0,x)),x++):(r(!0),clearInterval(y))},100);return()=>clearInterval(y)},[]),p.useEffect(()=>{const x=y=>{a({x:y.clientX,y:y.clientY})};return window.addEventListener("mousemove",x),()=>window.removeEventListener("mousemove",x)},[]);const g=x=>{const y=x.currentTarget,w=y.getBoundingClientRect(),j=x.clientX-w.left-w.width/2,C=x.clientY-w.top-w.height/2;y.style.transform=`translate(${j*.3}px, ${C*.3}px) scale(1.05)`},v=x=>{const y=x.currentTarget;y.style.transform="translate(0, 0) scale(1)"};return s.jsxs("section",{ref:l,className:"relative min-h-screen flex items-center justify-center overflow-hidden",children:[s.jsxs(M.div,{style:{y:m},className:"absolute inset-0 z-0",children:[s.jsx("img",{src:T3,alt:"Quantum Technology",className:"w-full h-full object-cover scale-110"}),s.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-quantum-dark/95 via-quantum-dark/90 to-blue-900/85"})]}),s.jsx("div",{className:"absolute inset-0 z-0",children:s.jsx(A3,{})}),s.jsx("div",{className:"absolute inset-0 z-0",children:s.jsx(P3,{particleCount:80,maxDistance:150,particleColor:"rgba(59, 130, 246, 0.6)",lineColor:"rgba(59, 130, 246, 0.15)"})}),s.jsxs("div",{className:"absolute inset-0 z-0 overflow-hidden",children:[s.jsx(M.div,{animate:{y:[0,-30,0],rotate:[0,5,0]},transition:{duration:8,repeat:1/0,ease:"easeInOut"},className:"absolute top-1/4 left-1/4 w-32 h-32 bg-gradient-to-br from-blue-500/20 to-purple-500/20 rounded-full blur-3xl"}),s.jsx(M.div,{animate:{y:[0,40,0],rotate:[0,-5,0]},transition:{duration:10,repeat:1/0,ease:"easeInOut",delay:1},className:"absolute top-1/3 right-1/4 w-40 h-40 bg-gradient-to-br from-purple-500/20 to-pink-500/20 rounded-full blur-3xl"}),s.jsx(M.div,{animate:{y:[0,-25,0],x:[0,20,0]},transition:{duration:12,repeat:1/0,ease:"easeInOut",delay:2},className:"absolute bottom-1/3 left-1/3 w-36 h-36 bg-gradient-to-br from-cyan-500/20 to-blue-500/20 rounded-full blur-3xl"})]}),s.jsx(M.div,{style:{opacity:b},className:"container mx-auto px-4 z-10 pt-20",children:s.jsx("div",{className:"max-w-7xl mx-auto",children:s.jsxs("div",{className:"grid lg:grid-cols-2 gap-12 items-center",children:[s.jsxs("div",{className:"space-y-8",children:[s.jsx(M.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.8,delay:.2},children:s.jsxs("div",{className:"inline-flex items-center gap-2 px-4 py-2 bg-white/10 backdrop-blur-sm border border-white/20 rounded-full mb-6",children:[s.jsx("div",{className:"w-2 h-2 bg-secondary rounded-full animate-quantum-pulse"}),s.jsx("span",{className:"text-secondary text-sm font-semibold tracking-wider uppercase",children:"IIIT Delhi"})]})}),s.jsx(M.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.8,delay:.4},children:s.jsxs("h1",{className:"text-5xl md:text-6xl lg:text-7xl font-bold text-white leading-tight mb-4",children:[s.jsx("span",{className:"block mb-2",children:"Advancing the"}),s.jsxs("span",{className:"block bg-gradient-to-r from-secondary via-blue-400 to-purple-400 bg-clip-text text-transparent animate-gradient-shift",children:[e,!n&&s.jsx("span",{className:"inline-block w-1 h-16 ml-2 bg-secondary animate-typing-cursor align-middle"})]})]})}),s.jsx(M.p,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.8,delay:.6},className:"text-xl md:text-2xl text-gray-200 max-w-2xl leading-relaxed",children:"Pioneering research and education in quantum computing, quantum communication, and quantum sensing technologies."}),s.jsxs(M.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.8,delay:.8},className:"flex flex-col sm:flex-row gap-4 pt-4",children:[s.jsx(Ce,{to:"/research",children:s.jsx(Q,{size:"lg",className:"relative bg-gradient-to-r from-secondary to-blue-500 hover:from-secondary/90 hover:to-blue-600 text-white font-semibold group overflow-hidden shine-effect transition-all duration-300",onMouseMove:g,onMouseLeave:v,children:s.jsxs("span",{className:"relative z-10 flex items-center",children:["Explore Research",s.jsx(pi,{className:"ml-2 h-5 w-5 group-hover:translate-x-1 transition-transform"})]})})}),s.jsx(Ce,{to:"/team",children:s.jsx(Q,{size:"lg",variant:"outline",className:"relative border-2 border-white/50 text-white hover:bg-white hover:text-quantum-dark font-semibold backdrop-blur-sm bg-white/5 transition-all duration-300",onMouseMove:g,onMouseLeave:v,children:"Join Our Team"})})]}),s.jsx(M.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.8,delay:1},className:"flex flex-wrap gap-3 pt-4",children:["Quantum Computing","Quantum Communication","Quantum Sensing"].map((x,y)=>s.jsx(M.span,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},transition:{delay:1.2+y*.1},className:"px-4 py-2 bg-white/10 backdrop-blur-sm border border-white/20 rounded-full text-sm text-gray-200 hover:bg-white/20 transition-colors cursor-default",children:x},x))})]}),s.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-6",children:[s.jsx(dc,{icon:ys,value:c.length,suffix:"+",label:"Research Projects",delay:.6,color:"rgba(59, 130, 246, 0.8)"}),s.jsx(dc,{icon:Yr,value:u.length,suffix:"+",label:"Publications",delay:.8,color:"rgba(147, 51, 234, 0.8)"}),s.jsx(dc,{icon:mt,value:d.length,suffix:"+",label:"Researchers",delay:1,color:"rgba(236, 72, 153, 0.8)"}),s.jsx(dc,{icon:ys,value:h.length,suffix:"+",label:"Lab Facilities",delay:1.2,color:"rgba(14, 165, 233, 0.8)"})]})]})})}),s.jsx(M.div,{initial:{opacity:0,y:-20},animate:{opacity:1,y:0},transition:{duration:1,delay:2},className:"absolute bottom-10 left-1/2 transform -translate-x-1/2 z-20",children:s.jsxs(M.div,{animate:{y:[0,10,0]},transition:{duration:2,repeat:1/0,ease:"easeInOut"},className:"flex flex-col items-center gap-2 cursor-pointer",onClick:()=>window.scrollBy({top:window.innerHeight,behavior:"smooth"}),children:[s.jsx("span",{className:"text-white/70 text-sm uppercase tracking-wider",children:"Scroll"}),s.jsx("div",{className:"w-6 h-10 border-2 border-white/50 rounded-full p-1",children:s.jsx(M.div,{animate:{y:[0,16,0]},transition:{duration:2,repeat:1/0,ease:"easeInOut"},className:"w-1.5 h-3 bg-white rounded-full mx-auto"})}),s.jsx(jh,{className:"h-5 w-5 text-white/70"})]})}),s.jsx("div",{className:"absolute bottom-0 left-0 right-0 h-32 bg-gradient-to-t from-background to-transparent z-10"})]})},b2=()=>{const e=[{icon:oT,title:"Quantum Computing",description:"Developing novel quantum algorithms and architectures for next-generation computation."},{icon:vT,title:"Quantum Communication",description:"Advancing secure quantum networks and quantum cryptography protocols."},{icon:dT,title:"Quantum Hardware",description:"Building and optimizing quantum processors and control systems."},{icon:gT,title:"Quantum Sensing",description:"Creating ultra-precise quantum sensors for scientific and industrial applications."}];return s.jsx("section",{className:"py-24 bg-gradient-to-b from-background to-muted/30",children:s.jsx("div",{className:"container mx-auto px-4",children:s.jsxs("div",{className:"max-w-6xl mx-auto",children:[s.jsxs("div",{className:"text-center mb-16 animate-fade-in",children:[s.jsx("h2",{className:"text-4xl md:text-5xl font-bold text-foreground mb-6",children:"About CQT"}),s.jsx("p",{className:"text-xl text-muted-foreground max-w-3xl mx-auto leading-relaxed",children:"The Centre for Quantum Technology at IIIT Delhi is a premier research center dedicated to advancing quantum science and technology. We bring together leading researchers, students, and industry partners to push the boundaries of what's possible in the quantum realm."})]}),s.jsx("div",{className:"grid md:grid-cols-2 gap-8",children:e.map((t,n)=>s.jsx("div",{className:"bg-card border border-border rounded-xl p-8 hover:shadow-quantum transition-all duration-300 animate-slide-up hover:border-primary/50",style:{animationDelay:`${n*.1}s`},children:s.jsxs("div",{className:"flex items-start gap-4",children:[s.jsx("div",{className:"flex-shrink-0",children:s.jsx("div",{className:"w-14 h-14 bg-gradient-to-br from-primary to-accent rounded-lg flex items-center justify-center shadow-lg",children:s.jsx(t.icon,{className:"h-7 w-7 text-primary-foreground"})})}),s.jsxs("div",{className:"flex-1",children:[s.jsx("h3",{className:"text-xl font-bold text-foreground mb-3",children:t.title}),s.jsx("p",{className:"text-muted-foreground leading-relaxed",children:t.description})]})]})},t.title))})]})})})},te=p.forwardRef(({className:e,...t},n)=>s.jsx("div",{ref:n,className:ge("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));te.displayName="Card";const ue=p.forwardRef(({className:e,...t},n)=>s.jsx("div",{ref:n,className:ge("flex flex-col space-y-1.5 p-6",e),...t}));ue.displayName="CardHeader";const de=p.forwardRef(({className:e,...t},n)=>s.jsx("h3",{ref:n,className:ge("text-2xl font-semibold leading-none tracking-tight",e),...t}));de.displayName="CardTitle";const Rr=p.forwardRef(({className:e,...t},n)=>s.jsx("p",{ref:n,className:ge("text-sm text-muted-foreground",e),...t}));Rr.displayName="CardDescription";const ne=p.forwardRef(({className:e,...t},n)=>s.jsx("div",{ref:n,className:ge("p-6 pt-0",e),...t}));ne.displayName="CardContent";const Ji=p.forwardRef(({className:e,...t},n)=>s.jsx("div",{ref:n,className:ge("flex items-center p-6 pt-0",e),...t}));Ji.displayName="CardFooter";const z3=Nl("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function ie({className:e,variant:t,...n}){return s.jsx("div",{className:ge(z3({variant:t}),e),...n})}const $3=()=>{const{data:e,isLoading:t,isError:n}=jg();return t?s.jsx("div",{className:"py-24 text-center",children:"Loading projects..."}):n?s.jsx("div",{className:"py-24 text-center",children:"Failed to load research data"}):s.jsx("section",{id:"research",className:"py-24 bg-background",children:s.jsx("div",{className:"container mx-auto px-4",children:s.jsxs("div",{className:"max-w-6xl mx-auto",children:[s.jsxs("div",{className:"mb-16 animate-fade-in",children:[s.jsx("h2",{className:"text-4xl md:text-5xl font-bold text-foreground mb-6",children:"Research Projects"}),s.jsx("p",{className:"text-xl text-muted-foreground max-w-3xl leading-relaxed",children:"Our research spans fundamental quantum physics to practical quantum technologies, with focus on computation, communication, and sensing applications."})]}),s.jsx("div",{className:"grid md:grid-cols-2 gap-6",children:e==null?void 0:e.map((r,i)=>s.jsx(Ce,{to:`/research/${r.id}`,children:s.jsxs(te,{className:"hover:shadow-quantum transition-all duration-300 animate-slide-up border-border h-full group cursor-pointer",style:{animationDelay:`${i*.1}s`},children:[s.jsxs(ue,{children:[s.jsxs("div",{className:"flex items-start justify-between mb-2",children:[s.jsx(ie,{variant:"secondary",className:"bg-secondary/10 text-secondary border-secondary/20",children:r.category}),s.jsx(ie,{variant:"outline",className:`${r.status==="Active"?"border-green-500 text-green-500":r.status==="Planning"?"border-yellow-500 text-yellow-500":"border-gray-500 text-gray-500"}`,children:r.status})]}),s.jsxs(de,{className:"text-xl mb-2 flex items-center gap-2 group-hover:text-primary transition-colors",children:[r.title,s.jsx(Zt,{className:"h-4 w-4 opacity-0 group-hover:opacity-100 transition-opacity"})]}),s.jsx(Rr,{className:"text-base",children:r.description})]}),s.jsx(ne,{children:s.jsxs("div",{className:"flex flex-wrap gap-2",children:[r.tags.slice(0,3).map(a=>s.jsx(ie,{variant:"outline",className:"text-xs",children:a},a)),r.tags.length>3&&s.jsxs(ie,{variant:"outline",className:"text-xs",children:["+",r.tags.length-3," more"]})]})})]})},r.id))})]})})})},w2=({showOnlyFaculty:e=!1})=>{const{data:t,isLoading:n,isError:r}=y2(),i=p.useMemo(()=>t?e?t.filter(a=>{var o,l;return((o=a.role)==null?void 0:o.toLowerCase().includes("faculty"))||((l=a.role)==null?void 0:l.toLowerCase().includes("professor"))}):t:null,[t,e]);return n?s.jsx("div",{className:"py-24 text-center",children:"Loading team..."}):r?s.jsx("div",{className:"py-24 text-center",children:"Failed to load team data"}):s.jsx("section",{id:"people",className:"py-24 bg-gradient-to-b from-muted/30 to-background",children:s.jsx("div",{className:"container mx-auto px-4",children:s.jsxs("div",{className:"max-w-6xl mx-auto",children:[s.jsxs("div",{className:"mb-16 animate-fade-in",children:[s.jsx("h2",{className:"text-4xl md:text-5xl font-bold text-foreground mb-6",children:e?"Our Faculty":"Our Team"}),s.jsx("p",{className:"text-xl text-muted-foreground max-w-3xl leading-relaxed",children:e?"Meet our distinguished faculty members leading groundbreaking research in quantum technology.":"Meet the brilliant minds driving quantum innovation at CQT. Our diverse team of researchers brings together expertise from physics, computer science, and engineering."})]}),i&&(()=>{const a=i.reduce((o,l)=>((o[l.role]=o[l.role]||[]).push(l),o),{});return Object.entries(a).map(([o,l])=>{const c=o.toLowerCase()==="faculty"?"faculty":o.toLowerCase()==="staff"?"staff":o.toLowerCase()==="phd scholar"?"phd-scholar":o.toLowerCase().replace(/\s+/g,"-");return s.jsxs("div",{id:c,className:"mb-12",children:[s.jsx("h3",{className:"text-2xl font-bold mb-6 text-foreground",children:o}),s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6",children:(Array.isArray(l)?l:[]).map((u,d)=>s.jsx(Xr,{to:`/people/${u.id}`,className:"block",children:s.jsxs(te,{className:"relative overflow-hidden rounded-xl transition-all duration-300 md:hover:-translate-y-2 md:hover:shadow-2xl border-border group h-80 min-h-[320px] touch-manipulation",style:{animationDelay:`${d*.06}s`},children:[s.jsxs("div",{className:"absolute inset-0 transition-all duration-500",children:[u.photo?s.jsx("div",{className:"absolute inset-0 bg-cover bg-center transition-transform duration-700 md:group-hover:scale-105",style:{backgroundImage:`url(${u.photo})`},"aria-hidden":"true"}):s.jsx("div",{className:"absolute inset-0 flex items-center justify-center text-white text-3xl md:text-4xl font-bold",style:{background:"linear-gradient(135deg, hsl(215 80% 45%), hsl(270 60% 55%))"},children:u.name.split(" ").map(h=>h[0]).join("")}),s.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/70 via-black/20 to-transparent pointer-events-none"})]}),s.jsx("div",{className:"absolute bottom-0 left-0 right-0 bg-card/95 backdrop-blur-sm p-4 transition-all duration-500 md:group-hover:translate-y-full md:group-hover:opacity-0",children:s.jsxs("div",{className:"text-center",children:[s.jsx("h4",{className:"text-base md:text-lg font-bold text-foreground mb-1 line-clamp-1",children:u.name}),s.jsx("p",{className:"text-xs md:text-sm text-primary font-semibold mb-2 line-clamp-1",children:u.title}),s.jsx("p",{className:"text-xs md:text-sm text-muted-foreground mb-3 line-clamp-2",children:u.specialization}),s.jsxs("a",{href:`mailto:${u.email}`,onClick:h=>h.stopPropagation(),className:"inline-flex items-center gap-1 text-xs text-secondary hover:underline",children:[s.jsx(xi,{className:"h-3 w-3"}),s.jsx("span",{children:"Email"})]})]})})]})},u.id))})]},o)})})(),e&&s.jsx("div",{className:"text-center animate-fade-in mt-8",children:s.jsx(Xr,{to:"/team",children:s.jsxs(Q,{size:"lg",variant:"outline",className:"border-2 border-primary hover:bg-primary hover:text-primary-foreground",children:["View All Team Members",s.jsx(Zt,{className:"ml-2 h-4 w-4"})]})})})]})})})},B3=()=>{const{data:e,isLoading:t,isError:n}=wg();return t?s.jsx("div",{className:"py-24 text-center",children:"Loading news..."}):n?s.jsx("div",{className:"py-24 text-center",children:"Failed to load news"}):s.jsx("section",{id:"activities",className:"py-24 bg-background",children:s.jsx("div",{className:"container mx-auto px-4",children:s.jsxs("div",{className:"max-w-6xl mx-auto",children:[s.jsxs("div",{className:"mb-16 animate-fade-in",children:[s.jsx("h2",{className:"text-4xl md:text-5xl font-bold text-foreground mb-6",children:"News & Events"}),s.jsx("p",{className:"text-xl text-muted-foreground max-w-3xl leading-relaxed",children:"Stay updated with the latest developments, achievements, and events from CQT."})]}),s.jsx("div",{className:"grid md:grid-cols-2 gap-6 mb-12",children:e==null?void 0:e.slice(0,4).map((r,i)=>s.jsx(Ce,{to:`/news/${r.id}`,children:s.jsxs(te,{className:"hover:shadow-quantum transition-all duration-300 animate-slide-up border-border cursor-pointer group h-full",style:{animationDelay:`${i*.1}s`},children:[s.jsxs(ue,{children:[s.jsxs("div",{className:"flex items-center justify-between mb-3",children:[s.jsx(ie,{variant:"secondary",className:"bg-secondary/10 text-secondary border-secondary/20",children:r.category}),s.jsxs("div",{className:"flex items-center gap-1 text-sm text-muted-foreground",children:[s.jsx(ut,{className:"h-4 w-4"}),new Date(r.date).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})]})]}),s.jsx(de,{className:"text-xl group-hover:text-primary transition-colors",children:r.title}),s.jsx(Rr,{className:"text-base line-clamp-2",children:r.description})]}),s.jsx(ne,{children:s.jsxs(Q,{variant:"link",className:"p-0 h-auto text-secondary group/btn",children:["Read more",s.jsx(pi,{className:"ml-1 h-4 w-4 group-hover/btn:translate-x-1 transition-transform"})]})})]})},r.id))}),s.jsx("div",{className:"text-center animate-fade-in",children:s.jsx(Ce,{to:"/news",children:s.jsxs(Q,{size:"lg",className:"bg-primary hover:bg-primary/90",children:["View All News",s.jsx(pi,{className:"ml-2 h-4 w-4"})]})})})]})})})},U3="/cqt_logo_with_iiitd.png",Ze=()=>{const e=Ua(),t=i=>{e(i),window.scrollTo({top:0,behavior:"smooth"})},n={Research:[{name:"All Projects",path:"/research"},{name:"Quantum Computing",path:"/research?category=computing"},{name:"Quantum Communication",path:"/research?category=communication"},{name:"Quantum Sensing",path:"/research?category=sensing"},{name:"Publications",path:"/publications"},{name:"Labs & Facilities",path:"/labs"},{name:"Collaborations",path:"/research#collaborations"}],Education:[{name:"All Programs",path:"/education"},{name:"Courses",path:"/education#courses"},{name:"Workshops & Events",path:"/workshops"},{name:"PhD Program",path:"/education#phd"},{name:"Master's Program",path:"/education#masters"},{name:"Student Resources",path:"/education#resources"}],People:[{name:"Our Team",path:"/team"},{name:"Faculty",path:"/team#faculty"},{name:"Staff",path:"/team#staff"},{name:"PhD Scholar",path:"/team#phd-scholar"}],About:[{name:"About CQT",path:"/about"},{name:"News & Updates",path:"/news"},{name:"Workshops & Events",path:"/workshops"},{name:"Lab Facilities",path:"/labs"},{name:"Partnerships",path:"/about#partners"},{name:"Contact Us",path:"/contact"}]},r=[{name:"Research Portal",path:"/research",primary:!0},{name:"Publications",path:"/publications",primary:!1},{name:"Contact Us",path:"/contact",primary:!1}];return s.jsxs("footer",{className:"bg-gradient-to-b from-quantum-navy to-black text-white relative overflow-hidden",children:[s.jsx("div",{className:"absolute inset-0 opacity-5",children:s.jsx("div",{className:"absolute inset-0",style:{backgroundImage:"radial-gradient(circle at 2px 2px, rgba(59, 130, 246, 0.3) 1px, transparent 0)",backgroundSize:"40px 40px"}})}),s.jsxs("div",{className:"container mx-auto px-4 py-16 relative z-10",children:[s.jsxs("div",{className:"grid lg:grid-cols-3 gap-12 mb-16 pb-12 border-b border-gray-800",children:[s.jsxs("div",{className:"lg:col-span-1",children:[s.jsx("button",{onClick:()=>t("/"),className:"inline-block mb-6 group text-left",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx(M.img,{src:U3,alt:"CQT Logo",className:"h-16 w-auto object-contain transition-transform group-hover:scale-110 group-hover:rotate-6",whileHover:{rotate:360},transition:{duration:.6}}),s.jsxs("div",{className:"flex flex-col",children:[s.jsx("span",{className:"text-sm font-semibold text-secondary",children:"Centre for"}),s.jsx("span",{className:"text-xl font-bold leading-tight",children:"Quantum Technology"}),s.jsx("span",{className:"text-xs text-gray-400",children:"IIIT Delhi"})]})]})}),s.jsx("p",{className:"text-gray-400 text-sm leading-relaxed mb-6",children:"Pioneering quantum research and education, advancing the frontiers of quantum computing, communication, and sensing technologies to shape the future of science and innovation."}),s.jsxs("div",{className:"flex items-center gap-4 mb-6",children:[s.jsx("span",{className:"text-xs text-gray-500 uppercase tracking-wider",children:"Follow Us:"}),s.jsxs("div",{className:"flex gap-3",children:[s.jsx(M.a,{href:"https://www.linkedin.com/company/center-for-quantum-technologies-iiit-delhi/?trk=public_post_main-feed-card-text",target:"_blank",rel:"noopener noreferrer","aria-label":"LinkedIn",className:"p-2 bg-white/5 rounded-lg border border-white/10 hover:text-blue-400 transition-all duration-300 hover:bg-white/10 hover:border-white/20 hover:-translate-y-1",whileHover:{scale:1.1},whileTap:{scale:.95},children:s.jsx(C1,{className:"h-4 w-4"})}),s.jsx("a",{href:"mailto:admin-cqt@iiitd.ac.in","aria-label":"Email",className:"p-2 bg-white/5 rounded-lg border border-white/10 hover:text-red-400 transition-all duration-300 hover:bg-white/10 hover:border-white/20 hover:-translate-y-1",children:s.jsx(xi,{className:"h-4 w-4"})})]})]})]}),s.jsxs("div",{className:"lg:col-span-2",children:[s.jsx("h3",{className:"text-lg font-bold mb-4 text-secondary",children:"Quick Actions"}),s.jsx("div",{className:"grid sm:grid-cols-3 gap-4",children:r.map(i=>s.jsx("button",{onClick:()=>t(i.path),className:`group relative overflow-hidden rounded-lg p-4 border transition-all duration-300 w-full ${i.primary?"bg-gradient-to-r from-secondary to-blue-500 border-secondary hover:shadow-lg hover:shadow-secondary/50":"bg-white/5 border-white/10 hover:bg-white/10 hover:border-white/20"}`,children:s.jsxs("div",{className:"relative z-10 flex items-center justify-between",children:[s.jsx("span",{className:`font-semibold ${i.primary?"text-white":"text-gray-300"}`,children:i.name}),s.jsx(pi,{className:`h-4 w-4 transition-transform group-hover:translate-x-1 ${i.primary?"text-white":"text-gray-400"}`})]})},i.name))})]})]}),s.jsxs("div",{className:"grid sm:grid-cols-2 lg:grid-cols-5 gap-8 mb-12",children:[Object.entries(n).map(([i,a])=>s.jsxs("div",{children:[s.jsxs("h3",{className:"font-bold text-base mb-4 text-white flex items-center gap-2",children:[i,s.jsx("span",{className:"w-8 h-0.5 bg-secondary"})]}),s.jsx("ul",{className:"space-y-3",children:a.map(o=>s.jsx("li",{children:s.jsxs("button",{onClick:()=>t(o.path),className:"text-sm text-gray-400 hover:text-secondary transition-colors flex items-center gap-2 group text-left",children:[s.jsx("span",{className:"w-0 h-0.5 bg-secondary transition-all group-hover:w-3"}),o.name]})},o.name))})]},i)),s.jsxs("div",{children:[s.jsxs("h3",{className:"font-bold text-base mb-4 text-white flex items-center gap-2",children:["Contact",s.jsx("span",{className:"w-8 h-0.5 bg-secondary"})]}),s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx(Ns,{className:"h-5 w-5 text-secondary flex-shrink-0 mt-0.5"}),s.jsxs("div",{className:"text-sm text-gray-400",children:[s.jsx("p",{className:"font-medium text-gray-300 mb-1",children:"IIIT Delhi"}),s.jsx("p",{children:"Okhla Industrial Estate, Phase III"}),s.jsx("p",{children:"New Delhi - 110020, India"})]})]}),s.jsxs("a",{href:"#",className:"flex items-center gap-3 text-sm text-gray-400 hover:text-secondary transition-colors group",children:[s.jsx(k1,{className:"h-5 w-5 text-secondary flex-shrink-0"}),s.jsx("span",{children:"Will be updated"})]}),s.jsxs("a",{href:"mailto:admin-cqt@iiitd.ac.in",className:"flex items-center gap-3 text-sm text-gray-400 hover:text-secondary transition-colors group",children:[s.jsx(xi,{className:"h-5 w-5 text-secondary flex-shrink-0"}),s.jsx("span",{children:"admin-cqt@iiitd.ac.in"})]}),s.jsx("div",{className:"pt-4",children:s.jsxs("button",{onClick:()=>t("/contact"),className:"inline-flex items-center gap-2 text-sm font-semibold text-secondary hover:text-white transition-colors group",children:["Get Directions",s.jsx(Zt,{className:"h-3 w-3 group-hover:translate-x-0.5 group-hover:-translate-y-0.5 transition-transform"})]})})]})]})]}),s.jsxs("div",{className:"border-t border-gray-800 pt-8",children:[s.jsxs("div",{className:"flex flex-col lg:flex-row justify-between items-center gap-6",children:[s.jsxs("div",{className:"flex flex-col sm:flex-row items-center gap-4 text-sm text-gray-500",children:[s.jsxs("p",{children:["© ",new Date().getFullYear()," Centre for Quantum Technology, IIIT Delhi."]}),s.jsx("span",{className:"hidden sm:inline text-gray-700",children:"|"}),s.jsx("p",{children:"All rights reserved."})]}),s.jsxs("div",{className:"flex flex-wrap justify-center gap-6",children:[s.jsx("button",{onClick:()=>t("/contact"),className:"text-sm text-gray-500 hover:text-secondary transition-colors",children:"Contact"}),s.jsx("a",{href:"#",className:"text-sm text-gray-500 hover:text-secondary transition-colors",children:"Privacy Policy"}),s.jsx("a",{href:"#",className:"text-sm text-gray-500 hover:text-secondary transition-colors",children:"Terms of Use"}),s.jsx("a",{href:"#",className:"text-sm text-gray-500 hover:text-secondary transition-colors",children:"Accessibility"}),s.jsx("a",{href:"#",className:"text-sm text-gray-500 hover:text-secondary transition-colors",children:"Sitemap"}),s.jsx("button",{onClick:()=>t("/admin/login"),className:"text-sm text-gray-500 hover:text-secondary transition-colors font-medium",children:"Admin"})]})]}),s.jsx("div",{className:"mt-6 pt-6 border-t border-gray-800 text-center",children:s.jsx("p",{className:"text-xs text-gray-600",children:"Developed with ❤️ for advancing quantum technology research and education"})})]})]}),s.jsx("div",{className:"absolute bottom-0 left-0 right-0 h-1 bg-gradient-to-r from-secondary via-blue-500 to-purple-500"})]})};function j2(e=".reveal"){p.useEffect(()=>{const t=Array.from(document.querySelectorAll(e));if(!t.length)return;const n=new IntersectionObserver(r=>{r.forEach(i=>{i.isIntersecting&&i.target.classList.add("revealed")})},{threshold:.15});return t.forEach(r=>n.observe(r)),()=>n.disconnect()},[e])}function dd(e){if(!e)return;const t=e.startsWith("#")?e.slice(1):e,n=document.getElementById(t);n&&n.scrollIntoView({behavior:"smooth",block:"start"})}const W3=()=>{j2();const e=Wt();return p.useEffect(()=>{e.hash&&setTimeout(()=>dd(e.hash),50)},[e.hash]),s.jsxs("div",{className:"min-h-screen",children:[s.jsx(Xe,{}),s.jsxs("main",{id:"main-content",children:[s.jsx("div",{className:"reveal",children:s.jsx(V3,{})}),s.jsx("div",{className:"reveal",children:s.jsx(b2,{})}),s.jsx("div",{className:"reveal",children:s.jsx($3,{})}),s.jsx("div",{className:"reveal",children:s.jsx(w2,{showOnlyFaculty:!0})}),s.jsx("div",{className:"reveal",children:s.jsx(B3,{})})]}),s.jsx(Ze,{})]})},H3=()=>{const e=Wt();return p.useEffect(()=>{console.error("404 Error: User attempted to access non-existent route:",e.pathname)},[e.pathname]),s.jsx("div",{className:"flex min-h-screen items-center justify-center bg-muted",children:s.jsxs("div",{className:"text-center",children:[s.jsx("h1",{className:"mb-4 text-4xl font-bold",children:"404"}),s.jsx("p",{className:"mb-4 text-xl text-muted-foreground",children:"Oops! Page not found"}),s.jsx("a",{href:"/",className:"text-primary underline hover:text-primary/90",children:"Return to Home"})]})})},q3=()=>s.jsxs("div",{className:"min-h-screen",children:[s.jsx(Xe,{}),s.jsxs("main",{className:"container mx-auto px-4 py-24",children:[s.jsx("h1",{className:"text-3xl font-bold mb-6",children:"About Centre for Quantum Technology"}),s.jsx(b2,{})]}),s.jsx(Ze,{})]}),K3=()=>{const{data:e,isLoading:t,isError:n}=jg(),r=Wt(),[i,a]=p.useState(""),[o,l]=p.useState("All"),[c,u]=p.useState("All");p.useEffect(()=>{r.hash&&setTimeout(()=>dd(r.hash),200)},[r.hash]);const d=["All",...Array.from(new Set((e==null?void 0:e.map(g=>g.category))||[]))],h=["All",...Array.from(new Set((e==null?void 0:e.map(g=>g.status))||[]))],f=e==null?void 0:e.filter(g=>{const v=g.title.toLowerCase().includes(i.toLowerCase())||g.description.toLowerCase().includes(i.toLowerCase())||g.tags.some(w=>w.toLowerCase().includes(i.toLowerCase())),x=o==="All"||g.category===o,y=c==="All"||g.status===c;return v&&x&&y}),m=f==null?void 0:f.filter(g=>g.featured),b=f==null?void 0:f.filter(g=>!g.featured);return t?s.jsxs("div",{className:"min-h-screen",children:[s.jsx(Xe,{}),s.jsx("main",{id:"main-content",className:"container mx-auto px-4 py-24",children:s.jsx("div",{className:"text-center py-20",children:"Loading research projects..."})}),s.jsx(Ze,{})]}):n?s.jsxs("div",{className:"min-h-screen",children:[s.jsx(Xe,{}),s.jsx("main",{id:"main-content",className:"container mx-auto px-4 py-24",children:s.jsx("div",{className:"text-center py-20",children:"Failed to load research data"})}),s.jsx(Ze,{})]}):s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx(Xe,{}),s.jsx("main",{id:"main-content",className:"container mx-auto px-4 py-24",children:s.jsxs("div",{className:"max-w-7xl mx-auto",children:[s.jsxs(M.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},className:"mb-12",children:[s.jsx("h1",{className:"text-4xl md:text-5xl font-bold text-foreground mb-4",children:"Research Projects"}),s.jsx("p",{className:"text-xl text-muted-foreground max-w-3xl leading-relaxed",children:"Explore our cutting-edge research spanning quantum computing, communication, sensing, and fundamental quantum physics."})]}),s.jsxs(M.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:.1},className:"mb-8 space-y-4",children:[s.jsxs("div",{className:"relative",children:[s.jsx(Qt,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-5 w-5 text-muted-foreground"}),s.jsx($,{type:"text",placeholder:"Search projects by title, description, or tags...",value:i,onChange:g=>a(g.target.value),className:"pl-10 h-12 text-base"})]}),s.jsxs("div",{className:"flex flex-wrap items-center gap-4",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Nh,{className:"h-4 w-4 text-muted-foreground"}),s.jsx("span",{className:"text-sm font-medium text-muted-foreground",children:"Category:"})]}),s.jsx("div",{className:"flex flex-wrap gap-2",children:d.map(g=>s.jsx(Q,{variant:o===g?"default":"outline",size:"sm",onClick:()=>l(g),className:"h-8",children:g},g))})]}),s.jsxs("div",{className:"flex flex-wrap items-center gap-4",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Nh,{className:"h-4 w-4 text-muted-foreground"}),s.jsx("span",{className:"text-sm font-medium text-muted-foreground",children:"Status:"})]}),s.jsx("div",{className:"flex flex-wrap gap-2",children:h.map(g=>s.jsx(Q,{variant:c===g?"default":"outline",size:"sm",onClick:()=>u(g),className:"h-8",children:g},g))})]})]}),s.jsxs(M.div,{initial:{opacity:0},animate:{opacity:1},transition:{duration:.3,delay:.2},className:"mb-6 text-sm text-muted-foreground",children:["Showing ",(f==null?void 0:f.length)||0," project",(f==null?void 0:f.length)!==1?"s":""]}),m&&m.length>0&&s.jsxs(M.div,{id:"projects",initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:.3},className:"mb-12",children:[s.jsxs("h2",{className:"text-2xl font-bold text-foreground mb-6 flex items-center gap-2",children:["Featured Projects",s.jsx(ie,{variant:"outline",className:"border-primary text-primary",children:m.length})]}),s.jsx("div",{className:"grid lg:grid-cols-2 gap-6",children:m.map((g,v)=>s.jsx(M.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:v*.1},children:s.jsx(Ce,{to:`/research/${g.id}`,children:s.jsxs(te,{className:"hover:shadow-2xl transition-all duration-300 border-2 border-primary/20 h-full group cursor-pointer",children:[s.jsxs(ue,{children:[s.jsxs("div",{className:"flex items-start justify-between mb-2",children:[s.jsx(ie,{variant:"secondary",className:"bg-secondary/10 text-secondary border-secondary/20",children:g.category}),s.jsx(ie,{variant:"outline",className:`${g.status==="Active"?"border-green-500 text-green-500":g.status==="Planning"?"border-yellow-500 text-yellow-500":"border-gray-500 text-gray-500"}`,children:g.status})]}),s.jsxs(de,{className:"text-xl mb-2 flex items-center gap-2 group-hover:text-primary transition-colors",children:[g.title,s.jsx(Zt,{className:"h-4 w-4 opacity-0 group-hover:opacity-100 transition-opacity"})]}),s.jsx(Rr,{className:"text-base",children:g.description})]}),s.jsx(ne,{children:s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"flex flex-wrap gap-2",children:[g.tags.slice(0,4).map(x=>s.jsx(ie,{variant:"outline",className:"text-xs",children:x},x)),g.tags.length>4&&s.jsxs(ie,{variant:"outline",className:"text-xs",children:["+",g.tags.length-4," more"]})]}),s.jsxs("div",{className:"text-sm text-muted-foreground",children:[s.jsx("span",{className:"font-medium",children:"Team Lead:"})," ",g.teamLead]})]})})]})})},g.id))})]}),b&&b.length>0&&s.jsxs(M.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:.4},children:[m&&m.length>0&&s.jsx("h2",{className:"text-2xl font-bold text-foreground mb-6",children:"All Projects"}),s.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-6",children:b.map((g,v)=>s.jsx(M.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:v*.05},children:s.jsx(Ce,{to:`/research/${g.id}`,children:s.jsxs(te,{className:"hover:shadow-xl transition-all duration-300 hover:-translate-y-1 border-border h-full group cursor-pointer",children:[s.jsxs(ue,{children:[s.jsxs("div",{className:"flex items-start justify-between mb-2",children:[s.jsx(ie,{variant:"secondary",className:"bg-secondary/10 text-secondary border-secondary/20 text-xs",children:g.category}),s.jsx(ie,{variant:"outline",className:`text-xs ${g.status==="Active"?"border-green-500 text-green-500":g.status==="Planning"?"border-yellow-500 text-yellow-500":"border-gray-500 text-gray-500"}`,children:g.status})]}),s.jsxs(de,{className:"text-lg mb-2 flex items-center gap-2 group-hover:text-primary transition-colors",children:[s.jsx("span",{className:"line-clamp-2",children:g.title}),s.jsx(Zt,{className:"h-4 w-4 flex-shrink-0 opacity-0 group-hover:opacity-100 transition-opacity"})]}),s.jsx(Rr,{className:"text-sm line-clamp-3",children:g.description})]}),s.jsx(ne,{children:s.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[g.tags.slice(0,3).map(x=>s.jsx(ie,{variant:"outline",className:"text-xs",children:x},x)),g.tags.length>3&&s.jsxs(ie,{variant:"outline",className:"text-xs",children:["+",g.tags.length-3]})]})})]})})},g.id))})]}),f&&f.length===0&&s.jsxs(M.div,{initial:{opacity:0},animate:{opacity:1},transition:{duration:.5},className:"text-center py-20",children:[s.jsx(Qt,{className:"h-16 w-16 text-muted-foreground mx-auto mb-4 opacity-50"}),s.jsx("h3",{className:"text-2xl font-bold text-foreground mb-2",children:"No projects found"}),s.jsx("p",{className:"text-muted-foreground mb-6",children:"Try adjusting your search or filters"}),s.jsx(Q,{variant:"outline",onClick:()=>{a(""),l("All"),u("All")},children:"Clear Filters"})]})]})}),s.jsx(Ze,{})]})},Q3=()=>{var i,a,o,l;const{id:e}=kl(),{data:t,isLoading:n,isError:r}=D3(e);return n?s.jsxs("div",{className:"min-h-screen",children:[s.jsx(Xe,{}),s.jsx("main",{id:"main-content",className:"container mx-auto px-4 py-24",children:s.jsx("div",{className:"text-center py-20",children:"Loading research project..."})}),s.jsx(Ze,{})]}):r||!t?s.jsxs("div",{className:"min-h-screen",children:[s.jsx(Xe,{}),s.jsx("main",{id:"main-content",className:"container mx-auto px-4 py-24",children:s.jsxs("div",{className:"text-center py-20",children:[s.jsx("h2",{className:"text-2xl font-bold mb-4",children:"Project Not Found"}),s.jsx(Ce,{to:"/research",children:s.jsxs(Q,{variant:"outline",children:[s.jsx(Mn,{className:"mr-2 h-4 w-4"}),"Back to Research"]})})]})}),s.jsx(Ze,{})]}):s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx(Xe,{}),s.jsx("main",{id:"main-content",className:"container mx-auto px-4 py-24",children:s.jsxs("div",{className:"max-w-5xl mx-auto",children:[s.jsx(M.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{duration:.3},className:"mb-6",children:s.jsx(Ce,{to:"/research",children:s.jsxs(Q,{variant:"ghost",size:"sm",children:[s.jsx(Mn,{className:"mr-2 h-4 w-4"}),"Back to Research"]})})}),s.jsxs(M.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},className:"mb-8",children:[s.jsxs("div",{className:"flex flex-wrap gap-2 mb-4",children:[s.jsx(ie,{variant:"secondary",className:"bg-secondary/10 text-secondary border-secondary/20",children:t.category}),s.jsx(ie,{variant:"outline",className:`${t.status==="Active"?"border-green-500 text-green-500":t.status==="Planning"?"border-yellow-500 text-yellow-500":"border-gray-500 text-gray-500"}`,children:t.status}),t.featured&&s.jsx(ie,{variant:"outline",className:"border-primary text-primary",children:"Featured"})]}),s.jsx("h1",{className:"text-4xl md:text-5xl font-bold text-foreground mb-4",children:t.title}),s.jsx("p",{className:"text-xl text-muted-foreground leading-relaxed",children:t.description})]}),t.image&&s.jsx(M.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{duration:.5,delay:.2},className:"mb-12 rounded-xl overflow-hidden shadow-2xl",children:s.jsx("img",{src:t.image,alt:t.title,className:"w-full h-96 object-cover"})}),s.jsxs(M.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:.3},className:"grid md:grid-cols-2 lg:grid-cols-4 gap-4 mb-12",children:[s.jsx(te,{className:"border-border",children:s.jsx(ne,{className:"pt-6",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"p-2 bg-primary/10 rounded-lg",children:s.jsx(ut,{className:"h-5 w-5 text-primary"})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-xs text-muted-foreground",children:"Started"}),s.jsx("p",{className:"font-semibold",children:new Date(t.startDate).toLocaleDateString("en-US",{month:"short",year:"numeric"})})]})]})})}),s.jsx(te,{className:"border-border",children:s.jsx(ne,{className:"pt-6",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"p-2 bg-secondary/10 rounded-lg",children:s.jsx(bp,{className:"h-5 w-5 text-secondary"})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-xs text-muted-foreground",children:"Funding"}),s.jsx("p",{className:"font-semibold",children:t.fundingAmount})]})]})})}),s.jsx(te,{className:"border-border",children:s.jsx(ne,{className:"pt-6",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"p-2 bg-accent/10 rounded-lg",children:s.jsx(mt,{className:"h-5 w-5 text-accent"})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-xs text-muted-foreground",children:"Team Size"}),s.jsxs("p",{className:"font-semibold",children:[((i=t.teamMembers)==null?void 0:i.length)||0," Members"]})]})]})})}),s.jsx(te,{className:"border-border",children:s.jsx(ne,{className:"pt-6",children:s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"p-2 bg-primary/10 rounded-lg",children:s.jsx(Jx,{className:"h-5 w-5 text-primary"})}),s.jsxs("div",{children:[s.jsx("p",{className:"text-xs text-muted-foreground",children:"Partners"}),s.jsxs("p",{className:"font-semibold",children:[((a=t.collaborators)==null?void 0:a.length)||0," Orgs"]})]})]})})})]}),s.jsx(M.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:.4},className:"mb-12",children:s.jsxs(te,{className:"border-border",children:[s.jsx(ue,{children:s.jsxs(de,{className:"flex items-center gap-2",children:[s.jsx(el,{className:"h-5 w-5"}),"Project Overview"]})}),s.jsx(ne,{children:s.jsx("div",{className:"prose prose-lg max-w-none text-foreground",children:(o=t.fullDescription)==null?void 0:o.split(` `).map((c,u)=>s.jsx("p",{className:"mb-4 leading-relaxed",children:c},u))})})]})}),s.jsxs("div",{className:"grid lg:grid-cols-2 gap-8 mb-12",children:[t.objectives&&t.objectives.length>0&&s.jsx(M.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{duration:.5,delay:.5},children:s.jsxs(te,{className:"border-border h-full",children:[s.jsx(ue,{children:s.jsxs(de,{className:"flex items-center gap-2",children:[s.jsx(jT,{className:"h-5 w-5 text-primary"}),"Objectives"]})}),s.jsx(ne,{children:s.jsx("ul",{className:"space-y-3",children:t.objectives.map((c,u)=>s.jsxs("li",{className:"flex items-start gap-3",children:[s.jsx("div",{className:"mt-1 h-2 w-2 rounded-full bg-primary flex-shrink-0"}),s.jsx("span",{className:"text-sm text-foreground",children:c})]},u))})})]})}),t.achievements&&t.achievements.length>0&&s.jsx(M.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},transition:{duration:.5,delay:.5},children:s.jsxs(te,{className:"border-border h-full",children:[s.jsx(ue,{children:s.jsxs(de,{className:"flex items-center gap-2",children:[s.jsx(vp,{className:"h-5 w-5 text-secondary"}),"Key Achievements"]})}),s.jsx(ne,{children:s.jsx("ul",{className:"space-y-3",children:t.achievements.map((c,u)=>s.jsxs("li",{className:"flex items-start gap-3",children:[s.jsx("div",{className:"mt-1 h-2 w-2 rounded-full bg-secondary flex-shrink-0"}),s.jsx("span",{className:"text-sm text-foreground",children:c})]},u))})})]})})]}),s.jsxs("div",{className:"grid lg:grid-cols-2 gap-8 mb-12",children:[s.jsx(M.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:.6},children:s.jsxs(te,{className:"border-border",children:[s.jsx(ue,{children:s.jsxs(de,{className:"flex items-center gap-2",children:[s.jsx(mt,{className:"h-5 w-5 text-accent"}),"Research Team"]})}),s.jsx(ne,{children:s.jsxs("div",{className:"space-y-3",children:[s.jsxs("div",{className:"pb-3 border-b border-border",children:[s.jsx("p",{className:"text-sm text-muted-foreground",children:"Principal Investigator"}),s.jsx("p",{className:"font-semibold text-foreground",children:t.teamLead})]}),t.teamMembers&&t.teamMembers.length>0&&s.jsxs("div",{children:[s.jsx("p",{className:"text-sm text-muted-foreground mb-2",children:"Team Members"}),s.jsx("ul",{className:"space-y-1",children:t.teamMembers.map((c,u)=>s.jsx("li",{className:"text-sm text-foreground",children:c},u))})]})]})})]})}),t.collaborators&&t.collaborators.length>0&&s.jsx(M.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:.6},children:s.jsxs(te,{className:"border-border",children:[s.jsx(ue,{children:s.jsxs(de,{className:"flex items-center gap-2",children:[s.jsx(Jx,{className:"h-5 w-5 text-primary"}),"Collaborating Organizations"]})}),s.jsx(ne,{children:s.jsx("ul",{className:"space-y-2",children:t.collaborators.map((c,u)=>s.jsxs("li",{className:"flex items-center gap-2 text-sm text-foreground",children:[s.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-primary"}),c]},u))})})]})})]}),t.publications&&t.publications.length>0&&s.jsx(M.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:.7},className:"mb-12",children:s.jsxs(te,{className:"border-border",children:[s.jsx(ue,{children:s.jsxs(de,{className:"flex items-center gap-2",children:[s.jsx(el,{className:"h-5 w-5 text-secondary"}),"Publications"]})}),s.jsx(ne,{children:s.jsx("div",{className:"space-y-4",children:t.publications.map((c,u)=>s.jsxs("div",{className:"pb-4 border-b border-border last:border-b-0 last:pb-0",children:[s.jsx("h4",{className:"font-semibold text-foreground mb-1",children:c.title}),s.jsxs("p",{className:"text-sm text-muted-foreground mb-2",children:[c.journal," • ",c.year]}),c.doi&&s.jsxs("a",{href:`https://doi.org/${c.doi}`,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-sm text-primary hover:underline",children:[s.jsx(Zt,{className:"h-3 w-3"}),c.doi]})]},u))})})]})}),t.impact&&s.jsx(M.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:.8},className:"mb-12",children:s.jsxs(te,{className:"border-border bg-gradient-to-br from-primary/5 to-secondary/5",children:[s.jsx(ue,{children:s.jsxs(de,{className:"flex items-center gap-2",children:[s.jsx(E1,{className:"h-5 w-5 text-primary"}),"Impact & Significance"]})}),s.jsx(ne,{children:s.jsx("p",{className:"text-foreground leading-relaxed",children:t.impact})})]})}),s.jsx(M.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:.9},className:"mb-12",children:s.jsx(te,{className:"border-border",children:s.jsx(ne,{className:"pt-6",children:s.jsxs("div",{className:"flex items-center justify-between flex-wrap gap-4",children:[s.jsxs("div",{children:[s.jsx("p",{className:"text-sm text-muted-foreground mb-1",children:"Funding Agency"}),s.jsx("p",{className:"font-semibold text-lg text-foreground",children:t.fundingAgency})]}),s.jsxs("div",{className:"text-right",children:[s.jsx("p",{className:"text-sm text-muted-foreground mb-1",children:"Total Funding"}),s.jsx("p",{className:"font-bold text-2xl text-primary",children:t.fundingAmount})]})]})})})}),s.jsx(M.div,{initial:{opacity:0},animate:{opacity:1},transition:{duration:.5,delay:1},className:"flex flex-wrap gap-2",children:(l=t.tags)==null?void 0:l.map(c=>s.jsx(ie,{variant:"outline",className:"text-sm",children:c},c))})]})}),s.jsx(Ze,{})]})},G3=()=>{const e=Wt();return p.useEffect(()=>{e.hash&&setTimeout(()=>dd(e.hash),200)},[e.hash]),s.jsxs("div",{className:"min-h-screen",children:[s.jsx(Xe,{}),s.jsxs("main",{className:"container mx-auto px-4 py-24",children:[s.jsx("h1",{className:"text-3xl font-bold mb-6",children:"People"}),s.jsx(w2,{})]}),s.jsx(Ze,{})]})},Y3=()=>{const{data:e,isLoading:t,isError:n}=wg(),[r,i]=p.useState(""),[a,o]=p.useState("All"),l=["All",...Array.from(new Set((e==null?void 0:e.map(h=>h.category))||[]))],c=e==null?void 0:e.filter(h=>{var b;const f=h.title.toLowerCase().includes(r.toLowerCase())||h.description.toLowerCase().includes(r.toLowerCase())||((b=h.tags)==null?void 0:b.some(g=>g.toLowerCase().includes(r.toLowerCase()))),m=a==="All"||h.category===a;return f&&m}).sort((h,f)=>new Date(f.date).getTime()-new Date(h.date).getTime()),u=c==null?void 0:c.filter(h=>h.featured),d=c==null?void 0:c.filter(h=>!h.featured);return t?s.jsxs("div",{className:"min-h-screen",children:[s.jsx(Xe,{}),s.jsx("main",{id:"main-content",className:"container mx-auto px-4 py-24",children:s.jsx("div",{className:"text-center py-20",children:"Loading news..."})}),s.jsx(Ze,{})]}):n?s.jsxs("div",{className:"min-h-screen",children:[s.jsx(Xe,{}),s.jsx("main",{id:"main-content",className:"container mx-auto px-4 py-24",children:s.jsx("div",{className:"text-center py-20",children:"Failed to load news"})}),s.jsx(Ze,{})]}):s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx(Xe,{}),s.jsx("main",{id:"main-content",className:"container mx-auto px-4 py-24",children:s.jsxs("div",{className:"max-w-7xl mx-auto",children:[s.jsxs(M.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},className:"mb-12",children:[s.jsx("h1",{className:"text-4xl md:text-5xl font-bold text-foreground mb-4",children:"News & Events"}),s.jsx("p",{className:"text-xl text-muted-foreground max-w-3xl leading-relaxed",children:"Stay updated with the latest developments, achievements, and events from CQT."})]}),s.jsxs(M.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:.1},className:"mb-8 space-y-4",children:[s.jsxs("div",{className:"relative",children:[s.jsx(Qt,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-5 w-5 text-muted-foreground"}),s.jsx($,{type:"text",placeholder:"Search news by title, description, or tags...",value:r,onChange:h=>i(h.target.value),className:"pl-10 h-12 text-base"})]}),s.jsxs("div",{className:"flex flex-wrap items-center gap-4",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Nh,{className:"h-4 w-4 text-muted-foreground"}),s.jsx("span",{className:"text-sm font-medium text-muted-foreground",children:"Category:"})]}),s.jsx("div",{className:"flex flex-wrap gap-2",children:l.map(h=>s.jsx(Q,{variant:a===h?"default":"outline",size:"sm",onClick:()=>o(h),className:"h-8",children:h},h))})]})]}),s.jsxs(M.div,{initial:{opacity:0},animate:{opacity:1},transition:{duration:.3,delay:.2},className:"mb-6 text-sm text-muted-foreground",children:["Showing ",(c==null?void 0:c.length)||0," article",(c==null?void 0:c.length)!==1?"s":""]}),u&&u.length>0&&s.jsxs(M.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:.3},className:"mb-12",children:[s.jsxs("h2",{className:"text-2xl font-bold text-foreground mb-6 flex items-center gap-2",children:["Featured News",s.jsx(ie,{variant:"outline",className:"border-primary text-primary",children:u.length})]}),s.jsx("div",{className:"grid lg:grid-cols-2 gap-6",children:u.map((h,f)=>s.jsx(M.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:f*.1},children:s.jsx(Ce,{to:`/news/${h.id}`,children:s.jsxs(te,{className:"hover:shadow-2xl transition-all duration-300 border-2 border-secondary/20 h-full group cursor-pointer",children:[s.jsxs(ue,{children:[s.jsxs("div",{className:"flex items-center justify-between mb-3",children:[s.jsx(ie,{variant:"secondary",className:"bg-secondary/10 text-secondary border-secondary/20",children:h.category}),s.jsxs("div",{className:"flex items-center gap-1 text-sm text-muted-foreground",children:[s.jsx(ut,{className:"h-4 w-4"}),new Date(h.date).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})]})]}),s.jsx(de,{className:"text-xl group-hover:text-primary transition-colors",children:h.title}),s.jsx(Rr,{className:"text-base",children:h.description})]}),s.jsx(ne,{children:s.jsxs("div",{className:"space-y-3",children:[h.author&&s.jsxs("p",{className:"text-sm text-muted-foreground",children:["By ",h.author]}),s.jsxs(Q,{variant:"link",className:"p-0 h-auto text-secondary group/btn",children:["Read full article",s.jsx(pi,{className:"ml-1 h-4 w-4 group-hover/btn:translate-x-1 transition-transform"})]})]})})]})})},h.id))})]}),d&&d.length>0&&s.jsxs(M.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:.4},children:[u&&u.length>0&&s.jsx("h2",{className:"text-2xl font-bold text-foreground mb-6",children:"All News"}),s.jsx("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-6",children:d.map((h,f)=>s.jsx(M.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:f*.05},children:s.jsx(Ce,{to:`/news/${h.id}`,children:s.jsxs(te,{className:"hover:shadow-xl transition-all duration-300 hover:-translate-y-1 border-border h-full group cursor-pointer",children:[s.jsxs(ue,{children:[s.jsxs("div",{className:"flex items-center justify-between mb-3",children:[s.jsx(ie,{variant:"secondary",className:"bg-secondary/10 text-secondary border-secondary/20 text-xs",children:h.category}),s.jsxs("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[s.jsx(ut,{className:"h-3 w-3"}),new Date(h.date).toLocaleDateString("en-US",{month:"short",day:"numeric"})]})]}),s.jsx(de,{className:"text-base group-hover:text-primary transition-colors line-clamp-2",children:h.title}),s.jsx(Rr,{className:"text-sm line-clamp-3",children:h.description})]}),s.jsx(ne,{children:s.jsxs(Q,{variant:"link",className:"p-0 h-auto text-secondary group/btn text-sm",children:["Read more",s.jsx(pi,{className:"ml-1 h-3 w-3 group-hover/btn:translate-x-1 transition-transform"})]})})]})})},h.id))})]}),c&&c.length===0&&s.jsxs(M.div,{initial:{opacity:0},animate:{opacity:1},transition:{duration:.5},className:"text-center py-20",children:[s.jsx(Qt,{className:"h-16 w-16 text-muted-foreground mx-auto mb-4 opacity-50"}),s.jsx("h3",{className:"text-2xl font-bold text-foreground mb-2",children:"No news found"}),s.jsx("p",{className:"text-muted-foreground mb-6",children:"Try adjusting your search or filters"}),s.jsx(Q,{variant:"outline",onClick:()=>{i(""),o("All")},children:"Clear Filters"})]})]})}),s.jsx(Ze,{})]})},X3=()=>{var o;const{id:e}=kl(),{data:t,isLoading:n,isError:r}=M3(e),{data:i}=wg(),a=i==null?void 0:i.filter(l=>{var c;return((c=t==null?void 0:t.relatedNews)==null?void 0:c.includes(l.id))||l.category===(t==null?void 0:t.category)&&l.id!==(t==null?void 0:t.id)}).slice(0,3);return n?s.jsxs("div",{className:"min-h-screen",children:[s.jsx(Xe,{}),s.jsx("main",{id:"main-content",className:"container mx-auto px-4 py-24",children:s.jsx("div",{className:"text-center py-20",children:"Loading news article..."})}),s.jsx(Ze,{})]}):r||!t?s.jsxs("div",{className:"min-h-screen",children:[s.jsx(Xe,{}),s.jsx("main",{id:"main-content",className:"container mx-auto px-4 py-24",children:s.jsxs("div",{className:"text-center py-20",children:[s.jsx("h2",{className:"text-2xl font-bold mb-4",children:"Article Not Found"}),s.jsx(Ce,{to:"/news",children:s.jsxs(Q,{variant:"outline",children:[s.jsx(Mn,{className:"mr-2 h-4 w-4"}),"Back to News"]})})]})}),s.jsx(Ze,{})]}):s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx(Xe,{}),s.jsx("main",{id:"main-content",className:"container mx-auto px-4 py-24",children:s.jsxs("div",{className:"max-w-4xl mx-auto",children:[s.jsx(M.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{duration:.3},className:"mb-6",children:s.jsx(Ce,{to:"/news",children:s.jsxs(Q,{variant:"ghost",size:"sm",children:[s.jsx(Mn,{className:"mr-2 h-4 w-4"}),"Back to News"]})})}),s.jsxs(M.article,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},className:"mb-8",children:[s.jsxs("div",{className:"flex flex-wrap gap-2 mb-4",children:[s.jsx(ie,{variant:"secondary",className:"bg-secondary/10 text-secondary border-secondary/20",children:t.category}),t.featured&&s.jsx(ie,{variant:"outline",className:"border-primary text-primary",children:"Featured"})]}),s.jsx("h1",{className:"text-4xl md:text-5xl font-bold text-foreground mb-6 leading-tight",children:t.title}),s.jsxs("div",{className:"flex flex-wrap items-center gap-6 text-sm text-muted-foreground mb-6 pb-6 border-b border-border",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(ut,{className:"h-4 w-4"}),s.jsx("span",{children:new Date(t.date).toLocaleDateString("en-US",{month:"long",day:"numeric",year:"numeric"})})]}),t.author&&s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(jp,{className:"h-4 w-4"}),s.jsx("span",{children:t.author})]})]}),t.excerpt&&s.jsx("p",{className:"text-xl text-muted-foreground leading-relaxed mb-8 font-medium",children:t.excerpt})]}),t.image&&s.jsx(M.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{duration:.5,delay:.2},className:"mb-12 rounded-xl overflow-hidden shadow-2xl",children:s.jsx("img",{src:t.image,alt:t.title,className:"w-full h-96 object-cover"})}),s.jsx(M.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:.3},className:"mb-12",children:s.jsx("div",{className:"prose prose-lg max-w-none text-foreground",children:(o=t.content)==null?void 0:o.split(` `).map((l,c)=>s.jsx("p",{className:"mb-6 leading-relaxed text-lg",children:l},c))})}),t.externalLinks&&t.externalLinks.length>0&&s.jsx(M.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:.4},className:"mb-12",children:s.jsxs(te,{className:"border-border bg-primary/5",children:[s.jsx(ue,{children:s.jsxs(de,{className:"text-lg flex items-center gap-2",children:[s.jsx(Zt,{className:"h-5 w-5"}),"Additional Resources"]})}),s.jsx(ne,{children:s.jsx("ul",{className:"space-y-2",children:t.externalLinks.map((l,c)=>s.jsx("li",{children:s.jsxs("a",{href:l.url,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 text-primary hover:underline",children:[s.jsx(Zt,{className:"h-4 w-4"}),l.title]})},c))})})]})}),t.tags&&t.tags.length>0&&s.jsx(M.div,{initial:{opacity:0},animate:{opacity:1},transition:{duration:.5,delay:.5},className:"mb-12",children:s.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[s.jsx(wT,{className:"h-4 w-4 text-muted-foreground"}),t.tags.map(l=>s.jsx(ie,{variant:"outline",className:"text-sm",children:l},l))]})}),a&&a.length>0&&s.jsxs(M.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:.6},className:"mb-12",children:[s.jsx("h2",{className:"text-2xl font-bold text-foreground mb-6",children:"Related News"}),s.jsx("div",{className:"grid md:grid-cols-3 gap-6",children:a.map((l,c)=>s.jsx(M.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:c*.1},children:s.jsx(Ce,{to:`/news/${l.id}`,children:s.jsxs(te,{className:"h-full border-border hover:shadow-xl transition-all duration-300 hover:-translate-y-1 group cursor-pointer",children:[s.jsxs(ue,{children:[s.jsxs("div",{className:"flex items-center justify-between mb-2",children:[s.jsx(ie,{variant:"secondary",className:"bg-secondary/10 text-secondary border-secondary/20 text-xs",children:l.category}),s.jsxs("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[s.jsx(ut,{className:"h-3 w-3"}),new Date(l.date).toLocaleDateString("en-US",{month:"short",day:"numeric"})]})]}),s.jsx(de,{className:"text-base group-hover:text-primary transition-colors line-clamp-2",children:l.title}),s.jsx(Rr,{className:"text-sm line-clamp-2",children:l.description})]}),s.jsx(ne,{children:s.jsxs(Q,{variant:"link",className:"p-0 h-auto text-secondary group/btn",children:["Read more",s.jsx(pi,{className:"ml-1 h-3 w-3 group-hover/btn:translate-x-1 transition-transform"})]})})]})})},l.id))})]}),s.jsx(M.div,{initial:{opacity:0},animate:{opacity:1},transition:{duration:.5,delay:.7},className:"text-center",children:s.jsx(Ce,{to:"/news",children:s.jsxs(Q,{size:"lg",variant:"outline",children:[s.jsx(Mn,{className:"mr-2 h-4 w-4"}),"View All News"]})})})]})}),s.jsx(Ze,{})]})};var Dl=e=>e.type==="checkbox",Ys=e=>e instanceof Date,Et=e=>e==null;const N2=e=>typeof e=="object";var Je=e=>!Et(e)&&!Array.isArray(e)&&N2(e)&&!Ys(e),Z3=e=>Je(e)&&e.target?Dl(e.target)?e.target.checked:e.target.value:e,J3=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,eO=(e,t)=>e.has(J3(t)),tO=e=>{const t=e.constructor&&e.constructor.prototype;return Je(t)&&t.hasOwnProperty("isPrototypeOf")},Ng=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function ot(e){let t;const n=Array.isArray(e),r=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)t=new Date(e);else if(!(Ng&&(e instanceof Blob||r))&&(n||Je(e)))if(t=n?[]:{},!n&&!tO(e))t=e;else for(const i in e)e.hasOwnProperty(i)&&(t[i]=ot(e[i]));else return e;return t}var fd=e=>/^\w*$/.test(e),nt=e=>e===void 0,Cg=e=>Array.isArray(e)?e.filter(Boolean):[],Sg=e=>Cg(e.replace(/["|']|\]/g,"").split(/\.|\[/)),ee=(e,t,n)=>{if(!t||!Je(e))return n;const r=(fd(t)?[t]:Sg(t)).reduce((i,a)=>Et(i)?i:i[a],e);return nt(r)||r===e?nt(e[t])?n:e[t]:r},qn=e=>typeof e=="boolean",Ie=(e,t,n)=>{let r=-1;const i=fd(t)?[t]:Sg(t),a=i.length,o=a-1;for(;++r<a;){const l=i[r];let c=n;if(r!==o){const u=e[l];c=Je(u)||Array.isArray(u)?u:isNaN(+i[r+1])?{}:[]}if(l==="__proto__"||l==="constructor"||l==="prototype")return;e[l]=c,e=e[l]}};const rv={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Tn={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},pr={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},nO=V.createContext(null);nO.displayName="HookFormContext";var rO=(e,t,n,r=!0)=>{const i={defaultValues:t._defaultValues};for(const a in e)Object.defineProperty(i,a,{get:()=>{const o=a;return t._proxyFormState[o]!==Tn.all&&(t._proxyFormState[o]=!r||Tn.all),e[o]}});return i};const sO=typeof window<"u"?V.useLayoutEffect:V.useEffect;var Jn=e=>typeof e=="string",iO=(e,t,n,r,i)=>Jn(e)?(r&&t.watch.add(e),ee(n,e,i)):Array.isArray(e)?e.map(a=>(r&&t.watch.add(a),ee(n,a))):(r&&(t.watchAll=!0),n),mm=e=>Et(e)||!N2(e);function Zr(e,t,n=new WeakSet){if(mm(e)||mm(t))return e===t;if(Ys(e)&&Ys(t))return e.getTime()===t.getTime();const r=Object.keys(e),i=Object.keys(t);if(r.length!==i.length)return!1;if(n.has(e)||n.has(t))return!0;n.add(e),n.add(t);for(const a of r){const o=e[a];if(!i.includes(a))return!1;if(a!=="ref"){const l=t[a];if(Ys(o)&&Ys(l)||Je(o)&&Je(l)||Array.isArray(o)&&Array.isArray(l)?!Zr(o,l,n):o!==l)return!1}}return!0}var aO=(e,t,n,r,i)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:i||!0}}:{},Fo=e=>Array.isArray(e)?e:[e],sv=()=>{let e=[];return{get observers(){return e},next:i=>{for(const a of e)a.next&&a.next(i)},subscribe:i=>(e.push(i),{unsubscribe:()=>{e=e.filter(a=>a!==i)}}),unsubscribe:()=>{e=[]}}},Ft=e=>Je(e)&&!Object.keys(e).length,kg=e=>e.type==="file",Pn=e=>typeof e=="function",ku=e=>{if(!Ng)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},C2=e=>e.type==="select-multiple",Eg=e=>e.type==="radio",oO=e=>Eg(e)||Dl(e),xf=e=>ku(e)&&e.isConnected;function lO(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=nt(e)?r++:e[t[r++]];return e}function cO(e){for(const t in e)if(e.hasOwnProperty(t)&&!nt(e[t]))return!1;return!0}function et(e,t){const n=Array.isArray(t)?t:fd(t)?[t]:Sg(t),r=n.length===1?e:lO(e,n),i=n.length-1,a=n[i];return r&&delete r[a],i!==0&&(Je(r)&&Ft(r)||Array.isArray(r)&&cO(r))&&et(e,n.slice(0,-1)),e}var S2=e=>{for(const t in e)if(Pn(e[t]))return!0;return!1};function Eu(e,t={}){const n=Array.isArray(e);if(Je(e)||n)for(const r in e)Array.isArray(e[r])||Je(e[r])&&!S2(e[r])?(t[r]=Array.isArray(e[r])?[]:{},Eu(e[r],t[r])):Et(e[r])||(t[r]=!0);return t}function k2(e,t,n){const r=Array.isArray(e);if(Je(e)||r)for(const i in e)Array.isArray(e[i])||Je(e[i])&&!S2(e[i])?nt(t)||mm(n[i])?n[i]=Array.isArray(e[i])?Eu(e[i],[]):{...Eu(e[i])}:k2(e[i],Et(t)?{}:t[i],n[i]):n[i]=!Zr(e[i],t[i]);return n}var oo=(e,t)=>k2(e,t,Eu(t));const iv={value:!1,isValid:!1},av={value:!0,isValid:!0};var E2=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!nt(e[0].attributes.value)?nt(e[0].value)||e[0].value===""?av:{value:e[0].value,isValid:!0}:av:iv}return iv},T2=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>nt(e)?e:t?e===""?NaN:e&&+e:n&&Jn(e)?new Date(e):r?r(e):e;const ov={isValid:!1,value:null};var P2=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,ov):ov;function lv(e){const t=e.ref;return kg(t)?t.files:Eg(t)?P2(e.refs).value:C2(t)?[...t.selectedOptions].map(({value:n})=>n):Dl(t)?E2(e.refs).value:T2(nt(t.value)?e.ref.value:t.value,e)}var uO=(e,t,n,r)=>{const i={};for(const a of e){const o=ee(t,a);o&&Ie(i,a,o._f)}return{criteriaMode:n,names:[...e],fields:i,shouldUseNativeValidation:r}},Tu=e=>e instanceof RegExp,lo=e=>nt(e)?e:Tu(e)?e.source:Je(e)?Tu(e.value)?e.value.source:e.value:e,cv=e=>({isOnSubmit:!e||e===Tn.onSubmit,isOnBlur:e===Tn.onBlur,isOnChange:e===Tn.onChange,isOnAll:e===Tn.all,isOnTouch:e===Tn.onTouched});const uv="AsyncFunction";var dO=e=>!!e&&!!e.validate&&!!(Pn(e.validate)&&e.validate.constructor.name===uv||Je(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===uv)),fO=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate),dv=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const Lo=(e,t,n,r)=>{for(const i of n||Object.keys(e)){const a=ee(e,i);if(a){const{_f:o,...l}=a;if(o){if(o.refs&&o.refs[0]&&t(o.refs[0],i)&&!r)return!0;if(o.ref&&t(o.ref,o.name)&&!r)return!0;if(Lo(l,t))break}else if(Je(l)&&Lo(l,t))break}}};function fv(e,t,n){const r=ee(e,n);if(r||fd(n))return{error:r,name:n};const i=n.split(".");for(;i.length;){const a=i.join("."),o=ee(t,a),l=ee(e,a);if(o&&!Array.isArray(o)&&n!==a)return{name:n};if(l&&l.type)return{name:a,error:l};if(l&&l.root&&l.root.type)return{name:`${a}.root`,error:l.root};i.pop()}return{name:n}}var hO=(e,t,n,r)=>{n(e);const{name:i,...a}=e;return Ft(a)||Object.keys(a).length>=Object.keys(t).length||Object.keys(a).find(o=>t[o]===(!r||Tn.all))},mO=(e,t,n)=>!e||!t||e===t||Fo(e).some(r=>r&&(n?r===t:r.startsWith(t)||t.startsWith(r))),pO=(e,t,n,r,i)=>i.isOnAll?!1:!n&&i.isOnTouch?!(t||e):(n?r.isOnBlur:i.isOnBlur)?!e:(n?r.isOnChange:i.isOnChange)?e:!0,gO=(e,t)=>!Cg(ee(e,t)).length&&et(e,t),xO=(e,t,n)=>{const r=Fo(ee(e,n));return Ie(r,"root",t[n]),Ie(e,n,r),e},Ic=e=>Jn(e);function hv(e,t,n="validate"){if(Ic(e)||Array.isArray(e)&&e.every(Ic)||qn(e)&&!e)return{type:n,message:Ic(e)?e:"",ref:t}}var Ri=e=>Je(e)&&!Tu(e)?e:{value:e,message:""},mv=async(e,t,n,r,i,a)=>{const{ref:o,refs:l,required:c,maxLength:u,minLength:d,min:h,max:f,pattern:m,validate:b,name:g,valueAsNumber:v,mount:x}=e._f,y=ee(n,g);if(!x||t.has(g))return{};const w=l?l[0]:o,j=O=>{i&&w.reportValidity&&(w.setCustomValidity(qn(O)?"":O||""),w.reportValidity())},C={},N=Eg(o),S=Dl(o),T=N||S,k=(v||kg(o))&&nt(o.value)&&nt(y)||ku(o)&&o.value===""||y===""||Array.isArray(y)&&!y.length,A=aO.bind(null,g,r,C),z=(O,W,_,re=pr.maxLength,Y=pr.minLength)=>{const G=O?W:_;C[g]={type:O?re:Y,message:G,ref:o,...A(O?re:Y,G)}};if(a?!Array.isArray(y)||!y.length:c&&(!T&&(k||Et(y))||qn(y)&&!y||S&&!E2(l).isValid||N&&!P2(l).isValid)){const{value:O,message:W}=Ic(c)?{value:!!c,message:c}:Ri(c);if(O&&(C[g]={type:pr.required,message:W,ref:w,...A(pr.required,W)},!r))return j(W),C}if(!k&&(!Et(h)||!Et(f))){let O,W;const _=Ri(f),re=Ri(h);if(!Et(y)&&!isNaN(y)){const Y=o.valueAsNumber||y&&+y;Et(_.value)||(O=Y>_.value),Et(re.value)||(W=Y<re.value)}else{const Y=o.valueAsDate||new Date(y),G=H=>new Date(new Date().toDateString()+" "+H),D=o.type=="time",L=o.type=="week";Jn(_.value)&&y&&(O=D?G(y)>G(_.value):L?y>_.value:Y>new Date(_.value)),Jn(re.value)&&y&&(W=D?G(y)<G(re.value):L?y<re.value:Y<new Date(re.value))}if((O||W)&&(z(!!O,_.message,re.message,pr.max,pr.min),!r))return j(C[g].message),C}if((u||d)&&!k&&(Jn(y)||a&&Array.isArray(y))){const O=Ri(u),W=Ri(d),_=!Et(O.value)&&y.length>+O.value,re=!Et(W.value)&&y.length<+W.value;if((_||re)&&(z(_,O.message,W.message),!r))return j(C[g].message),C}if(m&&!k&&Jn(y)){const{value:O,message:W}=Ri(m);if(Tu(O)&&!y.match(O)&&(C[g]={type:pr.pattern,message:W,ref:o,...A(pr.pattern,W)},!r))return j(W),C}if(b){if(Pn(b)){const O=await b(y,n),W=hv(O,w);if(W&&(C[g]={...W,...A(pr.validate,W.message)},!r))return j(W.message),C}else if(Je(b)){let O={};for(const W in b){if(!Ft(O)&&!r)break;const _=hv(await b[W](y,n),w,W);_&&(O={..._,...A(W,_.message)},j(_.message),r&&(C[g]=O))}if(!Ft(O)&&(C[g]={ref:w,...O},!r))return C}}return j(!0),C};const yO={mode:Tn.onSubmit,reValidateMode:Tn.onChange,shouldFocusError:!0};function vO(e={}){let t={...yO,...e},n={submitCount:0,isDirty:!1,isReady:!1,isLoading:Pn(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},r={},i=Je(t.defaultValues)||Je(t.values)?ot(t.defaultValues||t.values)||{}:{},a=t.shouldUnregister?{}:ot(i),o={action:!1,mount:!1,watch:!1},l={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},c,u=0;const d={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let h={...d};const f={array:sv(),state:sv()},m=t.criteriaMode===Tn.all,b=E=>R=>{clearTimeout(u),u=setTimeout(E,R)},g=async E=>{if(!t.disabled&&(d.isValid||h.isValid||E)){const R=t.resolver?Ft((await S()).errors):await k(r,!0);R!==n.isValid&&f.state.next({isValid:R})}},v=(E,R)=>{!t.disabled&&(d.isValidating||d.validatingFields||h.isValidating||h.validatingFields)&&((E||Array.from(l.mount)).forEach(F=>{F&&(R?Ie(n.validatingFields,F,R):et(n.validatingFields,F))}),f.state.next({validatingFields:n.validatingFields,isValidating:!Ft(n.validatingFields)}))},x=(E,R=[],F,K,q=!0,U=!0)=>{if(K&&F&&!t.disabled){if(o.action=!0,U&&Array.isArray(ee(r,E))){const X=F(ee(r,E),K.argA,K.argB);q&&Ie(r,E,X)}if(U&&Array.isArray(ee(n.errors,E))){const X=F(ee(n.errors,E),K.argA,K.argB);q&&Ie(n.errors,E,X),gO(n.errors,E)}if((d.touchedFields||h.touchedFields)&&U&&Array.isArray(ee(n.touchedFields,E))){const X=F(ee(n.touchedFields,E),K.argA,K.argB);q&&Ie(n.touchedFields,E,X)}(d.dirtyFields||h.dirtyFields)&&(n.dirtyFields=oo(i,a)),f.state.next({name:E,isDirty:z(E,R),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else Ie(a,E,R)},y=(E,R)=>{Ie(n.errors,E,R),f.state.next({errors:n.errors})},w=E=>{n.errors=E,f.state.next({errors:n.errors,isValid:!1})},j=(E,R,F,K)=>{const q=ee(r,E);if(q){const U=ee(a,E,nt(F)?ee(i,E):F);nt(U)||K&&K.defaultChecked||R?Ie(a,E,R?U:lv(q._f)):_(E,U),o.mount&&g()}},C=(E,R,F,K,q)=>{let U=!1,X=!1;const ye={name:E};if(!t.disabled){if(!F||K){(d.isDirty||h.isDirty)&&(X=n.isDirty,n.isDirty=ye.isDirty=z(),U=X!==ye.isDirty);const Te=Zr(ee(i,E),R);X=!!ee(n.dirtyFields,E),Te?et(n.dirtyFields,E):Ie(n.dirtyFields,E,!0),ye.dirtyFields=n.dirtyFields,U=U||(d.dirtyFields||h.dirtyFields)&&X!==!Te}if(F){const Te=ee(n.touchedFields,E);Te||(Ie(n.touchedFields,E,F),ye.touchedFields=n.touchedFields,U=U||(d.touchedFields||h.touchedFields)&&Te!==F)}U&&q&&f.state.next(ye)}return U?ye:{}},N=(E,R,F,K)=>{const q=ee(n.errors,E),U=(d.isValid||h.isValid)&&qn(R)&&n.isValid!==R;if(t.delayError&&F?(c=b(()=>y(E,F)),c(t.delayError)):(clearTimeout(u),c=null,F?Ie(n.errors,E,F):et(n.errors,E)),(F?!Zr(q,F):q)||!Ft(K)||U){const X={...K,...U&&qn(R)?{isValid:R}:{},errors:n.errors,name:E};n={...n,...X},f.state.next(X)}},S=async E=>{v(E,!0);const R=await t.resolver(a,t.context,uO(E||l.mount,r,t.criteriaMode,t.shouldUseNativeValidation));return v(E),R},T=async E=>{const{errors:R}=await S(E);if(E)for(const F of E){const K=ee(R,F);K?Ie(n.errors,F,K):et(n.errors,F)}else n.errors=R;return R},k=async(E,R,F={valid:!0})=>{for(const K in E){const q=E[K];if(q){const{_f:U,...X}=q;if(U){const ye=l.array.has(U.name),Te=q._f&&dO(q._f);Te&&d.validatingFields&&v([K],!0);const Dt=await mv(q,l.disabled,a,m,t.shouldUseNativeValidation&&!R,ye);if(Te&&d.validatingFields&&v([K]),Dt[U.name]&&(F.valid=!1,R))break;!R&&(ee(Dt,U.name)?ye?xO(n.errors,Dt,U.name):Ie(n.errors,U.name,Dt[U.name]):et(n.errors,U.name))}!Ft(X)&&await k(X,R,F)}}return F.valid},A=()=>{for(const E of l.unMount){const R=ee(r,E);R&&(R._f.refs?R._f.refs.every(F=>!xf(F)):!xf(R._f.ref))&&we(E)}l.unMount=new Set},z=(E,R)=>!t.disabled&&(E&&R&&Ie(a,E,R),!Zr(H(),i)),O=(E,R,F)=>iO(E,l,{...o.mount?a:nt(R)?i:Jn(E)?{[E]:R}:R},F,R),W=E=>Cg(ee(o.mount?a:i,E,t.shouldUnregister?ee(i,E,[]):[])),_=(E,R,F={})=>{const K=ee(r,E);let q=R;if(K){const U=K._f;U&&(!U.disabled&&Ie(a,E,T2(R,U)),q=ku(U.ref)&&Et(R)?"":R,C2(U.ref)?[...U.ref.options].forEach(X=>X.selected=q.includes(X.value)):U.refs?Dl(U.ref)?U.refs.forEach(X=>{(!X.defaultChecked||!X.disabled)&&(Array.isArray(q)?X.checked=!!q.find(ye=>ye===X.value):X.checked=q===X.value||!!q)}):U.refs.forEach(X=>X.checked=X.value===q):kg(U.ref)?U.ref.value="":(U.ref.value=q,U.ref.type||f.state.next({name:E,values:ot(a)})))}(F.shouldDirty||F.shouldTouch)&&C(E,q,F.shouldTouch,F.shouldDirty,!0),F.shouldValidate&&L(E)},re=(E,R,F)=>{for(const K in R){if(!R.hasOwnProperty(K))return;const q=R[K],U=E+"."+K,X=ee(r,U);(l.array.has(E)||Je(q)||X&&!X._f)&&!Ys(q)?re(U,q,F):_(U,q,F)}},Y=(E,R,F={})=>{const K=ee(r,E),q=l.array.has(E),U=ot(R);Ie(a,E,U),q?(f.array.next({name:E,values:ot(a)}),(d.isDirty||d.dirtyFields||h.isDirty||h.dirtyFields)&&F.shouldDirty&&f.state.next({name:E,dirtyFields:oo(i,a),isDirty:z(E,U)})):K&&!K._f&&!Et(U)?re(E,U,F):_(E,U,F),dv(E,l)&&f.state.next({...n,name:E}),f.state.next({name:o.mount?E:void 0,values:ot(a)})},G=async E=>{o.mount=!0;const R=E.target;let F=R.name,K=!0;const q=ee(r,F),U=Te=>{K=Number.isNaN(Te)||Ys(Te)&&isNaN(Te.getTime())||Zr(Te,ee(a,F,Te))},X=cv(t.mode),ye=cv(t.reValidateMode);if(q){let Te,Dt;const fr=R.type?lv(q._f):Z3(E),Bn=E.type===rv.BLUR||E.type===rv.FOCUS_OUT,Fl=!fO(q._f)&&!t.resolver&&!ee(n.errors,F)&&!q._f.deps||pO(Bn,ee(n.touchedFields,F),n.isSubmitted,ye,X),Is=dv(F,l,Bn);Ie(a,F,fr),Bn?(q._f.onBlur&&q._f.onBlur(E),c&&c(0)):q._f.onChange&&q._f.onChange(E);const Un=C(F,fr,Bn),Ll=!Ft(Un)||Is;if(!Bn&&f.state.next({name:F,type:E.type,values:ot(a)}),Fl)return(d.isValid||h.isValid)&&(t.mode==="onBlur"?Bn&&g():Bn||g()),Ll&&f.state.next({name:F,...Is?{}:Un});if(!Bn&&Is&&f.state.next({...n}),t.resolver){const{errors:hr}=await S([F]);if(U(fr),K){const gd=fv(n.errors,r,F),Ol=fv(hr,r,gd.name||F);Te=Ol.error,F=Ol.name,Dt=Ft(hr)}}else v([F],!0),Te=(await mv(q,l.disabled,a,m,t.shouldUseNativeValidation))[F],v([F]),U(fr),K&&(Te?Dt=!1:(d.isValid||h.isValid)&&(Dt=await k(r,!0)));K&&(q._f.deps&&L(q._f.deps),N(F,Dt,Te,Un))}},D=(E,R)=>{if(ee(n.errors,R)&&E.focus)return E.focus(),1},L=async(E,R={})=>{let F,K;const q=Fo(E);if(t.resolver){const U=await T(nt(E)?E:q);F=Ft(U),K=E?!q.some(X=>ee(U,X)):F}else E?(K=(await Promise.all(q.map(async U=>{const X=ee(r,U);return await k(X&&X._f?{[U]:X}:X)}))).every(Boolean),!(!K&&!n.isValid)&&g()):K=F=await k(r);return f.state.next({...!Jn(E)||(d.isValid||h.isValid)&&F!==n.isValid?{}:{name:E},...t.resolver||!E?{isValid:F}:{},errors:n.errors}),R.shouldFocus&&!K&&Lo(r,D,E?q:l.mount),K},H=E=>{const R={...o.mount?a:i};return nt(E)?R:Jn(E)?ee(R,E):E.map(F=>ee(R,F))},ce=(E,R)=>({invalid:!!ee((R||n).errors,E),isDirty:!!ee((R||n).dirtyFields,E),error:ee((R||n).errors,E),isValidating:!!ee(n.validatingFields,E),isTouched:!!ee((R||n).touchedFields,E)}),se=E=>{E&&Fo(E).forEach(R=>et(n.errors,R)),f.state.next({errors:E?n.errors:{}})},me=(E,R,F)=>{const K=(ee(r,E,{_f:{}})._f||{}).ref,q=ee(n.errors,E)||{},{ref:U,message:X,type:ye,...Te}=q;Ie(n.errors,E,{...Te,...R,ref:K}),f.state.next({name:E,errors:n.errors,isValid:!1}),F&&F.shouldFocus&&K&&K.focus&&K.focus()},pe=(E,R)=>Pn(E)?f.state.subscribe({next:F=>"values"in F&&E(O(void 0,R),F)}):O(E,R,!0),ze=E=>f.state.subscribe({next:R=>{mO(E.name,R.name,E.exact)&&hO(R,E.formState||d,Qa,E.reRenderRoot)&&E.callback({values:{...a},...n,...R,defaultValues:i})}}).unsubscribe,at=E=>(o.mount=!0,h={...h,...E.formState},ze({...E,formState:h})),we=(E,R={})=>{for(const F of E?Fo(E):l.mount)l.mount.delete(F),l.array.delete(F),R.keepValue||(et(r,F),et(a,F)),!R.keepError&&et(n.errors,F),!R.keepDirty&&et(n.dirtyFields,F),!R.keepTouched&&et(n.touchedFields,F),!R.keepIsValidating&&et(n.validatingFields,F),!t.shouldUnregister&&!R.keepDefaultValue&&et(i,F);f.state.next({values:ot(a)}),f.state.next({...n,...R.keepDirty?{isDirty:z()}:{}}),!R.keepIsValid&&g()},cr=({disabled:E,name:R})=>{(qn(E)&&o.mount||E||l.disabled.has(R))&&(E?l.disabled.add(R):l.disabled.delete(R))},tn=(E,R={})=>{let F=ee(r,E);const K=qn(R.disabled)||qn(t.disabled);return Ie(r,E,{...F||{},_f:{...F&&F._f?F._f:{ref:{name:E}},name:E,mount:!0,...R}}),l.mount.add(E),F?cr({disabled:qn(R.disabled)?R.disabled:t.disabled,name:E}):j(E,!0,R.value),{...K?{disabled:R.disabled||t.disabled}:{},...t.progressive?{required:!!R.required,min:lo(R.min),max:lo(R.max),minLength:lo(R.minLength),maxLength:lo(R.maxLength),pattern:lo(R.pattern)}:{},name:E,onChange:G,onBlur:G,ref:q=>{if(q){tn(E,R),F=ee(r,E);const U=nt(q.value)&&q.querySelectorAll&&q.querySelectorAll("input,select,textarea")[0]||q,X=oO(U),ye=F._f.refs||[];if(X?ye.find(Te=>Te===U):U===F._f.ref)return;Ie(r,E,{_f:{...F._f,...X?{refs:[...ye.filter(xf),U,...Array.isArray(ee(i,E))?[{}]:[]],ref:{type:U.type,name:E}}:{ref:U}}}),j(E,!1,void 0,U)}else F=ee(r,E,{}),F._f&&(F._f.mount=!1),(t.shouldUnregister||R.shouldUnregister)&&!(eO(l.array,E)&&o.action)&&l.unMount.add(E)}}},gn=()=>t.shouldFocusError&&Lo(r,D,l.mount),zn=E=>{qn(E)&&(f.state.next({disabled:E}),Lo(r,(R,F)=>{const K=ee(r,F);K&&(R.disabled=K._f.disabled||E,Array.isArray(K._f.refs)&&K._f.refs.forEach(q=>{q.disabled=K._f.disabled||E}))},0,!1))},ur=(E,R)=>async F=>{let K;F&&(F.preventDefault&&F.preventDefault(),F.persist&&F.persist());let q=ot(a);if(f.state.next({isSubmitting:!0}),t.resolver){const{errors:U,values:X}=await S();n.errors=U,q=ot(X)}else await k(r);if(l.disabled.size)for(const U of l.disabled)et(q,U);if(et(n.errors,"root"),Ft(n.errors)){f.state.next({errors:{}});try{await E(q,F)}catch(U){K=U}}else R&&await R({...n.errors},F),gn(),setTimeout(gn);if(f.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Ft(n.errors)&&!K,submitCount:n.submitCount+1,errors:n.errors}),K)throw K},$n=(E,R={})=>{ee(r,E)&&(nt(R.defaultValue)?Y(E,ot(ee(i,E))):(Y(E,R.defaultValue),Ie(i,E,ot(R.defaultValue))),R.keepTouched||et(n.touchedFields,E),R.keepDirty||(et(n.dirtyFields,E),n.isDirty=R.defaultValue?z(E,ot(ee(i,E))):z()),R.keepError||(et(n.errors,E),d.isValid&&g()),f.state.next({...n}))},Os=(E,R={})=>{const F=E?ot(E):i,K=ot(F),q=Ft(E),U=q?i:K;if(R.keepDefaultValues||(i=F),!R.keepValues){if(R.keepDirtyValues){const X=new Set([...l.mount,...Object.keys(oo(i,a))]);for(const ye of Array.from(X))ee(n.dirtyFields,ye)?Ie(U,ye,ee(a,ye)):Y(ye,ee(U,ye))}else{if(Ng&&nt(E))for(const X of l.mount){const ye=ee(r,X);if(ye&&ye._f){const Te=Array.isArray(ye._f.refs)?ye._f.refs[0]:ye._f.ref;if(ku(Te)){const Dt=Te.closest("form");if(Dt){Dt.reset();break}}}}if(R.keepFieldsRef)for(const X of l.mount)Y(X,ee(U,X));else r={}}a=t.shouldUnregister?R.keepDefaultValues?ot(i):{}:ot(U),f.array.next({values:{...U}}),f.state.next({values:{...U}})}l={mount:R.keepDirtyValues?l.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},o.mount=!d.isValid||!!R.keepIsValid||!!R.keepDirtyValues,o.watch=!!t.shouldUnregister,f.state.next({submitCount:R.keepSubmitCount?n.submitCount:0,isDirty:q?!1:R.keepDirty?n.isDirty:!!(R.keepDefaultValues&&!Zr(E,i)),isSubmitted:R.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:q?{}:R.keepDirtyValues?R.keepDefaultValues&&a?oo(i,a):n.dirtyFields:R.keepDefaultValues&&E?oo(i,E):R.keepDirty?n.dirtyFields:{},touchedFields:R.keepTouched?n.touchedFields:{},errors:R.keepErrors?n.errors:{},isSubmitSuccessful:R.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},Ei=(E,R)=>Os(Pn(E)?E(a):E,R),Ti=(E,R={})=>{const F=ee(r,E),K=F&&F._f;if(K){const q=K.refs?K.refs[0]:K.ref;q.focus&&(q.focus(),R.shouldSelect&&Pn(q.select)&&q.select())}},Qa=E=>{n={...n,...E}},dr={control:{register:tn,unregister:we,getFieldState:ce,handleSubmit:ur,setError:me,_subscribe:ze,_runSchema:S,_focusError:gn,_getWatch:O,_getDirty:z,_setValid:g,_setFieldArray:x,_setDisabledField:cr,_setErrors:w,_getFieldArray:W,_reset:Os,_resetDefaultValues:()=>Pn(t.defaultValues)&&t.defaultValues().then(E=>{Ei(E,t.resetOptions),f.state.next({isLoading:!1})}),_removeUnmounted:A,_disableForm:zn,_subjects:f,_proxyFormState:d,get _fields(){return r},get _formValues(){return a},get _state(){return o},set _state(E){o=E},get _defaultValues(){return i},get _names(){return l},set _names(E){l=E},get _formState(){return n},get _options(){return t},set _options(E){t={...t,...E}}},subscribe:at,trigger:L,register:tn,handleSubmit:ur,watch:pe,setValue:Y,getValues:H,reset:Ei,resetField:$n,clearErrors:se,unregister:we,setError:me,setFocus:Ti,getFieldState:ce};return{...dr,formControl:dr}}function bO(e={}){const t=V.useRef(void 0),n=V.useRef(void 0),[r,i]=V.useState({isDirty:!1,isValidating:!1,isLoading:Pn(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:Pn(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:r},e.defaultValues&&!Pn(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{const{formControl:o,...l}=vO(e);t.current={...l,formState:r}}const a=t.current.control;return a._options=e,sO(()=>{const o=a._subscribe({formState:a._proxyFormState,callback:()=>i({...a._formState}),reRenderRoot:!0});return i(l=>({...l,isReady:!0})),a._formState.isReady=!0,o},[a]),V.useEffect(()=>a._disableForm(e.disabled),[a,e.disabled]),V.useEffect(()=>{e.mode&&(a._options.mode=e.mode),e.reValidateMode&&(a._options.reValidateMode=e.reValidateMode)},[a,e.mode,e.reValidateMode]),V.useEffect(()=>{e.errors&&(a._setErrors(e.errors),a._focusError())},[a,e.errors]),V.useEffect(()=>{e.shouldUnregister&&a._subjects.state.next({values:a._getWatch()})},[a,e.shouldUnregister]),V.useEffect(()=>{if(a._proxyFormState.isDirty){const o=a._getDirty();o!==r.isDirty&&a._subjects.state.next({isDirty:o})}},[a,r.isDirty]),V.useEffect(()=>{e.values&&!Zr(e.values,n.current)?(a._reset(e.values,{keepFieldsRef:!0,...a._options.resetOptions}),n.current=e.values,i(o=>({...o}))):a._resetDefaultValues()},[a,e.values]),V.useEffect(()=>{a._state.mount||(a._setValid(),a._state.mount=!0),a._state.watch&&(a._state.watch=!1,a._subjects.state.next({...a._formState})),a._removeUnmounted()}),t.current.formState=rO(r,a),t.current}const _e=p.forwardRef(({className:e,...t},n)=>s.jsx("textarea",{className:ge("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:n,...t}));_e.displayName="Textarea";const wO=()=>{const{register:e,handleSubmit:t,formState:{errors:n},reset:r}=bO(),{toast:i}=Mr(),[a,o]=p.useState(!1),l=c=>{o(!0);const u=JSON.parse(localStorage.getItem("cqt_contact_submissions")||"[]");u.unshift({...c,createdAt:new Date().toISOString()}),localStorage.setItem("cqt_contact_submissions",JSON.stringify(u)),setTimeout(()=>{o(!1),i({title:"Message sent",description:"Thank you — we will get back to you soon."}),r()},600)};return j2(),s.jsx("section",{id:"contact",className:"py-16",children:s.jsx("div",{className:"container mx-auto px-4",children:s.jsxs("div",{className:"grid lg:grid-cols-12 gap-8 items-stretch",children:[s.jsxs("div",{className:"lg:col-span-6 flex flex-col h-full space-y-6",children:[s.jsxs("div",{className:"bg-gradient-to-r from-quantum-dark/80 to-quantum-navy p-6 rounded-xl text-white shadow-lg reveal slide-left",style:{animationDelay:"0ms"},children:[s.jsx("h3",{className:"text-xl font-bold",children:"Get in touch"}),s.jsx("p",{className:"text-sm text-white/90 mt-2",children:"We’re here to answer your questions about research, collaboration, and career opportunities."})]}),s.jsxs("div",{className:"flex-1 grid gap-4 overflow-auto",children:[s.jsxs("div",{className:"group flex items-start gap-4 bg-card p-4 rounded-lg shadow transition-transform transform hover:-translate-y-1 hover:scale-[1.01] hover:shadow-quantum/40 border border-transparent hover:border-secondary/30 reveal card-anim transition-colors hover:bg-secondary/90 hover:text-white",style:{animationDelay:"120ms"},children:[s.jsx("div",{className:"p-3 rounded-lg bg-secondary/10 text-secondary transition-all group-hover:bg-card group-hover:text-secondary group-hover:scale-105",children:s.jsx(Ns,{className:"h-6 w-6"})}),s.jsxs("div",{children:[s.jsx("h4",{className:"font-semibold group-hover:text-white",children:"Visit Us"}),s.jsx("p",{className:"text-sm text-muted-foreground group-hover:text-white/90",children:"IIIT Delhi, Okhla Industrial Estate, New Delhi - 110020, India"})]})]}),s.jsxs("div",{className:"group flex items-start gap-4 bg-card p-4 rounded-lg shadow transition-transform transform hover:-translate-y-1 hover:scale-[1.01] hover:shadow-quantum/40 border border-transparent hover:border-secondary/30 reveal card-anim transition-colors hover:bg-secondary/90 hover:text-white",style:{animationDelay:"200ms"},children:[s.jsx("div",{className:"p-3 rounded-lg bg-secondary/10 text-secondary transition-all group-hover:bg-card group-hover:text-secondary group-hover:scale-105",children:s.jsx(k1,{className:"h-6 w-6"})}),s.jsxs("div",{children:[s.jsx("h4",{className:"font-semibold group-hover:text-white",children:"Call / WhatsApp"}),s.jsx("a",{href:"#",className:"text-sm text-muted-foreground block group-hover:text-white/90",children:"Will be updated"}),s.jsx("a",{href:"#",target:"_blank",rel:"noreferrer",className:"text-sm text-secondary mt-1 inline-block group-hover:text-white",children:"Open WhatsApp"})]})]}),s.jsxs("div",{className:"group flex items-start gap-4 bg-card p-4 rounded-lg shadow transition-transform transform hover:-translate-y-1 hover:scale-[1.01] hover:shadow-quantum/40 border border-transparent hover:border-secondary/30 reveal card-anim transition-colors hover:bg-secondary/90 hover:text-white",style:{animationDelay:"280ms"},children:[s.jsx("div",{className:"p-3 rounded-lg bg-secondary/10 text-secondary transition-all group-hover:bg-card group-hover:text-secondary group-hover:scale-105",children:s.jsx(xi,{className:"h-6 w-6"})}),s.jsxs("div",{children:[s.jsx("h4",{className:"font-semibold group-hover:text-white",children:"Email"}),s.jsx("a",{href:"mailto:cqt@iiitd.ac.in",className:"text-sm text-muted-foreground group-hover:text-white/90",children:"cqt@iiitd.ac.in"})]})]}),s.jsxs("div",{className:"group flex items-start gap-4 bg-card p-4 rounded-lg shadow transition-transform transform hover:-translate-y-1 hover:scale-[1.01] hover:shadow-quantum/40 border border-transparent hover:border-secondary/30 reveal card-anim transition-colors hover:bg-secondary/90 hover:text-white",style:{animationDelay:"360ms"},children:[s.jsx("div",{className:"p-3 rounded-lg bg-secondary/10 text-secondary transition-all group-hover:bg-card group-hover:text-secondary group-hover:scale-105",children:s.jsx(gi,{className:"h-6 w-6"})}),s.jsxs("div",{children:[s.jsx("h4",{className:"font-semibold group-hover:text-white",children:"Office Hours"}),s.jsx("p",{className:"text-sm text-muted-foreground group-hover:text-white/90",children:"Mon - Fri: 9:30 AM - 6:00 PM"})]})]})]}),s.jsx("div",{className:"overflow-hidden rounded-lg h-64 shadow mt-6 mx-auto w-full reveal scale-in",style:{animationDelay:"440ms"},children:s.jsx("iframe",{title:"IIIT Delhi map",src:"https://www.google.com/maps?q=IIIT%20Delhi%20Okhla%20Industrial%20Estate&output=embed",className:"w-full h-full border-0",loading:"lazy"})})]}),s.jsx("div",{className:"lg:col-span-6 flex flex-col h-full",children:s.jsxs("div",{className:"bg-card p-6 rounded-xl shadow-lg reveal text-foreground scale-in flex flex-col h-full",style:{animationDelay:"200ms"},children:[s.jsx("h3",{className:"text-2xl font-bold mb-2",children:"Send us a message"}),s.jsx("p",{className:"text-sm text-muted-foreground mb-6",children:"Fill out the form and we'll get back to you as soon as possible."}),s.jsxs("form",{onSubmit:t(l),className:"grid grid-cols-1 gap-4",children:[s.jsxs("div",{className:"grid sm:grid-cols-2 gap-4",children:[s.jsxs("div",{className:"reveal",style:{animationDelay:"240ms"},children:[s.jsx("label",{className:"block text-sm font-medium mb-1",children:"Name"}),s.jsx($,{...e("name",{required:"Name is required"})}),n.name&&s.jsx("p",{className:"text-xs text-destructive mt-1",children:n.name.message})]}),s.jsxs("div",{className:"reveal",style:{animationDelay:"280ms"},children:[s.jsx("label",{className:"block text-sm font-medium mb-1",children:"Email"}),s.jsx($,{type:"email",...e("email",{required:"Email is required"})}),n.email&&s.jsx("p",{className:"text-xs text-destructive mt-1",children:n.email.message})]})]}),s.jsxs("div",{className:"grid sm:grid-cols-2 gap-4",children:[s.jsxs("div",{className:"reveal",style:{animationDelay:"320ms"},children:[s.jsx("label",{className:"block text-sm font-medium mb-1",children:"Phone"}),s.jsx($,{...e("phone"),placeholder:"+91-XXXXXXXXXX"})]}),s.jsxs("div",{className:"reveal",style:{animationDelay:"360ms"},children:[s.jsx("label",{className:"block text-sm font-medium mb-1",children:"Affiliation"}),s.jsx($,{...e("affiliation"),placeholder:"University / Company"})]})]}),s.jsxs("div",{className:"grid sm:grid-cols-2 gap-4",children:[s.jsxs("div",{className:"reveal",style:{animationDelay:"400ms"},children:[s.jsx("label",{className:"block text-sm font-medium mb-1",children:"Preferred contact"}),s.jsxs("select",{...e("preferredContact"),className:"w-full rounded-md border border-input bg-background text-foreground p-2 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",children:[s.jsx("option",{value:"email",children:"Email"}),s.jsx("option",{value:"phone",children:"Phone / WhatsApp"})]})]}),s.jsxs("div",{className:"reveal",style:{animationDelay:"440ms"},children:[s.jsx("label",{className:"block text-sm font-medium mb-1",children:"Best time to contact"}),s.jsx($,{...e("bestTime"),placeholder:"Eg: Weekdays 10am-2pm"})]})]}),s.jsxs("div",{className:"reveal",style:{animationDelay:"480ms"},children:[s.jsx("label",{className:"block text-sm font-medium mb-1",children:"Subject"}),s.jsx($,{...e("subject",{required:"Subject is required"})}),n.subject&&s.jsx("p",{className:"text-xs text-destructive mt-1",children:n.subject.message})]}),s.jsxs("div",{className:"reveal",style:{animationDelay:"520ms"},children:[s.jsx("label",{className:"block text-sm font-medium mb-1",children:"Message"}),s.jsx(_e,{...e("message",{required:"Message is required"}),rows:12}),n.message&&s.jsx("p",{className:"text-xs text-destructive mt-1",children:n.message.message})]}),s.jsxs("div",{className:"flex items-center gap-4 pt-2 mt-auto",children:[s.jsx(Q,{type:"submit",className:"px-6 btn-pop reveal",style:{animationDelay:"560ms"},disabled:a,children:a?"Sending...":"Send Message"}),s.jsx(Q,{variant:"ghost",onClick:()=>{r()},className:"reveal",style:{animationDelay:"600ms"},children:"Clear"})]})]})]})})]})})})},jO=()=>s.jsxs("div",{className:"min-h-screen",children:[s.jsx(Xe,{}),s.jsx("main",{id:"main-content",className:"container mx-auto px-4 py-24",children:s.jsx(wO,{})}),s.jsx(Ze,{})]}),NO=()=>{const{id:e}=kl(),{data:t,isLoading:n,isError:r}=R3(e);return n?s.jsx("div",{className:"py-24 text-center",children:"Loading..."}):r||!t?s.jsx("div",{className:"py-24 text-center",children:"Person not found"}):s.jsxs("div",{className:"min-h-screen",children:[s.jsx(Xe,{}),s.jsx("main",{className:"container mx-auto px-4 py-24",children:s.jsx("div",{className:"max-w-4xl mx-auto bg-card p-8 rounded-xl shadow",children:s.jsxs("div",{className:"flex items-start gap-6",children:[s.jsx("div",{className:"w-32 h-32 rounded-full bg-gradient-quantum flex items-center justify-center text-white text-3xl font-bold",children:t.name.split(" ").map(i=>i[0]).join("")}),s.jsxs("div",{children:[s.jsx("h1",{className:"text-2xl font-bold mb-1",children:t.name}),s.jsx("p",{className:"text-sm text-primary font-semibold mb-2",children:t.title}),s.jsx("p",{className:"text-sm text-muted-foreground mb-4",children:t.specialization}),s.jsx("p",{className:"text-base mb-4",children:t.bio}),s.jsxs("div",{className:"flex gap-4",children:[s.jsx("a",{href:`mailto:${t.email}`,children:s.jsx(Q,{variant:"outline",children:"Email"})}),s.jsx(Ce,{to:"/team",children:s.jsx(Q,{variant:"ghost",children:"Back to team"})})]})]})]})})}),s.jsx(Ze,{})]})};function CO(){const{id:e}=kl(),{data:t,isLoading:n,error:r}=L3(e);return n?s.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center",children:s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-primary mx-auto"}),s.jsx("p",{className:"mt-4 text-muted-foreground",children:"Loading course details..."})]})}):r||!t?s.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center",children:s.jsxs("div",{className:"text-center",children:[s.jsx("h2",{className:"text-2xl font-bold text-foreground mb-4",children:"Course Not Found"}),s.jsxs(Ce,{to:"/education",className:"text-primary hover:text-primary/80 flex items-center justify-center gap-2",children:[s.jsx(Mn,{className:"h-4 w-4"}),"Back to Education"]})]})}):s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx("div",{className:"bg-card border-b border-border",children:s.jsx("div",{className:"container mx-auto px-4 py-4",children:s.jsxs(Ce,{to:"/education",className:"inline-flex items-center gap-2 text-primary hover:text-primary/80 transition-colors",children:[s.jsx(Mn,{className:"h-4 w-4"}),"Back to Education"]})})}),s.jsxs("div",{className:"container mx-auto px-4 py-12",children:[s.jsxs(M.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},className:"mb-8",children:[s.jsxs("div",{className:"flex flex-wrap gap-2 mb-4",children:[s.jsx(ie,{variant:"outline",className:"text-sm",children:t.code}),s.jsx(ie,{className:t.level==="Undergraduate"?"bg-green-500/10 text-green-600 dark:text-green-400":"bg-primary/10 text-primary",children:t.level}),s.jsx(ie,{className:t.enrollmentStatus==="Open"?"bg-green-500 text-white":t.enrollmentStatus==="Closed"?"bg-red-500 text-white":"bg-yellow-500 text-white",children:t.enrollmentStatus}),t.featured&&s.jsx(ie,{className:"bg-gradient-to-r from-accent to-primary text-white",children:"Featured"})]}),s.jsx("h1",{className:"text-4xl md:text-5xl font-bold text-foreground mb-4",children:t.title}),s.jsx("p",{className:"text-xl text-muted-foreground leading-relaxed",children:t.description})]}),s.jsx(M.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{duration:.5,delay:.1},className:"mb-12",children:s.jsx("img",{src:t.image,alt:t.title,className:"w-full h-64 md:h-96 object-cover rounded-xl shadow-lg"})}),s.jsxs(M.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:.2},className:"grid md:grid-cols-4 gap-4 mb-12",children:[s.jsx(te,{children:s.jsxs(ne,{className:"p-6 text-center",children:[s.jsx(ut,{className:"h-8 w-8 text-primary mx-auto mb-2"}),s.jsx("p",{className:"text-sm text-muted-foreground mb-1",children:"Semester"}),s.jsx("p",{className:"font-semibold text-foreground",children:t.semester})]})}),s.jsx(te,{children:s.jsxs(ne,{className:"p-6 text-center",children:[s.jsx(gi,{className:"h-8 w-8 text-primary mx-auto mb-2"}),s.jsx("p",{className:"text-sm text-muted-foreground mb-1",children:"Duration"}),s.jsx("p",{className:"font-semibold text-foreground",children:t.duration})]})}),s.jsx(te,{children:s.jsxs(ne,{className:"p-6 text-center",children:[s.jsx(vp,{className:"h-8 w-8 text-primary mx-auto mb-2"}),s.jsx("p",{className:"text-sm text-muted-foreground mb-1",children:"Credits"}),s.jsx("p",{className:"font-semibold text-foreground",children:t.credits})]})}),s.jsx(te,{children:s.jsxs(ne,{className:"p-6 text-center",children:[s.jsx(mt,{className:"h-8 w-8 text-primary mx-auto mb-2"}),s.jsx("p",{className:"text-sm text-muted-foreground mb-1",children:"Enrollment"}),s.jsxs("p",{className:"font-semibold text-foreground",children:[t.enrolled,"/",t.capacity]})]})})]}),s.jsxs("div",{className:"grid lg:grid-cols-3 gap-8",children:[s.jsxs("div",{className:"lg:col-span-2 space-y-8",children:[s.jsx(M.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:.3},children:s.jsxs(te,{children:[s.jsx(ue,{children:s.jsxs(de,{className:"flex items-center gap-2",children:[s.jsx(jp,{className:"h-5 w-5"}),"Instructor"]})}),s.jsxs(ne,{children:[s.jsx("p",{className:"font-semibold text-lg text-foreground",children:t.instructor}),t.coInstructors&&t.coInstructors.length>0&&s.jsxs("div",{className:"mt-3",children:[s.jsx("p",{className:"text-sm text-muted-foreground mb-2",children:"Co-Instructors:"}),s.jsx("div",{className:"flex flex-wrap gap-2",children:t.coInstructors.map((i,a)=>s.jsx(ie,{variant:"outline",children:i},a))})]})]})]})}),t.prerequisites&&t.prerequisites.length>0&&s.jsx(M.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:.4},children:s.jsxs(te,{children:[s.jsx(ue,{children:s.jsxs(de,{className:"flex items-center gap-2",children:[s.jsx(el,{className:"h-5 w-5"}),"Prerequisites"]})}),s.jsx(ne,{children:s.jsx("ul",{className:"space-y-2",children:t.prerequisites.map((i,a)=>s.jsxs("li",{className:"flex items-start gap-2",children:[s.jsx(Ks,{className:"h-5 w-5 text-primary flex-shrink-0 mt-0.5"}),s.jsx("span",{className:"text-foreground",children:i})]},a))})})]})}),t.objectives&&t.objectives.length>0&&s.jsx(M.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:.5},children:s.jsxs(te,{children:[s.jsx(ue,{children:s.jsx(de,{children:"Learning Objectives"})}),s.jsx(ne,{children:s.jsx("ul",{className:"space-y-3",children:t.objectives.map((i,a)=>s.jsxs("li",{className:"flex items-start gap-3",children:[s.jsx("div",{className:"flex-shrink-0 w-6 h-6 rounded-full bg-primary/10 text-primary flex items-center justify-center text-sm font-semibold",children:a+1}),s.jsx("span",{className:"text-foreground pt-0.5",children:i})]},a))})})]})}),t.syllabus&&t.syllabus.length>0&&s.jsx(M.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:.6},children:s.jsxs(te,{children:[s.jsx(ue,{children:s.jsx(de,{children:"Course Syllabus"})}),s.jsx(ne,{children:s.jsx("div",{className:"space-y-4",children:t.syllabus.map((i,a)=>s.jsxs("div",{className:"border-l-4 border-primary pl-4 py-2",children:[s.jsxs("h4",{className:"font-semibold text-foreground mb-1",children:["Week ",i.week,": ",i.topic]}),s.jsx("p",{className:"text-muted-foreground text-sm",children:i.content})]},a))})})]})}),t.learningOutcomes&&t.learningOutcomes.length>0&&s.jsx(M.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:.7},children:s.jsxs(te,{children:[s.jsx(ue,{children:s.jsx(de,{children:"Learning Outcomes"})}),s.jsx(ne,{children:s.jsx("ul",{className:"space-y-2",children:t.learningOutcomes.map((i,a)=>s.jsxs("li",{className:"flex items-start gap-2",children:[s.jsx(Ks,{className:"h-5 w-5 text-green-600 dark:text-green-400 flex-shrink-0 mt-0.5"}),s.jsx("span",{className:"text-foreground",children:i})]},a))})})]})}),t.textbooks&&t.textbooks.length>0&&s.jsx(M.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:.8},children:s.jsxs(te,{children:[s.jsx(ue,{children:s.jsx(de,{children:"Textbooks & References"})}),s.jsx(ne,{children:s.jsx("div",{className:"space-y-3",children:t.textbooks.map((i,a)=>s.jsxs("div",{className:"border-l-2 border-border pl-4",children:[s.jsx("p",{className:"font-medium text-foreground",children:i.title}),s.jsx("p",{className:"text-sm text-muted-foreground",children:i.authors}),s.jsx(ie,{variant:i.required?"default":"outline",className:"mt-1",children:i.required?"Required":"Reference"})]},a))})})]})}),t.assessmentMethods&&t.assessmentMethods.length>0&&s.jsx(M.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:.9},children:s.jsxs(te,{children:[s.jsx(ue,{children:s.jsx(de,{children:"Assessment Methods"})}),s.jsx(ne,{children:s.jsx("div",{className:"grid sm:grid-cols-2 gap-4",children:t.assessmentMethods.map((i,a)=>s.jsxs("div",{className:"flex items-center justify-between p-3 bg-muted/30 rounded-lg",children:[s.jsx("span",{className:"text-foreground",children:i.type}),s.jsx(ie,{children:i.weight})]},a))})})]})})]}),s.jsxs("div",{className:"space-y-6",children:[s.jsx(M.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},transition:{duration:.5,delay:.3},children:s.jsxs(te,{className:"sticky top-24",children:[s.jsx(ue,{children:s.jsx(de,{children:"Enrollment Information"})}),s.jsxs(ne,{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-center gap-2 text-foreground",children:[s.jsx(Ns,{className:"h-5 w-5 text-muted-foreground"}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm text-muted-foreground",children:"Location"}),s.jsx("p",{className:"font-medium",children:t.location})]})]}),s.jsxs("div",{className:"flex items-center gap-2 text-foreground",children:[s.jsx(gi,{className:"h-5 w-5 text-muted-foreground"}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm text-muted-foreground",children:"Schedule"}),s.jsx("p",{className:"font-medium",children:t.schedule})]})]}),t.fees&&s.jsxs("div",{className:"flex items-center gap-2 text-foreground",children:[s.jsx(bp,{className:"h-5 w-5 text-muted-foreground"}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm text-muted-foreground",children:"Course Fees"}),s.jsx("p",{className:"font-medium",children:t.fees})]})]}),t.applicationDeadline&&s.jsxs("div",{className:"flex items-center gap-2 text-foreground",children:[s.jsx(ut,{className:"h-5 w-5 text-muted-foreground"}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm text-muted-foreground",children:"Application Deadline"}),s.jsx("p",{className:"font-medium",children:new Date(t.applicationDeadline).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"})})]})]}),s.jsx("div",{className:"pt-4 border-t",children:s.jsx(Q,{className:"w-full",disabled:t.enrollmentStatus!=="Open",size:"lg",children:t.enrollmentStatus==="Open"?"Enroll Now":t.enrollmentStatus==="Closed"?"Enrollment Closed":"Join Waitlist"})})]})]})}),t.tags&&t.tags.length>0&&s.jsx(M.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},transition:{duration:.5,delay:.4},children:s.jsxs(te,{children:[s.jsx(ue,{children:s.jsx(de,{children:"Topics Covered"})}),s.jsx(ne,{children:s.jsx("div",{className:"flex flex-wrap gap-2",children:t.tags.map((i,a)=>s.jsx(ie,{variant:"secondary",children:i},a))})})]})})]})]}),s.jsx("div",{className:"mt-12 text-center",children:s.jsx(Ce,{to:"/education",children:s.jsxs(Q,{variant:"outline",size:"lg",children:[s.jsx(Mn,{className:"h-4 w-4 mr-2"}),"Back to All Courses"]})})})]})]})}function SO(){const{id:e}=kl(),{data:t,isLoading:n,error:r}=O3(e);if(p.useEffect(()=>{e==="workshop-2"&&window.location.assign("https://qiskit-developer-workshop-l1gx.vercel.app/")},[e]),e==="workshop-2")return s.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center",children:s.jsx("div",{className:"text-center",children:s.jsx("p",{className:"text-muted-foreground",children:"Redirecting to event site..."})})});if(n)return s.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center",children:s.jsxs("div",{className:"text-center",children:[s.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-primary mx-auto"}),s.jsx("p",{className:"mt-4 text-muted-foreground",children:"Loading event details..."})]})});if(r||!t)return s.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center",children:s.jsxs("div",{className:"text-center",children:[s.jsx("h2",{className:"text-2xl font-bold text-foreground mb-4",children:"Event Not Found"}),s.jsxs(Ce,{to:"/education",className:"text-primary hover:text-primary/80 flex items-center justify-center gap-2",children:[s.jsx(Mn,{className:"h-4 w-4"}),"Back to Education"]})]})});const i=a=>new Date(a).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"});return s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx("div",{className:"bg-card border-b border-border",children:s.jsx("div",{className:"container mx-auto px-4 py-4",children:s.jsxs(Ce,{to:"/education",className:"inline-flex items-center gap-2 text-primary hover:text-primary/80 transition-colors",children:[s.jsx(Mn,{className:"h-4 w-4"}),"Back to Education"]})})}),s.jsxs("div",{className:"container mx-auto px-4 py-12",children:[s.jsxs(M.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},className:"mb-8",children:[s.jsxs("div",{className:"flex flex-wrap gap-2 mb-4",children:[s.jsx(ie,{variant:"outline",className:"text-sm",children:t.type}),s.jsx(ie,{className:t.status==="Registration Open"?"bg-green-500 text-white":t.status==="Almost Full"?"bg-yellow-500 text-white":"bg-red-500 text-white",children:t.status}),s.jsx(ie,{variant:"secondary",children:t.format}),t.featured&&s.jsx(ie,{className:"bg-gradient-to-r from-accent to-primary text-white",children:"Featured"})]}),s.jsx("h1",{className:"text-4xl md:text-5xl font-bold text-foreground mb-4",children:t.title}),s.jsx("p",{className:"text-xl text-muted-foreground leading-relaxed",children:t.description})]}),s.jsx(M.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{duration:.5,delay:.1},className:"mb-12",children:s.jsx("img",{src:t.image,alt:t.title,className:"w-full h-64 md:h-96 object-cover rounded-xl shadow-lg"})}),s.jsxs(M.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:.2},className:"grid md:grid-cols-4 gap-4 mb-12",children:[s.jsx(te,{children:s.jsxs(ne,{className:"p-6 text-center",children:[s.jsx(ut,{className:"h-8 w-8 text-primary mx-auto mb-2"}),s.jsx("p",{className:"text-sm text-muted-foreground mb-1",children:"Start Date"}),s.jsx("p",{className:"font-semibold text-foreground",children:i(t.startDate)})]})}),s.jsx(te,{children:s.jsxs(ne,{className:"p-6 text-center",children:[s.jsx(gi,{className:"h-8 w-8 text-primary mx-auto mb-2"}),s.jsx("p",{className:"text-sm text-muted-foreground mb-1",children:"Duration"}),s.jsx("p",{className:"font-semibold text-foreground",children:t.duration})]})}),s.jsx(te,{children:s.jsxs(ne,{className:"p-6 text-center",children:[s.jsx(Ns,{className:"h-8 w-8 text-primary mx-auto mb-2"}),s.jsx("p",{className:"text-sm text-muted-foreground mb-1",children:"Venue"}),s.jsx("p",{className:"font-semibold text-foreground text-sm",children:t.venue})]})}),s.jsx(te,{children:s.jsxs(ne,{className:"p-6 text-center",children:[s.jsx(mt,{className:"h-8 w-8 text-primary mx-auto mb-2"}),s.jsx("p",{className:"text-sm text-muted-foreground mb-1",children:"Attendance"}),s.jsxs("p",{className:"font-semibold text-foreground",children:[t.registered,"/",t.capacity]})]})})]}),s.jsxs("div",{className:"grid lg:grid-cols-3 gap-8",children:[s.jsxs("div",{className:"lg:col-span-2 space-y-8",children:[t.speakers&&t.speakers.length>0&&s.jsx(M.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:.3},children:s.jsxs(te,{children:[s.jsx(ue,{children:s.jsx(de,{children:"Speakers"})}),s.jsx(ne,{children:s.jsx("div",{className:"space-y-4",children:t.speakers.map((a,o)=>s.jsxs("div",{className:"border-l-4 border-primary pl-4 py-2",children:[s.jsx("h4",{className:"font-semibold text-foreground",children:a.name}),s.jsx("p",{className:"text-sm text-muted-foreground",children:a.affiliation}),a.title&&s.jsx("p",{className:"text-sm text-muted-foreground mt-1 italic",children:a.title})]},o))})})]})}),t.schedule&&t.schedule.length>0&&s.jsx(M.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:.4},children:s.jsxs(te,{children:[s.jsx(ue,{children:s.jsx(de,{children:"Event Schedule"})}),s.jsx(ne,{children:s.jsx("div",{className:"space-y-6",children:t.schedule.map((a,o)=>s.jsxs("div",{children:[s.jsxs("h4",{className:"font-semibold text-lg text-foreground mb-3 flex items-center gap-2",children:[s.jsx(ut,{className:"h-5 w-5 text-primary"}),a.day," - ",a.date]}),s.jsx("div",{className:"space-y-2 ml-7",children:a.sessions&&a.sessions.map((l,c)=>s.jsxs("div",{className:"flex items-start gap-2 py-2 border-b border-border last:border-0",children:[s.jsx(Ks,{className:"h-4 w-4 text-primary flex-shrink-0 mt-1"}),s.jsx("span",{className:"text-foreground",children:l})]},c))})]},o))})})]})}),t.topics&&t.topics.length>0&&s.jsx(M.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:.5},children:s.jsxs(te,{children:[s.jsx(ue,{children:s.jsx(de,{children:"Topics Covered"})}),s.jsx(ne,{children:s.jsx("ul",{className:"space-y-2",children:t.topics.map((a,o)=>s.jsxs("li",{className:"flex items-start gap-2",children:[s.jsx(Ks,{className:"h-5 w-5 text-primary flex-shrink-0 mt-0.5"}),s.jsx("span",{className:"text-foreground",children:a})]},o))})})]})}),t.highlights&&t.highlights.length>0&&s.jsx(M.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:.6},children:s.jsxs(te,{children:[s.jsx(ue,{children:s.jsx(de,{children:"Event Highlights"})}),s.jsx(ne,{children:s.jsx("ul",{className:"space-y-2",children:t.highlights.map((a,o)=>s.jsxs("li",{className:"flex items-start gap-2",children:[s.jsx(Ks,{className:"h-5 w-5 text-green-600 dark:text-green-400 flex-shrink-0 mt-0.5"}),s.jsx("span",{className:"text-foreground",children:a})]},o))})})]})}),t.outcomes&&t.outcomes.length>0&&s.jsx(M.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:.7},children:s.jsxs(te,{children:[s.jsx(ue,{children:s.jsx(de,{children:"Learning Outcomes"})}),s.jsx(ne,{children:s.jsx("ul",{className:"space-y-3",children:t.outcomes.map((a,o)=>s.jsxs("li",{className:"flex items-start gap-3",children:[s.jsx("div",{className:"flex-shrink-0 w-6 h-6 rounded-full bg-primary/10 text-primary flex items-center justify-center text-sm font-semibold",children:o+1}),s.jsx("span",{className:"text-foreground pt-0.5",children:a})]},o))})})]})}),t.prerequisites&&t.prerequisites.length>0&&s.jsx(M.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:.8},children:s.jsxs(te,{children:[s.jsx(ue,{children:s.jsx(de,{children:"Prerequisites"})}),s.jsx(ne,{children:s.jsx("ul",{className:"space-y-2",children:t.prerequisites.map((a,o)=>s.jsxs("li",{className:"flex items-start gap-2",children:[s.jsx(Ks,{className:"h-5 w-5 text-primary flex-shrink-0 mt-0.5"}),s.jsx("span",{className:"text-foreground",children:a})]},o))})})]})}),t.organizers&&t.organizers.length>0&&s.jsx(M.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:.9},children:s.jsxs(te,{children:[s.jsx(ue,{children:s.jsx(de,{children:"Organizers"})}),s.jsx(ne,{children:s.jsx("div",{className:"flex flex-wrap gap-2",children:t.organizers.map((a,o)=>s.jsx(ie,{variant:"outline",className:"text-sm",children:a},o))})})]})})]}),s.jsxs("div",{className:"space-y-6",children:[s.jsx(M.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},transition:{duration:.5,delay:.3},children:s.jsxs(te,{className:"sticky top-24",children:[s.jsx(ue,{children:s.jsx(de,{children:"Registration"})}),s.jsxs(ne,{className:"space-y-4",children:[t.registrationFee&&s.jsxs("div",{children:[s.jsxs("p",{className:"text-sm text-muted-foreground mb-2 flex items-center gap-2",children:[s.jsx(bp,{className:"h-4 w-4"}),"Registration Fee"]}),s.jsx("div",{className:"space-y-1",children:Object.entries(t.registrationFee).map(([a,o])=>s.jsxs("div",{className:"flex justify-between items-center text-sm",children:[s.jsxs("span",{className:"text-muted-foreground capitalize",children:[a,":"]}),s.jsx("span",{className:"font-semibold text-foreground",children:String(o)})]},a))})]}),t.format&&s.jsxs("div",{className:"flex items-center gap-2 text-foreground",children:[s.jsx(CT,{className:"h-5 w-5 text-muted-foreground"}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm text-muted-foreground",children:"Format"}),s.jsx("p",{className:"font-medium",children:t.format})]})]}),t.registrationDeadline&&s.jsxs("div",{className:"flex items-center gap-2 text-foreground",children:[s.jsx(ut,{className:"h-5 w-5 text-muted-foreground"}),s.jsxs("div",{children:[s.jsx("p",{className:"text-sm text-muted-foreground",children:"Registration Deadline"}),s.jsx("p",{className:"font-medium",children:i(t.registrationDeadline)})]})]}),s.jsx("div",{className:"pt-4 border-t",children:t.registrationLink?s.jsx(Q,{className:"w-full",size:"lg",disabled:t.status==="Registration Closed",asChild:!0,children:s.jsxs("a",{href:t.registrationLink,target:"_blank",rel:"noopener noreferrer",children:[t.status==="Registration Open"?"Register Now":t.status==="Almost Full"?"Register (Limited Seats)":"Registration Closed",s.jsx(Zt,{className:"h-4 w-4 ml-2"})]})}):s.jsx(Q,{className:"w-full",size:"lg",disabled:!0,children:"Registration Coming Soon"})}),t.contactEmail&&s.jsx("div",{className:"pt-4 border-t",children:s.jsx(Q,{variant:"outline",className:"w-full",asChild:!0,children:s.jsxs("a",{href:`mailto:${t.contactEmail}`,className:"flex items-center justify-center gap-2",children:[s.jsx(xi,{className:"h-4 w-4"}),"Contact Organizers"]})})}),t.websiteLink&&s.jsx(Q,{variant:"ghost",className:"w-full",asChild:!0,children:s.jsxs("a",{href:t.websiteLink,target:"_blank",rel:"noopener noreferrer",className:"flex items-center justify-center gap-2",children:[s.jsx(Zt,{className:"h-4 w-4"}),"Event Website"]})})]})]})}),t.tags&&t.tags.length>0&&s.jsx(M.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},transition:{duration:.5,delay:.4},children:s.jsxs(te,{children:[s.jsx(ue,{children:s.jsx(de,{children:"Tags"})}),s.jsx(ne,{children:s.jsx("div",{className:"flex flex-wrap gap-2",children:t.tags.map((a,o)=>s.jsx(ie,{variant:"secondary",children:a},o))})})]})})]})]}),s.jsx("div",{className:"mt-12 text-center",children:s.jsx(Ce,{to:"/education",children:s.jsxs(Q,{variant:"outline",size:"lg",children:[s.jsx(Mn,{className:"h-4 w-4 mr-2"}),"Back to All Events"]})})})]})]})}function kO(){const{data:e=[],isLoading:t}=v2(),[n,r]=p.useState(""),[i,a]=p.useState("All"),o=e.filter(u=>{var f;const d=n===""||u.title.toLowerCase().includes(n.toLowerCase())||u.description.toLowerCase().includes(n.toLowerCase())||((f=u.tags)==null?void 0:f.some(m=>m.toLowerCase().includes(n.toLowerCase()))),h=i==="All"||u.type===i;return d&&h}),l=["All","Workshop","Seminar","Symposium"],c=u=>new Date(u).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"});return s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx(Xe,{}),s.jsx("div",{className:"pt-24 pb-16",children:s.jsxs("div",{className:"container mx-auto px-4",children:[s.jsxs(M.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},className:"mb-12",children:[s.jsx("h1",{className:"text-5xl font-bold bg-gradient-to-r from-primary to-secondary bg-clip-text text-transparent mb-4",children:"Workshops & Events"}),s.jsx("p",{className:"text-lg text-muted-foreground max-w-2xl",children:"Explore our comprehensive range of workshops, seminars, and training events designed to advance your knowledge in quantum technology."})]}),s.jsxs(M.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{duration:.5,delay:.1},className:"mb-12",children:[s.jsxs("div",{className:"relative max-w-2xl mx-auto mb-6",children:[s.jsx(Qt,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 h-5 w-5 text-muted-foreground"}),s.jsx($,{type:"text",placeholder:"Search workshops and events...",value:n,onChange:u=>r(u.target.value),className:"pl-10 py-6 text-lg"})]}),s.jsxs("div",{className:"flex flex-wrap gap-2 justify-center",children:[s.jsx("span",{className:"text-sm font-medium text-muted-foreground py-2",children:"Type:"}),l.map(u=>s.jsx(Q,{onClick:()=>a(u),variant:i===u?"default":"outline",size:"sm",children:u},u))]})]}),t?s.jsxs("div",{className:"text-center py-12",children:[s.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-primary mx-auto"}),s.jsx("p",{className:"mt-4 text-muted-foreground",children:"Loading events..."})]}):s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"mb-4 text-center text-muted-foreground",children:["Showing ",o.length," ",o.length===1?"event":"events"]}),o.length>0?s.jsx(M.div,{initial:{opacity:0},animate:{opacity:1},transition:{duration:.3},className:"grid md:grid-cols-3 gap-6",children:o.map((u,d)=>s.jsx(M.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:d*.05},children:s.jsx(Ce,{to:`/workshops/${u.id}`,children:s.jsxs(te,{className:"h-full hover:shadow-lg transition-all duration-300 hover:-translate-y-1 border-border",children:[s.jsxs(ue,{children:[s.jsxs("div",{className:"flex gap-2 mb-2 flex-wrap",children:[s.jsx(ie,{variant:"outline",children:u.type}),s.jsx(ie,{className:u.status==="Registration Open"?"bg-green-500 text-white":u.status==="Almost Full"?"bg-yellow-500 text-white":"bg-red-500 text-white",children:u.status})]}),s.jsx(de,{className:"text-lg",children:u.title})]}),s.jsxs(ne,{children:[s.jsx("p",{className:"text-muted-foreground text-sm mb-3 line-clamp-2",children:u.description}),s.jsxs("div",{className:"space-y-1 text-xs text-muted-foreground",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(ut,{className:"h-3 w-3"}),s.jsx("span",{children:c(u.startDate)})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Ns,{className:"h-3 w-3"}),s.jsx("span",{className:"line-clamp-1",children:u.venue||u.location})]}),u.registered&&u.capacity&&s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(mt,{className:"h-3 w-3"}),s.jsxs("span",{children:[u.registered,"/",u.capacity," registered"]})]})]})]}),s.jsx(Ji,{children:s.jsx(Q,{variant:"outline",className:"w-full",children:"View Details"})})]})})},u.id))}):s.jsxs("div",{className:"text-center py-12",children:[s.jsx("p",{className:"text-muted-foreground mb-4",children:"No events found matching your criteria."}),s.jsx(Q,{onClick:()=>{r(""),a("All")},children:"Clear Filters"})]})]})]})}),s.jsx(Ze,{})]})}var EO=p.createContext(void 0);function A2(e){const t=p.useContext(EO);return e||t||"ltr"}var yf="rovingFocusGroup.onEntryFocus",TO={bubbles:!1,cancelable:!0},Ml="RovingFocusGroup",[pm,R2,PO]=Xw(Ml),[AO,D2]=Ni(Ml,[PO]),[RO,DO]=AO(Ml),M2=p.forwardRef((e,t)=>s.jsx(pm.Provider,{scope:e.__scopeRovingFocusGroup,children:s.jsx(pm.Slot,{scope:e.__scopeRovingFocusGroup,children:s.jsx(MO,{...e,ref:t})})}));M2.displayName=Ml;var MO=p.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...h}=e,f=p.useRef(null),m=Nt(t,f),b=A2(a),[g,v]=Ku({prop:o,defaultProp:l??null,onChange:c,caller:Ml}),[x,y]=p.useState(!1),w=Ln(u),j=R2(n),C=p.useRef(!1),[N,S]=p.useState(0);return p.useEffect(()=>{const T=f.current;if(T)return T.addEventListener(yf,w),()=>T.removeEventListener(yf,w)},[w]),s.jsx(RO,{scope:n,orientation:r,dir:b,loop:i,currentTabStopId:g,onItemFocus:p.useCallback(T=>v(T),[v]),onItemShiftTab:p.useCallback(()=>y(!0),[]),onFocusableItemAdd:p.useCallback(()=>S(T=>T+1),[]),onFocusableItemRemove:p.useCallback(()=>S(T=>T-1),[]),children:s.jsx(Re.div,{tabIndex:x||N===0?-1:0,"data-orientation":r,...h,ref:m,style:{outline:"none",...e.style},onMouseDown:je(e.onMouseDown,()=>{C.current=!0}),onFocus:je(e.onFocus,T=>{const k=!C.current;if(T.target===T.currentTarget&&k&&!x){const A=new CustomEvent(yf,TO);if(T.currentTarget.dispatchEvent(A),!A.defaultPrevented){const z=j().filter(Y=>Y.focusable),O=z.find(Y=>Y.active),W=z.find(Y=>Y.id===g),re=[O,W,...z].filter(Boolean).map(Y=>Y.ref.current);O2(re,d)}}C.current=!1}),onBlur:je(e.onBlur,()=>y(!1))})})}),F2="RovingFocusGroupItem",L2=p.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:o,...l}=e,c=Eo(),u=a||c,d=DO(F2,n),h=d.currentTabStopId===u,f=R2(n),{onFocusableItemAdd:m,onFocusableItemRemove:b,currentTabStopId:g}=d;return p.useEffect(()=>{if(r)return m(),()=>b()},[r,m,b]),s.jsx(pm.ItemSlot,{scope:n,id:u,focusable:r,active:i,children:s.jsx(Re.span,{tabIndex:h?0:-1,"data-orientation":d.orientation,...l,ref:t,onMouseDown:je(e.onMouseDown,v=>{r?d.onItemFocus(u):v.preventDefault()}),onFocus:je(e.onFocus,()=>d.onItemFocus(u)),onKeyDown:je(e.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){d.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const x=OO(v,d.orientation,d.dir);if(x!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let w=f().filter(j=>j.focusable).map(j=>j.ref.current);if(x==="last")w.reverse();else if(x==="prev"||x==="next"){x==="prev"&&w.reverse();const j=w.indexOf(v.currentTarget);w=d.loop?IO(w,j+1):w.slice(j+1)}setTimeout(()=>O2(w))}}),children:typeof o=="function"?o({isCurrentTabStop:h,hasTabStop:g!=null}):o})})});L2.displayName=F2;var FO={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function LO(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function OO(e,t,n){const r=LO(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return FO[r]}function O2(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function IO(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var _O=M2,VO=L2,hd="Tabs",[zO,A_]=Ni(hd,[D2]),I2=D2(),[$O,Tg]=zO(hd),_2=p.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:i,defaultValue:a,orientation:o="horizontal",dir:l,activationMode:c="automatic",...u}=e,d=A2(l),[h,f]=Ku({prop:r,onChange:i,defaultProp:a??"",caller:hd});return s.jsx($O,{scope:n,baseId:Eo(),value:h,onValueChange:f,orientation:o,dir:d,activationMode:c,children:s.jsx(Re.div,{dir:d,"data-orientation":o,...u,ref:t})})});_2.displayName=hd;var V2="TabsList",z2=p.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...i}=e,a=Tg(V2,n),o=I2(n);return s.jsx(_O,{asChild:!0,...o,orientation:a.orientation,dir:a.dir,loop:r,children:s.jsx(Re.div,{role:"tablist","aria-orientation":a.orientation,...i,ref:t})})});z2.displayName=V2;var $2="TabsTrigger",B2=p.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:i=!1,...a}=e,o=Tg($2,n),l=I2(n),c=H2(o.baseId,r),u=q2(o.baseId,r),d=r===o.value;return s.jsx(VO,{asChild:!0,...l,focusable:!i,active:d,children:s.jsx(Re.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":u,"data-state":d?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:c,...a,ref:t,onMouseDown:je(e.onMouseDown,h=>{!i&&h.button===0&&h.ctrlKey===!1?o.onValueChange(r):h.preventDefault()}),onKeyDown:je(e.onKeyDown,h=>{[" ","Enter"].includes(h.key)&&o.onValueChange(r)}),onFocus:je(e.onFocus,()=>{const h=o.activationMode!=="manual";!d&&!i&&h&&o.onValueChange(r)})})})});B2.displayName=$2;var U2="TabsContent",W2=p.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:i,children:a,...o}=e,l=Tg(U2,n),c=H2(l.baseId,r),u=q2(l.baseId,r),d=r===l.value,h=p.useRef(d);return p.useEffect(()=>{const f=requestAnimationFrame(()=>h.current=!1);return()=>cancelAnimationFrame(f)},[]),s.jsx(Ci,{present:i||d,children:({present:f})=>s.jsx(Re.div,{"data-state":d?"active":"inactive","data-orientation":l.orientation,role:"tabpanel","aria-labelledby":c,hidden:!f,id:u,tabIndex:0,...o,ref:t,style:{...e.style,animationDuration:h.current?"0s":void 0},children:f&&a})})});W2.displayName=U2;function H2(e,t){return`${e}-trigger-${t}`}function q2(e,t){return`${e}-content-${t}`}var BO=_2,K2=z2,Q2=B2,G2=W2;const UO=BO,Y2=p.forwardRef(({className:e,...t},n)=>s.jsx(K2,{ref:n,className:ge("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t}));Y2.displayName=K2.displayName;const gm=p.forwardRef(({className:e,...t},n)=>s.jsx(Q2,{ref:n,className:ge("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",e),...t}));gm.displayName=Q2.displayName;const xm=p.forwardRef(({className:e,...t},n)=>s.jsx(G2,{ref:n,className:ge("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));xm.displayName=G2.displayName;function WO(){const{data:e=[],isLoading:t}=F3(),{data:n=[],isLoading:r}=v2(),i=Wt(),[a,o]=p.useState(""),[l,c]=p.useState(""),[u,d]=p.useState("All"),[h,f]=p.useState("All"),[m,b]=p.useState("All");p.useEffect(()=>{i.hash&&setTimeout(()=>dd(i.hash),200)},[i.hash]);const g=e.filter(k=>{var W;const A=a===""||k.title.toLowerCase().includes(a.toLowerCase())||k.description.toLowerCase().includes(a.toLowerCase())||k.code.toLowerCase().includes(a.toLowerCase())||((W=k.tags)==null?void 0:W.some(_=>_.toLowerCase().includes(a.toLowerCase()))),z=u==="All"||k.level===u,O=h==="All"||k.enrollmentStatus===h;return A&&z&&O}),v=n.filter(k=>{var O;const A=l===""||k.title.toLowerCase().includes(l.toLowerCase())||k.description.toLowerCase().includes(l.toLowerCase())||((O=k.tags)==null?void 0:O.some(W=>W.toLowerCase().includes(l.toLowerCase()))),z=m==="All"||k.type===m;return A&&z}),x=g.filter(k=>k.featured),y=g.filter(k=>!k.featured),w=v.filter(k=>k.featured),j=v.filter(k=>!k.featured),C=["All","Undergraduate","Graduate"],N=["All","Open","Waitlist","Closed"],S=["All","Workshop","Seminar","Symposium"],T=k=>new Date(k).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric"});return s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx(Xe,{}),s.jsx("div",{className:"bg-gradient-to-b from-primary/5 to-background py-24",children:s.jsxs("div",{className:"container mx-auto px-4",children:[s.jsxs(M.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},className:"text-center mb-16",children:[s.jsx("h1",{className:"text-5xl font-bold text-foreground mb-4",children:"Education & Training"}),s.jsx("p",{className:"text-xl text-muted-foreground max-w-3xl mx-auto",children:"Explore our comprehensive courses and attend cutting-edge workshops to advance your knowledge in quantum technologies."})]}),s.jsxs(UO,{defaultValue:"courses",className:"w-full",children:[s.jsxs(Y2,{className:"grid w-full max-w-md mx-auto grid-cols-2 mb-8",children:[s.jsxs(gm,{value:"courses",className:"text-lg",children:[s.jsx(du,{className:"h-5 w-5 mr-2"}),"Courses"]}),s.jsxs(gm,{value:"workshops",className:"text-lg",children:[s.jsx(el,{className:"h-5 w-5 mr-2"}),"Workshops & Events"]})]}),s.jsx(xm,{value:"courses",id:"courses",children:s.jsxs(M.div,{initial:{opacity:0},animate:{opacity:1},transition:{duration:.3},children:[s.jsxs("div",{className:"mb-8",children:[s.jsxs("div",{className:"relative max-w-2xl mx-auto mb-6",children:[s.jsx(Qt,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 h-5 w-5 text-muted-foreground"}),s.jsx($,{type:"text",placeholder:"Search courses by title, code, or tags...",value:a,onChange:k=>o(k.target.value),className:"pl-10 py-6 text-lg"})]}),s.jsxs("div",{className:"flex flex-wrap gap-4 justify-center",children:[s.jsxs("div",{className:"flex gap-2",children:[s.jsx("span",{className:"text-sm font-medium text-muted-foreground py-2",children:"Level:"}),C.map(k=>s.jsx(Q,{onClick:()=>d(k),variant:u===k?"default":"outline",size:"sm",children:k},k))]}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx("span",{className:"text-sm font-medium text-muted-foreground py-2",children:"Status:"}),N.map(k=>s.jsx(Q,{onClick:()=>f(k),variant:h===k?"default":"outline",size:"sm",children:k},k))]})]})]}),t?s.jsxs("div",{className:"text-center py-12",children:[s.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-primary mx-auto"}),s.jsx("p",{className:"mt-4 text-muted-foreground",children:"Loading courses..."})]}):s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"mb-4 text-center text-muted-foreground",children:["Showing ",g.length," ",g.length===1?"course":"courses"]}),x.length>0&&s.jsxs("div",{className:"mb-12",children:[s.jsx("h2",{className:"text-3xl font-bold text-foreground mb-6",children:"Featured Courses"}),s.jsx("div",{className:"grid md:grid-cols-2 gap-6",children:x.map((k,A)=>s.jsx(M.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:A*.1},children:s.jsx(Ce,{to:`/courses/${k.id}`,children:s.jsxs(te,{className:"h-full hover:shadow-xl transition-all duration-300 hover:-translate-y-1 border-border",children:[s.jsxs(ue,{children:[s.jsxs("div",{className:"flex gap-2 mb-2 flex-wrap",children:[s.jsx(ie,{variant:"outline",children:k.code}),s.jsx(ie,{className:k.level==="Undergraduate"?"bg-green-500/10 text-green-600 dark:text-green-400":"bg-primary/10 text-primary",children:k.level}),s.jsx(ie,{className:k.enrollmentStatus==="Open"?"bg-green-500 text-white":k.enrollmentStatus==="Closed"?"bg-red-500 text-white":"bg-yellow-500 text-white",children:k.enrollmentStatus})]}),s.jsx(de,{className:"text-xl",children:k.title})]}),s.jsxs(ne,{children:[s.jsx("p",{className:"text-muted-foreground mb-4",children:k.description}),s.jsxs("div",{className:"space-y-2 text-sm text-muted-foreground",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(ut,{className:"h-4 w-4"}),s.jsx("span",{children:k.semester})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(gi,{className:"h-4 w-4"}),s.jsxs("span",{children:[k.duration," • ",k.credits," credits"]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(mt,{className:"h-4 w-4"}),s.jsxs("span",{children:[k.enrolled,"/",k.capacity," enrolled"]})]})]})]}),s.jsx(Ji,{children:s.jsx(Q,{className:"w-full",children:"View Details"})})]})})},k.id))})]}),y.length>0&&s.jsxs("div",{children:[s.jsx("h2",{className:"text-3xl font-bold text-foreground mb-6",children:"All Courses"}),s.jsx("div",{className:"grid md:grid-cols-3 gap-6",children:y.map((k,A)=>s.jsx(M.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:A*.05},children:s.jsx(Ce,{to:`/courses/${k.id}`,children:s.jsxs(te,{className:"h-full hover:shadow-lg transition-all duration-300 border-border",children:[s.jsxs(ue,{children:[s.jsxs("div",{className:"flex gap-2 mb-2 flex-wrap",children:[s.jsx(ie,{variant:"outline",children:k.code}),s.jsx(ie,{className:k.enrollmentStatus==="Open"?"bg-green-500 text-white":k.enrollmentStatus==="Closed"?"bg-red-500 text-white":"bg-yellow-500 text-white",children:k.enrollmentStatus})]}),s.jsx(de,{className:"text-lg",children:k.title})]}),s.jsxs(ne,{children:[s.jsx("p",{className:"text-muted-foreground text-sm mb-3 line-clamp-2",children:k.description}),s.jsxs("div",{className:"space-y-1 text-xs text-muted-foreground",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(ut,{className:"h-3 w-3"}),s.jsx("span",{children:k.semester})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(mt,{className:"h-3 w-3"}),s.jsxs("span",{children:[k.enrolled,"/",k.capacity," enrolled"]})]})]})]}),s.jsx(Ji,{children:s.jsx(Q,{variant:"outline",className:"w-full",children:"View Details"})})]})})},k.id))})]}),g.length===0&&s.jsxs("div",{className:"text-center py-12",children:[s.jsx("p",{className:"text-muted-foreground mb-4",children:"No courses found matching your criteria."}),s.jsx(Q,{onClick:()=>{o(""),d("All"),f("All")},children:"Clear Filters"})]})]})]})}),s.jsx(xm,{value:"workshops",id:"workshops",children:s.jsxs(M.div,{initial:{opacity:0},animate:{opacity:1},transition:{duration:.3},children:[s.jsxs("div",{className:"mb-8",children:[s.jsxs("div",{className:"relative max-w-2xl mx-auto mb-6",children:[s.jsx(Qt,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 h-5 w-5 text-muted-foreground"}),s.jsx($,{type:"text",placeholder:"Search workshops and events...",value:l,onChange:k=>c(k.target.value),className:"pl-10 py-6 text-lg"})]}),s.jsxs("div",{className:"flex flex-wrap gap-2 justify-center",children:[s.jsx("span",{className:"text-sm font-medium text-muted-foreground py-2",children:"Type:"}),S.map(k=>s.jsx(Q,{onClick:()=>b(k),variant:m===k?"default":"outline",size:"sm",children:k},k))]})]}),r?s.jsxs("div",{className:"text-center py-12",children:[s.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-primary mx-auto"}),s.jsx("p",{className:"mt-4 text-muted-foreground",children:"Loading events..."})]}):s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"mb-4 text-center text-muted-foreground",children:["Showing ",v.length," ",v.length===1?"event":"events"]}),w.length>0&&s.jsxs("div",{className:"mb-12",children:[s.jsx("h2",{className:"text-3xl font-bold text-foreground mb-6",children:"Featured Events"}),s.jsx("div",{className:"grid md:grid-cols-2 gap-6",children:w.map((k,A)=>s.jsx(M.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:A*.1},children:s.jsx(Ce,{to:`/workshops/${k.id}`,children:s.jsxs(te,{className:"h-full hover:shadow-xl transition-all duration-300 hover:-translate-y-1 border-border",children:[s.jsxs(ue,{children:[s.jsxs("div",{className:"flex gap-2 mb-2 flex-wrap",children:[s.jsx(ie,{variant:"outline",children:k.type}),s.jsx(ie,{className:k.status==="Registration Open"?"bg-green-500 text-white":k.status==="Almost Full"?"bg-yellow-500 text-white":"bg-red-500 text-white",children:k.status})]}),s.jsx(de,{className:"text-xl",children:k.title})]}),s.jsxs(ne,{children:[s.jsx("p",{className:"text-muted-foreground mb-4",children:k.description}),s.jsxs("div",{className:"space-y-2 text-sm text-muted-foreground",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(ut,{className:"h-4 w-4"}),s.jsxs("span",{children:[T(k.startDate)," - ",T(k.endDate)]})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(gi,{className:"h-4 w-4"}),s.jsx("span",{children:k.duration})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Ns,{className:"h-4 w-4"}),s.jsx("span",{children:k.format})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(mt,{className:"h-4 w-4"}),s.jsxs("span",{children:[k.registered,"/",k.capacity," registered"]})]})]})]}),s.jsx(Ji,{children:s.jsx(Q,{className:"w-full",children:"View Details"})})]})})},k.id))})]}),j.length>0&&s.jsxs("div",{children:[s.jsx("h2",{className:"text-3xl font-bold text-foreground mb-6",children:"More Events"}),s.jsx("div",{className:"grid md:grid-cols-3 gap-6",children:j.map((k,A)=>s.jsx(M.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5,delay:A*.05},children:s.jsx(Ce,{to:`/workshops/${k.id}`,children:s.jsxs(te,{className:"h-full hover:shadow-lg transition-all duration-300 border-border",children:[s.jsxs(ue,{children:[s.jsxs("div",{className:"flex gap-2 mb-2 flex-wrap",children:[s.jsx(ie,{variant:"outline",children:k.type}),s.jsx(ie,{className:k.status==="Registration Open"?"bg-green-500 text-white":k.status==="Almost Full"?"bg-yellow-500 text-white":"bg-red-500 text-white",children:k.status})]}),s.jsx(de,{className:"text-lg",children:k.title})]}),s.jsxs(ne,{children:[s.jsx("p",{className:"text-muted-foreground text-sm mb-3 line-clamp-2",children:k.description}),s.jsxs("div",{className:"space-y-1 text-xs text-muted-foreground",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(ut,{className:"h-3 w-3"}),s.jsx("span",{children:T(k.startDate)})]}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(Ns,{className:"h-3 w-3"}),s.jsx("span",{className:"line-clamp-1",children:k.venue})]})]})]}),s.jsx(Ji,{children:s.jsx(Q,{variant:"outline",className:"w-full",children:"View Details"})})]})})},k.id))})]}),v.length===0&&s.jsxs("div",{className:"text-center py-12",children:[s.jsx("p",{className:"text-muted-foreground mb-4",children:"No events found matching your criteria."}),s.jsx(Q,{onClick:()=>{c(""),b("All")},children:"Clear Filters"})]})]})]})})]})]})}),s.jsx(Ze,{})]})}var HO="Label",X2=p.forwardRef((e,t)=>s.jsx(Re.label,{...e,ref:t,onMouseDown:n=>{var i;n.target.closest("button, input, select, textarea")||((i=e.onMouseDown)==null||i.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));X2.displayName=HO;var Z2=X2;const qO=Nl("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),I=p.forwardRef(({className:e,...t},n)=>s.jsx(Z2,{ref:n,className:ge(qO(),e),...t}));I.displayName=Z2.displayName;const KO=Nl("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),Pg=p.forwardRef(({className:e,variant:t,...n},r)=>s.jsx("div",{ref:r,role:"alert",className:ge(KO({variant:t}),e),...n}));Pg.displayName="Alert";const QO=p.forwardRef(({className:e,...t},n)=>s.jsx("h5",{ref:n,className:ge("mb-1 font-medium leading-none tracking-tight",e),...t}));QO.displayName="AlertTitle";const Ag=p.forwardRef(({className:e,...t},n)=>s.jsx("div",{ref:n,className:ge("text-sm [&_p]:leading-relaxed",e),...t}));Ag.displayName="AlertDescription";const GO=()=>{const[e,t]=p.useState(""),[n,r]=p.useState(""),[i,a]=p.useState(""),[o,l]=p.useState(!1),{login:c}=El(),u=Ua(),d=async h=>{h.preventDefault(),a(""),l(!0);try{await c(e,n),u("/admin/dashboard")}catch(f){a(f.message||"Login failed. Please check your credentials.")}finally{l(!1)}};return s.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-blue-950 via-slate-900 to-black flex items-center justify-center p-4",children:[s.jsxs("div",{className:"absolute inset-0 overflow-hidden pointer-events-none",children:[s.jsx("div",{className:"absolute top-1/4 left-1/4 w-96 h-96 bg-blue-500/10 rounded-full blur-3xl animate-float"}),s.jsx("div",{className:"absolute bottom-1/4 right-1/4 w-96 h-96 bg-purple-500/10 rounded-full blur-3xl animate-float-delayed"})]}),s.jsxs(te,{className:"w-full max-w-md relative z-10 bg-slate-900/90 backdrop-blur-xl border-slate-700",children:[s.jsxs(ue,{className:"space-y-1 text-center",children:[s.jsx("div",{className:"flex justify-center mb-4",children:s.jsx("div",{className:"p-4 bg-gradient-to-br from-blue-500 to-purple-600 rounded-2xl shadow-lg",children:s.jsx(bT,{className:"w-8 h-8 text-white"})})}),s.jsx(de,{className:"text-3xl font-bold bg-gradient-to-r from-blue-400 to-purple-400 bg-clip-text text-transparent",children:"Admin Portal"}),s.jsx(Rr,{className:"text-slate-400",children:"Sign in to manage your quantum center content"})]}),s.jsxs(ne,{children:[s.jsxs("form",{onSubmit:d,className:"space-y-4",children:[i&&s.jsx(Pg,{variant:"destructive",className:"bg-red-950/50 border-red-800 text-red-200",children:s.jsx(Ag,{children:i})}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(I,{htmlFor:"username",className:"text-slate-300",children:"Username"}),s.jsxs("div",{className:"relative",children:[s.jsx(jp,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-slate-500"}),s.jsx($,{id:"username",type:"text",placeholder:"Enter your username",value:e,onChange:h=>t(h.target.value),className:"pl-10 bg-slate-800/50 border-slate-700 text-white placeholder:text-slate-500 focus:border-blue-500",required:!0})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(I,{htmlFor:"password",className:"text-slate-300",children:"Password"}),s.jsxs("div",{className:"relative",children:[s.jsx(mT,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-slate-500"}),s.jsx($,{id:"password",type:"password",placeholder:"Enter your password",value:n,onChange:h=>r(h.target.value),className:"pl-10 bg-slate-800/50 border-slate-700 text-white placeholder:text-slate-500 focus:border-blue-500",required:!0})]})]}),s.jsx(Q,{type:"submit",className:"w-full bg-gradient-to-r from-blue-600 to-purple-600 hover:from-blue-700 hover:to-purple-700 text-white font-semibold py-6 transition-all duration-300 hover:scale-[1.02]",disabled:o,children:o?s.jsxs(s.Fragment,{children:[s.jsx(Fr,{className:"mr-2 h-4 w-4 animate-spin"}),"Signing in..."]}):"Sign In"})]}),s.jsx("div",{className:"mt-6 text-center",children:s.jsx("p",{className:"text-sm text-slate-500",children:"Authorized personnel only. All activities are logged."})})]})]})]})},zs="https://cqt.iiitd.ac.in/api",Rs=()=>{const{token:e}=El(),t=()=>({"Content-Type":"application/json",...e&&{Authorization:`Bearer ${e}`}}),n=async u=>{const d=await fetch(`${zs}/api/${u}`);if(!d.ok)throw new Error(`Failed to fetch ${u}`);return d.json()},r=async(u,d)=>{const h=await fetch(`${zs}/api/${u}/${d}`);if(!h.ok)throw new Error(`Failed to fetch ${u} item`);return h.json()},i=async(u,d)=>{const h=await fetch(`${zs}/api/${u}`,{method:"POST",headers:t(),body:JSON.stringify(d)});if(!h.ok){const f=await h.json();throw new Error(f.error||"Failed to create item")}return h.json()},a=async(u,d,h,f="image")=>{const m=new FormData;Object.keys(d).forEach(v=>{d[v]!==void 0&&d[v]!==null&&(Array.isArray(d[v])?m.append(v,JSON.stringify(d[v])):m.append(v,d[v]))}),h&&(m.append(f,h),console.log(`📤 Uploading file as '${f}':`,h.name,h.type,h.size)),console.log(`📤 Creating ${u} with FormData`);const b=await fetch(`${zs}/api/${u}`,{method:"POST",headers:{...e&&{Authorization:`Bearer ${e}`}},body:m});if(!b.ok){const v=await b.json();throw console.error("❌ Create failed:",v),new Error(v.error||"Failed to create item")}const g=await b.json();return console.log("✅ Create successful:",g),g},o=async(u,d,h)=>{const f=await fetch(`${zs}/api/${u}/${d}`,{method:"PUT",headers:t(),body:JSON.stringify(h)});if(!f.ok){const m=await f.json();throw new Error(m.error||"Failed to update item")}return f.json()},l=async(u,d,h,f,m="image")=>{const b=new FormData;Object.keys(h).forEach(x=>{h[x]!==void 0&&h[x]!==null&&(Array.isArray(h[x])?b.append(x,JSON.stringify(h[x])):b.append(x,h[x]))}),f&&(b.append(m,f),console.log(`📤 Uploading file as '${m}':`,f.name,f.type,f.size)),console.log(`📤 Updating ${u}/${d} with FormData`);const g=await fetch(`${zs}/api/${u}/${d}`,{method:"PUT",headers:{...e&&{Authorization:`Bearer ${e}`}},body:b});if(!g.ok){const x=await g.json();throw console.error("❌ Update failed:",x),new Error(x.error||"Failed to update item")}const v=await g.json();return console.log("✅ Update successful:",v),v},c=async(u,d)=>{const h=await fetch(`${zs}/api/${u}/${d}`,{method:"DELETE",headers:t()});if(!h.ok){const f=await h.json();throw new Error(f.error||"Failed to delete item")}return h.json()};return{research:{getAll:()=>n("research"),getById:u=>r("research",u),create:u=>i("research",u),createWithFile:(u,d)=>a("research",u,d),update:(u,d)=>o("research",u,d),updateWithFile:(u,d,h)=>l("research",u,d,h),delete:u=>c("research",u)},news:{getAll:()=>n("news"),getById:u=>r("news",u),create:u=>i("news",u),createWithFile:(u,d)=>a("news",u,d),update:(u,d)=>o("news",u,d),updateWithFile:(u,d,h)=>l("news",u,d,h),delete:u=>c("news",u)},courses:{getAll:()=>n("courses"),getById:u=>r("courses",u),create:u=>i("courses",u),createWithFile:(u,d)=>a("courses",u,d),update:(u,d)=>o("courses",u,d),updateWithFile:(u,d,h)=>l("courses",u,d,h),delete:u=>c("courses",u)},workshops:{getAll:()=>n("workshops"),getById:u=>r("workshops",u),create:u=>i("workshops",u),createWithFile:(u,d)=>a("workshops",u,d),update:(u,d)=>o("workshops",u,d),updateWithFile:(u,d,h)=>l("workshops",u,d,h),delete:u=>c("workshops",u)},team:{getAll:()=>n("team"),getById:u=>r("team",u),create:u=>i("team",u),createWithFile:(u,d)=>a("team",u,d,"photo"),update:(u,d)=>o("team",u,d),updateWithFile:(u,d,h)=>l("team",u,d,h,"photo"),delete:u=>c("team",u)},publications:{getAll:()=>n("publications"),getById:u=>r("publications",u),create:u=>i("publications",u),createWithFile:(u,d)=>a("publications",u,d,"pdf"),update:(u,d)=>o("publications",u,d),updateWithFile:(u,d,h)=>l("publications",u,d,h,"pdf"),delete:u=>c("publications",u)},labs:{getAll:()=>n("labs"),getById:u=>r("labs",u),create:u=>i("labs",u),createWithFile:(u,d)=>a("labs",u,d),update:(u,d)=>o("labs",u,d),updateWithFile:(u,d,h)=>l("labs",u,d,h),delete:u=>c("labs",u)}}},YO="https://cqt.iiitd.ac.in/api";function XO(){const{token:e}=El(),[t,n]=p.useState(!1),[r,i]=p.useState({type:null,message:""}),a=async()=>{if(!e){i({type:"error",message:"Not authenticated"});return}n(!0),i({type:"info",message:"Rebuilding website... This may take 30-60 seconds."});try{const o=await fetch(`${YO}/api/rebuild`,{method:"POST",headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/json"}}),l=await o.json();if(o.ok&&l.success)i({type:"success",message:`✅ Website rebuilt successfully in ${l.duration}s! Changes are now live.`});else throw new Error(l.error||"Failed to rebuild website")}catch(o){console.error("Rebuild error:",o),i({type:"error",message:o.message||"Failed to rebuild website. Please try again."})}finally{n(!1)}};return s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex items-start gap-4",children:[s.jsx(Q,{onClick:a,disabled:t,size:"lg",className:"bg-gradient-to-r from-blue-600 to-indigo-600 hover:from-blue-700 hover:to-indigo-700",children:t?s.jsxs(s.Fragment,{children:[s.jsx(ty,{className:"mr-2 h-5 w-5 animate-spin"}),"Rebuilding..."]}):s.jsxs(s.Fragment,{children:[s.jsx(ty,{className:"mr-2 h-5 w-5"}),"Update Website"]})}),s.jsx("div",{className:"flex-1",children:s.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:"Click this button after making changes to publish them to the live website. The rebuild process takes 30-60 seconds."})})]}),r.type&&s.jsxs(Pg,{variant:r.type==="error"?"destructive":"default",className:r.type==="success"?"border-green-500 bg-green-50 dark:bg-green-950":r.type==="info"?"border-blue-500 bg-blue-50 dark:bg-blue-950":"",children:[r.type==="success"&&s.jsx(cT,{className:"h-4 w-4 text-green-600"}),r.type==="error"&&s.jsx(uT,{className:"h-4 w-4"}),r.type==="info"&&s.jsx(gi,{className:"h-4 w-4 text-blue-600"}),s.jsx(Ag,{className:r.type==="success"?"text-green-800 dark:text-green-200":r.type==="info"?"text-blue-800 dark:text-blue-200":"",children:r.message})]}),s.jsxs("div",{className:"bg-gray-50 dark:bg-gray-800 p-4 rounded-lg border border-gray-200 dark:border-gray-700",children:[s.jsx("h4",{className:"font-semibold mb-2 text-sm",children:"How it works:"}),s.jsxs("ol",{className:"text-sm text-gray-600 dark:text-gray-400 space-y-1 list-decimal list-inside",children:[s.jsx("li",{children:"Make your changes using the admin panels above"}),s.jsx("li",{children:`Click "Update Website" when you're ready to publish`}),s.jsx("li",{children:"The system rebuilds the frontend with your new content"}),s.jsx("li",{children:"Changes go live automatically in about 30-60 seconds"})]}),s.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-500 mt-3",children:'💡 Tip: You can make multiple changes before clicking "Update Website" to publish them all at once.'})]})]})}const ZO=()=>{const e=Rs(),[t,n]=p.useState({research:0,news:0,courses:0,workshops:0,team:0}),[r,i]=p.useState(!0);p.useEffect(()=>{(async()=>{try{const[l,c,u,d,h]=await Promise.all([e.research.getAll(),e.news.getAll(),e.courses.getAll(),e.workshops.getAll(),e.team.getAll()]);n({research:l.length,news:c.length,courses:u.length,workshops:d.length,team:h.length})}catch(l){console.error("Error fetching stats:",l)}finally{i(!1)}})()},[]);const a=[{title:"Research Projects",value:t.research,icon:ys,color:"from-blue-500 to-cyan-500",bgColor:"bg-blue-500/10"},{title:"News Articles",value:t.news,icon:wp,color:"from-purple-500 to-pink-500",bgColor:"bg-purple-500/10"},{title:"Courses",value:t.courses,icon:du,color:"from-green-500 to-emerald-500",bgColor:"bg-green-500/10"},{title:"Workshops",value:t.workshops,icon:ut,color:"from-orange-500 to-yellow-500",bgColor:"bg-orange-500/10"},{title:"Team Members",value:t.team,icon:mt,color:"from-red-500 to-rose-500",bgColor:"bg-red-500/10"},{title:"Total Content",value:t.research+t.news+t.courses+t.workshops+t.team,icon:E1,color:"from-indigo-500 to-purple-500",bgColor:"bg-indigo-500/10"}];return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-4xl font-bold bg-gradient-to-r from-blue-400 to-purple-400 bg-clip-text text-transparent mb-2",children:"Dashboard"}),s.jsx("p",{className:"text-slate-400",children:"Welcome back! Here's an overview of your content."})]}),s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:a.map((o,l)=>{const c=o.icon;return s.jsx(M.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:l*.1},children:s.jsxs(te,{className:"bg-slate-800/50 backdrop-blur-xl border-slate-700 hover:border-slate-600 transition-all duration-300 hover:scale-[1.02] hover:shadow-xl",children:[s.jsxs(ue,{className:"flex flex-row items-center justify-between pb-2",children:[s.jsx(de,{className:"text-sm font-medium text-slate-400",children:o.title}),s.jsx("div",{className:`p-2 rounded-lg ${o.bgColor}`,children:s.jsx(c,{className:`w-5 h-5 bg-gradient-to-r ${o.color} bg-clip-text text-transparent`})})]}),s.jsxs(ne,{children:[s.jsx("div",{className:`text-3xl font-bold bg-gradient-to-r ${o.color} bg-clip-text text-transparent`,children:r?"...":o.value}),s.jsxs("p",{className:"text-xs text-slate-500 mt-1",children:["Total ",o.title.toLowerCase()]})]})]})},o.title)})}),s.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6 mt-8",children:[s.jsxs(te,{className:"bg-gradient-to-br from-indigo-900/50 to-blue-900/50 backdrop-blur-xl border-slate-700",children:[s.jsx(ue,{children:s.jsx(de,{className:"text-white",children:"Publish Changes"})}),s.jsx(ne,{children:s.jsx(XO,{})})]}),s.jsxs(te,{className:"bg-gradient-to-br from-blue-900/50 to-purple-900/50 backdrop-blur-xl border-slate-700",children:[s.jsx(ue,{children:s.jsx(de,{className:"text-white",children:"Quick Actions"})}),s.jsxs(ne,{className:"space-y-3",children:[s.jsxs("a",{href:"/admin/research",className:"block p-3 bg-slate-800/50 rounded-lg hover:bg-slate-700/50 transition-colors",children:[s.jsx("p",{className:"text-white font-medium",children:"Create New Research Project"}),s.jsx("p",{className:"text-sm text-slate-400",children:"Add a new research project to showcase"})]}),s.jsxs("a",{href:"/admin/news",className:"block p-3 bg-slate-800/50 rounded-lg hover:bg-slate-700/50 transition-colors",children:[s.jsx("p",{className:"text-white font-medium",children:"Publish News Article"}),s.jsx("p",{className:"text-sm text-slate-400",children:"Share latest updates and announcements"})]}),s.jsxs("a",{href:"/admin/courses",className:"block p-3 bg-slate-800/50 rounded-lg hover:bg-slate-700/50 transition-colors",children:[s.jsx("p",{className:"text-white font-medium",children:"Add New Course"}),s.jsx("p",{className:"text-sm text-slate-400",children:"Create educational course content"})]})]})]})]}),s.jsx("div",{className:"grid grid-cols-1 gap-6",children:s.jsxs(te,{className:"bg-gradient-to-br from-slate-900/50 to-slate-800/50 backdrop-blur-xl border-slate-700",children:[s.jsx(ue,{children:s.jsx(de,{className:"text-white",children:"Recent Activity"})}),s.jsx(ne,{children:s.jsx("p",{className:"text-slate-400 text-sm",children:"Activity tracking coming soon. This will show recent content updates, edits, and additions."})})]})})]})},JO=()=>{const{user:e,logout:t}=El(),n=Wt(),r=Ua(),[i,a]=p.useState(!0),o=()=>{t(),r("/admin/login")},l=[{path:"/admin/dashboard",label:"Dashboard",icon:hT},{path:"/admin/research",label:"Research Projects",icon:ys},{path:"/admin/news",label:"News & Updates",icon:wp},{path:"/admin/courses",label:"Courses",icon:du},{path:"/admin/workshops",label:"Workshops",icon:du},{path:"/admin/team",label:"Team Members",icon:mt},{path:"/admin/publications",label:"Publications",icon:el},{path:"/admin/labs",label:"Labs & Facilities",icon:lT}];return s.jsxs("div",{className:"min-h-screen bg-gradient-to-br from-blue-950 via-slate-900 to-black",children:[s.jsx("aside",{className:`fixed left-0 top-0 h-full bg-slate-900/95 backdrop-blur-xl border-r border-slate-700 transition-all duration-300 z-50 ${i?"w-64":"w-0"} overflow-hidden`,children:s.jsxs("div",{className:"p-6",children:[s.jsxs("div",{className:"flex items-center justify-between mb-8",children:[s.jsx("h2",{className:"text-xl font-bold bg-gradient-to-r from-blue-400 to-purple-400 bg-clip-text text-transparent",children:"Admin Portal"}),s.jsx(Q,{variant:"ghost",size:"icon",onClick:()=>a(!1),className:"lg:hidden text-slate-400 hover:text-white",children:s.jsx(Yu,{className:"w-5 h-5"})})]}),s.jsxs("div",{className:"mb-6 p-4 bg-slate-800/50 rounded-lg border border-slate-700",children:[s.jsx("p",{className:"text-sm text-slate-400 mb-1",children:"Logged in as"}),s.jsx("p",{className:"text-white font-semibold",children:e==null?void 0:e.username})]}),s.jsx("nav",{className:"space-y-2",children:l.map(c=>{const u=c.icon,d=n.pathname===c.path;return s.jsx(Ce,{to:c.path,children:s.jsxs("div",{className:`flex items-center gap-3 px-4 py-3 rounded-lg transition-all duration-200 ${d?"bg-gradient-to-r from-blue-600 to-purple-600 text-white shadow-lg":"text-slate-400 hover:bg-slate-800/50 hover:text-white"}`,children:[s.jsx(u,{className:"w-5 h-5"}),s.jsx("span",{className:"font-medium",children:c.label})]})},c.path)})}),s.jsx("div",{className:"absolute bottom-6 left-6 right-6",children:s.jsxs(Q,{onClick:o,variant:"outline",className:"w-full bg-red-950/30 border-red-800 text-red-400 hover:bg-red-900/50 hover:text-red-300",children:[s.jsx(pT,{className:"w-4 h-4 mr-2"}),"Logout"]})})]})}),s.jsxs("div",{className:`transition-all duration-300 ${i?"ml-64":"ml-0"}`,children:[s.jsx("header",{className:"bg-slate-900/80 backdrop-blur-xl border-b border-slate-700 sticky top-0 z-40",children:s.jsxs("div",{className:"px-6 py-4 flex items-center justify-between",children:[s.jsx(Q,{variant:"ghost",size:"icon",onClick:()=>a(!i),className:"text-slate-400 hover:text-white",children:s.jsx(S1,{className:"w-5 h-5"})}),s.jsx("div",{className:"flex items-center gap-4",children:s.jsx(Ce,{to:"/",children:s.jsx(Q,{variant:"outline",className:"border-slate-700 text-slate-300 hover:text-white",children:"View Website"})})})]})}),s.jsx("main",{className:"p-6",children:s.jsx(XR,{})})]}),i&&s.jsx("div",{className:"fixed inset-0 bg-black/50 z-40 lg:hidden",onClick:()=>a(!1)})]})},J2=p.forwardRef(({className:e,...t},n)=>s.jsx("div",{className:"relative w-full overflow-auto",children:s.jsx("table",{ref:n,className:ge("w-full caption-bottom text-sm",e),...t})}));J2.displayName="Table";const eC=p.forwardRef(({className:e,...t},n)=>s.jsx("thead",{ref:n,className:ge("[&_tr]:border-b",e),...t}));eC.displayName="TableHeader";const tC=p.forwardRef(({className:e,...t},n)=>s.jsx("tbody",{ref:n,className:ge("[&_tr:last-child]:border-0",e),...t}));tC.displayName="TableBody";const eI=p.forwardRef(({className:e,...t},n)=>s.jsx("tfoot",{ref:n,className:ge("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));eI.displayName="TableFooter";const _c=p.forwardRef(({className:e,...t},n)=>s.jsx("tr",{ref:n,className:ge("border-b transition-colors data-[state=selected]:bg-muted hover:bg-muted/50",e),...t}));_c.displayName="TableRow";const ym=p.forwardRef(({className:e,...t},n)=>s.jsx("th",{ref:n,className:ge("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...t}));ym.displayName="TableHead";const go=p.forwardRef(({className:e,...t},n)=>s.jsx("td",{ref:n,className:ge("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));go.displayName="TableCell";const tI=p.forwardRef(({className:e,...t},n)=>s.jsx("caption",{ref:n,className:ge("mt-4 text-sm text-muted-foreground",e),...t}));tI.displayName="TableCaption";const Si=({data:e,columns:t,onEdit:n,onDelete:r,onCreate:i,isLoading:a=!1,searchKeys:o=["title","name"]})=>{const[l,c]=p.useState(""),u=e.filter(d=>l?o.some(h=>{const f=d[h];return f&&f.toLowerCase().includes(l.toLowerCase())}):!0);return s.jsxs("div",{className:"space-y-4",children:[s.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-between items-start sm:items-center",children:[s.jsxs("div",{className:"relative flex-1 max-w-sm",children:[s.jsx(Qt,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-slate-500"}),s.jsx($,{placeholder:"Search...",value:l,onChange:d=>c(d.target.value),className:"pl-10 bg-slate-800/50 border-slate-700 text-white placeholder:text-slate-500"})]}),s.jsxs(Q,{onClick:i,className:"bg-gradient-to-r from-blue-600 to-purple-600 hover:from-blue-700 hover:to-purple-700",children:[s.jsx(yT,{className:"w-4 h-4 mr-2"}),"Create New"]})]}),s.jsx("div",{className:"border border-slate-700 rounded-lg overflow-hidden bg-slate-900/50 backdrop-blur-xl",children:s.jsxs(J2,{children:[s.jsx(eC,{children:s.jsxs(_c,{className:"border-slate-700 hover:bg-slate-800/50",children:[t.map(d=>s.jsx(ym,{className:"text-slate-300 font-semibold",children:d.label},d.key)),s.jsx(ym,{className:"text-slate-300 font-semibold text-right",children:"Actions"})]})}),s.jsx(tC,{children:a?s.jsx(_c,{children:s.jsx(go,{colSpan:t.length+1,className:"text-center py-8 text-slate-400",children:"Loading..."})}):u.length===0?s.jsx(_c,{children:s.jsx(go,{colSpan:t.length+1,className:"text-center py-8 text-slate-400",children:l?"No results found":"No data available"})}):u.map((d,h)=>s.jsxs(M.tr,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:h*.05},className:"border-slate-700 hover:bg-slate-800/50 transition-colors",children:[t.map(f=>s.jsx(go,{className:"text-slate-300",children:f.render?f.render(d[f.key],d):d[f.key]},f.key)),s.jsx(go,{className:"text-right",children:s.jsxs("div",{className:"flex justify-end gap-2",children:[s.jsxs(Q,{variant:"outline",size:"sm",onClick:()=>n(d),className:"border-blue-700 text-blue-400 hover:bg-blue-950/50 hover:text-blue-300",children:[s.jsx(xT,{className:"w-3 h-3 mr-1"}),"Edit"]}),s.jsxs(Q,{variant:"outline",size:"sm",onClick:()=>r(d.id),className:"border-red-700 text-red-400 hover:bg-red-950/50 hover:text-red-300",children:[s.jsx(NT,{className:"w-3 h-3 mr-1"}),"Delete"]})]})})]},d.id))})]})}),s.jsxs("div",{className:"text-sm text-slate-400",children:["Showing ",u.length," of ",e.length," items"]})]})};var vf="focusScope.autoFocusOnMount",bf="focusScope.autoFocusOnUnmount",pv={bubbles:!1,cancelable:!0},nI="FocusScope",nC=p.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[l,c]=p.useState(null),u=Ln(i),d=Ln(a),h=p.useRef(null),f=Nt(t,g=>c(g)),m=p.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;p.useEffect(()=>{if(r){let g=function(w){if(m.paused||!l)return;const j=w.target;l.contains(j)?h.current=j:Hr(h.current,{select:!0})},v=function(w){if(m.paused||!l)return;const j=w.relatedTarget;j!==null&&(l.contains(j)||Hr(h.current,{select:!0}))},x=function(w){if(document.activeElement===document.body)for(const C of w)C.removedNodes.length>0&&Hr(l)};document.addEventListener("focusin",g),document.addEventListener("focusout",v);const y=new MutationObserver(x);return l&&y.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",v),y.disconnect()}}},[r,l,m.paused]),p.useEffect(()=>{if(l){xv.add(m);const g=document.activeElement;if(!l.contains(g)){const x=new CustomEvent(vf,pv);l.addEventListener(vf,u),l.dispatchEvent(x),x.defaultPrevented||(rI(lI(rC(l)),{select:!0}),document.activeElement===g&&Hr(l))}return()=>{l.removeEventListener(vf,u),setTimeout(()=>{const x=new CustomEvent(bf,pv);l.addEventListener(bf,d),l.dispatchEvent(x),x.defaultPrevented||Hr(g??document.body,{select:!0}),l.removeEventListener(bf,d),xv.remove(m)},0)}}},[l,u,d,m]);const b=p.useCallback(g=>{if(!n&&!r||m.paused)return;const v=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,x=document.activeElement;if(v&&x){const y=g.currentTarget,[w,j]=sI(y);w&&j?!g.shiftKey&&x===j?(g.preventDefault(),n&&Hr(w,{select:!0})):g.shiftKey&&x===w&&(g.preventDefault(),n&&Hr(j,{select:!0})):x===y&&g.preventDefault()}},[n,r,m.paused]);return s.jsx(Re.div,{tabIndex:-1,...o,ref:f,onKeyDown:b})});nC.displayName=nI;function rI(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Hr(r,{select:t}),document.activeElement!==n)return}function sI(e){const t=rC(e),n=gv(t,e),r=gv(t.reverse(),e);return[n,r]}function rC(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function gv(e,t){for(const n of e)if(!iI(n,{upTo:t}))return n}function iI(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function aI(e){return e instanceof HTMLInputElement&&"select"in e}function Hr(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&aI(e)&&t&&e.select()}}var xv=oI();function oI(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=yv(e,t),e.unshift(t)},remove(t){var n;e=yv(e,t),(n=e[0])==null||n.resume()}}}function yv(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function lI(e){return e.filter(t=>t.tagName!=="A")}var wf=0;function cI(){p.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??vv()),document.body.insertAdjacentElement("beforeend",e[1]??vv()),wf++,()=>{wf===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),wf--}},[])}function vv(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Xn=function(){return Xn=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},Xn.apply(this,arguments)};function sC(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function uI(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var Vc="right-scroll-bar-position",zc="width-before-scroll-bar",dI="with-scroll-bars-hidden",fI="--removed-body-scroll-bar-size";function jf(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function hI(e,t){var n=p.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}var mI=typeof window<"u"?p.useLayoutEffect:p.useEffect,bv=new WeakMap;function pI(e,t){var n=hI(null,function(r){return e.forEach(function(i){return jf(i,r)})});return mI(function(){var r=bv.get(n);if(r){var i=new Set(r),a=new Set(e),o=n.current;i.forEach(function(l){a.has(l)||jf(l,null)}),a.forEach(function(l){i.has(l)||jf(l,o)})}bv.set(n,e)},[e]),n}function gI(e){return e}function xI(e,t){t===void 0&&(t=gI);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(a){var o=t(a,r);return n.push(o),function(){n=n.filter(function(l){return l!==o})}},assignSyncMedium:function(a){for(r=!0;n.length;){var o=n;n=[],o.forEach(a)}n={push:function(l){return a(l)},filter:function(){return n}}},assignMedium:function(a){r=!0;var o=[];if(n.length){var l=n;n=[],l.forEach(a),o=n}var c=function(){var d=o;o=[],d.forEach(a)},u=function(){return Promise.resolve().then(c)};u(),n={push:function(d){o.push(d),u()},filter:function(d){return o=o.filter(d),n}}}};return i}function yI(e){e===void 0&&(e={});var t=xI(null);return t.options=Xn({async:!0,ssr:!1},e),t}var iC=function(e){var t=e.sideCar,n=sC(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return p.createElement(r,Xn({},n))};iC.isSideCarExport=!0;function vI(e,t){return e.useMedium(t),iC}var aC=yI(),Nf=function(){},md=p.forwardRef(function(e,t){var n=p.useRef(null),r=p.useState({onScrollCapture:Nf,onWheelCapture:Nf,onTouchMoveCapture:Nf}),i=r[0],a=r[1],o=e.forwardProps,l=e.children,c=e.className,u=e.removeScrollBar,d=e.enabled,h=e.shards,f=e.sideCar,m=e.noRelative,b=e.noIsolation,g=e.inert,v=e.allowPinchZoom,x=e.as,y=x===void 0?"div":x,w=e.gapMode,j=sC(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=f,N=pI([n,t]),S=Xn(Xn({},j),i);return p.createElement(p.Fragment,null,d&&p.createElement(C,{sideCar:aC,removeScrollBar:u,shards:h,noRelative:m,noIsolation:b,inert:g,setCallbacks:a,allowPinchZoom:!!v,lockRef:n,gapMode:w}),o?p.cloneElement(p.Children.only(l),Xn(Xn({},S),{ref:N})):p.createElement(y,Xn({},S,{className:c,ref:N}),l))});md.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};md.classNames={fullWidth:zc,zeroRight:Vc};var bI=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function wI(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=bI();return t&&e.setAttribute("nonce",t),e}function jI(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function NI(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var CI=function(){var e=0,t=null;return{add:function(n){e==0&&(t=wI())&&(jI(t,n),NI(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},SI=function(){var e=CI();return function(t,n){p.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},oC=function(){var e=SI(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},kI={left:0,top:0,right:0,gap:0},Cf=function(e){return parseInt(e||"",10)||0},EI=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[Cf(n),Cf(r),Cf(i)]},TI=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return kI;var t=EI(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},PI=oC(),ca="data-scroll-locked",AI=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,l=e.gap;return n===void 0&&(n="margin"),` .`.concat(dI,` { overflow: hidden `).concat(r,`; padding-right: `).concat(l,"px ").concat(r,`; } body[`).concat(ca,`] { overflow: hidden `).concat(r,`; overscroll-behavior: contain; `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&` padding-left: `.concat(i,`px; padding-top: `).concat(a,`px; padding-right: `).concat(o,`px; margin-left:0; margin-top:0; margin-right: `).concat(l,"px ").concat(r,`; `),n==="padding"&&"padding-right: ".concat(l,"px ").concat(r,";")].filter(Boolean).join(""),` } .`).concat(Vc,` { right: `).concat(l,"px ").concat(r,`; } .`).concat(zc,` { margin-right: `).concat(l,"px ").concat(r,`; } .`).concat(Vc," .").concat(Vc,` { right: 0 `).concat(r,`; } .`).concat(zc," .").concat(zc,` { margin-right: 0 `).concat(r,`; } body[`).concat(ca,`] { `).concat(fI,": ").concat(l,`px; } `)},wv=function(){var e=parseInt(document.body.getAttribute(ca)||"0",10);return isFinite(e)?e:0},RI=function(){p.useEffect(function(){return document.body.setAttribute(ca,(wv()+1).toString()),function(){var e=wv()-1;e<=0?document.body.removeAttribute(ca):document.body.setAttribute(ca,e.toString())}},[])},DI=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r;RI();var a=p.useMemo(function(){return TI(i)},[i]);return p.createElement(PI,{styles:AI(a,!t,i,n?"":"!important")})},vm=!1;if(typeof window<"u")try{var fc=Object.defineProperty({},"passive",{get:function(){return vm=!0,!0}});window.addEventListener("test",fc,fc),window.removeEventListener("test",fc,fc)}catch{vm=!1}var Di=vm?{passive:!1}:!1,MI=function(e){return e.tagName==="TEXTAREA"},lC=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!MI(e)&&n[t]==="visible")},FI=function(e){return lC(e,"overflowY")},LI=function(e){return lC(e,"overflowX")},jv=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=cC(e,r);if(i){var a=uC(e,r),o=a[1],l=a[2];if(o>l)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},OI=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},II=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},cC=function(e,t){return e==="v"?FI(t):LI(t)},uC=function(e,t){return e==="v"?OI(t):II(t)},_I=function(e,t){return e==="h"&&t==="rtl"?-1:1},VI=function(e,t,n,r,i){var a=_I(e,window.getComputedStyle(t).direction),o=a*r,l=n.target,c=t.contains(l),u=!1,d=o>0,h=0,f=0;do{if(!l)break;var m=uC(e,l),b=m[0],g=m[1],v=m[2],x=g-v-a*b;(b||x)&&cC(e,l)&&(h+=x,f+=b);var y=l.parentNode;l=y&&y.nodeType===Node.DOCUMENT_FRAGMENT_NODE?y.host:y}while(!c&&l!==document.body||c&&(t.contains(l)||t===l));return(d&&(Math.abs(h)<1||!i)||!d&&(Math.abs(f)<1||!i))&&(u=!0),u},hc=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Nv=function(e){return[e.deltaX,e.deltaY]},Cv=function(e){return e&&"current"in e?e.current:e},zI=function(e,t){return e[0]===t[0]&&e[1]===t[1]},$I=function(e){return` .block-interactivity-`.concat(e,` {pointer-events: none;} .allow-interactivity-`).concat(e,` {pointer-events: all;} `)},BI=0,Mi=[];function UI(e){var t=p.useRef([]),n=p.useRef([0,0]),r=p.useRef(),i=p.useState(BI++)[0],a=p.useState(oC)[0],o=p.useRef(e);p.useEffect(function(){o.current=e},[e]),p.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var g=uI([e.lockRef.current],(e.shards||[]).map(Cv),!0).filter(Boolean);return g.forEach(function(v){return v.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),g.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var l=p.useCallback(function(g,v){if("touches"in g&&g.touches.length===2||g.type==="wheel"&&g.ctrlKey)return!o.current.allowPinchZoom;var x=hc(g),y=n.current,w="deltaX"in g?g.deltaX:y[0]-x[0],j="deltaY"in g?g.deltaY:y[1]-x[1],C,N=g.target,S=Math.abs(w)>Math.abs(j)?"h":"v";if("touches"in g&&S==="h"&&N.type==="range")return!1;var T=jv(S,N);if(!T)return!0;if(T?C=S:(C=S==="v"?"h":"v",T=jv(S,N)),!T)return!1;if(!r.current&&"changedTouches"in g&&(w||j)&&(r.current=C),!C)return!0;var k=r.current||C;return VI(k,v,g,k==="h"?w:j,!0)},[]),c=p.useCallback(function(g){var v=g;if(!(!Mi.length||Mi[Mi.length-1]!==a)){var x="deltaY"in v?Nv(v):hc(v),y=t.current.filter(function(C){return C.name===v.type&&(C.target===v.target||v.target===C.shadowParent)&&zI(C.delta,x)})[0];if(y&&y.should){v.cancelable&&v.preventDefault();return}if(!y){var w=(o.current.shards||[]).map(Cv).filter(Boolean).filter(function(C){return C.contains(v.target)}),j=w.length>0?l(v,w[0]):!o.current.noIsolation;j&&v.cancelable&&v.preventDefault()}}},[]),u=p.useCallback(function(g,v,x,y){var w={name:g,delta:v,target:x,should:y,shadowParent:WI(x)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(j){return j!==w})},1)},[]),d=p.useCallback(function(g){n.current=hc(g),r.current=void 0},[]),h=p.useCallback(function(g){u(g.type,Nv(g),g.target,l(g,e.lockRef.current))},[]),f=p.useCallback(function(g){u(g.type,hc(g),g.target,l(g,e.lockRef.current))},[]);p.useEffect(function(){return Mi.push(a),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:f}),document.addEventListener("wheel",c,Di),document.addEventListener("touchmove",c,Di),document.addEventListener("touchstart",d,Di),function(){Mi=Mi.filter(function(g){return g!==a}),document.removeEventListener("wheel",c,Di),document.removeEventListener("touchmove",c,Di),document.removeEventListener("touchstart",d,Di)}},[]);var m=e.removeScrollBar,b=e.inert;return p.createElement(p.Fragment,null,b?p.createElement(a,{styles:$I(i)}):null,m?p.createElement(DI,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function WI(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const HI=vI(aC,UI);var dC=p.forwardRef(function(e,t){return p.createElement(md,Xn({},e,{ref:t,sideCar:HI}))});dC.classNames=md.classNames;var qI=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Fi=new WeakMap,mc=new WeakMap,pc={},Sf=0,fC=function(e){return e&&(e.host||fC(e.parentNode))},KI=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=fC(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},QI=function(e,t,n,r){var i=KI(t,Array.isArray(e)?e:[e]);pc[n]||(pc[n]=new WeakMap);var a=pc[n],o=[],l=new Set,c=new Set(i),u=function(h){!h||l.has(h)||(l.add(h),u(h.parentNode))};i.forEach(u);var d=function(h){!h||c.has(h)||Array.prototype.forEach.call(h.children,function(f){if(l.has(f))d(f);else try{var m=f.getAttribute(r),b=m!==null&&m!=="false",g=(Fi.get(f)||0)+1,v=(a.get(f)||0)+1;Fi.set(f,g),a.set(f,v),o.push(f),g===1&&b&&mc.set(f,!0),v===1&&f.setAttribute(n,"true"),b||f.setAttribute(r,"true")}catch(x){console.error("aria-hidden: cannot operate on ",f,x)}})};return d(t),l.clear(),Sf++,function(){o.forEach(function(h){var f=Fi.get(h)-1,m=a.get(h)-1;Fi.set(h,f),a.set(h,m),f||(mc.has(h)||h.removeAttribute(r),mc.delete(h)),m||h.removeAttribute(n)}),Sf--,Sf||(Fi=new WeakMap,Fi=new WeakMap,mc=new WeakMap,pc={})}},GI=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=qI(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),QI(r,i,n,"aria-hidden")):function(){return null}},pd="Dialog",[hC,R_]=Ni(pd),[YI,Vn]=hC(pd),mC=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,l=p.useRef(null),c=p.useRef(null),[u,d]=Ku({prop:r,defaultProp:i??!1,onChange:a,caller:pd});return s.jsx(YI,{scope:t,triggerRef:l,contentRef:c,contentId:Eo(),titleId:Eo(),descriptionId:Eo(),open:u,onOpenChange:d,onOpenToggle:p.useCallback(()=>d(h=>!h),[d]),modal:o,children:n})};mC.displayName=pd;var pC="DialogTrigger",XI=p.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Vn(pC,n),a=Nt(t,i.triggerRef);return s.jsx(Re.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":Mg(i.open),...r,ref:a,onClick:je(e.onClick,i.onOpenToggle)})});XI.displayName=pC;var Rg="DialogPortal",[ZI,gC]=hC(Rg,{forceMount:void 0}),xC=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=Vn(Rg,t);return s.jsx(ZI,{scope:t,forceMount:n,children:p.Children.map(r,o=>s.jsx(Ci,{present:n||a.open,children:s.jsx(pp,{asChild:!0,container:i,children:o})}))})};xC.displayName=Rg;var Pu="DialogOverlay",yC=p.forwardRef((e,t)=>{const n=gC(Pu,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=Vn(Pu,e.__scopeDialog);return a.modal?s.jsx(Ci,{present:r||a.open,children:s.jsx(e_,{...i,ref:t})}):null});yC.displayName=Pu;var JI=Jo("DialogOverlay.RemoveScroll"),e_=p.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Vn(Pu,n);return s.jsx(dC,{as:JI,allowPinchZoom:!0,shards:[i.contentRef],children:s.jsx(Re.div,{"data-state":Mg(i.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),bi="DialogContent",vC=p.forwardRef((e,t)=>{const n=gC(bi,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=Vn(bi,e.__scopeDialog);return s.jsx(Ci,{present:r||a.open,children:a.modal?s.jsx(t_,{...i,ref:t}):s.jsx(n_,{...i,ref:t})})});vC.displayName=bi;var t_=p.forwardRef((e,t)=>{const n=Vn(bi,e.__scopeDialog),r=p.useRef(null),i=Nt(t,n.contentRef,r);return p.useEffect(()=>{const a=r.current;if(a)return GI(a)},[]),s.jsx(bC,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:je(e.onCloseAutoFocus,a=>{var o;a.preventDefault(),(o=n.triggerRef.current)==null||o.focus()}),onPointerDownOutside:je(e.onPointerDownOutside,a=>{const o=a.detail.originalEvent,l=o.button===0&&o.ctrlKey===!0;(o.button===2||l)&&a.preventDefault()}),onFocusOutside:je(e.onFocusOutside,a=>a.preventDefault())})}),n_=p.forwardRef((e,t)=>{const n=Vn(bi,e.__scopeDialog),r=p.useRef(!1),i=p.useRef(!1);return s.jsx(bC,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var o,l;(o=e.onCloseAutoFocus)==null||o.call(e,a),a.defaultPrevented||(r.current||(l=n.triggerRef.current)==null||l.focus(),a.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:a=>{var c,u;(c=e.onInteractOutside)==null||c.call(e,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const o=a.target;((u=n.triggerRef.current)==null?void 0:u.contains(o))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&i.current&&a.preventDefault()}})}),bC=p.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,l=Vn(bi,n),c=p.useRef(null),u=Nt(t,c);return cI(),s.jsxs(s.Fragment,{children:[s.jsx(nC,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:s.jsx(qu,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":Mg(l.open),...o,ref:u,onDismiss:()=>l.onOpenChange(!1)})}),s.jsxs(s.Fragment,{children:[s.jsx(r_,{titleId:l.titleId}),s.jsx(i_,{contentRef:c,descriptionId:l.descriptionId})]})]})}),Dg="DialogTitle",wC=p.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Vn(Dg,n);return s.jsx(Re.h2,{id:i.titleId,...r,ref:t})});wC.displayName=Dg;var jC="DialogDescription",NC=p.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Vn(jC,n);return s.jsx(Re.p,{id:i.descriptionId,...r,ref:t})});NC.displayName=jC;var CC="DialogClose",SC=p.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Vn(CC,n);return s.jsx(Re.button,{type:"button",...r,ref:t,onClick:je(e.onClick,()=>i.onOpenChange(!1))})});SC.displayName=CC;function Mg(e){return e?"open":"closed"}var kC="DialogTitleWarning",[D_,EC]=fE(kC,{contentName:bi,titleName:Dg,docsSlug:"dialog"}),r_=({titleId:e})=>{const t=EC(kC),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users. If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component. For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return p.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},s_="DialogDescriptionWarning",i_=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${EC(s_).contentName}}.`;return p.useEffect(()=>{var a;const i=(a=e.current)==null?void 0:a.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},a_=mC,o_=xC,TC=yC,PC=vC,AC=wC,RC=NC,l_=SC;const ki=a_,c_=o_,DC=p.forwardRef(({className:e,...t},n)=>s.jsx(TC,{ref:n,className:ge("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));DC.displayName=TC.displayName;const Ds=p.forwardRef(({className:e,children:t,...n},r)=>s.jsxs(c_,{children:[s.jsx(DC,{}),s.jsxs(PC,{ref:r,className:ge("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...n,children:[t,s.jsxs(l_,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity data-[state=open]:bg-accent data-[state=open]:text-muted-foreground hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[s.jsx(Yu,{className:"h-4 w-4"}),s.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Ds.displayName=PC.displayName;const Ms=({className:e,...t})=>s.jsx("div",{className:ge("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Ms.displayName="DialogHeader";const Fs=p.forwardRef(({className:e,...t},n)=>s.jsx(AC,{ref:n,className:ge("text-lg font-semibold leading-none tracking-tight",e),...t}));Fs.displayName=AC.displayName;const Ls=p.forwardRef(({className:e,...t},n)=>s.jsx(RC,{ref:n,className:ge("text-sm text-muted-foreground",e),...t}));Ls.displayName=RC.displayName;const u_=()=>{const e=Rs(),{toast:t}=Mr(),[n,r]=p.useState([]),[i,a]=p.useState(!0),[o,l]=p.useState(!1),[c,u]=p.useState(!1),[d,h]=p.useState(null),[f,m]=p.useState({}),[b,g]=p.useState(null);p.useEffect(()=>{v()},[]);const v=async()=>{try{const N=await e.research.getAll();r(N)}catch(N){t({title:"Error",description:N.message||"Failed to fetch research projects",variant:"destructive"})}finally{a(!1)}},x=()=>{h(null),m({}),g(null),l(!0)},y=N=>{h(N),m(N),g(null),l(!0)},w=async N=>{if(confirm("Are you sure you want to delete this item?"))try{await e.research.delete(N),t({title:"Success",description:"Research project deleted successfully"}),v()}catch(S){t({title:"Error",description:S.message||"Failed to delete research project",variant:"destructive"})}},j=async N=>{N.preventDefault(),u(!0);try{d?(await e.research.updateWithFile(d.id,f,b||void 0),t({title:"Success",description:"Research project updated successfully"})):(await e.research.createWithFile(f,b||void 0),t({title:"Success",description:"Research project created successfully"})),l(!1),v()}catch(S){t({title:"Error",description:S.message||"Failed to save research project",variant:"destructive"})}finally{u(!1)}},C=[{key:"title",label:"Title"},{key:"category",label:"Category"},{key:"status",label:"Status",render:N=>s.jsx("span",{className:`px-2 py-1 rounded-full text-xs ${N==="Active"?"bg-green-900/30 text-green-400":"bg-slate-700 text-slate-400"}`,children:N||"N/A"})},{key:"leader",label:"Leader"}];return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-4xl font-bold bg-gradient-to-r from-blue-400 to-purple-400 bg-clip-text text-transparent mb-2",children:"Research Projects"}),s.jsx("p",{className:"text-slate-400",children:"Manage your research projects and publications"})]}),s.jsx(Si,{data:n,columns:C,onEdit:y,onDelete:w,onCreate:x,isLoading:i,searchKeys:["title","category","leader"]}),s.jsx(ki,{open:o,onOpenChange:l,children:s.jsxs(Ds,{className:"bg-slate-900 border-slate-700 text-white max-w-2xl max-h-[90vh] overflow-y-auto",children:[s.jsxs(Ms,{children:[s.jsx(Fs,{className:"text-2xl bg-gradient-to-r from-blue-400 to-purple-400 bg-clip-text text-transparent",children:d?"Edit Research Project":"Create Research Project"}),s.jsx(Ls,{className:"text-slate-400",children:d?"Update the research project details":"Add a new research project to your website"})]}),s.jsxs("form",{onSubmit:j,className:"space-y-4 mt-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(I,{htmlFor:"id",children:"Project ID"}),s.jsx($,{id:"id",value:f.id||"",onChange:N=>m({...f,id:N.target.value}),placeholder:"e.g., quantum-computing-1",className:"bg-slate-800/50 border-slate-700",required:!0,disabled:!!d})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(I,{htmlFor:"title",children:"Title"}),s.jsx($,{id:"title",value:f.title||"",onChange:N=>m({...f,title:N.target.value}),placeholder:"Research project title",className:"bg-slate-800/50 border-slate-700",required:!0})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(I,{htmlFor:"category",children:"Category"}),s.jsx($,{id:"category",value:f.category||"",onChange:N=>m({...f,category:N.target.value}),placeholder:"e.g., Quantum Computing",className:"bg-slate-800/50 border-slate-700",required:!0})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(I,{htmlFor:"description",children:"Description"}),s.jsx(_e,{id:"description",value:f.description||"",onChange:N=>m({...f,description:N.target.value}),placeholder:"Brief description of the research project",className:"bg-slate-800/50 border-slate-700 min-h-[100px]",required:!0})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(I,{htmlFor:"leader",children:"Project Leader"}),s.jsx($,{id:"leader",value:f.leader||"",onChange:N=>m({...f,leader:N.target.value}),placeholder:"e.g., Dr. Jane Smith",className:"bg-slate-800/50 border-slate-700"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(I,{htmlFor:"status",children:"Status"}),s.jsx($,{id:"status",value:f.status||"",onChange:N=>m({...f,status:N.target.value}),placeholder:"e.g., Active, Completed",className:"bg-slate-800/50 border-slate-700"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(I,{htmlFor:"teamLead",children:"Team Lead"}),s.jsx($,{id:"teamLead",value:f.teamLead||"",onChange:N=>m({...f,teamLead:N.target.value}),placeholder:"e.g., Dr. John Doe",className:"bg-slate-800/50 border-slate-700"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(I,{htmlFor:"startDate",children:"Start Date"}),s.jsx($,{id:"startDate",type:"date",value:f.startDate||"",onChange:N=>m({...f,startDate:N.target.value}),className:"bg-slate-800/50 border-slate-700"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(I,{htmlFor:"fundingAgency",children:"Funding Agency"}),s.jsx($,{id:"fundingAgency",value:f.fundingAgency||"",onChange:N=>m({...f,fundingAgency:N.target.value}),placeholder:"e.g., National Science Foundation",className:"bg-slate-800/50 border-slate-700"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(I,{htmlFor:"fundingAmount",children:"Funding Amount"}),s.jsx($,{id:"fundingAmount",value:f.fundingAmount||"",onChange:N=>m({...f,fundingAmount:N.target.value}),placeholder:"e.g., $500,000",className:"bg-slate-800/50 border-slate-700"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(I,{htmlFor:"tags",children:"Tags (comma-separated)"}),s.jsx($,{id:"tags",value:(f.tags||[]).join(", "),onChange:N=>m({...f,tags:N.target.value.split(",").map(S=>S.trim())}),placeholder:"e.g., Quantum, Error Correction, Mathematics",className:"bg-slate-800/50 border-slate-700"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(I,{htmlFor:"teamMembers",children:"Team Members (comma-separated)"}),s.jsx(_e,{id:"teamMembers",value:(f.teamMembers||[]).join(", "),onChange:N=>m({...f,teamMembers:N.target.value.split(",").map(S=>S.trim())}),placeholder:"e.g., Dr. Jane Smith, Prof. Robert Johnson",className:"bg-slate-800/50 border-slate-700 min-h-[60px]"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(I,{htmlFor:"collaborators",children:"Collaborators (comma-separated)"}),s.jsx(_e,{id:"collaborators",value:(f.collaborators||[]).join(", "),onChange:N=>m({...f,collaborators:N.target.value.split(",").map(S=>S.trim())}),placeholder:"e.g., MIT, Stanford University, CERN",className:"bg-slate-800/50 border-slate-700 min-h-[60px]"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(I,{htmlFor:"objectives",children:"Research Objectives (one per line)"}),s.jsx(_e,{id:"objectives",value:(f.objectives||[]).join(` `),onChange:N=>m({...f,objectives:N.target.value.split(` `).map(S=>S.trim()).filter(S=>S)}),placeholder:"Enter each objective on a new line",className:"bg-slate-800/50 border-slate-700 min-h-[80px]"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(I,{htmlFor:"achievements",children:"Achievements (one per line)"}),s.jsx(_e,{id:"achievements",value:(f.achievements||[]).join(` `),onChange:N=>m({...f,achievements:N.target.value.split(` `).map(S=>S.trim()).filter(S=>S)}),placeholder:"Enter each achievement on a new line",className:"bg-slate-800/50 border-slate-700 min-h-[80px]"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(I,{htmlFor:"fullDescription",children:"Full Description"}),s.jsx(_e,{id:"fullDescription",value:f.fullDescription||"",onChange:N=>m({...f,fullDescription:N.target.value}),placeholder:"Detailed description of the research project",className:"bg-slate-800/50 border-slate-700 min-h-[100px]"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(I,{htmlFor:"impact",children:"Research Impact"}),s.jsx(_e,{id:"impact",value:f.impact||"",onChange:N=>m({...f,impact:N.target.value}),placeholder:"Description of the research impact and significance",className:"bg-slate-800/50 border-slate-700 min-h-[80px]"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(I,{htmlFor:"featured",children:"Featured Project"}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("input",{id:"featured",type:"checkbox",checked:f.featured||!1,onChange:N=>m({...f,featured:N.target.checked}),className:"w-4 h-4 bg-slate-800/50 border-slate-700 rounded"}),s.jsx("label",{htmlFor:"featured",className:"text-sm text-slate-300",children:"Show this project as featured on the website"})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(I,{htmlFor:"image",children:"Project Image"}),s.jsx($,{id:"image",type:"file",accept:"image/*",onChange:N=>{var S;return g(((S=N.target.files)==null?void 0:S[0])||null)},className:"bg-slate-800/50 border-slate-700"}),(d==null?void 0:d.image)&&!b&&s.jsxs("p",{className:"text-sm text-slate-400",children:["Current: ",s.jsx("a",{href:d.image,target:"_blank",rel:"noopener noreferrer",className:"text-blue-400 hover:underline",children:d.image})]}),b&&s.jsxs("p",{className:"text-sm text-green-400",children:["New file selected: ",b.name]})]}),s.jsxs("div",{className:"flex gap-3 pt-4",children:[s.jsx(Q,{type:"submit",className:"flex-1 bg-gradient-to-r from-blue-600 to-purple-600 hover:from-blue-700 hover:to-purple-700",disabled:c,children:c?s.jsxs(s.Fragment,{children:[s.jsx(Fr,{className:"mr-2 h-4 w-4 animate-spin"}),"Saving..."]}):d?"Update":"Create"}),s.jsx(Q,{type:"button",variant:"outline",onClick:()=>l(!1),className:"flex-1 border-slate-700 text-slate-300 hover:text-white",disabled:c,children:"Cancel"})]})]})]})})]})},d_=()=>{const e=Rs(),{toast:t}=Mr(),[n,r]=p.useState([]),[i,a]=p.useState(!0),[o,l]=p.useState(!1),[c,u]=p.useState(!1),[d,h]=p.useState(null),[f,m]=p.useState({}),[b,g]=p.useState(null);p.useEffect(()=>{v()},[]);const v=async()=>{try{const N=await e.news.getAll();r(N)}catch(N){t({title:"Error",description:N.message||"Failed to fetch news articles",variant:"destructive"})}finally{a(!1)}},x=()=>{h(null),m({date:new Date().toISOString().split("T")[0]}),g(null),l(!0)},y=N=>{h(N),m(N),g(null),l(!0)},w=async N=>{if(confirm("Are you sure you want to delete this news article?"))try{await e.news.delete(N),t({title:"Success",description:"News article deleted successfully"}),v()}catch(S){t({title:"Error",description:S.message||"Failed to delete news article",variant:"destructive"})}},j=async N=>{N.preventDefault(),u(!0);try{d?(await e.news.updateWithFile(d.id,f,b||void 0),t({title:"Success",description:"News article updated successfully"})):(await e.news.createWithFile(f,b||void 0),t({title:"Success",description:"News article created successfully"})),l(!1),v()}catch(S){t({title:"Error",description:S.message||"Failed to save news article",variant:"destructive"})}finally{u(!1)}},C=[{key:"title",label:"Title",render:N=>s.jsx("div",{className:"max-w-xs truncate",children:N})},{key:"date",label:"Date"},{key:"category",label:"Category",render:N=>s.jsx("span",{className:"px-2 py-1 rounded-full text-xs bg-purple-900/30 text-purple-400",children:N})},{key:"author",label:"Author"}];return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-4xl font-bold bg-gradient-to-r from-blue-400 to-purple-400 bg-clip-text text-transparent mb-2",children:"News & Updates"}),s.jsx("p",{className:"text-slate-400",children:"Manage news articles and announcements"})]}),s.jsx(Si,{data:n,columns:C,onEdit:y,onDelete:w,onCreate:x,isLoading:i,searchKeys:["title","category","author"]}),s.jsx(ki,{open:o,onOpenChange:l,children:s.jsxs(Ds,{className:"bg-slate-900 border-slate-700 text-white max-w-2xl max-h-[90vh] overflow-y-auto",children:[s.jsxs(Ms,{children:[s.jsx(Fs,{className:"text-2xl bg-gradient-to-r from-blue-400 to-purple-400 bg-clip-text text-transparent",children:d?"Edit News Article":"Create News Article"}),s.jsx(Ls,{className:"text-slate-400",children:d?"Update the news article details":"Add a new news article to your website"})]}),s.jsxs("form",{onSubmit:j,className:"space-y-4 mt-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(I,{htmlFor:"id",children:"Article ID"}),s.jsx($,{id:"id",value:f.id||"",onChange:N=>m({...f,id:N.target.value}),placeholder:"e.g., news-article-1",className:"bg-slate-800/50 border-slate-700",required:!0,disabled:!!d})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(I,{htmlFor:"title",children:"Title"}),s.jsx($,{id:"title",value:f.title||"",onChange:N=>m({...f,title:N.target.value}),placeholder:"News article title",className:"bg-slate-800/50 border-slate-700",required:!0})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(I,{htmlFor:"date",children:"Date"}),s.jsx($,{id:"date",type:"date",value:f.date||"",onChange:N=>m({...f,date:N.target.value}),className:"bg-slate-800/50 border-slate-700",required:!0})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(I,{htmlFor:"category",children:"Category"}),s.jsx($,{id:"category",value:f.category||"",onChange:N=>m({...f,category:N.target.value}),placeholder:"e.g., Research, Event",className:"bg-slate-800/50 border-slate-700",required:!0})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(I,{htmlFor:"author",children:"Author"}),s.jsx($,{id:"author",value:f.author||"",onChange:N=>m({...f,author:N.target.value}),placeholder:"e.g., Dr. Jane Smith",className:"bg-slate-800/50 border-slate-700"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(I,{htmlFor:"excerpt",children:"Excerpt"}),s.jsx(_e,{id:"excerpt",value:f.excerpt||"",onChange:N=>m({...f,excerpt:N.target.value}),placeholder:"Brief summary of the article",className:"bg-slate-800/50 border-slate-700 min-h-[80px]",required:!0})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(I,{htmlFor:"content",children:"Full Content"}),s.jsx(_e,{id:"content",value:f.content||"",onChange:N=>m({...f,content:N.target.value}),placeholder:"Full article content",className:"bg-slate-800/50 border-slate-700 min-h-[150px]"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(I,{htmlFor:"tags",children:"Tags (comma-separated)"}),s.jsx($,{id:"tags",value:(f.tags||[]).join(", "),onChange:N=>m({...f,tags:N.target.value.split(",").map(S=>S.trim())}),placeholder:"e.g., Quantum Computing, Research, Innovation",className:"bg-slate-800/50 border-slate-700"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(I,{htmlFor:"relatedNews",children:"Related News (comma-separated IDs)"}),s.jsx($,{id:"relatedNews",value:(f.relatedNews||[]).join(", "),onChange:N=>m({...f,relatedNews:N.target.value.split(",").map(S=>S.trim())}),placeholder:"e.g., news-1, news-2",className:"bg-slate-800/50 border-slate-700"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(I,{htmlFor:"featured",children:"Featured Article"}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("input",{id:"featured",type:"checkbox",checked:f.featured||!1,onChange:N=>m({...f,featured:N.target.checked}),className:"w-4 h-4 bg-slate-800/50 border-slate-700 rounded"}),s.jsx("label",{htmlFor:"featured",className:"text-sm text-slate-300",children:"Show this article as featured on the website"})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(I,{htmlFor:"image",children:"Article Image"}),s.jsx($,{id:"image",type:"file",accept:"image/*",onChange:N=>{var S;return g(((S=N.target.files)==null?void 0:S[0])||null)},className:"bg-slate-800/50 border-slate-700"}),(d==null?void 0:d.image)&&!b&&s.jsxs("p",{className:"text-sm text-slate-400",children:["Current: ",s.jsx("a",{href:d.image,target:"_blank",rel:"noopener noreferrer",className:"text-blue-400 hover:underline",children:d.image})]}),b&&s.jsxs("p",{className:"text-sm text-green-400",children:["New file selected: ",b.name]})]}),s.jsxs("div",{className:"flex gap-3 pt-4",children:[s.jsx(Q,{type:"submit",className:"flex-1 bg-gradient-to-r from-blue-600 to-purple-600 hover:from-blue-700 hover:to-purple-700",disabled:c,children:c?s.jsxs(s.Fragment,{children:[s.jsx(Fr,{className:"mr-2 h-4 w-4 animate-spin"}),"Saving..."]}):d?"Update":"Create"}),s.jsx(Q,{type:"button",variant:"outline",onClick:()=>l(!1),className:"flex-1 border-slate-700 text-slate-300 hover:text-white",disabled:c,children:"Cancel"})]})]})]})})]})},f_=()=>{const e=Rs(),{toast:t}=Mr(),[n,r]=p.useState([]),[i,a]=p.useState(!0),[o,l]=p.useState(!1),[c,u]=p.useState(!1),[d,h]=p.useState(null),[f,m]=p.useState({});p.useEffect(()=>{b()},[]);const b=async()=>{try{const j=await e.courses.getAll();r(j)}catch(j){t({title:"Error",description:j.message||"Failed to fetch courses",variant:"destructive"})}finally{a(!1)}},g=()=>{h(null),m({}),l(!0)},v=j=>{h(j),m(j),l(!0)},x=async j=>{if(confirm("Are you sure you want to delete this course?"))try{await e.courses.delete(j),t({title:"Success",description:"Course deleted successfully"}),b()}catch(C){t({title:"Error",description:C.message||"Failed to delete course",variant:"destructive"})}},y=async j=>{j.preventDefault(),u(!0);try{d?(await e.courses.update(d.id,f),t({title:"Success",description:"Course updated successfully"})):(await e.courses.create(f),t({title:"Success",description:"Course created successfully"})),l(!1),b()}catch(C){t({title:"Error",description:C.message||"Failed to save course",variant:"destructive"})}finally{u(!1)}},w=[{key:"code",label:"Code",render:j=>s.jsx("span",{className:"font-mono text-sm text-blue-400",children:j})},{key:"title",label:"Title",render:j=>s.jsx("div",{className:"max-w-xs truncate",children:j})},{key:"level",label:"Level",render:j=>s.jsx("span",{className:`px-2 py-1 rounded-full text-xs ${j==="Advanced"?"bg-red-900/30 text-red-400":j==="Intermediate"?"bg-orange-900/30 text-orange-400":"bg-green-900/30 text-green-400"}`,children:j})},{key:"credits",label:"Credits"},{key:"instructor",label:"Instructor"}];return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-4xl font-bold bg-gradient-to-r from-blue-400 to-purple-400 bg-clip-text text-transparent mb-2",children:"Courses"}),s.jsx("p",{className:"text-slate-400",children:"Manage educational courses and programs"})]}),s.jsx(Si,{data:n,columns:w,onEdit:v,onDelete:x,onCreate:g,isLoading:i,searchKeys:["title","code","instructor","level"]}),s.jsx(ki,{open:o,onOpenChange:l,children:s.jsxs(Ds,{className:"bg-slate-900 border-slate-700 text-white max-w-2xl max-h-[90vh] overflow-y-auto",children:[s.jsxs(Ms,{children:[s.jsx(Fs,{className:"text-2xl bg-gradient-to-r from-blue-400 to-purple-400 bg-clip-text text-transparent",children:d?"Edit Course":"Create Course"}),s.jsx(Ls,{className:"text-slate-400",children:d?"Update the course details":"Add a new course to your educational programs"})]}),s.jsxs("form",{onSubmit:y,className:"space-y-4 mt-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(I,{htmlFor:"id",children:"Course ID"}),s.jsx($,{id:"id",value:f.id||"",onChange:j=>m({...f,id:j.target.value}),placeholder:"e.g., course-1",className:"bg-slate-800/50 border-slate-700",required:!0,disabled:!!d})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(I,{htmlFor:"code",children:"Course Code"}),s.jsx($,{id:"code",value:f.code||"",onChange:j=>m({...f,code:j.target.value}),placeholder:"e.g., QC101",className:"bg-slate-800/50 border-slate-700",required:!0})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(I,{htmlFor:"credits",children:"Credits"}),s.jsx($,{id:"credits",type:"number",value:f.credits||"",onChange:j=>m({...f,credits:parseInt(j.target.value)}),placeholder:"e.g., 3",className:"bg-slate-800/50 border-slate-700",required:!0})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(I,{htmlFor:"title",children:"Course Title"}),s.jsx($,{id:"title",value:f.title||"",onChange:j=>m({...f,title:j.target.value}),placeholder:"e.g., Introduction to Quantum Computing",className:"bg-slate-800/50 border-slate-700",required:!0})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(I,{htmlFor:"level",children:"Level"}),s.jsx($,{id:"level",value:f.level||"",onChange:j=>m({...f,level:j.target.value}),placeholder:"e.g., Beginner, Intermediate, Advanced",className:"bg-slate-800/50 border-slate-700",required:!0})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(I,{htmlFor:"duration",children:"Duration"}),s.jsx($,{id:"duration",value:f.duration||"",onChange:j=>m({...f,duration:j.target.value}),placeholder:"e.g., 12 weeks",className:"bg-slate-800/50 border-slate-700"})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(I,{htmlFor:"instructor",children:"Instructor"}),s.jsx($,{id:"instructor",value:f.instructor||"",onChange:j=>m({...f,instructor:j.target.value}),placeholder:"e.g., Dr. Jane Smith",className:"bg-slate-800/50 border-slate-700",required:!0})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(I,{htmlFor:"schedule",children:"Schedule"}),s.jsx($,{id:"schedule",value:f.schedule||"",onChange:j=>m({...f,schedule:j.target.value}),placeholder:"e.g., Mon/Wed 10:00 AM - 12:00 PM",className:"bg-slate-800/50 border-slate-700"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(I,{htmlFor:"semester",children:"Semester"}),s.jsx($,{id:"semester",value:f.semester||"",onChange:j=>m({...f,semester:j.target.value}),placeholder:"e.g., Monsoon 2025",className:"bg-slate-800/50 border-slate-700"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(I,{htmlFor:"location",children:"Location"}),s.jsx($,{id:"location",value:f.location||"",onChange:j=>m({...f,location:j.target.value}),placeholder:"e.g., Academic Block, IIIT-Delhi",className:"bg-slate-800/50 border-slate-700"})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsxs(I,{htmlFor:"capacity",children:["Capacity ",s.jsx("span",{className:"text-xs text-slate-500",children:"(optional)"})]}),s.jsx($,{id:"capacity",type:"number",value:f.capacity??"",onChange:j=>{const C=j.target.value.trim();m({...f,capacity:C===""?null:parseInt(C)})},placeholder:"Leave empty to hide",className:"bg-slate-800/50 border-slate-700"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs(I,{htmlFor:"enrolled",children:["Enrolled ",s.jsx("span",{className:"text-xs text-slate-500",children:"(optional)"})]}),s.jsx($,{id:"enrolled",type:"number",value:f.enrolled??"",onChange:j=>{const C=j.target.value.trim();m({...f,enrolled:C===""?null:parseInt(C)})},placeholder:"Leave empty to hide",className:"bg-slate-800/50 border-slate-700"})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(I,{htmlFor:"coInstructors",children:"Co-Instructors (comma-separated)"}),s.jsx($,{id:"coInstructors",value:(f.coInstructors||[]).join(", "),onChange:j=>m({...f,coInstructors:j.target.value.split(",").map(C=>C.trim())}),placeholder:"e.g., Dr. John Smith, Dr. Jane Doe",className:"bg-slate-800/50 border-slate-700"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(I,{htmlFor:"description",children:"Description"}),s.jsx(_e,{id:"description",value:f.description||"",onChange:j=>m({...f,description:j.target.value}),placeholder:"Course description and objectives",className:"bg-slate-800/50 border-slate-700 min-h-[100px]",required:!0})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(I,{htmlFor:"prerequisites",children:"Prerequisites (one per line)"}),s.jsx(_e,{id:"prerequisites",value:Array.isArray(f.prerequisites)?f.prerequisites.join(` `):f.prerequisites||"",onChange:j=>m({...f,prerequisites:j.target.value.split(` `).map(C=>C.trim()).filter(C=>C)}),placeholder:"Enter each prerequisite on a new line",className:"bg-slate-800/50 border-slate-700 min-h-[60px]"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(I,{htmlFor:"objectives",children:"Course Objectives (one per line)"}),s.jsx(_e,{id:"objectives",value:(f.objectives||[]).join(` `),onChange:j=>m({...f,objectives:j.target.value.split(` `).map(C=>C.trim()).filter(C=>C)}),placeholder:"Enter each objective on a new line",className:"bg-slate-800/50 border-slate-700 min-h-[80px]"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(I,{htmlFor:"tags",children:"Tags (comma-separated)"}),s.jsx($,{id:"tags",value:(f.tags||[]).join(", "),onChange:j=>m({...f,tags:j.target.value.split(",").map(C=>C.trim())}),placeholder:"e.g., Quantum Computing, Mathematics",className:"bg-slate-800/50 border-slate-700"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(I,{htmlFor:"featured",children:"Featured Course"}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("input",{id:"featured",type:"checkbox",checked:f.featured||!1,onChange:j=>m({...f,featured:j.target.checked}),className:"w-4 h-4 bg-slate-800/50 border-slate-700 rounded"}),s.jsx("label",{htmlFor:"featured",className:"text-sm text-slate-300",children:"Show this course as featured on the website"})]})]}),s.jsxs("div",{className:"flex gap-3 pt-4",children:[s.jsx(Q,{type:"submit",className:"flex-1 bg-gradient-to-r from-blue-600 to-purple-600 hover:from-blue-700 hover:to-purple-700",disabled:c,children:c?s.jsxs(s.Fragment,{children:[s.jsx(Fr,{className:"mr-2 h-4 w-4 animate-spin"}),"Saving..."]}):d?"Update":"Create"}),s.jsx(Q,{type:"button",variant:"outline",onClick:()=>l(!1),className:"flex-1 border-slate-700 text-slate-300 hover:text-white",disabled:c,children:"Cancel"})]})]})]})})]})},h_=()=>{const e=Rs(),{toast:t}=Mr(),[n,r]=p.useState([]),[i,a]=p.useState(!0),[o,l]=p.useState(!1),[c,u]=p.useState(!1),[d,h]=p.useState(null),[f,m]=p.useState({});p.useEffect(()=>{b()},[]);const b=async()=>{try{const j=await e.workshops.getAll();r(j)}catch(j){t({title:"Error",description:j.message||"Failed to fetch workshops",variant:"destructive"})}finally{a(!1)}},g=()=>{h(null),m({}),l(!0)},v=j=>{h(j),m(j),l(!0)},x=async j=>{if(confirm("Are you sure you want to delete this workshop?"))try{await e.workshops.delete(j),t({title:"Success",description:"Workshop deleted successfully"}),b()}catch(C){t({title:"Error",description:C.message||"Failed to delete workshop",variant:"destructive"})}},y=async j=>{j.preventDefault(),u(!0);try{d?(await e.workshops.update(d.id,f),t({title:"Success",description:"Workshop updated successfully"})):(await e.workshops.create(f),t({title:"Success",description:"Workshop created successfully"})),l(!1),b()}catch(C){t({title:"Error",description:C.message||"Failed to save workshop",variant:"destructive"})}finally{u(!1)}},w=[{key:"title",label:"Title",render:j=>s.jsx("div",{className:"max-w-xs truncate",children:j})},{key:"date",label:"Date"},{key:"location",label:"Location"},{key:"status",label:"Status",render:j=>s.jsx("span",{className:`px-2 py-1 rounded-full text-xs ${j==="Upcoming"?"bg-blue-900/30 text-blue-400":j==="Ongoing"?"bg-green-900/30 text-green-400":j==="Completed"?"bg-slate-700 text-slate-400":"bg-orange-900/30 text-orange-400"}`,children:j||"N/A"})},{key:"instructor",label:"Instructor"}];return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-4xl font-bold bg-gradient-to-r from-blue-400 to-purple-400 bg-clip-text text-transparent mb-2",children:"Workshops & Seminars"}),s.jsx("p",{className:"text-slate-400",children:"Manage workshops, seminars, and training events"})]}),s.jsx(Si,{data:n,columns:w,onEdit:v,onDelete:x,onCreate:g,isLoading:i,searchKeys:["title","location","instructor"]}),s.jsx(ki,{open:o,onOpenChange:l,children:s.jsxs(Ds,{className:"bg-slate-900 border-slate-700 text-white max-w-2xl max-h-[90vh] overflow-y-auto",children:[s.jsxs(Ms,{children:[s.jsx(Fs,{className:"text-2xl bg-gradient-to-r from-blue-400 to-purple-400 bg-clip-text text-transparent",children:d?"Edit Workshop":"Create Workshop"}),s.jsx(Ls,{className:"text-slate-400",children:d?"Update the workshop details":"Add a new workshop or seminar event"})]}),s.jsxs("form",{onSubmit:y,className:"space-y-4 mt-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(I,{htmlFor:"id",children:"Workshop ID"}),s.jsx($,{id:"id",value:f.id||"",onChange:j=>m({...f,id:j.target.value}),placeholder:"e.g., workshop-1",className:"bg-slate-800/50 border-slate-700",required:!0,disabled:!!d})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(I,{htmlFor:"title",children:"Workshop Title"}),s.jsx($,{id:"title",value:f.title||"",onChange:j=>m({...f,title:j.target.value}),placeholder:"e.g., Quantum Programming Workshop",className:"bg-slate-800/50 border-slate-700",required:!0})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(I,{htmlFor:"date",children:"Start Date"}),s.jsx($,{id:"date",type:"date",value:f.startDate||f.date||"",onChange:j=>m({...f,startDate:j.target.value,date:j.target.value}),className:"bg-slate-800/50 border-slate-700"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(I,{htmlFor:"endDate",children:"End Date"}),s.jsx($,{id:"endDate",type:"date",value:f.endDate||"",onChange:j=>m({...f,endDate:j.target.value}),className:"bg-slate-800/50 border-slate-700"})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(I,{htmlFor:"time",children:"Time"}),s.jsx($,{id:"time",value:f.time||"",onChange:j=>m({...f,time:j.target.value}),placeholder:"e.g., 10:00 AM - 4:00 PM",className:"bg-slate-800/50 border-slate-700"})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(I,{htmlFor:"location",children:"Location"}),s.jsx($,{id:"location",value:f.location||f.venue||"",onChange:j=>m({...f,location:j.target.value,venue:j.target.value}),placeholder:"e.g., Quantum Lab, Building A",className:"bg-slate-800/50 border-slate-700"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(I,{htmlFor:"type",children:"Type"}),s.jsx($,{id:"type",value:f.type||"",onChange:j=>m({...f,type:j.target.value}),placeholder:"e.g., Workshop, Seminar, Event",className:"bg-slate-800/50 border-slate-700"})]})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(I,{htmlFor:"format",children:"Format"}),s.jsx($,{id:"format",value:f.format||"",onChange:j=>m({...f,format:j.target.value}),placeholder:"e.g., In-person, Online, Hybrid",className:"bg-slate-800/50 border-slate-700"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(I,{htmlFor:"duration",children:"Duration"}),s.jsx($,{id:"duration",value:f.duration||"",onChange:j=>m({...f,duration:j.target.value}),placeholder:"e.g., 6 hours, 1 day",className:"bg-slate-800/50 border-slate-700"})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(I,{htmlFor:"instructor",children:"Instructor/Organizer"}),s.jsx($,{id:"instructor",value:f.instructor||"",onChange:j=>m({...f,instructor:j.target.value}),placeholder:"e.g., Dr. Jane Smith",className:"bg-slate-800/50 border-slate-700"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(I,{htmlFor:"organizers",children:"Organizers (comma-separated)"}),s.jsx($,{id:"organizers",value:(f.organizers||[]).join(", "),onChange:j=>m({...f,organizers:j.target.value.split(",").map(C=>C.trim())}),placeholder:"e.g., CQT, Department of Physics",className:"bg-slate-800/50 border-slate-700"})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsxs(I,{htmlFor:"capacity",children:["Capacity ",s.jsx("span",{className:"text-xs text-slate-500",children:"(optional)"})]}),s.jsx($,{id:"capacity",type:"number",value:f.capacity??"",onChange:j=>{const C=j.target.value.trim();m({...f,capacity:C===""?null:parseInt(C)})},placeholder:"Leave empty to hide",className:"bg-slate-800/50 border-slate-700"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs(I,{htmlFor:"registered",children:["Registered ",s.jsx("span",{className:"text-xs text-slate-500",children:"(optional)"})]}),s.jsx($,{id:"registered",type:"number",value:f.registered??"",onChange:j=>{const C=j.target.value.trim();m({...f,registered:C===""?null:parseInt(C)})},placeholder:"Leave empty to hide",className:"bg-slate-800/50 border-slate-700"})]})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(I,{htmlFor:"status",children:"Status"}),s.jsx($,{id:"status",value:f.status||"",onChange:j=>m({...f,status:j.target.value}),placeholder:"e.g., Upcoming, Ongoing, Completed, Past Event",className:"bg-slate-800/50 border-slate-700"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(I,{htmlFor:"registrationDeadline",children:"Registration Deadline"}),s.jsx($,{id:"registrationDeadline",type:"date",value:f.registrationDeadline||"",onChange:j=>m({...f,registrationDeadline:j.target.value}),className:"bg-slate-800/50 border-slate-700"})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(I,{htmlFor:"description",children:"Description"}),s.jsx(_e,{id:"description",value:f.description||"",onChange:j=>m({...f,description:j.target.value}),placeholder:"Workshop description and objectives",className:"bg-slate-800/50 border-slate-700 min-h-[100px]",required:!0})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(I,{htmlFor:"topics",children:"Topics Covered (one per line)"}),s.jsx(_e,{id:"topics",value:(f.topics||[]).join(` `),onChange:j=>m({...f,topics:j.target.value.split(` `).map(C=>C.trim()).filter(C=>C)}),placeholder:"Enter each topic on a new line",className:"bg-slate-800/50 border-slate-700 min-h-[80px]"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(I,{htmlFor:"tags",children:"Tags (comma-separated)"}),s.jsx($,{id:"tags",value:(f.tags||[]).join(", "),onChange:j=>m({...f,tags:j.target.value.split(",").map(C=>C.trim())}),placeholder:"e.g., Quantum, Programming, Hands-on",className:"bg-slate-800/50 border-slate-700"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(I,{htmlFor:"featured",children:"Featured Workshop"}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("input",{id:"featured",type:"checkbox",checked:f.featured||!1,onChange:j=>m({...f,featured:j.target.checked}),className:"w-4 h-4 bg-slate-800/50 border-slate-700 rounded"}),s.jsx("label",{htmlFor:"featured",className:"text-sm text-slate-300",children:"Show this workshop as featured on the website"})]})]}),s.jsxs("div",{className:"flex gap-3 pt-4",children:[s.jsx(Q,{type:"submit",className:"flex-1 bg-gradient-to-r from-blue-600 to-purple-600 hover:from-blue-700 hover:to-purple-700",disabled:c,children:c?s.jsxs(s.Fragment,{children:[s.jsx(Fr,{className:"mr-2 h-4 w-4 animate-spin"}),"Saving..."]}):d?"Update":"Create"}),s.jsx(Q,{type:"button",variant:"outline",onClick:()=>l(!1),className:"flex-1 border-slate-700 text-slate-300 hover:text-white",disabled:c,children:"Cancel"})]})]})]})})]})},m_=()=>{var N;const e=Rs(),{toast:t}=Mr(),[n,r]=p.useState([]),[i,a]=p.useState(!0),[o,l]=p.useState(!1),[c,u]=p.useState(!1),[d,h]=p.useState(null),[f,m]=p.useState({}),[b,g]=p.useState(null);p.useEffect(()=>{v()},[]);const v=async()=>{try{const S=await e.team.getAll();r(S)}catch(S){t({title:"Error",description:S.message||"Failed to fetch team members",variant:"destructive"})}finally{a(!1)}},x=()=>{h(null),m({}),g(null),l(!0)},y=S=>{h(S),m(S),g(null),l(!0)},w=async S=>{if(confirm("Are you sure you want to delete this team member?"))try{await e.team.delete(S),t({title:"Success",description:"Team member deleted successfully"}),v()}catch(T){t({title:"Error",description:T.message||"Failed to delete team member",variant:"destructive"})}},j=async S=>{S.preventDefault(),u(!0);try{d?(await e.team.updateWithFile(d.id,f,b||void 0),t({title:"Success",description:"Team member updated successfully"})):(await e.team.createWithFile(f,b||void 0),t({title:"Success",description:"Team member created successfully"})),l(!1),v()}catch(T){t({title:"Error",description:T.message||"Failed to save team member",variant:"destructive"})}finally{u(!1)}},C=[{key:"name",label:"Name",render:S=>s.jsx("div",{className:"font-semibold text-white",children:S})},{key:"role",label:"Role",render:S=>s.jsx("div",{className:"max-w-xs truncate",children:S})},{key:"department",label:"Department",render:S=>s.jsx("span",{className:"px-2 py-1 rounded-full text-xs bg-indigo-900/30 text-indigo-400",children:S})},{key:"email",label:"Email",render:S=>s.jsx("a",{href:`mailto:${S}`,className:"text-blue-400 hover:underline text-sm",children:S})}];return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-4xl font-bold bg-gradient-to-r from-blue-400 to-purple-400 bg-clip-text text-transparent mb-2",children:"Team Members"}),s.jsx("p",{className:"text-slate-400",children:"Manage faculty, researchers, and staff members"})]}),s.jsx(Si,{data:n,columns:C,onEdit:y,onDelete:w,onCreate:x,isLoading:i,searchKeys:["name","role","department","email"]}),s.jsx(ki,{open:o,onOpenChange:l,children:s.jsxs(Ds,{className:"bg-slate-900 border-slate-700 text-white max-w-2xl max-h-[90vh] overflow-y-auto",children:[s.jsxs(Ms,{children:[s.jsx(Fs,{className:"text-2xl bg-gradient-to-r from-blue-400 to-purple-400 bg-clip-text text-transparent",children:d?"Edit Team Member":"Add Team Member"}),s.jsx(Ls,{className:"text-slate-400",children:d?"Update the team member details":"Add a new faculty, researcher, or staff member"})]}),s.jsxs("form",{onSubmit:j,className:"space-y-4 mt-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsx(I,{htmlFor:"id",children:"Member ID"}),s.jsx($,{id:"id",value:f.id||"",onChange:S=>m({...f,id:S.target.value}),placeholder:"e.g., member-1",className:"bg-slate-800/50 border-slate-700",required:!0,disabled:!!d})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(I,{htmlFor:"name",children:"Full Name"}),s.jsx($,{id:"name",value:f.name||"",onChange:S=>m({...f,name:S.target.value}),placeholder:"e.g., Dr. Jane Smith",className:"bg-slate-800/50 border-slate-700",required:!0})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(I,{htmlFor:"role",children:"Role/Title"}),s.jsx($,{id:"role",value:f.role||"",onChange:S=>m({...f,role:S.target.value}),placeholder:"e.g., Professor of Quantum Physics",className:"bg-slate-800/50 border-slate-700",required:!0})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(I,{htmlFor:"title",children:"Position Title"}),s.jsx($,{id:"title",value:f.title||"",onChange:S=>m({...f,title:S.target.value}),placeholder:"e.g., Faculty Member, Research Associate",className:"bg-slate-800/50 border-slate-700"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(I,{htmlFor:"specialization",children:"Specialization"}),s.jsx($,{id:"specialization",value:f.specialization||"",onChange:S=>m({...f,specialization:S.target.value}),placeholder:"e.g., Quantum Computing, Quantum Communication",className:"bg-slate-800/50 border-slate-700"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(I,{htmlFor:"department",children:"Department"}),s.jsx($,{id:"department",value:f.department||"",onChange:S=>m({...f,department:S.target.value}),placeholder:"e.g., Quantum Computing",className:"bg-slate-800/50 border-slate-700",required:!0})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsxs(I,{htmlFor:"email",children:["Email ",s.jsx("span",{className:"text-xs text-slate-500",children:"(optional)"})]}),s.jsx($,{id:"email",type:"email",value:f.email||"",onChange:S=>m({...f,email:S.target.value}),placeholder:"Leave empty to hide",className:"bg-slate-800/50 border-slate-700"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsxs(I,{htmlFor:"phone",children:["Phone ",s.jsx("span",{className:"text-xs text-slate-500",children:"(optional)"})]}),s.jsx($,{id:"phone",type:"tel",value:f.phone||"",onChange:S=>m({...f,phone:S.target.value}),placeholder:"Leave empty to hide",className:"bg-slate-800/50 border-slate-700"})]})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(I,{htmlFor:"bio",children:"Biography"}),s.jsx(_e,{id:"bio",value:f.bio||"",onChange:S=>m({...f,bio:S.target.value}),placeholder:"Brief biography and background",className:"bg-slate-800/50 border-slate-700 min-h-[100px]"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(I,{htmlFor:"research",children:"Research Interests (comma-separated)"}),s.jsx(_e,{id:"research",value:(f.research||[]).join(", "),onChange:S=>m({...f,research:S.target.value.split(",").map(T=>T.trim())}),placeholder:"e.g., Quantum Computing, Error Correction",className:"bg-slate-800/50 border-slate-700 min-h-[60px]"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(I,{htmlFor:"publications",children:"Publications (comma-separated)"}),s.jsx(_e,{id:"publications",value:(f.publications||[]).join(", "),onChange:S=>m({...f,publications:S.target.value.split(",").map(T=>T.trim())}),placeholder:"Publication IDs or titles",className:"bg-slate-800/50 border-slate-700 min-h-[60px]"})]}),s.jsxs("div",{className:"space-y-2",children:[s.jsx(I,{htmlFor:"image",children:"Profile Image"}),s.jsx($,{id:"image",type:"file",accept:"image/*",onChange:S=>{var T;return g(((T=S.target.files)==null?void 0:T[0])||null)},className:"bg-slate-800/50 border-slate-700"}),((d==null?void 0:d.photo)||(d==null?void 0:d.image))&&!b&&s.jsxs("p",{className:"text-sm text-slate-400",children:["Current: ",s.jsx("a",{href:d.photo||d.image,target:"_blank",rel:"noopener noreferrer",className:"text-blue-400 hover:underline",children:(N=d.photo||d.image)==null?void 0:N.split("/").pop()})]}),b&&s.jsxs("p",{className:"text-sm text-green-400",children:["New file selected: ",b.name]})]}),s.jsxs("div",{className:"flex gap-3 pt-4",children:[s.jsx(Q,{type:"submit",className:"flex-1 bg-gradient-to-r from-blue-600 to-purple-600 hover:from-blue-700 hover:to-purple-700",disabled:c,children:c?s.jsxs(s.Fragment,{children:[s.jsx(Fr,{className:"mr-2 h-4 w-4 animate-spin"}),"Saving..."]}):d?"Update":"Create"}),s.jsx(Q,{type:"button",variant:"outline",onClick:()=>l(!1),className:"flex-1 border-slate-700 text-slate-300 hover:text-white",disabled:c,children:"Cancel"})]})]})]})})]})},p_=()=>{const[e,t]=p.useState([]),[n,r]=p.useState([]),[i,a]=p.useState(""),[o,l]=p.useState("All"),[c,u]=p.useState("All"),[d,h]=p.useState(!0);p.useEffect(()=>{fetch("/data/publications.json").then(v=>v.json()).then(v=>{t(v),r(v),h(!1)}).catch(v=>{console.error("Error loading publications:",v),h(!1)})},[]),p.useEffect(()=>{let v=e;i&&(v=v.filter(x=>x.title.toLowerCase().includes(i.toLowerCase())||x.authors.some(y=>y.toLowerCase().includes(i.toLowerCase()))||x.abstract.toLowerCase().includes(i.toLowerCase()))),o!=="All"&&(v=v.filter(x=>x.category===o)),c!=="All"&&(v=v.filter(x=>x.year.toString()===c)),r(v)},[i,o,c,e]);const f=["All",...Array.from(new Set(e.map(v=>v.category)))],m=["All",...Array.from(new Set(e.map(v=>v.year.toString()))).sort((v,x)=>Number(x)-Number(v))],b=e.filter(v=>v.featured),g=e.reduce((v,x)=>v+x.citations,0);return s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx(Xe,{}),s.jsxs("section",{className:"relative pt-32 pb-20 overflow-hidden bg-gradient-to-b from-primary/5 to-background",children:[s.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-primary/10 via-accent/10 to-secondary/10"}),s.jsxs("div",{className:"absolute inset-0",children:[s.jsx("div",{className:"absolute top-20 left-10 w-72 h-72 bg-primary/20 rounded-full blur-3xl animate-float"}),s.jsx("div",{className:"absolute bottom-10 right-10 w-96 h-96 bg-accent/20 rounded-full blur-3xl animate-float-delayed"})]}),s.jsx("div",{className:"container mx-auto px-4 relative z-10",children:s.jsxs(M.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6},className:"text-center max-w-4xl mx-auto",children:[s.jsxs("div",{className:"inline-flex items-center gap-2 px-4 py-2 bg-primary/10 text-primary rounded-full text-sm font-semibold mb-6",children:[s.jsx(Yr,{className:"w-4 h-4"}),"Publications & Research Output"]}),s.jsx("h1",{className:"text-5xl md:text-6xl font-bold mb-6 bg-gradient-to-r from-primary via-accent to-secondary bg-clip-text text-transparent",children:"Our Publications"}),s.jsx("p",{className:"text-xl text-muted-foreground mb-8 max-w-3xl mx-auto",children:"Cutting-edge research published in top-tier journals and conferences, advancing the field of quantum technology."}),s.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-6 max-w-3xl mx-auto",children:[s.jsxs(M.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.2},className:"bg-card/80 backdrop-blur-sm rounded-xl p-4 border border-border",children:[s.jsx("div",{className:"text-3xl font-bold text-primary",children:e.length}),s.jsx("div",{className:"text-sm text-muted-foreground",children:"Total Publications"})]}),s.jsxs(M.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.3},className:"bg-card/80 backdrop-blur-sm rounded-xl p-4 border border-border",children:[s.jsx("div",{className:"text-3xl font-bold text-accent",children:g}),s.jsx("div",{className:"text-sm text-muted-foreground",children:"Total Citations"})]}),s.jsxs(M.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.4},className:"bg-card/80 backdrop-blur-sm rounded-xl p-4 border border-border",children:[s.jsx("div",{className:"text-3xl font-bold text-secondary",children:b.length}),s.jsx("div",{className:"text-sm text-muted-foreground",children:"Featured Papers"})]}),s.jsxs(M.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.5},className:"bg-card/80 backdrop-blur-sm rounded-xl p-4 border border-border",children:[s.jsx("div",{className:"text-3xl font-bold text-primary",children:f.length-1}),s.jsx("div",{className:"text-sm text-muted-foreground",children:"Research Areas"})]})]})]})})]}),s.jsx("section",{className:"py-12 bg-muted/30 backdrop-blur-sm border-y border-border",children:s.jsx("div",{className:"container mx-auto px-4",children:s.jsxs("div",{className:"max-w-6xl mx-auto",children:[s.jsxs("div",{className:"flex flex-col md:flex-row gap-4",children:[s.jsx("div",{className:"flex-1",children:s.jsxs("div",{className:"relative",children:[s.jsx(Qt,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-5 h-5 text-muted-foreground"}),s.jsx($,{type:"text",placeholder:"Search publications, authors, keywords...",value:i,onChange:v=>a(v.target.value),className:"pl-10"})]})}),s.jsx("div",{className:"w-full md:w-48",children:s.jsx("select",{value:o,onChange:v=>l(v.target.value),className:"w-full px-4 py-2 rounded-md border border-border bg-card text-foreground focus:ring-2 focus:ring-primary focus:border-transparent",children:f.map(v=>s.jsx("option",{value:v,children:v},v))})}),s.jsx("div",{className:"w-full md:w-32",children:s.jsx("select",{value:c,onChange:v=>u(v.target.value),className:"w-full px-4 py-2 rounded-md border border-border bg-card text-foreground focus:ring-2 focus:ring-primary focus:border-transparent",children:m.map(v=>s.jsx("option",{value:v,children:v},v))})})]}),(i||o!=="All"||c!=="All")&&s.jsxs("div",{className:"mt-4 flex flex-wrap gap-2",children:[i&&s.jsxs("span",{className:"px-3 py-1 bg-primary/10 text-primary rounded-full text-sm flex items-center gap-2",children:['Search: "',i,'"',s.jsx("button",{onClick:()=>a(""),className:"hover:text-primary/80",children:"×"})]}),o!=="All"&&s.jsxs("span",{className:"px-3 py-1 bg-accent/10 text-accent rounded-full text-sm flex items-center gap-2",children:[o,s.jsx("button",{onClick:()=>l("All"),className:"hover:text-accent/80",children:"×"})]}),c!=="All"&&s.jsxs("span",{className:"px-3 py-1 bg-secondary/10 text-secondary rounded-full text-sm flex items-center gap-2",children:[c,s.jsx("button",{onClick:()=>u("All"),className:"hover:text-secondary/80",children:"×"})]}),s.jsx("button",{onClick:()=>{a(""),l("All"),u("All")},className:"px-3 py-1 text-muted-foreground hover:text-foreground text-sm underline",children:"Clear all"})]}),s.jsxs("div",{className:"mt-4 text-sm text-muted-foreground",children:["Showing ",n.length," of ",e.length," publications"]})]})})}),s.jsx("section",{className:"py-16",children:s.jsx("div",{className:"container mx-auto px-4",children:s.jsx("div",{className:"max-w-6xl mx-auto",children:d?s.jsxs("div",{className:"text-center py-12",children:[s.jsx("div",{className:"animate-spin w-12 h-12 border-4 border-primary border-t-transparent rounded-full mx-auto mb-4"}),s.jsx("p",{className:"text-muted-foreground",children:"Loading publications..."})]}):n.length===0?s.jsxs("div",{className:"text-center py-12",children:[s.jsx(Yr,{className:"w-16 h-16 text-muted-foreground mx-auto mb-4"}),s.jsx("p",{className:"text-xl text-foreground",children:"No publications found"}),s.jsx("p",{className:"text-muted-foreground mt-2",children:"Try adjusting your filters or search query"})]}):s.jsx("div",{className:"space-y-6",children:n.map((v,x)=>s.jsx(M.article,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:x*.1},className:"bg-card rounded-xl shadow-md hover:shadow-xl transition-all duration-300 overflow-hidden border border-border group",children:s.jsxs("div",{className:"p-6",children:[s.jsx("div",{className:"flex flex-wrap items-start justify-between gap-4 mb-4",children:s.jsxs("div",{className:"flex-1",children:[s.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[v.featured&&s.jsxs("span",{className:"px-2 py-1 bg-yellow-500/10 text-yellow-600 dark:text-yellow-400 text-xs font-semibold rounded-full flex items-center gap-1",children:[s.jsx(vp,{className:"w-3 h-3"}),"Featured"]}),s.jsx("span",{className:"px-2 py-1 bg-primary/10 text-primary text-xs font-semibold rounded-full",children:v.category}),s.jsx("span",{className:"px-2 py-1 bg-muted text-muted-foreground text-xs rounded-full",children:v.type})]}),s.jsx("h3",{className:"text-xl font-bold text-foreground mb-2 group-hover:text-primary transition-colors",children:v.title}),s.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground mb-3",children:[s.jsx(mt,{className:"w-4 h-4"}),s.jsx("span",{children:v.authors.join(", ")})]}),s.jsxs("div",{className:"flex items-center gap-4 text-sm text-muted-foreground mb-3",children:[s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx(ut,{className:"w-4 h-4"}),v.year]}),v.journal&&s.jsx("span",{className:"italic",children:v.journal}),v.conference&&s.jsx("span",{className:"italic",children:v.conference}),v.volume&&s.jsxs("span",{children:["Vol. ",v.volume]}),s.jsxs("span",{children:["pp. ",v.pages]})]}),s.jsx("p",{className:"text-foreground leading-relaxed mb-4",children:v.abstract}),s.jsxs("div",{className:"text-sm text-muted-foreground",children:[s.jsx("span",{className:"font-semibold",children:v.citations})," citations • DOI: ",v.doi]})]})}),s.jsxs("div",{className:"flex flex-wrap gap-3 pt-4 border-t border-border",children:[s.jsx(Q,{variant:"outline",size:"sm",className:"border-primary text-primary hover:bg-primary/10",asChild:!0,children:s.jsxs("a",{href:`https://doi.org/${v.doi}`,target:"_blank",rel:"noopener noreferrer",children:[s.jsx(Zt,{className:"w-4 h-4 mr-2"}),"View on Publisher"]})}),s.jsx(Q,{variant:"outline",size:"sm",className:"border-accent text-accent hover:bg-accent/10",asChild:!0,children:s.jsxs("a",{href:v.pdf,download:!0,children:[s.jsx(fT,{className:"w-4 h-4 mr-2"}),"Download PDF"]})})]})]})},v.id))})})})}),s.jsx(Ze,{})]})},g_=()=>{const[e,t]=p.useState([]),[n,r]=p.useState("All"),[i,a]=p.useState(!0);p.useEffect(()=>{fetch("/data/labs.json").then(c=>c.json()).then(c=>{t(c),a(!1)}).catch(c=>{console.error("Error loading labs:",c),a(!1)})},[]);const o=["All",...Array.from(new Set(e.map(c=>c.category)))],l=n==="All"?e:e.filter(c=>c.category===n);return s.jsxs("div",{className:"min-h-screen bg-background",children:[s.jsx(Xe,{}),s.jsxs("section",{className:"relative pt-24 md:pt-32 pb-16 md:pb-20 overflow-hidden bg-gradient-to-b from-primary/5 to-background",children:[s.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-primary/10 via-accent/10 to-secondary/10"}),s.jsxs("div",{className:"absolute inset-0",children:[s.jsx("div",{className:"absolute top-20 left-10 w-72 h-72 bg-primary/20 rounded-full blur-3xl animate-float"}),s.jsx("div",{className:"absolute bottom-10 right-10 w-96 h-96 bg-accent/20 rounded-full blur-3xl animate-float-delayed"})]}),s.jsx("div",{className:"container mx-auto px-4 relative z-10",children:s.jsxs(M.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6},className:"text-center max-w-4xl mx-auto",children:[s.jsxs("div",{className:"inline-flex items-center gap-2 px-4 py-2 bg-primary/10 text-primary rounded-full text-sm font-semibold mb-6",children:[s.jsx(ys,{className:"w-4 h-4"}),"World-Class Infrastructure"]}),s.jsx("h1",{className:"text-4xl sm:text-5xl md:text-6xl font-bold mb-4 md:mb-6 bg-gradient-to-r from-primary via-accent to-secondary bg-clip-text text-transparent",children:"Labs & Facilities"}),s.jsx("p",{className:"text-base sm:text-lg md:text-xl text-muted-foreground mb-6 md:mb-8 max-w-3xl mx-auto",children:"State-of-the-art laboratories and facilities equipped with cutting-edge technology for groundbreaking quantum research."}),s.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-6 max-w-2xl mx-auto",children:[s.jsxs(M.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.2},className:"bg-card/80 backdrop-blur-sm rounded-xl p-4 border border-border",children:[s.jsx("div",{className:"text-3xl font-bold text-primary",children:e.length}),s.jsx("div",{className:"text-sm text-muted-foreground",children:"Total Facilities"})]}),s.jsxs(M.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.3},className:"bg-card/80 backdrop-blur-sm rounded-xl p-4 border border-border",children:[s.jsx("div",{className:"text-3xl font-bold text-accent",children:"2,800+"}),s.jsx("div",{className:"text-sm text-muted-foreground",children:"Sq Ft Area"})]}),s.jsxs(M.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.4},className:"bg-card/80 backdrop-blur-sm rounded-xl p-4 border border-border",children:[s.jsx("div",{className:"text-3xl font-bold text-secondary",children:o.length-1}),s.jsx("div",{className:"text-sm text-muted-foreground",children:"Research Areas"})]})]})]})})]}),s.jsx("section",{className:"py-12 bg-muted/30 backdrop-blur-sm border-y border-border",children:s.jsx("div",{className:"container mx-auto px-4",children:s.jsxs("div",{className:"max-w-6xl mx-auto",children:[s.jsx("div",{className:"flex flex-wrap justify-center gap-2 sm:gap-3",children:o.map(c=>s.jsx("button",{onClick:()=>r(c),className:`px-4 sm:px-6 py-2 rounded-full text-sm sm:text-base font-semibold transition-all duration-300 ${n===c?"bg-gradient-to-r from-primary to-accent text-primary-foreground shadow-lg":"bg-card text-foreground hover:bg-muted border border-border"}`,children:c},c))}),s.jsxs("div",{className:"mt-4 text-center text-sm text-muted-foreground",children:["Showing ",l.length," of ",e.length," facilities"]})]})})}),s.jsx("section",{className:"py-16",children:s.jsx("div",{className:"container mx-auto px-4",children:s.jsx("div",{className:"max-w-7xl mx-auto",children:i?s.jsxs("div",{className:"text-center py-12",children:[s.jsx("div",{className:"animate-spin w-12 h-12 border-4 border-primary border-t-transparent rounded-full mx-auto mb-4"}),s.jsx("p",{className:"text-muted-foreground",children:"Loading facilities..."})]}):s.jsx("div",{className:"grid md:grid-cols-2 gap-6 md:gap-8",children:l.map((c,u)=>s.jsx(M.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:u*.1},children:s.jsxs(te,{className:"h-full overflow-hidden hover:shadow-2xl transition-all duration-300 group border-2 border-border",children:[s.jsxs("div",{className:"relative h-48 sm:h-56 md:h-64 overflow-hidden",children:[s.jsx("img",{src:c.image,alt:c.name,className:"w-full h-full object-cover group-hover:scale-110 transition-transform duration-500"}),s.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/60 to-transparent"}),s.jsxs("div",{className:"absolute bottom-4 left-4 right-4",children:[s.jsx("span",{className:`px-3 py-1 rounded-full text-xs font-semibold mb-2 inline-block ${c.status==="Operational"?"bg-green-500 text-white":"bg-yellow-500 text-white"}`,children:c.status}),s.jsx("h3",{className:"text-2xl font-bold text-white",children:c.name})]})]}),s.jsxs(ne,{className:"p-4 sm:p-6",children:[s.jsx("span",{className:"px-3 py-1 bg-primary/10 text-primary text-xs sm:text-sm font-semibold rounded-full mb-4 inline-block",children:c.category}),s.jsx("p",{className:"text-foreground mb-4 leading-relaxed break-words",children:c.description}),s.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4 mb-6 pb-6 border-b border-border",children:[s.jsxs("div",{children:[s.jsx("div",{className:"text-sm text-muted-foreground mb-1",children:"Area"}),s.jsx("div",{className:"font-semibold text-foreground",children:c.area})]}),s.jsxs("div",{children:[s.jsx("div",{className:"text-sm text-muted-foreground mb-1",children:"Established"}),s.jsx("div",{className:"font-semibold text-foreground",children:c.established})]}),s.jsxs("div",{className:"sm:col-span-2",children:[s.jsx("div",{className:"text-sm text-muted-foreground mb-1",children:"Location"}),s.jsxs("div",{className:"font-semibold text-foreground flex items-center gap-2 break-words",children:[s.jsx(Ns,{className:"w-4 h-4 text-primary"}),c.location]})]}),s.jsxs("div",{className:"sm:col-span-2",children:[s.jsx("div",{className:"text-sm text-muted-foreground mb-1",children:"Lab Head"}),s.jsxs("div",{className:"font-semibold text-foreground flex items-center gap-2 break-words",children:[s.jsx(mt,{className:"w-4 h-4 text-accent"}),c.head]})]})]}),s.jsxs("div",{className:"mb-6",children:[s.jsxs("h4",{className:"font-bold text-foreground mb-3 flex items-center gap-2",children:[s.jsx(ST,{className:"w-5 h-5 text-yellow-500"}),"Key Features"]}),s.jsx("div",{className:"space-y-3",children:c.features.map((d,h)=>s.jsxs("div",{className:"bg-gradient-to-r from-primary/10 to-accent/10 rounded-lg p-3",children:[s.jsx("div",{className:"font-semibold text-foreground text-sm mb-1",children:d.name}),s.jsx("div",{className:"text-sm text-muted-foreground",children:d.description})]},h))})]}),s.jsxs("div",{className:"mb-6",children:[s.jsx("h4",{className:"font-bold text-foreground mb-3",children:"Major Equipment"}),s.jsx("ul",{className:"space-y-2",children:c.equipment.slice(0,5).map((d,h)=>s.jsxs("li",{className:"flex items-start gap-2 text-sm text-foreground break-words",children:[s.jsx(Ks,{className:"w-4 h-4 text-green-600 dark:text-green-400 flex-shrink-0 mt-0.5"}),s.jsx("span",{children:d})]},h))})]}),s.jsxs("div",{children:[s.jsx("h4",{className:"font-bold text-foreground mb-3",children:"Research Capabilities"}),s.jsx("div",{className:"flex flex-wrap gap-2",children:c.capabilities.map((d,h)=>s.jsx("span",{className:"px-3 py-1 bg-accent/10 text-accent text-xs sm:text-sm rounded-full break-words",children:d},h))})]})]})]})},c.id))})})})}),s.jsx(Ze,{})]})},x_=()=>{const e=Rs(),{toast:t}=Mr(),[n,r]=p.useState([]),[i,a]=p.useState(!0),[o,l]=p.useState(!1),[c,u]=p.useState(!1),[d,h]=p.useState(null),[f,m]=p.useState({}),[b,g]=p.useState(null);p.useEffect(()=>{v()},[]);const v=async()=>{try{const N=await e.publications.getAll();r(N)}catch(N){t({title:"Error",description:N.message||"Failed to fetch publications",variant:"destructive"})}finally{a(!1)}},x=()=>{h(null),m({featured:!1,citations:0}),g(null),l(!0)},y=N=>{h(N),m({...N,authors:Array.isArray(N.authors)?N.authors.join(", "):N.authors}),g(null),l(!0)},w=async N=>{if(confirm("Are you sure you want to delete this publication?"))try{await e.publications.delete(N),t({title:"Success",description:"Publication deleted successfully"}),v()}catch(S){t({title:"Error",description:S.message||"Failed to delete publication",variant:"destructive"})}},j=async N=>{N.preventDefault(),u(!0);try{const S=typeof f.authors=="string"?f.authors.split(",").map(k=>k.trim()):Array.isArray(f.authors)?f.authors:[],T={...f,authors:S,citations:f.citations?Number(f.citations):0,featured:!!f.featured};d?(await e.publications.updateWithFile(d.id,T,b||void 0),t({title:"Success",description:"Publication updated successfully"})):(await e.publications.createWithFile(T,b||void 0),t({title:"Success",description:"Publication created successfully"})),l(!1),v()}catch(S){t({title:"Error",description:S.message||"Failed to save publication",variant:"destructive"})}finally{u(!1)}},C=[{key:"title",label:"Title"},{key:"authors",label:"Authors",render:N=>Array.isArray(N.authors)?N.authors.join(", "):N.authors},{key:"year",label:"Year"},{key:"category",label:"Category"},{key:"type",label:"Type"},{key:"citations",label:"Citations"}];return s.jsxs("div",{className:"container mx-auto py-8",children:[s.jsxs("div",{className:"mb-6 flex justify-between items-center",children:[s.jsx("h1",{className:"text-3xl font-bold",children:"Publications Manager"}),s.jsx(Q,{onClick:x,children:"Add Publication"})]}),s.jsx(Si,{columns:C,data:n,onEdit:y,onDelete:w,onCreate:x,isLoading:i,searchKeys:["title","authors"]}),s.jsx(ki,{open:o,onOpenChange:l,children:s.jsxs(Ds,{className:"max-w-3xl max-h-[90vh] overflow-y-auto",children:[s.jsxs(Ms,{children:[s.jsx(Fs,{children:d?"Edit Publication":"Add Publication"}),s.jsx(Ls,{children:d?"Update publication details":"Create a new publication entry"})]}),s.jsxs("form",{onSubmit:j,className:"space-y-4",children:[s.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[s.jsxs("div",{className:"col-span-2",children:[s.jsx(I,{htmlFor:"title",children:"Title *"}),s.jsx($,{id:"title",value:f.title||"",onChange:N=>m({...f,title:N.target.value}),required:!0})]}),s.jsxs("div",{className:"col-span-2",children:[s.jsx(I,{htmlFor:"authors",children:"Authors * (comma-separated)"}),s.jsx($,{id:"authors",value:f.authors||"",onChange:N=>m({...f,authors:N.target.value}),placeholder:"John Doe, Jane Smith",required:!0})]}),s.jsxs("div",{children:[s.jsx(I,{htmlFor:"journal",children:"Journal"}),s.jsx($,{id:"journal",value:f.journal||"",onChange:N=>m({...f,journal:N.target.value})})]}),s.jsxs("div",{children:[s.jsx(I,{htmlFor:"conference",children:"Conference"}),s.jsx($,{id:"conference",value:f.conference||"",onChange:N=>m({...f,conference:N.target.value})})]}),s.jsxs("div",{children:[s.jsx(I,{htmlFor:"year",children:"Year *"}),s.jsx($,{id:"year",value:f.year||"",onChange:N=>m({...f,year:N.target.value}),required:!0})]}),s.jsxs("div",{children:[s.jsx(I,{htmlFor:"volume",children:"Volume"}),s.jsx($,{id:"volume",value:f.volume||"",onChange:N=>m({...f,volume:N.target.value})})]}),s.jsxs("div",{children:[s.jsx(I,{htmlFor:"pages",children:"Pages"}),s.jsx($,{id:"pages",value:f.pages||"",onChange:N=>m({...f,pages:N.target.value}),placeholder:"123-145"})]}),s.jsxs("div",{children:[s.jsx(I,{htmlFor:"doi",children:"DOI"}),s.jsx($,{id:"doi",value:f.doi||"",onChange:N=>m({...f,doi:N.target.value}),placeholder:"10.1000/example"})]}),s.jsxs("div",{children:[s.jsx(I,{htmlFor:"category",children:"Category *"}),s.jsxs("select",{id:"category",className:"w-full h-10 px-3 border border-gray-300 rounded-md",value:f.category||"",onChange:N=>m({...f,category:N.target.value}),required:!0,children:[s.jsx("option",{value:"",children:"Select category"}),s.jsx("option",{value:"Quantum Computing",children:"Quantum Computing"}),s.jsx("option",{value:"Quantum Communication",children:"Quantum Communication"}),s.jsx("option",{value:"Quantum Hardware",children:"Quantum Hardware"}),s.jsx("option",{value:"Quantum Algorithms",children:"Quantum Algorithms"}),s.jsx("option",{value:"Quantum Sensing",children:"Quantum Sensing"})]})]}),s.jsxs("div",{children:[s.jsx(I,{htmlFor:"type",children:"Type *"}),s.jsxs("select",{id:"type",className:"w-full h-10 px-3 border border-gray-300 rounded-md",value:f.type||"",onChange:N=>m({...f,type:N.target.value}),required:!0,children:[s.jsx("option",{value:"",children:"Select type"}),s.jsx("option",{value:"Journal Article",children:"Journal Article"}),s.jsx("option",{value:"Conference Paper",children:"Conference Paper"}),s.jsx("option",{value:"Review Article",children:"Review Article"}),s.jsx("option",{value:"Preprint",children:"Preprint"})]})]}),s.jsxs("div",{children:[s.jsx(I,{htmlFor:"citations",children:"Citations"}),s.jsx($,{id:"citations",type:"number",value:f.citations||0,onChange:N=>m({...f,citations:parseInt(N.target.value)||0})})]}),s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx("input",{type:"checkbox",id:"featured",checked:f.featured||!1,onChange:N=>m({...f,featured:N.target.checked}),className:"w-4 h-4"}),s.jsx(I,{htmlFor:"featured",children:"Featured Publication"})]}),s.jsxs("div",{className:"col-span-2",children:[s.jsx(I,{htmlFor:"abstract",children:"Abstract *"}),s.jsx(_e,{id:"abstract",value:f.abstract||"",onChange:N=>m({...f,abstract:N.target.value}),rows:4,required:!0})]}),s.jsxs("div",{className:"col-span-2",children:[s.jsx(I,{htmlFor:"pdf",children:"PDF File"}),s.jsx($,{id:"pdf",type:"file",accept:".pdf,application/pdf",onChange:N=>{var S;return g(((S=N.target.files)==null?void 0:S[0])||null)}}),(d==null?void 0:d.pdf)&&!b&&s.jsxs("p",{className:"text-sm text-slate-400 mt-1",children:["Current: ",s.jsx("a",{href:d.pdf,target:"_blank",rel:"noopener noreferrer",className:"text-blue-400 hover:underline",children:d.pdf})]}),b&&s.jsxs("p",{className:"text-sm text-green-400 mt-1",children:["New file selected: ",b.name]})]})]}),s.jsxs("div",{className:"flex justify-end gap-2 pt-4",children:[s.jsx(Q,{type:"button",variant:"outline",onClick:()=>l(!1),children:"Cancel"}),s.jsxs(Q,{type:"submit",disabled:c,children:[c&&s.jsx(Fr,{className:"mr-2 h-4 w-4 animate-spin"}),d?"Update":"Create"]})]})]})]})})]})},y_=()=>{const e=Rs(),{toast:t}=Mr(),[n,r]=p.useState([]),[i,a]=p.useState(!0),[o,l]=p.useState(!1),[c,u]=p.useState(!1),[d,h]=p.useState(null),[f,m]=p.useState({}),[b,g]=p.useState(null);p.useEffect(()=>{v()},[]);const v=async()=>{try{const N=await e.labs.getAll();r(N)}catch(N){t({title:"Error",description:N.message||"Failed to fetch labs",variant:"destructive"})}finally{a(!1)}},x=()=>{h(null),m({status:"Operational",features:[]}),g(null),l(!0)},y=N=>{h(N),m({...N,equipment:Array.isArray(N.equipment)?N.equipment.join(` `):N.equipment,capabilities:Array.isArray(N.capabilities)?N.capabilities.join(` `):N.capabilities}),g(null),l(!0)},w=async N=>{if(confirm("Are you sure you want to delete this lab/facility?"))try{await e.labs.delete(N),t({title:"Success",description:"Lab deleted successfully"}),v()}catch(S){t({title:"Error",description:S.message||"Failed to delete lab",variant:"destructive"})}},j=async N=>{N.preventDefault(),u(!0);try{const S=typeof f.equipment=="string"?f.equipment.split(` `).map(A=>A.trim()).filter(A=>A):Array.isArray(f.equipment)?f.equipment:[],T=typeof f.capabilities=="string"?f.capabilities.split(` `).map(A=>A.trim()).filter(A=>A):Array.isArray(f.capabilities)?f.capabilities:[],k={...f,equipment:S,capabilities:T,features:f.features||[]};d?(await e.labs.updateWithFile(d.id,k,b||void 0),t({title:"Success",description:"Lab updated successfully"})):(await e.labs.createWithFile(k,b||void 0),t({title:"Success",description:"Lab created successfully"})),l(!1),v()}catch(S){t({title:"Error",description:S.message||"Failed to save lab",variant:"destructive"})}finally{u(!1)}},C=[{key:"name",label:"Name"},{key:"category",label:"Category"},{key:"area",label:"Area"},{key:"head",label:"Lab Head"},{key:"status",label:"Status"}];return s.jsxs("div",{className:"container mx-auto py-8",children:[s.jsxs("div",{className:"mb-6 flex justify-between items-center",children:[s.jsx("h1",{className:"text-3xl font-bold",children:"Labs & Facilities Manager"}),s.jsx(Q,{onClick:x,children:"Add Lab/Facility"})]}),s.jsx(Si,{columns:C,data:n,onEdit:y,onDelete:w,onCreate:x,isLoading:i,searchKeys:["name","category","head"]}),s.jsx(ki,{open:o,onOpenChange:l,children:s.jsxs(Ds,{className:"max-w-4xl max-h-[90vh] overflow-y-auto",children:[s.jsxs(Ms,{children:[s.jsx(Fs,{children:d?"Edit Lab/Facility":"Add Lab/Facility"}),s.jsx(Ls,{children:d?"Update lab/facility details":"Create a new lab or facility entry"})]}),s.jsxs("form",{onSubmit:j,className:"space-y-4",children:[s.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[s.jsxs("div",{className:"col-span-2",children:[s.jsx(I,{htmlFor:"name",children:"Name *"}),s.jsx($,{id:"name",value:f.name||"",onChange:N=>m({...f,name:N.target.value}),required:!0})]}),s.jsxs("div",{className:"col-span-2",children:[s.jsx(I,{htmlFor:"description",children:"Description *"}),s.jsx(_e,{id:"description",value:f.description||"",onChange:N=>m({...f,description:N.target.value}),rows:3,required:!0})]}),s.jsxs("div",{children:[s.jsx(I,{htmlFor:"area",children:"Area *"}),s.jsx($,{id:"area",value:f.area||"",onChange:N=>m({...f,area:N.target.value}),placeholder:"500 sq ft",required:!0})]}),s.jsxs("div",{children:[s.jsx(I,{htmlFor:"location",children:"Location *"}),s.jsx($,{id:"location",value:f.location||"",onChange:N=>m({...f,location:N.target.value}),placeholder:"Building A, 2nd Floor",required:!0})]}),s.jsxs("div",{children:[s.jsx(I,{htmlFor:"established",children:"Established *"}),s.jsx($,{id:"established",value:f.established||"",onChange:N=>m({...f,established:N.target.value}),placeholder:"2020",required:!0})]}),s.jsxs("div",{children:[s.jsx(I,{htmlFor:"head",children:"Lab Head *"}),s.jsx($,{id:"head",value:f.head||"",onChange:N=>m({...f,head:N.target.value}),placeholder:"Dr. John Doe",required:!0})]}),s.jsxs("div",{children:[s.jsx(I,{htmlFor:"director",children:"Director"}),s.jsx($,{id:"director",value:f.director||"",onChange:N=>m({...f,director:N.target.value}),placeholder:"Dr. Jane Smith"})]}),s.jsxs("div",{children:[s.jsx(I,{htmlFor:"email",children:"Contact Email"}),s.jsx($,{id:"email",type:"email",value:f.email||"",onChange:N=>m({...f,email:N.target.value}),placeholder:"lab@example.com"})]}),s.jsxs("div",{children:[s.jsx(I,{htmlFor:"website",children:"Website"}),s.jsx($,{id:"website",value:f.website||"",onChange:N=>m({...f,website:N.target.value}),placeholder:"https://example.com"})]}),s.jsxs("div",{children:[s.jsx(I,{htmlFor:"category",children:"Category *"}),s.jsx($,{id:"category",value:f.category||"",onChange:N=>m({...f,category:N.target.value}),placeholder:"e.g., Quantum Computing",required:!0})]}),s.jsxs("div",{children:[s.jsx(I,{htmlFor:"status",children:"Status *"}),s.jsxs("select",{id:"status",className:"w-full h-10 px-3 border border-gray-300 rounded-md",value:f.status||"",onChange:N=>m({...f,status:N.target.value}),required:!0,children:[s.jsx("option",{value:"Operational",children:"Operational"}),s.jsx("option",{value:"Under Construction",children:"Under Construction"}),s.jsx("option",{value:"Maintenance",children:"Maintenance"}),s.jsx("option",{value:"Planning",children:"Planning"})]})]}),s.jsxs("div",{className:"col-span-2",children:[s.jsx(I,{htmlFor:"image",children:"Lab Image"}),s.jsx($,{id:"image",type:"file",accept:"image/*",onChange:N=>{var S;return g(((S=N.target.files)==null?void 0:S[0])||null)}}),(d==null?void 0:d.image)&&!b&&s.jsxs("p",{className:"text-sm text-slate-400 mt-1",children:["Current: ",s.jsx("a",{href:d.image,target:"_blank",rel:"noopener noreferrer",className:"text-blue-400 hover:underline",children:d.image})]}),b&&s.jsxs("p",{className:"text-sm text-green-400 mt-1",children:["New file selected: ",b.name]})]}),s.jsxs("div",{className:"col-span-2",children:[s.jsx(I,{htmlFor:"equipment",children:"Equipment * (one per line)"}),s.jsx(_e,{id:"equipment",value:f.equipment||"",onChange:N=>m({...f,equipment:N.target.value}),rows:5,placeholder:`Dilution Refrigerator Superconducting Qubit System Quantum Control Electronics`,required:!0}),s.jsx("p",{className:"text-sm text-gray-500 mt-1",children:"Enter each equipment item on a new line"})]}),s.jsxs("div",{className:"col-span-2",children:[s.jsx(I,{htmlFor:"capabilities",children:"Research Capabilities * (one per line)"}),s.jsx(_e,{id:"capabilities",value:f.capabilities||"",onChange:N=>m({...f,capabilities:N.target.value}),rows:5,placeholder:`Quantum Circuit Design Gate Optimization Error Correction`,required:!0}),s.jsx("p",{className:"text-sm text-gray-500 mt-1",children:"Enter each capability on a new line"})]}),s.jsxs("div",{className:"col-span-2",children:[s.jsx(I,{htmlFor:"researchFocus",children:"Research Focus Areas (one per line)"}),s.jsx(_e,{id:"researchFocus",value:typeof f.researchFocus=="string"?f.researchFocus:(f.researchFocus||[]).join(` `),onChange:N=>m({...f,researchFocus:N.target.value}),rows:4,placeholder:`Qubit design Error mitigation Algorithm optimization`}),s.jsx("p",{className:"text-sm text-gray-500 mt-1",children:"Enter each research focus area on a new line"})]})]}),s.jsxs("div",{className:"flex justify-end gap-2 pt-4",children:[s.jsx(Q,{type:"button",variant:"outline",onClick:()=>l(!1),children:"Cancel"}),s.jsxs(Q,{type:"submit",disabled:c,children:[c&&s.jsx(Fr,{className:"mr-2 h-4 w-4 animate-spin"}),d?"Update":"Create"]})]})]})]})})]})},v_=new HA,b_=()=>{const{pathname:e}=Wt();return p.useEffect(()=>{window.scrollTo(0,0)},[e]),null},w_=()=>s.jsx(YA,{client:v_,children:s.jsxs(kA,{children:[s.jsx(oP,{}),s.jsx(VP,{}),s.jsx(o5,{children:s.jsxs(m5,{children:[s.jsx(b_,{}),s.jsxs(JR,{children:[s.jsx(Ae,{path:"/",element:s.jsx(W3,{})}),s.jsx(Ae,{path:"/about",element:s.jsx(q3,{})}),s.jsx(Ae,{path:"/research",element:s.jsx(K3,{})}),s.jsx(Ae,{path:"/research/:id",element:s.jsx(Q3,{})}),s.jsx(Ae,{path:"/education",element:s.jsx(WO,{})}),s.jsx(Ae,{path:"/courses/:id",element:s.jsx(CO,{})}),s.jsx(Ae,{path:"/workshops",element:s.jsx(kO,{})}),s.jsx(Ae,{path:"/workshops/:id",element:s.jsx(SO,{})}),s.jsx(Ae,{path:"/team",element:s.jsx(G3,{})}),s.jsx(Ae,{path:"/people/:id",element:s.jsx(NO,{})}),s.jsx(Ae,{path:"/news",element:s.jsx(Y3,{})}),s.jsx(Ae,{path:"/news/:id",element:s.jsx(X3,{})}),s.jsx(Ae,{path:"/publications",element:s.jsx(p_,{})}),s.jsx(Ae,{path:"/labs",element:s.jsx(g_,{})}),s.jsx(Ae,{path:"/contact",element:s.jsx(jO,{})}),s.jsx(Ae,{path:"/admin/login",element:s.jsx(GO,{})}),s.jsxs(Ae,{path:"/admin",element:s.jsx(p5,{children:s.jsx(JO,{})}),children:[s.jsx(Ae,{path:"dashboard",element:s.jsx(ZO,{})}),s.jsx(Ae,{path:"research",element:s.jsx(u_,{})}),s.jsx(Ae,{path:"news",element:s.jsx(d_,{})}),s.jsx(Ae,{path:"courses",element:s.jsx(f_,{})}),s.jsx(Ae,{path:"workshops",element:s.jsx(h_,{})}),s.jsx(Ae,{path:"team",element:s.jsx(m_,{})}),s.jsx(Ae,{path:"publications",element:s.jsx(x_,{})}),s.jsx(Ae,{path:"labs",element:s.jsx(y_,{})})]}),s.jsx(Ae,{path:"*",element:s.jsx(H3,{})})]})]})})]})});Qw(document.getElementById("root")).render(s.jsx(w_,{}));
Close