@moontra/moonui 2.3.10 → 2.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +73 -39
- package/dist/index.d.ts +73 -39
- package/dist/index.global.js +540 -38
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +1211 -574
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1210 -574
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/components/ui/index.ts +77 -0
- package/src/components/ui/input.tsx +92 -19
- package/src/components/ui/moon-logo.tsx +13 -16
- package/src/components/ui/pagination.tsx +1 -1
- package/src/components/ui/textarea.tsx +194 -20
package/dist/index.global.js
CHANGED
|
@@ -1,66 +1,161 @@
|
|
|
1
1
|
/** @license MoonUI v1.0.0 - MIT License - https://moonui.dev */
|
|
2
|
-
var tA=Object.create;var Wx=Object.defineProperty;var oA=Object.getOwnPropertyDescriptor;var rA=Object.getOwnPropertyNames;var aA=Object.getPrototypeOf,nA=Object.prototype.hasOwnProperty;var sA=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,o)=>(typeof require<"u"?require:t)[o]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var aa=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var iA=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of rA(t))!nA.call(e,a)&&a!==o&&Wx(e,a,{get:()=>t[a],enumerable:!(r=oA(t,a))||r.enumerable});return e};var b=(e,t,o)=>(o=e!=null?tA(aA(e)):{},iA(t||!e||!e.__esModule?Wx(o,"default",{value:e,enumerable:!0}):o,e));var rv=aa(ye=>{"use strict";var om=Symbol.for("react.transitional.element"),lA=Symbol.for("react.portal"),uA=Symbol.for("react.fragment"),cA=Symbol.for("react.strict_mode"),dA=Symbol.for("react.profiler"),fA=Symbol.for("react.consumer"),mA=Symbol.for("react.context"),pA=Symbol.for("react.forward_ref"),gA=Symbol.for("react.suspense"),hA=Symbol.for("react.memo"),Zx=Symbol.for("react.lazy"),$x=Symbol.iterator;function xA(e){return e===null||typeof e!="object"?null:(e=$x&&e[$x]||e["@@iterator"],typeof e=="function"?e:null)}var Qx={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Jx=Object.assign,ev={};function Zn(e,t,o){this.props=e,this.context=t,this.refs=ev,this.updater=o||Qx}Zn.prototype.isReactComponent={};Zn.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")};Zn.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function tv(){}tv.prototype=Zn.prototype;function rm(e,t,o){this.props=e,this.context=t,this.refs=ev,this.updater=o||Qx}var am=rm.prototype=new tv;am.constructor=rm;Jx(am,Zn.prototype);am.isPureReactComponent=!0;var jx=Array.isArray,Ke={H:null,A:null,T:null,S:null,V:null},ov=Object.prototype.hasOwnProperty;function nm(e,t,o,r,a,n){return o=n.ref,{$$typeof:om,type:e,key:t,ref:o!==void 0?o:null,props:n}}function vA(e,t){return nm(e.type,t,void 0,void 0,void 0,e.props)}function sm(e){return typeof e=="object"&&e!==null&&e.$$typeof===om}function yA(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(o){return t[o]})}var Kx=/\/+/g;function tm(e,t){return typeof e=="object"&&e!==null&&e.key!=null?yA(""+e.key):t.toString(36)}function Xx(){}function bA(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(Xx,Xx):(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 Yn(e,t,o,r,a){var n=typeof e;(n==="undefined"||n==="boolean")&&(e=null);var s=!1;if(e===null)s=!0;else switch(n){case"bigint":case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case om:case lA:s=!0;break;case Zx:return s=e._init,Yn(s(e._payload),t,o,r,a)}}if(s)return a=a(e),s=r===""?"."+tm(e,0):r,jx(a)?(o="",s!=null&&(o=s.replace(Kx,"$&/")+"/"),Yn(a,t,o,"",function(u){return u})):a!=null&&(sm(a)&&(a=vA(a,o+(a.key==null||e&&e.key===a.key?"":(""+a.key).replace(Kx,"$&/")+"/")+s)),t.push(a)),1;s=0;var i=r===""?".":r+":";if(jx(e))for(var l=0;l<e.length;l++)r=e[l],n=i+tm(r,l),s+=Yn(r,t,o,n,a);else if(l=xA(e),typeof l=="function")for(e=l.call(e),l=0;!(r=e.next()).done;)r=r.value,n=i+tm(r,l++),s+=Yn(r,t,o,n,a);else if(n==="object"){if(typeof e.then=="function")return Yn(bA(e),t,o,r,a);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 s}function Fu(e,t,o){if(e==null)return e;var r=[],a=0;return Yn(e,r,"","",function(n){return t.call(o,n,a++)}),r}function CA(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(o){(e._status===0||e._status===-1)&&(e._status=1,e._result=o)},function(o){(e._status===0||e._status===-1)&&(e._status=2,e._result=o)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Yx=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)};function wA(){}ye.Children={map:Fu,forEach:function(e,t,o){Fu(e,function(){t.apply(this,arguments)},o)},count:function(e){var t=0;return Fu(e,function(){t++}),t},toArray:function(e){return Fu(e,function(t){return t})||[]},only:function(e){if(!sm(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};ye.Component=Zn;ye.Fragment=uA;ye.Profiler=dA;ye.PureComponent=rm;ye.StrictMode=cA;ye.Suspense=gA;ye.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Ke;ye.__COMPILER_RUNTIME={__proto__:null,c:function(e){return Ke.H.useMemoCache(e)}};ye.cache=function(e){return function(){return e.apply(null,arguments)}};ye.cloneElement=function(e,t,o){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var r=Jx({},e.props),a=e.key,n=void 0;if(t!=null)for(s in t.ref!==void 0&&(n=void 0),t.key!==void 0&&(a=""+t.key),t)!ov.call(t,s)||s==="key"||s==="__self"||s==="__source"||s==="ref"&&t.ref===void 0||(r[s]=t[s]);var s=arguments.length-2;if(s===1)r.children=o;else if(1<s){for(var i=Array(s),l=0;l<s;l++)i[l]=arguments[l+2];r.children=i}return nm(e.type,a,void 0,void 0,n,r)};ye.createContext=function(e){return e={$$typeof:mA,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:fA,_context:e},e};ye.createElement=function(e,t,o){var r,a={},n=null;if(t!=null)for(r in t.key!==void 0&&(n=""+t.key),t)ov.call(t,r)&&r!=="key"&&r!=="__self"&&r!=="__source"&&(a[r]=t[r]);var s=arguments.length-2;if(s===1)a.children=o;else if(1<s){for(var i=Array(s),l=0;l<s;l++)i[l]=arguments[l+2];a.children=i}if(e&&e.defaultProps)for(r in s=e.defaultProps,s)a[r]===void 0&&(a[r]=s[r]);return nm(e,n,void 0,void 0,null,a)};ye.createRef=function(){return{current:null}};ye.forwardRef=function(e){return{$$typeof:pA,render:e}};ye.isValidElement=sm;ye.lazy=function(e){return{$$typeof:Zx,_payload:{_status:-1,_result:e},_init:CA}};ye.memo=function(e,t){return{$$typeof:hA,type:e,compare:t===void 0?null:t}};ye.startTransition=function(e){var t=Ke.T,o={};Ke.T=o;try{var r=e(),a=Ke.S;a!==null&&a(o,r),typeof r=="object"&&r!==null&&typeof r.then=="function"&&r.then(wA,Yx)}catch(n){Yx(n)}finally{Ke.T=t}};ye.unstable_useCacheRefresh=function(){return Ke.H.useCacheRefresh()};ye.use=function(e){return Ke.H.use(e)};ye.useActionState=function(e,t,o){return Ke.H.useActionState(e,t,o)};ye.useCallback=function(e,t){return Ke.H.useCallback(e,t)};ye.useContext=function(e){return Ke.H.useContext(e)};ye.useDebugValue=function(){};ye.useDeferredValue=function(e,t){return Ke.H.useDeferredValue(e,t)};ye.useEffect=function(e,t,o){var r=Ke.H;if(typeof o=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return r.useEffect(e,t)};ye.useId=function(){return Ke.H.useId()};ye.useImperativeHandle=function(e,t,o){return Ke.H.useImperativeHandle(e,t,o)};ye.useInsertionEffect=function(e,t){return Ke.H.useInsertionEffect(e,t)};ye.useLayoutEffect=function(e,t){return Ke.H.useLayoutEffect(e,t)};ye.useMemo=function(e,t){return Ke.H.useMemo(e,t)};ye.useOptimistic=function(e,t){return Ke.H.useOptimistic(e,t)};ye.useReducer=function(e,t,o){return Ke.H.useReducer(e,t,o)};ye.useRef=function(e){return Ke.H.useRef(e)};ye.useState=function(e){return Ke.H.useState(e)};ye.useSyncExternalStore=function(e,t,o){return Ke.H.useSyncExternalStore(e,t,o)};ye.useTransition=function(){return Ke.H.useTransition()};ye.version="19.1.1"});var A=aa((S3,av)=>{"use strict";av.exports=rv()});var sv=aa(Ou=>{"use strict";var SA=Symbol.for("react.transitional.element"),RA=Symbol.for("react.fragment");function nv(e,t,o){var r=null;if(o!==void 0&&(r=""+o),t.key!==void 0&&(r=""+t.key),"key"in t){o={};for(var a in t)a!=="key"&&(o[a]=t[a])}else o=t;return t=o.ref,{$$typeof:SA,type:e,key:r,ref:t!==void 0?t:null,props:o}}Ou.Fragment=RA;Ou.jsx=nv;Ou.jsxs=nv});var D=aa((I3,iv)=>{"use strict";iv.exports=sv()});var gv=aa(Ht=>{"use strict";var FA=A();function pv(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var o=2;o<arguments.length;o++)t+="&args[]="+encodeURIComponent(arguments[o])}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 sa(){}var Bt={d:{f:sa,r:function(){throw Error(pv(522))},D:sa,C:sa,L:sa,m:sa,X:sa,S:sa,M:sa},p:0,findDOMNode:null},OA=Symbol.for("react.portal");function _A(e,t,o){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:OA,key:r==null?null:""+r,children:e,containerInfo:t,implementation:o}}var Ri=FA.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function Bu(e,t){if(e==="font")return"";if(typeof t=="string")return t==="use-credentials"?t:""}Ht.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Bt;Ht.createPortal=function(e,t){var o=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(pv(299));return _A(e,t,null,o)};Ht.flushSync=function(e){var t=Ri.T,o=Bt.p;try{if(Ri.T=null,Bt.p=2,e)return e()}finally{Ri.T=t,Bt.p=o,Bt.d.f()}};Ht.preconnect=function(e,t){typeof e=="string"&&(t?(t=t.crossOrigin,t=typeof t=="string"?t==="use-credentials"?t:"":void 0):t=null,Bt.d.C(e,t))};Ht.prefetchDNS=function(e){typeof e=="string"&&Bt.d.D(e)};Ht.preinit=function(e,t){if(typeof e=="string"&&t&&typeof t.as=="string"){var o=t.as,r=Bu(o,t.crossOrigin),a=typeof t.integrity=="string"?t.integrity:void 0,n=typeof t.fetchPriority=="string"?t.fetchPriority:void 0;o==="style"?Bt.d.S(e,typeof t.precedence=="string"?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:n}):o==="script"&&Bt.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:n,nonce:typeof t.nonce=="string"?t.nonce:void 0})}};Ht.preinitModule=function(e,t){if(typeof e=="string")if(typeof t=="object"&&t!==null){if(t.as==null||t.as==="script"){var o=Bu(t.as,t.crossOrigin);Bt.d.M(e,{crossOrigin:o,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0})}}else t==null&&Bt.d.M(e)};Ht.preload=function(e,t){if(typeof e=="string"&&typeof t=="object"&&t!==null&&typeof t.as=="string"){var o=t.as,r=Bu(o,t.crossOrigin);Bt.d.L(e,o,{crossOrigin:r,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})}};Ht.preloadModule=function(e,t){if(typeof e=="string")if(t){var o=Bu(t.as,t.crossOrigin);Bt.d.m(e,{as:typeof t.as=="string"&&t.as!=="script"?t.as:void 0,crossOrigin:o,integrity:typeof t.integrity=="string"?t.integrity:void 0})}else Bt.d.m(e)};Ht.requestFormReset=function(e){Bt.d.r(e)};Ht.unstable_batchedUpdates=function(e,t){return e(t)};Ht.useFormState=function(e,t,o){return Ri.H.useFormState(e,t,o)};Ht.useFormStatus=function(){return Ri.H.useHostTransitionStatus()};Ht.version="19.1.1"});var Jn=aa((W3,xv)=>{"use strict";function hv(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(hv)}catch(e){console.error(e)}}hv(),xv.exports=gv()});var vy=aa(xy=>{"use strict";var hs=A();function UE(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var GE=typeof Object.is=="function"?Object.is:UE,zE=hs.useState,qE=hs.useEffect,WE=hs.useLayoutEffect,$E=hs.useDebugValue;function jE(e,t){var o=t(),r=zE({inst:{value:o,getSnapshot:t}}),a=r[0].inst,n=r[1];return WE(function(){a.value=o,a.getSnapshot=t,Rm(a)&&n({inst:a})},[e,o,t]),qE(function(){return Rm(a)&&n({inst:a}),e(function(){Rm(a)&&n({inst:a})})},[e]),$E(o),o}function Rm(e){var t=e.getSnapshot;e=e.value;try{var o=t();return!GE(e,o)}catch{return!0}}function KE(e,t){return t()}var XE=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?KE:jE;xy.useSyncExternalStore=hs.useSyncExternalStore!==void 0?hs.useSyncExternalStore:XE});var by=aa(($q,yy)=>{"use strict";yy.exports=vy()});var Ju=b(A());var Qt=b(A(),1);var Co=b(A(),1),im=b(D(),1);function lv(e,t){let o=Co.createContext(t),r=n=>{let{children:s,...i}=n,l=Co.useMemo(()=>i,Object.values(i));return(0,im.jsx)(o.Provider,{value:l,children:s})};r.displayName=e+"Provider";function a(n){let s=Co.useContext(o);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${n}\` must be used within \`${e}\``)}return[r,a]}function Re(e,t=[]){let o=[];function r(n,s){let i=Co.createContext(s),l=o.length;o=[...o,s];let u=d=>{let{scope:f,children:m,...p}=d,g=f?.[e]?.[l]||i,h=Co.useMemo(()=>p,Object.values(p));return(0,im.jsx)(g.Provider,{value:h,children:m})};u.displayName=n+"Provider";function c(d,f){let m=f?.[e]?.[l]||i,p=Co.useContext(m);if(p)return p;if(s!==void 0)return s;throw new Error(`\`${d}\` must be used within \`${n}\``)}return[u,c]}let a=()=>{let n=o.map(s=>Co.createContext(s));return function(i){let l=i?.[e]||n;return Co.useMemo(()=>({[`__scope${e}`]:{...i,[e]:l}}),[i,l])}};return a.scopeName=e,[r,IA(a,...t)]}function IA(...e){let t=e[0];if(e.length===1)return t;let o=()=>{let r=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(n){let s=r.reduce((i,{useScope:l,scopeName:u})=>{let d=l(n)[`__scope${u}`];return{...i,...d}},{});return Co.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return o.scopeName=t.scopeName,o}var na=b(A(),1);var cv=b(A(),1);function uv(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function lo(...e){return t=>{let o=!1,r=e.map(a=>{let n=uv(a,t);return!o&&typeof n=="function"&&(o=!0),n});if(o)return()=>{for(let a=0;a<r.length;a++){let n=r[a];typeof n=="function"?n():uv(e[a],null)}}}}function ee(...e){return cv.useCallback(lo(...e),e)}var ut=b(A(),1);var Qn=b(D(),1);function uo(e){let t=LA(e),o=ut.forwardRef((r,a)=>{let{children:n,...s}=r,i=ut.Children.toArray(n),l=i.find(PA);if(l){let u=l.props.children,c=i.map(d=>d===l?ut.Children.count(u)>1?ut.Children.only(null):ut.isValidElement(u)?u.props.children:null:d);return(0,Qn.jsx)(t,{...s,ref:a,children:ut.isValidElement(u)?ut.cloneElement(u,void 0,c):null})}return(0,Qn.jsx)(t,{...s,ref:a,children:n})});return o.displayName=`${e}.Slot`,o}function LA(e){let t=ut.forwardRef((o,r)=>{let{children:a,...n}=o;if(ut.isValidElement(a)){let s=MA(a),i=TA(n,a.props);return a.type!==ut.Fragment&&(i.ref=r?lo(r,s):s),ut.cloneElement(a,i)}return ut.Children.count(a)>1?ut.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var dv=Symbol("radix.slottable");function fv(e){let t=({children:o})=>(0,Qn.jsx)(Qn.Fragment,{children:o});return t.displayName=`${e}.Slottable`,t.__radixId=dv,t}function PA(e){return ut.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===dv}function TA(e,t){let o={...t};for(let r in t){let a=e[r],n=t[r];/^on[A-Z]/.test(r)?a&&n?o[r]=(...i)=>{let l=n(...i);return a(...i),l}:a&&(o[r]=a):r==="style"?o[r]={...a,...n}:r==="className"&&(o[r]=[a,n].filter(Boolean).join(" "))}return{...e,...o}}function MA(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,o=t&&"isReactWarning"in t&&t.isReactWarning;return o?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,o=t&&"isReactWarning"in t&&t.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}var _u=b(D(),1),kA=b(A(),1);var AA=b(D(),1);function lr(e){let t=e+"CollectionProvider",[o,r]=Re(t),[a,n]=o(t,{collectionRef:{current:null},itemMap:new Map}),s=g=>{let{scope:h,children:v}=g,x=na.default.useRef(null),y=na.default.useRef(new Map).current;return(0,_u.jsx)(a,{scope:h,itemMap:y,collectionRef:x,children:v})};s.displayName=t;let i=e+"CollectionSlot",l=uo(i),u=na.default.forwardRef((g,h)=>{let{scope:v,children:x}=g,y=n(i,v),R=ee(h,y.collectionRef);return(0,_u.jsx)(l,{ref:R,children:x})});u.displayName=i;let c=e+"CollectionItemSlot",d="data-radix-collection-item",f=uo(c),m=na.default.forwardRef((g,h)=>{let{scope:v,children:x,...y}=g,R=na.default.useRef(null),C=ee(h,R),w=n(c,v);return na.default.useEffect(()=>(w.itemMap.set(R,{ref:R,...y}),()=>void w.itemMap.delete(R))),(0,_u.jsx)(f,{[d]:"",ref:C,children:x})});m.displayName=c;function p(g){let h=n(e+"CollectionConsumer",g);return na.default.useCallback(()=>{let x=h.collectionRef.current;if(!x)return[];let y=Array.from(x.querySelectorAll(`[${d}]`));return Array.from(h.itemMap.values()).sort((w,I)=>y.indexOf(w.ref.current)-y.indexOf(I.ref.current))},[h.collectionRef,h.itemMap])}return[{Provider:s,Slot:u,ItemSlot:m},p,r]}var V3=!!(typeof window<"u"&&window.document&&window.document.createElement);function V(e,t,{checkForDefaultPrevented:o=!0}={}){return function(a){if(e?.(a),o===!1||!a.defaultPrevented)return t?.(a)}}var wo=b(A(),1);var mv=b(A(),1),Le=globalThis?.document?mv.useLayoutEffect:()=>{};var Vu=b(A(),1);var DA=wo[" useInsertionEffect ".trim().toString()]||Le;function Fe({prop:e,defaultProp:t,onChange:o=()=>{},caller:r}){let[a,n,s]=EA({defaultProp:t,onChange:o}),i=e!==void 0,l=i?e:a;{let c=wo.useRef(e!==void 0);wo.useEffect(()=>{let d=c.current;d!==i&&console.warn(`${r} 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.`),c.current=i},[i,r])}let u=wo.useCallback(c=>{if(i){let d=NA(c)?c(e):c;d!==e&&s.current?.(d)}else n(c)},[i,e,n,s]);return[l,u]}function EA({defaultProp:e,onChange:t}){let[o,r]=wo.useState(e),a=wo.useRef(o),n=wo.useRef(t);return DA(()=>{n.current=t},[t]),wo.useEffect(()=>{a.current!==o&&(n.current?.(o),a.current=o)},[o,a]),[o,r,n]}function NA(e){return typeof e=="function"}var G3=Symbol("RADIX:SYNC_STATE");var vv=b(A(),1),yv=b(Jn(),1);var bv=b(D(),1),VA=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],H=VA.reduce((e,t)=>{let o=uo(`Primitive.${t}`),r=vv.forwardRef((a,n)=>{let{asChild:s,...i}=a,l=s?o:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,bv.jsx)(l,{...i,ref:n})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function es(e,t){e&&yv.flushSync(()=>e.dispatchEvent(t))}var wt=b(A(),1);var Zt=b(A(),1);var Cv=b(A(),1);function BA(e,t){return Cv.useReducer((o,r)=>t[o][r]??o,e)}var Oe=e=>{let{present:t,children:o}=e,r=HA(t),a=typeof o=="function"?o({present:r.isPresent}):Zt.Children.only(o),n=ee(r.ref,UA(a));return typeof o=="function"||r.isPresent?Zt.cloneElement(a,{ref:n}):null};Oe.displayName="Presence";function HA(e){let[t,o]=Zt.useState(),r=Zt.useRef(null),a=Zt.useRef(e),n=Zt.useRef("none"),s=e?"mounted":"unmounted",[i,l]=BA(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return Zt.useEffect(()=>{let u=Hu(r.current);n.current=i==="mounted"?u:"none"},[i]),Le(()=>{let u=r.current,c=a.current;if(c!==e){let f=n.current,m=Hu(u);e?l("MOUNT"):m==="none"||u?.display==="none"?l("UNMOUNT"):l(c&&f!==m?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,l]),Le(()=>{if(t){let u,c=t.ownerDocument.defaultView??window,d=m=>{let g=Hu(r.current).includes(CSS.escape(m.animationName));if(m.target===t&&g&&(l("ANIMATION_END"),!a.current)){let h=t.style.animationFillMode;t.style.animationFillMode="forwards",u=c.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=h)})}},f=m=>{m.target===t&&(n.current=Hu(r.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{c.clearTimeout(u),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:Zt.useCallback(u=>{r.current=u?getComputedStyle(u):null,o(u)},[])}}function Hu(e){return e?.animationName||"none"}function UA(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,o=t&&"isReactWarning"in t&&t.isReactWarning;return o?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,o=t&&"isReactWarning"in t&&t.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}var lm=b(A(),1);var GA=lm[" useId ".trim().toString()]||(()=>{}),zA=0;function Pe(e){let[t,o]=lm.useState(GA());return Le(()=>{e||o(r=>r??String(zA++))},[e]),e||(t?`radix-${t}`:"")}var Qa=b(D(),1),Uu="Collapsible",[qA,um]=Re(Uu),[WA,cm]=qA(Uu),wv=wt.forwardRef((e,t)=>{let{__scopeCollapsible:o,open:r,defaultOpen:a,disabled:n,onOpenChange:s,...i}=e,[l,u]=Fe({prop:r,defaultProp:a??!1,onChange:s,caller:Uu});return(0,Qa.jsx)(WA,{scope:o,disabled:n,contentId:Pe(),open:l,onOpenToggle:wt.useCallback(()=>u(c=>!c),[u]),children:(0,Qa.jsx)(H.div,{"data-state":fm(l),"data-disabled":n?"":void 0,...i,ref:t})})});wv.displayName=Uu;var Sv="CollapsibleTrigger",Rv=wt.forwardRef((e,t)=>{let{__scopeCollapsible:o,...r}=e,a=cm(Sv,o);return(0,Qa.jsx)(H.button,{type:"button","aria-controls":a.contentId,"aria-expanded":a.open||!1,"data-state":fm(a.open),"data-disabled":a.disabled?"":void 0,disabled:a.disabled,...r,ref:t,onClick:V(e.onClick,a.onOpenToggle)})});Rv.displayName=Sv;var dm="CollapsibleContent",Iv=wt.forwardRef((e,t)=>{let{forceMount:o,...r}=e,a=cm(dm,e.__scopeCollapsible);return(0,Qa.jsx)(Oe,{present:o||a.open,children:({present:n})=>(0,Qa.jsx)($A,{...r,ref:t,present:n})})});Iv.displayName=dm;var $A=wt.forwardRef((e,t)=>{let{__scopeCollapsible:o,present:r,children:a,...n}=e,s=cm(dm,o),[i,l]=wt.useState(r),u=wt.useRef(null),c=ee(t,u),d=wt.useRef(0),f=d.current,m=wt.useRef(0),p=m.current,g=s.open||i,h=wt.useRef(g),v=wt.useRef(void 0);return wt.useEffect(()=>{let x=requestAnimationFrame(()=>h.current=!1);return()=>cancelAnimationFrame(x)},[]),Le(()=>{let x=u.current;if(x){v.current=v.current||{transitionDuration:x.style.transitionDuration,animationName:x.style.animationName},x.style.transitionDuration="0s",x.style.animationName="none";let y=x.getBoundingClientRect();d.current=y.height,m.current=y.width,h.current||(x.style.transitionDuration=v.current.transitionDuration,x.style.animationName=v.current.animationName),l(r)}},[s.open,r]),(0,Qa.jsx)(H.div,{"data-state":fm(s.open),"data-disabled":s.disabled?"":void 0,id:s.contentId,hidden:!g,...n,ref:c,style:{"--radix-collapsible-content-height":f?`${f}px`:void 0,"--radix-collapsible-content-width":p?`${p}px`:void 0,...e.style},children:g&&a})});function fm(e){return e?"open":"closed"}var Gu=wv,ts=Rv,Ii=Iv;var zu=b(A(),1),jA=b(D(),1),KA=zu.createContext(void 0);function So(e){let t=zu.useContext(KA);return e||t||"ltr"}var ct=b(D(),1),Ho="Accordion",XA=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[pm,YA,ZA]=lr(Ho),[Wu,xG]=Re(Ho,[ZA,um]),gm=um(),Pv=Qt.default.forwardRef((e,t)=>{let{type:o,...r}=e,a=r,n=r;return(0,ct.jsx)(pm.Provider,{scope:e.__scopeAccordion,children:o==="multiple"?(0,ct.jsx)(tD,{...n,ref:t}):(0,ct.jsx)(eD,{...a,ref:t})})});Pv.displayName=Ho;var[Tv,QA]=Wu(Ho),[Mv,JA]=Wu(Ho,{collapsible:!1}),eD=Qt.default.forwardRef((e,t)=>{let{value:o,defaultValue:r,onValueChange:a=()=>{},collapsible:n=!1,...s}=e,[i,l]=Fe({prop:o,defaultProp:r??"",onChange:a,caller:Ho});return(0,ct.jsx)(Tv,{scope:e.__scopeAccordion,value:Qt.default.useMemo(()=>i?[i]:[],[i]),onItemOpen:l,onItemClose:Qt.default.useCallback(()=>n&&l(""),[n,l]),children:(0,ct.jsx)(Mv,{scope:e.__scopeAccordion,collapsible:n,children:(0,ct.jsx)(kv,{...s,ref:t})})})}),tD=Qt.default.forwardRef((e,t)=>{let{value:o,defaultValue:r,onValueChange:a=()=>{},...n}=e,[s,i]=Fe({prop:o,defaultProp:r??[],onChange:a,caller:Ho}),l=Qt.default.useCallback(c=>i((d=[])=>[...d,c]),[i]),u=Qt.default.useCallback(c=>i((d=[])=>d.filter(f=>f!==c)),[i]);return(0,ct.jsx)(Tv,{scope:e.__scopeAccordion,value:s,onItemOpen:l,onItemClose:u,children:(0,ct.jsx)(Mv,{scope:e.__scopeAccordion,collapsible:!0,children:(0,ct.jsx)(kv,{...n,ref:t})})})}),[oD,$u]=Wu(Ho),kv=Qt.default.forwardRef((e,t)=>{let{__scopeAccordion:o,disabled:r,dir:a,orientation:n="vertical",...s}=e,i=Qt.default.useRef(null),l=ee(i,t),u=YA(o),d=So(a)==="ltr",f=V(e.onKeyDown,m=>{if(!XA.includes(m.key))return;let p=m.target,g=u().filter(L=>!L.ref.current?.disabled),h=g.findIndex(L=>L.ref.current===p),v=g.length;if(h===-1)return;m.preventDefault();let x=h,y=0,R=v-1,C=()=>{x=h+1,x>R&&(x=y)},w=()=>{x=h-1,x<y&&(x=R)};switch(m.key){case"Home":x=y;break;case"End":x=R;break;case"ArrowRight":n==="horizontal"&&(d?C():w());break;case"ArrowDown":n==="vertical"&&C();break;case"ArrowLeft":n==="horizontal"&&(d?w():C());break;case"ArrowUp":n==="vertical"&&w();break}let I=x%v;g[I].ref.current?.focus()});return(0,ct.jsx)(oD,{scope:o,disabled:r,direction:a,orientation:n,children:(0,ct.jsx)(pm.Slot,{scope:o,children:(0,ct.jsx)(H.div,{...s,"data-orientation":n,ref:l,onKeyDown:r?void 0:f})})})}),qu="AccordionItem",[rD,hm]=Wu(qu),Av=Qt.default.forwardRef((e,t)=>{let{__scopeAccordion:o,value:r,...a}=e,n=$u(qu,o),s=QA(qu,o),i=gm(o),l=Pe(),u=r&&s.value.includes(r)||!1,c=n.disabled||e.disabled;return(0,ct.jsx)(rD,{scope:o,open:u,disabled:c,triggerId:l,children:(0,ct.jsx)(Gu,{"data-orientation":n.orientation,"data-state":_v(u),...i,...a,ref:t,disabled:c,open:u,onOpenChange:d=>{d?s.onItemOpen(r):s.onItemClose(r)}})})});Av.displayName=qu;var Dv="AccordionHeader",Ev=Qt.default.forwardRef((e,t)=>{let{__scopeAccordion:o,...r}=e,a=$u(Ho,o),n=hm(Dv,o);return(0,ct.jsx)(H.h3,{"data-orientation":a.orientation,"data-state":_v(n.open),"data-disabled":n.disabled?"":void 0,...r,ref:t})});Ev.displayName=Dv;var mm="AccordionTrigger",Nv=Qt.default.forwardRef((e,t)=>{let{__scopeAccordion:o,...r}=e,a=$u(Ho,o),n=hm(mm,o),s=JA(mm,o),i=gm(o);return(0,ct.jsx)(pm.ItemSlot,{scope:o,children:(0,ct.jsx)(ts,{"aria-disabled":n.open&&!s.collapsible||void 0,"data-orientation":a.orientation,id:n.triggerId,...i,...r,ref:t})})});Nv.displayName=mm;var Fv="AccordionContent",Ov=Qt.default.forwardRef((e,t)=>{let{__scopeAccordion:o,...r}=e,a=$u(Ho,o),n=hm(Fv,o),s=gm(o);return(0,ct.jsx)(Ii,{role:"region","aria-labelledby":n.triggerId,"data-orientation":a.orientation,...s,...r,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});Ov.displayName=Fv;function _v(e){return e?"open":"closed"}var Vv=Pv,Bv=Av,Hv=Ev,xm=Nv,vm=Ov;var Ku=b(A());var Uv=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),nD=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,o,r)=>r?r.toUpperCase():o.toLowerCase()),ym=e=>{let t=nD(e);return t.charAt(0).toUpperCase()+t.slice(1)},ju=(...e)=>e.filter((t,o,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===o).join(" ").trim(),Gv=e=>{for(let t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var Li=b(A());var zv={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"};var qv=(0,Li.forwardRef)(({color:e="currentColor",size:t=24,strokeWidth:o=2,absoluteStrokeWidth:r,className:a="",children:n,iconNode:s,...i},l)=>(0,Li.createElement)("svg",{ref:l,...zv,width:t,height:t,stroke:e,strokeWidth:r?Number(o)*24/Number(t):o,className:ju("lucide",a),...!n&&!Gv(i)&&{"aria-hidden":"true"},...i},[...s.map(([u,c])=>(0,Li.createElement)(u,c)),...Array.isArray(n)?n:[n]]));var B=(e,t)=>{let o=(0,Ku.forwardRef)(({className:r,...a},n)=>(0,Ku.createElement)(qv,{ref:n,iconNode:t,className:ju(`lucide-${Uv(ym(e))}`,`lucide-${e}`,r),...a}));return o.displayName=ym(e),o};var sD=[["path",{d:"M17 12H7",key:"16if0g"}],["path",{d:"M19 18H5",key:"18s9l3"}],["path",{d:"M21 6H3",key:"1jwq7v"}]],Pi=B("align-center",sD);var iD=[["path",{d:"M3 12h18",key:"1i2n21"}],["path",{d:"M3 18h18",key:"1h113x"}],["path",{d:"M3 6h18",key:"d0wm0j"}]],Ti=B("align-justify",iD);var lD=[["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M17 18H3",key:"1amg6g"}],["path",{d:"M21 6H3",key:"1jwq7v"}]],Mi=B("align-left",lD);var uD=[["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M21 18H7",key:"1ygte8"}],["path",{d:"M21 6H3",key:"1jwq7v"}]],ki=B("align-right",uD);var cD=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],os=B("arrow-down",cD);var dD=[["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"}]],rs=B("arrow-up-down",dD);var fD=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],as=B("arrow-up",fD);var mD=[["path",{d:"M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8",key:"mg9rjx"}]],Ai=B("bold",mD);var pD=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],Ja=B("calendar",pD);var gD=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],It=B("check",gD);var hD=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],ur=B("chevron-down",hD);var xD=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],Uo=B("chevron-left",xD);var vD=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Ut=B("chevron-right",vD);var yD=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Di=B("chevron-up",yD);var bD=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],Go=B("circle-alert",bD);var CD=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],ia=B("circle-check-big",CD);var wD=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],en=B("circle",wD);var SD=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Ei=B("clock",SD);var RD=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],Ni=B("code",RD);var ID=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],Fi=B("copy",ID);var LD=[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]],Oi=B("credit-card",LD);var PD=[["path",{d:"M11.562 3.266a.5.5 0 0 1 .876 0L15.39 8.87a1 1 0 0 0 1.516.294L21.183 5.5a.5.5 0 0 1 .798.519l-2.834 10.246a1 1 0 0 1-.956.734H5.81a1 1 0 0 1-.957-.734L2.02 6.02a.5.5 0 0 1 .798-.519l4.276 3.664a1 1 0 0 0 1.516-.294z",key:"1vdc57"}],["path",{d:"M5 21h14",key:"11awu3"}]],ns=B("crown",PD);var TD=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],cr=B("ellipsis",TD);var MD=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],_i=B("external-link",MD);var kD=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],tn=B("eye",kD);var AD=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],Vi=B("file-text",AD);var DD=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]],Bi=B("file",DD);var ED=[["circle",{cx:"12",cy:"18",r:"3",key:"1mpf1b"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["path",{d:"M18 9v2c0 .6-.4 1-1 1H7c-.6 0-1-.4-1-1V9",key:"1uq4wg"}],["path",{d:"M12 12v3",key:"158kv8"}]],Hi=B("git-fork",ED);var ND=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],on=B("image",ND);var FD=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],ss=B("info",FD);var OD=[["line",{x1:"19",x2:"10",y1:"4",y2:"4",key:"15jd3p"}],["line",{x1:"14",x2:"5",y1:"20",y2:"20",key:"bu0au3"}],["line",{x1:"15",x2:"9",y1:"4",y2:"20",key:"uljnxc"}]],Ui=B("italic",OD);var _D=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]],Gi=B("link",_D);var VD=[["path",{d:"M10 12h11",key:"6m4ad9"}],["path",{d:"M10 18h11",key:"11hvi2"}],["path",{d:"M10 6h11",key:"c7qv1k"}],["path",{d:"M4 10h2",key:"16xx2s"}],["path",{d:"M4 6h1v4",key:"cnovpq"}],["path",{d:"M6 18H4c0-1 2-2 2-3s-1-1.5-2-1",key:"m9a95d"}]],zi=B("list-ordered",VD);var BD=[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]],qi=B("list",BD);var HD=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],St=B("loader-circle",HD);var UD=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],is=B("lock",UD);var GD=[["path",{d:"M5 12h14",key:"1ays0h"}]],Wi=B("minus",GD);var zD=[["path",{d:"M9 18V5l12-2v13",key:"1jmyc2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["circle",{cx:"18",cy:"16",r:"3",key:"1hluhg"}]],$i=B("music",zD);var qD=[["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"}]],ls=B("palette",qD);var WD=[["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]],ji=B("phone",WD);var $D=[["path",{d:"m12 9-8.414 8.414A2 2 0 0 0 3 18.828v1.344a2 2 0 0 1-.586 1.414A2 2 0 0 1 3.828 21h1.344a2 2 0 0 0 1.414-.586L15 12",key:"1y3wsu"}],["path",{d:"m18 9 .4.4a1 1 0 1 1-3 3l-3.8-3.8a1 1 0 1 1 3-3l.4.4 3.4-3.4a1 1 0 1 1 3 3z",key:"110lr1"}],["path",{d:"m2 22 .414-.414",key:"jhxm08"}]],Xu=B("pipette",$D);var jD=[["path",{d:"M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"rib7q0"}],["path",{d:"M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"1ymkrd"}]],Ki=B("quote",jD);var KD=[["path",{d:"M21 7v6h-6",key:"3ptur4"}],["path",{d:"M3 17a9 9 0 0 1 9-9 9 9 0 0 1 6 2.3l3 2.7",key:"1kgawr"}]],Xi=B("redo",KD);var XD=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],rn=B("search",XD);var YD=[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],Jt=B("square-pen",YD);var ZD=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],us=B("star",ZD);var QD=[["path",{d:"M16 4H9a3 3 0 0 0-2.83 4",key:"43sutm"}],["path",{d:"M14 12a4 4 0 0 1 0 8H6",key:"nlfj13"}],["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}]],Yi=B("strikethrough",QD);var JD=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],la=B("triangle-alert",JD);var eE=[["path",{d:"M6 4v6a6 6 0 0 0 12 0V4",key:"9kb039"}],["line",{x1:"4",x2:"20",y1:"20",y2:"20",key:"nun2al"}]],Zi=B("underline",eE);var tE=[["path",{d:"M3 7v6h6",key:"1v2h90"}],["path",{d:"M21 17a9 9 0 0 0-9-9 9 9 0 0 0-6 2.3L3 13",key:"1r6uu6"}]],Qi=B("undo",tE);var oE=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],Ji=B("upload",oE);var rE=[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]],el=B("video",rE);var aE=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],co=B("x",aE);var nE=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],cs=B("zap",nE);function Wv(e){var t,o,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(o=Wv(e[t]))&&(r&&(r+=" "),r+=o)}else for(o in e)e[o]&&(r&&(r+=" "),r+=o);return r}function Yu(){for(var e,t,o=0,r="",a=arguments.length;o<a;o++)(e=arguments[o])&&(t=Wv(e))&&(r&&(r+=" "),r+=t);return r}var sE=e=>{let t=lE(e),{conflictingClassGroups:o,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{let i=s.split("-");return i[0]===""&&i.length!==1&&i.shift(),Yv(i,t)||iE(s)},getConflictingClassGroupIds:(s,i)=>{let l=o[s]||[];return i&&r[s]?[...l,...r[s]]:l}}},Yv=(e,t)=>{if(e.length===0)return t.classGroupId;let o=e[0],r=t.nextPart.get(o),a=r?Yv(e.slice(1),r):void 0;if(a)return a;if(t.validators.length===0)return;let n=e.join("-");return t.validators.find(({validator:s})=>s(n))?.classGroupId},$v=/^\[(.+)\]$/,iE=e=>{if($v.test(e)){let t=$v.exec(e)[1],o=t?.substring(0,t.indexOf(":"));if(o)return"arbitrary.."+o}},lE=e=>{let{theme:t,classGroups:o}=e,r={nextPart:new Map,validators:[]};for(let a in o)wm(o[a],r,a,t);return r},wm=(e,t,o,r)=>{e.forEach(a=>{if(typeof a=="string"){let n=a===""?t:jv(t,a);n.classGroupId=o;return}if(typeof a=="function"){if(uE(a)){wm(a(r),t,o,r);return}t.validators.push({validator:a,classGroupId:o});return}Object.entries(a).forEach(([n,s])=>{wm(s,jv(t,n),o,r)})})},jv=(e,t)=>{let o=e;return t.split("-").forEach(r=>{o.nextPart.has(r)||o.nextPart.set(r,{nextPart:new Map,validators:[]}),o=o.nextPart.get(r)}),o},uE=e=>e.isThemeGetter,cE=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,o=new Map,r=new Map,a=(n,s)=>{o.set(n,s),t++,t>e&&(t=0,r=o,o=new Map)};return{get(n){let s=o.get(n);if(s!==void 0)return s;if((s=r.get(n))!==void 0)return a(n,s),s},set(n,s){o.has(n)?o.set(n,s):a(n,s)}}};var dE=e=>{let{prefix:t,experimentalParseClassName:o}=e,r=a=>{let n=[],s=0,i=0,l=0,u;for(let p=0;p<a.length;p++){let g=a[p];if(s===0&&i===0){if(g===":"){n.push(a.slice(l,p)),l=p+1;continue}if(g==="/"){u=p;continue}}g==="["?s++:g==="]"?s--:g==="("?i++:g===")"&&i--}let c=n.length===0?a:a.substring(l),d=fE(c),f=d!==c,m=u&&u>l?u-l:void 0;return{modifiers:n,hasImportantModifier:f,baseClassName:d,maybePostfixModifierPosition:m}};if(t){let a=t+":",n=r;r=s=>s.startsWith(a)?n(s.substring(a.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:s,maybePostfixModifierPosition:void 0}}if(o){let a=r;r=n=>o({className:n,parseClassName:a})}return r},fE=e=>e.endsWith("!")?e.substring(0,e.length-1):e.startsWith("!")?e.substring(1):e,mE=e=>{let t=Object.fromEntries(e.orderSensitiveModifiers.map(r=>[r,!0]));return r=>{if(r.length<=1)return r;let a=[],n=[];return r.forEach(s=>{s[0]==="["||t[s]?(a.push(...n.sort(),s),n=[]):n.push(s)}),a.push(...n.sort()),a}},pE=e=>({cache:cE(e.cacheSize),parseClassName:dE(e),sortModifiers:mE(e),...sE(e)}),gE=/\s+/,hE=(e,t)=>{let{parseClassName:o,getClassGroupId:r,getConflictingClassGroupIds:a,sortModifiers:n}=t,s=[],i=e.trim().split(gE),l="";for(let u=i.length-1;u>=0;u-=1){let c=i[u],{isExternal:d,modifiers:f,hasImportantModifier:m,baseClassName:p,maybePostfixModifierPosition:g}=o(c);if(d){l=c+(l.length>0?" "+l:l);continue}let h=!!g,v=r(h?p.substring(0,g):p);if(!v){if(!h){l=c+(l.length>0?" "+l:l);continue}if(v=r(p),!v){l=c+(l.length>0?" "+l:l);continue}h=!1}let x=n(f).join(":"),y=m?x+"!":x,R=y+v;if(s.includes(R))continue;s.push(R);let C=a(v,h);for(let w=0;w<C.length;++w){let I=C[w];s.push(y+I)}l=c+(l.length>0?" "+l:l)}return l};function xE(){let e=0,t,o,r="";for(;e<arguments.length;)(t=arguments[e++])&&(o=Zv(t))&&(r&&(r+=" "),r+=o);return r}var Zv=e=>{if(typeof e=="string")return e;let t,o="";for(let r=0;r<e.length;r++)e[r]&&(t=Zv(e[r]))&&(o&&(o+=" "),o+=t);return o};function vE(e,...t){let o,r,a,n=s;function s(l){let u=t.reduce((c,d)=>d(c),e());return o=pE(u),r=o.cache.get,a=o.cache.set,n=i,i(l)}function i(l){let u=r(l);if(u)return u;let c=hE(l,o);return a(l,c),c}return function(){return n(xE.apply(null,arguments))}}var dt=e=>{let t=o=>o[e]||[];return t.isThemeGetter=!0,t},Qv=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Jv=/^\((?:(\w[\w-]*):)?(.+)\)$/i,yE=/^\d+\/\d+$/,bE=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,CE=/\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$/,wE=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,SE=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,RE=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ds=e=>yE.test(e),be=e=>!!e&&!Number.isNaN(Number(e)),ua=e=>!!e&&Number.isInteger(Number(e)),bm=e=>e.endsWith("%")&&be(e.slice(0,-1)),Lr=e=>bE.test(e),IE=()=>!0,LE=e=>CE.test(e)&&!wE.test(e),ey=()=>!1,PE=e=>SE.test(e),TE=e=>RE.test(e),ME=e=>!Q(e)&&!J(e),kE=e=>fs(e,ry,ey),Q=e=>Qv.test(e),an=e=>fs(e,ay,LE),Cm=e=>fs(e,FE,be),Kv=e=>fs(e,ty,ey),AE=e=>fs(e,oy,TE),Zu=e=>fs(e,ny,PE),J=e=>Jv.test(e),tl=e=>ms(e,ay),DE=e=>ms(e,OE),Xv=e=>ms(e,ty),EE=e=>ms(e,ry),NE=e=>ms(e,oy),Qu=e=>ms(e,ny,!0),fs=(e,t,o)=>{let r=Qv.exec(e);return r?r[1]?t(r[1]):o(r[2]):!1},ms=(e,t,o=!1)=>{let r=Jv.exec(e);return r?r[1]?t(r[1]):o:!1},ty=e=>e==="position"||e==="percentage",oy=e=>e==="image"||e==="url",ry=e=>e==="length"||e==="size"||e==="bg-size",ay=e=>e==="length",FE=e=>e==="number",OE=e=>e==="family-name",ny=e=>e==="shadow";var _E=()=>{let e=dt("color"),t=dt("font"),o=dt("text"),r=dt("font-weight"),a=dt("tracking"),n=dt("leading"),s=dt("breakpoint"),i=dt("container"),l=dt("spacing"),u=dt("radius"),c=dt("shadow"),d=dt("inset-shadow"),f=dt("text-shadow"),m=dt("drop-shadow"),p=dt("blur"),g=dt("perspective"),h=dt("aspect"),v=dt("ease"),x=dt("animate"),y=()=>["auto","avoid","all","avoid-page","page","left","right","column"],R=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],C=()=>[...R(),J,Q],w=()=>["auto","hidden","clip","visible","scroll"],I=()=>["auto","contain","none"],L=()=>[J,Q,l],P=()=>[ds,"full","auto",...L()],T=()=>[ua,"none","subgrid",J,Q],O=()=>["auto",{span:["full",ua,J,Q]},ua,J,Q],$=()=>[ua,"auto",J,Q],W=()=>["auto","min","max","fr",J,Q],N=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],q=()=>["start","end","center","stretch","center-safe","end-safe"],E=()=>["auto",...L()],G=()=>[ds,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...L()],M=()=>[e,J,Q],k=()=>[...R(),Xv,Kv,{position:[J,Q]}],re=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Se=()=>["auto","cover","contain",EE,kE,{size:[J,Q]}],F=()=>[bm,tl,an],j=()=>["","none","full",u,J,Q],Z=()=>["",be,tl,an],X=()=>["solid","dashed","dotted","double"],ue=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],_=()=>[be,bm,Xv,Kv],ce=()=>["","none",p,J,Q],he=()=>["none",be,J,Q],we=()=>["none",be,J,Q],_e=()=>[be,J,Q],We=()=>[ds,"full",...L()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Lr],breakpoint:[Lr],color:[IE],container:[Lr],"drop-shadow":[Lr],ease:["in","out","in-out"],font:[ME],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Lr],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Lr],shadow:[Lr],spacing:["px",be],text:[Lr],"text-shadow":[Lr],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ds,Q,J,h]}],container:["container"],columns:[{columns:[be,Q,J,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:C()}],overflow:[{overflow:w()}],"overflow-x":[{"overflow-x":w()}],"overflow-y":[{"overflow-y":w()}],overscroll:[{overscroll:I()}],"overscroll-x":[{"overscroll-x":I()}],"overscroll-y":[{"overscroll-y":I()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:P()}],"inset-x":[{"inset-x":P()}],"inset-y":[{"inset-y":P()}],start:[{start:P()}],end:[{end:P()}],top:[{top:P()}],right:[{right:P()}],bottom:[{bottom:P()}],left:[{left:P()}],visibility:["visible","invisible","collapse"],z:[{z:[ua,"auto",J,Q]}],basis:[{basis:[ds,"full","auto",i,...L()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[be,ds,"auto","initial","none",Q]}],grow:[{grow:["",be,J,Q]}],shrink:[{shrink:["",be,J,Q]}],order:[{order:[ua,"first","last","none",J,Q]}],"grid-cols":[{"grid-cols":T()}],"col-start-end":[{col:O()}],"col-start":[{"col-start":$()}],"col-end":[{"col-end":$()}],"grid-rows":[{"grid-rows":T()}],"row-start-end":[{row:O()}],"row-start":[{"row-start":$()}],"row-end":[{"row-end":$()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":W()}],"auto-rows":[{"auto-rows":W()}],gap:[{gap:L()}],"gap-x":[{"gap-x":L()}],"gap-y":[{"gap-y":L()}],"justify-content":[{justify:[...N(),"normal"]}],"justify-items":[{"justify-items":[...q(),"normal"]}],"justify-self":[{"justify-self":["auto",...q()]}],"align-content":[{content:["normal",...N()]}],"align-items":[{items:[...q(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...q(),{baseline:["","last"]}]}],"place-content":[{"place-content":N()}],"place-items":[{"place-items":[...q(),"baseline"]}],"place-self":[{"place-self":["auto",...q()]}],p:[{p:L()}],px:[{px:L()}],py:[{py:L()}],ps:[{ps:L()}],pe:[{pe:L()}],pt:[{pt:L()}],pr:[{pr:L()}],pb:[{pb:L()}],pl:[{pl:L()}],m:[{m:E()}],mx:[{mx:E()}],my:[{my:E()}],ms:[{ms:E()}],me:[{me:E()}],mt:[{mt:E()}],mr:[{mr:E()}],mb:[{mb:E()}],ml:[{ml:E()}],"space-x":[{"space-x":L()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":L()}],"space-y-reverse":["space-y-reverse"],size:[{size:G()}],w:[{w:[i,"screen",...G()]}],"min-w":[{"min-w":[i,"screen","none",...G()]}],"max-w":[{"max-w":[i,"screen","none","prose",{screen:[s]},...G()]}],h:[{h:["screen","lh",...G()]}],"min-h":[{"min-h":["screen","lh","none",...G()]}],"max-h":[{"max-h":["screen","lh",...G()]}],"font-size":[{text:["base",o,tl,an]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,J,Cm]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",bm,Q]}],"font-family":[{font:[DE,Q,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:[a,J,Q]}],"line-clamp":[{"line-clamp":[be,"none",J,Cm]}],leading:[{leading:[n,...L()]}],"list-image":[{"list-image":["none",J,Q]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",J,Q]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:M()}],"text-color":[{text:M()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...X(),"wavy"]}],"text-decoration-thickness":[{decoration:[be,"from-font","auto",J,an]}],"text-decoration-color":[{decoration:M()}],"underline-offset":[{"underline-offset":[be,"auto",J,Q]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:L()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",J,Q]}],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",J,Q]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:k()}],"bg-repeat":[{bg:re()}],"bg-size":[{bg:Se()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ua,J,Q],radial:["",J,Q],conic:[ua,J,Q]},NE,AE]}],"bg-color":[{bg:M()}],"gradient-from-pos":[{from:F()}],"gradient-via-pos":[{via:F()}],"gradient-to-pos":[{to:F()}],"gradient-from":[{from:M()}],"gradient-via":[{via:M()}],"gradient-to":[{to:M()}],rounded:[{rounded:j()}],"rounded-s":[{"rounded-s":j()}],"rounded-e":[{"rounded-e":j()}],"rounded-t":[{"rounded-t":j()}],"rounded-r":[{"rounded-r":j()}],"rounded-b":[{"rounded-b":j()}],"rounded-l":[{"rounded-l":j()}],"rounded-ss":[{"rounded-ss":j()}],"rounded-se":[{"rounded-se":j()}],"rounded-ee":[{"rounded-ee":j()}],"rounded-es":[{"rounded-es":j()}],"rounded-tl":[{"rounded-tl":j()}],"rounded-tr":[{"rounded-tr":j()}],"rounded-br":[{"rounded-br":j()}],"rounded-bl":[{"rounded-bl":j()}],"border-w":[{border:Z()}],"border-w-x":[{"border-x":Z()}],"border-w-y":[{"border-y":Z()}],"border-w-s":[{"border-s":Z()}],"border-w-e":[{"border-e":Z()}],"border-w-t":[{"border-t":Z()}],"border-w-r":[{"border-r":Z()}],"border-w-b":[{"border-b":Z()}],"border-w-l":[{"border-l":Z()}],"divide-x":[{"divide-x":Z()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Z()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...X(),"hidden","none"]}],"divide-style":[{divide:[...X(),"hidden","none"]}],"border-color":[{border:M()}],"border-color-x":[{"border-x":M()}],"border-color-y":[{"border-y":M()}],"border-color-s":[{"border-s":M()}],"border-color-e":[{"border-e":M()}],"border-color-t":[{"border-t":M()}],"border-color-r":[{"border-r":M()}],"border-color-b":[{"border-b":M()}],"border-color-l":[{"border-l":M()}],"divide-color":[{divide:M()}],"outline-style":[{outline:[...X(),"none","hidden"]}],"outline-offset":[{"outline-offset":[be,J,Q]}],"outline-w":[{outline:["",be,tl,an]}],"outline-color":[{outline:M()}],shadow:[{shadow:["","none",c,Qu,Zu]}],"shadow-color":[{shadow:M()}],"inset-shadow":[{"inset-shadow":["none",d,Qu,Zu]}],"inset-shadow-color":[{"inset-shadow":M()}],"ring-w":[{ring:Z()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:M()}],"ring-offset-w":[{"ring-offset":[be,an]}],"ring-offset-color":[{"ring-offset":M()}],"inset-ring-w":[{"inset-ring":Z()}],"inset-ring-color":[{"inset-ring":M()}],"text-shadow":[{"text-shadow":["none",f,Qu,Zu]}],"text-shadow-color":[{"text-shadow":M()}],opacity:[{opacity:[be,J,Q]}],"mix-blend":[{"mix-blend":[...ue(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ue()}],"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":[be]}],"mask-image-linear-from-pos":[{"mask-linear-from":_()}],"mask-image-linear-to-pos":[{"mask-linear-to":_()}],"mask-image-linear-from-color":[{"mask-linear-from":M()}],"mask-image-linear-to-color":[{"mask-linear-to":M()}],"mask-image-t-from-pos":[{"mask-t-from":_()}],"mask-image-t-to-pos":[{"mask-t-to":_()}],"mask-image-t-from-color":[{"mask-t-from":M()}],"mask-image-t-to-color":[{"mask-t-to":M()}],"mask-image-r-from-pos":[{"mask-r-from":_()}],"mask-image-r-to-pos":[{"mask-r-to":_()}],"mask-image-r-from-color":[{"mask-r-from":M()}],"mask-image-r-to-color":[{"mask-r-to":M()}],"mask-image-b-from-pos":[{"mask-b-from":_()}],"mask-image-b-to-pos":[{"mask-b-to":_()}],"mask-image-b-from-color":[{"mask-b-from":M()}],"mask-image-b-to-color":[{"mask-b-to":M()}],"mask-image-l-from-pos":[{"mask-l-from":_()}],"mask-image-l-to-pos":[{"mask-l-to":_()}],"mask-image-l-from-color":[{"mask-l-from":M()}],"mask-image-l-to-color":[{"mask-l-to":M()}],"mask-image-x-from-pos":[{"mask-x-from":_()}],"mask-image-x-to-pos":[{"mask-x-to":_()}],"mask-image-x-from-color":[{"mask-x-from":M()}],"mask-image-x-to-color":[{"mask-x-to":M()}],"mask-image-y-from-pos":[{"mask-y-from":_()}],"mask-image-y-to-pos":[{"mask-y-to":_()}],"mask-image-y-from-color":[{"mask-y-from":M()}],"mask-image-y-to-color":[{"mask-y-to":M()}],"mask-image-radial":[{"mask-radial":[J,Q]}],"mask-image-radial-from-pos":[{"mask-radial-from":_()}],"mask-image-radial-to-pos":[{"mask-radial-to":_()}],"mask-image-radial-from-color":[{"mask-radial-from":M()}],"mask-image-radial-to-color":[{"mask-radial-to":M()}],"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":R()}],"mask-image-conic-pos":[{"mask-conic":[be]}],"mask-image-conic-from-pos":[{"mask-conic-from":_()}],"mask-image-conic-to-pos":[{"mask-conic-to":_()}],"mask-image-conic-from-color":[{"mask-conic-from":M()}],"mask-image-conic-to-color":[{"mask-conic-to":M()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:k()}],"mask-repeat":[{mask:re()}],"mask-size":[{mask:Se()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",J,Q]}],filter:[{filter:["","none",J,Q]}],blur:[{blur:ce()}],brightness:[{brightness:[be,J,Q]}],contrast:[{contrast:[be,J,Q]}],"drop-shadow":[{"drop-shadow":["","none",m,Qu,Zu]}],"drop-shadow-color":[{"drop-shadow":M()}],grayscale:[{grayscale:["",be,J,Q]}],"hue-rotate":[{"hue-rotate":[be,J,Q]}],invert:[{invert:["",be,J,Q]}],saturate:[{saturate:[be,J,Q]}],sepia:[{sepia:["",be,J,Q]}],"backdrop-filter":[{"backdrop-filter":["","none",J,Q]}],"backdrop-blur":[{"backdrop-blur":ce()}],"backdrop-brightness":[{"backdrop-brightness":[be,J,Q]}],"backdrop-contrast":[{"backdrop-contrast":[be,J,Q]}],"backdrop-grayscale":[{"backdrop-grayscale":["",be,J,Q]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[be,J,Q]}],"backdrop-invert":[{"backdrop-invert":["",be,J,Q]}],"backdrop-opacity":[{"backdrop-opacity":[be,J,Q]}],"backdrop-saturate":[{"backdrop-saturate":[be,J,Q]}],"backdrop-sepia":[{"backdrop-sepia":["",be,J,Q]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":L()}],"border-spacing-x":[{"border-spacing-x":L()}],"border-spacing-y":[{"border-spacing-y":L()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",J,Q]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[be,"initial",J,Q]}],ease:[{ease:["linear","initial",v,J,Q]}],delay:[{delay:[be,J,Q]}],animate:[{animate:["none",x,J,Q]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[g,J,Q]}],"perspective-origin":[{"perspective-origin":C()}],rotate:[{rotate:he()}],"rotate-x":[{"rotate-x":he()}],"rotate-y":[{"rotate-y":he()}],"rotate-z":[{"rotate-z":he()}],scale:[{scale:we()}],"scale-x":[{"scale-x":we()}],"scale-y":[{"scale-y":we()}],"scale-z":[{"scale-z":we()}],"scale-3d":["scale-3d"],skew:[{skew:_e()}],"skew-x":[{"skew-x":_e()}],"skew-y":[{"skew-y":_e()}],transform:[{transform:[J,Q,"","none","gpu","cpu"]}],"transform-origin":[{origin:C()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:We()}],"translate-x":[{"translate-x":We()}],"translate-y":[{"translate-y":We()}],"translate-z":[{"translate-z":We()}],"translate-none":["translate-none"],accent:[{accent:M()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:M()}],"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",J,Q]}],"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":L()}],"scroll-mx":[{"scroll-mx":L()}],"scroll-my":[{"scroll-my":L()}],"scroll-ms":[{"scroll-ms":L()}],"scroll-me":[{"scroll-me":L()}],"scroll-mt":[{"scroll-mt":L()}],"scroll-mr":[{"scroll-mr":L()}],"scroll-mb":[{"scroll-mb":L()}],"scroll-ml":[{"scroll-ml":L()}],"scroll-p":[{"scroll-p":L()}],"scroll-px":[{"scroll-px":L()}],"scroll-py":[{"scroll-py":L()}],"scroll-ps":[{"scroll-ps":L()}],"scroll-pe":[{"scroll-pe":L()}],"scroll-pt":[{"scroll-pt":L()}],"scroll-pr":[{"scroll-pr":L()}],"scroll-pb":[{"scroll-pb":L()}],"scroll-pl":[{"scroll-pl":L()}],"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",J,Q]}],fill:[{fill:["none",...M()]}],"stroke-w":[{stroke:[be,tl,an,Cm]}],stroke:[{stroke:["none",...M()]}],"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"]}};var sy=vE(_E);function S(...e){return sy(Yu(e))}var ca=b(D()),VE=Vv,iy=Ju.forwardRef(({className:e,...t},o)=>(0,ca.jsx)(Bv,{ref:o,className:S("moonui-theme","border-b border-gray-200 dark:border-gray-800",e),...t}));iy.displayName="AccordionItem";var ly=Ju.forwardRef(({className:e,children:t,...o},r)=>(0,ca.jsx)(Hv,{className:"flex",children:(0,ca.jsxs)(xm,{ref:r,className:S("flex flex-1 items-center justify-between py-4 font-medium transition-all dark:text-gray-100","hover:underline hover:text-primary dark:hover:text-primary-400","[&[data-state=open]>svg]:rotate-180",e),...o,children:[t,(0,ca.jsx)(ur,{className:"h-4 w-4 shrink-0 transition-transform duration-200 opacity-70 group-hover:opacity-100"})]})}));ly.displayName=xm.displayName;var uy=Ju.forwardRef(({className:e,children:t,...o},r)=>(0,ca.jsx)(vm,{ref:r,className:S("overflow-hidden text-sm text-gray-700 dark:text-gray-300 transition-all","data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",e),...o,children:(0,ca.jsx)("div",{className:"pb-4 pt-0",children:t})}));uy.displayName=vm.displayName;var ps=b(A());var cy=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,dy=Yu,te=(e,t)=>o=>{var r;if(t?.variants==null)return dy(e,o?.class,o?.className);let{variants:a,defaultVariants:n}=t,s=Object.keys(a).map(u=>{let c=o?.[u],d=n?.[u];if(c===null)return null;let f=cy(c)||cy(d);return a[u][f]}),i=o&&Object.entries(o).reduce((u,c)=>{let[d,f]=c;return f===void 0||(u[d]=f),u},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,c)=>{let{class:d,className:f,...m}=c;return Object.entries(m).every(p=>{let[g,h]=p;return Array.isArray(h)?h.includes({...n,...i}[g]):{...n,...i}[g]===h})?[...u,d,f]:u},[]);return dy(e,s,l,o?.class,o?.className)};var Pr=b(D()),BE=te("relative w-full flex items-center gap-3 p-4 border text-foreground [&>svg]:shrink-0",{variants:{variant:{default:"bg-background text-foreground border-border",primary:"bg-primary/10 text-primary border-primary/30",success:"bg-success/10 text-success border-success/30",warning:"bg-warning/10 text-warning border-warning/30",error:"bg-destructive/10 text-destructive border-destructive/30",info:"bg-blue-500/10 text-blue-500 border-blue-500/30"},size:{sm:"py-2 text-xs",default:"py-3 text-sm",lg:"py-4 text-base"},radius:{none:"rounded-none",sm:"rounded-sm",default:"rounded-md",lg:"rounded-lg",full:"rounded-full"},withClose:{true:"pr-10"}},defaultVariants:{variant:"default",size:"default",radius:"default",withClose:!1}}),fy=ps.forwardRef(({className:e,variant:t="default",size:o,radius:r,hideIcon:a=!1,closable:n=!1,onClose:s,children:i,...l},u)=>{let c=ps.useMemo(()=>{switch(t){case"success":return It;case"warning":return la;case"error":return Go;case"info":return ss;default:return ss}},[t]);return(0,Pr.jsxs)("div",{ref:u,role:"alert",className:S("moonui-theme",BE({variant:t,size:o,radius:r,withClose:n}),e),...l,children:[!a&&(0,Pr.jsx)(c,{className:"h-5 w-5"}),(0,Pr.jsx)("div",{className:"flex-1",children:i}),n&&s&&(0,Pr.jsx)("button",{onClick:s,className:"absolute right-3 top-3 inline-flex h-6 w-6 items-center justify-center rounded-full opacity-70 transition-opacity hover:opacity-100","aria-label":"Kapat",children:(0,Pr.jsx)(co,{className:"h-4 w-4"})})]})});fy.displayName="Alert";var my=ps.forwardRef(({className:e,...t},o)=>(0,Pr.jsx)("h5",{ref:o,className:S("moonui-theme","font-semibold leading-tight tracking-tight mb-1",e),...t}));my.displayName="AlertTitle";var py=ps.forwardRef(({className:e,...t},o)=>(0,Pr.jsx)("div",{ref:o,className:S("moonui-theme","text-sm leading-5 text-muted-foreground",e),...t}));py.displayName="AlertDescription";var gy=b(A());var Sm=b(D()),HE=te("relative overflow-hidden",{variants:{variant:{default:"rounded-md bg-muted/10",ghost:"bg-transparent",outline:"rounded-md border border-border",card:"rounded-md bg-card shadow-sm"},radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{variant:"default"}}),hy=gy.forwardRef(({className:e,variant:t,radius:o,ratio:r=16/9,style:a,children:n,...s},i)=>(0,Sm.jsx)("div",{ref:i,className:S("moonui-theme",HE({variant:t,radius:o}),e),style:{position:"relative",paddingBottom:`${1/r*100}%`,...a},...s,children:(0,Sm.jsx)("div",{className:"absolute inset-0",children:n})}));hy.displayName="AspectRatio";var rl=b(A());var Ro=b(A(),1);var gs=b(A(),1);function Te(e){let t=gs.useRef(e);return gs.useEffect(()=>{t.current=e}),gs.useMemo(()=>(...o)=>t.current?.(...o),[])}var Cy=b(by(),1);function wy(){return(0,Cy.useSyncExternalStore)(YE,()=>!0,()=>!1)}function YE(){return()=>{}}var ol=b(D(),1),Im="Avatar",[ZE,Jq]=Re(Im),[QE,Ry]=ZE(Im),Iy=Ro.forwardRef((e,t)=>{let{__scopeAvatar:o,...r}=e,[a,n]=Ro.useState("idle");return(0,ol.jsx)(QE,{scope:o,imageLoadingStatus:a,onImageLoadingStatusChange:n,children:(0,ol.jsx)(H.span,{...r,ref:t})})});Iy.displayName=Im;var Ly="AvatarImage",Py=Ro.forwardRef((e,t)=>{let{__scopeAvatar:o,src:r,onLoadingStatusChange:a=()=>{},...n}=e,s=Ry(Ly,o),i=JE(r,n),l=Te(u=>{a(u),s.onImageLoadingStatusChange(u)});return Le(()=>{i!=="idle"&&l(i)},[i,l]),i==="loaded"?(0,ol.jsx)(H.img,{...n,ref:t,src:r}):null});Py.displayName=Ly;var Ty="AvatarFallback",My=Ro.forwardRef((e,t)=>{let{__scopeAvatar:o,delayMs:r,...a}=e,n=Ry(Ty,o),[s,i]=Ro.useState(r===void 0);return Ro.useEffect(()=>{if(r!==void 0){let l=window.setTimeout(()=>i(!0),r);return()=>window.clearTimeout(l)}},[r]),s&&n.imageLoadingStatus!=="loaded"?(0,ol.jsx)(H.span,{...a,ref:t}):null});My.displayName=Ty;function Sy(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function JE(e,{referrerPolicy:t,crossOrigin:o}){let r=wy(),a=Ro.useRef(null),n=r?(a.current||(a.current=new window.Image),a.current):null,[s,i]=Ro.useState(()=>Sy(n,e));return Le(()=>{i(Sy(n,e))},[n,e]),Le(()=>{let l=d=>()=>{i(d)};if(!n)return;let u=l("loaded"),c=l("error");return n.addEventListener("load",u),n.addEventListener("error",c),t&&(n.referrerPolicy=t),typeof o=="string"&&(n.crossOrigin=o),()=>{n.removeEventListener("load",u),n.removeEventListener("error",c)}},[n,o,t]),s}var Lm=Iy,Pm=Py,Tm=My;var zo=b(D()),t1=te("relative flex shrink-0 overflow-hidden",{variants:{size:{default:"h-10 w-10",xs:"h-6 w-6",sm:"h-8 w-8",md:"h-10 w-10",lg:"h-12 w-12",xl:"h-16 w-16","2xl":"h-20 w-20"},radius:{default:"rounded-full",sm:"rounded-md",lg:"rounded-xl",full:"rounded-full",none:"rounded-none"},variant:{default:"",ring:"ring-2 ring-border",ringOffset:"ring-2 ring-border ring-offset-2 ring-offset-background",border:"border-2 border-border"}},defaultVariants:{size:"default",radius:"default",variant:"default"}}),Mm=rl.forwardRef(({className:e,size:t,radius:o,variant:r,...a},n)=>(0,zo.jsx)(Lm,{ref:n,className:S("moonui-theme",t1({size:t,radius:o,variant:r}),e),...a}));Mm.displayName=Lm.displayName;var ky=rl.forwardRef(({className:e,...t},o)=>(0,zo.jsx)(Pm,{ref:o,className:S("moonui-theme","aspect-square h-full w-full",e),...t}));ky.displayName=Pm.displayName;var km=rl.forwardRef(({className:e,...t},o)=>(0,zo.jsx)(Tm,{ref:o,className:S("flex h-full w-full items-center justify-center bg-muted",e),...t}));km.displayName=Tm.displayName;var Ay=rl.forwardRef(({className:e,limit:t,avatars:o,overlapOffset:r=-8,...a},n)=>{let s=t?o.slice(0,t):o,i=t?Math.max(0,o.length-t):0;return(0,zo.jsx)("div",{ref:n,className:S("moonui-theme","flex items-center",e),...a,children:(0,zo.jsxs)("div",{className:"flex",children:[s.map((l,u)=>(0,zo.jsx)("div",{className:"relative",style:{marginLeft:u===0?0:`${r}px`,zIndex:s.length-u},children:l},u)),i>0&&(0,zo.jsx)("div",{className:"relative z-0",style:{marginLeft:`${r}px`},children:(0,zo.jsx)(Mm,{variant:"border",children:(0,zo.jsxs)(km,{children:["+",i]})})})]})})});Ay.displayName="AvatarGroup";var Lt=b(D()),Dy=te(["inline-flex items-center justify-center gap-1.5","font-medium transition-colors duration-200","border focus:outline-none","focus-visible:ring-2 focus-visible:ring-offset-1","mr-2 mb-2 last:mr-0"],{variants:{variant:{primary:["border-transparent bg-gray-900 text-white","hover:bg-gray-800 dark:hover:bg-gray-700","focus-visible:ring-gray-500/30 dark:focus-visible:ring-gray-400/40","dark:bg-gray-700 dark:text-gray-50 dark:shadow-inner dark:shadow-gray-950/10"],secondary:["border-transparent bg-secondary text-secondary-foreground","hover:bg-gray-200 dark:hover:bg-gray-600","focus-visible:ring-gray-400/30 dark:focus-visible:ring-gray-500/40","dark:bg-gray-700/50 dark:text-gray-50 dark:shadow-inner dark:shadow-gray-950/10"],outline:["border-gray-200 dark:border-gray-600","bg-transparent text-foreground","hover:border-gray-300 dark:hover:border-gray-500","focus-visible:ring-gray-400/30 dark:focus-visible:ring-gray-500/40","dark:text-gray-100 dark:bg-transparent dark:backdrop-blur-sm"],destructive:["border-transparent bg-error text-white","hover:bg-error/90 dark:hover:bg-error/80","focus-visible:ring-error/30 dark:focus-visible:ring-error/25","dark:bg-error/90 dark:text-white dark:shadow-inner dark:shadow-error/10"],success:["border-transparent bg-success text-white","hover:bg-success/90 dark:hover:bg-success/80","focus-visible:ring-success/30 dark:focus-visible:ring-success/25","dark:bg-success/90 dark:text-white dark:shadow-inner dark:shadow-success/10"],warning:["border-transparent bg-warning text-white","hover:bg-warning/90 dark:hover:bg-warning/80","focus-visible:ring-warning/30 dark:focus-visible:ring-warning/25","dark:bg-warning/90 dark:text-gray-900 dark:shadow-inner dark:shadow-warning/10"],ghost:["border border-gray-200 bg-gray-50/50 text-gray-700","hover:bg-gray-100 dark:hover:bg-gray-800/60","focus-visible:ring-gray-400/30 dark:focus-visible:ring-gray-500/40","dark:border-gray-700 dark:bg-gray-800/30 dark:text-gray-300","transition-all duration-200"],pro:["border-transparent bg-gradient-to-r from-purple-600 to-pink-600 text-white","hover:from-purple-700 hover:to-pink-700","focus-visible:ring-purple-400/30 dark:focus-visible:ring-purple-500/40","shadow-md dark:shadow-lg dark:shadow-purple-500/10"],admin:["border-transparent bg-gradient-to-r from-purple-600 to-pink-600 text-white","hover:from-purple-700 hover:to-pink-700","focus-visible:ring-purple-400/30 dark:focus-visible:ring-purple-500/40","shadow-md dark:shadow-lg dark:shadow-purple-500/10"]},size:{sm:"h-5 px-2 text-xs",md:"h-6 px-3 text-sm",lg:"h-8 px-4 text-base"},radius:{default:"rounded-full",sm:"rounded-md",lg:"rounded-xl",none:"rounded-none"}},defaultVariants:{variant:"primary",size:"md",radius:"default"}});function fo({className:e,variant:t,size:o,radius:r,withDot:a,dotColor:n,removable:s,onRemove:i,leftIcon:l,rightIcon:u,noAutoSpacing:c,children:d,...f}){let m=l,p=d;return t==="pro"&&(m=l||(0,Lt.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"w-3 h-3",children:[(0,Lt.jsx)("path",{d:"M12 0L13.09 8.26L22 9L13.09 9.74L12 18L10.91 9.74L2 9L10.91 8.26L12 0Z",fill:"currentColor"}),(0,Lt.jsx)("path",{d:"M19 5L19.5 7L21 7.5L19.5 8L19 10L18.5 8L17 7.5L18.5 7L19 5Z",fill:"currentColor"}),(0,Lt.jsx)("path",{d:"M19 15L19.5 17L21 17.5L19.5 18L19 20L18.5 18L17 17.5L18.5 17L19 15Z",fill:"currentColor"})]}),p=d||"Pro"),t==="admin"&&(m=l||(0,Lt.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"w-3 h-3",children:(0,Lt.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z",fill:"currentColor"})}),p=d||"Admin Pro"),(0,Lt.jsxs)("div",{className:S("moonui-theme",Dy({variant:t,size:o,radius:r}),c&&"mr-0 mb-0",e),"data-removable":s?"":void 0,...f,children:[a&&(0,Lt.jsx)("span",{className:S("h-2 w-2 rounded-full",n||(t==="destructive"||t==="success"||t==="warning"?"bg-white":t==="secondary"?"bg-secondary-foreground":t==="outline"||t==="ghost"?"bg-foreground":t==="pro"||t==="admin"?"bg-white":"bg-primary-foreground")),"aria-hidden":"true"}),m&&(0,Lt.jsx)("span",{className:"inline-flex shrink-0 items-center",children:m}),(0,Lt.jsx)("span",{className:"inline-flex items-center",children:p}),u&&(0,Lt.jsx)("span",{className:"inline-flex shrink-0 items-center",children:u}),s&&i&&(0,Lt.jsx)("button",{type:"button",className:"ml-1 -mr-1 h-3.5 w-3.5 rounded-full inline-flex items-center justify-center hover:bg-black/10 dark:hover:bg-white/10",onClick:g=>{g.stopPropagation(),i()},"aria-label":"Remove badge",children:(0,Lt.jsx)("svg",{width:"8",height:"8",viewBox:"0 0 8 8",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"opacity-70","aria-hidden":"true",children:(0,Lt.jsx)("path",{d:"M0.799988 7.19999L7.19999 0.799988M0.799988 0.799988L7.19999 7.19999",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]})}var dr=b(A());var Gt=b(D()),o1=te("flex items-center gap-1.5 text-sm",{variants:{variant:{default:"text-foreground transition-colors",muted:"text-muted-foreground transition-colors",ghost:"text-foreground/60 transition-colors"},size:{default:"text-sm",sm:"text-xs",lg:"text-base"}},defaultVariants:{variant:"default",size:"default"}}),Ey=dr.forwardRef(({className:e,variant:t,size:o,...r},a)=>(0,Gt.jsx)("nav",{ref:a,className:S("moonui-theme",o1({variant:t,size:o}),e),"aria-label":"breadcrumb",...r}));Ey.displayName="Breadcrumb";var Ny=dr.forwardRef(({className:e,collapsed:t,collapsedWidth:o=3,...r},a)=>{let n=dr.Children.toArray(r.children).filter(Boolean),s=n.length;if(t&&s>o){let i=n[0],l=n.slice(-2);return(0,Gt.jsxs)("ol",{ref:a,className:S("flex flex-wrap items-center gap-1.5 sm:gap-2.5",e),...r,children:[i,(0,Gt.jsx)(Am,{}),l]})}return(0,Gt.jsx)("ol",{ref:a,className:S("flex flex-wrap items-center gap-1.5 sm:gap-2.5",e),...r})});Ny.displayName="BreadcrumbList";var Fy=dr.forwardRef(({className:e,isCurrent:t,href:o,asChild:r=!1,...a},n)=>{let s=r?dr.Fragment:o?"a":"span",i=r?{}:o?{href:o}:{};return(0,Gt.jsx)("li",{ref:n,className:S("moonui-theme","inline-flex items-center gap-1.5",e),"aria-current":t?"page":void 0,...a,children:(0,Gt.jsx)(s,{className:S("transition-colors duration-200 hover:text-foreground",t?"font-medium text-foreground":"text-muted-foreground hover:text-foreground hover:underline hover:underline-offset-4 hover:decoration-muted-foreground/30"),...i,children:a.children})})});Fy.displayName="BreadcrumbItem";var Oy=({children:e,className:t,...o})=>(0,Gt.jsx)("span",{role:"presentation","aria-hidden":"true",className:S("moonui-theme","text-muted-foreground opacity-70",t),...o,children:e||(0,Gt.jsx)(Ut,{className:"h-3.5 w-3.5"})});Oy.displayName="BreadcrumbSeparator";var Am=({className:e,...t})=>(0,Gt.jsxs)("span",{role:"presentation","aria-hidden":"true",className:S("moonui-theme","flex items-center text-muted-foreground hover:text-foreground/80 transition-colors duration-200",e),...t,children:[(0,Gt.jsx)(cr,{className:"h-4 w-4"}),(0,Gt.jsx)("span",{className:"sr-only",children:"More pages"})]});Am.displayName="BreadcrumbEllipsis";var _y=dr.forwardRef(({className:e,href:t,...o},r)=>(0,Gt.jsx)("a",{ref:r,href:t,className:S("transition-colors duration-200 hover:text-foreground text-muted-foreground hover:underline hover:underline-offset-4 hover:decoration-muted-foreground/30",e),...o}));_y.displayName="BreadcrumbLink";var Vy=dr.forwardRef(({className:e,...t},o)=>(0,Gt.jsx)("span",{ref:o,className:S("font-medium text-foreground dark:text-white dark:text-opacity-95",e),...t}));Vy.displayName="BreadcrumbPage";var By=b(A());var tc=b(D()),ec=te(["inline-flex items-center justify-center gap-2 whitespace-nowrap","font-medium relative","transition-all duration-200 ease-out","transform active:scale-[0.98]","focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2","disabled:opacity-50 disabled:cursor-not-allowed disabled:pointer-events-none disabled:transform-none"],{variants:{variant:{primary:["bg-primary text-primary-foreground","dark:bg-primary dark:text-primary-foreground","hover:bg-primary/90 dark:hover:bg-primary/90","active:bg-primary/80 dark:active:bg-primary/80","shadow-sm hover:shadow-md","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","transition-all duration-200"],secondary:["bg-gray-100 text-gray-900","dark:bg-gray-800 dark:text-gray-100","hover:bg-gray-200 dark:hover:bg-gray-700","active:bg-gray-300 dark:active:bg-gray-600","border border-gray-200 dark:border-gray-700","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","shadow-sm hover:shadow-md"],outline:["bg-background text-foreground","dark:bg-background dark:text-foreground","border border-input dark:border-input","hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent dark:hover:text-accent-foreground","active:bg-accent/80 dark:active:bg-accent/80","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","transition-all duration-200"],ghost:["text-gray-700","dark:text-gray-300","hover:bg-gray-100 hover:text-gray-900 dark:hover:bg-gray-800 dark:hover:text-gray-100","active:bg-gray-200 dark:active:bg-gray-700","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","transition-all duration-200"],destructive:["bg-destructive text-destructive-foreground","dark:bg-destructive dark:text-destructive-foreground","hover:bg-destructive/90 dark:hover:bg-destructive/90","active:bg-destructive/80 dark:active:bg-destructive/80","shadow-sm hover:shadow-md","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","transition-all duration-200"],success:["bg-success text-success-foreground","dark:bg-success dark:text-success-foreground","hover:bg-success/90 dark:hover:bg-success/90","active:bg-success/80 dark:active:bg-success/80","shadow-sm hover:shadow-md","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","transition-all duration-200"],link:["text-primary bg-transparent","underline-offset-4 hover:underline","hover:text-primary/80 active:text-primary/70","p-0 h-auto","transition-colors duration-200"],gradient:["bg-gradient-to-r from-purple-500 to-pink-500 text-white","hover:from-purple-600 hover:to-pink-600","active:from-purple-700 active:to-pink-700","shadow-xl shadow-purple-500/40","hover:shadow-2xl hover:shadow-purple-500/50","focus-visible:ring-purple-500/50","transition-all duration-300"],glow:["bg-blue-500 text-white","shadow-[0_0_30px_rgba(59,130,246,0.5)]","hover:shadow-[0_0_40px_rgba(59,130,246,0.7)]","active:shadow-[0_0_20px_rgba(59,130,246,0.4)]","hover:bg-blue-600","focus-visible:ring-blue-500/50","transition-all duration-300"],soft:["bg-primary/10 text-primary","hover:bg-primary/20","active:bg-primary/30","focus-visible:ring-primary/50","dark:bg-primary/20 dark:text-primary-foreground","dark:hover:bg-primary/30 dark:active:bg-primary/40","transition-colors duration-200"],glass:["bg-white/10 backdrop-blur-md text-foreground","border border-white/20","hover:bg-white/20 hover:border-white/30","active:bg-white/30","shadow-lg","focus-visible:ring-white/50","dark:bg-gray-800/10 dark:border-gray-700/20","dark:hover:bg-gray-800/20 dark:hover:border-gray-700/30","transition-all duration-200"],neon:["bg-transparent text-green-400","border-2 border-green-400","hover:bg-green-400 hover:text-gray-900","hover:shadow-[0_0_30px_rgba(74,222,128,0.6)]","active:shadow-[0_0_15px_rgba(74,222,128,0.4)]","focus-visible:ring-green-400/50","transition-all duration-300"]},size:{xs:"h-7 px-2.5 text-xs",sm:"h-8 px-3 text-sm",md:"h-10 px-4 text-base",lg:"h-12 px-6 text-lg",xl:"h-14 px-8 text-xl",icon:"h-10 w-10 p-2","icon-sm":"h-8 w-8 p-1.5","icon-lg":"h-12 w-12 p-3"},rounded:{default:"rounded-xl",full:"rounded-full",none:"rounded-none",sm:"rounded-lg",lg:"rounded-2xl"},fullWidth:{true:"w-full"}},defaultVariants:{variant:"primary",size:"md",rounded:"default",fullWidth:!1}}),Ve=By.forwardRef(({className:e,variant:t,size:o,rounded:r,fullWidth:a,asChild:n=!1,loading:s=!1,leftIcon:i,rightIcon:l,children:u,disabled:c,...d},f)=>(0,tc.jsxs)("button",{className:S("moonui-theme",ec({variant:t,size:o,rounded:r,fullWidth:a,className:e})),ref:f,disabled:c||s,"data-loading":s?"":void 0,...d,children:[s&&(0,tc.jsx)(St,{className:"w-4 h-4 animate-spin","aria-hidden":"true"}),!s&&i,u,!s&&l]}));Ve.displayName="Button";var Tn=b(A());var Hl=b(D(),1),pr=b(A(),1);var Hy=b(A(),1),xs=(0,Hy.createContext)({});var Uy=b(A(),1);function Io(e){let t=(0,Uy.useRef)(null);return t.current===null&&(t.current=e()),t.current}var oc=b(A(),1);var vs=typeof window<"u";var da=vs?oc.useLayoutEffect:oc.useEffect;var dp=b(D(),1),zb=b(A(),1),Vl=b(A(),1);var Gy=b(A(),1),fa=(0,Gy.createContext)(null);var Ub=b(D(),1);function nn(e,t){e.indexOf(t)===-1&&e.push(t)}function qo(e,t){let o=e.indexOf(t);o>-1&&e.splice(o,1)}var xt=(e,t,o)=>o>t?t:o<e?e:o;var Tr=()=>{},nt=()=>{};var Pt={};var al=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function nl(e){return typeof e=="object"&&e!==null}var sl=e=>/^0[^.\s]+$/u.test(e);function sn(e){let t;return()=>(t===void 0&&(t=e()),t)}var Qe=e=>e;var r1=(e,t)=>o=>t(e(o)),Wo=(...e)=>e.reduce(r1);var Lo=(e,t,o)=>{let r=t-e;return r===0?1:(o-e)/r};var Mr=class{constructor(){this.subscriptions=[]}add(t){return nn(this.subscriptions,t),()=>qo(this.subscriptions,t)}notify(t,o,r){let a=this.subscriptions.length;if(a)if(a===1)this.subscriptions[0](t,o,r);else for(let n=0;n<a;n++){let s=this.subscriptions[n];s&&s(t,o,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}};var at=e=>e*1e3,Rt=e=>e/1e3;function il(e,t){return t?e*(1e3/t):0}var zy=(e,t,o)=>{let r=t-e;return((o-e)%r+r)%r+e};var qy=(e,t,o)=>(((1-3*o+3*t)*e+(3*o-6*t))*e+3*t)*e,a1=1e-7,n1=12;function s1(e,t,o,r,a){let n,s,i=0;do s=t+(o-t)/2,n=qy(s,r,a)-e,n>0?o=s:t=s;while(Math.abs(n)>a1&&++i<n1);return s}function ma(e,t,o,r){if(e===t&&o===r)return Qe;let a=n=>s1(n,0,1,e,o);return n=>n===0||n===1?n:qy(a(n),t,r)}var rc=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2;var ac=e=>t=>1-e(1-t);var nc=ma(.33,1.53,.69,.99),ys=ac(nc),ll=rc(ys);var ul=e=>(e*=2)<1?.5*ys(e):.5*(2-Math.pow(2,-10*(e-1)));var cl=e=>1-Math.sin(Math.acos(e)),dl=ac(cl),fl=rc(cl);var Dm=ma(.42,0,1,1),Em=ma(0,0,.58,1),ml=ma(.42,0,.58,1);var pl=e=>Array.isArray(e)&&typeof e[0]!="number";function gl(e,t){return pl(e)?e[zy(0,e.length,t)]:e}var hl=e=>Array.isArray(e)&&typeof e[0]=="number";var Wy={linear:Qe,easeIn:Dm,easeInOut:ml,easeOut:Em,circIn:cl,circInOut:fl,circOut:dl,backIn:ys,backInOut:ll,backOut:nc,anticipate:ul},i1=e=>typeof e=="string",sc=e=>{if(hl(e)){nt(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");let[t,o,r,a]=e;return ma(t,o,r,a)}else if(i1(e))return nt(Wy[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),Wy[e];return e};var xl=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];var eo={value:null,addProjectionMetrics:null};function $y(e,t){let o=new Set,r=new Set,a=!1,n=!1,s=new WeakSet,i={delta:0,timestamp:0,isProcessing:!1},l=0;function u(d){s.has(d)&&(c.schedule(d),e()),l++,d(i)}let c={schedule:(d,f=!1,m=!1)=>{let g=m&&a?o:r;return f&&s.add(d),g.has(d)||g.add(d),d},cancel:d=>{r.delete(d),s.delete(d)},process:d=>{if(i=d,a){n=!0;return}a=!0,[o,r]=[r,o],o.forEach(u),t&&eo.value&&eo.value.frameloop[t].push(l),l=0,o.clear(),a=!1,n&&(n=!1,c.process(d))}};return c}var l1=40;function ic(e,t){let o=!1,r=!0,a={delta:0,timestamp:0,isProcessing:!1},n=()=>o=!0,s=xl.reduce((y,R)=>(y[R]=$y(n,t?R:void 0),y),{}),{setup:i,read:l,resolveKeyframes:u,preUpdate:c,update:d,preRender:f,render:m,postRender:p}=s,g=()=>{let y=Pt.useManualTiming?a.timestamp:performance.now();o=!1,Pt.useManualTiming||(a.delta=r?1e3/60:Math.max(Math.min(y-a.timestamp,l1),1)),a.timestamp=y,a.isProcessing=!0,i.process(a),l.process(a),u.process(a),c.process(a),d.process(a),f.process(a),m.process(a),p.process(a),a.isProcessing=!1,o&&t&&(r=!1,e(g))},h=()=>{o=!0,r=!0,a.isProcessing||e(g)};return{schedule:xl.reduce((y,R)=>{let C=s[R];return y[R]=(w,I=!1,L=!1)=>(o||h(),C.schedule(w,I,L)),y},{}),cancel:y=>{for(let R=0;R<xl.length;R++)s[xl[R]].cancel(y)},state:a,steps:s}}var{schedule:ve,cancel:Tt,state:tt,steps:vl}=ic(typeof requestAnimationFrame<"u"?requestAnimationFrame:Qe,!0);var lc;function u1(){lc=void 0}var ot={now:()=>(lc===void 0&&ot.set(tt.isProcessing||Pt.useManualTiming?tt.timestamp:performance.now()),lc),set:e=>{lc=e,queueMicrotask(u1)}};var $o={layout:0,mainThread:0,waapi:0};var jy=e=>t=>typeof t=="string"&&t.startsWith(e),ln=jy("--"),c1=jy("var(--"),un=e=>c1(e)?d1.test(e.split("/*")[0].trim()):!1,d1=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;var fr={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},kr={...fr,transform:e=>xt(0,1,e)},yl={...fr,default:1};var pa=e=>Math.round(e*1e5)/1e5;var bs=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Ky(e){return e==null}var Xy=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;var Cs=(e,t)=>o=>!!(typeof o=="string"&&Xy.test(o)&&o.startsWith(e)||t&&!Ky(o)&&Object.prototype.hasOwnProperty.call(o,t)),uc=(e,t,o)=>r=>{if(typeof r!="string")return r;let[a,n,s,i]=r.match(bs);return{[e]:parseFloat(a),[t]:parseFloat(n),[o]:parseFloat(s),alpha:i!==void 0?parseFloat(i):1}};var f1=e=>xt(0,255,e),Nm={...fr,transform:e=>Math.round(f1(e))},mr={test:Cs("rgb","red"),parse:uc("red","green","blue"),transform:({red:e,green:t,blue:o,alpha:r=1})=>"rgba("+Nm.transform(e)+", "+Nm.transform(t)+", "+Nm.transform(o)+", "+pa(kr.transform(r))+")"};function m1(e){let t="",o="",r="",a="";return e.length>5?(t=e.substring(1,3),o=e.substring(3,5),r=e.substring(5,7),a=e.substring(7,9)):(t=e.substring(1,2),o=e.substring(2,3),r=e.substring(3,4),a=e.substring(4,5),t+=t,o+=o,r+=r,a+=a),{red:parseInt(t,16),green:parseInt(o,16),blue:parseInt(r,16),alpha:a?parseInt(a,16)/255:1}}var bl={test:Cs("#"),parse:m1,transform:mr.transform};var Cl=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),jo=Cl("deg"),Mt=Cl("%"),ae=Cl("px"),Fm=Cl("vh"),Om=Cl("vw"),cc={...Mt,parse:e=>Mt.parse(e)/100,transform:e=>Mt.transform(e*100)};var ga={test:Cs("hsl","hue"),parse:uc("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:o,alpha:r=1})=>"hsla("+Math.round(e)+", "+Mt.transform(pa(t))+", "+Mt.transform(pa(o))+", "+pa(kr.transform(r))+")"};var Xe={test:e=>mr.test(e)||bl.test(e)||ga.test(e),parse:e=>mr.test(e)?mr.parse(e):ga.test(e)?ga.parse(e):bl.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?mr.transform(e):ga.transform(e),getAnimatableNone:e=>{let t=Xe.parse(e);return t.alpha=0,Xe.transform(t)}};var Yy=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function p1(e){return isNaN(e)&&typeof e=="string"&&(e.match(bs)?.length||0)+(e.match(Yy)?.length||0)>0}var Qy="number",Jy="color",g1="var",h1="var(",Zy="${}",x1=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function ha(e){let t=e.toString(),o=[],r={color:[],number:[],var:[]},a=[],n=0,i=t.replace(x1,l=>(Xe.test(l)?(r.color.push(n),a.push(Jy),o.push(Xe.parse(l))):l.startsWith(h1)?(r.var.push(n),a.push(g1),o.push(l)):(r.number.push(n),a.push(Qy),o.push(parseFloat(l))),++n,Zy)).split(Zy);return{values:o,split:i,indexes:r,types:a}}function eb(e){return ha(e).values}function tb(e){let{split:t,types:o}=ha(e),r=t.length;return a=>{let n="";for(let s=0;s<r;s++)if(n+=t[s],a[s]!==void 0){let i=o[s];i===Qy?n+=pa(a[s]):i===Jy?n+=Xe.transform(a[s]):n+=a[s]}return n}}var v1=e=>typeof e=="number"?0:Xe.test(e)?Xe.getAnimatableNone(e):e;function y1(e){let t=eb(e);return tb(e)(t.map(v1))}var kt={test:p1,parse:eb,createTransformer:tb,getAnimatableNone:y1};function _m(e,t,o){return o<0&&(o+=1),o>1&&(o-=1),o<1/6?e+(t-e)*6*o:o<1/2?t:o<2/3?e+(t-e)*(2/3-o)*6:e}function ob({hue:e,saturation:t,lightness:o,alpha:r}){e/=360,t/=100,o/=100;let a=0,n=0,s=0;if(!t)a=n=s=o;else{let i=o<.5?o*(1+t):o+t-o*t,l=2*o-i;a=_m(l,i,e+1/3),n=_m(l,i,e),s=_m(l,i,e-1/3)}return{red:Math.round(a*255),green:Math.round(n*255),blue:Math.round(s*255),alpha:r}}function ws(e,t){return o=>o>0?t:e}var Ce=(e,t,o)=>e+(t-e)*o;var Vm=(e,t,o)=>{let r=e*e,a=o*(t*t-r)+r;return a<0?0:Math.sqrt(a)},b1=[bl,mr,ga],C1=e=>b1.find(t=>t.test(e));function rb(e){let t=C1(e);if(Tr(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let o=t.parse(e);return t===ga&&(o=ob(o)),o}var Bm=(e,t)=>{let o=rb(e),r=rb(t);if(!o||!r)return ws(e,t);let a={...o};return n=>(a.red=Vm(o.red,r.red,n),a.green=Vm(o.green,r.green,n),a.blue=Vm(o.blue,r.blue,n),a.alpha=Ce(o.alpha,r.alpha,n),mr.transform(a))};var dc=new Set(["none","hidden"]);function ab(e,t){return dc.has(e)?o=>o<=0?e:t:o=>o>=1?t:e}function w1(e,t){return o=>Ce(e,t,o)}function fc(e){return typeof e=="number"?w1:typeof e=="string"?un(e)?ws:Xe.test(e)?Bm:I1:Array.isArray(e)?nb:typeof e=="object"?Xe.test(e)?Bm:S1:ws}function nb(e,t){let o=[...e],r=o.length,a=e.map((n,s)=>fc(n)(n,t[s]));return n=>{for(let s=0;s<r;s++)o[s]=a[s](n);return o}}function S1(e,t){let o={...e,...t},r={};for(let a in o)e[a]!==void 0&&t[a]!==void 0&&(r[a]=fc(e[a])(e[a],t[a]));return a=>{for(let n in r)o[n]=r[n](a);return o}}function R1(e,t){let o=[],r={color:0,var:0,number:0};for(let a=0;a<t.values.length;a++){let n=t.types[a],s=e.indexes[n][r[n]],i=e.values[s]??0;o[a]=i,r[n]++}return o}var I1=(e,t)=>{let o=kt.createTransformer(t),r=ha(e),a=ha(t);return r.indexes.var.length===a.indexes.var.length&&r.indexes.color.length===a.indexes.color.length&&r.indexes.number.length>=a.indexes.number.length?dc.has(e)&&!a.values.length||dc.has(t)&&!r.values.length?ab(e,t):Wo(nb(R1(r,a),a.values),o):(Tr(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),ws(e,t))};function mc(e,t,o){return typeof e=="number"&&typeof t=="number"&&typeof o=="number"?Ce(e,t,o):fc(e)(e,t)}var sb=e=>{let t=({timestamp:o})=>e(o);return{start:(o=!0)=>ve.update(t,o),stop:()=>Tt(t),now:()=>tt.isProcessing?tt.timestamp:ot.now()}};var pc=(e,t,o=10)=>{let r="",a=Math.max(Math.round(t/o),2);for(let n=0;n<a;n++)r+=Math.round(e(n/(a-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`};function Ss(e){let t=0,o=50,r=e.next(t);for(;!r.done&&t<2e4;)t+=o,r=e.next(t);return t>=2e4?1/0:t}function wl(e,t=100,o){let r=o({...e,keyframes:[0,t]}),a=Math.min(Ss(r),2e4);return{type:"keyframes",ease:n=>r.next(a*n).value/t,duration:Rt(a)}}var L1=5;function gc(e,t,o){let r=Math.max(t-L1,0);return il(o-e(r),t-r)}var $e={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};var Um=.001;function ib({duration:e=$e.duration,bounce:t=$e.bounce,velocity:o=$e.velocity,mass:r=$e.mass}){let a,n;Tr(e<=at($e.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let s=1-t;s=xt($e.minDamping,$e.maxDamping,s),e=xt($e.minDuration,$e.maxDuration,Rt(e)),s<1?(a=u=>{let c=u*s,d=c*e,f=c-o,m=hc(u,s),p=Math.exp(-d);return Um-f/m*p},n=u=>{let d=u*s*e,f=d*o+o,m=Math.pow(s,2)*Math.pow(u,2)*e,p=Math.exp(-d),g=hc(Math.pow(u,2),s);return(-a(u)+Um>0?-1:1)*((f-m)*p)/g}):(a=u=>{let c=Math.exp(-u*e),d=(u-o)*e+1;return-Um+c*d},n=u=>{let c=Math.exp(-u*e),d=(o-u)*(e*e);return c*d});let i=5/e,l=T1(a,n,i);if(e=at(e),isNaN(l))return{stiffness:$e.stiffness,damping:$e.damping,duration:e};{let u=Math.pow(l,2)*r;return{stiffness:u,damping:s*2*Math.sqrt(r*u),duration:e}}}var P1=12;function T1(e,t,o){let r=o;for(let a=1;a<P1;a++)r=r-e(r)/t(r);return r}function hc(e,t){return e*Math.sqrt(1-t*t)}var M1=["duration","bounce"],k1=["stiffness","damping","mass"];function lb(e,t){return t.some(o=>e[o]!==void 0)}function A1(e){let t={velocity:$e.velocity,stiffness:$e.stiffness,damping:$e.damping,mass:$e.mass,isResolvedFromDuration:!1,...e};if(!lb(e,k1)&&lb(e,M1))if(e.visualDuration){let o=e.visualDuration,r=2*Math.PI/(o*1.2),a=r*r,n=2*xt(.05,1,1-(e.bounce||0))*Math.sqrt(a);t={...t,mass:$e.mass,stiffness:a,damping:n}}else{let o=ib(e);t={...t,...o,mass:$e.mass},t.isResolvedFromDuration=!0}return t}function Ar(e=$e.visualDuration,t=$e.bounce){let o=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e,{restSpeed:r,restDelta:a}=o,n=o.keyframes[0],s=o.keyframes[o.keyframes.length-1],i={done:!1,value:n},{stiffness:l,damping:u,mass:c,duration:d,velocity:f,isResolvedFromDuration:m}=A1({...o,velocity:-Rt(o.velocity||0)}),p=f||0,g=u/(2*Math.sqrt(l*c)),h=s-n,v=Rt(Math.sqrt(l/c)),x=Math.abs(h)<5;r||(r=x?$e.restSpeed.granular:$e.restSpeed.default),a||(a=x?$e.restDelta.granular:$e.restDelta.default);let y;if(g<1){let C=hc(v,g);y=w=>{let I=Math.exp(-g*v*w);return s-I*((p+g*v*h)/C*Math.sin(C*w)+h*Math.cos(C*w))}}else if(g===1)y=C=>s-Math.exp(-v*C)*(h+(p+v*h)*C);else{let C=v*Math.sqrt(g*g-1);y=w=>{let I=Math.exp(-g*v*w),L=Math.min(C*w,300);return s-I*((p+g*v*h)*Math.sinh(L)+C*h*Math.cosh(L))/C}}let R={calculatedDuration:m&&d||null,next:C=>{let w=y(C);if(m)i.done=C>=d;else{let I=C===0?p:0;g<1&&(I=C===0?at(p):gc(y,C,w));let L=Math.abs(I)<=r,P=Math.abs(s-w)<=a;i.done=L&&P}return i.value=i.done?s:w,i},toString:()=>{let C=Math.min(Ss(R),2e4),w=pc(I=>R.next(C*I).value,C,30);return C+"ms "+w},toTransition:()=>{}};return R}Ar.applyToOptions=e=>{let t=wl(e,100,Ar);return e.ease=t.ease,e.duration=at(t.duration),e.type="keyframes",e};function Sl({keyframes:e,velocity:t=0,power:o=.8,timeConstant:r=325,bounceDamping:a=10,bounceStiffness:n=500,modifyTarget:s,min:i,max:l,restDelta:u=.5,restSpeed:c}){let d=e[0],f={done:!1,value:d},m=L=>i!==void 0&&L<i||l!==void 0&&L>l,p=L=>i===void 0?l:l===void 0||Math.abs(i-L)<Math.abs(l-L)?i:l,g=o*t,h=d+g,v=s===void 0?h:s(h);v!==h&&(g=v-d);let x=L=>-g*Math.exp(-L/r),y=L=>v+x(L),R=L=>{let P=x(L),T=y(L);f.done=Math.abs(P)<=u,f.value=f.done?v:T},C,w,I=L=>{m(f.value)&&(C=L,w=Ar({keyframes:[f.value,p(f.value)],velocity:gc(y,L,f.value),damping:a,stiffness:n,restDelta:u,restSpeed:c}))};return I(0),{calculatedDuration:null,next:L=>{let P=!1;return!w&&C===void 0&&(P=!0,R(L),I(L)),C!==void 0&&L>=C?w.next(L-C):(!P&&R(L),f)}}}function D1(e,t,o){let r=[],a=o||Pt.mix||mc,n=e.length-1;for(let s=0;s<n;s++){let i=a(e[s],e[s+1]);if(t){let l=Array.isArray(t)?t[s]||Qe:t;i=Wo(l,i)}r.push(i)}return r}function xc(e,t,{clamp:o=!0,ease:r,mixer:a}={}){let n=e.length;if(nt(n===t.length,"Both input and output ranges must be the same length","range-length"),n===1)return()=>t[0];if(n===2&&t[0]===t[1])return()=>t[1];let s=e[0]===e[1];e[0]>e[n-1]&&(e=[...e].reverse(),t=[...t].reverse());let i=D1(t,r,a),l=i.length,u=c=>{if(s&&c<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(c<e[d+1]);d++);let f=Lo(e[d],e[d+1],c);return i[d](f)};return o?c=>u(xt(e[0],e[n-1],c)):u}function Rl(e,t){let o=e[e.length-1];for(let r=1;r<=t;r++){let a=Lo(0,t,r);e.push(Ce(o,1,a))}}function Il(e){let t=[0];return Rl(t,e.length-1),t}function ub(e,t){return e.map(o=>o*t)}function E1(e,t){return e.map(()=>t||ml).splice(0,e.length-1)}function cn({duration:e=300,keyframes:t,times:o,ease:r="easeInOut"}){let a=pl(r)?r.map(sc):sc(r),n={done:!1,value:t[0]},s=ub(o&&o.length===t.length?o:Il(t),e),i=xc(s,t,{ease:Array.isArray(a)?a:E1(t,a)});return{calculatedDuration:e,next:l=>(n.value=i(l),n.done=l>=e,n)}}var N1=e=>e!==null;function Rs(e,{repeat:t,repeatType:o="loop"},r,a=1){let n=e.filter(N1),i=a<0||t&&o!=="loop"&&t%2===1?0:n.length-1;return!i||r===void 0?n[i]:r}var F1={decay:Sl,inertia:Sl,tween:cn,keyframes:cn,spring:Ar};function vc(e){typeof e.type=="string"&&(e.type=F1[e.type])}var xa=class{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,o){return this.finished.then(t,o)}};var O1=e=>e/100,Dr=class extends xa{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{let{motionValue:o}=this.options;o&&o.updatedAt!==ot.now()&&this.tick(ot.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},$o.mainThread++,this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){let{options:t}=this;vc(t);let{type:o=cn,repeat:r=0,repeatDelay:a=0,repeatType:n,velocity:s=0}=t,{keyframes:i}=t,l=o||cn;l!==cn&&typeof i[0]!="number"&&(this.mixKeyframes=Wo(O1,mc(i[0],i[1])),i=[0,100]);let u=l({...t,keyframes:i});n==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...i].reverse(),velocity:-s})),u.calculatedDuration===null&&(u.calculatedDuration=Ss(u));let{calculatedDuration:c}=u;this.calculatedDuration=c,this.resolvedDuration=c+a,this.totalDuration=this.resolvedDuration*(r+1)-a,this.generator=u}updateTime(t){let o=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=o}tick(t,o=!1){let{generator:r,totalDuration:a,mixKeyframes:n,mirroredGenerator:s,resolvedDuration:i,calculatedDuration:l}=this;if(this.startTime===null)return r.next(0);let{delay:u=0,keyframes:c,repeat:d,repeatType:f,repeatDelay:m,type:p,onUpdate:g,finalKeyframe:h}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-a/this.speed,this.startTime)),o?this.currentTime=t:this.updateTime(t);let v=this.currentTime-u*(this.playbackSpeed>=0?1:-1),x=this.playbackSpeed>=0?v<0:v>a;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=a);let y=this.currentTime,R=r;if(d){let L=Math.min(this.currentTime,a)/i,P=Math.floor(L),T=L%1;!T&&L>=1&&(T=1),T===1&&P--,P=Math.min(P,d+1),!!(P%2)&&(f==="reverse"?(T=1-T,m&&(T-=m/i)):f==="mirror"&&(R=s)),y=xt(0,1,T)*i}let C=x?{done:!1,value:c[0]}:R.next(y);n&&(C.value=n(C.value));let{done:w}=C;!x&&l!==null&&(w=this.playbackSpeed>=0?this.currentTime>=a:this.currentTime<=0);let I=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&w);return I&&p!==Sl&&(C.value=Rs(c,this.options,h,this.speed)),g&&g(C.value),I&&this.finish(),C}then(t,o){return this.finished.then(t,o)}get duration(){return Rt(this.calculatedDuration)}get time(){return Rt(this.currentTime)}set time(t){t=at(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(ot.now());let o=this.playbackSpeed!==t;this.playbackSpeed=t,o&&(this.time=Rt(this.currentTime))}play(){if(this.isStopped)return;let{driver:t=sb,startTime:o}=this.options;this.driver||(this.driver=t(a=>this.tick(a))),this.options.onPlay?.();let r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=o??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(ot.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null,$o.mainThread--}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}};function cb(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var dn=e=>e*180/Math.PI,Gm=e=>{let t=dn(Math.atan2(e[1],e[0]));return zm(t)},_1={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Gm,rotateZ:Gm,skewX:e=>dn(Math.atan(e[1])),skewY:e=>dn(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},zm=e=>(e=e%360,e<0&&(e+=360),e),db=Gm,fb=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),mb=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),V1={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:fb,scaleY:mb,scale:e=>(fb(e)+mb(e))/2,rotateX:e=>zm(dn(Math.atan2(e[6],e[5]))),rotateY:e=>zm(dn(Math.atan2(-e[2],e[0]))),rotateZ:db,rotate:db,skewX:e=>dn(Math.atan(e[4])),skewY:e=>dn(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Ll(e){return e.includes("scale")?1:0}function Pl(e,t){if(!e||e==="none")return Ll(t);let o=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),r,a;if(o)r=V1,a=o;else{let i=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=_1,a=i}if(!a)return Ll(t);let n=r[t],s=a[1].split(",").map(B1);return typeof n=="function"?n(s):s[n]}var qm=(e,t)=>{let{transform:o="none"}=getComputedStyle(e);return Pl(o,t)};function B1(e){return parseFloat(e.trim())}var Ko=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],mo=new Set(Ko);var Wm=e=>e===fr||e===ae,H1=new Set(["x","y","z"]),U1=Ko.filter(e=>!H1.has(e));function pb(e){let t=[];return U1.forEach(o=>{let r=e.getValue(o);r!==void 0&&(t.push([o,r.get()]),r.set(o.startsWith("scale")?1:0))}),t}var va={width:({x:e},{paddingLeft:t="0",paddingRight:o="0"})=>e.max-e.min-parseFloat(t)-parseFloat(o),height:({y:e},{paddingTop:t="0",paddingBottom:o="0"})=>e.max-e.min-parseFloat(t)-parseFloat(o),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>Pl(t,"x"),y:(e,{transform:t})=>Pl(t,"y")};va.translateX=va.x;va.translateY=va.y;var fn=new Set,$m=!1,jm=!1,Km=!1;function gb(){if(jm){let e=Array.from(fn).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),o=new Map;t.forEach(r=>{let a=pb(r);a.length&&(o.set(r,a),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();let a=o.get(r);a&&a.forEach(([n,s])=>{r.getValue(n)?.set(s)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}jm=!1,$m=!1,fn.forEach(e=>e.complete(Km)),fn.clear()}function hb(){fn.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(jm=!0)})}function Xm(){Km=!0,hb(),gb(),Km=!1}var Er=class{constructor(t,o,r,a,n,s=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=o,this.name=r,this.motionValue=a,this.element=n,this.isAsync=s}scheduleResolve(){this.state="scheduled",this.isAsync?(fn.add(this),$m||($m=!0,ve.read(hb),ve.resolveKeyframes(gb))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:t,name:o,element:r,motionValue:a}=this;if(t[0]===null){let n=a?.get(),s=t[t.length-1];if(n!==void 0)t[0]=n;else if(r&&o){let i=r.readValue(o,s);i!=null&&(t[0]=i)}t[0]===void 0&&(t[0]=s),a&&n===void 0&&a.set(t[0])}cb(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),fn.delete(this)}cancel(){this.state==="scheduled"&&(fn.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}};var xb=e=>e.startsWith("--");function vb(e,t,o){xb(t)?e.style.setProperty(t,o):e.style[t]=o}var yb=sn(()=>window.ScrollTimeline!==void 0);var bb={};function Cb(e,t){let o=sn(e);return()=>bb[t]??o()}var yc=Cb(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing");var mn=([e,t,o,r])=>`cubic-bezier(${e}, ${t}, ${o}, ${r})`;var Ym={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:mn([0,.65,.55,1]),circOut:mn([.55,0,1,.45]),backIn:mn([.31,.01,.66,-.59]),backOut:mn([.33,1.53,.69,.99])};function Zm(e,t){if(e)return typeof e=="function"?yc()?pc(e,t):"ease-out":hl(e)?mn(e):Array.isArray(e)?e.map(o=>Zm(o,t)||Ym.easeOut):Ym[e]}function wb(e,t,o,{delay:r=0,duration:a=300,repeat:n=0,repeatType:s="loop",ease:i="easeOut",times:l}={},u=void 0){let c={[t]:o};l&&(c.offset=l);let d=Zm(i,a);Array.isArray(d)&&(c.easing=d),eo.value&&$o.waapi++;let f={delay:r,duration:a,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:n+1,direction:s==="reverse"?"alternate":"normal"};u&&(f.pseudoElement=u);let m=e.animate(c,f);return eo.value&&m.finished.finally(()=>{$o.waapi--}),m}function pn(e){return typeof e=="function"&&"applyToOptions"in e}function Sb({type:e,...t}){return pn(e)&&yc()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}var bc=class extends xa{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;let{element:o,name:r,keyframes:a,pseudoElement:n,allowFlatten:s=!1,finalKeyframe:i,onComplete:l}=t;this.isPseudoElement=!!n,this.allowFlatten=s,this.options=t,nt(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");let u=Sb(t);this.animation=wb(o,r,a,u,n),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!n){let c=Rs(a,this.options,i,this.speed);this.updateMotionValue?this.updateMotionValue(c):vb(o,r,c),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){let t=this.animation.effect?.getComputedTiming?.().duration||0;return Rt(Number(t))}get time(){return Rt(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=at(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:o}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&yb()?(this.animation.timeline=t,Qe):o(this)}};var Rb={anticipate:ul,backInOut:ll,circInOut:fl};function G1(e){return e in Rb}function Ib(e){typeof e.ease=="string"&&G1(e.ease)&&(e.ease=Rb[e.ease])}var Lb=10,Cc=class extends bc{constructor(t){Ib(t),vc(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){let{motionValue:o,onUpdate:r,onComplete:a,element:n,...s}=this.options;if(!o)return;if(t!==void 0){o.set(t);return}let i=new Dr({...s,autoplay:!1}),l=at(this.finishedTime??this.time);o.setWithVelocity(i.sample(l-Lb).value,i.sample(l).value,Lb),i.stop()}};var Qm=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(kt.test(e)||e==="0")&&!e.startsWith("url("));function z1(e){let t=e[0];if(e.length===1)return!0;for(let o=0;o<e.length;o++)if(e[o]!==t)return!0}function Pb(e,t,o,r){let a=e[0];if(a===null)return!1;if(t==="display"||t==="visibility")return!0;let n=e[e.length-1],s=Qm(a,t),i=Qm(n,t);return Tr(s===i,`You are trying to animate ${t} from "${a}" to "${n}". "${s?n:a}" is not an animatable value.`,"value-not-animatable"),!s||!i?!1:z1(e)||(o==="spring"||pn(o))&&r}function Is(e){e.duration=0,e.type}var q1=new Set(["opacity","clipPath","filter","transform"]),W1=sn(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Tb(e){let{motionValue:t,name:o,repeatDelay:r,repeatType:a,damping:n,type:s}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;let{onUpdate:l,transformTemplate:u}=t.owner.getProps();return W1()&&o&&q1.has(o)&&(o!=="transform"||!u)&&!l&&!r&&a!=="mirror"&&n!==0&&s!=="inertia"}var $1=40,Tl=class extends xa{constructor({autoplay:t=!0,delay:o=0,type:r="keyframes",repeat:a=0,repeatDelay:n=0,repeatType:s="loop",keyframes:i,name:l,motionValue:u,element:c,...d}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=ot.now();let f={autoplay:t,delay:o,type:r,repeat:a,repeatDelay:n,repeatType:s,name:l,motionValue:u,element:c,...d},m=c?.KeyframeResolver||Er;this.keyframeResolver=new m(i,(p,g,h)=>this.onKeyframesResolved(p,g,f,!h),l,u,c),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,o,r,a){this.keyframeResolver=void 0;let{name:n,type:s,velocity:i,delay:l,isHandoff:u,onUpdate:c}=r;this.resolvedAt=ot.now(),Pb(t,n,s,i)||((Pt.instantAnimations||!l)&&c?.(Rs(t,r,o)),t[0]=t[t.length-1],Is(r),r.repeat=0);let f={startTime:a?this.resolvedAt?this.resolvedAt-this.createdAt>$1?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:o,...r,keyframes:t},m=!u&&Tb(f)?new Cc({...f,element:f.motionValue.owner.current}):new Dr(f);m.finished.then(()=>this.notifyFinished()).catch(Qe),this.pendingTimeline&&(this.stopTimeline=m.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=m}get finished(){return this._animation?this.animation.finished:this._finished}then(t,o){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Xm()),this._animation}get duration(){return this.animation.duration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}};var wc=class{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,o){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=o}attachTimeline(t){let o=this.animations.map(r=>r.attachTimeline(t));return()=>{o.forEach((r,a)=>{r&&r(),this.animations[a].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let o=0;o<this.animations.length;o++)t=Math.max(t,this.animations[o].duration);return t}runAll(t){this.animations.forEach(o=>o[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}};var Ml=class extends wc{then(t,o){return this.finished.finally(t).then(()=>{})}};var j1=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function K1(e){let t=j1.exec(e);if(!t)return[,];let[,o,r,a]=t;return[`--${o??r}`,a]}var X1=4;function Jm(e,t,o=1){nt(o<=X1,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");let[r,a]=K1(e);if(!r)return;let n=window.getComputedStyle(t).getPropertyValue(r);if(n){let s=n.trim();return al(s)?parseFloat(s):s}return un(a)?Jm(a,t,o+1):a}function gn(e,t){return e?.[t]??e?.default??e}var kl=new Set(["width","height","top","left","right","bottom",...Ko]);var Mb={test:e=>e==="auto",parse:e=>e};var Sc=e=>t=>t.test(e);var ep=[fr,ae,Mt,jo,Om,Fm,Mb],tp=e=>ep.find(Sc(e));function kb(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||sl(e):!0}var Y1=new Set(["brightness","contrast","saturate","opacity"]);function Z1(e){let[t,o]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;let[r]=o.match(bs)||[];if(!r)return e;let a=o.replace(r,""),n=Y1.has(t)?1:0;return r!==o&&(n*=100),t+"("+n+a+")"}var Q1=/\b([a-z-]*)\(.*?\)/gu,Al={...kt,getAnimatableNone:e=>{let t=e.match(Q1);return t?t.map(Z1).join(" "):e}};var op={...fr,transform:Math.round};var Ab={rotate:jo,rotateX:jo,rotateY:jo,rotateZ:jo,scale:yl,scaleX:yl,scaleY:yl,scaleZ:yl,skew:jo,skewX:jo,skewY:jo,distance:ae,translateX:ae,translateY:ae,translateZ:ae,x:ae,y:ae,z:ae,perspective:ae,transformPerspective:ae,opacity:kr,originX:cc,originY:cc,originZ:ae};var hn={borderWidth:ae,borderTopWidth:ae,borderRightWidth:ae,borderBottomWidth:ae,borderLeftWidth:ae,borderRadius:ae,radius:ae,borderTopLeftRadius:ae,borderTopRightRadius:ae,borderBottomRightRadius:ae,borderBottomLeftRadius:ae,width:ae,maxWidth:ae,height:ae,maxHeight:ae,top:ae,right:ae,bottom:ae,left:ae,padding:ae,paddingTop:ae,paddingRight:ae,paddingBottom:ae,paddingLeft:ae,margin:ae,marginTop:ae,marginRight:ae,marginBottom:ae,marginLeft:ae,backgroundPositionX:ae,backgroundPositionY:ae,...Ab,zIndex:op,fillOpacity:kr,strokeOpacity:kr,numOctaves:op};var Db={...hn,color:Xe,backgroundColor:Xe,outlineColor:Xe,fill:Xe,stroke:Xe,borderColor:Xe,borderTopColor:Xe,borderRightColor:Xe,borderBottomColor:Xe,borderLeftColor:Xe,filter:Al,WebkitFilter:Al},Dl=e=>Db[e];function El(e,t){let o=Dl(e);return o!==Al&&(o=kt),o.getAnimatableNone?o.getAnimatableNone(t):void 0}var J1=new Set(["auto","none","0"]);function Eb(e,t,o){let r=0,a;for(;r<e.length&&!a;){let n=e[r];typeof n=="string"&&!J1.has(n)&&ha(n).values.length&&(a=e[r]),r++}if(a&&o)for(let n of t)e[n]=El(o,a)}var Nl=class extends Er{constructor(t,o,r,a,n){super(t,o,r,a,n,!0)}readKeyframes(){let{unresolvedKeyframes:t,element:o,name:r}=this;if(!o||!o.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let u=t[l];if(typeof u=="string"&&(u=u.trim(),un(u))){let c=Jm(u,o.current);c!==void 0&&(t[l]=c),l===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!kl.has(r)||t.length!==2)return;let[a,n]=t,s=tp(a),i=tp(n);if(s!==i)if(Wm(s)&&Wm(i))for(let l=0;l<t.length;l++){let u=t[l];typeof u=="string"&&(t[l]=parseFloat(u))}else va[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:t,name:o}=this,r=[];for(let a=0;a<t.length;a++)(t[a]===null||kb(t[a]))&&r.push(a);r.length&&Eb(t,r,o)}measureInitialState(){let{element:t,unresolvedKeyframes:o,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=va[r](t.measureViewportBox(),window.getComputedStyle(t.current)),o[0]=this.measuredOrigin;let a=o[o.length-1];a!==void 0&&t.getValue(r,a).jump(a,!1)}measureEndState(){let{element:t,name:o,unresolvedKeyframes:r}=this;if(!t||!t.current)return;let a=t.getValue(o);a&&a.jump(this.measuredOrigin,!1);let n=r.length-1,s=r[n];r[n]=va[o](t.measureViewportBox(),window.getComputedStyle(t.current)),s!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=s),this.removedTransforms?.length&&this.removedTransforms.forEach(([i,l])=>{t.getValue(i).set(l)}),this.resolveNoneKeyframes()}};function xn(e,t,o){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;t&&(r=t.current);let a=o?.[e]??r.querySelectorAll(e);return a?Array.from(a):[]}return Array.from(e)}var Fl=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Ol(e){return nl(e)&&"offsetHeight"in e}var Nb=30,eN=e=>!isNaN(parseFloat(e)),vn={current:void 0},Rc=class{constructor(t,o={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{let a=ot.now();if(this.updatedAt!==a&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(let n of this.dependents)n.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=o.owner}setCurrent(t){this.current=t,this.updatedAt=ot.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=eN(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,o){this.events[t]||(this.events[t]=new Mr);let r=this.events[t].add(o);return t==="change"?()=>{r(),ve.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(let t in this.events)this.events[t].clear()}attach(t,o){this.passiveEffect=t,this.stopPassiveEffect=o}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,o,r){this.set(o),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,o=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,o&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return vn.current&&vn.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let t=ot.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Nb)return 0;let o=Math.min(this.updatedAt-this.prevUpdatedAt,Nb);return il(parseFloat(this.current)-parseFloat(this.prevFrameValue),o)}start(t){return this.stop(),new Promise(o=>{this.hasAnimated=!0,this.animation=t(o),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function to(e,t){return new Rc(e,t)}var{schedule:yn,cancel:tN}=ic(queueMicrotask,!1);var Po={x:!1,y:!1};function Ic(){return Po.x||Po.y}function rp(e){return e==="x"||e==="y"?Po[e]?null:(Po[e]=!0,()=>{Po[e]=!1}):Po.x||Po.y?null:(Po.x=Po.y=!0,()=>{Po.x=Po.y=!1})}function Lc(e,t){let o=xn(e),r=new AbortController,a={passive:!0,...t,signal:r.signal};return[o,a,()=>r.abort()]}function Fb(e){return!(e.pointerType==="touch"||Ic())}function ap(e,t,o={}){let[r,a,n]=Lc(e,o),s=i=>{if(!Fb(i))return;let{target:l}=i,u=t(l,i);if(typeof u!="function"||!l)return;let c=d=>{Fb(d)&&(u(d),l.removeEventListener("pointerleave",c))};l.addEventListener("pointerleave",c,a)};return r.forEach(i=>{i.addEventListener("pointerenter",s,a)}),n}var np=(e,t)=>t?e===t?!0:np(e,t.parentElement):!1;var bn=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;var oN=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Ob(e){return oN.has(e.tagName)||e.tabIndex!==-1}var Ls=new WeakSet;function _b(e){return t=>{t.key==="Enter"&&e(t)}}function sp(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}var Vb=(e,t)=>{let o=e.currentTarget;if(!o)return;let r=_b(()=>{if(Ls.has(o))return;sp(o,"down");let a=_b(()=>{sp(o,"up")}),n=()=>sp(o,"cancel");o.addEventListener("keyup",a,t),o.addEventListener("blur",n,t)});o.addEventListener("keydown",r,t),o.addEventListener("blur",()=>o.removeEventListener("keydown",r),t)};function Bb(e){return bn(e)&&!Ic()}function ip(e,t,o={}){let[r,a,n]=Lc(e,o),s=i=>{let l=i.currentTarget;if(!Bb(i))return;Ls.add(l);let u=t(l,i),c=(m,p)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",f),Ls.has(l)&&Ls.delete(l),Bb(m)&&typeof u=="function"&&u(m,{success:p})},d=m=>{c(m,l===window||l===document||o.useGlobalTarget||np(l,m.target))},f=m=>{c(m,!1)};window.addEventListener("pointerup",d,a),window.addEventListener("pointercancel",f,a)};return r.forEach(i=>{(o.useGlobalTarget?window:i).addEventListener("pointerdown",s,a),Ol(i)&&(i.addEventListener("focus",u=>Vb(u,a)),!Ob(i)&&!i.hasAttribute("tabindex")&&(i.tabIndex=0))}),n}function Cn(e){return nl(e)&&"ownerSVGElement"in e}function _l(e){return Cn(e)&&e.tagName==="svg"}function lp(...e){let t=!Array.isArray(e[0]),o=t?0:-1,r=e[0+o],a=e[1+o],n=e[2+o],s=e[3+o],i=xc(a,n,s);return t?i(r):i}var ke=e=>!!(e&&e.getVelocity);var rN=[...ep,Xe,kt],up=e=>rN.find(Sc(e));var Pc=b(A(),1),Nr=b(A(),1);var Hb=b(A(),1),ya=(0,Hb.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});var cp=class extends Pc.Component{getSnapshotBeforeUpdate(t){let o=this.props.childRef.current;if(o&&t.isPresent&&!this.props.isPresent){let r=o.offsetParent,a=Ol(r)&&r.offsetWidth||0,n=this.props.sizeRef.current;n.height=o.offsetHeight||0,n.width=o.offsetWidth||0,n.top=o.offsetTop,n.left=o.offsetLeft,n.right=a-n.width-n.left}return null}componentDidUpdate(){}render(){return this.props.children}};function Gb({children:e,isPresent:t,anchorX:o,root:r}){let a=(0,Nr.useId)(),n=(0,Nr.useRef)(null),s=(0,Nr.useRef)({width:0,height:0,top:0,left:0,right:0}),{nonce:i}=(0,Nr.useContext)(ya);return(0,Nr.useInsertionEffect)(()=>{let{width:l,height:u,top:c,left:d,right:f}=s.current;if(t||!n.current||!l||!u)return;let m=o==="left"?`left: ${d}`:`right: ${f}`;n.current.dataset.motionPopId=a;let p=document.createElement("style");i&&(p.nonce=i);let g=r??document.head;return g.appendChild(p),p.sheet&&p.sheet.insertRule(`
|
|
3
|
-
|
|
2
|
+
var gU=Object.create;var LL=Object.defineProperty;var hU=Object.getOwnPropertyDescriptor;var vU=Object.getOwnPropertyNames;var yU=Object.getPrototypeOf,xU=Object.prototype.hasOwnProperty;var wU=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var rr=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var CU=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of vU(t))!xU.call(e,n)&&n!==r&&LL(e,n,{get:()=>t[n],enumerable:!(o=hU(t,n))||o.enumerable});return e};var R=(e,t,r)=>(r=e!=null?gU(yU(e)):{},CU(t||!e||!e.__esModule?LL(r,"default",{value:e,enumerable:!0}):r,e));var FL=rr(Re=>{"use strict";var Dc=Symbol.for("react.element"),SU=Symbol.for("react.portal"),bU=Symbol.for("react.fragment"),RU=Symbol.for("react.strict_mode"),LU=Symbol.for("react.profiler"),IU=Symbol.for("react.provider"),PU=Symbol.for("react.context"),TU=Symbol.for("react.forward_ref"),kU=Symbol.for("react.suspense"),MU=Symbol.for("react.memo"),EU=Symbol.for("react.lazy"),IL=Symbol.iterator;function AU(e){return e===null||typeof e!="object"?null:(e=IL&&e[IL]||e["@@iterator"],typeof e=="function"?e:null)}var kL={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},ML=Object.assign,EL={};function Ll(e,t,r){this.props=e,this.context=t,this.refs=EL,this.updater=r||kL}Ll.prototype.isReactComponent={};Ll.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Ll.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function AL(){}AL.prototype=Ll.prototype;function Hy(e,t,r){this.props=e,this.context=t,this.refs=EL,this.updater=r||kL}var Uy=Hy.prototype=new AL;Uy.constructor=Hy;ML(Uy,Ll.prototype);Uy.isPureReactComponent=!0;var PL=Array.isArray,DL=Object.prototype.hasOwnProperty,zy={current:null},NL={key:!0,ref:!0,__self:!0,__source:!0};function _L(e,t,r){var o,n={},a=null,i=null;if(t!=null)for(o in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(a=""+t.key),t)DL.call(t,o)&&!NL.hasOwnProperty(o)&&(n[o]=t[o]);var s=arguments.length-2;if(s===1)n.children=r;else if(1<s){for(var l=Array(s),u=0;u<s;u++)l[u]=arguments[u+2];n.children=l}if(e&&e.defaultProps)for(o in s=e.defaultProps,s)n[o]===void 0&&(n[o]=s[o]);return{$$typeof:Dc,type:e,key:a,ref:i,props:n,_owner:zy.current}}function DU(e,t){return{$$typeof:Dc,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Wy(e){return typeof e=="object"&&e!==null&&e.$$typeof===Dc}function NU(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var TL=/\/+/g;function By(e,t){return typeof e=="object"&&e!==null&&e.key!=null?NU(""+e.key):t.toString(36)}function Hp(e,t,r,o,n){var a=typeof e;(a==="undefined"||a==="boolean")&&(e=null);var i=!1;if(e===null)i=!0;else switch(a){case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case Dc:case SU:i=!0}}if(i)return i=e,n=n(i),e=o===""?"."+By(i,0):o,PL(n)?(r="",e!=null&&(r=e.replace(TL,"$&/")+"/"),Hp(n,t,r,"",function(u){return u})):n!=null&&(Wy(n)&&(n=DU(n,r+(!n.key||i&&i.key===n.key?"":(""+n.key).replace(TL,"$&/")+"/")+e)),t.push(n)),1;if(i=0,o=o===""?".":o+":",PL(e))for(var s=0;s<e.length;s++){a=e[s];var l=o+By(a,s);i+=Hp(a,t,r,l,n)}else if(l=AU(e),typeof l=="function")for(e=l.call(e),s=0;!(a=e.next()).done;)a=a.value,l=o+By(a,s++),i+=Hp(a,t,r,l,n);else if(a==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return i}function Bp(e,t,r){if(e==null)return e;var o=[],n=0;return Hp(e,o,"","",function(a){return t.call(r,a,n++)}),o}function _U(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var br={current:null},Up={transition:null},OU={ReactCurrentDispatcher:br,ReactCurrentBatchConfig:Up,ReactCurrentOwner:zy};function OL(){throw Error("act(...) is not supported in production builds of React.")}Re.Children={map:Bp,forEach:function(e,t,r){Bp(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return Bp(e,function(){t++}),t},toArray:function(e){return Bp(e,function(t){return t})||[]},only:function(e){if(!Wy(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Re.Component=Ll;Re.Fragment=bU;Re.Profiler=LU;Re.PureComponent=Hy;Re.StrictMode=RU;Re.Suspense=kU;Re.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=OU;Re.act=OL;Re.cloneElement=function(e,t,r){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var o=ML({},e.props),n=e.key,a=e.ref,i=e._owner;if(t!=null){if(t.ref!==void 0&&(a=t.ref,i=zy.current),t.key!==void 0&&(n=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(l in t)DL.call(t,l)&&!NL.hasOwnProperty(l)&&(o[l]=t[l]===void 0&&s!==void 0?s[l]:t[l])}var l=arguments.length-2;if(l===1)o.children=r;else if(1<l){s=Array(l);for(var u=0;u<l;u++)s[u]=arguments[u+2];o.children=s}return{$$typeof:Dc,type:e.type,key:n,ref:a,props:o,_owner:i}};Re.createContext=function(e){return e={$$typeof:PU,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:IU,_context:e},e.Consumer=e};Re.createElement=_L;Re.createFactory=function(e){var t=_L.bind(null,e);return t.type=e,t};Re.createRef=function(){return{current:null}};Re.forwardRef=function(e){return{$$typeof:TU,render:e}};Re.isValidElement=Wy;Re.lazy=function(e){return{$$typeof:EU,_payload:{_status:-1,_result:e},_init:_U}};Re.memo=function(e,t){return{$$typeof:MU,type:e,compare:t===void 0?null:t}};Re.startTransition=function(e){var t=Up.transition;Up.transition={};try{e()}finally{Up.transition=t}};Re.unstable_act=OL;Re.useCallback=function(e,t){return br.current.useCallback(e,t)};Re.useContext=function(e){return br.current.useContext(e)};Re.useDebugValue=function(){};Re.useDeferredValue=function(e){return br.current.useDeferredValue(e)};Re.useEffect=function(e,t){return br.current.useEffect(e,t)};Re.useId=function(){return br.current.useId()};Re.useImperativeHandle=function(e,t,r){return br.current.useImperativeHandle(e,t,r)};Re.useInsertionEffect=function(e,t){return br.current.useInsertionEffect(e,t)};Re.useLayoutEffect=function(e,t){return br.current.useLayoutEffect(e,t)};Re.useMemo=function(e,t){return br.current.useMemo(e,t)};Re.useReducer=function(e,t,r){return br.current.useReducer(e,t,r)};Re.useRef=function(e){return br.current.useRef(e)};Re.useState=function(e){return br.current.useState(e)};Re.useSyncExternalStore=function(e,t,r){return br.current.useSyncExternalStore(e,t,r)};Re.useTransition=function(){return br.current.useTransition()};Re.version="18.3.1"});var E=rr((bZ,VL)=>{"use strict";VL.exports=FL()});var HL=rr(zp=>{"use strict";var FU=E(),VU=Symbol.for("react.element"),BU=Symbol.for("react.fragment"),HU=Object.prototype.hasOwnProperty,UU=FU.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,zU={key:!0,ref:!0,__self:!0,__source:!0};function BL(e,t,r){var o,n={},a=null,i=null;r!==void 0&&(a=""+r),t.key!==void 0&&(a=""+t.key),t.ref!==void 0&&(i=t.ref);for(o in t)HU.call(t,o)&&!zU.hasOwnProperty(o)&&(n[o]=t[o]);if(e&&e.defaultProps)for(o in t=e.defaultProps,t)n[o]===void 0&&(n[o]=t[o]);return{$$typeof:VU,type:e,key:a,ref:i,props:n,_owner:UU.current}}zp.Fragment=BU;zp.jsx=BL;zp.jsxs=BL});var M=rr((LZ,UL)=>{"use strict";UL.exports=HL()});var oI=rr(Ge=>{"use strict";function Ky(e,t){var r=e.length;e.push(t);e:for(;0<r;){var o=r-1>>>1,n=e[o];if(0<jp(n,t))e[o]=t,e[r]=n,r=o;else break e}}function Yo(e){return e.length===0?null:e[0]}function $p(e){if(e.length===0)return null;var t=e[0],r=e.pop();if(r!==t){e[0]=r;e:for(var o=0,n=e.length,a=n>>>1;o<a;){var i=2*(o+1)-1,s=e[i],l=i+1,u=e[l];if(0>jp(s,r))l<n&&0>jp(u,s)?(e[o]=u,e[l]=r,o=l):(e[o]=s,e[i]=r,o=i);else if(l<n&&0>jp(u,r))e[o]=u,e[l]=r,o=l;else break e}}return t}function jp(e,t){var r=e.sortIndex-t.sortIndex;return r!==0?r:e.id-t.id}typeof performance=="object"&&typeof performance.now=="function"?(KL=performance,Ge.unstable_now=function(){return KL.now()}):(jy=Date,XL=jy.now(),Ge.unstable_now=function(){return jy.now()-XL});var KL,jy,XL,An=[],Ka=[],JU=1,Lo=null,or=3,Kp=!1,us=!1,_c=!1,ZL=typeof setTimeout=="function"?setTimeout:null,JL=typeof clearTimeout=="function"?clearTimeout:null,YL=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function Xy(e){for(var t=Yo(Ka);t!==null;){if(t.callback===null)$p(Ka);else if(t.startTime<=e)$p(Ka),t.sortIndex=t.expirationTime,Ky(An,t);else break;t=Yo(Ka)}}function Yy(e){if(_c=!1,Xy(e),!us)if(Yo(An)!==null)us=!0,Zy(Qy);else{var t=Yo(Ka);t!==null&&Jy(Yy,t.startTime-e)}}function Qy(e,t){us=!1,_c&&(_c=!1,JL(Oc),Oc=-1),Kp=!0;var r=or;try{for(Xy(t),Lo=Yo(An);Lo!==null&&(!(Lo.expirationTime>t)||e&&!rI());){var o=Lo.callback;if(typeof o=="function"){Lo.callback=null,or=Lo.priorityLevel;var n=o(Lo.expirationTime<=t);t=Ge.unstable_now(),typeof n=="function"?Lo.callback=n:Lo===Yo(An)&&$p(An),Xy(t)}else $p(An);Lo=Yo(An)}if(Lo!==null)var a=!0;else{var i=Yo(Ka);i!==null&&Jy(Yy,i.startTime-t),a=!1}return a}finally{Lo=null,or=r,Kp=!1}}var Xp=!1,qp=null,Oc=-1,eI=5,tI=-1;function rI(){return!(Ge.unstable_now()-tI<eI)}function qy(){if(qp!==null){var e=Ge.unstable_now();tI=e;var t=!0;try{t=qp(!0,e)}finally{t?Nc():(Xp=!1,qp=null)}}else Xp=!1}var Nc;typeof YL=="function"?Nc=function(){YL(qy)}:typeof MessageChannel<"u"?($y=new MessageChannel,QL=$y.port2,$y.port1.onmessage=qy,Nc=function(){QL.postMessage(null)}):Nc=function(){ZL(qy,0)};var $y,QL;function Zy(e){qp=e,Xp||(Xp=!0,Nc())}function Jy(e,t){Oc=ZL(function(){e(Ge.unstable_now())},t)}Ge.unstable_IdlePriority=5;Ge.unstable_ImmediatePriority=1;Ge.unstable_LowPriority=4;Ge.unstable_NormalPriority=3;Ge.unstable_Profiling=null;Ge.unstable_UserBlockingPriority=2;Ge.unstable_cancelCallback=function(e){e.callback=null};Ge.unstable_continueExecution=function(){us||Kp||(us=!0,Zy(Qy))};Ge.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):eI=0<e?Math.floor(1e3/e):5};Ge.unstable_getCurrentPriorityLevel=function(){return or};Ge.unstable_getFirstCallbackNode=function(){return Yo(An)};Ge.unstable_next=function(e){switch(or){case 1:case 2:case 3:var t=3;break;default:t=or}var r=or;or=t;try{return e()}finally{or=r}};Ge.unstable_pauseExecution=function(){};Ge.unstable_requestPaint=function(){};Ge.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var r=or;or=e;try{return t()}finally{or=r}};Ge.unstable_scheduleCallback=function(e,t,r){var o=Ge.unstable_now();switch(typeof r=="object"&&r!==null?(r=r.delay,r=typeof r=="number"&&0<r?o+r:o):r=o,e){case 1:var n=-1;break;case 2:n=250;break;case 5:n=1073741823;break;case 4:n=1e4;break;default:n=5e3}return n=r+n,e={id:JU++,callback:t,priorityLevel:e,startTime:r,expirationTime:n,sortIndex:-1},r>o?(e.sortIndex=r,Ky(Ka,e),Yo(An)===null&&e===Yo(Ka)&&(_c?(JL(Oc),Oc=-1):_c=!0,Jy(Yy,r-o))):(e.sortIndex=n,Ky(An,e),us||Kp||(us=!0,Zy(Qy))),e};Ge.unstable_shouldYield=rI;Ge.unstable_wrapCallback=function(e){var t=or;return function(){var r=or;or=t;try{return e.apply(this,arguments)}finally{or=r}}}});var aI=rr((jZ,nI)=>{"use strict";nI.exports=oI()});var uT=rr(uo=>{"use strict";var e4=E(),so=aI();function j(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var fP=new Set,nd={};function Ss(e,t){$l(e,t),$l(e+"Capture",t)}function $l(e,t){for(nd[e]=t,e=0;e<t.length;e++)fP.add(t[e])}var ua=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Sx=Object.prototype.hasOwnProperty,t4=/^[: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]*$/,iI={},sI={};function r4(e){return Sx.call(sI,e)?!0:Sx.call(iI,e)?!1:t4.test(e)?sI[e]=!0:(iI[e]=!0,!1)}function o4(e,t,r,o){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return o?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function n4(e,t,r,o){if(t===null||typeof t>"u"||o4(e,t,r,o))return!0;if(o)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Ir(e,t,r,o,n,a,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=o,this.attributeNamespace=n,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=i}var Zt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Zt[e]=new Ir(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Zt[t]=new Ir(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Zt[e]=new Ir(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Zt[e]=new Ir(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Zt[e]=new Ir(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Zt[e]=new Ir(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Zt[e]=new Ir(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Zt[e]=new Ir(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Zt[e]=new Ir(e,5,!1,e.toLowerCase(),null,!1,!1)});var m0=/[\-:]([a-z])/g;function g0(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(m0,g0);Zt[t]=new Ir(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(m0,g0);Zt[t]=new Ir(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(m0,g0);Zt[t]=new Ir(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Zt[e]=new Ir(e,1,!1,e.toLowerCase(),null,!1,!1)});Zt.xlinkHref=new Ir("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Zt[e]=new Ir(e,1,!1,e.toLowerCase(),null,!0,!0)});function h0(e,t,r,o){var n=Zt.hasOwnProperty(t)?Zt[t]:null;(n!==null?n.type!==0:o||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(n4(t,r,n,o)&&(r=null),o||n===null?r4(t)&&(r===null?e.removeAttribute(t):e.setAttribute(t,""+r)):n.mustUseProperty?e[n.propertyName]=r===null?n.type===3?!1:"":r:(t=n.attributeName,o=n.attributeNamespace,r===null?e.removeAttribute(t):(n=n.type,r=n===3||n===4&&r===!0?"":""+r,o?e.setAttributeNS(o,t,r):e.setAttribute(t,r))))}var pa=e4.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Yp=Symbol.for("react.element"),kl=Symbol.for("react.portal"),Ml=Symbol.for("react.fragment"),v0=Symbol.for("react.strict_mode"),bx=Symbol.for("react.profiler"),pP=Symbol.for("react.provider"),mP=Symbol.for("react.context"),y0=Symbol.for("react.forward_ref"),Rx=Symbol.for("react.suspense"),Lx=Symbol.for("react.suspense_list"),x0=Symbol.for("react.memo"),Ya=Symbol.for("react.lazy");Symbol.for("react.scope");Symbol.for("react.debug_trace_mode");var gP=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden");Symbol.for("react.cache");Symbol.for("react.tracing_marker");var lI=Symbol.iterator;function Fc(e){return e===null||typeof e!="object"?null:(e=lI&&e[lI]||e["@@iterator"],typeof e=="function"?e:null)}var pt=Object.assign,ex;function jc(e){if(ex===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);ex=t&&t[1]||""}return`
|
|
3
|
+
`+ex+e}var tx=!1;function rx(e,t){if(!e||tx)return"";tx=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var o=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){o=u}e.call(t.prototype)}else{try{throw Error()}catch(u){o=u}e()}}catch(u){if(u&&o&&typeof u.stack=="string"){for(var n=u.stack.split(`
|
|
4
|
+
`),a=o.stack.split(`
|
|
5
|
+
`),i=n.length-1,s=a.length-1;1<=i&&0<=s&&n[i]!==a[s];)s--;for(;1<=i&&0<=s;i--,s--)if(n[i]!==a[s]){if(i!==1||s!==1)do if(i--,s--,0>s||n[i]!==a[s]){var l=`
|
|
6
|
+
`+n[i].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=i&&0<=s);break}}}finally{tx=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?jc(e):""}function a4(e){switch(e.tag){case 5:return jc(e.type);case 16:return jc("Lazy");case 13:return jc("Suspense");case 19:return jc("SuspenseList");case 0:case 2:case 15:return e=rx(e.type,!1),e;case 11:return e=rx(e.type.render,!1),e;case 1:return e=rx(e.type,!0),e;default:return""}}function Ix(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Ml:return"Fragment";case kl:return"Portal";case bx:return"Profiler";case v0:return"StrictMode";case Rx:return"Suspense";case Lx:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case mP:return(e.displayName||"Context")+".Consumer";case pP:return(e._context.displayName||"Context")+".Provider";case y0:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case x0:return t=e.displayName||null,t!==null?t:Ix(e.type)||"Memo";case Ya:t=e._payload,e=e._init;try{return Ix(e(t))}catch{}}return null}function i4(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Ix(t);case 8:return t===v0?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function ci(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function hP(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function s4(e){var t=hP(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),o=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var n=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return n.call(this)},set:function(i){o=""+i,a.call(this,i)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return o},setValue:function(i){o=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Qp(e){e._valueTracker||(e._valueTracker=s4(e))}function vP(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),o="";return e&&(o=hP(e)?e.checked?"true":"false":e.value),e=o,e!==r?(t.setValue(e),!0):!1}function Lm(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Px(e,t){var r=t.checked;return pt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function uI(e,t){var r=t.defaultValue==null?"":t.defaultValue,o=t.checked!=null?t.checked:t.defaultChecked;r=ci(t.value!=null?t.value:r),e._wrapperState={initialChecked:o,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function yP(e,t){t=t.checked,t!=null&&h0(e,"checked",t,!1)}function Tx(e,t){yP(e,t);var r=ci(t.value),o=t.type;if(r!=null)o==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(o==="submit"||o==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?kx(e,t.type,r):t.hasOwnProperty("defaultValue")&&kx(e,t.type,ci(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function cI(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var o=t.type;if(!(o!=="submit"&&o!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function kx(e,t,r){(t!=="number"||Lm(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var qc=Array.isArray;function Ul(e,t,r,o){if(e=e.options,t){t={};for(var n=0;n<r.length;n++)t["$"+r[n]]=!0;for(r=0;r<e.length;r++)n=t.hasOwnProperty("$"+e[r].value),e[r].selected!==n&&(e[r].selected=n),n&&o&&(e[r].defaultSelected=!0)}else{for(r=""+ci(r),t=null,n=0;n<e.length;n++){if(e[n].value===r){e[n].selected=!0,o&&(e[n].defaultSelected=!0);return}t!==null||e[n].disabled||(t=e[n])}t!==null&&(t.selected=!0)}}function Mx(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(j(91));return pt({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function dI(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error(j(92));if(qc(r)){if(1<r.length)throw Error(j(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:ci(r)}}function xP(e,t){var r=ci(t.value),o=ci(t.defaultValue);r!=null&&(r=""+r,r!==e.value&&(e.value=r),t.defaultValue==null&&e.defaultValue!==r&&(e.defaultValue=r)),o!=null&&(e.defaultValue=""+o)}function fI(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function wP(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Ex(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?wP(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Zp,CP=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,r,o,n){MSApp.execUnsafeLocalFunction(function(){return e(t,r,o,n)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Zp=Zp||document.createElement("div"),Zp.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Zp.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ad(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var Xc={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},l4=["Webkit","ms","Moz","O"];Object.keys(Xc).forEach(function(e){l4.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Xc[t]=Xc[e]})});function SP(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||Xc.hasOwnProperty(e)&&Xc[e]?(""+t).trim():t+"px"}function bP(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var o=r.indexOf("--")===0,n=SP(r,t[r],o);r==="float"&&(r="cssFloat"),o?e.setProperty(r,n):e[r]=n}}var u4=pt({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Ax(e,t){if(t){if(u4[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(j(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(j(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(j(61))}if(t.style!=null&&typeof t.style!="object")throw Error(j(62))}}function Dx(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Nx=null;function w0(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var _x=null,zl=null,Wl=null;function pI(e){if(e=bd(e)){if(typeof _x!="function")throw Error(j(280));var t=e.stateNode;t&&(t=Jm(t),_x(e.stateNode,e.type,t))}}function RP(e){zl?Wl?Wl.push(e):Wl=[e]:zl=e}function LP(){if(zl){var e=zl,t=Wl;if(Wl=zl=null,pI(e),t)for(e=0;e<t.length;e++)pI(t[e])}}function IP(e,t){return e(t)}function PP(){}var ox=!1;function TP(e,t,r){if(ox)return e(t,r);ox=!0;try{return IP(e,t,r)}finally{ox=!1,(zl!==null||Wl!==null)&&(PP(),LP())}}function id(e,t){var r=e.stateNode;if(r===null)return null;var o=Jm(r);if(o===null)return null;r=o[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":(o=!o.disabled)||(e=e.type,o=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!o;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(j(231,t,typeof r));return r}var Ox=!1;if(ua)try{Pl={},Object.defineProperty(Pl,"passive",{get:function(){Ox=!0}}),window.addEventListener("test",Pl,Pl),window.removeEventListener("test",Pl,Pl)}catch{Ox=!1}var Pl;function c4(e,t,r,o,n,a,i,s,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(r,u)}catch(c){this.onError(c)}}var Yc=!1,Im=null,Pm=!1,Fx=null,d4={onError:function(e){Yc=!0,Im=e}};function f4(e,t,r,o,n,a,i,s,l){Yc=!1,Im=null,c4.apply(d4,arguments)}function p4(e,t,r,o,n,a,i,s,l){if(f4.apply(this,arguments),Yc){if(Yc){var u=Im;Yc=!1,Im=null}else throw Error(j(198));Pm||(Pm=!0,Fx=u)}}function bs(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function kP(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 mI(e){if(bs(e)!==e)throw Error(j(188))}function m4(e){var t=e.alternate;if(!t){if(t=bs(e),t===null)throw Error(j(188));return t!==e?null:e}for(var r=e,o=t;;){var n=r.return;if(n===null)break;var a=n.alternate;if(a===null){if(o=n.return,o!==null){r=o;continue}break}if(n.child===a.child){for(a=n.child;a;){if(a===r)return mI(n),e;if(a===o)return mI(n),t;a=a.sibling}throw Error(j(188))}if(r.return!==o.return)r=n,o=a;else{for(var i=!1,s=n.child;s;){if(s===r){i=!0,r=n,o=a;break}if(s===o){i=!0,o=n,r=a;break}s=s.sibling}if(!i){for(s=a.child;s;){if(s===r){i=!0,r=a,o=n;break}if(s===o){i=!0,o=a,r=n;break}s=s.sibling}if(!i)throw Error(j(189))}}if(r.alternate!==o)throw Error(j(190))}if(r.tag!==3)throw Error(j(188));return r.stateNode.current===r?e:t}function MP(e){return e=m4(e),e!==null?EP(e):null}function EP(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=EP(e);if(t!==null)return t;e=e.sibling}return null}var AP=so.unstable_scheduleCallback,gI=so.unstable_cancelCallback,g4=so.unstable_shouldYield,h4=so.unstable_requestPaint,Ct=so.unstable_now,v4=so.unstable_getCurrentPriorityLevel,C0=so.unstable_ImmediatePriority,DP=so.unstable_UserBlockingPriority,Tm=so.unstable_NormalPriority,y4=so.unstable_LowPriority,NP=so.unstable_IdlePriority,Xm=null,On=null;function x4(e){if(On&&typeof On.onCommitFiberRoot=="function")try{On.onCommitFiberRoot(Xm,e,void 0,(e.current.flags&128)===128)}catch{}}var tn=Math.clz32?Math.clz32:S4,w4=Math.log,C4=Math.LN2;function S4(e){return e>>>=0,e===0?32:31-(w4(e)/C4|0)|0}var Jp=64,em=4194304;function $c(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function km(e,t){var r=e.pendingLanes;if(r===0)return 0;var o=0,n=e.suspendedLanes,a=e.pingedLanes,i=r&268435455;if(i!==0){var s=i&~n;s!==0?o=$c(s):(a&=i,a!==0&&(o=$c(a)))}else i=r&~n,i!==0?o=$c(i):a!==0&&(o=$c(a));if(o===0)return 0;if(t!==0&&t!==o&&!(t&n)&&(n=o&-o,a=t&-t,n>=a||n===16&&(a&4194240)!==0))return t;if(o&4&&(o|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=o;0<t;)r=31-tn(t),n=1<<r,o|=e[r],t&=~n;return o}function b4(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function R4(e,t){for(var r=e.suspendedLanes,o=e.pingedLanes,n=e.expirationTimes,a=e.pendingLanes;0<a;){var i=31-tn(a),s=1<<i,l=n[i];l===-1?(!(s&r)||s&o)&&(n[i]=b4(s,t)):l<=t&&(e.expiredLanes|=s),a&=~s}}function Vx(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function _P(){var e=Jp;return Jp<<=1,!(Jp&4194240)&&(Jp=64),e}function nx(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function Cd(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-tn(t),e[t]=r}function L4(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var o=e.eventTimes;for(e=e.expirationTimes;0<r;){var n=31-tn(r),a=1<<n;t[n]=0,o[n]=-1,e[n]=-1,r&=~a}}function S0(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var o=31-tn(r),n=1<<o;n&t|e[o]&t&&(e[o]|=t),r&=~n}}var Fe=0;function OP(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var FP,b0,VP,BP,HP,Bx=!1,tm=[],ri=null,oi=null,ni=null,sd=new Map,ld=new Map,Za=[],I4="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function hI(e,t){switch(e){case"focusin":case"focusout":ri=null;break;case"dragenter":case"dragleave":oi=null;break;case"mouseover":case"mouseout":ni=null;break;case"pointerover":case"pointerout":sd.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ld.delete(t.pointerId)}}function Vc(e,t,r,o,n,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:r,eventSystemFlags:o,nativeEvent:a,targetContainers:[n]},t!==null&&(t=bd(t),t!==null&&b0(t)),e):(e.eventSystemFlags|=o,t=e.targetContainers,n!==null&&t.indexOf(n)===-1&&t.push(n),e)}function P4(e,t,r,o,n){switch(t){case"focusin":return ri=Vc(ri,e,t,r,o,n),!0;case"dragenter":return oi=Vc(oi,e,t,r,o,n),!0;case"mouseover":return ni=Vc(ni,e,t,r,o,n),!0;case"pointerover":var a=n.pointerId;return sd.set(a,Vc(sd.get(a)||null,e,t,r,o,n)),!0;case"gotpointercapture":return a=n.pointerId,ld.set(a,Vc(ld.get(a)||null,e,t,r,o,n)),!0}return!1}function UP(e){var t=fs(e.target);if(t!==null){var r=bs(t);if(r!==null){if(t=r.tag,t===13){if(t=kP(r),t!==null){e.blockedOn=t,HP(e.priority,function(){VP(r)});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function gm(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=Hx(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var o=new r.constructor(r.type,r);Nx=o,r.target.dispatchEvent(o),Nx=null}else return t=bd(r),t!==null&&b0(t),e.blockedOn=r,!1;t.shift()}return!0}function vI(e,t,r){gm(e)&&r.delete(t)}function T4(){Bx=!1,ri!==null&&gm(ri)&&(ri=null),oi!==null&&gm(oi)&&(oi=null),ni!==null&&gm(ni)&&(ni=null),sd.forEach(vI),ld.forEach(vI)}function Bc(e,t){e.blockedOn===t&&(e.blockedOn=null,Bx||(Bx=!0,so.unstable_scheduleCallback(so.unstable_NormalPriority,T4)))}function ud(e){function t(n){return Bc(n,e)}if(0<tm.length){Bc(tm[0],e);for(var r=1;r<tm.length;r++){var o=tm[r];o.blockedOn===e&&(o.blockedOn=null)}}for(ri!==null&&Bc(ri,e),oi!==null&&Bc(oi,e),ni!==null&&Bc(ni,e),sd.forEach(t),ld.forEach(t),r=0;r<Za.length;r++)o=Za[r],o.blockedOn===e&&(o.blockedOn=null);for(;0<Za.length&&(r=Za[0],r.blockedOn===null);)UP(r),r.blockedOn===null&&Za.shift()}var Gl=pa.ReactCurrentBatchConfig,Mm=!0;function k4(e,t,r,o){var n=Fe,a=Gl.transition;Gl.transition=null;try{Fe=1,R0(e,t,r,o)}finally{Fe=n,Gl.transition=a}}function M4(e,t,r,o){var n=Fe,a=Gl.transition;Gl.transition=null;try{Fe=4,R0(e,t,r,o)}finally{Fe=n,Gl.transition=a}}function R0(e,t,r,o){if(Mm){var n=Hx(e,t,r,o);if(n===null)dx(e,t,o,Em,r),hI(e,o);else if(P4(n,e,t,r,o))o.stopPropagation();else if(hI(e,o),t&4&&-1<I4.indexOf(e)){for(;n!==null;){var a=bd(n);if(a!==null&&FP(a),a=Hx(e,t,r,o),a===null&&dx(e,t,o,Em,r),a===n)break;n=a}n!==null&&o.stopPropagation()}else dx(e,t,o,null,r)}}var Em=null;function Hx(e,t,r,o){if(Em=null,e=w0(o),e=fs(e),e!==null)if(t=bs(e),t===null)e=null;else if(r=t.tag,r===13){if(e=kP(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Em=e,null}function zP(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(v4()){case C0:return 1;case DP:return 4;case Tm:case y4:return 16;case NP:return 536870912;default:return 16}default:return 16}}var ei=null,L0=null,hm=null;function WP(){if(hm)return hm;var e,t=L0,r=t.length,o,n="value"in ei?ei.value:ei.textContent,a=n.length;for(e=0;e<r&&t[e]===n[e];e++);var i=r-e;for(o=1;o<=i&&t[r-o]===n[a-o];o++);return hm=n.slice(e,1<o?1-o:void 0)}function vm(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 rm(){return!0}function yI(){return!1}function lo(e){function t(r,o,n,a,i){this._reactName=r,this._targetInst=n,this.type=o,this.nativeEvent=a,this.target=i,this.currentTarget=null;for(var s in e)e.hasOwnProperty(s)&&(r=e[s],this[s]=r?r(a):a[s]);return this.isDefaultPrevented=(a.defaultPrevented!=null?a.defaultPrevented:a.returnValue===!1)?rm:yI,this.isPropagationStopped=yI,this}return pt(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=rm)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=rm)},persist:function(){},isPersistent:rm}),t}var eu={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},I0=lo(eu),Sd=pt({},eu,{view:0,detail:0}),E4=lo(Sd),ax,ix,Hc,Ym=pt({},Sd,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:P0,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!==Hc&&(Hc&&e.type==="mousemove"?(ax=e.screenX-Hc.screenX,ix=e.screenY-Hc.screenY):ix=ax=0,Hc=e),ax)},movementY:function(e){return"movementY"in e?e.movementY:ix}}),xI=lo(Ym),A4=pt({},Ym,{dataTransfer:0}),D4=lo(A4),N4=pt({},Sd,{relatedTarget:0}),sx=lo(N4),_4=pt({},eu,{animationName:0,elapsedTime:0,pseudoElement:0}),O4=lo(_4),F4=pt({},eu,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),V4=lo(F4),B4=pt({},eu,{data:0}),wI=lo(B4),H4={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},U4={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"},z4={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function W4(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=z4[e])?!!t[e]:!1}function P0(){return W4}var G4=pt({},Sd,{key:function(e){if(e.key){var t=H4[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=vm(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?U4[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:P0,charCode:function(e){return e.type==="keypress"?vm(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?vm(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),j4=lo(G4),q4=pt({},Ym,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),CI=lo(q4),$4=pt({},Sd,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:P0}),K4=lo($4),X4=pt({},eu,{propertyName:0,elapsedTime:0,pseudoElement:0}),Y4=lo(X4),Q4=pt({},Ym,{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}),Z4=lo(Q4),J4=[9,13,27,32],T0=ua&&"CompositionEvent"in window,Qc=null;ua&&"documentMode"in document&&(Qc=document.documentMode);var ez=ua&&"TextEvent"in window&&!Qc,GP=ua&&(!T0||Qc&&8<Qc&&11>=Qc),SI=String.fromCharCode(32),bI=!1;function jP(e,t){switch(e){case"keyup":return J4.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function qP(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var El=!1;function tz(e,t){switch(e){case"compositionend":return qP(t);case"keypress":return t.which!==32?null:(bI=!0,SI);case"textInput":return e=t.data,e===SI&&bI?null:e;default:return null}}function rz(e,t){if(El)return e==="compositionend"||!T0&&jP(e,t)?(e=WP(),hm=L0=ei=null,El=!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 GP&&t.locale!=="ko"?null:t.data;default:return null}}var oz={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 RI(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!oz[e.type]:t==="textarea"}function $P(e,t,r,o){RP(o),t=Am(t,"onChange"),0<t.length&&(r=new I0("onChange","change",null,r,o),e.push({event:r,listeners:t}))}var Zc=null,cd=null;function nz(e){n1(e,0)}function Qm(e){var t=Nl(e);if(vP(t))return e}function az(e,t){if(e==="change")return t}var KP=!1;ua&&(ua?(nm="oninput"in document,nm||(lx=document.createElement("div"),lx.setAttribute("oninput","return;"),nm=typeof lx.oninput=="function"),om=nm):om=!1,KP=om&&(!document.documentMode||9<document.documentMode));var om,nm,lx;function LI(){Zc&&(Zc.detachEvent("onpropertychange",XP),cd=Zc=null)}function XP(e){if(e.propertyName==="value"&&Qm(cd)){var t=[];$P(t,cd,e,w0(e)),TP(nz,t)}}function iz(e,t,r){e==="focusin"?(LI(),Zc=t,cd=r,Zc.attachEvent("onpropertychange",XP)):e==="focusout"&&LI()}function sz(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Qm(cd)}function lz(e,t){if(e==="click")return Qm(t)}function uz(e,t){if(e==="input"||e==="change")return Qm(t)}function cz(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var on=typeof Object.is=="function"?Object.is:cz;function dd(e,t){if(on(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),o=Object.keys(t);if(r.length!==o.length)return!1;for(o=0;o<r.length;o++){var n=r[o];if(!Sx.call(t,n)||!on(e[n],t[n]))return!1}return!0}function II(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function PI(e,t){var r=II(e);e=0;for(var o;r;){if(r.nodeType===3){if(o=e+r.textContent.length,e<=t&&o>=t)return{node:r,offset:t-e};e=o}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=II(r)}}function YP(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?YP(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function QP(){for(var e=window,t=Lm();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=Lm(e.document)}return t}function k0(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function dz(e){var t=QP(),r=e.focusedElem,o=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&YP(r.ownerDocument.documentElement,r)){if(o!==null&&k0(r)){if(t=o.start,e=o.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var n=r.textContent.length,a=Math.min(o.start,n);o=o.end===void 0?a:Math.min(o.end,n),!e.extend&&a>o&&(n=o,o=a,a=n),n=PI(r,a);var i=PI(r,o);n&&i&&(e.rangeCount!==1||e.anchorNode!==n.node||e.anchorOffset!==n.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(n.node,n.offset),e.removeAllRanges(),a>o?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<t.length;r++)e=t[r],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var fz=ua&&"documentMode"in document&&11>=document.documentMode,Al=null,Ux=null,Jc=null,zx=!1;function TI(e,t,r){var o=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;zx||Al==null||Al!==Lm(o)||(o=Al,"selectionStart"in o&&k0(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}),Jc&&dd(Jc,o)||(Jc=o,o=Am(Ux,"onSelect"),0<o.length&&(t=new I0("onSelect","select",null,t,r),e.push({event:t,listeners:o}),t.target=Al)))}function am(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var Dl={animationend:am("Animation","AnimationEnd"),animationiteration:am("Animation","AnimationIteration"),animationstart:am("Animation","AnimationStart"),transitionend:am("Transition","TransitionEnd")},ux={},ZP={};ua&&(ZP=document.createElement("div").style,"AnimationEvent"in window||(delete Dl.animationend.animation,delete Dl.animationiteration.animation,delete Dl.animationstart.animation),"TransitionEvent"in window||delete Dl.transitionend.transition);function Zm(e){if(ux[e])return ux[e];if(!Dl[e])return e;var t=Dl[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in ZP)return ux[e]=t[r];return e}var JP=Zm("animationend"),e1=Zm("animationiteration"),t1=Zm("animationstart"),r1=Zm("transitionend"),o1=new Map,kI="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function fi(e,t){o1.set(e,t),Ss(t,[e])}for(im=0;im<kI.length;im++)sm=kI[im],MI=sm.toLowerCase(),EI=sm[0].toUpperCase()+sm.slice(1),fi(MI,"on"+EI);var sm,MI,EI,im;fi(JP,"onAnimationEnd");fi(e1,"onAnimationIteration");fi(t1,"onAnimationStart");fi("dblclick","onDoubleClick");fi("focusin","onFocus");fi("focusout","onBlur");fi(r1,"onTransitionEnd");$l("onMouseEnter",["mouseout","mouseover"]);$l("onMouseLeave",["mouseout","mouseover"]);$l("onPointerEnter",["pointerout","pointerover"]);$l("onPointerLeave",["pointerout","pointerover"]);Ss("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Ss("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Ss("onBeforeInput",["compositionend","keypress","textInput","paste"]);Ss("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Ss("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Ss("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Kc="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(" "),pz=new Set("cancel close invalid load scroll toggle".split(" ").concat(Kc));function AI(e,t,r){var o=e.type||"unknown-event";e.currentTarget=r,p4(o,t,void 0,e),e.currentTarget=null}function n1(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var o=e[r],n=o.event;o=o.listeners;e:{var a=void 0;if(t)for(var i=o.length-1;0<=i;i--){var s=o[i],l=s.instance,u=s.currentTarget;if(s=s.listener,l!==a&&n.isPropagationStopped())break e;AI(n,s,u),a=l}else for(i=0;i<o.length;i++){if(s=o[i],l=s.instance,u=s.currentTarget,s=s.listener,l!==a&&n.isPropagationStopped())break e;AI(n,s,u),a=l}}}if(Pm)throw e=Fx,Pm=!1,Fx=null,e}function Qe(e,t){var r=t[$x];r===void 0&&(r=t[$x]=new Set);var o=e+"__bubble";r.has(o)||(a1(t,e,2,!1),r.add(o))}function cx(e,t,r){var o=0;t&&(o|=4),a1(r,e,o,t)}var lm="_reactListening"+Math.random().toString(36).slice(2);function fd(e){if(!e[lm]){e[lm]=!0,fP.forEach(function(r){r!=="selectionchange"&&(pz.has(r)||cx(r,!1,e),cx(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[lm]||(t[lm]=!0,cx("selectionchange",!1,t))}}function a1(e,t,r,o){switch(zP(t)){case 1:var n=k4;break;case 4:n=M4;break;default:n=R0}r=n.bind(null,t,r,e),n=void 0,!Ox||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(n=!0),o?n!==void 0?e.addEventListener(t,r,{capture:!0,passive:n}):e.addEventListener(t,r,!0):n!==void 0?e.addEventListener(t,r,{passive:n}):e.addEventListener(t,r,!1)}function dx(e,t,r,o,n){var a=o;if(!(t&1)&&!(t&2)&&o!==null)e:for(;;){if(o===null)return;var i=o.tag;if(i===3||i===4){var s=o.stateNode.containerInfo;if(s===n||s.nodeType===8&&s.parentNode===n)break;if(i===4)for(i=o.return;i!==null;){var l=i.tag;if((l===3||l===4)&&(l=i.stateNode.containerInfo,l===n||l.nodeType===8&&l.parentNode===n))return;i=i.return}for(;s!==null;){if(i=fs(s),i===null)return;if(l=i.tag,l===5||l===6){o=a=i;continue e}s=s.parentNode}}o=o.return}TP(function(){var u=a,c=w0(r),d=[];e:{var f=o1.get(e);if(f!==void 0){var p=I0,h=e;switch(e){case"keypress":if(vm(r)===0)break e;case"keydown":case"keyup":p=j4;break;case"focusin":h="focus",p=sx;break;case"focusout":h="blur",p=sx;break;case"beforeblur":case"afterblur":p=sx;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":p=xI;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=D4;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=K4;break;case JP:case e1:case t1:p=O4;break;case r1:p=Y4;break;case"scroll":p=E4;break;case"wheel":p=Z4;break;case"copy":case"cut":case"paste":p=V4;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=CI}var m=(t&4)!==0,x=!m&&e==="scroll",v=m?f!==null?f+"Capture":null:f;m=[];for(var g=u,y;g!==null;){y=g;var w=y.stateNode;if(y.tag===5&&w!==null&&(y=w,v!==null&&(w=id(g,v),w!=null&&m.push(pd(g,w,y)))),x)break;g=g.return}0<m.length&&(f=new p(f,h,null,r,c),d.push({event:f,listeners:m}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",f&&r!==Nx&&(h=r.relatedTarget||r.fromElement)&&(fs(h)||h[ca]))break e;if((p||f)&&(f=c.window===c?c:(f=c.ownerDocument)?f.defaultView||f.parentWindow:window,p?(h=r.relatedTarget||r.toElement,p=u,h=h?fs(h):null,h!==null&&(x=bs(h),h!==x||h.tag!==5&&h.tag!==6)&&(h=null)):(p=null,h=u),p!==h)){if(m=xI,w="onMouseLeave",v="onMouseEnter",g="mouse",(e==="pointerout"||e==="pointerover")&&(m=CI,w="onPointerLeave",v="onPointerEnter",g="pointer"),x=p==null?f:Nl(p),y=h==null?f:Nl(h),f=new m(w,g+"leave",p,r,c),f.target=x,f.relatedTarget=y,w=null,fs(c)===u&&(m=new m(v,g+"enter",h,r,c),m.target=y,m.relatedTarget=x,w=m),x=w,p&&h)t:{for(m=p,v=h,g=0,y=m;y;y=Tl(y))g++;for(y=0,w=v;w;w=Tl(w))y++;for(;0<g-y;)m=Tl(m),g--;for(;0<y-g;)v=Tl(v),y--;for(;g--;){if(m===v||v!==null&&m===v.alternate)break t;m=Tl(m),v=Tl(v)}m=null}else m=null;p!==null&&DI(d,f,p,m,!1),h!==null&&x!==null&&DI(d,x,h,m,!0)}}e:{if(f=u?Nl(u):window,p=f.nodeName&&f.nodeName.toLowerCase(),p==="select"||p==="input"&&f.type==="file")var C=az;else if(RI(f))if(KP)C=uz;else{C=sz;var b=iz}else(p=f.nodeName)&&p.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(C=lz);if(C&&(C=C(e,u))){$P(d,C,r,c);break e}b&&b(e,f,u),e==="focusout"&&(b=f._wrapperState)&&b.controlled&&f.type==="number"&&kx(f,"number",f.value)}switch(b=u?Nl(u):window,e){case"focusin":(RI(b)||b.contentEditable==="true")&&(Al=b,Ux=u,Jc=null);break;case"focusout":Jc=Ux=Al=null;break;case"mousedown":zx=!0;break;case"contextmenu":case"mouseup":case"dragend":zx=!1,TI(d,r,c);break;case"selectionchange":if(fz)break;case"keydown":case"keyup":TI(d,r,c)}var S;if(T0)e:{switch(e){case"compositionstart":var L="onCompositionStart";break e;case"compositionend":L="onCompositionEnd";break e;case"compositionupdate":L="onCompositionUpdate";break e}L=void 0}else El?jP(e,r)&&(L="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(L="onCompositionStart");L&&(GP&&r.locale!=="ko"&&(El||L!=="onCompositionStart"?L==="onCompositionEnd"&&El&&(S=WP()):(ei=c,L0="value"in ei?ei.value:ei.textContent,El=!0)),b=Am(u,L),0<b.length&&(L=new wI(L,e,null,r,c),d.push({event:L,listeners:b}),S?L.data=S:(S=qP(r),S!==null&&(L.data=S)))),(S=ez?tz(e,r):rz(e,r))&&(u=Am(u,"onBeforeInput"),0<u.length&&(c=new wI("onBeforeInput","beforeinput",null,r,c),d.push({event:c,listeners:u}),c.data=S))}n1(d,t)})}function pd(e,t,r){return{instance:e,listener:t,currentTarget:r}}function Am(e,t){for(var r=t+"Capture",o=[];e!==null;){var n=e,a=n.stateNode;n.tag===5&&a!==null&&(n=a,a=id(e,r),a!=null&&o.unshift(pd(e,a,n)),a=id(e,t),a!=null&&o.push(pd(e,a,n))),e=e.return}return o}function Tl(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function DI(e,t,r,o,n){for(var a=t._reactName,i=[];r!==null&&r!==o;){var s=r,l=s.alternate,u=s.stateNode;if(l!==null&&l===o)break;s.tag===5&&u!==null&&(s=u,n?(l=id(r,a),l!=null&&i.unshift(pd(r,l,s))):n||(l=id(r,a),l!=null&&i.push(pd(r,l,s)))),r=r.return}i.length!==0&&e.push({event:t,listeners:i})}var mz=/\r\n?/g,gz=/\u0000|\uFFFD/g;function NI(e){return(typeof e=="string"?e:""+e).replace(mz,`
|
|
7
|
+
`).replace(gz,"")}function um(e,t,r){if(t=NI(t),NI(e)!==t&&r)throw Error(j(425))}function Dm(){}var Wx=null,Gx=null;function jx(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var qx=typeof setTimeout=="function"?setTimeout:void 0,hz=typeof clearTimeout=="function"?clearTimeout:void 0,_I=typeof Promise=="function"?Promise:void 0,vz=typeof queueMicrotask=="function"?queueMicrotask:typeof _I<"u"?function(e){return _I.resolve(null).then(e).catch(yz)}:qx;function yz(e){setTimeout(function(){throw e})}function fx(e,t){var r=t,o=0;do{var n=r.nextSibling;if(e.removeChild(r),n&&n.nodeType===8)if(r=n.data,r==="/$"){if(o===0){e.removeChild(n),ud(t);return}o--}else r!=="$"&&r!=="$?"&&r!=="$!"||o++;r=n}while(r);ud(t)}function ai(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function OI(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"){if(t===0)return e;t--}else r==="/$"&&t++}e=e.previousSibling}return null}var tu=Math.random().toString(36).slice(2),_n="__reactFiber$"+tu,md="__reactProps$"+tu,ca="__reactContainer$"+tu,$x="__reactEvents$"+tu,xz="__reactListeners$"+tu,wz="__reactHandles$"+tu;function fs(e){var t=e[_n];if(t)return t;for(var r=e.parentNode;r;){if(t=r[ca]||r[_n]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=OI(e);e!==null;){if(r=e[_n])return r;e=OI(e)}return t}e=r,r=e.parentNode}return null}function bd(e){return e=e[_n]||e[ca],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Nl(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(j(33))}function Jm(e){return e[md]||null}var Kx=[],_l=-1;function pi(e){return{current:e}}function Ze(e){0>_l||(e.current=Kx[_l],Kx[_l]=null,_l--)}function je(e,t){_l++,Kx[_l]=e.current,e.current=t}var di={},sr=pi(di),Ur=pi(!1),vs=di;function Kl(e,t){var r=e.type.contextTypes;if(!r)return di;var o=e.stateNode;if(o&&o.__reactInternalMemoizedUnmaskedChildContext===t)return o.__reactInternalMemoizedMaskedChildContext;var n={},a;for(a in r)n[a]=t[a];return o&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=n),n}function zr(e){return e=e.childContextTypes,e!=null}function Nm(){Ze(Ur),Ze(sr)}function FI(e,t,r){if(sr.current!==di)throw Error(j(168));je(sr,t),je(Ur,r)}function i1(e,t,r){var o=e.stateNode;if(t=t.childContextTypes,typeof o.getChildContext!="function")return r;o=o.getChildContext();for(var n in o)if(!(n in t))throw Error(j(108,i4(e)||"Unknown",n));return pt({},r,o)}function _m(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||di,vs=sr.current,je(sr,e),je(Ur,Ur.current),!0}function VI(e,t,r){var o=e.stateNode;if(!o)throw Error(j(169));r?(e=i1(e,t,vs),o.__reactInternalMemoizedMergedChildContext=e,Ze(Ur),Ze(sr),je(sr,e)):Ze(Ur),je(Ur,r)}var aa=null,eg=!1,px=!1;function s1(e){aa===null?aa=[e]:aa.push(e)}function Cz(e){eg=!0,s1(e)}function mi(){if(!px&&aa!==null){px=!0;var e=0,t=Fe;try{var r=aa;for(Fe=1;e<r.length;e++){var o=r[e];do o=o(!0);while(o!==null)}aa=null,eg=!1}catch(n){throw aa!==null&&(aa=aa.slice(e+1)),AP(C0,mi),n}finally{Fe=t,px=!1}}return null}var Ol=[],Fl=0,Om=null,Fm=0,Io=[],Po=0,ys=null,ia=1,sa="";function cs(e,t){Ol[Fl++]=Fm,Ol[Fl++]=Om,Om=e,Fm=t}function l1(e,t,r){Io[Po++]=ia,Io[Po++]=sa,Io[Po++]=ys,ys=e;var o=ia;e=sa;var n=32-tn(o)-1;o&=~(1<<n),r+=1;var a=32-tn(t)+n;if(30<a){var i=n-n%5;a=(o&(1<<i)-1).toString(32),o>>=i,n-=i,ia=1<<32-tn(t)+n|r<<n|o,sa=a+e}else ia=1<<a|r<<n|o,sa=e}function M0(e){e.return!==null&&(cs(e,1),l1(e,1,0))}function E0(e){for(;e===Om;)Om=Ol[--Fl],Ol[Fl]=null,Fm=Ol[--Fl],Ol[Fl]=null;for(;e===ys;)ys=Io[--Po],Io[Po]=null,sa=Io[--Po],Io[Po]=null,ia=Io[--Po],Io[Po]=null}var io=null,ao=null,at=!1,en=null;function u1(e,t){var r=To(5,null,null,0);r.elementType="DELETED",r.stateNode=t,r.return=e,t=e.deletions,t===null?(e.deletions=[r],e.flags|=16):t.push(r)}function BI(e,t){switch(e.tag){case 5:var r=e.type;return t=t.nodeType!==1||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,io=e,ao=ai(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,io=e,ao=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=ys!==null?{id:ia,overflow:sa}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=To(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,io=e,ao=null,!0):!1;default:return!1}}function Xx(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Yx(e){if(at){var t=ao;if(t){var r=t;if(!BI(e,t)){if(Xx(e))throw Error(j(418));t=ai(r.nextSibling);var o=io;t&&BI(e,t)?u1(o,r):(e.flags=e.flags&-4097|2,at=!1,io=e)}}else{if(Xx(e))throw Error(j(418));e.flags=e.flags&-4097|2,at=!1,io=e}}}function HI(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;io=e}function cm(e){if(e!==io)return!1;if(!at)return HI(e),at=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!jx(e.type,e.memoizedProps)),t&&(t=ao)){if(Xx(e))throw c1(),Error(j(418));for(;t;)u1(e,t),t=ai(t.nextSibling)}if(HI(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(j(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){ao=ai(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}ao=null}}else ao=io?ai(e.stateNode.nextSibling):null;return!0}function c1(){for(var e=ao;e;)e=ai(e.nextSibling)}function Xl(){ao=io=null,at=!1}function A0(e){en===null?en=[e]:en.push(e)}var Sz=pa.ReactCurrentBatchConfig;function Uc(e,t,r){if(e=r.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(j(309));var o=r.stateNode}if(!o)throw Error(j(147,e));var n=o,a=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===a?t.ref:(t=function(i){var s=n.refs;i===null?delete s[a]:s[a]=i},t._stringRef=a,t)}if(typeof e!="string")throw Error(j(284));if(!r._owner)throw Error(j(290,e))}return e}function dm(e,t){throw e=Object.prototype.toString.call(t),Error(j(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function UI(e){var t=e._init;return t(e._payload)}function d1(e){function t(v,g){if(e){var y=v.deletions;y===null?(v.deletions=[g],v.flags|=16):y.push(g)}}function r(v,g){if(!e)return null;for(;g!==null;)t(v,g),g=g.sibling;return null}function o(v,g){for(v=new Map;g!==null;)g.key!==null?v.set(g.key,g):v.set(g.index,g),g=g.sibling;return v}function n(v,g){return v=ui(v,g),v.index=0,v.sibling=null,v}function a(v,g,y){return v.index=y,e?(y=v.alternate,y!==null?(y=y.index,y<g?(v.flags|=2,g):y):(v.flags|=2,g)):(v.flags|=1048576,g)}function i(v){return e&&v.alternate===null&&(v.flags|=2),v}function s(v,g,y,w){return g===null||g.tag!==6?(g=wx(y,v.mode,w),g.return=v,g):(g=n(g,y),g.return=v,g)}function l(v,g,y,w){var C=y.type;return C===Ml?c(v,g,y.props.children,w,y.key):g!==null&&(g.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===Ya&&UI(C)===g.type)?(w=n(g,y.props),w.ref=Uc(v,g,y),w.return=v,w):(w=Rm(y.type,y.key,y.props,null,v.mode,w),w.ref=Uc(v,g,y),w.return=v,w)}function u(v,g,y,w){return g===null||g.tag!==4||g.stateNode.containerInfo!==y.containerInfo||g.stateNode.implementation!==y.implementation?(g=Cx(y,v.mode,w),g.return=v,g):(g=n(g,y.children||[]),g.return=v,g)}function c(v,g,y,w,C){return g===null||g.tag!==7?(g=hs(y,v.mode,w,C),g.return=v,g):(g=n(g,y),g.return=v,g)}function d(v,g,y){if(typeof g=="string"&&g!==""||typeof g=="number")return g=wx(""+g,v.mode,y),g.return=v,g;if(typeof g=="object"&&g!==null){switch(g.$$typeof){case Yp:return y=Rm(g.type,g.key,g.props,null,v.mode,y),y.ref=Uc(v,null,g),y.return=v,y;case kl:return g=Cx(g,v.mode,y),g.return=v,g;case Ya:var w=g._init;return d(v,w(g._payload),y)}if(qc(g)||Fc(g))return g=hs(g,v.mode,y,null),g.return=v,g;dm(v,g)}return null}function f(v,g,y,w){var C=g!==null?g.key:null;if(typeof y=="string"&&y!==""||typeof y=="number")return C!==null?null:s(v,g,""+y,w);if(typeof y=="object"&&y!==null){switch(y.$$typeof){case Yp:return y.key===C?l(v,g,y,w):null;case kl:return y.key===C?u(v,g,y,w):null;case Ya:return C=y._init,f(v,g,C(y._payload),w)}if(qc(y)||Fc(y))return C!==null?null:c(v,g,y,w,null);dm(v,y)}return null}function p(v,g,y,w,C){if(typeof w=="string"&&w!==""||typeof w=="number")return v=v.get(y)||null,s(g,v,""+w,C);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case Yp:return v=v.get(w.key===null?y:w.key)||null,l(g,v,w,C);case kl:return v=v.get(w.key===null?y:w.key)||null,u(g,v,w,C);case Ya:var b=w._init;return p(v,g,y,b(w._payload),C)}if(qc(w)||Fc(w))return v=v.get(y)||null,c(g,v,w,C,null);dm(g,w)}return null}function h(v,g,y,w){for(var C=null,b=null,S=g,L=g=0,T=null;S!==null&&L<y.length;L++){S.index>L?(T=S,S=null):T=S.sibling;var P=f(v,S,y[L],w);if(P===null){S===null&&(S=T);break}e&&S&&P.alternate===null&&t(v,S),g=a(P,g,L),b===null?C=P:b.sibling=P,b=P,S=T}if(L===y.length)return r(v,S),at&&cs(v,L),C;if(S===null){for(;L<y.length;L++)S=d(v,y[L],w),S!==null&&(g=a(S,g,L),b===null?C=S:b.sibling=S,b=S);return at&&cs(v,L),C}for(S=o(v,S);L<y.length;L++)T=p(S,v,L,y[L],w),T!==null&&(e&&T.alternate!==null&&S.delete(T.key===null?L:T.key),g=a(T,g,L),b===null?C=T:b.sibling=T,b=T);return e&&S.forEach(function(A){return t(v,A)}),at&&cs(v,L),C}function m(v,g,y,w){var C=Fc(y);if(typeof C!="function")throw Error(j(150));if(y=C.call(y),y==null)throw Error(j(151));for(var b=C=null,S=g,L=g=0,T=null,P=y.next();S!==null&&!P.done;L++,P=y.next()){S.index>L?(T=S,S=null):T=S.sibling;var A=f(v,S,P.value,w);if(A===null){S===null&&(S=T);break}e&&S&&A.alternate===null&&t(v,S),g=a(A,g,L),b===null?C=A:b.sibling=A,b=A,S=T}if(P.done)return r(v,S),at&&cs(v,L),C;if(S===null){for(;!P.done;L++,P=y.next())P=d(v,P.value,w),P!==null&&(g=a(P,g,L),b===null?C=P:b.sibling=P,b=P);return at&&cs(v,L),C}for(S=o(v,S);!P.done;L++,P=y.next())P=p(S,v,L,P.value,w),P!==null&&(e&&P.alternate!==null&&S.delete(P.key===null?L:P.key),g=a(P,g,L),b===null?C=P:b.sibling=P,b=P);return e&&S.forEach(function(_){return t(v,_)}),at&&cs(v,L),C}function x(v,g,y,w){if(typeof y=="object"&&y!==null&&y.type===Ml&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case Yp:e:{for(var C=y.key,b=g;b!==null;){if(b.key===C){if(C=y.type,C===Ml){if(b.tag===7){r(v,b.sibling),g=n(b,y.props.children),g.return=v,v=g;break e}}else if(b.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===Ya&&UI(C)===b.type){r(v,b.sibling),g=n(b,y.props),g.ref=Uc(v,b,y),g.return=v,v=g;break e}r(v,b);break}else t(v,b);b=b.sibling}y.type===Ml?(g=hs(y.props.children,v.mode,w,y.key),g.return=v,v=g):(w=Rm(y.type,y.key,y.props,null,v.mode,w),w.ref=Uc(v,g,y),w.return=v,v=w)}return i(v);case kl:e:{for(b=y.key;g!==null;){if(g.key===b)if(g.tag===4&&g.stateNode.containerInfo===y.containerInfo&&g.stateNode.implementation===y.implementation){r(v,g.sibling),g=n(g,y.children||[]),g.return=v,v=g;break e}else{r(v,g);break}else t(v,g);g=g.sibling}g=Cx(y,v.mode,w),g.return=v,v=g}return i(v);case Ya:return b=y._init,x(v,g,b(y._payload),w)}if(qc(y))return h(v,g,y,w);if(Fc(y))return m(v,g,y,w);dm(v,y)}return typeof y=="string"&&y!==""||typeof y=="number"?(y=""+y,g!==null&&g.tag===6?(r(v,g.sibling),g=n(g,y),g.return=v,v=g):(r(v,g),g=wx(y,v.mode,w),g.return=v,v=g),i(v)):r(v,g)}return x}var Yl=d1(!0),f1=d1(!1),Vm=pi(null),Bm=null,Vl=null,D0=null;function N0(){D0=Vl=Bm=null}function _0(e){var t=Vm.current;Ze(Vm),e._currentValue=t}function Qx(e,t,r){for(;e!==null;){var o=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,o!==null&&(o.childLanes|=t)):o!==null&&(o.childLanes&t)!==t&&(o.childLanes|=t),e===r)break;e=e.return}}function jl(e,t){Bm=e,D0=Vl=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Hr=!0),e.firstContext=null)}function Mo(e){var t=e._currentValue;if(D0!==e)if(e={context:e,memoizedValue:t,next:null},Vl===null){if(Bm===null)throw Error(j(308));Vl=e,Bm.dependencies={lanes:0,firstContext:e}}else Vl=Vl.next=e;return t}var ps=null;function O0(e){ps===null?ps=[e]:ps.push(e)}function p1(e,t,r,o){var n=t.interleaved;return n===null?(r.next=r,O0(t)):(r.next=n.next,n.next=r),t.interleaved=r,da(e,o)}function da(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var Qa=!1;function F0(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function m1(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function la(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function ii(e,t,r){var o=e.updateQueue;if(o===null)return null;if(o=o.shared,Ie&2){var n=o.pending;return n===null?t.next=t:(t.next=n.next,n.next=t),o.pending=t,da(e,r)}return n=o.interleaved,n===null?(t.next=t,O0(o)):(t.next=n.next,n.next=t),o.interleaved=t,da(e,r)}function ym(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var o=t.lanes;o&=e.pendingLanes,r|=o,t.lanes=r,S0(e,r)}}function zI(e,t){var r=e.updateQueue,o=e.alternate;if(o!==null&&(o=o.updateQueue,r===o)){var n=null,a=null;if(r=r.firstBaseUpdate,r!==null){do{var i={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};a===null?n=a=i:a=a.next=i,r=r.next}while(r!==null);a===null?n=a=t:a=a.next=t}else n=a=t;r={baseState:o.baseState,firstBaseUpdate:n,lastBaseUpdate:a,shared:o.shared,effects:o.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function Hm(e,t,r,o){var n=e.updateQueue;Qa=!1;var a=n.firstBaseUpdate,i=n.lastBaseUpdate,s=n.shared.pending;if(s!==null){n.shared.pending=null;var l=s,u=l.next;l.next=null,i===null?a=u:i.next=u,i=l;var c=e.alternate;c!==null&&(c=c.updateQueue,s=c.lastBaseUpdate,s!==i&&(s===null?c.firstBaseUpdate=u:s.next=u,c.lastBaseUpdate=l))}if(a!==null){var d=n.baseState;i=0,c=u=l=null,s=a;do{var f=s.lane,p=s.eventTime;if((o&f)===f){c!==null&&(c=c.next={eventTime:p,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var h=e,m=s;switch(f=t,p=r,m.tag){case 1:if(h=m.payload,typeof h=="function"){d=h.call(p,d,f);break e}d=h;break e;case 3:h.flags=h.flags&-65537|128;case 0:if(h=m.payload,f=typeof h=="function"?h.call(p,d,f):h,f==null)break e;d=pt({},d,f);break e;case 2:Qa=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,f=n.effects,f===null?n.effects=[s]:f.push(s))}else p={eventTime:p,lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},c===null?(u=c=p,l=d):c=c.next=p,i|=f;if(s=s.next,s===null){if(s=n.shared.pending,s===null)break;f=s,s=f.next,f.next=null,n.lastBaseUpdate=f,n.shared.pending=null}}while(1);if(c===null&&(l=d),n.baseState=l,n.firstBaseUpdate=u,n.lastBaseUpdate=c,t=n.shared.interleaved,t!==null){n=t;do i|=n.lane,n=n.next;while(n!==t)}else a===null&&(n.shared.lanes=0);ws|=i,e.lanes=i,e.memoizedState=d}}function WI(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var o=e[t],n=o.callback;if(n!==null){if(o.callback=null,o=r,typeof n!="function")throw Error(j(191,n));n.call(o)}}}var Rd={},Fn=pi(Rd),gd=pi(Rd),hd=pi(Rd);function ms(e){if(e===Rd)throw Error(j(174));return e}function V0(e,t){switch(je(hd,t),je(gd,e),je(Fn,Rd),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Ex(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Ex(t,e)}Ze(Fn),je(Fn,t)}function Ql(){Ze(Fn),Ze(gd),Ze(hd)}function g1(e){ms(hd.current);var t=ms(Fn.current),r=Ex(t,e.type);t!==r&&(je(gd,e),je(Fn,r))}function B0(e){gd.current===e&&(Ze(Fn),Ze(gd))}var dt=pi(0);function Um(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var mx=[];function H0(){for(var e=0;e<mx.length;e++)mx[e]._workInProgressVersionPrimary=null;mx.length=0}var xm=pa.ReactCurrentDispatcher,gx=pa.ReactCurrentBatchConfig,xs=0,ft=null,Et=null,Ut=null,zm=!1,ed=!1,vd=0,bz=0;function nr(){throw Error(j(321))}function U0(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!on(e[r],t[r]))return!1;return!0}function z0(e,t,r,o,n,a){if(xs=a,ft=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,xm.current=e===null||e.memoizedState===null?Pz:Tz,e=r(o,n),ed){a=0;do{if(ed=!1,vd=0,25<=a)throw Error(j(301));a+=1,Ut=Et=null,t.updateQueue=null,xm.current=kz,e=r(o,n)}while(ed)}if(xm.current=Wm,t=Et!==null&&Et.next!==null,xs=0,Ut=Et=ft=null,zm=!1,t)throw Error(j(300));return e}function W0(){var e=vd!==0;return vd=0,e}function Nn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ut===null?ft.memoizedState=Ut=e:Ut=Ut.next=e,Ut}function Eo(){if(Et===null){var e=ft.alternate;e=e!==null?e.memoizedState:null}else e=Et.next;var t=Ut===null?ft.memoizedState:Ut.next;if(t!==null)Ut=t,Et=e;else{if(e===null)throw Error(j(310));Et=e,e={memoizedState:Et.memoizedState,baseState:Et.baseState,baseQueue:Et.baseQueue,queue:Et.queue,next:null},Ut===null?ft.memoizedState=Ut=e:Ut=Ut.next=e}return Ut}function yd(e,t){return typeof t=="function"?t(e):t}function hx(e){var t=Eo(),r=t.queue;if(r===null)throw Error(j(311));r.lastRenderedReducer=e;var o=Et,n=o.baseQueue,a=r.pending;if(a!==null){if(n!==null){var i=n.next;n.next=a.next,a.next=i}o.baseQueue=n=a,r.pending=null}if(n!==null){a=n.next,o=o.baseState;var s=i=null,l=null,u=a;do{var c=u.lane;if((xs&c)===c)l!==null&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),o=u.hasEagerState?u.eagerState:e(o,u.action);else{var d={lane:c,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(s=l=d,i=o):l=l.next=d,ft.lanes|=c,ws|=c}u=u.next}while(u!==null&&u!==a);l===null?i=o:l.next=s,on(o,t.memoizedState)||(Hr=!0),t.memoizedState=o,t.baseState=i,t.baseQueue=l,r.lastRenderedState=o}if(e=r.interleaved,e!==null){n=e;do a=n.lane,ft.lanes|=a,ws|=a,n=n.next;while(n!==e)}else n===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function vx(e){var t=Eo(),r=t.queue;if(r===null)throw Error(j(311));r.lastRenderedReducer=e;var o=r.dispatch,n=r.pending,a=t.memoizedState;if(n!==null){r.pending=null;var i=n=n.next;do a=e(a,i.action),i=i.next;while(i!==n);on(a,t.memoizedState)||(Hr=!0),t.memoizedState=a,t.baseQueue===null&&(t.baseState=a),r.lastRenderedState=a}return[a,o]}function h1(){}function v1(e,t){var r=ft,o=Eo(),n=t(),a=!on(o.memoizedState,n);if(a&&(o.memoizedState=n,Hr=!0),o=o.queue,G0(w1.bind(null,r,o,e),[e]),o.getSnapshot!==t||a||Ut!==null&&Ut.memoizedState.tag&1){if(r.flags|=2048,xd(9,x1.bind(null,r,o,n,t),void 0,null),zt===null)throw Error(j(349));xs&30||y1(r,t,n)}return n}function y1(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=ft.updateQueue,t===null?(t={lastEffect:null,stores:null},ft.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function x1(e,t,r,o){t.value=r,t.getSnapshot=o,C1(t)&&S1(e)}function w1(e,t,r){return r(function(){C1(t)&&S1(e)})}function C1(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!on(e,r)}catch{return!0}}function S1(e){var t=da(e,1);t!==null&&rn(t,e,1,-1)}function GI(e){var t=Nn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:yd,lastRenderedState:e},t.queue=e,e=e.dispatch=Iz.bind(null,ft,e),[t.memoizedState,e]}function xd(e,t,r,o){return e={tag:e,create:t,destroy:r,deps:o,next:null},t=ft.updateQueue,t===null?(t={lastEffect:null,stores:null},ft.updateQueue=t,t.lastEffect=e.next=e):(r=t.lastEffect,r===null?t.lastEffect=e.next=e:(o=r.next,r.next=e,e.next=o,t.lastEffect=e)),e}function b1(){return Eo().memoizedState}function wm(e,t,r,o){var n=Nn();ft.flags|=e,n.memoizedState=xd(1|t,r,void 0,o===void 0?null:o)}function tg(e,t,r,o){var n=Eo();o=o===void 0?null:o;var a=void 0;if(Et!==null){var i=Et.memoizedState;if(a=i.destroy,o!==null&&U0(o,i.deps)){n.memoizedState=xd(t,r,a,o);return}}ft.flags|=e,n.memoizedState=xd(1|t,r,a,o)}function jI(e,t){return wm(8390656,8,e,t)}function G0(e,t){return tg(2048,8,e,t)}function R1(e,t){return tg(4,2,e,t)}function L1(e,t){return tg(4,4,e,t)}function I1(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function P1(e,t,r){return r=r!=null?r.concat([e]):null,tg(4,4,I1.bind(null,t,e),r)}function j0(){}function T1(e,t){var r=Eo();t=t===void 0?null:t;var o=r.memoizedState;return o!==null&&t!==null&&U0(t,o[1])?o[0]:(r.memoizedState=[e,t],e)}function k1(e,t){var r=Eo();t=t===void 0?null:t;var o=r.memoizedState;return o!==null&&t!==null&&U0(t,o[1])?o[0]:(e=e(),r.memoizedState=[e,t],e)}function M1(e,t,r){return xs&21?(on(r,t)||(r=_P(),ft.lanes|=r,ws|=r,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Hr=!0),e.memoizedState=r)}function Rz(e,t){var r=Fe;Fe=r!==0&&4>r?r:4,e(!0);var o=gx.transition;gx.transition={};try{e(!1),t()}finally{Fe=r,gx.transition=o}}function E1(){return Eo().memoizedState}function Lz(e,t,r){var o=li(e);if(r={lane:o,action:r,hasEagerState:!1,eagerState:null,next:null},A1(e))D1(t,r);else if(r=p1(e,t,r,o),r!==null){var n=Lr();rn(r,e,o,n),N1(r,t,o)}}function Iz(e,t,r){var o=li(e),n={lane:o,action:r,hasEagerState:!1,eagerState:null,next:null};if(A1(e))D1(t,n);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var i=t.lastRenderedState,s=a(i,r);if(n.hasEagerState=!0,n.eagerState=s,on(s,i)){var l=t.interleaved;l===null?(n.next=n,O0(t)):(n.next=l.next,l.next=n),t.interleaved=n;return}}catch{}finally{}r=p1(e,t,n,o),r!==null&&(n=Lr(),rn(r,e,o,n),N1(r,t,o))}}function A1(e){var t=e.alternate;return e===ft||t!==null&&t===ft}function D1(e,t){ed=zm=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function N1(e,t,r){if(r&4194240){var o=t.lanes;o&=e.pendingLanes,r|=o,t.lanes=r,S0(e,r)}}var Wm={readContext:Mo,useCallback:nr,useContext:nr,useEffect:nr,useImperativeHandle:nr,useInsertionEffect:nr,useLayoutEffect:nr,useMemo:nr,useReducer:nr,useRef:nr,useState:nr,useDebugValue:nr,useDeferredValue:nr,useTransition:nr,useMutableSource:nr,useSyncExternalStore:nr,useId:nr,unstable_isNewReconciler:!1},Pz={readContext:Mo,useCallback:function(e,t){return Nn().memoizedState=[e,t===void 0?null:t],e},useContext:Mo,useEffect:jI,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,wm(4194308,4,I1.bind(null,t,e),r)},useLayoutEffect:function(e,t){return wm(4194308,4,e,t)},useInsertionEffect:function(e,t){return wm(4,2,e,t)},useMemo:function(e,t){var r=Nn();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var o=Nn();return t=r!==void 0?r(t):t,o.memoizedState=o.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},o.queue=e,e=e.dispatch=Lz.bind(null,ft,e),[o.memoizedState,e]},useRef:function(e){var t=Nn();return e={current:e},t.memoizedState=e},useState:GI,useDebugValue:j0,useDeferredValue:function(e){return Nn().memoizedState=e},useTransition:function(){var e=GI(!1),t=e[0];return e=Rz.bind(null,e[1]),Nn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var o=ft,n=Nn();if(at){if(r===void 0)throw Error(j(407));r=r()}else{if(r=t(),zt===null)throw Error(j(349));xs&30||y1(o,t,r)}n.memoizedState=r;var a={value:r,getSnapshot:t};return n.queue=a,jI(w1.bind(null,o,a,e),[e]),o.flags|=2048,xd(9,x1.bind(null,o,a,r,t),void 0,null),r},useId:function(){var e=Nn(),t=zt.identifierPrefix;if(at){var r=sa,o=ia;r=(o&~(1<<32-tn(o)-1)).toString(32)+r,t=":"+t+"R"+r,r=vd++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=bz++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Tz={readContext:Mo,useCallback:T1,useContext:Mo,useEffect:G0,useImperativeHandle:P1,useInsertionEffect:R1,useLayoutEffect:L1,useMemo:k1,useReducer:hx,useRef:b1,useState:function(){return hx(yd)},useDebugValue:j0,useDeferredValue:function(e){var t=Eo();return M1(t,Et.memoizedState,e)},useTransition:function(){var e=hx(yd)[0],t=Eo().memoizedState;return[e,t]},useMutableSource:h1,useSyncExternalStore:v1,useId:E1,unstable_isNewReconciler:!1},kz={readContext:Mo,useCallback:T1,useContext:Mo,useEffect:G0,useImperativeHandle:P1,useInsertionEffect:R1,useLayoutEffect:L1,useMemo:k1,useReducer:vx,useRef:b1,useState:function(){return vx(yd)},useDebugValue:j0,useDeferredValue:function(e){var t=Eo();return Et===null?t.memoizedState=e:M1(t,Et.memoizedState,e)},useTransition:function(){var e=vx(yd)[0],t=Eo().memoizedState;return[e,t]},useMutableSource:h1,useSyncExternalStore:v1,useId:E1,unstable_isNewReconciler:!1};function Zo(e,t){if(e&&e.defaultProps){t=pt({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function Zx(e,t,r,o){t=e.memoizedState,r=r(o,t),r=r==null?t:pt({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var rg={isMounted:function(e){return(e=e._reactInternals)?bs(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var o=Lr(),n=li(e),a=la(o,n);a.payload=t,r!=null&&(a.callback=r),t=ii(e,a,n),t!==null&&(rn(t,e,n,o),ym(t,e,n))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var o=Lr(),n=li(e),a=la(o,n);a.tag=1,a.payload=t,r!=null&&(a.callback=r),t=ii(e,a,n),t!==null&&(rn(t,e,n,o),ym(t,e,n))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=Lr(),o=li(e),n=la(r,o);n.tag=2,t!=null&&(n.callback=t),t=ii(e,n,o),t!==null&&(rn(t,e,o,r),ym(t,e,o))}};function qI(e,t,r,o,n,a,i){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(o,a,i):t.prototype&&t.prototype.isPureReactComponent?!dd(r,o)||!dd(n,a):!0}function _1(e,t,r){var o=!1,n=di,a=t.contextType;return typeof a=="object"&&a!==null?a=Mo(a):(n=zr(t)?vs:sr.current,o=t.contextTypes,a=(o=o!=null)?Kl(e,n):di),t=new t(r,a),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=rg,e.stateNode=t,t._reactInternals=e,o&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=n,e.__reactInternalMemoizedMaskedChildContext=a),t}function $I(e,t,r,o){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,o),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,o),t.state!==e&&rg.enqueueReplaceState(t,t.state,null)}function Jx(e,t,r,o){var n=e.stateNode;n.props=r,n.state=e.memoizedState,n.refs={},F0(e);var a=t.contextType;typeof a=="object"&&a!==null?n.context=Mo(a):(a=zr(t)?vs:sr.current,n.context=Kl(e,a)),n.state=e.memoizedState,a=t.getDerivedStateFromProps,typeof a=="function"&&(Zx(e,t,a,r),n.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof n.getSnapshotBeforeUpdate=="function"||typeof n.UNSAFE_componentWillMount!="function"&&typeof n.componentWillMount!="function"||(t=n.state,typeof n.componentWillMount=="function"&&n.componentWillMount(),typeof n.UNSAFE_componentWillMount=="function"&&n.UNSAFE_componentWillMount(),t!==n.state&&rg.enqueueReplaceState(n,n.state,null),Hm(e,r,n,o),n.state=e.memoizedState),typeof n.componentDidMount=="function"&&(e.flags|=4194308)}function Zl(e,t){try{var r="",o=t;do r+=a4(o),o=o.return;while(o);var n=r}catch(a){n=`
|
|
8
|
+
Error generating stack: `+a.message+`
|
|
9
|
+
`+a.stack}return{value:e,source:t,stack:n,digest:null}}function yx(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function e0(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var Mz=typeof WeakMap=="function"?WeakMap:Map;function O1(e,t,r){r=la(-1,r),r.tag=3,r.payload={element:null};var o=t.value;return r.callback=function(){jm||(jm=!0,c0=o),e0(e,t)},r}function F1(e,t,r){r=la(-1,r),r.tag=3;var o=e.type.getDerivedStateFromError;if(typeof o=="function"){var n=t.value;r.payload=function(){return o(n)},r.callback=function(){e0(e,t)}}var a=e.stateNode;return a!==null&&typeof a.componentDidCatch=="function"&&(r.callback=function(){e0(e,t),typeof o!="function"&&(si===null?si=new Set([this]):si.add(this));var i=t.stack;this.componentDidCatch(t.value,{componentStack:i!==null?i:""})}),r}function KI(e,t,r){var o=e.pingCache;if(o===null){o=e.pingCache=new Mz;var n=new Set;o.set(t,n)}else n=o.get(t),n===void 0&&(n=new Set,o.set(t,n));n.has(r)||(n.add(r),e=Gz.bind(null,e,t,r),t.then(e,e))}function XI(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function YI(e,t,r,o,n){return e.mode&1?(e.flags|=65536,e.lanes=n,e):(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=la(-1,1),t.tag=2,ii(r,t,1))),r.lanes|=1),e)}var Ez=pa.ReactCurrentOwner,Hr=!1;function Rr(e,t,r,o){t.child=e===null?f1(t,null,r,o):Yl(t,e.child,r,o)}function QI(e,t,r,o,n){r=r.render;var a=t.ref;return jl(t,n),o=z0(e,t,r,o,a,n),r=W0(),e!==null&&!Hr?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n,fa(e,t,n)):(at&&r&&M0(t),t.flags|=1,Rr(e,t,o,n),t.child)}function ZI(e,t,r,o,n){if(e===null){var a=r.type;return typeof a=="function"&&!J0(a)&&a.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=a,V1(e,t,a,o,n)):(e=Rm(r.type,null,o,t,t.mode,n),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!(e.lanes&n)){var i=a.memoizedProps;if(r=r.compare,r=r!==null?r:dd,r(i,o)&&e.ref===t.ref)return fa(e,t,n)}return t.flags|=1,e=ui(a,o),e.ref=t.ref,e.return=t,t.child=e}function V1(e,t,r,o,n){if(e!==null){var a=e.memoizedProps;if(dd(a,o)&&e.ref===t.ref)if(Hr=!1,t.pendingProps=o=a,(e.lanes&n)!==0)e.flags&131072&&(Hr=!0);else return t.lanes=e.lanes,fa(e,t,n)}return t0(e,t,r,o,n)}function B1(e,t,r){var o=t.pendingProps,n=o.children,a=e!==null?e.memoizedState:null;if(o.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},je(Hl,no),no|=r;else{if(!(r&1073741824))return e=a!==null?a.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,je(Hl,no),no|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},o=a!==null?a.baseLanes:r,je(Hl,no),no|=o}else a!==null?(o=a.baseLanes|r,t.memoizedState=null):o=r,je(Hl,no),no|=o;return Rr(e,t,n,r),t.child}function H1(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function t0(e,t,r,o,n){var a=zr(r)?vs:sr.current;return a=Kl(t,a),jl(t,n),r=z0(e,t,r,o,a,n),o=W0(),e!==null&&!Hr?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n,fa(e,t,n)):(at&&o&&M0(t),t.flags|=1,Rr(e,t,r,n),t.child)}function JI(e,t,r,o,n){if(zr(r)){var a=!0;_m(t)}else a=!1;if(jl(t,n),t.stateNode===null)Cm(e,t),_1(t,r,o),Jx(t,r,o,n),o=!0;else if(e===null){var i=t.stateNode,s=t.memoizedProps;i.props=s;var l=i.context,u=r.contextType;typeof u=="object"&&u!==null?u=Mo(u):(u=zr(r)?vs:sr.current,u=Kl(t,u));var c=r.getDerivedStateFromProps,d=typeof c=="function"||typeof i.getSnapshotBeforeUpdate=="function";d||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(s!==o||l!==u)&&$I(t,i,o,u),Qa=!1;var f=t.memoizedState;i.state=f,Hm(t,o,i,n),l=t.memoizedState,s!==o||f!==l||Ur.current||Qa?(typeof c=="function"&&(Zx(t,r,c,o),l=t.memoizedState),(s=Qa||qI(t,r,s,o,f,l,u))?(d||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=o,t.memoizedState=l),i.props=o,i.state=l,i.context=u,o=s):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),o=!1)}else{i=t.stateNode,m1(e,t),s=t.memoizedProps,u=t.type===t.elementType?s:Zo(t.type,s),i.props=u,d=t.pendingProps,f=i.context,l=r.contextType,typeof l=="object"&&l!==null?l=Mo(l):(l=zr(r)?vs:sr.current,l=Kl(t,l));var p=r.getDerivedStateFromProps;(c=typeof p=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(s!==d||f!==l)&&$I(t,i,o,l),Qa=!1,f=t.memoizedState,i.state=f,Hm(t,o,i,n);var h=t.memoizedState;s!==d||f!==h||Ur.current||Qa?(typeof p=="function"&&(Zx(t,r,p,o),h=t.memoizedState),(u=Qa||qI(t,r,u,o,f,h,l)||!1)?(c||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(o,h,l),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(o,h,l)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=o,t.memoizedState=h),i.props=o,i.state=h,i.context=l,o=u):(typeof i.componentDidUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),o=!1)}return r0(e,t,r,o,a,n)}function r0(e,t,r,o,n,a){H1(e,t);var i=(t.flags&128)!==0;if(!o&&!i)return n&&VI(t,r,!1),fa(e,t,a);o=t.stateNode,Ez.current=t;var s=i&&typeof r.getDerivedStateFromError!="function"?null:o.render();return t.flags|=1,e!==null&&i?(t.child=Yl(t,e.child,null,a),t.child=Yl(t,null,s,a)):Rr(e,t,s,a),t.memoizedState=o.state,n&&VI(t,r,!0),t.child}function U1(e){var t=e.stateNode;t.pendingContext?FI(e,t.pendingContext,t.pendingContext!==t.context):t.context&&FI(e,t.context,!1),V0(e,t.containerInfo)}function eP(e,t,r,o,n){return Xl(),A0(n),t.flags|=256,Rr(e,t,r,o),t.child}var o0={dehydrated:null,treeContext:null,retryLane:0};function n0(e){return{baseLanes:e,cachePool:null,transitions:null}}function z1(e,t,r){var o=t.pendingProps,n=dt.current,a=!1,i=(t.flags&128)!==0,s;if((s=i)||(s=e!==null&&e.memoizedState===null?!1:(n&2)!==0),s?(a=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(n|=1),je(dt,n&1),e===null)return Yx(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(i=o.children,e=o.fallback,a?(o=t.mode,a=t.child,i={mode:"hidden",children:i},!(o&1)&&a!==null?(a.childLanes=0,a.pendingProps=i):a=ag(i,o,0,null),e=hs(e,o,r,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=n0(r),t.memoizedState=o0,e):q0(t,i));if(n=e.memoizedState,n!==null&&(s=n.dehydrated,s!==null))return Az(e,t,i,o,s,n,r);if(a){a=o.fallback,i=t.mode,n=e.child,s=n.sibling;var l={mode:"hidden",children:o.children};return!(i&1)&&t.child!==n?(o=t.child,o.childLanes=0,o.pendingProps=l,t.deletions=null):(o=ui(n,l),o.subtreeFlags=n.subtreeFlags&14680064),s!==null?a=ui(s,a):(a=hs(a,i,r,null),a.flags|=2),a.return=t,o.return=t,o.sibling=a,t.child=o,o=a,a=t.child,i=e.child.memoizedState,i=i===null?n0(r):{baseLanes:i.baseLanes|r,cachePool:null,transitions:i.transitions},a.memoizedState=i,a.childLanes=e.childLanes&~r,t.memoizedState=o0,o}return a=e.child,e=a.sibling,o=ui(a,{mode:"visible",children:o.children}),!(t.mode&1)&&(o.lanes=r),o.return=t,o.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=o,t.memoizedState=null,o}function q0(e,t){return t=ag({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function fm(e,t,r,o){return o!==null&&A0(o),Yl(t,e.child,null,r),e=q0(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Az(e,t,r,o,n,a,i){if(r)return t.flags&256?(t.flags&=-257,o=yx(Error(j(422))),fm(e,t,i,o)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(a=o.fallback,n=t.mode,o=ag({mode:"visible",children:o.children},n,0,null),a=hs(a,n,i,null),a.flags|=2,o.return=t,a.return=t,o.sibling=a,t.child=o,t.mode&1&&Yl(t,e.child,null,i),t.child.memoizedState=n0(i),t.memoizedState=o0,a);if(!(t.mode&1))return fm(e,t,i,null);if(n.data==="$!"){if(o=n.nextSibling&&n.nextSibling.dataset,o)var s=o.dgst;return o=s,a=Error(j(419)),o=yx(a,o,void 0),fm(e,t,i,o)}if(s=(i&e.childLanes)!==0,Hr||s){if(o=zt,o!==null){switch(i&-i){case 4:n=2;break;case 16:n=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:n=32;break;case 536870912:n=268435456;break;default:n=0}n=n&(o.suspendedLanes|i)?0:n,n!==0&&n!==a.retryLane&&(a.retryLane=n,da(e,n),rn(o,e,n,-1))}return Z0(),o=yx(Error(j(421))),fm(e,t,i,o)}return n.data==="$?"?(t.flags|=128,t.child=e.child,t=jz.bind(null,e),n._reactRetry=t,null):(e=a.treeContext,ao=ai(n.nextSibling),io=t,at=!0,en=null,e!==null&&(Io[Po++]=ia,Io[Po++]=sa,Io[Po++]=ys,ia=e.id,sa=e.overflow,ys=t),t=q0(t,o.children),t.flags|=4096,t)}function tP(e,t,r){e.lanes|=t;var o=e.alternate;o!==null&&(o.lanes|=t),Qx(e.return,t,r)}function xx(e,t,r,o,n){var a=e.memoizedState;a===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:o,tail:r,tailMode:n}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=o,a.tail=r,a.tailMode=n)}function W1(e,t,r){var o=t.pendingProps,n=o.revealOrder,a=o.tail;if(Rr(e,t,o.children,r),o=dt.current,o&2)o=o&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&tP(e,r,t);else if(e.tag===19)tP(e,r,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}o&=1}if(je(dt,o),!(t.mode&1))t.memoizedState=null;else switch(n){case"forwards":for(r=t.child,n=null;r!==null;)e=r.alternate,e!==null&&Um(e)===null&&(n=r),r=r.sibling;r=n,r===null?(n=t.child,t.child=null):(n=r.sibling,r.sibling=null),xx(t,!1,n,r,a);break;case"backwards":for(r=null,n=t.child,t.child=null;n!==null;){if(e=n.alternate,e!==null&&Um(e)===null){t.child=n;break}e=n.sibling,n.sibling=r,r=n,n=e}xx(t,!0,r,null,a);break;case"together":xx(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Cm(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function fa(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),ws|=t.lanes,!(r&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(j(153));if(t.child!==null){for(e=t.child,r=ui(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=ui(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function Dz(e,t,r){switch(t.tag){case 3:U1(t),Xl();break;case 5:g1(t);break;case 1:zr(t.type)&&_m(t);break;case 4:V0(t,t.stateNode.containerInfo);break;case 10:var o=t.type._context,n=t.memoizedProps.value;je(Vm,o._currentValue),o._currentValue=n;break;case 13:if(o=t.memoizedState,o!==null)return o.dehydrated!==null?(je(dt,dt.current&1),t.flags|=128,null):r&t.child.childLanes?z1(e,t,r):(je(dt,dt.current&1),e=fa(e,t,r),e!==null?e.sibling:null);je(dt,dt.current&1);break;case 19:if(o=(r&t.childLanes)!==0,e.flags&128){if(o)return W1(e,t,r);t.flags|=128}if(n=t.memoizedState,n!==null&&(n.rendering=null,n.tail=null,n.lastEffect=null),je(dt,dt.current),o)break;return null;case 22:case 23:return t.lanes=0,B1(e,t,r)}return fa(e,t,r)}var G1,a0,j1,q1;G1=function(e,t){for(var r=t.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};a0=function(){};j1=function(e,t,r,o){var n=e.memoizedProps;if(n!==o){e=t.stateNode,ms(Fn.current);var a=null;switch(r){case"input":n=Px(e,n),o=Px(e,o),a=[];break;case"select":n=pt({},n,{value:void 0}),o=pt({},o,{value:void 0}),a=[];break;case"textarea":n=Mx(e,n),o=Mx(e,o),a=[];break;default:typeof n.onClick!="function"&&typeof o.onClick=="function"&&(e.onclick=Dm)}Ax(r,o);var i;r=null;for(u in n)if(!o.hasOwnProperty(u)&&n.hasOwnProperty(u)&&n[u]!=null)if(u==="style"){var s=n[u];for(i in s)s.hasOwnProperty(i)&&(r||(r={}),r[i]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(nd.hasOwnProperty(u)?a||(a=[]):(a=a||[]).push(u,null));for(u in o){var l=o[u];if(s=n?.[u],o.hasOwnProperty(u)&&l!==s&&(l!=null||s!=null))if(u==="style")if(s){for(i in s)!s.hasOwnProperty(i)||l&&l.hasOwnProperty(i)||(r||(r={}),r[i]="");for(i in l)l.hasOwnProperty(i)&&s[i]!==l[i]&&(r||(r={}),r[i]=l[i])}else r||(a||(a=[]),a.push(u,r)),r=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,s=s?s.__html:void 0,l!=null&&s!==l&&(a=a||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(a=a||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(nd.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&Qe("scroll",e),a||s===l||(a=[])):(a=a||[]).push(u,l))}r&&(a=a||[]).push("style",r);var u=a;(t.updateQueue=u)&&(t.flags|=4)}};q1=function(e,t,r,o){r!==o&&(t.flags|=4)};function zc(e,t){if(!at)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var o=null;r!==null;)r.alternate!==null&&(o=r),r=r.sibling;o===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:o.sibling=null}}function ar(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,o=0;if(t)for(var n=e.child;n!==null;)r|=n.lanes|n.childLanes,o|=n.subtreeFlags&14680064,o|=n.flags&14680064,n.return=e,n=n.sibling;else for(n=e.child;n!==null;)r|=n.lanes|n.childLanes,o|=n.subtreeFlags,o|=n.flags,n.return=e,n=n.sibling;return e.subtreeFlags|=o,e.childLanes=r,t}function Nz(e,t,r){var o=t.pendingProps;switch(E0(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ar(t),null;case 1:return zr(t.type)&&Nm(),ar(t),null;case 3:return o=t.stateNode,Ql(),Ze(Ur),Ze(sr),H0(),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),(e===null||e.child===null)&&(cm(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,en!==null&&(p0(en),en=null))),a0(e,t),ar(t),null;case 5:B0(t);var n=ms(hd.current);if(r=t.type,e!==null&&t.stateNode!=null)j1(e,t,r,o,n),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!o){if(t.stateNode===null)throw Error(j(166));return ar(t),null}if(e=ms(Fn.current),cm(t)){o=t.stateNode,r=t.type;var a=t.memoizedProps;switch(o[_n]=t,o[md]=a,e=(t.mode&1)!==0,r){case"dialog":Qe("cancel",o),Qe("close",o);break;case"iframe":case"object":case"embed":Qe("load",o);break;case"video":case"audio":for(n=0;n<Kc.length;n++)Qe(Kc[n],o);break;case"source":Qe("error",o);break;case"img":case"image":case"link":Qe("error",o),Qe("load",o);break;case"details":Qe("toggle",o);break;case"input":uI(o,a),Qe("invalid",o);break;case"select":o._wrapperState={wasMultiple:!!a.multiple},Qe("invalid",o);break;case"textarea":dI(o,a),Qe("invalid",o)}Ax(r,a),n=null;for(var i in a)if(a.hasOwnProperty(i)){var s=a[i];i==="children"?typeof s=="string"?o.textContent!==s&&(a.suppressHydrationWarning!==!0&&um(o.textContent,s,e),n=["children",s]):typeof s=="number"&&o.textContent!==""+s&&(a.suppressHydrationWarning!==!0&&um(o.textContent,s,e),n=["children",""+s]):nd.hasOwnProperty(i)&&s!=null&&i==="onScroll"&&Qe("scroll",o)}switch(r){case"input":Qp(o),cI(o,a,!0);break;case"textarea":Qp(o),fI(o);break;case"select":case"option":break;default:typeof a.onClick=="function"&&(o.onclick=Dm)}o=n,t.updateQueue=o,o!==null&&(t.flags|=4)}else{i=n.nodeType===9?n:n.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=wP(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=i.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof o.is=="string"?e=i.createElement(r,{is:o.is}):(e=i.createElement(r),r==="select"&&(i=e,o.multiple?i.multiple=!0:o.size&&(i.size=o.size))):e=i.createElementNS(e,r),e[_n]=t,e[md]=o,G1(e,t,!1,!1),t.stateNode=e;e:{switch(i=Dx(r,o),r){case"dialog":Qe("cancel",e),Qe("close",e),n=o;break;case"iframe":case"object":case"embed":Qe("load",e),n=o;break;case"video":case"audio":for(n=0;n<Kc.length;n++)Qe(Kc[n],e);n=o;break;case"source":Qe("error",e),n=o;break;case"img":case"image":case"link":Qe("error",e),Qe("load",e),n=o;break;case"details":Qe("toggle",e),n=o;break;case"input":uI(e,o),n=Px(e,o),Qe("invalid",e);break;case"option":n=o;break;case"select":e._wrapperState={wasMultiple:!!o.multiple},n=pt({},o,{value:void 0}),Qe("invalid",e);break;case"textarea":dI(e,o),n=Mx(e,o),Qe("invalid",e);break;default:n=o}Ax(r,n),s=n;for(a in s)if(s.hasOwnProperty(a)){var l=s[a];a==="style"?bP(e,l):a==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&CP(e,l)):a==="children"?typeof l=="string"?(r!=="textarea"||l!=="")&&ad(e,l):typeof l=="number"&&ad(e,""+l):a!=="suppressContentEditableWarning"&&a!=="suppressHydrationWarning"&&a!=="autoFocus"&&(nd.hasOwnProperty(a)?l!=null&&a==="onScroll"&&Qe("scroll",e):l!=null&&h0(e,a,l,i))}switch(r){case"input":Qp(e),cI(e,o,!1);break;case"textarea":Qp(e),fI(e);break;case"option":o.value!=null&&e.setAttribute("value",""+ci(o.value));break;case"select":e.multiple=!!o.multiple,a=o.value,a!=null?Ul(e,!!o.multiple,a,!1):o.defaultValue!=null&&Ul(e,!!o.multiple,o.defaultValue,!0);break;default:typeof n.onClick=="function"&&(e.onclick=Dm)}switch(r){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break e;case"img":o=!0;break e;default:o=!1}}o&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return ar(t),null;case 6:if(e&&t.stateNode!=null)q1(e,t,e.memoizedProps,o);else{if(typeof o!="string"&&t.stateNode===null)throw Error(j(166));if(r=ms(hd.current),ms(Fn.current),cm(t)){if(o=t.stateNode,r=t.memoizedProps,o[_n]=t,(a=o.nodeValue!==r)&&(e=io,e!==null))switch(e.tag){case 3:um(o.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&um(o.nodeValue,r,(e.mode&1)!==0)}a&&(t.flags|=4)}else o=(r.nodeType===9?r:r.ownerDocument).createTextNode(o),o[_n]=t,t.stateNode=o}return ar(t),null;case 13:if(Ze(dt),o=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(at&&ao!==null&&t.mode&1&&!(t.flags&128))c1(),Xl(),t.flags|=98560,a=!1;else if(a=cm(t),o!==null&&o.dehydrated!==null){if(e===null){if(!a)throw Error(j(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(j(317));a[_n]=t}else Xl(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;ar(t),a=!1}else en!==null&&(p0(en),en=null),a=!0;if(!a)return t.flags&65536?t:null}return t.flags&128?(t.lanes=r,t):(o=o!==null,o!==(e!==null&&e.memoizedState!==null)&&o&&(t.child.flags|=8192,t.mode&1&&(e===null||dt.current&1?At===0&&(At=3):Z0())),t.updateQueue!==null&&(t.flags|=4),ar(t),null);case 4:return Ql(),a0(e,t),e===null&&fd(t.stateNode.containerInfo),ar(t),null;case 10:return _0(t.type._context),ar(t),null;case 17:return zr(t.type)&&Nm(),ar(t),null;case 19:if(Ze(dt),a=t.memoizedState,a===null)return ar(t),null;if(o=(t.flags&128)!==0,i=a.rendering,i===null)if(o)zc(a,!1);else{if(At!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=Um(e),i!==null){for(t.flags|=128,zc(a,!1),o=i.updateQueue,o!==null&&(t.updateQueue=o,t.flags|=4),t.subtreeFlags=0,o=r,r=t.child;r!==null;)a=r,e=o,a.flags&=14680066,i=a.alternate,i===null?(a.childLanes=0,a.lanes=e,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=i.childLanes,a.lanes=i.lanes,a.child=i.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=i.memoizedProps,a.memoizedState=i.memoizedState,a.updateQueue=i.updateQueue,a.type=i.type,e=i.dependencies,a.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return je(dt,dt.current&1|2),t.child}e=e.sibling}a.tail!==null&&Ct()>Jl&&(t.flags|=128,o=!0,zc(a,!1),t.lanes=4194304)}else{if(!o)if(e=Um(i),e!==null){if(t.flags|=128,o=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),zc(a,!0),a.tail===null&&a.tailMode==="hidden"&&!i.alternate&&!at)return ar(t),null}else 2*Ct()-a.renderingStartTime>Jl&&r!==1073741824&&(t.flags|=128,o=!0,zc(a,!1),t.lanes=4194304);a.isBackwards?(i.sibling=t.child,t.child=i):(r=a.last,r!==null?r.sibling=i:t.child=i,a.last=i)}return a.tail!==null?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=Ct(),t.sibling=null,r=dt.current,je(dt,o?r&1|2:r&1),t):(ar(t),null);case 22:case 23:return Q0(),o=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==o&&(t.flags|=8192),o&&t.mode&1?no&1073741824&&(ar(t),t.subtreeFlags&6&&(t.flags|=8192)):ar(t),null;case 24:return null;case 25:return null}throw Error(j(156,t.tag))}function _z(e,t){switch(E0(t),t.tag){case 1:return zr(t.type)&&Nm(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ql(),Ze(Ur),Ze(sr),H0(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return B0(t),null;case 13:if(Ze(dt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(j(340));Xl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ze(dt),null;case 4:return Ql(),null;case 10:return _0(t.type._context),null;case 22:case 23:return Q0(),null;case 24:return null;default:return null}}var pm=!1,ir=!1,Oz=typeof WeakSet=="function"?WeakSet:Set,Q=null;function Bl(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(o){vt(e,t,o)}else r.current=null}function i0(e,t,r){try{r()}catch(o){vt(e,t,o)}}var rP=!1;function Fz(e,t){if(Wx=Mm,e=QP(),k0(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var o=r.getSelection&&r.getSelection();if(o&&o.rangeCount!==0){r=o.anchorNode;var n=o.anchorOffset,a=o.focusNode;o=o.focusOffset;try{r.nodeType,a.nodeType}catch{r=null;break e}var i=0,s=-1,l=-1,u=0,c=0,d=e,f=null;t:for(;;){for(var p;d!==r||n!==0&&d.nodeType!==3||(s=i+n),d!==a||o!==0&&d.nodeType!==3||(l=i+o),d.nodeType===3&&(i+=d.nodeValue.length),(p=d.firstChild)!==null;)f=d,d=p;for(;;){if(d===e)break t;if(f===r&&++u===n&&(s=i),f===a&&++c===o&&(l=i),(p=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=p}r=s===-1||l===-1?null:{start:s,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(Gx={focusedElem:e,selectionRange:r},Mm=!1,Q=t;Q!==null;)if(t=Q,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Q=e;else for(;Q!==null;){t=Q;try{var h=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(h!==null){var m=h.memoizedProps,x=h.memoizedState,v=t.stateNode,g=v.getSnapshotBeforeUpdate(t.elementType===t.type?m:Zo(t.type,m),x);v.__reactInternalSnapshotBeforeUpdate=g}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent="":y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(j(163))}}catch(w){vt(t,t.return,w)}if(e=t.sibling,e!==null){e.return=t.return,Q=e;break}Q=t.return}return h=rP,rP=!1,h}function td(e,t,r){var o=t.updateQueue;if(o=o!==null?o.lastEffect:null,o!==null){var n=o=o.next;do{if((n.tag&e)===e){var a=n.destroy;n.destroy=void 0,a!==void 0&&i0(t,r,a)}n=n.next}while(n!==o)}}function og(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var o=r.create;r.destroy=o()}r=r.next}while(r!==t)}}function s0(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function $1(e){var t=e.alternate;t!==null&&(e.alternate=null,$1(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[_n],delete t[md],delete t[$x],delete t[xz],delete t[wz])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function K1(e){return e.tag===5||e.tag===3||e.tag===4}function oP(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||K1(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function l0(e,t,r){var o=e.tag;if(o===5||o===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=Dm));else if(o!==4&&(e=e.child,e!==null))for(l0(e,t,r),e=e.sibling;e!==null;)l0(e,t,r),e=e.sibling}function u0(e,t,r){var o=e.tag;if(o===5||o===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(o!==4&&(e=e.child,e!==null))for(u0(e,t,r),e=e.sibling;e!==null;)u0(e,t,r),e=e.sibling}var Yt=null,Jo=!1;function Xa(e,t,r){for(r=r.child;r!==null;)X1(e,t,r),r=r.sibling}function X1(e,t,r){if(On&&typeof On.onCommitFiberUnmount=="function")try{On.onCommitFiberUnmount(Xm,r)}catch{}switch(r.tag){case 5:ir||Bl(r,t);case 6:var o=Yt,n=Jo;Yt=null,Xa(e,t,r),Yt=o,Jo=n,Yt!==null&&(Jo?(e=Yt,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):Yt.removeChild(r.stateNode));break;case 18:Yt!==null&&(Jo?(e=Yt,r=r.stateNode,e.nodeType===8?fx(e.parentNode,r):e.nodeType===1&&fx(e,r),ud(e)):fx(Yt,r.stateNode));break;case 4:o=Yt,n=Jo,Yt=r.stateNode.containerInfo,Jo=!0,Xa(e,t,r),Yt=o,Jo=n;break;case 0:case 11:case 14:case 15:if(!ir&&(o=r.updateQueue,o!==null&&(o=o.lastEffect,o!==null))){n=o=o.next;do{var a=n,i=a.destroy;a=a.tag,i!==void 0&&(a&2||a&4)&&i0(r,t,i),n=n.next}while(n!==o)}Xa(e,t,r);break;case 1:if(!ir&&(Bl(r,t),o=r.stateNode,typeof o.componentWillUnmount=="function"))try{o.props=r.memoizedProps,o.state=r.memoizedState,o.componentWillUnmount()}catch(s){vt(r,t,s)}Xa(e,t,r);break;case 21:Xa(e,t,r);break;case 22:r.mode&1?(ir=(o=ir)||r.memoizedState!==null,Xa(e,t,r),ir=o):Xa(e,t,r);break;default:Xa(e,t,r)}}function nP(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new Oz),t.forEach(function(o){var n=qz.bind(null,e,o);r.has(o)||(r.add(o),o.then(n,n))})}}function Qo(e,t){var r=t.deletions;if(r!==null)for(var o=0;o<r.length;o++){var n=r[o];try{var a=e,i=t,s=i;e:for(;s!==null;){switch(s.tag){case 5:Yt=s.stateNode,Jo=!1;break e;case 3:Yt=s.stateNode.containerInfo,Jo=!0;break e;case 4:Yt=s.stateNode.containerInfo,Jo=!0;break e}s=s.return}if(Yt===null)throw Error(j(160));X1(a,i,n),Yt=null,Jo=!1;var l=n.alternate;l!==null&&(l.return=null),n.return=null}catch(u){vt(n,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Y1(t,e),t=t.sibling}function Y1(e,t){var r=e.alternate,o=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Qo(t,e),Dn(e),o&4){try{td(3,e,e.return),og(3,e)}catch(m){vt(e,e.return,m)}try{td(5,e,e.return)}catch(m){vt(e,e.return,m)}}break;case 1:Qo(t,e),Dn(e),o&512&&r!==null&&Bl(r,r.return);break;case 5:if(Qo(t,e),Dn(e),o&512&&r!==null&&Bl(r,r.return),e.flags&32){var n=e.stateNode;try{ad(n,"")}catch(m){vt(e,e.return,m)}}if(o&4&&(n=e.stateNode,n!=null)){var a=e.memoizedProps,i=r!==null?r.memoizedProps:a,s=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{s==="input"&&a.type==="radio"&&a.name!=null&&yP(n,a),Dx(s,i);var u=Dx(s,a);for(i=0;i<l.length;i+=2){var c=l[i],d=l[i+1];c==="style"?bP(n,d):c==="dangerouslySetInnerHTML"?CP(n,d):c==="children"?ad(n,d):h0(n,c,d,u)}switch(s){case"input":Tx(n,a);break;case"textarea":xP(n,a);break;case"select":var f=n._wrapperState.wasMultiple;n._wrapperState.wasMultiple=!!a.multiple;var p=a.value;p!=null?Ul(n,!!a.multiple,p,!1):f!==!!a.multiple&&(a.defaultValue!=null?Ul(n,!!a.multiple,a.defaultValue,!0):Ul(n,!!a.multiple,a.multiple?[]:"",!1))}n[md]=a}catch(m){vt(e,e.return,m)}}break;case 6:if(Qo(t,e),Dn(e),o&4){if(e.stateNode===null)throw Error(j(162));n=e.stateNode,a=e.memoizedProps;try{n.nodeValue=a}catch(m){vt(e,e.return,m)}}break;case 3:if(Qo(t,e),Dn(e),o&4&&r!==null&&r.memoizedState.isDehydrated)try{ud(t.containerInfo)}catch(m){vt(e,e.return,m)}break;case 4:Qo(t,e),Dn(e);break;case 13:Qo(t,e),Dn(e),n=e.child,n.flags&8192&&(a=n.memoizedState!==null,n.stateNode.isHidden=a,!a||n.alternate!==null&&n.alternate.memoizedState!==null||(X0=Ct())),o&4&&nP(e);break;case 22:if(c=r!==null&&r.memoizedState!==null,e.mode&1?(ir=(u=ir)||c,Qo(t,e),ir=u):Qo(t,e),Dn(e),o&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!c&&e.mode&1)for(Q=e,c=e.child;c!==null;){for(d=Q=c;Q!==null;){switch(f=Q,p=f.child,f.tag){case 0:case 11:case 14:case 15:td(4,f,f.return);break;case 1:Bl(f,f.return);var h=f.stateNode;if(typeof h.componentWillUnmount=="function"){o=f,r=f.return;try{t=o,h.props=t.memoizedProps,h.state=t.memoizedState,h.componentWillUnmount()}catch(m){vt(o,r,m)}}break;case 5:Bl(f,f.return);break;case 22:if(f.memoizedState!==null){iP(d);continue}}p!==null?(p.return=f,Q=p):iP(d)}c=c.sibling}e:for(c=null,d=e;;){if(d.tag===5){if(c===null){c=d;try{n=d.stateNode,u?(a=n.style,typeof a.setProperty=="function"?a.setProperty("display","none","important"):a.display="none"):(s=d.stateNode,l=d.memoizedProps.style,i=l!=null&&l.hasOwnProperty("display")?l.display:null,s.style.display=SP("display",i))}catch(m){vt(e,e.return,m)}}}else if(d.tag===6){if(c===null)try{d.stateNode.nodeValue=u?"":d.memoizedProps}catch(m){vt(e,e.return,m)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;c===d&&(c=null),d=d.return}c===d&&(c=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:Qo(t,e),Dn(e),o&4&&nP(e);break;case 21:break;default:Qo(t,e),Dn(e)}}function Dn(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(K1(r)){var o=r;break e}r=r.return}throw Error(j(160))}switch(o.tag){case 5:var n=o.stateNode;o.flags&32&&(ad(n,""),o.flags&=-33);var a=oP(e);u0(e,a,n);break;case 3:case 4:var i=o.stateNode.containerInfo,s=oP(e);l0(e,s,i);break;default:throw Error(j(161))}}catch(l){vt(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Vz(e,t,r){Q=e,Q1(e,t,r)}function Q1(e,t,r){for(var o=(e.mode&1)!==0;Q!==null;){var n=Q,a=n.child;if(n.tag===22&&o){var i=n.memoizedState!==null||pm;if(!i){var s=n.alternate,l=s!==null&&s.memoizedState!==null||ir;s=pm;var u=ir;if(pm=i,(ir=l)&&!u)for(Q=n;Q!==null;)i=Q,l=i.child,i.tag===22&&i.memoizedState!==null?sP(n):l!==null?(l.return=i,Q=l):sP(n);for(;a!==null;)Q=a,Q1(a,t,r),a=a.sibling;Q=n,pm=s,ir=u}aP(e,t,r)}else n.subtreeFlags&8772&&a!==null?(a.return=n,Q=a):aP(e,t,r)}}function aP(e){for(;Q!==null;){var t=Q;if(t.flags&8772){var r=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:ir||og(5,t);break;case 1:var o=t.stateNode;if(t.flags&4&&!ir)if(r===null)o.componentDidMount();else{var n=t.elementType===t.type?r.memoizedProps:Zo(t.type,r.memoizedProps);o.componentDidUpdate(n,r.memoizedState,o.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;a!==null&&WI(t,a,o);break;case 3:var i=t.updateQueue;if(i!==null){if(r=null,t.child!==null)switch(t.child.tag){case 5:r=t.child.stateNode;break;case 1:r=t.child.stateNode}WI(t,i,r)}break;case 5:var s=t.stateNode;if(r===null&&t.flags&4){r=s;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&r.focus();break;case"img":l.src&&(r.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var c=u.memoizedState;if(c!==null){var d=c.dehydrated;d!==null&&ud(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(j(163))}ir||t.flags&512&&s0(t)}catch(f){vt(t,t.return,f)}}if(t===e){Q=null;break}if(r=t.sibling,r!==null){r.return=t.return,Q=r;break}Q=t.return}}function iP(e){for(;Q!==null;){var t=Q;if(t===e){Q=null;break}var r=t.sibling;if(r!==null){r.return=t.return,Q=r;break}Q=t.return}}function sP(e){for(;Q!==null;){var t=Q;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{og(4,t)}catch(l){vt(t,r,l)}break;case 1:var o=t.stateNode;if(typeof o.componentDidMount=="function"){var n=t.return;try{o.componentDidMount()}catch(l){vt(t,n,l)}}var a=t.return;try{s0(t)}catch(l){vt(t,a,l)}break;case 5:var i=t.return;try{s0(t)}catch(l){vt(t,i,l)}}}catch(l){vt(t,t.return,l)}if(t===e){Q=null;break}var s=t.sibling;if(s!==null){s.return=t.return,Q=s;break}Q=t.return}}var Bz=Math.ceil,Gm=pa.ReactCurrentDispatcher,$0=pa.ReactCurrentOwner,ko=pa.ReactCurrentBatchConfig,Ie=0,zt=null,Rt=null,Qt=0,no=0,Hl=pi(0),At=0,wd=null,ws=0,ng=0,K0=0,rd=null,Br=null,X0=0,Jl=1/0,na=null,jm=!1,c0=null,si=null,mm=!1,ti=null,qm=0,od=0,d0=null,Sm=-1,bm=0;function Lr(){return Ie&6?Ct():Sm!==-1?Sm:Sm=Ct()}function li(e){return e.mode&1?Ie&2&&Qt!==0?Qt&-Qt:Sz.transition!==null?(bm===0&&(bm=_P()),bm):(e=Fe,e!==0||(e=window.event,e=e===void 0?16:zP(e.type)),e):1}function rn(e,t,r,o){if(50<od)throw od=0,d0=null,Error(j(185));Cd(e,r,o),(!(Ie&2)||e!==zt)&&(e===zt&&(!(Ie&2)&&(ng|=r),At===4&&Ja(e,Qt)),Wr(e,o),r===1&&Ie===0&&!(t.mode&1)&&(Jl=Ct()+500,eg&&mi()))}function Wr(e,t){var r=e.callbackNode;R4(e,t);var o=km(e,e===zt?Qt:0);if(o===0)r!==null&&gI(r),e.callbackNode=null,e.callbackPriority=0;else if(t=o&-o,e.callbackPriority!==t){if(r!=null&&gI(r),t===1)e.tag===0?Cz(lP.bind(null,e)):s1(lP.bind(null,e)),vz(function(){!(Ie&6)&&mi()}),r=null;else{switch(OP(o)){case 1:r=C0;break;case 4:r=DP;break;case 16:r=Tm;break;case 536870912:r=NP;break;default:r=Tm}r=aT(r,Z1.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function Z1(e,t){if(Sm=-1,bm=0,Ie&6)throw Error(j(327));var r=e.callbackNode;if(ql()&&e.callbackNode!==r)return null;var o=km(e,e===zt?Qt:0);if(o===0)return null;if(o&30||o&e.expiredLanes||t)t=$m(e,o);else{t=o;var n=Ie;Ie|=2;var a=eT();(zt!==e||Qt!==t)&&(na=null,Jl=Ct()+500,gs(e,t));do try{zz();break}catch(s){J1(e,s)}while(1);N0(),Gm.current=a,Ie=n,Rt!==null?t=0:(zt=null,Qt=0,t=At)}if(t!==0){if(t===2&&(n=Vx(e),n!==0&&(o=n,t=f0(e,n))),t===1)throw r=wd,gs(e,0),Ja(e,o),Wr(e,Ct()),r;if(t===6)Ja(e,o);else{if(n=e.current.alternate,!(o&30)&&!Hz(n)&&(t=$m(e,o),t===2&&(a=Vx(e),a!==0&&(o=a,t=f0(e,a))),t===1))throw r=wd,gs(e,0),Ja(e,o),Wr(e,Ct()),r;switch(e.finishedWork=n,e.finishedLanes=o,t){case 0:case 1:throw Error(j(345));case 2:ds(e,Br,na);break;case 3:if(Ja(e,o),(o&130023424)===o&&(t=X0+500-Ct(),10<t)){if(km(e,0)!==0)break;if(n=e.suspendedLanes,(n&o)!==o){Lr(),e.pingedLanes|=e.suspendedLanes&n;break}e.timeoutHandle=qx(ds.bind(null,e,Br,na),t);break}ds(e,Br,na);break;case 4:if(Ja(e,o),(o&4194240)===o)break;for(t=e.eventTimes,n=-1;0<o;){var i=31-tn(o);a=1<<i,i=t[i],i>n&&(n=i),o&=~a}if(o=n,o=Ct()-o,o=(120>o?120:480>o?480:1080>o?1080:1920>o?1920:3e3>o?3e3:4320>o?4320:1960*Bz(o/1960))-o,10<o){e.timeoutHandle=qx(ds.bind(null,e,Br,na),o);break}ds(e,Br,na);break;case 5:ds(e,Br,na);break;default:throw Error(j(329))}}}return Wr(e,Ct()),e.callbackNode===r?Z1.bind(null,e):null}function f0(e,t){var r=rd;return e.current.memoizedState.isDehydrated&&(gs(e,t).flags|=256),e=$m(e,t),e!==2&&(t=Br,Br=r,t!==null&&p0(t)),e}function p0(e){Br===null?Br=e:Br.push.apply(Br,e)}function Hz(e){for(var t=e;;){if(t.flags&16384){var r=t.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var o=0;o<r.length;o++){var n=r[o],a=n.getSnapshot;n=n.value;try{if(!on(a(),n))return!1}catch{return!1}}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Ja(e,t){for(t&=~K0,t&=~ng,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-tn(t),o=1<<r;e[r]=-1,t&=~o}}function lP(e){if(Ie&6)throw Error(j(327));ql();var t=km(e,0);if(!(t&1))return Wr(e,Ct()),null;var r=$m(e,t);if(e.tag!==0&&r===2){var o=Vx(e);o!==0&&(t=o,r=f0(e,o))}if(r===1)throw r=wd,gs(e,0),Ja(e,t),Wr(e,Ct()),r;if(r===6)throw Error(j(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,ds(e,Br,na),Wr(e,Ct()),null}function Y0(e,t){var r=Ie;Ie|=1;try{return e(t)}finally{Ie=r,Ie===0&&(Jl=Ct()+500,eg&&mi())}}function Cs(e){ti!==null&&ti.tag===0&&!(Ie&6)&&ql();var t=Ie;Ie|=1;var r=ko.transition,o=Fe;try{if(ko.transition=null,Fe=1,e)return e()}finally{Fe=o,ko.transition=r,Ie=t,!(Ie&6)&&mi()}}function Q0(){no=Hl.current,Ze(Hl)}function gs(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,hz(r)),Rt!==null)for(r=Rt.return;r!==null;){var o=r;switch(E0(o),o.tag){case 1:o=o.type.childContextTypes,o!=null&&Nm();break;case 3:Ql(),Ze(Ur),Ze(sr),H0();break;case 5:B0(o);break;case 4:Ql();break;case 13:Ze(dt);break;case 19:Ze(dt);break;case 10:_0(o.type._context);break;case 22:case 23:Q0()}r=r.return}if(zt=e,Rt=e=ui(e.current,null),Qt=no=t,At=0,wd=null,K0=ng=ws=0,Br=rd=null,ps!==null){for(t=0;t<ps.length;t++)if(r=ps[t],o=r.interleaved,o!==null){r.interleaved=null;var n=o.next,a=r.pending;if(a!==null){var i=a.next;a.next=n,o.next=i}r.pending=o}ps=null}return e}function J1(e,t){do{var r=Rt;try{if(N0(),xm.current=Wm,zm){for(var o=ft.memoizedState;o!==null;){var n=o.queue;n!==null&&(n.pending=null),o=o.next}zm=!1}if(xs=0,Ut=Et=ft=null,ed=!1,vd=0,$0.current=null,r===null||r.return===null){At=1,wd=t,Rt=null;break}e:{var a=e,i=r.return,s=r,l=t;if(t=Qt,s.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l,c=s,d=c.tag;if(!(c.mode&1)&&(d===0||d===11||d===15)){var f=c.alternate;f?(c.updateQueue=f.updateQueue,c.memoizedState=f.memoizedState,c.lanes=f.lanes):(c.updateQueue=null,c.memoizedState=null)}var p=XI(i);if(p!==null){p.flags&=-257,YI(p,i,s,a,t),p.mode&1&&KI(a,u,t),t=p,l=u;var h=t.updateQueue;if(h===null){var m=new Set;m.add(l),t.updateQueue=m}else h.add(l);break e}else{if(!(t&1)){KI(a,u,t),Z0();break e}l=Error(j(426))}}else if(at&&s.mode&1){var x=XI(i);if(x!==null){!(x.flags&65536)&&(x.flags|=256),YI(x,i,s,a,t),A0(Zl(l,s));break e}}a=l=Zl(l,s),At!==4&&(At=2),rd===null?rd=[a]:rd.push(a),a=i;do{switch(a.tag){case 3:a.flags|=65536,t&=-t,a.lanes|=t;var v=O1(a,l,t);zI(a,v);break e;case 1:s=l;var g=a.type,y=a.stateNode;if(!(a.flags&128)&&(typeof g.getDerivedStateFromError=="function"||y!==null&&typeof y.componentDidCatch=="function"&&(si===null||!si.has(y)))){a.flags|=65536,t&=-t,a.lanes|=t;var w=F1(a,s,t);zI(a,w);break e}}a=a.return}while(a!==null)}rT(r)}catch(C){t=C,Rt===r&&r!==null&&(Rt=r=r.return);continue}break}while(1)}function eT(){var e=Gm.current;return Gm.current=Wm,e===null?Wm:e}function Z0(){(At===0||At===3||At===2)&&(At=4),zt===null||!(ws&268435455)&&!(ng&268435455)||Ja(zt,Qt)}function $m(e,t){var r=Ie;Ie|=2;var o=eT();(zt!==e||Qt!==t)&&(na=null,gs(e,t));do try{Uz();break}catch(n){J1(e,n)}while(1);if(N0(),Ie=r,Gm.current=o,Rt!==null)throw Error(j(261));return zt=null,Qt=0,At}function Uz(){for(;Rt!==null;)tT(Rt)}function zz(){for(;Rt!==null&&!g4();)tT(Rt)}function tT(e){var t=nT(e.alternate,e,no);e.memoizedProps=e.pendingProps,t===null?rT(e):Rt=t,$0.current=null}function rT(e){var t=e;do{var r=t.alternate;if(e=t.return,t.flags&32768){if(r=_z(r,t),r!==null){r.flags&=32767,Rt=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{At=6,Rt=null;return}}else if(r=Nz(r,t,no),r!==null){Rt=r;return}if(t=t.sibling,t!==null){Rt=t;return}Rt=t=e}while(t!==null);At===0&&(At=5)}function ds(e,t,r){var o=Fe,n=ko.transition;try{ko.transition=null,Fe=1,Wz(e,t,r,o)}finally{ko.transition=n,Fe=o}return null}function Wz(e,t,r,o){do ql();while(ti!==null);if(Ie&6)throw Error(j(327));r=e.finishedWork;var n=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(j(177));e.callbackNode=null,e.callbackPriority=0;var a=r.lanes|r.childLanes;if(L4(e,a),e===zt&&(Rt=zt=null,Qt=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||mm||(mm=!0,aT(Tm,function(){return ql(),null})),a=(r.flags&15990)!==0,r.subtreeFlags&15990||a){a=ko.transition,ko.transition=null;var i=Fe;Fe=1;var s=Ie;Ie|=4,$0.current=null,Fz(e,r),Y1(r,e),dz(Gx),Mm=!!Wx,Gx=Wx=null,e.current=r,Vz(r,e,n),h4(),Ie=s,Fe=i,ko.transition=a}else e.current=r;if(mm&&(mm=!1,ti=e,qm=n),a=e.pendingLanes,a===0&&(si=null),x4(r.stateNode,o),Wr(e,Ct()),t!==null)for(o=e.onRecoverableError,r=0;r<t.length;r++)n=t[r],o(n.value,{componentStack:n.stack,digest:n.digest});if(jm)throw jm=!1,e=c0,c0=null,e;return qm&1&&e.tag!==0&&ql(),a=e.pendingLanes,a&1?e===d0?od++:(od=0,d0=e):od=0,mi(),null}function ql(){if(ti!==null){var e=OP(qm),t=ko.transition,r=Fe;try{if(ko.transition=null,Fe=16>e?16:e,ti===null)var o=!1;else{if(e=ti,ti=null,qm=0,Ie&6)throw Error(j(331));var n=Ie;for(Ie|=4,Q=e.current;Q!==null;){var a=Q,i=a.child;if(Q.flags&16){var s=a.deletions;if(s!==null){for(var l=0;l<s.length;l++){var u=s[l];for(Q=u;Q!==null;){var c=Q;switch(c.tag){case 0:case 11:case 15:td(8,c,a)}var d=c.child;if(d!==null)d.return=c,Q=d;else for(;Q!==null;){c=Q;var f=c.sibling,p=c.return;if($1(c),c===u){Q=null;break}if(f!==null){f.return=p,Q=f;break}Q=p}}}var h=a.alternate;if(h!==null){var m=h.child;if(m!==null){h.child=null;do{var x=m.sibling;m.sibling=null,m=x}while(m!==null)}}Q=a}}if(a.subtreeFlags&2064&&i!==null)i.return=a,Q=i;else e:for(;Q!==null;){if(a=Q,a.flags&2048)switch(a.tag){case 0:case 11:case 15:td(9,a,a.return)}var v=a.sibling;if(v!==null){v.return=a.return,Q=v;break e}Q=a.return}}var g=e.current;for(Q=g;Q!==null;){i=Q;var y=i.child;if(i.subtreeFlags&2064&&y!==null)y.return=i,Q=y;else e:for(i=g;Q!==null;){if(s=Q,s.flags&2048)try{switch(s.tag){case 0:case 11:case 15:og(9,s)}}catch(C){vt(s,s.return,C)}if(s===i){Q=null;break e}var w=s.sibling;if(w!==null){w.return=s.return,Q=w;break e}Q=s.return}}if(Ie=n,mi(),On&&typeof On.onPostCommitFiberRoot=="function")try{On.onPostCommitFiberRoot(Xm,e)}catch{}o=!0}return o}finally{Fe=r,ko.transition=t}}return!1}function uP(e,t,r){t=Zl(r,t),t=O1(e,t,1),e=ii(e,t,1),t=Lr(),e!==null&&(Cd(e,1,t),Wr(e,t))}function vt(e,t,r){if(e.tag===3)uP(e,e,r);else for(;t!==null;){if(t.tag===3){uP(t,e,r);break}else if(t.tag===1){var o=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(si===null||!si.has(o))){e=Zl(r,e),e=F1(t,e,1),t=ii(t,e,1),e=Lr(),t!==null&&(Cd(t,1,e),Wr(t,e));break}}t=t.return}}function Gz(e,t,r){var o=e.pingCache;o!==null&&o.delete(t),t=Lr(),e.pingedLanes|=e.suspendedLanes&r,zt===e&&(Qt&r)===r&&(At===4||At===3&&(Qt&130023424)===Qt&&500>Ct()-X0?gs(e,0):K0|=r),Wr(e,t)}function oT(e,t){t===0&&(e.mode&1?(t=em,em<<=1,!(em&130023424)&&(em=4194304)):t=1);var r=Lr();e=da(e,t),e!==null&&(Cd(e,t,r),Wr(e,r))}function jz(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),oT(e,r)}function qz(e,t){var r=0;switch(e.tag){case 13:var o=e.stateNode,n=e.memoizedState;n!==null&&(r=n.retryLane);break;case 19:o=e.stateNode;break;default:throw Error(j(314))}o!==null&&o.delete(t),oT(e,r)}var nT;nT=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ur.current)Hr=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return Hr=!1,Dz(e,t,r);Hr=!!(e.flags&131072)}else Hr=!1,at&&t.flags&1048576&&l1(t,Fm,t.index);switch(t.lanes=0,t.tag){case 2:var o=t.type;Cm(e,t),e=t.pendingProps;var n=Kl(t,sr.current);jl(t,r),n=z0(null,t,o,e,n,r);var a=W0();return t.flags|=1,typeof n=="object"&&n!==null&&typeof n.render=="function"&&n.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,zr(o)?(a=!0,_m(t)):a=!1,t.memoizedState=n.state!==null&&n.state!==void 0?n.state:null,F0(t),n.updater=rg,t.stateNode=n,n._reactInternals=t,Jx(t,o,e,r),t=r0(null,t,o,!0,a,r)):(t.tag=0,at&&a&&M0(t),Rr(null,t,n,r),t=t.child),t;case 16:o=t.elementType;e:{switch(Cm(e,t),e=t.pendingProps,n=o._init,o=n(o._payload),t.type=o,n=t.tag=Kz(o),e=Zo(o,e),n){case 0:t=t0(null,t,o,e,r);break e;case 1:t=JI(null,t,o,e,r);break e;case 11:t=QI(null,t,o,e,r);break e;case 14:t=ZI(null,t,o,Zo(o.type,e),r);break e}throw Error(j(306,o,""))}return t;case 0:return o=t.type,n=t.pendingProps,n=t.elementType===o?n:Zo(o,n),t0(e,t,o,n,r);case 1:return o=t.type,n=t.pendingProps,n=t.elementType===o?n:Zo(o,n),JI(e,t,o,n,r);case 3:e:{if(U1(t),e===null)throw Error(j(387));o=t.pendingProps,a=t.memoizedState,n=a.element,m1(e,t),Hm(t,o,null,r);var i=t.memoizedState;if(o=i.element,a.isDehydrated)if(a={element:o,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){n=Zl(Error(j(423)),t),t=eP(e,t,o,r,n);break e}else if(o!==n){n=Zl(Error(j(424)),t),t=eP(e,t,o,r,n);break e}else for(ao=ai(t.stateNode.containerInfo.firstChild),io=t,at=!0,en=null,r=f1(t,null,o,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Xl(),o===n){t=fa(e,t,r);break e}Rr(e,t,o,r)}t=t.child}return t;case 5:return g1(t),e===null&&Yx(t),o=t.type,n=t.pendingProps,a=e!==null?e.memoizedProps:null,i=n.children,jx(o,n)?i=null:a!==null&&jx(o,a)&&(t.flags|=32),H1(e,t),Rr(e,t,i,r),t.child;case 6:return e===null&&Yx(t),null;case 13:return z1(e,t,r);case 4:return V0(t,t.stateNode.containerInfo),o=t.pendingProps,e===null?t.child=Yl(t,null,o,r):Rr(e,t,o,r),t.child;case 11:return o=t.type,n=t.pendingProps,n=t.elementType===o?n:Zo(o,n),QI(e,t,o,n,r);case 7:return Rr(e,t,t.pendingProps,r),t.child;case 8:return Rr(e,t,t.pendingProps.children,r),t.child;case 12:return Rr(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(o=t.type._context,n=t.pendingProps,a=t.memoizedProps,i=n.value,je(Vm,o._currentValue),o._currentValue=i,a!==null)if(on(a.value,i)){if(a.children===n.children&&!Ur.current){t=fa(e,t,r);break e}}else for(a=t.child,a!==null&&(a.return=t);a!==null;){var s=a.dependencies;if(s!==null){i=a.child;for(var l=s.firstContext;l!==null;){if(l.context===o){if(a.tag===1){l=la(-1,r&-r),l.tag=2;var u=a.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}a.lanes|=r,l=a.alternate,l!==null&&(l.lanes|=r),Qx(a.return,r,t),s.lanes|=r;break}l=l.next}}else if(a.tag===10)i=a.type===t.type?null:a.child;else if(a.tag===18){if(i=a.return,i===null)throw Error(j(341));i.lanes|=r,s=i.alternate,s!==null&&(s.lanes|=r),Qx(i,r,t),i=a.sibling}else i=a.child;if(i!==null)i.return=a;else for(i=a;i!==null;){if(i===t){i=null;break}if(a=i.sibling,a!==null){a.return=i.return,i=a;break}i=i.return}a=i}Rr(e,t,n.children,r),t=t.child}return t;case 9:return n=t.type,o=t.pendingProps.children,jl(t,r),n=Mo(n),o=o(n),t.flags|=1,Rr(e,t,o,r),t.child;case 14:return o=t.type,n=Zo(o,t.pendingProps),n=Zo(o.type,n),ZI(e,t,o,n,r);case 15:return V1(e,t,t.type,t.pendingProps,r);case 17:return o=t.type,n=t.pendingProps,n=t.elementType===o?n:Zo(o,n),Cm(e,t),t.tag=1,zr(o)?(e=!0,_m(t)):e=!1,jl(t,r),_1(t,o,n),Jx(t,o,n,r),r0(null,t,o,!0,e,r);case 19:return W1(e,t,r);case 22:return B1(e,t,r)}throw Error(j(156,t.tag))};function aT(e,t){return AP(e,t)}function $z(e,t,r,o){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function To(e,t,r,o){return new $z(e,t,r,o)}function J0(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Kz(e){if(typeof e=="function")return J0(e)?1:0;if(e!=null){if(e=e.$$typeof,e===y0)return 11;if(e===x0)return 14}return 2}function ui(e,t){var r=e.alternate;return r===null?(r=To(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function Rm(e,t,r,o,n,a){var i=2;if(o=e,typeof e=="function")J0(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case Ml:return hs(r.children,n,a,t);case v0:i=8,n|=8;break;case bx:return e=To(12,r,t,n|2),e.elementType=bx,e.lanes=a,e;case Rx:return e=To(13,r,t,n),e.elementType=Rx,e.lanes=a,e;case Lx:return e=To(19,r,t,n),e.elementType=Lx,e.lanes=a,e;case gP:return ag(r,n,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case pP:i=10;break e;case mP:i=9;break e;case y0:i=11;break e;case x0:i=14;break e;case Ya:i=16,o=null;break e}throw Error(j(130,e==null?e:typeof e,""))}return t=To(i,r,t,n),t.elementType=e,t.type=o,t.lanes=a,t}function hs(e,t,r,o){return e=To(7,e,o,t),e.lanes=r,e}function ag(e,t,r,o){return e=To(22,e,o,t),e.elementType=gP,e.lanes=r,e.stateNode={isHidden:!1},e}function wx(e,t,r){return e=To(6,e,null,t),e.lanes=r,e}function Cx(e,t,r){return t=To(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Xz(e,t,r,o,n){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=nx(0),this.expirationTimes=nx(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=nx(0),this.identifierPrefix=o,this.onRecoverableError=n,this.mutableSourceEagerHydrationData=null}function ew(e,t,r,o,n,a,i,s,l){return e=new Xz(e,t,r,s,l),t===1?(t=1,a===!0&&(t|=8)):t=0,a=To(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:o,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},F0(a),e}function Yz(e,t,r){var o=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:kl,key:o==null?null:""+o,children:e,containerInfo:t,implementation:r}}function iT(e){if(!e)return di;e=e._reactInternals;e:{if(bs(e)!==e||e.tag!==1)throw Error(j(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(zr(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(j(171))}if(e.tag===1){var r=e.type;if(zr(r))return i1(e,r,t)}return t}function sT(e,t,r,o,n,a,i,s,l){return e=ew(r,o,!0,e,n,a,i,s,l),e.context=iT(null),r=e.current,o=Lr(),n=li(r),a=la(o,n),a.callback=t??null,ii(r,a,n),e.current.lanes=n,Cd(e,n,o),Wr(e,o),e}function ig(e,t,r,o){var n=t.current,a=Lr(),i=li(n);return r=iT(r),t.context===null?t.context=r:t.pendingContext=r,t=la(a,i),t.payload={element:e},o=o===void 0?null:o,o!==null&&(t.callback=o),e=ii(n,t,i),e!==null&&(rn(e,n,i,a),ym(e,n,i)),i}function Km(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function cP(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function tw(e,t){cP(e,t),(e=e.alternate)&&cP(e,t)}function Qz(){return null}var lT=typeof reportError=="function"?reportError:function(e){console.error(e)};function rw(e){this._internalRoot=e}sg.prototype.render=rw.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(j(409));ig(e,t,null,null)};sg.prototype.unmount=rw.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Cs(function(){ig(null,e,null,null)}),t[ca]=null}};function sg(e){this._internalRoot=e}sg.prototype.unstable_scheduleHydration=function(e){if(e){var t=BP();e={blockedOn:null,target:e,priority:t};for(var r=0;r<Za.length&&t!==0&&t<Za[r].priority;r++);Za.splice(r,0,e),r===0&&UP(e)}};function ow(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function lg(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function dP(){}function Zz(e,t,r,o,n){if(n){if(typeof o=="function"){var a=o;o=function(){var u=Km(i);a.call(u)}}var i=sT(t,o,e,0,null,!1,!1,"",dP);return e._reactRootContainer=i,e[ca]=i.current,fd(e.nodeType===8?e.parentNode:e),Cs(),i}for(;n=e.lastChild;)e.removeChild(n);if(typeof o=="function"){var s=o;o=function(){var u=Km(l);s.call(u)}}var l=ew(e,0,!1,null,null,!1,!1,"",dP);return e._reactRootContainer=l,e[ca]=l.current,fd(e.nodeType===8?e.parentNode:e),Cs(function(){ig(t,l,r,o)}),l}function ug(e,t,r,o,n){var a=r._reactRootContainer;if(a){var i=a;if(typeof n=="function"){var s=n;n=function(){var l=Km(i);s.call(l)}}ig(t,i,e,n)}else i=Zz(r,t,e,n,o);return Km(i)}FP=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=$c(t.pendingLanes);r!==0&&(S0(t,r|1),Wr(t,Ct()),!(Ie&6)&&(Jl=Ct()+500,mi()))}break;case 13:Cs(function(){var o=da(e,1);if(o!==null){var n=Lr();rn(o,e,1,n)}}),tw(e,1)}};b0=function(e){if(e.tag===13){var t=da(e,134217728);if(t!==null){var r=Lr();rn(t,e,134217728,r)}tw(e,134217728)}};VP=function(e){if(e.tag===13){var t=li(e),r=da(e,t);if(r!==null){var o=Lr();rn(r,e,t,o)}tw(e,t)}};BP=function(){return Fe};HP=function(e,t){var r=Fe;try{return Fe=e,t()}finally{Fe=r}};_x=function(e,t,r){switch(t){case"input":if(Tx(e,r),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var o=r[t];if(o!==e&&o.form===e.form){var n=Jm(o);if(!n)throw Error(j(90));vP(o),Tx(o,n)}}}break;case"textarea":xP(e,r);break;case"select":t=r.value,t!=null&&Ul(e,!!r.multiple,t,!1)}};IP=Y0;PP=Cs;var Jz={usingClientEntryPoint:!1,Events:[bd,Nl,Jm,RP,LP,Y0]},Wc={findFiberByHostInstance:fs,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},e5={bundleType:Wc.bundleType,version:Wc.version,rendererPackageName:Wc.rendererPackageName,rendererConfig:Wc.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:pa.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=MP(e),e===null?null:e.stateNode},findFiberByHostInstance:Wc.findFiberByHostInstance||Qz,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&(Gc=__REACT_DEVTOOLS_GLOBAL_HOOK__,!Gc.isDisabled&&Gc.supportsFiber))try{Xm=Gc.inject(e5),On=Gc}catch{}var Gc;uo.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Jz;uo.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!ow(t))throw Error(j(200));return Yz(e,t,null,r)};uo.createRoot=function(e,t){if(!ow(e))throw Error(j(299));var r=!1,o="",n=lT;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(o=t.identifierPrefix),t.onRecoverableError!==void 0&&(n=t.onRecoverableError)),t=ew(e,1,!1,null,null,r,!1,o,n),e[ca]=t.current,fd(e.nodeType===8?e.parentNode:e),new rw(t)};uo.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(j(188)):(e=Object.keys(e).join(","),Error(j(268,e)));return e=MP(t),e=e===null?null:e.stateNode,e};uo.flushSync=function(e){return Cs(e)};uo.hydrate=function(e,t,r){if(!lg(t))throw Error(j(200));return ug(null,e,t,!0,r)};uo.hydrateRoot=function(e,t,r){if(!ow(e))throw Error(j(405));var o=r!=null&&r.hydratedSources||null,n=!1,a="",i=lT;if(r!=null&&(r.unstable_strictMode===!0&&(n=!0),r.identifierPrefix!==void 0&&(a=r.identifierPrefix),r.onRecoverableError!==void 0&&(i=r.onRecoverableError)),t=sT(t,null,e,1,r??null,n,!1,a,i),e[ca]=t.current,fd(e),o)for(e=0;e<o.length;e++)r=o[e],n=r._getVersion,n=n(r._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[r,n]:t.mutableSourceEagerHydrationData.push(r,n);return new sg(t)};uo.render=function(e,t,r){if(!lg(t))throw Error(j(200));return ug(null,e,t,!1,r)};uo.unmountComponentAtNode=function(e){if(!lg(e))throw Error(j(40));return e._reactRootContainer?(Cs(function(){ug(null,null,e,!1,function(){e._reactRootContainer=null,e[ca]=null})}),!0):!1};uo.unstable_batchedUpdates=Y0;uo.unstable_renderSubtreeIntoContainer=function(e,t,r,o){if(!lg(r))throw Error(j(200));if(e==null||e._reactInternals===void 0)throw Error(j(38));return ug(e,t,r,!1,o)};uo.version="18.3.1-next-f1338f8080-20240426"});var ru=rr(($Z,dT)=>{"use strict";function cT(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(cT)}catch(e){console.error(e)}}cT(),dT.exports=uT()});var ak=rr(nk=>{"use strict";var yu=E();function oG(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var nG=typeof Object.is=="function"?Object.is:oG,aG=yu.useState,iG=yu.useEffect,sG=yu.useLayoutEffect,lG=yu.useDebugValue;function uG(e,t){var r=t(),o=aG({inst:{value:r,getSnapshot:t}}),n=o[0].inst,a=o[1];return sG(function(){n.value=r,n.getSnapshot=t,ww(n)&&a({inst:n})},[e,r,t]),iG(function(){return ww(n)&&a({inst:n}),e(function(){ww(n)&&a({inst:n})})},[e]),lG(r),r}function ww(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!nG(e,r)}catch{return!0}}function cG(e,t){return t()}var dG=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?cG:uG;nk.useSyncExternalStore=yu.useSyncExternalStore!==void 0?yu.useSyncExternalStore:dG});var sk=rr((Kre,ik)=>{"use strict";ik.exports=ak()});var Q_=rr(we=>{"use strict";var FS=Symbol.for("react.transitional.element"),p9=Symbol.for("react.portal"),m9=Symbol.for("react.fragment"),g9=Symbol.for("react.strict_mode"),h9=Symbol.for("react.profiler"),v9=Symbol.for("react.consumer"),y9=Symbol.for("react.context"),x9=Symbol.for("react.forward_ref"),w9=Symbol.for("react.suspense"),C9=Symbol.for("react.memo"),j_=Symbol.for("react.lazy"),H_=Symbol.iterator;function S9(e){return e===null||typeof e!="object"?null:(e=H_&&e[H_]||e["@@iterator"],typeof e=="function"?e:null)}var q_={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},$_=Object.assign,K_={};function gc(e,t,r){this.props=e,this.context=t,this.refs=K_,this.updater=r||q_}gc.prototype.isReactComponent={};gc.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")};gc.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function X_(){}X_.prototype=gc.prototype;function VS(e,t,r){this.props=e,this.context=t,this.refs=K_,this.updater=r||q_}var BS=VS.prototype=new X_;BS.constructor=VS;$_(BS,gc.prototype);BS.isPureReactComponent=!0;var U_=Array.isArray,ut={H:null,A:null,T:null,S:null,V:null},Y_=Object.prototype.hasOwnProperty;function HS(e,t,r,o,n,a){return r=a.ref,{$$typeof:FS,type:e,key:t,ref:r!==void 0?r:null,props:a}}function b9(e,t){return HS(e.type,t,void 0,void 0,void 0,e.props)}function US(e){return typeof e=="object"&&e!==null&&e.$$typeof===FS}function R9(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var z_=/\/+/g;function OS(e,t){return typeof e=="object"&&e!==null&&e.key!=null?R9(""+e.key):t.toString(36)}function W_(){}function L9(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(W_,W_):(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 mc(e,t,r,o,n){var a=typeof e;(a==="undefined"||a==="boolean")&&(e=null);var i=!1;if(e===null)i=!0;else switch(a){case"bigint":case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case FS:case p9:i=!0;break;case j_:return i=e._init,mc(i(e._payload),t,r,o,n)}}if(i)return n=n(e),i=o===""?"."+OS(e,0):o,U_(n)?(r="",i!=null&&(r=i.replace(z_,"$&/")+"/"),mc(n,t,r,"",function(u){return u})):n!=null&&(US(n)&&(n=b9(n,r+(n.key==null||e&&e.key===n.key?"":(""+n.key).replace(z_,"$&/")+"/")+i)),t.push(n)),1;i=0;var s=o===""?".":o+":";if(U_(e))for(var l=0;l<e.length;l++)o=e[l],a=s+OS(o,l),i+=mc(o,t,r,a,n);else if(l=S9(e),typeof l=="function")for(e=l.call(e),l=0;!(o=e.next()).done;)o=o.value,a=s+OS(o,l++),i+=mc(o,t,r,a,n);else if(a==="object"){if(typeof e.then=="function")return mc(L9(e),t,r,o,n);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 i}function Mv(e,t,r){if(e==null)return e;var o=[],n=0;return mc(e,o,"","",function(a){return t.call(r,a,n++)}),o}function I9(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var G_=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)};function P9(){}we.Children={map:Mv,forEach:function(e,t,r){Mv(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return Mv(e,function(){t++}),t},toArray:function(e){return Mv(e,function(t){return t})||[]},only:function(e){if(!US(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};we.Component=gc;we.Fragment=m9;we.Profiler=h9;we.PureComponent=VS;we.StrictMode=g9;we.Suspense=w9;we.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=ut;we.__COMPILER_RUNTIME={__proto__:null,c:function(e){return ut.H.useMemoCache(e)}};we.cache=function(e){return function(){return e.apply(null,arguments)}};we.cloneElement=function(e,t,r){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var o=$_({},e.props),n=e.key,a=void 0;if(t!=null)for(i in t.ref!==void 0&&(a=void 0),t.key!==void 0&&(n=""+t.key),t)!Y_.call(t,i)||i==="key"||i==="__self"||i==="__source"||i==="ref"&&t.ref===void 0||(o[i]=t[i]);var i=arguments.length-2;if(i===1)o.children=r;else if(1<i){for(var s=Array(i),l=0;l<i;l++)s[l]=arguments[l+2];o.children=s}return HS(e.type,n,void 0,void 0,a,o)};we.createContext=function(e){return e={$$typeof:y9,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:v9,_context:e},e};we.createElement=function(e,t,r){var o,n={},a=null;if(t!=null)for(o in t.key!==void 0&&(a=""+t.key),t)Y_.call(t,o)&&o!=="key"&&o!=="__self"&&o!=="__source"&&(n[o]=t[o]);var i=arguments.length-2;if(i===1)n.children=r;else if(1<i){for(var s=Array(i),l=0;l<i;l++)s[l]=arguments[l+2];n.children=s}if(e&&e.defaultProps)for(o in i=e.defaultProps,i)n[o]===void 0&&(n[o]=i[o]);return HS(e,a,void 0,void 0,null,n)};we.createRef=function(){return{current:null}};we.forwardRef=function(e){return{$$typeof:x9,render:e}};we.isValidElement=US;we.lazy=function(e){return{$$typeof:j_,_payload:{_status:-1,_result:e},_init:I9}};we.memo=function(e,t){return{$$typeof:C9,type:e,compare:t===void 0?null:t}};we.startTransition=function(e){var t=ut.T,r={};ut.T=r;try{var o=e(),n=ut.S;n!==null&&n(r,o),typeof o=="object"&&o!==null&&typeof o.then=="function"&&o.then(P9,G_)}catch(a){G_(a)}finally{ut.T=t}};we.unstable_useCacheRefresh=function(){return ut.H.useCacheRefresh()};we.use=function(e){return ut.H.use(e)};we.useActionState=function(e,t,r){return ut.H.useActionState(e,t,r)};we.useCallback=function(e,t){return ut.H.useCallback(e,t)};we.useContext=function(e){return ut.H.useContext(e)};we.useDebugValue=function(){};we.useDeferredValue=function(e,t){return ut.H.useDeferredValue(e,t)};we.useEffect=function(e,t,r){var o=ut.H;if(typeof r=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return o.useEffect(e,t)};we.useId=function(){return ut.H.useId()};we.useImperativeHandle=function(e,t,r){return ut.H.useImperativeHandle(e,t,r)};we.useInsertionEffect=function(e,t){return ut.H.useInsertionEffect(e,t)};we.useLayoutEffect=function(e,t){return ut.H.useLayoutEffect(e,t)};we.useMemo=function(e,t){return ut.H.useMemo(e,t)};we.useOptimistic=function(e,t){return ut.H.useOptimistic(e,t)};we.useReducer=function(e,t,r){return ut.H.useReducer(e,t,r)};we.useRef=function(e){return ut.H.useRef(e)};we.useState=function(e){return ut.H.useState(e)};we.useSyncExternalStore=function(e,t,r){return ut.H.useSyncExternalStore(e,t,r)};we.useTransition=function(){return ut.H.useTransition()};we.version="19.1.1"});var Pe=rr((kLe,Z_)=>{"use strict";Z_.exports=Q_()});var rO=rr(Ev=>{"use strict";var T9=Symbol.for("react.transitional.element"),k9=Symbol.for("react.fragment");function tO(e,t,r){var o=null;if(r!==void 0&&(o=""+r),t.key!==void 0&&(o=""+t.key),"key"in t){r={};for(var n in t)n!=="key"&&(r[n]=t[n])}else r=t;return t=r.ref,{$$typeof:T9,type:e,key:o,ref:t!==void 0?t:null,props:r}}Ev.Fragment=k9;Ev.jsx=tO;Ev.jsxs=tO});var Sn=rr((NLe,oO)=>{"use strict";oO.exports=rO()});var sO=rr(Dr=>{"use strict";var O9=Pe();function iO(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var r=2;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function $i(){}var Ar={d:{f:$i,r:function(){throw Error(iO(522))},D:$i,C:$i,L:$i,m:$i,X:$i,S:$i,M:$i},p:0,findDOMNode:null},F9=Symbol.for("react.portal");function V9(e,t,r){var o=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:F9,key:o==null?null:""+o,children:e,containerInfo:t,implementation:r}}var cp=O9.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function _v(e,t){if(e==="font")return"";if(typeof t=="string")return t==="use-credentials"?t:""}Dr.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Ar;Dr.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(iO(299));return V9(e,t,null,r)};Dr.flushSync=function(e){var t=cp.T,r=Ar.p;try{if(cp.T=null,Ar.p=2,e)return e()}finally{cp.T=t,Ar.p=r,Ar.d.f()}};Dr.preconnect=function(e,t){typeof e=="string"&&(t?(t=t.crossOrigin,t=typeof t=="string"?t==="use-credentials"?t:"":void 0):t=null,Ar.d.C(e,t))};Dr.prefetchDNS=function(e){typeof e=="string"&&Ar.d.D(e)};Dr.preinit=function(e,t){if(typeof e=="string"&&t&&typeof t.as=="string"){var r=t.as,o=_v(r,t.crossOrigin),n=typeof t.integrity=="string"?t.integrity:void 0,a=typeof t.fetchPriority=="string"?t.fetchPriority:void 0;r==="style"?Ar.d.S(e,typeof t.precedence=="string"?t.precedence:void 0,{crossOrigin:o,integrity:n,fetchPriority:a}):r==="script"&&Ar.d.X(e,{crossOrigin:o,integrity:n,fetchPriority:a,nonce:typeof t.nonce=="string"?t.nonce:void 0})}};Dr.preinitModule=function(e,t){if(typeof e=="string")if(typeof t=="object"&&t!==null){if(t.as==null||t.as==="script"){var r=_v(t.as,t.crossOrigin);Ar.d.M(e,{crossOrigin:r,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0})}}else t==null&&Ar.d.M(e)};Dr.preload=function(e,t){if(typeof e=="string"&&typeof t=="object"&&t!==null&&typeof t.as=="string"){var r=t.as,o=_v(r,t.crossOrigin);Ar.d.L(e,r,{crossOrigin:o,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})}};Dr.preloadModule=function(e,t){if(typeof e=="string")if(t){var r=_v(t.as,t.crossOrigin);Ar.d.m(e,{as:typeof t.as=="string"&&t.as!=="script"?t.as:void 0,crossOrigin:r,integrity:typeof t.integrity=="string"?t.integrity:void 0})}else Ar.d.m(e)};Dr.requestFormReset=function(e){Ar.d.r(e)};Dr.unstable_batchedUpdates=function(e,t){return e(t)};Dr.useFormState=function(e,t,r){return cp.H.useFormState(e,t,r)};Dr.useFormStatus=function(){return cp.H.useHostTransitionStatus()};Dr.version="19.1.1"});var GS=rr((WLe,uO)=>{"use strict";function lO(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(lO)}catch(e){console.error(e)}}lO(),uO.exports=sO()});var Cg=R(E());var jr=R(E(),1);var bo=R(E(),1),Gy=R(M(),1);function zL(e,t){let r=bo.createContext(t),o=a=>{let{children:i,...s}=a,l=bo.useMemo(()=>s,Object.values(s));return(0,Gy.jsx)(r.Provider,{value:l,children:i})};o.displayName=e+"Provider";function n(a){let i=bo.useContext(r);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[o,n]}function Te(e,t=[]){let r=[];function o(a,i){let s=bo.createContext(i),l=r.length;r=[...r,i];let u=d=>{let{scope:f,children:p,...h}=d,m=f?.[e]?.[l]||s,x=bo.useMemo(()=>h,Object.values(h));return(0,Gy.jsx)(m.Provider,{value:x,children:p})};u.displayName=a+"Provider";function c(d,f){let p=f?.[e]?.[l]||s,h=bo.useContext(p);if(h)return h;if(i!==void 0)return i;throw new Error(`\`${d}\` must be used within \`${a}\``)}return[u,c]}let n=()=>{let a=r.map(i=>bo.createContext(i));return function(s){let l=s?.[e]||a;return bo.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return n.scopeName=e,[o,WU(n,...t)]}function WU(...e){let t=e[0];if(e.length===1)return t;let r=()=>{let o=e.map(n=>({useScope:n(),scopeName:n.scopeName}));return function(a){let i=o.reduce((s,{useScope:l,scopeName:u})=>{let d=l(a)[`__scope${u}`];return{...s,...d}},{});return bo.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return r.scopeName=t.scopeName,r}var $a=R(E(),1);var GL=R(E(),1);function WL(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function ls(...e){return t=>{let r=!1,o=e.map(n=>{let a=WL(n,t);return!r&&typeof a=="function"&&(r=!0),a});if(r)return()=>{for(let n=0;n<o.length;n++){let a=o[n];typeof a=="function"?a():WL(e[n],null)}}}}function ne(...e){return GL.useCallback(ls(...e),e)}var Mt=R(E(),1);var Il=R(M(),1);function oo(e){let t=GU(e),r=Mt.forwardRef((o,n)=>{let{children:a,...i}=o,s=Mt.Children.toArray(a),l=s.find(jU);if(l){let u=l.props.children,c=s.map(d=>d===l?Mt.Children.count(u)>1?Mt.Children.only(null):Mt.isValidElement(u)?u.props.children:null:d);return(0,Il.jsx)(t,{...i,ref:n,children:Mt.isValidElement(u)?Mt.cloneElement(u,void 0,c):null})}return(0,Il.jsx)(t,{...i,ref:n,children:a})});return r.displayName=`${e}.Slot`,r}function GU(e){let t=Mt.forwardRef((r,o)=>{let{children:n,...a}=r;if(Mt.isValidElement(n)){let i=$U(n),s=qU(a,n.props);return n.type!==Mt.Fragment&&(s.ref=o?ls(o,i):i),Mt.cloneElement(n,s)}return Mt.Children.count(n)>1?Mt.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var jL=Symbol("radix.slottable");function qL(e){let t=({children:r})=>(0,Il.jsx)(Il.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=jL,t}function jU(e){return Mt.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===jL}function qU(e,t){let r={...t};for(let o in t){let n=e[o],a=t[o];/^on[A-Z]/.test(o)?n&&a?r[o]=(...s)=>{let l=a(...s);return n(...s),l}:n&&(r[o]=n):o==="style"?r[o]={...n,...a}:o==="className"&&(r[o]=[n,a].filter(Boolean).join(" "))}return{...e,...r}}function $U(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Wp=R(M(),1),KU=R(E(),1);var XU=R(M(),1);function En(e){let t=e+"CollectionProvider",[r,o]=Te(t),[n,a]=r(t,{collectionRef:{current:null},itemMap:new Map}),i=m=>{let{scope:x,children:v}=m,g=$a.default.useRef(null),y=$a.default.useRef(new Map).current;return(0,Wp.jsx)(n,{scope:x,itemMap:y,collectionRef:g,children:v})};i.displayName=t;let s=e+"CollectionSlot",l=oo(s),u=$a.default.forwardRef((m,x)=>{let{scope:v,children:g}=m,y=a(s,v),w=ne(x,y.collectionRef);return(0,Wp.jsx)(l,{ref:w,children:g})});u.displayName=s;let c=e+"CollectionItemSlot",d="data-radix-collection-item",f=oo(c),p=$a.default.forwardRef((m,x)=>{let{scope:v,children:g,...y}=m,w=$a.default.useRef(null),C=ne(x,w),b=a(c,v);return $a.default.useEffect(()=>(b.itemMap.set(w,{ref:w,...y}),()=>void b.itemMap.delete(w))),(0,Wp.jsx)(f,{[d]:"",ref:C,children:g})});p.displayName=c;function h(m){let x=a(e+"CollectionConsumer",m);return $a.default.useCallback(()=>{let g=x.collectionRef.current;if(!g)return[];let y=Array.from(g.querySelectorAll(`[${d}]`));return Array.from(x.itemMap.values()).sort((b,S)=>y.indexOf(b.ref.current)-y.indexOf(S.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:i,Slot:u,ItemSlot:p},h,o]}var VZ=!!(typeof window<"u"&&window.document&&window.document.createElement);function H(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(e?.(n),r===!1||!n.defaultPrevented)return t?.(n)}}var Ro=R(E(),1);var $L=R(E(),1),ke=globalThis?.document?$L.useLayoutEffect:()=>{};var Gp=R(E(),1);var YU=Ro[" useInsertionEffect ".trim().toString()]||ke;function ze({prop:e,defaultProp:t,onChange:r=()=>{},caller:o}){let[n,a,i]=QU({defaultProp:t,onChange:r}),s=e!==void 0,l=s?e:n;{let c=Ro.useRef(e!==void 0);Ro.useEffect(()=>{let d=c.current;d!==s&&console.warn(`${o} is changing from ${d?"controlled":"uncontrolled"} to ${s?"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.`),c.current=s},[s,o])}let u=Ro.useCallback(c=>{if(s){let d=ZU(c)?c(e):c;d!==e&&i.current?.(d)}else a(c)},[s,e,a,i]);return[l,u]}function QU({defaultProp:e,onChange:t}){let[r,o]=Ro.useState(e),n=Ro.useRef(r),a=Ro.useRef(t);return YU(()=>{a.current=t},[t]),Ro.useEffect(()=>{n.current!==r&&(a.current?.(r),n.current=r)},[r,n]),[r,o,a]}function ZU(e){return typeof e=="function"}var zZ=Symbol("RADIX:SYNC_STATE");var fT=R(E(),1),pT=R(ru(),1);var mT=R(M(),1),t5=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],$=t5.reduce((e,t)=>{let r=oo(`Primitive.${t}`),o=fT.forwardRef((n,a)=>{let{asChild:i,...s}=n,l=i?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,mT.jsx)(l,{...s,ref:a})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function ou(e,t){e&&pT.flushSync(()=>e.dispatchEvent(t))}var Jt=R(E(),1);var Gr=R(E(),1);var gT=R(E(),1);function r5(e,t){return gT.useReducer((r,o)=>t[r][o]??r,e)}var it=e=>{let{present:t,children:r}=e,o=o5(t),n=typeof r=="function"?r({present:o.isPresent}):Gr.Children.only(r),a=ne(o.ref,n5(n));return typeof r=="function"||o.isPresent?Gr.cloneElement(n,{ref:a}):null};it.displayName="Presence";function o5(e){let[t,r]=Gr.useState(),o=Gr.useRef(null),n=Gr.useRef(e),a=Gr.useRef("none"),i=e?"mounted":"unmounted",[s,l]=r5(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return Gr.useEffect(()=>{let u=cg(o.current);a.current=s==="mounted"?u:"none"},[s]),ke(()=>{let u=o.current,c=n.current;if(c!==e){let f=a.current,p=cg(u);e?l("MOUNT"):p==="none"||u?.display==="none"?l("UNMOUNT"):l(c&&f!==p?"ANIMATION_OUT":"UNMOUNT"),n.current=e}},[e,l]),ke(()=>{if(t){let u,c=t.ownerDocument.defaultView??window,d=p=>{let m=cg(o.current).includes(CSS.escape(p.animationName));if(p.target===t&&m&&(l("ANIMATION_END"),!n.current)){let x=t.style.animationFillMode;t.style.animationFillMode="forwards",u=c.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},f=p=>{p.target===t&&(a.current=cg(o.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{c.clearTimeout(u),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:Gr.useCallback(u=>{o.current=u?getComputedStyle(u):null,r(u)},[])}}function cg(e){return e?.animationName||"none"}function n5(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var nw=R(E(),1);var a5=nw[" useId ".trim().toString()]||(()=>{}),i5=0;function qe(e){let[t,r]=nw.useState(a5());return ke(()=>{e||r(o=>o??String(i5++))},[e]),e||(t?`radix-${t}`:"")}var Rs=R(M(),1),dg="Collapsible",[s5,aw]=Te(dg),[l5,iw]=s5(dg),hT=Jt.forwardRef((e,t)=>{let{__scopeCollapsible:r,open:o,defaultOpen:n,disabled:a,onOpenChange:i,...s}=e,[l,u]=ze({prop:o,defaultProp:n??!1,onChange:i,caller:dg});return(0,Rs.jsx)(l5,{scope:r,disabled:a,contentId:qe(),open:l,onOpenToggle:Jt.useCallback(()=>u(c=>!c),[u]),children:(0,Rs.jsx)($.div,{"data-state":lw(l),"data-disabled":a?"":void 0,...s,ref:t})})});hT.displayName=dg;var vT="CollapsibleTrigger",yT=Jt.forwardRef((e,t)=>{let{__scopeCollapsible:r,...o}=e,n=iw(vT,r);return(0,Rs.jsx)($.button,{type:"button","aria-controls":n.contentId,"aria-expanded":n.open||!1,"data-state":lw(n.open),"data-disabled":n.disabled?"":void 0,disabled:n.disabled,...o,ref:t,onClick:H(e.onClick,n.onOpenToggle)})});yT.displayName=vT;var sw="CollapsibleContent",xT=Jt.forwardRef((e,t)=>{let{forceMount:r,...o}=e,n=iw(sw,e.__scopeCollapsible);return(0,Rs.jsx)(it,{present:r||n.open,children:({present:a})=>(0,Rs.jsx)(u5,{...o,ref:t,present:a})})});xT.displayName=sw;var u5=Jt.forwardRef((e,t)=>{let{__scopeCollapsible:r,present:o,children:n,...a}=e,i=iw(sw,r),[s,l]=Jt.useState(o),u=Jt.useRef(null),c=ne(t,u),d=Jt.useRef(0),f=d.current,p=Jt.useRef(0),h=p.current,m=i.open||s,x=Jt.useRef(m),v=Jt.useRef(void 0);return Jt.useEffect(()=>{let g=requestAnimationFrame(()=>x.current=!1);return()=>cancelAnimationFrame(g)},[]),ke(()=>{let g=u.current;if(g){v.current=v.current||{transitionDuration:g.style.transitionDuration,animationName:g.style.animationName},g.style.transitionDuration="0s",g.style.animationName="none";let y=g.getBoundingClientRect();d.current=y.height,p.current=y.width,x.current||(g.style.transitionDuration=v.current.transitionDuration,g.style.animationName=v.current.animationName),l(o)}},[i.open,o]),(0,Rs.jsx)($.div,{"data-state":lw(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!m,...a,ref:c,style:{"--radix-collapsible-content-height":f?`${f}px`:void 0,"--radix-collapsible-content-width":h?`${h}px`:void 0,...e.style},children:m&&n})});function lw(e){return e?"open":"closed"}var fg=hT,nu=yT,Ld=xT;var pg=R(E(),1),c5=R(M(),1),d5=pg.createContext(void 0);function Vn(e){let t=pg.useContext(d5);return e||t||"ltr"}var Dt=R(M(),1),nn="Accordion",f5=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[cw,p5,m5]=En(nn),[gg,xJ]=Te(nn,[m5,aw]),dw=aw(),CT=jr.default.forwardRef((e,t)=>{let{type:r,...o}=e,n=o,a=o;return(0,Dt.jsx)(cw.Provider,{scope:e.__scopeAccordion,children:r==="multiple"?(0,Dt.jsx)(y5,{...a,ref:t}):(0,Dt.jsx)(v5,{...n,ref:t})})});CT.displayName=nn;var[ST,g5]=gg(nn),[bT,h5]=gg(nn,{collapsible:!1}),v5=jr.default.forwardRef((e,t)=>{let{value:r,defaultValue:o,onValueChange:n=()=>{},collapsible:a=!1,...i}=e,[s,l]=ze({prop:r,defaultProp:o??"",onChange:n,caller:nn});return(0,Dt.jsx)(ST,{scope:e.__scopeAccordion,value:jr.default.useMemo(()=>s?[s]:[],[s]),onItemOpen:l,onItemClose:jr.default.useCallback(()=>a&&l(""),[a,l]),children:(0,Dt.jsx)(bT,{scope:e.__scopeAccordion,collapsible:a,children:(0,Dt.jsx)(RT,{...i,ref:t})})})}),y5=jr.default.forwardRef((e,t)=>{let{value:r,defaultValue:o,onValueChange:n=()=>{},...a}=e,[i,s]=ze({prop:r,defaultProp:o??[],onChange:n,caller:nn}),l=jr.default.useCallback(c=>s((d=[])=>[...d,c]),[s]),u=jr.default.useCallback(c=>s((d=[])=>d.filter(f=>f!==c)),[s]);return(0,Dt.jsx)(ST,{scope:e.__scopeAccordion,value:i,onItemOpen:l,onItemClose:u,children:(0,Dt.jsx)(bT,{scope:e.__scopeAccordion,collapsible:!0,children:(0,Dt.jsx)(RT,{...a,ref:t})})})}),[x5,hg]=gg(nn),RT=jr.default.forwardRef((e,t)=>{let{__scopeAccordion:r,disabled:o,dir:n,orientation:a="vertical",...i}=e,s=jr.default.useRef(null),l=ne(s,t),u=p5(r),d=Vn(n)==="ltr",f=H(e.onKeyDown,p=>{if(!f5.includes(p.key))return;let h=p.target,m=u().filter(L=>!L.ref.current?.disabled),x=m.findIndex(L=>L.ref.current===h),v=m.length;if(x===-1)return;p.preventDefault();let g=x,y=0,w=v-1,C=()=>{g=x+1,g>w&&(g=y)},b=()=>{g=x-1,g<y&&(g=w)};switch(p.key){case"Home":g=y;break;case"End":g=w;break;case"ArrowRight":a==="horizontal"&&(d?C():b());break;case"ArrowDown":a==="vertical"&&C();break;case"ArrowLeft":a==="horizontal"&&(d?b():C());break;case"ArrowUp":a==="vertical"&&b();break}let S=g%v;m[S].ref.current?.focus()});return(0,Dt.jsx)(x5,{scope:r,disabled:o,direction:n,orientation:a,children:(0,Dt.jsx)(cw.Slot,{scope:r,children:(0,Dt.jsx)($.div,{...i,"data-orientation":a,ref:l,onKeyDown:o?void 0:f})})})}),mg="AccordionItem",[w5,fw]=gg(mg),LT=jr.default.forwardRef((e,t)=>{let{__scopeAccordion:r,value:o,...n}=e,a=hg(mg,r),i=g5(mg,r),s=dw(r),l=qe(),u=o&&i.value.includes(o)||!1,c=a.disabled||e.disabled;return(0,Dt.jsx)(w5,{scope:r,open:u,disabled:c,triggerId:l,children:(0,Dt.jsx)(fg,{"data-orientation":a.orientation,"data-state":ET(u),...s,...n,ref:t,disabled:c,open:u,onOpenChange:d=>{d?i.onItemOpen(o):i.onItemClose(o)}})})});LT.displayName=mg;var IT="AccordionHeader",PT=jr.default.forwardRef((e,t)=>{let{__scopeAccordion:r,...o}=e,n=hg(nn,r),a=fw(IT,r);return(0,Dt.jsx)($.h3,{"data-orientation":n.orientation,"data-state":ET(a.open),"data-disabled":a.disabled?"":void 0,...o,ref:t})});PT.displayName=IT;var uw="AccordionTrigger",TT=jr.default.forwardRef((e,t)=>{let{__scopeAccordion:r,...o}=e,n=hg(nn,r),a=fw(uw,r),i=h5(uw,r),s=dw(r);return(0,Dt.jsx)(cw.ItemSlot,{scope:r,children:(0,Dt.jsx)(nu,{"aria-disabled":a.open&&!i.collapsible||void 0,"data-orientation":n.orientation,id:a.triggerId,...s,...o,ref:t})})});TT.displayName=uw;var kT="AccordionContent",MT=jr.default.forwardRef((e,t)=>{let{__scopeAccordion:r,...o}=e,n=hg(nn,r),a=fw(kT,r),i=dw(r);return(0,Dt.jsx)(Ld,{role:"region","aria-labelledby":a.triggerId,"data-orientation":n.orientation,...i,...o,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});MT.displayName=kT;function ET(e){return e?"open":"closed"}var AT=CT,DT=LT,NT=PT,pw=TT,mw=MT;var yg=R(E());var _T=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),S5=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,o)=>o?o.toUpperCase():r.toLowerCase()),gw=e=>{let t=S5(e);return t.charAt(0).toUpperCase()+t.slice(1)},vg=(...e)=>e.filter((t,r,o)=>!!t&&t.trim()!==""&&o.indexOf(t)===r).join(" ").trim(),OT=e=>{for(let t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var Id=R(E());var FT={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"};var VT=(0,Id.forwardRef)(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:o,className:n="",children:a,iconNode:i,...s},l)=>(0,Id.createElement)("svg",{ref:l,...FT,width:t,height:t,stroke:e,strokeWidth:o?Number(r)*24/Number(t):r,className:vg("lucide",n),...!a&&!OT(s)&&{"aria-hidden":"true"},...s},[...i.map(([u,c])=>(0,Id.createElement)(u,c)),...Array.isArray(a)?a:[a]]));var F=(e,t)=>{let r=(0,yg.forwardRef)(({className:o,...n},a)=>(0,yg.createElement)(VT,{ref:a,iconNode:t,className:vg(`lucide-${_T(gw(e))}`,`lucide-${e}`,o),...n}));return r.displayName=gw(e),r};var b5=[["path",{d:"M17 12H7",key:"16if0g"}],["path",{d:"M19 18H5",key:"18s9l3"}],["path",{d:"M21 6H3",key:"1jwq7v"}]],Pd=F("align-center",b5);var R5=[["path",{d:"M3 12h18",key:"1i2n21"}],["path",{d:"M3 18h18",key:"1h113x"}],["path",{d:"M3 6h18",key:"d0wm0j"}]],Td=F("align-justify",R5);var L5=[["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M17 18H3",key:"1amg6g"}],["path",{d:"M21 6H3",key:"1jwq7v"}]],kd=F("align-left",L5);var I5=[["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M21 18H7",key:"1ygte8"}],["path",{d:"M21 6H3",key:"1jwq7v"}]],Md=F("align-right",I5);var P5=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],au=F("arrow-down",P5);var T5=[["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"}]],iu=F("arrow-up-down",T5);var k5=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],su=F("arrow-up",k5);var M5=[["path",{d:"M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8",key:"mg9rjx"}]],Ed=F("bold",M5);var E5=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],Ls=F("calendar",E5);var A5=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],lr=F("check",A5);var D5=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Bn=F("chevron-down",D5);var N5=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],an=F("chevron-left",N5);var _5=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Pr=F("chevron-right",_5);var O5=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Ad=F("chevron-up",O5);var F5=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],sn=F("circle-alert",F5);var V5=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],gi=F("circle-check-big",V5);var B5=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Is=F("circle",B5);var H5=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Dd=F("clock",H5);var U5=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],Nd=F("code",U5);var z5=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],_d=F("copy",z5);var W5=[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]],Od=F("credit-card",W5);var G5=[["path",{d:"M11.562 3.266a.5.5 0 0 1 .876 0L15.39 8.87a1 1 0 0 0 1.516.294L21.183 5.5a.5.5 0 0 1 .798.519l-2.834 10.246a1 1 0 0 1-.956.734H5.81a1 1 0 0 1-.957-.734L2.02 6.02a.5.5 0 0 1 .798-.519l4.276 3.664a1 1 0 0 0 1.516-.294z",key:"1vdc57"}],["path",{d:"M5 21h14",key:"11awu3"}]],lu=F("crown",G5);var j5=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],Hn=F("ellipsis",j5);var q5=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],Fd=F("external-link",q5);var $5=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Ps=F("eye",$5);var K5=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],Vd=F("file-text",K5);var X5=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]],Bd=F("file",X5);var Y5=[["circle",{cx:"12",cy:"18",r:"3",key:"1mpf1b"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["path",{d:"M18 9v2c0 .6-.4 1-1 1H7c-.6 0-1-.4-1-1V9",key:"1uq4wg"}],["path",{d:"M12 12v3",key:"158kv8"}]],Hd=F("git-fork",Y5);var Q5=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],Ts=F("image",Q5);var Z5=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],uu=F("info",Z5);var J5=[["line",{x1:"19",x2:"10",y1:"4",y2:"4",key:"15jd3p"}],["line",{x1:"14",x2:"5",y1:"20",y2:"20",key:"bu0au3"}],["line",{x1:"15",x2:"9",y1:"4",y2:"20",key:"uljnxc"}]],Ud=F("italic",J5);var eW=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]],zd=F("link",eW);var tW=[["path",{d:"M10 12h11",key:"6m4ad9"}],["path",{d:"M10 18h11",key:"11hvi2"}],["path",{d:"M10 6h11",key:"c7qv1k"}],["path",{d:"M4 10h2",key:"16xx2s"}],["path",{d:"M4 6h1v4",key:"cnovpq"}],["path",{d:"M6 18H4c0-1 2-2 2-3s-1-1.5-2-1",key:"m9a95d"}]],Wd=F("list-ordered",tW);var rW=[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]],Gd=F("list",rW);var oW=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Nt=F("loader-circle",oW);var nW=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]],cu=F("lock",nW);var aW=[["path",{d:"M5 12h14",key:"1ays0h"}]],jd=F("minus",aW);var iW=[["path",{d:"M9 18V5l12-2v13",key:"1jmyc2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["circle",{cx:"18",cy:"16",r:"3",key:"1hluhg"}]],qd=F("music",iW);var sW=[["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"}]],du=F("palette",sW);var lW=[["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]],$d=F("phone",lW);var uW=[["path",{d:"m12 9-8.414 8.414A2 2 0 0 0 3 18.828v1.344a2 2 0 0 1-.586 1.414A2 2 0 0 1 3.828 21h1.344a2 2 0 0 0 1.414-.586L15 12",key:"1y3wsu"}],["path",{d:"m18 9 .4.4a1 1 0 1 1-3 3l-3.8-3.8a1 1 0 1 1 3-3l.4.4 3.4-3.4a1 1 0 1 1 3 3z",key:"110lr1"}],["path",{d:"m2 22 .414-.414",key:"jhxm08"}]],xg=F("pipette",uW);var cW=[["path",{d:"M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"rib7q0"}],["path",{d:"M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"1ymkrd"}]],Kd=F("quote",cW);var dW=[["path",{d:"M21 7v6h-6",key:"3ptur4"}],["path",{d:"M3 17a9 9 0 0 1 9-9 9 9 0 0 1 6 2.3l3 2.7",key:"1kgawr"}]],Xd=F("redo",dW);var fW=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],ks=F("search",fW);var pW=[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],qr=F("square-pen",pW);var mW=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],fu=F("star",mW);var gW=[["path",{d:"M16 4H9a3 3 0 0 0-2.83 4",key:"43sutm"}],["path",{d:"M14 12a4 4 0 0 1 0 8H6",key:"nlfj13"}],["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}]],Yd=F("strikethrough",gW);var hW=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],hi=F("triangle-alert",hW);var vW=[["path",{d:"M6 4v6a6 6 0 0 0 12 0V4",key:"9kb039"}],["line",{x1:"4",x2:"20",y1:"20",y2:"20",key:"nun2al"}]],Qd=F("underline",vW);var yW=[["path",{d:"M3 7v6h6",key:"1v2h90"}],["path",{d:"M21 17a9 9 0 0 0-9-9 9 9 0 0 0-6 2.3L3 13",key:"1r6uu6"}]],Zd=F("undo",yW);var xW=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],Jd=F("upload",xW);var wW=[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]],ef=F("video",wW);var CW=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],co=F("x",CW);var SW=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],pu=F("zap",SW);function BT(e){var t,r,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var n=e.length;for(t=0;t<n;t++)e[t]&&(r=BT(e[t]))&&(o&&(o+=" "),o+=r)}else for(r in e)e[r]&&(o&&(o+=" "),o+=r);return o}function wg(){for(var e,t,r=0,o="",n=arguments.length;r<n;r++)(e=arguments[r])&&(t=BT(e))&&(o&&(o+=" "),o+=t);return o}var yw="-",bW=e=>{let t=LW(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:i=>{let s=i.split(yw);return s[0]===""&&s.length!==1&&s.shift(),zT(s,t)||RW(i)},getConflictingClassGroupIds:(i,s)=>{let l=r[i]||[];return s&&o[i]?[...l,...o[i]]:l}}},zT=(e,t)=>{if(e.length===0)return t.classGroupId;let r=e[0],o=t.nextPart.get(r),n=o?zT(e.slice(1),o):void 0;if(n)return n;if(t.validators.length===0)return;let a=e.join(yw);return t.validators.find(({validator:i})=>i(a))?.classGroupId},HT=/^\[(.+)\]$/,RW=e=>{if(HT.test(e)){let t=HT.exec(e)[1],r=t?.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},LW=e=>{let{theme:t,prefix:r}=e,o={nextPart:new Map,validators:[]};return PW(Object.entries(e.classGroups),r).forEach(([a,i])=>{vw(i,o,a,t)}),o},vw=(e,t,r,o)=>{e.forEach(n=>{if(typeof n=="string"){let a=n===""?t:UT(t,n);a.classGroupId=r;return}if(typeof n=="function"){if(IW(n)){vw(n(o),t,r,o);return}t.validators.push({validator:n,classGroupId:r});return}Object.entries(n).forEach(([a,i])=>{vw(i,UT(t,a),r,o)})})},UT=(e,t)=>{let r=e;return t.split(yw).forEach(o=>{r.nextPart.has(o)||r.nextPart.set(o,{nextPart:new Map,validators:[]}),r=r.nextPart.get(o)}),r},IW=e=>e.isThemeGetter,PW=(e,t)=>t?e.map(([r,o])=>{let n=o.map(a=>typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([i,s])=>[t+i,s])):a);return[r,n]}):e,TW=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,o=new Map,n=(a,i)=>{r.set(a,i),t++,t>e&&(t=0,o=r,r=new Map)};return{get(a){let i=r.get(a);if(i!==void 0)return i;if((i=o.get(a))!==void 0)return n(a,i),i},set(a,i){r.has(a)?r.set(a,i):n(a,i)}}},WT="!",kW=e=>{let{separator:t,experimentalParseClassName:r}=e,o=t.length===1,n=t[0],a=t.length,i=s=>{let l=[],u=0,c=0,d;for(let x=0;x<s.length;x++){let v=s[x];if(u===0){if(v===n&&(o||s.slice(x,x+a)===t)){l.push(s.slice(c,x)),c=x+a;continue}if(v==="/"){d=x;continue}}v==="["?u++:v==="]"&&u--}let f=l.length===0?s:s.substring(c),p=f.startsWith(WT),h=p?f.substring(1):f,m=d&&d>c?d-c:void 0;return{modifiers:l,hasImportantModifier:p,baseClassName:h,maybePostfixModifierPosition:m}};return r?s=>r({className:s,parseClassName:i}):i},MW=e=>{if(e.length<=1)return e;let t=[],r=[];return e.forEach(o=>{o[0]==="["?(t.push(...r.sort(),o),r=[]):r.push(o)}),t.push(...r.sort()),t},EW=e=>({cache:TW(e.cacheSize),parseClassName:kW(e),...bW(e)}),AW=/\s+/,DW=(e,t)=>{let{parseClassName:r,getClassGroupId:o,getConflictingClassGroupIds:n}=t,a=[],i=e.trim().split(AW),s="";for(let l=i.length-1;l>=0;l-=1){let u=i[l],{modifiers:c,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:p}=r(u),h=!!p,m=o(h?f.substring(0,p):f);if(!m){if(!h){s=u+(s.length>0?" "+s:s);continue}if(m=o(f),!m){s=u+(s.length>0?" "+s:s);continue}h=!1}let x=MW(c).join(":"),v=d?x+WT:x,g=v+m;if(a.includes(g))continue;a.push(g);let y=n(m,h);for(let w=0;w<y.length;++w){let C=y[w];a.push(v+C)}s=u+(s.length>0?" "+s:s)}return s};function NW(){let e=0,t,r,o="";for(;e<arguments.length;)(t=arguments[e++])&&(r=GT(t))&&(o&&(o+=" "),o+=r);return o}var GT=e=>{if(typeof e=="string")return e;let t,r="";for(let o=0;o<e.length;o++)e[o]&&(t=GT(e[o]))&&(r&&(r+=" "),r+=t);return r};function _W(e,...t){let r,o,n,a=i;function i(l){let u=t.reduce((c,d)=>d(c),e());return r=EW(u),o=r.cache.get,n=r.cache.set,a=s,s(l)}function s(l){let u=o(l);if(u)return u;let c=DW(l,r);return n(l,c),c}return function(){return a(NW.apply(null,arguments))}}var Je=e=>{let t=r=>r[e]||[];return t.isThemeGetter=!0,t},jT=/^\[(?:([a-z-]+):)?(.+)\]$/i,OW=/^\d+\/\d+$/,FW=new Set(["px","full","screen"]),VW=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,BW=/\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$/,HW=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,UW=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,zW=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ma=e=>mu(e)||FW.has(e)||OW.test(e),vi=e=>gu(e,"length",YW),mu=e=>!!e&&!Number.isNaN(Number(e)),hw=e=>gu(e,"number",mu),tf=e=>!!e&&Number.isInteger(Number(e)),WW=e=>e.endsWith("%")&&mu(e.slice(0,-1)),ye=e=>jT.test(e),yi=e=>VW.test(e),GW=new Set(["length","size","percentage"]),jW=e=>gu(e,GW,qT),qW=e=>gu(e,"position",qT),$W=new Set(["image","url"]),KW=e=>gu(e,$W,ZW),XW=e=>gu(e,"",QW),rf=()=>!0,gu=(e,t,r)=>{let o=jT.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):r(o[2]):!1},YW=e=>BW.test(e)&&!HW.test(e),qT=()=>!1,QW=e=>UW.test(e),ZW=e=>zW.test(e);var JW=()=>{let e=Je("colors"),t=Je("spacing"),r=Je("blur"),o=Je("brightness"),n=Je("borderColor"),a=Je("borderRadius"),i=Je("borderSpacing"),s=Je("borderWidth"),l=Je("contrast"),u=Je("grayscale"),c=Je("hueRotate"),d=Je("invert"),f=Je("gap"),p=Je("gradientColorStops"),h=Je("gradientColorStopPositions"),m=Je("inset"),x=Je("margin"),v=Je("opacity"),g=Je("padding"),y=Je("saturate"),w=Je("scale"),C=Je("sepia"),b=Je("skew"),S=Je("space"),L=Je("translate"),T=()=>["auto","contain","none"],P=()=>["auto","hidden","clip","visible","scroll"],A=()=>["auto",ye,t],_=()=>[ye,t],G=()=>["",ma,vi],D=()=>["auto",mu,ye],W=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],N=()=>["solid","dashed","dotted","double","none"],z=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],V=()=>["start","end","center","between","around","evenly","stretch"],k=()=>["","0",ye],Z=()=>["auto","avoid","all","avoid-page","page","left","right","column"],ve=()=>[mu,ye];return{cacheSize:500,separator:":",theme:{colors:[rf],spacing:[ma,vi],blur:["none","",yi,ye],brightness:ve(),borderColor:[e],borderRadius:["none","","full",yi,ye],borderSpacing:_(),borderWidth:G(),contrast:ve(),grayscale:k(),hueRotate:ve(),invert:k(),gap:_(),gradientColorStops:[e],gradientColorStopPositions:[WW,vi],inset:A(),margin:A(),opacity:ve(),padding:_(),saturate:ve(),scale:ve(),sepia:k(),skew:ve(),space:_(),translate:_()},classGroups:{aspect:[{aspect:["auto","square","video",ye]}],container:["container"],columns:[{columns:[yi]}],"break-after":[{"break-after":Z()}],"break-before":[{"break-before":Z()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...W(),ye]}],overflow:[{overflow:P()}],"overflow-x":[{"overflow-x":P()}],"overflow-y":[{"overflow-y":P()}],overscroll:[{overscroll:T()}],"overscroll-x":[{"overscroll-x":T()}],"overscroll-y":[{"overscroll-y":T()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",tf,ye]}],basis:[{basis:A()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ye]}],grow:[{grow:k()}],shrink:[{shrink:k()}],order:[{order:["first","last","none",tf,ye]}],"grid-cols":[{"grid-cols":[rf]}],"col-start-end":[{col:["auto",{span:["full",tf,ye]},ye]}],"col-start":[{"col-start":D()}],"col-end":[{"col-end":D()}],"grid-rows":[{"grid-rows":[rf]}],"row-start-end":[{row:["auto",{span:[tf,ye]},ye]}],"row-start":[{"row-start":D()}],"row-end":[{"row-end":D()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ye]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ye]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...V()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...V(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...V(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[g]}],px:[{px:[g]}],py:[{py:[g]}],ps:[{ps:[g]}],pe:[{pe:[g]}],pt:[{pt:[g]}],pr:[{pr:[g]}],pb:[{pb:[g]}],pl:[{pl:[g]}],m:[{m:[x]}],mx:[{mx:[x]}],my:[{my:[x]}],ms:[{ms:[x]}],me:[{me:[x]}],mt:[{mt:[x]}],mr:[{mr:[x]}],mb:[{mb:[x]}],ml:[{ml:[x]}],"space-x":[{"space-x":[S]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[S]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ye,t]}],"min-w":[{"min-w":[ye,t,"min","max","fit"]}],"max-w":[{"max-w":[ye,t,"none","full","min","max","fit","prose",{screen:[yi]},yi]}],h:[{h:[ye,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ye,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ye,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ye,t,"auto","min","max","fit"]}],"font-size":[{text:["base",yi,vi]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",hw]}],"font-family":[{font:[rf]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",ye]}],"line-clamp":[{"line-clamp":["none",mu,hw]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",ma,ye]}],"list-image":[{"list-image":["none",ye]}],"list-style-type":[{list:["none","disc","decimal",ye]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...N(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",ma,vi]}],"underline-offset":[{"underline-offset":["auto",ma,ye]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:_()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ye]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ye]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...W(),qW]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",jW]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},KW]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[h]}],"gradient-via-pos":[{via:[h]}],"gradient-to-pos":[{to:[h]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[v]}],"border-style":[{border:[...N(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[v]}],"divide-style":[{divide:N()}],"border-color":[{border:[n]}],"border-color-x":[{"border-x":[n]}],"border-color-y":[{"border-y":[n]}],"border-color-s":[{"border-s":[n]}],"border-color-e":[{"border-e":[n]}],"border-color-t":[{"border-t":[n]}],"border-color-r":[{"border-r":[n]}],"border-color-b":[{"border-b":[n]}],"border-color-l":[{"border-l":[n]}],"divide-color":[{divide:[n]}],"outline-style":[{outline:["",...N()]}],"outline-offset":[{"outline-offset":[ma,ye]}],"outline-w":[{outline:[ma,vi]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:G()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[ma,vi]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",yi,XW]}],"shadow-color":[{shadow:[rf]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":[...z(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":z()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[o]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",yi,ye]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[d]}],saturate:[{saturate:[y]}],sepia:[{sepia:[C]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[y]}],"backdrop-sepia":[{"backdrop-sepia":[C]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ye]}],duration:[{duration:ve()}],ease:[{ease:["linear","in","out","in-out",ye]}],delay:[{delay:ve()}],animate:[{animate:["none","spin","ping","pulse","bounce",ye]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[w]}],"scale-x":[{"scale-x":[w]}],"scale-y":[{"scale-y":[w]}],rotate:[{rotate:[tf,ye]}],"translate-x":[{"translate-x":[L]}],"translate-y":[{"translate-y":[L]}],"skew-x":[{"skew-x":[b]}],"skew-y":[{"skew-y":[b]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ye]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ye]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":_()}],"scroll-mx":[{"scroll-mx":_()}],"scroll-my":[{"scroll-my":_()}],"scroll-ms":[{"scroll-ms":_()}],"scroll-me":[{"scroll-me":_()}],"scroll-mt":[{"scroll-mt":_()}],"scroll-mr":[{"scroll-mr":_()}],"scroll-mb":[{"scroll-mb":_()}],"scroll-ml":[{"scroll-ml":_()}],"scroll-p":[{"scroll-p":_()}],"scroll-px":[{"scroll-px":_()}],"scroll-py":[{"scroll-py":_()}],"scroll-ps":[{"scroll-ps":_()}],"scroll-pe":[{"scroll-pe":_()}],"scroll-pt":[{"scroll-pt":_()}],"scroll-pr":[{"scroll-pr":_()}],"scroll-pb":[{"scroll-pb":_()}],"scroll-pl":[{"scroll-pl":_()}],"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",ye]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[ma,vi,hw]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var $T=_W(JW);function I(...e){return $T(wg(e))}var xi=R(M()),eG=AT,KT=Cg.forwardRef(({className:e,...t},r)=>(0,xi.jsx)(DT,{ref:r,className:I("moonui-theme","border-b border-gray-200 dark:border-gray-800",e),...t}));KT.displayName="AccordionItem";var XT=Cg.forwardRef(({className:e,children:t,...r},o)=>(0,xi.jsx)(NT,{className:"flex",children:(0,xi.jsxs)(pw,{ref:o,className:I("flex flex-1 items-center justify-between py-4 font-medium transition-all dark:text-gray-100","hover:underline hover:text-primary dark:hover:text-primary-400","[&[data-state=open]>svg]:rotate-180",e),...r,children:[t,(0,xi.jsx)(Bn,{className:"h-4 w-4 shrink-0 transition-transform duration-200 opacity-70 group-hover:opacity-100"})]})}));XT.displayName=pw.displayName;var YT=Cg.forwardRef(({className:e,children:t,...r},o)=>(0,xi.jsx)(mw,{ref:o,className:I("overflow-hidden text-sm text-gray-700 dark:text-gray-300 transition-all","data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",e),...r,children:(0,xi.jsx)("div",{className:"pb-4 pt-0",children:t})}));YT.displayName=mw.displayName;var hu=R(E());var QT=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,ZT=wg,ee=(e,t)=>r=>{var o;if(t?.variants==null)return ZT(e,r?.class,r?.className);let{variants:n,defaultVariants:a}=t,i=Object.keys(n).map(u=>{let c=r?.[u],d=a?.[u];if(c===null)return null;let f=QT(c)||QT(d);return n[u][f]}),s=r&&Object.entries(r).reduce((u,c)=>{let[d,f]=c;return f===void 0||(u[d]=f),u},{}),l=t==null||(o=t.compoundVariants)===null||o===void 0?void 0:o.reduce((u,c)=>{let{class:d,className:f,...p}=c;return Object.entries(p).every(h=>{let[m,x]=h;return Array.isArray(x)?x.includes({...a,...s}[m]):{...a,...s}[m]===x})?[...u,d,f]:u},[]);return ZT(e,i,l,r?.class,r?.className)};var ga=R(M()),tG=ee("relative w-full flex items-center gap-3 p-4 border text-foreground [&>svg]:shrink-0",{variants:{variant:{default:"bg-background text-foreground border-border",primary:"bg-primary/10 text-primary border-primary/30",success:"bg-success/10 text-success border-success/30",warning:"bg-warning/10 text-warning border-warning/30",error:"bg-destructive/10 text-destructive border-destructive/30",info:"bg-blue-500/10 text-blue-500 border-blue-500/30"},size:{sm:"py-2 text-xs",default:"py-3 text-sm",lg:"py-4 text-base"},radius:{none:"rounded-none",sm:"rounded-sm",default:"rounded-md",lg:"rounded-lg",full:"rounded-full"},withClose:{true:"pr-10"}},defaultVariants:{variant:"default",size:"default",radius:"default",withClose:!1}}),JT=hu.forwardRef(({className:e,variant:t="default",size:r,radius:o,hideIcon:n=!1,closable:a=!1,onClose:i,children:s,...l},u)=>{let c=hu.useMemo(()=>{switch(t){case"success":return lr;case"warning":return hi;case"error":return sn;case"info":return uu;default:return uu}},[t]);return(0,ga.jsxs)("div",{ref:u,role:"alert",className:I("moonui-theme",tG({variant:t,size:r,radius:o,withClose:a}),e),...l,children:[!n&&(0,ga.jsx)(c,{className:"h-5 w-5"}),(0,ga.jsx)("div",{className:"flex-1",children:s}),a&&i&&(0,ga.jsx)("button",{onClick:i,className:"absolute right-3 top-3 inline-flex h-6 w-6 items-center justify-center rounded-full opacity-70 transition-opacity hover:opacity-100","aria-label":"Kapat",children:(0,ga.jsx)(co,{className:"h-4 w-4"})})]})});JT.displayName="Alert";var ek=hu.forwardRef(({className:e,...t},r)=>(0,ga.jsx)("h5",{ref:r,className:I("moonui-theme","font-semibold leading-tight tracking-tight mb-1",e),...t}));ek.displayName="AlertTitle";var tk=hu.forwardRef(({className:e,...t},r)=>(0,ga.jsx)("div",{ref:r,className:I("moonui-theme","text-sm leading-5 text-muted-foreground",e),...t}));tk.displayName="AlertDescription";var rk=R(E());var xw=R(M()),rG=ee("relative overflow-hidden",{variants:{variant:{default:"rounded-md bg-muted/10",ghost:"bg-transparent",outline:"rounded-md border border-border",card:"rounded-md bg-card shadow-sm"},radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{variant:"default"}}),ok=rk.forwardRef(({className:e,variant:t,radius:r,ratio:o=16/9,style:n,children:a,...i},s)=>(0,xw.jsx)("div",{ref:s,className:I("moonui-theme",rG({variant:t,radius:r}),e),style:{position:"relative",paddingBottom:`${1/o*100}%`,...n},...i,children:(0,xw.jsx)("div",{className:"absolute inset-0",children:a})}));ok.displayName="AspectRatio";var nf=R(E());var Ao=R(E(),1);var vu=R(E(),1);function et(e){let t=vu.useRef(e);return vu.useEffect(()=>{t.current=e}),vu.useMemo(()=>(...r)=>t.current?.(...r),[])}var lk=R(sk(),1);function uk(){return(0,lk.useSyncExternalStore)(fG,()=>!0,()=>!1)}function fG(){return()=>{}}var of=R(M(),1),Cw="Avatar",[pG,toe]=Te(Cw),[mG,dk]=pG(Cw),fk=Ao.forwardRef((e,t)=>{let{__scopeAvatar:r,...o}=e,[n,a]=Ao.useState("idle");return(0,of.jsx)(mG,{scope:r,imageLoadingStatus:n,onImageLoadingStatusChange:a,children:(0,of.jsx)($.span,{...o,ref:t})})});fk.displayName=Cw;var pk="AvatarImage",mk=Ao.forwardRef((e,t)=>{let{__scopeAvatar:r,src:o,onLoadingStatusChange:n=()=>{},...a}=e,i=dk(pk,r),s=gG(o,a),l=et(u=>{n(u),i.onImageLoadingStatusChange(u)});return ke(()=>{s!=="idle"&&l(s)},[s,l]),s==="loaded"?(0,of.jsx)($.img,{...a,ref:t,src:o}):null});mk.displayName=pk;var gk="AvatarFallback",hk=Ao.forwardRef((e,t)=>{let{__scopeAvatar:r,delayMs:o,...n}=e,a=dk(gk,r),[i,s]=Ao.useState(o===void 0);return Ao.useEffect(()=>{if(o!==void 0){let l=window.setTimeout(()=>s(!0),o);return()=>window.clearTimeout(l)}},[o]),i&&a.imageLoadingStatus!=="loaded"?(0,of.jsx)($.span,{...n,ref:t}):null});hk.displayName=gk;function ck(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function gG(e,{referrerPolicy:t,crossOrigin:r}){let o=uk(),n=Ao.useRef(null),a=(()=>o?(n.current||(n.current=new window.Image),n.current):null)(),[i,s]=Ao.useState(()=>ck(a,e));return ke(()=>{s(ck(a,e))},[a,e]),ke(()=>{let l=d=>()=>{s(d)};if(!a)return;let u=l("loaded"),c=l("error");return a.addEventListener("load",u),a.addEventListener("error",c),t&&(a.referrerPolicy=t),typeof r=="string"&&(a.crossOrigin=r),()=>{a.removeEventListener("load",u),a.removeEventListener("error",c)}},[a,r,t]),i}var Sw=fk,bw=mk,Rw=hk;var ln=R(M()),vG=ee("relative flex shrink-0 overflow-hidden",{variants:{size:{default:"h-10 w-10",xs:"h-6 w-6",sm:"h-8 w-8",md:"h-10 w-10",lg:"h-12 w-12",xl:"h-16 w-16","2xl":"h-20 w-20"},radius:{default:"rounded-full",sm:"rounded-md",lg:"rounded-xl",full:"rounded-full",none:"rounded-none"},variant:{default:"",ring:"ring-2 ring-border",ringOffset:"ring-2 ring-border ring-offset-2 ring-offset-background",border:"border-2 border-border"}},defaultVariants:{size:"default",radius:"default",variant:"default"}}),Lw=nf.forwardRef(({className:e,size:t,radius:r,variant:o,...n},a)=>(0,ln.jsx)(Sw,{ref:a,className:I("moonui-theme",vG({size:t,radius:r,variant:o}),e),...n}));Lw.displayName=Sw.displayName;var vk=nf.forwardRef(({className:e,...t},r)=>(0,ln.jsx)(bw,{ref:r,className:I("moonui-theme","aspect-square h-full w-full",e),...t}));vk.displayName=bw.displayName;var Iw=nf.forwardRef(({className:e,...t},r)=>(0,ln.jsx)(Rw,{ref:r,className:I("flex h-full w-full items-center justify-center bg-muted",e),...t}));Iw.displayName=Rw.displayName;var yk=nf.forwardRef(({className:e,limit:t,avatars:r,overlapOffset:o=-8,...n},a)=>{let i=t?r.slice(0,t):r,s=t?Math.max(0,r.length-t):0;return(0,ln.jsx)("div",{ref:a,className:I("moonui-theme","flex items-center",e),...n,children:(0,ln.jsxs)("div",{className:"flex",children:[i.map((l,u)=>(0,ln.jsx)("div",{className:"relative",style:{marginLeft:u===0?0:`${o}px`,zIndex:i.length-u},children:l},u)),s>0&&(0,ln.jsx)("div",{className:"relative z-0",style:{marginLeft:`${o}px`},children:(0,ln.jsx)(Lw,{variant:"border",children:(0,ln.jsxs)(Iw,{children:["+",s]})})})]})})});yk.displayName="AvatarGroup";var ur=R(M()),xk=ee(["inline-flex items-center justify-center gap-1.5","font-medium transition-colors duration-200","border focus:outline-none","focus-visible:ring-2 focus-visible:ring-offset-1","mr-2 mb-2 last:mr-0"],{variants:{variant:{primary:["border-transparent bg-gray-900 text-white","hover:bg-gray-800 dark:hover:bg-gray-700","focus-visible:ring-gray-500/30 dark:focus-visible:ring-gray-400/40","dark:bg-gray-700 dark:text-gray-50 dark:shadow-inner dark:shadow-gray-950/10"],secondary:["border-transparent bg-secondary text-secondary-foreground","hover:bg-gray-200 dark:hover:bg-gray-600","focus-visible:ring-gray-400/30 dark:focus-visible:ring-gray-500/40","dark:bg-gray-700/50 dark:text-gray-50 dark:shadow-inner dark:shadow-gray-950/10"],outline:["border-gray-200 dark:border-gray-600","bg-transparent text-foreground","hover:border-gray-300 dark:hover:border-gray-500","focus-visible:ring-gray-400/30 dark:focus-visible:ring-gray-500/40","dark:text-gray-100 dark:bg-transparent dark:backdrop-blur-sm"],destructive:["border-transparent bg-error text-white","hover:bg-error/90 dark:hover:bg-error/80","focus-visible:ring-error/30 dark:focus-visible:ring-error/25","dark:bg-error/90 dark:text-white dark:shadow-inner dark:shadow-error/10"],success:["border-transparent bg-success text-white","hover:bg-success/90 dark:hover:bg-success/80","focus-visible:ring-success/30 dark:focus-visible:ring-success/25","dark:bg-success/90 dark:text-white dark:shadow-inner dark:shadow-success/10"],warning:["border-transparent bg-warning text-white","hover:bg-warning/90 dark:hover:bg-warning/80","focus-visible:ring-warning/30 dark:focus-visible:ring-warning/25","dark:bg-warning/90 dark:text-gray-900 dark:shadow-inner dark:shadow-warning/10"],ghost:["border border-gray-200 bg-gray-50/50 text-gray-700","hover:bg-gray-100 dark:hover:bg-gray-800/60","focus-visible:ring-gray-400/30 dark:focus-visible:ring-gray-500/40","dark:border-gray-700 dark:bg-gray-800/30 dark:text-gray-300","transition-all duration-200"],pro:["border-transparent bg-gradient-to-r from-purple-600 to-pink-600 text-white","hover:from-purple-700 hover:to-pink-700","focus-visible:ring-purple-400/30 dark:focus-visible:ring-purple-500/40","shadow-md dark:shadow-lg dark:shadow-purple-500/10"],admin:["border-transparent bg-gradient-to-r from-purple-600 to-pink-600 text-white","hover:from-purple-700 hover:to-pink-700","focus-visible:ring-purple-400/30 dark:focus-visible:ring-purple-500/40","shadow-md dark:shadow-lg dark:shadow-purple-500/10"]},size:{sm:"h-5 px-2 text-xs",md:"h-6 px-3 text-sm",lg:"h-8 px-4 text-base"},radius:{default:"rounded-full",sm:"rounded-md",lg:"rounded-xl",none:"rounded-none"}},defaultVariants:{variant:"primary",size:"md",radius:"default"}});function fo({className:e,variant:t,size:r,radius:o,withDot:n,dotColor:a,removable:i,onRemove:s,leftIcon:l,rightIcon:u,noAutoSpacing:c,children:d,...f}){let p=l,h=d;return t==="pro"&&(p=l||(0,ur.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"w-3 h-3",children:[(0,ur.jsx)("path",{d:"M12 0L13.09 8.26L22 9L13.09 9.74L12 18L10.91 9.74L2 9L10.91 8.26L12 0Z",fill:"currentColor"}),(0,ur.jsx)("path",{d:"M19 5L19.5 7L21 7.5L19.5 8L19 10L18.5 8L17 7.5L18.5 7L19 5Z",fill:"currentColor"}),(0,ur.jsx)("path",{d:"M19 15L19.5 17L21 17.5L19.5 18L19 20L18.5 18L17 17.5L18.5 17L19 15Z",fill:"currentColor"})]}),h=d||"Pro"),t==="admin"&&(p=l||(0,ur.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"w-3 h-3",children:(0,ur.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z",fill:"currentColor"})}),h=d||"Admin Pro"),(0,ur.jsxs)("div",{className:I("moonui-theme",xk({variant:t,size:r,radius:o}),c&&"mr-0 mb-0",e),"data-removable":i?"":void 0,...f,children:[n&&(0,ur.jsx)("span",{className:I("h-2 w-2 rounded-full",a||(t==="destructive"||t==="success"||t==="warning"?"bg-white":t==="secondary"?"bg-secondary-foreground":t==="outline"||t==="ghost"?"bg-foreground":t==="pro"||t==="admin"?"bg-white":"bg-primary-foreground")),"aria-hidden":"true"}),p&&(0,ur.jsx)("span",{className:"inline-flex shrink-0 items-center",children:p}),(0,ur.jsx)("span",{className:"inline-flex items-center",children:h}),u&&(0,ur.jsx)("span",{className:"inline-flex shrink-0 items-center",children:u}),i&&s&&(0,ur.jsx)("button",{type:"button",className:"ml-1 -mr-1 h-3.5 w-3.5 rounded-full inline-flex items-center justify-center hover:bg-black/10 dark:hover:bg-white/10",onClick:m=>{m.stopPropagation(),s()},"aria-label":"Remove badge",children:(0,ur.jsx)("svg",{width:"8",height:"8",viewBox:"0 0 8 8",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"opacity-70","aria-hidden":"true",children:(0,ur.jsx)("path",{d:"M0.799988 7.19999L7.19999 0.799988M0.799988 0.799988L7.19999 7.19999",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]})}var Un=R(E());var Tr=R(M()),yG=ee("flex items-center gap-1.5 text-sm",{variants:{variant:{default:"text-foreground transition-colors",muted:"text-muted-foreground transition-colors",ghost:"text-foreground/60 transition-colors"},size:{default:"text-sm",sm:"text-xs",lg:"text-base"}},defaultVariants:{variant:"default",size:"default"}}),wk=Un.forwardRef(({className:e,variant:t,size:r,...o},n)=>(0,Tr.jsx)("nav",{ref:n,className:I("moonui-theme",yG({variant:t,size:r}),e),"aria-label":"breadcrumb",...o}));wk.displayName="Breadcrumb";var Ck=Un.forwardRef(({className:e,collapsed:t,collapsedWidth:r=3,...o},n)=>{let a=Un.Children.toArray(o.children).filter(Boolean),i=a.length;if(t&&i>r){let s=a[0],l=a.slice(-2);return(0,Tr.jsxs)("ol",{ref:n,className:I("flex flex-wrap items-center gap-1.5 sm:gap-2.5",e),...o,children:[s,(0,Tr.jsx)(Pw,{}),l]})}return(0,Tr.jsx)("ol",{ref:n,className:I("flex flex-wrap items-center gap-1.5 sm:gap-2.5",e),...o})});Ck.displayName="BreadcrumbList";var Sk=Un.forwardRef(({className:e,isCurrent:t,href:r,asChild:o=!1,...n},a)=>{let i=o?Un.Fragment:r?"a":"span",s=o?{}:r?{href:r}:{};return(0,Tr.jsx)("li",{ref:a,className:I("moonui-theme","inline-flex items-center gap-1.5",e),"aria-current":t?"page":void 0,...n,children:(0,Tr.jsx)(i,{className:I("transition-colors duration-200 hover:text-foreground",t?"font-medium text-foreground":"text-muted-foreground hover:text-foreground hover:underline hover:underline-offset-4 hover:decoration-muted-foreground/30"),...s,children:n.children})})});Sk.displayName="BreadcrumbItem";var bk=({children:e,className:t,...r})=>(0,Tr.jsx)("span",{role:"presentation","aria-hidden":"true",className:I("moonui-theme","text-muted-foreground opacity-70",t),...r,children:e||(0,Tr.jsx)(Pr,{className:"h-3.5 w-3.5"})});bk.displayName="BreadcrumbSeparator";var Pw=({className:e,...t})=>(0,Tr.jsxs)("span",{role:"presentation","aria-hidden":"true",className:I("moonui-theme","flex items-center text-muted-foreground hover:text-foreground/80 transition-colors duration-200",e),...t,children:[(0,Tr.jsx)(Hn,{className:"h-4 w-4"}),(0,Tr.jsx)("span",{className:"sr-only",children:"More pages"})]});Pw.displayName="BreadcrumbEllipsis";var Rk=Un.forwardRef(({className:e,href:t,...r},o)=>(0,Tr.jsx)("a",{ref:o,href:t,className:I("transition-colors duration-200 hover:text-foreground text-muted-foreground hover:underline hover:underline-offset-4 hover:decoration-muted-foreground/30",e),...r}));Rk.displayName="BreadcrumbLink";var Lk=Un.forwardRef(({className:e,...t},r)=>(0,Tr.jsx)("span",{ref:r,className:I("font-medium text-foreground dark:text-white dark:text-opacity-95",e),...t}));Lk.displayName="BreadcrumbPage";var Ik=R(E());var bg=R(M()),Sg=ee(["inline-flex items-center justify-center gap-2 whitespace-nowrap","font-medium relative","transition-all duration-200 ease-out","transform active:scale-[0.98]","focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2","disabled:opacity-50 disabled:cursor-not-allowed disabled:pointer-events-none disabled:transform-none"],{variants:{variant:{primary:["bg-primary text-primary-foreground","dark:bg-primary dark:text-primary-foreground","hover:bg-primary/90 dark:hover:bg-primary/90","active:bg-primary/80 dark:active:bg-primary/80","shadow-sm hover:shadow-md","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","transition-all duration-200"],secondary:["bg-gray-100 text-gray-900","dark:bg-gray-800 dark:text-gray-100","hover:bg-gray-200 dark:hover:bg-gray-700","active:bg-gray-300 dark:active:bg-gray-600","border border-gray-200 dark:border-gray-700","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","shadow-sm hover:shadow-md"],outline:["bg-background text-foreground","dark:bg-background dark:text-foreground","border border-input dark:border-input","hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent dark:hover:text-accent-foreground","active:bg-accent/80 dark:active:bg-accent/80","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","transition-all duration-200"],ghost:["text-gray-700","dark:text-gray-300","hover:bg-gray-100 hover:text-gray-900 dark:hover:bg-gray-800 dark:hover:text-gray-100","active:bg-gray-200 dark:active:bg-gray-700","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","transition-all duration-200"],destructive:["bg-destructive text-destructive-foreground","dark:bg-destructive dark:text-destructive-foreground","hover:bg-destructive/90 dark:hover:bg-destructive/90","active:bg-destructive/80 dark:active:bg-destructive/80","shadow-sm hover:shadow-md","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","transition-all duration-200"],success:["bg-success text-success-foreground","dark:bg-success dark:text-success-foreground","hover:bg-success/90 dark:hover:bg-success/90","active:bg-success/80 dark:active:bg-success/80","shadow-sm hover:shadow-md","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2","transition-all duration-200"],link:["text-primary bg-transparent","underline-offset-4 hover:underline","hover:text-primary/80 active:text-primary/70","p-0 h-auto","transition-colors duration-200"],gradient:["bg-gradient-to-r from-purple-500 to-pink-500 text-white","hover:from-purple-600 hover:to-pink-600","active:from-purple-700 active:to-pink-700","shadow-xl shadow-purple-500/40","hover:shadow-2xl hover:shadow-purple-500/50","focus-visible:ring-purple-500/50","transition-all duration-300"],glow:["bg-blue-500 text-white","shadow-[0_0_30px_rgba(59,130,246,0.5)]","hover:shadow-[0_0_40px_rgba(59,130,246,0.7)]","active:shadow-[0_0_20px_rgba(59,130,246,0.4)]","hover:bg-blue-600","focus-visible:ring-blue-500/50","transition-all duration-300"],soft:["bg-primary/10 text-primary","hover:bg-primary/20","active:bg-primary/30","focus-visible:ring-primary/50","dark:bg-primary/20 dark:text-primary-foreground","dark:hover:bg-primary/30 dark:active:bg-primary/40","transition-colors duration-200"],glass:["bg-white/10 backdrop-blur-md text-foreground","border border-white/20","hover:bg-white/20 hover:border-white/30","active:bg-white/30","shadow-lg","focus-visible:ring-white/50","dark:bg-gray-800/10 dark:border-gray-700/20","dark:hover:bg-gray-800/20 dark:hover:border-gray-700/30","transition-all duration-200"],neon:["bg-transparent text-green-400","border-2 border-green-400","hover:bg-green-400 hover:text-gray-900","hover:shadow-[0_0_30px_rgba(74,222,128,0.6)]","active:shadow-[0_0_15px_rgba(74,222,128,0.4)]","focus-visible:ring-green-400/50","transition-all duration-300"]},size:{xs:"h-7 px-2.5 text-xs",sm:"h-8 px-3 text-sm",md:"h-10 px-4 text-base",lg:"h-12 px-6 text-lg",xl:"h-14 px-8 text-xl",icon:"h-10 w-10 p-2","icon-sm":"h-8 w-8 p-1.5","icon-lg":"h-12 w-12 p-3"},rounded:{default:"rounded-xl",full:"rounded-full",none:"rounded-none",sm:"rounded-lg",lg:"rounded-2xl"},fullWidth:{true:"w-full"}},defaultVariants:{variant:"primary",size:"md",rounded:"default",fullWidth:!1}}),Ve=Ik.forwardRef(({className:e,variant:t,size:r,rounded:o,fullWidth:n,asChild:a=!1,loading:i=!1,leftIcon:s,rightIcon:l,children:u,disabled:c,...d},f)=>(0,bg.jsxs)("button",{className:I("moonui-theme",Sg({variant:t,size:r,rounded:o,fullWidth:n,className:e})),ref:f,disabled:c||i,"data-loading":i?"":void 0,...d,children:[i&&(0,bg.jsx)(Nt,{className:"w-4 h-4 animate-spin","aria-hidden":"true"}),!i&&s,u,!i&&l]}));Ve.displayName="Button";var Zs=R(E());var zf=R(M(),1),Gn=R(E(),1);var Pk=R(E(),1),xu=(0,Pk.createContext)({});var Tk=R(E(),1);function Do(e){let t=(0,Tk.useRef)(null);return t.current===null&&(t.current=e()),t.current}var Rg=R(E(),1);var wu=typeof window<"u";var wi=wu?Rg.useLayoutEffect:Rg.useEffect;var sC=R(M(),1),MM=R(E(),1),Hf=R(E(),1);var kk=R(E(),1),Ci=(0,kk.createContext)(null);var TM=R(M(),1);function Ms(e,t){e.indexOf(t)===-1&&e.push(t)}function un(e,t){let r=e.indexOf(t);r>-1&&e.splice(r,1)}var Wt=(e,t,r)=>r>t?t:r<e?e:r;var ha=()=>{},Lt=()=>{};var cr={};var af=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function sf(e){return typeof e=="object"&&e!==null}var lf=e=>/^0[^.\s]+$/u.test(e);function Es(e){let t;return()=>(t===void 0&&(t=e()),t)}var mt=e=>e;var xG=(e,t)=>r=>t(e(r)),cn=(...e)=>e.reduce(xG);var No=(e,t,r)=>{let o=t-e;return o===0?1:(r-e)/o};var va=class{constructor(){this.subscriptions=[]}add(t){return Ms(this.subscriptions,t),()=>un(this.subscriptions,t)}notify(t,r,o){let n=this.subscriptions.length;if(n)if(n===1)this.subscriptions[0](t,r,o);else for(let a=0;a<n;a++){let i=this.subscriptions[a];i&&i(t,r,o)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}};var St=e=>e*1e3,er=e=>e/1e3;function uf(e,t){return t?e*(1e3/t):0}var Mk=(e,t,r)=>{let o=t-e;return((r-e)%o+o)%o+e};var Ek=(e,t,r)=>(((1-3*r+3*t)*e+(3*r-6*t))*e+3*t)*e,wG=1e-7,CG=12;function SG(e,t,r,o,n){let a,i,s=0;do i=t+(r-t)/2,a=Ek(i,o,n)-e,a>0?r=i:t=i;while(Math.abs(a)>wG&&++s<CG);return i}function Si(e,t,r,o){if(e===t&&r===o)return mt;let n=a=>SG(a,0,1,e,r);return a=>a===0||a===1?a:Ek(n(a),t,o)}var Lg=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2;var Ig=e=>t=>1-e(1-t);var Pg=Si(.33,1.53,.69,.99),Cu=Ig(Pg),cf=Lg(Cu);var df=e=>(e*=2)<1?.5*Cu(e):.5*(2-Math.pow(2,-10*(e-1)));var ff=e=>1-Math.sin(Math.acos(e)),pf=Ig(ff),mf=Lg(ff);var Tw=Si(.42,0,1,1),kw=Si(0,0,.58,1),gf=Si(.42,0,.58,1);var hf=e=>Array.isArray(e)&&typeof e[0]!="number";function vf(e,t){return hf(e)?e[Mk(0,e.length,t)]:e}var yf=e=>Array.isArray(e)&&typeof e[0]=="number";var Ak={linear:mt,easeIn:Tw,easeInOut:gf,easeOut:kw,circIn:ff,circInOut:mf,circOut:pf,backIn:Cu,backInOut:cf,backOut:Pg,anticipate:df},bG=e=>typeof e=="string",Tg=e=>{if(yf(e)){Lt(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");let[t,r,o,n]=e;return Si(t,r,o,n)}else if(bG(e))return Lt(Ak[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),Ak[e];return e};var xf=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];var $r={value:null,addProjectionMetrics:null};function Dk(e,t){let r=new Set,o=new Set,n=!1,a=!1,i=new WeakSet,s={delta:0,timestamp:0,isProcessing:!1},l=0;function u(d){i.has(d)&&(c.schedule(d),e()),l++,d(s)}let c={schedule:(d,f=!1,p=!1)=>{let m=p&&n?r:o;return f&&i.add(d),m.has(d)||m.add(d),d},cancel:d=>{o.delete(d),i.delete(d)},process:d=>{if(s=d,n){a=!0;return}n=!0,[r,o]=[o,r],r.forEach(u),t&&$r.value&&$r.value.frameloop[t].push(l),l=0,r.clear(),n=!1,a&&(a=!1,c.process(d))}};return c}var RG=40;function kg(e,t){let r=!1,o=!0,n={delta:0,timestamp:0,isProcessing:!1},a=()=>r=!0,i=xf.reduce((y,w)=>(y[w]=Dk(a,t?w:void 0),y),{}),{setup:s,read:l,resolveKeyframes:u,preUpdate:c,update:d,preRender:f,render:p,postRender:h}=i,m=()=>{let y=cr.useManualTiming?n.timestamp:performance.now();r=!1,cr.useManualTiming||(n.delta=o?1e3/60:Math.max(Math.min(y-n.timestamp,RG),1)),n.timestamp=y,n.isProcessing=!0,s.process(n),l.process(n),u.process(n),c.process(n),d.process(n),f.process(n),p.process(n),h.process(n),n.isProcessing=!1,r&&t&&(o=!1,e(m))},x=()=>{r=!0,o=!0,n.isProcessing||e(m)};return{schedule:xf.reduce((y,w)=>{let C=i[w];return y[w]=(b,S=!1,L=!1)=>(r||x(),C.schedule(b,S,L)),y},{}),cancel:y=>{for(let w=0;w<xf.length;w++)i[xf[w]].cancel(y)},state:n,steps:i}}var{schedule:xe,cancel:dr,state:yt,steps:wf}=kg(typeof requestAnimationFrame<"u"?requestAnimationFrame:mt,!0);var Mg;function LG(){Mg=void 0}var xt={now:()=>(Mg===void 0&&xt.set(yt.isProcessing||cr.useManualTiming?yt.timestamp:performance.now()),Mg),set:e=>{Mg=e,queueMicrotask(LG)}};var dn={layout:0,mainThread:0,waapi:0};var Nk=e=>t=>typeof t=="string"&&t.startsWith(e),As=Nk("--"),IG=Nk("var(--"),Ds=e=>IG(e)?PG.test(e.split("/*")[0].trim()):!1,PG=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;var zn={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},ya={...zn,transform:e=>Wt(0,1,e)},Cf={...zn,default:1};var bi=e=>Math.round(e*1e5)/1e5;var Su=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function _k(e){return e==null}var Ok=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;var bu=(e,t)=>r=>!!(typeof r=="string"&&Ok.test(r)&&r.startsWith(e)||t&&!_k(r)&&Object.prototype.hasOwnProperty.call(r,t)),Eg=(e,t,r)=>o=>{if(typeof o!="string")return o;let[n,a,i,s]=o.match(Su);return{[e]:parseFloat(n),[t]:parseFloat(a),[r]:parseFloat(i),alpha:s!==void 0?parseFloat(s):1}};var TG=e=>Wt(0,255,e),Mw={...zn,transform:e=>Math.round(TG(e))},Wn={test:bu("rgb","red"),parse:Eg("red","green","blue"),transform:({red:e,green:t,blue:r,alpha:o=1})=>"rgba("+Mw.transform(e)+", "+Mw.transform(t)+", "+Mw.transform(r)+", "+bi(ya.transform(o))+")"};function kG(e){let t="",r="",o="",n="";return e.length>5?(t=e.substring(1,3),r=e.substring(3,5),o=e.substring(5,7),n=e.substring(7,9)):(t=e.substring(1,2),r=e.substring(2,3),o=e.substring(3,4),n=e.substring(4,5),t+=t,r+=r,o+=o,n+=n),{red:parseInt(t,16),green:parseInt(r,16),blue:parseInt(o,16),alpha:n?parseInt(n,16)/255:1}}var Sf={test:bu("#"),parse:kG,transform:Wn.transform};var bf=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),fn=bf("deg"),fr=bf("%"),re=bf("px"),Ew=bf("vh"),Aw=bf("vw"),Ag=(()=>({...fr,parse:e=>fr.parse(e)/100,transform:e=>fr.transform(e*100)}))();var Ri={test:bu("hsl","hue"),parse:Eg("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:r,alpha:o=1})=>"hsla("+Math.round(e)+", "+fr.transform(bi(t))+", "+fr.transform(bi(r))+", "+bi(ya.transform(o))+")"};var st={test:e=>Wn.test(e)||Sf.test(e)||Ri.test(e),parse:e=>Wn.test(e)?Wn.parse(e):Ri.test(e)?Ri.parse(e):Sf.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Wn.transform(e):Ri.transform(e),getAnimatableNone:e=>{let t=st.parse(e);return t.alpha=0,st.transform(t)}};var Fk=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function MG(e){return isNaN(e)&&typeof e=="string"&&(e.match(Su)?.length||0)+(e.match(Fk)?.length||0)>0}var Bk="number",Hk="color",EG="var",AG="var(",Vk="${}",DG=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Li(e){let t=e.toString(),r=[],o={color:[],number:[],var:[]},n=[],a=0,s=t.replace(DG,l=>(st.test(l)?(o.color.push(a),n.push(Hk),r.push(st.parse(l))):l.startsWith(AG)?(o.var.push(a),n.push(EG),r.push(l)):(o.number.push(a),n.push(Bk),r.push(parseFloat(l))),++a,Vk)).split(Vk);return{values:r,split:s,indexes:o,types:n}}function Uk(e){return Li(e).values}function zk(e){let{split:t,types:r}=Li(e),o=t.length;return n=>{let a="";for(let i=0;i<o;i++)if(a+=t[i],n[i]!==void 0){let s=r[i];s===Bk?a+=bi(n[i]):s===Hk?a+=st.transform(n[i]):a+=n[i]}return a}}var NG=e=>typeof e=="number"?0:st.test(e)?st.getAnimatableNone(e):e;function _G(e){let t=Uk(e);return zk(e)(t.map(NG))}var pr={test:MG,parse:Uk,createTransformer:zk,getAnimatableNone:_G};function Dw(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function Wk({hue:e,saturation:t,lightness:r,alpha:o}){e/=360,t/=100,r/=100;let n=0,a=0,i=0;if(!t)n=a=i=r;else{let s=r<.5?r*(1+t):r+t-r*t,l=2*r-s;n=Dw(l,s,e+1/3),a=Dw(l,s,e),i=Dw(l,s,e-1/3)}return{red:Math.round(n*255),green:Math.round(a*255),blue:Math.round(i*255),alpha:o}}function Ru(e,t){return r=>r>0?t:e}var Se=(e,t,r)=>e+(t-e)*r;var Nw=(e,t,r)=>{let o=e*e,n=r*(t*t-o)+o;return n<0?0:Math.sqrt(n)},OG=[Sf,Wn,Ri],FG=e=>OG.find(t=>t.test(e));function Gk(e){let t=FG(e);if(ha(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let r=t.parse(e);return t===Ri&&(r=Wk(r)),r}var _w=(e,t)=>{let r=Gk(e),o=Gk(t);if(!r||!o)return Ru(e,t);let n={...r};return a=>(n.red=Nw(r.red,o.red,a),n.green=Nw(r.green,o.green,a),n.blue=Nw(r.blue,o.blue,a),n.alpha=Se(r.alpha,o.alpha,a),Wn.transform(n))};var Dg=new Set(["none","hidden"]);function jk(e,t){return Dg.has(e)?r=>r<=0?e:t:r=>r>=1?t:e}function VG(e,t){return r=>Se(e,t,r)}function Ng(e){return typeof e=="number"?VG:typeof e=="string"?Ds(e)?Ru:st.test(e)?_w:UG:Array.isArray(e)?qk:typeof e=="object"?st.test(e)?_w:BG:Ru}function qk(e,t){let r=[...e],o=r.length,n=e.map((a,i)=>Ng(a)(a,t[i]));return a=>{for(let i=0;i<o;i++)r[i]=n[i](a);return r}}function BG(e,t){let r={...e,...t},o={};for(let n in r)e[n]!==void 0&&t[n]!==void 0&&(o[n]=Ng(e[n])(e[n],t[n]));return n=>{for(let a in o)r[a]=o[a](n);return r}}function HG(e,t){let r=[],o={color:0,var:0,number:0};for(let n=0;n<t.values.length;n++){let a=t.types[n],i=e.indexes[a][o[a]],s=e.values[i]??0;r[n]=s,o[a]++}return r}var UG=(e,t)=>{let r=pr.createTransformer(t),o=Li(e),n=Li(t);return o.indexes.var.length===n.indexes.var.length&&o.indexes.color.length===n.indexes.color.length&&o.indexes.number.length>=n.indexes.number.length?Dg.has(e)&&!n.values.length||Dg.has(t)&&!o.values.length?jk(e,t):cn(qk(HG(o,n),n.values),r):(ha(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),Ru(e,t))};function _g(e,t,r){return typeof e=="number"&&typeof t=="number"&&typeof r=="number"?Se(e,t,r):Ng(e)(e,t)}var $k=e=>{let t=({timestamp:r})=>e(r);return{start:(r=!0)=>xe.update(t,r),stop:()=>dr(t),now:()=>yt.isProcessing?yt.timestamp:xt.now()}};var Og=(e,t,r=10)=>{let o="",n=Math.max(Math.round(t/r),2);for(let a=0;a<n;a++)o+=Math.round(e(a/(n-1))*1e4)/1e4+", ";return`linear(${o.substring(0,o.length-2)})`};function Lu(e){let t=0,r=50,o=e.next(t);for(;!o.done&&t<2e4;)t+=r,o=e.next(t);return t>=2e4?1/0:t}function Rf(e,t=100,r){let o=r({...e,keyframes:[0,t]}),n=Math.min(Lu(o),2e4);return{type:"keyframes",ease:a=>o.next(n*a).value/t,duration:er(n)}}var zG=5;function Fg(e,t,r){let o=Math.max(t-zG,0);return uf(r-e(o),t-o)}var tt={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};var Fw=.001;function Kk({duration:e=tt.duration,bounce:t=tt.bounce,velocity:r=tt.velocity,mass:o=tt.mass}){let n,a;ha(e<=St(tt.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let i=1-t;i=Wt(tt.minDamping,tt.maxDamping,i),e=Wt(tt.minDuration,tt.maxDuration,er(e)),i<1?(n=u=>{let c=u*i,d=c*e,f=c-r,p=Vg(u,i),h=Math.exp(-d);return Fw-f/p*h},a=u=>{let d=u*i*e,f=d*r+r,p=Math.pow(i,2)*Math.pow(u,2)*e,h=Math.exp(-d),m=Vg(Math.pow(u,2),i);return(-n(u)+Fw>0?-1:1)*((f-p)*h)/m}):(n=u=>{let c=Math.exp(-u*e),d=(u-r)*e+1;return-Fw+c*d},a=u=>{let c=Math.exp(-u*e),d=(r-u)*(e*e);return c*d});let s=5/e,l=GG(n,a,s);if(e=St(e),isNaN(l))return{stiffness:tt.stiffness,damping:tt.damping,duration:e};{let u=Math.pow(l,2)*o;return{stiffness:u,damping:i*2*Math.sqrt(o*u),duration:e}}}var WG=12;function GG(e,t,r){let o=r;for(let n=1;n<WG;n++)o=o-e(o)/t(o);return o}function Vg(e,t){return e*Math.sqrt(1-t*t)}var jG=["duration","bounce"],qG=["stiffness","damping","mass"];function Xk(e,t){return t.some(r=>e[r]!==void 0)}function $G(e){let t={velocity:tt.velocity,stiffness:tt.stiffness,damping:tt.damping,mass:tt.mass,isResolvedFromDuration:!1,...e};if(!Xk(e,qG)&&Xk(e,jG))if(e.visualDuration){let r=e.visualDuration,o=2*Math.PI/(r*1.2),n=o*o,a=2*Wt(.05,1,1-(e.bounce||0))*Math.sqrt(n);t={...t,mass:tt.mass,stiffness:n,damping:a}}else{let r=Kk(e);t={...t,...r,mass:tt.mass},t.isResolvedFromDuration=!0}return t}function xa(e=tt.visualDuration,t=tt.bounce){let r=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e,{restSpeed:o,restDelta:n}=r,a=r.keyframes[0],i=r.keyframes[r.keyframes.length-1],s={done:!1,value:a},{stiffness:l,damping:u,mass:c,duration:d,velocity:f,isResolvedFromDuration:p}=$G({...r,velocity:-er(r.velocity||0)}),h=f||0,m=u/(2*Math.sqrt(l*c)),x=i-a,v=er(Math.sqrt(l/c)),g=Math.abs(x)<5;o||(o=g?tt.restSpeed.granular:tt.restSpeed.default),n||(n=g?tt.restDelta.granular:tt.restDelta.default);let y;if(m<1){let C=Vg(v,m);y=b=>{let S=Math.exp(-m*v*b);return i-S*((h+m*v*x)/C*Math.sin(C*b)+x*Math.cos(C*b))}}else if(m===1)y=C=>i-Math.exp(-v*C)*(x+(h+v*x)*C);else{let C=v*Math.sqrt(m*m-1);y=b=>{let S=Math.exp(-m*v*b),L=Math.min(C*b,300);return i-S*((h+m*v*x)*Math.sinh(L)+C*x*Math.cosh(L))/C}}let w={calculatedDuration:p&&d||null,next:C=>{let b=y(C);if(p)s.done=C>=d;else{let S=C===0?h:0;m<1&&(S=C===0?St(h):Fg(y,C,b));let L=Math.abs(S)<=o,T=Math.abs(i-b)<=n;s.done=L&&T}return s.value=s.done?i:b,s},toString:()=>{let C=Math.min(Lu(w),2e4),b=Og(S=>w.next(C*S).value,C,30);return C+"ms "+b},toTransition:()=>{}};return w}xa.applyToOptions=e=>{let t=Rf(e,100,xa);return e.ease=t.ease,e.duration=St(t.duration),e.type="keyframes",e};function Lf({keyframes:e,velocity:t=0,power:r=.8,timeConstant:o=325,bounceDamping:n=10,bounceStiffness:a=500,modifyTarget:i,min:s,max:l,restDelta:u=.5,restSpeed:c}){let d=e[0],f={done:!1,value:d},p=L=>s!==void 0&&L<s||l!==void 0&&L>l,h=L=>s===void 0?l:l===void 0||Math.abs(s-L)<Math.abs(l-L)?s:l,m=r*t,x=d+m,v=i===void 0?x:i(x);v!==x&&(m=v-d);let g=L=>-m*Math.exp(-L/o),y=L=>v+g(L),w=L=>{let T=g(L),P=y(L);f.done=Math.abs(T)<=u,f.value=f.done?v:P},C,b,S=L=>{p(f.value)&&(C=L,b=xa({keyframes:[f.value,h(f.value)],velocity:Fg(y,L,f.value),damping:n,stiffness:a,restDelta:u,restSpeed:c}))};return S(0),{calculatedDuration:null,next:L=>{let T=!1;return!b&&C===void 0&&(T=!0,w(L),S(L)),C!==void 0&&L>=C?b.next(L-C):(!T&&w(L),f)}}}function KG(e,t,r){let o=[],n=r||cr.mix||_g,a=e.length-1;for(let i=0;i<a;i++){let s=n(e[i],e[i+1]);if(t){let l=Array.isArray(t)?t[i]||mt:t;s=cn(l,s)}o.push(s)}return o}function Bg(e,t,{clamp:r=!0,ease:o,mixer:n}={}){let a=e.length;if(Lt(a===t.length,"Both input and output ranges must be the same length","range-length"),a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];let i=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());let s=KG(t,o,n),l=s.length,u=c=>{if(i&&c<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(c<e[d+1]);d++);let f=No(e[d],e[d+1],c);return s[d](f)};return r?c=>u(Wt(e[0],e[a-1],c)):u}function If(e,t){let r=e[e.length-1];for(let o=1;o<=t;o++){let n=No(0,t,o);e.push(Se(r,1,n))}}function Pf(e){let t=[0];return If(t,e.length-1),t}function Yk(e,t){return e.map(r=>r*t)}function XG(e,t){return e.map(()=>t||gf).splice(0,e.length-1)}function Ns({duration:e=300,keyframes:t,times:r,ease:o="easeInOut"}){let n=hf(o)?o.map(Tg):Tg(o),a={done:!1,value:t[0]},i=Yk(r&&r.length===t.length?r:Pf(t),e),s=Bg(i,t,{ease:Array.isArray(n)?n:XG(t,n)});return{calculatedDuration:e,next:l=>(a.value=s(l),a.done=l>=e,a)}}var YG=e=>e!==null;function Iu(e,{repeat:t,repeatType:r="loop"},o,n=1){let a=e.filter(YG),s=n<0||t&&r!=="loop"&&t%2===1?0:a.length-1;return!s||o===void 0?a[s]:o}var QG={decay:Lf,inertia:Lf,tween:Ns,keyframes:Ns,spring:xa};function Hg(e){typeof e.type=="string"&&(e.type=QG[e.type])}var Ii=class{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,r){return this.finished.then(t,r)}};var ZG=e=>e/100,wa=class extends Ii{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{let{motionValue:r}=this.options;r&&r.updatedAt!==xt.now()&&this.tick(xt.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},dn.mainThread++,this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){let{options:t}=this;Hg(t);let{type:r=Ns,repeat:o=0,repeatDelay:n=0,repeatType:a,velocity:i=0}=t,{keyframes:s}=t,l=r||Ns;l!==Ns&&typeof s[0]!="number"&&(this.mixKeyframes=cn(ZG,_g(s[0],s[1])),s=[0,100]);let u=l({...t,keyframes:s});a==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...s].reverse(),velocity:-i})),u.calculatedDuration===null&&(u.calculatedDuration=Lu(u));let{calculatedDuration:c}=u;this.calculatedDuration=c,this.resolvedDuration=c+n,this.totalDuration=this.resolvedDuration*(o+1)-n,this.generator=u}updateTime(t){let r=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=r}tick(t,r=!1){let{generator:o,totalDuration:n,mixKeyframes:a,mirroredGenerator:i,resolvedDuration:s,calculatedDuration:l}=this;if(this.startTime===null)return o.next(0);let{delay:u=0,keyframes:c,repeat:d,repeatType:f,repeatDelay:p,type:h,onUpdate:m,finalKeyframe:x}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-n/this.speed,this.startTime)),r?this.currentTime=t:this.updateTime(t);let v=this.currentTime-u*(this.playbackSpeed>=0?1:-1),g=this.playbackSpeed>=0?v<0:v>n;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=n);let y=this.currentTime,w=o;if(d){let L=Math.min(this.currentTime,n)/s,T=Math.floor(L),P=L%1;!P&&L>=1&&(P=1),P===1&&T--,T=Math.min(T,d+1),!!(T%2)&&(f==="reverse"?(P=1-P,p&&(P-=p/s)):f==="mirror"&&(w=i)),y=Wt(0,1,P)*s}let C=g?{done:!1,value:c[0]}:w.next(y);a&&(C.value=a(C.value));let{done:b}=C;!g&&l!==null&&(b=this.playbackSpeed>=0?this.currentTime>=n:this.currentTime<=0);let S=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&b);return S&&h!==Lf&&(C.value=Iu(c,this.options,x,this.speed)),m&&m(C.value),S&&this.finish(),C}then(t,r){return this.finished.then(t,r)}get duration(){return er(this.calculatedDuration)}get time(){return er(this.currentTime)}set time(t){t=St(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(xt.now());let r=this.playbackSpeed!==t;this.playbackSpeed=t,r&&(this.time=er(this.currentTime))}play(){if(this.isStopped)return;let{driver:t=$k,startTime:r}=this.options;this.driver||(this.driver=t(n=>this.tick(n))),this.options.onPlay?.();let o=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=o):this.holdTime!==null?this.startTime=o-this.holdTime:this.startTime||(this.startTime=r??o),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(xt.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null,dn.mainThread--}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}};function Qk(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var _s=e=>e*180/Math.PI,Vw=e=>{let t=_s(Math.atan2(e[1],e[0]));return Bw(t)},JG={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Vw,rotateZ:Vw,skewX:e=>_s(Math.atan(e[1])),skewY:e=>_s(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Bw=e=>(e=e%360,e<0&&(e+=360),e),Zk=Vw,Jk=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),eM=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),ej={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Jk,scaleY:eM,scale:e=>(Jk(e)+eM(e))/2,rotateX:e=>Bw(_s(Math.atan2(e[6],e[5]))),rotateY:e=>Bw(_s(Math.atan2(-e[2],e[0]))),rotateZ:Zk,rotate:Zk,skewX:e=>_s(Math.atan(e[4])),skewY:e=>_s(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Tf(e){return e.includes("scale")?1:0}function kf(e,t){if(!e||e==="none")return Tf(t);let r=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),o,n;if(r)o=ej,n=r;else{let s=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);o=JG,n=s}if(!n)return Tf(t);let a=o[t],i=n[1].split(",").map(tj);return typeof a=="function"?a(i):i[a]}var Hw=(e,t)=>{let{transform:r="none"}=getComputedStyle(e);return kf(r,t)};function tj(e){return parseFloat(e.trim())}var pn=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],po=(()=>new Set(pn))();var Uw=e=>e===zn||e===re,rj=new Set(["x","y","z"]),oj=pn.filter(e=>!rj.has(e));function tM(e){let t=[];return oj.forEach(r=>{let o=e.getValue(r);o!==void 0&&(t.push([r,o.get()]),o.set(r.startsWith("scale")?1:0))}),t}var Pi={width:({x:e},{paddingLeft:t="0",paddingRight:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),height:({y:e},{paddingTop:t="0",paddingBottom:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>kf(t,"x"),y:(e,{transform:t})=>kf(t,"y")};Pi.translateX=Pi.x;Pi.translateY=Pi.y;var Os=new Set,zw=!1,Ww=!1,Gw=!1;function rM(){if(Ww){let e=Array.from(Os).filter(o=>o.needsMeasurement),t=new Set(e.map(o=>o.element)),r=new Map;t.forEach(o=>{let n=tM(o);n.length&&(r.set(o,n),o.render())}),e.forEach(o=>o.measureInitialState()),t.forEach(o=>{o.render();let n=r.get(o);n&&n.forEach(([a,i])=>{o.getValue(a)?.set(i)})}),e.forEach(o=>o.measureEndState()),e.forEach(o=>{o.suspendedScrollY!==void 0&&window.scrollTo(0,o.suspendedScrollY)})}Ww=!1,zw=!1,Os.forEach(e=>e.complete(Gw)),Os.clear()}function oM(){Os.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Ww=!0)})}function jw(){Gw=!0,oM(),rM(),Gw=!1}var Ca=class{constructor(t,r,o,n,a,i=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=r,this.name=o,this.motionValue=n,this.element=a,this.isAsync=i}scheduleResolve(){this.state="scheduled",this.isAsync?(Os.add(this),zw||(zw=!0,xe.read(oM),xe.resolveKeyframes(rM))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:t,name:r,element:o,motionValue:n}=this;if(t[0]===null){let a=n?.get(),i=t[t.length-1];if(a!==void 0)t[0]=a;else if(o&&r){let s=o.readValue(r,i);s!=null&&(t[0]=s)}t[0]===void 0&&(t[0]=i),n&&a===void 0&&n.set(t[0])}Qk(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Os.delete(this)}cancel(){this.state==="scheduled"&&(Os.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}};var nM=e=>e.startsWith("--");function aM(e,t,r){nM(t)?e.style.setProperty(t,r):e.style[t]=r}var iM=Es(()=>window.ScrollTimeline!==void 0);var sM={};function lM(e,t){let r=Es(e);return()=>sM[t]??r()}var Ug=lM(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing");var Fs=([e,t,r,o])=>`cubic-bezier(${e}, ${t}, ${r}, ${o})`;var qw={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Fs([0,.65,.55,1]),circOut:Fs([.55,0,1,.45]),backIn:Fs([.31,.01,.66,-.59]),backOut:Fs([.33,1.53,.69,.99])};function $w(e,t){if(e)return typeof e=="function"?Ug()?Og(e,t):"ease-out":yf(e)?Fs(e):Array.isArray(e)?e.map(r=>$w(r,t)||qw.easeOut):qw[e]}function uM(e,t,r,{delay:o=0,duration:n=300,repeat:a=0,repeatType:i="loop",ease:s="easeOut",times:l}={},u=void 0){let c={[t]:r};l&&(c.offset=l);let d=$w(s,n);Array.isArray(d)&&(c.easing=d),$r.value&&dn.waapi++;let f={delay:o,duration:n,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:a+1,direction:i==="reverse"?"alternate":"normal"};u&&(f.pseudoElement=u);let p=e.animate(c,f);return $r.value&&p.finished.finally(()=>{dn.waapi--}),p}function Vs(e){return typeof e=="function"&&"applyToOptions"in e}function cM({type:e,...t}){return Vs(e)&&Ug()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}var zg=class extends Ii{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;let{element:r,name:o,keyframes:n,pseudoElement:a,allowFlatten:i=!1,finalKeyframe:s,onComplete:l}=t;this.isPseudoElement=!!a,this.allowFlatten=i,this.options=t,Lt(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");let u=cM(t);this.animation=uM(r,o,n,u,a),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!a){let c=Iu(n,this.options,s,this.speed);this.updateMotionValue?this.updateMotionValue(c):aM(r,o,c),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){let t=this.animation.effect?.getComputedTiming?.().duration||0;return er(Number(t))}get time(){return er(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=St(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:r}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&iM()?(this.animation.timeline=t,mt):r(this)}};var dM={anticipate:df,backInOut:cf,circInOut:mf};function nj(e){return e in dM}function fM(e){typeof e.ease=="string"&&nj(e.ease)&&(e.ease=dM[e.ease])}var pM=10,Wg=class extends zg{constructor(t){fM(t),Hg(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){let{motionValue:r,onUpdate:o,onComplete:n,element:a,...i}=this.options;if(!r)return;if(t!==void 0){r.set(t);return}let s=new wa({...i,autoplay:!1}),l=St(this.finishedTime??this.time);r.setWithVelocity(s.sample(l-pM).value,s.sample(l).value,pM),s.stop()}};var Kw=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(pr.test(e)||e==="0")&&!e.startsWith("url("));function aj(e){let t=e[0];if(e.length===1)return!0;for(let r=0;r<e.length;r++)if(e[r]!==t)return!0}function mM(e,t,r,o){let n=e[0];if(n===null)return!1;if(t==="display"||t==="visibility")return!0;let a=e[e.length-1],i=Kw(n,t),s=Kw(a,t);return ha(i===s,`You are trying to animate ${t} from "${n}" to "${a}". "${i?a:n}" is not an animatable value.`,"value-not-animatable"),!i||!s?!1:aj(e)||(r==="spring"||Vs(r))&&o}function Pu(e){e.duration=0,e.type}var ij=new Set(["opacity","clipPath","filter","transform"]),sj=Es(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function gM(e){let{motionValue:t,name:r,repeatDelay:o,repeatType:n,damping:a,type:i}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;let{onUpdate:l,transformTemplate:u}=t.owner.getProps();return sj()&&r&&ij.has(r)&&(r!=="transform"||!u)&&!l&&!o&&n!=="mirror"&&a!==0&&i!=="inertia"}var lj=40,Mf=class extends Ii{constructor({autoplay:t=!0,delay:r=0,type:o="keyframes",repeat:n=0,repeatDelay:a=0,repeatType:i="loop",keyframes:s,name:l,motionValue:u,element:c,...d}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=xt.now();let f={autoplay:t,delay:r,type:o,repeat:n,repeatDelay:a,repeatType:i,name:l,motionValue:u,element:c,...d},p=c?.KeyframeResolver||Ca;this.keyframeResolver=new p(s,(h,m,x)=>this.onKeyframesResolved(h,m,f,!x),l,u,c),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,r,o,n){this.keyframeResolver=void 0;let{name:a,type:i,velocity:s,delay:l,isHandoff:u,onUpdate:c}=o;this.resolvedAt=xt.now(),mM(t,a,i,s)||((cr.instantAnimations||!l)&&c?.(Iu(t,o,r)),t[0]=t[t.length-1],Pu(o),o.repeat=0);let f={startTime:n?this.resolvedAt?this.resolvedAt-this.createdAt>lj?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:r,...o,keyframes:t},p=!u&&gM(f)?new Wg({...f,element:f.motionValue.owner.current}):new wa(f);p.finished.then(()=>this.notifyFinished()).catch(mt),this.pendingTimeline&&(this.stopTimeline=p.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=p}get finished(){return this._animation?this.animation.finished:this._finished}then(t,r){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),jw()),this._animation}get duration(){return this.animation.duration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}};var Gg=class{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,r){for(let o=0;o<this.animations.length;o++)this.animations[o][t]=r}attachTimeline(t){let r=this.animations.map(o=>o.attachTimeline(t));return()=>{r.forEach((o,n)=>{o&&o(),this.animations[n].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let r=0;r<this.animations.length;r++)t=Math.max(t,this.animations[r].duration);return t}runAll(t){this.animations.forEach(r=>r[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}};var Ef=class extends Gg{then(t,r){return this.finished.finally(t).then(()=>{})}};var uj=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function cj(e){let t=uj.exec(e);if(!t)return[,];let[,r,o,n]=t;return[`--${r??o}`,n]}var dj=4;function Xw(e,t,r=1){Lt(r<=dj,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");let[o,n]=cj(e);if(!o)return;let a=window.getComputedStyle(t).getPropertyValue(o);if(a){let i=a.trim();return af(i)?parseFloat(i):i}return Ds(n)?Xw(n,t,r+1):n}function Bs(e,t){return e?.[t]??e?.default??e}var Af=new Set(["width","height","top","left","right","bottom",...pn]);var hM={test:e=>e==="auto",parse:e=>e};var jg=e=>t=>t.test(e);var Yw=[zn,re,fr,fn,Aw,Ew,hM],Qw=e=>Yw.find(jg(e));function vM(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||lf(e):!0}var fj=new Set(["brightness","contrast","saturate","opacity"]);function pj(e){let[t,r]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;let[o]=r.match(Su)||[];if(!o)return e;let n=r.replace(o,""),a=fj.has(t)?1:0;return o!==r&&(a*=100),t+"("+a+n+")"}var mj=/\b([a-z-]*)\(.*?\)/gu,Df={...pr,getAnimatableNone:e=>{let t=e.match(mj);return t?t.map(pj).join(" "):e}};var Zw={...zn,transform:Math.round};var yM={rotate:fn,rotateX:fn,rotateY:fn,rotateZ:fn,scale:Cf,scaleX:Cf,scaleY:Cf,scaleZ:Cf,skew:fn,skewX:fn,skewY:fn,distance:re,translateX:re,translateY:re,translateZ:re,x:re,y:re,z:re,perspective:re,transformPerspective:re,opacity:ya,originX:Ag,originY:Ag,originZ:re};var Hs={borderWidth:re,borderTopWidth:re,borderRightWidth:re,borderBottomWidth:re,borderLeftWidth:re,borderRadius:re,radius:re,borderTopLeftRadius:re,borderTopRightRadius:re,borderBottomRightRadius:re,borderBottomLeftRadius:re,width:re,maxWidth:re,height:re,maxHeight:re,top:re,right:re,bottom:re,left:re,padding:re,paddingTop:re,paddingRight:re,paddingBottom:re,paddingLeft:re,margin:re,marginTop:re,marginRight:re,marginBottom:re,marginLeft:re,backgroundPositionX:re,backgroundPositionY:re,...yM,zIndex:Zw,fillOpacity:ya,strokeOpacity:ya,numOctaves:Zw};var xM={...Hs,color:st,backgroundColor:st,outlineColor:st,fill:st,stroke:st,borderColor:st,borderTopColor:st,borderRightColor:st,borderBottomColor:st,borderLeftColor:st,filter:Df,WebkitFilter:Df},Nf=e=>xM[e];function _f(e,t){let r=Nf(e);return r!==Df&&(r=pr),r.getAnimatableNone?r.getAnimatableNone(t):void 0}var gj=new Set(["auto","none","0"]);function wM(e,t,r){let o=0,n;for(;o<e.length&&!n;){let a=e[o];typeof a=="string"&&!gj.has(a)&&Li(a).values.length&&(n=e[o]),o++}if(n&&r)for(let a of t)e[a]=_f(r,n)}var Of=class extends Ca{constructor(t,r,o,n,a){super(t,r,o,n,a,!0)}readKeyframes(){let{unresolvedKeyframes:t,element:r,name:o}=this;if(!r||!r.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let u=t[l];if(typeof u=="string"&&(u=u.trim(),Ds(u))){let c=Xw(u,r.current);c!==void 0&&(t[l]=c),l===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!Af.has(o)||t.length!==2)return;let[n,a]=t,i=Qw(n),s=Qw(a);if(i!==s)if(Uw(i)&&Uw(s))for(let l=0;l<t.length;l++){let u=t[l];typeof u=="string"&&(t[l]=parseFloat(u))}else Pi[o]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:t,name:r}=this,o=[];for(let n=0;n<t.length;n++)(t[n]===null||vM(t[n]))&&o.push(n);o.length&&wM(t,o,r)}measureInitialState(){let{element:t,unresolvedKeyframes:r,name:o}=this;if(!t||!t.current)return;o==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Pi[o](t.measureViewportBox(),window.getComputedStyle(t.current)),r[0]=this.measuredOrigin;let n=r[r.length-1];n!==void 0&&t.getValue(o,n).jump(n,!1)}measureEndState(){let{element:t,name:r,unresolvedKeyframes:o}=this;if(!t||!t.current)return;let n=t.getValue(r);n&&n.jump(this.measuredOrigin,!1);let a=o.length-1,i=o[a];o[a]=Pi[r](t.measureViewportBox(),window.getComputedStyle(t.current)),i!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=i),this.removedTransforms?.length&&this.removedTransforms.forEach(([s,l])=>{t.getValue(s).set(l)}),this.resolveNoneKeyframes()}};function Us(e,t,r){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let o=document;t&&(o=t.current);let n=r?.[e]??o.querySelectorAll(e);return n?Array.from(n):[]}return Array.from(e)}var Ff=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Vf(e){return sf(e)&&"offsetHeight"in e}var CM=30,hj=e=>!isNaN(parseFloat(e)),zs={current:void 0},qg=class{constructor(t,r={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=o=>{let n=xt.now();if(this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(o),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(let a of this.dependents)a.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=r.owner}setCurrent(t){this.current=t,this.updatedAt=xt.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=hj(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,r){this.events[t]||(this.events[t]=new va);let o=this.events[t].add(r);return t==="change"?()=>{o(),xe.read(()=>{this.events.change.getSize()||this.stop()})}:o}clearListeners(){for(let t in this.events)this.events[t].clear()}attach(t,r){this.passiveEffect=t,this.stopPassiveEffect=r}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,r,o){this.set(r),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-o}jump(t,r=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,r&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return zs.current&&zs.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let t=xt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>CM)return 0;let r=Math.min(this.updatedAt-this.prevUpdatedAt,CM);return uf(parseFloat(this.current)-parseFloat(this.prevFrameValue),r)}start(t){return this.stop(),new Promise(r=>{this.hasAnimated=!0,this.animation=t(r),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function Kr(e,t){return new qg(e,t)}var{schedule:Ws,cancel:vj}=kg(queueMicrotask,!1);var _o={x:!1,y:!1};function $g(){return _o.x||_o.y}function Jw(e){return e==="x"||e==="y"?_o[e]?null:(_o[e]=!0,()=>{_o[e]=!1}):_o.x||_o.y?null:(_o.x=_o.y=!0,()=>{_o.x=_o.y=!1})}function Kg(e,t){let r=Us(e),o=new AbortController,n={passive:!0,...t,signal:o.signal};return[r,n,()=>o.abort()]}function SM(e){return!(e.pointerType==="touch"||$g())}function eC(e,t,r={}){let[o,n,a]=Kg(e,r),i=s=>{if(!SM(s))return;let{target:l}=s,u=t(l,s);if(typeof u!="function"||!l)return;let c=d=>{SM(d)&&(u(d),l.removeEventListener("pointerleave",c))};l.addEventListener("pointerleave",c,n)};return o.forEach(s=>{s.addEventListener("pointerenter",i,n)}),a}var tC=(e,t)=>t?e===t?!0:tC(e,t.parentElement):!1;var Gs=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;var yj=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function bM(e){return yj.has(e.tagName)||e.tabIndex!==-1}var Tu=new WeakSet;function RM(e){return t=>{t.key==="Enter"&&e(t)}}function rC(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}var LM=(e,t)=>{let r=e.currentTarget;if(!r)return;let o=RM(()=>{if(Tu.has(r))return;rC(r,"down");let n=RM(()=>{rC(r,"up")}),a=()=>rC(r,"cancel");r.addEventListener("keyup",n,t),r.addEventListener("blur",a,t)});r.addEventListener("keydown",o,t),r.addEventListener("blur",()=>r.removeEventListener("keydown",o),t)};function IM(e){return Gs(e)&&!$g()}function oC(e,t,r={}){let[o,n,a]=Kg(e,r),i=s=>{let l=s.currentTarget;if(!IM(s))return;Tu.add(l);let u=t(l,s),c=(p,h)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",f),Tu.has(l)&&Tu.delete(l),IM(p)&&typeof u=="function"&&u(p,{success:h})},d=p=>{c(p,l===window||l===document||r.useGlobalTarget||tC(l,p.target))},f=p=>{c(p,!1)};window.addEventListener("pointerup",d,n),window.addEventListener("pointercancel",f,n)};return o.forEach(s=>{(r.useGlobalTarget?window:s).addEventListener("pointerdown",i,n),Vf(s)&&(s.addEventListener("focus",u=>LM(u,n)),!bM(s)&&!s.hasAttribute("tabindex")&&(s.tabIndex=0))}),a}function js(e){return sf(e)&&"ownerSVGElement"in e}function Bf(e){return js(e)&&e.tagName==="svg"}function nC(...e){let t=!Array.isArray(e[0]),r=t?0:-1,o=e[0+r],n=e[1+r],a=e[2+r],i=e[3+r],s=Bg(n,a,i);return t?s(o):s}var Me=e=>!!(e&&e.getVelocity);var xj=[...Yw,st,pr],aC=e=>xj.find(jg(e));var Xg=R(E(),1),Sa=R(E(),1);var PM=R(E(),1),Ti=(0,PM.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});var iC=class extends Xg.Component{getSnapshotBeforeUpdate(t){let r=this.props.childRef.current;if(r&&t.isPresent&&!this.props.isPresent){let o=r.offsetParent,n=Vf(o)&&o.offsetWidth||0,a=this.props.sizeRef.current;a.height=r.offsetHeight||0,a.width=r.offsetWidth||0,a.top=r.offsetTop,a.left=r.offsetLeft,a.right=n-a.width-a.left}return null}componentDidUpdate(){}render(){return this.props.children}};function kM({children:e,isPresent:t,anchorX:r,root:o}){let n=(0,Sa.useId)(),a=(0,Sa.useRef)(null),i=(0,Sa.useRef)({width:0,height:0,top:0,left:0,right:0}),{nonce:s}=(0,Sa.useContext)(Ti);return(0,Sa.useInsertionEffect)(()=>{let{width:l,height:u,top:c,left:d,right:f}=i.current;if(t||!a.current||!l||!u)return;let p=r==="left"?`left: ${d}`:`right: ${f}`;a.current.dataset.motionPopId=n;let h=document.createElement("style");s&&(h.nonce=s);let m=o??document.head;return m.appendChild(h),h.sheet&&h.sheet.insertRule(`
|
|
10
|
+
[data-motion-pop-id="${n}"] {
|
|
4
11
|
position: absolute !important;
|
|
5
12
|
width: ${l}px !important;
|
|
6
13
|
height: ${u}px !important;
|
|
7
|
-
${
|
|
14
|
+
${p}px !important;
|
|
8
15
|
top: ${c}px !important;
|
|
9
16
|
}
|
|
10
|
-
`),()=>{g.contains(p)&&g.removeChild(p)}},[t]),(0,Ub.jsx)(cp,{isPresent:t,childRef:n,sizeRef:s,children:Pc.cloneElement(e,{ref:n})})}var qb=({children:e,initial:t,isPresent:o,onExitComplete:r,custom:a,presenceAffectsLayout:n,mode:s,anchorX:i,root:l})=>{let u=Io(aN),c=(0,Vl.useId)(),d=!0,f=(0,Vl.useMemo)(()=>(d=!1,{id:c,initial:t,isPresent:o,custom:a,onExitComplete:m=>{u.set(m,!0);for(let p of u.values())if(!p)return;r&&r()},register:m=>(u.set(m,!1),()=>u.delete(m))}),[o,u,r]);return n&&d&&(f={...f}),(0,Vl.useMemo)(()=>{u.forEach((m,p)=>u.set(p,!1))},[o]),zb.useEffect(()=>{!o&&!u.size&&r&&r()},[o]),s==="popLayout"&&(e=(0,dp.jsx)(Gb,{isPresent:o,anchorX:i,root:l,children:e})),(0,dp.jsx)(fa.Provider,{value:f,children:e})};function aN(){return new Map}var ba=b(A(),1);function Tc(e=!0){let t=(0,ba.useContext)(fa);if(t===null)return[!0,null];let{isPresent:o,onExitComplete:r,register:a}=t,n=(0,ba.useId)();(0,ba.useEffect)(()=>{if(e)return a(n)},[e]);let s=(0,ba.useCallback)(()=>e&&r&&r(n),[n,r,e]);return!o&&r?[!1,s]:[!0]}var Mc=b(A(),1),Bl=e=>e.key||"";function fp(e){let t=[];return Mc.Children.forEach(e,o=>{(0,Mc.isValidElement)(o)&&t.push(o)}),t}var Fr=({children:e,custom:t,initial:o=!0,onExitComplete:r,presenceAffectsLayout:a=!0,mode:n="sync",propagate:s=!1,anchorX:i="left",root:l})=>{let[u,c]=Tc(s),d=(0,pr.useMemo)(()=>fp(e),[e]),f=s&&!u?[]:d.map(Bl),m=(0,pr.useRef)(!0),p=(0,pr.useRef)(d),g=Io(()=>new Map),[h,v]=(0,pr.useState)(d),[x,y]=(0,pr.useState)(d);da(()=>{m.current=!1,p.current=d;for(let w=0;w<x.length;w++){let I=Bl(x[w]);f.includes(I)?g.delete(I):g.get(I)!==!0&&g.set(I,!1)}},[x,f.length,f.join("-")]);let R=[];if(d!==h){let w=[...d];for(let I=0;I<x.length;I++){let L=x[I],P=Bl(L);f.includes(P)||(w.splice(I,0,L),R.push(L))}return n==="wait"&&R.length&&(w=R),y(fp(w)),v(d),null}let{forceRender:C}=(0,pr.useContext)(xs);return(0,Hl.jsx)(Hl.Fragment,{children:x.map(w=>{let I=Bl(w),L=s&&!u?!1:d===x||f.includes(I),P=()=>{if(g.has(I))g.set(I,!0);else return;let T=!0;g.forEach(O=>{O||(T=!1)}),T&&(C?.(),y(p.current),s&&c?.(),r&&r())};return(0,Hl.jsx)(qb,{isPresent:L,initial:!m.current||o?void 0:!1,custom:t,presenceAffectsLayout:a,mode:n,root:l,onExitComplete:L?void 0:P,anchorX:i,children:w},I)})})};var Wb=b(A(),1),kc=(0,Wb.createContext)({strict:!1});var $b={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Or={};for(let e in $b)Or[e]={isEnabled:t=>$b[e].some(o=>!!t[o])};function jb(e){for(let t in e)Or[t]={...Or[t],...e[t]}}var nN=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Ul(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||nN.has(e)}var Kb=e=>!Ul(e);function sN(e){typeof e=="function"&&(Kb=t=>t.startsWith("on")?!Ul(t):e(t))}try{sN(sA("@emotion/is-prop-valid").default)}catch{}function Xb(e,t,o){let r={};for(let a in e)a==="values"&&typeof e.values=="object"||(Kb(a)||o===!0&&Ul(a)||!t&&!Ul(a)||e.draggable&&a.startsWith("onDrag"))&&(r[a]=e[a]);return r}var Gc=b(D(),1);var Fs=b(A(),1);var Yb=b(A(),1),Ca=(0,Yb.createContext)({});var Ec=b(A(),1);function wa(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function _r(e){return typeof e=="string"||Array.isArray(e)}var Ac=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Gl=["initial",...Ac];function wn(e){return wa(e.animate)||Gl.some(t=>_r(e[t]))}function Dc(e){return!!(wn(e)||e.variants)}function Zb(e,t){if(wn(e)){let{initial:o,animate:r}=e;return{initial:o===!1||_r(o)?o:void 0,animate:_r(r)?r:void 0}}return e.inherit!==!1?t:{}}function Jb(e){let{initial:t,animate:o}=Zb(e,(0,Ec.useContext)(Ca));return(0,Ec.useMemo)(()=>({initial:t,animate:o}),[Qb(t),Qb(o)])}function Qb(e){return Array.isArray(e)?e.join(" "):e}var ks=b(A(),1);var oC=b(A(),1);var Sn={};function eC(e){for(let t in e)Sn[t]=e[t],ln(t)&&(Sn[t].isCSSVariable=!0)}function Nc(e,{layout:t,layoutId:o}){return mo.has(e)||e.startsWith("origin")||(t||o!==void 0)&&(!!Sn[e]||e==="opacity")}var iN={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},lN=Ko.length;function tC(e,t,o){let r="",a=!0;for(let n=0;n<lN;n++){let s=Ko[n],i=e[s];if(i===void 0)continue;let l=!0;if(typeof i=="number"?l=i===(s.startsWith("scale")?1:0):l=parseFloat(i)===0,!l||o){let u=Fl(i,hn[s]);if(!l){a=!1;let c=iN[s]||s;r+=`${c}(${u}) `}o&&(t[s]=u)}}return r=r.trim(),o?r=o(t,a?"":r):a&&(r="none"),r}function Ps(e,t,o){let{style:r,vars:a,transformOrigin:n}=e,s=!1,i=!1;for(let l in t){let u=t[l];if(mo.has(l)){s=!0;continue}else if(ln(l)){a[l]=u;continue}else{let c=Fl(u,hn[l]);l.startsWith("origin")?(i=!0,n[l]=c):r[l]=c}}if(t.transform||(s||o?r.transform=tC(t,e.transform,o):r.transform&&(r.transform="none")),i){let{originX:l="50%",originY:u="50%",originZ:c=0}=n;r.transformOrigin=`${l} ${u} ${c}`}}var Ts=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function mp(e,t,o){for(let r in t)!ke(t[r])&&!Nc(r,o)&&(e[r]=t[r])}function uN({transformTemplate:e},t){return(0,oC.useMemo)(()=>{let o=Ts();return Ps(o,t,e),Object.assign({},o.vars,o.style)},[t])}function cN(e,t){let o=e.style||{},r={};return mp(r,o,e),Object.assign(r,uN(e,t)),r}function rC(e,t){let o={},r=cN(e,t);return e.drag&&e.dragListener!==!1&&(o.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(o.tabIndex=0),o.style=r,o}var nC=b(A(),1);var dN={offset:"stroke-dashoffset",array:"stroke-dasharray"},fN={offset:"strokeDashoffset",array:"strokeDasharray"};function aC(e,t,o=1,r=0,a=!0){e.pathLength=1;let n=a?dN:fN;e[n.offset]=ae.transform(-r);let s=ae.transform(t),i=ae.transform(o);e[n.array]=`${s} ${i}`}function Fc(e,{attrX:t,attrY:o,attrScale:r,pathLength:a,pathSpacing:n=1,pathOffset:s=0,...i},l,u,c){if(Ps(e,i,u),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:d,style:f}=e;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),f.transform&&(f.transformBox=c?.transformBox??"fill-box",delete d.transformBox),t!==void 0&&(d.x=t),o!==void 0&&(d.y=o),r!==void 0&&(d.scale=r),a!==void 0&&aC(d,a,n,s,!1)}var Oc=()=>({...Ts(),attrs:{}});var _c=e=>typeof e=="string"&&e.toLowerCase()==="svg";function sC(e,t,o,r){let a=(0,nC.useMemo)(()=>{let n=Oc();return Fc(n,t,_c(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let n={};mp(n,e.style,e),a.style={...n,...a.style}}return a}var iC=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Ms(e){return typeof e!="string"||e.includes("-")?!1:!!(iC.indexOf(e)>-1||/[A-Z]/u.test(e))}function lC(e,t,o,{latestValues:r},a,n=!1){let i=(Ms(e)?sC:rC)(t,r,a,e),l=Xb(t,typeof e=="string",n),u=e!==ks.Fragment?{...l,...i,ref:o}:{},{children:c}=t,d=(0,ks.useMemo)(()=>ke(c)?c.get():c,[c]);return(0,ks.createElement)(e,{...u,children:d})}var pp=b(A(),1);function uC(e){let t=[{},{}];return e?.values.forEach((o,r)=>{t[0][r]=o.get(),t[1][r]=o.getVelocity()}),t}function As(e,t,o,r){if(typeof t=="function"){let[a,n]=uC(r);t=t(o!==void 0?o:e.custom,a,n)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){let[a,n]=uC(r);t=t(o!==void 0?o:e.custom,a,n)}return t}function Ds(e){return ke(e)?e.get():e}function mN({scrapeMotionValuesFromProps:e,createRenderState:t},o,r,a){return{latestValues:pN(o,r,a,e),renderState:t()}}function pN(e,t,o,r){let a={},n=r(e,{});for(let f in n)a[f]=Ds(n[f]);let{initial:s,animate:i}=e,l=wn(e),u=Dc(e);t&&u&&!l&&e.inherit!==!1&&(s===void 0&&(s=t.initial),i===void 0&&(i=t.animate));let c=o?o.initial===!1:!1;c=c||s===!1;let d=c?i:s;if(d&&typeof d!="boolean"&&!wa(d)){let f=Array.isArray(d)?d:[d];for(let m=0;m<f.length;m++){let p=As(e,f[m]);if(p){let{transitionEnd:g,transition:h,...v}=p;for(let x in v){let y=v[x];if(Array.isArray(y)){let R=c?y.length-1:0;y=y[R]}y!==null&&(a[x]=y)}for(let x in g)a[x]=g[x]}}}return a}var Vc=e=>(t,o)=>{let r=(0,pp.useContext)(Ca),a=(0,pp.useContext)(fa),n=()=>mN(e,t,r,a);return o?n():Io(n)};function Es(e,t,o){let{style:r}=e,a={};for(let n in r)(ke(r[n])||t.style&&ke(t.style[n])||Nc(n,e)||o?.getValue(n)?.liveStyle!==void 0)&&(a[n]=r[n]);return a}var cC=Vc({scrapeMotionValuesFromProps:Es,createRenderState:Ts});function Bc(e,t,o){let r=Es(e,t,o);for(let a in e)if(ke(e[a])||ke(t[a])){let n=Ko.indexOf(a)!==-1?"attr"+a.charAt(0).toUpperCase()+a.substring(1):a;r[n]=e[a]}return r}var dC=Vc({scrapeMotionValuesFromProps:Bc,createRenderState:Oc});var fC=Symbol.for("motionComponentSymbol");var mC=b(A(),1);function Vr(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function pC(e,t,o){return(0,mC.useCallback)(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),o&&(typeof o=="function"?o(r):Vr(o)&&(o.current=r))},[t])}var oo=b(A(),1);var Ns=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase();var gN="framerAppearId",Hc="data-"+Ns(gN);var gC=b(A(),1),Uc=(0,gC.createContext)({});function hC(e,t,o,r,a){let{visualElement:n}=(0,oo.useContext)(Ca),s=(0,oo.useContext)(kc),i=(0,oo.useContext)(fa),l=(0,oo.useContext)(ya).reducedMotion,u=(0,oo.useRef)(null);r=r||s.renderer,!u.current&&r&&(u.current=r(e,{visualState:t,parent:n,props:o,presenceContext:i,blockInitialAnimation:i?i.initial===!1:!1,reducedMotionConfig:l}));let c=u.current,d=(0,oo.useContext)(Uc);c&&!c.projection&&a&&(c.type==="html"||c.type==="svg")&&hN(u.current,o,a,d);let f=(0,oo.useRef)(!1);(0,oo.useInsertionEffect)(()=>{c&&f.current&&c.update(o,i)});let m=o[Hc],p=(0,oo.useRef)(!!m&&!window.MotionHandoffIsComplete?.(m)&&window.MotionHasOptimisedAnimation?.(m));return da(()=>{c&&(f.current=!0,window.MotionIsMounted=!0,c.updateFeatures(),c.scheduleRenderMicrotask(),p.current&&c.animationState&&c.animationState.animateChanges())}),(0,oo.useEffect)(()=>{c&&(!p.current&&c.animationState&&c.animationState.animateChanges(),p.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(m)}),p.current=!1),c.enteringChildren=void 0)}),c}function hN(e,t,o,r){let{layoutId:a,layout:n,drag:s,dragConstraints:i,layoutScroll:l,layoutRoot:u,layoutCrossfade:c}=t;e.projection=new o(e.latestValues,t["data-framer-portal-id"]?void 0:xC(e.parent)),e.projection.setOptions({layoutId:a,layout:n,alwaysMeasureLayout:!!s||i&&Vr(i),visualElement:e,animationType:typeof n=="string"?n:"both",initialPromotionConfig:r,crossfade:c,layoutScroll:l,layoutRoot:u})}function xC(e){if(e)return e.options.allowProjection!==!1?e.projection:xC(e.parent)}function zc(e,{forwardMotionProps:t=!1}={},o,r){o&&jb(o);let a=Ms(e)?dC:cC;function n(i,l){let u,c={...(0,Fs.useContext)(ya),...i,layoutId:xN(i)},{isStatic:d}=c,f=Jb(i),m=a(i,d);if(!d&&vs){vN(c,o);let p=yN(c);u=p.MeasureLayout,f.visualElement=hC(e,m,c,r,p.ProjectionNode)}return(0,Gc.jsxs)(Ca.Provider,{value:f,children:[u&&f.visualElement?(0,Gc.jsx)(u,{visualElement:f.visualElement,...c}):null,lC(e,i,pC(m,f.visualElement,l),m,d,t)]})}n.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;let s=(0,Fs.forwardRef)(n);return s[fC]=e,s}function xN({layoutId:e}){let t=(0,Fs.useContext)(xs).id;return t&&e!==void 0?t+"-"+e:e}function vN(e,t){let o=(0,Fs.useContext)(kc).strict}function yN(e){let{drag:t,layout:o}=Or;if(!t&&!o)return{};let r={...t,...o};return{MeasureLayout:t?.isEnabled(e)||o?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function vC(e,t){if(typeof Proxy>"u")return zc;let o=new Map,r=(n,s)=>zc(n,s,e,t),a=(n,s)=>r(n,s);return new Proxy(a,{get:(n,s)=>s==="create"?r:(o.has(s)||o.set(s,zc(s,void 0,e,t)),o.get(s))})}var NC=b(A(),1);function qc({top:e,left:t,right:o,bottom:r}){return{x:{min:t,max:o},y:{min:e,max:r}}}function yC({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function bC(e,t){if(!t)return e;let o=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:o.y,left:o.x,bottom:r.y,right:r.x}}function gp(e){return e===void 0||e===1}function Wc({scale:e,scaleX:t,scaleY:o}){return!gp(e)||!gp(t)||!gp(o)}function Br(e){return Wc(e)||hp(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function hp(e){return CC(e.x)||CC(e.y)}function CC(e){return e&&e!=="0%"}function zl(e,t,o){let r=e-o,a=t*r;return o+a}function wC(e,t,o,r,a){return a!==void 0&&(e=zl(e,a,r)),zl(e,o,r)+t}function xp(e,t=0,o=1,r,a){e.min=wC(e.min,t,o,r,a),e.max=wC(e.max,t,o,r,a)}function vp(e,{x:t,y:o}){xp(e.x,t.translate,t.scale,t.originPoint),xp(e.y,o.translate,o.scale,o.originPoint)}var SC=.999999999999,RC=1.0000000000001;function LC(e,t,o,r=!1){let a=o.length;if(!a)return;t.x=t.y=1;let n,s;for(let i=0;i<a;i++){n=o[i],s=n.projectionDelta;let{visualElement:l}=n.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&n.options.layoutScroll&&n.scroll&&n!==n.root&&Rn(e,{x:-n.scroll.offset.x,y:-n.scroll.offset.y}),s&&(t.x*=s.x.scale,t.y*=s.y.scale,vp(e,s)),r&&Br(n.latestValues)&&Rn(e,n.latestValues))}t.x<RC&&t.x>SC&&(t.x=1),t.y<RC&&t.y>SC&&(t.y=1)}function Sa(e,t){e.min=e.min+t,e.max=e.max+t}function IC(e,t,o,r,a=.5){let n=Ce(e.min,e.max,a);xp(e,t,o,n,r)}function Rn(e,t){IC(e.x,t.x,t.scaleX,t.scale,t.originX),IC(e.y,t.y,t.scaleY,t.scale,t.originY)}function yp(e,t){return qc(bC(e.getBoundingClientRect(),t))}function PC(e,t,o){let r=yp(e,o),{scroll:a}=t;return a&&(Sa(r.x,a.offset.x),Sa(r.y,a.offset.y)),r}var TC=()=>({translate:0,scale:1,origin:0,originPoint:0}),In=()=>({x:TC(),y:TC()}),MC=()=>({min:0,max:0}),Ue=()=>({x:MC(),y:MC()});var ql={current:null},$c={current:!1};function kC(){if($c.current=!0,!!vs)if(window.matchMedia){let e=window.matchMedia("(prefers-reduced-motion)"),t=()=>ql.current=e.matches;e.addEventListener("change",t),t()}else ql.current=!1}var Ra=new WeakMap;function AC(e,t,o){for(let r in t){let a=t[r],n=o[r];if(ke(a))e.addValue(r,a);else if(ke(n))e.addValue(r,to(a,{owner:e}));else if(n!==a)if(e.hasValue(r)){let s=e.getValue(r);s.liveStyle===!0?s.jump(a):s.hasAnimated||s.set(a)}else{let s=e.getStaticValue(r);e.addValue(r,to(s!==void 0?s:a,{owner:e}))}}for(let r in o)t[r]===void 0&&e.removeValue(r);return t}var DC=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],Os=class{scrapeMotionValuesFromProps(t,o,r){return{}}constructor({parent:t,props:o,presenceContext:r,reducedMotionConfig:a,blockInitialAnimation:n,visualState:s},i={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Er,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let f=ot.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,ve.render(this.render,!1,!0))};let{latestValues:l,renderState:u}=s;this.latestValues=l,this.baseTarget={...l},this.initialValues=o.initial?{...l}:{},this.renderState=u,this.parent=t,this.props=o,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=a,this.options=i,this.blockInitialAnimation=!!n,this.isControllingVariants=wn(o),this.isVariantNode=Dc(o),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);let{willChange:c,...d}=this.scrapeMotionValuesFromProps(o,{},this);for(let f in d){let m=d[f];l[f]!==void 0&&ke(m)&&m.set(l[f])}}mount(t){this.current=t,Ra.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((o,r)=>this.bindToMotionValue(r,o)),$c.current||kC(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:ql.current,this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Tt(this.notifyUpdate),Tt(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(let t in this.events)this.events[t].clear();for(let t in this.features){let o=this.features[t];o&&(o.unmount(),o.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,o){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();let r=mo.has(t);r&&this.onBindTransform&&this.onBindTransform();let a=o.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&ve.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()}),n;window.MotionCheckAppearSync&&(n=window.MotionCheckAppearSync(this,t,o)),this.valueSubscriptions.set(t,()=>{a(),n&&n(),o.owner&&o.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Or){let o=Or[t];if(!o)continue;let{isEnabled:r,Feature:a}=o;if(!this.features[t]&&a&&r(this.props)&&(this.features[t]=new a(this)),this.features[t]){let n=this.features[t];n.isMounted?n.update():(n.mount(),n.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Ue()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,o){this.latestValues[t]=o}update(t,o){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=o;for(let r=0;r<DC.length;r++){let a=DC[r];this.propEventSubscriptions[a]&&(this.propEventSubscriptions[a](),delete this.propEventSubscriptions[a]);let n="on"+a,s=t[n];s&&(this.propEventSubscriptions[a]=this.on(a,s))}this.prevMotionValues=AC(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){let o=this.getClosestVariantNode();if(o)return o.variantChildren&&o.variantChildren.add(t),()=>o.variantChildren.delete(t)}addValue(t,o){let r=this.values.get(t);o!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,o),this.values.set(t,o),this.latestValues[t]=o.get())}removeValue(t){this.values.delete(t);let o=this.valueSubscriptions.get(t);o&&(o(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,o){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&o!==void 0&&(r=to(o===null?void 0:o,{owner:this}),this.addValue(t,r)),r}readValue(t,o){let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(al(r)||sl(r))?r=parseFloat(r):!up(r)&&kt.test(o)&&(r=El(t,o)),this.setBaseTarget(t,ke(r)?r.get():r)),ke(r)?r.get():r}setBaseTarget(t,o){this.baseTarget[t]=o}getBaseTarget(t){let{initial:o}=this.props,r;if(typeof o=="string"||typeof o=="object"){let n=As(this.props,o,this.presenceContext?.custom);n&&(r=n[t])}if(o&&r!==void 0)return r;let a=this.getBaseTargetFromProps(this.props,t);return a!==void 0&&!ke(a)?a:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,o){return this.events[t]||(this.events[t]=new Mr),this.events[t].add(o)}notify(t,...o){this.events[t]&&this.events[t].notify(...o)}scheduleRenderMicrotask(){yn.render(this.render)}};var _s=class extends Os{constructor(){super(...arguments),this.KeyframeResolver=Nl}sortInstanceNodePosition(t,o){return t.compareDocumentPosition(o)&2?1:-1}getBaseTargetFromProps(t,o){return t.style?t.style[o]:void 0}removeValueFromRenderState(t,{vars:o,style:r}){delete o[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:t}=this.props;ke(t)&&(this.childSubscription=t.on("change",o=>{this.current&&(this.current.textContent=`${o}`)}))}};function jc(e,{style:t,vars:o},r,a){let n=e.style,s;for(s in t)n[s]=t[s];a?.applyProjectionStyles(n,r);for(s in o)n.setProperty(s,o[s])}function bN(e){return window.getComputedStyle(e)}var Vs=class extends _s{constructor(){super(...arguments),this.type="html",this.renderInstance=jc}readValueFromInstance(t,o){if(mo.has(o))return this.projection?.isProjecting?Ll(o):qm(t,o);{let r=bN(t),a=(ln(o)?r.getPropertyValue(o):r[o])||0;return typeof a=="string"?a.trim():a}}measureInstanceViewportBox(t,{transformPagePoint:o}){return yp(t,o)}build(t,o,r){Ps(t,o,r.transformTemplate)}scrapeMotionValuesFromProps(t,o,r){return Es(t,o,r)}};var Kc=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function EC(e,t,o,r){jc(e,t,void 0,r);for(let a in t.attrs)e.setAttribute(Kc.has(a)?a:Ns(a),t.attrs[a])}var Bs=class extends _s{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ue}getBaseTargetFromProps(t,o){return t[o]}readValueFromInstance(t,o){if(mo.has(o)){let r=Dl(o);return r&&r.default||0}return o=Kc.has(o)?o:Ns(o),t.getAttribute(o)}scrapeMotionValuesFromProps(t,o,r){return Bc(t,o,r)}build(t,o,r){Fc(t,o,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,o,r,a){EC(t,o,r,a)}mount(t){this.isSVGTag=_c(t.tagName),super.mount(t)}};var FC=(e,t)=>Ms(e)?new Bs(t):new Vs(t,{allowProjection:e!==NC.Fragment});function gr(e,t,o){let r=e.getProps();return As(r,t,o!==void 0?o:r.custom,e)}var Wl=e=>Array.isArray(e);function CN(e,t,o){e.hasValue(t)?e.getValue(t).set(o):e.addValue(t,to(o))}function wN(e){return Wl(e)?e[e.length-1]||0:e}function $l(e,t){let o=gr(e,t),{transitionEnd:r={},transition:a={},...n}=o||{};n={...n,...r};for(let s in n){let i=wN(n[s]);CN(e,s,i)}}function OC(e){return!!(ke(e)&&e.add)}function jl(e,t){let o=e.getValue("willChange");if(OC(o))return o.add(t);if(!o&&Pt.WillChange){let r=new Pt.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function Xc(e){return e.props[Hc]}var SN=e=>e!==null;function _C(e,{repeat:t,repeatType:o="loop"},r){let a=e.filter(SN),n=t&&o!=="loop"&&t%2===1?0:a.length-1;return!n||r===void 0?a[n]:r}var RN={type:"spring",stiffness:500,damping:25,restSpeed:10},IN=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),LN={type:"keyframes",duration:.8},PN={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},VC=(e,{keyframes:t})=>t.length>2?LN:mo.has(e)?e.startsWith("scale")?IN(t[1]):RN:PN;function BC({when:e,delay:t,delayChildren:o,staggerChildren:r,staggerDirection:a,repeat:n,repeatType:s,repeatDelay:i,from:l,elapsed:u,...c}){return!!Object.keys(c).length}var Hs=(e,t,o,r={},a,n)=>s=>{let i=gn(r,e)||{},l=i.delay||r.delay||0,{elapsed:u=0}=r;u=u-at(l);let c={keyframes:Array.isArray(o)?o:[null,o],ease:"easeOut",velocity:t.getVelocity(),...i,delay:-u,onUpdate:f=>{t.set(f),i.onUpdate&&i.onUpdate(f)},onComplete:()=>{s(),i.onComplete&&i.onComplete()},name:e,motionValue:t,element:n?void 0:a};BC(i)||Object.assign(c,VC(e,c)),c.duration&&(c.duration=at(c.duration)),c.repeatDelay&&(c.repeatDelay=at(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let d=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(Is(c),c.delay===0&&(d=!0)),(Pt.instantAnimations||Pt.skipAnimations)&&(d=!0,Is(c),c.delay=0),c.allowFlatten=!i.type&&!i.ease,d&&!n&&t.get()!==void 0){let f=_C(c.keyframes,i);if(f!==void 0){ve.update(()=>{c.onUpdate(f),c.onComplete()});return}}return i.isSync?new Dr(c):new Tl(c)};function TN({protectedKeys:e,needsAnimating:t},o){let r=e.hasOwnProperty(o)&&t[o]!==!0;return t[o]=!1,r}function Us(e,t,{delay:o=0,transitionOverride:r,type:a}={}){let{transition:n=e.getDefaultTransition(),transitionEnd:s,...i}=t;r&&(n=r);let l=[],u=a&&e.animationState&&e.animationState.getState()[a];for(let c in i){let d=e.getValue(c,e.latestValues[c]??null),f=i[c];if(f===void 0||u&&TN(u,c))continue;let m={delay:o,...gn(n||{},c)},p=d.get();if(p!==void 0&&!d.isAnimating&&!Array.isArray(f)&&f===p&&!m.velocity)continue;let g=!1;if(window.MotionHandoffAnimation){let v=Xc(e);if(v){let x=window.MotionHandoffAnimation(v,c,ve);x!==null&&(m.startTime=x,g=!0)}}jl(e,c),d.start(Hs(c,d,f,e.shouldReduceMotion&&kl.has(c)?{type:!1}:m,e,g));let h=d.animation;h&&l.push(h)}return s&&Promise.all(l).then(()=>{ve.update(()=>{s&&$l(e,s)})}),l}function Yc(e,t,o,r=0,a=1){let n=Array.from(e).sort((u,c)=>u.sortNodePosition(c)).indexOf(t),s=e.size,i=(s-1)*r;return typeof o=="function"?o(n,s):a===1?n*r:i-n*r}function Zc(e,t,o={}){let r=gr(e,t,o.type==="exit"?e.presenceContext?.custom:void 0),{transition:a=e.getDefaultTransition()||{}}=r||{};o.transitionOverride&&(a=o.transitionOverride);let n=r?()=>Promise.all(Us(e,r,o)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(l=0)=>{let{delayChildren:u=0,staggerChildren:c,staggerDirection:d}=a;return MN(e,t,l,u,c,d,o)}:()=>Promise.resolve(),{when:i}=a;if(i){let[l,u]=i==="beforeChildren"?[n,s]:[s,n];return l().then(()=>u())}else return Promise.all([n(),s(o.delay)])}function MN(e,t,o=0,r=0,a=0,n=1,s){let i=[];for(let l of e.variantChildren)l.notify("AnimationStart",t),i.push(Zc(l,t,{...s,delay:o+(typeof r=="function"?0:r)+Yc(e.variantChildren,l,r,a,n)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(i)}function Qc(e,t,o={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){let a=t.map(n=>Zc(e,n,o));r=Promise.all(a)}else if(typeof t=="string")r=Zc(e,t,o);else{let a=typeof t=="function"?gr(e,t,o.custom):t;r=Promise.all(Us(e,a,o))}return r.then(()=>{e.notify("AnimationComplete",t)})}function bp(e,t){if(!Array.isArray(t))return!1;let o=t.length;if(o!==e.length)return!1;for(let r=0;r<o;r++)if(t[r]!==e[r])return!1;return!0}var kN=Gl.length;function Cp(e){if(!e)return;if(!e.isControllingVariants){let o=e.parent?Cp(e.parent)||{}:{};return e.props.initial!==void 0&&(o.initial=e.props.initial),o}let t={};for(let o=0;o<kN;o++){let r=Gl[o],a=e.props[r];(_r(a)||a===!1)&&(t[r]=a)}return t}var AN=[...Ac].reverse(),DN=Ac.length;function EN(e){return t=>Promise.all(t.map(({animation:o,options:r})=>Qc(e,o,r)))}function UC(e){let t=EN(e),o=HC(),r=!0,a=l=>(u,c)=>{let d=gr(e,c,l==="exit"?e.presenceContext?.custom:void 0);if(d){let{transition:f,transitionEnd:m,...p}=d;u={...u,...p,...m}}return u};function n(l){t=l(e)}function s(l){let{props:u}=e,c=Cp(e.parent)||{},d=[],f=new Set,m={},p=1/0;for(let h=0;h<DN;h++){let v=AN[h],x=o[v],y=u[v]!==void 0?u[v]:c[v],R=_r(y),C=v===l?x.isActive:null;C===!1&&(p=h);let w=y===c[v]&&y!==u[v]&&R;if(w&&r&&e.manuallyAnimateOnMount&&(w=!1),x.protectedKeys={...m},!x.isActive&&C===null||!y&&!x.prevProp||wa(y)||typeof y=="boolean")continue;let I=NN(x.prevProp,y),L=I||v===l&&x.isActive&&!w&&R||h>p&&R,P=!1,T=Array.isArray(y)?y:[y],O=T.reduce(a(v),{});C===!1&&(O={});let{prevResolvedValues:$={}}=x,W={...$,...O},N=G=>{L=!0,f.has(G)&&(P=!0,f.delete(G)),x.needsAnimating[G]=!0;let M=e.getValue(G);M&&(M.liveStyle=!1)};for(let G in W){let M=O[G],k=$[G];if(m.hasOwnProperty(G))continue;let re=!1;Wl(M)&&Wl(k)?re=!bp(M,k):re=M!==k,re?M!=null?N(G):f.add(G):M!==void 0&&f.has(G)?N(G):x.protectedKeys[G]=!0}x.prevProp=y,x.prevResolvedValues=O,x.isActive&&(m={...m,...O}),r&&e.blockInitialAnimation&&(L=!1);let q=w&&I;L&&(!q||P)&&d.push(...T.map(G=>{let M={type:v};if(typeof G=="string"&&r&&!q&&e.manuallyAnimateOnMount&&e.parent){let{parent:k}=e,re=gr(k,G);if(k.enteringChildren&&re){let{delayChildren:Se}=re.transition||{};M.delay=Yc(k.enteringChildren,e,Se)}}return{animation:G,options:M}}))}if(f.size){let h={};if(typeof u.initial!="boolean"){let v=gr(e,Array.isArray(u.initial)?u.initial[0]:u.initial);v&&v.transition&&(h.transition=v.transition)}f.forEach(v=>{let x=e.getBaseTarget(v),y=e.getValue(v);y&&(y.liveStyle=!0),h[v]=x??null}),d.push({animation:h})}let g=!!d.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(g=!1),r=!1,g?t(d):Promise.resolve()}function i(l,u){if(o[l].isActive===u)return Promise.resolve();e.variantChildren?.forEach(d=>d.animationState?.setActive(l,u)),o[l].isActive=u;let c=s(l);for(let d in o)o[d].protectedKeys={};return c}return{animateChanges:s,setActive:i,setAnimateFunction:n,getState:()=>o,reset:()=>{o=HC(),r=!0}}}function NN(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!bp(t,e):!1}function Ln(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function HC(){return{animate:Ln(!0),whileInView:Ln(),whileHover:Ln(),whileTap:Ln(),whileDrag:Ln(),whileFocus:Ln(),exit:Ln()}}var vt=class{constructor(t){this.isMounted=!1,this.node=t}update(){}};var Jc=class extends vt{constructor(t){super(t),t.animationState||(t.animationState=UC(t))}updateAnimationControlsSubscription(){let{animate:t}=this.node.getProps();wa(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:t}=this.node.getProps(),{animate:o}=this.node.prevProps||{};t!==o&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}};var FN=0,ed=class extends vt{constructor(){super(...arguments),this.id=FN++}update(){if(!this.node.presenceContext)return;let{isPresent:t,onExitComplete:o}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;let a=this.node.animationState.setActive("exit",!t);o&&!t&&a.then(()=>{o(this.id)})}mount(){let{register:t,onExitComplete:o}=this.node.presenceContext||{};o&&o(this.id),t&&(this.unmount=t(this.id))}unmount(){}};var GC={animation:{Feature:Jc},exit:{Feature:ed}};function Hr(e,t,o,r={passive:!0}){return e.addEventListener(t,o,r),()=>e.removeEventListener(t,o)}function Ur(e){return{point:{x:e.pageX,y:e.pageY}}}var zC=e=>t=>bn(t)&&e(t,Ur(t));function Ia(e,t,o,r){return Hr(e,t,zC(o),r)}var jC=1e-4,ON=1-jC,_N=1+jC,KC=.01,VN=0-KC,BN=0+KC;function ft(e){return e.max-e.min}function XC(e,t,o){return Math.abs(e-t)<=o}function qC(e,t,o,r=.5){e.origin=r,e.originPoint=Ce(t.min,t.max,e.origin),e.scale=ft(o)/ft(t),e.translate=Ce(o.min,o.max,e.origin)-e.originPoint,(e.scale>=ON&&e.scale<=_N||isNaN(e.scale))&&(e.scale=1),(e.translate>=VN&&e.translate<=BN||isNaN(e.translate))&&(e.translate=0)}function Gs(e,t,o,r){qC(e.x,t.x,o.x,r?r.originX:void 0),qC(e.y,t.y,o.y,r?r.originY:void 0)}function WC(e,t,o){e.min=o.min+t.min,e.max=e.min+ft(t)}function YC(e,t,o){WC(e.x,t.x,o.x),WC(e.y,t.y,o.y)}function $C(e,t,o){e.min=t.min-o.min,e.max=e.min+ft(t)}function zs(e,t,o){$C(e.x,t.x,o.x),$C(e.y,t.y,o.y)}function ro(e){return[e("x"),e("y")]}var td=({current:e})=>e?e.ownerDocument.defaultView:null;var ZC=(e,t)=>Math.abs(e-t);function QC(e,t){let o=ZC(e.x,t.x),r=ZC(e.y,t.y);return Math.sqrt(o**2+r**2)}var qs=class{constructor(t,o,{transformPagePoint:r,contextWindow:a=window,dragSnapToOrigin:n=!1,distanceThreshold:s=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let f=Sp(this.lastMoveEventInfo,this.history),m=this.startEvent!==null,p=QC(f.offset,{x:0,y:0})>=this.distanceThreshold;if(!m&&!p)return;let{point:g}=f,{timestamp:h}=tt;this.history.push({...g,timestamp:h});let{onStart:v,onMove:x}=this.handlers;m||(v&&v(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),x&&x(this.lastMoveEvent,f)},this.handlePointerMove=(f,m)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=wp(m,this.transformPagePoint),ve.update(this.updatePoint,!0)},this.handlePointerUp=(f,m)=>{this.end();let{onEnd:p,onSessionEnd:g,resumeAnimation:h}=this.handlers;if(this.dragSnapToOrigin&&h&&h(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let v=Sp(f.type==="pointercancel"?this.lastMoveEventInfo:wp(m,this.transformPagePoint),this.history);this.startEvent&&p&&p(f,v),g&&g(f,v)},!bn(t))return;this.dragSnapToOrigin=n,this.handlers=o,this.transformPagePoint=r,this.distanceThreshold=s,this.contextWindow=a||window;let i=Ur(t),l=wp(i,this.transformPagePoint),{point:u}=l,{timestamp:c}=tt;this.history=[{...u,timestamp:c}];let{onSessionStart:d}=o;d&&d(t,Sp(l,this.history)),this.removeListeners=Wo(Ia(this.contextWindow,"pointermove",this.handlePointerMove),Ia(this.contextWindow,"pointerup",this.handlePointerUp),Ia(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Tt(this.updatePoint)}};function wp(e,t){return t?{point:t(e.point)}:e}function JC(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Sp({point:e},t){return{point:e,delta:JC(e,ew(t)),offset:JC(e,HN(t)),velocity:UN(t,.1)}}function HN(e){return e[0]}function ew(e){return e[e.length-1]}function UN(e,t){if(e.length<2)return{x:0,y:0};let o=e.length-1,r=null,a=ew(e);for(;o>=0&&(r=e[o],!(a.timestamp-r.timestamp>at(t)));)o--;if(!r)return{x:0,y:0};let n=Rt(a.timestamp-r.timestamp);if(n===0)return{x:0,y:0};let s={x:(a.x-r.x)/n,y:(a.y-r.y)/n};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function nw(e,{min:t,max:o},r){return t!==void 0&&e<t?e=r?Ce(t,e,r.min):Math.max(e,t):o!==void 0&&e>o&&(e=r?Ce(o,e,r.max):Math.min(e,o)),e}function tw(e,t,o){return{min:t!==void 0?e.min+t:void 0,max:o!==void 0?e.max+o-(e.max-e.min):void 0}}function sw(e,{top:t,left:o,bottom:r,right:a}){return{x:tw(e.x,o,a),y:tw(e.y,t,r)}}function ow(e,t){let o=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([o,r]=[r,o]),{min:o,max:r}}function iw(e,t){return{x:ow(e.x,t.x),y:ow(e.y,t.y)}}function lw(e,t){let o=.5,r=ft(e),a=ft(t);return a>r?o=Lo(t.min,t.max-r,e.min):r>a&&(o=Lo(e.min,e.max-a,t.min)),xt(0,1,o)}function uw(e,t){let o={};return t.min!==void 0&&(o.min=t.min-e.min),t.max!==void 0&&(o.max=t.max-e.min),o}var od=.35;function cw(e=od){return e===!1?e=0:e===!0&&(e=od),{x:rw(e,"left","right"),y:rw(e,"top","bottom")}}function rw(e,t,o){return{min:aw(e,t),max:aw(e,o)}}function aw(e,t){return typeof e=="number"?e:e[t]||0}var GN=new WeakMap,ad=class{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Ue(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:o=!1,distanceThreshold:r}={}){let{presenceContext:a}=this.visualElement;if(a&&a.isPresent===!1)return;let n=d=>{let{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),o&&this.snapToCursor(Ur(d).point)},s=(d,f)=>{let{drag:m,dragPropagation:p,onDragStart:g}=this.getProps();if(m&&!p&&(this.openDragLock&&this.openDragLock(),this.openDragLock=rp(m),!this.openDragLock))return;this.latestPointerEvent=d,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),ro(v=>{let x=this.getAxisMotionValue(v).get()||0;if(Mt.test(x)){let{projection:y}=this.visualElement;if(y&&y.layout){let R=y.layout.layoutBox[v];R&&(x=ft(R)*(parseFloat(x)/100))}}this.originPoint[v]=x}),g&&ve.postRender(()=>g(d,f)),jl(this.visualElement,"transform");let{animationState:h}=this.visualElement;h&&h.setActive("whileDrag",!0)},i=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f;let{dragPropagation:m,dragDirectionLock:p,onDirectionLock:g,onDrag:h}=this.getProps();if(!m&&!this.openDragLock)return;let{offset:v}=f;if(p&&this.currentDirection===null){this.currentDirection=zN(v),this.currentDirection!==null&&g&&g(this.currentDirection);return}this.updateAxis("x",f.point,v),this.updateAxis("y",f.point,v),this.visualElement.render(),h&&h(d,f)},l=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f,this.stop(d,f),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>ro(d=>this.getAnimationState(d)==="paused"&&this.getAxisMotionValue(d).animation?.play()),{dragSnapToOrigin:c}=this.getProps();this.panSession=new qs(t,{onSessionStart:n,onStart:s,onMove:i,onSessionEnd:l,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:r,contextWindow:td(this.visualElement)})}stop(t,o){let r=t||this.latestPointerEvent,a=o||this.latestPanInfo,n=this.isDragging;if(this.cancel(),!n||!a||!r)return;let{velocity:s}=a;this.startAnimation(s);let{onDragEnd:i}=this.getProps();i&&ve.postRender(()=>i(r,a))}cancel(){this.isDragging=!1;let{projection:t,animationState:o}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;let{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),o&&o.setActive("whileDrag",!1)}updateAxis(t,o,r){let{drag:a}=this.getProps();if(!r||!rd(t,a,this.currentDirection))return;let n=this.getAxisMotionValue(t),s=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(s=nw(s,this.constraints[t],this.elastic[t])),n.set(s)}resolveConstraints(){let{dragConstraints:t,dragElastic:o}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,a=this.constraints;t&&Vr(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=sw(r.layoutBox,t):this.constraints=!1,this.elastic=cw(o),a!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&ro(n=>{this.constraints!==!1&&this.getAxisMotionValue(n)&&(this.constraints[n]=uw(r.layoutBox[n],this.constraints[n]))})}resolveRefConstraints(){let{dragConstraints:t,onMeasureDragConstraints:o}=this.getProps();if(!t||!Vr(t))return!1;let r=t.current;nt(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");let{projection:a}=this.visualElement;if(!a||!a.layout)return!1;let n=PC(r,a.root,this.visualElement.getTransformPagePoint()),s=iw(a.layout.layoutBox,n);if(o){let i=o(yC(s));this.hasMutatedConstraints=!!i,i&&(s=qc(i))}return s}startAnimation(t){let{drag:o,dragMomentum:r,dragElastic:a,dragTransition:n,dragSnapToOrigin:s,onDragTransitionEnd:i}=this.getProps(),l=this.constraints||{},u=ro(c=>{if(!rd(c,o,this.currentDirection))return;let d=l&&l[c]||{};s&&(d={min:0,max:0});let f=a?200:1e6,m=a?40:1e7,p={type:"inertia",velocity:r?t[c]:0,bounceStiffness:f,bounceDamping:m,timeConstant:750,restDelta:1,restSpeed:10,...n,...d};return this.startAxisValueAnimation(c,p)});return Promise.all(u).then(i)}startAxisValueAnimation(t,o){let r=this.getAxisMotionValue(t);return jl(this.visualElement,t),r.start(Hs(t,r,0,o,this.visualElement,!1))}stopAnimation(){ro(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){ro(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){let o=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),a=r[o];return a||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){ro(o=>{let{drag:r}=this.getProps();if(!rd(o,r,this.currentDirection))return;let{projection:a}=this.visualElement,n=this.getAxisMotionValue(o);if(a&&a.layout){let{min:s,max:i}=a.layout.layoutBox[o];n.set(t[o]-Ce(s,i,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:t,dragConstraints:o}=this.getProps(),{projection:r}=this.visualElement;if(!Vr(o)||!r||!this.constraints)return;this.stopAnimation();let a={x:0,y:0};ro(s=>{let i=this.getAxisMotionValue(s);if(i&&this.constraints!==!1){let l=i.get();a[s]=lw({min:l,max:l},this.constraints[s])}});let{transformTemplate:n}=this.visualElement.getProps();this.visualElement.current.style.transform=n?n({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),ro(s=>{if(!rd(s,t,null))return;let i=this.getAxisMotionValue(s),{min:l,max:u}=this.constraints[s];i.set(Ce(l,u,a[s]))})}addListeners(){if(!this.visualElement.current)return;GN.set(this.visualElement,this);let t=this.visualElement.current,o=Ia(t,"pointerdown",l=>{let{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(l)}),r=()=>{let{dragConstraints:l}=this.getProps();Vr(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:a}=this.visualElement,n=a.addEventListener("measure",r);a&&!a.layout&&(a.root&&a.root.updateScroll(),a.updateLayout()),ve.read(r);let s=Hr(window,"resize",()=>this.scalePositionWithinConstraints()),i=a.addEventListener("didUpdate",(({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(ro(c=>{let d=this.getAxisMotionValue(c);d&&(this.originPoint[c]+=l[c].translate,d.set(d.get()+l[c].translate))}),this.visualElement.render())}));return()=>{s(),o(),n(),i&&i()}}getProps(){let t=this.visualElement.getProps(),{drag:o=!1,dragDirectionLock:r=!1,dragPropagation:a=!1,dragConstraints:n=!1,dragElastic:s=od,dragMomentum:i=!0}=t;return{...t,drag:o,dragDirectionLock:r,dragPropagation:a,dragConstraints:n,dragElastic:s,dragMomentum:i}}};function rd(e,t,o){return(t===!0||t===e)&&(o===null||o===e)}function zN(e,t=10){let o=null;return Math.abs(e.y)>t?o="y":Math.abs(e.x)>t&&(o="x"),o}var nd=class extends vt{constructor(t){super(t),this.removeGroupControls=Qe,this.removeListeners=Qe,this.controls=new ad(t)}mount(){let{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Qe}unmount(){this.removeGroupControls(),this.removeListeners()}};var dw=e=>(t,o)=>{e&&ve.postRender(()=>e(t,o))},sd=class extends vt{constructor(){super(...arguments),this.removePointerDownListener=Qe}onPointerDown(t){this.session=new qs(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:td(this.node)})}createPanHandlers(){let{onPanSessionStart:t,onPanStart:o,onPan:r,onPanEnd:a}=this.node.getProps();return{onSessionStart:dw(t),onStart:dw(o),onMove:r,onEnd:(n,s)=>{delete this.session,a&&ve.postRender(()=>a(n,s))}}}mount(){this.removePointerDownListener=Ia(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}};var pw=b(D(),1);var Kl=b(A(),1);var Ws={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function fw(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var $s={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(ae.test(e))e=parseFloat(e);else return e;let o=fw(e,t.target.x),r=fw(e,t.target.y);return`${o}% ${r}%`}};var mw={correct:(e,{treeScale:t,projectionDelta:o})=>{let r=e,a=kt.parse(e);if(a.length>5)return r;let n=kt.createTransformer(e),s=typeof a[0]!="number"?1:0,i=o.x.scale*t.x,l=o.y.scale*t.y;a[0+s]/=i,a[1+s]/=l;let u=Ce(i,l,.5);return typeof a[2+s]=="number"&&(a[2+s]/=u),typeof a[3+s]=="number"&&(a[3+s]/=u),n(a)}};var Rp=!1,Ip=class extends Kl.Component{componentDidMount(){let{visualElement:t,layoutGroup:o,switchLayoutGroup:r,layoutId:a}=this.props,{projection:n}=t;eC(qN),n&&(o.group&&o.group.add(n),r&&r.register&&a&&r.register(n),Rp&&n.root.didUpdate(),n.addEventListener("animationComplete",()=>{this.safeToRemove()}),n.setOptions({...n.options,onExitComplete:()=>this.safeToRemove()})),Ws.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){let{layoutDependency:o,visualElement:r,drag:a,isPresent:n}=this.props,{projection:s}=r;return s&&(s.isPresent=n,Rp=!0,a||t.layoutDependency!==o||o===void 0||t.isPresent!==n?s.willUpdate():this.safeToRemove(),t.isPresent!==n&&(n?s.promote():s.relegate()||ve.postRender(()=>{let i=s.getStack();(!i||!i.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){let{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),yn.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:t,layoutGroup:o,switchLayoutGroup:r}=this.props,{projection:a}=t;Rp=!0,a&&(a.scheduleCheckAfterUnmount(),o&&o.group&&o.group.remove(a),r&&r.deregister&&r.deregister(a))}safeToRemove(){let{safeToRemove:t}=this.props;t&&t()}render(){return null}};function id(e){let[t,o]=Tc(),r=(0,Kl.useContext)(xs);return(0,pw.jsx)(Ip,{...e,layoutGroup:r,switchLayoutGroup:(0,Kl.useContext)(Uc),isPresent:t,safeToRemove:o})}var qN={borderRadius:{...$s,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:$s,borderTopRightRadius:$s,borderBottomLeftRadius:$s,borderBottomRightRadius:$s,boxShadow:mw};function ld(e,t,o){let r=ke(e)?e:to(e);return r.start(Hs("",r,t,o)),r.animation}var gw=(e,t)=>e.depth-t.depth;var ud=class{constructor(){this.children=[],this.isDirty=!1}add(t){nn(this.children,t),this.isDirty=!0}remove(t){qo(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(gw),this.isDirty=!1,this.children.forEach(t)}};function hw(e,t){let o=ot.now(),r=({timestamp:a})=>{let n=a-o;n>=t&&(Tt(r),e(n-t))};return ve.setup(r,!0),()=>Tt(r)}var bw=["TopLeft","TopRight","BottomLeft","BottomRight"],WN=bw.length,xw=e=>typeof e=="string"?parseFloat(e):e,vw=e=>typeof e=="number"||ae.test(e);function Cw(e,t,o,r,a,n){a?(e.opacity=Ce(0,o.opacity??1,$N(r)),e.opacityExit=Ce(t.opacity??1,0,jN(r))):n&&(e.opacity=Ce(t.opacity??1,o.opacity??1,r));for(let s=0;s<WN;s++){let i=`border${bw[s]}Radius`,l=yw(t,i),u=yw(o,i);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||vw(l)===vw(u)?(e[i]=Math.max(Ce(xw(l),xw(u),r),0),(Mt.test(u)||Mt.test(l))&&(e[i]+="%")):e[i]=u}(t.rotate||o.rotate)&&(e.rotate=Ce(t.rotate||0,o.rotate||0,r))}function yw(e,t){return e[t]!==void 0?e[t]:e.borderRadius}var $N=ww(0,.5,dl),jN=ww(.5,.95,Qe);function ww(e,t,o){return r=>r<e?0:r>t?1:o(Lo(e,t,r))}function Sw(e,t){e.min=t.min,e.max=t.max}function po(e,t){Sw(e.x,t.x),Sw(e.y,t.y)}function Lp(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Rw(e,t,o,r,a){return e-=t,e=zl(e,1/o,r),a!==void 0&&(e=zl(e,1/a,r)),e}function KN(e,t=0,o=1,r=.5,a,n=e,s=e){if(Mt.test(t)&&(t=parseFloat(t),t=Ce(s.min,s.max,t/100)-s.min),typeof t!="number")return;let i=Ce(n.min,n.max,r);e===n&&(i-=t),e.min=Rw(e.min,t,o,i,a),e.max=Rw(e.max,t,o,i,a)}function Iw(e,t,[o,r,a],n,s){KN(e,t[o],t[r],t[a],t.scale,n,s)}var XN=["x","scaleX","originX"],YN=["y","scaleY","originY"];function Pp(e,t,o,r){Iw(e.x,t,XN,o?o.x:void 0,r?r.x:void 0),Iw(e.y,t,YN,o?o.y:void 0,r?r.y:void 0)}function Lw(e){return e.translate===0&&e.scale===1}function Tp(e){return Lw(e.x)&&Lw(e.y)}function Pw(e,t){return e.min===t.min&&e.max===t.max}function Mw(e,t){return Pw(e.x,t.x)&&Pw(e.y,t.y)}function Tw(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Mp(e,t){return Tw(e.x,t.x)&&Tw(e.y,t.y)}function kp(e){return ft(e.x)/ft(e.y)}function Ap(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}var cd=class{constructor(){this.members=[]}add(t){nn(this.members,t),t.scheduleRender()}remove(t){if(qo(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){let o=this.members[this.members.length-1];o&&this.promote(o)}}relegate(t){let o=this.members.findIndex(a=>t===a);if(o===0)return!1;let r;for(let a=o;a>=0;a--){let n=this.members[a];if(n.isPresent!==!1){r=n;break}}return r?(this.promote(r),!0):!1}promote(t,o){let r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,o&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);let{crossfade:a}=t.options;a===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{let{options:o,resumingFrom:r}=t;o.onExitComplete&&o.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}};function kw(e,t,o){let r="",a=e.x.translate/t.x,n=e.y.translate/t.y,s=o?.z||0;if((a||n||s)&&(r=`translate3d(${a}px, ${n}px, ${s}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),o){let{transformPerspective:u,rotate:c,rotateX:d,rotateY:f,skewX:m,skewY:p}=o;u&&(r=`perspective(${u}px) ${r}`),c&&(r+=`rotate(${c}deg) `),d&&(r+=`rotateX(${d}deg) `),f&&(r+=`rotateY(${f}deg) `),m&&(r+=`skewX(${m}deg) `),p&&(r+=`skewY(${p}deg) `)}let i=e.x.scale*t.x,l=e.y.scale*t.y;return(i!==1||l!==1)&&(r+=`scale(${i}, ${l})`),r||"none"}var Pn={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},Dp=["","X","Y","Z"],ZN=1e3,QN=0;function Ep(e,t,o,r){let{latestValues:a}=t;a[e]&&(o[e]=a[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Bw(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let o=Xc(t);if(window.MotionHasOptimisedAnimation(o,"transform")){let{layout:a,layoutId:n}=e.options;window.MotionCancelOptimisedAnimation(o,"transform",ve,!(a||n))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Bw(r)}function dd({attachResizeListener:e,defaultParent:t,measureScroll:o,checkIsScrollRoot:r,resetTransform:a}){return class{constructor(s={},i=t?.()){this.id=QN++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,eo.value&&(Pn.nodes=Pn.calculatedTargetDeltas=Pn.calculatedProjections=0),this.nodes.forEach(t2),this.nodes.forEach(n2),this.nodes.forEach(s2),this.nodes.forEach(o2),eo.addProjectionMetrics&&eo.addProjectionMetrics(Pn)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,this.root=i?i.root||i:this,this.path=i?[...i.path,i]:[],this.parent=i,this.depth=i?i.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new ud)}addEventListener(s,i){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new Mr),this.eventHandlers.get(s).add(i)}notifyListeners(s,...i){let l=this.eventHandlers.get(s);l&&l.notify(...i)}hasListeners(s){return this.eventHandlers.has(s)}mount(s){if(this.instance)return;this.isSVG=Cn(s)&&!_l(s),this.instance=s;let{layoutId:i,layout:l,visualElement:u}=this.options;if(u&&!u.current&&u.mount(s),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||i)&&(this.isLayoutDirty=!0),e){let c,d=0,f=()=>this.root.updateBlockedByResize=!1;ve.read(()=>{d=window.innerWidth}),e(s,()=>{let m=window.innerWidth;m!==d&&(d=m,this.root.updateBlockedByResize=!0,c&&c(),c=hw(f,250),Ws.hasAnimatedSinceResize&&(Ws.hasAnimatedSinceResize=!1,this.nodes.forEach(Ew)))})}i&&this.root.registerSharedNode(i,this),this.options.animate!==!1&&u&&(i||l)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:d,hasRelativeLayoutChanged:f,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let p=this.options.transition||u.getDefaultTransition()||d2,{onLayoutAnimationStart:g,onLayoutAnimationComplete:h}=u.getProps(),v=!this.targetLayout||!Mp(this.targetLayout,m),x=!d&&f;if(this.options.layoutRoot||this.resumeFrom||x||d&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let y={...gn(p,"layout"),onPlay:g,onComplete:h};(u.shouldReduceMotion||this.options.layoutRoot)&&(y.delay=0,y.type=!1),this.startAnimation(y),this.setAnimationOrigin(c,x)}else d||Ew(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Tt(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(i2),this.animationId++)}getTransformTemplate(){let{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Bw(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){let d=this.path[c];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}let{layoutId:i,layout:l}=this.options;if(i===void 0&&!l)return;let u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),s&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Aw);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Dw);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(a2),this.nodes.forEach(JN),this.nodes.forEach(e2)):this.nodes.forEach(Dw),this.clearAllSnapshots();let i=ot.now();tt.delta=xt(0,1e3/60,i-tt.timestamp),tt.timestamp=i,tt.isProcessing=!0,vl.update.process(tt),vl.preRender.process(tt),vl.render.process(tt),tt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,yn.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(r2),this.sharedNodes.forEach(l2)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ve.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ve.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!ft(this.snapshot.measuredBox.x)&&!ft(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();let s=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Ue(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);let{visualElement:i}=this.options;i&&i.notify("LayoutMeasure",this.layout.layoutBox,s?s.layoutBox:void 0)}updateScroll(s="measure"){let i=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===s&&(i=!1),i&&this.instance){let l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:s,isRoot:l,offset:o(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!a)return;let s=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,i=this.projectionDelta&&!Tp(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;s&&this.instance&&(i||Br(this.latestValues)||c)&&(a(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(s=!0){let i=this.measurePageBox(),l=this.removeElementScroll(i);return s&&(l=this.removeTransform(l)),f2(l),{animationId:this.root.animationId,measuredBox:i,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:s}=this.options;if(!s)return Ue();let i=s.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(m2))){let{scroll:u}=this.root;u&&(Sa(i.x,u.offset.x),Sa(i.y,u.offset.y))}return i}removeElementScroll(s){let i=Ue();if(po(i,s),this.scroll?.wasRoot)return i;for(let l=0;l<this.path.length;l++){let u=this.path[l],{scroll:c,options:d}=u;u!==this.root&&c&&d.layoutScroll&&(c.wasRoot&&po(i,s),Sa(i.x,c.offset.x),Sa(i.y,c.offset.y))}return i}applyTransform(s,i=!1){let l=Ue();po(l,s);for(let u=0;u<this.path.length;u++){let c=this.path[u];!i&&c.options.layoutScroll&&c.scroll&&c!==c.root&&Rn(l,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),Br(c.latestValues)&&Rn(l,c.latestValues)}return Br(this.latestValues)&&Rn(l,this.latestValues),l}removeTransform(s){let i=Ue();po(i,s);for(let l=0;l<this.path.length;l++){let u=this.path[l];if(!u.instance||!Br(u.latestValues))continue;Wc(u.latestValues)&&u.updateSnapshot();let c=Ue(),d=u.measurePageBox();po(c,d),Pp(i,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,c)}return Br(this.latestValues)&&Pp(i,this.latestValues),i}setTargetDelta(s){this.targetDelta=s,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(s){this.options={...this.options,...s,crossfade:s.crossfade!==void 0?s.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==tt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(s=!1){let i=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=i.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=i.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=i.isSharedProjectionDirty);let l=!!this.resumingFrom||this!==i;if(!(s||l&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:c,layoutId:d}=this.options;if(!(!this.layout||!(c||d))){if(this.resolvedRelativeTargetAt=tt.timestamp,!this.targetDelta&&!this.relativeTarget){let f=this.getClosestProjectingParent();f&&f.layout&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ue(),this.relativeTargetOrigin=Ue(),zs(this.relativeTargetOrigin,this.layout.layoutBox,f.layout.layoutBox),po(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=Ue(),this.targetWithTransforms=Ue()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),YC(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):po(this.target,this.layout.layoutBox),vp(this.target,this.targetDelta)):po(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;let f=this.getClosestProjectingParent();f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ue(),this.relativeTargetOrigin=Ue(),zs(this.relativeTargetOrigin,this.target,f.target),po(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}eo.value&&Pn.calculatedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||Wc(this.parent.latestValues)||hp(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){let s=this.getLead(),i=!!this.resumingFrom||this!==s,l=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(l=!1),i&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===tt.timestamp&&(l=!1),l)return;let{layout:u,layoutId:c}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||c))return;po(this.layoutCorrected,this.layout.layoutBox);let d=this.treeScale.x,f=this.treeScale.y;LC(this.layoutCorrected,this.treeScale,this.path,i),s.layout&&!s.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(s.target=s.layout.layoutBox,s.targetWithTransforms=Ue());let{target:m}=s;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Lp(this.prevProjectionDelta.x,this.projectionDelta.x),Lp(this.prevProjectionDelta.y,this.projectionDelta.y)),Gs(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==f||!Ap(this.projectionDelta.x,this.prevProjectionDelta.x)||!Ap(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m)),eo.value&&Pn.calculatedProjections++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(s=!0){if(this.options.visualElement?.scheduleRender(),s){let i=this.getStack();i&&i.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=In(),this.projectionDelta=In(),this.projectionDeltaWithTransform=In()}setAnimationOrigin(s,i=!1){let l=this.snapshot,u=l?l.latestValues:{},c={...this.latestValues},d=In();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!i;let f=Ue(),m=l?l.source:void 0,p=this.layout?this.layout.source:void 0,g=m!==p,h=this.getStack(),v=!h||h.members.length<=1,x=!!(g&&!v&&this.options.crossfade===!0&&!this.path.some(c2));this.animationProgress=0;let y;this.mixTargetDelta=R=>{let C=R/1e3;Nw(d.x,s.x,C),Nw(d.y,s.y,C),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(zs(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),u2(this.relativeTarget,this.relativeTargetOrigin,f,C),y&&Mw(this.relativeTarget,y)&&(this.isProjectionDirty=!1),y||(y=Ue()),po(y,this.relativeTarget)),g&&(this.animationValues=c,Cw(c,u,this.latestValues,C,x,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=C},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Tt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ve.update(()=>{Ws.hasAnimatedSinceResize=!0,$o.layout++,this.motionValue||(this.motionValue=to(0)),this.currentAnimation=ld(this.motionValue,[0,1e3],{...s,velocity:0,isSync:!0,onUpdate:i=>{this.mixTargetDelta(i),s.onUpdate&&s.onUpdate(i)},onStop:()=>{$o.layout--},onComplete:()=>{$o.layout--,s.onComplete&&s.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(ZN),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let s=this.getLead(),{targetWithTransforms:i,target:l,layout:u,latestValues:c}=s;if(!(!i||!l||!u)){if(this!==s&&this.layout&&u&&Hw(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||Ue();let d=ft(this.layout.layoutBox.x);l.x.min=s.target.x.min,l.x.max=l.x.min+d;let f=ft(this.layout.layoutBox.y);l.y.min=s.target.y.min,l.y.max=l.y.min+f}po(i,l),Rn(i,c),Gs(this.projectionDeltaWithTransform,this.layoutCorrected,i,c)}}registerSharedNode(s,i){this.sharedNodes.has(s)||this.sharedNodes.set(s,new cd),this.sharedNodes.get(s).add(i);let u=i.options.initialPromotionConfig;i.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(i):void 0})}isLead(){let s=this.getStack();return s?s.lead===this:!0}getLead(){let{layoutId:s}=this.options;return s?this.getStack()?.lead||this:this}getPrevLead(){let{layoutId:s}=this.options;return s?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:i,preserveFollowOpacity:l}={}){let u=this.getStack();u&&u.promote(this,l),s&&(this.projectionDelta=void 0,this.needsReset=!0),i&&this.setOptions({transition:i})}relegate(){let s=this.getStack();return s?s.relegate(this):!1}resetSkewAndRotation(){let{visualElement:s}=this.options;if(!s)return;let i=!1,{latestValues:l}=s;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(i=!0),!i)return;let u={};l.z&&Ep("z",s,u,this.animationValues);for(let c=0;c<Dp.length;c++)Ep(`rotate${Dp[c]}`,s,u,this.animationValues),Ep(`skew${Dp[c]}`,s,u,this.animationValues);s.render();for(let c in u)s.setStaticValue(c,u[c]),this.animationValues&&(this.animationValues[c]=u[c]);s.scheduleRender()}applyProjectionStyles(s,i){if(!this.instance||this.isSVG)return;if(!this.isVisible){s.visibility="hidden";return}let l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,s.visibility="",s.opacity="",s.pointerEvents=Ds(i?.pointerEvents)||"",s.transform=l?l(this.latestValues,""):"none";return}let u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(s.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,s.pointerEvents=Ds(i?.pointerEvents)||""),this.hasProjected&&!Br(this.latestValues)&&(s.transform=l?l({},""):"none",this.hasProjected=!1);return}s.visibility="";let c=u.animationValues||u.latestValues;this.applyTransformsToTarget();let d=kw(this.projectionDeltaWithTransform,this.treeScale,c);l&&(d=l(c,d)),s.transform=d;let{x:f,y:m}=this.projectionDelta;s.transformOrigin=`${f.origin*100}% ${m.origin*100}% 0`,u.animationValues?s.opacity=u===this?c.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:c.opacityExit:s.opacity=u===this?c.opacity!==void 0?c.opacity:"":c.opacityExit!==void 0?c.opacityExit:0;for(let p in Sn){if(c[p]===void 0)continue;let{correct:g,applyTo:h,isCSSVariable:v}=Sn[p],x=d==="none"?c[p]:g(c[p],u);if(h){let y=h.length;for(let R=0;R<y;R++)s[h[R]]=x}else v?this.options.visualElement.renderState.vars[p]=x:s[p]=x}this.options.layoutId&&(s.pointerEvents=u===this?Ds(i?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(s=>s.currentAnimation?.stop()),this.root.nodes.forEach(Aw),this.root.sharedNodes.clear()}}}function JN(e){e.updateLayout()}function e2(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){let{layoutBox:o,measuredBox:r}=e.layout,{animationType:a}=e.options,n=t.source!==e.layout.source;a==="size"?ro(c=>{let d=n?t.measuredBox[c]:t.layoutBox[c],f=ft(d);d.min=o[c].min,d.max=d.min+f}):Hw(a,t.layoutBox,o)&&ro(c=>{let d=n?t.measuredBox[c]:t.layoutBox[c],f=ft(o[c]);d.max=d.min+f,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[c].max=e.relativeTarget[c].min+f)});let s=In();Gs(s,o,t.layoutBox);let i=In();n?Gs(i,e.applyTransform(r,!0),t.measuredBox):Gs(i,o,t.layoutBox);let l=!Tp(s),u=!1;if(!e.resumeFrom){let c=e.getClosestProjectingParent();if(c&&!c.resumeFrom){let{snapshot:d,layout:f}=c;if(d&&f){let m=Ue();zs(m,t.layoutBox,d.layoutBox);let p=Ue();zs(p,o,f.layoutBox),Mp(m,p)||(u=!0),c.options.layoutRoot&&(e.relativeTarget=p,e.relativeTargetOrigin=m,e.relativeParent=c)}}}e.notifyListeners("didUpdate",{layout:o,snapshot:t,delta:i,layoutDelta:s,hasLayoutChanged:l,hasRelativeLayoutChanged:u})}else if(e.isLead()){let{onExitComplete:o}=e.options;o&&o()}e.options.transition=void 0}function t2(e){eo.value&&Pn.nodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function o2(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function r2(e){e.clearSnapshot()}function Aw(e){e.clearMeasurements()}function Dw(e){e.isLayoutDirty=!1}function a2(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Ew(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function n2(e){e.resolveTargetDelta()}function s2(e){e.calcProjection()}function i2(e){e.resetSkewAndRotation()}function l2(e){e.removeLeadSnapshot()}function Nw(e,t,o){e.translate=Ce(t.translate,0,o),e.scale=Ce(t.scale,1,o),e.origin=t.origin,e.originPoint=t.originPoint}function Fw(e,t,o,r){e.min=Ce(t.min,o.min,r),e.max=Ce(t.max,o.max,r)}function u2(e,t,o,r){Fw(e.x,t.x,o.x,r),Fw(e.y,t.y,o.y,r)}function c2(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var d2={duration:.45,ease:[.4,0,.1,1]},Ow=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),_w=Ow("applewebkit/")&&!Ow("chrome/")?Math.round:Qe;function Vw(e){e.min=_w(e.min),e.max=_w(e.max)}function f2(e){Vw(e.x),Vw(e.y)}function Hw(e,t,o){return e==="position"||e==="preserve-aspect"&&!XC(kp(t),kp(o),.2)}function m2(e){return e!==e.root&&e.scroll?.wasRoot}var Uw=dd({attachResizeListener:(e,t)=>Hr(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0});var Np={current:void 0},fd=dd({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Np.current){let e=new Uw({});e.mount(window),e.setOptions({layoutScroll:!0}),Np.current=e}return Np.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"});var Gw={pan:{Feature:sd},drag:{Feature:nd,ProjectionNode:fd,MeasureLayout:id}};function zw(e,t,o){let{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",o==="Start");let a="onHover"+o,n=r[a];n&&ve.postRender(()=>n(t,Ur(t)))}var md=class extends vt{mount(){let{current:t}=this.node;t&&(this.unmount=ap(t,(o,r)=>(zw(this.node,r,"Start"),a=>zw(this.node,a,"End"))))}unmount(){}};var pd=class extends vt{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Wo(Hr(this.node.current,"focus",()=>this.onFocus()),Hr(this.node.current,"blur",()=>this.onBlur()))}unmount(){}};function qw(e,t,o){let{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",o==="Start");let a="onTap"+(o==="End"?"":o),n=r[a];n&&ve.postRender(()=>n(t,Ur(t)))}var gd=class extends vt{mount(){let{current:t}=this.node;t&&(this.unmount=ip(t,(o,r)=>(qw(this.node,r,"Start"),(a,{success:n})=>qw(this.node,a,n?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}};var Op=new WeakMap,Fp=new WeakMap,p2=e=>{let t=Op.get(e.target);t&&t(e)},g2=e=>{e.forEach(p2)};function h2({root:e,...t}){let o=e||document;Fp.has(o)||Fp.set(o,{});let r=Fp.get(o),a=JSON.stringify(t);return r[a]||(r[a]=new IntersectionObserver(g2,{root:e,...t})),r[a]}function Ww(e,t,o){let r=h2(t);return Op.set(e,o),r.observe(e),()=>{Op.delete(e),r.unobserve(e)}}var x2={some:0,all:1},hd=class extends vt{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();let{viewport:t={}}=this.node.getProps(),{root:o,margin:r,amount:a="some",once:n}=t,s={root:o?o.current:void 0,rootMargin:r,threshold:typeof a=="number"?a:x2[a]},i=l=>{let{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,n&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);let{onViewportEnter:c,onViewportLeave:d}=this.node.getProps(),f=u?c:d;f&&f(l)};return Ww(this.node.current,s,i)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;let{props:t,prevProps:o}=this.node;["amount","margin","root"].some(v2(t,o))&&this.startObserver()}unmount(){}};function v2({viewport:e={}},{viewport:t={}}={}){return o=>e[o]!==t[o]}var $w={inView:{Feature:hd},tap:{Feature:gd},focus:{Feature:pd},hover:{Feature:md}};var jw={layout:{ProjectionNode:fd,MeasureLayout:id}};var Kw={...GC,...$w,...Gw,...jw};var Ae=vC(Kw,FC);var js=b(A(),1);function Ks(e){let t=Io(()=>to(e)),{isStatic:o}=(0,js.useContext)(ya);if(o){let[,r]=(0,js.useState)(e);(0,js.useEffect)(()=>t.on("change",r),[])}return t}function xd(e,t){let o=Ks(t()),r=()=>o.set(t());return r(),da(()=>{let a=()=>ve.preRender(r,!1,!0),n=e.map(s=>s.on("change",a));return()=>{n.forEach(s=>s()),Tt(r)}}),o}function Xw(e){vn.current=[],e();let t=xd(vn.current,e);return vn.current=void 0,t}function _p(e,t,o,r){if(typeof e=="function")return Xw(e);let a=typeof t=="function"?t:lp(t,o,r);return Array.isArray(e)?Yw(e,a):Yw([e],([n])=>a(n))}function Yw(e,t){let o=Io(()=>[]);return xd(e,()=>{o.length=0;let r=e.length;for(let a=0;a<r;a++)o[a]=e[a].get();return t(o)})}function y2(e){e.values.forEach(t=>t.stop())}function Vp(e,t){[...t].reverse().forEach(r=>{let a=e.getVariant(r);a&&$l(e,a),e.variantChildren&&e.variantChildren.forEach(n=>{Vp(n,t)})})}function b2(e,t){if(Array.isArray(t))return Vp(e,t);if(typeof t=="string")return Vp(e,[t]);$l(e,t)}function Zw(){let e=!1,t=new Set,o={subscribe(r){return t.add(r),()=>void t.delete(r)},start(r,a){nt(e,"controls.start() should only be called after a component has mounted. Consider calling within a useEffect hook.");let n=[];return t.forEach(s=>{n.push(Qc(s,r,{transitionOverride:a}))}),Promise.all(n)},set(r){return nt(e,"controls.set() should only be called after a component has mounted. Consider calling within a useEffect hook."),t.forEach(a=>{b2(a,r)})},stop(){t.forEach(r=>{y2(r)})},mount(){return e=!0,()=>{e=!1,o.stop()}}};return o}function Xl(e){return typeof e=="object"&&!Array.isArray(e)}function vd(e,t,o,r){return typeof e=="string"&&Xl(t)?xn(e,o,r):e instanceof NodeList?Array.from(e):Array.isArray(e)?e:[e]}function Qw(e,t,o){return e*(t+1)}function Bp(e,t,o,r){return typeof t=="number"?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,e+parseFloat(t)):t==="<"?o:t.startsWith("<")?Math.max(0,o+parseFloat(t.slice(1))):r.get(t)??e}function C2(e,t,o){for(let r=0;r<e.length;r++){let a=e[r];a.at>t&&a.at<o&&(qo(e,a),r--)}}function Jw(e,t,o,r,a,n){C2(e,a,n);for(let s=0;s<t.length;s++)e.push({value:t[s],at:Ce(a,n,r[s]),easing:gl(o,s)})}function e0(e,t){for(let o=0;o<e.length;o++)e[o]=e[o]/(t+1)}function t0(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}var w2="easeInOut",S2=20;function a0(e,{defaultTransition:t={},...o}={},r,a){let n=t.duration||.3,s=new Map,i=new Map,l={},u=new Map,c=0,d=0,f=0;for(let m=0;m<e.length;m++){let p=e[m];if(typeof p=="string"){u.set(p,d);continue}else if(!Array.isArray(p)){u.set(p.name,Bp(d,p.at,c,u));continue}let[g,h,v={}]=p;v.at!==void 0&&(d=Bp(d,v.at,c,u));let x=0,y=(R,C,w,I=0,L=0)=>{let P=R2(R),{delay:T=0,times:O=Il(P),type:$="keyframes",repeat:W,repeatType:N,repeatDelay:q=0,...E}=C,{ease:G=t.ease||"easeOut",duration:M}=C,k=typeof T=="function"?T(I,L):T,re=P.length,Se=pn($)?$:a?.[$||"keyframes"];if(re<=2&&Se){let X=100;if(re===2&&P2(P)){let ce=P[1]-P[0];X=Math.abs(ce)}let ue={...E};M!==void 0&&(ue.duration=at(M));let _=wl(ue,X,Se);G=_.ease,M=_.duration}M??(M=n);let F=d+k;O.length===1&&O[0]===0&&(O[1]=1);let j=O.length-P.length;if(j>0&&Rl(O,j),P.length===1&&P.unshift(null),W){nt(W<S2,"Repeat count too high, must be less than 20","repeat-count-high"),M=Qw(M,W);let X=[...P],ue=[...O];G=Array.isArray(G)?[...G]:[G];let _=[...G];for(let ce=0;ce<W;ce++){P.push(...X);for(let he=0;he<X.length;he++)O.push(ue[he]+(ce+1)),G.push(he===0?"linear":gl(_,he-1))}e0(O,W)}let Z=F+M;Jw(w,P,G,O,F,Z),x=Math.max(k+M,x),f=Math.max(Z,f)};if(ke(g)){let R=o0(g,i);y(h,v,r0("default",R))}else{let R=vd(g,h,r,l),C=R.length;for(let w=0;w<C;w++){h=h,v=v;let I=R[w],L=o0(I,i);for(let P in h)y(h[P],I2(v,P),r0(P,L),w,C)}}c=d,d+=x}return i.forEach((m,p)=>{for(let g in m){let h=m[g];h.sort(t0);let v=[],x=[],y=[];for(let C=0;C<h.length;C++){let{at:w,value:I,easing:L}=h[C];v.push(I),x.push(Lo(0,f,w)),y.push(L||"easeOut")}x[0]!==0&&(x.unshift(0),v.unshift(v[0]),y.unshift(w2)),x[x.length-1]!==1&&(x.push(1),v.push(null)),s.has(p)||s.set(p,{keyframes:{},transition:{}});let R=s.get(p);R.keyframes[g]=v,R.transition[g]={...t,duration:f,ease:y,times:x,...o}}}),s}function o0(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function r0(e,t){return t[e]||(t[e]=[]),t[e]}function R2(e){return Array.isArray(e)?e:[e]}function I2(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}var L2=e=>typeof e=="number",P2=e=>e.every(L2);function T2(e,t){return e in t}var yd=class extends Os{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,o){if(T2(o,t)){let r=t[o];if(typeof r=="string"||typeof r=="number")return r}}getBaseTargetFromProps(){}removeValueFromRenderState(t,o){delete o.output[t]}measureInstanceViewportBox(){return Ue()}build(t,o){Object.assign(t.output,o)}renderInstance(t,{output:o}){Object.assign(t,o)}sortInstanceNodePosition(){return 0}};function n0(e){let t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},o=Cn(e)&&!_l(e)?new Bs(t):new Vs(t);o.mount(e),Ra.set(e,o)}function s0(e){let t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},o=new yd(t);o.mount(e),Ra.set(e,o)}function M2(e,t){return ke(e)||typeof e=="number"||typeof e=="string"&&!Xl(t)}function bd(e,t,o,r){let a=[];if(M2(e,t))a.push(ld(e,Xl(t)&&t.default||t,o&&(o.default||o)));else{let n=vd(e,t,r),s=n.length;nt(!!s,"No valid elements provided.","no-valid-elements");for(let i=0;i<s;i++){let l=n[i];nt(l!==null,"You're trying to perform an animation on null. Ensure that selectors are correctly finding elements and refs are correctly hydrated.","animate-null");let u=l instanceof Element?n0:s0;Ra.has(l)||u(l);let c=Ra.get(l),d={...o};"delay"in d&&typeof d.delay=="function"&&(d.delay=d.delay(i,s)),a.push(...Us(c,{...t,transition:d},{}))}}return a}function i0(e,t,o){let r=[];return a0(e,t,o,{spring:Ar}).forEach(({keyframes:n,transition:s},i)=>{r.push(...bd(i,n,s))}),r}function k2(e){return Array.isArray(e)&&e.some(Array.isArray)}function l0(e){function t(o,r,a){let n=[];k2(o)?n=i0(o,r,e):n=bd(o,r,a,e);let s=new Ml(n);return e&&(e.animations.push(s),s.finished.then(()=>{qo(e.animations,s)})),s}return t}var Hp=l0();function u0(){let e=Io(Zw);return da(e.mount,[]),e}var Up=u0;var Cd=b(A(),1);var A2={some:0,all:1};function c0(e,t,{root:o,margin:r,amount:a="some"}={}){let n=xn(e),s=new WeakMap,i=u=>{u.forEach(c=>{let d=s.get(c.target);if(c.isIntersecting!==!!d)if(c.isIntersecting){let f=t(c.target,c);typeof f=="function"?s.set(c.target,f):l.unobserve(c.target)}else typeof d=="function"&&(d(c),s.delete(c.target))})},l=new IntersectionObserver(i,{root:o,rootMargin:r,threshold:typeof a=="number"?a:A2[a]});return n.forEach(u=>l.observe(u)),()=>l.disconnect()}function wd(e,{root:t,margin:o,amount:r,once:a=!1,initial:n=!1}={}){let[s,i]=(0,Cd.useState)(n);return(0,Cd.useEffect)(()=>{if(!e.current||a&&s)return;let l=()=>(i(!0),a?void 0:()=>i(!1)),u={root:t&&t.current||void 0,margin:o,amount:r};return c0(e.current,l,u)},[t,e,o,a,r]),s}var fre=te("",{variants:{hover:{lift:["transition-all duration-200 ease-out","hover:-translate-y-0.5","hover:shadow-md"],glow:["transition-all duration-300 ease-out","hover:shadow-lg","hover:shadow-primary/20"],scale:["transition-transform duration-200 ease-out","hover:scale-105","active:scale-95"],brightness:["transition-all duration-200 ease-out","hover:brightness-110","active:brightness-95"],border:["transition-all duration-200 ease-out","hover:border-primary/50"]},focus:{ring:["focus:outline-none","focus-visible:ring-2","focus-visible:ring-primary/50","focus-visible:ring-offset-2"],glow:["focus:outline-none","focus-visible:shadow-lg","focus-visible:shadow-primary/30"],border:["focus:outline-none","focus-visible:border-primary","focus-visible:border-2"]},active:{scale:["active:scale-95","transition-transform duration-100"],darken:["active:brightness-90","transition-all duration-100"],depress:["active:translate-y-0.5","active:shadow-sm","transition-all duration-100"]},cursor:{pointer:"cursor-pointer",grab:"cursor-grab active:cursor-grabbing",text:"cursor-text",wait:"cursor-wait",help:"cursor-help",notAllowed:"cursor-not-allowed"}},defaultVariants:{hover:"lift",focus:"ring",active:"scale",cursor:"pointer"}}),Xo={smooth:{type:"spring",stiffness:260,damping:20},bouncy:{type:"spring",stiffness:300,damping:15},stiff:{type:"spring",stiffness:400,damping:25},gentle:{type:"spring",stiffness:150,damping:15}},Sd={lift:{y:-2,transition:Xo.smooth},scale:{scale:1.05,transition:Xo.smooth},glow:{boxShadow:"0 0 20px rgba(var(--primary), 0.3)",transition:Xo.smooth},rotate:{rotate:2,transition:Xo.bouncy}},d0={scale:{scale:.95,transition:{duration:.1}},depress:{y:1,transition:{duration:.1}}},mre={ring:{boxShadow:"0 0 0 2px var(--background), 0 0 0 4px var(--primary)",transition:Xo.smooth},glow:{boxShadow:"0 0 0 3px rgba(var(--primary), 0.3)",transition:Xo.smooth}},pre={container:{hidden:{opacity:0},show:{opacity:1,transition:{staggerChildren:.05}}},item:{hidden:{opacity:0,y:20},show:{opacity:1,y:0,transition:Xo.smooth}}},gre={fadeIn:{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.3}},slideUp:{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20},transition:Xo.smooth},slideRight:{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},exit:{opacity:0,x:20},transition:Xo.smooth},scale:{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:1.05},transition:Xo.smooth}},f0={initial:{opacity:.5},animate:{opacity:[.5,.8,.5],transition:{duration:1.5,repeat:1/0,ease:"easeInOut"}}};var hre={initial:{opacity:0,y:-20,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,scale:.95,transition:{duration:.15}},transition:Xo.bouncy};var La=b(D()),m0=te("rounded-lg border bg-card text-card-foreground shadow-sm dark:shadow-gray-900/20 dark:border-gray-800 dark:bg-gray-900 dark:text-gray-100 transition-all duration-200",{variants:{variant:{default:"",outline:"border border-border shadow-none bg-transparent dark:border-gray-700 dark:bg-transparent dark:text-gray-200",filled:"border-none bg-secondary dark:bg-gray-800 dark:text-gray-100 dark:shadow-inner dark:shadow-gray-950/10",elevated:"border-none shadow-md dark:shadow-lg dark:shadow-gray-900/30 dark:bg-gray-850 dark:text-gray-100",gradient:"border-none bg-gradient-to-br from-primary/5 to-primary/10 dark:from-primary/10 dark:to-primary/20",glass:"border border-white/20 bg-white/10 backdrop-blur-md dark:border-gray-700/30 dark:bg-gray-800/10"},size:{default:"",sm:"",lg:"",xl:""},radius:{default:"rounded-lg",sm:"rounded-md",lg:"rounded-xl",full:"rounded-3xl",none:"rounded-none"},interactive:{true:"cursor-pointer hover:shadow-lg hover:border-primary/20 dark:hover:border-primary/30 hover:-translate-y-0.5 active:translate-y-0 active:shadow-sm",false:""}},defaultVariants:{variant:"default",size:"default",radius:"default"}}),p0=Tn.forwardRef(({className:e,variant:t,size:o,radius:r,interactive:a,microInteraction:n="lift",...s},i)=>{if(a&&n!=="none"){let l={whileHover:n==="scale"?Sd.scale:n==="glow"?Sd.glow:Sd.lift,whileTap:d0.scale};return(0,La.jsx)(Ae.div,{ref:i,className:S("moonui-theme",m0({variant:t,size:o,radius:r,interactive:a,className:e})),...l,...s})}return(0,La.jsx)("div",{ref:i,className:S("moonui-theme",m0({variant:t,size:o,radius:r,interactive:a,className:e})),...s})});p0.displayName="Card";var g0=Tn.forwardRef(({className:e,...t},o)=>(0,La.jsx)("div",{ref:o,className:S("moonui-theme","flex flex-col space-y-1.5 p-6",e),...t}));g0.displayName="CardHeader";var h0=Tn.forwardRef(({className:e,...t},o)=>(0,La.jsx)("h3",{ref:o,className:S("moonui-theme","text-lg font-semibold leading-none tracking-tight",e),...t}));h0.displayName="CardTitle";var x0=Tn.forwardRef(({className:e,...t},o)=>(0,La.jsx)("p",{ref:o,className:S("moonui-theme","text-sm text-muted-foreground",e),...t}));x0.displayName="CardDescription";var v0=Tn.forwardRef(({className:e,...t},o)=>(0,La.jsx)("div",{ref:o,className:S("moonui-theme","p-6 pt-0",e),...t}));v0.displayName="CardContent";var y0=Tn.forwardRef(({className:e,...t},o)=>(0,La.jsx)("div",{ref:o,className:S("moonui-theme","flex items-center p-6 pt-0",e),...t}));y0.displayName="CardFooter";var Mn=b(A());var Pa=b(D()),D2=e=>{let t={visa:/^4/,mastercard:/^5[1-5]/,amex:/^3[47]/,discover:/^6(?:011|5)/,diners:/^3(?:0[0-5]|[68])/,jcb:/^35/};for(let[o,r]of Object.entries(t))if(r.test(e))return o;return"unknown"},b0=(e,t)=>{let o=e.replace(/\s+/g,""),r=t==="amex"?[4,6,5]:[4,4,4,4],a="",n=0;for(let s of r){if(n>=o.length)break;a&&(a+=" "),a+=o.slice(n,n+s),n+=s}return a},C0=Mn.forwardRef(({className:e,value:t="",onChange:o,showIcon:r=!0,size:a,...n},s)=>{let[i,l]=Mn.useState("unknown"),u=c=>{let d=c.target.value.replace(/\D/g,""),f=D2(d);l(f);let m=f==="amex"?15:16,p=d.slice(0,m),g=b0(p,f);o?.(p,f),c.target.value=g};return(0,Pa.jsxs)("div",{className:"relative",children:[(0,Pa.jsx)(At,{ref:s,type:"text",inputMode:"numeric",autoComplete:"cc-number",placeholder:"1234 5678 9012 3456",value:b0(t,i),onChange:u,className:S(r&&"pl-10",e),...n}),r&&(0,Pa.jsx)(Oi,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"})]})});C0.displayName="CardNumberInput";var w0=Mn.forwardRef(({className:e,value:t="",onChange:o,size:r,...a},n)=>{let s=l=>{let u=l.target.value.replace(/\D/g,"");if(u.length>=2){let d=parseInt(u.slice(0,2));d>12?u="12"+u.slice(2):d===0&&(u="01"+u.slice(2))}u=u.slice(0,4);let c=u;u.length>=2&&(c=u.slice(0,2)+"/"+u.slice(2)),o?.(u),l.target.value=c},i=t.length>=2?t.slice(0,2)+"/"+t.slice(2):t;return(0,Pa.jsx)(At,{ref:n,type:"text",inputMode:"numeric",autoComplete:"cc-exp",placeholder:"MM/YY",value:i,onChange:s,className:e,...a})});w0.displayName="CardExpiryInput";var S0=Mn.forwardRef(({className:e,value:t="",onChange:o,cardType:r="unknown",size:a,...n},s)=>{let i=r==="amex"?4:3;return(0,Pa.jsx)(At,{ref:s,type:"text",inputMode:"numeric",autoComplete:"cc-csc",placeholder:r==="amex"?"1234":"123",value:t,onChange:u=>{let c=u.target.value.replace(/\D/g,"").slice(0,i);o?.(c)},maxLength:i,className:e,...n})});S0.displayName="CardCVCInput";var R0=Mn.forwardRef(({className:e,value:t="",onChange:o,format:r="US",size:a,...n},s)=>{let i=u=>{let c=u.target.value;switch(r){case"US":c=c.replace(/\D/g,"").slice(0,5);break;case"CA":c=c.toUpperCase().replace(/[^A-Z0-9]/g,"").slice(0,6),c.length>=3&&(c=c.slice(0,3)+" "+c.slice(3));break;case"UK":c=c.toUpperCase().replace(/[^A-Z0-9\s]/g,"").slice(0,8);break;default:c=c.slice(0,10)}o?.(c.replace(/\s/g,"")),u.target.value=c};return(0,Pa.jsx)(At,{ref:s,type:"text",autoComplete:"postal-code",placeholder:(()=>{switch(r){case"US":return"12345";case"CA":return"K1A 0B1";case"UK":return"SW1A 1AA";default:return"Postal Code"}})(),value:t,onChange:i,className:e,...n})});R0.displayName="CardZipInput";var Yo=b(A());var zt=b(A(),1);var Rd=b(A(),1);function Xs(e){let t=Rd.useRef({value:e,previous:e});return Rd.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var I0=b(A(),1);function Ys(e){let[t,o]=I0.useState(void 0);return Le(()=>{if(e){o({width:e.offsetWidth,height:e.offsetHeight});let r=new ResizeObserver(a=>{if(!Array.isArray(a)||!a.length)return;let n=a[0],s,i;if("borderBoxSize"in n){let l=n.borderBoxSize,u=Array.isArray(l)?l[0]:l;s=u.inlineSize,i=u.blockSize}else s=e.offsetWidth,i=e.offsetHeight;o({width:s,height:i})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else o(void 0)},[e]),t}var go=b(D(),1),Id="Checkbox",[E2,Bre]=Re(Id),[N2,Gp]=E2(Id);function F2(e){let{__scopeCheckbox:t,checked:o,children:r,defaultChecked:a,disabled:n,form:s,name:i,onCheckedChange:l,required:u,value:c="on",internal_do_not_use_render:d}=e,[f,m]=Fe({prop:o,defaultProp:a??!1,onChange:l,caller:Id}),[p,g]=zt.useState(null),[h,v]=zt.useState(null),x=zt.useRef(!1),y=p?!!s||!!p.closest("form"):!0,R={checked:f,disabled:n,setChecked:m,control:p,setControl:g,name:i,form:s,value:c,hasConsumerStoppedPropagationRef:x,required:u,defaultChecked:Ta(a)?!1:a,isFormControl:y,bubbleInput:h,setBubbleInput:v};return(0,go.jsx)(N2,{scope:t,...R,children:O2(d)?d(R):r})}var L0="CheckboxTrigger",P0=zt.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:o,...r},a)=>{let{control:n,value:s,disabled:i,checked:l,required:u,setControl:c,setChecked:d,hasConsumerStoppedPropagationRef:f,isFormControl:m,bubbleInput:p}=Gp(L0,e),g=ee(a,c),h=zt.useRef(l);return zt.useEffect(()=>{let v=n?.form;if(v){let x=()=>d(h.current);return v.addEventListener("reset",x),()=>v.removeEventListener("reset",x)}},[n,d]),(0,go.jsx)(H.button,{type:"button",role:"checkbox","aria-checked":Ta(l)?"mixed":l,"aria-required":u,"data-state":A0(l),"data-disabled":i?"":void 0,disabled:i,value:s,...r,ref:g,onKeyDown:V(t,v=>{v.key==="Enter"&&v.preventDefault()}),onClick:V(o,v=>{d(x=>Ta(x)?!0:!x),p&&m&&(f.current=v.isPropagationStopped(),f.current||v.stopPropagation())})})});P0.displayName=L0;var Ld=zt.forwardRef((e,t)=>{let{__scopeCheckbox:o,name:r,checked:a,defaultChecked:n,required:s,disabled:i,value:l,onCheckedChange:u,form:c,...d}=e;return(0,go.jsx)(F2,{__scopeCheckbox:o,checked:a,defaultChecked:n,disabled:i,required:s,onCheckedChange:u,name:r,form:c,value:l,internal_do_not_use_render:({isFormControl:f})=>(0,go.jsxs)(go.Fragment,{children:[(0,go.jsx)(P0,{...d,ref:t,__scopeCheckbox:o}),f&&(0,go.jsx)(k0,{__scopeCheckbox:o})]})})});Ld.displayName=Id;var T0="CheckboxIndicator",zp=zt.forwardRef((e,t)=>{let{__scopeCheckbox:o,forceMount:r,...a}=e,n=Gp(T0,o);return(0,go.jsx)(Oe,{present:r||Ta(n.checked)||n.checked===!0,children:(0,go.jsx)(H.span,{"data-state":A0(n.checked),"data-disabled":n.disabled?"":void 0,...a,ref:t,style:{pointerEvents:"none",...e.style}})})});zp.displayName=T0;var M0="CheckboxBubbleInput",k0=zt.forwardRef(({__scopeCheckbox:e,...t},o)=>{let{control:r,hasConsumerStoppedPropagationRef:a,checked:n,defaultChecked:s,required:i,disabled:l,name:u,value:c,form:d,bubbleInput:f,setBubbleInput:m}=Gp(M0,e),p=ee(o,m),g=Xs(n),h=Ys(r);zt.useEffect(()=>{let x=f;if(!x)return;let y=window.HTMLInputElement.prototype,C=Object.getOwnPropertyDescriptor(y,"checked").set,w=!a.current;if(g!==n&&C){let I=new Event("click",{bubbles:w});x.indeterminate=Ta(n),C.call(x,Ta(n)?!1:n),x.dispatchEvent(I)}},[f,g,n,a]);let v=zt.useRef(Ta(n)?!1:n);return(0,go.jsx)(H.input,{type:"checkbox","aria-hidden":!0,defaultChecked:s??v.current,required:i,disabled:l,name:u,value:c,form:d,...t,tabIndex:-1,ref:p,style:{...t.style,...h,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});k0.displayName=M0;function O2(e){return typeof e=="function"}function Ta(e){return e==="indeterminate"}function A0(e){return Ta(e)?"indeterminate":e?"checked":"unchecked"}var To=b(D()),V2=te("peer shrink-0 border focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:text-primary-foreground",{variants:{variant:{default:"border-border bg-background data-[state=checked]:bg-primary data-[state=checked]:border-primary",outline:"border-border bg-transparent data-[state=checked]:bg-primary data-[state=checked]:border-primary",muted:"border-border bg-accent data-[state=checked]:bg-primary data-[state=checked]:border-primary",ghost:"border-transparent bg-transparent hover:bg-accent data-[state=checked]:bg-primary data-[state=checked]:border-primary"},size:{sm:"h-3.5 w-3.5",default:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"},radius:{none:"rounded-none",sm:"rounded-sm",default:"rounded-sm",md:"rounded-md",full:"rounded-full"},animation:{none:"",subtle:"transition-all duration-200",default:"transition-all duration-200",bounce:"transition-all duration-200"}},defaultVariants:{variant:"default",size:"default",radius:"default",animation:"default"}}),qp=Yo.forwardRef(({className:e,variant:t,size:o,radius:r,animation:a,indeterminate:n=!1,icon:s,checked:i,...l},u)=>{let[c,d]=Yo.useState(n);return Yo.useEffect(()=>{d(n)},[n]),(0,To.jsx)(Ld,{ref:u,checked:c?!1:i,className:S("moonui-theme",V2({variant:t,size:o,radius:r,animation:a}),e),...l,children:(0,To.jsx)(zp,{className:S("flex items-center justify-center text-current",a==="bounce"&&"data-[state=checked]:animate-bounce"),children:c?(0,To.jsx)(Wi,{className:"h-[65%] w-[65%]"}):s||(0,To.jsx)(It,{className:"h-[65%] w-[65%]"})})})});qp.displayName=Ld.displayName;var D0=Yo.forwardRef(({className:e,orientation:t="vertical",spacing:o="1rem",children:r,...a},n)=>(0,To.jsx)("div",{ref:n,className:S("flex",t==="vertical"?"flex-col":"flex-row flex-wrap",e),style:{gap:o},role:"group",...a,children:r}));D0.displayName="CheckboxGroup";var Pd=Yo.forwardRef(({className:e,htmlFor:t,children:o,position:r="end",disabled:a=!1,...n},s)=>(0,To.jsx)("label",{ref:s,htmlFor:t,className:S("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",r==="start"?"mr-2":"ml-2",a&&"cursor-not-allowed opacity-70",e),...n,children:o}));Pd.displayName="CheckboxLabel";var E0=Yo.forwardRef(({id:e,label:t,labelPosition:o="end",labelClassName:r,...a},n)=>{let s=Yo.useId(),i=e||s;return(0,To.jsxs)("div",{className:"flex items-center",children:[o==="start"&&(0,To.jsx)(Pd,{htmlFor:i,position:"start",disabled:a.disabled,className:r,children:t}),(0,To.jsx)(qp,{ref:n,id:i,...a}),o==="end"&&(0,To.jsx)(Pd,{htmlFor:i,position:"end",disabled:a.disabled,className:r,children:t})]})});E0.displayName="CheckboxWithLabel";var Wp=b(A());var kn=b(D()),B2=Gu,N0=te("flex w-full items-center justify-between transition-all",{variants:{variant:{default:"text-foreground hover:text-primary",ghost:"text-foreground hover:bg-accent/10 rounded",outline:"text-foreground border border-border rounded-t-md hover:bg-accent/5"},size:{sm:"text-xs py-2 px-3",default:"text-sm py-3 px-4",md:"text-base py-4 px-4",lg:"text-lg py-5 px-5"}},defaultVariants:{variant:"default",size:"default"}}),F0=Wp.forwardRef(({className:e,children:t,variant:o,size:r,asChild:a,...n},s)=>a?(0,kn.jsx)(ts,{ref:s,className:S("moonui-theme",N0({variant:o,size:r}),e),asChild:a,...n,children:t}):(0,kn.jsxs)(ts,{ref:s,className:S("moonui-theme",N0({variant:o,size:r}),e),...n,children:[t,(0,kn.jsx)(ur,{className:"h-4 w-4 shrink-0 ml-auto transition-transform duration-200 [&[data-state=open]]:rotate-180"})]}));F0.displayName=ts.displayName;var H2=te("overflow-hidden transition-all data-[state=closed]:animate-collapse-up data-[state=open]:animate-collapse-down",{variants:{variant:{default:"text-muted-foreground",ghost:"text-muted-foreground rounded-b",outline:"text-muted-foreground border border-t-0 border-border rounded-b-md"},size:{sm:"text-xs",default:"text-sm",md:"text-base",lg:"text-lg"}},defaultVariants:{variant:"default",size:"default"}}),O0=Wp.forwardRef(({className:e,children:t,variant:o,size:r,...a},n)=>(0,kn.jsx)(Ii,{ref:n,className:S("moonui-theme",H2({variant:o,size:r}),e),...a,children:(0,kn.jsx)("div",{className:"p-4",children:t})}));O0.displayName=Ii.displayName;var Fo=b(A());var _0=b(A());var Mo=b(D()),U2=te("group relative flex items-center w-full transition-colors",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),G2=te(["w-full bg-background transition-all duration-200","text-foreground placeholder:text-muted-foreground dark:placeholder:text-gray-500","disabled:cursor-not-allowed disabled:opacity-50","file:border-0 file:bg-transparent file:font-medium","focus-visible:outline-none dark:text-gray-200"],{variants:{variant:{standard:"border border-gray-300 dark:border-gray-700 rounded-md px-3 py-2 hover:border-gray-400 dark:hover:border-gray-600 focus-visible:ring-2 focus-visible:ring-primary/30 dark:focus-visible:ring-primary/20 focus-visible:border-primary dark:focus-visible:border-primary/80 dark:bg-gray-900/60 dark:shadow-inner dark:shadow-gray-950/10",filled:"border border-transparent bg-gray-100 dark:bg-gray-800/90 rounded-md px-3 py-2 hover:bg-gray-200 dark:hover:bg-gray-700/90 focus-visible:ring-2 focus-visible:ring-primary/30 dark:focus-visible:ring-primary/20 dark:shadow-inner dark:shadow-gray-950/10",ghost:"border-none bg-transparent shadow-none px-1 dark:text-gray-300 dark:placeholder:text-gray-500 hover:bg-gray-100/50 dark:hover:bg-gray-800/30 focus-visible:bg-transparent",underline:"border-t-0 border-l-0 border-r-0 border-b border-gray-300 dark:border-gray-600 rounded-none px-0 py-2 hover:border-gray-400 dark:hover:border-gray-500 focus-visible:ring-0 focus-visible:border-b-2 focus-visible:border-primary dark:focus-visible:border-primary/80 dark:text-gray-300"},size:{sm:"h-8 text-xs",md:"h-10 text-sm",lg:"h-12 text-base"},hasLeftIcon:{true:"pl-10",false:""},hasRightIcon:{true:"pr-10",false:""},hasRightButton:{true:"pr-10",false:""},isError:{true:"border-error focus-visible:ring-error/30 focus-visible:border-error hover:border-error/80 dark:hover:border-error/80",false:""},isSuccess:{true:"border-success focus-visible:ring-success/30 focus-visible:border-success hover:border-success/80 dark:hover:border-success/80",false:""},isDisabled:{true:"opacity-50 cursor-not-allowed bg-gray-50 dark:bg-gray-800/50 pointer-events-none",false:""}},defaultVariants:{variant:"standard",size:"md",isError:!1,isSuccess:!1,isDisabled:!1,hasLeftIcon:!1,hasRightIcon:!1,hasRightButton:!1}}),At=_0.forwardRef(({className:e,wrapperClassName:t,messageClassName:o,variant:r,size:a,isError:n,disabled:s,error:i,success:l,loading:u,leftIcon:c,rightIcon:d,rightButton:f,alwaysShowMessage:m=!1,...p},g)=>{let h=m||i||l,v=i?"error":l?"success":"normal";return(0,Mo.jsxs)("div",{className:"space-y-1.5 w-full",children:[(0,Mo.jsxs)("div",{className:S("moonui-theme",U2({size:a}),t),children:[c&&(0,Mo.jsx)("div",{className:"absolute left-3 text-gray-500 flex items-center justify-center pointer-events-none",children:u?(0,Mo.jsx)(St,{className:"h-4 w-4 animate-spin"}):c}),(0,Mo.jsx)("input",{className:S(G2({variant:r,size:a,isError:!!i||n,isSuccess:!!l,isDisabled:s||u,hasLeftIcon:!!c||u,hasRightIcon:!!d,hasRightButton:!!f}),e),ref:g,disabled:s||u,"data-loading":u?"":void 0,"data-error":i?"":void 0,"data-success":l?"":void 0,"aria-invalid":!!i||!!n||void 0,"aria-describedby":i?`${p.id||""}-error`:l?`${p.id||""}-success`:void 0,...p}),d&&!u&&(0,Mo.jsx)("div",{className:"absolute right-3 text-gray-500 flex items-center justify-center pointer-events-none",children:d}),f&&(0,Mo.jsx)("div",{className:"absolute right-3",children:f}),u&&!c&&(0,Mo.jsx)("div",{className:"absolute left-3 text-gray-500 flex items-center justify-center pointer-events-none",children:(0,Mo.jsx)(St,{className:"h-4 w-4 animate-spin","aria-hidden":"true"})})]}),h&&(0,Mo.jsx)("p",{className:S("text-xs transition-all",v==="error"&&"text-error",v==="success"&&"text-success",v==="normal"&&"text-muted-foreground",o),id:i?`${p.id||""}-error`:l?`${p.id||""}-success`:void 0,children:i||l||""})]})});At.displayName="Input";var U0=b(A());var V0=b(A(),1);var B0=b(D(),1),z2="Label",H0=V0.forwardRef((e,t)=>(0,B0.jsx)(H.label,{...e,ref:t,onMouseDown:o=>{o.target.closest("button, input, select, textarea")||(e.onMouseDown?.(o),!o.defaultPrevented&&o.detail>1&&o.preventDefault())}}));H0.displayName=z2;var $p=H0;var G0=b(D()),W2=te("text-sm font-medium leading-none text-gray-900 dark:text-gray-200 peer-disabled:cursor-not-allowed peer-disabled:opacity-70 dark:peer-disabled:opacity-60 transition-colors duration-200"),ao=U0.forwardRef(({className:e,...t},o)=>(0,G0.jsx)($p,{ref:o,className:S(W2(),e),...t}));ao.displayName=$p.displayName;var QR=b(A());var Ye=b(A(),1);var Je=b(A(),1);var z0=b(A(),1);function q0(e,t=globalThis?.document){let o=Te(e);z0.useEffect(()=>{let r=a=>{a.key==="Escape"&&o(a)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[o,t])}var Kp=b(D(),1),$2="DismissableLayer",jp="dismissableLayer.update",j2="dismissableLayer.pointerDownOutside",K2="dismissableLayer.focusOutside",W0,j0=Je.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ko=Je.forwardRef((e,t)=>{let{disableOutsidePointerEvents:o=!1,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:n,onInteractOutside:s,onDismiss:i,...l}=e,u=Je.useContext(j0),[c,d]=Je.useState(null),f=c?.ownerDocument??globalThis?.document,[,m]=Je.useState({}),p=ee(t,I=>d(I)),g=Array.from(u.layers),[h]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=g.indexOf(h),x=c?g.indexOf(c):-1,y=u.layersWithOutsidePointerEventsDisabled.size>0,R=x>=v,C=Y2(I=>{let L=I.target,P=[...u.branches].some(T=>T.contains(L));!R||P||(a?.(I),s?.(I),I.defaultPrevented||i?.())},f),w=Z2(I=>{let L=I.target;[...u.branches].some(T=>T.contains(L))||(n?.(I),s?.(I),I.defaultPrevented||i?.())},f);return q0(I=>{x===u.layers.size-1&&(r?.(I),!I.defaultPrevented&&i&&(I.preventDefault(),i()))},f),Je.useEffect(()=>{if(c)return o&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(W0=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(c)),u.layers.add(c),$0(),()=>{o&&u.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=W0)}},[c,f,o,u]),Je.useEffect(()=>()=>{c&&(u.layers.delete(c),u.layersWithOutsidePointerEventsDisabled.delete(c),$0())},[c,u]),Je.useEffect(()=>{let I=()=>m({});return document.addEventListener(jp,I),()=>document.removeEventListener(jp,I)},[]),(0,Kp.jsx)(H.div,{...l,ref:p,style:{pointerEvents:y?R?"auto":"none":void 0,...e.style},onFocusCapture:V(e.onFocusCapture,w.onFocusCapture),onBlurCapture:V(e.onBlurCapture,w.onBlurCapture),onPointerDownCapture:V(e.onPointerDownCapture,C.onPointerDownCapture)})});ko.displayName=$2;var X2="DismissableLayerBranch",K0=Je.forwardRef((e,t)=>{let o=Je.useContext(j0),r=Je.useRef(null),a=ee(t,r);return Je.useEffect(()=>{let n=r.current;if(n)return o.branches.add(n),()=>{o.branches.delete(n)}},[o.branches]),(0,Kp.jsx)(H.div,{...e,ref:a})});K0.displayName=X2;function Y2(e,t=globalThis?.document){let o=Te(e),r=Je.useRef(!1),a=Je.useRef(()=>{});return Je.useEffect(()=>{let n=i=>{if(i.target&&!r.current){let u=function(){X0(j2,o,c,{discrete:!0})};var l=u;let c={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",a.current),a.current=u,t.addEventListener("click",a.current,{once:!0})):u()}else t.removeEventListener("click",a.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",n)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",n),t.removeEventListener("click",a.current)}},[t,o]),{onPointerDownCapture:()=>r.current=!0}}function Z2(e,t=globalThis?.document){let o=Te(e),r=Je.useRef(!1);return Je.useEffect(()=>{let a=n=>{n.target&&!r.current&&X0(K2,o,{originalEvent:n},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,o]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function $0(){let e=new CustomEvent(jp);document.dispatchEvent(e)}function X0(e,t,o,{discrete:r}){let a=o.originalEvent.target,n=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:o});t&&a.addEventListener(e,t,{once:!0}),r?es(a,n):a.dispatchEvent(n)}var Y0=ko,Z0=K0;var J0=b(A(),1),Xp=0;function Ma(){J0.useEffect(()=>{let e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Q0()),document.body.insertAdjacentElement("beforeend",e[1]??Q0()),Xp++,()=>{Xp===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Xp--}},[])}function Q0(){let 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 Ao=b(A(),1);var aS=b(D(),1),Yp="focusScope.autoFocusOnMount",Zp="focusScope.autoFocusOnUnmount",eS={bubbles:!1,cancelable:!0},J2="FocusScope",Gr=Ao.forwardRef((e,t)=>{let{loop:o=!1,trapped:r=!1,onMountAutoFocus:a,onUnmountAutoFocus:n,...s}=e,[i,l]=Ao.useState(null),u=Te(a),c=Te(n),d=Ao.useRef(null),f=ee(t,g=>l(g)),m=Ao.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;Ao.useEffect(()=>{if(r){let x=function(w){if(m.paused||!i)return;let I=w.target;i.contains(I)?d.current=I:ka(d.current,{select:!0})},y=function(w){if(m.paused||!i)return;let I=w.relatedTarget;I!==null&&(i.contains(I)||ka(d.current,{select:!0}))},R=function(w){if(document.activeElement===document.body)for(let L of w)L.removedNodes.length>0&&ka(i)};var g=x,h=y,v=R;document.addEventListener("focusin",x),document.addEventListener("focusout",y);let C=new MutationObserver(R);return i&&C.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",x),document.removeEventListener("focusout",y),C.disconnect()}}},[r,i,m.paused]),Ao.useEffect(()=>{if(i){oS.add(m);let g=document.activeElement;if(!i.contains(g)){let v=new CustomEvent(Yp,eS);i.addEventListener(Yp,u),i.dispatchEvent(v),v.defaultPrevented||(eF(nF(nS(i)),{select:!0}),document.activeElement===g&&ka(i))}return()=>{i.removeEventListener(Yp,u),setTimeout(()=>{let v=new CustomEvent(Zp,eS);i.addEventListener(Zp,c),i.dispatchEvent(v),v.defaultPrevented||ka(g??document.body,{select:!0}),i.removeEventListener(Zp,c),oS.remove(m)},0)}}},[i,u,c,m]);let p=Ao.useCallback(g=>{if(!o&&!r||m.paused)return;let h=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,v=document.activeElement;if(h&&v){let x=g.currentTarget,[y,R]=tF(x);y&&R?!g.shiftKey&&v===R?(g.preventDefault(),o&&ka(y,{select:!0})):g.shiftKey&&v===y&&(g.preventDefault(),o&&ka(R,{select:!0})):v===x&&g.preventDefault()}},[o,r,m.paused]);return(0,aS.jsx)(H.div,{tabIndex:-1,...s,ref:f,onKeyDown:p})});Gr.displayName=J2;function eF(e,{select:t=!1}={}){let o=document.activeElement;for(let r of e)if(ka(r,{select:t}),document.activeElement!==o)return}function tF(e){let t=nS(e),o=tS(t,e),r=tS(t.reverse(),e);return[o,r]}function nS(e){let t=[],o=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{let a=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||a?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;o.nextNode();)t.push(o.currentNode);return t}function tS(e,t){for(let o of e)if(!oF(o,{upTo:t}))return o}function oF(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 rF(e){return e instanceof HTMLInputElement&&"select"in e}function ka(e,{select:t=!1}={}){if(e&&e.focus){let o=document.activeElement;e.focus({preventScroll:!0}),e!==o&&rF(e)&&t&&e.select()}}var oS=aF();function aF(){let e=[];return{add(t){let o=e[0];t!==o&&o?.pause(),e=rS(e,t),e.unshift(t)},remove(t){e=rS(e,t),e[0]?.resume()}}}function rS(e,t){let o=[...e],r=o.indexOf(t);return r!==-1&&o.splice(r,1),o}function nF(e){return e.filter(t=>t.tagName!=="A")}var so=b(A(),1);var lS=["top","right","bottom","left"];var hr=Math.min,qt=Math.max,Zl=Math.round,Ql=Math.floor,Zo=e=>({x:e,y:e}),sF={left:"right",right:"left",bottom:"top",top:"bottom"},iF={start:"end",end:"start"};function Md(e,t,o){return qt(e,hr(t,o))}function xr(e,t){return typeof e=="function"?e(t):e}function vr(e){return e.split("-")[0]}function An(e){return e.split("-")[1]}function kd(e){return e==="x"?"y":"x"}function Ad(e){return e==="y"?"height":"width"}var lF=new Set(["top","bottom"]);function Qo(e){return lF.has(vr(e))?"y":"x"}function Dd(e){return kd(Qo(e))}function uS(e,t,o){o===void 0&&(o=!1);let r=An(e),a=Dd(e),n=Ad(a),s=a==="x"?r===(o?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[n]>t.floating[n]&&(s=Yl(s)),[s,Yl(s)]}function cS(e){let t=Yl(e);return[Td(e),t,Td(t)]}function Td(e){return e.replace(/start|end/g,t=>iF[t])}var sS=["left","right"],iS=["right","left"],uF=["top","bottom"],cF=["bottom","top"];function dF(e,t,o){switch(e){case"top":case"bottom":return o?t?iS:sS:t?sS:iS;case"left":case"right":return t?uF:cF;default:return[]}}function dS(e,t,o,r){let a=An(e),n=dF(vr(e),o==="start",r);return a&&(n=n.map(s=>s+"-"+a),t&&(n=n.concat(n.map(Td)))),n}function Yl(e){return e.replace(/left|right|bottom|top/g,t=>sF[t])}function fF(e){return{top:0,right:0,bottom:0,left:0,...e}}function Qp(e){return typeof e!="number"?fF(e):{top:e,right:e,bottom:e,left:e}}function Dn(e){let{x:t,y:o,width:r,height:a}=e;return{width:r,height:a,top:o,left:t,right:t+r,bottom:o+a,x:t,y:o}}function fS(e,t,o){let{reference:r,floating:a}=e,n=Qo(t),s=Dd(t),i=Ad(s),l=vr(t),u=n==="y",c=r.x+r.width/2-a.width/2,d=r.y+r.height/2-a.height/2,f=r[i]/2-a[i]/2,m;switch(l){case"top":m={x:c,y:r.y-a.height};break;case"bottom":m={x:c,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:d};break;case"left":m={x:r.x-a.width,y:d};break;default:m={x:r.x,y:r.y}}switch(An(t)){case"start":m[s]-=f*(o&&u?-1:1);break;case"end":m[s]+=f*(o&&u?-1:1);break}return m}var gS=async(e,t,o)=>{let{placement:r="bottom",strategy:a="absolute",middleware:n=[],platform:s}=o,i=n.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(t)),u=await s.getElementRects({reference:e,floating:t,strategy:a}),{x:c,y:d}=fS(u,r,l),f=r,m={},p=0;for(let g=0;g<i.length;g++){let{name:h,fn:v}=i[g],{x,y,data:R,reset:C}=await v({x:c,y:d,initialPlacement:r,placement:f,strategy:a,middlewareData:m,rects:u,platform:s,elements:{reference:e,floating:t}});c=x??c,d=y??d,m={...m,[h]:{...m[h],...R}},C&&p<=50&&(p++,typeof C=="object"&&(C.placement&&(f=C.placement),C.rects&&(u=C.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:a}):C.rects),{x:c,y:d}=fS(u,f,l)),g=-1)}return{x:c,y:d,placement:f,strategy:a,middlewareData:m}};async function Zs(e,t){var o;t===void 0&&(t={});let{x:r,y:a,platform:n,rects:s,elements:i,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:m=0}=xr(t,e),p=Qp(m),h=i[f?d==="floating"?"reference":"floating":d],v=Dn(await n.getClippingRect({element:(o=await(n.isElement==null?void 0:n.isElement(h)))==null||o?h:h.contextElement||await(n.getDocumentElement==null?void 0:n.getDocumentElement(i.floating)),boundary:u,rootBoundary:c,strategy:l})),x=d==="floating"?{x:r,y:a,width:s.floating.width,height:s.floating.height}:s.reference,y=await(n.getOffsetParent==null?void 0:n.getOffsetParent(i.floating)),R=await(n.isElement==null?void 0:n.isElement(y))?await(n.getScale==null?void 0:n.getScale(y))||{x:1,y:1}:{x:1,y:1},C=Dn(n.convertOffsetParentRelativeRectToViewportRelativeRect?await n.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:x,offsetParent:y,strategy:l}):x);return{top:(v.top-C.top+p.top)/R.y,bottom:(C.bottom-v.bottom+p.bottom)/R.y,left:(v.left-C.left+p.left)/R.x,right:(C.right-v.right+p.right)/R.x}}var hS=e=>({name:"arrow",options:e,async fn(t){let{x:o,y:r,placement:a,rects:n,platform:s,elements:i,middlewareData:l}=t,{element:u,padding:c=0}=xr(e,t)||{};if(u==null)return{};let d=Qp(c),f={x:o,y:r},m=Dd(a),p=Ad(m),g=await s.getDimensions(u),h=m==="y",v=h?"top":"left",x=h?"bottom":"right",y=h?"clientHeight":"clientWidth",R=n.reference[p]+n.reference[m]-f[m]-n.floating[p],C=f[m]-n.reference[m],w=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u)),I=w?w[y]:0;(!I||!await(s.isElement==null?void 0:s.isElement(w)))&&(I=i.floating[y]||n.floating[p]);let L=R/2-C/2,P=I/2-g[p]/2-1,T=hr(d[v],P),O=hr(d[x],P),$=T,W=I-g[p]-O,N=I/2-g[p]/2+L,q=Md($,N,W),E=!l.arrow&&An(a)!=null&&N!==q&&n.reference[p]/2-(N<$?T:O)-g[p]/2<0,G=E?N<$?N-$:N-W:0;return{[m]:f[m]+G,data:{[m]:q,centerOffset:N-q-G,...E&&{alignmentOffset:G}},reset:E}}});var xS=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var o,r;let{placement:a,middlewareData:n,rects:s,initialPlacement:i,platform:l,elements:u}=t,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:g=!0,...h}=xr(e,t);if((o=n.arrow)!=null&&o.alignmentOffset)return{};let v=vr(a),x=Qo(i),y=vr(i)===i,R=await(l.isRTL==null?void 0:l.isRTL(u.floating)),C=f||(y||!g?[Yl(i)]:cS(i)),w=p!=="none";!f&&w&&C.push(...dS(i,g,p,R));let I=[i,...C],L=await Zs(t,h),P=[],T=((r=n.flip)==null?void 0:r.overflows)||[];if(c&&P.push(L[v]),d){let N=uS(a,s,R);P.push(L[N[0]],L[N[1]])}if(T=[...T,{placement:a,overflows:P}],!P.every(N=>N<=0)){var O,$;let N=(((O=n.flip)==null?void 0:O.index)||0)+1,q=I[N];if(q&&(!(d==="alignment"?x!==Qo(q):!1)||T.every(M=>Qo(M.placement)===x?M.overflows[0]>0:!0)))return{data:{index:N,overflows:T},reset:{placement:q}};let E=($=T.filter(G=>G.overflows[0]<=0).sort((G,M)=>G.overflows[1]-M.overflows[1])[0])==null?void 0:$.placement;if(!E)switch(m){case"bestFit":{var W;let G=(W=T.filter(M=>{if(w){let k=Qo(M.placement);return k===x||k==="y"}return!0}).map(M=>[M.placement,M.overflows.filter(k=>k>0).reduce((k,re)=>k+re,0)]).sort((M,k)=>M[1]-k[1])[0])==null?void 0:W[0];G&&(E=G);break}case"initialPlacement":E=i;break}if(a!==E)return{reset:{placement:E}}}return{}}}};function mS(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function pS(e){return lS.some(t=>e[t]>=0)}var vS=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){let{rects:o}=t,{strategy:r="referenceHidden",...a}=xr(e,t);switch(r){case"referenceHidden":{let n=await Zs(t,{...a,elementContext:"reference"}),s=mS(n,o.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:pS(s)}}}case"escaped":{let n=await Zs(t,{...a,altBoundary:!0}),s=mS(n,o.floating);return{data:{escapedOffsets:s,escaped:pS(s)}}}default:return{}}}}};var yS=new Set(["left","top"]);async function mF(e,t){let{placement:o,platform:r,elements:a}=e,n=await(r.isRTL==null?void 0:r.isRTL(a.floating)),s=vr(o),i=An(o),l=Qo(o)==="y",u=yS.has(s)?-1:1,c=n&&l?-1:1,d=xr(t,e),{mainAxis:f,crossAxis:m,alignmentAxis:p}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return i&&typeof p=="number"&&(m=i==="end"?p*-1:p),l?{x:m*c,y:f*u}:{x:f*u,y:m*c}}var bS=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var o,r;let{x:a,y:n,placement:s,middlewareData:i}=t,l=await mF(t,e);return s===((o=i.offset)==null?void 0:o.placement)&&(r=i.arrow)!=null&&r.alignmentOffset?{}:{x:a+l.x,y:n+l.y,data:{...l,placement:s}}}}},CS=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:o,y:r,placement:a}=t,{mainAxis:n=!0,crossAxis:s=!1,limiter:i={fn:h=>{let{x:v,y:x}=h;return{x:v,y:x}}},...l}=xr(e,t),u={x:o,y:r},c=await Zs(t,l),d=Qo(vr(a)),f=kd(d),m=u[f],p=u[d];if(n){let h=f==="y"?"top":"left",v=f==="y"?"bottom":"right",x=m+c[h],y=m-c[v];m=Md(x,m,y)}if(s){let h=d==="y"?"top":"left",v=d==="y"?"bottom":"right",x=p+c[h],y=p-c[v];p=Md(x,p,y)}let g=i.fn({...t,[f]:m,[d]:p});return{...g,data:{x:g.x-o,y:g.y-r,enabled:{[f]:n,[d]:s}}}}}},wS=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:o,y:r,placement:a,rects:n,middlewareData:s}=t,{offset:i=0,mainAxis:l=!0,crossAxis:u=!0}=xr(e,t),c={x:o,y:r},d=Qo(a),f=kd(d),m=c[f],p=c[d],g=xr(i,t),h=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(l){let y=f==="y"?"height":"width",R=n.reference[f]-n.floating[y]+h.mainAxis,C=n.reference[f]+n.reference[y]-h.mainAxis;m<R?m=R:m>C&&(m=C)}if(u){var v,x;let y=f==="y"?"width":"height",R=yS.has(vr(a)),C=n.reference[d]-n.floating[y]+(R&&((v=s.offset)==null?void 0:v[d])||0)+(R?0:h.crossAxis),w=n.reference[d]+n.reference[y]+(R?0:((x=s.offset)==null?void 0:x[d])||0)-(R?h.crossAxis:0);p<C?p=C:p>w&&(p=w)}return{[f]:m,[d]:p}}}},SS=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var o,r;let{placement:a,rects:n,platform:s,elements:i}=t,{apply:l=()=>{},...u}=xr(e,t),c=await Zs(t,u),d=vr(a),f=An(a),m=Qo(a)==="y",{width:p,height:g}=n.floating,h,v;d==="top"||d==="bottom"?(h=d,v=f===(await(s.isRTL==null?void 0:s.isRTL(i.floating))?"start":"end")?"left":"right"):(v=d,h=f==="end"?"top":"bottom");let x=g-c.top-c.bottom,y=p-c.left-c.right,R=hr(g-c[h],x),C=hr(p-c[v],y),w=!t.middlewareData.shift,I=R,L=C;if((o=t.middlewareData.shift)!=null&&o.enabled.x&&(L=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(I=x),w&&!f){let T=qt(c.left,0),O=qt(c.right,0),$=qt(c.top,0),W=qt(c.bottom,0);m?L=p-2*(T!==0||O!==0?T+O:qt(c.left,c.right)):I=g-2*($!==0||W!==0?$+W:qt(c.top,c.bottom))}await l({...t,availableWidth:L,availableHeight:I});let P=await s.getDimensions(i.floating);return p!==P.width||g!==P.height?{reset:{rects:!0}}:{}}}};function Ed(){return typeof window<"u"}function Nn(e){return IS(e)?(e.nodeName||"").toLowerCase():"#document"}function no(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Jo(e){var t;return(t=(IS(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function IS(e){return Ed()?e instanceof Node||e instanceof no(e).Node:!1}function Do(e){return Ed()?e instanceof Element||e instanceof no(e).Element:!1}function er(e){return Ed()?e instanceof HTMLElement||e instanceof no(e).HTMLElement:!1}function RS(e){return!Ed()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof no(e).ShadowRoot}var pF=new Set(["inline","contents"]);function Qs(e){let{overflow:t,overflowX:o,overflowY:r,display:a}=Eo(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+o)&&!pF.has(a)}var gF=new Set(["table","td","th"]);function LS(e){return gF.has(Nn(e))}var hF=[":popover-open",":modal"];function Jl(e){return hF.some(t=>{try{return e.matches(t)}catch{return!1}})}var xF=["transform","translate","scale","rotate","perspective"],vF=["transform","translate","scale","rotate","perspective","filter"],yF=["paint","layout","strict","content"];function Nd(e){let t=Fd(),o=Do(e)?Eo(e):e;return xF.some(r=>o[r]?o[r]!=="none":!1)||(o.containerType?o.containerType!=="normal":!1)||!t&&(o.backdropFilter?o.backdropFilter!=="none":!1)||!t&&(o.filter?o.filter!=="none":!1)||vF.some(r=>(o.willChange||"").includes(r))||yF.some(r=>(o.contain||"").includes(r))}function PS(e){let t=zr(e);for(;er(t)&&!Fn(t);){if(Nd(t))return t;if(Jl(t))return null;t=zr(t)}return null}function Fd(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}var bF=new Set(["html","body","#document"]);function Fn(e){return bF.has(Nn(e))}function Eo(e){return no(e).getComputedStyle(e)}function eu(e){return Do(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function zr(e){if(Nn(e)==="html")return e;let t=e.assignedSlot||e.parentNode||RS(e)&&e.host||Jo(e);return RS(t)?t.host:t}function TS(e){let t=zr(e);return Fn(t)?e.ownerDocument?e.ownerDocument.body:e.body:er(t)&&Qs(t)?t:TS(t)}function En(e,t,o){var r;t===void 0&&(t=[]),o===void 0&&(o=!0);let a=TS(e),n=a===((r=e.ownerDocument)==null?void 0:r.body),s=no(a);if(n){let i=Od(s);return t.concat(s,s.visualViewport||[],Qs(a)?a:[],i&&o?En(i):[])}return t.concat(a,En(a,[],o))}function Od(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function DS(e){let t=Eo(e),o=parseFloat(t.width)||0,r=parseFloat(t.height)||0,a=er(e),n=a?e.offsetWidth:o,s=a?e.offsetHeight:r,i=Zl(o)!==n||Zl(r)!==s;return i&&(o=n,r=s),{width:o,height:r,$:i}}function eg(e){return Do(e)?e:e.contextElement}function Js(e){let t=eg(e);if(!er(t))return Zo(1);let o=t.getBoundingClientRect(),{width:r,height:a,$:n}=DS(t),s=(n?Zl(o.width):o.width)/r,i=(n?Zl(o.height):o.height)/a;return(!s||!Number.isFinite(s))&&(s=1),(!i||!Number.isFinite(i))&&(i=1),{x:s,y:i}}var CF=Zo(0);function ES(e){let t=no(e);return!Fd()||!t.visualViewport?CF:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function wF(e,t,o){return t===void 0&&(t=!1),!o||t&&o!==no(e)?!1:t}function On(e,t,o,r){t===void 0&&(t=!1),o===void 0&&(o=!1);let a=e.getBoundingClientRect(),n=eg(e),s=Zo(1);t&&(r?Do(r)&&(s=Js(r)):s=Js(e));let i=wF(n,o,r)?ES(n):Zo(0),l=(a.left+i.x)/s.x,u=(a.top+i.y)/s.y,c=a.width/s.x,d=a.height/s.y;if(n){let f=no(n),m=r&&Do(r)?no(r):r,p=f,g=Od(p);for(;g&&r&&m!==p;){let h=Js(g),v=g.getBoundingClientRect(),x=Eo(g),y=v.left+(g.clientLeft+parseFloat(x.paddingLeft))*h.x,R=v.top+(g.clientTop+parseFloat(x.paddingTop))*h.y;l*=h.x,u*=h.y,c*=h.x,d*=h.y,l+=y,u+=R,p=no(g),g=Od(p)}}return Dn({width:c,height:d,x:l,y:u})}function _d(e,t){let o=eu(e).scrollLeft;return t?t.left+o:On(Jo(e)).left+o}function NS(e,t){let o=e.getBoundingClientRect(),r=o.left+t.scrollLeft-_d(e,o),a=o.top+t.scrollTop;return{x:r,y:a}}function SF(e){let{elements:t,rect:o,offsetParent:r,strategy:a}=e,n=a==="fixed",s=Jo(r),i=t?Jl(t.floating):!1;if(r===s||i&&n)return o;let l={scrollLeft:0,scrollTop:0},u=Zo(1),c=Zo(0),d=er(r);if((d||!d&&!n)&&((Nn(r)!=="body"||Qs(s))&&(l=eu(r)),er(r))){let m=On(r);u=Js(r),c.x=m.x+r.clientLeft,c.y=m.y+r.clientTop}let f=s&&!d&&!n?NS(s,l):Zo(0);return{width:o.width*u.x,height:o.height*u.y,x:o.x*u.x-l.scrollLeft*u.x+c.x+f.x,y:o.y*u.y-l.scrollTop*u.y+c.y+f.y}}function RF(e){return Array.from(e.getClientRects())}function IF(e){let t=Jo(e),o=eu(e),r=e.ownerDocument.body,a=qt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),n=qt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),s=-o.scrollLeft+_d(e),i=-o.scrollTop;return Eo(r).direction==="rtl"&&(s+=qt(t.clientWidth,r.clientWidth)-a),{width:a,height:n,x:s,y:i}}var MS=25;function LF(e,t){let o=no(e),r=Jo(e),a=o.visualViewport,n=r.clientWidth,s=r.clientHeight,i=0,l=0;if(a){n=a.width,s=a.height;let c=Fd();(!c||c&&t==="fixed")&&(i=a.offsetLeft,l=a.offsetTop)}let u=_d(r);if(u<=0){let c=r.ownerDocument,d=c.body,f=getComputedStyle(d),m=c.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,p=Math.abs(r.clientWidth-d.clientWidth-m);p<=MS&&(n-=p)}else u<=MS&&(n+=u);return{width:n,height:s,x:i,y:l}}var PF=new Set(["absolute","fixed"]);function TF(e,t){let o=On(e,!0,t==="fixed"),r=o.top+e.clientTop,a=o.left+e.clientLeft,n=er(e)?Js(e):Zo(1),s=e.clientWidth*n.x,i=e.clientHeight*n.y,l=a*n.x,u=r*n.y;return{width:s,height:i,x:l,y:u}}function kS(e,t,o){let r;if(t==="viewport")r=LF(e,o);else if(t==="document")r=IF(Jo(e));else if(Do(t))r=TF(t,o);else{let a=ES(e);r={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return Dn(r)}function FS(e,t){let o=zr(e);return o===t||!Do(o)||Fn(o)?!1:Eo(o).position==="fixed"||FS(o,t)}function MF(e,t){let o=t.get(e);if(o)return o;let r=En(e,[],!1).filter(i=>Do(i)&&Nn(i)!=="body"),a=null,n=Eo(e).position==="fixed",s=n?zr(e):e;for(;Do(s)&&!Fn(s);){let i=Eo(s),l=Nd(s);!l&&i.position==="fixed"&&(a=null),(n?!l&&!a:!l&&i.position==="static"&&!!a&&PF.has(a.position)||Qs(s)&&!l&&FS(e,s))?r=r.filter(c=>c!==s):a=i,s=zr(s)}return t.set(e,r),r}function kF(e){let{element:t,boundary:o,rootBoundary:r,strategy:a}=e,s=[...o==="clippingAncestors"?Jl(t)?[]:MF(t,this._c):[].concat(o),r],i=s[0],l=s.reduce((u,c)=>{let d=kS(t,c,a);return u.top=qt(d.top,u.top),u.right=hr(d.right,u.right),u.bottom=hr(d.bottom,u.bottom),u.left=qt(d.left,u.left),u},kS(t,i,a));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function AF(e){let{width:t,height:o}=DS(e);return{width:t,height:o}}function DF(e,t,o){let r=er(t),a=Jo(t),n=o==="fixed",s=On(e,!0,n,t),i={scrollLeft:0,scrollTop:0},l=Zo(0);function u(){l.x=_d(a)}if(r||!r&&!n)if((Nn(t)!=="body"||Qs(a))&&(i=eu(t)),r){let m=On(t,!0,n,t);l.x=m.x+t.clientLeft,l.y=m.y+t.clientTop}else a&&u();n&&!r&&a&&u();let c=a&&!r&&!n?NS(a,i):Zo(0),d=s.left+i.scrollLeft-l.x-c.x,f=s.top+i.scrollTop-l.y-c.y;return{x:d,y:f,width:s.width,height:s.height}}function Jp(e){return Eo(e).position==="static"}function AS(e,t){if(!er(e)||Eo(e).position==="fixed")return null;if(t)return t(e);let o=e.offsetParent;return Jo(e)===o&&(o=o.ownerDocument.body),o}function OS(e,t){let o=no(e);if(Jl(e))return o;if(!er(e)){let a=zr(e);for(;a&&!Fn(a);){if(Do(a)&&!Jp(a))return a;a=zr(a)}return o}let r=AS(e,t);for(;r&&LS(r)&&Jp(r);)r=AS(r,t);return r&&Fn(r)&&Jp(r)&&!Nd(r)?o:r||PS(e)||o}var EF=async function(e){let t=this.getOffsetParent||OS,o=this.getDimensions,r=await o(e.floating);return{reference:DF(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function NF(e){return Eo(e).direction==="rtl"}var _S={convertOffsetParentRelativeRectToViewportRelativeRect:SF,getDocumentElement:Jo,getClippingRect:kF,getOffsetParent:OS,getElementRects:EF,getClientRects:RF,getDimensions:AF,getScale:Js,isElement:Do,isRTL:NF};function VS(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function FF(e,t){let o=null,r,a=Jo(e);function n(){var i;clearTimeout(r),(i=o)==null||i.disconnect(),o=null}function s(i,l){i===void 0&&(i=!1),l===void 0&&(l=1),n();let u=e.getBoundingClientRect(),{left:c,top:d,width:f,height:m}=u;if(i||t(),!f||!m)return;let p=Ql(d),g=Ql(a.clientWidth-(c+f)),h=Ql(a.clientHeight-(d+m)),v=Ql(c),y={rootMargin:-p+"px "+-g+"px "+-h+"px "+-v+"px",threshold:qt(0,hr(1,l))||1},R=!0;function C(w){let I=w[0].intersectionRatio;if(I!==l){if(!R)return s();I?s(!1,I):r=setTimeout(()=>{s(!1,1e-7)},1e3)}I===1&&!VS(u,e.getBoundingClientRect())&&s(),R=!1}try{o=new IntersectionObserver(C,{...y,root:a.ownerDocument})}catch{o=new IntersectionObserver(C,y)}o.observe(e)}return s(!0),n}function tg(e,t,o,r){r===void 0&&(r={});let{ancestorScroll:a=!0,ancestorResize:n=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=eg(e),c=a||n?[...u?En(u):[],...En(t)]:[];c.forEach(v=>{a&&v.addEventListener("scroll",o,{passive:!0}),n&&v.addEventListener("resize",o)});let d=u&&i?FF(u,o):null,f=-1,m=null;s&&(m=new ResizeObserver(v=>{let[x]=v;x&&x.target===u&&m&&(m.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var y;(y=m)==null||y.observe(t)})),o()}),u&&!l&&m.observe(u),m.observe(t));let p,g=l?On(e):null;l&&h();function h(){let v=On(e);g&&!VS(g,v)&&o(),g=v,p=requestAnimationFrame(h)}return o(),()=>{var v;c.forEach(x=>{a&&x.removeEventListener("scroll",o),n&&x.removeEventListener("resize",o)}),d?.(),(v=m)==null||v.disconnect(),m=null,l&&cancelAnimationFrame(p)}}var BS=bS;var HS=CS,US=xS,GS=SS,zS=vS,og=hS;var qS=wS,rg=(e,t,o)=>{let r=new Map,a={platform:_S,...o},n={...a.platform,_c:r};return gS(e,t,{...a,platform:n})};var st=b(A(),1),$S=b(A(),1),jS=b(Jn(),1),OF=typeof document<"u",_F=function(){},Vd=OF?$S.useLayoutEffect:_F;function Bd(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 o,r,a;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(o=e.length,o!==t.length)return!1;for(r=o;r--!==0;)if(!Bd(e[r],t[r]))return!1;return!0}if(a=Object.keys(e),o=a.length,o!==Object.keys(t).length)return!1;for(r=o;r--!==0;)if(!{}.hasOwnProperty.call(t,a[r]))return!1;for(r=o;r--!==0;){let n=a[r];if(!(n==="_owner"&&e.$$typeof)&&!Bd(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function KS(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function WS(e,t){let o=KS(e);return Math.round(t*o)/o}function ag(e){let t=st.useRef(e);return Vd(()=>{t.current=e}),t}function XS(e){e===void 0&&(e={});let{placement:t="bottom",strategy:o="absolute",middleware:r=[],platform:a,elements:{reference:n,floating:s}={},transform:i=!0,whileElementsMounted:l,open:u}=e,[c,d]=st.useState({x:0,y:0,strategy:o,placement:t,middlewareData:{},isPositioned:!1}),[f,m]=st.useState(r);Bd(f,r)||m(r);let[p,g]=st.useState(null),[h,v]=st.useState(null),x=st.useCallback(M=>{M!==w.current&&(w.current=M,g(M))},[]),y=st.useCallback(M=>{M!==I.current&&(I.current=M,v(M))},[]),R=n||p,C=s||h,w=st.useRef(null),I=st.useRef(null),L=st.useRef(c),P=l!=null,T=ag(l),O=ag(a),$=ag(u),W=st.useCallback(()=>{if(!w.current||!I.current)return;let M={placement:t,strategy:o,middleware:f};O.current&&(M.platform=O.current),rg(w.current,I.current,M).then(k=>{let re={...k,isPositioned:$.current!==!1};N.current&&!Bd(L.current,re)&&(L.current=re,jS.flushSync(()=>{d(re)}))})},[f,t,o,O,$]);Vd(()=>{u===!1&&L.current.isPositioned&&(L.current.isPositioned=!1,d(M=>({...M,isPositioned:!1})))},[u]);let N=st.useRef(!1);Vd(()=>(N.current=!0,()=>{N.current=!1}),[]),Vd(()=>{if(R&&(w.current=R),C&&(I.current=C),R&&C){if(T.current)return T.current(R,C,W);W()}},[R,C,W,T,P]);let q=st.useMemo(()=>({reference:w,floating:I,setReference:x,setFloating:y}),[x,y]),E=st.useMemo(()=>({reference:R,floating:C}),[R,C]),G=st.useMemo(()=>{let M={position:o,left:0,top:0};if(!E.floating)return M;let k=WS(E.floating,c.x),re=WS(E.floating,c.y);return i?{...M,transform:"translate("+k+"px, "+re+"px)",...KS(E.floating)>=1.5&&{willChange:"transform"}}:{position:o,left:k,top:re}},[o,i,E.floating,c.x,c.y]);return st.useMemo(()=>({...c,update:W,refs:q,elements:E,floatingStyles:G}),[c,W,q,E,G])}var VF=e=>{function t(o){return{}.hasOwnProperty.call(o,"current")}return{name:"arrow",options:e,fn(o){let{element:r,padding:a}=typeof e=="function"?e(o):e;return r&&t(r)?r.current!=null?og({element:r.current,padding:a}).fn(o):{}:r?og({element:r,padding:a}).fn(o):{}}}},YS=(e,t)=>({...BS(e),options:[e,t]}),ZS=(e,t)=>({...HS(e),options:[e,t]}),QS=(e,t)=>({...qS(e),options:[e,t]}),JS=(e,t)=>({...US(e),options:[e,t]}),eR=(e,t)=>({...GS(e),options:[e,t]});var tR=(e,t)=>({...zS(e),options:[e,t]});var oR=(e,t)=>({...VF(e),options:[e,t]});var rR=b(A(),1);var ng=b(D(),1),BF="Arrow",aR=rR.forwardRef((e,t)=>{let{children:o,width:r=10,height:a=5,...n}=e;return(0,ng.jsx)(H.svg,{...n,ref:t,width:r,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?o:(0,ng.jsx)("polygon",{points:"0,0 30,0 15,10"})})});aR.displayName=BF;var nR=aR;var Aa=b(D(),1);var sg="Popper",[sR,No]=Re(sg),[UF,iR]=sR(sg),lR=e=>{let{__scopePopper:t,children:o}=e,[r,a]=so.useState(null);return(0,Aa.jsx)(UF,{scope:t,anchor:r,onAnchorChange:a,children:o})};lR.displayName=sg;var uR="PopperAnchor",cR=so.forwardRef((e,t)=>{let{__scopePopper:o,virtualRef:r,...a}=e,n=iR(uR,o),s=so.useRef(null),i=ee(t,s),l=so.useRef(null);return so.useEffect(()=>{let u=l.current;l.current=r?.current||s.current,u!==l.current&&n.onAnchorChange(l.current)}),r?null:(0,Aa.jsx)(H.div,{...a,ref:i})});cR.displayName=uR;var ig="PopperContent",[GF,zF]=sR(ig),dR=so.forwardRef((e,t)=>{let{__scopePopper:o,side:r="bottom",sideOffset:a=0,align:n="center",alignOffset:s=0,arrowPadding:i=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:c=0,sticky:d="partial",hideWhenDetached:f=!1,updatePositionStrategy:m="optimized",onPlaced:p,...g}=e,h=iR(ig,o),[v,x]=so.useState(null),y=ee(t,_=>x(_)),[R,C]=so.useState(null),w=Ys(R),I=w?.width??0,L=w?.height??0,P=r+(n!=="center"?"-"+n:""),T=typeof c=="number"?c:{top:0,right:0,bottom:0,left:0,...c},O=Array.isArray(u)?u:[u],$=O.length>0,W={padding:T,boundary:O.filter(WF),altBoundary:$},{refs:N,floatingStyles:q,placement:E,isPositioned:G,middlewareData:M}=XS({strategy:"fixed",placement:P,whileElementsMounted:(..._)=>tg(..._,{animationFrame:m==="always"}),elements:{reference:h.anchor},middleware:[YS({mainAxis:a+L,alignmentAxis:s}),l&&ZS({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?QS():void 0,...W}),l&&JS({...W}),eR({...W,apply:({elements:_,rects:ce,availableWidth:he,availableHeight:we})=>{let{width:_e,height:We}=ce.reference,bo=_.floating.style;bo.setProperty("--radix-popper-available-width",`${he}px`),bo.setProperty("--radix-popper-available-height",`${we}px`),bo.setProperty("--radix-popper-anchor-width",`${_e}px`),bo.setProperty("--radix-popper-anchor-height",`${We}px`)}}),R&&oR({element:R,padding:i}),$F({arrowWidth:I,arrowHeight:L}),f&&tR({strategy:"referenceHidden",...W})]}),[k,re]=pR(E),Se=Te(p);Le(()=>{G&&Se?.()},[G,Se]);let F=M.arrow?.x,j=M.arrow?.y,Z=M.arrow?.centerOffset!==0,[X,ue]=so.useState();return Le(()=>{v&&ue(window.getComputedStyle(v).zIndex)},[v]),(0,Aa.jsx)("div",{ref:N.setFloating,"data-radix-popper-content-wrapper":"",style:{...q,transform:G?q.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:X,"--radix-popper-transform-origin":[M.transformOrigin?.x,M.transformOrigin?.y].join(" "),...M.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:(0,Aa.jsx)(GF,{scope:o,placedSide:k,onArrowChange:C,arrowX:F,arrowY:j,shouldHideArrow:Z,children:(0,Aa.jsx)(H.div,{"data-side":k,"data-align":re,...g,ref:y,style:{...g.style,animation:G?void 0:"none"}})})})});dR.displayName=ig;var fR="PopperArrow",qF={top:"bottom",right:"left",bottom:"top",left:"right"},mR=so.forwardRef(function(t,o){let{__scopePopper:r,...a}=t,n=zF(fR,r),s=qF[n.placedSide];return(0,Aa.jsx)("span",{ref:n.onArrowChange,style:{position:"absolute",left:n.arrowX,top:n.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[n.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[n.placedSide],visibility:n.shouldHideArrow?"hidden":void 0},children:(0,Aa.jsx)(nR,{...a,ref:o,style:{...a.style,display:"block"}})})});mR.displayName=fR;function WF(e){return e!==null}var $F=e=>({name:"transformOrigin",options:e,fn(t){let{placement:o,rects:r,middlewareData:a}=t,s=a.arrow?.centerOffset!==0,i=s?0:e.arrowWidth,l=s?0:e.arrowHeight,[u,c]=pR(o),d={start:"0%",center:"50%",end:"100%"}[c],f=(a.arrow?.x??0)+i/2,m=(a.arrow?.y??0)+l/2,p="",g="";return u==="bottom"?(p=s?d:`${f}px`,g=`${-l}px`):u==="top"?(p=s?d:`${f}px`,g=`${r.floating.height+l}px`):u==="right"?(p=`${-l}px`,g=s?d:`${m}px`):u==="left"&&(p=`${r.floating.width+l}px`,g=s?d:`${m}px`),{data:{x:p,y:g}}}});function pR(e){let[t,o="center"]=e.split("-");return[t,o]}var qr=lR,Wr=cR,Da=dR,Ea=mR;var Ud=b(A(),1),gR=b(Jn(),1);var hR=b(D(),1),jF="Portal",ho=Ud.forwardRef((e,t)=>{let{container:o,...r}=e,[a,n]=Ud.useState(!1);Le(()=>n(!0),[]);let s=o||a&&globalThis?.document?.body;return s?gR.default.createPortal((0,hR.jsx)(H.div,{...r,ref:t}),s):null});ho.displayName=jF;var KF=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},ei=new WeakMap,Gd=new WeakMap,zd={},lg=0,xR=function(e){return e&&(e.host||xR(e.parentNode))},XF=function(e,t){return t.map(function(o){if(e.contains(o))return o;var r=xR(o);return r&&e.contains(r)?r:(console.error("aria-hidden",o,"in not contained inside",e,". Doing nothing"),null)}).filter(function(o){return!!o})},YF=function(e,t,o,r){var a=XF(t,Array.isArray(e)?e:[e]);zd[o]||(zd[o]=new WeakMap);var n=zd[o],s=[],i=new Set,l=new Set(a),u=function(d){!d||i.has(d)||(i.add(d),u(d.parentNode))};a.forEach(u);var c=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(f){if(i.has(f))c(f);else try{var m=f.getAttribute(r),p=m!==null&&m!=="false",g=(ei.get(f)||0)+1,h=(n.get(f)||0)+1;ei.set(f,g),n.set(f,h),s.push(f),g===1&&p&&Gd.set(f,!0),h===1&&f.setAttribute(o,"true"),p||f.setAttribute(r,"true")}catch(v){console.error("aria-hidden: cannot operate on ",f,v)}})};return c(t),i.clear(),lg++,function(){s.forEach(function(d){var f=ei.get(d)-1,m=n.get(d)-1;ei.set(d,f),n.set(d,m),f||(Gd.has(d)||d.removeAttribute(r),Gd.delete(d)),m||d.removeAttribute(o)}),lg--,lg||(ei=new WeakMap,ei=new WeakMap,Gd=new WeakMap,zd={})}},Na=function(e,t,o){o===void 0&&(o="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),a=t||KF(e);return a?(r.push.apply(r,Array.from(a.querySelectorAll("[aria-live], script"))),YF(r,a,o,"aria-hidden")):function(){return null}};var io=function(){return io=Object.assign||function(t){for(var o,r=1,a=arguments.length;r<a;r++){o=arguments[r];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(t[n]=o[n])}return t},io.apply(this,arguments)};function qd(e,t){var o={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(o[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(o[r[a]]=e[r[a]]);return o}function vR(e,t,o){if(o||arguments.length===2)for(var r=0,a=t.length,n;r<a;r++)(n||!(r in t))&&(n||(n=Array.prototype.slice.call(t,0,r)),n[r]=t[r]);return e.concat(n||Array.prototype.slice.call(t))}var Xd=b(A());var Dt=b(A());var _n="right-scroll-bar-position",Vn="width-before-scroll-bar",ug="with-scroll-bars-hidden",cg="--removed-body-scroll-bar-size";function Wd(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}var yR=b(A());function bR(e,t){var o=(0,yR.useState)(function(){return{value:e,callback:t,facade:{get current(){return o.value},set current(r){var a=o.value;a!==r&&(o.value=r,o.callback(r,a))}}}})[0];return o.callback=t,o.facade}var $d=b(A());var ZF=typeof window<"u"?$d.useLayoutEffect:$d.useEffect,CR=new WeakMap;function dg(e,t){var o=bR(t||null,function(r){return e.forEach(function(a){return Wd(a,r)})});return ZF(function(){var r=CR.get(o);if(r){var a=new Set(r),n=new Set(e),s=o.current;a.forEach(function(i){n.has(i)||Wd(i,null)}),n.forEach(function(i){a.has(i)||Wd(i,s)})}CR.set(o,e)},[e]),o}function QF(e){return e}function JF(e,t){t===void 0&&(t=QF);var o=[],r=!1,a={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return o.length?o[o.length-1]:e},useMedium:function(n){var s=t(n,r);return o.push(s),function(){o=o.filter(function(i){return i!==s})}},assignSyncMedium:function(n){for(r=!0;o.length;){var s=o;o=[],s.forEach(n)}o={push:function(i){return n(i)},filter:function(){return o}}},assignMedium:function(n){r=!0;var s=[];if(o.length){var i=o;o=[],i.forEach(n),s=o}var l=function(){var c=s;s=[],c.forEach(n)},u=function(){return Promise.resolve().then(l)};u(),o={push:function(c){s.push(c),u()},filter:function(c){return s=s.filter(c),o}}}};return a}function fg(e){e===void 0&&(e={});var t=JF(null);return t.options=io({async:!0,ssr:!1},e),t}var wR=b(A()),SR=function(e){var t=e.sideCar,o=qd(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return wR.createElement(r,io({},o))};SR.isSideCarExport=!0;function mg(e,t){return e.useMedium(t),SR}var jd=fg();var pg=function(){},tu=Dt.forwardRef(function(e,t){var o=Dt.useRef(null),r=Dt.useState({onScrollCapture:pg,onWheelCapture:pg,onTouchMoveCapture:pg}),a=r[0],n=r[1],s=e.forwardProps,i=e.children,l=e.className,u=e.removeScrollBar,c=e.enabled,d=e.shards,f=e.sideCar,m=e.noRelative,p=e.noIsolation,g=e.inert,h=e.allowPinchZoom,v=e.as,x=v===void 0?"div":v,y=e.gapMode,R=qd(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=f,w=dg([o,t]),I=io(io({},R),a);return Dt.createElement(Dt.Fragment,null,c&&Dt.createElement(C,{sideCar:jd,removeScrollBar:u,shards:d,noRelative:m,noIsolation:p,inert:g,setCallbacks:n,allowPinchZoom:!!h,lockRef:o,gapMode:y}),s?Dt.cloneElement(Dt.Children.only(i),io(io({},I),{ref:w})):Dt.createElement(x,io({},I,{className:l,ref:w}),i))});tu.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};tu.classNames={fullWidth:Vn,zeroRight:_n};var je=b(A());var oi=b(A());var LR=b(A());var RR;var IR=function(){if(RR)return RR;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function eO(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=IR();return t&&e.setAttribute("nonce",t),e}function tO(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function oO(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var gg=function(){var e=0,t=null;return{add:function(o){e==0&&(t=eO())&&(tO(t,o),oO(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}};var hg=function(){var e=gg();return function(t,o){LR.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&o])}};var ou=function(){var e=hg(),t=function(o){var r=o.styles,a=o.dynamic;return e(r,a),null};return t};var rO={left:0,top:0,right:0,gap:0},xg=function(e){return parseInt(e||"",10)||0},aO=function(e){var t=window.getComputedStyle(document.body),o=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],a=t[e==="padding"?"paddingRight":"marginRight"];return[xg(o),xg(r),xg(a)]},vg=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return rO;var t=aO(e),o=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-o+t[2]-t[0])}};var nO=ou(),ti="data-scroll-locked",sO=function(e,t,o,r){var a=e.left,n=e.top,s=e.right,i=e.gap;return o===void 0&&(o="margin"),`
|
|
11
|
-
.`.concat(
|
|
12
|
-
overflow: hidden `).concat(
|
|
13
|
-
padding-right: `).concat(
|
|
17
|
+
`),()=>{m.contains(h)&&m.removeChild(h)}},[t]),(0,TM.jsx)(iC,{isPresent:t,childRef:a,sizeRef:i,children:Xg.cloneElement(e,{ref:a})})}var EM=({children:e,initial:t,isPresent:r,onExitComplete:o,custom:n,presenceAffectsLayout:a,mode:i,anchorX:s,root:l})=>{let u=Do(wj),c=(0,Hf.useId)(),d=!0,f=(0,Hf.useMemo)(()=>(d=!1,{id:c,initial:t,isPresent:r,custom:n,onExitComplete:p=>{u.set(p,!0);for(let h of u.values())if(!h)return;o&&o()},register:p=>(u.set(p,!1),()=>u.delete(p))}),[r,u,o]);return a&&d&&(f={...f}),(0,Hf.useMemo)(()=>{u.forEach((p,h)=>u.set(h,!1))},[r]),MM.useEffect(()=>{!r&&!u.size&&o&&o()},[r]),i==="popLayout"&&(e=(0,sC.jsx)(kM,{isPresent:r,anchorX:s,root:l,children:e})),(0,sC.jsx)(Ci.Provider,{value:f,children:e})};function wj(){return new Map}var ki=R(E(),1);function Yg(e=!0){let t=(0,ki.useContext)(Ci);if(t===null)return[!0,null];let{isPresent:r,onExitComplete:o,register:n}=t,a=(0,ki.useId)();(0,ki.useEffect)(()=>{if(e)return n(a)},[e]);let i=(0,ki.useCallback)(()=>e&&o&&o(a),[a,o,e]);return!r&&o?[!1,i]:[!0]}var Qg=R(E(),1),Uf=e=>e.key||"";function lC(e){let t=[];return Qg.Children.forEach(e,r=>{(0,Qg.isValidElement)(r)&&t.push(r)}),t}var ba=({children:e,custom:t,initial:r=!0,onExitComplete:o,presenceAffectsLayout:n=!0,mode:a="sync",propagate:i=!1,anchorX:s="left",root:l})=>{let[u,c]=Yg(i),d=(0,Gn.useMemo)(()=>lC(e),[e]),f=i&&!u?[]:d.map(Uf),p=(0,Gn.useRef)(!0),h=(0,Gn.useRef)(d),m=Do(()=>new Map),[x,v]=(0,Gn.useState)(d),[g,y]=(0,Gn.useState)(d);wi(()=>{p.current=!1,h.current=d;for(let b=0;b<g.length;b++){let S=Uf(g[b]);f.includes(S)?m.delete(S):m.get(S)!==!0&&m.set(S,!1)}},[g,f.length,f.join("-")]);let w=[];if(d!==x){let b=[...d];for(let S=0;S<g.length;S++){let L=g[S],T=Uf(L);f.includes(T)||(b.splice(S,0,L),w.push(L))}return a==="wait"&&w.length&&(b=w),y(lC(b)),v(d),null}let{forceRender:C}=(0,Gn.useContext)(xu);return(0,zf.jsx)(zf.Fragment,{children:g.map(b=>{let S=Uf(b),L=i&&!u?!1:d===g||f.includes(S),T=()=>{if(m.has(S))m.set(S,!0);else return;let P=!0;m.forEach(A=>{A||(P=!1)}),P&&(C?.(),y(h.current),i&&c?.(),o&&o())};return(0,zf.jsx)(EM,{isPresent:L,initial:!p.current||r?void 0:!1,custom:t,presenceAffectsLayout:n,mode:a,root:l,onExitComplete:L?void 0:T,anchorX:s,children:b},S)})})};var AM=R(E(),1),Zg=(0,AM.createContext)({strict:!1});var DM={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Ra={};for(let e in DM)Ra[e]={isEnabled:t=>DM[e].some(r=>!!t[r])};function NM(e){for(let t in e)Ra[t]={...Ra[t],...e[t]}}var Cj=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Wf(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Cj.has(e)}var _M=e=>!Wf(e);function Sj(e){typeof e=="function"&&(_M=t=>t.startsWith("on")?!Wf(t):e(t))}try{Sj(wU("@emotion/is-prop-valid").default)}catch{}function OM(e,t,r){let o={};for(let n in e)n==="values"&&typeof e.values=="object"||(_M(n)||r===!0&&Wf(n)||!t&&!Wf(n)||e.draggable&&n.startsWith("onDrag"))&&(o[n]=e[n]);return o}var ch=R(M(),1);var Fu=R(E(),1);var FM=R(E(),1),Mi=(0,FM.createContext)({});var th=R(E(),1);function Ei(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function La(e){return typeof e=="string"||Array.isArray(e)}var Jg=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Gf=["initial",...Jg];function qs(e){return Ei(e.animate)||Gf.some(t=>La(e[t]))}function eh(e){return!!(qs(e)||e.variants)}function VM(e,t){if(qs(e)){let{initial:r,animate:o}=e;return{initial:r===!1||La(r)?r:void 0,animate:La(o)?o:void 0}}return e.inherit!==!1?t:{}}function HM(e){let{initial:t,animate:r}=VM(e,(0,th.useContext)(Mi));return(0,th.useMemo)(()=>({initial:t,animate:r}),[BM(t),BM(r)])}function BM(e){return Array.isArray(e)?e.join(" "):e}var Au=R(E(),1);var WM=R(E(),1);var $s={};function UM(e){for(let t in e)$s[t]=e[t],As(t)&&($s[t].isCSSVariable=!0)}function rh(e,{layout:t,layoutId:r}){return po.has(e)||e.startsWith("origin")||(t||r!==void 0)&&(!!$s[e]||e==="opacity")}var bj={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Rj=pn.length;function zM(e,t,r){let o="",n=!0;for(let a=0;a<Rj;a++){let i=pn[a],s=e[i];if(s===void 0)continue;let l=!0;if(typeof s=="number"?l=s===(i.startsWith("scale")?1:0):l=parseFloat(s)===0,!l||r){let u=Ff(s,Hs[i]);if(!l){n=!1;let c=bj[i]||i;o+=`${c}(${u}) `}r&&(t[i]=u)}}return o=o.trim(),r?o=r(t,n?"":o):n&&(o="none"),o}function ku(e,t,r){let{style:o,vars:n,transformOrigin:a}=e,i=!1,s=!1;for(let l in t){let u=t[l];if(po.has(l)){i=!0;continue}else if(As(l)){n[l]=u;continue}else{let c=Ff(u,Hs[l]);l.startsWith("origin")?(s=!0,a[l]=c):o[l]=c}}if(t.transform||(i||r?o.transform=zM(t,e.transform,r):o.transform&&(o.transform="none")),s){let{originX:l="50%",originY:u="50%",originZ:c=0}=a;o.transformOrigin=`${l} ${u} ${c}`}}var Mu=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function uC(e,t,r){for(let o in t)!Me(t[o])&&!rh(o,r)&&(e[o]=t[o])}function Lj({transformTemplate:e},t){return(0,WM.useMemo)(()=>{let r=Mu();return ku(r,t,e),Object.assign({},r.vars,r.style)},[t])}function Ij(e,t){let r=e.style||{},o={};return uC(o,r,e),Object.assign(o,Lj(e,t)),o}function GM(e,t){let r={},o=Ij(e,t);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=o,r}var qM=R(E(),1);var Pj={offset:"stroke-dashoffset",array:"stroke-dasharray"},Tj={offset:"strokeDashoffset",array:"strokeDasharray"};function jM(e,t,r=1,o=0,n=!0){e.pathLength=1;let a=n?Pj:Tj;e[a.offset]=re.transform(-o);let i=re.transform(t),s=re.transform(r);e[a.array]=`${i} ${s}`}function oh(e,{attrX:t,attrY:r,attrScale:o,pathLength:n,pathSpacing:a=1,pathOffset:i=0,...s},l,u,c){if(ku(e,s,u),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:d,style:f}=e;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),f.transform&&(f.transformBox=c?.transformBox??"fill-box",delete d.transformBox),t!==void 0&&(d.x=t),r!==void 0&&(d.y=r),o!==void 0&&(d.scale=o),n!==void 0&&jM(d,n,a,i,!1)}var nh=()=>({...Mu(),attrs:{}});var ah=e=>typeof e=="string"&&e.toLowerCase()==="svg";function $M(e,t,r,o){let n=(0,qM.useMemo)(()=>{let a=nh();return oh(a,t,ah(o),e.transformTemplate,e.style),{...a.attrs,style:{...a.style}}},[t]);if(e.style){let a={};uC(a,e.style,e),n.style={...a,...n.style}}return n}var KM=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Eu(e){return typeof e!="string"||e.includes("-")?!1:!!(KM.indexOf(e)>-1||/[A-Z]/u.test(e))}function XM(e,t,r,{latestValues:o},n,a=!1){let s=(Eu(e)?$M:GM)(t,o,n,e),l=OM(t,typeof e=="string",a),u=e!==Au.Fragment?{...l,...s,ref:r}:{},{children:c}=t,d=(0,Au.useMemo)(()=>Me(c)?c.get():c,[c]);return(0,Au.createElement)(e,{...u,children:d})}var cC=R(E(),1);function YM(e){let t=[{},{}];return e?.values.forEach((r,o)=>{t[0][o]=r.get(),t[1][o]=r.getVelocity()}),t}function Du(e,t,r,o){if(typeof t=="function"){let[n,a]=YM(o);t=t(r!==void 0?r:e.custom,n,a)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){let[n,a]=YM(o);t=t(r!==void 0?r:e.custom,n,a)}return t}function Nu(e){return Me(e)?e.get():e}function kj({scrapeMotionValuesFromProps:e,createRenderState:t},r,o,n){return{latestValues:Mj(r,o,n,e),renderState:t()}}function Mj(e,t,r,o){let n={},a=o(e,{});for(let f in a)n[f]=Nu(a[f]);let{initial:i,animate:s}=e,l=qs(e),u=eh(e);t&&u&&!l&&e.inherit!==!1&&(i===void 0&&(i=t.initial),s===void 0&&(s=t.animate));let c=r?r.initial===!1:!1;c=c||i===!1;let d=c?s:i;if(d&&typeof d!="boolean"&&!Ei(d)){let f=Array.isArray(d)?d:[d];for(let p=0;p<f.length;p++){let h=Du(e,f[p]);if(h){let{transitionEnd:m,transition:x,...v}=h;for(let g in v){let y=v[g];if(Array.isArray(y)){let w=c?y.length-1:0;y=y[w]}y!==null&&(n[g]=y)}for(let g in m)n[g]=m[g]}}}return n}var ih=e=>(t,r)=>{let o=(0,cC.useContext)(Mi),n=(0,cC.useContext)(Ci),a=()=>kj(e,t,o,n);return r?a():Do(a)};function _u(e,t,r){let{style:o}=e,n={};for(let a in o)(Me(o[a])||t.style&&Me(t.style[a])||rh(a,e)||r?.getValue(a)?.liveStyle!==void 0)&&(n[a]=o[a]);return n}var QM=ih({scrapeMotionValuesFromProps:_u,createRenderState:Mu});function sh(e,t,r){let o=_u(e,t,r);for(let n in e)if(Me(e[n])||Me(t[n])){let a=pn.indexOf(n)!==-1?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n;o[a]=e[n]}return o}var ZM=ih({scrapeMotionValuesFromProps:sh,createRenderState:nh});var JM=Symbol.for("motionComponentSymbol");var eE=R(E(),1);function Ia(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function tE(e,t,r){return(0,eE.useCallback)(o=>{o&&e.onMount&&e.onMount(o),t&&(o?t.mount(o):t.unmount()),r&&(typeof r=="function"?r(o):Ia(r)&&(r.current=o))},[t])}var Xr=R(E(),1);var Ou=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase();var Ej="framerAppearId",lh="data-"+Ou(Ej);var rE=R(E(),1),uh=(0,rE.createContext)({});function oE(e,t,r,o,n){let{visualElement:a}=(0,Xr.useContext)(Mi),i=(0,Xr.useContext)(Zg),s=(0,Xr.useContext)(Ci),l=(0,Xr.useContext)(Ti).reducedMotion,u=(0,Xr.useRef)(null);o=o||i.renderer,!u.current&&o&&(u.current=o(e,{visualState:t,parent:a,props:r,presenceContext:s,blockInitialAnimation:s?s.initial===!1:!1,reducedMotionConfig:l}));let c=u.current,d=(0,Xr.useContext)(uh);c&&!c.projection&&n&&(c.type==="html"||c.type==="svg")&&Aj(u.current,r,n,d);let f=(0,Xr.useRef)(!1);(0,Xr.useInsertionEffect)(()=>{c&&f.current&&c.update(r,s)});let p=r[lh],h=(0,Xr.useRef)(!!p&&!window.MotionHandoffIsComplete?.(p)&&window.MotionHasOptimisedAnimation?.(p));return wi(()=>{c&&(f.current=!0,window.MotionIsMounted=!0,c.updateFeatures(),c.scheduleRenderMicrotask(),h.current&&c.animationState&&c.animationState.animateChanges())}),(0,Xr.useEffect)(()=>{c&&(!h.current&&c.animationState&&c.animationState.animateChanges(),h.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(p)}),h.current=!1),c.enteringChildren=void 0)}),c}function Aj(e,t,r,o){let{layoutId:n,layout:a,drag:i,dragConstraints:s,layoutScroll:l,layoutRoot:u,layoutCrossfade:c}=t;e.projection=new r(e.latestValues,t["data-framer-portal-id"]?void 0:nE(e.parent)),e.projection.setOptions({layoutId:n,layout:a,alwaysMeasureLayout:!!i||s&&Ia(s),visualElement:e,animationType:typeof a=="string"?a:"both",initialPromotionConfig:o,crossfade:c,layoutScroll:l,layoutRoot:u})}function nE(e){if(e)return e.options.allowProjection!==!1?e.projection:nE(e.parent)}function dh(e,{forwardMotionProps:t=!1}={},r,o){r&&NM(r);let n=Eu(e)?ZM:QM;function a(s,l){let u,c={...(0,Fu.useContext)(Ti),...s,layoutId:Dj(s)},{isStatic:d}=c,f=HM(s),p=n(s,d);if(!d&&wu){Nj(c,r);let h=_j(c);u=h.MeasureLayout,f.visualElement=oE(e,p,c,o,h.ProjectionNode)}return(0,ch.jsxs)(Mi.Provider,{value:f,children:[u&&f.visualElement?(0,ch.jsx)(u,{visualElement:f.visualElement,...c}):null,XM(e,s,tE(p,f.visualElement,l),p,d,t)]})}a.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;let i=(0,Fu.forwardRef)(a);return i[JM]=e,i}function Dj({layoutId:e}){let t=(0,Fu.useContext)(xu).id;return t&&e!==void 0?t+"-"+e:e}function Nj(e,t){let r=(0,Fu.useContext)(Zg).strict}function _j(e){let{drag:t,layout:r}=Ra;if(!t&&!r)return{};let o={...t,...r};return{MeasureLayout:t?.isEnabled(e)||r?.isEnabled(e)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}function aE(e,t){if(typeof Proxy>"u")return dh;let r=new Map,o=(a,i)=>dh(a,i,e,t),n=(a,i)=>o(a,i);return new Proxy(n,{get:(a,i)=>i==="create"?o:(r.has(i)||r.set(i,dh(i,void 0,e,t)),r.get(i))})}var CE=R(E(),1);function fh({top:e,left:t,right:r,bottom:o}){return{x:{min:t,max:r},y:{min:e,max:o}}}function iE({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function sE(e,t){if(!t)return e;let r=t({x:e.left,y:e.top}),o=t({x:e.right,y:e.bottom});return{top:r.y,left:r.x,bottom:o.y,right:o.x}}function dC(e){return e===void 0||e===1}function ph({scale:e,scaleX:t,scaleY:r}){return!dC(e)||!dC(t)||!dC(r)}function Pa(e){return ph(e)||fC(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function fC(e){return lE(e.x)||lE(e.y)}function lE(e){return e&&e!=="0%"}function jf(e,t,r){let o=e-r,n=t*o;return r+n}function uE(e,t,r,o,n){return n!==void 0&&(e=jf(e,n,o)),jf(e,r,o)+t}function pC(e,t=0,r=1,o,n){e.min=uE(e.min,t,r,o,n),e.max=uE(e.max,t,r,o,n)}function mC(e,{x:t,y:r}){pC(e.x,t.translate,t.scale,t.originPoint),pC(e.y,r.translate,r.scale,r.originPoint)}var cE=.999999999999,dE=1.0000000000001;function pE(e,t,r,o=!1){let n=r.length;if(!n)return;t.x=t.y=1;let a,i;for(let s=0;s<n;s++){a=r[s],i=a.projectionDelta;let{visualElement:l}=a.options;l&&l.props.style&&l.props.style.display==="contents"||(o&&a.options.layoutScroll&&a.scroll&&a!==a.root&&Ks(e,{x:-a.scroll.offset.x,y:-a.scroll.offset.y}),i&&(t.x*=i.x.scale,t.y*=i.y.scale,mC(e,i)),o&&Pa(a.latestValues)&&Ks(e,a.latestValues))}t.x<dE&&t.x>cE&&(t.x=1),t.y<dE&&t.y>cE&&(t.y=1)}function Ai(e,t){e.min=e.min+t,e.max=e.max+t}function fE(e,t,r,o,n=.5){let a=Se(e.min,e.max,n);pC(e,t,r,a,o)}function Ks(e,t){fE(e.x,t.x,t.scaleX,t.scale,t.originX),fE(e.y,t.y,t.scaleY,t.scale,t.originY)}function gC(e,t){return fh(sE(e.getBoundingClientRect(),t))}function mE(e,t,r){let o=gC(e,r),{scroll:n}=t;return n&&(Ai(o.x,n.offset.x),Ai(o.y,n.offset.y)),o}var gE=()=>({translate:0,scale:1,origin:0,originPoint:0}),Xs=()=>({x:gE(),y:gE()}),hE=()=>({min:0,max:0}),We=()=>({x:hE(),y:hE()});var qf={current:null},mh={current:!1};function vE(){if(mh.current=!0,!!wu)if(window.matchMedia){let e=window.matchMedia("(prefers-reduced-motion)"),t=()=>qf.current=e.matches;e.addEventListener("change",t),t()}else qf.current=!1}var Di=new WeakMap;function yE(e,t,r){for(let o in t){let n=t[o],a=r[o];if(Me(n))e.addValue(o,n);else if(Me(a))e.addValue(o,Kr(n,{owner:e}));else if(a!==n)if(e.hasValue(o)){let i=e.getValue(o);i.liveStyle===!0?i.jump(n):i.hasAnimated||i.set(n)}else{let i=e.getStaticValue(o);e.addValue(o,Kr(i!==void 0?i:n,{owner:e}))}}for(let o in r)t[o]===void 0&&e.removeValue(o);return t}var xE=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],Vu=class{scrapeMotionValuesFromProps(t,r,o){return{}}constructor({parent:t,props:r,presenceContext:o,reducedMotionConfig:n,blockInitialAnimation:a,visualState:i},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Ca,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let f=xt.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,xe.render(this.render,!1,!0))};let{latestValues:l,renderState:u}=i;this.latestValues=l,this.baseTarget={...l},this.initialValues=r.initial?{...l}:{},this.renderState=u,this.parent=t,this.props=r,this.presenceContext=o,this.depth=t?t.depth+1:0,this.reducedMotionConfig=n,this.options=s,this.blockInitialAnimation=!!a,this.isControllingVariants=qs(r),this.isVariantNode=eh(r),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);let{willChange:c,...d}=this.scrapeMotionValuesFromProps(r,{},this);for(let f in d){let p=d[f];l[f]!==void 0&&Me(p)&&p.set(l[f])}}mount(t){this.current=t,Di.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((r,o)=>this.bindToMotionValue(o,r)),mh.current||vE(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:qf.current,this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),dr(this.notifyUpdate),dr(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(let t in this.events)this.events[t].clear();for(let t in this.features){let r=this.features[t];r&&(r.unmount(),r.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,r){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();let o=po.has(t);o&&this.onBindTransform&&this.onBindTransform();let n=r.on("change",i=>{this.latestValues[t]=i,this.props.onUpdate&&xe.preRender(this.notifyUpdate),o&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()}),a;window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,t,r)),this.valueSubscriptions.set(t,()=>{n(),a&&a(),r.owner&&r.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Ra){let r=Ra[t];if(!r)continue;let{isEnabled:o,Feature:n}=r;if(!this.features[t]&&n&&o(this.props)&&(this.features[t]=new n(this)),this.features[t]){let a=this.features[t];a.isMounted?a.update():(a.mount(),a.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):We()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,r){this.latestValues[t]=r}update(t,r){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=r;for(let o=0;o<xE.length;o++){let n=xE[o];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);let a="on"+n,i=t[a];i&&(this.propEventSubscriptions[n]=this.on(n,i))}this.prevMotionValues=yE(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){let r=this.getClosestVariantNode();if(r)return r.variantChildren&&r.variantChildren.add(t),()=>r.variantChildren.delete(t)}addValue(t,r){let o=this.values.get(t);r!==o&&(o&&this.removeValue(t),this.bindToMotionValue(t,r),this.values.set(t,r),this.latestValues[t]=r.get())}removeValue(t){this.values.delete(t);let r=this.valueSubscriptions.get(t);r&&(r(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,r){if(this.props.values&&this.props.values[t])return this.props.values[t];let o=this.values.get(t);return o===void 0&&r!==void 0&&(o=Kr(r===null?void 0:r,{owner:this}),this.addValue(t,o)),o}readValue(t,r){let o=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return o!=null&&(typeof o=="string"&&(af(o)||lf(o))?o=parseFloat(o):!aC(o)&&pr.test(r)&&(o=_f(t,r)),this.setBaseTarget(t,Me(o)?o.get():o)),Me(o)?o.get():o}setBaseTarget(t,r){this.baseTarget[t]=r}getBaseTarget(t){let{initial:r}=this.props,o;if(typeof r=="string"||typeof r=="object"){let a=Du(this.props,r,this.presenceContext?.custom);a&&(o=a[t])}if(r&&o!==void 0)return o;let n=this.getBaseTargetFromProps(this.props,t);return n!==void 0&&!Me(n)?n:this.initialValues[t]!==void 0&&o===void 0?void 0:this.baseTarget[t]}on(t,r){return this.events[t]||(this.events[t]=new va),this.events[t].add(r)}notify(t,...r){this.events[t]&&this.events[t].notify(...r)}scheduleRenderMicrotask(){Ws.render(this.render)}};var Bu=class extends Vu{constructor(){super(...arguments),this.KeyframeResolver=Of}sortInstanceNodePosition(t,r){return t.compareDocumentPosition(r)&2?1:-1}getBaseTargetFromProps(t,r){return t.style?t.style[r]:void 0}removeValueFromRenderState(t,{vars:r,style:o}){delete r[t],delete o[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:t}=this.props;Me(t)&&(this.childSubscription=t.on("change",r=>{this.current&&(this.current.textContent=`${r}`)}))}};function gh(e,{style:t,vars:r},o,n){let a=e.style,i;for(i in t)a[i]=t[i];n?.applyProjectionStyles(a,o);for(i in r)a.setProperty(i,r[i])}function Oj(e){return window.getComputedStyle(e)}var Hu=class extends Bu{constructor(){super(...arguments),this.type="html",this.renderInstance=gh}readValueFromInstance(t,r){if(po.has(r))return this.projection?.isProjecting?Tf(r):Hw(t,r);{let o=Oj(t),n=(As(r)?o.getPropertyValue(r):o[r])||0;return typeof n=="string"?n.trim():n}}measureInstanceViewportBox(t,{transformPagePoint:r}){return gC(t,r)}build(t,r,o){ku(t,r,o.transformTemplate)}scrapeMotionValuesFromProps(t,r,o){return _u(t,r,o)}};var hh=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function wE(e,t,r,o){gh(e,t,void 0,o);for(let n in t.attrs)e.setAttribute(hh.has(n)?n:Ou(n),t.attrs[n])}var Uu=class extends Bu{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=We}getBaseTargetFromProps(t,r){return t[r]}readValueFromInstance(t,r){if(po.has(r)){let o=Nf(r);return o&&o.default||0}return r=hh.has(r)?r:Ou(r),t.getAttribute(r)}scrapeMotionValuesFromProps(t,r,o){return sh(t,r,o)}build(t,r,o){oh(t,r,this.isSVGTag,o.transformTemplate,o.style)}renderInstance(t,r,o,n){wE(t,r,o,n)}mount(t){this.isSVGTag=ah(t.tagName),super.mount(t)}};var SE=(e,t)=>Eu(e)?new Uu(t):new Hu(t,{allowProjection:e!==CE.Fragment});function jn(e,t,r){let o=e.getProps();return Du(o,t,r!==void 0?r:o.custom,e)}var $f=e=>Array.isArray(e);function Fj(e,t,r){e.hasValue(t)?e.getValue(t).set(r):e.addValue(t,Kr(r))}function Vj(e){return $f(e)?e[e.length-1]||0:e}function Kf(e,t){let r=jn(e,t),{transitionEnd:o={},transition:n={},...a}=r||{};a={...a,...o};for(let i in a){let s=Vj(a[i]);Fj(e,i,s)}}function bE(e){return!!(Me(e)&&e.add)}function Xf(e,t){let r=e.getValue("willChange");if(bE(r))return r.add(t);if(!r&&cr.WillChange){let o=new cr.WillChange("auto");e.addValue("willChange",o),o.add(t)}}function vh(e){return e.props[lh]}var Bj=e=>e!==null;function RE(e,{repeat:t,repeatType:r="loop"},o){let n=e.filter(Bj),a=t&&r!=="loop"&&t%2===1?0:n.length-1;return!a||o===void 0?n[a]:o}var Hj={type:"spring",stiffness:500,damping:25,restSpeed:10},Uj=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),zj={type:"keyframes",duration:.8},Wj={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},LE=(e,{keyframes:t})=>t.length>2?zj:po.has(e)?e.startsWith("scale")?Uj(t[1]):Hj:Wj;function IE({when:e,delay:t,delayChildren:r,staggerChildren:o,staggerDirection:n,repeat:a,repeatType:i,repeatDelay:s,from:l,elapsed:u,...c}){return!!Object.keys(c).length}var zu=(e,t,r,o={},n,a)=>i=>{let s=Bs(o,e)||{},l=s.delay||o.delay||0,{elapsed:u=0}=o;u=u-St(l);let c={keyframes:Array.isArray(r)?r:[null,r],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-u,onUpdate:f=>{t.set(f),s.onUpdate&&s.onUpdate(f)},onComplete:()=>{i(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:n};IE(s)||Object.assign(c,LE(e,c)),c.duration&&(c.duration=St(c.duration)),c.repeatDelay&&(c.repeatDelay=St(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let d=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(Pu(c),c.delay===0&&(d=!0)),(cr.instantAnimations||cr.skipAnimations)&&(d=!0,Pu(c),c.delay=0),c.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){let f=RE(c.keyframes,s);if(f!==void 0){xe.update(()=>{c.onUpdate(f),c.onComplete()});return}}return s.isSync?new wa(c):new Mf(c)};function Gj({protectedKeys:e,needsAnimating:t},r){let o=e.hasOwnProperty(r)&&t[r]!==!0;return t[r]=!1,o}function Wu(e,t,{delay:r=0,transitionOverride:o,type:n}={}){let{transition:a=e.getDefaultTransition(),transitionEnd:i,...s}=t;o&&(a=o);let l=[],u=n&&e.animationState&&e.animationState.getState()[n];for(let c in s){let d=e.getValue(c,e.latestValues[c]??null),f=s[c];if(f===void 0||u&&Gj(u,c))continue;let p={delay:r,...Bs(a||{},c)},h=d.get();if(h!==void 0&&!d.isAnimating&&!Array.isArray(f)&&f===h&&!p.velocity)continue;let m=!1;if(window.MotionHandoffAnimation){let v=vh(e);if(v){let g=window.MotionHandoffAnimation(v,c,xe);g!==null&&(p.startTime=g,m=!0)}}Xf(e,c),d.start(zu(c,d,f,e.shouldReduceMotion&&Af.has(c)?{type:!1}:p,e,m));let x=d.animation;x&&l.push(x)}return i&&Promise.all(l).then(()=>{xe.update(()=>{i&&Kf(e,i)})}),l}function yh(e,t,r,o=0,n=1){let a=Array.from(e).sort((u,c)=>u.sortNodePosition(c)).indexOf(t),i=e.size,s=(i-1)*o;return typeof r=="function"?r(a,i):n===1?a*o:s-a*o}function xh(e,t,r={}){let o=jn(e,t,r.type==="exit"?e.presenceContext?.custom:void 0),{transition:n=e.getDefaultTransition()||{}}=o||{};r.transitionOverride&&(n=r.transitionOverride);let a=o?()=>Promise.all(Wu(e,o,r)):()=>Promise.resolve(),i=e.variantChildren&&e.variantChildren.size?(l=0)=>{let{delayChildren:u=0,staggerChildren:c,staggerDirection:d}=n;return jj(e,t,l,u,c,d,r)}:()=>Promise.resolve(),{when:s}=n;if(s){let[l,u]=s==="beforeChildren"?[a,i]:[i,a];return l().then(()=>u())}else return Promise.all([a(),i(r.delay)])}function jj(e,t,r=0,o=0,n=0,a=1,i){let s=[];for(let l of e.variantChildren)l.notify("AnimationStart",t),s.push(xh(l,t,{...i,delay:r+(typeof o=="function"?0:o)+yh(e.variantChildren,l,o,n,a)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(s)}function wh(e,t,r={}){e.notify("AnimationStart",t);let o;if(Array.isArray(t)){let n=t.map(a=>xh(e,a,r));o=Promise.all(n)}else if(typeof t=="string")o=xh(e,t,r);else{let n=typeof t=="function"?jn(e,t,r.custom):t;o=Promise.all(Wu(e,n,r))}return o.then(()=>{e.notify("AnimationComplete",t)})}function hC(e,t){if(!Array.isArray(t))return!1;let r=t.length;if(r!==e.length)return!1;for(let o=0;o<r;o++)if(t[o]!==e[o])return!1;return!0}var qj=Gf.length;function vC(e){if(!e)return;if(!e.isControllingVariants){let r=e.parent?vC(e.parent)||{}:{};return e.props.initial!==void 0&&(r.initial=e.props.initial),r}let t={};for(let r=0;r<qj;r++){let o=Gf[r],n=e.props[o];(La(n)||n===!1)&&(t[o]=n)}return t}var $j=[...Jg].reverse(),Kj=Jg.length;function Xj(e){return t=>Promise.all(t.map(({animation:r,options:o})=>wh(e,r,o)))}function TE(e){let t=Xj(e),r=PE(),o=!0,n=l=>(u,c)=>{let d=jn(e,c,l==="exit"?e.presenceContext?.custom:void 0);if(d){let{transition:f,transitionEnd:p,...h}=d;u={...u,...h,...p}}return u};function a(l){t=l(e)}function i(l){let{props:u}=e,c=vC(e.parent)||{},d=[],f=new Set,p={},h=1/0;for(let x=0;x<Kj;x++){let v=$j[x],g=r[v],y=u[v]!==void 0?u[v]:c[v],w=La(y),C=v===l?g.isActive:null;C===!1&&(h=x);let b=y===c[v]&&y!==u[v]&&w;if(b&&o&&e.manuallyAnimateOnMount&&(b=!1),g.protectedKeys={...p},!g.isActive&&C===null||!y&&!g.prevProp||Ei(y)||typeof y=="boolean")continue;let S=Yj(g.prevProp,y),L=S||v===l&&g.isActive&&!b&&w||x>h&&w,T=!1,P=Array.isArray(y)?y:[y],A=P.reduce(n(v),{});C===!1&&(A={});let{prevResolvedValues:_={}}=g,G={..._,...A},D=z=>{L=!0,f.has(z)&&(T=!0,f.delete(z)),g.needsAnimating[z]=!0;let V=e.getValue(z);V&&(V.liveStyle=!1)};for(let z in G){let V=A[z],k=_[z];if(p.hasOwnProperty(z))continue;let Z=!1;$f(V)&&$f(k)?Z=!hC(V,k):Z=V!==k,Z?V!=null?D(z):f.add(z):V!==void 0&&f.has(z)?D(z):g.protectedKeys[z]=!0}g.prevProp=y,g.prevResolvedValues=A,g.isActive&&(p={...p,...A}),o&&e.blockInitialAnimation&&(L=!1);let W=b&&S;L&&(!W||T)&&d.push(...P.map(z=>{let V={type:v};if(typeof z=="string"&&o&&!W&&e.manuallyAnimateOnMount&&e.parent){let{parent:k}=e,Z=jn(k,z);if(k.enteringChildren&&Z){let{delayChildren:ve}=Z.transition||{};V.delay=yh(k.enteringChildren,e,ve)}}return{animation:z,options:V}}))}if(f.size){let x={};if(typeof u.initial!="boolean"){let v=jn(e,Array.isArray(u.initial)?u.initial[0]:u.initial);v&&v.transition&&(x.transition=v.transition)}f.forEach(v=>{let g=e.getBaseTarget(v),y=e.getValue(v);y&&(y.liveStyle=!0),x[v]=g??null}),d.push({animation:x})}let m=!!d.length;return o&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(m=!1),o=!1,m?t(d):Promise.resolve()}function s(l,u){if(r[l].isActive===u)return Promise.resolve();e.variantChildren?.forEach(d=>d.animationState?.setActive(l,u)),r[l].isActive=u;let c=i(l);for(let d in r)r[d].protectedKeys={};return c}return{animateChanges:i,setActive:s,setAnimateFunction:a,getState:()=>r,reset:()=>{r=PE(),o=!0}}}function Yj(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!hC(t,e):!1}function Ys(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function PE(){return{animate:Ys(!0),whileInView:Ys(),whileHover:Ys(),whileTap:Ys(),whileDrag:Ys(),whileFocus:Ys(),exit:Ys()}}var Gt=class{constructor(t){this.isMounted=!1,this.node=t}update(){}};var Ch=class extends Gt{constructor(t){super(t),t.animationState||(t.animationState=TE(t))}updateAnimationControlsSubscription(){let{animate:t}=this.node.getProps();Ei(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:t}=this.node.getProps(),{animate:r}=this.node.prevProps||{};t!==r&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}};var Qj=0,Sh=class extends Gt{constructor(){super(...arguments),this.id=Qj++}update(){if(!this.node.presenceContext)return;let{isPresent:t,onExitComplete:r}=this.node.presenceContext,{isPresent:o}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===o)return;let n=this.node.animationState.setActive("exit",!t);r&&!t&&n.then(()=>{r(this.id)})}mount(){let{register:t,onExitComplete:r}=this.node.presenceContext||{};r&&r(this.id),t&&(this.unmount=t(this.id))}unmount(){}};var kE={animation:{Feature:Ch},exit:{Feature:Sh}};function Ta(e,t,r,o={passive:!0}){return e.addEventListener(t,r,o),()=>e.removeEventListener(t,r)}function ka(e){return{point:{x:e.pageX,y:e.pageY}}}var ME=e=>t=>Gs(t)&&e(t,ka(t));function Ni(e,t,r,o){return Ta(e,t,ME(r),o)}var NE=1e-4,Zj=1-NE,Jj=1+NE,_E=.01,eq=0-_E,tq=0+_E;function _t(e){return e.max-e.min}function OE(e,t,r){return Math.abs(e-t)<=r}function EE(e,t,r,o=.5){e.origin=o,e.originPoint=Se(t.min,t.max,e.origin),e.scale=_t(r)/_t(t),e.translate=Se(r.min,r.max,e.origin)-e.originPoint,(e.scale>=Zj&&e.scale<=Jj||isNaN(e.scale))&&(e.scale=1),(e.translate>=eq&&e.translate<=tq||isNaN(e.translate))&&(e.translate=0)}function Gu(e,t,r,o){EE(e.x,t.x,r.x,o?o.originX:void 0),EE(e.y,t.y,r.y,o?o.originY:void 0)}function AE(e,t,r){e.min=r.min+t.min,e.max=e.min+_t(t)}function FE(e,t,r){AE(e.x,t.x,r.x),AE(e.y,t.y,r.y)}function DE(e,t,r){e.min=t.min-r.min,e.max=e.min+_t(t)}function ju(e,t,r){DE(e.x,t.x,r.x),DE(e.y,t.y,r.y)}function Yr(e){return[e("x"),e("y")]}var bh=({current:e})=>e?e.ownerDocument.defaultView:null;var VE=(e,t)=>Math.abs(e-t);function BE(e,t){let r=VE(e.x,t.x),o=VE(e.y,t.y);return Math.sqrt(r**2+o**2)}var qu=class{constructor(t,r,{transformPagePoint:o,contextWindow:n=window,dragSnapToOrigin:a=!1,distanceThreshold:i=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let f=xC(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,h=BE(f.offset,{x:0,y:0})>=this.distanceThreshold;if(!p&&!h)return;let{point:m}=f,{timestamp:x}=yt;this.history.push({...m,timestamp:x});let{onStart:v,onMove:g}=this.handlers;p||(v&&v(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),g&&g(this.lastMoveEvent,f)},this.handlePointerMove=(f,p)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=yC(p,this.transformPagePoint),xe.update(this.updatePoint,!0)},this.handlePointerUp=(f,p)=>{this.end();let{onEnd:h,onSessionEnd:m,resumeAnimation:x}=this.handlers;if(this.dragSnapToOrigin&&x&&x(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let v=xC(f.type==="pointercancel"?this.lastMoveEventInfo:yC(p,this.transformPagePoint),this.history);this.startEvent&&h&&h(f,v),m&&m(f,v)},!Gs(t))return;this.dragSnapToOrigin=a,this.handlers=r,this.transformPagePoint=o,this.distanceThreshold=i,this.contextWindow=n||window;let s=ka(t),l=yC(s,this.transformPagePoint),{point:u}=l,{timestamp:c}=yt;this.history=[{...u,timestamp:c}];let{onSessionStart:d}=r;d&&d(t,xC(l,this.history)),this.removeListeners=cn(Ni(this.contextWindow,"pointermove",this.handlePointerMove),Ni(this.contextWindow,"pointerup",this.handlePointerUp),Ni(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),dr(this.updatePoint)}};function yC(e,t){return t?{point:t(e.point)}:e}function HE(e,t){return{x:e.x-t.x,y:e.y-t.y}}function xC({point:e},t){return{point:e,delta:HE(e,UE(t)),offset:HE(e,rq(t)),velocity:oq(t,.1)}}function rq(e){return e[0]}function UE(e){return e[e.length-1]}function oq(e,t){if(e.length<2)return{x:0,y:0};let r=e.length-1,o=null,n=UE(e);for(;r>=0&&(o=e[r],!(n.timestamp-o.timestamp>St(t)));)r--;if(!o)return{x:0,y:0};let a=er(n.timestamp-o.timestamp);if(a===0)return{x:0,y:0};let i={x:(n.x-o.x)/a,y:(n.y-o.y)/a};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}function qE(e,{min:t,max:r},o){return t!==void 0&&e<t?e=o?Se(t,e,o.min):Math.max(e,t):r!==void 0&&e>r&&(e=o?Se(r,e,o.max):Math.min(e,r)),e}function zE(e,t,r){return{min:t!==void 0?e.min+t:void 0,max:r!==void 0?e.max+r-(e.max-e.min):void 0}}function $E(e,{top:t,left:r,bottom:o,right:n}){return{x:zE(e.x,r,n),y:zE(e.y,t,o)}}function WE(e,t){let r=t.min-e.min,o=t.max-e.max;return t.max-t.min<e.max-e.min&&([r,o]=[o,r]),{min:r,max:o}}function KE(e,t){return{x:WE(e.x,t.x),y:WE(e.y,t.y)}}function XE(e,t){let r=.5,o=_t(e),n=_t(t);return n>o?r=No(t.min,t.max-o,e.min):o>n&&(r=No(e.min,e.max-n,t.min)),Wt(0,1,r)}function YE(e,t){let r={};return t.min!==void 0&&(r.min=t.min-e.min),t.max!==void 0&&(r.max=t.max-e.min),r}var Rh=.35;function QE(e=Rh){return e===!1?e=0:e===!0&&(e=Rh),{x:GE(e,"left","right"),y:GE(e,"top","bottom")}}function GE(e,t,r){return{min:jE(e,t),max:jE(e,r)}}function jE(e,t){return typeof e=="number"?e:e[t]||0}var nq=new WeakMap,Ih=class{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=We(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:r=!1,distanceThreshold:o}={}){let{presenceContext:n}=this.visualElement;if(n&&n.isPresent===!1)return;let a=d=>{let{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),r&&this.snapToCursor(ka(d).point)},i=(d,f)=>{let{drag:p,dragPropagation:h,onDragStart:m}=this.getProps();if(p&&!h&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Jw(p),!this.openDragLock))return;this.latestPointerEvent=d,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Yr(v=>{let g=this.getAxisMotionValue(v).get()||0;if(fr.test(g)){let{projection:y}=this.visualElement;if(y&&y.layout){let w=y.layout.layoutBox[v];w&&(g=_t(w)*(parseFloat(g)/100))}}this.originPoint[v]=g}),m&&xe.postRender(()=>m(d,f)),Xf(this.visualElement,"transform");let{animationState:x}=this.visualElement;x&&x.setActive("whileDrag",!0)},s=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f;let{dragPropagation:p,dragDirectionLock:h,onDirectionLock:m,onDrag:x}=this.getProps();if(!p&&!this.openDragLock)return;let{offset:v}=f;if(h&&this.currentDirection===null){this.currentDirection=aq(v),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",f.point,v),this.updateAxis("y",f.point,v),this.visualElement.render(),x&&x(d,f)},l=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f,this.stop(d,f),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>Yr(d=>this.getAnimationState(d)==="paused"&&this.getAxisMotionValue(d).animation?.play()),{dragSnapToOrigin:c}=this.getProps();this.panSession=new qu(t,{onSessionStart:a,onStart:i,onMove:s,onSessionEnd:l,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:o,contextWindow:bh(this.visualElement)})}stop(t,r){let o=t||this.latestPointerEvent,n=r||this.latestPanInfo,a=this.isDragging;if(this.cancel(),!a||!n||!o)return;let{velocity:i}=n;this.startAnimation(i);let{onDragEnd:s}=this.getProps();s&&xe.postRender(()=>s(o,n))}cancel(){this.isDragging=!1;let{projection:t,animationState:r}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;let{dragPropagation:o}=this.getProps();!o&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),r&&r.setActive("whileDrag",!1)}updateAxis(t,r,o){let{drag:n}=this.getProps();if(!o||!Lh(t,n,this.currentDirection))return;let a=this.getAxisMotionValue(t),i=this.originPoint[t]+o[t];this.constraints&&this.constraints[t]&&(i=qE(i,this.constraints[t],this.elastic[t])),a.set(i)}resolveConstraints(){let{dragConstraints:t,dragElastic:r}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,n=this.constraints;t&&Ia(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&o?this.constraints=$E(o.layoutBox,t):this.constraints=!1,this.elastic=QE(r),n!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&Yr(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=YE(o.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){let{dragConstraints:t,onMeasureDragConstraints:r}=this.getProps();if(!t||!Ia(t))return!1;let o=t.current;Lt(o!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");let{projection:n}=this.visualElement;if(!n||!n.layout)return!1;let a=mE(o,n.root,this.visualElement.getTransformPagePoint()),i=KE(n.layout.layoutBox,a);if(r){let s=r(iE(i));this.hasMutatedConstraints=!!s,s&&(i=fh(s))}return i}startAnimation(t){let{drag:r,dragMomentum:o,dragElastic:n,dragTransition:a,dragSnapToOrigin:i,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},u=Yr(c=>{if(!Lh(c,r,this.currentDirection))return;let d=l&&l[c]||{};i&&(d={min:0,max:0});let f=n?200:1e6,p=n?40:1e7,h={type:"inertia",velocity:o?t[c]:0,bounceStiffness:f,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...a,...d};return this.startAxisValueAnimation(c,h)});return Promise.all(u).then(s)}startAxisValueAnimation(t,r){let o=this.getAxisMotionValue(t);return Xf(this.visualElement,t),o.start(zu(t,o,0,r,this.visualElement,!1))}stopAnimation(){Yr(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Yr(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){let r=`_drag${t.toUpperCase()}`,o=this.visualElement.getProps(),n=o[r];return n||this.visualElement.getValue(t,(o.initial?o.initial[t]:void 0)||0)}snapToCursor(t){Yr(r=>{let{drag:o}=this.getProps();if(!Lh(r,o,this.currentDirection))return;let{projection:n}=this.visualElement,a=this.getAxisMotionValue(r);if(n&&n.layout){let{min:i,max:s}=n.layout.layoutBox[r];a.set(t[r]-Se(i,s,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:t,dragConstraints:r}=this.getProps(),{projection:o}=this.visualElement;if(!Ia(r)||!o||!this.constraints)return;this.stopAnimation();let n={x:0,y:0};Yr(i=>{let s=this.getAxisMotionValue(i);if(s&&this.constraints!==!1){let l=s.get();n[i]=XE({min:l,max:l},this.constraints[i])}});let{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",o.root&&o.root.updateScroll(),o.updateLayout(),this.resolveConstraints(),Yr(i=>{if(!Lh(i,t,null))return;let s=this.getAxisMotionValue(i),{min:l,max:u}=this.constraints[i];s.set(Se(l,u,n[i]))})}addListeners(){if(!this.visualElement.current)return;nq.set(this.visualElement,this);let t=this.visualElement.current,r=Ni(t,"pointerdown",l=>{let{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(l)}),o=()=>{let{dragConstraints:l}=this.getProps();Ia(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,a=n.addEventListener("measure",o);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),xe.read(o);let i=Ta(window,"resize",()=>this.scalePositionWithinConstraints()),s=n.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(Yr(c=>{let d=this.getAxisMotionValue(c);d&&(this.originPoint[c]+=l[c].translate,d.set(d.get()+l[c].translate))}),this.visualElement.render())});return()=>{i(),r(),a(),s&&s()}}getProps(){let t=this.visualElement.getProps(),{drag:r=!1,dragDirectionLock:o=!1,dragPropagation:n=!1,dragConstraints:a=!1,dragElastic:i=Rh,dragMomentum:s=!0}=t;return{...t,drag:r,dragDirectionLock:o,dragPropagation:n,dragConstraints:a,dragElastic:i,dragMomentum:s}}};function Lh(e,t,r){return(t===!0||t===e)&&(r===null||r===e)}function aq(e,t=10){let r=null;return Math.abs(e.y)>t?r="y":Math.abs(e.x)>t&&(r="x"),r}var Ph=class extends Gt{constructor(t){super(t),this.removeGroupControls=mt,this.removeListeners=mt,this.controls=new Ih(t)}mount(){let{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||mt}unmount(){this.removeGroupControls(),this.removeListeners()}};var ZE=e=>(t,r)=>{e&&xe.postRender(()=>e(t,r))},Th=class extends Gt{constructor(){super(...arguments),this.removePointerDownListener=mt}onPointerDown(t){this.session=new qu(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:bh(this.node)})}createPanHandlers(){let{onPanSessionStart:t,onPanStart:r,onPan:o,onPanEnd:n}=this.node.getProps();return{onSessionStart:ZE(t),onStart:ZE(r),onMove:o,onEnd:(a,i)=>{delete this.session,n&&xe.postRender(()=>n(a,i))}}}mount(){this.removePointerDownListener=Ni(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}};var tA=R(M(),1);var Yf=R(E(),1);var $u={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function JE(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var Ku={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(re.test(e))e=parseFloat(e);else return e;let r=JE(e,t.target.x),o=JE(e,t.target.y);return`${r}% ${o}%`}};var eA={correct:(e,{treeScale:t,projectionDelta:r})=>{let o=e,n=pr.parse(e);if(n.length>5)return o;let a=pr.createTransformer(e),i=typeof n[0]!="number"?1:0,s=r.x.scale*t.x,l=r.y.scale*t.y;n[0+i]/=s,n[1+i]/=l;let u=Se(s,l,.5);return typeof n[2+i]=="number"&&(n[2+i]/=u),typeof n[3+i]=="number"&&(n[3+i]/=u),a(n)}};var wC=!1,CC=class extends Yf.Component{componentDidMount(){let{visualElement:t,layoutGroup:r,switchLayoutGroup:o,layoutId:n}=this.props,{projection:a}=t;UM(iq),a&&(r.group&&r.group.add(a),o&&o.register&&n&&o.register(a),wC&&a.root.didUpdate(),a.addEventListener("animationComplete",()=>{this.safeToRemove()}),a.setOptions({...a.options,onExitComplete:()=>this.safeToRemove()})),$u.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){let{layoutDependency:r,visualElement:o,drag:n,isPresent:a}=this.props,{projection:i}=o;return i&&(i.isPresent=a,wC=!0,n||t.layoutDependency!==r||r===void 0||t.isPresent!==a?i.willUpdate():this.safeToRemove(),t.isPresent!==a&&(a?i.promote():i.relegate()||xe.postRender(()=>{let s=i.getStack();(!s||!s.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){let{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Ws.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:t,layoutGroup:r,switchLayoutGroup:o}=this.props,{projection:n}=t;wC=!0,n&&(n.scheduleCheckAfterUnmount(),r&&r.group&&r.group.remove(n),o&&o.deregister&&o.deregister(n))}safeToRemove(){let{safeToRemove:t}=this.props;t&&t()}render(){return null}};function kh(e){let[t,r]=Yg(),o=(0,Yf.useContext)(xu);return(0,tA.jsx)(CC,{...e,layoutGroup:o,switchLayoutGroup:(0,Yf.useContext)(uh),isPresent:t,safeToRemove:r})}var iq={borderRadius:{...Ku,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ku,borderTopRightRadius:Ku,borderBottomLeftRadius:Ku,borderBottomRightRadius:Ku,boxShadow:eA};function Mh(e,t,r){let o=Me(e)?e:Kr(e);return o.start(zu("",o,t,r)),o.animation}var rA=(e,t)=>e.depth-t.depth;var Eh=class{constructor(){this.children=[],this.isDirty=!1}add(t){Ms(this.children,t),this.isDirty=!0}remove(t){un(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(rA),this.isDirty=!1,this.children.forEach(t)}};function oA(e,t){let r=xt.now(),o=({timestamp:n})=>{let a=n-r;a>=t&&(dr(o),e(a-t))};return xe.setup(o,!0),()=>dr(o)}var sA=["TopLeft","TopRight","BottomLeft","BottomRight"],sq=sA.length,nA=e=>typeof e=="string"?parseFloat(e):e,aA=e=>typeof e=="number"||re.test(e);function lA(e,t,r,o,n,a){n?(e.opacity=Se(0,r.opacity??1,lq(o)),e.opacityExit=Se(t.opacity??1,0,uq(o))):a&&(e.opacity=Se(t.opacity??1,r.opacity??1,o));for(let i=0;i<sq;i++){let s=`border${sA[i]}Radius`,l=iA(t,s),u=iA(r,s);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||aA(l)===aA(u)?(e[s]=Math.max(Se(nA(l),nA(u),o),0),(fr.test(u)||fr.test(l))&&(e[s]+="%")):e[s]=u}(t.rotate||r.rotate)&&(e.rotate=Se(t.rotate||0,r.rotate||0,o))}function iA(e,t){return e[t]!==void 0?e[t]:e.borderRadius}var lq=uA(0,.5,pf),uq=uA(.5,.95,mt);function uA(e,t,r){return o=>o<e?0:o>t?1:r(No(e,t,o))}function cA(e,t){e.min=t.min,e.max=t.max}function mo(e,t){cA(e.x,t.x),cA(e.y,t.y)}function SC(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function dA(e,t,r,o,n){return e-=t,e=jf(e,1/r,o),n!==void 0&&(e=jf(e,1/n,o)),e}function cq(e,t=0,r=1,o=.5,n,a=e,i=e){if(fr.test(t)&&(t=parseFloat(t),t=Se(i.min,i.max,t/100)-i.min),typeof t!="number")return;let s=Se(a.min,a.max,o);e===a&&(s-=t),e.min=dA(e.min,t,r,s,n),e.max=dA(e.max,t,r,s,n)}function fA(e,t,[r,o,n],a,i){cq(e,t[r],t[o],t[n],t.scale,a,i)}var dq=["x","scaleX","originX"],fq=["y","scaleY","originY"];function bC(e,t,r,o){fA(e.x,t,dq,r?r.x:void 0,o?o.x:void 0),fA(e.y,t,fq,r?r.y:void 0,o?o.y:void 0)}function pA(e){return e.translate===0&&e.scale===1}function RC(e){return pA(e.x)&&pA(e.y)}function mA(e,t){return e.min===t.min&&e.max===t.max}function hA(e,t){return mA(e.x,t.x)&&mA(e.y,t.y)}function gA(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function LC(e,t){return gA(e.x,t.x)&&gA(e.y,t.y)}function IC(e){return _t(e.x)/_t(e.y)}function PC(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}var Ah=class{constructor(){this.members=[]}add(t){Ms(this.members,t),t.scheduleRender()}remove(t){if(un(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){let r=this.members[this.members.length-1];r&&this.promote(r)}}relegate(t){let r=this.members.findIndex(n=>t===n);if(r===0)return!1;let o;for(let n=r;n>=0;n--){let a=this.members[n];if(a.isPresent!==!1){o=a;break}}return o?(this.promote(o),!0):!1}promote(t,r){let o=this.lead;if(t!==o&&(this.prevLead=o,this.lead=t,t.show(),o)){o.instance&&o.scheduleRender(),t.scheduleRender(),t.resumeFrom=o,r&&(t.resumeFrom.preserveOpacity=!0),o.snapshot&&(t.snapshot=o.snapshot,t.snapshot.latestValues=o.animationValues||o.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);let{crossfade:n}=t.options;n===!1&&o.hide()}}exitAnimationComplete(){this.members.forEach(t=>{let{options:r,resumingFrom:o}=t;r.onExitComplete&&r.onExitComplete(),o&&o.options.onExitComplete&&o.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}};function vA(e,t,r){let o="",n=e.x.translate/t.x,a=e.y.translate/t.y,i=r?.z||0;if((n||a||i)&&(o=`translate3d(${n}px, ${a}px, ${i}px) `),(t.x!==1||t.y!==1)&&(o+=`scale(${1/t.x}, ${1/t.y}) `),r){let{transformPerspective:u,rotate:c,rotateX:d,rotateY:f,skewX:p,skewY:h}=r;u&&(o=`perspective(${u}px) ${o}`),c&&(o+=`rotate(${c}deg) `),d&&(o+=`rotateX(${d}deg) `),f&&(o+=`rotateY(${f}deg) `),p&&(o+=`skewX(${p}deg) `),h&&(o+=`skewY(${h}deg) `)}let s=e.x.scale*t.x,l=e.y.scale*t.y;return(s!==1||l!==1)&&(o+=`scale(${s}, ${l})`),o||"none"}var Qs={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},TC=["","X","Y","Z"],pq=1e3,mq=0;function kC(e,t,r,o){let{latestValues:n}=t;n[e]&&(r[e]=n[e],t.setStaticValue(e,0),o&&(o[e]=0))}function IA(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let r=vh(t);if(window.MotionHasOptimisedAnimation(r,"transform")){let{layout:n,layoutId:a}=e.options;window.MotionCancelOptimisedAnimation(r,"transform",xe,!(n||a))}let{parent:o}=e;o&&!o.hasCheckedOptimisedAppear&&IA(o)}function Dh({attachResizeListener:e,defaultParent:t,measureScroll:r,checkIsScrollRoot:o,resetTransform:n}){return class{constructor(i={},s=t?.()){this.id=mq++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,$r.value&&(Qs.nodes=Qs.calculatedTargetDeltas=Qs.calculatedProjections=0),this.nodes.forEach(vq),this.nodes.forEach(Cq),this.nodes.forEach(Sq),this.nodes.forEach(yq),$r.addProjectionMetrics&&$r.addProjectionMetrics(Qs)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=i,this.root=s?s.root||s:this,this.path=s?[...s.path,s]:[],this.parent=s,this.depth=s?s.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new Eh)}addEventListener(i,s){return this.eventHandlers.has(i)||this.eventHandlers.set(i,new va),this.eventHandlers.get(i).add(s)}notifyListeners(i,...s){let l=this.eventHandlers.get(i);l&&l.notify(...s)}hasListeners(i){return this.eventHandlers.has(i)}mount(i){if(this.instance)return;this.isSVG=js(i)&&!Bf(i),this.instance=i;let{layoutId:s,layout:l,visualElement:u}=this.options;if(u&&!u.current&&u.mount(i),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||s)&&(this.isLayoutDirty=!0),e){let c,d=0,f=()=>this.root.updateBlockedByResize=!1;xe.read(()=>{d=window.innerWidth}),e(i,()=>{let p=window.innerWidth;p!==d&&(d=p,this.root.updateBlockedByResize=!0,c&&c(),c=oA(f,250),$u.hasAnimatedSinceResize&&($u.hasAnimatedSinceResize=!1,this.nodes.forEach(wA)))})}s&&this.root.registerSharedNode(s,this),this.options.animate!==!1&&u&&(s||l)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:d,hasRelativeLayoutChanged:f,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let h=this.options.transition||u.getDefaultTransition()||Pq,{onLayoutAnimationStart:m,onLayoutAnimationComplete:x}=u.getProps(),v=!this.targetLayout||!LC(this.targetLayout,p),g=!d&&f;if(this.options.layoutRoot||this.resumeFrom||g||d&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let y={...Bs(h,"layout"),onPlay:m,onComplete:x};(u.shouldReduceMotion||this.options.layoutRoot)&&(y.delay=0,y.type=!1),this.startAnimation(y),this.setAnimationOrigin(c,g)}else d||wA(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let i=this.getStack();i&&i.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),dr(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(bq),this.animationId++)}getTransformTemplate(){let{visualElement:i}=this.options;return i&&i.getProps().transformTemplate}willUpdate(i=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&IA(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){let d=this.path[c];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}let{layoutId:s,layout:l}=this.options;if(s===void 0&&!l)return;let u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),i&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(yA);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(xA);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(wq),this.nodes.forEach(gq),this.nodes.forEach(hq)):this.nodes.forEach(xA),this.clearAllSnapshots();let s=xt.now();yt.delta=Wt(0,1e3/60,s-yt.timestamp),yt.timestamp=s,yt.isProcessing=!0,wf.update.process(yt),wf.preRender.process(yt),wf.render.process(yt),yt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Ws.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(xq),this.sharedNodes.forEach(Rq)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,xe.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){xe.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!_t(this.snapshot.measuredBox.x)&&!_t(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();let i=this.layout;this.layout=this.measure(!1),this.layoutCorrected=We(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);let{visualElement:s}=this.options;s&&s.notify("LayoutMeasure",this.layout.layoutBox,i?i.layoutBox:void 0)}updateScroll(i="measure"){let s=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===i&&(s=!1),s&&this.instance){let l=o(this.instance);this.scroll={animationId:this.root.animationId,phase:i,isRoot:l,offset:r(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!n)return;let i=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,s=this.projectionDelta&&!RC(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;i&&this.instance&&(s||Pa(this.latestValues)||c)&&(n(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(i=!0){let s=this.measurePageBox(),l=this.removeElementScroll(s);return i&&(l=this.removeTransform(l)),Tq(l),{animationId:this.root.animationId,measuredBox:s,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:i}=this.options;if(!i)return We();let s=i.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(kq))){let{scroll:u}=this.root;u&&(Ai(s.x,u.offset.x),Ai(s.y,u.offset.y))}return s}removeElementScroll(i){let s=We();if(mo(s,i),this.scroll?.wasRoot)return s;for(let l=0;l<this.path.length;l++){let u=this.path[l],{scroll:c,options:d}=u;u!==this.root&&c&&d.layoutScroll&&(c.wasRoot&&mo(s,i),Ai(s.x,c.offset.x),Ai(s.y,c.offset.y))}return s}applyTransform(i,s=!1){let l=We();mo(l,i);for(let u=0;u<this.path.length;u++){let c=this.path[u];!s&&c.options.layoutScroll&&c.scroll&&c!==c.root&&Ks(l,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),Pa(c.latestValues)&&Ks(l,c.latestValues)}return Pa(this.latestValues)&&Ks(l,this.latestValues),l}removeTransform(i){let s=We();mo(s,i);for(let l=0;l<this.path.length;l++){let u=this.path[l];if(!u.instance||!Pa(u.latestValues))continue;ph(u.latestValues)&&u.updateSnapshot();let c=We(),d=u.measurePageBox();mo(c,d),bC(s,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,c)}return Pa(this.latestValues)&&bC(s,this.latestValues),s}setTargetDelta(i){this.targetDelta=i,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(i){this.options={...this.options,...i,crossfade:i.crossfade!==void 0?i.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==yt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(i=!1){let s=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=s.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=s.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=s.isSharedProjectionDirty);let l=!!this.resumingFrom||this!==s;if(!(i||l&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:c,layoutId:d}=this.options;if(!(!this.layout||!(c||d))){if(this.resolvedRelativeTargetAt=yt.timestamp,!this.targetDelta&&!this.relativeTarget){let f=this.getClosestProjectingParent();f&&f.layout&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=We(),this.relativeTargetOrigin=We(),ju(this.relativeTargetOrigin,this.layout.layoutBox,f.layout.layoutBox),mo(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=We(),this.targetWithTransforms=We()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),FE(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):mo(this.target,this.layout.layoutBox),mC(this.target,this.targetDelta)):mo(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;let f=this.getClosestProjectingParent();f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=We(),this.relativeTargetOrigin=We(),ju(this.relativeTargetOrigin,this.target,f.target),mo(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}$r.value&&Qs.calculatedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||ph(this.parent.latestValues)||fC(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){let i=this.getLead(),s=!!this.resumingFrom||this!==i,l=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(l=!1),s&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===yt.timestamp&&(l=!1),l)return;let{layout:u,layoutId:c}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||c))return;mo(this.layoutCorrected,this.layout.layoutBox);let d=this.treeScale.x,f=this.treeScale.y;pE(this.layoutCorrected,this.treeScale,this.path,s),i.layout&&!i.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(i.target=i.layout.layoutBox,i.targetWithTransforms=We());let{target:p}=i;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(SC(this.prevProjectionDelta.x,this.projectionDelta.x),SC(this.prevProjectionDelta.y,this.projectionDelta.y)),Gu(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==f||!PC(this.projectionDelta.x,this.prevProjectionDelta.x)||!PC(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p)),$r.value&&Qs.calculatedProjections++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(i=!0){if(this.options.visualElement?.scheduleRender(),i){let s=this.getStack();s&&s.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Xs(),this.projectionDelta=Xs(),this.projectionDeltaWithTransform=Xs()}setAnimationOrigin(i,s=!1){let l=this.snapshot,u=l?l.latestValues:{},c={...this.latestValues},d=Xs();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!s;let f=We(),p=l?l.source:void 0,h=this.layout?this.layout.source:void 0,m=p!==h,x=this.getStack(),v=!x||x.members.length<=1,g=!!(m&&!v&&this.options.crossfade===!0&&!this.path.some(Iq));this.animationProgress=0;let y;this.mixTargetDelta=w=>{let C=w/1e3;CA(d.x,i.x,C),CA(d.y,i.y,C),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(ju(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Lq(this.relativeTarget,this.relativeTargetOrigin,f,C),y&&hA(this.relativeTarget,y)&&(this.isProjectionDirty=!1),y||(y=We()),mo(y,this.relativeTarget)),m&&(this.animationValues=c,lA(c,u,this.latestValues,C,g,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=C},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(i){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(dr(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=xe.update(()=>{$u.hasAnimatedSinceResize=!0,dn.layout++,this.motionValue||(this.motionValue=Kr(0)),this.currentAnimation=Mh(this.motionValue,[0,1e3],{...i,velocity:0,isSync:!0,onUpdate:s=>{this.mixTargetDelta(s),i.onUpdate&&i.onUpdate(s)},onStop:()=>{dn.layout--},onComplete:()=>{dn.layout--,i.onComplete&&i.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let i=this.getStack();i&&i.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(pq),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let i=this.getLead(),{targetWithTransforms:s,target:l,layout:u,latestValues:c}=i;if(!(!s||!l||!u)){if(this!==i&&this.layout&&u&&PA(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||We();let d=_t(this.layout.layoutBox.x);l.x.min=i.target.x.min,l.x.max=l.x.min+d;let f=_t(this.layout.layoutBox.y);l.y.min=i.target.y.min,l.y.max=l.y.min+f}mo(s,l),Ks(s,c),Gu(this.projectionDeltaWithTransform,this.layoutCorrected,s,c)}}registerSharedNode(i,s){this.sharedNodes.has(i)||this.sharedNodes.set(i,new Ah),this.sharedNodes.get(i).add(s);let u=s.options.initialPromotionConfig;s.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(s):void 0})}isLead(){let i=this.getStack();return i?i.lead===this:!0}getLead(){let{layoutId:i}=this.options;return i?this.getStack()?.lead||this:this}getPrevLead(){let{layoutId:i}=this.options;return i?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:i}=this.options;if(i)return this.root.sharedNodes.get(i)}promote({needsReset:i,transition:s,preserveFollowOpacity:l}={}){let u=this.getStack();u&&u.promote(this,l),i&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){let i=this.getStack();return i?i.relegate(this):!1}resetSkewAndRotation(){let{visualElement:i}=this.options;if(!i)return;let s=!1,{latestValues:l}=i;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(s=!0),!s)return;let u={};l.z&&kC("z",i,u,this.animationValues);for(let c=0;c<TC.length;c++)kC(`rotate${TC[c]}`,i,u,this.animationValues),kC(`skew${TC[c]}`,i,u,this.animationValues);i.render();for(let c in u)i.setStaticValue(c,u[c]),this.animationValues&&(this.animationValues[c]=u[c]);i.scheduleRender()}applyProjectionStyles(i,s){if(!this.instance||this.isSVG)return;if(!this.isVisible){i.visibility="hidden";return}let l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,i.visibility="",i.opacity="",i.pointerEvents=Nu(s?.pointerEvents)||"",i.transform=l?l(this.latestValues,""):"none";return}let u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(i.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,i.pointerEvents=Nu(s?.pointerEvents)||""),this.hasProjected&&!Pa(this.latestValues)&&(i.transform=l?l({},""):"none",this.hasProjected=!1);return}i.visibility="";let c=u.animationValues||u.latestValues;this.applyTransformsToTarget();let d=vA(this.projectionDeltaWithTransform,this.treeScale,c);l&&(d=l(c,d)),i.transform=d;let{x:f,y:p}=this.projectionDelta;i.transformOrigin=`${f.origin*100}% ${p.origin*100}% 0`,u.animationValues?i.opacity=u===this?c.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:c.opacityExit:i.opacity=u===this?c.opacity!==void 0?c.opacity:"":c.opacityExit!==void 0?c.opacityExit:0;for(let h in $s){if(c[h]===void 0)continue;let{correct:m,applyTo:x,isCSSVariable:v}=$s[h],g=d==="none"?c[h]:m(c[h],u);if(x){let y=x.length;for(let w=0;w<y;w++)i[x[w]]=g}else v?this.options.visualElement.renderState.vars[h]=g:i[h]=g}this.options.layoutId&&(i.pointerEvents=u===this?Nu(s?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(i=>i.currentAnimation?.stop()),this.root.nodes.forEach(yA),this.root.sharedNodes.clear()}}}function gq(e){e.updateLayout()}function hq(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){let{layoutBox:r,measuredBox:o}=e.layout,{animationType:n}=e.options,a=t.source!==e.layout.source;n==="size"?Yr(c=>{let d=a?t.measuredBox[c]:t.layoutBox[c],f=_t(d);d.min=r[c].min,d.max=d.min+f}):PA(n,t.layoutBox,r)&&Yr(c=>{let d=a?t.measuredBox[c]:t.layoutBox[c],f=_t(r[c]);d.max=d.min+f,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[c].max=e.relativeTarget[c].min+f)});let i=Xs();Gu(i,r,t.layoutBox);let s=Xs();a?Gu(s,e.applyTransform(o,!0),t.measuredBox):Gu(s,r,t.layoutBox);let l=!RC(i),u=!1;if(!e.resumeFrom){let c=e.getClosestProjectingParent();if(c&&!c.resumeFrom){let{snapshot:d,layout:f}=c;if(d&&f){let p=We();ju(p,t.layoutBox,d.layoutBox);let h=We();ju(h,r,f.layoutBox),LC(p,h)||(u=!0),c.options.layoutRoot&&(e.relativeTarget=h,e.relativeTargetOrigin=p,e.relativeParent=c)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:s,layoutDelta:i,hasLayoutChanged:l,hasRelativeLayoutChanged:u})}else if(e.isLead()){let{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function vq(e){$r.value&&Qs.nodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function yq(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function xq(e){e.clearSnapshot()}function yA(e){e.clearMeasurements()}function xA(e){e.isLayoutDirty=!1}function wq(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function wA(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Cq(e){e.resolveTargetDelta()}function Sq(e){e.calcProjection()}function bq(e){e.resetSkewAndRotation()}function Rq(e){e.removeLeadSnapshot()}function CA(e,t,r){e.translate=Se(t.translate,0,r),e.scale=Se(t.scale,1,r),e.origin=t.origin,e.originPoint=t.originPoint}function SA(e,t,r,o){e.min=Se(t.min,r.min,o),e.max=Se(t.max,r.max,o)}function Lq(e,t,r,o){SA(e.x,t.x,r.x,o),SA(e.y,t.y,r.y,o)}function Iq(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var Pq={duration:.45,ease:[.4,0,.1,1]},bA=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),RA=bA("applewebkit/")&&!bA("chrome/")?Math.round:mt;function LA(e){e.min=RA(e.min),e.max=RA(e.max)}function Tq(e){LA(e.x),LA(e.y)}function PA(e,t,r){return e==="position"||e==="preserve-aspect"&&!OE(IC(t),IC(r),.2)}function kq(e){return e!==e.root&&e.scroll?.wasRoot}var TA=Dh({attachResizeListener:(e,t)=>Ta(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0});var MC={current:void 0},Nh=Dh({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!MC.current){let e=new TA({});e.mount(window),e.setOptions({layoutScroll:!0}),MC.current=e}return MC.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"});var kA={pan:{Feature:Th},drag:{Feature:Ph,ProjectionNode:Nh,MeasureLayout:kh}};function MA(e,t,r){let{props:o}=e;e.animationState&&o.whileHover&&e.animationState.setActive("whileHover",r==="Start");let n="onHover"+r,a=o[n];a&&xe.postRender(()=>a(t,ka(t)))}var _h=class extends Gt{mount(){let{current:t}=this.node;t&&(this.unmount=eC(t,(r,o)=>(MA(this.node,o,"Start"),n=>MA(this.node,n,"End"))))}unmount(){}};var Oh=class extends Gt{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=cn(Ta(this.node.current,"focus",()=>this.onFocus()),Ta(this.node.current,"blur",()=>this.onBlur()))}unmount(){}};function EA(e,t,r){let{props:o}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&o.whileTap&&e.animationState.setActive("whileTap",r==="Start");let n="onTap"+(r==="End"?"":r),a=o[n];a&&xe.postRender(()=>a(t,ka(t)))}var Fh=class extends Gt{mount(){let{current:t}=this.node;t&&(this.unmount=oC(t,(r,o)=>(EA(this.node,o,"Start"),(n,{success:a})=>EA(this.node,n,a?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}};var AC=new WeakMap,EC=new WeakMap,Mq=e=>{let t=AC.get(e.target);t&&t(e)},Eq=e=>{e.forEach(Mq)};function Aq({root:e,...t}){let r=e||document;EC.has(r)||EC.set(r,{});let o=EC.get(r),n=JSON.stringify(t);return o[n]||(o[n]=new IntersectionObserver(Eq,{root:e,...t})),o[n]}function AA(e,t,r){let o=Aq(t);return AC.set(e,r),o.observe(e),()=>{AC.delete(e),o.unobserve(e)}}var Dq={some:0,all:1},Vh=class extends Gt{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();let{viewport:t={}}=this.node.getProps(),{root:r,margin:o,amount:n="some",once:a}=t,i={root:r?r.current:void 0,rootMargin:o,threshold:typeof n=="number"?n:Dq[n]},s=l=>{let{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,a&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);let{onViewportEnter:c,onViewportLeave:d}=this.node.getProps(),f=u?c:d;f&&f(l)};return AA(this.node.current,i,s)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;let{props:t,prevProps:r}=this.node;["amount","margin","root"].some(Nq(t,r))&&this.startObserver()}unmount(){}};function Nq({viewport:e={}},{viewport:t={}}={}){return r=>e[r]!==t[r]}var DA={inView:{Feature:Vh},tap:{Feature:Fh},focus:{Feature:Oh},hover:{Feature:_h}};var NA={layout:{ProjectionNode:Nh,MeasureLayout:kh}};var _A={...kE,...DA,...kA,...NA};var Ee=aE(_A,SE);var Xu=R(E(),1);function Yu(e){let t=Do(()=>Kr(e)),{isStatic:r}=(0,Xu.useContext)(Ti);if(r){let[,o]=(0,Xu.useState)(e);(0,Xu.useEffect)(()=>t.on("change",o),[])}return t}function Bh(e,t){let r=Yu(t()),o=()=>r.set(t());return o(),wi(()=>{let n=()=>xe.preRender(o,!1,!0),a=e.map(i=>i.on("change",n));return()=>{a.forEach(i=>i()),dr(o)}}),r}function OA(e){zs.current=[],e();let t=Bh(zs.current,e);return zs.current=void 0,t}function DC(e,t,r,o){if(typeof e=="function")return OA(e);let n=typeof t=="function"?t:nC(t,r,o);return Array.isArray(e)?FA(e,n):FA([e],([a])=>n(a))}function FA(e,t){let r=Do(()=>[]);return Bh(e,()=>{r.length=0;let o=e.length;for(let n=0;n<o;n++)r[n]=e[n].get();return t(r)})}function _q(e){e.values.forEach(t=>t.stop())}function NC(e,t){[...t].reverse().forEach(o=>{let n=e.getVariant(o);n&&Kf(e,n),e.variantChildren&&e.variantChildren.forEach(a=>{NC(a,t)})})}function Oq(e,t){if(Array.isArray(t))return NC(e,t);if(typeof t=="string")return NC(e,[t]);Kf(e,t)}function VA(){let e=!1,t=new Set,r={subscribe(o){return t.add(o),()=>void t.delete(o)},start(o,n){Lt(e,"controls.start() should only be called after a component has mounted. Consider calling within a useEffect hook.");let a=[];return t.forEach(i=>{a.push(wh(i,o,{transitionOverride:n}))}),Promise.all(a)},set(o){return Lt(e,"controls.set() should only be called after a component has mounted. Consider calling within a useEffect hook."),t.forEach(n=>{Oq(n,o)})},stop(){t.forEach(o=>{_q(o)})},mount(){return e=!0,()=>{e=!1,r.stop()}}};return r}function Qf(e){return typeof e=="object"&&!Array.isArray(e)}function Hh(e,t,r,o){return typeof e=="string"&&Qf(t)?Us(e,r,o):e instanceof NodeList?Array.from(e):Array.isArray(e)?e:[e]}function BA(e,t,r){return e*(t+1)}function _C(e,t,r,o){return typeof t=="number"?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,e+parseFloat(t)):t==="<"?r:t.startsWith("<")?Math.max(0,r+parseFloat(t.slice(1))):o.get(t)??e}function Fq(e,t,r){for(let o=0;o<e.length;o++){let n=e[o];n.at>t&&n.at<r&&(un(e,n),o--)}}function HA(e,t,r,o,n,a){Fq(e,n,a);for(let i=0;i<t.length;i++)e.push({value:t[i],at:Se(n,a,o[i]),easing:vf(r,i)})}function UA(e,t){for(let r=0;r<e.length;r++)e[r]=e[r]/(t+1)}function zA(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}var Vq="easeInOut",Bq=20;function jA(e,{defaultTransition:t={},...r}={},o,n){let a=t.duration||.3,i=new Map,s=new Map,l={},u=new Map,c=0,d=0,f=0;for(let p=0;p<e.length;p++){let h=e[p];if(typeof h=="string"){u.set(h,d);continue}else if(!Array.isArray(h)){u.set(h.name,_C(d,h.at,c,u));continue}let[m,x,v={}]=h;v.at!==void 0&&(d=_C(d,v.at,c,u));let g=0,y=(w,C,b,S=0,L=0)=>{let T=Hq(w),{delay:P=0,times:A=Pf(T),type:_="keyframes",repeat:G,repeatType:D,repeatDelay:W=0,...N}=C,{ease:z=t.ease||"easeOut",duration:V}=C,k=typeof P=="function"?P(S,L):P,Z=T.length,ve=Vs(_)?_:n?.[_||"keyframes"];if(Z<=2&&ve){let Y=100;if(Z===2&&Wq(T)){let pe=T[1]-T[0];Y=Math.abs(pe)}let ce={...N};V!==void 0&&(ce.duration=St(V));let q=Rf(ce,Y,ve);z=q.ease,V=q.duration}V??(V=a);let O=d+k;A.length===1&&A[0]===0&&(A[1]=1);let J=A.length-T.length;if(J>0&&If(A,J),T.length===1&&T.unshift(null),G){Lt(G<Bq,"Repeat count too high, must be less than 20","repeat-count-high"),V=BA(V,G);let Y=[...T],ce=[...A];z=Array.isArray(z)?[...z]:[z];let q=[...z];for(let pe=0;pe<G;pe++){T.push(...Y);for(let be=0;be<Y.length;be++)A.push(ce[be]+(pe+1)),z.push(be===0?"linear":vf(q,be-1))}UA(A,G)}let ae=O+V;HA(b,T,z,A,O,ae),g=Math.max(k+V,g),f=Math.max(ae,f)};if(Me(m)){let w=WA(m,s);y(x,v,GA("default",w))}else{let w=Hh(m,x,o,l),C=w.length;for(let b=0;b<C;b++){x=x,v=v;let S=w[b],L=WA(S,s);for(let T in x)y(x[T],Uq(v,T),GA(T,L),b,C)}}c=d,d+=g}return s.forEach((p,h)=>{for(let m in p){let x=p[m];x.sort(zA);let v=[],g=[],y=[];for(let C=0;C<x.length;C++){let{at:b,value:S,easing:L}=x[C];v.push(S),g.push(No(0,f,b)),y.push(L||"easeOut")}g[0]!==0&&(g.unshift(0),v.unshift(v[0]),y.unshift(Vq)),g[g.length-1]!==1&&(g.push(1),v.push(null)),i.has(h)||i.set(h,{keyframes:{},transition:{}});let w=i.get(h);w.keyframes[m]=v,w.transition[m]={...t,duration:f,ease:y,times:g,...r}}}),i}function WA(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function GA(e,t){return t[e]||(t[e]=[]),t[e]}function Hq(e){return Array.isArray(e)?e:[e]}function Uq(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}var zq=e=>typeof e=="number",Wq=e=>e.every(zq);function Gq(e,t){return e in t}var Uh=class extends Vu{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,r){if(Gq(r,t)){let o=t[r];if(typeof o=="string"||typeof o=="number")return o}}getBaseTargetFromProps(){}removeValueFromRenderState(t,r){delete r.output[t]}measureInstanceViewportBox(){return We()}build(t,r){Object.assign(t.output,r)}renderInstance(t,{output:r}){Object.assign(t,r)}sortInstanceNodePosition(){return 0}};function qA(e){let t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},r=js(e)&&!Bf(e)?new Uu(t):new Hu(t);r.mount(e),Di.set(e,r)}function $A(e){let t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},r=new Uh(t);r.mount(e),Di.set(e,r)}function jq(e,t){return Me(e)||typeof e=="number"||typeof e=="string"&&!Qf(t)}function zh(e,t,r,o){let n=[];if(jq(e,t))n.push(Mh(e,Qf(t)&&t.default||t,r&&(r.default||r)));else{let a=Hh(e,t,o),i=a.length;Lt(!!i,"No valid elements provided.","no-valid-elements");for(let s=0;s<i;s++){let l=a[s];Lt(l!==null,"You're trying to perform an animation on null. Ensure that selectors are correctly finding elements and refs are correctly hydrated.","animate-null");let u=l instanceof Element?qA:$A;Di.has(l)||u(l);let c=Di.get(l),d={...r};"delay"in d&&typeof d.delay=="function"&&(d.delay=d.delay(s,i)),n.push(...Wu(c,{...t,transition:d},{}))}}return n}function KA(e,t,r){let o=[];return jA(e,t,r,{spring:xa}).forEach(({keyframes:a,transition:i},s)=>{o.push(...zh(s,a,i))}),o}function qq(e){return Array.isArray(e)&&e.some(Array.isArray)}function XA(e){function t(r,o,n){let a=[];qq(r)?a=KA(r,o,e):a=zh(r,o,n,e);let i=new Ef(a);return e&&(e.animations.push(i),i.finished.then(()=>{un(e.animations,i)})),i}return t}var OC=XA();function YA(){let e=Do(VA);return wi(e.mount,[]),e}var FC=YA;var Wh=R(E(),1);var $q={some:0,all:1};function QA(e,t,{root:r,margin:o,amount:n="some"}={}){let a=Us(e),i=new WeakMap,s=u=>{u.forEach(c=>{let d=i.get(c.target);if(c.isIntersecting!==!!d)if(c.isIntersecting){let f=t(c.target,c);typeof f=="function"?i.set(c.target,f):l.unobserve(c.target)}else typeof d=="function"&&(d(c),i.delete(c.target))})},l=new IntersectionObserver(s,{root:r,rootMargin:o,threshold:typeof n=="number"?n:$q[n]});return a.forEach(u=>l.observe(u)),()=>l.disconnect()}function Gh(e,{root:t,margin:r,amount:o,once:n=!1,initial:a=!1}={}){let[i,s]=(0,Wh.useState)(a);return(0,Wh.useEffect)(()=>{if(!e.current||n&&i)return;let l=()=>(s(!0),n?void 0:()=>s(!1)),u={root:t&&t.current||void 0,margin:r,amount:o};return QA(e.current,l,u)},[t,e,r,n,o]),i}var m0e=ee("",{variants:{hover:{lift:["transition-all duration-200 ease-out","hover:-translate-y-0.5","hover:shadow-md"],glow:["transition-all duration-300 ease-out","hover:shadow-lg","hover:shadow-primary/20"],scale:["transition-transform duration-200 ease-out","hover:scale-105","active:scale-95"],brightness:["transition-all duration-200 ease-out","hover:brightness-110","active:brightness-95"],border:["transition-all duration-200 ease-out","hover:border-primary/50"]},focus:{ring:["focus:outline-none","focus-visible:ring-2","focus-visible:ring-primary/50","focus-visible:ring-offset-2"],glow:["focus:outline-none","focus-visible:shadow-lg","focus-visible:shadow-primary/30"],border:["focus:outline-none","focus-visible:border-primary","focus-visible:border-2"]},active:{scale:["active:scale-95","transition-transform duration-100"],darken:["active:brightness-90","transition-all duration-100"],depress:["active:translate-y-0.5","active:shadow-sm","transition-all duration-100"]},cursor:{pointer:"cursor-pointer",grab:"cursor-grab active:cursor-grabbing",text:"cursor-text",wait:"cursor-wait",help:"cursor-help",notAllowed:"cursor-not-allowed"}},defaultVariants:{hover:"lift",focus:"ring",active:"scale",cursor:"pointer"}}),mn={smooth:{type:"spring",stiffness:260,damping:20},bouncy:{type:"spring",stiffness:300,damping:15},stiff:{type:"spring",stiffness:400,damping:25},gentle:{type:"spring",stiffness:150,damping:15}},jh={lift:{y:-2,transition:mn.smooth},scale:{scale:1.05,transition:mn.smooth},glow:{boxShadow:"0 0 20px rgba(var(--primary), 0.3)",transition:mn.smooth},rotate:{rotate:2,transition:mn.bouncy}},ZA={scale:{scale:.95,transition:{duration:.1}},depress:{y:1,transition:{duration:.1}}},g0e={ring:{boxShadow:"0 0 0 2px var(--background), 0 0 0 4px var(--primary)",transition:mn.smooth},glow:{boxShadow:"0 0 0 3px rgba(var(--primary), 0.3)",transition:mn.smooth}},h0e={container:{hidden:{opacity:0},show:{opacity:1,transition:{staggerChildren:.05}}},item:{hidden:{opacity:0,y:20},show:{opacity:1,y:0,transition:mn.smooth}}},v0e={fadeIn:{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.3}},slideUp:{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20},transition:mn.smooth},slideRight:{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},exit:{opacity:0,x:20},transition:mn.smooth},scale:{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:1.05},transition:mn.smooth}},JA={initial:{opacity:.5},animate:{opacity:[.5,.8,.5],transition:{duration:1.5,repeat:1/0,ease:"easeInOut"}}};var y0e={initial:{opacity:0,y:-20,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,scale:.95,transition:{duration:.15}},transition:mn.bouncy};var _i=R(M()),eD=ee("rounded-lg border bg-card text-card-foreground shadow-sm dark:shadow-gray-900/20 dark:border-gray-800 dark:bg-gray-900 dark:text-gray-100 transition-all duration-200",{variants:{variant:{default:"",outline:"border border-border shadow-none bg-transparent dark:border-gray-700 dark:bg-transparent dark:text-gray-200",filled:"border-none bg-secondary dark:bg-gray-800 dark:text-gray-100 dark:shadow-inner dark:shadow-gray-950/10",elevated:"border-none shadow-md dark:shadow-lg dark:shadow-gray-900/30 dark:bg-gray-850 dark:text-gray-100",gradient:"border-none bg-gradient-to-br from-primary/5 to-primary/10 dark:from-primary/10 dark:to-primary/20",glass:"border border-white/20 bg-white/10 backdrop-blur-md dark:border-gray-700/30 dark:bg-gray-800/10"},size:{default:"",sm:"",lg:"",xl:""},radius:{default:"rounded-lg",sm:"rounded-md",lg:"rounded-xl",full:"rounded-3xl",none:"rounded-none"},interactive:{true:"cursor-pointer hover:shadow-lg hover:border-primary/20 dark:hover:border-primary/30 hover:-translate-y-0.5 active:translate-y-0 active:shadow-sm",false:""}},defaultVariants:{variant:"default",size:"default",radius:"default"}}),tD=Zs.forwardRef(({className:e,variant:t,size:r,radius:o,interactive:n,microInteraction:a="lift",...i},s)=>{if(n&&a!=="none"){let l={whileHover:a==="scale"?jh.scale:a==="glow"?jh.glow:jh.lift,whileTap:ZA.scale};return(0,_i.jsx)(Ee.div,{ref:s,className:I("moonui-theme",eD({variant:t,size:r,radius:o,interactive:n,className:e})),...l,...i})}return(0,_i.jsx)("div",{ref:s,className:I("moonui-theme",eD({variant:t,size:r,radius:o,interactive:n,className:e})),...i})});tD.displayName="Card";var rD=Zs.forwardRef(({className:e,...t},r)=>(0,_i.jsx)("div",{ref:r,className:I("moonui-theme","flex flex-col space-y-1.5 p-6",e),...t}));rD.displayName="CardHeader";var oD=Zs.forwardRef(({className:e,...t},r)=>(0,_i.jsx)("h3",{ref:r,className:I("moonui-theme","text-lg font-semibold leading-none tracking-tight",e),...t}));oD.displayName="CardTitle";var nD=Zs.forwardRef(({className:e,...t},r)=>(0,_i.jsx)("p",{ref:r,className:I("moonui-theme","text-sm text-muted-foreground",e),...t}));nD.displayName="CardDescription";var aD=Zs.forwardRef(({className:e,...t},r)=>(0,_i.jsx)("div",{ref:r,className:I("moonui-theme","p-6 pt-0",e),...t}));aD.displayName="CardContent";var iD=Zs.forwardRef(({className:e,...t},r)=>(0,_i.jsx)("div",{ref:r,className:I("moonui-theme","flex items-center p-6 pt-0",e),...t}));iD.displayName="CardFooter";var VD=R(E());function Ce(e){let t=Object.prototype.toString.call(e);return e instanceof Date||typeof e=="object"&&t==="[object Date]"?new e.constructor(+e):typeof e=="number"||t==="[object Number]"||typeof e=="string"||t==="[object String]"?new Date(e):new Date(NaN)}function tr(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function qh(e,t){let r=Ce(e);if(isNaN(t))return tr(e,NaN);if(!t)return r;let o=r.getDate(),n=tr(e,r.getTime());n.setMonth(r.getMonth()+t+1,0);let a=n.getDate();return o>=a?n:(r.setFullYear(n.getFullYear(),n.getMonth(),o),r)}var Kq=Math.pow(10,8)*24*60*60*1e3,E0e=-Kq,$h=6048e5,sD=864e5;var Xq=3600;var lD=Xq*24,A0e=lD*7,Yq=lD*365.2425,Qq=Yq/12,D0e=Qq*3;var Zq={};function qn(){return Zq}function gn(e,t){let r=qn(),o=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,n=Ce(e),a=n.getDay(),i=(a<o?7:0)+a-o;return n.setDate(n.getDate()-i),n.setHours(0,0,0,0),n}function Js(e){return gn(e,{weekStartsOn:1})}function Kh(e){let t=Ce(e),r=t.getFullYear(),o=tr(e,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);let n=Js(o),a=tr(e,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);let i=Js(a);return t.getTime()>=n.getTime()?r+1:t.getTime()>=i.getTime()?r:r-1}function Qu(e){let t=Ce(e);return t.setHours(0,0,0,0),t}function VC(e){let t=Ce(e),r=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return r.setUTCFullYear(t.getFullYear()),+e-+r}function uD(e,t){let r=Qu(e),o=Qu(t),n=+r-VC(r),a=+o-VC(o);return Math.round((n-a)/sD)}function cD(e){let t=Kh(e),r=tr(e,0);return r.setFullYear(t,0,4),r.setHours(0,0,0,0),Js(r)}function dD(e){return tr(e,Date.now())}function el(e,t){let r=Qu(e),o=Qu(t);return+r==+o}function fD(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Xh(e){if(!fD(e)&&typeof e!="number")return!1;let t=Ce(e);return!isNaN(Number(t))}function pD(e){let t=Ce(e),r=t.getMonth();return t.setFullYear(t.getFullYear(),r+1,0),t.setHours(23,59,59,999),t}function Yh(e,t){let r=Ce(e.start),o=Ce(e.end),n=+r>+o,a=n?+r:+o,i=n?o:r;i.setHours(0,0,0,0);let s=t?.step??1;if(!s)return[];s<0&&(s=-s,n=!n);let l=[];for(;+i<=a;)l.push(Ce(i)),i.setDate(i.getDate()+s),i.setHours(0,0,0,0);return n?l.reverse():l}function mD(e){let t=Ce(e);return t.setDate(1),t.setHours(0,0,0,0),t}function gD(e){let t=Ce(e),r=tr(e,0);return r.setFullYear(t.getFullYear(),0,1),r.setHours(0,0,0,0),r}function hD(e,t){let r=qn(),o=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,n=Ce(e),a=n.getDay(),i=(a<o?-7:0)+6-(a-o);return n.setDate(n.getDate()+i),n.setHours(23,59,59,999),n}var Jq={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},vD=(e,t,r)=>{let o,n=Jq[e];return typeof n=="string"?o=n:t===1?o=n.one:o=n.other.replace("{{count}}",t.toString()),r?.addSuffix?r.comparison&&r.comparison>0?"in "+o:o+" ago":o};function Qh(e){return(t={})=>{let r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}var e6={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},t6={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},r6={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},yD={date:Qh({formats:e6,defaultWidth:"full"}),time:Qh({formats:t6,defaultWidth:"full"}),dateTime:Qh({formats:r6,defaultWidth:"full"})};var o6={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},xD=(e,t,r,o)=>o6[e];function Zu(e){return(t,r)=>{let o=r?.context?String(r.context):"standalone",n;if(o==="formatting"&&e.formattingValues){let i=e.defaultFormattingWidth||e.defaultWidth,s=r?.width?String(r.width):i;n=e.formattingValues[s]||e.formattingValues[i]}else{let i=e.defaultWidth,s=r?.width?String(r.width):e.defaultWidth;n=e.values[s]||e.values[i]}let a=e.argumentCallback?e.argumentCallback(t):t;return n[a]}}var n6={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},a6={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},i6={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},s6={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},l6={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},u6={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},c6=(e,t)=>{let r=Number(e),o=r%100;if(o>20||o<10)switch(o%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},wD={ordinalNumber:c6,era:Zu({values:n6,defaultWidth:"wide"}),quarter:Zu({values:a6,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Zu({values:i6,defaultWidth:"wide"}),day:Zu({values:s6,defaultWidth:"wide"}),dayPeriod:Zu({values:l6,defaultWidth:"wide",formattingValues:u6,defaultFormattingWidth:"wide"})};function Ju(e){return(t,r={})=>{let o=r.width,n=o&&e.matchPatterns[o]||e.matchPatterns[e.defaultMatchWidth],a=t.match(n);if(!a)return null;let i=a[0],s=o&&e.parsePatterns[o]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?f6(s,d=>d.test(i)):d6(s,d=>d.test(i)),u;u=e.valueCallback?e.valueCallback(l):l,u=r.valueCallback?r.valueCallback(u):u;let c=t.slice(i.length);return{value:u,rest:c}}}function d6(e,t){for(let r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r}function f6(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r}function CD(e){return(t,r={})=>{let o=t.match(e.matchPattern);if(!o)return null;let n=o[0],a=t.match(e.parsePattern);if(!a)return null;let i=e.valueCallback?e.valueCallback(a[0]):a[0];i=r.valueCallback?r.valueCallback(i):i;let s=t.slice(n.length);return{value:i,rest:s}}}var p6=/^(\d+)(th|st|nd|rd)?/i,m6=/\d+/i,g6={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},h6={any:[/^b/i,/^(a|c)/i]},v6={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},y6={any:[/1/i,/2/i,/3/i,/4/i]},x6={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},w6={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},C6={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},S6={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},b6={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},R6={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},SD={ordinalNumber:CD({matchPattern:p6,parsePattern:m6,valueCallback:e=>parseInt(e,10)}),era:Ju({matchPatterns:g6,defaultMatchWidth:"wide",parsePatterns:h6,defaultParseWidth:"any"}),quarter:Ju({matchPatterns:v6,defaultMatchWidth:"wide",parsePatterns:y6,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Ju({matchPatterns:x6,defaultMatchWidth:"wide",parsePatterns:w6,defaultParseWidth:"any"}),day:Ju({matchPatterns:C6,defaultMatchWidth:"wide",parsePatterns:S6,defaultParseWidth:"any"}),dayPeriod:Ju({matchPatterns:b6,defaultMatchWidth:"any",parsePatterns:R6,defaultParseWidth:"any"})};var BC={code:"en-US",formatDistance:vD,formatLong:yD,formatRelative:xD,localize:wD,match:SD,options:{weekStartsOn:0,firstWeekContainsDate:1}};function bD(e){let t=Ce(e);return uD(t,gD(t))+1}function RD(e){let t=Ce(e),r=+Js(t)-+cD(t);return Math.round(r/$h)+1}function Zh(e,t){let r=Ce(e),o=r.getFullYear(),n=qn(),a=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=tr(e,0);i.setFullYear(o+1,0,a),i.setHours(0,0,0,0);let s=gn(i,t),l=tr(e,0);l.setFullYear(o,0,a),l.setHours(0,0,0,0);let u=gn(l,t);return r.getTime()>=s.getTime()?o+1:r.getTime()>=u.getTime()?o:o-1}function LD(e,t){let r=qn(),o=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,n=Zh(e,t),a=tr(e,0);return a.setFullYear(n,0,o),a.setHours(0,0,0,0),gn(a,t)}function ID(e,t){let r=Ce(e),o=+gn(r,t)-+LD(r,t);return Math.round(o/$h)+1}function Ae(e,t){let r=e<0?"-":"",o=Math.abs(e).toString().padStart(t,"0");return r+o}var Ma={y(e,t){let r=e.getFullYear(),o=r>0?r:1-r;return Ae(t==="yy"?o%100:o,t.length)},M(e,t){let r=e.getMonth();return t==="M"?String(r+1):Ae(r+1,2)},d(e,t){return Ae(e.getDate(),t.length)},a(e,t){let r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];case"aaaa":default:return r==="am"?"a.m.":"p.m."}},h(e,t){return Ae(e.getHours()%12||12,t.length)},H(e,t){return Ae(e.getHours(),t.length)},m(e,t){return Ae(e.getMinutes(),t.length)},s(e,t){return Ae(e.getSeconds(),t.length)},S(e,t){let r=t.length,o=e.getMilliseconds(),n=Math.trunc(o*Math.pow(10,r-3));return Ae(n,t.length)}};var ec={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},HC={G:function(e,t,r){let o=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return r.era(o,{width:"abbreviated"});case"GGGGG":return r.era(o,{width:"narrow"});case"GGGG":default:return r.era(o,{width:"wide"})}},y:function(e,t,r){if(t==="yo"){let o=e.getFullYear(),n=o>0?o:1-o;return r.ordinalNumber(n,{unit:"year"})}return Ma.y(e,t)},Y:function(e,t,r,o){let n=Zh(e,o),a=n>0?n:1-n;if(t==="YY"){let i=a%100;return Ae(i,2)}return t==="Yo"?r.ordinalNumber(a,{unit:"year"}):Ae(a,t.length)},R:function(e,t){let r=Kh(e);return Ae(r,t.length)},u:function(e,t){let r=e.getFullYear();return Ae(r,t.length)},Q:function(e,t,r){let o=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(o);case"QQ":return Ae(o,2);case"Qo":return r.ordinalNumber(o,{unit:"quarter"});case"QQQ":return r.quarter(o,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(o,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(o,{width:"wide",context:"formatting"})}},q:function(e,t,r){let o=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(o);case"qq":return Ae(o,2);case"qo":return r.ordinalNumber(o,{unit:"quarter"});case"qqq":return r.quarter(o,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(o,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(o,{width:"wide",context:"standalone"})}},M:function(e,t,r){let o=e.getMonth();switch(t){case"M":case"MM":return Ma.M(e,t);case"Mo":return r.ordinalNumber(o+1,{unit:"month"});case"MMM":return r.month(o,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(o,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(o,{width:"wide",context:"formatting"})}},L:function(e,t,r){let o=e.getMonth();switch(t){case"L":return String(o+1);case"LL":return Ae(o+1,2);case"Lo":return r.ordinalNumber(o+1,{unit:"month"});case"LLL":return r.month(o,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(o,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(o,{width:"wide",context:"standalone"})}},w:function(e,t,r,o){let n=ID(e,o);return t==="wo"?r.ordinalNumber(n,{unit:"week"}):Ae(n,t.length)},I:function(e,t,r){let o=RD(e);return t==="Io"?r.ordinalNumber(o,{unit:"week"}):Ae(o,t.length)},d:function(e,t,r){return t==="do"?r.ordinalNumber(e.getDate(),{unit:"date"}):Ma.d(e,t)},D:function(e,t,r){let o=bD(e);return t==="Do"?r.ordinalNumber(o,{unit:"dayOfYear"}):Ae(o,t.length)},E:function(e,t,r){let o=e.getDay();switch(t){case"E":case"EE":case"EEE":return r.day(o,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(o,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(o,{width:"short",context:"formatting"});case"EEEE":default:return r.day(o,{width:"wide",context:"formatting"})}},e:function(e,t,r,o){let n=e.getDay(),a=(n-o.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return Ae(a,2);case"eo":return r.ordinalNumber(a,{unit:"day"});case"eee":return r.day(n,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(n,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(n,{width:"short",context:"formatting"});case"eeee":default:return r.day(n,{width:"wide",context:"formatting"})}},c:function(e,t,r,o){let n=e.getDay(),a=(n-o.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return Ae(a,t.length);case"co":return r.ordinalNumber(a,{unit:"day"});case"ccc":return r.day(n,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(n,{width:"narrow",context:"standalone"});case"cccccc":return r.day(n,{width:"short",context:"standalone"});case"cccc":default:return r.day(n,{width:"wide",context:"standalone"})}},i:function(e,t,r){let o=e.getDay(),n=o===0?7:o;switch(t){case"i":return String(n);case"ii":return Ae(n,t.length);case"io":return r.ordinalNumber(n,{unit:"day"});case"iii":return r.day(o,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(o,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(o,{width:"short",context:"formatting"});case"iiii":default:return r.day(o,{width:"wide",context:"formatting"})}},a:function(e,t,r){let n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(n,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},b:function(e,t,r){let o=e.getHours(),n;switch(o===12?n=ec.noon:o===0?n=ec.midnight:n=o/12>=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(n,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},B:function(e,t,r){let o=e.getHours(),n;switch(o>=17?n=ec.evening:o>=12?n=ec.afternoon:o>=4?n=ec.morning:n=ec.night,t){case"B":case"BB":case"BBB":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(n,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},h:function(e,t,r){if(t==="ho"){let o=e.getHours()%12;return o===0&&(o=12),r.ordinalNumber(o,{unit:"hour"})}return Ma.h(e,t)},H:function(e,t,r){return t==="Ho"?r.ordinalNumber(e.getHours(),{unit:"hour"}):Ma.H(e,t)},K:function(e,t,r){let o=e.getHours()%12;return t==="Ko"?r.ordinalNumber(o,{unit:"hour"}):Ae(o,t.length)},k:function(e,t,r){let o=e.getHours();return o===0&&(o=24),t==="ko"?r.ordinalNumber(o,{unit:"hour"}):Ae(o,t.length)},m:function(e,t,r){return t==="mo"?r.ordinalNumber(e.getMinutes(),{unit:"minute"}):Ma.m(e,t)},s:function(e,t,r){return t==="so"?r.ordinalNumber(e.getSeconds(),{unit:"second"}):Ma.s(e,t)},S:function(e,t){return Ma.S(e,t)},X:function(e,t,r){let o=e.getTimezoneOffset();if(o===0)return"Z";switch(t){case"X":return TD(o);case"XXXX":case"XX":return tl(o);case"XXXXX":case"XXX":default:return tl(o,":")}},x:function(e,t,r){let o=e.getTimezoneOffset();switch(t){case"x":return TD(o);case"xxxx":case"xx":return tl(o);case"xxxxx":case"xxx":default:return tl(o,":")}},O:function(e,t,r){let o=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+PD(o,":");case"OOOO":default:return"GMT"+tl(o,":")}},z:function(e,t,r){let o=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+PD(o,":");case"zzzz":default:return"GMT"+tl(o,":")}},t:function(e,t,r){let o=Math.trunc(e.getTime()/1e3);return Ae(o,t.length)},T:function(e,t,r){let o=e.getTime();return Ae(o,t.length)}};function PD(e,t=""){let r=e>0?"-":"+",o=Math.abs(e),n=Math.trunc(o/60),a=o%60;return a===0?r+String(n):r+String(n)+t+Ae(a,2)}function TD(e,t){return e%60===0?(e>0?"-":"+")+Ae(Math.abs(e)/60,2):tl(e,t)}function tl(e,t=""){let r=e>0?"-":"+",o=Math.abs(e),n=Ae(Math.trunc(o/60),2),a=Ae(o%60,2);return r+n+t+a}var kD=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},MD=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},L6=(e,t)=>{let r=e.match(/(P+)(p+)?/)||[],o=r[1],n=r[2];if(!n)return kD(e,t);let a;switch(o){case"P":a=t.dateTime({width:"short"});break;case"PP":a=t.dateTime({width:"medium"});break;case"PPP":a=t.dateTime({width:"long"});break;case"PPPP":default:a=t.dateTime({width:"full"});break}return a.replace("{{date}}",kD(o,t)).replace("{{time}}",MD(n,t))},ED={p:MD,P:L6};var I6=/^D+$/,P6=/^Y+$/,T6=["D","DD","YY","YYYY"];function AD(e){return I6.test(e)}function DD(e){return P6.test(e)}function ND(e,t,r){let o=k6(e,t,r);if(console.warn(o),T6.includes(e))throw new RangeError(o)}function k6(e,t,r){let o=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${o} to the input \`${r}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}var M6=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,E6=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,A6=/^'([^]*?)'?$/,D6=/''/g,N6=/[a-zA-Z]/;function hn(e,t,r){let o=qn(),n=r?.locale??o.locale??BC,a=r?.firstWeekContainsDate??r?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,i=r?.weekStartsOn??r?.locale?.options?.weekStartsOn??o.weekStartsOn??o.locale?.options?.weekStartsOn??0,s=Ce(e);if(!Xh(s))throw new RangeError("Invalid time value");let l=t.match(E6).map(c=>{let d=c[0];if(d==="p"||d==="P"){let f=ED[d];return f(c,n.formatLong)}return c}).join("").match(M6).map(c=>{if(c==="''")return{isToken:!1,value:"'"};let d=c[0];if(d==="'")return{isToken:!1,value:_6(c)};if(HC[d])return{isToken:!0,value:c};if(d.match(N6))throw new RangeError("Format string contains an unescaped latin alphabet character `"+d+"`");return{isToken:!1,value:c}});n.localize.preprocessor&&(l=n.localize.preprocessor(s,l));let u={firstWeekContainsDate:a,weekStartsOn:i,locale:n};return l.map(c=>{if(!c.isToken)return c.value;let d=c.value;(!r?.useAdditionalWeekYearTokens&&DD(d)||!r?.useAdditionalDayOfYearTokens&&AD(d))&&ND(d,t,String(e));let f=HC[d[0]];return f(s,d,n.localize,u)}).join("")}function _6(e){let t=e.match(A6);return t?t[1].replace(D6,"'"):e}function UC(e){return Ce(e).getDay()}function _D(e,t){let r=Ce(e),o=Ce(t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function OD(e){return el(e,dD(e))}function FD(e,t){return qh(e,-t)}var kr=R(M());function Zf({mode:e="single",selected:t,onSelect:r,disabled:o,showOutsideDays:n=!1,className:a,classNames:i,numberOfMonths:s=1,defaultMonth:l,...u}){let[c,d]=VD.useState(l||t&&t||new Date),f=[{short:"S",full:"Sunday"},{short:"M",full:"Monday"},{short:"T",full:"Tuesday"},{short:"W",full:"Wednesday"},{short:"T",full:"Thursday"},{short:"F",full:"Friday"},{short:"S",full:"Saturday"}],p=()=>{d(FD(c,1))},h=()=>{d(qh(c,1))},m=b=>{if(!o?.(b)){if(e==="single")r?.(b);else if(e==="range"){let S=t;!S?.from||S.from&&S.to?r?.({from:b,to:void 0}):b<S.from?r?.({from:b,to:S.from}):r?.({from:S.from,to:b})}}},x=b=>{if(!t)return!1;if(e==="single")return el(b,t);if(e==="range"){let S=t;return S.from&&S.to?b>=S.from&&b<=S.to:S.from?el(b,S.from):!1}return!1},v=b=>{if(e!=="range"||!t)return!1;let S=t;return S.from?el(b,S.from):!1},g=b=>{if(e!=="range"||!t)return!1;let S=t;return S.to?el(b,S.to):!1},y=b=>{if(e!=="range"||!t)return!1;let S=t;return!S.from||!S.to?!1:b>S.from&&b<S.to},C=(()=>{let b=mD(c),S=pD(c),L=Yh({start:b,end:S}),T=UC(b),P=[];if(T>0&&n){let D=gn(b),W=new Date(b);W.setDate(W.getDate()-1),P.push(...Yh({start:D,end:W}))}let A=UC(S),_=[];if(A<6&&n){let D=new Date(S);D.setDate(D.getDate()+1);let W=hD(S);_.push(...Yh({start:D,end:W}))}let G=[];if(!n&&T>0)for(let D=0;D<T;D++)G.push(null);return[...P,...G,...L,..._]})();return(0,kr.jsxs)("div",{className:I("moonui-theme","p-0",a),children:[(0,kr.jsxs)("div",{className:"flex items-center justify-between px-6 py-4 border-b border-border/50 dark:border-gray-700/50",children:[(0,kr.jsx)("button",{onClick:p,className:I("h-10 w-10 bg-transparent p-0 rounded-lg","hover:bg-muted transition-colors","inline-flex items-center justify-center"),type:"button",children:(0,kr.jsx)(an,{className:"h-5 w-5"})}),(0,kr.jsx)("h2",{className:"text-base font-medium",children:hn(c,"MMMM yyyy")}),(0,kr.jsx)("button",{onClick:h,className:I("h-10 w-10 bg-transparent p-0 rounded-lg","hover:bg-muted transition-colors","inline-flex items-center justify-center"),type:"button",children:(0,kr.jsx)(Pr,{className:"h-5 w-5"})})]}),(0,kr.jsxs)("div",{className:"px-6 pb-4",children:[(0,kr.jsx)("div",{className:"grid grid-cols-7 mb-2",children:f.map((b,S)=>(0,kr.jsx)("div",{className:"text-muted-foreground text-xs font-medium h-10 flex items-center justify-center",title:b.full,children:b.short},`weekday-${S}`))}),(0,kr.jsx)("div",{className:"grid grid-cols-7 gap-1",children:C.map((b,S)=>{if(!b)return(0,kr.jsx)("div",{className:"h-10 w-10"},`empty-${S}`);let L=!_D(b,c),T=o?.(b)||!1,P=x(b),A=OD(b),_=v(b),G=g(b),D=y(b);return(0,kr.jsx)("button",{onClick:()=>m(b),disabled:T,className:I("h-10 w-10 p-0 font-normal","inline-flex items-center justify-center rounded-lg","hover:bg-muted transition-colors text-sm","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",L&&"text-muted-foreground/50",T&&"text-muted-foreground/30 cursor-not-allowed hover:bg-transparent",P&&!D&&"bg-primary text-primary-foreground font-medium hover:bg-primary hover:text-primary-foreground",A&&"font-semibold relative after:absolute after:bottom-1 after:left-1/2 after:-translate-x-1/2 after:h-1 after:w-1 after:rounded-full after:bg-primary",D&&"bg-accent/30 text-accent-foreground rounded-none",_&&"rounded-r-none",G&&"rounded-l-none"),type:"button",children:hn(b,"d")},b.toISOString())})})]})]})}Zf.displayName="Calendar";var rl=R(E());var Oi=R(M()),O6=e=>{let t={visa:/^4/,mastercard:/^5[1-5]/,amex:/^3[47]/,discover:/^6(?:011|5)/,diners:/^3(?:0[0-5]|[68])/,jcb:/^35/};for(let[r,o]of Object.entries(t))if(o.test(e))return r;return"unknown"},BD=(e,t)=>{let r=e.replace(/\s+/g,""),o=t==="amex"?[4,6,5]:[4,4,4,4],n="",a=0;for(let i of o){if(a>=r.length)break;n&&(n+=" "),n+=r.slice(a,a+i),a+=i}return n},HD=rl.forwardRef(({className:e,value:t="",onChange:r,showIcon:o=!0,size:n,...a},i)=>{let[s,l]=rl.useState("unknown"),u=c=>{let d=c.target.value.replace(/\D/g,""),f=O6(d);l(f);let p=f==="amex"?15:16,h=d.slice(0,p),m=BD(h,f);r?.(h,f),c.target.value=m};return(0,Oi.jsxs)("div",{className:"relative",children:[(0,Oi.jsx)(mr,{ref:i,type:"text",inputMode:"numeric",autoComplete:"cc-number",placeholder:"1234 5678 9012 3456",value:BD(t,s),onChange:u,className:I(o&&"pl-10",e),...a}),o&&(0,Oi.jsx)(Od,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"})]})});HD.displayName="CardNumberInput";var UD=rl.forwardRef(({className:e,value:t="",onChange:r,size:o,...n},a)=>{let i=l=>{let u=l.target.value.replace(/\D/g,"");if(u.length>=2){let d=parseInt(u.slice(0,2));d>12?u="12"+u.slice(2):d===0&&(u="01"+u.slice(2))}u=u.slice(0,4);let c=u;u.length>=2&&(c=u.slice(0,2)+"/"+u.slice(2)),r?.(u),l.target.value=c},s=t.length>=2?t.slice(0,2)+"/"+t.slice(2):t;return(0,Oi.jsx)(mr,{ref:a,type:"text",inputMode:"numeric",autoComplete:"cc-exp",placeholder:"MM/YY",value:s,onChange:i,className:e,...n})});UD.displayName="CardExpiryInput";var zD=rl.forwardRef(({className:e,value:t="",onChange:r,cardType:o="unknown",size:n,...a},i)=>{let s=o==="amex"?4:3;return(0,Oi.jsx)(mr,{ref:i,type:"text",inputMode:"numeric",autoComplete:"cc-csc",placeholder:o==="amex"?"1234":"123",value:t,onChange:u=>{let c=u.target.value.replace(/\D/g,"").slice(0,s);r?.(c)},maxLength:s,className:e,...a})});zD.displayName="CardCVCInput";var WD=rl.forwardRef(({className:e,value:t="",onChange:r,format:o="US",size:n,...a},i)=>{let s=u=>{let c=u.target.value;switch(o){case"US":c=c.replace(/\D/g,"").slice(0,5);break;case"CA":c=c.toUpperCase().replace(/[^A-Z0-9]/g,"").slice(0,6),c.length>=3&&(c=c.slice(0,3)+" "+c.slice(3));break;case"UK":c=c.toUpperCase().replace(/[^A-Z0-9\s]/g,"").slice(0,8);break;default:c=c.slice(0,10)}r?.(c.replace(/\s/g,"")),u.target.value=c};return(0,Oi.jsx)(mr,{ref:i,type:"text",autoComplete:"postal-code",placeholder:(()=>{switch(o){case"US":return"12345";case"CA":return"K1A 0B1";case"UK":return"SW1A 1AA";default:return"Postal Code"}})(),value:t,onChange:s,className:e,...a})});WD.displayName="CardZipInput";var vn=R(E());var Mr=R(E(),1);var Jh=R(E(),1);function tc(e){let t=Jh.useRef({value:e,previous:e});return Jh.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var GD=R(E(),1);function rc(e){let[t,r]=GD.useState(void 0);return ke(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});let o=new ResizeObserver(n=>{if(!Array.isArray(n)||!n.length)return;let a=n[0],i,s;if("borderBoxSize"in a){let l=a.borderBoxSize,u=Array.isArray(l)?l[0]:l;i=u.inlineSize,s=u.blockSize}else i=e.offsetWidth,s=e.offsetHeight;r({width:i,height:s})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else r(void 0)},[e]),t}var go=R(M(),1),ev="Checkbox",[F6,uSe]=Te(ev),[V6,zC]=F6(ev);function B6(e){let{__scopeCheckbox:t,checked:r,children:o,defaultChecked:n,disabled:a,form:i,name:s,onCheckedChange:l,required:u,value:c="on",internal_do_not_use_render:d}=e,[f,p]=ze({prop:r,defaultProp:n??!1,onChange:l,caller:ev}),[h,m]=Mr.useState(null),[x,v]=Mr.useState(null),g=Mr.useRef(!1),y=h?!!i||!!h.closest("form"):!0,w={checked:f,disabled:a,setChecked:p,control:h,setControl:m,name:s,form:i,value:c,hasConsumerStoppedPropagationRef:g,required:u,defaultChecked:Fi(n)?!1:n,isFormControl:y,bubbleInput:x,setBubbleInput:v};return(0,go.jsx)(V6,{scope:t,...w,children:H6(d)?d(w):o})}var jD="CheckboxTrigger",qD=Mr.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:r,...o},n)=>{let{control:a,value:i,disabled:s,checked:l,required:u,setControl:c,setChecked:d,hasConsumerStoppedPropagationRef:f,isFormControl:p,bubbleInput:h}=zC(jD,e),m=ne(n,c),x=Mr.useRef(l);return Mr.useEffect(()=>{let v=a?.form;if(v){let g=()=>d(x.current);return v.addEventListener("reset",g),()=>v.removeEventListener("reset",g)}},[a,d]),(0,go.jsx)($.button,{type:"button",role:"checkbox","aria-checked":Fi(l)?"mixed":l,"aria-required":u,"data-state":YD(l),"data-disabled":s?"":void 0,disabled:s,value:i,...o,ref:m,onKeyDown:H(t,v=>{v.key==="Enter"&&v.preventDefault()}),onClick:H(r,v=>{d(g=>Fi(g)?!0:!g),h&&p&&(f.current=v.isPropagationStopped(),f.current||v.stopPropagation())})})});qD.displayName=jD;var tv=Mr.forwardRef((e,t)=>{let{__scopeCheckbox:r,name:o,checked:n,defaultChecked:a,required:i,disabled:s,value:l,onCheckedChange:u,form:c,...d}=e;return(0,go.jsx)(B6,{__scopeCheckbox:r,checked:n,defaultChecked:a,disabled:s,required:i,onCheckedChange:u,name:o,form:c,value:l,internal_do_not_use_render:({isFormControl:f})=>(0,go.jsxs)(go.Fragment,{children:[(0,go.jsx)(qD,{...d,ref:t,__scopeCheckbox:r}),f&&(0,go.jsx)(XD,{__scopeCheckbox:r})]})})});tv.displayName=ev;var $D="CheckboxIndicator",WC=Mr.forwardRef((e,t)=>{let{__scopeCheckbox:r,forceMount:o,...n}=e,a=zC($D,r);return(0,go.jsx)(it,{present:o||Fi(a.checked)||a.checked===!0,children:(0,go.jsx)($.span,{"data-state":YD(a.checked),"data-disabled":a.disabled?"":void 0,...n,ref:t,style:{pointerEvents:"none",...e.style}})})});WC.displayName=$D;var KD="CheckboxBubbleInput",XD=Mr.forwardRef(({__scopeCheckbox:e,...t},r)=>{let{control:o,hasConsumerStoppedPropagationRef:n,checked:a,defaultChecked:i,required:s,disabled:l,name:u,value:c,form:d,bubbleInput:f,setBubbleInput:p}=zC(KD,e),h=ne(r,p),m=tc(a),x=rc(o);Mr.useEffect(()=>{let g=f;if(!g)return;let y=window.HTMLInputElement.prototype,C=Object.getOwnPropertyDescriptor(y,"checked").set,b=!n.current;if(m!==a&&C){let S=new Event("click",{bubbles:b});g.indeterminate=Fi(a),C.call(g,Fi(a)?!1:a),g.dispatchEvent(S)}},[f,m,a,n]);let v=Mr.useRef(Fi(a)?!1:a);return(0,go.jsx)($.input,{type:"checkbox","aria-hidden":!0,defaultChecked:i??v.current,required:s,disabled:l,name:u,value:c,form:d,...t,tabIndex:-1,ref:h,style:{...t.style,...x,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});XD.displayName=KD;function H6(e){return typeof e=="function"}function Fi(e){return e==="indeterminate"}function YD(e){return Fi(e)?"indeterminate":e?"checked":"unchecked"}var Oo=R(M()),z6=ee("peer shrink-0 border focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:text-primary-foreground",{variants:{variant:{default:"border-border bg-background data-[state=checked]:bg-primary data-[state=checked]:border-primary",outline:"border-border bg-transparent data-[state=checked]:bg-primary data-[state=checked]:border-primary",muted:"border-border bg-accent data-[state=checked]:bg-primary data-[state=checked]:border-primary",ghost:"border-transparent bg-transparent hover:bg-accent data-[state=checked]:bg-primary data-[state=checked]:border-primary"},size:{sm:"h-3.5 w-3.5",default:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"},radius:{none:"rounded-none",sm:"rounded-sm",default:"rounded-sm",md:"rounded-md",full:"rounded-full"},animation:{none:"",subtle:"transition-all duration-200",default:"transition-all duration-200",bounce:"transition-all duration-200"}},defaultVariants:{variant:"default",size:"default",radius:"default",animation:"default"}}),GC=vn.forwardRef(({className:e,variant:t,size:r,radius:o,animation:n,indeterminate:a=!1,icon:i,checked:s,...l},u)=>{let[c,d]=vn.useState(a);return vn.useEffect(()=>{d(a)},[a]),(0,Oo.jsx)(tv,{ref:u,checked:c?!1:s,className:I("moonui-theme",z6({variant:t,size:r,radius:o,animation:n}),e),...l,children:(0,Oo.jsx)(WC,{className:I("flex items-center justify-center text-current",n==="bounce"&&"data-[state=checked]:animate-bounce"),children:c?(0,Oo.jsx)(jd,{className:"h-[65%] w-[65%]"}):i||(0,Oo.jsx)(lr,{className:"h-[65%] w-[65%]"})})})});GC.displayName=tv.displayName;var QD=vn.forwardRef(({className:e,orientation:t="vertical",spacing:r="1rem",children:o,...n},a)=>(0,Oo.jsx)("div",{ref:a,className:I("flex",t==="vertical"?"flex-col":"flex-row flex-wrap",e),style:{gap:r},role:"group",...n,children:o}));QD.displayName="CheckboxGroup";var rv=vn.forwardRef(({className:e,htmlFor:t,children:r,position:o="end",disabled:n=!1,...a},i)=>(0,Oo.jsx)("label",{ref:i,htmlFor:t,className:I("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",o==="start"?"mr-2":"ml-2",n&&"cursor-not-allowed opacity-70",e),...a,children:r}));rv.displayName="CheckboxLabel";var ZD=vn.forwardRef(({id:e,label:t,labelPosition:r="end",labelClassName:o,...n},a)=>{let i=vn.useId(),s=e||i;return(0,Oo.jsxs)("div",{className:"flex items-center",children:[r==="start"&&(0,Oo.jsx)(rv,{htmlFor:s,position:"start",disabled:n.disabled,className:o,children:t}),(0,Oo.jsx)(GC,{ref:a,id:s,...n}),r==="end"&&(0,Oo.jsx)(rv,{htmlFor:s,position:"end",disabled:n.disabled,className:o,children:t})]})});ZD.displayName="CheckboxWithLabel";var jC=R(E());var ol=R(M()),W6=fg,JD=ee("flex w-full items-center justify-between transition-all",{variants:{variant:{default:"text-foreground hover:text-primary",ghost:"text-foreground hover:bg-accent/10 rounded",outline:"text-foreground border border-border rounded-t-md hover:bg-accent/5"},size:{sm:"text-xs py-2 px-3",default:"text-sm py-3 px-4",md:"text-base py-4 px-4",lg:"text-lg py-5 px-5"}},defaultVariants:{variant:"default",size:"default"}}),eN=jC.forwardRef(({className:e,children:t,variant:r,size:o,asChild:n,...a},i)=>n?(0,ol.jsx)(nu,{ref:i,className:I("moonui-theme",JD({variant:r,size:o}),e),asChild:n,...a,children:t}):(0,ol.jsxs)(nu,{ref:i,className:I("moonui-theme",JD({variant:r,size:o}),e),...a,children:[t,(0,ol.jsx)(Bn,{className:"h-4 w-4 shrink-0 ml-auto transition-transform duration-200 [&[data-state=open]]:rotate-180"})]}));eN.displayName=nu.displayName;var G6=ee("overflow-hidden transition-all data-[state=closed]:animate-collapse-up data-[state=open]:animate-collapse-down",{variants:{variant:{default:"text-muted-foreground",ghost:"text-muted-foreground rounded-b",outline:"text-muted-foreground border border-t-0 border-border rounded-b-md"},size:{sm:"text-xs",default:"text-sm",md:"text-base",lg:"text-lg"}},defaultVariants:{variant:"default",size:"default"}}),tN=jC.forwardRef(({className:e,children:t,variant:r,size:o,...n},a)=>(0,ol.jsx)(Ld,{ref:a,className:I("moonui-theme",G6({variant:r,size:o}),e),...n,children:(0,ol.jsx)("div",{className:"p-4",children:t})}));tN.displayName=Ld.displayName;var zo=R(E());var nl=R(E());var ho=R(M()),j6=ee("group relative flex items-center w-full transition-colors",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),q6=ee(["w-full bg-background transition-all duration-200","text-foreground placeholder:text-muted-foreground dark:placeholder:text-gray-500","disabled:cursor-not-allowed disabled:opacity-50","file:border-0 file:bg-transparent file:font-medium","focus-visible:outline-none dark:text-gray-200"],{variants:{variant:{standard:"border border-gray-300 dark:border-gray-700 rounded-md px-3 py-2 hover:border-gray-400 dark:hover:border-gray-600 focus-visible:ring-2 focus-visible:ring-primary/30 dark:focus-visible:ring-primary/20 focus-visible:border-primary dark:focus-visible:border-primary/80 dark:bg-gray-800/80 dark:shadow-inner dark:shadow-gray-950/10",filled:"border border-transparent bg-gray-100 dark:bg-gray-800 rounded-md px-3 py-2 hover:bg-gray-200 dark:hover:bg-gray-700 focus-visible:ring-2 focus-visible:ring-primary/30 dark:focus-visible:ring-primary/20 dark:shadow-inner dark:shadow-gray-950/10",ghost:"border-none bg-transparent shadow-none px-1 dark:text-gray-300 dark:placeholder:text-gray-500 hover:bg-gray-100/50 dark:hover:bg-gray-800/30 focus-visible:bg-transparent",underline:"border-t-0 border-l-0 border-r-0 border-b border-gray-300 dark:border-gray-600 rounded-none px-0 py-2 hover:border-gray-400 dark:hover:border-gray-500 focus-visible:ring-0 focus-visible:border-b-2 focus-visible:border-primary dark:focus-visible:border-primary/80 dark:text-gray-300 dark:bg-transparent"},size:{sm:"h-8 text-xs",md:"h-10 text-sm",lg:"h-12 text-base"},hasLeftIcon:{true:"pl-10",false:""},hasRightIcon:{true:"pr-10",false:""},hasRightButton:{true:"pr-10",false:""},isError:{true:"border-error focus-visible:ring-error/30 focus-visible:border-error hover:border-error/80 dark:hover:border-error/80",false:""},isSuccess:{true:"border-success focus-visible:ring-success/30 focus-visible:border-success hover:border-success/80 dark:hover:border-success/80",false:""},isDisabled:{true:"opacity-50 cursor-not-allowed bg-gray-50 dark:bg-gray-800/50 pointer-events-none",false:""}},defaultVariants:{variant:"standard",size:"md",isError:!1,isSuccess:!1,isDisabled:!1,hasLeftIcon:!1,hasRightIcon:!1,hasRightButton:!1}}),mr=nl.forwardRef(({className:e,wrapperClassName:t,messageClassName:r,variant:o,size:n,isError:a,disabled:i,error:s,success:l,loading:u,leftIcon:c,rightIcon:d,rightButton:f,alwaysShowMessage:p=!1,label:h,floatingLabel:m=!1,floatingLabelClassName:x,value:v,defaultValue:g,onChange:y,onFocus:w,onBlur:C,placeholder:b,...S},L)=>{let[T,P]=nl.useState(!1),[A,_]=nl.useState(v||g||""),D=T||A!==""&&A!==null&&A!==void 0,W=Z=>{P(!0),w?.(Z)},N=Z=>{P(!1),C?.(Z)},z=Z=>{_(Z.target.value),y?.(Z)};nl.useEffect(()=>{v!==void 0&&_(v)},[v]);let V=p||s||l,k=s?"error":l?"success":"normal";return(0,ho.jsxs)("div",{className:"space-y-1.5 w-full",children:[(0,ho.jsxs)("div",{className:I("moonui-theme",j6({size:n}),t),children:[m&&h&&(0,ho.jsx)("label",{htmlFor:S.id,className:I("absolute transition-all duration-200 pointer-events-none",c||u?"left-10":"left-3","text-gray-500 dark:text-gray-400",D?"top-0 -translate-y-1/2 text-xs bg-background dark:bg-gray-800 px-1":"top-1/2 -translate-y-1/2 text-sm",T&&"text-primary dark:text-primary",!!s&&"text-error",i&&"opacity-50",x),children:h}),c&&(0,ho.jsx)("div",{className:"absolute left-3 text-gray-500 flex items-center justify-center pointer-events-none",children:u?(0,ho.jsx)(Nt,{className:"h-4 w-4 animate-spin"}):c}),(0,ho.jsx)("input",{className:I(q6({variant:o,size:n,isError:!!s||a,isSuccess:!!l,isDisabled:i||u,hasLeftIcon:!!c||u,hasRightIcon:!!d,hasRightButton:!!f}),e),ref:L,disabled:i||u,"data-loading":u?"":void 0,"data-error":s?"":void 0,"data-success":l?"":void 0,"aria-invalid":!!s||!!a||void 0,"aria-describedby":s?`${S.id||""}-error`:l?`${S.id||""}-success`:void 0,value:v,defaultValue:g,onChange:z,onFocus:W,onBlur:N,placeholder:m?D?b:"":b,...S}),d&&!u&&(0,ho.jsx)("div",{className:"absolute right-3 text-gray-500 flex items-center justify-center pointer-events-none",children:d}),f&&(0,ho.jsx)("div",{className:"absolute right-3",children:f}),u&&!c&&(0,ho.jsx)("div",{className:"absolute left-3 text-gray-500 flex items-center justify-center pointer-events-none",children:(0,ho.jsx)(Nt,{className:"h-4 w-4 animate-spin","aria-hidden":"true"})})]}),V&&(0,ho.jsx)("p",{className:I("text-xs transition-all",k==="error"&&"text-error",k==="success"&&"text-success",k==="normal"&&"text-muted-foreground",r),id:s?`${S.id||""}-error`:l?`${S.id||""}-success`:void 0,children:s||l||""})]})});mr.displayName="Input";var aN=R(E());var rN=R(E(),1);var oN=R(M(),1),$6="Label",nN=rN.forwardRef((e,t)=>(0,oN.jsx)($.label,{...e,ref:t,onMouseDown:r=>{r.target.closest("button, input, select, textarea")||(e.onMouseDown?.(r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));nN.displayName=$6;var qC=nN;var iN=R(M()),X6=ee("text-sm font-medium leading-none text-gray-900 dark:text-gray-200 peer-disabled:cursor-not-allowed peer-disabled:opacity-70 dark:peer-disabled:opacity-60 transition-colors duration-200"),Qr=aN.forwardRef(({className:e,...t},r)=>(0,iN.jsx)(qC,{ref:r,className:I(X6(),e),...t}));Qr.displayName=qC.displayName;var g_=R(E());var lt=R(E(),1);var gt=R(E(),1);var sN=R(E(),1);function lN(e,t=globalThis?.document){let r=et(e);sN.useEffect(()=>{let o=n=>{n.key==="Escape"&&r(n)};return t.addEventListener("keydown",o,{capture:!0}),()=>t.removeEventListener("keydown",o,{capture:!0})},[r,t])}var KC=R(M(),1),Y6="DismissableLayer",$C="dismissableLayer.update",Q6="dismissableLayer.pointerDownOutside",Z6="dismissableLayer.focusOutside",uN,dN=gt.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Fo=gt.forwardRef((e,t)=>{let{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:n,onFocusOutside:a,onInteractOutside:i,onDismiss:s,...l}=e,u=gt.useContext(dN),[c,d]=gt.useState(null),f=c?.ownerDocument??globalThis?.document,[,p]=gt.useState({}),h=ne(t,S=>d(S)),m=Array.from(u.layers),[x]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=m.indexOf(x),g=c?m.indexOf(c):-1,y=u.layersWithOutsidePointerEventsDisabled.size>0,w=g>=v,C=e$(S=>{let L=S.target,T=[...u.branches].some(P=>P.contains(L));!w||T||(n?.(S),i?.(S),S.defaultPrevented||s?.())},f),b=t$(S=>{let L=S.target;[...u.branches].some(P=>P.contains(L))||(a?.(S),i?.(S),S.defaultPrevented||s?.())},f);return lN(S=>{g===u.layers.size-1&&(o?.(S),!S.defaultPrevented&&s&&(S.preventDefault(),s()))},f),gt.useEffect(()=>{if(c)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(uN=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(c)),u.layers.add(c),cN(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=uN)}},[c,f,r,u]),gt.useEffect(()=>()=>{c&&(u.layers.delete(c),u.layersWithOutsidePointerEventsDisabled.delete(c),cN())},[c,u]),gt.useEffect(()=>{let S=()=>p({});return document.addEventListener($C,S),()=>document.removeEventListener($C,S)},[]),(0,KC.jsx)($.div,{...l,ref:h,style:{pointerEvents:y?w?"auto":"none":void 0,...e.style},onFocusCapture:H(e.onFocusCapture,b.onFocusCapture),onBlurCapture:H(e.onBlurCapture,b.onBlurCapture),onPointerDownCapture:H(e.onPointerDownCapture,C.onPointerDownCapture)})});Fo.displayName=Y6;var J6="DismissableLayerBranch",fN=gt.forwardRef((e,t)=>{let r=gt.useContext(dN),o=gt.useRef(null),n=ne(t,o);return gt.useEffect(()=>{let a=o.current;if(a)return r.branches.add(a),()=>{r.branches.delete(a)}},[r.branches]),(0,KC.jsx)($.div,{...e,ref:n})});fN.displayName=J6;function e$(e,t=globalThis?.document){let r=et(e),o=gt.useRef(!1),n=gt.useRef(()=>{});return gt.useEffect(()=>{let a=s=>{if(s.target&&!o.current){let u=function(){pN(Q6,r,c,{discrete:!0})};var l=u;let c={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",n.current),n.current=u,t.addEventListener("click",n.current,{once:!0})):u()}else t.removeEventListener("click",n.current);o.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",a),t.removeEventListener("click",n.current)}},[t,r]),{onPointerDownCapture:()=>o.current=!0}}function t$(e,t=globalThis?.document){let r=et(e),o=gt.useRef(!1);return gt.useEffect(()=>{let n=a=>{a.target&&!o.current&&pN(Z6,r,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",n),()=>t.removeEventListener("focusin",n)},[t,r]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function cN(){let e=new CustomEvent($C);document.dispatchEvent(e)}function pN(e,t,r,{discrete:o}){let n=r.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&n.addEventListener(e,t,{once:!0}),o?ou(n,a):n.dispatchEvent(a)}var mN=Fo,gN=fN;var vN=R(E(),1),XC=0;function Vi(){vN.useEffect(()=>{let e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??hN()),document.body.insertAdjacentElement("beforeend",e[1]??hN()),XC++,()=>{XC===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),XC--}},[])}function hN(){let 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 Vo=R(E(),1);var SN=R(M(),1),YC="focusScope.autoFocusOnMount",QC="focusScope.autoFocusOnUnmount",yN={bubbles:!1,cancelable:!0},o$="FocusScope",Ea=Vo.forwardRef((e,t)=>{let{loop:r=!1,trapped:o=!1,onMountAutoFocus:n,onUnmountAutoFocus:a,...i}=e,[s,l]=Vo.useState(null),u=et(n),c=et(a),d=Vo.useRef(null),f=ne(t,m=>l(m)),p=Vo.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;Vo.useEffect(()=>{if(o){let g=function(b){if(p.paused||!s)return;let S=b.target;s.contains(S)?d.current=S:Bi(d.current,{select:!0})},y=function(b){if(p.paused||!s)return;let S=b.relatedTarget;S!==null&&(s.contains(S)||Bi(d.current,{select:!0}))},w=function(b){if(document.activeElement===document.body)for(let L of b)L.removedNodes.length>0&&Bi(s)};var m=g,x=y,v=w;document.addEventListener("focusin",g),document.addEventListener("focusout",y);let C=new MutationObserver(w);return s&&C.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",y),C.disconnect()}}},[o,s,p.paused]),Vo.useEffect(()=>{if(s){wN.add(p);let m=document.activeElement;if(!s.contains(m)){let v=new CustomEvent(YC,yN);s.addEventListener(YC,u),s.dispatchEvent(v),v.defaultPrevented||(n$(u$(bN(s)),{select:!0}),document.activeElement===m&&Bi(s))}return()=>{s.removeEventListener(YC,u),setTimeout(()=>{let v=new CustomEvent(QC,yN);s.addEventListener(QC,c),s.dispatchEvent(v),v.defaultPrevented||Bi(m??document.body,{select:!0}),s.removeEventListener(QC,c),wN.remove(p)},0)}}},[s,u,c,p]);let h=Vo.useCallback(m=>{if(!r&&!o||p.paused)return;let x=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,v=document.activeElement;if(x&&v){let g=m.currentTarget,[y,w]=a$(g);y&&w?!m.shiftKey&&v===w?(m.preventDefault(),r&&Bi(y,{select:!0})):m.shiftKey&&v===y&&(m.preventDefault(),r&&Bi(w,{select:!0})):v===g&&m.preventDefault()}},[r,o,p.paused]);return(0,SN.jsx)($.div,{tabIndex:-1,...i,ref:f,onKeyDown:h})});Ea.displayName=o$;function n$(e,{select:t=!1}={}){let r=document.activeElement;for(let o of e)if(Bi(o,{select:t}),document.activeElement!==r)return}function a$(e){let t=bN(e),r=xN(t,e),o=xN(t.reverse(),e);return[r,o]}function bN(e){let t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{let n=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||n?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function xN(e,t){for(let r of e)if(!i$(r,{upTo:t}))return r}function i$(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 s$(e){return e instanceof HTMLInputElement&&"select"in e}function Bi(e,{select:t=!1}={}){if(e&&e.focus){let r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&s$(e)&&t&&e.select()}}var wN=l$();function l$(){let e=[];return{add(t){let r=e[0];t!==r&&r?.pause(),e=CN(e,t),e.unshift(t)},remove(t){e=CN(e,t),e[0]?.resume()}}}function CN(e,t){let r=[...e],o=r.indexOf(t);return o!==-1&&r.splice(o,1),r}function u$(e){return e.filter(t=>t.tagName!=="A")}var Jr=R(E(),1);var IN=["top","right","bottom","left"];var $n=Math.min,Er=Math.max,ep=Math.round,tp=Math.floor,yn=e=>({x:e,y:e}),c$={left:"right",right:"left",bottom:"top",top:"bottom"},d$={start:"end",end:"start"};function nv(e,t,r){return Er(e,$n(t,r))}function Kn(e,t){return typeof e=="function"?e(t):e}function Xn(e){return e.split("-")[0]}function al(e){return e.split("-")[1]}function av(e){return e==="x"?"y":"x"}function iv(e){return e==="y"?"height":"width"}var f$=new Set(["top","bottom"]);function xn(e){return f$.has(Xn(e))?"y":"x"}function sv(e){return av(xn(e))}function PN(e,t,r){r===void 0&&(r=!1);let o=al(e),n=sv(e),a=iv(n),i=n==="x"?o===(r?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=Jf(i)),[i,Jf(i)]}function TN(e){let t=Jf(e);return[ov(e),t,ov(t)]}function ov(e){return e.replace(/start|end/g,t=>d$[t])}var RN=["left","right"],LN=["right","left"],p$=["top","bottom"],m$=["bottom","top"];function g$(e,t,r){switch(e){case"top":case"bottom":return r?t?LN:RN:t?RN:LN;case"left":case"right":return t?p$:m$;default:return[]}}function kN(e,t,r,o){let n=al(e),a=g$(Xn(e),r==="start",o);return n&&(a=a.map(i=>i+"-"+n),t&&(a=a.concat(a.map(ov)))),a}function Jf(e){return e.replace(/left|right|bottom|top/g,t=>c$[t])}function h$(e){return{top:0,right:0,bottom:0,left:0,...e}}function ZC(e){return typeof e!="number"?h$(e):{top:e,right:e,bottom:e,left:e}}function il(e){let{x:t,y:r,width:o,height:n}=e;return{width:o,height:n,top:r,left:t,right:t+o,bottom:r+n,x:t,y:r}}function MN(e,t,r){let{reference:o,floating:n}=e,a=xn(t),i=sv(t),s=iv(i),l=Xn(t),u=a==="y",c=o.x+o.width/2-n.width/2,d=o.y+o.height/2-n.height/2,f=o[s]/2-n[s]/2,p;switch(l){case"top":p={x:c,y:o.y-n.height};break;case"bottom":p={x:c,y:o.y+o.height};break;case"right":p={x:o.x+o.width,y:d};break;case"left":p={x:o.x-n.width,y:d};break;default:p={x:o.x,y:o.y}}switch(al(t)){case"start":p[i]-=f*(r&&u?-1:1);break;case"end":p[i]+=f*(r&&u?-1:1);break}return p}var DN=async(e,t,r)=>{let{placement:o="bottom",strategy:n="absolute",middleware:a=[],platform:i}=r,s=a.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(t)),u=await i.getElementRects({reference:e,floating:t,strategy:n}),{x:c,y:d}=MN(u,o,l),f=o,p={},h=0;for(let m=0;m<s.length;m++){let{name:x,fn:v}=s[m],{x:g,y,data:w,reset:C}=await v({x:c,y:d,initialPlacement:o,placement:f,strategy:n,middlewareData:p,rects:u,platform:i,elements:{reference:e,floating:t}});c=g??c,d=y??d,p={...p,[x]:{...p[x],...w}},C&&h<=50&&(h++,typeof C=="object"&&(C.placement&&(f=C.placement),C.rects&&(u=C.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:n}):C.rects),{x:c,y:d}=MN(u,f,l)),m=-1)}return{x:c,y:d,placement:f,strategy:n,middlewareData:p}};async function oc(e,t){var r;t===void 0&&(t={});let{x:o,y:n,platform:a,rects:i,elements:s,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=Kn(t,e),h=ZC(p),x=s[f?d==="floating"?"reference":"floating":d],v=il(await a.getClippingRect({element:(r=await(a.isElement==null?void 0:a.isElement(x)))==null||r?x:x.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(s.floating)),boundary:u,rootBoundary:c,strategy:l})),g=d==="floating"?{x:o,y:n,width:i.floating.width,height:i.floating.height}:i.reference,y=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating)),w=await(a.isElement==null?void 0:a.isElement(y))?await(a.getScale==null?void 0:a.getScale(y))||{x:1,y:1}:{x:1,y:1},C=il(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:g,offsetParent:y,strategy:l}):g);return{top:(v.top-C.top+h.top)/w.y,bottom:(C.bottom-v.bottom+h.bottom)/w.y,left:(v.left-C.left+h.left)/w.x,right:(C.right-v.right+h.right)/w.x}}var NN=e=>({name:"arrow",options:e,async fn(t){let{x:r,y:o,placement:n,rects:a,platform:i,elements:s,middlewareData:l}=t,{element:u,padding:c=0}=Kn(e,t)||{};if(u==null)return{};let d=ZC(c),f={x:r,y:o},p=sv(n),h=iv(p),m=await i.getDimensions(u),x=p==="y",v=x?"top":"left",g=x?"bottom":"right",y=x?"clientHeight":"clientWidth",w=a.reference[h]+a.reference[p]-f[p]-a.floating[h],C=f[p]-a.reference[p],b=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u)),S=b?b[y]:0;(!S||!await(i.isElement==null?void 0:i.isElement(b)))&&(S=s.floating[y]||a.floating[h]);let L=w/2-C/2,T=S/2-m[h]/2-1,P=$n(d[v],T),A=$n(d[g],T),_=P,G=S-m[h]-A,D=S/2-m[h]/2+L,W=nv(_,D,G),N=!l.arrow&&al(n)!=null&&D!==W&&a.reference[h]/2-(D<_?P:A)-m[h]/2<0,z=N?D<_?D-_:D-G:0;return{[p]:f[p]+z,data:{[p]:W,centerOffset:D-W-z,...N&&{alignmentOffset:z}},reset:N}}});var _N=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,o;let{placement:n,middlewareData:a,rects:i,initialPlacement:s,platform:l,elements:u}=t,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:m=!0,...x}=Kn(e,t);if((r=a.arrow)!=null&&r.alignmentOffset)return{};let v=Xn(n),g=xn(s),y=Xn(s)===s,w=await(l.isRTL==null?void 0:l.isRTL(u.floating)),C=f||(y||!m?[Jf(s)]:TN(s)),b=h!=="none";!f&&b&&C.push(...kN(s,m,h,w));let S=[s,...C],L=await oc(t,x),T=[],P=((o=a.flip)==null?void 0:o.overflows)||[];if(c&&T.push(L[v]),d){let D=PN(n,i,w);T.push(L[D[0]],L[D[1]])}if(P=[...P,{placement:n,overflows:T}],!T.every(D=>D<=0)){var A,_;let D=(((A=a.flip)==null?void 0:A.index)||0)+1,W=S[D];if(W&&(!(d==="alignment"?g!==xn(W):!1)||P.every(V=>xn(V.placement)===g?V.overflows[0]>0:!0)))return{data:{index:D,overflows:P},reset:{placement:W}};let N=(_=P.filter(z=>z.overflows[0]<=0).sort((z,V)=>z.overflows[1]-V.overflows[1])[0])==null?void 0:_.placement;if(!N)switch(p){case"bestFit":{var G;let z=(G=P.filter(V=>{if(b){let k=xn(V.placement);return k===g||k==="y"}return!0}).map(V=>[V.placement,V.overflows.filter(k=>k>0).reduce((k,Z)=>k+Z,0)]).sort((V,k)=>V[1]-k[1])[0])==null?void 0:G[0];z&&(N=z);break}case"initialPlacement":N=s;break}if(n!==N)return{reset:{placement:N}}}return{}}}};function EN(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function AN(e){return IN.some(t=>e[t]>=0)}var ON=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){let{rects:r}=t,{strategy:o="referenceHidden",...n}=Kn(e,t);switch(o){case"referenceHidden":{let a=await oc(t,{...n,elementContext:"reference"}),i=EN(a,r.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:AN(i)}}}case"escaped":{let a=await oc(t,{...n,altBoundary:!0}),i=EN(a,r.floating);return{data:{escapedOffsets:i,escaped:AN(i)}}}default:return{}}}}};var FN=new Set(["left","top"]);async function v$(e,t){let{placement:r,platform:o,elements:n}=e,a=await(o.isRTL==null?void 0:o.isRTL(n.floating)),i=Xn(r),s=al(r),l=xn(r)==="y",u=FN.has(i)?-1:1,c=a&&l?-1:1,d=Kn(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:h}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof h=="number"&&(p=s==="end"?h*-1:h),l?{x:p*c,y:f*u}:{x:f*u,y:p*c}}var VN=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,o;let{x:n,y:a,placement:i,middlewareData:s}=t,l=await v$(t,e);return i===((r=s.offset)==null?void 0:r.placement)&&(o=s.arrow)!=null&&o.alignmentOffset?{}:{x:n+l.x,y:a+l.y,data:{...l,placement:i}}}}},BN=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:r,y:o,placement:n}=t,{mainAxis:a=!0,crossAxis:i=!1,limiter:s={fn:x=>{let{x:v,y:g}=x;return{x:v,y:g}}},...l}=Kn(e,t),u={x:r,y:o},c=await oc(t,l),d=xn(Xn(n)),f=av(d),p=u[f],h=u[d];if(a){let x=f==="y"?"top":"left",v=f==="y"?"bottom":"right",g=p+c[x],y=p-c[v];p=nv(g,p,y)}if(i){let x=d==="y"?"top":"left",v=d==="y"?"bottom":"right",g=h+c[x],y=h-c[v];h=nv(g,h,y)}let m=s.fn({...t,[f]:p,[d]:h});return{...m,data:{x:m.x-r,y:m.y-o,enabled:{[f]:a,[d]:i}}}}}},HN=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:r,y:o,placement:n,rects:a,middlewareData:i}=t,{offset:s=0,mainAxis:l=!0,crossAxis:u=!0}=Kn(e,t),c={x:r,y:o},d=xn(n),f=av(d),p=c[f],h=c[d],m=Kn(s,t),x=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){let y=f==="y"?"height":"width",w=a.reference[f]-a.floating[y]+x.mainAxis,C=a.reference[f]+a.reference[y]-x.mainAxis;p<w?p=w:p>C&&(p=C)}if(u){var v,g;let y=f==="y"?"width":"height",w=FN.has(Xn(n)),C=a.reference[d]-a.floating[y]+(w&&((v=i.offset)==null?void 0:v[d])||0)+(w?0:x.crossAxis),b=a.reference[d]+a.reference[y]+(w?0:((g=i.offset)==null?void 0:g[d])||0)-(w?x.crossAxis:0);h<C?h=C:h>b&&(h=b)}return{[f]:p,[d]:h}}}},UN=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,o;let{placement:n,rects:a,platform:i,elements:s}=t,{apply:l=()=>{},...u}=Kn(e,t),c=await oc(t,u),d=Xn(n),f=al(n),p=xn(n)==="y",{width:h,height:m}=a.floating,x,v;d==="top"||d==="bottom"?(x=d,v=f===(await(i.isRTL==null?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(v=d,x=f==="end"?"top":"bottom");let g=m-c.top-c.bottom,y=h-c.left-c.right,w=$n(m-c[x],g),C=$n(h-c[v],y),b=!t.middlewareData.shift,S=w,L=C;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(L=y),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(S=g),b&&!f){let P=Er(c.left,0),A=Er(c.right,0),_=Er(c.top,0),G=Er(c.bottom,0);p?L=h-2*(P!==0||A!==0?P+A:Er(c.left,c.right)):S=m-2*(_!==0||G!==0?_+G:Er(c.top,c.bottom))}await l({...t,availableWidth:L,availableHeight:S});let T=await i.getDimensions(s.floating);return h!==T.width||m!==T.height?{reset:{rects:!0}}:{}}}};function lv(){return typeof window<"u"}function ll(e){return WN(e)?(e.nodeName||"").toLowerCase():"#document"}function Zr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function wn(e){var t;return(t=(WN(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function WN(e){return lv()?e instanceof Node||e instanceof Zr(e).Node:!1}function Bo(e){return lv()?e instanceof Element||e instanceof Zr(e).Element:!1}function Cn(e){return lv()?e instanceof HTMLElement||e instanceof Zr(e).HTMLElement:!1}function zN(e){return!lv()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Zr(e).ShadowRoot}var y$=new Set(["inline","contents"]);function nc(e){let{overflow:t,overflowX:r,overflowY:o,display:n}=Ho(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+r)&&!y$.has(n)}var x$=new Set(["table","td","th"]);function GN(e){return x$.has(ll(e))}var w$=[":popover-open",":modal"];function rp(e){return w$.some(t=>{try{return e.matches(t)}catch{return!1}})}var C$=["transform","translate","scale","rotate","perspective"],S$=["transform","translate","scale","rotate","perspective","filter"],b$=["paint","layout","strict","content"];function uv(e){let t=cv(),r=Bo(e)?Ho(e):e;return C$.some(o=>r[o]?r[o]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||S$.some(o=>(r.willChange||"").includes(o))||b$.some(o=>(r.contain||"").includes(o))}function jN(e){let t=Aa(e);for(;Cn(t)&&!ul(t);){if(uv(t))return t;if(rp(t))return null;t=Aa(t)}return null}function cv(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}var R$=new Set(["html","body","#document"]);function ul(e){return R$.has(ll(e))}function Ho(e){return Zr(e).getComputedStyle(e)}function op(e){return Bo(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Aa(e){if(ll(e)==="html")return e;let t=e.assignedSlot||e.parentNode||zN(e)&&e.host||wn(e);return zN(t)?t.host:t}function qN(e){let t=Aa(e);return ul(t)?e.ownerDocument?e.ownerDocument.body:e.body:Cn(t)&&nc(t)?t:qN(t)}function sl(e,t,r){var o;t===void 0&&(t=[]),r===void 0&&(r=!0);let n=qN(e),a=n===((o=e.ownerDocument)==null?void 0:o.body),i=Zr(n);if(a){let s=dv(i);return t.concat(i,i.visualViewport||[],nc(n)?n:[],s&&r?sl(s):[])}return t.concat(n,sl(n,[],r))}function dv(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function XN(e){let t=Ho(e),r=parseFloat(t.width)||0,o=parseFloat(t.height)||0,n=Cn(e),a=n?e.offsetWidth:r,i=n?e.offsetHeight:o,s=ep(r)!==a||ep(o)!==i;return s&&(r=a,o=i),{width:r,height:o,$:s}}function eS(e){return Bo(e)?e:e.contextElement}function ac(e){let t=eS(e);if(!Cn(t))return yn(1);let r=t.getBoundingClientRect(),{width:o,height:n,$:a}=XN(t),i=(a?ep(r.width):r.width)/o,s=(a?ep(r.height):r.height)/n;return(!i||!Number.isFinite(i))&&(i=1),(!s||!Number.isFinite(s))&&(s=1),{x:i,y:s}}var L$=yn(0);function YN(e){let t=Zr(e);return!cv()||!t.visualViewport?L$:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function I$(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==Zr(e)?!1:t}function cl(e,t,r,o){t===void 0&&(t=!1),r===void 0&&(r=!1);let n=e.getBoundingClientRect(),a=eS(e),i=yn(1);t&&(o?Bo(o)&&(i=ac(o)):i=ac(e));let s=I$(a,r,o)?YN(a):yn(0),l=(n.left+s.x)/i.x,u=(n.top+s.y)/i.y,c=n.width/i.x,d=n.height/i.y;if(a){let f=Zr(a),p=o&&Bo(o)?Zr(o):o,h=f,m=dv(h);for(;m&&o&&p!==h;){let x=ac(m),v=m.getBoundingClientRect(),g=Ho(m),y=v.left+(m.clientLeft+parseFloat(g.paddingLeft))*x.x,w=v.top+(m.clientTop+parseFloat(g.paddingTop))*x.y;l*=x.x,u*=x.y,c*=x.x,d*=x.y,l+=y,u+=w,h=Zr(m),m=dv(h)}}return il({width:c,height:d,x:l,y:u})}function tS(e,t){let r=op(e).scrollLeft;return t?t.left+r:cl(wn(e)).left+r}function QN(e,t,r){r===void 0&&(r=!1);let o=e.getBoundingClientRect(),n=o.left+t.scrollLeft-(r?0:tS(e,o)),a=o.top+t.scrollTop;return{x:n,y:a}}function P$(e){let{elements:t,rect:r,offsetParent:o,strategy:n}=e,a=n==="fixed",i=wn(o),s=t?rp(t.floating):!1;if(o===i||s&&a)return r;let l={scrollLeft:0,scrollTop:0},u=yn(1),c=yn(0),d=Cn(o);if((d||!d&&!a)&&((ll(o)!=="body"||nc(i))&&(l=op(o)),Cn(o))){let p=cl(o);u=ac(o),c.x=p.x+o.clientLeft,c.y=p.y+o.clientTop}let f=i&&!d&&!a?QN(i,l,!0):yn(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-l.scrollLeft*u.x+c.x+f.x,y:r.y*u.y-l.scrollTop*u.y+c.y+f.y}}function T$(e){return Array.from(e.getClientRects())}function k$(e){let t=wn(e),r=op(e),o=e.ownerDocument.body,n=Er(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),a=Er(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight),i=-r.scrollLeft+tS(e),s=-r.scrollTop;return Ho(o).direction==="rtl"&&(i+=Er(t.clientWidth,o.clientWidth)-n),{width:n,height:a,x:i,y:s}}function M$(e,t){let r=Zr(e),o=wn(e),n=r.visualViewport,a=o.clientWidth,i=o.clientHeight,s=0,l=0;if(n){a=n.width,i=n.height;let u=cv();(!u||u&&t==="fixed")&&(s=n.offsetLeft,l=n.offsetTop)}return{width:a,height:i,x:s,y:l}}var E$=new Set(["absolute","fixed"]);function A$(e,t){let r=cl(e,!0,t==="fixed"),o=r.top+e.clientTop,n=r.left+e.clientLeft,a=Cn(e)?ac(e):yn(1),i=e.clientWidth*a.x,s=e.clientHeight*a.y,l=n*a.x,u=o*a.y;return{width:i,height:s,x:l,y:u}}function $N(e,t,r){let o;if(t==="viewport")o=M$(e,r);else if(t==="document")o=k$(wn(e));else if(Bo(t))o=A$(t,r);else{let n=YN(e);o={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return il(o)}function ZN(e,t){let r=Aa(e);return r===t||!Bo(r)||ul(r)?!1:Ho(r).position==="fixed"||ZN(r,t)}function D$(e,t){let r=t.get(e);if(r)return r;let o=sl(e,[],!1).filter(s=>Bo(s)&&ll(s)!=="body"),n=null,a=Ho(e).position==="fixed",i=a?Aa(e):e;for(;Bo(i)&&!ul(i);){let s=Ho(i),l=uv(i);!l&&s.position==="fixed"&&(n=null),(a?!l&&!n:!l&&s.position==="static"&&!!n&&E$.has(n.position)||nc(i)&&!l&&ZN(e,i))?o=o.filter(c=>c!==i):n=s,i=Aa(i)}return t.set(e,o),o}function N$(e){let{element:t,boundary:r,rootBoundary:o,strategy:n}=e,i=[...r==="clippingAncestors"?rp(t)?[]:D$(t,this._c):[].concat(r),o],s=i[0],l=i.reduce((u,c)=>{let d=$N(t,c,n);return u.top=Er(d.top,u.top),u.right=$n(d.right,u.right),u.bottom=$n(d.bottom,u.bottom),u.left=Er(d.left,u.left),u},$N(t,s,n));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function _$(e){let{width:t,height:r}=XN(e);return{width:t,height:r}}function O$(e,t,r){let o=Cn(t),n=wn(t),a=r==="fixed",i=cl(e,!0,a,t),s={scrollLeft:0,scrollTop:0},l=yn(0);function u(){l.x=tS(n)}if(o||!o&&!a)if((ll(t)!=="body"||nc(n))&&(s=op(t)),o){let p=cl(t,!0,a,t);l.x=p.x+t.clientLeft,l.y=p.y+t.clientTop}else n&&u();a&&!o&&n&&u();let c=n&&!o&&!a?QN(n,s):yn(0),d=i.left+s.scrollLeft-l.x-c.x,f=i.top+s.scrollTop-l.y-c.y;return{x:d,y:f,width:i.width,height:i.height}}function JC(e){return Ho(e).position==="static"}function KN(e,t){if(!Cn(e)||Ho(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return wn(e)===r&&(r=r.ownerDocument.body),r}function JN(e,t){let r=Zr(e);if(rp(e))return r;if(!Cn(e)){let n=Aa(e);for(;n&&!ul(n);){if(Bo(n)&&!JC(n))return n;n=Aa(n)}return r}let o=KN(e,t);for(;o&&GN(o)&&JC(o);)o=KN(o,t);return o&&ul(o)&&JC(o)&&!uv(o)?r:o||jN(e)||r}var F$=async function(e){let t=this.getOffsetParent||JN,r=this.getDimensions,o=await r(e.floating);return{reference:O$(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function V$(e){return Ho(e).direction==="rtl"}var e2={convertOffsetParentRelativeRectToViewportRelativeRect:P$,getDocumentElement:wn,getClippingRect:N$,getOffsetParent:JN,getElementRects:F$,getClientRects:T$,getDimensions:_$,getScale:ac,isElement:Bo,isRTL:V$};function t2(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function B$(e,t){let r=null,o,n=wn(e);function a(){var s;clearTimeout(o),(s=r)==null||s.disconnect(),r=null}function i(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),a();let u=e.getBoundingClientRect(),{left:c,top:d,width:f,height:p}=u;if(s||t(),!f||!p)return;let h=tp(d),m=tp(n.clientWidth-(c+f)),x=tp(n.clientHeight-(d+p)),v=tp(c),y={rootMargin:-h+"px "+-m+"px "+-x+"px "+-v+"px",threshold:Er(0,$n(1,l))||1},w=!0;function C(b){let S=b[0].intersectionRatio;if(S!==l){if(!w)return i();S?i(!1,S):o=setTimeout(()=>{i(!1,1e-7)},1e3)}S===1&&!t2(u,e.getBoundingClientRect())&&i(),w=!1}try{r=new IntersectionObserver(C,{...y,root:n.ownerDocument})}catch{r=new IntersectionObserver(C,y)}r.observe(e)}return i(!0),a}function rS(e,t,r,o){o===void 0&&(o={});let{ancestorScroll:n=!0,ancestorResize:a=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=o,u=eS(e),c=n||a?[...u?sl(u):[],...sl(t)]:[];c.forEach(v=>{n&&v.addEventListener("scroll",r,{passive:!0}),a&&v.addEventListener("resize",r)});let d=u&&s?B$(u,r):null,f=-1,p=null;i&&(p=new ResizeObserver(v=>{let[g]=v;g&&g.target===u&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var y;(y=p)==null||y.observe(t)})),r()}),u&&!l&&p.observe(u),p.observe(t));let h,m=l?cl(e):null;l&&x();function x(){let v=cl(e);m&&!t2(m,v)&&r(),m=v,h=requestAnimationFrame(x)}return r(),()=>{var v;c.forEach(g=>{n&&g.removeEventListener("scroll",r),a&&g.removeEventListener("resize",r)}),d?.(),(v=p)==null||v.disconnect(),p=null,l&&cancelAnimationFrame(h)}}var r2=VN;var o2=BN,n2=_N,a2=UN,i2=ON,oS=NN;var s2=HN,nS=(e,t,r)=>{let o=new Map,n={platform:e2,...r},a={...n.platform,_c:o};return DN(e,t,{...n,platform:a})};var It=R(E(),1),u2=R(E(),1),c2=R(ru(),1),H$=typeof document<"u",U$=function(){},fv=H$?u2.useLayoutEffect:U$;function pv(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 r,o,n;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(o=r;o--!==0;)if(!pv(e[o],t[o]))return!1;return!0}if(n=Object.keys(e),r=n.length,r!==Object.keys(t).length)return!1;for(o=r;o--!==0;)if(!{}.hasOwnProperty.call(t,n[o]))return!1;for(o=r;o--!==0;){let a=n[o];if(!(a==="_owner"&&e.$$typeof)&&!pv(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function d2(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function l2(e,t){let r=d2(e);return Math.round(t*r)/r}function aS(e){let t=It.useRef(e);return fv(()=>{t.current=e}),t}function f2(e){e===void 0&&(e={});let{placement:t="bottom",strategy:r="absolute",middleware:o=[],platform:n,elements:{reference:a,floating:i}={},transform:s=!0,whileElementsMounted:l,open:u}=e,[c,d]=It.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=It.useState(o);pv(f,o)||p(o);let[h,m]=It.useState(null),[x,v]=It.useState(null),g=It.useCallback(V=>{V!==b.current&&(b.current=V,m(V))},[]),y=It.useCallback(V=>{V!==S.current&&(S.current=V,v(V))},[]),w=a||h,C=i||x,b=It.useRef(null),S=It.useRef(null),L=It.useRef(c),T=l!=null,P=aS(l),A=aS(n),_=aS(u),G=It.useCallback(()=>{if(!b.current||!S.current)return;let V={placement:t,strategy:r,middleware:f};A.current&&(V.platform=A.current),nS(b.current,S.current,V).then(k=>{let Z={...k,isPositioned:_.current!==!1};D.current&&!pv(L.current,Z)&&(L.current=Z,c2.flushSync(()=>{d(Z)}))})},[f,t,r,A,_]);fv(()=>{u===!1&&L.current.isPositioned&&(L.current.isPositioned=!1,d(V=>({...V,isPositioned:!1})))},[u]);let D=It.useRef(!1);fv(()=>(D.current=!0,()=>{D.current=!1}),[]),fv(()=>{if(w&&(b.current=w),C&&(S.current=C),w&&C){if(P.current)return P.current(w,C,G);G()}},[w,C,G,P,T]);let W=It.useMemo(()=>({reference:b,floating:S,setReference:g,setFloating:y}),[g,y]),N=It.useMemo(()=>({reference:w,floating:C}),[w,C]),z=It.useMemo(()=>{let V={position:r,left:0,top:0};if(!N.floating)return V;let k=l2(N.floating,c.x),Z=l2(N.floating,c.y);return s?{...V,transform:"translate("+k+"px, "+Z+"px)",...d2(N.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:k,top:Z}},[r,s,N.floating,c.x,c.y]);return It.useMemo(()=>({...c,update:G,refs:W,elements:N,floatingStyles:z}),[c,G,W,N,z])}var z$=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){let{element:o,padding:n}=typeof e=="function"?e(r):e;return o&&t(o)?o.current!=null?oS({element:o.current,padding:n}).fn(r):{}:o?oS({element:o,padding:n}).fn(r):{}}}},p2=(e,t)=>({...r2(e),options:[e,t]}),m2=(e,t)=>({...o2(e),options:[e,t]}),g2=(e,t)=>({...s2(e),options:[e,t]}),h2=(e,t)=>({...n2(e),options:[e,t]}),v2=(e,t)=>({...a2(e),options:[e,t]});var y2=(e,t)=>({...i2(e),options:[e,t]});var x2=(e,t)=>({...z$(e),options:[e,t]});var w2=R(E(),1);var iS=R(M(),1),W$="Arrow",C2=w2.forwardRef((e,t)=>{let{children:r,width:o=10,height:n=5,...a}=e;return(0,iS.jsx)($.svg,{...a,ref:t,width:o,height:n,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:(0,iS.jsx)("polygon",{points:"0,0 30,0 15,10"})})});C2.displayName=W$;var S2=C2;var Hi=R(M(),1);var sS="Popper",[b2,Uo]=Te(sS),[j$,R2]=b2(sS),L2=e=>{let{__scopePopper:t,children:r}=e,[o,n]=Jr.useState(null);return(0,Hi.jsx)(j$,{scope:t,anchor:o,onAnchorChange:n,children:r})};L2.displayName=sS;var I2="PopperAnchor",P2=Jr.forwardRef((e,t)=>{let{__scopePopper:r,virtualRef:o,...n}=e,a=R2(I2,r),i=Jr.useRef(null),s=ne(t,i),l=Jr.useRef(null);return Jr.useEffect(()=>{let u=l.current;l.current=o?.current||i.current,u!==l.current&&a.onAnchorChange(l.current)}),o?null:(0,Hi.jsx)($.div,{...n,ref:s})});P2.displayName=I2;var lS="PopperContent",[q$,$$]=b2(lS),T2=Jr.forwardRef((e,t)=>{let{__scopePopper:r,side:o="bottom",sideOffset:n=0,align:a="center",alignOffset:i=0,arrowPadding:s=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:c=0,sticky:d="partial",hideWhenDetached:f=!1,updatePositionStrategy:p="optimized",onPlaced:h,...m}=e,x=R2(lS,r),[v,g]=Jr.useState(null),y=ne(t,q=>g(q)),[w,C]=Jr.useState(null),b=rc(w),S=b?.width??0,L=b?.height??0,T=o+(a!=="center"?"-"+a:""),P=typeof c=="number"?c:{top:0,right:0,bottom:0,left:0,...c},A=Array.isArray(u)?u:[u],_=A.length>0,G={padding:P,boundary:A.filter(X$),altBoundary:_},{refs:D,floatingStyles:W,placement:N,isPositioned:z,middlewareData:V}=f2({strategy:"fixed",placement:T,whileElementsMounted:(...q)=>rS(...q,{animationFrame:p==="always"}),elements:{reference:x.anchor},middleware:[p2({mainAxis:n+L,alignmentAxis:i}),l&&m2({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?g2():void 0,...G}),l&&h2({...G}),v2({...G,apply:({elements:q,rects:pe,availableWidth:be,availableHeight:_e})=>{let{width:nt,height:bt}=pe.reference,So=q.floating.style;So.setProperty("--radix-popper-available-width",`${be}px`),So.setProperty("--radix-popper-available-height",`${_e}px`),So.setProperty("--radix-popper-anchor-width",`${nt}px`),So.setProperty("--radix-popper-anchor-height",`${bt}px`)}}),w&&x2({element:w,padding:s}),Y$({arrowWidth:S,arrowHeight:L}),f&&y2({strategy:"referenceHidden",...G})]}),[k,Z]=E2(N),ve=et(h);ke(()=>{z&&ve?.()},[z,ve]);let O=V.arrow?.x,J=V.arrow?.y,ae=V.arrow?.centerOffset!==0,[Y,ce]=Jr.useState();return ke(()=>{v&&ce(window.getComputedStyle(v).zIndex)},[v]),(0,Hi.jsx)("div",{ref:D.setFloating,"data-radix-popper-content-wrapper":"",style:{...W,transform:z?W.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Y,"--radix-popper-transform-origin":[V.transformOrigin?.x,V.transformOrigin?.y].join(" "),...V.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:(0,Hi.jsx)(q$,{scope:r,placedSide:k,onArrowChange:C,arrowX:O,arrowY:J,shouldHideArrow:ae,children:(0,Hi.jsx)($.div,{"data-side":k,"data-align":Z,...m,ref:y,style:{...m.style,animation:z?void 0:"none"}})})})});T2.displayName=lS;var k2="PopperArrow",K$={top:"bottom",right:"left",bottom:"top",left:"right"},M2=Jr.forwardRef(function(t,r){let{__scopePopper:o,...n}=t,a=$$(k2,o),i=K$[a.placedSide];return(0,Hi.jsx)("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:(0,Hi.jsx)(S2,{...n,ref:r,style:{...n.style,display:"block"}})})});M2.displayName=k2;function X$(e){return e!==null}var Y$=e=>({name:"transformOrigin",options:e,fn(t){let{placement:r,rects:o,middlewareData:n}=t,i=n.arrow?.centerOffset!==0,s=i?0:e.arrowWidth,l=i?0:e.arrowHeight,[u,c]=E2(r),d={start:"0%",center:"50%",end:"100%"}[c],f=(n.arrow?.x??0)+s/2,p=(n.arrow?.y??0)+l/2,h="",m="";return u==="bottom"?(h=i?d:`${f}px`,m=`${-l}px`):u==="top"?(h=i?d:`${f}px`,m=`${o.floating.height+l}px`):u==="right"?(h=`${-l}px`,m=i?d:`${p}px`):u==="left"&&(h=`${o.floating.width+l}px`,m=i?d:`${p}px`),{data:{x:h,y:m}}}});function E2(e){let[t,r="center"]=e.split("-");return[t,r]}var Da=L2,Na=P2,Ui=T2,zi=M2;var gv=R(E(),1),A2=R(ru(),1);var D2=R(M(),1),Q$="Portal",vo=gv.forwardRef((e,t)=>{let{container:r,...o}=e,[n,a]=gv.useState(!1);ke(()=>a(!0),[]);let i=r||n&&globalThis?.document?.body;return i?A2.default.createPortal((0,D2.jsx)($.div,{...o,ref:t}),i):null});vo.displayName=Q$;var Z$=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},ic=new WeakMap,hv=new WeakMap,vv={},uS=0,N2=function(e){return e&&(e.host||N2(e.parentNode))},J$=function(e,t){return t.map(function(r){if(e.contains(r))return r;var o=N2(r);return o&&e.contains(o)?o:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},e8=function(e,t,r,o){var n=J$(t,Array.isArray(e)?e:[e]);vv[r]||(vv[r]=new WeakMap);var a=vv[r],i=[],s=new Set,l=new Set(n),u=function(d){!d||s.has(d)||(s.add(d),u(d.parentNode))};n.forEach(u);var c=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(f){if(s.has(f))c(f);else try{var p=f.getAttribute(o),h=p!==null&&p!=="false",m=(ic.get(f)||0)+1,x=(a.get(f)||0)+1;ic.set(f,m),a.set(f,x),i.push(f),m===1&&h&&hv.set(f,!0),x===1&&f.setAttribute(r,"true"),h||f.setAttribute(o,"true")}catch(v){console.error("aria-hidden: cannot operate on ",f,v)}})};return c(t),s.clear(),uS++,function(){i.forEach(function(d){var f=ic.get(d)-1,p=a.get(d)-1;ic.set(d,f),a.set(d,p),f||(hv.has(d)||d.removeAttribute(o),hv.delete(d)),p||d.removeAttribute(r)}),uS--,uS||(ic=new WeakMap,ic=new WeakMap,hv=new WeakMap,vv={})}},Wi=function(e,t,r){r===void 0&&(r="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),n=t||Z$(e);return n?(o.push.apply(o,Array.from(n.querySelectorAll("[aria-live], script"))),e8(o,n,r,"aria-hidden")):function(){return null}};var eo=function(){return eo=Object.assign||function(t){for(var r,o=1,n=arguments.length;o<n;o++){r=arguments[o];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},eo.apply(this,arguments)};function yv(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]]);return r}function _2(e,t,r){if(r||arguments.length===2)for(var o=0,n=t.length,a;o<n;o++)(a||!(o in t))&&(a||(a=Array.prototype.slice.call(t,0,o)),a[o]=t[o]);return e.concat(a||Array.prototype.slice.call(t))}var bv=R(E());var gr=R(E());var dl="right-scroll-bar-position",fl="width-before-scroll-bar",cS="with-scroll-bars-hidden",dS="--removed-body-scroll-bar-size";function xv(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}var O2=R(E());function F2(e,t){var r=(0,O2.useState)(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(o){var n=r.value;n!==o&&(r.value=o,r.callback(o,n))}}}})[0];return r.callback=t,r.facade}var wv=R(E());var t8=typeof window<"u"?wv.useLayoutEffect:wv.useEffect,V2=new WeakMap;function fS(e,t){var r=F2(t||null,function(o){return e.forEach(function(n){return xv(n,o)})});return t8(function(){var o=V2.get(r);if(o){var n=new Set(o),a=new Set(e),i=r.current;n.forEach(function(s){a.has(s)||xv(s,null)}),a.forEach(function(s){n.has(s)||xv(s,i)})}V2.set(r,e)},[e]),r}function r8(e){return e}function o8(e,t){t===void 0&&(t=r8);var r=[],o=!1,n={read:function(){if(o)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(a){var i=t(a,o);return r.push(i),function(){r=r.filter(function(s){return s!==i})}},assignSyncMedium:function(a){for(o=!0;r.length;){var i=r;r=[],i.forEach(a)}r={push:function(s){return a(s)},filter:function(){return r}}},assignMedium:function(a){o=!0;var i=[];if(r.length){var s=r;r=[],s.forEach(a),i=r}var l=function(){var c=i;i=[],c.forEach(a)},u=function(){return Promise.resolve().then(l)};u(),r={push:function(c){i.push(c),u()},filter:function(c){return i=i.filter(c),r}}}};return n}function pS(e){e===void 0&&(e={});var t=o8(null);return t.options=eo({async:!0,ssr:!1},e),t}var B2=R(E()),H2=function(e){var t=e.sideCar,r=yv(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=t.read();if(!o)throw new Error("Sidecar medium not found");return B2.createElement(o,eo({},r))};H2.isSideCarExport=!0;function mS(e,t){return e.useMedium(t),H2}var Cv=pS();var gS=function(){},np=gr.forwardRef(function(e,t){var r=gr.useRef(null),o=gr.useState({onScrollCapture:gS,onWheelCapture:gS,onTouchMoveCapture:gS}),n=o[0],a=o[1],i=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,c=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,h=e.noIsolation,m=e.inert,x=e.allowPinchZoom,v=e.as,g=v===void 0?"div":v,y=e.gapMode,w=yv(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=f,b=fS([r,t]),S=eo(eo({},w),n);return gr.createElement(gr.Fragment,null,c&&gr.createElement(C,{sideCar:Cv,removeScrollBar:u,shards:d,noRelative:p,noIsolation:h,inert:m,setCallbacks:a,allowPinchZoom:!!x,lockRef:r,gapMode:y}),i?gr.cloneElement(gr.Children.only(s),eo(eo({},S),{ref:b})):gr.createElement(g,eo({},S,{className:l,ref:b}),s))});np.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};np.classNames={fullWidth:fl,zeroRight:dl};var rt=R(E());var lc=R(E());var W2=R(E());var U2;var z2=function(){if(U2)return U2;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function n8(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=z2();return t&&e.setAttribute("nonce",t),e}function a8(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function i8(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var hS=function(){var e=0,t=null;return{add:function(r){e==0&&(t=n8())&&(a8(t,r),i8(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}};var vS=function(){var e=hS();return function(t,r){W2.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}};var ap=function(){var e=vS(),t=function(r){var o=r.styles,n=r.dynamic;return e(o,n),null};return t};var s8={left:0,top:0,right:0,gap:0},yS=function(e){return parseInt(e||"",10)||0},l8=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],o=t[e==="padding"?"paddingTop":"marginTop"],n=t[e==="padding"?"paddingRight":"marginRight"];return[yS(r),yS(o),yS(n)]},xS=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return s8;var t=l8(e),r=document.documentElement.clientWidth,o=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,o-r+t[2]-t[0])}};var u8=ap(),sc="data-scroll-locked",c8=function(e,t,r,o){var n=e.left,a=e.top,i=e.right,s=e.gap;return r===void 0&&(r="margin"),`
|
|
18
|
+
.`.concat(cS,` {
|
|
19
|
+
overflow: hidden `).concat(o,`;
|
|
20
|
+
padding-right: `).concat(s,"px ").concat(o,`;
|
|
14
21
|
}
|
|
15
|
-
body[`).concat(
|
|
16
|
-
overflow: hidden `).concat(
|
|
22
|
+
body[`).concat(sc,`] {
|
|
23
|
+
overflow: hidden `).concat(o,`;
|
|
17
24
|
overscroll-behavior: contain;
|
|
18
|
-
`).concat([t&&"position: relative ".concat(
|
|
19
|
-
padding-left: `.concat(
|
|
20
|
-
padding-top: `).concat(
|
|
21
|
-
padding-right: `).concat(
|
|
25
|
+
`).concat([t&&"position: relative ".concat(o,";"),r==="margin"&&`
|
|
26
|
+
padding-left: `.concat(n,`px;
|
|
27
|
+
padding-top: `).concat(a,`px;
|
|
28
|
+
padding-right: `).concat(i,`px;
|
|
22
29
|
margin-left:0;
|
|
23
30
|
margin-top:0;
|
|
24
|
-
margin-right: `).concat(
|
|
25
|
-
`),
|
|
31
|
+
margin-right: `).concat(s,"px ").concat(o,`;
|
|
32
|
+
`),r==="padding"&&"padding-right: ".concat(s,"px ").concat(o,";")].filter(Boolean).join(""),`
|
|
26
33
|
}
|
|
27
34
|
|
|
28
|
-
.`).concat(
|
|
29
|
-
right: `).concat(
|
|
35
|
+
.`).concat(dl,` {
|
|
36
|
+
right: `).concat(s,"px ").concat(o,`;
|
|
30
37
|
}
|
|
31
38
|
|
|
32
|
-
.`).concat(
|
|
33
|
-
margin-right: `).concat(
|
|
39
|
+
.`).concat(fl,` {
|
|
40
|
+
margin-right: `).concat(s,"px ").concat(o,`;
|
|
34
41
|
}
|
|
35
42
|
|
|
36
|
-
.`).concat(
|
|
37
|
-
right: 0 `).concat(
|
|
43
|
+
.`).concat(dl," .").concat(dl,` {
|
|
44
|
+
right: 0 `).concat(o,`;
|
|
38
45
|
}
|
|
39
46
|
|
|
40
|
-
.`).concat(
|
|
41
|
-
margin-right: 0 `).concat(
|
|
47
|
+
.`).concat(fl," .").concat(fl,` {
|
|
48
|
+
margin-right: 0 `).concat(o,`;
|
|
42
49
|
}
|
|
43
50
|
|
|
44
|
-
body[`).concat(
|
|
45
|
-
`).concat(
|
|
51
|
+
body[`).concat(sc,`] {
|
|
52
|
+
`).concat(dS,": ").concat(s,`px;
|
|
46
53
|
}
|
|
47
|
-
`)},
|
|
54
|
+
`)},G2=function(){var e=parseInt(document.body.getAttribute(sc)||"0",10);return isFinite(e)?e:0},d8=function(){lc.useEffect(function(){return document.body.setAttribute(sc,(G2()+1).toString()),function(){var e=G2()-1;e<=0?document.body.removeAttribute(sc):document.body.setAttribute(sc,e.toString())}},[])},wS=function(e){var t=e.noRelative,r=e.noImportant,o=e.gapMode,n=o===void 0?"margin":o;d8();var a=lc.useMemo(function(){return xS(n)},[n]);return lc.createElement(u8,{styles:c8(a,!t,n,r?"":"!important")})};var CS=!1;if(typeof window<"u")try{ip=Object.defineProperty({},"passive",{get:function(){return CS=!0,!0}}),window.addEventListener("test",ip,ip),window.removeEventListener("test",ip,ip)}catch{CS=!1}var ip,pl=CS?{passive:!1}:!1;var f8=function(e){return e.tagName==="TEXTAREA"},j2=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!f8(e)&&r[t]==="visible")},p8=function(e){return j2(e,"overflowY")},m8=function(e){return j2(e,"overflowX")},SS=function(e,t){var r=t.ownerDocument,o=t;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var n=q2(e,o);if(n){var a=$2(e,o),i=a[1],s=a[2];if(i>s)return!0}o=o.parentNode}while(o&&o!==r.body);return!1},g8=function(e){var t=e.scrollTop,r=e.scrollHeight,o=e.clientHeight;return[t,r,o]},h8=function(e){var t=e.scrollLeft,r=e.scrollWidth,o=e.clientWidth;return[t,r,o]},q2=function(e,t){return e==="v"?p8(t):m8(t)},$2=function(e,t){return e==="v"?g8(t):h8(t)},v8=function(e,t){return e==="h"&&t==="rtl"?-1:1},K2=function(e,t,r,o,n){var a=v8(e,window.getComputedStyle(t).direction),i=a*o,s=r.target,l=t.contains(s),u=!1,c=i>0,d=0,f=0;do{if(!s)break;var p=$2(e,s),h=p[0],m=p[1],x=p[2],v=m-x-a*h;(h||v)&&q2(e,s)&&(d+=v,f+=h);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(c&&(n&&Math.abs(d)<1||!n&&i>d)||!c&&(n&&Math.abs(f)<1||!n&&-i>f))&&(u=!0),u};var Sv=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},X2=function(e){return[e.deltaX,e.deltaY]},Y2=function(e){return e&&"current"in e?e.current:e},y8=function(e,t){return e[0]===t[0]&&e[1]===t[1]},x8=function(e){return`
|
|
48
55
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
49
56
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
50
|
-
`)},hO=0,ri=[];function NR(e){var t=je.useRef([]),o=je.useRef([0,0]),r=je.useRef(),a=je.useState(hO++)[0],n=je.useState(ou)[0],s=je.useRef(e);je.useEffect(function(){s.current=e},[e]),je.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var g=vR([e.lockRef.current],(e.shards||[]).map(ER),!0).filter(Boolean);return g.forEach(function(h){return h.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),g.forEach(function(h){return h.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var i=je.useCallback(function(g,h){if("touches"in g&&g.touches.length===2||g.type==="wheel"&&g.ctrlKey)return!s.current.allowPinchZoom;var v=Kd(g),x=o.current,y="deltaX"in g?g.deltaX:x[0]-v[0],R="deltaY"in g?g.deltaY:x[1]-v[1],C,w=g.target,I=Math.abs(y)>Math.abs(R)?"h":"v";if("touches"in g&&I==="h"&&w.type==="range")return!1;var L=Cg(I,w);if(!L)return!0;if(L?C=I:(C=I==="v"?"h":"v",L=Cg(I,w)),!L)return!1;if(!r.current&&"changedTouches"in g&&(y||R)&&(r.current=C),!C)return!0;var P=r.current||C;return AR(P,h,g,P==="h"?y:R,!0)},[]),l=je.useCallback(function(g){var h=g;if(!(!ri.length||ri[ri.length-1]!==n)){var v="deltaY"in h?DR(h):Kd(h),x=t.current.filter(function(C){return C.name===h.type&&(C.target===h.target||h.target===C.shadowParent)&&pO(C.delta,v)})[0];if(x&&x.should){h.cancelable&&h.preventDefault();return}if(!x){var y=(s.current.shards||[]).map(ER).filter(Boolean).filter(function(C){return C.contains(h.target)}),R=y.length>0?i(h,y[0]):!s.current.noIsolation;R&&h.cancelable&&h.preventDefault()}}},[]),u=je.useCallback(function(g,h,v,x){var y={name:g,delta:h,target:v,should:x,shadowParent:xO(v)};t.current.push(y),setTimeout(function(){t.current=t.current.filter(function(R){return R!==y})},1)},[]),c=je.useCallback(function(g){o.current=Kd(g),r.current=void 0},[]),d=je.useCallback(function(g){u(g.type,DR(g),g.target,i(g,e.lockRef.current))},[]),f=je.useCallback(function(g){u(g.type,Kd(g),g.target,i(g,e.lockRef.current))},[]);je.useEffect(function(){return ri.push(n),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",l,Bn),document.addEventListener("touchmove",l,Bn),document.addEventListener("touchstart",c,Bn),function(){ri=ri.filter(function(g){return g!==n}),document.removeEventListener("wheel",l,Bn),document.removeEventListener("touchmove",l,Bn),document.removeEventListener("touchstart",c,Bn)}},[]);var m=e.removeScrollBar,p=e.inert;return je.createElement(je.Fragment,null,p?je.createElement(n,{styles:gO(a)}):null,m?je.createElement(yg,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function xO(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var FR=mg(jd,NR);var OR=Xd.forwardRef(function(e,t){return Xd.createElement(tu,io({},e,{ref:t,sideCar:FR}))});OR.classNames=tu.classNames;var $r=OR;var it=b(D(),1),Yd="Popover",[_R,mse]=Re(Yd,[No]),au=No(),[vO,Fa]=_R(Yd),VR=e=>{let{__scopePopover:t,children:o,open:r,defaultOpen:a,onOpenChange:n,modal:s=!1}=e,i=au(t),l=Ye.useRef(null),[u,c]=Ye.useState(!1),[d,f]=Fe({prop:r,defaultProp:a??!1,onChange:n,caller:Yd});return(0,it.jsx)(qr,{...i,children:(0,it.jsx)(vO,{scope:t,contentId:Pe(),triggerRef:l,open:d,onOpenChange:f,onOpenToggle:Ye.useCallback(()=>f(m=>!m),[f]),hasCustomAnchor:u,onCustomAnchorAdd:Ye.useCallback(()=>c(!0),[]),onCustomAnchorRemove:Ye.useCallback(()=>c(!1),[]),modal:s,children:o})})};VR.displayName=Yd;var BR="PopoverAnchor",HR=Ye.forwardRef((e,t)=>{let{__scopePopover:o,...r}=e,a=Fa(BR,o),n=au(o),{onCustomAnchorAdd:s,onCustomAnchorRemove:i}=a;return Ye.useEffect(()=>(s(),()=>i()),[s,i]),(0,it.jsx)(Wr,{...n,...r,ref:t})});HR.displayName=BR;var UR="PopoverTrigger",GR=Ye.forwardRef((e,t)=>{let{__scopePopover:o,...r}=e,a=Fa(UR,o),n=au(o),s=ee(t,a.triggerRef),i=(0,it.jsx)(H.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":jR(a.open),...r,ref:s,onClick:V(e.onClick,a.onOpenToggle)});return a.hasCustomAnchor?i:(0,it.jsx)(Wr,{asChild:!0,...n,children:i})});GR.displayName=UR;var wg="PopoverPortal",[yO,bO]=_R(wg,{forceMount:void 0}),CO=e=>{let{__scopePopover:t,forceMount:o,children:r,container:a}=e,n=Fa(wg,t);return(0,it.jsx)(yO,{scope:t,forceMount:o,children:(0,it.jsx)(Oe,{present:o||n.open,children:(0,it.jsx)(ho,{asChild:!0,container:a,children:r})})})};CO.displayName=wg;var ai="PopoverContent",zR=Ye.forwardRef((e,t)=>{let o=bO(ai,e.__scopePopover),{forceMount:r=o.forceMount,...a}=e,n=Fa(ai,e.__scopePopover);return(0,it.jsx)(Oe,{present:r||n.open,children:n.modal?(0,it.jsx)(SO,{...a,ref:t}):(0,it.jsx)(RO,{...a,ref:t})})});zR.displayName=ai;var wO=uo("PopoverContent.RemoveScroll"),SO=Ye.forwardRef((e,t)=>{let o=Fa(ai,e.__scopePopover),r=Ye.useRef(null),a=ee(t,r),n=Ye.useRef(!1);return Ye.useEffect(()=>{let s=r.current;if(s)return Na(s)},[]),(0,it.jsx)($r,{as:wO,allowPinchZoom:!0,children:(0,it.jsx)(qR,{...e,ref:a,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:V(e.onCloseAutoFocus,s=>{s.preventDefault(),n.current||o.triggerRef.current?.focus()}),onPointerDownOutside:V(e.onPointerDownOutside,s=>{let i=s.detail.originalEvent,l=i.button===0&&i.ctrlKey===!0,u=i.button===2||l;n.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:V(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1})})})}),RO=Ye.forwardRef((e,t)=>{let o=Fa(ai,e.__scopePopover),r=Ye.useRef(!1),a=Ye.useRef(!1);return(0,it.jsx)(qR,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:n=>{e.onCloseAutoFocus?.(n),n.defaultPrevented||(r.current||o.triggerRef.current?.focus(),n.preventDefault()),r.current=!1,a.current=!1},onInteractOutside:n=>{e.onInteractOutside?.(n),n.defaultPrevented||(r.current=!0,n.detail.originalEvent.type==="pointerdown"&&(a.current=!0));let s=n.target;o.triggerRef.current?.contains(s)&&n.preventDefault(),n.detail.originalEvent.type==="focusin"&&a.current&&n.preventDefault()}})}),qR=Ye.forwardRef((e,t)=>{let{__scopePopover:o,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:n,disableOutsidePointerEvents:s,onEscapeKeyDown:i,onPointerDownOutside:l,onFocusOutside:u,onInteractOutside:c,...d}=e,f=Fa(ai,o),m=au(o);return Ma(),(0,it.jsx)(Gr,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:a,onUnmountAutoFocus:n,children:(0,it.jsx)(ko,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:c,onEscapeKeyDown:i,onPointerDownOutside:l,onFocusOutside:u,onDismiss:()=>f.onOpenChange(!1),children:(0,it.jsx)(Da,{"data-state":jR(f.open),role:"dialog",id:f.contentId,...m,...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)"}})})})}),WR="PopoverClose",$R=Ye.forwardRef((e,t)=>{let{__scopePopover:o,...r}=e,a=Fa(WR,o);return(0,it.jsx)(H.button,{type:"button",...r,ref:t,onClick:V(e.onClick,()=>a.onOpenChange(!1))})});$R.displayName=WR;var IO="PopoverArrow",LO=Ye.forwardRef((e,t)=>{let{__scopePopover:o,...r}=e,a=au(o);return(0,it.jsx)(Ea,{...a,...r,ref:t})});LO.displayName=IO;function jR(e){return e?"open":"closed"}var KR=VR,XR=HR,YR=GR;var Sg=zR,ZR=$R;var yr=b(D()),TO=te("z-50 w-72 rounded-md border border-border bg-background p-4 shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",{variants:{variant:{default:"",destructive:"border-destructive bg-destructive/5",outline:"border-border bg-transparent",subtle:"border-transparent bg-muted/50"},size:{sm:"w-48 p-3",default:"w-72 p-4",lg:"w-96 p-5"},side:{top:"data-[side=top]:slide-in-from-bottom-2",right:"data-[side=right]:slide-in-from-left-2",bottom:"data-[side=bottom]:slide-in-from-top-2",left:"data-[side=left]:slide-in-from-right-2"},position:{pointerEventsNone:"pointer-events-none",default:""},radius:{none:"rounded-none",sm:"rounded-sm",default:"rounded-md",lg:"rounded-lg",full:"rounded-full"},shadow:{none:"shadow-none",sm:"shadow-sm",default:"shadow-md",md:"shadow-md",lg:"shadow-lg",xl:"shadow-xl"}},defaultVariants:{variant:"default",size:"default",radius:"default",shadow:"default"}}),jr=KR,Kr=YR,hse=XR,br=QR.forwardRef(({className:e,variant:t,size:o,side:r,position:a,radius:n,shadow:s,backdrop:i=!1,closeOnInteractOutside:l=!0,overlayBackdrop:u=!1,sideOffset:c=4,...d},f)=>(0,yr.jsxs)(yr.Fragment,{children:[u&&(0,yr.jsx)("div",{className:"fixed inset-0 z-40 bg-overlay opacity-30"}),(0,yr.jsx)(Sg,{ref:f,sideOffset:c,collisionPadding:8,onInteractOutside:m=>{l||m.preventDefault()},className:S(TO({variant:t,size:o,side:r,position:a,radius:n,shadow:s}),i&&"backdrop-blur-md bg-opacity-80",e),...d})]}));br.displayName=Sg.displayName;var xse=ZR,MO=({className:e,...t})=>(0,yr.jsx)("div",{className:S("moonui-theme","my-2 h-px bg-border",e),...t});MO.displayName="PopoverSeparator";var kO=({className:e,...t})=>(0,yr.jsx)("div",{className:S("moonui-theme","-mx-4 -mt-4 mb-3 px-4 pt-4 pb-3 border-b border-border",e),...t});kO.displayName="PopoverHeader";var AO=({className:e,...t})=>(0,yr.jsx)("div",{className:S("moonui-theme","-mx-4 -mb-4 mt-3 px-4 pt-3 pb-4 border-t border-border",e),...t});AO.displayName="PopoverFooter";var su=b(A());var Yr=b(A(),1);var yt=b(A(),1);var Oa=b(D(),1),Rg="rovingFocusGroup.onEntryFocus",DO={bubbles:!1,cancelable:!0},nu="RovingFocusGroup",[Ig,JR,EO]=lr(nu),[NO,ni]=Re(nu,[EO]),[FO,OO]=NO(nu),eI=yt.forwardRef((e,t)=>(0,Oa.jsx)(Ig.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,Oa.jsx)(Ig.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,Oa.jsx)(_O,{...e,ref:t})})}));eI.displayName=nu;var _O=yt.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:o,orientation:r,loop:a=!1,dir:n,currentTabStopId:s,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:c=!1,...d}=e,f=yt.useRef(null),m=ee(t,f),p=So(n),[g,h]=Fe({prop:s,defaultProp:i??null,onChange:l,caller:nu}),[v,x]=yt.useState(!1),y=Te(u),R=JR(o),C=yt.useRef(!1),[w,I]=yt.useState(0);return yt.useEffect(()=>{let L=f.current;if(L)return L.addEventListener(Rg,y),()=>L.removeEventListener(Rg,y)},[y]),(0,Oa.jsx)(FO,{scope:o,orientation:r,dir:p,loop:a,currentTabStopId:g,onItemFocus:yt.useCallback(L=>h(L),[h]),onItemShiftTab:yt.useCallback(()=>x(!0),[]),onFocusableItemAdd:yt.useCallback(()=>I(L=>L+1),[]),onFocusableItemRemove:yt.useCallback(()=>I(L=>L-1),[]),children:(0,Oa.jsx)(H.div,{tabIndex:v||w===0?-1:0,"data-orientation":r,...d,ref:m,style:{outline:"none",...e.style},onMouseDown:V(e.onMouseDown,()=>{C.current=!0}),onFocus:V(e.onFocus,L=>{let P=!C.current;if(L.target===L.currentTarget&&P&&!v){let T=new CustomEvent(Rg,DO);if(L.currentTarget.dispatchEvent(T),!T.defaultPrevented){let O=R().filter(E=>E.focusable),$=O.find(E=>E.active),W=O.find(E=>E.id===g),q=[$,W,...O].filter(Boolean).map(E=>E.ref.current);rI(q,c)}}C.current=!1}),onBlur:V(e.onBlur,()=>x(!1))})})}),tI="RovingFocusGroupItem",oI=yt.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:o,focusable:r=!0,active:a=!1,tabStopId:n,children:s,...i}=e,l=Pe(),u=n||l,c=OO(tI,o),d=c.currentTabStopId===u,f=JR(o),{onFocusableItemAdd:m,onFocusableItemRemove:p,currentTabStopId:g}=c;return yt.useEffect(()=>{if(r)return m(),()=>p()},[r,m,p]),(0,Oa.jsx)(Ig.ItemSlot,{scope:o,id:u,focusable:r,active:a,children:(0,Oa.jsx)(H.span,{tabIndex:d?0:-1,"data-orientation":c.orientation,...i,ref:t,onMouseDown:V(e.onMouseDown,h=>{r?c.onItemFocus(u):h.preventDefault()}),onFocus:V(e.onFocus,()=>c.onItemFocus(u)),onKeyDown:V(e.onKeyDown,h=>{if(h.key==="Tab"&&h.shiftKey){c.onItemShiftTab();return}if(h.target!==h.currentTarget)return;let v=HO(h,c.orientation,c.dir);if(v!==void 0){if(h.metaKey||h.ctrlKey||h.altKey||h.shiftKey)return;h.preventDefault();let y=f().filter(R=>R.focusable).map(R=>R.ref.current);if(v==="last")y.reverse();else if(v==="prev"||v==="next"){v==="prev"&&y.reverse();let R=y.indexOf(h.currentTarget);y=c.loop?UO(y,R+1):y.slice(R+1)}setTimeout(()=>rI(y))}}),children:typeof s=="function"?s({isCurrentTabStop:d,hasTabStop:g!=null}):s})})});oI.displayName=tI;var VO={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function BO(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function HO(e,t,o){let r=BO(e.key,o);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return VO[r]}function rI(e,t=!1){let o=document.activeElement;for(let r of e)if(r===o||(r.focus({preventScroll:t}),document.activeElement!==o))return}function UO(e,t){return e.map((o,r)=>e[(t+r)%e.length])}var Zd=eI,Qd=oI;var Xr=b(D(),1),Jd="Tabs",[GO,Ose]=Re(Jd,[ni]),nI=ni(),[zO,Lg]=GO(Jd),sI=Yr.forwardRef((e,t)=>{let{__scopeTabs:o,value:r,onValueChange:a,defaultValue:n,orientation:s="horizontal",dir:i,activationMode:l="automatic",...u}=e,c=So(i),[d,f]=Fe({prop:r,onChange:a,defaultProp:n??"",caller:Jd});return(0,Xr.jsx)(zO,{scope:o,baseId:Pe(),value:d,onValueChange:f,orientation:s,dir:c,activationMode:l,children:(0,Xr.jsx)(H.div,{dir:c,"data-orientation":s,...u,ref:t})})});sI.displayName=Jd;var iI="TabsList",lI=Yr.forwardRef((e,t)=>{let{__scopeTabs:o,loop:r=!0,...a}=e,n=Lg(iI,o),s=nI(o);return(0,Xr.jsx)(Zd,{asChild:!0,...s,orientation:n.orientation,dir:n.dir,loop:r,children:(0,Xr.jsx)(H.div,{role:"tablist","aria-orientation":n.orientation,...a,ref:t})})});lI.displayName=iI;var uI="TabsTrigger",cI=Yr.forwardRef((e,t)=>{let{__scopeTabs:o,value:r,disabled:a=!1,...n}=e,s=Lg(uI,o),i=nI(o),l=mI(s.baseId,r),u=pI(s.baseId,r),c=r===s.value;return(0,Xr.jsx)(Qd,{asChild:!0,...i,focusable:!a,active:c,children:(0,Xr.jsx)(H.button,{type:"button",role:"tab","aria-selected":c,"aria-controls":u,"data-state":c?"active":"inactive","data-disabled":a?"":void 0,disabled:a,id:l,...n,ref:t,onMouseDown:V(e.onMouseDown,d=>{!a&&d.button===0&&d.ctrlKey===!1?s.onValueChange(r):d.preventDefault()}),onKeyDown:V(e.onKeyDown,d=>{[" ","Enter"].includes(d.key)&&s.onValueChange(r)}),onFocus:V(e.onFocus,()=>{let d=s.activationMode!=="manual";!c&&!a&&d&&s.onValueChange(r)})})})});cI.displayName=uI;var dI="TabsContent",fI=Yr.forwardRef((e,t)=>{let{__scopeTabs:o,value:r,forceMount:a,children:n,...s}=e,i=Lg(dI,o),l=mI(i.baseId,r),u=pI(i.baseId,r),c=r===i.value,d=Yr.useRef(c);return Yr.useEffect(()=>{let f=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(f)},[]),(0,Xr.jsx)(Oe,{present:a||c,children:({present:f})=>(0,Xr.jsx)(H.div,{"data-state":c?"active":"inactive","data-orientation":i.orientation,role:"tabpanel","aria-labelledby":l,hidden:!f,id:u,tabIndex:0,...s,ref:t,style:{...e.style,animationDuration:d.current?"0s":void 0},children:f&&n})})});fI.displayName=dI;function mI(e,t){return`${e}-trigger-${t}`}function pI(e,t){return`${e}-content-${t}`}var Pg=sI,Tg=lI,Mg=cI,kg=fI;var Zr=b(D()),ef=su.forwardRef(({vertical:e=!1,...t},o)=>(0,Zr.jsx)(Pg,{ref:o,className:S("moonui-theme",t.className),orientation:e?"vertical":"horizontal",...t}));ef.displayName=Pg.displayName;var WO=te("flex items-center justify-start transition-all duration-200",{variants:{variant:{default:"bg-muted rounded-md p-1 text-muted-foreground dark:bg-gray-800/80 dark:text-gray-400",pills:"bg-transparent gap-2 p-0 dark:text-gray-400",underline:"bg-transparent border-b border-border dark:border-gray-700 gap-4 dark:text-gray-400",cards:"bg-transparent gap-2 p-0 dark:text-gray-400",minimal:"bg-transparent gap-1 p-0 dark:text-gray-400"},orientation:{horizontal:"flex-row",vertical:"flex-col items-start gap-1"},fullWidth:{true:"w-full"}},defaultVariants:{variant:"default",orientation:"horizontal",fullWidth:!1}}),tf=su.forwardRef(({className:e,variant:t,orientation:o,fullWidth:r,...a},n)=>(0,Zr.jsx)(Tg,{ref:n,className:S("moonui-theme",WO({variant:t,orientation:o,fullWidth:r,className:e})),...a}));tf.displayName=Tg.displayName;var $O=te("inline-flex items-center justify-center whitespace-nowrap font-medium ring-offset-background transition-all duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"rounded-md data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm dark:data-[state=active]:bg-gray-900 dark:data-[state=active]:text-gray-100 dark:data-[state=active]:shadow-gray-950/10",underline:"rounded-none border-b-2 border-transparent pb-2 data-[state=active]:border-primary data-[state=active]:bg-transparent data-[state=active]:text-foreground dark:data-[state=active]:border-primary/80 dark:data-[state=active]:text-gray-100",pills:"rounded-full bg-muted hover:bg-muted/80 data-[state=active]:bg-primary data-[state=active]:text-primary-foreground dark:bg-gray-800 dark:hover:bg-gray-700 dark:data-[state=active]:bg-primary/90 dark:data-[state=active]:text-white",cards:"rounded-md bg-muted/50 hover:bg-muted data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-md dark:bg-gray-800/50 dark:hover:bg-gray-700/50 dark:data-[state=active]:bg-gray-900 dark:data-[state=active]:text-gray-100 dark:data-[state=active]:shadow-gray-950/20",minimal:"rounded-sm bg-transparent hover:bg-muted/30 data-[state=active]:bg-transparent data-[state=active]:text-foreground data-[state=active]:underline data-[state=active]:underline-offset-4 dark:hover:bg-gray-800/30 dark:data-[state=active]:text-gray-200"},size:{sm:"h-7 px-2 text-xs",md:"h-9 px-3 py-1.5 text-sm",lg:"h-10 px-4 py-2 text-base"},orientation:{horizontal:"",vertical:"justify-start w-full text-left"},fullWidth:{true:"w-full"}},defaultVariants:{variant:"default",size:"md",orientation:"horizontal",fullWidth:!1}}),si=su.forwardRef(({className:e,variant:t,size:o,icon:r,iconPosition:a="left",badge:n,fadeTabs:s=!1,orientation:i,fullWidth:l,children:u,...c},d)=>(0,Zr.jsxs)(Mg,{ref:d,className:S("moonui-theme",$O({variant:t,size:o,orientation:i,fullWidth:l}),s&&"data-[state=inactive]:opacity-60",e),...c,children:[r&&a==="left"&&(0,Zr.jsx)("span",{className:"mr-2",children:r}),u,r&&a==="right"&&(0,Zr.jsx)("span",{className:"ml-2",children:r}),n&&(0,Zr.jsx)("span",{className:"ml-2",children:n})]}));si.displayName=Mg.displayName;var ii=su.forwardRef(({className:e,animated:t=!1,...o},r)=>(0,Zr.jsx)(kg,{ref:r,className:S("moonui-theme","mt-6 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",t&&"data-[state=active]:animate-fadeIn data-[state=inactive]:animate-fadeOut",e),...o}));ii.displayName=kg.displayName;var _a=b(A());var Cr=b(D()),jO=te("relative flex w-full touch-none select-none items-center",{variants:{size:{sm:"h-5",default:"h-6",md:"h-8",lg:"h-10"}},defaultVariants:{size:"default"}}),KO=te("relative h-1.5 w-full grow overflow-hidden rounded-full",{variants:{variant:{default:"bg-muted",primary:"bg-primary/20",secondary:"bg-secondary/20",accent:"bg-accent/20",success:"bg-success/20",warning:"bg-warning/20",error:"bg-error/20"}},defaultVariants:{variant:"default"}}),XO=te("absolute h-full",{variants:{variant:{default:"bg-foreground",primary:"bg-primary",secondary:"bg-secondary",accent:"bg-accent",success:"bg-success",warning:"bg-warning",error:"bg-error"}},defaultVariants:{variant:"primary"}}),YO=te("block rounded-full border-2 ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"border-foreground bg-background",primary:"border-primary bg-background",secondary:"border-secondary bg-background",accent:"border-accent bg-background",success:"border-success bg-background",warning:"border-warning bg-background",error:"border-error bg-background"},size:{sm:"h-3 w-3",default:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"}},defaultVariants:{variant:"primary",size:"default"}}),Qr=_a.forwardRef(({className:e,size:t,trackVariant:o,rangeVariant:r,thumbVariant:a,thumbSize:n,showValueLabel:s=!1,valueLabelFormat:i,valueLabelClassName:l,value:u,defaultValue:c=[0],onValueChange:d,disabled:f,...m},p)=>{let[g,h]=_a.useState(u||c||[0]);_a.useEffect(()=>{u!==void 0&&h(u)},[u]);let v=T=>i?i(T):`${Math.round(T*100)/100}`,x=(T,O,$)=>(T-O)/($-O)*100,y=_a.useRef(null),R=m.min||0,C=m.max||100,w=m.step||1,I=T=>{let O=T.map($=>{if(w<1){let W=w.toString().split(".")[1]?.length||0;return Math.round($*Math.pow(10,W))/Math.pow(10,W)}return Math.round($)});h(O),d&&d(O)},L=T=>{if(f)return;let O=y.current;if(!O)return;let $=O.getBoundingClientRect(),W=(T.clientX-$.left)/$.width,N=R+W*(C-R),q=Math.round(N/w)*w,E=Math.max(R,Math.min(C,q)),G=[...g];G[0]=E,I(G)},P=T=>O=>{if(f)return;O.preventDefault();let $=N=>{let q=y.current;if(!q)return;let E=q.getBoundingClientRect(),G=(N.clientX-E.left)/E.width,M=R+G*(C-R),k=Math.round(M/w)*w,re=Math.max(R,Math.min(C,k)),Se=[...g];Se[T]=re,I(Se)},W=()=>{document.removeEventListener("mousemove",$),document.removeEventListener("mouseup",W)};document.addEventListener("mousemove",$),document.addEventListener("mouseup",W)};return(0,Cr.jsxs)("div",{className:"w-full",ref:p,...m,children:[s&&(0,Cr.jsx)("div",{className:S("flex justify-end mb-1 text-sm text-muted-foreground",l),children:g.length===1?(0,Cr.jsx)("span",{children:v(g[0])}):(0,Cr.jsxs)("span",{children:[v(g[0])," - ",v(g[g.length-1])]})}),(0,Cr.jsxs)("div",{className:S("moonui-theme",jO({size:t}),e),"data-disabled":f?!0:void 0,children:[(0,Cr.jsx)("div",{ref:y,className:S(KO({variant:o||a||"default"})),onClick:L,children:(0,Cr.jsx)("div",{className:S(XO({variant:r||a||"primary"})),style:{left:"0%",width:`${x(g[0],R,C)}%`}})}),g.map((T,O)=>(0,Cr.jsx)("div",{className:S(YO({variant:a||"primary",size:n})),style:{left:`${x(T,R,C)}%`,transform:"translateX(-50%)",position:"absolute",top:"50%",marginTop:n==="sm"?"-6px":n==="lg"?"-12px":"-8px",cursor:f?"not-allowed":"pointer"},onMouseDown:P(O),"aria-label":`Thumb ${O+1}`,tabIndex:f?-1:0,role:"slider","aria-valuemin":R,"aria-valuemax":C,"aria-valuenow":T,"aria-disabled":f},O))]})]})});Qr.displayName="Slider";var z=b(D()),gI=te("relative inline-flex items-center justify-center",{variants:{size:{default:"h-10 w-10",sm:"h-8 w-8",lg:"h-12 w-12",xl:"h-16 w-16"},shape:{square:"rounded-md",circle:"rounded-full",rounded:"rounded-lg"}},defaultVariants:{size:"default",shape:"square"}});function hI(e){let t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}:null}function xI(e,t,o){return"#"+((1<<24)+(e<<16)+(t<<8)+o).toString(16).slice(1)}function ZO(e){let t=hI(e);if(!t)return null;let o=t.r/255,r=t.g/255,a=t.b/255,n=Math.max(o,r,a),s=Math.min(o,r,a),i=0,l=0,u=(n+s)/2;if(n!==s){let c=n-s;switch(l=u>.5?c/(2-n-s):c/(n+s),n){case o:i=((r-a)/c+(r<a?6:0))/6;break;case r:i=((a-o)/c+2)/6;break;case a:i=((o-r)/c+4)/6;break}}return{h:Math.round(i*360),s:Math.round(l*100),l:Math.round(u*100)}}function QO(e,t,o){e=e/360,t=t/100,o=o/100;let r,a,n;if(t===0)r=a=n=o;else{let s=(u,c,d)=>(d<0&&(d+=1),d>1&&(d-=1),d<.16666666666666666?u+(c-u)*6*d:d<.5?c:d<.6666666666666666?u+(c-u)*(.6666666666666666-d)*6:u),i=o<.5?o*(1+t):o+t-o*t,l=2*o-i;r=s(l,i,e+1/3),a=s(l,i,e),n=s(l,i,e-1/3)}return xI(Math.round(r*255),Math.round(a*255),Math.round(n*255))}var vI=["#000000","#ffffff","#ff0000","#00ff00","#0000ff","#ffff00","#ff00ff","#00ffff","#ff8800","#8800ff","#88ff00","#0088ff","#ff0088","#00ff88","#888888","#f87171","#fb923c","#fbbf24","#facc15","#a3e635","#4ade80","#34d399","#2dd4bf","#22d3ee","#38bdf8","#60a5fa","#818cf8","#a78bfa","#c084fc","#e879f9","#f472b6","#fb7185","#f43f5e","#ef4444","#dc2626"];function Ag({className:e,size:t,shape:o,value:r="#000000",onChange:a,showInput:n=!0,showPresets:s=!0,presets:i=vI,allowOpacity:l=!1,format:u="hex",disableCopy:c=!1,triggerMode:d="click",disabled:f,...m}){let[p,g]=Fo.useState(!1),[h,v]=Fo.useState(r),[x,y]=Fo.useState(100),[R,C]=Fo.useState(!1),[w,I]=Fo.useState(r),L=Fo.useMemo(()=>ZO(h)||{h:0,s:0,l:0},[h]),P=Fo.useMemo(()=>hI(h)||{r:0,g:0,b:0},[h]);Fo.useEffect(()=>{v(r),I(r)},[r]);let T=E=>{v(E),I(E),a?.(E)},O=(E,G)=>{let M={...L,[E]:G},k=QO(M.h,M.s,M.l);T(k)},$=(E,G)=>{let M={...P,[E]:G},k=xI(M.r,M.g,M.b);T(k)},W=E=>{let G=E.target.value;I(G),/^#[0-9A-F]{6}$/i.test(G)&&T(G)},N=async()=>{try{let E=h;u==="rgb"?E=`rgb(${P.r}, ${P.g}, ${P.b})`:u==="hsl"&&(E=`hsl(${L.h}, ${L.s}%, ${L.l}%)`),await navigator.clipboard.writeText(E),C(!0),setTimeout(()=>C(!1),2e3)}catch(E){console.error("Failed to copy:",E)}},q=()=>u==="rgb"?`rgb(${P.r}, ${P.g}, ${P.b})`:u==="hsl"?`hsl(${L.h}, ${L.s}%, ${L.l}%)`:h;return(0,z.jsxs)(jr,{open:p,onOpenChange:g,children:[(0,z.jsx)(Kr,{asChild:!0,children:(0,z.jsx)(Ve,{variant:"outline",className:S(gI({size:t,shape:o}),"p-0 border-2",e),style:{backgroundColor:h},disabled:f,...m,children:(0,z.jsx)("span",{className:"sr-only",children:"Pick a color"})})}),(0,z.jsxs)(br,{className:"w-80",align:"start",sideOffset:8,children:[(0,z.jsxs)(ef,{defaultValue:"picker",className:"w-full",children:[(0,z.jsxs)(tf,{className:"grid w-full grid-cols-3",children:[(0,z.jsx)(si,{value:"picker",children:"Picker"}),(0,z.jsx)(si,{value:"sliders",children:"Sliders"}),(0,z.jsx)(si,{value:"input",children:"Input"})]}),(0,z.jsxs)(ii,{value:"picker",className:"space-y-4",children:[(0,z.jsxs)("div",{className:"relative h-48 rounded-md overflow-hidden",children:[(0,z.jsx)("div",{className:"absolute inset-0",style:{background:`linear-gradient(to right, #fff, hsl(${L.h}, 100%, 50%))`}}),(0,z.jsx)("div",{className:"absolute inset-0",style:{background:"linear-gradient(to bottom, transparent, #000)"}}),(0,z.jsx)(Ae.div,{className:"absolute w-4 h-4 border-2 border-white rounded-full shadow-md cursor-pointer",drag:!0,dragConstraints:{left:-8,right:280,top:-8,bottom:184},dragElastic:0,style:{backgroundColor:h,left:`${L.s/100*280-8}px`,top:`${(1-L.l/100)*192-8}px`}})]}),(0,z.jsxs)("div",{className:"space-y-2",children:[(0,z.jsx)(ao,{children:"Hue"}),(0,z.jsx)("div",{className:"relative h-3 rounded-full",style:{background:"linear-gradient(to right, #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000)"},children:(0,z.jsx)(Qr,{value:[L.h],onValueChange:([E])=>O("h",E),max:360,step:1,className:"absolute inset-0"})})]}),l&&(0,z.jsxs)("div",{className:"space-y-2",children:[(0,z.jsx)(ao,{children:"Opacity"}),(0,z.jsxs)("div",{className:"flex items-center gap-3",children:[(0,z.jsx)(Qr,{value:[x],onValueChange:([E])=>y(E),max:100,step:1,className:"flex-1"}),(0,z.jsxs)("span",{className:"text-sm w-10 text-right",children:[x,"%"]})]})]})]}),(0,z.jsxs)(ii,{value:"sliders",className:"space-y-4",children:[(0,z.jsxs)("div",{className:"space-y-3",children:[(0,z.jsxs)("div",{className:"space-y-2",children:[(0,z.jsxs)("div",{className:"flex items-center justify-between",children:[(0,z.jsx)(ao,{children:"Red"}),(0,z.jsx)("span",{className:"text-sm text-muted-foreground",children:P.r})]}),(0,z.jsx)(Qr,{value:[P.r],onValueChange:([E])=>$("r",E),max:255,step:1,className:"[&_[role=slider]]:bg-red-500"})]}),(0,z.jsxs)("div",{className:"space-y-2",children:[(0,z.jsxs)("div",{className:"flex items-center justify-between",children:[(0,z.jsx)(ao,{children:"Green"}),(0,z.jsx)("span",{className:"text-sm text-muted-foreground",children:P.g})]}),(0,z.jsx)(Qr,{value:[P.g],onValueChange:([E])=>$("g",E),max:255,step:1,className:"[&_[role=slider]]:bg-green-500"})]}),(0,z.jsxs)("div",{className:"space-y-2",children:[(0,z.jsxs)("div",{className:"flex items-center justify-between",children:[(0,z.jsx)(ao,{children:"Blue"}),(0,z.jsx)("span",{className:"text-sm text-muted-foreground",children:P.b})]}),(0,z.jsx)(Qr,{value:[P.b],onValueChange:([E])=>$("b",E),max:255,step:1,className:"[&_[role=slider]]:bg-blue-500"})]})]}),(0,z.jsx)("div",{className:"pt-2 border-t",children:(0,z.jsxs)("div",{className:"grid grid-cols-3 gap-2 text-sm",children:[(0,z.jsxs)("div",{children:[(0,z.jsx)("p",{className:"text-muted-foreground",children:"H"}),(0,z.jsxs)("p",{className:"font-medium",children:[L.h,"\xB0"]})]}),(0,z.jsxs)("div",{children:[(0,z.jsx)("p",{className:"text-muted-foreground",children:"S"}),(0,z.jsxs)("p",{className:"font-medium",children:[L.s,"%"]})]}),(0,z.jsxs)("div",{children:[(0,z.jsx)("p",{className:"text-muted-foreground",children:"L"}),(0,z.jsxs)("p",{className:"font-medium",children:[L.l,"%"]})]})]})})]}),(0,z.jsxs)(ii,{value:"input",className:"space-y-4",children:[(0,z.jsxs)("div",{className:"space-y-2",children:[(0,z.jsx)(ao,{children:"Hex Color"}),(0,z.jsxs)("div",{className:"flex gap-2",children:[(0,z.jsx)(At,{value:w,onChange:W,placeholder:"#000000",className:"font-mono"}),(0,z.jsx)(Ve,{size:"icon",variant:"outline",onClick:()=>T(w),children:(0,z.jsx)(It,{className:"h-4 w-4"})})]})]}),(0,z.jsxs)("div",{className:"space-y-2",children:[(0,z.jsx)(ao,{children:"RGB Values"}),(0,z.jsxs)("div",{className:"grid grid-cols-3 gap-2",children:[(0,z.jsx)(At,{type:"number",value:P.r,onChange:E=>$("r",parseInt(E.target.value)||0),min:0,max:255,className:"text-center"}),(0,z.jsx)(At,{type:"number",value:P.g,onChange:E=>$("g",parseInt(E.target.value)||0),min:0,max:255,className:"text-center"}),(0,z.jsx)(At,{type:"number",value:P.b,onChange:E=>$("b",parseInt(E.target.value)||0),min:0,max:255,className:"text-center"})]})]})]})]}),(0,z.jsxs)("div",{className:"mt-4 flex items-center justify-between p-3 border rounded-lg",children:[(0,z.jsxs)("div",{className:"flex items-center gap-3",children:[(0,z.jsx)("div",{className:S("h-10 w-10 rounded border-2",gI({shape:o})),style:{backgroundColor:h}}),(0,z.jsxs)("div",{children:[(0,z.jsx)("p",{className:"text-sm font-medium",children:q()}),(0,z.jsx)("p",{className:"text-xs text-muted-foreground",children:"Current color"})]})]}),!c&&(0,z.jsx)(Ve,{size:"icon",variant:"ghost",onClick:N,className:"h-8 w-8",children:(0,z.jsx)(Fr,{mode:"wait",children:R?(0,z.jsx)(Ae.div,{initial:{scale:0},animate:{scale:1},exit:{scale:0},children:(0,z.jsx)(It,{className:"h-4 w-4 text-green-600"})},"check"):(0,z.jsx)(Ae.div,{initial:{scale:0},animate:{scale:1},exit:{scale:0},children:(0,z.jsx)(Fi,{className:"h-4 w-4"})},"copy")})})]}),s&&i.length>0&&(0,z.jsxs)("div",{className:"mt-4 space-y-2",children:[(0,z.jsx)(ao,{children:"Preset Colors"}),(0,z.jsx)("div",{className:"grid grid-cols-10 gap-1",children:i.map(E=>(0,z.jsx)("button",{className:S("h-7 w-7 rounded border-2 transition-all hover:scale-110",h===E?"border-primary":"border-transparent"),style:{backgroundColor:E},onClick:()=>T(E)},E))})]})]})]})}function JO({value:e="#000000",onChange:t,colors:o=vI.slice(0,10),className:r,size:a="default"}){let n={sm:"h-6 w-6",default:"h-8 w-8",lg:"h-10 w-10"};return(0,z.jsx)("div",{className:S("moonui-theme","flex flex-wrap gap-2",r),children:o.map(s=>(0,z.jsx)("button",{className:S("rounded-full border-2 transition-all hover:scale-110",n[a],e===s?"border-primary ring-2 ring-primary/20":"border-transparent"),style:{backgroundColor:s},onClick:()=>t?.(s)},s))})}function e_({value:e={start:"#ff0000",end:"#0000ff",angle:90},onChange:t,className:o}){let[r,a]=Fo.useState(e),n=(s,i)=>{let l={...r,[s]:i};a(l),t?.(l)};return(0,z.jsxs)("div",{className:S("moonui-theme","space-y-4",o),children:[(0,z.jsx)("div",{className:"h-20 rounded-lg border-2",style:{background:`linear-gradient(${r.angle}deg, ${r.start}, ${r.end})`}}),(0,z.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,z.jsxs)("div",{className:"space-y-2",children:[(0,z.jsx)(ao,{children:"Start Color"}),(0,z.jsx)(Ag,{value:r.start,onChange:s=>n("start",s),size:"sm"})]}),(0,z.jsxs)("div",{className:"space-y-2",children:[(0,z.jsx)(ao,{children:"End Color"}),(0,z.jsx)(Ag,{value:r.end,onChange:s=>n("end",s),size:"sm"})]})]}),(0,z.jsxs)("div",{className:"space-y-2",children:[(0,z.jsxs)("div",{className:"flex items-center justify-between",children:[(0,z.jsx)(ao,{children:"Angle"}),(0,z.jsxs)("span",{className:"text-sm text-muted-foreground",children:[r.angle,"\xB0"]})]}),(0,z.jsx)(Qr,{value:[r.angle||90],onValueChange:([s])=>n("angle",s),max:360,step:1})]})]})}var Ba=b(A());var yI=1,t_=.9,o_=.8,r_=.17,Dg=.1,Eg=.999,a_=.9999,n_=.99,s_=/[\\\/_+.#"@\[\(\{&]/,i_=/[\\\/_+.#"@\[\(\{&]/g,l_=/[\s-]/,CI=/[\s-]/g;function Ng(e,t,o,r,a,n,s){if(n===t.length)return a===e.length?yI:n_;var i=`${a},${n}`;if(s[i]!==void 0)return s[i];for(var l=r.charAt(n),u=o.indexOf(l,a),c=0,d,f,m,p;u>=0;)d=Ng(e,t,o,r,u+1,n+1,s),d>c&&(u===a?d*=yI:s_.test(e.charAt(u-1))?(d*=o_,m=e.slice(a,u-1).match(i_),m&&a>0&&(d*=Math.pow(Eg,m.length))):l_.test(e.charAt(u-1))?(d*=t_,p=e.slice(a,u-1).match(CI),p&&a>0&&(d*=Math.pow(Eg,p.length))):(d*=r_,a>0&&(d*=Math.pow(Eg,u-a))),e.charAt(u)!==t.charAt(n)&&(d*=a_)),(d<Dg&&o.charAt(u-1)===r.charAt(n+1)||r.charAt(n+1)===r.charAt(n)&&o.charAt(u-1)!==r.charAt(n))&&(f=Ng(e,t,o,r,u+1,n+2,s),f*Dg>d&&(d=f*Dg)),d>c&&(c=d),u=o.indexOf(l,u+1);return s[i]=c,c}function bI(e){return e.toLowerCase().replace(CI," ")}function wI(e,t,o){return e=o&&o.length>0?`${e+" "+o.join(" ")}`:e,Ng(e,t,bI(e),bI(t),0,0,{})}var Ge=b(A(),1);var Be=b(D(),1),rf="Dialog",[SI,vie]=Re(rf),[u_,tr]=SI(rf),RI=e=>{let{__scopeDialog:t,children:o,open:r,defaultOpen:a,onOpenChange:n,modal:s=!0}=e,i=Ge.useRef(null),l=Ge.useRef(null),[u,c]=Fe({prop:r,defaultProp:a??!1,onChange:n,caller:rf});return(0,Be.jsx)(u_,{scope:t,triggerRef:i,contentRef:l,contentId:Pe(),titleId:Pe(),descriptionId:Pe(),open:u,onOpenChange:c,onOpenToggle:Ge.useCallback(()=>c(d=>!d),[c]),modal:s,children:o})};RI.displayName=rf;var II="DialogTrigger",LI=Ge.forwardRef((e,t)=>{let{__scopeDialog:o,...r}=e,a=tr(II,o),n=ee(t,a.triggerRef);return(0,Be.jsx)(H.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":_g(a.open),...r,ref:n,onClick:V(e.onClick,a.onOpenToggle)})});LI.displayName=II;var Fg="DialogPortal",[c_,PI]=SI(Fg,{forceMount:void 0}),TI=e=>{let{__scopeDialog:t,forceMount:o,children:r,container:a}=e,n=tr(Fg,t);return(0,Be.jsx)(c_,{scope:t,forceMount:o,children:Ge.Children.map(r,s=>(0,Be.jsx)(Oe,{present:o||n.open,children:(0,Be.jsx)(ho,{asChild:!0,container:a,children:s})}))})};TI.displayName=Fg;var of="DialogOverlay",MI=Ge.forwardRef((e,t)=>{let o=PI(of,e.__scopeDialog),{forceMount:r=o.forceMount,...a}=e,n=tr(of,e.__scopeDialog);return n.modal?(0,Be.jsx)(Oe,{present:r||n.open,children:(0,Be.jsx)(f_,{...a,ref:t})}):null});MI.displayName=of;var d_=uo("DialogOverlay.RemoveScroll"),f_=Ge.forwardRef((e,t)=>{let{__scopeDialog:o,...r}=e,a=tr(of,o);return(0,Be.jsx)($r,{as:d_,allowPinchZoom:!0,shards:[a.contentRef],children:(0,Be.jsx)(H.div,{"data-state":_g(a.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Hn="DialogContent",kI=Ge.forwardRef((e,t)=>{let o=PI(Hn,e.__scopeDialog),{forceMount:r=o.forceMount,...a}=e,n=tr(Hn,e.__scopeDialog);return(0,Be.jsx)(Oe,{present:r||n.open,children:n.modal?(0,Be.jsx)(m_,{...a,ref:t}):(0,Be.jsx)(p_,{...a,ref:t})})});kI.displayName=Hn;var m_=Ge.forwardRef((e,t)=>{let o=tr(Hn,e.__scopeDialog),r=Ge.useRef(null),a=ee(t,o.contentRef,r);return Ge.useEffect(()=>{let n=r.current;if(n)return Na(n)},[]),(0,Be.jsx)(AI,{...e,ref:a,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:V(e.onCloseAutoFocus,n=>{n.preventDefault(),o.triggerRef.current?.focus()}),onPointerDownOutside:V(e.onPointerDownOutside,n=>{let s=n.detail.originalEvent,i=s.button===0&&s.ctrlKey===!0;(s.button===2||i)&&n.preventDefault()}),onFocusOutside:V(e.onFocusOutside,n=>n.preventDefault())})}),p_=Ge.forwardRef((e,t)=>{let o=tr(Hn,e.__scopeDialog),r=Ge.useRef(!1),a=Ge.useRef(!1);return(0,Be.jsx)(AI,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:n=>{e.onCloseAutoFocus?.(n),n.defaultPrevented||(r.current||o.triggerRef.current?.focus(),n.preventDefault()),r.current=!1,a.current=!1},onInteractOutside:n=>{e.onInteractOutside?.(n),n.defaultPrevented||(r.current=!0,n.detail.originalEvent.type==="pointerdown"&&(a.current=!0));let s=n.target;o.triggerRef.current?.contains(s)&&n.preventDefault(),n.detail.originalEvent.type==="focusin"&&a.current&&n.preventDefault()}})}),AI=Ge.forwardRef((e,t)=>{let{__scopeDialog:o,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:n,...s}=e,i=tr(Hn,o),l=Ge.useRef(null),u=ee(t,l);return Ma(),(0,Be.jsxs)(Be.Fragment,{children:[(0,Be.jsx)(Gr,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:a,onUnmountAutoFocus:n,children:(0,Be.jsx)(ko,{role:"dialog",id:i.contentId,"aria-describedby":i.descriptionId,"aria-labelledby":i.titleId,"data-state":_g(i.open),...s,ref:u,onDismiss:()=>i.onOpenChange(!1)})}),(0,Be.jsxs)(Be.Fragment,{children:[(0,Be.jsx)(g_,{titleId:i.titleId}),(0,Be.jsx)(x_,{contentRef:l,descriptionId:i.descriptionId})]})]})}),Og="DialogTitle",DI=Ge.forwardRef((e,t)=>{let{__scopeDialog:o,...r}=e,a=tr(Og,o);return(0,Be.jsx)(H.h2,{id:a.titleId,...r,ref:t})});DI.displayName=Og;var EI="DialogDescription",NI=Ge.forwardRef((e,t)=>{let{__scopeDialog:o,...r}=e,a=tr(EI,o);return(0,Be.jsx)(H.p,{id:a.descriptionId,...r,ref:t})});NI.displayName=EI;var FI="DialogClose",OI=Ge.forwardRef((e,t)=>{let{__scopeDialog:o,...r}=e,a=tr(FI,o);return(0,Be.jsx)(H.button,{type:"button",...r,ref:t,onClick:V(e.onClick,()=>a.onOpenChange(!1))})});OI.displayName=FI;function _g(e){return e?"open":"closed"}var _I="DialogTitleWarning",[yie,VI]=lv(_I,{contentName:Hn,titleName:Og,docsSlug:"dialog"}),g_=({titleId:e})=>{let t=VI(_I),o=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
57
|
+
`)},w8=0,uc=[];function Q2(e){var t=rt.useRef([]),r=rt.useRef([0,0]),o=rt.useRef(),n=rt.useState(w8++)[0],a=rt.useState(ap)[0],i=rt.useRef(e);rt.useEffect(function(){i.current=e},[e]),rt.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(n));var m=_2([e.lockRef.current],(e.shards||[]).map(Y2),!0).filter(Boolean);return m.forEach(function(x){return x.classList.add("allow-interactivity-".concat(n))}),function(){document.body.classList.remove("block-interactivity-".concat(n)),m.forEach(function(x){return x.classList.remove("allow-interactivity-".concat(n))})}}},[e.inert,e.lockRef.current,e.shards]);var s=rt.useCallback(function(m,x){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!i.current.allowPinchZoom;var v=Sv(m),g=r.current,y="deltaX"in m?m.deltaX:g[0]-v[0],w="deltaY"in m?m.deltaY:g[1]-v[1],C,b=m.target,S=Math.abs(y)>Math.abs(w)?"h":"v";if("touches"in m&&S==="h"&&b.type==="range")return!1;var L=SS(S,b);if(!L)return!0;if(L?C=S:(C=S==="v"?"h":"v",L=SS(S,b)),!L)return!1;if(!o.current&&"changedTouches"in m&&(y||w)&&(o.current=C),!C)return!0;var T=o.current||C;return K2(T,x,m,T==="h"?y:w,!0)},[]),l=rt.useCallback(function(m){var x=m;if(!(!uc.length||uc[uc.length-1]!==a)){var v="deltaY"in x?X2(x):Sv(x),g=t.current.filter(function(C){return C.name===x.type&&(C.target===x.target||x.target===C.shadowParent)&&y8(C.delta,v)})[0];if(g&&g.should){x.cancelable&&x.preventDefault();return}if(!g){var y=(i.current.shards||[]).map(Y2).filter(Boolean).filter(function(C){return C.contains(x.target)}),w=y.length>0?s(x,y[0]):!i.current.noIsolation;w&&x.cancelable&&x.preventDefault()}}},[]),u=rt.useCallback(function(m,x,v,g){var y={name:m,delta:x,target:v,should:g,shadowParent:C8(v)};t.current.push(y),setTimeout(function(){t.current=t.current.filter(function(w){return w!==y})},1)},[]),c=rt.useCallback(function(m){r.current=Sv(m),o.current=void 0},[]),d=rt.useCallback(function(m){u(m.type,X2(m),m.target,s(m,e.lockRef.current))},[]),f=rt.useCallback(function(m){u(m.type,Sv(m),m.target,s(m,e.lockRef.current))},[]);rt.useEffect(function(){return uc.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",l,pl),document.addEventListener("touchmove",l,pl),document.addEventListener("touchstart",c,pl),function(){uc=uc.filter(function(m){return m!==a}),document.removeEventListener("wheel",l,pl),document.removeEventListener("touchmove",l,pl),document.removeEventListener("touchstart",c,pl)}},[]);var p=e.removeScrollBar,h=e.inert;return rt.createElement(rt.Fragment,null,h?rt.createElement(a,{styles:x8(n)}):null,p?rt.createElement(wS,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function C8(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var Z2=mS(Cv,Q2);var J2=bv.forwardRef(function(e,t){return bv.createElement(np,eo({},e,{ref:t,sideCar:Z2}))});J2.classNames=np.classNames;var _a=J2;var Pt=R(M(),1),Rv="Popover",[e_,FRe]=Te(Rv,[Uo]),sp=Uo(),[S8,Gi]=e_(Rv),t_=e=>{let{__scopePopover:t,children:r,open:o,defaultOpen:n,onOpenChange:a,modal:i=!1}=e,s=sp(t),l=lt.useRef(null),[u,c]=lt.useState(!1),[d,f]=ze({prop:o,defaultProp:n??!1,onChange:a,caller:Rv});return(0,Pt.jsx)(Da,{...s,children:(0,Pt.jsx)(S8,{scope:t,contentId:qe(),triggerRef:l,open:d,onOpenChange:f,onOpenToggle:lt.useCallback(()=>f(p=>!p),[f]),hasCustomAnchor:u,onCustomAnchorAdd:lt.useCallback(()=>c(!0),[]),onCustomAnchorRemove:lt.useCallback(()=>c(!1),[]),modal:i,children:r})})};t_.displayName=Rv;var r_="PopoverAnchor",o_=lt.forwardRef((e,t)=>{let{__scopePopover:r,...o}=e,n=Gi(r_,r),a=sp(r),{onCustomAnchorAdd:i,onCustomAnchorRemove:s}=n;return lt.useEffect(()=>(i(),()=>s()),[i,s]),(0,Pt.jsx)(Na,{...a,...o,ref:t})});o_.displayName=r_;var n_="PopoverTrigger",a_=lt.forwardRef((e,t)=>{let{__scopePopover:r,...o}=e,n=Gi(n_,r),a=sp(r),i=ne(t,n.triggerRef),s=(0,Pt.jsx)($.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":c_(n.open),...o,ref:i,onClick:H(e.onClick,n.onOpenToggle)});return n.hasCustomAnchor?s:(0,Pt.jsx)(Na,{asChild:!0,...a,children:s})});a_.displayName=n_;var bS="PopoverPortal",[b8,R8]=e_(bS,{forceMount:void 0}),L8=e=>{let{__scopePopover:t,forceMount:r,children:o,container:n}=e,a=Gi(bS,t);return(0,Pt.jsx)(b8,{scope:t,forceMount:r,children:(0,Pt.jsx)(it,{present:r||a.open,children:(0,Pt.jsx)(vo,{asChild:!0,container:n,children:o})})})};L8.displayName=bS;var cc="PopoverContent",i_=lt.forwardRef((e,t)=>{let r=R8(cc,e.__scopePopover),{forceMount:o=r.forceMount,...n}=e,a=Gi(cc,e.__scopePopover);return(0,Pt.jsx)(it,{present:o||a.open,children:a.modal?(0,Pt.jsx)(P8,{...n,ref:t}):(0,Pt.jsx)(T8,{...n,ref:t})})});i_.displayName=cc;var I8=oo("PopoverContent.RemoveScroll"),P8=lt.forwardRef((e,t)=>{let r=Gi(cc,e.__scopePopover),o=lt.useRef(null),n=ne(t,o),a=lt.useRef(!1);return lt.useEffect(()=>{let i=o.current;if(i)return Wi(i)},[]),(0,Pt.jsx)(_a,{as:I8,allowPinchZoom:!0,children:(0,Pt.jsx)(s_,{...e,ref:n,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:H(e.onCloseAutoFocus,i=>{i.preventDefault(),a.current||r.triggerRef.current?.focus()}),onPointerDownOutside:H(e.onPointerDownOutside,i=>{let s=i.detail.originalEvent,l=s.button===0&&s.ctrlKey===!0,u=s.button===2||l;a.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:H(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1})})})}),T8=lt.forwardRef((e,t)=>{let r=Gi(cc,e.__scopePopover),o=lt.useRef(!1),n=lt.useRef(!1);return(0,Pt.jsx)(s_,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{e.onCloseAutoFocus?.(a),a.defaultPrevented||(o.current||r.triggerRef.current?.focus(),a.preventDefault()),o.current=!1,n.current=!1},onInteractOutside:a=>{e.onInteractOutside?.(a),a.defaultPrevented||(o.current=!0,a.detail.originalEvent.type==="pointerdown"&&(n.current=!0));let i=a.target;r.triggerRef.current?.contains(i)&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&n.current&&a.preventDefault()}})}),s_=lt.forwardRef((e,t)=>{let{__scopePopover:r,trapFocus:o,onOpenAutoFocus:n,onCloseAutoFocus:a,disableOutsidePointerEvents:i,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:u,onInteractOutside:c,...d}=e,f=Gi(cc,r),p=sp(r);return Vi(),(0,Pt.jsx)(Ea,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:n,onUnmountAutoFocus:a,children:(0,Pt.jsx)(Fo,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:c,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:u,onDismiss:()=>f.onOpenChange(!1),children:(0,Pt.jsx)(Ui,{"data-state":c_(f.open),role:"dialog",id:f.contentId,...p,...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)"}})})})}),l_="PopoverClose",u_=lt.forwardRef((e,t)=>{let{__scopePopover:r,...o}=e,n=Gi(l_,r);return(0,Pt.jsx)($.button,{type:"button",...o,ref:t,onClick:H(e.onClick,()=>n.onOpenChange(!1))})});u_.displayName=l_;var k8="PopoverArrow",M8=lt.forwardRef((e,t)=>{let{__scopePopover:r,...o}=e,n=sp(r);return(0,Pt.jsx)(zi,{...n,...o,ref:t})});M8.displayName=k8;function c_(e){return e?"open":"closed"}var d_=t_,f_=o_,p_=a_;var RS=i_,m_=u_;var Yn=R(M()),A8=ee("z-50 w-72 rounded-md border border-border bg-background p-4 shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",{variants:{variant:{default:"",destructive:"border-destructive bg-destructive/5",outline:"border-border bg-transparent",subtle:"border-transparent bg-muted/50"},size:{sm:"w-48 p-3",default:"w-72 p-4",lg:"w-96 p-5"},side:{top:"data-[side=top]:slide-in-from-bottom-2",right:"data-[side=right]:slide-in-from-left-2",bottom:"data-[side=bottom]:slide-in-from-top-2",left:"data-[side=left]:slide-in-from-right-2"},position:{pointerEventsNone:"pointer-events-none",default:""},radius:{none:"rounded-none",sm:"rounded-sm",default:"rounded-md",lg:"rounded-lg",full:"rounded-full"},shadow:{none:"shadow-none",sm:"shadow-sm",default:"shadow-md",md:"shadow-md",lg:"shadow-lg",xl:"shadow-xl"}},defaultVariants:{variant:"default",size:"default",radius:"default",shadow:"default"}}),Oa=d_,Fa=p_,HRe=f_,Qn=g_.forwardRef(({className:e,variant:t,size:r,side:o,position:n,radius:a,shadow:i,backdrop:s=!1,closeOnInteractOutside:l=!0,overlayBackdrop:u=!1,sideOffset:c=4,...d},f)=>(0,Yn.jsxs)(Yn.Fragment,{children:[u&&(0,Yn.jsx)("div",{className:"fixed inset-0 z-40 bg-overlay opacity-30"}),(0,Yn.jsx)(RS,{ref:f,sideOffset:c,collisionPadding:8,onInteractOutside:p=>{l||p.preventDefault()},className:I(A8({variant:t,size:r,side:o,position:n,radius:a,shadow:i}),s&&"backdrop-blur-md bg-opacity-80",e),...d})]}));Qn.displayName=RS.displayName;var URe=m_,D8=({className:e,...t})=>(0,Yn.jsx)("div",{className:I("moonui-theme","my-2 h-px bg-border",e),...t});D8.displayName="PopoverSeparator";var N8=({className:e,...t})=>(0,Yn.jsx)("div",{className:I("moonui-theme","-mx-4 -mt-4 mb-3 px-4 pt-4 pb-3 border-b border-border",e),...t});N8.displayName="PopoverHeader";var _8=({className:e,...t})=>(0,Yn.jsx)("div",{className:I("moonui-theme","-mx-4 -mb-4 mt-3 px-4 pt-3 pb-4 border-t border-border",e),...t});_8.displayName="PopoverFooter";var up=R(E());var Ba=R(E(),1);var jt=R(E(),1);var ji=R(M(),1),LS="rovingFocusGroup.onEntryFocus",O8={bubbles:!1,cancelable:!0},lp="RovingFocusGroup",[IS,h_,F8]=En(lp),[V8,dc]=Te(lp,[F8]),[B8,H8]=V8(lp),v_=jt.forwardRef((e,t)=>(0,ji.jsx)(IS.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,ji.jsx)(IS.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,ji.jsx)(U8,{...e,ref:t})})}));v_.displayName=lp;var U8=jt.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:r,orientation:o,loop:n=!1,dir:a,currentTabStopId:i,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:c=!1,...d}=e,f=jt.useRef(null),p=ne(t,f),h=Vn(a),[m,x]=ze({prop:i,defaultProp:s??null,onChange:l,caller:lp}),[v,g]=jt.useState(!1),y=et(u),w=h_(r),C=jt.useRef(!1),[b,S]=jt.useState(0);return jt.useEffect(()=>{let L=f.current;if(L)return L.addEventListener(LS,y),()=>L.removeEventListener(LS,y)},[y]),(0,ji.jsx)(B8,{scope:r,orientation:o,dir:h,loop:n,currentTabStopId:m,onItemFocus:jt.useCallback(L=>x(L),[x]),onItemShiftTab:jt.useCallback(()=>g(!0),[]),onFocusableItemAdd:jt.useCallback(()=>S(L=>L+1),[]),onFocusableItemRemove:jt.useCallback(()=>S(L=>L-1),[]),children:(0,ji.jsx)($.div,{tabIndex:v||b===0?-1:0,"data-orientation":o,...d,ref:p,style:{outline:"none",...e.style},onMouseDown:H(e.onMouseDown,()=>{C.current=!0}),onFocus:H(e.onFocus,L=>{let T=!C.current;if(L.target===L.currentTarget&&T&&!v){let P=new CustomEvent(LS,O8);if(L.currentTarget.dispatchEvent(P),!P.defaultPrevented){let A=w().filter(N=>N.focusable),_=A.find(N=>N.active),G=A.find(N=>N.id===m),W=[_,G,...A].filter(Boolean).map(N=>N.ref.current);w_(W,c)}}C.current=!1}),onBlur:H(e.onBlur,()=>g(!1))})})}),y_="RovingFocusGroupItem",x_=jt.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:r,focusable:o=!0,active:n=!1,tabStopId:a,children:i,...s}=e,l=qe(),u=a||l,c=H8(y_,r),d=c.currentTabStopId===u,f=h_(r),{onFocusableItemAdd:p,onFocusableItemRemove:h,currentTabStopId:m}=c;return jt.useEffect(()=>{if(o)return p(),()=>h()},[o,p,h]),(0,ji.jsx)(IS.ItemSlot,{scope:r,id:u,focusable:o,active:n,children:(0,ji.jsx)($.span,{tabIndex:d?0:-1,"data-orientation":c.orientation,...s,ref:t,onMouseDown:H(e.onMouseDown,x=>{o?c.onItemFocus(u):x.preventDefault()}),onFocus:H(e.onFocus,()=>c.onItemFocus(u)),onKeyDown:H(e.onKeyDown,x=>{if(x.key==="Tab"&&x.shiftKey){c.onItemShiftTab();return}if(x.target!==x.currentTarget)return;let v=G8(x,c.orientation,c.dir);if(v!==void 0){if(x.metaKey||x.ctrlKey||x.altKey||x.shiftKey)return;x.preventDefault();let y=f().filter(w=>w.focusable).map(w=>w.ref.current);if(v==="last")y.reverse();else if(v==="prev"||v==="next"){v==="prev"&&y.reverse();let w=y.indexOf(x.currentTarget);y=c.loop?j8(y,w+1):y.slice(w+1)}setTimeout(()=>w_(y))}}),children:typeof i=="function"?i({isCurrentTabStop:d,hasTabStop:m!=null}):i})})});x_.displayName=y_;var z8={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function W8(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function G8(e,t,r){let o=W8(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return z8[o]}function w_(e,t=!1){let r=document.activeElement;for(let o of e)if(o===r||(o.focus({preventScroll:t}),document.activeElement!==r))return}function j8(e,t){return e.map((r,o)=>e[(t+o)%e.length])}var Lv=v_,Iv=x_;var Va=R(M(),1),Pv="Tabs",[q8,iLe]=Te(Pv,[dc]),S_=dc(),[$8,PS]=q8(Pv),b_=Ba.forwardRef((e,t)=>{let{__scopeTabs:r,value:o,onValueChange:n,defaultValue:a,orientation:i="horizontal",dir:s,activationMode:l="automatic",...u}=e,c=Vn(s),[d,f]=ze({prop:o,onChange:n,defaultProp:a??"",caller:Pv});return(0,Va.jsx)($8,{scope:r,baseId:qe(),value:d,onValueChange:f,orientation:i,dir:c,activationMode:l,children:(0,Va.jsx)($.div,{dir:c,"data-orientation":i,...u,ref:t})})});b_.displayName=Pv;var R_="TabsList",L_=Ba.forwardRef((e,t)=>{let{__scopeTabs:r,loop:o=!0,...n}=e,a=PS(R_,r),i=S_(r);return(0,Va.jsx)(Lv,{asChild:!0,...i,orientation:a.orientation,dir:a.dir,loop:o,children:(0,Va.jsx)($.div,{role:"tablist","aria-orientation":a.orientation,...n,ref:t})})});L_.displayName=R_;var I_="TabsTrigger",P_=Ba.forwardRef((e,t)=>{let{__scopeTabs:r,value:o,disabled:n=!1,...a}=e,i=PS(I_,r),s=S_(r),l=M_(i.baseId,o),u=E_(i.baseId,o),c=o===i.value;return(0,Va.jsx)(Iv,{asChild:!0,...s,focusable:!n,active:c,children:(0,Va.jsx)($.button,{type:"button",role:"tab","aria-selected":c,"aria-controls":u,"data-state":c?"active":"inactive","data-disabled":n?"":void 0,disabled:n,id:l,...a,ref:t,onMouseDown:H(e.onMouseDown,d=>{!n&&d.button===0&&d.ctrlKey===!1?i.onValueChange(o):d.preventDefault()}),onKeyDown:H(e.onKeyDown,d=>{[" ","Enter"].includes(d.key)&&i.onValueChange(o)}),onFocus:H(e.onFocus,()=>{let d=i.activationMode!=="manual";!c&&!n&&d&&i.onValueChange(o)})})})});P_.displayName=I_;var T_="TabsContent",k_=Ba.forwardRef((e,t)=>{let{__scopeTabs:r,value:o,forceMount:n,children:a,...i}=e,s=PS(T_,r),l=M_(s.baseId,o),u=E_(s.baseId,o),c=o===s.value,d=Ba.useRef(c);return Ba.useEffect(()=>{let f=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(f)},[]),(0,Va.jsx)(it,{present:n||c,children:({present:f})=>(0,Va.jsx)($.div,{"data-state":c?"active":"inactive","data-orientation":s.orientation,role:"tabpanel","aria-labelledby":l,hidden:!f,id:u,tabIndex:0,...i,ref:t,style:{...e.style,animationDuration:d.current?"0s":void 0},children:f&&a})})});k_.displayName=T_;function M_(e,t){return`${e}-trigger-${t}`}function E_(e,t){return`${e}-content-${t}`}var TS=b_,kS=L_,MS=P_,ES=k_;var Ha=R(M()),Tv=up.forwardRef(({vertical:e=!1,...t},r)=>(0,Ha.jsx)(TS,{ref:r,className:I("moonui-theme",t.className),orientation:e?"vertical":"horizontal",...t}));Tv.displayName=TS.displayName;var X8=ee("flex items-center justify-start transition-all duration-200",{variants:{variant:{default:"bg-muted rounded-md p-1 text-muted-foreground dark:bg-gray-800/80 dark:text-gray-400",pills:"bg-transparent gap-2 p-0 dark:text-gray-400",underline:"bg-transparent border-b border-border dark:border-gray-700 gap-4 dark:text-gray-400",cards:"bg-transparent gap-2 p-0 dark:text-gray-400",minimal:"bg-transparent gap-1 p-0 dark:text-gray-400"},orientation:{horizontal:"flex-row",vertical:"flex-col items-start gap-1"},fullWidth:{true:"w-full"}},defaultVariants:{variant:"default",orientation:"horizontal",fullWidth:!1}}),kv=up.forwardRef(({className:e,variant:t,orientation:r,fullWidth:o,...n},a)=>(0,Ha.jsx)(kS,{ref:a,className:I("moonui-theme",X8({variant:t,orientation:r,fullWidth:o,className:e})),...n}));kv.displayName=kS.displayName;var Y8=ee("inline-flex items-center justify-center whitespace-nowrap font-medium ring-offset-background transition-all duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"rounded-md data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm dark:data-[state=active]:bg-gray-900 dark:data-[state=active]:text-gray-100 dark:data-[state=active]:shadow-gray-950/10",underline:"rounded-none border-b-2 border-transparent pb-2 data-[state=active]:border-primary data-[state=active]:bg-transparent data-[state=active]:text-foreground dark:data-[state=active]:border-primary/80 dark:data-[state=active]:text-gray-100",pills:"rounded-full bg-muted hover:bg-muted/80 data-[state=active]:bg-primary data-[state=active]:text-primary-foreground dark:bg-gray-800 dark:hover:bg-gray-700 dark:data-[state=active]:bg-primary/90 dark:data-[state=active]:text-white",cards:"rounded-md bg-muted/50 hover:bg-muted data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-md dark:bg-gray-800/50 dark:hover:bg-gray-700/50 dark:data-[state=active]:bg-gray-900 dark:data-[state=active]:text-gray-100 dark:data-[state=active]:shadow-gray-950/20",minimal:"rounded-sm bg-transparent hover:bg-muted/30 data-[state=active]:bg-transparent data-[state=active]:text-foreground data-[state=active]:underline data-[state=active]:underline-offset-4 dark:hover:bg-gray-800/30 dark:data-[state=active]:text-gray-200"},size:{sm:"h-7 px-2 text-xs",md:"h-9 px-3 py-1.5 text-sm",lg:"h-10 px-4 py-2 text-base"},orientation:{horizontal:"",vertical:"justify-start w-full text-left"},fullWidth:{true:"w-full"}},defaultVariants:{variant:"default",size:"md",orientation:"horizontal",fullWidth:!1}}),fc=up.forwardRef(({className:e,variant:t,size:r,icon:o,iconPosition:n="left",badge:a,fadeTabs:i=!1,orientation:s,fullWidth:l,children:u,...c},d)=>(0,Ha.jsxs)(MS,{ref:d,className:I("moonui-theme",Y8({variant:t,size:r,orientation:s,fullWidth:l}),i&&"data-[state=inactive]:opacity-60",e),...c,children:[o&&n==="left"&&(0,Ha.jsx)("span",{className:"mr-2",children:o}),u,o&&n==="right"&&(0,Ha.jsx)("span",{className:"ml-2",children:o}),a&&(0,Ha.jsx)("span",{className:"ml-2",children:a})]}));fc.displayName=MS.displayName;var pc=up.forwardRef(({className:e,animated:t=!1,...r},o)=>(0,Ha.jsx)(ES,{ref:o,className:I("moonui-theme","mt-6 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",t&&"data-[state=active]:animate-fadeIn data-[state=inactive]:animate-fadeOut",e),...r}));pc.displayName=ES.displayName;var qi=R(E());var Zn=R(M()),Q8=ee("relative flex w-full touch-none select-none items-center",{variants:{size:{sm:"h-5",default:"h-6",md:"h-8",lg:"h-10"}},defaultVariants:{size:"default"}}),Z8=ee("relative h-1.5 w-full grow overflow-hidden rounded-full",{variants:{variant:{default:"bg-muted",primary:"bg-primary/20",secondary:"bg-secondary/20",accent:"bg-accent/20",success:"bg-success/20",warning:"bg-warning/20",error:"bg-error/20"}},defaultVariants:{variant:"default"}}),J8=ee("absolute h-full",{variants:{variant:{default:"bg-foreground",primary:"bg-primary",secondary:"bg-secondary",accent:"bg-accent",success:"bg-success",warning:"bg-warning",error:"bg-error"}},defaultVariants:{variant:"primary"}}),e9=ee("block rounded-full border-2 ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"border-foreground bg-background",primary:"border-primary bg-background",secondary:"border-secondary bg-background",accent:"border-accent bg-background",success:"border-success bg-background",warning:"border-warning bg-background",error:"border-error bg-background"},size:{sm:"h-3 w-3",default:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"}},defaultVariants:{variant:"primary",size:"default"}}),Ua=qi.forwardRef(({className:e,size:t,trackVariant:r,rangeVariant:o,thumbVariant:n,thumbSize:a,showValueLabel:i=!1,valueLabelFormat:s,valueLabelClassName:l,value:u,defaultValue:c=[0],onValueChange:d,disabled:f,...p},h)=>{let[m,x]=qi.useState(u||c||[0]);qi.useEffect(()=>{u!==void 0&&x(u)},[u]);let v=P=>s?s(P):`${Math.round(P*100)/100}`,g=(P,A,_)=>(P-A)/(_-A)*100,y=qi.useRef(null),w=p.min||0,C=p.max||100,b=p.step||1,S=P=>{let A=P.map(_=>{if(b<1){let G=b.toString().split(".")[1]?.length||0;return Math.round(_*Math.pow(10,G))/Math.pow(10,G)}return Math.round(_)});x(A),d&&d(A)},L=P=>{if(f)return;let A=y.current;if(!A)return;let _=A.getBoundingClientRect(),G=(P.clientX-_.left)/_.width,D=w+G*(C-w),W=Math.round(D/b)*b,N=Math.max(w,Math.min(C,W)),z=[...m];z[0]=N,S(z)},T=P=>A=>{if(f)return;A.preventDefault();let _=D=>{let W=y.current;if(!W)return;let N=W.getBoundingClientRect(),z=(D.clientX-N.left)/N.width,V=w+z*(C-w),k=Math.round(V/b)*b,Z=Math.max(w,Math.min(C,k)),ve=[...m];ve[P]=Z,S(ve)},G=()=>{document.removeEventListener("mousemove",_),document.removeEventListener("mouseup",G)};document.addEventListener("mousemove",_),document.addEventListener("mouseup",G)};return(0,Zn.jsxs)("div",{className:"w-full",ref:h,...p,children:[i&&(0,Zn.jsx)("div",{className:I("flex justify-end mb-1 text-sm text-muted-foreground",l),children:m.length===1?(0,Zn.jsx)("span",{children:v(m[0])}):(0,Zn.jsxs)("span",{children:[v(m[0])," - ",v(m[m.length-1])]})}),(0,Zn.jsxs)("div",{className:I("moonui-theme",Q8({size:t}),e),"data-disabled":f?!0:void 0,children:[(0,Zn.jsx)("div",{ref:y,className:I(Z8({variant:r||n||"default"})),onClick:L,children:(0,Zn.jsx)("div",{className:I(J8({variant:o||n||"primary"})),style:{left:"0%",width:`${g(m[0],w,C)}%`}})}),m.map((P,A)=>(0,Zn.jsx)("div",{className:I(e9({variant:n||"primary",size:a})),style:{left:`${g(P,w,C)}%`,transform:"translateX(-50%)",position:"absolute",top:"50%",marginTop:a==="sm"?"-6px":a==="lg"?"-12px":"-8px",cursor:f?"not-allowed":"pointer"},onMouseDown:T(A),"aria-label":`Thumb ${A+1}`,tabIndex:f?-1:0,role:"slider","aria-valuemin":w,"aria-valuemax":C,"aria-valuenow":P,"aria-disabled":f},A))]})]})});Ua.displayName="Slider";var U=R(M()),A_=ee("relative inline-flex items-center justify-center",{variants:{size:{default:"h-10 w-10",sm:"h-8 w-8",lg:"h-12 w-12",xl:"h-16 w-16"},shape:{square:"rounded-md",circle:"rounded-full",rounded:"rounded-lg"}},defaultVariants:{size:"default",shape:"square"}});function D_(e){let t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}:null}function N_(e,t,r){return"#"+((1<<24)+(e<<16)+(t<<8)+r).toString(16).slice(1)}function t9(e){let t=D_(e);if(!t)return null;let r=t.r/255,o=t.g/255,n=t.b/255,a=Math.max(r,o,n),i=Math.min(r,o,n),s=0,l=0,u=(a+i)/2;if(a!==i){let c=a-i;switch(l=u>.5?c/(2-a-i):c/(a+i),a){case r:s=((o-n)/c+(o<n?6:0))/6;break;case o:s=((n-r)/c+2)/6;break;case n:s=((r-o)/c+4)/6;break}}return{h:Math.round(s*360),s:Math.round(l*100),l:Math.round(u*100)}}function r9(e,t,r){e=e/360,t=t/100,r=r/100;let o,n,a;if(t===0)o=n=a=r;else{let i=(u,c,d)=>(d<0&&(d+=1),d>1&&(d-=1),d<.16666666666666666?u+(c-u)*6*d:d<.5?c:d<.6666666666666666?u+(c-u)*(.6666666666666666-d)*6:u),s=r<.5?r*(1+t):r+t-r*t,l=2*r-s;o=i(l,s,e+1/3),n=i(l,s,e),a=i(l,s,e-1/3)}return N_(Math.round(o*255),Math.round(n*255),Math.round(a*255))}var __=["#000000","#ffffff","#ff0000","#00ff00","#0000ff","#ffff00","#ff00ff","#00ffff","#ff8800","#8800ff","#88ff00","#0088ff","#ff0088","#00ff88","#888888","#f87171","#fb923c","#fbbf24","#facc15","#a3e635","#4ade80","#34d399","#2dd4bf","#22d3ee","#38bdf8","#60a5fa","#818cf8","#a78bfa","#c084fc","#e879f9","#f472b6","#fb7185","#f43f5e","#ef4444","#dc2626"];function AS({className:e,size:t,shape:r,value:o="#000000",onChange:n,showInput:a=!0,showPresets:i=!0,presets:s=__,allowOpacity:l=!1,format:u="hex",disableCopy:c=!1,triggerMode:d="click",disabled:f,...p}){let[h,m]=zo.useState(!1),[x,v]=zo.useState(o),[g,y]=zo.useState(100),[w,C]=zo.useState(!1),[b,S]=zo.useState(o),L=zo.useMemo(()=>t9(x)||{h:0,s:0,l:0},[x]),T=zo.useMemo(()=>D_(x)||{r:0,g:0,b:0},[x]);zo.useEffect(()=>{v(o),S(o)},[o]);let P=N=>{v(N),S(N),n?.(N)},A=(N,z)=>{let V={...L,[N]:z},k=r9(V.h,V.s,V.l);P(k)},_=(N,z)=>{let V={...T,[N]:z},k=N_(V.r,V.g,V.b);P(k)},G=N=>{let z=N.target.value;S(z),/^#[0-9A-F]{6}$/i.test(z)&&P(z)},D=async()=>{try{let N=x;u==="rgb"?N=`rgb(${T.r}, ${T.g}, ${T.b})`:u==="hsl"&&(N=`hsl(${L.h}, ${L.s}%, ${L.l}%)`),await navigator.clipboard.writeText(N),C(!0),setTimeout(()=>C(!1),2e3)}catch(N){console.error("Failed to copy:",N)}},W=()=>u==="rgb"?`rgb(${T.r}, ${T.g}, ${T.b})`:u==="hsl"?`hsl(${L.h}, ${L.s}%, ${L.l}%)`:x;return(0,U.jsxs)(Oa,{open:h,onOpenChange:m,children:[(0,U.jsx)(Fa,{asChild:!0,children:(0,U.jsx)(Ve,{variant:"outline",className:I(A_({size:t,shape:r}),"p-0 border-2",e),style:{backgroundColor:x},disabled:f,...p,children:(0,U.jsx)("span",{className:"sr-only",children:"Pick a color"})})}),(0,U.jsxs)(Qn,{className:"w-80",align:"start",sideOffset:8,children:[(0,U.jsxs)(Tv,{defaultValue:"picker",className:"w-full",children:[(0,U.jsxs)(kv,{className:"grid w-full grid-cols-3",children:[(0,U.jsx)(fc,{value:"picker",children:"Picker"}),(0,U.jsx)(fc,{value:"sliders",children:"Sliders"}),(0,U.jsx)(fc,{value:"input",children:"Input"})]}),(0,U.jsxs)(pc,{value:"picker",className:"space-y-4",children:[(0,U.jsxs)("div",{className:"relative h-48 rounded-md overflow-hidden",children:[(0,U.jsx)("div",{className:"absolute inset-0",style:{background:`linear-gradient(to right, #fff, hsl(${L.h}, 100%, 50%))`}}),(0,U.jsx)("div",{className:"absolute inset-0",style:{background:"linear-gradient(to bottom, transparent, #000)"}}),(0,U.jsx)(Ee.div,{className:"absolute w-4 h-4 border-2 border-white rounded-full shadow-md cursor-pointer",drag:!0,dragConstraints:{left:-8,right:280,top:-8,bottom:184},dragElastic:0,style:{backgroundColor:x,left:`${L.s/100*280-8}px`,top:`${(1-L.l/100)*192-8}px`}})]}),(0,U.jsxs)("div",{className:"space-y-2",children:[(0,U.jsx)(Qr,{children:"Hue"}),(0,U.jsx)("div",{className:"relative h-3 rounded-full",style:{background:"linear-gradient(to right, #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000)"},children:(0,U.jsx)(Ua,{value:[L.h],onValueChange:([N])=>A("h",N),max:360,step:1,className:"absolute inset-0"})})]}),l&&(0,U.jsxs)("div",{className:"space-y-2",children:[(0,U.jsx)(Qr,{children:"Opacity"}),(0,U.jsxs)("div",{className:"flex items-center gap-3",children:[(0,U.jsx)(Ua,{value:[g],onValueChange:([N])=>y(N),max:100,step:1,className:"flex-1"}),(0,U.jsxs)("span",{className:"text-sm w-10 text-right",children:[g,"%"]})]})]})]}),(0,U.jsxs)(pc,{value:"sliders",className:"space-y-4",children:[(0,U.jsxs)("div",{className:"space-y-3",children:[(0,U.jsxs)("div",{className:"space-y-2",children:[(0,U.jsxs)("div",{className:"flex items-center justify-between",children:[(0,U.jsx)(Qr,{children:"Red"}),(0,U.jsx)("span",{className:"text-sm text-muted-foreground",children:T.r})]}),(0,U.jsx)(Ua,{value:[T.r],onValueChange:([N])=>_("r",N),max:255,step:1,className:"[&_[role=slider]]:bg-red-500"})]}),(0,U.jsxs)("div",{className:"space-y-2",children:[(0,U.jsxs)("div",{className:"flex items-center justify-between",children:[(0,U.jsx)(Qr,{children:"Green"}),(0,U.jsx)("span",{className:"text-sm text-muted-foreground",children:T.g})]}),(0,U.jsx)(Ua,{value:[T.g],onValueChange:([N])=>_("g",N),max:255,step:1,className:"[&_[role=slider]]:bg-green-500"})]}),(0,U.jsxs)("div",{className:"space-y-2",children:[(0,U.jsxs)("div",{className:"flex items-center justify-between",children:[(0,U.jsx)(Qr,{children:"Blue"}),(0,U.jsx)("span",{className:"text-sm text-muted-foreground",children:T.b})]}),(0,U.jsx)(Ua,{value:[T.b],onValueChange:([N])=>_("b",N),max:255,step:1,className:"[&_[role=slider]]:bg-blue-500"})]})]}),(0,U.jsx)("div",{className:"pt-2 border-t",children:(0,U.jsxs)("div",{className:"grid grid-cols-3 gap-2 text-sm",children:[(0,U.jsxs)("div",{children:[(0,U.jsx)("p",{className:"text-muted-foreground",children:"H"}),(0,U.jsxs)("p",{className:"font-medium",children:[L.h,"\xB0"]})]}),(0,U.jsxs)("div",{children:[(0,U.jsx)("p",{className:"text-muted-foreground",children:"S"}),(0,U.jsxs)("p",{className:"font-medium",children:[L.s,"%"]})]}),(0,U.jsxs)("div",{children:[(0,U.jsx)("p",{className:"text-muted-foreground",children:"L"}),(0,U.jsxs)("p",{className:"font-medium",children:[L.l,"%"]})]})]})})]}),(0,U.jsxs)(pc,{value:"input",className:"space-y-4",children:[(0,U.jsxs)("div",{className:"space-y-2",children:[(0,U.jsx)(Qr,{children:"Hex Color"}),(0,U.jsxs)("div",{className:"flex gap-2",children:[(0,U.jsx)(mr,{value:b,onChange:G,placeholder:"#000000",className:"font-mono"}),(0,U.jsx)(Ve,{size:"icon",variant:"outline",onClick:()=>P(b),children:(0,U.jsx)(lr,{className:"h-4 w-4"})})]})]}),(0,U.jsxs)("div",{className:"space-y-2",children:[(0,U.jsx)(Qr,{children:"RGB Values"}),(0,U.jsxs)("div",{className:"grid grid-cols-3 gap-2",children:[(0,U.jsx)(mr,{type:"number",value:T.r,onChange:N=>_("r",parseInt(N.target.value)||0),min:0,max:255,className:"text-center"}),(0,U.jsx)(mr,{type:"number",value:T.g,onChange:N=>_("g",parseInt(N.target.value)||0),min:0,max:255,className:"text-center"}),(0,U.jsx)(mr,{type:"number",value:T.b,onChange:N=>_("b",parseInt(N.target.value)||0),min:0,max:255,className:"text-center"})]})]})]})]}),(0,U.jsxs)("div",{className:"mt-4 flex items-center justify-between p-3 border rounded-lg",children:[(0,U.jsxs)("div",{className:"flex items-center gap-3",children:[(0,U.jsx)("div",{className:I("h-10 w-10 rounded border-2",A_({shape:r})),style:{backgroundColor:x}}),(0,U.jsxs)("div",{children:[(0,U.jsx)("p",{className:"text-sm font-medium",children:W()}),(0,U.jsx)("p",{className:"text-xs text-muted-foreground",children:"Current color"})]})]}),!c&&(0,U.jsx)(Ve,{size:"icon",variant:"ghost",onClick:D,className:"h-8 w-8",children:(0,U.jsx)(ba,{mode:"wait",children:w?(0,U.jsx)(Ee.div,{initial:{scale:0},animate:{scale:1},exit:{scale:0},children:(0,U.jsx)(lr,{className:"h-4 w-4 text-green-600"})},"check"):(0,U.jsx)(Ee.div,{initial:{scale:0},animate:{scale:1},exit:{scale:0},children:(0,U.jsx)(_d,{className:"h-4 w-4"})},"copy")})})]}),i&&s.length>0&&(0,U.jsxs)("div",{className:"mt-4 space-y-2",children:[(0,U.jsx)(Qr,{children:"Preset Colors"}),(0,U.jsx)("div",{className:"grid grid-cols-10 gap-1",children:s.map(N=>(0,U.jsx)("button",{className:I("h-7 w-7 rounded border-2 transition-all hover:scale-110",x===N?"border-primary":"border-transparent"),style:{backgroundColor:N},onClick:()=>P(N)},N))})]})]})]})}function o9({value:e="#000000",onChange:t,colors:r=__.slice(0,10),className:o,size:n="default"}){let a={sm:"h-6 w-6",default:"h-8 w-8",lg:"h-10 w-10"};return(0,U.jsx)("div",{className:I("moonui-theme","flex flex-wrap gap-2",o),children:r.map(i=>(0,U.jsx)("button",{className:I("rounded-full border-2 transition-all hover:scale-110",a[n],e===i?"border-primary ring-2 ring-primary/20":"border-transparent"),style:{backgroundColor:i},onClick:()=>t?.(i)},i))})}function n9({value:e={start:"#ff0000",end:"#0000ff",angle:90},onChange:t,className:r}){let[o,n]=zo.useState(e),a=(i,s)=>{let l={...o,[i]:s};n(l),t?.(l)};return(0,U.jsxs)("div",{className:I("moonui-theme","space-y-4",r),children:[(0,U.jsx)("div",{className:"h-20 rounded-lg border-2",style:{background:`linear-gradient(${o.angle}deg, ${o.start}, ${o.end})`}}),(0,U.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,U.jsxs)("div",{className:"space-y-2",children:[(0,U.jsx)(Qr,{children:"Start Color"}),(0,U.jsx)(AS,{value:o.start,onChange:i=>a("start",i),size:"sm"})]}),(0,U.jsxs)("div",{className:"space-y-2",children:[(0,U.jsx)(Qr,{children:"End Color"}),(0,U.jsx)(AS,{value:o.end,onChange:i=>a("end",i),size:"sm"})]})]}),(0,U.jsxs)("div",{className:"space-y-2",children:[(0,U.jsxs)("div",{className:"flex items-center justify-between",children:[(0,U.jsx)(Qr,{children:"Angle"}),(0,U.jsxs)("span",{className:"text-sm text-muted-foreground",children:[o.angle,"\xB0"]})]}),(0,U.jsx)(Ua,{value:[o.angle||90],onValueChange:([i])=>a("angle",i),max:360,step:1})]})]})}var Yi=R(E());var O_=1,a9=.9,i9=.8,s9=.17,DS=.1,NS=.999,l9=.9999,u9=.99,c9=/[\\\/_+.#"@\[\(\{&]/,d9=/[\\\/_+.#"@\[\(\{&]/g,f9=/[\s-]/,V_=/[\s-]/g;function _S(e,t,r,o,n,a,i){if(a===t.length)return n===e.length?O_:u9;var s=`${n},${a}`;if(i[s]!==void 0)return i[s];for(var l=o.charAt(a),u=r.indexOf(l,n),c=0,d,f,p,h;u>=0;)d=_S(e,t,r,o,u+1,a+1,i),d>c&&(u===n?d*=O_:c9.test(e.charAt(u-1))?(d*=i9,p=e.slice(n,u-1).match(d9),p&&n>0&&(d*=Math.pow(NS,p.length))):f9.test(e.charAt(u-1))?(d*=a9,h=e.slice(n,u-1).match(V_),h&&n>0&&(d*=Math.pow(NS,h.length))):(d*=s9,n>0&&(d*=Math.pow(NS,u-n))),e.charAt(u)!==t.charAt(a)&&(d*=l9)),(d<DS&&r.charAt(u-1)===o.charAt(a+1)||o.charAt(a+1)===o.charAt(a)&&r.charAt(u-1)!==o.charAt(a))&&(f=_S(e,t,r,o,u+1,a+2,i),f*DS>d&&(d=f*DS)),d>c&&(c=d),u=r.indexOf(l,u+1);return i[s]=c,c}function F_(e){return e.toLowerCase().replace(V_," ")}function B_(e,t,r){return e=r&&r.length>0?`${e+" "+r.join(" ")}`:e,_S(e,t,F_(e),F_(t),0,0,{})}var $e=R(Pe(),1);var MLe=!!(typeof window<"u"&&window.document&&window.document.createElement);function Tt(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(e?.(n),r===!1||!n.defaultPrevented)return t?.(n)}}var eO=R(Pe(),1);function J_(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function za(...e){return t=>{let r=!1,o=e.map(n=>{let a=J_(n,t);return!r&&typeof a=="function"&&(r=!0),a});if(r)return()=>{for(let n=0;n<o.length;n++){let a=o[n];typeof a=="function"?a():J_(e[n],null)}}}}function qt(...e){return eO.useCallback(za(...e),e)}var Wo=R(Pe(),1),zS=R(Sn(),1);function nO(e,t){let r=Wo.createContext(t),o=a=>{let{children:i,...s}=a,l=Wo.useMemo(()=>s,Object.values(s));return(0,zS.jsx)(r.Provider,{value:l,children:i})};o.displayName=e+"Provider";function n(a){let i=Wo.useContext(r);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[o,n]}function Av(e,t=[]){let r=[];function o(a,i){let s=Wo.createContext(i),l=r.length;r=[...r,i];let u=d=>{let{scope:f,children:p,...h}=d,m=f?.[e]?.[l]||s,x=Wo.useMemo(()=>h,Object.values(h));return(0,zS.jsx)(m.Provider,{value:x,children:p})};u.displayName=a+"Provider";function c(d,f){let p=f?.[e]?.[l]||s,h=Wo.useContext(p);if(h)return h;if(i!==void 0)return i;throw new Error(`\`${d}\` must be used within \`${a}\``)}return[u,c]}let n=()=>{let a=r.map(i=>Wo.createContext(i));return function(s){let l=s?.[e]||a;return Wo.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return n.scopeName=e,[o,M9(n,...t)]}function M9(...e){let t=e[0];if(e.length===1)return t;let r=()=>{let o=e.map(n=>({useScope:n(),scopeName:n.scopeName}));return function(a){let i=o.reduce((s,{useScope:l,scopeName:u})=>{let d=l(a)[`__scope${u}`];return{...s,...d}},{});return Wo.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return r.scopeName=t.scopeName,r}var WS=R(Pe(),1);var aO=R(Pe(),1),bn=globalThis?.document?aO.useLayoutEffect:()=>{};var E9=WS[" useId ".trim().toString()]||(()=>{}),A9=0;function Rn(e){let[t,r]=WS.useState(E9());return bn(()=>{e||r(o=>o??String(A9++))},[e]),e||(t?`radix-${t}`:"")}var Go=R(Pe(),1);var Nv=R(Pe(),1);var D9=Go[" useInsertionEffect ".trim().toString()]||bn;function Dv({prop:e,defaultProp:t,onChange:r=()=>{},caller:o}){let[n,a,i]=N9({defaultProp:t,onChange:r}),s=e!==void 0,l=s?e:n;{let c=Go.useRef(e!==void 0);Go.useEffect(()=>{let d=c.current;d!==s&&console.warn(`${o} is changing from ${d?"controlled":"uncontrolled"} to ${s?"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.`),c.current=s},[s,o])}let u=Go.useCallback(c=>{if(s){let d=_9(c)?c(e):c;d!==e&&i.current?.(d)}else a(c)},[s,e,a,i]);return[l,u]}function N9({defaultProp:e,onChange:t}){let[r,o]=Go.useState(e),n=Go.useRef(r),a=Go.useRef(t);return D9(()=>{a.current=t},[t]),Go.useEffect(()=>{n.current!==r&&(a.current?.(r),n.current=r)},[r,n]),[r,o,a]}function _9(e){return typeof e=="function"}var HLe=Symbol("RADIX:SYNC_STATE");var ht=R(Pe(),1);var cO=R(Pe(),1),dO=R(GS(),1);var Ot=R(Pe(),1);var Ov=R(Sn(),1);function Fv(e){let t=B9(e),r=Ot.forwardRef((o,n)=>{let{children:a,...i}=o,s=Ot.Children.toArray(a),l=s.find(U9);if(l){let u=l.props.children,c=s.map(d=>d===l?Ot.Children.count(u)>1?Ot.Children.only(null):Ot.isValidElement(u)?u.props.children:null:d);return(0,Ov.jsx)(t,{...i,ref:n,children:Ot.isValidElement(u)?Ot.cloneElement(u,void 0,c):null})}return(0,Ov.jsx)(t,{...i,ref:n,children:a})});return r.displayName=`${e}.Slot`,r}function B9(e){let t=Ot.forwardRef((r,o)=>{let{children:n,...a}=r;if(Ot.isValidElement(n)){let i=W9(n),s=z9(a,n.props);return n.type!==Ot.Fragment&&(s.ref=o?za(o,i):i),Ot.cloneElement(n,s)}return Ot.Children.count(n)>1?Ot.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var H9=Symbol("radix.slottable");function U9(e){return Ot.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===H9}function z9(e,t){let r={...t};for(let o in t){let n=e[o],a=t[o];/^on[A-Z]/.test(o)?n&&a?r[o]=(...s)=>{let l=a(...s);return n(...s),l}:n&&(r[o]=n):o==="style"?r[o]={...n,...a}:o==="className"&&(r[o]=[n,a].filter(Boolean).join(" "))}return{...e,...r}}function W9(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var fO=R(Sn(),1),G9=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Oe=G9.reduce((e,t)=>{let r=Fv(`Primitive.${t}`),o=cO.forwardRef((n,a)=>{let{asChild:i,...s}=n,l=i?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,fO.jsx)(l,{...s,ref:a})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function pO(e,t){e&&dO.flushSync(()=>e.dispatchEvent(t))}var hc=R(Pe(),1);function hr(e){let t=hc.useRef(e);return hc.useEffect(()=>{t.current=e}),hc.useMemo(()=>(...r)=>t.current?.(...r),[])}var mO=R(Pe(),1);function gO(e,t=globalThis?.document){let r=hr(e);mO.useEffect(()=>{let o=n=>{n.key==="Escape"&&r(n)};return t.addEventListener("keydown",o,{capture:!0}),()=>t.removeEventListener("keydown",o,{capture:!0})},[r,t])}var qS=R(Sn(),1),j9="DismissableLayer",jS="dismissableLayer.update",q9="dismissableLayer.pointerDownOutside",$9="dismissableLayer.focusOutside",hO,yO=ht.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),$S=ht.forwardRef((e,t)=>{let{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:n,onFocusOutside:a,onInteractOutside:i,onDismiss:s,...l}=e,u=ht.useContext(yO),[c,d]=ht.useState(null),f=c?.ownerDocument??globalThis?.document,[,p]=ht.useState({}),h=qt(t,S=>d(S)),m=Array.from(u.layers),[x]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=m.indexOf(x),g=c?m.indexOf(c):-1,y=u.layersWithOutsidePointerEventsDisabled.size>0,w=g>=v,C=Y9(S=>{let L=S.target,T=[...u.branches].some(P=>P.contains(L));!w||T||(n?.(S),i?.(S),S.defaultPrevented||s?.())},f),b=Q9(S=>{let L=S.target;[...u.branches].some(P=>P.contains(L))||(a?.(S),i?.(S),S.defaultPrevented||s?.())},f);return gO(S=>{g===u.layers.size-1&&(o?.(S),!S.defaultPrevented&&s&&(S.preventDefault(),s()))},f),ht.useEffect(()=>{if(c)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(hO=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(c)),u.layers.add(c),vO(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=hO)}},[c,f,r,u]),ht.useEffect(()=>()=>{c&&(u.layers.delete(c),u.layersWithOutsidePointerEventsDisabled.delete(c),vO())},[c,u]),ht.useEffect(()=>{let S=()=>p({});return document.addEventListener(jS,S),()=>document.removeEventListener(jS,S)},[]),(0,qS.jsx)(Oe.div,{...l,ref:h,style:{pointerEvents:y?w?"auto":"none":void 0,...e.style},onFocusCapture:Tt(e.onFocusCapture,b.onFocusCapture),onBlurCapture:Tt(e.onBlurCapture,b.onBlurCapture),onPointerDownCapture:Tt(e.onPointerDownCapture,C.onPointerDownCapture)})});$S.displayName=j9;var K9="DismissableLayerBranch",X9=ht.forwardRef((e,t)=>{let r=ht.useContext(yO),o=ht.useRef(null),n=qt(t,o);return ht.useEffect(()=>{let a=o.current;if(a)return r.branches.add(a),()=>{r.branches.delete(a)}},[r.branches]),(0,qS.jsx)(Oe.div,{...e,ref:n})});X9.displayName=K9;function Y9(e,t=globalThis?.document){let r=hr(e),o=ht.useRef(!1),n=ht.useRef(()=>{});return ht.useEffect(()=>{let a=s=>{if(s.target&&!o.current){let u=function(){xO(q9,r,c,{discrete:!0})};var l=u;let c={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",n.current),n.current=u,t.addEventListener("click",n.current,{once:!0})):u()}else t.removeEventListener("click",n.current);o.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",a),t.removeEventListener("click",n.current)}},[t,r]),{onPointerDownCapture:()=>o.current=!0}}function Q9(e,t=globalThis?.document){let r=hr(e),o=ht.useRef(!1);return ht.useEffect(()=>{let n=a=>{a.target&&!o.current&&xO($9,r,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",n),()=>t.removeEventListener("focusin",n)},[t,r]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function vO(){let e=new CustomEvent(jS);document.dispatchEvent(e)}function xO(e,t,r,{discrete:o}){let n=r.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&n.addEventListener(e,t,{once:!0}),o?pO(n,a):n.dispatchEvent(a)}var jo=R(Pe(),1);var RO=R(Sn(),1),KS="focusScope.autoFocusOnMount",XS="focusScope.autoFocusOnUnmount",wO={bubbles:!1,cancelable:!0},Z9="FocusScope",YS=jo.forwardRef((e,t)=>{let{loop:r=!1,trapped:o=!1,onMountAutoFocus:n,onUnmountAutoFocus:a,...i}=e,[s,l]=jo.useState(null),u=hr(n),c=hr(a),d=jo.useRef(null),f=qt(t,m=>l(m)),p=jo.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;jo.useEffect(()=>{if(o){let g=function(b){if(p.paused||!s)return;let S=b.target;s.contains(S)?d.current=S:Ki(d.current,{select:!0})},y=function(b){if(p.paused||!s)return;let S=b.relatedTarget;S!==null&&(s.contains(S)||Ki(d.current,{select:!0}))},w=function(b){if(document.activeElement===document.body)for(let L of b)L.removedNodes.length>0&&Ki(s)};var m=g,x=y,v=w;document.addEventListener("focusin",g),document.addEventListener("focusout",y);let C=new MutationObserver(w);return s&&C.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",y),C.disconnect()}}},[o,s,p.paused]),jo.useEffect(()=>{if(s){SO.add(p);let m=document.activeElement;if(!s.contains(m)){let v=new CustomEvent(KS,wO);s.addEventListener(KS,u),s.dispatchEvent(v),v.defaultPrevented||(J9(n7(LO(s)),{select:!0}),document.activeElement===m&&Ki(s))}return()=>{s.removeEventListener(KS,u),setTimeout(()=>{let v=new CustomEvent(XS,wO);s.addEventListener(XS,c),s.dispatchEvent(v),v.defaultPrevented||Ki(m??document.body,{select:!0}),s.removeEventListener(XS,c),SO.remove(p)},0)}}},[s,u,c,p]);let h=jo.useCallback(m=>{if(!r&&!o||p.paused)return;let x=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,v=document.activeElement;if(x&&v){let g=m.currentTarget,[y,w]=e7(g);y&&w?!m.shiftKey&&v===w?(m.preventDefault(),r&&Ki(y,{select:!0})):m.shiftKey&&v===y&&(m.preventDefault(),r&&Ki(w,{select:!0})):v===g&&m.preventDefault()}},[r,o,p.paused]);return(0,RO.jsx)(Oe.div,{tabIndex:-1,...i,ref:f,onKeyDown:h})});YS.displayName=Z9;function J9(e,{select:t=!1}={}){let r=document.activeElement;for(let o of e)if(Ki(o,{select:t}),document.activeElement!==r)return}function e7(e){let t=LO(e),r=CO(t,e),o=CO(t.reverse(),e);return[r,o]}function LO(e){let t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{let n=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||n?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function CO(e,t){for(let r of e)if(!t7(r,{upTo:t}))return r}function t7(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 r7(e){return e instanceof HTMLInputElement&&"select"in e}function Ki(e,{select:t=!1}={}){if(e&&e.focus){let r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&r7(e)&&t&&e.select()}}var SO=o7();function o7(){let e=[];return{add(t){let r=e[0];t!==r&&r?.pause(),e=bO(e,t),e.unshift(t)},remove(t){e=bO(e,t),e[0]?.resume()}}}function bO(e,t){let r=[...e],o=r.indexOf(t);return o!==-1&&r.splice(o,1),r}function n7(e){return e.filter(t=>t.tagName!=="A")}var Vv=R(Pe(),1),IO=R(GS(),1);var PO=R(Sn(),1),a7="Portal",QS=Vv.forwardRef((e,t)=>{let{container:r,...o}=e,[n,a]=Vv.useState(!1);bn(()=>a(!0),[]);let i=r||n&&globalThis?.document?.body;return i?IO.default.createPortal((0,PO.jsx)(Oe.div,{...o,ref:t}),i):null});QS.displayName=a7;var to=R(Pe(),1);var TO=R(Pe(),1);function i7(e,t){return TO.useReducer((r,o)=>t[r][o]??r,e)}var Jn=e=>{let{present:t,children:r}=e,o=s7(t),n=typeof r=="function"?r({present:o.isPresent}):to.Children.only(r),a=qt(o.ref,l7(n));return typeof r=="function"||o.isPresent?to.cloneElement(n,{ref:a}):null};Jn.displayName="Presence";function s7(e){let[t,r]=to.useState(),o=to.useRef(null),n=to.useRef(e),a=to.useRef("none"),i=e?"mounted":"unmounted",[s,l]=i7(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return to.useEffect(()=>{let u=Bv(o.current);a.current=s==="mounted"?u:"none"},[s]),bn(()=>{let u=o.current,c=n.current;if(c!==e){let f=a.current,p=Bv(u);e?l("MOUNT"):p==="none"||u?.display==="none"?l("UNMOUNT"):l(c&&f!==p?"ANIMATION_OUT":"UNMOUNT"),n.current=e}},[e,l]),bn(()=>{if(t){let u,c=t.ownerDocument.defaultView??window,d=p=>{let m=Bv(o.current).includes(CSS.escape(p.animationName));if(p.target===t&&m&&(l("ANIMATION_END"),!n.current)){let x=t.style.animationFillMode;t.style.animationFillMode="forwards",u=c.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},f=p=>{p.target===t&&(a.current=Bv(o.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{c.clearTimeout(u),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:to.useCallback(u=>{o.current=u?getComputedStyle(u):null,r(u)},[])}}function Bv(e){return e?.animationName||"none"}function l7(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var MO=R(Pe(),1),ZS=0;function EO(){MO.useEffect(()=>{let e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??kO()),document.body.insertAdjacentElement("beforeend",e[1]??kO()),ZS++,()=>{ZS===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),ZS--}},[])}function kO(){let 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 ro=function(){return ro=Object.assign||function(t){for(var r,o=1,n=arguments.length;o<n;o++){r=arguments[o];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},ro.apply(this,arguments)};function Hv(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]]);return r}function AO(e,t,r){if(r||arguments.length===2)for(var o=0,n=t.length,a;o<n;o++)(a||!(o in t))&&(a||(a=Array.prototype.slice.call(t,0,o)),a[o]=t[o]);return e.concat(a||Array.prototype.slice.call(t))}var jv=R(Pe());var vr=R(Pe());var ml="right-scroll-bar-position",gl="width-before-scroll-bar",JS="with-scroll-bars-hidden",eb="--removed-body-scroll-bar-size";function Uv(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}var DO=R(Pe());function NO(e,t){var r=(0,DO.useState)(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(o){var n=r.value;n!==o&&(r.value=o,r.callback(o,n))}}}})[0];return r.callback=t,r.facade}var zv=R(Pe());var u7=typeof window<"u"?zv.useLayoutEffect:zv.useEffect,_O=new WeakMap;function tb(e,t){var r=NO(t||null,function(o){return e.forEach(function(n){return Uv(n,o)})});return u7(function(){var o=_O.get(r);if(o){var n=new Set(o),a=new Set(e),i=r.current;n.forEach(function(s){a.has(s)||Uv(s,null)}),a.forEach(function(s){n.has(s)||Uv(s,i)})}_O.set(r,e)},[e]),r}function c7(e){return e}function d7(e,t){t===void 0&&(t=c7);var r=[],o=!1,n={read:function(){if(o)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(a){var i=t(a,o);return r.push(i),function(){r=r.filter(function(s){return s!==i})}},assignSyncMedium:function(a){for(o=!0;r.length;){var i=r;r=[],i.forEach(a)}r={push:function(s){return a(s)},filter:function(){return r}}},assignMedium:function(a){o=!0;var i=[];if(r.length){var s=r;r=[],s.forEach(a),i=r}var l=function(){var c=i;i=[],c.forEach(a)},u=function(){return Promise.resolve().then(l)};u(),r={push:function(c){i.push(c),u()},filter:function(c){return i=i.filter(c),r}}}};return n}function rb(e){e===void 0&&(e={});var t=d7(null);return t.options=ro({async:!0,ssr:!1},e),t}var OO=R(Pe()),FO=function(e){var t=e.sideCar,r=Hv(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=t.read();if(!o)throw new Error("Sidecar medium not found");return OO.createElement(o,ro({},r))};FO.isSideCarExport=!0;function ob(e,t){return e.useMedium(t),FO}var Wv=rb();var nb=function(){},dp=vr.forwardRef(function(e,t){var r=vr.useRef(null),o=vr.useState({onScrollCapture:nb,onWheelCapture:nb,onTouchMoveCapture:nb}),n=o[0],a=o[1],i=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,c=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,h=e.noIsolation,m=e.inert,x=e.allowPinchZoom,v=e.as,g=v===void 0?"div":v,y=e.gapMode,w=Hv(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=f,b=tb([r,t]),S=ro(ro({},w),n);return vr.createElement(vr.Fragment,null,c&&vr.createElement(C,{sideCar:Wv,removeScrollBar:u,shards:d,noRelative:p,noIsolation:h,inert:m,setCallbacks:a,allowPinchZoom:!!x,lockRef:r,gapMode:y}),i?vr.cloneElement(vr.Children.only(s),ro(ro({},S),{ref:b})):vr.createElement(g,ro({},S,{className:l,ref:b}),s))});dp.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};dp.classNames={fullWidth:gl,zeroRight:ml};var ot=R(Pe());var yc=R(Pe());var HO=R(Pe());var VO;var BO=function(){if(VO)return VO;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function f7(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=BO();return t&&e.setAttribute("nonce",t),e}function p7(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function m7(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var ab=function(){var e=0,t=null;return{add:function(r){e==0&&(t=f7())&&(p7(t,r),m7(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}};var ib=function(){var e=ab();return function(t,r){HO.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}};var fp=function(){var e=ib(),t=function(r){var o=r.styles,n=r.dynamic;return e(o,n),null};return t};var g7={left:0,top:0,right:0,gap:0},sb=function(e){return parseInt(e||"",10)||0},h7=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],o=t[e==="padding"?"paddingTop":"marginTop"],n=t[e==="padding"?"paddingRight":"marginRight"];return[sb(r),sb(o),sb(n)]},lb=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return g7;var t=h7(e),r=document.documentElement.clientWidth,o=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,o-r+t[2]-t[0])}};var v7=fp(),vc="data-scroll-locked",y7=function(e,t,r,o){var n=e.left,a=e.top,i=e.right,s=e.gap;return r===void 0&&(r="margin"),`
|
|
58
|
+
.`.concat(JS,` {
|
|
59
|
+
overflow: hidden `).concat(o,`;
|
|
60
|
+
padding-right: `).concat(s,"px ").concat(o,`;
|
|
61
|
+
}
|
|
62
|
+
body[`).concat(vc,`] {
|
|
63
|
+
overflow: hidden `).concat(o,`;
|
|
64
|
+
overscroll-behavior: contain;
|
|
65
|
+
`).concat([t&&"position: relative ".concat(o,";"),r==="margin"&&`
|
|
66
|
+
padding-left: `.concat(n,`px;
|
|
67
|
+
padding-top: `).concat(a,`px;
|
|
68
|
+
padding-right: `).concat(i,`px;
|
|
69
|
+
margin-left:0;
|
|
70
|
+
margin-top:0;
|
|
71
|
+
margin-right: `).concat(s,"px ").concat(o,`;
|
|
72
|
+
`),r==="padding"&&"padding-right: ".concat(s,"px ").concat(o,";")].filter(Boolean).join(""),`
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.`).concat(ml,` {
|
|
76
|
+
right: `).concat(s,"px ").concat(o,`;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.`).concat(gl,` {
|
|
80
|
+
margin-right: `).concat(s,"px ").concat(o,`;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.`).concat(ml," .").concat(ml,` {
|
|
84
|
+
right: 0 `).concat(o,`;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.`).concat(gl," .").concat(gl,` {
|
|
88
|
+
margin-right: 0 `).concat(o,`;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
body[`).concat(vc,`] {
|
|
92
|
+
`).concat(eb,": ").concat(s,`px;
|
|
93
|
+
}
|
|
94
|
+
`)},UO=function(){var e=parseInt(document.body.getAttribute(vc)||"0",10);return isFinite(e)?e:0},x7=function(){yc.useEffect(function(){return document.body.setAttribute(vc,(UO()+1).toString()),function(){var e=UO()-1;e<=0?document.body.removeAttribute(vc):document.body.setAttribute(vc,e.toString())}},[])},ub=function(e){var t=e.noRelative,r=e.noImportant,o=e.gapMode,n=o===void 0?"margin":o;x7();var a=yc.useMemo(function(){return lb(n)},[n]);return yc.createElement(v7,{styles:y7(a,!t,n,r?"":"!important")})};var cb=!1;if(typeof window<"u")try{pp=Object.defineProperty({},"passive",{get:function(){return cb=!0,!0}}),window.addEventListener("test",pp,pp),window.removeEventListener("test",pp,pp)}catch{cb=!1}var pp,hl=cb?{passive:!1}:!1;var w7=function(e){return e.tagName==="TEXTAREA"},zO=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!w7(e)&&r[t]==="visible")},C7=function(e){return zO(e,"overflowY")},S7=function(e){return zO(e,"overflowX")},db=function(e,t){var r=t.ownerDocument,o=t;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var n=WO(e,o);if(n){var a=GO(e,o),i=a[1],s=a[2];if(i>s)return!0}o=o.parentNode}while(o&&o!==r.body);return!1},b7=function(e){var t=e.scrollTop,r=e.scrollHeight,o=e.clientHeight;return[t,r,o]},R7=function(e){var t=e.scrollLeft,r=e.scrollWidth,o=e.clientWidth;return[t,r,o]},WO=function(e,t){return e==="v"?C7(t):S7(t)},GO=function(e,t){return e==="v"?b7(t):R7(t)},L7=function(e,t){return e==="h"&&t==="rtl"?-1:1},jO=function(e,t,r,o,n){var a=L7(e,window.getComputedStyle(t).direction),i=a*o,s=r.target,l=t.contains(s),u=!1,c=i>0,d=0,f=0;do{if(!s)break;var p=GO(e,s),h=p[0],m=p[1],x=p[2],v=m-x-a*h;(h||v)&&WO(e,s)&&(d+=v,f+=h);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(c&&(n&&Math.abs(d)<1||!n&&i>d)||!c&&(n&&Math.abs(f)<1||!n&&-i>f))&&(u=!0),u};var Gv=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},qO=function(e){return[e.deltaX,e.deltaY]},$O=function(e){return e&&"current"in e?e.current:e},I7=function(e,t){return e[0]===t[0]&&e[1]===t[1]},P7=function(e){return`
|
|
95
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
96
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
97
|
+
`)},T7=0,xc=[];function KO(e){var t=ot.useRef([]),r=ot.useRef([0,0]),o=ot.useRef(),n=ot.useState(T7++)[0],a=ot.useState(fp)[0],i=ot.useRef(e);ot.useEffect(function(){i.current=e},[e]),ot.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(n));var m=AO([e.lockRef.current],(e.shards||[]).map($O),!0).filter(Boolean);return m.forEach(function(x){return x.classList.add("allow-interactivity-".concat(n))}),function(){document.body.classList.remove("block-interactivity-".concat(n)),m.forEach(function(x){return x.classList.remove("allow-interactivity-".concat(n))})}}},[e.inert,e.lockRef.current,e.shards]);var s=ot.useCallback(function(m,x){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!i.current.allowPinchZoom;var v=Gv(m),g=r.current,y="deltaX"in m?m.deltaX:g[0]-v[0],w="deltaY"in m?m.deltaY:g[1]-v[1],C,b=m.target,S=Math.abs(y)>Math.abs(w)?"h":"v";if("touches"in m&&S==="h"&&b.type==="range")return!1;var L=db(S,b);if(!L)return!0;if(L?C=S:(C=S==="v"?"h":"v",L=db(S,b)),!L)return!1;if(!o.current&&"changedTouches"in m&&(y||w)&&(o.current=C),!C)return!0;var T=o.current||C;return jO(T,x,m,T==="h"?y:w,!0)},[]),l=ot.useCallback(function(m){var x=m;if(!(!xc.length||xc[xc.length-1]!==a)){var v="deltaY"in x?qO(x):Gv(x),g=t.current.filter(function(C){return C.name===x.type&&(C.target===x.target||x.target===C.shadowParent)&&I7(C.delta,v)})[0];if(g&&g.should){x.cancelable&&x.preventDefault();return}if(!g){var y=(i.current.shards||[]).map($O).filter(Boolean).filter(function(C){return C.contains(x.target)}),w=y.length>0?s(x,y[0]):!i.current.noIsolation;w&&x.cancelable&&x.preventDefault()}}},[]),u=ot.useCallback(function(m,x,v,g){var y={name:m,delta:x,target:v,should:g,shadowParent:k7(v)};t.current.push(y),setTimeout(function(){t.current=t.current.filter(function(w){return w!==y})},1)},[]),c=ot.useCallback(function(m){r.current=Gv(m),o.current=void 0},[]),d=ot.useCallback(function(m){u(m.type,qO(m),m.target,s(m,e.lockRef.current))},[]),f=ot.useCallback(function(m){u(m.type,Gv(m),m.target,s(m,e.lockRef.current))},[]);ot.useEffect(function(){return xc.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",l,hl),document.addEventListener("touchmove",l,hl),document.addEventListener("touchstart",c,hl),function(){xc=xc.filter(function(m){return m!==a}),document.removeEventListener("wheel",l,hl),document.removeEventListener("touchmove",l,hl),document.removeEventListener("touchstart",c,hl)}},[]);var p=e.removeScrollBar,h=e.inert;return ot.createElement(ot.Fragment,null,h?ot.createElement(a,{styles:P7(n)}):null,p?ot.createElement(ub,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function k7(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var XO=ob(Wv,KO);var YO=jv.forwardRef(function(e,t){return jv.createElement(dp,ro({},e,{ref:t,sideCar:XO}))});YO.classNames=dp.classNames;var fb=YO;var M7=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},wc=new WeakMap,qv=new WeakMap,$v={},pb=0,QO=function(e){return e&&(e.host||QO(e.parentNode))},E7=function(e,t){return t.map(function(r){if(e.contains(r))return r;var o=QO(r);return o&&e.contains(o)?o:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},A7=function(e,t,r,o){var n=E7(t,Array.isArray(e)?e:[e]);$v[r]||($v[r]=new WeakMap);var a=$v[r],i=[],s=new Set,l=new Set(n),u=function(d){!d||s.has(d)||(s.add(d),u(d.parentNode))};n.forEach(u);var c=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(f){if(s.has(f))c(f);else try{var p=f.getAttribute(o),h=p!==null&&p!=="false",m=(wc.get(f)||0)+1,x=(a.get(f)||0)+1;wc.set(f,m),a.set(f,x),i.push(f),m===1&&h&&qv.set(f,!0),x===1&&f.setAttribute(r,"true"),h||f.setAttribute(o,"true")}catch(v){console.error("aria-hidden: cannot operate on ",f,v)}})};return c(t),s.clear(),pb++,function(){i.forEach(function(d){var f=wc.get(d)-1,p=a.get(d)-1;wc.set(d,f),a.set(d,p),f||(qv.has(d)||d.removeAttribute(o),qv.delete(d)),p||d.removeAttribute(r)}),pb--,pb||(wc=new WeakMap,wc=new WeakMap,qv=new WeakMap,$v={})}},ZO=function(e,t,r){r===void 0&&(r="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),n=t||M7(e);return n?(o.push.apply(o,Array.from(n.querySelectorAll("[aria-live], script"))),A7(o,n,r,"aria-hidden")):function(){return null}};var Be=R(Sn(),1),Xv="Dialog",[JO,FPe]=Av(Xv),[D7,Ln]=JO(Xv),eF=e=>{let{__scopeDialog:t,children:r,open:o,defaultOpen:n,onOpenChange:a,modal:i=!0}=e,s=$e.useRef(null),l=$e.useRef(null),[u,c]=Dv({prop:o,defaultProp:n??!1,onChange:a,caller:Xv});return(0,Be.jsx)(D7,{scope:t,triggerRef:s,contentRef:l,contentId:Rn(),titleId:Rn(),descriptionId:Rn(),open:u,onOpenChange:c,onOpenToggle:$e.useCallback(()=>c(d=>!d),[c]),modal:i,children:r})};eF.displayName=Xv;var tF="DialogTrigger",N7=$e.forwardRef((e,t)=>{let{__scopeDialog:r,...o}=e,n=Ln(tF,r),a=qt(t,n.triggerRef);return(0,Be.jsx)(Oe.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":hb(n.open),...o,ref:a,onClick:Tt(e.onClick,n.onOpenToggle)})});N7.displayName=tF;var mb="DialogPortal",[_7,rF]=JO(mb,{forceMount:void 0}),oF=e=>{let{__scopeDialog:t,forceMount:r,children:o,container:n}=e,a=Ln(mb,t);return(0,Be.jsx)(_7,{scope:t,forceMount:r,children:$e.Children.map(o,i=>(0,Be.jsx)(Jn,{present:r||a.open,children:(0,Be.jsx)(QS,{asChild:!0,container:n,children:i})}))})};oF.displayName=mb;var Kv="DialogOverlay",nF=$e.forwardRef((e,t)=>{let r=rF(Kv,e.__scopeDialog),{forceMount:o=r.forceMount,...n}=e,a=Ln(Kv,e.__scopeDialog);return a.modal?(0,Be.jsx)(Jn,{present:o||a.open,children:(0,Be.jsx)(F7,{...n,ref:t})}):null});nF.displayName=Kv;var O7=Fv("DialogOverlay.RemoveScroll"),F7=$e.forwardRef((e,t)=>{let{__scopeDialog:r,...o}=e,n=Ln(Kv,r);return(0,Be.jsx)(fb,{as:O7,allowPinchZoom:!0,shards:[n.contentRef],children:(0,Be.jsx)(Oe.div,{"data-state":hb(n.open),...o,ref:t,style:{pointerEvents:"auto",...o.style}})})}),vl="DialogContent",aF=$e.forwardRef((e,t)=>{let r=rF(vl,e.__scopeDialog),{forceMount:o=r.forceMount,...n}=e,a=Ln(vl,e.__scopeDialog);return(0,Be.jsx)(Jn,{present:o||a.open,children:a.modal?(0,Be.jsx)(V7,{...n,ref:t}):(0,Be.jsx)(B7,{...n,ref:t})})});aF.displayName=vl;var V7=$e.forwardRef((e,t)=>{let r=Ln(vl,e.__scopeDialog),o=$e.useRef(null),n=qt(t,r.contentRef,o);return $e.useEffect(()=>{let a=o.current;if(a)return ZO(a)},[]),(0,Be.jsx)(iF,{...e,ref:n,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Tt(e.onCloseAutoFocus,a=>{a.preventDefault(),r.triggerRef.current?.focus()}),onPointerDownOutside:Tt(e.onPointerDownOutside,a=>{let i=a.detail.originalEvent,s=i.button===0&&i.ctrlKey===!0;(i.button===2||s)&&a.preventDefault()}),onFocusOutside:Tt(e.onFocusOutside,a=>a.preventDefault())})}),B7=$e.forwardRef((e,t)=>{let r=Ln(vl,e.__scopeDialog),o=$e.useRef(!1),n=$e.useRef(!1);return(0,Be.jsx)(iF,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{e.onCloseAutoFocus?.(a),a.defaultPrevented||(o.current||r.triggerRef.current?.focus(),a.preventDefault()),o.current=!1,n.current=!1},onInteractOutside:a=>{e.onInteractOutside?.(a),a.defaultPrevented||(o.current=!0,a.detail.originalEvent.type==="pointerdown"&&(n.current=!0));let i=a.target;r.triggerRef.current?.contains(i)&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&n.current&&a.preventDefault()}})}),iF=$e.forwardRef((e,t)=>{let{__scopeDialog:r,trapFocus:o,onOpenAutoFocus:n,onCloseAutoFocus:a,...i}=e,s=Ln(vl,r),l=$e.useRef(null),u=qt(t,l);return EO(),(0,Be.jsxs)(Be.Fragment,{children:[(0,Be.jsx)(YS,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:n,onUnmountAutoFocus:a,children:(0,Be.jsx)($S,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":hb(s.open),...i,ref:u,onDismiss:()=>s.onOpenChange(!1)})}),(0,Be.jsxs)(Be.Fragment,{children:[(0,Be.jsx)(W7,{titleId:s.titleId}),(0,Be.jsx)(j7,{contentRef:l,descriptionId:s.descriptionId})]})]})}),gb="DialogTitle",H7=$e.forwardRef((e,t)=>{let{__scopeDialog:r,...o}=e,n=Ln(gb,r);return(0,Be.jsx)(Oe.h2,{id:n.titleId,...o,ref:t})});H7.displayName=gb;var sF="DialogDescription",U7=$e.forwardRef((e,t)=>{let{__scopeDialog:r,...o}=e,n=Ln(sF,r);return(0,Be.jsx)(Oe.p,{id:n.descriptionId,...o,ref:t})});U7.displayName=sF;var lF="DialogClose",z7=$e.forwardRef((e,t)=>{let{__scopeDialog:r,...o}=e,n=Ln(lF,r);return(0,Be.jsx)(Oe.button,{type:"button",...o,ref:t,onClick:Tt(e.onClick,()=>n.onOpenChange(!1))})});z7.displayName=lF;function hb(e){return e?"open":"closed"}var uF="DialogTitleWarning",[VPe,cF]=nO(uF,{contentName:vl,titleName:gb,docsSlug:"dialog"}),W7=({titleId:e})=>{let t=cF(uF),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
98
|
+
|
|
99
|
+
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
100
|
+
|
|
101
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return $e.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},G7="DialogDescriptionWarning",j7=({contentRef:e,descriptionId:t})=>{let o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${cF(G7).contentName}}.`;return $e.useEffect(()=>{let n=e.current?.getAttribute("aria-describedby");t&&n&&(document.getElementById(t)||console.warn(o))},[o,e,t]),null},dF=eF;var fF=oF,pF=nF,mF=aF;var X=R(Pe(),1);var mp='[cmdk-group=""]',vb='[cmdk-group-items=""]',$7='[cmdk-group-heading=""]',hF='[cmdk-item=""]',gF=`${hF}:not([aria-disabled="true"])`,yb="cmdk-item-select",Cc="data-value",K7=(e,t,r)=>B_(e,t,r),vF=X.createContext(void 0),gp=()=>X.useContext(vF),yF=X.createContext(void 0),xb=()=>X.useContext(yF),xF=X.createContext(void 0),wF=X.forwardRef((e,t)=>{let r=Sc(()=>{var O,J;return{search:"",value:(J=(O=e.value)!=null?O:e.defaultValue)!=null?J:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),o=Sc(()=>new Set),n=Sc(()=>new Map),a=Sc(()=>new Map),i=Sc(()=>new Set),s=CF(e),{label:l,children:u,value:c,onValueChange:d,filter:f,shouldFilter:p,loop:h,disablePointerSelection:m=!1,vimBindings:x=!0,...v}=e,g=Rn(),y=Rn(),w=Rn(),C=X.useRef(null),b=aK();yl(()=>{if(c!==void 0){let O=c.trim();r.current.value=O,S.emit()}},[c]),yl(()=>{b(6,G)},[]);let S=X.useMemo(()=>({subscribe:O=>(i.current.add(O),()=>i.current.delete(O)),snapshot:()=>r.current,setState:(O,J,ae)=>{var Y,ce,q,pe;if(!Object.is(r.current[O],J)){if(r.current[O]=J,O==="search")_(),P(),b(1,A);else if(O==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let be=document.getElementById(w);be?be.focus():(Y=document.getElementById(g))==null||Y.focus()}if(b(7,()=>{var be;r.current.selectedItemId=(be=D())==null?void 0:be.id,S.emit()}),ae||b(5,G),((ce=s.current)==null?void 0:ce.value)!==void 0){let be=J??"";(pe=(q=s.current).onValueChange)==null||pe.call(q,be);return}}S.emit()}},emit:()=>{i.current.forEach(O=>O())}}),[]),L=X.useMemo(()=>({value:(O,J,ae)=>{var Y;J!==((Y=a.current.get(O))==null?void 0:Y.value)&&(a.current.set(O,{value:J,keywords:ae}),r.current.filtered.items.set(O,T(J,ae)),b(2,()=>{P(),S.emit()}))},item:(O,J)=>(o.current.add(O),J&&(n.current.has(J)?n.current.get(J).add(O):n.current.set(J,new Set([O]))),b(3,()=>{_(),P(),r.current.value||A(),S.emit()}),()=>{a.current.delete(O),o.current.delete(O),r.current.filtered.items.delete(O);let ae=D();b(4,()=>{_(),ae?.getAttribute("id")===O&&A(),S.emit()})}),group:O=>(n.current.has(O)||n.current.set(O,new Set),()=>{a.current.delete(O),n.current.delete(O)}),filter:()=>s.current.shouldFilter,label:l||e["aria-label"],getDisablePointerSelection:()=>s.current.disablePointerSelection,listId:g,inputId:w,labelId:y,listInnerRef:C}),[]);function T(O,J){var ae,Y;let ce=(Y=(ae=s.current)==null?void 0:ae.filter)!=null?Y:K7;return O?ce(O,r.current.search,J):0}function P(){if(!r.current.search||s.current.shouldFilter===!1)return;let O=r.current.filtered.items,J=[];r.current.filtered.groups.forEach(Y=>{let ce=n.current.get(Y),q=0;ce.forEach(pe=>{let be=O.get(pe);q=Math.max(be,q)}),J.push([Y,q])});let ae=C.current;W().sort((Y,ce)=>{var q,pe;let be=Y.getAttribute("id"),_e=ce.getAttribute("id");return((q=O.get(_e))!=null?q:0)-((pe=O.get(be))!=null?pe:0)}).forEach(Y=>{let ce=Y.closest(vb);ce?ce.appendChild(Y.parentElement===ce?Y:Y.closest(`${vb} > *`)):ae.appendChild(Y.parentElement===ae?Y:Y.closest(`${vb} > *`))}),J.sort((Y,ce)=>ce[1]-Y[1]).forEach(Y=>{var ce;let q=(ce=C.current)==null?void 0:ce.querySelector(`${mp}[${Cc}="${encodeURIComponent(Y[0])}"]`);q?.parentElement.appendChild(q)})}function A(){let O=W().find(ae=>ae.getAttribute("aria-disabled")!=="true"),J=O?.getAttribute(Cc);S.setState("value",J||void 0)}function _(){var O,J,ae,Y;if(!r.current.search||s.current.shouldFilter===!1){r.current.filtered.count=o.current.size;return}r.current.filtered.groups=new Set;let ce=0;for(let q of o.current){let pe=(J=(O=a.current.get(q))==null?void 0:O.value)!=null?J:"",be=(Y=(ae=a.current.get(q))==null?void 0:ae.keywords)!=null?Y:[],_e=T(pe,be);r.current.filtered.items.set(q,_e),_e>0&&ce++}for(let[q,pe]of n.current)for(let be of pe)if(r.current.filtered.items.get(be)>0){r.current.filtered.groups.add(q);break}r.current.filtered.count=ce}function G(){var O,J,ae;let Y=D();Y&&(((O=Y.parentElement)==null?void 0:O.firstChild)===Y&&((ae=(J=Y.closest(mp))==null?void 0:J.querySelector($7))==null||ae.scrollIntoView({block:"nearest"})),Y.scrollIntoView({block:"nearest"}))}function D(){var O;return(O=C.current)==null?void 0:O.querySelector(`${hF}[aria-selected="true"]`)}function W(){var O;return Array.from(((O=C.current)==null?void 0:O.querySelectorAll(gF))||[])}function N(O){let J=W()[O];J&&S.setState("value",J.getAttribute(Cc))}function z(O){var J;let ae=D(),Y=W(),ce=Y.findIndex(pe=>pe===ae),q=Y[ce+O];(J=s.current)!=null&&J.loop&&(q=ce+O<0?Y[Y.length-1]:ce+O===Y.length?Y[0]:Y[ce+O]),q&&S.setState("value",q.getAttribute(Cc))}function V(O){let J=D(),ae=J?.closest(mp),Y;for(;ae&&!Y;)ae=O>0?oK(ae,mp):nK(ae,mp),Y=ae?.querySelector(gF);Y?S.setState("value",Y.getAttribute(Cc)):z(O)}let k=()=>N(W().length-1),Z=O=>{O.preventDefault(),O.metaKey?k():O.altKey?V(1):z(1)},ve=O=>{O.preventDefault(),O.metaKey?N(0):O.altKey?V(-1):z(-1)};return X.createElement(Oe.div,{ref:t,tabIndex:-1,...v,"cmdk-root":"",onKeyDown:O=>{var J;(J=v.onKeyDown)==null||J.call(v,O);let ae=O.nativeEvent.isComposing||O.keyCode===229;if(!(O.defaultPrevented||ae))switch(O.key){case"n":case"j":{x&&O.ctrlKey&&Z(O);break}case"ArrowDown":{Z(O);break}case"p":case"k":{x&&O.ctrlKey&&ve(O);break}case"ArrowUp":{ve(O);break}case"Home":{O.preventDefault(),N(0);break}case"End":{O.preventDefault(),k();break}case"Enter":{O.preventDefault();let Y=D();if(Y){let ce=new Event(yb);Y.dispatchEvent(ce)}}}}},X.createElement("label",{"cmdk-label":"",htmlFor:L.inputId,id:L.labelId,style:sK},l),Yv(e,O=>X.createElement(yF.Provider,{value:S},X.createElement(vF.Provider,{value:L},O))))}),X7=X.forwardRef((e,t)=>{var r,o;let n=Rn(),a=X.useRef(null),i=X.useContext(xF),s=gp(),l=CF(e),u=(o=(r=l.current)==null?void 0:r.forceMount)!=null?o:i?.forceMount;yl(()=>{if(!u)return s.item(n,i?.id)},[u]);let c=SF(n,a,[e.value,e.children,a],e.keywords),d=xb(),f=Xi(b=>b.value&&b.value===c.current),p=Xi(b=>u||s.filter()===!1?!0:b.search?b.filtered.items.get(n)>0:!0);X.useEffect(()=>{let b=a.current;if(!(!b||e.disabled))return b.addEventListener(yb,h),()=>b.removeEventListener(yb,h)},[p,e.onSelect,e.disabled]);function h(){var b,S;m(),(S=(b=l.current).onSelect)==null||S.call(b,c.current)}function m(){d.setState("value",c.current,!0)}if(!p)return null;let{disabled:x,value:v,onSelect:g,forceMount:y,keywords:w,...C}=e;return X.createElement(Oe.div,{ref:za(a,t),...C,id:n,"cmdk-item":"",role:"option","aria-disabled":!!x,"aria-selected":!!f,"data-disabled":!!x,"data-selected":!!f,onPointerMove:x||s.getDisablePointerSelection()?void 0:m,onClick:x?void 0:h},e.children)}),Y7=X.forwardRef((e,t)=>{let{heading:r,children:o,forceMount:n,...a}=e,i=Rn(),s=X.useRef(null),l=X.useRef(null),u=Rn(),c=gp(),d=Xi(p=>n||c.filter()===!1?!0:p.search?p.filtered.groups.has(i):!0);yl(()=>c.group(i),[]),SF(i,s,[e.value,e.heading,l]);let f=X.useMemo(()=>({id:i,forceMount:n}),[n]);return X.createElement(Oe.div,{ref:za(s,t),...a,"cmdk-group":"",role:"presentation",hidden:d?void 0:!0},r&&X.createElement("div",{ref:l,"cmdk-group-heading":"","aria-hidden":!0,id:u},r),Yv(e,p=>X.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?u:void 0},X.createElement(xF.Provider,{value:f},p))))}),Q7=X.forwardRef((e,t)=>{let{alwaysRender:r,...o}=e,n=X.useRef(null),a=Xi(i=>!i.search);return!r&&!a?null:X.createElement(Oe.div,{ref:za(n,t),...o,"cmdk-separator":"",role:"separator"})}),Z7=X.forwardRef((e,t)=>{let{onValueChange:r,...o}=e,n=e.value!=null,a=xb(),i=Xi(u=>u.search),s=Xi(u=>u.selectedItemId),l=gp();return X.useEffect(()=>{e.value!=null&&a.setState("search",e.value)},[e.value]),X.createElement(Oe.input,{ref:t,...o,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":l.listId,"aria-labelledby":l.labelId,"aria-activedescendant":s,id:l.inputId,type:"text",value:n?e.value:i,onChange:u=>{n||a.setState("search",u.target.value),r?.(u.target.value)}})}),J7=X.forwardRef((e,t)=>{let{children:r,label:o="Suggestions",...n}=e,a=X.useRef(null),i=X.useRef(null),s=Xi(u=>u.selectedItemId),l=gp();return X.useEffect(()=>{if(i.current&&a.current){let u=i.current,c=a.current,d,f=new ResizeObserver(()=>{d=requestAnimationFrame(()=>{let p=u.offsetHeight;c.style.setProperty("--cmdk-list-height",p.toFixed(1)+"px")})});return f.observe(u),()=>{cancelAnimationFrame(d),f.unobserve(u)}}},[]),X.createElement(Oe.div,{ref:za(a,t),...n,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":s,"aria-label":o,id:l.listId},Yv(e,u=>X.createElement("div",{ref:za(i,l.listInnerRef),"cmdk-list-sizer":""},u)))}),eK=X.forwardRef((e,t)=>{let{open:r,onOpenChange:o,overlayClassName:n,contentClassName:a,container:i,...s}=e;return X.createElement(dF,{open:r,onOpenChange:o},X.createElement(fF,{container:i},X.createElement(pF,{"cmdk-overlay":"",className:n}),X.createElement(mF,{"aria-label":e.label,"cmdk-dialog":"",className:a},X.createElement(wF,{ref:t,...s}))))}),tK=X.forwardRef((e,t)=>Xi(r=>r.filtered.count===0)?X.createElement(Oe.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),rK=X.forwardRef((e,t)=>{let{progress:r,children:o,label:n="Loading...",...a}=e;return X.createElement(Oe.div,{ref:t,...a,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":n},Yv(e,i=>X.createElement("div",{"aria-hidden":!0},i)))}),Nr=Object.assign(wF,{List:J7,Item:X7,Input:Z7,Group:Y7,Separator:Q7,Dialog:eK,Empty:tK,Loading:rK});function oK(e,t){let r=e.nextElementSibling;for(;r;){if(r.matches(t))return r;r=r.nextElementSibling}}function nK(e,t){let r=e.previousElementSibling;for(;r;){if(r.matches(t))return r;r=r.previousElementSibling}}function CF(e){let t=X.useRef(e);return yl(()=>{t.current=e}),t}var yl=typeof window>"u"?X.useEffect:X.useLayoutEffect;function Sc(e){let t=X.useRef();return t.current===void 0&&(t.current=e()),t}function Xi(e){let t=xb(),r=()=>e(t.snapshot());return X.useSyncExternalStore(t.subscribe,r,r)}function SF(e,t,r,o=[]){let n=X.useRef(),a=gp();return yl(()=>{var i;let s=(()=>{var u;for(let c of r){if(typeof c=="string")return c.trim();if(typeof c=="object"&&"current"in c)return c.current?(u=c.current.textContent)==null?void 0:u.trim():n.current}})(),l=o.map(u=>u.trim());a.value(e,s,l),(i=t.current)==null||i.setAttribute(Cc,s),n.current=s}),n}var aK=()=>{let[e,t]=X.useState(),r=Sc(()=>new Map);return yl(()=>{r.current.forEach(o=>o()),r.current=new Map},[e]),(o,n)=>{r.current.set(o,n),t({})}};function iK(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function Yv({asChild:e,children:t},r){return e&&X.isValidElement(t)?X.cloneElement(iK(t),{ref:t.ref},r(t.props.children)):r(t)}var sK={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};var bc=R(E());var Ke=R(E(),1);var He=R(M(),1),Zv="Dialog",[bF,n1e]=Te(Zv),[lK,In]=bF(Zv),RF=e=>{let{__scopeDialog:t,children:r,open:o,defaultOpen:n,onOpenChange:a,modal:i=!0}=e,s=Ke.useRef(null),l=Ke.useRef(null),[u,c]=ze({prop:o,defaultProp:n??!1,onChange:a,caller:Zv});return(0,He.jsx)(lK,{scope:t,triggerRef:s,contentRef:l,contentId:qe(),titleId:qe(),descriptionId:qe(),open:u,onOpenChange:c,onOpenToggle:Ke.useCallback(()=>c(d=>!d),[c]),modal:i,children:r})};RF.displayName=Zv;var LF="DialogTrigger",IF=Ke.forwardRef((e,t)=>{let{__scopeDialog:r,...o}=e,n=In(LF,r),a=ne(t,n.triggerRef);return(0,He.jsx)($.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":Sb(n.open),...o,ref:a,onClick:H(e.onClick,n.onOpenToggle)})});IF.displayName=LF;var wb="DialogPortal",[uK,PF]=bF(wb,{forceMount:void 0}),TF=e=>{let{__scopeDialog:t,forceMount:r,children:o,container:n}=e,a=In(wb,t);return(0,He.jsx)(uK,{scope:t,forceMount:r,children:Ke.Children.map(o,i=>(0,He.jsx)(it,{present:r||a.open,children:(0,He.jsx)(vo,{asChild:!0,container:n,children:i})}))})};TF.displayName=wb;var Qv="DialogOverlay",kF=Ke.forwardRef((e,t)=>{let r=PF(Qv,e.__scopeDialog),{forceMount:o=r.forceMount,...n}=e,a=In(Qv,e.__scopeDialog);return a.modal?(0,He.jsx)(it,{present:o||a.open,children:(0,He.jsx)(dK,{...n,ref:t})}):null});kF.displayName=Qv;var cK=oo("DialogOverlay.RemoveScroll"),dK=Ke.forwardRef((e,t)=>{let{__scopeDialog:r,...o}=e,n=In(Qv,r);return(0,He.jsx)(_a,{as:cK,allowPinchZoom:!0,shards:[n.contentRef],children:(0,He.jsx)($.div,{"data-state":Sb(n.open),...o,ref:t,style:{pointerEvents:"auto",...o.style}})})}),xl="DialogContent",MF=Ke.forwardRef((e,t)=>{let r=PF(xl,e.__scopeDialog),{forceMount:o=r.forceMount,...n}=e,a=In(xl,e.__scopeDialog);return(0,He.jsx)(it,{present:o||a.open,children:a.modal?(0,He.jsx)(fK,{...n,ref:t}):(0,He.jsx)(pK,{...n,ref:t})})});MF.displayName=xl;var fK=Ke.forwardRef((e,t)=>{let r=In(xl,e.__scopeDialog),o=Ke.useRef(null),n=ne(t,r.contentRef,o);return Ke.useEffect(()=>{let a=o.current;if(a)return Wi(a)},[]),(0,He.jsx)(EF,{...e,ref:n,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:H(e.onCloseAutoFocus,a=>{a.preventDefault(),r.triggerRef.current?.focus()}),onPointerDownOutside:H(e.onPointerDownOutside,a=>{let i=a.detail.originalEvent,s=i.button===0&&i.ctrlKey===!0;(i.button===2||s)&&a.preventDefault()}),onFocusOutside:H(e.onFocusOutside,a=>a.preventDefault())})}),pK=Ke.forwardRef((e,t)=>{let r=In(xl,e.__scopeDialog),o=Ke.useRef(!1),n=Ke.useRef(!1);return(0,He.jsx)(EF,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{e.onCloseAutoFocus?.(a),a.defaultPrevented||(o.current||r.triggerRef.current?.focus(),a.preventDefault()),o.current=!1,n.current=!1},onInteractOutside:a=>{e.onInteractOutside?.(a),a.defaultPrevented||(o.current=!0,a.detail.originalEvent.type==="pointerdown"&&(n.current=!0));let i=a.target;r.triggerRef.current?.contains(i)&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&n.current&&a.preventDefault()}})}),EF=Ke.forwardRef((e,t)=>{let{__scopeDialog:r,trapFocus:o,onOpenAutoFocus:n,onCloseAutoFocus:a,...i}=e,s=In(xl,r),l=Ke.useRef(null),u=ne(t,l);return Vi(),(0,He.jsxs)(He.Fragment,{children:[(0,He.jsx)(Ea,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:n,onUnmountAutoFocus:a,children:(0,He.jsx)(Fo,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":Sb(s.open),...i,ref:u,onDismiss:()=>s.onOpenChange(!1)})}),(0,He.jsxs)(He.Fragment,{children:[(0,He.jsx)(mK,{titleId:s.titleId}),(0,He.jsx)(hK,{contentRef:l,descriptionId:s.descriptionId})]})]})}),Cb="DialogTitle",AF=Ke.forwardRef((e,t)=>{let{__scopeDialog:r,...o}=e,n=In(Cb,r);return(0,He.jsx)($.h2,{id:n.titleId,...o,ref:t})});AF.displayName=Cb;var DF="DialogDescription",NF=Ke.forwardRef((e,t)=>{let{__scopeDialog:r,...o}=e,n=In(DF,r);return(0,He.jsx)($.p,{id:n.descriptionId,...o,ref:t})});NF.displayName=DF;var _F="DialogClose",OF=Ke.forwardRef((e,t)=>{let{__scopeDialog:r,...o}=e,n=In(_F,r);return(0,He.jsx)($.button,{type:"button",...o,ref:t,onClick:H(e.onClick,()=>n.onOpenChange(!1))})});OF.displayName=_F;function Sb(e){return e?"open":"closed"}var FF="DialogTitleWarning",[a1e,VF]=zL(FF,{contentName:xl,titleName:Cb,docsSlug:"dialog"}),mK=({titleId:e})=>{let t=VF(FF),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
51
102
|
|
|
52
103
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
53
104
|
|
|
54
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return Ge.useEffect(()=>{e&&(document.getElementById(e)||console.error(o))},[o,e]),null},h_="DialogDescriptionWarning",x_=({contentRef:e,descriptionId:t})=>{let r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${VI(h_).contentName}}.`;return Ge.useEffect(()=>{let a=e.current?.getAttribute("aria-describedby");t&&a&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},af=RI,BI=LI,nf=TI,iu=MI,lu=kI,Vg=DI,Bg=NI,Hg=OI;var Y=b(A(),1);var uu='[cmdk-group=""]',Ug='[cmdk-group-items=""]',v_='[cmdk-group-heading=""]',GI='[cmdk-item=""]',UI=`${GI}:not([aria-disabled="true"])`,Gg="cmdk-item-select",li="data-value",y_=(e,t,o)=>wI(e,t,o),zI=Y.createContext(void 0),cu=()=>Y.useContext(zI),qI=Y.createContext(void 0),zg=()=>Y.useContext(qI),WI=Y.createContext(void 0),$I=Y.forwardRef((e,t)=>{let o=ui(()=>{var F,j;return{search:"",value:(j=(F=e.value)!=null?F:e.defaultValue)!=null?j:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=ui(()=>new Set),a=ui(()=>new Map),n=ui(()=>new Map),s=ui(()=>new Set),i=jI(e),{label:l,children:u,value:c,onValueChange:d,filter:f,shouldFilter:m,loop:p,disablePointerSelection:g=!1,vimBindings:h=!0,...v}=e,x=Pe(),y=Pe(),R=Pe(),C=Y.useRef(null),w=k_();Un(()=>{if(c!==void 0){let F=c.trim();o.current.value=F,I.emit()}},[c]),Un(()=>{w(6,W)},[]);let I=Y.useMemo(()=>({subscribe:F=>(s.current.add(F),()=>s.current.delete(F)),snapshot:()=>o.current,setState:(F,j,Z)=>{var X,ue,_,ce;if(!Object.is(o.current[F],j)){if(o.current[F]=j,F==="search")$(),T(),w(1,O);else if(F==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let he=document.getElementById(R);he?he.focus():(X=document.getElementById(x))==null||X.focus()}if(w(7,()=>{var he;o.current.selectedItemId=(he=N())==null?void 0:he.id,I.emit()}),Z||w(5,W),((ue=i.current)==null?void 0:ue.value)!==void 0){let he=j??"";(ce=(_=i.current).onValueChange)==null||ce.call(_,he);return}}I.emit()}},emit:()=>{s.current.forEach(F=>F())}}),[]),L=Y.useMemo(()=>({value:(F,j,Z)=>{var X;j!==((X=n.current.get(F))==null?void 0:X.value)&&(n.current.set(F,{value:j,keywords:Z}),o.current.filtered.items.set(F,P(j,Z)),w(2,()=>{T(),I.emit()}))},item:(F,j)=>(r.current.add(F),j&&(a.current.has(j)?a.current.get(j).add(F):a.current.set(j,new Set([F]))),w(3,()=>{$(),T(),o.current.value||O(),I.emit()}),()=>{n.current.delete(F),r.current.delete(F),o.current.filtered.items.delete(F);let Z=N();w(4,()=>{$(),Z?.getAttribute("id")===F&&O(),I.emit()})}),group:F=>(a.current.has(F)||a.current.set(F,new Set),()=>{n.current.delete(F),a.current.delete(F)}),filter:()=>i.current.shouldFilter,label:l||e["aria-label"],getDisablePointerSelection:()=>i.current.disablePointerSelection,listId:x,inputId:R,labelId:y,listInnerRef:C}),[]);function P(F,j){var Z,X;let ue=(X=(Z=i.current)==null?void 0:Z.filter)!=null?X:y_;return F?ue(F,o.current.search,j):0}function T(){if(!o.current.search||i.current.shouldFilter===!1)return;let F=o.current.filtered.items,j=[];o.current.filtered.groups.forEach(X=>{let ue=a.current.get(X),_=0;ue.forEach(ce=>{let he=F.get(ce);_=Math.max(he,_)}),j.push([X,_])});let Z=C.current;q().sort((X,ue)=>{var _,ce;let he=X.getAttribute("id"),we=ue.getAttribute("id");return((_=F.get(we))!=null?_:0)-((ce=F.get(he))!=null?ce:0)}).forEach(X=>{let ue=X.closest(Ug);ue?ue.appendChild(X.parentElement===ue?X:X.closest(`${Ug} > *`)):Z.appendChild(X.parentElement===Z?X:X.closest(`${Ug} > *`))}),j.sort((X,ue)=>ue[1]-X[1]).forEach(X=>{var ue;let _=(ue=C.current)==null?void 0:ue.querySelector(`${uu}[${li}="${encodeURIComponent(X[0])}"]`);_?.parentElement.appendChild(_)})}function O(){let F=q().find(Z=>Z.getAttribute("aria-disabled")!=="true"),j=F?.getAttribute(li);I.setState("value",j||void 0)}function $(){var F,j,Z,X;if(!o.current.search||i.current.shouldFilter===!1){o.current.filtered.count=r.current.size;return}o.current.filtered.groups=new Set;let ue=0;for(let _ of r.current){let ce=(j=(F=n.current.get(_))==null?void 0:F.value)!=null?j:"",he=(X=(Z=n.current.get(_))==null?void 0:Z.keywords)!=null?X:[],we=P(ce,he);o.current.filtered.items.set(_,we),we>0&&ue++}for(let[_,ce]of a.current)for(let he of ce)if(o.current.filtered.items.get(he)>0){o.current.filtered.groups.add(_);break}o.current.filtered.count=ue}function W(){var F,j,Z;let X=N();X&&(((F=X.parentElement)==null?void 0:F.firstChild)===X&&((Z=(j=X.closest(uu))==null?void 0:j.querySelector(v_))==null||Z.scrollIntoView({block:"nearest"})),X.scrollIntoView({block:"nearest"}))}function N(){var F;return(F=C.current)==null?void 0:F.querySelector(`${GI}[aria-selected="true"]`)}function q(){var F;return Array.from(((F=C.current)==null?void 0:F.querySelectorAll(UI))||[])}function E(F){let j=q()[F];j&&I.setState("value",j.getAttribute(li))}function G(F){var j;let Z=N(),X=q(),ue=X.findIndex(ce=>ce===Z),_=X[ue+F];(j=i.current)!=null&&j.loop&&(_=ue+F<0?X[X.length-1]:ue+F===X.length?X[0]:X[ue+F]),_&&I.setState("value",_.getAttribute(li))}function M(F){let j=N(),Z=j?.closest(uu),X;for(;Z&&!X;)Z=F>0?T_(Z,uu):M_(Z,uu),X=Z?.querySelector(UI);X?I.setState("value",X.getAttribute(li)):G(F)}let k=()=>E(q().length-1),re=F=>{F.preventDefault(),F.metaKey?k():F.altKey?M(1):G(1)},Se=F=>{F.preventDefault(),F.metaKey?E(0):F.altKey?M(-1):G(-1)};return Y.createElement(H.div,{ref:t,tabIndex:-1,...v,"cmdk-root":"",onKeyDown:F=>{var j;(j=v.onKeyDown)==null||j.call(v,F);let Z=F.nativeEvent.isComposing||F.keyCode===229;if(!(F.defaultPrevented||Z))switch(F.key){case"n":case"j":{h&&F.ctrlKey&&re(F);break}case"ArrowDown":{re(F);break}case"p":case"k":{h&&F.ctrlKey&&Se(F);break}case"ArrowUp":{Se(F);break}case"Home":{F.preventDefault(),E(0);break}case"End":{F.preventDefault(),k();break}case"Enter":{F.preventDefault();let X=N();if(X){let ue=new Event(Gg);X.dispatchEvent(ue)}}}}},Y.createElement("label",{"cmdk-label":"",htmlFor:L.inputId,id:L.labelId,style:D_},l),sf(e,F=>Y.createElement(qI.Provider,{value:I},Y.createElement(zI.Provider,{value:L},F))))}),b_=Y.forwardRef((e,t)=>{var o,r;let a=Pe(),n=Y.useRef(null),s=Y.useContext(WI),i=cu(),l=jI(e),u=(r=(o=l.current)==null?void 0:o.forceMount)!=null?r:s?.forceMount;Un(()=>{if(!u)return i.item(a,s?.id)},[u]);let c=KI(a,n,[e.value,e.children,n],e.keywords),d=zg(),f=Va(w=>w.value&&w.value===c.current),m=Va(w=>u||i.filter()===!1?!0:w.search?w.filtered.items.get(a)>0:!0);Y.useEffect(()=>{let w=n.current;if(!(!w||e.disabled))return w.addEventListener(Gg,p),()=>w.removeEventListener(Gg,p)},[m,e.onSelect,e.disabled]);function p(){var w,I;g(),(I=(w=l.current).onSelect)==null||I.call(w,c.current)}function g(){d.setState("value",c.current,!0)}if(!m)return null;let{disabled:h,value:v,onSelect:x,forceMount:y,keywords:R,...C}=e;return Y.createElement(H.div,{ref:lo(n,t),...C,id:a,"cmdk-item":"",role:"option","aria-disabled":!!h,"aria-selected":!!f,"data-disabled":!!h,"data-selected":!!f,onPointerMove:h||i.getDisablePointerSelection()?void 0:g,onClick:h?void 0:p},e.children)}),C_=Y.forwardRef((e,t)=>{let{heading:o,children:r,forceMount:a,...n}=e,s=Pe(),i=Y.useRef(null),l=Y.useRef(null),u=Pe(),c=cu(),d=Va(m=>a||c.filter()===!1?!0:m.search?m.filtered.groups.has(s):!0);Un(()=>c.group(s),[]),KI(s,i,[e.value,e.heading,l]);let f=Y.useMemo(()=>({id:s,forceMount:a}),[a]);return Y.createElement(H.div,{ref:lo(i,t),...n,"cmdk-group":"",role:"presentation",hidden:d?void 0:!0},o&&Y.createElement("div",{ref:l,"cmdk-group-heading":"","aria-hidden":!0,id:u},o),sf(e,m=>Y.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":o?u:void 0},Y.createElement(WI.Provider,{value:f},m))))}),w_=Y.forwardRef((e,t)=>{let{alwaysRender:o,...r}=e,a=Y.useRef(null),n=Va(s=>!s.search);return!o&&!n?null:Y.createElement(H.div,{ref:lo(a,t),...r,"cmdk-separator":"",role:"separator"})}),S_=Y.forwardRef((e,t)=>{let{onValueChange:o,...r}=e,a=e.value!=null,n=zg(),s=Va(u=>u.search),i=Va(u=>u.selectedItemId),l=cu();return Y.useEffect(()=>{e.value!=null&&n.setState("search",e.value)},[e.value]),Y.createElement(H.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":l.listId,"aria-labelledby":l.labelId,"aria-activedescendant":i,id:l.inputId,type:"text",value:a?e.value:s,onChange:u=>{a||n.setState("search",u.target.value),o?.(u.target.value)}})}),R_=Y.forwardRef((e,t)=>{let{children:o,label:r="Suggestions",...a}=e,n=Y.useRef(null),s=Y.useRef(null),i=Va(u=>u.selectedItemId),l=cu();return Y.useEffect(()=>{if(s.current&&n.current){let u=s.current,c=n.current,d,f=new ResizeObserver(()=>{d=requestAnimationFrame(()=>{let m=u.offsetHeight;c.style.setProperty("--cmdk-list-height",m.toFixed(1)+"px")})});return f.observe(u),()=>{cancelAnimationFrame(d),f.unobserve(u)}}},[]),Y.createElement(H.div,{ref:lo(n,t),...a,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":i,"aria-label":r,id:l.listId},sf(e,u=>Y.createElement("div",{ref:lo(s,l.listInnerRef),"cmdk-list-sizer":""},u)))}),I_=Y.forwardRef((e,t)=>{let{open:o,onOpenChange:r,overlayClassName:a,contentClassName:n,container:s,...i}=e;return Y.createElement(af,{open:o,onOpenChange:r},Y.createElement(nf,{container:s},Y.createElement(iu,{"cmdk-overlay":"",className:a}),Y.createElement(lu,{"aria-label":e.label,"cmdk-dialog":"",className:n},Y.createElement($I,{ref:t,...i}))))}),L_=Y.forwardRef((e,t)=>Va(o=>o.filtered.count===0)?Y.createElement(H.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),P_=Y.forwardRef((e,t)=>{let{progress:o,children:r,label:a="Loading...",...n}=e;return Y.createElement(H.div,{ref:t,...n,"cmdk-loading":"",role:"progressbar","aria-valuenow":o,"aria-valuemin":0,"aria-valuemax":100,"aria-label":a},sf(e,s=>Y.createElement("div",{"aria-hidden":!0},s)))}),Wt=Object.assign($I,{List:R_,Item:b_,Input:S_,Group:C_,Separator:w_,Dialog:I_,Empty:L_,Loading:P_});function T_(e,t){let o=e.nextElementSibling;for(;o;){if(o.matches(t))return o;o=o.nextElementSibling}}function M_(e,t){let o=e.previousElementSibling;for(;o;){if(o.matches(t))return o;o=o.previousElementSibling}}function jI(e){let t=Y.useRef(e);return Un(()=>{t.current=e}),t}var Un=typeof window>"u"?Y.useEffect:Y.useLayoutEffect;function ui(e){let t=Y.useRef();return t.current===void 0&&(t.current=e()),t}function Va(e){let t=zg(),o=()=>e(t.snapshot());return Y.useSyncExternalStore(t.subscribe,o,o)}function KI(e,t,o,r=[]){let a=Y.useRef(),n=cu();return Un(()=>{var s;let i=(()=>{var u;for(let c of o){if(typeof c=="string")return c.trim();if(typeof c=="object"&&"current"in c)return c.current?(u=c.current.textContent)==null?void 0:u.trim():a.current}})(),l=r.map(u=>u.trim());n.value(e,i,l),(s=t.current)==null||s.setAttribute(li,i),a.current=i}),a}var k_=()=>{let[e,t]=Y.useState(),o=ui(()=>new Map);return Un(()=>{o.current.forEach(r=>r()),o.current=new Map},[e]),(r,a)=>{o.current.set(r,a),t({})}};function A_(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function sf({asChild:e,children:t},o){return e&&Y.isValidElement(t)?Y.cloneElement(A_(t),{ref:t.ref},o(t.props.children)):o(t)}var D_={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};var ci=b(A());var rt=b(D()),qg=af,E_=BI,N_=nf,F_=Hg,O_=te("fixed inset-0 z-50 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",{variants:{variant:{default:"bg-black/80",subtle:"bg-black/60",blur:"bg-black/40 backdrop-blur-md",minimal:"bg-black/20 backdrop-blur-sm"},animation:{default:"duration-200",slow:"duration-300",fast:"duration-100"}},defaultVariants:{variant:"default",animation:"default"}}),XI=ci.forwardRef(({className:e,variant:t,animation:o,...r},a)=>(0,rt.jsx)(iu,{ref:a,className:S("moonui-theme",O_({variant:t,animation:o}),e),...r}));XI.displayName=iu.displayName;var __=te("fixed left-[50%] top-[50%] z-50 grid w-full translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background shadow-lg",{variants:{variant:{default:"border-gray-200 dark:border-gray-700",primary:"border-primary/20 dark:border-primary/30",secondary:"border-gray-300 dark:border-gray-600",ghost:"border-transparent shadow-xl",destructive:"border-error/20 dark:border-error/30"},size:{xs:"max-w-xs p-4",sm:"max-w-sm p-5",default:"max-w-lg p-6",md:"max-w-md p-6",lg:"max-w-2xl p-7",xl:"max-w-4xl p-8",full:"max-w-[95vw] max-h-[95vh] p-6"},radius:{none:"rounded-none",sm:"rounded-md",default:"rounded-lg",lg:"rounded-xl",xl:"rounded-2xl",full:"rounded-3xl"},animation:{default:"duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",fade:"duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",zoom:"duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",slide:"duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",none:""},position:{default:"top-[50%]",top:"top-[5%]",bottom:"bottom-[5%] top-auto translate-y-0"}},defaultVariants:{variant:"default",size:"default",radius:"default",animation:"default",position:"default"}}),lf=ci.forwardRef(({className:e,children:t,variant:o,size:r,radius:a,animation:n,position:s,overlayVariant:i="default",overlayAnimation:l="default",hideCloseButton:u=!1,title:c,description:d,icon:f,loading:m=!1,success:p=!1,onClose:g,...h},v)=>{let x=()=>{g&&g()};return(0,rt.jsxs)(N_,{children:[(0,rt.jsx)(XI,{variant:i,animation:l,onClick:u?void 0:x}),(0,rt.jsxs)(lu,{ref:v,onEscapeKeyDown:u?void 0:x,onInteractOutside:u?void 0:x,className:S(__({variant:o,size:r,radius:a,animation:n,position:s}),"outline-none",m&&"pointer-events-none",p&&"border-success/40",e),...h,children:[(c||d||f)&&(0,rt.jsxs)(Wg,{className:"flex gap-4",children:[(f||m||p)&&(0,rt.jsxs)("div",{className:"flex shrink-0 items-center justify-center",children:[m&&(0,rt.jsx)(St,{className:"h-5 w-5 animate-spin text-primary"}),p&&(0,rt.jsx)(It,{className:"h-5 w-5 text-success"}),!m&&!p&&f&&(0,rt.jsx)("span",{className:"text-primary",children:f})]}),(0,rt.jsxs)("div",{className:"flex-1",children:[c&&(0,rt.jsx)(du,{children:c}),d&&(0,rt.jsx)($g,{children:d})]})]}),t,!u&&(0,rt.jsxs)(Hg,{onClick:x,className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-primary/30 focus:ring-offset-2 disabled:pointer-events-none dark:text-gray-300 dark:hover:text-white",children:[(0,rt.jsx)(co,{className:"h-4 w-4"}),(0,rt.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})});lf.displayName=lu.displayName;var Wg=({className:e,...t})=>(0,rt.jsx)("div",{className:S("flex flex-col space-y-2 text-center sm:text-left",e),...t});Wg.displayName="DialogHeader";var YI=({className:e,...t})=>(0,rt.jsx)("div",{className:S("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end sm:space-x-2 mt-6",e),...t});YI.displayName="DialogFooter";var du=ci.forwardRef(({className:e,...t},o)=>(0,rt.jsx)(Vg,{ref:o,className:S("text-xl font-semibold leading-snug tracking-tight dark:text-white",e),...t}));du.displayName=Vg.displayName;var $g=ci.forwardRef(({className:e,...t},o)=>(0,rt.jsx)(Bg,{ref:o,className:S("text-sm text-muted-foreground leading-normal dark:text-gray-400",e),...t}));$g.displayName=Bg.displayName;var V_=ci.forwardRef(({className:e,...t},o)=>(0,rt.jsx)("form",{ref:o,className:S("moonui-theme","flex flex-col gap-4",e),...t}));V_.displayName="DialogForm";var Et=b(D()),B_=te("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",{variants:{variant:{default:"bg-popover text-popover-foreground",glass:"bg-background/80 text-foreground backdrop-blur-sm",bordered:"bg-popover text-popover-foreground border border-border"},size:{sm:"min-h-[200px]",default:"min-h-[300px]",lg:"min-h-[400px]"}},defaultVariants:{variant:"default",size:"default"}}),jg=Ba.forwardRef(({className:e,variant:t,size:o,...r},a)=>(0,Et.jsx)(Wt,{ref:a,className:S("moonui-theme",B_({variant:t,size:o}),e),...r}));jg.displayName=Wt.displayName;var H_=({children:e,commandClassName:t,...o})=>(0,Et.jsx)(qg,{...o,children:(0,Et.jsxs)(lf,{className:"overflow-hidden p-0 shadow-lg",hideCloseButton:!0,children:[(0,Et.jsx)(du,{className:"sr-only",children:"Command Menu"}),(0,Et.jsx)(jg,{className:S("[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",t),children:e})]})}),ZI=Ba.forwardRef(({className:e,...t},o)=>(0,Et.jsxs)("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[(0,Et.jsx)(rn,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),(0,Et.jsx)(Wt.Input,{ref:o,className:S("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));ZI.displayName=Wt.Input.displayName;var QI=Ba.forwardRef(({className:e,...t},o)=>(0,Et.jsx)(Wt.List,{ref:o,className:S("moonui-theme","max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));QI.displayName=Wt.List.displayName;var JI=Ba.forwardRef(({className:e,...t},o)=>(0,Et.jsx)(Wt.Empty,{ref:o,className:S("moonui-theme","py-6 text-center text-sm text-muted-foreground",e),...t}));JI.displayName=Wt.Empty.displayName;var eL=Ba.forwardRef(({className:e,...t},o)=>(0,Et.jsx)(Wt.Group,{ref:o,className:S("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t}));eL.displayName=Wt.Group.displayName;var tL=Ba.forwardRef(({className:e,...t},o)=>(0,Et.jsx)(Wt.Separator,{ref:o,className:S("moonui-theme","-mx-1 h-px bg-border",e),...t}));tL.displayName=Wt.Separator.displayName;var oL=Ba.forwardRef(({className:e,...t},o)=>(0,Et.jsx)(Wt.Item,{ref:o,className:S("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-accent aria-selected:text-accent-foreground data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50",e),...t}));oL.displayName=Wt.Item.displayName;var rL=({className:e,...t})=>(0,Et.jsx)("span",{className:S("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});rL.displayName="CommandShortcut";var dh=b(A());var pu=b(A(),1);function Ha(e,t){return typeof e=="function"?e(t):e}function xo(e,t){return o=>{t.setState(r=>({...r,[e]:Ha(o,r[e])}))}}function ff(e){return e instanceof Function}function U_(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function G_(e,t){let o=[],r=a=>{a.forEach(n=>{o.push(n);let s=t(n);s!=null&&s.length&&r(s)})};return r(e),o}function ie(e,t,o){let r=[],a;return n=>{let s;o.key&&o.debug&&(s=Date.now());let i=e(n);if(!(i.length!==r.length||i.some((c,d)=>r[d]!==c)))return a;r=i;let u;if(o.key&&o.debug&&(u=Date.now()),a=t(...i),o==null||o.onChange==null||o.onChange(a),o.key&&o.debug&&o!=null&&o.debug()){let c=Math.round((Date.now()-s)*100)/100,d=Math.round((Date.now()-u)*100)/100,f=d/16,m=(p,g)=>{for(p=String(p);p.length<g;)p=" "+p;return p};console.info(`%c\u23F1 ${m(d,5)} /${m(c,5)} ms`,`
|
|
105
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return Ke.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},gK="DialogDescriptionWarning",hK=({contentRef:e,descriptionId:t})=>{let o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${VF(gK).contentName}}.`;return Ke.useEffect(()=>{let n=e.current?.getAttribute("aria-describedby");t&&n&&(document.getElementById(t)||console.warn(o))},[o,e,t]),null},BF=RF,HF=IF,UF=TF,bb=kF,Rb=MF,Lb=AF,Ib=NF,Pb=OF;var wt=R(M()),Tb=BF,yK=HF,xK=UF,wK=Pb,CK=ee("fixed inset-0 z-50 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",{variants:{variant:{default:"bg-black/80",subtle:"bg-black/60",blur:"bg-black/40 backdrop-blur-md",minimal:"bg-black/20 backdrop-blur-sm"},animation:{default:"duration-200",slow:"duration-300",fast:"duration-100"}},defaultVariants:{variant:"default",animation:"default"}}),zF=bc.forwardRef(({className:e,variant:t,animation:r,...o},n)=>(0,wt.jsx)(bb,{ref:n,className:I("moonui-theme",CK({variant:t,animation:r}),e),...o}));zF.displayName=bb.displayName;var SK=ee("fixed left-[50%] top-[50%] z-50 grid w-full translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background shadow-lg",{variants:{variant:{default:"border-gray-200 dark:border-gray-700",primary:"border-primary/20 dark:border-primary/30",secondary:"border-gray-300 dark:border-gray-600",ghost:"border-transparent shadow-xl",destructive:"border-error/20 dark:border-error/30"},size:{xs:"max-w-xs p-4",sm:"max-w-sm p-5",default:"max-w-lg p-6",md:"max-w-md p-6",lg:"max-w-2xl p-7",xl:"max-w-4xl p-8",full:"max-w-[95vw] max-h-[95vh] p-6"},radius:{none:"rounded-none",sm:"rounded-md",default:"rounded-lg",lg:"rounded-xl",xl:"rounded-2xl",full:"rounded-3xl"},animation:{default:"duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",fade:"duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",zoom:"duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",slide:"duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",none:""},position:{default:"top-[50%]",top:"top-[5%]",bottom:"bottom-[5%] top-auto translate-y-0"}},defaultVariants:{variant:"default",size:"default",radius:"default",animation:"default",position:"default"}}),Jv=bc.forwardRef(({className:e,children:t,variant:r,size:o,radius:n,animation:a,position:i,overlayVariant:s="default",overlayAnimation:l="default",hideCloseButton:u=!1,title:c,description:d,icon:f,loading:p=!1,success:h=!1,onClose:m,...x},v)=>{let g=()=>{m&&m()};return(0,wt.jsxs)(xK,{children:[(0,wt.jsx)(zF,{variant:s,animation:l,onClick:u?void 0:g}),(0,wt.jsxs)(Rb,{ref:v,onEscapeKeyDown:u?void 0:g,onInteractOutside:u?void 0:g,className:I(SK({variant:r,size:o,radius:n,animation:a,position:i}),"outline-none",p&&"pointer-events-none",h&&"border-success/40",e),...x,children:[(c||d||f)&&(0,wt.jsxs)(kb,{className:"flex gap-4",children:[(f||p||h)&&(0,wt.jsxs)("div",{className:"flex shrink-0 items-center justify-center",children:[p&&(0,wt.jsx)(Nt,{className:"h-5 w-5 animate-spin text-primary"}),h&&(0,wt.jsx)(lr,{className:"h-5 w-5 text-success"}),!p&&!h&&f&&(0,wt.jsx)("span",{className:"text-primary",children:f})]}),(0,wt.jsxs)("div",{className:"flex-1",children:[c&&(0,wt.jsx)(hp,{children:c}),d&&(0,wt.jsx)(Mb,{children:d})]})]}),t,!u&&(0,wt.jsxs)(Pb,{onClick:g,className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-primary/30 focus:ring-offset-2 disabled:pointer-events-none dark:text-gray-300 dark:hover:text-white",children:[(0,wt.jsx)(co,{className:"h-4 w-4"}),(0,wt.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})});Jv.displayName=Rb.displayName;var kb=({className:e,...t})=>(0,wt.jsx)("div",{className:I("flex flex-col space-y-2 text-center sm:text-left",e),...t});kb.displayName="DialogHeader";var WF=({className:e,...t})=>(0,wt.jsx)("div",{className:I("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end sm:space-x-2 mt-6",e),...t});WF.displayName="DialogFooter";var hp=bc.forwardRef(({className:e,...t},r)=>(0,wt.jsx)(Lb,{ref:r,className:I("text-xl font-semibold leading-snug tracking-tight dark:text-white",e),...t}));hp.displayName=Lb.displayName;var Mb=bc.forwardRef(({className:e,...t},r)=>(0,wt.jsx)(Ib,{ref:r,className:I("text-sm text-muted-foreground leading-normal dark:text-gray-400",e),...t}));Mb.displayName=Ib.displayName;var bK=bc.forwardRef(({className:e,...t},r)=>(0,wt.jsx)("form",{ref:r,className:I("moonui-theme","flex flex-col gap-4",e),...t}));bK.displayName="DialogForm";var yr=R(M()),RK=ee("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",{variants:{variant:{default:"bg-popover text-popover-foreground",glass:"bg-background/80 text-foreground backdrop-blur-sm",bordered:"bg-popover text-popover-foreground border border-border"},size:{sm:"min-h-[200px]",default:"min-h-[300px]",lg:"min-h-[400px]"}},defaultVariants:{variant:"default",size:"default"}}),Eb=Yi.forwardRef(({className:e,variant:t,size:r,...o},n)=>(0,yr.jsx)(Nr,{ref:n,className:I("moonui-theme",RK({variant:t,size:r}),e),...o}));Eb.displayName=Nr.displayName;var LK=({children:e,commandClassName:t,...r})=>(0,yr.jsx)(Tb,{...r,children:(0,yr.jsxs)(Jv,{className:"overflow-hidden p-0 shadow-lg",hideCloseButton:!0,children:[(0,yr.jsx)(hp,{className:"sr-only",children:"Command Menu"}),(0,yr.jsx)(Eb,{className:I("[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",t),children:e})]})}),GF=Yi.forwardRef(({className:e,...t},r)=>(0,yr.jsxs)("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[(0,yr.jsx)(ks,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),(0,yr.jsx)(Nr.Input,{ref:r,className:I("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));GF.displayName=Nr.Input.displayName;var jF=Yi.forwardRef(({className:e,...t},r)=>(0,yr.jsx)(Nr.List,{ref:r,className:I("moonui-theme","max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));jF.displayName=Nr.List.displayName;var qF=Yi.forwardRef(({className:e,...t},r)=>(0,yr.jsx)(Nr.Empty,{ref:r,className:I("moonui-theme","py-6 text-center text-sm text-muted-foreground",e),...t}));qF.displayName=Nr.Empty.displayName;var $F=Yi.forwardRef(({className:e,...t},r)=>(0,yr.jsx)(Nr.Group,{ref:r,className:I("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t}));$F.displayName=Nr.Group.displayName;var KF=Yi.forwardRef(({className:e,...t},r)=>(0,yr.jsx)(Nr.Separator,{ref:r,className:I("moonui-theme","-mx-1 h-px bg-border",e),...t}));KF.displayName=Nr.Separator.displayName;var XF=Yi.forwardRef(({className:e,...t},r)=>(0,yr.jsx)(Nr.Item,{ref:r,className:I("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-accent aria-selected:text-accent-foreground data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50",e),...t}));XF.displayName=Nr.Item.displayName;var YF=({className:e,...t})=>(0,yr.jsx)("span",{className:I("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});YF.displayName="CommandShortcut";var Xb=R(E());var xp=R(Pe(),1);function Qi(e,t){return typeof e=="function"?e(t):e}function yo(e,t){return r=>{t.setState(o=>({...o,[e]:Qi(r,o[e])}))}}function oy(e){return e instanceof Function}function IK(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function PK(e,t){let r=[],o=n=>{n.forEach(a=>{r.push(a);let i=t(a);i!=null&&i.length&&o(i)})};return o(e),r}function se(e,t,r){let o=[],n;return a=>{let i;r.key&&r.debug&&(i=Date.now());let s=e(a);if(!(s.length!==o.length||s.some((c,d)=>o[d]!==c)))return n;o=s;let u;if(r.key&&r.debug&&(u=Date.now()),n=t(...s),r==null||r.onChange==null||r.onChange(n),r.key&&r.debug&&r!=null&&r.debug()){let c=Math.round((Date.now()-i)*100)/100,d=Math.round((Date.now()-u)*100)/100,f=d/16,p=(h,m)=>{for(h=String(h);h.length<m;)h=" "+h;return h};console.info(`%c\u23F1 ${p(d,5)} /${p(c,5)} ms`,`
|
|
55
106
|
font-size: .6rem;
|
|
56
107
|
font-weight: bold;
|
|
57
|
-
color: hsl(${Math.max(0,Math.min(120-120*f,120))}deg 100% 31%);`,o?.key)}return a}}function le(e,t,o,r){return{debug:()=>{var a;return(a=e?.debugAll)!=null?a:e[t]},key:!1,onChange:r}}function z_(e,t,o,r){let a=()=>{var s;return(s=n.getValue())!=null?s:e.options.renderFallbackValue},n={id:`${t.id}_${o.id}`,row:t,column:o,getValue:()=>t.getValue(r),renderValue:a,getContext:ie(()=>[e,o,t,n],(s,i,l,u)=>({table:s,column:i,row:l,cell:u,getValue:u.getValue,renderValue:u.renderValue}),le(e.options,"debugCells","cell.getContext"))};return e._features.forEach(s=>{s.createCell==null||s.createCell(n,o,t,e)},{}),n}function q_(e,t,o,r){var a,n;let i={...e._getDefaultColumnDef(),...t},l=i.accessorKey,u=(a=(n=i.id)!=null?n:l?typeof String.prototype.replaceAll=="function"?l.replaceAll(".","_"):l.replace(/\./g,"_"):void 0)!=null?a:typeof i.header=="string"?i.header:void 0,c;if(i.accessorFn?c=i.accessorFn:l&&(l.includes(".")?c=f=>{let m=f;for(let g of l.split(".")){var p;m=(p=m)==null?void 0:p[g]}return m}:c=f=>f[i.accessorKey]),!u)throw new Error;let d={id:`${String(u)}`,accessorFn:c,parent:r,depth:o,columnDef:i,columns:[],getFlatColumns:ie(()=>[!0],()=>{var f;return[d,...(f=d.columns)==null?void 0:f.flatMap(m=>m.getFlatColumns())]},le(e.options,"debugColumns","column.getFlatColumns")),getLeafColumns:ie(()=>[e._getOrderColumnsFn()],f=>{var m;if((m=d.columns)!=null&&m.length){let p=d.columns.flatMap(g=>g.getLeafColumns());return f(p)}return[d]},le(e.options,"debugColumns","column.getLeafColumns"))};for(let f of e._features)f.createColumn==null||f.createColumn(d,e);return d}var Nt="debugHeaders";function aL(e,t,o){var r;let n={id:(r=o.id)!=null?r:t.id,column:t,index:o.index,isPlaceholder:!!o.isPlaceholder,placeholderId:o.placeholderId,depth:o.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{let s=[],i=l=>{l.subHeaders&&l.subHeaders.length&&l.subHeaders.map(i),s.push(l)};return i(n),s},getContext:()=>({table:e,header:n,column:t})};return e._features.forEach(s=>{s.createHeader==null||s.createHeader(n,e)}),n}var W_={createTable:e=>{e.getHeaderGroups=ie(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,o,r,a)=>{var n,s;let i=(n=r?.map(d=>o.find(f=>f.id===d)).filter(Boolean))!=null?n:[],l=(s=a?.map(d=>o.find(f=>f.id===d)).filter(Boolean))!=null?s:[],u=o.filter(d=>!(r!=null&&r.includes(d.id))&&!(a!=null&&a.includes(d.id)));return uf(t,[...i,...u,...l],e)},le(e.options,Nt,"getHeaderGroups")),e.getCenterHeaderGroups=ie(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,o,r,a)=>(o=o.filter(n=>!(r!=null&&r.includes(n.id))&&!(a!=null&&a.includes(n.id))),uf(t,o,e,"center")),le(e.options,Nt,"getCenterHeaderGroups")),e.getLeftHeaderGroups=ie(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,o,r)=>{var a;let n=(a=r?.map(s=>o.find(i=>i.id===s)).filter(Boolean))!=null?a:[];return uf(t,n,e,"left")},le(e.options,Nt,"getLeftHeaderGroups")),e.getRightHeaderGroups=ie(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,o,r)=>{var a;let n=(a=r?.map(s=>o.find(i=>i.id===s)).filter(Boolean))!=null?a:[];return uf(t,n,e,"right")},le(e.options,Nt,"getRightHeaderGroups")),e.getFooterGroups=ie(()=>[e.getHeaderGroups()],t=>[...t].reverse(),le(e.options,Nt,"getFooterGroups")),e.getLeftFooterGroups=ie(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),le(e.options,Nt,"getLeftFooterGroups")),e.getCenterFooterGroups=ie(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),le(e.options,Nt,"getCenterFooterGroups")),e.getRightFooterGroups=ie(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),le(e.options,Nt,"getRightFooterGroups")),e.getFlatHeaders=ie(()=>[e.getHeaderGroups()],t=>t.map(o=>o.headers).flat(),le(e.options,Nt,"getFlatHeaders")),e.getLeftFlatHeaders=ie(()=>[e.getLeftHeaderGroups()],t=>t.map(o=>o.headers).flat(),le(e.options,Nt,"getLeftFlatHeaders")),e.getCenterFlatHeaders=ie(()=>[e.getCenterHeaderGroups()],t=>t.map(o=>o.headers).flat(),le(e.options,Nt,"getCenterFlatHeaders")),e.getRightFlatHeaders=ie(()=>[e.getRightHeaderGroups()],t=>t.map(o=>o.headers).flat(),le(e.options,Nt,"getRightFlatHeaders")),e.getCenterLeafHeaders=ie(()=>[e.getCenterFlatHeaders()],t=>t.filter(o=>{var r;return!((r=o.subHeaders)!=null&&r.length)}),le(e.options,Nt,"getCenterLeafHeaders")),e.getLeftLeafHeaders=ie(()=>[e.getLeftFlatHeaders()],t=>t.filter(o=>{var r;return!((r=o.subHeaders)!=null&&r.length)}),le(e.options,Nt,"getLeftLeafHeaders")),e.getRightLeafHeaders=ie(()=>[e.getRightFlatHeaders()],t=>t.filter(o=>{var r;return!((r=o.subHeaders)!=null&&r.length)}),le(e.options,Nt,"getRightLeafHeaders")),e.getLeafHeaders=ie(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,o,r)=>{var a,n,s,i,l,u;return[...(a=(n=t[0])==null?void 0:n.headers)!=null?a:[],...(s=(i=o[0])==null?void 0:i.headers)!=null?s:[],...(l=(u=r[0])==null?void 0:u.headers)!=null?l:[]].map(c=>c.getLeafHeaders()).flat()},le(e.options,Nt,"getLeafHeaders"))}};function uf(e,t,o,r){var a,n;let s=0,i=function(f,m){m===void 0&&(m=1),s=Math.max(s,m),f.filter(p=>p.getIsVisible()).forEach(p=>{var g;(g=p.columns)!=null&&g.length&&i(p.columns,m+1)},0)};i(e);let l=[],u=(f,m)=>{let p={depth:m,id:[r,`${m}`].filter(Boolean).join("_"),headers:[]},g=[];f.forEach(h=>{let v=[...g].reverse()[0],x=h.column.depth===p.depth,y,R=!1;if(x&&h.column.parent?y=h.column.parent:(y=h.column,R=!0),v&&v?.column===y)v.subHeaders.push(h);else{let C=aL(o,y,{id:[r,m,y.id,h?.id].filter(Boolean).join("_"),isPlaceholder:R,placeholderId:R?`${g.filter(w=>w.column===y).length}`:void 0,depth:m,index:g.length});C.subHeaders.push(h),g.push(C)}p.headers.push(h),h.headerGroup=p}),l.push(p),m>0&&u(g,m-1)},c=t.map((f,m)=>aL(o,f,{depth:s,index:m}));u(c,s-1),l.reverse();let d=f=>f.filter(p=>p.column.getIsVisible()).map(p=>{let g=0,h=0,v=[0];p.subHeaders&&p.subHeaders.length?(v=[],d(p.subHeaders).forEach(y=>{let{colSpan:R,rowSpan:C}=y;g+=R,v.push(C)})):g=1;let x=Math.min(...v);return h=h+x,p.colSpan=g,p.rowSpan=h,{colSpan:g,rowSpan:h}});return d((a=(n=l[0])==null?void 0:n.headers)!=null?a:[]),l}var sh=(e,t,o,r,a,n,s)=>{let i={id:t,index:r,original:o,depth:a,parentId:s,_valuesCache:{},_uniqueValuesCache:{},getValue:l=>{if(i._valuesCache.hasOwnProperty(l))return i._valuesCache[l];let u=e.getColumn(l);if(u!=null&&u.accessorFn)return i._valuesCache[l]=u.accessorFn(i.original,r),i._valuesCache[l]},getUniqueValues:l=>{if(i._uniqueValuesCache.hasOwnProperty(l))return i._uniqueValuesCache[l];let u=e.getColumn(l);if(u!=null&&u.accessorFn)return u.columnDef.getUniqueValues?(i._uniqueValuesCache[l]=u.columnDef.getUniqueValues(i.original,r),i._uniqueValuesCache[l]):(i._uniqueValuesCache[l]=[i.getValue(l)],i._uniqueValuesCache[l])},renderValue:l=>{var u;return(u=i.getValue(l))!=null?u:e.options.renderFallbackValue},subRows:n??[],getLeafRows:()=>G_(i.subRows,l=>l.subRows),getParentRow:()=>i.parentId?e.getRow(i.parentId,!0):void 0,getParentRows:()=>{let l=[],u=i;for(;;){let c=u.getParentRow();if(!c)break;l.push(c),u=c}return l.reverse()},getAllCells:ie(()=>[e.getAllLeafColumns()],l=>l.map(u=>z_(e,i,u,u.id)),le(e.options,"debugRows","getAllCells")),_getAllCellsByColumnId:ie(()=>[i.getAllCells()],l=>l.reduce((u,c)=>(u[c.column.id]=c,u),{}),le(e.options,"debugRows","getAllCellsByColumnId"))};for(let l=0;l<e._features.length;l++){let u=e._features[l];u==null||u.createRow==null||u.createRow(i,e)}return i},$_={createColumn:(e,t)=>{e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},sL=(e,t,o)=>{var r,a;let n=o==null||(r=o.toString())==null?void 0:r.toLowerCase();return!!(!((a=e.getValue(t))==null||(a=a.toString())==null||(a=a.toLowerCase())==null)&&a.includes(n))};sL.autoRemove=e=>or(e);var iL=(e,t,o)=>{var r;return!!(!((r=e.getValue(t))==null||(r=r.toString())==null)&&r.includes(o))};iL.autoRemove=e=>or(e);var lL=(e,t,o)=>{var r;return((r=e.getValue(t))==null||(r=r.toString())==null?void 0:r.toLowerCase())===o?.toLowerCase()};lL.autoRemove=e=>or(e);var uL=(e,t,o)=>{var r;return(r=e.getValue(t))==null?void 0:r.includes(o)};uL.autoRemove=e=>or(e);var cL=(e,t,o)=>!o.some(r=>{var a;return!((a=e.getValue(t))!=null&&a.includes(r))});cL.autoRemove=e=>or(e)||!(e!=null&&e.length);var dL=(e,t,o)=>o.some(r=>{var a;return(a=e.getValue(t))==null?void 0:a.includes(r)});dL.autoRemove=e=>or(e)||!(e!=null&&e.length);var fL=(e,t,o)=>e.getValue(t)===o;fL.autoRemove=e=>or(e);var mL=(e,t,o)=>e.getValue(t)==o;mL.autoRemove=e=>or(e);var ih=(e,t,o)=>{let[r,a]=o,n=e.getValue(t);return n>=r&&n<=a};ih.resolveFilterValue=e=>{let[t,o]=e,r=typeof t!="number"?parseFloat(t):t,a=typeof o!="number"?parseFloat(o):o,n=t===null||Number.isNaN(r)?-1/0:r,s=o===null||Number.isNaN(a)?1/0:a;if(n>s){let i=n;n=s,s=i}return[n,s]};ih.autoRemove=e=>or(e)||or(e[0])&&or(e[1]);var Jr={includesString:sL,includesStringSensitive:iL,equalsString:lL,arrIncludes:uL,arrIncludesAll:cL,arrIncludesSome:dL,equals:fL,weakEquals:mL,inNumberRange:ih};function or(e){return e==null||e===""}var j_={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:xo("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{let o=t.getCoreRowModel().flatRows[0],r=o?.getValue(e.id);return typeof r=="string"?Jr.includesString:typeof r=="number"?Jr.inNumberRange:typeof r=="boolean"||r!==null&&typeof r=="object"?Jr.equals:Array.isArray(r)?Jr.arrIncludes:Jr.weakEquals},e.getFilterFn=()=>{var o,r;return ff(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(o=(r=t.options.filterFns)==null?void 0:r[e.columnDef.filterFn])!=null?o:Jr[e.columnDef.filterFn]},e.getCanFilter=()=>{var o,r,a;return((o=e.columnDef.enableColumnFilter)!=null?o:!0)&&((r=t.options.enableColumnFilters)!=null?r:!0)&&((a=t.options.enableFilters)!=null?a:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var o;return(o=t.getState().columnFilters)==null||(o=o.find(r=>r.id===e.id))==null?void 0:o.value},e.getFilterIndex=()=>{var o,r;return(o=(r=t.getState().columnFilters)==null?void 0:r.findIndex(a=>a.id===e.id))!=null?o:-1},e.setFilterValue=o=>{t.setColumnFilters(r=>{let a=e.getFilterFn(),n=r?.find(c=>c.id===e.id),s=Ha(o,n?n.value:void 0);if(nL(a,s,e)){var i;return(i=r?.filter(c=>c.id!==e.id))!=null?i:[]}let l={id:e.id,value:s};if(n){var u;return(u=r?.map(c=>c.id===e.id?l:c))!=null?u:[]}return r!=null&&r.length?[...r,l]:[l]})}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{let o=e.getAllLeafColumns(),r=a=>{var n;return(n=Ha(t,a))==null?void 0:n.filter(s=>{let i=o.find(l=>l.id===s.id);if(i){let l=i.getFilterFn();if(nL(l,s.value,i))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(r)},e.resetColumnFilters=t=>{var o,r;e.setColumnFilters(t?[]:(o=(r=e.initialState)==null?void 0:r.columnFilters)!=null?o:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}};function nL(e,t,o){return(e&&e.autoRemove?e.autoRemove(t,o):!1)||typeof t>"u"||typeof t=="string"&&!t}var K_=(e,t,o)=>o.reduce((r,a)=>{let n=a.getValue(e);return r+(typeof n=="number"?n:0)},0),X_=(e,t,o)=>{let r;return o.forEach(a=>{let n=a.getValue(e);n!=null&&(r>n||r===void 0&&n>=n)&&(r=n)}),r},Y_=(e,t,o)=>{let r;return o.forEach(a=>{let n=a.getValue(e);n!=null&&(r<n||r===void 0&&n>=n)&&(r=n)}),r},Z_=(e,t,o)=>{let r,a;return o.forEach(n=>{let s=n.getValue(e);s!=null&&(r===void 0?s>=s&&(r=a=s):(r>s&&(r=s),a<s&&(a=s)))}),[r,a]},Q_=(e,t)=>{let o=0,r=0;if(t.forEach(a=>{let n=a.getValue(e);n!=null&&(n=+n)>=n&&(++o,r+=n)}),o)return r/o},J_=(e,t)=>{if(!t.length)return;let o=t.map(n=>n.getValue(e));if(!U_(o))return;if(o.length===1)return o[0];let r=Math.floor(o.length/2),a=o.sort((n,s)=>n-s);return o.length%2!==0?a[r]:(a[r-1]+a[r])/2},eV=(e,t)=>Array.from(new Set(t.map(o=>o.getValue(e))).values()),tV=(e,t)=>new Set(t.map(o=>o.getValue(e))).size,oV=(e,t)=>t.length,Kg={sum:K_,min:X_,max:Y_,extent:Z_,mean:Q_,median:J_,unique:eV,uniqueCount:tV,count:oV},rV={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,o;return(t=(o=e.getValue())==null||o.toString==null?void 0:o.toString())!=null?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:xo("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(o=>o!=null&&o.includes(e.id)?o.filter(r=>r!==e.id):[...o??[],e.id])},e.getCanGroup=()=>{var o,r;return((o=e.columnDef.enableGrouping)!=null?o:!0)&&((r=t.options.enableGrouping)!=null?r:!0)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var o;return(o=t.getState().grouping)==null?void 0:o.includes(e.id)},e.getGroupedIndex=()=>{var o;return(o=t.getState().grouping)==null?void 0:o.indexOf(e.id)},e.getToggleGroupingHandler=()=>{let o=e.getCanGroup();return()=>{o&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{let o=t.getCoreRowModel().flatRows[0],r=o?.getValue(e.id);if(typeof r=="number")return Kg.sum;if(Object.prototype.toString.call(r)==="[object Date]")return Kg.extent},e.getAggregationFn=()=>{var o,r;if(!e)throw new Error;return ff(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(o=(r=t.options.aggregationFns)==null?void 0:r[e.columnDef.aggregationFn])!=null?o:Kg[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var o,r;e.setGrouping(t?[]:(o=(r=e.initialState)==null?void 0:r.grouping)!=null?o:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=o=>{if(e._groupingValuesCache.hasOwnProperty(o))return e._groupingValuesCache[o];let r=t.getColumn(o);return r!=null&&r.columnDef.getGroupingValue?(e._groupingValuesCache[o]=r.columnDef.getGroupingValue(e.original),e._groupingValuesCache[o]):e.getValue(o)},e._groupingValuesCache={}},createCell:(e,t,o,r)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===o.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var a;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((a=o.subRows)!=null&&a.length)}}};function aV(e,t,o){if(!(t!=null&&t.length)||!o)return e;let r=e.filter(n=>!t.includes(n.id));return o==="remove"?r:[...t.map(n=>e.find(s=>s.id===n)).filter(Boolean),...r]}var nV={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:xo("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=ie(o=>[mu(t,o)],o=>o.findIndex(r=>r.id===e.id),le(t.options,"debugColumns","getIndex")),e.getIsFirstColumn=o=>{var r;return((r=mu(t,o)[0])==null?void 0:r.id)===e.id},e.getIsLastColumn=o=>{var r;let a=mu(t,o);return((r=a[a.length-1])==null?void 0:r.id)===e.id}},createTable:e=>{e.setColumnOrder=t=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var o;e.setColumnOrder(t?[]:(o=e.initialState.columnOrder)!=null?o:[])},e._getOrderColumnsFn=ie(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(t,o,r)=>a=>{let n=[];if(!(t!=null&&t.length))n=a;else{let s=[...t],i=[...a];for(;i.length&&s.length;){let l=s.shift(),u=i.findIndex(c=>c.id===l);u>-1&&n.push(i.splice(u,1)[0])}n=[...n,...i]}return aV(n,o,r)},le(e.options,"debugTable","_getOrderColumnsFn"))}},Xg=()=>({left:[],right:[]}),sV={getInitialState:e=>({columnPinning:Xg(),...e}),getDefaultOptions:e=>({onColumnPinningChange:xo("columnPinning",e)}),createColumn:(e,t)=>{e.pin=o=>{let r=e.getLeafColumns().map(a=>a.id).filter(Boolean);t.setColumnPinning(a=>{var n,s;if(o==="right"){var i,l;return{left:((i=a?.left)!=null?i:[]).filter(d=>!(r!=null&&r.includes(d))),right:[...((l=a?.right)!=null?l:[]).filter(d=>!(r!=null&&r.includes(d))),...r]}}if(o==="left"){var u,c;return{left:[...((u=a?.left)!=null?u:[]).filter(d=>!(r!=null&&r.includes(d))),...r],right:((c=a?.right)!=null?c:[]).filter(d=>!(r!=null&&r.includes(d)))}}return{left:((n=a?.left)!=null?n:[]).filter(d=>!(r!=null&&r.includes(d))),right:((s=a?.right)!=null?s:[]).filter(d=>!(r!=null&&r.includes(d)))}})},e.getCanPin=()=>e.getLeafColumns().some(r=>{var a,n,s;return((a=r.columnDef.enablePinning)!=null?a:!0)&&((n=(s=t.options.enableColumnPinning)!=null?s:t.options.enablePinning)!=null?n:!0)}),e.getIsPinned=()=>{let o=e.getLeafColumns().map(i=>i.id),{left:r,right:a}=t.getState().columnPinning,n=o.some(i=>r?.includes(i)),s=o.some(i=>a?.includes(i));return n?"left":s?"right":!1},e.getPinnedIndex=()=>{var o,r;let a=e.getIsPinned();return a?(o=(r=t.getState().columnPinning)==null||(r=r[a])==null?void 0:r.indexOf(e.id))!=null?o:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=ie(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(o,r,a)=>{let n=[...r??[],...a??[]];return o.filter(s=>!n.includes(s.column.id))},le(t.options,"debugRows","getCenterVisibleCells")),e.getLeftVisibleCells=ie(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(o,r)=>(r??[]).map(n=>o.find(s=>s.column.id===n)).filter(Boolean).map(n=>({...n,position:"left"})),le(t.options,"debugRows","getLeftVisibleCells")),e.getRightVisibleCells=ie(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(o,r)=>(r??[]).map(n=>o.find(s=>s.column.id===n)).filter(Boolean).map(n=>({...n,position:"right"})),le(t.options,"debugRows","getRightVisibleCells"))},createTable:e=>{e.setColumnPinning=t=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var o,r;return e.setColumnPinning(t?Xg():(o=(r=e.initialState)==null?void 0:r.columnPinning)!=null?o:Xg())},e.getIsSomeColumnsPinned=t=>{var o;let r=e.getState().columnPinning;if(!t){var a,n;return!!((a=r.left)!=null&&a.length||(n=r.right)!=null&&n.length)}return!!((o=r[t])!=null&&o.length)},e.getLeftLeafColumns=ie(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,o)=>(o??[]).map(r=>t.find(a=>a.id===r)).filter(Boolean),le(e.options,"debugColumns","getLeftLeafColumns")),e.getRightLeafColumns=ie(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,o)=>(o??[]).map(r=>t.find(a=>a.id===r)).filter(Boolean),le(e.options,"debugColumns","getRightLeafColumns")),e.getCenterLeafColumns=ie(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,o,r)=>{let a=[...o??[],...r??[]];return t.filter(n=>!a.includes(n.id))},le(e.options,"debugColumns","getCenterLeafColumns"))}};function iV(e){return e||(typeof document<"u"?document:null)}var cf={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},Yg=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),lV={getDefaultColumnDef:()=>cf,getInitialState:e=>({columnSizing:{},columnSizingInfo:Yg(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:xo("columnSizing",e),onColumnSizingInfoChange:xo("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var o,r,a;let n=t.getState().columnSizing[e.id];return Math.min(Math.max((o=e.columnDef.minSize)!=null?o:cf.minSize,(r=n??e.columnDef.size)!=null?r:cf.size),(a=e.columnDef.maxSize)!=null?a:cf.maxSize)},e.getStart=ie(o=>[o,mu(t,o),t.getState().columnSizing],(o,r)=>r.slice(0,e.getIndex(o)).reduce((a,n)=>a+n.getSize(),0),le(t.options,"debugColumns","getStart")),e.getAfter=ie(o=>[o,mu(t,o),t.getState().columnSizing],(o,r)=>r.slice(e.getIndex(o)+1).reduce((a,n)=>a+n.getSize(),0),le(t.options,"debugColumns","getAfter")),e.resetSize=()=>{t.setColumnSizing(o=>{let{[e.id]:r,...a}=o;return a})},e.getCanResize=()=>{var o,r;return((o=e.columnDef.enableResizing)!=null?o:!0)&&((r=t.options.enableColumnResizing)!=null?r:!0)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let o=0,r=a=>{if(a.subHeaders.length)a.subHeaders.forEach(r);else{var n;o+=(n=a.column.getSize())!=null?n:0}};return r(e),o},e.getStart=()=>{if(e.index>0){let o=e.headerGroup.headers[e.index-1];return o.getStart()+o.getSize()}return 0},e.getResizeHandler=o=>{let r=t.getColumn(e.column.id),a=r?.getCanResize();return n=>{if(!r||!a||(n.persist==null||n.persist(),Zg(n)&&n.touches&&n.touches.length>1))return;let s=e.getSize(),i=e?e.getLeafHeaders().map(v=>[v.column.id,v.column.getSize()]):[[r.id,r.getSize()]],l=Zg(n)?Math.round(n.touches[0].clientX):n.clientX,u={},c=(v,x)=>{typeof x=="number"&&(t.setColumnSizingInfo(y=>{var R,C;let w=t.options.columnResizeDirection==="rtl"?-1:1,I=(x-((R=y?.startOffset)!=null?R:0))*w,L=Math.max(I/((C=y?.startSize)!=null?C:0),-.999999);return y.columnSizingStart.forEach(P=>{let[T,O]=P;u[T]=Math.round(Math.max(O+O*L,0)*100)/100}),{...y,deltaOffset:I,deltaPercentage:L}}),(t.options.columnResizeMode==="onChange"||v==="end")&&t.setColumnSizing(y=>({...y,...u})))},d=v=>c("move",v),f=v=>{c("end",v),t.setColumnSizingInfo(x=>({...x,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},m=iV(o),p={moveHandler:v=>d(v.clientX),upHandler:v=>{m?.removeEventListener("mousemove",p.moveHandler),m?.removeEventListener("mouseup",p.upHandler),f(v.clientX)}},g={moveHandler:v=>(v.cancelable&&(v.preventDefault(),v.stopPropagation()),d(v.touches[0].clientX),!1),upHandler:v=>{var x;m?.removeEventListener("touchmove",g.moveHandler),m?.removeEventListener("touchend",g.upHandler),v.cancelable&&(v.preventDefault(),v.stopPropagation()),f((x=v.touches[0])==null?void 0:x.clientX)}},h=uV()?{passive:!1}:!1;Zg(n)?(m?.addEventListener("touchmove",g.moveHandler,h),m?.addEventListener("touchend",g.upHandler,h)):(m?.addEventListener("mousemove",p.moveHandler,h),m?.addEventListener("mouseup",p.upHandler,h)),t.setColumnSizingInfo(v=>({...v,startOffset:l,startSize:s,deltaOffset:0,deltaPercentage:0,columnSizingStart:i,isResizingColumn:r.id}))}}},createTable:e=>{e.setColumnSizing=t=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{var o;e.setColumnSizing(t?{}:(o=e.initialState.columnSizing)!=null?o:{})},e.resetHeaderSizeInfo=t=>{var o;e.setColumnSizingInfo(t?Yg():(o=e.initialState.columnSizingInfo)!=null?o:Yg())},e.getTotalSize=()=>{var t,o;return(t=(o=e.getHeaderGroups()[0])==null?void 0:o.headers.reduce((r,a)=>r+a.getSize(),0))!=null?t:0},e.getLeftTotalSize=()=>{var t,o;return(t=(o=e.getLeftHeaderGroups()[0])==null?void 0:o.headers.reduce((r,a)=>r+a.getSize(),0))!=null?t:0},e.getCenterTotalSize=()=>{var t,o;return(t=(o=e.getCenterHeaderGroups()[0])==null?void 0:o.headers.reduce((r,a)=>r+a.getSize(),0))!=null?t:0},e.getRightTotalSize=()=>{var t,o;return(t=(o=e.getRightHeaderGroups()[0])==null?void 0:o.headers.reduce((r,a)=>r+a.getSize(),0))!=null?t:0}}},df=null;function uV(){if(typeof df=="boolean")return df;let e=!1;try{let t={get passive(){return e=!0,!1}},o=()=>{};window.addEventListener("test",o,t),window.removeEventListener("test",o)}catch{e=!1}return df=e,df}function Zg(e){return e.type==="touchstart"}var cV={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:xo("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=o=>{e.getCanHide()&&t.setColumnVisibility(r=>({...r,[e.id]:o??!e.getIsVisible()}))},e.getIsVisible=()=>{var o,r;let a=e.columns;return(o=a.length?a.some(n=>n.getIsVisible()):(r=t.getState().columnVisibility)==null?void 0:r[e.id])!=null?o:!0},e.getCanHide=()=>{var o,r;return((o=e.columnDef.enableHiding)!=null?o:!0)&&((r=t.options.enableHiding)!=null?r:!0)},e.getToggleVisibilityHandler=()=>o=>{e.toggleVisibility==null||e.toggleVisibility(o.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=ie(()=>[e.getAllCells(),t.getState().columnVisibility],o=>o.filter(r=>r.column.getIsVisible()),le(t.options,"debugRows","_getAllVisibleCells")),e.getVisibleCells=ie(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(o,r,a)=>[...o,...r,...a],le(t.options,"debugRows","getVisibleCells"))},createTable:e=>{let t=(o,r)=>ie(()=>[r(),r().filter(a=>a.getIsVisible()).map(a=>a.id).join("_")],a=>a.filter(n=>n.getIsVisible==null?void 0:n.getIsVisible()),le(e.options,"debugColumns",o));e.getVisibleFlatColumns=t("getVisibleFlatColumns",()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=t("getVisibleLeafColumns",()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=t("getLeftVisibleLeafColumns",()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=t("getRightVisibleLeafColumns",()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=t("getCenterVisibleLeafColumns",()=>e.getCenterLeafColumns()),e.setColumnVisibility=o=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(o),e.resetColumnVisibility=o=>{var r;e.setColumnVisibility(o?{}:(r=e.initialState.columnVisibility)!=null?r:{})},e.toggleAllColumnsVisible=o=>{var r;o=(r=o)!=null?r:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((a,n)=>({...a,[n.id]:o||!(n.getCanHide!=null&&n.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(o=>!(o.getIsVisible!=null&&o.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(o=>o.getIsVisible==null?void 0:o.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>o=>{var r;e.toggleAllColumnsVisible((r=o.target)==null?void 0:r.checked)}}};function mu(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}var dV={createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},fV={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:xo("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var o;let r=(o=e.getCoreRowModel().flatRows[0])==null||(o=o._getAllCellsByColumnId()[t.id])==null?void 0:o.getValue();return typeof r=="string"||typeof r=="number"}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>{var o,r,a,n;return((o=e.columnDef.enableGlobalFilter)!=null?o:!0)&&((r=t.options.enableGlobalFilter)!=null?r:!0)&&((a=t.options.enableFilters)!=null?a:!0)&&((n=t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))!=null?n:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>Jr.includesString,e.getGlobalFilterFn=()=>{var t,o;let{globalFilterFn:r}=e.options;return ff(r)?r:r==="auto"?e.getGlobalAutoFilterFn():(t=(o=e.options.filterFns)==null?void 0:o[r])!=null?t:Jr[r]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},mV={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:xo("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,o=!1;e._autoResetExpanded=()=>{var r,a;if(!t){e._queue(()=>{t=!0});return}if((r=(a=e.options.autoResetAll)!=null?a:e.options.autoResetExpanded)!=null?r:!e.options.manualExpanding){if(o)return;o=!0,e._queue(()=>{e.resetExpanded(),o=!1})}},e.setExpanded=r=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(r),e.toggleAllRowsExpanded=r=>{r??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=r=>{var a,n;e.setExpanded(r?{}:(a=(n=e.initialState)==null?void 0:n.expanded)!=null?a:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(r=>r.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>r=>{r.persist==null||r.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{let r=e.getState().expanded;return r===!0||Object.values(r).some(Boolean)},e.getIsAllRowsExpanded=()=>{let r=e.getState().expanded;return typeof r=="boolean"?r===!0:!(!Object.keys(r).length||e.getRowModel().flatRows.some(a=>!a.getIsExpanded()))},e.getExpandedDepth=()=>{let r=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(n=>{let s=n.split(".");r=Math.max(r,s.length)}),r},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,t)=>{e.toggleExpanded=o=>{t.setExpanded(r=>{var a;let n=r===!0?!0:!!(r!=null&&r[e.id]),s={};if(r===!0?Object.keys(t.getRowModel().rowsById).forEach(i=>{s[i]=!0}):s=r,o=(a=o)!=null?a:!n,!n&&o)return{...s,[e.id]:!0};if(n&&!o){let{[e.id]:i,...l}=s;return l}return r})},e.getIsExpanded=()=>{var o;let r=t.getState().expanded;return!!((o=t.options.getIsRowExpanded==null?void 0:t.options.getIsRowExpanded(e))!=null?o:r===!0||r?.[e.id])},e.getCanExpand=()=>{var o,r,a;return(o=t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))!=null?o:((r=t.options.enableExpanding)!=null?r:!0)&&!!((a=e.subRows)!=null&&a.length)},e.getIsAllParentsExpanded=()=>{let o=!0,r=e;for(;o&&r.parentId;)r=t.getRow(r.parentId,!0),o=r.getIsExpanded();return o},e.getToggleExpandedHandler=()=>{let o=e.getCanExpand();return()=>{o&&e.toggleExpanded()}}}},th=0,oh=10,Qg=()=>({pageIndex:th,pageSize:oh}),pV={getInitialState:e=>({...e,pagination:{...Qg(),...e?.pagination}}),getDefaultOptions:e=>({onPaginationChange:xo("pagination",e)}),createTable:e=>{let t=!1,o=!1;e._autoResetPageIndex=()=>{var r,a;if(!t){e._queue(()=>{t=!0});return}if((r=(a=e.options.autoResetAll)!=null?a:e.options.autoResetPageIndex)!=null?r:!e.options.manualPagination){if(o)return;o=!0,e._queue(()=>{e.resetPageIndex(),o=!1})}},e.setPagination=r=>{let a=n=>Ha(r,n);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(a)},e.resetPagination=r=>{var a;e.setPagination(r?Qg():(a=e.initialState.pagination)!=null?a:Qg())},e.setPageIndex=r=>{e.setPagination(a=>{let n=Ha(r,a.pageIndex),s=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return n=Math.max(0,Math.min(n,s)),{...a,pageIndex:n}})},e.resetPageIndex=r=>{var a,n;e.setPageIndex(r?th:(a=(n=e.initialState)==null||(n=n.pagination)==null?void 0:n.pageIndex)!=null?a:th)},e.resetPageSize=r=>{var a,n;e.setPageSize(r?oh:(a=(n=e.initialState)==null||(n=n.pagination)==null?void 0:n.pageSize)!=null?a:oh)},e.setPageSize=r=>{e.setPagination(a=>{let n=Math.max(1,Ha(r,a.pageSize)),s=a.pageSize*a.pageIndex,i=Math.floor(s/n);return{...a,pageIndex:i,pageSize:n}})},e.setPageCount=r=>e.setPagination(a=>{var n;let s=Ha(r,(n=e.options.pageCount)!=null?n:-1);return typeof s=="number"&&(s=Math.max(-1,s)),{...a,pageCount:s}}),e.getPageOptions=ie(()=>[e.getPageCount()],r=>{let a=[];return r&&r>0&&(a=[...new Array(r)].fill(null).map((n,s)=>s)),a},le(e.options,"debugTable","getPageOptions")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{let{pageIndex:r}=e.getState().pagination,a=e.getPageCount();return a===-1?!0:a===0?!1:r<a-1},e.previousPage=()=>e.setPageIndex(r=>r-1),e.nextPage=()=>e.setPageIndex(r=>r+1),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var r;return(r=e.options.pageCount)!=null?r:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var r;return(r=e.options.rowCount)!=null?r:e.getPrePaginationRowModel().rows.length}}},Jg=()=>({top:[],bottom:[]}),gV={getInitialState:e=>({rowPinning:Jg(),...e}),getDefaultOptions:e=>({onRowPinningChange:xo("rowPinning",e)}),createRow:(e,t)=>{e.pin=(o,r,a)=>{let n=r?e.getLeafRows().map(l=>{let{id:u}=l;return u}):[],s=a?e.getParentRows().map(l=>{let{id:u}=l;return u}):[],i=new Set([...s,e.id,...n]);t.setRowPinning(l=>{var u,c;if(o==="bottom"){var d,f;return{top:((d=l?.top)!=null?d:[]).filter(g=>!(i!=null&&i.has(g))),bottom:[...((f=l?.bottom)!=null?f:[]).filter(g=>!(i!=null&&i.has(g))),...Array.from(i)]}}if(o==="top"){var m,p;return{top:[...((m=l?.top)!=null?m:[]).filter(g=>!(i!=null&&i.has(g))),...Array.from(i)],bottom:((p=l?.bottom)!=null?p:[]).filter(g=>!(i!=null&&i.has(g)))}}return{top:((u=l?.top)!=null?u:[]).filter(g=>!(i!=null&&i.has(g))),bottom:((c=l?.bottom)!=null?c:[]).filter(g=>!(i!=null&&i.has(g)))}})},e.getCanPin=()=>{var o;let{enableRowPinning:r,enablePinning:a}=t.options;return typeof r=="function"?r(e):(o=r??a)!=null?o:!0},e.getIsPinned=()=>{let o=[e.id],{top:r,bottom:a}=t.getState().rowPinning,n=o.some(i=>r?.includes(i)),s=o.some(i=>a?.includes(i));return n?"top":s?"bottom":!1},e.getPinnedIndex=()=>{var o,r;let a=e.getIsPinned();if(!a)return-1;let n=(o=a==="top"?t.getTopRows():t.getBottomRows())==null?void 0:o.map(s=>{let{id:i}=s;return i});return(r=n?.indexOf(e.id))!=null?r:-1}},createTable:e=>{e.setRowPinning=t=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var o,r;return e.setRowPinning(t?Jg():(o=(r=e.initialState)==null?void 0:r.rowPinning)!=null?o:Jg())},e.getIsSomeRowsPinned=t=>{var o;let r=e.getState().rowPinning;if(!t){var a,n;return!!((a=r.top)!=null&&a.length||(n=r.bottom)!=null&&n.length)}return!!((o=r[t])!=null&&o.length)},e._getPinnedRows=(t,o,r)=>{var a;return((a=e.options.keepPinnedRows)==null||a?(o??[]).map(s=>{let i=e.getRow(s,!0);return i.getIsAllParentsExpanded()?i:null}):(o??[]).map(s=>t.find(i=>i.id===s))).filter(Boolean).map(s=>({...s,position:r}))},e.getTopRows=ie(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,o)=>e._getPinnedRows(t,o,"top"),le(e.options,"debugRows","getTopRows")),e.getBottomRows=ie(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,o)=>e._getPinnedRows(t,o,"bottom"),le(e.options,"debugRows","getBottomRows")),e.getCenterRows=ie(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(t,o,r)=>{let a=new Set([...o??[],...r??[]]);return t.filter(n=>!a.has(n.id))},le(e.options,"debugRows","getCenterRows"))}},hV={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:xo("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var o;return e.setRowSelection(t?{}:(o=e.initialState.rowSelection)!=null?o:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection(o=>{t=typeof t<"u"?t:!e.getIsAllRowsSelected();let r={...o},a=e.getPreGroupedRowModel().flatRows;return t?a.forEach(n=>{n.getCanSelect()&&(r[n.id]=!0)}):a.forEach(n=>{delete r[n.id]}),r})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(o=>{let r=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),a={...o};return e.getRowModel().rows.forEach(n=>{rh(a,n.id,r,!0,e)}),a}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=ie(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,o)=>Object.keys(t).length?eh(e,o):{rows:[],flatRows:[],rowsById:{}},le(e.options,"debugTable","getSelectedRowModel")),e.getFilteredSelectedRowModel=ie(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,o)=>Object.keys(t).length?eh(e,o):{rows:[],flatRows:[],rowsById:{}},le(e.options,"debugTable","getFilteredSelectedRowModel")),e.getGroupedSelectedRowModel=ie(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,o)=>Object.keys(t).length?eh(e,o):{rows:[],flatRows:[],rowsById:{}},le(e.options,"debugTable","getGroupedSelectedRowModel")),e.getIsAllRowsSelected=()=>{let t=e.getFilteredRowModel().flatRows,{rowSelection:o}=e.getState(),r=!!(t.length&&Object.keys(o).length);return r&&t.some(a=>a.getCanSelect()&&!o[a.id])&&(r=!1),r},e.getIsAllPageRowsSelected=()=>{let t=e.getPaginationRowModel().flatRows.filter(a=>a.getCanSelect()),{rowSelection:o}=e.getState(),r=!!t.length;return r&&t.some(a=>!o[a.id])&&(r=!1),r},e.getIsSomeRowsSelected=()=>{var t;let o=Object.keys((t=e.getState().rowSelection)!=null?t:{}).length;return o>0&&o<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{let t=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:t.filter(o=>o.getCanSelect()).some(o=>o.getIsSelected()||o.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(o,r)=>{let a=e.getIsSelected();t.setRowSelection(n=>{var s;if(o=typeof o<"u"?o:!a,e.getCanSelect()&&a===o)return n;let i={...n};return rh(i,e.id,o,(s=r?.selectChildren)!=null?s:!0,t),i})},e.getIsSelected=()=>{let{rowSelection:o}=t.getState();return lh(e,o)},e.getIsSomeSelected=()=>{let{rowSelection:o}=t.getState();return ah(e,o)==="some"},e.getIsAllSubRowsSelected=()=>{let{rowSelection:o}=t.getState();return ah(e,o)==="all"},e.getCanSelect=()=>{var o;return typeof t.options.enableRowSelection=="function"?t.options.enableRowSelection(e):(o=t.options.enableRowSelection)!=null?o:!0},e.getCanSelectSubRows=()=>{var o;return typeof t.options.enableSubRowSelection=="function"?t.options.enableSubRowSelection(e):(o=t.options.enableSubRowSelection)!=null?o:!0},e.getCanMultiSelect=()=>{var o;return typeof t.options.enableMultiRowSelection=="function"?t.options.enableMultiRowSelection(e):(o=t.options.enableMultiRowSelection)!=null?o:!0},e.getToggleSelectedHandler=()=>{let o=e.getCanSelect();return r=>{var a;o&&e.toggleSelected((a=r.target)==null?void 0:a.checked)}}}},rh=(e,t,o,r,a)=>{var n;let s=a.getRow(t,!0);o?(s.getCanMultiSelect()||Object.keys(e).forEach(i=>delete e[i]),s.getCanSelect()&&(e[t]=!0)):delete e[t],r&&(n=s.subRows)!=null&&n.length&&s.getCanSelectSubRows()&&s.subRows.forEach(i=>rh(e,i.id,o,r,a))};function eh(e,t){let o=e.getState().rowSelection,r=[],a={},n=function(s,i){return s.map(l=>{var u;let c=lh(l,o);if(c&&(r.push(l),a[l.id]=l),(u=l.subRows)!=null&&u.length&&(l={...l,subRows:n(l.subRows)}),c)return l}).filter(Boolean)};return{rows:n(t.rows),flatRows:r,rowsById:a}}function lh(e,t){var o;return(o=t[e.id])!=null?o:!1}function ah(e,t,o){var r;if(!((r=e.subRows)!=null&&r.length))return!1;let a=!0,n=!1;return e.subRows.forEach(s=>{if(!(n&&!a)&&(s.getCanSelect()&&(lh(s,t)?n=!0:a=!1),s.subRows&&s.subRows.length)){let i=ah(s,t);i==="all"?n=!0:(i==="some"&&(n=!0),a=!1)}}),a?"all":n?"some":!1}var nh=/([0-9]+)/gm,xV=(e,t,o)=>pL(Ua(e.getValue(o)).toLowerCase(),Ua(t.getValue(o)).toLowerCase()),vV=(e,t,o)=>pL(Ua(e.getValue(o)),Ua(t.getValue(o))),yV=(e,t,o)=>uh(Ua(e.getValue(o)).toLowerCase(),Ua(t.getValue(o)).toLowerCase()),bV=(e,t,o)=>uh(Ua(e.getValue(o)),Ua(t.getValue(o))),CV=(e,t,o)=>{let r=e.getValue(o),a=t.getValue(o);return r>a?1:r<a?-1:0},wV=(e,t,o)=>uh(e.getValue(o),t.getValue(o));function uh(e,t){return e===t?0:e>t?1:-1}function Ua(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function pL(e,t){let o=e.split(nh).filter(Boolean),r=t.split(nh).filter(Boolean);for(;o.length&&r.length;){let a=o.shift(),n=r.shift(),s=parseInt(a,10),i=parseInt(n,10),l=[s,i].sort();if(isNaN(l[0])){if(a>n)return 1;if(n>a)return-1;continue}if(isNaN(l[1]))return isNaN(s)?-1:1;if(s>i)return 1;if(i>s)return-1}return o.length-r.length}var fu={alphanumeric:xV,alphanumericCaseSensitive:vV,text:yV,textCaseSensitive:bV,datetime:CV,basic:wV},SV={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:xo("sorting",e),isMultiSortEvent:t=>t.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{let o=t.getFilteredRowModel().flatRows.slice(10),r=!1;for(let a of o){let n=a?.getValue(e.id);if(Object.prototype.toString.call(n)==="[object Date]")return fu.datetime;if(typeof n=="string"&&(r=!0,n.split(nh).length>1))return fu.alphanumeric}return r?fu.text:fu.basic},e.getAutoSortDir=()=>{let o=t.getFilteredRowModel().flatRows[0];return typeof o?.getValue(e.id)=="string"?"asc":"desc"},e.getSortingFn=()=>{var o,r;if(!e)throw new Error;return ff(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(o=(r=t.options.sortingFns)==null?void 0:r[e.columnDef.sortingFn])!=null?o:fu[e.columnDef.sortingFn]},e.toggleSorting=(o,r)=>{let a=e.getNextSortingOrder(),n=typeof o<"u"&&o!==null;t.setSorting(s=>{let i=s?.find(m=>m.id===e.id),l=s?.findIndex(m=>m.id===e.id),u=[],c,d=n?o:a==="desc";if(s!=null&&s.length&&e.getCanMultiSort()&&r?i?c="toggle":c="add":s!=null&&s.length&&l!==s.length-1?c="replace":i?c="toggle":c="replace",c==="toggle"&&(n||a||(c="remove")),c==="add"){var f;u=[...s,{id:e.id,desc:d}],u.splice(0,u.length-((f=t.options.maxMultiSortColCount)!=null?f:Number.MAX_SAFE_INTEGER))}else c==="toggle"?u=s.map(m=>m.id===e.id?{...m,desc:d}:m):c==="remove"?u=s.filter(m=>m.id!==e.id):u=[{id:e.id,desc:d}];return u})},e.getFirstSortDir=()=>{var o,r;return((o=(r=e.columnDef.sortDescFirst)!=null?r:t.options.sortDescFirst)!=null?o:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=o=>{var r,a;let n=e.getFirstSortDir(),s=e.getIsSorted();return s?s!==n&&((r=t.options.enableSortingRemoval)==null||r)&&(!(o&&(a=t.options.enableMultiRemove)!=null)||a)?!1:s==="desc"?"asc":"desc":n},e.getCanSort=()=>{var o,r;return((o=e.columnDef.enableSorting)!=null?o:!0)&&((r=t.options.enableSorting)!=null?r:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var o,r;return(o=(r=e.columnDef.enableMultiSort)!=null?r:t.options.enableMultiSort)!=null?o:!!e.accessorFn},e.getIsSorted=()=>{var o;let r=(o=t.getState().sorting)==null?void 0:o.find(a=>a.id===e.id);return r?r.desc?"desc":"asc":!1},e.getSortIndex=()=>{var o,r;return(o=(r=t.getState().sorting)==null?void 0:r.findIndex(a=>a.id===e.id))!=null?o:-1},e.clearSorting=()=>{t.setSorting(o=>o!=null&&o.length?o.filter(r=>r.id!==e.id):[])},e.getToggleSortingHandler=()=>{let o=e.getCanSort();return r=>{o&&(r.persist==null||r.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?t.options.isMultiSortEvent==null?void 0:t.options.isMultiSortEvent(r):!1))}}},createTable:e=>{e.setSorting=t=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var o,r;e.setSorting(t?[]:(o=(r=e.initialState)==null?void 0:r.sorting)!=null?o:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},RV=[W_,cV,nV,sV,$_,j_,dV,fV,SV,rV,mV,pV,gV,hV,lV];function gL(e){var t,o;let r=[...RV,...(t=e._features)!=null?t:[]],a={_features:r},n=a._features.reduce((f,m)=>Object.assign(f,m.getDefaultOptions==null?void 0:m.getDefaultOptions(a)),{}),s=f=>a.options.mergeOptions?a.options.mergeOptions(n,f):{...n,...f},l={...{},...(o=e.initialState)!=null?o:{}};a._features.forEach(f=>{var m;l=(m=f.getInitialState==null?void 0:f.getInitialState(l))!=null?m:l});let u=[],c=!1,d={_features:r,options:{...n,...e},initialState:l,_queue:f=>{u.push(f),c||(c=!0,Promise.resolve().then(()=>{for(;u.length;)u.shift()();c=!1}).catch(m=>setTimeout(()=>{throw m})))},reset:()=>{a.setState(a.initialState)},setOptions:f=>{let m=Ha(f,a.options);a.options=s(m)},getState:()=>a.options.state,setState:f=>{a.options.onStateChange==null||a.options.onStateChange(f)},_getRowId:(f,m,p)=>{var g;return(g=a.options.getRowId==null?void 0:a.options.getRowId(f,m,p))!=null?g:`${p?[p.id,m].join("."):m}`},getCoreRowModel:()=>(a._getCoreRowModel||(a._getCoreRowModel=a.options.getCoreRowModel(a)),a._getCoreRowModel()),getRowModel:()=>a.getPaginationRowModel(),getRow:(f,m)=>{let p=(m?a.getPrePaginationRowModel():a.getRowModel()).rowsById[f];if(!p&&(p=a.getCoreRowModel().rowsById[f],!p))throw new Error;return p},_getDefaultColumnDef:ie(()=>[a.options.defaultColumn],f=>{var m;return f=(m=f)!=null?m:{},{header:p=>{let g=p.header.column.columnDef;return g.accessorKey?g.accessorKey:g.accessorFn?g.id:null},cell:p=>{var g,h;return(g=(h=p.renderValue())==null||h.toString==null?void 0:h.toString())!=null?g:null},...a._features.reduce((p,g)=>Object.assign(p,g.getDefaultColumnDef==null?void 0:g.getDefaultColumnDef()),{}),...f}},le(e,"debugColumns","_getDefaultColumnDef")),_getColumnDefs:()=>a.options.columns,getAllColumns:ie(()=>[a._getColumnDefs()],f=>{let m=function(p,g,h){return h===void 0&&(h=0),p.map(v=>{let x=q_(a,v,h,g),y=v;return x.columns=y.columns?m(y.columns,x,h+1):[],x})};return m(f)},le(e,"debugColumns","getAllColumns")),getAllFlatColumns:ie(()=>[a.getAllColumns()],f=>f.flatMap(m=>m.getFlatColumns()),le(e,"debugColumns","getAllFlatColumns")),_getAllFlatColumnsById:ie(()=>[a.getAllFlatColumns()],f=>f.reduce((m,p)=>(m[p.id]=p,m),{}),le(e,"debugColumns","getAllFlatColumnsById")),getAllLeafColumns:ie(()=>[a.getAllColumns(),a._getOrderColumnsFn()],(f,m)=>{let p=f.flatMap(g=>g.getLeafColumns());return m(p)},le(e,"debugColumns","getAllLeafColumns")),getColumn:f=>a._getAllFlatColumnsById()[f]};Object.assign(a,d);for(let f=0;f<a._features.length;f++){let m=a._features[f];m==null||m.createTable==null||m.createTable(a)}return a}function hL(){return e=>ie(()=>[e.options.data],t=>{let o={rows:[],flatRows:[],rowsById:{}},r=function(a,n,s){n===void 0&&(n=0);let i=[];for(let u=0;u<a.length;u++){let c=sh(e,e._getRowId(a[u],u,s),a[u],u,n,void 0,s?.id);if(o.flatRows.push(c),o.rowsById[c.id]=c,i.push(c),e.options.getSubRows){var l;c.originalSubRows=e.options.getSubRows(a[u],u),(l=c.originalSubRows)!=null&&l.length&&(c.subRows=r(c.originalSubRows,n+1,c))}}return i};return o.rows=r(t),o},le(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}function IV(e){let t=[],o=r=>{var a;t.push(r),(a=r.subRows)!=null&&a.length&&r.getIsExpanded()&&r.subRows.forEach(o)};return e.rows.forEach(o),{rows:t,flatRows:e.flatRows,rowsById:e.rowsById}}function LV(e,t,o){return o.options.filterFromLeafRows?PV(e,t,o):TV(e,t,o)}function PV(e,t,o){var r;let a=[],n={},s=(r=o.options.maxLeafRowFilterDepth)!=null?r:100,i=function(l,u){u===void 0&&(u=0);let c=[];for(let f=0;f<l.length;f++){var d;let m=l[f],p=sh(o,m.id,m.original,m.index,m.depth,void 0,m.parentId);if(p.columnFilters=m.columnFilters,(d=m.subRows)!=null&&d.length&&u<s){if(p.subRows=i(m.subRows,u+1),m=p,t(m)&&!p.subRows.length){c.push(m),n[m.id]=m,a.push(m);continue}if(t(m)||p.subRows.length){c.push(m),n[m.id]=m,a.push(m);continue}}else m=p,t(m)&&(c.push(m),n[m.id]=m,a.push(m))}return c};return{rows:i(e),flatRows:a,rowsById:n}}function TV(e,t,o){var r;let a=[],n={},s=(r=o.options.maxLeafRowFilterDepth)!=null?r:100,i=function(l,u){u===void 0&&(u=0);let c=[];for(let f=0;f<l.length;f++){let m=l[f];if(t(m)){var d;if((d=m.subRows)!=null&&d.length&&u<s){let g=sh(o,m.id,m.original,m.index,m.depth,void 0,m.parentId);g.subRows=i(m.subRows,u+1),m=g}c.push(m),a.push(m),n[m.id]=m}}return c};return{rows:i(e),flatRows:a,rowsById:n}}function xL(){return e=>ie(()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter],(t,o,r)=>{if(!t.rows.length||!(o!=null&&o.length)&&!r){for(let f=0;f<t.flatRows.length;f++)t.flatRows[f].columnFilters={},t.flatRows[f].columnFiltersMeta={};return t}let a=[],n=[];(o??[]).forEach(f=>{var m;let p=e.getColumn(f.id);if(!p)return;let g=p.getFilterFn();g&&a.push({id:f.id,filterFn:g,resolvedValue:(m=g.resolveFilterValue==null?void 0:g.resolveFilterValue(f.value))!=null?m:f.value})});let s=(o??[]).map(f=>f.id),i=e.getGlobalFilterFn(),l=e.getAllLeafColumns().filter(f=>f.getCanGlobalFilter());r&&i&&l.length&&(s.push("__global__"),l.forEach(f=>{var m;n.push({id:f.id,filterFn:i,resolvedValue:(m=i.resolveFilterValue==null?void 0:i.resolveFilterValue(r))!=null?m:r})}));let u,c;for(let f=0;f<t.flatRows.length;f++){let m=t.flatRows[f];if(m.columnFilters={},a.length)for(let p=0;p<a.length;p++){u=a[p];let g=u.id;m.columnFilters[g]=u.filterFn(m,g,u.resolvedValue,h=>{m.columnFiltersMeta[g]=h})}if(n.length){for(let p=0;p<n.length;p++){c=n[p];let g=c.id;if(c.filterFn(m,g,c.resolvedValue,h=>{m.columnFiltersMeta[g]=h})){m.columnFilters.__global__=!0;break}}m.columnFilters.__global__!==!0&&(m.columnFilters.__global__=!1)}}let d=f=>{for(let m=0;m<s.length;m++)if(f.columnFilters[s[m]]===!1)return!1;return!0};return LV(t.rows,d,e)},le(e.options,"debugTable","getFilteredRowModel",()=>e._autoResetPageIndex()))}function vL(e){return t=>ie(()=>[t.getState().pagination,t.getPrePaginationRowModel(),t.options.paginateExpandedRows?void 0:t.getState().expanded],(o,r)=>{if(!r.rows.length)return r;let{pageSize:a,pageIndex:n}=o,{rows:s,flatRows:i,rowsById:l}=r,u=a*n,c=u+a;s=s.slice(u,c);let d;t.options.paginateExpandedRows?d={rows:s,flatRows:i,rowsById:l}:d=IV({rows:s,flatRows:i,rowsById:l}),d.flatRows=[];let f=m=>{d.flatRows.push(m),m.subRows.length&&m.subRows.forEach(f)};return d.rows.forEach(f),d},le(t.options,"debugTable","getPaginationRowModel"))}function yL(){return e=>ie(()=>[e.getState().sorting,e.getPreSortedRowModel()],(t,o)=>{if(!o.rows.length||!(t!=null&&t.length))return o;let r=e.getState().sorting,a=[],n=r.filter(l=>{var u;return(u=e.getColumn(l.id))==null?void 0:u.getCanSort()}),s={};n.forEach(l=>{let u=e.getColumn(l.id);u&&(s[l.id]={sortUndefined:u.columnDef.sortUndefined,invertSorting:u.columnDef.invertSorting,sortingFn:u.getSortingFn()})});let i=l=>{let u=l.map(c=>({...c}));return u.sort((c,d)=>{for(let m=0;m<n.length;m+=1){var f;let p=n[m],g=s[p.id],h=g.sortUndefined,v=(f=p?.desc)!=null?f:!1,x=0;if(h){let y=c.getValue(p.id),R=d.getValue(p.id),C=y===void 0,w=R===void 0;if(C||w){if(h==="first")return C?-1:1;if(h==="last")return C?1:-1;x=C&&w?0:C?h:-h}}if(x===0&&(x=g.sortingFn(c,d,p.id)),x!==0)return v&&(x*=-1),g.invertSorting&&(x*=-1),x}return c.index-d.index}),u.forEach(c=>{var d;a.push(c),(d=c.subRows)!=null&&d.length&&(c.subRows=i(c.subRows))}),u};return{rows:i(o.rows),flatRows:a,rowsById:o.rowsById}},le(e.options,"debugTable","getSortedRowModel",()=>e._autoResetPageIndex()))}function ch(e,t){return e?MV(e)?pu.createElement(e,t):e:null}function MV(e){return kV(e)||typeof e=="function"||AV(e)}function kV(e){return typeof e=="function"&&(()=>{let t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function AV(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function bL(e){let t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[o]=pu.useState(()=>({current:gL(t)})),[r,a]=pu.useState(()=>o.current.initialState);return o.current.setOptions(n=>({...n,...e,state:{...r,...e.state},onStateChange:s=>{a(s),e.onStateChange==null||e.onStateChange(s)}})),o.current}var Ft=b(A());var Ze=b(D()),DV=te("w-full caption-bottom text-sm",{variants:{variant:{default:"dark:text-gray-200",bordered:"border border-border dark:border-gray-700",striped:"dark:text-gray-200",card:"border border-border dark:border-gray-700 rounded-md shadow-sm dark:shadow-gray-900/20",minimal:"border-none dark:text-gray-200"},size:{sm:"text-xs",default:"text-sm",lg:"text-base"}},defaultVariants:{variant:"default",size:"default"}}),mf=Ft.forwardRef(({className:e,variant:t,size:o,loading:r,emptyContent:a,...n},s)=>{let i=t==="striped",l=Ft.Children.map(n.children,u=>{if(Ft.isValidElement(u)&&u.type==="tbody"){let c=u.props;return Ft.cloneElement(u,{className:S(c.className,i&&"even:[&>tr]:bg-muted/50")})}return u});return(0,Ze.jsxs)("div",{className:"relative w-full overflow-auto",children:[r&&(0,Ze.jsx)("div",{className:"absolute inset-0 bg-background/60 flex items-center justify-center z-10",children:(0,Ze.jsx)("div",{className:"h-8 w-8 animate-spin rounded-full border-2 border-primary border-t-transparent"})}),(0,Ze.jsx)("table",{ref:s,className:S(DV({variant:t,size:o}),r&&"opacity-70",e),...n,children:l})]})});mf.displayName="Table";var pf=Ft.forwardRef(({className:e,...t},o)=>(0,Ze.jsx)("thead",{ref:o,className:S("moonui-theme","[&_tr]:border-b",e),...t}));pf.displayName="TableHeader";var gf=Ft.forwardRef(({className:e,emptyContent:t,emptyMessage:o="No data available",children:r,...a},n)=>{let s=Ft.Children.count(r)>0;return(0,Ze.jsx)("tbody",{ref:n,className:S("moonui-theme","[&_tr:last-child]:border-0",e),...a,children:s?r:(0,Ze.jsx)("tr",{children:(0,Ze.jsx)("td",{colSpan:100,className:"h-24 text-center",children:t||(0,Ze.jsx)("div",{className:"py-6 text-muted-foreground",children:(0,Ze.jsx)("div",{className:"text-sm",children:o})})})})})});gf.displayName="TableBody";var CL=Ft.forwardRef(({className:e,...t},o)=>(0,Ze.jsx)("tfoot",{ref:o,className:S("moonui-theme","bg-primary text-primary-foreground font-medium",e),...t}));CL.displayName="TableFooter";var di=Ft.forwardRef(({className:e,...t},o)=>(0,Ze.jsx)("tr",{ref:o,className:S("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));di.displayName="TableRow";var hf=Ft.forwardRef(({className:e,sortable:t,sorted:o,onSort:r,align:a="left",children:n,...s},i)=>{let l=()=>t?o==="asc"?(0,Ze.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"ml-1 h-4 w-4 inline-block",viewBox:"0 0 20 20",fill:"currentColor",children:(0,Ze.jsx)("path",{fillRule:"evenodd",d:"M14.707 10.293a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 111.414-1.414L9 12.586V5a1 1 0 012 0v7.586l2.293-2.293a1 1 0 011.414 0z",clipRule:"evenodd"})}):o==="desc"?(0,Ze.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"ml-1 h-4 w-4 inline-block",viewBox:"0 0 20 20",fill:"currentColor",children:(0,Ze.jsx)("path",{fillRule:"evenodd",d:"M5.293 9.707a1 1 0 010-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 01-1.414 1.414L11 7.414V15a1 1 0 11-2 0V7.414L6.707 9.707a1 1 0 01-1.414 0z",clipRule:"evenodd"})}):(0,Ze.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"ml-1 h-4 w-4 inline-block opacity-30",viewBox:"0 0 20 20",fill:"currentColor",children:(0,Ze.jsx)("path",{fillRule:"evenodd",d:"M10 3a1 1 0 01.707.293l3 3a1 1 0 01-1.414 1.414L10 5.414 7.707 7.707a1 1 0 01-1.414-1.414l3-3A1 1 0 0110 3zm-3.707 9.293a1 1 0 011.414 0L10 14.586l2.293-2.293a1 1 0 011.414 1.414l-3 3a1 1 0 01-1.414 0l-3-3a1 1 0 010-1.414z",clipRule:"evenodd"})}):null,u={left:"text-left justify-start",center:"text-center justify-center",right:"text-right justify-end"};return(0,Ze.jsx)("th",{ref:i,className:S("h-10 px-4 align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",u[a].split(" ")[0],t&&"cursor-pointer hover:text-foreground select-none",e),onClick:t?r:void 0,...s,children:t||a!=="left"?(0,Ze.jsxs)("div",{className:S("flex items-center",u[a].split(" ")[1]),children:[n,t&&l()]}):n})});hf.displayName="TableHead";var gu=Ft.forwardRef(({className:e,align:t="left",...o},r)=>{let a={left:"text-left",center:"text-center",right:"text-right"}[t];return(0,Ze.jsx)("td",{ref:r,className:S("moonui-theme","p-4 align-middle [&:has([role=checkbox])]:pr-0",a,e),...o})});gu.displayName="TableCell";var wL=Ft.forwardRef(({className:e,...t},o)=>(0,Ze.jsx)("caption",{ref:o,className:S("moonui-theme","mt-4 text-sm text-muted-foreground",e),...t}));wL.displayName="TableCaption";var Ie=b(D());function EV({columns:e,data:t,enableSorting:o=!0,enablePagination:r=!0,enableSearch:a=!0,pageSize:n=10,searchPlaceholder:s="Search...",emptyMessage:i="No results found.",className:l}){let[u,c]=dh.useState([]),[d,f]=dh.useState(""),m=bL({data:t,columns:e,onSortingChange:o?c:void 0,onGlobalFilterChange:a?f:void 0,getCoreRowModel:hL(),getPaginationRowModel:r?vL():void 0,getSortedRowModel:o?yL():void 0,getFilteredRowModel:a?xL():void 0,state:{sorting:u,globalFilter:d},initialState:{pagination:{pageSize:n}}});return(0,Ie.jsxs)("div",{className:S("space-y-4",l),children:[a&&(0,Ie.jsx)("div",{className:"flex items-center",children:(0,Ie.jsxs)("div",{className:"relative max-w-sm",children:[(0,Ie.jsx)(rn,{className:"absolute left-2 top-2.5 h-4 w-4 text-muted-foreground"}),(0,Ie.jsx)(At,{placeholder:s,value:d,onChange:p=>f(p.target.value),className:"pl-8"})]})}),(0,Ie.jsx)("div",{className:"rounded-md border",children:(0,Ie.jsxs)(mf,{children:[(0,Ie.jsx)(pf,{children:m.getHeaderGroups().map(p=>(0,Ie.jsx)(di,{children:p.headers.map(g=>(0,Ie.jsx)(hf,{children:g.isPlaceholder?null:(0,Ie.jsxs)("div",{className:S("flex items-center gap-2",g.column.getCanSort()&&"cursor-pointer select-none"),onClick:g.column.getToggleSortingHandler(),children:[ch(g.column.columnDef.header,g.getContext()),o&&g.column.getCanSort()&&(0,Ie.jsx)("div",{className:"ml-auto",children:g.column.getIsSorted()==="desc"?(0,Ie.jsx)(os,{className:"h-4 w-4"}):g.column.getIsSorted()==="asc"?(0,Ie.jsx)(as,{className:"h-4 w-4"}):(0,Ie.jsx)(rs,{className:"h-4 w-4 opacity-50"})})]})},g.id))},p.id))}),(0,Ie.jsx)(gf,{children:m.getRowModel().rows?.length?m.getRowModel().rows.map(p=>(0,Ie.jsx)(di,{"data-state":p.getIsSelected()&&"selected",children:p.getVisibleCells().map(g=>(0,Ie.jsx)(gu,{children:ch(g.column.columnDef.cell,g.getContext())},g.id))},p.id)):(0,Ie.jsx)(di,{children:(0,Ie.jsx)(gu,{colSpan:e.length,className:"h-24 text-center",children:i})})})]})}),r&&(0,Ie.jsxs)("div",{className:"flex items-center justify-end space-x-2",children:[(0,Ie.jsxs)("div",{className:"flex-1 text-sm text-muted-foreground",children:[m.getFilteredRowModel().rows.length," row(s)"]}),(0,Ie.jsxs)("div",{className:"space-x-2",children:[(0,Ie.jsxs)(Ve,{variant:"outline",size:"sm",onClick:()=>m.previousPage(),disabled:!m.getCanPreviousPage(),children:[(0,Ie.jsx)(Uo,{className:"h-4 w-4"}),"Previous"]}),(0,Ie.jsxs)("span",{className:"text-sm",children:["Page ",m.getState().pagination.pageIndex+1," of"," ",m.getPageCount()]}),(0,Ie.jsxs)(Ve,{variant:"outline",size:"sm",onClick:()=>m.nextPage(),disabled:!m.getCanNextPage(),children:["Next",(0,Ie.jsx)(Ut,{className:"h-4 w-4"})]})]})]})]})}function NV(e){return({column:t})=>(0,Ie.jsxs)(Ve,{variant:"ghost",className:"-ml-3 h-8 data-[state=open]:bg-accent",onClick:()=>t.toggleSorting(t.getIsSorted()==="asc"),children:[e,t.getIsSorted()==="desc"?(0,Ie.jsx)(os,{className:"ml-2 h-4 w-4"}):t.getIsSorted()==="asc"?(0,Ie.jsx)(as,{className:"ml-2 h-4 w-4"}):(0,Ie.jsx)(rs,{className:"ml-2 h-4 w-4"})]})}var jt=b(A());var FV=Math.pow(10,8)*24*60*60*1e3,Zie=-FV,xf=6048e5,SL=864e5;var OV=3600;var RL=OV*24,Qie=RL*7,_V=RL*365.2425,VV=_V/12,Jie=VV*3,fh=Symbol.for("constructDateFrom");function et(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&fh in e?e[fh](t):e instanceof Date?new e.constructor(t):new Date(t)}function Me(e,t){return et(t||e,e)}function vf(e,t,o){let r=Me(e,o?.in);if(isNaN(t))return et(o?.in||e,NaN);if(!t)return r;let a=r.getDate(),n=et(o?.in||e,r.getTime());n.setMonth(r.getMonth()+t+1,0);let s=n.getDate();return a>=s?n:(r.setFullYear(n.getFullYear(),n.getMonth(),a),r)}var BV={};function wr(){return BV}function rr(e,t){let o=wr(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??o.weekStartsOn??o.locale?.options?.weekStartsOn??0,a=Me(e,t?.in),n=a.getDay(),s=(n<r?7:0)+n-r;return a.setDate(a.getDate()-s),a.setHours(0,0,0,0),a}function Gn(e,t){return rr(e,{...t,weekStartsOn:1})}function yf(e,t){let o=Me(e,t?.in),r=o.getFullYear(),a=et(o,0);a.setFullYear(r+1,0,4),a.setHours(0,0,0,0);let n=Gn(a),s=et(o,0);s.setFullYear(r,0,4),s.setHours(0,0,0,0);let i=Gn(s);return o.getTime()>=n.getTime()?r+1:o.getTime()>=i.getTime()?r:r-1}function mh(e){let t=Me(e),o=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return o.setUTCFullYear(t.getFullYear()),+e-+o}function Ga(e,...t){let o=et.bind(null,e||t.find(r=>typeof r=="object"));return t.map(o)}function fi(e,t){let o=Me(e,t?.in);return o.setHours(0,0,0,0),o}function IL(e,t,o){let[r,a]=Ga(o?.in,e,t),n=fi(r),s=fi(a),i=+n-mh(n),l=+s-mh(s);return Math.round((i-l)/SL)}function LL(e,t){let o=yf(e,t),r=et(t?.in||e,0);return r.setFullYear(o,0,4),r.setHours(0,0,0,0),Gn(r)}function PL(e){return et(e,Date.now())}function zn(e,t,o){let[r,a]=Ga(o?.in,e,t);return+fi(r)==+fi(a)}function TL(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function bf(e){return!(!TL(e)&&typeof e!="number"||isNaN(+Me(e)))}function ML(e,t){let o=Me(e,t?.in),r=o.getMonth();return o.setFullYear(o.getFullYear(),r+1,0),o.setHours(23,59,59,999),o}function kL(e,t){let[o,r]=Ga(e,t.start,t.end);return{start:o,end:r}}function Cf(e,t){let{start:o,end:r}=kL(t?.in,e),a=+o>+r,n=a?+o:+r,s=a?r:o;s.setHours(0,0,0,0);let i=t?.step??1;if(!i)return[];i<0&&(i=-i,a=!a);let l=[];for(;+s<=n;)l.push(et(o,s)),s.setDate(s.getDate()+i),s.setHours(0,0,0,0);return a?l.reverse():l}function AL(e,t){let o=Me(e,t?.in);return o.setDate(1),o.setHours(0,0,0,0),o}function DL(e,t){let o=Me(e,t?.in);return o.setFullYear(o.getFullYear(),0,1),o.setHours(0,0,0,0),o}function EL(e,t){let o=wr(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??o.weekStartsOn??o.locale?.options?.weekStartsOn??0,a=Me(e,t?.in),n=a.getDay(),s=(n<r?-7:0)+6-(n-r);return a.setDate(a.getDate()+s),a.setHours(23,59,59,999),a}var HV={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},NL=(e,t,o)=>{let r,a=HV[e];return typeof a=="string"?r=a:t===1?r=a.one:r=a.other.replace("{{count}}",t.toString()),o?.addSuffix?o.comparison&&o.comparison>0?"in "+r:r+" ago":r};function wf(e){return(t={})=>{let o=t.width?String(t.width):e.defaultWidth;return e.formats[o]||e.formats[e.defaultWidth]}}var UV={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},GV={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},zV={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},FL={date:wf({formats:UV,defaultWidth:"full"}),time:wf({formats:GV,defaultWidth:"full"}),dateTime:wf({formats:zV,defaultWidth:"full"})};var qV={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},OL=(e,t,o,r)=>qV[e];function mi(e){return(t,o)=>{let r=o?.context?String(o.context):"standalone",a;if(r==="formatting"&&e.formattingValues){let s=e.defaultFormattingWidth||e.defaultWidth,i=o?.width?String(o.width):s;a=e.formattingValues[i]||e.formattingValues[s]}else{let s=e.defaultWidth,i=o?.width?String(o.width):e.defaultWidth;a=e.values[i]||e.values[s]}let n=e.argumentCallback?e.argumentCallback(t):t;return a[n]}}var WV={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},$V={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},jV={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},KV={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},XV={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},YV={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},ZV=(e,t)=>{let o=Number(e),r=o%100;if(r>20||r<10)switch(r%10){case 1:return o+"st";case 2:return o+"nd";case 3:return o+"rd"}return o+"th"},_L={ordinalNumber:ZV,era:mi({values:WV,defaultWidth:"wide"}),quarter:mi({values:$V,defaultWidth:"wide",argumentCallback:e=>e-1}),month:mi({values:jV,defaultWidth:"wide"}),day:mi({values:KV,defaultWidth:"wide"}),dayPeriod:mi({values:XV,defaultWidth:"wide",formattingValues:YV,defaultFormattingWidth:"wide"})};function pi(e){return(t,o={})=>{let r=o.width,a=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],n=t.match(a);if(!n)return null;let s=n[0],i=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(i)?JV(i,d=>d.test(s)):QV(i,d=>d.test(s)),u;u=e.valueCallback?e.valueCallback(l):l,u=o.valueCallback?o.valueCallback(u):u;let c=t.slice(s.length);return{value:u,rest:c}}}function QV(e,t){for(let o in e)if(Object.prototype.hasOwnProperty.call(e,o)&&t(e[o]))return o}function JV(e,t){for(let o=0;o<e.length;o++)if(t(e[o]))return o}function VL(e){return(t,o={})=>{let r=t.match(e.matchPattern);if(!r)return null;let a=r[0],n=t.match(e.parsePattern);if(!n)return null;let s=e.valueCallback?e.valueCallback(n[0]):n[0];s=o.valueCallback?o.valueCallback(s):s;let i=t.slice(a.length);return{value:s,rest:i}}}var eB=/^(\d+)(th|st|nd|rd)?/i,tB=/\d+/i,oB={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},rB={any:[/^b/i,/^(a|c)/i]},aB={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},nB={any:[/1/i,/2/i,/3/i,/4/i]},sB={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},iB={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},lB={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},uB={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},cB={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},dB={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},BL={ordinalNumber:VL({matchPattern:eB,parsePattern:tB,valueCallback:e=>parseInt(e,10)}),era:pi({matchPatterns:oB,defaultMatchWidth:"wide",parsePatterns:rB,defaultParseWidth:"any"}),quarter:pi({matchPatterns:aB,defaultMatchWidth:"wide",parsePatterns:nB,defaultParseWidth:"any",valueCallback:e=>e+1}),month:pi({matchPatterns:sB,defaultMatchWidth:"wide",parsePatterns:iB,defaultParseWidth:"any"}),day:pi({matchPatterns:lB,defaultMatchWidth:"wide",parsePatterns:uB,defaultParseWidth:"any"}),dayPeriod:pi({matchPatterns:cB,defaultMatchWidth:"any",parsePatterns:dB,defaultParseWidth:"any"})};var ph={code:"en-US",formatDistance:NL,formatLong:FL,formatRelative:OL,localize:_L,match:BL,options:{weekStartsOn:0,firstWeekContainsDate:1}};function HL(e,t){let o=Me(e,t?.in);return IL(o,DL(o))+1}function UL(e,t){let o=Me(e,t?.in),r=+Gn(o)-+LL(o);return Math.round(r/xf)+1}function Sf(e,t){let o=Me(e,t?.in),r=o.getFullYear(),a=wr(),n=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??a.firstWeekContainsDate??a.locale?.options?.firstWeekContainsDate??1,s=et(t?.in||e,0);s.setFullYear(r+1,0,n),s.setHours(0,0,0,0);let i=rr(s,t),l=et(t?.in||e,0);l.setFullYear(r,0,n),l.setHours(0,0,0,0);let u=rr(l,t);return+o>=+i?r+1:+o>=+u?r:r-1}function GL(e,t){let o=wr(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,a=Sf(e,t),n=et(t?.in||e,0);return n.setFullYear(a,0,r),n.setHours(0,0,0,0),rr(n,t)}function zL(e,t){let o=Me(e,t?.in),r=+rr(o,t)-+GL(o,t);return Math.round(r/xf)+1}function De(e,t){let o=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return o+r}var ea={y(e,t){let o=e.getFullYear(),r=o>0?o:1-o;return De(t==="yy"?r%100:r,t.length)},M(e,t){let o=e.getMonth();return t==="M"?String(o+1):De(o+1,2)},d(e,t){return De(e.getDate(),t.length)},a(e,t){let o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return o.toUpperCase();case"aaa":return o;case"aaaaa":return o[0];case"aaaa":default:return o==="am"?"a.m.":"p.m."}},h(e,t){return De(e.getHours()%12||12,t.length)},H(e,t){return De(e.getHours(),t.length)},m(e,t){return De(e.getMinutes(),t.length)},s(e,t){return De(e.getSeconds(),t.length)},S(e,t){let o=t.length,r=e.getMilliseconds(),a=Math.trunc(r*Math.pow(10,o-3));return De(a,t.length)}};var gi={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},gh={G:function(e,t,o){let r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return o.era(r,{width:"abbreviated"});case"GGGGG":return o.era(r,{width:"narrow"});case"GGGG":default:return o.era(r,{width:"wide"})}},y:function(e,t,o){if(t==="yo"){let r=e.getFullYear(),a=r>0?r:1-r;return o.ordinalNumber(a,{unit:"year"})}return ea.y(e,t)},Y:function(e,t,o,r){let a=Sf(e,r),n=a>0?a:1-a;if(t==="YY"){let s=n%100;return De(s,2)}return t==="Yo"?o.ordinalNumber(n,{unit:"year"}):De(n,t.length)},R:function(e,t){let o=yf(e);return De(o,t.length)},u:function(e,t){let o=e.getFullYear();return De(o,t.length)},Q:function(e,t,o){let r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return De(r,2);case"Qo":return o.ordinalNumber(r,{unit:"quarter"});case"QQQ":return o.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return o.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return o.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,o){let r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return De(r,2);case"qo":return o.ordinalNumber(r,{unit:"quarter"});case"qqq":return o.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return o.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return o.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,o){let r=e.getMonth();switch(t){case"M":case"MM":return ea.M(e,t);case"Mo":return o.ordinalNumber(r+1,{unit:"month"});case"MMM":return o.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return o.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return o.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,o){let r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return De(r+1,2);case"Lo":return o.ordinalNumber(r+1,{unit:"month"});case"LLL":return o.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return o.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return o.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,o,r){let a=zL(e,r);return t==="wo"?o.ordinalNumber(a,{unit:"week"}):De(a,t.length)},I:function(e,t,o){let r=UL(e);return t==="Io"?o.ordinalNumber(r,{unit:"week"}):De(r,t.length)},d:function(e,t,o){return t==="do"?o.ordinalNumber(e.getDate(),{unit:"date"}):ea.d(e,t)},D:function(e,t,o){let r=HL(e);return t==="Do"?o.ordinalNumber(r,{unit:"dayOfYear"}):De(r,t.length)},E:function(e,t,o){let r=e.getDay();switch(t){case"E":case"EE":case"EEE":return o.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return o.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return o.day(r,{width:"short",context:"formatting"});case"EEEE":default:return o.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,o,r){let a=e.getDay(),n=(a-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(n);case"ee":return De(n,2);case"eo":return o.ordinalNumber(n,{unit:"day"});case"eee":return o.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return o.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return o.day(a,{width:"short",context:"formatting"});case"eeee":default:return o.day(a,{width:"wide",context:"formatting"})}},c:function(e,t,o,r){let a=e.getDay(),n=(a-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(n);case"cc":return De(n,t.length);case"co":return o.ordinalNumber(n,{unit:"day"});case"ccc":return o.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return o.day(a,{width:"narrow",context:"standalone"});case"cccccc":return o.day(a,{width:"short",context:"standalone"});case"cccc":default:return o.day(a,{width:"wide",context:"standalone"})}},i:function(e,t,o){let r=e.getDay(),a=r===0?7:r;switch(t){case"i":return String(a);case"ii":return De(a,t.length);case"io":return o.ordinalNumber(a,{unit:"day"});case"iii":return o.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return o.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return o.day(r,{width:"short",context:"formatting"});case"iiii":default:return o.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,o){let a=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return o.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return o.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return o.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return o.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(e,t,o){let r=e.getHours(),a;switch(r===12?a=gi.noon:r===0?a=gi.midnight:a=r/12>=1?"pm":"am",t){case"b":case"bb":return o.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return o.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return o.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return o.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(e,t,o){let r=e.getHours(),a;switch(r>=17?a=gi.evening:r>=12?a=gi.afternoon:r>=4?a=gi.morning:a=gi.night,t){case"B":case"BB":case"BBB":return o.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return o.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return o.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(e,t,o){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),o.ordinalNumber(r,{unit:"hour"})}return ea.h(e,t)},H:function(e,t,o){return t==="Ho"?o.ordinalNumber(e.getHours(),{unit:"hour"}):ea.H(e,t)},K:function(e,t,o){let r=e.getHours()%12;return t==="Ko"?o.ordinalNumber(r,{unit:"hour"}):De(r,t.length)},k:function(e,t,o){let r=e.getHours();return r===0&&(r=24),t==="ko"?o.ordinalNumber(r,{unit:"hour"}):De(r,t.length)},m:function(e,t,o){return t==="mo"?o.ordinalNumber(e.getMinutes(),{unit:"minute"}):ea.m(e,t)},s:function(e,t,o){return t==="so"?o.ordinalNumber(e.getSeconds(),{unit:"second"}):ea.s(e,t)},S:function(e,t){return ea.S(e,t)},X:function(e,t,o){let r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return WL(r);case"XXXX":case"XX":return qn(r);case"XXXXX":case"XXX":default:return qn(r,":")}},x:function(e,t,o){let r=e.getTimezoneOffset();switch(t){case"x":return WL(r);case"xxxx":case"xx":return qn(r);case"xxxxx":case"xxx":default:return qn(r,":")}},O:function(e,t,o){let r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+qL(r,":");case"OOOO":default:return"GMT"+qn(r,":")}},z:function(e,t,o){let r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+qL(r,":");case"zzzz":default:return"GMT"+qn(r,":")}},t:function(e,t,o){let r=Math.trunc(+e/1e3);return De(r,t.length)},T:function(e,t,o){return De(+e,t.length)}};function qL(e,t=""){let o=e>0?"-":"+",r=Math.abs(e),a=Math.trunc(r/60),n=r%60;return n===0?o+String(a):o+String(a)+t+De(n,2)}function WL(e,t){return e%60===0?(e>0?"-":"+")+De(Math.abs(e)/60,2):qn(e,t)}function qn(e,t=""){let o=e>0?"-":"+",r=Math.abs(e),a=De(Math.trunc(r/60),2),n=De(r%60,2);return o+a+t+n}var $L=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},jL=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},fB=(e,t)=>{let o=e.match(/(P+)(p+)?/)||[],r=o[1],a=o[2];if(!a)return $L(e,t);let n;switch(r){case"P":n=t.dateTime({width:"short"});break;case"PP":n=t.dateTime({width:"medium"});break;case"PPP":n=t.dateTime({width:"long"});break;case"PPPP":default:n=t.dateTime({width:"full"});break}return n.replace("{{date}}",$L(r,t)).replace("{{time}}",jL(a,t))},KL={p:jL,P:fB};var mB=/^D+$/,pB=/^Y+$/,gB=["D","DD","YY","YYYY"];function XL(e){return mB.test(e)}function YL(e){return pB.test(e)}function ZL(e,t,o){let r=hB(e,t,o);if(console.warn(r),gB.includes(e))throw new RangeError(r)}function hB(e,t,o){let r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${o}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}var xB=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,vB=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,yB=/^'([^]*?)'?$/,bB=/''/g,CB=/[a-zA-Z]/;function ar(e,t,o){let r=wr(),a=o?.locale??r.locale??ph,n=o?.firstWeekContainsDate??o?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,s=o?.weekStartsOn??o?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,i=Me(e,o?.in);if(!bf(i))throw new RangeError("Invalid time value");let l=t.match(vB).map(c=>{let d=c[0];if(d==="p"||d==="P"){let f=KL[d];return f(c,a.formatLong)}return c}).join("").match(xB).map(c=>{if(c==="''")return{isToken:!1,value:"'"};let d=c[0];if(d==="'")return{isToken:!1,value:wB(c)};if(gh[d])return{isToken:!0,value:c};if(d.match(CB))throw new RangeError("Format string contains an unescaped latin alphabet character `"+d+"`");return{isToken:!1,value:c}});a.localize.preprocessor&&(l=a.localize.preprocessor(i,l));let u={firstWeekContainsDate:n,weekStartsOn:s,locale:a};return l.map(c=>{if(!c.isToken)return c.value;let d=c.value;(!o?.useAdditionalWeekYearTokens&&YL(d)||!o?.useAdditionalDayOfYearTokens&&XL(d))&&ZL(d,t,String(e));let f=gh[d[0]];return f(i,d,a.localize,u)}).join("")}function wB(e){let t=e.match(yB);return t?t[1].replace(bB,"'"):e}function hh(e,t){return Me(e,t?.in).getDay()}function QL(e,t,o){let[r,a]=Ga(o?.in,e,t);return r.getFullYear()===a.getFullYear()&&r.getMonth()===a.getMonth()}function JL(e,t){return zn(et(t?.in||e,e),PL(t?.in||e))}function eP(e,t,o){return vf(e,-t,o)}var tP=b(A());var $t=b(D());function Rf({mode:e="single",selected:t,onSelect:o,disabled:r,showOutsideDays:a=!1,className:n,classNames:s,numberOfMonths:i=1,defaultMonth:l,...u}){let[c,d]=tP.useState(l||t&&t||new Date),f=[{short:"S",full:"Sunday"},{short:"M",full:"Monday"},{short:"T",full:"Tuesday"},{short:"W",full:"Wednesday"},{short:"T",full:"Thursday"},{short:"F",full:"Friday"},{short:"S",full:"Saturday"}],m=()=>{d(eP(c,1))},p=()=>{d(vf(c,1))},g=w=>{if(!r?.(w)){if(e==="single")o?.(w);else if(e==="range"){let I=t;!I?.from||I.from&&I.to?o?.({from:w,to:void 0}):w<I.from?o?.({from:w,to:I.from}):o?.({from:I.from,to:w})}}},h=w=>{if(!t)return!1;if(e==="single")return zn(w,t);if(e==="range"){let I=t;return I.from&&I.to?w>=I.from&&w<=I.to:I.from?zn(w,I.from):!1}return!1},v=w=>{if(e!=="range"||!t)return!1;let I=t;return I.from?zn(w,I.from):!1},x=w=>{if(e!=="range"||!t)return!1;let I=t;return I.to?zn(w,I.to):!1},y=w=>{if(e!=="range"||!t)return!1;let I=t;return!I.from||!I.to?!1:w>I.from&&w<I.to},C=(()=>{let w=AL(c),I=ML(c),L=Cf({start:w,end:I}),P=hh(w),T=[];if(P>0&&a){let N=rr(w),q=new Date(w);q.setDate(q.getDate()-1),T.push(...Cf({start:N,end:q}))}let O=hh(I),$=[];if(O<6&&a){let N=new Date(I);N.setDate(N.getDate()+1);let q=EL(I);$.push(...Cf({start:N,end:q}))}let W=[];if(!a&&P>0)for(let N=0;N<P;N++)W.push(null);return[...T,...W,...L,...$]})();return(0,$t.jsxs)("div",{className:S("moonui-theme","p-0",n),children:[(0,$t.jsxs)("div",{className:"flex items-center justify-between px-6 py-4 border-b border-border/50 dark:border-gray-700/50",children:[(0,$t.jsx)("button",{onClick:m,className:S("h-10 w-10 bg-transparent p-0 rounded-lg","hover:bg-muted transition-colors","inline-flex items-center justify-center"),type:"button",children:(0,$t.jsx)(Uo,{className:"h-5 w-5"})}),(0,$t.jsx)("h2",{className:"text-base font-medium",children:ar(c,"MMMM yyyy")}),(0,$t.jsx)("button",{onClick:p,className:S("h-10 w-10 bg-transparent p-0 rounded-lg","hover:bg-muted transition-colors","inline-flex items-center justify-center"),type:"button",children:(0,$t.jsx)(Ut,{className:"h-5 w-5"})})]}),(0,$t.jsxs)("div",{className:"px-6 pb-4",children:[(0,$t.jsx)("div",{className:"grid grid-cols-7 mb-2",children:f.map((w,I)=>(0,$t.jsx)("div",{className:"text-muted-foreground text-xs font-medium h-10 flex items-center justify-center",title:w.full,children:w.short},`weekday-${I}`))}),(0,$t.jsx)("div",{className:"grid grid-cols-7 gap-1",children:C.map((w,I)=>{if(!w)return(0,$t.jsx)("div",{className:"h-10 w-10"},`empty-${I}`);let L=!QL(w,c),P=r?.(w)||!1,T=h(w),O=JL(w),$=v(w),W=x(w),N=y(w);return(0,$t.jsx)("button",{onClick:()=>g(w),disabled:P,className:S("h-10 w-10 p-0 font-normal","inline-flex items-center justify-center rounded-lg","hover:bg-muted transition-colors text-sm","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",L&&"text-muted-foreground/50",P&&"text-muted-foreground/30 cursor-not-allowed hover:bg-transparent",T&&!N&&"bg-primary text-primary-foreground font-medium hover:bg-primary hover:text-primary-foreground",O&&"font-semibold relative after:absolute after:bottom-1 after:left-1/2 after:-translate-x-1/2 after:h-1 after:w-1 after:rounded-full after:bg-primary",N&&"bg-accent/30 text-accent-foreground rounded-none",$&&"rounded-r-none",W&&"rounded-l-none"),type:"button",children:ar(w,"d")},w.toISOString())})})]})]})}Rf.displayName="Calendar";var fe=b(D()),SB={initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20}},xh=te("w-full justify-start text-left font-normal",{variants:{variant:{default:"",outline:"border-2",ghost:"hover:bg-accent hover:text-accent-foreground"},size:{default:"h-10 px-4 py-2",sm:"h-8 px-3 text-sm",lg:"h-12 px-6 text-base",icon:"h-10 w-10"},state:{default:"",error:"border-destructive focus:ring-destructive",success:"border-success focus:ring-success",warning:"border-warning focus:ring-warning"}},defaultVariants:{variant:"default",size:"default",state:"default"}});function oP({className:e,variant:t,size:o,state:r,value:a,onChange:n,placeholder:s="Pick a date",formatString:i="PPP",minDate:l,maxDate:u,disabledDates:c,disabledDaysOfWeek:d,showWeekNumbers:f,iconPosition:m="left",icon:p,allowClear:g=!0,readOnly:h=!1,showTodayButton:v=!0,calendarProps:x,disabled:y,...R}){let[C,w]=jt.useState(!1),[I,L]=jt.useState(a);jt.useEffect(()=>{L(a)},[a]);let P=q=>{let E=Array.isArray(q)?q[0]:q&&typeof q=="object"&&"from"in q?q.from:q;L(E),n?.(E),E&&w(!1)},T=q=>{q.stopPropagation(),P(void 0)},O=()=>{P(new Date)},$=q=>!!(l&&q<l||u&&q>u||c?.some(E=>E.toDateString()===q.toDateString())||d?.includes(q.getDay())),W=I&&bf(I)?ar(I,i):null,N=p||(0,fe.jsx)(Ja,{className:"h-4 w-4"});return(0,fe.jsx)("div",{className:"moonui-theme",children:(0,fe.jsxs)(jr,{open:C,onOpenChange:w,children:[(0,fe.jsx)(Kr,{asChild:!0,children:(0,fe.jsxs)(Ve,{variant:t==="ghost"?"ghost":"outline",className:S(xh({variant:t,size:o,state:r}),!W&&"text-muted-foreground",e),disabled:y||h,...R,children:[(0,fe.jsx)(Fr,{mode:"wait",children:(0,fe.jsxs)(Ae.div,{initial:{opacity:0,y:-2},animate:{opacity:1,y:0},exit:{opacity:0,y:2},transition:{duration:.15},className:"flex items-center gap-2 flex-1",children:[m==="left"&&N,(0,fe.jsx)("span",{className:"flex-1 truncate",children:W||s}),m==="right"&&N]},W||"placeholder")}),g&&W&&!h&&!y&&(0,fe.jsxs)(Ae.div,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},whileHover:{scale:1.1},whileTap:{scale:.9},className:"ml-2 h-4 w-4 shrink-0 opacity-50 hover:opacity-100 transition-opacity cursor-pointer",onClick:T,role:"button",tabIndex:0,onKeyDown:q=>{(q.key==="Enter"||q.key===" ")&&(q.preventDefault(),T(q))},children:[(0,fe.jsx)("span",{className:"sr-only",children:"Clear date"}),(0,fe.jsx)("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,fe.jsx)("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})]})]})}),(0,fe.jsx)(br,{className:"w-[360px] p-0 shadow-2xl rounded-2xl border border-gray-200 dark:border-gray-700 bg-background/95 backdrop-blur-sm !z-[9999]",align:"start",sideOffset:12,children:(0,fe.jsxs)(Ae.div,{...SB,className:"rounded-2xl bg-background overflow-hidden",children:[(0,fe.jsx)(Rf,{mode:"single",selected:I,onSelect:P,disabled:$,showOutsideDays:!1,className:S("rounded-2xl",x?.className),...x}),v&&(0,fe.jsx)("div",{className:"border-t px-4 py-3",children:(0,fe.jsx)(Ve,{variant:"ghost",size:"sm",onClick:O,className:"w-full justify-center hover:bg-accent hover:text-accent-foreground transition-all duration-200",children:"Today"})})]})})]})})}function RB({className:e,value:t,onChange:o,placeholder:r="Pick a date range",formatString:a="LLL dd, y",separator:n=" - ",...s}){let[i,l]=jt.useState(!1),[u,c]=jt.useState(t);jt.useEffect(()=>{c(t)},[t]);let d=m=>{c(m),o?.(m),m?.from&&m?.to&&l(!1)},f=jt.useMemo(()=>u?.from?u?.to?`${ar(u.from,a)}${n}${ar(u.to,a)}`:ar(u.from,a):null,[u,a,n]);return(0,fe.jsxs)(jr,{open:i,onOpenChange:l,children:[(0,fe.jsx)(Kr,{asChild:!0,children:(0,fe.jsxs)(Ve,{variant:s.variant==="ghost"?"ghost":"outline",className:S(xh({variant:s.variant,size:s.size,state:s.state}),!f&&"text-muted-foreground",e),disabled:s.disabled||s.readOnly,children:[(0,fe.jsx)(Ja,{className:"mr-2 h-4 w-4"}),(0,fe.jsx)("span",{className:"flex-1 truncate text-left",children:f||r})]})}),(0,fe.jsx)(br,{className:"w-auto p-0 shadow-2xl rounded-2xl border border-gray-200 dark:border-gray-700 bg-background/95 backdrop-blur-sm !z-[9999]",align:"start",sideOffset:12,children:(0,fe.jsx)(Rf,{mode:"range",defaultMonth:u?.from,selected:u,onSelect:d,showOutsideDays:!1,...s.calendarProps,className:"rounded-2xl"})})]})}function IB({value:e,onChange:t,formatString:o="PPP p",showTimePicker:r=!0,timeFormat:a="24",timeInterval:n=15,...s}){let[i,l]=jt.useState(e),[u,c]=jt.useState(e?ar(e,a==="24"?"HH:mm":"hh:mm a"):"00:00"),d=p=>{if(!p){l(void 0),t?.(void 0);return}let[g,h]=u.split(":").map(Number);p.setHours(g,h),l(p),t?.(p)},f=p=>{let g=p.target.value;if(c(g),i){let[h,v]=g.split(":").map(Number),x=new Date(i);x.setHours(h,v),l(x),t?.(x)}},m=jt.useMemo(()=>{let p=[];for(let g=0;g<24;g++)for(let h=0;h<60;h+=n){let v=g.toString().padStart(2,"0"),x=h.toString().padStart(2,"0"),y=`${v}:${x}`;if(a==="12"){let R=g===0?12:g>12?g-12:g,C=g<12?"AM":"PM",w=`${R}:${x} ${C}`;p.push({value:y,label:w})}else p.push({value:y,label:y})}return p},[a,n]);return(0,fe.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,fe.jsx)(oP,{...s,value:i,onChange:d,formatString:"PPP",showTodayButton:!1}),r&&i&&(0,fe.jsxs)(Ae.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:"flex items-center gap-2",children:[(0,fe.jsx)(Ei,{className:"h-4 w-4 text-muted-foreground"}),(0,fe.jsx)("select",{value:u,onChange:f,className:"flex h-9 w-full rounded-md border border-input bg-background px-3 py-1 text-sm shadow-sm transition-colors focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50",children:m.map(p=>(0,fe.jsx)("option",{value:p.value,children:p.label},p.value))})]})]})}function LB({value:e,onChange:t,placeholder:o="Pick a month",formatString:r="MMMM yyyy",...a}){let[n,s]=jt.useState(!1),[i,l]=jt.useState(e||new Date),u=["January","February","March","April","May","June","July","August","September","October","November","December"],c=m=>{let p=new Date(i);p.setMonth(m),t?.(p),s(!1)},d=m=>{let p=new Date(i);p.setFullYear(p.getFullYear()+m),l(p)},f=e?ar(e,r):null;return(0,fe.jsxs)(jr,{open:n,onOpenChange:s,children:[(0,fe.jsx)(Kr,{asChild:!0,children:(0,fe.jsxs)(Ve,{variant:a.variant==="default"?"outline":a.variant||"outline",className:S(xh({variant:a.variant,size:a.size,state:a.state}),!f&&"text-muted-foreground",a.className),disabled:a.disabled||a.readOnly,children:[(0,fe.jsx)(Ja,{className:"mr-2 h-4 w-4"}),f||o]})}),(0,fe.jsx)(br,{className:"w-64 p-0 shadow-2xl border border-gray-200 dark:border-gray-700 bg-background !z-[9999]",align:"start",children:(0,fe.jsxs)("div",{className:"p-3",children:[(0,fe.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,fe.jsx)(Ve,{variant:"outline",size:"icon",onClick:()=>d(-1),children:(0,fe.jsx)(Uo,{className:"h-4 w-4"})}),(0,fe.jsx)("span",{className:"font-semibold",children:i.getFullYear()}),(0,fe.jsx)(Ve,{variant:"outline",size:"icon",onClick:()=>d(1),children:(0,fe.jsx)(Ut,{className:"h-4 w-4"})})]}),(0,fe.jsx)("div",{className:"grid grid-cols-3 gap-2",children:u.map((m,p)=>(0,fe.jsx)(Ve,{variant:e&&e.getMonth()===p?"primary":"outline",size:"sm",onClick:()=>c(p),className:"h-8 text-xs",children:m.slice(0,3)},m))})]})})]})}var rP=b(A());var vh=b(D());function PB({items:e,onReorder:t,renderItem:o,keyExtractor:r,className:a,disabled:n=!1}){let[s,i]=rP.useState(null),l=(f,m)=>{n||(i(m),f.dataTransfer.effectAllowed="move")},u=f=>{f.preventDefault(),f.dataTransfer.dropEffect="move"},c=(f,m)=>{if(f.preventDefault(),n||s===null||s===m){i(null);return}let p=[...e],g=p[s];p.splice(s,1),p.splice(m,0,g),t(p),i(null)},d=()=>{i(null)};return(0,vh.jsx)("div",{className:S("moonui-theme","space-y-2",a),children:e.map((f,m)=>(0,vh.jsx)("div",{draggable:!n,onDragStart:p=>l(p,m),onDragOver:u,onDrop:p=>c(p,m),onDragEnd:d,className:S("transition-opacity duration-200",!n&&"cursor-move hover:opacity-80",s===m&&"opacity-50",n&&"cursor-not-allowed"),children:o(f,m)},r(f)))})}var ta=b(A());var pt=b(A(),1);var oe=b(A(),1);var me=b(D(),1),yh=["Enter"," "],TB=["ArrowDown","PageUp","Home"],nP=["ArrowUp","PageDown","End"],MB=[...TB,...nP],kB={ltr:[...yh,"ArrowRight"],rtl:[...yh,"ArrowLeft"]},AB={ltr:["ArrowLeft"],rtl:["ArrowRight"]},yu="Menu",[xu,DB,EB]=lr(yu),[Wn,bh]=Re(yu,[EB,No,ni]),bu=No(),sP=ni(),[iP,za]=Wn(yu),[NB,Cu]=Wn(yu),lP=e=>{let{__scopeMenu:t,open:o=!1,children:r,dir:a,onOpenChange:n,modal:s=!0}=e,i=bu(t),[l,u]=oe.useState(null),c=oe.useRef(!1),d=Te(n),f=So(a);return oe.useEffect(()=>{let m=()=>{c.current=!0,document.addEventListener("pointerdown",p,{capture:!0,once:!0}),document.addEventListener("pointermove",p,{capture:!0,once:!0})},p=()=>c.current=!1;return document.addEventListener("keydown",m,{capture:!0}),()=>{document.removeEventListener("keydown",m,{capture:!0}),document.removeEventListener("pointerdown",p,{capture:!0}),document.removeEventListener("pointermove",p,{capture:!0})}},[]),(0,me.jsx)(qr,{...i,children:(0,me.jsx)(iP,{scope:t,open:o,onOpenChange:d,content:l,onContentChange:u,children:(0,me.jsx)(NB,{scope:t,onClose:oe.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:c,dir:f,modal:s,children:r})})})};lP.displayName=yu;var FB="MenuAnchor",Ch=oe.forwardRef((e,t)=>{let{__scopeMenu:o,...r}=e,a=bu(o);return(0,me.jsx)(Wr,{...a,...r,ref:t})});Ch.displayName=FB;var wh="MenuPortal",[OB,uP]=Wn(wh,{forceMount:void 0}),cP=e=>{let{__scopeMenu:t,forceMount:o,children:r,container:a}=e,n=za(wh,t);return(0,me.jsx)(OB,{scope:t,forceMount:o,children:(0,me.jsx)(Oe,{present:o||n.open,children:(0,me.jsx)(ho,{asChild:!0,container:a,children:r})})})};cP.displayName=wh;var Oo="MenuContent",[_B,Sh]=Wn(Oo),dP=oe.forwardRef((e,t)=>{let o=uP(Oo,e.__scopeMenu),{forceMount:r=o.forceMount,...a}=e,n=za(Oo,e.__scopeMenu),s=Cu(Oo,e.__scopeMenu);return(0,me.jsx)(xu.Provider,{scope:e.__scopeMenu,children:(0,me.jsx)(Oe,{present:r||n.open,children:(0,me.jsx)(xu.Slot,{scope:e.__scopeMenu,children:s.modal?(0,me.jsx)(VB,{...a,ref:t}):(0,me.jsx)(BB,{...a,ref:t})})})})}),VB=oe.forwardRef((e,t)=>{let o=za(Oo,e.__scopeMenu),r=oe.useRef(null),a=ee(t,r);return oe.useEffect(()=>{let n=r.current;if(n)return Na(n)},[]),(0,me.jsx)(Rh,{...e,ref:a,trapFocus:o.open,disableOutsidePointerEvents:o.open,disableOutsideScroll:!0,onFocusOutside:V(e.onFocusOutside,n=>n.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>o.onOpenChange(!1)})}),BB=oe.forwardRef((e,t)=>{let o=za(Oo,e.__scopeMenu);return(0,me.jsx)(Rh,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>o.onOpenChange(!1)})}),HB=uo("MenuContent.ScrollLock"),Rh=oe.forwardRef((e,t)=>{let{__scopeMenu:o,loop:r=!1,trapFocus:a,onOpenAutoFocus:n,onCloseAutoFocus:s,disableOutsidePointerEvents:i,onEntryFocus:l,onEscapeKeyDown:u,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:f,onDismiss:m,disableOutsideScroll:p,...g}=e,h=za(Oo,o),v=Cu(Oo,o),x=bu(o),y=sP(o),R=DB(o),[C,w]=oe.useState(null),I=oe.useRef(null),L=ee(t,I,h.onContentChange),P=oe.useRef(0),T=oe.useRef(""),O=oe.useRef(0),$=oe.useRef(null),W=oe.useRef("right"),N=oe.useRef(0),q=p?$r:oe.Fragment,E=p?{as:HB,allowPinchZoom:!0}:void 0,G=k=>{let re=T.current+k,Se=R().filter(_=>!_.disabled),F=document.activeElement,j=Se.find(_=>_.ref.current===F)?.textValue,Z=Se.map(_=>_.textValue),X=QB(Z,re,j),ue=Se.find(_=>_.textValue===X)?.ref.current;(function _(ce){T.current=ce,window.clearTimeout(P.current),ce!==""&&(P.current=window.setTimeout(()=>_(""),1e3))})(re),ue&&setTimeout(()=>ue.focus())};oe.useEffect(()=>()=>window.clearTimeout(P.current),[]),Ma();let M=oe.useCallback(k=>W.current===$.current?.side&&eH(k,$.current?.area),[]);return(0,me.jsx)(_B,{scope:o,searchRef:T,onItemEnter:oe.useCallback(k=>{M(k)&&k.preventDefault()},[M]),onItemLeave:oe.useCallback(k=>{M(k)||(I.current?.focus(),w(null))},[M]),onTriggerLeave:oe.useCallback(k=>{M(k)&&k.preventDefault()},[M]),pointerGraceTimerRef:O,onPointerGraceIntentChange:oe.useCallback(k=>{$.current=k},[]),children:(0,me.jsx)(q,{...E,children:(0,me.jsx)(Gr,{asChild:!0,trapped:a,onMountAutoFocus:V(n,k=>{k.preventDefault(),I.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:s,children:(0,me.jsx)(ko,{asChild:!0,disableOutsidePointerEvents:i,onEscapeKeyDown:u,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:f,onDismiss:m,children:(0,me.jsx)(Zd,{asChild:!0,...y,dir:v.dir,orientation:"vertical",loop:r,currentTabStopId:C,onCurrentTabStopIdChange:w,onEntryFocus:V(l,k=>{v.isUsingKeyboardRef.current||k.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,me.jsx)(Da,{role:"menu","aria-orientation":"vertical","data-state":TP(h.open),"data-radix-menu-content":"",dir:v.dir,...x,...g,ref:L,style:{outline:"none",...g.style},onKeyDown:V(g.onKeyDown,k=>{let Se=k.target.closest("[data-radix-menu-content]")===k.currentTarget,F=k.ctrlKey||k.altKey||k.metaKey,j=k.key.length===1;Se&&(k.key==="Tab"&&k.preventDefault(),!F&&j&&G(k.key));let Z=I.current;if(k.target!==Z||!MB.includes(k.key))return;k.preventDefault();let ue=R().filter(_=>!_.disabled).map(_=>_.ref.current);nP.includes(k.key)&&ue.reverse(),YB(ue)}),onBlur:V(e.onBlur,k=>{k.currentTarget.contains(k.target)||(window.clearTimeout(P.current),T.current="")}),onPointerMove:V(e.onPointerMove,vu(k=>{let re=k.target,Se=N.current!==k.clientX;if(k.currentTarget.contains(re)&&Se){let F=k.clientX>N.current?"right":"left";W.current=F,N.current=k.clientX}}))})})})})})})});dP.displayName=Oo;var UB="MenuGroup",Ih=oe.forwardRef((e,t)=>{let{__scopeMenu:o,...r}=e;return(0,me.jsx)(H.div,{role:"group",...r,ref:t})});Ih.displayName=UB;var GB="MenuLabel",fP=oe.forwardRef((e,t)=>{let{__scopeMenu:o,...r}=e;return(0,me.jsx)(H.div,{...r,ref:t})});fP.displayName=GB;var If="MenuItem",aP="menu.itemSelect",Pf=oe.forwardRef((e,t)=>{let{disabled:o=!1,onSelect:r,...a}=e,n=oe.useRef(null),s=Cu(If,e.__scopeMenu),i=Sh(If,e.__scopeMenu),l=ee(t,n),u=oe.useRef(!1),c=()=>{let d=n.current;if(!o&&d){let f=new CustomEvent(aP,{bubbles:!0,cancelable:!0});d.addEventListener(aP,m=>r?.(m),{once:!0}),es(d,f),f.defaultPrevented?u.current=!1:s.onClose()}};return(0,me.jsx)(mP,{...a,ref:l,disabled:o,onClick:V(e.onClick,c),onPointerDown:d=>{e.onPointerDown?.(d),u.current=!0},onPointerUp:V(e.onPointerUp,d=>{u.current||d.currentTarget?.click()}),onKeyDown:V(e.onKeyDown,d=>{let f=i.searchRef.current!=="";o||f&&d.key===" "||yh.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})})});Pf.displayName=If;var mP=oe.forwardRef((e,t)=>{let{__scopeMenu:o,disabled:r=!1,textValue:a,...n}=e,s=Sh(If,o),i=sP(o),l=oe.useRef(null),u=ee(t,l),[c,d]=oe.useState(!1),[f,m]=oe.useState("");return oe.useEffect(()=>{let p=l.current;p&&m((p.textContent??"").trim())},[n.children]),(0,me.jsx)(xu.ItemSlot,{scope:o,disabled:r,textValue:a??f,children:(0,me.jsx)(Qd,{asChild:!0,...i,focusable:!r,children:(0,me.jsx)(H.div,{role:"menuitem","data-highlighted":c?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...n,ref:u,onPointerMove:V(e.onPointerMove,vu(p=>{r?s.onItemLeave(p):(s.onItemEnter(p),p.defaultPrevented||p.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:V(e.onPointerLeave,vu(p=>s.onItemLeave(p))),onFocus:V(e.onFocus,()=>d(!0)),onBlur:V(e.onBlur,()=>d(!1))})})})}),zB="MenuCheckboxItem",pP=oe.forwardRef((e,t)=>{let{checked:o=!1,onCheckedChange:r,...a}=e;return(0,me.jsx)(yP,{scope:e.__scopeMenu,checked:o,children:(0,me.jsx)(Pf,{role:"menuitemcheckbox","aria-checked":Lf(o)?"mixed":o,...a,ref:t,"data-state":Th(o),onSelect:V(a.onSelect,()=>r?.(Lf(o)?!0:!o),{checkForDefaultPrevented:!1})})})});pP.displayName=zB;var gP="MenuRadioGroup",[qB,WB]=Wn(gP,{value:void 0,onValueChange:()=>{}}),hP=oe.forwardRef((e,t)=>{let{value:o,onValueChange:r,...a}=e,n=Te(r);return(0,me.jsx)(qB,{scope:e.__scopeMenu,value:o,onValueChange:n,children:(0,me.jsx)(Ih,{...a,ref:t})})});hP.displayName=gP;var xP="MenuRadioItem",vP=oe.forwardRef((e,t)=>{let{value:o,...r}=e,a=WB(xP,e.__scopeMenu),n=o===a.value;return(0,me.jsx)(yP,{scope:e.__scopeMenu,checked:n,children:(0,me.jsx)(Pf,{role:"menuitemradio","aria-checked":n,...r,ref:t,"data-state":Th(n),onSelect:V(r.onSelect,()=>a.onValueChange?.(o),{checkForDefaultPrevented:!1})})})});vP.displayName=xP;var Lh="MenuItemIndicator",[yP,$B]=Wn(Lh,{checked:!1}),bP=oe.forwardRef((e,t)=>{let{__scopeMenu:o,forceMount:r,...a}=e,n=$B(Lh,o);return(0,me.jsx)(Oe,{present:r||Lf(n.checked)||n.checked===!0,children:(0,me.jsx)(H.span,{...a,ref:t,"data-state":Th(n.checked)})})});bP.displayName=Lh;var jB="MenuSeparator",CP=oe.forwardRef((e,t)=>{let{__scopeMenu:o,...r}=e;return(0,me.jsx)(H.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});CP.displayName=jB;var KB="MenuArrow",wP=oe.forwardRef((e,t)=>{let{__scopeMenu:o,...r}=e,a=bu(o);return(0,me.jsx)(Ea,{...a,...r,ref:t})});wP.displayName=KB;var Ph="MenuSub",[XB,SP]=Wn(Ph),RP=e=>{let{__scopeMenu:t,children:o,open:r=!1,onOpenChange:a}=e,n=za(Ph,t),s=bu(t),[i,l]=oe.useState(null),[u,c]=oe.useState(null),d=Te(a);return oe.useEffect(()=>(n.open===!1&&d(!1),()=>d(!1)),[n.open,d]),(0,me.jsx)(qr,{...s,children:(0,me.jsx)(iP,{scope:t,open:r,onOpenChange:d,content:u,onContentChange:c,children:(0,me.jsx)(XB,{scope:t,contentId:Pe(),triggerId:Pe(),trigger:i,onTriggerChange:l,children:o})})})};RP.displayName=Ph;var hu="MenuSubTrigger",IP=oe.forwardRef((e,t)=>{let o=za(hu,e.__scopeMenu),r=Cu(hu,e.__scopeMenu),a=SP(hu,e.__scopeMenu),n=Sh(hu,e.__scopeMenu),s=oe.useRef(null),{pointerGraceTimerRef:i,onPointerGraceIntentChange:l}=n,u={__scopeMenu:e.__scopeMenu},c=oe.useCallback(()=>{s.current&&window.clearTimeout(s.current),s.current=null},[]);return oe.useEffect(()=>c,[c]),oe.useEffect(()=>{let d=i.current;return()=>{window.clearTimeout(d),l(null)}},[i,l]),(0,me.jsx)(Ch,{asChild:!0,...u,children:(0,me.jsx)(mP,{id:a.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":a.contentId,"data-state":TP(o.open),...e,ref:lo(t,a.onTriggerChange),onClick:d=>{e.onClick?.(d),!(e.disabled||d.defaultPrevented)&&(d.currentTarget.focus(),o.open||o.onOpenChange(!0))},onPointerMove:V(e.onPointerMove,vu(d=>{n.onItemEnter(d),!d.defaultPrevented&&!e.disabled&&!o.open&&!s.current&&(n.onPointerGraceIntentChange(null),s.current=window.setTimeout(()=>{o.onOpenChange(!0),c()},100))})),onPointerLeave:V(e.onPointerLeave,vu(d=>{c();let f=o.content?.getBoundingClientRect();if(f){let m=o.content?.dataset.side,p=m==="right",g=p?-5:5,h=f[p?"left":"right"],v=f[p?"right":"left"];n.onPointerGraceIntentChange({area:[{x:d.clientX+g,y:d.clientY},{x:h,y:f.top},{x:v,y:f.top},{x:v,y:f.bottom},{x:h,y:f.bottom}],side:m}),window.clearTimeout(i.current),i.current=window.setTimeout(()=>n.onPointerGraceIntentChange(null),300)}else{if(n.onTriggerLeave(d),d.defaultPrevented)return;n.onPointerGraceIntentChange(null)}})),onKeyDown:V(e.onKeyDown,d=>{let f=n.searchRef.current!=="";e.disabled||f&&d.key===" "||kB[r.dir].includes(d.key)&&(o.onOpenChange(!0),o.content?.focus(),d.preventDefault())})})})});IP.displayName=hu;var LP="MenuSubContent",PP=oe.forwardRef((e,t)=>{let o=uP(Oo,e.__scopeMenu),{forceMount:r=o.forceMount,...a}=e,n=za(Oo,e.__scopeMenu),s=Cu(Oo,e.__scopeMenu),i=SP(LP,e.__scopeMenu),l=oe.useRef(null),u=ee(t,l);return(0,me.jsx)(xu.Provider,{scope:e.__scopeMenu,children:(0,me.jsx)(Oe,{present:r||n.open,children:(0,me.jsx)(xu.Slot,{scope:e.__scopeMenu,children:(0,me.jsx)(Rh,{id:i.contentId,"aria-labelledby":i.triggerId,...a,ref:u,align:"start",side:s.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:c=>{s.isUsingKeyboardRef.current&&l.current?.focus(),c.preventDefault()},onCloseAutoFocus:c=>c.preventDefault(),onFocusOutside:V(e.onFocusOutside,c=>{c.target!==i.trigger&&n.onOpenChange(!1)}),onEscapeKeyDown:V(e.onEscapeKeyDown,c=>{s.onClose(),c.preventDefault()}),onKeyDown:V(e.onKeyDown,c=>{let d=c.currentTarget.contains(c.target),f=AB[s.dir].includes(c.key);d&&f&&(n.onOpenChange(!1),i.trigger?.focus(),c.preventDefault())})})})})})});PP.displayName=LP;function TP(e){return e?"open":"closed"}function Lf(e){return e==="indeterminate"}function Th(e){return Lf(e)?"indeterminate":e?"checked":"unchecked"}function YB(e){let t=document.activeElement;for(let o of e)if(o===t||(o.focus(),document.activeElement!==t))return}function ZB(e,t){return e.map((o,r)=>e[(t+r)%e.length])}function QB(e,t,o){let a=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,n=o?e.indexOf(o):-1,s=ZB(e,Math.max(n,0));a.length===1&&(s=s.filter(u=>u!==o));let l=s.find(u=>u.toLowerCase().startsWith(a.toLowerCase()));return l!==o?l:void 0}function JB(e,t){let{x:o,y:r}=e,a=!1;for(let n=0,s=t.length-1;n<t.length;s=n++){let i=t[n],l=t[s],u=i.x,c=i.y,d=l.x,f=l.y;c>r!=f>r&&o<(d-u)*(r-c)/(f-c)+u&&(a=!a)}return a}function eH(e,t){if(!t)return!1;let o={x:e.clientX,y:e.clientY};return JB(o,t)}function vu(e){return t=>t.pointerType==="mouse"?e(t):void 0}var MP=lP,kP=Ch,AP=cP,DP=dP,EP=Ih,NP=fP,FP=Pf,OP=pP,_P=hP,VP=vP,BP=bP,HP=CP,UP=wP,GP=RP,zP=IP,qP=PP;var mt=b(D(),1),Tf="DropdownMenu",[oH,fde]=Re(Tf,[bh]),Ot=bh(),[rH,WP]=oH(Tf),$P=e=>{let{__scopeDropdownMenu:t,children:o,dir:r,open:a,defaultOpen:n,onOpenChange:s,modal:i=!0}=e,l=Ot(t),u=pt.useRef(null),[c,d]=Fe({prop:a,defaultProp:n??!1,onChange:s,caller:Tf});return(0,mt.jsx)(rH,{scope:t,triggerId:Pe(),triggerRef:u,contentId:Pe(),open:c,onOpenChange:d,onOpenToggle:pt.useCallback(()=>d(f=>!f),[d]),modal:i,children:(0,mt.jsx)(MP,{...l,open:c,onOpenChange:d,dir:r,modal:i,children:o})})};$P.displayName=Tf;var jP="DropdownMenuTrigger",KP=pt.forwardRef((e,t)=>{let{__scopeDropdownMenu:o,disabled:r=!1,...a}=e,n=WP(jP,o),s=Ot(o);return(0,mt.jsx)(kP,{asChild:!0,...s,children:(0,mt.jsx)(H.button,{type:"button",id:n.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":n.open?n.contentId:void 0,"data-state":n.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...a,ref:lo(t,n.triggerRef),onPointerDown:V(e.onPointerDown,i=>{!r&&i.button===0&&i.ctrlKey===!1&&(n.onOpenToggle(),n.open||i.preventDefault())}),onKeyDown:V(e.onKeyDown,i=>{r||(["Enter"," "].includes(i.key)&&n.onOpenToggle(),i.key==="ArrowDown"&&n.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(i.key)&&i.preventDefault())})})})});KP.displayName=jP;var aH="DropdownMenuPortal",XP=e=>{let{__scopeDropdownMenu:t,...o}=e,r=Ot(t);return(0,mt.jsx)(AP,{...r,...o})};XP.displayName=aH;var YP="DropdownMenuContent",ZP=pt.forwardRef((e,t)=>{let{__scopeDropdownMenu:o,...r}=e,a=WP(YP,o),n=Ot(o),s=pt.useRef(!1);return(0,mt.jsx)(DP,{id:a.contentId,"aria-labelledby":a.triggerId,...n,...r,ref:t,onCloseAutoFocus:V(e.onCloseAutoFocus,i=>{s.current||a.triggerRef.current?.focus(),s.current=!1,i.preventDefault()}),onInteractOutside:V(e.onInteractOutside,i=>{let l=i.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0,c=l.button===2||u;(!a.modal||c)&&(s.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)"}})});ZP.displayName=YP;var nH="DropdownMenuGroup",QP=pt.forwardRef((e,t)=>{let{__scopeDropdownMenu:o,...r}=e,a=Ot(o);return(0,mt.jsx)(EP,{...a,...r,ref:t})});QP.displayName=nH;var sH="DropdownMenuLabel",JP=pt.forwardRef((e,t)=>{let{__scopeDropdownMenu:o,...r}=e,a=Ot(o);return(0,mt.jsx)(NP,{...a,...r,ref:t})});JP.displayName=sH;var iH="DropdownMenuItem",eT=pt.forwardRef((e,t)=>{let{__scopeDropdownMenu:o,...r}=e,a=Ot(o);return(0,mt.jsx)(FP,{...a,...r,ref:t})});eT.displayName=iH;var lH="DropdownMenuCheckboxItem",tT=pt.forwardRef((e,t)=>{let{__scopeDropdownMenu:o,...r}=e,a=Ot(o);return(0,mt.jsx)(OP,{...a,...r,ref:t})});tT.displayName=lH;var uH="DropdownMenuRadioGroup",oT=pt.forwardRef((e,t)=>{let{__scopeDropdownMenu:o,...r}=e,a=Ot(o);return(0,mt.jsx)(_P,{...a,...r,ref:t})});oT.displayName=uH;var cH="DropdownMenuRadioItem",rT=pt.forwardRef((e,t)=>{let{__scopeDropdownMenu:o,...r}=e,a=Ot(o);return(0,mt.jsx)(VP,{...a,...r,ref:t})});rT.displayName=cH;var dH="DropdownMenuItemIndicator",aT=pt.forwardRef((e,t)=>{let{__scopeDropdownMenu:o,...r}=e,a=Ot(o);return(0,mt.jsx)(BP,{...a,...r,ref:t})});aT.displayName=dH;var fH="DropdownMenuSeparator",nT=pt.forwardRef((e,t)=>{let{__scopeDropdownMenu:o,...r}=e,a=Ot(o);return(0,mt.jsx)(HP,{...a,...r,ref:t})});nT.displayName=fH;var mH="DropdownMenuArrow",pH=pt.forwardRef((e,t)=>{let{__scopeDropdownMenu:o,...r}=e,a=Ot(o);return(0,mt.jsx)(UP,{...a,...r,ref:t})});pH.displayName=mH;var gH=e=>{let{__scopeDropdownMenu:t,children:o,open:r,onOpenChange:a,defaultOpen:n}=e,s=Ot(t),[i,l]=Fe({prop:r,defaultProp:n??!1,onChange:a,caller:"DropdownMenuSub"});return(0,mt.jsx)(GP,{...s,open:i,onOpenChange:l,children:o})},hH="DropdownMenuSubTrigger",sT=pt.forwardRef((e,t)=>{let{__scopeDropdownMenu:o,...r}=e,a=Ot(o);return(0,mt.jsx)(zP,{...a,...r,ref:t})});sT.displayName=hH;var xH="DropdownMenuSubContent",iT=pt.forwardRef((e,t)=>{let{__scopeDropdownMenu:o,...r}=e,a=Ot(o);return(0,mt.jsx)(qP,{...a,...r,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)"}})});iT.displayName=xH;var lT=$P,uT=KP,Mh=XP,kh=ZP,cT=QP,Ah=JP,Dh=eT,Eh=tT,dT=oT,Nh=rT,Fh=aT,Oh=nT;var fT=gH,_h=sT,Vh=iT;var gt=b(D()),yH=lT,bH=uT,CH=cT,wH=Mh,SH=fT,RH=dT,mT=ta.forwardRef(({className:e,inset:t,children:o,...r},a)=>(0,gt.jsxs)(_h,{ref:a,className:S("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",t&&"pl-8",e),...r,children:[o,(0,gt.jsx)(Ut,{className:"ml-auto h-4 w-4"})]}));mT.displayName=_h.displayName;var pT=ta.forwardRef(({className:e,...t},o)=>(0,gt.jsx)(Vh,{ref:o,className:S("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));pT.displayName=Vh.displayName;var gT=ta.forwardRef(({className:e,sideOffset:t=4,...o},r)=>(0,gt.jsx)(Mh,{children:(0,gt.jsx)(kh,{ref:r,sideOffset:t,className:S("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...o})}));gT.displayName=kh.displayName;var hT=ta.forwardRef(({className:e,inset:t,...o},r)=>(0,gt.jsx)(Dh,{ref:r,className:S("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",e),...o}));hT.displayName=Dh.displayName;var xT=ta.forwardRef(({className:e,children:t,checked:o,...r},a)=>(0,gt.jsxs)(Eh,{ref:a,className:S("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:o,...r,children:[(0,gt.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,gt.jsx)(Fh,{children:(0,gt.jsx)(It,{className:"h-4 w-4"})})}),t]}));xT.displayName=Eh.displayName;var vT=ta.forwardRef(({className:e,children:t,...o},r)=>(0,gt.jsxs)(Nh,{ref:r,className:S("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...o,children:[(0,gt.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,gt.jsx)(Fh,{children:(0,gt.jsx)(en,{className:"h-2 w-2 fill-current"})})}),t]}));vT.displayName=Nh.displayName;var yT=ta.forwardRef(({className:e,inset:t,...o},r)=>(0,gt.jsx)(Ah,{ref:r,className:S("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...o}));yT.displayName=Ah.displayName;var bT=ta.forwardRef(({className:e,...t},o)=>(0,gt.jsx)(Oh,{ref:o,className:S("moonui-theme","-mx-1 my-1 h-px bg-muted",e),...t}));bT.displayName=Oh.displayName;var CT=({className:e,...t})=>(0,gt.jsx)("span",{className:S("moonui-theme","ml-auto text-xs tracking-widest opacity-60",e),...t});CT.displayName="DropdownMenuShortcut";var vo=b(A());var wT=b(A());var oa=b(D()),IH=te("relative overflow-hidden bg-muted",{variants:{variant:{default:"bg-muted",primary:"bg-primary/20",secondary:"bg-secondary/20",success:"bg-success/20",warning:"bg-warning/20",error:"bg-error/20"},size:{xs:"h-1",sm:"h-1.5",default:"h-2",md:"h-2.5",lg:"h-3",xl:"h-4"},radius:{none:"rounded-none",sm:"rounded-sm",default:"rounded-md",lg:"rounded-lg",full:"rounded-full"},animation:{default:"[&>div]:transition-all [&>div]:duration-500",smooth:"[&>div]:transition-all [&>div]:duration-700",fast:"[&>div]:transition-all [&>div]:duration-300",none:""}},defaultVariants:{variant:"default",size:"default",radius:"full",animation:"default"}}),LH=te("h-full w-full flex-1",{variants:{variant:{default:"bg-foreground",primary:"bg-primary",secondary:"bg-secondary",success:"bg-success",warning:"bg-warning",error:"bg-error"},animation:{default:"transition-all duration-500",smooth:"transition-all duration-700",fast:"transition-all duration-300",none:""}},defaultVariants:{variant:"primary",animation:"default"}}),Mf=wT.forwardRef(({className:e,value:t=0,variant:o,size:r,radius:a,animation:n,indicatorVariant:s,showValueLabel:i=!1,valueLabel:l,labelClassName:u,indeterminate:c=!1,max:d=100,...f},m)=>{let p=Math.max(0,Math.min(t,d)),g=d>0?p/d*100:0,h=l||`${Math.round(g)}%`;return(0,oa.jsxs)(oa.Fragment,{children:[i&&(0,oa.jsx)("div",{className:"flex justify-between items-center mb-1",children:(0,oa.jsx)("span",{className:S("text-sm font-medium text-muted-foreground",u),children:h})}),(0,oa.jsx)("div",{ref:m,className:S("moonui-theme",IH({variant:o,size:r,radius:a,animation:n}),e),role:"progressbar","aria-valuemin":0,"aria-valuemax":d,"aria-valuenow":c?void 0:p,...f,children:(0,oa.jsx)("div",{className:S(LH({variant:s||"primary",animation:n}),c&&"animate-indeterminate-progress"),style:c?{}:{transform:`translateX(-${100-g}%)`}})})]})});Mf.displayName="Progress";var de=b(D()),PH=e=>e.startsWith("image/")?(0,de.jsx)(on,{className:"h-4 w-4"}):e.startsWith("video/")?(0,de.jsx)(el,{className:"h-4 w-4"}):e.startsWith("audio/")?(0,de.jsx)($i,{className:"h-4 w-4"}):e.includes("text")||e.includes("document")?(0,de.jsx)(Vi,{className:"h-4 w-4"}):(0,de.jsx)(Bi,{className:"h-4 w-4"}),Bh=e=>{if(e===0)return"0 Bytes";let t=1024,o=["Bytes","KB","MB","GB"],r=Math.floor(Math.log(e)/Math.log(t));return parseFloat((e/Math.pow(t,r)).toFixed(2))+" "+o[r]},TH=({uploadedFile:e,onRemove:t})=>{let{id:o,file:r,progress:a,status:n,preview:s}=e;return(0,de.jsxs)(Ae.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"flex items-center space-x-3 p-3 border rounded-lg bg-background",children:[(0,de.jsx)("div",{className:"flex-shrink-0",children:s?(0,de.jsx)("img",{src:s,alt:r.name,className:"h-10 w-10 object-cover rounded"}):(0,de.jsx)("div",{className:"h-10 w-10 rounded bg-muted flex items-center justify-center",children:PH(r.type)})}),(0,de.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,de.jsxs)("div",{className:"flex items-center justify-between",children:[(0,de.jsx)("p",{className:"text-sm font-medium truncate",children:r.name}),(0,de.jsx)(Ve,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0",onClick:()=>t(o),children:(0,de.jsx)(co,{className:"h-3 w-3"})})]}),(0,de.jsxs)("div",{className:"flex items-center space-x-2 mt-1",children:[(0,de.jsx)("p",{className:"text-xs text-muted-foreground",children:Bh(r.size)}),n==="uploading"&&(0,de.jsxs)(fo,{variant:"secondary",className:"h-5",children:[(0,de.jsx)(St,{className:"h-3 w-3 mr-1 animate-spin"}),"Uploading"]}),n==="success"&&(0,de.jsxs)(fo,{variant:"success",className:"h-5",children:[(0,de.jsx)(ia,{className:"h-3 w-3 mr-1"}),"Done"]}),n==="error"&&(0,de.jsxs)(fo,{variant:"destructive",className:"h-5",children:[(0,de.jsx)(Go,{className:"h-3 w-3 mr-1"}),"Error"]})]}),n==="uploading"&&(0,de.jsx)("div",{className:"mt-2",children:(0,de.jsx)(Mf,{value:a,className:"h-1"})})]})]})},ST=vo.default.forwardRef(({accept:e="*",multiple:t=!0,maxSize:o=10*1024*1024,maxFiles:r=5,disabled:a=!1,className:n,onUpload:s,onRemove:i,children:l,...u},c)=>{let[d,f]=(0,vo.useState)([]),[m,p]=(0,vo.useState)(!1),[g,h]=(0,vo.useState)(null),v=L=>L.size>o?`File size exceeds ${Bh(o)}`:e!=="*"&&!e.split(",").some(P=>{let T=P.trim();return T.includes("*")?L.type.startsWith(T.replace("*","")):L.type===T})?"File type not supported":null,x=(0,vo.useCallback)(async L=>{let P=Array.from(L);if(h(null),d.length+P.length>r){h(`Maximum ${r} files allowed`);return}let T=[],O=[];if(P.forEach(W=>{let N=v(W);N?O.push(`${W.name}: ${N}`):T.push(W)}),O.length>0){h(O.join(", "));return}let $=T.map((W,N)=>({id:`${Date.now()}-${N}-${W.name.replace(/[^a-zA-Z0-9]/g,"")}`,file:W,progress:0,status:"uploading",preview:W.type.startsWith("image/")?URL.createObjectURL(W):void 0}));f(W=>[...W,...$]);for(let W of $){let N=0,q=setInterval(()=>{N+=15+W.file.size%10,N>=100?(N=100,clearInterval(q),f(E=>E.map(G=>G.id===W.id?{...G,progress:100,status:"success"}:G))):f(E=>E.map(G=>G.id===W.id?{...G,progress:N}:G))},200)}if(s)try{await s(T)}catch(W){console.error("Upload failed:",W),f(N=>N.map(q=>$.some(E=>E.id===q.id)?{...q,status:"error"}:q))}},[d.length,r,o,e,s]),y=(0,vo.useCallback)(L=>{if(L.preventDefault(),p(!1),a)return;let P=L.dataTransfer.files;P.length>0&&x(P)},[x,a]),R=(0,vo.useCallback)(L=>{L.preventDefault(),a||p(!0)},[a]),C=(0,vo.useCallback)(L=>{L.preventDefault(),p(!1)},[]),w=(0,vo.useCallback)(L=>{let P=L.target.files;P&&P.length>0&&x(P),L.target.value=""},[x]),I=(0,vo.useCallback)(L=>{f(P=>{let T=P.find(O=>O.id===L);return T?.preview&&URL.revokeObjectURL(T.preview),P.filter(O=>O.id!==L)}),i&&i(L)},[i]);return(0,de.jsxs)("div",{ref:c,className:S("moonui-theme","space-y-4",n),...u,children:[(0,de.jsxs)(Ae.div,{className:S("relative border-2 border-dashed rounded-lg p-8 text-center transition-colors",m&&"border-primary bg-primary/5",a&&"opacity-50 cursor-not-allowed",!a&&"hover:border-primary/50 cursor-pointer"),onDrop:y,onDragOver:R,onDragLeave:C,animate:{scale:m?1.02:1,borderColor:m?"hsl(var(--primary))":"hsl(var(--border))"},children:[(0,de.jsx)("input",{type:"file",accept:e,multiple:t,disabled:a,onChange:w,className:"absolute inset-0 w-full h-full opacity-0 cursor-pointer"}),l||(0,de.jsxs)("div",{className:"space-y-4",children:[(0,de.jsx)("div",{className:"mx-auto h-12 w-12 text-muted-foreground",children:(0,de.jsx)(Ji,{className:"h-full w-full"})}),(0,de.jsxs)("div",{children:[(0,de.jsx)("p",{className:"text-lg font-medium",children:m?"Drop files here":"Upload files"}),(0,de.jsx)("p",{className:"text-sm text-muted-foreground",children:"Drag & drop files here, or click to select"}),(0,de.jsxs)("p",{className:"text-xs text-muted-foreground mt-2",children:["Max ",r," files, ",Bh(o)," each"]})]}),(0,de.jsx)(Ve,{variant:"outline",disabled:a,children:"Select Files"})]})]}),(0,de.jsx)(Fr,{children:g&&(0,de.jsxs)(Ae.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"flex items-center space-x-2 text-sm text-destructive",children:[(0,de.jsx)(Go,{className:"h-4 w-4"}),(0,de.jsx)("span",{children:g})]})}),(0,de.jsx)(Fr,{children:d.length>0&&(0,de.jsxs)(Ae.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:"space-y-2",children:[(0,de.jsxs)("h4",{className:"text-sm font-medium",children:["Uploaded Files (",d.length,")"]}),(0,de.jsx)("div",{className:"space-y-2",children:(0,de.jsx)(Fr,{children:d.map(L=>(0,de.jsx)(TH,{uploadedFile:L,onRemove:I},L.id))})})]})})]})});ST.displayName="FileUpload";var RT=b(A());var $n=b(D()),IT=RT.default.forwardRef(({children:e,isOpen:t,onOpenChange:o,direction:r="up",threshold:a=50,className:n,overlayClassName:s,enableSwipeToClose:i=!0,...l},u)=>{let c=Ks(0),d=Ks(0),f=r==="up"||r==="down",m=f?c:d,p=_p(m,[0,a],[1,.5]),g=(x,y)=>{if(!i)return;let R=f?y.offset.y:y.offset.x,C=f?y.velocity.y:y.velocity.x,w=!1;switch(r){case"up":w=R>a||C>500;break;case"down":w=R<-a||C<-500;break;case"left":w=R>a||C>500;break;case"right":w=R<-a||C<-500;break}w?o(!1):Hp(m,0,{type:"spring",stiffness:300,damping:20})},h=()=>{switch(r){case"up":return{y:"100%"};case"down":return{y:"-100%"};case"left":return{x:"100%"};case"right":return{x:"-100%"};default:return{y:"100%"}}},v=()=>f?{y:0}:{x:0};return t?(0,$n.jsxs)("div",{className:"fixed inset-0 z-50",children:[(0,$n.jsx)(Ae.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:()=>o(!1),className:S("absolute inset-0 bg-black/50",s)}),(0,$n.jsxs)(Ae.div,{ref:u,drag:i?f?"y":"x":!1,dragConstraints:{top:r==="up"?0:void 0,bottom:r==="down"?0:void 0,left:r==="left"?0:void 0,right:r==="right"?0:void 0},dragElastic:.2,onDragEnd:g,style:{[f?"y":"x"]:m,opacity:p},initial:h(),animate:v(),exit:h(),transition:{type:"spring",damping:30,stiffness:300},className:S("absolute bg-background border shadow-lg",{"bottom-0 left-0 right-0 rounded-t-lg":r==="up","top-0 left-0 right-0 rounded-b-lg":r==="down","top-0 bottom-0 right-0 rounded-l-lg":r==="left","top-0 bottom-0 left-0 rounded-r-lg":r==="right"},n),...l,children:[(r==="up"||r==="down")&&(0,$n.jsx)("div",{className:"flex justify-center p-2",children:(0,$n.jsx)("div",{className:"w-12 h-1 bg-muted rounded-full"})}),e]})]}):null});IT.displayName="GestureDrawer";var qa=b(A());var ze=b(D());function MH({className:e,size:t="md",showForks:o=!0,showWatchers:r=!1,repoUrl:a="https://github.com/moonui/moonui"}){let[n,s]=(0,qa.useState)(null),[i,l]=(0,qa.useState)(!0);(0,qa.useEffect)(()=>{(async()=>{try{let p=await(await fetch("/api/github-stars")).json();s(p)}catch(m){console.error("Failed to fetch GitHub stats:",m),s({stars:1240,forks:89,watchers:156,isLive:!1})}finally{l(!1)}})()},[]);let u=f=>f>=1e3?(f/1e3).toFixed(1)+"k":f.toString(),c={sm:"text-sm gap-2",md:"text-base gap-3",lg:"text-lg gap-4"},d={sm:14,md:16,lg:20};return i?(0,ze.jsxs)("div",{className:S("flex items-center animate-pulse",c[t],e),children:[(0,ze.jsxs)("div",{className:"flex items-center gap-1",children:[(0,ze.jsx)("div",{className:"w-4 h-4 bg-gray-300 dark:bg-gray-700 rounded"}),(0,ze.jsx)("div",{className:"w-8 h-4 bg-gray-300 dark:bg-gray-700 rounded"})]}),o&&(0,ze.jsxs)("div",{className:"flex items-center gap-1",children:[(0,ze.jsx)("div",{className:"w-4 h-4 bg-gray-300 dark:bg-gray-700 rounded"}),(0,ze.jsx)("div",{className:"w-6 h-4 bg-gray-300 dark:bg-gray-700 rounded"})]})]}):n?(0,ze.jsxs)("div",{className:S("flex items-center",c[t],e),children:[(0,ze.jsxs)("a",{href:a,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-gray-700 dark:text-gray-300 hover:text-primary transition-colors",children:[(0,ze.jsx)(us,{className:"fill-current text-yellow-500",size:d[t]}),(0,ze.jsx)("span",{className:"font-medium",children:u(n.stars)})]}),o&&(0,ze.jsxs)("a",{href:`${a}/network/members`,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-gray-700 dark:text-gray-300 hover:text-primary transition-colors",children:[(0,ze.jsx)(Hi,{size:d[t]}),(0,ze.jsx)("span",{className:"font-medium",children:u(n.forks)})]}),r&&(0,ze.jsxs)("a",{href:`${a}/watchers`,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-gray-700 dark:text-gray-300 hover:text-primary transition-colors",children:[(0,ze.jsx)(tn,{size:d[t]}),(0,ze.jsx)("span",{className:"font-medium",children:u(n.watchers)})]}),!n.isLive&&(0,ze.jsx)("span",{className:"text-xs text-gray-500 dark:text-gray-500 ml-2",children:"(demo)"})]}):null}function _de({className:e,size:t="md",repoUrl:o="https://github.com/moonui/moonui"}){let[r,a]=(0,qa.useState)(null),[n,s]=(0,qa.useState)(!0);(0,qa.useEffect)(()=>{(async()=>{try{let c=await(await fetch("/api/github-stars")).json();a(c.stars)}catch(u){console.error("Failed to fetch GitHub stats:",u),a(1240)}finally{s(!1)}})()},[]);let i=l=>l>=1e3?(l/1e3).toFixed(1)+"k":l.toString();return(0,ze.jsx)(Ve,{variant:"outline",size:t,className:S("moonui-theme","group",e),asChild:!0,children:(0,ze.jsxs)("a",{href:o,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2",children:[(0,ze.jsx)(us,{className:"fill-current text-yellow-500 group-hover:scale-110 transition-transform",size:16}),(0,ze.jsx)("span",{children:"Star on GitHub"}),!n&&r&&(0,ze.jsx)("span",{className:"px-2 py-0.5 bg-gray-100 dark:bg-gray-800 rounded-full text-xs font-medium",children:i(r)}),(0,ze.jsx)(_i,{size:14,className:"opacity-50 group-hover:opacity-100 transition-opacity"})]})})}var hi=b(A());var pe=b(D());function LT({children:e,componentName:t,className:o,showPreview:r=!0,previewDuration:a=2e3}){let[n,s]=(0,hi.useState)(!1),[i,l]=(0,hi.useState)(null),u=()=>{if(!r)return;s(!0),i&&clearTimeout(i);let d=setTimeout(()=>{s(!1)},a);l(d)},c=()=>{i&&(clearTimeout(i),l(null)),s(!1)};return(0,pe.jsxs)("div",{className:S("relative group cursor-pointer transition-all duration-300",o),onMouseEnter:u,onMouseLeave:c,children:[(0,pe.jsx)("div",{className:S("transition-all duration-300",!n&&"blur-sm grayscale-[0.3] opacity-60"),children:e}),(0,pe.jsx)("div",{className:S("absolute inset-0 bg-gradient-to-br from-amber-500/10 via-transparent to-purple-500/10","border-2 border-dashed border-amber-400/30 rounded-lg","flex items-center justify-center","transition-all duration-300",n?"opacity-0":"opacity-100"),children:(0,pe.jsxs)("div",{className:"text-center space-y-3 p-6",children:[(0,pe.jsx)("div",{className:"flex justify-center",children:(0,pe.jsxs)(fo,{variant:"secondary",className:"bg-gradient-to-r from-amber-500 to-orange-500 text-white border-0 px-3 py-1",children:[(0,pe.jsx)(ns,{className:"w-3 h-3 mr-1"}),"PRO ONLY"]})}),(0,pe.jsx)("div",{className:"flex justify-center",children:(0,pe.jsx)("div",{className:"p-3 rounded-full bg-amber-100 dark:bg-amber-900/30",children:(0,pe.jsx)(is,{className:"w-6 h-6 text-amber-600 dark:text-amber-400"})})}),(0,pe.jsx)("h3",{className:"font-semibold text-gray-900 dark:text-gray-100",children:t}),(0,pe.jsx)("p",{className:"text-sm text-gray-600 dark:text-gray-400 max-w-xs",children:"This premium component is available with Pro subscription"}),(0,pe.jsxs)(Ve,{size:"sm",className:"bg-gradient-to-r from-amber-500 to-orange-500 hover:from-amber-600 hover:to-orange-600 border-0",onClick:()=>{typeof window<"u"&&(window.location.href="/pricing")},children:[(0,pe.jsx)(cs,{className:"w-4 h-4 mr-2"}),"Upgrade to Pro"]})]})}),r&&!n&&(0,pe.jsx)("div",{className:"absolute top-2 right-2 opacity-0 group-hover:opacity-100 transition-opacity duration-200",children:(0,pe.jsx)("div",{className:"bg-black/80 text-white text-xs px-2 py-1 rounded",children:"Hover to preview"})})]})}function kH({children:e,componentId:t,componentName:o,className:r,fallback:a,requireCLI:n=!0}){let[s,i]=(0,hi.useState)({isAuthenticated:!1,deviceValid:!1,hasProAccess:!1,loading:!0});if((0,hi.useEffect)(()=>{if(!(()=>{let d={nodeEnv:!1,nextPublicEnv:process.env.NEXT_PUBLIC_VERCEL_ENV==="development",localhost:typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"||window.location.hostname.includes(".local")),port:typeof window<"u"&&(window.location.port==="3000"||window.location.port==="3001"||window.location.port==="8080"),vercelEnv:!process.env.VERCEL,ciEnv:!process.env.CI,deploymentEnv:!process.env.DEPLOYMENT_ENV};return process.env.VERCEL||process.env.NETLIFY||process.env.RENDER||process.env.RAILWAY_ENVIRONMENT||process.env.FLY_APP_NAME||process.env.DEPLOYMENT_ENV==="production"?!1:d.nodeEnv&&d.localhost&&!d.vercelEnv&&!d.ciEnv})()||!n){i({isAuthenticated:!0,deviceValid:!0,hasProAccess:!0,loading:!1});return}async function c(){try{let d=localStorage.getItem("moonui_cli_token"),f=localStorage.getItem("moonui_device_id");if(!d||!f){i({isAuthenticated:!1,deviceValid:!1,hasProAccess:!1,loading:!1});return}let m=await fetch("/api/device/validate",{method:"POST",headers:{Authorization:`Bearer ${d}`,"X-Device-ID":f,"Content-Type":"application/json"},body:JSON.stringify({environment:{nodeEnv:"production",hostname:window.location.hostname,port:window.location.port,protocol:window.location.protocol}})});if(m.ok){let p=await m.json();i({isAuthenticated:!0,deviceValid:p.valid,hasProAccess:p.hasProAccess,loading:!1})}else i({isAuthenticated:!1,deviceValid:!1,hasProAccess:!1,loading:!1})}catch{i({isAuthenticated:!1,deviceValid:!1,hasProAccess:!1,loading:!1})}}c()},[n]),s.loading)return(0,pe.jsx)("div",{className:S("animate-pulse bg-gray-200 dark:bg-gray-800 rounded-lg h-32",r),children:(0,pe.jsx)("div",{className:"flex items-center justify-center h-full",children:(0,pe.jsx)("div",{className:"text-sm text-gray-500",children:"Loading..."})})});if((()=>{let u={nodeEnv:!1,localhost:typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"||window.location.hostname.includes(".local")),port:typeof window<"u"&&(window.location.port==="3000"||window.location.port==="3001"||window.location.port==="8080")};return process.env.VERCEL||process.env.NETLIFY||process.env.RENDER||process.env.RAILWAY_ENVIRONMENT||process.env.FLY_APP_NAME?!1:u.nodeEnv&&u.localhost})()&&n){if(!s.isAuthenticated)return(0,pe.jsxs)("div",{className:S("relative",r),children:[(0,pe.jsx)("div",{className:"blur-sm grayscale-[0.3] opacity-60 pointer-events-none",children:a||e}),(0,pe.jsx)("div",{className:"absolute inset-0 bg-gradient-to-br from-red-500/10 via-transparent to-orange-500/10 border-2 border-dashed border-red-400/30 rounded-lg flex items-center justify-center",children:(0,pe.jsxs)("div",{className:"text-center space-y-3 p-6",children:[(0,pe.jsxs)(fo,{variant:"destructive",className:"mb-2",children:[(0,pe.jsx)(is,{className:"w-3 h-3 mr-1"}),"CLI AUTH REQUIRED"]}),(0,pe.jsx)("h3",{className:"font-semibold text-gray-900 dark:text-gray-100",children:"CLI Authentication Required"}),(0,pe.jsx)("p",{className:"text-sm text-gray-600 dark:text-gray-400 max-w-xs",children:"Run the following command to authenticate:"}),(0,pe.jsx)("code",{className:"block bg-black/80 text-green-400 p-2 rounded text-xs",children:"npx moonui auth login"})]})})]});if(!s.deviceValid)return(0,pe.jsxs)("div",{className:S("relative",r),children:[(0,pe.jsx)("div",{className:"blur-sm grayscale-[0.3] opacity-60 pointer-events-none",children:a||e}),(0,pe.jsx)("div",{className:"absolute inset-0 bg-gradient-to-br from-yellow-500/10 via-transparent to-orange-500/10 border-2 border-dashed border-yellow-400/30 rounded-lg flex items-center justify-center",children:(0,pe.jsxs)("div",{className:"text-center space-y-3 p-6",children:[(0,pe.jsxs)(fo,{variant:"secondary",className:"bg-yellow-500 text-white mb-2",children:[(0,pe.jsx)(cs,{className:"w-3 h-3 mr-1"}),"DEVICE LIMIT"]}),(0,pe.jsx)("h3",{className:"font-semibold text-gray-900 dark:text-gray-100",children:"Device Limit Exceeded"}),(0,pe.jsx)("p",{className:"text-sm text-gray-600 dark:text-gray-400 max-w-xs",children:"This device is not registered or you've reached your device limit"}),(0,pe.jsx)(Ve,{size:"sm",className:"bg-gradient-to-r from-yellow-500 to-orange-500",onClick:()=>window.open("/dashboard/devices","_blank"),children:"Manage Devices"})]})})]});if(!s.hasProAccess)return(0,pe.jsx)(LT,{componentName:o||t,className:r,children:a||e})}return(0,pe.jsx)("div",{className:r,children:e})}function AH({className:e}){return(0,pe.jsxs)(fo,{variant:"secondary",className:S("bg-gradient-to-r from-amber-500 to-orange-500 text-white border-0 text-xs",e),children:[(0,pe.jsx)(ns,{className:"w-3 h-3 mr-1"}),"PRO"]})}function DH({className:e}){return(0,pe.jsx)(fo,{variant:"outline",className:S("border-green-500 text-green-600 dark:text-green-400 text-xs",e),children:"FREE"})}var PT=b(A());var _t=b(D());function Hh({className:e,variant:t="default",showText:o=!0,...r}){let n=`moon-gradient-${PT.useId()}`;return(0,_t.jsxs)("div",{className:S("moonui-theme","flex items-center gap-2",e),children:[(0,_t.jsxs)("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"flex-shrink-0",...r,children:[t==="gradient"&&(0,_t.jsx)("defs",{children:(0,_t.jsxs)("linearGradient",{id:n,x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[(0,_t.jsx)("stop",{offset:"0%",stopColor:"#3B82F6"}),(0,_t.jsx)("stop",{offset:"50%",stopColor:"#8B5CF6"}),(0,_t.jsx)("stop",{offset:"100%",stopColor:"#EC4899"})]})}),(0,_t.jsx)("circle",{cx:"16",cy:"16",r:"14",fill:t==="gradient"?`url(#${n})`:"currentColor",className:t==="default"?"fill-primary":""}),(0,_t.jsx)("circle",{cx:"22",cy:"10",r:"10",fill:"white",className:"dark:fill-background"})]}),o&&(0,_t.jsxs)("span",{className:"text-xl font-bold",children:[(0,_t.jsx)("span",{className:"text-foreground",children:"Moon"}),(0,_t.jsx)("span",{className:"text-primary",children:"UI"})]})]})}function jde({className:e,variant:t="default",...o}){return(0,_t.jsx)(Hh,{showText:!1,className:e,variant:t,...o})}function Kde({className:e,variant:t="default",showText:o=!0,...r}){return(0,_t.jsx)(Hh,{className:S("transition-all duration-300 hover:scale-105",e),variant:t,showText:o,...r})}var Uh=b(A());var Kt=b(D()),TT=({className:e,...t})=>(0,Kt.jsx)("nav",{role:"navigation","aria-label":"pagination",className:S("moonui-theme","mx-auto flex w-full justify-center",e),...t});TT.displayName="Pagination";var MT=Uh.forwardRef(({className:e,...t},o)=>(0,Kt.jsx)("ul",{ref:o,className:S("moonui-theme","flex flex-row items-center gap-1",e),...t}));MT.displayName="PaginationContent";var kT=Uh.forwardRef(({className:e,...t},o)=>(0,Kt.jsx)("li",{ref:o,className:S("moonui-theme","",e),...t}));kT.displayName="PaginationItem";var kf=({className:e,isActive:t,size:o="icon",...r})=>(0,Kt.jsx)("a",{"aria-current":t?"page":void 0,className:S(ec({variant:t?"outline":"ghost",size:o}),e),...r});kf.displayName="PaginationLink";var AT=({className:e,...t})=>(0,Kt.jsxs)(kf,{"aria-label":"Go to previous page",size:"md",className:S("moonui-theme","gap-1 pl-2.5",e),...t,children:[(0,Kt.jsx)(Uo,{className:"h-4 w-4"}),(0,Kt.jsx)("span",{children:"Previous"})]});AT.displayName="PaginationPrevious";var DT=({className:e,...t})=>(0,Kt.jsxs)(kf,{"aria-label":"Go to next page",size:"md",className:S("moonui-theme","gap-1 pr-2.5",e),...t,children:[(0,Kt.jsx)("span",{children:"Next"}),(0,Kt.jsx)(Ut,{className:"h-4 w-4"})]});DT.displayName="PaginationNext";var ET=({className:e,...t})=>(0,Kt.jsxs)("span",{"aria-hidden":!0,className:S("moonui-theme","flex h-9 w-9 items-center justify-center",e),...t,children:[(0,Kt.jsx)(cr,{className:"h-4 w-4"}),(0,Kt.jsx)("span",{className:"sr-only",children:"More pages"})]});ET.displayName="PaginationEllipsis";var Lu=b(A());var ja=b(A());var K=b(A(),1),Kh=b(Jn(),1);function wu(e,[t,o]){return Math.min(o,Math.max(t,e))}var NT=b(A(),1);var FT=b(D(),1),Gh=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"}),EH="VisuallyHidden",Su=NT.forwardRef((e,t)=>(0,FT.jsx)(H.span,{...e,ref:t,style:{...Gh,...e.style}}));Su.displayName=EH;var OT=Su;var se=b(D(),1),FH=[" ","Enter","ArrowUp","ArrowDown"],OH=[" ","Enter"],jn="Select",[Df,Ef,_H]=lr(jn),[xi,Rfe]=Re(jn,[_H,No]),Nf=No(),[VH,Wa]=xi(jn),[BH,HH]=xi(jn),_T=e=>{let{__scopeSelect:t,children:o,open:r,defaultOpen:a,onOpenChange:n,value:s,defaultValue:i,onValueChange:l,dir:u,name:c,autoComplete:d,disabled:f,required:m,form:p}=e,g=Nf(t),[h,v]=K.useState(null),[x,y]=K.useState(null),[R,C]=K.useState(!1),w=So(u),[I,L]=Fe({prop:r,defaultProp:a??!1,onChange:n,caller:jn}),[P,T]=Fe({prop:s,defaultProp:i,onChange:l,caller:jn}),O=K.useRef(null),$=h?p||!!h.closest("form"):!0,[W,N]=K.useState(new Set),q=Array.from(W).map(E=>E.props.value).join(";");return(0,se.jsx)(qr,{...g,children:(0,se.jsxs)(VH,{required:m,scope:t,trigger:h,onTriggerChange:v,valueNode:x,onValueNodeChange:y,valueNodeHasChildren:R,onValueNodeHasChildrenChange:C,contentId:Pe(),value:P,onValueChange:T,open:I,onOpenChange:L,dir:w,triggerPointerDownPosRef:O,disabled:f,children:[(0,se.jsx)(Df.Provider,{scope:t,children:(0,se.jsx)(BH,{scope:e.__scopeSelect,onNativeOptionAdd:K.useCallback(E=>{N(G=>new Set(G).add(E))},[]),onNativeOptionRemove:K.useCallback(E=>{N(G=>{let M=new Set(G);return M.delete(E),M})},[]),children:o})}),$?(0,se.jsxs)(lM,{"aria-hidden":!0,required:m,tabIndex:-1,name:c,autoComplete:d,value:P,onChange:E=>T(E.target.value),disabled:f,form:p,children:[P===void 0?(0,se.jsx)("option",{value:""}):null,Array.from(W)]},q):null]})})};_T.displayName=jn;var VT="SelectTrigger",BT=K.forwardRef((e,t)=>{let{__scopeSelect:o,disabled:r=!1,...a}=e,n=Nf(o),s=Wa(VT,o),i=s.disabled||r,l=ee(t,s.onTriggerChange),u=Ef(o),c=K.useRef("touch"),[d,f,m]=cM(g=>{let h=u().filter(y=>!y.disabled),v=h.find(y=>y.value===s.value),x=dM(h,g,v);x!==void 0&&s.onValueChange(x.value)}),p=g=>{i||(s.onOpenChange(!0),m()),g&&(s.triggerPointerDownPosRef.current={x:Math.round(g.pageX),y:Math.round(g.pageY)})};return(0,se.jsx)(Wr,{asChild:!0,...n,children:(0,se.jsx)(H.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:i,"data-disabled":i?"":void 0,"data-placeholder":uM(s.value)?"":void 0,...a,ref:l,onClick:V(a.onClick,g=>{g.currentTarget.focus(),c.current!=="mouse"&&p(g)}),onPointerDown:V(a.onPointerDown,g=>{c.current=g.pointerType;let h=g.target;h.hasPointerCapture(g.pointerId)&&h.releasePointerCapture(g.pointerId),g.button===0&&g.ctrlKey===!1&&g.pointerType==="mouse"&&(p(g),g.preventDefault())}),onKeyDown:V(a.onKeyDown,g=>{let h=d.current!=="";!(g.ctrlKey||g.altKey||g.metaKey)&&g.key.length===1&&f(g.key),!(h&&g.key===" ")&&FH.includes(g.key)&&(p(),g.preventDefault())})})})});BT.displayName=VT;var HT="SelectValue",UT=K.forwardRef((e,t)=>{let{__scopeSelect:o,className:r,style:a,children:n,placeholder:s="",...i}=e,l=Wa(HT,o),{onValueNodeHasChildrenChange:u}=l,c=n!==void 0,d=ee(t,l.onValueNodeChange);return Le(()=>{u(c)},[u,c]),(0,se.jsx)(H.span,{...i,ref:d,style:{pointerEvents:"none"},children:uM(l.value)?(0,se.jsx)(se.Fragment,{children:s}):n})});UT.displayName=HT;var UH="SelectIcon",GT=K.forwardRef((e,t)=>{let{__scopeSelect:o,children:r,...a}=e;return(0,se.jsx)(H.span,{"aria-hidden":!0,...a,ref:t,children:r||"\u25BC"})});GT.displayName=UH;var GH="SelectPortal",zT=e=>(0,se.jsx)(ho,{asChild:!0,...e});zT.displayName=GH;var Kn="SelectContent",qT=K.forwardRef((e,t)=>{let o=Wa(Kn,e.__scopeSelect),[r,a]=K.useState();if(Le(()=>{a(new DocumentFragment)},[]),!o.open){let n=r;return n?Kh.createPortal((0,se.jsx)(WT,{scope:e.__scopeSelect,children:(0,se.jsx)(Df.Slot,{scope:e.__scopeSelect,children:(0,se.jsx)("div",{children:e.children})})}),n):null}return(0,se.jsx)($T,{...e,ref:t})});qT.displayName=Kn;var nr=10,[WT,$a]=xi(Kn),zH="SelectContentImpl",qH=uo("SelectContent.RemoveScroll"),$T=K.forwardRef((e,t)=>{let{__scopeSelect:o,position:r="item-aligned",onCloseAutoFocus:a,onEscapeKeyDown:n,onPointerDownOutside:s,side:i,sideOffset:l,align:u,alignOffset:c,arrowPadding:d,collisionBoundary:f,collisionPadding:m,sticky:p,hideWhenDetached:g,avoidCollisions:h,...v}=e,x=Wa(Kn,o),[y,R]=K.useState(null),[C,w]=K.useState(null),I=ee(t,_=>R(_)),[L,P]=K.useState(null),[T,O]=K.useState(null),$=Ef(o),[W,N]=K.useState(!1),q=K.useRef(!1);K.useEffect(()=>{if(y)return Na(y)},[y]),Ma();let E=K.useCallback(_=>{let[ce,...he]=$().map(We=>We.ref.current),[we]=he.slice(-1),_e=document.activeElement;for(let We of _)if(We===_e||(We?.scrollIntoView({block:"nearest"}),We===ce&&C&&(C.scrollTop=0),We===we&&C&&(C.scrollTop=C.scrollHeight),We?.focus(),document.activeElement!==_e))return},[$,C]),G=K.useCallback(()=>E([L,y]),[E,L,y]);K.useEffect(()=>{W&&G()},[W,G]);let{onOpenChange:M,triggerPointerDownPosRef:k}=x;K.useEffect(()=>{if(y){let _={x:0,y:0},ce=we=>{_={x:Math.abs(Math.round(we.pageX)-(k.current?.x??0)),y:Math.abs(Math.round(we.pageY)-(k.current?.y??0))}},he=we=>{_.x<=10&&_.y<=10?we.preventDefault():y.contains(we.target)||M(!1),document.removeEventListener("pointermove",ce),k.current=null};return k.current!==null&&(document.addEventListener("pointermove",ce),document.addEventListener("pointerup",he,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ce),document.removeEventListener("pointerup",he,{capture:!0})}}},[y,M,k]),K.useEffect(()=>{let _=()=>M(!1);return window.addEventListener("blur",_),window.addEventListener("resize",_),()=>{window.removeEventListener("blur",_),window.removeEventListener("resize",_)}},[M]);let[re,Se]=cM(_=>{let ce=$().filter(_e=>!_e.disabled),he=ce.find(_e=>_e.ref.current===document.activeElement),we=dM(ce,_,he);we&&setTimeout(()=>we.ref.current.focus())}),F=K.useCallback((_,ce,he)=>{let we=!q.current&&!he;(x.value!==void 0&&x.value===ce||we)&&(P(_),we&&(q.current=!0))},[x.value]),j=K.useCallback(()=>y?.focus(),[y]),Z=K.useCallback((_,ce,he)=>{let we=!q.current&&!he;(x.value!==void 0&&x.value===ce||we)&&O(_)},[x.value]),X=r==="popper"?zh:jT,ue=X===zh?{side:i,sideOffset:l,align:u,alignOffset:c,arrowPadding:d,collisionBoundary:f,collisionPadding:m,sticky:p,hideWhenDetached:g,avoidCollisions:h}:{};return(0,se.jsx)(WT,{scope:o,content:y,viewport:C,onViewportChange:w,itemRefCallback:F,selectedItem:L,onItemLeave:j,itemTextRefCallback:Z,focusSelectedItem:G,selectedItemText:T,position:r,isPositioned:W,searchRef:re,children:(0,se.jsx)($r,{as:qH,allowPinchZoom:!0,children:(0,se.jsx)(Gr,{asChild:!0,trapped:x.open,onMountAutoFocus:_=>{_.preventDefault()},onUnmountAutoFocus:V(a,_=>{x.trigger?.focus({preventScroll:!0}),_.preventDefault()}),children:(0,se.jsx)(ko,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:n,onPointerDownOutside:s,onFocusOutside:_=>_.preventDefault(),onDismiss:()=>x.onOpenChange(!1),children:(0,se.jsx)(X,{role:"listbox",id:x.contentId,"data-state":x.open?"open":"closed",dir:x.dir,onContextMenu:_=>_.preventDefault(),...v,...ue,onPlaced:()=>N(!0),ref:I,style:{display:"flex",flexDirection:"column",outline:"none",...v.style},onKeyDown:V(v.onKeyDown,_=>{let ce=_.ctrlKey||_.altKey||_.metaKey;if(_.key==="Tab"&&_.preventDefault(),!ce&&_.key.length===1&&Se(_.key),["ArrowUp","ArrowDown","Home","End"].includes(_.key)){let we=$().filter(_e=>!_e.disabled).map(_e=>_e.ref.current);if(["ArrowUp","End"].includes(_.key)&&(we=we.slice().reverse()),["ArrowUp","ArrowDown"].includes(_.key)){let _e=_.target,We=we.indexOf(_e);we=we.slice(We+1)}setTimeout(()=>E(we)),_.preventDefault()}})})})})})})});$T.displayName=zH;var WH="SelectItemAlignedPosition",jT=K.forwardRef((e,t)=>{let{__scopeSelect:o,onPlaced:r,...a}=e,n=Wa(Kn,o),s=$a(Kn,o),[i,l]=K.useState(null),[u,c]=K.useState(null),d=ee(t,I=>c(I)),f=Ef(o),m=K.useRef(!1),p=K.useRef(!0),{viewport:g,selectedItem:h,selectedItemText:v,focusSelectedItem:x}=s,y=K.useCallback(()=>{if(n.trigger&&n.valueNode&&i&&u&&g&&h&&v){let I=n.trigger.getBoundingClientRect(),L=u.getBoundingClientRect(),P=n.valueNode.getBoundingClientRect(),T=v.getBoundingClientRect();if(n.dir!=="rtl"){let _e=T.left-L.left,We=P.left-_e,bo=I.left-We,Za=I.width+bo,Qf=Math.max(Za,L.width),Jf=window.innerWidth-nr,em=wu(We,[nr,Math.max(nr,Jf-Qf)]);i.style.minWidth=Za+"px",i.style.left=em+"px"}else{let _e=L.right-T.right,We=window.innerWidth-P.right-_e,bo=window.innerWidth-I.right-We,Za=I.width+bo,Qf=Math.max(Za,L.width),Jf=window.innerWidth-nr,em=wu(We,[nr,Math.max(nr,Jf-Qf)]);i.style.minWidth=Za+"px",i.style.right=em+"px"}let O=f(),$=window.innerHeight-nr*2,W=g.scrollHeight,N=window.getComputedStyle(u),q=parseInt(N.borderTopWidth,10),E=parseInt(N.paddingTop,10),G=parseInt(N.borderBottomWidth,10),M=parseInt(N.paddingBottom,10),k=q+E+W+M+G,re=Math.min(h.offsetHeight*5,k),Se=window.getComputedStyle(g),F=parseInt(Se.paddingTop,10),j=parseInt(Se.paddingBottom,10),Z=I.top+I.height/2-nr,X=$-Z,ue=h.offsetHeight/2,_=h.offsetTop+ue,ce=q+E+_,he=k-ce;if(ce<=Z){let _e=O.length>0&&h===O[O.length-1].ref.current;i.style.bottom="0px";let We=u.clientHeight-g.offsetTop-g.offsetHeight,bo=Math.max(X,ue+(_e?j:0)+We+G),Za=ce+bo;i.style.height=Za+"px"}else{let _e=O.length>0&&h===O[0].ref.current;i.style.top="0px";let bo=Math.max(Z,q+g.offsetTop+(_e?F:0)+ue)+he;i.style.height=bo+"px",g.scrollTop=ce-Z+g.offsetTop}i.style.margin=`${nr}px 0`,i.style.minHeight=re+"px",i.style.maxHeight=$+"px",r?.(),requestAnimationFrame(()=>m.current=!0)}},[f,n.trigger,n.valueNode,i,u,g,h,v,n.dir,r]);Le(()=>y(),[y]);let[R,C]=K.useState();Le(()=>{u&&C(window.getComputedStyle(u).zIndex)},[u]);let w=K.useCallback(I=>{I&&p.current===!0&&(y(),x?.(),p.current=!1)},[y,x]);return(0,se.jsx)(jH,{scope:o,contentWrapper:i,shouldExpandOnScrollRef:m,onScrollButtonChange:w,children:(0,se.jsx)("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:R},children:(0,se.jsx)(H.div,{...a,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...a.style}})})})});jT.displayName=WH;var $H="SelectPopperPosition",zh=K.forwardRef((e,t)=>{let{__scopeSelect:o,align:r="start",collisionPadding:a=nr,...n}=e,s=Nf(o);return(0,se.jsx)(Da,{...s,...n,ref:t,align:r,collisionPadding:a,style:{boxSizing:"border-box",...n.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)"}})});zh.displayName=$H;var[jH,Xh]=xi(Kn,{}),qh="SelectViewport",KT=K.forwardRef((e,t)=>{let{__scopeSelect:o,nonce:r,...a}=e,n=$a(qh,o),s=Xh(qh,o),i=ee(t,n.onViewportChange),l=K.useRef(0);return(0,se.jsxs)(se.Fragment,{children:[(0,se.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:r}),(0,se.jsx)(Df.Slot,{scope:o,children:(0,se.jsx)(H.div,{"data-radix-select-viewport":"",role:"presentation",...a,ref:i,style:{position:"relative",flex:1,overflow:"hidden auto",...a.style},onScroll:V(a.onScroll,u=>{let c=u.currentTarget,{contentWrapper:d,shouldExpandOnScrollRef:f}=s;if(f?.current&&d){let m=Math.abs(l.current-c.scrollTop);if(m>0){let p=window.innerHeight-nr*2,g=parseFloat(d.style.minHeight),h=parseFloat(d.style.height),v=Math.max(g,h);if(v<p){let x=v+m,y=Math.min(p,x),R=x-y;d.style.height=y+"px",d.style.bottom==="0px"&&(c.scrollTop=R>0?R:0,d.style.justifyContent="flex-end")}}}l.current=c.scrollTop})})})]})});KT.displayName=qh;var XT="SelectGroup",[KH,XH]=xi(XT),YT=K.forwardRef((e,t)=>{let{__scopeSelect:o,...r}=e,a=Pe();return(0,se.jsx)(KH,{scope:o,id:a,children:(0,se.jsx)(H.div,{role:"group","aria-labelledby":a,...r,ref:t})})});YT.displayName=XT;var ZT="SelectLabel",QT=K.forwardRef((e,t)=>{let{__scopeSelect:o,...r}=e,a=XH(ZT,o);return(0,se.jsx)(H.div,{id:a.id,...r,ref:t})});QT.displayName=ZT;var Af="SelectItem",[YH,JT]=xi(Af),eM=K.forwardRef((e,t)=>{let{__scopeSelect:o,value:r,disabled:a=!1,textValue:n,...s}=e,i=Wa(Af,o),l=$a(Af,o),u=i.value===r,[c,d]=K.useState(n??""),[f,m]=K.useState(!1),p=ee(t,x=>l.itemRefCallback?.(x,r,a)),g=Pe(),h=K.useRef("touch"),v=()=>{a||(i.onValueChange(r),i.onOpenChange(!1))};if(r==="")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(0,se.jsx)(YH,{scope:o,value:r,disabled:a,textId:g,isSelected:u,onItemTextChange:K.useCallback(x=>{d(y=>y||(x?.textContent??"").trim())},[]),children:(0,se.jsx)(Df.ItemSlot,{scope:o,value:r,disabled:a,textValue:c,children:(0,se.jsx)(H.div,{role:"option","aria-labelledby":g,"data-highlighted":f?"":void 0,"aria-selected":u&&f,"data-state":u?"checked":"unchecked","aria-disabled":a||void 0,"data-disabled":a?"":void 0,tabIndex:a?void 0:-1,...s,ref:p,onFocus:V(s.onFocus,()=>m(!0)),onBlur:V(s.onBlur,()=>m(!1)),onClick:V(s.onClick,()=>{h.current!=="mouse"&&v()}),onPointerUp:V(s.onPointerUp,()=>{h.current==="mouse"&&v()}),onPointerDown:V(s.onPointerDown,x=>{h.current=x.pointerType}),onPointerMove:V(s.onPointerMove,x=>{h.current=x.pointerType,a?l.onItemLeave?.():h.current==="mouse"&&x.currentTarget.focus({preventScroll:!0})}),onPointerLeave:V(s.onPointerLeave,x=>{x.currentTarget===document.activeElement&&l.onItemLeave?.()}),onKeyDown:V(s.onKeyDown,x=>{l.searchRef?.current!==""&&x.key===" "||(OH.includes(x.key)&&v(),x.key===" "&&x.preventDefault())})})})})});eM.displayName=Af;var Ru="SelectItemText",tM=K.forwardRef((e,t)=>{let{__scopeSelect:o,className:r,style:a,...n}=e,s=Wa(Ru,o),i=$a(Ru,o),l=JT(Ru,o),u=HH(Ru,o),[c,d]=K.useState(null),f=ee(t,v=>d(v),l.onItemTextChange,v=>i.itemTextRefCallback?.(v,l.value,l.disabled)),m=c?.textContent,p=K.useMemo(()=>(0,se.jsx)("option",{value:l.value,disabled:l.disabled,children:m},l.value),[l.disabled,l.value,m]),{onNativeOptionAdd:g,onNativeOptionRemove:h}=u;return Le(()=>(g(p),()=>h(p)),[g,h,p]),(0,se.jsxs)(se.Fragment,{children:[(0,se.jsx)(H.span,{id:l.textId,...n,ref:f}),l.isSelected&&s.valueNode&&!s.valueNodeHasChildren?Kh.createPortal(n.children,s.valueNode):null]})});tM.displayName=Ru;var oM="SelectItemIndicator",rM=K.forwardRef((e,t)=>{let{__scopeSelect:o,...r}=e;return JT(oM,o).isSelected?(0,se.jsx)(H.span,{"aria-hidden":!0,...r,ref:t}):null});rM.displayName=oM;var Wh="SelectScrollUpButton",aM=K.forwardRef((e,t)=>{let o=$a(Wh,e.__scopeSelect),r=Xh(Wh,e.__scopeSelect),[a,n]=K.useState(!1),s=ee(t,r.onScrollButtonChange);return Le(()=>{if(o.viewport&&o.isPositioned){let l=function(){let c=u.scrollTop>0;n(c)};var i=l;let u=o.viewport;return l(),u.addEventListener("scroll",l),()=>u.removeEventListener("scroll",l)}},[o.viewport,o.isPositioned]),a?(0,se.jsx)(sM,{...e,ref:s,onAutoScroll:()=>{let{viewport:i,selectedItem:l}=o;i&&l&&(i.scrollTop=i.scrollTop-l.offsetHeight)}}):null});aM.displayName=Wh;var $h="SelectScrollDownButton",nM=K.forwardRef((e,t)=>{let o=$a($h,e.__scopeSelect),r=Xh($h,e.__scopeSelect),[a,n]=K.useState(!1),s=ee(t,r.onScrollButtonChange);return Le(()=>{if(o.viewport&&o.isPositioned){let l=function(){let c=u.scrollHeight-u.clientHeight,d=Math.ceil(u.scrollTop)<c;n(d)};var i=l;let u=o.viewport;return l(),u.addEventListener("scroll",l),()=>u.removeEventListener("scroll",l)}},[o.viewport,o.isPositioned]),a?(0,se.jsx)(sM,{...e,ref:s,onAutoScroll:()=>{let{viewport:i,selectedItem:l}=o;i&&l&&(i.scrollTop=i.scrollTop+l.offsetHeight)}}):null});nM.displayName=$h;var sM=K.forwardRef((e,t)=>{let{__scopeSelect:o,onAutoScroll:r,...a}=e,n=$a("SelectScrollButton",o),s=K.useRef(null),i=Ef(o),l=K.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return K.useEffect(()=>()=>l(),[l]),Le(()=>{i().find(c=>c.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[i]),(0,se.jsx)(H.div,{"aria-hidden":!0,...a,ref:t,style:{flexShrink:0,...a.style},onPointerDown:V(a.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(r,50))}),onPointerMove:V(a.onPointerMove,()=>{n.onItemLeave?.(),s.current===null&&(s.current=window.setInterval(r,50))}),onPointerLeave:V(a.onPointerLeave,()=>{l()})})}),ZH="SelectSeparator",iM=K.forwardRef((e,t)=>{let{__scopeSelect:o,...r}=e;return(0,se.jsx)(H.div,{"aria-hidden":!0,...r,ref:t})});iM.displayName=ZH;var jh="SelectArrow",QH=K.forwardRef((e,t)=>{let{__scopeSelect:o,...r}=e,a=Nf(o),n=Wa(jh,o),s=$a(jh,o);return n.open&&s.position==="popper"?(0,se.jsx)(Ea,{...a,...r,ref:t}):null});QH.displayName=jh;var JH="SelectBubbleInput",lM=K.forwardRef(({__scopeSelect:e,value:t,...o},r)=>{let a=K.useRef(null),n=ee(r,a),s=Xs(t);return K.useEffect(()=>{let i=a.current;if(!i)return;let l=window.HTMLSelectElement.prototype,c=Object.getOwnPropertyDescriptor(l,"value").set;if(s!==t&&c){let d=new Event("change",{bubbles:!0});c.call(i,t),i.dispatchEvent(d)}},[s,t]),(0,se.jsx)(H.select,{...o,style:{...Gh,...o.style},ref:n,defaultValue:t})});lM.displayName=JH;function uM(e){return e===""||e===void 0}function cM(e){let t=Te(e),o=K.useRef(""),r=K.useRef(0),a=K.useCallback(s=>{let i=o.current+s;t(i),(function l(u){o.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>l(""),1e3))})(i)},[t]),n=K.useCallback(()=>{o.current="",window.clearTimeout(r.current)},[]);return K.useEffect(()=>()=>window.clearTimeout(r.current),[]),[o,a,n]}function dM(e,t,o){let a=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,n=o?e.indexOf(o):-1,s=eU(e,Math.max(n,0));a.length===1&&(s=s.filter(u=>u!==o));let l=s.find(u=>u.textValue.toLowerCase().startsWith(a.toLowerCase()));return l!==o?l:void 0}function eU(e,t){return e.map((o,r)=>e[(t+r)%e.length])}var fM=_T,Yh=BT,mM=UT,pM=GT,gM=zT,Zh=qT,hM=KT,xM=YT,Qh=QT,Jh=eM,vM=tM,yM=rM,ex=aM,tx=nM,ox=iM;var He=b(D()),vi=fM;vi.displayName="Select";var oU=xM,Iu=mM,yi=ja.forwardRef(({className:e,children:t,variant:o="standard",size:r="md",error:a,success:n,loading:s,leftIcon:i,rightIcon:l,...u},c)=>(0,He.jsxs)(Yh,{ref:c,className:S("flex w-full items-center justify-between gap-1 rounded-md transition-all duration-200","disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1","focus-visible:outline-none",a&&"border-error focus-visible:ring-error/30 focus-visible:border-error",n&&"border-success focus-visible:ring-success/30 focus-visible:border-success",r==="sm"&&"h-8 text-xs px-2",r==="md"&&"h-10 text-sm px-3",r==="lg"&&"h-12 text-base px-4",o==="standard"&&"border border-gray-300 dark:border-gray-700 bg-background dark:bg-gray-900 hover:border-gray-400 dark:hover:border-gray-600 focus-visible:ring-2 focus-visible:ring-primary/30 dark:focus-visible:ring-primary/50 focus-visible:border-primary dark:focus-visible:border-primary",o==="outline"&&"border border-gray-300 dark:border-gray-700 bg-transparent hover:border-gray-400 dark:hover:border-gray-600 focus-visible:ring-2 focus-visible:ring-primary/30 dark:focus-visible:ring-primary/50 focus-visible:border-primary dark:focus-visible:border-primary",o==="ghost"&&"border-none bg-gray-100 dark:bg-gray-800 hover:bg-gray-200 dark:hover:bg-gray-700 focus-visible:ring-2 focus-visible:ring-primary/30 dark:focus-visible:ring-primary/50",o==="underline"&&"border-t-0 border-l-0 border-r-0 border-b border-gray-300 dark:border-gray-600 rounded-none px-0 hover:border-gray-400 dark:hover:border-gray-500 focus-visible:ring-0 focus-visible:border-b-2 focus-visible:border-primary dark:focus-visible:border-primary",e),...u,disabled:u.disabled||s,"data-error":a?!0:void 0,"data-success":n?!0:void 0,"data-loading":s?!0:void 0,children:[(0,He.jsxs)("div",{className:"flex items-center flex-1 gap-2",children:[i&&(0,He.jsx)("span",{className:"flex items-center justify-center text-gray-500 dark:text-gray-400",children:i}),s?(0,He.jsxs)("div",{className:"flex items-center gap-2",children:[(0,He.jsx)(St,{className:"h-3.5 w-3.5 animate-spin text-muted-foreground dark:text-gray-400"}),(0,He.jsx)("span",{className:"text-muted-foreground dark:text-gray-400",children:"Loading..."})]}):t]}),!s&&(0,He.jsx)(pM,{asChild:!0,children:l?(0,He.jsx)("span",{className:"opacity-60",children:l}):(0,He.jsx)(ur,{className:"h-4 w-4 opacity-60 transition-transform duration-200 ease-out group-data-[state=open]:rotate-180"})})]}));yi.displayName=Yh.displayName;var rx=ja.forwardRef(({className:e,...t},o)=>(0,He.jsx)(ex,{ref:o,className:S("flex cursor-default items-center justify-center py-1 text-muted-foreground hover:text-foreground transition-colors",e),...t,children:(0,He.jsx)(Di,{className:"h-4 w-4"})}));rx.displayName=ex.displayName;var ax=ja.forwardRef(({className:e,...t},o)=>(0,He.jsx)(tx,{ref:o,className:S("flex cursor-default items-center justify-center py-1 text-muted-foreground hover:text-foreground transition-colors",e),...t,children:(0,He.jsx)(ur,{className:"h-4 w-4"})}));ax.displayName=tx.displayName;var bi=ja.forwardRef(({className:e,children:t,position:o="popper",side:r="bottom",sideOffset:a=4,align:n="start",...s},i)=>(0,He.jsx)(gM,{children:(0,He.jsxs)(Zh,{ref:i,side:r,sideOffset:a,align:n,avoidCollisions:!1,className:S(["relative z-50 max-h-96 min-w-[8rem] overflow-hidden","rounded-md border border-gray-200 dark:border-gray-700","bg-white dark:bg-gray-900 text-foreground","shadow-lg dark:shadow-gray-900/20","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","data-[state=open]:duration-150"],o==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:o,...s,children:[(0,He.jsx)(rx,{}),(0,He.jsx)(hM,{className:S("p-1",o==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),(0,He.jsx)(ax,{})]})}));bi.displayName=Zh.displayName;var bM=ja.forwardRef(({className:e,...t},o)=>(0,He.jsx)(Qh,{ref:o,className:S("moonui-theme","py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));bM.displayName=Qh.displayName;var Xt=ja.forwardRef(({className:e,children:t,variant:o="default",size:r="md",rightIcon:a,customIndicator:n,...s},i)=>(0,He.jsxs)(Jh,{ref:i,className:S("relative flex w-full cursor-default select-none items-center rounded-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",r==="sm"&&"py-1 pl-7 pr-2 text-xs",r==="md"&&"py-1.5 pl-8 pr-2 text-sm",r==="lg"&&"py-2 pl-9 pr-3 text-base",o==="default"&&"focus:bg-accent focus:text-accent-foreground dark:focus:bg-gray-700 dark:focus:text-gray-100",o==="subtle"&&"focus:bg-gray-100 dark:focus:bg-gray-800 focus:text-foreground dark:focus:text-gray-200",o==="destructive"&&"text-error dark:text-red-400 focus:bg-error/10 dark:focus:bg-red-900/20 focus:text-error dark:focus:text-red-300",o==="success"&&"text-success dark:text-green-400 focus:bg-success/10 dark:focus:bg-green-900/20 focus:text-success dark:focus:text-green-300",o==="warning"&&"text-warning dark:text-yellow-400 focus:bg-warning/10 dark:focus:bg-yellow-900/20 focus:text-warning dark:focus:text-yellow-300",e),...s,children:[(0,He.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,He.jsx)(yM,{children:n||(0,He.jsx)(It,{className:"h-4 w-4"})})}),(0,He.jsx)(vM,{children:t}),a&&(0,He.jsx)("span",{className:"ml-auto pl-2 opacity-70",children:a})]}));Xt.displayName=Jh.displayName;var CM=ja.forwardRef(({className:e,...t},o)=>(0,He.jsx)(ox,{ref:o,className:S("moonui-theme","-mx-1 my-1 h-px bg-muted dark:bg-gray-700",e),...t}));CM.displayName=ox.displayName;var bt=b(D()),rU=[{code:"+1",country:"US",flag:"\u{1F1FA}\u{1F1F8}",name:"United States"},{code:"+44",country:"GB",flag:"\u{1F1EC}\u{1F1E7}",name:"United Kingdom"},{code:"+49",country:"DE",flag:"\u{1F1E9}\u{1F1EA}",name:"Germany"},{code:"+33",country:"FR",flag:"\u{1F1EB}\u{1F1F7}",name:"France"},{code:"+39",country:"IT",flag:"\u{1F1EE}\u{1F1F9}",name:"Italy"},{code:"+34",country:"ES",flag:"\u{1F1EA}\u{1F1F8}",name:"Spain"},{code:"+31",country:"NL",flag:"\u{1F1F3}\u{1F1F1}",name:"Netherlands"},{code:"+46",country:"SE",flag:"\u{1F1F8}\u{1F1EA}",name:"Sweden"},{code:"+47",country:"NO",flag:"\u{1F1F3}\u{1F1F4}",name:"Norway"},{code:"+45",country:"DK",flag:"\u{1F1E9}\u{1F1F0}",name:"Denmark"},{code:"+358",country:"FI",flag:"\u{1F1EB}\u{1F1EE}",name:"Finland"},{code:"+48",country:"PL",flag:"\u{1F1F5}\u{1F1F1}",name:"Poland"},{code:"+90",country:"TR",flag:"\u{1F1F9}\u{1F1F7}",name:"Turkey"},{code:"+86",country:"CN",flag:"\u{1F1E8}\u{1F1F3}",name:"China"},{code:"+81",country:"JP",flag:"\u{1F1EF}\u{1F1F5}",name:"Japan"},{code:"+82",country:"KR",flag:"\u{1F1F0}\u{1F1F7}",name:"South Korea"},{code:"+91",country:"IN",flag:"\u{1F1EE}\u{1F1F3}",name:"India"},{code:"+61",country:"AU",flag:"\u{1F1E6}\u{1F1FA}",name:"Australia"},{code:"+64",country:"NZ",flag:"\u{1F1F3}\u{1F1FF}",name:"New Zealand"},{code:"+27",country:"ZA",flag:"\u{1F1FF}\u{1F1E6}",name:"South Africa"},{code:"+55",country:"BR",flag:"\u{1F1E7}\u{1F1F7}",name:"Brazil"},{code:"+52",country:"MX",flag:"\u{1F1F2}\u{1F1FD}",name:"Mexico"},{code:"+54",country:"AR",flag:"\u{1F1E6}\u{1F1F7}",name:"Argentina"},{code:"+20",country:"EG",flag:"\u{1F1EA}\u{1F1EC}",name:"Egypt"},{code:"+966",country:"SA",flag:"\u{1F1F8}\u{1F1E6}",name:"Saudi Arabia"},{code:"+971",country:"AE",flag:"\u{1F1E6}\u{1F1EA}",name:"UAE"}],wM=(e,t)=>{let o=e.replace(/\D/g,"");switch(t){case"+1":return o.length<=3?o:o.length<=6?`(${o.slice(0,3)}) ${o.slice(3)}`:`(${o.slice(0,3)}) ${o.slice(3,6)}-${o.slice(6,10)}`;case"+44":return o.length<=4?o:o.length<=7?`${o.slice(0,4)} ${o.slice(4)}`:`${o.slice(0,4)} ${o.slice(4,7)} ${o.slice(7,11)}`;case"+90":return o.length<=3?o:o.length<=6?`(${o.slice(0,3)}) ${o.slice(3)}`:o.length<=9?`(${o.slice(0,3)}) ${o.slice(3,6)} ${o.slice(6)}`:`(${o.slice(0,3)}) ${o.slice(3,6)} ${o.slice(6,8)} ${o.slice(8,10)}`;default:let r="";for(let a=0;a<o.length;a++)a>0&&a%3===0&&(r+=" "),r+=o[a];return r}},aU=e=>{switch(e){case"+1":return 10;case"+44":return 11;case"+90":return 10;default:return 15}},SM=Lu.forwardRef(({className:e,value:t="",onChange:o,defaultCountry:r="+1",showIcon:a=!0,showCountrySelect:n=!0,countries:s=rU,size:i,...l},u)=>{let[c,d]=Lu.useState(r),[f,m]=Lu.useState(t),p=s.find(x=>x.code===c)||s[0],g=x=>{let y=x.target.value.replace(/\D/g,""),R=aU(c),C=y.slice(0,R),w=wM(C,c);m(C),o?.(C,c),x.target.value=w},h=x=>{d(x),o?.(f,x)},v=wM(f,c);return(0,bt.jsxs)("div",{className:S("relative flex gap-2",e),children:[n&&(0,bt.jsxs)(vi,{value:c,onValueChange:h,children:[(0,bt.jsx)(yi,{className:"w-[120px]",children:(0,bt.jsx)(Iu,{children:(0,bt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,bt.jsx)("span",{children:p.flag}),(0,bt.jsx)("span",{children:p.code})]})})}),(0,bt.jsx)(bi,{children:s.map(x=>(0,bt.jsx)(Xt,{value:x.code,children:(0,bt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,bt.jsx)("span",{children:x.flag}),(0,bt.jsx)("span",{children:x.code}),(0,bt.jsx)("span",{className:"text-muted-foreground",children:x.name})]})},x.code))})]}),(0,bt.jsxs)("div",{className:"relative flex-1",children:[(0,bt.jsx)(At,{ref:u,type:"tel",inputMode:"numeric",autoComplete:"tel",placeholder:c==="+1"?"(555) 123-4567":"123 456 789",value:v,onChange:g,className:S(a&&"pl-10",e),...l}),a&&(0,bt.jsx)(ji,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"})]})]})});SM.displayName="PhoneInput";var _o=b(A());var yo=b(D()),nU=te("aspect-square border focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",{variants:{variant:{default:"border-border bg-background text-primary",outline:"border-border bg-transparent text-primary",filled:"border-primary bg-primary/10 text-primary"},size:{sm:"h-3.5 w-3.5",default:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"}},defaultVariants:{variant:"default",size:"default"}}),RM=_o.createContext({}),IM=_o.forwardRef(({className:e,value:t,onValueChange:o,disabled:r,name:a,...n},s)=>(0,yo.jsx)(RM.Provider,{value:{value:t,onValueChange:o,disabled:r,name:a},children:(0,yo.jsx)("div",{ref:s,role:"radiogroup",className:S("moonui-theme","grid gap-2",e),...n})}));IM.displayName="RadioGroup";var nx=_o.forwardRef(({className:e,variant:t,size:o,indicator:r,id:a,value:n,disabled:s,...i},l)=>{let u=_o.useContext(RM),c=_o.useId(),d=a||c,f=u.value===n,m=p=>{u.onValueChange&&u.onValueChange(p.target.value),i.onChange&&i.onChange(p)};return(0,yo.jsxs)("div",{className:"relative flex items-center",children:[(0,yo.jsx)("input",{type:"radio",id:d,ref:l,value:n,checked:f,disabled:s||u.disabled,name:u.name,onChange:m,className:"sr-only",...i}),(0,yo.jsx)("label",{htmlFor:d,className:S(nU({variant:t,size:o}),"rounded-full","focus-visible:ring-primary/50","relative inline-flex shrink-0 cursor-pointer items-center justify-center overflow-hidden",s&&"cursor-not-allowed opacity-50",e),children:(0,yo.jsx)("span",{className:S("absolute inset-0 pointer-events-none",f&&"flex items-center justify-center"),children:f&&(r||(0,yo.jsx)(en,{className:"h-[60%] w-[60%] fill-current text-current"}))})})]})});nx.displayName="RadioGroupItem";var sx=_o.forwardRef(({className:e,htmlFor:t,children:o,disabled:r=!1,...a},n)=>(0,yo.jsx)("label",{ref:n,htmlFor:t,className:S("text-sm font-medium leading-none ml-2 text-foreground",r&&"cursor-not-allowed opacity-70",e),...a,children:o}));sx.displayName="RadioLabel";var LM=_o.forwardRef(({id:e,label:t,labelClassName:o,...r},a)=>{let n=_o.useId(),s=e||n;return(0,yo.jsxs)("div",{className:"flex items-center",children:[(0,yo.jsx)(nx,{ref:a,id:s,...r}),(0,yo.jsx)(sx,{htmlFor:s,disabled:r.disabled,className:o,children:t})]})});LM.displayName="RadioItemWithLabel";var ra=b(D());function sU({value:e="",onChange:t,placeholder:o="Start typing...",className:r,disabled:a=!1}){let n=s=>{!a&&t&&t(s.target.value)};return(0,ra.jsxs)("div",{className:S("border border-input rounded-md",r),children:[(0,ra.jsx)("div",{className:"border-b border-border p-2 bg-muted/50",children:(0,ra.jsxs)("div",{className:"flex gap-1",children:[(0,ra.jsx)("button",{type:"button",className:"px-2 py-1 text-sm rounded hover:bg-background disabled:opacity-50",disabled:a,title:"Bold (Pro feature)",children:"B"}),(0,ra.jsx)("button",{type:"button",className:"px-2 py-1 text-sm rounded hover:bg-background disabled:opacity-50",disabled:a,title:"Italic (Pro feature)",children:"I"}),(0,ra.jsx)("button",{type:"button",className:"px-2 py-1 text-sm rounded hover:bg-background disabled:opacity-50",disabled:a,title:"Underline (Pro feature)",children:"U"})]})}),(0,ra.jsx)("textarea",{value:e,onChange:n,placeholder:o,disabled:a,className:S("w-full min-h-[200px] p-3 resize-none border-0 bg-transparent","focus:outline-none focus:ring-0","disabled:cursor-not-allowed disabled:opacity-50")})]})}var fx=b(A());var ne=b(A(),1);var TM=b(A(),1),Ee=b(D(),1);function iU(e,t){return TM.useReducer((o,r)=>t[o][r]??o,e)}var ix="ScrollArea",[MM,Kfe]=Re(ix),[lU,Vo]=MM(ix),kM=ne.forwardRef((e,t)=>{let{__scopeScrollArea:o,type:r="hover",dir:a,scrollHideDelay:n=600,...s}=e,[i,l]=ne.useState(null),[u,c]=ne.useState(null),[d,f]=ne.useState(null),[m,p]=ne.useState(null),[g,h]=ne.useState(null),[v,x]=ne.useState(0),[y,R]=ne.useState(0),[C,w]=ne.useState(!1),[I,L]=ne.useState(!1),P=ee(t,O=>l(O)),T=So(a);return(0,Ee.jsx)(lU,{scope:o,type:r,dir:T,scrollHideDelay:n,scrollArea:i,viewport:u,onViewportChange:c,content:d,onContentChange:f,scrollbarX:m,onScrollbarXChange:p,scrollbarXEnabled:C,onScrollbarXEnabledChange:w,scrollbarY:g,onScrollbarYChange:h,scrollbarYEnabled:I,onScrollbarYEnabledChange:L,onCornerWidthChange:x,onCornerHeightChange:R,children:(0,Ee.jsx)(H.div,{dir:T,...s,ref:P,style:{position:"relative","--radix-scroll-area-corner-width":v+"px","--radix-scroll-area-corner-height":y+"px",...e.style}})})});kM.displayName=ix;var AM="ScrollAreaViewport",DM=ne.forwardRef((e,t)=>{let{__scopeScrollArea:o,children:r,nonce:a,...n}=e,s=Vo(AM,o),i=ne.useRef(null),l=ee(t,i,s.onViewportChange);return(0,Ee.jsxs)(Ee.Fragment,{children:[(0,Ee.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:a}),(0,Ee.jsx)(H.div,{"data-radix-scroll-area-viewport":"",...n,ref:l,style:{overflowX:s.scrollbarXEnabled?"scroll":"hidden",overflowY:s.scrollbarYEnabled?"scroll":"hidden",...e.style},children:(0,Ee.jsx)("div",{ref:s.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});DM.displayName=AM;var Sr="ScrollAreaScrollbar",_f=ne.forwardRef((e,t)=>{let{forceMount:o,...r}=e,a=Vo(Sr,e.__scopeScrollArea),{onScrollbarXEnabledChange:n,onScrollbarYEnabledChange:s}=a,i=e.orientation==="horizontal";return ne.useEffect(()=>(i?n(!0):s(!0),()=>{i?n(!1):s(!1)}),[i,n,s]),a.type==="hover"?(0,Ee.jsx)(uU,{...r,ref:t,forceMount:o}):a.type==="scroll"?(0,Ee.jsx)(cU,{...r,ref:t,forceMount:o}):a.type==="auto"?(0,Ee.jsx)(EM,{...r,ref:t,forceMount:o}):a.type==="always"?(0,Ee.jsx)(lx,{...r,ref:t}):null});_f.displayName=Sr;var uU=ne.forwardRef((e,t)=>{let{forceMount:o,...r}=e,a=Vo(Sr,e.__scopeScrollArea),[n,s]=ne.useState(!1);return ne.useEffect(()=>{let i=a.scrollArea,l=0;if(i){let u=()=>{window.clearTimeout(l),s(!0)},c=()=>{l=window.setTimeout(()=>s(!1),a.scrollHideDelay)};return i.addEventListener("pointerenter",u),i.addEventListener("pointerleave",c),()=>{window.clearTimeout(l),i.removeEventListener("pointerenter",u),i.removeEventListener("pointerleave",c)}}},[a.scrollArea,a.scrollHideDelay]),(0,Ee.jsx)(Oe,{present:o||n,children:(0,Ee.jsx)(EM,{"data-state":n?"visible":"hidden",...r,ref:t})})}),cU=ne.forwardRef((e,t)=>{let{forceMount:o,...r}=e,a=Vo(Sr,e.__scopeScrollArea),n=e.orientation==="horizontal",s=Bf(()=>l("SCROLL_END"),100),[i,l]=iU("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 ne.useEffect(()=>{if(i==="idle"){let u=window.setTimeout(()=>l("HIDE"),a.scrollHideDelay);return()=>window.clearTimeout(u)}},[i,a.scrollHideDelay,l]),ne.useEffect(()=>{let u=a.viewport,c=n?"scrollLeft":"scrollTop";if(u){let d=u[c],f=()=>{let m=u[c];d!==m&&(l("SCROLL"),s()),d=m};return u.addEventListener("scroll",f),()=>u.removeEventListener("scroll",f)}},[a.viewport,n,l,s]),(0,Ee.jsx)(Oe,{present:o||i!=="hidden",children:(0,Ee.jsx)(lx,{"data-state":i==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:V(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:V(e.onPointerLeave,()=>l("POINTER_LEAVE"))})})}),EM=ne.forwardRef((e,t)=>{let o=Vo(Sr,e.__scopeScrollArea),{forceMount:r,...a}=e,[n,s]=ne.useState(!1),i=e.orientation==="horizontal",l=Bf(()=>{if(o.viewport){let u=o.viewport.offsetWidth<o.viewport.scrollWidth,c=o.viewport.offsetHeight<o.viewport.scrollHeight;s(i?u:c)}},10);return Ci(o.viewport,l),Ci(o.content,l),(0,Ee.jsx)(Oe,{present:r||n,children:(0,Ee.jsx)(lx,{"data-state":n?"visible":"hidden",...a,ref:t})})}),lx=ne.forwardRef((e,t)=>{let{orientation:o="vertical",...r}=e,a=Vo(Sr,e.__scopeScrollArea),n=ne.useRef(null),s=ne.useRef(0),[i,l]=ne.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=_M(i.viewport,i.content),c={...r,sizes:i,onSizesChange:l,hasThumb:u>0&&u<1,onThumbChange:f=>n.current=f,onThumbPointerUp:()=>s.current=0,onThumbPointerDown:f=>s.current=f};function d(f,m){return hU(f,s.current,i,m)}return o==="horizontal"?(0,Ee.jsx)(dU,{...c,ref:t,onThumbPositionChange:()=>{if(a.viewport&&n.current){let f=a.viewport.scrollLeft,m=PM(f,i,a.dir);n.current.style.transform=`translate3d(${m}px, 0, 0)`}},onWheelScroll:f=>{a.viewport&&(a.viewport.scrollLeft=f)},onDragScroll:f=>{a.viewport&&(a.viewport.scrollLeft=d(f,a.dir))}}):o==="vertical"?(0,Ee.jsx)(fU,{...c,ref:t,onThumbPositionChange:()=>{if(a.viewport&&n.current){let f=a.viewport.scrollTop,m=PM(f,i);n.current.style.transform=`translate3d(0, ${m}px, 0)`}},onWheelScroll:f=>{a.viewport&&(a.viewport.scrollTop=f)},onDragScroll:f=>{a.viewport&&(a.viewport.scrollTop=d(f))}}):null}),dU=ne.forwardRef((e,t)=>{let{sizes:o,onSizesChange:r,...a}=e,n=Vo(Sr,e.__scopeScrollArea),[s,i]=ne.useState(),l=ne.useRef(null),u=ee(t,l,n.onScrollbarXChange);return ne.useEffect(()=>{l.current&&i(getComputedStyle(l.current))},[l]),(0,Ee.jsx)(FM,{"data-orientation":"horizontal",...a,ref:u,sizes:o,style:{bottom:0,left:n.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:n.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Vf(o)+"px",...e.style},onThumbPointerDown:c=>e.onThumbPointerDown(c.x),onDragScroll:c=>e.onDragScroll(c.x),onWheelScroll:(c,d)=>{if(n.viewport){let f=n.viewport.scrollLeft+c.deltaX;e.onWheelScroll(f),BM(f,d)&&c.preventDefault()}},onResize:()=>{l.current&&n.viewport&&s&&r({content:n.viewport.scrollWidth,viewport:n.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:Of(s.paddingLeft),paddingEnd:Of(s.paddingRight)}})}})}),fU=ne.forwardRef((e,t)=>{let{sizes:o,onSizesChange:r,...a}=e,n=Vo(Sr,e.__scopeScrollArea),[s,i]=ne.useState(),l=ne.useRef(null),u=ee(t,l,n.onScrollbarYChange);return ne.useEffect(()=>{l.current&&i(getComputedStyle(l.current))},[l]),(0,Ee.jsx)(FM,{"data-orientation":"vertical",...a,ref:u,sizes:o,style:{top:0,right:n.dir==="ltr"?0:void 0,left:n.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Vf(o)+"px",...e.style},onThumbPointerDown:c=>e.onThumbPointerDown(c.y),onDragScroll:c=>e.onDragScroll(c.y),onWheelScroll:(c,d)=>{if(n.viewport){let f=n.viewport.scrollTop+c.deltaY;e.onWheelScroll(f),BM(f,d)&&c.preventDefault()}},onResize:()=>{l.current&&n.viewport&&s&&r({content:n.viewport.scrollHeight,viewport:n.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:Of(s.paddingTop),paddingEnd:Of(s.paddingBottom)}})}})}),[mU,NM]=MM(Sr),FM=ne.forwardRef((e,t)=>{let{__scopeScrollArea:o,sizes:r,hasThumb:a,onThumbChange:n,onThumbPointerUp:s,onThumbPointerDown:i,onThumbPositionChange:l,onDragScroll:u,onWheelScroll:c,onResize:d,...f}=e,m=Vo(Sr,o),[p,g]=ne.useState(null),h=ee(t,P=>g(P)),v=ne.useRef(null),x=ne.useRef(""),y=m.viewport,R=r.content-r.viewport,C=Te(c),w=Te(l),I=Bf(d,10);function L(P){if(v.current){let T=P.clientX-v.current.left,O=P.clientY-v.current.top;u({x:T,y:O})}}return ne.useEffect(()=>{let P=T=>{let O=T.target;p?.contains(O)&&C(T,R)};return document.addEventListener("wheel",P,{passive:!1}),()=>document.removeEventListener("wheel",P,{passive:!1})},[y,p,R,C]),ne.useEffect(w,[r,w]),Ci(p,I),Ci(m.content,I),(0,Ee.jsx)(mU,{scope:o,scrollbar:p,hasThumb:a,onThumbChange:Te(n),onThumbPointerUp:Te(s),onThumbPositionChange:w,onThumbPointerDown:Te(i),children:(0,Ee.jsx)(H.div,{...f,ref:h,style:{position:"absolute",...f.style},onPointerDown:V(e.onPointerDown,P=>{P.button===0&&(P.target.setPointerCapture(P.pointerId),v.current=p.getBoundingClientRect(),x.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",m.viewport&&(m.viewport.style.scrollBehavior="auto"),L(P))}),onPointerMove:V(e.onPointerMove,L),onPointerUp:V(e.onPointerUp,P=>{let T=P.target;T.hasPointerCapture(P.pointerId)&&T.releasePointerCapture(P.pointerId),document.body.style.webkitUserSelect=x.current,m.viewport&&(m.viewport.style.scrollBehavior=""),v.current=null})})})}),Ff="ScrollAreaThumb",ux=ne.forwardRef((e,t)=>{let{forceMount:o,...r}=e,a=NM(Ff,e.__scopeScrollArea);return(0,Ee.jsx)(Oe,{present:o||a.hasThumb,children:(0,Ee.jsx)(pU,{ref:t,...r})})}),pU=ne.forwardRef((e,t)=>{let{__scopeScrollArea:o,style:r,...a}=e,n=Vo(Ff,o),s=NM(Ff,o),{onThumbPositionChange:i}=s,l=ee(t,d=>s.onThumbChange(d)),u=ne.useRef(void 0),c=Bf(()=>{u.current&&(u.current(),u.current=void 0)},100);return ne.useEffect(()=>{let d=n.viewport;if(d){let f=()=>{if(c(),!u.current){let m=xU(d,i);u.current=m,i()}};return i(),d.addEventListener("scroll",f),()=>d.removeEventListener("scroll",f)}},[n.viewport,c,i]),(0,Ee.jsx)(H.div,{"data-state":s.hasThumb?"visible":"hidden",...a,ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:V(e.onPointerDownCapture,d=>{let m=d.target.getBoundingClientRect(),p=d.clientX-m.left,g=d.clientY-m.top;s.onThumbPointerDown({x:p,y:g})}),onPointerUp:V(e.onPointerUp,s.onThumbPointerUp)})});ux.displayName=Ff;var cx="ScrollAreaCorner",OM=ne.forwardRef((e,t)=>{let o=Vo(cx,e.__scopeScrollArea),r=!!(o.scrollbarX&&o.scrollbarY);return o.type!=="scroll"&&r?(0,Ee.jsx)(gU,{...e,ref:t}):null});OM.displayName=cx;var gU=ne.forwardRef((e,t)=>{let{__scopeScrollArea:o,...r}=e,a=Vo(cx,o),[n,s]=ne.useState(0),[i,l]=ne.useState(0),u=!!(n&&i);return Ci(a.scrollbarX,()=>{let c=a.scrollbarX?.offsetHeight||0;a.onCornerHeightChange(c),l(c)}),Ci(a.scrollbarY,()=>{let c=a.scrollbarY?.offsetWidth||0;a.onCornerWidthChange(c),s(c)}),u?(0,Ee.jsx)(H.div,{...r,ref:t,style:{width:n,height:i,position:"absolute",right:a.dir==="ltr"?0:void 0,left:a.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function Of(e){return e?parseInt(e,10):0}function _M(e,t){let o=e/t;return isNaN(o)?0:o}function Vf(e){let t=_M(e.viewport,e.content),o=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-o)*t;return Math.max(r,18)}function hU(e,t,o,r="ltr"){let a=Vf(o),n=a/2,s=t||n,i=a-s,l=o.scrollbar.paddingStart+s,u=o.scrollbar.size-o.scrollbar.paddingEnd-i,c=o.content-o.viewport,d=r==="ltr"?[0,c]:[c*-1,0];return VM([l,u],d)(e)}function PM(e,t,o="ltr"){let r=Vf(t),a=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,n=t.scrollbar.size-a,s=t.content-t.viewport,i=n-r,l=o==="ltr"?[0,s]:[s*-1,0],u=wu(e,l);return VM([0,s],[0,i])(u)}function VM(e,t){return o=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(o-e[0])}}function BM(e,t){return e>0&&e<t}var xU=(e,t=()=>{})=>{let o={left:e.scrollLeft,top:e.scrollTop},r=0;return(function a(){let n={left:e.scrollLeft,top:e.scrollTop},s=o.left!==n.left,i=o.top!==n.top;(s||i)&&t(),o=n,r=window.requestAnimationFrame(a)})(),()=>window.cancelAnimationFrame(r)};function Bf(e,t){let o=Te(e),r=ne.useRef(0);return ne.useEffect(()=>()=>window.clearTimeout(r.current),[]),ne.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(o,t)},[o,t])}function Ci(e,t){let o=Te(t);Le(()=>{let r=0;if(e){let a=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(o)});return a.observe(e),()=>{window.cancelAnimationFrame(r),a.unobserve(e)}}},[e,o])}var dx=kM,HM=DM;var UM=OM;var Ka=b(D()),GM=fx.forwardRef(({className:e,children:t,...o},r)=>(0,Ka.jsxs)(dx,{ref:r,className:S("relative overflow-hidden",e),...o,children:[(0,Ka.jsx)(HM,{className:"h-full w-full rounded-[inherit]",children:t}),(0,Ka.jsx)(mx,{}),(0,Ka.jsx)(UM,{})]}));GM.displayName=dx.displayName;var mx=fx.forwardRef(({className:e,orientation:t="vertical",...o},r)=>(0,Ka.jsx)(_f,{ref:r,orientation:t,className:S("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...o,children:(0,Ka.jsx)(ux,{className:"relative flex-1 rounded-full bg-border"})}));mx.displayName=_f.displayName;var Yt=b(A());var Pu=b(D()),Hf={up:{hidden:{opacity:0,y:50},visible:{opacity:1,y:0}},down:{hidden:{opacity:0,y:-50},visible:{opacity:1,y:0}},left:{hidden:{opacity:0,x:50},visible:{opacity:1,x:0}},right:{hidden:{opacity:0,x:-50},visible:{opacity:1,x:0}},fade:{hidden:{opacity:0},visible:{opacity:1}},scale:{hidden:{opacity:0,scale:.8},visible:{opacity:1,scale:1}},blur:{hidden:{opacity:0,filter:"blur(10px)"},visible:{opacity:1,filter:"blur(0px)"}}},zM=Yt.forwardRef(({children:e,direction:t="up",delay:o=0,duration:r=.6,distance:a=50,threshold:n=.1,triggerOnce:s=!0,stagger:i=0,className:l,variants:u,animate:c=!0,style:d,id:f},m)=>{let p=Up(),g=Yt.useRef(null),h=wd(g,{amount:n,once:s}),v=Yt.useMemo(()=>{if(u)return u;let x=Hf[t]||Hf.up;return{hidden:{...x.hidden,...t==="up"&&{y:a},...t==="down"&&{y:-a},...t==="left"&&{x:a},...t==="right"&&{x:-a}},visible:x.visible}},[t,a,u]);return Yt.useEffect(()=>{c&&(h?p.start("visible"):s||p.start("hidden"))},[h,p,s,c]),Yt.useImperativeHandle(m,()=>g.current),c?(0,Pu.jsx)(Ae.div,{ref:g,variants:v,initial:"hidden",animate:p,transition:{duration:r,delay:o+i,ease:"easeOut"},className:S(l),style:d,id:f,children:e}):(0,Pu.jsx)("div",{ref:g,className:l,style:d,id:f,children:e})});zM.displayName="ScrollReveal";var qM=Yt.forwardRef(({children:e,stagger:t=.1,className:o,style:r,id:a},n)=>{let s=Yt.useRef(null),i=wd(s,{amount:.1,once:!0});return Yt.useImperativeHandle(n,()=>s.current),(0,Pu.jsx)(Ae.div,{ref:s,initial:"hidden",animate:i?"visible":"hidden",variants:{hidden:{},visible:{transition:{staggerChildren:t}}},className:S(o),style:r,id:a,children:e})});qM.displayName="ScrollRevealContainer";var WM=Yt.forwardRef(({children:e,direction:t="up",duration:o=.6,distance:r=50,className:a,variants:n,style:s,id:i},l)=>{let u=Yt.useMemo(()=>{if(n)return n;let c=Hf[t]||Hf.up;return{hidden:{...c.hidden,...t==="up"&&{y:r},...t==="down"&&{y:-r},...t==="left"&&{x:r},...t==="right"&&{x:-r}},visible:c.visible}},[t,r,n]);return(0,Pu.jsx)(Ae.div,{ref:l,variants:u,transition:{duration:o,ease:"easeOut"},className:S(a),style:s,id:i,children:e})});WM.displayName="ScrollRevealItem";var YM=b(A());var jM=b(A(),1);var KM=b(D(),1),yU="Separator",$M="horizontal",bU=["horizontal","vertical"],XM=jM.forwardRef((e,t)=>{let{decorative:o,orientation:r=$M,...a}=e,n=CU(r)?r:$M,i=o?{role:"none"}:{"aria-orientation":n==="vertical"?n:void 0,role:"separator"};return(0,KM.jsx)(H.div,{"data-orientation":n,...i,...a,ref:t})});XM.displayName=yU;function CU(e){return bU.includes(e)}var px=XM;var ZM=b(D()),SU=te("shrink-0 bg-border",{variants:{orientation:{horizontal:"h-[1px] w-full",vertical:"h-full w-[1px]"},variant:{default:"bg-border",dashed:"border-dashed border-border bg-transparent",dotted:"border-dotted border-border bg-transparent",gradient:"bg-gradient-to-r from-transparent via-border to-transparent"},size:{sm:"",md:"",lg:""}},compoundVariants:[{orientation:"horizontal",variant:"dashed",className:"border-t h-0"},{orientation:"vertical",variant:"dashed",className:"border-l w-0"},{orientation:"horizontal",variant:"dotted",className:"border-t h-0"},{orientation:"vertical",variant:"dotted",className:"border-l w-0"},{orientation:"horizontal",size:"sm",variant:["dashed","dotted"],className:"border-t-[0.5px]"},{orientation:"horizontal",size:"lg",variant:["dashed","dotted"],className:"border-t-2"},{orientation:"vertical",size:"sm",variant:["dashed","dotted"],className:"border-l-[0.5px]"},{orientation:"vertical",size:"lg",variant:["dashed","dotted"],className:"border-l-2"},{orientation:"horizontal",size:"sm",variant:["default","gradient"],className:"h-[0.5px]"},{orientation:"horizontal",size:"lg",variant:["default","gradient"],className:"h-[2px]"},{orientation:"vertical",size:"sm",variant:["default","gradient"],className:"w-[0.5px]"},{orientation:"vertical",size:"lg",variant:["default","gradient"],className:"w-[2px]"}],defaultVariants:{orientation:"horizontal",variant:"default",size:"md"}}),Bo=YM.forwardRef(({className:e,orientation:t="horizontal",variant:o="default",size:r="md",decorative:a=!0,...n},s)=>(0,ZM.jsx)(px,{ref:s,decorative:a,orientation:t||void 0,className:S(SU({orientation:t,variant:o,size:r}),e),...n}));Bo.displayName=px.displayName;var qe=b(A());var ok=b(A());var QM=b(A(),1);var JM=b(D(),1),ek="Toggle",tk=QM.forwardRef((e,t)=>{let{pressed:o,defaultPressed:r,onPressedChange:a,...n}=e,[s,i]=Fe({prop:o,onChange:a,defaultProp:r??!1,caller:ek});return(0,JM.jsx)(H.button,{type:"button","aria-pressed":s,"data-state":s?"on":"off","data-disabled":e.disabled?"":void 0,...n,ref:t,onClick:V(e.onClick,()=>{e.disabled||i(!s)})})});tk.displayName=ek;var gx=tk;var ak=b(D()),rk=te("inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent hover:bg-accent hover:text-accent-foreground"},size:{default:"h-10 px-3",sm:"h-9 px-2.5",lg:"h-11 px-5"}},defaultVariants:{variant:"default",size:"default"}}),Uf=ok.forwardRef(({className:e,variant:t,size:o,...r},a)=>(0,ak.jsx)(gx,{ref:a,className:S("moonui-theme",rk({variant:t,size:o,className:e})),...r}));Uf.displayName=gx.displayName;var qf=b(A());var xe=b(A(),1);var lt=b(D(),1),[Gf,wme]=Re("Tooltip",[No]),zf=No(),nk="TooltipProvider",IU=700,hx="tooltip.open",[LU,vx]=Gf(nk),sk=e=>{let{__scopeTooltip:t,delayDuration:o=IU,skipDelayDuration:r=300,disableHoverableContent:a=!1,children:n}=e,s=xe.useRef(!0),i=xe.useRef(!1),l=xe.useRef(0);return xe.useEffect(()=>{let u=l.current;return()=>window.clearTimeout(u)},[]),(0,lt.jsx)(LU,{scope:t,isOpenDelayedRef:s,delayDuration:o,onOpen:xe.useCallback(()=>{window.clearTimeout(l.current),s.current=!1},[]),onClose:xe.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>s.current=!0,r)},[r]),isPointerInTransitRef:i,onPointerInTransitChange:xe.useCallback(u=>{i.current=u},[]),disableHoverableContent:a,children:n})};sk.displayName=nk;var Tu="Tooltip",[PU,Mu]=Gf(Tu),ik=e=>{let{__scopeTooltip:t,children:o,open:r,defaultOpen:a,onOpenChange:n,disableHoverableContent:s,delayDuration:i}=e,l=vx(Tu,e.__scopeTooltip),u=zf(t),[c,d]=xe.useState(null),f=Pe(),m=xe.useRef(0),p=s??l.disableHoverableContent,g=i??l.delayDuration,h=xe.useRef(!1),[v,x]=Fe({prop:r,defaultProp:a??!1,onChange:I=>{I?(l.onOpen(),document.dispatchEvent(new CustomEvent(hx))):l.onClose(),n?.(I)},caller:Tu}),y=xe.useMemo(()=>v?h.current?"delayed-open":"instant-open":"closed",[v]),R=xe.useCallback(()=>{window.clearTimeout(m.current),m.current=0,h.current=!1,x(!0)},[x]),C=xe.useCallback(()=>{window.clearTimeout(m.current),m.current=0,x(!1)},[x]),w=xe.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{h.current=!0,x(!0),m.current=0},g)},[g,x]);return xe.useEffect(()=>()=>{m.current&&(window.clearTimeout(m.current),m.current=0)},[]),(0,lt.jsx)(qr,{...u,children:(0,lt.jsx)(PU,{scope:t,contentId:f,open:v,stateAttribute:y,trigger:c,onTriggerChange:d,onTriggerEnter:xe.useCallback(()=>{l.isOpenDelayedRef.current?w():R()},[l.isOpenDelayedRef,w,R]),onTriggerLeave:xe.useCallback(()=>{p?C():(window.clearTimeout(m.current),m.current=0)},[C,p]),onOpen:R,onClose:C,disableHoverableContent:p,children:o})})};ik.displayName=Tu;var xx="TooltipTrigger",lk=xe.forwardRef((e,t)=>{let{__scopeTooltip:o,...r}=e,a=Mu(xx,o),n=vx(xx,o),s=zf(o),i=xe.useRef(null),l=ee(t,i,a.onTriggerChange),u=xe.useRef(!1),c=xe.useRef(!1),d=xe.useCallback(()=>u.current=!1,[]);return xe.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),(0,lt.jsx)(Wr,{asChild:!0,...s,children:(0,lt.jsx)(H.button,{"aria-describedby":a.open?a.contentId:void 0,"data-state":a.stateAttribute,...r,ref:l,onPointerMove:V(e.onPointerMove,f=>{f.pointerType!=="touch"&&!c.current&&!n.isPointerInTransitRef.current&&(a.onTriggerEnter(),c.current=!0)}),onPointerLeave:V(e.onPointerLeave,()=>{a.onTriggerLeave(),c.current=!1}),onPointerDown:V(e.onPointerDown,()=>{a.open&&a.onClose(),u.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:V(e.onFocus,()=>{u.current||a.onOpen()}),onBlur:V(e.onBlur,a.onClose),onClick:V(e.onClick,a.onClose)})})});lk.displayName=xx;var yx="TooltipPortal",[TU,MU]=Gf(yx,{forceMount:void 0}),kU=e=>{let{__scopeTooltip:t,forceMount:o,children:r,container:a}=e,n=Mu(yx,t);return(0,lt.jsx)(TU,{scope:t,forceMount:o,children:(0,lt.jsx)(Oe,{present:o||n.open,children:(0,lt.jsx)(ho,{asChild:!0,container:a,children:r})})})};kU.displayName=yx;var wi="TooltipContent",uk=xe.forwardRef((e,t)=>{let o=MU(wi,e.__scopeTooltip),{forceMount:r=o.forceMount,side:a="top",...n}=e,s=Mu(wi,e.__scopeTooltip);return(0,lt.jsx)(Oe,{present:r||s.open,children:s.disableHoverableContent?(0,lt.jsx)(ck,{side:a,...n,ref:t}):(0,lt.jsx)(AU,{side:a,...n,ref:t})})}),AU=xe.forwardRef((e,t)=>{let o=Mu(wi,e.__scopeTooltip),r=vx(wi,e.__scopeTooltip),a=xe.useRef(null),n=ee(t,a),[s,i]=xe.useState(null),{trigger:l,onClose:u}=o,c=a.current,{onPointerInTransitChange:d}=r,f=xe.useCallback(()=>{i(null),d(!1)},[d]),m=xe.useCallback((p,g)=>{let h=p.currentTarget,v={x:p.clientX,y:p.clientY},x=FU(v,h.getBoundingClientRect()),y=OU(v,x),R=_U(g.getBoundingClientRect()),C=BU([...y,...R]);i(C),d(!0)},[d]);return xe.useEffect(()=>()=>f(),[f]),xe.useEffect(()=>{if(l&&c){let p=h=>m(h,c),g=h=>m(h,l);return l.addEventListener("pointerleave",p),c.addEventListener("pointerleave",g),()=>{l.removeEventListener("pointerleave",p),c.removeEventListener("pointerleave",g)}}},[l,c,m,f]),xe.useEffect(()=>{if(s){let p=g=>{let h=g.target,v={x:g.clientX,y:g.clientY},x=l?.contains(h)||c?.contains(h),y=!VU(v,s);x?f():y&&(f(),u())};return document.addEventListener("pointermove",p),()=>document.removeEventListener("pointermove",p)}},[l,c,s,u,f]),(0,lt.jsx)(ck,{...e,ref:n})}),[DU,EU]=Gf(Tu,{isInside:!1}),NU=fv("TooltipContent"),ck=xe.forwardRef((e,t)=>{let{__scopeTooltip:o,children:r,"aria-label":a,onEscapeKeyDown:n,onPointerDownOutside:s,...i}=e,l=Mu(wi,o),u=zf(o),{onClose:c}=l;return xe.useEffect(()=>(document.addEventListener(hx,c),()=>document.removeEventListener(hx,c)),[c]),xe.useEffect(()=>{if(l.trigger){let d=f=>{f.target?.contains(l.trigger)&&c()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[l.trigger,c]),(0,lt.jsx)(ko,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:n,onPointerDownOutside:s,onFocusOutside:d=>d.preventDefault(),onDismiss:c,children:(0,lt.jsxs)(Da,{"data-state":l.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:[(0,lt.jsx)(NU,{children:r}),(0,lt.jsx)(DU,{scope:o,isInside:!0,children:(0,lt.jsx)(OT,{id:l.contentId,role:"tooltip",children:a||r})})]})})});uk.displayName=wi;var dk="TooltipArrow",fk=xe.forwardRef((e,t)=>{let{__scopeTooltip:o,...r}=e,a=zf(o);return EU(dk,o).isInside?null:(0,lt.jsx)(Ea,{...a,...r,ref:t})});fk.displayName=dk;function FU(e,t){let o=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),a=Math.abs(t.right-e.x),n=Math.abs(t.left-e.x);switch(Math.min(o,r,a,n)){case n:return"left";case a:return"right";case o:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function OU(e,t,o=5){let r=[];switch(t){case"top":r.push({x:e.x-o,y:e.y+o},{x:e.x+o,y:e.y+o});break;case"bottom":r.push({x:e.x-o,y:e.y-o},{x:e.x+o,y:e.y-o});break;case"left":r.push({x:e.x+o,y:e.y-o},{x:e.x+o,y:e.y+o});break;case"right":r.push({x:e.x-o,y:e.y-o},{x:e.x-o,y:e.y+o});break}return r}function _U(e){let{top:t,right:o,bottom:r,left:a}=e;return[{x:a,y:t},{x:o,y:t},{x:o,y:r},{x:a,y:r}]}function VU(e,t){let{x:o,y:r}=e,a=!1;for(let n=0,s=t.length-1;n<t.length;s=n++){let i=t[n],l=t[s],u=i.x,c=i.y,d=l.x,f=l.y;c>r!=f>r&&o<(d-u)*(r-c)/(f-c)+u&&(a=!a)}return a}function BU(e){let t=e.slice();return t.sort((o,r)=>o.x<r.x?-1:o.x>r.x?1:o.y<r.y?-1:o.y>r.y?1:0),HU(t)}function HU(e){if(e.length<=1)return e.slice();let t=[];for(let r=0;r<e.length;r++){let a=e[r];for(;t.length>=2;){let n=t[t.length-1],s=t[t.length-2];if((n.x-s.x)*(a.y-s.y)>=(n.y-s.y)*(a.x-s.x))t.pop();else break}t.push(a)}t.pop();let o=[];for(let r=e.length-1;r>=0;r--){let a=e[r];for(;o.length>=2;){let n=o[o.length-1],s=o[o.length-2];if((n.x-s.x)*(a.y-s.y)>=(n.y-s.y)*(a.x-s.x))o.pop();else break}o.push(a)}return o.pop(),t.length===1&&o.length===1&&t[0].x===o[0].x&&t[0].y===o[0].y?t:t.concat(o)}var mk=sk,pk=ik,gk=lk;var bx=uk,Cx=fk;var Xa=b(D()),wx=mk,GU=te("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",{variants:{variant:{default:"bg-primary text-primary-foreground",secondary:"bg-secondary text-secondary-foreground",success:"bg-green-500 text-white border-green-600",warning:"bg-yellow-500 text-white border-yellow-600",destructive:"bg-destructive text-destructive-foreground",info:"bg-blue-500 text-white border-blue-600"},size:{sm:"px-2 py-1 text-xs",md:"px-3 py-1.5 text-sm",lg:"px-4 py-2 text-base"}},defaultVariants:{variant:"default",size:"md"}}),Wf=pk,$f=gk,hk=qf.forwardRef(({className:e,...t},o)=>(0,Xa.jsx)(Cx,{ref:o,className:S("moonui-theme","fill-current",e),...t}));hk.displayName=Cx.displayName;var ku=qf.forwardRef(({className:e,variant:t,size:o,showArrow:r=!1,sideOffset:a=4,...n},s)=>(0,Xa.jsxs)(bx,{ref:s,sideOffset:a,className:S("moonui-theme",GU({variant:t,size:o}),e),...n,children:[n.children,r&&(0,Xa.jsx)(hk,{})]}));ku.displayName=bx.displayName;var zU=qf.forwardRef(({children:e,content:t,variant:o="default",size:r="md",side:a="top",align:n="center",delayDuration:s=400,sideOffset:i=4,showArrow:l=!1,className:u,open:c,defaultOpen:d,onOpenChange:f,...m},p)=>(0,Xa.jsxs)(Wf,{open:c,defaultOpen:d,onOpenChange:f,delayDuration:s,children:[(0,Xa.jsx)($f,{asChild:!0,children:e}),(0,Xa.jsx)(ku,{ref:p,side:a,align:n,variant:o,size:r,sideOffset:i,showArrow:l,className:u,...m,children:t})]}));zU.displayName="SimpleTooltip";var U=b(D()),ht=({icon:e,tooltip:t,active:o,onClick:r,disabled:a})=>(0,U.jsxs)(Wf,{children:[(0,U.jsx)($f,{asChild:!0,children:(0,U.jsx)(Uf,{pressed:o,onPressedChange:()=>r(),disabled:a,className:"h-8 w-8 p-0",children:e})}),(0,U.jsx)(ku,{children:(0,U.jsx)("p",{children:t})})]}),qU=({onColorSelect:e})=>(0,U.jsx)("div",{className:"grid grid-cols-4 gap-1 p-2",children:["#000000","#374151","#6B7280","#9CA3AF","#EF4444","#F59E0B","#EAB308","#22C55E","#3B82F6","#6366F1","#8B5CF6","#EC4899"].map(o=>(0,U.jsx)("button",{className:"w-6 h-6 rounded border-2 border-gray-200 hover:border-gray-400",style:{backgroundColor:o},onClick:()=>e(o)},o))}),xk=qe.default.forwardRef(({value:e="",onChange:t,placeholder:o="Start writing...",disabled:r=!1,className:a,minHeight:n=200,maxHeight:s=500,showToolbar:i=!0,showPreview:l=!0,...u},c)=>{let[d,f]=(0,qe.useState)(e),[m,p]=(0,qe.useState)(!1),[g,h]=(0,qe.useState)(e),[v,x]=(0,qe.useState)(null),y=qe.default.useRef(null),R=qe.default.useRef(null),[C,w]=(0,qe.useState)({bold:!1,italic:!1,underline:!1,strikethrough:!1,alignLeft:!0,alignCenter:!1,alignRight:!1,alignJustify:!1,orderedList:!1,unorderedList:!1,quote:!1,code:!1}),I=(0,qe.useCallback)(k=>{f(k),t?.(k)},[t]),L=(0,qe.useCallback)(()=>{let k=window.getSelection();return k&&k.rangeCount>0?k.getRangeAt(0):null},[]),P=(0,qe.useCallback)(k=>{if(!k)return;let re=window.getSelection();re&&(re.removeAllRanges(),re.addRange(k))},[]),T=(0,qe.useCallback)((k,re)=>{if(r)return;y.current&&y.current.focus();let Se=L();if(document.execCommand(k,!1,re)||console.warn(`Command '${k}' failed to execute`),y.current){let j=y.current.innerHTML;I(j)}w({bold:document.queryCommandState("bold"),italic:document.queryCommandState("italic"),underline:document.queryCommandState("underline"),strikethrough:document.queryCommandState("strikeThrough"),alignLeft:document.queryCommandState("justifyLeft"),alignCenter:document.queryCommandState("justifyCenter"),alignRight:document.queryCommandState("justifyRight"),alignJustify:document.queryCommandState("justifyFull"),orderedList:document.queryCommandState("insertOrderedList"),unorderedList:document.queryCommandState("insertUnorderedList"),quote:document.queryCommandState("formatBlock"),code:document.queryCommandState("formatBlock")}),y.current&&y.current.focus()},[r,L,I]),O=(0,qe.useCallback)(k=>{let re=k.currentTarget.innerHTML;I(re)},[I]),$=(0,qe.useCallback)(k=>{if(k.ctrlKey||k.metaKey)switch(k.key){case"b":k.preventDefault(),T("bold");break;case"i":k.preventDefault(),T("italic");break;case"u":k.preventDefault(),T("underline");break;case"z":k.preventDefault(),k.shiftKey?T("redo"):T("undo");break}k.key==="Tab"&&(k.preventDefault(),T("insertHTML"," "))},[T]),W=(0,qe.useCallback)(()=>{let k=prompt("Enter URL:");k&&T("createLink",k)},[T]),N=(0,qe.useCallback)(()=>{let k=prompt("Enter image URL:");k&&T("insertImage",k)},[T]),q=(0,qe.useCallback)(k=>{T("formatBlock",`<h${k}>`)},[T]),E=(0,qe.useCallback)(k=>{let re=window.getSelection();if(re&&re.rangeCount>0){let Se=re.getRangeAt(0),F=document.createElement("span");F.style.color=k;try{Se.surroundContents(F)}catch{T("foreColor",k)}if(y.current){let j=y.current.innerHTML;I(j)}}},[T,I]),G=k=>{if(typeof window>"u")return k.replace(/<[^>]*>/g,"").replace(/ /g," ").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/'/g,"'");let re=document.createElement("div");return re.innerHTML=k,re.textContent||re.innerText||""};qe.default.useEffect(()=>{y.current&&d&&d!==y.current.innerHTML&&(y.current.innerHTML=d)},[d]),qe.default.useEffect(()=>{e!==void 0&&e!==d&&(f(e),h(e))},[e,d]);let M=i&&(0,U.jsx)(wx,{children:(0,U.jsxs)(Ae.div,{className:"flex items-center gap-1 p-2 border-b bg-gray-50/50 dark:bg-zinc-800/50 backdrop-blur-sm",initial:{opacity:0,y:-10},animate:{opacity:1,y:0},children:[!m&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)("div",{className:"flex items-center gap-1",children:[(0,U.jsx)(ht,{icon:(0,U.jsx)(Ai,{className:"h-3 w-3"}),tooltip:"Bold (Ctrl+B)",active:C.bold,onClick:()=>T("bold"),disabled:r}),(0,U.jsx)(ht,{icon:(0,U.jsx)(Ui,{className:"h-3 w-3"}),tooltip:"Italic (Ctrl+I)",active:C.italic,onClick:()=>T("italic"),disabled:r}),(0,U.jsx)(ht,{icon:(0,U.jsx)(Zi,{className:"h-3 w-3"}),tooltip:"Underline (Ctrl+U)",active:C.underline,onClick:()=>T("underline"),disabled:r}),(0,U.jsx)(ht,{icon:(0,U.jsx)(Yi,{className:"h-3 w-3"}),tooltip:"Strikethrough",active:C.strikethrough,onClick:()=>T("strikeThrough"),disabled:r})]}),(0,U.jsx)(Bo,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),(0,U.jsxs)(vi,{onValueChange:k=>{k.startsWith("h")?q(k.substring(1)):k==="normal"?T("formatBlock","p"):T("fontSize",k)},disabled:r,children:[(0,U.jsx)(yi,{className:"w-24 h-8",children:(0,U.jsx)(Iu,{placeholder:"Size"})}),(0,U.jsxs)(bi,{children:[(0,U.jsx)(Xt,{value:"1",children:"Small"}),(0,U.jsx)(Xt,{value:"3",children:"Normal"}),(0,U.jsx)(Xt,{value:"5",children:"Large"}),(0,U.jsx)(Xt,{value:"7",children:"X-Large"}),(0,U.jsx)(Bo,{className:"my-1"}),(0,U.jsx)(Xt,{value:"h1",children:"Heading 1"}),(0,U.jsx)(Xt,{value:"h2",children:"Heading 2"}),(0,U.jsx)(Xt,{value:"h3",children:"Heading 3"}),(0,U.jsx)(Xt,{value:"h4",children:"Heading 4"}),(0,U.jsx)(Xt,{value:"h5",children:"Heading 5"}),(0,U.jsx)(Xt,{value:"h6",children:"Heading 6"})]})]}),(0,U.jsx)(Bo,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),(0,U.jsxs)("div",{className:"flex items-center gap-1",children:[(0,U.jsx)(ht,{icon:(0,U.jsx)(Mi,{className:"h-3 w-3"}),tooltip:"Align Left",active:C.alignLeft,onClick:()=>T("justifyLeft"),disabled:r}),(0,U.jsx)(ht,{icon:(0,U.jsx)(Pi,{className:"h-3 w-3"}),tooltip:"Align Center",active:C.alignCenter,onClick:()=>T("justifyCenter"),disabled:r}),(0,U.jsx)(ht,{icon:(0,U.jsx)(ki,{className:"h-3 w-3"}),tooltip:"Align Right",active:C.alignRight,onClick:()=>T("justifyRight"),disabled:r}),(0,U.jsx)(ht,{icon:(0,U.jsx)(Ti,{className:"h-3 w-3"}),tooltip:"Justify",active:C.alignJustify,onClick:()=>T("justifyFull"),disabled:r})]}),(0,U.jsx)(Bo,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),(0,U.jsxs)("div",{className:"flex items-center gap-1",children:[(0,U.jsx)(ht,{icon:(0,U.jsx)(qi,{className:"h-3 w-3"}),tooltip:"Bullet List",active:C.unorderedList,onClick:()=>T("insertUnorderedList"),disabled:r}),(0,U.jsx)(ht,{icon:(0,U.jsx)(zi,{className:"h-3 w-3"}),tooltip:"Numbered List",active:C.orderedList,onClick:()=>T("insertOrderedList"),disabled:r}),(0,U.jsx)(ht,{icon:(0,U.jsx)(Ki,{className:"h-3 w-3"}),tooltip:"Quote",active:C.quote,onClick:()=>T("formatBlock","blockquote"),disabled:r}),(0,U.jsx)(ht,{icon:(0,U.jsx)(Ni,{className:"h-3 w-3"}),tooltip:"Code Block",active:C.code,onClick:()=>T("formatBlock","pre"),disabled:r})]}),(0,U.jsx)(Bo,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),(0,U.jsxs)("div",{className:"flex items-center gap-1",children:[(0,U.jsx)(ht,{icon:(0,U.jsx)("span",{className:"text-xs font-mono",children:"\u2190"}),tooltip:"Decrease Indent",onClick:()=>T("outdent"),disabled:r}),(0,U.jsx)(ht,{icon:(0,U.jsx)("span",{className:"text-xs font-mono",children:"\u2192"}),tooltip:"Increase Indent",onClick:()=>T("indent"),disabled:r})]}),(0,U.jsx)(Bo,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),(0,U.jsxs)("div",{className:"flex items-center gap-1",children:[(0,U.jsx)(ht,{icon:(0,U.jsx)(Gi,{className:"h-3 w-3"}),tooltip:"Insert Link",onClick:W,disabled:r}),(0,U.jsx)(ht,{icon:(0,U.jsx)(on,{className:"h-3 w-3"}),tooltip:"Insert Image",onClick:N,disabled:r})]}),(0,U.jsx)(Bo,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),(0,U.jsxs)(jr,{children:[(0,U.jsx)(Kr,{asChild:!0,children:(0,U.jsx)(Ve,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",disabled:r,title:"Text Color",children:(0,U.jsx)(ls,{className:"h-3 w-3"})})}),(0,U.jsx)(br,{className:"w-auto p-0",children:(0,U.jsx)(qU,{onColorSelect:E})})]}),(0,U.jsx)(Bo,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),(0,U.jsxs)("div",{className:"flex items-center gap-1",children:[(0,U.jsx)(ht,{icon:(0,U.jsx)(Qi,{className:"h-3 w-3"}),tooltip:"Undo (Ctrl+Z)",onClick:()=>T("undo"),disabled:r}),(0,U.jsx)(ht,{icon:(0,U.jsx)(Xi,{className:"h-3 w-3"}),tooltip:"Redo (Ctrl+Shift+Z)",onClick:()=>T("redo"),disabled:r})]})]}),l&&(0,U.jsxs)(U.Fragment,{children:[!m&&(0,U.jsx)(Bo,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),(0,U.jsx)(ht,{icon:m?(0,U.jsx)(Jt,{className:"h-3 w-3"}):(0,U.jsx)(tn,{className:"h-3 w-3"}),tooltip:m?"Edit Mode":"View Source Code",active:m,onClick:()=>{m?I(g):h(d),p(!m)},disabled:r})]})]})});return(0,U.jsxs)("div",{ref:c,className:S("border border-gray-200 dark:border-zinc-700 rounded-lg overflow-hidden focus-within:ring-2 focus-within:ring-ring focus-within:border-transparent",r&&"opacity-50 cursor-not-allowed",a),...u,children:[M,(0,U.jsxs)("div",{className:"relative",children:[m?(0,U.jsx)(Ae.div,{initial:{opacity:0},animate:{opacity:1},className:"bg-slate-50 dark:bg-zinc-900/95",style:{minHeight:n,maxHeight:s,overflow:"auto"},children:(0,U.jsx)("textarea",{ref:R,value:g,onChange:k=>h(k.target.value),className:"w-full h-full bg-transparent p-4 font-mono text-sm text-gray-900 dark:text-gray-100 resize-none focus:outline-none",style:{minHeight:n-32},disabled:r,placeholder:"HTML source code..."})}):(0,U.jsx)(Ae.div,{ref:y,contentEditable:!r,suppressContentEditableWarning:!0,className:S("p-4 outline-none prose prose-sm dark:prose-invert max-w-none overflow-y-auto","bg-slate-50 dark:bg-zinc-900/95","text-gray-900 dark:text-gray-100","focus:ring-0","[&_h1]:text-3xl [&_h1]:font-bold [&_h1]:mb-4","[&_h2]:text-2xl [&_h2]:font-bold [&_h2]:mb-3","[&_h3]:text-xl [&_h3]:font-bold [&_h3]:mb-2","[&_h4]:text-lg [&_h4]:font-bold [&_h4]:mb-2","[&_h5]:text-base [&_h5]:font-bold [&_h5]:mb-1","[&_h6]:text-sm [&_h6]:font-bold [&_h6]:mb-1","[&_ul]:list-disc [&_ul]:pl-6 [&_ul]:mb-4","[&_ol]:list-decimal [&_ol]:pl-6 [&_ol]:mb-4","[&_li]:mb-1","[&_blockquote]:border-l-4 [&_blockquote]:border-gray-300 [&_blockquote]:pl-4 [&_blockquote]:italic","[&_pre]:bg-gray-100 [&_pre]:dark:bg-gray-800 [&_pre]:p-4 [&_pre]:rounded [&_pre]:overflow-x-auto"),style:{minHeight:n,maxHeight:s},onInput:O,onKeyDown:$,"data-placeholder":o,initial:{opacity:0},animate:{opacity:1}}),!d&&!m&&(0,U.jsx)("div",{className:"absolute top-4 left-4 text-muted-foreground pointer-events-none",style:{fontSize:"16px"},children:o})]}),(0,U.jsx)("div",{className:"px-4 py-2 border-t bg-gray-50/50 dark:bg-zinc-800/50 backdrop-blur-sm text-xs text-gray-600 dark:text-gray-400",children:(0,U.jsx)(WU,{content:d})})]})});xk.displayName="SimpleEditor";var WU=({content:e})=>{let[t,o]=(0,qe.useState)(0);return(0,qe.useEffect)(()=>{o((a=>{let n=document.createElement("div");return n.innerHTML=a,n.textContent||n.innerText||""})(e).length)},[e]),(0,U.jsxs)(U.Fragment,{children:[t," characters"]})};var Au=b(A());var Ct=b(D()),vk=te("animate-pulse rounded-md",{variants:{variant:{default:"bg-muted",primary:"bg-primary/10",secondary:"bg-secondary/10",accent:"bg-accent"},size:{default:"",sm:"scale-90",lg:"scale-110"},shape:{rect:"rounded-md",circle:"rounded-full",pill:"rounded-full"},animation:{pulse:"animate-pulse",wave:"overflow-hidden relative after:absolute after:inset-0 after:-translate-x-full after:animate-[shimmer_2s_infinite] after:bg-gradient-to-r after:from-transparent after:via-white/10 after:to-transparent dark:after:via-white/5",none:"animate-none"}},defaultVariants:{variant:"default",size:"default",shape:"rect",animation:"pulse"}}),Ya=Au.forwardRef(({className:e,variant:t,size:o,shape:r,animation:a,height:n,width:s,isLoaded:i=!1,children:l,fadeInDuration:u=400,motion:c=!1,style:d,...f},m)=>{let{onDrag:p,onDragEnd:g,onDragStart:h,onAnimationStart:v,onAnimationEnd:x,onAnimationIteration:y,...R}=f;if(i&&l)return c?(0,Ct.jsx)(Ae.div,{ref:m,initial:{opacity:0},animate:{opacity:1},transition:{duration:u/1e3},className:S("moonui-theme",e),style:{height:n,width:s,...d},...R,children:l}):(0,Ct.jsx)("div",{ref:m,className:S("moonui-theme","animate-fade-in",e),style:{animationDuration:`${u}ms`,height:n,width:s,...d},...f,children:l});let C=c?Ae.div:"div";return(0,Ct.jsx)(C,{ref:m,className:S("moonui-theme",vk({variant:t,size:o,shape:r,animation:a}),"relative isolate",e),style:{height:n,width:s,...d},...c?f0:{},...R})});Ya.displayName="Skeleton";var Sx=Au.forwardRef(({className:e,lines:t=3,lineHeight:o="0.85rem",spacing:r="0.5rem",lastLineWidth:a=80,randomWidths:n=!1,variant:s="default",animation:i="pulse",...l},u)=>(0,Ct.jsx)("div",{ref:u,className:S("moonui-theme","flex flex-col",e),style:{gap:r},...l,children:Array.from({length:t}).map((c,d)=>{let m=d===t-1?a:n?85+d%3*5:100;return(0,Ct.jsx)(Ya,{variant:s,animation:i,className:"w-full",style:{height:o,width:`${m}%`}},d)})}));Sx.displayName="SkeletonText";var Rx=Au.forwardRef(({className:e,size:t="2.5rem",variant:o="default",animation:r="pulse",...a},n)=>(0,Ct.jsx)(Ya,{ref:n,variant:o,animation:r,shape:"circle",className:S("moonui-theme","shrink-0",e),style:{height:t,width:t},...a}));Rx.displayName="SkeletonAvatar";var yk=Au.forwardRef(({className:e,showHeader:t=!0,contentLines:o=3,showFooter:r=!0,variant:a="default",animation:n="pulse",...s},i)=>(0,Ct.jsxs)("div",{ref:i,className:S("overflow-hidden rounded-md border border-border bg-background p-4",e),...s,children:[t&&(0,Ct.jsxs)("div",{className:"mb-4 flex items-center gap-4",children:[(0,Ct.jsx)(Rx,{size:"2.5rem",variant:a,animation:n}),(0,Ct.jsxs)("div",{className:"flex-1",children:[(0,Ct.jsx)(Ya,{variant:a,animation:n,className:"mb-2 h-4 w-1/3"}),(0,Ct.jsx)(Ya,{variant:a,animation:n,className:"h-3 w-1/4"})]})]}),(0,Ct.jsx)(Sx,{lines:o,variant:a,animation:n,className:"mb-4"}),r&&(0,Ct.jsxs)("div",{className:"flex items-center justify-between mt-4 pt-4 border-t border-border",children:[(0,Ct.jsx)(Ya,{variant:a,animation:n,className:"h-4 w-1/4"}),(0,Ct.jsx)(Ya,{variant:a,animation:n,className:"h-4 w-1/5"})]})]}));yk.displayName="SkeletonCard";var Si=b(A());var Ck=b(D()),bk=Si.forwardRef(({className:e,children:t,onSwipeLeft:o,onSwipeRight:r,threshold:a=100,disabled:n=!1,...s},i)=>{let[l,u]=Si.useState(0),[c,d]=Si.useState(0),[f,m]=Si.useState(!1),p=v=>{n||(u(v.touches[0].clientX),m(!0))},g=v=>{n||!f||d(v.touches[0].clientX)},h=()=>{if(n||!f)return;let v=c-l;Math.abs(v)>a&&(v>0&&r?r():v<0&&o&&o()),m(!1),d(0),u(0)};return(0,Ck.jsx)("div",{ref:i,className:S("touch-pan-y select-none transition-transform duration-200",f&&"cursor-grabbing",e),onTouchStart:p,onTouchMove:g,onTouchEnd:h,...s,children:t})});bk.displayName="SwipeableCard";var Tk=b(A());var sr=b(A(),1);var Xn=b(D(),1),jf="Switch",[$U,Zme]=Re(jf),[jU,KU]=$U(jf),wk=sr.forwardRef((e,t)=>{let{__scopeSwitch:o,name:r,checked:a,defaultChecked:n,required:s,disabled:i,value:l="on",onCheckedChange:u,form:c,...d}=e,[f,m]=sr.useState(null),p=ee(t,y=>m(y)),g=sr.useRef(!1),h=f?c||!!f.closest("form"):!0,[v,x]=Fe({prop:a,defaultProp:n??!1,onChange:u,caller:jf});return(0,Xn.jsxs)(jU,{scope:o,checked:v,disabled:i,children:[(0,Xn.jsx)(H.button,{type:"button",role:"switch","aria-checked":v,"aria-required":s,"data-state":Lk(v),"data-disabled":i?"":void 0,disabled:i,value:l,...d,ref:p,onClick:V(e.onClick,y=>{x(R=>!R),h&&(g.current=y.isPropagationStopped(),g.current||y.stopPropagation())})}),h&&(0,Xn.jsx)(Ik,{control:f,bubbles:!g.current,name:r,value:l,checked:v,required:s,disabled:i,form:c,style:{transform:"translateX(-100%)"}})]})});wk.displayName=jf;var Sk="SwitchThumb",Rk=sr.forwardRef((e,t)=>{let{__scopeSwitch:o,...r}=e,a=KU(Sk,o);return(0,Xn.jsx)(H.span,{"data-state":Lk(a.checked),"data-disabled":a.disabled?"":void 0,...r,ref:t})});Rk.displayName=Sk;var XU="SwitchBubbleInput",Ik=sr.forwardRef(({__scopeSwitch:e,control:t,checked:o,bubbles:r=!0,...a},n)=>{let s=sr.useRef(null),i=ee(s,n),l=Xs(o),u=Ys(t);return sr.useEffect(()=>{let c=s.current;if(!c)return;let d=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(d,"checked").set;if(l!==o&&m){let p=new Event("click",{bubbles:r});m.call(c,o),c.dispatchEvent(p)}},[l,o,r]),(0,Xn.jsx)("input",{type:"checkbox","aria-hidden":!0,defaultChecked:o,...a,tabIndex:-1,ref:i,style:{...a.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Ik.displayName=XU;function Lk(e){return e?"checked":"unchecked"}var Ix=wk,Pk=Rk;var Rr=b(D()),Mk=Tk.forwardRef(({className:e,size:t="md",variant:o="primary",loading:r,leftIcon:a,rightIcon:n,description:s,...i},l)=>(0,Rr.jsxs)("div",{className:"moonui-theme inline-flex items-center gap-2",children:[a&&(0,Rr.jsx)("span",{className:"text-muted-foreground",children:a}),(0,Rr.jsxs)(Ix,{className:S("peer relative inline-flex shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 dark:data-[state=unchecked]:bg-gray-700/70 dark:focus-visible:ring-primary/40 dark:focus-visible:ring-offset-gray-950",t==="sm"&&"h-4 w-8",t==="md"&&"h-6 w-11",t==="lg"&&"h-7 w-14",o==="primary"&&"data-[state=checked]:bg-primary",o==="success"&&"data-[state=checked]:bg-success",o==="warning"&&"data-[state=checked]:bg-warning",o==="danger"&&"data-[state=checked]:bg-error",o==="secondary"&&"data-[state=checked]:bg-accent","data-[state=unchecked]:bg-input",r&&"opacity-80 cursor-wait",e),disabled:r||i.disabled,...i,ref:l,children:[r?(0,Rr.jsx)("div",{className:"absolute inset-0 flex items-center justify-center",children:(0,Rr.jsx)("div",{className:"h-3 w-3 animate-spin rounded-full border-2 border-gray-300 border-t-primary"})}):null,(0,Rr.jsx)(Pk,{className:S("pointer-events-none block rounded-full bg-background shadow-lg ring-0 transition-transform",t==="sm"&&"h-3 w-3 data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0",t==="md"&&"h-5 w-5 data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0",t==="lg"&&"h-6 w-6 data-[state=checked]:translate-x-7 data-[state=unchecked]:translate-x-0")})]}),n&&(0,Rr.jsx)("span",{className:"text-muted-foreground",children:n}),s&&(0,Rr.jsx)("span",{className:"text-sm text-muted-foreground",children:s})]}));Mk.displayName=Ix.displayName;var Du=b(A());var Ir=b(D()),kk=Du.forwardRef(({value:e=[],onChange:t,maxTags:o,variant:r="primary",allowDuplicates:a=!1,delimiter:n=",",placeholder:s="Add tag and press Enter",className:i,disabled:l,...u},c)=>{let[d,f]=Du.useState(""),[m,p]=Du.useState(""),g=x=>{x.key==="Enter"||x.key===n?(x.preventDefault(),h()):x.key==="Backspace"&&d===""&&e.length>0&&v(e.length-1)},h=()=>{let x=d.trim();if(x){if(!a&&e.includes(x)){p("This tag already exists"),setTimeout(()=>p(""),2e3);return}if(o&&e.length>=o){p(`Maximum ${o} tags allowed`),setTimeout(()=>p(""),2e3);return}t([...e,x]),f(""),p("")}},v=x=>{l||t(e.filter((y,R)=>R!==x))};return(0,Ir.jsxs)("div",{className:"relative",children:[(0,Ir.jsxs)("div",{className:S("flex min-h-[2.5rem] w-full flex-wrap gap-2 rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background","dark:bg-zinc-950/50 dark:border-zinc-800","focus-within:outline-none focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2",l&&"cursor-not-allowed opacity-50",i),children:[e.map((x,y)=>(0,Ir.jsxs)(fo,{variant:r,className:"gap-1 pr-1.5",children:[(0,Ir.jsx)("span",{className:"text-xs",children:x}),!l&&(0,Ir.jsx)("button",{type:"button",onClick:()=>v(y),className:"ml-1 rounded-full outline-none ring-offset-background focus:ring-2 focus:ring-ring focus:ring-offset-2",children:(0,Ir.jsx)(co,{className:"h-3 w-3 text-muted-foreground hover:text-foreground transition-colors"})})]},y)),(0,Ir.jsx)("input",{ref:c,type:"text",value:d,onChange:x=>f(x.target.value),onKeyDown:g,onBlur:h,disabled:l,placeholder:e.length===0?s:"",className:S("flex-1 bg-transparent outline-none placeholder:text-muted-foreground","dark:placeholder:text-zinc-500","min-w-[120px]",l&&"cursor-not-allowed"),...u})]}),m&&(0,Ir.jsx)("p",{className:"mt-1 text-xs text-destructive",children:m})]})});kk.displayName="TagsInput";var Ak=b(A());var Ek=b(D()),Dk=Ak.forwardRef(({className:e,variant:t,size:o,error:r,success:a,loading:n,autoResize:s,maxHeight:i,characterCount:l,...u},c)=>(0,Ek.jsx)("textarea",{className:S("moonui-theme","flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:c,...u}));Dk.displayName="Textarea";var ir=b(A());var ge=b(A(),1),Fk=b(Jn(),1);var Ne=b(D(),1),kx="ToastProvider",[Ax,ZU,QU]=lr("Toast"),[Ok,xpe]=Re("Toast",[QU]),[JU,Xf]=Ok(kx),_k=e=>{let{__scopeToast:t,label:o="Notification",duration:r=5e3,swipeDirection:a="right",swipeThreshold:n=50,children:s}=e,[i,l]=ge.useState(null),[u,c]=ge.useState(0),d=ge.useRef(!1),f=ge.useRef(!1);return o.trim()||console.error(`Invalid prop \`label\` supplied to \`${kx}\`. Expected non-empty \`string\`.`),(0,Ne.jsx)(Ax.Provider,{scope:t,children:(0,Ne.jsx)(JU,{scope:t,label:o,duration:r,swipeDirection:a,swipeThreshold:n,toastCount:u,viewport:i,onViewportChange:l,onToastAdd:ge.useCallback(()=>c(m=>m+1),[]),onToastRemove:ge.useCallback(()=>c(m=>m-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:f,children:s})})};_k.displayName=kx;var Vk="ToastViewport",e3=["F8"],Px="toast.viewportPause",Tx="toast.viewportResume",Bk=ge.forwardRef((e,t)=>{let{__scopeToast:o,hotkey:r=e3,label:a="Notifications ({hotkey})",...n}=e,s=Xf(Vk,o),i=ZU(o),l=ge.useRef(null),u=ge.useRef(null),c=ge.useRef(null),d=ge.useRef(null),f=ee(t,d,s.onViewportChange),m=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),p=s.toastCount>0;ge.useEffect(()=>{let h=v=>{r.length!==0&&r.every(y=>v[y]||v.code===y)&&d.current?.focus()};return document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)},[r]),ge.useEffect(()=>{let h=l.current,v=d.current;if(p&&h&&v){let x=()=>{if(!s.isClosePausedRef.current){let w=new CustomEvent(Px);v.dispatchEvent(w),s.isClosePausedRef.current=!0}},y=()=>{if(s.isClosePausedRef.current){let w=new CustomEvent(Tx);v.dispatchEvent(w),s.isClosePausedRef.current=!1}},R=w=>{!h.contains(w.relatedTarget)&&y()},C=()=>{h.contains(document.activeElement)||y()};return h.addEventListener("focusin",x),h.addEventListener("focusout",R),h.addEventListener("pointermove",x),h.addEventListener("pointerleave",C),window.addEventListener("blur",x),window.addEventListener("focus",y),()=>{h.removeEventListener("focusin",x),h.removeEventListener("focusout",R),h.removeEventListener("pointermove",x),h.removeEventListener("pointerleave",C),window.removeEventListener("blur",x),window.removeEventListener("focus",y)}}},[p,s.isClosePausedRef]);let g=ge.useCallback(({tabbingDirection:h})=>{let x=i().map(y=>{let R=y.ref.current,C=[R,...m3(R)];return h==="forwards"?C:C.reverse()});return(h==="forwards"?x.reverse():x).flat()},[i]);return ge.useEffect(()=>{let h=d.current;if(h){let v=x=>{let y=x.altKey||x.ctrlKey||x.metaKey;if(x.key==="Tab"&&!y){let C=document.activeElement,w=x.shiftKey;if(x.target===h&&w){u.current?.focus();return}let P=g({tabbingDirection:w?"backwards":"forwards"}),T=P.findIndex(O=>O===C);Lx(P.slice(T+1))?x.preventDefault():w?u.current?.focus():c.current?.focus()}};return h.addEventListener("keydown",v),()=>h.removeEventListener("keydown",v)}},[i,g]),(0,Ne.jsxs)(Z0,{ref:l,role:"region","aria-label":a.replace("{hotkey}",m),tabIndex:-1,style:{pointerEvents:p?void 0:"none"},children:[p&&(0,Ne.jsx)(Mx,{ref:u,onFocusFromOutsideViewport:()=>{let h=g({tabbingDirection:"forwards"});Lx(h)}}),(0,Ne.jsx)(Ax.Slot,{scope:o,children:(0,Ne.jsx)(H.ol,{tabIndex:-1,...n,ref:f})}),p&&(0,Ne.jsx)(Mx,{ref:c,onFocusFromOutsideViewport:()=>{let h=g({tabbingDirection:"backwards"});Lx(h)}})]})});Bk.displayName=Vk;var Hk="ToastFocusProxy",Mx=ge.forwardRef((e,t)=>{let{__scopeToast:o,onFocusFromOutsideViewport:r,...a}=e,n=Xf(Hk,o);return(0,Ne.jsx)(Su,{tabIndex:0,...a,ref:t,style:{position:"fixed"},onFocus:s=>{let i=s.relatedTarget;!n.viewport?.contains(i)&&r()}})});Mx.displayName=Hk;var Eu="Toast",t3="toast.swipeStart",o3="toast.swipeMove",r3="toast.swipeCancel",a3="toast.swipeEnd",Uk=ge.forwardRef((e,t)=>{let{forceMount:o,open:r,defaultOpen:a,onOpenChange:n,...s}=e,[i,l]=Fe({prop:r,defaultProp:a??!0,onChange:n,caller:Eu});return(0,Ne.jsx)(Oe,{present:o||i,children:(0,Ne.jsx)(i3,{open:i,...s,ref:t,onClose:()=>l(!1),onPause:Te(e.onPause),onResume:Te(e.onResume),onSwipeStart:V(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:V(e.onSwipeMove,u=>{let{x:c,y:d}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${c}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${d}px`)}),onSwipeCancel:V(e.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:V(e.onSwipeEnd,u=>{let{x:c,y:d}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${c}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${d}px`),l(!1)})})})});Uk.displayName=Eu;var[n3,s3]=Ok(Eu,{onClose(){}}),i3=ge.forwardRef((e,t)=>{let{__scopeToast:o,type:r="foreground",duration:a,open:n,onClose:s,onEscapeKeyDown:i,onPause:l,onResume:u,onSwipeStart:c,onSwipeMove:d,onSwipeCancel:f,onSwipeEnd:m,...p}=e,g=Xf(Eu,o),[h,v]=ge.useState(null),x=ee(t,N=>v(N)),y=ge.useRef(null),R=ge.useRef(null),C=a||g.duration,w=ge.useRef(0),I=ge.useRef(C),L=ge.useRef(0),{onToastAdd:P,onToastRemove:T}=g,O=Te(()=>{h?.contains(document.activeElement)&&g.viewport?.focus(),s()}),$=ge.useCallback(N=>{!N||N===1/0||(window.clearTimeout(L.current),w.current=new Date().getTime(),L.current=window.setTimeout(O,N))},[O]);ge.useEffect(()=>{let N=g.viewport;if(N){let q=()=>{$(I.current),u?.()},E=()=>{let G=new Date().getTime()-w.current;I.current=I.current-G,window.clearTimeout(L.current),l?.()};return N.addEventListener(Px,E),N.addEventListener(Tx,q),()=>{N.removeEventListener(Px,E),N.removeEventListener(Tx,q)}}},[g.viewport,C,l,u,$]),ge.useEffect(()=>{n&&!g.isClosePausedRef.current&&$(C)},[n,C,g.isClosePausedRef,$]),ge.useEffect(()=>(P(),()=>T()),[P,T]);let W=ge.useMemo(()=>h?Kk(h):null,[h]);return g.viewport?(0,Ne.jsxs)(Ne.Fragment,{children:[W&&(0,Ne.jsx)(l3,{__scopeToast:o,role:"status","aria-live":r==="foreground"?"assertive":"polite",children:W}),(0,Ne.jsx)(n3,{scope:o,onClose:O,children:Fk.createPortal((0,Ne.jsx)(Ax.ItemSlot,{scope:o,children:(0,Ne.jsx)(Y0,{asChild:!0,onEscapeKeyDown:V(i,()=>{g.isFocusedToastEscapeKeyDownRef.current||O(),g.isFocusedToastEscapeKeyDownRef.current=!1}),children:(0,Ne.jsx)(H.li,{tabIndex:0,"data-state":n?"open":"closed","data-swipe-direction":g.swipeDirection,...p,ref:x,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:V(e.onKeyDown,N=>{N.key==="Escape"&&(i?.(N.nativeEvent),N.nativeEvent.defaultPrevented||(g.isFocusedToastEscapeKeyDownRef.current=!0,O()))}),onPointerDown:V(e.onPointerDown,N=>{N.button===0&&(y.current={x:N.clientX,y:N.clientY})}),onPointerMove:V(e.onPointerMove,N=>{if(!y.current)return;let q=N.clientX-y.current.x,E=N.clientY-y.current.y,G=!!R.current,M=["left","right"].includes(g.swipeDirection),k=["left","up"].includes(g.swipeDirection)?Math.min:Math.max,re=M?k(0,q):0,Se=M?0:k(0,E),F=N.pointerType==="touch"?10:2,j={x:re,y:Se},Z={originalEvent:N,delta:j};G?(R.current=j,Kf(o3,d,Z,{discrete:!1})):Nk(j,g.swipeDirection,F)?(R.current=j,Kf(t3,c,Z,{discrete:!1}),N.target.setPointerCapture(N.pointerId)):(Math.abs(q)>F||Math.abs(E)>F)&&(y.current=null)}),onPointerUp:V(e.onPointerUp,N=>{let q=R.current,E=N.target;if(E.hasPointerCapture(N.pointerId)&&E.releasePointerCapture(N.pointerId),R.current=null,y.current=null,q){let G=N.currentTarget,M={originalEvent:N,delta:q};Nk(q,g.swipeDirection,g.swipeThreshold)?Kf(a3,m,M,{discrete:!0}):Kf(r3,f,M,{discrete:!0}),G.addEventListener("click",k=>k.preventDefault(),{once:!0})}})})})}),g.viewport)})]}):null}),l3=e=>{let{__scopeToast:t,children:o,...r}=e,a=Xf(Eu,t),[n,s]=ge.useState(!1),[i,l]=ge.useState(!1);return d3(()=>s(!0)),ge.useEffect(()=>{let u=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(u)},[]),i?null:(0,Ne.jsx)(ho,{asChild:!0,children:(0,Ne.jsx)(Su,{...r,children:n&&(0,Ne.jsxs)(Ne.Fragment,{children:[a.label," ",o]})})})},u3="ToastTitle",Gk=ge.forwardRef((e,t)=>{let{__scopeToast:o,...r}=e;return(0,Ne.jsx)(H.div,{...r,ref:t})});Gk.displayName=u3;var c3="ToastDescription",zk=ge.forwardRef((e,t)=>{let{__scopeToast:o,...r}=e;return(0,Ne.jsx)(H.div,{...r,ref:t})});zk.displayName=c3;var qk="ToastAction",Wk=ge.forwardRef((e,t)=>{let{altText:o,...r}=e;return o.trim()?(0,Ne.jsx)(jk,{altText:o,asChild:!0,children:(0,Ne.jsx)(Dx,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${qk}\`. Expected non-empty \`string\`.`),null)});Wk.displayName=qk;var $k="ToastClose",Dx=ge.forwardRef((e,t)=>{let{__scopeToast:o,...r}=e,a=s3($k,o);return(0,Ne.jsx)(jk,{asChild:!0,children:(0,Ne.jsx)(H.button,{type:"button",...r,ref:t,onClick:V(e.onClick,a.onClose)})})});Dx.displayName=$k;var jk=ge.forwardRef((e,t)=>{let{__scopeToast:o,altText:r,...a}=e;return(0,Ne.jsx)(H.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...a,ref:t})});function Kk(e){let t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),f3(r)){let a=r.ariaHidden||r.hidden||r.style.display==="none",n=r.dataset.radixToastAnnounceExclude==="";if(!a)if(n){let s=r.dataset.radixToastAnnounceAlt;s&&t.push(s)}else t.push(...Kk(r))}}),t}function Kf(e,t,o,{discrete:r}){let a=o.originalEvent.currentTarget,n=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:o});t&&a.addEventListener(e,t,{once:!0}),r?es(a,n):a.dispatchEvent(n)}var Nk=(e,t,o=0)=>{let r=Math.abs(e.x),a=Math.abs(e.y),n=r>a;return t==="left"||t==="right"?n&&r>o:!n&&a>o};function d3(e=()=>{}){let t=Te(e);Le(()=>{let o=0,r=0;return o=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(o),window.cancelAnimationFrame(r)}},[t])}function f3(e){return e.nodeType===e.ELEMENT_NODE}function m3(e){let t=[],o=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{let a=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||a?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;o.nextNode();)t.push(o.currentNode);return t}function Lx(e){let t=document.activeElement;return e.some(o=>o===t?!0:(o.focus(),document.activeElement!==t))}var Xk=_k,Ex=Bk,Nx=Uk,Fx=Gk,Ox=zk,_x=Wk,Vx=Dx;var Vt=b(D()),Zk=Xk,Hx=ir.forwardRef(({className:e,...t},o)=>(0,Vt.jsx)(Ex,{ref:o,className:S("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));Hx.displayName=Ex.displayName;var g3=te("group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-8 shadow-sm transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground",success:"border-green-200 bg-green-50 text-green-900 dark:border-green-800 dark:bg-green-900/20 dark:text-green-100",warning:"border-orange-200 bg-orange-50 text-orange-900 dark:border-orange-800 dark:bg-orange-900/20 dark:text-orange-100",info:"border-blue-200 bg-blue-50 text-blue-900 dark:border-blue-800 dark:bg-blue-900/20 dark:text-blue-100"}},defaultVariants:{variant:"default"}}),Ux=ir.forwardRef(({className:e,variant:t,...o},r)=>(0,Vt.jsx)(Nx,{ref:r,className:S("moonui-theme",g3({variant:t}),e),...o}));Ux.displayName=Nx.displayName;var Qk=ir.forwardRef(({className:e,...t},o)=>(0,Vt.jsx)(_x,{ref:o,className:S("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors hover:bg-secondary focus:outline-none focus:ring-1 focus:ring-ring disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...t}));Qk.displayName=_x.displayName;var Gx=ir.forwardRef(({className:e,...t},o)=>(0,Vt.jsx)(Vx,{ref:o,className:S("absolute right-1 top-1 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-1 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:(0,Vt.jsx)(co,{className:"h-4 w-4"})}));Gx.displayName=Vx.displayName;var zx=ir.forwardRef(({className:e,...t},o)=>(0,Vt.jsx)(Fx,{ref:o,className:S("moonui-theme","text-sm font-semibold [&+div]:text-xs",e),...t}));zx.displayName=Fx.displayName;var qx=ir.forwardRef(({className:e,...t},o)=>(0,Vt.jsx)(Ox,{ref:o,className:S("moonui-theme","text-sm opacity-90",e),...t}));qx.displayName=Ox.displayName;var h3=5,x3=1e6,Bx=new Map,Yk=e=>{if(Bx.has(e))return;let t=setTimeout(()=>{Bx.delete(e),Nu({type:"REMOVE_TOAST",toastId:e})},x3);Bx.set(e,t)},v3=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,h3)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(o=>o.id===t.toast.id?{...o,...t.toast}:o)};case"DISMISS_TOAST":{let{toastId:o}=t;return o?Yk(o):e.toasts.forEach(r=>{Yk(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===o||o===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(o=>o.id!==t.toastId)};default:return e}},Yf=[],Zf={toasts:[]},y3=0;function Nu(e){Zf=v3(Zf,e),Yf.forEach(t=>{t(Zf)})}function Jk({...e}){let t=`toast-${Date.now()}-${++y3}`,o=a=>Nu({type:"UPDATE_TOAST",toast:{...a,id:t}}),r=()=>Nu({type:"DISMISS_TOAST",toastId:t});return Nu({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:a=>{a||r()}}}),{id:t,dismiss:r,update:o}}function eA(){let[e,t]=ir.useState(Zf);return ir.useEffect(()=>(Yf.push(t),()=>{let o=Yf.indexOf(t);o>-1&&Yf.splice(o,1)}),[e]),{...e,toast:Jk,dismiss:o=>Nu({type:"DISMISS_TOAST",toastId:o})}}function b3(){let{toasts:e}=eA();return(0,Vt.jsxs)(Zk,{children:[e.map(function({id:t,title:o,description:r,action:a,variant:n,open:s,onOpenChange:i,...l}){return(0,Vt.jsxs)(Ux,{variant:n,open:s,onOpenChange:i,...l,children:[(0,Vt.jsxs)("div",{className:"grid gap-1",children:[o&&(0,Vt.jsx)(zx,{children:o}),r&&(0,Vt.jsx)(qx,{children:r})]}),a,(0,Vt.jsx)(Gx,{})]},t)}),(0,Vt.jsx)(Hx,{})]})}export{VE as Accordion,uy as AccordionContent,iy as AccordionItem,ly as AccordionTrigger,fy as Alert,py as AlertDescription,my as AlertTitle,hy as AspectRatio,Mm as Avatar,km as AvatarFallback,Ay as AvatarGroup,ky as AvatarImage,fo as Badge,Ey as Breadcrumb,Am as BreadcrumbEllipsis,Fy as BreadcrumbItem,_y as BreadcrumbLink,Ny as BreadcrumbList,Vy as BreadcrumbPage,Oy as BreadcrumbSeparator,Ve as Button,p0 as Card,S0 as CardCVCInput,v0 as CardContent,x0 as CardDescription,w0 as CardExpiryInput,y0 as CardFooter,g0 as CardHeader,C0 as CardNumberInput,h0 as CardTitle,R0 as CardZipInput,qp as Checkbox,D0 as CheckboxGroup,Pd as CheckboxLabel,E0 as CheckboxWithLabel,B2 as Collapsible,O0 as CollapsibleContent,F0 as CollapsibleTrigger,Ag as ColorPicker,jg as Command,H_ as CommandDialog,JI as CommandEmpty,eL as CommandGroup,ZI as CommandInput,oL as CommandItem,QI as CommandList,tL as CommandSeparator,rL as CommandShortcut,oP as DatePicker,RB as DateRangePicker,IB as DateTimePicker,qg as Dialog,F_ as DialogClose,lf as DialogContent,$g as DialogDescription,YI as DialogFooter,V_ as DialogForm,Wg as DialogHeader,du as DialogTitle,E_ as DialogTrigger,PB as DraggableList,yH as DropdownMenu,xT as DropdownMenuCheckboxItem,gT as DropdownMenuContent,CH as DropdownMenuGroup,hT as DropdownMenuItem,yT as DropdownMenuLabel,wH as DropdownMenuPortal,RH as DropdownMenuRadioGroup,vT as DropdownMenuRadioItem,bT as DropdownMenuSeparator,CT as DropdownMenuShortcut,SH as DropdownMenuSub,pT as DropdownMenuSubContent,mT as DropdownMenuSubTrigger,bH as DropdownMenuTrigger,ST as FileUpload,DH as FreeBadge,IT as GestureDrawer,_de as GitHubStarButton,MH as GitHubStars,e_ as GradientPicker,At as Input,ao as Label,LT as LockedComponent,LB as MonthPicker,Hh as MoonLogo,Kde as MoonLogoAnimated,jde as MoonLogoIcon,VE as MoonUIAccordion,uy as MoonUIAccordionContent,iy as MoonUIAccordionItem,ly as MoonUIAccordionTrigger,fy as MoonUIAlert,py as MoonUIAlertDescription,my as MoonUIAlertTitle,hy as MoonUIAspectRatio,Mm as MoonUIAvatar,km as MoonUIAvatarFallback,Ay as MoonUIAvatarGroup,ky as MoonUIAvatarImage,fo as MoonUIBadge,Ey as MoonUIBreadcrumb,Am as MoonUIBreadcrumbEllipsis,Fy as MoonUIBreadcrumbItem,_y as MoonUIBreadcrumbLink,Ny as MoonUIBreadcrumbList,Vy as MoonUIBreadcrumbPage,Oy as MoonUIBreadcrumbSeparator,Ve as MoonUIButton,p0 as MoonUICard,S0 as MoonUICardCVCInput,v0 as MoonUICardContent,x0 as MoonUICardDescription,w0 as MoonUICardExpiryInput,y0 as MoonUICardFooter,g0 as MoonUICardHeader,C0 as MoonUICardNumberInput,h0 as MoonUICardTitle,R0 as MoonUICardZipInput,qp as MoonUICheckbox,D0 as MoonUICheckboxGroup,Pd as MoonUICheckboxLabel,E0 as MoonUICheckboxWithLabel,B2 as MoonUICollapsible,O0 as MoonUICollapsibleContent,F0 as MoonUICollapsibleTrigger,Ag as MoonUIColorPicker,jg as MoonUICommand,H_ as MoonUICommandDialog,JI as MoonUICommandEmpty,eL as MoonUICommandGroup,ZI as MoonUICommandInput,oL as MoonUICommandItem,QI as MoonUICommandList,tL as MoonUICommandSeparator,rL as MoonUICommandShortcut,EV as MoonUIDataTableBasic,oP as MoonUIDatePicker,RB as MoonUIDateRangePicker,IB as MoonUIDateTimePicker,qg as MoonUIDialog,F_ as MoonUIDialogClose,lf as MoonUIDialogContent,$g as MoonUIDialogDescription,YI as MoonUIDialogFooter,Wg as MoonUIDialogHeader,du as MoonUIDialogTitle,E_ as MoonUIDialogTrigger,PB as MoonUIDraggableList,yH as MoonUIDropdownMenu,xT as MoonUIDropdownMenuCheckboxItem,gT as MoonUIDropdownMenuContent,CH as MoonUIDropdownMenuGroup,hT as MoonUIDropdownMenuItem,yT as MoonUIDropdownMenuLabel,wH as MoonUIDropdownMenuPortal,RH as MoonUIDropdownMenuRadioGroup,vT as MoonUIDropdownMenuRadioItem,bT as MoonUIDropdownMenuSeparator,CT as MoonUIDropdownMenuShortcut,SH as MoonUIDropdownMenuSub,pT as MoonUIDropdownMenuSubContent,mT as MoonUIDropdownMenuSubTrigger,bH as MoonUIDropdownMenuTrigger,ST as MoonUIFileUpload,DH as MoonUIFreeBadge,IT as MoonUIGestureDrawer,MH as MoonUIGitHubStars,e_ as MoonUIGradientPicker,At as MoonUIInput,ao as MoonUILabel,LT as MoonUILockedComponent,LB as MoonUIMonthPicker,Hh as MoonUIMoonLogo,TT as MoonUIPagination,MT as MoonUIPaginationContent,ET as MoonUIPaginationEllipsis,kT as MoonUIPaginationItem,kf as MoonUIPaginationLink,DT as MoonUIPaginationNext,AT as MoonUIPaginationPrevious,SM as MoonUIPhoneInput,jr as MoonUIPopover,br as MoonUIPopoverContent,Kr as MoonUIPopoverTrigger,AH as MoonUIProBadge,kH as MoonUIProComponentWrapper,Mf as MoonUIProgress,IM as MoonUIRadioGroup,nx as MoonUIRadioGroupItem,LM as MoonUIRadioItemWithLabel,sx as MoonUIRadioLabel,sU as MoonUIRichTextEditor,GM as MoonUIScrollArea,mx as MoonUIScrollBar,zM as MoonUIScrollReveal,qM as MoonUIScrollRevealContainer,WM as MoonUIScrollRevealItem,vi as MoonUISelect,bi as MoonUISelectContent,oU as MoonUISelectGroup,Xt as MoonUISelectItem,bM as MoonUISelectLabel,ax as MoonUISelectScrollDownButton,rx as MoonUISelectScrollUpButton,CM as MoonUISelectSeparator,yi as MoonUISelectTrigger,Iu as MoonUISelectValue,Bo as MoonUISeparator,JO as MoonUISimpleColorPicker,xk as MoonUISimpleEditor,Ya as MoonUISkeleton,Rx as MoonUISkeletonAvatar,yk as MoonUISkeletonCard,Sx as MoonUISkeletonText,Qr as MoonUISlider,bk as MoonUISwipeableCard,Mk as MoonUISwitch,mf as MoonUITable,gf as MoonUITableBody,wL as MoonUITableCaption,gu as MoonUITableCell,CL as MoonUITableFooter,hf as MoonUITableHead,pf as MoonUITableHeader,di as MoonUITableRow,ef as MoonUITabs,ii as MoonUITabsContent,tf as MoonUITabsList,si as MoonUITabsTrigger,kk as MoonUITagsInput,Dk as MoonUITextarea,Ux as MoonUIToast,Qk as MoonUIToastAction,Gx as MoonUIToastClose,qx as MoonUIToastDescription,Zk as MoonUIToastProvider,zx as MoonUIToastTitle,Hx as MoonUIToastViewport,b3 as MoonUIToaster,Uf as MoonUIToggle,Wf as MoonUITooltip,ku as MoonUITooltipContent,wx as MoonUITooltipProvider,$f as MoonUITooltipTrigger,TT as Pagination,MT as PaginationContent,ET as PaginationEllipsis,kT as PaginationItem,kf as PaginationLink,DT as PaginationNext,AT as PaginationPrevious,ls as Palette,SM as PhoneInput,Xu as Pipette,jr as Popover,hse as PopoverAnchor,xse as PopoverClose,br as PopoverContent,AO as PopoverFooter,kO as PopoverHeader,MO as PopoverSeparator,Kr as PopoverTrigger,AH as ProBadge,kH as ProComponentWrapper,Mf as Progress,IM as RadioGroup,nx as RadioGroupItem,LM as RadioItemWithLabel,sx as RadioLabel,sU as RichTextEditor,GM as ScrollArea,mx as ScrollBar,zM as ScrollReveal,qM as ScrollRevealContainer,WM as ScrollRevealItem,vi as Select,bi as SelectContent,oU as SelectGroup,Xt as SelectItem,bM as SelectLabel,ax as SelectScrollDownButton,rx as SelectScrollUpButton,CM as SelectSeparator,yi as SelectTrigger,Iu as SelectValue,Bo as Separator,JO as SimpleColorPicker,xk as SimpleEditor,zU as SimpleTooltip,Ya as Skeleton,Rx as SkeletonAvatar,yk as SkeletonCard,Sx as SkeletonText,Qr as Slider,bk as SwipeableCard,Mk as Switch,mf as Table,gf as TableBody,wL as TableCaption,gu as TableCell,CL as TableFooter,hf as TableHead,pf as TableHeader,di as TableRow,ef as Tabs,ii as TabsContent,tf as TabsList,si as TabsTrigger,kk as TagsInput,Dk as Textarea,Ux as Toast,Qk as ToastAction,Gx as ToastClose,qx as ToastDescription,Zk as ToastProvider,zx as ToastTitle,Hx as ToastViewport,b3 as Toaster,Uf as Toggle,Wf as Tooltip,hk as TooltipArrow,ku as TooltipContent,wx as TooltipProvider,$f as TooltipTrigger,HE as aspectRatioVariants,Dy as badgeVariants,ec as buttonVariants,S as cn,H2 as collapsibleContentVariants,N0 as collapsibleTriggerVariants,ar as format,Dy as moonUIBadgeVariants,ec as moonUIButtonVariants,NV as moonUICreateSortableHeader,vk as moonUISkeletonVariants,rk as moonUIToggleVariants,TO as popoverContentVariants,IH as progressVariants,SU as separatorVariants,vk as skeletonVariants,Jk as toast,rk as toggleVariants,GU as tooltipVariants,eA as useToast};
|
|
108
|
+
color: hsl(${Math.max(0,Math.min(120-120*f,120))}deg 100% 31%);`,r?.key)}return n}}function le(e,t,r,o){return{debug:()=>{var n;return(n=e?.debugAll)!=null?n:e[t]},key:!1,onChange:o}}function TK(e,t,r,o){let n=()=>{var i;return(i=a.getValue())!=null?i:e.options.renderFallbackValue},a={id:`${t.id}_${r.id}`,row:t,column:r,getValue:()=>t.getValue(o),renderValue:n,getContext:se(()=>[e,r,t,a],(i,s,l,u)=>({table:i,column:s,row:l,cell:u,getValue:u.getValue,renderValue:u.renderValue}),le(e.options,"debugCells","cell.getContext"))};return e._features.forEach(i=>{i.createCell==null||i.createCell(a,r,t,e)},{}),a}function kK(e,t,r,o){var n,a;let s={...e._getDefaultColumnDef(),...t},l=s.accessorKey,u=(n=(a=s.id)!=null?a:l?typeof String.prototype.replaceAll=="function"?l.replaceAll(".","_"):l.replace(/\./g,"_"):void 0)!=null?n:typeof s.header=="string"?s.header:void 0,c;if(s.accessorFn?c=s.accessorFn:l&&(l.includes(".")?c=f=>{let p=f;for(let m of l.split(".")){var h;p=(h=p)==null?void 0:h[m]}return p}:c=f=>f[s.accessorKey]),!u)throw new Error;let d={id:`${String(u)}`,accessorFn:c,parent:o,depth:r,columnDef:s,columns:[],getFlatColumns:se(()=>[!0],()=>{var f;return[d,...(f=d.columns)==null?void 0:f.flatMap(p=>p.getFlatColumns())]},le(e.options,"debugColumns","column.getFlatColumns")),getLeafColumns:se(()=>[e._getOrderColumnsFn()],f=>{var p;if((p=d.columns)!=null&&p.length){let h=d.columns.flatMap(m=>m.getLeafColumns());return f(h)}return[d]},le(e.options,"debugColumns","column.getLeafColumns"))};for(let f of e._features)f.createColumn==null||f.createColumn(d,e);return d}var xr="debugHeaders";function QF(e,t,r){var o;let a={id:(o=r.id)!=null?o:t.id,column:t,index:r.index,isPlaceholder:!!r.isPlaceholder,placeholderId:r.placeholderId,depth:r.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{let i=[],s=l=>{l.subHeaders&&l.subHeaders.length&&l.subHeaders.map(s),i.push(l)};return s(a),i},getContext:()=>({table:e,header:a,column:t})};return e._features.forEach(i=>{i.createHeader==null||i.createHeader(a,e)}),a}var MK={createTable:e=>{e.getHeaderGroups=se(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,r,o,n)=>{var a,i;let s=(a=o?.map(d=>r.find(f=>f.id===d)).filter(Boolean))!=null?a:[],l=(i=n?.map(d=>r.find(f=>f.id===d)).filter(Boolean))!=null?i:[],u=r.filter(d=>!(o!=null&&o.includes(d.id))&&!(n!=null&&n.includes(d.id)));return ey(t,[...s,...u,...l],e)},le(e.options,xr,"getHeaderGroups")),e.getCenterHeaderGroups=se(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,r,o,n)=>(r=r.filter(a=>!(o!=null&&o.includes(a.id))&&!(n!=null&&n.includes(a.id))),ey(t,r,e,"center")),le(e.options,xr,"getCenterHeaderGroups")),e.getLeftHeaderGroups=se(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,r,o)=>{var n;let a=(n=o?.map(i=>r.find(s=>s.id===i)).filter(Boolean))!=null?n:[];return ey(t,a,e,"left")},le(e.options,xr,"getLeftHeaderGroups")),e.getRightHeaderGroups=se(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,r,o)=>{var n;let a=(n=o?.map(i=>r.find(s=>s.id===i)).filter(Boolean))!=null?n:[];return ey(t,a,e,"right")},le(e.options,xr,"getRightHeaderGroups")),e.getFooterGroups=se(()=>[e.getHeaderGroups()],t=>[...t].reverse(),le(e.options,xr,"getFooterGroups")),e.getLeftFooterGroups=se(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),le(e.options,xr,"getLeftFooterGroups")),e.getCenterFooterGroups=se(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),le(e.options,xr,"getCenterFooterGroups")),e.getRightFooterGroups=se(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),le(e.options,xr,"getRightFooterGroups")),e.getFlatHeaders=se(()=>[e.getHeaderGroups()],t=>t.map(r=>r.headers).flat(),le(e.options,xr,"getFlatHeaders")),e.getLeftFlatHeaders=se(()=>[e.getLeftHeaderGroups()],t=>t.map(r=>r.headers).flat(),le(e.options,xr,"getLeftFlatHeaders")),e.getCenterFlatHeaders=se(()=>[e.getCenterHeaderGroups()],t=>t.map(r=>r.headers).flat(),le(e.options,xr,"getCenterFlatHeaders")),e.getRightFlatHeaders=se(()=>[e.getRightHeaderGroups()],t=>t.map(r=>r.headers).flat(),le(e.options,xr,"getRightFlatHeaders")),e.getCenterLeafHeaders=se(()=>[e.getCenterFlatHeaders()],t=>t.filter(r=>{var o;return!((o=r.subHeaders)!=null&&o.length)}),le(e.options,xr,"getCenterLeafHeaders")),e.getLeftLeafHeaders=se(()=>[e.getLeftFlatHeaders()],t=>t.filter(r=>{var o;return!((o=r.subHeaders)!=null&&o.length)}),le(e.options,xr,"getLeftLeafHeaders")),e.getRightLeafHeaders=se(()=>[e.getRightFlatHeaders()],t=>t.filter(r=>{var o;return!((o=r.subHeaders)!=null&&o.length)}),le(e.options,xr,"getRightLeafHeaders")),e.getLeafHeaders=se(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,r,o)=>{var n,a,i,s,l,u;return[...(n=(a=t[0])==null?void 0:a.headers)!=null?n:[],...(i=(s=r[0])==null?void 0:s.headers)!=null?i:[],...(l=(u=o[0])==null?void 0:u.headers)!=null?l:[]].map(c=>c.getLeafHeaders()).flat()},le(e.options,xr,"getLeafHeaders"))}};function ey(e,t,r,o){var n,a;let i=0,s=function(f,p){p===void 0&&(p=1),i=Math.max(i,p),f.filter(h=>h.getIsVisible()).forEach(h=>{var m;(m=h.columns)!=null&&m.length&&s(h.columns,p+1)},0)};s(e);let l=[],u=(f,p)=>{let h={depth:p,id:[o,`${p}`].filter(Boolean).join("_"),headers:[]},m=[];f.forEach(x=>{let v=[...m].reverse()[0],g=x.column.depth===h.depth,y,w=!1;if(g&&x.column.parent?y=x.column.parent:(y=x.column,w=!0),v&&v?.column===y)v.subHeaders.push(x);else{let C=QF(r,y,{id:[o,p,y.id,x?.id].filter(Boolean).join("_"),isPlaceholder:w,placeholderId:w?`${m.filter(b=>b.column===y).length}`:void 0,depth:p,index:m.length});C.subHeaders.push(x),m.push(C)}h.headers.push(x),x.headerGroup=h}),l.push(h),p>0&&u(m,p-1)},c=t.map((f,p)=>QF(r,f,{depth:i,index:p}));u(c,i-1),l.reverse();let d=f=>f.filter(h=>h.column.getIsVisible()).map(h=>{let m=0,x=0,v=[0];h.subHeaders&&h.subHeaders.length?(v=[],d(h.subHeaders).forEach(y=>{let{colSpan:w,rowSpan:C}=y;m+=w,v.push(C)})):m=1;let g=Math.min(...v);return x=x+g,h.colSpan=m,h.rowSpan=x,{colSpan:m,rowSpan:x}});return d((n=(a=l[0])==null?void 0:a.headers)!=null?n:[]),l}var Gb=(e,t,r,o,n,a,i)=>{let s={id:t,index:o,original:r,depth:n,parentId:i,_valuesCache:{},_uniqueValuesCache:{},getValue:l=>{if(s._valuesCache.hasOwnProperty(l))return s._valuesCache[l];let u=e.getColumn(l);if(u!=null&&u.accessorFn)return s._valuesCache[l]=u.accessorFn(s.original,o),s._valuesCache[l]},getUniqueValues:l=>{if(s._uniqueValuesCache.hasOwnProperty(l))return s._uniqueValuesCache[l];let u=e.getColumn(l);if(u!=null&&u.accessorFn)return u.columnDef.getUniqueValues?(s._uniqueValuesCache[l]=u.columnDef.getUniqueValues(s.original,o),s._uniqueValuesCache[l]):(s._uniqueValuesCache[l]=[s.getValue(l)],s._uniqueValuesCache[l])},renderValue:l=>{var u;return(u=s.getValue(l))!=null?u:e.options.renderFallbackValue},subRows:a??[],getLeafRows:()=>PK(s.subRows,l=>l.subRows),getParentRow:()=>s.parentId?e.getRow(s.parentId,!0):void 0,getParentRows:()=>{let l=[],u=s;for(;;){let c=u.getParentRow();if(!c)break;l.push(c),u=c}return l.reverse()},getAllCells:se(()=>[e.getAllLeafColumns()],l=>l.map(u=>TK(e,s,u,u.id)),le(e.options,"debugRows","getAllCells")),_getAllCellsByColumnId:se(()=>[s.getAllCells()],l=>l.reduce((u,c)=>(u[c.column.id]=c,u),{}),le(e.options,"debugRows","getAllCellsByColumnId"))};for(let l=0;l<e._features.length;l++){let u=e._features[l];u==null||u.createRow==null||u.createRow(s,e)}return s},EK={createColumn:(e,t)=>{e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},JF=(e,t,r)=>{var o,n;let a=r==null||(o=r.toString())==null?void 0:o.toLowerCase();return!!(!((n=e.getValue(t))==null||(n=n.toString())==null||(n=n.toLowerCase())==null)&&n.includes(a))};JF.autoRemove=e=>Pn(e);var eV=(e,t,r)=>{var o;return!!(!((o=e.getValue(t))==null||(o=o.toString())==null)&&o.includes(r))};eV.autoRemove=e=>Pn(e);var tV=(e,t,r)=>{var o;return((o=e.getValue(t))==null||(o=o.toString())==null?void 0:o.toLowerCase())===r?.toLowerCase()};tV.autoRemove=e=>Pn(e);var rV=(e,t,r)=>{var o;return(o=e.getValue(t))==null?void 0:o.includes(r)};rV.autoRemove=e=>Pn(e);var oV=(e,t,r)=>!r.some(o=>{var n;return!((n=e.getValue(t))!=null&&n.includes(o))});oV.autoRemove=e=>Pn(e)||!(e!=null&&e.length);var nV=(e,t,r)=>r.some(o=>{var n;return(n=e.getValue(t))==null?void 0:n.includes(o)});nV.autoRemove=e=>Pn(e)||!(e!=null&&e.length);var aV=(e,t,r)=>e.getValue(t)===r;aV.autoRemove=e=>Pn(e);var iV=(e,t,r)=>e.getValue(t)==r;iV.autoRemove=e=>Pn(e);var jb=(e,t,r)=>{let[o,n]=r,a=e.getValue(t);return a>=o&&a<=n};jb.resolveFilterValue=e=>{let[t,r]=e,o=typeof t!="number"?parseFloat(t):t,n=typeof r!="number"?parseFloat(r):r,a=t===null||Number.isNaN(o)?-1/0:o,i=r===null||Number.isNaN(n)?1/0:n;if(a>i){let s=a;a=i,i=s}return[a,i]};jb.autoRemove=e=>Pn(e)||Pn(e[0])&&Pn(e[1]);var Wa={includesString:JF,includesStringSensitive:eV,equalsString:tV,arrIncludes:rV,arrIncludesAll:oV,arrIncludesSome:nV,equals:aV,weakEquals:iV,inNumberRange:jb};function Pn(e){return e==null||e===""}var AK={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:yo("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{let r=t.getCoreRowModel().flatRows[0],o=r?.getValue(e.id);return typeof o=="string"?Wa.includesString:typeof o=="number"?Wa.inNumberRange:typeof o=="boolean"||o!==null&&typeof o=="object"?Wa.equals:Array.isArray(o)?Wa.arrIncludes:Wa.weakEquals},e.getFilterFn=()=>{var r,o;return oy(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(r=(o=t.options.filterFns)==null?void 0:o[e.columnDef.filterFn])!=null?r:Wa[e.columnDef.filterFn]},e.getCanFilter=()=>{var r,o,n;return((r=e.columnDef.enableColumnFilter)!=null?r:!0)&&((o=t.options.enableColumnFilters)!=null?o:!0)&&((n=t.options.enableFilters)!=null?n:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var r;return(r=t.getState().columnFilters)==null||(r=r.find(o=>o.id===e.id))==null?void 0:r.value},e.getFilterIndex=()=>{var r,o;return(r=(o=t.getState().columnFilters)==null?void 0:o.findIndex(n=>n.id===e.id))!=null?r:-1},e.setFilterValue=r=>{t.setColumnFilters(o=>{let n=e.getFilterFn(),a=o?.find(c=>c.id===e.id),i=Qi(r,a?a.value:void 0);if(ZF(n,i,e)){var s;return(s=o?.filter(c=>c.id!==e.id))!=null?s:[]}let l={id:e.id,value:i};if(a){var u;return(u=o?.map(c=>c.id===e.id?l:c))!=null?u:[]}return o!=null&&o.length?[...o,l]:[l]})}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{let r=e.getAllLeafColumns(),o=n=>{var a;return(a=Qi(t,n))==null?void 0:a.filter(i=>{let s=r.find(l=>l.id===i.id);if(s){let l=s.getFilterFn();if(ZF(l,i.value,s))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(o)},e.resetColumnFilters=t=>{var r,o;e.setColumnFilters(t?[]:(r=(o=e.initialState)==null?void 0:o.columnFilters)!=null?r:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}};function ZF(e,t,r){return(e&&e.autoRemove?e.autoRemove(t,r):!1)||typeof t>"u"||typeof t=="string"&&!t}var DK=(e,t,r)=>r.reduce((o,n)=>{let a=n.getValue(e);return o+(typeof a=="number"?a:0)},0),NK=(e,t,r)=>{let o;return r.forEach(n=>{let a=n.getValue(e);a!=null&&(o>a||o===void 0&&a>=a)&&(o=a)}),o},_K=(e,t,r)=>{let o;return r.forEach(n=>{let a=n.getValue(e);a!=null&&(o<a||o===void 0&&a>=a)&&(o=a)}),o},OK=(e,t,r)=>{let o,n;return r.forEach(a=>{let i=a.getValue(e);i!=null&&(o===void 0?i>=i&&(o=n=i):(o>i&&(o=i),n<i&&(n=i)))}),[o,n]},FK=(e,t)=>{let r=0,o=0;if(t.forEach(n=>{let a=n.getValue(e);a!=null&&(a=+a)>=a&&(++r,o+=a)}),r)return o/r},VK=(e,t)=>{if(!t.length)return;let r=t.map(a=>a.getValue(e));if(!IK(r))return;if(r.length===1)return r[0];let o=Math.floor(r.length/2),n=r.sort((a,i)=>a-i);return r.length%2!==0?n[o]:(n[o-1]+n[o])/2},BK=(e,t)=>Array.from(new Set(t.map(r=>r.getValue(e))).values()),HK=(e,t)=>new Set(t.map(r=>r.getValue(e))).size,UK=(e,t)=>t.length,Ab={sum:DK,min:NK,max:_K,extent:OK,mean:FK,median:VK,unique:BK,uniqueCount:HK,count:UK},zK={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,r;return(t=(r=e.getValue())==null||r.toString==null?void 0:r.toString())!=null?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:yo("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(r=>r!=null&&r.includes(e.id)?r.filter(o=>o!==e.id):[...r??[],e.id])},e.getCanGroup=()=>{var r,o;return((r=e.columnDef.enableGrouping)!=null?r:!0)&&((o=t.options.enableGrouping)!=null?o:!0)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var r;return(r=t.getState().grouping)==null?void 0:r.includes(e.id)},e.getGroupedIndex=()=>{var r;return(r=t.getState().grouping)==null?void 0:r.indexOf(e.id)},e.getToggleGroupingHandler=()=>{let r=e.getCanGroup();return()=>{r&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{let r=t.getCoreRowModel().flatRows[0],o=r?.getValue(e.id);if(typeof o=="number")return Ab.sum;if(Object.prototype.toString.call(o)==="[object Date]")return Ab.extent},e.getAggregationFn=()=>{var r,o;if(!e)throw new Error;return oy(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(r=(o=t.options.aggregationFns)==null?void 0:o[e.columnDef.aggregationFn])!=null?r:Ab[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var r,o;e.setGrouping(t?[]:(r=(o=e.initialState)==null?void 0:o.grouping)!=null?r:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=r=>{if(e._groupingValuesCache.hasOwnProperty(r))return e._groupingValuesCache[r];let o=t.getColumn(r);return o!=null&&o.columnDef.getGroupingValue?(e._groupingValuesCache[r]=o.columnDef.getGroupingValue(e.original),e._groupingValuesCache[r]):e.getValue(r)},e._groupingValuesCache={}},createCell:(e,t,r,o)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===r.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var n;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((n=r.subRows)!=null&&n.length)}}};function WK(e,t,r){if(!(t!=null&&t.length)||!r)return e;let o=e.filter(a=>!t.includes(a.id));return r==="remove"?o:[...t.map(a=>e.find(i=>i.id===a)).filter(Boolean),...o]}var GK={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:yo("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=se(r=>[yp(t,r)],r=>r.findIndex(o=>o.id===e.id),le(t.options,"debugColumns","getIndex")),e.getIsFirstColumn=r=>{var o;return((o=yp(t,r)[0])==null?void 0:o.id)===e.id},e.getIsLastColumn=r=>{var o;let n=yp(t,r);return((o=n[n.length-1])==null?void 0:o.id)===e.id}},createTable:e=>{e.setColumnOrder=t=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var r;e.setColumnOrder(t?[]:(r=e.initialState.columnOrder)!=null?r:[])},e._getOrderColumnsFn=se(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(t,r,o)=>n=>{let a=[];if(!(t!=null&&t.length))a=n;else{let i=[...t],s=[...n];for(;s.length&&i.length;){let l=i.shift(),u=s.findIndex(c=>c.id===l);u>-1&&a.push(s.splice(u,1)[0])}a=[...a,...s]}return WK(a,r,o)},le(e.options,"debugTable","_getOrderColumnsFn"))}},Db=()=>({left:[],right:[]}),jK={getInitialState:e=>({columnPinning:Db(),...e}),getDefaultOptions:e=>({onColumnPinningChange:yo("columnPinning",e)}),createColumn:(e,t)=>{e.pin=r=>{let o=e.getLeafColumns().map(n=>n.id).filter(Boolean);t.setColumnPinning(n=>{var a,i;if(r==="right"){var s,l;return{left:((s=n?.left)!=null?s:[]).filter(d=>!(o!=null&&o.includes(d))),right:[...((l=n?.right)!=null?l:[]).filter(d=>!(o!=null&&o.includes(d))),...o]}}if(r==="left"){var u,c;return{left:[...((u=n?.left)!=null?u:[]).filter(d=>!(o!=null&&o.includes(d))),...o],right:((c=n?.right)!=null?c:[]).filter(d=>!(o!=null&&o.includes(d)))}}return{left:((a=n?.left)!=null?a:[]).filter(d=>!(o!=null&&o.includes(d))),right:((i=n?.right)!=null?i:[]).filter(d=>!(o!=null&&o.includes(d)))}})},e.getCanPin=()=>e.getLeafColumns().some(o=>{var n,a,i;return((n=o.columnDef.enablePinning)!=null?n:!0)&&((a=(i=t.options.enableColumnPinning)!=null?i:t.options.enablePinning)!=null?a:!0)}),e.getIsPinned=()=>{let r=e.getLeafColumns().map(s=>s.id),{left:o,right:n}=t.getState().columnPinning,a=r.some(s=>o?.includes(s)),i=r.some(s=>n?.includes(s));return a?"left":i?"right":!1},e.getPinnedIndex=()=>{var r,o;let n=e.getIsPinned();return n?(r=(o=t.getState().columnPinning)==null||(o=o[n])==null?void 0:o.indexOf(e.id))!=null?r:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=se(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(r,o,n)=>{let a=[...o??[],...n??[]];return r.filter(i=>!a.includes(i.column.id))},le(t.options,"debugRows","getCenterVisibleCells")),e.getLeftVisibleCells=se(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(r,o)=>(o??[]).map(a=>r.find(i=>i.column.id===a)).filter(Boolean).map(a=>({...a,position:"left"})),le(t.options,"debugRows","getLeftVisibleCells")),e.getRightVisibleCells=se(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(r,o)=>(o??[]).map(a=>r.find(i=>i.column.id===a)).filter(Boolean).map(a=>({...a,position:"right"})),le(t.options,"debugRows","getRightVisibleCells"))},createTable:e=>{e.setColumnPinning=t=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var r,o;return e.setColumnPinning(t?Db():(r=(o=e.initialState)==null?void 0:o.columnPinning)!=null?r:Db())},e.getIsSomeColumnsPinned=t=>{var r;let o=e.getState().columnPinning;if(!t){var n,a;return!!((n=o.left)!=null&&n.length||(a=o.right)!=null&&a.length)}return!!((r=o[t])!=null&&r.length)},e.getLeftLeafColumns=se(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,r)=>(r??[]).map(o=>t.find(n=>n.id===o)).filter(Boolean),le(e.options,"debugColumns","getLeftLeafColumns")),e.getRightLeafColumns=se(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,r)=>(r??[]).map(o=>t.find(n=>n.id===o)).filter(Boolean),le(e.options,"debugColumns","getRightLeafColumns")),e.getCenterLeafColumns=se(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,r,o)=>{let n=[...r??[],...o??[]];return t.filter(a=>!n.includes(a.id))},le(e.options,"debugColumns","getCenterLeafColumns"))}};function qK(e){return e||(typeof document<"u"?document:null)}var ty={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},Nb=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),$K={getDefaultColumnDef:()=>ty,getInitialState:e=>({columnSizing:{},columnSizingInfo:Nb(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:yo("columnSizing",e),onColumnSizingInfoChange:yo("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var r,o,n;let a=t.getState().columnSizing[e.id];return Math.min(Math.max((r=e.columnDef.minSize)!=null?r:ty.minSize,(o=a??e.columnDef.size)!=null?o:ty.size),(n=e.columnDef.maxSize)!=null?n:ty.maxSize)},e.getStart=se(r=>[r,yp(t,r),t.getState().columnSizing],(r,o)=>o.slice(0,e.getIndex(r)).reduce((n,a)=>n+a.getSize(),0),le(t.options,"debugColumns","getStart")),e.getAfter=se(r=>[r,yp(t,r),t.getState().columnSizing],(r,o)=>o.slice(e.getIndex(r)+1).reduce((n,a)=>n+a.getSize(),0),le(t.options,"debugColumns","getAfter")),e.resetSize=()=>{t.setColumnSizing(r=>{let{[e.id]:o,...n}=r;return n})},e.getCanResize=()=>{var r,o;return((r=e.columnDef.enableResizing)!=null?r:!0)&&((o=t.options.enableColumnResizing)!=null?o:!0)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let r=0,o=n=>{if(n.subHeaders.length)n.subHeaders.forEach(o);else{var a;r+=(a=n.column.getSize())!=null?a:0}};return o(e),r},e.getStart=()=>{if(e.index>0){let r=e.headerGroup.headers[e.index-1];return r.getStart()+r.getSize()}return 0},e.getResizeHandler=r=>{let o=t.getColumn(e.column.id),n=o?.getCanResize();return a=>{if(!o||!n||(a.persist==null||a.persist(),_b(a)&&a.touches&&a.touches.length>1))return;let i=e.getSize(),s=e?e.getLeafHeaders().map(v=>[v.column.id,v.column.getSize()]):[[o.id,o.getSize()]],l=_b(a)?Math.round(a.touches[0].clientX):a.clientX,u={},c=(v,g)=>{typeof g=="number"&&(t.setColumnSizingInfo(y=>{var w,C;let b=t.options.columnResizeDirection==="rtl"?-1:1,S=(g-((w=y?.startOffset)!=null?w:0))*b,L=Math.max(S/((C=y?.startSize)!=null?C:0),-.999999);return y.columnSizingStart.forEach(T=>{let[P,A]=T;u[P]=Math.round(Math.max(A+A*L,0)*100)/100}),{...y,deltaOffset:S,deltaPercentage:L}}),(t.options.columnResizeMode==="onChange"||v==="end")&&t.setColumnSizing(y=>({...y,...u})))},d=v=>c("move",v),f=v=>{c("end",v),t.setColumnSizingInfo(g=>({...g,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},p=qK(r),h={moveHandler:v=>d(v.clientX),upHandler:v=>{p?.removeEventListener("mousemove",h.moveHandler),p?.removeEventListener("mouseup",h.upHandler),f(v.clientX)}},m={moveHandler:v=>(v.cancelable&&(v.preventDefault(),v.stopPropagation()),d(v.touches[0].clientX),!1),upHandler:v=>{var g;p?.removeEventListener("touchmove",m.moveHandler),p?.removeEventListener("touchend",m.upHandler),v.cancelable&&(v.preventDefault(),v.stopPropagation()),f((g=v.touches[0])==null?void 0:g.clientX)}},x=KK()?{passive:!1}:!1;_b(a)?(p?.addEventListener("touchmove",m.moveHandler,x),p?.addEventListener("touchend",m.upHandler,x)):(p?.addEventListener("mousemove",h.moveHandler,x),p?.addEventListener("mouseup",h.upHandler,x)),t.setColumnSizingInfo(v=>({...v,startOffset:l,startSize:i,deltaOffset:0,deltaPercentage:0,columnSizingStart:s,isResizingColumn:o.id}))}}},createTable:e=>{e.setColumnSizing=t=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{var r;e.setColumnSizing(t?{}:(r=e.initialState.columnSizing)!=null?r:{})},e.resetHeaderSizeInfo=t=>{var r;e.setColumnSizingInfo(t?Nb():(r=e.initialState.columnSizingInfo)!=null?r:Nb())},e.getTotalSize=()=>{var t,r;return(t=(r=e.getHeaderGroups()[0])==null?void 0:r.headers.reduce((o,n)=>o+n.getSize(),0))!=null?t:0},e.getLeftTotalSize=()=>{var t,r;return(t=(r=e.getLeftHeaderGroups()[0])==null?void 0:r.headers.reduce((o,n)=>o+n.getSize(),0))!=null?t:0},e.getCenterTotalSize=()=>{var t,r;return(t=(r=e.getCenterHeaderGroups()[0])==null?void 0:r.headers.reduce((o,n)=>o+n.getSize(),0))!=null?t:0},e.getRightTotalSize=()=>{var t,r;return(t=(r=e.getRightHeaderGroups()[0])==null?void 0:r.headers.reduce((o,n)=>o+n.getSize(),0))!=null?t:0}}},ry=null;function KK(){if(typeof ry=="boolean")return ry;let e=!1;try{let t={get passive(){return e=!0,!1}},r=()=>{};window.addEventListener("test",r,t),window.removeEventListener("test",r)}catch{e=!1}return ry=e,ry}function _b(e){return e.type==="touchstart"}var XK={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:yo("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=r=>{e.getCanHide()&&t.setColumnVisibility(o=>({...o,[e.id]:r??!e.getIsVisible()}))},e.getIsVisible=()=>{var r,o;let n=e.columns;return(r=n.length?n.some(a=>a.getIsVisible()):(o=t.getState().columnVisibility)==null?void 0:o[e.id])!=null?r:!0},e.getCanHide=()=>{var r,o;return((r=e.columnDef.enableHiding)!=null?r:!0)&&((o=t.options.enableHiding)!=null?o:!0)},e.getToggleVisibilityHandler=()=>r=>{e.toggleVisibility==null||e.toggleVisibility(r.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=se(()=>[e.getAllCells(),t.getState().columnVisibility],r=>r.filter(o=>o.column.getIsVisible()),le(t.options,"debugRows","_getAllVisibleCells")),e.getVisibleCells=se(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(r,o,n)=>[...r,...o,...n],le(t.options,"debugRows","getVisibleCells"))},createTable:e=>{let t=(r,o)=>se(()=>[o(),o().filter(n=>n.getIsVisible()).map(n=>n.id).join("_")],n=>n.filter(a=>a.getIsVisible==null?void 0:a.getIsVisible()),le(e.options,"debugColumns",r));e.getVisibleFlatColumns=t("getVisibleFlatColumns",()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=t("getVisibleLeafColumns",()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=t("getLeftVisibleLeafColumns",()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=t("getRightVisibleLeafColumns",()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=t("getCenterVisibleLeafColumns",()=>e.getCenterLeafColumns()),e.setColumnVisibility=r=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(r),e.resetColumnVisibility=r=>{var o;e.setColumnVisibility(r?{}:(o=e.initialState.columnVisibility)!=null?o:{})},e.toggleAllColumnsVisible=r=>{var o;r=(o=r)!=null?o:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((n,a)=>({...n,[a.id]:r||!(a.getCanHide!=null&&a.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(r=>!(r.getIsVisible!=null&&r.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(r=>r.getIsVisible==null?void 0:r.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>r=>{var o;e.toggleAllColumnsVisible((o=r.target)==null?void 0:o.checked)}}};function yp(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}var YK={createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},QK={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:yo("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var r;let o=(r=e.getCoreRowModel().flatRows[0])==null||(r=r._getAllCellsByColumnId()[t.id])==null?void 0:r.getValue();return typeof o=="string"||typeof o=="number"}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>{var r,o,n,a;return((r=e.columnDef.enableGlobalFilter)!=null?r:!0)&&((o=t.options.enableGlobalFilter)!=null?o:!0)&&((n=t.options.enableFilters)!=null?n:!0)&&((a=t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))!=null?a:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>Wa.includesString,e.getGlobalFilterFn=()=>{var t,r;let{globalFilterFn:o}=e.options;return oy(o)?o:o==="auto"?e.getGlobalAutoFilterFn():(t=(r=e.options.filterFns)==null?void 0:r[o])!=null?t:Wa[o]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},ZK={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:yo("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,r=!1;e._autoResetExpanded=()=>{var o,n;if(!t){e._queue(()=>{t=!0});return}if((o=(n=e.options.autoResetAll)!=null?n:e.options.autoResetExpanded)!=null?o:!e.options.manualExpanding){if(r)return;r=!0,e._queue(()=>{e.resetExpanded(),r=!1})}},e.setExpanded=o=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(o),e.toggleAllRowsExpanded=o=>{o??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=o=>{var n,a;e.setExpanded(o?{}:(n=(a=e.initialState)==null?void 0:a.expanded)!=null?n:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(o=>o.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>o=>{o.persist==null||o.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{let o=e.getState().expanded;return o===!0||Object.values(o).some(Boolean)},e.getIsAllRowsExpanded=()=>{let o=e.getState().expanded;return typeof o=="boolean"?o===!0:!(!Object.keys(o).length||e.getRowModel().flatRows.some(n=>!n.getIsExpanded()))},e.getExpandedDepth=()=>{let o=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(a=>{let i=a.split(".");o=Math.max(o,i.length)}),o},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,t)=>{e.toggleExpanded=r=>{t.setExpanded(o=>{var n;let a=o===!0?!0:!!(o!=null&&o[e.id]),i={};if(o===!0?Object.keys(t.getRowModel().rowsById).forEach(s=>{i[s]=!0}):i=o,r=(n=r)!=null?n:!a,!a&&r)return{...i,[e.id]:!0};if(a&&!r){let{[e.id]:s,...l}=i;return l}return o})},e.getIsExpanded=()=>{var r;let o=t.getState().expanded;return!!((r=t.options.getIsRowExpanded==null?void 0:t.options.getIsRowExpanded(e))!=null?r:o===!0||o?.[e.id])},e.getCanExpand=()=>{var r,o,n;return(r=t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))!=null?r:((o=t.options.enableExpanding)!=null?o:!0)&&!!((n=e.subRows)!=null&&n.length)},e.getIsAllParentsExpanded=()=>{let r=!0,o=e;for(;r&&o.parentId;)o=t.getRow(o.parentId,!0),r=o.getIsExpanded();return r},e.getToggleExpandedHandler=()=>{let r=e.getCanExpand();return()=>{r&&e.toggleExpanded()}}}},Bb=0,Hb=10,Ob=()=>({pageIndex:Bb,pageSize:Hb}),JK={getInitialState:e=>({...e,pagination:{...Ob(),...e?.pagination}}),getDefaultOptions:e=>({onPaginationChange:yo("pagination",e)}),createTable:e=>{let t=!1,r=!1;e._autoResetPageIndex=()=>{var o,n;if(!t){e._queue(()=>{t=!0});return}if((o=(n=e.options.autoResetAll)!=null?n:e.options.autoResetPageIndex)!=null?o:!e.options.manualPagination){if(r)return;r=!0,e._queue(()=>{e.resetPageIndex(),r=!1})}},e.setPagination=o=>{let n=a=>Qi(o,a);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(n)},e.resetPagination=o=>{var n;e.setPagination(o?Ob():(n=e.initialState.pagination)!=null?n:Ob())},e.setPageIndex=o=>{e.setPagination(n=>{let a=Qi(o,n.pageIndex),i=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return a=Math.max(0,Math.min(a,i)),{...n,pageIndex:a}})},e.resetPageIndex=o=>{var n,a;e.setPageIndex(o?Bb:(n=(a=e.initialState)==null||(a=a.pagination)==null?void 0:a.pageIndex)!=null?n:Bb)},e.resetPageSize=o=>{var n,a;e.setPageSize(o?Hb:(n=(a=e.initialState)==null||(a=a.pagination)==null?void 0:a.pageSize)!=null?n:Hb)},e.setPageSize=o=>{e.setPagination(n=>{let a=Math.max(1,Qi(o,n.pageSize)),i=n.pageSize*n.pageIndex,s=Math.floor(i/a);return{...n,pageIndex:s,pageSize:a}})},e.setPageCount=o=>e.setPagination(n=>{var a;let i=Qi(o,(a=e.options.pageCount)!=null?a:-1);return typeof i=="number"&&(i=Math.max(-1,i)),{...n,pageCount:i}}),e.getPageOptions=se(()=>[e.getPageCount()],o=>{let n=[];return o&&o>0&&(n=[...new Array(o)].fill(null).map((a,i)=>i)),n},le(e.options,"debugTable","getPageOptions")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{let{pageIndex:o}=e.getState().pagination,n=e.getPageCount();return n===-1?!0:n===0?!1:o<n-1},e.previousPage=()=>e.setPageIndex(o=>o-1),e.nextPage=()=>e.setPageIndex(o=>o+1),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var o;return(o=e.options.pageCount)!=null?o:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var o;return(o=e.options.rowCount)!=null?o:e.getPrePaginationRowModel().rows.length}}},Fb=()=>({top:[],bottom:[]}),eX={getInitialState:e=>({rowPinning:Fb(),...e}),getDefaultOptions:e=>({onRowPinningChange:yo("rowPinning",e)}),createRow:(e,t)=>{e.pin=(r,o,n)=>{let a=o?e.getLeafRows().map(l=>{let{id:u}=l;return u}):[],i=n?e.getParentRows().map(l=>{let{id:u}=l;return u}):[],s=new Set([...i,e.id,...a]);t.setRowPinning(l=>{var u,c;if(r==="bottom"){var d,f;return{top:((d=l?.top)!=null?d:[]).filter(m=>!(s!=null&&s.has(m))),bottom:[...((f=l?.bottom)!=null?f:[]).filter(m=>!(s!=null&&s.has(m))),...Array.from(s)]}}if(r==="top"){var p,h;return{top:[...((p=l?.top)!=null?p:[]).filter(m=>!(s!=null&&s.has(m))),...Array.from(s)],bottom:((h=l?.bottom)!=null?h:[]).filter(m=>!(s!=null&&s.has(m)))}}return{top:((u=l?.top)!=null?u:[]).filter(m=>!(s!=null&&s.has(m))),bottom:((c=l?.bottom)!=null?c:[]).filter(m=>!(s!=null&&s.has(m)))}})},e.getCanPin=()=>{var r;let{enableRowPinning:o,enablePinning:n}=t.options;return typeof o=="function"?o(e):(r=o??n)!=null?r:!0},e.getIsPinned=()=>{let r=[e.id],{top:o,bottom:n}=t.getState().rowPinning,a=r.some(s=>o?.includes(s)),i=r.some(s=>n?.includes(s));return a?"top":i?"bottom":!1},e.getPinnedIndex=()=>{var r,o;let n=e.getIsPinned();if(!n)return-1;let a=(r=n==="top"?t.getTopRows():t.getBottomRows())==null?void 0:r.map(i=>{let{id:s}=i;return s});return(o=a?.indexOf(e.id))!=null?o:-1}},createTable:e=>{e.setRowPinning=t=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var r,o;return e.setRowPinning(t?Fb():(r=(o=e.initialState)==null?void 0:o.rowPinning)!=null?r:Fb())},e.getIsSomeRowsPinned=t=>{var r;let o=e.getState().rowPinning;if(!t){var n,a;return!!((n=o.top)!=null&&n.length||(a=o.bottom)!=null&&a.length)}return!!((r=o[t])!=null&&r.length)},e._getPinnedRows=(t,r,o)=>{var n;return((n=e.options.keepPinnedRows)==null||n?(r??[]).map(i=>{let s=e.getRow(i,!0);return s.getIsAllParentsExpanded()?s:null}):(r??[]).map(i=>t.find(s=>s.id===i))).filter(Boolean).map(i=>({...i,position:o}))},e.getTopRows=se(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,r)=>e._getPinnedRows(t,r,"top"),le(e.options,"debugRows","getTopRows")),e.getBottomRows=se(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,r)=>e._getPinnedRows(t,r,"bottom"),le(e.options,"debugRows","getBottomRows")),e.getCenterRows=se(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(t,r,o)=>{let n=new Set([...r??[],...o??[]]);return t.filter(a=>!n.has(a.id))},le(e.options,"debugRows","getCenterRows"))}},tX={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:yo("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var r;return e.setRowSelection(t?{}:(r=e.initialState.rowSelection)!=null?r:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection(r=>{t=typeof t<"u"?t:!e.getIsAllRowsSelected();let o={...r},n=e.getPreGroupedRowModel().flatRows;return t?n.forEach(a=>{a.getCanSelect()&&(o[a.id]=!0)}):n.forEach(a=>{delete o[a.id]}),o})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(r=>{let o=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),n={...r};return e.getRowModel().rows.forEach(a=>{Ub(n,a.id,o,!0,e)}),n}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=se(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,r)=>Object.keys(t).length?Vb(e,r):{rows:[],flatRows:[],rowsById:{}},le(e.options,"debugTable","getSelectedRowModel")),e.getFilteredSelectedRowModel=se(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,r)=>Object.keys(t).length?Vb(e,r):{rows:[],flatRows:[],rowsById:{}},le(e.options,"debugTable","getFilteredSelectedRowModel")),e.getGroupedSelectedRowModel=se(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,r)=>Object.keys(t).length?Vb(e,r):{rows:[],flatRows:[],rowsById:{}},le(e.options,"debugTable","getGroupedSelectedRowModel")),e.getIsAllRowsSelected=()=>{let t=e.getFilteredRowModel().flatRows,{rowSelection:r}=e.getState(),o=!!(t.length&&Object.keys(r).length);return o&&t.some(n=>n.getCanSelect()&&!r[n.id])&&(o=!1),o},e.getIsAllPageRowsSelected=()=>{let t=e.getPaginationRowModel().flatRows.filter(n=>n.getCanSelect()),{rowSelection:r}=e.getState(),o=!!t.length;return o&&t.some(n=>!r[n.id])&&(o=!1),o},e.getIsSomeRowsSelected=()=>{var t;let r=Object.keys((t=e.getState().rowSelection)!=null?t:{}).length;return r>0&&r<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{let t=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:t.filter(r=>r.getCanSelect()).some(r=>r.getIsSelected()||r.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(r,o)=>{let n=e.getIsSelected();t.setRowSelection(a=>{var i;if(r=typeof r<"u"?r:!n,e.getCanSelect()&&n===r)return a;let s={...a};return Ub(s,e.id,r,(i=o?.selectChildren)!=null?i:!0,t),s})},e.getIsSelected=()=>{let{rowSelection:r}=t.getState();return qb(e,r)},e.getIsSomeSelected=()=>{let{rowSelection:r}=t.getState();return zb(e,r)==="some"},e.getIsAllSubRowsSelected=()=>{let{rowSelection:r}=t.getState();return zb(e,r)==="all"},e.getCanSelect=()=>{var r;return typeof t.options.enableRowSelection=="function"?t.options.enableRowSelection(e):(r=t.options.enableRowSelection)!=null?r:!0},e.getCanSelectSubRows=()=>{var r;return typeof t.options.enableSubRowSelection=="function"?t.options.enableSubRowSelection(e):(r=t.options.enableSubRowSelection)!=null?r:!0},e.getCanMultiSelect=()=>{var r;return typeof t.options.enableMultiRowSelection=="function"?t.options.enableMultiRowSelection(e):(r=t.options.enableMultiRowSelection)!=null?r:!0},e.getToggleSelectedHandler=()=>{let r=e.getCanSelect();return o=>{var n;r&&e.toggleSelected((n=o.target)==null?void 0:n.checked)}}}},Ub=(e,t,r,o,n)=>{var a;let i=n.getRow(t,!0);r?(i.getCanMultiSelect()||Object.keys(e).forEach(s=>delete e[s]),i.getCanSelect()&&(e[t]=!0)):delete e[t],o&&(a=i.subRows)!=null&&a.length&&i.getCanSelectSubRows()&&i.subRows.forEach(s=>Ub(e,s.id,r,o,n))};function Vb(e,t){let r=e.getState().rowSelection,o=[],n={},a=function(i,s){return i.map(l=>{var u;let c=qb(l,r);if(c&&(o.push(l),n[l.id]=l),(u=l.subRows)!=null&&u.length&&(l={...l,subRows:a(l.subRows)}),c)return l}).filter(Boolean)};return{rows:a(t.rows),flatRows:o,rowsById:n}}function qb(e,t){var r;return(r=t[e.id])!=null?r:!1}function zb(e,t,r){var o;if(!((o=e.subRows)!=null&&o.length))return!1;let n=!0,a=!1;return e.subRows.forEach(i=>{if(!(a&&!n)&&(i.getCanSelect()&&(qb(i,t)?a=!0:n=!1),i.subRows&&i.subRows.length)){let s=zb(i,t);s==="all"?a=!0:(s==="some"&&(a=!0),n=!1)}}),n?"all":a?"some":!1}var Wb=/([0-9]+)/gm,rX=(e,t,r)=>sV(Zi(e.getValue(r)).toLowerCase(),Zi(t.getValue(r)).toLowerCase()),oX=(e,t,r)=>sV(Zi(e.getValue(r)),Zi(t.getValue(r))),nX=(e,t,r)=>$b(Zi(e.getValue(r)).toLowerCase(),Zi(t.getValue(r)).toLowerCase()),aX=(e,t,r)=>$b(Zi(e.getValue(r)),Zi(t.getValue(r))),iX=(e,t,r)=>{let o=e.getValue(r),n=t.getValue(r);return o>n?1:o<n?-1:0},sX=(e,t,r)=>$b(e.getValue(r),t.getValue(r));function $b(e,t){return e===t?0:e>t?1:-1}function Zi(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function sV(e,t){let r=e.split(Wb).filter(Boolean),o=t.split(Wb).filter(Boolean);for(;r.length&&o.length;){let n=r.shift(),a=o.shift(),i=parseInt(n,10),s=parseInt(a,10),l=[i,s].sort();if(isNaN(l[0])){if(n>a)return 1;if(a>n)return-1;continue}if(isNaN(l[1]))return isNaN(i)?-1:1;if(i>s)return 1;if(s>i)return-1}return r.length-o.length}var vp={alphanumeric:rX,alphanumericCaseSensitive:oX,text:nX,textCaseSensitive:aX,datetime:iX,basic:sX},lX={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:yo("sorting",e),isMultiSortEvent:t=>t.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{let r=t.getFilteredRowModel().flatRows.slice(10),o=!1;for(let n of r){let a=n?.getValue(e.id);if(Object.prototype.toString.call(a)==="[object Date]")return vp.datetime;if(typeof a=="string"&&(o=!0,a.split(Wb).length>1))return vp.alphanumeric}return o?vp.text:vp.basic},e.getAutoSortDir=()=>{let r=t.getFilteredRowModel().flatRows[0];return typeof r?.getValue(e.id)=="string"?"asc":"desc"},e.getSortingFn=()=>{var r,o;if(!e)throw new Error;return oy(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(r=(o=t.options.sortingFns)==null?void 0:o[e.columnDef.sortingFn])!=null?r:vp[e.columnDef.sortingFn]},e.toggleSorting=(r,o)=>{let n=e.getNextSortingOrder(),a=typeof r<"u"&&r!==null;t.setSorting(i=>{let s=i?.find(p=>p.id===e.id),l=i?.findIndex(p=>p.id===e.id),u=[],c,d=a?r:n==="desc";if(i!=null&&i.length&&e.getCanMultiSort()&&o?s?c="toggle":c="add":i!=null&&i.length&&l!==i.length-1?c="replace":s?c="toggle":c="replace",c==="toggle"&&(a||n||(c="remove")),c==="add"){var f;u=[...i,{id:e.id,desc:d}],u.splice(0,u.length-((f=t.options.maxMultiSortColCount)!=null?f:Number.MAX_SAFE_INTEGER))}else c==="toggle"?u=i.map(p=>p.id===e.id?{...p,desc:d}:p):c==="remove"?u=i.filter(p=>p.id!==e.id):u=[{id:e.id,desc:d}];return u})},e.getFirstSortDir=()=>{var r,o;return((r=(o=e.columnDef.sortDescFirst)!=null?o:t.options.sortDescFirst)!=null?r:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=r=>{var o,n;let a=e.getFirstSortDir(),i=e.getIsSorted();return i?i!==a&&((o=t.options.enableSortingRemoval)==null||o)&&(!(r&&(n=t.options.enableMultiRemove)!=null)||n)?!1:i==="desc"?"asc":"desc":a},e.getCanSort=()=>{var r,o;return((r=e.columnDef.enableSorting)!=null?r:!0)&&((o=t.options.enableSorting)!=null?o:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var r,o;return(r=(o=e.columnDef.enableMultiSort)!=null?o:t.options.enableMultiSort)!=null?r:!!e.accessorFn},e.getIsSorted=()=>{var r;let o=(r=t.getState().sorting)==null?void 0:r.find(n=>n.id===e.id);return o?o.desc?"desc":"asc":!1},e.getSortIndex=()=>{var r,o;return(r=(o=t.getState().sorting)==null?void 0:o.findIndex(n=>n.id===e.id))!=null?r:-1},e.clearSorting=()=>{t.setSorting(r=>r!=null&&r.length?r.filter(o=>o.id!==e.id):[])},e.getToggleSortingHandler=()=>{let r=e.getCanSort();return o=>{r&&(o.persist==null||o.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?t.options.isMultiSortEvent==null?void 0:t.options.isMultiSortEvent(o):!1))}}},createTable:e=>{e.setSorting=t=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var r,o;e.setSorting(t?[]:(r=(o=e.initialState)==null?void 0:o.sorting)!=null?r:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},uX=[MK,XK,GK,jK,EK,AK,YK,QK,lX,zK,ZK,JK,eX,tX,$K];function lV(e){var t,r;let o=[...uX,...(t=e._features)!=null?t:[]],n={_features:o},a=n._features.reduce((f,p)=>Object.assign(f,p.getDefaultOptions==null?void 0:p.getDefaultOptions(n)),{}),i=f=>n.options.mergeOptions?n.options.mergeOptions(a,f):{...a,...f},l={...{},...(r=e.initialState)!=null?r:{}};n._features.forEach(f=>{var p;l=(p=f.getInitialState==null?void 0:f.getInitialState(l))!=null?p:l});let u=[],c=!1,d={_features:o,options:{...a,...e},initialState:l,_queue:f=>{u.push(f),c||(c=!0,Promise.resolve().then(()=>{for(;u.length;)u.shift()();c=!1}).catch(p=>setTimeout(()=>{throw p})))},reset:()=>{n.setState(n.initialState)},setOptions:f=>{let p=Qi(f,n.options);n.options=i(p)},getState:()=>n.options.state,setState:f=>{n.options.onStateChange==null||n.options.onStateChange(f)},_getRowId:(f,p,h)=>{var m;return(m=n.options.getRowId==null?void 0:n.options.getRowId(f,p,h))!=null?m:`${h?[h.id,p].join("."):p}`},getCoreRowModel:()=>(n._getCoreRowModel||(n._getCoreRowModel=n.options.getCoreRowModel(n)),n._getCoreRowModel()),getRowModel:()=>n.getPaginationRowModel(),getRow:(f,p)=>{let h=(p?n.getPrePaginationRowModel():n.getRowModel()).rowsById[f];if(!h&&(h=n.getCoreRowModel().rowsById[f],!h))throw new Error;return h},_getDefaultColumnDef:se(()=>[n.options.defaultColumn],f=>{var p;return f=(p=f)!=null?p:{},{header:h=>{let m=h.header.column.columnDef;return m.accessorKey?m.accessorKey:m.accessorFn?m.id:null},cell:h=>{var m,x;return(m=(x=h.renderValue())==null||x.toString==null?void 0:x.toString())!=null?m:null},...n._features.reduce((h,m)=>Object.assign(h,m.getDefaultColumnDef==null?void 0:m.getDefaultColumnDef()),{}),...f}},le(e,"debugColumns","_getDefaultColumnDef")),_getColumnDefs:()=>n.options.columns,getAllColumns:se(()=>[n._getColumnDefs()],f=>{let p=function(h,m,x){return x===void 0&&(x=0),h.map(v=>{let g=kK(n,v,x,m),y=v;return g.columns=y.columns?p(y.columns,g,x+1):[],g})};return p(f)},le(e,"debugColumns","getAllColumns")),getAllFlatColumns:se(()=>[n.getAllColumns()],f=>f.flatMap(p=>p.getFlatColumns()),le(e,"debugColumns","getAllFlatColumns")),_getAllFlatColumnsById:se(()=>[n.getAllFlatColumns()],f=>f.reduce((p,h)=>(p[h.id]=h,p),{}),le(e,"debugColumns","getAllFlatColumnsById")),getAllLeafColumns:se(()=>[n.getAllColumns(),n._getOrderColumnsFn()],(f,p)=>{let h=f.flatMap(m=>m.getLeafColumns());return p(h)},le(e,"debugColumns","getAllLeafColumns")),getColumn:f=>n._getAllFlatColumnsById()[f]};Object.assign(n,d);for(let f=0;f<n._features.length;f++){let p=n._features[f];p==null||p.createTable==null||p.createTable(n)}return n}function uV(){return e=>se(()=>[e.options.data],t=>{let r={rows:[],flatRows:[],rowsById:{}},o=function(n,a,i){a===void 0&&(a=0);let s=[];for(let u=0;u<n.length;u++){let c=Gb(e,e._getRowId(n[u],u,i),n[u],u,a,void 0,i?.id);if(r.flatRows.push(c),r.rowsById[c.id]=c,s.push(c),e.options.getSubRows){var l;c.originalSubRows=e.options.getSubRows(n[u],u),(l=c.originalSubRows)!=null&&l.length&&(c.subRows=o(c.originalSubRows,a+1,c))}}return s};return r.rows=o(t),r},le(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}function cX(e){let t=[],r=o=>{var n;t.push(o),(n=o.subRows)!=null&&n.length&&o.getIsExpanded()&&o.subRows.forEach(r)};return e.rows.forEach(r),{rows:t,flatRows:e.flatRows,rowsById:e.rowsById}}function dX(e,t,r){return r.options.filterFromLeafRows?fX(e,t,r):pX(e,t,r)}function fX(e,t,r){var o;let n=[],a={},i=(o=r.options.maxLeafRowFilterDepth)!=null?o:100,s=function(l,u){u===void 0&&(u=0);let c=[];for(let f=0;f<l.length;f++){var d;let p=l[f],h=Gb(r,p.id,p.original,p.index,p.depth,void 0,p.parentId);if(h.columnFilters=p.columnFilters,(d=p.subRows)!=null&&d.length&&u<i){if(h.subRows=s(p.subRows,u+1),p=h,t(p)&&!h.subRows.length){c.push(p),a[p.id]=p,n.push(p);continue}if(t(p)||h.subRows.length){c.push(p),a[p.id]=p,n.push(p);continue}}else p=h,t(p)&&(c.push(p),a[p.id]=p,n.push(p))}return c};return{rows:s(e),flatRows:n,rowsById:a}}function pX(e,t,r){var o;let n=[],a={},i=(o=r.options.maxLeafRowFilterDepth)!=null?o:100,s=function(l,u){u===void 0&&(u=0);let c=[];for(let f=0;f<l.length;f++){let p=l[f];if(t(p)){var d;if((d=p.subRows)!=null&&d.length&&u<i){let m=Gb(r,p.id,p.original,p.index,p.depth,void 0,p.parentId);m.subRows=s(p.subRows,u+1),p=m}c.push(p),n.push(p),a[p.id]=p}}return c};return{rows:s(e),flatRows:n,rowsById:a}}function cV(){return e=>se(()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter],(t,r,o)=>{if(!t.rows.length||!(r!=null&&r.length)&&!o){for(let f=0;f<t.flatRows.length;f++)t.flatRows[f].columnFilters={},t.flatRows[f].columnFiltersMeta={};return t}let n=[],a=[];(r??[]).forEach(f=>{var p;let h=e.getColumn(f.id);if(!h)return;let m=h.getFilterFn();m&&n.push({id:f.id,filterFn:m,resolvedValue:(p=m.resolveFilterValue==null?void 0:m.resolveFilterValue(f.value))!=null?p:f.value})});let i=(r??[]).map(f=>f.id),s=e.getGlobalFilterFn(),l=e.getAllLeafColumns().filter(f=>f.getCanGlobalFilter());o&&s&&l.length&&(i.push("__global__"),l.forEach(f=>{var p;a.push({id:f.id,filterFn:s,resolvedValue:(p=s.resolveFilterValue==null?void 0:s.resolveFilterValue(o))!=null?p:o})}));let u,c;for(let f=0;f<t.flatRows.length;f++){let p=t.flatRows[f];if(p.columnFilters={},n.length)for(let h=0;h<n.length;h++){u=n[h];let m=u.id;p.columnFilters[m]=u.filterFn(p,m,u.resolvedValue,x=>{p.columnFiltersMeta[m]=x})}if(a.length){for(let h=0;h<a.length;h++){c=a[h];let m=c.id;if(c.filterFn(p,m,c.resolvedValue,x=>{p.columnFiltersMeta[m]=x})){p.columnFilters.__global__=!0;break}}p.columnFilters.__global__!==!0&&(p.columnFilters.__global__=!1)}}let d=f=>{for(let p=0;p<i.length;p++)if(f.columnFilters[i[p]]===!1)return!1;return!0};return dX(t.rows,d,e)},le(e.options,"debugTable","getFilteredRowModel",()=>e._autoResetPageIndex()))}function dV(e){return t=>se(()=>[t.getState().pagination,t.getPrePaginationRowModel(),t.options.paginateExpandedRows?void 0:t.getState().expanded],(r,o)=>{if(!o.rows.length)return o;let{pageSize:n,pageIndex:a}=r,{rows:i,flatRows:s,rowsById:l}=o,u=n*a,c=u+n;i=i.slice(u,c);let d;t.options.paginateExpandedRows?d={rows:i,flatRows:s,rowsById:l}:d=cX({rows:i,flatRows:s,rowsById:l}),d.flatRows=[];let f=p=>{d.flatRows.push(p),p.subRows.length&&p.subRows.forEach(f)};return d.rows.forEach(f),d},le(t.options,"debugTable","getPaginationRowModel"))}function fV(){return e=>se(()=>[e.getState().sorting,e.getPreSortedRowModel()],(t,r)=>{if(!r.rows.length||!(t!=null&&t.length))return r;let o=e.getState().sorting,n=[],a=o.filter(l=>{var u;return(u=e.getColumn(l.id))==null?void 0:u.getCanSort()}),i={};a.forEach(l=>{let u=e.getColumn(l.id);u&&(i[l.id]={sortUndefined:u.columnDef.sortUndefined,invertSorting:u.columnDef.invertSorting,sortingFn:u.getSortingFn()})});let s=l=>{let u=l.map(c=>({...c}));return u.sort((c,d)=>{for(let p=0;p<a.length;p+=1){var f;let h=a[p],m=i[h.id],x=m.sortUndefined,v=(f=h?.desc)!=null?f:!1,g=0;if(x){let y=c.getValue(h.id),w=d.getValue(h.id),C=y===void 0,b=w===void 0;if(C||b){if(x==="first")return C?-1:1;if(x==="last")return C?1:-1;g=C&&b?0:C?x:-x}}if(g===0&&(g=m.sortingFn(c,d,h.id)),g!==0)return v&&(g*=-1),m.invertSorting&&(g*=-1),g}return c.index-d.index}),u.forEach(c=>{var d;n.push(c),(d=c.subRows)!=null&&d.length&&(c.subRows=s(c.subRows))}),u};return{rows:s(r.rows),flatRows:n,rowsById:r.rowsById}},le(e.options,"debugTable","getSortedRowModel",()=>e._autoResetPageIndex()))}function Kb(e,t){return e?mX(e)?xp.createElement(e,t):e:null}function mX(e){return gX(e)||typeof e=="function"||hX(e)}function gX(e){return typeof e=="function"&&(()=>{let t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function hX(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function pV(e){let t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[r]=xp.useState(()=>({current:lV(t)})),[o,n]=xp.useState(()=>r.current.initialState);return r.current.setOptions(a=>({...a,...e,state:{...o,...e.state},onStateChange:i=>{n(i),e.onStateChange==null||e.onStateChange(i)}})),r.current}var wr=R(E());var ct=R(M()),vX=ee("w-full caption-bottom text-sm",{variants:{variant:{default:"dark:text-gray-200",bordered:"border border-border dark:border-gray-700",striped:"dark:text-gray-200",card:"border border-border dark:border-gray-700 rounded-md shadow-sm dark:shadow-gray-900/20",minimal:"border-none dark:text-gray-200"},size:{sm:"text-xs",default:"text-sm",lg:"text-base"}},defaultVariants:{variant:"default",size:"default"}}),ny=wr.forwardRef(({className:e,variant:t,size:r,loading:o,emptyContent:n,...a},i)=>{let s=t==="striped",l=wr.Children.map(a.children,u=>{if(wr.isValidElement(u)&&u.type==="tbody"){let c=u.props;return wr.cloneElement(u,{className:I(c.className,s&&"even:[&>tr]:bg-muted/50")})}return u});return(0,ct.jsxs)("div",{className:"relative w-full overflow-auto",children:[o&&(0,ct.jsx)("div",{className:"absolute inset-0 bg-background/60 flex items-center justify-center z-10",children:(0,ct.jsx)("div",{className:"h-8 w-8 animate-spin rounded-full border-2 border-primary border-t-transparent"})}),(0,ct.jsx)("table",{ref:i,className:I(vX({variant:t,size:r}),o&&"opacity-70",e),...a,children:l})]})});ny.displayName="Table";var ay=wr.forwardRef(({className:e,...t},r)=>(0,ct.jsx)("thead",{ref:r,className:I("moonui-theme","[&_tr]:border-b",e),...t}));ay.displayName="TableHeader";var iy=wr.forwardRef(({className:e,emptyContent:t,emptyMessage:r="No data available",children:o,...n},a)=>{let i=wr.Children.count(o)>0;return(0,ct.jsx)("tbody",{ref:a,className:I("moonui-theme","[&_tr:last-child]:border-0",e),...n,children:i?o:(0,ct.jsx)("tr",{children:(0,ct.jsx)("td",{colSpan:100,className:"h-24 text-center",children:t||(0,ct.jsx)("div",{className:"py-6 text-muted-foreground",children:(0,ct.jsx)("div",{className:"text-sm",children:r})})})})})});iy.displayName="TableBody";var mV=wr.forwardRef(({className:e,...t},r)=>(0,ct.jsx)("tfoot",{ref:r,className:I("moonui-theme","bg-primary text-primary-foreground font-medium",e),...t}));mV.displayName="TableFooter";var Rc=wr.forwardRef(({className:e,...t},r)=>(0,ct.jsx)("tr",{ref:r,className:I("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));Rc.displayName="TableRow";var sy=wr.forwardRef(({className:e,sortable:t,sorted:r,onSort:o,align:n="left",children:a,...i},s)=>{let l=()=>t?r==="asc"?(0,ct.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"ml-1 h-4 w-4 inline-block",viewBox:"0 0 20 20",fill:"currentColor",children:(0,ct.jsx)("path",{fillRule:"evenodd",d:"M14.707 10.293a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 111.414-1.414L9 12.586V5a1 1 0 012 0v7.586l2.293-2.293a1 1 0 011.414 0z",clipRule:"evenodd"})}):r==="desc"?(0,ct.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"ml-1 h-4 w-4 inline-block",viewBox:"0 0 20 20",fill:"currentColor",children:(0,ct.jsx)("path",{fillRule:"evenodd",d:"M5.293 9.707a1 1 0 010-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 01-1.414 1.414L11 7.414V15a1 1 0 11-2 0V7.414L6.707 9.707a1 1 0 01-1.414 0z",clipRule:"evenodd"})}):(0,ct.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"ml-1 h-4 w-4 inline-block opacity-30",viewBox:"0 0 20 20",fill:"currentColor",children:(0,ct.jsx)("path",{fillRule:"evenodd",d:"M10 3a1 1 0 01.707.293l3 3a1 1 0 01-1.414 1.414L10 5.414 7.707 7.707a1 1 0 01-1.414-1.414l3-3A1 1 0 0110 3zm-3.707 9.293a1 1 0 011.414 0L10 14.586l2.293-2.293a1 1 0 011.414 1.414l-3 3a1 1 0 01-1.414 0l-3-3a1 1 0 010-1.414z",clipRule:"evenodd"})}):null,u={left:"text-left justify-start",center:"text-center justify-center",right:"text-right justify-end"};return(0,ct.jsx)("th",{ref:s,className:I("h-10 px-4 align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",u[n].split(" ")[0],t&&"cursor-pointer hover:text-foreground select-none",e),onClick:t?o:void 0,...i,children:t||n!=="left"?(0,ct.jsxs)("div",{className:I("flex items-center",u[n].split(" ")[1]),children:[a,t&&l()]}):a})});sy.displayName="TableHead";var wp=wr.forwardRef(({className:e,align:t="left",...r},o)=>{let n={left:"text-left",center:"text-center",right:"text-right"}[t];return(0,ct.jsx)("td",{ref:o,className:I("moonui-theme","p-4 align-middle [&:has([role=checkbox])]:pr-0",n,e),...r})});wp.displayName="TableCell";var gV=wr.forwardRef(({className:e,...t},r)=>(0,ct.jsx)("caption",{ref:r,className:I("moonui-theme","mt-4 text-sm text-muted-foreground",e),...t}));gV.displayName="TableCaption";var Le=R(M());function yX({columns:e,data:t,enableSorting:r=!0,enablePagination:o=!0,enableSearch:n=!0,pageSize:a=10,searchPlaceholder:i="Search...",emptyMessage:s="No results found.",className:l}){let[u,c]=Xb.useState([]),[d,f]=Xb.useState(""),p=pV({data:t,columns:e,onSortingChange:r?c:void 0,onGlobalFilterChange:n?f:void 0,getCoreRowModel:uV(),getPaginationRowModel:o?dV():void 0,getSortedRowModel:r?fV():void 0,getFilteredRowModel:n?cV():void 0,state:{sorting:u,globalFilter:d},initialState:{pagination:{pageSize:a}}});return(0,Le.jsxs)("div",{className:I("space-y-4",l),children:[n&&(0,Le.jsx)("div",{className:"flex items-center",children:(0,Le.jsxs)("div",{className:"relative max-w-sm",children:[(0,Le.jsx)(ks,{className:"absolute left-2 top-2.5 h-4 w-4 text-muted-foreground"}),(0,Le.jsx)(mr,{placeholder:i,value:d,onChange:h=>f(h.target.value),className:"pl-8"})]})}),(0,Le.jsx)("div",{className:"rounded-md border",children:(0,Le.jsxs)(ny,{children:[(0,Le.jsx)(ay,{children:p.getHeaderGroups().map(h=>(0,Le.jsx)(Rc,{children:h.headers.map(m=>(0,Le.jsx)(sy,{children:m.isPlaceholder?null:(0,Le.jsxs)("div",{className:I("flex items-center gap-2",m.column.getCanSort()&&"cursor-pointer select-none"),onClick:m.column.getToggleSortingHandler(),children:[Kb(m.column.columnDef.header,m.getContext()),r&&m.column.getCanSort()&&(0,Le.jsx)("div",{className:"ml-auto",children:m.column.getIsSorted()==="desc"?(0,Le.jsx)(au,{className:"h-4 w-4"}):m.column.getIsSorted()==="asc"?(0,Le.jsx)(su,{className:"h-4 w-4"}):(0,Le.jsx)(iu,{className:"h-4 w-4 opacity-50"})})]})},m.id))},h.id))}),(0,Le.jsx)(iy,{children:p.getRowModel().rows?.length?p.getRowModel().rows.map(h=>(0,Le.jsx)(Rc,{"data-state":h.getIsSelected()&&"selected",children:h.getVisibleCells().map(m=>(0,Le.jsx)(wp,{children:Kb(m.column.columnDef.cell,m.getContext())},m.id))},h.id)):(0,Le.jsx)(Rc,{children:(0,Le.jsx)(wp,{colSpan:e.length,className:"h-24 text-center",children:s})})})]})}),o&&(0,Le.jsxs)("div",{className:"flex items-center justify-end space-x-2",children:[(0,Le.jsxs)("div",{className:"flex-1 text-sm text-muted-foreground",children:[p.getFilteredRowModel().rows.length," row(s)"]}),(0,Le.jsxs)("div",{className:"space-x-2",children:[(0,Le.jsxs)(Ve,{variant:"outline",size:"sm",onClick:()=>p.previousPage(),disabled:!p.getCanPreviousPage(),children:[(0,Le.jsx)(an,{className:"h-4 w-4"}),"Previous"]}),(0,Le.jsxs)("span",{className:"text-sm",children:["Page ",p.getState().pagination.pageIndex+1," of"," ",p.getPageCount()]}),(0,Le.jsxs)(Ve,{variant:"outline",size:"sm",onClick:()=>p.nextPage(),disabled:!p.getCanNextPage(),children:["Next",(0,Le.jsx)(Pr,{className:"h-4 w-4"})]})]})]})]})}function xX(e){return({column:t})=>(0,Le.jsxs)(Ve,{variant:"ghost",className:"-ml-3 h-8 data-[state=open]:bg-accent",onClick:()=>t.toggleSorting(t.getIsSorted()==="asc"),children:[e,t.getIsSorted()==="desc"?(0,Le.jsx)(au,{className:"ml-2 h-4 w-4"}):t.getIsSorted()==="asc"?(0,Le.jsx)(su,{className:"ml-2 h-4 w-4"}):(0,Le.jsx)(iu,{className:"ml-2 h-4 w-4"})]})}var _r=R(E());var de=R(M()),wX={initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20}},Yb=ee("w-full justify-start text-left font-normal",{variants:{variant:{default:"",outline:"border-2",ghost:"hover:bg-accent hover:text-accent-foreground"},size:{default:"h-10 px-4 py-2",sm:"h-8 px-3 text-sm",lg:"h-12 px-6 text-base",icon:"h-10 w-10"},state:{default:"",error:"border-destructive focus:ring-destructive",success:"border-success focus:ring-success",warning:"border-warning focus:ring-warning"}},defaultVariants:{variant:"default",size:"default",state:"default"}});function hV({className:e,variant:t,size:r,state:o,value:n,onChange:a,placeholder:i="Pick a date",formatString:s="PPP",minDate:l,maxDate:u,disabledDates:c,disabledDaysOfWeek:d,showWeekNumbers:f,iconPosition:p="left",icon:h,allowClear:m=!0,readOnly:x=!1,showTodayButton:v=!0,calendarProps:g,disabled:y,...w}){let[C,b]=_r.useState(!1),[S,L]=_r.useState(n);_r.useEffect(()=>{L(n)},[n]);let T=W=>{let N=Array.isArray(W)?W[0]:W&&typeof W=="object"&&"from"in W?W.from:W;L(N),a?.(N),N&&b(!1)},P=W=>{W.stopPropagation(),T(void 0)},A=()=>{T(new Date)},_=W=>!!(l&&W<l||u&&W>u||c?.some(N=>N.toDateString()===W.toDateString())||d?.includes(W.getDay())),G=S&&Xh(S)?hn(S,s):null,D=h||(0,de.jsx)(Ls,{className:"h-4 w-4"});return(0,de.jsx)("div",{className:"moonui-theme",children:(0,de.jsxs)(Oa,{open:C,onOpenChange:b,children:[(0,de.jsx)(Fa,{asChild:!0,children:(0,de.jsxs)(Ve,{variant:t==="ghost"?"ghost":"outline",className:I(Yb({variant:t,size:r,state:o}),!G&&"text-muted-foreground",e),disabled:y||x,...w,children:[(0,de.jsx)(ba,{mode:"wait",children:(0,de.jsxs)(Ee.div,{initial:{opacity:0,y:-2},animate:{opacity:1,y:0},exit:{opacity:0,y:2},transition:{duration:.15},className:"flex items-center gap-2 flex-1",children:[p==="left"&&D,(0,de.jsx)("span",{className:"flex-1 truncate",children:G||i}),p==="right"&&D]},G||"placeholder")}),m&&G&&!x&&!y&&(0,de.jsxs)(Ee.div,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},whileHover:{scale:1.1},whileTap:{scale:.9},className:"ml-2 h-4 w-4 shrink-0 opacity-50 hover:opacity-100 transition-opacity cursor-pointer",onClick:P,role:"button",tabIndex:0,onKeyDown:W=>{(W.key==="Enter"||W.key===" ")&&(W.preventDefault(),P(W))},children:[(0,de.jsx)("span",{className:"sr-only",children:"Clear date"}),(0,de.jsx)("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,de.jsx)("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})]})]})}),(0,de.jsx)(Qn,{className:"w-[360px] p-0 shadow-2xl rounded-2xl border border-gray-200 dark:border-gray-700 bg-background/95 backdrop-blur-sm !z-[9999]",align:"start",sideOffset:12,children:(0,de.jsxs)(Ee.div,{...wX,className:"rounded-2xl bg-background overflow-hidden",children:[(0,de.jsx)(Zf,{mode:"single",selected:S,onSelect:T,disabled:_,showOutsideDays:!1,className:I("rounded-2xl",g?.className),...g}),v&&(0,de.jsx)("div",{className:"border-t px-4 py-3",children:(0,de.jsx)(Ve,{variant:"ghost",size:"sm",onClick:A,className:"w-full justify-center hover:bg-accent hover:text-accent-foreground transition-all duration-200",children:"Today"})})]})})]})})}function CX({className:e,value:t,onChange:r,placeholder:o="Pick a date range",formatString:n="LLL dd, y",separator:a=" - ",...i}){let[s,l]=_r.useState(!1),[u,c]=_r.useState(t);_r.useEffect(()=>{c(t)},[t]);let d=p=>{c(p),r?.(p),p?.from&&p?.to&&l(!1)},f=_r.useMemo(()=>u?.from?u?.to?`${hn(u.from,n)}${a}${hn(u.to,n)}`:hn(u.from,n):null,[u,n,a]);return(0,de.jsxs)(Oa,{open:s,onOpenChange:l,children:[(0,de.jsx)(Fa,{asChild:!0,children:(0,de.jsxs)(Ve,{variant:i.variant==="ghost"?"ghost":"outline",className:I(Yb({variant:i.variant,size:i.size,state:i.state}),!f&&"text-muted-foreground",e),disabled:i.disabled||i.readOnly,children:[(0,de.jsx)(Ls,{className:"mr-2 h-4 w-4"}),(0,de.jsx)("span",{className:"flex-1 truncate text-left",children:f||o})]})}),(0,de.jsx)(Qn,{className:"w-auto p-0 shadow-2xl rounded-2xl border border-gray-200 dark:border-gray-700 bg-background/95 backdrop-blur-sm !z-[9999]",align:"start",sideOffset:12,children:(0,de.jsx)(Zf,{mode:"range",defaultMonth:u?.from,selected:u,onSelect:d,showOutsideDays:!1,...i.calendarProps,className:"rounded-2xl"})})]})}function SX({value:e,onChange:t,formatString:r="PPP p",showTimePicker:o=!0,timeFormat:n="24",timeInterval:a=15,...i}){let[s,l]=_r.useState(e),[u,c]=_r.useState(e?hn(e,n==="24"?"HH:mm":"hh:mm a"):"00:00"),d=h=>{if(!h){l(void 0),t?.(void 0);return}let[m,x]=u.split(":").map(Number);h.setHours(m,x),l(h),t?.(h)},f=h=>{let m=h.target.value;if(c(m),s){let[x,v]=m.split(":").map(Number),g=new Date(s);g.setHours(x,v),l(g),t?.(g)}},p=_r.useMemo(()=>{let h=[];for(let m=0;m<24;m++)for(let x=0;x<60;x+=a){let v=m.toString().padStart(2,"0"),g=x.toString().padStart(2,"0"),y=`${v}:${g}`;if(n==="12"){let w=m===0?12:m>12?m-12:m,C=m<12?"AM":"PM",b=`${w}:${g} ${C}`;h.push({value:y,label:b})}else h.push({value:y,label:y})}return h},[n,a]);return(0,de.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,de.jsx)(hV,{...i,value:s,onChange:d,formatString:"PPP",showTodayButton:!1}),o&&s&&(0,de.jsxs)(Ee.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:"flex items-center gap-2",children:[(0,de.jsx)(Dd,{className:"h-4 w-4 text-muted-foreground"}),(0,de.jsx)("select",{value:u,onChange:f,className:"flex h-9 w-full rounded-md border border-input bg-background px-3 py-1 text-sm shadow-sm transition-colors focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50",children:p.map(h=>(0,de.jsx)("option",{value:h.value,children:h.label},h.value))})]})]})}function bX({value:e,onChange:t,placeholder:r="Pick a month",formatString:o="MMMM yyyy",...n}){let[a,i]=_r.useState(!1),[s,l]=_r.useState(e||new Date),u=["January","February","March","April","May","June","July","August","September","October","November","December"],c=p=>{let h=new Date(s);h.setMonth(p),t?.(h),i(!1)},d=p=>{let h=new Date(s);h.setFullYear(h.getFullYear()+p),l(h)},f=e?hn(e,o):null;return(0,de.jsxs)(Oa,{open:a,onOpenChange:i,children:[(0,de.jsx)(Fa,{asChild:!0,children:(0,de.jsxs)(Ve,{variant:n.variant==="default"?"outline":n.variant||"outline",className:I(Yb({variant:n.variant,size:n.size,state:n.state}),!f&&"text-muted-foreground",n.className),disabled:n.disabled||n.readOnly,children:[(0,de.jsx)(Ls,{className:"mr-2 h-4 w-4"}),f||r]})}),(0,de.jsx)(Qn,{className:"w-64 p-0 shadow-2xl border border-gray-200 dark:border-gray-700 bg-background !z-[9999]",align:"start",children:(0,de.jsxs)("div",{className:"p-3",children:[(0,de.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,de.jsx)(Ve,{variant:"outline",size:"icon",onClick:()=>d(-1),children:(0,de.jsx)(an,{className:"h-4 w-4"})}),(0,de.jsx)("span",{className:"font-semibold",children:s.getFullYear()}),(0,de.jsx)(Ve,{variant:"outline",size:"icon",onClick:()=>d(1),children:(0,de.jsx)(Pr,{className:"h-4 w-4"})})]}),(0,de.jsx)("div",{className:"grid grid-cols-3 gap-2",children:u.map((p,h)=>(0,de.jsx)(Ve,{variant:e&&e.getMonth()===h?"primary":"outline",size:"sm",onClick:()=>c(h),className:"h-8 text-xs",children:p.slice(0,3)},p))})]})})]})}var vV=R(E());var Qb=R(M());function RX({items:e,onReorder:t,renderItem:r,keyExtractor:o,className:n,disabled:a=!1}){let[i,s]=vV.useState(null),l=(f,p)=>{a||(s(p),f.dataTransfer.effectAllowed="move")},u=f=>{f.preventDefault(),f.dataTransfer.dropEffect="move"},c=(f,p)=>{if(f.preventDefault(),a||i===null||i===p){s(null);return}let h=[...e],m=h[i];h.splice(i,1),h.splice(p,0,m),t(h),s(null)},d=()=>{s(null)};return(0,Qb.jsx)("div",{className:I("moonui-theme","space-y-2",n),children:e.map((f,p)=>(0,Qb.jsx)("div",{draggable:!a,onDragStart:h=>l(h,p),onDragOver:u,onDrop:h=>c(h,p),onDragEnd:d,className:I("transition-opacity duration-200",!a&&"cursor-move hover:opacity-80",i===p&&"opacity-50",a&&"cursor-not-allowed"),children:r(f,p)},o(f)))})}var Ga=R(E());var Vt=R(E(),1);var te=R(E(),1);var fe=R(M(),1),Zb=["Enter"," "],LX=["ArrowDown","PageUp","Home"],xV=["ArrowUp","PageDown","End"],IX=[...LX,...xV],PX={ltr:[...Zb,"ArrowRight"],rtl:[...Zb,"ArrowLeft"]},TX={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Rp="Menu",[Sp,kX,MX]=En(Rp),[wl,Jb]=Te(Rp,[MX,Uo,dc]),Lp=Uo(),wV=dc(),[CV,Ji]=wl(Rp),[EX,Ip]=wl(Rp),SV=e=>{let{__scopeMenu:t,open:r=!1,children:o,dir:n,onOpenChange:a,modal:i=!0}=e,s=Lp(t),[l,u]=te.useState(null),c=te.useRef(!1),d=et(a),f=Vn(n);return te.useEffect(()=>{let p=()=>{c.current=!0,document.addEventListener("pointerdown",h,{capture:!0,once:!0}),document.addEventListener("pointermove",h,{capture:!0,once:!0})},h=()=>c.current=!1;return document.addEventListener("keydown",p,{capture:!0}),()=>{document.removeEventListener("keydown",p,{capture:!0}),document.removeEventListener("pointerdown",h,{capture:!0}),document.removeEventListener("pointermove",h,{capture:!0})}},[]),(0,fe.jsx)(Da,{...s,children:(0,fe.jsx)(CV,{scope:t,open:r,onOpenChange:d,content:l,onContentChange:u,children:(0,fe.jsx)(EX,{scope:t,onClose:te.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:c,dir:f,modal:i,children:o})})})};SV.displayName=Rp;var AX="MenuAnchor",eR=te.forwardRef((e,t)=>{let{__scopeMenu:r,...o}=e,n=Lp(r);return(0,fe.jsx)(Na,{...n,...o,ref:t})});eR.displayName=AX;var tR="MenuPortal",[DX,bV]=wl(tR,{forceMount:void 0}),RV=e=>{let{__scopeMenu:t,forceMount:r,children:o,container:n}=e,a=Ji(tR,t);return(0,fe.jsx)(DX,{scope:t,forceMount:r,children:(0,fe.jsx)(it,{present:r||a.open,children:(0,fe.jsx)(vo,{asChild:!0,container:n,children:o})})})};RV.displayName=tR;var qo="MenuContent",[NX,rR]=wl(qo),LV=te.forwardRef((e,t)=>{let r=bV(qo,e.__scopeMenu),{forceMount:o=r.forceMount,...n}=e,a=Ji(qo,e.__scopeMenu),i=Ip(qo,e.__scopeMenu);return(0,fe.jsx)(Sp.Provider,{scope:e.__scopeMenu,children:(0,fe.jsx)(it,{present:o||a.open,children:(0,fe.jsx)(Sp.Slot,{scope:e.__scopeMenu,children:i.modal?(0,fe.jsx)(_X,{...n,ref:t}):(0,fe.jsx)(OX,{...n,ref:t})})})})}),_X=te.forwardRef((e,t)=>{let r=Ji(qo,e.__scopeMenu),o=te.useRef(null),n=ne(t,o);return te.useEffect(()=>{let a=o.current;if(a)return Wi(a)},[]),(0,fe.jsx)(oR,{...e,ref:n,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:H(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),OX=te.forwardRef((e,t)=>{let r=Ji(qo,e.__scopeMenu);return(0,fe.jsx)(oR,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),FX=oo("MenuContent.ScrollLock"),oR=te.forwardRef((e,t)=>{let{__scopeMenu:r,loop:o=!1,trapFocus:n,onOpenAutoFocus:a,onCloseAutoFocus:i,disableOutsidePointerEvents:s,onEntryFocus:l,onEscapeKeyDown:u,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:f,onDismiss:p,disableOutsideScroll:h,...m}=e,x=Ji(qo,r),v=Ip(qo,r),g=Lp(r),y=wV(r),w=kX(r),[C,b]=te.useState(null),S=te.useRef(null),L=ne(t,S,x.onContentChange),T=te.useRef(0),P=te.useRef(""),A=te.useRef(0),_=te.useRef(null),G=te.useRef("right"),D=te.useRef(0),W=h?_a:te.Fragment,N=h?{as:FX,allowPinchZoom:!0}:void 0,z=k=>{let Z=P.current+k,ve=w().filter(q=>!q.disabled),O=document.activeElement,J=ve.find(q=>q.ref.current===O)?.textValue,ae=ve.map(q=>q.textValue),Y=XX(ae,Z,J),ce=ve.find(q=>q.textValue===Y)?.ref.current;(function q(pe){P.current=pe,window.clearTimeout(T.current),pe!==""&&(T.current=window.setTimeout(()=>q(""),1e3))})(Z),ce&&setTimeout(()=>ce.focus())};te.useEffect(()=>()=>window.clearTimeout(T.current),[]),Vi();let V=te.useCallback(k=>G.current===_.current?.side&&QX(k,_.current?.area),[]);return(0,fe.jsx)(NX,{scope:r,searchRef:P,onItemEnter:te.useCallback(k=>{V(k)&&k.preventDefault()},[V]),onItemLeave:te.useCallback(k=>{V(k)||(S.current?.focus(),b(null))},[V]),onTriggerLeave:te.useCallback(k=>{V(k)&&k.preventDefault()},[V]),pointerGraceTimerRef:A,onPointerGraceIntentChange:te.useCallback(k=>{_.current=k},[]),children:(0,fe.jsx)(W,{...N,children:(0,fe.jsx)(Ea,{asChild:!0,trapped:n,onMountAutoFocus:H(a,k=>{k.preventDefault(),S.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:(0,fe.jsx)(Fo,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:u,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:f,onDismiss:p,children:(0,fe.jsx)(Lv,{asChild:!0,...y,dir:v.dir,orientation:"vertical",loop:o,currentTabStopId:C,onCurrentTabStopIdChange:b,onEntryFocus:H(l,k=>{v.isUsingKeyboardRef.current||k.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,fe.jsx)(Ui,{role:"menu","aria-orientation":"vertical","data-state":zV(x.open),"data-radix-menu-content":"",dir:v.dir,...g,...m,ref:L,style:{outline:"none",...m.style},onKeyDown:H(m.onKeyDown,k=>{let ve=k.target.closest("[data-radix-menu-content]")===k.currentTarget,O=k.ctrlKey||k.altKey||k.metaKey,J=k.key.length===1;ve&&(k.key==="Tab"&&k.preventDefault(),!O&&J&&z(k.key));let ae=S.current;if(k.target!==ae||!IX.includes(k.key))return;k.preventDefault();let ce=w().filter(q=>!q.disabled).map(q=>q.ref.current);xV.includes(k.key)&&ce.reverse(),$X(ce)}),onBlur:H(e.onBlur,k=>{k.currentTarget.contains(k.target)||(window.clearTimeout(T.current),P.current="")}),onPointerMove:H(e.onPointerMove,bp(k=>{let Z=k.target,ve=D.current!==k.clientX;if(k.currentTarget.contains(Z)&&ve){let O=k.clientX>D.current?"right":"left";G.current=O,D.current=k.clientX}}))})})})})})})});LV.displayName=qo;var VX="MenuGroup",nR=te.forwardRef((e,t)=>{let{__scopeMenu:r,...o}=e;return(0,fe.jsx)($.div,{role:"group",...o,ref:t})});nR.displayName=VX;var BX="MenuLabel",IV=te.forwardRef((e,t)=>{let{__scopeMenu:r,...o}=e;return(0,fe.jsx)($.div,{...o,ref:t})});IV.displayName=BX;var ly="MenuItem",yV="menu.itemSelect",cy=te.forwardRef((e,t)=>{let{disabled:r=!1,onSelect:o,...n}=e,a=te.useRef(null),i=Ip(ly,e.__scopeMenu),s=rR(ly,e.__scopeMenu),l=ne(t,a),u=te.useRef(!1),c=()=>{let d=a.current;if(!r&&d){let f=new CustomEvent(yV,{bubbles:!0,cancelable:!0});d.addEventListener(yV,p=>o?.(p),{once:!0}),ou(d,f),f.defaultPrevented?u.current=!1:i.onClose()}};return(0,fe.jsx)(PV,{...n,ref:l,disabled:r,onClick:H(e.onClick,c),onPointerDown:d=>{e.onPointerDown?.(d),u.current=!0},onPointerUp:H(e.onPointerUp,d=>{u.current||d.currentTarget?.click()}),onKeyDown:H(e.onKeyDown,d=>{let f=s.searchRef.current!=="";r||f&&d.key===" "||Zb.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})})});cy.displayName=ly;var PV=te.forwardRef((e,t)=>{let{__scopeMenu:r,disabled:o=!1,textValue:n,...a}=e,i=rR(ly,r),s=wV(r),l=te.useRef(null),u=ne(t,l),[c,d]=te.useState(!1),[f,p]=te.useState("");return te.useEffect(()=>{let h=l.current;h&&p((h.textContent??"").trim())},[a.children]),(0,fe.jsx)(Sp.ItemSlot,{scope:r,disabled:o,textValue:n??f,children:(0,fe.jsx)(Iv,{asChild:!0,...s,focusable:!o,children:(0,fe.jsx)($.div,{role:"menuitem","data-highlighted":c?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...a,ref:u,onPointerMove:H(e.onPointerMove,bp(h=>{o?i.onItemLeave(h):(i.onItemEnter(h),h.defaultPrevented||h.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:H(e.onPointerLeave,bp(h=>i.onItemLeave(h))),onFocus:H(e.onFocus,()=>d(!0)),onBlur:H(e.onBlur,()=>d(!1))})})})}),HX="MenuCheckboxItem",TV=te.forwardRef((e,t)=>{let{checked:r=!1,onCheckedChange:o,...n}=e;return(0,fe.jsx)(DV,{scope:e.__scopeMenu,checked:r,children:(0,fe.jsx)(cy,{role:"menuitemcheckbox","aria-checked":uy(r)?"mixed":r,...n,ref:t,"data-state":sR(r),onSelect:H(n.onSelect,()=>o?.(uy(r)?!0:!r),{checkForDefaultPrevented:!1})})})});TV.displayName=HX;var kV="MenuRadioGroup",[UX,zX]=wl(kV,{value:void 0,onValueChange:()=>{}}),MV=te.forwardRef((e,t)=>{let{value:r,onValueChange:o,...n}=e,a=et(o);return(0,fe.jsx)(UX,{scope:e.__scopeMenu,value:r,onValueChange:a,children:(0,fe.jsx)(nR,{...n,ref:t})})});MV.displayName=kV;var EV="MenuRadioItem",AV=te.forwardRef((e,t)=>{let{value:r,...o}=e,n=zX(EV,e.__scopeMenu),a=r===n.value;return(0,fe.jsx)(DV,{scope:e.__scopeMenu,checked:a,children:(0,fe.jsx)(cy,{role:"menuitemradio","aria-checked":a,...o,ref:t,"data-state":sR(a),onSelect:H(o.onSelect,()=>n.onValueChange?.(r),{checkForDefaultPrevented:!1})})})});AV.displayName=EV;var aR="MenuItemIndicator",[DV,WX]=wl(aR,{checked:!1}),NV=te.forwardRef((e,t)=>{let{__scopeMenu:r,forceMount:o,...n}=e,a=WX(aR,r);return(0,fe.jsx)(it,{present:o||uy(a.checked)||a.checked===!0,children:(0,fe.jsx)($.span,{...n,ref:t,"data-state":sR(a.checked)})})});NV.displayName=aR;var GX="MenuSeparator",_V=te.forwardRef((e,t)=>{let{__scopeMenu:r,...o}=e;return(0,fe.jsx)($.div,{role:"separator","aria-orientation":"horizontal",...o,ref:t})});_V.displayName=GX;var jX="MenuArrow",OV=te.forwardRef((e,t)=>{let{__scopeMenu:r,...o}=e,n=Lp(r);return(0,fe.jsx)(zi,{...n,...o,ref:t})});OV.displayName=jX;var iR="MenuSub",[qX,FV]=wl(iR),VV=e=>{let{__scopeMenu:t,children:r,open:o=!1,onOpenChange:n}=e,a=Ji(iR,t),i=Lp(t),[s,l]=te.useState(null),[u,c]=te.useState(null),d=et(n);return te.useEffect(()=>(a.open===!1&&d(!1),()=>d(!1)),[a.open,d]),(0,fe.jsx)(Da,{...i,children:(0,fe.jsx)(CV,{scope:t,open:o,onOpenChange:d,content:u,onContentChange:c,children:(0,fe.jsx)(qX,{scope:t,contentId:qe(),triggerId:qe(),trigger:s,onTriggerChange:l,children:r})})})};VV.displayName=iR;var Cp="MenuSubTrigger",BV=te.forwardRef((e,t)=>{let r=Ji(Cp,e.__scopeMenu),o=Ip(Cp,e.__scopeMenu),n=FV(Cp,e.__scopeMenu),a=rR(Cp,e.__scopeMenu),i=te.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:l}=a,u={__scopeMenu:e.__scopeMenu},c=te.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return te.useEffect(()=>c,[c]),te.useEffect(()=>{let d=s.current;return()=>{window.clearTimeout(d),l(null)}},[s,l]),(0,fe.jsx)(eR,{asChild:!0,...u,children:(0,fe.jsx)(PV,{id:n.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":n.contentId,"data-state":zV(r.open),...e,ref:ls(t,n.onTriggerChange),onClick:d=>{e.onClick?.(d),!(e.disabled||d.defaultPrevented)&&(d.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:H(e.onPointerMove,bp(d=>{a.onItemEnter(d),!d.defaultPrevented&&!e.disabled&&!r.open&&!i.current&&(a.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{r.onOpenChange(!0),c()},100))})),onPointerLeave:H(e.onPointerLeave,bp(d=>{c();let f=r.content?.getBoundingClientRect();if(f){let p=r.content?.dataset.side,h=p==="right",m=h?-5:5,x=f[h?"left":"right"],v=f[h?"right":"left"];a.onPointerGraceIntentChange({area:[{x:d.clientX+m,y:d.clientY},{x,y:f.top},{x:v,y:f.top},{x:v,y:f.bottom},{x,y:f.bottom}],side:p}),window.clearTimeout(s.current),s.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(d),d.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:H(e.onKeyDown,d=>{let f=a.searchRef.current!=="";e.disabled||f&&d.key===" "||PX[o.dir].includes(d.key)&&(r.onOpenChange(!0),r.content?.focus(),d.preventDefault())})})})});BV.displayName=Cp;var HV="MenuSubContent",UV=te.forwardRef((e,t)=>{let r=bV(qo,e.__scopeMenu),{forceMount:o=r.forceMount,...n}=e,a=Ji(qo,e.__scopeMenu),i=Ip(qo,e.__scopeMenu),s=FV(HV,e.__scopeMenu),l=te.useRef(null),u=ne(t,l);return(0,fe.jsx)(Sp.Provider,{scope:e.__scopeMenu,children:(0,fe.jsx)(it,{present:o||a.open,children:(0,fe.jsx)(Sp.Slot,{scope:e.__scopeMenu,children:(0,fe.jsx)(oR,{id:s.contentId,"aria-labelledby":s.triggerId,...n,ref:u,align:"start",side:i.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:c=>{i.isUsingKeyboardRef.current&&l.current?.focus(),c.preventDefault()},onCloseAutoFocus:c=>c.preventDefault(),onFocusOutside:H(e.onFocusOutside,c=>{c.target!==s.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:H(e.onEscapeKeyDown,c=>{i.onClose(),c.preventDefault()}),onKeyDown:H(e.onKeyDown,c=>{let d=c.currentTarget.contains(c.target),f=TX[i.dir].includes(c.key);d&&f&&(a.onOpenChange(!1),s.trigger?.focus(),c.preventDefault())})})})})})});UV.displayName=HV;function zV(e){return e?"open":"closed"}function uy(e){return e==="indeterminate"}function sR(e){return uy(e)?"indeterminate":e?"checked":"unchecked"}function $X(e){let t=document.activeElement;for(let r of e)if(r===t||(r.focus(),document.activeElement!==t))return}function KX(e,t){return e.map((r,o)=>e[(t+o)%e.length])}function XX(e,t,r){let n=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,a=r?e.indexOf(r):-1,i=KX(e,Math.max(a,0));n.length===1&&(i=i.filter(u=>u!==r));let l=i.find(u=>u.toLowerCase().startsWith(n.toLowerCase()));return l!==r?l:void 0}function YX(e,t){let{x:r,y:o}=e,n=!1;for(let a=0,i=t.length-1;a<t.length;i=a++){let s=t[a],l=t[i],u=s.x,c=s.y,d=l.x,f=l.y;c>o!=f>o&&r<(d-u)*(o-c)/(f-c)+u&&(n=!n)}return n}function QX(e,t){if(!t)return!1;let r={x:e.clientX,y:e.clientY};return YX(r,t)}function bp(e){return t=>t.pointerType==="mouse"?e(t):void 0}var WV=SV,GV=eR,jV=RV,qV=LV,$V=nR,KV=IV,XV=cy,YV=TV,QV=MV,ZV=AV,JV=NV,eB=_V,tB=OV,rB=VV,oB=BV,nB=UV;var Ft=R(M(),1),dy="DropdownMenu",[JX,hTe]=Te(dy,[Jb]),Cr=Jb(),[eY,aB]=JX(dy),iB=e=>{let{__scopeDropdownMenu:t,children:r,dir:o,open:n,defaultOpen:a,onOpenChange:i,modal:s=!0}=e,l=Cr(t),u=Vt.useRef(null),[c,d]=ze({prop:n,defaultProp:a??!1,onChange:i,caller:dy});return(0,Ft.jsx)(eY,{scope:t,triggerId:qe(),triggerRef:u,contentId:qe(),open:c,onOpenChange:d,onOpenToggle:Vt.useCallback(()=>d(f=>!f),[d]),modal:s,children:(0,Ft.jsx)(WV,{...l,open:c,onOpenChange:d,dir:o,modal:s,children:r})})};iB.displayName=dy;var sB="DropdownMenuTrigger",lB=Vt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,disabled:o=!1,...n}=e,a=aB(sB,r),i=Cr(r);return(0,Ft.jsx)(GV,{asChild:!0,...i,children:(0,Ft.jsx)($.button,{type:"button",id:a.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?"open":"closed","data-disabled":o?"":void 0,disabled:o,...n,ref:ls(t,a.triggerRef),onPointerDown:H(e.onPointerDown,s=>{!o&&s.button===0&&s.ctrlKey===!1&&(a.onOpenToggle(),a.open||s.preventDefault())}),onKeyDown:H(e.onKeyDown,s=>{o||(["Enter"," "].includes(s.key)&&a.onOpenToggle(),s.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(s.key)&&s.preventDefault())})})})});lB.displayName=sB;var tY="DropdownMenuPortal",uB=e=>{let{__scopeDropdownMenu:t,...r}=e,o=Cr(t);return(0,Ft.jsx)(jV,{...o,...r})};uB.displayName=tY;var cB="DropdownMenuContent",dB=Vt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=aB(cB,r),a=Cr(r),i=Vt.useRef(!1);return(0,Ft.jsx)(qV,{id:n.contentId,"aria-labelledby":n.triggerId,...a,...o,ref:t,onCloseAutoFocus:H(e.onCloseAutoFocus,s=>{i.current||n.triggerRef.current?.focus(),i.current=!1,s.preventDefault()}),onInteractOutside:H(e.onInteractOutside,s=>{let l=s.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0,c=l.button===2||u;(!n.modal||c)&&(i.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)"}})});dB.displayName=cB;var rY="DropdownMenuGroup",fB=Vt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=Cr(r);return(0,Ft.jsx)($V,{...n,...o,ref:t})});fB.displayName=rY;var oY="DropdownMenuLabel",pB=Vt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=Cr(r);return(0,Ft.jsx)(KV,{...n,...o,ref:t})});pB.displayName=oY;var nY="DropdownMenuItem",mB=Vt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=Cr(r);return(0,Ft.jsx)(XV,{...n,...o,ref:t})});mB.displayName=nY;var aY="DropdownMenuCheckboxItem",gB=Vt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=Cr(r);return(0,Ft.jsx)(YV,{...n,...o,ref:t})});gB.displayName=aY;var iY="DropdownMenuRadioGroup",hB=Vt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=Cr(r);return(0,Ft.jsx)(QV,{...n,...o,ref:t})});hB.displayName=iY;var sY="DropdownMenuRadioItem",vB=Vt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=Cr(r);return(0,Ft.jsx)(ZV,{...n,...o,ref:t})});vB.displayName=sY;var lY="DropdownMenuItemIndicator",yB=Vt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=Cr(r);return(0,Ft.jsx)(JV,{...n,...o,ref:t})});yB.displayName=lY;var uY="DropdownMenuSeparator",xB=Vt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=Cr(r);return(0,Ft.jsx)(eB,{...n,...o,ref:t})});xB.displayName=uY;var cY="DropdownMenuArrow",dY=Vt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=Cr(r);return(0,Ft.jsx)(tB,{...n,...o,ref:t})});dY.displayName=cY;var fY=e=>{let{__scopeDropdownMenu:t,children:r,open:o,onOpenChange:n,defaultOpen:a}=e,i=Cr(t),[s,l]=ze({prop:o,defaultProp:a??!1,onChange:n,caller:"DropdownMenuSub"});return(0,Ft.jsx)(rB,{...i,open:s,onOpenChange:l,children:r})},pY="DropdownMenuSubTrigger",wB=Vt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=Cr(r);return(0,Ft.jsx)(oB,{...n,...o,ref:t})});wB.displayName=pY;var mY="DropdownMenuSubContent",CB=Vt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=Cr(r);return(0,Ft.jsx)(nB,{...n,...o,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)"}})});CB.displayName=mY;var SB=iB,bB=lB,lR=uB,uR=dB,RB=fB,cR=pB,dR=mB,fR=gB,LB=hB,pR=vB,mR=yB,gR=xB;var IB=fY,hR=wB,vR=CB;var Bt=R(M()),hY=SB,vY=bB,yY=RB,xY=lR,wY=IB,CY=LB,PB=Ga.forwardRef(({className:e,inset:t,children:r,...o},n)=>(0,Bt.jsxs)(hR,{ref:n,className:I("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",t&&"pl-8",e),...o,children:[r,(0,Bt.jsx)(Pr,{className:"ml-auto h-4 w-4"})]}));PB.displayName=hR.displayName;var TB=Ga.forwardRef(({className:e,...t},r)=>(0,Bt.jsx)(vR,{ref:r,className:I("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));TB.displayName=vR.displayName;var kB=Ga.forwardRef(({className:e,sideOffset:t=4,...r},o)=>(0,Bt.jsx)(lR,{children:(0,Bt.jsx)(uR,{ref:o,sideOffset:t,className:I("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r})}));kB.displayName=uR.displayName;var MB=Ga.forwardRef(({className:e,inset:t,...r},o)=>(0,Bt.jsx)(dR,{ref:o,className:I("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",e),...r}));MB.displayName=dR.displayName;var EB=Ga.forwardRef(({className:e,children:t,checked:r,...o},n)=>(0,Bt.jsxs)(fR,{ref:n,className:I("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:r,...o,children:[(0,Bt.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,Bt.jsx)(mR,{children:(0,Bt.jsx)(lr,{className:"h-4 w-4"})})}),t]}));EB.displayName=fR.displayName;var AB=Ga.forwardRef(({className:e,children:t,...r},o)=>(0,Bt.jsxs)(pR,{ref:o,className:I("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r,children:[(0,Bt.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,Bt.jsx)(mR,{children:(0,Bt.jsx)(Is,{className:"h-2 w-2 fill-current"})})}),t]}));AB.displayName=pR.displayName;var DB=Ga.forwardRef(({className:e,inset:t,...r},o)=>(0,Bt.jsx)(cR,{ref:o,className:I("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...r}));DB.displayName=cR.displayName;var NB=Ga.forwardRef(({className:e,...t},r)=>(0,Bt.jsx)(gR,{ref:r,className:I("moonui-theme","-mx-1 my-1 h-px bg-muted",e),...t}));NB.displayName=gR.displayName;var _B=({className:e,...t})=>(0,Bt.jsx)("span",{className:I("moonui-theme","ml-auto text-xs tracking-widest opacity-60",e),...t});_B.displayName="DropdownMenuShortcut";var xo=R(E());var OB=R(E());var ja=R(M()),SY=ee("relative overflow-hidden bg-muted",{variants:{variant:{default:"bg-muted",primary:"bg-primary/20",secondary:"bg-secondary/20",success:"bg-success/20",warning:"bg-warning/20",error:"bg-error/20"},size:{xs:"h-1",sm:"h-1.5",default:"h-2",md:"h-2.5",lg:"h-3",xl:"h-4"},radius:{none:"rounded-none",sm:"rounded-sm",default:"rounded-md",lg:"rounded-lg",full:"rounded-full"},animation:{default:"[&>div]:transition-all [&>div]:duration-500",smooth:"[&>div]:transition-all [&>div]:duration-700",fast:"[&>div]:transition-all [&>div]:duration-300",none:""}},defaultVariants:{variant:"default",size:"default",radius:"full",animation:"default"}}),bY=ee("h-full w-full flex-1",{variants:{variant:{default:"bg-foreground",primary:"bg-primary",secondary:"bg-secondary",success:"bg-success",warning:"bg-warning",error:"bg-error"},animation:{default:"transition-all duration-500",smooth:"transition-all duration-700",fast:"transition-all duration-300",none:""}},defaultVariants:{variant:"primary",animation:"default"}}),fy=OB.forwardRef(({className:e,value:t=0,variant:r,size:o,radius:n,animation:a,indicatorVariant:i,showValueLabel:s=!1,valueLabel:l,labelClassName:u,indeterminate:c=!1,max:d=100,...f},p)=>{let h=Math.max(0,Math.min(t,d)),m=d>0?h/d*100:0,x=l||`${Math.round(m)}%`;return(0,ja.jsxs)(ja.Fragment,{children:[s&&(0,ja.jsx)("div",{className:"flex justify-between items-center mb-1",children:(0,ja.jsx)("span",{className:I("text-sm font-medium text-muted-foreground",u),children:x})}),(0,ja.jsx)("div",{ref:p,className:I("moonui-theme",SY({variant:r,size:o,radius:n,animation:a}),e),role:"progressbar","aria-valuemin":0,"aria-valuemax":d,"aria-valuenow":c?void 0:h,...f,children:(0,ja.jsx)("div",{className:I(bY({variant:i||"primary",animation:a}),c&&"animate-indeterminate-progress"),style:c?{}:{transform:`translateX(-${100-m}%)`}})})]})});fy.displayName="Progress";var ue=R(M()),RY=e=>e.startsWith("image/")?(0,ue.jsx)(Ts,{className:"h-4 w-4"}):e.startsWith("video/")?(0,ue.jsx)(ef,{className:"h-4 w-4"}):e.startsWith("audio/")?(0,ue.jsx)(qd,{className:"h-4 w-4"}):e.includes("text")||e.includes("document")?(0,ue.jsx)(Vd,{className:"h-4 w-4"}):(0,ue.jsx)(Bd,{className:"h-4 w-4"}),yR=e=>{if(e===0)return"0 Bytes";let t=1024,r=["Bytes","KB","MB","GB"],o=Math.floor(Math.log(e)/Math.log(t));return parseFloat((e/Math.pow(t,o)).toFixed(2))+" "+r[o]},LY=({uploadedFile:e,onRemove:t})=>{let{id:r,file:o,progress:n,status:a,preview:i}=e;return(0,ue.jsxs)(Ee.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"flex items-center space-x-3 p-3 border rounded-lg bg-background",children:[(0,ue.jsx)("div",{className:"flex-shrink-0",children:i?(0,ue.jsx)("img",{src:i,alt:o.name,className:"h-10 w-10 object-cover rounded"}):(0,ue.jsx)("div",{className:"h-10 w-10 rounded bg-muted flex items-center justify-center",children:RY(o.type)})}),(0,ue.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,ue.jsxs)("div",{className:"flex items-center justify-between",children:[(0,ue.jsx)("p",{className:"text-sm font-medium truncate",children:o.name}),(0,ue.jsx)(Ve,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0",onClick:()=>t(r),children:(0,ue.jsx)(co,{className:"h-3 w-3"})})]}),(0,ue.jsxs)("div",{className:"flex items-center space-x-2 mt-1",children:[(0,ue.jsx)("p",{className:"text-xs text-muted-foreground",children:yR(o.size)}),a==="uploading"&&(0,ue.jsxs)(fo,{variant:"secondary",className:"h-5",children:[(0,ue.jsx)(Nt,{className:"h-3 w-3 mr-1 animate-spin"}),"Uploading"]}),a==="success"&&(0,ue.jsxs)(fo,{variant:"success",className:"h-5",children:[(0,ue.jsx)(gi,{className:"h-3 w-3 mr-1"}),"Done"]}),a==="error"&&(0,ue.jsxs)(fo,{variant:"destructive",className:"h-5",children:[(0,ue.jsx)(sn,{className:"h-3 w-3 mr-1"}),"Error"]})]}),a==="uploading"&&(0,ue.jsx)("div",{className:"mt-2",children:(0,ue.jsx)(fy,{value:n,className:"h-1"})})]})]})},FB=xo.default.forwardRef(({accept:e="*",multiple:t=!0,maxSize:r=10*1024*1024,maxFiles:o=5,disabled:n=!1,className:a,onUpload:i,onRemove:s,children:l,...u},c)=>{let[d,f]=(0,xo.useState)([]),[p,h]=(0,xo.useState)(!1),[m,x]=(0,xo.useState)(null),v=L=>L.size>r?`File size exceeds ${yR(r)}`:e!=="*"&&!e.split(",").some(T=>{let P=T.trim();return P.includes("*")?L.type.startsWith(P.replace("*","")):L.type===P})?"File type not supported":null,g=(0,xo.useCallback)(async L=>{let T=Array.from(L);if(x(null),d.length+T.length>o){x(`Maximum ${o} files allowed`);return}let P=[],A=[];if(T.forEach(G=>{let D=v(G);D?A.push(`${G.name}: ${D}`):P.push(G)}),A.length>0){x(A.join(", "));return}let _=P.map((G,D)=>({id:`${Date.now()}-${D}-${G.name.replace(/[^a-zA-Z0-9]/g,"")}`,file:G,progress:0,status:"uploading",preview:G.type.startsWith("image/")?URL.createObjectURL(G):void 0}));f(G=>[...G,..._]);for(let G of _){let D=0,W=setInterval(()=>{D+=15+G.file.size%10,D>=100?(D=100,clearInterval(W),f(N=>N.map(z=>z.id===G.id?{...z,progress:100,status:"success"}:z))):f(N=>N.map(z=>z.id===G.id?{...z,progress:D}:z))},200)}if(i)try{await i(P)}catch(G){console.error("Upload failed:",G),f(D=>D.map(W=>_.some(N=>N.id===W.id)?{...W,status:"error"}:W))}},[d.length,o,r,e,i]),y=(0,xo.useCallback)(L=>{if(L.preventDefault(),h(!1),n)return;let T=L.dataTransfer.files;T.length>0&&g(T)},[g,n]),w=(0,xo.useCallback)(L=>{L.preventDefault(),n||h(!0)},[n]),C=(0,xo.useCallback)(L=>{L.preventDefault(),h(!1)},[]),b=(0,xo.useCallback)(L=>{let T=L.target.files;T&&T.length>0&&g(T),L.target.value=""},[g]),S=(0,xo.useCallback)(L=>{f(T=>{let P=T.find(A=>A.id===L);return P?.preview&&URL.revokeObjectURL(P.preview),T.filter(A=>A.id!==L)}),s&&s(L)},[s]);return(0,ue.jsxs)("div",{ref:c,className:I("moonui-theme","space-y-4",a),...u,children:[(0,ue.jsxs)(Ee.div,{className:I("relative border-2 border-dashed rounded-lg p-8 text-center transition-colors",p&&"border-primary bg-primary/5",n&&"opacity-50 cursor-not-allowed",!n&&"hover:border-primary/50 cursor-pointer"),onDrop:y,onDragOver:w,onDragLeave:C,animate:{scale:p?1.02:1,borderColor:p?"hsl(var(--primary))":"hsl(var(--border))"},children:[(0,ue.jsx)("input",{type:"file",accept:e,multiple:t,disabled:n,onChange:b,className:"absolute inset-0 w-full h-full opacity-0 cursor-pointer"}),l||(0,ue.jsxs)("div",{className:"space-y-4",children:[(0,ue.jsx)("div",{className:"mx-auto h-12 w-12 text-muted-foreground",children:(0,ue.jsx)(Jd,{className:"h-full w-full"})}),(0,ue.jsxs)("div",{children:[(0,ue.jsx)("p",{className:"text-lg font-medium",children:p?"Drop files here":"Upload files"}),(0,ue.jsx)("p",{className:"text-sm text-muted-foreground",children:"Drag & drop files here, or click to select"}),(0,ue.jsxs)("p",{className:"text-xs text-muted-foreground mt-2",children:["Max ",o," files, ",yR(r)," each"]})]}),(0,ue.jsx)(Ve,{variant:"outline",disabled:n,children:"Select Files"})]})]}),(0,ue.jsx)(ba,{children:m&&(0,ue.jsxs)(Ee.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"flex items-center space-x-2 text-sm text-destructive",children:[(0,ue.jsx)(sn,{className:"h-4 w-4"}),(0,ue.jsx)("span",{children:m})]})}),(0,ue.jsx)(ba,{children:d.length>0&&(0,ue.jsxs)(Ee.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:"space-y-2",children:[(0,ue.jsxs)("h4",{className:"text-sm font-medium",children:["Uploaded Files (",d.length,")"]}),(0,ue.jsx)("div",{className:"space-y-2",children:(0,ue.jsx)(ba,{children:d.map(L=>(0,ue.jsx)(LY,{uploadedFile:L,onRemove:S},L.id))})})]})})]})});FB.displayName="FileUpload";var VB=R(E());var Cl=R(M()),BB=VB.default.forwardRef(({children:e,isOpen:t,onOpenChange:r,direction:o="up",threshold:n=50,className:a,overlayClassName:i,enableSwipeToClose:s=!0,...l},u)=>{let c=Yu(0),d=Yu(0),f=o==="up"||o==="down",p=f?c:d,h=DC(p,[0,n],[1,.5]),m=(g,y)=>{if(!s)return;let w=f?y.offset.y:y.offset.x,C=f?y.velocity.y:y.velocity.x,b=!1;switch(o){case"up":b=w>n||C>500;break;case"down":b=w<-n||C<-500;break;case"left":b=w>n||C>500;break;case"right":b=w<-n||C<-500;break}b?r(!1):OC(p,0,{type:"spring",stiffness:300,damping:20})},x=()=>{switch(o){case"up":return{y:"100%"};case"down":return{y:"-100%"};case"left":return{x:"100%"};case"right":return{x:"-100%"};default:return{y:"100%"}}},v=()=>f?{y:0}:{x:0};return t?(0,Cl.jsxs)("div",{className:"fixed inset-0 z-50",children:[(0,Cl.jsx)(Ee.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:()=>r(!1),className:I("absolute inset-0 bg-black/50",i)}),(0,Cl.jsxs)(Ee.div,{ref:u,drag:s?f?"y":"x":!1,dragConstraints:{top:o==="up"?0:void 0,bottom:o==="down"?0:void 0,left:o==="left"?0:void 0,right:o==="right"?0:void 0},dragElastic:.2,onDragEnd:m,style:{[f?"y":"x"]:p,opacity:h},initial:x(),animate:v(),exit:x(),transition:{type:"spring",damping:30,stiffness:300},className:I("absolute bg-background border shadow-lg",{"bottom-0 left-0 right-0 rounded-t-lg":o==="up","top-0 left-0 right-0 rounded-b-lg":o==="down","top-0 bottom-0 right-0 rounded-l-lg":o==="left","top-0 bottom-0 left-0 rounded-r-lg":o==="right"},a),...l,children:[(o==="up"||o==="down")&&(0,Cl.jsx)("div",{className:"flex justify-center p-2",children:(0,Cl.jsx)("div",{className:"w-12 h-1 bg-muted rounded-full"})}),e]})]}):null});BB.displayName="GestureDrawer";var es=R(E());var Xe=R(M());function IY({className:e,size:t="md",showForks:r=!0,showWatchers:o=!1,repoUrl:n="https://github.com/moonui/moonui"}){let[a,i]=(0,es.useState)(null),[s,l]=(0,es.useState)(!0);(0,es.useEffect)(()=>{(async()=>{try{let h=await(await fetch("/api/github-stars")).json();i(h)}catch(p){console.error("Failed to fetch GitHub stats:",p),i({stars:1240,forks:89,watchers:156,isLive:!1})}finally{l(!1)}})()},[]);let u=f=>f>=1e3?(f/1e3).toFixed(1)+"k":f.toString(),c={sm:"text-sm gap-2",md:"text-base gap-3",lg:"text-lg gap-4"},d={sm:14,md:16,lg:20};return s?(0,Xe.jsxs)("div",{className:I("flex items-center animate-pulse",c[t],e),children:[(0,Xe.jsxs)("div",{className:"flex items-center gap-1",children:[(0,Xe.jsx)("div",{className:"w-4 h-4 bg-gray-300 dark:bg-gray-700 rounded"}),(0,Xe.jsx)("div",{className:"w-8 h-4 bg-gray-300 dark:bg-gray-700 rounded"})]}),r&&(0,Xe.jsxs)("div",{className:"flex items-center gap-1",children:[(0,Xe.jsx)("div",{className:"w-4 h-4 bg-gray-300 dark:bg-gray-700 rounded"}),(0,Xe.jsx)("div",{className:"w-6 h-4 bg-gray-300 dark:bg-gray-700 rounded"})]})]}):a?(0,Xe.jsxs)("div",{className:I("flex items-center",c[t],e),children:[(0,Xe.jsxs)("a",{href:n,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-gray-700 dark:text-gray-300 hover:text-primary transition-colors",children:[(0,Xe.jsx)(fu,{className:"fill-current text-yellow-500",size:d[t]}),(0,Xe.jsx)("span",{className:"font-medium",children:u(a.stars)})]}),r&&(0,Xe.jsxs)("a",{href:`${n}/network/members`,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-gray-700 dark:text-gray-300 hover:text-primary transition-colors",children:[(0,Xe.jsx)(Hd,{size:d[t]}),(0,Xe.jsx)("span",{className:"font-medium",children:u(a.forks)})]}),o&&(0,Xe.jsxs)("a",{href:`${n}/watchers`,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-gray-700 dark:text-gray-300 hover:text-primary transition-colors",children:[(0,Xe.jsx)(Ps,{size:d[t]}),(0,Xe.jsx)("span",{className:"font-medium",children:u(a.watchers)})]}),!a.isLive&&(0,Xe.jsx)("span",{className:"text-xs text-gray-500 dark:text-gray-500 ml-2",children:"(demo)"})]}):null}function UTe({className:e,size:t="md",repoUrl:r="https://github.com/moonui/moonui"}){let[o,n]=(0,es.useState)(null),[a,i]=(0,es.useState)(!0);(0,es.useEffect)(()=>{(async()=>{try{let c=await(await fetch("/api/github-stars")).json();n(c.stars)}catch(u){console.error("Failed to fetch GitHub stats:",u),n(1240)}finally{i(!1)}})()},[]);let s=l=>l>=1e3?(l/1e3).toFixed(1)+"k":l.toString();return(0,Xe.jsx)(Ve,{variant:"outline",size:t,className:I("moonui-theme","group",e),asChild:!0,children:(0,Xe.jsxs)("a",{href:r,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2",children:[(0,Xe.jsx)(fu,{className:"fill-current text-yellow-500 group-hover:scale-110 transition-transform",size:16}),(0,Xe.jsx)("span",{children:"Star on GitHub"}),!a&&o&&(0,Xe.jsx)("span",{className:"px-2 py-0.5 bg-gray-100 dark:bg-gray-800 rounded-full text-xs font-medium",children:s(o)}),(0,Xe.jsx)(Fd,{size:14,className:"opacity-50 group-hover:opacity-100 transition-opacity"})]})})}var Lc=R(E());var me=R(M());function HB({children:e,componentName:t,className:r,showPreview:o=!0,previewDuration:n=2e3}){let[a,i]=(0,Lc.useState)(!1),[s,l]=(0,Lc.useState)(null),u=()=>{if(!o)return;i(!0),s&&clearTimeout(s);let d=setTimeout(()=>{i(!1)},n);l(d)},c=()=>{s&&(clearTimeout(s),l(null)),i(!1)};return(0,me.jsxs)("div",{className:I("relative group cursor-pointer transition-all duration-300",r),onMouseEnter:u,onMouseLeave:c,children:[(0,me.jsx)("div",{className:I("transition-all duration-300",!a&&"blur-sm grayscale-[0.3] opacity-60"),children:e}),(0,me.jsx)("div",{className:I("absolute inset-0 bg-gradient-to-br from-amber-500/10 via-transparent to-purple-500/10","border-2 border-dashed border-amber-400/30 rounded-lg","flex items-center justify-center","transition-all duration-300",a?"opacity-0":"opacity-100"),children:(0,me.jsxs)("div",{className:"text-center space-y-3 p-6",children:[(0,me.jsx)("div",{className:"flex justify-center",children:(0,me.jsxs)(fo,{variant:"secondary",className:"bg-gradient-to-r from-amber-500 to-orange-500 text-white border-0 px-3 py-1",children:[(0,me.jsx)(lu,{className:"w-3 h-3 mr-1"}),"PRO ONLY"]})}),(0,me.jsx)("div",{className:"flex justify-center",children:(0,me.jsx)("div",{className:"p-3 rounded-full bg-amber-100 dark:bg-amber-900/30",children:(0,me.jsx)(cu,{className:"w-6 h-6 text-amber-600 dark:text-amber-400"})})}),(0,me.jsx)("h3",{className:"font-semibold text-gray-900 dark:text-gray-100",children:t}),(0,me.jsx)("p",{className:"text-sm text-gray-600 dark:text-gray-400 max-w-xs",children:"This premium component is available with Pro subscription"}),(0,me.jsxs)(Ve,{size:"sm",className:"bg-gradient-to-r from-amber-500 to-orange-500 hover:from-amber-600 hover:to-orange-600 border-0",onClick:()=>{typeof window<"u"&&(window.location.href="/pricing")},children:[(0,me.jsx)(pu,{className:"w-4 h-4 mr-2"}),"Upgrade to Pro"]})]})}),o&&!a&&(0,me.jsx)("div",{className:"absolute top-2 right-2 opacity-0 group-hover:opacity-100 transition-opacity duration-200",children:(0,me.jsx)("div",{className:"bg-black/80 text-white text-xs px-2 py-1 rounded",children:"Hover to preview"})})]})}function PY({children:e,componentId:t,componentName:r,className:o,fallback:n,requireCLI:a=!0}){let[i,s]=(0,Lc.useState)({isAuthenticated:!1,deviceValid:!1,hasProAccess:!1,loading:!0});if((0,Lc.useEffect)(()=>{if(!(()=>{let d={nodeEnv:!1,nextPublicEnv:process.env.NEXT_PUBLIC_VERCEL_ENV==="development",localhost:typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"||window.location.hostname.includes(".local")),port:typeof window<"u"&&(window.location.port==="3000"||window.location.port==="3001"||window.location.port==="8080"),vercelEnv:!process.env.VERCEL,ciEnv:!process.env.CI,deploymentEnv:!process.env.DEPLOYMENT_ENV};return process.env.VERCEL||process.env.NETLIFY||process.env.RENDER||process.env.RAILWAY_ENVIRONMENT||process.env.FLY_APP_NAME||process.env.DEPLOYMENT_ENV==="production"?!1:d.nodeEnv&&d.localhost&&!d.vercelEnv&&!d.ciEnv})()||!a){s({isAuthenticated:!0,deviceValid:!0,hasProAccess:!0,loading:!1});return}async function c(){try{let d=localStorage.getItem("moonui_cli_token"),f=localStorage.getItem("moonui_device_id");if(!d||!f){s({isAuthenticated:!1,deviceValid:!1,hasProAccess:!1,loading:!1});return}let p=await fetch("/api/device/validate",{method:"POST",headers:{Authorization:`Bearer ${d}`,"X-Device-ID":f,"Content-Type":"application/json"},body:JSON.stringify({environment:{nodeEnv:"production",hostname:window.location.hostname,port:window.location.port,protocol:window.location.protocol}})});if(p.ok){let h=await p.json();s({isAuthenticated:!0,deviceValid:h.valid,hasProAccess:h.hasProAccess,loading:!1})}else s({isAuthenticated:!1,deviceValid:!1,hasProAccess:!1,loading:!1})}catch{s({isAuthenticated:!1,deviceValid:!1,hasProAccess:!1,loading:!1})}}c()},[a]),i.loading)return(0,me.jsx)("div",{className:I("animate-pulse bg-gray-200 dark:bg-gray-800 rounded-lg h-32",o),children:(0,me.jsx)("div",{className:"flex items-center justify-center h-full",children:(0,me.jsx)("div",{className:"text-sm text-gray-500",children:"Loading..."})})});if((()=>{let u={nodeEnv:!1,localhost:typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"||window.location.hostname.includes(".local")),port:typeof window<"u"&&(window.location.port==="3000"||window.location.port==="3001"||window.location.port==="8080")};return process.env.VERCEL||process.env.NETLIFY||process.env.RENDER||process.env.RAILWAY_ENVIRONMENT||process.env.FLY_APP_NAME?!1:u.nodeEnv&&u.localhost})()&&a){if(!i.isAuthenticated)return(0,me.jsxs)("div",{className:I("relative",o),children:[(0,me.jsx)("div",{className:"blur-sm grayscale-[0.3] opacity-60 pointer-events-none",children:n||e}),(0,me.jsx)("div",{className:"absolute inset-0 bg-gradient-to-br from-red-500/10 via-transparent to-orange-500/10 border-2 border-dashed border-red-400/30 rounded-lg flex items-center justify-center",children:(0,me.jsxs)("div",{className:"text-center space-y-3 p-6",children:[(0,me.jsxs)(fo,{variant:"destructive",className:"mb-2",children:[(0,me.jsx)(cu,{className:"w-3 h-3 mr-1"}),"CLI AUTH REQUIRED"]}),(0,me.jsx)("h3",{className:"font-semibold text-gray-900 dark:text-gray-100",children:"CLI Authentication Required"}),(0,me.jsx)("p",{className:"text-sm text-gray-600 dark:text-gray-400 max-w-xs",children:"Run the following command to authenticate:"}),(0,me.jsx)("code",{className:"block bg-black/80 text-green-400 p-2 rounded text-xs",children:"npx moonui auth login"})]})})]});if(!i.deviceValid)return(0,me.jsxs)("div",{className:I("relative",o),children:[(0,me.jsx)("div",{className:"blur-sm grayscale-[0.3] opacity-60 pointer-events-none",children:n||e}),(0,me.jsx)("div",{className:"absolute inset-0 bg-gradient-to-br from-yellow-500/10 via-transparent to-orange-500/10 border-2 border-dashed border-yellow-400/30 rounded-lg flex items-center justify-center",children:(0,me.jsxs)("div",{className:"text-center space-y-3 p-6",children:[(0,me.jsxs)(fo,{variant:"secondary",className:"bg-yellow-500 text-white mb-2",children:[(0,me.jsx)(pu,{className:"w-3 h-3 mr-1"}),"DEVICE LIMIT"]}),(0,me.jsx)("h3",{className:"font-semibold text-gray-900 dark:text-gray-100",children:"Device Limit Exceeded"}),(0,me.jsx)("p",{className:"text-sm text-gray-600 dark:text-gray-400 max-w-xs",children:"This device is not registered or you've reached your device limit"}),(0,me.jsx)(Ve,{size:"sm",className:"bg-gradient-to-r from-yellow-500 to-orange-500",onClick:()=>window.open("/dashboard/devices","_blank"),children:"Manage Devices"})]})})]});if(!i.hasProAccess)return(0,me.jsx)(HB,{componentName:r||t,className:o,children:n||e})}return(0,me.jsx)("div",{className:o,children:e})}function TY({className:e}){return(0,me.jsxs)(fo,{variant:"secondary",className:I("bg-gradient-to-r from-amber-500 to-orange-500 text-white border-0 text-xs",e),children:[(0,me.jsx)(lu,{className:"w-3 h-3 mr-1"}),"PRO"]})}function kY({className:e}){return(0,me.jsx)(fo,{variant:"outline",className:I("border-green-500 text-green-600 dark:text-green-400 text-xs",e),children:"FREE"})}var UB=R(E());var $t=R(M());function xR({className:e,variant:t="default",showText:r=!0,...o}){let n=UB.useId(),a=`moon-gradient-${n}`,i=`moon-mask-${n}`;return(0,$t.jsxs)("div",{className:I("flex items-center gap-2",e),children:[(0,$t.jsxs)("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"flex-shrink-0",...o,children:[(0,$t.jsxs)("defs",{children:[t==="gradient"&&(0,$t.jsxs)("linearGradient",{id:a,x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[(0,$t.jsx)("stop",{offset:"0%",stopColor:"#3B82F6"}),(0,$t.jsx)("stop",{offset:"50%",stopColor:"#8B5CF6"}),(0,$t.jsx)("stop",{offset:"100%",stopColor:"#EC4899"})]}),(0,$t.jsxs)("mask",{id:i,children:[(0,$t.jsx)("rect",{width:"32",height:"32",fill:"white"}),(0,$t.jsx)("circle",{cx:"22",cy:"10",r:"10",fill:"black"})]})]}),(0,$t.jsx)("circle",{cx:"16",cy:"16",r:"14",fill:t==="gradient"?`url(#${a})`:"currentColor",className:t==="default"?"fill-primary":"",mask:`url(#${i})`})]}),r&&(0,$t.jsxs)("span",{className:"text-xl font-bold",children:[(0,$t.jsx)("span",{className:"text-foreground",children:"Moon"}),(0,$t.jsx)("span",{className:"text-primary",children:"UI"})]})]})}function QTe({className:e,variant:t="default",...r}){return(0,$t.jsx)(xR,{showText:!1,className:e,variant:t,...r})}function ZTe({className:e,variant:t="default",showText:r=!0,...o}){return(0,$t.jsx)(xR,{className:I("transition-all duration-300 hover:scale-105",e),variant:t,showText:r,...o})}var wR=R(E());var Or=R(M()),zB=({className:e,...t})=>(0,Or.jsx)("nav",{role:"navigation","aria-label":"pagination",className:I("moonui-theme","mx-auto flex w-full justify-center",e),...t});zB.displayName="Pagination";var WB=wR.forwardRef(({className:e,...t},r)=>(0,Or.jsx)("ul",{ref:r,className:I("moonui-theme","flex flex-row items-center gap-1",e),...t}));WB.displayName="PaginationContent";var GB=wR.forwardRef(({className:e,...t},r)=>(0,Or.jsx)("li",{ref:r,className:I("moonui-theme","",e),...t}));GB.displayName="PaginationItem";var py=({className:e,isActive:t,size:r="icon",...o})=>(0,Or.jsx)("a",{"aria-current":t?"page":void 0,className:I(Sg({variant:t?"outline":"ghost",size:r}),e),...o});py.displayName="PaginationLink";var jB=({className:e,...t})=>(0,Or.jsxs)(py,{"aria-label":"Go to previous page",size:"md",className:I("moonui-theme","gap-1 pl-2.5",e),...t,children:[(0,Or.jsx)(an,{className:"h-4 w-4"}),(0,Or.jsx)("span",{children:"Previous"})]});jB.displayName="PaginationPrevious";var qB=({className:e,...t})=>(0,Or.jsxs)(py,{"aria-label":"Go to next page",size:"md",className:I("moonui-theme","gap-1 pr-2.5",e),...t,children:[(0,Or.jsx)("span",{children:"Next"}),(0,Or.jsx)(Pr,{className:"h-4 w-4"})]});qB.displayName="PaginationNext";var $B=({className:e,...t})=>(0,Or.jsxs)("span",{"aria-hidden":!0,className:I("moonui-theme","flex h-9 w-9 items-center justify-center",e),...t,children:[(0,Or.jsx)(Hn,{className:"h-4 w-4"}),(0,Or.jsx)("span",{className:"sr-only",children:"More pages"})]});$B.displayName="PaginationEllipsis";var Mp=R(E());var os=R(E());var K=R(E(),1),TR=R(ru(),1);function CR(e,[t,r]){return Math.min(r,Math.max(t,e))}var KB=R(E(),1);var XB=R(M(),1),SR=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"}),MY="VisuallyHidden",Pp=KB.forwardRef((e,t)=>(0,XB.jsx)($.span,{...e,ref:t,style:{...SR,...e.style}}));Pp.displayName=MY;var YB=Pp;var ie=R(M(),1),AY=[" ","Enter","ArrowUp","ArrowDown"],DY=[" ","Enter"],Sl="Select",[gy,hy,NY]=En(Sl),[Ic,Tke]=Te(Sl,[NY,Uo]),vy=Uo(),[_Y,ts]=Ic(Sl),[OY,FY]=Ic(Sl),QB=e=>{let{__scopeSelect:t,children:r,open:o,defaultOpen:n,onOpenChange:a,value:i,defaultValue:s,onValueChange:l,dir:u,name:c,autoComplete:d,disabled:f,required:p,form:h}=e,m=vy(t),[x,v]=K.useState(null),[g,y]=K.useState(null),[w,C]=K.useState(!1),b=Vn(u),[S,L]=ze({prop:o,defaultProp:n??!1,onChange:a,caller:Sl}),[T,P]=ze({prop:i,defaultProp:s,onChange:l,caller:Sl}),A=K.useRef(null),_=x?h||!!x.closest("form"):!0,[G,D]=K.useState(new Set),W=Array.from(G).map(N=>N.props.value).join(";");return(0,ie.jsx)(Da,{...m,children:(0,ie.jsxs)(_Y,{required:p,scope:t,trigger:x,onTriggerChange:v,valueNode:g,onValueNodeChange:y,valueNodeHasChildren:w,onValueNodeHasChildrenChange:C,contentId:qe(),value:T,onValueChange:P,open:S,onOpenChange:L,dir:b,triggerPointerDownPosRef:A,disabled:f,children:[(0,ie.jsx)(gy.Provider,{scope:t,children:(0,ie.jsx)(OY,{scope:e.__scopeSelect,onNativeOptionAdd:K.useCallback(N=>{D(z=>new Set(z).add(N))},[]),onNativeOptionRemove:K.useCallback(N=>{D(z=>{let V=new Set(z);return V.delete(N),V})},[]),children:r})}),_?(0,ie.jsxs)(SH,{"aria-hidden":!0,required:p,tabIndex:-1,name:c,autoComplete:d,value:T,onChange:N=>P(N.target.value),disabled:f,form:h,children:[T===void 0?(0,ie.jsx)("option",{value:""}):null,Array.from(G)]},W):null]})})};QB.displayName=Sl;var ZB="SelectTrigger",JB=K.forwardRef((e,t)=>{let{__scopeSelect:r,disabled:o=!1,...n}=e,a=vy(r),i=ts(ZB,r),s=i.disabled||o,l=ne(t,i.onTriggerChange),u=hy(r),c=K.useRef("touch"),[d,f,p]=RH(m=>{let x=u().filter(y=>!y.disabled),v=x.find(y=>y.value===i.value),g=LH(x,m,v);g!==void 0&&i.onValueChange(g.value)}),h=m=>{s||(i.onOpenChange(!0),p()),m&&(i.triggerPointerDownPosRef.current={x:Math.round(m.pageX),y:Math.round(m.pageY)})};return(0,ie.jsx)(Na,{asChild:!0,...a,children:(0,ie.jsx)($.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:s,"data-disabled":s?"":void 0,"data-placeholder":bH(i.value)?"":void 0,...n,ref:l,onClick:H(n.onClick,m=>{m.currentTarget.focus(),c.current!=="mouse"&&h(m)}),onPointerDown:H(n.onPointerDown,m=>{c.current=m.pointerType;let x=m.target;x.hasPointerCapture(m.pointerId)&&x.releasePointerCapture(m.pointerId),m.button===0&&m.ctrlKey===!1&&m.pointerType==="mouse"&&(h(m),m.preventDefault())}),onKeyDown:H(n.onKeyDown,m=>{let x=d.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&f(m.key),!(x&&m.key===" ")&&AY.includes(m.key)&&(h(),m.preventDefault())})})})});JB.displayName=ZB;var eH="SelectValue",tH=K.forwardRef((e,t)=>{let{__scopeSelect:r,className:o,style:n,children:a,placeholder:i="",...s}=e,l=ts(eH,r),{onValueNodeHasChildrenChange:u}=l,c=a!==void 0,d=ne(t,l.onValueNodeChange);return ke(()=>{u(c)},[u,c]),(0,ie.jsx)($.span,{...s,ref:d,style:{pointerEvents:"none"},children:bH(l.value)?(0,ie.jsx)(ie.Fragment,{children:i}):a})});tH.displayName=eH;var VY="SelectIcon",rH=K.forwardRef((e,t)=>{let{__scopeSelect:r,children:o,...n}=e;return(0,ie.jsx)($.span,{"aria-hidden":!0,...n,ref:t,children:o||"\u25BC"})});rH.displayName=VY;var BY="SelectPortal",oH=e=>(0,ie.jsx)(vo,{asChild:!0,...e});oH.displayName=BY;var bl="SelectContent",nH=K.forwardRef((e,t)=>{let r=ts(bl,e.__scopeSelect),[o,n]=K.useState();if(ke(()=>{n(new DocumentFragment)},[]),!r.open){let a=o;return a?TR.createPortal((0,ie.jsx)(aH,{scope:e.__scopeSelect,children:(0,ie.jsx)(gy.Slot,{scope:e.__scopeSelect,children:(0,ie.jsx)("div",{children:e.children})})}),a):null}return(0,ie.jsx)(iH,{...e,ref:t})});nH.displayName=bl;var Tn=10,[aH,rs]=Ic(bl),HY="SelectContentImpl",UY=oo("SelectContent.RemoveScroll"),iH=K.forwardRef((e,t)=>{let{__scopeSelect:r,position:o="item-aligned",onCloseAutoFocus:n,onEscapeKeyDown:a,onPointerDownOutside:i,side:s,sideOffset:l,align:u,alignOffset:c,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:h,hideWhenDetached:m,avoidCollisions:x,...v}=e,g=ts(bl,r),[y,w]=K.useState(null),[C,b]=K.useState(null),S=ne(t,q=>w(q)),[L,T]=K.useState(null),[P,A]=K.useState(null),_=hy(r),[G,D]=K.useState(!1),W=K.useRef(!1);K.useEffect(()=>{if(y)return Wi(y)},[y]),Vi();let N=K.useCallback(q=>{let[pe,...be]=_().map(bt=>bt.ref.current),[_e]=be.slice(-1),nt=document.activeElement;for(let bt of q)if(bt===nt||(bt?.scrollIntoView({block:"nearest"}),bt===pe&&C&&(C.scrollTop=0),bt===_e&&C&&(C.scrollTop=C.scrollHeight),bt?.focus(),document.activeElement!==nt))return},[_,C]),z=K.useCallback(()=>N([L,y]),[N,L,y]);K.useEffect(()=>{G&&z()},[G,z]);let{onOpenChange:V,triggerPointerDownPosRef:k}=g;K.useEffect(()=>{if(y){let q={x:0,y:0},pe=_e=>{q={x:Math.abs(Math.round(_e.pageX)-(k.current?.x??0)),y:Math.abs(Math.round(_e.pageY)-(k.current?.y??0))}},be=_e=>{q.x<=10&&q.y<=10?_e.preventDefault():y.contains(_e.target)||V(!1),document.removeEventListener("pointermove",pe),k.current=null};return k.current!==null&&(document.addEventListener("pointermove",pe),document.addEventListener("pointerup",be,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",pe),document.removeEventListener("pointerup",be,{capture:!0})}}},[y,V,k]),K.useEffect(()=>{let q=()=>V(!1);return window.addEventListener("blur",q),window.addEventListener("resize",q),()=>{window.removeEventListener("blur",q),window.removeEventListener("resize",q)}},[V]);let[Z,ve]=RH(q=>{let pe=_().filter(nt=>!nt.disabled),be=pe.find(nt=>nt.ref.current===document.activeElement),_e=LH(pe,q,be);_e&&setTimeout(()=>_e.ref.current.focus())}),O=K.useCallback((q,pe,be)=>{let _e=!W.current&&!be;(g.value!==void 0&&g.value===pe||_e)&&(T(q),_e&&(W.current=!0))},[g.value]),J=K.useCallback(()=>y?.focus(),[y]),ae=K.useCallback((q,pe,be)=>{let _e=!W.current&&!be;(g.value!==void 0&&g.value===pe||_e)&&A(q)},[g.value]),Y=o==="popper"?bR:sH,ce=Y===bR?{side:s,sideOffset:l,align:u,alignOffset:c,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:h,hideWhenDetached:m,avoidCollisions:x}:{};return(0,ie.jsx)(aH,{scope:r,content:y,viewport:C,onViewportChange:b,itemRefCallback:O,selectedItem:L,onItemLeave:J,itemTextRefCallback:ae,focusSelectedItem:z,selectedItemText:P,position:o,isPositioned:G,searchRef:Z,children:(0,ie.jsx)(_a,{as:UY,allowPinchZoom:!0,children:(0,ie.jsx)(Ea,{asChild:!0,trapped:g.open,onMountAutoFocus:q=>{q.preventDefault()},onUnmountAutoFocus:H(n,q=>{g.trigger?.focus({preventScroll:!0}),q.preventDefault()}),children:(0,ie.jsx)(Fo,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:q=>q.preventDefault(),onDismiss:()=>g.onOpenChange(!1),children:(0,ie.jsx)(Y,{role:"listbox",id:g.contentId,"data-state":g.open?"open":"closed",dir:g.dir,onContextMenu:q=>q.preventDefault(),...v,...ce,onPlaced:()=>D(!0),ref:S,style:{display:"flex",flexDirection:"column",outline:"none",...v.style},onKeyDown:H(v.onKeyDown,q=>{let pe=q.ctrlKey||q.altKey||q.metaKey;if(q.key==="Tab"&&q.preventDefault(),!pe&&q.key.length===1&&ve(q.key),["ArrowUp","ArrowDown","Home","End"].includes(q.key)){let _e=_().filter(nt=>!nt.disabled).map(nt=>nt.ref.current);if(["ArrowUp","End"].includes(q.key)&&(_e=_e.slice().reverse()),["ArrowUp","ArrowDown"].includes(q.key)){let nt=q.target,bt=_e.indexOf(nt);_e=_e.slice(bt+1)}setTimeout(()=>N(_e)),q.preventDefault()}})})})})})})});iH.displayName=HY;var zY="SelectItemAlignedPosition",sH=K.forwardRef((e,t)=>{let{__scopeSelect:r,onPlaced:o,...n}=e,a=ts(bl,r),i=rs(bl,r),[s,l]=K.useState(null),[u,c]=K.useState(null),d=ne(t,S=>c(S)),f=hy(r),p=K.useRef(!1),h=K.useRef(!0),{viewport:m,selectedItem:x,selectedItemText:v,focusSelectedItem:g}=i,y=K.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&u&&m&&x&&v){let S=a.trigger.getBoundingClientRect(),L=u.getBoundingClientRect(),T=a.valueNode.getBoundingClientRect(),P=v.getBoundingClientRect();if(a.dir!=="rtl"){let nt=P.left-L.left,bt=T.left-nt,So=S.left-bt,ss=S.width+So,Oy=Math.max(ss,L.width),Fy=window.innerWidth-Tn,Vy=CR(bt,[Tn,Math.max(Tn,Fy-Oy)]);s.style.minWidth=ss+"px",s.style.left=Vy+"px"}else{let nt=L.right-P.right,bt=window.innerWidth-T.right-nt,So=window.innerWidth-S.right-bt,ss=S.width+So,Oy=Math.max(ss,L.width),Fy=window.innerWidth-Tn,Vy=CR(bt,[Tn,Math.max(Tn,Fy-Oy)]);s.style.minWidth=ss+"px",s.style.right=Vy+"px"}let A=f(),_=window.innerHeight-Tn*2,G=m.scrollHeight,D=window.getComputedStyle(u),W=parseInt(D.borderTopWidth,10),N=parseInt(D.paddingTop,10),z=parseInt(D.borderBottomWidth,10),V=parseInt(D.paddingBottom,10),k=W+N+G+V+z,Z=Math.min(x.offsetHeight*5,k),ve=window.getComputedStyle(m),O=parseInt(ve.paddingTop,10),J=parseInt(ve.paddingBottom,10),ae=S.top+S.height/2-Tn,Y=_-ae,ce=x.offsetHeight/2,q=x.offsetTop+ce,pe=W+N+q,be=k-pe;if(pe<=ae){let nt=A.length>0&&x===A[A.length-1].ref.current;s.style.bottom="0px";let bt=u.clientHeight-m.offsetTop-m.offsetHeight,So=Math.max(Y,ce+(nt?J:0)+bt+z),ss=pe+So;s.style.height=ss+"px"}else{let nt=A.length>0&&x===A[0].ref.current;s.style.top="0px";let So=Math.max(ae,W+m.offsetTop+(nt?O:0)+ce)+be;s.style.height=So+"px",m.scrollTop=pe-ae+m.offsetTop}s.style.margin=`${Tn}px 0`,s.style.minHeight=Z+"px",s.style.maxHeight=_+"px",o?.(),requestAnimationFrame(()=>p.current=!0)}},[f,a.trigger,a.valueNode,s,u,m,x,v,a.dir,o]);ke(()=>y(),[y]);let[w,C]=K.useState();ke(()=>{u&&C(window.getComputedStyle(u).zIndex)},[u]);let b=K.useCallback(S=>{S&&h.current===!0&&(y(),g?.(),h.current=!1)},[y,g]);return(0,ie.jsx)(GY,{scope:r,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:b,children:(0,ie.jsx)("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:w},children:(0,ie.jsx)($.div,{...n,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...n.style}})})})});sH.displayName=zY;var WY="SelectPopperPosition",bR=K.forwardRef((e,t)=>{let{__scopeSelect:r,align:o="start",collisionPadding:n=Tn,...a}=e,i=vy(r);return(0,ie.jsx)(Ui,{...i,...a,ref:t,align:o,collisionPadding:n,style:{boxSizing:"border-box",...a.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)"}})});bR.displayName=WY;var[GY,kR]=Ic(bl,{}),RR="SelectViewport",lH=K.forwardRef((e,t)=>{let{__scopeSelect:r,nonce:o,...n}=e,a=rs(RR,r),i=kR(RR,r),s=ne(t,a.onViewportChange),l=K.useRef(0);return(0,ie.jsxs)(ie.Fragment,{children:[(0,ie.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:o}),(0,ie.jsx)(gy.Slot,{scope:r,children:(0,ie.jsx)($.div,{"data-radix-select-viewport":"",role:"presentation",...n,ref:s,style:{position:"relative",flex:1,overflow:"hidden auto",...n.style},onScroll:H(n.onScroll,u=>{let c=u.currentTarget,{contentWrapper:d,shouldExpandOnScrollRef:f}=i;if(f?.current&&d){let p=Math.abs(l.current-c.scrollTop);if(p>0){let h=window.innerHeight-Tn*2,m=parseFloat(d.style.minHeight),x=parseFloat(d.style.height),v=Math.max(m,x);if(v<h){let g=v+p,y=Math.min(h,g),w=g-y;d.style.height=y+"px",d.style.bottom==="0px"&&(c.scrollTop=w>0?w:0,d.style.justifyContent="flex-end")}}}l.current=c.scrollTop})})})]})});lH.displayName=RR;var uH="SelectGroup",[jY,qY]=Ic(uH),cH=K.forwardRef((e,t)=>{let{__scopeSelect:r,...o}=e,n=qe();return(0,ie.jsx)(jY,{scope:r,id:n,children:(0,ie.jsx)($.div,{role:"group","aria-labelledby":n,...o,ref:t})})});cH.displayName=uH;var dH="SelectLabel",fH=K.forwardRef((e,t)=>{let{__scopeSelect:r,...o}=e,n=qY(dH,r);return(0,ie.jsx)($.div,{id:n.id,...o,ref:t})});fH.displayName=dH;var my="SelectItem",[$Y,pH]=Ic(my),mH=K.forwardRef((e,t)=>{let{__scopeSelect:r,value:o,disabled:n=!1,textValue:a,...i}=e,s=ts(my,r),l=rs(my,r),u=s.value===o,[c,d]=K.useState(a??""),[f,p]=K.useState(!1),h=ne(t,g=>l.itemRefCallback?.(g,o,n)),m=qe(),x=K.useRef("touch"),v=()=>{n||(s.onValueChange(o),s.onOpenChange(!1))};if(o==="")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(0,ie.jsx)($Y,{scope:r,value:o,disabled:n,textId:m,isSelected:u,onItemTextChange:K.useCallback(g=>{d(y=>y||(g?.textContent??"").trim())},[]),children:(0,ie.jsx)(gy.ItemSlot,{scope:r,value:o,disabled:n,textValue:c,children:(0,ie.jsx)($.div,{role:"option","aria-labelledby":m,"data-highlighted":f?"":void 0,"aria-selected":u&&f,"data-state":u?"checked":"unchecked","aria-disabled":n||void 0,"data-disabled":n?"":void 0,tabIndex:n?void 0:-1,...i,ref:h,onFocus:H(i.onFocus,()=>p(!0)),onBlur:H(i.onBlur,()=>p(!1)),onClick:H(i.onClick,()=>{x.current!=="mouse"&&v()}),onPointerUp:H(i.onPointerUp,()=>{x.current==="mouse"&&v()}),onPointerDown:H(i.onPointerDown,g=>{x.current=g.pointerType}),onPointerMove:H(i.onPointerMove,g=>{x.current=g.pointerType,n?l.onItemLeave?.():x.current==="mouse"&&g.currentTarget.focus({preventScroll:!0})}),onPointerLeave:H(i.onPointerLeave,g=>{g.currentTarget===document.activeElement&&l.onItemLeave?.()}),onKeyDown:H(i.onKeyDown,g=>{l.searchRef?.current!==""&&g.key===" "||(DY.includes(g.key)&&v(),g.key===" "&&g.preventDefault())})})})})});mH.displayName=my;var Tp="SelectItemText",gH=K.forwardRef((e,t)=>{let{__scopeSelect:r,className:o,style:n,...a}=e,i=ts(Tp,r),s=rs(Tp,r),l=pH(Tp,r),u=FY(Tp,r),[c,d]=K.useState(null),f=ne(t,v=>d(v),l.onItemTextChange,v=>s.itemTextRefCallback?.(v,l.value,l.disabled)),p=c?.textContent,h=K.useMemo(()=>(0,ie.jsx)("option",{value:l.value,disabled:l.disabled,children:p},l.value),[l.disabled,l.value,p]),{onNativeOptionAdd:m,onNativeOptionRemove:x}=u;return ke(()=>(m(h),()=>x(h)),[m,x,h]),(0,ie.jsxs)(ie.Fragment,{children:[(0,ie.jsx)($.span,{id:l.textId,...a,ref:f}),l.isSelected&&i.valueNode&&!i.valueNodeHasChildren?TR.createPortal(a.children,i.valueNode):null]})});gH.displayName=Tp;var hH="SelectItemIndicator",vH=K.forwardRef((e,t)=>{let{__scopeSelect:r,...o}=e;return pH(hH,r).isSelected?(0,ie.jsx)($.span,{"aria-hidden":!0,...o,ref:t}):null});vH.displayName=hH;var LR="SelectScrollUpButton",yH=K.forwardRef((e,t)=>{let r=rs(LR,e.__scopeSelect),o=kR(LR,e.__scopeSelect),[n,a]=K.useState(!1),i=ne(t,o.onScrollButtonChange);return ke(()=>{if(r.viewport&&r.isPositioned){let l=function(){let c=u.scrollTop>0;a(c)};var s=l;let u=r.viewport;return l(),u.addEventListener("scroll",l),()=>u.removeEventListener("scroll",l)}},[r.viewport,r.isPositioned]),n?(0,ie.jsx)(wH,{...e,ref:i,onAutoScroll:()=>{let{viewport:s,selectedItem:l}=r;s&&l&&(s.scrollTop=s.scrollTop-l.offsetHeight)}}):null});yH.displayName=LR;var IR="SelectScrollDownButton",xH=K.forwardRef((e,t)=>{let r=rs(IR,e.__scopeSelect),o=kR(IR,e.__scopeSelect),[n,a]=K.useState(!1),i=ne(t,o.onScrollButtonChange);return ke(()=>{if(r.viewport&&r.isPositioned){let l=function(){let c=u.scrollHeight-u.clientHeight,d=Math.ceil(u.scrollTop)<c;a(d)};var s=l;let u=r.viewport;return l(),u.addEventListener("scroll",l),()=>u.removeEventListener("scroll",l)}},[r.viewport,r.isPositioned]),n?(0,ie.jsx)(wH,{...e,ref:i,onAutoScroll:()=>{let{viewport:s,selectedItem:l}=r;s&&l&&(s.scrollTop=s.scrollTop+l.offsetHeight)}}):null});xH.displayName=IR;var wH=K.forwardRef((e,t)=>{let{__scopeSelect:r,onAutoScroll:o,...n}=e,a=rs("SelectScrollButton",r),i=K.useRef(null),s=hy(r),l=K.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return K.useEffect(()=>()=>l(),[l]),ke(()=>{s().find(c=>c.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[s]),(0,ie.jsx)($.div,{"aria-hidden":!0,...n,ref:t,style:{flexShrink:0,...n.style},onPointerDown:H(n.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(o,50))}),onPointerMove:H(n.onPointerMove,()=>{a.onItemLeave?.(),i.current===null&&(i.current=window.setInterval(o,50))}),onPointerLeave:H(n.onPointerLeave,()=>{l()})})}),KY="SelectSeparator",CH=K.forwardRef((e,t)=>{let{__scopeSelect:r,...o}=e;return(0,ie.jsx)($.div,{"aria-hidden":!0,...o,ref:t})});CH.displayName=KY;var PR="SelectArrow",XY=K.forwardRef((e,t)=>{let{__scopeSelect:r,...o}=e,n=vy(r),a=ts(PR,r),i=rs(PR,r);return a.open&&i.position==="popper"?(0,ie.jsx)(zi,{...n,...o,ref:t}):null});XY.displayName=PR;var YY="SelectBubbleInput",SH=K.forwardRef(({__scopeSelect:e,value:t,...r},o)=>{let n=K.useRef(null),a=ne(o,n),i=tc(t);return K.useEffect(()=>{let s=n.current;if(!s)return;let l=window.HTMLSelectElement.prototype,c=Object.getOwnPropertyDescriptor(l,"value").set;if(i!==t&&c){let d=new Event("change",{bubbles:!0});c.call(s,t),s.dispatchEvent(d)}},[i,t]),(0,ie.jsx)($.select,{...r,style:{...SR,...r.style},ref:a,defaultValue:t})});SH.displayName=YY;function bH(e){return e===""||e===void 0}function RH(e){let t=et(e),r=K.useRef(""),o=K.useRef(0),n=K.useCallback(i=>{let s=r.current+i;t(s),function l(u){r.current=u,window.clearTimeout(o.current),u!==""&&(o.current=window.setTimeout(()=>l(""),1e3))}(s)},[t]),a=K.useCallback(()=>{r.current="",window.clearTimeout(o.current)},[]);return K.useEffect(()=>()=>window.clearTimeout(o.current),[]),[r,n,a]}function LH(e,t,r){let n=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,a=r?e.indexOf(r):-1,i=QY(e,Math.max(a,0));n.length===1&&(i=i.filter(u=>u!==r));let l=i.find(u=>u.textValue.toLowerCase().startsWith(n.toLowerCase()));return l!==r?l:void 0}function QY(e,t){return e.map((r,o)=>e[(t+o)%e.length])}var IH=QB,MR=JB,PH=tH,TH=rH,kH=oH,ER=nH,MH=lH,EH=cH,AR=fH,DR=mH,AH=gH,DH=vH,NR=yH,_R=xH,OR=CH;var Ue=R(M()),Pc=IH;Pc.displayName="Select";var JY=EH,kp=PH,Tc=os.forwardRef(({className:e,children:t,variant:r="standard",size:o="md",error:n,success:a,loading:i,leftIcon:s,rightIcon:l,...u},c)=>(0,Ue.jsxs)(MR,{ref:c,className:I("flex w-full items-center justify-between gap-1 rounded-md transition-all duration-200","disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1","focus-visible:outline-none",n&&"border-error focus-visible:ring-error/30 focus-visible:border-error",a&&"border-success focus-visible:ring-success/30 focus-visible:border-success",o==="sm"&&"h-8 text-xs px-2",o==="md"&&"h-10 text-sm px-3",o==="lg"&&"h-12 text-base px-4",r==="standard"&&"border border-gray-300 dark:border-gray-700 bg-background dark:bg-gray-900 hover:border-gray-400 dark:hover:border-gray-600 focus-visible:ring-2 focus-visible:ring-primary/30 dark:focus-visible:ring-primary/50 focus-visible:border-primary dark:focus-visible:border-primary",r==="outline"&&"border border-gray-300 dark:border-gray-700 bg-transparent hover:border-gray-400 dark:hover:border-gray-600 focus-visible:ring-2 focus-visible:ring-primary/30 dark:focus-visible:ring-primary/50 focus-visible:border-primary dark:focus-visible:border-primary",r==="ghost"&&"border-none bg-gray-100 dark:bg-gray-800 hover:bg-gray-200 dark:hover:bg-gray-700 focus-visible:ring-2 focus-visible:ring-primary/30 dark:focus-visible:ring-primary/50",r==="underline"&&"border-t-0 border-l-0 border-r-0 border-b border-gray-300 dark:border-gray-600 rounded-none px-0 hover:border-gray-400 dark:hover:border-gray-500 focus-visible:ring-0 focus-visible:border-b-2 focus-visible:border-primary dark:focus-visible:border-primary",e),...u,disabled:u.disabled||i,"data-error":n?!0:void 0,"data-success":a?!0:void 0,"data-loading":i?!0:void 0,children:[(0,Ue.jsxs)("div",{className:"flex items-center flex-1 gap-2",children:[s&&(0,Ue.jsx)("span",{className:"flex items-center justify-center text-gray-500 dark:text-gray-400",children:s}),i?(0,Ue.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Ue.jsx)(Nt,{className:"h-3.5 w-3.5 animate-spin text-muted-foreground dark:text-gray-400"}),(0,Ue.jsx)("span",{className:"text-muted-foreground dark:text-gray-400",children:"Loading..."})]}):t]}),!i&&(0,Ue.jsx)(TH,{asChild:!0,children:l?(0,Ue.jsx)("span",{className:"opacity-60",children:l}):(0,Ue.jsx)(Bn,{className:"h-4 w-4 opacity-60 transition-transform duration-200 ease-out group-data-[state=open]:rotate-180"})})]}));Tc.displayName=MR.displayName;var FR=os.forwardRef(({className:e,...t},r)=>(0,Ue.jsx)(NR,{ref:r,className:I("flex cursor-default items-center justify-center py-1 text-muted-foreground hover:text-foreground transition-colors",e),...t,children:(0,Ue.jsx)(Ad,{className:"h-4 w-4"})}));FR.displayName=NR.displayName;var VR=os.forwardRef(({className:e,...t},r)=>(0,Ue.jsx)(_R,{ref:r,className:I("flex cursor-default items-center justify-center py-1 text-muted-foreground hover:text-foreground transition-colors",e),...t,children:(0,Ue.jsx)(Bn,{className:"h-4 w-4"})}));VR.displayName=_R.displayName;var kc=os.forwardRef(({className:e,children:t,position:r="popper",side:o="bottom",sideOffset:n=4,align:a="start",...i},s)=>(0,Ue.jsx)(kH,{children:(0,Ue.jsxs)(ER,{ref:s,side:o,sideOffset:n,align:a,avoidCollisions:!1,className:I(["relative z-50 max-h-96 min-w-[8rem] overflow-hidden","rounded-md border border-gray-200 dark:border-gray-700","bg-white dark:bg-gray-900 text-foreground","shadow-lg dark:shadow-gray-900/20","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","data-[state=open]:duration-150"],r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:r,...i,children:[(0,Ue.jsx)(FR,{}),(0,Ue.jsx)(MH,{className:I("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),(0,Ue.jsx)(VR,{})]})}));kc.displayName=ER.displayName;var NH=os.forwardRef(({className:e,...t},r)=>(0,Ue.jsx)(AR,{ref:r,className:I("moonui-theme","py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));NH.displayName=AR.displayName;var Fr=os.forwardRef(({className:e,children:t,variant:r="default",size:o="md",rightIcon:n,customIndicator:a,...i},s)=>(0,Ue.jsxs)(DR,{ref:s,className:I("relative flex w-full cursor-default select-none items-center rounded-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",o==="sm"&&"py-1 pl-7 pr-2 text-xs",o==="md"&&"py-1.5 pl-8 pr-2 text-sm",o==="lg"&&"py-2 pl-9 pr-3 text-base",r==="default"&&"focus:bg-accent focus:text-accent-foreground dark:focus:bg-gray-700 dark:focus:text-gray-100",r==="subtle"&&"focus:bg-gray-100 dark:focus:bg-gray-800 focus:text-foreground dark:focus:text-gray-200",r==="destructive"&&"text-error dark:text-red-400 focus:bg-error/10 dark:focus:bg-red-900/20 focus:text-error dark:focus:text-red-300",r==="success"&&"text-success dark:text-green-400 focus:bg-success/10 dark:focus:bg-green-900/20 focus:text-success dark:focus:text-green-300",r==="warning"&&"text-warning dark:text-yellow-400 focus:bg-warning/10 dark:focus:bg-yellow-900/20 focus:text-warning dark:focus:text-yellow-300",e),...i,children:[(0,Ue.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,Ue.jsx)(DH,{children:a||(0,Ue.jsx)(lr,{className:"h-4 w-4"})})}),(0,Ue.jsx)(AH,{children:t}),n&&(0,Ue.jsx)("span",{className:"ml-auto pl-2 opacity-70",children:n})]}));Fr.displayName=DR.displayName;var _H=os.forwardRef(({className:e,...t},r)=>(0,Ue.jsx)(OR,{ref:r,className:I("moonui-theme","-mx-1 my-1 h-px bg-muted dark:bg-gray-700",e),...t}));_H.displayName=OR.displayName;var Kt=R(M()),eQ=[{code:"+1",country:"US",flag:"\u{1F1FA}\u{1F1F8}",name:"United States"},{code:"+44",country:"GB",flag:"\u{1F1EC}\u{1F1E7}",name:"United Kingdom"},{code:"+49",country:"DE",flag:"\u{1F1E9}\u{1F1EA}",name:"Germany"},{code:"+33",country:"FR",flag:"\u{1F1EB}\u{1F1F7}",name:"France"},{code:"+39",country:"IT",flag:"\u{1F1EE}\u{1F1F9}",name:"Italy"},{code:"+34",country:"ES",flag:"\u{1F1EA}\u{1F1F8}",name:"Spain"},{code:"+31",country:"NL",flag:"\u{1F1F3}\u{1F1F1}",name:"Netherlands"},{code:"+46",country:"SE",flag:"\u{1F1F8}\u{1F1EA}",name:"Sweden"},{code:"+47",country:"NO",flag:"\u{1F1F3}\u{1F1F4}",name:"Norway"},{code:"+45",country:"DK",flag:"\u{1F1E9}\u{1F1F0}",name:"Denmark"},{code:"+358",country:"FI",flag:"\u{1F1EB}\u{1F1EE}",name:"Finland"},{code:"+48",country:"PL",flag:"\u{1F1F5}\u{1F1F1}",name:"Poland"},{code:"+90",country:"TR",flag:"\u{1F1F9}\u{1F1F7}",name:"Turkey"},{code:"+86",country:"CN",flag:"\u{1F1E8}\u{1F1F3}",name:"China"},{code:"+81",country:"JP",flag:"\u{1F1EF}\u{1F1F5}",name:"Japan"},{code:"+82",country:"KR",flag:"\u{1F1F0}\u{1F1F7}",name:"South Korea"},{code:"+91",country:"IN",flag:"\u{1F1EE}\u{1F1F3}",name:"India"},{code:"+61",country:"AU",flag:"\u{1F1E6}\u{1F1FA}",name:"Australia"},{code:"+64",country:"NZ",flag:"\u{1F1F3}\u{1F1FF}",name:"New Zealand"},{code:"+27",country:"ZA",flag:"\u{1F1FF}\u{1F1E6}",name:"South Africa"},{code:"+55",country:"BR",flag:"\u{1F1E7}\u{1F1F7}",name:"Brazil"},{code:"+52",country:"MX",flag:"\u{1F1F2}\u{1F1FD}",name:"Mexico"},{code:"+54",country:"AR",flag:"\u{1F1E6}\u{1F1F7}",name:"Argentina"},{code:"+20",country:"EG",flag:"\u{1F1EA}\u{1F1EC}",name:"Egypt"},{code:"+966",country:"SA",flag:"\u{1F1F8}\u{1F1E6}",name:"Saudi Arabia"},{code:"+971",country:"AE",flag:"\u{1F1E6}\u{1F1EA}",name:"UAE"}],OH=(e,t)=>{let r=e.replace(/\D/g,"");switch(t){case"+1":return r.length<=3?r:r.length<=6?`(${r.slice(0,3)}) ${r.slice(3)}`:`(${r.slice(0,3)}) ${r.slice(3,6)}-${r.slice(6,10)}`;case"+44":return r.length<=4?r:r.length<=7?`${r.slice(0,4)} ${r.slice(4)}`:`${r.slice(0,4)} ${r.slice(4,7)} ${r.slice(7,11)}`;case"+90":return r.length<=3?r:r.length<=6?`(${r.slice(0,3)}) ${r.slice(3)}`:r.length<=9?`(${r.slice(0,3)}) ${r.slice(3,6)} ${r.slice(6)}`:`(${r.slice(0,3)}) ${r.slice(3,6)} ${r.slice(6,8)} ${r.slice(8,10)}`;default:let o="";for(let n=0;n<r.length;n++)n>0&&n%3===0&&(o+=" "),o+=r[n];return o}},tQ=e=>{switch(e){case"+1":return 10;case"+44":return 11;case"+90":return 10;default:return 15}},FH=Mp.forwardRef(({className:e,value:t="",onChange:r,defaultCountry:o="+1",showIcon:n=!0,showCountrySelect:a=!0,countries:i=eQ,size:s,...l},u)=>{let[c,d]=Mp.useState(o),[f,p]=Mp.useState(t),h=i.find(g=>g.code===c)||i[0],m=g=>{let y=g.target.value.replace(/\D/g,""),w=tQ(c),C=y.slice(0,w),b=OH(C,c);p(C),r?.(C,c),g.target.value=b},x=g=>{d(g),r?.(f,g)},v=OH(f,c);return(0,Kt.jsxs)("div",{className:I("relative flex gap-2",e),children:[a&&(0,Kt.jsxs)(Pc,{value:c,onValueChange:x,children:[(0,Kt.jsx)(Tc,{className:"w-[120px]",children:(0,Kt.jsx)(kp,{children:(0,Kt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Kt.jsx)("span",{children:h.flag}),(0,Kt.jsx)("span",{children:h.code})]})})}),(0,Kt.jsx)(kc,{children:i.map(g=>(0,Kt.jsx)(Fr,{value:g.code,children:(0,Kt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Kt.jsx)("span",{children:g.flag}),(0,Kt.jsx)("span",{children:g.code}),(0,Kt.jsx)("span",{className:"text-muted-foreground",children:g.name})]})},g.code))})]}),(0,Kt.jsxs)("div",{className:"relative flex-1",children:[(0,Kt.jsx)(mr,{ref:u,type:"tel",inputMode:"numeric",autoComplete:"tel",placeholder:c==="+1"?"(555) 123-4567":"123 456 789",value:v,onChange:m,className:I(n&&"pl-10",e),...l}),n&&(0,Kt.jsx)($d,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"})]})]})});FH.displayName="PhoneInput";var $o=R(E());var wo=R(M()),rQ=ee("aspect-square border focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",{variants:{variant:{default:"border-border bg-background text-primary",outline:"border-border bg-transparent text-primary",filled:"border-primary bg-primary/10 text-primary"},size:{sm:"h-3.5 w-3.5",default:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"}},defaultVariants:{variant:"default",size:"default"}}),VH=$o.createContext({}),BH=$o.forwardRef(({className:e,value:t,onValueChange:r,disabled:o,name:n,...a},i)=>(0,wo.jsx)(VH.Provider,{value:{value:t,onValueChange:r,disabled:o,name:n},children:(0,wo.jsx)("div",{ref:i,role:"radiogroup",className:I("moonui-theme","grid gap-2",e),...a})}));BH.displayName="RadioGroup";var BR=$o.forwardRef(({className:e,variant:t,size:r,indicator:o,id:n,value:a,disabled:i,...s},l)=>{let u=$o.useContext(VH),c=$o.useId(),d=n||c,f=u.value===a,p=h=>{u.onValueChange&&u.onValueChange(h.target.value),s.onChange&&s.onChange(h)};return(0,wo.jsxs)("div",{className:"relative flex items-center",children:[(0,wo.jsx)("input",{type:"radio",id:d,ref:l,value:a,checked:f,disabled:i||u.disabled,name:u.name,onChange:p,className:"sr-only",...s}),(0,wo.jsx)("label",{htmlFor:d,className:I(rQ({variant:t,size:r}),"rounded-full","focus-visible:ring-primary/50","relative inline-flex shrink-0 cursor-pointer items-center justify-center overflow-hidden",i&&"cursor-not-allowed opacity-50",e),children:(0,wo.jsx)("span",{className:I("absolute inset-0 pointer-events-none",f&&"flex items-center justify-center"),children:f&&(o||(0,wo.jsx)(Is,{className:"h-[60%] w-[60%] fill-current text-current"}))})})]})});BR.displayName="RadioGroupItem";var HR=$o.forwardRef(({className:e,htmlFor:t,children:r,disabled:o=!1,...n},a)=>(0,wo.jsx)("label",{ref:a,htmlFor:t,className:I("text-sm font-medium leading-none ml-2 text-foreground",o&&"cursor-not-allowed opacity-70",e),...n,children:r}));HR.displayName="RadioLabel";var HH=$o.forwardRef(({id:e,label:t,labelClassName:r,...o},n)=>{let a=$o.useId(),i=e||a;return(0,wo.jsxs)("div",{className:"flex items-center",children:[(0,wo.jsx)(BR,{ref:n,id:i,...o}),(0,wo.jsx)(HR,{htmlFor:i,disabled:o.disabled,className:r,children:t})]})});HH.displayName="RadioItemWithLabel";var qa=R(M());function oQ({value:e="",onChange:t,placeholder:r="Start typing...",className:o,disabled:n=!1}){let a=i=>{!n&&t&&t(i.target.value)};return(0,qa.jsxs)("div",{className:I("border border-input rounded-md",o),children:[(0,qa.jsx)("div",{className:"border-b border-border p-2 bg-muted/50",children:(0,qa.jsxs)("div",{className:"flex gap-1",children:[(0,qa.jsx)("button",{type:"button",className:"px-2 py-1 text-sm rounded hover:bg-background disabled:opacity-50",disabled:n,title:"Bold (Pro feature)",children:"B"}),(0,qa.jsx)("button",{type:"button",className:"px-2 py-1 text-sm rounded hover:bg-background disabled:opacity-50",disabled:n,title:"Italic (Pro feature)",children:"I"}),(0,qa.jsx)("button",{type:"button",className:"px-2 py-1 text-sm rounded hover:bg-background disabled:opacity-50",disabled:n,title:"Underline (Pro feature)",children:"U"})]})}),(0,qa.jsx)("textarea",{value:e,onChange:a,placeholder:r,disabled:n,className:I("w-full min-h-[200px] p-3 resize-none border-0 bg-transparent","focus:outline-none focus:ring-0","disabled:cursor-not-allowed disabled:opacity-50")})]})}var qR=R(E());var oe=R(Pe(),1);var yy=R(Pe(),1),nQ=R(Sn(),1),aQ=yy.createContext(void 0);function UH(e){let t=yy.useContext(aQ);return e||t||"ltr"}function zH(e,[t,r]){return Math.min(r,Math.max(t,e))}var GH=R(Pe(),1),De=R(Sn(),1);function iQ(e,t){return GH.useReducer((r,o)=>t[r][o]??r,e)}var UR="ScrollArea",[jH,eMe]=Av(UR),[sQ,Ko]=jH(UR),qH=oe.forwardRef((e,t)=>{let{__scopeScrollArea:r,type:o="hover",dir:n,scrollHideDelay:a=600,...i}=e,[s,l]=oe.useState(null),[u,c]=oe.useState(null),[d,f]=oe.useState(null),[p,h]=oe.useState(null),[m,x]=oe.useState(null),[v,g]=oe.useState(0),[y,w]=oe.useState(0),[C,b]=oe.useState(!1),[S,L]=oe.useState(!1),T=qt(t,A=>l(A)),P=UH(n);return(0,De.jsx)(sQ,{scope:r,type:o,dir:P,scrollHideDelay:a,scrollArea:s,viewport:u,onViewportChange:c,content:d,onContentChange:f,scrollbarX:p,onScrollbarXChange:h,scrollbarXEnabled:C,onScrollbarXEnabledChange:b,scrollbarY:m,onScrollbarYChange:x,scrollbarYEnabled:S,onScrollbarYEnabledChange:L,onCornerWidthChange:g,onCornerHeightChange:w,children:(0,De.jsx)(Oe.div,{dir:P,...i,ref:T,style:{position:"relative","--radix-scroll-area-corner-width":v+"px","--radix-scroll-area-corner-height":y+"px",...e.style}})})});qH.displayName=UR;var $H="ScrollAreaViewport",KH=oe.forwardRef((e,t)=>{let{__scopeScrollArea:r,children:o,nonce:n,...a}=e,i=Ko($H,r),s=oe.useRef(null),l=qt(t,s,i.onViewportChange);return(0,De.jsxs)(De.Fragment,{children:[(0,De.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:n}),(0,De.jsx)(Oe.div,{"data-radix-scroll-area-viewport":"",...a,ref:l,style:{overflowX:i.scrollbarXEnabled?"scroll":"hidden",overflowY:i.scrollbarYEnabled?"scroll":"hidden",...e.style},children:(0,De.jsx)("div",{ref:i.onContentChange,style:{minWidth:"100%",display:"table"},children:o})})]})});KH.displayName=$H;var ea="ScrollAreaScrollbar",Cy=oe.forwardRef((e,t)=>{let{forceMount:r,...o}=e,n=Ko(ea,e.__scopeScrollArea),{onScrollbarXEnabledChange:a,onScrollbarYEnabledChange:i}=n,s=e.orientation==="horizontal";return oe.useEffect(()=>(s?a(!0):i(!0),()=>{s?a(!1):i(!1)}),[s,a,i]),n.type==="hover"?(0,De.jsx)(lQ,{...o,ref:t,forceMount:r}):n.type==="scroll"?(0,De.jsx)(uQ,{...o,ref:t,forceMount:r}):n.type==="auto"?(0,De.jsx)(XH,{...o,ref:t,forceMount:r}):n.type==="always"?(0,De.jsx)(zR,{...o,ref:t}):null});Cy.displayName=ea;var lQ=oe.forwardRef((e,t)=>{let{forceMount:r,...o}=e,n=Ko(ea,e.__scopeScrollArea),[a,i]=oe.useState(!1);return oe.useEffect(()=>{let s=n.scrollArea,l=0;if(s){let u=()=>{window.clearTimeout(l),i(!0)},c=()=>{l=window.setTimeout(()=>i(!1),n.scrollHideDelay)};return s.addEventListener("pointerenter",u),s.addEventListener("pointerleave",c),()=>{window.clearTimeout(l),s.removeEventListener("pointerenter",u),s.removeEventListener("pointerleave",c)}}},[n.scrollArea,n.scrollHideDelay]),(0,De.jsx)(Jn,{present:r||a,children:(0,De.jsx)(XH,{"data-state":a?"visible":"hidden",...o,ref:t})})}),uQ=oe.forwardRef((e,t)=>{let{forceMount:r,...o}=e,n=Ko(ea,e.__scopeScrollArea),a=e.orientation==="horizontal",i=by(()=>l("SCROLL_END"),100),[s,l]=iQ("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 oe.useEffect(()=>{if(s==="idle"){let u=window.setTimeout(()=>l("HIDE"),n.scrollHideDelay);return()=>window.clearTimeout(u)}},[s,n.scrollHideDelay,l]),oe.useEffect(()=>{let u=n.viewport,c=a?"scrollLeft":"scrollTop";if(u){let d=u[c],f=()=>{let p=u[c];d!==p&&(l("SCROLL"),i()),d=p};return u.addEventListener("scroll",f),()=>u.removeEventListener("scroll",f)}},[n.viewport,a,l,i]),(0,De.jsx)(Jn,{present:r||s!=="hidden",children:(0,De.jsx)(zR,{"data-state":s==="hidden"?"hidden":"visible",...o,ref:t,onPointerEnter:Tt(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:Tt(e.onPointerLeave,()=>l("POINTER_LEAVE"))})})}),XH=oe.forwardRef((e,t)=>{let r=Ko(ea,e.__scopeScrollArea),{forceMount:o,...n}=e,[a,i]=oe.useState(!1),s=e.orientation==="horizontal",l=by(()=>{if(r.viewport){let u=r.viewport.offsetWidth<r.viewport.scrollWidth,c=r.viewport.offsetHeight<r.viewport.scrollHeight;i(s?u:c)}},10);return Mc(r.viewport,l),Mc(r.content,l),(0,De.jsx)(Jn,{present:o||a,children:(0,De.jsx)(zR,{"data-state":a?"visible":"hidden",...n,ref:t})})}),zR=oe.forwardRef((e,t)=>{let{orientation:r="vertical",...o}=e,n=Ko(ea,e.__scopeScrollArea),a=oe.useRef(null),i=oe.useRef(0),[s,l]=oe.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=JH(s.viewport,s.content),c={...o,sizes:s,onSizesChange:l,hasThumb:u>0&&u<1,onThumbChange:f=>a.current=f,onThumbPointerUp:()=>i.current=0,onThumbPointerDown:f=>i.current=f};function d(f,p){return gQ(f,i.current,s,p)}return r==="horizontal"?(0,De.jsx)(cQ,{...c,ref:t,onThumbPositionChange:()=>{if(n.viewport&&a.current){let f=n.viewport.scrollLeft,p=WH(f,s,n.dir);a.current.style.transform=`translate3d(${p}px, 0, 0)`}},onWheelScroll:f=>{n.viewport&&(n.viewport.scrollLeft=f)},onDragScroll:f=>{n.viewport&&(n.viewport.scrollLeft=d(f,n.dir))}}):r==="vertical"?(0,De.jsx)(dQ,{...c,ref:t,onThumbPositionChange:()=>{if(n.viewport&&a.current){let f=n.viewport.scrollTop,p=WH(f,s);a.current.style.transform=`translate3d(0, ${p}px, 0)`}},onWheelScroll:f=>{n.viewport&&(n.viewport.scrollTop=f)},onDragScroll:f=>{n.viewport&&(n.viewport.scrollTop=d(f))}}):null}),cQ=oe.forwardRef((e,t)=>{let{sizes:r,onSizesChange:o,...n}=e,a=Ko(ea,e.__scopeScrollArea),[i,s]=oe.useState(),l=oe.useRef(null),u=qt(t,l,a.onScrollbarXChange);return oe.useEffect(()=>{l.current&&s(getComputedStyle(l.current))},[l]),(0,De.jsx)(QH,{"data-orientation":"horizontal",...n,ref:u,sizes:r,style:{bottom:0,left:a.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:a.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Sy(r)+"px",...e.style},onThumbPointerDown:c=>e.onThumbPointerDown(c.x),onDragScroll:c=>e.onDragScroll(c.x),onWheelScroll:(c,d)=>{if(a.viewport){let f=a.viewport.scrollLeft+c.deltaX;e.onWheelScroll(f),t3(f,d)&&c.preventDefault()}},onResize:()=>{l.current&&a.viewport&&i&&o({content:a.viewport.scrollWidth,viewport:a.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:wy(i.paddingLeft),paddingEnd:wy(i.paddingRight)}})}})}),dQ=oe.forwardRef((e,t)=>{let{sizes:r,onSizesChange:o,...n}=e,a=Ko(ea,e.__scopeScrollArea),[i,s]=oe.useState(),l=oe.useRef(null),u=qt(t,l,a.onScrollbarYChange);return oe.useEffect(()=>{l.current&&s(getComputedStyle(l.current))},[l]),(0,De.jsx)(QH,{"data-orientation":"vertical",...n,ref:u,sizes:r,style:{top:0,right:a.dir==="ltr"?0:void 0,left:a.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Sy(r)+"px",...e.style},onThumbPointerDown:c=>e.onThumbPointerDown(c.y),onDragScroll:c=>e.onDragScroll(c.y),onWheelScroll:(c,d)=>{if(a.viewport){let f=a.viewport.scrollTop+c.deltaY;e.onWheelScroll(f),t3(f,d)&&c.preventDefault()}},onResize:()=>{l.current&&a.viewport&&i&&o({content:a.viewport.scrollHeight,viewport:a.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:wy(i.paddingTop),paddingEnd:wy(i.paddingBottom)}})}})}),[fQ,YH]=jH(ea),QH=oe.forwardRef((e,t)=>{let{__scopeScrollArea:r,sizes:o,hasThumb:n,onThumbChange:a,onThumbPointerUp:i,onThumbPointerDown:s,onThumbPositionChange:l,onDragScroll:u,onWheelScroll:c,onResize:d,...f}=e,p=Ko(ea,r),[h,m]=oe.useState(null),x=qt(t,T=>m(T)),v=oe.useRef(null),g=oe.useRef(""),y=p.viewport,w=o.content-o.viewport,C=hr(c),b=hr(l),S=by(d,10);function L(T){if(v.current){let P=T.clientX-v.current.left,A=T.clientY-v.current.top;u({x:P,y:A})}}return oe.useEffect(()=>{let T=P=>{let A=P.target;h?.contains(A)&&C(P,w)};return document.addEventListener("wheel",T,{passive:!1}),()=>document.removeEventListener("wheel",T,{passive:!1})},[y,h,w,C]),oe.useEffect(b,[o,b]),Mc(h,S),Mc(p.content,S),(0,De.jsx)(fQ,{scope:r,scrollbar:h,hasThumb:n,onThumbChange:hr(a),onThumbPointerUp:hr(i),onThumbPositionChange:b,onThumbPointerDown:hr(s),children:(0,De.jsx)(Oe.div,{...f,ref:x,style:{position:"absolute",...f.style},onPointerDown:Tt(e.onPointerDown,T=>{T.button===0&&(T.target.setPointerCapture(T.pointerId),v.current=h.getBoundingClientRect(),g.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",p.viewport&&(p.viewport.style.scrollBehavior="auto"),L(T))}),onPointerMove:Tt(e.onPointerMove,L),onPointerUp:Tt(e.onPointerUp,T=>{let P=T.target;P.hasPointerCapture(T.pointerId)&&P.releasePointerCapture(T.pointerId),document.body.style.webkitUserSelect=g.current,p.viewport&&(p.viewport.style.scrollBehavior=""),v.current=null})})})}),xy="ScrollAreaThumb",WR=oe.forwardRef((e,t)=>{let{forceMount:r,...o}=e,n=YH(xy,e.__scopeScrollArea);return(0,De.jsx)(Jn,{present:r||n.hasThumb,children:(0,De.jsx)(pQ,{ref:t,...o})})}),pQ=oe.forwardRef((e,t)=>{let{__scopeScrollArea:r,style:o,...n}=e,a=Ko(xy,r),i=YH(xy,r),{onThumbPositionChange:s}=i,l=qt(t,d=>i.onThumbChange(d)),u=oe.useRef(void 0),c=by(()=>{u.current&&(u.current(),u.current=void 0)},100);return oe.useEffect(()=>{let d=a.viewport;if(d){let f=()=>{if(c(),!u.current){let p=hQ(d,s);u.current=p,s()}};return s(),d.addEventListener("scroll",f),()=>d.removeEventListener("scroll",f)}},[a.viewport,c,s]),(0,De.jsx)(Oe.div,{"data-state":i.hasThumb?"visible":"hidden",...n,ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...o},onPointerDownCapture:Tt(e.onPointerDownCapture,d=>{let p=d.target.getBoundingClientRect(),h=d.clientX-p.left,m=d.clientY-p.top;i.onThumbPointerDown({x:h,y:m})}),onPointerUp:Tt(e.onPointerUp,i.onThumbPointerUp)})});WR.displayName=xy;var GR="ScrollAreaCorner",ZH=oe.forwardRef((e,t)=>{let r=Ko(GR,e.__scopeScrollArea),o=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&o?(0,De.jsx)(mQ,{...e,ref:t}):null});ZH.displayName=GR;var mQ=oe.forwardRef((e,t)=>{let{__scopeScrollArea:r,...o}=e,n=Ko(GR,r),[a,i]=oe.useState(0),[s,l]=oe.useState(0),u=!!(a&&s);return Mc(n.scrollbarX,()=>{let c=n.scrollbarX?.offsetHeight||0;n.onCornerHeightChange(c),l(c)}),Mc(n.scrollbarY,()=>{let c=n.scrollbarY?.offsetWidth||0;n.onCornerWidthChange(c),i(c)}),u?(0,De.jsx)(Oe.div,{...o,ref:t,style:{width:a,height:s,position:"absolute",right:n.dir==="ltr"?0:void 0,left:n.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function wy(e){return e?parseInt(e,10):0}function JH(e,t){let r=e/t;return isNaN(r)?0:r}function Sy(e){let t=JH(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,o=(e.scrollbar.size-r)*t;return Math.max(o,18)}function gQ(e,t,r,o="ltr"){let n=Sy(r),a=n/2,i=t||a,s=n-i,l=r.scrollbar.paddingStart+i,u=r.scrollbar.size-r.scrollbar.paddingEnd-s,c=r.content-r.viewport,d=o==="ltr"?[0,c]:[c*-1,0];return e3([l,u],d)(e)}function WH(e,t,r="ltr"){let o=Sy(t),n=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-n,i=t.content-t.viewport,s=a-o,l=r==="ltr"?[0,i]:[i*-1,0],u=zH(e,l);return e3([0,i],[0,s])(u)}function e3(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let o=(t[1]-t[0])/(e[1]-e[0]);return t[0]+o*(r-e[0])}}function t3(e,t){return e>0&&e<t}var hQ=(e,t=()=>{})=>{let r={left:e.scrollLeft,top:e.scrollTop},o=0;return function n(){let a={left:e.scrollLeft,top:e.scrollTop},i=r.left!==a.left,s=r.top!==a.top;(i||s)&&t(),r=a,o=window.requestAnimationFrame(n)}(),()=>window.cancelAnimationFrame(o)};function by(e,t){let r=hr(e),o=oe.useRef(0);return oe.useEffect(()=>()=>window.clearTimeout(o.current),[]),oe.useCallback(()=>{window.clearTimeout(o.current),o.current=window.setTimeout(r,t)},[r,t])}function Mc(e,t){let r=hr(t);bn(()=>{let o=0;if(e){let n=new ResizeObserver(()=>{cancelAnimationFrame(o),o=window.requestAnimationFrame(r)});return n.observe(e),()=>{window.cancelAnimationFrame(o),n.unobserve(e)}}},[e,r])}var jR=qH,r3=KH;var o3=ZH;var ns=R(M()),n3=qR.forwardRef(({className:e,children:t,...r},o)=>(0,ns.jsxs)(jR,{ref:o,className:I("relative overflow-hidden",e),...r,children:[(0,ns.jsx)(r3,{className:"h-full w-full rounded-[inherit]",children:t}),(0,ns.jsx)($R,{}),(0,ns.jsx)(o3,{})]}));n3.displayName=jR.displayName;var $R=qR.forwardRef(({className:e,orientation:t="vertical",...r},o)=>(0,ns.jsx)(Cy,{ref:o,orientation:t,className:I("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...r,children:(0,ns.jsx)(WR,{className:"relative flex-1 rounded-full bg-border"})}));$R.displayName=Cy.displayName;var Vr=R(E());var Ep=R(M()),Ry={up:{hidden:{opacity:0,y:50},visible:{opacity:1,y:0}},down:{hidden:{opacity:0,y:-50},visible:{opacity:1,y:0}},left:{hidden:{opacity:0,x:50},visible:{opacity:1,x:0}},right:{hidden:{opacity:0,x:-50},visible:{opacity:1,x:0}},fade:{hidden:{opacity:0},visible:{opacity:1}},scale:{hidden:{opacity:0,scale:.8},visible:{opacity:1,scale:1}},blur:{hidden:{opacity:0,filter:"blur(10px)"},visible:{opacity:1,filter:"blur(0px)"}}},a3=Vr.forwardRef(({children:e,direction:t="up",delay:r=0,duration:o=.6,distance:n=50,threshold:a=.1,triggerOnce:i=!0,stagger:s=0,className:l,variants:u,animate:c=!0,style:d,id:f},p)=>{let h=FC(),m=Vr.useRef(null),x=Gh(m,{amount:a,once:i}),v=Vr.useMemo(()=>{if(u)return u;let g=Ry[t]||Ry.up;return{hidden:{...g.hidden,...t==="up"&&{y:n},...t==="down"&&{y:-n},...t==="left"&&{x:n},...t==="right"&&{x:-n}},visible:g.visible}},[t,n,u]);return Vr.useEffect(()=>{c&&(x?h.start("visible"):i||h.start("hidden"))},[x,h,i,c]),Vr.useImperativeHandle(p,()=>m.current),c?(0,Ep.jsx)(Ee.div,{ref:m,variants:v,initial:"hidden",animate:h,transition:{duration:o,delay:r+s,ease:"easeOut"},className:I(l),style:d,id:f,children:e}):(0,Ep.jsx)("div",{ref:m,className:l,style:d,id:f,children:e})});a3.displayName="ScrollReveal";var i3=Vr.forwardRef(({children:e,stagger:t=.1,className:r,style:o,id:n},a)=>{let i=Vr.useRef(null),s=Gh(i,{amount:.1,once:!0});return Vr.useImperativeHandle(a,()=>i.current),(0,Ep.jsx)(Ee.div,{ref:i,initial:"hidden",animate:s?"visible":"hidden",variants:{hidden:{},visible:{transition:{staggerChildren:t}}},className:I(r),style:o,id:n,children:e})});i3.displayName="ScrollRevealContainer";var s3=Vr.forwardRef(({children:e,direction:t="up",duration:r=.6,distance:o=50,className:n,variants:a,style:i,id:s},l)=>{let u=Vr.useMemo(()=>{if(a)return a;let c=Ry[t]||Ry.up;return{hidden:{...c.hidden,...t==="up"&&{y:o},...t==="down"&&{y:-o},...t==="left"&&{x:o},...t==="right"&&{x:-o}},visible:c.visible}},[t,o,a]);return(0,Ep.jsx)(Ee.div,{ref:l,variants:u,transition:{duration:r,ease:"easeOut"},className:I(n),style:i,id:s,children:e})});s3.displayName="ScrollRevealItem";var f3=R(E());var u3=R(E(),1);var c3=R(M(),1),yQ="Separator",l3="horizontal",xQ=["horizontal","vertical"],d3=u3.forwardRef((e,t)=>{let{decorative:r,orientation:o=l3,...n}=e,a=wQ(o)?o:l3,s=r?{role:"none"}:{"aria-orientation":a==="vertical"?a:void 0,role:"separator"};return(0,c3.jsx)($.div,{"data-orientation":a,...s,...n,ref:t})});d3.displayName=yQ;function wQ(e){return xQ.includes(e)}var KR=d3;var p3=R(M()),SQ=ee("shrink-0 bg-border",{variants:{orientation:{horizontal:"h-[1px] w-full",vertical:"h-full w-[1px]"},variant:{default:"bg-border",dashed:"border-dashed border-border bg-transparent",dotted:"border-dotted border-border bg-transparent",gradient:"bg-gradient-to-r from-transparent via-border to-transparent"},size:{sm:"",md:"",lg:""}},compoundVariants:[{orientation:"horizontal",variant:"dashed",className:"border-t h-0"},{orientation:"vertical",variant:"dashed",className:"border-l w-0"},{orientation:"horizontal",variant:"dotted",className:"border-t h-0"},{orientation:"vertical",variant:"dotted",className:"border-l w-0"},{orientation:"horizontal",size:"sm",variant:["dashed","dotted"],className:"border-t-[0.5px]"},{orientation:"horizontal",size:"lg",variant:["dashed","dotted"],className:"border-t-2"},{orientation:"vertical",size:"sm",variant:["dashed","dotted"],className:"border-l-[0.5px]"},{orientation:"vertical",size:"lg",variant:["dashed","dotted"],className:"border-l-2"},{orientation:"horizontal",size:"sm",variant:["default","gradient"],className:"h-[0.5px]"},{orientation:"horizontal",size:"lg",variant:["default","gradient"],className:"h-[2px]"},{orientation:"vertical",size:"sm",variant:["default","gradient"],className:"w-[0.5px]"},{orientation:"vertical",size:"lg",variant:["default","gradient"],className:"w-[2px]"}],defaultVariants:{orientation:"horizontal",variant:"default",size:"md"}}),Xo=f3.forwardRef(({className:e,orientation:t="horizontal",variant:r="default",size:o="md",decorative:n=!0,...a},i)=>(0,p3.jsx)(KR,{ref:i,decorative:n,orientation:t||void 0,className:I(SQ({orientation:t,variant:r,size:o}),e),...a}));Xo.displayName=KR.displayName;var Ye=R(E());var y3=R(E());var m3=R(Pe(),1);var g3=R(Sn(),1),h3="Toggle",v3=m3.forwardRef((e,t)=>{let{pressed:r,defaultPressed:o,onPressedChange:n,...a}=e,[i,s]=Dv({prop:r,onChange:n,defaultProp:o??!1,caller:h3});return(0,g3.jsx)(Oe.button,{type:"button","aria-pressed":i,"data-state":i?"on":"off","data-disabled":e.disabled?"":void 0,...a,ref:t,onClick:Tt(e.onClick,()=>{e.disabled||s(!i)})})});v3.displayName=h3;var XR=v3;var w3=R(M()),x3=ee("inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent hover:bg-accent hover:text-accent-foreground"},size:{default:"h-10 px-3",sm:"h-9 px-2.5",lg:"h-11 px-5"}},defaultVariants:{variant:"default",size:"default"}}),Ly=y3.forwardRef(({className:e,variant:t,size:r,...o},n)=>(0,w3.jsx)(XR,{ref:n,className:I("moonui-theme",x3({variant:t,size:r,className:e})),...o}));Ly.displayName=XR.displayName;var Ty=R(E());var he=R(E(),1);var kt=R(M(),1),[Iy,TMe]=Te("Tooltip",[Uo]),Py=Uo(),C3="TooltipProvider",RQ=700,YR="tooltip.open",[LQ,ZR]=Iy(C3),S3=e=>{let{__scopeTooltip:t,delayDuration:r=RQ,skipDelayDuration:o=300,disableHoverableContent:n=!1,children:a}=e,i=he.useRef(!0),s=he.useRef(!1),l=he.useRef(0);return he.useEffect(()=>{let u=l.current;return()=>window.clearTimeout(u)},[]),(0,kt.jsx)(LQ,{scope:t,isOpenDelayedRef:i,delayDuration:r,onOpen:he.useCallback(()=>{window.clearTimeout(l.current),i.current=!1},[]),onClose:he.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>i.current=!0,o)},[o]),isPointerInTransitRef:s,onPointerInTransitChange:he.useCallback(u=>{s.current=u},[]),disableHoverableContent:n,children:a})};S3.displayName=C3;var Ap="Tooltip",[IQ,Dp]=Iy(Ap),b3=e=>{let{__scopeTooltip:t,children:r,open:o,defaultOpen:n,onOpenChange:a,disableHoverableContent:i,delayDuration:s}=e,l=ZR(Ap,e.__scopeTooltip),u=Py(t),[c,d]=he.useState(null),f=qe(),p=he.useRef(0),h=i??l.disableHoverableContent,m=s??l.delayDuration,x=he.useRef(!1),[v,g]=ze({prop:o,defaultProp:n??!1,onChange:S=>{S?(l.onOpen(),document.dispatchEvent(new CustomEvent(YR))):l.onClose(),a?.(S)},caller:Ap}),y=he.useMemo(()=>v?x.current?"delayed-open":"instant-open":"closed",[v]),w=he.useCallback(()=>{window.clearTimeout(p.current),p.current=0,x.current=!1,g(!0)},[g]),C=he.useCallback(()=>{window.clearTimeout(p.current),p.current=0,g(!1)},[g]),b=he.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{x.current=!0,g(!0),p.current=0},m)},[m,g]);return he.useEffect(()=>()=>{p.current&&(window.clearTimeout(p.current),p.current=0)},[]),(0,kt.jsx)(Da,{...u,children:(0,kt.jsx)(IQ,{scope:t,contentId:f,open:v,stateAttribute:y,trigger:c,onTriggerChange:d,onTriggerEnter:he.useCallback(()=>{l.isOpenDelayedRef.current?b():w()},[l.isOpenDelayedRef,b,w]),onTriggerLeave:he.useCallback(()=>{h?C():(window.clearTimeout(p.current),p.current=0)},[C,h]),onOpen:w,onClose:C,disableHoverableContent:h,children:r})})};b3.displayName=Ap;var QR="TooltipTrigger",R3=he.forwardRef((e,t)=>{let{__scopeTooltip:r,...o}=e,n=Dp(QR,r),a=ZR(QR,r),i=Py(r),s=he.useRef(null),l=ne(t,s,n.onTriggerChange),u=he.useRef(!1),c=he.useRef(!1),d=he.useCallback(()=>u.current=!1,[]);return he.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),(0,kt.jsx)(Na,{asChild:!0,...i,children:(0,kt.jsx)($.button,{"aria-describedby":n.open?n.contentId:void 0,"data-state":n.stateAttribute,...o,ref:l,onPointerMove:H(e.onPointerMove,f=>{f.pointerType!=="touch"&&!c.current&&!a.isPointerInTransitRef.current&&(n.onTriggerEnter(),c.current=!0)}),onPointerLeave:H(e.onPointerLeave,()=>{n.onTriggerLeave(),c.current=!1}),onPointerDown:H(e.onPointerDown,()=>{n.open&&n.onClose(),u.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:H(e.onFocus,()=>{u.current||n.onOpen()}),onBlur:H(e.onBlur,n.onClose),onClick:H(e.onClick,n.onClose)})})});R3.displayName=QR;var JR="TooltipPortal",[PQ,TQ]=Iy(JR,{forceMount:void 0}),kQ=e=>{let{__scopeTooltip:t,forceMount:r,children:o,container:n}=e,a=Dp(JR,t);return(0,kt.jsx)(PQ,{scope:t,forceMount:r,children:(0,kt.jsx)(it,{present:r||a.open,children:(0,kt.jsx)(vo,{asChild:!0,container:n,children:o})})})};kQ.displayName=JR;var Ec="TooltipContent",L3=he.forwardRef((e,t)=>{let r=TQ(Ec,e.__scopeTooltip),{forceMount:o=r.forceMount,side:n="top",...a}=e,i=Dp(Ec,e.__scopeTooltip);return(0,kt.jsx)(it,{present:o||i.open,children:i.disableHoverableContent?(0,kt.jsx)(I3,{side:n,...a,ref:t}):(0,kt.jsx)(MQ,{side:n,...a,ref:t})})}),MQ=he.forwardRef((e,t)=>{let r=Dp(Ec,e.__scopeTooltip),o=ZR(Ec,e.__scopeTooltip),n=he.useRef(null),a=ne(t,n),[i,s]=he.useState(null),{trigger:l,onClose:u}=r,c=n.current,{onPointerInTransitChange:d}=o,f=he.useCallback(()=>{s(null),d(!1)},[d]),p=he.useCallback((h,m)=>{let x=h.currentTarget,v={x:h.clientX,y:h.clientY},g=NQ(v,x.getBoundingClientRect()),y=_Q(v,g),w=OQ(m.getBoundingClientRect()),C=VQ([...y,...w]);s(C),d(!0)},[d]);return he.useEffect(()=>()=>f(),[f]),he.useEffect(()=>{if(l&&c){let h=x=>p(x,c),m=x=>p(x,l);return l.addEventListener("pointerleave",h),c.addEventListener("pointerleave",m),()=>{l.removeEventListener("pointerleave",h),c.removeEventListener("pointerleave",m)}}},[l,c,p,f]),he.useEffect(()=>{if(i){let h=m=>{let x=m.target,v={x:m.clientX,y:m.clientY},g=l?.contains(x)||c?.contains(x),y=!FQ(v,i);g?f():y&&(f(),u())};return document.addEventListener("pointermove",h),()=>document.removeEventListener("pointermove",h)}},[l,c,i,u,f]),(0,kt.jsx)(I3,{...e,ref:a})}),[EQ,AQ]=Iy(Ap,{isInside:!1}),DQ=qL("TooltipContent"),I3=he.forwardRef((e,t)=>{let{__scopeTooltip:r,children:o,"aria-label":n,onEscapeKeyDown:a,onPointerDownOutside:i,...s}=e,l=Dp(Ec,r),u=Py(r),{onClose:c}=l;return he.useEffect(()=>(document.addEventListener(YR,c),()=>document.removeEventListener(YR,c)),[c]),he.useEffect(()=>{if(l.trigger){let d=f=>{f.target?.contains(l.trigger)&&c()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[l.trigger,c]),(0,kt.jsx)(Fo,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:d=>d.preventDefault(),onDismiss:c,children:(0,kt.jsxs)(Ui,{"data-state":l.stateAttribute,...u,...s,ref:t,style:{...s.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:[(0,kt.jsx)(DQ,{children:o}),(0,kt.jsx)(EQ,{scope:r,isInside:!0,children:(0,kt.jsx)(YB,{id:l.contentId,role:"tooltip",children:n||o})})]})})});L3.displayName=Ec;var P3="TooltipArrow",T3=he.forwardRef((e,t)=>{let{__scopeTooltip:r,...o}=e,n=Py(r);return AQ(P3,r).isInside?null:(0,kt.jsx)(zi,{...n,...o,ref:t})});T3.displayName=P3;function NQ(e,t){let r=Math.abs(t.top-e.y),o=Math.abs(t.bottom-e.y),n=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(r,o,n,a)){case a:return"left";case n:return"right";case r:return"top";case o:return"bottom";default:throw new Error("unreachable")}}function _Q(e,t,r=5){let o=[];switch(t){case"top":o.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":o.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":o.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":o.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return o}function OQ(e){let{top:t,right:r,bottom:o,left:n}=e;return[{x:n,y:t},{x:r,y:t},{x:r,y:o},{x:n,y:o}]}function FQ(e,t){let{x:r,y:o}=e,n=!1;for(let a=0,i=t.length-1;a<t.length;i=a++){let s=t[a],l=t[i],u=s.x,c=s.y,d=l.x,f=l.y;c>o!=f>o&&r<(d-u)*(o-c)/(f-c)+u&&(n=!n)}return n}function VQ(e){let t=e.slice();return t.sort((r,o)=>r.x<o.x?-1:r.x>o.x?1:r.y<o.y?-1:r.y>o.y?1:0),BQ(t)}function BQ(e){if(e.length<=1)return e.slice();let t=[];for(let o=0;o<e.length;o++){let n=e[o];for(;t.length>=2;){let a=t[t.length-1],i=t[t.length-2];if((a.x-i.x)*(n.y-i.y)>=(a.y-i.y)*(n.x-i.x))t.pop();else break}t.push(n)}t.pop();let r=[];for(let o=e.length-1;o>=0;o--){let n=e[o];for(;r.length>=2;){let a=r[r.length-1],i=r[r.length-2];if((a.x-i.x)*(n.y-i.y)>=(a.y-i.y)*(n.x-i.x))r.pop();else break}r.push(n)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var k3=S3,M3=b3,E3=R3;var eL=L3,tL=T3;var as=R(M()),rL=k3,UQ=ee("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",{variants:{variant:{default:"bg-primary text-primary-foreground",secondary:"bg-secondary text-secondary-foreground",success:"bg-green-500 text-white border-green-600",warning:"bg-yellow-500 text-white border-yellow-600",destructive:"bg-destructive text-destructive-foreground",info:"bg-blue-500 text-white border-blue-600"},size:{sm:"px-2 py-1 text-xs",md:"px-3 py-1.5 text-sm",lg:"px-4 py-2 text-base"}},defaultVariants:{variant:"default",size:"md"}}),ky=M3,My=E3,A3=Ty.forwardRef(({className:e,...t},r)=>(0,as.jsx)(tL,{ref:r,className:I("moonui-theme","fill-current",e),...t}));A3.displayName=tL.displayName;var Np=Ty.forwardRef(({className:e,variant:t,size:r,showArrow:o=!1,sideOffset:n=4,...a},i)=>(0,as.jsxs)(eL,{ref:i,sideOffset:n,className:I("moonui-theme",UQ({variant:t,size:r}),e),...a,children:[a.children,o&&(0,as.jsx)(A3,{})]}));Np.displayName=eL.displayName;var zQ=Ty.forwardRef(({children:e,content:t,variant:r="default",size:o="md",side:n="top",align:a="center",delayDuration:i=400,sideOffset:s=4,showArrow:l=!1,className:u,open:c,defaultOpen:d,onOpenChange:f,...p},h)=>(0,as.jsxs)(ky,{open:c,defaultOpen:d,onOpenChange:f,delayDuration:i,children:[(0,as.jsx)(My,{asChild:!0,children:e}),(0,as.jsx)(Np,{ref:h,side:n,align:a,variant:r,size:o,sideOffset:s,showArrow:l,className:u,...p,children:t})]}));zQ.displayName="SimpleTooltip";var B=R(M()),Ht=({icon:e,tooltip:t,active:r,onClick:o,disabled:n})=>(0,B.jsxs)(ky,{children:[(0,B.jsx)(My,{asChild:!0,children:(0,B.jsx)(Ly,{pressed:r,onPressedChange:()=>o(),disabled:n,className:"h-8 w-8 p-0",children:e})}),(0,B.jsx)(Np,{children:(0,B.jsx)("p",{children:t})})]}),WQ=({onColorSelect:e})=>(0,B.jsx)("div",{className:"grid grid-cols-4 gap-1 p-2",children:["#000000","#374151","#6B7280","#9CA3AF","#EF4444","#F59E0B","#EAB308","#22C55E","#3B82F6","#6366F1","#8B5CF6","#EC4899"].map(r=>(0,B.jsx)("button",{className:"w-6 h-6 rounded border-2 border-gray-200 hover:border-gray-400",style:{backgroundColor:r},onClick:()=>e(r)},r))}),D3=Ye.default.forwardRef(({value:e="",onChange:t,placeholder:r="Start writing...",disabled:o=!1,className:n,minHeight:a=200,maxHeight:i=500,showToolbar:s=!0,showPreview:l=!0,...u},c)=>{let[d,f]=(0,Ye.useState)(e),[p,h]=(0,Ye.useState)(!1),[m,x]=(0,Ye.useState)(e),[v,g]=(0,Ye.useState)(null),y=Ye.default.useRef(null),w=Ye.default.useRef(null),[C,b]=(0,Ye.useState)({bold:!1,italic:!1,underline:!1,strikethrough:!1,alignLeft:!0,alignCenter:!1,alignRight:!1,alignJustify:!1,orderedList:!1,unorderedList:!1,quote:!1,code:!1}),S=(0,Ye.useCallback)(k=>{f(k),t?.(k)},[t]),L=(0,Ye.useCallback)(()=>{let k=window.getSelection();return k&&k.rangeCount>0?k.getRangeAt(0):null},[]),T=(0,Ye.useCallback)(k=>{if(!k)return;let Z=window.getSelection();Z&&(Z.removeAllRanges(),Z.addRange(k))},[]),P=(0,Ye.useCallback)((k,Z)=>{if(o)return;y.current&&y.current.focus();let ve=L();if(document.execCommand(k,!1,Z)||console.warn(`Command '${k}' failed to execute`),y.current){let J=y.current.innerHTML;S(J)}b({bold:document.queryCommandState("bold"),italic:document.queryCommandState("italic"),underline:document.queryCommandState("underline"),strikethrough:document.queryCommandState("strikeThrough"),alignLeft:document.queryCommandState("justifyLeft"),alignCenter:document.queryCommandState("justifyCenter"),alignRight:document.queryCommandState("justifyRight"),alignJustify:document.queryCommandState("justifyFull"),orderedList:document.queryCommandState("insertOrderedList"),unorderedList:document.queryCommandState("insertUnorderedList"),quote:document.queryCommandState("formatBlock"),code:document.queryCommandState("formatBlock")}),y.current&&y.current.focus()},[o,L,S]),A=(0,Ye.useCallback)(k=>{let Z=k.currentTarget.innerHTML;S(Z)},[S]),_=(0,Ye.useCallback)(k=>{if(k.ctrlKey||k.metaKey)switch(k.key){case"b":k.preventDefault(),P("bold");break;case"i":k.preventDefault(),P("italic");break;case"u":k.preventDefault(),P("underline");break;case"z":k.preventDefault(),k.shiftKey?P("redo"):P("undo");break}k.key==="Tab"&&(k.preventDefault(),P("insertHTML"," "))},[P]),G=(0,Ye.useCallback)(()=>{let k=prompt("Enter URL:");k&&P("createLink",k)},[P]),D=(0,Ye.useCallback)(()=>{let k=prompt("Enter image URL:");k&&P("insertImage",k)},[P]),W=(0,Ye.useCallback)(k=>{P("formatBlock",`<h${k}>`)},[P]),N=(0,Ye.useCallback)(k=>{let Z=window.getSelection();if(Z&&Z.rangeCount>0){let ve=Z.getRangeAt(0),O=document.createElement("span");O.style.color=k;try{ve.surroundContents(O)}catch{P("foreColor",k)}if(y.current){let J=y.current.innerHTML;S(J)}}},[P,S]),z=k=>{if(typeof window>"u")return k.replace(/<[^>]*>/g,"").replace(/ /g," ").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/'/g,"'");let Z=document.createElement("div");return Z.innerHTML=k,Z.textContent||Z.innerText||""};Ye.default.useEffect(()=>{y.current&&d&&d!==y.current.innerHTML&&(y.current.innerHTML=d)},[d]),Ye.default.useEffect(()=>{e!==void 0&&e!==d&&(f(e),x(e))},[e,d]);let V=s&&(0,B.jsx)(rL,{children:(0,B.jsxs)(Ee.div,{className:"flex items-center gap-1 p-2 border-b bg-gray-50/50 dark:bg-zinc-800/50 backdrop-blur-sm",initial:{opacity:0,y:-10},animate:{opacity:1,y:0},children:[!p&&(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)("div",{className:"flex items-center gap-1",children:[(0,B.jsx)(Ht,{icon:(0,B.jsx)(Ed,{className:"h-3 w-3"}),tooltip:"Bold (Ctrl+B)",active:C.bold,onClick:()=>P("bold"),disabled:o}),(0,B.jsx)(Ht,{icon:(0,B.jsx)(Ud,{className:"h-3 w-3"}),tooltip:"Italic (Ctrl+I)",active:C.italic,onClick:()=>P("italic"),disabled:o}),(0,B.jsx)(Ht,{icon:(0,B.jsx)(Qd,{className:"h-3 w-3"}),tooltip:"Underline (Ctrl+U)",active:C.underline,onClick:()=>P("underline"),disabled:o}),(0,B.jsx)(Ht,{icon:(0,B.jsx)(Yd,{className:"h-3 w-3"}),tooltip:"Strikethrough",active:C.strikethrough,onClick:()=>P("strikeThrough"),disabled:o})]}),(0,B.jsx)(Xo,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),(0,B.jsxs)(Pc,{onValueChange:k=>{k.startsWith("h")?W(k.substring(1)):k==="normal"?P("formatBlock","p"):P("fontSize",k)},disabled:o,children:[(0,B.jsx)(Tc,{className:"w-24 h-8",children:(0,B.jsx)(kp,{placeholder:"Size"})}),(0,B.jsxs)(kc,{children:[(0,B.jsx)(Fr,{value:"1",children:"Small"}),(0,B.jsx)(Fr,{value:"3",children:"Normal"}),(0,B.jsx)(Fr,{value:"5",children:"Large"}),(0,B.jsx)(Fr,{value:"7",children:"X-Large"}),(0,B.jsx)(Xo,{className:"my-1"}),(0,B.jsx)(Fr,{value:"h1",children:"Heading 1"}),(0,B.jsx)(Fr,{value:"h2",children:"Heading 2"}),(0,B.jsx)(Fr,{value:"h3",children:"Heading 3"}),(0,B.jsx)(Fr,{value:"h4",children:"Heading 4"}),(0,B.jsx)(Fr,{value:"h5",children:"Heading 5"}),(0,B.jsx)(Fr,{value:"h6",children:"Heading 6"})]})]}),(0,B.jsx)(Xo,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),(0,B.jsxs)("div",{className:"flex items-center gap-1",children:[(0,B.jsx)(Ht,{icon:(0,B.jsx)(kd,{className:"h-3 w-3"}),tooltip:"Align Left",active:C.alignLeft,onClick:()=>P("justifyLeft"),disabled:o}),(0,B.jsx)(Ht,{icon:(0,B.jsx)(Pd,{className:"h-3 w-3"}),tooltip:"Align Center",active:C.alignCenter,onClick:()=>P("justifyCenter"),disabled:o}),(0,B.jsx)(Ht,{icon:(0,B.jsx)(Md,{className:"h-3 w-3"}),tooltip:"Align Right",active:C.alignRight,onClick:()=>P("justifyRight"),disabled:o}),(0,B.jsx)(Ht,{icon:(0,B.jsx)(Td,{className:"h-3 w-3"}),tooltip:"Justify",active:C.alignJustify,onClick:()=>P("justifyFull"),disabled:o})]}),(0,B.jsx)(Xo,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),(0,B.jsxs)("div",{className:"flex items-center gap-1",children:[(0,B.jsx)(Ht,{icon:(0,B.jsx)(Gd,{className:"h-3 w-3"}),tooltip:"Bullet List",active:C.unorderedList,onClick:()=>P("insertUnorderedList"),disabled:o}),(0,B.jsx)(Ht,{icon:(0,B.jsx)(Wd,{className:"h-3 w-3"}),tooltip:"Numbered List",active:C.orderedList,onClick:()=>P("insertOrderedList"),disabled:o}),(0,B.jsx)(Ht,{icon:(0,B.jsx)(Kd,{className:"h-3 w-3"}),tooltip:"Quote",active:C.quote,onClick:()=>P("formatBlock","blockquote"),disabled:o}),(0,B.jsx)(Ht,{icon:(0,B.jsx)(Nd,{className:"h-3 w-3"}),tooltip:"Code Block",active:C.code,onClick:()=>P("formatBlock","pre"),disabled:o})]}),(0,B.jsx)(Xo,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),(0,B.jsxs)("div",{className:"flex items-center gap-1",children:[(0,B.jsx)(Ht,{icon:(0,B.jsx)("span",{className:"text-xs font-mono",children:"\u2190"}),tooltip:"Decrease Indent",onClick:()=>P("outdent"),disabled:o}),(0,B.jsx)(Ht,{icon:(0,B.jsx)("span",{className:"text-xs font-mono",children:"\u2192"}),tooltip:"Increase Indent",onClick:()=>P("indent"),disabled:o})]}),(0,B.jsx)(Xo,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),(0,B.jsxs)("div",{className:"flex items-center gap-1",children:[(0,B.jsx)(Ht,{icon:(0,B.jsx)(zd,{className:"h-3 w-3"}),tooltip:"Insert Link",onClick:G,disabled:o}),(0,B.jsx)(Ht,{icon:(0,B.jsx)(Ts,{className:"h-3 w-3"}),tooltip:"Insert Image",onClick:D,disabled:o})]}),(0,B.jsx)(Xo,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),(0,B.jsxs)(Oa,{children:[(0,B.jsx)(Fa,{asChild:!0,children:(0,B.jsx)(Ve,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",disabled:o,title:"Text Color",children:(0,B.jsx)(du,{className:"h-3 w-3"})})}),(0,B.jsx)(Qn,{className:"w-auto p-0",children:(0,B.jsx)(WQ,{onColorSelect:N})})]}),(0,B.jsx)(Xo,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),(0,B.jsxs)("div",{className:"flex items-center gap-1",children:[(0,B.jsx)(Ht,{icon:(0,B.jsx)(Zd,{className:"h-3 w-3"}),tooltip:"Undo (Ctrl+Z)",onClick:()=>P("undo"),disabled:o}),(0,B.jsx)(Ht,{icon:(0,B.jsx)(Xd,{className:"h-3 w-3"}),tooltip:"Redo (Ctrl+Shift+Z)",onClick:()=>P("redo"),disabled:o})]})]}),l&&(0,B.jsxs)(B.Fragment,{children:[!p&&(0,B.jsx)(Xo,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),(0,B.jsx)(Ht,{icon:p?(0,B.jsx)(qr,{className:"h-3 w-3"}):(0,B.jsx)(Ps,{className:"h-3 w-3"}),tooltip:p?"Edit Mode":"View Source Code",active:p,onClick:()=>{p?S(m):x(d),h(!p)},disabled:o})]})]})});return(0,B.jsxs)("div",{ref:c,className:I("border border-gray-200 dark:border-zinc-700 rounded-lg overflow-hidden focus-within:ring-2 focus-within:ring-ring focus-within:border-transparent",o&&"opacity-50 cursor-not-allowed",n),...u,children:[V,(0,B.jsxs)("div",{className:"relative",children:[p?(0,B.jsx)(Ee.div,{initial:{opacity:0},animate:{opacity:1},className:"bg-slate-50 dark:bg-zinc-900/95",style:{minHeight:a,maxHeight:i,overflow:"auto"},children:(0,B.jsx)("textarea",{ref:w,value:m,onChange:k=>x(k.target.value),className:"w-full h-full bg-transparent p-4 font-mono text-sm text-gray-900 dark:text-gray-100 resize-none focus:outline-none",style:{minHeight:a-32},disabled:o,placeholder:"HTML source code..."})}):(0,B.jsx)(Ee.div,{ref:y,contentEditable:!o,suppressContentEditableWarning:!0,className:I("p-4 outline-none prose prose-sm dark:prose-invert max-w-none overflow-y-auto","bg-slate-50 dark:bg-zinc-900/95","text-gray-900 dark:text-gray-100","focus:ring-0","[&_h1]:text-3xl [&_h1]:font-bold [&_h1]:mb-4","[&_h2]:text-2xl [&_h2]:font-bold [&_h2]:mb-3","[&_h3]:text-xl [&_h3]:font-bold [&_h3]:mb-2","[&_h4]:text-lg [&_h4]:font-bold [&_h4]:mb-2","[&_h5]:text-base [&_h5]:font-bold [&_h5]:mb-1","[&_h6]:text-sm [&_h6]:font-bold [&_h6]:mb-1","[&_ul]:list-disc [&_ul]:pl-6 [&_ul]:mb-4","[&_ol]:list-decimal [&_ol]:pl-6 [&_ol]:mb-4","[&_li]:mb-1","[&_blockquote]:border-l-4 [&_blockquote]:border-gray-300 [&_blockquote]:pl-4 [&_blockquote]:italic","[&_pre]:bg-gray-100 [&_pre]:dark:bg-gray-800 [&_pre]:p-4 [&_pre]:rounded [&_pre]:overflow-x-auto"),style:{minHeight:a,maxHeight:i},onInput:A,onKeyDown:_,"data-placeholder":r,initial:{opacity:0},animate:{opacity:1}}),!d&&!p&&(0,B.jsx)("div",{className:"absolute top-4 left-4 text-muted-foreground pointer-events-none",style:{fontSize:"16px"},children:r})]}),(0,B.jsx)("div",{className:"px-4 py-2 border-t bg-gray-50/50 dark:bg-zinc-800/50 backdrop-blur-sm text-xs text-gray-600 dark:text-gray-400",children:(0,B.jsx)(GQ,{content:d})})]})});D3.displayName="SimpleEditor";var GQ=({content:e})=>{let[t,r]=(0,Ye.useState)(0);return(0,Ye.useEffect)(()=>{r((n=>{let a=document.createElement("div");return a.innerHTML=n,a.textContent||a.innerText||""})(e).length)},[e]),(0,B.jsxs)(B.Fragment,{children:[t," characters"]})};var _p=R(E());var Xt=R(M()),N3=ee("animate-pulse rounded-md",{variants:{variant:{default:"bg-muted",primary:"bg-primary/10",secondary:"bg-secondary/10",accent:"bg-accent"},size:{default:"",sm:"scale-90",lg:"scale-110"},shape:{rect:"rounded-md",circle:"rounded-full",pill:"rounded-full"},animation:{pulse:"animate-pulse",wave:"overflow-hidden relative after:absolute after:inset-0 after:-translate-x-full after:animate-[shimmer_2s_infinite] after:bg-gradient-to-r after:from-transparent after:via-white/10 after:to-transparent dark:after:via-white/5",none:"animate-none"}},defaultVariants:{variant:"default",size:"default",shape:"rect",animation:"pulse"}}),is=_p.forwardRef(({className:e,variant:t,size:r,shape:o,animation:n,height:a,width:i,isLoaded:s=!1,children:l,fadeInDuration:u=400,motion:c=!1,style:d,...f},p)=>{let{onDrag:h,onDragEnd:m,onDragStart:x,onAnimationStart:v,onAnimationEnd:g,onAnimationIteration:y,...w}=f;if(s&&l)return c?(0,Xt.jsx)(Ee.div,{ref:p,initial:{opacity:0},animate:{opacity:1},transition:{duration:u/1e3},className:I("moonui-theme",e),style:{height:a,width:i,...d},...w,children:l}):(0,Xt.jsx)("div",{ref:p,className:I("moonui-theme","animate-fade-in",e),style:{animationDuration:`${u}ms`,height:a,width:i,...d},...f,children:l});let C=c?Ee.div:"div";return(0,Xt.jsx)(C,{ref:p,className:I("moonui-theme",N3({variant:t,size:r,shape:o,animation:n}),"relative isolate",e),style:{height:a,width:i,...d},...c?JA:{},...w})});is.displayName="Skeleton";var oL=_p.forwardRef(({className:e,lines:t=3,lineHeight:r="0.85rem",spacing:o="0.5rem",lastLineWidth:n=80,randomWidths:a=!1,variant:i="default",animation:s="pulse",...l},u)=>(0,Xt.jsx)("div",{ref:u,className:I("moonui-theme","flex flex-col",e),style:{gap:o},...l,children:Array.from({length:t}).map((c,d)=>{let p=d===t-1?n:a?85+d%3*5:100;return(0,Xt.jsx)(is,{variant:i,animation:s,className:"w-full",style:{height:r,width:`${p}%`}},d)})}));oL.displayName="SkeletonText";var nL=_p.forwardRef(({className:e,size:t="2.5rem",variant:r="default",animation:o="pulse",...n},a)=>(0,Xt.jsx)(is,{ref:a,variant:r,animation:o,shape:"circle",className:I("moonui-theme","shrink-0",e),style:{height:t,width:t},...n}));nL.displayName="SkeletonAvatar";var _3=_p.forwardRef(({className:e,showHeader:t=!0,contentLines:r=3,showFooter:o=!0,variant:n="default",animation:a="pulse",...i},s)=>(0,Xt.jsxs)("div",{ref:s,className:I("overflow-hidden rounded-md border border-border bg-background p-4",e),...i,children:[t&&(0,Xt.jsxs)("div",{className:"mb-4 flex items-center gap-4",children:[(0,Xt.jsx)(nL,{size:"2.5rem",variant:n,animation:a}),(0,Xt.jsxs)("div",{className:"flex-1",children:[(0,Xt.jsx)(is,{variant:n,animation:a,className:"mb-2 h-4 w-1/3"}),(0,Xt.jsx)(is,{variant:n,animation:a,className:"h-3 w-1/4"})]})]}),(0,Xt.jsx)(oL,{lines:r,variant:n,animation:a,className:"mb-4"}),o&&(0,Xt.jsxs)("div",{className:"flex items-center justify-between mt-4 pt-4 border-t border-border",children:[(0,Xt.jsx)(is,{variant:n,animation:a,className:"h-4 w-1/4"}),(0,Xt.jsx)(is,{variant:n,animation:a,className:"h-4 w-1/5"})]})]}));_3.displayName="SkeletonCard";var Ac=R(E());var F3=R(M()),O3=Ac.forwardRef(({className:e,children:t,onSwipeLeft:r,onSwipeRight:o,threshold:n=100,disabled:a=!1,...i},s)=>{let[l,u]=Ac.useState(0),[c,d]=Ac.useState(0),[f,p]=Ac.useState(!1),h=v=>{a||(u(v.touches[0].clientX),p(!0))},m=v=>{a||!f||d(v.touches[0].clientX)},x=()=>{if(a||!f)return;let v=c-l;Math.abs(v)>n&&(v>0&&o?o():v<0&&r&&r()),p(!1),d(0),u(0)};return(0,F3.jsx)("div",{ref:s,className:I("touch-pan-y select-none transition-transform duration-200",f&&"cursor-grabbing",e),onTouchStart:h,onTouchMove:m,onTouchEnd:x,...i,children:t})});O3.displayName="SwipeableCard";var G3=R(E());var kn=R(E(),1);var Rl=R(M(),1),Ey="Switch",[jQ,oEe]=Te(Ey),[qQ,$Q]=jQ(Ey),V3=kn.forwardRef((e,t)=>{let{__scopeSwitch:r,name:o,checked:n,defaultChecked:a,required:i,disabled:s,value:l="on",onCheckedChange:u,form:c,...d}=e,[f,p]=kn.useState(null),h=ne(t,y=>p(y)),m=kn.useRef(!1),x=f?c||!!f.closest("form"):!0,[v,g]=ze({prop:n,defaultProp:a??!1,onChange:u,caller:Ey});return(0,Rl.jsxs)(qQ,{scope:r,checked:v,disabled:s,children:[(0,Rl.jsx)($.button,{type:"button",role:"switch","aria-checked":v,"aria-required":i,"data-state":z3(v),"data-disabled":s?"":void 0,disabled:s,value:l,...d,ref:h,onClick:H(e.onClick,y=>{g(w=>!w),x&&(m.current=y.isPropagationStopped(),m.current||y.stopPropagation())})}),x&&(0,Rl.jsx)(U3,{control:f,bubbles:!m.current,name:o,value:l,checked:v,required:i,disabled:s,form:c,style:{transform:"translateX(-100%)"}})]})});V3.displayName=Ey;var B3="SwitchThumb",H3=kn.forwardRef((e,t)=>{let{__scopeSwitch:r,...o}=e,n=$Q(B3,r);return(0,Rl.jsx)($.span,{"data-state":z3(n.checked),"data-disabled":n.disabled?"":void 0,...o,ref:t})});H3.displayName=B3;var KQ="SwitchBubbleInput",U3=kn.forwardRef(({__scopeSwitch:e,control:t,checked:r,bubbles:o=!0,...n},a)=>{let i=kn.useRef(null),s=ne(i,a),l=tc(r),u=rc(t);return kn.useEffect(()=>{let c=i.current;if(!c)return;let d=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(d,"checked").set;if(l!==r&&p){let h=new Event("click",{bubbles:o});p.call(c,r),c.dispatchEvent(h)}},[l,r,o]),(0,Rl.jsx)("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...n,tabIndex:-1,ref:s,style:{...n.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});U3.displayName=KQ;function z3(e){return e?"checked":"unchecked"}var aL=V3,W3=H3;var ta=R(M()),j3=G3.forwardRef(({className:e,size:t="md",variant:r="primary",loading:o,leftIcon:n,rightIcon:a,description:i,...s},l)=>(0,ta.jsxs)("div",{className:"moonui-theme inline-flex items-center gap-2",children:[n&&(0,ta.jsx)("span",{className:"text-muted-foreground",children:n}),(0,ta.jsxs)(aL,{className:I("peer relative inline-flex shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 dark:data-[state=unchecked]:bg-gray-700/70 dark:focus-visible:ring-primary/40 dark:focus-visible:ring-offset-gray-950",t==="sm"&&"h-4 w-8",t==="md"&&"h-6 w-11",t==="lg"&&"h-7 w-14",r==="primary"&&"data-[state=checked]:bg-primary",r==="success"&&"data-[state=checked]:bg-success",r==="warning"&&"data-[state=checked]:bg-warning",r==="danger"&&"data-[state=checked]:bg-error",r==="secondary"&&"data-[state=checked]:bg-accent","data-[state=unchecked]:bg-input",o&&"opacity-80 cursor-wait",e),disabled:o||s.disabled,...s,ref:l,children:[o?(0,ta.jsx)("div",{className:"absolute inset-0 flex items-center justify-center",children:(0,ta.jsx)("div",{className:"h-3 w-3 animate-spin rounded-full border-2 border-gray-300 border-t-primary"})}):null,(0,ta.jsx)(W3,{className:I("pointer-events-none block rounded-full bg-background shadow-lg ring-0 transition-transform",t==="sm"&&"h-3 w-3 data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0",t==="md"&&"h-5 w-5 data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0",t==="lg"&&"h-6 w-6 data-[state=checked]:translate-x-7 data-[state=unchecked]:translate-x-0")})]}),a&&(0,ta.jsx)("span",{className:"text-muted-foreground",children:a}),i&&(0,ta.jsx)("span",{className:"text-sm text-muted-foreground",children:i})]}));j3.displayName=aL.displayName;var Op=R(E());var ra=R(M()),q3=Op.forwardRef(({value:e=[],onChange:t,maxTags:r,variant:o="primary",allowDuplicates:n=!1,delimiter:a=",",placeholder:i="Add tag and press Enter",className:s,disabled:l,...u},c)=>{let[d,f]=Op.useState(""),[p,h]=Op.useState(""),m=g=>{g.key==="Enter"||g.key===a?(g.preventDefault(),x()):g.key==="Backspace"&&d===""&&e.length>0&&v(e.length-1)},x=()=>{let g=d.trim();if(g){if(!n&&e.includes(g)){h("This tag already exists"),setTimeout(()=>h(""),2e3);return}if(r&&e.length>=r){h(`Maximum ${r} tags allowed`),setTimeout(()=>h(""),2e3);return}t([...e,g]),f(""),h("")}},v=g=>{l||t(e.filter((y,w)=>w!==g))};return(0,ra.jsxs)("div",{className:"relative",children:[(0,ra.jsxs)("div",{className:I("flex min-h-[2.5rem] w-full flex-wrap gap-2 rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background","dark:bg-zinc-950/50 dark:border-zinc-800","focus-within:outline-none focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2",l&&"cursor-not-allowed opacity-50",s),children:[e.map((g,y)=>(0,ra.jsxs)(fo,{variant:o,className:"gap-1 pr-1.5",children:[(0,ra.jsx)("span",{className:"text-xs",children:g}),!l&&(0,ra.jsx)("button",{type:"button",onClick:()=>v(y),className:"ml-1 rounded-full outline-none ring-offset-background focus:ring-2 focus:ring-ring focus:ring-offset-2",children:(0,ra.jsx)(co,{className:"h-3 w-3 text-muted-foreground hover:text-foreground transition-colors"})})]},y)),(0,ra.jsx)("input",{ref:c,type:"text",value:d,onChange:g=>f(g.target.value),onKeyDown:m,onBlur:x,disabled:l,placeholder:e.length===0?i:"",className:I("flex-1 bg-transparent outline-none placeholder:text-muted-foreground","dark:placeholder:text-zinc-500","min-w-[120px]",l&&"cursor-not-allowed"),...u})]}),p&&(0,ra.jsx)("p",{className:"mt-1 text-xs text-destructive",children:p})]})});q3.displayName="TagsInput";var Co=R(E());var oa=R(M()),YQ=ee(["flex w-full rounded-md px-3 py-2 text-sm transition-all duration-200","text-foreground placeholder:text-muted-foreground dark:placeholder:text-gray-500","disabled:cursor-not-allowed disabled:opacity-50","focus-visible:outline-none dark:text-gray-200","resize-none"],{variants:{variant:{default:"border border-gray-300 dark:border-gray-700 bg-background dark:bg-gray-800/80 hover:border-gray-400 dark:hover:border-gray-600 focus-visible:ring-2 focus-visible:ring-primary/30 dark:focus-visible:ring-primary/20 focus-visible:border-primary dark:focus-visible:border-primary/80 dark:shadow-inner dark:shadow-gray-950/10",outline:"border-2 border-gray-300 dark:border-gray-700 bg-transparent hover:border-gray-400 dark:hover:border-gray-600 focus-visible:border-primary dark:focus-visible:border-primary/80",ghost:"border-none bg-transparent hover:bg-gray-100/50 dark:hover:bg-gray-800/30 focus-visible:bg-transparent",underline:"border-t-0 border-l-0 border-r-0 border-b-2 border-gray-300 dark:border-gray-600 rounded-none px-0 hover:border-gray-400 dark:hover:border-gray-500 focus-visible:ring-0 focus-visible:border-primary dark:focus-visible:border-primary/80 bg-transparent dark:bg-transparent"},size:{sm:"min-h-[60px] text-xs",md:"min-h-[80px] text-sm",lg:"min-h-[120px] text-base"},isError:{true:"border-error focus-visible:ring-error/30 focus-visible:border-error hover:border-error/80 dark:hover:border-error/80",false:""},isSuccess:{true:"border-success focus-visible:ring-success/30 focus-visible:border-success hover:border-success/80 dark:hover:border-success/80",false:""}},defaultVariants:{variant:"default",size:"md",isError:!1,isSuccess:!1}}),$3=Co.forwardRef(({className:e,wrapperClassName:t,messageClassName:r,variant:o,size:n,error:a,success:i,loading:s,autoResize:l=!1,maxHeight:u,characterCount:c=!1,disabled:d,maxLength:f,value:p,defaultValue:h,onChange:m,...x},v)=>{let g=Co.useRef(null),[y,w]=Co.useState(p||h||"");Co.useImperativeHandle(v,()=>g.current);let C=Co.useCallback(()=>{let _=g.current;if(!_||!l)return;_.style.height="auto";let G=_.scrollHeight;u&&G>u?(_.style.height=`${u}px`,_.style.overflowY="auto"):(_.style.height=`${G}px`,_.style.overflowY="hidden")},[l,u]);Co.useEffect(()=>{C()},[y,C]),Co.useEffect(()=>{p!==void 0&&w(p)},[p]);let b=_=>{w(_.target.value),m?.(_)},S=String(y).length,L=c&&(f!==void 0||S>0),T=typeof a=="string"?a:void 0,P=typeof i=="string"?i:void 0,A=T||P;return(0,oa.jsxs)("div",{className:I("moonui-theme","space-y-1.5 w-full",t),children:[(0,oa.jsxs)("div",{className:"relative",children:[(0,oa.jsx)("textarea",{ref:g,className:I(YQ({variant:o,size:n,isError:!!a,isSuccess:!!i}),s&&"pr-10",e),disabled:d||s,value:p,defaultValue:h,onChange:b,maxLength:f,"aria-invalid":!!a||void 0,"aria-describedby":T?`${x.id||""}-error`:P?`${x.id||""}-success`:void 0,...x}),s&&(0,oa.jsx)("div",{className:"absolute top-3 right-3 text-gray-500",children:(0,oa.jsx)(Nt,{className:"h-4 w-4 animate-spin","aria-hidden":"true"})})]}),(0,oa.jsxs)("div",{className:"flex items-center justify-between",children:[A&&(0,oa.jsx)("p",{className:I("text-xs transition-all",T&&"text-error",P&&"text-success",r),id:T?`${x.id||""}-error`:P?`${x.id||""}-success`:void 0,children:T||P}),L&&(0,oa.jsxs)("p",{className:"text-xs text-muted-foreground dark:text-gray-500 ml-auto",children:[S,f!==void 0&&` / ${f}`]})]})]})});$3.displayName="Textarea";var Mn=R(E());var ge=R(E(),1),X3=R(ru(),1);var Ne=R(M(),1),cL="ToastProvider",[dL,QQ,ZQ]=En("Toast"),[Y3,LEe]=Te("Toast",[ZQ]),[JQ,Dy]=Y3(cL),Q3=e=>{let{__scopeToast:t,label:r="Notification",duration:o=5e3,swipeDirection:n="right",swipeThreshold:a=50,children:i}=e,[s,l]=ge.useState(null),[u,c]=ge.useState(0),d=ge.useRef(!1),f=ge.useRef(!1);return r.trim()||console.error(`Invalid prop \`label\` supplied to \`${cL}\`. Expected non-empty \`string\`.`),(0,Ne.jsx)(dL.Provider,{scope:t,children:(0,Ne.jsx)(JQ,{scope:t,label:r,duration:o,swipeDirection:n,swipeThreshold:a,toastCount:u,viewport:s,onViewportChange:l,onToastAdd:ge.useCallback(()=>c(p=>p+1),[]),onToastRemove:ge.useCallback(()=>c(p=>p-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:f,children:i})})};Q3.displayName=cL;var Z3="ToastViewport",eZ=["F8"],sL="toast.viewportPause",lL="toast.viewportResume",J3=ge.forwardRef((e,t)=>{let{__scopeToast:r,hotkey:o=eZ,label:n="Notifications ({hotkey})",...a}=e,i=Dy(Z3,r),s=QQ(r),l=ge.useRef(null),u=ge.useRef(null),c=ge.useRef(null),d=ge.useRef(null),f=ne(t,d,i.onViewportChange),p=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),h=i.toastCount>0;ge.useEffect(()=>{let x=v=>{o.length!==0&&o.every(y=>v[y]||v.code===y)&&d.current?.focus()};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[o]),ge.useEffect(()=>{let x=l.current,v=d.current;if(h&&x&&v){let g=()=>{if(!i.isClosePausedRef.current){let b=new CustomEvent(sL);v.dispatchEvent(b),i.isClosePausedRef.current=!0}},y=()=>{if(i.isClosePausedRef.current){let b=new CustomEvent(lL);v.dispatchEvent(b),i.isClosePausedRef.current=!1}},w=b=>{!x.contains(b.relatedTarget)&&y()},C=()=>{x.contains(document.activeElement)||y()};return x.addEventListener("focusin",g),x.addEventListener("focusout",w),x.addEventListener("pointermove",g),x.addEventListener("pointerleave",C),window.addEventListener("blur",g),window.addEventListener("focus",y),()=>{x.removeEventListener("focusin",g),x.removeEventListener("focusout",w),x.removeEventListener("pointermove",g),x.removeEventListener("pointerleave",C),window.removeEventListener("blur",g),window.removeEventListener("focus",y)}}},[h,i.isClosePausedRef]);let m=ge.useCallback(({tabbingDirection:x})=>{let g=s().map(y=>{let w=y.ref.current,C=[w,...pZ(w)];return x==="forwards"?C:C.reverse()});return(x==="forwards"?g.reverse():g).flat()},[s]);return ge.useEffect(()=>{let x=d.current;if(x){let v=g=>{let y=g.altKey||g.ctrlKey||g.metaKey;if(g.key==="Tab"&&!y){let C=document.activeElement,b=g.shiftKey;if(g.target===x&&b){u.current?.focus();return}let T=m({tabbingDirection:b?"backwards":"forwards"}),P=T.findIndex(A=>A===C);iL(T.slice(P+1))?g.preventDefault():b?u.current?.focus():c.current?.focus()}};return x.addEventListener("keydown",v),()=>x.removeEventListener("keydown",v)}},[s,m]),(0,Ne.jsxs)(gN,{ref:l,role:"region","aria-label":n.replace("{hotkey}",p),tabIndex:-1,style:{pointerEvents:h?void 0:"none"},children:[h&&(0,Ne.jsx)(uL,{ref:u,onFocusFromOutsideViewport:()=>{let x=m({tabbingDirection:"forwards"});iL(x)}}),(0,Ne.jsx)(dL.Slot,{scope:r,children:(0,Ne.jsx)($.ol,{tabIndex:-1,...a,ref:f})}),h&&(0,Ne.jsx)(uL,{ref:c,onFocusFromOutsideViewport:()=>{let x=m({tabbingDirection:"backwards"});iL(x)}})]})});J3.displayName=Z3;var eU="ToastFocusProxy",uL=ge.forwardRef((e,t)=>{let{__scopeToast:r,onFocusFromOutsideViewport:o,...n}=e,a=Dy(eU,r);return(0,Ne.jsx)(Pp,{tabIndex:0,...n,ref:t,style:{position:"fixed"},onFocus:i=>{let s=i.relatedTarget;!a.viewport?.contains(s)&&o()}})});uL.displayName=eU;var Fp="Toast",tZ="toast.swipeStart",rZ="toast.swipeMove",oZ="toast.swipeCancel",nZ="toast.swipeEnd",tU=ge.forwardRef((e,t)=>{let{forceMount:r,open:o,defaultOpen:n,onOpenChange:a,...i}=e,[s,l]=ze({prop:o,defaultProp:n??!0,onChange:a,caller:Fp});return(0,Ne.jsx)(it,{present:r||s,children:(0,Ne.jsx)(sZ,{open:s,...i,ref:t,onClose:()=>l(!1),onPause:et(e.onPause),onResume:et(e.onResume),onSwipeStart:H(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:H(e.onSwipeMove,u=>{let{x:c,y:d}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${c}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${d}px`)}),onSwipeCancel:H(e.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:H(e.onSwipeEnd,u=>{let{x:c,y:d}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${c}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${d}px`),l(!1)})})})});tU.displayName=Fp;var[aZ,iZ]=Y3(Fp,{onClose(){}}),sZ=ge.forwardRef((e,t)=>{let{__scopeToast:r,type:o="foreground",duration:n,open:a,onClose:i,onEscapeKeyDown:s,onPause:l,onResume:u,onSwipeStart:c,onSwipeMove:d,onSwipeCancel:f,onSwipeEnd:p,...h}=e,m=Dy(Fp,r),[x,v]=ge.useState(null),g=ne(t,D=>v(D)),y=ge.useRef(null),w=ge.useRef(null),C=n||m.duration,b=ge.useRef(0),S=ge.useRef(C),L=ge.useRef(0),{onToastAdd:T,onToastRemove:P}=m,A=et(()=>{x?.contains(document.activeElement)&&m.viewport?.focus(),i()}),_=ge.useCallback(D=>{!D||D===1/0||(window.clearTimeout(L.current),b.current=new Date().getTime(),L.current=window.setTimeout(A,D))},[A]);ge.useEffect(()=>{let D=m.viewport;if(D){let W=()=>{_(S.current),u?.()},N=()=>{let z=new Date().getTime()-b.current;S.current=S.current-z,window.clearTimeout(L.current),l?.()};return D.addEventListener(sL,N),D.addEventListener(lL,W),()=>{D.removeEventListener(sL,N),D.removeEventListener(lL,W)}}},[m.viewport,C,l,u,_]),ge.useEffect(()=>{a&&!m.isClosePausedRef.current&&_(C)},[a,C,m.isClosePausedRef,_]),ge.useEffect(()=>(T(),()=>P()),[T,P]);let G=ge.useMemo(()=>x?lU(x):null,[x]);return m.viewport?(0,Ne.jsxs)(Ne.Fragment,{children:[G&&(0,Ne.jsx)(lZ,{__scopeToast:r,role:"status","aria-live":o==="foreground"?"assertive":"polite",children:G}),(0,Ne.jsx)(aZ,{scope:r,onClose:A,children:X3.createPortal((0,Ne.jsx)(dL.ItemSlot,{scope:r,children:(0,Ne.jsx)(mN,{asChild:!0,onEscapeKeyDown:H(s,()=>{m.isFocusedToastEscapeKeyDownRef.current||A(),m.isFocusedToastEscapeKeyDownRef.current=!1}),children:(0,Ne.jsx)($.li,{tabIndex:0,"data-state":a?"open":"closed","data-swipe-direction":m.swipeDirection,...h,ref:g,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:H(e.onKeyDown,D=>{D.key==="Escape"&&(s?.(D.nativeEvent),D.nativeEvent.defaultPrevented||(m.isFocusedToastEscapeKeyDownRef.current=!0,A()))}),onPointerDown:H(e.onPointerDown,D=>{D.button===0&&(y.current={x:D.clientX,y:D.clientY})}),onPointerMove:H(e.onPointerMove,D=>{if(!y.current)return;let W=D.clientX-y.current.x,N=D.clientY-y.current.y,z=!!w.current,V=["left","right"].includes(m.swipeDirection),k=["left","up"].includes(m.swipeDirection)?Math.min:Math.max,Z=V?k(0,W):0,ve=V?0:k(0,N),O=D.pointerType==="touch"?10:2,J={x:Z,y:ve},ae={originalEvent:D,delta:J};z?(w.current=J,Ay(rZ,d,ae,{discrete:!1})):K3(J,m.swipeDirection,O)?(w.current=J,Ay(tZ,c,ae,{discrete:!1}),D.target.setPointerCapture(D.pointerId)):(Math.abs(W)>O||Math.abs(N)>O)&&(y.current=null)}),onPointerUp:H(e.onPointerUp,D=>{let W=w.current,N=D.target;if(N.hasPointerCapture(D.pointerId)&&N.releasePointerCapture(D.pointerId),w.current=null,y.current=null,W){let z=D.currentTarget,V={originalEvent:D,delta:W};K3(W,m.swipeDirection,m.swipeThreshold)?Ay(nZ,p,V,{discrete:!0}):Ay(oZ,f,V,{discrete:!0}),z.addEventListener("click",k=>k.preventDefault(),{once:!0})}})})})}),m.viewport)})]}):null}),lZ=e=>{let{__scopeToast:t,children:r,...o}=e,n=Dy(Fp,t),[a,i]=ge.useState(!1),[s,l]=ge.useState(!1);return dZ(()=>i(!0)),ge.useEffect(()=>{let u=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(u)},[]),s?null:(0,Ne.jsx)(vo,{asChild:!0,children:(0,Ne.jsx)(Pp,{...o,children:a&&(0,Ne.jsxs)(Ne.Fragment,{children:[n.label," ",r]})})})},uZ="ToastTitle",rU=ge.forwardRef((e,t)=>{let{__scopeToast:r,...o}=e;return(0,Ne.jsx)($.div,{...o,ref:t})});rU.displayName=uZ;var cZ="ToastDescription",oU=ge.forwardRef((e,t)=>{let{__scopeToast:r,...o}=e;return(0,Ne.jsx)($.div,{...o,ref:t})});oU.displayName=cZ;var nU="ToastAction",aU=ge.forwardRef((e,t)=>{let{altText:r,...o}=e;return r.trim()?(0,Ne.jsx)(sU,{altText:r,asChild:!0,children:(0,Ne.jsx)(fL,{...o,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${nU}\`. Expected non-empty \`string\`.`),null)});aU.displayName=nU;var iU="ToastClose",fL=ge.forwardRef((e,t)=>{let{__scopeToast:r,...o}=e,n=iZ(iU,r);return(0,Ne.jsx)(sU,{asChild:!0,children:(0,Ne.jsx)($.button,{type:"button",...o,ref:t,onClick:H(e.onClick,n.onClose)})})});fL.displayName=iU;var sU=ge.forwardRef((e,t)=>{let{__scopeToast:r,altText:o,...n}=e;return(0,Ne.jsx)($.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":o||void 0,...n,ref:t})});function lU(e){let t=[];return Array.from(e.childNodes).forEach(o=>{if(o.nodeType===o.TEXT_NODE&&o.textContent&&t.push(o.textContent),fZ(o)){let n=o.ariaHidden||o.hidden||o.style.display==="none",a=o.dataset.radixToastAnnounceExclude==="";if(!n)if(a){let i=o.dataset.radixToastAnnounceAlt;i&&t.push(i)}else t.push(...lU(o))}}),t}function Ay(e,t,r,{discrete:o}){let n=r.originalEvent.currentTarget,a=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:r});t&&n.addEventListener(e,t,{once:!0}),o?ou(n,a):n.dispatchEvent(a)}var K3=(e,t,r=0)=>{let o=Math.abs(e.x),n=Math.abs(e.y),a=o>n;return t==="left"||t==="right"?a&&o>r:!a&&n>r};function dZ(e=()=>{}){let t=et(e);ke(()=>{let r=0,o=0;return r=window.requestAnimationFrame(()=>o=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(o)}},[t])}function fZ(e){return e.nodeType===e.ELEMENT_NODE}function pZ(e){let t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{let n=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||n?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function iL(e){let t=document.activeElement;return e.some(r=>r===t?!0:(r.focus(),document.activeElement!==t))}var uU=Q3,pL=J3,mL=tU,gL=rU,hL=oU,vL=aU,yL=fL;var Sr=R(M()),dU=uU,wL=Mn.forwardRef(({className:e,...t},r)=>(0,Sr.jsx)(pL,{ref:r,className:I("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));wL.displayName=pL.displayName;var gZ=ee("group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-8 shadow-sm transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground",success:"border-green-200 bg-green-50 text-green-900 dark:border-green-800 dark:bg-green-900/20 dark:text-green-100",warning:"border-orange-200 bg-orange-50 text-orange-900 dark:border-orange-800 dark:bg-orange-900/20 dark:text-orange-100",info:"border-blue-200 bg-blue-50 text-blue-900 dark:border-blue-800 dark:bg-blue-900/20 dark:text-blue-100"}},defaultVariants:{variant:"default"}}),CL=Mn.forwardRef(({className:e,variant:t,...r},o)=>(0,Sr.jsx)(mL,{ref:o,className:I("moonui-theme",gZ({variant:t}),e),...r}));CL.displayName=mL.displayName;var fU=Mn.forwardRef(({className:e,...t},r)=>(0,Sr.jsx)(vL,{ref:r,className:I("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors hover:bg-secondary focus:outline-none focus:ring-1 focus:ring-ring disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...t}));fU.displayName=vL.displayName;var SL=Mn.forwardRef(({className:e,...t},r)=>(0,Sr.jsx)(yL,{ref:r,className:I("absolute right-1 top-1 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-1 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:(0,Sr.jsx)(co,{className:"h-4 w-4"})}));SL.displayName=yL.displayName;var bL=Mn.forwardRef(({className:e,...t},r)=>(0,Sr.jsx)(gL,{ref:r,className:I("moonui-theme","text-sm font-semibold [&+div]:text-xs",e),...t}));bL.displayName=gL.displayName;var RL=Mn.forwardRef(({className:e,...t},r)=>(0,Sr.jsx)(hL,{ref:r,className:I("moonui-theme","text-sm opacity-90",e),...t}));RL.displayName=hL.displayName;var hZ=5,vZ=1e6,xL=new Map,cU=e=>{if(xL.has(e))return;let t=setTimeout(()=>{xL.delete(e),Vp({type:"REMOVE_TOAST",toastId:e})},vZ);xL.set(e,t)},yZ=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,hZ)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(r=>r.id===t.toast.id?{...r,...t.toast}:r)};case"DISMISS_TOAST":{let{toastId:r}=t;return r?cU(r):e.toasts.forEach(o=>{cU(o.id)}),{...e,toasts:e.toasts.map(o=>o.id===r||r===void 0?{...o,open:!1}:o)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(r=>r.id!==t.toastId)};default:return e}},Ny=[],_y={toasts:[]},xZ=0;function Vp(e){_y=yZ(_y,e),Ny.forEach(t=>{t(_y)})}function pU({...e}){let t=`toast-${Date.now()}-${++xZ}`,r=n=>Vp({type:"UPDATE_TOAST",toast:{...n,id:t}}),o=()=>Vp({type:"DISMISS_TOAST",toastId:t});return Vp({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:n=>{n||o()}}}),{id:t,dismiss:o,update:r}}function mU(){let[e,t]=Mn.useState(_y);return Mn.useEffect(()=>(Ny.push(t),()=>{let r=Ny.indexOf(t);r>-1&&Ny.splice(r,1)}),[e]),{...e,toast:pU,dismiss:r=>Vp({type:"DISMISS_TOAST",toastId:r})}}function wZ(){let{toasts:e}=mU();return(0,Sr.jsxs)(dU,{children:[e.map(function({id:t,title:r,description:o,action:n,variant:a,open:i,onOpenChange:s,...l}){return(0,Sr.jsxs)(CL,{variant:a,open:i,onOpenChange:s,...l,children:[(0,Sr.jsxs)("div",{className:"grid gap-1",children:[r&&(0,Sr.jsx)(bL,{children:r}),o&&(0,Sr.jsx)(RL,{children:o})]}),n,(0,Sr.jsx)(SL,{})]},t)}),(0,Sr.jsx)(wL,{})]})}export{eG as Accordion,YT as AccordionContent,KT as AccordionItem,XT as AccordionTrigger,JT as Alert,tk as AlertDescription,ek as AlertTitle,ok as AspectRatio,Lw as Avatar,Iw as AvatarFallback,yk as AvatarGroup,vk as AvatarImage,fo as Badge,wk as Breadcrumb,Pw as BreadcrumbEllipsis,Sk as BreadcrumbItem,Rk as BreadcrumbLink,Ck as BreadcrumbList,Lk as BreadcrumbPage,bk as BreadcrumbSeparator,Ve as Button,tD as Card,zD as CardCVCInput,aD as CardContent,nD as CardDescription,UD as CardExpiryInput,iD as CardFooter,rD as CardHeader,HD as CardNumberInput,oD as CardTitle,WD as CardZipInput,GC as Checkbox,QD as CheckboxGroup,rv as CheckboxLabel,ZD as CheckboxWithLabel,W6 as Collapsible,tN as CollapsibleContent,eN as CollapsibleTrigger,AS as ColorPicker,Eb as Command,LK as CommandDialog,qF as CommandEmpty,$F as CommandGroup,GF as CommandInput,XF as CommandItem,jF as CommandList,KF as CommandSeparator,YF as CommandShortcut,hV as DatePicker,CX as DateRangePicker,SX as DateTimePicker,Tb as Dialog,wK as DialogClose,Jv as DialogContent,Mb as DialogDescription,WF as DialogFooter,bK as DialogForm,kb as DialogHeader,hp as DialogTitle,yK as DialogTrigger,RX as DraggableList,hY as DropdownMenu,EB as DropdownMenuCheckboxItem,kB as DropdownMenuContent,yY as DropdownMenuGroup,MB as DropdownMenuItem,DB as DropdownMenuLabel,xY as DropdownMenuPortal,CY as DropdownMenuRadioGroup,AB as DropdownMenuRadioItem,NB as DropdownMenuSeparator,_B as DropdownMenuShortcut,wY as DropdownMenuSub,TB as DropdownMenuSubContent,PB as DropdownMenuSubTrigger,vY as DropdownMenuTrigger,FB as FileUpload,kY as FreeBadge,BB as GestureDrawer,UTe as GitHubStarButton,IY as GitHubStars,n9 as GradientPicker,mr as Input,Qr as Label,HB as LockedComponent,bX as MonthPicker,xR as MoonLogo,ZTe as MoonLogoAnimated,QTe as MoonLogoIcon,eG as MoonUIAccordion,YT as MoonUIAccordionContent,KT as MoonUIAccordionItem,XT as MoonUIAccordionTrigger,JT as MoonUIAlert,tk as MoonUIAlertDescription,ek as MoonUIAlertTitle,ok as MoonUIAspectRatio,Lw as MoonUIAvatar,Iw as MoonUIAvatarFallback,yk as MoonUIAvatarGroup,vk as MoonUIAvatarImage,fo as MoonUIBadge,wk as MoonUIBreadcrumb,Pw as MoonUIBreadcrumbEllipsis,Sk as MoonUIBreadcrumbItem,Rk as MoonUIBreadcrumbLink,Ck as MoonUIBreadcrumbList,Lk as MoonUIBreadcrumbPage,bk as MoonUIBreadcrumbSeparator,Ve as MoonUIButton,Zf as MoonUICalendar,tD as MoonUICard,zD as MoonUICardCVCInput,aD as MoonUICardContent,nD as MoonUICardDescription,UD as MoonUICardExpiryInput,iD as MoonUICardFooter,rD as MoonUICardHeader,HD as MoonUICardNumberInput,oD as MoonUICardTitle,WD as MoonUICardZipInput,GC as MoonUICheckbox,QD as MoonUICheckboxGroup,rv as MoonUICheckboxLabel,ZD as MoonUICheckboxWithLabel,W6 as MoonUICollapsible,tN as MoonUICollapsibleContent,eN as MoonUICollapsibleTrigger,AS as MoonUIColorPicker,Eb as MoonUICommand,LK as MoonUICommandDialog,qF as MoonUICommandEmpty,$F as MoonUICommandGroup,GF as MoonUICommandInput,XF as MoonUICommandItem,jF as MoonUICommandList,KF as MoonUICommandSeparator,YF as MoonUICommandShortcut,yX as MoonUIDataTableBasic,hV as MoonUIDatePicker,CX as MoonUIDateRangePicker,SX as MoonUIDateTimePicker,Tb as MoonUIDialog,wK as MoonUIDialogClose,Jv as MoonUIDialogContent,Mb as MoonUIDialogDescription,WF as MoonUIDialogFooter,kb as MoonUIDialogHeader,hp as MoonUIDialogTitle,yK as MoonUIDialogTrigger,RX as MoonUIDraggableList,hY as MoonUIDropdownMenu,EB as MoonUIDropdownMenuCheckboxItem,kB as MoonUIDropdownMenuContent,yY as MoonUIDropdownMenuGroup,MB as MoonUIDropdownMenuItem,DB as MoonUIDropdownMenuLabel,xY as MoonUIDropdownMenuPortal,CY as MoonUIDropdownMenuRadioGroup,AB as MoonUIDropdownMenuRadioItem,NB as MoonUIDropdownMenuSeparator,_B as MoonUIDropdownMenuShortcut,wY as MoonUIDropdownMenuSub,TB as MoonUIDropdownMenuSubContent,PB as MoonUIDropdownMenuSubTrigger,vY as MoonUIDropdownMenuTrigger,FB as MoonUIFileUpload,kY as MoonUIFreeBadge,BB as MoonUIGestureDrawer,IY as MoonUIGitHubStars,n9 as MoonUIGradientPicker,mr as MoonUIInput,Qr as MoonUILabel,HB as MoonUILockedComponent,bX as MoonUIMonthPicker,xR as MoonUIMoonLogo,zB as MoonUIPagination,WB as MoonUIPaginationContent,$B as MoonUIPaginationEllipsis,GB as MoonUIPaginationItem,py as MoonUIPaginationLink,qB as MoonUIPaginationNext,jB as MoonUIPaginationPrevious,FH as MoonUIPhoneInput,Oa as MoonUIPopover,Qn as MoonUIPopoverContent,Fa as MoonUIPopoverTrigger,TY as MoonUIProBadge,PY as MoonUIProComponentWrapper,fy as MoonUIProgress,BH as MoonUIRadioGroup,BR as MoonUIRadioGroupItem,HH as MoonUIRadioItemWithLabel,HR as MoonUIRadioLabel,oQ as MoonUIRichTextEditor,n3 as MoonUIScrollArea,$R as MoonUIScrollBar,a3 as MoonUIScrollReveal,i3 as MoonUIScrollRevealContainer,s3 as MoonUIScrollRevealItem,Pc as MoonUISelect,kc as MoonUISelectContent,JY as MoonUISelectGroup,Fr as MoonUISelectItem,NH as MoonUISelectLabel,VR as MoonUISelectScrollDownButton,FR as MoonUISelectScrollUpButton,_H as MoonUISelectSeparator,Tc as MoonUISelectTrigger,kp as MoonUISelectValue,Xo as MoonUISeparator,o9 as MoonUISimpleColorPicker,D3 as MoonUISimpleEditor,is as MoonUISkeleton,nL as MoonUISkeletonAvatar,_3 as MoonUISkeletonCard,oL as MoonUISkeletonText,Ua as MoonUISlider,O3 as MoonUISwipeableCard,j3 as MoonUISwitch,ny as MoonUITable,iy as MoonUITableBody,gV as MoonUITableCaption,wp as MoonUITableCell,mV as MoonUITableFooter,sy as MoonUITableHead,ay as MoonUITableHeader,Rc as MoonUITableRow,Tv as MoonUITabs,pc as MoonUITabsContent,kv as MoonUITabsList,fc as MoonUITabsTrigger,q3 as MoonUITagsInput,$3 as MoonUITextarea,CL as MoonUIToast,fU as MoonUIToastAction,SL as MoonUIToastClose,RL as MoonUIToastDescription,dU as MoonUIToastProvider,bL as MoonUIToastTitle,wL as MoonUIToastViewport,wZ as MoonUIToaster,Ly as MoonUIToggle,ky as MoonUITooltip,Np as MoonUITooltipContent,rL as MoonUITooltipProvider,My as MoonUITooltipTrigger,zB as Pagination,WB as PaginationContent,$B as PaginationEllipsis,GB as PaginationItem,py as PaginationLink,qB as PaginationNext,jB as PaginationPrevious,du as Palette,FH as PhoneInput,xg as Pipette,Oa as Popover,HRe as PopoverAnchor,URe as PopoverClose,Qn as PopoverContent,_8 as PopoverFooter,N8 as PopoverHeader,D8 as PopoverSeparator,Fa as PopoverTrigger,TY as ProBadge,PY as ProComponentWrapper,fy as Progress,BH as RadioGroup,BR as RadioGroupItem,HH as RadioItemWithLabel,HR as RadioLabel,oQ as RichTextEditor,n3 as ScrollArea,$R as ScrollBar,a3 as ScrollReveal,i3 as ScrollRevealContainer,s3 as ScrollRevealItem,Pc as Select,kc as SelectContent,JY as SelectGroup,Fr as SelectItem,NH as SelectLabel,VR as SelectScrollDownButton,FR as SelectScrollUpButton,_H as SelectSeparator,Tc as SelectTrigger,kp as SelectValue,Xo as Separator,o9 as SimpleColorPicker,D3 as SimpleEditor,zQ as SimpleTooltip,is as Skeleton,nL as SkeletonAvatar,_3 as SkeletonCard,oL as SkeletonText,Ua as Slider,O3 as SwipeableCard,j3 as Switch,ny as Table,iy as TableBody,gV as TableCaption,wp as TableCell,mV as TableFooter,sy as TableHead,ay as TableHeader,Rc as TableRow,Tv as Tabs,pc as TabsContent,kv as TabsList,fc as TabsTrigger,q3 as TagsInput,$3 as Textarea,CL as Toast,fU as ToastAction,SL as ToastClose,RL as ToastDescription,dU as ToastProvider,bL as ToastTitle,wL as ToastViewport,wZ as Toaster,Ly as Toggle,ky as Tooltip,A3 as TooltipArrow,Np as TooltipContent,rL as TooltipProvider,My as TooltipTrigger,rG as aspectRatioVariants,xk as badgeVariants,Sg as buttonVariants,I as cn,G6 as collapsibleContentVariants,JD as collapsibleTriggerVariants,hn as format,xk as moonUIBadgeVariants,Sg as moonUIButtonVariants,xX as moonUICreateSortableHeader,N3 as moonUISkeletonVariants,x3 as moonUIToggleVariants,A8 as popoverContentVariants,SY as progressVariants,SQ as separatorVariants,N3 as skeletonVariants,pU as toast,x3 as toggleVariants,UQ as tooltipVariants,mU as useToast};
|
|
58
109
|
/*! Bundled license information:
|
|
59
110
|
|
|
60
|
-
react/cjs/react.production.js:
|
|
111
|
+
react/cjs/react.production.min.js:
|
|
61
112
|
(**
|
|
62
113
|
* @license React
|
|
63
|
-
* react.production.js
|
|
114
|
+
* react.production.min.js
|
|
115
|
+
*
|
|
116
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
117
|
+
*
|
|
118
|
+
* This source code is licensed under the MIT license found in the
|
|
119
|
+
* LICENSE file in the root directory of this source tree.
|
|
120
|
+
*)
|
|
121
|
+
|
|
122
|
+
react/cjs/react-jsx-runtime.production.min.js:
|
|
123
|
+
(**
|
|
124
|
+
* @license React
|
|
125
|
+
* react-jsx-runtime.production.min.js
|
|
126
|
+
*
|
|
127
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
128
|
+
*
|
|
129
|
+
* This source code is licensed under the MIT license found in the
|
|
130
|
+
* LICENSE file in the root directory of this source tree.
|
|
131
|
+
*)
|
|
132
|
+
|
|
133
|
+
scheduler/cjs/scheduler.production.min.js:
|
|
134
|
+
(**
|
|
135
|
+
* @license React
|
|
136
|
+
* scheduler.production.min.js
|
|
137
|
+
*
|
|
138
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
139
|
+
*
|
|
140
|
+
* This source code is licensed under the MIT license found in the
|
|
141
|
+
* LICENSE file in the root directory of this source tree.
|
|
142
|
+
*)
|
|
143
|
+
|
|
144
|
+
react-dom/cjs/react-dom.production.min.js:
|
|
145
|
+
(**
|
|
146
|
+
* @license React
|
|
147
|
+
* react-dom.production.min.js
|
|
148
|
+
*
|
|
149
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
150
|
+
*
|
|
151
|
+
* This source code is licensed under the MIT license found in the
|
|
152
|
+
* LICENSE file in the root directory of this source tree.
|
|
153
|
+
*)
|
|
154
|
+
|
|
155
|
+
use-sync-external-store/cjs/use-sync-external-store-shim.production.js:
|
|
156
|
+
(**
|
|
157
|
+
* @license React
|
|
158
|
+
* use-sync-external-store-shim.production.js
|
|
64
159
|
*
|
|
65
160
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
66
161
|
*
|
|
@@ -68,10 +163,10 @@ react/cjs/react.production.js:
|
|
|
68
163
|
* LICENSE file in the root directory of this source tree.
|
|
69
164
|
*)
|
|
70
165
|
|
|
71
|
-
react/cjs/react
|
|
166
|
+
react/cjs/react.production.js:
|
|
72
167
|
(**
|
|
73
168
|
* @license React
|
|
74
|
-
* react
|
|
169
|
+
* react.production.js
|
|
75
170
|
*
|
|
76
171
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
77
172
|
*
|
|
@@ -79,10 +174,10 @@ react/cjs/react-jsx-runtime.production.js:
|
|
|
79
174
|
* LICENSE file in the root directory of this source tree.
|
|
80
175
|
*)
|
|
81
176
|
|
|
82
|
-
react
|
|
177
|
+
react/cjs/react-jsx-runtime.production.js:
|
|
83
178
|
(**
|
|
84
179
|
* @license React
|
|
85
|
-
* react-
|
|
180
|
+
* react-jsx-runtime.production.js
|
|
86
181
|
*
|
|
87
182
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
88
183
|
*
|
|
@@ -90,10 +185,10 @@ react-dom/cjs/react-dom.production.js:
|
|
|
90
185
|
* LICENSE file in the root directory of this source tree.
|
|
91
186
|
*)
|
|
92
187
|
|
|
93
|
-
|
|
188
|
+
react-dom/cjs/react-dom.production.js:
|
|
94
189
|
(**
|
|
95
190
|
* @license React
|
|
96
|
-
*
|
|
191
|
+
* react-dom.production.js
|
|
97
192
|
*
|
|
98
193
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
99
194
|
*
|
|
@@ -102,63 +197,469 @@ use-sync-external-store/cjs/use-sync-external-store-shim.production.js:
|
|
|
102
197
|
*)
|
|
103
198
|
|
|
104
199
|
lucide-react/dist/esm/shared/src/utils.js:
|
|
200
|
+
(**
|
|
201
|
+
* @license lucide-react v0.525.0 - ISC
|
|
202
|
+
*
|
|
203
|
+
* This source code is licensed under the ISC license.
|
|
204
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
205
|
+
*)
|
|
206
|
+
|
|
105
207
|
lucide-react/dist/esm/defaultAttributes.js:
|
|
208
|
+
(**
|
|
209
|
+
* @license lucide-react v0.525.0 - ISC
|
|
210
|
+
*
|
|
211
|
+
* This source code is licensed under the ISC license.
|
|
212
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
213
|
+
*)
|
|
214
|
+
|
|
106
215
|
lucide-react/dist/esm/Icon.js:
|
|
216
|
+
(**
|
|
217
|
+
* @license lucide-react v0.525.0 - ISC
|
|
218
|
+
*
|
|
219
|
+
* This source code is licensed under the ISC license.
|
|
220
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
221
|
+
*)
|
|
222
|
+
|
|
107
223
|
lucide-react/dist/esm/createLucideIcon.js:
|
|
224
|
+
(**
|
|
225
|
+
* @license lucide-react v0.525.0 - ISC
|
|
226
|
+
*
|
|
227
|
+
* This source code is licensed under the ISC license.
|
|
228
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
229
|
+
*)
|
|
230
|
+
|
|
108
231
|
lucide-react/dist/esm/icons/align-center.js:
|
|
232
|
+
(**
|
|
233
|
+
* @license lucide-react v0.525.0 - ISC
|
|
234
|
+
*
|
|
235
|
+
* This source code is licensed under the ISC license.
|
|
236
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
237
|
+
*)
|
|
238
|
+
|
|
109
239
|
lucide-react/dist/esm/icons/align-justify.js:
|
|
240
|
+
(**
|
|
241
|
+
* @license lucide-react v0.525.0 - ISC
|
|
242
|
+
*
|
|
243
|
+
* This source code is licensed under the ISC license.
|
|
244
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
245
|
+
*)
|
|
246
|
+
|
|
110
247
|
lucide-react/dist/esm/icons/align-left.js:
|
|
248
|
+
(**
|
|
249
|
+
* @license lucide-react v0.525.0 - ISC
|
|
250
|
+
*
|
|
251
|
+
* This source code is licensed under the ISC license.
|
|
252
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
253
|
+
*)
|
|
254
|
+
|
|
111
255
|
lucide-react/dist/esm/icons/align-right.js:
|
|
256
|
+
(**
|
|
257
|
+
* @license lucide-react v0.525.0 - ISC
|
|
258
|
+
*
|
|
259
|
+
* This source code is licensed under the ISC license.
|
|
260
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
261
|
+
*)
|
|
262
|
+
|
|
112
263
|
lucide-react/dist/esm/icons/arrow-down.js:
|
|
264
|
+
(**
|
|
265
|
+
* @license lucide-react v0.525.0 - ISC
|
|
266
|
+
*
|
|
267
|
+
* This source code is licensed under the ISC license.
|
|
268
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
269
|
+
*)
|
|
270
|
+
|
|
113
271
|
lucide-react/dist/esm/icons/arrow-up-down.js:
|
|
272
|
+
(**
|
|
273
|
+
* @license lucide-react v0.525.0 - ISC
|
|
274
|
+
*
|
|
275
|
+
* This source code is licensed under the ISC license.
|
|
276
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
277
|
+
*)
|
|
278
|
+
|
|
114
279
|
lucide-react/dist/esm/icons/arrow-up.js:
|
|
280
|
+
(**
|
|
281
|
+
* @license lucide-react v0.525.0 - ISC
|
|
282
|
+
*
|
|
283
|
+
* This source code is licensed under the ISC license.
|
|
284
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
285
|
+
*)
|
|
286
|
+
|
|
115
287
|
lucide-react/dist/esm/icons/bold.js:
|
|
288
|
+
(**
|
|
289
|
+
* @license lucide-react v0.525.0 - ISC
|
|
290
|
+
*
|
|
291
|
+
* This source code is licensed under the ISC license.
|
|
292
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
293
|
+
*)
|
|
294
|
+
|
|
116
295
|
lucide-react/dist/esm/icons/calendar.js:
|
|
296
|
+
(**
|
|
297
|
+
* @license lucide-react v0.525.0 - ISC
|
|
298
|
+
*
|
|
299
|
+
* This source code is licensed under the ISC license.
|
|
300
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
301
|
+
*)
|
|
302
|
+
|
|
117
303
|
lucide-react/dist/esm/icons/check.js:
|
|
304
|
+
(**
|
|
305
|
+
* @license lucide-react v0.525.0 - ISC
|
|
306
|
+
*
|
|
307
|
+
* This source code is licensed under the ISC license.
|
|
308
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
309
|
+
*)
|
|
310
|
+
|
|
118
311
|
lucide-react/dist/esm/icons/chevron-down.js:
|
|
312
|
+
(**
|
|
313
|
+
* @license lucide-react v0.525.0 - ISC
|
|
314
|
+
*
|
|
315
|
+
* This source code is licensed under the ISC license.
|
|
316
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
317
|
+
*)
|
|
318
|
+
|
|
119
319
|
lucide-react/dist/esm/icons/chevron-left.js:
|
|
320
|
+
(**
|
|
321
|
+
* @license lucide-react v0.525.0 - ISC
|
|
322
|
+
*
|
|
323
|
+
* This source code is licensed under the ISC license.
|
|
324
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
325
|
+
*)
|
|
326
|
+
|
|
120
327
|
lucide-react/dist/esm/icons/chevron-right.js:
|
|
328
|
+
(**
|
|
329
|
+
* @license lucide-react v0.525.0 - ISC
|
|
330
|
+
*
|
|
331
|
+
* This source code is licensed under the ISC license.
|
|
332
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
333
|
+
*)
|
|
334
|
+
|
|
121
335
|
lucide-react/dist/esm/icons/chevron-up.js:
|
|
336
|
+
(**
|
|
337
|
+
* @license lucide-react v0.525.0 - ISC
|
|
338
|
+
*
|
|
339
|
+
* This source code is licensed under the ISC license.
|
|
340
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
341
|
+
*)
|
|
342
|
+
|
|
122
343
|
lucide-react/dist/esm/icons/circle-alert.js:
|
|
344
|
+
(**
|
|
345
|
+
* @license lucide-react v0.525.0 - ISC
|
|
346
|
+
*
|
|
347
|
+
* This source code is licensed under the ISC license.
|
|
348
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
349
|
+
*)
|
|
350
|
+
|
|
123
351
|
lucide-react/dist/esm/icons/circle-check-big.js:
|
|
352
|
+
(**
|
|
353
|
+
* @license lucide-react v0.525.0 - ISC
|
|
354
|
+
*
|
|
355
|
+
* This source code is licensed under the ISC license.
|
|
356
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
357
|
+
*)
|
|
358
|
+
|
|
124
359
|
lucide-react/dist/esm/icons/circle.js:
|
|
360
|
+
(**
|
|
361
|
+
* @license lucide-react v0.525.0 - ISC
|
|
362
|
+
*
|
|
363
|
+
* This source code is licensed under the ISC license.
|
|
364
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
365
|
+
*)
|
|
366
|
+
|
|
125
367
|
lucide-react/dist/esm/icons/clock.js:
|
|
368
|
+
(**
|
|
369
|
+
* @license lucide-react v0.525.0 - ISC
|
|
370
|
+
*
|
|
371
|
+
* This source code is licensed under the ISC license.
|
|
372
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
373
|
+
*)
|
|
374
|
+
|
|
126
375
|
lucide-react/dist/esm/icons/code.js:
|
|
376
|
+
(**
|
|
377
|
+
* @license lucide-react v0.525.0 - ISC
|
|
378
|
+
*
|
|
379
|
+
* This source code is licensed under the ISC license.
|
|
380
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
381
|
+
*)
|
|
382
|
+
|
|
127
383
|
lucide-react/dist/esm/icons/copy.js:
|
|
384
|
+
(**
|
|
385
|
+
* @license lucide-react v0.525.0 - ISC
|
|
386
|
+
*
|
|
387
|
+
* This source code is licensed under the ISC license.
|
|
388
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
389
|
+
*)
|
|
390
|
+
|
|
128
391
|
lucide-react/dist/esm/icons/credit-card.js:
|
|
392
|
+
(**
|
|
393
|
+
* @license lucide-react v0.525.0 - ISC
|
|
394
|
+
*
|
|
395
|
+
* This source code is licensed under the ISC license.
|
|
396
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
397
|
+
*)
|
|
398
|
+
|
|
129
399
|
lucide-react/dist/esm/icons/crown.js:
|
|
400
|
+
(**
|
|
401
|
+
* @license lucide-react v0.525.0 - ISC
|
|
402
|
+
*
|
|
403
|
+
* This source code is licensed under the ISC license.
|
|
404
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
405
|
+
*)
|
|
406
|
+
|
|
130
407
|
lucide-react/dist/esm/icons/ellipsis.js:
|
|
408
|
+
(**
|
|
409
|
+
* @license lucide-react v0.525.0 - ISC
|
|
410
|
+
*
|
|
411
|
+
* This source code is licensed under the ISC license.
|
|
412
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
413
|
+
*)
|
|
414
|
+
|
|
131
415
|
lucide-react/dist/esm/icons/external-link.js:
|
|
416
|
+
(**
|
|
417
|
+
* @license lucide-react v0.525.0 - ISC
|
|
418
|
+
*
|
|
419
|
+
* This source code is licensed under the ISC license.
|
|
420
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
421
|
+
*)
|
|
422
|
+
|
|
132
423
|
lucide-react/dist/esm/icons/eye.js:
|
|
424
|
+
(**
|
|
425
|
+
* @license lucide-react v0.525.0 - ISC
|
|
426
|
+
*
|
|
427
|
+
* This source code is licensed under the ISC license.
|
|
428
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
429
|
+
*)
|
|
430
|
+
|
|
133
431
|
lucide-react/dist/esm/icons/file-text.js:
|
|
432
|
+
(**
|
|
433
|
+
* @license lucide-react v0.525.0 - ISC
|
|
434
|
+
*
|
|
435
|
+
* This source code is licensed under the ISC license.
|
|
436
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
437
|
+
*)
|
|
438
|
+
|
|
134
439
|
lucide-react/dist/esm/icons/file.js:
|
|
440
|
+
(**
|
|
441
|
+
* @license lucide-react v0.525.0 - ISC
|
|
442
|
+
*
|
|
443
|
+
* This source code is licensed under the ISC license.
|
|
444
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
445
|
+
*)
|
|
446
|
+
|
|
135
447
|
lucide-react/dist/esm/icons/git-fork.js:
|
|
448
|
+
(**
|
|
449
|
+
* @license lucide-react v0.525.0 - ISC
|
|
450
|
+
*
|
|
451
|
+
* This source code is licensed under the ISC license.
|
|
452
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
453
|
+
*)
|
|
454
|
+
|
|
136
455
|
lucide-react/dist/esm/icons/image.js:
|
|
456
|
+
(**
|
|
457
|
+
* @license lucide-react v0.525.0 - ISC
|
|
458
|
+
*
|
|
459
|
+
* This source code is licensed under the ISC license.
|
|
460
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
461
|
+
*)
|
|
462
|
+
|
|
137
463
|
lucide-react/dist/esm/icons/info.js:
|
|
464
|
+
(**
|
|
465
|
+
* @license lucide-react v0.525.0 - ISC
|
|
466
|
+
*
|
|
467
|
+
* This source code is licensed under the ISC license.
|
|
468
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
469
|
+
*)
|
|
470
|
+
|
|
138
471
|
lucide-react/dist/esm/icons/italic.js:
|
|
472
|
+
(**
|
|
473
|
+
* @license lucide-react v0.525.0 - ISC
|
|
474
|
+
*
|
|
475
|
+
* This source code is licensed under the ISC license.
|
|
476
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
477
|
+
*)
|
|
478
|
+
|
|
139
479
|
lucide-react/dist/esm/icons/link.js:
|
|
480
|
+
(**
|
|
481
|
+
* @license lucide-react v0.525.0 - ISC
|
|
482
|
+
*
|
|
483
|
+
* This source code is licensed under the ISC license.
|
|
484
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
485
|
+
*)
|
|
486
|
+
|
|
140
487
|
lucide-react/dist/esm/icons/list-ordered.js:
|
|
488
|
+
(**
|
|
489
|
+
* @license lucide-react v0.525.0 - ISC
|
|
490
|
+
*
|
|
491
|
+
* This source code is licensed under the ISC license.
|
|
492
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
493
|
+
*)
|
|
494
|
+
|
|
141
495
|
lucide-react/dist/esm/icons/list.js:
|
|
496
|
+
(**
|
|
497
|
+
* @license lucide-react v0.525.0 - ISC
|
|
498
|
+
*
|
|
499
|
+
* This source code is licensed under the ISC license.
|
|
500
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
501
|
+
*)
|
|
502
|
+
|
|
142
503
|
lucide-react/dist/esm/icons/loader-circle.js:
|
|
504
|
+
(**
|
|
505
|
+
* @license lucide-react v0.525.0 - ISC
|
|
506
|
+
*
|
|
507
|
+
* This source code is licensed under the ISC license.
|
|
508
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
509
|
+
*)
|
|
510
|
+
|
|
143
511
|
lucide-react/dist/esm/icons/lock.js:
|
|
512
|
+
(**
|
|
513
|
+
* @license lucide-react v0.525.0 - ISC
|
|
514
|
+
*
|
|
515
|
+
* This source code is licensed under the ISC license.
|
|
516
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
517
|
+
*)
|
|
518
|
+
|
|
144
519
|
lucide-react/dist/esm/icons/minus.js:
|
|
520
|
+
(**
|
|
521
|
+
* @license lucide-react v0.525.0 - ISC
|
|
522
|
+
*
|
|
523
|
+
* This source code is licensed under the ISC license.
|
|
524
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
525
|
+
*)
|
|
526
|
+
|
|
145
527
|
lucide-react/dist/esm/icons/music.js:
|
|
528
|
+
(**
|
|
529
|
+
* @license lucide-react v0.525.0 - ISC
|
|
530
|
+
*
|
|
531
|
+
* This source code is licensed under the ISC license.
|
|
532
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
533
|
+
*)
|
|
534
|
+
|
|
146
535
|
lucide-react/dist/esm/icons/palette.js:
|
|
536
|
+
(**
|
|
537
|
+
* @license lucide-react v0.525.0 - ISC
|
|
538
|
+
*
|
|
539
|
+
* This source code is licensed under the ISC license.
|
|
540
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
541
|
+
*)
|
|
542
|
+
|
|
147
543
|
lucide-react/dist/esm/icons/phone.js:
|
|
544
|
+
(**
|
|
545
|
+
* @license lucide-react v0.525.0 - ISC
|
|
546
|
+
*
|
|
547
|
+
* This source code is licensed under the ISC license.
|
|
548
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
549
|
+
*)
|
|
550
|
+
|
|
148
551
|
lucide-react/dist/esm/icons/pipette.js:
|
|
552
|
+
(**
|
|
553
|
+
* @license lucide-react v0.525.0 - ISC
|
|
554
|
+
*
|
|
555
|
+
* This source code is licensed under the ISC license.
|
|
556
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
557
|
+
*)
|
|
558
|
+
|
|
149
559
|
lucide-react/dist/esm/icons/quote.js:
|
|
560
|
+
(**
|
|
561
|
+
* @license lucide-react v0.525.0 - ISC
|
|
562
|
+
*
|
|
563
|
+
* This source code is licensed under the ISC license.
|
|
564
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
565
|
+
*)
|
|
566
|
+
|
|
150
567
|
lucide-react/dist/esm/icons/redo.js:
|
|
568
|
+
(**
|
|
569
|
+
* @license lucide-react v0.525.0 - ISC
|
|
570
|
+
*
|
|
571
|
+
* This source code is licensed under the ISC license.
|
|
572
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
573
|
+
*)
|
|
574
|
+
|
|
151
575
|
lucide-react/dist/esm/icons/search.js:
|
|
576
|
+
(**
|
|
577
|
+
* @license lucide-react v0.525.0 - ISC
|
|
578
|
+
*
|
|
579
|
+
* This source code is licensed under the ISC license.
|
|
580
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
581
|
+
*)
|
|
582
|
+
|
|
152
583
|
lucide-react/dist/esm/icons/square-pen.js:
|
|
584
|
+
(**
|
|
585
|
+
* @license lucide-react v0.525.0 - ISC
|
|
586
|
+
*
|
|
587
|
+
* This source code is licensed under the ISC license.
|
|
588
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
589
|
+
*)
|
|
590
|
+
|
|
153
591
|
lucide-react/dist/esm/icons/star.js:
|
|
592
|
+
(**
|
|
593
|
+
* @license lucide-react v0.525.0 - ISC
|
|
594
|
+
*
|
|
595
|
+
* This source code is licensed under the ISC license.
|
|
596
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
597
|
+
*)
|
|
598
|
+
|
|
154
599
|
lucide-react/dist/esm/icons/strikethrough.js:
|
|
600
|
+
(**
|
|
601
|
+
* @license lucide-react v0.525.0 - ISC
|
|
602
|
+
*
|
|
603
|
+
* This source code is licensed under the ISC license.
|
|
604
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
605
|
+
*)
|
|
606
|
+
|
|
155
607
|
lucide-react/dist/esm/icons/triangle-alert.js:
|
|
608
|
+
(**
|
|
609
|
+
* @license lucide-react v0.525.0 - ISC
|
|
610
|
+
*
|
|
611
|
+
* This source code is licensed under the ISC license.
|
|
612
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
613
|
+
*)
|
|
614
|
+
|
|
156
615
|
lucide-react/dist/esm/icons/underline.js:
|
|
616
|
+
(**
|
|
617
|
+
* @license lucide-react v0.525.0 - ISC
|
|
618
|
+
*
|
|
619
|
+
* This source code is licensed under the ISC license.
|
|
620
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
621
|
+
*)
|
|
622
|
+
|
|
157
623
|
lucide-react/dist/esm/icons/undo.js:
|
|
624
|
+
(**
|
|
625
|
+
* @license lucide-react v0.525.0 - ISC
|
|
626
|
+
*
|
|
627
|
+
* This source code is licensed under the ISC license.
|
|
628
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
629
|
+
*)
|
|
630
|
+
|
|
158
631
|
lucide-react/dist/esm/icons/upload.js:
|
|
632
|
+
(**
|
|
633
|
+
* @license lucide-react v0.525.0 - ISC
|
|
634
|
+
*
|
|
635
|
+
* This source code is licensed under the ISC license.
|
|
636
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
637
|
+
*)
|
|
638
|
+
|
|
159
639
|
lucide-react/dist/esm/icons/video.js:
|
|
640
|
+
(**
|
|
641
|
+
* @license lucide-react v0.525.0 - ISC
|
|
642
|
+
*
|
|
643
|
+
* This source code is licensed under the ISC license.
|
|
644
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
645
|
+
*)
|
|
646
|
+
|
|
160
647
|
lucide-react/dist/esm/icons/x.js:
|
|
648
|
+
(**
|
|
649
|
+
* @license lucide-react v0.525.0 - ISC
|
|
650
|
+
*
|
|
651
|
+
* This source code is licensed under the ISC license.
|
|
652
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
653
|
+
*)
|
|
654
|
+
|
|
161
655
|
lucide-react/dist/esm/icons/zap.js:
|
|
656
|
+
(**
|
|
657
|
+
* @license lucide-react v0.525.0 - ISC
|
|
658
|
+
*
|
|
659
|
+
* This source code is licensed under the ISC license.
|
|
660
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
661
|
+
*)
|
|
662
|
+
|
|
162
663
|
lucide-react/dist/esm/lucide-react.js:
|
|
163
664
|
(**
|
|
164
665
|
* @license lucide-react v0.525.0 - ISC
|
|
@@ -195,7 +696,8 @@ lucide-react/dist/esm/lucide-react.js:
|
|
|
195
696
|
if (typeof window !== 'undefined' && !window.React) {
|
|
196
697
|
console.warn('MoonUI: React not found. Please include React and ReactDOM before MoonUI.');
|
|
197
698
|
}
|
|
198
|
-
//# sourceMappingURL=index.global.js.map
|
|
699
|
+
//# sourceMappingURL=index.global.js.map
|
|
700
|
+
* @license MIT
|
|
199
701
|
*)
|
|
200
702
|
*/
|
|
201
703
|
|