(function(){"use strict";function pE(e,t){for(var n=0;n<t.length;n++){const a=t[n];if(typeof a!="string"&&!Array.isArray(a)){for(const r in a)if(r!=="default"&&!(r in e)){const o=Object.getOwnPropertyDescriptor(a,r);o&&Object.defineProperty(e,r,o.get?o:{enumerable:!0,get:()=>a[r]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}function Rw(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var _w={exports:{}},Zi={};/**
 * @license React
 * react-jsx-runtime.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var hE=Symbol.for("react.transitional.element"),wE=Symbol.for("react.fragment");function Tw(e,t,n){var a=null;if(n!==void 0&&(a=""+n),t.key!==void 0&&(a=""+t.key),"key"in t){n={};for(var r in t)r!=="key"&&(n[r]=t[r])}else n=t;return t=n.ref,{$$typeof:hE,type:e,key:a,ref:t!==void 0?t:null,props:n}}Zi.Fragment=wE,Zi.jsx=Tw,Zi.jsxs=Tw,_w.exports=Zi;var s=_w.exports,Mw={exports:{}},ye={};/**
 * @license React
 * react.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var Fd=Symbol.for("react.transitional.element"),gE=Symbol.for("react.portal"),vE=Symbol.for("react.fragment"),yE=Symbol.for("react.strict_mode"),xE=Symbol.for("react.profiler"),bE=Symbol.for("react.consumer"),SE=Symbol.for("react.context"),NE=Symbol.for("react.forward_ref"),jE=Symbol.for("react.suspense"),CE=Symbol.for("react.memo"),Dw=Symbol.for("react.lazy"),EE=Symbol.for("react.activity"),Ow=Symbol.iterator;function AE(e){return e===null||typeof e!="object"?null:(e=Ow&&e[Ow]||e["@@iterator"],typeof e=="function"?e:null)}var kw={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Lw=Object.assign,zw={};function To(e,t,n){this.props=e,this.context=t,this.refs=zw,this.updater=n||kw}To.prototype.isReactComponent={},To.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("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")},To.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Pw(){}Pw.prototype=To.prototype;function Gd(e,t,n){this.props=e,this.context=t,this.refs=zw,this.updater=n||kw}var Yd=Gd.prototype=new Pw;Yd.constructor=Gd,Lw(Yd,To.prototype),Yd.isPureReactComponent=!0;var Bw=Array.isArray;function qd(){}var qe={H:null,A:null,T:null,S:null},Uw=Object.prototype.hasOwnProperty;function Kd(e,t,n){var a=n.ref;return{$$typeof:Fd,type:e,key:t,ref:a!==void 0?a:null,props:n}}function RE(e,t){return Kd(e.type,t,e.props)}function Xd(e){return typeof e=="object"&&e!==null&&e.$$typeof===Fd}function _E(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Hw=/\/+/g;function Zd(e,t){return typeof e=="object"&&e!==null&&e.key!=null?_E(""+e.key):t.toString(36)}function TE(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(qd,qd):(e.status="pending",e.then(function(t){e.status==="pending"&&(e.status="fulfilled",e.value=t)},function(t){e.status==="pending"&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function Mo(e,t,n,a,r){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var l=!1;if(e===null)l=!0;else switch(o){case"bigint":case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case Fd:case gE:l=!0;break;case Dw:return l=e._init,Mo(l(e._payload),t,n,a,r)}}if(l)return r=r(e),l=a===""?"."+Zd(e,0):a,Bw(r)?(n="",l!=null&&(n=l.replace(Hw,"$&/")+"/"),Mo(r,t,n,"",function(u){return u})):r!=null&&(Xd(r)&&(r=RE(r,n+(r.key==null||e&&e.key===r.key?"":(""+r.key).replace(Hw,"$&/")+"/")+l)),t.push(r)),1;l=0;var i=a===""?".":a+":";if(Bw(e))for(var c=0;c<e.length;c++)a=e[c],o=i+Zd(a,c),l+=Mo(a,t,n,o,r);else if(c=AE(e),typeof c=="function")for(e=c.call(e),c=0;!(a=e.next()).done;)a=a.value,o=i+Zd(a,c++),l+=Mo(a,t,n,o,r);else if(o==="object"){if(typeof e.then=="function")return Mo(TE(e),t,n,a,r);throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.")}return l}function Wi(e,t,n){if(e==null)return e;var a=[],r=0;return Mo(e,a,"","",function(o){return t.call(n,o,r++)}),a}function ME(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 Iw=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},DE={map:Wi,forEach:function(e,t,n){Wi(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Wi(e,function(){t++}),t},toArray:function(e){return Wi(e,function(t){return t})||[]},only:function(e){if(!Xd(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};ye.Activity=EE,ye.Children=DE,ye.Component=To,ye.Fragment=vE,ye.Profiler=xE,ye.PureComponent=Gd,ye.StrictMode=yE,ye.Suspense=jE,ye.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=qe,ye.__COMPILER_RUNTIME={__proto__:null,c:function(e){return qe.H.useMemoCache(e)}},ye.cache=function(e){return function(){return e.apply(null,arguments)}},ye.cacheSignal=function(){return null},ye.cloneElement=function(e,t,n){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var a=Lw({},e.props),r=e.key;if(t!=null)for(o in t.key!==void 0&&(r=""+t.key),t)!Uw.call(t,o)||o==="key"||o==="__self"||o==="__source"||o==="ref"&&t.ref===void 0||(a[o]=t[o]);var o=arguments.length-2;if(o===1)a.children=n;else if(1<o){for(var l=Array(o),i=0;i<o;i++)l[i]=arguments[i+2];a.children=l}return Kd(e.type,r,a)},ye.createContext=function(e){return e={$$typeof:SE,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:bE,_context:e},e},ye.createElement=function(e,t,n){var a,r={},o=null;if(t!=null)for(a in t.key!==void 0&&(o=""+t.key),t)Uw.call(t,a)&&a!=="key"&&a!=="__self"&&a!=="__source"&&(r[a]=t[a]);var l=arguments.length-2;if(l===1)r.children=n;else if(1<l){for(var i=Array(l),c=0;c<l;c++)i[c]=arguments[c+2];r.children=i}if(e&&e.defaultProps)for(a in l=e.defaultProps,l)r[a]===void 0&&(r[a]=l[a]);return Kd(e,o,r)},ye.createRef=function(){return{current:null}},ye.forwardRef=function(e){return{$$typeof:NE,render:e}},ye.isValidElement=Xd,ye.lazy=function(e){return{$$typeof:Dw,_payload:{_status:-1,_result:e},_init:ME}},ye.memo=function(e,t){return{$$typeof:CE,type:e,compare:t===void 0?null:t}},ye.startTransition=function(e){var t=qe.T,n={};qe.T=n;try{var a=e(),r=qe.S;r!==null&&r(n,a),typeof a=="object"&&a!==null&&typeof a.then=="function"&&a.then(qd,Iw)}catch(o){Iw(o)}finally{t!==null&&n.types!==null&&(t.types=n.types),qe.T=t}},ye.unstable_useCacheRefresh=function(){return qe.H.useCacheRefresh()},ye.use=function(e){return qe.H.use(e)},ye.useActionState=function(e,t,n){return qe.H.useActionState(e,t,n)},ye.useCallback=function(e,t){return qe.H.useCallback(e,t)},ye.useContext=function(e){return qe.H.useContext(e)},ye.useDebugValue=function(){},ye.useDeferredValue=function(e,t){return qe.H.useDeferredValue(e,t)},ye.useEffect=function(e,t){return qe.H.useEffect(e,t)},ye.useEffectEvent=function(e){return qe.H.useEffectEvent(e)},ye.useId=function(){return qe.H.useId()},ye.useImperativeHandle=function(e,t,n){return qe.H.useImperativeHandle(e,t,n)},ye.useInsertionEffect=function(e,t){return qe.H.useInsertionEffect(e,t)},ye.useLayoutEffect=function(e,t){return qe.H.useLayoutEffect(e,t)},ye.useMemo=function(e,t){return qe.H.useMemo(e,t)},ye.useOptimistic=function(e,t){return qe.H.useOptimistic(e,t)},ye.useReducer=function(e,t,n){return qe.H.useReducer(e,t,n)},ye.useRef=function(e){return qe.H.useRef(e)},ye.useState=function(e){return qe.H.useState(e)},ye.useSyncExternalStore=function(e,t,n){return qe.H.useSyncExternalStore(e,t,n)},ye.useTransition=function(){return qe.H.useTransition()},ye.version="19.2.4",Mw.exports=ye;var f=Mw.exports;const K=Rw(f),Qi=pE({__proto__:null,default:K},[f]);var Vw={exports:{}},Ji={},$w={exports:{}},Fw={};/**
 * @license React
 * scheduler.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and 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(C,L){var _=C.length;C.push(L);e:for(;0<_;){var z=_-1>>>1,$=C[z];if(0<r($,L))C[z]=L,C[_]=$,_=z;else break e}}function n(C){return C.length===0?null:C[0]}function a(C){if(C.length===0)return null;var L=C[0],_=C.pop();if(_!==L){C[0]=_;e:for(var z=0,$=C.length,J=$>>>1;z<J;){var me=2*(z+1)-1,Z=C[me],Q=me+1,ee=C[Q];if(0>r(Z,_))Q<$&&0>r(ee,Z)?(C[z]=ee,C[Q]=_,z=Q):(C[z]=Z,C[me]=_,z=me);else if(Q<$&&0>r(ee,_))C[z]=ee,C[Q]=_,z=Q;else break e}}return L}function r(C,L){var _=C.sortIndex-L.sortIndex;return _!==0?_:C.id-L.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var l=Date,i=l.now();e.unstable_now=function(){return l.now()-i}}var c=[],u=[],m=1,d=null,p=3,h=!1,x=!1,v=!1,b=!1,w=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,y=typeof setImmediate<"u"?setImmediate:null;function S(C){for(var L=n(u);L!==null;){if(L.callback===null)a(u);else if(L.startTime<=C)a(u),L.sortIndex=L.expirationTime,t(c,L);else break;L=n(u)}}function E(C){if(v=!1,S(C),!x)if(n(c)!==null)x=!0,R||(R=!0,H());else{var L=n(u);L!==null&&U(E,L.startTime-C)}}var R=!1,N=-1,j=5,T=-1;function O(){return b?!0:!(e.unstable_now()-T<j)}function D(){if(b=!1,R){var C=e.unstable_now();T=C;var L=!0;try{e:{x=!1,v&&(v=!1,g(N),N=-1),h=!0;var _=p;try{t:{for(S(C),d=n(c);d!==null&&!(d.expirationTime>C&&O());){var z=d.callback;if(typeof z=="function"){d.callback=null,p=d.priorityLevel;var $=z(d.expirationTime<=C);if(C=e.unstable_now(),typeof $=="function"){d.callback=$,S(C),L=!0;break t}d===n(c)&&a(c),S(C)}else a(c);d=n(c)}if(d!==null)L=!0;else{var J=n(u);J!==null&&U(E,J.startTime-C),L=!1}}break e}finally{d=null,p=_,h=!1}L=void 0}}finally{L?H():R=!1}}}var H;if(typeof y=="function")H=function(){y(D)};else if(typeof MessageChannel<"u"){var k=new MessageChannel,B=k.port2;k.port1.onmessage=D,H=function(){B.postMessage(null)}}else H=function(){w(D,0)};function U(C,L){N=w(function(){C(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(C){C.callback=null},e.unstable_forceFrameRate=function(C){0>C||125<C?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):j=0<C?Math.floor(1e3/C):5},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_next=function(C){switch(p){case 1:case 2:case 3:var L=3;break;default:L=p}var _=p;p=L;try{return C()}finally{p=_}},e.unstable_requestPaint=function(){b=!0},e.unstable_runWithPriority=function(C,L){switch(C){case 1:case 2:case 3:case 4:case 5:break;default:C=3}var _=p;p=C;try{return L()}finally{p=_}},e.unstable_scheduleCallback=function(C,L,_){var z=e.unstable_now();switch(typeof _=="object"&&_!==null?(_=_.delay,_=typeof _=="number"&&0<_?z+_:z):_=z,C){case 1:var $=-1;break;case 2:$=250;break;case 5:$=1073741823;break;case 4:$=1e4;break;default:$=5e3}return $=_+$,C={id:m++,callback:L,priorityLevel:C,startTime:_,expirationTime:$,sortIndex:-1},_>z?(C.sortIndex=_,t(u,C),n(c)===null&&C===n(u)&&(v?(g(N),N=-1):v=!0,U(E,_-z))):(C.sortIndex=$,t(c,C),x||h||(x=!0,R||(R=!0,H()))),C},e.unstable_shouldYield=O,e.unstable_wrapCallback=function(C){var L=p;return function(){var _=p;p=L;try{return C.apply(this,arguments)}finally{p=_}}}})(Fw),$w.exports=Fw;var OE=$w.exports,Gw={exports:{}},Ut={};/**
 * @license React
 * react-dom.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var kE=f;function Yw(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function qa(){}var Ht={d:{f:qa,r:function(){throw Error(Yw(522))},D:qa,C:qa,L:qa,m:qa,X:qa,S:qa,M:qa},p:0,findDOMNode:null},LE=Symbol.for("react.portal");function zE(e,t,n){var a=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:LE,key:a==null?null:""+a,children:e,containerInfo:t,implementation:n}}var es=kE.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function ec(e,t){if(e==="font")return"";if(typeof t=="string")return t==="use-credentials"?t:""}Ut.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Ht,Ut.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(Yw(299));return zE(e,t,null,n)},Ut.flushSync=function(e){var t=es.T,n=Ht.p;try{if(es.T=null,Ht.p=2,e)return e()}finally{es.T=t,Ht.p=n,Ht.d.f()}},Ut.preconnect=function(e,t){typeof e=="string"&&(t?(t=t.crossOrigin,t=typeof t=="string"?t==="use-credentials"?t:"":void 0):t=null,Ht.d.C(e,t))},Ut.prefetchDNS=function(e){typeof e=="string"&&Ht.d.D(e)},Ut.preinit=function(e,t){if(typeof e=="string"&&t&&typeof t.as=="string"){var n=t.as,a=ec(n,t.crossOrigin),r=typeof t.integrity=="string"?t.integrity:void 0,o=typeof t.fetchPriority=="string"?t.fetchPriority:void 0;n==="style"?Ht.d.S(e,typeof t.precedence=="string"?t.precedence:void 0,{crossOrigin:a,integrity:r,fetchPriority:o}):n==="script"&&Ht.d.X(e,{crossOrigin:a,integrity:r,fetchPriority:o,nonce:typeof t.nonce=="string"?t.nonce:void 0})}},Ut.preinitModule=function(e,t){if(typeof e=="string")if(typeof t=="object"&&t!==null){if(t.as==null||t.as==="script"){var n=ec(t.as,t.crossOrigin);Ht.d.M(e,{crossOrigin:n,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0})}}else t==null&&Ht.d.M(e)},Ut.preload=function(e,t){if(typeof e=="string"&&typeof t=="object"&&t!==null&&typeof t.as=="string"){var n=t.as,a=ec(n,t.crossOrigin);Ht.d.L(e,n,{crossOrigin:a,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0,type:typeof t.type=="string"?t.type:void 0,fetchPriority:typeof t.fetchPriority=="string"?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy=="string"?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet=="string"?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes=="string"?t.imageSizes:void 0,media:typeof t.media=="string"?t.media:void 0})}},Ut.preloadModule=function(e,t){if(typeof e=="string")if(t){var n=ec(t.as,t.crossOrigin);Ht.d.m(e,{as:typeof t.as=="string"&&t.as!=="script"?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity=="string"?t.integrity:void 0})}else Ht.d.m(e)},Ut.requestFormReset=function(e){Ht.d.r(e)},Ut.unstable_batchedUpdates=function(e,t){return e(t)},Ut.useFormState=function(e,t,n){return es.H.useFormState(e,t,n)},Ut.useFormStatus=function(){return es.H.useHostTransitionStatus()},Ut.version="19.2.4";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(),Gw.exports=Ut;var Vr=Gw.exports;const Kw=Rw(Vr);/**
 * @license React
 * react-dom-client.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var vt=OE,Xw=f,PE=Vr;function V(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function Zw(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function ts(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 Ww(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 Qw(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Jw(e){if(ts(e)!==e)throw Error(V(188))}function BE(e){var t=e.alternate;if(!t){if(t=ts(e),t===null)throw Error(V(188));return t!==e?null:e}for(var n=e,a=t;;){var r=n.return;if(r===null)break;var o=r.alternate;if(o===null){if(a=r.return,a!==null){n=a;continue}break}if(r.child===o.child){for(o=r.child;o;){if(o===n)return Jw(r),e;if(o===a)return Jw(r),t;o=o.sibling}throw Error(V(188))}if(n.return!==a.return)n=r,a=o;else{for(var l=!1,i=r.child;i;){if(i===n){l=!0,n=r,a=o;break}if(i===a){l=!0,a=r,n=o;break}i=i.sibling}if(!l){for(i=o.child;i;){if(i===n){l=!0,n=o,a=r;break}if(i===a){l=!0,a=o,n=r;break}i=i.sibling}if(!l)throw Error(V(189))}}if(n.alternate!==a)throw Error(V(190))}if(n.tag!==3)throw Error(V(188));return n.stateNode.current===n?e:t}function eg(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=eg(e),t!==null)return t;e=e.sibling}return null}var Ke=Object.assign,UE=Symbol.for("react.element"),tc=Symbol.for("react.transitional.element"),ns=Symbol.for("react.portal"),Do=Symbol.for("react.fragment"),tg=Symbol.for("react.strict_mode"),Wd=Symbol.for("react.profiler"),ng=Symbol.for("react.consumer"),ga=Symbol.for("react.context"),Qd=Symbol.for("react.forward_ref"),Jd=Symbol.for("react.suspense"),ef=Symbol.for("react.suspense_list"),tf=Symbol.for("react.memo"),Ka=Symbol.for("react.lazy"),nf=Symbol.for("react.activity"),HE=Symbol.for("react.memo_cache_sentinel"),ag=Symbol.iterator;function as(e){return e===null||typeof e!="object"?null:(e=ag&&e[ag]||e["@@iterator"],typeof e=="function"?e:null)}var IE=Symbol.for("react.client.reference");function af(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===IE?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Do:return"Fragment";case Wd:return"Profiler";case tg:return"StrictMode";case Jd:return"Suspense";case ef:return"SuspenseList";case nf:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case ns:return"Portal";case ga:return e.displayName||"Context";case ng:return(e._context.displayName||"Context")+".Consumer";case Qd:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case tf:return t=e.displayName||null,t!==null?t:af(e.type)||"Memo";case Ka:t=e._payload,e=e._init;try{return af(e(t))}catch{}}return null}var rs=Array.isArray,we=Xw.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Oe=PE.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,$r={pending:!1,data:null,method:null,action:null},rf=[],Oo=-1;function Wn(e){return{current:e}}function Nt(e){0>Oo||(e.current=rf[Oo],rf[Oo]=null,Oo--)}function $e(e,t){Oo++,rf[Oo]=e.current,e.current=t}var Qn=Wn(null),os=Wn(null),Xa=Wn(null),nc=Wn(null);function ac(e,t){switch($e(Xa,t),$e(os,e),$e(Qn,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Ry(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Ry(t),e=_y(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Nt(Qn),$e(Qn,e)}function ko(){Nt(Qn),Nt(os),Nt(Xa)}function of(e){e.memoizedState!==null&&$e(nc,e);var t=Qn.current,n=_y(t,e.type);t!==n&&($e(os,e),$e(Qn,n))}function rc(e){os.current===e&&(Nt(Qn),Nt(os)),nc.current===e&&(Nt(nc),Ks._currentValue=$r)}var lf,rg;function Fr(e){if(lf===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);lf=t&&t[1]||"",rg=-1<n.stack.indexOf(`
    at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
`+lf+e+rg}var sf=!1;function cf(e,t){if(!e||sf)return"";sf=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(t){var d=function(){throw Error()};if(Object.defineProperty(d.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(d,[])}catch(h){var p=h}Reflect.construct(e,[],d)}else{try{d.call()}catch(h){p=h}e.call(d.prototype)}}else{try{throw Error()}catch(h){p=h}(d=e())&&typeof d.catch=="function"&&d.catch(function(){})}}catch(h){if(h&&p&&typeof h.stack=="string")return[h.stack,p.stack]}return[null,null]}};a.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var r=Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,"name");r&&r.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var o=a.DetermineComponentFrameRoot(),l=o[0],i=o[1];if(l&&i){var c=l.split(`
`),u=i.split(`
`);for(r=a=0;a<c.length&&!c[a].includes("DetermineComponentFrameRoot");)a++;for(;r<u.length&&!u[r].includes("DetermineComponentFrameRoot");)r++;if(a===c.length||r===u.length)for(a=c.length-1,r=u.length-1;1<=a&&0<=r&&c[a]!==u[r];)r--;for(;1<=a&&0<=r;a--,r--)if(c[a]!==u[r]){if(a!==1||r!==1)do if(a--,r--,0>r||c[a]!==u[r]){var m=`
`+c[a].replace(" at new "," at ");return e.displayName&&m.includes("<anonymous>")&&(m=m.replace("<anonymous>",e.displayName)),m}while(1<=a&&0<=r);break}}}finally{sf=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?Fr(n):""}function VE(e,t){switch(e.tag){case 26:case 27:case 5:return Fr(e.type);case 16:return Fr("Lazy");case 13:return e.child!==t&&t!==null?Fr("Suspense Fallback"):Fr("Suspense");case 19:return Fr("SuspenseList");case 0:case 15:return cf(e.type,!1);case 11:return cf(e.type.render,!1);case 1:return cf(e.type,!0);case 31:return Fr("Activity");default:return""}}function og(e){try{var t="",n=null;do t+=VE(e,n),n=e,e=e.return;while(e);return t}catch(a){return`
Error generating stack: `+a.message+`
`+a.stack}}var uf=Object.prototype.hasOwnProperty,df=vt.unstable_scheduleCallback,ff=vt.unstable_cancelCallback,$E=vt.unstable_shouldYield,FE=vt.unstable_requestPaint,an=vt.unstable_now,GE=vt.unstable_getCurrentPriorityLevel,lg=vt.unstable_ImmediatePriority,sg=vt.unstable_UserBlockingPriority,oc=vt.unstable_NormalPriority,YE=vt.unstable_LowPriority,ig=vt.unstable_IdlePriority,qE=vt.log,KE=vt.unstable_setDisableYieldValue,ls=null,rn=null;function Za(e){if(typeof qE=="function"&&KE(e),rn&&typeof rn.setStrictMode=="function")try{rn.setStrictMode(ls,e)}catch{}}var on=Math.clz32?Math.clz32:WE,XE=Math.log,ZE=Math.LN2;function WE(e){return e>>>=0,e===0?32:31-(XE(e)/ZE|0)|0}var lc=256,sc=262144,ic=4194304;function Gr(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function cc(e,t,n){var a=e.pendingLanes;if(a===0)return 0;var r=0,o=e.suspendedLanes,l=e.pingedLanes;e=e.warmLanes;var i=a&134217727;return i!==0?(a=i&~o,a!==0?r=Gr(a):(l&=i,l!==0?r=Gr(l):n||(n=i&~e,n!==0&&(r=Gr(n))))):(i=a&~o,i!==0?r=Gr(i):l!==0?r=Gr(l):n||(n=a&~e,n!==0&&(r=Gr(n)))),r===0?0:t!==0&&t!==r&&!(t&o)&&(o=r&-r,n=t&-t,o>=n||o===32&&(n&4194048)!==0)?t:r}function ss(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function QE(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function cg(){var e=ic;return ic<<=1,!(ic&62914560)&&(ic=4194304),e}function mf(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function is(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function JE(e,t,n,a,r,o){var l=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var i=e.entanglements,c=e.expirationTimes,u=e.hiddenUpdates;for(n=l&~n;0<n;){var m=31-on(n),d=1<<m;i[m]=0,c[m]=-1;var p=u[m];if(p!==null)for(u[m]=null,m=0;m<p.length;m++){var h=p[m];h!==null&&(h.lane&=-536870913)}n&=~d}a!==0&&ug(e,a,0),o!==0&&r===0&&e.tag!==0&&(e.suspendedLanes|=o&~(l&~t))}function ug(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-on(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|n&261930}function dg(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var a=31-on(n),r=1<<a;r&t|e[a]&t&&(e[a]|=t),n&=~r}}function fg(e,t){var n=t&-t;return n=n&42?1:pf(n),n&(e.suspendedLanes|t)?0:n}function pf(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function hf(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function mg(){var e=Oe.p;return e!==0?e:(e=window.event,e===void 0?32:Qy(e.type))}function pg(e,t){var n=Oe.p;try{return Oe.p=e,t()}finally{Oe.p=n}}var Wa=Math.random().toString(36).slice(2),At="__reactFiber$"+Wa,$t="__reactProps$"+Wa,Lo="__reactContainer$"+Wa,wf="__reactEvents$"+Wa,eA="__reactListeners$"+Wa,tA="__reactHandles$"+Wa,hg="__reactResources$"+Wa,cs="__reactMarker$"+Wa;function gf(e){delete e[At],delete e[$t],delete e[wf],delete e[eA],delete e[tA]}function zo(e){var t=e[At];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Lo]||n[At]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=zy(e);e!==null;){if(n=e[At])return n;e=zy(e)}return t}e=n,n=e.parentNode}return null}function Po(e){if(e=e[At]||e[Lo]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function us(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(V(33))}function Bo(e){var t=e[hg];return t||(t=e[hg]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function jt(e){e[cs]=!0}var wg=new Set,gg={};function Yr(e,t){Uo(e,t),Uo(e+"Capture",t)}function Uo(e,t){for(gg[e]=t,e=0;e<t.length;e++)wg.add(t[e])}var nA=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),vg={},yg={};function aA(e){return uf.call(yg,e)?!0:uf.call(vg,e)?!1:nA.test(e)?yg[e]=!0:(vg[e]=!0,!1)}function uc(e,t,n){if(aA(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var a=t.toLowerCase().slice(0,5);if(a!=="data-"&&a!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+n)}}function dc(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+n)}}function va(e,t,n,a){if(a===null)e.removeAttribute(n);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,""+a)}}function yn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function xg(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function rA(e,t,n){var a=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var r=a.get,o=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return r.call(this)},set:function(l){n=""+l,o.call(this,l)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return n},setValue:function(l){n=""+l},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function vf(e){if(!e._valueTracker){var t=xg(e)?"checked":"value";e._valueTracker=rA(e,t,""+e[t])}}function bg(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),a="";return e&&(a=xg(e)?e.checked?"true":"false":e.value),e=a,e!==n?(t.setValue(e),!0):!1}function fc(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var oA=/[\n"\\]/g;function xn(e){return e.replace(oA,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function yf(e,t,n,a,r,o,l,i){e.name="",l!=null&&typeof l!="function"&&typeof l!="symbol"&&typeof l!="boolean"?e.type=l:e.removeAttribute("type"),t!=null?l==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+yn(t)):e.value!==""+yn(t)&&(e.value=""+yn(t)):l!=="submit"&&l!=="reset"||e.removeAttribute("value"),t!=null?xf(e,l,yn(t)):n!=null?xf(e,l,yn(n)):a!=null&&e.removeAttribute("value"),r==null&&o!=null&&(e.defaultChecked=!!o),r!=null&&(e.checked=r&&typeof r!="function"&&typeof r!="symbol"),i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"?e.name=""+yn(i):e.removeAttribute("name")}function Sg(e,t,n,a,r,o,l,i){if(o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"&&(e.type=o),t!=null||n!=null){if(!(o!=="submit"&&o!=="reset"||t!=null)){vf(e);return}n=n!=null?""+yn(n):"",t=t!=null?""+yn(t):n,i||t===e.value||(e.value=t),e.defaultValue=t}a=a??r,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=i?e.checked:!!a,e.defaultChecked=!!a,l!=null&&typeof l!="function"&&typeof l!="symbol"&&typeof l!="boolean"&&(e.name=l),vf(e)}function xf(e,t,n){t==="number"&&fc(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function Ho(e,t,n,a){if(e=e.options,t){t={};for(var r=0;r<n.length;r++)t["$"+n[r]]=!0;for(n=0;n<e.length;n++)r=t.hasOwnProperty("$"+e[n].value),e[n].selected!==r&&(e[n].selected=r),r&&a&&(e[n].defaultSelected=!0)}else{for(n=""+yn(n),t=null,r=0;r<e.length;r++){if(e[r].value===n){e[r].selected=!0,a&&(e[r].defaultSelected=!0);return}t!==null||e[r].disabled||(t=e[r])}t!==null&&(t.selected=!0)}}function Ng(e,t,n){if(t!=null&&(t=""+yn(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+yn(n):""}function jg(e,t,n,a){if(t==null){if(a!=null){if(n!=null)throw Error(V(92));if(rs(a)){if(1<a.length)throw Error(V(93));a=a[0]}n=a}n==null&&(n=""),t=n}n=yn(t),e.defaultValue=n,a=e.textContent,a===n&&a!==""&&a!==null&&(e.value=a),vf(e)}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 lA=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Cg(e,t,n){var a=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?a?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":a?e.setProperty(t,n):typeof n!="number"||n===0||lA.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function Eg(e,t,n){if(t!=null&&typeof t!="object")throw Error(V(62));if(e=e.style,n!=null){for(var a in n)!n.hasOwnProperty(a)||t!=null&&t.hasOwnProperty(a)||(a.indexOf("--")===0?e.setProperty(a,""):a==="float"?e.cssFloat="":e[a]="");for(var r in t)a=t[r],t.hasOwnProperty(r)&&n[r]!==a&&Cg(e,r,a)}else for(var o in t)t.hasOwnProperty(o)&&Cg(e,o,t[o])}function bf(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var sA=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),iA=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function mc(e){return iA.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function ya(){}var Sf=null;function Nf(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Vo=null,$o=null;function Ag(e){var t=Po(e);if(t&&(e=t.stateNode)){var n=e[$t]||null;e:switch(e=t.stateNode,t.type){case"input":if(yf(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+xn(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var a=n[t];if(a!==e&&a.form===e.form){var r=a[$t]||null;if(!r)throw Error(V(90));yf(a,r.value,r.defaultValue,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name)}}for(t=0;t<n.length;t++)a=n[t],a.form===e.form&&bg(a)}break e;case"textarea":Ng(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&Ho(e,!!n.multiple,t,!1)}}}var jf=!1;function Rg(e,t,n){if(jf)return e(t,n);jf=!0;try{var a=e(t);return a}finally{if(jf=!1,(Vo!==null||$o!==null)&&(eu(),Vo&&(t=Vo,e=$o,$o=Vo=null,Ag(t),e)))for(t=0;t<e.length;t++)Ag(e[t])}}function ds(e,t){var n=e.stateNode;if(n===null)return null;var a=n[$t]||null;if(a===null)return null;n=a[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(a=!a.disabled)||(e=e.type,a=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!a;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(V(231,t,typeof n));return n}var xa=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Cf=!1;if(xa)try{var fs={};Object.defineProperty(fs,"passive",{get:function(){Cf=!0}}),window.addEventListener("test",fs,fs),window.removeEventListener("test",fs,fs)}catch{Cf=!1}var Qa=null,Ef=null,pc=null;function _g(){if(pc)return pc;var e,t=Ef,n=t.length,a,r="value"in Qa?Qa.value:Qa.textContent,o=r.length;for(e=0;e<n&&t[e]===r[e];e++);var l=n-e;for(a=1;a<=l&&t[n-a]===r[o-a];a++);return pc=r.slice(e,1<a?1-a:void 0)}function hc(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 wc(){return!0}function Tg(){return!1}function Ft(e){function t(n,a,r,o,l){this._reactName=n,this._targetInst=r,this.type=a,this.nativeEvent=o,this.target=l,this.currentTarget=null;for(var i in e)e.hasOwnProperty(i)&&(n=e[i],this[i]=n?n(o):o[i]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?wc:Tg,this.isPropagationStopped=Tg,this}return Ke(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=wc)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=wc)},persist:function(){},isPersistent:wc}),t}var qr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},gc=Ft(qr),ms=Ke({},qr,{view:0,detail:0}),cA=Ft(ms),Af,Rf,ps,vc=Ke({},ms,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Tf,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!==ps&&(ps&&e.type==="mousemove"?(Af=e.screenX-ps.screenX,Rf=e.screenY-ps.screenY):Rf=Af=0,ps=e),Af)},movementY:function(e){return"movementY"in e?e.movementY:Rf}}),Mg=Ft(vc),uA=Ke({},vc,{dataTransfer:0}),dA=Ft(uA),fA=Ke({},ms,{relatedTarget:0}),_f=Ft(fA),mA=Ke({},qr,{animationName:0,elapsedTime:0,pseudoElement:0}),pA=Ft(mA),hA=Ke({},qr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),wA=Ft(hA),gA=Ke({},qr,{data:0}),Dg=Ft(gA),vA={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},yA={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"},xA={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function bA(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=xA[e])?!!t[e]:!1}function Tf(){return bA}var SA=Ke({},ms,{key:function(e){if(e.key){var t=vA[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=hc(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?yA[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Tf,charCode:function(e){return e.type==="keypress"?hc(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?hc(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),NA=Ft(SA),jA=Ke({},vc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Og=Ft(jA),CA=Ke({},ms,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Tf}),EA=Ft(CA),AA=Ke({},qr,{propertyName:0,elapsedTime:0,pseudoElement:0}),RA=Ft(AA),_A=Ke({},vc,{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}),TA=Ft(_A),MA=Ke({},qr,{newState:0,oldState:0}),DA=Ft(MA),OA=[9,13,27,32],Mf=xa&&"CompositionEvent"in window,hs=null;xa&&"documentMode"in document&&(hs=document.documentMode);var kA=xa&&"TextEvent"in window&&!hs,kg=xa&&(!Mf||hs&&8<hs&&11>=hs),Lg=" ",zg=!1;function Pg(e,t){switch(e){case"keyup":return OA.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Bg(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Fo=!1;function LA(e,t){switch(e){case"compositionend":return Bg(t);case"keypress":return t.which!==32?null:(zg=!0,Lg);case"textInput":return e=t.data,e===Lg&&zg?null:e;default:return null}}function zA(e,t){if(Fo)return e==="compositionend"||!Mf&&Pg(e,t)?(e=_g(),pc=Ef=Qa=null,Fo=!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 kg&&t.locale!=="ko"?null:t.data;default:return null}}var PA={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 Ug(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!PA[e.type]:t==="textarea"}function Hg(e,t,n,a){Vo?$o?$o.push(a):$o=[a]:Vo=a,t=su(t,"onChange"),0<t.length&&(n=new gc("onChange","change",null,n,a),e.push({event:n,listeners:t}))}var ws=null,gs=null;function BA(e){Sy(e,0)}function yc(e){var t=us(e);if(bg(t))return e}function Ig(e,t){if(e==="change")return t}var Vg=!1;if(xa){var Df;if(xa){var Of="oninput"in document;if(!Of){var $g=document.createElement("div");$g.setAttribute("oninput","return;"),Of=typeof $g.oninput=="function"}Df=Of}else Df=!1;Vg=Df&&(!document.documentMode||9<document.documentMode)}function Fg(){ws&&(ws.detachEvent("onpropertychange",Gg),gs=ws=null)}function Gg(e){if(e.propertyName==="value"&&yc(gs)){var t=[];Hg(t,gs,e,Nf(e)),Rg(BA,t)}}function UA(e,t,n){e==="focusin"?(Fg(),ws=t,gs=n,ws.attachEvent("onpropertychange",Gg)):e==="focusout"&&Fg()}function HA(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return yc(gs)}function IA(e,t){if(e==="click")return yc(t)}function VA(e,t){if(e==="input"||e==="change")return yc(t)}function $A(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var ln=typeof Object.is=="function"?Object.is:$A;function vs(e,t){if(ln(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),a=Object.keys(t);if(n.length!==a.length)return!1;for(a=0;a<n.length;a++){var r=n[a];if(!uf.call(t,r)||!ln(e[r],t[r]))return!1}return!0}function Yg(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function qg(e,t){var n=Yg(e);e=0;for(var a;n;){if(n.nodeType===3){if(a=e+n.textContent.length,e<=t&&a>=t)return{node:n,offset:t-e};e=a}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Yg(n)}}function Kg(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Kg(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Xg(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=fc(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=fc(e.document)}return t}function kf(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var FA=xa&&"documentMode"in document&&11>=document.documentMode,Go=null,Lf=null,ys=null,zf=!1;function Zg(e,t,n){var a=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;zf||Go==null||Go!==fc(a)||(a=Go,"selectionStart"in a&&kf(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),ys&&vs(ys,a)||(ys=a,a=su(Lf,"onSelect"),0<a.length&&(t=new gc("onSelect","select",null,t,n),e.push({event:t,listeners:a}),t.target=Go)))}function Kr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Yo={animationend:Kr("Animation","AnimationEnd"),animationiteration:Kr("Animation","AnimationIteration"),animationstart:Kr("Animation","AnimationStart"),transitionrun:Kr("Transition","TransitionRun"),transitionstart:Kr("Transition","TransitionStart"),transitioncancel:Kr("Transition","TransitionCancel"),transitionend:Kr("Transition","TransitionEnd")},Pf={},Wg={};xa&&(Wg=document.createElement("div").style,"AnimationEvent"in window||(delete Yo.animationend.animation,delete Yo.animationiteration.animation,delete Yo.animationstart.animation),"TransitionEvent"in window||delete Yo.transitionend.transition);function Xr(e){if(Pf[e])return Pf[e];if(!Yo[e])return e;var t=Yo[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Wg)return Pf[e]=t[n];return e}var Qg=Xr("animationend"),Jg=Xr("animationiteration"),e0=Xr("animationstart"),GA=Xr("transitionrun"),YA=Xr("transitionstart"),qA=Xr("transitioncancel"),t0=Xr("transitionend"),n0=new Map,Bf="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Bf.push("scrollEnd");function Hn(e,t){n0.set(e,t),Yr(t,[e])}var xc=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},bn=[],qo=0,Uf=0;function bc(){for(var e=qo,t=Uf=qo=0;t<e;){var n=bn[t];bn[t++]=null;var a=bn[t];bn[t++]=null;var r=bn[t];bn[t++]=null;var o=bn[t];if(bn[t++]=null,a!==null&&r!==null){var l=a.pending;l===null?r.next=r:(r.next=l.next,l.next=r),a.pending=r}o!==0&&a0(n,r,o)}}function Sc(e,t,n,a){bn[qo++]=e,bn[qo++]=t,bn[qo++]=n,bn[qo++]=a,Uf|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function Hf(e,t,n,a){return Sc(e,t,n,a),Nc(e)}function Zr(e,t){return Sc(e,null,null,t),Nc(e)}function a0(e,t,n){e.lanes|=n;var a=e.alternate;a!==null&&(a.lanes|=n);for(var r=!1,o=e.return;o!==null;)o.childLanes|=n,a=o.alternate,a!==null&&(a.childLanes|=n),o.tag===22&&(e=o.stateNode,e===null||e._visibility&1||(r=!0)),e=o,o=o.return;return e.tag===3?(o=e.stateNode,r&&t!==null&&(r=31-on(n),e=o.hiddenUpdates,a=e[r],a===null?e[r]=[t]:a.push(t),t.lane=n|536870912),o):null}function Nc(e){if(50<Is)throw Is=0,Xm=null,Error(V(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Ko={};function KA(e,t,n,a){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function sn(e,t,n,a){return new KA(e,t,n,a)}function If(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ba(e,t){var n=e.alternate;return n===null?(n=sn(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function r0(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function jc(e,t,n,a,r,o){var l=0;if(a=e,typeof e=="function")If(e)&&(l=1);else if(typeof e=="string")l=JR(e,n,Qn.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case nf:return e=sn(31,n,t,r),e.elementType=nf,e.lanes=o,e;case Do:return Wr(n.children,r,o,t);case tg:l=8,r|=24;break;case Wd:return e=sn(12,n,t,r|2),e.elementType=Wd,e.lanes=o,e;case Jd:return e=sn(13,n,t,r),e.elementType=Jd,e.lanes=o,e;case ef:return e=sn(19,n,t,r),e.elementType=ef,e.lanes=o,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ga:l=10;break e;case ng:l=9;break e;case Qd:l=11;break e;case tf:l=14;break e;case Ka:l=16,a=null;break e}l=29,n=Error(V(130,e===null?"null":typeof e,"")),a=null}return t=sn(l,n,t,r),t.elementType=e,t.type=a,t.lanes=o,t}function Wr(e,t,n,a){return e=sn(7,e,a,t),e.lanes=n,e}function Vf(e,t,n){return e=sn(6,e,null,t),e.lanes=n,e}function o0(e){var t=sn(18,null,null,0);return t.stateNode=e,t}function $f(e,t,n){return t=sn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var l0=new WeakMap;function Sn(e,t){if(typeof e=="object"&&e!==null){var n=l0.get(e);return n!==void 0?n:(t={value:e,source:t,stack:og(t)},l0.set(e,t),t)}return{value:e,source:t,stack:og(t)}}var Xo=[],Zo=0,Cc=null,xs=0,Nn=[],jn=0,Ja=null,Jn=1,ea="";function Sa(e,t){Xo[Zo++]=xs,Xo[Zo++]=Cc,Cc=e,xs=t}function s0(e,t,n){Nn[jn++]=Jn,Nn[jn++]=ea,Nn[jn++]=Ja,Ja=e;var a=Jn;e=ea;var r=32-on(a)-1;a&=~(1<<r),n+=1;var o=32-on(t)+r;if(30<o){var l=r-r%5;o=(a&(1<<l)-1).toString(32),a>>=l,r-=l,Jn=1<<32-on(t)+r|n<<r|a,ea=o+e}else Jn=1<<o|n<<r|a,ea=e}function Ff(e){e.return!==null&&(Sa(e,1),s0(e,1,0))}function Gf(e){for(;e===Cc;)Cc=Xo[--Zo],Xo[Zo]=null,xs=Xo[--Zo],Xo[Zo]=null;for(;e===Ja;)Ja=Nn[--jn],Nn[jn]=null,ea=Nn[--jn],Nn[jn]=null,Jn=Nn[--jn],Nn[jn]=null}function i0(e,t){Nn[jn++]=Jn,Nn[jn++]=ea,Nn[jn++]=Ja,Jn=t.id,ea=t.overflow,Ja=e}var Rt=null,Xe=null,Te=!1,er=null,Cn=!1,Yf=Error(V(519));function tr(e){var t=Error(V(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw bs(Sn(t,e)),Yf}function c0(e){var t=e.stateNode,n=e.type,a=e.memoizedProps;switch(t[At]=e,t[$t]=a,n){case"dialog":Ae("cancel",t),Ae("close",t);break;case"iframe":case"object":case"embed":Ae("load",t);break;case"video":case"audio":for(n=0;n<$s.length;n++)Ae($s[n],t);break;case"source":Ae("error",t);break;case"img":case"image":case"link":Ae("error",t),Ae("load",t);break;case"details":Ae("toggle",t);break;case"input":Ae("invalid",t),Sg(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"select":Ae("invalid",t);break;case"textarea":Ae("invalid",t),jg(t,a.value,a.defaultValue,a.children)}n=a.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||a.suppressHydrationWarning===!0||Ey(t.textContent,n)?(a.popover!=null&&(Ae("beforetoggle",t),Ae("toggle",t)),a.onScroll!=null&&Ae("scroll",t),a.onScrollEnd!=null&&Ae("scrollend",t),a.onClick!=null&&(t.onclick=ya),t=!0):t=!1,t||tr(e,!0)}function u0(e){for(Rt=e.return;Rt;)switch(Rt.tag){case 5:case 31:case 13:Cn=!1;return;case 27:case 3:Cn=!0;return;default:Rt=Rt.return}}function Wo(e){if(e!==Rt)return!1;if(!Te)return u0(e),Te=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||up(e.type,e.memoizedProps)),n=!n),n&&Xe&&tr(e),u0(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(V(317));Xe=Ly(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(V(317));Xe=Ly(e)}else t===27?(t=Xe,hr(e.type)?(e=hp,hp=null,Xe=e):Xe=t):Xe=Rt?An(e.stateNode.nextSibling):null;return!0}function Qr(){Xe=Rt=null,Te=!1}function qf(){var e=er;return e!==null&&(Kt===null?Kt=e:Kt.push.apply(Kt,e),er=null),e}function bs(e){er===null?er=[e]:er.push(e)}var Kf=Wn(null),Jr=null,Na=null;function nr(e,t,n){$e(Kf,t._currentValue),t._currentValue=n}function ja(e){e._currentValue=Kf.current,Nt(Kf)}function Xf(e,t,n){for(;e!==null;){var a=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,a!==null&&(a.childLanes|=t)):a!==null&&(a.childLanes&t)!==t&&(a.childLanes|=t),e===n)break;e=e.return}}function Zf(e,t,n,a){var r=e.child;for(r!==null&&(r.return=e);r!==null;){var o=r.dependencies;if(o!==null){var l=r.child;o=o.firstContext;e:for(;o!==null;){var i=o;o=r;for(var c=0;c<t.length;c++)if(i.context===t[c]){o.lanes|=n,i=o.alternate,i!==null&&(i.lanes|=n),Xf(o.return,n,e),a||(l=null);break e}o=i.next}}else if(r.tag===18){if(l=r.return,l===null)throw Error(V(341));l.lanes|=n,o=l.alternate,o!==null&&(o.lanes|=n),Xf(l,n,e),l=null}else l=r.child;if(l!==null)l.return=r;else for(l=r;l!==null;){if(l===e){l=null;break}if(r=l.sibling,r!==null){r.return=l.return,l=r;break}l=l.return}r=l}}function Qo(e,t,n,a){e=null;for(var r=t,o=!1;r!==null;){if(!o){if(r.flags&524288)o=!0;else if(r.flags&262144)break}if(r.tag===10){var l=r.alternate;if(l===null)throw Error(V(387));if(l=l.memoizedProps,l!==null){var i=r.type;ln(r.pendingProps.value,l.value)||(e!==null?e.push(i):e=[i])}}else if(r===nc.current){if(l=r.alternate,l===null)throw Error(V(387));l.memoizedState.memoizedState!==r.memoizedState.memoizedState&&(e!==null?e.push(Ks):e=[Ks])}r=r.return}e!==null&&Zf(t,e,n,a),t.flags|=262144}function Ec(e){for(e=e.firstContext;e!==null;){if(!ln(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function eo(e){Jr=e,Na=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function _t(e){return d0(Jr,e)}function Ac(e,t){return Jr===null&&eo(e),d0(e,t)}function d0(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Na===null){if(e===null)throw Error(V(308));Na=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Na=Na.next=t;return n}var XA=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,a){e.push(a)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},ZA=vt.unstable_scheduleCallback,WA=vt.unstable_NormalPriority,dt={$$typeof:ga,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Wf(){return{controller:new XA,data:new Map,refCount:0}}function Ss(e){e.refCount--,e.refCount===0&&ZA(WA,function(){e.controller.abort()})}var Ns=null,Qf=0,Jo=0,el=null;function QA(e,t){if(Ns===null){var n=Ns=[];Qf=0,Jo=tp(),el={status:"pending",value:void 0,then:function(a){n.push(a)}}}return Qf++,t.then(f0,f0),t}function f0(){if(--Qf===0&&Ns!==null){el!==null&&(el.status="fulfilled");var e=Ns;Ns=null,Jo=0,el=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function JA(e,t){var n=[],a={status:"pending",value:null,reason:null,then:function(r){n.push(r)}};return e.then(function(){a.status="fulfilled",a.value=t;for(var r=0;r<n.length;r++)(0,n[r])(t)},function(r){for(a.status="rejected",a.reason=r,r=0;r<n.length;r++)(0,n[r])(void 0)}),a}var m0=we.S;we.S=function(e,t){Zv=an(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&QA(e,t),m0!==null&&m0(e,t)};var to=Wn(null);function Jf(){var e=to.current;return e!==null?e:Ie.pooledCache}function Rc(e,t){t===null?$e(to,to.current):$e(to,t.pool)}function p0(){var e=Jf();return e===null?null:{parent:dt._currentValue,pool:e}}var tl=Error(V(460)),em=Error(V(474)),_c=Error(V(542)),Tc={then:function(){}};function h0(e){return e=e.status,e==="fulfilled"||e==="rejected"}function w0(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(ya,ya),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,v0(e),e;default:if(typeof t.status=="string")t.then(ya,ya);else{if(e=Ie,e!==null&&100<e.shellSuspendCounter)throw Error(V(482));e=t,e.status="pending",e.then(function(a){if(t.status==="pending"){var r=t;r.status="fulfilled",r.value=a}},function(a){if(t.status==="pending"){var r=t;r.status="rejected",r.reason=a}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,v0(e),e}throw ao=t,tl}}function no(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(ao=n,tl):n}}var ao=null;function g0(){if(ao===null)throw Error(V(459));var e=ao;return ao=null,e}function v0(e){if(e===tl||e===_c)throw Error(V(483))}var nl=null,js=0;function Mc(e){var t=js;return js+=1,nl===null&&(nl=[]),w0(nl,e,t)}function Cs(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Dc(e,t){throw t.$$typeof===UE?Error(V(525)):(e=Object.prototype.toString.call(t),Error(V(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function y0(e){function t(w,g){if(e){var y=w.deletions;y===null?(w.deletions=[g],w.flags|=16):y.push(g)}}function n(w,g){if(!e)return null;for(;g!==null;)t(w,g),g=g.sibling;return null}function a(w){for(var g=new Map;w!==null;)w.key!==null?g.set(w.key,w):g.set(w.index,w),w=w.sibling;return g}function r(w,g){return w=ba(w,g),w.index=0,w.sibling=null,w}function o(w,g,y){return w.index=y,e?(y=w.alternate,y!==null?(y=y.index,y<g?(w.flags|=67108866,g):y):(w.flags|=67108866,g)):(w.flags|=1048576,g)}function l(w){return e&&w.alternate===null&&(w.flags|=67108866),w}function i(w,g,y,S){return g===null||g.tag!==6?(g=Vf(y,w.mode,S),g.return=w,g):(g=r(g,y),g.return=w,g)}function c(w,g,y,S){var E=y.type;return E===Do?m(w,g,y.props.children,S,y.key):g!==null&&(g.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===Ka&&no(E)===g.type)?(g=r(g,y.props),Cs(g,y),g.return=w,g):(g=jc(y.type,y.key,y.props,null,w.mode,S),Cs(g,y),g.return=w,g)}function u(w,g,y,S){return g===null||g.tag!==4||g.stateNode.containerInfo!==y.containerInfo||g.stateNode.implementation!==y.implementation?(g=$f(y,w.mode,S),g.return=w,g):(g=r(g,y.children||[]),g.return=w,g)}function m(w,g,y,S,E){return g===null||g.tag!==7?(g=Wr(y,w.mode,S,E),g.return=w,g):(g=r(g,y),g.return=w,g)}function d(w,g,y){if(typeof g=="string"&&g!==""||typeof g=="number"||typeof g=="bigint")return g=Vf(""+g,w.mode,y),g.return=w,g;if(typeof g=="object"&&g!==null){switch(g.$$typeof){case tc:return y=jc(g.type,g.key,g.props,null,w.mode,y),Cs(y,g),y.return=w,y;case ns:return g=$f(g,w.mode,y),g.return=w,g;case Ka:return g=no(g),d(w,g,y)}if(rs(g)||as(g))return g=Wr(g,w.mode,y,null),g.return=w,g;if(typeof g.then=="function")return d(w,Mc(g),y);if(g.$$typeof===ga)return d(w,Ac(w,g),y);Dc(w,g)}return null}function p(w,g,y,S){var E=g!==null?g.key:null;if(typeof y=="string"&&y!==""||typeof y=="number"||typeof y=="bigint")return E!==null?null:i(w,g,""+y,S);if(typeof y=="object"&&y!==null){switch(y.$$typeof){case tc:return y.key===E?c(w,g,y,S):null;case ns:return y.key===E?u(w,g,y,S):null;case Ka:return y=no(y),p(w,g,y,S)}if(rs(y)||as(y))return E!==null?null:m(w,g,y,S,null);if(typeof y.then=="function")return p(w,g,Mc(y),S);if(y.$$typeof===ga)return p(w,g,Ac(w,y),S);Dc(w,y)}return null}function h(w,g,y,S,E){if(typeof S=="string"&&S!==""||typeof S=="number"||typeof S=="bigint")return w=w.get(y)||null,i(g,w,""+S,E);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case tc:return w=w.get(S.key===null?y:S.key)||null,c(g,w,S,E);case ns:return w=w.get(S.key===null?y:S.key)||null,u(g,w,S,E);case Ka:return S=no(S),h(w,g,y,S,E)}if(rs(S)||as(S))return w=w.get(y)||null,m(g,w,S,E,null);if(typeof S.then=="function")return h(w,g,y,Mc(S),E);if(S.$$typeof===ga)return h(w,g,y,Ac(g,S),E);Dc(g,S)}return null}function x(w,g,y,S){for(var E=null,R=null,N=g,j=g=0,T=null;N!==null&&j<y.length;j++){N.index>j?(T=N,N=null):T=N.sibling;var O=p(w,N,y[j],S);if(O===null){N===null&&(N=T);break}e&&N&&O.alternate===null&&t(w,N),g=o(O,g,j),R===null?E=O:R.sibling=O,R=O,N=T}if(j===y.length)return n(w,N),Te&&Sa(w,j),E;if(N===null){for(;j<y.length;j++)N=d(w,y[j],S),N!==null&&(g=o(N,g,j),R===null?E=N:R.sibling=N,R=N);return Te&&Sa(w,j),E}for(N=a(N);j<y.length;j++)T=h(N,w,j,y[j],S),T!==null&&(e&&T.alternate!==null&&N.delete(T.key===null?j:T.key),g=o(T,g,j),R===null?E=T:R.sibling=T,R=T);return e&&N.forEach(function(D){return t(w,D)}),Te&&Sa(w,j),E}function v(w,g,y,S){if(y==null)throw Error(V(151));for(var E=null,R=null,N=g,j=g=0,T=null,O=y.next();N!==null&&!O.done;j++,O=y.next()){N.index>j?(T=N,N=null):T=N.sibling;var D=p(w,N,O.value,S);if(D===null){N===null&&(N=T);break}e&&N&&D.alternate===null&&t(w,N),g=o(D,g,j),R===null?E=D:R.sibling=D,R=D,N=T}if(O.done)return n(w,N),Te&&Sa(w,j),E;if(N===null){for(;!O.done;j++,O=y.next())O=d(w,O.value,S),O!==null&&(g=o(O,g,j),R===null?E=O:R.sibling=O,R=O);return Te&&Sa(w,j),E}for(N=a(N);!O.done;j++,O=y.next())O=h(N,w,j,O.value,S),O!==null&&(e&&O.alternate!==null&&N.delete(O.key===null?j:O.key),g=o(O,g,j),R===null?E=O:R.sibling=O,R=O);return e&&N.forEach(function(H){return t(w,H)}),Te&&Sa(w,j),E}function b(w,g,y,S){if(typeof y=="object"&&y!==null&&y.type===Do&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case tc:e:{for(var E=y.key;g!==null;){if(g.key===E){if(E=y.type,E===Do){if(g.tag===7){n(w,g.sibling),S=r(g,y.props.children),S.return=w,w=S;break e}}else if(g.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===Ka&&no(E)===g.type){n(w,g.sibling),S=r(g,y.props),Cs(S,y),S.return=w,w=S;break e}n(w,g);break}else t(w,g);g=g.sibling}y.type===Do?(S=Wr(y.props.children,w.mode,S,y.key),S.return=w,w=S):(S=jc(y.type,y.key,y.props,null,w.mode,S),Cs(S,y),S.return=w,w=S)}return l(w);case ns:e:{for(E=y.key;g!==null;){if(g.key===E)if(g.tag===4&&g.stateNode.containerInfo===y.containerInfo&&g.stateNode.implementation===y.implementation){n(w,g.sibling),S=r(g,y.children||[]),S.return=w,w=S;break e}else{n(w,g);break}else t(w,g);g=g.sibling}S=$f(y,w.mode,S),S.return=w,w=S}return l(w);case Ka:return y=no(y),b(w,g,y,S)}if(rs(y))return x(w,g,y,S);if(as(y)){if(E=as(y),typeof E!="function")throw Error(V(150));return y=E.call(y),v(w,g,y,S)}if(typeof y.then=="function")return b(w,g,Mc(y),S);if(y.$$typeof===ga)return b(w,g,Ac(w,y),S);Dc(w,y)}return typeof y=="string"&&y!==""||typeof y=="number"||typeof y=="bigint"?(y=""+y,g!==null&&g.tag===6?(n(w,g.sibling),S=r(g,y),S.return=w,w=S):(n(w,g),S=Vf(y,w.mode,S),S.return=w,w=S),l(w)):n(w,g)}return function(w,g,y,S){try{js=0;var E=b(w,g,y,S);return nl=null,E}catch(N){if(N===tl||N===_c)throw N;var R=sn(29,N,null,w.mode);return R.lanes=S,R.return=w,R}finally{}}}var ro=y0(!0),x0=y0(!1),ar=!1;function tm(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function nm(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function rr(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function or(e,t,n){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,ke&2){var r=a.pending;return r===null?t.next=t:(t.next=r.next,r.next=t),a.pending=t,t=Nc(e),a0(e,null,n),t}return Sc(e,a,t,n),Nc(e)}function Es(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var a=t.lanes;a&=e.pendingLanes,n|=a,t.lanes=n,dg(e,n)}}function am(e,t){var n=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,n===a)){var r=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var l={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};o===null?r=o=l:o=o.next=l,n=n.next}while(n!==null);o===null?r=o=t:o=o.next=t}else r=o=t;n={baseState:a.baseState,firstBaseUpdate:r,lastBaseUpdate:o,shared:a.shared,callbacks:a.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var rm=!1;function As(){if(rm){var e=el;if(e!==null)throw e}}function Rs(e,t,n,a){rm=!1;var r=e.updateQueue;ar=!1;var o=r.firstBaseUpdate,l=r.lastBaseUpdate,i=r.shared.pending;if(i!==null){r.shared.pending=null;var c=i,u=c.next;c.next=null,l===null?o=u:l.next=u,l=c;var m=e.alternate;m!==null&&(m=m.updateQueue,i=m.lastBaseUpdate,i!==l&&(i===null?m.firstBaseUpdate=u:i.next=u,m.lastBaseUpdate=c))}if(o!==null){var d=r.baseState;l=0,m=u=c=null,i=o;do{var p=i.lane&-536870913,h=p!==i.lane;if(h?(_e&p)===p:(a&p)===p){p!==0&&p===Jo&&(rm=!0),m!==null&&(m=m.next={lane:0,tag:i.tag,payload:i.payload,callback:null,next:null});e:{var x=e,v=i;p=t;var b=n;switch(v.tag){case 1:if(x=v.payload,typeof x=="function"){d=x.call(b,d,p);break e}d=x;break e;case 3:x.flags=x.flags&-65537|128;case 0:if(x=v.payload,p=typeof x=="function"?x.call(b,d,p):x,p==null)break e;d=Ke({},d,p);break e;case 2:ar=!0}}p=i.callback,p!==null&&(e.flags|=64,h&&(e.flags|=8192),h=r.callbacks,h===null?r.callbacks=[p]:h.push(p))}else h={lane:p,tag:i.tag,payload:i.payload,callback:i.callback,next:null},m===null?(u=m=h,c=d):m=m.next=h,l|=p;if(i=i.next,i===null){if(i=r.shared.pending,i===null)break;h=i,i=h.next,h.next=null,r.lastBaseUpdate=h,r.shared.pending=null}}while(!0);m===null&&(c=d),r.baseState=c,r.firstBaseUpdate=u,r.lastBaseUpdate=m,o===null&&(r.shared.lanes=0),ur|=l,e.lanes=l,e.memoizedState=d}}function b0(e,t){if(typeof e!="function")throw Error(V(191,e));e.call(t)}function S0(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)b0(n[e],t)}var al=Wn(null),Oc=Wn(0);function N0(e,t){e=Oa,$e(Oc,e),$e(al,t),Oa=e|t.baseLanes}function om(){$e(Oc,Oa),$e(al,al.current)}function lm(){Oa=Oc.current,Nt(al),Nt(Oc)}var cn=Wn(null),En=null;function lr(e){var t=e.alternate;$e(st,st.current&1),$e(cn,e),En===null&&(t===null||al.current!==null||t.memoizedState!==null)&&(En=e)}function sm(e){$e(st,st.current),$e(cn,e),En===null&&(En=e)}function j0(e){e.tag===22?($e(st,st.current),$e(cn,e),En===null&&(En=e)):sr()}function sr(){$e(st,st.current),$e(cn,cn.current)}function un(e){Nt(cn),En===e&&(En=null),Nt(st)}var st=Wn(0);function kc(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||mp(n)||pp(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){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 Ca=0,xe=null,Be=null,ft=null,Lc=!1,rl=!1,oo=!1,zc=0,_s=0,ol=null,eR=0;function at(){throw Error(V(321))}function im(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!ln(e[n],t[n]))return!1;return!0}function cm(e,t,n,a,r,o){return Ca=o,xe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,we.H=e===null||e.memoizedState===null?sv:jm,oo=!1,o=n(a,r),oo=!1,rl&&(o=E0(t,n,a,r)),C0(e),o}function C0(e){we.H=Ds;var t=Be!==null&&Be.next!==null;if(Ca=0,ft=Be=xe=null,Lc=!1,_s=0,ol=null,t)throw Error(V(300));e===null||mt||(e=e.dependencies,e!==null&&Ec(e)&&(mt=!0))}function E0(e,t,n,a){xe=e;var r=0;do{if(rl&&(ol=null),_s=0,rl=!1,25<=r)throw Error(V(301));if(r+=1,ft=Be=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}we.H=iv,o=t(n,a)}while(rl);return o}function tR(){var e=we.H,t=e.useState()[0];return t=typeof t.then=="function"?Ts(t):t,e=e.useState()[0],(Be!==null?Be.memoizedState:null)!==e&&(xe.flags|=1024),t}function um(){var e=zc!==0;return zc=0,e}function dm(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function fm(e){if(Lc){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Lc=!1}Ca=0,ft=Be=xe=null,rl=!1,_s=zc=0,ol=null}function It(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ft===null?xe.memoizedState=ft=e:ft=ft.next=e,ft}function it(){if(Be===null){var e=xe.alternate;e=e!==null?e.memoizedState:null}else e=Be.next;var t=ft===null?xe.memoizedState:ft.next;if(t!==null)ft=t,Be=e;else{if(e===null)throw xe.alternate===null?Error(V(467)):Error(V(310));Be=e,e={memoizedState:Be.memoizedState,baseState:Be.baseState,baseQueue:Be.baseQueue,queue:Be.queue,next:null},ft===null?xe.memoizedState=ft=e:ft=ft.next=e}return ft}function Pc(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ts(e){var t=_s;return _s+=1,ol===null&&(ol=[]),e=w0(ol,e,t),t=xe,(ft===null?t.memoizedState:ft.next)===null&&(t=t.alternate,we.H=t===null||t.memoizedState===null?sv:jm),e}function Bc(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Ts(e);if(e.$$typeof===ga)return _t(e)}throw Error(V(438,String(e)))}function mm(e){var t=null,n=xe.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var a=xe.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(t={data:a.data.map(function(r){return r.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=Pc(),xe.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),a=0;a<e;a++)n[a]=HE;return t.index++,n}function Ea(e,t){return typeof t=="function"?t(e):t}function Uc(e){var t=it();return pm(t,Be,e)}function pm(e,t,n){var a=e.queue;if(a===null)throw Error(V(311));a.lastRenderedReducer=n;var r=e.baseQueue,o=a.pending;if(o!==null){if(r!==null){var l=r.next;r.next=o.next,o.next=l}t.baseQueue=r=o,a.pending=null}if(o=e.baseState,r===null)e.memoizedState=o;else{t=r.next;var i=l=null,c=null,u=t,m=!1;do{var d=u.lane&-536870913;if(d!==u.lane?(_e&d)===d:(Ca&d)===d){var p=u.revertLane;if(p===0)c!==null&&(c=c.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),d===Jo&&(m=!0);else if((Ca&p)===p){u=u.next,p===Jo&&(m=!0);continue}else d={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},c===null?(i=c=d,l=o):c=c.next=d,xe.lanes|=p,ur|=p;d=u.action,oo&&n(o,d),o=u.hasEagerState?u.eagerState:n(o,d)}else p={lane:d,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},c===null?(i=c=p,l=o):c=c.next=p,xe.lanes|=d,ur|=d;u=u.next}while(u!==null&&u!==t);if(c===null?l=o:c.next=i,!ln(o,e.memoizedState)&&(mt=!0,m&&(n=el,n!==null)))throw n;e.memoizedState=o,e.baseState=l,e.baseQueue=c,a.lastRenderedState=o}return r===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function hm(e){var t=it(),n=t.queue;if(n===null)throw Error(V(311));n.lastRenderedReducer=e;var a=n.dispatch,r=n.pending,o=t.memoizedState;if(r!==null){n.pending=null;var l=r=r.next;do o=e(o,l.action),l=l.next;while(l!==r);ln(o,t.memoizedState)||(mt=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,a]}function A0(e,t,n){var a=xe,r=it(),o=Te;if(o){if(n===void 0)throw Error(V(407));n=n()}else n=t();var l=!ln((Be||r).memoizedState,n);if(l&&(r.memoizedState=n,mt=!0),r=r.queue,vm(T0.bind(null,a,r,e),[e]),r.getSnapshot!==t||l||ft!==null&&ft.memoizedState.tag&1){if(a.flags|=2048,ll(9,{destroy:void 0},_0.bind(null,a,r,n,t),null),Ie===null)throw Error(V(349));o||Ca&127||R0(a,t,n)}return n}function R0(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=xe.updateQueue,t===null?(t=Pc(),xe.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function _0(e,t,n,a){t.value=n,t.getSnapshot=a,M0(t)&&D0(e)}function T0(e,t,n){return n(function(){M0(t)&&D0(e)})}function M0(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!ln(e,n)}catch{return!0}}function D0(e){var t=Zr(e,2);t!==null&&Xt(t,e,2)}function wm(e){var t=It();if(typeof e=="function"){var n=e;if(e=n(),oo){Za(!0);try{n()}finally{Za(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ea,lastRenderedState:e},t}function O0(e,t,n,a){return e.baseState=n,pm(e,Be,typeof a=="function"?a:Ea)}function nR(e,t,n,a,r){if(Vc(e))throw Error(V(485));if(e=t.action,e!==null){var o={payload:r,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(l){o.listeners.push(l)}};we.T!==null?n(!0):o.isTransition=!1,a(o),n=t.pending,n===null?(o.next=t.pending=o,k0(t,o)):(o.next=n.next,t.pending=n.next=o)}}function k0(e,t){var n=t.action,a=t.payload,r=e.state;if(t.isTransition){var o=we.T,l={};we.T=l;try{var i=n(r,a),c=we.S;c!==null&&c(l,i),L0(e,t,i)}catch(u){gm(e,t,u)}finally{o!==null&&l.types!==null&&(o.types=l.types),we.T=o}}else try{o=n(r,a),L0(e,t,o)}catch(u){gm(e,t,u)}}function L0(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(a){z0(e,t,a)},function(a){return gm(e,t,a)}):z0(e,t,n)}function z0(e,t,n){t.status="fulfilled",t.value=n,P0(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,k0(e,n)))}function gm(e,t,n){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=n,P0(t),t=t.next;while(t!==a)}e.action=null}function P0(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function B0(e,t){return t}function U0(e,t){if(Te){var n=Ie.formState;if(n!==null){e:{var a=xe;if(Te){if(Xe){t:{for(var r=Xe,o=Cn;r.nodeType!==8;){if(!o){r=null;break t}if(r=An(r.nextSibling),r===null){r=null;break t}}o=r.data,r=o==="F!"||o==="F"?r:null}if(r){Xe=An(r.nextSibling),a=r.data==="F!";break e}}tr(a)}a=!1}a&&(t=n[0])}}return n=It(),n.memoizedState=n.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:B0,lastRenderedState:t},n.queue=a,n=rv.bind(null,xe,a),a.dispatch=n,a=wm(!1),o=Nm.bind(null,xe,!1,a.queue),a=It(),r={state:t,dispatch:null,action:e,pending:null},a.queue=r,n=nR.bind(null,xe,r,o,n),r.dispatch=n,a.memoizedState=e,[t,n,!1]}function H0(e){var t=it();return I0(t,Be,e)}function I0(e,t,n){if(t=pm(e,t,B0)[0],e=Uc(Ea)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=Ts(t)}catch(l){throw l===tl?_c:l}else a=t;t=it();var r=t.queue,o=r.dispatch;return n!==t.memoizedState&&(xe.flags|=2048,ll(9,{destroy:void 0},aR.bind(null,r,n),null)),[a,o,e]}function aR(e,t){e.action=t}function V0(e){var t=it(),n=Be;if(n!==null)return I0(t,n,e);it(),t=t.memoizedState,n=it();var a=n.queue.dispatch;return n.memoizedState=e,[t,a,!1]}function ll(e,t,n,a){return e={tag:e,create:n,deps:a,inst:t,next:null},t=xe.updateQueue,t===null&&(t=Pc(),xe.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(a=n.next,n.next=e,e.next=a,t.lastEffect=e),e}function $0(){return it().memoizedState}function Hc(e,t,n,a){var r=It();xe.flags|=e,r.memoizedState=ll(1|t,{destroy:void 0},n,a===void 0?null:a)}function Ic(e,t,n,a){var r=it();a=a===void 0?null:a;var o=r.memoizedState.inst;Be!==null&&a!==null&&im(a,Be.memoizedState.deps)?r.memoizedState=ll(t,o,n,a):(xe.flags|=e,r.memoizedState=ll(1|t,o,n,a))}function F0(e,t){Hc(8390656,8,e,t)}function vm(e,t){Ic(2048,8,e,t)}function rR(e){xe.flags|=4;var t=xe.updateQueue;if(t===null)t=Pc(),xe.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function G0(e){var t=it().memoizedState;return rR({ref:t,nextImpl:e}),function(){if(ke&2)throw Error(V(440));return t.impl.apply(void 0,arguments)}}function Y0(e,t){return Ic(4,2,e,t)}function q0(e,t){return Ic(4,4,e,t)}function K0(e,t){if(typeof t=="function"){e=e();var n=t(e);return function(){typeof n=="function"?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function X0(e,t,n){n=n!=null?n.concat([e]):null,Ic(4,4,K0.bind(null,t,e),n)}function ym(){}function Z0(e,t){var n=it();t=t===void 0?null:t;var a=n.memoizedState;return t!==null&&im(t,a[1])?a[0]:(n.memoizedState=[e,t],e)}function W0(e,t){var n=it();t=t===void 0?null:t;var a=n.memoizedState;if(t!==null&&im(t,a[1]))return a[0];if(a=e(),oo){Za(!0);try{e()}finally{Za(!1)}}return n.memoizedState=[a,t],a}function xm(e,t,n){return n===void 0||Ca&1073741824&&!(_e&261930)?e.memoizedState=t:(e.memoizedState=n,e=Qv(),xe.lanes|=e,ur|=e,n)}function Q0(e,t,n,a){return ln(n,t)?n:al.current!==null?(e=xm(e,n,a),ln(e,t)||(mt=!0),e):!(Ca&42)||Ca&1073741824&&!(_e&261930)?(mt=!0,e.memoizedState=n):(e=Qv(),xe.lanes|=e,ur|=e,t)}function J0(e,t,n,a,r){var o=Oe.p;Oe.p=o!==0&&8>o?o:8;var l=we.T,i={};we.T=i,Nm(e,!1,t,n);try{var c=r(),u=we.S;if(u!==null&&u(i,c),c!==null&&typeof c=="object"&&typeof c.then=="function"){var m=JA(c,a);Ms(e,t,m,mn(e))}else Ms(e,t,a,mn(e))}catch(d){Ms(e,t,{then:function(){},status:"rejected",reason:d},mn())}finally{Oe.p=o,l!==null&&i.types!==null&&(l.types=i.types),we.T=l}}function oR(){}function bm(e,t,n,a){if(e.tag!==5)throw Error(V(476));var r=ev(e).queue;J0(e,r,t,$r,n===null?oR:function(){return tv(e),n(a)})}function ev(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:$r,baseState:$r,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ea,lastRenderedState:$r},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ea,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function tv(e){var t=ev(e);t.next===null&&(t=e.alternate.memoizedState),Ms(e,t.next.queue,{},mn())}function Sm(){return _t(Ks)}function nv(){return it().memoizedState}function av(){return it().memoizedState}function lR(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=mn();e=rr(n);var a=or(t,e,n);a!==null&&(Xt(a,t,n),Es(a,t,n)),t={cache:Wf()},e.payload=t;return}t=t.return}}function sR(e,t,n){var a=mn();n={lane:a,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Vc(e)?ov(t,n):(n=Hf(e,t,n,a),n!==null&&(Xt(n,e,a),lv(n,t,a)))}function rv(e,t,n){var a=mn();Ms(e,t,n,a)}function Ms(e,t,n,a){var r={lane:a,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Vc(e))ov(t,r);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var l=t.lastRenderedState,i=o(l,n);if(r.hasEagerState=!0,r.eagerState=i,ln(i,l))return Sc(e,t,r,0),Ie===null&&bc(),!1}catch{}finally{}if(n=Hf(e,t,r,a),n!==null)return Xt(n,e,a),lv(n,t,a),!0}return!1}function Nm(e,t,n,a){if(a={lane:2,revertLane:tp(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Vc(e)){if(t)throw Error(V(479))}else t=Hf(e,n,a,2),t!==null&&Xt(t,e,2)}function Vc(e){var t=e.alternate;return e===xe||t!==null&&t===xe}function ov(e,t){rl=Lc=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function lv(e,t,n){if(n&4194048){var a=t.lanes;a&=e.pendingLanes,n|=a,t.lanes=n,dg(e,n)}}var Ds={readContext:_t,use:Bc,useCallback:at,useContext:at,useEffect:at,useImperativeHandle:at,useLayoutEffect:at,useInsertionEffect:at,useMemo:at,useReducer:at,useRef:at,useState:at,useDebugValue:at,useDeferredValue:at,useTransition:at,useSyncExternalStore:at,useId:at,useHostTransitionStatus:at,useFormState:at,useActionState:at,useOptimistic:at,useMemoCache:at,useCacheRefresh:at};Ds.useEffectEvent=at;var sv={readContext:_t,use:Bc,useCallback:function(e,t){return It().memoizedState=[e,t===void 0?null:t],e},useContext:_t,useEffect:F0,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,Hc(4194308,4,K0.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Hc(4194308,4,e,t)},useInsertionEffect:function(e,t){Hc(4,2,e,t)},useMemo:function(e,t){var n=It();t=t===void 0?null:t;var a=e();if(oo){Za(!0);try{e()}finally{Za(!1)}}return n.memoizedState=[a,t],a},useReducer:function(e,t,n){var a=It();if(n!==void 0){var r=n(t);if(oo){Za(!0);try{n(t)}finally{Za(!1)}}}else r=t;return a.memoizedState=a.baseState=r,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:r},a.queue=e,e=e.dispatch=sR.bind(null,xe,e),[a.memoizedState,e]},useRef:function(e){var t=It();return e={current:e},t.memoizedState=e},useState:function(e){e=wm(e);var t=e.queue,n=rv.bind(null,xe,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:ym,useDeferredValue:function(e,t){var n=It();return xm(n,e,t)},useTransition:function(){var e=wm(!1);return e=J0.bind(null,xe,e.queue,!0,!1),It().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var a=xe,r=It();if(Te){if(n===void 0)throw Error(V(407));n=n()}else{if(n=t(),Ie===null)throw Error(V(349));_e&127||R0(a,t,n)}r.memoizedState=n;var o={value:n,getSnapshot:t};return r.queue=o,F0(T0.bind(null,a,o,e),[e]),a.flags|=2048,ll(9,{destroy:void 0},_0.bind(null,a,o,n,t),null),n},useId:function(){var e=It(),t=Ie.identifierPrefix;if(Te){var n=ea,a=Jn;n=(a&~(1<<32-on(a)-1)).toString(32)+n,t="_"+t+"R_"+n,n=zc++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=eR++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Sm,useFormState:U0,useActionState:U0,useOptimistic:function(e){var t=It();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Nm.bind(null,xe,!0,n),n.dispatch=t,[e,t]},useMemoCache:mm,useCacheRefresh:function(){return It().memoizedState=lR.bind(null,xe)},useEffectEvent:function(e){var t=It(),n={impl:e};return t.memoizedState=n,function(){if(ke&2)throw Error(V(440));return n.impl.apply(void 0,arguments)}}},jm={readContext:_t,use:Bc,useCallback:Z0,useContext:_t,useEffect:vm,useImperativeHandle:X0,useInsertionEffect:Y0,useLayoutEffect:q0,useMemo:W0,useReducer:Uc,useRef:$0,useState:function(){return Uc(Ea)},useDebugValue:ym,useDeferredValue:function(e,t){var n=it();return Q0(n,Be.memoizedState,e,t)},useTransition:function(){var e=Uc(Ea)[0],t=it().memoizedState;return[typeof e=="boolean"?e:Ts(e),t]},useSyncExternalStore:A0,useId:nv,useHostTransitionStatus:Sm,useFormState:H0,useActionState:H0,useOptimistic:function(e,t){var n=it();return O0(n,Be,e,t)},useMemoCache:mm,useCacheRefresh:av};jm.useEffectEvent=G0;var iv={readContext:_t,use:Bc,useCallback:Z0,useContext:_t,useEffect:vm,useImperativeHandle:X0,useInsertionEffect:Y0,useLayoutEffect:q0,useMemo:W0,useReducer:hm,useRef:$0,useState:function(){return hm(Ea)},useDebugValue:ym,useDeferredValue:function(e,t){var n=it();return Be===null?xm(n,e,t):Q0(n,Be.memoizedState,e,t)},useTransition:function(){var e=hm(Ea)[0],t=it().memoizedState;return[typeof e=="boolean"?e:Ts(e),t]},useSyncExternalStore:A0,useId:nv,useHostTransitionStatus:Sm,useFormState:V0,useActionState:V0,useOptimistic:function(e,t){var n=it();return Be!==null?O0(n,Be,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:mm,useCacheRefresh:av};iv.useEffectEvent=G0;function Cm(e,t,n,a){t=e.memoizedState,n=n(a,t),n=n==null?t:Ke({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Em={enqueueSetState:function(e,t,n){e=e._reactInternals;var a=mn(),r=rr(a);r.payload=t,n!=null&&(r.callback=n),t=or(e,r,a),t!==null&&(Xt(t,e,a),Es(t,e,a))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var a=mn(),r=rr(a);r.tag=1,r.payload=t,n!=null&&(r.callback=n),t=or(e,r,a),t!==null&&(Xt(t,e,a),Es(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=mn(),a=rr(n);a.tag=2,t!=null&&(a.callback=t),t=or(e,a,n),t!==null&&(Xt(t,e,n),Es(t,e,n))}};function cv(e,t,n,a,r,o,l){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,o,l):t.prototype&&t.prototype.isPureReactComponent?!vs(n,a)||!vs(r,o):!0}function uv(e,t,n,a){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,a),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,a),t.state!==e&&Em.enqueueReplaceState(t,t.state,null)}function lo(e,t){var n=t;if("ref"in t){n={};for(var a in t)a!=="ref"&&(n[a]=t[a])}if(e=e.defaultProps){n===t&&(n=Ke({},n));for(var r in e)n[r]===void 0&&(n[r]=e[r])}return n}function dv(e){xc(e)}function fv(e){console.error(e)}function mv(e){xc(e)}function $c(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function pv(e,t,n){try{var a=e.onCaughtError;a(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(r){setTimeout(function(){throw r})}}function Am(e,t,n){return n=rr(n),n.tag=3,n.payload={element:null},n.callback=function(){$c(e,t)},n}function hv(e){return e=rr(e),e.tag=3,e}function wv(e,t,n,a){var r=n.type.getDerivedStateFromError;if(typeof r=="function"){var o=a.value;e.payload=function(){return r(o)},e.callback=function(){pv(t,n,a)}}var l=n.stateNode;l!==null&&typeof l.componentDidCatch=="function"&&(e.callback=function(){pv(t,n,a),typeof r!="function"&&(dr===null?dr=new Set([this]):dr.add(this));var i=a.stack;this.componentDidCatch(a.value,{componentStack:i!==null?i:""})})}function iR(e,t,n,a,r){if(n.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=n.alternate,t!==null&&Qo(t,n,r,!0),n=cn.current,n!==null){switch(n.tag){case 31:case 13:return En===null?tu():n.alternate===null&&rt===0&&(rt=3),n.flags&=-257,n.flags|=65536,n.lanes=r,a===Tc?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([a]):t.add(a),Qm(e,a,r)),!1;case 22:return n.flags|=65536,a===Tc?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([a])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([a]):n.add(a)),Qm(e,a,r)),!1}throw Error(V(435,n.tag))}return Qm(e,a,r),tu(),!1}if(Te)return t=cn.current,t!==null?(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=r,a!==Yf&&(e=Error(V(422),{cause:a}),bs(Sn(e,n)))):(a!==Yf&&(t=Error(V(423),{cause:a}),bs(Sn(t,n))),e=e.current.alternate,e.flags|=65536,r&=-r,e.lanes|=r,a=Sn(a,n),r=Am(e.stateNode,a,r),am(e,r),rt!==4&&(rt=2)),!1;var o=Error(V(520),{cause:a});if(o=Sn(o,n),Hs===null?Hs=[o]:Hs.push(o),rt!==4&&(rt=2),t===null)return!0;a=Sn(a,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=r&-r,n.lanes|=e,e=Am(n.stateNode,a,e),am(n,e),!1;case 1:if(t=n.type,o=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||o!==null&&typeof o.componentDidCatch=="function"&&(dr===null||!dr.has(o))))return n.flags|=65536,r&=-r,n.lanes|=r,r=hv(r),wv(r,e,n,a),am(n,r),!1}n=n.return}while(n!==null);return!1}var Rm=Error(V(461)),mt=!1;function Tt(e,t,n,a){t.child=e===null?x0(t,null,n,a):ro(t,e.child,n,a)}function gv(e,t,n,a,r){n=n.render;var o=t.ref;if("ref"in a){var l={};for(var i in a)i!=="ref"&&(l[i]=a[i])}else l=a;return eo(t),a=cm(e,t,n,l,o,r),i=um(),e!==null&&!mt?(dm(e,t,r),Aa(e,t,r)):(Te&&i&&Ff(t),t.flags|=1,Tt(e,t,a,r),t.child)}function vv(e,t,n,a,r){if(e===null){var o=n.type;return typeof o=="function"&&!If(o)&&o.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=o,yv(e,t,o,a,r)):(e=jc(n.type,null,a,t,t.mode,r),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!zm(e,r)){var l=o.memoizedProps;if(n=n.compare,n=n!==null?n:vs,n(l,a)&&e.ref===t.ref)return Aa(e,t,r)}return t.flags|=1,e=ba(o,a),e.ref=t.ref,e.return=t,t.child=e}function yv(e,t,n,a,r){if(e!==null){var o=e.memoizedProps;if(vs(o,a)&&e.ref===t.ref)if(mt=!1,t.pendingProps=a=o,zm(e,r))e.flags&131072&&(mt=!0);else return t.lanes=e.lanes,Aa(e,t,r)}return _m(e,t,n,a,r)}function xv(e,t,n,a){var r=a.children,o=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.mode==="hidden"){if(t.flags&128){if(o=o!==null?o.baseLanes|n:n,e!==null){for(a=t.child=e.child,r=0;a!==null;)r=r|a.lanes|a.childLanes,a=a.sibling;a=r&~o}else a=0,t.child=null;return bv(e,t,o,n,a)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Rc(t,o!==null?o.cachePool:null),o!==null?N0(t,o):om(),j0(t);else return a=t.lanes=536870912,bv(e,t,o!==null?o.baseLanes|n:n,n,a)}else o!==null?(Rc(t,o.cachePool),N0(t,o),sr(),t.memoizedState=null):(e!==null&&Rc(t,null),om(),sr());return Tt(e,t,r,n),t.child}function Os(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function bv(e,t,n,a,r){var o=Jf();return o=o===null?null:{parent:dt._currentValue,pool:o},t.memoizedState={baseLanes:n,cachePool:o},e!==null&&Rc(t,null),om(),j0(t),e!==null&&Qo(e,t,a,!0),t.childLanes=r,null}function Fc(e,t){return t=Yc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Sv(e,t,n){return ro(t,e.child,null,n),e=Fc(t,t.pendingProps),e.flags|=2,un(t),t.memoizedState=null,e}function cR(e,t,n){var a=t.pendingProps,r=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Te){if(a.mode==="hidden")return e=Fc(t,a),t.lanes=536870912,Os(null,e);if(sm(t),(e=Xe)?(e=ky(e,Cn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ja!==null?{id:Jn,overflow:ea}:null,retryLane:536870912,hydrationErrors:null},n=o0(e),n.return=t,t.child=n,Rt=t,Xe=null)):e=null,e===null)throw tr(t);return t.lanes=536870912,null}return Fc(t,a)}var o=e.memoizedState;if(o!==null){var l=o.dehydrated;if(sm(t),r)if(t.flags&256)t.flags&=-257,t=Sv(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(V(558));else if(mt||Qo(e,t,n,!1),r=(n&e.childLanes)!==0,mt||r){if(a=Ie,a!==null&&(l=fg(a,n),l!==0&&l!==o.retryLane))throw o.retryLane=l,Zr(e,l),Xt(a,e,l),Rm;tu(),t=Sv(e,t,n)}else e=o.treeContext,Xe=An(l.nextSibling),Rt=t,Te=!0,er=null,Cn=!1,e!==null&&i0(t,e),t=Fc(t,a),t.flags|=4096;return t}return e=ba(e.child,{mode:a.mode,children:a.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Gc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(V(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function _m(e,t,n,a,r){return eo(t),n=cm(e,t,n,a,void 0,r),a=um(),e!==null&&!mt?(dm(e,t,r),Aa(e,t,r)):(Te&&a&&Ff(t),t.flags|=1,Tt(e,t,n,r),t.child)}function Nv(e,t,n,a,r,o){return eo(t),t.updateQueue=null,n=E0(t,a,n,r),C0(e),a=um(),e!==null&&!mt?(dm(e,t,o),Aa(e,t,o)):(Te&&a&&Ff(t),t.flags|=1,Tt(e,t,n,o),t.child)}function jv(e,t,n,a,r){if(eo(t),t.stateNode===null){var o=Ko,l=n.contextType;typeof l=="object"&&l!==null&&(o=_t(l)),o=new n(a,o),t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,o.updater=Em,t.stateNode=o,o._reactInternals=t,o=t.stateNode,o.props=a,o.state=t.memoizedState,o.refs={},tm(t),l=n.contextType,o.context=typeof l=="object"&&l!==null?_t(l):Ko,o.state=t.memoizedState,l=n.getDerivedStateFromProps,typeof l=="function"&&(Cm(t,n,l,a),o.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(l=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),l!==o.state&&Em.enqueueReplaceState(o,o.state,null),Rs(t,a,o,r),As(),o.state=t.memoizedState),typeof o.componentDidMount=="function"&&(t.flags|=4194308),a=!0}else if(e===null){o=t.stateNode;var i=t.memoizedProps,c=lo(n,i);o.props=c;var u=o.context,m=n.contextType;l=Ko,typeof m=="object"&&m!==null&&(l=_t(m));var d=n.getDerivedStateFromProps;m=typeof d=="function"||typeof o.getSnapshotBeforeUpdate=="function",i=t.pendingProps!==i,m||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(i||u!==l)&&uv(t,o,a,l),ar=!1;var p=t.memoizedState;o.state=p,Rs(t,a,o,r),As(),u=t.memoizedState,i||p!==u||ar?(typeof d=="function"&&(Cm(t,n,d,a),u=t.memoizedState),(c=ar||cv(t,n,c,a,p,u,l))?(m||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=a,t.memoizedState=u),o.props=a,o.state=u,o.context=l,a=c):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{o=t.stateNode,nm(e,t),l=t.memoizedProps,m=lo(n,l),o.props=m,d=t.pendingProps,p=o.context,u=n.contextType,c=Ko,typeof u=="object"&&u!==null&&(c=_t(u)),i=n.getDerivedStateFromProps,(u=typeof i=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(l!==d||p!==c)&&uv(t,o,a,c),ar=!1,p=t.memoizedState,o.state=p,Rs(t,a,o,r),As();var h=t.memoizedState;l!==d||p!==h||ar||e!==null&&e.dependencies!==null&&Ec(e.dependencies)?(typeof i=="function"&&(Cm(t,n,i,a),h=t.memoizedState),(m=ar||cv(t,n,m,a,p,h,c)||e!==null&&e.dependencies!==null&&Ec(e.dependencies))?(u||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(a,h,c),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(a,h,c)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=h),o.props=a,o.state=h,o.context=c,a=m):(typeof o.componentDidUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),a=!1)}return o=a,Gc(e,t),a=(t.flags&128)!==0,o||a?(o=t.stateNode,n=a&&typeof n.getDerivedStateFromError!="function"?null:o.render(),t.flags|=1,e!==null&&a?(t.child=ro(t,e.child,null,r),t.child=ro(t,null,n,r)):Tt(e,t,n,r),t.memoizedState=o.state,e=t.child):e=Aa(e,t,r),e}function Cv(e,t,n,a){return Qr(),t.flags|=256,Tt(e,t,n,a),t.child}var Tm={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Mm(e){return{baseLanes:e,cachePool:p0()}}function Dm(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=fn),e}function Ev(e,t,n){var a=t.pendingProps,r=!1,o=(t.flags&128)!==0,l;if((l=o)||(l=e!==null&&e.memoizedState===null?!1:(st.current&2)!==0),l&&(r=!0,t.flags&=-129),l=(t.flags&32)!==0,t.flags&=-33,e===null){if(Te){if(r?lr(t):sr(),(e=Xe)?(e=ky(e,Cn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ja!==null?{id:Jn,overflow:ea}:null,retryLane:536870912,hydrationErrors:null},n=o0(e),n.return=t,t.child=n,Rt=t,Xe=null)):e=null,e===null)throw tr(t);return pp(e)?t.lanes=32:t.lanes=536870912,null}var i=a.children;return a=a.fallback,r?(sr(),r=t.mode,i=Yc({mode:"hidden",children:i},r),a=Wr(a,r,n,null),i.return=t,a.return=t,i.sibling=a,t.child=i,a=t.child,a.memoizedState=Mm(n),a.childLanes=Dm(e,l,n),t.memoizedState=Tm,Os(null,a)):(lr(t),Om(t,i))}var c=e.memoizedState;if(c!==null&&(i=c.dehydrated,i!==null)){if(o)t.flags&256?(lr(t),t.flags&=-257,t=km(e,t,n)):t.memoizedState!==null?(sr(),t.child=e.child,t.flags|=128,t=null):(sr(),i=a.fallback,r=t.mode,a=Yc({mode:"visible",children:a.children},r),i=Wr(i,r,n,null),i.flags|=2,a.return=t,i.return=t,a.sibling=i,t.child=a,ro(t,e.child,null,n),a=t.child,a.memoizedState=Mm(n),a.childLanes=Dm(e,l,n),t.memoizedState=Tm,t=Os(null,a));else if(lr(t),pp(i)){if(l=i.nextSibling&&i.nextSibling.dataset,l)var u=l.dgst;l=u,a=Error(V(419)),a.stack="",a.digest=l,bs({value:a,source:null,stack:null}),t=km(e,t,n)}else if(mt||Qo(e,t,n,!1),l=(n&e.childLanes)!==0,mt||l){if(l=Ie,l!==null&&(a=fg(l,n),a!==0&&a!==c.retryLane))throw c.retryLane=a,Zr(e,a),Xt(l,e,a),Rm;mp(i)||tu(),t=km(e,t,n)}else mp(i)?(t.flags|=192,t.child=e.child,t=null):(e=c.treeContext,Xe=An(i.nextSibling),Rt=t,Te=!0,er=null,Cn=!1,e!==null&&i0(t,e),t=Om(t,a.children),t.flags|=4096);return t}return r?(sr(),i=a.fallback,r=t.mode,c=e.child,u=c.sibling,a=ba(c,{mode:"hidden",children:a.children}),a.subtreeFlags=c.subtreeFlags&65011712,u!==null?i=ba(u,i):(i=Wr(i,r,n,null),i.flags|=2),i.return=t,a.return=t,a.sibling=i,t.child=a,Os(null,a),a=t.child,i=e.child.memoizedState,i===null?i=Mm(n):(r=i.cachePool,r!==null?(c=dt._currentValue,r=r.parent!==c?{parent:c,pool:c}:r):r=p0(),i={baseLanes:i.baseLanes|n,cachePool:r}),a.memoizedState=i,a.childLanes=Dm(e,l,n),t.memoizedState=Tm,Os(e.child,a)):(lr(t),n=e.child,e=n.sibling,n=ba(n,{mode:"visible",children:a.children}),n.return=t,n.sibling=null,e!==null&&(l=t.deletions,l===null?(t.deletions=[e],t.flags|=16):l.push(e)),t.child=n,t.memoizedState=null,n)}function Om(e,t){return t=Yc({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Yc(e,t){return e=sn(22,e,null,t),e.lanes=0,e}function km(e,t,n){return ro(t,e.child,null,n),e=Om(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Av(e,t,n){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),Xf(e.return,t,n)}function Lm(e,t,n,a,r,o){var l=e.memoizedState;l===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:n,tailMode:r,treeForkCount:o}:(l.isBackwards=t,l.rendering=null,l.renderingStartTime=0,l.last=a,l.tail=n,l.tailMode=r,l.treeForkCount=o)}function Rv(e,t,n){var a=t.pendingProps,r=a.revealOrder,o=a.tail;a=a.children;var l=st.current,i=(l&2)!==0;if(i?(l=l&1|2,t.flags|=128):l&=1,$e(st,l),Tt(e,t,a,n),a=Te?xs:0,!i&&e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Av(e,n,t);else if(e.tag===19)Av(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}switch(r){case"forwards":for(n=t.child,r=null;n!==null;)e=n.alternate,e!==null&&kc(e)===null&&(r=n),n=n.sibling;n=r,n===null?(r=t.child,t.child=null):(r=n.sibling,n.sibling=null),Lm(t,!1,r,n,o,a);break;case"backwards":case"unstable_legacy-backwards":for(n=null,r=t.child,t.child=null;r!==null;){if(e=r.alternate,e!==null&&kc(e)===null){t.child=r;break}e=r.sibling,r.sibling=n,n=r,r=e}Lm(t,!0,n,null,o,a);break;case"together":Lm(t,!1,null,null,void 0,a);break;default:t.memoizedState=null}return t.child}function Aa(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),ur|=t.lanes,!(n&t.childLanes))if(e!==null){if(Qo(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(V(153));if(t.child!==null){for(e=t.child,n=ba(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ba(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function zm(e,t){return e.lanes&t?!0:(e=e.dependencies,!!(e!==null&&Ec(e)))}function uR(e,t,n){switch(t.tag){case 3:ac(t,t.stateNode.containerInfo),nr(t,dt,e.memoizedState.cache),Qr();break;case 27:case 5:of(t);break;case 4:ac(t,t.stateNode.containerInfo);break;case 10:nr(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,sm(t),null;break;case 13:var a=t.memoizedState;if(a!==null)return a.dehydrated!==null?(lr(t),t.flags|=128,null):n&t.child.childLanes?Ev(e,t,n):(lr(t),e=Aa(e,t,n),e!==null?e.sibling:null);lr(t);break;case 19:var r=(e.flags&128)!==0;if(a=(n&t.childLanes)!==0,a||(Qo(e,t,n,!1),a=(n&t.childLanes)!==0),r){if(a)return Rv(e,t,n);t.flags|=128}if(r=t.memoizedState,r!==null&&(r.rendering=null,r.tail=null,r.lastEffect=null),$e(st,st.current),a)break;return null;case 22:return t.lanes=0,xv(e,t,n,t.pendingProps);case 24:nr(t,dt,e.memoizedState.cache)}return Aa(e,t,n)}function _v(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)mt=!0;else{if(!zm(e,n)&&!(t.flags&128))return mt=!1,uR(e,t,n);mt=!!(e.flags&131072)}else mt=!1,Te&&t.flags&1048576&&s0(t,xs,t.index);switch(t.lanes=0,t.tag){case 16:e:{var a=t.pendingProps;if(e=no(t.elementType),t.type=e,typeof e=="function")If(e)?(a=lo(e,a),t.tag=1,t=jv(null,t,e,a,n)):(t.tag=0,t=_m(null,t,e,a,n));else{if(e!=null){var r=e.$$typeof;if(r===Qd){t.tag=11,t=gv(null,t,e,a,n);break e}else if(r===tf){t.tag=14,t=vv(null,t,e,a,n);break e}}throw t=af(e)||e,Error(V(306,t,""))}}return t;case 0:return _m(e,t,t.type,t.pendingProps,n);case 1:return a=t.type,r=lo(a,t.pendingProps),jv(e,t,a,r,n);case 3:e:{if(ac(t,t.stateNode.containerInfo),e===null)throw Error(V(387));a=t.pendingProps;var o=t.memoizedState;r=o.element,nm(e,t),Rs(t,a,null,n);var l=t.memoizedState;if(a=l.cache,nr(t,dt,a),a!==o.cache&&Zf(t,[dt],n,!0),As(),a=l.element,o.isDehydrated)if(o={element:a,isDehydrated:!1,cache:l.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=Cv(e,t,a,n);break e}else if(a!==r){r=Sn(Error(V(424)),t),bs(r),t=Cv(e,t,a,n);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(Xe=An(e.firstChild),Rt=t,Te=!0,er=null,Cn=!0,n=x0(t,null,a,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Qr(),a===r){t=Aa(e,t,n);break e}Tt(e,t,a,n)}t=t.child}return t;case 26:return Gc(e,t),e===null?(n=Hy(t.type,null,t.pendingProps,null))?t.memoizedState=n:Te||(n=t.type,e=t.pendingProps,a=iu(Xa.current).createElement(n),a[At]=t,a[$t]=e,Mt(a,n,e),jt(a),t.stateNode=a):t.memoizedState=Hy(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return of(t),e===null&&Te&&(a=t.stateNode=Py(t.type,t.pendingProps,Xa.current),Rt=t,Cn=!0,r=Xe,hr(t.type)?(hp=r,Xe=An(a.firstChild)):Xe=r),Tt(e,t,t.pendingProps.children,n),Gc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Te&&((r=a=Xe)&&(a=HR(a,t.type,t.pendingProps,Cn),a!==null?(t.stateNode=a,Rt=t,Xe=An(a.firstChild),Cn=!1,r=!0):r=!1),r||tr(t)),of(t),r=t.type,o=t.pendingProps,l=e!==null?e.memoizedProps:null,a=o.children,up(r,o)?a=null:l!==null&&up(r,l)&&(t.flags|=32),t.memoizedState!==null&&(r=cm(e,t,tR,null,null,n),Ks._currentValue=r),Gc(e,t),Tt(e,t,a,n),t.child;case 6:return e===null&&Te&&((e=n=Xe)&&(n=IR(n,t.pendingProps,Cn),n!==null?(t.stateNode=n,Rt=t,Xe=null,e=!0):e=!1),e||tr(t)),null;case 13:return Ev(e,t,n);case 4:return ac(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=ro(t,null,a,n):Tt(e,t,a,n),t.child;case 11:return gv(e,t,t.type,t.pendingProps,n);case 7:return Tt(e,t,t.pendingProps,n),t.child;case 8:return Tt(e,t,t.pendingProps.children,n),t.child;case 12:return Tt(e,t,t.pendingProps.children,n),t.child;case 10:return a=t.pendingProps,nr(t,t.type,a.value),Tt(e,t,a.children,n),t.child;case 9:return r=t.type._context,a=t.pendingProps.children,eo(t),r=_t(r),a=a(r),t.flags|=1,Tt(e,t,a,n),t.child;case 14:return vv(e,t,t.type,t.pendingProps,n);case 15:return yv(e,t,t.type,t.pendingProps,n);case 19:return Rv(e,t,n);case 31:return cR(e,t,n);case 22:return xv(e,t,n,t.pendingProps);case 24:return eo(t),a=_t(dt),e===null?(r=Jf(),r===null&&(r=Ie,o=Wf(),r.pooledCache=o,o.refCount++,o!==null&&(r.pooledCacheLanes|=n),r=o),t.memoizedState={parent:a,cache:r},tm(t),nr(t,dt,r)):(e.lanes&n&&(nm(e,t),Rs(t,null,null,n),As()),r=e.memoizedState,o=t.memoizedState,r.parent!==a?(r={parent:a,cache:a},t.memoizedState=r,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=r),nr(t,dt,a)):(a=o.cache,nr(t,dt,a),a!==r.cache&&Zf(t,[dt],n,!0))),Tt(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(V(156,t.tag))}function Ra(e){e.flags|=4}function Pm(e,t,n,a,r){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(r&335544128)===r)if(e.stateNode.complete)e.flags|=8192;else if(ny())e.flags|=8192;else throw ao=Tc,em}else e.flags&=-16777217}function Tv(e,t){if(t.type!=="stylesheet"||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Gy(t))if(ny())e.flags|=8192;else throw ao=Tc,em}function qc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?cg():536870912,e.lanes|=t,ul|=t)}function ks(e,t){if(!Te)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var a=null;n!==null;)n.alternate!==null&&(a=n),n=n.sibling;a===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:a.sibling=null}}function Ze(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,a=0;if(t)for(var r=e.child;r!==null;)n|=r.lanes|r.childLanes,a|=r.subtreeFlags&65011712,a|=r.flags&65011712,r.return=e,r=r.sibling;else for(r=e.child;r!==null;)n|=r.lanes|r.childLanes,a|=r.subtreeFlags,a|=r.flags,r.return=e,r=r.sibling;return e.subtreeFlags|=a,e.childLanes=n,t}function dR(e,t,n){var a=t.pendingProps;switch(Gf(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ze(t),null;case 1:return Ze(t),null;case 3:return n=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),ja(dt),ko(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Wo(t)?Ra(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,qf())),Ze(t),null;case 26:var r=t.type,o=t.memoizedState;return e===null?(Ra(t),o!==null?(Ze(t),Tv(t,o)):(Ze(t),Pm(t,r,null,a,n))):o?o!==e.memoizedState?(Ra(t),Ze(t),Tv(t,o)):(Ze(t),t.flags&=-16777217):(e=e.memoizedProps,e!==a&&Ra(t),Ze(t),Pm(t,r,e,a,n)),null;case 27:if(rc(t),n=Xa.current,r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&Ra(t);else{if(!a){if(t.stateNode===null)throw Error(V(166));return Ze(t),null}e=Qn.current,Wo(t)?c0(t):(e=Py(r,a,n),t.stateNode=e,Ra(t))}return Ze(t),null;case 5:if(rc(t),r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&Ra(t);else{if(!a){if(t.stateNode===null)throw Error(V(166));return Ze(t),null}if(o=Qn.current,Wo(t))c0(t);else{var l=iu(Xa.current);switch(o){case 1:o=l.createElementNS("http://www.w3.org/2000/svg",r);break;case 2:o=l.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;default:switch(r){case"svg":o=l.createElementNS("http://www.w3.org/2000/svg",r);break;case"math":o=l.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;case"script":o=l.createElement("div"),o.innerHTML="<script><\/script>",o=o.removeChild(o.firstChild);break;case"select":o=typeof a.is=="string"?l.createElement("select",{is:a.is}):l.createElement("select"),a.multiple?o.multiple=!0:a.size&&(o.size=a.size);break;default:o=typeof a.is=="string"?l.createElement(r,{is:a.is}):l.createElement(r)}}o[At]=t,o[$t]=a;e:for(l=t.child;l!==null;){if(l.tag===5||l.tag===6)o.appendChild(l.stateNode);else if(l.tag!==4&&l.tag!==27&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===t)break e;for(;l.sibling===null;){if(l.return===null||l.return===t)break e;l=l.return}l.sibling.return=l.return,l=l.sibling}t.stateNode=o;e:switch(Mt(o,r,a),r){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&Ra(t)}}return Ze(t),Pm(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&Ra(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(V(166));if(e=Xa.current,Wo(t)){if(e=t.stateNode,n=t.memoizedProps,a=null,r=Rt,r!==null)switch(r.tag){case 27:case 5:a=r.memoizedProps}e[At]=t,e=!!(e.nodeValue===n||a!==null&&a.suppressHydrationWarning===!0||Ey(e.nodeValue,n)),e||tr(t,!0)}else e=iu(e).createTextNode(a),e[At]=t,t.stateNode=e}return Ze(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(a=Wo(t),n!==null){if(e===null){if(!a)throw Error(V(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(V(557));e[At]=t}else Qr(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ze(t),e=!1}else n=qf(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(un(t),t):(un(t),null);if(t.flags&128)throw Error(V(558))}return Ze(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(r=Wo(t),a!==null&&a.dehydrated!==null){if(e===null){if(!r)throw Error(V(318));if(r=t.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(V(317));r[At]=t}else Qr(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ze(t),r=!1}else r=qf(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=r),r=!0;if(!r)return t.flags&256?(un(t),t):(un(t),null)}return un(t),t.flags&128?(t.lanes=n,t):(n=a!==null,e=e!==null&&e.memoizedState!==null,n&&(a=t.child,r=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(r=a.alternate.memoizedState.cachePool.pool),o=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(o=a.memoizedState.cachePool.pool),o!==r&&(a.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),qc(t,t.updateQueue),Ze(t),null);case 4:return ko(),e===null&&op(t.stateNode.containerInfo),Ze(t),null;case 10:return ja(t.type),Ze(t),null;case 19:if(Nt(st),a=t.memoizedState,a===null)return Ze(t),null;if(r=(t.flags&128)!==0,o=a.rendering,o===null)if(r)ks(a,!1);else{if(rt!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=kc(e),o!==null){for(t.flags|=128,ks(a,!1),e=o.updateQueue,t.updateQueue=e,qc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)r0(n,e),n=n.sibling;return $e(st,st.current&1|2),Te&&Sa(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&&an()>Qc&&(t.flags|=128,r=!0,ks(a,!1),t.lanes=4194304)}else{if(!r)if(e=kc(o),e!==null){if(t.flags|=128,r=!0,e=e.updateQueue,t.updateQueue=e,qc(t,e),ks(a,!0),a.tail===null&&a.tailMode==="hidden"&&!o.alternate&&!Te)return Ze(t),null}else 2*an()-a.renderingStartTime>Qc&&n!==536870912&&(t.flags|=128,r=!0,ks(a,!1),t.lanes=4194304);a.isBackwards?(o.sibling=t.child,t.child=o):(e=a.last,e!==null?e.sibling=o:t.child=o,a.last=o)}return a.tail!==null?(e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=an(),e.sibling=null,n=st.current,$e(st,r?n&1|2:n&1),Te&&Sa(t,a.treeForkCount),e):(Ze(t),null);case 22:case 23:return un(t),lm(),a=t.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?n&536870912&&!(t.flags&128)&&(Ze(t),t.subtreeFlags&6&&(t.flags|=8192)):Ze(t),n=t.updateQueue,n!==null&&qc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),a=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),a!==n&&(t.flags|=2048),e!==null&&Nt(to),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),ja(dt),Ze(t),null;case 25:return null;case 30:return null}throw Error(V(156,t.tag))}function fR(e,t){switch(Gf(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ja(dt),ko(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return rc(t),null;case 31:if(t.memoizedState!==null){if(un(t),t.alternate===null)throw Error(V(340));Qr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(un(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(V(340));Qr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Nt(st),null;case 4:return ko(),null;case 10:return ja(t.type),null;case 22:case 23:return un(t),lm(),e!==null&&Nt(to),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ja(dt),null;case 25:return null;default:return null}}function Mv(e,t){switch(Gf(t),t.tag){case 3:ja(dt),ko();break;case 26:case 27:case 5:rc(t);break;case 4:ko();break;case 31:t.memoizedState!==null&&un(t);break;case 13:un(t);break;case 19:Nt(st);break;case 10:ja(t.type);break;case 22:case 23:un(t),lm(),e!==null&&Nt(to);break;case 24:ja(dt)}}function Ls(e,t){try{var n=t.updateQueue,a=n!==null?n.lastEffect:null;if(a!==null){var r=a.next;n=r;do{if((n.tag&e)===e){a=void 0;var o=n.create,l=n.inst;a=o(),l.destroy=a}n=n.next}while(n!==r)}}catch(i){Pe(t,t.return,i)}}function ir(e,t,n){try{var a=t.updateQueue,r=a!==null?a.lastEffect:null;if(r!==null){var o=r.next;a=o;do{if((a.tag&e)===e){var l=a.inst,i=l.destroy;if(i!==void 0){l.destroy=void 0,r=t;var c=n,u=i;try{u()}catch(m){Pe(r,c,m)}}}a=a.next}while(a!==o)}}catch(m){Pe(t,t.return,m)}}function Dv(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{S0(t,n)}catch(a){Pe(e,e.return,a)}}}function Ov(e,t,n){n.props=lo(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(a){Pe(e,t,a)}}function zs(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var a=e.stateNode;break;case 30:a=e.stateNode;break;default:a=e.stateNode}typeof n=="function"?e.refCleanup=n(a):n.current=a}}catch(r){Pe(e,t,r)}}function ta(e,t){var n=e.ref,a=e.refCleanup;if(n!==null)if(typeof a=="function")try{a()}catch(r){Pe(e,t,r)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(r){Pe(e,t,r)}else n.current=null}function kv(e){var t=e.type,n=e.memoizedProps,a=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&a.focus();break e;case"img":n.src?a.src=n.src:n.srcSet&&(a.srcset=n.srcSet)}}catch(r){Pe(e,e.return,r)}}function Bm(e,t,n){try{var a=e.stateNode;kR(a,e.type,n,t),a[$t]=t}catch(r){Pe(e,e.return,r)}}function Lv(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&hr(e.type)||e.tag===4}function Um(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Lv(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&hr(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Hm(e,t,n){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=ya));else if(a!==4&&(a===27&&hr(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Hm(e,t,n),e=e.sibling;e!==null;)Hm(e,t,n),e=e.sibling}function Kc(e,t,n){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(a!==4&&(a===27&&hr(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Kc(e,t,n),e=e.sibling;e!==null;)Kc(e,t,n),e=e.sibling}function zv(e){var t=e.stateNode,n=e.memoizedProps;try{for(var a=e.type,r=t.attributes;r.length;)t.removeAttributeNode(r[0]);Mt(t,a,n),t[At]=e,t[$t]=n}catch(o){Pe(e,e.return,o)}}var _a=!1,pt=!1,Im=!1,Pv=typeof WeakSet=="function"?WeakSet:Set,Ct=null;function mR(e,t){if(e=e.containerInfo,ip=hu,e=Xg(e),kf(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var a=n.getSelection&&n.getSelection();if(a&&a.rangeCount!==0){n=a.anchorNode;var r=a.anchorOffset,o=a.focusNode;a=a.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var l=0,i=-1,c=-1,u=0,m=0,d=e,p=null;t:for(;;){for(var h;d!==n||r!==0&&d.nodeType!==3||(i=l+r),d!==o||a!==0&&d.nodeType!==3||(c=l+a),d.nodeType===3&&(l+=d.nodeValue.length),(h=d.firstChild)!==null;)p=d,d=h;for(;;){if(d===e)break t;if(p===n&&++u===r&&(i=l),p===o&&++m===a&&(c=l),(h=d.nextSibling)!==null)break;d=p,p=d.parentNode}d=h}n=i===-1||c===-1?null:{start:i,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(cp={focusedElem:e,selectionRange:n},hu=!1,Ct=t;Ct!==null;)if(t=Ct,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Ct=e;else for(;Ct!==null;){switch(t=Ct,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(n=0;n<e.length;n++)r=e[n],r.ref.impl=r.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,r=o.memoizedProps,o=o.memoizedState,a=n.stateNode;try{var x=lo(n.type,r);e=a.getSnapshotBeforeUpdate(x,o),a.__reactInternalSnapshotBeforeUpdate=e}catch(v){Pe(n,n.return,v)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)fp(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":fp(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(V(163))}if(e=t.sibling,e!==null){e.return=t.return,Ct=e;break}Ct=t.return}}function Bv(e,t,n){var a=n.flags;switch(n.tag){case 0:case 11:case 15:Ma(e,n),a&4&&Ls(5,n);break;case 1:if(Ma(e,n),a&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(l){Pe(n,n.return,l)}else{var r=lo(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(r,t,e.__reactInternalSnapshotBeforeUpdate)}catch(l){Pe(n,n.return,l)}}a&64&&Dv(n),a&512&&zs(n,n.return);break;case 3:if(Ma(e,n),a&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{S0(e,t)}catch(l){Pe(n,n.return,l)}}break;case 27:t===null&&a&4&&zv(n);case 26:case 5:Ma(e,n),t===null&&a&4&&kv(n),a&512&&zs(n,n.return);break;case 12:Ma(e,n);break;case 31:Ma(e,n),a&4&&Iv(e,n);break;case 13:Ma(e,n),a&4&&Vv(e,n),a&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=SR.bind(null,n),VR(e,n))));break;case 22:if(a=n.memoizedState!==null||_a,!a){t=t!==null&&t.memoizedState!==null||pt,r=_a;var o=pt;_a=a,(pt=t)&&!o?Da(e,n,(n.subtreeFlags&8772)!==0):Ma(e,n),_a=r,pt=o}break;case 30:break;default:Ma(e,n)}}function Uv(e){var t=e.alternate;t!==null&&(e.alternate=null,Uv(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&gf(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Qe=null,Gt=!1;function Ta(e,t,n){for(n=n.child;n!==null;)Hv(e,t,n),n=n.sibling}function Hv(e,t,n){if(rn&&typeof rn.onCommitFiberUnmount=="function")try{rn.onCommitFiberUnmount(ls,n)}catch{}switch(n.tag){case 26:pt||ta(n,t),Ta(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:pt||ta(n,t);var a=Qe,r=Gt;hr(n.type)&&(Qe=n.stateNode,Gt=!1),Ta(e,t,n),Gs(n.stateNode),Qe=a,Gt=r;break;case 5:pt||ta(n,t);case 6:if(a=Qe,r=Gt,Qe=null,Ta(e,t,n),Qe=a,Gt=r,Qe!==null)if(Gt)try{(Qe.nodeType===9?Qe.body:Qe.nodeName==="HTML"?Qe.ownerDocument.body:Qe).removeChild(n.stateNode)}catch(o){Pe(n,t,o)}else try{Qe.removeChild(n.stateNode)}catch(o){Pe(n,t,o)}break;case 18:Qe!==null&&(Gt?(e=Qe,Dy(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),vl(e)):Dy(Qe,n.stateNode));break;case 4:a=Qe,r=Gt,Qe=n.stateNode.containerInfo,Gt=!0,Ta(e,t,n),Qe=a,Gt=r;break;case 0:case 11:case 14:case 15:ir(2,n,t),pt||ir(4,n,t),Ta(e,t,n);break;case 1:pt||(ta(n,t),a=n.stateNode,typeof a.componentWillUnmount=="function"&&Ov(n,t,a)),Ta(e,t,n);break;case 21:Ta(e,t,n);break;case 22:pt=(a=pt)||n.memoizedState!==null,Ta(e,t,n),pt=a;break;default:Ta(e,t,n)}}function Iv(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{vl(e)}catch(n){Pe(t,t.return,n)}}}function Vv(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{vl(e)}catch(n){Pe(t,t.return,n)}}function pR(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Pv),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Pv),t;default:throw Error(V(435,e.tag))}}function Xc(e,t){var n=pR(e);t.forEach(function(a){if(!n.has(a)){n.add(a);var r=NR.bind(null,e,a);a.then(r,r)}})}function Yt(e,t){var n=t.deletions;if(n!==null)for(var a=0;a<n.length;a++){var r=n[a],o=e,l=t,i=l;e:for(;i!==null;){switch(i.tag){case 27:if(hr(i.type)){Qe=i.stateNode,Gt=!1;break e}break;case 5:Qe=i.stateNode,Gt=!1;break e;case 3:case 4:Qe=i.stateNode.containerInfo,Gt=!0;break e}i=i.return}if(Qe===null)throw Error(V(160));Hv(o,l,r),Qe=null,Gt=!1,o=r.alternate,o!==null&&(o.return=null),r.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)$v(t,e),t=t.sibling}var In=null;function $v(e,t){var n=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Yt(t,e),qt(e),a&4&&(ir(3,e,e.return),Ls(3,e),ir(5,e,e.return));break;case 1:Yt(t,e),qt(e),a&512&&(pt||n===null||ta(n,n.return)),a&64&&_a&&(e=e.updateQueue,e!==null&&(a=e.callbacks,a!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?a:n.concat(a))));break;case 26:var r=In;if(Yt(t,e),qt(e),a&512&&(pt||n===null||ta(n,n.return)),a&4){var o=n!==null?n.memoizedState:null;if(a=e.memoizedState,n===null)if(a===null)if(e.stateNode===null){e:{a=e.type,n=e.memoizedProps,r=r.ownerDocument||r;t:switch(a){case"title":o=r.getElementsByTagName("title")[0],(!o||o[cs]||o[At]||o.namespaceURI==="http://www.w3.org/2000/svg"||o.hasAttribute("itemprop"))&&(o=r.createElement(a),r.head.insertBefore(o,r.querySelector("head > title"))),Mt(o,a,n),o[At]=e,jt(o),a=o;break e;case"link":var l=$y("link","href",r).get(a+(n.href||""));if(l){for(var i=0;i<l.length;i++)if(o=l[i],o.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&o.getAttribute("rel")===(n.rel==null?null:n.rel)&&o.getAttribute("title")===(n.title==null?null:n.title)&&o.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){l.splice(i,1);break t}}o=r.createElement(a),Mt(o,a,n),r.head.appendChild(o);break;case"meta":if(l=$y("meta","content",r).get(a+(n.content||""))){for(i=0;i<l.length;i++)if(o=l[i],o.getAttribute("content")===(n.content==null?null:""+n.content)&&o.getAttribute("name")===(n.name==null?null:n.name)&&o.getAttribute("property")===(n.property==null?null:n.property)&&o.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute("charset")===(n.charSet==null?null:n.charSet)){l.splice(i,1);break t}}o=r.createElement(a),Mt(o,a,n),r.head.appendChild(o);break;default:throw Error(V(468,a))}o[At]=e,jt(o),a=o}e.stateNode=a}else Fy(r,e.type,e.stateNode);else e.stateNode=Vy(r,a,e.memoizedProps);else o!==a?(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,a===null?Fy(r,e.type,e.stateNode):Vy(r,a,e.memoizedProps)):a===null&&e.stateNode!==null&&Bm(e,e.memoizedProps,n.memoizedProps)}break;case 27:Yt(t,e),qt(e),a&512&&(pt||n===null||ta(n,n.return)),n!==null&&a&4&&Bm(e,e.memoizedProps,n.memoizedProps);break;case 5:if(Yt(t,e),qt(e),a&512&&(pt||n===null||ta(n,n.return)),e.flags&32){r=e.stateNode;try{Io(r,"")}catch(x){Pe(e,e.return,x)}}a&4&&e.stateNode!=null&&(r=e.memoizedProps,Bm(e,r,n!==null?n.memoizedProps:r)),a&1024&&(Im=!0);break;case 6:if(Yt(t,e),qt(e),a&4){if(e.stateNode===null)throw Error(V(162));a=e.memoizedProps,n=e.stateNode;try{n.nodeValue=a}catch(x){Pe(e,e.return,x)}}break;case 3:if(du=null,r=In,In=cu(t.containerInfo),Yt(t,e),In=r,qt(e),a&4&&n!==null&&n.memoizedState.isDehydrated)try{vl(t.containerInfo)}catch(x){Pe(e,e.return,x)}Im&&(Im=!1,Fv(e));break;case 4:a=In,In=cu(e.stateNode.containerInfo),Yt(t,e),qt(e),In=a;break;case 12:Yt(t,e),qt(e);break;case 31:Yt(t,e),qt(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Xc(e,a)));break;case 13:Yt(t,e),qt(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(Wc=an()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Xc(e,a)));break;case 22:r=e.memoizedState!==null;var c=n!==null&&n.memoizedState!==null,u=_a,m=pt;if(_a=u||r,pt=m||c,Yt(t,e),pt=m,_a=u,qt(e),a&8192)e:for(t=e.stateNode,t._visibility=r?t._visibility&-2:t._visibility|1,r&&(n===null||c||_a||pt||so(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){c=n=t;try{if(o=c.stateNode,r)l=o.style,typeof l.setProperty=="function"?l.setProperty("display","none","important"):l.display="none";else{i=c.stateNode;var d=c.memoizedProps.style,p=d!=null&&d.hasOwnProperty("display")?d.display:null;i.style.display=p==null||typeof p=="boolean"?"":(""+p).trim()}}catch(x){Pe(c,c.return,x)}}}else if(t.tag===6){if(n===null){c=t;try{c.stateNode.nodeValue=r?"":c.memoizedProps}catch(x){Pe(c,c.return,x)}}}else if(t.tag===18){if(n===null){c=t;try{var h=c.stateNode;r?Oy(h,!0):Oy(c.stateNode,!1)}catch(x){Pe(c,c.return,x)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}a&4&&(a=e.updateQueue,a!==null&&(n=a.retryQueue,n!==null&&(a.retryQueue=null,Xc(e,n))));break;case 19:Yt(t,e),qt(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Xc(e,a)));break;case 30:break;case 21:break;default:Yt(t,e),qt(e)}}function qt(e){var t=e.flags;if(t&2){try{for(var n,a=e.return;a!==null;){if(Lv(a)){n=a;break}a=a.return}if(n==null)throw Error(V(160));switch(n.tag){case 27:var r=n.stateNode,o=Um(e);Kc(e,o,r);break;case 5:var l=n.stateNode;n.flags&32&&(Io(l,""),n.flags&=-33);var i=Um(e);Kc(e,i,l);break;case 3:case 4:var c=n.stateNode.containerInfo,u=Um(e);Hm(e,u,c);break;default:throw Error(V(161))}}catch(m){Pe(e,e.return,m)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Fv(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Fv(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Ma(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Bv(e,t.alternate,t),t=t.sibling}function so(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:ir(4,t,t.return),so(t);break;case 1:ta(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&Ov(t,t.return,n),so(t);break;case 27:Gs(t.stateNode);case 26:case 5:ta(t,t.return),so(t);break;case 22:t.memoizedState===null&&so(t);break;case 30:so(t);break;default:so(t)}e=e.sibling}}function Da(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var a=t.alternate,r=e,o=t,l=o.flags;switch(o.tag){case 0:case 11:case 15:Da(r,o,n),Ls(4,o);break;case 1:if(Da(r,o,n),a=o,r=a.stateNode,typeof r.componentDidMount=="function")try{r.componentDidMount()}catch(u){Pe(a,a.return,u)}if(a=o,r=a.updateQueue,r!==null){var i=a.stateNode;try{var c=r.shared.hiddenCallbacks;if(c!==null)for(r.shared.hiddenCallbacks=null,r=0;r<c.length;r++)b0(c[r],i)}catch(u){Pe(a,a.return,u)}}n&&l&64&&Dv(o),zs(o,o.return);break;case 27:zv(o);case 26:case 5:Da(r,o,n),n&&a===null&&l&4&&kv(o),zs(o,o.return);break;case 12:Da(r,o,n);break;case 31:Da(r,o,n),n&&l&4&&Iv(r,o);break;case 13:Da(r,o,n),n&&l&4&&Vv(r,o);break;case 22:o.memoizedState===null&&Da(r,o,n),zs(o,o.return);break;case 30:break;default:Da(r,o,n)}t=t.sibling}}function Vm(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&Ss(n))}function $m(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ss(e))}function Vn(e,t,n,a){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Gv(e,t,n,a),t=t.sibling}function Gv(e,t,n,a){var r=t.flags;switch(t.tag){case 0:case 11:case 15:Vn(e,t,n,a),r&2048&&Ls(9,t);break;case 1:Vn(e,t,n,a);break;case 3:Vn(e,t,n,a),r&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ss(e)));break;case 12:if(r&2048){Vn(e,t,n,a),e=t.stateNode;try{var o=t.memoizedProps,l=o.id,i=o.onPostCommit;typeof i=="function"&&i(l,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(c){Pe(t,t.return,c)}}else Vn(e,t,n,a);break;case 31:Vn(e,t,n,a);break;case 13:Vn(e,t,n,a);break;case 23:break;case 22:o=t.stateNode,l=t.alternate,t.memoizedState!==null?o._visibility&2?Vn(e,t,n,a):Ps(e,t):o._visibility&2?Vn(e,t,n,a):(o._visibility|=2,sl(e,t,n,a,(t.subtreeFlags&10256)!==0||!1)),r&2048&&Vm(l,t);break;case 24:Vn(e,t,n,a),r&2048&&$m(t.alternate,t);break;default:Vn(e,t,n,a)}}function sl(e,t,n,a,r){for(r=r&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var o=e,l=t,i=n,c=a,u=l.flags;switch(l.tag){case 0:case 11:case 15:sl(o,l,i,c,r),Ls(8,l);break;case 23:break;case 22:var m=l.stateNode;l.memoizedState!==null?m._visibility&2?sl(o,l,i,c,r):Ps(o,l):(m._visibility|=2,sl(o,l,i,c,r)),r&&u&2048&&Vm(l.alternate,l);break;case 24:sl(o,l,i,c,r),r&&u&2048&&$m(l.alternate,l);break;default:sl(o,l,i,c,r)}t=t.sibling}}function Ps(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,a=t,r=a.flags;switch(a.tag){case 22:Ps(n,a),r&2048&&Vm(a.alternate,a);break;case 24:Ps(n,a),r&2048&&$m(a.alternate,a);break;default:Ps(n,a)}t=t.sibling}}var Bs=8192;function il(e,t,n){if(e.subtreeFlags&Bs)for(e=e.child;e!==null;)Yv(e,t,n),e=e.sibling}function Yv(e,t,n){switch(e.tag){case 26:il(e,t,n),e.flags&Bs&&e.memoizedState!==null&&e_(n,In,e.memoizedState,e.memoizedProps);break;case 5:il(e,t,n);break;case 3:case 4:var a=In;In=cu(e.stateNode.containerInfo),il(e,t,n),In=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=Bs,Bs=16777216,il(e,t,n),Bs=a):il(e,t,n));break;default:il(e,t,n)}}function qv(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Us(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var a=t[n];Ct=a,Xv(a,e)}qv(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Kv(e),e=e.sibling}function Kv(e){switch(e.tag){case 0:case 11:case 15:Us(e),e.flags&2048&&ir(9,e,e.return);break;case 3:Us(e);break;case 12:Us(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Zc(e)):Us(e);break;default:Us(e)}}function Zc(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var a=t[n];Ct=a,Xv(a,e)}qv(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:ir(8,t,t.return),Zc(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Zc(t));break;default:Zc(t)}e=e.sibling}}function Xv(e,t){for(;Ct!==null;){var n=Ct;switch(n.tag){case 0:case 11:case 15:ir(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var a=n.memoizedState.cachePool.pool;a!=null&&a.refCount++}break;case 24:Ss(n.memoizedState.cache)}if(a=n.child,a!==null)a.return=n,Ct=a;else e:for(n=e;Ct!==null;){a=Ct;var r=a.sibling,o=a.return;if(Uv(a),a===n){Ct=null;break e}if(r!==null){r.return=o,Ct=r;break e}Ct=o}}}var hR={getCacheForType:function(e){var t=_t(dt),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return _t(dt).controller.signal}},wR=typeof WeakMap=="function"?WeakMap:Map,ke=0,Ie=null,Ee=null,_e=0,ze=0,dn=null,cr=!1,cl=!1,Fm=!1,Oa=0,rt=0,ur=0,io=0,Gm=0,fn=0,ul=0,Hs=null,Kt=null,Ym=!1,Wc=0,Zv=0,Qc=1/0,Jc=null,dr=null,yt=0,fr=null,dl=null,ka=0,qm=0,Km=null,Wv=null,Is=0,Xm=null;function mn(){return ke&2&&_e!==0?_e&-_e:we.T!==null?tp():mg()}function Qv(){if(fn===0)if(!(_e&536870912)||Te){var e=sc;sc<<=1,!(sc&3932160)&&(sc=262144),fn=e}else fn=536870912;return e=cn.current,e!==null&&(e.flags|=32),fn}function Xt(e,t,n){(e===Ie&&(ze===2||ze===9)||e.cancelPendingCommit!==null)&&(fl(e,0),mr(e,_e,fn,!1)),is(e,n),(!(ke&2)||e!==Ie)&&(e===Ie&&(!(ke&2)&&(io|=n),rt===4&&mr(e,_e,fn,!1)),na(e))}function Jv(e,t,n){if(ke&6)throw Error(V(327));var a=!n&&(t&127)===0&&(t&e.expiredLanes)===0||ss(e,t),r=a?yR(e,t):Wm(e,t,!0),o=a;do{if(r===0){cl&&!a&&mr(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!gR(n)){r=Wm(e,t,!1),o=!1;continue}if(r===2){if(o=t,e.errorRecoveryDisabledLanes&o)var l=0;else l=e.pendingLanes&-536870913,l=l!==0?l:l&536870912?536870912:0;if(l!==0){t=l;e:{var i=e;r=Hs;var c=i.current.memoizedState.isDehydrated;if(c&&(fl(i,l).flags|=256),l=Wm(i,l,!1),l!==2){if(Fm&&!c){i.errorRecoveryDisabledLanes|=o,io|=o,r=4;break e}o=Kt,Kt=r,o!==null&&(Kt===null?Kt=o:Kt.push.apply(Kt,o))}r=l}if(o=!1,r!==2)continue}}if(r===1){fl(e,0),mr(e,t,0,!0);break}e:{switch(a=e,o=r,o){case 0:case 1:throw Error(V(345));case 4:if((t&4194048)!==t)break;case 6:mr(a,t,fn,!cr);break e;case 2:Kt=null;break;case 3:case 5:break;default:throw Error(V(329))}if((t&62914560)===t&&(r=Wc+300-an(),10<r)){if(mr(a,t,fn,!cr),cc(a,0,!0)!==0)break e;ka=t,a.timeoutHandle=Ty(ey.bind(null,a,n,Kt,Jc,Ym,t,fn,io,ul,cr,o,"Throttled",-0,0),r);break e}ey(a,n,Kt,Jc,Ym,t,fn,io,ul,cr,o,null,-0,0)}}break}while(!0);na(e)}function ey(e,t,n,a,r,o,l,i,c,u,m,d,p,h){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)===16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ya},Yv(t,o,d);var x=(o&62914560)===o?Wc-an():(o&4194048)===o?Zv-an():0;if(x=t_(d,x),x!==null){ka=o,e.cancelPendingCommit=x(iy.bind(null,e,t,o,n,a,r,l,i,c,m,d,null,p,h)),mr(e,o,l,!u);return}}iy(e,t,o,n,a,r,l,i,c)}function gR(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var a=0;a<n.length;a++){var r=n[a],o=r.getSnapshot;r=r.value;try{if(!ln(o(),r))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 mr(e,t,n,a){t&=~Gm,t&=~io,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var r=t;0<r;){var o=31-on(r),l=1<<o;a[o]=-1,r&=~l}n!==0&&ug(e,n,t)}function eu(){return ke&6?!0:(Vs(0),!1)}function Zm(){if(Ee!==null){if(ze===0)var e=Ee.return;else e=Ee,Na=Jr=null,fm(e),nl=null,js=0,e=Ee;for(;e!==null;)Mv(e.alternate,e),e=e.return;Ee=null}}function fl(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,PR(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),ka=0,Zm(),Ie=e,Ee=n=ba(e.current,null),_e=t,ze=0,dn=null,cr=!1,cl=ss(e,t),Fm=!1,ul=fn=Gm=io=ur=rt=0,Kt=Hs=null,Ym=!1,t&8&&(t|=t&32);var a=e.entangledLanes;if(a!==0)for(e=e.entanglements,a&=t;0<a;){var r=31-on(a),o=1<<r;t|=e[r],a&=~o}return Oa=t,bc(),n}function ty(e,t){xe=null,we.H=Ds,t===tl||t===_c?(t=g0(),ze=3):t===em?(t=g0(),ze=4):ze=t===Rm?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,dn=t,Ee===null&&(rt=1,$c(e,Sn(t,e.current)))}function ny(){var e=cn.current;return e===null?!0:(_e&4194048)===_e?En===null:(_e&62914560)===_e||_e&536870912?e===En:!1}function ay(){var e=we.H;return we.H=Ds,e===null?Ds:e}function ry(){var e=we.A;return we.A=hR,e}function tu(){rt=4,cr||(_e&4194048)!==_e&&cn.current!==null||(cl=!0),!(ur&134217727)&&!(io&134217727)||Ie===null||mr(Ie,_e,fn,!1)}function Wm(e,t,n){var a=ke;ke|=2;var r=ay(),o=ry();(Ie!==e||_e!==t)&&(Jc=null,fl(e,t)),t=!1;var l=rt;e:do try{if(ze!==0&&Ee!==null){var i=Ee,c=dn;switch(ze){case 8:Zm(),l=6;break e;case 3:case 2:case 9:case 6:cn.current===null&&(t=!0);var u=ze;if(ze=0,dn=null,ml(e,i,c,u),n&&cl){l=0;break e}break;default:u=ze,ze=0,dn=null,ml(e,i,c,u)}}vR(),l=rt;break}catch(m){ty(e,m)}while(!0);return t&&e.shellSuspendCounter++,Na=Jr=null,ke=a,we.H=r,we.A=o,Ee===null&&(Ie=null,_e=0,bc()),l}function vR(){for(;Ee!==null;)oy(Ee)}function yR(e,t){var n=ke;ke|=2;var a=ay(),r=ry();Ie!==e||_e!==t?(Jc=null,Qc=an()+500,fl(e,t)):cl=ss(e,t);e:do try{if(ze!==0&&Ee!==null){t=Ee;var o=dn;t:switch(ze){case 1:ze=0,dn=null,ml(e,t,o,1);break;case 2:case 9:if(h0(o)){ze=0,dn=null,ly(t);break}t=function(){ze!==2&&ze!==9||Ie!==e||(ze=7),na(e)},o.then(t,t);break e;case 3:ze=7;break e;case 4:ze=5;break e;case 7:h0(o)?(ze=0,dn=null,ly(t)):(ze=0,dn=null,ml(e,t,o,7));break;case 5:var l=null;switch(Ee.tag){case 26:l=Ee.memoizedState;case 5:case 27:var i=Ee;if(l?Gy(l):i.stateNode.complete){ze=0,dn=null;var c=i.sibling;if(c!==null)Ee=c;else{var u=i.return;u!==null?(Ee=u,nu(u)):Ee=null}break t}}ze=0,dn=null,ml(e,t,o,5);break;case 6:ze=0,dn=null,ml(e,t,o,6);break;case 8:Zm(),rt=6;break e;default:throw Error(V(462))}}xR();break}catch(m){ty(e,m)}while(!0);return Na=Jr=null,we.H=a,we.A=r,ke=n,Ee!==null?0:(Ie=null,_e=0,bc(),rt)}function xR(){for(;Ee!==null&&!$E();)oy(Ee)}function oy(e){var t=_v(e.alternate,e,Oa);e.memoizedProps=e.pendingProps,t===null?nu(e):Ee=t}function ly(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Nv(n,t,t.pendingProps,t.type,void 0,_e);break;case 11:t=Nv(n,t,t.pendingProps,t.type.render,t.ref,_e);break;case 5:fm(t);default:Mv(n,t),t=Ee=r0(t,Oa),t=_v(n,t,Oa)}e.memoizedProps=e.pendingProps,t===null?nu(e):Ee=t}function ml(e,t,n,a){Na=Jr=null,fm(t),nl=null,js=0;var r=t.return;try{if(iR(e,r,t,n,_e)){rt=1,$c(e,Sn(n,e.current)),Ee=null;return}}catch(o){if(r!==null)throw Ee=r,o;rt=1,$c(e,Sn(n,e.current)),Ee=null;return}t.flags&32768?(Te||a===1?e=!0:cl||_e&536870912?e=!1:(cr=e=!0,(a===2||a===9||a===3||a===6)&&(a=cn.current,a!==null&&a.tag===13&&(a.flags|=16384))),sy(t,e)):nu(t)}function nu(e){var t=e;do{if(t.flags&32768){sy(t,cr);return}e=t.return;var n=dR(t.alternate,t,Oa);if(n!==null){Ee=n;return}if(t=t.sibling,t!==null){Ee=t;return}Ee=t=e}while(t!==null);rt===0&&(rt=5)}function sy(e,t){do{var n=fR(e.alternate,e);if(n!==null){n.flags&=32767,Ee=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Ee=e;return}Ee=e=n}while(e!==null);rt=6,Ee=null}function iy(e,t,n,a,r,o,l,i,c){e.cancelPendingCommit=null;do au();while(yt!==0);if(ke&6)throw Error(V(327));if(t!==null){if(t===e.current)throw Error(V(177));if(o=t.lanes|t.childLanes,o|=Uf,JE(e,n,o,l,i,c),e===Ie&&(Ee=Ie=null,_e=0),dl=t,fr=e,ka=n,qm=o,Km=r,Wv=a,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,jR(oc,function(){return my(),null})):(e.callbackNode=null,e.callbackPriority=0),a=(t.flags&13878)!==0,t.subtreeFlags&13878||a){a=we.T,we.T=null,r=Oe.p,Oe.p=2,l=ke,ke|=4;try{mR(e,t,n)}finally{ke=l,Oe.p=r,we.T=a}}yt=1,cy(),uy(),dy()}}function cy(){if(yt===1){yt=0;var e=fr,t=dl,n=(t.flags&13878)!==0;if(t.subtreeFlags&13878||n){n=we.T,we.T=null;var a=Oe.p;Oe.p=2;var r=ke;ke|=4;try{$v(t,e);var o=cp,l=Xg(e.containerInfo),i=o.focusedElem,c=o.selectionRange;if(l!==i&&i&&i.ownerDocument&&Kg(i.ownerDocument.documentElement,i)){if(c!==null&&kf(i)){var u=c.start,m=c.end;if(m===void 0&&(m=u),"selectionStart"in i)i.selectionStart=u,i.selectionEnd=Math.min(m,i.value.length);else{var d=i.ownerDocument||document,p=d&&d.defaultView||window;if(p.getSelection){var h=p.getSelection(),x=i.textContent.length,v=Math.min(c.start,x),b=c.end===void 0?v:Math.min(c.end,x);!h.extend&&v>b&&(l=b,b=v,v=l);var w=qg(i,v),g=qg(i,b);if(w&&g&&(h.rangeCount!==1||h.anchorNode!==w.node||h.anchorOffset!==w.offset||h.focusNode!==g.node||h.focusOffset!==g.offset)){var y=d.createRange();y.setStart(w.node,w.offset),h.removeAllRanges(),v>b?(h.addRange(y),h.extend(g.node,g.offset)):(y.setEnd(g.node,g.offset),h.addRange(y))}}}}for(d=[],h=i;h=h.parentNode;)h.nodeType===1&&d.push({element:h,left:h.scrollLeft,top:h.scrollTop});for(typeof i.focus=="function"&&i.focus(),i=0;i<d.length;i++){var S=d[i];S.element.scrollLeft=S.left,S.element.scrollTop=S.top}}hu=!!ip,cp=ip=null}finally{ke=r,Oe.p=a,we.T=n}}e.current=t,yt=2}}function uy(){if(yt===2){yt=0;var e=fr,t=dl,n=(t.flags&8772)!==0;if(t.subtreeFlags&8772||n){n=we.T,we.T=null;var a=Oe.p;Oe.p=2;var r=ke;ke|=4;try{Bv(e,t.alternate,t)}finally{ke=r,Oe.p=a,we.T=n}}yt=3}}function dy(){if(yt===4||yt===3){yt=0,FE();var e=fr,t=dl,n=ka,a=Wv;t.subtreeFlags&10256||t.flags&10256?yt=5:(yt=0,dl=fr=null,fy(e,e.pendingLanes));var r=e.pendingLanes;if(r===0&&(dr=null),hf(n),t=t.stateNode,rn&&typeof rn.onCommitFiberRoot=="function")try{rn.onCommitFiberRoot(ls,t,void 0,(t.current.flags&128)===128)}catch{}if(a!==null){t=we.T,r=Oe.p,Oe.p=2,we.T=null;try{for(var o=e.onRecoverableError,l=0;l<a.length;l++){var i=a[l];o(i.value,{componentStack:i.stack})}}finally{we.T=t,Oe.p=r}}ka&3&&au(),na(e),r=e.pendingLanes,n&261930&&r&42?e===Xm?Is++:(Is=0,Xm=e):Is=0,Vs(0)}}function fy(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Ss(t)))}function au(){return cy(),uy(),dy(),my()}function my(){if(yt!==5)return!1;var e=fr,t=qm;qm=0;var n=hf(ka),a=we.T,r=Oe.p;try{Oe.p=32>n?32:n,we.T=null,n=Km,Km=null;var o=fr,l=ka;if(yt=0,dl=fr=null,ka=0,ke&6)throw Error(V(331));var i=ke;if(ke|=4,Kv(o.current),Gv(o,o.current,l,n),ke=i,Vs(0,!1),rn&&typeof rn.onPostCommitFiberRoot=="function")try{rn.onPostCommitFiberRoot(ls,o)}catch{}return!0}finally{Oe.p=r,we.T=a,fy(e,t)}}function py(e,t,n){t=Sn(n,t),t=Am(e.stateNode,t,2),e=or(e,t,2),e!==null&&(is(e,2),na(e))}function Pe(e,t,n){if(e.tag===3)py(e,e,n);else for(;t!==null;){if(t.tag===3){py(t,e,n);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(dr===null||!dr.has(a))){e=Sn(n,e),n=hv(2),a=or(t,n,2),a!==null&&(wv(n,a,t,e),is(a,2),na(a));break}}t=t.return}}function Qm(e,t,n){var a=e.pingCache;if(a===null){a=e.pingCache=new wR;var r=new Set;a.set(t,r)}else r=a.get(t),r===void 0&&(r=new Set,a.set(t,r));r.has(n)||(Fm=!0,r.add(n),e=bR.bind(null,e,t,n),t.then(e,e))}function bR(e,t,n){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Ie===e&&(_e&n)===n&&(rt===4||rt===3&&(_e&62914560)===_e&&300>an()-Wc?!(ke&2)&&fl(e,0):Gm|=n,ul===_e&&(ul=0)),na(e)}function hy(e,t){t===0&&(t=cg()),e=Zr(e,t),e!==null&&(is(e,t),na(e))}function SR(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),hy(e,n)}function NR(e,t){var n=0;switch(e.tag){case 31:case 13:var a=e.stateNode,r=e.memoizedState;r!==null&&(n=r.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(V(314))}a!==null&&a.delete(t),hy(e,n)}function jR(e,t){return df(e,t)}var ru=null,pl=null,Jm=!1,ou=!1,ep=!1,pr=0;function na(e){e!==pl&&e.next===null&&(pl===null?ru=pl=e:pl=pl.next=e),ou=!0,Jm||(Jm=!0,ER())}function Vs(e,t){if(!ep&&ou){ep=!0;do for(var n=!1,a=ru;a!==null;){if(e!==0){var r=a.pendingLanes;if(r===0)var o=0;else{var l=a.suspendedLanes,i=a.pingedLanes;o=(1<<31-on(42|e)+1)-1,o&=r&~(l&~i),o=o&201326741?o&201326741|1:o?o|2:0}o!==0&&(n=!0,yy(a,o))}else o=_e,o=cc(a,a===Ie?o:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),!(o&3)||ss(a,o)||(n=!0,yy(a,o));a=a.next}while(n);ep=!1}}function CR(){wy()}function wy(){ou=Jm=!1;var e=0;pr!==0&&zR()&&(e=pr);for(var t=an(),n=null,a=ru;a!==null;){var r=a.next,o=gy(a,t);o===0?(a.next=null,n===null?ru=r:n.next=r,r===null&&(pl=n)):(n=a,(e!==0||o&3)&&(ou=!0)),a=r}yt!==0&&yt!==5||Vs(e),pr!==0&&(pr=0)}function gy(e,t){for(var n=e.suspendedLanes,a=e.pingedLanes,r=e.expirationTimes,o=e.pendingLanes&-62914561;0<o;){var l=31-on(o),i=1<<l,c=r[l];c===-1?(!(i&n)||i&a)&&(r[l]=QE(i,t)):c<=t&&(e.expiredLanes|=i),o&=~i}if(t=Ie,n=_e,n=cc(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,n===0||e===t&&(ze===2||ze===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&ff(a),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||ss(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(a!==null&&ff(a),hf(n)){case 2:case 8:n=sg;break;case 32:n=oc;break;case 268435456:n=ig;break;default:n=oc}return a=vy.bind(null,e),n=df(n,a),e.callbackPriority=t,e.callbackNode=n,t}return a!==null&&a!==null&&ff(a),e.callbackPriority=2,e.callbackNode=null,2}function vy(e,t){if(yt!==0&&yt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(au()&&e.callbackNode!==n)return null;var a=_e;return a=cc(e,e===Ie?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(Jv(e,a,t),gy(e,an()),e.callbackNode!=null&&e.callbackNode===n?vy.bind(null,e):null)}function yy(e,t){if(au())return null;Jv(e,t,!0)}function ER(){BR(function(){ke&6?df(lg,CR):wy()})}function tp(){if(pr===0){var e=Jo;e===0&&(e=lc,lc<<=1,!(lc&261888)&&(lc=256)),pr=e}return pr}function xy(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:mc(""+e)}function by(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function AR(e,t,n,a,r){if(t==="submit"&&n&&n.stateNode===r){var o=xy((r[$t]||null).action),l=a.submitter;l&&(t=(t=l[$t]||null)?xy(t.formAction):l.getAttribute("formAction"),t!==null&&(o=t,l=null));var i=new gc("action","action",null,a,r);e.push({event:i,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(pr!==0){var c=l?by(r,l):new FormData(r);bm(n,{pending:!0,data:c,method:r.method,action:o},null,c)}}else typeof o=="function"&&(i.preventDefault(),c=l?by(r,l):new FormData(r),bm(n,{pending:!0,data:c,method:r.method,action:o},o,c))},currentTarget:r}]})}}for(var np=0;np<Bf.length;np++){var ap=Bf[np],RR=ap.toLowerCase(),_R=ap[0].toUpperCase()+ap.slice(1);Hn(RR,"on"+_R)}Hn(Qg,"onAnimationEnd"),Hn(Jg,"onAnimationIteration"),Hn(e0,"onAnimationStart"),Hn("dblclick","onDoubleClick"),Hn("focusin","onFocus"),Hn("focusout","onBlur"),Hn(GA,"onTransitionRun"),Hn(YA,"onTransitionStart"),Hn(qA,"onTransitionCancel"),Hn(t0,"onTransitionEnd"),Uo("onMouseEnter",["mouseout","mouseover"]),Uo("onMouseLeave",["mouseout","mouseover"]),Uo("onPointerEnter",["pointerout","pointerover"]),Uo("onPointerLeave",["pointerout","pointerover"]),Yr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Yr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Yr("onBeforeInput",["compositionend","keypress","textInput","paste"]),Yr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Yr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Yr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var $s="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(" "),TR=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat($s));function Sy(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var a=e[n],r=a.event;a=a.listeners;e:{var o=void 0;if(t)for(var l=a.length-1;0<=l;l--){var i=a[l],c=i.instance,u=i.currentTarget;if(i=i.listener,c!==o&&r.isPropagationStopped())break e;o=i,r.currentTarget=u;try{o(r)}catch(m){xc(m)}r.currentTarget=null,o=c}else for(l=0;l<a.length;l++){if(i=a[l],c=i.instance,u=i.currentTarget,i=i.listener,c!==o&&r.isPropagationStopped())break e;o=i,r.currentTarget=u;try{o(r)}catch(m){xc(m)}r.currentTarget=null,o=c}}}}function Ae(e,t){var n=t[wf];n===void 0&&(n=t[wf]=new Set);var a=e+"__bubble";n.has(a)||(Ny(t,e,2,!1),n.add(a))}function rp(e,t,n){var a=0;t&&(a|=4),Ny(n,e,a,t)}var lu="_reactListening"+Math.random().toString(36).slice(2);function op(e){if(!e[lu]){e[lu]=!0,wg.forEach(function(n){n!=="selectionchange"&&(TR.has(n)||rp(n,!1,e),rp(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[lu]||(t[lu]=!0,rp("selectionchange",!1,t))}}function Ny(e,t,n,a){switch(Qy(t)){case 2:var r=r_;break;case 8:r=o_;break;default:r=xp}n=r.bind(null,t,n,e),r=void 0,!Cf||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(r=!0),a?r!==void 0?e.addEventListener(t,n,{capture:!0,passive:r}):e.addEventListener(t,n,!0):r!==void 0?e.addEventListener(t,n,{passive:r}):e.addEventListener(t,n,!1)}function lp(e,t,n,a,r){var o=a;if(!(t&1)&&!(t&2)&&a!==null)e:for(;;){if(a===null)return;var l=a.tag;if(l===3||l===4){var i=a.stateNode.containerInfo;if(i===r)break;if(l===4)for(l=a.return;l!==null;){var c=l.tag;if((c===3||c===4)&&l.stateNode.containerInfo===r)return;l=l.return}for(;i!==null;){if(l=zo(i),l===null)return;if(c=l.tag,c===5||c===6||c===26||c===27){a=o=l;continue e}i=i.parentNode}}a=a.return}Rg(function(){var u=o,m=Nf(n),d=[];e:{var p=n0.get(e);if(p!==void 0){var h=gc,x=e;switch(e){case"keypress":if(hc(n)===0)break e;case"keydown":case"keyup":h=NA;break;case"focusin":x="focus",h=_f;break;case"focusout":x="blur",h=_f;break;case"beforeblur":case"afterblur":h=_f;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":h=Mg;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=dA;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=EA;break;case Qg:case Jg:case e0:h=pA;break;case t0:h=RA;break;case"scroll":case"scrollend":h=cA;break;case"wheel":h=TA;break;case"copy":case"cut":case"paste":h=wA;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=Og;break;case"toggle":case"beforetoggle":h=DA}var v=(t&4)!==0,b=!v&&(e==="scroll"||e==="scrollend"),w=v?p!==null?p+"Capture":null:p;v=[];for(var g=u,y;g!==null;){var S=g;if(y=S.stateNode,S=S.tag,S!==5&&S!==26&&S!==27||y===null||w===null||(S=ds(g,w),S!=null&&v.push(Fs(g,S,y))),b)break;g=g.return}0<v.length&&(p=new h(p,x,null,n,m),d.push({event:p,listeners:v}))}}if(!(t&7)){e:{if(p=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",p&&n!==Sf&&(x=n.relatedTarget||n.fromElement)&&(zo(x)||x[Lo]))break e;if((h||p)&&(p=m.window===m?m:(p=m.ownerDocument)?p.defaultView||p.parentWindow:window,h?(x=n.relatedTarget||n.toElement,h=u,x=x?zo(x):null,x!==null&&(b=ts(x),v=x.tag,x!==b||v!==5&&v!==27&&v!==6)&&(x=null)):(h=null,x=u),h!==x)){if(v=Mg,S="onMouseLeave",w="onMouseEnter",g="mouse",(e==="pointerout"||e==="pointerover")&&(v=Og,S="onPointerLeave",w="onPointerEnter",g="pointer"),b=h==null?p:us(h),y=x==null?p:us(x),p=new v(S,g+"leave",h,n,m),p.target=b,p.relatedTarget=y,S=null,zo(m)===u&&(v=new v(w,g+"enter",x,n,m),v.target=y,v.relatedTarget=b,S=v),b=S,h&&x)t:{for(v=MR,w=h,g=x,y=0,S=w;S;S=v(S))y++;S=0;for(var E=g;E;E=v(E))S++;for(;0<y-S;)w=v(w),y--;for(;0<S-y;)g=v(g),S--;for(;y--;){if(w===g||g!==null&&w===g.alternate){v=w;break t}w=v(w),g=v(g)}v=null}else v=null;h!==null&&jy(d,p,h,v,!1),x!==null&&b!==null&&jy(d,b,x,v,!0)}}e:{if(p=u?us(u):window,h=p.nodeName&&p.nodeName.toLowerCase(),h==="select"||h==="input"&&p.type==="file")var R=Ig;else if(Ug(p))if(Vg)R=VA;else{R=HA;var N=UA}else h=p.nodeName,!h||h.toLowerCase()!=="input"||p.type!=="checkbox"&&p.type!=="radio"?u&&bf(u.elementType)&&(R=Ig):R=IA;if(R&&(R=R(e,u))){Hg(d,R,n,m);break e}N&&N(e,p,u),e==="focusout"&&u&&p.type==="number"&&u.memoizedProps.value!=null&&xf(p,"number",p.value)}switch(N=u?us(u):window,e){case"focusin":(Ug(N)||N.contentEditable==="true")&&(Go=N,Lf=u,ys=null);break;case"focusout":ys=Lf=Go=null;break;case"mousedown":zf=!0;break;case"contextmenu":case"mouseup":case"dragend":zf=!1,Zg(d,n,m);break;case"selectionchange":if(FA)break;case"keydown":case"keyup":Zg(d,n,m)}var j;if(Mf)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 Fo?Pg(e,n)&&(T="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(T="onCompositionStart");T&&(kg&&n.locale!=="ko"&&(Fo||T!=="onCompositionStart"?T==="onCompositionEnd"&&Fo&&(j=_g()):(Qa=m,Ef="value"in Qa?Qa.value:Qa.textContent,Fo=!0)),N=su(u,T),0<N.length&&(T=new Dg(T,e,null,n,m),d.push({event:T,listeners:N}),j?T.data=j:(j=Bg(n),j!==null&&(T.data=j)))),(j=kA?LA(e,n):zA(e,n))&&(T=su(u,"onBeforeInput"),0<T.length&&(N=new Dg("onBeforeInput","beforeinput",null,n,m),d.push({event:N,listeners:T}),N.data=j)),AR(d,e,u,n,m)}Sy(d,t)})}function Fs(e,t,n){return{instance:e,listener:t,currentTarget:n}}function su(e,t){for(var n=t+"Capture",a=[];e!==null;){var r=e,o=r.stateNode;if(r=r.tag,r!==5&&r!==26&&r!==27||o===null||(r=ds(e,n),r!=null&&a.unshift(Fs(e,r,o)),r=ds(e,t),r!=null&&a.push(Fs(e,r,o))),e.tag===3)return a;e=e.return}return[]}function MR(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function jy(e,t,n,a,r){for(var o=t._reactName,l=[];n!==null&&n!==a;){var i=n,c=i.alternate,u=i.stateNode;if(i=i.tag,c!==null&&c===a)break;i!==5&&i!==26&&i!==27||u===null||(c=u,r?(u=ds(n,o),u!=null&&l.unshift(Fs(n,u,c))):r||(u=ds(n,o),u!=null&&l.push(Fs(n,u,c)))),n=n.return}l.length!==0&&e.push({event:t,listeners:l})}var DR=/\r\n?/g,OR=/\u0000|\uFFFD/g;function Cy(e){return(typeof e=="string"?e:""+e).replace(DR,`
`).replace(OR,"")}function Ey(e,t){return t=Cy(t),Cy(e)===t}function Ue(e,t,n,a,r,o){switch(n){case"children":typeof a=="string"?t==="body"||t==="textarea"&&a===""||Io(e,a):(typeof a=="number"||typeof a=="bigint")&&t!=="body"&&Io(e,""+a);break;case"className":dc(e,"class",a);break;case"tabIndex":dc(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":dc(e,n,a);break;case"style":Eg(e,a,o);break;case"data":if(t!=="object"){dc(e,"data",a);break}case"src":case"href":if(a===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(a==null||typeof a=="function"||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(n);break}a=mc(""+a),e.setAttribute(n,a);break;case"action":case"formAction":if(typeof a=="function"){e.setAttribute(n,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof o=="function"&&(n==="formAction"?(t!=="input"&&Ue(e,t,"name",r.name,r,null),Ue(e,t,"formEncType",r.formEncType,r,null),Ue(e,t,"formMethod",r.formMethod,r,null),Ue(e,t,"formTarget",r.formTarget,r,null)):(Ue(e,t,"encType",r.encType,r,null),Ue(e,t,"method",r.method,r,null),Ue(e,t,"target",r.target,r,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(n);break}a=mc(""+a),e.setAttribute(n,a);break;case"onClick":a!=null&&(e.onclick=ya);break;case"onScroll":a!=null&&Ae("scroll",e);break;case"onScrollEnd":a!=null&&Ae("scrollend",e);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(V(61));if(n=a.__html,n!=null){if(r.children!=null)throw Error(V(60));e.innerHTML=n}}break;case"multiple":e.multiple=a&&typeof a!="function"&&typeof a!="symbol";break;case"muted":e.muted=a&&typeof a!="function"&&typeof a!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(a==null||typeof a=="function"||typeof a=="boolean"||typeof a=="symbol"){e.removeAttribute("xlink:href");break}n=mc(""+a),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(n,""+a):e.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":a&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":a===!0?e.setAttribute(n,""):a!==!1&&a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(n,a):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":a!=null&&typeof a!="function"&&typeof a!="symbol"&&!isNaN(a)&&1<=a?e.setAttribute(n,a):e.removeAttribute(n);break;case"rowSpan":case"start":a==null||typeof a=="function"||typeof a=="symbol"||isNaN(a)?e.removeAttribute(n):e.setAttribute(n,a);break;case"popover":Ae("beforetoggle",e),Ae("toggle",e),uc(e,"popover",a);break;case"xlinkActuate":va(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":va(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":va(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":va(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":va(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":va(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":va(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":va(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":va(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":uc(e,"is",a);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=sA.get(n)||n,uc(e,n,a))}}function sp(e,t,n,a,r,o){switch(n){case"style":Eg(e,a,o);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(V(61));if(n=a.__html,n!=null){if(r.children!=null)throw Error(V(60));e.innerHTML=n}}break;case"children":typeof a=="string"?Io(e,a):(typeof a=="number"||typeof a=="bigint")&&Io(e,""+a);break;case"onScroll":a!=null&&Ae("scroll",e);break;case"onScrollEnd":a!=null&&Ae("scrollend",e);break;case"onClick":a!=null&&(e.onclick=ya);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!gg.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(r=n.endsWith("Capture"),t=n.slice(2,r?n.length-7:void 0),o=e[$t]||null,o=o!=null?o[n]:null,typeof o=="function"&&e.removeEventListener(t,o,r),typeof a=="function")){typeof o!="function"&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,a,r);break e}n in e?e[n]=a:a===!0?e.setAttribute(n,""):uc(e,n,a)}}}function Mt(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ae("error",e),Ae("load",e);var a=!1,r=!1,o;for(o in n)if(n.hasOwnProperty(o)){var l=n[o];if(l!=null)switch(o){case"src":a=!0;break;case"srcSet":r=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(V(137,t));default:Ue(e,t,o,l,n,null)}}r&&Ue(e,t,"srcSet",n.srcSet,n,null),a&&Ue(e,t,"src",n.src,n,null);return;case"input":Ae("invalid",e);var i=o=l=r=null,c=null,u=null;for(a in n)if(n.hasOwnProperty(a)){var m=n[a];if(m!=null)switch(a){case"name":r=m;break;case"type":l=m;break;case"checked":c=m;break;case"defaultChecked":u=m;break;case"value":o=m;break;case"defaultValue":i=m;break;case"children":case"dangerouslySetInnerHTML":if(m!=null)throw Error(V(137,t));break;default:Ue(e,t,a,m,n,null)}}Sg(e,o,i,c,u,l,r,!1);return;case"select":Ae("invalid",e),a=l=o=null;for(r in n)if(n.hasOwnProperty(r)&&(i=n[r],i!=null))switch(r){case"value":o=i;break;case"defaultValue":l=i;break;case"multiple":a=i;default:Ue(e,t,r,i,n,null)}t=o,n=l,e.multiple=!!a,t!=null?Ho(e,!!a,t,!1):n!=null&&Ho(e,!!a,n,!0);return;case"textarea":Ae("invalid",e),o=r=a=null;for(l in n)if(n.hasOwnProperty(l)&&(i=n[l],i!=null))switch(l){case"value":a=i;break;case"defaultValue":r=i;break;case"children":o=i;break;case"dangerouslySetInnerHTML":if(i!=null)throw Error(V(91));break;default:Ue(e,t,l,i,n,null)}jg(e,a,r,o);return;case"option":for(c in n)if(n.hasOwnProperty(c)&&(a=n[c],a!=null))switch(c){case"selected":e.selected=a&&typeof a!="function"&&typeof a!="symbol";break;default:Ue(e,t,c,a,n,null)}return;case"dialog":Ae("beforetoggle",e),Ae("toggle",e),Ae("cancel",e),Ae("close",e);break;case"iframe":case"object":Ae("load",e);break;case"video":case"audio":for(a=0;a<$s.length;a++)Ae($s[a],e);break;case"image":Ae("error",e),Ae("load",e);break;case"details":Ae("toggle",e);break;case"embed":case"source":case"link":Ae("error",e),Ae("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(u in n)if(n.hasOwnProperty(u)&&(a=n[u],a!=null))switch(u){case"children":case"dangerouslySetInnerHTML":throw Error(V(137,t));default:Ue(e,t,u,a,n,null)}return;default:if(bf(t)){for(m in n)n.hasOwnProperty(m)&&(a=n[m],a!==void 0&&sp(e,t,m,a,n,void 0));return}}for(i in n)n.hasOwnProperty(i)&&(a=n[i],a!=null&&Ue(e,t,i,a,n,null))}function kR(e,t,n,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var r=null,o=null,l=null,i=null,c=null,u=null,m=null;for(h in n){var d=n[h];if(n.hasOwnProperty(h)&&d!=null)switch(h){case"checked":break;case"value":break;case"defaultValue":c=d;default:a.hasOwnProperty(h)||Ue(e,t,h,null,a,d)}}for(var p in a){var h=a[p];if(d=n[p],a.hasOwnProperty(p)&&(h!=null||d!=null))switch(p){case"type":o=h;break;case"name":r=h;break;case"checked":u=h;break;case"defaultChecked":m=h;break;case"value":l=h;break;case"defaultValue":i=h;break;case"children":case"dangerouslySetInnerHTML":if(h!=null)throw Error(V(137,t));break;default:h!==d&&Ue(e,t,p,h,a,d)}}yf(e,l,i,c,u,m,o,r);return;case"select":h=l=i=p=null;for(o in n)if(c=n[o],n.hasOwnProperty(o)&&c!=null)switch(o){case"value":break;case"multiple":h=c;default:a.hasOwnProperty(o)||Ue(e,t,o,null,a,c)}for(r in a)if(o=a[r],c=n[r],a.hasOwnProperty(r)&&(o!=null||c!=null))switch(r){case"value":p=o;break;case"defaultValue":i=o;break;case"multiple":l=o;default:o!==c&&Ue(e,t,r,o,a,c)}t=i,n=l,a=h,p!=null?Ho(e,!!n,p,!1):!!a!=!!n&&(t!=null?Ho(e,!!n,t,!0):Ho(e,!!n,n?[]:"",!1));return;case"textarea":h=p=null;for(i in n)if(r=n[i],n.hasOwnProperty(i)&&r!=null&&!a.hasOwnProperty(i))switch(i){case"value":break;case"children":break;default:Ue(e,t,i,null,a,r)}for(l in a)if(r=a[l],o=n[l],a.hasOwnProperty(l)&&(r!=null||o!=null))switch(l){case"value":p=r;break;case"defaultValue":h=r;break;case"children":break;case"dangerouslySetInnerHTML":if(r!=null)throw Error(V(91));break;default:r!==o&&Ue(e,t,l,r,a,o)}Ng(e,p,h);return;case"option":for(var x in n)if(p=n[x],n.hasOwnProperty(x)&&p!=null&&!a.hasOwnProperty(x))switch(x){case"selected":e.selected=!1;break;default:Ue(e,t,x,null,a,p)}for(c in a)if(p=a[c],h=n[c],a.hasOwnProperty(c)&&p!==h&&(p!=null||h!=null))switch(c){case"selected":e.selected=p&&typeof p!="function"&&typeof p!="symbol";break;default:Ue(e,t,c,p,a,h)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!a.hasOwnProperty(v)&&Ue(e,t,v,null,a,p);for(u in a)if(p=a[u],h=n[u],a.hasOwnProperty(u)&&p!==h&&(p!=null||h!=null))switch(u){case"children":case"dangerouslySetInnerHTML":if(p!=null)throw Error(V(137,t));break;default:Ue(e,t,u,p,a,h)}return;default:if(bf(t)){for(var b in n)p=n[b],n.hasOwnProperty(b)&&p!==void 0&&!a.hasOwnProperty(b)&&sp(e,t,b,void 0,a,p);for(m in a)p=a[m],h=n[m],!a.hasOwnProperty(m)||p===h||p===void 0&&h===void 0||sp(e,t,m,p,a,h);return}}for(var w in n)p=n[w],n.hasOwnProperty(w)&&p!=null&&!a.hasOwnProperty(w)&&Ue(e,t,w,null,a,p);for(d in a)p=a[d],h=n[d],!a.hasOwnProperty(d)||p===h||p==null&&h==null||Ue(e,t,d,p,a,h)}function Ay(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function LR(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,n=performance.getEntriesByType("resource"),a=0;a<n.length;a++){var r=n[a],o=r.transferSize,l=r.initiatorType,i=r.duration;if(o&&i&&Ay(l)){for(l=0,i=r.responseEnd,a+=1;a<n.length;a++){var c=n[a],u=c.startTime;if(u>i)break;var m=c.transferSize,d=c.initiatorType;m&&Ay(d)&&(c=c.responseEnd,l+=m*(c<i?1:(i-u)/(c-u)))}if(--a,t+=8*(o+l)/(r.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var ip=null,cp=null;function iu(e){return e.nodeType===9?e:e.ownerDocument}function Ry(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function _y(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function up(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var dp=null;function zR(){var e=window.event;return e&&e.type==="popstate"?e===dp?!1:(dp=e,!0):(dp=null,!1)}var Ty=typeof setTimeout=="function"?setTimeout:void 0,PR=typeof clearTimeout=="function"?clearTimeout:void 0,My=typeof Promise=="function"?Promise:void 0,BR=typeof queueMicrotask=="function"?queueMicrotask:typeof My<"u"?function(e){return My.resolve(null).then(e).catch(UR)}:Ty;function UR(e){setTimeout(function(){throw e})}function hr(e){return e==="head"}function Dy(e,t){var n=t,a=0;do{var r=n.nextSibling;if(e.removeChild(n),r&&r.nodeType===8)if(n=r.data,n==="/$"||n==="/&"){if(a===0){e.removeChild(r),vl(t);return}a--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")a++;else if(n==="html")Gs(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,Gs(n);for(var o=n.firstChild;o;){var l=o.nextSibling,i=o.nodeName;o[cs]||i==="SCRIPT"||i==="STYLE"||i==="LINK"&&o.rel.toLowerCase()==="stylesheet"||n.removeChild(o),o=l}}else n==="body"&&Gs(e.ownerDocument.body);n=r}while(n);vl(t)}function Oy(e,t){var n=e;e=0;do{var a=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",n.getAttribute("style")===""&&n.removeAttribute("style")):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),a&&a.nodeType===8)if(n=a.data,n==="/$"){if(e===0)break;e--}else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||e++;n=a}while(n)}function fp(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":fp(n),gf(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function HR(e,t,n,a){for(;e.nodeType===1;){var r=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!a&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(a){if(!e[cs])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(o=e.getAttribute("rel"),o==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(o!==r.rel||e.getAttribute("href")!==(r.href==null||r.href===""?null:r.href)||e.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin)||e.getAttribute("title")!==(r.title==null?null:r.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(o=e.getAttribute("src"),(o!==(r.src==null?null:r.src)||e.getAttribute("type")!==(r.type==null?null:r.type)||e.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin))&&o&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var o=r.name==null?null:""+r.name;if(r.type==="hidden"&&e.getAttribute("name")===o)return e}else return e;if(e=An(e.nextSibling),e===null)break}return null}function IR(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=An(e.nextSibling),e===null))return null;return e}function ky(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=An(e.nextSibling),e===null))return null;return e}function mp(e){return e.data==="$?"||e.data==="$~"}function pp(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function VR(e,t){var n=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||n.readyState!=="loading")t();else{var a=function(){t(),n.removeEventListener("DOMContentLoaded",a)};n.addEventListener("DOMContentLoaded",a),e._reactRetry=a}}function An(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var hp=null;function Ly(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return An(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function zy(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"){if(t===0)return e;t--}else n!=="/$"&&n!=="/&"||t++}e=e.previousSibling}return null}function Py(e,t,n){switch(t=iu(n),e){case"html":if(e=t.documentElement,!e)throw Error(V(452));return e;case"head":if(e=t.head,!e)throw Error(V(453));return e;case"body":if(e=t.body,!e)throw Error(V(454));return e;default:throw Error(V(451))}}function Gs(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);gf(e)}var Rn=new Map,By=new Set;function cu(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var La=Oe.d;Oe.d={f:$R,r:FR,D:GR,C:YR,L:qR,m:KR,X:ZR,S:XR,M:WR};function $R(){var e=La.f(),t=eu();return e||t}function FR(e){var t=Po(e);t!==null&&t.tag===5&&t.type==="form"?tv(t):La.r(e)}var hl=typeof document>"u"?null:document;function Uy(e,t,n){var a=hl;if(a&&typeof t=="string"&&t){var r=xn(t);r='link[rel="'+e+'"][href="'+r+'"]',typeof n=="string"&&(r+='[crossorigin="'+n+'"]'),By.has(r)||(By.add(r),e={rel:e,crossOrigin:n,href:t},a.querySelector(r)===null&&(t=a.createElement("link"),Mt(t,"link",e),jt(t),a.head.appendChild(t)))}}function GR(e){La.D(e),Uy("dns-prefetch",e,null)}function YR(e,t){La.C(e,t),Uy("preconnect",e,t)}function qR(e,t,n){La.L(e,t,n);var a=hl;if(a&&e&&t){var r='link[rel="preload"][as="'+xn(t)+'"]';t==="image"&&n&&n.imageSrcSet?(r+='[imagesrcset="'+xn(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(r+='[imagesizes="'+xn(n.imageSizes)+'"]')):r+='[href="'+xn(e)+'"]';var o=r;switch(t){case"style":o=wl(e);break;case"script":o=gl(e)}Rn.has(o)||(e=Ke({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),Rn.set(o,e),a.querySelector(r)!==null||t==="style"&&a.querySelector(Ys(o))||t==="script"&&a.querySelector(qs(o))||(t=a.createElement("link"),Mt(t,"link",e),jt(t),a.head.appendChild(t)))}}function KR(e,t){La.m(e,t);var n=hl;if(n&&e){var a=t&&typeof t.as=="string"?t.as:"script",r='link[rel="modulepreload"][as="'+xn(a)+'"][href="'+xn(e)+'"]',o=r;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":o=gl(e)}if(!Rn.has(o)&&(e=Ke({rel:"modulepreload",href:e},t),Rn.set(o,e),n.querySelector(r)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(qs(o)))return}a=n.createElement("link"),Mt(a,"link",e),jt(a),n.head.appendChild(a)}}}function XR(e,t,n){La.S(e,t,n);var a=hl;if(a&&e){var r=Bo(a).hoistableStyles,o=wl(e);t=t||"default";var l=r.get(o);if(!l){var i={loading:0,preload:null};if(l=a.querySelector(Ys(o)))i.loading=5;else{e=Ke({rel:"stylesheet",href:e,"data-precedence":t},n),(n=Rn.get(o))&&wp(e,n);var c=l=a.createElement("link");jt(c),Mt(c,"link",e),c._p=new Promise(function(u,m){c.onload=u,c.onerror=m}),c.addEventListener("load",function(){i.loading|=1}),c.addEventListener("error",function(){i.loading|=2}),i.loading|=4,uu(l,t,a)}l={type:"stylesheet",instance:l,count:1,state:i},r.set(o,l)}}}function ZR(e,t){La.X(e,t);var n=hl;if(n&&e){var a=Bo(n).hoistableScripts,r=gl(e),o=a.get(r);o||(o=n.querySelector(qs(r)),o||(e=Ke({src:e,async:!0},t),(t=Rn.get(r))&&gp(e,t),o=n.createElement("script"),jt(o),Mt(o,"link",e),n.head.appendChild(o)),o={type:"script",instance:o,count:1,state:null},a.set(r,o))}}function WR(e,t){La.M(e,t);var n=hl;if(n&&e){var a=Bo(n).hoistableScripts,r=gl(e),o=a.get(r);o||(o=n.querySelector(qs(r)),o||(e=Ke({src:e,async:!0,type:"module"},t),(t=Rn.get(r))&&gp(e,t),o=n.createElement("script"),jt(o),Mt(o,"link",e),n.head.appendChild(o)),o={type:"script",instance:o,count:1,state:null},a.set(r,o))}}function Hy(e,t,n,a){var r=(r=Xa.current)?cu(r):null;if(!r)throw Error(V(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=wl(n.href),n=Bo(r).hoistableStyles,a=n.get(t),a||(a={type:"style",instance:null,count:0,state:null},n.set(t,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=wl(n.href);var o=Bo(r).hoistableStyles,l=o.get(e);if(l||(r=r.ownerDocument||r,l={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},o.set(e,l),(o=r.querySelector(Ys(e)))&&!o._p&&(l.instance=o,l.state.loading=5),Rn.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Rn.set(e,n),o||QR(r,e,n,l.state))),t&&a===null)throw Error(V(528,""));return l}if(t&&a!==null)throw Error(V(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=gl(n),n=Bo(r).hoistableScripts,a=n.get(t),a||(a={type:"script",instance:null,count:0,state:null},n.set(t,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(V(444,e))}}function wl(e){return'href="'+xn(e)+'"'}function Ys(e){return'link[rel="stylesheet"]['+e+"]"}function Iy(e){return Ke({},e,{"data-precedence":e.precedence,precedence:null})}function QR(e,t,n,a){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?a.loading=1:(t=e.createElement("link"),a.preload=t,t.addEventListener("load",function(){return a.loading|=1}),t.addEventListener("error",function(){return a.loading|=2}),Mt(t,"link",n),jt(t),e.head.appendChild(t))}function gl(e){return'[src="'+xn(e)+'"]'}function qs(e){return"script[async]"+e}function Vy(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+xn(n.href)+'"]');if(a)return t.instance=a,jt(a),a;var r=Ke({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),jt(a),Mt(a,"style",r),uu(a,n.precedence,e),t.instance=a;case"stylesheet":r=wl(n.href);var o=e.querySelector(Ys(r));if(o)return t.state.loading|=4,t.instance=o,jt(o),o;a=Iy(n),(r=Rn.get(r))&&wp(a,r),o=(e.ownerDocument||e).createElement("link"),jt(o);var l=o;return l._p=new Promise(function(i,c){l.onload=i,l.onerror=c}),Mt(o,"link",a),t.state.loading|=4,uu(o,n.precedence,e),t.instance=o;case"script":return o=gl(n.src),(r=e.querySelector(qs(o)))?(t.instance=r,jt(r),r):(a=n,(r=Rn.get(o))&&(a=Ke({},n),gp(a,r)),e=e.ownerDocument||e,r=e.createElement("script"),jt(r),Mt(r,"link",a),e.head.appendChild(r),t.instance=r);case"void":return null;default:throw Error(V(443,t.type))}else t.type==="stylesheet"&&!(t.state.loading&4)&&(a=t.instance,t.state.loading|=4,uu(a,n.precedence,e));return t.instance}function uu(e,t,n){for(var a=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),r=a.length?a[a.length-1]:null,o=r,l=0;l<a.length;l++){var i=a[l];if(i.dataset.precedence===t)o=i;else if(o!==r)break}o?o.parentNode.insertBefore(e,o.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function wp(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function gp(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var du=null;function $y(e,t,n){if(du===null){var a=new Map,r=du=new Map;r.set(n,a)}else r=du,a=r.get(n),a||(a=new Map,r.set(n,a));if(a.has(e))return a;for(a.set(e,null),n=n.getElementsByTagName(e),r=0;r<n.length;r++){var o=n[r];if(!(o[cs]||o[At]||e==="link"&&o.getAttribute("rel")==="stylesheet")&&o.namespaceURI!=="http://www.w3.org/2000/svg"){var l=o.getAttribute(t)||"";l=e+l;var i=a.get(l);i?i.push(o):a.set(l,[o])}}return a}function Fy(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function JR(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function Gy(e){return!(e.type==="stylesheet"&&!(e.state.loading&3))}function e_(e,t,n,a){if(n.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&!(n.state.loading&4)){if(n.instance===null){var r=wl(a.href),o=t.querySelector(Ys(r));if(o){t=o._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=fu.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=o,jt(o);return}o=t.ownerDocument||t,a=Iy(a),(r=Rn.get(r))&&wp(a,r),o=o.createElement("link"),jt(o);var l=o;l._p=new Promise(function(i,c){l.onload=i,l.onerror=c}),Mt(o,"link",a),n.instance=o}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=fu.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var vp=0;function t_(e,t){return e.stylesheets&&e.count===0&&pu(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var a=setTimeout(function(){if(e.stylesheets&&pu(e,e.stylesheets),e.unsuspend){var o=e.unsuspend;e.unsuspend=null,o()}},6e4+t);0<e.imgBytes&&vp===0&&(vp=62500*LR());var r=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&pu(e,e.stylesheets),e.unsuspend)){var o=e.unsuspend;e.unsuspend=null,o()}},(e.imgBytes>vp?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(r)}}:null}function fu(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)pu(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var mu=null;function pu(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,mu=new Map,t.forEach(n_,e),mu=null,fu.call(e))}function n_(e,t){if(!(t.state.loading&4)){var n=mu.get(e);if(n)var a=n.get(null);else{n=new Map,mu.set(e,n);for(var r=e.querySelectorAll("link[data-precedence],style[data-precedence]"),o=0;o<r.length;o++){var l=r[o];(l.nodeName==="LINK"||l.getAttribute("media")!=="not all")&&(n.set(l.dataset.precedence,l),a=l)}a&&n.set(null,a)}r=t.instance,l=r.getAttribute("data-precedence"),o=n.get(l)||a,o===a&&n.set(null,r),n.set(l,r),this.count++,a=fu.bind(this),r.addEventListener("load",a),r.addEventListener("error",a),o?o.parentNode.insertBefore(r,o.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(r,e.firstChild)),t.state.loading|=4}}var Ks={$$typeof:ga,Provider:null,Consumer:null,_currentValue:$r,_currentValue2:$r,_threadCount:0};function a_(e,t,n,a,r,o,l,i,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=mf(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=mf(0),this.hiddenUpdates=mf(null),this.identifierPrefix=a,this.onUncaughtError=r,this.onCaughtError=o,this.onRecoverableError=l,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function Yy(e,t,n,a,r,o,l,i,c,u,m,d){return e=new a_(e,t,n,l,c,u,m,d,i),t=1,o===!0&&(t|=24),o=sn(3,null,null,t),e.current=o,o.stateNode=e,t=Wf(),t.refCount++,e.pooledCache=t,t.refCount++,o.memoizedState={element:a,isDehydrated:n,cache:t},tm(o),e}function qy(e){return e?(e=Ko,e):Ko}function Ky(e,t,n,a,r,o){r=qy(r),a.context===null?a.context=r:a.pendingContext=r,a=rr(t),a.payload={element:n},o=o===void 0?null:o,o!==null&&(a.callback=o),n=or(e,a,t),n!==null&&(Xt(n,e,t),Es(n,e,t))}function Xy(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function yp(e,t){Xy(e,t),(e=e.alternate)&&Xy(e,t)}function Zy(e){if(e.tag===13||e.tag===31){var t=Zr(e,67108864);t!==null&&Xt(t,e,67108864),yp(e,67108864)}}function Wy(e){if(e.tag===13||e.tag===31){var t=mn();t=pf(t);var n=Zr(e,t);n!==null&&Xt(n,e,t),yp(e,t)}}var hu=!0;function r_(e,t,n,a){var r=we.T;we.T=null;var o=Oe.p;try{Oe.p=2,xp(e,t,n,a)}finally{Oe.p=o,we.T=r}}function o_(e,t,n,a){var r=we.T;we.T=null;var o=Oe.p;try{Oe.p=8,xp(e,t,n,a)}finally{Oe.p=o,we.T=r}}function xp(e,t,n,a){if(hu){var r=bp(a);if(r===null)lp(e,t,a,wu,n),Jy(e,a);else if(s_(r,e,t,n,a))a.stopPropagation();else if(Jy(e,a),t&4&&-1<l_.indexOf(e)){for(;r!==null;){var o=Po(r);if(o!==null)switch(o.tag){case 3:if(o=o.stateNode,o.current.memoizedState.isDehydrated){var l=Gr(o.pendingLanes);if(l!==0){var i=o;for(i.pendingLanes|=2,i.entangledLanes|=2;l;){var c=1<<31-on(l);i.entanglements[1]|=c,l&=~c}na(o),!(ke&6)&&(Qc=an()+500,Vs(0))}}break;case 31:case 13:i=Zr(o,2),i!==null&&Xt(i,o,2),eu(),yp(o,2)}if(o=bp(a),o===null&&lp(e,t,a,wu,n),o===r)break;r=o}r!==null&&a.stopPropagation()}else lp(e,t,a,null,n)}}function bp(e){return e=Nf(e),Sp(e)}var wu=null;function Sp(e){if(wu=null,e=zo(e),e!==null){var t=ts(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=Ww(t),e!==null)return e;e=null}else if(n===31){if(e=Qw(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 wu=e,null}function Qy(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(GE()){case lg:return 2;case sg:return 8;case oc:case YE:return 32;case ig:return 268435456;default:return 32}default:return 32}}var Np=!1,wr=null,gr=null,vr=null,Xs=new Map,Zs=new Map,yr=[],l_="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function Jy(e,t){switch(e){case"focusin":case"focusout":wr=null;break;case"dragenter":case"dragleave":gr=null;break;case"mouseover":case"mouseout":vr=null;break;case"pointerover":case"pointerout":Xs.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Zs.delete(t.pointerId)}}function Ws(e,t,n,a,r,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:a,nativeEvent:o,targetContainers:[r]},t!==null&&(t=Po(t),t!==null&&Zy(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,r!==null&&t.indexOf(r)===-1&&t.push(r),e)}function s_(e,t,n,a,r){switch(t){case"focusin":return wr=Ws(wr,e,t,n,a,r),!0;case"dragenter":return gr=Ws(gr,e,t,n,a,r),!0;case"mouseover":return vr=Ws(vr,e,t,n,a,r),!0;case"pointerover":var o=r.pointerId;return Xs.set(o,Ws(Xs.get(o)||null,e,t,n,a,r)),!0;case"gotpointercapture":return o=r.pointerId,Zs.set(o,Ws(Zs.get(o)||null,e,t,n,a,r)),!0}return!1}function ex(e){var t=zo(e.target);if(t!==null){var n=ts(t);if(n!==null){if(t=n.tag,t===13){if(t=Ww(n),t!==null){e.blockedOn=t,pg(e.priority,function(){Wy(n)});return}}else if(t===31){if(t=Qw(n),t!==null){e.blockedOn=t,pg(e.priority,function(){Wy(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 gu(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=bp(e.nativeEvent);if(n===null){n=e.nativeEvent;var a=new n.constructor(n.type,n);Sf=a,n.target.dispatchEvent(a),Sf=null}else return t=Po(n),t!==null&&Zy(t),e.blockedOn=n,!1;t.shift()}return!0}function tx(e,t,n){gu(e)&&n.delete(t)}function i_(){Np=!1,wr!==null&&gu(wr)&&(wr=null),gr!==null&&gu(gr)&&(gr=null),vr!==null&&gu(vr)&&(vr=null),Xs.forEach(tx),Zs.forEach(tx)}function vu(e,t){e.blockedOn===t&&(e.blockedOn=null,Np||(Np=!0,vt.unstable_scheduleCallback(vt.unstable_NormalPriority,i_)))}var yu=null;function nx(e){yu!==e&&(yu=e,vt.unstable_scheduleCallback(vt.unstable_NormalPriority,function(){yu===e&&(yu=null);for(var t=0;t<e.length;t+=3){var n=e[t],a=e[t+1],r=e[t+2];if(typeof a!="function"){if(Sp(a||n)===null)continue;break}var o=Po(n);o!==null&&(e.splice(t,3),t-=3,bm(o,{pending:!0,data:r,method:n.method,action:a},a,r))}}))}function vl(e){function t(c){return vu(c,e)}wr!==null&&vu(wr,e),gr!==null&&vu(gr,e),vr!==null&&vu(vr,e),Xs.forEach(t),Zs.forEach(t);for(var n=0;n<yr.length;n++){var a=yr[n];a.blockedOn===e&&(a.blockedOn=null)}for(;0<yr.length&&(n=yr[0],n.blockedOn===null);)ex(n),n.blockedOn===null&&yr.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(a=0;a<n.length;a+=3){var r=n[a],o=n[a+1],l=r[$t]||null;if(typeof o=="function")l||nx(n);else if(l){var i=null;if(o&&o.hasAttribute("formAction")){if(r=o,l=o[$t]||null)i=l.formAction;else if(Sp(r)!==null)continue}else i=l.action;typeof i=="function"?n[a+1]=i:(n.splice(a,3),a-=3),nx(n)}}}function ax(){function e(o){o.canIntercept&&o.info==="react-transition"&&o.intercept({handler:function(){return new Promise(function(l){return r=l})},focusReset:"manual",scroll:"manual"})}function t(){r!==null&&(r(),r=null),a||setTimeout(n,20)}function n(){if(!a&&!navigation.transition){var o=navigation.currentEntry;o&&o.url!=null&&navigation.navigate(o.url,{state:o.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var a=!1,r=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){a=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),r!==null&&(r(),r=null)}}}function jp(e){this._internalRoot=e}xu.prototype.render=jp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(V(409));var n=t.current,a=mn();Ky(n,a,e,t,null,null)},xu.prototype.unmount=jp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Ky(e.current,2,null,e,null,null),eu(),t[Lo]=null}};function xu(e){this._internalRoot=e}xu.prototype.unstable_scheduleHydration=function(e){if(e){var t=mg();e={blockedOn:null,target:e,priority:t};for(var n=0;n<yr.length&&t!==0&&t<yr[n].priority;n++);yr.splice(n,0,e),n===0&&ex(e)}};var rx=Xw.version;if(rx!=="19.2.4")throw Error(V(527,rx,"19.2.4"));Oe.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(V(188)):(e=Object.keys(e).join(","),Error(V(268,e)));return e=BE(t),e=e!==null?eg(e):null,e=e===null?null:e.stateNode,e};var c_={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:we,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var bu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!bu.isDisabled&&bu.supportsFiber)try{ls=bu.inject(c_),rn=bu}catch{}}Ji.createRoot=function(e,t){if(!Zw(e))throw Error(V(299));var n=!1,a="",r=dv,o=fv,l=mv;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(a=t.identifierPrefix),t.onUncaughtError!==void 0&&(r=t.onUncaughtError),t.onCaughtError!==void 0&&(o=t.onCaughtError),t.onRecoverableError!==void 0&&(l=t.onRecoverableError)),t=Yy(e,1,!1,null,null,n,a,null,r,o,l,ax),e[Lo]=t.current,op(e),new jp(t)},Ji.hydrateRoot=function(e,t,n){if(!Zw(e))throw Error(V(299));var a=!1,r="",o=dv,l=fv,i=mv,c=null;return n!=null&&(n.unstable_strictMode===!0&&(a=!0),n.identifierPrefix!==void 0&&(r=n.identifierPrefix),n.onUncaughtError!==void 0&&(o=n.onUncaughtError),n.onCaughtError!==void 0&&(l=n.onCaughtError),n.onRecoverableError!==void 0&&(i=n.onRecoverableError),n.formState!==void 0&&(c=n.formState)),t=Yy(e,1,!0,t,n??null,a,r,c,o,l,i,ax),t.context=qy(null),n=t.current,a=mn(),a=pf(a),r=rr(a),r.callback=null,or(n,r,a),n=a,t.current.lanes=n,is(t,n),na(t),e[Lo]=t.current,op(e),new xu(t)},Ji.version="19.2.4";function ox(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(ox)}catch(e){console.error(e)}}ox(),Vw.exports=Ji;var u_=Vw.exports;/**
 * react-router v7.13.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
 */var lx=e=>{throw TypeError(e)},d_=(e,t,n)=>t.has(e)||lx("Cannot "+n),Cp=(e,t,n)=>(d_(e,t,"read from private field"),n?n.call(e):t.get(e)),f_=(e,t,n)=>t.has(e)?lx("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),sx="popstate";function m_(e={}){function t(r,o){let{pathname:l="/",search:i="",hash:c=""}=za(r.location.hash.substring(1));return!l.startsWith("/")&&!l.startsWith(".")&&(l="/"+l),Qs("",{pathname:l,search:i,hash:c},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function n(r,o){let l=r.document.querySelector("base"),i="";if(l&&l.getAttribute("href")){let c=r.location.href,u=c.indexOf("#");i=u===-1?c:c.slice(0,u)}return i+"#"+(typeof o=="string"?o:aa(o))}function a(r,o){ct(r.pathname.charAt(0)==="/",`relative pathnames are not supported in hash history.push(${JSON.stringify(o)})`)}return h_(t,n,a,e)}function je(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function ct(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function p_(){return Math.random().toString(36).substring(2,10)}function ix(e,t){return{usr:e.state,key:e.key,idx:t}}function Qs(e,t,n=null,a){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?za(t):t,state:n,key:t&&t.key||a||p_()}}function aa({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function za(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let a=e.indexOf("?");a>=0&&(t.search=e.substring(a),e=e.substring(0,a)),e&&(t.pathname=e)}return t}function h_(e,t,n,a={}){let{window:r=document.defaultView,v5Compat:o=!1}=a,l=r.history,i="POP",c=null,u=m();u==null&&(u=0,l.replaceState({...l.state,idx:u},""));function m(){return(l.state||{idx:null}).idx}function d(){i="POP";let b=m(),w=b==null?null:b-u;u=b,c&&c({action:i,location:v.location,delta:w})}function p(b,w){i="PUSH";let g=Qs(v.location,b,w);n&&n(g,b),u=m()+1;let y=ix(g,u),S=v.createHref(g);try{l.pushState(y,"",S)}catch(E){if(E instanceof DOMException&&E.name==="DataCloneError")throw E;r.location.assign(S)}o&&c&&c({action:i,location:v.location,delta:1})}function h(b,w){i="REPLACE";let g=Qs(v.location,b,w);n&&n(g,b),u=m();let y=ix(g,u),S=v.createHref(g);l.replaceState(y,"",S),o&&c&&c({action:i,location:v.location,delta:0})}function x(b){return cx(b)}let v={get action(){return i},get location(){return e(r,l)},listen(b){if(c)throw new Error("A history only accepts one active listener");return r.addEventListener(sx,d),c=b,()=>{r.removeEventListener(sx,d),c=null}},createHref(b){return t(r,b)},createURL:x,encodeLocation(b){let w=x(b);return{pathname:w.pathname,search:w.search,hash:w.hash}},push:p,replace:h,go(b){return l.go(b)}};return v}function cx(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),je(n,"No window.location.(origin|href) available to create URL");let a=typeof e=="string"?e:aa(e);return a=a.replace(/ $/,"%20"),!t&&a.startsWith("//")&&(a=n+a),new URL(a,n)}var Js,ux=class{constructor(e){if(f_(this,Js,new Map),e)for(let[t,n]of e)this.set(t,n)}get(e){if(Cp(this,Js).has(e))return Cp(this,Js).get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw new Error("No value found for context")}set(e,t){Cp(this,Js).set(e,t)}};Js=new WeakMap;var w_=new Set(["lazy","caseSensitive","path","id","index","children"]);function g_(e){return w_.has(e)}var v_=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function y_(e){return v_.has(e)}function x_(e){return e.index===!0}function ei(e,t,n=[],a={},r=!1){return e.map((o,l)=>{let i=[...n,String(l)],c=typeof o.id=="string"?o.id:i.join("-");if(je(o.index!==!0||!o.children,"Cannot specify children on an index route"),je(r||!a[c],`Found a route id collision on id "${c}".  Route id's must be globally unique within Data Router usages`),x_(o)){let u={...o,id:c};return a[c]=dx(u,t(u)),u}else{let u={...o,id:c,children:void 0};return a[c]=dx(u,t(u)),o.children&&(u.children=ei(o.children,t,i,a,r)),u}})}function dx(e,t){return Object.assign(e,{...t,...typeof t.lazy=="object"&&t.lazy!=null?{lazy:{...e.lazy,...t.lazy}}:{}})}function xr(e,t,n="/"){return ti(e,t,n,!1)}function ti(e,t,n,a){let r=typeof t=="string"?za(t):t,o=_n(r.pathname||"/",n);if(o==null)return null;let l=fx(e);S_(l);let i=null;for(let c=0;i==null&&c<l.length;++c){let u=O_(o);i=M_(l[c],u,a)}return i}function b_(e,t){let{route:n,pathname:a,params:r}=e;return{id:n.id,pathname:a,params:r,data:t[n.id],loaderData:t[n.id],handle:n.handle}}function fx(e,t=[],n=[],a="",r=!1){let o=(l,i,c=r,u)=>{let m={relativePath:u===void 0?l.path||"":u,caseSensitive:l.caseSensitive===!0,childrenIndex:i,route:l};if(m.relativePath.startsWith("/")){if(!m.relativePath.startsWith(a)&&c)return;je(m.relativePath.startsWith(a),`Absolute route path "${m.relativePath}" nested under path "${a}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),m.relativePath=m.relativePath.slice(a.length)}let d=ra([a,m.relativePath]),p=n.concat(m);l.children&&l.children.length>0&&(je(l.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${d}".`),fx(l.children,t,p,d,c)),!(l.path==null&&!l.index)&&t.push({path:d,score:__(d,l.index),routesMeta:p})};return e.forEach((l,i)=>{var c;if(l.path===""||!((c=l.path)!=null&&c.includes("?")))o(l,i);else for(let u of mx(l.path))o(l,i,!0,u)}),t}function mx(e){let t=e.split("/");if(t.length===0)return[];let[n,...a]=t,r=n.endsWith("?"),o=n.replace(/\?$/,"");if(a.length===0)return r?[o,""]:[o];let l=mx(a.join("/")),i=[];return i.push(...l.map(c=>c===""?o:[o,c].join("/"))),r&&i.push(...l),i.map(c=>e.startsWith("/")&&c===""?"/":c)}function S_(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:T_(t.routesMeta.map(a=>a.childrenIndex),n.routesMeta.map(a=>a.childrenIndex)))}var N_=/^:[\w-]+$/,j_=3,C_=2,E_=1,A_=10,R_=-2,px=e=>e==="*";function __(e,t){let n=e.split("/"),a=n.length;return n.some(px)&&(a+=R_),t&&(a+=C_),n.filter(r=>!px(r)).reduce((r,o)=>r+(N_.test(o)?j_:o===""?E_:A_),a)}function T_(e,t){return e.length===t.length&&e.slice(0,-1).every((a,r)=>a===t[r])?e[e.length-1]-t[t.length-1]:0}function M_(e,t,n=!1){let{routesMeta:a}=e,r={},o="/",l=[];for(let i=0;i<a.length;++i){let c=a[i],u=i===a.length-1,m=o==="/"?t:t.slice(o.length)||"/",d=Su({path:c.relativePath,caseSensitive:c.caseSensitive,end:u},m),p=c.route;if(!d&&u&&n&&!a[a.length-1].route.index&&(d=Su({path:c.relativePath,caseSensitive:c.caseSensitive,end:!1},m)),!d)return null;Object.assign(r,d.params),l.push({params:r,pathname:ra([o,d.pathname]),pathnameBase:z_(ra([o,d.pathnameBase])),route:p}),d.pathnameBase!=="/"&&(o=ra([o,d.pathnameBase]))}return l}function Su(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,a]=D_(e.path,e.caseSensitive,e.end),r=t.match(n);if(!r)return null;let o=r[0],l=o.replace(/(.)\/+$/,"$1"),i=r.slice(1);return{params:a.reduce((u,{paramName:m,isOptional:d},p)=>{if(m==="*"){let x=i[p]||"";l=o.slice(0,o.length-x.length).replace(/(.)\/+$/,"$1")}const h=i[p];return d&&!h?u[m]=void 0:u[m]=(h||"").replace(/%2F/g,"/"),u},{}),pathname:o,pathnameBase:l,pattern:e}}function D_(e,t=!1,n=!0){ct(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let a=[],r="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(l,i,c)=>(a.push({paramName:i,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(a.push({paramName:"*"}),r+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?r+="\\/*$":e!==""&&e!=="/"&&(r+="(?:(?=\\/|$))"),[new RegExp(r,t?void 0:"i"),a]}function O_(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return ct(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function _n(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,a=e.charAt(n);return a&&a!=="/"?null:e.slice(n)||"/"}function k_({basename:e,pathname:t}){return t==="/"?e:ra([e,t])}var hx=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ep=e=>hx.test(e);function L_(e,t="/"){let{pathname:n,search:a="",hash:r=""}=typeof e=="string"?za(e):e,o;return n?(n=n.replace(/\/\/+/g,"/"),n.startsWith("/")?o=wx(n.substring(1),"/"):o=wx(n,t)):o=t,{pathname:o,search:P_(a),hash:B_(r)}}function wx(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(r=>{r===".."?n.length>1&&n.pop():r!=="."&&n.push(r)}),n.length>1?n.join("/"):"/"}function Ap(e,t,n,a){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(a)}].  Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function gx(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Rp(e){let t=gx(e);return t.map((n,a)=>a===t.length-1?n.pathname:n.pathnameBase)}function _p(e,t,n,a=!1){let r;typeof e=="string"?r=za(e):(r={...e},je(!r.pathname||!r.pathname.includes("?"),Ap("?","pathname","search",r)),je(!r.pathname||!r.pathname.includes("#"),Ap("#","pathname","hash",r)),je(!r.search||!r.search.includes("#"),Ap("#","search","hash",r)));let o=e===""||r.pathname==="",l=o?"/":r.pathname,i;if(l==null)i=n;else{let d=t.length-1;if(!a&&l.startsWith("..")){let p=l.split("/");for(;p[0]==="..";)p.shift(),d-=1;r.pathname=p.join("/")}i=d>=0?t[d]:"/"}let c=L_(r,i),u=l&&l!=="/"&&l.endsWith("/"),m=(o||l===".")&&n.endsWith("/");return!c.pathname.endsWith("/")&&(u||m)&&(c.pathname+="/"),c}var ra=e=>e.join("/").replace(/\/\/+/g,"/"),z_=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),P_=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,B_=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,ni=class{constructor(e,t,n,a=!1){this.status=e,this.statusText=t||"",this.internal=a,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function ai(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function ri(e){return e.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var vx=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function yx(e,t){let n=e;if(typeof n!="string"||!hx.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let a=n,r=!1;if(vx)try{let o=new URL(window.location.href),l=n.startsWith("//")?new URL(o.protocol+n):new URL(n),i=_n(l.pathname,t);l.origin===o.origin&&i!=null?n=i+l.search+l.hash:r=!0}catch{ct(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:a,isExternal:r,to:n}}var br=Symbol("Uninstrumented");function U_(e,t){let n={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};e.forEach(r=>r({id:t.id,index:t.index,path:t.path,instrument(o){let l=Object.keys(n);for(let i of l)o[i]&&n[i].push(o[i])}}));let a={};if(typeof t.lazy=="function"&&n.lazy.length>0){let r=yl(n.lazy,t.lazy,()=>{});r&&(a.lazy=r)}if(typeof t.lazy=="object"){let r=t.lazy;["middleware","loader","action"].forEach(o=>{let l=r[o],i=n[`lazy.${o}`];if(typeof l=="function"&&i.length>0){let c=yl(i,l,()=>{});c&&(a.lazy=Object.assign(a.lazy||{},{[o]:c}))}})}return["loader","action"].forEach(r=>{let o=t[r];if(typeof o=="function"&&n[r].length>0){let l=o[br]??o,i=yl(n[r],l,(...c)=>bx(c[0]));i&&(r==="loader"&&l.hydrate===!0&&(i.hydrate=!0),i[br]=l,a[r]=i)}}),t.middleware&&t.middleware.length>0&&n.middleware.length>0&&(a.middleware=t.middleware.map(r=>{let o=r[br]??r,l=yl(n.middleware,o,(...i)=>bx(i[0]));return l?(l[br]=o,l):r})),a}function H_(e,t){let n={navigate:[],fetch:[]};if(t.forEach(a=>a({instrument(r){let o=Object.keys(r);for(let l of o)r[l]&&n[l].push(r[l])}})),n.navigate.length>0){let a=e.navigate[br]??e.navigate,r=yl(n.navigate,a,(...o)=>{let[l,i]=o;return{to:typeof l=="number"||typeof l=="string"?l:l?aa(l):".",...Sx(e,i??{})}});r&&(r[br]=a,e.navigate=r)}if(n.fetch.length>0){let a=e.fetch[br]??e.fetch,r=yl(n.fetch,a,(...o)=>{let[l,,i,c]=o;return{href:i??".",fetcherKey:l,...Sx(e,c??{})}});r&&(r[br]=a,e.fetch=r)}return e}function yl(e,t,n){return e.length===0?null:async(...a)=>{let r=await xx(e,n(...a),()=>t(...a),e.length-1);if(r.type==="error")throw r.value;return r.value}}async function xx(e,t,n,a){let r=e[a],o;if(r){let l,i=async()=>(l?console.error("You cannot call instrumented handlers more than once"):l=xx(e,t,n,a-1),o=await l,je(o,"Expected a result"),o.type==="error"&&o.value instanceof Error?{status:"error",error:o.value}:{status:"success",error:void 0});try{await r(i,t)}catch(c){console.error("An instrumentation function threw an error:",c)}l||await i(),await l}else try{o={type:"success",value:await n()}}catch(l){o={type:"error",value:l}}return o||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function bx(e){let{request:t,context:n,params:a,unstable_pattern:r}=e;return{request:I_(t),params:{...a},unstable_pattern:r,context:V_(n)}}function Sx(e,t){return{currentUrl:aa(e.state.location),..."formMethod"in t?{formMethod:t.formMethod}:{},..."formEncType"in t?{formEncType:t.formEncType}:{},..."formData"in t?{formData:t.formData}:{},..."body"in t?{body:t.body}:{}}}function I_(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function V_(e){if(F_(e)){let t={...e};return Object.freeze(t),t}else return{get:t=>e.get(t)}}var $_=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function F_(e){if(e===null||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null||Object.getOwnPropertyNames(t).sort().join("\0")===$_}var Nx=["POST","PUT","PATCH","DELETE"],G_=new Set(Nx),Y_=["GET",...Nx],q_=new Set(Y_),jx=new Set([301,302,303,307,308]),K_=new Set([307,308]),Tp={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},X_={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},oi={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Z_=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),Cx="remix-router-transitions",Ex=Symbol("ResetLoaderData");function W_(e){const t=e.window?e.window:typeof window<"u"?window:void 0,n=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u";je(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let a=e.hydrationRouteProperties||[],r=e.mapRouteProperties||Z_,o=r;if(e.unstable_instrumentations){let A=e.unstable_instrumentations;o=M=>({...r(M),...U_(A.map(P=>P.route).filter(Boolean),M)})}let l={},i=ei(e.routes,o,void 0,l),c,u=e.basename||"/";u.startsWith("/")||(u=`/${u}`);let m=e.dataStrategy||nT,d={...e.future},p=null,h=new Set,x=null,v=null,b=null,w=e.hydrationData!=null,g=xr(i,e.history.location,u),y=!1,S=null,E;if(g==null&&!e.patchRoutesOnNavigation){let A=Tn(404,{pathname:e.history.location.pathname}),{matches:M,route:P}=Nu(i);E=!0,g=M,S={[P.id]:A}}else if(g&&!e.hydrationData&&wt(g,i,e.history.location.pathname).active&&(g=null),g)if(g.some(A=>A.route.lazy))E=!1;else if(!g.some(A=>Dp(A.route)))E=!0;else{let A=e.hydrationData?e.hydrationData.loaderData:null,M=e.hydrationData?e.hydrationData.errors:null;if(M){let P=g.findIndex(G=>M[G.route.id]!==void 0);E=g.slice(0,P+1).every(G=>!Op(G.route,A,M))}else E=g.every(P=>!Op(P.route,A,M))}else{E=!1,g=[];let A=wt(null,i,e.history.location.pathname);A.active&&A.matches&&(y=!0,g=A.matches)}let R,N={historyAction:e.history.action,location:e.history.location,matches:g,initialized:E,navigation:Tp,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||S,fetchers:new Map,blockers:new Map},j="POP",T=null,O=!1,D,H=!1,k=new Map,B=null,U=!1,C=!1,L=new Set,_=new Map,z=0,$=-1,J=new Map,me=new Set,Z=new Map,Q=new Map,ee=new Set,ge=new Map,Y,W=null;function pe(){if(p=e.history.listen(({action:A,location:M,delta:P})=>{if(Y){Y(),Y=void 0;return}ct(ge.size===0||P!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs.  This can also happen if you are using createHashRouter and the user manually changes the URL.");let G=Co({currentLocation:N.location,nextLocation:M,historyAction:A});if(G&&P!=null){let X=new Promise(se=>{Y=se});e.history.go(P*-1),Hr(G,{state:"blocked",location:M,proceed(){Hr(G,{state:"proceeding",proceed:void 0,reset:void 0,location:M}),X.then(()=>e.history.go(P))},reset(){let se=new Map(N.blockers);se.set(G,oi),F({blockers:se})}}),T==null||T.resolve(),T=null;return}return Ve(A,M)}),n){xT(t,k);let A=()=>bT(t,k);t.addEventListener("pagehide",A),B=()=>t.removeEventListener("pagehide",A)}return N.initialized||Ve("POP",N.location,{initialHydration:!0}),R}function ue(){p&&p(),B&&B(),h.clear(),D&&D.abort(),N.fetchers.forEach((A,M)=>en(M)),N.blockers.forEach((A,M)=>tn(M))}function re(A){return h.add(A),()=>h.delete(A)}function F(A,M={}){A.matches&&(A.matches=A.matches.map(X=>{let se=l[X.route.id],de=X.route;return de.element!==se.element||de.errorElement!==se.errorElement||de.hydrateFallbackElement!==se.hydrateFallbackElement?{...X,route:se}:X})),N={...N,...A};let P=[],G=[];N.fetchers.forEach((X,se)=>{X.state==="idle"&&(ee.has(se)?P.push(se):G.push(se))}),ee.forEach(X=>{!N.fetchers.has(X)&&!_.has(X)&&P.push(X)}),[...h].forEach(X=>X(N,{deletedFetchers:P,newErrors:A.errors??null,viewTransitionOpts:M.viewTransitionOpts,flushSync:M.flushSync===!0})),P.forEach(X=>en(X)),G.forEach(X=>N.fetchers.delete(X))}function he(A,M,{flushSync:P}={}){var be,ie;let G=N.actionData!=null&&N.navigation.formMethod!=null&&zt(N.navigation.formMethod)&&N.navigation.state==="loading"&&((be=A.state)==null?void 0:be._isRedirect)!==!0,X;M.actionData?Object.keys(M.actionData).length>0?X=M.actionData:X=null:G?X=N.actionData:X=null;let se=M.loaderData?Ix(N.loaderData,M.loaderData,M.matches||[],M.errors):N.loaderData,de=N.blockers;de.size>0&&(de=new Map(de),de.forEach((Se,Me)=>de.set(Me,oi)));let te=U?!1:ot(A,M.matches||N.matches),oe=O===!0||N.navigation.formMethod!=null&&zt(N.navigation.formMethod)&&((ie=A.state)==null?void 0:ie._isRedirect)!==!0;c&&(i=c,c=void 0),U||j==="POP"||(j==="PUSH"?e.history.push(A,A.state):j==="REPLACE"&&e.history.replace(A,A.state));let ce;if(j==="POP"){let Se=k.get(N.location.pathname);Se&&Se.has(A.pathname)?ce={currentLocation:N.location,nextLocation:A}:k.has(A.pathname)&&(ce={currentLocation:A,nextLocation:N.location})}else if(H){let Se=k.get(N.location.pathname);Se?Se.add(A.pathname):(Se=new Set([A.pathname]),k.set(N.location.pathname,Se)),ce={currentLocation:N.location,nextLocation:A}}F({...M,actionData:X,loaderData:se,historyAction:j,location:A,initialized:!0,navigation:Tp,revalidation:"idle",restoreScrollPosition:te,preventScrollReset:oe,blockers:de},{viewTransitionOpts:ce,flushSync:P===!0}),j="POP",O=!1,H=!1,U=!1,C=!1,T==null||T.resolve(),T=null,W==null||W.resolve(),W=null}async function Ce(A,M){if(T==null||T.resolve(),T=null,typeof A=="number"){T||(T=Yx());let Me=T.promise;return e.history.go(A),Me}let P=Mp(N.location,N.matches,u,A,M==null?void 0:M.fromRouteId,M==null?void 0:M.relative),{path:G,submission:X,error:se}=Ax(!1,P,M),de=N.location,te=Qs(N.location,G,M&&M.state);te={...te,...e.history.encodeLocation(te)};let oe=M&&M.replace!=null?M.replace:void 0,ce="PUSH";oe===!0?ce="REPLACE":oe===!1||X!=null&&zt(X.formMethod)&&X.formAction===N.location.pathname+N.location.search&&(ce="REPLACE");let be=M&&"preventScrollReset"in M?M.preventScrollReset===!0:void 0,ie=(M&&M.flushSync)===!0,Se=Co({currentLocation:de,nextLocation:te,historyAction:ce});if(Se){Hr(Se,{state:"blocked",location:te,proceed(){Hr(Se,{state:"proceeding",proceed:void 0,reset:void 0,location:te}),Ce(A,M)},reset(){let Me=new Map(N.blockers);Me.set(Se,oi),F({blockers:Me})}});return}await Ve(ce,te,{submission:X,pendingError:se,preventScrollReset:be,replace:M&&M.replace,enableViewTransition:M&&M.viewTransition,flushSync:ie,callSiteDefaultShouldRevalidate:M&&M.unstable_defaultShouldRevalidate})}function We(){W||(W=Yx()),Pr(),F({revalidation:"loading"});let A=W.promise;return N.navigation.state==="submitting"?A:N.navigation.state==="idle"?(Ve(N.historyAction,N.location,{startUninterruptedRevalidation:!0}),A):(Ve(j||N.historyAction,N.navigation.location,{overrideNavigation:N.navigation,enableViewTransition:H===!0}),A)}async function Ve(A,M,P){D&&D.abort(),D=null,j=A,U=(P&&P.startUninterruptedRevalidation)===!0,nt(N.location,N.matches),O=(P&&P.preventScrollReset)===!0,H=(P&&P.enableViewTransition)===!0;let G=c||i,X=P&&P.overrideNavigation,se=P!=null&&P.initialHydration&&N.matches&&N.matches.length>0&&!y?N.matches:xr(G,M,u),de=(P&&P.flushSync)===!0;if(se&&N.initialized&&!C&&uT(N.location,M)&&!(P&&P.submission&&zt(P.submission.formMethod))){he(M,{matches:se},{flushSync:de});return}let te=wt(se,G,M.pathname);if(te.active&&te.matches&&(se=te.matches),!se){let{error:Et,notFoundMatches:Vt,route:He}=Ga(M.pathname);he(M,{matches:Vt,loaderData:{},errors:{[He.id]:Et}},{flushSync:de});return}D=new AbortController;let oe=bl(e.history,M,D.signal,P&&P.submission),ce=e.getContext?await e.getContext():new ux,be;if(P&&P.pendingError)be=[Sr(se).route.id,{type:"error",error:P.pendingError}];else if(P&&P.submission&&zt(P.submission.formMethod)){let Et=await tt(oe,M,P.submission,se,ce,te.active,P&&P.initialHydration===!0,{replace:P.replace,flushSync:de});if(Et.shortCircuited)return;if(Et.pendingActionResult){let[Vt,He]=Et.pendingActionResult;if(pn(He)&&ai(He.error)&&He.error.status===404){D=null,he(M,{matches:Et.matches,loaderData:{},errors:{[Vt]:He.error}});return}}se=Et.matches||se,be=Et.pendingActionResult,X=Bp(M,P.submission),de=!1,te.active=!1,oe=bl(e.history,oe.url,oe.signal)}let{shortCircuited:ie,matches:Se,loaderData:Me,errors:Lt}=await Qt(oe,M,se,ce,te.active,X,P&&P.submission,P&&P.fetcherSubmission,P&&P.replace,P&&P.initialHydration===!0,de,be,P&&P.callSiteDefaultShouldRevalidate);ie||(D=null,he(M,{matches:Se||se,...Vx(be),loaderData:Me,errors:Lt}))}async function tt(A,M,P,G,X,se,de,te={}){Pr();let oe=vT(M,P);if(F({navigation:oe},{flushSync:te.flushSync===!0}),se){let ie=await Ya(G,M.pathname,A.signal);if(ie.type==="aborted")return{shortCircuited:!0};if(ie.type==="error"){if(ie.partialMatches.length===0){let{matches:Me,route:Lt}=Nu(i);return{matches:Me,pendingActionResult:[Lt.id,{type:"error",error:ie.error}]}}let Se=Sr(ie.partialMatches).route.id;return{matches:ie.partialMatches,pendingActionResult:[Se,{type:"error",error:ie.error}]}}else if(ie.matches)G=ie.matches;else{let{notFoundMatches:Se,error:Me,route:Lt}=Ga(M.pathname);return{matches:Se,pendingActionResult:[Lt.id,{type:"error",error:Me}]}}}let ce,be=Cu(G,M);if(!be.route.action&&!be.route.lazy)ce={type:"error",error:Tn(405,{method:A.method,pathname:M.pathname,routeId:be.route.id})};else{let ie=xl(o,l,A,G,be,de?[]:a,X),Se=await ha(A,ie,X,null);if(ce=Se[be.route.id],!ce){for(let Me of G)if(Se[Me.route.id]){ce=Se[Me.route.id];break}}if(A.signal.aborted)return{shortCircuited:!0}}if(co(ce)){let ie;return te&&te.replace!=null?ie=te.replace:ie=Bx(ce.response.headers.get("Location"),new URL(A.url),u,e.history)===N.location.pathname+N.location.search,await Bn(A,ce,!0,{submission:P,replace:ie}),{shortCircuited:!0}}if(pn(ce)){let ie=Sr(G,be.route.id);return(te&&te.replace)!==!0&&(j="PUSH"),{matches:G,pendingActionResult:[ie.route.id,ce,be.route.id]}}return{matches:G,pendingActionResult:[be.route.id,ce]}}async function Qt(A,M,P,G,X,se,de,te,oe,ce,be,ie,Se){let Me=se||Bp(M,de),Lt=de||te||Gx(Me),Et=!U&&!ce;if(X){if(Et){let Bt=Ye(ie);F({navigation:Me,...Bt!==void 0?{actionData:Bt}:{}},{flushSync:be})}let De=await Ya(P,M.pathname,A.signal);if(De.type==="aborted")return{shortCircuited:!0};if(De.type==="error"){if(De.partialMatches.length===0){let{matches:Jl,route:_o}=Nu(i);return{matches:Jl,loaderData:{},errors:{[_o.id]:De.error}}}let Bt=Sr(De.partialMatches).route.id;return{matches:De.partialMatches,loaderData:{},errors:{[Bt]:De.error}}}else if(De.matches)P=De.matches;else{let{error:Bt,notFoundMatches:Jl,route:_o}=Ga(M.pathname);return{matches:Jl,loaderData:{},errors:{[_o.id]:Bt}}}}let Vt=c||i,{dsMatches:He,revalidatingFetchers:Un}=Rx(A,G,o,l,e.history,N,P,Lt,M,ce?[]:a,ce===!0,C,L,ee,Z,me,Vt,u,e.patchRoutesOnNavigation!=null,ie,Se);if($=++z,!e.dataStrategy&&!He.some(De=>De.shouldLoad)&&!He.some(De=>De.route.middleware&&De.route.middleware.length>0)&&Un.length===0){let De=No();return he(M,{matches:P,loaderData:{},errors:ie&&pn(ie[1])?{[ie[0]]:ie[1].error}:null,...Vx(ie),...De?{fetchers:new Map(N.fetchers)}:{}},{flushSync:be}),{shortCircuited:!0}}if(Et){let De={};if(!X){De.navigation=Me;let Bt=Ye(ie);Bt!==void 0&&(De.actionData=Bt)}Un.length>0&&(De.fetchers=Zn(Un)),F(De,{flushSync:be})}Un.forEach(De=>{vn(De.key),De.controller&&_.set(De.key,De.controller)});let Ao=()=>Un.forEach(De=>vn(De.key));D&&D.signal.addEventListener("abort",Ao);let{loaderResults:Ki,fetcherResults:Ir}=await Fa(He,Un,A,G);if(A.signal.aborted)return{shortCircuited:!0};D&&D.signal.removeEventListener("abort",Ao),Un.forEach(De=>_.delete(De.key));let wa=ju(Ki);if(wa)return await Bn(A,wa.result,!0,{replace:oe}),{shortCircuited:!0};if(wa=ju(Ir),wa)return me.add(wa.key),await Bn(A,wa.result,!0,{replace:oe}),{shortCircuited:!0};let{loaderData:Aw,errors:Xi}=Hx(N,P,Ki,ie,Un,Ir);ce&&N.errors&&(Xi={...N.errors,...Xi});let Ro=No(),Id=Wl($),Vd=Ro||Id||Un.length>0;return{matches:P,loaderData:Aw,errors:Xi,...Vd?{fetchers:new Map(N.fetchers)}:{}}}function Ye(A){if(A&&!pn(A[1]))return{[A[0]]:A[1].data};if(N.actionData)return Object.keys(N.actionData).length===0?null:N.actionData}function Zn(A){return A.forEach(M=>{let P=N.fetchers.get(M.key),G=si(void 0,P?P.data:void 0);N.fetchers.set(M.key,G)}),new Map(N.fetchers)}async function $a(A,M,P,G){vn(A);let X=(G&&G.flushSync)===!0,se=c||i,de=Mp(N.location,N.matches,u,P,M,G==null?void 0:G.relative),te=xr(se,de,u),oe=wt(te,se,de);if(oe.active&&oe.matches&&(te=oe.matches),!te){kt(A,M,Tn(404,{pathname:de}),{flushSync:X});return}let{path:ce,submission:be,error:ie}=Ax(!0,de,G);if(ie){kt(A,M,ie,{flushSync:X});return}let Se=e.getContext?await e.getContext():new ux,Me=(G&&G.preventScrollReset)===!0;if(be&&zt(be.formMethod)){await St(A,M,ce,te,Se,oe.active,X,Me,be,G&&G.unstable_defaultShouldRevalidate);return}Z.set(A,{routeId:M,path:ce}),await Pn(A,M,ce,te,Se,oe.active,X,Me,be)}async function St(A,M,P,G,X,se,de,te,oe,ce){Pr(),Z.delete(A);let be=N.fetchers.get(A);Jt(A,yT(oe,be),{flushSync:de});let ie=new AbortController,Se=bl(e.history,P,ie.signal,oe);if(se){let lt=await Ya(G,new URL(Se.url).pathname,Se.signal,A);if(lt.type==="aborted")return;if(lt.type==="error"){kt(A,M,lt.error,{flushSync:de});return}else if(lt.matches)G=lt.matches;else{kt(A,M,Tn(404,{pathname:P}),{flushSync:de});return}}let Me=Cu(G,P);if(!Me.route.action&&!Me.route.lazy){let lt=Tn(405,{method:oe.formMethod,pathname:P,routeId:M});kt(A,M,lt,{flushSync:de});return}_.set(A,ie);let Lt=z,Et=xl(o,l,Se,G,Me,a,X),Vt=await ha(Se,Et,X,A),He=Vt[Me.route.id];if(!He){for(let lt of Et)if(Vt[lt.route.id]){He=Vt[lt.route.id];break}}if(Se.signal.aborted){_.get(A)===ie&&_.delete(A);return}if(ee.has(A)){if(co(He)||pn(He)){Jt(A,Pa(void 0));return}}else{if(co(He))if(_.delete(A),$>Lt){Jt(A,Pa(void 0));return}else return me.add(A),Jt(A,si(oe)),Bn(Se,He,!1,{fetcherSubmission:oe,preventScrollReset:te});if(pn(He)){kt(A,M,He.error);return}}let Un=N.navigation.location||N.location,Ao=bl(e.history,Un,ie.signal),Ki=c||i,Ir=N.navigation.state!=="idle"?xr(Ki,N.navigation.location,u):N.matches;je(Ir,"Didn't find any matches after fetcher action");let wa=++z;J.set(A,wa);let Aw=si(oe,He.data);N.fetchers.set(A,Aw);let{dsMatches:Xi,revalidatingFetchers:Ro}=Rx(Ao,X,o,l,e.history,N,Ir,oe,Un,a,!1,C,L,ee,Z,me,Ki,u,e.patchRoutesOnNavigation!=null,[Me.route.id,He],ce);Ro.filter(lt=>lt.key!==A).forEach(lt=>{let $d=lt.key,mE=N.fetchers.get($d),A9=si(void 0,mE?mE.data:void 0);N.fetchers.set($d,A9),vn($d),lt.controller&&_.set($d,lt.controller)}),F({fetchers:new Map(N.fetchers)});let Id=()=>Ro.forEach(lt=>vn(lt.key));ie.signal.addEventListener("abort",Id);let{loaderResults:Vd,fetcherResults:De}=await Fa(Xi,Ro,Ao,X);if(ie.signal.aborted)return;if(ie.signal.removeEventListener("abort",Id),J.delete(A),_.delete(A),Ro.forEach(lt=>_.delete(lt.key)),N.fetchers.has(A)){let lt=Pa(He.data);N.fetchers.set(A,lt)}let Bt=ju(Vd);if(Bt)return Bn(Ao,Bt.result,!1,{preventScrollReset:te});if(Bt=ju(De),Bt)return me.add(Bt.key),Bn(Ao,Bt.result,!1,{preventScrollReset:te});let{loaderData:Jl,errors:_o}=Hx(N,Ir,Vd,void 0,Ro,De);Wl(wa),N.navigation.state==="loading"&&wa>$?(je(j,"Expected pending action"),D&&D.abort(),he(N.navigation.location,{matches:Ir,loaderData:Jl,errors:_o,fetchers:new Map(N.fetchers)})):(F({errors:_o,loaderData:Ix(N.loaderData,Jl,Ir,_o),fetchers:new Map(N.fetchers)}),C=!1)}async function Pn(A,M,P,G,X,se,de,te,oe){let ce=N.fetchers.get(A);Jt(A,si(oe,ce?ce.data:void 0),{flushSync:de});let be=new AbortController,ie=bl(e.history,P,be.signal);if(se){let He=await Ya(G,new URL(ie.url).pathname,ie.signal,A);if(He.type==="aborted")return;if(He.type==="error"){kt(A,M,He.error,{flushSync:de});return}else if(He.matches)G=He.matches;else{kt(A,M,Tn(404,{pathname:P}),{flushSync:de});return}}let Se=Cu(G,P);_.set(A,be);let Me=z,Lt=xl(o,l,ie,G,Se,a,X),Vt=(await ha(ie,Lt,X,A))[Se.route.id];if(_.get(A)===be&&_.delete(A),!ie.signal.aborted){if(ee.has(A)){Jt(A,Pa(void 0));return}if(co(Vt))if($>Me){Jt(A,Pa(void 0));return}else{me.add(A),await Bn(ie,Vt,!1,{preventScrollReset:te});return}if(pn(Vt)){kt(A,M,Vt.error);return}Jt(A,Pa(Vt.data))}}async function Bn(A,M,P,{submission:G,fetcherSubmission:X,preventScrollReset:se,replace:de}={}){P||(T==null||T.resolve(),T=null),M.response.headers.has("X-Remix-Revalidate")&&(C=!0);let te=M.response.headers.get("Location");je(te,"Expected a Location header on the redirect Response"),te=Bx(te,new URL(A.url),u,e.history);let oe=Qs(N.location,te,{_isRedirect:!0});if(n){let Lt=!1;if(M.response.headers.has("X-Remix-Reload-Document"))Lt=!0;else if(Ep(te)){const Et=cx(te,!0);Lt=Et.origin!==t.location.origin||_n(Et.pathname,u)==null}if(Lt){de?t.location.replace(te):t.location.assign(te);return}}D=null;let ce=de===!0||M.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:be,formAction:ie,formEncType:Se}=N.navigation;!G&&!X&&be&&ie&&Se&&(G=Gx(N.navigation));let Me=G||X;if(K_.has(M.response.status)&&Me&&zt(Me.formMethod))await Ve(ce,oe,{submission:{...Me,formAction:te},preventScrollReset:se||O,enableViewTransition:P?H:void 0});else{let Lt=Bp(oe,G);await Ve(ce,oe,{overrideNavigation:Lt,fetcherSubmission:X,preventScrollReset:se||O,enableViewTransition:P?H:void 0})}}async function ha(A,M,P,G){var de;let X,se={};try{X=await rT(m,A,M,G,P,!1)}catch(te){return M.filter(oe=>oe.shouldLoad).forEach(oe=>{se[oe.route.id]={type:"error",error:te}}),se}if(A.signal.aborted)return se;if(!zt(A.method))for(let te of M){if(((de=X[te.route.id])==null?void 0:de.type)==="error")break;!X.hasOwnProperty(te.route.id)&&!N.loaderData.hasOwnProperty(te.route.id)&&(!N.errors||!N.errors.hasOwnProperty(te.route.id))&&te.shouldCallHandler()&&(X[te.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${te.route.id}`)})}for(let[te,oe]of Object.entries(X))if(pT(oe)){let ce=oe.result;se[te]={type:"redirect",response:iT(ce,A,te,M,u)}}else se[te]=await sT(oe);return se}async function Fa(A,M,P,G){let X=ha(P,A,G,null),se=Promise.all(M.map(async oe=>{if(oe.matches&&oe.match&&oe.request&&oe.controller){let be=(await ha(oe.request,oe.matches,G,oe.key))[oe.match.route.id];return{[oe.key]:be}}else return Promise.resolve({[oe.key]:{type:"error",error:Tn(404,{pathname:oe.path})}})})),de=await X,te=(await se).reduce((oe,ce)=>Object.assign(oe,ce),{});return{loaderResults:de,fetcherResults:te}}function Pr(){C=!0,Z.forEach((A,M)=>{_.has(M)&&L.add(M),vn(M)})}function Jt(A,M,P={}){N.fetchers.set(A,M),F({fetchers:new Map(N.fetchers)},{flushSync:(P&&P.flushSync)===!0})}function kt(A,M,P,G={}){let X=Sr(N.matches,M);en(A),F({errors:{[X.route.id]:P},fetchers:new Map(N.fetchers)},{flushSync:(G&&G.flushSync)===!0})}function Pt(A){return Q.set(A,(Q.get(A)||0)+1),ee.has(A)&&ee.delete(A),N.fetchers.get(A)||X_}function Br(A,M){vn(A,M==null?void 0:M.reason),Jt(A,Pa(null))}function en(A){let M=N.fetchers.get(A);_.has(A)&&!(M&&M.state==="loading"&&J.has(A))&&vn(A),Z.delete(A),J.delete(A),me.delete(A),ee.delete(A),L.delete(A),N.fetchers.delete(A)}function Ur(A){let M=(Q.get(A)||0)-1;M<=0?(Q.delete(A),ee.add(A)):Q.set(A,M),F({fetchers:new Map(N.fetchers)})}function vn(A,M){let P=_.get(A);P&&(P.abort(M),_.delete(A))}function So(A){for(let M of A){let P=Pt(M),G=Pa(P.data);N.fetchers.set(M,G)}}function No(){let A=[],M=!1;for(let P of me){let G=N.fetchers.get(P);je(G,`Expected fetcher: ${P}`),G.state==="loading"&&(me.delete(P),A.push(P),M=!0)}return So(A),M}function Wl(A){let M=[];for(let[P,G]of J)if(G<A){let X=N.fetchers.get(P);je(X,`Expected fetcher: ${P}`),X.state==="loading"&&(vn(P),J.delete(P),M.push(P))}return So(M),M.length>0}function jo(A,M){let P=N.blockers.get(A)||oi;return ge.get(A)!==M&&ge.set(A,M),P}function tn(A){N.blockers.delete(A),ge.delete(A)}function Hr(A,M){let P=N.blockers.get(A)||oi;je(P.state==="unblocked"&&M.state==="blocked"||P.state==="blocked"&&M.state==="blocked"||P.state==="blocked"&&M.state==="proceeding"||P.state==="blocked"&&M.state==="unblocked"||P.state==="proceeding"&&M.state==="unblocked",`Invalid blocker state transition: ${P.state} -> ${M.state}`);let G=new Map(N.blockers);G.set(A,M),F({blockers:G})}function Co({currentLocation:A,nextLocation:M,historyAction:P}){if(ge.size===0)return;ge.size>1&&ct(!1,"A router only supports one blocker at a time");let G=Array.from(ge.entries()),[X,se]=G[G.length-1],de=N.blockers.get(X);if(!(de&&de.state==="proceeding")&&se({currentLocation:A,nextLocation:M,historyAction:P}))return X}function Ga(A){let M=Tn(404,{pathname:A}),P=c||i,{matches:G,route:X}=Nu(P);return{notFoundMatches:G,route:X,error:M}}function Eo(A,M,P){if(x=A,b=M,v=P||null,!w&&N.navigation===Tp){w=!0;let G=ot(N.location,N.matches);G!=null&&F({restoreScrollPosition:G})}return()=>{x=null,b=null,v=null}}function ve(A,M){return v&&v(A,M.map(G=>b_(G,N.loaderData)))||A.key}function nt(A,M){if(x&&b){let P=ve(A,M);x[P]=b()}}function ot(A,M){if(x){let P=ve(A,M),G=x[P];if(typeof G=="number")return G}return null}function wt(A,M,P){if(e.patchRoutesOnNavigation)if(A){if(Object.keys(A[0].params).length>0)return{active:!0,matches:ti(M,P,u,!0)}}else return{active:!0,matches:ti(M,P,u,!0)||[]};return{active:!1,matches:null}}async function Ya(A,M,P,G){if(!e.patchRoutesOnNavigation)return{type:"success",matches:A};let X=A;for(;;){let se=c==null,de=c||i,te=l;try{await e.patchRoutesOnNavigation({signal:P,path:M,matches:X,fetcherKey:G,patch:(be,ie)=>{P.aborted||_x(be,ie,de,te,o,!1)}})}catch(be){return{type:"error",error:be,partialMatches:X}}finally{se&&!P.aborted&&(i=[...i])}if(P.aborted)return{type:"aborted"};let oe=xr(de,M,u),ce=null;if(oe){if(Object.keys(oe[0].params).length===0)return{type:"success",matches:oe};if(ce=ti(de,M,u,!0),!(ce&&X.length<ce.length&&gt(X,ce.slice(0,X.length))))return{type:"success",matches:oe}}if(ce||(ce=ti(de,M,u,!0)),!ce||gt(X,ce))return{type:"success",matches:null};X=ce}}function gt(A,M){return A.length===M.length&&A.every((P,G)=>P.route.id===M[G].route.id)}function nn(A){l={},c=ei(A,o,void 0,l)}function Ql(A,M,P=!1){let G=c==null;_x(A,M,c||i,l,o,P),G&&(i=[...i],F({}))}return R={get basename(){return u},get future(){return d},get state(){return N},get routes(){return i},get window(){return t},initialize:pe,subscribe:re,enableScrollRestoration:Eo,navigate:Ce,fetch:$a,revalidate:We,createHref:A=>e.history.createHref(A),encodeLocation:A=>e.history.encodeLocation(A),getFetcher:Pt,resetFetcher:Br,deleteFetcher:Ur,dispose:ue,getBlocker:jo,deleteBlocker:tn,patchRoutes:Ql,_internalFetchControllers:_,_internalSetRoutes:nn,_internalSetStateDoNotUseOrYouWillBreakYourApp(A){F(A)}},e.unstable_instrumentations&&(R=H_(R,e.unstable_instrumentations.map(A=>A.router).filter(Boolean))),R}function Q_(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function Mp(e,t,n,a,r,o){let l,i;if(r){l=[];for(let u of t)if(l.push(u),u.route.id===r){i=u;break}}else l=t,i=t[t.length-1];let c=_p(a||".",Rp(l),_n(e.pathname,n)||e.pathname,o==="path");if(a==null&&(c.search=e.search,c.hash=e.hash),(a==null||a===""||a===".")&&i){let u=Pp(c.search);if(i.route.index&&!u)c.search=c.search?c.search.replace(/^\?/,"?index&"):"?index";else if(!i.route.index&&u){let m=new URLSearchParams(c.search),d=m.getAll("index");m.delete("index"),d.filter(h=>h).forEach(h=>m.append("index",h));let p=m.toString();c.search=p?`?${p}`:""}}return n!=="/"&&(c.pathname=k_({basename:n,pathname:c.pathname})),aa(c)}function Ax(e,t,n){if(!n||!Q_(n))return{path:t};if(n.formMethod&&!gT(n.formMethod))return{path:t,error:Tn(405,{method:n.formMethod})};let a=()=>({path:t,error:Tn(400,{type:"invalid-body"})}),o=(n.formMethod||"get").toUpperCase(),l=$x(t);if(n.body!==void 0){if(n.formEncType==="text/plain"){if(!zt(o))return a();let d=typeof n.body=="string"?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((p,[h,x])=>`${p}${h}=${x}
`,""):String(n.body);return{path:t,submission:{formMethod:o,formAction:l,formEncType:n.formEncType,formData:void 0,json:void 0,text:d}}}else if(n.formEncType==="application/json"){if(!zt(o))return a();try{let d=typeof n.body=="string"?JSON.parse(n.body):n.body;return{path:t,submission:{formMethod:o,formAction:l,formEncType:n.formEncType,formData:void 0,json:d,text:void 0}}}catch{return a()}}}je(typeof FormData=="function","FormData is not available in this environment");let i,c;if(n.formData)i=Lp(n.formData),c=n.formData;else if(n.body instanceof FormData)i=Lp(n.body),c=n.body;else if(n.body instanceof URLSearchParams)i=n.body,c=Ux(i);else if(n.body==null)i=new URLSearchParams,c=new FormData;else try{i=new URLSearchParams(n.body),c=Ux(i)}catch{return a()}let u={formMethod:o,formAction:l,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:c,json:void 0,text:void 0};if(zt(u.formMethod))return{path:t,submission:u};let m=za(t);return e&&m.search&&Pp(m.search)&&i.append("index",""),m.search=`?${i}`,{path:aa(m),submission:u}}function Rx(e,t,n,a,r,o,l,i,c,u,m,d,p,h,x,v,b,w,g,y,S){var U;let E=y?pn(y[1])?y[1].error:y[1].data:void 0,R=r.createURL(o.location),N=r.createURL(c),j;if(m&&o.errors){let C=Object.keys(o.errors)[0];j=l.findIndex(L=>L.route.id===C)}else if(y&&pn(y[1])){let C=y[0];j=l.findIndex(L=>L.route.id===C)-1}let T=y?y[1].statusCode:void 0,O=T&&T>=400,D={currentUrl:R,currentParams:((U=o.matches[0])==null?void 0:U.params)||{},nextUrl:N,nextParams:l[0].params,...i,actionResult:E,actionStatus:T},H=ri(l),k=l.map((C,L)=>{let{route:_}=C,z=null;if(j!=null&&L>j?z=!1:_.lazy?z=!0:Dp(_)?m?z=Op(_,o.loaderData,o.errors):J_(o.loaderData,o.matches[L],C)&&(z=!0):z=!1,z!==null)return kp(n,a,e,H,C,u,t,z);let $=!1;typeof S=="boolean"?$=S:O?$=!1:(d||R.pathname+R.search===N.pathname+N.search||R.search!==N.search||eT(o.matches[L],C))&&($=!0);let J={...D,defaultShouldRevalidate:$},me=li(C,J);return kp(n,a,e,H,C,u,t,me,J,S)}),B=[];return x.forEach((C,L)=>{if(m||!l.some(ee=>ee.route.id===C.routeId)||h.has(L))return;let _=o.fetchers.get(L),z=_&&_.state!=="idle"&&_.data===void 0,$=xr(b,C.path,w);if(!$){if(g&&z)return;B.push({key:L,routeId:C.routeId,path:C.path,matches:null,match:null,request:null,controller:null});return}if(v.has(L))return;let J=Cu($,C.path),me=new AbortController,Z=bl(r,C.path,me.signal),Q=null;if(p.has(L))p.delete(L),Q=xl(n,a,Z,$,J,u,t);else if(z)d&&(Q=xl(n,a,Z,$,J,u,t));else{let ee;typeof S=="boolean"?ee=S:O?ee=!1:ee=d;let ge={...D,defaultShouldRevalidate:ee};li(J,ge)&&(Q=xl(n,a,Z,$,J,u,t,ge))}Q&&B.push({key:L,routeId:C.routeId,path:C.path,matches:Q,match:J,request:Z,controller:me})}),{dsMatches:k,revalidatingFetchers:B}}function Dp(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function Op(e,t,n){if(e.lazy)return!0;if(!Dp(e))return!1;let a=t!=null&&e.id in t,r=n!=null&&n[e.id]!==void 0;return!a&&r?!1:typeof e.loader=="function"&&e.loader.hydrate===!0?!0:!a&&!r}function J_(e,t,n){let a=!t||n.route.id!==t.route.id,r=!e.hasOwnProperty(n.route.id);return a||r}function eT(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function li(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}function _x(e,t,n,a,r,o){let l;if(e){let u=a[e];je(u,`No route found to patch children into: routeId = ${e}`),u.children||(u.children=[]),l=u.children}else l=n;let i=[],c=[];if(t.forEach(u=>{let m=l.find(d=>Tx(u,d));m?c.push({existingRoute:m,newRoute:u}):i.push(u)}),i.length>0){let u=ei(i,r,[e||"_","patch",String((l==null?void 0:l.length)||"0")],a);l.push(...u)}if(o&&c.length>0)for(let u=0;u<c.length;u++){let{existingRoute:m,newRoute:d}=c[u],p=m,[h]=ei([d],r,[],{},!0);Object.assign(p,{element:h.element?h.element:p.element,errorElement:h.errorElement?h.errorElement:p.errorElement,hydrateFallbackElement:h.hydrateFallbackElement?h.hydrateFallbackElement:p.hydrateFallbackElement})}}function Tx(e,t){return"id"in e&&"id"in t&&e.id===t.id?!0:e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive?(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:e.children.every((n,a)=>{var r;return(r=t.children)==null?void 0:r.some(o=>Tx(n,o))}):!1}var Mx=new WeakMap,Dx=({key:e,route:t,manifest:n,mapRouteProperties:a})=>{let r=n[t.id];if(je(r,"No route found in manifest"),!r.lazy||typeof r.lazy!="object")return;let o=r.lazy[e];if(!o)return;let l=Mx.get(r);l||(l={},Mx.set(r,l));let i=l[e];if(i)return i;let c=(async()=>{let u=g_(e),d=r[e]!==void 0&&e!=="hasErrorBoundary";if(u)ct(!u,"Route property "+e+" is not a supported lazy route property. This property will be ignored."),l[e]=Promise.resolve();else if(d)ct(!1,`Route "${r.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let p=await o();p!=null&&(Object.assign(r,{[e]:p}),Object.assign(r,a(r)))}typeof r.lazy=="object"&&(r.lazy[e]=void 0,Object.values(r.lazy).every(p=>p===void 0)&&(r.lazy=void 0))})();return l[e]=c,c},Ox=new WeakMap;function tT(e,t,n,a,r){let o=n[e.id];if(je(o,"No route found in manifest"),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy=="function"){let m=Ox.get(o);if(m)return{lazyRoutePromise:m,lazyHandlerPromise:m};let d=(async()=>{je(typeof e.lazy=="function","No lazy route function found");let p=await e.lazy(),h={};for(let x in p){let v=p[x];if(v===void 0)continue;let b=y_(x),g=o[x]!==void 0&&x!=="hasErrorBoundary";b?ct(!b,"Route property "+x+" is not a supported property to be returned from a lazy route function. This property will be ignored."):g?ct(!g,`Route "${o.id}" has a static property "${x}" defined but its lazy function is also returning a value for this property. The lazy route property "${x}" will be ignored.`):h[x]=v}Object.assign(o,h),Object.assign(o,{...a(o),lazy:void 0})})();return Ox.set(o,d),d.catch(()=>{}),{lazyRoutePromise:d,lazyHandlerPromise:d}}let l=Object.keys(e.lazy),i=[],c;for(let m of l){if(r&&r.includes(m))continue;let d=Dx({key:m,route:e,manifest:n,mapRouteProperties:a});d&&(i.push(d),m===t&&(c=d))}let u=i.length>0?Promise.all(i).then(()=>{}):void 0;return u==null||u.catch(()=>{}),c==null||c.catch(()=>{}),{lazyRoutePromise:u,lazyHandlerPromise:c}}async function kx(e){let t=e.matches.filter(r=>r.shouldLoad),n={};return(await Promise.all(t.map(r=>r.resolve()))).forEach((r,o)=>{n[t[o].route.id]=r}),n}async function nT(e){return e.matches.some(t=>t.route.middleware)?Lx(e,()=>kx(e)):kx(e)}function Lx(e,t){return aT(e,t,a=>{if(wT(a))throw a;return a},fT,n);function n(a,r,o){if(o)return Promise.resolve(Object.assign(o.value,{[r]:{type:"error",result:a}}));{let{matches:l}=e,i=Math.min(Math.max(l.findIndex(u=>u.route.id===r),0),Math.max(l.findIndex(u=>u.shouldCallHandler()),0)),c=Sr(l,l[i].route.id).route.id;return Promise.resolve({[c]:{type:"error",result:a}})}}}async function aT(e,t,n,a,r){let{matches:o,request:l,params:i,context:c,unstable_pattern:u}=e,m=o.flatMap(p=>p.route.middleware?p.route.middleware.map(h=>[p.route.id,h]):[]);return await zx({request:l,params:i,context:c,unstable_pattern:u},m,t,n,a,r)}async function zx(e,t,n,a,r,o,l=0){let{request:i}=e;if(i.signal.aborted)throw i.signal.reason??new Error(`Request aborted: ${i.method} ${i.url}`);let c=t[l];if(!c)return await n();let[u,m]=c,d,p=async()=>{if(d)throw new Error("You may only call `next()` once per middleware");try{return d={value:await zx(e,t,n,a,r,o,l+1)},d.value}catch(h){return d={value:await o(h,u,d)},d.value}};try{let h=await m(e,p),x=h!=null?a(h):void 0;return r(x)?x:d?x??d.value:(d={value:await p()},d.value)}catch(h){return await o(h,u,d)}}function Px(e,t,n,a,r){let o=Dx({key:"middleware",route:a.route,manifest:t,mapRouteProperties:e}),l=tT(a.route,zt(n.method)?"action":"loader",t,e,r);return{middleware:o,route:l.lazyRoutePromise,handler:l.lazyHandlerPromise}}function kp(e,t,n,a,r,o,l,i,c=null,u){let m=!1,d=Px(e,t,n,r,o);return{...r,_lazyPromises:d,shouldLoad:i,shouldRevalidateArgs:c,shouldCallHandler(p){return m=!0,c?typeof u=="boolean"?li(r,{...c,defaultShouldRevalidate:u}):typeof p=="boolean"?li(r,{...c,defaultShouldRevalidate:p}):li(r,c):i},resolve(p){let{lazy:h,loader:x,middleware:v}=r.route,b=m||i||p&&!zt(n.method)&&(h||x),w=v&&v.length>0&&!x&&!h;return b&&(zt(n.method)||!w)?oT({request:n,unstable_pattern:a,match:r,lazyHandlerPromise:d==null?void 0:d.handler,lazyRoutePromise:d==null?void 0:d.route,handlerOverride:p,scopedContext:l}):Promise.resolve({type:"data",result:void 0})}}}function xl(e,t,n,a,r,o,l,i=null){return a.map(c=>c.route.id!==r.route.id?{...c,shouldLoad:!1,shouldRevalidateArgs:i,shouldCallHandler:()=>!1,_lazyPromises:Px(e,t,n,c,o),resolve:()=>Promise.resolve({type:"data",result:void 0})}:kp(e,t,n,ri(a),c,o,l,!0,i))}async function rT(e,t,n,a,r,o){n.some(u=>{var m;return(m=u._lazyPromises)==null?void 0:m.middleware})&&await Promise.all(n.map(u=>{var m;return(m=u._lazyPromises)==null?void 0:m.middleware}));let l={request:t,unstable_pattern:ri(n),params:n[0].params,context:r,matches:n},c=await e({...l,fetcherKey:a,runClientMiddleware:u=>{let m=l;return Lx(m,()=>u({...m,fetcherKey:a,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))}});try{await Promise.all(n.flatMap(u=>{var m,d;return[(m=u._lazyPromises)==null?void 0:m.handler,(d=u._lazyPromises)==null?void 0:d.route]}))}catch{}return c}async function oT({request:e,unstable_pattern:t,match:n,lazyHandlerPromise:a,lazyRoutePromise:r,handlerOverride:o,scopedContext:l}){let i,c,u=zt(e.method),m=u?"action":"loader",d=p=>{let h,x=new Promise((w,g)=>h=g);c=()=>h(),e.signal.addEventListener("abort",c);let v=w=>typeof p!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${m}" [routeId: ${n.route.id}]`)):p({request:e,unstable_pattern:t,params:n.params,context:l},...w!==void 0?[w]:[]),b=(async()=>{try{return{type:"data",result:await(o?o(g=>v(g)):v())}}catch(w){return{type:"error",result:w}}})();return Promise.race([b,x])};try{let p=u?n.route.action:n.route.loader;if(a||r)if(p){let h,[x]=await Promise.all([d(p).catch(v=>{h=v}),a,r]);if(h!==void 0)throw h;i=x}else{await a;let h=u?n.route.action:n.route.loader;if(h)[i]=await Promise.all([d(h),r]);else if(m==="action"){let x=new URL(e.url),v=x.pathname+x.search;throw Tn(405,{method:e.method,pathname:v,routeId:n.route.id})}else return{type:"data",result:void 0}}else if(p)i=await d(p);else{let h=new URL(e.url),x=h.pathname+h.search;throw Tn(404,{pathname:x})}}catch(p){return{type:"error",result:p}}finally{c&&e.signal.removeEventListener("abort",c)}return i}async function lT(e){let t=e.headers.get("Content-Type");return t&&/\bapplication\/json\b/.test(t)?e.body==null?null:e.json():e.text()}async function sT(e){var a,r,o,l,i;let{result:t,type:n}=e;if(zp(t)){let c;try{c=await lT(t)}catch(u){return{type:"error",error:u}}return n==="error"?{type:"error",error:new ni(t.status,t.statusText,c),statusCode:t.status,headers:t.headers}:{type:"data",data:c,statusCode:t.status,headers:t.headers}}return n==="error"?Fx(t)?t.data instanceof Error?{type:"error",error:t.data,statusCode:(a=t.init)==null?void 0:a.status,headers:(r=t.init)!=null&&r.headers?new Headers(t.init.headers):void 0}:{type:"error",error:dT(t),statusCode:ai(t)?t.status:void 0,headers:(o=t.init)!=null&&o.headers?new Headers(t.init.headers):void 0}:{type:"error",error:t,statusCode:ai(t)?t.status:void 0}:Fx(t)?{type:"data",data:t.data,statusCode:(l=t.init)==null?void 0:l.status,headers:(i=t.init)!=null&&i.headers?new Headers(t.init.headers):void 0}:{type:"data",data:t}}function iT(e,t,n,a,r){let o=e.headers.get("Location");if(je(o,"Redirects returned/thrown from loaders/actions must have a Location header"),!Ep(o)){let l=a.slice(0,a.findIndex(i=>i.route.id===n)+1);o=Mp(new URL(t.url),l,r,o),e.headers.set("Location",o)}return e}function Bx(e,t,n,a){let r=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];if(Ep(e)){let o=e,l=o.startsWith("//")?new URL(t.protocol+o):new URL(o);if(r.includes(l.protocol))throw new Error("Invalid redirect location");let i=_n(l.pathname,n)!=null;if(l.origin===t.origin&&i)return l.pathname+l.search+l.hash}try{let o=a.createURL(e);if(r.includes(o.protocol))throw new Error("Invalid redirect location")}catch{}return e}function bl(e,t,n,a){let r=e.createURL($x(t)).toString(),o={signal:n};if(a&&zt(a.formMethod)){let{formMethod:l,formEncType:i}=a;o.method=l.toUpperCase(),i==="application/json"?(o.headers=new Headers({"Content-Type":i}),o.body=JSON.stringify(a.json)):i==="text/plain"?o.body=a.text:i==="application/x-www-form-urlencoded"&&a.formData?o.body=Lp(a.formData):o.body=a.formData}return new Request(r,o)}function Lp(e){let t=new URLSearchParams;for(let[n,a]of e.entries())t.append(n,typeof a=="string"?a:a.name);return t}function Ux(e){let t=new FormData;for(let[n,a]of e.entries())t.append(n,a);return t}function cT(e,t,n,a=!1,r=!1){let o={},l=null,i,c=!1,u={},m=n&&pn(n[1])?n[1].error:void 0;return e.forEach(d=>{if(!(d.route.id in t))return;let p=d.route.id,h=t[p];if(je(!co(h),"Cannot handle redirect results in processLoaderData"),pn(h)){let x=h.error;if(m!==void 0&&(x=m,m=void 0),l=l||{},r)l[p]=x;else{let v=Sr(e,p);l[v.route.id]==null&&(l[v.route.id]=x)}a||(o[p]=Ex),c||(c=!0,i=ai(h.error)?h.error.status:500),h.headers&&(u[p]=h.headers)}else o[p]=h.data,h.statusCode&&h.statusCode!==200&&!c&&(i=h.statusCode),h.headers&&(u[p]=h.headers)}),m!==void 0&&n&&(l={[n[0]]:m},n[2]&&(o[n[2]]=void 0)),{loaderData:o,errors:l,statusCode:i||200,loaderHeaders:u}}function Hx(e,t,n,a,r,o){let{loaderData:l,errors:i}=cT(t,n,a);return r.filter(c=>!c.matches||c.matches.some(u=>u.shouldLoad)).forEach(c=>{let{key:u,match:m,controller:d}=c;if(d&&d.signal.aborted)return;let p=o[u];if(je(p,"Did not find corresponding fetcher result"),pn(p)){let h=Sr(e.matches,m==null?void 0:m.route.id);i&&i[h.route.id]||(i={...i,[h.route.id]:p.error}),e.fetchers.delete(u)}else if(co(p))je(!1,"Unhandled fetcher revalidation redirect");else{let h=Pa(p.data);e.fetchers.set(u,h)}}),{loaderData:l,errors:i}}function Ix(e,t,n,a){let r=Object.entries(t).filter(([,o])=>o!==Ex).reduce((o,[l,i])=>(o[l]=i,o),{});for(let o of n){let l=o.route.id;if(!t.hasOwnProperty(l)&&e.hasOwnProperty(l)&&o.route.loader&&(r[l]=e[l]),a&&a.hasOwnProperty(l))break}return r}function Vx(e){return e?pn(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function Sr(e,t){return(t?e.slice(0,e.findIndex(a=>a.route.id===t)+1):[...e]).reverse().find(a=>a.route.hasErrorBoundary===!0)||e[0]}function Nu(e){let t=e.length===1?e[0]:e.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function Tn(e,{pathname:t,routeId:n,method:a,type:r,message:o}={}){let l="Unknown Server Error",i="Unknown @remix-run/router error";return e===400?(l="Bad Request",a&&t&&n?i=`You made a ${a} request to "${t}" but did not provide a \`loader\` for route "${n}", so there is no way to handle the request.`:r==="invalid-body"&&(i="Unable to encode submission body")):e===403?(l="Forbidden",i=`Route "${n}" does not match URL "${t}"`):e===404?(l="Not Found",i=`No route matches URL "${t}"`):e===405&&(l="Method Not Allowed",a&&t&&n?i=`You made a ${a.toUpperCase()} request to "${t}" but did not provide an \`action\` for route "${n}", so there is no way to handle the request.`:a&&(i=`Invalid request method "${a.toUpperCase()}"`)),new ni(e||500,l,new Error(i),!0)}function ju(e){let t=Object.entries(e);for(let n=t.length-1;n>=0;n--){let[a,r]=t[n];if(co(r))return{key:a,result:r}}}function $x(e){let t=typeof e=="string"?za(e):e;return aa({...t,hash:""})}function uT(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function dT(e){var t,n;return new ni(((t=e.init)==null?void 0:t.status)??500,((n=e.init)==null?void 0:n.statusText)??"Internal Server Error",e.data)}function fT(e){return e!=null&&typeof e=="object"&&Object.entries(e).every(([t,n])=>typeof t=="string"&&mT(n))}function mT(e){return e!=null&&typeof e=="object"&&"type"in e&&"result"in e&&(e.type==="data"||e.type==="error")}function pT(e){return zp(e.result)&&jx.has(e.result.status)}function pn(e){return e.type==="error"}function co(e){return(e&&e.type)==="redirect"}function Fx(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function zp(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function hT(e){return jx.has(e)}function wT(e){return zp(e)&&hT(e.status)&&e.headers.has("Location")}function gT(e){return q_.has(e.toUpperCase())}function zt(e){return G_.has(e.toUpperCase())}function Pp(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function Cu(e,t){let n=typeof t=="string"?za(t).search:t.search;if(e[e.length-1].route.index&&Pp(n||""))return e[e.length-1];let a=gx(e);return a[a.length-1]}function Gx(e){let{formMethod:t,formAction:n,formEncType:a,text:r,formData:o,json:l}=e;if(!(!t||!n||!a)){if(r!=null)return{formMethod:t,formAction:n,formEncType:a,formData:void 0,json:void 0,text:r};if(o!=null)return{formMethod:t,formAction:n,formEncType:a,formData:o,json:void 0,text:void 0};if(l!==void 0)return{formMethod:t,formAction:n,formEncType:a,formData:void 0,json:l,text:void 0}}}function Bp(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function vT(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function si(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function yT(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function Pa(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function xT(e,t){try{let n=e.sessionStorage.getItem(Cx);if(n){let a=JSON.parse(n);for(let[r,o]of Object.entries(a||{}))o&&Array.isArray(o)&&t.set(r,new Set(o||[]))}}catch{}}function bT(e,t){if(t.size>0){let n={};for(let[a,r]of t)n[a]=[...r];try{e.sessionStorage.setItem(Cx,JSON.stringify(n))}catch(a){ct(!1,`Failed to save applied view transitions in sessionStorage (${a}).`)}}}function Yx(){let e,t,n=new Promise((a,r)=>{e=async o=>{a(o);try{await n}catch{}},t=async o=>{r(o);try{await n}catch{}}});return{promise:n,resolve:e,reject:t}}var uo=f.createContext(null);uo.displayName="DataRouter";var ii=f.createContext(null);ii.displayName="DataRouterState";var qx=f.createContext(!1);function ST(){return f.useContext(qx)}var Up=f.createContext({isTransitioning:!1});Up.displayName="ViewTransition";var Kx=f.createContext(new Map);Kx.displayName="Fetchers";var NT=f.createContext(null);NT.displayName="Await";var Mn=f.createContext(null);Mn.displayName="Navigation";var Eu=f.createContext(null);Eu.displayName="Location";var oa=f.createContext({outlet:null,matches:[],isDataRoute:!1});oa.displayName="Route";var Hp=f.createContext(null);Hp.displayName="RouteError";var Xx="REACT_ROUTER_ERROR",jT="REDIRECT",CT="ROUTE_ERROR_RESPONSE";function ET(e){if(e.startsWith(`${Xx}:${jT}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function AT(e){if(e.startsWith(`${Xx}:${CT}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new ni(t.status,t.statusText,t.data)}catch{}}function RT(e,{relative:t}={}){je(ci(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:a}=f.useContext(Mn),{hash:r,pathname:o,search:l}=ui(e,{relative:t}),i=o;return n!=="/"&&(i=o==="/"?n:ra([n,o])),a.createHref({pathname:i,search:l,hash:r})}function ci(){return f.useContext(Eu)!=null}function Nr(){return je(ci(),"useLocation() may be used only in the context of a <Router> component."),f.useContext(Eu).location}var Zx="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Wx(e){f.useContext(Mn).static||f.useLayoutEffect(e)}function _T(){let{isDataRoute:e}=f.useContext(oa);return e?FT():TT()}function TT(){je(ci(),"useNavigate() may be used only in the context of a <Router> component.");let e=f.useContext(uo),{basename:t,navigator:n}=f.useContext(Mn),{matches:a}=f.useContext(oa),{pathname:r}=Nr(),o=JSON.stringify(Rp(a)),l=f.useRef(!1);return Wx(()=>{l.current=!0}),f.useCallback((c,u={})=>{if(ct(l.current,Zx),!l.current)return;if(typeof c=="number"){n.go(c);return}let m=_p(c,JSON.parse(o),r,u.relative==="path");e==null&&t!=="/"&&(m.pathname=m.pathname==="/"?t:ra([t,m.pathname])),(u.replace?n.replace:n.push)(m,u.state,u)},[t,n,o,r,e])}var MT=f.createContext(null);function DT(e){let t=f.useContext(oa).outlet;return f.useMemo(()=>t&&f.createElement(MT.Provider,{value:e},t),[t,e])}function ui(e,{relative:t}={}){let{matches:n}=f.useContext(oa),{pathname:a}=Nr(),r=JSON.stringify(Rp(n));return f.useMemo(()=>_p(e,JSON.parse(r),a,t==="path"),[e,r,a,t])}function OT(e,t,n,a,r){je(ci(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:o}=f.useContext(Mn),{matches:l}=f.useContext(oa),i=l[l.length-1],c=i?i.params:{},u=i?i.pathname:"/",m=i?i.pathnameBase:"/",d=i&&i.route;{let g=d&&d.path||"";eb(u,!d||g.endsWith("*")||g.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${u}" (under <Route path="${g}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.

Please change the parent <Route path="${g}"> to <Route path="${g==="/"?"*":`${g}/*`}">.`)}let p=Nr(),h;h=p;let x=h.pathname||"/",v=x;if(m!=="/"){let g=m.replace(/^\//,"").split("/");v="/"+x.replace(/^\//,"").split("/").slice(g.length).join("/")}let b=xr(e,{pathname:v});return ct(d||b!=null,`No routes matched location "${h.pathname}${h.search}${h.hash}" `),ct(b==null||b[b.length-1].route.element!==void 0||b[b.length-1].route.Component!==void 0||b[b.length-1].route.lazy!==void 0,`Matched leaf route at location "${h.pathname}${h.search}${h.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`),BT(b&&b.map(g=>Object.assign({},g,{params:Object.assign({},c,g.params),pathname:ra([m,o.encodeLocation?o.encodeLocation(g.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:g.pathname]),pathnameBase:g.pathnameBase==="/"?m:ra([m,o.encodeLocation?o.encodeLocation(g.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:g.pathnameBase])})),l,n,a,r)}function kT(){let e=$T(),t=ai(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,a="rgba(200,200,200, 0.5)",r={padding:"0.5rem",backgroundColor:a},o={padding:"2px 4px",backgroundColor:a},l=null;return console.error("Error handled by React Router default ErrorBoundary:",e),l=f.createElement(f.Fragment,null,f.createElement("p",null,"💿 Hey developer 👋"),f.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",f.createElement("code",{style:o},"ErrorBoundary")," or"," ",f.createElement("code",{style:o},"errorElement")," prop on your route.")),f.createElement(f.Fragment,null,f.createElement("h2",null,"Unexpected Application Error!"),f.createElement("h3",{style:{fontStyle:"italic"}},t),n?f.createElement("pre",{style:r},n):null,l)}var LT=f.createElement(kT,null),Qx=class extends f.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const n=AT(e.digest);n&&(e=n)}let t=e!==void 0?f.createElement(oa.Provider,{value:this.props.routeContext},f.createElement(Hp.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?f.createElement(zT,{error:e},t):t}};Qx.contextType=qx;var Ip=new WeakMap;function zT({children:e,error:t}){let{basename:n}=f.useContext(Mn);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let a=ET(t.digest);if(a){let r=Ip.get(t);if(r)throw r;let o=yx(a.location,n);if(vx&&!Ip.get(t))if(o.isExternal||a.reloadDocument)window.location.href=o.absoluteURL||o.to;else{const l=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(o.to,{replace:a.replace}));throw Ip.set(t,l),l}return f.createElement("meta",{httpEquiv:"refresh",content:`0;url=${o.absoluteURL||o.to}`})}}return e}function PT({routeContext:e,match:t,children:n}){let a=f.useContext(uo);return a&&a.static&&a.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=t.route.id),f.createElement(oa.Provider,{value:e},n)}function BT(e,t=[],n=null,a=null,r=null){if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let o=e,l=n==null?void 0:n.errors;if(l!=null){let m=o.findIndex(d=>d.route.id&&(l==null?void 0:l[d.route.id])!==void 0);je(m>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(l).join(",")}`),o=o.slice(0,Math.min(o.length,m+1))}let i=!1,c=-1;if(n)for(let m=0;m<o.length;m++){let d=o[m];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(c=m),d.route.id){let{loaderData:p,errors:h}=n,x=d.route.loader&&!p.hasOwnProperty(d.route.id)&&(!h||h[d.route.id]===void 0);if(d.route.lazy||x){i=!0,c>=0?o=o.slice(0,c+1):o=[o[0]];break}}}let u=n&&a?(m,d)=>{var p,h;a(m,{location:n.location,params:((h=(p=n.matches)==null?void 0:p[0])==null?void 0:h.params)??{},unstable_pattern:ri(n.matches),errorInfo:d})}:void 0;return o.reduceRight((m,d,p)=>{let h,x=!1,v=null,b=null;n&&(h=l&&d.route.id?l[d.route.id]:void 0,v=d.route.errorElement||LT,i&&(c<0&&p===0?(eb("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),x=!0,b=null):c===p&&(x=!0,b=d.route.hydrateFallbackElement||null)));let w=t.concat(o.slice(0,p+1)),g=()=>{let y;return h?y=v:x?y=b:d.route.Component?y=f.createElement(d.route.Component,null):d.route.element?y=d.route.element:y=m,f.createElement(PT,{match:d,routeContext:{outlet:m,matches:w,isDataRoute:n!=null},children:y})};return n&&(d.route.ErrorBoundary||d.route.errorElement||p===0)?f.createElement(Qx,{location:n.location,revalidation:n.revalidation,component:v,error:h,children:g(),routeContext:{outlet:null,matches:w,isDataRoute:!0},onError:u}):g()},null)}function Vp(e){return`${e} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function UT(e){let t=f.useContext(uo);return je(t,Vp(e)),t}function HT(e){let t=f.useContext(ii);return je(t,Vp(e)),t}function IT(e){let t=f.useContext(oa);return je(t,Vp(e)),t}function $p(e){let t=IT(e),n=t.matches[t.matches.length-1];return je(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function VT(){return $p("useRouteId")}function $T(){var a;let e=f.useContext(Hp),t=HT("useRouteError"),n=$p("useRouteError");return e!==void 0?e:(a=t.errors)==null?void 0:a[n]}function FT(){let{router:e}=UT("useNavigate"),t=$p("useNavigate"),n=f.useRef(!1);return Wx(()=>{n.current=!0}),f.useCallback(async(r,o={})=>{ct(n.current,Zx),n.current&&(typeof r=="number"?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...o}))},[e,t])}var Jx={};function eb(e,t,n){!t&&!Jx[e]&&(Jx[e]=!0,ct(!1,n))}var tb={};function nb(e,t){!e&&!tb[t]&&(tb[t]=!0,console.warn(t))}var GT="useOptimistic",ab=Qi[GT],YT=()=>{};function qT(e){return ab?ab(e):[e,YT]}function KT(e){let t={hasErrorBoundary:e.hasErrorBoundary||e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&(e.element&&ct(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(t,{element:f.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(e.hydrateFallbackElement&&ct(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(t,{hydrateFallbackElement:f.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(e.errorElement&&ct(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(t,{errorElement:f.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),t}var XT=["HydrateFallback","hydrateFallbackElement"],ZT=class{constructor(){this.status="pending",this.promise=new Promise((e,t)=>{this.resolve=n=>{this.status==="pending"&&(this.status="resolved",e(n))},this.reject=n=>{this.status==="pending"&&(this.status="rejected",t(n))}})}};function WT({router:e,flushSync:t,onError:n,unstable_useTransitions:a}){a=ST()||a;let[o,l]=f.useState(e.state),[i,c]=qT(o),[u,m]=f.useState(),[d,p]=f.useState({isTransitioning:!1}),[h,x]=f.useState(),[v,b]=f.useState(),[w,g]=f.useState(),y=f.useRef(new Map),S=f.useCallback((j,{deletedFetchers:T,newErrors:O,flushSync:D,viewTransitionOpts:H})=>{O&&n&&Object.values(O).forEach(B=>{var U;return n(B,{location:j.location,params:((U=j.matches[0])==null?void 0:U.params)??{},unstable_pattern:ri(j.matches)})}),j.fetchers.forEach((B,U)=>{B.data!==void 0&&y.current.set(U,B.data)}),T.forEach(B=>y.current.delete(B)),nb(D===!1||t!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable.  Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let k=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition=="function";if(nb(H==null||k,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!H||!k){t&&D?t(()=>l(j)):a===!1?l(j):f.startTransition(()=>{a===!0&&c(B=>rb(B,j)),l(j)});return}if(t&&D){t(()=>{v&&(h==null||h.resolve(),v.skipTransition()),p({isTransitioning:!0,flushSync:!0,currentLocation:H.currentLocation,nextLocation:H.nextLocation})});let B=e.window.document.startViewTransition(()=>{t(()=>l(j))});B.finished.finally(()=>{t(()=>{x(void 0),b(void 0),m(void 0),p({isTransitioning:!1})})}),t(()=>b(B));return}v?(h==null||h.resolve(),v.skipTransition(),g({state:j,currentLocation:H.currentLocation,nextLocation:H.nextLocation})):(m(j),p({isTransitioning:!0,flushSync:!1,currentLocation:H.currentLocation,nextLocation:H.nextLocation}))},[e.window,t,v,h,a,c,n]);f.useLayoutEffect(()=>e.subscribe(S),[e,S]),f.useEffect(()=>{d.isTransitioning&&!d.flushSync&&x(new ZT)},[d]),f.useEffect(()=>{if(h&&u&&e.window){let j=u,T=h.promise,O=e.window.document.startViewTransition(async()=>{a===!1?l(j):f.startTransition(()=>{a===!0&&c(D=>rb(D,j)),l(j)}),await T});O.finished.finally(()=>{x(void 0),b(void 0),m(void 0),p({isTransitioning:!1})}),b(O)}},[u,h,e.window,a,c]),f.useEffect(()=>{h&&u&&i.location.key===u.location.key&&h.resolve()},[h,v,i.location,u]),f.useEffect(()=>{!d.isTransitioning&&w&&(m(w.state),p({isTransitioning:!0,flushSync:!1,currentLocation:w.currentLocation,nextLocation:w.nextLocation}),g(void 0))},[d.isTransitioning,w]);let E=f.useMemo(()=>({createHref:e.createHref,encodeLocation:e.encodeLocation,go:j=>e.navigate(j),push:(j,T,O)=>e.navigate(j,{state:T,preventScrollReset:O==null?void 0:O.preventScrollReset}),replace:(j,T,O)=>e.navigate(j,{replace:!0,state:T,preventScrollReset:O==null?void 0:O.preventScrollReset})}),[e]),R=e.basename||"/",N=f.useMemo(()=>({router:e,navigator:E,static:!1,basename:R,onError:n}),[e,E,R,n]);return f.createElement(f.Fragment,null,f.createElement(uo.Provider,{value:N},f.createElement(ii.Provider,{value:i},f.createElement(Kx.Provider,{value:y.current},f.createElement(Up.Provider,{value:d},f.createElement(t4,{basename:R,location:i.location,navigationType:i.historyAction,navigator:E,unstable_useTransitions:a},f.createElement(QT,{routes:e.routes,future:e.future,state:i,onError:n})))))),null)}function rb(e,t){return{...e,navigation:t.navigation.state!=="idle"?t.navigation:e.navigation,revalidation:t.revalidation!=="idle"?t.revalidation:e.revalidation,actionData:t.navigation.state!=="submitting"?t.actionData:e.actionData,fetchers:t.fetchers}}var QT=f.memo(JT);function JT({routes:e,future:t,state:n,onError:a}){return OT(e,void 0,n,a,t)}function e4(e){return DT(e.context)}function t4({basename:e="/",children:t=null,location:n,navigationType:a="POP",navigator:r,static:o=!1,unstable_useTransitions:l}){je(!ci(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let i=e.replace(/^\/*/,"/"),c=f.useMemo(()=>({basename:i,navigator:r,static:o,unstable_useTransitions:l,future:{}}),[i,r,o,l]);typeof n=="string"&&(n=za(n));let{pathname:u="/",search:m="",hash:d="",state:p=null,key:h="default"}=n,x=f.useMemo(()=>{let v=_n(u,i);return v==null?null:{location:{pathname:v,search:m,hash:d,state:p,key:h},navigationType:a}},[i,u,m,d,p,h,a]);return ct(x!=null,`<Router basename="${i}"> is not able to match the URL "${u}${m}${d}" because it does not start with the basename, so the <Router> won't render anything.`),x==null?null:f.createElement(Mn.Provider,{value:c},f.createElement(Eu.Provider,{children:t,value:x}))}var Au="get",Ru="application/x-www-form-urlencoded";function _u(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function n4(e){return _u(e)&&e.tagName.toLowerCase()==="button"}function a4(e){return _u(e)&&e.tagName.toLowerCase()==="form"}function r4(e){return _u(e)&&e.tagName.toLowerCase()==="input"}function o4(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function l4(e,t){return e.button===0&&(!t||t==="_self")&&!o4(e)}var Tu=null;function s4(){if(Tu===null)try{new FormData(document.createElement("form"),0),Tu=!1}catch{Tu=!0}return Tu}var i4=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Fp(e){return e!=null&&!i4.has(e)?(ct(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Ru}"`),null):e}function c4(e,t){let n,a,r,o,l;if(a4(e)){let i=e.getAttribute("action");a=i?_n(i,t):null,n=e.getAttribute("method")||Au,r=Fp(e.getAttribute("enctype"))||Ru,o=new FormData(e)}else if(n4(e)||r4(e)&&(e.type==="submit"||e.type==="image")){let i=e.form;if(i==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let c=e.getAttribute("formaction")||i.getAttribute("action");if(a=c?_n(c,t):null,n=e.getAttribute("formmethod")||i.getAttribute("method")||Au,r=Fp(e.getAttribute("formenctype"))||Fp(i.getAttribute("enctype"))||Ru,o=new FormData(i,e),!s4()){let{name:u,type:m,value:d}=e;if(m==="image"){let p=u?`${u}.`:"";o.append(`${p}x`,"0"),o.append(`${p}y`,"0")}else u&&o.append(u,d)}}else{if(_u(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=Au,a=null,r=Ru,l=e}return o&&r==="text/plain"&&(l=o,o=void 0),{action:a,method:n.toLowerCase(),encType:r,formData:o,body:l}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Gp(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function u4(e,t,n,a){let r=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n?r.pathname.endsWith("/")?r.pathname=`${r.pathname}_.${a}`:r.pathname=`${r.pathname}.${a}`:r.pathname==="/"?r.pathname=`_root.${a}`:t&&_n(r.pathname,t)==="/"?r.pathname=`${t.replace(/\/$/,"")}/_root.${a}`:r.pathname=`${r.pathname.replace(/\/$/,"")}.${a}`,r}async function d4(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function f4(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function m4(e,t,n){let a=await Promise.all(e.map(async r=>{let o=t.routes[r.route.id];if(o){let l=await d4(o,n);return l.links?l.links():[]}return[]}));return g4(a.flat(1).filter(f4).filter(r=>r.rel==="stylesheet"||r.rel==="preload").map(r=>r.rel==="stylesheet"?{...r,rel:"prefetch",as:"style"}:{...r,rel:"prefetch"}))}function ob(e,t,n,a,r,o){let l=(c,u)=>n[u]?c.route.id!==n[u].route.id:!0,i=(c,u)=>{var m;return n[u].pathname!==c.pathname||((m=n[u].route.path)==null?void 0:m.endsWith("*"))&&n[u].params["*"]!==c.params["*"]};return o==="assets"?t.filter((c,u)=>l(c,u)||i(c,u)):o==="data"?t.filter((c,u)=>{var d;let m=a.routes[c.route.id];if(!m||!m.hasLoader)return!1;if(l(c,u)||i(c,u))return!0;if(c.route.shouldRevalidate){let p=c.route.shouldRevalidate({currentUrl:new URL(r.pathname+r.search+r.hash,window.origin),currentParams:((d=n[0])==null?void 0:d.params)||{},nextUrl:new URL(e,window.origin),nextParams:c.params,defaultShouldRevalidate:!0});if(typeof p=="boolean")return p}return!0}):[]}function p4(e,t,{includeHydrateFallback:n}={}){return h4(e.map(a=>{let r=t.routes[a.route.id];if(!r)return[];let o=[r.module];return r.clientActionModule&&(o=o.concat(r.clientActionModule)),r.clientLoaderModule&&(o=o.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(o=o.concat(r.hydrateFallbackModule)),r.imports&&(o=o.concat(r.imports)),o}).flat(1))}function h4(e){return[...new Set(e)]}function w4(e){let t={},n=Object.keys(e).sort();for(let a of n)t[a]=e[a];return t}function g4(e,t){let n=new Set;return new Set(t),e.reduce((a,r)=>{let o=JSON.stringify(w4(r));return n.has(o)||(n.add(o),a.push({key:o,link:r})),a},[])}function lb(){let e=f.useContext(uo);return Gp(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function v4(){let e=f.useContext(ii);return Gp(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Yp=f.createContext(void 0);Yp.displayName="FrameworkContext";function sb(){let e=f.useContext(Yp);return Gp(e,"You must render this element inside a <HydratedRouter> element"),e}function y4(e,t){let n=f.useContext(Yp),[a,r]=f.useState(!1),[o,l]=f.useState(!1),{onFocus:i,onBlur:c,onMouseEnter:u,onMouseLeave:m,onTouchStart:d}=t,p=f.useRef(null);f.useEffect(()=>{if(e==="render"&&l(!0),e==="viewport"){let v=w=>{w.forEach(g=>{l(g.isIntersecting)})},b=new IntersectionObserver(v,{threshold:.5});return p.current&&b.observe(p.current),()=>{b.disconnect()}}},[e]),f.useEffect(()=>{if(a){let v=setTimeout(()=>{l(!0)},100);return()=>{clearTimeout(v)}}},[a]);let h=()=>{r(!0)},x=()=>{r(!1),l(!1)};return n?e!=="intent"?[o,p,{}]:[o,p,{onFocus:di(i,h),onBlur:di(c,x),onMouseEnter:di(u,h),onMouseLeave:di(m,x),onTouchStart:di(d,h)}]:[!1,p,{}]}function di(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function x4({page:e,...t}){let{router:n}=lb(),a=f.useMemo(()=>xr(n.routes,e,n.basename),[n.routes,e,n.basename]);return a?f.createElement(S4,{page:e,matches:a,...t}):null}function b4(e){let{manifest:t,routeModules:n}=sb(),[a,r]=f.useState([]);return f.useEffect(()=>{let o=!1;return m4(e,t,n).then(l=>{o||r(l)}),()=>{o=!0}},[e,t,n]),a}function S4({page:e,matches:t,...n}){let a=Nr(),{future:r,manifest:o,routeModules:l}=sb(),{basename:i}=lb(),{loaderData:c,matches:u}=v4(),m=f.useMemo(()=>ob(e,t,u,o,a,"data"),[e,t,u,o,a]),d=f.useMemo(()=>ob(e,t,u,o,a,"assets"),[e,t,u,o,a]),p=f.useMemo(()=>{if(e===a.pathname+a.search+a.hash)return[];let v=new Set,b=!1;if(t.forEach(g=>{var S;let y=o.routes[g.route.id];!y||!y.hasLoader||(!m.some(E=>E.route.id===g.route.id)&&g.route.id in c&&((S=l[g.route.id])!=null&&S.shouldRevalidate)||y.hasClientLoader?b=!0:v.add(g.route.id))}),v.size===0)return[];let w=u4(e,i,r.unstable_trailingSlashAwareDataRequests,"data");return b&&v.size>0&&w.searchParams.set("_routes",t.filter(g=>v.has(g.route.id)).map(g=>g.route.id).join(",")),[w.pathname+w.search]},[i,r.unstable_trailingSlashAwareDataRequests,c,a,o,m,t,e,l]),h=f.useMemo(()=>p4(d,o),[d,o]),x=b4(d);return f.createElement(f.Fragment,null,p.map(v=>f.createElement("link",{key:v,rel:"prefetch",as:"fetch",href:v,...n})),h.map(v=>f.createElement("link",{key:v,rel:"modulepreload",href:v,...n})),x.map(({key:v,link:b})=>f.createElement("link",{key:v,nonce:n.nonce,...b,crossOrigin:b.crossOrigin??n.crossOrigin})))}function N4(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var j4=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{j4&&(window.__reactRouterVersion="7.13.0")}catch{}function C4(e,t){return W_({basename:t==null?void 0:t.basename,getContext:t==null?void 0:t.getContext,future:t==null?void 0:t.future,history:m_({window:t==null?void 0:t.window}),hydrationData:E4(),routes:e,mapRouteProperties:KT,hydrationRouteProperties:XT,dataStrategy:t==null?void 0:t.dataStrategy,patchRoutesOnNavigation:t==null?void 0:t.patchRoutesOnNavigation,window:t==null?void 0:t.window,unstable_instrumentations:t==null?void 0:t.unstable_instrumentations}).initialize()}function E4(){let e=window==null?void 0:window.__staticRouterHydrationData;return e&&e.errors&&(e={...e,errors:A4(e.errors)}),e}function A4(e){if(!e)return null;let t=Object.entries(e),n={};for(let[a,r]of t)if(r&&r.__type==="RouteErrorResponse")n[a]=new ni(r.status,r.statusText,r.data,r.internal===!0);else if(r&&r.__type==="Error"){if(r.__subType){let o=window[r.__subType];if(typeof o=="function")try{let l=new o(r.message);l.stack="",n[a]=l}catch{}}if(n[a]==null){let o=new Error(r.message);o.stack="",n[a]=o}}else n[a]=r;return n}var ib=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,cb=f.forwardRef(function({onClick:t,discover:n="render",prefetch:a="none",relative:r,reloadDocument:o,replace:l,state:i,target:c,to:u,preventScrollReset:m,viewTransition:d,unstable_defaultShouldRevalidate:p,...h},x){let{basename:v,unstable_useTransitions:b}=f.useContext(Mn),w=typeof u=="string"&&ib.test(u),g=yx(u,v);u=g.to;let y=RT(u,{relative:r}),[S,E,R]=y4(a,h),N=T4(u,{replace:l,state:i,target:c,preventScrollReset:m,relative:r,viewTransition:d,unstable_defaultShouldRevalidate:p,unstable_useTransitions:b});function j(O){t&&t(O),O.defaultPrevented||N(O)}let T=f.createElement("a",{...h,...R,href:g.absoluteURL||y,onClick:g.isExternal||o?t:j,ref:N4(x,E),target:c,"data-discover":!w&&n==="render"?"true":void 0});return S&&!w?f.createElement(f.Fragment,null,T,f.createElement(x4,{page:y})):T});cb.displayName="Link";var ub=f.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:a="",end:r=!1,style:o,to:l,viewTransition:i,children:c,...u},m){let d=ui(l,{relative:u.relative}),p=Nr(),h=f.useContext(ii),{navigator:x,basename:v}=f.useContext(Mn),b=h!=null&&L4(d)&&i===!0,w=x.encodeLocation?x.encodeLocation(d).pathname:d.pathname,g=p.pathname,y=h&&h.navigation&&h.navigation.location?h.navigation.location.pathname:null;n||(g=g.toLowerCase(),y=y?y.toLowerCase():null,w=w.toLowerCase()),y&&v&&(y=_n(y,v)||y);const S=w!=="/"&&w.endsWith("/")?w.length-1:w.length;let E=g===w||!r&&g.startsWith(w)&&g.charAt(S)==="/",R=y!=null&&(y===w||!r&&y.startsWith(w)&&y.charAt(w.length)==="/"),N={isActive:E,isPending:R,isTransitioning:b},j=E?t:void 0,T;typeof a=="function"?T=a(N):T=[a,E?"active":null,R?"pending":null,b?"transitioning":null].filter(Boolean).join(" ");let O=typeof o=="function"?o(N):o;return f.createElement(cb,{...u,"aria-current":j,className:T,ref:m,style:O,to:l,viewTransition:i},typeof c=="function"?c(N):c)});ub.displayName="NavLink";var R4=f.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:a,replace:r,state:o,method:l=Au,action:i,onSubmit:c,relative:u,preventScrollReset:m,viewTransition:d,unstable_defaultShouldRevalidate:p,...h},x)=>{let{unstable_useTransitions:v}=f.useContext(Mn),b=O4(),w=k4(i,{relative:u}),g=l.toLowerCase()==="get"?"get":"post",y=typeof i=="string"&&ib.test(i),S=E=>{if(c&&c(E),E.defaultPrevented)return;E.preventDefault();let R=E.nativeEvent.submitter,N=(R==null?void 0:R.getAttribute("formmethod"))||l,j=()=>b(R||E.currentTarget,{fetcherKey:t,method:N,navigate:n,replace:r,state:o,relative:u,preventScrollReset:m,viewTransition:d,unstable_defaultShouldRevalidate:p});v&&n!==!1?f.startTransition(()=>j()):j()};return f.createElement("form",{ref:x,method:g,action:w,onSubmit:a?c:S,...h,"data-discover":!y&&e==="render"?"true":void 0})});R4.displayName="Form";function _4(e){return`${e} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function db(e){let t=f.useContext(uo);return je(t,_4(e)),t}function T4(e,{target:t,replace:n,state:a,preventScrollReset:r,relative:o,viewTransition:l,unstable_defaultShouldRevalidate:i,unstable_useTransitions:c}={}){let u=_T(),m=Nr(),d=ui(e,{relative:o});return f.useCallback(p=>{if(l4(p,t)){p.preventDefault();let h=n!==void 0?n:aa(m)===aa(d),x=()=>u(e,{replace:h,state:a,preventScrollReset:r,relative:o,viewTransition:l,unstable_defaultShouldRevalidate:i});c?f.startTransition(()=>x()):x()}},[m,u,d,n,a,t,e,r,o,l,i,c])}var M4=0,D4=()=>`__${String(++M4)}__`;function O4(){let{router:e}=db("useSubmit"),{basename:t}=f.useContext(Mn),n=VT(),a=e.fetch,r=e.navigate;return f.useCallback(async(o,l={})=>{let{action:i,method:c,encType:u,formData:m,body:d}=c4(o,t);if(l.navigate===!1){let p=l.fetcherKey||D4();await a(p,n,l.action||i,{unstable_defaultShouldRevalidate:l.unstable_defaultShouldRevalidate,preventScrollReset:l.preventScrollReset,formData:m,body:d,formMethod:l.method||c,formEncType:l.encType||u,flushSync:l.flushSync})}else await r(l.action||i,{unstable_defaultShouldRevalidate:l.unstable_defaultShouldRevalidate,preventScrollReset:l.preventScrollReset,formData:m,body:d,formMethod:l.method||c,formEncType:l.encType||u,replace:l.replace,state:l.state,fromRouteId:n,flushSync:l.flushSync,viewTransition:l.viewTransition})},[a,r,t,n])}function k4(e,{relative:t}={}){let{basename:n}=f.useContext(Mn),a=f.useContext(oa);je(a,"useFormAction must be used inside a RouteContext");let[r]=a.matches.slice(-1),o={...ui(e||".",{relative:t})},l=Nr();if(e==null){o.search=l.search;let i=new URLSearchParams(o.search),c=i.getAll("index");if(c.some(m=>m==="")){i.delete("index"),c.filter(d=>d).forEach(d=>i.append("index",d));let m=i.toString();o.search=m?`?${m}`:""}}return(!e||e===".")&&r.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(o.pathname=o.pathname==="/"?n:ra([n,o.pathname])),aa(o)}function L4(e,{relative:t}={}){let n=f.useContext(Up);je(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`.  Did you accidentally import `RouterProvider` from `react-router`?");let{basename:a}=db("useViewTransitionState"),r=ui(e,{relative:t});if(!n.isTransitioning)return!1;let o=_n(n.currentLocation.pathname,a)||n.currentLocation.pathname,l=_n(n.nextLocation.pathname,a)||n.nextLocation.pathname;return Su(r.pathname,l)!=null||Su(r.pathname,o)!=null}function z4(e){return f.createElement(WT,{flushSync:Vr.flushSync,...e})}function P4(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const B4=e=>{switch(e){case"success":return I4;case"info":return $4;case"warning":return V4;case"error":return F4;default:return null}},U4=Array(12).fill(0),H4=({visible:e,className:t})=>K.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},K.createElement("div",{className:"sonner-spinner"},U4.map((n,a)=>K.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${a}`})))),I4=K.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},K.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"})),V4=K.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},K.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"})),$4=K.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},K.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"})),F4=K.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},K.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"})),G4=K.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"},K.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),K.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),Y4=()=>{const[e,t]=K.useState(document.hidden);return K.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let qp=1;class q4{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var n;const{message:a,...r}=t,o=typeof(t==null?void 0:t.id)=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:qp++,l=this.toasts.find(c=>c.id===o),i=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(o)&&this.dismissedToasts.delete(o),l?this.toasts=this.toasts.map(c=>c.id===o?(this.publish({...c,...t,id:o,title:a}),{...c,...t,id:o,dismissible:i,title:a}):c):this.addToast({title:a,...r,dismissible:i,id:o}),o},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:t,dismiss:!0})))):this.toasts.forEach(n=>{this.subscribers.forEach(a=>a({id:n.id,dismiss:!0}))}),t),this.message=(t,n)=>this.create({...n,message:t}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let a;n.loading!==void 0&&(a=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const r=Promise.resolve(t instanceof Function?t():t);let o=a!==void 0,l;const i=r.then(async u=>{if(l=["resolve",u],K.isValidElement(u))o=!1,this.create({id:a,type:"default",message:u});else if(X4(u)&&!u.ok){o=!1;const d=typeof n.error=="function"?await n.error(`HTTP error! status: ${u.status}`):n.error,p=typeof n.description=="function"?await n.description(`HTTP error! status: ${u.status}`):n.description,x=typeof d=="object"&&!K.isValidElement(d)?d:{message:d};this.create({id:a,type:"error",description:p,...x})}else if(u instanceof Error){o=!1;const d=typeof n.error=="function"?await n.error(u):n.error,p=typeof n.description=="function"?await n.description(u):n.description,x=typeof d=="object"&&!K.isValidElement(d)?d:{message:d};this.create({id:a,type:"error",description:p,...x})}else if(n.success!==void 0){o=!1;const d=typeof n.success=="function"?await n.success(u):n.success,p=typeof n.description=="function"?await n.description(u):n.description,x=typeof d=="object"&&!K.isValidElement(d)?d:{message:d};this.create({id:a,type:"success",description:p,...x})}}).catch(async u=>{if(l=["reject",u],n.error!==void 0){o=!1;const m=typeof n.error=="function"?await n.error(u):n.error,d=typeof n.description=="function"?await n.description(u):n.description,h=typeof m=="object"&&!K.isValidElement(m)?m:{message:m};this.create({id:a,type:"error",description:d,...h})}}).finally(()=>{o&&(this.dismiss(a),a=void 0),n.finally==null||n.finally.call(n)}),c=()=>new Promise((u,m)=>i.then(()=>l[0]==="reject"?m(l[1]):u(l[1])).catch(m));return typeof a!="string"&&typeof a!="number"?{unwrap:c}:Object.assign(a,{unwrap:c})},this.custom=(t,n)=>{const a=(n==null?void 0:n.id)||qp++;return this.create({jsx:t(a),id:a,...n}),a},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const Zt=new q4,K4=(e,t)=>{const n=(t==null?void 0:t.id)||qp++;return Zt.addToast({title:e,...t,id:n}),n},X4=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",Z4=K4,W4=()=>Zt.toasts,Q4=()=>Zt.getActiveToasts(),Re=Object.assign(Z4,{success:Zt.success,info:Zt.info,warning:Zt.warning,error:Zt.error,custom:Zt.custom,message:Zt.message,promise:Zt.promise,dismiss:Zt.dismiss,loading:Zt.loading},{getHistory:W4,getToasts:Q4});P4("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function Mu(e){return e.label!==void 0}const J4=3,eM="24px",tM="16px",fb=4e3,nM=356,aM=14,rM=45,oM=200;function la(...e){return e.filter(Boolean).join(" ")}function lM(e){const[t,n]=e.split("-"),a=[];return t&&a.push(t),n&&a.push(n),a}const sM=e=>{var t,n,a,r,o,l,i,c,u;const{invert:m,toast:d,unstyled:p,interacting:h,setHeights:x,visibleToasts:v,heights:b,index:w,toasts:g,expanded:y,removeToast:S,defaultRichColors:E,closeButton:R,style:N,cancelButtonStyle:j,actionButtonStyle:T,className:O="",descriptionClassName:D="",duration:H,position:k,gap:B,expandByDefault:U,classNames:C,icons:L,closeButtonAriaLabel:_="Close toast"}=e,[z,$]=K.useState(null),[J,me]=K.useState(null),[Z,Q]=K.useState(!1),[ee,ge]=K.useState(!1),[Y,W]=K.useState(!1),[pe,ue]=K.useState(!1),[re,F]=K.useState(!1),[he,Ce]=K.useState(0),[We,Ve]=K.useState(0),tt=K.useRef(d.duration||H||fb),Qt=K.useRef(null),Ye=K.useRef(null),Zn=w===0,$a=w+1<=v,St=d.type,Pn=d.dismissible!==!1,Bn=d.className||"",ha=d.descriptionClassName||"",Fa=K.useMemo(()=>b.findIndex(ve=>ve.toastId===d.id)||0,[b,d.id]),Pr=K.useMemo(()=>{var ve;return(ve=d.closeButton)!=null?ve:R},[d.closeButton,R]),Jt=K.useMemo(()=>d.duration||H||fb,[d.duration,H]),kt=K.useRef(0),Pt=K.useRef(0),Br=K.useRef(0),en=K.useRef(null),[Ur,vn]=k.split("-"),So=K.useMemo(()=>b.reduce((ve,nt,ot)=>ot>=Fa?ve:ve+nt.height,0),[b,Fa]),No=Y4(),Wl=d.invert||m,jo=St==="loading";Pt.current=K.useMemo(()=>Fa*B+So,[Fa,So]),K.useEffect(()=>{tt.current=Jt},[Jt]),K.useEffect(()=>{Q(!0)},[]),K.useEffect(()=>{const ve=Ye.current;if(ve){const nt=ve.getBoundingClientRect().height;return Ve(nt),x(ot=>[{toastId:d.id,height:nt,position:d.position},...ot]),()=>x(ot=>ot.filter(wt=>wt.toastId!==d.id))}},[x,d.id]),K.useLayoutEffect(()=>{if(!Z)return;const ve=Ye.current,nt=ve.style.height;ve.style.height="auto";const ot=ve.getBoundingClientRect().height;ve.style.height=nt,Ve(ot),x(wt=>wt.find(gt=>gt.toastId===d.id)?wt.map(gt=>gt.toastId===d.id?{...gt,height:ot}:gt):[{toastId:d.id,height:ot,position:d.position},...wt])},[Z,d.title,d.description,x,d.id,d.jsx,d.action,d.cancel]);const tn=K.useCallback(()=>{ge(!0),Ce(Pt.current),x(ve=>ve.filter(nt=>nt.toastId!==d.id)),setTimeout(()=>{S(d)},oM)},[d,S,x,Pt]);K.useEffect(()=>{if(d.promise&&St==="loading"||d.duration===1/0||d.type==="loading")return;let ve;return y||h||No?(()=>{if(Br.current<kt.current){const wt=new Date().getTime()-kt.current;tt.current=tt.current-wt}Br.current=new Date().getTime()})():(()=>{tt.current!==1/0&&(kt.current=new Date().getTime(),ve=setTimeout(()=>{d.onAutoClose==null||d.onAutoClose.call(d,d),tn()},tt.current))})(),()=>clearTimeout(ve)},[y,h,d,St,No,tn]),K.useEffect(()=>{d.delete&&(tn(),d.onDismiss==null||d.onDismiss.call(d,d))},[tn,d.delete]);function Hr(){var ve;if(L!=null&&L.loading){var nt;return K.createElement("div",{className:la(C==null?void 0:C.loader,d==null||(nt=d.classNames)==null?void 0:nt.loader,"sonner-loader"),"data-visible":St==="loading"},L.loading)}return K.createElement(H4,{className:la(C==null?void 0:C.loader,d==null||(ve=d.classNames)==null?void 0:ve.loader),visible:St==="loading"})}const Co=d.icon||(L==null?void 0:L[St])||B4(St);var Ga,Eo;return K.createElement("li",{tabIndex:0,ref:Ye,className:la(O,Bn,C==null?void 0:C.toast,d==null||(t=d.classNames)==null?void 0:t.toast,C==null?void 0:C.default,C==null?void 0:C[St],d==null||(n=d.classNames)==null?void 0:n[St]),"data-sonner-toast":"","data-rich-colors":(Ga=d.richColors)!=null?Ga:E,"data-styled":!(d.jsx||d.unstyled||p),"data-mounted":Z,"data-promise":!!d.promise,"data-swiped":re,"data-removed":ee,"data-visible":$a,"data-y-position":Ur,"data-x-position":vn,"data-index":w,"data-front":Zn,"data-swiping":Y,"data-dismissible":Pn,"data-type":St,"data-invert":Wl,"data-swipe-out":pe,"data-swipe-direction":J,"data-expanded":!!(y||U&&Z),"data-testid":d.testId,style:{"--index":w,"--toasts-before":w,"--z-index":g.length-w,"--offset":`${ee?he:Pt.current}px`,"--initial-height":U?"auto":`${We}px`,...N,...d.style},onDragEnd:()=>{W(!1),$(null),en.current=null},onPointerDown:ve=>{ve.button!==2&&(jo||!Pn||(Qt.current=new Date,Ce(Pt.current),ve.target.setPointerCapture(ve.pointerId),ve.target.tagName!=="BUTTON"&&(W(!0),en.current={x:ve.clientX,y:ve.clientY})))},onPointerUp:()=>{var ve,nt,ot;if(pe||!Pn)return;en.current=null;const wt=Number(((ve=Ye.current)==null?void 0:ve.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Ya=Number(((nt=Ye.current)==null?void 0:nt.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),gt=new Date().getTime()-((ot=Qt.current)==null?void 0:ot.getTime()),nn=z==="x"?wt:Ya,Ql=Math.abs(nn)/gt;if(Math.abs(nn)>=rM||Ql>.11){Ce(Pt.current),d.onDismiss==null||d.onDismiss.call(d,d),me(z==="x"?wt>0?"right":"left":Ya>0?"down":"up"),tn(),ue(!0);return}else{var A,M;(A=Ye.current)==null||A.style.setProperty("--swipe-amount-x","0px"),(M=Ye.current)==null||M.style.setProperty("--swipe-amount-y","0px")}F(!1),W(!1),$(null)},onPointerMove:ve=>{var nt,ot,wt;if(!en.current||!Pn||((nt=window.getSelection())==null?void 0:nt.toString().length)>0)return;const gt=ve.clientY-en.current.y,nn=ve.clientX-en.current.x;var Ql;const A=(Ql=e.swipeDirections)!=null?Ql:lM(k);!z&&(Math.abs(nn)>1||Math.abs(gt)>1)&&$(Math.abs(nn)>Math.abs(gt)?"x":"y");let M={x:0,y:0};const P=G=>1/(1.5+Math.abs(G)/20);if(z==="y"){if(A.includes("top")||A.includes("bottom"))if(A.includes("top")&&gt<0||A.includes("bottom")&&gt>0)M.y=gt;else{const G=gt*P(gt);M.y=Math.abs(G)<Math.abs(gt)?G:gt}}else if(z==="x"&&(A.includes("left")||A.includes("right")))if(A.includes("left")&&nn<0||A.includes("right")&&nn>0)M.x=nn;else{const G=nn*P(nn);M.x=Math.abs(G)<Math.abs(nn)?G:nn}(Math.abs(M.x)>0||Math.abs(M.y)>0)&&F(!0),(ot=Ye.current)==null||ot.style.setProperty("--swipe-amount-x",`${M.x}px`),(wt=Ye.current)==null||wt.style.setProperty("--swipe-amount-y",`${M.y}px`)}},Pr&&!d.jsx&&St!=="loading"?K.createElement("button",{"aria-label":_,"data-disabled":jo,"data-close-button":!0,onClick:jo||!Pn?()=>{}:()=>{tn(),d.onDismiss==null||d.onDismiss.call(d,d)},className:la(C==null?void 0:C.closeButton,d==null||(a=d.classNames)==null?void 0:a.closeButton)},(Eo=L==null?void 0:L.close)!=null?Eo:G4):null,(St||d.icon||d.promise)&&d.icon!==null&&((L==null?void 0:L[St])!==null||d.icon)?K.createElement("div",{"data-icon":"",className:la(C==null?void 0:C.icon,d==null||(r=d.classNames)==null?void 0:r.icon)},d.promise||d.type==="loading"&&!d.icon?d.icon||Hr():null,d.type!=="loading"?Co:null):null,K.createElement("div",{"data-content":"",className:la(C==null?void 0:C.content,d==null||(o=d.classNames)==null?void 0:o.content)},K.createElement("div",{"data-title":"",className:la(C==null?void 0:C.title,d==null||(l=d.classNames)==null?void 0:l.title)},d.jsx?d.jsx:typeof d.title=="function"?d.title():d.title),d.description?K.createElement("div",{"data-description":"",className:la(D,ha,C==null?void 0:C.description,d==null||(i=d.classNames)==null?void 0:i.description)},typeof d.description=="function"?d.description():d.description):null),K.isValidElement(d.cancel)?d.cancel:d.cancel&&Mu(d.cancel)?K.createElement("button",{"data-button":!0,"data-cancel":!0,style:d.cancelButtonStyle||j,onClick:ve=>{Mu(d.cancel)&&Pn&&(d.cancel.onClick==null||d.cancel.onClick.call(d.cancel,ve),tn())},className:la(C==null?void 0:C.cancelButton,d==null||(c=d.classNames)==null?void 0:c.cancelButton)},d.cancel.label):null,K.isValidElement(d.action)?d.action:d.action&&Mu(d.action)?K.createElement("button",{"data-button":!0,"data-action":!0,style:d.actionButtonStyle||T,onClick:ve=>{Mu(d.action)&&(d.action.onClick==null||d.action.onClick.call(d.action,ve),!ve.defaultPrevented&&tn())},className:la(C==null?void 0:C.actionButton,d==null||(u=d.classNames)==null?void 0:u.actionButton)},d.action.label):null)};function mb(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function iM(e,t){const n={};return[e,t].forEach((a,r)=>{const o=r===1,l=o?"--mobile-offset":"--offset",i=o?tM:eM;function c(u){["top","right","bottom","left"].forEach(m=>{n[`${l}-${m}`]=typeof u=="number"?`${u}px`:u})}typeof a=="number"||typeof a=="string"?c(a):typeof a=="object"?["top","right","bottom","left"].forEach(u=>{a[u]===void 0?n[`${l}-${u}`]=i:n[`${l}-${u}`]=typeof a[u]=="number"?`${a[u]}px`:a[u]}):c(i)}),n}const cM=K.forwardRef(function(t,n){const{id:a,invert:r,position:o="bottom-right",hotkey:l=["altKey","KeyT"],expand:i,closeButton:c,className:u,offset:m,mobileOffset:d,theme:p="light",richColors:h,duration:x,style:v,visibleToasts:b=J4,toastOptions:w,dir:g=mb(),gap:y=aM,icons:S,containerAriaLabel:E="Notifications"}=t,[R,N]=K.useState([]),j=K.useMemo(()=>a?R.filter(Z=>Z.toasterId===a):R.filter(Z=>!Z.toasterId),[R,a]),T=K.useMemo(()=>Array.from(new Set([o].concat(j.filter(Z=>Z.position).map(Z=>Z.position)))),[j,o]),[O,D]=K.useState([]),[H,k]=K.useState(!1),[B,U]=K.useState(!1),[C,L]=K.useState(p!=="system"?p:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),_=K.useRef(null),z=l.join("+").replace(/Key/g,"").replace(/Digit/g,""),$=K.useRef(null),J=K.useRef(!1),me=K.useCallback(Z=>{N(Q=>{var ee;return(ee=Q.find(ge=>ge.id===Z.id))!=null&&ee.delete||Zt.dismiss(Z.id),Q.filter(({id:ge})=>ge!==Z.id)})},[]);return K.useEffect(()=>Zt.subscribe(Z=>{if(Z.dismiss){requestAnimationFrame(()=>{N(Q=>Q.map(ee=>ee.id===Z.id?{...ee,delete:!0}:ee))});return}setTimeout(()=>{Kw.flushSync(()=>{N(Q=>{const ee=Q.findIndex(ge=>ge.id===Z.id);return ee!==-1?[...Q.slice(0,ee),{...Q[ee],...Z},...Q.slice(ee+1)]:[Z,...Q]})})})}),[R]),K.useEffect(()=>{if(p!=="system"){L(p);return}if(p==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?L("dark"):L("light")),typeof window>"u")return;const Z=window.matchMedia("(prefers-color-scheme: dark)");try{Z.addEventListener("change",({matches:Q})=>{L(Q?"dark":"light")})}catch{Z.addListener(({matches:ee})=>{try{L(ee?"dark":"light")}catch(ge){console.error(ge)}})}},[p]),K.useEffect(()=>{R.length<=1&&k(!1)},[R]),K.useEffect(()=>{const Z=Q=>{var ee;if(l.every(W=>Q[W]||Q.code===W)){var Y;k(!0),(Y=_.current)==null||Y.focus()}Q.code==="Escape"&&(document.activeElement===_.current||(ee=_.current)!=null&&ee.contains(document.activeElement))&&k(!1)};return document.addEventListener("keydown",Z),()=>document.removeEventListener("keydown",Z)},[l]),K.useEffect(()=>{if(_.current)return()=>{$.current&&($.current.focus({preventScroll:!0}),$.current=null,J.current=!1)}},[_.current]),K.createElement("section",{ref:n,"aria-label":`${E} ${z}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},T.map((Z,Q)=>{var ee;const[ge,Y]=Z.split("-");return j.length?K.createElement("ol",{key:Z,dir:g==="auto"?mb():g,tabIndex:-1,ref:_,className:u,"data-sonner-toaster":!0,"data-sonner-theme":C,"data-y-position":ge,"data-x-position":Y,style:{"--front-toast-height":`${((ee=O[0])==null?void 0:ee.height)||0}px`,"--width":`${nM}px`,"--gap":`${y}px`,...v,...iM(m,d)},onBlur:W=>{J.current&&!W.currentTarget.contains(W.relatedTarget)&&(J.current=!1,$.current&&($.current.focus({preventScroll:!0}),$.current=null))},onFocus:W=>{W.target instanceof HTMLElement&&W.target.dataset.dismissible==="false"||J.current||(J.current=!0,$.current=W.relatedTarget)},onMouseEnter:()=>k(!0),onMouseMove:()=>k(!0),onMouseLeave:()=>{B||k(!1)},onDragEnd:()=>k(!1),onPointerDown:W=>{W.target instanceof HTMLElement&&W.target.dataset.dismissible==="false"||U(!0)},onPointerUp:()=>U(!1)},j.filter(W=>!W.position&&Q===0||W.position===Z).map((W,pe)=>{var ue,re;return K.createElement(sM,{key:W.id,icons:S,index:pe,toast:W,defaultRichColors:h,duration:(ue=w==null?void 0:w.duration)!=null?ue:x,className:w==null?void 0:w.className,descriptionClassName:w==null?void 0:w.descriptionClassName,invert:r,visibleToasts:b,closeButton:(re=w==null?void 0:w.closeButton)!=null?re:c,interacting:B,position:Z,style:w==null?void 0:w.style,unstyled:w==null?void 0:w.unstyled,classNames:w==null?void 0:w.classNames,cancelButtonStyle:w==null?void 0:w.cancelButtonStyle,actionButtonStyle:w==null?void 0:w.actionButtonStyle,closeButtonAriaLabel:w==null?void 0:w.closeButtonAriaLabel,removeToast:me,toasts:j.filter(F=>F.position==W.position),heights:O.filter(F=>F.position==W.position),setHeights:D,expandByDefault:i,gap:y,expanded:H,swipeDirections:t.swipeDirections})})):null}))});function pb(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function sa(...e){return t=>{let n=!1;const a=e.map(r=>{const o=pb(r,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let r=0;r<a.length;r++){const o=a[r];typeof o=="function"?o():pb(e[r],null)}}}}function fe(...e){return f.useCallback(sa(...e),e)}var uM=Symbol.for("react.lazy"),Du=Qi[" use ".trim().toString()];function dM(e){return typeof e=="object"&&e!==null&&"then"in e}function hb(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===uM&&"_payload"in e&&dM(e._payload)}function Ou(e){const t=fM(e),n=f.forwardRef((a,r)=>{let{children:o,...l}=a;hb(o)&&typeof Du=="function"&&(o=Du(o._payload));const i=f.Children.toArray(o),c=i.find(pM);if(c){const u=c.props.children,m=i.map(d=>d===c?f.Children.count(u)>1?f.Children.only(null):f.isValidElement(u)?u.props.children:null:d);return s.jsx(t,{...l,ref:r,children:f.isValidElement(u)?f.cloneElement(u,void 0,m):null})}return s.jsx(t,{...l,ref:r,children:o})});return n.displayName=`${e}.Slot`,n}var fo=Ou("Slot");function fM(e){const t=f.forwardRef((n,a)=>{let{children:r,...o}=n;if(hb(r)&&typeof Du=="function"&&(r=Du(r._payload)),f.isValidElement(r)){const l=wM(r),i=hM(o,r.props);return r.type!==f.Fragment&&(i.ref=a?sa(a,l):l),f.cloneElement(r,i)}return f.Children.count(r)>1?f.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var mM=Symbol("radix.slottable");function pM(e){return f.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===mM}function hM(e,t){const n={...t};for(const a in t){const r=e[a],o=t[a];/^on[A-Z]/.test(a)?r&&o?n[a]=(...i)=>{const c=o(...i);return r(...i),c}:r&&(n[a]=r):a==="style"?n[a]={...r,...o}:a==="className"&&(n[a]=[r,o].filter(Boolean).join(" "))}return{...e,...n}}function wM(e){var a,r;let t=(a=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:a.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function wb(e){var t,n,a="";if(typeof e=="string"||typeof e=="number")a+=e;else if(typeof e=="object")if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(n=wb(e[t]))&&(a&&(a+=" "),a+=n)}else for(n in e)e[n]&&(a&&(a+=" "),a+=n);return a}function gb(){for(var e,t,n=0,a="",r=arguments.length;n<r;n++)(e=arguments[n])&&(t=wb(e))&&(a&&(a+=" "),a+=t);return a}const vb=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,yb=gb,Sl=(e,t)=>n=>{var a;if((t==null?void 0:t.variants)==null)return yb(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:r,defaultVariants:o}=t,l=Object.keys(r).map(u=>{const m=n==null?void 0:n[u],d=o==null?void 0:o[u];if(m===null)return null;const p=vb(m)||vb(d);return r[u][p]}),i=n&&Object.entries(n).reduce((u,m)=>{let[d,p]=m;return p===void 0||(u[d]=p),u},{}),c=t==null||(a=t.compoundVariants)===null||a===void 0?void 0:a.reduce((u,m)=>{let{class:d,className:p,...h}=m;return Object.entries(h).every(x=>{let[v,b]=x;return Array.isArray(b)?b.includes({...o,...i}[v]):{...o,...i}[v]===b})?[...u,d,p]:u},[]);return yb(e,l,c,n==null?void 0:n.class,n==null?void 0:n.className)},gM=(e,t)=>{const n=new Array(e.length+t.length);for(let a=0;a<e.length;a++)n[a]=e[a];for(let a=0;a<t.length;a++)n[e.length+a]=t[a];return n},vM=(e,t)=>({classGroupId:e,validator:t}),xb=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),ku="-",bb=[],yM="arbitrary..",xM=e=>{const t=SM(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:a}=e;return{getClassGroupId:l=>{if(l.startsWith("[")&&l.endsWith("]"))return bM(l);const i=l.split(ku),c=i[0]===""&&i.length>1?1:0;return Sb(i,c,t)},getConflictingClassGroupIds:(l,i)=>{if(i){const c=a[l],u=n[l];return c?u?gM(u,c):c:u||bb}return n[l]||bb}}},Sb=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const r=e[t],o=n.nextPart.get(r);if(o){const u=Sb(e,t+1,o);if(u)return u}const l=n.validators;if(l===null)return;const i=t===0?e.join(ku):e.slice(t).join(ku),c=l.length;for(let u=0;u<c;u++){const m=l[u];if(m.validator(i))return m.classGroupId}},bM=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),a=t.slice(0,n);return a?yM+a:void 0})(),SM=e=>{const{theme:t,classGroups:n}=e;return NM(n,t)},NM=(e,t)=>{const n=xb();for(const a in e){const r=e[a];Kp(r,n,a,t)}return n},Kp=(e,t,n,a)=>{const r=e.length;for(let o=0;o<r;o++){const l=e[o];jM(l,t,n,a)}},jM=(e,t,n,a)=>{if(typeof e=="string"){CM(e,t,n);return}if(typeof e=="function"){EM(e,t,n,a);return}AM(e,t,n,a)},CM=(e,t,n)=>{const a=e===""?t:Nb(t,e);a.classGroupId=n},EM=(e,t,n,a)=>{if(RM(e)){Kp(e(a),t,n,a);return}t.validators===null&&(t.validators=[]),t.validators.push(vM(n,e))},AM=(e,t,n,a)=>{const r=Object.entries(e),o=r.length;for(let l=0;l<o;l++){const[i,c]=r[l];Kp(c,Nb(t,i),n,a)}},Nb=(e,t)=>{let n=e;const a=t.split(ku),r=a.length;for(let o=0;o<r;o++){const l=a[o];let i=n.nextPart.get(l);i||(i=xb(),n.nextPart.set(l,i)),n=i}return n},RM=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,_M=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),a=Object.create(null);const r=(o,l)=>{n[o]=l,t++,t>e&&(t=0,a=n,n=Object.create(null))};return{get(o){let l=n[o];if(l!==void 0)return l;if((l=a[o])!==void 0)return r(o,l),l},set(o,l){o in n?n[o]=l:r(o,l)}}},Xp="!",jb=":",TM=[],Cb=(e,t,n,a,r)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:a,isExternal:r}),MM=e=>{const{prefix:t,experimentalParseClassName:n}=e;let a=r=>{const o=[];let l=0,i=0,c=0,u;const m=r.length;for(let v=0;v<m;v++){const b=r[v];if(l===0&&i===0){if(b===jb){o.push(r.slice(c,v)),c=v+1;continue}if(b==="/"){u=v;continue}}b==="["?l++:b==="]"?l--:b==="("?i++:b===")"&&i--}const d=o.length===0?r:r.slice(c);let p=d,h=!1;d.endsWith(Xp)?(p=d.slice(0,-1),h=!0):d.startsWith(Xp)&&(p=d.slice(1),h=!0);const x=u&&u>c?u-c:void 0;return Cb(o,h,p,x)};if(t){const r=t+jb,o=a;a=l=>l.startsWith(r)?o(l.slice(r.length)):Cb(TM,!1,l,void 0,!0)}if(n){const r=a;a=o=>n({className:o,parseClassName:r})}return a},DM=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,a)=>{t.set(n,1e6+a)}),n=>{const a=[];let r=[];for(let o=0;o<n.length;o++){const l=n[o],i=l[0]==="[",c=t.has(l);i||c?(r.length>0&&(r.sort(),a.push(...r),r=[]),a.push(l)):r.push(l)}return r.length>0&&(r.sort(),a.push(...r)),a}},OM=e=>({cache:_M(e.cacheSize),parseClassName:MM(e),sortModifiers:DM(e),...xM(e)}),kM=/\s+/,LM=(e,t)=>{const{parseClassName:n,getClassGroupId:a,getConflictingClassGroupIds:r,sortModifiers:o}=t,l=[],i=e.trim().split(kM);let c="";for(let u=i.length-1;u>=0;u-=1){const m=i[u],{isExternal:d,modifiers:p,hasImportantModifier:h,baseClassName:x,maybePostfixModifierPosition:v}=n(m);if(d){c=m+(c.length>0?" "+c:c);continue}let b=!!v,w=a(b?x.substring(0,v):x);if(!w){if(!b){c=m+(c.length>0?" "+c:c);continue}if(w=a(x),!w){c=m+(c.length>0?" "+c:c);continue}b=!1}const g=p.length===0?"":p.length===1?p[0]:o(p).join(":"),y=h?g+Xp:g,S=y+w;if(l.indexOf(S)>-1)continue;l.push(S);const E=r(w,b);for(let R=0;R<E.length;++R){const N=E[R];l.push(y+N)}c=m+(c.length>0?" "+c:c)}return c},zM=(...e)=>{let t=0,n,a,r="";for(;t<e.length;)(n=e[t++])&&(a=Eb(n))&&(r&&(r+=" "),r+=a);return r},Eb=e=>{if(typeof e=="string")return e;let t,n="";for(let a=0;a<e.length;a++)e[a]&&(t=Eb(e[a]))&&(n&&(n+=" "),n+=t);return n},Ab=(e,...t)=>{let n,a,r,o;const l=c=>{const u=t.reduce((m,d)=>d(m),e());return n=OM(u),a=n.cache.get,r=n.cache.set,o=i,i(c)},i=c=>{const u=a(c);if(u)return u;const m=LM(c,n);return r(c,m),m};return o=l,(...c)=>o(zM(...c))},PM=[],xt=e=>{const t=n=>n[e]||PM;return t.isThemeGetter=!0,t},Rb=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,_b=/^\((?:(\w[\w-]*):)?(.+)\)$/i,BM=/^\d+\/\d+$/,UM=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,HM=/\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$/,IM=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,VM=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,$M=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Nl=e=>BM.test(e),Ne=e=>!!e&&!Number.isNaN(Number(e)),jr=e=>!!e&&Number.isInteger(Number(e)),Zp=e=>e.endsWith("%")&&Ne(e.slice(0,-1)),Ba=e=>UM.test(e),FM=()=>!0,GM=e=>HM.test(e)&&!IM.test(e),Tb=()=>!1,YM=e=>VM.test(e),qM=e=>$M.test(e),KM=e=>!ne(e)&&!ae(e),XM=e=>jl(e,Lb,Tb),ne=e=>Rb.test(e),mo=e=>jl(e,zb,GM),Wp=e=>jl(e,e5,Ne),Mb=e=>jl(e,Ob,Tb),ZM=e=>jl(e,kb,qM),Lu=e=>jl(e,Pb,YM),ae=e=>_b.test(e),fi=e=>Cl(e,zb),WM=e=>Cl(e,t5),Db=e=>Cl(e,Ob),QM=e=>Cl(e,Lb),JM=e=>Cl(e,kb),zu=e=>Cl(e,Pb,!0),jl=(e,t,n)=>{const a=Rb.exec(e);return a?a[1]?t(a[1]):n(a[2]):!1},Cl=(e,t,n=!1)=>{const a=_b.exec(e);return a?a[1]?t(a[1]):n:!1},Ob=e=>e==="position"||e==="percentage",kb=e=>e==="image"||e==="url",Lb=e=>e==="length"||e==="size"||e==="bg-size",zb=e=>e==="length",e5=e=>e==="number",t5=e=>e==="family-name",Pb=e=>e==="shadow",Bb=()=>{const e=xt("color"),t=xt("font"),n=xt("text"),a=xt("font-weight"),r=xt("tracking"),o=xt("leading"),l=xt("breakpoint"),i=xt("container"),c=xt("spacing"),u=xt("radius"),m=xt("shadow"),d=xt("inset-shadow"),p=xt("text-shadow"),h=xt("drop-shadow"),x=xt("blur"),v=xt("perspective"),b=xt("aspect"),w=xt("ease"),g=xt("animate"),y=()=>["auto","avoid","all","avoid-page","page","left","right","column"],S=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],E=()=>[...S(),ae,ne],R=()=>["auto","hidden","clip","visible","scroll"],N=()=>["auto","contain","none"],j=()=>[ae,ne,c],T=()=>[Nl,"full","auto",...j()],O=()=>[jr,"none","subgrid",ae,ne],D=()=>["auto",{span:["full",jr,ae,ne]},jr,ae,ne],H=()=>[jr,"auto",ae,ne],k=()=>["auto","min","max","fr",ae,ne],B=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],U=()=>["start","end","center","stretch","center-safe","end-safe"],C=()=>["auto",...j()],L=()=>[Nl,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...j()],_=()=>[e,ae,ne],z=()=>[...S(),Db,Mb,{position:[ae,ne]}],$=()=>["no-repeat",{repeat:["","x","y","space","round"]}],J=()=>["auto","cover","contain",QM,XM,{size:[ae,ne]}],me=()=>[Zp,fi,mo],Z=()=>["","none","full",u,ae,ne],Q=()=>["",Ne,fi,mo],ee=()=>["solid","dashed","dotted","double"],ge=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Y=()=>[Ne,Zp,Db,Mb],W=()=>["","none",x,ae,ne],pe=()=>["none",Ne,ae,ne],ue=()=>["none",Ne,ae,ne],re=()=>[Ne,ae,ne],F=()=>[Nl,"full",...j()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ba],breakpoint:[Ba],color:[FM],container:[Ba],"drop-shadow":[Ba],ease:["in","out","in-out"],font:[KM],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ba],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ba],shadow:[Ba],spacing:["px",Ne],text:[Ba],"text-shadow":[Ba],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Nl,ne,ae,b]}],container:["container"],columns:[{columns:[Ne,ne,ae,i]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"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"],sr:["sr-only","not-sr-only"],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:E()}],overflow:[{overflow:R()}],"overflow-x":[{"overflow-x":R()}],"overflow-y":[{"overflow-y":R()}],overscroll:[{overscroll:N()}],"overscroll-x":[{"overscroll-x":N()}],"overscroll-y":[{"overscroll-y":N()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{start:T()}],end:[{end:T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:["visible","invisible","collapse"],z:[{z:[jr,"auto",ae,ne]}],basis:[{basis:[Nl,"full","auto",i,...j()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ne,Nl,"auto","initial","none",ne]}],grow:[{grow:["",Ne,ae,ne]}],shrink:[{shrink:["",Ne,ae,ne]}],order:[{order:[jr,"first","last","none",ae,ne]}],"grid-cols":[{"grid-cols":O()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":H()}],"col-end":[{"col-end":H()}],"grid-rows":[{"grid-rows":O()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":H()}],"row-end":[{"row-end":H()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":k()}],"auto-rows":[{"auto-rows":k()}],gap:[{gap:j()}],"gap-x":[{"gap-x":j()}],"gap-y":[{"gap-y":j()}],"justify-content":[{justify:[...B(),"normal"]}],"justify-items":[{"justify-items":[...U(),"normal"]}],"justify-self":[{"justify-self":["auto",...U()]}],"align-content":[{content:["normal",...B()]}],"align-items":[{items:[...U(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...U(),{baseline:["","last"]}]}],"place-content":[{"place-content":B()}],"place-items":[{"place-items":[...U(),"baseline"]}],"place-self":[{"place-self":["auto",...U()]}],p:[{p:j()}],px:[{px:j()}],py:[{py:j()}],ps:[{ps:j()}],pe:[{pe:j()}],pt:[{pt:j()}],pr:[{pr:j()}],pb:[{pb:j()}],pl:[{pl:j()}],m:[{m:C()}],mx:[{mx:C()}],my:[{my:C()}],ms:[{ms:C()}],me:[{me:C()}],mt:[{mt:C()}],mr:[{mr:C()}],mb:[{mb:C()}],ml:[{ml:C()}],"space-x":[{"space-x":j()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":j()}],"space-y-reverse":["space-y-reverse"],size:[{size:L()}],w:[{w:[i,"screen",...L()]}],"min-w":[{"min-w":[i,"screen","none",...L()]}],"max-w":[{"max-w":[i,"screen","none","prose",{screen:[l]},...L()]}],h:[{h:["screen","lh",...L()]}],"min-h":[{"min-h":["screen","lh","none",...L()]}],"max-h":[{"max-h":["screen","lh",...L()]}],"font-size":[{text:["base",n,fi,mo]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[a,ae,Wp]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Zp,ne]}],"font-family":[{font:[WM,ne,t]}],"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:[r,ae,ne]}],"line-clamp":[{"line-clamp":[Ne,"none",ae,Wp]}],leading:[{leading:[o,...j()]}],"list-image":[{"list-image":["none",ae,ne]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ae,ne]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:_()}],"text-color":[{text:_()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ee(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ne,"from-font","auto",ae,mo]}],"text-decoration-color":[{decoration:_()}],"underline-offset":[{"underline-offset":[Ne,"auto",ae,ne]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:j()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ae,ne]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ae,ne]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:z()}],"bg-repeat":[{bg:$()}],"bg-size":[{bg:J()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},jr,ae,ne],radial:["",ae,ne],conic:[jr,ae,ne]},JM,ZM]}],"bg-color":[{bg:_()}],"gradient-from-pos":[{from:me()}],"gradient-via-pos":[{via:me()}],"gradient-to-pos":[{to:me()}],"gradient-from":[{from:_()}],"gradient-via":[{via:_()}],"gradient-to":[{to:_()}],rounded:[{rounded:Z()}],"rounded-s":[{"rounded-s":Z()}],"rounded-e":[{"rounded-e":Z()}],"rounded-t":[{"rounded-t":Z()}],"rounded-r":[{"rounded-r":Z()}],"rounded-b":[{"rounded-b":Z()}],"rounded-l":[{"rounded-l":Z()}],"rounded-ss":[{"rounded-ss":Z()}],"rounded-se":[{"rounded-se":Z()}],"rounded-ee":[{"rounded-ee":Z()}],"rounded-es":[{"rounded-es":Z()}],"rounded-tl":[{"rounded-tl":Z()}],"rounded-tr":[{"rounded-tr":Z()}],"rounded-br":[{"rounded-br":Z()}],"rounded-bl":[{"rounded-bl":Z()}],"border-w":[{border:Q()}],"border-w-x":[{"border-x":Q()}],"border-w-y":[{"border-y":Q()}],"border-w-s":[{"border-s":Q()}],"border-w-e":[{"border-e":Q()}],"border-w-t":[{"border-t":Q()}],"border-w-r":[{"border-r":Q()}],"border-w-b":[{"border-b":Q()}],"border-w-l":[{"border-l":Q()}],"divide-x":[{"divide-x":Q()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Q()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ee(),"hidden","none"]}],"divide-style":[{divide:[...ee(),"hidden","none"]}],"border-color":[{border:_()}],"border-color-x":[{"border-x":_()}],"border-color-y":[{"border-y":_()}],"border-color-s":[{"border-s":_()}],"border-color-e":[{"border-e":_()}],"border-color-t":[{"border-t":_()}],"border-color-r":[{"border-r":_()}],"border-color-b":[{"border-b":_()}],"border-color-l":[{"border-l":_()}],"divide-color":[{divide:_()}],"outline-style":[{outline:[...ee(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ne,ae,ne]}],"outline-w":[{outline:["",Ne,fi,mo]}],"outline-color":[{outline:_()}],shadow:[{shadow:["","none",m,zu,Lu]}],"shadow-color":[{shadow:_()}],"inset-shadow":[{"inset-shadow":["none",d,zu,Lu]}],"inset-shadow-color":[{"inset-shadow":_()}],"ring-w":[{ring:Q()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:_()}],"ring-offset-w":[{"ring-offset":[Ne,mo]}],"ring-offset-color":[{"ring-offset":_()}],"inset-ring-w":[{"inset-ring":Q()}],"inset-ring-color":[{"inset-ring":_()}],"text-shadow":[{"text-shadow":["none",p,zu,Lu]}],"text-shadow-color":[{"text-shadow":_()}],opacity:[{opacity:[Ne,ae,ne]}],"mix-blend":[{"mix-blend":[...ge(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ge()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Ne]}],"mask-image-linear-from-pos":[{"mask-linear-from":Y()}],"mask-image-linear-to-pos":[{"mask-linear-to":Y()}],"mask-image-linear-from-color":[{"mask-linear-from":_()}],"mask-image-linear-to-color":[{"mask-linear-to":_()}],"mask-image-t-from-pos":[{"mask-t-from":Y()}],"mask-image-t-to-pos":[{"mask-t-to":Y()}],"mask-image-t-from-color":[{"mask-t-from":_()}],"mask-image-t-to-color":[{"mask-t-to":_()}],"mask-image-r-from-pos":[{"mask-r-from":Y()}],"mask-image-r-to-pos":[{"mask-r-to":Y()}],"mask-image-r-from-color":[{"mask-r-from":_()}],"mask-image-r-to-color":[{"mask-r-to":_()}],"mask-image-b-from-pos":[{"mask-b-from":Y()}],"mask-image-b-to-pos":[{"mask-b-to":Y()}],"mask-image-b-from-color":[{"mask-b-from":_()}],"mask-image-b-to-color":[{"mask-b-to":_()}],"mask-image-l-from-pos":[{"mask-l-from":Y()}],"mask-image-l-to-pos":[{"mask-l-to":Y()}],"mask-image-l-from-color":[{"mask-l-from":_()}],"mask-image-l-to-color":[{"mask-l-to":_()}],"mask-image-x-from-pos":[{"mask-x-from":Y()}],"mask-image-x-to-pos":[{"mask-x-to":Y()}],"mask-image-x-from-color":[{"mask-x-from":_()}],"mask-image-x-to-color":[{"mask-x-to":_()}],"mask-image-y-from-pos":[{"mask-y-from":Y()}],"mask-image-y-to-pos":[{"mask-y-to":Y()}],"mask-image-y-from-color":[{"mask-y-from":_()}],"mask-image-y-to-color":[{"mask-y-to":_()}],"mask-image-radial":[{"mask-radial":[ae,ne]}],"mask-image-radial-from-pos":[{"mask-radial-from":Y()}],"mask-image-radial-to-pos":[{"mask-radial-to":Y()}],"mask-image-radial-from-color":[{"mask-radial-from":_()}],"mask-image-radial-to-color":[{"mask-radial-to":_()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":S()}],"mask-image-conic-pos":[{"mask-conic":[Ne]}],"mask-image-conic-from-pos":[{"mask-conic-from":Y()}],"mask-image-conic-to-pos":[{"mask-conic-to":Y()}],"mask-image-conic-from-color":[{"mask-conic-from":_()}],"mask-image-conic-to-color":[{"mask-conic-to":_()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:z()}],"mask-repeat":[{mask:$()}],"mask-size":[{mask:J()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ae,ne]}],filter:[{filter:["","none",ae,ne]}],blur:[{blur:W()}],brightness:[{brightness:[Ne,ae,ne]}],contrast:[{contrast:[Ne,ae,ne]}],"drop-shadow":[{"drop-shadow":["","none",h,zu,Lu]}],"drop-shadow-color":[{"drop-shadow":_()}],grayscale:[{grayscale:["",Ne,ae,ne]}],"hue-rotate":[{"hue-rotate":[Ne,ae,ne]}],invert:[{invert:["",Ne,ae,ne]}],saturate:[{saturate:[Ne,ae,ne]}],sepia:[{sepia:["",Ne,ae,ne]}],"backdrop-filter":[{"backdrop-filter":["","none",ae,ne]}],"backdrop-blur":[{"backdrop-blur":W()}],"backdrop-brightness":[{"backdrop-brightness":[Ne,ae,ne]}],"backdrop-contrast":[{"backdrop-contrast":[Ne,ae,ne]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ne,ae,ne]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ne,ae,ne]}],"backdrop-invert":[{"backdrop-invert":["",Ne,ae,ne]}],"backdrop-opacity":[{"backdrop-opacity":[Ne,ae,ne]}],"backdrop-saturate":[{"backdrop-saturate":[Ne,ae,ne]}],"backdrop-sepia":[{"backdrop-sepia":["",Ne,ae,ne]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":j()}],"border-spacing-x":[{"border-spacing-x":j()}],"border-spacing-y":[{"border-spacing-y":j()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ae,ne]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ne,"initial",ae,ne]}],ease:[{ease:["linear","initial",w,ae,ne]}],delay:[{delay:[Ne,ae,ne]}],animate:[{animate:["none",g,ae,ne]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[v,ae,ne]}],"perspective-origin":[{"perspective-origin":E()}],rotate:[{rotate:pe()}],"rotate-x":[{"rotate-x":pe()}],"rotate-y":[{"rotate-y":pe()}],"rotate-z":[{"rotate-z":pe()}],scale:[{scale:ue()}],"scale-x":[{"scale-x":ue()}],"scale-y":[{"scale-y":ue()}],"scale-z":[{"scale-z":ue()}],"scale-3d":["scale-3d"],skew:[{skew:re()}],"skew-x":[{"skew-x":re()}],"skew-y":[{"skew-y":re()}],transform:[{transform:[ae,ne,"","none","gpu","cpu"]}],"transform-origin":[{origin:E()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:F()}],"translate-x":[{"translate-x":F()}],"translate-y":[{"translate-y":F()}],"translate-z":[{"translate-z":F()}],"translate-none":["translate-none"],accent:[{accent:_()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:_()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ae,ne]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":j()}],"scroll-mx":[{"scroll-mx":j()}],"scroll-my":[{"scroll-my":j()}],"scroll-ms":[{"scroll-ms":j()}],"scroll-me":[{"scroll-me":j()}],"scroll-mt":[{"scroll-mt":j()}],"scroll-mr":[{"scroll-mr":j()}],"scroll-mb":[{"scroll-mb":j()}],"scroll-ml":[{"scroll-ml":j()}],"scroll-p":[{"scroll-p":j()}],"scroll-px":[{"scroll-px":j()}],"scroll-py":[{"scroll-py":j()}],"scroll-ps":[{"scroll-ps":j()}],"scroll-pe":[{"scroll-pe":j()}],"scroll-pt":[{"scroll-pt":j()}],"scroll-pr":[{"scroll-pr":j()}],"scroll-pb":[{"scroll-pb":j()}],"scroll-pl":[{"scroll-pl":j()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ae,ne]}],fill:[{fill:["none",..._()]}],"stroke-w":[{stroke:[Ne,fi,mo,Wp]}],stroke:[{stroke:["none",..._()]}],"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-x","border-w-y","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-x","border-color-y","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"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"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"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},n5=(e,{cacheSize:t,prefix:n,experimentalParseClassName:a,extend:r={},override:o={}})=>(mi(e,"cacheSize",t),mi(e,"prefix",n),mi(e,"experimentalParseClassName",a),Pu(e.theme,o.theme),Pu(e.classGroups,o.classGroups),Pu(e.conflictingClassGroups,o.conflictingClassGroups),Pu(e.conflictingClassGroupModifiers,o.conflictingClassGroupModifiers),mi(e,"orderSensitiveModifiers",o.orderSensitiveModifiers),Bu(e.theme,r.theme),Bu(e.classGroups,r.classGroups),Bu(e.conflictingClassGroups,r.conflictingClassGroups),Bu(e.conflictingClassGroupModifiers,r.conflictingClassGroupModifiers),Ub(e,r,"orderSensitiveModifiers"),e),mi=(e,t,n)=>{n!==void 0&&(e[t]=n)},Pu=(e,t)=>{if(t)for(const n in t)mi(e,n,t[n])},Bu=(e,t)=>{if(t)for(const n in t)Ub(e,t,n)},Ub=(e,t,n)=>{const a=t[n];a!==void 0&&(e[n]=e[n]?e[n].concat(a):a)},a5=((e,...t)=>typeof e=="function"?Ab(Bb,e,...t):Ab(()=>n5(Bb(),e),...t))({prefix:"tw"});function I(...e){return a5(gb(e))}const Qp=Sl("tw:inline-flex tw:items-center tw:justify-center tw:gap-0.5 tw:whitespace-nowrap tw:rounded-md tw:text-sm tw:font-medium tw:transition-colors tw:focus-visible:outline-none tw:focus-visible:ring-1 tw:focus-visible:ring-ring tw:disabled:pointer-events-none tw:disabled:opacity-50 tw:[&_svg]:pointer-events-none tw:[&_svg]:size-4 tw:[&_svg]:shrink-0",{variants:{variant:{default:"tw:bg-primary tw:text-primary-foreground tw:shadow tw:hover:bg-primary/90",destructive:"tw:bg-destructive tw:text-destructive-foreground tw:shadow-sm tw:hover:bg-destructive/90",outline:"tw:border tw:border-gray-300 tw:bg-white tw:text-gray-700 tw:shadow-sm tw:hover:bg-gray-50 tw:hover:text-gray-900",secondary:"tw:bg-secondary tw:text-secondary-foreground tw:shadow-sm tw:hover:bg-secondary/80",ghost:"tw:hover:bg-accent tw:hover:text-accent-foreground",link:"tw:text-primary tw:underline-offset-4 tw:hover:underline"},size:{default:"tw:h-9 tw:px-4 tw:py-2",sm:"tw:h-8 tw:rounded-md tw:px-3 tw:text-xs",lg:"tw:h-10 tw:rounded-md tw:px-8",icon:"tw:h-9 tw:w-9"}},defaultVariants:{variant:"default",size:"default"}}),hn=f.forwardRef(({className:e,variant:t,size:n,asChild:a=!1,...r},o)=>{const l=a?fo:"button";return s.jsx(l,{className:I(Qp({variant:t,size:n,className:e})),ref:o,...r})});hn.displayName="Button";const ut=f.forwardRef(({className:e,type:t,...n},a)=>s.jsx("input",{type:t,className:I("tw:flex tw:h-9 tw:w-full tw:rounded-md tw:border tw:border-gray-300 tw:bg-white tw:px-3 tw:py-1 tw:text-base tw:shadow-sm tw:transition-colors tw:file:border-0 tw:file:bg-transparent tw:file:text-sm tw:file:font-medium tw:file:text-foreground tw:placeholder:text-muted-foreground tw:focus-visible:outline-none tw:focus-visible:ring-1 tw:focus-visible:ring-ring tw:disabled:cursor-not-allowed tw:disabled:opacity-50 tw:md:text-sm tw:aria-[invalid=true]:border-destructive tw:aria-[invalid=true]:ring-destructive",e),ref:a,...n}));ut.displayName="Input";function pi(e,[t,n]){return Math.min(n,Math.max(t,e))}function q(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e==null||e(r),n===!1||!r.defaultPrevented)return t==null?void 0:t(r)}}function r5(e,t){const n=f.createContext(t),a=o=>{const{children:l,...i}=o,c=f.useMemo(()=>i,Object.values(i));return s.jsx(n.Provider,{value:c,children:l})};a.displayName=e+"Provider";function r(o){const l=f.useContext(n);if(l)return l;if(t!==void 0)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}return[a,r]}function Dt(e,t=[]){let n=[];function a(o,l){const i=f.createContext(l),c=n.length;n=[...n,l];const u=d=>{var w;const{scope:p,children:h,...x}=d,v=((w=p==null?void 0:p[e])==null?void 0:w[c])||i,b=f.useMemo(()=>x,Object.values(x));return s.jsx(v.Provider,{value:b,children:h})};u.displayName=o+"Provider";function m(d,p){var v;const h=((v=p==null?void 0:p[e])==null?void 0:v[c])||i,x=f.useContext(h);if(x)return x;if(l!==void 0)return l;throw new Error(`\`${d}\` must be used within \`${o}\``)}return[u,m]}const r=()=>{const o=n.map(l=>f.createContext(l));return function(i){const c=(i==null?void 0:i[e])||o;return f.useMemo(()=>({[`__scope${e}`]:{...i,[e]:c}}),[i,c])}};return r.scopeName=e,[a,o5(r,...t)]}function o5(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const a=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(o){const l=a.reduce((i,{useScope:c,scopeName:u})=>{const d=c(o)[`__scope${u}`];return{...i,...d}},{});return f.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return n.scopeName=t.scopeName,n}function Hb(e){const t=l5(e),n=f.forwardRef((a,r)=>{const{children:o,...l}=a,i=f.Children.toArray(o),c=i.find(i5);if(c){const u=c.props.children,m=i.map(d=>d===c?f.Children.count(u)>1?f.Children.only(null):f.isValidElement(u)?u.props.children:null:d);return s.jsx(t,{...l,ref:r,children:f.isValidElement(u)?f.cloneElement(u,void 0,m):null})}return s.jsx(t,{...l,ref:r,children:o})});return n.displayName=`${e}.Slot`,n}function l5(e){const t=f.forwardRef((n,a)=>{const{children:r,...o}=n;if(f.isValidElement(r)){const l=u5(r),i=c5(o,r.props);return r.type!==f.Fragment&&(i.ref=a?sa(a,l):l),f.cloneElement(r,i)}return f.Children.count(r)>1?f.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var s5=Symbol("radix.slottable");function i5(e){return f.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===s5}function c5(e,t){const n={...t};for(const a in t){const r=e[a],o=t[a];/^on[A-Z]/.test(a)?r&&o?n[a]=(...i)=>{const c=o(...i);return r(...i),c}:r&&(n[a]=r):a==="style"?n[a]={...r,...o}:a==="className"&&(n[a]=[r,o].filter(Boolean).join(" "))}return{...e,...n}}function u5(e){var a,r;let t=(a=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:a.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Uu(e){const t=e+"CollectionProvider",[n,a]=Dt(t),[r,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),l=v=>{const{scope:b,children:w}=v,g=K.useRef(null),y=K.useRef(new Map).current;return s.jsx(r,{scope:b,itemMap:y,collectionRef:g,children:w})};l.displayName=t;const i=e+"CollectionSlot",c=Hb(i),u=K.forwardRef((v,b)=>{const{scope:w,children:g}=v,y=o(i,w),S=fe(b,y.collectionRef);return s.jsx(c,{ref:S,children:g})});u.displayName=i;const m=e+"CollectionItemSlot",d="data-radix-collection-item",p=Hb(m),h=K.forwardRef((v,b)=>{const{scope:w,children:g,...y}=v,S=K.useRef(null),E=fe(b,S),R=o(m,w);return K.useEffect(()=>(R.itemMap.set(S,{ref:S,...y}),()=>void R.itemMap.delete(S))),s.jsx(p,{[d]:"",ref:E,children:g})});h.displayName=m;function x(v){const b=o(e+"CollectionConsumer",v);return K.useCallback(()=>{const g=b.collectionRef.current;if(!g)return[];const y=Array.from(g.querySelectorAll(`[${d}]`));return Array.from(b.itemMap.values()).sort((R,N)=>y.indexOf(R.ref.current)-y.indexOf(N.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:l,Slot:u,ItemSlot:h},x,a]}var d5=f.createContext(void 0);function El(e){const t=f.useContext(d5);return e||t||"ltr"}function f5(e){const t=m5(e),n=f.forwardRef((a,r)=>{const{children:o,...l}=a,i=f.Children.toArray(o),c=i.find(h5);if(c){const u=c.props.children,m=i.map(d=>d===c?f.Children.count(u)>1?f.Children.only(null):f.isValidElement(u)?u.props.children:null:d);return s.jsx(t,{...l,ref:r,children:f.isValidElement(u)?f.cloneElement(u,void 0,m):null})}return s.jsx(t,{...l,ref:r,children:o})});return n.displayName=`${e}.Slot`,n}function m5(e){const t=f.forwardRef((n,a)=>{const{children:r,...o}=n;if(f.isValidElement(r)){const l=g5(r),i=w5(o,r.props);return r.type!==f.Fragment&&(i.ref=a?sa(a,l):l),f.cloneElement(r,i)}return f.Children.count(r)>1?f.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var p5=Symbol("radix.slottable");function h5(e){return f.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===p5}function w5(e,t){const n={...t};for(const a in t){const r=e[a],o=t[a];/^on[A-Z]/.test(a)?r&&o?n[a]=(...i)=>{const c=o(...i);return r(...i),c}:r&&(n[a]=r):a==="style"?n[a]={...r,...o}:a==="className"&&(n[a]=[r,o].filter(Boolean).join(" "))}return{...e,...n}}function g5(e){var a,r;let t=(a=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:a.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var v5=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],le=v5.reduce((e,t)=>{const n=f5(`Primitive.${t}`),a=f.forwardRef((r,o)=>{const{asChild:l,...i}=r,c=l?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),s.jsx(c,{...i,ref:o})});return a.displayName=`Primitive.${t}`,{...e,[t]:a}},{});function Ib(e,t){e&&Vr.flushSync(()=>e.dispatchEvent(t))}function Ot(e){const t=f.useRef(e);return f.useEffect(()=>{t.current=e}),f.useMemo(()=>(...n)=>{var a;return(a=t.current)==null?void 0:a.call(t,...n)},[])}function y5(e,t=globalThis==null?void 0:globalThis.document){const n=Ot(e);f.useEffect(()=>{const a=r=>{r.key==="Escape"&&n(r)};return t.addEventListener("keydown",a,{capture:!0}),()=>t.removeEventListener("keydown",a,{capture:!0})},[n,t])}var x5="DismissableLayer",Jp="dismissableLayer.update",b5="dismissableLayer.pointerDownOutside",S5="dismissableLayer.focusOutside",Vb,$b=f.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Al=f.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:a,onPointerDownOutside:r,onFocusOutside:o,onInteractOutside:l,onDismiss:i,...c}=e,u=f.useContext($b),[m,d]=f.useState(null),p=(m==null?void 0:m.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=f.useState({}),x=fe(t,N=>d(N)),v=Array.from(u.layers),[b]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),w=v.indexOf(b),g=m?v.indexOf(m):-1,y=u.layersWithOutsidePointerEventsDisabled.size>0,S=g>=w,E=C5(N=>{const j=N.target,T=[...u.branches].some(O=>O.contains(j));!S||T||(r==null||r(N),l==null||l(N),N.defaultPrevented||i==null||i())},p),R=E5(N=>{const j=N.target;[...u.branches].some(O=>O.contains(j))||(o==null||o(N),l==null||l(N),N.defaultPrevented||i==null||i())},p);return y5(N=>{g===u.layers.size-1&&(a==null||a(N),!N.defaultPrevented&&i&&(N.preventDefault(),i()))},p),f.useEffect(()=>{if(m)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Vb=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(m)),u.layers.add(m),Fb(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=Vb)}},[m,p,n,u]),f.useEffect(()=>()=>{m&&(u.layers.delete(m),u.layersWithOutsidePointerEventsDisabled.delete(m),Fb())},[m,u]),f.useEffect(()=>{const N=()=>h({});return document.addEventListener(Jp,N),()=>document.removeEventListener(Jp,N)},[]),s.jsx(le.div,{...c,ref:x,style:{pointerEvents:y?S?"auto":"none":void 0,...e.style},onFocusCapture:q(e.onFocusCapture,R.onFocusCapture),onBlurCapture:q(e.onBlurCapture,R.onBlurCapture),onPointerDownCapture:q(e.onPointerDownCapture,E.onPointerDownCapture)})});Al.displayName=x5;var N5="DismissableLayerBranch",j5=f.forwardRef((e,t)=>{const n=f.useContext($b),a=f.useRef(null),r=fe(t,a);return f.useEffect(()=>{const o=a.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),s.jsx(le.div,{...e,ref:r})});j5.displayName=N5;function C5(e,t=globalThis==null?void 0:globalThis.document){const n=Ot(e),a=f.useRef(!1),r=f.useRef(()=>{});return f.useEffect(()=>{const o=i=>{if(i.target&&!a.current){let c=function(){Gb(b5,n,u,{discrete:!0})};const u={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",r.current),r.current=c,t.addEventListener("click",r.current,{once:!0})):c()}else t.removeEventListener("click",r.current);a.current=!1},l=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(l),t.removeEventListener("pointerdown",o),t.removeEventListener("click",r.current)}},[t,n]),{onPointerDownCapture:()=>a.current=!0}}function E5(e,t=globalThis==null?void 0:globalThis.document){const n=Ot(e),a=f.useRef(!1);return f.useEffect(()=>{const r=o=>{o.target&&!a.current&&Gb(S5,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",r),()=>t.removeEventListener("focusin",r)},[t,n]),{onFocusCapture:()=>a.current=!0,onBlurCapture:()=>a.current=!1}}function Fb(){const e=new CustomEvent(Jp);document.dispatchEvent(e)}function Gb(e,t,n,{discrete:a}){const r=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),a?Ib(r,o):r.dispatchEvent(o)}var eh=0;function Hu(){f.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Yb()),document.body.insertAdjacentElement("beforeend",e[1]??Yb()),eh++,()=>{eh===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),eh--}},[])}function Yb(){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 th="focusScope.autoFocusOnMount",nh="focusScope.autoFocusOnUnmount",qb={bubbles:!1,cancelable:!0},A5="FocusScope",hi=f.forwardRef((e,t)=>{const{loop:n=!1,trapped:a=!1,onMountAutoFocus:r,onUnmountAutoFocus:o,...l}=e,[i,c]=f.useState(null),u=Ot(r),m=Ot(o),d=f.useRef(null),p=fe(t,v=>c(v)),h=f.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;f.useEffect(()=>{if(a){let v=function(y){if(h.paused||!i)return;const S=y.target;i.contains(S)?d.current=S:Cr(d.current,{select:!0})},b=function(y){if(h.paused||!i)return;const S=y.relatedTarget;S!==null&&(i.contains(S)||Cr(d.current,{select:!0}))},w=function(y){if(document.activeElement===document.body)for(const E of y)E.removedNodes.length>0&&Cr(i)};document.addEventListener("focusin",v),document.addEventListener("focusout",b);const g=new MutationObserver(w);return i&&g.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",b),g.disconnect()}}},[a,i,h.paused]),f.useEffect(()=>{if(i){Zb.add(h);const v=document.activeElement;if(!i.contains(v)){const w=new CustomEvent(th,qb);i.addEventListener(th,u),i.dispatchEvent(w),w.defaultPrevented||(R5(O5(Kb(i)),{select:!0}),document.activeElement===v&&Cr(i))}return()=>{i.removeEventListener(th,u),setTimeout(()=>{const w=new CustomEvent(nh,qb);i.addEventListener(nh,m),i.dispatchEvent(w),w.defaultPrevented||Cr(v??document.body,{select:!0}),i.removeEventListener(nh,m),Zb.remove(h)},0)}}},[i,u,m,h]);const x=f.useCallback(v=>{if(!n&&!a||h.paused)return;const b=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,w=document.activeElement;if(b&&w){const g=v.currentTarget,[y,S]=_5(g);y&&S?!v.shiftKey&&w===S?(v.preventDefault(),n&&Cr(y,{select:!0})):v.shiftKey&&w===y&&(v.preventDefault(),n&&Cr(S,{select:!0})):w===g&&v.preventDefault()}},[n,a,h.paused]);return s.jsx(le.div,{tabIndex:-1,...l,ref:p,onKeyDown:x})});hi.displayName=A5;function R5(e,{select:t=!1}={}){const n=document.activeElement;for(const a of e)if(Cr(a,{select:t}),document.activeElement!==n)return}function _5(e){const t=Kb(e),n=Xb(t,e),a=Xb(t.reverse(),e);return[n,a]}function Kb(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:a=>{const r=a.tagName==="INPUT"&&a.type==="hidden";return a.disabled||a.hidden||r?NodeFilter.FILTER_SKIP:a.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Xb(e,t){for(const n of e)if(!T5(n,{upTo:t}))return n}function T5(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 M5(e){return e instanceof HTMLInputElement&&"select"in e}function Cr(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&M5(e)&&t&&e.select()}}var Zb=D5();function D5(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Wb(e,t),e.unshift(t)},remove(t){var n;e=Wb(e,t),(n=e[0])==null||n.resume()}}}function Wb(e,t){const n=[...e],a=n.indexOf(t);return a!==-1&&n.splice(a,1),n}function O5(e){return e.filter(t=>t.tagName!=="A")}var ht=globalThis!=null&&globalThis.document?f.useLayoutEffect:()=>{},k5=Qi[" useId ".trim().toString()]||(()=>{}),L5=0;function Ua(e){const[t,n]=f.useState(k5());return ht(()=>{n(a=>a??String(L5++))},[e]),t?`radix-${t}`:""}const z5=["top","right","bottom","left"],Er=Math.min,wn=Math.max,Iu=Math.round,Vu=Math.floor,ia=e=>({x:e,y:e}),P5={left:"right",right:"left",bottom:"top",top:"bottom"},B5={start:"end",end:"start"};function ah(e,t,n){return wn(e,Er(t,n))}function Ha(e,t){return typeof e=="function"?e(t):e}function Ia(e){return e.split("-")[0]}function Rl(e){return e.split("-")[1]}function rh(e){return e==="x"?"y":"x"}function oh(e){return e==="y"?"height":"width"}const U5=new Set(["top","bottom"]);function ca(e){return U5.has(Ia(e))?"y":"x"}function lh(e){return rh(ca(e))}function H5(e,t,n){n===void 0&&(n=!1);const a=Rl(e),r=lh(e),o=oh(r);let l=r==="x"?a===(n?"end":"start")?"right":"left":a==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(l=$u(l)),[l,$u(l)]}function I5(e){const t=$u(e);return[sh(e),t,sh(t)]}function sh(e){return e.replace(/start|end/g,t=>B5[t])}const Qb=["left","right"],Jb=["right","left"],V5=["top","bottom"],$5=["bottom","top"];function F5(e,t,n){switch(e){case"top":case"bottom":return n?t?Jb:Qb:t?Qb:Jb;case"left":case"right":return t?V5:$5;default:return[]}}function G5(e,t,n,a){const r=Rl(e);let o=F5(Ia(e),n==="start",a);return r&&(o=o.map(l=>l+"-"+r),t&&(o=o.concat(o.map(sh)))),o}function $u(e){return e.replace(/left|right|bottom|top/g,t=>P5[t])}function Y5(e){return{top:0,right:0,bottom:0,left:0,...e}}function e1(e){return typeof e!="number"?Y5(e):{top:e,right:e,bottom:e,left:e}}function Fu(e){const{x:t,y:n,width:a,height:r}=e;return{width:a,height:r,top:n,left:t,right:t+a,bottom:n+r,x:t,y:n}}function t1(e,t,n){let{reference:a,floating:r}=e;const o=ca(t),l=lh(t),i=oh(l),c=Ia(t),u=o==="y",m=a.x+a.width/2-r.width/2,d=a.y+a.height/2-r.height/2,p=a[i]/2-r[i]/2;let h;switch(c){case"top":h={x:m,y:a.y-r.height};break;case"bottom":h={x:m,y:a.y+a.height};break;case"right":h={x:a.x+a.width,y:d};break;case"left":h={x:a.x-r.width,y:d};break;default:h={x:a.x,y:a.y}}switch(Rl(t)){case"start":h[l]-=p*(n&&u?-1:1);break;case"end":h[l]+=p*(n&&u?-1:1);break}return h}async function q5(e,t){var n;t===void 0&&(t={});const{x:a,y:r,platform:o,rects:l,elements:i,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:m="viewport",elementContext:d="floating",altBoundary:p=!1,padding:h=0}=Ha(t,e),x=e1(h),b=i[p?d==="floating"?"reference":"floating":d],w=Fu(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(b)))==null||n?b:b.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(i.floating)),boundary:u,rootBoundary:m,strategy:c})),g=d==="floating"?{x:a,y:r,width:l.floating.width,height:l.floating.height}:l.reference,y=await(o.getOffsetParent==null?void 0:o.getOffsetParent(i.floating)),S=await(o.isElement==null?void 0:o.isElement(y))?await(o.getScale==null?void 0:o.getScale(y))||{x:1,y:1}:{x:1,y:1},E=Fu(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:g,offsetParent:y,strategy:c}):g);return{top:(w.top-E.top+x.top)/S.y,bottom:(E.bottom-w.bottom+x.bottom)/S.y,left:(w.left-E.left+x.left)/S.x,right:(E.right-w.right+x.right)/S.x}}const K5=async(e,t,n)=>{const{placement:a="bottom",strategy:r="absolute",middleware:o=[],platform:l}=n,i=o.filter(Boolean),c=await(l.isRTL==null?void 0:l.isRTL(t));let u=await l.getElementRects({reference:e,floating:t,strategy:r}),{x:m,y:d}=t1(u,a,c),p=a,h={},x=0;for(let b=0;b<i.length;b++){var v;const{name:w,fn:g}=i[b],{x:y,y:S,data:E,reset:R}=await g({x:m,y:d,initialPlacement:a,placement:p,strategy:r,middlewareData:h,rects:u,platform:{...l,detectOverflow:(v=l.detectOverflow)!=null?v:q5},elements:{reference:e,floating:t}});m=y??m,d=S??d,h={...h,[w]:{...h[w],...E}},R&&x<=50&&(x++,typeof R=="object"&&(R.placement&&(p=R.placement),R.rects&&(u=R.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:r}):R.rects),{x:m,y:d}=t1(u,p,c)),b=-1)}return{x:m,y:d,placement:p,strategy:r,middlewareData:h}},X5=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:a,placement:r,rects:o,platform:l,elements:i,middlewareData:c}=t,{element:u,padding:m=0}=Ha(e,t)||{};if(u==null)return{};const d=e1(m),p={x:n,y:a},h=lh(r),x=oh(h),v=await l.getDimensions(u),b=h==="y",w=b?"top":"left",g=b?"bottom":"right",y=b?"clientHeight":"clientWidth",S=o.reference[x]+o.reference[h]-p[h]-o.floating[x],E=p[h]-o.reference[h],R=await(l.getOffsetParent==null?void 0:l.getOffsetParent(u));let N=R?R[y]:0;(!N||!await(l.isElement==null?void 0:l.isElement(R)))&&(N=i.floating[y]||o.floating[x]);const j=S/2-E/2,T=N/2-v[x]/2-1,O=Er(d[w],T),D=Er(d[g],T),H=O,k=N-v[x]-D,B=N/2-v[x]/2+j,U=ah(H,B,k),C=!c.arrow&&Rl(r)!=null&&B!==U&&o.reference[x]/2-(B<H?O:D)-v[x]/2<0,L=C?B<H?B-H:B-k:0;return{[h]:p[h]+L,data:{[h]:U,centerOffset:B-U-L,...C&&{alignmentOffset:L}},reset:C}}}),Z5=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,a;const{placement:r,middlewareData:o,rects:l,initialPlacement:i,platform:c,elements:u}=t,{mainAxis:m=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:v=!0,...b}=Ha(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const w=Ia(r),g=ca(i),y=Ia(i)===i,S=await(c.isRTL==null?void 0:c.isRTL(u.floating)),E=p||(y||!v?[$u(i)]:I5(i)),R=x!=="none";!p&&R&&E.push(...G5(i,v,x,S));const N=[i,...E],j=await c.detectOverflow(t,b),T=[];let O=((a=o.flip)==null?void 0:a.overflows)||[];if(m&&T.push(j[w]),d){const B=H5(r,l,S);T.push(j[B[0]],j[B[1]])}if(O=[...O,{placement:r,overflows:T}],!T.every(B=>B<=0)){var D,H;const B=(((D=o.flip)==null?void 0:D.index)||0)+1,U=N[B];if(U&&(!(d==="alignment"?g!==ca(U):!1)||O.every(_=>ca(_.placement)===g?_.overflows[0]>0:!0)))return{data:{index:B,overflows:O},reset:{placement:U}};let C=(H=O.filter(L=>L.overflows[0]<=0).sort((L,_)=>L.overflows[1]-_.overflows[1])[0])==null?void 0:H.placement;if(!C)switch(h){case"bestFit":{var k;const L=(k=O.filter(_=>{if(R){const z=ca(_.placement);return z===g||z==="y"}return!0}).map(_=>[_.placement,_.overflows.filter(z=>z>0).reduce((z,$)=>z+$,0)]).sort((_,z)=>_[1]-z[1])[0])==null?void 0:k[0];L&&(C=L);break}case"initialPlacement":C=i;break}if(r!==C)return{reset:{placement:C}}}return{}}}};function n1(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function a1(e){return z5.some(t=>e[t]>=0)}const W5=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:a}=t,{strategy:r="referenceHidden",...o}=Ha(e,t);switch(r){case"referenceHidden":{const l=await a.detectOverflow(t,{...o,elementContext:"reference"}),i=n1(l,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:a1(i)}}}case"escaped":{const l=await a.detectOverflow(t,{...o,altBoundary:!0}),i=n1(l,n.floating);return{data:{escapedOffsets:i,escaped:a1(i)}}}default:return{}}}}},r1=new Set(["left","top"]);async function Q5(e,t){const{placement:n,platform:a,elements:r}=e,o=await(a.isRTL==null?void 0:a.isRTL(r.floating)),l=Ia(n),i=Rl(n),c=ca(n)==="y",u=r1.has(l)?-1:1,m=o&&c?-1:1,d=Ha(t,e);let{mainAxis:p,crossAxis:h,alignmentAxis:x}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return i&&typeof x=="number"&&(h=i==="end"?x*-1:x),c?{x:h*m,y:p*u}:{x:p*u,y:h*m}}const J5=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,a;const{x:r,y:o,placement:l,middlewareData:i}=t,c=await Q5(t,e);return l===((n=i.offset)==null?void 0:n.placement)&&(a=i.arrow)!=null&&a.alignmentOffset?{}:{x:r+c.x,y:o+c.y,data:{...c,placement:l}}}}},e3=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:a,placement:r,platform:o}=t,{mainAxis:l=!0,crossAxis:i=!1,limiter:c={fn:w=>{let{x:g,y}=w;return{x:g,y}}},...u}=Ha(e,t),m={x:n,y:a},d=await o.detectOverflow(t,u),p=ca(Ia(r)),h=rh(p);let x=m[h],v=m[p];if(l){const w=h==="y"?"top":"left",g=h==="y"?"bottom":"right",y=x+d[w],S=x-d[g];x=ah(y,x,S)}if(i){const w=p==="y"?"top":"left",g=p==="y"?"bottom":"right",y=v+d[w],S=v-d[g];v=ah(y,v,S)}const b=c.fn({...t,[h]:x,[p]:v});return{...b,data:{x:b.x-n,y:b.y-a,enabled:{[h]:l,[p]:i}}}}}},t3=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:a,placement:r,rects:o,middlewareData:l}=t,{offset:i=0,mainAxis:c=!0,crossAxis:u=!0}=Ha(e,t),m={x:n,y:a},d=ca(r),p=rh(d);let h=m[p],x=m[d];const v=Ha(i,t),b=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(c){const y=p==="y"?"height":"width",S=o.reference[p]-o.floating[y]+b.mainAxis,E=o.reference[p]+o.reference[y]-b.mainAxis;h<S?h=S:h>E&&(h=E)}if(u){var w,g;const y=p==="y"?"width":"height",S=r1.has(Ia(r)),E=o.reference[d]-o.floating[y]+(S&&((w=l.offset)==null?void 0:w[d])||0)+(S?0:b.crossAxis),R=o.reference[d]+o.reference[y]+(S?0:((g=l.offset)==null?void 0:g[d])||0)-(S?b.crossAxis:0);x<E?x=E:x>R&&(x=R)}return{[p]:h,[d]:x}}}},n3=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,a;const{placement:r,rects:o,platform:l,elements:i}=t,{apply:c=()=>{},...u}=Ha(e,t),m=await l.detectOverflow(t,u),d=Ia(r),p=Rl(r),h=ca(r)==="y",{width:x,height:v}=o.floating;let b,w;d==="top"||d==="bottom"?(b=d,w=p===(await(l.isRTL==null?void 0:l.isRTL(i.floating))?"start":"end")?"left":"right"):(w=d,b=p==="end"?"top":"bottom");const g=v-m.top-m.bottom,y=x-m.left-m.right,S=Er(v-m[b],g),E=Er(x-m[w],y),R=!t.middlewareData.shift;let N=S,j=E;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(j=y),(a=t.middlewareData.shift)!=null&&a.enabled.y&&(N=g),R&&!p){const O=wn(m.left,0),D=wn(m.right,0),H=wn(m.top,0),k=wn(m.bottom,0);h?j=x-2*(O!==0||D!==0?O+D:wn(m.left,m.right)):N=v-2*(H!==0||k!==0?H+k:wn(m.top,m.bottom))}await c({...t,availableWidth:j,availableHeight:N});const T=await l.getDimensions(i.floating);return x!==T.width||v!==T.height?{reset:{rects:!0}}:{}}}};function Gu(){return typeof window<"u"}function _l(e){return o1(e)?(e.nodeName||"").toLowerCase():"#document"}function gn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ua(e){var t;return(t=(o1(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function o1(e){return Gu()?e instanceof Node||e instanceof gn(e).Node:!1}function $n(e){return Gu()?e instanceof Element||e instanceof gn(e).Element:!1}function da(e){return Gu()?e instanceof HTMLElement||e instanceof gn(e).HTMLElement:!1}function l1(e){return!Gu()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof gn(e).ShadowRoot}const a3=new Set(["inline","contents"]);function wi(e){const{overflow:t,overflowX:n,overflowY:a,display:r}=Fn(e);return/auto|scroll|overlay|hidden|clip/.test(t+a+n)&&!a3.has(r)}const r3=new Set(["table","td","th"]);function o3(e){return r3.has(_l(e))}const l3=[":popover-open",":modal"];function Yu(e){return l3.some(t=>{try{return e.matches(t)}catch{return!1}})}const s3=["transform","translate","scale","rotate","perspective"],i3=["transform","translate","scale","rotate","perspective","filter"],c3=["paint","layout","strict","content"];function ih(e){const t=ch(),n=$n(e)?Fn(e):e;return s3.some(a=>n[a]?n[a]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||i3.some(a=>(n.willChange||"").includes(a))||c3.some(a=>(n.contain||"").includes(a))}function u3(e){let t=Ar(e);for(;da(t)&&!Tl(t);){if(ih(t))return t;if(Yu(t))return null;t=Ar(t)}return null}function ch(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const d3=new Set(["html","body","#document"]);function Tl(e){return d3.has(_l(e))}function Fn(e){return gn(e).getComputedStyle(e)}function qu(e){return $n(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ar(e){if(_l(e)==="html")return e;const t=e.assignedSlot||e.parentNode||l1(e)&&e.host||ua(e);return l1(t)?t.host:t}function s1(e){const t=Ar(e);return Tl(t)?e.ownerDocument?e.ownerDocument.body:e.body:da(t)&&wi(t)?t:s1(t)}function gi(e,t,n){var a;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=s1(e),o=r===((a=e.ownerDocument)==null?void 0:a.body),l=gn(r);if(o){const i=uh(l);return t.concat(l,l.visualViewport||[],wi(r)?r:[],i&&n?gi(i):[])}return t.concat(r,gi(r,[],n))}function uh(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function i1(e){const t=Fn(e);let n=parseFloat(t.width)||0,a=parseFloat(t.height)||0;const r=da(e),o=r?e.offsetWidth:n,l=r?e.offsetHeight:a,i=Iu(n)!==o||Iu(a)!==l;return i&&(n=o,a=l),{width:n,height:a,$:i}}function dh(e){return $n(e)?e:e.contextElement}function Ml(e){const t=dh(e);if(!da(t))return ia(1);const n=t.getBoundingClientRect(),{width:a,height:r,$:o}=i1(t);let l=(o?Iu(n.width):n.width)/a,i=(o?Iu(n.height):n.height)/r;return(!l||!Number.isFinite(l))&&(l=1),(!i||!Number.isFinite(i))&&(i=1),{x:l,y:i}}const f3=ia(0);function c1(e){const t=gn(e);return!ch()||!t.visualViewport?f3:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function m3(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==gn(e)?!1:t}function po(e,t,n,a){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=dh(e);let l=ia(1);t&&(a?$n(a)&&(l=Ml(a)):l=Ml(e));const i=m3(o,n,a)?c1(o):ia(0);let c=(r.left+i.x)/l.x,u=(r.top+i.y)/l.y,m=r.width/l.x,d=r.height/l.y;if(o){const p=gn(o),h=a&&$n(a)?gn(a):a;let x=p,v=uh(x);for(;v&&a&&h!==x;){const b=Ml(v),w=v.getBoundingClientRect(),g=Fn(v),y=w.left+(v.clientLeft+parseFloat(g.paddingLeft))*b.x,S=w.top+(v.clientTop+parseFloat(g.paddingTop))*b.y;c*=b.x,u*=b.y,m*=b.x,d*=b.y,c+=y,u+=S,x=gn(v),v=uh(x)}}return Fu({width:m,height:d,x:c,y:u})}function Ku(e,t){const n=qu(e).scrollLeft;return t?t.left+n:po(ua(e)).left+n}function u1(e,t){const n=e.getBoundingClientRect(),a=n.left+t.scrollLeft-Ku(e,n),r=n.top+t.scrollTop;return{x:a,y:r}}function p3(e){let{elements:t,rect:n,offsetParent:a,strategy:r}=e;const o=r==="fixed",l=ua(a),i=t?Yu(t.floating):!1;if(a===l||i&&o)return n;let c={scrollLeft:0,scrollTop:0},u=ia(1);const m=ia(0),d=da(a);if((d||!d&&!o)&&((_l(a)!=="body"||wi(l))&&(c=qu(a)),da(a))){const h=po(a);u=Ml(a),m.x=h.x+a.clientLeft,m.y=h.y+a.clientTop}const p=l&&!d&&!o?u1(l,c):ia(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-c.scrollLeft*u.x+m.x+p.x,y:n.y*u.y-c.scrollTop*u.y+m.y+p.y}}function h3(e){return Array.from(e.getClientRects())}function w3(e){const t=ua(e),n=qu(e),a=e.ownerDocument.body,r=wn(t.scrollWidth,t.clientWidth,a.scrollWidth,a.clientWidth),o=wn(t.scrollHeight,t.clientHeight,a.scrollHeight,a.clientHeight);let l=-n.scrollLeft+Ku(e);const i=-n.scrollTop;return Fn(a).direction==="rtl"&&(l+=wn(t.clientWidth,a.clientWidth)-r),{width:r,height:o,x:l,y:i}}const d1=25;function g3(e,t){const n=gn(e),a=ua(e),r=n.visualViewport;let o=a.clientWidth,l=a.clientHeight,i=0,c=0;if(r){o=r.width,l=r.height;const m=ch();(!m||m&&t==="fixed")&&(i=r.offsetLeft,c=r.offsetTop)}const u=Ku(a);if(u<=0){const m=a.ownerDocument,d=m.body,p=getComputedStyle(d),h=m.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,x=Math.abs(a.clientWidth-d.clientWidth-h);x<=d1&&(o-=x)}else u<=d1&&(o+=u);return{width:o,height:l,x:i,y:c}}const v3=new Set(["absolute","fixed"]);function y3(e,t){const n=po(e,!0,t==="fixed"),a=n.top+e.clientTop,r=n.left+e.clientLeft,o=da(e)?Ml(e):ia(1),l=e.clientWidth*o.x,i=e.clientHeight*o.y,c=r*o.x,u=a*o.y;return{width:l,height:i,x:c,y:u}}function f1(e,t,n){let a;if(t==="viewport")a=g3(e,n);else if(t==="document")a=w3(ua(e));else if($n(t))a=y3(t,n);else{const r=c1(e);a={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return Fu(a)}function m1(e,t){const n=Ar(e);return n===t||!$n(n)||Tl(n)?!1:Fn(n).position==="fixed"||m1(n,t)}function x3(e,t){const n=t.get(e);if(n)return n;let a=gi(e,[],!1).filter(i=>$n(i)&&_l(i)!=="body"),r=null;const o=Fn(e).position==="fixed";let l=o?Ar(e):e;for(;$n(l)&&!Tl(l);){const i=Fn(l),c=ih(l);!c&&i.position==="fixed"&&(r=null),(o?!c&&!r:!c&&i.position==="static"&&!!r&&v3.has(r.position)||wi(l)&&!c&&m1(e,l))?a=a.filter(m=>m!==l):r=i,l=Ar(l)}return t.set(e,a),a}function b3(e){let{element:t,boundary:n,rootBoundary:a,strategy:r}=e;const l=[...n==="clippingAncestors"?Yu(t)?[]:x3(t,this._c):[].concat(n),a],i=l[0],c=l.reduce((u,m)=>{const d=f1(t,m,r);return u.top=wn(d.top,u.top),u.right=Er(d.right,u.right),u.bottom=Er(d.bottom,u.bottom),u.left=wn(d.left,u.left),u},f1(t,i,r));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function S3(e){const{width:t,height:n}=i1(e);return{width:t,height:n}}function N3(e,t,n){const a=da(t),r=ua(t),o=n==="fixed",l=po(e,!0,o,t);let i={scrollLeft:0,scrollTop:0};const c=ia(0);function u(){c.x=Ku(r)}if(a||!a&&!o)if((_l(t)!=="body"||wi(r))&&(i=qu(t)),a){const h=po(t,!0,o,t);c.x=h.x+t.clientLeft,c.y=h.y+t.clientTop}else r&&u();o&&!a&&r&&u();const m=r&&!a&&!o?u1(r,i):ia(0),d=l.left+i.scrollLeft-c.x-m.x,p=l.top+i.scrollTop-c.y-m.y;return{x:d,y:p,width:l.width,height:l.height}}function fh(e){return Fn(e).position==="static"}function p1(e,t){if(!da(e)||Fn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ua(e)===n&&(n=n.ownerDocument.body),n}function h1(e,t){const n=gn(e);if(Yu(e))return n;if(!da(e)){let r=Ar(e);for(;r&&!Tl(r);){if($n(r)&&!fh(r))return r;r=Ar(r)}return n}let a=p1(e,t);for(;a&&o3(a)&&fh(a);)a=p1(a,t);return a&&Tl(a)&&fh(a)&&!ih(a)?n:a||u3(e)||n}const j3=async function(e){const t=this.getOffsetParent||h1,n=this.getDimensions,a=await n(e.floating);return{reference:N3(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:a.width,height:a.height}}};function C3(e){return Fn(e).direction==="rtl"}const E3={convertOffsetParentRelativeRectToViewportRelativeRect:p3,getDocumentElement:ua,getClippingRect:b3,getOffsetParent:h1,getElementRects:j3,getClientRects:h3,getDimensions:S3,getScale:Ml,isElement:$n,isRTL:C3};function w1(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function A3(e,t){let n=null,a;const r=ua(e);function o(){var i;clearTimeout(a),(i=n)==null||i.disconnect(),n=null}function l(i,c){i===void 0&&(i=!1),c===void 0&&(c=1),o();const u=e.getBoundingClientRect(),{left:m,top:d,width:p,height:h}=u;if(i||t(),!p||!h)return;const x=Vu(d),v=Vu(r.clientWidth-(m+p)),b=Vu(r.clientHeight-(d+h)),w=Vu(m),y={rootMargin:-x+"px "+-v+"px "+-b+"px "+-w+"px",threshold:wn(0,Er(1,c))||1};let S=!0;function E(R){const N=R[0].intersectionRatio;if(N!==c){if(!S)return l();N?l(!1,N):a=setTimeout(()=>{l(!1,1e-7)},1e3)}N===1&&!w1(u,e.getBoundingClientRect())&&l(),S=!1}try{n=new IntersectionObserver(E,{...y,root:r.ownerDocument})}catch{n=new IntersectionObserver(E,y)}n.observe(e)}return l(!0),o}function R3(e,t,n,a){a===void 0&&(a={});const{ancestorScroll:r=!0,ancestorResize:o=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:c=!1}=a,u=dh(e),m=r||o?[...u?gi(u):[],...gi(t)]:[];m.forEach(w=>{r&&w.addEventListener("scroll",n,{passive:!0}),o&&w.addEventListener("resize",n)});const d=u&&i?A3(u,n):null;let p=-1,h=null;l&&(h=new ResizeObserver(w=>{let[g]=w;g&&g.target===u&&h&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var y;(y=h)==null||y.observe(t)})),n()}),u&&!c&&h.observe(u),h.observe(t));let x,v=c?po(e):null;c&&b();function b(){const w=po(e);v&&!w1(v,w)&&n(),v=w,x=requestAnimationFrame(b)}return n(),()=>{var w;m.forEach(g=>{r&&g.removeEventListener("scroll",n),o&&g.removeEventListener("resize",n)}),d==null||d(),(w=h)==null||w.disconnect(),h=null,c&&cancelAnimationFrame(x)}}const _3=J5,T3=e3,M3=Z5,D3=n3,O3=W5,g1=X5,k3=t3,L3=(e,t,n)=>{const a=new Map,r={platform:E3,...n},o={...r.platform,_c:a};return K5(e,t,{...r,platform:o})};var z3=typeof document<"u",P3=function(){},Xu=z3?f.useLayoutEffect:P3;function Zu(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,a,r;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(a=n;a--!==0;)if(!Zu(e[a],t[a]))return!1;return!0}if(r=Object.keys(e),n=r.length,n!==Object.keys(t).length)return!1;for(a=n;a--!==0;)if(!{}.hasOwnProperty.call(t,r[a]))return!1;for(a=n;a--!==0;){const o=r[a];if(!(o==="_owner"&&e.$$typeof)&&!Zu(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function v1(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function y1(e,t){const n=v1(e);return Math.round(t*n)/n}function mh(e){const t=f.useRef(e);return Xu(()=>{t.current=e}),t}function B3(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:a=[],platform:r,elements:{reference:o,floating:l}={},transform:i=!0,whileElementsMounted:c,open:u}=e,[m,d]=f.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,h]=f.useState(a);Zu(p,a)||h(a);const[x,v]=f.useState(null),[b,w]=f.useState(null),g=f.useCallback(_=>{_!==R.current&&(R.current=_,v(_))},[]),y=f.useCallback(_=>{_!==N.current&&(N.current=_,w(_))},[]),S=o||x,E=l||b,R=f.useRef(null),N=f.useRef(null),j=f.useRef(m),T=c!=null,O=mh(c),D=mh(r),H=mh(u),k=f.useCallback(()=>{if(!R.current||!N.current)return;const _={placement:t,strategy:n,middleware:p};D.current&&(_.platform=D.current),L3(R.current,N.current,_).then(z=>{const $={...z,isPositioned:H.current!==!1};B.current&&!Zu(j.current,$)&&(j.current=$,Vr.flushSync(()=>{d($)}))})},[p,t,n,D,H]);Xu(()=>{u===!1&&j.current.isPositioned&&(j.current.isPositioned=!1,d(_=>({..._,isPositioned:!1})))},[u]);const B=f.useRef(!1);Xu(()=>(B.current=!0,()=>{B.current=!1}),[]),Xu(()=>{if(S&&(R.current=S),E&&(N.current=E),S&&E){if(O.current)return O.current(S,E,k);k()}},[S,E,k,O,T]);const U=f.useMemo(()=>({reference:R,floating:N,setReference:g,setFloating:y}),[g,y]),C=f.useMemo(()=>({reference:S,floating:E}),[S,E]),L=f.useMemo(()=>{const _={position:n,left:0,top:0};if(!C.floating)return _;const z=y1(C.floating,m.x),$=y1(C.floating,m.y);return i?{..._,transform:"translate("+z+"px, "+$+"px)",...v1(C.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:z,top:$}},[n,i,C.floating,m.x,m.y]);return f.useMemo(()=>({...m,update:k,refs:U,elements:C,floatingStyles:L}),[m,k,U,C,L])}const U3=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:a,padding:r}=typeof e=="function"?e(n):e;return a&&t(a)?a.current!=null?g1({element:a.current,padding:r}).fn(n):{}:a?g1({element:a,padding:r}).fn(n):{}}}},H3=(e,t)=>({..._3(e),options:[e,t]}),I3=(e,t)=>({...T3(e),options:[e,t]}),V3=(e,t)=>({...k3(e),options:[e,t]}),$3=(e,t)=>({...M3(e),options:[e,t]}),F3=(e,t)=>({...D3(e),options:[e,t]}),G3=(e,t)=>({...O3(e),options:[e,t]}),Y3=(e,t)=>({...U3(e),options:[e,t]});var q3="Arrow",x1=f.forwardRef((e,t)=>{const{children:n,width:a=10,height:r=5,...o}=e;return s.jsx(le.svg,{...o,ref:t,width:a,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:s.jsx("polygon",{points:"0,0 30,0 15,10"})})});x1.displayName=q3;var K3=x1;function vi(e){const[t,n]=f.useState(void 0);return ht(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const a=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const o=r[0];let l,i;if("borderBoxSize"in o){const c=o.borderBoxSize,u=Array.isArray(c)?c[0]:c;l=u.inlineSize,i=u.blockSize}else l=e.offsetWidth,i=e.offsetHeight;n({width:l,height:i})});return a.observe(e,{box:"border-box"}),()=>a.unobserve(e)}else n(void 0)},[e]),t}var ph="Popper",[b1,Rr]=Dt(ph),[X3,S1]=b1(ph),N1=e=>{const{__scopePopper:t,children:n}=e,[a,r]=f.useState(null);return s.jsx(X3,{scope:t,anchor:a,onAnchorChange:r,children:n})};N1.displayName=ph;var j1="PopperAnchor",C1=f.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:a,...r}=e,o=S1(j1,n),l=f.useRef(null),i=fe(t,l),c=f.useRef(null);return f.useEffect(()=>{const u=c.current;c.current=(a==null?void 0:a.current)||l.current,u!==c.current&&o.onAnchorChange(c.current)}),a?null:s.jsx(le.div,{...r,ref:i})});C1.displayName=j1;var hh="PopperContent",[Z3,W3]=b1(hh),E1=f.forwardRef((e,t)=>{var Y,W,pe,ue,re,F;const{__scopePopper:n,side:a="bottom",sideOffset:r=0,align:o="center",alignOffset:l=0,arrowPadding:i=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:m=0,sticky:d="partial",hideWhenDetached:p=!1,updatePositionStrategy:h="optimized",onPlaced:x,...v}=e,b=S1(hh,n),[w,g]=f.useState(null),y=fe(t,he=>g(he)),[S,E]=f.useState(null),R=vi(S),N=(R==null?void 0:R.width)??0,j=(R==null?void 0:R.height)??0,T=a+(o!=="center"?"-"+o:""),O=typeof m=="number"?m:{top:0,right:0,bottom:0,left:0,...m},D=Array.isArray(u)?u:[u],H=D.length>0,k={padding:O,boundary:D.filter(J3),altBoundary:H},{refs:B,floatingStyles:U,placement:C,isPositioned:L,middlewareData:_}=B3({strategy:"fixed",placement:T,whileElementsMounted:(...he)=>R3(...he,{animationFrame:h==="always"}),elements:{reference:b.anchor},middleware:[H3({mainAxis:r+j,alignmentAxis:l}),c&&I3({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?V3():void 0,...k}),c&&$3({...k}),F3({...k,apply:({elements:he,rects:Ce,availableWidth:We,availableHeight:Ve})=>{const{width:tt,height:Qt}=Ce.reference,Ye=he.floating.style;Ye.setProperty("--radix-popper-available-width",`${We}px`),Ye.setProperty("--radix-popper-available-height",`${Ve}px`),Ye.setProperty("--radix-popper-anchor-width",`${tt}px`),Ye.setProperty("--radix-popper-anchor-height",`${Qt}px`)}}),S&&Y3({element:S,padding:i}),eD({arrowWidth:N,arrowHeight:j}),p&&G3({strategy:"referenceHidden",...k})]}),[z,$]=_1(C),J=Ot(x);ht(()=>{L&&(J==null||J())},[L,J]);const me=(Y=_.arrow)==null?void 0:Y.x,Z=(W=_.arrow)==null?void 0:W.y,Q=((pe=_.arrow)==null?void 0:pe.centerOffset)!==0,[ee,ge]=f.useState();return ht(()=>{w&&ge(window.getComputedStyle(w).zIndex)},[w]),s.jsx("div",{ref:B.setFloating,"data-radix-popper-content-wrapper":"",style:{...U,transform:L?U.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ee,"--radix-popper-transform-origin":[(ue=_.transformOrigin)==null?void 0:ue.x,(re=_.transformOrigin)==null?void 0:re.y].join(" "),...((F=_.hide)==null?void 0:F.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:s.jsx(Z3,{scope:n,placedSide:z,onArrowChange:E,arrowX:me,arrowY:Z,shouldHideArrow:Q,children:s.jsx(le.div,{"data-side":z,"data-align":$,...v,ref:y,style:{...v.style,animation:L?void 0:"none"}})})})});E1.displayName=hh;var A1="PopperArrow",Q3={top:"bottom",right:"left",bottom:"top",left:"right"},R1=f.forwardRef(function(t,n){const{__scopePopper:a,...r}=t,o=W3(A1,a),l=Q3[o.placedSide];return s.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[l]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:s.jsx(K3,{...r,ref:n,style:{...r.style,display:"block"}})})});R1.displayName=A1;function J3(e){return e!==null}var eD=e=>({name:"transformOrigin",options:e,fn(t){var b,w,g;const{placement:n,rects:a,middlewareData:r}=t,l=((b=r.arrow)==null?void 0:b.centerOffset)!==0,i=l?0:e.arrowWidth,c=l?0:e.arrowHeight,[u,m]=_1(n),d={start:"0%",center:"50%",end:"100%"}[m],p=(((w=r.arrow)==null?void 0:w.x)??0)+i/2,h=(((g=r.arrow)==null?void 0:g.y)??0)+c/2;let x="",v="";return u==="bottom"?(x=l?d:`${p}px`,v=`${-c}px`):u==="top"?(x=l?d:`${p}px`,v=`${a.floating.height+c}px`):u==="right"?(x=`${-c}px`,v=l?d:`${h}px`):u==="left"&&(x=`${a.floating.width+c}px`,v=l?d:`${h}px`),{data:{x,y:v}}}});function _1(e){const[t,n="center"]=e.split("-");return[t,n]}var T1=N1,yi=C1,Wu=E1,Qu=R1,tD="Portal",Dl=f.forwardRef((e,t)=>{var i;const{container:n,...a}=e,[r,o]=f.useState(!1);ht(()=>o(!0),[]);const l=n||r&&((i=globalThis==null?void 0:globalThis.document)==null?void 0:i.body);return l?Kw.createPortal(s.jsx(le.div,{...a,ref:t}),l):null});Dl.displayName=tD;function nD(e){const t=aD(e),n=f.forwardRef((a,r)=>{const{children:o,...l}=a,i=f.Children.toArray(o),c=i.find(oD);if(c){const u=c.props.children,m=i.map(d=>d===c?f.Children.count(u)>1?f.Children.only(null):f.isValidElement(u)?u.props.children:null:d);return s.jsx(t,{...l,ref:r,children:f.isValidElement(u)?f.cloneElement(u,void 0,m):null})}return s.jsx(t,{...l,ref:r,children:o})});return n.displayName=`${e}.Slot`,n}function aD(e){const t=f.forwardRef((n,a)=>{const{children:r,...o}=n;if(f.isValidElement(r)){const l=sD(r),i=lD(o,r.props);return r.type!==f.Fragment&&(i.ref=a?sa(a,l):l),f.cloneElement(r,i)}return f.Children.count(r)>1?f.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var rD=Symbol("radix.slottable");function oD(e){return f.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===rD}function lD(e,t){const n={...t};for(const a in t){const r=e[a],o=t[a];/^on[A-Z]/.test(a)?r&&o?n[a]=(...i)=>{const c=o(...i);return r(...i),c}:r&&(n[a]=r):a==="style"?n[a]={...r,...o}:a==="className"&&(n[a]=[r,o].filter(Boolean).join(" "))}return{...e,...n}}function sD(e){var a,r;let t=(a=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:a.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var iD=Qi[" useInsertionEffect ".trim().toString()]||ht;function fa({prop:e,defaultProp:t,onChange:n=()=>{},caller:a}){const[r,o,l]=cD({defaultProp:t,onChange:n}),i=e!==void 0,c=i?e:r;{const m=f.useRef(e!==void 0);f.useEffect(()=>{const d=m.current;d!==i&&console.warn(`${a} is changing from ${d?"controlled":"uncontrolled"} to ${i?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),m.current=i},[i,a])}const u=f.useCallback(m=>{var d;if(i){const p=uD(m)?m(e):m;p!==e&&((d=l.current)==null||d.call(l,p))}else o(m)},[i,e,o,l]);return[c,u]}function cD({defaultProp:e,onChange:t}){const[n,a]=f.useState(e),r=f.useRef(n),o=f.useRef(t);return iD(()=>{o.current=t},[t]),f.useEffect(()=>{var l;r.current!==n&&((l=o.current)==null||l.call(o,n),r.current=n)},[n,r]),[n,a,o]}function uD(e){return typeof e=="function"}function xi(e){const t=f.useRef({value:e,previous:e});return f.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var M1=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"}),dD="VisuallyHidden",D1=f.forwardRef((e,t)=>s.jsx(le.span,{...e,ref:t,style:{...M1,...e.style}}));D1.displayName=dD;var fD=D1,mD=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ol=new WeakMap,Ju=new WeakMap,ed={},wh=0,O1=function(e){return e&&(e.host||O1(e.parentNode))},pD=function(e,t){return t.map(function(n){if(e.contains(n))return n;var a=O1(n);return a&&e.contains(a)?a:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},hD=function(e,t,n,a){var r=pD(t,Array.isArray(e)?e:[e]);ed[n]||(ed[n]=new WeakMap);var o=ed[n],l=[],i=new Set,c=new Set(r),u=function(d){!d||i.has(d)||(i.add(d),u(d.parentNode))};r.forEach(u);var m=function(d){!d||c.has(d)||Array.prototype.forEach.call(d.children,function(p){if(i.has(p))m(p);else try{var h=p.getAttribute(a),x=h!==null&&h!=="false",v=(Ol.get(p)||0)+1,b=(o.get(p)||0)+1;Ol.set(p,v),o.set(p,b),l.push(p),v===1&&x&&Ju.set(p,!0),b===1&&p.setAttribute(n,"true"),x||p.setAttribute(a,"true")}catch(w){console.error("aria-hidden: cannot operate on ",p,w)}})};return m(t),i.clear(),wh++,function(){l.forEach(function(d){var p=Ol.get(d)-1,h=o.get(d)-1;Ol.set(d,p),o.set(d,h),p||(Ju.has(d)||d.removeAttribute(a),Ju.delete(d)),h||d.removeAttribute(n)}),wh--,wh||(Ol=new WeakMap,Ol=new WeakMap,Ju=new WeakMap,ed={})}},td=function(e,t,n){n===void 0&&(n="data-aria-hidden");var a=Array.from(Array.isArray(e)?e:[e]),r=mD(e);return r?(a.push.apply(a,Array.from(r.querySelectorAll("[aria-live], script"))),hD(a,r,n,"aria-hidden")):function(){return null}},ma=function(){return ma=Object.assign||function(t){for(var n,a=1,r=arguments.length;a<r;a++){n=arguments[a];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},ma.apply(this,arguments)};function k1(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,a=Object.getOwnPropertySymbols(e);r<a.length;r++)t.indexOf(a[r])<0&&Object.prototype.propertyIsEnumerable.call(e,a[r])&&(n[a[r]]=e[a[r]]);return n}function wD(e,t,n){if(n||arguments.length===2)for(var a=0,r=t.length,o;a<r;a++)(o||!(a in t))&&(o||(o=Array.prototype.slice.call(t,0,a)),o[a]=t[a]);return e.concat(o||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var nd="right-scroll-bar-position",ad="width-before-scroll-bar",gD="with-scroll-bars-hidden",vD="--removed-body-scroll-bar-size";function gh(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function yD(e,t){var n=f.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(a){var r=n.value;r!==a&&(n.value=a,n.callback(a,r))}}}})[0];return n.callback=t,n.facade}var xD=typeof window<"u"?f.useLayoutEffect:f.useEffect,L1=new WeakMap;function bD(e,t){var n=yD(null,function(a){return e.forEach(function(r){return gh(r,a)})});return xD(function(){var a=L1.get(n);if(a){var r=new Set(a),o=new Set(e),l=n.current;r.forEach(function(i){o.has(i)||gh(i,null)}),o.forEach(function(i){r.has(i)||gh(i,l)})}L1.set(n,e)},[e]),n}function SD(e){return e}function ND(e,t){t===void 0&&(t=SD);var n=[],a=!1,r={read:function(){if(a)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(o){var l=t(o,a);return n.push(l),function(){n=n.filter(function(i){return i!==l})}},assignSyncMedium:function(o){for(a=!0;n.length;){var l=n;n=[],l.forEach(o)}n={push:function(i){return o(i)},filter:function(){return n}}},assignMedium:function(o){a=!0;var l=[];if(n.length){var i=n;n=[],i.forEach(o),l=n}var c=function(){var m=l;l=[],m.forEach(o)},u=function(){return Promise.resolve().then(c)};u(),n={push:function(m){l.push(m),u()},filter:function(m){return l=l.filter(m),n}}}};return r}function jD(e){e===void 0&&(e={});var t=ND(null);return t.options=ma({async:!0,ssr:!1},e),t}var z1=function(e){var t=e.sideCar,n=k1(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var a=t.read();if(!a)throw new Error("Sidecar medium not found");return f.createElement(a,ma({},n))};z1.isSideCarExport=!0;function CD(e,t){return e.useMedium(t),z1}var P1=jD(),vh=function(){},rd=f.forwardRef(function(e,t){var n=f.useRef(null),a=f.useState({onScrollCapture:vh,onWheelCapture:vh,onTouchMoveCapture:vh}),r=a[0],o=a[1],l=e.forwardProps,i=e.children,c=e.className,u=e.removeScrollBar,m=e.enabled,d=e.shards,p=e.sideCar,h=e.noRelative,x=e.noIsolation,v=e.inert,b=e.allowPinchZoom,w=e.as,g=w===void 0?"div":w,y=e.gapMode,S=k1(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=p,R=bD([n,t]),N=ma(ma({},S),r);return f.createElement(f.Fragment,null,m&&f.createElement(E,{sideCar:P1,removeScrollBar:u,shards:d,noRelative:h,noIsolation:x,inert:v,setCallbacks:o,allowPinchZoom:!!b,lockRef:n,gapMode:y}),l?f.cloneElement(f.Children.only(i),ma(ma({},N),{ref:R})):f.createElement(g,ma({},N,{className:c,ref:R}),i))});rd.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},rd.classNames={fullWidth:ad,zeroRight:nd};var ED=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function AD(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=ED();return t&&e.setAttribute("nonce",t),e}function RD(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function _D(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var TD=function(){var e=0,t=null;return{add:function(n){e==0&&(t=AD())&&(RD(t,n),_D(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},MD=function(){var e=TD();return function(t,n){f.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},B1=function(){var e=MD(),t=function(n){var a=n.styles,r=n.dynamic;return e(a,r),null};return t},DD={left:0,top:0,right:0,gap:0},yh=function(e){return parseInt(e||"",10)||0},OD=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],a=t[e==="padding"?"paddingTop":"marginTop"],r=t[e==="padding"?"paddingRight":"marginRight"];return[yh(n),yh(a),yh(r)]},kD=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return DD;var t=OD(e),n=document.documentElement.clientWidth,a=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,a-n+t[2]-t[0])}},LD=B1(),kl="data-scroll-locked",zD=function(e,t,n,a){var r=e.left,o=e.top,l=e.right,i=e.gap;return n===void 0&&(n="margin"),`
  .`.concat(gD,` {
   overflow: hidden `).concat(a,`;
   padding-right: `).concat(i,"px ").concat(a,`;
  }
  body[`).concat(kl,`] {
    overflow: hidden `).concat(a,`;
    overscroll-behavior: contain;
    `).concat([t&&"position: relative ".concat(a,";"),n==="margin"&&`
    padding-left: `.concat(r,`px;
    padding-top: `).concat(o,`px;
    padding-right: `).concat(l,`px;
    margin-left:0;
    margin-top:0;
    margin-right: `).concat(i,"px ").concat(a,`;
    `),n==="padding"&&"padding-right: ".concat(i,"px ").concat(a,";")].filter(Boolean).join(""),`
  }
  
  .`).concat(nd,` {
    right: `).concat(i,"px ").concat(a,`;
  }
  
  .`).concat(ad,` {
    margin-right: `).concat(i,"px ").concat(a,`;
  }
  
  .`).concat(nd," .").concat(nd,` {
    right: 0 `).concat(a,`;
  }
  
  .`).concat(ad," .").concat(ad,` {
    margin-right: 0 `).concat(a,`;
  }
  
  body[`).concat(kl,`] {
    `).concat(vD,": ").concat(i,`px;
  }
`)},U1=function(){var e=parseInt(document.body.getAttribute(kl)||"0",10);return isFinite(e)?e:0},PD=function(){f.useEffect(function(){return document.body.setAttribute(kl,(U1()+1).toString()),function(){var e=U1()-1;e<=0?document.body.removeAttribute(kl):document.body.setAttribute(kl,e.toString())}},[])},BD=function(e){var t=e.noRelative,n=e.noImportant,a=e.gapMode,r=a===void 0?"margin":a;PD();var o=f.useMemo(function(){return kD(r)},[r]);return f.createElement(LD,{styles:zD(o,!t,r,n?"":"!important")})},xh=!1;if(typeof window<"u")try{var od=Object.defineProperty({},"passive",{get:function(){return xh=!0,!0}});window.addEventListener("test",od,od),window.removeEventListener("test",od,od)}catch{xh=!1}var Ll=xh?{passive:!1}:!1,UD=function(e){return e.tagName==="TEXTAREA"},H1=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!UD(e)&&n[t]==="visible")},HD=function(e){return H1(e,"overflowY")},ID=function(e){return H1(e,"overflowX")},I1=function(e,t){var n=t.ownerDocument,a=t;do{typeof ShadowRoot<"u"&&a instanceof ShadowRoot&&(a=a.host);var r=V1(e,a);if(r){var o=$1(e,a),l=o[1],i=o[2];if(l>i)return!0}a=a.parentNode}while(a&&a!==n.body);return!1},VD=function(e){var t=e.scrollTop,n=e.scrollHeight,a=e.clientHeight;return[t,n,a]},$D=function(e){var t=e.scrollLeft,n=e.scrollWidth,a=e.clientWidth;return[t,n,a]},V1=function(e,t){return e==="v"?HD(t):ID(t)},$1=function(e,t){return e==="v"?VD(t):$D(t)},FD=function(e,t){return e==="h"&&t==="rtl"?-1:1},GD=function(e,t,n,a,r){var o=FD(e,window.getComputedStyle(t).direction),l=o*a,i=n.target,c=t.contains(i),u=!1,m=l>0,d=0,p=0;do{if(!i)break;var h=$1(e,i),x=h[0],v=h[1],b=h[2],w=v-b-o*x;(x||w)&&V1(e,i)&&(d+=w,p+=x);var g=i.parentNode;i=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&i!==document.body||c&&(t.contains(i)||t===i));return(m&&Math.abs(d)<1||!m&&Math.abs(p)<1)&&(u=!0),u},ld=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},F1=function(e){return[e.deltaX,e.deltaY]},G1=function(e){return e&&"current"in e?e.current:e},YD=function(e,t){return e[0]===t[0]&&e[1]===t[1]},qD=function(e){return`
  .block-interactivity-`.concat(e,` {pointer-events: none;}
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
`)},KD=0,zl=[];function XD(e){var t=f.useRef([]),n=f.useRef([0,0]),a=f.useRef(),r=f.useState(KD++)[0],o=f.useState(B1)[0],l=f.useRef(e);f.useEffect(function(){l.current=e},[e]),f.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(r));var v=wD([e.lockRef.current],(e.shards||[]).map(G1),!0).filter(Boolean);return v.forEach(function(b){return b.classList.add("allow-interactivity-".concat(r))}),function(){document.body.classList.remove("block-interactivity-".concat(r)),v.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(r))})}}},[e.inert,e.lockRef.current,e.shards]);var i=f.useCallback(function(v,b){if("touches"in v&&v.touches.length===2||v.type==="wheel"&&v.ctrlKey)return!l.current.allowPinchZoom;var w=ld(v),g=n.current,y="deltaX"in v?v.deltaX:g[0]-w[0],S="deltaY"in v?v.deltaY:g[1]-w[1],E,R=v.target,N=Math.abs(y)>Math.abs(S)?"h":"v";if("touches"in v&&N==="h"&&R.type==="range")return!1;var j=window.getSelection(),T=j&&j.anchorNode,O=T?T===R||T.contains(R):!1;if(O)return!1;var D=I1(N,R);if(!D)return!0;if(D?E=N:(E=N==="v"?"h":"v",D=I1(N,R)),!D)return!1;if(!a.current&&"changedTouches"in v&&(y||S)&&(a.current=E),!E)return!0;var H=a.current||E;return GD(H,b,v,H==="h"?y:S)},[]),c=f.useCallback(function(v){var b=v;if(!(!zl.length||zl[zl.length-1]!==o)){var w="deltaY"in b?F1(b):ld(b),g=t.current.filter(function(E){return E.name===b.type&&(E.target===b.target||b.target===E.shadowParent)&&YD(E.delta,w)})[0];if(g&&g.should){b.cancelable&&b.preventDefault();return}if(!g){var y=(l.current.shards||[]).map(G1).filter(Boolean).filter(function(E){return E.contains(b.target)}),S=y.length>0?i(b,y[0]):!l.current.noIsolation;S&&b.cancelable&&b.preventDefault()}}},[]),u=f.useCallback(function(v,b,w,g){var y={name:v,delta:b,target:w,should:g,shadowParent:ZD(w)};t.current.push(y),setTimeout(function(){t.current=t.current.filter(function(S){return S!==y})},1)},[]),m=f.useCallback(function(v){n.current=ld(v),a.current=void 0},[]),d=f.useCallback(function(v){u(v.type,F1(v),v.target,i(v,e.lockRef.current))},[]),p=f.useCallback(function(v){u(v.type,ld(v),v.target,i(v,e.lockRef.current))},[]);f.useEffect(function(){return zl.push(o),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:p}),document.addEventListener("wheel",c,Ll),document.addEventListener("touchmove",c,Ll),document.addEventListener("touchstart",m,Ll),function(){zl=zl.filter(function(v){return v!==o}),document.removeEventListener("wheel",c,Ll),document.removeEventListener("touchmove",c,Ll),document.removeEventListener("touchstart",m,Ll)}},[]);var h=e.removeScrollBar,x=e.inert;return f.createElement(f.Fragment,null,x?f.createElement(o,{styles:qD(r)}):null,h?f.createElement(BD,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function ZD(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const WD=CD(P1,XD);var bi=f.forwardRef(function(e,t){return f.createElement(rd,ma({},e,{ref:t,sideCar:WD}))});bi.classNames=rd.classNames;var QD=[" ","Enter","ArrowUp","ArrowDown"],JD=[" ","Enter"],ho="Select",[sd,id,eO]=Uu(ho),[Pl]=Dt(ho,[eO,Rr]),cd=Rr(),[tO,_r]=Pl(ho),[nO,aO]=Pl(ho),Y1=e=>{const{__scopeSelect:t,children:n,open:a,defaultOpen:r,onOpenChange:o,value:l,defaultValue:i,onValueChange:c,dir:u,name:m,autoComplete:d,disabled:p,required:h,form:x}=e,v=cd(t),[b,w]=f.useState(null),[g,y]=f.useState(null),[S,E]=f.useState(!1),R=El(u),[N,j]=fa({prop:a,defaultProp:r??!1,onChange:o,caller:ho}),[T,O]=fa({prop:l,defaultProp:i,onChange:c,caller:ho}),D=f.useRef(null),H=b?x||!!b.closest("form"):!0,[k,B]=f.useState(new Set),U=Array.from(k).map(C=>C.props.value).join(";");return s.jsx(T1,{...v,children:s.jsxs(tO,{required:h,scope:t,trigger:b,onTriggerChange:w,valueNode:g,onValueNodeChange:y,valueNodeHasChildren:S,onValueNodeHasChildrenChange:E,contentId:Ua(),value:T,onValueChange:O,open:N,onOpenChange:j,dir:R,triggerPointerDownPosRef:D,disabled:p,children:[s.jsx(sd.Provider,{scope:t,children:s.jsx(nO,{scope:e.__scopeSelect,onNativeOptionAdd:f.useCallback(C=>{B(L=>new Set(L).add(C))},[]),onNativeOptionRemove:f.useCallback(C=>{B(L=>{const _=new Set(L);return _.delete(C),_})},[]),children:n})}),H?s.jsxs(wS,{"aria-hidden":!0,required:h,tabIndex:-1,name:m,autoComplete:d,value:T,onChange:C=>O(C.target.value),disabled:p,form:x,children:[T===void 0?s.jsx("option",{value:""}):null,Array.from(k)]},U):null]})})};Y1.displayName=ho;var q1="SelectTrigger",K1=f.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:a=!1,...r}=e,o=cd(n),l=_r(q1,n),i=l.disabled||a,c=fe(t,l.onTriggerChange),u=id(n),m=f.useRef("touch"),[d,p,h]=vS(v=>{const b=u().filter(y=>!y.disabled),w=b.find(y=>y.value===l.value),g=yS(b,v,w);g!==void 0&&l.onValueChange(g.value)}),x=v=>{i||(l.onOpenChange(!0),h()),v&&(l.triggerPointerDownPosRef.current={x:Math.round(v.pageX),y:Math.round(v.pageY)})};return s.jsx(yi,{asChild:!0,...o,children:s.jsx(le.button,{type:"button",role:"combobox","aria-controls":l.contentId,"aria-expanded":l.open,"aria-required":l.required,"aria-autocomplete":"none",dir:l.dir,"data-state":l.open?"open":"closed",disabled:i,"data-disabled":i?"":void 0,"data-placeholder":gS(l.value)?"":void 0,...r,ref:c,onClick:q(r.onClick,v=>{v.currentTarget.focus(),m.current!=="mouse"&&x(v)}),onPointerDown:q(r.onPointerDown,v=>{m.current=v.pointerType;const b=v.target;b.hasPointerCapture(v.pointerId)&&b.releasePointerCapture(v.pointerId),v.button===0&&v.ctrlKey===!1&&v.pointerType==="mouse"&&(x(v),v.preventDefault())}),onKeyDown:q(r.onKeyDown,v=>{const b=d.current!=="";!(v.ctrlKey||v.altKey||v.metaKey)&&v.key.length===1&&p(v.key),!(b&&v.key===" ")&&QD.includes(v.key)&&(x(),v.preventDefault())})})})});K1.displayName=q1;var X1="SelectValue",Z1=f.forwardRef((e,t)=>{const{__scopeSelect:n,className:a,style:r,children:o,placeholder:l="",...i}=e,c=_r(X1,n),{onValueNodeHasChildrenChange:u}=c,m=o!==void 0,d=fe(t,c.onValueNodeChange);return ht(()=>{u(m)},[u,m]),s.jsx(le.span,{...i,ref:d,style:{pointerEvents:"none"},children:gS(c.value)?s.jsx(s.Fragment,{children:l}):o})});Z1.displayName=X1;var rO="SelectIcon",W1=f.forwardRef((e,t)=>{const{__scopeSelect:n,children:a,...r}=e;return s.jsx(le.span,{"aria-hidden":!0,...r,ref:t,children:a||"▼"})});W1.displayName=rO;var oO="SelectPortal",Q1=e=>s.jsx(Dl,{asChild:!0,...e});Q1.displayName=oO;var wo="SelectContent",J1=f.forwardRef((e,t)=>{const n=_r(wo,e.__scopeSelect),[a,r]=f.useState();if(ht(()=>{r(new DocumentFragment)},[]),!n.open){const o=a;return o?Vr.createPortal(s.jsx(eS,{scope:e.__scopeSelect,children:s.jsx(sd.Slot,{scope:e.__scopeSelect,children:s.jsx("div",{children:e.children})})}),o):null}return s.jsx(tS,{...e,ref:t})});J1.displayName=wo;var Gn=10,[eS,Tr]=Pl(wo),lO="SelectContentImpl",sO=nD("SelectContent.RemoveScroll"),tS=f.forwardRef((e,t)=>{const{__scopeSelect:n,position:a="item-aligned",onCloseAutoFocus:r,onEscapeKeyDown:o,onPointerDownOutside:l,side:i,sideOffset:c,align:u,alignOffset:m,arrowPadding:d,collisionBoundary:p,collisionPadding:h,sticky:x,hideWhenDetached:v,avoidCollisions:b,...w}=e,g=_r(wo,n),[y,S]=f.useState(null),[E,R]=f.useState(null),N=fe(t,Y=>S(Y)),[j,T]=f.useState(null),[O,D]=f.useState(null),H=id(n),[k,B]=f.useState(!1),U=f.useRef(!1);f.useEffect(()=>{if(y)return td(y)},[y]),Hu();const C=f.useCallback(Y=>{const[W,...pe]=H().map(F=>F.ref.current),[ue]=pe.slice(-1),re=document.activeElement;for(const F of Y)if(F===re||(F==null||F.scrollIntoView({block:"nearest"}),F===W&&E&&(E.scrollTop=0),F===ue&&E&&(E.scrollTop=E.scrollHeight),F==null||F.focus(),document.activeElement!==re))return},[H,E]),L=f.useCallback(()=>C([j,y]),[C,j,y]);f.useEffect(()=>{k&&L()},[k,L]);const{onOpenChange:_,triggerPointerDownPosRef:z}=g;f.useEffect(()=>{if(y){let Y={x:0,y:0};const W=ue=>{var re,F;Y={x:Math.abs(Math.round(ue.pageX)-(((re=z.current)==null?void 0:re.x)??0)),y:Math.abs(Math.round(ue.pageY)-(((F=z.current)==null?void 0:F.y)??0))}},pe=ue=>{Y.x<=10&&Y.y<=10?ue.preventDefault():y.contains(ue.target)||_(!1),document.removeEventListener("pointermove",W),z.current=null};return z.current!==null&&(document.addEventListener("pointermove",W),document.addEventListener("pointerup",pe,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",W),document.removeEventListener("pointerup",pe,{capture:!0})}}},[y,_,z]),f.useEffect(()=>{const Y=()=>_(!1);return window.addEventListener("blur",Y),window.addEventListener("resize",Y),()=>{window.removeEventListener("blur",Y),window.removeEventListener("resize",Y)}},[_]);const[$,J]=vS(Y=>{const W=H().filter(re=>!re.disabled),pe=W.find(re=>re.ref.current===document.activeElement),ue=yS(W,Y,pe);ue&&setTimeout(()=>ue.ref.current.focus())}),me=f.useCallback((Y,W,pe)=>{const ue=!U.current&&!pe;(g.value!==void 0&&g.value===W||ue)&&(T(Y),ue&&(U.current=!0))},[g.value]),Z=f.useCallback(()=>y==null?void 0:y.focus(),[y]),Q=f.useCallback((Y,W,pe)=>{const ue=!U.current&&!pe;(g.value!==void 0&&g.value===W||ue)&&D(Y)},[g.value]),ee=a==="popper"?bh:nS,ge=ee===bh?{side:i,sideOffset:c,align:u,alignOffset:m,arrowPadding:d,collisionBoundary:p,collisionPadding:h,sticky:x,hideWhenDetached:v,avoidCollisions:b}:{};return s.jsx(eS,{scope:n,content:y,viewport:E,onViewportChange:R,itemRefCallback:me,selectedItem:j,onItemLeave:Z,itemTextRefCallback:Q,focusSelectedItem:L,selectedItemText:O,position:a,isPositioned:k,searchRef:$,children:s.jsx(bi,{as:sO,allowPinchZoom:!0,children:s.jsx(hi,{asChild:!0,trapped:g.open,onMountAutoFocus:Y=>{Y.preventDefault()},onUnmountAutoFocus:q(r,Y=>{var W;(W=g.trigger)==null||W.focus({preventScroll:!0}),Y.preventDefault()}),children:s.jsx(Al,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:l,onFocusOutside:Y=>Y.preventDefault(),onDismiss:()=>g.onOpenChange(!1),children:s.jsx(ee,{role:"listbox",id:g.contentId,"data-state":g.open?"open":"closed",dir:g.dir,onContextMenu:Y=>Y.preventDefault(),...w,...ge,onPlaced:()=>B(!0),ref:N,style:{display:"flex",flexDirection:"column",outline:"none",...w.style},onKeyDown:q(w.onKeyDown,Y=>{const W=Y.ctrlKey||Y.altKey||Y.metaKey;if(Y.key==="Tab"&&Y.preventDefault(),!W&&Y.key.length===1&&J(Y.key),["ArrowUp","ArrowDown","Home","End"].includes(Y.key)){let ue=H().filter(re=>!re.disabled).map(re=>re.ref.current);if(["ArrowUp","End"].includes(Y.key)&&(ue=ue.slice().reverse()),["ArrowUp","ArrowDown"].includes(Y.key)){const re=Y.target,F=ue.indexOf(re);ue=ue.slice(F+1)}setTimeout(()=>C(ue)),Y.preventDefault()}})})})})})})});tS.displayName=lO;var iO="SelectItemAlignedPosition",nS=f.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:a,...r}=e,o=_r(wo,n),l=Tr(wo,n),[i,c]=f.useState(null),[u,m]=f.useState(null),d=fe(t,N=>m(N)),p=id(n),h=f.useRef(!1),x=f.useRef(!0),{viewport:v,selectedItem:b,selectedItemText:w,focusSelectedItem:g}=l,y=f.useCallback(()=>{if(o.trigger&&o.valueNode&&i&&u&&v&&b&&w){const N=o.trigger.getBoundingClientRect(),j=u.getBoundingClientRect(),T=o.valueNode.getBoundingClientRect(),O=w.getBoundingClientRect();if(o.dir!=="rtl"){const re=O.left-j.left,F=T.left-re,he=N.left-F,Ce=N.width+he,We=Math.max(Ce,j.width),Ve=window.innerWidth-Gn,tt=pi(F,[Gn,Math.max(Gn,Ve-We)]);i.style.minWidth=Ce+"px",i.style.left=tt+"px"}else{const re=j.right-O.right,F=window.innerWidth-T.right-re,he=window.innerWidth-N.right-F,Ce=N.width+he,We=Math.max(Ce,j.width),Ve=window.innerWidth-Gn,tt=pi(F,[Gn,Math.max(Gn,Ve-We)]);i.style.minWidth=Ce+"px",i.style.right=tt+"px"}const D=p(),H=window.innerHeight-Gn*2,k=v.scrollHeight,B=window.getComputedStyle(u),U=parseInt(B.borderTopWidth,10),C=parseInt(B.paddingTop,10),L=parseInt(B.borderBottomWidth,10),_=parseInt(B.paddingBottom,10),z=U+C+k+_+L,$=Math.min(b.offsetHeight*5,z),J=window.getComputedStyle(v),me=parseInt(J.paddingTop,10),Z=parseInt(J.paddingBottom,10),Q=N.top+N.height/2-Gn,ee=H-Q,ge=b.offsetHeight/2,Y=b.offsetTop+ge,W=U+C+Y,pe=z-W;if(W<=Q){const re=D.length>0&&b===D[D.length-1].ref.current;i.style.bottom="0px";const F=u.clientHeight-v.offsetTop-v.offsetHeight,he=Math.max(ee,ge+(re?Z:0)+F+L),Ce=W+he;i.style.height=Ce+"px"}else{const re=D.length>0&&b===D[0].ref.current;i.style.top="0px";const he=Math.max(Q,U+v.offsetTop+(re?me:0)+ge)+pe;i.style.height=he+"px",v.scrollTop=W-Q+v.offsetTop}i.style.margin=`${Gn}px 0`,i.style.minHeight=$+"px",i.style.maxHeight=H+"px",a==null||a(),requestAnimationFrame(()=>h.current=!0)}},[p,o.trigger,o.valueNode,i,u,v,b,w,o.dir,a]);ht(()=>y(),[y]);const[S,E]=f.useState();ht(()=>{u&&E(window.getComputedStyle(u).zIndex)},[u]);const R=f.useCallback(N=>{N&&x.current===!0&&(y(),g==null||g(),x.current=!1)},[y,g]);return s.jsx(uO,{scope:n,contentWrapper:i,shouldExpandOnScrollRef:h,onScrollButtonChange:R,children:s.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S},children:s.jsx(le.div,{...r,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...r.style}})})})});nS.displayName=iO;var cO="SelectPopperPosition",bh=f.forwardRef((e,t)=>{const{__scopeSelect:n,align:a="start",collisionPadding:r=Gn,...o}=e,l=cd(n);return s.jsx(Wu,{...l,...o,ref:t,align:a,collisionPadding:r,style:{boxSizing:"border-box",...o.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});bh.displayName=cO;var[uO,Sh]=Pl(wo,{}),Nh="SelectViewport",aS=f.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:a,...r}=e,o=Tr(Nh,n),l=Sh(Nh,n),i=fe(t,o.onViewportChange),c=f.useRef(0);return s.jsxs(s.Fragment,{children:[s.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:a}),s.jsx(sd.Slot,{scope:n,children:s.jsx(le.div,{"data-radix-select-viewport":"",role:"presentation",...r,ref:i,style:{position:"relative",flex:1,overflow:"hidden auto",...r.style},onScroll:q(r.onScroll,u=>{const m=u.currentTarget,{contentWrapper:d,shouldExpandOnScrollRef:p}=l;if(p!=null&&p.current&&d){const h=Math.abs(c.current-m.scrollTop);if(h>0){const x=window.innerHeight-Gn*2,v=parseFloat(d.style.minHeight),b=parseFloat(d.style.height),w=Math.max(v,b);if(w<x){const g=w+h,y=Math.min(x,g),S=g-y;d.style.height=y+"px",d.style.bottom==="0px"&&(m.scrollTop=S>0?S:0,d.style.justifyContent="flex-end")}}}c.current=m.scrollTop})})})]})});aS.displayName=Nh;var rS="SelectGroup",[dO,fO]=Pl(rS),mO=f.forwardRef((e,t)=>{const{__scopeSelect:n,...a}=e,r=Ua();return s.jsx(dO,{scope:n,id:r,children:s.jsx(le.div,{role:"group","aria-labelledby":r,...a,ref:t})})});mO.displayName=rS;var oS="SelectLabel",lS=f.forwardRef((e,t)=>{const{__scopeSelect:n,...a}=e,r=fO(oS,n);return s.jsx(le.div,{id:r.id,...a,ref:t})});lS.displayName=oS;var ud="SelectItem",[pO,sS]=Pl(ud),iS=f.forwardRef((e,t)=>{const{__scopeSelect:n,value:a,disabled:r=!1,textValue:o,...l}=e,i=_r(ud,n),c=Tr(ud,n),u=i.value===a,[m,d]=f.useState(o??""),[p,h]=f.useState(!1),x=fe(t,g=>{var y;return(y=c.itemRefCallback)==null?void 0:y.call(c,g,a,r)}),v=Ua(),b=f.useRef("touch"),w=()=>{r||(i.onValueChange(a),i.onOpenChange(!1))};if(a==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return s.jsx(pO,{scope:n,value:a,disabled:r,textId:v,isSelected:u,onItemTextChange:f.useCallback(g=>{d(y=>y||((g==null?void 0:g.textContent)??"").trim())},[]),children:s.jsx(sd.ItemSlot,{scope:n,value:a,disabled:r,textValue:m,children:s.jsx(le.div,{role:"option","aria-labelledby":v,"data-highlighted":p?"":void 0,"aria-selected":u&&p,"data-state":u?"checked":"unchecked","aria-disabled":r||void 0,"data-disabled":r?"":void 0,tabIndex:r?void 0:-1,...l,ref:x,onFocus:q(l.onFocus,()=>h(!0)),onBlur:q(l.onBlur,()=>h(!1)),onClick:q(l.onClick,()=>{b.current!=="mouse"&&w()}),onPointerUp:q(l.onPointerUp,()=>{b.current==="mouse"&&w()}),onPointerDown:q(l.onPointerDown,g=>{b.current=g.pointerType}),onPointerMove:q(l.onPointerMove,g=>{var y;b.current=g.pointerType,r?(y=c.onItemLeave)==null||y.call(c):b.current==="mouse"&&g.currentTarget.focus({preventScroll:!0})}),onPointerLeave:q(l.onPointerLeave,g=>{var y;g.currentTarget===document.activeElement&&((y=c.onItemLeave)==null||y.call(c))}),onKeyDown:q(l.onKeyDown,g=>{var S;((S=c.searchRef)==null?void 0:S.current)!==""&&g.key===" "||(JD.includes(g.key)&&w(),g.key===" "&&g.preventDefault())})})})})});iS.displayName=ud;var Si="SelectItemText",cS=f.forwardRef((e,t)=>{const{__scopeSelect:n,className:a,style:r,...o}=e,l=_r(Si,n),i=Tr(Si,n),c=sS(Si,n),u=aO(Si,n),[m,d]=f.useState(null),p=fe(t,w=>d(w),c.onItemTextChange,w=>{var g;return(g=i.itemTextRefCallback)==null?void 0:g.call(i,w,c.value,c.disabled)}),h=m==null?void 0:m.textContent,x=f.useMemo(()=>s.jsx("option",{value:c.value,disabled:c.disabled,children:h},c.value),[c.disabled,c.value,h]),{onNativeOptionAdd:v,onNativeOptionRemove:b}=u;return ht(()=>(v(x),()=>b(x)),[v,b,x]),s.jsxs(s.Fragment,{children:[s.jsx(le.span,{id:c.textId,...o,ref:p}),c.isSelected&&l.valueNode&&!l.valueNodeHasChildren?Vr.createPortal(o.children,l.valueNode):null]})});cS.displayName=Si;var uS="SelectItemIndicator",dS=f.forwardRef((e,t)=>{const{__scopeSelect:n,...a}=e;return sS(uS,n).isSelected?s.jsx(le.span,{"aria-hidden":!0,...a,ref:t}):null});dS.displayName=uS;var jh="SelectScrollUpButton",fS=f.forwardRef((e,t)=>{const n=Tr(jh,e.__scopeSelect),a=Sh(jh,e.__scopeSelect),[r,o]=f.useState(!1),l=fe(t,a.onScrollButtonChange);return ht(()=>{if(n.viewport&&n.isPositioned){let i=function(){const u=c.scrollTop>0;o(u)};const c=n.viewport;return i(),c.addEventListener("scroll",i),()=>c.removeEventListener("scroll",i)}},[n.viewport,n.isPositioned]),r?s.jsx(pS,{...e,ref:l,onAutoScroll:()=>{const{viewport:i,selectedItem:c}=n;i&&c&&(i.scrollTop=i.scrollTop-c.offsetHeight)}}):null});fS.displayName=jh;var Ch="SelectScrollDownButton",mS=f.forwardRef((e,t)=>{const n=Tr(Ch,e.__scopeSelect),a=Sh(Ch,e.__scopeSelect),[r,o]=f.useState(!1),l=fe(t,a.onScrollButtonChange);return ht(()=>{if(n.viewport&&n.isPositioned){let i=function(){const u=c.scrollHeight-c.clientHeight,m=Math.ceil(c.scrollTop)<u;o(m)};const c=n.viewport;return i(),c.addEventListener("scroll",i),()=>c.removeEventListener("scroll",i)}},[n.viewport,n.isPositioned]),r?s.jsx(pS,{...e,ref:l,onAutoScroll:()=>{const{viewport:i,selectedItem:c}=n;i&&c&&(i.scrollTop=i.scrollTop+c.offsetHeight)}}):null});mS.displayName=Ch;var pS=f.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:a,...r}=e,o=Tr("SelectScrollButton",n),l=f.useRef(null),i=id(n),c=f.useCallback(()=>{l.current!==null&&(window.clearInterval(l.current),l.current=null)},[]);return f.useEffect(()=>()=>c(),[c]),ht(()=>{var m;const u=i().find(d=>d.ref.current===document.activeElement);(m=u==null?void 0:u.ref.current)==null||m.scrollIntoView({block:"nearest"})},[i]),s.jsx(le.div,{"aria-hidden":!0,...r,ref:t,style:{flexShrink:0,...r.style},onPointerDown:q(r.onPointerDown,()=>{l.current===null&&(l.current=window.setInterval(a,50))}),onPointerMove:q(r.onPointerMove,()=>{var u;(u=o.onItemLeave)==null||u.call(o),l.current===null&&(l.current=window.setInterval(a,50))}),onPointerLeave:q(r.onPointerLeave,()=>{c()})})}),hO="SelectSeparator",hS=f.forwardRef((e,t)=>{const{__scopeSelect:n,...a}=e;return s.jsx(le.div,{"aria-hidden":!0,...a,ref:t})});hS.displayName=hO;var Eh="SelectArrow",wO=f.forwardRef((e,t)=>{const{__scopeSelect:n,...a}=e,r=cd(n),o=_r(Eh,n),l=Tr(Eh,n);return o.open&&l.position==="popper"?s.jsx(Qu,{...r,...a,ref:t}):null});wO.displayName=Eh;var gO="SelectBubbleInput",wS=f.forwardRef(({__scopeSelect:e,value:t,...n},a)=>{const r=f.useRef(null),o=fe(a,r),l=xi(t);return f.useEffect(()=>{const i=r.current;if(!i)return;const c=window.HTMLSelectElement.prototype,m=Object.getOwnPropertyDescriptor(c,"value").set;if(l!==t&&m){const d=new Event("change",{bubbles:!0});m.call(i,t),i.dispatchEvent(d)}},[l,t]),s.jsx(le.select,{...n,style:{...M1,...n.style},ref:o,defaultValue:t})});wS.displayName=gO;function gS(e){return e===""||e===void 0}function vS(e){const t=Ot(e),n=f.useRef(""),a=f.useRef(0),r=f.useCallback(l=>{const i=n.current+l;t(i),function c(u){n.current=u,window.clearTimeout(a.current),u!==""&&(a.current=window.setTimeout(()=>c(""),1e3))}(i)},[t]),o=f.useCallback(()=>{n.current="",window.clearTimeout(a.current)},[]);return f.useEffect(()=>()=>window.clearTimeout(a.current),[]),[n,r,o]}function yS(e,t,n){const r=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let l=vO(e,Math.max(o,0));r.length===1&&(l=l.filter(u=>u!==n));const c=l.find(u=>u.textValue.toLowerCase().startsWith(r.toLowerCase()));return c!==n?c:void 0}function vO(e,t){return e.map((n,a)=>e[(t+a)%e.length])}var yO=Y1,xS=K1,xO=Z1,bO=W1,SO=Q1,bS=J1,NO=aS,SS=lS,NS=iS,jO=cS,CO=dS,jS=fS,CS=mS,ES=hS;/**
 * @license lucide-react v0.564.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const AS=(...e)=>e.filter((t,n,a)=>!!t&&t.trim()!==""&&a.indexOf(t)===n).join(" ").trim();/**
 * @license lucide-react v0.564.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const EO=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
 * @license lucide-react v0.564.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const AO=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,a)=>a?a.toUpperCase():n.toLowerCase());/**
 * @license lucide-react v0.564.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const RS=e=>{const t=AO(e);return t.charAt(0).toUpperCase()+t.slice(1)};/**
 * @license lucide-react v0.564.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */var RO={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.564.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const _O=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};/**
 * @license lucide-react v0.564.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const TO=f.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:a,className:r="",children:o,iconNode:l,...i},c)=>f.createElement("svg",{ref:c,...RO,width:t,height:t,stroke:e,strokeWidth:a?Number(n)*24/Number(t):n,className:AS("lucide",r),...!o&&!_O(i)&&{"aria-hidden":"true"},...i},[...l.map(([u,m])=>f.createElement(u,m)),...Array.isArray(o)?o:[o]]));/**
 * @license lucide-react v0.564.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Le=(e,t)=>{const n=f.forwardRef(({className:a,...r},o)=>f.createElement(TO,{ref:o,iconNode:t,className:AS(`lucide-${EO(RS(e))}`,`lucide-${e}`,a),...r}));return n.displayName=RS(e),n};/**
 * @license lucide-react v0.564.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const MO=Le("arrow-down",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);/**
 * @license lucide-react v0.564.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const DO=Le("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
 * @license lucide-react v0.564.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const OO=Le("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
 * @license lucide-react v0.564.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const kO=Le("arrow-up-down",[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]);/**
 * @license lucide-react v0.564.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const LO=Le("arrow-up",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/**
 * @license lucide-react v0.564.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const zO=Le("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.564.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Ah=Le("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
 * @license lucide-react v0.564.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const _S=Le("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
 * @license lucide-react v0.564.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const PO=Le("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
 * @license lucide-react v0.564.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const BO=Le("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
 * @license lucide-react v0.564.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const TS=Le("circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
 * @license lucide-react v0.564.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const UO=Le("clock",[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
 * @license lucide-react v0.564.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const HO=Le("code",[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]]);/**
 * @license lucide-react v0.564.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const MS=Le("database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);/**
 * @license lucide-react v0.564.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const IO=Le("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
 * @license lucide-react v0.564.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const DS=Le("funnel",[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]]);/**
 * @license lucide-react v0.564.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const OS=Le("hash",[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]]);/**
 * @license lucide-react v0.564.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=Le("key",[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]]);/**
 * @license lucide-react v0.564.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const VO=Le("layout-dashboard",[["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.564.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const LS=Le("package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);/**
 * @license lucide-react v0.564.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const $O=Le("palette",[["path",{d:"M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z",key:"e79jfc"}],["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}]]);/**
 * @license lucide-react v0.564.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const FO=Le("panel-left",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]]);/**
 * @license lucide-react v0.564.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const GO=Le("refresh-cw",[["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.564.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const zS=Le("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);/**
 * @license lucide-react v0.564.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const YO=Le("sliders-horizontal",[["path",{d:"M10 5H3",key:"1qgfaw"}],["path",{d:"M12 19H3",key:"yhmn1j"}],["path",{d:"M14 3v4",key:"1sua03"}],["path",{d:"M16 17v4",key:"1q0r14"}],["path",{d:"M21 12h-9",key:"1o4lsq"}],["path",{d:"M21 19h-5",key:"1rlt1p"}],["path",{d:"M21 5h-7",key:"1oszz2"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M8 12H3",key:"a7s4jb"}]]);/**
 * @license lucide-react v0.564.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const qO=Le("sparkles",[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]]);/**
 * @license lucide-react v0.564.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const KO=Le("table-2",[["path",{d:"M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18",key:"gugj83"}]]);/**
 * @license lucide-react v0.564.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const XO=Le("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.564.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ZO=Le("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);/**
 * @license lucide-react v0.564.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const PS=Le("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Yn=yO,qn=xO,Dn=f.forwardRef(({className:e,children:t,...n},a)=>s.jsxs(xS,{ref:a,className:I("tw:flex tw:h-9 tw:w-full tw:items-center tw:justify-between tw:whitespace-nowrap tw:rounded-md tw:border tw:border-gray-300 tw:bg-white tw:px-3 tw:py-2 tw:text-sm tw:shadow-sm tw:ring-offset-background tw:data-[placeholder]:text-muted-foreground tw:focus:outline-none tw:focus:ring-1 tw:focus:ring-ring tw:disabled:cursor-not-allowed tw:disabled:opacity-50 tw:[&>span]:line-clamp-1",e),...n,children:[t,s.jsx(bO,{asChild:!0,children:s.jsx(_S,{className:"tw:h-4 tw:w-4 tw:opacity-50"})})]}));Dn.displayName=xS.displayName;const BS=f.forwardRef(({className:e,...t},n)=>s.jsx(jS,{ref:n,className:I("tw:flex tw:cursor-default tw:items-center tw:justify-center tw:py-1",e),...t,children:s.jsx(BO,{className:"tw:h-4 tw:w-4"})}));BS.displayName=jS.displayName;const US=f.forwardRef(({className:e,...t},n)=>s.jsx(CS,{ref:n,className:I("tw:flex tw:cursor-default tw:items-center tw:justify-center tw:py-1",e),...t,children:s.jsx(_S,{className:"tw:h-4 tw:w-4"})}));US.displayName=CS.displayName;const On=f.forwardRef(({className:e,children:t,position:n="popper",container:a,disablePortal:r,...o},l)=>{const i=s.jsxs(bS,{ref:l,className:I("tw:relative tw:z-50 tw:max-h-[--radix-select-content-available-height] tw:min-w-[8rem] tw:overflow-y-auto tw:overflow-x-hidden tw:rounded-md tw:border tw:border-gray-200 tw:bg-white tw:text-popover-foreground tw:shadow-md tw:origin-[--radix-select-content-transform-origin]",n==="popper"&&"tw:data-[side=bottom]:translate-y-1 tw:data-[side=left]:-translate-x-1 tw:data-[side=right]:translate-x-1 tw:data-[side=top]:-translate-y-1",e),position:n,...o,children:[s.jsx(BS,{}),s.jsx(NO,{className:I("tw:p-1",n==="popper"&&"tw:h-[var(--radix-select-trigger-height)] tw:w-full tw:min-w-[var(--radix-select-trigger-width)]"),children:t}),s.jsx(US,{})]});return r?i:s.jsx(SO,{container:a||void 0,children:i})});On.displayName=bS.displayName;const WO=f.forwardRef(({className:e,...t},n)=>s.jsx(SS,{ref:n,className:I("tw:px-2 tw:py-1.5 tw:text-sm tw:font-semibold",e),...t}));WO.displayName=SS.displayName;const kn=f.forwardRef(({className:e,children:t,...n},a)=>s.jsxs(NS,{ref:a,className:I("tw:relative tw:flex tw:w-full tw:cursor-default tw:select-none tw:items-center tw:rounded-sm tw:py-1.5 tw:pl-2 tw:pr-8 tw:text-sm tw:outline-none tw:hover:bg-primary/10 tw:focus:bg-primary/15 tw:focus:text-foreground tw:data-[disabled]:pointer-events-none tw:data-[disabled]:opacity-50",e),...n,children:[s.jsx("span",{className:"tw:absolute tw:right-2 tw:flex tw:h-3.5 tw:w-3.5 tw:items-center tw:justify-center",children:s.jsx(CO,{children:s.jsx(Ah,{className:"tw:h-4 tw:w-4"})})}),s.jsx(jO,{children:t})]}));kn.displayName=NS.displayName;const QO=f.forwardRef(({className:e,...t},n)=>s.jsx(ES,{ref:n,className:I("tw:-mx-1 tw:my-1 tw:h-px tw:bg-muted",e),...t}));QO.displayName=ES.displayName;const Fe=f.forwardRef(({className:e,...t},n)=>s.jsx("div",{ref:n,className:I("tw:rounded-xl tw:border tw:border-[var(--color-border,#e5e7eb)] tw:bg-[var(--color-card,white)] tw:text-[var(--color-card-foreground,inherit)] tw:shadow-sm",e),...t}));Fe.displayName="Card";const Ni=f.forwardRef(({className:e,...t},n)=>s.jsx("div",{ref:n,className:I("tw:flex tw:flex-col tw:space-y-1.5 tw:p-6",e),...t}));Ni.displayName="CardHeader";const ji=f.forwardRef(({className:e,...t},n)=>s.jsx("div",{ref:n,className:I("tw:font-semibold tw:leading-none tw:tracking-tight",e),...t}));ji.displayName="CardTitle";const JO=f.forwardRef(({className:e,...t},n)=>s.jsx("div",{ref:n,className:I("tw:text-sm tw:text-muted-foreground",e),...t}));JO.displayName="CardDescription";const Ge=f.forwardRef(({className:e,...t},n)=>s.jsx("div",{ref:n,className:I("tw:p-6",e),...t}));Ge.displayName="CardContent";const e6=f.forwardRef(({className:e,...t},n)=>s.jsx("div",{ref:n,className:I("tw:flex tw:items-center tw:p-6 tw:pt-0",e),...t}));e6.displayName="CardFooter";const t6=Sl("tw:relative tw:w-full tw:rounded-lg tw:border tw:px-4 tw:py-3 tw:text-sm tw:[&>svg+div]:translate-y-[-3px] tw:[&>svg]:absolute tw:[&>svg]:left-4 tw:[&>svg]:top-4 tw:[&>svg]:text-foreground tw:[&>svg~*]:pl-7",{variants:{variant:{default:"tw:bg-background tw:text-foreground",destructive:"tw:border-destructive/50 tw:text-destructive tw:dark:border-destructive tw:[&>svg]:text-destructive",success:"tw:border-green-300 tw:bg-green-50 tw:text-green-800 tw:[&>svg]:text-green-600"}},defaultVariants:{variant:"default"}}),HS=f.forwardRef(({className:e,variant:t,...n},a)=>s.jsx("div",{ref:a,role:"alert",className:I(t6({variant:t}),e),...n}));HS.displayName="Alert";const n6=f.forwardRef(({className:e,...t},n)=>s.jsx("h5",{ref:n,className:I("tw:mb-1 tw:font-medium tw:leading-none tw:tracking-tight",e),...t}));n6.displayName="AlertTitle";const a6=f.forwardRef(({className:e,...t},n)=>s.jsx("div",{ref:n,className:I("tw:text-sm tw:[&_p]:leading-relaxed",e),...t}));a6.displayName="AlertDescription";function r6(e,t){return f.useReducer((n,a)=>t[n][a]??n,e)}var bt=e=>{const{present:t,children:n}=e,a=o6(t),r=typeof n=="function"?n({present:a.isPresent}):f.Children.only(n),o=fe(a.ref,l6(r));return typeof n=="function"||a.isPresent?f.cloneElement(r,{ref:o}):null};bt.displayName="Presence";function o6(e){const[t,n]=f.useState(),a=f.useRef(null),r=f.useRef(e),o=f.useRef("none"),l=e?"mounted":"unmounted",[i,c]=r6(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return f.useEffect(()=>{const u=dd(a.current);o.current=i==="mounted"?u:"none"},[i]),ht(()=>{const u=a.current,m=r.current;if(m!==e){const p=o.current,h=dd(u);e?c("MOUNT"):h==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(m&&p!==h?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,c]),ht(()=>{if(t){let u;const m=t.ownerDocument.defaultView??window,d=h=>{const v=dd(a.current).includes(CSS.escape(h.animationName));if(h.target===t&&v&&(c("ANIMATION_END"),!r.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",u=m.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},p=h=>{h.target===t&&(o.current=dd(a.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{m.clearTimeout(u),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:f.useCallback(u=>{a.current=u?getComputedStyle(u):null,n(u)},[])}}function dd(e){return(e==null?void 0:e.animationName)||"none"}function l6(e){var a,r;let t=(a=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:a.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function s6(e){const t=i6(e),n=f.forwardRef((a,r)=>{const{children:o,...l}=a,i=f.Children.toArray(o),c=i.find(u6);if(c){const u=c.props.children,m=i.map(d=>d===c?f.Children.count(u)>1?f.Children.only(null):f.isValidElement(u)?u.props.children:null:d);return s.jsx(t,{...l,ref:r,children:f.isValidElement(u)?f.cloneElement(u,void 0,m):null})}return s.jsx(t,{...l,ref:r,children:o})});return n.displayName=`${e}.Slot`,n}function i6(e){const t=f.forwardRef((n,a)=>{const{children:r,...o}=n;if(f.isValidElement(r)){const l=f6(r),i=d6(o,r.props);return r.type!==f.Fragment&&(i.ref=a?sa(a,l):l),f.cloneElement(r,i)}return f.Children.count(r)>1?f.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var c6=Symbol("radix.slottable");function u6(e){return f.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===c6}function d6(e,t){const n={...t};for(const a in t){const r=e[a],o=t[a];/^on[A-Z]/.test(a)?r&&o?n[a]=(...i)=>{const c=o(...i);return r(...i),c}:r&&(n[a]=r):a==="style"?n[a]={...r,...o}:a==="className"&&(n[a]=[r,o].filter(Boolean).join(" "))}return{...e,...n}}function f6(e){var a,r;let t=(a=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:a.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var fd="Dialog",[IS,VS]=Dt(fd),[m6,Kn]=IS(fd),$S=e=>{const{__scopeDialog:t,children:n,open:a,defaultOpen:r,onOpenChange:o,modal:l=!0}=e,i=f.useRef(null),c=f.useRef(null),[u,m]=fa({prop:a,defaultProp:r??!1,onChange:o,caller:fd});return s.jsx(m6,{scope:t,triggerRef:i,contentRef:c,contentId:Ua(),titleId:Ua(),descriptionId:Ua(),open:u,onOpenChange:m,onOpenToggle:f.useCallback(()=>m(d=>!d),[m]),modal:l,children:n})};$S.displayName=fd;var FS="DialogTrigger",GS=f.forwardRef((e,t)=>{const{__scopeDialog:n,...a}=e,r=Kn(FS,n),o=fe(t,r.triggerRef);return s.jsx(le.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":Th(r.open),...a,ref:o,onClick:q(e.onClick,r.onOpenToggle)})});GS.displayName=FS;var Rh="DialogPortal",[p6,YS]=IS(Rh,{forceMount:void 0}),qS=e=>{const{__scopeDialog:t,forceMount:n,children:a,container:r}=e,o=Kn(Rh,t);return s.jsx(p6,{scope:t,forceMount:n,children:f.Children.map(a,l=>s.jsx(bt,{present:n||o.open,children:s.jsx(Dl,{asChild:!0,container:r,children:l})}))})};qS.displayName=Rh;var md="DialogOverlay",KS=f.forwardRef((e,t)=>{const n=YS(md,e.__scopeDialog),{forceMount:a=n.forceMount,...r}=e,o=Kn(md,e.__scopeDialog);return o.modal?s.jsx(bt,{present:a||o.open,children:s.jsx(w6,{...r,ref:t})}):null});KS.displayName=md;var h6=s6("DialogOverlay.RemoveScroll"),w6=f.forwardRef((e,t)=>{const{__scopeDialog:n,...a}=e,r=Kn(md,n);return s.jsx(bi,{as:h6,allowPinchZoom:!0,shards:[r.contentRef],children:s.jsx(le.div,{"data-state":Th(r.open),...a,ref:t,style:{pointerEvents:"auto",...a.style}})})}),go="DialogContent",XS=f.forwardRef((e,t)=>{const n=YS(go,e.__scopeDialog),{forceMount:a=n.forceMount,...r}=e,o=Kn(go,e.__scopeDialog);return s.jsx(bt,{present:a||o.open,children:o.modal?s.jsx(g6,{...r,ref:t}):s.jsx(v6,{...r,ref:t})})});XS.displayName=go;var g6=f.forwardRef((e,t)=>{const n=Kn(go,e.__scopeDialog),a=f.useRef(null),r=fe(t,n.contentRef,a);return f.useEffect(()=>{const o=a.current;if(o)return td(o)},[]),s.jsx(ZS,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:q(e.onCloseAutoFocus,o=>{var l;o.preventDefault(),(l=n.triggerRef.current)==null||l.focus()}),onPointerDownOutside:q(e.onPointerDownOutside,o=>{const l=o.detail.originalEvent,i=l.button===0&&l.ctrlKey===!0;(l.button===2||i)&&o.preventDefault()}),onFocusOutside:q(e.onFocusOutside,o=>o.preventDefault())})}),v6=f.forwardRef((e,t)=>{const n=Kn(go,e.__scopeDialog),a=f.useRef(!1),r=f.useRef(!1);return s.jsx(ZS,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var l,i;(l=e.onCloseAutoFocus)==null||l.call(e,o),o.defaultPrevented||(a.current||(i=n.triggerRef.current)==null||i.focus(),o.preventDefault()),a.current=!1,r.current=!1},onInteractOutside:o=>{var c,u;(c=e.onInteractOutside)==null||c.call(e,o),o.defaultPrevented||(a.current=!0,o.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const l=o.target;((u=n.triggerRef.current)==null?void 0:u.contains(l))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&r.current&&o.preventDefault()}})}),ZS=f.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:a,onOpenAutoFocus:r,onCloseAutoFocus:o,...l}=e,i=Kn(go,n),c=f.useRef(null),u=fe(t,c);return Hu(),s.jsxs(s.Fragment,{children:[s.jsx(hi,{asChild:!0,loop:!0,trapped:a,onMountAutoFocus:r,onUnmountAutoFocus:o,children:s.jsx(Al,{role:"dialog",id:i.contentId,"aria-describedby":i.descriptionId,"aria-labelledby":i.titleId,"data-state":Th(i.open),...l,ref:u,onDismiss:()=>i.onOpenChange(!1)})}),s.jsxs(s.Fragment,{children:[s.jsx(x6,{titleId:i.titleId}),s.jsx(S6,{contentRef:c,descriptionId:i.descriptionId})]})]})}),_h="DialogTitle",WS=f.forwardRef((e,t)=>{const{__scopeDialog:n,...a}=e,r=Kn(_h,n);return s.jsx(le.h2,{id:r.titleId,...a,ref:t})});WS.displayName=_h;var QS="DialogDescription",JS=f.forwardRef((e,t)=>{const{__scopeDialog:n,...a}=e,r=Kn(QS,n);return s.jsx(le.p,{id:r.descriptionId,...a,ref:t})});JS.displayName=QS;var e2="DialogClose",t2=f.forwardRef((e,t)=>{const{__scopeDialog:n,...a}=e,r=Kn(e2,n);return s.jsx(le.button,{type:"button",...a,ref:t,onClick:q(e.onClick,()=>r.onOpenChange(!1))})});t2.displayName=e2;function Th(e){return e?"open":"closed"}var n2="DialogTitleWarning",[y6,a2]=r5(n2,{contentName:go,titleName:_h,docsSlug:"dialog"}),x6=({titleId:e})=>{const t=a2(n2),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 f.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},b6="DialogDescriptionWarning",S6=({contentRef:e,descriptionId:t})=>{const a=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${a2(b6).contentName}}.`;return f.useEffect(()=>{var o;const r=(o=e.current)==null?void 0:o.getAttribute("aria-describedby");t&&r&&(document.getElementById(t)||console.warn(a))},[a,e,t]),null},Mh=$S,N6=GS,Dh=qS,Ci=KS,Ei=XS,Ai=WS,Ri=JS,pd=t2,j6=Symbol("radix.slottable");function C6(e){const t=({children:n})=>s.jsx(s.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=j6,t}var r2="AlertDialog",[E6]=Dt(r2,[VS]),Va=VS(),o2=e=>{const{__scopeAlertDialog:t,...n}=e,a=Va(t);return s.jsx(Mh,{...a,...n,modal:!0})};o2.displayName=r2;var A6="AlertDialogTrigger",R6=f.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...a}=e,r=Va(n);return s.jsx(N6,{...r,...a,ref:t})});R6.displayName=A6;var _6="AlertDialogPortal",l2=e=>{const{__scopeAlertDialog:t,...n}=e,a=Va(t);return s.jsx(Dh,{...a,...n})};l2.displayName=_6;var T6="AlertDialogOverlay",s2=f.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...a}=e,r=Va(n);return s.jsx(Ci,{...r,...a,ref:t})});s2.displayName=T6;var Bl="AlertDialogContent",[M6,D6]=E6(Bl),O6=C6("AlertDialogContent"),i2=f.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:a,...r}=e,o=Va(n),l=f.useRef(null),i=fe(t,l),c=f.useRef(null);return s.jsx(y6,{contentName:Bl,titleName:c2,docsSlug:"alert-dialog",children:s.jsx(M6,{scope:n,cancelRef:c,children:s.jsxs(Ei,{role:"alertdialog",...o,...r,ref:i,onOpenAutoFocus:q(r.onOpenAutoFocus,u=>{var m;u.preventDefault(),(m=c.current)==null||m.focus({preventScroll:!0})}),onPointerDownOutside:u=>u.preventDefault(),onInteractOutside:u=>u.preventDefault(),children:[s.jsx(O6,{children:a}),s.jsx(L6,{contentRef:l})]})})})});i2.displayName=Bl;var c2="AlertDialogTitle",u2=f.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...a}=e,r=Va(n);return s.jsx(Ai,{...r,...a,ref:t})});u2.displayName=c2;var d2="AlertDialogDescription",f2=f.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...a}=e,r=Va(n);return s.jsx(Ri,{...r,...a,ref:t})});f2.displayName=d2;var k6="AlertDialogAction",m2=f.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...a}=e,r=Va(n);return s.jsx(pd,{...r,...a,ref:t})});m2.displayName=k6;var p2="AlertDialogCancel",h2=f.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...a}=e,{cancelRef:r}=D6(p2,n),o=Va(n),l=fe(t,r);return s.jsx(pd,{...o,...a,ref:l})});h2.displayName=p2;var L6=({contentRef:e})=>{const t=`\`${Bl}\` requires a description for the component to be accessible for screen reader users.

You can add a description to the \`${Bl}\` by passing a \`${d2}\` component as a child, which also benefits sighted users by adding visible context to the dialog.

Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${Bl}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.

For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return f.useEffect(()=>{var a;document.getElementById((a=e.current)==null?void 0:a.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},z6=o2,P6=l2,w2=s2,g2=i2,v2=m2,y2=h2,x2=u2,b2=f2;const B6=z6,U6=P6,S2=f.forwardRef(({className:e,...t},n)=>s.jsx(w2,{className:I("tw:fixed tw:inset-0 tw:z-50 tw:bg-black/50",e),...t,ref:n}));S2.displayName=w2.displayName;const N2=f.forwardRef(({className:e,...t},n)=>s.jsxs(U6,{children:[s.jsx(S2,{}),s.jsx(g2,{ref:n,className:I("tw:fixed tw:left-[50%] tw:top-[50%] tw:z-50 tw:grid tw:w-full tw:max-w-lg tw:translate-x-[-50%] tw:translate-y-[-50%] tw:gap-4 tw:border tw:border-gray-200 tw:bg-background tw:p-6 tw:shadow-xl tw:rounded-lg",e),...t})]}));N2.displayName=g2.displayName;const j2=({className:e,...t})=>s.jsx("div",{className:I("tw:flex tw:flex-col tw:space-y-2 tw:text-center tw:sm:text-left",e),...t});j2.displayName="AlertDialogHeader";const C2=({className:e,...t})=>s.jsx("div",{className:I("tw:flex tw:flex-col-reverse tw:sm:flex-row tw:sm:justify-end tw:sm:space-x-2",e),...t});C2.displayName="AlertDialogFooter";const E2=f.forwardRef(({className:e,...t},n)=>s.jsx(x2,{ref:n,className:I("tw:text-lg tw:font-semibold",e),...t}));E2.displayName=x2.displayName;const A2=f.forwardRef(({className:e,...t},n)=>s.jsx(b2,{ref:n,className:I("tw:text-sm tw:text-muted-foreground",e),...t}));A2.displayName=b2.displayName;const R2=f.forwardRef(({className:e,...t},n)=>s.jsx(v2,{ref:n,className:I(Qp(),e),...t}));R2.displayName=v2.displayName;const _2=f.forwardRef(({className:e,...t},n)=>s.jsx(y2,{ref:n,className:I(Qp({variant:"outline"}),"tw:mt-2 tw:sm:mt-0",e),...t}));_2.displayName=y2.displayName;function H6(e,t=[]){let n=[];function a(o,l){const i=f.createContext(l);i.displayName=o+"Context";const c=n.length;n=[...n,l];const u=d=>{var w;const{scope:p,children:h,...x}=d,v=((w=p==null?void 0:p[e])==null?void 0:w[c])||i,b=f.useMemo(()=>x,Object.values(x));return s.jsx(v.Provider,{value:b,children:h})};u.displayName=o+"Provider";function m(d,p){var v;const h=((v=p==null?void 0:p[e])==null?void 0:v[c])||i,x=f.useContext(h);if(x)return x;if(l!==void 0)return l;throw new Error(`\`${d}\` must be used within \`${o}\``)}return[u,m]}const r=()=>{const o=n.map(l=>f.createContext(l));return function(i){const c=(i==null?void 0:i[e])||o;return f.useMemo(()=>({[`__scope${e}`]:{...i,[e]:c}}),[i,c])}};return r.scopeName=e,[a,I6(r,...t)]}function I6(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const a=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(o){const l=a.reduce((i,{useScope:c,scopeName:u})=>{const d=c(o)[`__scope${u}`];return{...i,...d}},{});return f.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return n.scopeName=t.scopeName,n}var V6=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Oh=V6.reduce((e,t)=>{const n=Ou(`Primitive.${t}`),a=f.forwardRef((r,o)=>{const{asChild:l,...i}=r,c=l?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),s.jsx(c,{...i,ref:o})});return a.displayName=`Primitive.${t}`,{...e,[t]:a}},{}),T2={exports:{}},M2={};/**
 * @license React
 * use-sync-external-store-shim.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var Ul=f;function $6(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var F6=typeof Object.is=="function"?Object.is:$6,G6=Ul.useState,Y6=Ul.useEffect,q6=Ul.useLayoutEffect,K6=Ul.useDebugValue;function X6(e,t){var n=t(),a=G6({inst:{value:n,getSnapshot:t}}),r=a[0].inst,o=a[1];return q6(function(){r.value=n,r.getSnapshot=t,kh(r)&&o({inst:r})},[e,n,t]),Y6(function(){return kh(r)&&o({inst:r}),e(function(){kh(r)&&o({inst:r})})},[e]),K6(n),n}function kh(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!F6(e,n)}catch{return!0}}function Z6(e,t){return t()}var W6=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Z6:X6;M2.useSyncExternalStore=Ul.useSyncExternalStore!==void 0?Ul.useSyncExternalStore:W6,T2.exports=M2;var Q6=T2.exports;function J6(){return Q6.useSyncExternalStore(e8,()=>!0,()=>!1)}function e8(){return()=>{}}var Lh="Avatar",[t8]=H6(Lh),[n8,D2]=t8(Lh),O2=f.forwardRef((e,t)=>{const{__scopeAvatar:n,...a}=e,[r,o]=f.useState("idle");return s.jsx(n8,{scope:n,imageLoadingStatus:r,onImageLoadingStatusChange:o,children:s.jsx(Oh.span,{...a,ref:t})})});O2.displayName=Lh;var k2="AvatarImage",L2=f.forwardRef((e,t)=>{const{__scopeAvatar:n,src:a,onLoadingStatusChange:r=()=>{},...o}=e,l=D2(k2,n),i=a8(a,o),c=Ot(u=>{r(u),l.onImageLoadingStatusChange(u)});return ht(()=>{i!=="idle"&&c(i)},[i,c]),i==="loaded"?s.jsx(Oh.img,{...o,ref:t,src:a}):null});L2.displayName=k2;var z2="AvatarFallback",P2=f.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:a,...r}=e,o=D2(z2,n),[l,i]=f.useState(a===void 0);return f.useEffect(()=>{if(a!==void 0){const c=window.setTimeout(()=>i(!0),a);return()=>window.clearTimeout(c)}},[a]),l&&o.imageLoadingStatus!=="loaded"?s.jsx(Oh.span,{...r,ref:t}):null});P2.displayName=z2;function B2(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function a8(e,{referrerPolicy:t,crossOrigin:n}){const a=J6(),r=f.useRef(null),o=a?(r.current||(r.current=new window.Image),r.current):null,[l,i]=f.useState(()=>B2(o,e));return ht(()=>{i(B2(o,e))},[o,e]),ht(()=>{const c=d=>()=>{i(d)};if(!o)return;const u=c("loaded"),m=c("error");return o.addEventListener("load",u),o.addEventListener("error",m),t&&(o.referrerPolicy=t),typeof n=="string"&&(o.crossOrigin=n),()=>{o.removeEventListener("load",u),o.removeEventListener("error",m)}},[o,n,t]),l}var U2=O2,H2=L2,I2=P2;const r8=f.forwardRef(({className:e,...t},n)=>s.jsx(U2,{ref:n,className:I("tw:relative tw:flex tw:h-10 tw:w-10 tw:shrink-0 tw:overflow-hidden tw:rounded-full",e),...t}));r8.displayName=U2.displayName;const o8=f.forwardRef(({className:e,...t},n)=>s.jsx(H2,{ref:n,className:I("tw:aspect-square tw:h-full tw:w-full",e),...t}));o8.displayName=H2.displayName;const l8=f.forwardRef(({className:e,...t},n)=>s.jsx(I2,{ref:n,className:I("tw:flex tw:h-full tw:w-full tw:items-center tw:justify-center tw:rounded-full tw:bg-muted",e),...t}));l8.displayName=I2.displayName;const s8=Sl("tw:inline-flex tw:items-center tw:rounded-md tw:border tw:px-2.5 tw:py-0.5 tw:text-xs tw:font-semibold tw:transition-colors tw:focus:outline-none tw:focus:ring-2 tw:focus:ring-ring tw:focus:ring-offset-2",{variants:{variant:{default:"tw:border-transparent tw:bg-primary tw:text-primary-foreground tw:shadow tw:hover:bg-primary/80",secondary:"tw:border-transparent tw:bg-secondary tw:text-secondary-foreground tw:hover:bg-secondary/80",destructive:"tw:border-transparent tw:bg-destructive tw:text-destructive-foreground tw:shadow tw:hover:bg-destructive/80",outline:"tw:text-foreground"}},defaultVariants:{variant:"default"}});function hd({className:e,variant:t,...n}){return s.jsx("div",{className:I(s8({variant:t}),e),...n})}const i8=f.forwardRef(({...e},t)=>s.jsx("nav",{ref:t,"aria-label":"breadcrumb",...e}));i8.displayName="Breadcrumb";const c8=f.forwardRef(({className:e,...t},n)=>s.jsx("ol",{ref:n,className:I("tw:flex tw:flex-wrap tw:items-center tw:gap-1.5 tw:break-words tw:text-sm tw:text-muted-foreground tw:sm:gap-2.5",e),...t}));c8.displayName="BreadcrumbList";const u8=f.forwardRef(({className:e,...t},n)=>s.jsx("li",{ref:n,className:I("tw:inline-flex tw:items-center tw:gap-1.5",e),...t}));u8.displayName="BreadcrumbItem";const d8=f.forwardRef(({asChild:e,className:t,...n},a)=>{const r=e?fo:"a";return s.jsx(r,{ref:a,className:I("tw:transition-colors tw:hover:text-foreground",t),...n})});d8.displayName="BreadcrumbLink";const f8=f.forwardRef(({className:e,...t},n)=>s.jsx("span",{ref:n,role:"link","aria-disabled":"true","aria-current":"page",className:I("tw:font-normal tw:text-foreground",e),...t}));f8.displayName="BreadcrumbPage";var wd="Checkbox",[m8]=Dt(wd),[p8,zh]=m8(wd);function h8(e){const{__scopeCheckbox:t,checked:n,children:a,defaultChecked:r,disabled:o,form:l,name:i,onCheckedChange:c,required:u,value:m="on",internal_do_not_use_render:d}=e,[p,h]=fa({prop:n,defaultProp:r??!1,onChange:c,caller:wd}),[x,v]=f.useState(null),[b,w]=f.useState(null),g=f.useRef(!1),y=x?!!l||!!x.closest("form"):!0,S={checked:p,disabled:o,setChecked:h,control:x,setControl:v,name:i,form:l,value:m,hasConsumerStoppedPropagationRef:g,required:u,defaultChecked:Mr(r)?!1:r,isFormControl:y,bubbleInput:b,setBubbleInput:w};return s.jsx(p8,{scope:t,...S,children:w8(d)?d(S):a})}var V2="CheckboxTrigger",$2=f.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...a},r)=>{const{control:o,value:l,disabled:i,checked:c,required:u,setControl:m,setChecked:d,hasConsumerStoppedPropagationRef:p,isFormControl:h,bubbleInput:x}=zh(V2,e),v=fe(r,m),b=f.useRef(c);return f.useEffect(()=>{const w=o==null?void 0:o.form;if(w){const g=()=>d(b.current);return w.addEventListener("reset",g),()=>w.removeEventListener("reset",g)}},[o,d]),s.jsx(le.button,{type:"button",role:"checkbox","aria-checked":Mr(c)?"mixed":c,"aria-required":u,"data-state":K2(c),"data-disabled":i?"":void 0,disabled:i,value:l,...a,ref:v,onKeyDown:q(t,w=>{w.key==="Enter"&&w.preventDefault()}),onClick:q(n,w=>{d(g=>Mr(g)?!0:!g),x&&h&&(p.current=w.isPropagationStopped(),p.current||w.stopPropagation())})})});$2.displayName=V2;var Ph=f.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:a,checked:r,defaultChecked:o,required:l,disabled:i,value:c,onCheckedChange:u,form:m,...d}=e;return s.jsx(h8,{__scopeCheckbox:n,checked:r,defaultChecked:o,disabled:i,required:l,onCheckedChange:u,name:a,form:m,value:c,internal_do_not_use_render:({isFormControl:p})=>s.jsxs(s.Fragment,{children:[s.jsx($2,{...d,ref:t,__scopeCheckbox:n}),p&&s.jsx(q2,{__scopeCheckbox:n})]})})});Ph.displayName=wd;var F2="CheckboxIndicator",G2=f.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:a,...r}=e,o=zh(F2,n);return s.jsx(bt,{present:a||Mr(o.checked)||o.checked===!0,children:s.jsx(le.span,{"data-state":K2(o.checked),"data-disabled":o.disabled?"":void 0,...r,ref:t,style:{pointerEvents:"none",...e.style}})})});G2.displayName=F2;var Y2="CheckboxBubbleInput",q2=f.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:a,hasConsumerStoppedPropagationRef:r,checked:o,defaultChecked:l,required:i,disabled:c,name:u,value:m,form:d,bubbleInput:p,setBubbleInput:h}=zh(Y2,e),x=fe(n,h),v=xi(o),b=vi(a);f.useEffect(()=>{const g=p;if(!g)return;const y=window.HTMLInputElement.prototype,E=Object.getOwnPropertyDescriptor(y,"checked").set,R=!r.current;if(v!==o&&E){const N=new Event("click",{bubbles:R});g.indeterminate=Mr(o),E.call(g,Mr(o)?!1:o),g.dispatchEvent(N)}},[p,v,o,r]);const w=f.useRef(Mr(o)?!1:o);return s.jsx(le.input,{type:"checkbox","aria-hidden":!0,defaultChecked:l??w.current,required:i,disabled:c,name:u,value:m,form:d,...t,tabIndex:-1,ref:x,style:{...t.style,...b,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});q2.displayName=Y2;function w8(e){return typeof e=="function"}function Mr(e){return e==="indeterminate"}function K2(e){return Mr(e)?"indeterminate":e?"checked":"unchecked"}const g8=f.forwardRef(({className:e,...t},n)=>s.jsx(Ph,{ref:n,className:I("tw:grid tw:place-content-center tw:peer tw:h-4 tw:w-4 tw:shrink-0 tw:rounded-sm tw:border tw:border-primary tw:shadow tw:focus-visible:outline-none tw:focus-visible:ring-1 tw:focus-visible:ring-ring tw:disabled:cursor-not-allowed tw:disabled:opacity-50 tw:data-[state=checked]:bg-primary tw:data-[state=checked]:text-primary-foreground",e),...t,children:s.jsx(G2,{className:I("tw:grid tw:place-content-center tw:text-current"),children:s.jsx(Ah,{className:"tw:h-4 tw:w-4"})})}));g8.displayName=Ph.displayName;const X2=Mh,v8=Dh,Z2=f.forwardRef(({className:e,...t},n)=>s.jsx(Ci,{ref:n,className:I("tw:fixed tw:inset-0 tw:z-50 tw:bg-black/50",e),...t}));Z2.displayName=Ci.displayName;const Bh=f.forwardRef(({className:e,children:t,...n},a)=>s.jsxs(v8,{children:[s.jsx(Z2,{}),s.jsxs(Ei,{ref:a,className:I("tw:fixed tw:left-[50%] tw:top-[50%] tw:z-50 tw:grid tw:w-full tw:max-w-lg tw:translate-x-[-50%] tw:translate-y-[-50%] tw:gap-4 tw:border tw:border-gray-200 tw:bg-background tw:p-6 tw:shadow-xl tw:rounded-lg",e),...n,children:[t,s.jsxs(pd,{className:"tw:absolute tw:right-4 tw:top-4 tw:rounded-sm tw:opacity-70 tw:ring-offset-background tw:transition-opacity tw:hover:opacity-100 tw:focus:outline-none tw:focus:ring-2 tw:focus:ring-ring tw:focus:ring-offset-2 tw:disabled:pointer-events-none tw:data-[state=open]:bg-accent tw:data-[state=open]:text-muted-foreground",children:[s.jsx(PS,{className:"tw:h-4 tw:w-4"}),s.jsx("span",{className:"tw:sr-only",children:"Close"})]})]})]}));Bh.displayName=Ei.displayName;const Uh=({className:e,...t})=>s.jsx("div",{className:I("tw:flex tw:flex-col tw:space-y-1.5 tw:text-center tw:sm:text-left",e),...t});Uh.displayName="DialogHeader";const W2=({className:e,...t})=>s.jsx("div",{className:I("tw:flex tw:flex-col-reverse tw:sm:flex-row tw:sm:justify-end tw:sm:space-x-2",e),...t});W2.displayName="DialogFooter";const Hh=f.forwardRef(({className:e,...t},n)=>s.jsx(Ai,{ref:n,className:I("tw:text-lg tw:font-semibold tw:leading-none tw:tracking-tight",e),...t}));Hh.displayName=Ai.displayName;const y8=f.forwardRef(({className:e,...t},n)=>s.jsx(Ri,{ref:n,className:I("tw:text-sm tw:text-muted-foreground",e),...t}));y8.displayName=Ri.displayName;var Ih="rovingFocusGroup.onEntryFocus",x8={bubbles:!1,cancelable:!0},_i="RovingFocusGroup",[Vh,Q2,b8]=Uu(_i),[S8,Hl]=Dt(_i,[b8]),[N8,j8]=S8(_i),J2=f.forwardRef((e,t)=>s.jsx(Vh.Provider,{scope:e.__scopeRovingFocusGroup,children:s.jsx(Vh.Slot,{scope:e.__scopeRovingFocusGroup,children:s.jsx(C8,{...e,ref:t})})}));J2.displayName=_i;var C8=f.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:a,loop:r=!1,dir:o,currentTabStopId:l,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:m=!1,...d}=e,p=f.useRef(null),h=fe(t,p),x=El(o),[v,b]=fa({prop:l,defaultProp:i??null,onChange:c,caller:_i}),[w,g]=f.useState(!1),y=Ot(u),S=Q2(n),E=f.useRef(!1),[R,N]=f.useState(0);return f.useEffect(()=>{const j=p.current;if(j)return j.addEventListener(Ih,y),()=>j.removeEventListener(Ih,y)},[y]),s.jsx(N8,{scope:n,orientation:a,dir:x,loop:r,currentTabStopId:v,onItemFocus:f.useCallback(j=>b(j),[b]),onItemShiftTab:f.useCallback(()=>g(!0),[]),onFocusableItemAdd:f.useCallback(()=>N(j=>j+1),[]),onFocusableItemRemove:f.useCallback(()=>N(j=>j-1),[]),children:s.jsx(le.div,{tabIndex:w||R===0?-1:0,"data-orientation":a,...d,ref:h,style:{outline:"none",...e.style},onMouseDown:q(e.onMouseDown,()=>{E.current=!0}),onFocus:q(e.onFocus,j=>{const T=!E.current;if(j.target===j.currentTarget&&T&&!w){const O=new CustomEvent(Ih,x8);if(j.currentTarget.dispatchEvent(O),!O.defaultPrevented){const D=S().filter(C=>C.focusable),H=D.find(C=>C.active),k=D.find(C=>C.id===v),U=[H,k,...D].filter(Boolean).map(C=>C.ref.current);nN(U,m)}}E.current=!1}),onBlur:q(e.onBlur,()=>g(!1))})})}),eN="RovingFocusGroupItem",tN=f.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:a=!0,active:r=!1,tabStopId:o,children:l,...i}=e,c=Ua(),u=o||c,m=j8(eN,n),d=m.currentTabStopId===u,p=Q2(n),{onFocusableItemAdd:h,onFocusableItemRemove:x,currentTabStopId:v}=m;return f.useEffect(()=>{if(a)return h(),()=>x()},[a,h,x]),s.jsx(Vh.ItemSlot,{scope:n,id:u,focusable:a,active:r,children:s.jsx(le.span,{tabIndex:d?0:-1,"data-orientation":m.orientation,...i,ref:t,onMouseDown:q(e.onMouseDown,b=>{a?m.onItemFocus(u):b.preventDefault()}),onFocus:q(e.onFocus,()=>m.onItemFocus(u)),onKeyDown:q(e.onKeyDown,b=>{if(b.key==="Tab"&&b.shiftKey){m.onItemShiftTab();return}if(b.target!==b.currentTarget)return;const w=R8(b,m.orientation,m.dir);if(w!==void 0){if(b.metaKey||b.ctrlKey||b.altKey||b.shiftKey)return;b.preventDefault();let y=p().filter(S=>S.focusable).map(S=>S.ref.current);if(w==="last")y.reverse();else if(w==="prev"||w==="next"){w==="prev"&&y.reverse();const S=y.indexOf(b.currentTarget);y=m.loop?_8(y,S+1):y.slice(S+1)}setTimeout(()=>nN(y))}}),children:typeof l=="function"?l({isCurrentTabStop:d,hasTabStop:v!=null}):l})})});tN.displayName=eN;var E8={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function A8(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function R8(e,t,n){const a=A8(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(a))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(a)))return E8[a]}function nN(e,t=!1){const n=document.activeElement;for(const a of e)if(a===n||(a.focus({preventScroll:t}),document.activeElement!==n))return}function _8(e,t){return e.map((n,a)=>e[(t+a)%e.length])}var $h=J2,Fh=tN;function T8(e){const t=M8(e),n=f.forwardRef((a,r)=>{const{children:o,...l}=a,i=f.Children.toArray(o),c=i.find(O8);if(c){const u=c.props.children,m=i.map(d=>d===c?f.Children.count(u)>1?f.Children.only(null):f.isValidElement(u)?u.props.children:null:d);return s.jsx(t,{...l,ref:r,children:f.isValidElement(u)?f.cloneElement(u,void 0,m):null})}return s.jsx(t,{...l,ref:r,children:o})});return n.displayName=`${e}.Slot`,n}function M8(e){const t=f.forwardRef((n,a)=>{const{children:r,...o}=n;if(f.isValidElement(r)){const l=L8(r),i=k8(o,r.props);return r.type!==f.Fragment&&(i.ref=a?sa(a,l):l),f.cloneElement(r,i)}return f.Children.count(r)>1?f.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var D8=Symbol("radix.slottable");function O8(e){return f.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===D8}function k8(e,t){const n={...t};for(const a in t){const r=e[a],o=t[a];/^on[A-Z]/.test(a)?r&&o?n[a]=(...i)=>{const c=o(...i);return r(...i),c}:r&&(n[a]=r):a==="style"?n[a]={...r,...o}:a==="className"&&(n[a]=[r,o].filter(Boolean).join(" "))}return{...e,...n}}function L8(e){var a,r;let t=(a=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:a.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Gh=["Enter"," "],z8=["ArrowDown","PageUp","Home"],aN=["ArrowUp","PageDown","End"],P8=[...z8,...aN],B8={ltr:[...Gh,"ArrowRight"],rtl:[...Gh,"ArrowLeft"]},U8={ltr:["ArrowLeft"],rtl:["ArrowRight"]},gd="Menu",[Ti,H8,I8]=Uu(gd),[vo,rN]=Dt(gd,[I8,Rr,Hl]),Yh=Rr(),oN=Hl(),[oB,yo]=vo(gd),[lB,Mi]=vo(gd),V8="MenuAnchor",qh=f.forwardRef((e,t)=>{const{__scopeMenu:n,...a}=e,r=Yh(n);return s.jsx(yi,{...r,...a,ref:t})});qh.displayName=V8;var Kh="MenuPortal",[$8,lN]=vo(Kh,{forceMount:void 0}),sN=e=>{const{__scopeMenu:t,forceMount:n,children:a,container:r}=e,o=yo(Kh,t);return s.jsx($8,{scope:t,forceMount:n,children:s.jsx(bt,{present:n||o.open,children:s.jsx(Dl,{asChild:!0,container:r,children:a})})})};sN.displayName=Kh;var Ln="MenuContent",[F8,Xh]=vo(Ln),iN=f.forwardRef((e,t)=>{const n=lN(Ln,e.__scopeMenu),{forceMount:a=n.forceMount,...r}=e,o=yo(Ln,e.__scopeMenu),l=Mi(Ln,e.__scopeMenu);return s.jsx(Ti.Provider,{scope:e.__scopeMenu,children:s.jsx(bt,{present:a||o.open,children:s.jsx(Ti.Slot,{scope:e.__scopeMenu,children:l.modal?s.jsx(G8,{...r,ref:t}):s.jsx(Y8,{...r,ref:t})})})})}),G8=f.forwardRef((e,t)=>{const n=yo(Ln,e.__scopeMenu),a=f.useRef(null),r=fe(t,a);return f.useEffect(()=>{const o=a.current;if(o)return td(o)},[]),s.jsx(Zh,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:q(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Y8=f.forwardRef((e,t)=>{const n=yo(Ln,e.__scopeMenu);return s.jsx(Zh,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),q8=T8("MenuContent.ScrollLock"),Zh=f.forwardRef((e,t)=>{const{__scopeMenu:n,loop:a=!1,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:l,disableOutsidePointerEvents:i,onEntryFocus:c,onEscapeKeyDown:u,onPointerDownOutside:m,onFocusOutside:d,onInteractOutside:p,onDismiss:h,disableOutsideScroll:x,...v}=e,b=yo(Ln,n),w=Mi(Ln,n),g=Yh(n),y=oN(n),S=H8(n),[E,R]=f.useState(null),N=f.useRef(null),j=fe(t,N,b.onContentChange),T=f.useRef(0),O=f.useRef(""),D=f.useRef(0),H=f.useRef(null),k=f.useRef("right"),B=f.useRef(0),U=x?bi:f.Fragment,C=x?{as:q8,allowPinchZoom:!0}:void 0,L=z=>{var Y,W;const $=O.current+z,J=S().filter(pe=>!pe.disabled),me=document.activeElement,Z=(Y=J.find(pe=>pe.ref.current===me))==null?void 0:Y.textValue,Q=J.map(pe=>pe.textValue),ee=ok(Q,$,Z),ge=(W=J.find(pe=>pe.textValue===ee))==null?void 0:W.ref.current;(function pe(ue){O.current=ue,window.clearTimeout(T.current),ue!==""&&(T.current=window.setTimeout(()=>pe(""),1e3))})($),ge&&setTimeout(()=>ge.focus())};f.useEffect(()=>()=>window.clearTimeout(T.current),[]),Hu();const _=f.useCallback(z=>{var J,me;return k.current===((J=H.current)==null?void 0:J.side)&&sk(z,(me=H.current)==null?void 0:me.area)},[]);return s.jsx(F8,{scope:n,searchRef:O,onItemEnter:f.useCallback(z=>{_(z)&&z.preventDefault()},[_]),onItemLeave:f.useCallback(z=>{var $;_(z)||(($=N.current)==null||$.focus(),R(null))},[_]),onTriggerLeave:f.useCallback(z=>{_(z)&&z.preventDefault()},[_]),pointerGraceTimerRef:D,onPointerGraceIntentChange:f.useCallback(z=>{H.current=z},[]),children:s.jsx(U,{...C,children:s.jsx(hi,{asChild:!0,trapped:r,onMountAutoFocus:q(o,z=>{var $;z.preventDefault(),($=N.current)==null||$.focus({preventScroll:!0})}),onUnmountAutoFocus:l,children:s.jsx(Al,{asChild:!0,disableOutsidePointerEvents:i,onEscapeKeyDown:u,onPointerDownOutside:m,onFocusOutside:d,onInteractOutside:p,onDismiss:h,children:s.jsx($h,{asChild:!0,...y,dir:w.dir,orientation:"vertical",loop:a,currentTabStopId:E,onCurrentTabStopIdChange:R,onEntryFocus:q(c,z=>{w.isUsingKeyboardRef.current||z.preventDefault()}),preventScrollOnEntryFocus:!0,children:s.jsx(Wu,{role:"menu","aria-orientation":"vertical","data-state":CN(b.open),"data-radix-menu-content":"",dir:w.dir,...g,...v,ref:j,style:{outline:"none",...v.style},onKeyDown:q(v.onKeyDown,z=>{const J=z.target.closest("[data-radix-menu-content]")===z.currentTarget,me=z.ctrlKey||z.altKey||z.metaKey,Z=z.key.length===1;J&&(z.key==="Tab"&&z.preventDefault(),!me&&Z&&L(z.key));const Q=N.current;if(z.target!==Q||!P8.includes(z.key))return;z.preventDefault();const ge=S().filter(Y=>!Y.disabled).map(Y=>Y.ref.current);aN.includes(z.key)&&ge.reverse(),ak(ge)}),onBlur:q(e.onBlur,z=>{z.currentTarget.contains(z.target)||(window.clearTimeout(T.current),O.current="")}),onPointerMove:q(e.onPointerMove,Oi(z=>{const $=z.target,J=B.current!==z.clientX;if(z.currentTarget.contains($)&&J){const me=z.clientX>B.current?"right":"left";k.current=me,B.current=z.clientX}}))})})})})})})});iN.displayName=Ln;var K8="MenuGroup",Wh=f.forwardRef((e,t)=>{const{__scopeMenu:n,...a}=e;return s.jsx(le.div,{role:"group",...a,ref:t})});Wh.displayName=K8;var X8="MenuLabel",cN=f.forwardRef((e,t)=>{const{__scopeMenu:n,...a}=e;return s.jsx(le.div,{...a,ref:t})});cN.displayName=X8;var vd="MenuItem",uN="menu.itemSelect",yd=f.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:a,...r}=e,o=f.useRef(null),l=Mi(vd,e.__scopeMenu),i=Xh(vd,e.__scopeMenu),c=fe(t,o),u=f.useRef(!1),m=()=>{const d=o.current;if(!n&&d){const p=new CustomEvent(uN,{bubbles:!0,cancelable:!0});d.addEventListener(uN,h=>a==null?void 0:a(h),{once:!0}),Ib(d,p),p.defaultPrevented?u.current=!1:l.onClose()}};return s.jsx(dN,{...r,ref:c,disabled:n,onClick:q(e.onClick,m),onPointerDown:d=>{var p;(p=e.onPointerDown)==null||p.call(e,d),u.current=!0},onPointerUp:q(e.onPointerUp,d=>{var p;u.current||(p=d.currentTarget)==null||p.click()}),onKeyDown:q(e.onKeyDown,d=>{const p=i.searchRef.current!=="";n||p&&d.key===" "||Gh.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})})});yd.displayName=vd;var dN=f.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:a=!1,textValue:r,...o}=e,l=Xh(vd,n),i=oN(n),c=f.useRef(null),u=fe(t,c),[m,d]=f.useState(!1),[p,h]=f.useState("");return f.useEffect(()=>{const x=c.current;x&&h((x.textContent??"").trim())},[o.children]),s.jsx(Ti.ItemSlot,{scope:n,disabled:a,textValue:r??p,children:s.jsx(Fh,{asChild:!0,...i,focusable:!a,children:s.jsx(le.div,{role:"menuitem","data-highlighted":m?"":void 0,"aria-disabled":a||void 0,"data-disabled":a?"":void 0,...o,ref:u,onPointerMove:q(e.onPointerMove,Oi(x=>{a?l.onItemLeave(x):(l.onItemEnter(x),x.defaultPrevented||x.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:q(e.onPointerLeave,Oi(x=>l.onItemLeave(x))),onFocus:q(e.onFocus,()=>d(!0)),onBlur:q(e.onBlur,()=>d(!1))})})})}),Z8="MenuCheckboxItem",fN=f.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:a,...r}=e;return s.jsx(gN,{scope:e.__scopeMenu,checked:n,children:s.jsx(yd,{role:"menuitemcheckbox","aria-checked":xd(n)?"mixed":n,...r,ref:t,"data-state":Jh(n),onSelect:q(r.onSelect,()=>a==null?void 0:a(xd(n)?!0:!n),{checkForDefaultPrevented:!1})})})});fN.displayName=Z8;var mN="MenuRadioGroup",[W8,Q8]=vo(mN,{value:void 0,onValueChange:()=>{}}),pN=f.forwardRef((e,t)=>{const{value:n,onValueChange:a,...r}=e,o=Ot(a);return s.jsx(W8,{scope:e.__scopeMenu,value:n,onValueChange:o,children:s.jsx(Wh,{...r,ref:t})})});pN.displayName=mN;var hN="MenuRadioItem",wN=f.forwardRef((e,t)=>{const{value:n,...a}=e,r=Q8(hN,e.__scopeMenu),o=n===r.value;return s.jsx(gN,{scope:e.__scopeMenu,checked:o,children:s.jsx(yd,{role:"menuitemradio","aria-checked":o,...a,ref:t,"data-state":Jh(o),onSelect:q(a.onSelect,()=>{var l;return(l=r.onValueChange)==null?void 0:l.call(r,n)},{checkForDefaultPrevented:!1})})})});wN.displayName=hN;var Qh="MenuItemIndicator",[gN,J8]=vo(Qh,{checked:!1}),vN=f.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:a,...r}=e,o=J8(Qh,n);return s.jsx(bt,{present:a||xd(o.checked)||o.checked===!0,children:s.jsx(le.span,{...r,ref:t,"data-state":Jh(o.checked)})})});vN.displayName=Qh;var ek="MenuSeparator",yN=f.forwardRef((e,t)=>{const{__scopeMenu:n,...a}=e;return s.jsx(le.div,{role:"separator","aria-orientation":"horizontal",...a,ref:t})});yN.displayName=ek;var tk="MenuArrow",xN=f.forwardRef((e,t)=>{const{__scopeMenu:n,...a}=e,r=Yh(n);return s.jsx(Qu,{...r,...a,ref:t})});xN.displayName=tk;var nk="MenuSub",[sB,bN]=vo(nk),Di="MenuSubTrigger",SN=f.forwardRef((e,t)=>{const n=yo(Di,e.__scopeMenu),a=Mi(Di,e.__scopeMenu),r=bN(Di,e.__scopeMenu),o=Xh(Di,e.__scopeMenu),l=f.useRef(null),{pointerGraceTimerRef:i,onPointerGraceIntentChange:c}=o,u={__scopeMenu:e.__scopeMenu},m=f.useCallback(()=>{l.current&&window.clearTimeout(l.current),l.current=null},[]);return f.useEffect(()=>m,[m]),f.useEffect(()=>{const d=i.current;return()=>{window.clearTimeout(d),c(null)}},[i,c]),s.jsx(qh,{asChild:!0,...u,children:s.jsx(dN,{id:r.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":r.contentId,"data-state":CN(n.open),...e,ref:sa(t,r.onTriggerChange),onClick:d=>{var p;(p=e.onClick)==null||p.call(e,d),!(e.disabled||d.defaultPrevented)&&(d.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:q(e.onPointerMove,Oi(d=>{o.onItemEnter(d),!d.defaultPrevented&&!e.disabled&&!n.open&&!l.current&&(o.onPointerGraceIntentChange(null),l.current=window.setTimeout(()=>{n.onOpenChange(!0),m()},100))})),onPointerLeave:q(e.onPointerLeave,Oi(d=>{var h,x;m();const p=(h=n.content)==null?void 0:h.getBoundingClientRect();if(p){const v=(x=n.content)==null?void 0:x.dataset.side,b=v==="right",w=b?-5:5,g=p[b?"left":"right"],y=p[b?"right":"left"];o.onPointerGraceIntentChange({area:[{x:d.clientX+w,y:d.clientY},{x:g,y:p.top},{x:y,y:p.top},{x:y,y:p.bottom},{x:g,y:p.bottom}],side:v}),window.clearTimeout(i.current),i.current=window.setTimeout(()=>o.onPointerGraceIntentChange(null),300)}else{if(o.onTriggerLeave(d),d.defaultPrevented)return;o.onPointerGraceIntentChange(null)}})),onKeyDown:q(e.onKeyDown,d=>{var h;const p=o.searchRef.current!=="";e.disabled||p&&d.key===" "||B8[a.dir].includes(d.key)&&(n.onOpenChange(!0),(h=n.content)==null||h.focus(),d.preventDefault())})})})});SN.displayName=Di;var NN="MenuSubContent",jN=f.forwardRef((e,t)=>{const n=lN(Ln,e.__scopeMenu),{forceMount:a=n.forceMount,...r}=e,o=yo(Ln,e.__scopeMenu),l=Mi(Ln,e.__scopeMenu),i=bN(NN,e.__scopeMenu),c=f.useRef(null),u=fe(t,c);return s.jsx(Ti.Provider,{scope:e.__scopeMenu,children:s.jsx(bt,{present:a||o.open,children:s.jsx(Ti.Slot,{scope:e.__scopeMenu,children:s.jsx(Zh,{id:i.contentId,"aria-labelledby":i.triggerId,...r,ref:u,align:"start",side:l.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:m=>{var d;l.isUsingKeyboardRef.current&&((d=c.current)==null||d.focus()),m.preventDefault()},onCloseAutoFocus:m=>m.preventDefault(),onFocusOutside:q(e.onFocusOutside,m=>{m.target!==i.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:q(e.onEscapeKeyDown,m=>{l.onClose(),m.preventDefault()}),onKeyDown:q(e.onKeyDown,m=>{var h;const d=m.currentTarget.contains(m.target),p=U8[l.dir].includes(m.key);d&&p&&(o.onOpenChange(!1),(h=i.trigger)==null||h.focus(),m.preventDefault())})})})})})});jN.displayName=NN;function CN(e){return e?"open":"closed"}function xd(e){return e==="indeterminate"}function Jh(e){return xd(e)?"indeterminate":e?"checked":"unchecked"}function ak(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function rk(e,t){return e.map((n,a)=>e[(t+a)%e.length])}function ok(e,t,n){const r=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let l=rk(e,Math.max(o,0));r.length===1&&(l=l.filter(u=>u!==n));const c=l.find(u=>u.toLowerCase().startsWith(r.toLowerCase()));return c!==n?c:void 0}function lk(e,t){const{x:n,y:a}=e;let r=!1;for(let o=0,l=t.length-1;o<t.length;l=o++){const i=t[o],c=t[l],u=i.x,m=i.y,d=c.x,p=c.y;m>a!=p>a&&n<(d-u)*(a-m)/(p-m)+u&&(r=!r)}return r}function sk(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return lk(n,t)}function Oi(e){return t=>t.pointerType==="mouse"?e(t):void 0}var ik=qh,ck=sN,uk=iN,dk=Wh,fk=cN,mk=yd,pk=fN,hk=pN,wk=wN,gk=vN,vk=yN,yk=xN,xk=SN,bk=jN,EN="DropdownMenu",[Sk]=Dt(EN,[rN]),Wt=rN(),[iB,AN]=Sk(EN),RN="DropdownMenuTrigger",Nk=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:a=!1,...r}=e,o=AN(RN,n),l=Wt(n);return s.jsx(ik,{asChild:!0,...l,children:s.jsx(le.button,{type:"button",id:o.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":o.open?"open":"closed","data-disabled":a?"":void 0,disabled:a,...r,ref:sa(t,o.triggerRef),onPointerDown:q(e.onPointerDown,i=>{!a&&i.button===0&&i.ctrlKey===!1&&(o.onOpenToggle(),o.open||i.preventDefault())}),onKeyDown:q(e.onKeyDown,i=>{a||(["Enter"," "].includes(i.key)&&o.onOpenToggle(),i.key==="ArrowDown"&&o.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(i.key)&&i.preventDefault())})})})});Nk.displayName=RN;var jk="DropdownMenuPortal",_N=e=>{const{__scopeDropdownMenu:t,...n}=e,a=Wt(t);return s.jsx(ck,{...a,...n})};_N.displayName=jk;var TN="DropdownMenuContent",MN=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,r=AN(TN,n),o=Wt(n),l=f.useRef(!1);return s.jsx(uk,{id:r.contentId,"aria-labelledby":r.triggerId,...o,...a,ref:t,onCloseAutoFocus:q(e.onCloseAutoFocus,i=>{var c;l.current||(c=r.triggerRef.current)==null||c.focus(),l.current=!1,i.preventDefault()}),onInteractOutside:q(e.onInteractOutside,i=>{const c=i.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0,m=c.button===2||u;(!r.modal||m)&&(l.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});MN.displayName=TN;var Ck="DropdownMenuGroup",Ek=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,r=Wt(n);return s.jsx(dk,{...r,...a,ref:t})});Ek.displayName=Ck;var Ak="DropdownMenuLabel",DN=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,r=Wt(n);return s.jsx(fk,{...r,...a,ref:t})});DN.displayName=Ak;var Rk="DropdownMenuItem",ON=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,r=Wt(n);return s.jsx(mk,{...r,...a,ref:t})});ON.displayName=Rk;var _k="DropdownMenuCheckboxItem",kN=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,r=Wt(n);return s.jsx(pk,{...r,...a,ref:t})});kN.displayName=_k;var Tk="DropdownMenuRadioGroup",Mk=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,r=Wt(n);return s.jsx(hk,{...r,...a,ref:t})});Mk.displayName=Tk;var Dk="DropdownMenuRadioItem",LN=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,r=Wt(n);return s.jsx(wk,{...r,...a,ref:t})});LN.displayName=Dk;var Ok="DropdownMenuItemIndicator",zN=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,r=Wt(n);return s.jsx(gk,{...r,...a,ref:t})});zN.displayName=Ok;var kk="DropdownMenuSeparator",PN=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,r=Wt(n);return s.jsx(vk,{...r,...a,ref:t})});PN.displayName=kk;var Lk="DropdownMenuArrow",zk=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,r=Wt(n);return s.jsx(yk,{...r,...a,ref:t})});zk.displayName=Lk;var Pk="DropdownMenuSubTrigger",BN=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,r=Wt(n);return s.jsx(xk,{...r,...a,ref:t})});BN.displayName=Pk;var Bk="DropdownMenuSubContent",UN=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...a}=e,r=Wt(n);return s.jsx(bk,{...r,...a,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});UN.displayName=Bk;var Uk=_N,HN=MN,IN=DN,VN=ON,$N=kN,FN=LN,GN=zN,YN=PN,qN=BN,KN=UN;const Hk=f.forwardRef(({className:e,inset:t,children:n,...a},r)=>s.jsxs(qN,{ref:r,className:I("tw:flex tw:cursor-default tw:select-none tw:items-center tw:gap-2 tw:rounded-sm tw:px-2 tw:py-1.5 tw:text-sm tw:outline-none tw:focus:bg-accent tw:data-[state=open]:bg-accent tw:[&_svg]:pointer-events-none tw:[&_svg]:size-4 tw:[&_svg]:shrink-0",t&&"tw:pl-8",e),...a,children:[n,s.jsx(PO,{className:"tw:ml-auto"})]}));Hk.displayName=qN.displayName;const Ik=f.forwardRef(({className:e,...t},n)=>s.jsx(KN,{ref:n,className:I("tw:z-50 tw:min-w-[8rem] tw:overflow-hidden tw:rounded-md tw:border tw:bg-popover tw:p-1 tw:text-popover-foreground tw:shadow-lg tw:data-[state=open]:animate-in tw:data-[state=closed]:animate-out tw:data-[state=closed]:fade-out-0 tw:data-[state=open]:fade-in-0 tw:data-[state=closed]:zoom-out-95 tw:data-[state=open]:zoom-in-95 tw:data-[side=bottom]:slide-in-from-top-2 tw:data-[side=left]:slide-in-from-right-2 tw:data-[side=right]:slide-in-from-left-2 tw:data-[side=top]:slide-in-from-bottom-2 tw:origin-[--radix-dropdown-menu-content-transform-origin]",e),...t}));Ik.displayName=KN.displayName;const Vk=f.forwardRef(({className:e,sideOffset:t=4,...n},a)=>s.jsx(Uk,{children:s.jsx(HN,{ref:a,sideOffset:t,className:I("tw:z-50 tw:max-h-[var(--radix-dropdown-menu-content-available-height)] tw:min-w-[8rem] tw:overflow-y-auto tw:overflow-x-hidden tw:rounded-md tw:border tw:bg-popover tw:p-1 tw:text-popover-foreground tw:shadow-md","tw:data-[state=open]:animate-in tw:data-[state=closed]:animate-out tw:data-[state=closed]:fade-out-0 tw:data-[state=open]:fade-in-0 tw:data-[state=closed]:zoom-out-95 tw:data-[state=open]:zoom-in-95 tw:data-[side=bottom]:slide-in-from-top-2 tw:data-[side=left]:slide-in-from-right-2 tw:data-[side=right]:slide-in-from-left-2 tw:data-[side=top]:slide-in-from-bottom-2 tw:origin-[--radix-dropdown-menu-content-transform-origin]",e),...n})}));Vk.displayName=HN.displayName;const $k=f.forwardRef(({className:e,inset:t,...n},a)=>s.jsx(VN,{ref:a,className:I("tw:relative tw:flex tw:cursor-default tw:select-none tw:items-center tw:gap-2 tw:rounded-sm tw:px-2 tw:py-1.5 tw:text-sm tw:outline-none tw:transition-colors tw:focus:bg-accent tw:focus:text-accent-foreground tw:data-[disabled]:pointer-events-none tw:data-[disabled]:opacity-50 tw:[&>svg]:size-4 tw:[&>svg]:shrink-0",t&&"tw:pl-8",e),...n}));$k.displayName=VN.displayName;const Fk=f.forwardRef(({className:e,children:t,checked:n,...a},r)=>s.jsxs($N,{ref:r,className:I("tw:relative tw:flex tw:cursor-default tw:select-none tw:items-center tw:rounded-sm tw:py-1.5 tw:pl-8 tw:pr-2 tw:text-sm tw:outline-none tw:transition-colors tw:focus:bg-accent tw:focus:text-accent-foreground tw:data-[disabled]:pointer-events-none tw:data-[disabled]:opacity-50",e),checked:n,...a,children:[s.jsx("span",{className:"tw:absolute tw:left-2 tw:flex tw:h-3.5 tw:w-3.5 tw:items-center tw:justify-center",children:s.jsx(GN,{children:s.jsx(Ah,{className:"tw:h-4 tw:w-4"})})}),t]}));Fk.displayName=$N.displayName;const Gk=f.forwardRef(({className:e,children:t,...n},a)=>s.jsxs(FN,{ref:a,className:I("tw:relative tw:flex tw:cursor-default tw:select-none tw:items-center tw:rounded-sm tw:py-1.5 tw:pl-8 tw:pr-2 tw:text-sm tw:outline-none tw:transition-colors tw:focus:bg-accent tw:focus:text-accent-foreground tw:data-[disabled]:pointer-events-none tw:data-[disabled]:opacity-50",e),...n,children:[s.jsx("span",{className:"tw:absolute tw:left-2 tw:flex tw:h-3.5 tw:w-3.5 tw:items-center tw:justify-center",children:s.jsx(GN,{children:s.jsx(TS,{className:"tw:h-2 tw:w-2 tw:fill-current"})})}),t]}));Gk.displayName=FN.displayName;const Yk=f.forwardRef(({className:e,inset:t,...n},a)=>s.jsx(IN,{ref:a,className:I("tw:px-2 tw:py-1.5 tw:text-sm tw:font-semibold",t&&"tw:pl-8",e),...n}));Yk.displayName=IN.displayName;const qk=f.forwardRef(({className:e,...t},n)=>s.jsx(YN,{ref:n,className:I("tw:-mx-1 tw:my-1 tw:h-px tw:bg-muted",e),...t}));qk.displayName=YN.displayName;var Kk=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Xk=Kk.reduce((e,t)=>{const n=Ou(`Primitive.${t}`),a=f.forwardRef((r,o)=>{const{asChild:l,...i}=r,c=l?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),s.jsx(c,{...i,ref:o})});return a.displayName=`Primitive.${t}`,{...e,[t]:a}},{}),Zk="Label",XN=f.forwardRef((e,t)=>s.jsx(Xk.label,{...e,ref:t,onMouseDown:n=>{var r;n.target.closest("button, input, select, textarea")||((r=e.onMouseDown)==null||r.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));XN.displayName=Zk;var ZN=XN;const Wk=Sl("tw:text-sm tw:font-medium tw:leading-none tw:peer-disabled:cursor-not-allowed tw:peer-disabled:opacity-70"),Je=f.forwardRef(({className:e,...t},n)=>s.jsx(ZN,{ref:n,className:I(Wk(),e),...t}));Je.displayName=ZN.displayName;function Qk(e){const t=Jk(e),n=f.forwardRef((a,r)=>{const{children:o,...l}=a,i=f.Children.toArray(o),c=i.find(tL);if(c){const u=c.props.children,m=i.map(d=>d===c?f.Children.count(u)>1?f.Children.only(null):f.isValidElement(u)?u.props.children:null:d);return s.jsx(t,{...l,ref:r,children:f.isValidElement(u)?f.cloneElement(u,void 0,m):null})}return s.jsx(t,{...l,ref:r,children:o})});return n.displayName=`${e}.Slot`,n}function Jk(e){const t=f.forwardRef((n,a)=>{const{children:r,...o}=n;if(f.isValidElement(r)){const l=aL(r),i=nL(o,r.props);return r.type!==f.Fragment&&(i.ref=a?sa(a,l):l),f.cloneElement(r,i)}return f.Children.count(r)>1?f.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var eL=Symbol("radix.slottable");function tL(e){return f.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===eL}function nL(e,t){const n={...t};for(const a in t){const r=e[a],o=t[a];/^on[A-Z]/.test(a)?r&&o?n[a]=(...i)=>{const c=o(...i);return r(...i),c}:r&&(n[a]=r):a==="style"?n[a]={...r,...o}:a==="className"&&(n[a]=[r,o].filter(Boolean).join(" "))}return{...e,...n}}function aL(e){var a,r;let t=(a=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:a.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var WN="Popover",[QN]=Dt(WN,[Rr]),bd=Rr(),[cB,Dr]=QN(WN),JN="PopoverAnchor",rL=f.forwardRef((e,t)=>{const{__scopePopover:n,...a}=e,r=Dr(JN,n),o=bd(n),{onCustomAnchorAdd:l,onCustomAnchorRemove:i}=r;return f.useEffect(()=>(l(),()=>i()),[l,i]),s.jsx(yi,{...o,...a,ref:t})});rL.displayName=JN;var ej="PopoverTrigger",oL=f.forwardRef((e,t)=>{const{__scopePopover:n,...a}=e,r=Dr(ej,n),o=bd(n),l=fe(t,r.triggerRef),i=s.jsx(le.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":oj(r.open),...a,ref:l,onClick:q(e.onClick,r.onOpenToggle)});return r.hasCustomAnchor?i:s.jsx(yi,{asChild:!0,...o,children:i})});oL.displayName=ej;var ew="PopoverPortal",[lL,sL]=QN(ew,{forceMount:void 0}),tj=e=>{const{__scopePopover:t,forceMount:n,children:a,container:r}=e,o=Dr(ew,t);return s.jsx(lL,{scope:t,forceMount:n,children:s.jsx(bt,{present:n||o.open,children:s.jsx(Dl,{asChild:!0,container:r,children:a})})})};tj.displayName=ew;var Il="PopoverContent",nj=f.forwardRef((e,t)=>{const n=sL(Il,e.__scopePopover),{forceMount:a=n.forceMount,...r}=e,o=Dr(Il,e.__scopePopover);return s.jsx(bt,{present:a||o.open,children:o.modal?s.jsx(cL,{...r,ref:t}):s.jsx(uL,{...r,ref:t})})});nj.displayName=Il;var iL=Qk("PopoverContent.RemoveScroll"),cL=f.forwardRef((e,t)=>{const n=Dr(Il,e.__scopePopover),a=f.useRef(null),r=fe(t,a),o=f.useRef(!1);return f.useEffect(()=>{const l=a.current;if(l)return td(l)},[]),s.jsx(bi,{as:iL,allowPinchZoom:!0,children:s.jsx(aj,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:q(e.onCloseAutoFocus,l=>{var i;l.preventDefault(),o.current||(i=n.triggerRef.current)==null||i.focus()}),onPointerDownOutside:q(e.onPointerDownOutside,l=>{const i=l.detail.originalEvent,c=i.button===0&&i.ctrlKey===!0,u=i.button===2||c;o.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:q(e.onFocusOutside,l=>l.preventDefault(),{checkForDefaultPrevented:!1})})})}),uL=f.forwardRef((e,t)=>{const n=Dr(Il,e.__scopePopover),a=f.useRef(!1),r=f.useRef(!1);return s.jsx(aj,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var l,i;(l=e.onCloseAutoFocus)==null||l.call(e,o),o.defaultPrevented||(a.current||(i=n.triggerRef.current)==null||i.focus(),o.preventDefault()),a.current=!1,r.current=!1},onInteractOutside:o=>{var c,u;(c=e.onInteractOutside)==null||c.call(e,o),o.defaultPrevented||(a.current=!0,o.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const l=o.target;((u=n.triggerRef.current)==null?void 0:u.contains(l))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&r.current&&o.preventDefault()}})}),aj=f.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:a,onOpenAutoFocus:r,onCloseAutoFocus:o,disableOutsidePointerEvents:l,onEscapeKeyDown:i,onPointerDownOutside:c,onFocusOutside:u,onInteractOutside:m,...d}=e,p=Dr(Il,n),h=bd(n);return Hu(),s.jsx(hi,{asChild:!0,loop:!0,trapped:a,onMountAutoFocus:r,onUnmountAutoFocus:o,children:s.jsx(Al,{asChild:!0,disableOutsidePointerEvents:l,onInteractOutside:m,onEscapeKeyDown:i,onPointerDownOutside:c,onFocusOutside:u,onDismiss:()=>p.onOpenChange(!1),children:s.jsx(Wu,{"data-state":oj(p.open),role:"dialog",id:p.contentId,...h,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),rj="PopoverClose",dL=f.forwardRef((e,t)=>{const{__scopePopover:n,...a}=e,r=Dr(rj,n);return s.jsx(le.button,{type:"button",...a,ref:t,onClick:q(e.onClick,()=>r.onOpenChange(!1))})});dL.displayName=rj;var fL="PopoverArrow",mL=f.forwardRef((e,t)=>{const{__scopePopover:n,...a}=e,r=bd(n);return s.jsx(Qu,{...r,...a,ref:t})});mL.displayName=fL;function oj(e){return e?"open":"closed"}var pL=tj,lj=nj;const hL=f.forwardRef(({className:e,align:t="center",sideOffset:n=4,disablePortal:a=!1,...r},o)=>{const l=s.jsx(lj,{ref:o,align:t,sideOffset:n,className:I("tw:z-50 tw:w-72 tw:rounded-md tw:border tw:bg-popover tw:p-4 tw:text-popover-foreground tw:shadow-md tw:outline-none tw:data-[state=open]:animate-in tw:data-[state=closed]:animate-out tw:data-[state=closed]:fade-out-0 tw:data-[state=open]:fade-in-0 tw:data-[state=closed]:zoom-out-95 tw:data-[state=open]:zoom-in-95 tw:data-[side=bottom]:slide-in-from-top-2 tw:data-[side=left]:slide-in-from-right-2 tw:data-[side=right]:slide-in-from-left-2 tw:data-[side=top]:slide-in-from-bottom-2 tw:origin-[--radix-popover-content-transform-origin]",e),...r});return a?l:s.jsx(pL,{children:l})});hL.displayName=lj.displayName;var tw="Radio",[wL,sj]=Dt(tw),[gL,vL]=wL(tw),ij=f.forwardRef((e,t)=>{const{__scopeRadio:n,name:a,checked:r=!1,required:o,disabled:l,value:i="on",onCheck:c,form:u,...m}=e,[d,p]=f.useState(null),h=fe(t,b=>p(b)),x=f.useRef(!1),v=d?u||!!d.closest("form"):!0;return s.jsxs(gL,{scope:n,checked:r,disabled:l,children:[s.jsx(le.button,{type:"button",role:"radio","aria-checked":r,"data-state":fj(r),"data-disabled":l?"":void 0,disabled:l,value:i,...m,ref:h,onClick:q(e.onClick,b=>{r||c==null||c(),v&&(x.current=b.isPropagationStopped(),x.current||b.stopPropagation())})}),v&&s.jsx(dj,{control:d,bubbles:!x.current,name:a,value:i,checked:r,required:o,disabled:l,form:u,style:{transform:"translateX(-100%)"}})]})});ij.displayName=tw;var cj="RadioIndicator",uj=f.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:a,...r}=e,o=vL(cj,n);return s.jsx(bt,{present:a||o.checked,children:s.jsx(le.span,{"data-state":fj(o.checked),"data-disabled":o.disabled?"":void 0,...r,ref:t})})});uj.displayName=cj;var yL="RadioBubbleInput",dj=f.forwardRef(({__scopeRadio:e,control:t,checked:n,bubbles:a=!0,...r},o)=>{const l=f.useRef(null),i=fe(l,o),c=xi(n),u=vi(t);return f.useEffect(()=>{const m=l.current;if(!m)return;const d=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(d,"checked").set;if(c!==n&&h){const x=new Event("click",{bubbles:a});h.call(m,n),m.dispatchEvent(x)}},[c,n,a]),s.jsx(le.input,{type:"radio","aria-hidden":!0,defaultChecked:n,...r,tabIndex:-1,ref:i,style:{...r.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});dj.displayName=yL;function fj(e){return e?"checked":"unchecked"}var xL=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Sd="RadioGroup",[bL]=Dt(Sd,[Hl,sj]),mj=Hl(),pj=sj(),[SL,NL]=bL(Sd),hj=f.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:a,defaultValue:r,value:o,required:l=!1,disabled:i=!1,orientation:c,dir:u,loop:m=!0,onValueChange:d,...p}=e,h=mj(n),x=El(u),[v,b]=fa({prop:o,defaultProp:r??null,onChange:d,caller:Sd});return s.jsx(SL,{scope:n,name:a,required:l,disabled:i,value:v,onValueChange:b,children:s.jsx($h,{asChild:!0,...h,orientation:c,dir:x,loop:m,children:s.jsx(le.div,{role:"radiogroup","aria-required":l,"aria-orientation":c,"data-disabled":i?"":void 0,dir:x,...p,ref:t})})})});hj.displayName=Sd;var wj="RadioGroupItem",gj=f.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:a,...r}=e,o=NL(wj,n),l=o.disabled||a,i=mj(n),c=pj(n),u=f.useRef(null),m=fe(t,u),d=o.value===r.value,p=f.useRef(!1);return f.useEffect(()=>{const h=v=>{xL.includes(v.key)&&(p.current=!0)},x=()=>p.current=!1;return document.addEventListener("keydown",h),document.addEventListener("keyup",x),()=>{document.removeEventListener("keydown",h),document.removeEventListener("keyup",x)}},[]),s.jsx(Fh,{asChild:!0,...i,focusable:!l,active:d,children:s.jsx(ij,{disabled:l,required:o.required,checked:d,...c,...r,name:o.name,ref:m,onCheck:()=>o.onValueChange(r.value),onKeyDown:q(h=>{h.key==="Enter"&&h.preventDefault()}),onFocus:q(r.onFocus,()=>{var h;p.current&&((h=u.current)==null||h.click())})})})});gj.displayName=wj;var jL="RadioGroupIndicator",vj=f.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...a}=e,r=pj(n);return s.jsx(uj,{...r,...a,ref:t})});vj.displayName=jL;var yj=hj,xj=gj,CL=vj;const EL=f.forwardRef(({className:e,...t},n)=>s.jsx(yj,{className:I("tw:grid tw:gap-2",e),...t,ref:n}));EL.displayName=yj.displayName;const AL=f.forwardRef(({className:e,...t},n)=>s.jsx(xj,{ref:n,className:I("tw:aspect-square tw:h-4 tw:w-4 tw:rounded-full tw:border tw:border-primary tw:text-primary tw:shadow tw:focus:outline-none tw:focus-visible:ring-1 tw:focus-visible:ring-ring tw:disabled:cursor-not-allowed tw:disabled:opacity-50",e),...t,children:s.jsx(CL,{className:"tw:flex tw:items-center tw:justify-center",children:s.jsx(TS,{className:"tw:h-3.5 tw:w-3.5 tw:fill-primary"})})}));AL.displayName=xj.displayName;function RL(e,t){return f.useReducer((n,a)=>t[n][a]??n,e)}var nw="ScrollArea",[bj]=Dt(nw),[_L,zn]=bj(nw),Sj=f.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:a="hover",dir:r,scrollHideDelay:o=600,...l}=e,[i,c]=f.useState(null),[u,m]=f.useState(null),[d,p]=f.useState(null),[h,x]=f.useState(null),[v,b]=f.useState(null),[w,g]=f.useState(0),[y,S]=f.useState(0),[E,R]=f.useState(!1),[N,j]=f.useState(!1),T=fe(t,D=>c(D)),O=El(r);return s.jsx(_L,{scope:n,type:a,dir:O,scrollHideDelay:o,scrollArea:i,viewport:u,onViewportChange:m,content:d,onContentChange:p,scrollbarX:h,onScrollbarXChange:x,scrollbarXEnabled:E,onScrollbarXEnabledChange:R,scrollbarY:v,onScrollbarYChange:b,scrollbarYEnabled:N,onScrollbarYEnabledChange:j,onCornerWidthChange:g,onCornerHeightChange:S,children:s.jsx(le.div,{dir:O,...l,ref:T,style:{position:"relative","--radix-scroll-area-corner-width":w+"px","--radix-scroll-area-corner-height":y+"px",...e.style}})})});Sj.displayName=nw;var Nj="ScrollAreaViewport",jj=f.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:a,nonce:r,...o}=e,l=zn(Nj,n),i=f.useRef(null),c=fe(t,i,l.onViewportChange);return s.jsxs(s.Fragment,{children:[s.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),s.jsx(le.div,{"data-radix-scroll-area-viewport":"",...o,ref:c,style:{overflowX:l.scrollbarXEnabled?"scroll":"hidden",overflowY:l.scrollbarYEnabled?"scroll":"hidden",...e.style},children:s.jsx("div",{ref:l.onContentChange,style:{minWidth:"100%",display:"table"},children:a})})]})});jj.displayName=Nj;var pa="ScrollAreaScrollbar",aw=f.forwardRef((e,t)=>{const{forceMount:n,...a}=e,r=zn(pa,e.__scopeScrollArea),{onScrollbarXEnabledChange:o,onScrollbarYEnabledChange:l}=r,i=e.orientation==="horizontal";return f.useEffect(()=>(i?o(!0):l(!0),()=>{i?o(!1):l(!1)}),[i,o,l]),r.type==="hover"?s.jsx(TL,{...a,ref:t,forceMount:n}):r.type==="scroll"?s.jsx(ML,{...a,ref:t,forceMount:n}):r.type==="auto"?s.jsx(Cj,{...a,ref:t,forceMount:n}):r.type==="always"?s.jsx(rw,{...a,ref:t}):null});aw.displayName=pa;var TL=f.forwardRef((e,t)=>{const{forceMount:n,...a}=e,r=zn(pa,e.__scopeScrollArea),[o,l]=f.useState(!1);return f.useEffect(()=>{const i=r.scrollArea;let c=0;if(i){const u=()=>{window.clearTimeout(c),l(!0)},m=()=>{c=window.setTimeout(()=>l(!1),r.scrollHideDelay)};return i.addEventListener("pointerenter",u),i.addEventListener("pointerleave",m),()=>{window.clearTimeout(c),i.removeEventListener("pointerenter",u),i.removeEventListener("pointerleave",m)}}},[r.scrollArea,r.scrollHideDelay]),s.jsx(bt,{present:n||o,children:s.jsx(Cj,{"data-state":o?"visible":"hidden",...a,ref:t})})}),ML=f.forwardRef((e,t)=>{const{forceMount:n,...a}=e,r=zn(pa,e.__scopeScrollArea),o=e.orientation==="horizontal",l=Ed(()=>c("SCROLL_END"),100),[i,c]=RL("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return f.useEffect(()=>{if(i==="idle"){const u=window.setTimeout(()=>c("HIDE"),r.scrollHideDelay);return()=>window.clearTimeout(u)}},[i,r.scrollHideDelay,c]),f.useEffect(()=>{const u=r.viewport,m=o?"scrollLeft":"scrollTop";if(u){let d=u[m];const p=()=>{const h=u[m];d!==h&&(c("SCROLL"),l()),d=h};return u.addEventListener("scroll",p),()=>u.removeEventListener("scroll",p)}},[r.viewport,o,c,l]),s.jsx(bt,{present:n||i!=="hidden",children:s.jsx(rw,{"data-state":i==="hidden"?"hidden":"visible",...a,ref:t,onPointerEnter:q(e.onPointerEnter,()=>c("POINTER_ENTER")),onPointerLeave:q(e.onPointerLeave,()=>c("POINTER_LEAVE"))})})}),Cj=f.forwardRef((e,t)=>{const n=zn(pa,e.__scopeScrollArea),{forceMount:a,...r}=e,[o,l]=f.useState(!1),i=e.orientation==="horizontal",c=Ed(()=>{if(n.viewport){const u=n.viewport.offsetWidth<n.viewport.scrollWidth,m=n.viewport.offsetHeight<n.viewport.scrollHeight;l(i?u:m)}},10);return Vl(n.viewport,c),Vl(n.content,c),s.jsx(bt,{present:a||o,children:s.jsx(rw,{"data-state":o?"visible":"hidden",...r,ref:t})})}),rw=f.forwardRef((e,t)=>{const{orientation:n="vertical",...a}=e,r=zn(pa,e.__scopeScrollArea),o=f.useRef(null),l=f.useRef(0),[i,c]=f.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=Tj(i.viewport,i.content),m={...a,sizes:i,onSizesChange:c,hasThumb:u>0&&u<1,onThumbChange:p=>o.current=p,onThumbPointerUp:()=>l.current=0,onThumbPointerDown:p=>l.current=p};function d(p,h){return PL(p,l.current,i,h)}return n==="horizontal"?s.jsx(DL,{...m,ref:t,onThumbPositionChange:()=>{if(r.viewport&&o.current){const p=r.viewport.scrollLeft,h=Mj(p,i,r.dir);o.current.style.transform=`translate3d(${h}px, 0, 0)`}},onWheelScroll:p=>{r.viewport&&(r.viewport.scrollLeft=p)},onDragScroll:p=>{r.viewport&&(r.viewport.scrollLeft=d(p,r.dir))}}):n==="vertical"?s.jsx(OL,{...m,ref:t,onThumbPositionChange:()=>{if(r.viewport&&o.current){const p=r.viewport.scrollTop,h=Mj(p,i);o.current.style.transform=`translate3d(0, ${h}px, 0)`}},onWheelScroll:p=>{r.viewport&&(r.viewport.scrollTop=p)},onDragScroll:p=>{r.viewport&&(r.viewport.scrollTop=d(p))}}):null}),DL=f.forwardRef((e,t)=>{const{sizes:n,onSizesChange:a,...r}=e,o=zn(pa,e.__scopeScrollArea),[l,i]=f.useState(),c=f.useRef(null),u=fe(t,c,o.onScrollbarXChange);return f.useEffect(()=>{c.current&&i(getComputedStyle(c.current))},[c]),s.jsx(Aj,{"data-orientation":"horizontal",...r,ref:u,sizes:n,style:{bottom:0,left:o.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:o.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Cd(n)+"px",...e.style},onThumbPointerDown:m=>e.onThumbPointerDown(m.x),onDragScroll:m=>e.onDragScroll(m.x),onWheelScroll:(m,d)=>{if(o.viewport){const p=o.viewport.scrollLeft+m.deltaX;e.onWheelScroll(p),Oj(p,d)&&m.preventDefault()}},onResize:()=>{c.current&&o.viewport&&l&&a({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:jd(l.paddingLeft),paddingEnd:jd(l.paddingRight)}})}})}),OL=f.forwardRef((e,t)=>{const{sizes:n,onSizesChange:a,...r}=e,o=zn(pa,e.__scopeScrollArea),[l,i]=f.useState(),c=f.useRef(null),u=fe(t,c,o.onScrollbarYChange);return f.useEffect(()=>{c.current&&i(getComputedStyle(c.current))},[c]),s.jsx(Aj,{"data-orientation":"vertical",...r,ref:u,sizes:n,style:{top:0,right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Cd(n)+"px",...e.style},onThumbPointerDown:m=>e.onThumbPointerDown(m.y),onDragScroll:m=>e.onDragScroll(m.y),onWheelScroll:(m,d)=>{if(o.viewport){const p=o.viewport.scrollTop+m.deltaY;e.onWheelScroll(p),Oj(p,d)&&m.preventDefault()}},onResize:()=>{c.current&&o.viewport&&l&&a({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:jd(l.paddingTop),paddingEnd:jd(l.paddingBottom)}})}})}),[kL,Ej]=bj(pa),Aj=f.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:a,hasThumb:r,onThumbChange:o,onThumbPointerUp:l,onThumbPointerDown:i,onThumbPositionChange:c,onDragScroll:u,onWheelScroll:m,onResize:d,...p}=e,h=zn(pa,n),[x,v]=f.useState(null),b=fe(t,T=>v(T)),w=f.useRef(null),g=f.useRef(""),y=h.viewport,S=a.content-a.viewport,E=Ot(m),R=Ot(c),N=Ed(d,10);function j(T){if(w.current){const O=T.clientX-w.current.left,D=T.clientY-w.current.top;u({x:O,y:D})}}return f.useEffect(()=>{const T=O=>{const D=O.target;(x==null?void 0:x.contains(D))&&E(O,S)};return document.addEventListener("wheel",T,{passive:!1}),()=>document.removeEventListener("wheel",T,{passive:!1})},[y,x,S,E]),f.useEffect(R,[a,R]),Vl(x,N),Vl(h.content,N),s.jsx(kL,{scope:n,scrollbar:x,hasThumb:r,onThumbChange:Ot(o),onThumbPointerUp:Ot(l),onThumbPositionChange:R,onThumbPointerDown:Ot(i),children:s.jsx(le.div,{...p,ref:b,style:{position:"absolute",...p.style},onPointerDown:q(e.onPointerDown,T=>{T.button===0&&(T.target.setPointerCapture(T.pointerId),w.current=x.getBoundingClientRect(),g.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",h.viewport&&(h.viewport.style.scrollBehavior="auto"),j(T))}),onPointerMove:q(e.onPointerMove,j),onPointerUp:q(e.onPointerUp,T=>{const O=T.target;O.hasPointerCapture(T.pointerId)&&O.releasePointerCapture(T.pointerId),document.body.style.webkitUserSelect=g.current,h.viewport&&(h.viewport.style.scrollBehavior=""),w.current=null})})})}),Nd="ScrollAreaThumb",Rj=f.forwardRef((e,t)=>{const{forceMount:n,...a}=e,r=Ej(Nd,e.__scopeScrollArea);return s.jsx(bt,{present:n||r.hasThumb,children:s.jsx(LL,{ref:t,...a})})}),LL=f.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:a,...r}=e,o=zn(Nd,n),l=Ej(Nd,n),{onThumbPositionChange:i}=l,c=fe(t,d=>l.onThumbChange(d)),u=f.useRef(void 0),m=Ed(()=>{u.current&&(u.current(),u.current=void 0)},100);return f.useEffect(()=>{const d=o.viewport;if(d){const p=()=>{if(m(),!u.current){const h=BL(d,i);u.current=h,i()}};return i(),d.addEventListener("scroll",p),()=>d.removeEventListener("scroll",p)}},[o.viewport,m,i]),s.jsx(le.div,{"data-state":l.hasThumb?"visible":"hidden",...r,ref:c,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...a},onPointerDownCapture:q(e.onPointerDownCapture,d=>{const h=d.target.getBoundingClientRect(),x=d.clientX-h.left,v=d.clientY-h.top;l.onThumbPointerDown({x,y:v})}),onPointerUp:q(e.onPointerUp,l.onThumbPointerUp)})});Rj.displayName=Nd;var ow="ScrollAreaCorner",_j=f.forwardRef((e,t)=>{const n=zn(ow,e.__scopeScrollArea),a=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&a?s.jsx(zL,{...e,ref:t}):null});_j.displayName=ow;var zL=f.forwardRef((e,t)=>{const{__scopeScrollArea:n,...a}=e,r=zn(ow,n),[o,l]=f.useState(0),[i,c]=f.useState(0),u=!!(o&&i);return Vl(r.scrollbarX,()=>{var d;const m=((d=r.scrollbarX)==null?void 0:d.offsetHeight)||0;r.onCornerHeightChange(m),c(m)}),Vl(r.scrollbarY,()=>{var d;const m=((d=r.scrollbarY)==null?void 0:d.offsetWidth)||0;r.onCornerWidthChange(m),l(m)}),u?s.jsx(le.div,{...a,ref:t,style:{width:o,height:i,position:"absolute",right:r.dir==="ltr"?0:void 0,left:r.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function jd(e){return e?parseInt(e,10):0}function Tj(e,t){const n=e/t;return isNaN(n)?0:n}function Cd(e){const t=Tj(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,a=(e.scrollbar.size-n)*t;return Math.max(a,18)}function PL(e,t,n,a="ltr"){const r=Cd(n),o=r/2,l=t||o,i=r-l,c=n.scrollbar.paddingStart+l,u=n.scrollbar.size-n.scrollbar.paddingEnd-i,m=n.content-n.viewport,d=a==="ltr"?[0,m]:[m*-1,0];return Dj([c,u],d)(e)}function Mj(e,t,n="ltr"){const a=Cd(t),r=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,o=t.scrollbar.size-r,l=t.content-t.viewport,i=o-a,c=n==="ltr"?[0,l]:[l*-1,0],u=pi(e,c);return Dj([0,l],[0,i])(u)}function Dj(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const a=(t[1]-t[0])/(e[1]-e[0]);return t[0]+a*(n-e[0])}}function Oj(e,t){return e>0&&e<t}var BL=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},a=0;return function r(){const o={left:e.scrollLeft,top:e.scrollTop},l=n.left!==o.left,i=n.top!==o.top;(l||i)&&t(),n=o,a=window.requestAnimationFrame(r)}(),()=>window.cancelAnimationFrame(a)};function Ed(e,t){const n=Ot(e),a=f.useRef(0);return f.useEffect(()=>()=>window.clearTimeout(a.current),[]),f.useCallback(()=>{window.clearTimeout(a.current),a.current=window.setTimeout(n,t)},[n,t])}function Vl(e,t){const n=Ot(t);ht(()=>{let a=0;if(e){const r=new ResizeObserver(()=>{cancelAnimationFrame(a),a=window.requestAnimationFrame(n)});return r.observe(e),()=>{window.cancelAnimationFrame(a),r.unobserve(e)}}},[e,n])}var kj=Sj,UL=jj,HL=_j;const IL=f.forwardRef(({className:e,children:t,...n},a)=>s.jsxs(kj,{ref:a,className:I("tw:relative tw:overflow-hidden",e),...n,children:[s.jsx(UL,{className:"tw:h-full tw:w-full tw:rounded-[inherit]",children:t}),s.jsx(Lj,{}),s.jsx(HL,{})]}));IL.displayName=kj.displayName;const Lj=f.forwardRef(({className:e,orientation:t="vertical",...n},a)=>s.jsx(aw,{ref:a,orientation:t,className:I("tw:flex tw:touch-none tw:select-none tw:transition-colors",t==="vertical"&&"tw:h-full tw:w-2.5 tw:border-l tw:border-l-transparent tw:p-[1px]",t==="horizontal"&&"tw:h-2.5 tw:flex-col tw:border-t tw:border-t-transparent tw:p-[1px]",e),...n,children:s.jsx(Rj,{className:"tw:relative tw:flex-1 tw:rounded-full tw:bg-border"})}));Lj.displayName=aw.displayName;var VL=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],$L=VL.reduce((e,t)=>{const n=Ou(`Primitive.${t}`),a=f.forwardRef((r,o)=>{const{asChild:l,...i}=r,c=l?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),s.jsx(c,{...i,ref:o})});return a.displayName=`Primitive.${t}`,{...e,[t]:a}},{}),FL="Separator",zj="horizontal",GL=["horizontal","vertical"],Pj=f.forwardRef((e,t)=>{const{decorative:n,orientation:a=zj,...r}=e,o=YL(a)?a:zj,i=n?{role:"none"}:{"aria-orientation":o==="vertical"?o:void 0,role:"separator"};return s.jsx($L.div,{"data-orientation":o,...i,...r,ref:t})});Pj.displayName=FL;function YL(e){return GL.includes(e)}var Bj=Pj;const Uj=f.forwardRef(({className:e,orientation:t="horizontal",decorative:n=!0,...a},r)=>s.jsx(Bj,{ref:r,decorative:n,orientation:t,className:I("tw:shrink-0 tw:bg-border",t==="horizontal"?"tw:h-[1px] tw:w-full":"tw:h-full tw:w-[1px]",e),...a}));Uj.displayName=Bj.displayName;const qL=Mh,KL=Dh,Hj=f.forwardRef(({className:e,...t},n)=>s.jsx(Ci,{className:I("tw:fixed tw:inset-0 tw:z-50 tw:bg-black/80 tw: tw:data-[state=open]:animate-in tw:data-[state=closed]:animate-out tw:data-[state=closed]:fade-out-0 tw:data-[state=open]:fade-in-0",e),...t,ref:n}));Hj.displayName=Ci.displayName;const XL=Sl("tw:fixed tw:z-50 tw:gap-4 tw:bg-background tw:p-6 tw:shadow-lg tw:transition tw:ease-in-out tw:data-[state=closed]:duration-300 tw:data-[state=open]:duration-500 tw:data-[state=open]:animate-in tw:data-[state=closed]:animate-out",{variants:{side:{top:"tw:inset-x-0 tw:top-0 tw:border-b tw:data-[state=closed]:slide-out-to-top tw:data-[state=open]:slide-in-from-top",bottom:"tw:inset-x-0 tw:bottom-0 tw:border-t tw:data-[state=closed]:slide-out-to-bottom tw:data-[state=open]:slide-in-from-bottom",left:"tw:inset-y-0 tw:left-0 tw:h-full tw:w-3/4 tw:border-r tw:data-[state=closed]:slide-out-to-left tw:data-[state=open]:slide-in-from-left tw:sm:max-w-sm",right:"tw:inset-y-0 tw:right-0 tw:h-full tw:w-3/4 tw:border-l tw:data-[state=closed]:slide-out-to-right tw:data-[state=open]:slide-in-from-right tw:sm:max-w-sm"}},defaultVariants:{side:"right"}}),Ij=f.forwardRef(({side:e="right",className:t,children:n,...a},r)=>s.jsxs(KL,{children:[s.jsx(Hj,{}),s.jsxs(Ei,{ref:r,className:I(XL({side:e}),t),...a,children:[s.jsxs(pd,{className:"tw:absolute tw:right-4 tw:top-4 tw:rounded-sm tw:opacity-70 tw:ring-offset-background tw:transition-opacity tw:hover:opacity-100 tw:focus:outline-none tw:focus:ring-2 tw:focus:ring-ring tw:focus:ring-offset-2 tw:disabled:pointer-events-none tw:data-[state=open]:bg-secondary",children:[s.jsx(PS,{className:"tw:h-4 tw:w-4"}),s.jsx("span",{className:"tw:sr-only",children:"Close"})]}),n]})]}));Ij.displayName=Ei.displayName;const Vj=({className:e,...t})=>s.jsx("div",{className:I("tw:flex tw:flex-col tw:space-y-2 tw:text-center tw:sm:text-left",e),...t});Vj.displayName="SheetHeader";const $j=f.forwardRef(({className:e,...t},n)=>s.jsx(Ai,{ref:n,className:I("tw:text-lg tw:font-semibold tw:text-foreground",e),...t}));$j.displayName=Ai.displayName;const Fj=f.forwardRef(({className:e,...t},n)=>s.jsx(Ri,{ref:n,className:I("tw:text-sm tw:text-muted-foreground",e),...t}));Fj.displayName=Ri.displayName;const lw=768;function ZL(){const[e,t]=f.useState(void 0);return f.useEffect(()=>{const n=window.matchMedia(`(max-width: ${lw-1}px)`),a=()=>{t(window.innerWidth<lw)};return n.addEventListener("change",a),t(window.innerWidth<lw),()=>n.removeEventListener("change",a)},[]),!!e}function Gj({className:e,...t}){return s.jsx("div",{className:I("tw:animate-pulse tw:rounded-md tw:bg-gray-100",e),...t})}var WL=Symbol("radix.slottable");function QL(e){const t=({children:n})=>s.jsx(s.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=WL,t}var[Ad]=Dt("Tooltip",[Rr]),Rd=Rr(),Yj="TooltipProvider",JL=700,sw="tooltip.open",[ez,iw]=Ad(Yj),qj=e=>{const{__scopeTooltip:t,delayDuration:n=JL,skipDelayDuration:a=300,disableHoverableContent:r=!1,children:o}=e,l=f.useRef(!0),i=f.useRef(!1),c=f.useRef(0);return f.useEffect(()=>{const u=c.current;return()=>window.clearTimeout(u)},[]),s.jsx(ez,{scope:t,isOpenDelayedRef:l,delayDuration:n,onOpen:f.useCallback(()=>{window.clearTimeout(c.current),l.current=!1},[]),onClose:f.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>l.current=!0,a)},[a]),isPointerInTransitRef:i,onPointerInTransitChange:f.useCallback(u=>{i.current=u},[]),disableHoverableContent:r,children:o})};qj.displayName=Yj;var ki="Tooltip",[tz,Li]=Ad(ki),Kj=e=>{const{__scopeTooltip:t,children:n,open:a,defaultOpen:r,onOpenChange:o,disableHoverableContent:l,delayDuration:i}=e,c=iw(ki,e.__scopeTooltip),u=Rd(t),[m,d]=f.useState(null),p=Ua(),h=f.useRef(0),x=l??c.disableHoverableContent,v=i??c.delayDuration,b=f.useRef(!1),[w,g]=fa({prop:a,defaultProp:r??!1,onChange:N=>{N?(c.onOpen(),document.dispatchEvent(new CustomEvent(sw))):c.onClose(),o==null||o(N)},caller:ki}),y=f.useMemo(()=>w?b.current?"delayed-open":"instant-open":"closed",[w]),S=f.useCallback(()=>{window.clearTimeout(h.current),h.current=0,b.current=!1,g(!0)},[g]),E=f.useCallback(()=>{window.clearTimeout(h.current),h.current=0,g(!1)},[g]),R=f.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{b.current=!0,g(!0),h.current=0},v)},[v,g]);return f.useEffect(()=>()=>{h.current&&(window.clearTimeout(h.current),h.current=0)},[]),s.jsx(T1,{...u,children:s.jsx(tz,{scope:t,contentId:p,open:w,stateAttribute:y,trigger:m,onTriggerChange:d,onTriggerEnter:f.useCallback(()=>{c.isOpenDelayedRef.current?R():S()},[c.isOpenDelayedRef,R,S]),onTriggerLeave:f.useCallback(()=>{x?E():(window.clearTimeout(h.current),h.current=0)},[E,x]),onOpen:S,onClose:E,disableHoverableContent:x,children:n})})};Kj.displayName=ki;var cw="TooltipTrigger",Xj=f.forwardRef((e,t)=>{const{__scopeTooltip:n,...a}=e,r=Li(cw,n),o=iw(cw,n),l=Rd(n),i=f.useRef(null),c=fe(t,i,r.onTriggerChange),u=f.useRef(!1),m=f.useRef(!1),d=f.useCallback(()=>u.current=!1,[]);return f.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),s.jsx(yi,{asChild:!0,...l,children:s.jsx(le.button,{"aria-describedby":r.open?r.contentId:void 0,"data-state":r.stateAttribute,...a,ref:c,onPointerMove:q(e.onPointerMove,p=>{p.pointerType!=="touch"&&!m.current&&!o.isPointerInTransitRef.current&&(r.onTriggerEnter(),m.current=!0)}),onPointerLeave:q(e.onPointerLeave,()=>{r.onTriggerLeave(),m.current=!1}),onPointerDown:q(e.onPointerDown,()=>{r.open&&r.onClose(),u.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:q(e.onFocus,()=>{u.current||r.onOpen()}),onBlur:q(e.onBlur,r.onClose),onClick:q(e.onClick,r.onClose)})})});Xj.displayName=cw;var uw="TooltipPortal",[nz,az]=Ad(uw,{forceMount:void 0}),Zj=e=>{const{__scopeTooltip:t,forceMount:n,children:a,container:r}=e,o=Li(uw,t);return s.jsx(nz,{scope:t,forceMount:n,children:s.jsx(bt,{present:n||o.open,children:s.jsx(Dl,{asChild:!0,container:r,children:a})})})};Zj.displayName=uw;var $l="TooltipContent",Wj=f.forwardRef((e,t)=>{const n=az($l,e.__scopeTooltip),{forceMount:a=n.forceMount,side:r="top",...o}=e,l=Li($l,e.__scopeTooltip);return s.jsx(bt,{present:a||l.open,children:l.disableHoverableContent?s.jsx(Qj,{side:r,...o,ref:t}):s.jsx(rz,{side:r,...o,ref:t})})}),rz=f.forwardRef((e,t)=>{const n=Li($l,e.__scopeTooltip),a=iw($l,e.__scopeTooltip),r=f.useRef(null),o=fe(t,r),[l,i]=f.useState(null),{trigger:c,onClose:u}=n,m=r.current,{onPointerInTransitChange:d}=a,p=f.useCallback(()=>{i(null),d(!1)},[d]),h=f.useCallback((x,v)=>{const b=x.currentTarget,w={x:x.clientX,y:x.clientY},g=cz(w,b.getBoundingClientRect()),y=uz(w,g),S=dz(v.getBoundingClientRect()),E=mz([...y,...S]);i(E),d(!0)},[d]);return f.useEffect(()=>()=>p(),[p]),f.useEffect(()=>{if(c&&m){const x=b=>h(b,m),v=b=>h(b,c);return c.addEventListener("pointerleave",x),m.addEventListener("pointerleave",v),()=>{c.removeEventListener("pointerleave",x),m.removeEventListener("pointerleave",v)}}},[c,m,h,p]),f.useEffect(()=>{if(l){const x=v=>{const b=v.target,w={x:v.clientX,y:v.clientY},g=(c==null?void 0:c.contains(b))||(m==null?void 0:m.contains(b)),y=!fz(w,l);g?p():y&&(p(),u())};return document.addEventListener("pointermove",x),()=>document.removeEventListener("pointermove",x)}},[c,m,l,u,p]),s.jsx(Qj,{...e,ref:o})}),[oz,lz]=Ad(ki,{isInside:!1}),sz=QL("TooltipContent"),Qj=f.forwardRef((e,t)=>{const{__scopeTooltip:n,children:a,"aria-label":r,onEscapeKeyDown:o,onPointerDownOutside:l,...i}=e,c=Li($l,n),u=Rd(n),{onClose:m}=c;return f.useEffect(()=>(document.addEventListener(sw,m),()=>document.removeEventListener(sw,m)),[m]),f.useEffect(()=>{if(c.trigger){const d=p=>{const h=p.target;h!=null&&h.contains(c.trigger)&&m()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[c.trigger,m]),s.jsx(Al,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:l,onFocusOutside:d=>d.preventDefault(),onDismiss:m,children:s.jsxs(Wu,{"data-state":c.stateAttribute,...u,...i,ref:t,style:{...i.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(sz,{children:a}),s.jsx(oz,{scope:n,isInside:!0,children:s.jsx(fD,{id:c.contentId,role:"tooltip",children:r||a})})]})})});Wj.displayName=$l;var Jj="TooltipArrow",iz=f.forwardRef((e,t)=>{const{__scopeTooltip:n,...a}=e,r=Rd(n);return lz(Jj,n).isInside?null:s.jsx(Qu,{...r,...a,ref:t})});iz.displayName=Jj;function cz(e,t){const n=Math.abs(t.top-e.y),a=Math.abs(t.bottom-e.y),r=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(n,a,r,o)){case o:return"left";case r:return"right";case n:return"top";case a:return"bottom";default:throw new Error("unreachable")}}function uz(e,t,n=5){const a=[];switch(t){case"top":a.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":a.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":a.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":a.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return a}function dz(e){const{top:t,right:n,bottom:a,left:r}=e;return[{x:r,y:t},{x:n,y:t},{x:n,y:a},{x:r,y:a}]}function fz(e,t){const{x:n,y:a}=e;let r=!1;for(let o=0,l=t.length-1;o<t.length;l=o++){const i=t[o],c=t[l],u=i.x,m=i.y,d=c.x,p=c.y;m>a!=p>a&&n<(d-u)*(a-m)/(p-m)+u&&(r=!r)}return r}function mz(e){const t=e.slice();return t.sort((n,a)=>n.x<a.x?-1:n.x>a.x?1:n.y<a.y?-1:n.y>a.y?1:0),pz(t)}function pz(e){if(e.length<=1)return e.slice();const t=[];for(let a=0;a<e.length;a++){const r=e[a];for(;t.length>=2;){const o=t[t.length-1],l=t[t.length-2];if((o.x-l.x)*(r.y-l.y)>=(o.y-l.y)*(r.x-l.x))t.pop();else break}t.push(r)}t.pop();const n=[];for(let a=e.length-1;a>=0;a--){const r=e[a];for(;n.length>=2;){const o=n[n.length-1],l=n[n.length-2];if((o.x-l.x)*(r.y-l.y)>=(o.y-l.y)*(r.x-l.x))n.pop();else break}n.push(r)}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 hz=qj,wz=Kj,gz=Xj,vz=Zj,eC=Wj;const zi=hz,dw=wz,fw=gz,_d=f.forwardRef(({className:e,sideOffset:t=4,...n},a)=>s.jsx(vz,{children:s.jsx(eC,{ref:a,sideOffset:t,className:I("tw:z-50 tw:overflow-hidden tw:rounded-md tw:bg-primary tw:px-3 tw:py-1.5 tw:text-xs tw:text-primary-foreground tw:animate-in tw:fade-in-0 tw:zoom-in-95 tw:data-[state=closed]:animate-out tw:data-[state=closed]:fade-out-0 tw:data-[state=closed]:zoom-out-95 tw:data-[side=bottom]:slide-in-from-top-2 tw:data-[side=left]:slide-in-from-right-2 tw:data-[side=right]:slide-in-from-left-2 tw:data-[side=top]:slide-in-from-bottom-2 tw:origin-[--radix-tooltip-content-transform-origin]",e),...n})}));_d.displayName=eC.displayName;const yz="sidebar_state",xz=60*60*24*7,bz="16rem",Sz="18rem",Nz="3rem",jz="b",tC=f.createContext(null);function Td(){const e=f.useContext(tC);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const Cz=f.forwardRef(({defaultOpen:e=!0,open:t,onOpenChange:n,className:a,style:r,children:o,...l},i)=>{const c=ZL(),[u,m]=f.useState(!1),[d,p]=f.useState(e),h=t??d,x=f.useCallback(g=>{const y=typeof g=="function"?g(h):g;n?n(y):p(y),document.cookie=`${yz}=${y}; path=/; max-age=${xz}`},[n,h]),v=f.useCallback(()=>c?m(g=>!g):x(g=>!g),[c,x,m]);f.useEffect(()=>{const g=y=>{y.key===jz&&(y.metaKey||y.ctrlKey)&&(y.preventDefault(),v())};return window.addEventListener("keydown",g),()=>window.removeEventListener("keydown",g)},[v]);const b=h?"expanded":"collapsed",w=f.useMemo(()=>({state:b,open:h,setOpen:x,isMobile:c,openMobile:u,setOpenMobile:m,toggleSidebar:v}),[b,h,x,c,u,m,v]);return s.jsx(tC.Provider,{value:w,children:s.jsx(zi,{delayDuration:0,children:s.jsx("div",{style:{"--sidebar-width":bz,"--sidebar-width-icon":Nz,...r},className:I("tw:group/sidebar-wrapper tw:flex tw:min-h-svh tw:h-full tw:w-full tw:has-[[data-variant=inset]]:bg-sidebar",a),ref:i,...l,children:o})})})});Cz.displayName="SidebarProvider";const Ez=f.forwardRef(({side:e="left",variant:t="sidebar",collapsible:n="offcanvas",className:a,children:r,...o},l)=>{const{isMobile:i,state:c,openMobile:u,setOpenMobile:m}=Td();return n==="none"?s.jsx("div",{className:I("tw:flex tw:h-full tw:min-h-full tw:w-[var(--sidebar-width)] tw:flex-col tw:bg-sidebar tw:text-sidebar-foreground",a),ref:l,...o,children:r}):i?s.jsx(qL,{open:u,onOpenChange:m,...o,children:s.jsxs(Ij,{"data-sidebar":"sidebar","data-mobile":"true",className:"tw:w-[var(--sidebar-width)] tw:bg-sidebar tw:p-0 tw:text-sidebar-foreground tw:[&>button]:hidden",style:{"--sidebar-width":Sz},side:e,children:[s.jsxs(Vj,{className:"tw:sr-only",children:[s.jsx($j,{children:"Sidebar"}),s.jsx(Fj,{children:"Displays the mobile sidebar."})]}),s.jsx("div",{className:"tw:flex tw:h-full tw:w-full tw:flex-col",children:r})]})}):s.jsxs("div",{ref:l,className:"tw:group tw:peer tw:hidden tw:text-sidebar-foreground tw:md:block","data-state":c,"data-collapsible":c==="collapsed"?n:"","data-variant":t,"data-side":e,children:[s.jsx("div",{className:I("tw:relative tw:w-[var(--sidebar-width)] tw:bg-transparent tw:transition-[width] tw:duration-200 tw:ease-linear","tw:group-data-[collapsible=offcanvas]:w-0","tw:group-data-[side=right]:rotate-180",t==="floating"||t==="inset"?"tw:group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]":"tw:group-data-[collapsible=icon]:w-[var(--sidebar-width-icon)]")}),s.jsx("div",{className:I("tw:fixed tw:inset-y-0 tw:z-10 tw:hidden tw:h-svh tw:w-[var(--sidebar-width)] tw:transition-[width] tw:duration-200 tw:ease-linear tw:md:flex",e==="left"?"tw:left-0 tw:group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"tw:right-0 tw:group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",t==="floating"||t==="inset"?"tw:p-2 tw:group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]":"tw:group-data-[collapsible=icon]:w-[var(--sidebar-width-icon)] tw:group-data-[side=left]:border-r tw:group-data-[side=right]:border-l",a),...o,children:s.jsx("div",{"data-sidebar":"sidebar",className:"tw:flex tw:h-full tw:w-full tw:flex-col tw:bg-sidebar tw:group-data-[variant=floating]:rounded-lg tw:group-data-[variant=floating]:border tw:group-data-[variant=floating]:border-sidebar-border tw:group-data-[variant=floating]:shadow",children:r})})]})});Ez.displayName="Sidebar";const Az=f.forwardRef(({className:e,onClick:t,...n},a)=>{const{toggleSidebar:r}=Td();return s.jsxs(hn,{ref:a,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:I("tw:h-7 tw:w-7",e),onClick:o=>{t==null||t(o),r()},...n,children:[s.jsx(FO,{}),s.jsx("span",{className:"tw:sr-only",children:"Toggle Sidebar"})]})});Az.displayName="SidebarTrigger";const Rz=f.forwardRef(({className:e,...t},n)=>{const{toggleSidebar:a}=Td();return s.jsx("button",{ref:n,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:a,title:"Toggle Sidebar",className:I("tw:absolute tw:inset-y-0 tw:z-20 tw:hidden tw:w-4 tw:-translate-x-1/2 tw:transition-all tw:ease-linear tw:after:absolute tw:after:inset-y-0 tw:after:left-1/2 tw:after:w-[2px] tw:hover:after:bg-sidebar-border tw:group-data-[side=left]:-right-4 tw:group-data-[side=right]:left-0 tw:sm:flex","tw:[[data-side=left]_&]:cursor-w-resize tw:[[data-side=right]_&]:cursor-e-resize","tw:[[data-side=left][data-state=collapsed]_&]:cursor-e-resize tw:[[data-side=right][data-state=collapsed]_&]:cursor-w-resize","tw:group-data-[collapsible=offcanvas]:translate-x-0 tw:group-data-[collapsible=offcanvas]:after:left-full tw:group-data-[collapsible=offcanvas]:hover:bg-sidebar","tw:[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","tw:[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...t})});Rz.displayName="SidebarRail";const _z=f.forwardRef(({className:e,...t},n)=>s.jsx("main",{ref:n,className:I("tw:relative tw:flex tw:w-full tw:flex-1 tw:flex-col tw:bg-background","tw:md:peer-data-[variant=inset]:m-2 tw:md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 tw:md:peer-data-[variant=inset]:ml-0 tw:md:peer-data-[variant=inset]:rounded-xl tw:md:peer-data-[variant=inset]:shadow",e),...t}));_z.displayName="SidebarInset";const Tz=f.forwardRef(({className:e,...t},n)=>s.jsx(ut,{ref:n,"data-sidebar":"input",className:I("tw:h-8 tw:w-full tw:bg-background tw:shadow-none tw:focus-visible:ring-2 tw:focus-visible:ring-sidebar-ring",e),...t}));Tz.displayName="SidebarInput";const Mz=f.forwardRef(({className:e,...t},n)=>s.jsx("div",{ref:n,"data-sidebar":"header",className:I("tw:flex tw:flex-col tw:gap-2 tw:p-2",e),...t}));Mz.displayName="SidebarHeader";const Dz=f.forwardRef(({className:e,...t},n)=>s.jsx("div",{ref:n,"data-sidebar":"footer",className:I("tw:flex tw:flex-col tw:gap-2 tw:p-2",e),...t}));Dz.displayName="SidebarFooter";const Oz=f.forwardRef(({className:e,...t},n)=>s.jsx(Uj,{ref:n,"data-sidebar":"separator",className:I("tw:mx-2 tw:w-auto tw:bg-sidebar-border",e),...t}));Oz.displayName="SidebarSeparator";const kz=f.forwardRef(({className:e,...t},n)=>s.jsx("div",{ref:n,"data-sidebar":"content",className:I("tw:flex tw:min-h-0 tw:flex-1 tw:flex-col tw:gap-2 tw:overflow-auto tw:group-data-[collapsible=icon]:overflow-hidden",e),...t}));kz.displayName="SidebarContent";const Lz=f.forwardRef(({className:e,...t},n)=>s.jsx("div",{ref:n,"data-sidebar":"group",className:I("tw:relative tw:flex tw:w-full tw:min-w-0 tw:flex-col tw:p-2",e),...t}));Lz.displayName="SidebarGroup";const zz=f.forwardRef(({className:e,asChild:t=!1,...n},a)=>{const r=t?fo:"div";return s.jsx(r,{ref:a,"data-sidebar":"group-label",className:I("tw:flex tw:h-8 tw:shrink-0 tw:items-center tw:rounded-md tw:px-2 tw:text-xs tw:font-medium tw:text-sidebar-foreground/70 tw:outline-none tw:ring-sidebar-ring tw:transition-[margin,opacity] tw:duration-200 tw:ease-linear tw:focus-visible:ring-2 tw:[&>svg]:size-4 tw:[&>svg]:shrink-0","tw:group-data-[collapsible=icon]:-mt-8 tw:group-data-[collapsible=icon]:opacity-0",e),...n})});zz.displayName="SidebarGroupLabel";const Pz=f.forwardRef(({className:e,asChild:t=!1,...n},a)=>{const r=t?fo:"button";return s.jsx(r,{ref:a,"data-sidebar":"group-action",className:I("tw:absolute tw:right-3 tw:top-3.5 tw:flex tw:aspect-square tw:w-5 tw:items-center tw:justify-center tw:rounded-md tw:p-0 tw:text-sidebar-foreground tw:outline-none tw:ring-sidebar-ring tw:transition-transform tw:hover:bg-sidebar-accent tw:hover:text-sidebar-accent-foreground tw:focus-visible:ring-2 tw:[&>svg]:size-4 tw:[&>svg]:shrink-0","tw:after:absolute tw:after:-inset-2 tw:after:md:hidden","tw:group-data-[collapsible=icon]:hidden",e),...n})});Pz.displayName="SidebarGroupAction";const Bz=f.forwardRef(({className:e,...t},n)=>s.jsx("div",{ref:n,"data-sidebar":"group-content",className:I("tw:w-full tw:text-sm",e),...t}));Bz.displayName="SidebarGroupContent";const Uz=f.forwardRef(({className:e,...t},n)=>s.jsx("ul",{ref:n,"data-sidebar":"menu",className:I("tw:flex tw:w-full tw:min-w-0 tw:flex-col tw:gap-1",e),...t}));Uz.displayName="SidebarMenu";const Hz=f.forwardRef(({className:e,...t},n)=>s.jsx("li",{ref:n,"data-sidebar":"menu-item",className:I("tw:group/menu-item tw:relative",e),...t}));Hz.displayName="SidebarMenuItem";const Iz=Sl("tw:peer/menu-button tw:flex tw:w-full tw:items-center tw:gap-2 tw:overflow-hidden tw:rounded-md tw:p-2 tw:text-left tw:text-sm tw:outline-none tw:ring-sidebar-ring tw:transition-[width,height,padding] tw:hover:bg-sidebar-accent tw:hover:text-sidebar-accent-foreground tw:focus-visible:ring-2 tw:active:bg-sidebar-accent tw:active:text-sidebar-accent-foreground tw:disabled:pointer-events-none tw:disabled:opacity-50 tw:group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 tw:aria-disabled:pointer-events-none tw:aria-disabled:opacity-50 tw:data-[active=true]:bg-sidebar-accent tw:data-[active=true]:font-medium tw:data-[active=true]:text-sidebar-accent-foreground tw:data-[state=open]:hover:bg-sidebar-accent tw:data-[state=open]:hover:text-sidebar-accent-foreground tw:group-data-[collapsible=icon]:!size-8 tw:group-data-[collapsible=icon]:!p-2 tw:[&>span:last-child]:truncate tw:[&>svg]:size-4 tw:[&>svg]:shrink-0",{variants:{variant:{default:"tw:hover:bg-sidebar-accent tw:hover:text-sidebar-accent-foreground",outline:"tw:bg-background tw:shadow-[0_0_0_1px_hsl(var(--sidebar-border))] tw:hover:bg-sidebar-accent tw:hover:text-sidebar-accent-foreground tw:hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"tw:h-8 tw:text-sm",sm:"tw:h-7 tw:text-xs",lg:"tw:h-12 tw:text-sm tw:group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"default",size:"default"}}),Vz=f.forwardRef(({asChild:e=!1,isActive:t=!1,variant:n="default",size:a="default",tooltip:r,className:o,...l},i)=>{const c=e?fo:"button",{isMobile:u,state:m}=Td(),d=s.jsx(c,{ref:i,"data-sidebar":"menu-button","data-size":a,"data-active":t,className:I(Iz({variant:n,size:a}),o),...l});return r?(typeof r=="string"&&(r={children:r}),s.jsxs(dw,{children:[s.jsx(fw,{asChild:!0,children:d}),s.jsx(_d,{side:"right",align:"center",hidden:m!=="collapsed"||u,...r})]})):d});Vz.displayName="SidebarMenuButton";const $z=f.forwardRef(({className:e,asChild:t=!1,showOnHover:n=!1,...a},r)=>{const o=t?fo:"button";return s.jsx(o,{ref:r,"data-sidebar":"menu-action",className:I("tw:absolute tw:right-1 tw:top-1.5 tw:flex tw:aspect-square tw:w-5 tw:items-center tw:justify-center tw:rounded-md tw:p-0 tw:text-sidebar-foreground tw:outline-none tw:ring-sidebar-ring tw:transition-transform tw:hover:bg-sidebar-accent tw:hover:text-sidebar-accent-foreground tw:focus-visible:ring-2 tw:peer-hover/menu-button:text-sidebar-accent-foreground tw:[&>svg]:size-4 tw:[&>svg]:shrink-0","tw:after:absolute tw:after:-inset-2 tw:after:md:hidden","tw:peer-data-[size=sm]/menu-button:top-1","tw:peer-data-[size=default]/menu-button:top-1.5","tw:peer-data-[size=lg]/menu-button:top-2.5","tw:group-data-[collapsible=icon]:hidden",n&&"tw:group-focus-within/menu-item:opacity-100 tw:group-hover/menu-item:opacity-100 tw:data-[state=open]:opacity-100 tw:peer-data-[active=true]/menu-button:text-sidebar-accent-foreground tw:md:opacity-0",e),...a})});$z.displayName="SidebarMenuAction";const Fz=f.forwardRef(({className:e,...t},n)=>s.jsx("div",{ref:n,"data-sidebar":"menu-badge",className:I("tw:pointer-events-none tw:absolute tw:right-1 tw:flex tw:h-5 tw:min-w-5 tw:select-none tw:items-center tw:justify-center tw:rounded-md tw:px-1 tw:text-xs tw:font-medium tw:tabular-nums tw:text-sidebar-foreground","tw:peer-hover/menu-button:text-sidebar-accent-foreground tw:peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","tw:peer-data-[size=sm]/menu-button:top-1","tw:peer-data-[size=default]/menu-button:top-1.5","tw:peer-data-[size=lg]/menu-button:top-2.5","tw:group-data-[collapsible=icon]:hidden",e),...t}));Fz.displayName="SidebarMenuBadge";const Gz=f.forwardRef(({className:e,showIcon:t=!1,...n},a)=>{const r=f.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return s.jsxs("div",{ref:a,"data-sidebar":"menu-skeleton",className:I("tw:flex tw:h-8 tw:items-center tw:gap-2 tw:rounded-md tw:px-2",e),...n,children:[t&&s.jsx(Gj,{className:"tw:size-4 tw:rounded-md","data-sidebar":"menu-skeleton-icon"}),s.jsx(Gj,{className:"tw:h-4 tw:max-w-[--skeleton-width] tw:flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":r}})]})});Gz.displayName="SidebarMenuSkeleton";const Yz=f.forwardRef(({className:e,...t},n)=>s.jsx("ul",{ref:n,"data-sidebar":"menu-sub",className:I("tw:mx-3.5 tw:flex tw:min-w-0 tw:translate-x-px tw:flex-col tw:gap-1 tw:border-l tw:border-sidebar-border tw:px-2.5 tw:py-0.5","tw:group-data-[collapsible=icon]:hidden",e),...t}));Yz.displayName="SidebarMenuSub";const qz=f.forwardRef(({...e},t)=>s.jsx("li",{ref:t,...e}));qz.displayName="SidebarMenuSubItem";const Kz=f.forwardRef(({asChild:e=!1,size:t="md",isActive:n,className:a,...r},o)=>{const l=e?fo:"a";return s.jsx(l,{ref:o,"data-sidebar":"menu-sub-button","data-size":t,"data-active":n,className:I("tw:flex tw:h-7 tw:min-w-0 tw:-translate-x-px tw:items-center tw:gap-2 tw:overflow-hidden tw:rounded-md tw:px-2 tw:text-sidebar-foreground tw:outline-none tw:ring-sidebar-ring tw:hover:bg-sidebar-accent tw:hover:text-sidebar-accent-foreground tw:focus-visible:ring-2 tw:active:bg-sidebar-accent tw:active:text-sidebar-accent-foreground tw:disabled:pointer-events-none tw:disabled:opacity-50 tw:aria-disabled:pointer-events-none tw:aria-disabled:opacity-50 tw:[&>span:last-child]:truncate tw:[&>svg]:size-4 tw:[&>svg]:shrink-0 tw:[&>svg]:text-sidebar-accent-foreground","tw:data-[active=true]:bg-sidebar-accent tw:data-[active=true]:text-sidebar-accent-foreground",t==="sm"&&"tw:text-xs",t==="md"&&"tw:text-sm","tw:group-data-[collapsible=icon]:hidden",a),...r})});Kz.displayName="SidebarMenuSubButton";var nC=["PageUp","PageDown"],aC=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],rC={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},Fl="Slider",[mw,Xz,Zz]=Uu(Fl),[oC]=Dt(Fl,[Zz]),[Wz,Md]=oC(Fl),lC=f.forwardRef((e,t)=>{const{name:n,min:a=0,max:r=100,step:o=1,orientation:l="horizontal",disabled:i=!1,minStepsBetweenThumbs:c=0,defaultValue:u=[a],value:m,onValueChange:d=()=>{},onValueCommit:p=()=>{},inverted:h=!1,form:x,...v}=e,b=f.useRef(new Set),w=f.useRef(0),y=l==="horizontal"?Qz:Jz,[S=[],E]=fa({prop:m,defaultProp:u,onChange:D=>{var k;(k=[...b.current][w.current])==null||k.focus(),d(D)}}),R=f.useRef(S);function N(D){const H=rP(S,D);O(D,H)}function j(D){O(D,w.current)}function T(){const D=R.current[w.current];S[w.current]!==D&&p(S)}function O(D,H,{commit:k}={commit:!1}){const B=iP(o),U=cP(Math.round((D-a)/o)*o+a,B),C=pi(U,[a,r]);E((L=[])=>{const _=nP(L,C,H);if(sP(_,c*o)){w.current=_.indexOf(C);const z=String(_)!==String(L);return z&&k&&p(_),z?_:L}else return L})}return s.jsx(Wz,{scope:e.__scopeSlider,name:n,disabled:i,min:a,max:r,valueIndexToChangeRef:w,thumbs:b.current,values:S,orientation:l,form:x,children:s.jsx(mw.Provider,{scope:e.__scopeSlider,children:s.jsx(mw.Slot,{scope:e.__scopeSlider,children:s.jsx(y,{"aria-disabled":i,"data-disabled":i?"":void 0,...v,ref:t,onPointerDown:q(v.onPointerDown,()=>{i||(R.current=S)}),min:a,max:r,inverted:h,onSlideStart:i?void 0:N,onSlideMove:i?void 0:j,onSlideEnd:i?void 0:T,onHomeKeyDown:()=>!i&&O(a,0,{commit:!0}),onEndKeyDown:()=>!i&&O(r,S.length-1,{commit:!0}),onStepKeyDown:({event:D,direction:H})=>{if(!i){const U=nC.includes(D.key)||D.shiftKey&&aC.includes(D.key)?10:1,C=w.current,L=S[C],_=o*U*H;O(L+_,C,{commit:!0})}}})})})})});lC.displayName=Fl;var[sC,iC]=oC(Fl,{startEdge:"left",endEdge:"right",size:"width",direction:1}),Qz=f.forwardRef((e,t)=>{const{min:n,max:a,dir:r,inverted:o,onSlideStart:l,onSlideMove:i,onSlideEnd:c,onStepKeyDown:u,...m}=e,[d,p]=f.useState(null),h=fe(t,y=>p(y)),x=f.useRef(void 0),v=El(r),b=v==="ltr",w=b&&!o||!b&&o;function g(y){const S=x.current||d.getBoundingClientRect(),E=[0,S.width],N=ww(E,w?[n,a]:[a,n]);return x.current=S,N(y-S.left)}return s.jsx(sC,{scope:e.__scopeSlider,startEdge:w?"left":"right",endEdge:w?"right":"left",direction:w?1:-1,size:"width",children:s.jsx(cC,{dir:v,"data-orientation":"horizontal",...m,ref:h,style:{...m.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:y=>{const S=g(y.clientX);l==null||l(S)},onSlideMove:y=>{const S=g(y.clientX);i==null||i(S)},onSlideEnd:()=>{x.current=void 0,c==null||c()},onStepKeyDown:y=>{const E=rC[w?"from-left":"from-right"].includes(y.key);u==null||u({event:y,direction:E?-1:1})}})})}),Jz=f.forwardRef((e,t)=>{const{min:n,max:a,inverted:r,onSlideStart:o,onSlideMove:l,onSlideEnd:i,onStepKeyDown:c,...u}=e,m=f.useRef(null),d=fe(t,m),p=f.useRef(void 0),h=!r;function x(v){const b=p.current||m.current.getBoundingClientRect(),w=[0,b.height],y=ww(w,h?[a,n]:[n,a]);return p.current=b,y(v-b.top)}return s.jsx(sC,{scope:e.__scopeSlider,startEdge:h?"bottom":"top",endEdge:h?"top":"bottom",size:"height",direction:h?1:-1,children:s.jsx(cC,{"data-orientation":"vertical",...u,ref:d,style:{...u.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:v=>{const b=x(v.clientY);o==null||o(b)},onSlideMove:v=>{const b=x(v.clientY);l==null||l(b)},onSlideEnd:()=>{p.current=void 0,i==null||i()},onStepKeyDown:v=>{const w=rC[h?"from-bottom":"from-top"].includes(v.key);c==null||c({event:v,direction:w?-1:1})}})})}),cC=f.forwardRef((e,t)=>{const{__scopeSlider:n,onSlideStart:a,onSlideMove:r,onSlideEnd:o,onHomeKeyDown:l,onEndKeyDown:i,onStepKeyDown:c,...u}=e,m=Md(Fl,n);return s.jsx(le.span,{...u,ref:t,onKeyDown:q(e.onKeyDown,d=>{d.key==="Home"?(l(d),d.preventDefault()):d.key==="End"?(i(d),d.preventDefault()):nC.concat(aC).includes(d.key)&&(c(d),d.preventDefault())}),onPointerDown:q(e.onPointerDown,d=>{const p=d.target;p.setPointerCapture(d.pointerId),d.preventDefault(),m.thumbs.has(p)?p.focus():a(d)}),onPointerMove:q(e.onPointerMove,d=>{d.target.hasPointerCapture(d.pointerId)&&r(d)}),onPointerUp:q(e.onPointerUp,d=>{const p=d.target;p.hasPointerCapture(d.pointerId)&&(p.releasePointerCapture(d.pointerId),o(d))})})}),uC="SliderTrack",dC=f.forwardRef((e,t)=>{const{__scopeSlider:n,...a}=e,r=Md(uC,n);return s.jsx(le.span,{"data-disabled":r.disabled?"":void 0,"data-orientation":r.orientation,...a,ref:t})});dC.displayName=uC;var pw="SliderRange",fC=f.forwardRef((e,t)=>{const{__scopeSlider:n,...a}=e,r=Md(pw,n),o=iC(pw,n),l=f.useRef(null),i=fe(t,l),c=r.values.length,u=r.values.map(p=>hC(p,r.min,r.max)),m=c>1?Math.min(...u):0,d=100-Math.max(...u);return s.jsx(le.span,{"data-orientation":r.orientation,"data-disabled":r.disabled?"":void 0,...a,ref:i,style:{...e.style,[o.startEdge]:m+"%",[o.endEdge]:d+"%"}})});fC.displayName=pw;var hw="SliderThumb",mC=f.forwardRef((e,t)=>{const n=Xz(e.__scopeSlider),[a,r]=f.useState(null),o=fe(t,i=>r(i)),l=f.useMemo(()=>a?n().findIndex(i=>i.ref.current===a):-1,[n,a]);return s.jsx(eP,{...e,ref:o,index:l})}),eP=f.forwardRef((e,t)=>{const{__scopeSlider:n,index:a,name:r,...o}=e,l=Md(hw,n),i=iC(hw,n),[c,u]=f.useState(null),m=fe(t,g=>u(g)),d=c?l.form||!!c.closest("form"):!0,p=vi(c),h=l.values[a],x=h===void 0?0:hC(h,l.min,l.max),v=aP(a,l.values.length),b=p==null?void 0:p[i.size],w=b?oP(b,x,i.direction):0;return f.useEffect(()=>{if(c)return l.thumbs.add(c),()=>{l.thumbs.delete(c)}},[c,l.thumbs]),s.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[i.startEdge]:`calc(${x}% + ${w}px)`},children:[s.jsx(mw.ItemSlot,{scope:e.__scopeSlider,children:s.jsx(le.span,{role:"slider","aria-label":e["aria-label"]||v,"aria-valuemin":l.min,"aria-valuenow":h,"aria-valuemax":l.max,"aria-orientation":l.orientation,"data-orientation":l.orientation,"data-disabled":l.disabled?"":void 0,tabIndex:l.disabled?void 0:0,...o,ref:m,style:h===void 0?{display:"none"}:e.style,onFocus:q(e.onFocus,()=>{l.valueIndexToChangeRef.current=a})})}),d&&s.jsx(pC,{name:r??(l.name?l.name+(l.values.length>1?"[]":""):void 0),form:l.form,value:h},a)]})});mC.displayName=hw;var tP="RadioBubbleInput",pC=f.forwardRef(({__scopeSlider:e,value:t,...n},a)=>{const r=f.useRef(null),o=fe(r,a),l=xi(t);return f.useEffect(()=>{const i=r.current;if(!i)return;const c=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(c,"value").set;if(l!==t&&m){const d=new Event("input",{bubbles:!0});m.call(i,t),i.dispatchEvent(d)}},[l,t]),s.jsx(le.input,{style:{display:"none"},...n,ref:o,defaultValue:t})});pC.displayName=tP;function nP(e=[],t,n){const a=[...e];return a[n]=t,a.sort((r,o)=>r-o)}function hC(e,t,n){const o=100/(n-t)*(e-t);return pi(o,[0,100])}function aP(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function rP(e,t){if(e.length===1)return 0;const n=e.map(r=>Math.abs(r-t)),a=Math.min(...n);return n.indexOf(a)}function oP(e,t,n){const a=e/2,o=ww([0,50],[0,a]);return(a-o(t)*n)*n}function lP(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function sP(e,t){if(t>0){const n=lP(e);return Math.min(...n)>=t}return!0}function ww(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const a=(t[1]-t[0])/(e[1]-e[0]);return t[0]+a*(n-e[0])}}function iP(e){return(String(e).split(".")[1]||"").length}function cP(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}var wC=lC,uP=dC,dP=fC,fP=mC;const gC=f.forwardRef(({className:e,...t},n)=>{const a=t.value??t.defaultValue??[0];return s.jsxs(wC,{ref:n,className:I("tw:relative tw:flex tw:w-full tw:touch-none tw:select-none tw:items-center tw:group",e),...t,children:[s.jsx(uP,{className:"tw:relative tw:h-1.5 tw:w-full tw:grow tw:overflow-hidden tw:rounded-full tw:bg-primary/20 tw:dark:bg-primary/30 tw:data-[disabled]:bg-gray-200 tw:dark:data-[disabled]:bg-gray-700",children:s.jsx(dP,{className:"tw:absolute tw:h-full tw:bg-primary tw:data-[disabled]:bg-gray-300 tw:dark:data-[disabled]:bg-gray-600"})}),a.map((r,o)=>s.jsx(fP,{className:"tw:block tw:h-4 tw:w-4 tw:rounded-full tw:border tw:border-primary/50 tw:bg-background tw:shadow tw:transition-colors tw:focus-visible:outline-none tw:focus-visible:ring-1 tw:focus-visible:ring-ring tw:disabled:pointer-events-none tw:disabled:opacity-50 tw:data-[disabled]:border-gray-300 tw:dark:data-[disabled]:border-gray-600"},o))]})});gC.displayName=wC.displayName;const mP=({...e})=>s.jsx(cM,{theme:"light",position:"bottom-right",className:"tw:toaster tw:group",toastOptions:{classNames:{toast:"tw:group tw:toast tw:bg-zinc-900 tw:text-white tw:border-zinc-700 tw:shadow-lg tw:rounded-lg tw:border tw:p-4",description:"tw:text-zinc-300 tw:font-mono tw:text-xs tw:bg-zinc-800 tw:px-2 tw:py-1.5 tw:rounded tw:mt-2 tw:block",actionButton:"tw:bg-primary tw:text-primary-foreground tw:rounded-md tw:px-3 tw:py-1.5 tw:text-sm tw:font-medium hover:tw:bg-primary/90",cancelButton:"tw:bg-zinc-700 tw:text-zinc-200 tw:rounded-md tw:px-3 tw:py-1.5 tw:text-sm",error:"tw:border-red-500 tw:bg-red-900"}},...e});var Dd="Switch",[pP]=Dt(Dd),[hP,wP]=pP(Dd),vC=f.forwardRef((e,t)=>{const{__scopeSwitch:n,name:a,checked:r,defaultChecked:o,required:l,disabled:i,value:c="on",onCheckedChange:u,form:m,...d}=e,[p,h]=f.useState(null),x=fe(t,y=>h(y)),v=f.useRef(!1),b=p?m||!!p.closest("form"):!0,[w,g]=fa({prop:r,defaultProp:o??!1,onChange:u,caller:Dd});return s.jsxs(hP,{scope:n,checked:w,disabled:i,children:[s.jsx(le.button,{type:"button",role:"switch","aria-checked":w,"aria-required":l,"data-state":SC(w),"data-disabled":i?"":void 0,disabled:i,value:c,...d,ref:x,onClick:q(e.onClick,y=>{g(S=>!S),b&&(v.current=y.isPropagationStopped(),v.current||y.stopPropagation())})}),b&&s.jsx(bC,{control:p,bubbles:!v.current,name:a,value:c,checked:w,required:l,disabled:i,form:m,style:{transform:"translateX(-100%)"}})]})});vC.displayName=Dd;var yC="SwitchThumb",xC=f.forwardRef((e,t)=>{const{__scopeSwitch:n,...a}=e,r=wP(yC,n);return s.jsx(le.span,{"data-state":SC(r.checked),"data-disabled":r.disabled?"":void 0,...a,ref:t})});xC.displayName=yC;var gP="SwitchBubbleInput",bC=f.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:a=!0,...r},o)=>{const l=f.useRef(null),i=fe(l,o),c=xi(n),u=vi(t);return f.useEffect(()=>{const m=l.current;if(!m)return;const d=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(d,"checked").set;if(c!==n&&h){const x=new Event("click",{bubbles:a});h.call(m,n),m.dispatchEvent(x)}},[c,n,a]),s.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...r,tabIndex:-1,ref:i,style:{...r.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});bC.displayName=gP;function SC(e){return e?"checked":"unchecked"}var NC=vC,vP=xC;const Or=f.forwardRef(({className:e,...t},n)=>s.jsx(NC,{className:I("tw:peer tw:inline-flex tw:h-5 tw:w-9 tw:shrink-0 tw:cursor-pointer tw:items-center tw:rounded-full tw:border-2 tw:border-transparent tw:shadow-sm tw:transition-colors tw:focus-visible:outline-none tw:focus-visible:ring-2 tw:focus-visible:ring-ring tw:focus-visible:ring-offset-2 tw:focus-visible:ring-offset-background tw:disabled:cursor-not-allowed tw:disabled:opacity-50 tw:data-[state=checked]:bg-primary tw:data-[state=unchecked]:bg-input",e),...t,ref:n,children:s.jsx(vP,{className:I("tw:pointer-events-none tw:block tw:h-4 tw:w-4 tw:rounded-full tw:bg-background tw:shadow-lg tw:ring-0 tw:transition-transform tw:data-[state=checked]:translate-x-4 tw:data-[state=unchecked]:translate-x-0")})}));Or.displayName=NC.displayName;var Od="Tabs",[yP]=Dt(Od,[Hl]),jC=Hl(),[xP,gw]=yP(Od),bP=f.forwardRef((e,t)=>{const{__scopeTabs:n,value:a,onValueChange:r,defaultValue:o,orientation:l="horizontal",dir:i,activationMode:c="automatic",...u}=e,m=El(i),[d,p]=fa({prop:a,onChange:r,defaultProp:o??"",caller:Od});return s.jsx(xP,{scope:n,baseId:Ua(),value:d,onValueChange:p,orientation:l,dir:m,activationMode:c,children:s.jsx(le.div,{dir:m,"data-orientation":l,...u,ref:t})})});bP.displayName=Od;var CC="TabsList",EC=f.forwardRef((e,t)=>{const{__scopeTabs:n,loop:a=!0,...r}=e,o=gw(CC,n),l=jC(n);return s.jsx($h,{asChild:!0,...l,orientation:o.orientation,dir:o.dir,loop:a,children:s.jsx(le.div,{role:"tablist","aria-orientation":o.orientation,...r,ref:t})})});EC.displayName=CC;var AC="TabsTrigger",RC=f.forwardRef((e,t)=>{const{__scopeTabs:n,value:a,disabled:r=!1,...o}=e,l=gw(AC,n),i=jC(n),c=MC(l.baseId,a),u=DC(l.baseId,a),m=a===l.value;return s.jsx(Fh,{asChild:!0,...i,focusable:!r,active:m,children:s.jsx(le.button,{type:"button",role:"tab","aria-selected":m,"aria-controls":u,"data-state":m?"active":"inactive","data-disabled":r?"":void 0,disabled:r,id:c,...o,ref:t,onMouseDown:q(e.onMouseDown,d=>{!r&&d.button===0&&d.ctrlKey===!1?l.onValueChange(a):d.preventDefault()}),onKeyDown:q(e.onKeyDown,d=>{[" ","Enter"].includes(d.key)&&l.onValueChange(a)}),onFocus:q(e.onFocus,()=>{const d=l.activationMode!=="manual";!m&&!r&&d&&l.onValueChange(a)})})})});RC.displayName=AC;var _C="TabsContent",TC=f.forwardRef((e,t)=>{const{__scopeTabs:n,value:a,forceMount:r,children:o,...l}=e,i=gw(_C,n),c=MC(i.baseId,a),u=DC(i.baseId,a),m=a===i.value,d=f.useRef(m);return f.useEffect(()=>{const p=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(p)},[]),s.jsx(bt,{present:r||m,children:({present:p})=>s.jsx(le.div,{"data-state":m?"active":"inactive","data-orientation":i.orientation,role:"tabpanel","aria-labelledby":c,hidden:!p,id:u,tabIndex:0,...l,ref:t,style:{...e.style,animationDuration:d.current?"0s":void 0},children:p&&o})})});TC.displayName=_C;function MC(e,t){return`${e}-trigger-${t}`}function DC(e,t){return`${e}-content-${t}`}var OC=EC,kC=RC,LC=TC;const SP=f.forwardRef(({className:e,...t},n)=>s.jsx(OC,{ref:n,className:I("tw:inline-flex tw:h-9 tw:items-center tw:justify-center tw:rounded-lg tw:bg-muted tw:p-1 tw:text-muted-foreground",e),...t}));SP.displayName=OC.displayName;const NP=f.forwardRef(({className:e,...t},n)=>s.jsx(kC,{ref:n,className:I("tw:inline-flex tw:items-center tw:justify-center tw:whitespace-nowrap tw:rounded-md tw:px-3 tw:py-1 tw:text-sm tw:font-medium tw:ring-offset-background tw:transition-all tw:focus-visible:outline-none tw:focus-visible:ring-2 tw:focus-visible:ring-ring tw:focus-visible:ring-offset-2 tw:disabled:pointer-events-none tw:disabled:opacity-50 tw:data-[state=active]:bg-background tw:data-[state=active]:text-foreground tw:data-[state=active]:shadow",e),...t}));NP.displayName=kC.displayName;const jP=f.forwardRef(({className:e,...t},n)=>s.jsx(LC,{ref:n,className:I("tw:mt-2 tw:ring-offset-background tw:focus-visible:outline-none tw:focus-visible:ring-2 tw:focus-visible:ring-ring tw:focus-visible:ring-offset-2",e),...t}));jP.displayName=LC.displayName;const zC=f.forwardRef(({className:e,...t},n)=>s.jsx("div",{className:"tw:relative tw:w-full tw:overflow-auto",children:s.jsx("table",{ref:n,className:I("tw:w-full tw:caption-bottom tw:text-sm",e),...t})}));zC.displayName="Table";const PC=f.forwardRef(({className:e,...t},n)=>s.jsx("thead",{ref:n,className:I("tw:[&_tr]:border-b tw:[&_tr]:border-gray-100",e),...t}));PC.displayName="TableHeader";const BC=f.forwardRef(({className:e,...t},n)=>s.jsx("tbody",{ref:n,className:I("tw:[&_tr:last-child]:border-0",e),...t}));BC.displayName="TableBody";const CP=f.forwardRef(({className:e,...t},n)=>s.jsx("tfoot",{ref:n,className:I("tw:border-t tw:bg-muted/50 tw:font-medium tw:[&>tr]:last:border-b-0",e),...t}));CP.displayName="TableFooter";const Pi=f.forwardRef(({className:e,...t},n)=>s.jsx("tr",{ref:n,className:I("tw:border-b tw:border-gray-100 tw:transition-colors tw:hover:bg-muted/50 tw:data-[state=selected]:bg-muted",e),...t}));Pi.displayName="TableRow";const Gl=f.forwardRef(({className:e,...t},n)=>s.jsx("th",{ref:n,className:I("tw:h-10 tw:px-2 tw:text-left tw:align-middle tw:font-medium tw:text-muted-foreground tw:[&:has([role=checkbox])]:pr-0 tw:[&>[role=checkbox]]:translate-y-[2px]",e),...t}));Gl.displayName="TableHead";const kr=f.forwardRef(({className:e,...t},n)=>s.jsx("td",{ref:n,className:I("tw:p-2 tw:align-middle tw:[&:has([role=checkbox])]:pr-0 tw:[&>[role=checkbox]]:translate-y-[2px]",e),...t}));kr.displayName="TableCell";const EP=f.forwardRef(({className:e,...t},n)=>s.jsx("caption",{ref:n,className:I("tw:mt-4 tw:text-sm tw:text-muted-foreground",e),...t}));EP.displayName="TableCaption";const AP=f.forwardRef(({className:e,...t},n)=>s.jsx("textarea",{className:I("tw:flex tw:min-h-[60px] tw:w-full tw:rounded-md tw:border tw:border-gray-300 tw:bg-white tw:px-3 tw:py-2 tw:text-base tw:shadow-sm tw:placeholder:text-muted-foreground tw:focus-visible:outline-none tw:focus-visible:ring-1 tw:focus-visible:ring-ring tw:disabled:cursor-not-allowed tw:disabled:opacity-50 tw:md:text-sm",e),ref:n,...t}));AP.displayName="Textarea";function RP({className:e}){return s.jsxs("svg",{viewBox:"0 0 256 256",fill:"currentColor",className:e,children:[s.jsx("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),s.jsx("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm16-40a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176ZM112,84a12,12,0,1,1,12,12A12,12,0,0,1,112,84Z"})]})}function Yl({label:e,tooltip:t}){return s.jsxs("div",{className:"tw:flex tw:items-center tw:gap-1 tw:mb-1",children:[s.jsx("span",{className:"tw:text-xs tw:font-medium tw:text-gray-600",children:e}),s.jsxs(dw,{children:[s.jsx(fw,{asChild:!0,children:s.jsx("span",{className:"tw:text-gray-400 tw:cursor-help tw:inline-flex",children:s.jsx(RP,{className:"tw:w-4 tw:h-4"})})}),s.jsx(_d,{side:"top",className:"tw:max-w-xs tw:text-xs",children:t})]})]})}function _P(e){return Object.prototype.toString.call(e)==="[object Object]"}function UC(e){return _P(e)||Array.isArray(e)}function TP(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function vw(e,t){const n=Object.keys(e),a=Object.keys(t);if(n.length!==a.length)return!1;const r=JSON.stringify(Object.keys(e.breakpoints||{})),o=JSON.stringify(Object.keys(t.breakpoints||{}));return r!==o?!1:n.every(l=>{const i=e[l],c=t[l];return typeof i=="function"?`${i}`==`${c}`:!UC(i)||!UC(c)?i===c:vw(i,c)})}function HC(e){return e.concat().sort((t,n)=>t.name>n.name?1:-1).map(t=>t.options)}function MP(e,t){if(e.length!==t.length)return!1;const n=HC(e),a=HC(t);return n.every((r,o)=>{const l=a[o];return vw(r,l)})}function yw(e){return typeof e=="number"}function xw(e){return typeof e=="string"}function kd(e){return typeof e=="boolean"}function IC(e){return Object.prototype.toString.call(e)==="[object Object]"}function et(e){return Math.abs(e)}function bw(e){return Math.sign(e)}function Bi(e,t){return et(e-t)}function DP(e,t){if(e===0||t===0||et(e)<=et(t))return 0;const n=Bi(et(e),et(t));return et(n/e)}function OP(e){return Math.round(e*100)/100}function Ui(e){return Ii(e).map(Number)}function Xn(e){return e[Hi(e)]}function Hi(e){return Math.max(0,e.length-1)}function Sw(e,t){return t===Hi(e)}function VC(e,t=0){return Array.from(Array(e),(n,a)=>t+a)}function Ii(e){return Object.keys(e)}function $C(e,t){return[e,t].reduce((n,a)=>(Ii(a).forEach(r=>{const o=n[r],l=a[r],i=IC(o)&&IC(l);n[r]=i?$C(o,l):l}),n),{})}function Nw(e,t){return typeof t.MouseEvent<"u"&&e instanceof t.MouseEvent}function kP(e,t){const n={start:a,center:r,end:o};function a(){return 0}function r(c){return o(c)/2}function o(c){return t-c}function l(c,u){return xw(e)?n[e](c):e(t,c,u)}return{measure:l}}function Vi(){let e=[];function t(r,o,l,i={passive:!0}){let c;if("addEventListener"in r)r.addEventListener(o,l,i),c=()=>r.removeEventListener(o,l,i);else{const u=r;u.addListener(l),c=()=>u.removeListener(l)}return e.push(c),a}function n(){e=e.filter(r=>r())}const a={add:t,clear:n};return a}function LP(e,t,n,a){const r=Vi(),o=1e3/60;let l=null,i=0,c=0;function u(){r.add(e,"visibilitychange",()=>{e.hidden&&x()})}function m(){h(),r.clear()}function d(b){if(!c)return;l||(l=b,n(),n());const w=b-l;for(l=b,i+=w;i>=o;)n(),i-=o;const g=i/o;a(g),c&&(c=t.requestAnimationFrame(d))}function p(){c||(c=t.requestAnimationFrame(d))}function h(){t.cancelAnimationFrame(c),l=null,i=0,c=0}function x(){l=null,i=0}return{init:u,destroy:m,start:p,stop:h,update:n,render:a}}function zP(e,t){const n=t==="rtl",a=e==="y",r=a?"y":"x",o=a?"x":"y",l=!a&&n?-1:1,i=m(),c=d();function u(x){const{height:v,width:b}=x;return a?v:b}function m(){return a?"top":n?"right":"left"}function d(){return a?"bottom":n?"left":"right"}function p(x){return x*l}return{scroll:r,cross:o,startEdge:i,endEdge:c,measureSize:u,direction:p}}function xo(e=0,t=0){const n=et(e-t);function a(u){return u<e}function r(u){return u>t}function o(u){return a(u)||r(u)}function l(u){return o(u)?a(u)?e:t:u}function i(u){return n?u-n*Math.ceil((u-t)/n):u}return{length:n,max:t,min:e,constrain:l,reachedAny:o,reachedMax:r,reachedMin:a,removeOffset:i}}function FC(e,t,n){const{constrain:a}=xo(0,e),r=e+1;let o=l(t);function l(p){return n?et((r+p)%r):a(p)}function i(){return o}function c(p){return o=l(p),d}function u(p){return m().set(i()+p)}function m(){return FC(e,i(),n)}const d={get:i,set:c,add:u,clone:m};return d}function PP(e,t,n,a,r,o,l,i,c,u,m,d,p,h,x,v,b,w,g){const{cross:y,direction:S}=e,E=["INPUT","SELECT","TEXTAREA"],R={passive:!1},N=Vi(),j=Vi(),T=xo(50,225).constrain(h.measure(20)),O={mouse:300,touch:400},D={mouse:500,touch:600},H=x?43:25;let k=!1,B=0,U=0,C=!1,L=!1,_=!1,z=!1;function $(F){if(!g)return;function he(We){(kd(g)||g(F,We))&&ge(We)}const Ce=t;N.add(Ce,"dragstart",We=>We.preventDefault(),R).add(Ce,"touchmove",()=>{},R).add(Ce,"touchend",()=>{}).add(Ce,"touchstart",he).add(Ce,"mousedown",he).add(Ce,"touchcancel",W).add(Ce,"contextmenu",W).add(Ce,"click",pe,!0)}function J(){N.clear(),j.clear()}function me(){const F=z?n:t;j.add(F,"touchmove",Y,R).add(F,"touchend",W).add(F,"mousemove",Y,R).add(F,"mouseup",W)}function Z(F){const he=F.nodeName||"";return E.includes(he)}function Q(){return(x?D:O)[z?"mouse":"touch"]}function ee(F,he){const Ce=d.add(bw(F)*-1),We=m.byDistance(F,!x).distance;return x||et(F)<T?We:b&&he?We*.5:m.byIndex(Ce.get(),0).distance}function ge(F){const he=Nw(F,a);z=he,_=x&&he&&!F.buttons&&k,k=Bi(r.get(),l.get())>=2,!(he&&F.button!==0)&&(Z(F.target)||(C=!0,o.pointerDown(F),u.useFriction(0).useDuration(0),r.set(l),me(),B=o.readPoint(F),U=o.readPoint(F,y),p.emit("pointerDown")))}function Y(F){if(!Nw(F,a)&&F.touches.length>=2)return W(F);const Ce=o.readPoint(F),We=o.readPoint(F,y),Ve=Bi(Ce,B),tt=Bi(We,U);if(!L&&!z&&(!F.cancelable||(L=Ve>tt,!L)))return W(F);const Qt=o.pointerMove(F);Ve>v&&(_=!0),u.useFriction(.3).useDuration(.75),i.start(),r.add(S(Qt)),F.preventDefault()}function W(F){const Ce=m.byDistance(0,!1).index!==d.get(),We=o.pointerUp(F)*Q(),Ve=ee(S(We),Ce),tt=DP(We,Ve),Qt=H-10*tt,Ye=w+tt/50;L=!1,C=!1,j.clear(),u.useDuration(Qt).useFriction(Ye),c.distance(Ve,!x),z=!1,p.emit("pointerUp")}function pe(F){_&&(F.stopPropagation(),F.preventDefault(),_=!1)}function ue(){return C}return{init:$,destroy:J,pointerDown:ue}}function BP(e,t){let a,r;function o(d){return d.timeStamp}function l(d,p){const x=`client${(p||e.scroll)==="x"?"X":"Y"}`;return(Nw(d,t)?d:d.touches[0])[x]}function i(d){return a=d,r=d,l(d)}function c(d){const p=l(d)-l(r),h=o(d)-o(a)>170;return r=d,h&&(a=d),p}function u(d){if(!a||!r)return 0;const p=l(r)-l(a),h=o(d)-o(a),x=o(d)-o(r)>170,v=p/h;return h&&!x&&et(v)>.1?v:0}return{pointerDown:i,pointerMove:c,pointerUp:u,readPoint:l}}function UP(){function e(n){const{offsetTop:a,offsetLeft:r,offsetWidth:o,offsetHeight:l}=n;return{top:a,right:r+o,bottom:a+l,left:r,width:o,height:l}}return{measure:e}}function HP(e){function t(a){return e*(a/100)}return{measure:t}}function IP(e,t,n,a,r,o,l){const i=[e].concat(a);let c,u,m=[],d=!1;function p(b){return r.measureSize(l.measure(b))}function h(b){if(!o)return;u=p(e),m=a.map(p);function w(g){for(const y of g){if(d)return;const S=y.target===e,E=a.indexOf(y.target),R=S?u:m[E],N=p(S?e:a[E]);if(et(N-R)>=.5){b.reInit(),t.emit("resize");break}}}c=new ResizeObserver(g=>{(kd(o)||o(b,g))&&w(g)}),n.requestAnimationFrame(()=>{i.forEach(g=>c.observe(g))})}function x(){d=!0,c&&c.disconnect()}return{init:h,destroy:x}}function VP(e,t,n,a,r,o){let l=0,i=0,c=r,u=o,m=e.get(),d=0;function p(){const R=a.get()-e.get(),N=!c;let j=0;return N?(l=0,n.set(a),e.set(a),j=R):(n.set(e),l+=R/c,l*=u,m+=l,e.add(l),j=m-d),i=bw(j),d=m,E}function h(){const R=a.get()-t.get();return et(R)<.001}function x(){return c}function v(){return i}function b(){return l}function w(){return y(r)}function g(){return S(o)}function y(R){return c=R,E}function S(R){return u=R,E}const E={direction:v,duration:x,velocity:b,seek:p,settled:h,useBaseFriction:g,useBaseDuration:w,useFriction:S,useDuration:y};return E}function $P(e,t,n,a,r){const o=r.measure(10),l=r.measure(50),i=xo(.1,.99);let c=!1;function u(){return!(c||!e.reachedAny(n.get())||!e.reachedAny(t.get()))}function m(h){if(!u())return;const x=e.reachedMin(t.get())?"min":"max",v=et(e[x]-t.get()),b=n.get()-t.get(),w=i.constrain(v/l);n.subtract(b*w),!h&&et(b)<o&&(n.set(e.constrain(n.get())),a.useDuration(25).useBaseFriction())}function d(h){c=!h}return{shouldConstrain:u,constrain:m,toggleActive:d}}function FP(e,t,n,a,r){const o=xo(-t+e,0),l=d(),i=m(),c=p();function u(x,v){return Bi(x,v)<=1}function m(){const x=l[0],v=Xn(l),b=l.lastIndexOf(x),w=l.indexOf(v)+1;return xo(b,w)}function d(){return n.map((x,v)=>{const{min:b,max:w}=o,g=o.constrain(x),y=!v,S=Sw(n,v);return y?w:S||u(b,g)?b:u(w,g)?w:g}).map(x=>parseFloat(x.toFixed(3)))}function p(){if(t<=e+r)return[o.max];if(a==="keepSnaps")return l;const{min:x,max:v}=i;return l.slice(x,v)}return{snapsContained:c,scrollContainLimit:i}}function GP(e,t,n){const a=t[0],r=n?a-e:Xn(t);return{limit:xo(r,a)}}function YP(e,t,n,a){const o=t.min+.1,l=t.max+.1,{reachedMin:i,reachedMax:c}=xo(o,l);function u(p){return p===1?c(n.get()):p===-1?i(n.get()):!1}function m(p){if(!u(p))return;const h=e*(p*-1);a.forEach(x=>x.add(h))}return{loop:m}}function qP(e){const{max:t,length:n}=e;function a(o){const l=o-t;return n?l/-n:0}return{get:a}}function KP(e,t,n,a,r){const{startEdge:o,endEdge:l}=e,{groupSlides:i}=r,c=d().map(t.measure),u=p(),m=h();function d(){return i(a).map(v=>Xn(v)[l]-v[0][o]).map(et)}function p(){return a.map(v=>n[o]-v[o]).map(v=>-et(v))}function h(){return i(u).map(v=>v[0]).map((v,b)=>v+c[b])}return{snaps:u,snapsAligned:m}}function XP(e,t,n,a,r,o){const{groupSlides:l}=r,{min:i,max:c}=a,u=m();function m(){const p=l(o),h=!e||t==="keepSnaps";return n.length===1?[o]:h?p:p.slice(i,c).map((x,v,b)=>{const w=!v,g=Sw(b,v);if(w){const y=Xn(b[0])+1;return VC(y)}if(g){const y=Hi(o)-Xn(b)[0]+1;return VC(y,Xn(b)[0])}return x})}return{slideRegistry:u}}function ZP(e,t,n,a,r){const{reachedAny:o,removeOffset:l,constrain:i}=a;function c(x){return x.concat().sort((v,b)=>et(v)-et(b))[0]}function u(x){const v=e?l(x):i(x),b=t.map((g,y)=>({diff:m(g-v,0),index:y})).sort((g,y)=>et(g.diff)-et(y.diff)),{index:w}=b[0];return{index:w,distance:v}}function m(x,v){const b=[x,x+n,x-n];if(!e)return x;if(!v)return c(b);const w=b.filter(g=>bw(g)===v);return w.length?c(w):Xn(b)-n}function d(x,v){const b=t[x]-r.get(),w=m(b,v);return{index:x,distance:w}}function p(x,v){const b=r.get()+x,{index:w,distance:g}=u(b),y=!e&&o(b);if(!v||y)return{index:w,distance:x};const S=t[w]-g,E=x+m(S,0);return{index:w,distance:E}}return{byDistance:p,byIndex:d,shortcut:m}}function WP(e,t,n,a,r,o,l){function i(d){const p=d.distance,h=d.index!==t.get();o.add(p),p&&(a.duration()?e.start():(e.update(),e.render(1),e.update())),h&&(n.set(t.get()),t.set(d.index),l.emit("select"))}function c(d,p){const h=r.byDistance(d,p);i(h)}function u(d,p){const h=t.clone().set(d),x=r.byIndex(h.get(),p);i(x)}return{distance:c,index:u}}function QP(e,t,n,a,r,o,l,i){const c={passive:!0,capture:!0};let u=0;function m(h){if(!i)return;function x(v){if(new Date().getTime()-u>10)return;l.emit("slideFocusStart"),e.scrollLeft=0;const g=n.findIndex(y=>y.includes(v));yw(g)&&(r.useDuration(0),a.index(g,0),l.emit("slideFocus"))}o.add(document,"keydown",d,!1),t.forEach((v,b)=>{o.add(v,"focus",w=>{(kd(i)||i(h,w))&&x(b)},c)})}function d(h){h.code==="Tab"&&(u=new Date().getTime())}return{init:m}}function $i(e){let t=e;function n(){return t}function a(c){t=l(c)}function r(c){t+=l(c)}function o(c){t-=l(c)}function l(c){return yw(c)?c:c.get()}return{get:n,set:a,add:r,subtract:o}}function GC(e,t){const n=e.scroll==="x"?l:i,a=t.style;let r=null,o=!1;function l(p){return`translate3d(${p}px,0px,0px)`}function i(p){return`translate3d(0px,${p}px,0px)`}function c(p){if(o)return;const h=OP(e.direction(p));h!==r&&(a.transform=n(h),r=h)}function u(p){o=!p}function m(){o||(a.transform="",t.getAttribute("style")||t.removeAttribute("style"))}return{clear:m,to:c,toggleActive:u}}function JP(e,t,n,a,r,o,l,i,c){const m=Ui(r),d=Ui(r).reverse(),p=w().concat(g());function h(N,j){return N.reduce((T,O)=>T-r[O],j)}function x(N,j){return N.reduce((T,O)=>h(T,j)>0?T.concat([O]):T,[])}function v(N){return o.map((j,T)=>({start:j-a[T]+.5+N,end:j+t-.5+N}))}function b(N,j,T){const O=v(j);return N.map(D=>{const H=T?0:-n,k=T?n:0,B=T?"end":"start",U=O[D][B];return{index:D,loopPoint:U,slideLocation:$i(-1),translate:GC(e,c[D]),target:()=>i.get()>U?H:k}})}function w(){const N=l[0],j=x(d,N);return b(j,n,!1)}function g(){const N=t-l[0]-1,j=x(m,N);return b(j,-n,!0)}function y(){return p.every(({index:N})=>{const j=m.filter(T=>T!==N);return h(j,t)<=.1})}function S(){p.forEach(N=>{const{target:j,translate:T,slideLocation:O}=N,D=j();D!==O.get()&&(T.to(D),O.set(D))})}function E(){p.forEach(N=>N.translate.clear())}return{canLoop:y,clear:E,loop:S,loopPoints:p}}function e7(e,t,n){let a,r=!1;function o(c){if(!n)return;function u(m){for(const d of m)if(d.type==="childList"){c.reInit(),t.emit("slidesChanged");break}}a=new MutationObserver(m=>{r||(kd(n)||n(c,m))&&u(m)}),a.observe(e,{childList:!0})}function l(){a&&a.disconnect(),r=!0}return{init:o,destroy:l}}function t7(e,t,n,a){const r={};let o=null,l=null,i,c=!1;function u(){i=new IntersectionObserver(x=>{c||(x.forEach(v=>{const b=t.indexOf(v.target);r[b]=v}),o=null,l=null,n.emit("slidesInView"))},{root:e.parentElement,threshold:a}),t.forEach(x=>i.observe(x))}function m(){i&&i.disconnect(),c=!0}function d(x){return Ii(r).reduce((v,b)=>{const w=parseInt(b),{isIntersecting:g}=r[w];return(x&&g||!x&&!g)&&v.push(w),v},[])}function p(x=!0){if(x&&o)return o;if(!x&&l)return l;const v=d(x);return x&&(o=v),x||(l=v),v}return{init:u,destroy:m,get:p}}function n7(e,t,n,a,r,o){const{measureSize:l,startEdge:i,endEdge:c}=e,u=n[0]&&r,m=x(),d=v(),p=n.map(l),h=b();function x(){if(!u)return 0;const g=n[0];return et(t[i]-g[i])}function v(){if(!u)return 0;const g=o.getComputedStyle(Xn(a));return parseFloat(g.getPropertyValue(`margin-${c}`))}function b(){return n.map((g,y,S)=>{const E=!y,R=Sw(S,y);return E?p[y]+m:R?p[y]+d:S[y+1][i]-g[i]}).map(et)}return{slideSizes:p,slideSizesWithGaps:h,startGap:m,endGap:d}}function a7(e,t,n,a,r,o,l,i,c){const{startEdge:u,endEdge:m,direction:d}=e,p=yw(n);function h(w,g){return Ui(w).filter(y=>y%g===0).map(y=>w.slice(y,y+g))}function x(w){return w.length?Ui(w).reduce((g,y,S)=>{const E=Xn(g)||0,R=E===0,N=y===Hi(w),j=r[u]-o[E][u],T=r[u]-o[y][m],O=!a&&R?d(l):0,D=!a&&N?d(i):0,H=et(T-D-(j+O));return S&&H>t+c&&g.push(y),N&&g.push(w.length),g},[]).map((g,y,S)=>{const E=Math.max(S[y-1]||0);return w.slice(E,g)}):[]}function v(w){return p?h(w,n):x(w)}return{groupSlides:v}}function r7(e,t,n,a,r,o,l){const{align:i,axis:c,direction:u,startIndex:m,loop:d,duration:p,dragFree:h,dragThreshold:x,inViewThreshold:v,slidesToScroll:b,skipSnaps:w,containScroll:g,watchResize:y,watchSlides:S,watchDrag:E,watchFocus:R}=o,N=2,j=UP(),T=j.measure(t),O=n.map(j.measure),D=zP(c,u),H=D.measureSize(T),k=HP(H),B=kP(i,H),U=!d&&!!g,C=d||!!g,{slideSizes:L,slideSizesWithGaps:_,startGap:z,endGap:$}=n7(D,T,O,n,C,r),J=a7(D,H,b,d,T,O,z,$,N),{snaps:me,snapsAligned:Z}=KP(D,B,T,O,J),Q=-Xn(me)+Xn(_),{snapsContained:ee,scrollContainLimit:ge}=FP(H,Q,Z,g,N),Y=U?ee:Z,{limit:W}=GP(Q,Y,d),pe=FC(Hi(Y),m,d),ue=pe.clone(),re=Ui(n),F=({dragHandler:Pt,scrollBody:Br,scrollBounds:en,options:{loop:Ur}})=>{Ur||en.constrain(Pt.pointerDown()),Br.seek()},he=({scrollBody:Pt,translate:Br,location:en,offsetLocation:Ur,previousLocation:vn,scrollLooper:So,slideLooper:No,dragHandler:Wl,animation:jo,eventHandler:tn,scrollBounds:Hr,options:{loop:Co}},Ga)=>{const Eo=Pt.settled(),ve=!Hr.shouldConstrain(),nt=Co?Eo:Eo&&ve,ot=nt&&!Wl.pointerDown();ot&&jo.stop();const wt=en.get()*Ga+vn.get()*(1-Ga);Ur.set(wt),Co&&(So.loop(Pt.direction()),No.loop()),Br.to(Ur.get()),ot&&tn.emit("settle"),nt||tn.emit("scroll")},Ce=LP(a,r,()=>F(kt),Pt=>he(kt,Pt)),We=.68,Ve=Y[pe.get()],tt=$i(Ve),Qt=$i(Ve),Ye=$i(Ve),Zn=$i(Ve),$a=VP(tt,Ye,Qt,Zn,p,We),St=ZP(d,Y,Q,W,Zn),Pn=WP(Ce,pe,ue,$a,St,Zn,l),Bn=qP(W),ha=Vi(),Fa=t7(t,n,l,v),{slideRegistry:Pr}=XP(U,g,Y,ge,J,re),Jt=QP(e,n,Pr,Pn,$a,ha,l,R),kt={ownerDocument:a,ownerWindow:r,eventHandler:l,containerRect:T,slideRects:O,animation:Ce,axis:D,dragHandler:PP(D,e,a,r,Zn,BP(D,r),tt,Ce,Pn,$a,St,pe,l,k,h,x,w,We,E),eventStore:ha,percentOfView:k,index:pe,indexPrevious:ue,limit:W,location:tt,offsetLocation:Ye,previousLocation:Qt,options:o,resizeHandler:IP(t,l,r,n,D,y,j),scrollBody:$a,scrollBounds:$P(W,Ye,Zn,$a,k),scrollLooper:YP(Q,W,Ye,[tt,Ye,Qt,Zn]),scrollProgress:Bn,scrollSnapList:Y.map(Bn.get),scrollSnaps:Y,scrollTarget:St,scrollTo:Pn,slideLooper:JP(D,H,Q,L,_,me,Y,Ye,n),slideFocus:Jt,slidesHandler:e7(t,l,S),slidesInView:Fa,slideIndexes:re,slideRegistry:Pr,slidesToScroll:J,target:Zn,translate:GC(D,t)};return kt}function o7(){let e={},t;function n(u){t=u}function a(u){return e[u]||[]}function r(u){return a(u).forEach(m=>m(t,u)),c}function o(u,m){return e[u]=a(u).concat([m]),c}function l(u,m){return e[u]=a(u).filter(d=>d!==m),c}function i(){e={}}const c={init:n,emit:r,off:l,on:o,clear:i};return c}const l7={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0};function s7(e){function t(o,l){return $C(o,l||{})}function n(o){const l=o.breakpoints||{},i=Ii(l).filter(c=>e.matchMedia(c).matches).map(c=>l[c]).reduce((c,u)=>t(c,u),{});return t(o,i)}function a(o){return o.map(l=>Ii(l.breakpoints||{})).reduce((l,i)=>l.concat(i),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:n,optionsMediaQueries:a}}function i7(e){let t=[];function n(o,l){return t=l.filter(({options:i})=>e.optionsAtMedia(i).active!==!1),t.forEach(i=>i.init(o,e)),l.reduce((i,c)=>Object.assign(i,{[c.name]:c}),{})}function a(){t=t.filter(o=>o.destroy())}return{init:n,destroy:a}}function Ld(e,t,n){const a=e.ownerDocument,r=a.defaultView,o=s7(r),l=i7(o),i=Vi(),c=o7(),{mergeOptions:u,optionsAtMedia:m,optionsMediaQueries:d}=o,{on:p,off:h,emit:x}=c,v=D;let b=!1,w,g=u(l7,Ld.globalOptions),y=u(g),S=[],E,R,N;function j(){const{container:re,slides:F}=y;R=(xw(re)?e.querySelector(re):re)||e.children[0];const Ce=xw(F)?R.querySelectorAll(F):F;N=[].slice.call(Ce||R.children)}function T(re){const F=r7(e,R,N,a,r,re,c);if(re.loop&&!F.slideLooper.canLoop()){const he=Object.assign({},re,{loop:!1});return T(he)}return F}function O(re,F){b||(g=u(g,re),y=m(g),S=F||S,j(),w=T(y),d([g,...S.map(({options:he})=>he)]).forEach(he=>i.add(he,"change",D)),y.active&&(w.translate.to(w.location.get()),w.animation.init(),w.slidesInView.init(),w.slideFocus.init(ue),w.eventHandler.init(ue),w.resizeHandler.init(ue),w.slidesHandler.init(ue),w.options.loop&&w.slideLooper.loop(),R.offsetParent&&N.length&&w.dragHandler.init(ue),E=l.init(ue,S)))}function D(re,F){const he=J();H(),O(u({startIndex:he},re),F),c.emit("reInit")}function H(){w.dragHandler.destroy(),w.eventStore.clear(),w.translate.clear(),w.slideLooper.clear(),w.resizeHandler.destroy(),w.slidesHandler.destroy(),w.slidesInView.destroy(),w.animation.destroy(),l.destroy(),i.clear()}function k(){b||(b=!0,i.clear(),H(),c.emit("destroy"),c.clear())}function B(re,F,he){!y.active||b||(w.scrollBody.useBaseFriction().useDuration(F===!0?0:y.duration),w.scrollTo.index(re,he||0))}function U(re){const F=w.index.add(1).get();B(F,re,-1)}function C(re){const F=w.index.add(-1).get();B(F,re,1)}function L(){return w.index.add(1).get()!==J()}function _(){return w.index.add(-1).get()!==J()}function z(){return w.scrollSnapList}function $(){return w.scrollProgress.get(w.offsetLocation.get())}function J(){return w.index.get()}function me(){return w.indexPrevious.get()}function Z(){return w.slidesInView.get()}function Q(){return w.slidesInView.get(!1)}function ee(){return E}function ge(){return w}function Y(){return e}function W(){return R}function pe(){return N}const ue={canScrollNext:L,canScrollPrev:_,containerNode:W,internalEngine:ge,destroy:k,off:h,on:p,emit:x,plugins:ee,previousScrollSnap:me,reInit:v,rootNode:Y,scrollNext:U,scrollPrev:C,scrollProgress:$,scrollSnapList:z,scrollTo:B,selectedScrollSnap:J,slideNodes:pe,slidesInView:Z,slidesNotInView:Q};return O(t,n),setTimeout(()=>c.emit("init"),0),ue}Ld.globalOptions=void 0;function jw(e={},t=[]){const n=f.useRef(e),a=f.useRef(t),[r,o]=f.useState(),[l,i]=f.useState(),c=f.useCallback(()=>{r&&r.reInit(n.current,a.current)},[r]);return f.useEffect(()=>{vw(n.current,e)||(n.current=e,c())},[e,c]),f.useEffect(()=>{MP(a.current,t)||(a.current=t,c())},[t,c]),f.useEffect(()=>{if(TP()&&l){Ld.globalOptions=jw.globalOptions;const u=Ld(l,n.current,a.current);return o(u),()=>u.destroy()}else o(void 0)},[l,o]),[i,r]}jw.globalOptions=void 0;const YC=f.createContext(null);function zd(){const e=f.useContext(YC);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}const c7=f.forwardRef(({orientation:e="horizontal",opts:t,setApi:n,plugins:a,className:r,children:o,...l},i)=>{const[c,u]=jw({...t,axis:e==="horizontal"?"x":"y"},a),[m,d]=f.useState(!1),[p,h]=f.useState(!1),x=f.useCallback(g=>{g&&(d(g.canScrollPrev()),h(g.canScrollNext()))},[]),v=f.useCallback(()=>{u==null||u.scrollPrev()},[u]),b=f.useCallback(()=>{u==null||u.scrollNext()},[u]),w=f.useCallback(g=>{g.key==="ArrowLeft"?(g.preventDefault(),v()):g.key==="ArrowRight"&&(g.preventDefault(),b())},[v,b]);return f.useEffect(()=>{!u||!n||n(u)},[u,n]),f.useEffect(()=>{if(u)return x(u),u.on("reInit",x),u.on("select",x),()=>{u==null||u.off("select",x)}},[u,x]),s.jsx(YC.Provider,{value:{carouselRef:c,api:u,opts:t,orientation:e||((t==null?void 0:t.axis)==="y"?"vertical":"horizontal"),scrollPrev:v,scrollNext:b,canScrollPrev:m,canScrollNext:p},children:s.jsx("div",{ref:i,onKeyDownCapture:w,className:I("tw:relative",r),role:"region","aria-roledescription":"carousel",...l,children:o})})});c7.displayName="Carousel";const u7=f.forwardRef(({className:e,...t},n)=>{const{carouselRef:a,orientation:r}=zd();return s.jsx("div",{ref:a,className:"tw:overflow-hidden",children:s.jsx("div",{ref:n,className:I("tw:flex",r==="horizontal"?"tw:-ml-4":"tw:-mt-4 tw:flex-col",e),...t})})});u7.displayName="CarouselContent";const d7=f.forwardRef(({className:e,...t},n)=>{const{orientation:a}=zd();return s.jsx("div",{ref:n,role:"group","aria-roledescription":"slide",className:I("tw:min-w-0 tw:shrink-0 tw:grow-0 tw:basis-full",a==="horizontal"?"tw:pl-4":"tw:pt-4",e),...t})});d7.displayName="CarouselItem";const f7=f.forwardRef(({className:e,variant:t="outline",size:n="icon",...a},r)=>{const{orientation:o,scrollPrev:l,canScrollPrev:i}=zd();return s.jsxs(hn,{ref:r,variant:t,size:n,className:I("tw:absolute tw:h-8 tw:w-8 tw:rounded-full",o==="horizontal"?"tw:-left-12 tw:top-1/2 tw:-translate-y-1/2":"tw:-top-12 tw:left-1/2 tw:-translate-x-1/2 tw:rotate-90",e),disabled:!i,onClick:l,...a,children:[s.jsx(DO,{className:"tw:h-4 tw:w-4"}),s.jsx("span",{className:"tw:sr-only",children:"Previous slide"})]})});f7.displayName="CarouselPrevious";const m7=f.forwardRef(({className:e,variant:t="outline",size:n="icon",...a},r)=>{const{orientation:o,scrollNext:l,canScrollNext:i}=zd();return s.jsxs(hn,{ref:r,variant:t,size:n,className:I("tw:absolute tw:h-8 tw:w-8 tw:rounded-full",o==="horizontal"?"tw:-right-12 tw:top-1/2 tw:-translate-y-1/2":"tw:-bottom-12 tw:left-1/2 tw:-translate-x-1/2 tw:rotate-90",e),disabled:!i,onClick:l,...a,children:[s.jsx(OO,{className:"tw:h-4 tw:w-4"}),s.jsx("span",{className:"tw:sr-only",children:"Next slide"})]})});m7.displayName="CarouselNext";const qC=f.createContext(null);function p7({children:e}){const[t,n]=f.useState({isOpen:!1,options:{message:""},resolve:null}),a=f.useCallback(d=>new Promise(p=>{n({isOpen:!0,options:d,resolve:p})}),[]),r=f.useCallback(()=>{var d;(d=t.resolve)==null||d.call(t,!0),n({isOpen:!1,options:{message:""},resolve:null})},[t.resolve]),o=f.useCallback(()=>{var d;(d=t.resolve)==null||d.call(t,!1),n({isOpen:!1,options:{message:""},resolve:null})},[t.resolve]),{title:l,message:i,confirmText:c,cancelText:u,variant:m}=t.options;return s.jsxs(qC.Provider,{value:{confirm:a},children:[e,s.jsx(B6,{open:t.isOpen,onOpenChange:d=>!d&&o(),children:s.jsxs(N2,{children:[s.jsxs(j2,{children:[s.jsx(E2,{children:l||"Confirm"}),s.jsx(A2,{children:i})]}),s.jsxs(C2,{children:[s.jsx(_2,{onClick:o,children:u||"Cancel"}),s.jsx(R2,{onClick:r,className:I((m==="danger"||m==="warning")&&"tw:bg-red-600 tw:hover:bg-red-700"),children:c||"Confirm"})]})]})})]})}function Pd(){const e=f.useContext(qC);if(!e)throw new Error("useConfirm must be used within a ConfirmProvider");return e}async function KC(e,t={},n=!1){const a=window.psfaAdmin,r=window.psfaAjax;if(n&&!a)return{success:!1,message:"PSFA admin config not found"};if(!n&&!r)return{success:!1,message:"PSFA ajax config not found"};const o=n?a.ajaxUrl:r.ajaxurl,l=n?a.nonce:r.nonce,i=new FormData;i.append("action",e),i.append("nonce",l),Object.entries(t).forEach(([c,u])=>{u!=null&&i.append(c,String(u))});try{const c=await fetch(o,{method:"POST",body:i,credentials:"same-origin"});return c.ok?await c.json():{success:!1,message:`HTTP error: ${c.status}`}}catch(c){return{success:!1,message:c instanceof Error?c.message:"Unknown error"}}}function h7(e){const[t,n]=f.useState(e),[a,r]=f.useState(!1),[o,l]=f.useState(!1),i=f.useCallback(m=>{n(d=>({...d,...m}))},[]),c=f.useCallback(async()=>{r(!0);try{const m=await KC("psfa_save_credentials",{auth_type:t.authType,access_key:t.accessKey,secret_key:t.secretKey,associate_tag:t.associateTag,oauth_client_id:t.oauthClientId,oauth_client_secret:t.oauthClientSecret,oauth_credential_version:t.oauthCredentialVersion,oauth_auth_region:t.oauthAuthRegion,marketplace:t.marketplace},!0);return m.success&&typeof window.psfaAdmin<"u"&&(window.psfaAdmin.settings={...window.psfaAdmin.settings,authType:t.authType,accessKey:t.accessKey,secretKey:t.secretKey,associateTag:t.associateTag,oauthClientId:t.oauthClientId,oauthClientSecret:t.oauthClientSecret,oauthCredentialVersion:t.oauthCredentialVersion,oauthAuthRegion:t.oauthAuthRegion,marketplace:t.marketplace}),{success:m.success,message:m.message||(m.success?"Settings saved successfully":"Failed to save settings")}}catch(m){return{success:!1,message:m instanceof Error?m.message:"Unknown error"}}finally{r(!1)}},[t]),u=f.useCallback(async()=>{var m;l(!0);try{const d=t.authType==="oauth"?{auth_type:"oauth",client_id:t.oauthClientId,client_secret:t.oauthClientSecret,credential_version:t.oauthCredentialVersion,auth_region:t.oauthAuthRegion,marketplace:t.marketplace,associate_tag:t.associateTag}:{auth_type:"awssig4",access_key:t.accessKey,secret_key:t.secretKey,associate_tag:t.associateTag},p=await KC("psfa_test_connection",d,!0);return{success:p.success,message:((m=p.data)==null?void 0:m.message)||p.message||"Connection test completed"}}catch(d){return{success:!1,message:d instanceof Error?d.message:"Connection error"}}finally{l(!1)}},[t]);return{settings:t,updateSettings:i,saveSettings:c,testConnection:u,isSaving:a,isTesting:o}}const w7=[{value:"us-east-1",label:"us-east-1 (US)"},{value:"us-west-2",label:"us-west-2"},{value:"eu-west-1",label:"eu-west-1 (Europe)"},{value:"ap-northeast-1",label:"ap-northeast-1 (Japan)"}],g7=[{value:"www.amazon.com",label:"www.amazon.com (US)"},{value:"www.amazon.co.uk",label:"www.amazon.co.uk (UK)"},{value:"www.amazon.de",label:"www.amazon.de (Germany)"},{value:"www.amazon.fr",label:"www.amazon.fr (France)"},{value:"www.amazon.ca",label:"www.amazon.ca (Canada)"},{value:"www.amazon.co.jp",label:"www.amazon.co.jp (Japan)"}];function v7(){const e=window.psfaAdmin,t=e==null?void 0:e.settings;return{authType:(t==null?void 0:t.authType)||"oauth",accessKey:(t==null?void 0:t.accessKey)||"",secretKey:(t==null?void 0:t.secretKey)||"",associateTag:(t==null?void 0:t.associateTag)||"",oauthClientId:(t==null?void 0:t.oauthClientId)||"",oauthClientSecret:(t==null?void 0:t.oauthClientSecret)||"",oauthCredentialVersion:(t==null?void 0:t.oauthCredentialVersion)||"",oauthAuthRegion:(t==null?void 0:t.oauthAuthRegion)||"us-east-1",marketplace:(t==null?void 0:t.marketplace)||"www.amazon.com"}}function XC(){const{settings:e,updateSettings:t,saveSettings:n,testConnection:a,isSaving:r,isTesting:o}=h7(v7()),[l,i]=f.useState(null),[c,u]=f.useState(new Set),m=e.authType==="oauth"?!!(e.oauthClientId&&e.oauthClientSecret):!!(e.accessKey&&e.secretKey),d=()=>{const v=new Map;return e.authType==="oauth"?(e.oauthClientId.trim()||v.set("oauthClientId","Credential ID"),e.oauthClientSecret.trim()||v.set("oauthClientSecret","Credential Secret"),e.oauthCredentialVersion.trim()||v.set("oauthCredentialVersion","Credential Version")):(e.accessKey.trim()||v.set("accessKey","Access Key ID"),e.secretKey.trim()||v.set("secretKey","Secret Access Key")),e.associateTag.trim()||v.set("associateTag","Associate Tag"),u(new Set(v.keys())),v},p=(v,b)=>{t({[v]:b}),c.has(v)&&u(w=>{const g=new Set(w);return g.delete(v),g})},h=async()=>{const v=d();if(v.size>0){Re.error(`Please fill in: ${[...v.values()].join(", ")}`);return}const b=await n();b.success?Re.success("Credentials saved successfully!"):Re.error(b.message||"Failed to save credentials")},x=async()=>{const v=d();if(v.size>0){Re.error(`Please fill in: ${[...v.values()].join(", ")}`);return}i(null);const b=await a();i(b)};return s.jsxs("div",{className:"tw:space-y-6",children:[!m&&s.jsx(Fe,{className:"tw:bg-gradient-to-r tw:from-blue-50 tw:to-indigo-50 tw:border-blue-200",children:s.jsx(Ge,{className:"tw:p-6",children:s.jsxs("div",{className:"tw:flex tw:flex-col tw:lg:flex-row tw:lg:justify-between tw:gap-6",children:[s.jsxs("div",{className:"tw:lg:w-1/2 tw:flex tw:flex-col tw:justify-center",children:[s.jsxs("div",{className:"tw:flex tw:items-center tw:gap-3 tw:mb-3",children:[s.jsx("div",{className:"tw:shrink-0 tw:w-10 tw:h-10 tw:bg-blue-100 tw:rounded-full tw:flex tw:items-center tw:justify-center",children:s.jsx("span",{className:"tw:text-xl",children:"👋"})}),s.jsx("h2",{className:"tw:text-lg tw:font-semibold tw:text-gray-900 tw:m-0",children:"Welcome!"})]}),s.jsx("p",{className:"tw:text-gray-600 tw:mb-4 tw:text-sm",children:"Get started in just a few minutes. Watch this quick setup guide to configure your API credentials and start earning with Amazon affiliate links."}),s.jsxs("div",{className:"tw:flex tw:flex-col tw:gap-2",children:[s.jsxs("a",{href:"https://affiliate-program.amazon.com/creatorsapi",target:"_blank",rel:"noopener noreferrer",className:"tw:inline-flex tw:items-center tw:justify-between tw:px-4 tw:py-2.5 tw:bg-blue-50 tw:border tw:border-white tw:shadow-xs tw:rounded-lg tw:text-sm tw:font-medium tw:text-gray-700 tw:hover:border-blue-200 tw:no-underline tw:transition-colors",children:[s.jsxs("span",{className:"tw:inline-flex tw:items-center tw:gap-2",children:[s.jsx(QC,{}),"Get Creators API Credentials"]}),s.jsx("span",{className:"tw:px-2 tw:py-0.5 tw:text-[10px] tw:font-semibold tw:bg-green-100 tw:text-green-700 tw:rounded-full tw:uppercase",children:"Recommended"})]}),s.jsxs("a",{href:"https://affiliate-program.amazon.com/assoc_credentials/home",target:"_blank",rel:"noopener noreferrer",className:"tw:inline-flex tw:items-center tw:gap-2 tw:px-4 tw:py-2.5 tw:bg-blue-50 tw:border tw:border-white tw:shadow-xs tw:rounded-lg tw:text-sm tw:font-medium tw:text-gray-700 tw:hover:border-blue-200 tw:no-underline tw:transition-colors",children:[s.jsx(QC,{}),"Get PA-API Credentials"]})]})]}),s.jsx("div",{className:"tw:lg:w-2/5",children:s.jsx(b7,{videoId:"y2XQCBLj1Sk",title:"Setup Guide"})})]})})}),s.jsxs("div",{className:"tw:flex tw:flex-col tw:lg:flex-row tw:gap-6 tw:items-start",children:[s.jsxs("div",{className:"tw:lg:w-1/2 tw:space-y-4",children:[s.jsxs(Fe,{children:[s.jsxs(Ni,{className:"tw:border-b tw:border-gray-200",children:[s.jsxs(ji,{className:"tw:flex tw:items-center tw:gap-2",children:[s.jsx(y7,{}),"Amazon API Credentials"]}),s.jsx("p",{className:"tw:mt-1 tw:text-sm tw:text-gray-500 tw:m-0",children:"Choose your authentication method and enter your credentials."})]}),s.jsxs(Ge,{className:"tw:space-y-5 tw:pt-5",children:[s.jsxs("div",{className:"tw:space-y-3",children:[s.jsx("label",{className:"tw:block tw:text-sm tw:font-medium tw:text-gray-700",children:"Authentication Method"}),s.jsxs("div",{className:"tw:space-y-2",children:[s.jsx(ZC,{value:"oauth",label:"OAuth 2.0 (Creators API)",description:"New authentication method with Creators API.",recommended:!0,selected:e.authType==="oauth",onChange:()=>t({authType:"oauth"})}),s.jsx(ZC,{value:"awssig4",label:"AWS Signature V4 (Legacy PA-API)",description:"Traditional authentication using Access Key ID and Secret Key.",selected:e.authType==="awssig4",onChange:()=>t({authType:"awssig4"})})]})]}),e.authType==="oauth"&&s.jsxs("div",{className:"tw:space-y-4 tw:pt-2 tw:border-t tw:border-gray-100",children:[s.jsxs("div",{className:"tw:max-w-md",children:[s.jsx(Je,{className:"tw:mb-1.5 tw:block",children:"Credential ID"}),s.jsx(ut,{value:e.oauthClientId,onChange:v=>p("oauthClientId",v.target.value),placeholder:"Your credential_id from Creators API",autoComplete:"off","aria-invalid":c.has("oauthClientId")})]}),s.jsxs("div",{className:"tw:max-w-md",children:[s.jsx(Je,{className:"tw:mb-1.5 tw:block",children:"Credential Secret"}),s.jsx(ut,{type:"password",value:e.oauthClientSecret,onChange:v=>p("oauthClientSecret",v.target.value),placeholder:"Your credential_secret",autoComplete:"new-password","aria-invalid":c.has("oauthClientSecret")})]}),s.jsxs("div",{className:"tw:grid tw:grid-cols-2 tw:gap-4",children:[s.jsxs("div",{children:[s.jsx(Je,{className:"tw:mb-1.5 tw:block",children:"Credential Version"}),s.jsx(ut,{value:e.oauthCredentialVersion,onChange:v=>p("oauthCredentialVersion",v.target.value),placeholder:"e.g., 2.1",autoComplete:"off","aria-invalid":c.has("oauthCredentialVersion")})]}),s.jsxs("div",{children:[s.jsx(Je,{className:"tw:mb-1.5 tw:block",children:"Auth Region"}),s.jsxs(Yn,{value:e.oauthAuthRegion,onValueChange:v=>t({oauthAuthRegion:v}),children:[s.jsx(Dn,{children:s.jsx(qn,{})}),s.jsx(On,{children:w7.map(v=>s.jsx(kn,{value:v.value,children:v.label},v.value))})]})]})]}),s.jsxs("div",{className:"tw:max-w-md",children:[s.jsx(Je,{className:"tw:mb-1.5 tw:block",children:"Marketplace"}),s.jsxs(Yn,{value:e.marketplace,onValueChange:v=>t({marketplace:v}),children:[s.jsx(Dn,{children:s.jsx(qn,{})}),s.jsx(On,{children:g7.map(v=>s.jsx(kn,{value:v.value,children:v.label},v.value))})]})]})]}),e.authType==="awssig4"&&s.jsxs("div",{className:"tw:space-y-4 tw:pt-2 tw:border-t tw:border-gray-100",children:[s.jsxs("div",{className:"tw:max-w-md",children:[s.jsx(Je,{className:"tw:mb-1.5 tw:block",children:"Access Key ID"}),s.jsx(ut,{value:e.accessKey,onChange:v=>p("accessKey",v.target.value),placeholder:"Enter your Access Key ID",autoComplete:"off","aria-invalid":c.has("accessKey")})]}),s.jsxs("div",{className:"tw:max-w-md",children:[s.jsx(Je,{className:"tw:mb-1.5 tw:block",children:"Secret Access Key"}),s.jsx(ut,{type:"password",value:e.secretKey,onChange:v=>p("secretKey",v.target.value),placeholder:"Enter your Secret Access Key",autoComplete:"new-password","aria-invalid":c.has("secretKey")})]})]}),s.jsxs("div",{className:"tw:max-w-md",children:[s.jsx(Je,{className:"tw:mb-1.5 tw:block",children:"Associate Tag"}),s.jsx(ut,{value:e.associateTag,onChange:v=>p("associateTag",v.target.value),placeholder:"your-associate-tag",autoComplete:"off","aria-invalid":c.has("associateTag")})]}),l&&s.jsx(HS,{variant:l.success?"success":"destructive",children:l.message})]})]}),s.jsxs("div",{className:"tw:flex tw:gap-3",children:[s.jsx(hn,{onClick:h,disabled:r,children:r?"Saving...":"Save Credentials"}),s.jsx(hn,{variant:"outline",onClick:x,disabled:o,children:o?"Testing...":"Test Connection"})]})]}),s.jsxs(Fe,{className:"tw:lg:w-1/2",children:[s.jsx(Ni,{className:"tw:border-b tw:border-gray-200",children:s.jsxs(ji,{className:"tw:flex tw:items-center tw:gap-2",children:[s.jsx(x7,{}),"How to Get API Credentials"]})}),s.jsxs(Ge,{className:"tw:space-y-5 tw:pt-5",children:[s.jsx(WC,{title:"Creators API (OAuth 2.0)",recommended:!0,steps:[{text:"Join Amazon Associates",link:"https://affiliate-program.amazon.com/"},{text:"Go to Creators API Registration",link:"https://affiliate-program.amazon.com/creatorsapi/docs/en-us/onboarding/register-for-creators-api"},{text:'Click "Register for Creators API"'},{text:"Copy your Credential ID, Secret, and Version"}],note:"Approval is typically instant. Credentials are shown only once – save them securely!"}),s.jsx("hr",{className:"tw:border-gray-200"}),s.jsx(WC,{title:"Legacy PA-API (AWS Signature V4)",steps:[{text:"Join Amazon Associates",link:"https://affiliate-program.amazon.com/"},{text:"Go to PA-API Credentials",link:"https://affiliate-program.amazon.com/assoc_credentials/home"},{text:'Click "Add Credentials" or "Manage Credentials"'},{text:"Copy your Access Key ID and Secret Access Key"}],note:"Requirements: 3 qualifying sales in the last 30 days to get API access."})]})]})]})]})}function ZC({value:e,label:t,description:n,recommended:a,selected:r,onChange:o}){return s.jsxs("label",{className:I("tw:flex tw:items-start tw:gap-3 tw:p-3 tw:border tw:rounded-lg tw:cursor-pointer tw:transition-colors",r?"tw:border-brand-primary tw:bg-blue-50":"tw:border-gray-200 tw:hover:border-gray-300"),children:[s.jsx("input",{type:"radio",name:"authType",value:e,checked:r,onChange:o,className:"tw:mt-0.5"}),s.jsxs("div",{children:[s.jsx("span",{className:"tw:text-sm tw:font-medium tw:text-gray-900",children:t}),a&&s.jsx("span",{className:"tw:ml-2 tw:px-2 tw:py-0.5 tw:text-xs tw:font-medium tw:bg-green-100 tw:text-green-700 tw:rounded",children:"RECOMMENDED"}),s.jsx("p",{className:"tw:text-xs tw:text-gray-500 tw:mt-0.5 tw:mb-0",children:n})]})]})}function WC({title:e,recommended:t,steps:n,note:a}){return s.jsxs("div",{children:[s.jsxs("h4",{className:"tw:flex tw:items-center tw:gap-2 tw:text-sm tw:font-semibold tw:text-gray-900 tw:m-0 tw:mb-2",children:[e,t&&s.jsx("span",{className:"tw:px-2 tw:py-0.5 tw:text-xs tw:font-medium tw:bg-green-100 tw:text-green-700 tw:rounded",children:"RECOMMENDED"})]}),s.jsx("ol",{className:"tw:list-decimal tw:pl-5 tw:space-y-1.5 tw:text-sm tw:text-gray-600 tw:m-0",children:n.map((r,o)=>s.jsx("li",{children:r.link?s.jsx("a",{href:r.link,target:"_blank",rel:"noopener noreferrer",className:"tw:text-brand-primary tw:hover:underline",children:r.text}):r.text},o))}),a&&s.jsxs("p",{className:"tw:text-xs tw:text-gray-500 tw:mt-2 tw:mb-0",children:[s.jsx("strong",{children:"Note:"})," ",a]})]})}function y7(){return s.jsx("svg",{className:"tw:w-5 tw:h-5 tw:text-brand-primary",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1121 9z"})})}function x7(){return s.jsx("svg",{className:"tw:w-5 tw:h-5 tw:text-brand-primary",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.663 17h4.673M12 3v1m6.364 1.636l-.707.707M21 12h-1M4 12H3m3.343-5.657l-.707-.707m2.828 9.9a5 5 0 117.072 0l-.548.547A3.374 3.374 0 0014 18.469V19a2 2 0 11-4 0v-.531c0-.895-.356-1.754-.988-2.386l-.548-.547z"})})}function QC(){return s.jsx("svg",{className:"tw:w-4 tw:h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})})}function b7({videoId:e,title:t}){const[n,a]=f.useState(!1);return s.jsx("div",{className:I("tw:relative tw:w-full tw:rounded-lg tw:overflow-hidden tw:shadow-md tw:cursor-pointer tw:group tw:aspect-video tw:bg-gradient-to-br tw:from-[#1e3a5f] tw:to-[#2d5a87]",n&&"tw:cursor-default"),onClick:()=>!n&&a(!0),children:n?s.jsx("iframe",{src:`https://www.youtube.com/embed/${e}?autoplay=1&rel=0`,title:t,allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0,className:"tw:absolute tw:top-0 tw:left-0 tw:w-full tw:h-full tw:rounded-lg tw:border-0"}):s.jsxs(s.Fragment,{children:[s.jsx("img",{src:`https://img.youtube.com/vi/${e}/maxresdefault.jpg`,alt:t,className:"tw:absolute tw:top-0 tw:left-0 tw:w-full tw:h-full tw:object-cover",onError:r=>{r.target.src=`https://img.youtube.com/vi/${e}/hqdefault.jpg`}}),s.jsx("div",{className:"tw:absolute tw:inset-0 tw:bg-black/30 hover:tw:bg-black/40 tw:transition-all"}),s.jsx("div",{className:"tw:absolute tw:inset-0 tw:flex tw:items-center tw:justify-center",children:s.jsx("div",{className:"tw:w-16 tw:h-16 tw:bg-blue-600 tw:rounded-full tw:flex tw:items-center tw:justify-center tw:shadow-lg tw:group-hover:scale-110 tw:transition-transform",children:s.jsx("svg",{className:"tw:w-6 tw:h-6 tw:text-white tw:ml-1",fill:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{d:"M8 5v14l11-7z"})})})})]})})}const S7="PVzVfGEL8dA",JC=[{value:"",label:"-- Default (All) --"},{value:"Electronics",label:"Electronics"},{value:"Books",label:"Books"},{value:"Fashion",label:"Fashion"},{value:"ToysAndGames",label:"Toys & Games"},{value:"HomeAndGarden",label:"Home & Garden"}],N7=[{value:"OfficeProducts",label:"Office Products"},{value:"VideoGames",label:"Video Games"},{value:"MusicalInstruments",label:"Musical Instruments"},{value:"Automotive",label:"Automotive"},{value:"Baby",label:"Baby"},{value:"Beauty",label:"Beauty"},{value:"Computers",label:"Computers"},{value:"HealthPersonalCare",label:"Health & Personal Care"},{value:"KindleStore",label:"Kindle Store"},{value:"MoviesAndTV",label:"Movies & TV"},{value:"Music",label:"Music"},{value:"PetSupplies",label:"Pet Supplies"},{value:"Software",label:"Software"},{value:"SportsAndOutdoors",label:"Sports & Outdoors"},{value:"ToolsAndHomeImprovement",label:"Tools & Home Improvement"}],j7=[{value:"",label:"-- Default --"},{value:"Relevance",label:"Relevance"},{value:"Price:LowToHigh",label:"Price: Low to High"},{value:"Price:HighToLow",label:"Price: High to Low"},{value:"NewestArrivals",label:"Newest Arrivals"},{value:"AvgCustomerReviews",label:"Customer Reviews"},{value:"Featured",label:"Featured"}],C7=[{value:"",label:"-- Default (infinite) --"},{value:"infinite",label:"Infinite Scroll"},{value:"button",label:"Load More Button"},{value:"none",label:"No Pagination"}];function E7(){var m,d;const e=((m=window.psfaAdmin)==null?void 0:m.isPremium)??!1,t=((d=window.psfaAdmin)==null?void 0:d.upgradeUrl)??"https://paapiplugin.com/pricing/#plans",[n,a]=f.useState({query:"",category:"",brand:"",sort:"",pagination:"",count:20,hideSearch:!1,hideFilters:!1,hideCategoryBanner:!1,autoDetect:!0}),[r,o]=f.useState(!1),l=f.useMemo(()=>e?[...JC,...N7]:JC,[e]),i=f.useCallback(p=>{a(h=>({...h,...p}))},[]),c=f.useMemo(()=>{const p=[];return n.query.trim()&&p.push(`query="${n.query.trim()}"`),n.category&&p.push(`category="${n.category}"`),n.brand.trim()&&p.push(`brand="${n.brand.trim()}"`),n.sort&&p.push(`sort="${n.sort}"`),n.pagination&&p.push(`pagination="${n.pagination}"`),n.pagination==="none"&&n.count!==20&&p.push(`count="${n.count}"`),n.hideSearch&&p.push('hide_search="true"'),n.hideFilters&&p.push('hide_filters="true"'),n.hideCategoryBanner&&p.push('hide_category_banner="true"'),n.autoDetect||p.push('auto_detect="no"'),p.length>0?`[psfa_search ${p.join(" ")}]`:"[psfa_search]"},[n]),u=f.useCallback(async()=>{try{await navigator.clipboard.writeText(c),o(!0),setTimeout(()=>o(!1),2e3)}catch{const p=document.createElement("textarea");p.value=c,document.body.appendChild(p),p.select(),document.execCommand("copy"),document.body.removeChild(p),o(!0),setTimeout(()=>o(!1),2e3)}},[c]);return s.jsxs("div",{className:"tw:space-y-6",children:[s.jsx(Fe,{className:"tw:bg-gradient-to-r tw:from-blue-50 tw:to-indigo-50 tw:border-blue-200",children:s.jsx(Ge,{className:"tw:p-6",children:s.jsxs("div",{className:"tw:flex tw:flex-col tw:lg:flex-row tw:lg:justify-between tw:gap-6",children:[s.jsxs("div",{className:"tw:lg:w-1/2 tw:flex tw:flex-col tw:justify-center",children:[s.jsxs("div",{className:"tw:flex tw:items-center tw:gap-3 tw:mb-3",children:[s.jsx("div",{className:"tw:shrink-0 tw:w-10 tw:h-10 tw:bg-blue-100 tw:rounded-full tw:flex tw:items-center tw:justify-center",children:s.jsx("span",{className:"tw:text-xl",children:"🎬"})}),s.jsx("h2",{className:"tw:text-lg tw:font-semibold tw:text-gray-900 tw:m-0",children:"Shortcode Recipes"})]}),s.jsx("p",{className:"tw:text-gray-600 tw:mb-4 tw:text-sm",children:"Learn how to build different search experiences using the Shortcode Builder. Create focused product pages, category showcases, sorted results, and minimal embeds - all without writing code."}),s.jsxs("ul",{className:"tw:text-sm tw:text-gray-600 tw:m-0 tw:p-0 tw:list-none tw:space-y-1",children:[s.jsxs("li",{className:"tw:flex tw:items-center tw:gap-2",children:[s.jsx("span",{className:"tw:text-green-500",children:"✓"})," Full storefronts"]}),s.jsxs("li",{className:"tw:flex tw:items-center tw:gap-2",children:[s.jsx("span",{className:"tw:text-green-500",children:"✓"})," Focused product pages"]}),s.jsxs("li",{className:"tw:flex tw:items-center tw:gap-2",children:[s.jsx("span",{className:"tw:text-green-500",children:"✓"})," Category showcases"]}),s.jsxs("li",{className:"tw:flex tw:items-center tw:gap-2",children:[s.jsx("span",{className:"tw:text-green-500",children:"✓"})," Sorted & minimal embeds"]})]})]}),s.jsx("div",{className:"tw:lg:w-2/5",children:s.jsx(_7,{videoId:S7,title:"Shortcode Recipes"})})]})})}),s.jsxs("div",{className:"tw:grid tw:grid-cols-1 tw:lg:grid-cols-2 tw:gap-4",children:[s.jsx(Fe,{children:s.jsxs(Ge,{className:"tw:p-5",children:[s.jsxs("div",{className:"tw:flex tw:items-center tw:gap-2 tw:mb-4",children:[s.jsx("h3",{className:"tw:text-sm tw:font-semibold tw:text-gray-900 tw:m-0",children:"Search & Content"}),s.jsx("span",{className:"tw:px-2 tw:py-0.5 tw:text-xs tw:font-medium tw:border tw:border-gray-300 tw:bg-gray-100 tw:text-gray-600 tw:rounded",children:"Free"})]}),s.jsx("p",{className:"tw:text-sm tw:text-gray-500 tw:m-0 tw:mb-4",children:"Configure default search query and category."}),s.jsxs("div",{className:"tw:space-y-4",children:[s.jsxs("div",{children:[s.jsx(Je,{className:"tw:mb-1.5 tw:block",children:"Default Query"}),s.jsx(ut,{value:n.query,onChange:p=>i({query:p.target.value}),placeholder:"e.g., laptop, headphones"})]}),s.jsxs("div",{children:[s.jsx(Je,{className:"tw:mb-1.5 tw:block",children:"Category"}),s.jsxs(Yn,{value:n.category,onValueChange:p=>i({category:p}),children:[s.jsx(Dn,{children:s.jsx(qn,{placeholder:"-- Default (All) --"})}),s.jsx(On,{children:l.map(p=>s.jsx(kn,{value:p.value||"_default_",children:p.label},p.value))})]}),!e&&s.jsxs("p",{className:"tw:text-xs tw:text-gray-500 tw:m-0 tw:mt-2",children:[s.jsx("a",{href:t,target:"_blank",rel:"noopener noreferrer",className:"tw:text-brand-primary tw:no-underline tw:hover:opacity-80",children:"Upgrade to Premium"})," to access all 26 categories."]})]}),s.jsxs("div",{children:[s.jsx(Je,{className:"tw:mb-1.5 tw:block",children:"Brand"}),s.jsx(ut,{value:n.brand,onChange:p=>i({brand:p.target.value}),placeholder:"e.g., Apple, Samsung"})]}),s.jsxs("div",{children:[s.jsx(Je,{className:"tw:mb-1.5 tw:block",children:"Sort By"}),s.jsxs(Yn,{value:n.sort,onValueChange:p=>i({sort:p}),children:[s.jsx(Dn,{children:s.jsx(qn,{placeholder:"-- Default --"})}),s.jsx(On,{children:j7.map(p=>s.jsx(kn,{value:p.value||"_default_",children:p.label},p.value))})]})]})]})]})}),s.jsx(Fe,{children:s.jsxs(Ge,{className:"tw:p-5",children:[s.jsxs("div",{className:"tw:flex tw:items-center tw:gap-2 tw:mb-4",children:[s.jsx("h3",{className:"tw:text-sm tw:font-semibold tw:text-gray-900 tw:m-0",children:"Display Options"}),s.jsx("span",{className:"tw:px-2 tw:py-0.5 tw:text-xs tw:font-medium tw:border tw:border-gray-300 tw:bg-gray-100 tw:text-gray-600 tw:rounded",children:"Free"})]}),s.jsx("p",{className:"tw:text-sm tw:text-gray-500 tw:m-0 tw:mb-4",children:"Control visibility and pagination behavior."}),s.jsxs("div",{className:"tw:space-y-4",children:[s.jsxs("div",{children:[s.jsx(Je,{className:"tw:mb-1.5 tw:block",children:"Pagination"}),s.jsxs(Yn,{value:n.pagination,onValueChange:p=>i({pagination:p==="_default_"?"":p}),children:[s.jsx(Dn,{children:s.jsx(qn,{placeholder:"-- Default (infinite) --"})}),s.jsx(On,{children:C7.map(p=>s.jsx(kn,{value:p.value||"_default_",children:p.label},p.value))})]})]}),s.jsxs("div",{children:[s.jsxs("div",{className:"tw:flex tw:items-center tw:justify-between tw:mb-2",children:[s.jsx(Je,{children:"Product Count"}),s.jsx("span",{className:"tw:text-sm tw:font-medium tw:text-gray-700",children:n.count})]}),s.jsx(gC,{min:2,max:20,step:1,value:[n.count],onValueChange:([p])=>i({count:p}),disabled:n.pagination!=="none",className:"tw:w-full"}),s.jsx("p",{className:"tw:text-xs tw:text-gray-500 tw:mt-1 tw:m-0",children:n.pagination==="none"?"Set the exact number of products to display":"Enable 'No Pagination' to use this setting"})]}),s.jsxs("div",{children:[s.jsx("label",{className:"tw:block tw:text-sm tw:font-medium tw:text-gray-700 tw:mb-3",children:"Visibility"}),s.jsxs("div",{className:"tw:space-y-3",children:[s.jsxs("div",{className:"tw:flex tw:items-center tw:justify-between",children:[s.jsx(Je,{htmlFor:"hide-search",className:"tw:text-sm tw:text-gray-700",children:"Hide Search Box"}),s.jsx(Or,{id:"hide-search",checked:n.hideSearch,onCheckedChange:p=>i({hideSearch:p})})]}),s.jsxs("div",{className:"tw:flex tw:items-center tw:justify-between",children:[s.jsx(Je,{htmlFor:"hide-filters",className:"tw:text-sm tw:text-gray-700",children:"Hide Filters"}),s.jsx(Or,{id:"hide-filters",checked:n.hideFilters,onCheckedChange:p=>i({hideFilters:p})})]}),s.jsxs("div",{className:"tw:flex tw:items-center tw:justify-between",children:[s.jsx(Je,{htmlFor:"hide-category-banner",className:"tw:text-sm tw:text-gray-700",children:"Hide Category Banner"}),s.jsx(Or,{id:"hide-category-banner",checked:n.hideCategoryBanner,onCheckedChange:p=>i({hideCategoryBanner:p})})]}),s.jsxs("div",{className:"tw:flex tw:items-center tw:justify-between",children:[s.jsx(Je,{htmlFor:"auto-detect",className:"tw:text-sm tw:text-gray-700",children:"Auto-detect Category"}),s.jsx(Or,{id:"auto-detect",checked:n.autoDetect,onCheckedChange:p=>i({autoDetect:p})})]})]})]})]})]})})]}),s.jsx(Fe,{children:s.jsxs(Ge,{className:"tw:p-5",children:[s.jsx("div",{className:"tw:flex tw:items-center tw:gap-2 tw:mb-4",children:s.jsx("h3",{className:"tw:text-sm tw:font-semibold tw:text-gray-900 tw:m-0",children:"Generated Shortcode"})}),s.jsx("p",{className:"tw:text-sm tw:text-gray-500 tw:m-0 tw:mb-4",children:"Copy this shortcode and paste it into any page or post."}),s.jsxs("div",{className:"tw:flex tw:gap-3 tw:items-center",children:[s.jsx("code",{className:"tw:flex-1 tw:px-4 tw:py-3 tw:bg-gray-50 tw:border tw:border-gray-200 tw:rounded-lg tw:text-sm tw:font-mono tw:text-gray-800 tw:break-all",children:c}),s.jsxs(hn,{onClick:u,className:"tw:flex tw:items-center tw:gap-2",children:[s.jsx(A7,{}),r?"Copied!":"Copy"]})]}),r&&s.jsx("p",{className:"tw:text-sm tw:text-green-600 tw:m-0 tw:mt-2",children:"Copied to clipboard!"})]})}),s.jsx(Fe,{className:"tw:bg-amber-50 tw:border-amber-200",children:s.jsxs(Ge,{className:"tw:p-5",children:[s.jsxs("div",{className:"tw:flex tw:items-center tw:gap-2 tw:mb-4",children:[s.jsx(R7,{className:"tw:text-amber-600"}),s.jsx("h3",{className:"tw:text-sm tw:font-semibold tw:text-amber-900 tw:m-0",children:"Usage Examples"})]}),s.jsxs("div",{className:"tw:grid tw:grid-cols-1 tw:md:grid-cols-2 tw:gap-4",children:[s.jsx(Bd,{title:"Basic:",code:"[psfa_search]"}),s.jsx(Bd,{title:"Pre-filled search:",code:'[psfa_search query="wireless headphones"]'}),s.jsx(Bd,{title:"Category page:",code:'[psfa_search category="Electronics" hide_search="true"]'}),s.jsx(Bd,{title:"Product listing:",code:'[psfa_search query="iphone" hide_search="true" hide_filters="true"]'})]})]})})]})}function Bd({title:e,code:t}){return s.jsxs("div",{children:[s.jsx("p",{className:"tw:text-sm tw:font-medium tw:text-amber-800 tw:m-0 tw:mb-1",children:e}),s.jsx("code",{className:"tw:text-xs tw:text-amber-700 tw:bg-amber-100 tw:px-2 tw:py-1 tw:rounded",children:t})]})}function A7(){return s.jsx("svg",{className:"tw:w-4 tw:h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"})})}function R7({className:e}){return s.jsx("svg",{className:I("tw:w-5 tw:h-5",e),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.663 17h4.673M12 3v1m6.364 1.636l-.707.707M21 12h-1M4 12H3m3.343-5.657l-.707-.707m2.828 9.9a5 5 0 117.072 0l-.548.547A3.374 3.374 0 0014 18.469V19a2 2 0 11-4 0v-.531c0-.895-.356-1.754-.988-2.386l-.548-.547z"})})}function _7({videoId:e,title:t}){const[n,a]=f.useState(!1);return s.jsx("div",{className:I("tw:relative tw:w-full tw:rounded-lg tw:overflow-hidden tw:shadow-md tw:cursor-pointer tw:group tw:aspect-video tw:bg-gradient-to-br tw:from-[#1e3a5f] tw:to-[#2d5a87]",n&&"tw:cursor-default"),onClick:()=>!n&&a(!0),children:n?s.jsx("iframe",{src:`https://www.youtube.com/embed/${e}?autoplay=1&rel=0`,title:t,allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0,className:"tw:absolute tw:top-0 tw:left-0 tw:w-full tw:h-full tw:rounded-lg tw:border-0"}):s.jsxs(s.Fragment,{children:[s.jsx("img",{src:`https://img.youtube.com/vi/${e}/maxresdefault.jpg`,alt:t,className:"tw:absolute tw:top-0 tw:left-0 tw:w-full tw:h-full tw:object-cover",onError:r=>{r.target.src=`https://img.youtube.com/vi/${e}/hqdefault.jpg`}}),s.jsx("div",{className:"tw:absolute tw:inset-0 tw:bg-black/30 hover:tw:bg-black/40 tw:transition-all"}),s.jsx("div",{className:"tw:absolute tw:inset-0 tw:flex tw:items-center tw:justify-center",children:s.jsx("div",{className:"tw:w-16 tw:h-16 tw:bg-blue-600 tw:rounded-full tw:flex tw:items-center tw:justify-center tw:shadow-lg tw:group-hover:scale-110 tw:transition-transform",children:s.jsx("svg",{className:"tw:w-6 tw:h-6 tw:text-white tw:ml-1",fill:"currentColor",viewBox:"0 0 24 24",children:s.jsx("path",{d:"M8 5v14l11-7z"})})})})]})})}const T7=[{key:"brand",label:"Brand"},{key:"price",label:"Price Range"},{key:"sort",label:"Sort By"},{key:"condition",label:"Condition"},{key:"merchant",label:"Merchant"},{key:"availability",label:"Availability"}],M7=[{key:"has_deal",label:"Has Deal"},{key:"deals",label:"Discounts"}],D7=[{key:"deal_badge",label:"Deal Badges",info:"Show Lightning Deal, Best Deal, and other Amazon deal badges"},{key:"prime_exclusive",label:"Prime Exclusive Deals",info:"Show Prime Exclusive Deal indicator badge"},{key:"low_stock",label:"Low Stock Warning",info:"Show animated 'Low Stock' warning when inventory is scarce"},{key:"deal_countdown",label:"Deal Countdown",info:"Show countdown timer for time-limited deals"}];function O7(){const e=typeof psfaAdmin<"u"?psfaAdmin.isPremium:!1,t=typeof psfaAdmin<"u"?psfaAdmin.upgradeUrl:"https://paapiplugin.com/pricing/#plans",n=typeof psfaAdmin<"u"?psfaAdmin.settings:null,a=x=>x===!0||x==="1"||x===1,[r,o]=f.useState(()=>{const x={brand:!0,price:!0,sort:!0,condition:!0,merchant:!0,availability:!0,has_deal:!0,deals:!0},v={deal_badge:!0,prime_exclusive:!0,low_stock:!0,deal_countdown:!0};return{displayMode:(n==null?void 0:n.displayMode)==="list"?"list":"grid",hideSearch:a(n==null?void 0:n.hideSearch),hideFilters:a(n==null?void 0:n.hideFilters),hideCategoryBanner:a(n==null?void 0:n.hideCategoryBanner),whiteLabel:a(n==null?void 0:n.whiteLabel),filterVisibility:typeof(n==null?void 0:n.filterVisibility)=="object"?n.filterVisibility:x,features:typeof(n==null?void 0:n.features)=="object"?n.features:v}}),[l,i]=f.useState(!1),{confirm:c}=Pd(),u=x=>{o(v=>({...v,...x}))},m=x=>{o(v=>({...v,filterVisibility:{...v.filterVisibility,[x]:!v.filterVisibility[x]}}))},d=x=>{o(v=>({...v,features:{...v.features,[x]:!v.features[x]}}))},p=async()=>{var x;i(!0);try{const v=new FormData;v.append("action","psfa_save_settings"),v.append("nonce",(psfaAdmin==null?void 0:psfaAdmin.nonce)||""),v.append("psfa_display_mode",r.displayMode),v.append("psfa_hide_search",r.hideSearch?"1":"0"),v.append("psfa_hide_filters",r.hideFilters?"1":"0"),v.append("psfa_hide_category_banner",r.hideCategoryBanner?"1":"0"),v.append("psfa_white_label",r.whiteLabel?"1":"0"),v.append("psfa_filter_visibility",JSON.stringify(r.filterVisibility)),v.append("psfa_features",JSON.stringify(r.features));const w=await(await fetch((psfaAdmin==null?void 0:psfaAdmin.ajaxUrl)||"",{method:"POST",body:v})).json();w.success?(typeof psfaAdmin<"u"&&(psfaAdmin.settings={...psfaAdmin.settings,displayMode:r.displayMode,hideSearch:r.hideSearch,hideFilters:r.hideFilters,hideCategoryBanner:r.hideCategoryBanner,whiteLabel:r.whiteLabel,filterVisibility:r.filterVisibility,features:r.features}),Re.success("Layout saved successfully!")):Re.error(((x=w.data)==null?void 0:x.message)||"Failed to save layout")}catch(v){console.error("Failed to save:",v)}finally{i(!1)}},h=async()=>{if(await c({message:"Are you sure you want to reset layout settings to defaults?",title:"Reset Layout",confirmText:"Reset",variant:"danger"}))try{const v=new FormData;if(v.append("action","psfa_reset_settings"),v.append("nonce",(psfaAdmin==null?void 0:psfaAdmin.nonce)||""),v.append("section","layout"),(await(await fetch((psfaAdmin==null?void 0:psfaAdmin.ajaxUrl)||"",{method:"POST",body:v})).json()).success){const g={displayMode:"grid",hideSearch:!1,hideFilters:!1,hideCategoryBanner:!1,whiteLabel:!1,filterVisibility:{brand:!0,price:!0,sort:!0,condition:!0,merchant:!0,availability:!0,has_deal:!0,deals:!0},features:{deal_badge:!0,prime_exclusive:!0,low_stock:!0,deal_countdown:!0}};o(g),typeof psfaAdmin<"u"&&(psfaAdmin.settings={...psfaAdmin.settings,...g}),Re.success("Layout reset to defaults!")}}catch(v){console.error("Failed to reset:",v)}};return s.jsxs("div",{className:"tw:space-y-6",children:[s.jsxs("div",{className:"tw:mb-6",children:[s.jsx("h2",{className:"tw:text-base tw:font-semibold tw:text-gray-900 tw:m-0 tw:mb-3",children:"Display Layout"}),s.jsx("p",{className:"tw:text-sm tw:text-gray-500 tw:m-0 tw:mb-4",children:"Choose how products are displayed on your site."}),s.jsxs("div",{className:"tw:grid tw:grid-cols-1 tw:md:grid-cols-2 tw:gap-4",children:[s.jsxs("div",{onClick:()=>u({displayMode:"grid"}),className:I("tw:bg-white tw:rounded-xl tw:border tw:overflow-hidden tw:transition-all tw:cursor-pointer tw:p-5",r.displayMode==="grid"?"tw:border-brand-primary tw:ring-1 tw:ring-brand-primary":"tw:border-gray-200 tw:shadow-xs tw:hover:border-gray-300"),children:[s.jsxs("div",{className:"tw:flex tw:items-center tw:justify-between tw:mb-3",children:[s.jsxs("div",{className:"tw:flex tw:items-center tw:gap-3",children:[s.jsx("div",{className:"tw:w-10 tw:h-10 tw:bg-gray-100 tw:rounded-lg tw:flex tw:items-center tw:justify-center",children:s.jsx(k7,{})}),s.jsx("h3",{className:"tw:text-sm tw:font-semibold tw:text-gray-900 tw:m-0",children:"Grid Layout"})]}),s.jsx("span",{className:"tw:px-2 tw:py-0.5 tw:text-xs tw:font-medium tw:border tw:border-solid tw:border-gray-300 tw:bg-gray-100 tw:text-gray-600 tw:rounded",children:"Free"})]}),s.jsx("p",{className:"tw:text-sm tw:text-gray-600 tw:m-0",children:"Products displayed in a responsive grid format, perfect for browsing multiple items at once."})]}),s.jsxs("div",{onClick:()=>e&&u({displayMode:"list"}),className:I("tw:bg-white tw:rounded-xl tw:border tw:overflow-hidden tw:transition-all tw:p-5",e?"tw:cursor-pointer":"",r.displayMode==="list"&&e?"tw:border-brand-primary tw:ring-1 tw:ring-brand-primary":"tw:border-gray-200 tw:shadow-xs tw:hover:border-gray-300"),children:[s.jsxs("div",{className:"tw:flex tw:items-center tw:justify-between tw:mb-3",children:[s.jsxs("div",{className:"tw:flex tw:items-center tw:gap-3",children:[s.jsx("div",{className:"tw:w-10 tw:h-10 tw:bg-gray-100 tw:rounded-lg tw:flex tw:items-center tw:justify-center",children:s.jsx(L7,{})}),s.jsx("h3",{className:"tw:text-sm tw:font-semibold tw:text-gray-900 tw:m-0",children:"List Layout"})]}),s.jsx("span",{className:"tw:px-2 tw:py-0.5 tw:text-xs tw:font-medium tw:border tw:border-solid tw:border-gray-300 tw:bg-gray-100 tw:text-gray-600 tw:rounded",children:"Premium"})]}),s.jsx("p",{className:"tw:text-sm tw:text-gray-600 tw:m-0",children:"Products displayed in a vertical list format, ideal for detailed product information and comparisons."}),!e&&s.jsx("div",{className:"tw:mt-3 tw:flex tw:justify-end",children:s.jsx("a",{href:t,target:"_blank",rel:"noopener noreferrer",className:"tw:inline-flex tw:items-center tw:px-3 tw:py-1.5 tw:text-xs tw:font-medium tw:text-brand-primary tw:bg-blue-50 tw:rounded-lg tw:hover:bg-blue-100 tw:transition-colors tw:no-underline tw:focus:outline-none",children:"Upgrade"})})]})]})]}),s.jsxs("div",{className:"tw:grid tw:grid-cols-1 tw:lg:grid-cols-2 tw:gap-4 tw:mb-6",children:[s.jsxs("div",{className:"tw:bg-white tw:rounded-xl tw:border tw:border-gray-200 tw:shadow-xs tw:p-5",children:[s.jsxs("div",{className:"tw:flex tw:items-center tw:gap-2 tw:mb-4",children:[s.jsx("h3",{className:"tw:text-sm tw:font-semibold tw:text-gray-900 tw:m-0",children:"Display Options"}),s.jsx("span",{className:"tw:px-2 tw:py-0.5 tw:text-xs tw:font-medium tw:border tw:border-solid tw:border-gray-300 tw:bg-gray-100 tw:text-gray-600 tw:rounded",children:"Free"})]}),s.jsx("p",{className:"tw:text-sm tw:text-gray-500 tw:m-0 tw:mb-4",children:"Control visibility of UI elements. These can be overridden per-page using shortcode attributes."}),s.jsxs("div",{className:"tw:grid tw:grid-cols-1 tw:md:grid-cols-2 tw:gap-3",children:[s.jsx(bo,{label:"Hide Search Bar",checked:r.hideSearch,onChange:()=>u({hideSearch:!r.hideSearch}),info:"Hide the search input field. Useful for category-only or curated product pages."}),s.jsx(bo,{label:"Hide Filters",checked:r.hideFilters,onChange:()=>u({hideFilters:!r.hideFilters}),info:"Hide the filter bar entirely. Useful for simple product listings."}),s.jsx(bo,{label:"Hide Category Banner",checked:r.hideCategoryBanner,onChange:()=>u({hideCategoryBanner:!r.hideCategoryBanner}),info:"Hide the 'Top Products in [Category]' banner header on category pages."}),e&&s.jsx(bo,{label:"White Label",checked:r.whiteLabel,onChange:()=>u({whiteLabel:!r.whiteLabel}),premium:!0,info:"Enable to hide the 'Powered by PSFA' link below search results."})]}),!e&&s.jsxs("p",{className:"tw:text-sm tw:text-gray-500 tw:m-0 tw:mt-4",children:[s.jsx("a",{href:t,target:"_blank",rel:"noopener noreferrer",className:"tw:text-brand-primary tw:no-underline tw:hover:opacity-80",children:"Upgrade to Premium"})," for white-label mode."]})]}),s.jsxs("div",{className:"tw:bg-white tw:rounded-xl tw:border tw:border-gray-200 tw:shadow-xs tw:p-5",children:[s.jsxs("div",{className:"tw:flex tw:items-center tw:gap-2 tw:mb-2",children:[s.jsx("h3",{className:"tw:text-sm tw:font-semibold tw:text-gray-900 tw:m-0",children:"Filter Visibility"}),s.jsx("span",{className:"tw:px-2 tw:py-0.5 tw:text-xs tw:font-medium tw:border tw:border-solid tw:border-gray-300 tw:bg-gray-100 tw:text-gray-600 tw:rounded",children:"Free"})]}),s.jsx("p",{className:"tw:text-sm tw:text-gray-500 tw:m-0 tw:mb-4",children:"Choose which filters to display in the search interface."}),s.jsxs("div",{className:"tw:grid tw:grid-cols-1 tw:md:grid-cols-2 tw:gap-3",children:[T7.map(x=>s.jsx(bo,{label:x.label,checked:r.filterVisibility[x.key],onChange:()=>m(x.key)},x.key)),e&&M7.map(x=>s.jsx(bo,{label:x.label,checked:r.filterVisibility[x.key],onChange:()=>m(x.key),premium:!0},x.key))]}),!e&&s.jsxs("p",{className:"tw:text-sm tw:text-gray-500 tw:m-0 tw:mt-4",children:[s.jsx("a",{href:t,target:"_blank",rel:"noopener noreferrer",className:"tw:text-brand-primary tw:no-underline tw:hover:opacity-80",children:"Upgrade to Premium"})," for Has Deal and Discounts filters."]})]})]}),s.jsxs("div",{className:"tw:bg-white tw:rounded-xl tw:border tw:border-gray-200 tw:shadow-xs tw:p-5 tw:mb-6",children:[s.jsxs("div",{className:"tw:flex tw:items-center tw:gap-2 tw:mb-2",children:[s.jsx("h3",{className:"tw:text-sm tw:font-semibold tw:text-gray-900 tw:m-0",children:"Badge & Deal Settings"}),s.jsx("span",{className:"tw:px-2 tw:py-0.5 tw:text-xs tw:font-medium tw:border tw:border-solid tw:border-gray-300 tw:bg-gray-100 tw:text-gray-600 tw:rounded",children:"Premium"})]}),s.jsx("p",{className:"tw:text-sm tw:text-gray-500 tw:m-0 tw:mb-4",children:"Configure which product badges and deal indicators to display."}),e?s.jsx("div",{className:"tw:grid tw:grid-cols-1 tw:md:grid-cols-2 tw:gap-3",children:D7.map(x=>s.jsx(bo,{label:x.label,checked:r.features[x.key],onChange:()=>d(x.key),info:x.info},x.key))}):s.jsxs(s.Fragment,{children:[s.jsxs("ul",{className:"tw:text-sm tw:text-gray-600 tw:m-0 tw:mb-4 tw:pl-5 tw:space-y-1 tw:list-disc",children:[s.jsx("li",{children:"Deal Badges - Lightning Deal, Best Deal badges"}),s.jsx("li",{children:"Prime Exclusive Deals indicator"}),s.jsx("li",{children:"Low Stock warning animation"}),s.jsx("li",{children:"Deal Countdown timer"})]}),s.jsx("a",{href:t,target:"_blank",rel:"noopener noreferrer",className:"tw:inline-flex tw:items-center tw:px-3 tw:py-1.5 tw:text-xs tw:font-medium tw:text-brand-primary tw:bg-blue-50 tw:rounded-lg tw:hover:bg-blue-100 tw:transition-colors tw:no-underline tw:focus:outline-none",children:"Upgrade"})]})]}),s.jsxs("div",{className:"tw:flex tw:gap-3",children:[s.jsx(hn,{onClick:p,disabled:l,children:l?"Saving...":"Save Layout"}),s.jsx(hn,{variant:"outline",onClick:h,children:"Reset to Defaults"})]})]})}function bo({label:e,checked:t,onChange:n,premium:a,info:r}){return s.jsxs("label",{className:"tw:flex tw:items-center tw:justify-between tw:p-3 tw:bg-gray-50 tw:rounded-lg tw:cursor-pointer tw:hover:bg-gray-100 tw:transition-colors",children:[s.jsxs("div",{className:"tw:flex tw:items-center tw:gap-2",children:[s.jsx("span",{className:"tw:text-sm tw:text-gray-700",children:e}),r&&s.jsxs("span",{className:"tw:group tw:relative",children:[s.jsx("svg",{className:"tw:w-4 tw:h-4 tw:text-gray-400 tw:hover:text-gray-600",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),s.jsxs("span",{className:"tw:invisible tw:group-hover:visible tw:absolute tw:z-50 tw:left-1/2 tw:-translate-x-1/2 tw:bottom-full tw:mb-2 tw:px-3 tw:py-2 tw:text-xs tw:text-white tw:bg-gray-800 tw:rounded-lg tw:whitespace-nowrap tw:shadow-lg",children:[r,s.jsx("span",{className:"tw:absolute tw:left-1/2 tw:-translate-x-1/2 tw:top-full tw:border-4 tw:border-transparent tw:border-t-gray-800"})]})]}),a&&s.jsx("span",{className:"tw:px-1.5 tw:py-0.5 tw:text-[10px] tw:font-medium tw:border tw:border-solid tw:border-gray-300 tw:bg-gray-100 tw:text-gray-600 tw:rounded",children:"Premium"})]}),s.jsx(Or,{checked:t,onCheckedChange:n})]})}function k7(){return s.jsx("svg",{className:"tw:w-5 tw:h-5 tw:text-gray-600",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2V6zM14 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2V6zM4 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2v-2zM14 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2v-2z"})})}function L7(){return s.jsx("svg",{className:"tw:w-5 tw:h-5 tw:text-gray-600",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4 6h16M4 10h16M4 14h16M4 18h16"})})}function z7({savingsPercent:e,className:t}){return s.jsxs(hd,{variant:"destructive",className:I("tw:bg-red-600 tw:text-white tw:font-semibold",t),title:`Save ${e}% off the original price`,children:[e,"% OFF"]})}function P7({className:e}){return s.jsx("svg",{viewBox:"0 0 35.418 35.418",fill:"currentColor",className:I("tw:h-4 tw:w-4",e),children:s.jsx("path",{d:"M20.948,9.891c-0.857,0.068-1.847,0.136-2.837,0.269c-1.516,0.195-3.032,0.461-4.284,1.053c-2.439,0.994-4.088,3.105-4.088,6.209c0,3.898,2.506,5.875,5.669,5.875c1.057,0,1.913-0.129,2.703-0.328c1.255-0.396,2.31-1.123,3.562-2.441c0.727,0.99,0.923,1.453,2.177,2.509c0.329,0.133,0.658,0.133,0.922-0.066c0.791-0.659,2.174-1.848,2.901-2.508c0.328-0.267,0.263-0.66,0.066-0.992c-0.727-0.924-1.45-1.718-1.45-3.498v-5.943c0-2.513,0.195-4.822-1.647-6.537c-1.518-1.391-3.891-1.916-5.735-1.916c-0.264,0-0.527,0-0.792,0c-3.362,0.197-6.921,1.647-7.714,5.811c-0.13,0.525,0.267,0.726,0.53,0.793l3.691,0.464c0.396-0.07,0.593-0.398,0.658-0.73c0.333-1.449,1.518-2.176,2.836-2.309c0.067,0,0.133,0,0.265,0c0.79,0,1.646,0.332,2.109,0.987c0.523,0.795,0.461,1.853,0.461,2.775L20.948,9.891L20.948,9.891z M20.223,17.749c-0.461,0.925-1.253,1.519-2.11,1.718c-0.131,0-0.327,0.068-0.526,0.068c-1.45,0-2.31-1.123-2.31-2.775c0-2.11,1.254-3.104,2.836-3.565c0.857-0.197,1.847-0.265,2.836-0.265v0.793C20.948,15.243,21.01,16.43,20.223,17.749z M35.418,26.918v0.215c-0.035,1.291-0.716,3.768-2.328,5.131c-0.322,0.25-0.645,0.107-0.503-0.254c0.469-1.145,1.541-3.803,1.04-4.412c-0.355-0.465-1.826-0.43-3.079-0.322c-0.572,0.072-1.075,0.105-1.469,0.183c-0.357,0.033-0.431-0.287-0.071-0.537c0.466-0.323,0.969-0.573,1.541-0.756c2.039-0.608,4.406-0.25,4.729,0.146C35.348,26.414,35.418,26.629,35.418,26.918z M32.016,29.428c-0.466,0.357-0.965,0.682-1.468,0.973c-3.761,2.261-8.631,3.441-12.856,3.441c-6.807,0-12.895-2.512-17.514-6.709c-0.396-0.324-0.073-0.789,0.393-0.539C5.549,29.5,11.709,31.26,18.084,31.26c4.013,0,8.342-0.754,12.463-2.371c0.285-0.104,0.608-0.252,0.895-0.356C32.087,28.242,32.661,28.965,32.016,29.428z"})})}const Fi=[{id:"neutral",name:"Neutral",swatch:"#a3a3a3",premium:!1},{id:"stone",name:"Stone",swatch:"#a8a29e",premium:!0},{id:"slate",name:"Slate",swatch:"#94a3b8",premium:!0},{id:"zinc",name:"Zinc",swatch:"#a1a1aa",premium:!0},{id:"gray",name:"Gray",swatch:"#9ca3af",premium:!0}],Gi=[{id:"orange",name:"Orange",hex:"#f97316",premium:!1},{id:"red",name:"Red",hex:"#ef4444",premium:!0},{id:"amber",name:"Amber",hex:"#f59e0b",premium:!0},{id:"yellow",name:"Yellow",hex:"#eab308",premium:!0},{id:"lime",name:"Lime",hex:"#84cc16",premium:!0},{id:"green",name:"Green",hex:"#22c55e",premium:!0},{id:"emerald",name:"Emerald",hex:"#10b981",premium:!0},{id:"teal",name:"Teal",hex:"#14b8a6",premium:!0},{id:"cyan",name:"Cyan",hex:"#06b6d4",premium:!0},{id:"sky",name:"Sky",hex:"#0ea5e9",premium:!0},{id:"blue",name:"Blue",hex:"#3b82f6",premium:!0},{id:"indigo",name:"Indigo",hex:"#6366f1",premium:!0},{id:"violet",name:"Violet",hex:"#8b5cf6",premium:!0},{id:"purple",name:"Purple",hex:"#a855f7",premium:!0},{id:"fuchsia",name:"Fuchsia",hex:"#d946ef",premium:!0},{id:"pink",name:"Pink",hex:"#ec4899",premium:!0},{id:"rose",name:"Rose",hex:"#f43f5e",premium:!0}],B7=["0","0.3","0.5","0.75","1.0"],Cw=[{id:"vega",name:"Vega",description:"Classic shadcn, clean",premium:!1},{id:"nova",name:"Nova",description:"Compact layouts",premium:!0},{id:"maia",name:"Maia",description:"Soft & rounded",premium:!0},{id:"lyra",name:"Lyra",description:"Boxy & sharp",premium:!0},{id:"mira",name:"Mira",description:"Dense interfaces",premium:!0}],Yi=[{value:"",label:"System Default",family:"",premium:!1},{value:"inter",label:"Inter",family:"'Inter', sans-serif",premium:!0},{value:"roboto",label:"Roboto",family:"'Roboto', sans-serif",premium:!0},{value:"open-sans",label:"Open Sans",family:"'Open Sans', sans-serif",premium:!0},{value:"lato",label:"Lato",family:"'Lato', sans-serif",premium:!0},{value:"montserrat",label:"Montserrat",family:"'Montserrat', sans-serif",premium:!0},{value:"poppins",label:"Poppins",family:"'Poppins', sans-serif",premium:!0},{value:"dm-sans",label:"DM Sans",family:"'DM Sans', sans-serif",premium:!0},{value:"plus-jakarta",label:"Plus Jakarta Sans",family:"'Plus Jakarta Sans', sans-serif",premium:!0},{value:"outfit",label:"Outfit",family:"'Outfit', sans-serif",premium:!0},{value:"space-grotesk",label:"Space Grotesk",family:"'Space Grotesk', sans-serif",premium:!0},{value:"rubik",label:"Rubik",family:"'Rubik', sans-serif",premium:!0},{value:"source-serif",label:"Source Serif 4",family:"'Source Serif 4', serif",premium:!0},{value:"merriweather",label:"Merriweather",family:"'Merriweather', serif",premium:!0},{value:"playfair",label:"Playfair Display",family:"'Playfair Display', serif",premium:!0},{value:"lora",label:"Lora",family:"'Lora', serif",premium:!0}];function eE(e,t){if(!t.length||document.getElementById(e))return;const n=t.map(r=>`family=${encodeURIComponent(r)}:wght@400;600;700`).join("&"),a=document.createElement("link");a.id=e,a.rel="stylesheet",a.href=`https://fonts.googleapis.com/css2?${n}&display=swap`,document.head.appendChild(a)}const U7=Yi.filter(e=>e.value).map(e=>e.label),H7={neutral:{light:{bg:"#fafafa",card:"#ffffff",border:"#e5e5e5",fg:"#0a0a0a",mutedFg:"#737373"},dark:{bg:"#0a0a0a",card:"#0a0a0a",border:"#262626",fg:"#fafafa",mutedFg:"#a3a3a3"}},stone:{light:{bg:"#fafaf9",card:"#ffffff",border:"#e7e5e4",fg:"#0c0a09",mutedFg:"#78716c"},dark:{bg:"#0c0a09",card:"#0c0a09",border:"#292524",fg:"#fafaf9",mutedFg:"#a8a29e"}},slate:{light:{bg:"#f8fafc",card:"#ffffff",border:"#e2e8f0",fg:"#0f172a",mutedFg:"#64748b"},dark:{bg:"#020817",card:"#020817",border:"#1e293b",fg:"#f8fafc",mutedFg:"#94a3b8"}},zinc:{light:{bg:"#fafafa",card:"#ffffff",border:"#e4e4e7",fg:"#09090b",mutedFg:"#71717a"},dark:{bg:"#09090b",card:"#09090b",border:"#27272a",fg:"#fafafa",mutedFg:"#a1a1aa"}},gray:{light:{bg:"#f9fafb",card:"#ffffff",border:"#e5e7eb",fg:"#030712",mutedFg:"#6b7280"},dark:{bg:"#030712",card:"#030712",border:"#1f2937",fg:"#f9fafb",mutedFg:"#9ca3af"}}};function I7(){var x,v,b,w,g;const e=typeof psfaAdmin<"u"?psfaAdmin.isPremium:!1,t=typeof psfaAdmin<"u"?psfaAdmin.upgradeUrl:"https://paapiplugin.com/pricing/#plans",n=typeof psfaAdmin<"u"?psfaAdmin.settings:{},[a,r]=f.useState({baseColor:(n==null?void 0:n.baseColor)||"neutral",accentColor:(n==null?void 0:n.accentColor)||"orange",style:(n==null?void 0:n.style)||"vega",radius:(n==null?void 0:n.radius)||"0.5",darkMode:(n==null?void 0:n.darkMode)===!0||(n==null?void 0:n.darkMode)==="1",font:(n==null?void 0:n.font)||"",buttonText:(n==null?void 0:n.buttonText)||"Buy on Amazon",hideAmazonIcon:(n==null?void 0:n.hideAmazonIcon)===!0}),[o,l]=f.useState(!1),{confirm:i}=Pd(),c=(y,S)=>{r(E=>({...E,[y]:S}))};f.useEffect(()=>{var S;const y=(S=Yi.find(E=>E.value===a.font))==null?void 0:S.label;y&&a.font&&eE("psfa-preview-font",[y])},[a.font]);const u=f.useCallback(y=>{y&&eE("psfa-all-fonts",U7)},[]),m=async()=>{var y;l(!0);try{const S=new FormData;S.append("action","psfa_save_settings"),S.append("nonce",(psfaAdmin==null?void 0:psfaAdmin.nonce)||""),S.append("psfa_base_color",a.baseColor),S.append("psfa_accent_color",a.accentColor),S.append("psfa_style",a.style),S.append("psfa_radius",a.radius),S.append("psfa_dark_mode",a.darkMode?"1":"0"),S.append("psfa_font",a.font),S.append("psfa_button_text",a.buttonText),S.append("psfa_hide_amazon_icon",a.hideAmazonIcon?"1":"0");const R=await(await fetch((psfaAdmin==null?void 0:psfaAdmin.ajaxUrl)||"",{method:"POST",body:S})).json();R.success?(typeof psfaAdmin<"u"&&(psfaAdmin.settings={...psfaAdmin.settings,...a}),Re.success("Appearance saved successfully!")):Re.error(((y=R.data)==null?void 0:y.message)||"Failed to save appearance")}catch(S){console.error("Failed to save:",S),Re.error("Failed to save appearance. Please try again.")}finally{l(!1)}},d=async()=>{if(await i({message:"Are you sure you want to reset appearance settings to defaults?",title:"Reset Appearance",confirmText:"Reset",variant:"danger"}))try{const S=new FormData;if(S.append("action","psfa_reset_settings"),S.append("nonce",(psfaAdmin==null?void 0:psfaAdmin.nonce)||""),S.append("section","appearance"),(await(await fetch((psfaAdmin==null?void 0:psfaAdmin.ajaxUrl)||"",{method:"POST",body:S})).json()).success){const N={baseColor:"neutral",accentColor:"orange",style:"vega",radius:"0.5",darkMode:!1,font:"",buttonText:"Buy on Amazon",hideAmazonIcon:!1};r(N),typeof psfaAdmin<"u"&&(psfaAdmin.settings={...psfaAdmin.settings,...N}),Re.success("Appearance reset to defaults!")}}catch(S){console.error("Failed to reset:",S),Re.error("Failed to reset. Please try again.")}},p=((x=Gi.find(y=>y.id===a.accentColor))==null?void 0:x.hex)||"#f97316",h=Yi.find(y=>y.value===a.font);return s.jsxs("div",{className:"tw:grid tw:grid-cols-1 tw:lg:grid-cols-[1fr_320px] tw:gap-8",children:[s.jsxs("div",{children:[!e&&s.jsxs("div",{className:"tw:mb-8 tw:rounded-lg tw:border tw:border-amber-200 tw:bg-amber-50 tw:p-5",children:[s.jsx("h3",{className:"tw:text-base tw:font-semibold tw:text-gray-900 tw:m-0 tw:mb-2",children:"Unlock Full Appearance Customization"}),s.jsx("p",{className:"tw:text-sm tw:text-gray-600 tw:m-0 tw:mb-3",children:"Upgrade to Premium to access all customization options:"}),s.jsxs("ul",{className:"tw:text-sm tw:text-gray-600 tw:m-0 tw:mb-4 tw:pl-5 tw:list-disc tw:space-y-1",children:[s.jsx("li",{children:"5 base color palettes (Stone, Slate, Zinc, Gray)"}),s.jsx("li",{children:"17 accent colors for buttons, badges & highlights"}),s.jsx("li",{children:"5 layout styles (Nova, Maia, Lyra, Mira)"}),s.jsx("li",{children:"Adjustable corner radius"}),s.jsx("li",{children:"Dark mode"}),s.jsx("li",{children:"15 Google Fonts"}),s.jsx("li",{children:"Custom button text"}),s.jsx("li",{children:"Hide Amazon icon"})]}),s.jsx("a",{href:t,target:"_blank",rel:"noopener noreferrer",className:"tw:inline-flex tw:items-center tw:px-4 tw:py-2 tw:rounded-md tw:bg-brand-primary tw:text-white tw:text-sm tw:font-medium tw:no-underline tw:hover:opacity-90 tw:transition-opacity",children:"Upgrade to Premium"})]}),s.jsxs("div",{className:"tw:grid tw:grid-cols-1 tw:md:grid-cols-2 tw:gap-x-8 tw:gap-y-8",children:[s.jsx(Lr,{title:"Base Color",description:"Gray scale palette for backgrounds, borders, and text. (Base colors are easier to see in dark mode)",children:e?s.jsxs(Yn,{value:a.baseColor,onValueChange:y=>c("baseColor",y),children:[s.jsx(Dn,{children:s.jsx(qn,{children:s.jsxs("span",{className:"tw:flex tw:items-center tw:gap-2",children:[s.jsx("span",{className:"tw:w-4 tw:h-4 tw:rounded-full tw:border tw:border-gray-300 tw:inline-block tw:shrink-0",style:{background:(v=Fi.find(y=>y.id===a.baseColor))==null?void 0:v.swatch}}),s.jsx("span",{children:(b=Fi.find(y=>y.id===a.baseColor))==null?void 0:b.name})]})})}),s.jsx(On,{children:Fi.map(y=>s.jsx(kn,{value:y.id,children:s.jsxs("span",{className:"tw:flex tw:items-center tw:gap-2",children:[s.jsx("span",{className:"tw:w-4 tw:h-4 tw:rounded-full tw:border tw:border-gray-300 tw:inline-block tw:shrink-0",style:{background:y.swatch}}),s.jsx("span",{children:y.name})]})},y.id))})]}):s.jsxs(zr,{children:[s.jsx("span",{className:"tw:w-4 tw:h-4 tw:rounded-full tw:border tw:border-gray-300 tw:inline-block tw:shrink-0",style:{background:Fi[0].swatch}}),s.jsx("span",{children:Fi[0].name})]})}),s.jsx(Lr,{title:"Radius",description:"Corner roundness for cards and buttons.",children:e?s.jsx("div",{className:"tw:flex tw:gap-2",children:B7.map(y=>s.jsxs("button",{onClick:()=>c("radius",y),className:I("tw:flex tw:flex-col tw:items-center tw:gap-1.5 tw:px-3 tw:py-2.5 tw:rounded-lg tw:border tw:transition-all tw:bg-white tw:min-w-[56px] tw:cursor-pointer",a.radius===y?"tw:border-brand-primary tw:ring-2 tw:ring-brand-primary/20":"tw:border-gray-200 tw:hover:border-gray-300"),children:[s.jsx("span",{className:"tw:w-8 tw:h-8 tw:border-2 tw:border-gray-400 tw:bg-gray-50",style:{borderRadius:`${y}rem`}}),s.jsx("span",{className:"tw:text-xs tw:font-medium tw:text-gray-600",children:y})]},y))}):s.jsx(zr,{children:"0.5"})}),s.jsx(Lr,{title:"Accent Color",description:"Primary color for buttons, badges, and highlights.",children:e?s.jsxs(Yn,{value:a.accentColor,onValueChange:y=>c("accentColor",y),children:[s.jsx(Dn,{children:s.jsx(qn,{children:s.jsxs("span",{className:"tw:flex tw:items-center tw:gap-2",children:[s.jsx("span",{className:"tw:w-4 tw:h-4 tw:rounded-full tw:inline-block tw:shrink-0",style:{background:p}}),s.jsx("span",{children:(w=Gi.find(y=>y.id===a.accentColor))==null?void 0:w.name})]})})}),s.jsx(On,{className:"tw:max-h-60",children:Gi.map(y=>s.jsx(kn,{value:y.id,children:s.jsxs("span",{className:"tw:flex tw:items-center tw:gap-2",children:[s.jsx("span",{className:"tw:w-4 tw:h-4 tw:rounded-full tw:inline-block tw:shrink-0",style:{background:y.hex}}),s.jsx("span",{children:y.name})]})},y.id))})]}):s.jsxs(zr,{children:[s.jsx("span",{className:"tw:w-4 tw:h-4 tw:rounded-full tw:inline-block tw:shrink-0",style:{background:Gi[0].hex}}),s.jsx("span",{children:Gi[0].name})]})}),s.jsx(Lr,{title:"Dark Mode",description:"Light or dark appearance.",children:e?s.jsxs("div",{className:"tw:flex tw:items-center tw:gap-3",children:[s.jsx(Or,{checked:a.darkMode,onCheckedChange:y=>c("darkMode",y)}),s.jsx("span",{className:"tw:text-sm tw:text-gray-700",children:a.darkMode?"Dark":"Light"})]}):s.jsx(zr,{children:"Light"})}),s.jsx(Lr,{title:"Style",description:"Card padding, borders, shadows, and spacing.",children:e?s.jsxs(Yn,{value:a.style,onValueChange:y=>c("style",y),children:[s.jsx(Dn,{children:s.jsx(qn,{children:s.jsx("span",{children:(g=Cw.find(y=>y.id===a.style))==null?void 0:g.name})})}),s.jsx(On,{children:Cw.map(y=>s.jsx(kn,{value:y.id,children:s.jsxs("span",{className:"tw:flex tw:items-center tw:gap-2",children:[s.jsx("span",{children:y.name}),s.jsx("span",{className:"tw:text-xs tw:text-gray-400",children:y.description})]})},y.id))})]}):s.jsx(zr,{children:Cw[0].name})}),s.jsx(Lr,{title:"Font",description:"Google Font or system default.",children:e?s.jsxs(Yn,{value:a.font||"_system_",onValueChange:y=>{c("font",y==="_system_"?"":y)},onOpenChange:u,children:[s.jsx(Dn,{style:h!=null&&h.family?{fontFamily:h.family}:void 0,children:s.jsx(qn,{placeholder:"Select font..."})}),s.jsx(On,{className:"tw:max-h-60",children:Yi.map(y=>s.jsx(kn,{value:y.value||"_system_",children:s.jsx("span",{className:"tw:flex tw:items-center tw:justify-between tw:w-full tw:gap-2",style:y.family?{fontFamily:y.family}:void 0,children:s.jsx("span",{children:y.label})})},y.value||"_system_"))})]}):s.jsx(zr,{children:Yi[0].label})}),s.jsx(Lr,{title:"Button Text",description:"Text displayed on the buy button.",children:e?s.jsx(ut,{value:a.buttonText,onChange:y=>c("buttonText",y.target.value),placeholder:"Buy on Amazon"}):s.jsx(zr,{children:"Buy on Amazon"})}),s.jsx(Lr,{title:"Amazon Icon",description:"Show or hide the Amazon logo on buy buttons.",children:e?s.jsxs("div",{className:"tw:flex tw:items-center tw:gap-3",children:[s.jsx(Or,{checked:a.hideAmazonIcon,onCheckedChange:y=>c("hideAmazonIcon",y)}),s.jsx("span",{className:"tw:text-sm tw:text-gray-700",children:a.hideAmazonIcon?"Hidden":"Visible"})]}):s.jsx(zr,{children:"Visible"})})]}),s.jsxs("div",{className:"tw:pt-6 tw:mt-8 tw:border-t tw:border-gray-200 tw:flex tw:gap-3",children:[s.jsx(hn,{onClick:m,disabled:o,children:o?"Saving...":"Save Appearance"}),s.jsx(hn,{variant:"outline",onClick:d,children:"Reset to Defaults"})]})]}),s.jsx("div",{className:"tw:hidden tw:lg:block",children:s.jsx("div",{className:"tw:sticky tw:top-4",children:s.jsx($7,{state:a,accentHex:p,fontFamily:(h==null?void 0:h.family)||""})})})]})}function Lr({title:e,description:t,children:n}){return s.jsxs("div",{children:[s.jsx("h2",{className:"tw:text-base tw:font-semibold tw:text-gray-900 tw:m-0 tw:mb-1",children:e}),s.jsx("p",{className:"tw:text-sm tw:text-gray-500 tw:m-0 tw:mb-3",children:t}),n]})}function zr({children:e}){return s.jsx("div",{className:"tw:flex tw:items-center tw:gap-2 tw:h-9 tw:px-3 tw:rounded-md tw:border tw:border-gray-200 tw:bg-gray-50 tw:text-sm tw:text-gray-700",children:e})}const V7={vega:{cardPadding:"1rem",cardBorderWidth:"1px",cardShadow:"0 1px 2px 0 rgb(0 0 0 / 0.05)",cardHoverShadow:"0 4px 6px -1px rgb(0 0 0 / 0.1)",buttonRadius:"0.375rem",buttonPaddingX:"1rem",buttonPaddingY:"0.5rem",spacingGap:"1rem"},nova:{cardPadding:"0.75rem",cardBorderWidth:"1px",cardShadow:"0 1px 2px 0 rgb(0 0 0 / 0.04)",cardHoverShadow:"0 2px 4px -1px rgb(0 0 0 / 0.08)",buttonRadius:"0.25rem",buttonPaddingX:"0.75rem",buttonPaddingY:"0.375rem",spacingGap:"0.75rem"},maia:{cardPadding:"1.5rem",cardBorderWidth:"0px",cardShadow:"0 4px 12px rgb(0 0 0 / 0.06)",cardHoverShadow:"0 8px 24px rgb(0 0 0 / 0.1)",buttonRadius:"9999px",buttonPaddingX:"1.25rem",buttonPaddingY:"0.625rem",spacingGap:"1.25rem"},lyra:{cardPadding:"1rem",cardBorderWidth:"2px",cardShadow:"none",cardHoverShadow:"none",buttonRadius:"0px",buttonPaddingX:"1rem",buttonPaddingY:"0.5rem",spacingGap:"1rem"},mira:{cardPadding:"0.5rem",cardBorderWidth:"1px",cardShadow:"0 1px 1px 0 rgb(0 0 0 / 0.03)",cardHoverShadow:"0 2px 3px 0 rgb(0 0 0 / 0.06)",buttonRadius:"0.125rem",buttonPaddingX:"0.625rem",buttonPaddingY:"0.25rem",spacingGap:"0.5rem"}};function $7({state:e,accentHex:t,fontFamily:n}){const a=e.darkMode,r=H7[e.baseColor],o=a?r.dark:r.light,l=`${e.radius}rem`,i=a?o.border:"#f0f0f0",c=V7[e.style],u=t,m=t;return s.jsxs("div",{className:"tw:bg-white tw:rounded-xl tw:border tw:border-gray-200 tw:shadow-xs tw:overflow-hidden",children:[s.jsxs("div",{className:"tw:px-5 tw:py-3 tw:border-b tw:border-gray-200 tw:flex tw:items-center tw:justify-between",children:[s.jsx("span",{className:"tw:text-sm tw:font-semibold tw:text-gray-900",children:"Preview"}),s.jsx("span",{className:"tw:text-xs tw:text-gray-400",children:"Updates in real-time"})]}),s.jsx("div",{style:{background:o.bg,padding:"20px"},children:s.jsxs("div",{style:{background:o.card,border:`${c.cardBorderWidth} solid ${o.border}`,borderRadius:l,overflow:"hidden",fontFamily:n||"inherit",boxShadow:c.cardShadow,transition:"all 0.2s ease"},children:[s.jsxs("div",{style:{height:"140px",background:i,display:"flex",alignItems:"center",justifyContent:"center",position:"relative",borderRadius:`${l} ${l} 0 0`},children:[s.jsx("span",{style:{color:o.mutedFg,fontSize:"13px",fontWeight:500,opacity:.7},children:"Product Image"}),s.jsx("div",{style:{position:"absolute",left:"12px",top:0,zIndex:10},children:s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"3px",padding:"2px 6px",borderRadius:"0 0 6px 6px",background:t,color:"#fff"},children:[s.jsx(zO,{size:10,color:"#fff"}),s.jsx("span",{style:{fontWeight:700,fontSize:"10px"},children:"01"})]})}),s.jsx("div",{style:{position:"absolute",top:"28px",left:"8px",display:"inline-flex",alignItems:"center",padding:"2px 6px",borderRadius:"6px",background:"#f97316",color:"#fff",fontSize:"9px",fontWeight:600},children:"Limited Deal"}),s.jsx("div",{style:{position:"absolute",top:"8px",right:"8px"},children:s.jsx(z7,{savingsPercent:25,className:"tw:text-[9px] tw:px-1.5 tw:py-0.5"})})]}),s.jsxs("div",{style:{padding:c.cardPadding},children:[s.jsx("div",{style:{color:o.fg,fontSize:"12px",fontWeight:500,lineHeight:1.4,display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden"},children:"Sony WH-1000XM5 Wireless Noise Cancelling Headphones"}),s.jsxs("div",{style:{display:"flex",alignItems:"baseline",gap:"6px",marginTop:"6px"},children:[s.jsx("span",{style:{color:a?"#f2f2f2":"#b12704",fontWeight:700,fontSize:"15px"},children:"$29.99"}),s.jsx("span",{style:{color:o.mutedFg,fontSize:"11px",textDecoration:"line-through"},children:"$39.99"})]}),s.jsxs("div",{style:{background:u,color:"#ffffff",border:`1px solid ${m}`,borderRadius:c.buttonRadius,fontSize:"11px",fontWeight:600,padding:`${c.buttonPaddingY} ${c.buttonPaddingX}`,marginTop:"8px",textAlign:"center",lineHeight:"18px",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",gap:"5px"},children:[!e.hideAmazonIcon&&s.jsx("span",{style:{display:"inline-flex",width:"14px",height:"14px",flexShrink:0},children:s.jsx(P7,{})}),e.buttonText||"Buy on Amazon"]})]})]})})]})}const F7=[{name:"Shortcode Builder",description:"Visual shortcode builder to easily create and customize your product search shortcodes."},{name:"Search Autocomplete",description:"Real-time search suggestions as users type, powered by Amazon's search data."},{name:"Product Filters",description:"Filter products by brand, price range, condition, and merchant."},{name:"Grid Display Mode",description:"Display products in a responsive grid layout that works on all devices."},{name:"Infinite Scroll",description:"Automatically load more products as users scroll (up to 5 pages in free version)."},{name:"Filter Visibility Control",description:"Choose which filters to show or hide in the search interface."},{name:"Category Selection",description:"Search within specific Amazon categories (5 categories in free version)."},{name:"Flexible Product Count",description:"Control exactly how many products to display (2-20) using the count shortcode attribute."},{name:"API Response Caching",description:"Search results are cached for 30 minutes and product data for 1 hour. Reduces API calls and speeds up repeat searches. Manage and clear cache from the dedicated Cache page."}],G7=[{name:"Accent Colors",description:"Choose from 17 vibrant accent colors to match your brand - Orange, Red, Blue, Emerald, Purple, and more. Free users get Orange."},{name:"Base Color Palettes",description:"Select from 5 neutral base palettes (Neutral, Stone, Slate, Zinc, Gray) that set the overall tone of your storefront. Free users get Neutral."},{name:"Card Styles",description:"Choose from 5 card design presets - Vega (classic), Nova (compact), Maia (soft & rounded), Lyra (boxy & sharp), and Mira (dense). Free users get Vega."},{name:"Dark Mode",description:"Switch to a polished dark theme optimized for low-light browsing. Works seamlessly with all base colors, accent colors, and card styles."},{name:"Google Fonts",description:"Choose from 15 premium Google Fonts including Inter, Poppins, Montserrat, DM Sans, and more to match your site's typography."},{name:"Border Radius Control",description:"Fine-tune the corner roundness of product cards and UI elements with 5 presets from sharp (0) to fully rounded (1.0rem)."},{name:"List Display Mode",description:"Display products in a vertical list layout instead of grid. Perfect for detailed product comparisons."},{name:"Unlimited Pagination",description:"Load more products up to Amazon's API limit (Free: 5 pages limit)"},{name:"All Categories",description:"Access to all 26 Amazon categories. Free users get 5 categories (Electronics, Books, Fashion, Toys, Home & Garden)."},{name:"Deal Filters",description:"Filter products by deal availability and discount percentage. Quickly surface the best bargains for your visitors."},{name:"Button Text",description:'Customize the buy button label to match your tone - "Shop Now", "View on Amazon", or anything you like.'},{name:"Hide Amazon Icon",description:"Remove the Amazon logo from buy buttons for a cleaner, more brand-neutral look."},{name:"Product Badges",description:"Display Best Seller rank badges and discount percentage labels on product cards to highlight top products and savings."},{name:"Amazon Deal Features",description:"Show live deal data from Amazon's API: Lightning Deal badges, Prime Exclusive indicators, countdown timers, and Low Stock warnings."},{name:"White-Label Mode",description:'Remove "Powered by PSFA" branding from search results for a fully white-labeled experience. Perfect for agencies and client sites.'}];function Y7(){const e=typeof psfaAdmin<"u"?psfaAdmin.isPremium:!1,t=typeof psfaAdmin<"u"?psfaAdmin.upgradeUrl:"https://paapiplugin.com/pricing/#plans";return s.jsxs("div",{className:"tw:space-y-8",children:[s.jsxs("div",{children:[s.jsx("h2",{className:"tw:text-lg tw:font-semibold tw:text-gray-900 tw:m-0 tw:mb-4",children:"Free Features"}),s.jsx("div",{className:"tw:grid tw:grid-cols-1 tw:md:grid-cols-2 tw:gap-4",children:F7.map(n=>s.jsx(tE,{feature:n,badge:"Free",isActive:!0},n.name))})]}),s.jsxs("div",{children:[s.jsx("h2",{className:"tw:text-lg tw:font-semibold tw:text-gray-900 tw:m-0 tw:mb-4",children:"Premium Features"}),s.jsx("div",{className:"tw:grid tw:grid-cols-1 tw:md:grid-cols-2 tw:gap-4",children:G7.map(n=>s.jsx(tE,{feature:n,badge:"Premium",isActive:e,upgradeUrl:t},n.name))})]})]})}function tE({feature:e,badge:t,isActive:n,upgradeUrl:a}){return s.jsx("div",{className:`tw:bg-white tw:rounded-xl tw:border tw:border-gray-200 tw:shadow-xs tw:p-5 ${n?"":"tw:opacity-75"}`,children:s.jsxs("div",{className:"tw:flex tw:items-start tw:justify-between tw:gap-4",children:[s.jsxs("div",{className:"tw:flex-1",children:[s.jsxs("div",{className:"tw:flex tw:items-center tw:gap-2 tw:mb-2",children:[s.jsx("h3",{className:"tw:text-sm tw:font-semibold tw:text-gray-900 tw:m-0",children:e.name}),s.jsx("span",{className:"tw:px-2 tw:py-0.5 tw:text-xs tw:font-medium tw:border tw:border-solid tw:border-gray-300 tw:bg-gray-100 tw:text-gray-700 tw:rounded",children:t})]}),s.jsx("p",{className:"tw:text-sm tw:text-gray-600 tw:m-0",children:e.description})]}),s.jsx("div",{className:"tw:shrink-0",children:n?s.jsx("span",{className:"tw:flex tw:items-center tw:justify-center tw:w-5 tw:h-5 tw:bg-blue-100 tw:text-blue-600 tw:rounded-full",children:s.jsx(q7,{})}):s.jsx("a",{href:a,target:"_blank",rel:"noopener noreferrer",className:"tw:inline-flex tw:items-center tw:px-3 tw:py-1.5 tw:text-xs tw:font-medium tw:text-brand-primary tw:bg-blue-50 tw:rounded-lg tw:hover:bg-blue-100 tw:transition-colors tw:no-underline tw:focus:outline-none",children:"Upgrade"})})]})})}function q7(){return s.jsx("svg",{className:"tw:w-3 tw:h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})})}function K7({className:e}){return s.jsxs("svg",{viewBox:"0 0 256 256",fill:"currentColor",className:e,children:[s.jsx("path",{d:"M200,48v63.1c0,39.7-31.75,72.6-71.45,72.9A72,72,0,0,1,56,112V48Z",opacity:"0.2"}),s.jsx("path",{d:"M232,64H208V48a8,8,0,0,0-8-8H56a8,8,0,0,0-8,8V64H24A16,16,0,0,0,8,80V96a40,40,0,0,0,40,40h3.65A80.13,80.13,0,0,0,120,191.61V216H96a8,8,0,0,0,0,16h64a8,8,0,0,0,0-16H136V191.58c31.94-3.23,58.44-25.64,68.08-55.58H208a40,40,0,0,0,40-40V80A16,16,0,0,0,232,64ZM48,120A24,24,0,0,1,24,96V80H48v32q0,4,.39,8Zm144-8.9c0,35.52-29,64.64-64,64.9a64,64,0,0,1-64-64V56H192ZM232,96a24,24,0,0,1-24,24h-.5a81.81,81.81,0,0,0,.5-8.9V80h24Z"})]})}function X7({className:e}){return s.jsxs("svg",{viewBox:"0 0 256 256",fill:"currentColor",className:e,children:[s.jsx("path",{d:"M216.71,99.73l-15.6,93.59a8,8,0,0,1-7.89,6.68H62.78a8,8,0,0,1-7.89-6.68L39.29,99.73l.08,0a19.82,19.82,0,0,0,9.22-4.16h0L88,144l32-73.65h0a20,20,0,0,0,15.92,0h0L168,144l39.39-48.48h0a19.82,19.82,0,0,0,9.22,4.16Z",opacity:"0.2"}),s.jsx("path",{d:"M248,80a28,28,0,1,0-51.12,15.77l-26.79,33L146,73.4a28,28,0,1,0-36.06,0L85.91,128.74l-26.79-33a28,28,0,1,0-26.6,12L47,194.63A16,16,0,0,0,62.78,208H193.22A16,16,0,0,0,209,194.63l14.47-86.85A28,28,0,0,0,248,80ZM128,40a12,12,0,1,1-12,12A12,12,0,0,1,128,40ZM24,80A12,12,0,1,1,36,92,12,12,0,0,1,24,80ZM193.22,192H62.78L48.86,108.52,81.79,149A8,8,0,0,0,88,152a7.83,7.83,0,0,0,1.08-.07,8,8,0,0,0,6.26-4.74l29.3-67.4a27,27,0,0,0,6.72,0l29.3,67.4a8,8,0,0,0,6.26,4.74A7.83,7.83,0,0,0,168,152a8,8,0,0,0,6.21-3l32.93-40.52ZM220,92a12,12,0,1,1,12-12A12,12,0,0,1,220,92Z"})]})}function Z7({className:e}){return s.jsxs("svg",{viewBox:"0 0 256 256",fill:"currentColor",className:e,children:[s.jsx("path",{d:"M229.06,108.79l-48.7,42,14.88,62.79a8.4,8.4,0,0,1-12.52,9.17L128,189.09,73.28,222.74a8.4,8.4,0,0,1-12.52-9.17l14.88-62.79-48.7-42A8.46,8.46,0,0,1,31.73,94L95.64,88.8l24.62-59.6a8.36,8.36,0,0,1,15.48,0l24.62,59.6L224.27,94A8.46,8.46,0,0,1,229.06,108.79Z",opacity:"0.2"}),s.jsx("path",{d:"M239.18,97.26A16.38,16.38,0,0,0,224.92,86l-59-4.76L143.14,26.15a16.36,16.36,0,0,0-30.27,0L90.11,81.23,31.08,86a16.46,16.46,0,0,0-9.37,28.86l45,38.83L53,211.75a16.38,16.38,0,0,0,24.5,17.82L128,198.49l50.53,31.08A16.4,16.4,0,0,0,203,211.75l-13.76-58.07,45-38.83A16.43,16.43,0,0,0,239.18,97.26Zm-15.34,5.47-48.7,42a8,8,0,0,0-2.56,7.91l14.88,62.8a.37.37,0,0,1-.17.48c-.18.14-.23.11-.38,0l-54.72-33.65a8,8,0,0,0-8.38,0L69.09,215.94c-.15.09-.19.12-.38,0a.37.37,0,0,1-.17-.48l14.88-62.8a8,8,0,0,0-2.56-7.91l-48.7-42c-.12-.1-.23-.19-.13-.5s.18-.27.33-.29l63.92-5.16A8,8,0,0,0,103,91.86l24.62-59.61c.08-.17.11-.25.35-.25s.27.08.35.25L153,91.86a8,8,0,0,0,6.75,4.92l63.92,5.16c.15,0,.24,0,.33.29S224,102.63,223.84,102.73Z"})]})}function W7({className:e}){return s.jsxs("svg",{viewBox:"0 0 256 256",fill:"currentColor",className:e,children:[s.jsx("path",{d:"M192,168a40,40,0,0,1-40,40H128V128h24A40,40,0,0,1,192,168ZM112,48a40,40,0,0,0,0,80h16V48Z",opacity:"0.2"}),s.jsx("path",{d:"M152,120H136V56h8a32,32,0,0,1,32,32,8,8,0,0,0,16,0,48.05,48.05,0,0,0-48-48h-8V24a8,8,0,0,0-16,0V40h-8a48,48,0,0,0,0,96h8v64H104a32,32,0,0,1-32-32,8,8,0,0,0-16,0,48.05,48.05,0,0,0,48,48h16v16a8,8,0,0,0,16,0V216h16a48,48,0,0,0,0-96Zm-40,0a32,32,0,0,1,0-64h8v64Zm40,80H136V136h16a32,32,0,0,1,0,64Z"})]})}function Q7({className:e}){return s.jsx("svg",{viewBox:"0 0 256 256",fill:"currentColor",className:e,children:s.jsx("path",{d:"M197.09,100.48l-56.49-19.08L121.52,24.9a8,8,0,0,0-15,0L87.4,81.4,30.91,100.48a8,8,0,0,0,0,15l56.49,19.09L106.48,191.1a8,8,0,0,0,15,0l19.08-56.52,56.53-19.09a8,8,0,0,0,0-15ZM136.21,120.2a8,8,0,0,0-5,5L114,168.35,96.82,125.22a8,8,0,0,0-5-5L48.65,103l43.13-14.57a8,8,0,0,0,5-5L114,40.31,131.16,83.44a8,8,0,0,0,5,5l43.17,14.58ZM229.24,159.53l-20.41-6.89-6.89-20.42a8,8,0,0,0-15.18,0l-6.89,20.42L159.46,159.53a8,8,0,0,0,0,15.18l20.41,6.89,6.89,20.41a8,8,0,0,0,15.18,0l6.89-20.41,20.41-6.89a8,8,0,0,0,0-15.18Z"})})}const nE={best_value:K7,editors_choice:X7,best_rated:Z7,budget_pick:W7,premium_pick:Q7},J7=[{value:"none",label:"No Badge"},{value:"best_value",label:"Best Value"},{value:"editors_choice",label:"Editor's Choice"},{value:"best_rated",label:"Best Rated"},{value:"budget_pick",label:"Budget Pick"},{value:"premium_pick",label:"Premium Pick"}];function e9(){var n,a,r;const e=typeof psfaAdmin<"u"&&((n=psfaAdmin.addons)==null?void 0:n.comparisonTables);return typeof psfaAdmin<"u"&&((a=psfaAdmin.addonNeedsUpgrade)==null?void 0:a.comparisonTables)?s.jsx(t9,{addonName:"Comparison Tables",deactivateUrl:((r=psfaAdmin.addonDeactivateUrls)==null?void 0:r.comparisonTables)||""}):e?s.jsx(a9,{}):s.jsx(r9,{})}function t9({addonName:e,deactivateUrl:t}){const n=typeof psfaAdmin<"u"&&psfaAdmin.upgradeUrl?psfaAdmin.upgradeUrl:"https://paapiplugin.com/pricing/#plans";return s.jsx("div",{className:"tw:max-w-xl tw:mx-auto tw:mt-12",children:s.jsx(Fe,{children:s.jsx(Ge,{children:s.jsxs("div",{className:"tw:flex tw:items-start tw:gap-4",children:[s.jsx("div",{className:"tw:shrink-0",children:s.jsx("span",{className:"tw:flex tw:items-center tw:justify-center tw:w-10 tw:h-10 tw:bg-amber-100 tw:text-amber-600 tw:rounded-full",children:s.jsx(n9,{})})}),s.jsxs("div",{className:"tw:flex-1",children:[s.jsx("h2",{className:"tw:text-base tw:font-semibold tw:text-gray-900 tw:m-0 tw:mb-2",children:"Premium License Required"}),s.jsxs("p",{className:"tw:text-sm tw:text-gray-600 tw:m-0 tw:mb-4",children:[e," requires a Premium license for Paapi Product Search for Amazon. Choose one of the options below to continue:"]}),s.jsxs("div",{className:"tw:space-y-3 tw:mb-5",children:[s.jsxs("div",{className:"tw:flex tw:items-start tw:gap-2",children:[s.jsx("span",{className:"tw:flex tw:items-center tw:justify-center tw:w-5 tw:h-5 tw:bg-blue-100 tw:text-blue-600 tw:rounded-full tw:shrink-0 tw:mt-0.5 tw:text-xs tw:font-bold",children:"1"}),s.jsxs("p",{className:"tw:text-sm tw:text-gray-700 tw:m-0",children:[s.jsx("strong",{children:"Upgrade to Premium"})," to unlock ",e," and all premium features."]})]}),s.jsxs("div",{className:"tw:flex tw:items-start tw:gap-2",children:[s.jsx("span",{className:"tw:flex tw:items-center tw:justify-center tw:w-5 tw:h-5 tw:bg-gray-100 tw:text-gray-600 tw:rounded-full tw:shrink-0 tw:mt-0.5 tw:text-xs tw:font-bold",children:"2"}),s.jsxs("p",{className:"tw:text-sm tw:text-gray-700 tw:m-0",children:[s.jsx("strong",{children:"Deactivate the addon"})," to continue using the free version without it."]})]})]}),s.jsxs("div",{className:"tw:flex tw:items-center tw:gap-3",children:[s.jsx("a",{href:n,target:"_blank",rel:"noopener noreferrer",className:"tw:px-4 tw:py-2 tw:bg-brand-primary tw:text-white tw:text-sm tw:font-medium tw:rounded-lg tw:hover:bg-brand-hover tw:transition-colors tw:no-underline tw:focus:outline-none",children:"Upgrade to Premium"}),t&&s.jsx("a",{href:t,className:"tw:px-4 tw:py-2 tw:text-sm tw:font-medium tw:text-gray-700 tw:bg-gray-100 tw:rounded-lg tw:hover:bg-gray-200 tw:transition-colors tw:no-underline",children:"Deactivate Addon"})]})]})]})})})})}function n9(){return s.jsx("svg",{className:"tw:w-5 tw:h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})})}function a9(){var H;const{confirm:e}=Pd(),t=((H=psfaAdmin.addonData)==null?void 0:H.comparisonTables)||[],[n,a]=f.useState(t),[r,o]=f.useState(""),[l,i]=f.useState(!1),[c,u]=f.useState(null),[m,d]=f.useState({isOpen:!1,tableId:null,tableName:"",products:[],loading:!1,saving:!1}),[p,h]=f.useState(""),x=f.useRef(null),v=f.useRef(null),b=async k=>{var B,U;if(k.preventDefault(),!(!r.trim()||l)){i(!0);try{const C=new FormData;C.append("action","psfa_create_comparison_table"),C.append("nonce",((B=psfaAdmin.addonNonces)==null?void 0:B.comparisonTables)||""),C.append("name",r.trim());const _=await(await fetch(psfaAdmin.ajaxUrl,{method:"POST",body:C})).json();if(_.success){o("");const z={id:_.data.table_id,name:r.trim(),product_count:0},$=[...n,z];a($),psfaAdmin.addonData&&(psfaAdmin.addonData.comparisonTables=$),Re.success("Table created successfully")}else Re.error(((U=_.data)==null?void 0:U.message)||"Failed to create table")}catch(C){console.error("Failed to create table:",C)}finally{i(!1)}}},w=async k=>{var U,C;if(await e({message:"Are you sure you want to delete this comparison table?",title:"Delete Table",confirmText:"Delete",variant:"danger"}))try{const L=new FormData;L.append("action","psfa_delete_comparison_table"),L.append("nonce",((U=psfaAdmin.addonNonces)==null?void 0:U.comparisonTables)||""),L.append("table_id",k.toString());const z=await(await fetch(psfaAdmin.ajaxUrl,{method:"POST",body:L})).json();if(z.success){const $=n.filter(J=>J.id!==k);a($),psfaAdmin.addonData&&(psfaAdmin.addonData.comparisonTables=$),Re.success("Table deleted")}else Re.error(((C=z.data)==null?void 0:C.message)||"Failed to delete table")}catch(L){console.error("Failed to delete table:",L)}},g=k=>{const B=`[psfa_comparison id="${k}"]`;navigator.clipboard.writeText(B),u(k),setTimeout(()=>u(null),2e3)},y=async k=>{var U;const B=n.find(C=>C.id===k);d(C=>({...C,isOpen:!0,tableId:k,tableName:(B==null?void 0:B.name)||"",loading:!0}));try{const C=new FormData;C.append("action","psfa_get_table_data"),C.append("nonce",((U=psfaAdmin.addonNonces)==null?void 0:U.comparisonTables)||""),C.append("table_id",k.toString());const _=await(await fetch(psfaAdmin.ajaxUrl,{method:"POST",body:C})).json();_.success?d(z=>({...z,tableName:_.data.name,products:_.data.products||[],loading:!1})):d(z=>({...z,loading:!1}))}catch(C){console.error("Failed to load table data:",C),d(L=>({...L,loading:!1}))}},S=()=>{d({isOpen:!1,tableId:null,tableName:"",products:[],loading:!1,saving:!1}),h("")},E=async()=>{var k,B;if(m.tableId){d(U=>({...U,saving:!0}));try{const U=new FormData;U.append("action","psfa_update_comparison_table"),U.append("nonce",((k=psfaAdmin.addonNonces)==null?void 0:k.comparisonTables)||""),U.append("table_id",m.tableId.toString()),U.append("name",m.tableName);const L=await(await fetch(psfaAdmin.ajaxUrl,{method:"POST",body:U})).json();if(!L.success){Re.error(((B=L.data)==null?void 0:B.message)||"Failed to save table name"),d(z=>({...z,saving:!1}));return}const _=m.products.map(z=>{var J;const $=new FormData;return $.append("action","psfa_update_product_rating"),$.append("nonce",((J=psfaAdmin.addonNonces)==null?void 0:J.comparisonTables)||""),$.append("table_id",m.tableId.toString()),$.append("asin",z.asin),$.append("rating",z.rating!==null?String(z.rating):""),$.append("review_count",z.review_count!==null?String(z.review_count):""),$.append("badge_type",z.badge_type||""),fetch(psfaAdmin.ajaxUrl,{method:"POST",body:$})});await Promise.all(_),a(z=>z.map($=>$.id===m.tableId?{...$,name:m.tableName,product_count:m.products.length}:$)),Re.success("Changes saved successfully"),S()}catch(U){console.error("Failed to save table:",U),Re.error("Failed to save changes")}finally{d(U=>({...U,saving:!1}))}}},R=(k,B,U)=>{const C=B==="badge_type"&&U==="none"?"":U;d(L=>({...L,products:L.products.map(_=>_.asin===k?{..._,[B]:B==="badge_type"?C:C===""?null:Number(C)}:_)}))},N=async k=>{var B,U;if(k.preventDefault(),!(!p.trim()||!m.tableId))try{const C=new FormData;C.append("action","psfa_add_comparison_product_by_asin"),C.append("nonce",((B=psfaAdmin.addonNonces)==null?void 0:B.comparisonTables)||""),C.append("table_id",m.tableId.toString()),C.append("asin",p.trim().toUpperCase());const _=await(await fetch(psfaAdmin.ajaxUrl,{method:"POST",body:C})).json();_.success?(d(z=>({...z,products:[...z.products,{asin:_.data.asin,title:_.data.title,image_url:_.data.image_url,badge_type:"",rating:null,review_count:null}]})),h(""),Re.success("Product added")):Re.error(((U=_.data)==null?void 0:U.message)||"Failed to add product")}catch(C){console.error("Failed to add product:",C)}},j=async k=>{var U;if(!(!m.tableId||!await e({message:"Remove this product from the table?",confirmText:"Remove",variant:"danger"})))try{const C=new FormData;C.append("action","psfa_remove_comparison_product"),C.append("nonce",((U=psfaAdmin.addonNonces)==null?void 0:U.comparisonTables)||""),C.append("table_id",m.tableId.toString()),C.append("asin",k),(await(await fetch(psfaAdmin.ajaxUrl,{method:"POST",body:C})).json()).success&&(d(z=>({...z,products:z.products.filter($=>$.asin!==k)})),Re.success("Product removed"))}catch(C){console.error("Failed to remove product:",C)}},T=k=>{x.current=k},O=k=>{v.current=k},D=async()=>{var U;if(x.current===null||v.current===null||x.current===v.current)return;const k=[...m.products],B=k[x.current];if(k.splice(x.current,1),k.splice(v.current,0,B),d(C=>({...C,products:k})),m.tableId){const C=new FormData;C.append("action","psfa_reorder_comparison_products"),C.append("nonce",((U=psfaAdmin.addonNonces)==null?void 0:U.comparisonTables)||""),C.append("table_id",m.tableId.toString()),k.forEach(L=>C.append("order[]",L.asin));try{(await(await fetch(psfaAdmin.ajaxUrl,{method:"POST",body:C})).json()).success&&Re.success("Order saved")}catch(L){console.error("Failed to save order:",L)}}x.current=null,v.current=null};return s.jsxs("div",{className:"tw:space-y-8",children:[s.jsxs("div",{children:[s.jsx("h2",{className:"tw:text-lg tw:font-semibold tw:text-gray-900 tw:m-0 tw:mb-4",children:"How It Works"}),s.jsxs("div",{className:"tw:grid tw:grid-cols-1 tw:md:grid-cols-3 tw:gap-4",children:[s.jsx(ql,{step:"1",title:"Search Products",description:"Visit your search page while logged in as admin.",icon:"search"}),s.jsx(ql,{step:"2",title:'Click "+ Compare"',description:'Click "+ Compare" on products to add them to a comparison table.',icon:"plus"}),s.jsx(ql,{step:"3",title:"Use Shortcode",description:"Copy the shortcode and paste it anywhere on your site.",icon:"copy"})]})]}),s.jsxs("div",{children:[s.jsx("h2",{className:"tw:text-lg tw:font-semibold tw:text-gray-900 tw:m-0 tw:mb-4",children:"Create New Table"}),s.jsx(Fe,{children:s.jsx(Ge,{children:s.jsxs("div",{className:"tw:flex tw:items-start tw:gap-3",children:[s.jsx("div",{className:"tw:shrink-0",children:s.jsx("span",{className:"tw:flex tw:items-center tw:justify-center tw:w-6 tw:h-6 tw:bg-blue-100 tw:text-blue-600 tw:rounded-full",children:s.jsx(rE,{})})}),s.jsxs("div",{className:"tw:flex-1",children:[s.jsx("h3",{className:"tw:text-sm tw:font-semibold tw:text-gray-900 tw:m-0 tw:mb-2",children:"New Comparison Table"}),s.jsx("p",{className:"tw:text-sm tw:text-gray-600 tw:m-0 tw:mb-3",children:"Create a table to start adding products for comparison."}),s.jsxs("form",{onSubmit:b,className:"tw:flex tw:gap-2 tw:items-center",children:[s.jsx(ut,{type:"text",value:r,onChange:k=>o(k.target.value),placeholder:"Best Headphones 2026",required:!0,className:"tw:w-64"}),s.jsx("button",{type:"submit",disabled:l,className:"tw:px-4 tw:py-2 tw:bg-brand-primary tw:text-white tw:text-sm tw:font-medium tw:rounded-lg tw:hover:bg-brand-hover tw:transition-colors tw:cursor-pointer tw:border-0 tw:disabled:opacity-50",children:l?"Creating...":"Create Table"})]})]})]})})})]}),s.jsxs("div",{children:[s.jsxs("h2",{className:"tw:text-lg tw:font-semibold tw:text-gray-900 tw:m-0 tw:mb-4",children:["Saved Comparison Tables",n.length>0&&s.jsxs("em",{className:"tw:text-sm tw:font-light tw:text-gray-900 tw:ml-2",children:[n.length," table(s)"]})]}),n.length===0?s.jsx(Fe,{children:s.jsx(Ge,{children:s.jsxs("div",{className:"tw:flex tw:items-start tw:gap-3",children:[s.jsx("div",{className:"tw:shrink-0",children:s.jsx("span",{className:"tw:flex tw:items-center tw:justify-center tw:w-6 tw:h-6 tw:bg-gray-100 tw:text-gray-400 tw:rounded-full",children:s.jsx(oE,{})})}),s.jsxs("div",{className:"tw:flex-1",children:[s.jsx("h3",{className:"tw:text-sm tw:font-semibold tw:text-gray-900 tw:m-0 tw:mb-2",children:"No Comparison Tables Yet"}),s.jsx("p",{className:"tw:text-sm tw:text-gray-600 tw:m-0",children:'Create a table above or add products from search results using the "+ Compare" button.'})]})]})})}):s.jsx("div",{className:"tw:grid tw:grid-cols-1 tw:md:grid-cols-2 tw:gap-3",children:n.map(k=>s.jsx(Fe,{children:s.jsx(Ge,{className:"tw:p-4",children:s.jsxs("div",{className:"tw:flex tw:items-start tw:gap-3",children:[s.jsx("div",{className:"tw:shrink-0",children:s.jsx("span",{className:"tw:flex tw:items-center tw:justify-center tw:w-10 tw:h-10 tw:bg-blue-100 tw:text-blue-600 tw:rounded-lg",children:s.jsx(oE,{})})}),s.jsxs("div",{className:"tw:flex-1 tw:min-w-0",children:[s.jsxs("div",{className:"tw:flex tw:items-center tw:gap-2 tw:mb-1",children:[s.jsx("h3",{className:"tw:text-sm tw:font-semibold tw:text-gray-900 tw:m-0 tw:truncate",children:k.name}),s.jsxs("span",{className:"tw:px-2 tw:py-0.5 tw:text-xs tw:bg-gray-100 tw:text-gray-600 tw:rounded",children:[k.product_count," products"]})]}),s.jsxs("div",{className:"tw:flex tw:items-center tw:gap-2 tw:mt-2",children:[s.jsxs("code",{className:"tw:bg-gray-50 tw:border tw:border-gray-200 tw:px-2 tw:py-1 tw:rounded tw:text-xs tw:text-gray-700 tw:flex-1 tw:overflow-hidden tw:text-ellipsis",children:['[psfa_comparison id="',k.id,'"]']}),s.jsx("button",{type:"button",onClick:()=>y(k.id),className:"tw:px-3 tw:py-1.5 tw:text-xs tw:font-medium tw:text-blue-600 tw:bg-blue-50 tw:border tw:border-blue-200 tw:rounded-lg tw:hover:bg-blue-100 tw:cursor-pointer tw:transition-colors",children:"Edit"}),s.jsx("button",{type:"button",onClick:()=>g(k.id),className:"tw:px-3 tw:py-1.5 tw:text-xs tw:font-medium tw:bg-brand-primary tw:text-white tw:border-0 tw:rounded-lg tw:hover:bg-brand-hover tw:cursor-pointer tw:transition-colors",children:c===k.id?"Copied!":"Copy"}),s.jsx("button",{type:"button",onClick:()=>w(k.id),className:"tw:px-3 tw:py-1.5 tw:text-xs tw:font-medium tw:text-red-600 tw:bg-red-50 tw:border tw:border-red-200 tw:rounded-lg tw:hover:bg-red-100 tw:cursor-pointer tw:transition-colors",children:"Delete"})]})]})]})})},k.id))})]}),s.jsx(aE,{}),s.jsx(X2,{open:m.isOpen,onOpenChange:k=>!k&&S(),children:s.jsxs(Bh,{className:"tw:max-w-2xl tw:max-h-[85vh] tw:overflow-y-auto",children:[s.jsx(Uh,{children:s.jsx(Hh,{children:"Edit Table"})}),m.loading?s.jsx("div",{className:"tw:text-center tw:py-8 tw:text-gray-500",children:"Loading..."}):s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"tw:mb-4",children:[s.jsx(Je,{className:"tw:mb-1",children:"Table Name"}),s.jsx(ut,{type:"text",className:"tw:mt-3",value:m.tableName,onChange:k=>d(B=>({...B,tableName:k.target.value}))})]}),s.jsxs("div",{className:"tw:mb-4",children:[s.jsx(Je,{className:"tw:mb-2",children:"Products (drag to reorder)"}),s.jsx("div",{className:"tw:border tw:mt-3 tw:border-gray-200 tw:rounded-lg tw:min-h-[100px] tw:bg-gray-50 tw:overflow-hidden",children:m.products.length===0?s.jsx("div",{className:"tw:p-4 tw:text-center tw:text-gray-500 tw:text-sm",children:"No products yet. Add by ASIN below."}):s.jsx("div",{className:"tw:divide-y tw:divide-gray-200",children:m.products.map((k,B)=>s.jsx("div",{className:"tw:p-3 tw:bg-white",draggable:!0,onDragStart:()=>T(B),onDragEnter:()=>O(B),onDragEnd:D,onDragOver:U=>U.preventDefault(),children:s.jsxs("div",{className:"tw:flex tw:items-start tw:gap-3",children:[s.jsx("div",{className:"tw:text-gray-400 tw:cursor-move tw:select-none tw:text-lg tw:leading-none tw:pt-2",children:"≡"}),k.image_url?s.jsx("img",{src:k.image_url,alt:"",className:"tw:w-12 tw:h-12 tw:object-contain tw:rounded tw:bg-gray-50"}):s.jsx("div",{className:"tw:w-12 tw:h-12 tw:bg-gray-100 tw:rounded"}),s.jsxs("div",{className:"tw:flex-1 tw:min-w-0",children:[s.jsx("div",{className:"tw:w-102 tw:text-sm tw:font-medium tw:text-gray-900 tw:truncate",children:k.title||"Untitled"}),s.jsx("div",{className:"tw:text-xs tw:text-gray-500 tw:mb-2",children:k.asin}),s.jsx(zi,{delayDuration:200,children:s.jsxs("div",{className:"tw:flex tw:items-end tw:gap-3 tw:text-xs",children:[s.jsxs("div",{children:[s.jsx(Yl,{label:"Rating",tooltip:"Star rating (0 - 5). Amazon's API does not reliably return review data, so ratings are set manually here."}),s.jsx(ut,{type:"number",step:"0.1",min:"0",max:"5",value:k.rating??"",onChange:U=>R(k.asin,"rating",U.target.value),className:"tw:w-16 tw:h-7 tw:px-1.5 tw:text-xs tw:shadow-none",placeholder:"-"})]}),s.jsxs("div",{children:[s.jsx(Yl,{label:"Reviews",tooltip:"Review count shown next to the stars. Set manually - Amazon's API does not reliably provide this data."}),s.jsx(ut,{type:"number",min:"0",value:k.review_count??"",onChange:U=>R(k.asin,"review_count",U.target.value),className:"tw:w-20 tw:h-7 tw:px-1.5 tw:text-xs tw:shadow-none",placeholder:"-"})]}),s.jsxs("div",{children:[s.jsx(Yl,{label:"Badge",tooltip:"Winner badge displayed on the table"}),s.jsxs(Yn,{value:k.badge_type||"none",onValueChange:U=>R(k.asin,"badge_type",U),children:[s.jsx(Dn,{className:"tw:w-auto tw:h-7 tw:px-2 tw:text-xs tw:shadow-none tw:gap-1 tw:whitespace-nowrap",children:s.jsx(qn,{})}),s.jsx(On,{children:J7.map(U=>{const C=U.value!=="none"?nE[U.value]:null;return s.jsx(kn,{value:U.value,className:"tw:text-xs",children:s.jsxs("span",{className:"tw:flex tw:items-center tw:gap-1.5",children:[C&&s.jsx(C,{className:"tw:h-3.5 tw:w-3.5 tw:text-muted-foreground"}),U.label]})},U.value)})})]})]})]})})]}),s.jsx("button",{onClick:()=>j(k.asin),className:"tw:px-2 tw:py-1 tw:text-xs tw:text-red-600 tw:bg-red-50 tw:border tw:border-red-200 tw:rounded tw:hover:bg-red-100 tw:cursor-pointer",children:"Remove"})]})},k.asin))})})]}),s.jsxs("div",{className:"tw:mb-4",children:[s.jsx(Je,{className:"tw:mb-1",children:"Add Product by ASIN"}),s.jsxs("form",{onSubmit:N,className:"tw:flex tw:gap-2 tw:mt-3",children:[s.jsx(ut,{type:"text",value:p,onChange:k=>h(k.target.value.toUpperCase()),placeholder:"B09XS7JWHH",pattern:"[A-Za-z0-9]{10}",className:"tw:flex-1 tw:uppercase"}),s.jsx("button",{type:"submit",className:"tw:px-4 tw:py-2 tw:bg-brand-primary tw:text-white tw:text-sm tw:font-medium tw:rounded-lg tw:hover:bg-brand-hover tw:transition-colors tw:cursor-pointer tw:border-0",children:"Add"})]})]}),s.jsxs("div",{className:"tw:p-3 tw:bg-gray-50 tw:rounded-lg tw:border tw:border-gray-200",children:[s.jsx(Je,{className:"tw:text-xs tw:text-gray-500 tw:mb-1",children:"Shortcode"}),s.jsxs("code",{className:"tw:text-sm tw:text-gray-700",children:['[psfa_comparison id="',m.tableId,'"]']})]})]}),s.jsx(W2,{children:s.jsx("button",{onClick:E,disabled:m.saving,className:"tw:px-4 tw:py-2 tw:bg-brand-primary tw:text-white tw:text-sm tw:font-medium tw:rounded-lg tw:hover:bg-brand-hover tw:transition-colors tw:cursor-pointer tw:border-0 tw:disabled:opacity-50",children:m.saving?"Saving...":"Save Changes"})})]})})]})}function r9(){return s.jsxs("div",{className:"tw:space-y-8",children:[s.jsxs("div",{children:[s.jsx("h2",{className:"tw:text-lg tw:font-semibold tw:text-gray-900 tw:m-0 tw:mb-4",children:"How It Works"}),s.jsxs("div",{className:"tw:grid tw:grid-cols-1 tw:md:grid-cols-3 tw:gap-4",children:[s.jsx(ql,{step:"1",title:"Search Products",description:"Visit your search page while logged in as admin.",icon:"search"}),s.jsx(ql,{step:"2",title:'Click "+ Compare"',description:'Click "+ Compare" on products you want to compare side-by-side.',icon:"plus"}),s.jsx(ql,{step:"3",title:"Use Shortcode",description:"Copy the shortcode and paste it anywhere on your site.",icon:"copy"})]})]}),s.jsxs("div",{children:[s.jsx("h2",{className:"tw:text-lg tw:font-semibold tw:text-gray-900 tw:m-0 tw:mb-4",children:"Get Comparison Tables"}),s.jsx(Fe,{children:s.jsx(Ge,{children:s.jsxs("div",{className:"tw:flex tw:items-start tw:gap-3",children:[s.jsx("div",{className:"tw:shrink-0",children:s.jsx("span",{className:"tw:flex tw:items-center tw:justify-center tw:w-6 tw:h-6 tw:bg-blue-100 tw:text-blue-600 tw:rounded-full",children:s.jsx(s9,{})})}),s.jsxs("div",{className:"tw:flex-1",children:[s.jsxs("div",{className:"tw:flex tw:items-center tw:gap-2 tw:mb-2",children:[s.jsx("h3",{className:"tw:text-sm tw:font-semibold tw:text-gray-900 tw:m-0",children:"Premium Add-on"}),s.jsx("span",{className:"tw:px-2 tw:py-0.5 tw:text-xs tw:font-medium tw:border tw:border-solid tw:border-blue-300 tw:bg-blue-50 tw:text-blue-700 tw:rounded",children:"$19/year"})]}),s.jsx("p",{className:"tw:text-sm tw:text-gray-600 tw:m-0 tw:mb-3",children:"Create beautiful side-by-side comparison tables to help visitors make informed purchase decisions."}),s.jsxs("ul",{className:"tw:text-sm tw:text-gray-600 tw:m-0 tw:p-0 tw:mb-4 tw:list-none",children:[s.jsxs("li",{className:"tw:flex tw:items-center tw:gap-2 tw:mb-1",children:[s.jsx(qi,{className:"tw:text-green-500"})," Unlimited comparison tables"]}),s.jsxs("li",{className:"tw:flex tw:items-center tw:gap-2 tw:mb-1",children:[s.jsx(qi,{className:"tw:text-green-500"})," Drag-and-drop product ordering"]}),s.jsxs("li",{className:"tw:flex tw:items-center tw:gap-2 tw:mb-1",children:[s.jsx(qi,{className:"tw:text-green-500"})," Winner Highlighting (Best Value, Editor's Choice, etc.)"]}),s.jsxs("li",{className:"tw:flex tw:items-center tw:gap-2",children:[s.jsx(qi,{className:"tw:text-green-500"})," Responsive mobile design"]}),s.jsxs("li",{className:"tw:flex tw:items-center tw:gap-2",children:[s.jsx(qi,{className:"tw:text-green-500"})," Automatic product features bullets"]})]}),s.jsxs("div",{className:"tw:flex tw:items-center tw:gap-3",children:[s.jsx("a",{href:"https://paapiplugin.com/comparison-tables/",target:"_blank",rel:"noopener noreferrer",className:"tw:px-4 tw:py-2 tw:bg-brand-primary tw:text-white tw:text-sm tw:font-medium tw:rounded-lg tw:hover:bg-brand-hover tw:transition-colors tw:no-underline tw:focus:outline-none",children:"Get Comparison Tables"}),s.jsxs("span",{className:"tw:text-xs tw:text-gray-500",children:["*Requires ",s.jsx("a",{href:"https://paapiplugin.com/pricing/#plans",target:"_blank",rel:"noopener noreferrer",className:"tw:text-brand-primary tw:no-underline tw:hover:underline",children:"Premium"})]})]})]})]})})})]}),s.jsx(aE,{})]})}function aE(){return s.jsxs("div",{children:[s.jsx("h2",{className:"tw:text-lg tw:font-semibold tw:text-gray-900 tw:m-0 tw:mb-4",children:"Shortcode Options"}),s.jsx(Fe,{children:s.jsxs(Ge,{children:[s.jsxs("div",{className:"tw:mb-4",children:[s.jsx("h3",{className:"tw:text-sm tw:font-semibold tw:text-gray-900 tw:m-0 tw:mb-2",children:"Basic Usage"}),s.jsx("code",{className:"tw:block tw:bg-gray-50 tw:border tw:border-gray-200 tw:px-3 tw:py-2 tw:rounded tw:text-sm tw:text-gray-700",children:'[psfa_comparison id="5"]'})]}),s.jsxs("div",{className:"tw:border-t tw:border-gray-200 tw:pt-4 tw:mb-4",children:[s.jsx("h4",{className:"tw:text-sm tw:font-semibold tw:text-gray-900 tw:m-0 tw:mb-3",children:"Available Options"}),s.jsx("div",{className:"tw:overflow-x-auto tw:border tw:border-gray-200 tw:rounded-lg",children:s.jsxs("table",{className:"tw:w-full tw:text-sm",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"tw:bg-gray-50",children:[s.jsx("th",{className:"tw:text-left tw:py-2 tw:px-3 tw:font-semibold tw:text-gray-700 tw:border-b tw:border-gray-200",children:"Attribute"}),s.jsx("th",{className:"tw:text-left tw:py-2 tw:px-3 tw:font-semibold tw:text-gray-700 tw:border-b tw:border-gray-200",children:"Values"}),s.jsx("th",{className:"tw:text-left tw:py-2 tw:px-3 tw:font-semibold tw:text-gray-700 tw:border-b tw:border-gray-200",children:"Description"})]})}),s.jsxs("tbody",{className:"tw:text-gray-600",children:[s.jsxs("tr",{className:"tw:border-b tw:border-gray-200",children:[s.jsx("td",{className:"tw:py-2 tw:px-3",children:s.jsx("code",{className:"tw:bg-gray-100 tw:px-1.5 tw:py-0.5 tw:rounded tw:text-xs",children:"id"})}),s.jsx("td",{className:"tw:py-2 tw:px-3",children:"Table ID"}),s.jsx("td",{className:"tw:py-2 tw:px-3",children:"Required. The comparison table ID."})]}),s.jsxs("tr",{className:"tw:border-b tw:border-gray-200",children:[s.jsx("td",{className:"tw:py-2 tw:px-3",children:s.jsx("code",{className:"tw:bg-gray-100 tw:px-1.5 tw:py-0.5 tw:rounded tw:text-xs",children:"columns"})}),s.jsx("td",{className:"tw:py-2 tw:px-3",children:s.jsx("code",{className:"tw:text-xs",children:"image,title,price,rating,features,button"})}),s.jsx("td",{className:"tw:py-2 tw:px-3",children:"Comma-separated list of columns. Options: image, title, price, rating, prime, discount, features, button"})]}),s.jsxs("tr",{className:"tw:border-b tw:border-gray-200",children:[s.jsx("td",{className:"tw:py-2 tw:px-3",children:s.jsx("code",{className:"tw:bg-gray-100 tw:px-1.5 tw:py-0.5 tw:rounded tw:text-xs",children:"size"})}),s.jsxs("td",{className:"tw:py-2 tw:px-3",children:[s.jsx("code",{className:"tw:text-xs",children:"small"}),", ",s.jsx("code",{className:"tw:text-xs",children:"medium"}),", ",s.jsx("code",{className:"tw:text-xs",children:"large"})]}),s.jsx("td",{className:"tw:py-2 tw:px-3",children:"Table size. Default: medium"})]}),s.jsxs("tr",{className:"tw:border-b tw:border-gray-200",children:[s.jsx("td",{className:"tw:py-2 tw:px-3",children:s.jsx("code",{className:"tw:bg-gray-100 tw:px-1.5 tw:py-0.5 tw:rounded tw:text-xs",children:"layout"})}),s.jsxs("td",{className:"tw:py-2 tw:px-3",children:[s.jsx("code",{className:"tw:text-xs",children:"horizontal"}),", ",s.jsx("code",{className:"tw:text-xs",children:"vertical"})]}),s.jsx("td",{className:"tw:py-2 tw:px-3",children:"Table layout. Default: horizontal"})]}),s.jsxs("tr",{className:"tw:border-b tw:border-gray-200",children:[s.jsx("td",{className:"tw:py-2 tw:px-3",children:s.jsx("code",{className:"tw:bg-gray-100 tw:px-1.5 tw:py-0.5 tw:rounded tw:text-xs",children:"responsive"})}),s.jsxs("td",{className:"tw:py-2 tw:px-3",children:[s.jsx("code",{className:"tw:text-xs",children:"scroll"}),", ",s.jsx("code",{className:"tw:text-xs",children:"stack"})]}),s.jsx("td",{className:"tw:py-2 tw:px-3",children:"Mobile behavior. scroll = horizontal scroll (default), stack = card view."})]}),s.jsxs("tr",{children:[s.jsx("td",{className:"tw:py-2 tw:px-3",children:s.jsx("code",{className:"tw:bg-gray-100 tw:px-1.5 tw:py-0.5 tw:rounded tw:text-xs",children:"winner"})}),s.jsxs("td",{className:"tw:py-2 tw:px-3",children:[s.jsx("code",{className:"tw:text-xs",children:"true"}),", ",s.jsx("code",{className:"tw:text-xs",children:"false"})]}),s.jsx("td",{className:"tw:py-2 tw:px-3",children:"Highlight best value. Default: true"})]})]})]})})]}),s.jsxs("div",{className:"tw:border-t tw:border-gray-200 tw:pt-4",children:[s.jsx("h4",{className:"tw:text-sm tw:font-semibold tw:text-gray-900 tw:m-0 tw:mb-3",children:"Examples"}),s.jsxs("div",{className:"tw:space-y-2",children:[s.jsxs("div",{children:[s.jsx("span",{className:"tw:text-xs tw:text-gray-500 tw:block tw:mb-1",children:"Custom columns:"}),s.jsx("code",{className:"tw:block tw:bg-gray-50 tw:border tw:border-gray-200 tw:px-3 tw:py-2 tw:rounded tw:text-sm tw:text-gray-700",children:'[psfa_comparison id="5" columns="image,title,price,button"]'})]}),s.jsxs("div",{children:[s.jsx("span",{className:"tw:text-xs tw:text-gray-500 tw:block tw:mb-1",children:"Vertical layout:"}),s.jsx("code",{className:"tw:block tw:bg-gray-50 tw:border tw:border-gray-200 tw:px-3 tw:py-2 tw:rounded tw:text-sm tw:text-gray-700",children:'[psfa_comparison id="5" layout="vertical"]'})]})]})]})]})})]})}function ql({step:e,title:t,description:n,icon:a}){return s.jsx(Fe,{children:s.jsx(Ge,{children:s.jsxs("div",{className:"tw:flex tw:items-start tw:gap-3",children:[s.jsx("div",{className:"tw:shrink-0",children:s.jsxs("span",{className:"tw:flex tw:items-center tw:justify-center tw:w-6 tw:h-6 tw:bg-blue-100 tw:text-blue-600 tw:rounded-full",children:[a==="search"&&s.jsx(o9,{}),a==="plus"&&s.jsx(rE,{}),a==="copy"&&s.jsx(l9,{})]})}),s.jsxs("div",{className:"tw:flex-1",children:[s.jsxs("div",{className:"tw:flex tw:items-center tw:justify-between tw:gap-2 tw:mb-2",children:[s.jsx("h3",{className:"tw:text-sm tw:font-semibold tw:text-gray-900 tw:m-0",children:t}),s.jsxs("span",{className:"tw:px-2 tw:py-0.5 tw:text-xs tw:font-medium tw:border tw:border-solid tw:border-gray-300 tw:bg-gray-100 tw:text-gray-700 tw:rounded",children:["Step ",e]})]}),s.jsx("p",{className:"tw:text-sm tw:text-gray-600 tw:m-0",children:n})]})]})})})}function o9(){return s.jsx("svg",{className:"tw:w-4 tw:h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})}function rE(){return s.jsx("svg",{className:"tw:w-4 tw:h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4v16m8-8H4"})})}function l9(){return s.jsx("svg",{className:"tw:w-4 tw:h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"})})}function oE(){return s.jsx("svg",{className:"tw:w-5 tw:h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 10h18M3 14h18m-9-4v8m-7 0h14a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v8a2 2 0 002 2z"})})}function s9(){return s.jsx("svg",{className:"tw:w-4 tw:h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 3v4M3 5h4M6 17v4m-2-2h4m5-16l2.286 6.857L21 12l-5.714 2.143L13 21l-2.286-6.857L5 12l5.714-2.143L13 3z"})})}function qi({className:e}){return s.jsx("svg",{className:I("tw:w-4 tw:h-4",e),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})})}const i9=[{value:"none",label:"No Badge"},{value:"best_value",label:"Best Value"},{value:"editors_choice",label:"Editor's Choice"},{value:"best_rated",label:"Best Rated"},{value:"budget_pick",label:"Budget Pick"},{value:"premium_pick",label:"Premium Pick"}];function c9(){var n,a,r;const e=typeof psfaAdmin<"u"&&((n=psfaAdmin.addons)==null?void 0:n.productBoxes);return typeof psfaAdmin<"u"&&((a=psfaAdmin.addonNeedsUpgrade)==null?void 0:a.productBoxes)?s.jsx(u9,{addonName:"Product Boxes",deactivateUrl:((r=psfaAdmin.addonDeactivateUrls)==null?void 0:r.productBoxes)||""}):e?s.jsx(f9,{}):s.jsx(m9,{})}function u9({addonName:e,deactivateUrl:t}){const n=typeof psfaAdmin<"u"&&psfaAdmin.upgradeUrl?psfaAdmin.upgradeUrl:"https://paapiplugin.com/pricing/#plans";return s.jsx("div",{className:"tw:max-w-xl tw:mx-auto tw:mt-12",children:s.jsx(Fe,{children:s.jsx(Ge,{children:s.jsxs("div",{className:"tw:flex tw:items-start tw:gap-4",children:[s.jsx("div",{className:"tw:shrink-0",children:s.jsx("span",{className:"tw:flex tw:items-center tw:justify-center tw:w-10 tw:h-10 tw:bg-amber-100 tw:text-amber-600 tw:rounded-full",children:s.jsx(d9,{})})}),s.jsxs("div",{className:"tw:flex-1",children:[s.jsx("h2",{className:"tw:text-base tw:font-semibold tw:text-gray-900 tw:m-0 tw:mb-2",children:"Premium License Required"}),s.jsxs("p",{className:"tw:text-sm tw:text-gray-600 tw:m-0 tw:mb-4",children:[e," requires a Premium license for Paapi Product Search for Amazon. Choose one of the options below to continue:"]}),s.jsxs("div",{className:"tw:space-y-3 tw:mb-5",children:[s.jsxs("div",{className:"tw:flex tw:items-start tw:gap-2",children:[s.jsx("span",{className:"tw:flex tw:items-center tw:justify-center tw:w-5 tw:h-5 tw:bg-blue-100 tw:text-blue-600 tw:rounded-full tw:shrink-0 tw:mt-0.5 tw:text-xs tw:font-bold",children:"1"}),s.jsxs("p",{className:"tw:text-sm tw:text-gray-700 tw:m-0",children:[s.jsx("strong",{children:"Upgrade to Premium"})," to unlock ",e," and all premium features."]})]}),s.jsxs("div",{className:"tw:flex tw:items-start tw:gap-2",children:[s.jsx("span",{className:"tw:flex tw:items-center tw:justify-center tw:w-5 tw:h-5 tw:bg-gray-100 tw:text-gray-600 tw:rounded-full tw:shrink-0 tw:mt-0.5 tw:text-xs tw:font-bold",children:"2"}),s.jsxs("p",{className:"tw:text-sm tw:text-gray-700 tw:m-0",children:[s.jsx("strong",{children:"Deactivate the addon"})," to continue using the free version without it."]})]})]}),s.jsxs("div",{className:"tw:flex tw:items-center tw:gap-3",children:[s.jsx("a",{href:n,target:"_blank",rel:"noopener noreferrer",className:"tw:px-4 tw:py-2 tw:bg-brand-primary tw:text-white tw:text-sm tw:font-medium tw:rounded-lg tw:hover:bg-brand-hover tw:transition-colors tw:no-underline tw:focus:outline-none",children:"Upgrade to Premium"}),t&&s.jsx("a",{href:t,className:"tw:px-4 tw:py-2 tw:text-sm tw:font-medium tw:text-gray-700 tw:bg-gray-100 tw:rounded-lg tw:hover:bg-gray-200 tw:transition-colors tw:no-underline",children:"Deactivate Addon"})]})]})]})})})})}function d9(){return s.jsx("svg",{className:"tw:w-5 tw:h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})})}function f9(){var v;const e=(((v=psfaAdmin.addonData)==null?void 0:v.productBoxes)||[]).map(b=>({id:b.id,asin:b.asin,title:b.title,image:b.image,rating:b.rating??null,review_count:b.review_count??null,badge_type:b.badge_type??""})),[t,n]=f.useState(e),[a,r]=f.useState(null),[o,l]=f.useState(""),[i,c]=f.useState(!1),{confirm:u}=Pd(),m=async b=>{var g,y;if(await u({message:"Are you sure you want to delete this product box?",title:"Delete Product Box",confirmText:"Delete",variant:"danger"}))try{const S=new FormData;S.append("action","psfa_delete_product_box"),S.append("nonce",((g=psfaAdmin.addonNonces)==null?void 0:g.productBoxes)||""),S.append("asin",b);const R=await(await fetch(psfaAdmin.ajaxUrl,{method:"POST",body:S})).json();if(R.success){const N=t.filter(j=>j.asin!==b);n(N),psfaAdmin.addonData&&(psfaAdmin.addonData.productBoxes=N.map(j=>({id:j.id,asin:j.asin,title:j.title,image:j.image||"",rating:j.rating,review_count:j.review_count,badge_type:j.badge_type}))),Re.success("Product box deleted")}else Re.error(((y=R.data)==null?void 0:y.message)||"Failed to delete product box")}catch(S){console.error("Failed to delete box:",S)}},d=b=>{var g;const w=`[psfa_product_box asin="${b}"]`;navigator.clipboard.writeText(w),r(((g=t.find(y=>y.asin===b))==null?void 0:g.id)||null),setTimeout(()=>r(null),2e3)},p=async(b,w)=>{var y,S;const g=t.find(E=>E.asin===b);if(!(!g||w===(g.title||"")))try{const E=new FormData;E.append("action","psfa_update_product_title"),E.append("nonce",((y=psfaAdmin.addonNonces)==null?void 0:y.productBoxes)||""),E.append("asin",b),E.append("title",w);const N=await(await fetch(psfaAdmin.ajaxUrl,{method:"POST",body:E})).json();if(N.success){const j=t.map(T=>T.asin===b?{...T,title:w}:T);n(j),psfaAdmin.addonData&&(psfaAdmin.addonData.productBoxes=j.map(T=>({id:T.id,asin:T.asin,title:T.title,image:T.image||"",rating:T.rating,review_count:T.review_count,badge_type:T.badge_type}))),Re.success("Title updated")}else Re.error(((S=N.data)==null?void 0:S.message)||"Failed to update title")}catch(E){console.error("Failed to update title:",E),Re.error("Failed to update title")}},h=async(b,w,g)=>{var j,T;const y=t.find(O=>O.asin===b);if(!y)return;w==="badge_type"&&g==="none"&&(g="");const S=w==="badge_type"?y.badge_type:w==="rating"?y.rating!==null?String(y.rating):"":y.review_count!==null?String(y.review_count):"";if(g===S)return;const E=w==="rating"?g:y.rating!==null?String(y.rating):"",R=w==="review_count"?g:y.review_count!==null?String(y.review_count):"",N=w==="badge_type"?g:y.badge_type;try{const O=new FormData;O.append("action","psfa_update_box_settings"),O.append("nonce",((j=psfaAdmin.addonNonces)==null?void 0:j.productBoxes)||""),O.append("asin",b),O.append("rating",E),O.append("review_count",R),O.append("badge_type",N);const H=await(await fetch(psfaAdmin.ajaxUrl,{method:"POST",body:O})).json();if(H.success){const k=t.map(B=>B.asin===b?{...B,rating:E===""?null:parseFloat(E),review_count:R===""?null:parseInt(R,10),badge_type:N}:B);n(k),psfaAdmin.addonData&&(psfaAdmin.addonData.productBoxes=k.map(B=>({id:B.id,asin:B.asin,title:B.title,image:B.image||"",rating:B.rating,review_count:B.review_count,badge_type:B.badge_type}))),Re.success("Settings updated")}else Re.error(((T=H.data)==null?void 0:T.message)||"Failed to update settings")}catch(O){console.error("Failed to update settings:",O),Re.error("Failed to update settings")}},x=async b=>{var g,y,S,E,R;b.preventDefault();const w=o.trim().toUpperCase();if(!(!w||i)){if(!/^[A-Z0-9]{10}$/.test(w)){Re.error("Invalid ASIN format. Must be exactly 10 alphanumeric characters.");return}c(!0);try{const N=new FormData;N.append("action","psfa_add_product_by_asin"),N.append("nonce",((g=psfaAdmin.addonNonces)==null?void 0:g.productBoxes)||""),N.append("asin",w);const T=await(await fetch(psfaAdmin.ajaxUrl,{method:"POST",body:N})).json();if(T.success){l("");const O={id:Date.now(),asin:((y=T.data)==null?void 0:y.asin)||w,title:((S=T.data)==null?void 0:S.title)||"",image:((E=T.data)==null?void 0:E.image_url)||"",rating:null,review_count:null,badge_type:""},D=[...t,O];n(D),psfaAdmin.addonData&&(psfaAdmin.addonData.productBoxes=D.map(H=>({id:H.id,asin:H.asin,title:H.title,image:H.image||"",rating:H.rating,review_count:H.review_count,badge_type:H.badge_type}))),Re.success("Product box added")}else Re.error(((R=T.data)==null?void 0:R.message)||"Failed to add product")}catch(N){console.error("Failed to add box:",N)}finally{c(!1)}}};return s.jsxs("div",{className:"tw:space-y-8",children:[s.jsxs("div",{children:[s.jsx("h2",{className:"tw:text-lg tw:font-semibold tw:text-gray-900 tw:m-0 tw:mb-4",children:"How It Works"}),s.jsxs("div",{className:"tw:grid tw:grid-cols-1 tw:md:grid-cols-3 tw:gap-4",children:[s.jsx(Kl,{step:"1",title:"Search Products",description:"Visit your search page while logged in as admin.",icon:"search"}),s.jsx(Kl,{step:"2",title:'Click "+ Box"',description:'Click the "+ Box" button on any product card to save it, or add manually.',icon:"plus"}),s.jsx(Kl,{step:"3",title:"Use Shortcode",description:"Copy the shortcode and paste it anywhere on your site.",icon:"copy"})]})]}),s.jsxs("div",{children:[s.jsx("h2",{className:"tw:text-lg tw:font-semibold tw:text-gray-900 tw:m-0 tw:mb-4",children:"Add by ASIN"}),s.jsx(Fe,{children:s.jsx(Ge,{children:s.jsxs("div",{className:"tw:flex tw:items-start tw:gap-3",children:[s.jsx("div",{className:"tw:shrink-0",children:s.jsx("span",{className:"tw:flex tw:items-center tw:justify-center tw:w-6 tw:h-6 tw:bg-blue-100 tw:text-blue-600 tw:rounded-full",children:s.jsx(sE,{})})}),s.jsxs("div",{className:"tw:flex-1",children:[s.jsx("h3",{className:"tw:text-sm tw:font-semibold tw:text-gray-900 tw:m-0 tw:mb-2",children:"Add Product Directly"}),s.jsx("p",{className:"tw:text-sm tw:text-gray-600 tw:m-0 tw:mb-3",children:"Know the product ASIN? Add it without searching."}),s.jsxs("form",{onSubmit:x,className:"tw:flex tw:gap-2 tw:items-center",children:[s.jsx(ut,{type:"text",value:o,onChange:b=>l(b.target.value.toUpperCase()),placeholder:"B09XS7JWHH",pattern:"[A-Za-z0-9]{10}",required:!0,className:"tw:w-42 tw:uppercase"}),s.jsx("button",{type:"submit",disabled:i,className:"tw:px-4 tw:py-2 tw:bg-brand-primary tw:text-white tw:text-sm tw:font-medium tw:rounded-lg tw:hover:bg-brand-hover tw:transition-colors tw:cursor-pointer tw:border-0 tw:disabled:opacity-50",children:i?"Adding...":"Add"})]})]})]})})})]}),s.jsxs("div",{children:[s.jsxs("h2",{className:"tw:text-lg tw:font-semibold tw:text-gray-900 tw:m-0 tw:mb-4",children:["Saved Product Boxes",t.length>0&&s.jsxs("em",{className:"tw:text-sm tw:font-light tw:text-gray-900 tw:ml-2",children:[t.length," box(es)"]})]}),t.length===0?s.jsx(Fe,{children:s.jsx(Ge,{children:s.jsxs("div",{className:"tw:flex tw:items-start tw:gap-3",children:[s.jsx("div",{className:"tw:shrink-0",children:s.jsx("span",{className:"tw:flex tw:items-center tw:justify-center tw:w-6 tw:h-6 tw:bg-gray-100 tw:text-gray-400 tw:rounded-full",children:s.jsx(iE,{})})}),s.jsxs("div",{className:"tw:flex-1",children:[s.jsx("h3",{className:"tw:text-sm tw:font-semibold tw:text-gray-900 tw:m-0 tw:mb-2",children:"No Product Boxes Yet"}),s.jsx("p",{className:"tw:text-sm tw:text-gray-600 tw:m-0",children:'Visit your search page and click "+ Box" on any product to save it here.'})]})]})})}):s.jsx("div",{className:"tw:grid tw:grid-cols-1 tw:md:grid-cols-2 tw:gap-3",children:t.map(b=>s.jsx(Fe,{children:s.jsx(Ge,{className:"tw:p-4",children:s.jsxs("div",{className:"tw:flex tw:items-start tw:gap-3",children:[b.image?s.jsx("img",{src:b.image,alt:"",className:"tw:w-12 tw:h-12 tw:object-contain tw:bg-gray-50 tw:rounded-lg tw:shrink-0"}):s.jsx("div",{className:"tw:w-12 tw:h-12 tw:bg-gray-100 tw:rounded-lg tw:flex tw:items-center tw:justify-center tw:shrink-0",children:s.jsx(iE,{})}),s.jsxs("div",{className:"tw:flex-1 tw:min-w-0",children:[s.jsxs("div",{className:"tw:flex tw:items-center tw:gap-2 tw:mb-2",children:[s.jsx(ut,{type:"text",defaultValue:b.title||"",placeholder:"Enter title...",onBlur:w=>p(b.asin,w.target.value),className:"tw:text-sm tw:font-semibold tw:text-gray-900 tw:flex-1 tw:h-auto tw:px-2 tw:py-1 tw:border-transparent tw:hover:border-input tw:shadow-none"}),s.jsx("code",{className:"tw:bg-gray-100 tw:px-1.5 tw:py-0.5 tw:rounded tw:text-xs tw:text-gray-600 tw:shrink-0",children:b.asin})]}),s.jsx(zi,{delayDuration:200,children:s.jsxs("div",{className:"tw:flex tw:items-end tw:gap-3 tw:mb-2",children:[s.jsxs("div",{children:[s.jsx(Yl,{label:"Rating",tooltip:"Star rating (0 - 5). Amazon's API does not reliably return review data, so ratings are set manually here."}),s.jsx(ut,{type:"number",step:"0.1",min:"0",max:"5",defaultValue:b.rating!==null?b.rating:"",placeholder:"-",onBlur:w=>h(b.asin,"rating",w.target.value),className:"tw:w-16 tw:h-7 tw:px-1.5 tw:text-xs tw:shadow-none"})]}),s.jsxs("div",{children:[s.jsx(Yl,{label:"Reviews",tooltip:"Review count shown next to the stars. Set manually - Amazon's API does not reliably provide this data."}),s.jsx(ut,{type:"number",min:"0",defaultValue:b.review_count!==null?b.review_count:"",placeholder:"-",onBlur:w=>h(b.asin,"review_count",w.target.value),className:"tw:w-20 tw:h-7 tw:px-1.5 tw:text-xs tw:shadow-none"})]}),s.jsxs("div",{children:[s.jsx(Yl,{label:"Badge",tooltip:"Winner badge displayed on the product box"}),s.jsxs(Yn,{defaultValue:b.badge_type||"none",onValueChange:w=>h(b.asin,"badge_type",w),children:[s.jsx(Dn,{className:"tw:w-auto tw:h-7 tw:px-2 tw:text-xs tw:shadow-none tw:gap-1 tw:whitespace-nowrap",children:s.jsx(qn,{})}),s.jsx(On,{children:i9.map(w=>{const g=w.value!=="none"?nE[w.value]:null;return s.jsx(kn,{value:w.value,className:"tw:text-xs",children:s.jsxs("span",{className:"tw:flex tw:items-center tw:gap-1.5",children:[g&&s.jsx(g,{className:"tw:h-3.5 tw:w-3.5 tw:text-muted-foreground"}),w.label]})},w.value)})})]})]})]})}),s.jsxs("div",{className:"tw:flex tw:items-center tw:gap-2 tw:mt-2",children:[s.jsxs("code",{className:"tw:bg-gray-50 tw:border tw:border-gray-200 tw:px-2 tw:py-1 tw:rounded tw:text-xs tw:text-gray-700 tw:flex-1 tw:overflow-hidden tw:text-ellipsis",children:['[psfa_product_box asin="',b.asin,'"]']}),s.jsx("button",{type:"button",onClick:()=>d(b.asin),className:"tw:px-3 tw:py-1.5 tw:text-xs tw:font-medium tw:bg-brand-primary tw:text-white tw:border-0 tw:rounded-lg tw:hover:bg-brand-hover tw:cursor-pointer tw:transition-colors",children:a===b.id?"Copied!":"Copy"}),s.jsx("button",{type:"button",onClick:()=>m(b.asin),className:"tw:px-3 tw:py-1.5 tw:text-xs tw:font-medium tw:text-red-600 tw:bg-red-50 tw:border tw:border-red-200 tw:rounded-lg tw:hover:bg-red-100 tw:cursor-pointer tw:transition-colors",children:"Delete"})]})]})]})})},b.id))})]}),s.jsx(lE,{})]})}function m9(){return s.jsxs("div",{className:"tw:space-y-8",children:[s.jsxs("div",{children:[s.jsx("h2",{className:"tw:text-lg tw:font-semibold tw:text-gray-900 tw:m-0 tw:mb-4",children:"How It Works"}),s.jsxs("div",{className:"tw:grid tw:grid-cols-1 tw:md:grid-cols-3 tw:gap-4",children:[s.jsx(Kl,{step:"1",title:"Search Products",description:"Visit your search page while logged in as admin.",icon:"search"}),s.jsx(Kl,{step:"2",title:'Click "+ Box"',description:'Click the "+ Box" button on any product card to save it.',icon:"plus"}),s.jsx(Kl,{step:"3",title:"Use Shortcode",description:"Copy the shortcode and paste it anywhere on your site.",icon:"copy"})]})]}),s.jsxs("div",{children:[s.jsx("h2",{className:"tw:text-lg tw:font-semibold tw:text-gray-900 tw:m-0 tw:mb-4",children:"Get Product Boxes"}),s.jsx(Fe,{children:s.jsx(Ge,{children:s.jsxs("div",{className:"tw:flex tw:items-start tw:gap-3",children:[s.jsx("div",{className:"tw:shrink-0",children:s.jsx("span",{className:"tw:flex tw:items-center tw:justify-center tw:w-6 tw:h-6 tw:bg-blue-100 tw:text-blue-600 tw:rounded-full",children:s.jsx(w9,{})})}),s.jsxs("div",{className:"tw:flex-1",children:[s.jsxs("div",{className:"tw:flex tw:items-center tw:gap-2 tw:mb-2",children:[s.jsx("h3",{className:"tw:text-sm tw:font-semibold tw:text-gray-900 tw:m-0",children:"Premium Add-on"}),s.jsx("span",{className:"tw:px-2 tw:py-0.5 tw:text-xs tw:font-medium tw:border tw:border-solid tw:border-blue-300 tw:bg-blue-50 tw:text-blue-700 tw:rounded",children:"$19/year"})]}),s.jsx("p",{className:"tw:text-sm tw:text-gray-600 tw:m-0 tw:mb-3",children:"Display individual Amazon products beautifully with one-click save, multiple layouts, image carousels, and premium badges."}),s.jsxs("ul",{className:"tw:text-sm tw:text-gray-600 tw:m-0 tw:p-0 tw:mb-4 tw:list-none",children:[s.jsxs("li",{className:"tw:flex tw:items-center tw:gap-2 tw:mb-1",children:[s.jsx(Xl,{className:"tw:text-green-500"})," Card, horizontal & minimal layouts"]}),s.jsxs("li",{className:"tw:flex tw:items-center tw:gap-2 tw:mb-1",children:[s.jsx(Xl,{className:"tw:text-green-500"})," Image carousel with navigation"]}),s.jsxs("li",{className:"tw:flex tw:items-center tw:gap-2",children:[s.jsx(Xl,{className:"tw:text-green-500"})," Deal badges, discounts & Prime indicators"]}),s.jsxs("li",{className:"tw:flex tw:items-center tw:gap-2",children:[s.jsx(Xl,{className:"tw:text-green-500"})," Winner Highlighting (Best Value, Editor's Choice, etc.)"]}),s.jsxs("li",{className:"tw:flex tw:items-center tw:gap-2",children:[s.jsx(Xl,{className:"tw:text-green-500"})," Responsive mobile design"]}),s.jsxs("li",{className:"tw:flex tw:items-center tw:gap-2",children:[s.jsx(Xl,{className:"tw:text-green-500"})," Automatic product features bullets"]})]}),s.jsxs("div",{className:"tw:flex tw:items-center tw:gap-3",children:[s.jsx("a",{href:"https://paapiplugin.com/product-boxes/",target:"_blank",rel:"noopener noreferrer",className:"tw:px-4 tw:py-2 tw:bg-brand-primary tw:text-white tw:text-sm tw:font-medium tw:rounded-lg tw:hover:bg-brand-hover tw:transition-colors tw:no-underline tw:focus:outline-none",children:"Get Product Boxes"}),s.jsxs("span",{className:"tw:text-xs tw:text-gray-500",children:["*Requires ",s.jsx("a",{href:"https://paapiplugin.com/pricing/#plans",target:"_blank",rel:"noopener noreferrer",className:"tw:text-brand-primary tw:no-underline tw:hover:underline",children:"Premium"})]})]})]})]})})})]}),s.jsx(lE,{})]})}function lE(){return s.jsxs("div",{children:[s.jsx("h2",{className:"tw:text-lg tw:font-semibold tw:text-gray-900 tw:m-0 tw:mb-4",children:"Shortcode Options"}),s.jsx(Fe,{children:s.jsxs(Ge,{children:[s.jsxs("div",{className:"tw:mb-4",children:[s.jsx("h3",{className:"tw:text-sm tw:font-semibold tw:text-gray-900 tw:m-0 tw:mb-2",children:"Basic Usage"}),s.jsx("code",{className:"tw:block tw:bg-gray-50 tw:border tw:border-gray-200 tw:px-3 tw:py-2 tw:rounded tw:text-sm tw:text-gray-700",children:'[psfa_product_box asin="B09XS7JWHH"]'})]}),s.jsxs("div",{className:"tw:border-t tw:border-gray-200 tw:pt-4 tw:mb-4",children:[s.jsx("h4",{className:"tw:text-sm tw:font-semibold tw:text-gray-900 tw:m-0 tw:mb-3",children:"Available Options"}),s.jsx("div",{className:"tw:overflow-x-auto tw:border tw:border-gray-200 tw:rounded-lg",children:s.jsxs("table",{className:"tw:w-full tw:text-sm",children:[s.jsx("thead",{children:s.jsxs("tr",{className:"tw:bg-gray-50",children:[s.jsx("th",{className:"tw:text-left tw:py-2 tw:px-3 tw:font-semibold tw:text-gray-700 tw:border-b tw:border-gray-200",children:"Attribute"}),s.jsx("th",{className:"tw:text-left tw:py-2 tw:px-3 tw:font-semibold tw:text-gray-700 tw:border-b tw:border-gray-200",children:"Values"}),s.jsx("th",{className:"tw:text-left tw:py-2 tw:px-3 tw:font-semibold tw:text-gray-700 tw:border-b tw:border-gray-200",children:"Description"})]})}),s.jsxs("tbody",{className:"tw:text-gray-600",children:[s.jsxs("tr",{className:"tw:border-b tw:border-gray-200",children:[s.jsx("td",{className:"tw:py-2 tw:px-3",children:s.jsx("code",{className:"tw:bg-gray-100 tw:px-1.5 tw:py-0.5 tw:rounded tw:text-xs",children:"asin"})}),s.jsx("td",{className:"tw:py-2 tw:px-3",children:"Amazon ASIN"}),s.jsx("td",{className:"tw:py-2 tw:px-3",children:"Required. The product ASIN."})]}),s.jsxs("tr",{className:"tw:border-b tw:border-gray-200",children:[s.jsx("td",{className:"tw:py-2 tw:px-3",children:s.jsx("code",{className:"tw:bg-gray-100 tw:px-1.5 tw:py-0.5 tw:rounded tw:text-xs",children:"style"})}),s.jsxs("td",{className:"tw:py-2 tw:px-3",children:[s.jsx("code",{className:"tw:text-xs",children:"card"}),", ",s.jsx("code",{className:"tw:text-xs",children:"horizontal"}),", ",s.jsx("code",{className:"tw:text-xs",children:"minimal"})]}),s.jsx("td",{className:"tw:py-2 tw:px-3",children:"Layout style. Default: card"})]}),s.jsxs("tr",{children:[s.jsx("td",{className:"tw:py-2 tw:px-3",children:s.jsx("code",{className:"tw:bg-gray-100 tw:px-1.5 tw:py-0.5 tw:rounded tw:text-xs",children:"button"})}),s.jsx("td",{className:"tw:py-2 tw:px-3",children:"Custom text"}),s.jsx("td",{className:"tw:py-2 tw:px-3",children:'Button text. Default: "View on Amazon"'})]})]})]})})]}),s.jsxs("div",{className:"tw:border-t tw:border-gray-200 tw:pt-4",children:[s.jsx("h4",{className:"tw:text-sm tw:font-semibold tw:text-gray-900 tw:m-0 tw:mb-3",children:"Examples"}),s.jsxs("div",{className:"tw:space-y-2",children:[s.jsxs("div",{children:[s.jsx("span",{className:"tw:text-xs tw:text-gray-500 tw:block tw:mb-1",children:"Horizontal layout:"}),s.jsx("code",{className:"tw:block tw:bg-gray-50 tw:border tw:border-gray-200 tw:px-3 tw:py-2 tw:rounded tw:text-sm tw:text-gray-700",children:'[psfa_product_box asin="B09XS7JWHH" style="horizontal"]'})]}),s.jsxs("div",{children:[s.jsx("span",{className:"tw:text-xs tw:text-gray-500 tw:block tw:mb-1",children:"Minimal with custom button:"}),s.jsx("code",{className:"tw:block tw:bg-gray-50 tw:border tw:border-gray-200 tw:px-3 tw:py-2 tw:rounded tw:text-sm tw:text-gray-700",children:'[psfa_product_box asin="B09XS7JWHH" style="minimal" button="Check Price"]'})]})]})]})]})})]})}function Kl({step:e,title:t,description:n,icon:a}){return s.jsx(Fe,{children:s.jsx(Ge,{children:s.jsxs("div",{className:"tw:flex tw:items-start tw:gap-3",children:[s.jsx("div",{className:"tw:shrink-0",children:s.jsxs("span",{className:"tw:flex tw:items-center tw:justify-center tw:w-6 tw:h-6 tw:bg-blue-100 tw:text-blue-600 tw:rounded-full",children:[a==="search"&&s.jsx(p9,{}),a==="plus"&&s.jsx(sE,{}),a==="copy"&&s.jsx(h9,{})]})}),s.jsxs("div",{className:"tw:flex-1",children:[s.jsxs("div",{className:"tw:flex tw:items-center tw:justify-between tw:gap-2 tw:mb-2",children:[s.jsx("h3",{className:"tw:text-sm tw:font-semibold tw:text-gray-900 tw:m-0",children:t}),s.jsxs("span",{className:"tw:px-2 tw:py-0.5 tw:text-xs tw:font-medium tw:border tw:border-solid tw:border-gray-300 tw:bg-gray-100 tw:text-gray-700 tw:rounded",children:["Step ",e]})]}),s.jsx("p",{className:"tw:text-sm tw:text-gray-600 tw:m-0",children:n})]})]})})})}function p9(){return s.jsx("svg",{className:"tw:w-4 tw:h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})}function sE(){return s.jsx("svg",{className:"tw:w-4 tw:h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4v16m8-8H4"})})}function h9(){return s.jsx("svg",{className:"tw:w-4 tw:h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"})})}function iE(){return s.jsx("svg",{className:"tw:w-5 tw:h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M20 7l-8-4-8 4m16 0l-8 4m8-4v10l-8 4m0-10L4 7m8 4v10M4 7v10l8 4"})})}function w9(){return s.jsx("svg",{className:"tw:w-4 tw:h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 3v4M3 5h4M6 17v4m-2-2h4m5-16l2.286 6.857L21 12l-5.714 2.143L13 21l-2.286-6.857L5 12l5.714-2.143L13 3z"})})}function Xl({className:e}){return s.jsx("svg",{className:I("tw:w-4 tw:h-4",e),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})})}const Ud=30;function cE(e){if(e<=0)return"Expired";if(e<60)return`${e}s`;if(e<3600)return`${Math.floor(e/60)}m`;const t=Math.floor(e/3600),n=Math.floor(e%3600/60);return n>0?`${t}h ${n}m`:`${t}h`}function g9(e){if(!e)return"-";const n=Math.floor(Date.now()/1e3)-e;if(n<60)return"Just now";if(n<3600)return`${Math.floor(n/60)}m ago`;if(n<86400){const r=Math.floor(n/3600),o=Math.floor(n%3600/60);return o>0?`${r}h ${o}m ago`:`${r}h ago`}if(n<604800){const r=Math.floor(n/86400);return r===1?"1 day ago":`${r} days ago`}if(n<2592e3){const r=Math.floor(n/604800);return r===1?"1 week ago":`${r} weeks ago`}const a=Math.floor(n/2592e3);return a===1?"1 month ago":`${a} months ago`}function Hd(e){return`$${(e/100).toFixed(2)}`}function v9(e){if(!e)return[];const t=[];return e.category&&e.category!=="All"&&t.push(e.category),e.brand&&t.push(e.brand),e.condition&&t.push(e.condition),e.merchant&&t.push(e.merchant),e.sort&&t.push(e.sort),e.availability==="IncludeOutOfStock"&&t.push("All items"),e.min_price&&t.push(`≥${Hd(e.min_price)}`),e.max_price&&t.push(`≤${Hd(e.max_price)}`),e.has_deal==="1"&&t.push("Deals"),e.min_saving_percent&&t.push(`${e.min_saving_percent}%+ off`),e.min_reviews_rating&&t.push(`${e.min_reviews_rating}★+`),e.page&&e.page>1&&t.push(`Page ${e.page}`),e.results&&e.results>0&&t.push(`${e.results} results`),t}function y9(){const[e,t]=f.useState(null),[n,a]=f.useState(!0),[r,o]=f.useState(!1),[l,i]=f.useState(""),[c,u]=f.useState("all"),[m,d]=f.useState(null),[p,h]=f.useState(Ud),[x,v]=f.useState("created"),[b,w]=f.useState("desc"),g=f.useRef(null),y=D=>{x===D?w(H=>H==="asc"?"desc":"asc"):(v(D),w("asc"))},S=f.useCallback(async()=>{try{const D=new FormData;D.append("action","psfa_cache_stats"),D.append("nonce",(psfaAdmin==null?void 0:psfaAdmin.nonce)||"");const k=await(await fetch((psfaAdmin==null?void 0:psfaAdmin.ajaxUrl)||"",{method:"POST",body:D})).json();k.success&&t(k.data)}catch{}finally{a(!1)}},[]);f.useEffect(()=>{S()},[S]);const E=async()=>{var D,H;o(!0);try{const k=new FormData;k.append("action","psfa_clear_cache"),k.append("nonce",(psfaAdmin==null?void 0:psfaAdmin.nonce)||"");const U=await(await fetch((psfaAdmin==null?void 0:psfaAdmin.ajaxUrl)||"",{method:"POST",body:k})).json();U.success?(Re.success(((D=U.data)==null?void 0:D.message)||"Cache cleared"),i(""),u("all"),await S()):Re.error(((H=U.data)==null?void 0:H.message)||"Failed to clear cache")}catch{Re.error("Failed to clear cache")}finally{o(!1)}},R=e?e.products+e.searches:0,N=f.useMemo(()=>{if(!(e!=null&&e.entries))return[];const D=e.entries.filter(k=>{var B,U,C,L,_,z;if(c!=="all"&&k.type!==c)return!1;if(l){const $=l.toLowerCase();return k.label.toLowerCase().includes($)||k.key.toLowerCase().includes($)||((U=(B=k.meta)==null?void 0:B.keywords)==null?void 0:U.toLowerCase().includes($))||((L=(C=k.meta)==null?void 0:C.category)==null?void 0:L.toLowerCase().includes($))||((z=(_=k.meta)==null?void 0:_.brand)==null?void 0:z.toLowerCase().includes($))}return!0}),H=b==="asc"?1:-1;return D.sort((k,B)=>{switch(x){case"type":{const U=C=>{var L;return C.type==="product"?"a":((L=C.meta)==null?void 0:L.purpose)==="filter_options"?"b":"c"};return H*U(k).localeCompare(U(B))}case"entry":return H*k.label.localeCompare(B.label);case"created":return H*((k.created_at||0)-(B.created_at||0));case"expires":return H*(k.expires-B.expires);default:return 0}}),D},[e==null?void 0:e.entries,c,l,x,b]);f.useEffect(()=>{h(Ud)},[c,l,x,b]);const j=f.useMemo(()=>N.slice(0,p),[N,p]),T=p<N.length;f.useEffect(()=>{const D=g.current;if(!D||!T)return;const H=new IntersectionObserver(k=>{k[0].isIntersecting&&h(B=>Math.min(B+Ud,N.length))},{rootMargin:"200px"});return H.observe(D),()=>H.disconnect()},[T,N.length]);const O=({col:D})=>x!==D?s.jsx(kO,{className:"tw:size-3 tw:text-gray-300"}):b==="asc"?s.jsx(LO,{className:"tw:size-3 tw:text-gray-600"}):s.jsx(MO,{className:"tw:size-3 tw:text-gray-600"});return s.jsxs("div",{className:"tw:space-y-6",children:[s.jsxs("div",{className:"tw:grid tw:grid-cols-3 tw:gap-4",children:[s.jsx(Ew,{label:"Product Entries",value:(e==null?void 0:e.products)??0,sublabel:"1 hour TTL",isLoading:n}),s.jsx(Ew,{label:"Search Entries",value:(e==null?void 0:e.searches)??0,sublabel:"30 min TTL",isLoading:n}),s.jsx(Ew,{label:"Total Cached",value:R,sublabel:R>0?"API calls saved":"No cached data",isLoading:n})]}),s.jsxs("div",{className:"tw:flex tw:items-center tw:gap-3",children:[s.jsxs(hn,{onClick:E,disabled:r||R===0,children:[s.jsx(ZO,{className:"tw:size-4"}),r?"Clearing...":"Clear All Cache"]}),s.jsxs(hn,{variant:"outline",onClick:()=>{a(!0),S()},children:[s.jsx(GO,{className:"tw:size-4"}),"Refresh"]}),!n&&R===0&&s.jsx("span",{className:"tw:text-sm tw:text-gray-500",children:"Cache is empty. Entries will appear after visitors search on your site."})]}),!n&&R>0&&s.jsxs(Fe,{children:[s.jsx(Ni,{className:"tw:border-b tw:border-gray-200",children:s.jsxs("div",{className:"tw:flex tw:items-center tw:justify-between tw:gap-4",children:[s.jsxs(ji,{className:"tw:flex tw:items-center tw:gap-2 tw:text-base tw:shrink-0",children:[s.jsx(MS,{className:"tw:size-5 tw:text-brand-primary"}),"Cached Entries",s.jsxs(hd,{variant:"secondary",className:"tw:ml-1 tw:font-normal",children:[N.length,N.length!==R?` / ${R}`:""]})]}),s.jsxs("div",{className:"tw:flex tw:items-center tw:gap-2",children:[s.jsxs("div",{className:"tw:flex tw:items-center tw:gap-1 tw:bg-gray-100 tw:rounded-lg tw:p-0.5",children:[s.jsx(DS,{className:"tw:size-3.5 tw:text-gray-400 tw:ml-2"}),["all","product","search"].map(D=>s.jsx("button",{onClick:()=>u(D),className:`tw:px-2.5 tw:py-1 tw:text-xs tw:font-medium tw:rounded-md tw:transition-colors tw:border-none tw:cursor-pointer ${c===D?"tw:bg-white tw:text-gray-900 tw:shadow-sm":"tw:bg-transparent tw:text-gray-500 tw:hover:text-gray-700"}`,children:D==="all"?"All":D==="product"?"Products":"Searches"},D))]}),s.jsxs("div",{className:"tw:relative",children:[s.jsx(zS,{className:"tw:absolute tw:left-2.5 tw:top-1/2 tw:-translate-y-1/2 tw:size-3.5 tw:text-gray-400"}),s.jsx(ut,{placeholder:"Filter entries...",value:l,onChange:D=>i(D.target.value),className:"tw:pl-8 tw:h-8 tw:w-48 tw:text-sm"})]})]})]})}),s.jsxs(Ge,{className:"tw:p-0 tw:[&>div]:max-h-[480px] tw:[&>div]:overflow-y-auto tw:[&>div]:!overflow-x-hidden",children:[s.jsxs(zC,{className:"tw:table-fixed",children:[s.jsxs("colgroup",{children:[s.jsx("col",{className:"tw:w-28"}),s.jsx("col",{className:"tw:w-56"}),s.jsx("col",{}),s.jsx("col",{className:"tw:w-30"}),s.jsx("col",{className:"tw:w-20"})]}),s.jsx(PC,{className:"tw:bg-gray-50 tw:sticky tw:top-0 tw:z-10",children:s.jsxs(Pi,{children:[s.jsx(Gl,{className:"tw:px-4",children:s.jsxs("button",{onClick:()=>y("type"),className:"tw:flex tw:items-center tw:gap-1 tw:border-none tw:bg-transparent tw:cursor-pointer tw:font-medium tw:text-inherit tw:p-0",children:["Type ",s.jsx(O,{col:"type"})]})}),s.jsx(Gl,{className:"tw:px-4",children:s.jsxs("button",{onClick:()=>y("entry"),className:"tw:flex tw:items-center tw:gap-1 tw:border-none tw:bg-transparent tw:cursor-pointer tw:font-medium tw:text-inherit tw:p-0",children:["Entry ",s.jsx(O,{col:"entry"})]})}),s.jsx(Gl,{className:"tw:px-4",children:"Info"}),s.jsx(Gl,{className:"tw:px-4 tw:text-right",children:s.jsxs("button",{onClick:()=>y("created"),className:"tw:flex tw:items-center tw:gap-1 tw:ml-auto tw:border-none tw:bg-transparent tw:cursor-pointer tw:font-medium tw:text-inherit tw:p-0",children:["Created ",s.jsx(O,{col:"created"})]})}),s.jsx(Gl,{className:"tw:px-4 tw:text-right",children:s.jsxs("button",{onClick:()=>y("expires"),className:"tw:flex tw:items-center tw:gap-1 tw:ml-auto tw:border-none tw:bg-transparent tw:cursor-pointer tw:font-medium tw:text-inherit tw:p-0",children:["TTL ",s.jsx(O,{col:"expires"})]})})]})}),s.jsx(BC,{children:N.length===0?s.jsx(Pi,{children:s.jsx(kr,{colSpan:5,className:"tw:text-center tw:py-8 tw:text-gray-500",children:"No entries match your filter."})}):s.jsxs(s.Fragment,{children:[j.map((D,H)=>{var B,U;const k=((B=D.meta)==null?void 0:B.purpose)==="filter_options";return s.jsxs(Pi,{className:`tw:cursor-pointer ${k?"tw:opacity-60":""}`,onClick:()=>d(D),children:[s.jsx(kr,{className:"tw:px-4",children:s.jsx(hd,{variant:"outline",className:D.type==="product"?"tw:bg-blue-50 tw:text-blue-700 tw:border-blue-200":k?"tw:bg-gray-50 tw:text-gray-500 tw:border-gray-200":"tw:bg-amber-50 tw:text-amber-700 tw:border-amber-200",children:s.jsx("span",{className:"tw:whitespace-nowrap",children:D.type==="product"?"Product":k?"Filter data":"Search"})})}),s.jsx(kr,{className:"tw:px-4 tw:overflow-hidden tw:text-ellipsis tw:whitespace-nowrap tw:text-gray-900",children:D.label}),s.jsx(kr,{className:"tw:px-4",children:D.type==="product"?s.jsxs("span",{className:"tw:text-xs tw:text-gray-400",children:[s.jsx("span",{className:"tw:font-mono",children:D.key}),((U=D.meta)==null?void 0:U.price)&&s.jsx("span",{className:"tw:ml-1.5 tw:text-gray-500 tw:font-sans",children:D.meta.price})]}):s.jsx("div",{className:"tw:flex tw:flex-wrap tw:gap-1",children:v9(D.meta).map(C=>s.jsx("span",{className:"tw:inline-flex tw:items-center tw:px-1.5 tw:py-0 tw:text-[10px] tw:font-medium tw:text-gray-500 tw:bg-gray-100 tw:rounded",children:C},C))})}),s.jsx(kr,{className:"tw:px-4 tw:text-right tw:text-xs tw:text-gray-500",children:D.created_at?s.jsx(zi,{delayDuration:200,children:s.jsxs(dw,{children:[s.jsx(fw,{asChild:!0,children:s.jsx("span",{className:"tw:cursor-default",children:g9(D.created_at)})}),s.jsx(_d,{children:new Date(D.created_at*1e3).toLocaleString()})]})}):"-"}),s.jsx(kr,{className:"tw:px-4 tw:text-right",children:s.jsx("span",{className:D.expires<=0?"tw:text-red-500":D.expires<300?"tw:text-amber-600":"tw:text-green-600",children:cE(D.expires)})})]},`${D.type}-${D.key}-${H}`)}),T&&s.jsx(Pi,{ref:g,children:s.jsx(kr,{colSpan:5,className:"tw:text-center tw:py-3 tw:text-xs tw:text-gray-400",children:"Loading more..."})})]})})]}),N.length>Ud&&s.jsxs("div",{className:"tw:px-4 tw:py-2 tw:border-t tw:border-gray-100 tw:text-xs tw:text-gray-400",children:["Showing ",Math.min(p,N.length)," of ",N.length," entries"]})]})]}),s.jsx(X2,{open:!!m,onOpenChange:D=>!D&&d(null),children:s.jsxs(Bh,{className:"tw:sm:max-w-md",children:[s.jsx(Uh,{children:s.jsxs(Hh,{className:"tw:flex tw:items-center tw:gap-2",children:[s.jsx(hd,{variant:"outline",className:(m==null?void 0:m.type)==="product"?"tw:bg-blue-50 tw:text-blue-700 tw:border-blue-200":"tw:bg-amber-50 tw:text-amber-700 tw:border-amber-200",children:(m==null?void 0:m.type)==="product"?"Product":"Search"}),"Cache Entry Details"]})}),m&&s.jsxs("div",{className:"tw:space-y-4",children:[m.type==="product"?s.jsx(x9,{entry:m}):s.jsx(b9,{entry:m}),s.jsxs("div",{className:"tw:flex tw:items-center tw:gap-2 tw:text-sm tw:pt-3 tw:border-t tw:border-gray-100",children:[s.jsx(UO,{className:"tw:size-3.5 tw:text-gray-400"}),s.jsx("span",{className:"tw:text-gray-500",children:"Expires in:"}),s.jsx("span",{className:m.expires<=0?"tw:font-medium tw:text-red-500":m.expires<300?"tw:font-medium tw:text-amber-600":"tw:font-medium tw:text-green-600",children:cE(m.expires)})]})]})]})}),s.jsxs(Fe,{children:[s.jsx(Ni,{className:"tw:border-b tw:border-gray-200",children:s.jsx(ji,{className:"tw:text-base",children:"How Caching Works"})}),s.jsx(Ge,{className:"tw:pt-4",children:s.jsxs("div",{className:"tw:grid tw:grid-cols-1 tw:md:grid-cols-2 tw:gap-6 tw:text-sm tw:text-gray-600",children:[s.jsxs("div",{children:[s.jsx("h4",{className:"tw:font-medium tw:text-gray-900 tw:m-0 tw:mb-1",children:"Search Cache (30 min)"}),s.jsx("p",{className:"tw:m-0",children:"When a visitor searches, the full API response is cached. Identical searches within 30 minutes are served instantly without hitting Amazon's API."})]}),s.jsxs("div",{children:[s.jsx("h4",{className:"tw:font-medium tw:text-gray-900 tw:m-0 tw:mb-1",children:"Product Cache (1 hour)"}),s.jsx("p",{className:"tw:m-0",children:"Individual product data is cached per ASIN. Shared across all addons (Product Boxes and Comparison Tables) so the same product is only fetched once."})]}),s.jsxs("div",{children:[s.jsx("h4",{className:"tw:font-medium tw:text-gray-900 tw:m-0 tw:mb-1",children:"Auto-Invalidation"}),s.jsx("p",{className:"tw:m-0",children:"Search cache is automatically cleared when you change your Marketplace or Associate Tag, ensuring results match your current settings."})]}),s.jsxs("div",{children:[s.jsx("h4",{className:"tw:font-medium tw:text-gray-900 tw:m-0 tw:mb-1",children:"Manual Clear"}),s.jsx("p",{className:"tw:m-0",children:'Use the "Clear All Cache" button above to force fresh data from Amazon. Useful after updating product listings or troubleshooting.'})]})]})})]})]})}function x9({entry:e}){const{meta:t}=e;return s.jsxs("div",{className:"tw:space-y-3",children:[(t==null?void 0:t.image)&&s.jsx("div",{className:"tw:flex tw:justify-center tw:py-2",children:s.jsx("img",{src:t.image,alt:t.title||"",className:"tw:h-24 tw:w-auto tw:object-contain tw:rounded"})}),s.jsx(Zl,{icon:s.jsx(IO,{className:"tw:size-3.5"}),label:"Title",value:(t==null?void 0:t.title)||e.label}),s.jsx(Zl,{icon:s.jsx(OS,{className:"tw:size-3.5"}),label:"ASIN",value:(t==null?void 0:t.asin)||e.key,mono:!0}),(t==null?void 0:t.price)&&s.jsx(Zl,{icon:s.jsx(XO,{className:"tw:size-3.5"}),label:"Price",value:t.price})]})}function b9({entry:e}){const{meta:t}=e,n=[];return t!=null&&t.category&&t.category!=="All"&&n.push({label:"Category",value:t.category}),t!=null&&t.brand&&n.push({label:"Brand",value:t.brand}),t!=null&&t.sort&&n.push({label:"Sort",value:t.sort}),t!=null&&t.condition&&n.push({label:"Condition",value:t.condition}),t!=null&&t.merchant&&n.push({label:"Merchant",value:t.merchant}),t!=null&&t.availability&&n.push({label:"Availability",value:t.availability==="IncludeOutOfStock"?"All items":t.availability}),t!=null&&t.min_price&&n.push({label:"Min Price",value:Hd(t.min_price)}),t!=null&&t.max_price&&n.push({label:"Max Price",value:Hd(t.max_price)}),(t==null?void 0:t.has_deal)==="1"&&n.push({label:"Has Deal",value:"Yes"}),t!=null&&t.min_saving_percent&&n.push({label:"Min Discount",value:`${t.min_saving_percent}%+`}),t!=null&&t.min_reviews_rating&&n.push({label:"Min Rating",value:`${t.min_reviews_rating}+ stars`}),t!=null&&t.page&&t.page>1&&n.push({label:"Page",value:String(t.page)}),s.jsxs("div",{className:"tw:space-y-3",children:[(t==null?void 0:t.purpose)==="filter_options"&&s.jsxs("div",{className:"tw:flex tw:items-center tw:gap-2 tw:px-3 tw:py-2 tw:bg-gray-50 tw:rounded-md tw:text-xs tw:text-gray-500",children:[s.jsx(DS,{className:"tw:size-3"}),"Unfiltered pass - used to populate the brands dropdown and filter options."]}),s.jsx(Zl,{icon:s.jsx(zS,{className:"tw:size-3.5"}),label:"Keywords",value:(t==null?void 0:t.keywords)||"Unknown"}),(t==null?void 0:t.results)!==void 0&&t.results>0&&s.jsx(Zl,{icon:s.jsx(LS,{className:"tw:size-3.5"}),label:"Results",value:`${t.results} products`}),n.length>0&&s.jsxs("div",{className:"tw:pt-2 tw:border-t tw:border-gray-100",children:[s.jsxs("div",{className:"tw:flex tw:items-center tw:gap-1.5 tw:text-xs tw:font-medium tw:text-gray-500 tw:mb-2",children:[s.jsx(YO,{className:"tw:size-3"}),"Search Parameters"]}),s.jsx("div",{className:"tw:grid tw:grid-cols-2 tw:gap-x-4 tw:gap-y-1.5",children:n.map(a=>s.jsxs("div",{className:"tw:text-xs",children:[s.jsxs("span",{className:"tw:text-gray-400",children:[a.label,": "]}),s.jsx("span",{className:"tw:text-gray-700",children:a.value})]},a.label))})]}),s.jsx("div",{className:"tw:pt-2 tw:border-t tw:border-gray-100",children:s.jsx(Zl,{icon:s.jsx(OS,{className:"tw:size-3.5"}),label:"Cache Key",value:e.key,mono:!0})})]})}function Zl({icon:e,label:t,value:n,mono:a}){return s.jsxs("div",{className:"tw:flex tw:items-start tw:gap-2 tw:text-sm",children:[s.jsx("span",{className:"tw:text-gray-400 tw:mt-0.5 tw:shrink-0",children:e}),s.jsx("span",{className:"tw:text-gray-500 tw:shrink-0 tw:w-20",children:t}),s.jsx("span",{className:`tw:text-gray-900 tw:break-all ${a?"tw:font-mono tw:text-xs tw:mt-0.5":""}`,children:n})]})}function Ew({label:e,value:t,sublabel:n,isLoading:a}){return s.jsx(Fe,{children:s.jsxs(Ge,{className:"tw:p-5",children:[s.jsx("p",{className:"tw:text-sm tw:font-medium tw:text-gray-500 tw:m-0",children:e}),s.jsx("p",{className:"tw:text-3xl tw:font-semibold tw:text-gray-900 tw:m-0 tw:mt-1",children:a?"-":t}),s.jsx("p",{className:"tw:text-xs tw:text-gray-400 tw:m-0 tw:mt-1",children:n})]})})}const uE={"/":{title:"API Credentials",description:"Configure your Amazon Product Advertising API credentials."},"/credentials":{title:"API Credentials",description:"Configure your Amazon Product Advertising API credentials."},"/features":{title:"Features",description:"View available features for your product search."},"/appearance":{title:"Appearance",description:"Configure colors, style, fonts, and dark mode."},"/layout":{title:"Layout",description:"Configure how products are displayed."},"/shortcode":{title:"Shortcode Builder",description:"Generate shortcodes for your pages."},"/cache":{title:"Cache",description:"View and manage cached API responses."},"/addon-comparison-tables":{title:"Comparison Tables",description:"Create product comparison tables."},"/addon-product-boxes":{title:"Product Boxes",description:"Create styled product display boxes."}};function S9(e){return[{key:"general",label:"General",items:[{to:"/credentials",label:"API Credentials",icon:kS},{to:"/features",label:"Features",icon:qO}]},{key:"appearance",label:"Appearance",items:[{to:"/appearance",label:"Appearance",icon:$O},{to:"/layout",label:"Layout",icon:VO}]},{key:"tools",label:"Tools",items:[{to:"/shortcode",label:"Shortcode Builder",icon:HO},{to:"/cache",label:"Cache",icon:MS}]},{key:"addons",label:"Add-ons",items:[{to:"/addon-comparison-tables",label:"Comparison Tables",icon:KO},{to:"/addon-product-boxes",label:"Product Boxes",icon:LS}]}]}function N9(){const t=Nr().pathname||"/",n=uE[t]||uE["/"],a=typeof psfaAdmin<"u"?psfaAdmin.isPremium:!1,r=typeof psfaAdmin<"u"?psfaAdmin.needsLicense:!1,o=typeof psfaAdmin<"u"?psfaAdmin.fsAffix:"";typeof psfaAdmin<"u"&&psfaAdmin.isMockMode;const l=typeof psfaAdmin<"u"?psfaAdmin.pluginUrl:"",i=typeof psfaAdmin<"u"?psfaAdmin.upgradeUrl:"https://paapiplugin.com/pricing/#plans",c=(u,m)=>u==="/credentials"&&t==="/"?!0:m;return s.jsx("div",{className:"tw:font-rubik tw:antialiased tw:min-w-[stretch]",children:s.jsxs("div",{className:"tw:flex tw:min-h-screen tw:h-full tw:bg-gray-50",children:[s.jsxs("aside",{className:"tw:w-64 tw:bg-white tw:border-r tw:border-gray-200 tw:flex tw:flex-col tw:shrink-0",children:[s.jsx("div",{className:"tw:px-6 tw:py-5 tw:border-b tw:border-gray-200",children:s.jsx("a",{href:"https://paapiplugin.com/",target:"_blank",rel:"noopener noreferrer",children:s.jsx("img",{src:`${l}src/assets/img/logo-dark-bold.png`,alt:"PA-API Plugin",className:"tw:h-7 tw:w-auto"})})}),s.jsx("nav",{className:"tw:flex-1 tw:py-4 tw:overflow-y-auto",children:S9().map(u=>s.jsxs("div",{className:"tw:mb-4",children:[s.jsx("div",{className:"tw:px-6 tw:py-2 tw:text-xs tw:font-bold tw:text-gray-500 tw:uppercase tw:tracking-wider",children:u.label}),s.jsx("ul",{className:"tw:mt-1 tw:list-none tw:m-0 tw:p-0",children:u.items.map(m=>s.jsx("li",{children:s.jsxs(ub,{to:m.to,className:({isActive:d})=>c(m.to,d)?"tw:flex tw:items-center tw:gap-3 tw:px-6 tw:py-2.5 tw:text-sm tw:font-medium tw:text-primary tw:bg-blue-50 tw:border-l-4 tw:border-solid tw:border-primary tw:no-underline":"tw:flex tw:items-center tw:gap-3 tw:px-6 tw:py-2.5 tw:text-sm tw:text-gray-700 tw:hover:bg-gray-50 tw:hover:text-gray-900 tw:border-l-4 tw:border-solid tw:border-transparent tw:no-underline",children:[s.jsx(m.icon,{className:"tw:size-4"}),m.label]})},m.to))})]},u.key))}),!a&&s.jsx("div",{className:"tw:p-4 tw:border-t tw:border-gray-200",children:s.jsxs("a",{href:i,target:"_blank",rel:"noopener noreferrer",className:"tw:flex tw:items-center tw:justify-center tw:gap-2 tw:w-full tw:px-4 tw:py-2.5 tw:bg-primary tw:text-white tw:text-sm tw:font-medium tw:rounded-lg tw:hover:bg-primary/90 tw:transition-colors tw:no-underline",children:[s.jsx("svg",{className:"tw:w-4 tw:h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:s.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 3v4M3 5h4M6 17v4m-2-2h4m5-16l2.286 6.857L21 12l-5.714 2.143L13 21l-2.286-6.857L5 12l5.714-2.143L13 3z"})}),"Upgrade to Premium"]})})]}),s.jsxs("main",{className:"tw:flex-1 tw:p-8",children:[r&&o&&s.jsxs("div",{className:"tw:mb-6 tw:p-4 tw:bg-amber-50 tw:border tw:border-amber-200 tw:rounded-lg tw:flex tw:items-center tw:gap-3",children:[s.jsx(kS,{className:"tw:size-5 tw:text-amber-600 tw:shrink-0"}),s.jsx("div",{className:"tw:flex-1",children:s.jsx("p",{className:"tw:text-sm tw:font-medium tw:text-amber-800 tw:m-0",children:"Premium version detected! Please activate your license to unlock all features."})}),s.jsx("a",{href:"#",className:`activate-license-trigger ${o} tw:px-4 tw:py-2 tw:bg-amber-600 tw:text-white tw:text-sm tw:font-medium tw:rounded-lg tw:hover:bg-amber-700 tw:transition-colors tw:no-underline tw:whitespace-nowrap`,children:"Activate License"})]}),s.jsxs("div",{className:"tw:mb-8",children:[s.jsx("h1",{className:"tw:text-2xl tw:font-semibold tw:text-gray-900 tw:m-0",children:n.title}),s.jsx("p",{className:"tw:mt-1 tw:text-sm tw:text-gray-500 tw:m-0",children:n.description})]}),s.jsx("div",{className:"tw:max-w-5xl",children:s.jsx(e4,{})})]})]})})}const dE={credentials:"/credentials",features:"/features",appearance:"/appearance",themes:"/appearance",layout:"/layout",customization:"/appearance",shortcode:"/shortcode","api-offers-test":"/api-offers","api-oauth-test":"/api-oauth",cache:"/cache","comparison-tables":"/addon-comparison-tables","product-boxes":"/addon-product-boxes"};function j9(){const t=new URLSearchParams(window.location.search).get("section");t&&dE[t]&&!window.location.hash&&(window.location.hash="#"+dE[t])}j9();const C9=C4([{path:"/",element:s.jsx(N9,{}),children:[{index:!0,element:s.jsx(XC,{})},{path:"credentials",element:s.jsx(XC,{})},{path:"features",element:s.jsx(Y7,{})},{path:"appearance",element:s.jsx(I7,{})},{path:"layout",element:s.jsx(O7,{})},{path:"shortcode",element:s.jsx(E7,{})},{path:"cache",element:s.jsx(y9,{})},{path:"addon-comparison-tables",element:s.jsx(e9,{})},{path:"addon-product-boxes",element:s.jsx(c9,{})}]}]);function E9(){return s.jsx(zi,{children:s.jsxs(p7,{children:[s.jsx(z4,{router:C9}),s.jsx(mP,{})]})})}const fE=document.getElementById("psfa-admin-root");fE&&u_.createRoot(fE).render(s.jsx(f.StrictMode,{children:s.jsx(E9,{})}))})();
