@moontra/moonui 6.0.0 → 6.1.0
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/chunk-2EN7SB2G.global.js +33 -0
- package/dist/chunk-2EN7SB2G.global.js.map +1 -0
- package/dist/hooks/index.d.mts +1 -1
- package/dist/hooks/index.d.ts +1 -1
- package/dist/hooks/index.global.js +8 -8
- package/dist/hooks/index.global.js.map +1 -1
- package/dist/hooks/index.js +1 -1
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/index.mjs +1 -1
- package/dist/hooks/index.mjs.map +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.global.js +154 -481
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +83 -180
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +80 -177
- package/dist/index.mjs.map +1 -1
- package/dist/lib/theme.d.mts +1 -1
- package/dist/lib/theme.d.ts +1 -1
- package/dist/lib/theme.global.js +7 -20
- package/dist/lib/theme.global.js.map +1 -1
- package/dist/lib/theme.js +6 -11
- package/dist/lib/theme.js.map +1 -1
- package/dist/lib/theme.mjs +6 -11
- package/dist/lib/theme.mjs.map +1 -1
- package/package.json +1 -6
- package/src/components/ui/date-picker.stories.tsx +41 -35
- package/dist/chunk-VXDFZPDA.global.js +0 -33
- package/dist/chunk-VXDFZPDA.global.js.map +0 -1
package/dist/index.global.js
CHANGED
|
@@ -1,69 +1,58 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
/** @license MoonUI v1.0.0 - MIT License - https://moonui.dev */
|
|
4
|
-
var K4=Object.create;var ag=Object.defineProperty;var X4=Object.getOwnPropertyDescriptor;var Y4=Object.getOwnPropertyNames;var Q4=Object.getPrototypeOf,Z4=Object.prototype.hasOwnProperty;var Zn=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),J4=(e,t)=>{for(var r in t)ag(e,r,{get:t[r],enumerable:!0})},I1=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Y4(t))!Z4.call(e,n)&&n!==r&&ag(e,n,{get:()=>t[n],enumerable:!(o=X4(t,n))||o.enumerable});return e};var R=(e,t,r)=>(r=e!=null?K4(Q4(e)):{},I1(t||!e||!e.__esModule?ag(r,"default",{value:e,enumerable:!0}):r,e)),e5=e=>I1(ag({},"__esModule",{value:!0}),e);var P1=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)};var rr=(e,t,r)=>(P1(e,t,"read from private field"),r?r.call(e):t.get(e)),u0=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},ig=(e,t,r,o)=>(P1(e,t,"write to private field"),o?o.call(e,r):t.set(e,r),r);var V1=Zn(Me=>{"use strict";var Td=Symbol.for("react.element"),t5=Symbol.for("react.portal"),r5=Symbol.for("react.fragment"),o5=Symbol.for("react.strict_mode"),n5=Symbol.for("react.profiler"),a5=Symbol.for("react.provider"),i5=Symbol.for("react.context"),s5=Symbol.for("react.forward_ref"),l5=Symbol.for("react.suspense"),u5=Symbol.for("react.memo"),c5=Symbol.for("react.lazy"),L1=Symbol.iterator;function d5(e){return e===null||typeof e!="object"?null:(e=L1&&e[L1]||e["@@iterator"],typeof e=="function"?e:null)}var M1={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E1=Object.assign,A1={};function pu(e,t,r){this.props=e,this.context=t,this.refs=A1,this.updater=r||M1}pu.prototype.isReactComponent={};pu.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")};pu.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function D1(){}D1.prototype=pu.prototype;function d0(e,t,r){this.props=e,this.context=t,this.refs=A1,this.updater=r||M1}var f0=d0.prototype=new D1;f0.constructor=d0;E1(f0,pu.prototype);f0.isPureReactComponent=!0;var T1=Array.isArray,N1=Object.prototype.hasOwnProperty,p0={current:null},O1={key:!0,ref:!0,__self:!0,__source:!0};function F1(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)N1.call(t,o)&&!O1.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:Td,type:e,key:a,ref:i,props:n,_owner:p0.current}}function f5(e,t){return{$$typeof:Td,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function m0(e){return typeof e=="object"&&e!==null&&e.$$typeof===Td}function p5(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var k1=/\/+/g;function c0(e,t){return typeof e=="object"&&e!==null&&e.key!=null?p5(""+e.key):t.toString(36)}function lg(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 Td:case t5:i=!0}}if(i)return i=e,n=n(i),e=o===""?"."+c0(i,0):o,T1(n)?(r="",e!=null&&(r=e.replace(k1,"$&/")+"/"),lg(n,t,r,"",function(u){return u})):n!=null&&(m0(n)&&(n=f5(n,r+(!n.key||i&&i.key===n.key?"":(""+n.key).replace(k1,"$&/")+"/")+e)),t.push(n)),1;if(i=0,o=o===""?".":o+":",T1(e))for(var s=0;s<e.length;s++){a=e[s];var l=o+c0(a,s);i+=lg(a,t,r,l,n)}else if(l=d5(e),typeof l=="function")for(e=l.call(e),s=0;!(a=e.next()).done;)a=a.value,l=o+c0(a,s++),i+=lg(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 sg(e,t,r){if(e==null)return e;var o=[],n=0;return lg(e,o,"","",function(a){return t.call(r,a,n++)}),o}function m5(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 Ar={current:null},ug={transition:null},g5={ReactCurrentDispatcher:Ar,ReactCurrentBatchConfig:ug,ReactCurrentOwner:p0};function _1(){throw Error("act(...) is not supported in production builds of React.")}Me.Children={map:sg,forEach:function(e,t,r){sg(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return sg(e,function(){t++}),t},toArray:function(e){return sg(e,function(t){return t})||[]},only:function(e){if(!m0(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Me.Component=pu;Me.Fragment=r5;Me.Profiler=n5;Me.PureComponent=d0;Me.StrictMode=o5;Me.Suspense=l5;Me.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=g5;Me.act=_1;Me.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=E1({},e.props),n=e.key,a=e.ref,i=e._owner;if(t!=null){if(t.ref!==void 0&&(a=t.ref,i=p0.current),t.key!==void 0&&(n=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(l in t)N1.call(t,l)&&!O1.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:Td,type:e.type,key:n,ref:a,props:o,_owner:i}};Me.createContext=function(e){return e={$$typeof:i5,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:a5,_context:e},e.Consumer=e};Me.createElement=F1;Me.createFactory=function(e){var t=F1.bind(null,e);return t.type=e,t};Me.createRef=function(){return{current:null}};Me.forwardRef=function(e){return{$$typeof:s5,render:e}};Me.isValidElement=m0;Me.lazy=function(e){return{$$typeof:c5,_payload:{_status:-1,_result:e},_init:m5}};Me.memo=function(e,t){return{$$typeof:u5,type:e,compare:t===void 0?null:t}};Me.startTransition=function(e){var t=ug.transition;ug.transition={};try{e()}finally{ug.transition=t}};Me.unstable_act=_1;Me.useCallback=function(e,t){return Ar.current.useCallback(e,t)};Me.useContext=function(e){return Ar.current.useContext(e)};Me.useDebugValue=function(){};Me.useDeferredValue=function(e){return Ar.current.useDeferredValue(e)};Me.useEffect=function(e,t){return Ar.current.useEffect(e,t)};Me.useId=function(){return Ar.current.useId()};Me.useImperativeHandle=function(e,t,r){return Ar.current.useImperativeHandle(e,t,r)};Me.useInsertionEffect=function(e,t){return Ar.current.useInsertionEffect(e,t)};Me.useLayoutEffect=function(e,t){return Ar.current.useLayoutEffect(e,t)};Me.useMemo=function(e,t){return Ar.current.useMemo(e,t)};Me.useReducer=function(e,t,r){return Ar.current.useReducer(e,t,r)};Me.useRef=function(e){return Ar.current.useRef(e)};Me.useState=function(e){return Ar.current.useState(e)};Me.useSyncExternalStore=function(e,t,r){return Ar.current.useSyncExternalStore(e,t,r)};Me.useTransition=function(){return Ar.current.useTransition()};Me.version="18.3.1"});var M=Zn((Ite,B1)=>{"use strict";B1.exports=V1()});var U1=Zn(cg=>{"use strict";var h5=M(),v5=Symbol.for("react.element"),x5=Symbol.for("react.fragment"),y5=Object.prototype.hasOwnProperty,w5=h5.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,C5={key:!0,ref:!0,__self:!0,__source:!0};function H1(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)y5.call(t,o)&&!C5.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:v5,type:e,key:a,ref:i,props:n,_owner:w5.current}}cg.Fragment=x5;cg.jsx=H1;cg.jsxs=H1});var N=Zn((Lte,z1)=>{"use strict";z1.exports=U1()});var nT=Zn(Ye=>{"use strict";function y0(e,t){var r=e.length;e.push(t);e:for(;0<r;){var o=r-1>>>1,n=e[o];if(0<pg(n,t))e[o]=t,e[r]=n,r=o;else break e}}function mn(e){return e.length===0?null:e[0]}function gg(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>pg(s,r))l<n&&0>pg(u,s)?(e[o]=u,e[l]=r,o=l):(e[o]=s,e[i]=r,o=i);else if(l<n&&0>pg(u,r))e[o]=u,e[l]=r,o=l;else break e}}return t}function pg(e,t){var r=e.sortIndex-t.sortIndex;return r!==0?r:e.id-t.id}typeof performance=="object"&&typeof performance.now=="function"?(X1=performance,Ye.unstable_now=function(){return X1.now()}):(h0=Date,Y1=h0.now(),Ye.unstable_now=function(){return h0.now()-Y1});var X1,h0,Y1,ea=[],bi=[],A5=1,No=null,pr=3,hg=!1,Us=!1,Md=!1,J1=typeof setTimeout=="function"?setTimeout:null,eT=typeof clearTimeout=="function"?clearTimeout:null,Q1=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function w0(e){for(var t=mn(bi);t!==null;){if(t.callback===null)gg(bi);else if(t.startTime<=e)gg(bi),t.sortIndex=t.expirationTime,y0(ea,t);else break;t=mn(bi)}}function C0(e){if(Md=!1,w0(e),!Us)if(mn(ea)!==null)Us=!0,b0(S0);else{var t=mn(bi);t!==null&&R0(C0,t.startTime-e)}}function S0(e,t){Us=!1,Md&&(Md=!1,eT(Ed),Ed=-1),hg=!0;var r=pr;try{for(w0(t),No=mn(ea);No!==null&&(!(No.expirationTime>t)||e&&!oT());){var o=No.callback;if(typeof o=="function"){No.callback=null,pr=No.priorityLevel;var n=o(No.expirationTime<=t);t=Ye.unstable_now(),typeof n=="function"?No.callback=n:No===mn(ea)&&gg(ea),w0(t)}else gg(ea);No=mn(ea)}if(No!==null)var a=!0;else{var i=mn(bi);i!==null&&R0(C0,i.startTime-t),a=!1}return a}finally{No=null,pr=r,hg=!1}}var vg=!1,mg=null,Ed=-1,tT=5,rT=-1;function oT(){return!(Ye.unstable_now()-rT<tT)}function v0(){if(mg!==null){var e=Ye.unstable_now();rT=e;var t=!0;try{t=mg(!0,e)}finally{t?kd():(vg=!1,mg=null)}}else vg=!1}var kd;typeof Q1=="function"?kd=function(){Q1(v0)}:typeof MessageChannel<"u"?(x0=new MessageChannel,Z1=x0.port2,x0.port1.onmessage=v0,kd=function(){Z1.postMessage(null)}):kd=function(){J1(v0,0)};var x0,Z1;function b0(e){mg=e,vg||(vg=!0,kd())}function R0(e,t){Ed=J1(function(){e(Ye.unstable_now())},t)}Ye.unstable_IdlePriority=5;Ye.unstable_ImmediatePriority=1;Ye.unstable_LowPriority=4;Ye.unstable_NormalPriority=3;Ye.unstable_Profiling=null;Ye.unstable_UserBlockingPriority=2;Ye.unstable_cancelCallback=function(e){e.callback=null};Ye.unstable_continueExecution=function(){Us||hg||(Us=!0,b0(S0))};Ye.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"):tT=0<e?Math.floor(1e3/e):5};Ye.unstable_getCurrentPriorityLevel=function(){return pr};Ye.unstable_getFirstCallbackNode=function(){return mn(ea)};Ye.unstable_next=function(e){switch(pr){case 1:case 2:case 3:var t=3;break;default:t=pr}var r=pr;pr=t;try{return e()}finally{pr=r}};Ye.unstable_pauseExecution=function(){};Ye.unstable_requestPaint=function(){};Ye.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var r=pr;pr=e;try{return t()}finally{pr=r}};Ye.unstable_scheduleCallback=function(e,t,r){var o=Ye.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:A5++,callback:t,priorityLevel:e,startTime:r,expirationTime:n,sortIndex:-1},r>o?(e.sortIndex=r,y0(bi,e),mn(ea)===null&&e===mn(bi)&&(Md?(eT(Ed),Ed=-1):Md=!0,R0(C0,r-o))):(e.sortIndex=n,y0(ea,e),Us||hg||(Us=!0,b0(S0))),e};Ye.unstable_shouldYield=oT;Ye.unstable_wrapCallback=function(e){var t=pr;return function(){var r=pr;pr=t;try{return e.apply(this,arguments)}finally{pr=r}}}});var iT=Zn((Wte,aT)=>{"use strict";aT.exports=nT()});var cE=Zn(vo=>{"use strict";var D5=M(),go=iT();function $(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 pk=new Set,Jd={};function el(e,t){Ou(e,t),Ou(e+"Capture",t)}function Ou(e,t){for(Jd[e]=t,e=0;e<t.length;e++)pk.add(t[e])}var Da=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),q0=Object.prototype.hasOwnProperty,N5=/^[: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]*$/,sT={},lT={};function O5(e){return q0.call(lT,e)?!0:q0.call(sT,e)?!1:N5.test(e)?lT[e]=!0:(sT[e]=!0,!1)}function F5(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 _5(e,t,r,o){if(t===null||typeof t>"u"||F5(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 Or(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 ar={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ar[e]=new Or(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ar[t]=new Or(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ar[e]=new Or(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ar[e]=new Or(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){ar[e]=new Or(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ar[e]=new Or(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ar[e]=new Or(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ar[e]=new Or(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ar[e]=new Or(e,5,!1,e.toLowerCase(),null,!1,!1)});var Bw=/[\-:]([a-z])/g;function Hw(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(Bw,Hw);ar[t]=new Or(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(Bw,Hw);ar[t]=new Or(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(Bw,Hw);ar[t]=new Or(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ar[e]=new Or(e,1,!1,e.toLowerCase(),null,!1,!1)});ar.xlinkHref=new Or("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ar[e]=new Or(e,1,!1,e.toLowerCase(),null,!0,!0)});function Uw(e,t,r,o){var n=ar.hasOwnProperty(t)?ar[t]:null;(n!==null?n.type!==0:o||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(_5(t,r,n,o)&&(r=null),o||n===null?O5(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 _a=D5.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,xg=Symbol.for("react.element"),vu=Symbol.for("react.portal"),xu=Symbol.for("react.fragment"),zw=Symbol.for("react.strict_mode"),K0=Symbol.for("react.profiler"),mk=Symbol.for("react.provider"),gk=Symbol.for("react.context"),Gw=Symbol.for("react.forward_ref"),X0=Symbol.for("react.suspense"),Y0=Symbol.for("react.suspense_list"),Ww=Symbol.for("react.memo"),Ii=Symbol.for("react.lazy");Symbol.for("react.scope");Symbol.for("react.debug_trace_mode");var hk=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden");Symbol.for("react.cache");Symbol.for("react.tracing_marker");var uT=Symbol.iterator;function Ad(e){return e===null||typeof e!="object"?null:(e=uT&&e[uT]||e["@@iterator"],typeof e=="function"?e:null)}var mt=Object.assign,I0;function Hd(e){if(I0===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);I0=t&&t[1]||""}return`
|
|
5
|
-
|
|
6
|
-
`),a=o.stack.split(`
|
|
7
|
-
`),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=`
|
|
8
|
-
`+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{P0=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?Hd(e):""}function V5(e){switch(e.tag){case 5:return Hd(e.type);case 16:return Hd("Lazy");case 13:return Hd("Suspense");case 19:return Hd("SuspenseList");case 0:case 2:case 15:return e=L0(e.type,!1),e;case 11:return e=L0(e.type.render,!1),e;case 1:return e=L0(e.type,!0),e;default:return""}}function Q0(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 xu:return"Fragment";case vu:return"Portal";case K0:return"Profiler";case zw:return"StrictMode";case X0:return"Suspense";case Y0:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case gk:return(e.displayName||"Context")+".Consumer";case mk:return(e._context.displayName||"Context")+".Provider";case Gw:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ww:return t=e.displayName||null,t!==null?t:Q0(e.type)||"Memo";case Ii:t=e._payload,e=e._init;try{return Q0(e(t))}catch{}}return null}function B5(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 Q0(t);case 8:return t===zw?"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 Bi(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function vk(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function H5(e){var t=vk(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 yg(e){e._valueTracker||(e._valueTracker=H5(e))}function xk(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),o="";return e&&(o=vk(e)?e.checked?"true":"false":e.value),e=o,e!==r?(t.setValue(e),!0):!1}function qg(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 Z0(e,t){var r=t.checked;return mt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function cT(e,t){var r=t.defaultValue==null?"":t.defaultValue,o=t.checked!=null?t.checked:t.defaultChecked;r=Bi(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 yk(e,t){t=t.checked,t!=null&&Uw(e,"checked",t,!1)}function J0(e,t){yk(e,t);var r=Bi(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")?ew(e,t.type,r):t.hasOwnProperty("defaultValue")&&ew(e,t.type,Bi(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function dT(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 ew(e,t,r){(t!=="number"||qg(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var Ud=Array.isArray;function ku(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=""+Bi(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 tw(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error($(91));return mt({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function fT(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error($(92));if(Ud(r)){if(1<r.length)throw Error($(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:Bi(r)}}function wk(e,t){var r=Bi(t.value),o=Bi(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 pT(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Ck(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 rw(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Ck(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var wg,Sk=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(wg=wg||document.createElement("div"),wg.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=wg.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ef(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var Wd={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},U5=["Webkit","ms","Moz","O"];Object.keys(Wd).forEach(function(e){U5.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Wd[t]=Wd[e]})});function bk(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||Wd.hasOwnProperty(e)&&Wd[e]?(""+t).trim():t+"px"}function Rk(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var o=r.indexOf("--")===0,n=bk(r,t[r],o);r==="float"&&(r="cssFloat"),o?e.setProperty(r,n):e[r]=n}}var z5=mt({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 ow(e,t){if(t){if(z5[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error($(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error($(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error($(61))}if(t.style!=null&&typeof t.style!="object")throw Error($(62))}}function nw(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 aw=null;function jw(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var iw=null,Mu=null,Eu=null;function mT(e){if(e=yf(e)){if(typeof iw!="function")throw Error($(280));var t=e.stateNode;t&&(t=Ch(t),iw(e.stateNode,e.type,t))}}function Ik(e){Mu?Eu?Eu.push(e):Eu=[e]:Mu=e}function Pk(){if(Mu){var e=Mu,t=Eu;if(Eu=Mu=null,mT(e),t)for(e=0;e<t.length;e++)mT(t[e])}}function Lk(e,t){return e(t)}function Tk(){}var T0=!1;function kk(e,t,r){if(T0)return e(t,r);T0=!0;try{return Lk(e,t,r)}finally{T0=!1,(Mu!==null||Eu!==null)&&(Tk(),Pk())}}function tf(e,t){var r=e.stateNode;if(r===null)return null;var o=Ch(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($(231,t,typeof r));return r}var sw=!1;if(Da)try{gu={},Object.defineProperty(gu,"passive",{get:function(){sw=!0}}),window.addEventListener("test",gu,gu),window.removeEventListener("test",gu,gu)}catch{sw=!1}var gu;function G5(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 jd=!1,Kg=null,Xg=!1,lw=null,W5={onError:function(e){jd=!0,Kg=e}};function j5(e,t,r,o,n,a,i,s,l){jd=!1,Kg=null,G5.apply(W5,arguments)}function $5(e,t,r,o,n,a,i,s,l){if(j5.apply(this,arguments),jd){if(jd){var u=Kg;jd=!1,Kg=null}else throw Error($(198));Xg||(Xg=!0,lw=u)}}function tl(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 Mk(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 gT(e){if(tl(e)!==e)throw Error($(188))}function q5(e){var t=e.alternate;if(!t){if(t=tl(e),t===null)throw Error($(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 gT(n),e;if(a===o)return gT(n),t;a=a.sibling}throw Error($(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($(189))}}if(r.alternate!==o)throw Error($(190))}if(r.tag!==3)throw Error($(188));return r.stateNode.current===r?e:t}function Ek(e){return e=q5(e),e!==null?Ak(e):null}function Ak(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Ak(e);if(t!==null)return t;e=e.sibling}return null}var Dk=go.unstable_scheduleCallback,hT=go.unstable_cancelCallback,K5=go.unstable_shouldYield,X5=go.unstable_requestPaint,bt=go.unstable_now,Y5=go.unstable_getCurrentPriorityLevel,$w=go.unstable_ImmediatePriority,Nk=go.unstable_UserBlockingPriority,Yg=go.unstable_NormalPriority,Q5=go.unstable_LowPriority,Ok=go.unstable_IdlePriority,vh=null,na=null;function Z5(e){if(na&&typeof na.onCommitFiberRoot=="function")try{na.onCommitFiberRoot(vh,e,void 0,(e.current.flags&128)===128)}catch{}}var yn=Math.clz32?Math.clz32:tG,J5=Math.log,eG=Math.LN2;function tG(e){return e>>>=0,e===0?32:31-(J5(e)/eG|0)|0}var Cg=64,Sg=4194304;function zd(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 Qg(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=zd(s):(a&=i,a!==0&&(o=zd(a)))}else i=r&~n,i!==0?o=zd(i):a!==0&&(o=zd(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-yn(t),n=1<<r,o|=e[r],t&=~n;return o}function rG(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 oG(e,t){for(var r=e.suspendedLanes,o=e.pingedLanes,n=e.expirationTimes,a=e.pendingLanes;0<a;){var i=31-yn(a),s=1<<i,l=n[i];l===-1?(!(s&r)||s&o)&&(n[i]=rG(s,t)):l<=t&&(e.expiredLanes|=s),a&=~s}}function uw(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Fk(){var e=Cg;return Cg<<=1,!(Cg&4194240)&&(Cg=64),e}function k0(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function vf(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-yn(t),e[t]=r}function nG(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-yn(r),a=1<<n;t[n]=0,o[n]=-1,e[n]=-1,r&=~a}}function qw(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var o=31-yn(r),n=1<<o;n&t|e[o]&t&&(e[o]|=t),r&=~n}}var We=0;function _k(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Vk,Kw,Bk,Hk,Uk,cw=!1,bg=[],Ei=null,Ai=null,Di=null,rf=new Map,of=new Map,Li=[],aG="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 vT(e,t){switch(e){case"focusin":case"focusout":Ei=null;break;case"dragenter":case"dragleave":Ai=null;break;case"mouseover":case"mouseout":Di=null;break;case"pointerover":case"pointerout":rf.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":of.delete(t.pointerId)}}function Dd(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=yf(t),t!==null&&Kw(t)),e):(e.eventSystemFlags|=o,t=e.targetContainers,n!==null&&t.indexOf(n)===-1&&t.push(n),e)}function iG(e,t,r,o,n){switch(t){case"focusin":return Ei=Dd(Ei,e,t,r,o,n),!0;case"dragenter":return Ai=Dd(Ai,e,t,r,o,n),!0;case"mouseover":return Di=Dd(Di,e,t,r,o,n),!0;case"pointerover":var a=n.pointerId;return rf.set(a,Dd(rf.get(a)||null,e,t,r,o,n)),!0;case"gotpointercapture":return a=n.pointerId,of.set(a,Dd(of.get(a)||null,e,t,r,o,n)),!0}return!1}function zk(e){var t=Ws(e.target);if(t!==null){var r=tl(t);if(r!==null){if(t=r.tag,t===13){if(t=Mk(r),t!==null){e.blockedOn=t,Uk(e.priority,function(){Bk(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 _g(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=dw(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var o=new r.constructor(r.type,r);aw=o,r.target.dispatchEvent(o),aw=null}else return t=yf(r),t!==null&&Kw(t),e.blockedOn=r,!1;t.shift()}return!0}function xT(e,t,r){_g(e)&&r.delete(t)}function sG(){cw=!1,Ei!==null&&_g(Ei)&&(Ei=null),Ai!==null&&_g(Ai)&&(Ai=null),Di!==null&&_g(Di)&&(Di=null),rf.forEach(xT),of.forEach(xT)}function Nd(e,t){e.blockedOn===t&&(e.blockedOn=null,cw||(cw=!0,go.unstable_scheduleCallback(go.unstable_NormalPriority,sG)))}function nf(e){function t(n){return Nd(n,e)}if(0<bg.length){Nd(bg[0],e);for(var r=1;r<bg.length;r++){var o=bg[r];o.blockedOn===e&&(o.blockedOn=null)}}for(Ei!==null&&Nd(Ei,e),Ai!==null&&Nd(Ai,e),Di!==null&&Nd(Di,e),rf.forEach(t),of.forEach(t),r=0;r<Li.length;r++)o=Li[r],o.blockedOn===e&&(o.blockedOn=null);for(;0<Li.length&&(r=Li[0],r.blockedOn===null);)zk(r),r.blockedOn===null&&Li.shift()}var Au=_a.ReactCurrentBatchConfig,Zg=!0;function lG(e,t,r,o){var n=We,a=Au.transition;Au.transition=null;try{We=1,Xw(e,t,r,o)}finally{We=n,Au.transition=a}}function uG(e,t,r,o){var n=We,a=Au.transition;Au.transition=null;try{We=4,Xw(e,t,r,o)}finally{We=n,Au.transition=a}}function Xw(e,t,r,o){if(Zg){var n=dw(e,t,r,o);if(n===null)F0(e,t,o,Jg,r),vT(e,o);else if(iG(n,e,t,r,o))o.stopPropagation();else if(vT(e,o),t&4&&-1<aG.indexOf(e)){for(;n!==null;){var a=yf(n);if(a!==null&&Vk(a),a=dw(e,t,r,o),a===null&&F0(e,t,o,Jg,r),a===n)break;n=a}n!==null&&o.stopPropagation()}else F0(e,t,o,null,r)}}var Jg=null;function dw(e,t,r,o){if(Jg=null,e=jw(o),e=Ws(e),e!==null)if(t=tl(e),t===null)e=null;else if(r=t.tag,r===13){if(e=Mk(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 Jg=e,null}function Gk(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(Y5()){case $w:return 1;case Nk:return 4;case Yg:case Q5:return 16;case Ok:return 536870912;default:return 16}default:return 16}}var ki=null,Yw=null,Vg=null;function Wk(){if(Vg)return Vg;var e,t=Yw,r=t.length,o,n="value"in ki?ki.value:ki.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 Vg=n.slice(e,1<o?1-o:void 0)}function Bg(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 Rg(){return!0}function yT(){return!1}function ho(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)?Rg:yT,this.isPropagationStopped=yT,this}return mt(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=Rg)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=Rg)},persist:function(){},isPersistent:Rg}),t}var zu={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Qw=ho(zu),xf=mt({},zu,{view:0,detail:0}),cG=ho(xf),M0,E0,Od,xh=mt({},xf,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Zw,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!==Od&&(Od&&e.type==="mousemove"?(M0=e.screenX-Od.screenX,E0=e.screenY-Od.screenY):E0=M0=0,Od=e),M0)},movementY:function(e){return"movementY"in e?e.movementY:E0}}),wT=ho(xh),dG=mt({},xh,{dataTransfer:0}),fG=ho(dG),pG=mt({},xf,{relatedTarget:0}),A0=ho(pG),mG=mt({},zu,{animationName:0,elapsedTime:0,pseudoElement:0}),gG=ho(mG),hG=mt({},zu,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),vG=ho(hG),xG=mt({},zu,{data:0}),CT=ho(xG),yG={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},wG={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"},CG={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function SG(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=CG[e])?!!t[e]:!1}function Zw(){return SG}var bG=mt({},xf,{key:function(e){if(e.key){var t=yG[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Bg(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?wG[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Zw,charCode:function(e){return e.type==="keypress"?Bg(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Bg(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),RG=ho(bG),IG=mt({},xh,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ST=ho(IG),PG=mt({},xf,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Zw}),LG=ho(PG),TG=mt({},zu,{propertyName:0,elapsedTime:0,pseudoElement:0}),kG=ho(TG),MG=mt({},xh,{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}),EG=ho(MG),AG=[9,13,27,32],Jw=Da&&"CompositionEvent"in window,$d=null;Da&&"documentMode"in document&&($d=document.documentMode);var DG=Da&&"TextEvent"in window&&!$d,jk=Da&&(!Jw||$d&&8<$d&&11>=$d),bT=String.fromCharCode(32),RT=!1;function $k(e,t){switch(e){case"keyup":return AG.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function qk(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var yu=!1;function NG(e,t){switch(e){case"compositionend":return qk(t);case"keypress":return t.which!==32?null:(RT=!0,bT);case"textInput":return e=t.data,e===bT&&RT?null:e;default:return null}}function OG(e,t){if(yu)return e==="compositionend"||!Jw&&$k(e,t)?(e=Wk(),Vg=Yw=ki=null,yu=!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 jk&&t.locale!=="ko"?null:t.data;default:return null}}var FG={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 IT(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!FG[e.type]:t==="textarea"}function Kk(e,t,r,o){Ik(o),t=eh(t,"onChange"),0<t.length&&(r=new Qw("onChange","change",null,r,o),e.push({event:r,listeners:t}))}var qd=null,af=null;function _G(e){aM(e,0)}function yh(e){var t=Su(e);if(xk(t))return e}function VG(e,t){if(e==="change")return t}var Xk=!1;Da&&(Da?(Pg="oninput"in document,Pg||(D0=document.createElement("div"),D0.setAttribute("oninput","return;"),Pg=typeof D0.oninput=="function"),Ig=Pg):Ig=!1,Xk=Ig&&(!document.documentMode||9<document.documentMode));var Ig,Pg,D0;function PT(){qd&&(qd.detachEvent("onpropertychange",Yk),af=qd=null)}function Yk(e){if(e.propertyName==="value"&&yh(af)){var t=[];Kk(t,af,e,jw(e)),kk(_G,t)}}function BG(e,t,r){e==="focusin"?(PT(),qd=t,af=r,qd.attachEvent("onpropertychange",Yk)):e==="focusout"&&PT()}function HG(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return yh(af)}function UG(e,t){if(e==="click")return yh(t)}function zG(e,t){if(e==="input"||e==="change")return yh(t)}function GG(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Cn=typeof Object.is=="function"?Object.is:GG;function sf(e,t){if(Cn(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(!q0.call(t,n)||!Cn(e[n],t[n]))return!1}return!0}function LT(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function TT(e,t){var r=LT(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=LT(r)}}function Qk(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Qk(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Zk(){for(var e=window,t=qg();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=qg(e.document)}return t}function eC(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 WG(e){var t=Zk(),r=e.focusedElem,o=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&Qk(r.ownerDocument.documentElement,r)){if(o!==null&&eC(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=TT(r,a);var i=TT(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 jG=Da&&"documentMode"in document&&11>=document.documentMode,wu=null,fw=null,Kd=null,pw=!1;function kT(e,t,r){var o=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;pw||wu==null||wu!==qg(o)||(o=wu,"selectionStart"in o&&eC(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}),Kd&&sf(Kd,o)||(Kd=o,o=eh(fw,"onSelect"),0<o.length&&(t=new Qw("onSelect","select",null,t,r),e.push({event:t,listeners:o}),t.target=wu)))}function Lg(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var Cu={animationend:Lg("Animation","AnimationEnd"),animationiteration:Lg("Animation","AnimationIteration"),animationstart:Lg("Animation","AnimationStart"),transitionend:Lg("Transition","TransitionEnd")},N0={},Jk={};Da&&(Jk=document.createElement("div").style,"AnimationEvent"in window||(delete Cu.animationend.animation,delete Cu.animationiteration.animation,delete Cu.animationstart.animation),"TransitionEvent"in window||delete Cu.transitionend.transition);function wh(e){if(N0[e])return N0[e];if(!Cu[e])return e;var t=Cu[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in Jk)return N0[e]=t[r];return e}var eM=wh("animationend"),tM=wh("animationiteration"),rM=wh("animationstart"),oM=wh("transitionend"),nM=new Map,MT="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 Ui(e,t){nM.set(e,t),el(t,[e])}for(Tg=0;Tg<MT.length;Tg++)kg=MT[Tg],ET=kg.toLowerCase(),AT=kg[0].toUpperCase()+kg.slice(1),Ui(ET,"on"+AT);var kg,ET,AT,Tg;Ui(eM,"onAnimationEnd");Ui(tM,"onAnimationIteration");Ui(rM,"onAnimationStart");Ui("dblclick","onDoubleClick");Ui("focusin","onFocus");Ui("focusout","onBlur");Ui(oM,"onTransitionEnd");Ou("onMouseEnter",["mouseout","mouseover"]);Ou("onMouseLeave",["mouseout","mouseover"]);Ou("onPointerEnter",["pointerout","pointerover"]);Ou("onPointerLeave",["pointerout","pointerover"]);el("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));el("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));el("onBeforeInput",["compositionend","keypress","textInput","paste"]);el("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));el("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));el("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Gd="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(" "),$G=new Set("cancel close invalid load scroll toggle".split(" ").concat(Gd));function DT(e,t,r){var o=e.type||"unknown-event";e.currentTarget=r,$5(o,t,void 0,e),e.currentTarget=null}function aM(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;DT(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;DT(n,s,u),a=l}}}if(Xg)throw e=lw,Xg=!1,lw=null,e}function tt(e,t){var r=t[xw];r===void 0&&(r=t[xw]=new Set);var o=e+"__bubble";r.has(o)||(iM(t,e,2,!1),r.add(o))}function O0(e,t,r){var o=0;t&&(o|=4),iM(r,e,o,t)}var Mg="_reactListening"+Math.random().toString(36).slice(2);function lf(e){if(!e[Mg]){e[Mg]=!0,pk.forEach(function(r){r!=="selectionchange"&&($G.has(r)||O0(r,!1,e),O0(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Mg]||(t[Mg]=!0,O0("selectionchange",!1,t))}}function iM(e,t,r,o){switch(Gk(t)){case 1:var n=lG;break;case 4:n=uG;break;default:n=Xw}r=n.bind(null,t,r,e),n=void 0,!sw||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 F0(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=Ws(s),i===null)return;if(l=i.tag,l===5||l===6){o=a=i;continue e}s=s.parentNode}}o=o.return}kk(function(){var u=a,c=jw(r),d=[];e:{var f=nM.get(e);if(f!==void 0){var p=Qw,g=e;switch(e){case"keypress":if(Bg(r)===0)break e;case"keydown":case"keyup":p=RG;break;case"focusin":g="focus",p=A0;break;case"focusout":g="blur",p=A0;break;case"beforeblur":case"afterblur":p=A0;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=wT;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=fG;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=LG;break;case eM:case tM:case rM:p=gG;break;case oM:p=kG;break;case"scroll":p=cG;break;case"wheel":p=EG;break;case"copy":case"cut":case"paste":p=vG;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=ST}var m=(t&4)!==0,x=!m&&e==="scroll",h=m?f!==null?f+"Capture":null:f;m=[];for(var v=u,y;v!==null;){y=v;var w=y.stateNode;if(y.tag===5&&w!==null&&(y=w,h!==null&&(w=tf(v,h),w!=null&&m.push(uf(v,w,y)))),x)break;v=v.return}0<m.length&&(f=new p(f,g,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!==aw&&(g=r.relatedTarget||r.fromElement)&&(Ws(g)||g[Na]))break e;if((p||f)&&(f=c.window===c?c:(f=c.ownerDocument)?f.defaultView||f.parentWindow:window,p?(g=r.relatedTarget||r.toElement,p=u,g=g?Ws(g):null,g!==null&&(x=tl(g),g!==x||g.tag!==5&&g.tag!==6)&&(g=null)):(p=null,g=u),p!==g)){if(m=wT,w="onMouseLeave",h="onMouseEnter",v="mouse",(e==="pointerout"||e==="pointerover")&&(m=ST,w="onPointerLeave",h="onPointerEnter",v="pointer"),x=p==null?f:Su(p),y=g==null?f:Su(g),f=new m(w,v+"leave",p,r,c),f.target=x,f.relatedTarget=y,w=null,Ws(c)===u&&(m=new m(h,v+"enter",g,r,c),m.target=y,m.relatedTarget=x,w=m),x=w,p&&g)t:{for(m=p,h=g,v=0,y=m;y;y=hu(y))v++;for(y=0,w=h;w;w=hu(w))y++;for(;0<v-y;)m=hu(m),v--;for(;0<y-v;)h=hu(h),y--;for(;v--;){if(m===h||h!==null&&m===h.alternate)break t;m=hu(m),h=hu(h)}m=null}else m=null;p!==null&&NT(d,f,p,m,!1),g!==null&&x!==null&&NT(d,x,g,m,!0)}}e:{if(f=u?Su(u):window,p=f.nodeName&&f.nodeName.toLowerCase(),p==="select"||p==="input"&&f.type==="file")var C=VG;else if(IT(f))if(Xk)C=zG;else{C=HG;var b=BG}else(p=f.nodeName)&&p.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(C=UG);if(C&&(C=C(e,u))){Kk(d,C,r,c);break e}b&&b(e,f,u),e==="focusout"&&(b=f._wrapperState)&&b.controlled&&f.type==="number"&&ew(f,"number",f.value)}switch(b=u?Su(u):window,e){case"focusin":(IT(b)||b.contentEditable==="true")&&(wu=b,fw=u,Kd=null);break;case"focusout":Kd=fw=wu=null;break;case"mousedown":pw=!0;break;case"contextmenu":case"mouseup":case"dragend":pw=!1,kT(d,r,c);break;case"selectionchange":if(jG)break;case"keydown":case"keyup":kT(d,r,c)}var S;if(Jw)e:{switch(e){case"compositionstart":var I="onCompositionStart";break e;case"compositionend":I="onCompositionEnd";break e;case"compositionupdate":I="onCompositionUpdate";break e}I=void 0}else yu?$k(e,r)&&(I="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(I="onCompositionStart");I&&(jk&&r.locale!=="ko"&&(yu||I!=="onCompositionStart"?I==="onCompositionEnd"&&yu&&(S=Wk()):(ki=c,Yw="value"in ki?ki.value:ki.textContent,yu=!0)),b=eh(u,I),0<b.length&&(I=new CT(I,e,null,r,c),d.push({event:I,listeners:b}),S?I.data=S:(S=qk(r),S!==null&&(I.data=S)))),(S=DG?NG(e,r):OG(e,r))&&(u=eh(u,"onBeforeInput"),0<u.length&&(c=new CT("onBeforeInput","beforeinput",null,r,c),d.push({event:c,listeners:u}),c.data=S))}aM(d,t)})}function uf(e,t,r){return{instance:e,listener:t,currentTarget:r}}function eh(e,t){for(var r=t+"Capture",o=[];e!==null;){var n=e,a=n.stateNode;n.tag===5&&a!==null&&(n=a,a=tf(e,r),a!=null&&o.unshift(uf(e,a,n)),a=tf(e,t),a!=null&&o.push(uf(e,a,n))),e=e.return}return o}function hu(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function NT(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=tf(r,a),l!=null&&i.unshift(uf(r,l,s))):n||(l=tf(r,a),l!=null&&i.push(uf(r,l,s)))),r=r.return}i.length!==0&&e.push({event:t,listeners:i})}var qG=/\r\n?/g,KG=/\u0000|\uFFFD/g;function OT(e){return(typeof e=="string"?e:""+e).replace(qG,`
|
|
9
|
-
`).replace(KG,"")}function Eg(e,t,r){if(t=OT(t),OT(e)!==t&&r)throw Error($(425))}function th(){}var mw=null,gw=null;function hw(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 vw=typeof setTimeout=="function"?setTimeout:void 0,XG=typeof clearTimeout=="function"?clearTimeout:void 0,FT=typeof Promise=="function"?Promise:void 0,YG=typeof queueMicrotask=="function"?queueMicrotask:typeof FT<"u"?function(e){return FT.resolve(null).then(e).catch(QG)}:vw;function QG(e){setTimeout(function(){throw e})}function _0(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),nf(t);return}o--}else r!=="$"&&r!=="$?"&&r!=="$!"||o++;r=n}while(r);nf(t)}function Ni(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 _T(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 Gu=Math.random().toString(36).slice(2),oa="__reactFiber$"+Gu,cf="__reactProps$"+Gu,Na="__reactContainer$"+Gu,xw="__reactEvents$"+Gu,ZG="__reactListeners$"+Gu,JG="__reactHandles$"+Gu;function Ws(e){var t=e[oa];if(t)return t;for(var r=e.parentNode;r;){if(t=r[Na]||r[oa]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=_T(e);e!==null;){if(r=e[oa])return r;e=_T(e)}return t}e=r,r=e.parentNode}return null}function yf(e){return e=e[oa]||e[Na],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Su(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error($(33))}function Ch(e){return e[cf]||null}var yw=[],bu=-1;function zi(e){return{current:e}}function rt(e){0>bu||(e.current=yw[bu],yw[bu]=null,bu--)}function Qe(e,t){bu++,yw[bu]=e.current,e.current=t}var Hi={},vr=zi(Hi),Xr=zi(!1),Xs=Hi;function Fu(e,t){var r=e.type.contextTypes;if(!r)return Hi;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 Yr(e){return e=e.childContextTypes,e!=null}function rh(){rt(Xr),rt(vr)}function VT(e,t,r){if(vr.current!==Hi)throw Error($(168));Qe(vr,t),Qe(Xr,r)}function sM(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($(108,B5(e)||"Unknown",n));return mt({},r,o)}function oh(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Hi,Xs=vr.current,Qe(vr,e),Qe(Xr,Xr.current),!0}function BT(e,t,r){var o=e.stateNode;if(!o)throw Error($(169));r?(e=sM(e,t,Xs),o.__reactInternalMemoizedMergedChildContext=e,rt(Xr),rt(vr),Qe(vr,e)):rt(Xr),Qe(Xr,r)}var ka=null,Sh=!1,V0=!1;function lM(e){ka===null?ka=[e]:ka.push(e)}function eW(e){Sh=!0,lM(e)}function Gi(){if(!V0&&ka!==null){V0=!0;var e=0,t=We;try{var r=ka;for(We=1;e<r.length;e++){var o=r[e];do o=o(!0);while(o!==null)}ka=null,Sh=!1}catch(n){throw ka!==null&&(ka=ka.slice(e+1)),Dk($w,Gi),n}finally{We=t,V0=!1}}return null}var Ru=[],Iu=0,nh=null,ah=0,Oo=[],Fo=0,Ys=null,Ma=1,Ea="";function zs(e,t){Ru[Iu++]=ah,Ru[Iu++]=nh,nh=e,ah=t}function uM(e,t,r){Oo[Fo++]=Ma,Oo[Fo++]=Ea,Oo[Fo++]=Ys,Ys=e;var o=Ma;e=Ea;var n=32-yn(o)-1;o&=~(1<<n),r+=1;var a=32-yn(t)+n;if(30<a){var i=n-n%5;a=(o&(1<<i)-1).toString(32),o>>=i,n-=i,Ma=1<<32-yn(t)+n|r<<n|o,Ea=a+e}else Ma=1<<a|r<<n|o,Ea=e}function tC(e){e.return!==null&&(zs(e,1),uM(e,1,0))}function rC(e){for(;e===nh;)nh=Ru[--Iu],Ru[Iu]=null,ah=Ru[--Iu],Ru[Iu]=null;for(;e===Ys;)Ys=Oo[--Fo],Oo[Fo]=null,Ea=Oo[--Fo],Oo[Fo]=null,Ma=Oo[--Fo],Oo[Fo]=null}var mo=null,po=null,st=!1,xn=null;function cM(e,t){var r=_o(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 HT(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,mo=e,po=Ni(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,mo=e,po=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=Ys!==null?{id:Ma,overflow:Ea}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=_o(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,mo=e,po=null,!0):!1;default:return!1}}function ww(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Cw(e){if(st){var t=po;if(t){var r=t;if(!HT(e,t)){if(ww(e))throw Error($(418));t=Ni(r.nextSibling);var o=mo;t&&HT(e,t)?cM(o,r):(e.flags=e.flags&-4097|2,st=!1,mo=e)}}else{if(ww(e))throw Error($(418));e.flags=e.flags&-4097|2,st=!1,mo=e}}}function UT(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;mo=e}function Ag(e){if(e!==mo)return!1;if(!st)return UT(e),st=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!hw(e.type,e.memoizedProps)),t&&(t=po)){if(ww(e))throw dM(),Error($(418));for(;t;)cM(e,t),t=Ni(t.nextSibling)}if(UT(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error($(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){po=Ni(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}po=null}}else po=mo?Ni(e.stateNode.nextSibling):null;return!0}function dM(){for(var e=po;e;)e=Ni(e.nextSibling)}function _u(){po=mo=null,st=!1}function oC(e){xn===null?xn=[e]:xn.push(e)}var tW=_a.ReactCurrentBatchConfig;function Fd(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($(309));var o=r.stateNode}if(!o)throw Error($(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($(284));if(!r._owner)throw Error($(290,e))}return e}function Dg(e,t){throw e=Object.prototype.toString.call(t),Error($(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function zT(e){var t=e._init;return t(e._payload)}function fM(e){function t(h,v){if(e){var y=h.deletions;y===null?(h.deletions=[v],h.flags|=16):y.push(v)}}function r(h,v){if(!e)return null;for(;v!==null;)t(h,v),v=v.sibling;return null}function o(h,v){for(h=new Map;v!==null;)v.key!==null?h.set(v.key,v):h.set(v.index,v),v=v.sibling;return h}function n(h,v){return h=Vi(h,v),h.index=0,h.sibling=null,h}function a(h,v,y){return h.index=y,e?(y=h.alternate,y!==null?(y=y.index,y<v?(h.flags|=2,v):y):(h.flags|=2,v)):(h.flags|=1048576,v)}function i(h){return e&&h.alternate===null&&(h.flags|=2),h}function s(h,v,y,w){return v===null||v.tag!==6?(v=j0(y,h.mode,w),v.return=h,v):(v=n(v,y),v.return=h,v)}function l(h,v,y,w){var C=y.type;return C===xu?c(h,v,y.props.children,w,y.key):v!==null&&(v.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===Ii&&zT(C)===v.type)?(w=n(v,y.props),w.ref=Fd(h,v,y),w.return=h,w):(w=$g(y.type,y.key,y.props,null,h.mode,w),w.ref=Fd(h,v,y),w.return=h,w)}function u(h,v,y,w){return v===null||v.tag!==4||v.stateNode.containerInfo!==y.containerInfo||v.stateNode.implementation!==y.implementation?(v=$0(y,h.mode,w),v.return=h,v):(v=n(v,y.children||[]),v.return=h,v)}function c(h,v,y,w,C){return v===null||v.tag!==7?(v=Ks(y,h.mode,w,C),v.return=h,v):(v=n(v,y),v.return=h,v)}function d(h,v,y){if(typeof v=="string"&&v!==""||typeof v=="number")return v=j0(""+v,h.mode,y),v.return=h,v;if(typeof v=="object"&&v!==null){switch(v.$$typeof){case xg:return y=$g(v.type,v.key,v.props,null,h.mode,y),y.ref=Fd(h,null,v),y.return=h,y;case vu:return v=$0(v,h.mode,y),v.return=h,v;case Ii:var w=v._init;return d(h,w(v._payload),y)}if(Ud(v)||Ad(v))return v=Ks(v,h.mode,y,null),v.return=h,v;Dg(h,v)}return null}function f(h,v,y,w){var C=v!==null?v.key:null;if(typeof y=="string"&&y!==""||typeof y=="number")return C!==null?null:s(h,v,""+y,w);if(typeof y=="object"&&y!==null){switch(y.$$typeof){case xg:return y.key===C?l(h,v,y,w):null;case vu:return y.key===C?u(h,v,y,w):null;case Ii:return C=y._init,f(h,v,C(y._payload),w)}if(Ud(y)||Ad(y))return C!==null?null:c(h,v,y,w,null);Dg(h,y)}return null}function p(h,v,y,w,C){if(typeof w=="string"&&w!==""||typeof w=="number")return h=h.get(y)||null,s(v,h,""+w,C);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case xg:return h=h.get(w.key===null?y:w.key)||null,l(v,h,w,C);case vu:return h=h.get(w.key===null?y:w.key)||null,u(v,h,w,C);case Ii:var b=w._init;return p(h,v,y,b(w._payload),C)}if(Ud(w)||Ad(w))return h=h.get(y)||null,c(v,h,w,C,null);Dg(v,w)}return null}function g(h,v,y,w){for(var C=null,b=null,S=v,I=v=0,L=null;S!==null&&I<y.length;I++){S.index>I?(L=S,S=null):L=S.sibling;var T=f(h,S,y[I],w);if(T===null){S===null&&(S=L);break}e&&S&&T.alternate===null&&t(h,S),v=a(T,v,I),b===null?C=T:b.sibling=T,b=T,S=L}if(I===y.length)return r(h,S),st&&zs(h,I),C;if(S===null){for(;I<y.length;I++)S=d(h,y[I],w),S!==null&&(v=a(S,v,I),b===null?C=S:b.sibling=S,b=S);return st&&zs(h,I),C}for(S=o(h,S);I<y.length;I++)L=p(S,h,I,y[I],w),L!==null&&(e&&L.alternate!==null&&S.delete(L.key===null?I:L.key),v=a(L,v,I),b===null?C=L:b.sibling=L,b=L);return e&&S.forEach(function(k){return t(h,k)}),st&&zs(h,I),C}function m(h,v,y,w){var C=Ad(y);if(typeof C!="function")throw Error($(150));if(y=C.call(y),y==null)throw Error($(151));for(var b=C=null,S=v,I=v=0,L=null,T=y.next();S!==null&&!T.done;I++,T=y.next()){S.index>I?(L=S,S=null):L=S.sibling;var k=f(h,S,T.value,w);if(k===null){S===null&&(S=L);break}e&&S&&k.alternate===null&&t(h,S),v=a(k,v,I),b===null?C=k:b.sibling=k,b=k,S=L}if(T.done)return r(h,S),st&&zs(h,I),C;if(S===null){for(;!T.done;I++,T=y.next())T=d(h,T.value,w),T!==null&&(v=a(T,v,I),b===null?C=T:b.sibling=T,b=T);return st&&zs(h,I),C}for(S=o(h,S);!T.done;I++,T=y.next())T=p(S,h,I,T.value,w),T!==null&&(e&&T.alternate!==null&&S.delete(T.key===null?I:T.key),v=a(T,v,I),b===null?C=T:b.sibling=T,b=T);return e&&S.forEach(function(E){return t(h,E)}),st&&zs(h,I),C}function x(h,v,y,w){if(typeof y=="object"&&y!==null&&y.type===xu&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case xg:e:{for(var C=y.key,b=v;b!==null;){if(b.key===C){if(C=y.type,C===xu){if(b.tag===7){r(h,b.sibling),v=n(b,y.props.children),v.return=h,h=v;break e}}else if(b.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===Ii&&zT(C)===b.type){r(h,b.sibling),v=n(b,y.props),v.ref=Fd(h,b,y),v.return=h,h=v;break e}r(h,b);break}else t(h,b);b=b.sibling}y.type===xu?(v=Ks(y.props.children,h.mode,w,y.key),v.return=h,h=v):(w=$g(y.type,y.key,y.props,null,h.mode,w),w.ref=Fd(h,v,y),w.return=h,h=w)}return i(h);case vu:e:{for(b=y.key;v!==null;){if(v.key===b)if(v.tag===4&&v.stateNode.containerInfo===y.containerInfo&&v.stateNode.implementation===y.implementation){r(h,v.sibling),v=n(v,y.children||[]),v.return=h,h=v;break e}else{r(h,v);break}else t(h,v);v=v.sibling}v=$0(y,h.mode,w),v.return=h,h=v}return i(h);case Ii:return b=y._init,x(h,v,b(y._payload),w)}if(Ud(y))return g(h,v,y,w);if(Ad(y))return m(h,v,y,w);Dg(h,y)}return typeof y=="string"&&y!==""||typeof y=="number"?(y=""+y,v!==null&&v.tag===6?(r(h,v.sibling),v=n(v,y),v.return=h,h=v):(r(h,v),v=j0(y,h.mode,w),v.return=h,h=v),i(h)):r(h,v)}return x}var Vu=fM(!0),pM=fM(!1),ih=zi(null),sh=null,Pu=null,nC=null;function aC(){nC=Pu=sh=null}function iC(e){var t=ih.current;rt(ih),e._currentValue=t}function Sw(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 Du(e,t){sh=e,nC=Pu=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Kr=!0),e.firstContext=null)}function Bo(e){var t=e._currentValue;if(nC!==e)if(e={context:e,memoizedValue:t,next:null},Pu===null){if(sh===null)throw Error($(308));Pu=e,sh.dependencies={lanes:0,firstContext:e}}else Pu=Pu.next=e;return t}var js=null;function sC(e){js===null?js=[e]:js.push(e)}function mM(e,t,r,o){var n=t.interleaved;return n===null?(r.next=r,sC(t)):(r.next=n.next,n.next=r),t.interleaved=r,Oa(e,o)}function Oa(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 Pi=!1;function lC(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function gM(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 Aa(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Oi(e,t,r){var o=e.updateQueue;if(o===null)return null;if(o=o.shared,De&2){var n=o.pending;return n===null?t.next=t:(t.next=n.next,n.next=t),o.pending=t,Oa(e,r)}return n=o.interleaved,n===null?(t.next=t,sC(o)):(t.next=n.next,n.next=t),o.interleaved=t,Oa(e,r)}function Hg(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,qw(e,r)}}function GT(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 lh(e,t,r,o){var n=e.updateQueue;Pi=!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 g=e,m=s;switch(f=t,p=r,m.tag){case 1:if(g=m.payload,typeof g=="function"){d=g.call(p,d,f);break e}d=g;break e;case 3:g.flags=g.flags&-65537|128;case 0:if(g=m.payload,f=typeof g=="function"?g.call(p,d,f):g,f==null)break e;d=mt({},d,f);break e;case 2:Pi=!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);Zs|=i,e.lanes=i,e.memoizedState=d}}function WT(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($(191,n));n.call(o)}}}var wf={},aa=zi(wf),df=zi(wf),ff=zi(wf);function $s(e){if(e===wf)throw Error($(174));return e}function uC(e,t){switch(Qe(ff,t),Qe(df,e),Qe(aa,wf),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:rw(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=rw(t,e)}rt(aa),Qe(aa,t)}function Bu(){rt(aa),rt(df),rt(ff)}function hM(e){$s(ff.current);var t=$s(aa.current),r=rw(t,e.type);t!==r&&(Qe(df,e),Qe(aa,r))}function cC(e){df.current===e&&(rt(aa),rt(df))}var ft=zi(0);function uh(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 B0=[];function dC(){for(var e=0;e<B0.length;e++)B0[e]._workInProgressVersionPrimary=null;B0.length=0}var Ug=_a.ReactCurrentDispatcher,H0=_a.ReactCurrentBatchConfig,Qs=0,pt=null,Ft=null,$t=null,ch=!1,Xd=!1,pf=0,rW=0;function mr(){throw Error($(321))}function fC(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!Cn(e[r],t[r]))return!1;return!0}function pC(e,t,r,o,n,a){if(Qs=a,pt=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Ug.current=e===null||e.memoizedState===null?iW:sW,e=r(o,n),Xd){a=0;do{if(Xd=!1,pf=0,25<=a)throw Error($(301));a+=1,$t=Ft=null,t.updateQueue=null,Ug.current=lW,e=r(o,n)}while(Xd)}if(Ug.current=dh,t=Ft!==null&&Ft.next!==null,Qs=0,$t=Ft=pt=null,ch=!1,t)throw Error($(300));return e}function mC(){var e=pf!==0;return pf=0,e}function ra(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return $t===null?pt.memoizedState=$t=e:$t=$t.next=e,$t}function Ho(){if(Ft===null){var e=pt.alternate;e=e!==null?e.memoizedState:null}else e=Ft.next;var t=$t===null?pt.memoizedState:$t.next;if(t!==null)$t=t,Ft=e;else{if(e===null)throw Error($(310));Ft=e,e={memoizedState:Ft.memoizedState,baseState:Ft.baseState,baseQueue:Ft.baseQueue,queue:Ft.queue,next:null},$t===null?pt.memoizedState=$t=e:$t=$t.next=e}return $t}function mf(e,t){return typeof t=="function"?t(e):t}function U0(e){var t=Ho(),r=t.queue;if(r===null)throw Error($(311));r.lastRenderedReducer=e;var o=Ft,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((Qs&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,pt.lanes|=c,Zs|=c}u=u.next}while(u!==null&&u!==a);l===null?i=o:l.next=s,Cn(o,t.memoizedState)||(Kr=!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,pt.lanes|=a,Zs|=a,n=n.next;while(n!==e)}else n===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function z0(e){var t=Ho(),r=t.queue;if(r===null)throw Error($(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);Cn(a,t.memoizedState)||(Kr=!0),t.memoizedState=a,t.baseQueue===null&&(t.baseState=a),r.lastRenderedState=a}return[a,o]}function vM(){}function xM(e,t){var r=pt,o=Ho(),n=t(),a=!Cn(o.memoizedState,n);if(a&&(o.memoizedState=n,Kr=!0),o=o.queue,gC(CM.bind(null,r,o,e),[e]),o.getSnapshot!==t||a||$t!==null&&$t.memoizedState.tag&1){if(r.flags|=2048,gf(9,wM.bind(null,r,o,n,t),void 0,null),qt===null)throw Error($(349));Qs&30||yM(r,t,n)}return n}function yM(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=pt.updateQueue,t===null?(t={lastEffect:null,stores:null},pt.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function wM(e,t,r,o){t.value=r,t.getSnapshot=o,SM(t)&&bM(e)}function CM(e,t,r){return r(function(){SM(t)&&bM(e)})}function SM(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!Cn(e,r)}catch{return!0}}function bM(e){var t=Oa(e,1);t!==null&&wn(t,e,1,-1)}function jT(e){var t=ra();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:mf,lastRenderedState:e},t.queue=e,e=e.dispatch=aW.bind(null,pt,e),[t.memoizedState,e]}function gf(e,t,r,o){return e={tag:e,create:t,destroy:r,deps:o,next:null},t=pt.updateQueue,t===null?(t={lastEffect:null,stores:null},pt.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 RM(){return Ho().memoizedState}function zg(e,t,r,o){var n=ra();pt.flags|=e,n.memoizedState=gf(1|t,r,void 0,o===void 0?null:o)}function bh(e,t,r,o){var n=Ho();o=o===void 0?null:o;var a=void 0;if(Ft!==null){var i=Ft.memoizedState;if(a=i.destroy,o!==null&&fC(o,i.deps)){n.memoizedState=gf(t,r,a,o);return}}pt.flags|=e,n.memoizedState=gf(1|t,r,a,o)}function $T(e,t){return zg(8390656,8,e,t)}function gC(e,t){return bh(2048,8,e,t)}function IM(e,t){return bh(4,2,e,t)}function PM(e,t){return bh(4,4,e,t)}function LM(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 TM(e,t,r){return r=r!=null?r.concat([e]):null,bh(4,4,LM.bind(null,t,e),r)}function hC(){}function kM(e,t){var r=Ho();t=t===void 0?null:t;var o=r.memoizedState;return o!==null&&t!==null&&fC(t,o[1])?o[0]:(r.memoizedState=[e,t],e)}function MM(e,t){var r=Ho();t=t===void 0?null:t;var o=r.memoizedState;return o!==null&&t!==null&&fC(t,o[1])?o[0]:(e=e(),r.memoizedState=[e,t],e)}function EM(e,t,r){return Qs&21?(Cn(r,t)||(r=Fk(),pt.lanes|=r,Zs|=r,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Kr=!0),e.memoizedState=r)}function oW(e,t){var r=We;We=r!==0&&4>r?r:4,e(!0);var o=H0.transition;H0.transition={};try{e(!1),t()}finally{We=r,H0.transition=o}}function AM(){return Ho().memoizedState}function nW(e,t,r){var o=_i(e);if(r={lane:o,action:r,hasEagerState:!1,eagerState:null,next:null},DM(e))NM(t,r);else if(r=mM(e,t,r,o),r!==null){var n=Nr();wn(r,e,o,n),OM(r,t,o)}}function aW(e,t,r){var o=_i(e),n={lane:o,action:r,hasEagerState:!1,eagerState:null,next:null};if(DM(e))NM(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,Cn(s,i)){var l=t.interleaved;l===null?(n.next=n,sC(t)):(n.next=l.next,l.next=n),t.interleaved=n;return}}catch{}finally{}r=mM(e,t,n,o),r!==null&&(n=Nr(),wn(r,e,o,n),OM(r,t,o))}}function DM(e){var t=e.alternate;return e===pt||t!==null&&t===pt}function NM(e,t){Xd=ch=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function OM(e,t,r){if(r&4194240){var o=t.lanes;o&=e.pendingLanes,r|=o,t.lanes=r,qw(e,r)}}var dh={readContext:Bo,useCallback:mr,useContext:mr,useEffect:mr,useImperativeHandle:mr,useInsertionEffect:mr,useLayoutEffect:mr,useMemo:mr,useReducer:mr,useRef:mr,useState:mr,useDebugValue:mr,useDeferredValue:mr,useTransition:mr,useMutableSource:mr,useSyncExternalStore:mr,useId:mr,unstable_isNewReconciler:!1},iW={readContext:Bo,useCallback:function(e,t){return ra().memoizedState=[e,t===void 0?null:t],e},useContext:Bo,useEffect:$T,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,zg(4194308,4,LM.bind(null,t,e),r)},useLayoutEffect:function(e,t){return zg(4194308,4,e,t)},useInsertionEffect:function(e,t){return zg(4,2,e,t)},useMemo:function(e,t){var r=ra();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var o=ra();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=nW.bind(null,pt,e),[o.memoizedState,e]},useRef:function(e){var t=ra();return e={current:e},t.memoizedState=e},useState:jT,useDebugValue:hC,useDeferredValue:function(e){return ra().memoizedState=e},useTransition:function(){var e=jT(!1),t=e[0];return e=oW.bind(null,e[1]),ra().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var o=pt,n=ra();if(st){if(r===void 0)throw Error($(407));r=r()}else{if(r=t(),qt===null)throw Error($(349));Qs&30||yM(o,t,r)}n.memoizedState=r;var a={value:r,getSnapshot:t};return n.queue=a,$T(CM.bind(null,o,a,e),[e]),o.flags|=2048,gf(9,wM.bind(null,o,a,r,t),void 0,null),r},useId:function(){var e=ra(),t=qt.identifierPrefix;if(st){var r=Ea,o=Ma;r=(o&~(1<<32-yn(o)-1)).toString(32)+r,t=":"+t+"R"+r,r=pf++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=rW++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},sW={readContext:Bo,useCallback:kM,useContext:Bo,useEffect:gC,useImperativeHandle:TM,useInsertionEffect:IM,useLayoutEffect:PM,useMemo:MM,useReducer:U0,useRef:RM,useState:function(){return U0(mf)},useDebugValue:hC,useDeferredValue:function(e){var t=Ho();return EM(t,Ft.memoizedState,e)},useTransition:function(){var e=U0(mf)[0],t=Ho().memoizedState;return[e,t]},useMutableSource:vM,useSyncExternalStore:xM,useId:AM,unstable_isNewReconciler:!1},lW={readContext:Bo,useCallback:kM,useContext:Bo,useEffect:gC,useImperativeHandle:TM,useInsertionEffect:IM,useLayoutEffect:PM,useMemo:MM,useReducer:z0,useRef:RM,useState:function(){return z0(mf)},useDebugValue:hC,useDeferredValue:function(e){var t=Ho();return Ft===null?t.memoizedState=e:EM(t,Ft.memoizedState,e)},useTransition:function(){var e=z0(mf)[0],t=Ho().memoizedState;return[e,t]},useMutableSource:vM,useSyncExternalStore:xM,useId:AM,unstable_isNewReconciler:!1};function hn(e,t){if(e&&e.defaultProps){t=mt({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function bw(e,t,r,o){t=e.memoizedState,r=r(o,t),r=r==null?t:mt({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var Rh={isMounted:function(e){return(e=e._reactInternals)?tl(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var o=Nr(),n=_i(e),a=Aa(o,n);a.payload=t,r!=null&&(a.callback=r),t=Oi(e,a,n),t!==null&&(wn(t,e,n,o),Hg(t,e,n))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var o=Nr(),n=_i(e),a=Aa(o,n);a.tag=1,a.payload=t,r!=null&&(a.callback=r),t=Oi(e,a,n),t!==null&&(wn(t,e,n,o),Hg(t,e,n))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=Nr(),o=_i(e),n=Aa(r,o);n.tag=2,t!=null&&(n.callback=t),t=Oi(e,n,o),t!==null&&(wn(t,e,o,r),Hg(t,e,o))}};function qT(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?!sf(r,o)||!sf(n,a):!0}function FM(e,t,r){var o=!1,n=Hi,a=t.contextType;return typeof a=="object"&&a!==null?a=Bo(a):(n=Yr(t)?Xs:vr.current,o=t.contextTypes,a=(o=o!=null)?Fu(e,n):Hi),t=new t(r,a),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Rh,e.stateNode=t,t._reactInternals=e,o&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=n,e.__reactInternalMemoizedMaskedChildContext=a),t}function KT(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&&Rh.enqueueReplaceState(t,t.state,null)}function Rw(e,t,r,o){var n=e.stateNode;n.props=r,n.state=e.memoizedState,n.refs={},lC(e);var a=t.contextType;typeof a=="object"&&a!==null?n.context=Bo(a):(a=Yr(t)?Xs:vr.current,n.context=Fu(e,a)),n.state=e.memoizedState,a=t.getDerivedStateFromProps,typeof a=="function"&&(bw(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&&Rh.enqueueReplaceState(n,n.state,null),lh(e,r,n,o),n.state=e.memoizedState),typeof n.componentDidMount=="function"&&(e.flags|=4194308)}function Hu(e,t){try{var r="",o=t;do r+=V5(o),o=o.return;while(o);var n=r}catch(a){n=`
|
|
10
|
-
Error generating stack: `+a.message+`
|
|
11
|
-
`+a.stack}return{value:e,source:t,stack:n,digest:null}}function G0(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function Iw(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var uW=typeof WeakMap=="function"?WeakMap:Map;function _M(e,t,r){r=Aa(-1,r),r.tag=3,r.payload={element:null};var o=t.value;return r.callback=function(){ph||(ph=!0,Ow=o),Iw(e,t)},r}function VM(e,t,r){r=Aa(-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(){Iw(e,t)}}var a=e.stateNode;return a!==null&&typeof a.componentDidCatch=="function"&&(r.callback=function(){Iw(e,t),typeof o!="function"&&(Fi===null?Fi=new Set([this]):Fi.add(this));var i=t.stack;this.componentDidCatch(t.value,{componentStack:i!==null?i:""})}),r}function XT(e,t,r){var o=e.pingCache;if(o===null){o=e.pingCache=new uW;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=bW.bind(null,e,t,r),t.then(e,e))}function YT(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 QT(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=Aa(-1,1),t.tag=2,Oi(r,t,1))),r.lanes|=1),e)}var cW=_a.ReactCurrentOwner,Kr=!1;function Dr(e,t,r,o){t.child=e===null?pM(t,null,r,o):Vu(t,e.child,r,o)}function ZT(e,t,r,o,n){r=r.render;var a=t.ref;return Du(t,n),o=pC(e,t,r,o,a,n),r=mC(),e!==null&&!Kr?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n,Fa(e,t,n)):(st&&r&&tC(t),t.flags|=1,Dr(e,t,o,n),t.child)}function JT(e,t,r,o,n){if(e===null){var a=r.type;return typeof a=="function"&&!RC(a)&&a.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=a,BM(e,t,a,o,n)):(e=$g(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:sf,r(i,o)&&e.ref===t.ref)return Fa(e,t,n)}return t.flags|=1,e=Vi(a,o),e.ref=t.ref,e.return=t,t.child=e}function BM(e,t,r,o,n){if(e!==null){var a=e.memoizedProps;if(sf(a,o)&&e.ref===t.ref)if(Kr=!1,t.pendingProps=o=a,(e.lanes&n)!==0)e.flags&131072&&(Kr=!0);else return t.lanes=e.lanes,Fa(e,t,n)}return Pw(e,t,r,o,n)}function HM(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},Qe(Tu,fo),fo|=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,Qe(Tu,fo),fo|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},o=a!==null?a.baseLanes:r,Qe(Tu,fo),fo|=o}else a!==null?(o=a.baseLanes|r,t.memoizedState=null):o=r,Qe(Tu,fo),fo|=o;return Dr(e,t,n,r),t.child}function UM(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function Pw(e,t,r,o,n){var a=Yr(r)?Xs:vr.current;return a=Fu(t,a),Du(t,n),r=pC(e,t,r,o,a,n),o=mC(),e!==null&&!Kr?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n,Fa(e,t,n)):(st&&o&&tC(t),t.flags|=1,Dr(e,t,r,n),t.child)}function ek(e,t,r,o,n){if(Yr(r)){var a=!0;oh(t)}else a=!1;if(Du(t,n),t.stateNode===null)Gg(e,t),FM(t,r,o),Rw(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=Bo(u):(u=Yr(r)?Xs:vr.current,u=Fu(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)&&KT(t,i,o,u),Pi=!1;var f=t.memoizedState;i.state=f,lh(t,o,i,n),l=t.memoizedState,s!==o||f!==l||Xr.current||Pi?(typeof c=="function"&&(bw(t,r,c,o),l=t.memoizedState),(s=Pi||qT(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,gM(e,t),s=t.memoizedProps,u=t.type===t.elementType?s:hn(t.type,s),i.props=u,d=t.pendingProps,f=i.context,l=r.contextType,typeof l=="object"&&l!==null?l=Bo(l):(l=Yr(r)?Xs:vr.current,l=Fu(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)&&KT(t,i,o,l),Pi=!1,f=t.memoizedState,i.state=f,lh(t,o,i,n);var g=t.memoizedState;s!==d||f!==g||Xr.current||Pi?(typeof p=="function"&&(bw(t,r,p,o),g=t.memoizedState),(u=Pi||qT(t,r,u,o,f,g,l)||!1)?(c||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(o,g,l),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(o,g,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=g),i.props=o,i.state=g,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 Lw(e,t,r,o,a,n)}function Lw(e,t,r,o,n,a){UM(e,t);var i=(t.flags&128)!==0;if(!o&&!i)return n&&BT(t,r,!1),Fa(e,t,a);o=t.stateNode,cW.current=t;var s=i&&typeof r.getDerivedStateFromError!="function"?null:o.render();return t.flags|=1,e!==null&&i?(t.child=Vu(t,e.child,null,a),t.child=Vu(t,null,s,a)):Dr(e,t,s,a),t.memoizedState=o.state,n&&BT(t,r,!0),t.child}function zM(e){var t=e.stateNode;t.pendingContext?VT(e,t.pendingContext,t.pendingContext!==t.context):t.context&&VT(e,t.context,!1),uC(e,t.containerInfo)}function tk(e,t,r,o,n){return _u(),oC(n),t.flags|=256,Dr(e,t,r,o),t.child}var Tw={dehydrated:null,treeContext:null,retryLane:0};function kw(e){return{baseLanes:e,cachePool:null,transitions:null}}function GM(e,t,r){var o=t.pendingProps,n=ft.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),Qe(ft,n&1),e===null)return Cw(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=Lh(i,o,0,null),e=Ks(e,o,r,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=kw(r),t.memoizedState=Tw,e):vC(t,i));if(n=e.memoizedState,n!==null&&(s=n.dehydrated,s!==null))return dW(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=Vi(n,l),o.subtreeFlags=n.subtreeFlags&14680064),s!==null?a=Vi(s,a):(a=Ks(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?kw(r):{baseLanes:i.baseLanes|r,cachePool:null,transitions:i.transitions},a.memoizedState=i,a.childLanes=e.childLanes&~r,t.memoizedState=Tw,o}return a=e.child,e=a.sibling,o=Vi(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 vC(e,t){return t=Lh({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Ng(e,t,r,o){return o!==null&&oC(o),Vu(t,e.child,null,r),e=vC(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function dW(e,t,r,o,n,a,i){if(r)return t.flags&256?(t.flags&=-257,o=G0(Error($(422))),Ng(e,t,i,o)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(a=o.fallback,n=t.mode,o=Lh({mode:"visible",children:o.children},n,0,null),a=Ks(a,n,i,null),a.flags|=2,o.return=t,a.return=t,o.sibling=a,t.child=o,t.mode&1&&Vu(t,e.child,null,i),t.child.memoizedState=kw(i),t.memoizedState=Tw,a);if(!(t.mode&1))return Ng(e,t,i,null);if(n.data==="$!"){if(o=n.nextSibling&&n.nextSibling.dataset,o)var s=o.dgst;return o=s,a=Error($(419)),o=G0(a,o,void 0),Ng(e,t,i,o)}if(s=(i&e.childLanes)!==0,Kr||s){if(o=qt,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,Oa(e,n),wn(o,e,n,-1))}return bC(),o=G0(Error($(421))),Ng(e,t,i,o)}return n.data==="$?"?(t.flags|=128,t.child=e.child,t=RW.bind(null,e),n._reactRetry=t,null):(e=a.treeContext,po=Ni(n.nextSibling),mo=t,st=!0,xn=null,e!==null&&(Oo[Fo++]=Ma,Oo[Fo++]=Ea,Oo[Fo++]=Ys,Ma=e.id,Ea=e.overflow,Ys=t),t=vC(t,o.children),t.flags|=4096,t)}function rk(e,t,r){e.lanes|=t;var o=e.alternate;o!==null&&(o.lanes|=t),Sw(e.return,t,r)}function W0(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 WM(e,t,r){var o=t.pendingProps,n=o.revealOrder,a=o.tail;if(Dr(e,t,o.children,r),o=ft.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&&rk(e,r,t);else if(e.tag===19)rk(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(Qe(ft,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&&uh(e)===null&&(n=r),r=r.sibling;r=n,r===null?(n=t.child,t.child=null):(n=r.sibling,r.sibling=null),W0(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&&uh(e)===null){t.child=n;break}e=n.sibling,n.sibling=r,r=n,n=e}W0(t,!0,r,null,a);break;case"together":W0(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Gg(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),Zs|=t.lanes,!(r&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error($(153));if(t.child!==null){for(e=t.child,r=Vi(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=Vi(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function fW(e,t,r){switch(t.tag){case 3:zM(t),_u();break;case 5:hM(t);break;case 1:Yr(t.type)&&oh(t);break;case 4:uC(t,t.stateNode.containerInfo);break;case 10:var o=t.type._context,n=t.memoizedProps.value;Qe(ih,o._currentValue),o._currentValue=n;break;case 13:if(o=t.memoizedState,o!==null)return o.dehydrated!==null?(Qe(ft,ft.current&1),t.flags|=128,null):r&t.child.childLanes?GM(e,t,r):(Qe(ft,ft.current&1),e=Fa(e,t,r),e!==null?e.sibling:null);Qe(ft,ft.current&1);break;case 19:if(o=(r&t.childLanes)!==0,e.flags&128){if(o)return WM(e,t,r);t.flags|=128}if(n=t.memoizedState,n!==null&&(n.rendering=null,n.tail=null,n.lastEffect=null),Qe(ft,ft.current),o)break;return null;case 22:case 23:return t.lanes=0,HM(e,t,r)}return Fa(e,t,r)}var jM,Mw,$M,qM;jM=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}};Mw=function(){};$M=function(e,t,r,o){var n=e.memoizedProps;if(n!==o){e=t.stateNode,$s(aa.current);var a=null;switch(r){case"input":n=Z0(e,n),o=Z0(e,o),a=[];break;case"select":n=mt({},n,{value:void 0}),o=mt({},o,{value:void 0}),a=[];break;case"textarea":n=tw(e,n),o=tw(e,o),a=[];break;default:typeof n.onClick!="function"&&typeof o.onClick=="function"&&(e.onclick=th)}ow(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"&&(Jd.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"&&(Jd.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&tt("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)}};qM=function(e,t,r,o){r!==o&&(t.flags|=4)};function _d(e,t){if(!st)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 gr(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 pW(e,t,r){var o=t.pendingProps;switch(rC(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return gr(t),null;case 1:return Yr(t.type)&&rh(),gr(t),null;case 3:return o=t.stateNode,Bu(),rt(Xr),rt(vr),dC(),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),(e===null||e.child===null)&&(Ag(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,xn!==null&&(Vw(xn),xn=null))),Mw(e,t),gr(t),null;case 5:cC(t);var n=$s(ff.current);if(r=t.type,e!==null&&t.stateNode!=null)$M(e,t,r,o,n),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!o){if(t.stateNode===null)throw Error($(166));return gr(t),null}if(e=$s(aa.current),Ag(t)){o=t.stateNode,r=t.type;var a=t.memoizedProps;switch(o[oa]=t,o[cf]=a,e=(t.mode&1)!==0,r){case"dialog":tt("cancel",o),tt("close",o);break;case"iframe":case"object":case"embed":tt("load",o);break;case"video":case"audio":for(n=0;n<Gd.length;n++)tt(Gd[n],o);break;case"source":tt("error",o);break;case"img":case"image":case"link":tt("error",o),tt("load",o);break;case"details":tt("toggle",o);break;case"input":cT(o,a),tt("invalid",o);break;case"select":o._wrapperState={wasMultiple:!!a.multiple},tt("invalid",o);break;case"textarea":fT(o,a),tt("invalid",o)}ow(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&&Eg(o.textContent,s,e),n=["children",s]):typeof s=="number"&&o.textContent!==""+s&&(a.suppressHydrationWarning!==!0&&Eg(o.textContent,s,e),n=["children",""+s]):Jd.hasOwnProperty(i)&&s!=null&&i==="onScroll"&&tt("scroll",o)}switch(r){case"input":yg(o),dT(o,a,!0);break;case"textarea":yg(o),pT(o);break;case"select":case"option":break;default:typeof a.onClick=="function"&&(o.onclick=th)}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=Ck(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[oa]=t,e[cf]=o,jM(e,t,!1,!1),t.stateNode=e;e:{switch(i=nw(r,o),r){case"dialog":tt("cancel",e),tt("close",e),n=o;break;case"iframe":case"object":case"embed":tt("load",e),n=o;break;case"video":case"audio":for(n=0;n<Gd.length;n++)tt(Gd[n],e);n=o;break;case"source":tt("error",e),n=o;break;case"img":case"image":case"link":tt("error",e),tt("load",e),n=o;break;case"details":tt("toggle",e),n=o;break;case"input":cT(e,o),n=Z0(e,o),tt("invalid",e);break;case"option":n=o;break;case"select":e._wrapperState={wasMultiple:!!o.multiple},n=mt({},o,{value:void 0}),tt("invalid",e);break;case"textarea":fT(e,o),n=tw(e,o),tt("invalid",e);break;default:n=o}ow(r,n),s=n;for(a in s)if(s.hasOwnProperty(a)){var l=s[a];a==="style"?Rk(e,l):a==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&Sk(e,l)):a==="children"?typeof l=="string"?(r!=="textarea"||l!=="")&&ef(e,l):typeof l=="number"&&ef(e,""+l):a!=="suppressContentEditableWarning"&&a!=="suppressHydrationWarning"&&a!=="autoFocus"&&(Jd.hasOwnProperty(a)?l!=null&&a==="onScroll"&&tt("scroll",e):l!=null&&Uw(e,a,l,i))}switch(r){case"input":yg(e),dT(e,o,!1);break;case"textarea":yg(e),pT(e);break;case"option":o.value!=null&&e.setAttribute("value",""+Bi(o.value));break;case"select":e.multiple=!!o.multiple,a=o.value,a!=null?ku(e,!!o.multiple,a,!1):o.defaultValue!=null&&ku(e,!!o.multiple,o.defaultValue,!0);break;default:typeof n.onClick=="function"&&(e.onclick=th)}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 gr(t),null;case 6:if(e&&t.stateNode!=null)qM(e,t,e.memoizedProps,o);else{if(typeof o!="string"&&t.stateNode===null)throw Error($(166));if(r=$s(ff.current),$s(aa.current),Ag(t)){if(o=t.stateNode,r=t.memoizedProps,o[oa]=t,(a=o.nodeValue!==r)&&(e=mo,e!==null))switch(e.tag){case 3:Eg(o.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Eg(o.nodeValue,r,(e.mode&1)!==0)}a&&(t.flags|=4)}else o=(r.nodeType===9?r:r.ownerDocument).createTextNode(o),o[oa]=t,t.stateNode=o}return gr(t),null;case 13:if(rt(ft),o=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(st&&po!==null&&t.mode&1&&!(t.flags&128))dM(),_u(),t.flags|=98560,a=!1;else if(a=Ag(t),o!==null&&o.dehydrated!==null){if(e===null){if(!a)throw Error($(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error($(317));a[oa]=t}else _u(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;gr(t),a=!1}else xn!==null&&(Vw(xn),xn=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||ft.current&1?_t===0&&(_t=3):bC())),t.updateQueue!==null&&(t.flags|=4),gr(t),null);case 4:return Bu(),Mw(e,t),e===null&&lf(t.stateNode.containerInfo),gr(t),null;case 10:return iC(t.type._context),gr(t),null;case 17:return Yr(t.type)&&rh(),gr(t),null;case 19:if(rt(ft),a=t.memoizedState,a===null)return gr(t),null;if(o=(t.flags&128)!==0,i=a.rendering,i===null)if(o)_d(a,!1);else{if(_t!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=uh(e),i!==null){for(t.flags|=128,_d(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 Qe(ft,ft.current&1|2),t.child}e=e.sibling}a.tail!==null&&bt()>Uu&&(t.flags|=128,o=!0,_d(a,!1),t.lanes=4194304)}else{if(!o)if(e=uh(i),e!==null){if(t.flags|=128,o=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),_d(a,!0),a.tail===null&&a.tailMode==="hidden"&&!i.alternate&&!st)return gr(t),null}else 2*bt()-a.renderingStartTime>Uu&&r!==1073741824&&(t.flags|=128,o=!0,_d(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=bt(),t.sibling=null,r=ft.current,Qe(ft,o?r&1|2:r&1),t):(gr(t),null);case 22:case 23:return SC(),o=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==o&&(t.flags|=8192),o&&t.mode&1?fo&1073741824&&(gr(t),t.subtreeFlags&6&&(t.flags|=8192)):gr(t),null;case 24:return null;case 25:return null}throw Error($(156,t.tag))}function mW(e,t){switch(rC(t),t.tag){case 1:return Yr(t.type)&&rh(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Bu(),rt(Xr),rt(vr),dC(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return cC(t),null;case 13:if(rt(ft),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error($(340));_u()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return rt(ft),null;case 4:return Bu(),null;case 10:return iC(t.type._context),null;case 22:case 23:return SC(),null;case 24:return null;default:return null}}var Og=!1,hr=!1,gW=typeof WeakSet=="function"?WeakSet:Set,oe=null;function Lu(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(o){xt(e,t,o)}else r.current=null}function Ew(e,t,r){try{r()}catch(o){xt(e,t,o)}}var ok=!1;function hW(e,t){if(mw=Zg,e=Zk(),eC(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(gw={focusedElem:e,selectionRange:r},Zg=!1,oe=t;oe!==null;)if(t=oe,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,oe=e;else for(;oe!==null;){t=oe;try{var g=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var m=g.memoizedProps,x=g.memoizedState,h=t.stateNode,v=h.getSnapshotBeforeUpdate(t.elementType===t.type?m:hn(t.type,m),x);h.__reactInternalSnapshotBeforeUpdate=v}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($(163))}}catch(w){xt(t,t.return,w)}if(e=t.sibling,e!==null){e.return=t.return,oe=e;break}oe=t.return}return g=ok,ok=!1,g}function Yd(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&&Ew(t,r,a)}n=n.next}while(n!==o)}}function Ih(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 Aw(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 KM(e){var t=e.alternate;t!==null&&(e.alternate=null,KM(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[oa],delete t[cf],delete t[xw],delete t[ZG],delete t[JG])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function XM(e){return e.tag===5||e.tag===3||e.tag===4}function nk(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||XM(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Dw(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=th));else if(o!==4&&(e=e.child,e!==null))for(Dw(e,t,r),e=e.sibling;e!==null;)Dw(e,t,r),e=e.sibling}function Nw(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(Nw(e,t,r),e=e.sibling;e!==null;)Nw(e,t,r),e=e.sibling}var or=null,vn=!1;function Ri(e,t,r){for(r=r.child;r!==null;)YM(e,t,r),r=r.sibling}function YM(e,t,r){if(na&&typeof na.onCommitFiberUnmount=="function")try{na.onCommitFiberUnmount(vh,r)}catch{}switch(r.tag){case 5:hr||Lu(r,t);case 6:var o=or,n=vn;or=null,Ri(e,t,r),or=o,vn=n,or!==null&&(vn?(e=or,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):or.removeChild(r.stateNode));break;case 18:or!==null&&(vn?(e=or,r=r.stateNode,e.nodeType===8?_0(e.parentNode,r):e.nodeType===1&&_0(e,r),nf(e)):_0(or,r.stateNode));break;case 4:o=or,n=vn,or=r.stateNode.containerInfo,vn=!0,Ri(e,t,r),or=o,vn=n;break;case 0:case 11:case 14:case 15:if(!hr&&(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)&&Ew(r,t,i),n=n.next}while(n!==o)}Ri(e,t,r);break;case 1:if(!hr&&(Lu(r,t),o=r.stateNode,typeof o.componentWillUnmount=="function"))try{o.props=r.memoizedProps,o.state=r.memoizedState,o.componentWillUnmount()}catch(s){xt(r,t,s)}Ri(e,t,r);break;case 21:Ri(e,t,r);break;case 22:r.mode&1?(hr=(o=hr)||r.memoizedState!==null,Ri(e,t,r),hr=o):Ri(e,t,r);break;default:Ri(e,t,r)}}function ak(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new gW),t.forEach(function(o){var n=IW.bind(null,e,o);r.has(o)||(r.add(o),o.then(n,n))})}}function gn(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:or=s.stateNode,vn=!1;break e;case 3:or=s.stateNode.containerInfo,vn=!0;break e;case 4:or=s.stateNode.containerInfo,vn=!0;break e}s=s.return}if(or===null)throw Error($(160));YM(a,i,n),or=null,vn=!1;var l=n.alternate;l!==null&&(l.return=null),n.return=null}catch(u){xt(n,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)QM(t,e),t=t.sibling}function QM(e,t){var r=e.alternate,o=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(gn(t,e),ta(e),o&4){try{Yd(3,e,e.return),Ih(3,e)}catch(m){xt(e,e.return,m)}try{Yd(5,e,e.return)}catch(m){xt(e,e.return,m)}}break;case 1:gn(t,e),ta(e),o&512&&r!==null&&Lu(r,r.return);break;case 5:if(gn(t,e),ta(e),o&512&&r!==null&&Lu(r,r.return),e.flags&32){var n=e.stateNode;try{ef(n,"")}catch(m){xt(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&&yk(n,a),nw(s,i);var u=nw(s,a);for(i=0;i<l.length;i+=2){var c=l[i],d=l[i+1];c==="style"?Rk(n,d):c==="dangerouslySetInnerHTML"?Sk(n,d):c==="children"?ef(n,d):Uw(n,c,d,u)}switch(s){case"input":J0(n,a);break;case"textarea":wk(n,a);break;case"select":var f=n._wrapperState.wasMultiple;n._wrapperState.wasMultiple=!!a.multiple;var p=a.value;p!=null?ku(n,!!a.multiple,p,!1):f!==!!a.multiple&&(a.defaultValue!=null?ku(n,!!a.multiple,a.defaultValue,!0):ku(n,!!a.multiple,a.multiple?[]:"",!1))}n[cf]=a}catch(m){xt(e,e.return,m)}}break;case 6:if(gn(t,e),ta(e),o&4){if(e.stateNode===null)throw Error($(162));n=e.stateNode,a=e.memoizedProps;try{n.nodeValue=a}catch(m){xt(e,e.return,m)}}break;case 3:if(gn(t,e),ta(e),o&4&&r!==null&&r.memoizedState.isDehydrated)try{nf(t.containerInfo)}catch(m){xt(e,e.return,m)}break;case 4:gn(t,e),ta(e);break;case 13:gn(t,e),ta(e),n=e.child,n.flags&8192&&(a=n.memoizedState!==null,n.stateNode.isHidden=a,!a||n.alternate!==null&&n.alternate.memoizedState!==null||(wC=bt())),o&4&&ak(e);break;case 22:if(c=r!==null&&r.memoizedState!==null,e.mode&1?(hr=(u=hr)||c,gn(t,e),hr=u):gn(t,e),ta(e),o&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!c&&e.mode&1)for(oe=e,c=e.child;c!==null;){for(d=oe=c;oe!==null;){switch(f=oe,p=f.child,f.tag){case 0:case 11:case 14:case 15:Yd(4,f,f.return);break;case 1:Lu(f,f.return);var g=f.stateNode;if(typeof g.componentWillUnmount=="function"){o=f,r=f.return;try{t=o,g.props=t.memoizedProps,g.state=t.memoizedState,g.componentWillUnmount()}catch(m){xt(o,r,m)}}break;case 5:Lu(f,f.return);break;case 22:if(f.memoizedState!==null){sk(d);continue}}p!==null?(p.return=f,oe=p):sk(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=bk("display",i))}catch(m){xt(e,e.return,m)}}}else if(d.tag===6){if(c===null)try{d.stateNode.nodeValue=u?"":d.memoizedProps}catch(m){xt(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:gn(t,e),ta(e),o&4&&ak(e);break;case 21:break;default:gn(t,e),ta(e)}}function ta(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(XM(r)){var o=r;break e}r=r.return}throw Error($(160))}switch(o.tag){case 5:var n=o.stateNode;o.flags&32&&(ef(n,""),o.flags&=-33);var a=nk(e);Nw(e,a,n);break;case 3:case 4:var i=o.stateNode.containerInfo,s=nk(e);Dw(e,s,i);break;default:throw Error($(161))}}catch(l){xt(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function vW(e,t,r){oe=e,ZM(e,t,r)}function ZM(e,t,r){for(var o=(e.mode&1)!==0;oe!==null;){var n=oe,a=n.child;if(n.tag===22&&o){var i=n.memoizedState!==null||Og;if(!i){var s=n.alternate,l=s!==null&&s.memoizedState!==null||hr;s=Og;var u=hr;if(Og=i,(hr=l)&&!u)for(oe=n;oe!==null;)i=oe,l=i.child,i.tag===22&&i.memoizedState!==null?lk(n):l!==null?(l.return=i,oe=l):lk(n);for(;a!==null;)oe=a,ZM(a,t,r),a=a.sibling;oe=n,Og=s,hr=u}ik(e,t,r)}else n.subtreeFlags&8772&&a!==null?(a.return=n,oe=a):ik(e,t,r)}}function ik(e){for(;oe!==null;){var t=oe;if(t.flags&8772){var r=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:hr||Ih(5,t);break;case 1:var o=t.stateNode;if(t.flags&4&&!hr)if(r===null)o.componentDidMount();else{var n=t.elementType===t.type?r.memoizedProps:hn(t.type,r.memoizedProps);o.componentDidUpdate(n,r.memoizedState,o.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;a!==null&&WT(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}WT(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&&nf(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error($(163))}hr||t.flags&512&&Aw(t)}catch(f){xt(t,t.return,f)}}if(t===e){oe=null;break}if(r=t.sibling,r!==null){r.return=t.return,oe=r;break}oe=t.return}}function sk(e){for(;oe!==null;){var t=oe;if(t===e){oe=null;break}var r=t.sibling;if(r!==null){r.return=t.return,oe=r;break}oe=t.return}}function lk(e){for(;oe!==null;){var t=oe;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{Ih(4,t)}catch(l){xt(t,r,l)}break;case 1:var o=t.stateNode;if(typeof o.componentDidMount=="function"){var n=t.return;try{o.componentDidMount()}catch(l){xt(t,n,l)}}var a=t.return;try{Aw(t)}catch(l){xt(t,a,l)}break;case 5:var i=t.return;try{Aw(t)}catch(l){xt(t,i,l)}}}catch(l){xt(t,t.return,l)}if(t===e){oe=null;break}var s=t.sibling;if(s!==null){s.return=t.return,oe=s;break}oe=t.return}}var xW=Math.ceil,fh=_a.ReactCurrentDispatcher,xC=_a.ReactCurrentOwner,Vo=_a.ReactCurrentBatchConfig,De=0,qt=null,kt=null,nr=0,fo=0,Tu=zi(0),_t=0,hf=null,Zs=0,Ph=0,yC=0,Qd=null,qr=null,wC=0,Uu=1/0,Ta=null,ph=!1,Ow=null,Fi=null,Fg=!1,Mi=null,mh=0,Zd=0,Fw=null,Wg=-1,jg=0;function Nr(){return De&6?bt():Wg!==-1?Wg:Wg=bt()}function _i(e){return e.mode&1?De&2&&nr!==0?nr&-nr:tW.transition!==null?(jg===0&&(jg=Fk()),jg):(e=We,e!==0||(e=window.event,e=e===void 0?16:Gk(e.type)),e):1}function wn(e,t,r,o){if(50<Zd)throw Zd=0,Fw=null,Error($(185));vf(e,r,o),(!(De&2)||e!==qt)&&(e===qt&&(!(De&2)&&(Ph|=r),_t===4&&Ti(e,nr)),Qr(e,o),r===1&&De===0&&!(t.mode&1)&&(Uu=bt()+500,Sh&&Gi()))}function Qr(e,t){var r=e.callbackNode;oG(e,t);var o=Qg(e,e===qt?nr:0);if(o===0)r!==null&&hT(r),e.callbackNode=null,e.callbackPriority=0;else if(t=o&-o,e.callbackPriority!==t){if(r!=null&&hT(r),t===1)e.tag===0?eW(uk.bind(null,e)):lM(uk.bind(null,e)),YG(function(){!(De&6)&&Gi()}),r=null;else{switch(_k(o)){case 1:r=$w;break;case 4:r=Nk;break;case 16:r=Yg;break;case 536870912:r=Ok;break;default:r=Yg}r=iE(r,JM.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function JM(e,t){if(Wg=-1,jg=0,De&6)throw Error($(327));var r=e.callbackNode;if(Nu()&&e.callbackNode!==r)return null;var o=Qg(e,e===qt?nr:0);if(o===0)return null;if(o&30||o&e.expiredLanes||t)t=gh(e,o);else{t=o;var n=De;De|=2;var a=tE();(qt!==e||nr!==t)&&(Ta=null,Uu=bt()+500,qs(e,t));do try{CW();break}catch(s){eE(e,s)}while(1);aC(),fh.current=a,De=n,kt!==null?t=0:(qt=null,nr=0,t=_t)}if(t!==0){if(t===2&&(n=uw(e),n!==0&&(o=n,t=_w(e,n))),t===1)throw r=hf,qs(e,0),Ti(e,o),Qr(e,bt()),r;if(t===6)Ti(e,o);else{if(n=e.current.alternate,!(o&30)&&!yW(n)&&(t=gh(e,o),t===2&&(a=uw(e),a!==0&&(o=a,t=_w(e,a))),t===1))throw r=hf,qs(e,0),Ti(e,o),Qr(e,bt()),r;switch(e.finishedWork=n,e.finishedLanes=o,t){case 0:case 1:throw Error($(345));case 2:Gs(e,qr,Ta);break;case 3:if(Ti(e,o),(o&130023424)===o&&(t=wC+500-bt(),10<t)){if(Qg(e,0)!==0)break;if(n=e.suspendedLanes,(n&o)!==o){Nr(),e.pingedLanes|=e.suspendedLanes&n;break}e.timeoutHandle=vw(Gs.bind(null,e,qr,Ta),t);break}Gs(e,qr,Ta);break;case 4:if(Ti(e,o),(o&4194240)===o)break;for(t=e.eventTimes,n=-1;0<o;){var i=31-yn(o);a=1<<i,i=t[i],i>n&&(n=i),o&=~a}if(o=n,o=bt()-o,o=(120>o?120:480>o?480:1080>o?1080:1920>o?1920:3e3>o?3e3:4320>o?4320:1960*xW(o/1960))-o,10<o){e.timeoutHandle=vw(Gs.bind(null,e,qr,Ta),o);break}Gs(e,qr,Ta);break;case 5:Gs(e,qr,Ta);break;default:throw Error($(329))}}}return Qr(e,bt()),e.callbackNode===r?JM.bind(null,e):null}function _w(e,t){var r=Qd;return e.current.memoizedState.isDehydrated&&(qs(e,t).flags|=256),e=gh(e,t),e!==2&&(t=qr,qr=r,t!==null&&Vw(t)),e}function Vw(e){qr===null?qr=e:qr.push.apply(qr,e)}function yW(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(!Cn(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 Ti(e,t){for(t&=~yC,t&=~Ph,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-yn(t),o=1<<r;e[r]=-1,t&=~o}}function uk(e){if(De&6)throw Error($(327));Nu();var t=Qg(e,0);if(!(t&1))return Qr(e,bt()),null;var r=gh(e,t);if(e.tag!==0&&r===2){var o=uw(e);o!==0&&(t=o,r=_w(e,o))}if(r===1)throw r=hf,qs(e,0),Ti(e,t),Qr(e,bt()),r;if(r===6)throw Error($(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Gs(e,qr,Ta),Qr(e,bt()),null}function CC(e,t){var r=De;De|=1;try{return e(t)}finally{De=r,De===0&&(Uu=bt()+500,Sh&&Gi())}}function Js(e){Mi!==null&&Mi.tag===0&&!(De&6)&&Nu();var t=De;De|=1;var r=Vo.transition,o=We;try{if(Vo.transition=null,We=1,e)return e()}finally{We=o,Vo.transition=r,De=t,!(De&6)&&Gi()}}function SC(){fo=Tu.current,rt(Tu)}function qs(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,XG(r)),kt!==null)for(r=kt.return;r!==null;){var o=r;switch(rC(o),o.tag){case 1:o=o.type.childContextTypes,o!=null&&rh();break;case 3:Bu(),rt(Xr),rt(vr),dC();break;case 5:cC(o);break;case 4:Bu();break;case 13:rt(ft);break;case 19:rt(ft);break;case 10:iC(o.type._context);break;case 22:case 23:SC()}r=r.return}if(qt=e,kt=e=Vi(e.current,null),nr=fo=t,_t=0,hf=null,yC=Ph=Zs=0,qr=Qd=null,js!==null){for(t=0;t<js.length;t++)if(r=js[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}js=null}return e}function eE(e,t){do{var r=kt;try{if(aC(),Ug.current=dh,ch){for(var o=pt.memoizedState;o!==null;){var n=o.queue;n!==null&&(n.pending=null),o=o.next}ch=!1}if(Qs=0,$t=Ft=pt=null,Xd=!1,pf=0,xC.current=null,r===null||r.return===null){_t=1,hf=t,kt=null;break}e:{var a=e,i=r.return,s=r,l=t;if(t=nr,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=YT(i);if(p!==null){p.flags&=-257,QT(p,i,s,a,t),p.mode&1&&XT(a,u,t),t=p,l=u;var g=t.updateQueue;if(g===null){var m=new Set;m.add(l),t.updateQueue=m}else g.add(l);break e}else{if(!(t&1)){XT(a,u,t),bC();break e}l=Error($(426))}}else if(st&&s.mode&1){var x=YT(i);if(x!==null){!(x.flags&65536)&&(x.flags|=256),QT(x,i,s,a,t),oC(Hu(l,s));break e}}a=l=Hu(l,s),_t!==4&&(_t=2),Qd===null?Qd=[a]:Qd.push(a),a=i;do{switch(a.tag){case 3:a.flags|=65536,t&=-t,a.lanes|=t;var h=_M(a,l,t);GT(a,h);break e;case 1:s=l;var v=a.type,y=a.stateNode;if(!(a.flags&128)&&(typeof v.getDerivedStateFromError=="function"||y!==null&&typeof y.componentDidCatch=="function"&&(Fi===null||!Fi.has(y)))){a.flags|=65536,t&=-t,a.lanes|=t;var w=VM(a,s,t);GT(a,w);break e}}a=a.return}while(a!==null)}oE(r)}catch(C){t=C,kt===r&&r!==null&&(kt=r=r.return);continue}break}while(1)}function tE(){var e=fh.current;return fh.current=dh,e===null?dh:e}function bC(){(_t===0||_t===3||_t===2)&&(_t=4),qt===null||!(Zs&268435455)&&!(Ph&268435455)||Ti(qt,nr)}function gh(e,t){var r=De;De|=2;var o=tE();(qt!==e||nr!==t)&&(Ta=null,qs(e,t));do try{wW();break}catch(n){eE(e,n)}while(1);if(aC(),De=r,fh.current=o,kt!==null)throw Error($(261));return qt=null,nr=0,_t}function wW(){for(;kt!==null;)rE(kt)}function CW(){for(;kt!==null&&!K5();)rE(kt)}function rE(e){var t=aE(e.alternate,e,fo);e.memoizedProps=e.pendingProps,t===null?oE(e):kt=t,xC.current=null}function oE(e){var t=e;do{var r=t.alternate;if(e=t.return,t.flags&32768){if(r=mW(r,t),r!==null){r.flags&=32767,kt=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{_t=6,kt=null;return}}else if(r=pW(r,t,fo),r!==null){kt=r;return}if(t=t.sibling,t!==null){kt=t;return}kt=t=e}while(t!==null);_t===0&&(_t=5)}function Gs(e,t,r){var o=We,n=Vo.transition;try{Vo.transition=null,We=1,SW(e,t,r,o)}finally{Vo.transition=n,We=o}return null}function SW(e,t,r,o){do Nu();while(Mi!==null);if(De&6)throw Error($(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($(177));e.callbackNode=null,e.callbackPriority=0;var a=r.lanes|r.childLanes;if(nG(e,a),e===qt&&(kt=qt=null,nr=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||Fg||(Fg=!0,iE(Yg,function(){return Nu(),null})),a=(r.flags&15990)!==0,r.subtreeFlags&15990||a){a=Vo.transition,Vo.transition=null;var i=We;We=1;var s=De;De|=4,xC.current=null,hW(e,r),QM(r,e),WG(gw),Zg=!!mw,gw=mw=null,e.current=r,vW(r,e,n),X5(),De=s,We=i,Vo.transition=a}else e.current=r;if(Fg&&(Fg=!1,Mi=e,mh=n),a=e.pendingLanes,a===0&&(Fi=null),Z5(r.stateNode,o),Qr(e,bt()),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(ph)throw ph=!1,e=Ow,Ow=null,e;return mh&1&&e.tag!==0&&Nu(),a=e.pendingLanes,a&1?e===Fw?Zd++:(Zd=0,Fw=e):Zd=0,Gi(),null}function Nu(){if(Mi!==null){var e=_k(mh),t=Vo.transition,r=We;try{if(Vo.transition=null,We=16>e?16:e,Mi===null)var o=!1;else{if(e=Mi,Mi=null,mh=0,De&6)throw Error($(331));var n=De;for(De|=4,oe=e.current;oe!==null;){var a=oe,i=a.child;if(oe.flags&16){var s=a.deletions;if(s!==null){for(var l=0;l<s.length;l++){var u=s[l];for(oe=u;oe!==null;){var c=oe;switch(c.tag){case 0:case 11:case 15:Yd(8,c,a)}var d=c.child;if(d!==null)d.return=c,oe=d;else for(;oe!==null;){c=oe;var f=c.sibling,p=c.return;if(KM(c),c===u){oe=null;break}if(f!==null){f.return=p,oe=f;break}oe=p}}}var g=a.alternate;if(g!==null){var m=g.child;if(m!==null){g.child=null;do{var x=m.sibling;m.sibling=null,m=x}while(m!==null)}}oe=a}}if(a.subtreeFlags&2064&&i!==null)i.return=a,oe=i;else e:for(;oe!==null;){if(a=oe,a.flags&2048)switch(a.tag){case 0:case 11:case 15:Yd(9,a,a.return)}var h=a.sibling;if(h!==null){h.return=a.return,oe=h;break e}oe=a.return}}var v=e.current;for(oe=v;oe!==null;){i=oe;var y=i.child;if(i.subtreeFlags&2064&&y!==null)y.return=i,oe=y;else e:for(i=v;oe!==null;){if(s=oe,s.flags&2048)try{switch(s.tag){case 0:case 11:case 15:Ih(9,s)}}catch(C){xt(s,s.return,C)}if(s===i){oe=null;break e}var w=s.sibling;if(w!==null){w.return=s.return,oe=w;break e}oe=s.return}}if(De=n,Gi(),na&&typeof na.onPostCommitFiberRoot=="function")try{na.onPostCommitFiberRoot(vh,e)}catch{}o=!0}return o}finally{We=r,Vo.transition=t}}return!1}function ck(e,t,r){t=Hu(r,t),t=_M(e,t,1),e=Oi(e,t,1),t=Nr(),e!==null&&(vf(e,1,t),Qr(e,t))}function xt(e,t,r){if(e.tag===3)ck(e,e,r);else for(;t!==null;){if(t.tag===3){ck(t,e,r);break}else if(t.tag===1){var o=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(Fi===null||!Fi.has(o))){e=Hu(r,e),e=VM(t,e,1),t=Oi(t,e,1),e=Nr(),t!==null&&(vf(t,1,e),Qr(t,e));break}}t=t.return}}function bW(e,t,r){var o=e.pingCache;o!==null&&o.delete(t),t=Nr(),e.pingedLanes|=e.suspendedLanes&r,qt===e&&(nr&r)===r&&(_t===4||_t===3&&(nr&130023424)===nr&&500>bt()-wC?qs(e,0):yC|=r),Qr(e,t)}function nE(e,t){t===0&&(e.mode&1?(t=Sg,Sg<<=1,!(Sg&130023424)&&(Sg=4194304)):t=1);var r=Nr();e=Oa(e,t),e!==null&&(vf(e,t,r),Qr(e,r))}function RW(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),nE(e,r)}function IW(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($(314))}o!==null&&o.delete(t),nE(e,r)}var aE;aE=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||Xr.current)Kr=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return Kr=!1,fW(e,t,r);Kr=!!(e.flags&131072)}else Kr=!1,st&&t.flags&1048576&&uM(t,ah,t.index);switch(t.lanes=0,t.tag){case 2:var o=t.type;Gg(e,t),e=t.pendingProps;var n=Fu(t,vr.current);Du(t,r),n=pC(null,t,o,e,n,r);var a=mC();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,Yr(o)?(a=!0,oh(t)):a=!1,t.memoizedState=n.state!==null&&n.state!==void 0?n.state:null,lC(t),n.updater=Rh,t.stateNode=n,n._reactInternals=t,Rw(t,o,e,r),t=Lw(null,t,o,!0,a,r)):(t.tag=0,st&&a&&tC(t),Dr(null,t,n,r),t=t.child),t;case 16:o=t.elementType;e:{switch(Gg(e,t),e=t.pendingProps,n=o._init,o=n(o._payload),t.type=o,n=t.tag=LW(o),e=hn(o,e),n){case 0:t=Pw(null,t,o,e,r);break e;case 1:t=ek(null,t,o,e,r);break e;case 11:t=ZT(null,t,o,e,r);break e;case 14:t=JT(null,t,o,hn(o.type,e),r);break e}throw Error($(306,o,""))}return t;case 0:return o=t.type,n=t.pendingProps,n=t.elementType===o?n:hn(o,n),Pw(e,t,o,n,r);case 1:return o=t.type,n=t.pendingProps,n=t.elementType===o?n:hn(o,n),ek(e,t,o,n,r);case 3:e:{if(zM(t),e===null)throw Error($(387));o=t.pendingProps,a=t.memoizedState,n=a.element,gM(e,t),lh(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=Hu(Error($(423)),t),t=tk(e,t,o,r,n);break e}else if(o!==n){n=Hu(Error($(424)),t),t=tk(e,t,o,r,n);break e}else for(po=Ni(t.stateNode.containerInfo.firstChild),mo=t,st=!0,xn=null,r=pM(t,null,o,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(_u(),o===n){t=Fa(e,t,r);break e}Dr(e,t,o,r)}t=t.child}return t;case 5:return hM(t),e===null&&Cw(t),o=t.type,n=t.pendingProps,a=e!==null?e.memoizedProps:null,i=n.children,hw(o,n)?i=null:a!==null&&hw(o,a)&&(t.flags|=32),UM(e,t),Dr(e,t,i,r),t.child;case 6:return e===null&&Cw(t),null;case 13:return GM(e,t,r);case 4:return uC(t,t.stateNode.containerInfo),o=t.pendingProps,e===null?t.child=Vu(t,null,o,r):Dr(e,t,o,r),t.child;case 11:return o=t.type,n=t.pendingProps,n=t.elementType===o?n:hn(o,n),ZT(e,t,o,n,r);case 7:return Dr(e,t,t.pendingProps,r),t.child;case 8:return Dr(e,t,t.pendingProps.children,r),t.child;case 12:return Dr(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,Qe(ih,o._currentValue),o._currentValue=i,a!==null)if(Cn(a.value,i)){if(a.children===n.children&&!Xr.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=Aa(-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),Sw(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($(341));i.lanes|=r,s=i.alternate,s!==null&&(s.lanes|=r),Sw(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}Dr(e,t,n.children,r),t=t.child}return t;case 9:return n=t.type,o=t.pendingProps.children,Du(t,r),n=Bo(n),o=o(n),t.flags|=1,Dr(e,t,o,r),t.child;case 14:return o=t.type,n=hn(o,t.pendingProps),n=hn(o.type,n),JT(e,t,o,n,r);case 15:return BM(e,t,t.type,t.pendingProps,r);case 17:return o=t.type,n=t.pendingProps,n=t.elementType===o?n:hn(o,n),Gg(e,t),t.tag=1,Yr(o)?(e=!0,oh(t)):e=!1,Du(t,r),FM(t,o,n),Rw(t,o,n,r),Lw(null,t,o,!0,e,r);case 19:return WM(e,t,r);case 22:return HM(e,t,r)}throw Error($(156,t.tag))};function iE(e,t){return Dk(e,t)}function PW(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 _o(e,t,r,o){return new PW(e,t,r,o)}function RC(e){return e=e.prototype,!(!e||!e.isReactComponent)}function LW(e){if(typeof e=="function")return RC(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Gw)return 11;if(e===Ww)return 14}return 2}function Vi(e,t){var r=e.alternate;return r===null?(r=_o(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 $g(e,t,r,o,n,a){var i=2;if(o=e,typeof e=="function")RC(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case xu:return Ks(r.children,n,a,t);case zw:i=8,n|=8;break;case K0:return e=_o(12,r,t,n|2),e.elementType=K0,e.lanes=a,e;case X0:return e=_o(13,r,t,n),e.elementType=X0,e.lanes=a,e;case Y0:return e=_o(19,r,t,n),e.elementType=Y0,e.lanes=a,e;case hk:return Lh(r,n,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case mk:i=10;break e;case gk:i=9;break e;case Gw:i=11;break e;case Ww:i=14;break e;case Ii:i=16,o=null;break e}throw Error($(130,e==null?e:typeof e,""))}return t=_o(i,r,t,n),t.elementType=e,t.type=o,t.lanes=a,t}function Ks(e,t,r,o){return e=_o(7,e,o,t),e.lanes=r,e}function Lh(e,t,r,o){return e=_o(22,e,o,t),e.elementType=hk,e.lanes=r,e.stateNode={isHidden:!1},e}function j0(e,t,r){return e=_o(6,e,null,t),e.lanes=r,e}function $0(e,t,r){return t=_o(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function TW(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=k0(0),this.expirationTimes=k0(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=k0(0),this.identifierPrefix=o,this.onRecoverableError=n,this.mutableSourceEagerHydrationData=null}function IC(e,t,r,o,n,a,i,s,l){return e=new TW(e,t,r,s,l),t===1?(t=1,a===!0&&(t|=8)):t=0,a=_o(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:o,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},lC(a),e}function kW(e,t,r){var o=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:vu,key:o==null?null:""+o,children:e,containerInfo:t,implementation:r}}function sE(e){if(!e)return Hi;e=e._reactInternals;e:{if(tl(e)!==e||e.tag!==1)throw Error($(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Yr(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error($(171))}if(e.tag===1){var r=e.type;if(Yr(r))return sM(e,r,t)}return t}function lE(e,t,r,o,n,a,i,s,l){return e=IC(r,o,!0,e,n,a,i,s,l),e.context=sE(null),r=e.current,o=Nr(),n=_i(r),a=Aa(o,n),a.callback=t??null,Oi(r,a,n),e.current.lanes=n,vf(e,n,o),Qr(e,o),e}function Th(e,t,r,o){var n=t.current,a=Nr(),i=_i(n);return r=sE(r),t.context===null?t.context=r:t.pendingContext=r,t=Aa(a,i),t.payload={element:e},o=o===void 0?null:o,o!==null&&(t.callback=o),e=Oi(n,t,i),e!==null&&(wn(e,n,i,a),Hg(e,n,i)),i}function hh(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 dk(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function PC(e,t){dk(e,t),(e=e.alternate)&&dk(e,t)}function MW(){return null}var uE=typeof reportError=="function"?reportError:function(e){console.error(e)};function LC(e){this._internalRoot=e}kh.prototype.render=LC.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error($(409));Th(e,t,null,null)};kh.prototype.unmount=LC.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Js(function(){Th(null,e,null,null)}),t[Na]=null}};function kh(e){this._internalRoot=e}kh.prototype.unstable_scheduleHydration=function(e){if(e){var t=Hk();e={blockedOn:null,target:e,priority:t};for(var r=0;r<Li.length&&t!==0&&t<Li[r].priority;r++);Li.splice(r,0,e),r===0&&zk(e)}};function TC(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Mh(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function fk(){}function EW(e,t,r,o,n){if(n){if(typeof o=="function"){var a=o;o=function(){var u=hh(i);a.call(u)}}var i=lE(t,o,e,0,null,!1,!1,"",fk);return e._reactRootContainer=i,e[Na]=i.current,lf(e.nodeType===8?e.parentNode:e),Js(),i}for(;n=e.lastChild;)e.removeChild(n);if(typeof o=="function"){var s=o;o=function(){var u=hh(l);s.call(u)}}var l=IC(e,0,!1,null,null,!1,!1,"",fk);return e._reactRootContainer=l,e[Na]=l.current,lf(e.nodeType===8?e.parentNode:e),Js(function(){Th(t,l,r,o)}),l}function Eh(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=hh(i);s.call(l)}}Th(t,i,e,n)}else i=EW(r,t,e,n,o);return hh(i)}Vk=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=zd(t.pendingLanes);r!==0&&(qw(t,r|1),Qr(t,bt()),!(De&6)&&(Uu=bt()+500,Gi()))}break;case 13:Js(function(){var o=Oa(e,1);if(o!==null){var n=Nr();wn(o,e,1,n)}}),PC(e,1)}};Kw=function(e){if(e.tag===13){var t=Oa(e,134217728);if(t!==null){var r=Nr();wn(t,e,134217728,r)}PC(e,134217728)}};Bk=function(e){if(e.tag===13){var t=_i(e),r=Oa(e,t);if(r!==null){var o=Nr();wn(r,e,t,o)}PC(e,t)}};Hk=function(){return We};Uk=function(e,t){var r=We;try{return We=e,t()}finally{We=r}};iw=function(e,t,r){switch(t){case"input":if(J0(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=Ch(o);if(!n)throw Error($(90));xk(o),J0(o,n)}}}break;case"textarea":wk(e,r);break;case"select":t=r.value,t!=null&&ku(e,!!r.multiple,t,!1)}};Lk=CC;Tk=Js;var AW={usingClientEntryPoint:!1,Events:[yf,Su,Ch,Ik,Pk,CC]},Vd={findFiberByHostInstance:Ws,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},DW={bundleType:Vd.bundleType,version:Vd.version,rendererPackageName:Vd.rendererPackageName,rendererConfig:Vd.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:_a.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Ek(e),e===null?null:e.stateNode},findFiberByHostInstance:Vd.findFiberByHostInstance||MW,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&(Bd=__REACT_DEVTOOLS_GLOBAL_HOOK__,!Bd.isDisabled&&Bd.supportsFiber))try{vh=Bd.inject(DW),na=Bd}catch{}var Bd;vo.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=AW;vo.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!TC(t))throw Error($(200));return kW(e,t,null,r)};vo.createRoot=function(e,t){if(!TC(e))throw Error($(299));var r=!1,o="",n=uE;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(o=t.identifierPrefix),t.onRecoverableError!==void 0&&(n=t.onRecoverableError)),t=IC(e,1,!1,null,null,r,!1,o,n),e[Na]=t.current,lf(e.nodeType===8?e.parentNode:e),new LC(t)};vo.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($(188)):(e=Object.keys(e).join(","),Error($(268,e)));return e=Ek(t),e=e===null?null:e.stateNode,e};vo.flushSync=function(e){return Js(e)};vo.hydrate=function(e,t,r){if(!Mh(t))throw Error($(200));return Eh(null,e,t,!0,r)};vo.hydrateRoot=function(e,t,r){if(!TC(e))throw Error($(405));var o=r!=null&&r.hydratedSources||null,n=!1,a="",i=uE;if(r!=null&&(r.unstable_strictMode===!0&&(n=!0),r.identifierPrefix!==void 0&&(a=r.identifierPrefix),r.onRecoverableError!==void 0&&(i=r.onRecoverableError)),t=lE(t,null,e,1,r??null,n,!1,a,i),e[Na]=t.current,lf(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 kh(t)};vo.render=function(e,t,r){if(!Mh(t))throw Error($(200));return Eh(null,e,t,!1,r)};vo.unmountComponentAtNode=function(e){if(!Mh(e))throw Error($(40));return e._reactRootContainer?(Js(function(){Eh(null,null,e,!1,function(){e._reactRootContainer=null,e[Na]=null})}),!0):!1};vo.unstable_batchedUpdates=CC;vo.unstable_renderSubtreeIntoContainer=function(e,t,r,o){if(!Mh(r))throw Error($(200));if(e==null||e._reactInternals===void 0)throw Error($(38));return Eh(e,t,r,!1,o)};vo.version="18.3.1-next-f1338f8080-20240426"});var Va=Zn(($te,fE)=>{"use strict";function dE(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(dE)}catch(e){console.error(e)}}dE(),fE.exports=cE()});var tA=Zn(eA=>{"use strict";var oc=M();function _$(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var V$=typeof Object.is=="function"?Object.is:_$,B$=oc.useState,H$=oc.useEffect,U$=oc.useLayoutEffect,z$=oc.useDebugValue;function G$(e,t){var r=t(),o=B$({inst:{value:r,getSnapshot:t}}),n=o[0].inst,a=o[1];return U$(function(){n.value=r,n.getSnapshot=t,ZC(n)&&a({inst:n})},[e,r,t]),H$(function(){return ZC(n)&&a({inst:n}),e(function(){ZC(n)&&a({inst:n})})},[e]),z$(r),r}function ZC(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!V$(e,r)}catch{return!0}}function W$(e,t){return t()}var j$=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?W$:G$;eA.useSyncExternalStore=oc.useSyncExternalStore!==void 0?oc.useSyncExternalStore:j$});var oA=Zn((rie,rA)=>{"use strict";rA.exports=tA()});var Ste={};J4(Ste,{Accordion:()=>XE,AccordionContent:()=>$C,AccordionItem:()=>WC,AccordionTrigger:()=>jC,Alert:()=>qC,AlertDescription:()=>XC,AlertTitle:()=>KC,AspectRatio:()=>QC,Avatar:()=>Gh,AvatarFallback:()=>Wh,AvatarGroup:()=>nS,AvatarImage:()=>oS,Badge:()=>_r,Breadcrumb:()=>iS,BreadcrumbEllipsis:()=>jh,BreadcrumbItem:()=>lS,BreadcrumbLink:()=>cS,BreadcrumbList:()=>sS,BreadcrumbPage:()=>dS,BreadcrumbSeparator:()=>uS,Button:()=>Ee,ButtonGroup:()=>YL,Card:()=>wb,CardCVCInput:()=>Ab,CardContent:()=>Rb,CardDescription:()=>bb,CardExpiryInput:()=>Eb,CardFooter:()=>Ib,CardHeader:()=>Cb,CardNumberInput:()=>Mb,CardTitle:()=>Sb,CardZipInput:()=>Db,Carousel:()=>Bb,CarouselContent:()=>Ub,CarouselItem:()=>Gb,CarouselNext:()=>jb,CarouselPrevious:()=>Wb,Checkbox:()=>Ix,CheckboxGroup:()=>Kb,CheckboxLabel:()=>nm,CheckboxWithLabel:()=>Xb,Collapsible:()=>zO,CollapsibleContent:()=>Jb,CollapsibleTrigger:()=>Zb,ColorPicker:()=>Zx,Command:()=>sy,CommandDialog:()=>dB,CommandEmpty:()=>eI,CommandGroup:()=>tI,CommandInput:()=>ZR,CommandItem:()=>oI,CommandList:()=>JR,CommandSeparator:()=>rI,CommandShortcut:()=>nI,DatePicker:()=>fy,DateRangePicker:()=>PI,DateTimePicker:()=>LI,Dialog:()=>ny,DialogClose:()=>lB,DialogContent:()=>Sm,DialogDescription:()=>iy,DialogFooter:()=>QR,DialogForm:()=>cB,DialogHeader:()=>ay,DialogTitle:()=>od,DialogTrigger:()=>sB,DraggableList:()=>AB,DropdownMenu:()=>zH,DropdownMenuCheckboxItem:()=>eP,DropdownMenuContent:()=>ZI,DropdownMenuGroup:()=>WH,DropdownMenuItem:()=>JI,DropdownMenuLabel:()=>rP,DropdownMenuPortal:()=>jH,DropdownMenuRadioGroup:()=>qH,DropdownMenuRadioItem:()=>tP,DropdownMenuSeparator:()=>oP,DropdownMenuShortcut:()=>nP,DropdownMenuSub:()=>$H,DropdownMenuSubContent:()=>QI,DropdownMenuSubTrigger:()=>YI,DropdownMenuTrigger:()=>GH,FileUpload:()=>iP,FreeBadge:()=>sU,GestureDrawer:()=>sP,GitHubStarButton:()=>AQ,GitHubStars:()=>QH,GradientPicker:()=>MV,Input:()=>ur,InputOTP:()=>cP,InputOTPGroup:()=>dP,InputOTPSeparator:()=>mP,InputOTPSlot:()=>pP,Kbd:()=>WL,Label:()=>Ur,LockedComponent:()=>gP,MonthPicker:()=>TI,MoonLogo:()=>yy,MoonLogoAnimated:()=>qQ,MoonLogoIcon:()=>$Q,MoonUIAccordion:()=>XE,MoonUIAccordionContent:()=>$C,MoonUIAccordionItem:()=>WC,MoonUIAccordionTrigger:()=>jC,MoonUIAlert:()=>qC,MoonUIAlertDescription:()=>XC,MoonUIAlertTitle:()=>KC,MoonUIAspectRatio:()=>QC,MoonUIAvatar:()=>Gh,MoonUIAvatarFallback:()=>Wh,MoonUIAvatarGroup:()=>nS,MoonUIAvatarImage:()=>oS,MoonUIBadge:()=>_r,MoonUIBreadcrumb:()=>iS,MoonUIBreadcrumbEllipsis:()=>jh,MoonUIBreadcrumbItem:()=>lS,MoonUIBreadcrumbLink:()=>cS,MoonUIBreadcrumbList:()=>sS,MoonUIBreadcrumbPage:()=>dS,MoonUIBreadcrumbSeparator:()=>uS,MoonUIButton:()=>Ee,MoonUIButtonGroup:()=>YL,MoonUICalendar:()=>Uc,MoonUICard:()=>wb,MoonUICardCVCInput:()=>Ab,MoonUICardContent:()=>Rb,MoonUICardDescription:()=>bb,MoonUICardExpiryInput:()=>Eb,MoonUICardFooter:()=>Ib,MoonUICardHeader:()=>Cb,MoonUICardNumberInput:()=>Mb,MoonUICardTitle:()=>Sb,MoonUICardZipInput:()=>Db,MoonUICarousel:()=>Bb,MoonUICarouselContent:()=>Ub,MoonUICarouselItem:()=>Gb,MoonUICarouselNext:()=>jb,MoonUICarouselPrevious:()=>Wb,MoonUICheckbox:()=>Ix,MoonUICheckboxGroup:()=>Kb,MoonUICheckboxLabel:()=>nm,MoonUICheckboxWithLabel:()=>Xb,MoonUICollapsible:()=>zO,MoonUICollapsibleContent:()=>Jb,MoonUICollapsibleTrigger:()=>Zb,MoonUIColorPicker:()=>Zx,MoonUICommand:()=>sy,MoonUICommandDialog:()=>dB,MoonUICommandEmpty:()=>eI,MoonUICommandGroup:()=>tI,MoonUICommandInput:()=>ZR,MoonUICommandItem:()=>oI,MoonUICommandList:()=>JR,MoonUICommandSeparator:()=>rI,MoonUICommandShortcut:()=>nI,MoonUIDataTableBasic:()=>kB,MoonUIDatePicker:()=>fy,MoonUIDateRangePicker:()=>PI,MoonUIDateTimePicker:()=>LI,MoonUIDialog:()=>ny,MoonUIDialogClose:()=>lB,MoonUIDialogContent:()=>Sm,MoonUIDialogDescription:()=>iy,MoonUIDialogFooter:()=>QR,MoonUIDialogHeader:()=>ay,MoonUIDialogTitle:()=>od,MoonUIDialogTrigger:()=>sB,MoonUIDraggableList:()=>AB,MoonUIDropdownMenu:()=>zH,MoonUIDropdownMenuCheckboxItem:()=>eP,MoonUIDropdownMenuContent:()=>ZI,MoonUIDropdownMenuGroup:()=>WH,MoonUIDropdownMenuItem:()=>JI,MoonUIDropdownMenuLabel:()=>rP,MoonUIDropdownMenuPortal:()=>jH,MoonUIDropdownMenuRadioGroup:()=>qH,MoonUIDropdownMenuRadioItem:()=>tP,MoonUIDropdownMenuSeparator:()=>oP,MoonUIDropdownMenuShortcut:()=>nP,MoonUIDropdownMenuSub:()=>$H,MoonUIDropdownMenuSubContent:()=>QI,MoonUIDropdownMenuSubTrigger:()=>YI,MoonUIDropdownMenuTrigger:()=>GH,MoonUIFileUpload:()=>iP,MoonUIFreeBadge:()=>sU,MoonUIGestureDrawer:()=>sP,MoonUIGitHubStars:()=>QH,MoonUIGradientPicker:()=>MV,MoonUIInput:()=>ur,MoonUIInputOTP:()=>cP,MoonUIInputOTPGroup:()=>dP,MoonUIInputOTPSeparator:()=>mP,MoonUIInputOTPSlot:()=>pP,MoonUIKbd:()=>WL,MoonUILabel:()=>Ur,MoonUILockedComponent:()=>gP,MoonUIMonthPicker:()=>TI,MoonUIMoonLogo:()=>yy,MoonUIPagination:()=>vP,MoonUIPaginationContent:()=>xP,MoonUIPaginationEllipsis:()=>SP,MoonUIPaginationItem:()=>yP,MoonUIPaginationLink:()=>Vm,MoonUIPaginationNext:()=>CP,MoonUIPaginationPrevious:()=>wP,MoonUIPhoneInput:()=>UP,MoonUIPopover:()=>wa,MoonUIPopoverContent:()=>Vn,MoonUIPopoverTrigger:()=>Ca,MoonUIProBadge:()=>iU,MoonUIProComponentWrapper:()=>aU,MoonUIProgress:()=>Fm,MoonUIRadioGroup:()=>zP,MoonUIRadioGroupItem:()=>Py,MoonUIRadioItemWithLabel:()=>GP,MoonUIRadioLabel:()=>Ly,MoonUIRating:()=>$L,MoonUIRichTextEditor:()=>ZU,MoonUIScrollArea:()=>YP,MoonUIScrollBar:()=>Oy,MoonUIScrollReveal:()=>QP,MoonUIScrollRevealContainer:()=>ZP,MoonUIScrollRevealItem:()=>JP,MoonUISelect:()=>nu,MoonUISelectContent:()=>iu,MoonUISelectGroup:()=>XU,MoonUISelectItem:()=>kr,MoonUISelectLabel:()=>BP,MoonUISelectScrollDownButton:()=>Iy,MoonUISelectScrollUpButton:()=>Ry,MoonUISelectSeparator:()=>HP,MoonUISelectTrigger:()=>au,MoonUISelectValue:()=>sd,MoonUISeparator:()=>To,MoonUISimpleColorPicker:()=>kV,MoonUISimpleEditor:()=>vL,MoonUISkeleton:()=>xi,MoonUISkeletonAvatar:()=>Gy,MoonUISkeletonCard:()=>yL,MoonUISkeletonText:()=>zy,MoonUISlider:()=>ba,MoonUISpinner:()=>KL,MoonUISwipeableCard:()=>wL,MoonUISwitch:()=>SL,MoonUITable:()=>Pm,MoonUITableBody:()=>Tm,MoonUITableCaption:()=>bI,MoonUITableCell:()=>nd,MoonUITableFooter:()=>SI,MoonUITableHead:()=>km,MoonUITableHeader:()=>Lm,MoonUITableRow:()=>Zl,MoonUITabs:()=>hm,MoonUITabsContent:()=>Xl,MoonUITabsList:()=>vm,MoonUITabsTrigger:()=>Kl,MoonUITagsInput:()=>bL,MoonUITextarea:()=>RL,MoonUIToast:()=>Qy,MoonUIToastAction:()=>HL,MoonUIToastClose:()=>Zy,MoonUIToastDescription:()=>e0,MoonUIToastProvider:()=>BL,MoonUIToastTitle:()=>Jy,MoonUIToastViewport:()=>Yy,MoonUIToaster:()=>jz,MoonUIToggle:()=>Km,MoonUIToggleGroup:()=>v1,MoonUIToggleGroupItem:()=>x1,MoonUITooltip:()=>Qm,MoonUITooltipContent:()=>hd,MoonUITooltipProvider:()=>Uy,MoonUITooltipTrigger:()=>Zm,Pagination:()=>vP,PaginationContent:()=>xP,PaginationEllipsis:()=>SP,PaginationItem:()=>yP,PaginationLink:()=>Vm,PaginationNext:()=>CP,PaginationPrevious:()=>wP,Palette:()=>sl,PhoneInput:()=>UP,Pipette:()=>qf,Popover:()=>wa,PopoverAnchor:()=>HK,PopoverClose:()=>UK,PopoverContent:()=>Vn,PopoverFooter:()=>lV,PopoverHeader:()=>sV,PopoverSeparator:()=>iV,PopoverTrigger:()=>Ca,ProBadge:()=>iU,ProComponentWrapper:()=>aU,Progress:()=>Fm,REGEXP_ONLY_CHARS:()=>oU,REGEXP_ONLY_DIGITS:()=>rU,REGEXP_ONLY_DIGITS_AND_CHARS:()=>nU,RadioGroup:()=>zP,RadioGroupItem:()=>Py,RadioItemWithLabel:()=>GP,RadioLabel:()=>Ly,Rating:()=>$L,RichTextEditor:()=>ZU,ScrollArea:()=>YP,ScrollBar:()=>Oy,ScrollReveal:()=>QP,ScrollRevealContainer:()=>ZP,ScrollRevealItem:()=>JP,Select:()=>nu,SelectContent:()=>iu,SelectGroup:()=>XU,SelectItem:()=>kr,SelectLabel:()=>BP,SelectScrollDownButton:()=>Iy,SelectScrollUpButton:()=>Ry,SelectSeparator:()=>HP,SelectTrigger:()=>au,SelectValue:()=>sd,Separator:()=>To,SimpleColorPicker:()=>kV,SimpleEditor:()=>vL,SimpleTooltip:()=>yz,Skeleton:()=>xi,SkeletonAvatar:()=>Gy,SkeletonCard:()=>yL,SkeletonText:()=>zy,Slider:()=>ba,Spinner:()=>KL,SwipeableCard:()=>wL,Switch:()=>SL,Table:()=>Pm,TableBody:()=>Tm,TableCaption:()=>bI,TableCell:()=>nd,TableFooter:()=>SI,TableHead:()=>km,TableHeader:()=>Lm,TableRow:()=>Zl,Tabs:()=>hm,TabsContent:()=>Xl,TabsList:()=>vm,TabsTrigger:()=>Kl,TagsInput:()=>bL,Textarea:()=>RL,Toast:()=>Qy,ToastAction:()=>HL,ToastClose:()=>Zy,ToastDescription:()=>e0,ToastProvider:()=>BL,ToastTitle:()=>Jy,ToastViewport:()=>Yy,Toaster:()=>jz,Toggle:()=>Km,ToggleGroup:()=>v1,ToggleGroupItem:()=>x1,Tooltip:()=>Qm,TooltipArrow:()=>hL,TooltipContent:()=>hd,TooltipProvider:()=>Uy,TooltipTrigger:()=>Zm,aspectRatioVariants:()=>JE,badgeVariants:()=>aS,buttonGroupVariants:()=>XL,buttonVariants:()=>np,carouselContentVariants:()=>Hb,carouselItemVariants:()=>zb,cn:()=>P,collapsibleContentVariants:()=>GO,collapsibleTriggerVariants:()=>Yb,format:()=>Wo,inputOTPSlotVariants:()=>fP,kbdVariants:()=>GL,moonUIBadgeVariants:()=>aS,moonUIButtonGroupVariants:()=>XL,moonUIButtonVariants:()=>np,moonUICarouselContentVariants:()=>Hb,moonUICarouselItemVariants:()=>zb,moonUICreateSortableHeader:()=>MB,moonUIInputOTPSlotVariants:()=>fP,moonUIKbdVariants:()=>GL,moonUIRatingVariants:()=>jL,moonUISkeletonVariants:()=>xL,moonUISpinnerVariants:()=>qL,moonUIToggleVariants:()=>qm,popoverContentVariants:()=>aV,progressVariants:()=>XH,ratingVariants:()=>jL,separatorVariants:()=>N3,skeletonVariants:()=>xL,spinnerVariants:()=>qL,switchVariants:()=>Lz,toast:()=>UL,toggleVariants:()=>qm,tooltipVariants:()=>xz,useCarousel:()=>zc,useToast:()=>zL});module.exports=e5(Ste);var zh=R(M());var Jr=R(M(),1);var Ao=R(M(),1),g0=R(N(),1);function G1(e,t){let r=Ao.createContext(t),o=a=>{let{children:i,...s}=a,l=Ao.useMemo(()=>s,Object.values(s));return(0,g0.jsx)(r.Provider,{value:l,children:i})};o.displayName=e+"Provider";function n(a){let i=Ao.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 Fe(e,t=[]){let r=[];function o(a,i){let s=Ao.createContext(i),l=r.length;r=[...r,i];let u=d=>{let{scope:f,children:p,...g}=d,m=f?.[e]?.[l]||s,x=Ao.useMemo(()=>g,Object.values(g));return(0,g0.jsx)(m.Provider,{value:x,children:p})};u.displayName=a+"Provider";function c(d,f){let p=f?.[e]?.[l]||s,g=Ao.useContext(p);if(g)return g;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=>Ao.createContext(i));return function(s){let l=s?.[e]||a;return Ao.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return n.scopeName=e,[o,S5(n,...t)]}function S5(...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 Ao.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return r.scopeName=t.scopeName,r}var Si=R(M(),1);var j1=R(M(),1);function W1(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function uo(...e){return t=>{let r=!1,o=e.map(n=>{let a=W1(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():W1(e[n],null)}}}}function de(...e){return j1.useCallback(uo(...e),e)}var Ot=R(M(),1);var mu=R(N(),1);function co(e){let t=b5(e),r=Ot.forwardRef((o,n)=>{let{children:a,...i}=o,s=Ot.Children.toArray(a),l=s.find(R5);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,mu.jsx)(t,{...i,ref:n,children:Ot.isValidElement(u)?Ot.cloneElement(u,void 0,c):null})}return(0,mu.jsx)(t,{...i,ref:n,children:a})});return r.displayName=`${e}.Slot`,r}function b5(e){let t=Ot.forwardRef((r,o)=>{let{children:n,...a}=r;if(Ot.isValidElement(n)){let i=P5(n),s=I5(a,n.props);return n.type!==Ot.Fragment&&(s.ref=o?uo(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 $1=Symbol("radix.slottable");function q1(e){let t=({children:r})=>(0,mu.jsx)(mu.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=$1,t}function R5(e){return Ot.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===$1}function I5(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 P5(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 dg=R(N(),1),L5=R(M(),1);var T5=R(N(),1);function Jn(e){let t=e+"CollectionProvider",[r,o]=Fe(t),[n,a]=r(t,{collectionRef:{current:null},itemMap:new Map}),i=m=>{let{scope:x,children:h}=m,v=Si.default.useRef(null),y=Si.default.useRef(new Map).current;return(0,dg.jsx)(n,{scope:x,itemMap:y,collectionRef:v,children:h})};i.displayName=t;let s=e+"CollectionSlot",l=co(s),u=Si.default.forwardRef((m,x)=>{let{scope:h,children:v}=m,y=a(s,h),w=de(x,y.collectionRef);return(0,dg.jsx)(l,{ref:w,children:v})});u.displayName=s;let c=e+"CollectionItemSlot",d="data-radix-collection-item",f=co(c),p=Si.default.forwardRef((m,x)=>{let{scope:h,children:v,...y}=m,w=Si.default.useRef(null),C=de(x,w),b=a(c,h);return Si.default.useEffect(()=>(b.itemMap.set(w,{ref:w,...y}),()=>void b.itemMap.delete(w))),(0,dg.jsx)(f,{[d]:"",ref:C,children:v})});p.displayName=c;function g(m){let x=a(e+"CollectionConsumer",m);return Si.default.useCallback(()=>{let v=x.collectionRef.current;if(!v)return[];let y=Array.from(v.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},g,o]}var _te=!!(typeof window<"u"&&window.document&&window.document.createElement);function W(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(e?.(n),r===!1||!n.defaultPrevented)return t?.(n)}}var Do=R(M(),1);var K1=R(M(),1),Ve=globalThis?.document?K1.useLayoutEffect:()=>{};var fg=R(M(),1);var k5=Do[" useInsertionEffect ".trim().toString()]||Ve;function qe({prop:e,defaultProp:t,onChange:r=()=>{},caller:o}){let[n,a,i]=M5({defaultProp:t,onChange:r}),s=e!==void 0,l=s?e:n;{let c=Do.useRef(e!==void 0);Do.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=Do.useCallback(c=>{if(s){let d=E5(c)?c(e):c;d!==e&&i.current?.(d)}else a(c)},[s,e,a,i]);return[l,u]}function M5({defaultProp:e,onChange:t}){let[r,o]=Do.useState(e),n=Do.useRef(r),a=Do.useRef(t);return k5(()=>{a.current=t},[t]),Do.useEffect(()=>{n.current!==r&&(a.current?.(r),n.current=r)},[r,n]),[r,o,a]}function E5(e){return typeof e=="function"}var Ute=Symbol("RADIX:SYNC_STATE");var pE=R(M(),1),mE=R(Va(),1);var gE=R(N(),1),NW=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],q=NW.reduce((e,t)=>{let r=co(`Primitive.${t}`),o=pE.forwardRef((n,a)=>{let{asChild:i,...s}=n,l=i?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,gE.jsx)(l,{...s,ref:a})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function Wu(e,t){e&&mE.flushSync(()=>e.dispatchEvent(t))}var ir=R(M(),1);var Zr=R(M(),1);var hE=R(M(),1);function OW(e,t){return hE.useReducer((r,o)=>t[r][o]??r,e)}var lt=e=>{let{present:t,children:r}=e,o=FW(t),n=typeof r=="function"?r({present:o.isPresent}):Zr.Children.only(r),a=de(o.ref,_W(n));return typeof r=="function"||o.isPresent?Zr.cloneElement(n,{ref:a}):null};lt.displayName="Presence";function FW(e){let[t,r]=Zr.useState(),o=Zr.useRef(null),n=Zr.useRef(e),a=Zr.useRef("none"),i=e?"mounted":"unmounted",[s,l]=OW(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return Zr.useEffect(()=>{let u=Ah(o.current);a.current=s==="mounted"?u:"none"},[s]),Ve(()=>{let u=o.current,c=n.current;if(c!==e){let f=a.current,p=Ah(u);e?l("MOUNT"):p==="none"||u?.display==="none"?l("UNMOUNT"):l(c&&f!==p?"ANIMATION_OUT":"UNMOUNT"),n.current=e}},[e,l]),Ve(()=>{if(t){let u,c=t.ownerDocument.defaultView??window,d=p=>{let m=Ah(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=Ah(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:Zr.useCallback(u=>{o.current=u?getComputedStyle(u):null,r(u)},[])}}function Ah(e){return e?.animationName||"none"}function _W(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 kC=R(M(),1);var VW=kC[" useId ".trim().toString()]||(()=>{}),BW=0;function Ne(e){let[t,r]=kC.useState(VW());return Ve(()=>{e||r(o=>o??String(BW++))},[e]),e||(t?`radix-${t}`:"")}var rl=R(N(),1),Dh="Collapsible",[HW,MC]=Fe(Dh),[UW,EC]=HW(Dh),vE=ir.forwardRef((e,t)=>{let{__scopeCollapsible:r,open:o,defaultOpen:n,disabled:a,onOpenChange:i,...s}=e,[l,u]=qe({prop:o,defaultProp:n??!1,onChange:i,caller:Dh});return(0,rl.jsx)(UW,{scope:r,disabled:a,contentId:Ne(),open:l,onOpenToggle:ir.useCallback(()=>u(c=>!c),[u]),children:(0,rl.jsx)(q.div,{"data-state":DC(l),"data-disabled":a?"":void 0,...s,ref:t})})});vE.displayName=Dh;var xE="CollapsibleTrigger",yE=ir.forwardRef((e,t)=>{let{__scopeCollapsible:r,...o}=e,n=EC(xE,r);return(0,rl.jsx)(q.button,{type:"button","aria-controls":n.contentId,"aria-expanded":n.open||!1,"data-state":DC(n.open),"data-disabled":n.disabled?"":void 0,disabled:n.disabled,...o,ref:t,onClick:W(e.onClick,n.onOpenToggle)})});yE.displayName=xE;var AC="CollapsibleContent",wE=ir.forwardRef((e,t)=>{let{forceMount:r,...o}=e,n=EC(AC,e.__scopeCollapsible);return(0,rl.jsx)(lt,{present:r||n.open,children:({present:a})=>(0,rl.jsx)(zW,{...o,ref:t,present:a})})});wE.displayName=AC;var zW=ir.forwardRef((e,t)=>{let{__scopeCollapsible:r,present:o,children:n,...a}=e,i=EC(AC,r),[s,l]=ir.useState(o),u=ir.useRef(null),c=de(t,u),d=ir.useRef(0),f=d.current,p=ir.useRef(0),g=p.current,m=i.open||s,x=ir.useRef(m),h=ir.useRef(void 0);return ir.useEffect(()=>{let v=requestAnimationFrame(()=>x.current=!1);return()=>cancelAnimationFrame(v)},[]),Ve(()=>{let v=u.current;if(v){h.current=h.current||{transitionDuration:v.style.transitionDuration,animationName:v.style.animationName},v.style.transitionDuration="0s",v.style.animationName="none";let y=v.getBoundingClientRect();d.current=y.height,p.current=y.width,x.current||(v.style.transitionDuration=h.current.transitionDuration,v.style.animationName=h.current.animationName),l(o)}},[i.open,o]),(0,rl.jsx)(q.div,{"data-state":DC(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":g?`${g}px`:void 0,...e.style},children:m&&n})});function DC(e){return e?"open":"closed"}var Nh=vE,ju=yE,Cf=wE;var Oh=R(M(),1),GW=R(N(),1),WW=Oh.createContext(void 0);function ia(e){let t=Oh.useContext(WW);return e||t||"ltr"}var Vt=R(N(),1),Sn="Accordion",jW=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[OC,$W,qW]=Jn(Sn),[_h,xre]=Fe(Sn,[qW,MC]),FC=MC(),SE=Jr.default.forwardRef((e,t)=>{let{type:r,...o}=e,n=o,a=o;return(0,Vt.jsx)(OC.Provider,{scope:e.__scopeAccordion,children:r==="multiple"?(0,Vt.jsx)(QW,{...a,ref:t}):(0,Vt.jsx)(YW,{...n,ref:t})})});SE.displayName=Sn;var[bE,KW]=_h(Sn),[RE,XW]=_h(Sn,{collapsible:!1}),YW=Jr.default.forwardRef((e,t)=>{let{value:r,defaultValue:o,onValueChange:n=()=>{},collapsible:a=!1,...i}=e,[s,l]=qe({prop:r,defaultProp:o??"",onChange:n,caller:Sn});return(0,Vt.jsx)(bE,{scope:e.__scopeAccordion,value:Jr.default.useMemo(()=>s?[s]:[],[s]),onItemOpen:l,onItemClose:Jr.default.useCallback(()=>a&&l(""),[a,l]),children:(0,Vt.jsx)(RE,{scope:e.__scopeAccordion,collapsible:a,children:(0,Vt.jsx)(IE,{...i,ref:t})})})}),QW=Jr.default.forwardRef((e,t)=>{let{value:r,defaultValue:o,onValueChange:n=()=>{},...a}=e,[i,s]=qe({prop:r,defaultProp:o??[],onChange:n,caller:Sn}),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,Vt.jsx)(bE,{scope:e.__scopeAccordion,value:i,onItemOpen:l,onItemClose:u,children:(0,Vt.jsx)(RE,{scope:e.__scopeAccordion,collapsible:!0,children:(0,Vt.jsx)(IE,{...a,ref:t})})})}),[ZW,Vh]=_h(Sn),IE=Jr.default.forwardRef((e,t)=>{let{__scopeAccordion:r,disabled:o,dir:n,orientation:a="vertical",...i}=e,s=Jr.default.useRef(null),l=de(s,t),u=$W(r),d=ia(n)==="ltr",f=W(e.onKeyDown,p=>{if(!jW.includes(p.key))return;let g=p.target,m=u().filter(I=>!I.ref.current?.disabled),x=m.findIndex(I=>I.ref.current===g),h=m.length;if(x===-1)return;p.preventDefault();let v=x,y=0,w=h-1,C=()=>{v=x+1,v>w&&(v=y)},b=()=>{v=x-1,v<y&&(v=w)};switch(p.key){case"Home":v=y;break;case"End":v=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=v%h;m[S].ref.current?.focus()});return(0,Vt.jsx)(ZW,{scope:r,disabled:o,direction:n,orientation:a,children:(0,Vt.jsx)(OC.Slot,{scope:r,children:(0,Vt.jsx)(q.div,{...i,"data-orientation":a,ref:l,onKeyDown:o?void 0:f})})})}),Fh="AccordionItem",[JW,_C]=_h(Fh),PE=Jr.default.forwardRef((e,t)=>{let{__scopeAccordion:r,value:o,...n}=e,a=Vh(Fh,r),i=KW(Fh,r),s=FC(r),l=Ne(),u=o&&i.value.includes(o)||!1,c=a.disabled||e.disabled;return(0,Vt.jsx)(JW,{scope:r,open:u,disabled:c,triggerId:l,children:(0,Vt.jsx)(Nh,{"data-orientation":a.orientation,"data-state":AE(u),...s,...n,ref:t,disabled:c,open:u,onOpenChange:d=>{d?i.onItemOpen(o):i.onItemClose(o)}})})});PE.displayName=Fh;var LE="AccordionHeader",TE=Jr.default.forwardRef((e,t)=>{let{__scopeAccordion:r,...o}=e,n=Vh(Sn,r),a=_C(LE,r);return(0,Vt.jsx)(q.h3,{"data-orientation":n.orientation,"data-state":AE(a.open),"data-disabled":a.disabled?"":void 0,...o,ref:t})});TE.displayName=LE;var NC="AccordionTrigger",kE=Jr.default.forwardRef((e,t)=>{let{__scopeAccordion:r,...o}=e,n=Vh(Sn,r),a=_C(NC,r),i=XW(NC,r),s=FC(r);return(0,Vt.jsx)(OC.ItemSlot,{scope:r,children:(0,Vt.jsx)(ju,{"aria-disabled":a.open&&!i.collapsible||void 0,"data-orientation":n.orientation,id:a.triggerId,...s,...o,ref:t})})});kE.displayName=NC;var ME="AccordionContent",EE=Jr.default.forwardRef((e,t)=>{let{__scopeAccordion:r,...o}=e,n=Vh(Sn,r),a=_C(ME,r),i=FC(r);return(0,Vt.jsx)(Cf,{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}})});EE.displayName=ME;function AE(e){return e?"open":"closed"}var DE=SE,NE=PE,OE=TE,VC=kE,BC=EE;var Hh=R(M());var FE=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),tj=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,o)=>o?o.toUpperCase():r.toLowerCase()),HC=e=>{let t=tj(e);return t.charAt(0).toUpperCase()+t.slice(1)},Bh=(...e)=>e.filter((t,r,o)=>!!t&&t.trim()!==""&&o.indexOf(t)===r).join(" ").trim(),_E=e=>{for(let t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var Sf=R(M());var VE={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 BE=(0,Sf.forwardRef)(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:o,className:n="",children:a,iconNode:i,...s},l)=>(0,Sf.createElement)("svg",{ref:l,...VE,width:t,height:t,stroke:e,strokeWidth:o?Number(r)*24/Number(t):r,className:Bh("lucide",n),...!a&&!_E(s)&&{"aria-hidden":"true"},...s},[...i.map(([u,c])=>(0,Sf.createElement)(u,c)),...Array.isArray(a)?a:[a]]));var H=(e,t)=>{let r=(0,Hh.forwardRef)(({className:o,...n},a)=>(0,Hh.createElement)(BE,{ref:a,iconNode:t,className:Bh(`lucide-${FE(HC(e))}`,`lucide-${e}`,o),...n}));return r.displayName=HC(e),r};var rj=[["path",{d:"M17 12H7",key:"16if0g"}],["path",{d:"M19 18H5",key:"18s9l3"}],["path",{d:"M21 6H3",key:"1jwq7v"}]],bf=H("align-center",rj);var oj=[["path",{d:"M3 12h18",key:"1i2n21"}],["path",{d:"M3 18h18",key:"1h113x"}],["path",{d:"M3 6h18",key:"d0wm0j"}]],Rf=H("align-justify",oj);var nj=[["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M17 18H3",key:"1amg6g"}],["path",{d:"M21 6H3",key:"1jwq7v"}]],If=H("align-left",nj);var aj=[["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M21 18H7",key:"1ygte8"}],["path",{d:"M21 6H3",key:"1jwq7v"}]],Pf=H("align-right",aj);var ij=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],$u=H("arrow-down",ij);var sj=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],Lf=H("arrow-left",sj);var lj=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Tf=H("arrow-right",lj);var uj=[["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"}]],qu=H("arrow-up-down",uj);var cj=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],Ku=H("arrow-up",cj);var dj=[["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"}]],kf=H("bold",dj);var fj=[["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"}]],ol=H("calendar",fj);var pj=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],xr=H("check",pj);var mj=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],sa=H("chevron-down",mj);var gj=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],bn=H("chevron-left",gj);var hj=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Fr=H("chevron-right",hj);var vj=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Mf=H("chevron-up",vj);var xj=[["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"}]],Rn=H("circle-alert",xj);var yj=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],Wi=H("circle-check-big",yj);var wj=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],nl=H("circle",wj);var Cj=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Ef=H("clock",Cj);var Sj=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],Af=H("code",Sj);var bj=[["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"}]],Df=H("copy",bj);var Rj=[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]],Nf=H("credit-card",Rj);var Ij=[["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"}]],Xu=H("crown",Ij);var Pj=[["circle",{cx:"12.1",cy:"12.1",r:"1",key:"18d7e5"}]],Of=H("dot",Pj);var Lj=[["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"}]],la=H("ellipsis",Lj);var Tj=[["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"}]],Ff=H("external-link",Tj);var kj=[["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"}]],al=H("eye",kj);var Mj=[["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"}]],_f=H("file-text",Mj);var Ej=[["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"}]],Vf=H("file",Ej);var Aj=[["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"}]],Bf=H("git-fork",Aj);var Dj=[["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"}]],il=H("image",Dj);var Nj=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],Yu=H("info",Nj);var Oj=[["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"}]],Hf=H("italic",Oj);var Fj=[["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"}]],Uf=H("link",Fj);var _j=[["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"}]],zf=H("list-ordered",_j);var Vj=[["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"}]],Gf=H("list",Vj);var Bj=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Bt=H("loader-circle",Bj);var Hj=[["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"}]],Qu=H("lock",Hj);var Uj=[["path",{d:"M5 12h14",key:"1ays0h"}]],Wf=H("minus",Uj);var zj=[["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"}]],jf=H("music",zj);var Gj=[["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"}]],sl=H("palette",Gj);var Wj=[["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"}]],$f=H("phone",Wj);var jj=[["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"}]],qf=H("pipette",jj);var $j=[["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"}]],Kf=H("quote",$j);var qj=[["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"}]],Xf=H("redo",qj);var Kj=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],ll=H("search",Kj);var Xj=[["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"}]],eo=H("square-pen",Xj);var Yj=[["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"}]],ji=H("star",Yj);var Qj=[["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"}]],Yf=H("strikethrough",Qj);var Zj=[["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"}]],$i=H("triangle-alert",Zj);var Jj=[["path",{d:"M6 4v6a6 6 0 0 0 12 0V4",key:"9kb039"}],["line",{x1:"4",x2:"20",y1:"20",y2:"20",key:"nun2al"}]],Qf=H("underline",Jj);var e$=[["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"}]],Zf=H("undo",e$);var t$=[["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"}]],Jf=H("upload",t$);var r$=[["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"}]],ep=H("video",r$);var o$=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],xo=H("x",o$);var n$=[["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"}]],Zu=H("zap",n$);function HE(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=HE(e[t]))&&(o&&(o+=" "),o+=r)}else for(r in e)e[r]&&(o&&(o+=" "),o+=r);return o}function Uh(){for(var e,t,r=0,o="",n=arguments.length;r<n;r++)(e=arguments[r])&&(t=HE(e))&&(o&&(o+=" "),o+=t);return o}var GC="-",a$=e=>{let t=s$(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:i=>{let s=i.split(GC);return s[0]===""&&s.length!==1&&s.shift(),GE(s,t)||i$(i)},getConflictingClassGroupIds:(i,s)=>{let l=r[i]||[];return s&&o[i]?[...l,...o[i]]:l}}},GE=(e,t)=>{if(e.length===0)return t.classGroupId;let r=e[0],o=t.nextPart.get(r),n=o?GE(e.slice(1),o):void 0;if(n)return n;if(t.validators.length===0)return;let a=e.join(GC);return t.validators.find(({validator:i})=>i(a))?.classGroupId},UE=/^\[(.+)\]$/,i$=e=>{if(UE.test(e)){let t=UE.exec(e)[1],r=t?.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},s$=e=>{let{theme:t,prefix:r}=e,o={nextPart:new Map,validators:[]};return u$(Object.entries(e.classGroups),r).forEach(([a,i])=>{zC(i,o,a,t)}),o},zC=(e,t,r,o)=>{e.forEach(n=>{if(typeof n=="string"){let a=n===""?t:zE(t,n);a.classGroupId=r;return}if(typeof n=="function"){if(l$(n)){zC(n(o),t,r,o);return}t.validators.push({validator:n,classGroupId:r});return}Object.entries(n).forEach(([a,i])=>{zC(i,zE(t,a),r,o)})})},zE=(e,t)=>{let r=e;return t.split(GC).forEach(o=>{r.nextPart.has(o)||r.nextPart.set(o,{nextPart:new Map,validators:[]}),r=r.nextPart.get(o)}),r},l$=e=>e.isThemeGetter,u$=(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,c$=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)}}},WE="!",d$=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 h=s[x];if(u===0){if(h===n&&(o||s.slice(x,x+a)===t)){l.push(s.slice(c,x)),c=x+a;continue}if(h==="/"){d=x;continue}}h==="["?u++:h==="]"&&u--}let f=l.length===0?s:s.substring(c),p=f.startsWith(WE),g=p?f.substring(1):f,m=d&&d>c?d-c:void 0;return{modifiers:l,hasImportantModifier:p,baseClassName:g,maybePostfixModifierPosition:m}};return r?s=>r({className:s,parseClassName:i}):i},f$=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},p$=e=>({cache:c$(e.cacheSize),parseClassName:d$(e),...a$(e)}),m$=/\s+/,g$=(e,t)=>{let{parseClassName:r,getClassGroupId:o,getConflictingClassGroupIds:n}=t,a=[],i=e.trim().split(m$),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),g=!!p,m=o(g?f.substring(0,p):f);if(!m){if(!g){s=u+(s.length>0?" "+s:s);continue}if(m=o(f),!m){s=u+(s.length>0?" "+s:s);continue}g=!1}let x=f$(c).join(":"),h=d?x+WE:x,v=h+m;if(a.includes(v))continue;a.push(v);let y=n(m,g);for(let w=0;w<y.length;++w){let C=y[w];a.push(h+C)}s=u+(s.length>0?" "+s:s)}return s};function h$(){let e=0,t,r,o="";for(;e<arguments.length;)(t=arguments[e++])&&(r=jE(t))&&(o&&(o+=" "),o+=r);return o}var jE=e=>{if(typeof e=="string")return e;let t,r="";for(let o=0;o<e.length;o++)e[o]&&(t=jE(e[o]))&&(r&&(r+=" "),r+=t);return r};function v$(e,...t){let r,o,n,a=i;function i(l){let u=t.reduce((c,d)=>d(c),e());return r=p$(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=g$(l,r);return n(l,c),c}return function(){return a(h$.apply(null,arguments))}}var ot=e=>{let t=r=>r[e]||[];return t.isThemeGetter=!0,t},$E=/^\[(?:([a-z-]+):)?(.+)\]$/i,x$=/^\d+\/\d+$/,y$=new Set(["px","full","screen"]),w$=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,C$=/\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$/,S$=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,b$=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,R$=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ba=e=>Ju(e)||y$.has(e)||x$.test(e),qi=e=>ec(e,"length",A$),Ju=e=>!!e&&!Number.isNaN(Number(e)),UC=e=>ec(e,"number",Ju),tp=e=>!!e&&Number.isInteger(Number(e)),I$=e=>e.endsWith("%")&&Ju(e.slice(0,-1)),Pe=e=>$E.test(e),Ki=e=>w$.test(e),P$=new Set(["length","size","percentage"]),L$=e=>ec(e,P$,qE),T$=e=>ec(e,"position",qE),k$=new Set(["image","url"]),M$=e=>ec(e,k$,N$),E$=e=>ec(e,"",D$),rp=()=>!0,ec=(e,t,r)=>{let o=$E.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):r(o[2]):!1},A$=e=>C$.test(e)&&!S$.test(e),qE=()=>!1,D$=e=>b$.test(e),N$=e=>R$.test(e);var O$=()=>{let e=ot("colors"),t=ot("spacing"),r=ot("blur"),o=ot("brightness"),n=ot("borderColor"),a=ot("borderRadius"),i=ot("borderSpacing"),s=ot("borderWidth"),l=ot("contrast"),u=ot("grayscale"),c=ot("hueRotate"),d=ot("invert"),f=ot("gap"),p=ot("gradientColorStops"),g=ot("gradientColorStopPositions"),m=ot("inset"),x=ot("margin"),h=ot("opacity"),v=ot("padding"),y=ot("saturate"),w=ot("scale"),C=ot("sepia"),b=ot("skew"),S=ot("space"),I=ot("translate"),L=()=>["auto","contain","none"],T=()=>["auto","hidden","clip","visible","scroll"],k=()=>["auto",Pe,t],E=()=>[Pe,t],_=()=>["",Ba,qi],D=()=>["auto",Ju,Pe],z=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],F=()=>["solid","dashed","dotted","double","none"],O=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],B=()=>["start","end","center","between","around","evenly","stretch"],A=()=>["","0",Pe],te=()=>["auto","avoid","all","avoid-page","page","left","right","column"],ae=()=>[Ju,Pe];return{cacheSize:500,separator:":",theme:{colors:[rp],spacing:[Ba,qi],blur:["none","",Ki,Pe],brightness:ae(),borderColor:[e],borderRadius:["none","","full",Ki,Pe],borderSpacing:E(),borderWidth:_(),contrast:ae(),grayscale:A(),hueRotate:ae(),invert:A(),gap:E(),gradientColorStops:[e],gradientColorStopPositions:[I$,qi],inset:k(),margin:k(),opacity:ae(),padding:E(),saturate:ae(),scale:ae(),sepia:A(),skew:ae(),space:E(),translate:E()},classGroups:{aspect:[{aspect:["auto","square","video",Pe]}],container:["container"],columns:[{columns:[Ki]}],"break-after":[{"break-after":te()}],"break-before":[{"break-before":te()}],"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:[...z(),Pe]}],overflow:[{overflow:T()}],"overflow-x":[{"overflow-x":T()}],"overflow-y":[{"overflow-y":T()}],overscroll:[{overscroll:L()}],"overscroll-x":[{"overscroll-x":L()}],"overscroll-y":[{"overscroll-y":L()}],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",tp,Pe]}],basis:[{basis:k()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Pe]}],grow:[{grow:A()}],shrink:[{shrink:A()}],order:[{order:["first","last","none",tp,Pe]}],"grid-cols":[{"grid-cols":[rp]}],"col-start-end":[{col:["auto",{span:["full",tp,Pe]},Pe]}],"col-start":[{"col-start":D()}],"col-end":[{"col-end":D()}],"grid-rows":[{"grid-rows":[rp]}],"row-start-end":[{row:["auto",{span:[tp,Pe]},Pe]}],"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",Pe]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Pe]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...B()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...B(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...B(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[v]}],px:[{px:[v]}],py:[{py:[v]}],ps:[{ps:[v]}],pe:[{pe:[v]}],pt:[{pt:[v]}],pr:[{pr:[v]}],pb:[{pb:[v]}],pl:[{pl:[v]}],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",Pe,t]}],"min-w":[{"min-w":[Pe,t,"min","max","fit"]}],"max-w":[{"max-w":[Pe,t,"none","full","min","max","fit","prose",{screen:[Ki]},Ki]}],h:[{h:[Pe,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Pe,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Pe,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Pe,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Ki,qi]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",UC]}],"font-family":[{font:[rp]}],"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",Pe]}],"line-clamp":[{"line-clamp":["none",Ju,UC]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Ba,Pe]}],"list-image":[{"list-image":["none",Pe]}],"list-style-type":[{list:["none","disc","decimal",Pe]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[h]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[h]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...F(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Ba,qi]}],"underline-offset":[{"underline-offset":["auto",Ba,Pe]}],"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:E()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Pe]}],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",Pe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[h]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...z(),T$]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",L$]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},M$]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[g]}],"gradient-via-pos":[{via:[g]}],"gradient-to-pos":[{to:[g]}],"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":[h]}],"border-style":[{border:[...F(),"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":[h]}],"divide-style":[{divide:F()}],"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:["",...F()]}],"outline-offset":[{"outline-offset":[Ba,Pe]}],"outline-w":[{outline:[Ba,qi]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:_()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[h]}],"ring-offset-w":[{"ring-offset":[Ba,qi]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Ki,E$]}],"shadow-color":[{shadow:[rp]}],opacity:[{opacity:[h]}],"mix-blend":[{"mix-blend":[...O(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":O()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[o]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Ki,Pe]}],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":[h]}],"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",Pe]}],duration:[{duration:ae()}],ease:[{ease:["linear","in","out","in-out",Pe]}],delay:[{delay:ae()}],animate:[{animate:["none","spin","ping","pulse","bounce",Pe]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[w]}],"scale-x":[{"scale-x":[w]}],"scale-y":[{"scale-y":[w]}],rotate:[{rotate:[tp,Pe]}],"translate-x":[{"translate-x":[I]}],"translate-y":[{"translate-y":[I]}],"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",Pe]}],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",Pe]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":E()}],"scroll-mx":[{"scroll-mx":E()}],"scroll-my":[{"scroll-my":E()}],"scroll-ms":[{"scroll-ms":E()}],"scroll-me":[{"scroll-me":E()}],"scroll-mt":[{"scroll-mt":E()}],"scroll-mr":[{"scroll-mr":E()}],"scroll-mb":[{"scroll-mb":E()}],"scroll-ml":[{"scroll-ml":E()}],"scroll-p":[{"scroll-p":E()}],"scroll-px":[{"scroll-px":E()}],"scroll-py":[{"scroll-py":E()}],"scroll-ps":[{"scroll-ps":E()}],"scroll-pe":[{"scroll-pe":E()}],"scroll-pt":[{"scroll-pt":E()}],"scroll-pr":[{"scroll-pr":E()}],"scroll-pb":[{"scroll-pb":E()}],"scroll-pl":[{"scroll-pl":E()}],"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",Pe]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Ba,qi,UC]}],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 KE=v$(O$);function P(...e){return KE(Uh(e))}var Xi=R(N()),XE=DE,WC=zh.forwardRef(({className:e,...t},r)=>(0,Xi.jsx)(NE,{ref:r,className:P("moonui-theme","border-b border-gray-200 dark:border-gray-800",e),...t}));WC.displayName="AccordionItem";var jC=zh.forwardRef(({className:e,children:t,...r},o)=>(0,Xi.jsx)(OE,{className:"flex",children:(0,Xi.jsxs)(VC,{ref:o,className:P("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)(sa,{className:"h-4 w-4 shrink-0 transition-transform duration-200 opacity-70 group-hover:opacity-100"})]})}));jC.displayName=VC.displayName;var $C=zh.forwardRef(({className:e,children:t,...r},o)=>(0,Xi.jsx)(BC,{ref:o,className:P("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})}));$C.displayName=BC.displayName;var tc=R(M());var YE=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,QE=Uh,K=(e,t)=>r=>{var o;if(t?.variants==null)return QE(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=YE(c)||YE(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(g=>{let[m,x]=g;return Array.isArray(x)?x.includes({...a,...s}[m]):{...a,...s}[m]===x})?[...u,d,f]:u},[]);return QE(e,i,l,r?.class,r?.className)};var Ha=R(N()),F$=K("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-info/10 text-info border-info/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}}),qC=tc.forwardRef(({className:e,variant:t="default",size:r,radius:o,hideIcon:n=!1,closable:a=!1,onClose:i,children:s,...l},u)=>{let c=tc.useMemo(()=>{switch(t){case"success":return xr;case"warning":return $i;case"error":return Rn;case"info":return Yu;default:return Yu}},[t]);return(0,Ha.jsxs)("div",{ref:u,role:"alert",className:P("moonui-theme",F$({variant:t,size:r,radius:o,withClose:a}),e),...l,children:[!n&&(0,Ha.jsx)(c,{className:"h-5 w-5"}),(0,Ha.jsx)("div",{className:"flex-1",children:s}),a&&i&&(0,Ha.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":"Close alert",children:(0,Ha.jsx)(xo,{className:"h-4 w-4"})})]})});qC.displayName="Alert";var KC=tc.forwardRef(({className:e,...t},r)=>(0,Ha.jsx)("h5",{ref:r,className:P("moonui-theme","font-semibold leading-tight tracking-tight mb-1",e),...t}));KC.displayName="AlertTitle";var XC=tc.forwardRef(({className:e,...t},r)=>(0,Ha.jsx)("div",{ref:r,className:P("moonui-theme","text-sm leading-5 text-muted-foreground",e),...t}));XC.displayName="AlertDescription";var ZE=R(M());var YC=R(N()),JE=K("relative overflow-hidden",{variants:{variant:{default:"bg-muted/10",ghost:"bg-transparent",outline:"border border-border",card:"bg-card shadow-sm"},radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{variant:"default",radius:"md"}}),QC=ZE.forwardRef(({className:e,variant:t,radius:r,ratio:o=16/9,style:n,children:a,...i},s)=>(0,YC.jsx)("div",{ref:s,className:P("moonui-theme",JE({variant:t,radius:r}),e),style:{position:"relative",paddingBottom:`${1/o*100}%`,...n},...i,children:(0,YC.jsx)("div",{className:"absolute inset-0",children:a})}));QC.displayName="AspectRatio";var ul=R(M());var Uo=R(M(),1);var rc=R(M(),1);function nt(e){let t=rc.useRef(e);return rc.useEffect(()=>{t.current=e}),rc.useMemo(()=>(...r)=>t.current?.(...r),[])}var nA=R(oA(),1);function aA(){return(0,nA.useSyncExternalStore)($$,()=>!0,()=>!1)}function $$(){return()=>{}}var op=R(N(),1),JC="Avatar",[q$,uie]=Fe(JC),[K$,sA]=q$(JC),lA=Uo.forwardRef((e,t)=>{let{__scopeAvatar:r,...o}=e,[n,a]=Uo.useState("idle");return(0,op.jsx)(K$,{scope:r,imageLoadingStatus:n,onImageLoadingStatusChange:a,children:(0,op.jsx)(q.span,{...o,ref:t})})});lA.displayName=JC;var uA="AvatarImage",cA=Uo.forwardRef((e,t)=>{let{__scopeAvatar:r,src:o,onLoadingStatusChange:n=()=>{},...a}=e,i=sA(uA,r),s=X$(o,a),l=nt(u=>{n(u),i.onImageLoadingStatusChange(u)});return Ve(()=>{s!=="idle"&&l(s)},[s,l]),s==="loaded"?(0,op.jsx)(q.img,{...a,ref:t,src:o}):null});cA.displayName=uA;var dA="AvatarFallback",fA=Uo.forwardRef((e,t)=>{let{__scopeAvatar:r,delayMs:o,...n}=e,a=sA(dA,r),[i,s]=Uo.useState(o===void 0);return Uo.useEffect(()=>{if(o!==void 0){let l=window.setTimeout(()=>s(!0),o);return()=>window.clearTimeout(l)}},[o]),i&&a.imageLoadingStatus!=="loaded"?(0,op.jsx)(q.span,{...n,ref:t}):null});fA.displayName=dA;function iA(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function X$(e,{referrerPolicy:t,crossOrigin:r}){let o=aA(),n=Uo.useRef(null),a=(()=>o?(n.current||(n.current=new window.Image),n.current):null)(),[i,s]=Uo.useState(()=>iA(a,e));return Ve(()=>{s(iA(a,e))},[a,e]),Ve(()=>{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 eS=lA,tS=cA,rS=fA;var In=R(N()),Q$=K("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"}}),Gh=ul.forwardRef(({className:e,size:t,radius:r,variant:o,...n},a)=>(0,In.jsx)(eS,{ref:a,className:P("moonui-theme",Q$({size:t,radius:r,variant:o}),e),...n}));Gh.displayName=eS.displayName;var oS=ul.forwardRef(({className:e,...t},r)=>(0,In.jsx)(tS,{ref:r,className:P("moonui-theme","aspect-square h-full w-full",e),...t}));oS.displayName=tS.displayName;var Wh=ul.forwardRef(({className:e,...t},r)=>(0,In.jsx)(rS,{ref:r,className:P("flex h-full w-full items-center justify-center bg-muted",e),...t}));Wh.displayName=rS.displayName;var nS=ul.forwardRef(({className:e,max:t,children:r,overlapOffset:o=-8,...n},a)=>{let i=ul.Children.toArray(r),s=t?i.slice(0,t):i,l=t?Math.max(0,i.length-t):0;return(0,In.jsx)("div",{ref:a,className:P("moonui-theme","flex items-center",e),...n,children:(0,In.jsxs)("div",{className:"flex",children:[s.map((u,c)=>(0,In.jsx)("div",{className:"relative",style:{marginLeft:c===0?0:`${o}px`,zIndex:s.length-c},children:u},c)),l>0&&(0,In.jsx)("div",{className:"relative z-0",style:{marginLeft:`${o}px`},children:(0,In.jsx)(Gh,{variant:"border",children:(0,In.jsxs)(Wh,{children:["+",l]})})})]})})});nS.displayName="AvatarGroup";var pA=R(M());var yr=R(N()),aS=K(["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-primary text-primary-foreground","hover:bg-primary/90","focus-visible:ring-primary/30 dark:focus-visible:ring-primary/40","dark:bg-primary/90 dark:shadow-inner dark:shadow-primary/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-success-foreground","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-success-foreground dark:shadow-inner dark:shadow-success/10"],warning:["border-transparent bg-warning text-warning-foreground","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-warning-foreground 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"}}),_r=pA.forwardRef(({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},p)=>{let g=l,m=d;return t==="pro"&&(g=l||(0,yr.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,yr.jsx)("path",{d:"M12 0L13.09 8.26L22 9L13.09 9.74L12 18L10.91 9.74L2 9L10.91 8.26L12 0Z",fill:"currentColor"}),(0,yr.jsx)("path",{d:"M19 5L19.5 7L21 7.5L19.5 8L19 10L18.5 8L17 7.5L18.5 7L19 5Z",fill:"currentColor"}),(0,yr.jsx)("path",{d:"M19 15L19.5 17L21 17.5L19.5 18L19 20L18.5 18L17 17.5L18.5 17L19 15Z",fill:"currentColor"})]}),m=d||"Pro"),t==="admin"&&(g=l||(0,yr.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,yr.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"})}),m=d||"Admin Pro"),(0,yr.jsxs)("div",{ref:p,className:P("moonui-theme",aS({variant:t,size:r,radius:o}),c&&"mr-0 mb-0",e),"data-removable":i?"":void 0,...f,children:[n&&(0,yr.jsx)("span",{className:P("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"}),g&&(0,yr.jsx)("span",{className:"inline-flex shrink-0 items-center",children:g}),(0,yr.jsx)("span",{className:"inline-flex items-center",children:m}),u&&(0,yr.jsx)("span",{className:"inline-flex shrink-0 items-center",children:u}),i&&s&&(0,yr.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:x=>{x.stopPropagation(),s()},"aria-label":"Remove badge",children:(0,yr.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,yr.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"})})})]})});_r.displayName="Badge";var ua=R(M());var Vr=R(N()),Z$=K("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"}}),iS=ua.forwardRef(({className:e,variant:t,size:r,...o},n)=>(0,Vr.jsx)("nav",{ref:n,className:P("moonui-theme",Z$({variant:t,size:r}),e),"aria-label":"breadcrumb",...o}));iS.displayName="Breadcrumb";var sS=ua.forwardRef(({className:e,collapsed:t,collapsedWidth:r=3,...o},n)=>{let a=ua.Children.toArray(o.children).filter(Boolean),i=a.length;if(t&&i>r){let s=a[0],l=a.slice(-2);return(0,Vr.jsxs)("ol",{ref:n,className:P("flex flex-wrap items-center gap-1.5 sm:gap-2.5",e),...o,children:[s,(0,Vr.jsx)(jh,{}),l]})}return(0,Vr.jsx)("ol",{ref:n,className:P("flex flex-wrap items-center gap-1.5 sm:gap-2.5",e),...o})});sS.displayName="BreadcrumbList";var lS=ua.forwardRef(({className:e,isCurrent:t,href:r,asChild:o=!1,...n},a)=>{let i=o?ua.Fragment:r?"a":"span",s=o?{}:r?{href:r}:{};return(0,Vr.jsx)("li",{ref:a,className:P("moonui-theme","inline-flex items-center gap-1.5",e),"aria-current":t?"page":void 0,...n,children:(0,Vr.jsx)(i,{className:P("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})})});lS.displayName="BreadcrumbItem";var uS=({children:e,className:t,...r})=>(0,Vr.jsx)("span",{role:"presentation","aria-hidden":"true",className:P("moonui-theme","text-muted-foreground opacity-70",t),...r,children:e||(0,Vr.jsx)(Fr,{className:"h-3.5 w-3.5"})});uS.displayName="BreadcrumbSeparator";var jh=({className:e,...t})=>(0,Vr.jsxs)("span",{role:"presentation","aria-hidden":"true",className:P("moonui-theme","flex items-center text-muted-foreground hover:text-foreground/80 transition-colors duration-200",e),...t,children:[(0,Vr.jsx)(la,{className:"h-4 w-4"}),(0,Vr.jsx)("span",{className:"sr-only",children:"More pages"})]});jh.displayName="BreadcrumbEllipsis";var cS=ua.forwardRef(({className:e,href:t,...r},o)=>(0,Vr.jsx)("a",{ref:o,href:t,className:P("transition-colors duration-200 hover:text-foreground text-muted-foreground hover:underline hover:underline-offset-4 hover:decoration-muted-foreground/30",e),...r}));cS.displayName="BreadcrumbLink";var dS=ua.forwardRef(({className:e,...t},r)=>(0,Vr.jsx)("span",{ref:r,className:P("font-medium text-foreground dark:text-white dark:text-opacity-95",e),...t}));dS.displayName="BreadcrumbPage";var mA=R(M());var $h=R(N()),np=K(["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}}),Ee=mA.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,$h.jsxs)("button",{className:P("moonui-theme",np({variant:t,size:r,rounded:o,fullWidth:n,className:e})),ref:f,disabled:c||i,"aria-busy":i||void 0,"data-loading":i?"":void 0,...d,children:[i&&(0,$h.jsx)(Bt,{className:"w-4 h-4 animate-spin","aria-hidden":"true"}),!i&&s,u,!i&&l]}));Ee.displayName="Button";var El=R(M());var zp=R(N(),1),pa=R(M(),1);var gA=R(M(),1),nc=(0,gA.createContext)({});var hA=R(M(),1);function ca(e){let t=(0,hA.useRef)(null);return t.current===null&&(t.current=e()),t.current}var qh=R(M(),1);var ac=typeof window<"u";var ic=ac?qh.useLayoutEffect:qh.useEffect;var jS=R(N(),1),SD=R(M(),1),Hp=R(M(),1);var vA=R(M(),1),Yi=(0,vA.createContext)(null);var wD=R(N(),1);function cl(e,t){e.indexOf(t)===-1&&e.push(t)}function Pn(e,t){let r=e.indexOf(t);r>-1&&e.splice(r,1)}var Kt=(e,t,r)=>r>t?t:r<e?e:r;var Ua=()=>{},sr=()=>{};var wr={};var ap=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function ip(e){return typeof e=="object"&&e!==null}var sp=e=>/^0[^.\s]+$/u.test(e);function dl(e){let t;return()=>(t===void 0&&(t=e()),t)}var gt=e=>e;var J$=(e,t)=>r=>t(e(r)),Ln=(...e)=>e.reduce(J$);var zo=(e,t,r)=>{let o=t-e;return o===0?1:(r-e)/o};var za=class{constructor(){this.subscriptions=[]}add(t){return cl(this.subscriptions,t),()=>Pn(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 Rt=e=>e*1e3,Ht=e=>e/1e3;function lp(e,t){return t?e*(1e3/t):0}var xA=(e,t,r)=>{let o=t-e;return((r-e)%o+o)%o+e};var yA=(e,t,r)=>(((1-3*r+3*t)*e+(3*r-6*t))*e+3*t)*e,eq=1e-7,tq=12;function rq(e,t,r,o,n){let a,i,s=0;do i=t+(r-t)/2,a=yA(i,o,n)-e,a>0?r=i:t=i;while(Math.abs(a)>eq&&++s<tq);return i}function Qi(e,t,r,o){if(e===t&&r===o)return gt;let n=a=>rq(a,0,1,e,r);return a=>a===0||a===1?a:yA(n(a),t,o)}var Kh=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2;var Xh=e=>t=>1-e(1-t);var Yh=Qi(.33,1.53,.69,.99),sc=Xh(Yh),up=Kh(sc);var cp=e=>(e*=2)<1?.5*sc(e):.5*(2-Math.pow(2,-10*(e-1)));var dp=e=>1-Math.sin(Math.acos(e)),fp=Xh(dp),pp=Kh(dp);var fS=Qi(.42,0,1,1),pS=Qi(0,0,.58,1),mp=Qi(.42,0,.58,1);var gp=e=>Array.isArray(e)&&typeof e[0]!="number";function hp(e,t){return gp(e)?e[xA(0,e.length,t)]:e}var vp=e=>Array.isArray(e)&&typeof e[0]=="number";var wA={linear:gt,easeIn:fS,easeInOut:mp,easeOut:pS,circIn:dp,circInOut:pp,circOut:fp,backIn:sc,backInOut:up,backOut:Yh,anticipate:cp},oq=e=>typeof e=="string",Qh=e=>{if(vp(e)){sr(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");let[t,r,o,n]=e;return Qi(t,r,o,n)}else if(oq(e))return sr(wA[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),wA[e];return e};var xp=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];var to={value:null,addProjectionMetrics:null};function CA(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&&to.value&&to.value.frameloop[t].push(l),l=0,r.clear(),n=!1,a&&(a=!1,c.process(d))}};return c}var nq=40;function Zh(e,t){let r=!1,o=!0,n={delta:0,timestamp:0,isProcessing:!1},a=()=>r=!0,i=xp.reduce((y,w)=>(y[w]=CA(a,t?w:void 0),y),{}),{setup:s,read:l,resolveKeyframes:u,preUpdate:c,update:d,preRender:f,render:p,postRender:g}=i,m=()=>{let y=wr.useManualTiming?n.timestamp:performance.now();r=!1,wr.useManualTiming||(n.delta=o?1e3/60:Math.max(Math.min(y-n.timestamp,nq),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),g.process(n),n.isProcessing=!1,r&&t&&(o=!1,e(m))},x=()=>{r=!0,o=!0,n.isProcessing||e(m)};return{schedule:xp.reduce((y,w)=>{let C=i[w];return y[w]=(b,S=!1,I=!1)=>(r||x(),C.schedule(b,S,I)),y},{}),cancel:y=>{for(let w=0;w<xp.length;w++)i[xp[w]].cancel(y)},state:n,steps:i}}var{schedule:Le,cancel:Cr,state:yt,steps:yp}=Zh(typeof requestAnimationFrame<"u"?requestAnimationFrame:gt,!0);var Jh;function aq(){Jh=void 0}var wt={now:()=>(Jh===void 0&&wt.set(yt.isProcessing||wr.useManualTiming?yt.timestamp:performance.now()),Jh),set:e=>{Jh=e,queueMicrotask(aq)}};var Tn={layout:0,mainThread:0,waapi:0};var SA=e=>t=>typeof t=="string"&&t.startsWith(e),fl=SA("--"),iq=SA("var(--"),pl=e=>iq(e)?sq.test(e.split("/*")[0].trim()):!1,sq=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;var da={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Ga={...da,transform:e=>Kt(0,1,e)},wp={...da,default:1};var Zi=e=>Math.round(e*1e5)/1e5;var lc=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function bA(e){return e==null}var RA=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;var uc=(e,t)=>r=>!!(typeof r=="string"&&RA.test(r)&&r.startsWith(e)||t&&!bA(r)&&Object.prototype.hasOwnProperty.call(r,t)),ev=(e,t,r)=>o=>{if(typeof o!="string")return o;let[n,a,i,s]=o.match(lc);return{[e]:parseFloat(n),[t]:parseFloat(a),[r]:parseFloat(i),alpha:s!==void 0?parseFloat(s):1}};var lq=e=>Kt(0,255,e),mS={...da,transform:e=>Math.round(lq(e))},fa={test:uc("rgb","red"),parse:ev("red","green","blue"),transform:({red:e,green:t,blue:r,alpha:o=1})=>"rgba("+mS.transform(e)+", "+mS.transform(t)+", "+mS.transform(r)+", "+Zi(Ga.transform(o))+")"};function uq(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 Cp={test:uc("#"),parse:uq,transform:fa.transform};var Sp=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),kn=Sp("deg"),Sr=Sp("%"),ue=Sp("px"),gS=Sp("vh"),hS=Sp("vw"),tv=(()=>({...Sr,parse:e=>Sr.parse(e)/100,transform:e=>Sr.transform(e*100)}))();var Ji={test:uc("hsl","hue"),parse:ev("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:r,alpha:o=1})=>"hsla("+Math.round(e)+", "+Sr.transform(Zi(t))+", "+Sr.transform(Zi(r))+", "+Zi(Ga.transform(o))+")"};var ut={test:e=>fa.test(e)||Cp.test(e)||Ji.test(e),parse:e=>fa.test(e)?fa.parse(e):Ji.test(e)?Ji.parse(e):Cp.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?fa.transform(e):Ji.transform(e),getAnimatableNone:e=>{let t=ut.parse(e);return t.alpha=0,ut.transform(t)}};var IA=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function cq(e){return isNaN(e)&&typeof e=="string"&&(e.match(lc)?.length||0)+(e.match(IA)?.length||0)>0}var LA="number",TA="color",dq="var",fq="var(",PA="${}",pq=/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 es(e){let t=e.toString(),r=[],o={color:[],number:[],var:[]},n=[],a=0,s=t.replace(pq,l=>(ut.test(l)?(o.color.push(a),n.push(TA),r.push(ut.parse(l))):l.startsWith(fq)?(o.var.push(a),n.push(dq),r.push(l)):(o.number.push(a),n.push(LA),r.push(parseFloat(l))),++a,PA)).split(PA);return{values:r,split:s,indexes:o,types:n}}function kA(e){return es(e).values}function MA(e){let{split:t,types:r}=es(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===LA?a+=Zi(n[i]):s===TA?a+=ut.transform(n[i]):a+=n[i]}return a}}var mq=e=>typeof e=="number"?0:ut.test(e)?ut.getAnimatableNone(e):e;function gq(e){let t=kA(e);return MA(e)(t.map(mq))}var br={test:cq,parse:kA,createTransformer:MA,getAnimatableNone:gq};function vS(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 EA({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=vS(l,s,e+1/3),a=vS(l,s,e),i=vS(l,s,e-1/3)}return{red:Math.round(n*255),green:Math.round(a*255),blue:Math.round(i*255),alpha:o}}function cc(e,t){return r=>r>0?t:e}var ke=(e,t,r)=>e+(t-e)*r;var xS=(e,t,r)=>{let o=e*e,n=r*(t*t-o)+o;return n<0?0:Math.sqrt(n)},hq=[Cp,fa,Ji],vq=e=>hq.find(t=>t.test(e));function AA(e){let t=vq(e);if(Ua(!!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===Ji&&(r=EA(r)),r}var yS=(e,t)=>{let r=AA(e),o=AA(t);if(!r||!o)return cc(e,t);let n={...r};return a=>(n.red=xS(r.red,o.red,a),n.green=xS(r.green,o.green,a),n.blue=xS(r.blue,o.blue,a),n.alpha=ke(r.alpha,o.alpha,a),fa.transform(n))};var rv=new Set(["none","hidden"]);function DA(e,t){return rv.has(e)?r=>r<=0?e:t:r=>r>=1?t:e}function xq(e,t){return r=>ke(e,t,r)}function ov(e){return typeof e=="number"?xq:typeof e=="string"?pl(e)?cc:ut.test(e)?yS:Cq:Array.isArray(e)?NA:typeof e=="object"?ut.test(e)?yS:yq:cc}function NA(e,t){let r=[...e],o=r.length,n=e.map((a,i)=>ov(a)(a,t[i]));return a=>{for(let i=0;i<o;i++)r[i]=n[i](a);return r}}function yq(e,t){let r={...e,...t},o={};for(let n in r)e[n]!==void 0&&t[n]!==void 0&&(o[n]=ov(e[n])(e[n],t[n]));return n=>{for(let a in o)r[a]=o[a](n);return r}}function wq(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 Cq=(e,t)=>{let r=br.createTransformer(t),o=es(e),n=es(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?rv.has(e)&&!n.values.length||rv.has(t)&&!o.values.length?DA(e,t):Ln(NA(wq(o,n),n.values),r):(Ua(!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"),cc(e,t))};function nv(e,t,r){return typeof e=="number"&&typeof t=="number"&&typeof r=="number"?ke(e,t,r):ov(e)(e,t)}var OA=e=>{let t=({timestamp:r})=>e(r);return{start:(r=!0)=>Le.update(t,r),stop:()=>Cr(t),now:()=>yt.isProcessing?yt.timestamp:wt.now()}};var av=(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 dc(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 bp(e,t=100,r){let o=r({...e,keyframes:[0,t]}),n=Math.min(dc(o),2e4);return{type:"keyframes",ease:a=>o.next(n*a).value/t,duration:Ht(n)}}var Sq=5;function iv(e,t,r){let o=Math.max(t-Sq,0);return lp(r-e(o),t-o)}var at={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 CS=.001;function FA({duration:e=at.duration,bounce:t=at.bounce,velocity:r=at.velocity,mass:o=at.mass}){let n,a;Ua(e<=Rt(at.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let i=1-t;i=Kt(at.minDamping,at.maxDamping,i),e=Kt(at.minDuration,at.maxDuration,Ht(e)),i<1?(n=u=>{let c=u*i,d=c*e,f=c-r,p=sv(u,i),g=Math.exp(-d);return CS-f/p*g},a=u=>{let d=u*i*e,f=d*r+r,p=Math.pow(i,2)*Math.pow(u,2)*e,g=Math.exp(-d),m=sv(Math.pow(u,2),i);return(-n(u)+CS>0?-1:1)*((f-p)*g)/m}):(n=u=>{let c=Math.exp(-u*e),d=(u-r)*e+1;return-CS+c*d},a=u=>{let c=Math.exp(-u*e),d=(r-u)*(e*e);return c*d});let s=5/e,l=Rq(n,a,s);if(e=Rt(e),isNaN(l))return{stiffness:at.stiffness,damping:at.damping,duration:e};{let u=Math.pow(l,2)*o;return{stiffness:u,damping:i*2*Math.sqrt(o*u),duration:e}}}var bq=12;function Rq(e,t,r){let o=r;for(let n=1;n<bq;n++)o=o-e(o)/t(o);return o}function sv(e,t){return e*Math.sqrt(1-t*t)}var Iq=["duration","bounce"],Pq=["stiffness","damping","mass"];function _A(e,t){return t.some(r=>e[r]!==void 0)}function Lq(e){let t={velocity:at.velocity,stiffness:at.stiffness,damping:at.damping,mass:at.mass,isResolvedFromDuration:!1,...e};if(!_A(e,Pq)&&_A(e,Iq))if(e.visualDuration){let r=e.visualDuration,o=2*Math.PI/(r*1.2),n=o*o,a=2*Kt(.05,1,1-(e.bounce||0))*Math.sqrt(n);t={...t,mass:at.mass,stiffness:n,damping:a}}else{let r=FA(e);t={...t,...r,mass:at.mass},t.isResolvedFromDuration=!0}return t}function Wa(e=at.visualDuration,t=at.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}=Lq({...r,velocity:-Ht(r.velocity||0)}),g=f||0,m=u/(2*Math.sqrt(l*c)),x=i-a,h=Ht(Math.sqrt(l/c)),v=Math.abs(x)<5;o||(o=v?at.restSpeed.granular:at.restSpeed.default),n||(n=v?at.restDelta.granular:at.restDelta.default);let y;if(m<1){let C=sv(h,m);y=b=>{let S=Math.exp(-m*h*b);return i-S*((g+m*h*x)/C*Math.sin(C*b)+x*Math.cos(C*b))}}else if(m===1)y=C=>i-Math.exp(-h*C)*(x+(g+h*x)*C);else{let C=h*Math.sqrt(m*m-1);y=b=>{let S=Math.exp(-m*h*b),I=Math.min(C*b,300);return i-S*((g+m*h*x)*Math.sinh(I)+C*x*Math.cosh(I))/C}}let w={calculatedDuration:p&&d||null,next:C=>{let b=y(C);if(p)s.done=C>=d;else{let S=C===0?g:0;m<1&&(S=C===0?Rt(g):iv(y,C,b));let I=Math.abs(S)<=o,L=Math.abs(i-b)<=n;s.done=I&&L}return s.value=s.done?i:b,s},toString:()=>{let C=Math.min(dc(w),2e4),b=av(S=>w.next(C*S).value,C,30);return C+"ms "+b},toTransition:()=>{}};return w}Wa.applyToOptions=e=>{let t=bp(e,100,Wa);return e.ease=t.ease,e.duration=Rt(t.duration),e.type="keyframes",e};function Rp({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=I=>s!==void 0&&I<s||l!==void 0&&I>l,g=I=>s===void 0?l:l===void 0||Math.abs(s-I)<Math.abs(l-I)?s:l,m=r*t,x=d+m,h=i===void 0?x:i(x);h!==x&&(m=h-d);let v=I=>-m*Math.exp(-I/o),y=I=>h+v(I),w=I=>{let L=v(I),T=y(I);f.done=Math.abs(L)<=u,f.value=f.done?h:T},C,b,S=I=>{p(f.value)&&(C=I,b=Wa({keyframes:[f.value,g(f.value)],velocity:iv(y,I,f.value),damping:n,stiffness:a,restDelta:u,restSpeed:c}))};return S(0),{calculatedDuration:null,next:I=>{let L=!1;return!b&&C===void 0&&(L=!0,w(I),S(I)),C!==void 0&&I>=C?b.next(I-C):(!L&&w(I),f)}}}function Tq(e,t,r){let o=[],n=r||wr.mix||nv,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]||gt:t;s=Ln(l,s)}o.push(s)}return o}function lv(e,t,{clamp:r=!0,ease:o,mixer:n}={}){let a=e.length;if(sr(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=Tq(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=zo(e[d],e[d+1],c);return s[d](f)};return r?c=>u(Kt(e[0],e[a-1],c)):u}function Ip(e,t){let r=e[e.length-1];for(let o=1;o<=t;o++){let n=zo(0,t,o);e.push(ke(r,1,n))}}function Pp(e){let t=[0];return Ip(t,e.length-1),t}function VA(e,t){return e.map(r=>r*t)}function kq(e,t){return e.map(()=>t||mp).splice(0,e.length-1)}function ml({duration:e=300,keyframes:t,times:r,ease:o="easeInOut"}){let n=gp(o)?o.map(Qh):Qh(o),a={done:!1,value:t[0]},i=VA(r&&r.length===t.length?r:Pp(t),e),s=lv(i,t,{ease:Array.isArray(n)?n:kq(t,n)});return{calculatedDuration:e,next:l=>(a.value=s(l),a.done=l>=e,a)}}var Mq=e=>e!==null;function fc(e,{repeat:t,repeatType:r="loop"},o,n=1){let a=e.filter(Mq),s=n<0||t&&r!=="loop"&&t%2===1?0:a.length-1;return!s||o===void 0?a[s]:o}var Eq={decay:Rp,inertia:Rp,tween:ml,keyframes:ml,spring:Wa};function uv(e){typeof e.type=="string"&&(e.type=Eq[e.type])}var ts=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 Aq=e=>e/100,ja=class extends ts{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!==wt.now()&&this.tick(wt.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},Tn.mainThread++,this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){let{options:t}=this;uv(t);let{type:r=ml,repeat:o=0,repeatDelay:n=0,repeatType:a,velocity:i=0}=t,{keyframes:s}=t,l=r||ml;l!==ml&&typeof s[0]!="number"&&(this.mixKeyframes=Ln(Aq,nv(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=dc(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:g,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 h=this.currentTime-u*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?h<0:h>n;this.currentTime=Math.max(h,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=n);let y=this.currentTime,w=o;if(d){let I=Math.min(this.currentTime,n)/s,L=Math.floor(I),T=I%1;!T&&I>=1&&(T=1),T===1&&L--,L=Math.min(L,d+1),!!(L%2)&&(f==="reverse"?(T=1-T,p&&(T-=p/s)):f==="mirror"&&(w=i)),y=Kt(0,1,T)*s}let C=v?{done:!1,value:c[0]}:w.next(y);a&&(C.value=a(C.value));let{done:b}=C;!v&&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&&g!==Rp&&(C.value=fc(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 Ht(this.calculatedDuration)}get iterationDuration(){let{delay:t=0}=this.options||{};return this.duration+Ht(t)}get time(){return Ht(this.currentTime)}set time(t){t=Rt(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(wt.now());let r=this.playbackSpeed!==t;this.playbackSpeed=t,r&&(this.time=Ht(this.currentTime))}play(){if(this.isStopped)return;let{driver:t=OA,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(wt.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,Tn.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 BA(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var gl=e=>e*180/Math.PI,SS=e=>{let t=gl(Math.atan2(e[1],e[0]));return bS(t)},Dq={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:SS,rotateZ:SS,skewX:e=>gl(Math.atan(e[1])),skewY:e=>gl(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},bS=e=>(e=e%360,e<0&&(e+=360),e),HA=SS,UA=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),zA=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Nq={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:UA,scaleY:zA,scale:e=>(UA(e)+zA(e))/2,rotateX:e=>bS(gl(Math.atan2(e[6],e[5]))),rotateY:e=>bS(gl(Math.atan2(-e[2],e[0]))),rotateZ:HA,rotate:HA,skewX:e=>gl(Math.atan(e[4])),skewY:e=>gl(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Lp(e){return e.includes("scale")?1:0}function Tp(e,t){if(!e||e==="none")return Lp(t);let r=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),o,n;if(r)o=Nq,n=r;else{let s=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);o=Dq,n=s}if(!n)return Lp(t);let a=o[t],i=n[1].split(",").map(Oq);return typeof a=="function"?a(i):i[a]}var RS=(e,t)=>{let{transform:r="none"}=getComputedStyle(e);return Tp(r,t)};function Oq(e){return parseFloat(e.trim())}var Mn=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],yo=(()=>new Set(Mn))();var IS=e=>e===da||e===ue,Fq=new Set(["x","y","z"]),_q=Mn.filter(e=>!Fq.has(e));function GA(e){let t=[];return _q.forEach(r=>{let o=e.getValue(r);o!==void 0&&(t.push([r,o.get()]),o.set(r.startsWith("scale")?1:0))}),t}var rs={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})=>Tp(t,"x"),y:(e,{transform:t})=>Tp(t,"y")};rs.translateX=rs.x;rs.translateY=rs.y;var hl=new Set,PS=!1,LS=!1,TS=!1;function WA(){if(LS){let e=Array.from(hl).filter(o=>o.needsMeasurement),t=new Set(e.map(o=>o.element)),r=new Map;t.forEach(o=>{let n=GA(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)})}LS=!1,PS=!1,hl.forEach(e=>e.complete(TS)),hl.clear()}function jA(){hl.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(LS=!0)})}function kS(){TS=!0,jA(),WA(),TS=!1}var $a=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?(hl.add(this),PS||(PS=!0,Le.read(jA),Le.resolveKeyframes(WA))):(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])}BA(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),hl.delete(this)}cancel(){this.state==="scheduled"&&(hl.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}};var $A=e=>e.startsWith("--");function qA(e,t,r){$A(t)?e.style.setProperty(t,r):e.style[t]=r}var KA=dl(()=>window.ScrollTimeline!==void 0);var XA={};function YA(e,t){let r=dl(e);return()=>XA[t]??r()}var cv=YA(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing");var vl=([e,t,r,o])=>`cubic-bezier(${e}, ${t}, ${r}, ${o})`;var MS={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:vl([0,.65,.55,1]),circOut:vl([.55,0,1,.45]),backIn:vl([.31,.01,.66,-.59]),backOut:vl([.33,1.53,.69,.99])};function ES(e,t){if(e)return typeof e=="function"?cv()?av(e,t):"ease-out":vp(e)?vl(e):Array.isArray(e)?e.map(r=>ES(r,t)||MS.easeOut):MS[e]}function QA(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=ES(s,n);Array.isArray(d)&&(c.easing=d),to.value&&Tn.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 to.value&&p.finished.finally(()=>{Tn.waapi--}),p}function xl(e){return typeof e=="function"&&"applyToOptions"in e}function ZA({type:e,...t}){return xl(e)&&cv()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}var dv=class extends ts{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,sr(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");let u=ZA(t);this.animation=QA(r,o,n,u,a),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!a){let c=fc(n,this.options,s,this.speed);this.updateMotionValue?this.updateMotionValue(c):qA(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 Ht(Number(t))}get iterationDuration(){let{delay:t=0}=this.options||{};return this.duration+Ht(t)}get time(){return Ht(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=Rt(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&&KA()?(this.animation.timeline=t,gt):r(this)}};var JA={anticipate:cp,backInOut:up,circInOut:pp};function Vq(e){return e in JA}function eD(e){typeof e.ease=="string"&&Vq(e.ease)&&(e.ease=JA[e.ease])}var tD=10,fv=class extends dv{constructor(t){eD(t),uv(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 ja({...i,autoplay:!1}),l=Rt(this.finishedTime??this.time);r.setWithVelocity(s.sample(l-tD).value,s.sample(l).value,tD),s.stop()}};var AS=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(br.test(e)||e==="0")&&!e.startsWith("url("));function Bq(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 rD(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=AS(n,t),s=AS(a,t);return Ua(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:Bq(e)||(r==="spring"||xl(r))&&o}function pc(e){e.duration=0,e.type="keyframes"}var Hq=new Set(["opacity","clipPath","filter","transform"]),Uq=dl(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function oD(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 Uq()&&r&&Hq.has(r)&&(r!=="transform"||!u)&&!l&&!o&&n!=="mirror"&&a!==0&&i!=="inertia"}var zq=40,kp=class extends ts{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=wt.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||$a;this.keyframeResolver=new p(s,(g,m,x)=>this.onKeyframesResolved(g,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=wt.now(),rD(t,a,i,s)||((wr.instantAnimations||!l)&&c?.(fc(t,o,r)),t[0]=t[t.length-1],pc(o),o.repeat=0);let f={startTime:n?this.resolvedAt?this.resolvedAt-this.createdAt>zq?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:r,...o,keyframes:t},p=!u&&oD(f)?new fv({...f,element:f.motionValue.owner.current}):new ja(f);p.finished.then(()=>this.notifyFinished()).catch(gt),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(),kS()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}};var pv=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(){return nD(this.animations,"duration")}get iterationDuration(){return nD(this.animations,"iterationDuration")}runAll(t){this.animations.forEach(r=>r[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}};function nD(e,t){let r=0;for(let o=0;o<e.length;o++){let n=e[o][t];n!==null&&n>r&&(r=n)}return r}var Mp=class extends pv{then(t,r){return this.finished.finally(t).then(()=>{})}};var Gq=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Wq(e){let t=Gq.exec(e);if(!t)return[,];let[,r,o,n]=t;return[`--${r??o}`,n]}var jq=4;function DS(e,t,r=1){sr(r<=jq,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");let[o,n]=Wq(e);if(!o)return;let a=window.getComputedStyle(t).getPropertyValue(o);if(a){let i=a.trim();return ap(i)?parseFloat(i):i}return pl(n)?DS(n,t,r+1):n}function yl(e,t){return e?.[t]??e?.default??e}var Ep=new Set(["width","height","top","left","right","bottom",...Mn]);var aD={test:e=>e==="auto",parse:e=>e};var mv=e=>t=>t.test(e);var NS=[da,ue,Sr,kn,hS,gS,aD],OS=e=>NS.find(mv(e));function iD(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||sp(e):!0}var $q=new Set(["brightness","contrast","saturate","opacity"]);function qq(e){let[t,r]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;let[o]=r.match(lc)||[];if(!o)return e;let n=r.replace(o,""),a=$q.has(t)?1:0;return o!==r&&(a*=100),t+"("+a+n+")"}var Kq=/\b([a-z-]*)\(.*?\)/gu,Ap={...br,getAnimatableNone:e=>{let t=e.match(Kq);return t?t.map(qq).join(" "):e}};var FS={...da,transform:Math.round};var sD={rotate:kn,rotateX:kn,rotateY:kn,rotateZ:kn,scale:wp,scaleX:wp,scaleY:wp,scaleZ:wp,skew:kn,skewX:kn,skewY:kn,distance:ue,translateX:ue,translateY:ue,translateZ:ue,x:ue,y:ue,z:ue,perspective:ue,transformPerspective:ue,opacity:Ga,originX:tv,originY:tv,originZ:ue};var wl={borderWidth:ue,borderTopWidth:ue,borderRightWidth:ue,borderBottomWidth:ue,borderLeftWidth:ue,borderRadius:ue,radius:ue,borderTopLeftRadius:ue,borderTopRightRadius:ue,borderBottomRightRadius:ue,borderBottomLeftRadius:ue,width:ue,maxWidth:ue,height:ue,maxHeight:ue,top:ue,right:ue,bottom:ue,left:ue,padding:ue,paddingTop:ue,paddingRight:ue,paddingBottom:ue,paddingLeft:ue,margin:ue,marginTop:ue,marginRight:ue,marginBottom:ue,marginLeft:ue,backgroundPositionX:ue,backgroundPositionY:ue,...sD,zIndex:FS,fillOpacity:Ga,strokeOpacity:Ga,numOctaves:FS};var lD={...wl,color:ut,backgroundColor:ut,outlineColor:ut,fill:ut,stroke:ut,borderColor:ut,borderTopColor:ut,borderRightColor:ut,borderBottomColor:ut,borderLeftColor:ut,filter:Ap,WebkitFilter:Ap},Dp=e=>lD[e];function Np(e,t){let r=Dp(e);return r!==Ap&&(r=br),r.getAnimatableNone?r.getAnimatableNone(t):void 0}var Xq=new Set(["auto","none","0"]);function uD(e,t,r){let o=0,n;for(;o<e.length&&!n;){let a=e[o];typeof a=="string"&&!Xq.has(a)&&es(a).values.length&&(n=e[o]),o++}if(n&&r)for(let a of t)e[a]=Np(r,n)}var Op=class extends $a{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(),pl(u))){let c=DS(u,r.current);c!==void 0&&(t[l]=c),l===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!Ep.has(o)||t.length!==2)return;let[n,a]=t,i=OS(n),s=OS(a);if(i!==s)if(IS(i)&&IS(s))for(let l=0;l<t.length;l++){let u=t[l];typeof u=="string"&&(t[l]=parseFloat(u))}else rs[o]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:t,name:r}=this,o=[];for(let n=0;n<t.length;n++)(t[n]===null||iD(t[n]))&&o.push(n);o.length&&uD(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=rs[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]=rs[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 Fp(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 _p=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Vp(e){return ip(e)&&"offsetHeight"in e}var cD=30,Yq=e=>!isNaN(parseFloat(e)),Cl={current:void 0},gv=class{constructor(t,r={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=o=>{let n=wt.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=wt.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Yq(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 za);let o=this.events[t].add(r);return t==="change"?()=>{o(),Le.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 Cl.current&&Cl.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let t=wt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>cD)return 0;let r=Math.min(this.updatedAt-this.prevUpdatedAt,cD);return lp(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 ro(e,t){return new gv(e,t)}var{schedule:Sl,cancel:Qq}=Zh(queueMicrotask,!1);var Go={x:!1,y:!1};function hv(){return Go.x||Go.y}function _S(e){return e==="x"||e==="y"?Go[e]?null:(Go[e]=!0,()=>{Go[e]=!1}):Go.x||Go.y?null:(Go.x=Go.y=!0,()=>{Go.x=Go.y=!1})}function vv(e,t){let r=Fp(e),o=new AbortController,n={passive:!0,...t,signal:o.signal};return[r,n,()=>o.abort()]}function dD(e){return!(e.pointerType==="touch"||hv())}function VS(e,t,r={}){let[o,n,a]=vv(e,r),i=s=>{if(!dD(s))return;let{target:l}=s,u=t(l,s);if(typeof u!="function"||!l)return;let c=d=>{dD(d)&&(u(d),l.removeEventListener("pointerleave",c))};l.addEventListener("pointerleave",c,n)};return o.forEach(s=>{s.addEventListener("pointerenter",i,n)}),a}var BS=(e,t)=>t?e===t?!0:BS(e,t.parentElement):!1;var bl=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;var Zq=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function fD(e){return Zq.has(e.tagName)||e.tabIndex!==-1}var mc=new WeakSet;function pD(e){return t=>{t.key==="Enter"&&e(t)}}function HS(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}var mD=(e,t)=>{let r=e.currentTarget;if(!r)return;let o=pD(()=>{if(mc.has(r))return;HS(r,"down");let n=pD(()=>{HS(r,"up")}),a=()=>HS(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 gD(e){return bl(e)&&!hv()}function US(e,t,r={}){let[o,n,a]=vv(e,r),i=s=>{let l=s.currentTarget;if(!gD(s))return;mc.add(l);let u=t(l,s),c=(p,g)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",f),mc.has(l)&&mc.delete(l),gD(p)&&typeof u=="function"&&u(p,{success:g})},d=p=>{c(p,l===window||l===document||r.useGlobalTarget||BS(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),Vp(s)&&(s.addEventListener("focus",u=>mD(u,n)),!fD(s)&&!s.hasAttribute("tabindex")&&(s.tabIndex=0))}),a}function Rl(e){return ip(e)&&"ownerSVGElement"in e}function Bp(e){return Rl(e)&&e.tagName==="svg"}function zS(...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=lv(n,a,i);return t?s(o):s}var Be=e=>!!(e&&e.getVelocity);var Jq=[...NS,ut,br],GS=e=>Jq.find(mv(e));var xv=R(M(),1),qa=R(M(),1);var hD=R(M(),1),os=(0,hD.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});var xD=R(M(),1);function vD(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function e6(...e){return t=>{let r=!1,o=e.map(n=>{let a=vD(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():vD(e[n],null)}}}}function yD(...e){return xD.useCallback(e6(...e),e)}var WS=class extends xv.Component{getSnapshotBeforeUpdate(t){let r=this.props.childRef.current;if(r&&t.isPresent&&!this.props.isPresent){let o=r.offsetParent,n=Vp(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 CD({children:e,isPresent:t,anchorX:r,root:o}){let n=(0,qa.useId)(),a=(0,qa.useRef)(null),i=(0,qa.useRef)({width:0,height:0,top:0,left:0,right:0}),{nonce:s}=(0,qa.useContext)(os),l=yD(a,e?.ref);return(0,qa.useInsertionEffect)(()=>{let{width:u,height:c,top:d,left:f,right:p}=i.current;if(t||!a.current||!u||!c)return;let g=r==="left"?`left: ${f}`:`right: ${p}`;a.current.dataset.motionPopId=n;let m=document.createElement("style");s&&(m.nonce=s);let x=o??document.head;return x.appendChild(m),m.sheet&&m.sheet.insertRule(`
|
|
12
|
-
[data-motion-pop-id="${n}"] {
|
|
4
|
+
import{a as rO,b as Ad,c as b,d as Bt,e as mg,f as Dd,g as k,h as N}from"./chunk-2EN7SB2G.global.js";var Zb=Ad(io=>{"use strict";var mO=k();function Yb(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 cn(){}var so={d:{f:cn,r:function(){throw Error(Yb(522))},D:cn,C:cn,L:cn,m:cn,X:cn,S:cn,M:cn},p:0,findDOMNode:null},gO=Symbol.for("react.portal");function hO(e,t,o){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:gO,key:r==null?null:""+r,children:e,containerInfo:t,implementation:o}}var ru=mO.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function Fd(e,t){if(e==="font")return"";if(typeof t=="string")return t==="use-credentials"?t:""}io.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=so;io.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(Yb(299));return hO(e,t,null,o)};io.flushSync=function(e){var t=ru.T,o=so.p;try{if(ru.T=null,so.p=2,e)return e()}finally{ru.T=t,so.p=o,so.d.f()}};io.preconnect=function(e,t){typeof e=="string"&&(t?(t=t.crossOrigin,t=typeof t=="string"?t==="use-credentials"?t:"":void 0):t=null,so.d.C(e,t))};io.prefetchDNS=function(e){typeof e=="string"&&so.d.D(e)};io.preinit=function(e,t){if(typeof e=="string"&&t&&typeof t.as=="string"){var o=t.as,r=Fd(o,t.crossOrigin),a=typeof t.integrity=="string"?t.integrity:void 0,n=typeof t.fetchPriority=="string"?t.fetchPriority:void 0;o==="style"?so.d.S(e,typeof t.precedence=="string"?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:n}):o==="script"&&so.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:n,nonce:typeof t.nonce=="string"?t.nonce:void 0})}};io.preinitModule=function(e,t){if(typeof e=="string")if(typeof t=="object"&&t!==null){if(t.as==null||t.as==="script"){var o=Fd(t.as,t.crossOrigin);so.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&&so.d.M(e)};io.preload=function(e,t){if(typeof e=="string"&&typeof t=="object"&&t!==null&&typeof t.as=="string"){var o=t.as,r=Fd(o,t.crossOrigin);so.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})}};io.preloadModule=function(e,t){if(typeof e=="string")if(t){var o=Fd(t.as,t.crossOrigin);so.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 so.d.m(e)};io.requestFormReset=function(e){so.d.r(e)};io.unstable_batchedUpdates=function(e,t){return e(t)};io.useFormState=function(e,t,o){return ru.H.useFormState(e,t,o)};io.useFormStatus=function(){return ru.H.useHostTransitionStatus()};io.version="19.2.3"});var ta=Ad((mj,Jb)=>{"use strict";function Qb(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Qb)}catch(e){console.error(e)}}Qb(),Jb.exports=Zb()});var ew=Ad(JC=>{"use strict";var Mi=k();function S2(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var R2=typeof Object.is=="function"?Object.is:S2,I2=Mi.useState,P2=Mi.useEffect,L2=Mi.useLayoutEffect,T2=Mi.useDebugValue;function M2(e,t){var o=t(),r=I2({inst:{value:o,getSnapshot:t}}),a=r[0].inst,n=r[1];return L2(function(){a.value=o,a.getSnapshot=t,Eg(a)&&n({inst:a})},[e,o,t]),P2(function(){return Eg(a)&&n({inst:a}),e(function(){Eg(a)&&n({inst:a})})},[e]),T2(o),o}function Eg(e){var t=e.getSnapshot;e=e.value;try{var o=t();return!R2(e,o)}catch{return!0}}function k2(e,t){return t()}var E2=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?k2:M2;JC.useSyncExternalStore=Mi.useSyncExternalStore!==void 0?Mi.useSyncExternalStore:E2});var ow=Ad((RK,tw)=>{"use strict";tw.exports=ew()});var Yd=b(k());var bo=b(k(),1);var Sa=b(k(),1),qb=b(N(),1);function Ne(e,t=[]){let o=[];function r(n,s){let i=Sa.createContext(s),l=o.length;o=[...o,s];let u=d=>{let{scope:f,children:p,...g}=d,m=f?.[e]?.[l]||i,h=Sa.useMemo(()=>g,Object.values(g));return(0,qb.jsx)(m.Provider,{value:h,children:p})};u.displayName=n+"Provider";function c(d,f){let p=f?.[e]?.[l]||i,g=Sa.useContext(p);if(g)return g;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=>Sa.createContext(s));return function(i){let l=i?.[e]||n;return Sa.useMemo(()=>({[`__scope${e}`]:{...i,[e]:l}}),[i,l])}};return a.scopeName=e,[r,aO(a,...t)]}function aO(...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 Sa.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return o.scopeName=t.scopeName,o}var un=b(k(),1);var $b=b(k(),1);function Wb(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Ao(...e){return t=>{let o=!1,r=e.map(a=>{let n=Wb(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():Wb(e[a],null)}}}}function ie(...e){return $b.useCallback(Ao(...e),e)}var wt=b(k(),1);var pi=b(N(),1);function Cr(e){let t=nO(e),o=wt.forwardRef((r,a)=>{let{children:n,...s}=r,i=wt.Children.toArray(n),l=i.find(sO);if(l){let u=l.props.children,c=i.map(d=>d===l?wt.Children.count(u)>1?wt.Children.only(null):wt.isValidElement(u)?u.props.children:null:d);return(0,pi.jsx)(t,{...s,ref:a,children:wt.isValidElement(u)?wt.cloneElement(u,void 0,c):null})}return(0,pi.jsx)(t,{...s,ref:a,children:n})});return o.displayName=`${e}.Slot`,o}function nO(e){let t=wt.forwardRef((o,r)=>{let{children:a,...n}=o;if(wt.isValidElement(a)){let s=lO(a),i=iO(n,a.props);return a.type!==wt.Fragment&&(i.ref=r?Ao(r,s):s),wt.cloneElement(a,i)}return wt.Children.count(a)>1?wt.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var jb=Symbol("radix.slottable");function Kb(e){let t=({children:o})=>(0,pi.jsx)(pi.Fragment,{children:o});return t.displayName=`${e}.Slottable`,t.__radixId=jb,t}function sO(e){return wt.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===jb}function iO(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 lO(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 Nd=b(N(),1),uO=b(k(),1);var cO=b(N(),1);function ea(e){let t=e+"CollectionProvider",[o,r]=Ne(t),[a,n]=o(t,{collectionRef:{current:null},itemMap:new Map}),s=m=>{let{scope:h,children:v}=m,x=un.default.useRef(null),y=un.default.useRef(new Map).current;return(0,Nd.jsx)(a,{scope:h,itemMap:y,collectionRef:x,children:v})};s.displayName=t;let i=e+"CollectionSlot",l=Cr(i),u=un.default.forwardRef((m,h)=>{let{scope:v,children:x}=m,y=n(i,v),R=ie(h,y.collectionRef);return(0,Nd.jsx)(l,{ref:R,children:x})});u.displayName=i;let c=e+"CollectionItemSlot",d="data-radix-collection-item",f=Cr(c),p=un.default.forwardRef((m,h)=>{let{scope:v,children:x,...y}=m,R=un.default.useRef(null),S=ie(h,R),C=n(c,v);return un.default.useEffect(()=>(C.itemMap.set(R,{ref:R,...y}),()=>void C.itemMap.delete(R))),(0,Nd.jsx)(f,{[d]:"",ref:S,children:x})});p.displayName=c;function g(m){let h=n(e+"CollectionConsumer",m);return un.default.useCallback(()=>{let x=h.collectionRef.current;if(!x)return[];let y=Array.from(x.querySelectorAll(`[${d}]`));return Array.from(h.itemMap.values()).sort((C,w)=>y.indexOf(C.ref.current)-y.indexOf(w.ref.current))},[h.collectionRef,h.itemMap])}return[{Provider:s,Slot:u,ItemSlot:p},g,r]}var ij=!!(typeof window<"u"&&window.document&&window.document.createElement);function z(e,t,{checkForDefaultPrevented:o=!0}={}){return function(a){if(e?.(a),o===!1||!a.defaultPrevented)return t?.(a)}}var jo=b(k(),1);var Xb=b(k(),1),ke=globalThis?.document?Xb.useLayoutEffect:()=>{};var Od=b(k(),1);var dO=jo[" useInsertionEffect ".trim().toString()]||ke;function Xe({prop:e,defaultProp:t,onChange:o=()=>{},caller:r}){let[a,n,s]=fO({defaultProp:t,onChange:o}),i=e!==void 0,l=i?e:a;{let c=jo.useRef(e!==void 0);jo.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=jo.useCallback(c=>{if(i){let d=pO(c)?c(e):c;d!==e&&s.current?.(d)}else n(c)},[i,e,n,s]);return[l,u]}function fO({defaultProp:e,onChange:t}){let[o,r]=jo.useState(e),a=jo.useRef(o),n=jo.useRef(t);return dO(()=>{n.current=t},[t]),jo.useEffect(()=>{a.current!==o&&(n.current?.(o),a.current=o)},[o,a]),[o,r,n]}function pO(e){return typeof e=="function"}var dj=Symbol("RADIX:SYNC_STATE");var eC=b(k(),1),tC=b(ta(),1);var oC=b(N(),1),vO=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],j=vO.reduce((e,t)=>{let o=Cr(`Primitive.${t}`),r=eC.forwardRef((a,n)=>{let{asChild:s,...i}=a,l=s?o:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,oC.jsx)(l,{...i,ref:n})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function mi(e,t){e&&tC.flushSync(()=>e.dispatchEvent(t))}var Ht=b(k(),1);var yo=b(k(),1);var rC=b(k(),1);function xO(e,t){return rC.useReducer((o,r)=>t[o][r]??o,e)}var Ye=e=>{let{present:t,children:o}=e,r=yO(t),a=typeof o=="function"?o({present:r.isPresent}):yo.Children.only(o),n=ie(r.ref,bO(a));return typeof o=="function"||r.isPresent?yo.cloneElement(a,{ref:n}):null};Ye.displayName="Presence";function yO(e){let[t,o]=yo.useState(),r=yo.useRef(null),a=yo.useRef(e),n=yo.useRef("none"),s=e?"mounted":"unmounted",[i,l]=xO(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return yo.useEffect(()=>{let u=_d(r.current);n.current=i==="mounted"?u:"none"},[i]),ke(()=>{let u=r.current,c=a.current;if(c!==e){let f=n.current,p=_d(u);e?l("MOUNT"):p==="none"||u?.display==="none"?l("UNMOUNT"):l(c&&f!==p?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,l]),ke(()=>{if(t){let u,c=t.ownerDocument.defaultView??window,d=p=>{let m=_d(r.current).includes(CSS.escape(p.animationName));if(p.target===t&&m&&(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=p=>{p.target===t&&(n.current=_d(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:yo.useCallback(u=>{r.current=u?getComputedStyle(u):null,o(u)},[])}}function _d(e){return e?.animationName||"none"}function bO(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 gg=b(k(),1);var CO=gg[" useId ".trim().toString()]||(()=>{}),wO=0;function ze(e){let[t,o]=gg.useState(CO());return ke(()=>{e||o(r=>r??String(wO++))},[e]),e||(t?`radix-${t}`:"")}var is=b(N(),1),Vd="Collapsible",[SO,hg]=Ne(Vd),[RO,vg]=SO(Vd),aC=Ht.forwardRef((e,t)=>{let{__scopeCollapsible:o,open:r,defaultOpen:a,disabled:n,onOpenChange:s,...i}=e,[l,u]=Xe({prop:r,defaultProp:a??!1,onChange:s,caller:Vd});return(0,is.jsx)(RO,{scope:o,disabled:n,contentId:ze(),open:l,onOpenToggle:Ht.useCallback(()=>u(c=>!c),[u]),children:(0,is.jsx)(j.div,{"data-state":yg(l),"data-disabled":n?"":void 0,...i,ref:t})})});aC.displayName=Vd;var nC="CollapsibleTrigger",sC=Ht.forwardRef((e,t)=>{let{__scopeCollapsible:o,...r}=e,a=vg(nC,o);return(0,is.jsx)(j.button,{type:"button","aria-controls":a.contentId,"aria-expanded":a.open||!1,"data-state":yg(a.open),"data-disabled":a.disabled?"":void 0,disabled:a.disabled,...r,ref:t,onClick:z(e.onClick,a.onOpenToggle)})});sC.displayName=nC;var xg="CollapsibleContent",iC=Ht.forwardRef((e,t)=>{let{forceMount:o,...r}=e,a=vg(xg,e.__scopeCollapsible);return(0,is.jsx)(Ye,{present:o||a.open,children:({present:n})=>(0,is.jsx)(IO,{...r,ref:t,present:n})})});iC.displayName=xg;var IO=Ht.forwardRef((e,t)=>{let{__scopeCollapsible:o,present:r,children:a,...n}=e,s=vg(xg,o),[i,l]=Ht.useState(r),u=Ht.useRef(null),c=ie(t,u),d=Ht.useRef(0),f=d.current,p=Ht.useRef(0),g=p.current,m=s.open||i,h=Ht.useRef(m),v=Ht.useRef(void 0);return Ht.useEffect(()=>{let x=requestAnimationFrame(()=>h.current=!1);return()=>cancelAnimationFrame(x)},[]),ke(()=>{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,p.current=y.width,h.current||(x.style.transitionDuration=v.current.transitionDuration,x.style.animationName=v.current.animationName),l(r)}},[s.open,r]),(0,is.jsx)(j.div,{"data-state":yg(s.open),"data-disabled":s.disabled?"":void 0,id:s.contentId,hidden:!m,...n,ref:c,style:{"--radix-collapsible-content-height":f?`${f}px`:void 0,"--radix-collapsible-content-width":g?`${g}px`:void 0,...e.style},children:m&&a})});function yg(e){return e?"open":"closed"}var Bd=aC,gi=sC,au=iC;var Hd=b(k(),1),PO=b(N(),1),LO=Hd.createContext(void 0);function Ko(e){let t=Hd.useContext(LO);return e||t||"ltr"}var St=b(N(),1),wr="Accordion",TO=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[Cg,MO,kO]=ea(wr),[Gd,Hj]=Ne(wr,[kO,hg]),wg=hg(),uC=bo.default.forwardRef((e,t)=>{let{type:o,...r}=e,a=r,n=r;return(0,St.jsx)(Cg.Provider,{scope:e.__scopeAccordion,children:o==="multiple"?(0,St.jsx)(NO,{...n,ref:t}):(0,St.jsx)(DO,{...a,ref:t})})});uC.displayName=wr;var[cC,EO]=Gd(wr),[dC,AO]=Gd(wr,{collapsible:!1}),DO=bo.default.forwardRef((e,t)=>{let{value:o,defaultValue:r,onValueChange:a=()=>{},collapsible:n=!1,...s}=e,[i,l]=Xe({prop:o,defaultProp:r??"",onChange:a,caller:wr});return(0,St.jsx)(cC,{scope:e.__scopeAccordion,value:bo.default.useMemo(()=>i?[i]:[],[i]),onItemOpen:l,onItemClose:bo.default.useCallback(()=>n&&l(""),[n,l]),children:(0,St.jsx)(dC,{scope:e.__scopeAccordion,collapsible:n,children:(0,St.jsx)(fC,{...s,ref:t})})})}),NO=bo.default.forwardRef((e,t)=>{let{value:o,defaultValue:r,onValueChange:a=()=>{},...n}=e,[s,i]=Xe({prop:o,defaultProp:r??[],onChange:a,caller:wr}),l=bo.default.useCallback(c=>i((d=[])=>[...d,c]),[i]),u=bo.default.useCallback(c=>i((d=[])=>d.filter(f=>f!==c)),[i]);return(0,St.jsx)(cC,{scope:e.__scopeAccordion,value:s,onItemOpen:l,onItemClose:u,children:(0,St.jsx)(dC,{scope:e.__scopeAccordion,collapsible:!0,children:(0,St.jsx)(fC,{...n,ref:t})})})}),[OO,zd]=Gd(wr),fC=bo.default.forwardRef((e,t)=>{let{__scopeAccordion:o,disabled:r,dir:a,orientation:n="vertical",...s}=e,i=bo.default.useRef(null),l=ie(i,t),u=MO(o),d=Ko(a)==="ltr",f=z(e.onKeyDown,p=>{if(!TO.includes(p.key))return;let g=p.target,m=u().filter(I=>!I.ref.current?.disabled),h=m.findIndex(I=>I.ref.current===g),v=m.length;if(h===-1)return;p.preventDefault();let x=h,y=0,R=v-1,S=()=>{x=h+1,x>R&&(x=y)},C=()=>{x=h-1,x<y&&(x=R)};switch(p.key){case"Home":x=y;break;case"End":x=R;break;case"ArrowRight":n==="horizontal"&&(d?S():C());break;case"ArrowDown":n==="vertical"&&S();break;case"ArrowLeft":n==="horizontal"&&(d?C():S());break;case"ArrowUp":n==="vertical"&&C();break}let w=x%v;m[w].ref.current?.focus()});return(0,St.jsx)(OO,{scope:o,disabled:r,direction:a,orientation:n,children:(0,St.jsx)(Cg.Slot,{scope:o,children:(0,St.jsx)(j.div,{...s,"data-orientation":n,ref:l,onKeyDown:r?void 0:f})})})}),Ud="AccordionItem",[FO,Sg]=Gd(Ud),pC=bo.default.forwardRef((e,t)=>{let{__scopeAccordion:o,value:r,...a}=e,n=zd(Ud,o),s=EO(Ud,o),i=wg(o),l=ze(),u=r&&s.value.includes(r)||!1,c=n.disabled||e.disabled;return(0,St.jsx)(FO,{scope:o,open:u,disabled:c,triggerId:l,children:(0,St.jsx)(Bd,{"data-orientation":n.orientation,"data-state":yC(u),...i,...a,ref:t,disabled:c,open:u,onOpenChange:d=>{d?s.onItemOpen(r):s.onItemClose(r)}})})});pC.displayName=Ud;var mC="AccordionHeader",gC=bo.default.forwardRef((e,t)=>{let{__scopeAccordion:o,...r}=e,a=zd(wr,o),n=Sg(mC,o);return(0,St.jsx)(j.h3,{"data-orientation":a.orientation,"data-state":yC(n.open),"data-disabled":n.disabled?"":void 0,...r,ref:t})});gC.displayName=mC;var bg="AccordionTrigger",hC=bo.default.forwardRef((e,t)=>{let{__scopeAccordion:o,...r}=e,a=zd(wr,o),n=Sg(bg,o),s=AO(bg,o),i=wg(o);return(0,St.jsx)(Cg.ItemSlot,{scope:o,children:(0,St.jsx)(gi,{"aria-disabled":n.open&&!s.collapsible||void 0,"data-orientation":a.orientation,id:n.triggerId,...i,...r,ref:t})})});hC.displayName=bg;var vC="AccordionContent",xC=bo.default.forwardRef((e,t)=>{let{__scopeAccordion:o,...r}=e,a=zd(wr,o),n=Sg(vC,o),s=wg(o);return(0,St.jsx)(au,{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}})});xC.displayName=vC;function yC(e){return e?"open":"closed"}var bC=uC,CC=pC,wC=gC,Rg=hC,Ig=xC;var Wd=b(k());var SC=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),VO=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,o,r)=>r?r.toUpperCase():o.toLowerCase()),Pg=e=>{let t=VO(e);return t.charAt(0).toUpperCase()+t.slice(1)},qd=(...e)=>e.filter((t,o,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===o).join(" ").trim(),RC=e=>{for(let t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var nu=b(k());var IC={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 PC=(0,nu.forwardRef)(({color:e="currentColor",size:t=24,strokeWidth:o=2,absoluteStrokeWidth:r,className:a="",children:n,iconNode:s,...i},l)=>(0,nu.createElement)("svg",{ref:l,...IC,width:t,height:t,stroke:e,strokeWidth:r?Number(o)*24/Number(t):o,className:qd("lucide",a),...!n&&!RC(i)&&{"aria-hidden":"true"},...i},[...s.map(([u,c])=>(0,nu.createElement)(u,c)),...Array.isArray(n)?n:[n]]));var U=(e,t)=>{let o=(0,Wd.forwardRef)(({className:r,...a},n)=>(0,Wd.createElement)(PC,{ref:n,iconNode:t,className:qd(`lucide-${SC(Pg(e))}`,`lucide-${e}`,r),...a}));return o.displayName=Pg(e),o};var BO=[["path",{d:"M17 12H7",key:"16if0g"}],["path",{d:"M19 18H5",key:"18s9l3"}],["path",{d:"M21 6H3",key:"1jwq7v"}]],su=U("align-center",BO);var HO=[["path",{d:"M3 12h18",key:"1i2n21"}],["path",{d:"M3 18h18",key:"1h113x"}],["path",{d:"M3 6h18",key:"d0wm0j"}]],iu=U("align-justify",HO);var UO=[["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M17 18H3",key:"1amg6g"}],["path",{d:"M21 6H3",key:"1jwq7v"}]],lu=U("align-left",UO);var GO=[["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M21 18H7",key:"1ygte8"}],["path",{d:"M21 6H3",key:"1jwq7v"}]],uu=U("align-right",GO);var zO=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],hi=U("arrow-down",zO);var qO=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],cu=U("arrow-left",qO);var WO=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],du=U("arrow-right",WO);var $O=[["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"}]],vi=U("arrow-up-down",$O);var jO=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],xi=U("arrow-up",jO);var KO=[["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"}]],fu=U("bold",KO);var XO=[["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=U("calendar",XO);var YO=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],$t=U("check",YO);var ZO=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],oa=U("chevron-down",ZO);var QO=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],Sr=U("chevron-left",QO);var JO=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],lo=U("chevron-right",JO);var eF=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],pu=U("chevron-up",eF);var tF=[["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"}]],Rr=U("circle-alert",tF);var oF=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],dn=U("circle-check-big",oF);var rF=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],us=U("circle",rF);var aF=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],mu=U("clock",aF);var nF=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],gu=U("code",nF);var sF=[["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"}]],hu=U("copy",sF);var iF=[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]],vu=U("credit-card",iF);var lF=[["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"}]],yi=U("crown",lF);var uF=[["circle",{cx:"12.1",cy:"12.1",r:"1",key:"18d7e5"}]],xu=U("dot",uF);var cF=[["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"}]],ra=U("ellipsis",cF);var dF=[["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"}]],yu=U("external-link",dF);var fF=[["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"}]],cs=U("eye",fF);var pF=[["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"}]],bu=U("file-text",pF);var mF=[["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"}]],Cu=U("file",mF);var gF=[["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"}]],wu=U("git-fork",gF);var hF=[["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"}]],ds=U("image",hF);var vF=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],bi=U("info",vF);var xF=[["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"}]],Su=U("italic",xF);var yF=[["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"}]],Ru=U("link",yF);var bF=[["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"}]],Iu=U("list-ordered",bF);var CF=[["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"}]],Pu=U("list",CF);var wF=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Rt=U("loader-circle",wF);var SF=[["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"}]],Ci=U("lock",SF);var RF=[["path",{d:"M5 12h14",key:"1ays0h"}]],Lu=U("minus",RF);var IF=[["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"}]],Tu=U("music",IF);var PF=[["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"}]],wi=U("palette",PF);var LF=[["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"}]],Mu=U("phone",LF);var TF=[["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"}]],$d=U("pipette",TF);var MF=[["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"}]],ku=U("quote",MF);var kF=[["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"}]],Eu=U("redo",kF);var EF=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],fs=U("search",EF);var AF=[["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"}]],Co=U("square-pen",AF);var DF=[["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"}]],fn=U("star",DF);var NF=[["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"}]],Au=U("strikethrough",NF);var OF=[["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"}]],pn=U("triangle-alert",OF);var FF=[["path",{d:"M6 4v6a6 6 0 0 0 12 0V4",key:"9kb039"}],["line",{x1:"4",x2:"20",y1:"20",y2:"20",key:"nun2al"}]],Du=U("underline",FF);var _F=[["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"}]],Nu=U("undo",_F);var VF=[["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"}]],Ou=U("upload",VF);var BF=[["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"}]],Fu=U("video",BF);var HF=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Do=U("x",HF);var UF=[["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"}]],Si=U("zap",UF);function LC(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=LC(e[t]))&&(r&&(r+=" "),r+=o)}else for(o in e)e[o]&&(r&&(r+=" "),r+=o);return r}function jd(){for(var e,t,o=0,r="",a=arguments.length;o<a;o++)(e=arguments[o])&&(t=LC(e))&&(r&&(r+=" "),r+=t);return r}var GF=e=>{let t=qF(e),{conflictingClassGroups:o,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{let i=s.split("-");return i[0]===""&&i.length!==1&&i.shift(),AC(i,t)||zF(s)},getConflictingClassGroupIds:(s,i)=>{let l=o[s]||[];return i&&r[s]?[...l,...r[s]]:l}}},AC=(e,t)=>{if(e.length===0)return t.classGroupId;let o=e[0],r=t.nextPart.get(o),a=r?AC(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},TC=/^\[(.+)\]$/,zF=e=>{if(TC.test(e)){let t=TC.exec(e)[1],o=t?.substring(0,t.indexOf(":"));if(o)return"arbitrary.."+o}},qF=e=>{let{theme:t,classGroups:o}=e,r={nextPart:new Map,validators:[]};for(let a in o)Mg(o[a],r,a,t);return r},Mg=(e,t,o,r)=>{e.forEach(a=>{if(typeof a=="string"){let n=a===""?t:MC(t,a);n.classGroupId=o;return}if(typeof a=="function"){if(WF(a)){Mg(a(r),t,o,r);return}t.validators.push({validator:a,classGroupId:o});return}Object.entries(a).forEach(([n,s])=>{Mg(s,MC(t,n),o,r)})})},MC=(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},WF=e=>e.isThemeGetter,$F=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 jF=e=>{let{prefix:t,experimentalParseClassName:o}=e,r=a=>{let n=[],s=0,i=0,l=0,u;for(let g=0;g<a.length;g++){let m=a[g];if(s===0&&i===0){if(m===":"){n.push(a.slice(l,g)),l=g+1;continue}if(m==="/"){u=g;continue}}m==="["?s++:m==="]"?s--:m==="("?i++:m===")"&&i--}let c=n.length===0?a:a.substring(l),d=KF(c),f=d!==c,p=u&&u>l?u-l:void 0;return{modifiers:n,hasImportantModifier:f,baseClassName:d,maybePostfixModifierPosition:p}};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},KF=e=>e.endsWith("!")?e.substring(0,e.length-1):e.startsWith("!")?e.substring(1):e,XF=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}},YF=e=>({cache:$F(e.cacheSize),parseClassName:jF(e),sortModifiers:XF(e),...GF(e)}),ZF=/\s+/,QF=(e,t)=>{let{parseClassName:o,getClassGroupId:r,getConflictingClassGroupIds:a,sortModifiers:n}=t,s=[],i=e.trim().split(ZF),l="";for(let u=i.length-1;u>=0;u-=1){let c=i[u],{isExternal:d,modifiers:f,hasImportantModifier:p,baseClassName:g,maybePostfixModifierPosition:m}=o(c);if(d){l=c+(l.length>0?" "+l:l);continue}let h=!!m,v=r(h?g.substring(0,m):g);if(!v){if(!h){l=c+(l.length>0?" "+l:l);continue}if(v=r(g),!v){l=c+(l.length>0?" "+l:l);continue}h=!1}let x=n(f).join(":"),y=p?x+"!":x,R=y+v;if(s.includes(R))continue;s.push(R);let S=a(v,h);for(let C=0;C<S.length;++C){let w=S[C];s.push(y+w)}l=c+(l.length>0?" "+l:l)}return l};function JF(){let e=0,t,o,r="";for(;e<arguments.length;)(t=arguments[e++])&&(o=DC(t))&&(r&&(r+=" "),r+=o);return r}var DC=e=>{if(typeof e=="string")return e;let t,o="";for(let r=0;r<e.length;r++)e[r]&&(t=DC(e[r]))&&(o&&(o+=" "),o+=t);return o};function e2(e,...t){let o,r,a,n=s;function s(l){let u=t.reduce((c,d)=>d(c),e());return o=YF(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=QF(l,o);return a(l,c),c}return function(){return n(JF.apply(null,arguments))}}var It=e=>{let t=o=>o[e]||[];return t.isThemeGetter=!0,t},NC=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,OC=/^\((?:(\w[\w-]*):)?(.+)\)$/i,t2=/^\d+\/\d+$/,o2=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,r2=/\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$/,a2=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,n2=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,s2=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ri=e=>t2.test(e),Le=e=>!!e&&!Number.isNaN(Number(e)),mn=e=>!!e&&Number.isInteger(Number(e)),Lg=e=>e.endsWith("%")&&Le(e.slice(0,-1)),Ra=e=>o2.test(e),i2=()=>!0,l2=e=>r2.test(e)&&!a2.test(e),FC=()=>!1,u2=e=>n2.test(e),c2=e=>s2.test(e),d2=e=>!re(e)&&!ae(e),f2=e=>Ii(e,BC,FC),re=e=>NC.test(e),ps=e=>Ii(e,HC,l2),Tg=e=>Ii(e,v2,Le),kC=e=>Ii(e,_C,FC),p2=e=>Ii(e,VC,c2),Kd=e=>Ii(e,UC,u2),ae=e=>OC.test(e),_u=e=>Pi(e,HC),m2=e=>Pi(e,x2),EC=e=>Pi(e,_C),g2=e=>Pi(e,BC),h2=e=>Pi(e,VC),Xd=e=>Pi(e,UC,!0),Ii=(e,t,o)=>{let r=NC.exec(e);return r?r[1]?t(r[1]):o(r[2]):!1},Pi=(e,t,o=!1)=>{let r=OC.exec(e);return r?r[1]?t(r[1]):o:!1},_C=e=>e==="position"||e==="percentage",VC=e=>e==="image"||e==="url",BC=e=>e==="length"||e==="size"||e==="bg-size",HC=e=>e==="length",v2=e=>e==="number",x2=e=>e==="family-name",UC=e=>e==="shadow";var y2=()=>{let e=It("color"),t=It("font"),o=It("text"),r=It("font-weight"),a=It("tracking"),n=It("leading"),s=It("breakpoint"),i=It("container"),l=It("spacing"),u=It("radius"),c=It("shadow"),d=It("inset-shadow"),f=It("text-shadow"),p=It("drop-shadow"),g=It("blur"),m=It("perspective"),h=It("aspect"),v=It("ease"),x=It("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"],S=()=>[...R(),ae,re],C=()=>["auto","hidden","clip","visible","scroll"],w=()=>["auto","contain","none"],I=()=>[ae,re,l],L=()=>[Ri,"full","auto",...I()],T=()=>[mn,"none","subgrid",ae,re],M=()=>["auto",{span:["full",mn,ae,re]},mn,ae,re],F=()=>[mn,"auto",ae,re],V=()=>["auto","min","max","fr",ae,re],A=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],G=()=>["start","end","center","stretch","center-safe","end-safe"],_=()=>["auto",...I()],O=()=>[Ri,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...I()],E=()=>[e,ae,re],D=()=>[...R(),EC,kC,{position:[ae,re]}],te=()=>["no-repeat",{repeat:["","x","y","space","round"]}],ue=()=>["auto","cover","contain",g2,f2,{size:[ae,re]}],B=()=>[Lg,_u,ps],$=()=>["","none","full",u,ae,re],Z=()=>["",Le,_u,ps],X=()=>["solid","dashed","dotted","double"],se=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],H=()=>[Le,Lg,EC,kC],oe=()=>["","none",g,ae,re],fe=()=>["none",Le,ae,re],me=()=>["none",Le,ae,re],pe=()=>[Le,ae,re],K=()=>[Ri,"full",...I()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ra],breakpoint:[Ra],color:[i2],container:[Ra],"drop-shadow":[Ra],ease:["in","out","in-out"],font:[d2],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ra],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ra],shadow:[Ra],spacing:["px",Le],text:[Ra],"text-shadow":[Ra],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ri,re,ae,h]}],container:["container"],columns:[{columns:[Le,re,ae,i]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:S()}],overflow:[{overflow:C()}],"overflow-x":[{"overflow-x":C()}],"overflow-y":[{"overflow-y":C()}],overscroll:[{overscroll:w()}],"overscroll-x":[{"overscroll-x":w()}],"overscroll-y":[{"overscroll-y":w()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:L()}],"inset-x":[{"inset-x":L()}],"inset-y":[{"inset-y":L()}],start:[{start:L()}],end:[{end:L()}],top:[{top:L()}],right:[{right:L()}],bottom:[{bottom:L()}],left:[{left:L()}],visibility:["visible","invisible","collapse"],z:[{z:[mn,"auto",ae,re]}],basis:[{basis:[Ri,"full","auto",i,...I()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Le,Ri,"auto","initial","none",re]}],grow:[{grow:["",Le,ae,re]}],shrink:[{shrink:["",Le,ae,re]}],order:[{order:[mn,"first","last","none",ae,re]}],"grid-cols":[{"grid-cols":T()}],"col-start-end":[{col:M()}],"col-start":[{"col-start":F()}],"col-end":[{"col-end":F()}],"grid-rows":[{"grid-rows":T()}],"row-start-end":[{row:M()}],"row-start":[{"row-start":F()}],"row-end":[{"row-end":F()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":V()}],"auto-rows":[{"auto-rows":V()}],gap:[{gap:I()}],"gap-x":[{"gap-x":I()}],"gap-y":[{"gap-y":I()}],"justify-content":[{justify:[...A(),"normal"]}],"justify-items":[{"justify-items":[...G(),"normal"]}],"justify-self":[{"justify-self":["auto",...G()]}],"align-content":[{content:["normal",...A()]}],"align-items":[{items:[...G(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...G(),{baseline:["","last"]}]}],"place-content":[{"place-content":A()}],"place-items":[{"place-items":[...G(),"baseline"]}],"place-self":[{"place-self":["auto",...G()]}],p:[{p:I()}],px:[{px:I()}],py:[{py:I()}],ps:[{ps:I()}],pe:[{pe:I()}],pt:[{pt:I()}],pr:[{pr:I()}],pb:[{pb:I()}],pl:[{pl:I()}],m:[{m:_()}],mx:[{mx:_()}],my:[{my:_()}],ms:[{ms:_()}],me:[{me:_()}],mt:[{mt:_()}],mr:[{mr:_()}],mb:[{mb:_()}],ml:[{ml:_()}],"space-x":[{"space-x":I()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":I()}],"space-y-reverse":["space-y-reverse"],size:[{size:O()}],w:[{w:[i,"screen",...O()]}],"min-w":[{"min-w":[i,"screen","none",...O()]}],"max-w":[{"max-w":[i,"screen","none","prose",{screen:[s]},...O()]}],h:[{h:["screen","lh",...O()]}],"min-h":[{"min-h":["screen","lh","none",...O()]}],"max-h":[{"max-h":["screen","lh",...O()]}],"font-size":[{text:["base",o,_u,ps]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,ae,Tg]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Lg,re]}],"font-family":[{font:[m2,re,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,ae,re]}],"line-clamp":[{"line-clamp":[Le,"none",ae,Tg]}],leading:[{leading:[n,...I()]}],"list-image":[{"list-image":["none",ae,re]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ae,re]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:E()}],"text-color":[{text:E()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...X(),"wavy"]}],"text-decoration-thickness":[{decoration:[Le,"from-font","auto",ae,ps]}],"text-decoration-color":[{decoration:E()}],"underline-offset":[{"underline-offset":[Le,"auto",ae,re]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:I()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ae,re]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ae,re]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:D()}],"bg-repeat":[{bg:te()}],"bg-size":[{bg:ue()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},mn,ae,re],radial:["",ae,re],conic:[mn,ae,re]},h2,p2]}],"bg-color":[{bg:E()}],"gradient-from-pos":[{from:B()}],"gradient-via-pos":[{via:B()}],"gradient-to-pos":[{to:B()}],"gradient-from":[{from:E()}],"gradient-via":[{via:E()}],"gradient-to":[{to:E()}],rounded:[{rounded:$()}],"rounded-s":[{"rounded-s":$()}],"rounded-e":[{"rounded-e":$()}],"rounded-t":[{"rounded-t":$()}],"rounded-r":[{"rounded-r":$()}],"rounded-b":[{"rounded-b":$()}],"rounded-l":[{"rounded-l":$()}],"rounded-ss":[{"rounded-ss":$()}],"rounded-se":[{"rounded-se":$()}],"rounded-ee":[{"rounded-ee":$()}],"rounded-es":[{"rounded-es":$()}],"rounded-tl":[{"rounded-tl":$()}],"rounded-tr":[{"rounded-tr":$()}],"rounded-br":[{"rounded-br":$()}],"rounded-bl":[{"rounded-bl":$()}],"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:E()}],"border-color-x":[{"border-x":E()}],"border-color-y":[{"border-y":E()}],"border-color-s":[{"border-s":E()}],"border-color-e":[{"border-e":E()}],"border-color-t":[{"border-t":E()}],"border-color-r":[{"border-r":E()}],"border-color-b":[{"border-b":E()}],"border-color-l":[{"border-l":E()}],"divide-color":[{divide:E()}],"outline-style":[{outline:[...X(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Le,ae,re]}],"outline-w":[{outline:["",Le,_u,ps]}],"outline-color":[{outline:E()}],shadow:[{shadow:["","none",c,Xd,Kd]}],"shadow-color":[{shadow:E()}],"inset-shadow":[{"inset-shadow":["none",d,Xd,Kd]}],"inset-shadow-color":[{"inset-shadow":E()}],"ring-w":[{ring:Z()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:E()}],"ring-offset-w":[{"ring-offset":[Le,ps]}],"ring-offset-color":[{"ring-offset":E()}],"inset-ring-w":[{"inset-ring":Z()}],"inset-ring-color":[{"inset-ring":E()}],"text-shadow":[{"text-shadow":["none",f,Xd,Kd]}],"text-shadow-color":[{"text-shadow":E()}],opacity:[{opacity:[Le,ae,re]}],"mix-blend":[{"mix-blend":[...se(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":se()}],"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":[Le]}],"mask-image-linear-from-pos":[{"mask-linear-from":H()}],"mask-image-linear-to-pos":[{"mask-linear-to":H()}],"mask-image-linear-from-color":[{"mask-linear-from":E()}],"mask-image-linear-to-color":[{"mask-linear-to":E()}],"mask-image-t-from-pos":[{"mask-t-from":H()}],"mask-image-t-to-pos":[{"mask-t-to":H()}],"mask-image-t-from-color":[{"mask-t-from":E()}],"mask-image-t-to-color":[{"mask-t-to":E()}],"mask-image-r-from-pos":[{"mask-r-from":H()}],"mask-image-r-to-pos":[{"mask-r-to":H()}],"mask-image-r-from-color":[{"mask-r-from":E()}],"mask-image-r-to-color":[{"mask-r-to":E()}],"mask-image-b-from-pos":[{"mask-b-from":H()}],"mask-image-b-to-pos":[{"mask-b-to":H()}],"mask-image-b-from-color":[{"mask-b-from":E()}],"mask-image-b-to-color":[{"mask-b-to":E()}],"mask-image-l-from-pos":[{"mask-l-from":H()}],"mask-image-l-to-pos":[{"mask-l-to":H()}],"mask-image-l-from-color":[{"mask-l-from":E()}],"mask-image-l-to-color":[{"mask-l-to":E()}],"mask-image-x-from-pos":[{"mask-x-from":H()}],"mask-image-x-to-pos":[{"mask-x-to":H()}],"mask-image-x-from-color":[{"mask-x-from":E()}],"mask-image-x-to-color":[{"mask-x-to":E()}],"mask-image-y-from-pos":[{"mask-y-from":H()}],"mask-image-y-to-pos":[{"mask-y-to":H()}],"mask-image-y-from-color":[{"mask-y-from":E()}],"mask-image-y-to-color":[{"mask-y-to":E()}],"mask-image-radial":[{"mask-radial":[ae,re]}],"mask-image-radial-from-pos":[{"mask-radial-from":H()}],"mask-image-radial-to-pos":[{"mask-radial-to":H()}],"mask-image-radial-from-color":[{"mask-radial-from":E()}],"mask-image-radial-to-color":[{"mask-radial-to":E()}],"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":[Le]}],"mask-image-conic-from-pos":[{"mask-conic-from":H()}],"mask-image-conic-to-pos":[{"mask-conic-to":H()}],"mask-image-conic-from-color":[{"mask-conic-from":E()}],"mask-image-conic-to-color":[{"mask-conic-to":E()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:D()}],"mask-repeat":[{mask:te()}],"mask-size":[{mask:ue()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ae,re]}],filter:[{filter:["","none",ae,re]}],blur:[{blur:oe()}],brightness:[{brightness:[Le,ae,re]}],contrast:[{contrast:[Le,ae,re]}],"drop-shadow":[{"drop-shadow":["","none",p,Xd,Kd]}],"drop-shadow-color":[{"drop-shadow":E()}],grayscale:[{grayscale:["",Le,ae,re]}],"hue-rotate":[{"hue-rotate":[Le,ae,re]}],invert:[{invert:["",Le,ae,re]}],saturate:[{saturate:[Le,ae,re]}],sepia:[{sepia:["",Le,ae,re]}],"backdrop-filter":[{"backdrop-filter":["","none",ae,re]}],"backdrop-blur":[{"backdrop-blur":oe()}],"backdrop-brightness":[{"backdrop-brightness":[Le,ae,re]}],"backdrop-contrast":[{"backdrop-contrast":[Le,ae,re]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Le,ae,re]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Le,ae,re]}],"backdrop-invert":[{"backdrop-invert":["",Le,ae,re]}],"backdrop-opacity":[{"backdrop-opacity":[Le,ae,re]}],"backdrop-saturate":[{"backdrop-saturate":[Le,ae,re]}],"backdrop-sepia":[{"backdrop-sepia":["",Le,ae,re]}],"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:["","all","colors","opacity","shadow","transform","none",ae,re]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Le,"initial",ae,re]}],ease:[{ease:["linear","initial",v,ae,re]}],delay:[{delay:[Le,ae,re]}],animate:[{animate:["none",x,ae,re]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,ae,re]}],"perspective-origin":[{"perspective-origin":S()}],rotate:[{rotate:fe()}],"rotate-x":[{"rotate-x":fe()}],"rotate-y":[{"rotate-y":fe()}],"rotate-z":[{"rotate-z":fe()}],scale:[{scale:me()}],"scale-x":[{"scale-x":me()}],"scale-y":[{"scale-y":me()}],"scale-z":[{"scale-z":me()}],"scale-3d":["scale-3d"],skew:[{skew:pe()}],"skew-x":[{"skew-x":pe()}],"skew-y":[{"skew-y":pe()}],transform:[{transform:[ae,re,"","none","gpu","cpu"]}],"transform-origin":[{origin:S()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:K()}],"translate-x":[{"translate-x":K()}],"translate-y":[{"translate-y":K()}],"translate-z":[{"translate-z":K()}],"translate-none":["translate-none"],accent:[{accent:E()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:E()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ae,re]}],"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":I()}],"scroll-mx":[{"scroll-mx":I()}],"scroll-my":[{"scroll-my":I()}],"scroll-ms":[{"scroll-ms":I()}],"scroll-me":[{"scroll-me":I()}],"scroll-mt":[{"scroll-mt":I()}],"scroll-mr":[{"scroll-mr":I()}],"scroll-mb":[{"scroll-mb":I()}],"scroll-ml":[{"scroll-ml":I()}],"scroll-p":[{"scroll-p":I()}],"scroll-px":[{"scroll-px":I()}],"scroll-py":[{"scroll-py":I()}],"scroll-ps":[{"scroll-ps":I()}],"scroll-pe":[{"scroll-pe":I()}],"scroll-pt":[{"scroll-pt":I()}],"scroll-pr":[{"scroll-pr":I()}],"scroll-pb":[{"scroll-pb":I()}],"scroll-pl":[{"scroll-pl":I()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ae,re]}],fill:[{fill:["none",...E()]}],"stroke-w":[{stroke:[Le,_u,ps,Tg]}],stroke:[{stroke:["none",...E()]}],"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 GC=e2(y2);function P(...e){return GC(jd(e))}var gn=b(N()),b2=bC,zC=Yd.forwardRef(({className:e,...t},o)=>(0,gn.jsx)(CC,{ref:o,className:P("moonui-theme","border-b border-gray-200 dark:border-gray-800",e),...t}));zC.displayName="AccordionItem";var qC=Yd.forwardRef(({className:e,children:t,...o},r)=>(0,gn.jsx)(wC,{className:"flex",children:(0,gn.jsxs)(Rg,{ref:r,className:P("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,gn.jsx)(oa,{className:"h-4 w-4 shrink-0 transition-transform duration-200 opacity-70 group-hover:opacity-100"})]})}));qC.displayName=Rg.displayName;var WC=Yd.forwardRef(({className:e,children:t,...o},r)=>(0,gn.jsx)(Ig,{ref:r,className:P("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,gn.jsx)("div",{className:"pb-4 pt-0",children:t})}));WC.displayName=Ig.displayName;var Li=b(k());var $C=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,jC=jd,Y=(e,t)=>o=>{var r;if(t?.variants==null)return jC(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=$C(c)||$C(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,...p}=c;return Object.entries(p).every(g=>{let[m,h]=g;return Array.isArray(h)?h.includes({...n,...i}[m]):{...n,...i}[m]===h})?[...u,d,f]:u},[]);return jC(e,s,l,o?.class,o?.className)};var Ia=b(N()),C2=Y("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-info/10 text-info border-info/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}}),KC=Li.forwardRef(({className:e,variant:t="default",size:o,radius:r,hideIcon:a=!1,closable:n=!1,onClose:s,children:i,...l},u)=>{let c=Li.useMemo(()=>{switch(t){case"success":return $t;case"warning":return pn;case"error":return Rr;case"info":return bi;default:return bi}},[t]);return(0,Ia.jsxs)("div",{ref:u,role:"alert",className:P("moonui-theme",C2({variant:t,size:o,radius:r,withClose:n}),e),...l,children:[!a&&(0,Ia.jsx)(c,{className:"h-5 w-5"}),(0,Ia.jsx)("div",{className:"flex-1",children:i}),n&&s&&(0,Ia.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":"Close alert",children:(0,Ia.jsx)(Do,{className:"h-4 w-4"})})]})});KC.displayName="Alert";var XC=Li.forwardRef(({className:e,...t},o)=>(0,Ia.jsx)("h5",{ref:o,className:P("moonui-theme","font-semibold leading-tight tracking-tight mb-1",e),...t}));XC.displayName="AlertTitle";var YC=Li.forwardRef(({className:e,...t},o)=>(0,Ia.jsx)("div",{ref:o,className:P("moonui-theme","text-sm leading-5 text-muted-foreground",e),...t}));YC.displayName="AlertDescription";var ZC=b(k());var kg=b(N()),w2=Y("relative overflow-hidden",{variants:{variant:{default:"bg-muted/10",ghost:"bg-transparent",outline:"border border-border",card:"bg-card shadow-sm"},radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{variant:"default",radius:"md"}}),QC=ZC.forwardRef(({className:e,variant:t,radius:o,ratio:r=16/9,style:a,children:n,...s},i)=>(0,kg.jsx)("div",{ref:i,className:P("moonui-theme",w2({variant:t,radius:o}),e),style:{position:"relative",paddingBottom:`${1/r*100}%`,...a},...s,children:(0,kg.jsx)("div",{className:"absolute inset-0",children:n})}));QC.displayName="AspectRatio";var ms=b(k());var Xo=b(k(),1);var Ti=b(k(),1);function Ee(e){let t=Ti.useRef(e);return Ti.useEffect(()=>{t.current=e}),Ti.useMemo(()=>(...o)=>t.current?.(...o),[])}var rw=b(ow(),1);function aw(){return(0,rw.useSyncExternalStore)(A2,()=>!0,()=>!1)}function A2(){return()=>{}}var Vu=b(N(),1),Ag="Avatar",[D2,EK]=Ne(Ag),[N2,sw]=D2(Ag),iw=Xo.forwardRef((e,t)=>{let{__scopeAvatar:o,...r}=e,[a,n]=Xo.useState("idle");return(0,Vu.jsx)(N2,{scope:o,imageLoadingStatus:a,onImageLoadingStatusChange:n,children:(0,Vu.jsx)(j.span,{...r,ref:t})})});iw.displayName=Ag;var lw="AvatarImage",uw=Xo.forwardRef((e,t)=>{let{__scopeAvatar:o,src:r,onLoadingStatusChange:a=()=>{},...n}=e,s=sw(lw,o),i=O2(r,n),l=Ee(u=>{a(u),s.onImageLoadingStatusChange(u)});return ke(()=>{i!=="idle"&&l(i)},[i,l]),i==="loaded"?(0,Vu.jsx)(j.img,{...n,ref:t,src:r}):null});uw.displayName=lw;var cw="AvatarFallback",dw=Xo.forwardRef((e,t)=>{let{__scopeAvatar:o,delayMs:r,...a}=e,n=sw(cw,o),[s,i]=Xo.useState(r===void 0);return Xo.useEffect(()=>{if(r!==void 0){let l=window.setTimeout(()=>i(!0),r);return()=>window.clearTimeout(l)}},[r]),s&&n.imageLoadingStatus!=="loaded"?(0,Vu.jsx)(j.span,{...a,ref:t}):null});dw.displayName=cw;function nw(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function O2(e,{referrerPolicy:t,crossOrigin:o}){let r=aw(),a=Xo.useRef(null),n=r?(a.current||(a.current=new window.Image),a.current):null,[s,i]=Xo.useState(()=>nw(n,e));return ke(()=>{i(nw(n,e))},[n,e]),ke(()=>{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 Dg=iw,Ng=uw,Og=dw;var Ir=b(N()),_2=Y("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"}}),Fg=ms.forwardRef(({className:e,size:t,radius:o,variant:r,...a},n)=>(0,Ir.jsx)(Dg,{ref:n,className:P("moonui-theme",_2({size:t,radius:o,variant:r}),e),...a}));Fg.displayName=Dg.displayName;var fw=ms.forwardRef(({className:e,...t},o)=>(0,Ir.jsx)(Ng,{ref:o,className:P("moonui-theme","aspect-square h-full w-full",e),...t}));fw.displayName=Ng.displayName;var _g=ms.forwardRef(({className:e,...t},o)=>(0,Ir.jsx)(Og,{ref:o,className:P("flex h-full w-full items-center justify-center bg-muted",e),...t}));_g.displayName=Og.displayName;var pw=ms.forwardRef(({className:e,max:t,children:o,overlapOffset:r=-8,...a},n)=>{let s=ms.Children.toArray(o),i=t?s.slice(0,t):s,l=t?Math.max(0,s.length-t):0;return(0,Ir.jsx)("div",{ref:n,className:P("moonui-theme","flex items-center",e),...a,children:(0,Ir.jsxs)("div",{className:"flex",children:[i.map((u,c)=>(0,Ir.jsx)("div",{className:"relative",style:{marginLeft:c===0?0:`${r}px`,zIndex:i.length-c},children:u},c)),l>0&&(0,Ir.jsx)("div",{className:"relative z-0",style:{marginLeft:`${r}px`},children:(0,Ir.jsx)(Fg,{variant:"border",children:(0,Ir.jsxs)(_g,{children:["+",l]})})})]})})});pw.displayName="AvatarGroup";var mw=b(k());var jt=b(N()),gw=Y(["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-primary text-primary-foreground","hover:bg-primary/90","focus-visible:ring-primary/30 dark:focus-visible:ring-primary/40","dark:bg-primary/90 dark:shadow-inner dark:shadow-primary/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-success-foreground","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-success-foreground dark:shadow-inner dark:shadow-success/10"],warning:["border-transparent bg-warning text-warning-foreground","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-warning-foreground 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"}}),wo=mw.forwardRef(({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},p)=>{let g=l,m=d;return t==="pro"&&(g=l||(0,jt.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,jt.jsx)("path",{d:"M12 0L13.09 8.26L22 9L13.09 9.74L12 18L10.91 9.74L2 9L10.91 8.26L12 0Z",fill:"currentColor"}),(0,jt.jsx)("path",{d:"M19 5L19.5 7L21 7.5L19.5 8L19 10L18.5 8L17 7.5L18.5 7L19 5Z",fill:"currentColor"}),(0,jt.jsx)("path",{d:"M19 15L19.5 17L21 17.5L19.5 18L19 20L18.5 18L17 17.5L18.5 17L19 15Z",fill:"currentColor"})]}),m=d||"Pro"),t==="admin"&&(g=l||(0,jt.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,jt.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"})}),m=d||"Admin Pro"),(0,jt.jsxs)("div",{ref:p,className:P("moonui-theme",gw({variant:t,size:o,radius:r}),c&&"mr-0 mb-0",e),"data-removable":s?"":void 0,...f,children:[a&&(0,jt.jsx)("span",{className:P("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"}),g&&(0,jt.jsx)("span",{className:"inline-flex shrink-0 items-center",children:g}),(0,jt.jsx)("span",{className:"inline-flex items-center",children:m}),u&&(0,jt.jsx)("span",{className:"inline-flex shrink-0 items-center",children:u}),s&&i&&(0,jt.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:h=>{h.stopPropagation(),i()},"aria-label":"Remove badge",children:(0,jt.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,jt.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"})})})]})});wo.displayName="Badge";var aa=b(k());var uo=b(N()),V2=Y("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"}}),hw=aa.forwardRef(({className:e,variant:t,size:o,...r},a)=>(0,uo.jsx)("nav",{ref:a,className:P("moonui-theme",V2({variant:t,size:o}),e),"aria-label":"breadcrumb",...r}));hw.displayName="Breadcrumb";var vw=aa.forwardRef(({className:e,collapsed:t,collapsedWidth:o=3,...r},a)=>{let n=aa.Children.toArray(r.children).filter(Boolean),s=n.length;if(t&&s>o){let i=n[0],l=n.slice(-2);return(0,uo.jsxs)("ol",{ref:a,className:P("flex flex-wrap items-center gap-1.5 sm:gap-2.5",e),...r,children:[i,(0,uo.jsx)(Vg,{}),l]})}return(0,uo.jsx)("ol",{ref:a,className:P("flex flex-wrap items-center gap-1.5 sm:gap-2.5",e),...r})});vw.displayName="BreadcrumbList";var xw=aa.forwardRef(({className:e,isCurrent:t,href:o,asChild:r=!1,...a},n)=>{let s=r?aa.Fragment:o?"a":"span",i=r?{}:o?{href:o}:{};return(0,uo.jsx)("li",{ref:n,className:P("moonui-theme","inline-flex items-center gap-1.5",e),"aria-current":t?"page":void 0,...a,children:(0,uo.jsx)(s,{className:P("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})})});xw.displayName="BreadcrumbItem";var yw=({children:e,className:t,...o})=>(0,uo.jsx)("span",{role:"presentation","aria-hidden":"true",className:P("moonui-theme","text-muted-foreground opacity-70",t),...o,children:e||(0,uo.jsx)(lo,{className:"h-3.5 w-3.5"})});yw.displayName="BreadcrumbSeparator";var Vg=({className:e,...t})=>(0,uo.jsxs)("span",{role:"presentation","aria-hidden":"true",className:P("moonui-theme","flex items-center text-muted-foreground hover:text-foreground/80 transition-colors duration-200",e),...t,children:[(0,uo.jsx)(ra,{className:"h-4 w-4"}),(0,uo.jsx)("span",{className:"sr-only",children:"More pages"})]});Vg.displayName="BreadcrumbEllipsis";var bw=aa.forwardRef(({className:e,href:t,...o},r)=>(0,uo.jsx)("a",{ref:r,href:t,className:P("transition-colors duration-200 hover:text-foreground text-muted-foreground hover:underline hover:underline-offset-4 hover:decoration-muted-foreground/30",e),...o}));bw.displayName="BreadcrumbLink";var Cw=aa.forwardRef(({className:e,...t},o)=>(0,uo.jsx)("span",{ref:o,className:P("font-medium text-foreground dark:text-white dark:text-opacity-95",e),...t}));Cw.displayName="BreadcrumbPage";var ww=b(k());var Qd=b(N()),Zd=Y(["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}}),Ae=ww.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,Qd.jsxs)("button",{className:P("moonui-theme",Zd({variant:t,size:o,rounded:r,fullWidth:a,className:e})),ref:f,disabled:c||s,"aria-busy":s||void 0,"data-loading":s?"":void 0,...d,children:[s&&(0,Qd.jsx)(Rt,{className:"w-4 h-4 animate-spin","aria-hidden":"true"}),!s&&i,u,!s&&l]}));Ae.displayName="Button";var Fs=b(k());var wc=b(N(),1),la=b(k(),1);var Sw=b(k(),1),ki=(0,Sw.createContext)({});var Rw=b(k(),1);function na(e){let t=(0,Rw.useRef)(null);return t.current===null&&(t.current=e()),t.current}var Jd=b(k(),1);var Ei=typeof window<"u";var Ai=Ei?Jd.useLayoutEffect:Jd.useEffect;var xh=b(N(),1),PS=b(k(),1),bc=b(k(),1);var Iw=b(k(),1),hn=(0,Iw.createContext)(null);var RS=b(N(),1);function gs(e,t){e.indexOf(t)===-1&&e.push(t)}function Pr(e,t){let o=e.indexOf(t);o>-1&&e.splice(o,1)}var Et=(e,t,o)=>o>t?t:o<e?e:o;var Pa=()=>{},Ut=()=>{};var Kt={};var Bu=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function Hu(e){return typeof e=="object"&&e!==null}var Uu=e=>/^0[^.\s]+$/u.test(e);function hs(e){let t;return()=>(t===void 0&&(t=e()),t)}var ot=e=>e;var B2=(e,t)=>o=>t(e(o)),Lr=(...e)=>e.reduce(B2);var Yo=(e,t,o)=>{let r=t-e;return r===0?1:(o-e)/r};var La=class{constructor(){this.subscriptions=[]}add(t){return gs(this.subscriptions,t),()=>Pr(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 ft=e=>e*1e3,Gt=e=>e/1e3;function Gu(e,t){return t?e*(1e3/t):0}var Pw=(e,t,o)=>{let r=t-e;return((o-e)%r+r)%r+e};var Lw=(e,t,o)=>(((1-3*o+3*t)*e+(3*o-6*t))*e+3*t)*e,H2=1e-7,U2=12;function G2(e,t,o,r,a){let n,s,i=0;do s=t+(o-t)/2,n=Lw(s,r,a)-e,n>0?o=s:t=s;while(Math.abs(n)>H2&&++i<U2);return s}function vn(e,t,o,r){if(e===t&&o===r)return ot;let a=n=>G2(n,0,1,e,o);return n=>n===0||n===1?n:Lw(a(n),t,r)}var ef=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2;var tf=e=>t=>1-e(1-t);var of=vn(.33,1.53,.69,.99),Di=tf(of),zu=ef(Di);var qu=e=>(e*=2)<1?.5*Di(e):.5*(2-Math.pow(2,-10*(e-1)));var Wu=e=>1-Math.sin(Math.acos(e)),$u=tf(Wu),ju=ef(Wu);var Bg=vn(.42,0,1,1),Hg=vn(0,0,.58,1),Ku=vn(.42,0,.58,1);var Xu=e=>Array.isArray(e)&&typeof e[0]!="number";function Yu(e,t){return Xu(e)?e[Pw(0,e.length,t)]:e}var Zu=e=>Array.isArray(e)&&typeof e[0]=="number";var Tw={linear:ot,easeIn:Bg,easeInOut:Ku,easeOut:Hg,circIn:Wu,circInOut:ju,circOut:$u,backIn:Di,backInOut:zu,backOut:of,anticipate:qu},z2=e=>typeof e=="string",rf=e=>{if(Zu(e)){Ut(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");let[t,o,r,a]=e;return vn(t,o,r,a)}else if(z2(e))return Ut(Tw[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),Tw[e];return e};var Qu=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];var So={value:null,addProjectionMetrics:null};function Mw(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,p=!1)=>{let m=p&&a?o:r;return f&&s.add(d),m.has(d)||m.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&&So.value&&So.value.frameloop[t].push(l),l=0,o.clear(),a=!1,n&&(n=!1,c.process(d))}};return c}var q2=40;function af(e,t){let o=!1,r=!0,a={delta:0,timestamp:0,isProcessing:!1},n=()=>o=!0,s=Qu.reduce((y,R)=>(y[R]=Mw(n,t?R:void 0),y),{}),{setup:i,read:l,resolveKeyframes:u,preUpdate:c,update:d,preRender:f,render:p,postRender:g}=s,m=()=>{let y=Kt.useManualTiming?a.timestamp:performance.now();o=!1,Kt.useManualTiming||(a.delta=r?1e3/60:Math.max(Math.min(y-a.timestamp,q2),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),p.process(a),g.process(a),a.isProcessing=!1,o&&t&&(r=!1,e(m))},h=()=>{o=!0,r=!0,a.isProcessing||e(m)};return{schedule:Qu.reduce((y,R)=>{let S=s[R];return y[R]=(C,w=!1,I=!1)=>(o||h(),S.schedule(C,w,I)),y},{}),cancel:y=>{for(let R=0;R<Qu.length;R++)s[Qu[R]].cancel(y)},state:a,steps:s}}var{schedule:Pe,cancel:Xt,state:lt,steps:Ju}=af(typeof requestAnimationFrame<"u"?requestAnimationFrame:ot,!0);var nf;function W2(){nf=void 0}var ut={now:()=>(nf===void 0&&ut.set(lt.isProcessing||Kt.useManualTiming?lt.timestamp:performance.now()),nf),set:e=>{nf=e,queueMicrotask(W2)}};var Tr={layout:0,mainThread:0,waapi:0};var kw=e=>t=>typeof t=="string"&&t.startsWith(e),vs=kw("--"),$2=kw("var(--"),xs=e=>$2(e)?j2.test(e.split("/*")[0].trim()):!1,j2=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;var sa={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Ta={...sa,transform:e=>Et(0,1,e)},ec={...sa,default:1};var xn=e=>Math.round(e*1e5)/1e5;var Ni=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Ew(e){return e==null}var Aw=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;var Oi=(e,t)=>o=>!!(typeof o=="string"&&Aw.test(o)&&o.startsWith(e)||t&&!Ew(o)&&Object.prototype.hasOwnProperty.call(o,t)),sf=(e,t,o)=>r=>{if(typeof r!="string")return r;let[a,n,s,i]=r.match(Ni);return{[e]:parseFloat(a),[t]:parseFloat(n),[o]:parseFloat(s),alpha:i!==void 0?parseFloat(i):1}};var K2=e=>Et(0,255,e),Ug={...sa,transform:e=>Math.round(K2(e))},ia={test:Oi("rgb","red"),parse:sf("red","green","blue"),transform:({red:e,green:t,blue:o,alpha:r=1})=>"rgba("+Ug.transform(e)+", "+Ug.transform(t)+", "+Ug.transform(o)+", "+xn(Ta.transform(r))+")"};function X2(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 tc={test:Oi("#"),parse:X2,transform:ia.transform};var oc=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Mr=oc("deg"),Yt=oc("%"),ce=oc("px"),Gg=oc("vh"),zg=oc("vw"),lf={...Yt,parse:e=>Yt.parse(e)/100,transform:e=>Yt.transform(e*100)};var yn={test:Oi("hsl","hue"),parse:sf("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:o,alpha:r=1})=>"hsla("+Math.round(e)+", "+Yt.transform(xn(t))+", "+Yt.transform(xn(o))+", "+xn(Ta.transform(r))+")"};var Je={test:e=>ia.test(e)||tc.test(e)||yn.test(e),parse:e=>ia.test(e)?ia.parse(e):yn.test(e)?yn.parse(e):tc.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?ia.transform(e):yn.transform(e),getAnimatableNone:e=>{let t=Je.parse(e);return t.alpha=0,Je.transform(t)}};var Dw=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Y2(e){return isNaN(e)&&typeof e=="string"&&(e.match(Ni)?.length||0)+(e.match(Dw)?.length||0)>0}var Ow="number",Fw="color",Z2="var",Q2="var(",Nw="${}",J2=/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 bn(e){let t=e.toString(),o=[],r={color:[],number:[],var:[]},a=[],n=0,i=t.replace(J2,l=>(Je.test(l)?(r.color.push(n),a.push(Fw),o.push(Je.parse(l))):l.startsWith(Q2)?(r.var.push(n),a.push(Z2),o.push(l)):(r.number.push(n),a.push(Ow),o.push(parseFloat(l))),++n,Nw)).split(Nw);return{values:o,split:i,indexes:r,types:a}}function _w(e){return bn(e).values}function Vw(e){let{split:t,types:o}=bn(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===Ow?n+=xn(a[s]):i===Fw?n+=Je.transform(a[s]):n+=a[s]}return n}}var e_=e=>typeof e=="number"?0:Je.test(e)?Je.getAnimatableNone(e):e;function t_(e){let t=_w(e);return Vw(e)(t.map(e_))}var Zt={test:Y2,parse:_w,createTransformer:Vw,getAnimatableNone:t_};function qg(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 Bw({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=qg(l,i,e+1/3),n=qg(l,i,e),s=qg(l,i,e-1/3)}return{red:Math.round(a*255),green:Math.round(n*255),blue:Math.round(s*255),alpha:r}}function Fi(e,t){return o=>o>0?t:e}var Te=(e,t,o)=>e+(t-e)*o;var Wg=(e,t,o)=>{let r=e*e,a=o*(t*t-r)+r;return a<0?0:Math.sqrt(a)},o_=[tc,ia,yn],r_=e=>o_.find(t=>t.test(e));function Hw(e){let t=r_(e);if(Pa(!!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===yn&&(o=Bw(o)),o}var $g=(e,t)=>{let o=Hw(e),r=Hw(t);if(!o||!r)return Fi(e,t);let a={...o};return n=>(a.red=Wg(o.red,r.red,n),a.green=Wg(o.green,r.green,n),a.blue=Wg(o.blue,r.blue,n),a.alpha=Te(o.alpha,r.alpha,n),ia.transform(a))};var uf=new Set(["none","hidden"]);function Uw(e,t){return uf.has(e)?o=>o<=0?e:t:o=>o>=1?t:e}function a_(e,t){return o=>Te(e,t,o)}function cf(e){return typeof e=="number"?a_:typeof e=="string"?xs(e)?Fi:Je.test(e)?$g:i_:Array.isArray(e)?Gw:typeof e=="object"?Je.test(e)?$g:n_:Fi}function Gw(e,t){let o=[...e],r=o.length,a=e.map((n,s)=>cf(n)(n,t[s]));return n=>{for(let s=0;s<r;s++)o[s]=a[s](n);return o}}function n_(e,t){let o={...e,...t},r={};for(let a in o)e[a]!==void 0&&t[a]!==void 0&&(r[a]=cf(e[a])(e[a],t[a]));return a=>{for(let n in r)o[n]=r[n](a);return o}}function s_(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 i_=(e,t)=>{let o=Zt.createTransformer(t),r=bn(e),a=bn(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?uf.has(e)&&!a.values.length||uf.has(t)&&!r.values.length?Uw(e,t):Lr(Gw(s_(r,a),a.values),o):(Pa(!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"),Fi(e,t))};function df(e,t,o){return typeof e=="number"&&typeof t=="number"&&typeof o=="number"?Te(e,t,o):cf(e)(e,t)}var zw=e=>{let t=({timestamp:o})=>e(o);return{start:(o=!0)=>Pe.update(t,o),stop:()=>Xt(t),now:()=>lt.isProcessing?lt.timestamp:ut.now()}};var ff=(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 _i(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 rc(e,t=100,o){let r=o({...e,keyframes:[0,t]}),a=Math.min(_i(r),2e4);return{type:"keyframes",ease:n=>r.next(a*n).value/t,duration:Gt(a)}}var l_=5;function pf(e,t,o){let r=Math.max(t-l_,0);return Gu(o-e(r),t-r)}var Ze={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 Kg=.001;function qw({duration:e=Ze.duration,bounce:t=Ze.bounce,velocity:o=Ze.velocity,mass:r=Ze.mass}){let a,n;Pa(e<=ft(Ze.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let s=1-t;s=Et(Ze.minDamping,Ze.maxDamping,s),e=Et(Ze.minDuration,Ze.maxDuration,Gt(e)),s<1?(a=u=>{let c=u*s,d=c*e,f=c-o,p=mf(u,s),g=Math.exp(-d);return Kg-f/p*g},n=u=>{let d=u*s*e,f=d*o+o,p=Math.pow(s,2)*Math.pow(u,2)*e,g=Math.exp(-d),m=mf(Math.pow(u,2),s);return(-a(u)+Kg>0?-1:1)*((f-p)*g)/m}):(a=u=>{let c=Math.exp(-u*e),d=(u-o)*e+1;return-Kg+c*d},n=u=>{let c=Math.exp(-u*e),d=(o-u)*(e*e);return c*d});let i=5/e,l=c_(a,n,i);if(e=ft(e),isNaN(l))return{stiffness:Ze.stiffness,damping:Ze.damping,duration:e};{let u=Math.pow(l,2)*r;return{stiffness:u,damping:s*2*Math.sqrt(r*u),duration:e}}}var u_=12;function c_(e,t,o){let r=o;for(let a=1;a<u_;a++)r=r-e(r)/t(r);return r}function mf(e,t){return e*Math.sqrt(1-t*t)}var d_=["duration","bounce"],f_=["stiffness","damping","mass"];function Ww(e,t){return t.some(o=>e[o]!==void 0)}function p_(e){let t={velocity:Ze.velocity,stiffness:Ze.stiffness,damping:Ze.damping,mass:Ze.mass,isResolvedFromDuration:!1,...e};if(!Ww(e,f_)&&Ww(e,d_))if(e.visualDuration){let o=e.visualDuration,r=2*Math.PI/(o*1.2),a=r*r,n=2*Et(.05,1,1-(e.bounce||0))*Math.sqrt(a);t={...t,mass:Ze.mass,stiffness:a,damping:n}}else{let o=qw(e);t={...t,...o,mass:Ze.mass},t.isResolvedFromDuration=!0}return t}function Ma(e=Ze.visualDuration,t=Ze.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:p}=p_({...o,velocity:-Gt(o.velocity||0)}),g=f||0,m=u/(2*Math.sqrt(l*c)),h=s-n,v=Gt(Math.sqrt(l/c)),x=Math.abs(h)<5;r||(r=x?Ze.restSpeed.granular:Ze.restSpeed.default),a||(a=x?Ze.restDelta.granular:Ze.restDelta.default);let y;if(m<1){let S=mf(v,m);y=C=>{let w=Math.exp(-m*v*C);return s-w*((g+m*v*h)/S*Math.sin(S*C)+h*Math.cos(S*C))}}else if(m===1)y=S=>s-Math.exp(-v*S)*(h+(g+v*h)*S);else{let S=v*Math.sqrt(m*m-1);y=C=>{let w=Math.exp(-m*v*C),I=Math.min(S*C,300);return s-w*((g+m*v*h)*Math.sinh(I)+S*h*Math.cosh(I))/S}}let R={calculatedDuration:p&&d||null,next:S=>{let C=y(S);if(p)i.done=S>=d;else{let w=S===0?g:0;m<1&&(w=S===0?ft(g):pf(y,S,C));let I=Math.abs(w)<=r,L=Math.abs(s-C)<=a;i.done=I&&L}return i.value=i.done?s:C,i},toString:()=>{let S=Math.min(_i(R),2e4),C=ff(w=>R.next(S*w).value,S,30);return S+"ms "+C},toTransition:()=>{}};return R}Ma.applyToOptions=e=>{let t=rc(e,100,Ma);return e.ease=t.ease,e.duration=ft(t.duration),e.type="keyframes",e};function ac({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},p=I=>i!==void 0&&I<i||l!==void 0&&I>l,g=I=>i===void 0?l:l===void 0||Math.abs(i-I)<Math.abs(l-I)?i:l,m=o*t,h=d+m,v=s===void 0?h:s(h);v!==h&&(m=v-d);let x=I=>-m*Math.exp(-I/r),y=I=>v+x(I),R=I=>{let L=x(I),T=y(I);f.done=Math.abs(L)<=u,f.value=f.done?v:T},S,C,w=I=>{p(f.value)&&(S=I,C=Ma({keyframes:[f.value,g(f.value)],velocity:pf(y,I,f.value),damping:a,stiffness:n,restDelta:u,restSpeed:c}))};return w(0),{calculatedDuration:null,next:I=>{let L=!1;return!C&&S===void 0&&(L=!0,R(I),w(I)),S!==void 0&&I>=S?C.next(I-S):(!L&&R(I),f)}}}function m_(e,t,o){let r=[],a=o||Kt.mix||df,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]||ot:t;i=Lr(l,i)}r.push(i)}return r}function gf(e,t,{clamp:o=!0,ease:r,mixer:a}={}){let n=e.length;if(Ut(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=m_(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=Yo(e[d],e[d+1],c);return i[d](f)};return o?c=>u(Et(e[0],e[n-1],c)):u}function nc(e,t){let o=e[e.length-1];for(let r=1;r<=t;r++){let a=Yo(0,t,r);e.push(Te(o,1,a))}}function sc(e){let t=[0];return nc(t,e.length-1),t}function $w(e,t){return e.map(o=>o*t)}function g_(e,t){return e.map(()=>t||Ku).splice(0,e.length-1)}function ys({duration:e=300,keyframes:t,times:o,ease:r="easeInOut"}){let a=Xu(r)?r.map(rf):rf(r),n={done:!1,value:t[0]},s=$w(o&&o.length===t.length?o:sc(t),e),i=gf(s,t,{ease:Array.isArray(a)?a:g_(t,a)});return{calculatedDuration:e,next:l=>(n.value=i(l),n.done=l>=e,n)}}var h_=e=>e!==null;function Vi(e,{repeat:t,repeatType:o="loop"},r,a=1){let n=e.filter(h_),i=a<0||t&&o!=="loop"&&t%2===1?0:n.length-1;return!i||r===void 0?n[i]:r}var v_={decay:ac,inertia:ac,tween:ys,keyframes:ys,spring:Ma};function hf(e){typeof e.type=="string"&&(e.type=v_[e.type])}var Cn=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 x_=e=>e/100,ka=class extends Cn{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!==ut.now()&&this.tick(ut.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},Tr.mainThread++,this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){let{options:t}=this;hf(t);let{type:o=ys,repeat:r=0,repeatDelay:a=0,repeatType:n,velocity:s=0}=t,{keyframes:i}=t,l=o||ys;l!==ys&&typeof i[0]!="number"&&(this.mixKeyframes=Lr(x_,df(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=_i(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:p,type:g,onUpdate:m,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 I=Math.min(this.currentTime,a)/i,L=Math.floor(I),T=I%1;!T&&I>=1&&(T=1),T===1&&L--,L=Math.min(L,d+1),!!(L%2)&&(f==="reverse"?(T=1-T,p&&(T-=p/i)):f==="mirror"&&(R=s)),y=Et(0,1,T)*i}let S=x?{done:!1,value:c[0]}:R.next(y);n&&(S.value=n(S.value));let{done:C}=S;!x&&l!==null&&(C=this.playbackSpeed>=0?this.currentTime>=a:this.currentTime<=0);let w=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&C);return w&&g!==ac&&(S.value=Vi(c,this.options,h,this.speed)),m&&m(S.value),w&&this.finish(),S}then(t,o){return this.finished.then(t,o)}get duration(){return Gt(this.calculatedDuration)}get time(){return Gt(this.currentTime)}set time(t){t=ft(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(ut.now());let o=this.playbackSpeed!==t;this.playbackSpeed=t,o&&(this.time=Gt(this.currentTime))}play(){if(this.isStopped)return;let{driver:t=zw,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(ut.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,Tr.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 jw(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var bs=e=>e*180/Math.PI,Xg=e=>{let t=bs(Math.atan2(e[1],e[0]));return Yg(t)},y_={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Xg,rotateZ:Xg,skewX:e=>bs(Math.atan(e[1])),skewY:e=>bs(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Yg=e=>(e=e%360,e<0&&(e+=360),e),Kw=Xg,Xw=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Yw=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),b_={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Xw,scaleY:Yw,scale:e=>(Xw(e)+Yw(e))/2,rotateX:e=>Yg(bs(Math.atan2(e[6],e[5]))),rotateY:e=>Yg(bs(Math.atan2(-e[2],e[0]))),rotateZ:Kw,rotate:Kw,skewX:e=>bs(Math.atan(e[4])),skewY:e=>bs(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function ic(e){return e.includes("scale")?1:0}function lc(e,t){if(!e||e==="none")return ic(t);let o=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),r,a;if(o)r=b_,a=o;else{let i=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=y_,a=i}if(!a)return ic(t);let n=r[t],s=a[1].split(",").map(C_);return typeof n=="function"?n(s):s[n]}var Zg=(e,t)=>{let{transform:o="none"}=getComputedStyle(e);return lc(o,t)};function C_(e){return parseFloat(e.trim())}var kr=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],No=new Set(kr);var Qg=e=>e===sa||e===ce,w_=new Set(["x","y","z"]),S_=kr.filter(e=>!w_.has(e));function Zw(e){let t=[];return S_.forEach(o=>{let r=e.getValue(o);r!==void 0&&(t.push([o,r.get()]),r.set(o.startsWith("scale")?1:0))}),t}var wn={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})=>lc(t,"x"),y:(e,{transform:t})=>lc(t,"y")};wn.translateX=wn.x;wn.translateY=wn.y;var Cs=new Set,Jg=!1,eh=!1,th=!1;function Qw(){if(eh){let e=Array.from(Cs).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),o=new Map;t.forEach(r=>{let a=Zw(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)})}eh=!1,Jg=!1,Cs.forEach(e=>e.complete(th)),Cs.clear()}function Jw(){Cs.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(eh=!0)})}function oh(){th=!0,Jw(),Qw(),th=!1}var Ea=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?(Cs.add(this),Jg||(Jg=!0,Pe.read(Jw),Pe.resolveKeyframes(Qw))):(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])}jw(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),Cs.delete(this)}cancel(){this.state==="scheduled"&&(Cs.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}};var eS=e=>e.startsWith("--");function tS(e,t,o){eS(t)?e.style.setProperty(t,o):e.style[t]=o}var oS=hs(()=>window.ScrollTimeline!==void 0);var rS={};function aS(e,t){let o=hs(e);return()=>rS[t]??o()}var vf=aS(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing");var ws=([e,t,o,r])=>`cubic-bezier(${e}, ${t}, ${o}, ${r})`;var rh={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:ws([0,.65,.55,1]),circOut:ws([.55,0,1,.45]),backIn:ws([.31,.01,.66,-.59]),backOut:ws([.33,1.53,.69,.99])};function ah(e,t){if(e)return typeof e=="function"?vf()?ff(e,t):"ease-out":Zu(e)?ws(e):Array.isArray(e)?e.map(o=>ah(o,t)||rh.easeOut):rh[e]}function nS(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=ah(i,a);Array.isArray(d)&&(c.easing=d),So.value&&Tr.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 p=e.animate(c,f);return So.value&&p.finished.finally(()=>{Tr.waapi--}),p}function Ss(e){return typeof e=="function"&&"applyToOptions"in e}function sS({type:e,...t}){return Ss(e)&&vf()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}var xf=class extends Cn{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,Ut(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");let u=sS(t);this.animation=nS(o,r,a,u,n),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!n){let c=Vi(a,this.options,i,this.speed);this.updateMotionValue?this.updateMotionValue(c):tS(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 Gt(Number(t))}get time(){return Gt(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=ft(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&&oS()?(this.animation.timeline=t,ot):o(this)}};var iS={anticipate:qu,backInOut:zu,circInOut:ju};function R_(e){return e in iS}function lS(e){typeof e.ease=="string"&&R_(e.ease)&&(e.ease=iS[e.ease])}var uS=10,yf=class extends xf{constructor(t){lS(t),hf(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 ka({...s,autoplay:!1}),l=ft(this.finishedTime??this.time);o.setWithVelocity(i.sample(l-uS).value,i.sample(l).value,uS),i.stop()}};var nh=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Zt.test(e)||e==="0")&&!e.startsWith("url("));function I_(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 cS(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=nh(a,t),i=nh(n,t);return Pa(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:I_(e)||(o==="spring"||Ss(o))&&r}function Bi(e){e.duration=0,e.type}var P_=new Set(["opacity","clipPath","filter","transform"]),L_=hs(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function dS(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 L_()&&o&&P_.has(o)&&(o!=="transform"||!u)&&!l&&!r&&a!=="mirror"&&n!==0&&s!=="inertia"}var T_=40,uc=class extends Cn{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=ut.now();let f={autoplay:t,delay:o,type:r,repeat:a,repeatDelay:n,repeatType:s,name:l,motionValue:u,element:c,...d},p=c?.KeyframeResolver||Ea;this.keyframeResolver=new p(i,(g,m,h)=>this.onKeyframesResolved(g,m,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=ut.now(),cS(t,n,s,i)||((Kt.instantAnimations||!l)&&c?.(Vi(t,r,o)),t[0]=t[t.length-1],Bi(r),r.repeat=0);let f={startTime:a?this.resolvedAt?this.resolvedAt-this.createdAt>T_?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:o,...r,keyframes:t},p=!u&&dS(f)?new yf({...f,element:f.motionValue.owner.current}):new ka(f);p.finished.then(()=>this.notifyFinished()).catch(ot),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,o){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),oh()),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 bf=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 cc=class extends bf{then(t,o){return this.finished.finally(t).then(()=>{})}};var M_=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function k_(e){let t=M_.exec(e);if(!t)return[,];let[,o,r,a]=t;return[`--${o??r}`,a]}var E_=4;function sh(e,t,o=1){Ut(o<=E_,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");let[r,a]=k_(e);if(!r)return;let n=window.getComputedStyle(t).getPropertyValue(r);if(n){let s=n.trim();return Bu(s)?parseFloat(s):s}return xs(a)?sh(a,t,o+1):a}function Rs(e,t){return e?.[t]??e?.default??e}var dc=new Set(["width","height","top","left","right","bottom",...kr]);var fS={test:e=>e==="auto",parse:e=>e};var Cf=e=>t=>t.test(e);var ih=[sa,ce,Yt,Mr,zg,Gg,fS],lh=e=>ih.find(Cf(e));function pS(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Uu(e):!0}var A_=new Set(["brightness","contrast","saturate","opacity"]);function D_(e){let[t,o]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;let[r]=o.match(Ni)||[];if(!r)return e;let a=o.replace(r,""),n=A_.has(t)?1:0;return r!==o&&(n*=100),t+"("+n+a+")"}var N_=/\b([a-z-]*)\(.*?\)/gu,fc={...Zt,getAnimatableNone:e=>{let t=e.match(N_);return t?t.map(D_).join(" "):e}};var uh={...sa,transform:Math.round};var mS={rotate:Mr,rotateX:Mr,rotateY:Mr,rotateZ:Mr,scale:ec,scaleX:ec,scaleY:ec,scaleZ:ec,skew:Mr,skewX:Mr,skewY:Mr,distance:ce,translateX:ce,translateY:ce,translateZ:ce,x:ce,y:ce,z:ce,perspective:ce,transformPerspective:ce,opacity:Ta,originX:lf,originY:lf,originZ:ce};var Is={borderWidth:ce,borderTopWidth:ce,borderRightWidth:ce,borderBottomWidth:ce,borderLeftWidth:ce,borderRadius:ce,radius:ce,borderTopLeftRadius:ce,borderTopRightRadius:ce,borderBottomRightRadius:ce,borderBottomLeftRadius:ce,width:ce,maxWidth:ce,height:ce,maxHeight:ce,top:ce,right:ce,bottom:ce,left:ce,padding:ce,paddingTop:ce,paddingRight:ce,paddingBottom:ce,paddingLeft:ce,margin:ce,marginTop:ce,marginRight:ce,marginBottom:ce,marginLeft:ce,backgroundPositionX:ce,backgroundPositionY:ce,...mS,zIndex:uh,fillOpacity:Ta,strokeOpacity:Ta,numOctaves:uh};var gS={...Is,color:Je,backgroundColor:Je,outlineColor:Je,fill:Je,stroke:Je,borderColor:Je,borderTopColor:Je,borderRightColor:Je,borderBottomColor:Je,borderLeftColor:Je,filter:fc,WebkitFilter:fc},pc=e=>gS[e];function mc(e,t){let o=pc(e);return o!==fc&&(o=Zt),o.getAnimatableNone?o.getAnimatableNone(t):void 0}var O_=new Set(["auto","none","0"]);function hS(e,t,o){let r=0,a;for(;r<e.length&&!a;){let n=e[r];typeof n=="string"&&!O_.has(n)&&bn(n).values.length&&(a=e[r]),r++}if(a&&o)for(let n of t)e[n]=mc(o,a)}var gc=class extends Ea{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(),xs(u))){let c=sh(u,o.current);c!==void 0&&(t[l]=c),l===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!dc.has(r)||t.length!==2)return;let[a,n]=t,s=lh(a),i=lh(n);if(s!==i)if(Qg(s)&&Qg(i))for(let l=0;l<t.length;l++){let u=t[l];typeof u=="string"&&(t[l]=parseFloat(u))}else wn[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:t,name:o}=this,r=[];for(let a=0;a<t.length;a++)(t[a]===null||pS(t[a]))&&r.push(a);r.length&&hS(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=wn[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]=wn[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 hc(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 vc=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function xc(e){return Hu(e)&&"offsetHeight"in e}var vS=30,F_=e=>!isNaN(parseFloat(e)),Ps={current:void 0},wf=class{constructor(t,o={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{let a=ut.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=ut.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=F_(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 La);let r=this.events[t].add(o);return t==="change"?()=>{r(),Pe.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 Ps.current&&Ps.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let t=ut.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>vS)return 0;let o=Math.min(this.updatedAt-this.prevUpdatedAt,vS);return Gu(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 Ro(e,t){return new wf(e,t)}var{schedule:Ls,cancel:__}=af(queueMicrotask,!1);var Zo={x:!1,y:!1};function Sf(){return Zo.x||Zo.y}function ch(e){return e==="x"||e==="y"?Zo[e]?null:(Zo[e]=!0,()=>{Zo[e]=!1}):Zo.x||Zo.y?null:(Zo.x=Zo.y=!0,()=>{Zo.x=Zo.y=!1})}function Rf(e,t){let o=hc(e),r=new AbortController,a={passive:!0,...t,signal:r.signal};return[o,a,()=>r.abort()]}function xS(e){return!(e.pointerType==="touch"||Sf())}function dh(e,t,o={}){let[r,a,n]=Rf(e,o),s=i=>{if(!xS(i))return;let{target:l}=i,u=t(l,i);if(typeof u!="function"||!l)return;let c=d=>{xS(d)&&(u(d),l.removeEventListener("pointerleave",c))};l.addEventListener("pointerleave",c,a)};return r.forEach(i=>{i.addEventListener("pointerenter",s,a)}),n}var fh=(e,t)=>t?e===t?!0:fh(e,t.parentElement):!1;var Ts=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;var V_=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function yS(e){return V_.has(e.tagName)||e.tabIndex!==-1}var Hi=new WeakSet;function bS(e){return t=>{t.key==="Enter"&&e(t)}}function ph(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}var CS=(e,t)=>{let o=e.currentTarget;if(!o)return;let r=bS(()=>{if(Hi.has(o))return;ph(o,"down");let a=bS(()=>{ph(o,"up")}),n=()=>ph(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 wS(e){return Ts(e)&&!Sf()}function mh(e,t,o={}){let[r,a,n]=Rf(e,o),s=i=>{let l=i.currentTarget;if(!wS(i))return;Hi.add(l);let u=t(l,i),c=(p,g)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",f),Hi.has(l)&&Hi.delete(l),wS(p)&&typeof u=="function"&&u(p,{success:g})},d=p=>{c(p,l===window||l===document||o.useGlobalTarget||fh(l,p.target))},f=p=>{c(p,!1)};window.addEventListener("pointerup",d,a),window.addEventListener("pointercancel",f,a)};return r.forEach(i=>{(o.useGlobalTarget?window:i).addEventListener("pointerdown",s,a),xc(i)&&(i.addEventListener("focus",u=>CS(u,a)),!yS(i)&&!i.hasAttribute("tabindex")&&(i.tabIndex=0))}),n}function Ms(e){return Hu(e)&&"ownerSVGElement"in e}function yc(e){return Ms(e)&&e.tagName==="svg"}function gh(...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=gf(a,n,s);return t?i(r):i}var _e=e=>!!(e&&e.getVelocity);var B_=[...ih,Je,Zt],hh=e=>B_.find(Cf(e));var If=b(k(),1),Aa=b(k(),1);var SS=b(k(),1),Sn=(0,SS.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});var vh=class extends If.Component{getSnapshotBeforeUpdate(t){let o=this.props.childRef.current;if(o&&t.isPresent&&!this.props.isPresent){let r=o.offsetParent,a=xc(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 IS({children:e,isPresent:t,anchorX:o,root:r}){let a=(0,Aa.useId)(),n=(0,Aa.useRef)(null),s=(0,Aa.useRef)({width:0,height:0,top:0,left:0,right:0}),{nonce:i}=(0,Aa.useContext)(Sn);return(0,Aa.useInsertionEffect)(()=>{let{width:l,height:u,top:c,left:d,right:f}=s.current;if(t||!n.current||!l||!u)return;let p=o==="left"?`left: ${d}`:`right: ${f}`;n.current.dataset.motionPopId=a;let g=document.createElement("style");i&&(g.nonce=i);let m=r??document.head;return m.appendChild(g),g.sheet&&g.sheet.insertRule(`
|
|
5
|
+
[data-motion-pop-id="${a}"] {
|
|
13
6
|
position: absolute !important;
|
|
14
|
-
width: ${
|
|
15
|
-
height: ${
|
|
16
|
-
${
|
|
17
|
-
top: ${
|
|
7
|
+
width: ${l}px !important;
|
|
8
|
+
height: ${u}px !important;
|
|
9
|
+
${p}px !important;
|
|
10
|
+
top: ${c}px !important;
|
|
18
11
|
}
|
|
19
|
-
`),()=>{x.contains(m)&&x.removeChild(m)}},[t]),(0,wD.jsx)(WS,{isPresent:t,childRef:a,sizeRef:i,children:xv.cloneElement(e,{ref:l})})}var bD=({children:e,initial:t,isPresent:r,onExitComplete:o,custom:n,presenceAffectsLayout:a,mode:i,anchorX:s,root:l})=>{let u=ca(t6),c=(0,Hp.useId)(),d=!0,f=(0,Hp.useMemo)(()=>(d=!1,{id:c,initial:t,isPresent:r,custom:n,onExitComplete:p=>{u.set(p,!0);for(let g of u.values())if(!g)return;o&&o()},register:p=>(u.set(p,!1),()=>u.delete(p))}),[r,u,o]);return a&&d&&(f={...f}),(0,Hp.useMemo)(()=>{u.forEach((p,g)=>u.set(g,!1))},[r]),SD.useEffect(()=>{!r&&!u.size&&o&&o()},[r]),i==="popLayout"&&(e=(0,jS.jsx)(CD,{isPresent:r,anchorX:s,root:l,children:e})),(0,jS.jsx)(Yi.Provider,{value:f,children:e})};function t6(){return new Map}var ns=R(M(),1);function yv(e=!0){let t=(0,ns.useContext)(Yi);if(t===null)return[!0,null];let{isPresent:r,onExitComplete:o,register:n}=t,a=(0,ns.useId)();(0,ns.useEffect)(()=>{if(e)return n(a)},[e]);let i=(0,ns.useCallback)(()=>e&&o&&o(a),[a,o,e]);return!r&&o?[!1,i]:[!0]}var wv=R(M(),1),Up=e=>e.key||"";function $S(e){let t=[];return wv.Children.forEach(e,r=>{(0,wv.isValidElement)(r)&&t.push(r)}),t}var Ka=({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]=yv(i),d=(0,pa.useMemo)(()=>$S(e),[e]),f=i&&!u?[]:d.map(Up),p=(0,pa.useRef)(!0),g=(0,pa.useRef)(d),m=ca(()=>new Map),[x,h]=(0,pa.useState)(d),[v,y]=(0,pa.useState)(d);ic(()=>{p.current=!1,g.current=d;for(let b=0;b<v.length;b++){let S=Up(v[b]);f.includes(S)?m.delete(S):m.get(S)!==!0&&m.set(S,!1)}},[v,f.length,f.join("-")]);let w=[];if(d!==x){let b=[...d];for(let S=0;S<v.length;S++){let I=v[S],L=Up(I);f.includes(L)||(b.splice(S,0,I),w.push(I))}return a==="wait"&&w.length&&(b=w),y($S(b)),h(d),null}let{forceRender:C}=(0,pa.useContext)(nc);return(0,zp.jsx)(zp.Fragment,{children:v.map(b=>{let S=Up(b),I=i&&!u?!1:d===v||f.includes(S),L=()=>{if(m.has(S))m.set(S,!0);else return;let T=!0;m.forEach(k=>{k||(T=!1)}),T&&(C?.(),y(g.current),i&&c?.(),o&&o())};return(0,zp.jsx)(bD,{isPresent:I,initial:!p.current||r?void 0:!1,custom:t,presenceAffectsLayout:n,mode:a,root:l,onExitComplete:I?void 0:L,anchorX:s,children:b},S)})})};var RD=R(M(),1),Cv=(0,RD.createContext)({strict:!1});var ID={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"]},Xa={};for(let e in ID)Xa[e]={isEnabled:t=>ID[e].some(r=>!!t[r])};function PD(e){for(let t in e)Xa[t]={...Xa[t],...e[t]}}var r6=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 Gp(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||r6.has(e)}var LD=e=>!Gp(e);function o6(e){typeof e=="function"&&(LD=t=>t.startsWith("on")?!Gp(t):e(t))}try{o6(require("@emotion/is-prop-valid").default)}catch{}function TD(e,t,r){let o={};for(let n in e)n==="values"&&typeof e.values=="object"||(LD(n)||r===!0&&Gp(n)||!t&&!Gp(n)||e.draggable&&n.startsWith("onDrag"))&&(o[n]=e[n]);return o}var Dv=R(N(),1);var bc=R(M(),1);var kD=R(M(),1),as=(0,kD.createContext)({});var Rv=R(M(),1);function is(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Ya(e){return typeof e=="string"||Array.isArray(e)}var Sv=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Wp=["initial",...Sv];function Il(e){return is(e.animate)||Wp.some(t=>Ya(e[t]))}function bv(e){return!!(Il(e)||e.variants)}function MD(e,t){if(Il(e)){let{initial:r,animate:o}=e;return{initial:r===!1||Ya(r)?r:void 0,animate:Ya(o)?o:void 0}}return e.inherit!==!1?t:{}}function AD(e){let{initial:t,animate:r}=MD(e,(0,Rv.useContext)(as));return(0,Rv.useMemo)(()=>({initial:t,animate:r}),[ED(t),ED(r)])}function ED(e){return Array.isArray(e)?e.join(" "):e}var xc=R(M(),1);var OD=R(M(),1);var Pl={};function DD(e){for(let t in e)Pl[t]=e[t],fl(t)&&(Pl[t].isCSSVariable=!0)}function Iv(e,{layout:t,layoutId:r}){return yo.has(e)||e.startsWith("origin")||(t||r!==void 0)&&(!!Pl[e]||e==="opacity")}var n6={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},a6=Mn.length;function ND(e,t,r){let o="",n=!0;for(let a=0;a<a6;a++){let i=Mn[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=_p(s,wl[i]);if(!l){n=!1;let c=n6[i]||i;o+=`${c}(${u}) `}r&&(t[i]=u)}}return o=o.trim(),r?o=r(t,n?"":o):n&&(o="none"),o}function gc(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(yo.has(l)){i=!0;continue}else if(fl(l)){n[l]=u;continue}else{let c=_p(u,wl[l]);l.startsWith("origin")?(s=!0,a[l]=c):o[l]=c}}if(t.transform||(i||r?o.transform=ND(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 hc=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function qS(e,t,r){for(let o in t)!Be(t[o])&&!Iv(o,r)&&(e[o]=t[o])}function i6({transformTemplate:e},t){return(0,OD.useMemo)(()=>{let r=hc();return gc(r,t,e),Object.assign({},r.vars,r.style)},[t])}function s6(e,t){let r=e.style||{},o={};return qS(o,r,e),Object.assign(o,i6(e,t)),o}function FD(e,t){let r={},o=s6(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 VD=R(M(),1);var l6={offset:"stroke-dashoffset",array:"stroke-dasharray"},u6={offset:"strokeDashoffset",array:"strokeDasharray"};function _D(e,t,r=1,o=0,n=!0){e.pathLength=1;let a=n?l6:u6;e[a.offset]=ue.transform(-o);let i=ue.transform(t),s=ue.transform(r);e[a.array]=`${i} ${s}`}function Pv(e,{attrX:t,attrY:r,attrScale:o,pathLength:n,pathSpacing:a=1,pathOffset:i=0,...s},l,u,c){if(gc(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&&_D(d,n,a,i,!1)}var Lv=()=>({...hc(),attrs:{}});var Tv=e=>typeof e=="string"&&e.toLowerCase()==="svg";function BD(e,t,r,o){let n=(0,VD.useMemo)(()=>{let a=Lv();return Pv(a,t,Tv(o),e.transformTemplate,e.style),{...a.attrs,style:{...a.style}}},[t]);if(e.style){let a={};qS(a,e.style,e),n.style={...a,...n.style}}return n}var HD=["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 vc(e){return typeof e!="string"||e.includes("-")?!1:!!(HD.indexOf(e)>-1||/[A-Z]/u.test(e))}function UD(e,t,r,{latestValues:o},n,a=!1){let s=(vc(e)?BD:FD)(t,o,n,e),l=TD(t,typeof e=="string",a),u=e!==xc.Fragment?{...l,...s,ref:r}:{},{children:c}=t,d=(0,xc.useMemo)(()=>Be(c)?c.get():c,[c]);return(0,xc.createElement)(e,{...u,children:d})}var KS=R(M(),1);function zD(e){let t=[{},{}];return e?.values.forEach((r,o)=>{t[0][o]=r.get(),t[1][o]=r.getVelocity()}),t}function yc(e,t,r,o){if(typeof t=="function"){let[n,a]=zD(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]=zD(o);t=t(r!==void 0?r:e.custom,n,a)}return t}function wc(e){return Be(e)?e.get():e}function c6({scrapeMotionValuesFromProps:e,createRenderState:t},r,o,n){return{latestValues:d6(r,o,n,e),renderState:t()}}function d6(e,t,r,o){let n={},a=o(e,{});for(let f in a)n[f]=wc(a[f]);let{initial:i,animate:s}=e,l=Il(e),u=bv(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"&&!is(d)){let f=Array.isArray(d)?d:[d];for(let p=0;p<f.length;p++){let g=yc(e,f[p]);if(g){let{transitionEnd:m,transition:x,...h}=g;for(let v in h){let y=h[v];if(Array.isArray(y)){let w=c?y.length-1:0;y=y[w]}y!==null&&(n[v]=y)}for(let v in m)n[v]=m[v]}}}return n}var kv=e=>(t,r)=>{let o=(0,KS.useContext)(as),n=(0,KS.useContext)(Yi),a=()=>c6(e,t,o,n);return r?a():ca(a)};function Cc(e,t,r){let{style:o}=e,n={};for(let a in o)(Be(o[a])||t.style&&Be(t.style[a])||Iv(a,e)||r?.getValue(a)?.liveStyle!==void 0)&&(n[a]=o[a]);return n}var GD=kv({scrapeMotionValuesFromProps:Cc,createRenderState:hc});function Mv(e,t,r){let o=Cc(e,t,r);for(let n in e)if(Be(e[n])||Be(t[n])){let a=Mn.indexOf(n)!==-1?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n;o[a]=e[n]}return o}var WD=kv({scrapeMotionValuesFromProps:Mv,createRenderState:Lv});var jD=Symbol.for("motionComponentSymbol");var $D=R(M(),1);function Qa(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function qD(e,t,r){return(0,$D.useCallback)(o=>{o&&e.onMount&&e.onMount(o),t&&(o?t.mount(o):t.unmount()),r&&(typeof r=="function"?r(o):Qa(r)&&(r.current=o))},[t])}var oo=R(M(),1);var Sc=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase();var f6="framerAppearId",Ev="data-"+Sc(f6);var KD=R(M(),1),Av=(0,KD.createContext)({});function XD(e,t,r,o,n){let{visualElement:a}=(0,oo.useContext)(as),i=(0,oo.useContext)(Cv),s=(0,oo.useContext)(Yi),l=(0,oo.useContext)(os).reducedMotion,u=(0,oo.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,oo.useContext)(Av);c&&!c.projection&&n&&(c.type==="html"||c.type==="svg")&&p6(u.current,r,n,d);let f=(0,oo.useRef)(!1);(0,oo.useInsertionEffect)(()=>{c&&f.current&&c.update(r,s)});let p=r[Ev],g=(0,oo.useRef)(!!p&&!window.MotionHandoffIsComplete?.(p)&&window.MotionHasOptimisedAnimation?.(p));return ic(()=>{c&&(f.current=!0,window.MotionIsMounted=!0,c.updateFeatures(),c.scheduleRenderMicrotask(),g.current&&c.animationState&&c.animationState.animateChanges())}),(0,oo.useEffect)(()=>{c&&(!g.current&&c.animationState&&c.animationState.animateChanges(),g.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(p)}),g.current=!1),c.enteringChildren=void 0)}),c}function p6(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:YD(e.parent)),e.projection.setOptions({layoutId:n,layout:a,alwaysMeasureLayout:!!i||s&&Qa(s),visualElement:e,animationType:typeof a=="string"?a:"both",initialPromotionConfig:o,crossfade:c,layoutScroll:l,layoutRoot:u})}function YD(e){if(e)return e.options.allowProjection!==!1?e.projection:YD(e.parent)}function Nv(e,{forwardMotionProps:t=!1}={},r,o){r&&PD(r);let n=vc(e)?WD:GD;function a(s,l){let u,c={...(0,bc.useContext)(os),...s,layoutId:m6(s)},{isStatic:d}=c,f=AD(s),p=n(s,d);if(!d&&ac){g6(c,r);let g=h6(c);u=g.MeasureLayout,f.visualElement=XD(e,p,c,o,g.ProjectionNode)}return(0,Dv.jsxs)(as.Provider,{value:f,children:[u&&f.visualElement?(0,Dv.jsx)(u,{visualElement:f.visualElement,...c}):null,UD(e,s,qD(p,f.visualElement,l),p,d,t)]})}a.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;let i=(0,bc.forwardRef)(a);return i[jD]=e,i}function m6({layoutId:e}){let t=(0,bc.useContext)(nc).id;return t&&e!==void 0?t+"-"+e:e}function g6(e,t){let r=(0,bc.useContext)(Cv).strict}function h6(e){let{drag:t,layout:r}=Xa;if(!t&&!r)return{};let o={...t,...r};return{MeasureLayout:t?.isEnabled(e)||r?.isEnabled(e)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}function QD(e,t){if(typeof Proxy>"u")return Nv;let r=new Map,o=(a,i)=>Nv(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,Nv(i,void 0,e,t)),r.get(i))})}var pN=R(M(),1);function Ov({top:e,left:t,right:r,bottom:o}){return{x:{min:t,max:r},y:{min:e,max:o}}}function ZD({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function JD(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 XS(e){return e===void 0||e===1}function Fv({scale:e,scaleX:t,scaleY:r}){return!XS(e)||!XS(t)||!XS(r)}function Za(e){return Fv(e)||YS(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function YS(e){return eN(e.x)||eN(e.y)}function eN(e){return e&&e!=="0%"}function jp(e,t,r){let o=e-r,n=t*o;return r+n}function tN(e,t,r,o,n){return n!==void 0&&(e=jp(e,n,o)),jp(e,r,o)+t}function QS(e,t=0,r=1,o,n){e.min=tN(e.min,t,r,o,n),e.max=tN(e.max,t,r,o,n)}function ZS(e,{x:t,y:r}){QS(e.x,t.translate,t.scale,t.originPoint),QS(e.y,r.translate,r.scale,r.originPoint)}var rN=.999999999999,oN=1.0000000000001;function aN(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&&Ll(e,{x:-a.scroll.offset.x,y:-a.scroll.offset.y}),i&&(t.x*=i.x.scale,t.y*=i.y.scale,ZS(e,i)),o&&Za(a.latestValues)&&Ll(e,a.latestValues))}t.x<oN&&t.x>rN&&(t.x=1),t.y<oN&&t.y>rN&&(t.y=1)}function ss(e,t){e.min=e.min+t,e.max=e.max+t}function nN(e,t,r,o,n=.5){let a=ke(e.min,e.max,n);QS(e,t,r,a,o)}function Ll(e,t){nN(e.x,t.x,t.scaleX,t.scale,t.originX),nN(e.y,t.y,t.scaleY,t.scale,t.originY)}function JS(e,t){return Ov(JD(e.getBoundingClientRect(),t))}function iN(e,t,r){let o=JS(e,r),{scroll:n}=t;return n&&(ss(o.x,n.offset.x),ss(o.y,n.offset.y)),o}var sN=()=>({translate:0,scale:1,origin:0,originPoint:0}),Tl=()=>({x:sN(),y:sN()}),lN=()=>({min:0,max:0}),Ke=()=>({x:lN(),y:lN()});var $p={current:null},_v={current:!1};function uN(){if(_v.current=!0,!!ac)if(window.matchMedia){let e=window.matchMedia("(prefers-reduced-motion)"),t=()=>$p.current=e.matches;e.addEventListener("change",t),t()}else $p.current=!1}var ls=new WeakMap;function cN(e,t,r){for(let o in t){let n=t[o],a=r[o];if(Be(n))e.addValue(o,n);else if(Be(a))e.addValue(o,ro(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,ro(i!==void 0?i:n,{owner:e}))}}for(let o in r)t[o]===void 0&&e.removeValue(o);return t}var dN=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],Rc=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=$a,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=wt.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,Le.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=Il(r),this.isVariantNode=bv(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&&Be(p)&&p.set(l[f])}}mount(t){this.current=t,ls.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)),_v.current||uN(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:$p.current,this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Cr(this.notifyUpdate),Cr(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=yo.has(t);o&&this.onBindTransform&&this.onBindTransform();let n=r.on("change",i=>{this.latestValues[t]=i,this.props.onUpdate&&Le.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 Xa){let r=Xa[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):Ke()}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<dN.length;o++){let n=dN[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=cN(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=ro(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"&&(ap(o)||sp(o))?o=parseFloat(o):!GS(o)&&br.test(r)&&(o=Np(t,r)),this.setBaseTarget(t,Be(o)?o.get():o)),Be(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=yc(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&&!Be(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 za),this.events[t].add(r)}notify(t,...r){this.events[t]&&this.events[t].notify(...r)}scheduleRenderMicrotask(){Sl.render(this.render)}};var Ic=class extends Rc{constructor(){super(...arguments),this.KeyframeResolver=Op}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;Be(t)&&(this.childSubscription=t.on("change",r=>{this.current&&(this.current.textContent=`${r}`)}))}};function Vv(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 v6(e){return window.getComputedStyle(e)}var Pc=class extends Ic{constructor(){super(...arguments),this.type="html",this.renderInstance=Vv}readValueFromInstance(t,r){if(yo.has(r))return this.projection?.isProjecting?Lp(r):RS(t,r);{let o=v6(t),n=(fl(r)?o.getPropertyValue(r):o[r])||0;return typeof n=="string"?n.trim():n}}measureInstanceViewportBox(t,{transformPagePoint:r}){return JS(t,r)}build(t,r,o){gc(t,r,o.transformTemplate)}scrapeMotionValuesFromProps(t,r,o){return Cc(t,r,o)}};var Bv=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 fN(e,t,r,o){Vv(e,t,void 0,o);for(let n in t.attrs)e.setAttribute(Bv.has(n)?n:Sc(n),t.attrs[n])}var Lc=class extends Ic{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ke}getBaseTargetFromProps(t,r){return t[r]}readValueFromInstance(t,r){if(yo.has(r)){let o=Dp(r);return o&&o.default||0}return r=Bv.has(r)?r:Sc(r),t.getAttribute(r)}scrapeMotionValuesFromProps(t,r,o){return Mv(t,r,o)}build(t,r,o){Pv(t,r,this.isSVGTag,o.transformTemplate,o.style)}renderInstance(t,r,o,n){fN(t,r,o,n)}mount(t){this.isSVGTag=Tv(t.tagName),super.mount(t)}};var mN=(e,t)=>vc(e)?new Lc(t):new Pc(t,{allowProjection:e!==pN.Fragment});function ma(e,t,r){let o=e.getProps();return yc(o,t,r!==void 0?r:o.custom,e)}var qp=e=>Array.isArray(e);function x6(e,t,r){e.hasValue(t)?e.getValue(t).set(r):e.addValue(t,ro(r))}function y6(e){return qp(e)?e[e.length-1]||0:e}function gN(e,t){let r=ma(e,t),{transitionEnd:o={},transition:n={},...a}=r||{};a={...a,...o};for(let i in a){let s=y6(a[i]);x6(e,i,s)}}function hN(e){return!!(Be(e)&&e.add)}function Kp(e,t){let r=e.getValue("willChange");if(hN(r))return r.add(t);if(!r&&wr.WillChange){let o=new wr.WillChange("auto");e.addValue("willChange",o),o.add(t)}}function Hv(e){return e.props[Ev]}var w6=e=>e!==null;function vN(e,{repeat:t,repeatType:r="loop"},o){let n=e.filter(w6),a=t&&r!=="loop"&&t%2===1?0:n.length-1;return!a||o===void 0?n[a]:o}var C6={type:"spring",stiffness:500,damping:25,restSpeed:10},S6=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),b6={type:"keyframes",duration:.8},R6={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},xN=(e,{keyframes:t})=>t.length>2?b6:yo.has(e)?e.startsWith("scale")?S6(t[1]):C6:R6;function yN({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 Tc=(e,t,r,o={},n,a)=>i=>{let s=yl(o,e)||{},l=s.delay||o.delay||0,{elapsed:u=0}=o;u=u-Rt(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};yN(s)||Object.assign(c,xN(e,c)),c.duration&&(c.duration=Rt(c.duration)),c.repeatDelay&&(c.repeatDelay=Rt(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let d=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(pc(c),c.delay===0&&(d=!0)),(wr.instantAnimations||wr.skipAnimations)&&(d=!0,pc(c),c.delay=0),c.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){let f=vN(c.keyframes,s);if(f!==void 0){Le.update(()=>{c.onUpdate(f),c.onComplete()});return}}return s.isSync?new ja(c):new kp(c)};function I6({protectedKeys:e,needsAnimating:t},r){let o=e.hasOwnProperty(r)&&t[r]!==!0;return t[r]=!1,o}function kc(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&&I6(u,c))continue;let p={delay:r,...yl(a||{},c)},g=d.get();if(g!==void 0&&!d.isAnimating&&!Array.isArray(f)&&f===g&&!p.velocity)continue;let m=!1;if(window.MotionHandoffAnimation){let h=Hv(e);if(h){let v=window.MotionHandoffAnimation(h,c,Le);v!==null&&(p.startTime=v,m=!0)}}Kp(e,c),d.start(Tc(c,d,f,e.shouldReduceMotion&&Ep.has(c)?{type:!1}:p,e,m));let x=d.animation;x&&l.push(x)}return i&&Promise.all(l).then(()=>{Le.update(()=>{i&&gN(e,i)})}),l}function Uv(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 zv(e,t,r={}){let o=ma(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(kc(e,o,r)):()=>Promise.resolve(),i=e.variantChildren&&e.variantChildren.size?(l=0)=>{let{delayChildren:u=0,staggerChildren:c,staggerDirection:d}=n;return P6(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 P6(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(zv(l,t,{...i,delay:r+(typeof o=="function"?0:o)+Uv(e.variantChildren,l,o,n,a)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(s)}function wN(e,t,r={}){e.notify("AnimationStart",t);let o;if(Array.isArray(t)){let n=t.map(a=>zv(e,a,r));o=Promise.all(n)}else if(typeof t=="string")o=zv(e,t,r);else{let n=typeof t=="function"?ma(e,t,r.custom):t;o=Promise.all(kc(e,n,r))}return o.then(()=>{e.notify("AnimationComplete",t)})}function eb(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 L6=Wp.length;function tb(e){if(!e)return;if(!e.isControllingVariants){let r=e.parent?tb(e.parent)||{}:{};return e.props.initial!==void 0&&(r.initial=e.props.initial),r}let t={};for(let r=0;r<L6;r++){let o=Wp[r],n=e.props[o];(Ya(n)||n===!1)&&(t[o]=n)}return t}var T6=[...Sv].reverse(),k6=Sv.length;function M6(e){return t=>Promise.all(t.map(({animation:r,options:o})=>wN(e,r,o)))}function SN(e){let t=M6(e),r=CN(),o=!0,n=l=>(u,c)=>{let d=ma(e,c,l==="exit"?e.presenceContext?.custom:void 0);if(d){let{transition:f,transitionEnd:p,...g}=d;u={...u,...g,...p}}return u};function a(l){t=l(e)}function i(l){let{props:u}=e,c=tb(e.parent)||{},d=[],f=new Set,p={},g=1/0;for(let x=0;x<k6;x++){let h=T6[x],v=r[h],y=u[h]!==void 0?u[h]:c[h],w=Ya(y),C=h===l?v.isActive:null;C===!1&&(g=x);let b=y===c[h]&&y!==u[h]&&w;if(b&&o&&e.manuallyAnimateOnMount&&(b=!1),v.protectedKeys={...p},!v.isActive&&C===null||!y&&!v.prevProp||is(y)||typeof y=="boolean")continue;let S=E6(v.prevProp,y),I=S||h===l&&v.isActive&&!b&&w||x>g&&w,L=!1,T=Array.isArray(y)?y:[y],k=T.reduce(n(h),{});C===!1&&(k={});let{prevResolvedValues:E={}}=v,_={...E,...k},D=O=>{I=!0,f.has(O)&&(L=!0,f.delete(O)),v.needsAnimating[O]=!0;let B=e.getValue(O);B&&(B.liveStyle=!1)};for(let O in _){let B=k[O],A=E[O];if(p.hasOwnProperty(O))continue;let te=!1;qp(B)&&qp(A)?te=!eb(B,A):te=B!==A,te?B!=null?D(O):f.add(O):B!==void 0&&f.has(O)?D(O):v.protectedKeys[O]=!0}v.prevProp=y,v.prevResolvedValues=k,v.isActive&&(p={...p,...k}),o&&e.blockInitialAnimation&&(I=!1);let z=b&&S;I&&(!z||L)&&d.push(...T.map(O=>{let B={type:h};if(typeof O=="string"&&o&&!z&&e.manuallyAnimateOnMount&&e.parent){let{parent:A}=e,te=ma(A,O);if(A.enteringChildren&&te){let{delayChildren:ae}=te.transition||{};B.delay=Uv(A.enteringChildren,e,ae)}}return{animation:O,options:B}}))}if(f.size){let x={};if(typeof u.initial!="boolean"){let h=ma(e,Array.isArray(u.initial)?u.initial[0]:u.initial);h&&h.transition&&(x.transition=h.transition)}f.forEach(h=>{let v=e.getBaseTarget(h),y=e.getValue(h);y&&(y.liveStyle=!0),x[h]=v??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=CN()}}}function E6(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!eb(t,e):!1}function kl(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function CN(){return{animate:kl(!0),whileInView:kl(),whileHover:kl(),whileTap:kl(),whileDrag:kl(),whileFocus:kl(),exit:kl()}}var Xt=class{constructor(t){this.isMounted=!1,this.node=t}update(){}};var Gv=class extends Xt{constructor(t){super(t),t.animationState||(t.animationState=SN(t))}updateAnimationControlsSubscription(){let{animate:t}=this.node.getProps();is(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 A6=0,Wv=class extends Xt{constructor(){super(...arguments),this.id=A6++}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 bN={animation:{Feature:Gv},exit:{Feature:Wv}};function Ja(e,t,r,o={passive:!0}){return e.addEventListener(t,r,o),()=>e.removeEventListener(t,r)}function ei(e){return{point:{x:e.pageX,y:e.pageY}}}var RN=e=>t=>bl(t)&&e(t,ei(t));function us(e,t,r,o){return Ja(e,t,RN(r),o)}var TN=1e-4,D6=1-TN,N6=1+TN,kN=.01,O6=0-kN,F6=0+kN;function Ut(e){return e.max-e.min}function MN(e,t,r){return Math.abs(e-t)<=r}function IN(e,t,r,o=.5){e.origin=o,e.originPoint=ke(t.min,t.max,e.origin),e.scale=Ut(r)/Ut(t),e.translate=ke(r.min,r.max,e.origin)-e.originPoint,(e.scale>=D6&&e.scale<=N6||isNaN(e.scale))&&(e.scale=1),(e.translate>=O6&&e.translate<=F6||isNaN(e.translate))&&(e.translate=0)}function Mc(e,t,r,o){IN(e.x,t.x,r.x,o?o.originX:void 0),IN(e.y,t.y,r.y,o?o.originY:void 0)}function PN(e,t,r){e.min=r.min+t.min,e.max=e.min+Ut(t)}function EN(e,t,r){PN(e.x,t.x,r.x),PN(e.y,t.y,r.y)}function LN(e,t,r){e.min=t.min-r.min,e.max=e.min+Ut(t)}function Ec(e,t,r){LN(e.x,t.x,r.x),LN(e.y,t.y,r.y)}function no(e){return[e("x"),e("y")]}var jv=({current:e})=>e?e.ownerDocument.defaultView:null;var AN=(e,t)=>Math.abs(e-t);function DN(e,t){let r=AN(e.x,t.x),o=AN(e.y,t.y);return Math.sqrt(r**2+o**2)}var Ac=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=ob(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,g=DN(f.offset,{x:0,y:0})>=this.distanceThreshold;if(!p&&!g)return;let{point:m}=f,{timestamp:x}=yt;this.history.push({...m,timestamp:x});let{onStart:h,onMove:v}=this.handlers;p||(h&&h(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,f)},this.handlePointerMove=(f,p)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=rb(p,this.transformPagePoint),Le.update(this.updatePoint,!0)},this.handlePointerUp=(f,p)=>{this.end();let{onEnd:g,onSessionEnd:m,resumeAnimation:x}=this.handlers;if(this.dragSnapToOrigin&&x&&x(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let h=ob(f.type==="pointercancel"?this.lastMoveEventInfo:rb(p,this.transformPagePoint),this.history);this.startEvent&&g&&g(f,h),m&&m(f,h)},!bl(t))return;this.dragSnapToOrigin=a,this.handlers=r,this.transformPagePoint=o,this.distanceThreshold=i,this.contextWindow=n||window;let s=ei(t),l=rb(s,this.transformPagePoint),{point:u}=l,{timestamp:c}=yt;this.history=[{...u,timestamp:c}];let{onSessionStart:d}=r;d&&d(t,ob(l,this.history)),this.removeListeners=Ln(us(this.contextWindow,"pointermove",this.handlePointerMove),us(this.contextWindow,"pointerup",this.handlePointerUp),us(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Cr(this.updatePoint)}};function rb(e,t){return t?{point:t(e.point)}:e}function NN(e,t){return{x:e.x-t.x,y:e.y-t.y}}function ob({point:e},t){return{point:e,delta:NN(e,ON(t)),offset:NN(e,_6(t)),velocity:V6(t,.1)}}function _6(e){return e[0]}function ON(e){return e[e.length-1]}function V6(e,t){if(e.length<2)return{x:0,y:0};let r=e.length-1,o=null,n=ON(e);for(;r>=0&&(o=e[r],!(n.timestamp-o.timestamp>Rt(t)));)r--;if(!o)return{x:0,y:0};let a=Ht(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 HN(e,{min:t,max:r},o){return t!==void 0&&e<t?e=o?ke(t,e,o.min):Math.max(e,t):r!==void 0&&e>r&&(e=o?ke(r,e,o.max):Math.min(e,r)),e}function FN(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 UN(e,{top:t,left:r,bottom:o,right:n}){return{x:FN(e.x,r,n),y:FN(e.y,t,o)}}function _N(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 zN(e,t){return{x:_N(e.x,t.x),y:_N(e.y,t.y)}}function GN(e,t){let r=.5,o=Ut(e),n=Ut(t);return n>o?r=zo(t.min,t.max-o,e.min):o>n&&(r=zo(e.min,e.max-n,t.min)),Kt(0,1,r)}function WN(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 $v=.35;function jN(e=$v){return e===!1?e=0:e===!0&&(e=$v),{x:VN(e,"left","right"),y:VN(e,"top","bottom")}}function VN(e,t,r){return{min:BN(e,t),max:BN(e,r)}}function BN(e,t){return typeof e=="number"?e:e[t]||0}var B6=new WeakMap,Kv=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=Ke(),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(ei(d).point)},i=(d,f)=>{let{drag:p,dragPropagation:g,onDragStart:m}=this.getProps();if(p&&!g&&(this.openDragLock&&this.openDragLock(),this.openDragLock=_S(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),no(h=>{let v=this.getAxisMotionValue(h).get()||0;if(Sr.test(v)){let{projection:y}=this.visualElement;if(y&&y.layout){let w=y.layout.layoutBox[h];w&&(v=Ut(w)*(parseFloat(v)/100))}}this.originPoint[h]=v}),m&&Le.postRender(()=>m(d,f)),Kp(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:g,onDirectionLock:m,onDrag:x}=this.getProps();if(!p&&!this.openDragLock)return;let{offset:h}=f;if(g&&this.currentDirection===null){this.currentDirection=H6(h),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",f.point,h),this.updateAxis("y",f.point,h),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=()=>no(d=>this.getAnimationState(d)==="paused"&&this.getAxisMotionValue(d).animation?.play()),{dragSnapToOrigin:c}=this.getProps();this.panSession=new Ac(t,{onSessionStart:a,onStart:i,onMove:s,onSessionEnd:l,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:o,contextWindow:jv(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&&Le.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||!qv(t,n,this.currentDirection))return;let a=this.getAxisMotionValue(t),i=this.originPoint[t]+o[t];this.constraints&&this.constraints[t]&&(i=HN(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&&Qa(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&o?this.constraints=UN(o.layoutBox,t):this.constraints=!1,this.elastic=jN(r),n!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&no(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=WN(o.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){let{dragConstraints:t,onMeasureDragConstraints:r}=this.getProps();if(!t||!Qa(t))return!1;let o=t.current;sr(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=iN(o,n.root,this.visualElement.getTransformPagePoint()),i=zN(n.layout.layoutBox,a);if(r){let s=r(ZD(i));this.hasMutatedConstraints=!!s,s&&(i=Ov(s))}return i}startAnimation(t){let{drag:r,dragMomentum:o,dragElastic:n,dragTransition:a,dragSnapToOrigin:i,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},u=no(c=>{if(!qv(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,g={type:"inertia",velocity:o?t[c]:0,bounceStiffness:f,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...a,...d};return this.startAxisValueAnimation(c,g)});return Promise.all(u).then(s)}startAxisValueAnimation(t,r){let o=this.getAxisMotionValue(t);return Kp(this.visualElement,t),o.start(Tc(t,o,0,r,this.visualElement,!1))}stopAnimation(){no(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){no(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){no(r=>{let{drag:o}=this.getProps();if(!qv(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]-ke(i,s,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:t,dragConstraints:r}=this.getProps(),{projection:o}=this.visualElement;if(!Qa(r)||!o||!this.constraints)return;this.stopAnimation();let n={x:0,y:0};no(i=>{let s=this.getAxisMotionValue(i);if(s&&this.constraints!==!1){let l=s.get();n[i]=GN({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(),no(i=>{if(!qv(i,t,null))return;let s=this.getAxisMotionValue(i),{min:l,max:u}=this.constraints[i];s.set(ke(l,u,n[i]))})}addListeners(){if(!this.visualElement.current)return;B6.set(this.visualElement,this);let t=this.visualElement.current,r=us(t,"pointerdown",l=>{let{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(l)}),o=()=>{let{dragConstraints:l}=this.getProps();Qa(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()),Le.read(o);let i=Ja(window,"resize",()=>this.scalePositionWithinConstraints()),s=n.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(no(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=$v,dragMomentum:s=!0}=t;return{...t,drag:r,dragDirectionLock:o,dragPropagation:n,dragConstraints:a,dragElastic:i,dragMomentum:s}}};function qv(e,t,r){return(t===!0||t===e)&&(r===null||r===e)}function H6(e,t=10){let r=null;return Math.abs(e.y)>t?r="y":Math.abs(e.x)>t&&(r="x"),r}var Xv=class extends Xt{constructor(t){super(t),this.removeGroupControls=gt,this.removeListeners=gt,this.controls=new Kv(t)}mount(){let{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||gt}unmount(){this.removeGroupControls(),this.removeListeners()}};var $N=e=>(t,r)=>{e&&Le.postRender(()=>e(t,r))},Yv=class extends Xt{constructor(){super(...arguments),this.removePointerDownListener=gt}onPointerDown(t){this.session=new Ac(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:jv(this.node)})}createPanHandlers(){let{onPanSessionStart:t,onPanStart:r,onPan:o,onPanEnd:n}=this.node.getProps();return{onSessionStart:$N(t),onStart:$N(r),onMove:o,onEnd:(a,i)=>{delete this.session,n&&Le.postRender(()=>n(a,i))}}}mount(){this.removePointerDownListener=us(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 XN=R(N(),1);var Xp=R(M(),1);var Dc={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function qN(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var Nc={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(ue.test(e))e=parseFloat(e);else return e;let r=qN(e,t.target.x),o=qN(e,t.target.y);return`${r}% ${o}%`}};var KN={correct:(e,{treeScale:t,projectionDelta:r})=>{let o=e,n=br.parse(e);if(n.length>5)return o;let a=br.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=ke(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 nb=!1,ab=class extends Xp.Component{componentDidMount(){let{visualElement:t,layoutGroup:r,switchLayoutGroup:o,layoutId:n}=this.props,{projection:a}=t;DD(U6),a&&(r.group&&r.group.add(a),o&&o.register&&n&&o.register(a),nb&&a.root.didUpdate(),a.addEventListener("animationComplete",()=>{this.safeToRemove()}),a.setOptions({...a.options,onExitComplete:()=>this.safeToRemove()})),Dc.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){let{layoutDependency:r,visualElement:o,drag:n,isPresent:a}=this.props,{projection:i}=o;return i&&(i.isPresent=a,nb=!0,n||t.layoutDependency!==r||r===void 0||t.isPresent!==a?i.willUpdate():this.safeToRemove(),t.isPresent!==a&&(a?i.promote():i.relegate()||Le.postRender(()=>{let s=i.getStack();(!s||!s.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){let{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Sl.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:t,layoutGroup:r,switchLayoutGroup:o}=this.props,{projection:n}=t;nb=!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 Qv(e){let[t,r]=yv(),o=(0,Xp.useContext)(nc);return(0,XN.jsx)(ab,{...e,layoutGroup:o,switchLayoutGroup:(0,Xp.useContext)(Av),isPresent:t,safeToRemove:r})}var U6={borderRadius:{...Nc,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Nc,borderTopRightRadius:Nc,borderBottomLeftRadius:Nc,borderBottomRightRadius:Nc,boxShadow:KN};function Zv(e,t,r){let o=Be(e)?e:ro(e);return o.start(Tc("",o,t,r)),o.animation}var YN=(e,t)=>e.depth-t.depth;var Jv=class{constructor(){this.children=[],this.isDirty=!1}add(t){cl(this.children,t),this.isDirty=!0}remove(t){Pn(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(YN),this.isDirty=!1,this.children.forEach(t)}};function QN(e,t){let r=wt.now(),o=({timestamp:n})=>{let a=n-r;a>=t&&(Cr(o),e(a-t))};return Le.setup(o,!0),()=>Cr(o)}var t2=["TopLeft","TopRight","BottomLeft","BottomRight"],z6=t2.length,ZN=e=>typeof e=="string"?parseFloat(e):e,JN=e=>typeof e=="number"||ue.test(e);function r2(e,t,r,o,n,a){n?(e.opacity=ke(0,r.opacity??1,G6(o)),e.opacityExit=ke(t.opacity??1,0,W6(o))):a&&(e.opacity=ke(t.opacity??1,r.opacity??1,o));for(let i=0;i<z6;i++){let s=`border${t2[i]}Radius`,l=e2(t,s),u=e2(r,s);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||JN(l)===JN(u)?(e[s]=Math.max(ke(ZN(l),ZN(u),o),0),(Sr.test(u)||Sr.test(l))&&(e[s]+="%")):e[s]=u}(t.rotate||r.rotate)&&(e.rotate=ke(t.rotate||0,r.rotate||0,o))}function e2(e,t){return e[t]!==void 0?e[t]:e.borderRadius}var G6=o2(0,.5,fp),W6=o2(.5,.95,gt);function o2(e,t,r){return o=>o<e?0:o>t?1:r(zo(e,t,o))}function n2(e,t){e.min=t.min,e.max=t.max}function wo(e,t){n2(e.x,t.x),n2(e.y,t.y)}function ib(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function a2(e,t,r,o,n){return e-=t,e=jp(e,1/r,o),n!==void 0&&(e=jp(e,1/n,o)),e}function j6(e,t=0,r=1,o=.5,n,a=e,i=e){if(Sr.test(t)&&(t=parseFloat(t),t=ke(i.min,i.max,t/100)-i.min),typeof t!="number")return;let s=ke(a.min,a.max,o);e===a&&(s-=t),e.min=a2(e.min,t,r,s,n),e.max=a2(e.max,t,r,s,n)}function i2(e,t,[r,o,n],a,i){j6(e,t[r],t[o],t[n],t.scale,a,i)}var $6=["x","scaleX","originX"],q6=["y","scaleY","originY"];function sb(e,t,r,o){i2(e.x,t,$6,r?r.x:void 0,o?o.x:void 0),i2(e.y,t,q6,r?r.y:void 0,o?o.y:void 0)}function s2(e){return e.translate===0&&e.scale===1}function lb(e){return s2(e.x)&&s2(e.y)}function l2(e,t){return e.min===t.min&&e.max===t.max}function c2(e,t){return l2(e.x,t.x)&&l2(e.y,t.y)}function u2(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function ub(e,t){return u2(e.x,t.x)&&u2(e.y,t.y)}function cb(e){return Ut(e.x)/Ut(e.y)}function db(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}var ex=class{constructor(){this.members=[]}add(t){cl(this.members,t),t.scheduleRender()}remove(t){if(Pn(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 d2(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:g}=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) `),g&&(o+=`skewY(${g}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 Ml={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},fb=["","X","Y","Z"],K6=1e3,X6=0;function pb(e,t,r,o){let{latestValues:n}=t;n[e]&&(r[e]=n[e],t.setStaticValue(e,0),o&&(o[e]=0))}function w2(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let r=Hv(t);if(window.MotionHasOptimisedAnimation(r,"transform")){let{layout:n,layoutId:a}=e.options;window.MotionCancelOptimisedAnimation(r,"transform",Le,!(n||a))}let{parent:o}=e;o&&!o.hasCheckedOptimisedAppear&&w2(o)}function tx({attachResizeListener:e,defaultParent:t,measureScroll:r,checkIsScrollRoot:o,resetTransform:n}){return class{constructor(i={},s=t?.()){this.id=X6++,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,to.value&&(Ml.nodes=Ml.calculatedTargetDeltas=Ml.calculatedProjections=0),this.nodes.forEach(Z6),this.nodes.forEach(r8),this.nodes.forEach(o8),this.nodes.forEach(J6),to.addProjectionMetrics&&to.addProjectionMetrics(Ml)},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 Jv)}addEventListener(i,s){return this.eventHandlers.has(i)||this.eventHandlers.set(i,new za),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=Rl(i)&&!Bp(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;Le.read(()=>{d=window.innerWidth}),e(i,()=>{let p=window.innerWidth;p!==d&&(d=p,this.root.updateBlockedByResize=!0,c&&c(),c=QN(f,250),Dc.hasAnimatedSinceResize&&(Dc.hasAnimatedSinceResize=!1,this.nodes.forEach(m2)))})}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 g=this.options.transition||u.getDefaultTransition()||l8,{onLayoutAnimationStart:m,onLayoutAnimationComplete:x}=u.getProps(),h=!this.targetLayout||!ub(this.targetLayout,p),v=!d&&f;if(this.options.layoutRoot||this.resumeFrom||v||d&&(h||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let y={...yl(g,"layout"),onPlay:m,onComplete:x};(u.shouldReduceMotion||this.options.layoutRoot)&&(y.delay=0,y.type=!1),this.startAnimation(y),this.setAnimationOrigin(c,v)}else d||m2(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(),Cr(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(n8),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&&w2(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(f2);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(p2);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(t8),this.nodes.forEach(Y6),this.nodes.forEach(Q6)):this.nodes.forEach(p2),this.clearAllSnapshots();let s=wt.now();yt.delta=Kt(0,1e3/60,s-yt.timestamp),yt.timestamp=s,yt.isProcessing=!0,yp.update.process(yt),yp.preRender.process(yt),yp.render.process(yt),yt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Sl.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(e8),this.sharedNodes.forEach(a8)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Le.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Le.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Ut(this.snapshot.measuredBox.x)&&!Ut(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=Ke(),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&&!lb(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;i&&this.instance&&(s||Za(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)),u8(l),{animationId:this.root.animationId,measuredBox:s,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:i}=this.options;if(!i)return Ke();let s=i.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(c8))){let{scroll:u}=this.root;u&&(ss(s.x,u.offset.x),ss(s.y,u.offset.y))}return s}removeElementScroll(i){let s=Ke();if(wo(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&&wo(s,i),ss(s.x,c.offset.x),ss(s.y,c.offset.y))}return s}applyTransform(i,s=!1){let l=Ke();wo(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&&Ll(l,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),Za(c.latestValues)&&Ll(l,c.latestValues)}return Za(this.latestValues)&&Ll(l,this.latestValues),l}removeTransform(i){let s=Ke();wo(s,i);for(let l=0;l<this.path.length;l++){let u=this.path[l];if(!u.instance||!Za(u.latestValues))continue;Fv(u.latestValues)&&u.updateSnapshot();let c=Ke(),d=u.measurePageBox();wo(c,d),sb(s,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,c)}return Za(this.latestValues)&&sb(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=Ke(),this.relativeTargetOrigin=Ke(),Ec(this.relativeTargetOrigin,this.layout.layoutBox,f.layout.layoutBox),wo(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=Ke(),this.targetWithTransforms=Ke()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),EN(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):wo(this.target,this.layout.layoutBox),ZS(this.target,this.targetDelta)):wo(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=Ke(),this.relativeTargetOrigin=Ke(),Ec(this.relativeTargetOrigin,this.target,f.target),wo(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}to.value&&Ml.calculatedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||Fv(this.parent.latestValues)||YS(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;wo(this.layoutCorrected,this.layout.layoutBox);let d=this.treeScale.x,f=this.treeScale.y;aN(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=Ke());let{target:p}=i;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(ib(this.prevProjectionDelta.x,this.projectionDelta.x),ib(this.prevProjectionDelta.y,this.projectionDelta.y)),Mc(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==f||!db(this.projectionDelta.x,this.prevProjectionDelta.x)||!db(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p)),to.value&&Ml.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=Tl(),this.projectionDelta=Tl(),this.projectionDeltaWithTransform=Tl()}setAnimationOrigin(i,s=!1){let l=this.snapshot,u=l?l.latestValues:{},c={...this.latestValues},d=Tl();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!s;let f=Ke(),p=l?l.source:void 0,g=this.layout?this.layout.source:void 0,m=p!==g,x=this.getStack(),h=!x||x.members.length<=1,v=!!(m&&!h&&this.options.crossfade===!0&&!this.path.some(s8));this.animationProgress=0;let y;this.mixTargetDelta=w=>{let C=w/1e3;g2(d.x,i.x,C),g2(d.y,i.y,C),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ec(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),i8(this.relativeTarget,this.relativeTargetOrigin,f,C),y&&c2(this.relativeTarget,y)&&(this.isProjectionDirty=!1),y||(y=Ke()),wo(y,this.relativeTarget)),m&&(this.animationValues=c,r2(c,u,this.latestValues,C,v,h)),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&&(Cr(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Le.update(()=>{Dc.hasAnimatedSinceResize=!0,Tn.layout++,this.motionValue||(this.motionValue=ro(0)),this.currentAnimation=Zv(this.motionValue,[0,1e3],{...i,velocity:0,isSync:!0,onUpdate:s=>{this.mixTargetDelta(s),i.onUpdate&&i.onUpdate(s)},onStop:()=>{Tn.layout--},onComplete:()=>{Tn.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(K6),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&&C2(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||Ke();let d=Ut(this.layout.layoutBox.x);l.x.min=i.target.x.min,l.x.max=l.x.min+d;let f=Ut(this.layout.layoutBox.y);l.y.min=i.target.y.min,l.y.max=l.y.min+f}wo(s,l),Ll(s,c),Mc(this.projectionDeltaWithTransform,this.layoutCorrected,s,c)}}registerSharedNode(i,s){this.sharedNodes.has(i)||this.sharedNodes.set(i,new ex),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&&pb("z",i,u,this.animationValues);for(let c=0;c<fb.length;c++)pb(`rotate${fb[c]}`,i,u,this.animationValues),pb(`skew${fb[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=wc(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=wc(s?.pointerEvents)||""),this.hasProjected&&!Za(this.latestValues)&&(i.transform=l?l({},""):"none",this.hasProjected=!1);return}i.visibility="";let c=u.animationValues||u.latestValues;this.applyTransformsToTarget();let d=d2(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 g in Pl){if(c[g]===void 0)continue;let{correct:m,applyTo:x,isCSSVariable:h}=Pl[g],v=d==="none"?c[g]:m(c[g],u);if(x){let y=x.length;for(let w=0;w<y;w++)i[x[w]]=v}else h?this.options.visualElement.renderState.vars[g]=v:i[g]=v}this.options.layoutId&&(i.pointerEvents=u===this?wc(s?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(i=>i.currentAnimation?.stop()),this.root.nodes.forEach(f2),this.root.sharedNodes.clear()}}}function Y6(e){e.updateLayout()}function Q6(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"?no(c=>{let d=a?t.measuredBox[c]:t.layoutBox[c],f=Ut(d);d.min=r[c].min,d.max=d.min+f}):C2(n,t.layoutBox,r)&&no(c=>{let d=a?t.measuredBox[c]:t.layoutBox[c],f=Ut(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=Tl();Mc(i,r,t.layoutBox);let s=Tl();a?Mc(s,e.applyTransform(o,!0),t.measuredBox):Mc(s,r,t.layoutBox);let l=!lb(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=Ke();Ec(p,t.layoutBox,d.layoutBox);let g=Ke();Ec(g,r,f.layoutBox),ub(p,g)||(u=!0),c.options.layoutRoot&&(e.relativeTarget=g,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 Z6(e){to.value&&Ml.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 J6(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function e8(e){e.clearSnapshot()}function f2(e){e.clearMeasurements()}function p2(e){e.isLayoutDirty=!1}function t8(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function m2(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function r8(e){e.resolveTargetDelta()}function o8(e){e.calcProjection()}function n8(e){e.resetSkewAndRotation()}function a8(e){e.removeLeadSnapshot()}function g2(e,t,r){e.translate=ke(t.translate,0,r),e.scale=ke(t.scale,1,r),e.origin=t.origin,e.originPoint=t.originPoint}function h2(e,t,r,o){e.min=ke(t.min,r.min,o),e.max=ke(t.max,r.max,o)}function i8(e,t,r,o){h2(e.x,t.x,r.x,o),h2(e.y,t.y,r.y,o)}function s8(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var l8={duration:.45,ease:[.4,0,.1,1]},v2=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),x2=v2("applewebkit/")&&!v2("chrome/")?Math.round:gt;function y2(e){e.min=x2(e.min),e.max=x2(e.max)}function u8(e){y2(e.x),y2(e.y)}function C2(e,t,r){return e==="position"||e==="preserve-aspect"&&!MN(cb(t),cb(r),.2)}function c8(e){return e!==e.root&&e.scroll?.wasRoot}var S2=tx({attachResizeListener:(e,t)=>Ja(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0});var mb={current:void 0},rx=tx({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!mb.current){let e=new S2({});e.mount(window),e.setOptions({layoutScroll:!0}),mb.current=e}return mb.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"});var b2={pan:{Feature:Yv},drag:{Feature:Xv,ProjectionNode:rx,MeasureLayout:Qv}};function R2(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&&Le.postRender(()=>a(t,ei(t)))}var ox=class extends Xt{mount(){let{current:t}=this.node;t&&(this.unmount=VS(t,(r,o)=>(R2(this.node,o,"Start"),n=>R2(this.node,n,"End"))))}unmount(){}};var nx=class extends Xt{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=Ln(Ja(this.node.current,"focus",()=>this.onFocus()),Ja(this.node.current,"blur",()=>this.onBlur()))}unmount(){}};function I2(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&&Le.postRender(()=>a(t,ei(t)))}var ax=class extends Xt{mount(){let{current:t}=this.node;t&&(this.unmount=US(t,(r,o)=>(I2(this.node,o,"Start"),(n,{success:a})=>I2(this.node,n,a?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}};var hb=new WeakMap,gb=new WeakMap,d8=e=>{let t=hb.get(e.target);t&&t(e)},f8=e=>{e.forEach(d8)};function p8({root:e,...t}){let r=e||document;gb.has(r)||gb.set(r,{});let o=gb.get(r),n=JSON.stringify(t);return o[n]||(o[n]=new IntersectionObserver(f8,{root:e,...t})),o[n]}function P2(e,t,r){let o=p8(t);return hb.set(e,r),o.observe(e),()=>{hb.delete(e),o.unobserve(e)}}var m8={some:0,all:1},ix=class extends Xt{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:m8[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 P2(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(g8(t,r))&&this.startObserver()}unmount(){}};function g8({viewport:e={}},{viewport:t={}}={}){return r=>e[r]!==t[r]}var L2={inView:{Feature:ix},tap:{Feature:ax},focus:{Feature:nx},hover:{Feature:ox}};var T2={layout:{ProjectionNode:rx,MeasureLayout:Qv}};var k2={...bN,...L2,...b2,...T2};var He=QD(k2,mN);var Oc=R(M(),1);function Fc(e){let t=ca(()=>ro(e)),{isStatic:r}=(0,Oc.useContext)(os);if(r){let[,o]=(0,Oc.useState)(e);(0,Oc.useEffect)(()=>t.on("change",o),[])}return t}function sx(e,t){let r=Fc(t()),o=()=>r.set(t());return o(),ic(()=>{let n=()=>Le.preRender(o,!1,!0),a=e.map(i=>i.on("change",n));return()=>{a.forEach(i=>i()),Cr(o)}}),r}function M2(e){Cl.current=[],e();let t=sx(Cl.current,e);return Cl.current=void 0,t}function vb(e,t,r,o){if(typeof e=="function")return M2(e);let n=typeof t=="function"?t:zS(t,r,o);return Array.isArray(e)?E2(e,n):E2([e],([a])=>n(a))}function E2(e,t){let r=ca(()=>[]);return sx(e,()=>{r.length=0;let o=e.length;for(let n=0;n<o;n++)r[n]=e[n].get();return t(r)})}function Yp(e){return typeof e=="object"&&!Array.isArray(e)}function lx(e,t,r,o){return typeof e=="string"&&Yp(t)?Fp(e,r,o):e instanceof NodeList?Array.from(e):Array.isArray(e)?e:[e]}function A2(e,t,r){return e*(t+1)}function xb(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 h8(e,t,r){for(let o=0;o<e.length;o++){let n=e[o];n.at>t&&n.at<r&&(Pn(e,n),o--)}}function D2(e,t,r,o,n,a){h8(e,n,a);for(let i=0;i<t.length;i++)e.push({value:t[i],at:ke(n,a,o[i]),easing:hp(r,i)})}function N2(e,t){for(let r=0;r<e.length;r++)e[r]=e[r]/(t+1)}function O2(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}var v8="easeInOut",x8=20;function V2(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 g=e[p];if(typeof g=="string"){u.set(g,d);continue}else if(!Array.isArray(g)){u.set(g.name,xb(d,g.at,c,u));continue}let[m,x,h={}]=g;h.at!==void 0&&(d=xb(d,h.at,c,u));let v=0,y=(w,C,b,S=0,I=0)=>{let L=y8(w),{delay:T=0,times:k=Pp(L),type:E="keyframes",repeat:_,repeatType:D,repeatDelay:z=0,...F}=C,{ease:O=t.ease||"easeOut",duration:B}=C,A=typeof T=="function"?T(S,I):T,te=L.length,ae=xl(E)?E:n?.[E||"keyframes"];if(te<=2&&ae){let Y=100;if(te===2&&S8(L)){let ne=L[1]-L[0];Y=Math.abs(ne)}let ce={...F};B!==void 0&&(ce.duration=Rt(B));let U=bp(ce,Y,ae);O=U.ease,B=U.duration}B??(B=a);let V=d+A;k.length===1&&k[0]===0&&(k[1]=1);let Q=k.length-L.length;if(Q>0&&Ip(k,Q),L.length===1&&L.unshift(null),_){sr(_<x8,"Repeat count too high, must be less than 20","repeat-count-high"),B=A2(B,_);let Y=[...L],ce=[...k];O=Array.isArray(O)?[...O]:[O];let U=[...O];for(let ne=0;ne<_;ne++){L.push(...Y);for(let he=0;he<Y.length;he++)k.push(ce[he]+(ne+1)),O.push(he===0?"linear":hp(U,he-1))}N2(k,_)}let re=V+B;D2(b,L,O,k,V,re),v=Math.max(A+B,v),f=Math.max(re,f)};if(Be(m)){let w=F2(m,s);y(x,h,_2("default",w))}else{let w=lx(m,x,o,l),C=w.length;for(let b=0;b<C;b++){x=x,h=h;let S=w[b],I=F2(S,s);for(let L in x)y(x[L],w8(h,L),_2(L,I),b,C)}}c=d,d+=v}return s.forEach((p,g)=>{for(let m in p){let x=p[m];x.sort(O2);let h=[],v=[],y=[];for(let C=0;C<x.length;C++){let{at:b,value:S,easing:I}=x[C];h.push(S),v.push(zo(0,f,b)),y.push(I||"easeOut")}v[0]!==0&&(v.unshift(0),h.unshift(h[0]),y.unshift(v8)),v[v.length-1]!==1&&(v.push(1),h.push(null)),i.has(g)||i.set(g,{keyframes:{},transition:{}});let w=i.get(g);w.keyframes[m]=h,w.transition[m]={...t,duration:f,ease:y,times:v,...r}}}),i}function F2(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function _2(e,t){return t[e]||(t[e]=[]),t[e]}function y8(e){return Array.isArray(e)?e:[e]}function w8(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}var C8=e=>typeof e=="number",S8=e=>e.every(C8);function b8(e,t){return e in t}var ux=class extends Rc{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,r){if(b8(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 Ke()}build(t,r){Object.assign(t.output,r)}renderInstance(t,{output:r}){Object.assign(t,r)}sortInstanceNodePosition(){return 0}};function B2(e){let t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},r=Rl(e)&&!Bp(e)?new Lc(t):new Pc(t);r.mount(e),ls.set(e,r)}function H2(e){let t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},r=new ux(t);r.mount(e),ls.set(e,r)}function R8(e,t){return Be(e)||typeof e=="number"||typeof e=="string"&&!Yp(t)}function cx(e,t,r,o){let n=[];if(R8(e,t))n.push(Zv(e,Yp(t)&&t.default||t,r&&(r.default||r)));else{let a=lx(e,t,o),i=a.length;sr(!!i,"No valid elements provided.","no-valid-elements");for(let s=0;s<i;s++){let l=a[s];sr(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?B2:H2;ls.has(l)||u(l);let c=ls.get(l),d={...r};"delay"in d&&typeof d.delay=="function"&&(d.delay=d.delay(s,i)),n.push(...kc(c,{...t,transition:d},{}))}}return n}function U2(e,t,r){let o=[];return V2(e,t,r,{spring:Wa}).forEach(({keyframes:a,transition:i},s)=>{o.push(...cx(s,a,i))}),o}function I8(e){return Array.isArray(e)&&e.some(Array.isArray)}function z2(e){function t(r,o,n){let a=[],i;if(I8(r))a=U2(r,o,e);else{let{onComplete:l,...u}=n||{};typeof l=="function"&&(i=l),a=cx(r,o,u,e)}let s=new Mp(a);return i&&s.finished.then(i),e&&(e.animations.push(s),s.finished.then(()=>{Pn(e.animations,s)})),s}return t}var yb=z2();var cSe=K("",{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"}}),En={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}},dx={lift:{y:-2,transition:En.smooth},scale:{scale:1.05,transition:En.smooth},glow:{boxShadow:"0 0 20px rgba(var(--primary), 0.3)",transition:En.smooth},rotate:{rotate:2,transition:En.bouncy}},G2={scale:{scale:.95,transition:{duration:.1}},depress:{y:1,transition:{duration:.1}}},dSe={ring:{boxShadow:"0 0 0 2px var(--background), 0 0 0 4px var(--primary)",transition:En.smooth},glow:{boxShadow:"0 0 0 3px rgba(var(--primary), 0.3)",transition:En.smooth}},fSe={container:{hidden:{opacity:0},show:{opacity:1,transition:{staggerChildren:.05}}},item:{hidden:{opacity:0,y:20},show:{opacity:1,y:0,transition:En.smooth}}},pSe={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:En.smooth},slideRight:{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},exit:{opacity:0,x:20},transition:En.smooth},scale:{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:1.05},transition:En.smooth}},W2={initial:{opacity:.5},animate:{opacity:[.5,.8,.5],transition:{duration:1.5,repeat:1/0,ease:"easeInOut"}}};var mSe={initial:{opacity:0,y:-20,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,scale:.95,transition:{duration:.15}},transition:En.bouncy};var cs=R(N()),j2=K("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"}}),wb=El.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"?dx.scale:a==="glow"?dx.glow:dx.lift,whileTap:G2.scale};return(0,cs.jsx)(He.div,{ref:s,className:P("moonui-theme",j2({variant:t,size:r,radius:o,interactive:n,className:e})),...l,...i})}return(0,cs.jsx)("div",{ref:s,className:P("moonui-theme",j2({variant:t,size:r,radius:o,interactive:n,className:e})),...i})});wb.displayName="Card";var Cb=El.forwardRef(({className:e,...t},r)=>(0,cs.jsx)("div",{ref:r,className:P("moonui-theme","flex flex-col space-y-1.5 p-6",e),...t}));Cb.displayName="CardHeader";var Sb=El.forwardRef(({className:e,...t},r)=>(0,cs.jsx)("h3",{ref:r,className:P("moonui-theme","text-lg font-semibold leading-none tracking-tight",e),...t}));Sb.displayName="CardTitle";var bb=El.forwardRef(({className:e,...t},r)=>(0,cs.jsx)("p",{ref:r,className:P("moonui-theme","text-sm text-muted-foreground",e),...t}));bb.displayName="CardDescription";var Rb=El.forwardRef(({className:e,...t},r)=>(0,cs.jsx)("div",{ref:r,className:P("moonui-theme","p-6 pt-0",e),...t}));Rb.displayName="CardContent";var Ib=El.forwardRef(({className:e,...t},r)=>(0,cs.jsx)("div",{ref:r,className:P("moonui-theme","flex items-center p-6 pt-0",e),...t}));Ib.displayName="CardFooter";var bO=R(M());function Te(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 lr(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function fx(e,t){let r=Te(e);if(isNaN(t))return lr(e,NaN);if(!t)return r;let o=r.getDate(),n=lr(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 P8=Math.pow(10,8)*24*60*60*1e3,LSe=-P8,px=6048e5,$2=864e5;var L8=3600;var q2=L8*24,TSe=q2*7,T8=q2*365.2425,k8=T8/12,kSe=k8*3;var M8={};function ga(){return M8}function An(e,t){let r=ga(),o=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,n=Te(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 Al(e){return An(e,{weekStartsOn:1})}function mx(e){let t=Te(e),r=t.getFullYear(),o=lr(e,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);let n=Al(o),a=lr(e,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);let i=Al(a);return t.getTime()>=n.getTime()?r+1:t.getTime()>=i.getTime()?r:r-1}function _c(e){let t=Te(e);return t.setHours(0,0,0,0),t}function Pb(e){let t=Te(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 K2(e,t){let r=_c(e),o=_c(t),n=+r-Pb(r),a=+o-Pb(o);return Math.round((n-a)/$2)}function X2(e){let t=mx(e),r=lr(e,0);return r.setFullYear(t,0,4),r.setHours(0,0,0,0),Al(r)}function Y2(e){return lr(e,Date.now())}function Dl(e,t){let r=_c(e),o=_c(t);return+r==+o}function Q2(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function gx(e){if(!Q2(e)&&typeof e!="number")return!1;let t=Te(e);return!isNaN(Number(t))}function Z2(e){let t=Te(e),r=t.getMonth();return t.setFullYear(t.getFullYear(),r+1,0),t.setHours(23,59,59,999),t}function hx(e,t){let r=Te(e.start),o=Te(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(Te(i)),i.setDate(i.getDate()+s),i.setHours(0,0,0,0);return n?l.reverse():l}function J2(e){let t=Te(e);return t.setDate(1),t.setHours(0,0,0,0),t}function eO(e){let t=Te(e),r=lr(e,0);return r.setFullYear(t.getFullYear(),0,1),r.setHours(0,0,0,0),r}function tO(e,t){let r=ga(),o=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,n=Te(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 E8={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"}},rO=(e,t,r)=>{let o,n=E8[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 vx(e){return(t={})=>{let r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}var A8={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},D8={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},N8={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},oO={date:vx({formats:A8,defaultWidth:"full"}),time:vx({formats:D8,defaultWidth:"full"}),dateTime:vx({formats:N8,defaultWidth:"full"})};var O8={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},nO=(e,t,r,o)=>O8[e];function Vc(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 F8={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},_8={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},V8={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"]},B8={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"]},H8={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"}},U8={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"}},z8=(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"},aO={ordinalNumber:z8,era:Vc({values:F8,defaultWidth:"wide"}),quarter:Vc({values:_8,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Vc({values:V8,defaultWidth:"wide"}),day:Vc({values:B8,defaultWidth:"wide"}),dayPeriod:Vc({values:H8,defaultWidth:"wide",formattingValues:U8,defaultFormattingWidth:"wide"})};function Bc(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)?W8(s,d=>d.test(i)):G8(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 G8(e,t){for(let r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r}function W8(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r}function iO(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 j8=/^(\d+)(th|st|nd|rd)?/i,$8=/\d+/i,q8={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},K8={any:[/^b/i,/^(a|c)/i]},X8={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Y8={any:[/1/i,/2/i,/3/i,/4/i]},Q8={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},Z8={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]},J8={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},e9={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]},t9={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},r9={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}},sO={ordinalNumber:iO({matchPattern:j8,parsePattern:$8,valueCallback:e=>parseInt(e,10)}),era:Bc({matchPatterns:q8,defaultMatchWidth:"wide",parsePatterns:K8,defaultParseWidth:"any"}),quarter:Bc({matchPatterns:X8,defaultMatchWidth:"wide",parsePatterns:Y8,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Bc({matchPatterns:Q8,defaultMatchWidth:"wide",parsePatterns:Z8,defaultParseWidth:"any"}),day:Bc({matchPatterns:J8,defaultMatchWidth:"wide",parsePatterns:e9,defaultParseWidth:"any"}),dayPeriod:Bc({matchPatterns:t9,defaultMatchWidth:"any",parsePatterns:r9,defaultParseWidth:"any"})};var Lb={code:"en-US",formatDistance:rO,formatLong:oO,formatRelative:nO,localize:aO,match:sO,options:{weekStartsOn:0,firstWeekContainsDate:1}};function lO(e){let t=Te(e);return K2(t,eO(t))+1}function uO(e){let t=Te(e),r=+Al(t)-+X2(t);return Math.round(r/px)+1}function xx(e,t){let r=Te(e),o=r.getFullYear(),n=ga(),a=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=lr(e,0);i.setFullYear(o+1,0,a),i.setHours(0,0,0,0);let s=An(i,t),l=lr(e,0);l.setFullYear(o,0,a),l.setHours(0,0,0,0);let u=An(l,t);return r.getTime()>=s.getTime()?o+1:r.getTime()>=u.getTime()?o:o-1}function cO(e,t){let r=ga(),o=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,n=xx(e,t),a=lr(e,0);return a.setFullYear(n,0,o),a.setHours(0,0,0,0),An(a,t)}function dO(e,t){let r=Te(e),o=+An(r,t)-+cO(r,t);return Math.round(o/px)+1}function Ue(e,t){let r=e<0?"-":"",o=Math.abs(e).toString().padStart(t,"0");return r+o}var ti={y(e,t){let r=e.getFullYear(),o=r>0?r:1-r;return Ue(t==="yy"?o%100:o,t.length)},M(e,t){let r=e.getMonth();return t==="M"?String(r+1):Ue(r+1,2)},d(e,t){return Ue(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 Ue(e.getHours()%12||12,t.length)},H(e,t){return Ue(e.getHours(),t.length)},m(e,t){return Ue(e.getMinutes(),t.length)},s(e,t){return Ue(e.getSeconds(),t.length)},S(e,t){let r=t.length,o=e.getMilliseconds(),n=Math.trunc(o*Math.pow(10,r-3));return Ue(n,t.length)}};var Hc={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Tb={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 ti.y(e,t)},Y:function(e,t,r,o){let n=xx(e,o),a=n>0?n:1-n;if(t==="YY"){let i=a%100;return Ue(i,2)}return t==="Yo"?r.ordinalNumber(a,{unit:"year"}):Ue(a,t.length)},R:function(e,t){let r=mx(e);return Ue(r,t.length)},u:function(e,t){let r=e.getFullYear();return Ue(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 Ue(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 Ue(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 ti.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 Ue(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=dO(e,o);return t==="wo"?r.ordinalNumber(n,{unit:"week"}):Ue(n,t.length)},I:function(e,t,r){let o=uO(e);return t==="Io"?r.ordinalNumber(o,{unit:"week"}):Ue(o,t.length)},d:function(e,t,r){return t==="do"?r.ordinalNumber(e.getDate(),{unit:"date"}):ti.d(e,t)},D:function(e,t,r){let o=lO(e);return t==="Do"?r.ordinalNumber(o,{unit:"dayOfYear"}):Ue(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 Ue(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 Ue(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 Ue(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=Hc.noon:o===0?n=Hc.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=Hc.evening:o>=12?n=Hc.afternoon:o>=4?n=Hc.morning:n=Hc.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 ti.h(e,t)},H:function(e,t,r){return t==="Ho"?r.ordinalNumber(e.getHours(),{unit:"hour"}):ti.H(e,t)},K:function(e,t,r){let o=e.getHours()%12;return t==="Ko"?r.ordinalNumber(o,{unit:"hour"}):Ue(o,t.length)},k:function(e,t,r){let o=e.getHours();return o===0&&(o=24),t==="ko"?r.ordinalNumber(o,{unit:"hour"}):Ue(o,t.length)},m:function(e,t,r){return t==="mo"?r.ordinalNumber(e.getMinutes(),{unit:"minute"}):ti.m(e,t)},s:function(e,t,r){return t==="so"?r.ordinalNumber(e.getSeconds(),{unit:"second"}):ti.s(e,t)},S:function(e,t){return ti.S(e,t)},X:function(e,t,r){let o=e.getTimezoneOffset();if(o===0)return"Z";switch(t){case"X":return pO(o);case"XXXX":case"XX":return Nl(o);case"XXXXX":case"XXX":default:return Nl(o,":")}},x:function(e,t,r){let o=e.getTimezoneOffset();switch(t){case"x":return pO(o);case"xxxx":case"xx":return Nl(o);case"xxxxx":case"xxx":default:return Nl(o,":")}},O:function(e,t,r){let o=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+fO(o,":");case"OOOO":default:return"GMT"+Nl(o,":")}},z:function(e,t,r){let o=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+fO(o,":");case"zzzz":default:return"GMT"+Nl(o,":")}},t:function(e,t,r){let o=Math.trunc(e.getTime()/1e3);return Ue(o,t.length)},T:function(e,t,r){let o=e.getTime();return Ue(o,t.length)}};function fO(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+Ue(a,2)}function pO(e,t){return e%60===0?(e>0?"-":"+")+Ue(Math.abs(e)/60,2):Nl(e,t)}function Nl(e,t=""){let r=e>0?"-":"+",o=Math.abs(e),n=Ue(Math.trunc(o/60),2),a=Ue(o%60,2);return r+n+t+a}var mO=(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"})}},gO=(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"})}},o9=(e,t)=>{let r=e.match(/(P+)(p+)?/)||[],o=r[1],n=r[2];if(!n)return mO(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}}",mO(o,t)).replace("{{time}}",gO(n,t))},hO={p:gO,P:o9};var n9=/^D+$/,a9=/^Y+$/,i9=["D","DD","YY","YYYY"];function vO(e){return n9.test(e)}function xO(e){return a9.test(e)}function yO(e,t,r){let o=s9(e,t,r);if(console.warn(o),i9.includes(e))throw new RangeError(o)}function s9(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 l9=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,u9=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,c9=/^'([^]*?)'?$/,d9=/''/g,f9=/[a-zA-Z]/;function Wo(e,t,r){let o=ga(),n=r?.locale??o.locale??Lb,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=Te(e);if(!gx(s))throw new RangeError("Invalid time value");let l=t.match(u9).map(c=>{let d=c[0];if(d==="p"||d==="P"){let f=hO[d];return f(c,n.formatLong)}return c}).join("").match(l9).map(c=>{if(c==="''")return{isToken:!1,value:"'"};let d=c[0];if(d==="'")return{isToken:!1,value:p9(c)};if(Tb[d])return{isToken:!0,value:c};if(d.match(f9))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&&xO(d)||!r?.useAdditionalDayOfYearTokens&&vO(d))&&yO(d,t,String(e));let f=Tb[d[0]];return f(s,d,n.localize,u)}).join("")}function p9(e){let t=e.match(c9);return t?t[1].replace(d9,"'"):e}function kb(e){return Te(e).getDay()}function wO(e,t){let r=Te(e),o=Te(t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function CO(e){return Dl(e,Y2(e))}function SO(e,t){return fx(e,-t)}var Br=R(N());function Uc({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]=bO.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(SO(c,1))},g=()=>{d(fx(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 Dl(b,t);if(e==="range"){let S=t;return S.from&&S.to?b>=S.from&&b<=S.to:S.from?Dl(b,S.from):!1}return!1},h=b=>{if(e!=="range"||!t)return!1;let S=t;return S.from?Dl(b,S.from):!1},v=b=>{if(e!=="range"||!t)return!1;let S=t;return S.to?Dl(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=J2(c),S=Z2(c),I=hx({start:b,end:S}),L=kb(b),T=[];if(L>0&&n){let D=An(b),z=new Date(b);z.setDate(z.getDate()-1),T.push(...hx({start:D,end:z}))}let k=kb(S),E=[];if(k<6&&n){let D=new Date(S);D.setDate(D.getDate()+1);let z=tO(S);E.push(...hx({start:D,end:z}))}let _=[];if(!n&&L>0)for(let D=0;D<L;D++)_.push(null);return[...T,..._,...I,...E]})();return(0,Br.jsxs)("div",{className:P("moonui-theme","p-0",a),children:[(0,Br.jsxs)("div",{className:"flex items-center justify-between px-6 py-4 border-b border-border/50 dark:border-gray-700/50",children:[(0,Br.jsx)("button",{onClick:p,className:P("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,Br.jsx)(bn,{className:"h-5 w-5"})}),(0,Br.jsx)("h2",{className:"text-base font-medium",children:Wo(c,"MMMM yyyy")}),(0,Br.jsx)("button",{onClick:g,className:P("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,Br.jsx)(Fr,{className:"h-5 w-5"})})]}),(0,Br.jsxs)("div",{className:"px-6 pb-4",children:[(0,Br.jsx)("div",{className:"grid grid-cols-7 mb-2",children:f.map((b,S)=>(0,Br.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,Br.jsx)("div",{className:"grid grid-cols-7 gap-1",children:C.map((b,S)=>{if(!b)return(0,Br.jsx)("div",{className:"h-10 w-10"},`empty-${S}`);let I=!wO(b,c),L=o?.(b)||!1,T=x(b),k=CO(b),E=h(b),_=v(b),D=y(b);return(0,Br.jsx)("button",{onClick:()=>m(b),disabled:L,className:P("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",I&&"text-muted-foreground/50",L&&"text-muted-foreground/30 cursor-not-allowed hover:bg-transparent",T&&!D&&"bg-primary text-primary-foreground font-medium hover:bg-primary hover:text-primary-foreground",k&&"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",E&&"rounded-r-none",_&&"rounded-l-none"),type:"button",children:Wo(b,"d")},b.toISOString())})})]})]})}Uc.displayName="Calendar";var Ol=R(M());var ds=R(N()),m9=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"},RO=(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},Mb=Ol.forwardRef(({className:e,value:t="",onChange:r,showIcon:o=!0,size:n,...a},i)=>{let[s,l]=Ol.useState("unknown"),u=c=>{let d=c.target.value.replace(/\D/g,""),f=m9(d);l(f);let p=f==="amex"?15:16,g=d.slice(0,p),m=RO(g,f);r?.(g,f),c.target.value=m};return(0,ds.jsxs)("div",{className:"relative",children:[(0,ds.jsx)(ur,{ref:i,type:"text",inputMode:"numeric",autoComplete:"cc-number",placeholder:"1234 5678 9012 3456",value:RO(t,s),onChange:u,className:P(o&&"pl-10",e),...a}),o&&(0,ds.jsx)(Nf,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"})]})});Mb.displayName="CardNumberInput";var Eb=Ol.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,ds.jsx)(ur,{ref:a,type:"text",inputMode:"numeric",autoComplete:"cc-exp",placeholder:"MM/YY",value:s,onChange:i,className:e,...n})});Eb.displayName="CardExpiryInput";var Ab=Ol.forwardRef(({className:e,value:t="",onChange:r,cardType:o="unknown",size:n,...a},i)=>{let s=o==="amex"?4:3;return(0,ds.jsx)(ur,{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})});Ab.displayName="CardCVCInput";var Db=Ol.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,ds.jsx)(ur,{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})});Db.displayName="CardZipInput";var It=R(M());var jo=R(M(),1);function g9(e){return Object.prototype.toString.call(e)==="[object Object]"}function IO(e){return g9(e)||Array.isArray(e)}function LO(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function yx(e,t){let r=Object.keys(e),o=Object.keys(t);if(r.length!==o.length)return!1;let n=JSON.stringify(Object.keys(e.breakpoints||{})),a=JSON.stringify(Object.keys(t.breakpoints||{}));return n!==a?!1:r.every(i=>{let s=e[i],l=t[i];return typeof s=="function"?`${s}`==`${l}`:!IO(s)||!IO(l)?s===l:yx(s,l)})}function PO(e){return e.concat().sort((t,r)=>t.name>r.name?1:-1).map(t=>t.options)}function TO(e,t){if(e.length!==t.length)return!1;let r=PO(e),o=PO(t);return r.every((n,a)=>{let i=o[a];return yx(n,i)})}function Fb(e){return typeof e=="number"}function Nb(e){return typeof e=="string"}function wx(e){return typeof e=="boolean"}function kO(e){return Object.prototype.toString.call(e)==="[object Object]"}function ht(e){return Math.abs(e)}function _b(e){return Math.sign(e)}function Zp(e,t){return ht(e-t)}function h9(e,t){if(e===0||t===0||ht(e)<=ht(t))return 0;let r=Zp(ht(e),ht(t));return ht(r/e)}function v9(e){return Math.round(e*100)/100}function Jp(e){return em(e).map(Number)}function Dn(e){return e[rm(e)]}function rm(e){return Math.max(0,e.length-1)}function Vb(e,t){return t===rm(e)}function MO(e,t=0){return Array.from(Array(e),(r,o)=>t+o)}function em(e){return Object.keys(e)}function EO(e,t){return[e,t].reduce((r,o)=>(em(o).forEach(n=>{let a=r[n],i=o[n],s=kO(a)&&kO(i);r[n]=s?EO(a,i):i}),r),{})}function Ob(e,t){return typeof t.MouseEvent<"u"&&e instanceof t.MouseEvent}function x9(e,t){let r={start:o,center:n,end:a};function o(){return 0}function n(l){return a(l)/2}function a(l){return t-l}function i(l,u){return Nb(e)?r[e](l):e(t,l,u)}return{measure:i}}function tm(){let e=[];function t(n,a,i,s={passive:!0}){let l;if("addEventListener"in n)n.addEventListener(a,i,s),l=()=>n.removeEventListener(a,i,s);else{let u=n;u.addListener(i),l=()=>u.removeListener(i)}return e.push(l),o}function r(){e=e.filter(n=>n())}let o={add:t,clear:r};return o}function y9(e,t,r,o){let n=tm(),a=1e3/60,i=null,s=0,l=0;function u(){n.add(e,"visibilitychange",()=>{e.hidden&&g()})}function c(){p(),n.clear()}function d(x){if(!l)return;i||(i=x,r(),r());let h=x-i;for(i=x,s+=h;s>=a;)r(),s-=a;let v=s/a;o(v),l&&(l=t.requestAnimationFrame(d))}function f(){l||(l=t.requestAnimationFrame(d))}function p(){t.cancelAnimationFrame(l),i=null,s=0,l=0}function g(){i=null,s=0}return{init:u,destroy:c,start:f,stop:p,update:r,render:o}}function w9(e,t){let r=t==="rtl",o=e==="y",n=o?"y":"x",a=o?"x":"y",i=!o&&r?-1:1,s=c(),l=d();function u(g){let{height:m,width:x}=g;return o?m:x}function c(){return o?"top":r?"right":"left"}function d(){return o?"bottom":r?"left":"right"}function f(g){return g*i}return{scroll:n,cross:a,startEdge:s,endEdge:l,measureSize:u,direction:f}}function Fl(e=0,t=0){let r=ht(e-t);function o(u){return u<e}function n(u){return u>t}function a(u){return o(u)||n(u)}function i(u){return a(u)?o(u)?e:t:u}function s(u){return r?u-r*Math.ceil((u-t)/r):u}return{length:r,max:t,min:e,constrain:i,reachedAny:a,reachedMax:n,reachedMin:o,removeOffset:s}}function AO(e,t,r){let{constrain:o}=Fl(0,e),n=e+1,a=i(t);function i(f){return r?ht((n+f)%n):o(f)}function s(){return a}function l(f){return a=i(f),d}function u(f){return c().set(s()+f)}function c(){return AO(e,s(),r)}let d={get:s,set:l,add:u,clone:c};return d}function C9(e,t,r,o,n,a,i,s,l,u,c,d,f,p,g,m,x,h,v){let{cross:y,direction:w}=e,C=["INPUT","SELECT","TEXTAREA"],b={passive:!1},S=tm(),I=tm(),L=Fl(50,225).constrain(p.measure(20)),T={mouse:300,touch:400},k={mouse:500,touch:600},E=g?43:25,_=!1,D=0,z=0,F=!1,O=!1,B=!1,A=!1;function te(X){if(!v)return;function Ie(ie){(wx(v)||v(X,ie))&&ce(ie)}let J=t;S.add(J,"dragstart",ie=>ie.preventDefault(),b).add(J,"touchmove",()=>{},b).add(J,"touchend",()=>{}).add(J,"touchstart",Ie).add(J,"mousedown",Ie).add(J,"touchcancel",ne).add(J,"contextmenu",ne).add(J,"click",he,!0)}function ae(){S.clear(),I.clear()}function V(){let X=A?r:t;I.add(X,"touchmove",U,b).add(X,"touchend",ne).add(X,"mousemove",U,b).add(X,"mouseup",ne)}function Q(X){let Ie=X.nodeName||"";return C.includes(Ie)}function re(){return(g?k:T)[A?"mouse":"touch"]}function Y(X,Ie){let J=d.add(_b(X)*-1),ie=c.byDistance(X,!g).distance;return g||ht(X)<L?ie:x&&Ie?ie*.5:c.byIndex(J.get(),0).distance}function ce(X){let Ie=Ob(X,o);A=Ie,B=g&&Ie&&!X.buttons&&_,_=Zp(n.get(),i.get())>=2,!(Ie&&X.button!==0)&&(Q(X.target)||(F=!0,a.pointerDown(X),u.useFriction(0).useDuration(0),n.set(i),V(),D=a.readPoint(X),z=a.readPoint(X,y),f.emit("pointerDown")))}function U(X){if(!Ob(X,o)&&X.touches.length>=2)return ne(X);let J=a.readPoint(X),ie=a.readPoint(X,y),Ge=Zp(J,D),Xe=Zp(ie,z);if(!O&&!A&&(!X.cancelable||(O=Ge>Xe,!O)))return ne(X);let Tt=a.pointerMove(X);Ge>m&&(B=!0),u.useFriction(.3).useDuration(.75),s.start(),n.add(w(Tt)),X.preventDefault()}function ne(X){let J=c.byDistance(0,!1).index!==d.get(),ie=a.pointerUp(X)*re(),Ge=Y(w(ie),J),Xe=h9(ie,Ge),Tt=E-10*Xe,Oe=h+Xe/50;O=!1,F=!1,I.clear(),u.useDuration(Tt).useFriction(Oe),l.distance(Ge,!g),A=!1,f.emit("pointerUp")}function he(X){B&&(X.stopPropagation(),X.preventDefault(),B=!1)}function xe(){return F}return{init:te,destroy:ae,pointerDown:xe}}function S9(e,t){let o,n;function a(d){return d.timeStamp}function i(d,f){let g=`client${(f||e.scroll)==="x"?"X":"Y"}`;return(Ob(d,t)?d:d.touches[0])[g]}function s(d){return o=d,n=d,i(d)}function l(d){let f=i(d)-i(n),p=a(d)-a(o)>170;return n=d,p&&(o=d),f}function u(d){if(!o||!n)return 0;let f=i(n)-i(o),p=a(d)-a(o),g=a(d)-a(n)>170,m=f/p;return p&&!g&&ht(m)>.1?m:0}return{pointerDown:s,pointerMove:l,pointerUp:u,readPoint:i}}function b9(){function e(r){let{offsetTop:o,offsetLeft:n,offsetWidth:a,offsetHeight:i}=r;return{top:o,right:n+a,bottom:o+i,left:n,width:a,height:i}}return{measure:e}}function R9(e){function t(o){return e*(o/100)}return{measure:t}}function I9(e,t,r,o,n,a,i){let s=[e].concat(o),l,u,c=[],d=!1;function f(x){return n.measureSize(i.measure(x))}function p(x){if(!a)return;u=f(e),c=o.map(f);function h(v){for(let y of v){if(d)return;let w=y.target===e,C=o.indexOf(y.target),b=w?u:c[C],S=f(w?e:o[C]);if(ht(S-b)>=.5){x.reInit(),t.emit("resize");break}}}l=new ResizeObserver(v=>{(wx(a)||a(x,v))&&h(v)}),r.requestAnimationFrame(()=>{s.forEach(v=>l.observe(v))})}function g(){d=!0,l&&l.disconnect()}return{init:p,destroy:g}}function P9(e,t,r,o,n,a){let i=0,s=0,l=n,u=a,c=e.get(),d=0;function f(){let b=o.get()-e.get(),S=!l,I=0;return S?(i=0,r.set(o),e.set(o),I=b):(r.set(e),i+=b/l,i*=u,c+=i,e.add(i),I=c-d),s=_b(I),d=c,C}function p(){let b=o.get()-t.get();return ht(b)<.001}function g(){return l}function m(){return s}function x(){return i}function h(){return y(n)}function v(){return w(a)}function y(b){return l=b,C}function w(b){return u=b,C}let C={direction:m,duration:g,velocity:x,seek:f,settled:p,useBaseFriction:v,useBaseDuration:h,useFriction:w,useDuration:y};return C}function L9(e,t,r,o,n){let a=n.measure(10),i=n.measure(50),s=Fl(.1,.99),l=!1;function u(){return!(l||!e.reachedAny(r.get())||!e.reachedAny(t.get()))}function c(p){if(!u())return;let g=e.reachedMin(t.get())?"min":"max",m=ht(e[g]-t.get()),x=r.get()-t.get(),h=s.constrain(m/i);r.subtract(x*h),!p&&ht(x)<a&&(r.set(e.constrain(r.get())),o.useDuration(25).useBaseFriction())}function d(p){l=!p}return{shouldConstrain:u,constrain:c,toggleActive:d}}function T9(e,t,r,o,n){let a=Fl(-t+e,0),i=d(),s=c(),l=f();function u(g,m){return Zp(g,m)<=1}function c(){let g=i[0],m=Dn(i),x=i.lastIndexOf(g),h=i.indexOf(m)+1;return Fl(x,h)}function d(){return r.map((g,m)=>{let{min:x,max:h}=a,v=a.constrain(g),y=!m,w=Vb(r,m);return y?h:w||u(x,v)?x:u(h,v)?h:v}).map(g=>parseFloat(g.toFixed(3)))}function f(){if(t<=e+n)return[a.max];if(o==="keepSnaps")return i;let{min:g,max:m}=s;return i.slice(g,m)}return{snapsContained:l,scrollContainLimit:s}}function k9(e,t,r){let o=t[0],n=r?o-e:Dn(t);return{limit:Fl(n,o)}}function M9(e,t,r,o){let a=t.min+.1,i=t.max+.1,{reachedMin:s,reachedMax:l}=Fl(a,i);function u(f){return f===1?l(r.get()):f===-1?s(r.get()):!1}function c(f){if(!u(f))return;let p=e*(f*-1);o.forEach(g=>g.add(p))}return{loop:c}}function E9(e){let{max:t,length:r}=e;function o(a){let i=a-t;return r?i/-r:0}return{get:o}}function A9(e,t,r,o,n){let{startEdge:a,endEdge:i}=e,{groupSlides:s}=n,l=d().map(t.measure),u=f(),c=p();function d(){return s(o).map(m=>Dn(m)[i]-m[0][a]).map(ht)}function f(){return o.map(m=>r[a]-m[a]).map(m=>-ht(m))}function p(){return s(u).map(m=>m[0]).map((m,x)=>m+l[x])}return{snaps:u,snapsAligned:c}}function D9(e,t,r,o,n,a){let{groupSlides:i}=n,{min:s,max:l}=o,u=c();function c(){let f=i(a),p=!e||t==="keepSnaps";return r.length===1?[a]:p?f:f.slice(s,l).map((g,m,x)=>{let h=!m,v=Vb(x,m);if(h){let y=Dn(x[0])+1;return MO(y)}if(v){let y=rm(a)-Dn(x)[0]+1;return MO(y,Dn(x)[0])}return g})}return{slideRegistry:u}}function N9(e,t,r,o,n){let{reachedAny:a,removeOffset:i,constrain:s}=o;function l(g){return g.concat().sort((m,x)=>ht(m)-ht(x))[0]}function u(g){let m=e?i(g):s(g),x=t.map((v,y)=>({diff:c(v-m,0),index:y})).sort((v,y)=>ht(v.diff)-ht(y.diff)),{index:h}=x[0];return{index:h,distance:m}}function c(g,m){let x=[g,g+r,g-r];if(!e)return g;if(!m)return l(x);let h=x.filter(v=>_b(v)===m);return h.length?l(h):Dn(x)-r}function d(g,m){let x=t[g]-n.get(),h=c(x,m);return{index:g,distance:h}}function f(g,m){let x=n.get()+g,{index:h,distance:v}=u(x),y=!e&&a(x);if(!m||y)return{index:h,distance:g};let w=t[h]-v,C=g+c(w,0);return{index:h,distance:C}}return{byDistance:f,byIndex:d,shortcut:c}}function O9(e,t,r,o,n,a,i){function s(d){let f=d.distance,p=d.index!==t.get();a.add(f),f&&(o.duration()?e.start():(e.update(),e.render(1),e.update())),p&&(r.set(t.get()),t.set(d.index),i.emit("select"))}function l(d,f){let p=n.byDistance(d,f);s(p)}function u(d,f){let p=t.clone().set(d),g=n.byIndex(p.get(),f);s(g)}return{distance:l,index:u}}function F9(e,t,r,o,n,a,i,s){let l={passive:!0,capture:!0},u=0;function c(p){if(!s)return;function g(m){if(new Date().getTime()-u>10)return;i.emit("slideFocusStart"),e.scrollLeft=0;let v=r.findIndex(y=>y.includes(m));Fb(v)&&(n.useDuration(0),o.index(v,0),i.emit("slideFocus"))}a.add(document,"keydown",d,!1),t.forEach((m,x)=>{a.add(m,"focus",h=>{(wx(s)||s(p,h))&&g(x)},l)})}function d(p){p.code==="Tab"&&(u=new Date().getTime())}return{init:c}}function Qp(e){let t=e;function r(){return t}function o(l){t=i(l)}function n(l){t+=i(l)}function a(l){t-=i(l)}function i(l){return Fb(l)?l:l.get()}return{get:r,set:o,add:n,subtract:a}}function DO(e,t){let r=e.scroll==="x"?i:s,o=t.style,n=null,a=!1;function i(f){return`translate3d(${f}px,0px,0px)`}function s(f){return`translate3d(0px,${f}px,0px)`}function l(f){if(a)return;let p=v9(e.direction(f));p!==n&&(o.transform=r(p),n=p)}function u(f){a=!f}function c(){a||(o.transform="",t.getAttribute("style")||t.removeAttribute("style"))}return{clear:c,to:l,toggleActive:u}}function _9(e,t,r,o,n,a,i,s,l){let c=Jp(n),d=Jp(n).reverse(),f=h().concat(v());function p(S,I){return S.reduce((L,T)=>L-n[T],I)}function g(S,I){return S.reduce((L,T)=>p(L,I)>0?L.concat([T]):L,[])}function m(S){return a.map((I,L)=>({start:I-o[L]+.5+S,end:I+t-.5+S}))}function x(S,I,L){let T=m(I);return S.map(k=>{let E=L?0:-r,_=L?r:0,D=L?"end":"start",z=T[k][D];return{index:k,loopPoint:z,slideLocation:Qp(-1),translate:DO(e,l[k]),target:()=>s.get()>z?E:_}})}function h(){let S=i[0],I=g(d,S);return x(I,r,!1)}function v(){let S=t-i[0]-1,I=g(c,S);return x(I,-r,!0)}function y(){return f.every(({index:S})=>{let I=c.filter(L=>L!==S);return p(I,t)<=.1})}function w(){f.forEach(S=>{let{target:I,translate:L,slideLocation:T}=S,k=I();k!==T.get()&&(L.to(k),T.set(k))})}function C(){f.forEach(S=>S.translate.clear())}return{canLoop:y,clear:C,loop:w,loopPoints:f}}function V9(e,t,r){let o,n=!1;function a(l){if(!r)return;function u(c){for(let d of c)if(d.type==="childList"){l.reInit(),t.emit("slidesChanged");break}}o=new MutationObserver(c=>{n||(wx(r)||r(l,c))&&u(c)}),o.observe(e,{childList:!0})}function i(){o&&o.disconnect(),n=!0}return{init:a,destroy:i}}function B9(e,t,r,o){let n={},a=null,i=null,s,l=!1;function u(){s=new IntersectionObserver(g=>{l||(g.forEach(m=>{let x=t.indexOf(m.target);n[x]=m}),a=null,i=null,r.emit("slidesInView"))},{root:e.parentElement,threshold:o}),t.forEach(g=>s.observe(g))}function c(){s&&s.disconnect(),l=!0}function d(g){return em(n).reduce((m,x)=>{let h=parseInt(x),{isIntersecting:v}=n[h];return(g&&v||!g&&!v)&&m.push(h),m},[])}function f(g=!0){if(g&&a)return a;if(!g&&i)return i;let m=d(g);return g&&(a=m),g||(i=m),m}return{init:u,destroy:c,get:f}}function H9(e,t,r,o,n,a){let{measureSize:i,startEdge:s,endEdge:l}=e,u=r[0]&&n,c=g(),d=m(),f=r.map(i),p=x();function g(){if(!u)return 0;let v=r[0];return ht(t[s]-v[s])}function m(){if(!u)return 0;let v=a.getComputedStyle(Dn(o));return parseFloat(v.getPropertyValue(`margin-${l}`))}function x(){return r.map((v,y,w)=>{let C=!y,b=Vb(w,y);return C?f[y]+c:b?f[y]+d:w[y+1][s]-v[s]}).map(ht)}return{slideSizes:f,slideSizesWithGaps:p,startGap:c,endGap:d}}function U9(e,t,r,o,n,a,i,s,l){let{startEdge:u,endEdge:c,direction:d}=e,f=Fb(r);function p(h,v){return Jp(h).filter(y=>y%v===0).map(y=>h.slice(y,y+v))}function g(h){return h.length?Jp(h).reduce((v,y,w)=>{let C=Dn(v)||0,b=C===0,S=y===rm(h),I=n[u]-a[C][u],L=n[u]-a[y][c],T=!o&&b?d(i):0,k=!o&&S?d(s):0,E=ht(L-k-(I+T));return w&&E>t+l&&v.push(y),S&&v.push(h.length),v},[]).map((v,y,w)=>{let C=Math.max(w[y-1]||0);return h.slice(C,v)}):[]}function m(h){return f?p(h,r):g(h)}return{groupSlides:m}}function z9(e,t,r,o,n,a,i){let{align:s,axis:l,direction:u,startIndex:c,loop:d,duration:f,dragFree:p,dragThreshold:g,inViewThreshold:m,slidesToScroll:x,skipSnaps:h,containScroll:v,watchResize:y,watchSlides:w,watchDrag:C,watchFocus:b}=a,S=2,I=b9(),L=I.measure(t),T=r.map(I.measure),k=w9(l,u),E=k.measureSize(L),_=R9(E),D=x9(s,E),z=!d&&!!v,F=d||!!v,{slideSizes:O,slideSizesWithGaps:B,startGap:A,endGap:te}=H9(k,L,T,r,F,n),ae=U9(k,E,x,d,L,T,A,te,S),{snaps:V,snapsAligned:Q}=A9(k,D,L,T,ae),re=-Dn(V)+Dn(B),{snapsContained:Y,scrollContainLimit:ce}=T9(E,re,Q,v,S),U=z?Y:Q,{limit:ne}=k9(re,U,d),he=AO(rm(U),c,d),xe=he.clone(),pe=Jp(r),X=({dragHandler:Ci,scrollBody:Id,scrollBounds:Pd,options:{loop:Eo}})=>{Eo||Pd.constrain(Ci.pointerDown()),Id.seek()},Ie=({scrollBody:Ci,translate:Id,location:Pd,offsetLocation:Eo,previousLocation:Ld,scrollLooper:l0,slideLooper:z4,dragHandler:G4,animation:W4,eventHandler:y1,scrollBounds:j4,options:{loop:w1}},C1)=>{let S1=Ci.settled(),$4=!j4.shouldConstrain(),b1=w1?S1:S1&&$4,R1=b1&&!G4.pointerDown();R1&&W4.stop();let q4=Pd.get()*C1+Ld.get()*(1-C1);Eo.set(q4),w1&&(l0.loop(Ci.direction()),z4.loop()),Id.to(Eo.get()),R1&&y1.emit("settle"),b1||y1.emit("scroll")},J=y9(o,n,()=>X(fu),Ci=>Ie(fu,Ci)),ie=.68,Ge=U[he.get()],Xe=Qp(Ge),Tt=Qp(Ge),Oe=Qp(Ge),St=Qp(Ge),Xn=P9(Xe,Oe,Tt,St,f,ie),Er=N9(d,U,re,ne,St),fn=O9(J,he,xe,Xn,Er,St,i),Mo=E9(ne),pn=tm(),Yn=B9(t,r,i,m),{slideRegistry:Qn}=D9(z,v,U,ce,ae,pe),ng=F9(e,r,Qn,fn,Xn,pn,i,b),fu={ownerDocument:o,ownerWindow:n,eventHandler:i,containerRect:L,slideRects:T,animation:J,axis:k,dragHandler:C9(k,e,o,n,St,S9(k,n),Xe,J,fn,Xn,Er,he,i,_,p,g,h,ie,C),eventStore:pn,percentOfView:_,index:he,indexPrevious:xe,limit:ne,location:Xe,offsetLocation:Oe,previousLocation:Tt,options:a,resizeHandler:I9(t,i,n,r,k,y,I),scrollBody:Xn,scrollBounds:L9(ne,Oe,St,Xn,_),scrollLooper:M9(re,ne,Oe,[Xe,Oe,Tt,St]),scrollProgress:Mo,scrollSnapList:U.map(Mo.get),scrollSnaps:U,scrollTarget:Er,scrollTo:fn,slideLooper:_9(k,E,re,O,B,V,U,Oe,r),slideFocus:ng,slidesHandler:V9(t,i,w),slidesInView:Yn,slideIndexes:pe,slideRegistry:Qn,slidesToScroll:ae,target:St,translate:DO(k,t)};return fu}function G9(){let e={},t;function r(u){t=u}function o(u){return e[u]||[]}function n(u){return o(u).forEach(c=>c(t,u)),l}function a(u,c){return e[u]=o(u).concat([c]),l}function i(u,c){return e[u]=o(u).filter(d=>d!==c),l}function s(){e={}}let l={init:r,emit:n,off:i,on:a,clear:s};return l}var W9={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0};function j9(e){function t(a,i){return EO(a,i||{})}function r(a){let i=a.breakpoints||{},s=em(i).filter(l=>e.matchMedia(l).matches).map(l=>i[l]).reduce((l,u)=>t(l,u),{});return t(a,s)}function o(a){return a.map(i=>em(i.breakpoints||{})).reduce((i,s)=>i.concat(s),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:r,optionsMediaQueries:o}}function $9(e){let t=[];function r(a,i){return t=i.filter(({options:s})=>e.optionsAtMedia(s).active!==!1),t.forEach(s=>s.init(a,e)),i.reduce((s,l)=>Object.assign(s,{[l.name]:l}),{})}function o(){t=t.filter(a=>a.destroy())}return{init:r,destroy:o}}function om(e,t,r){let o=e.ownerDocument,n=o.defaultView,a=j9(n),i=$9(a),s=tm(),l=G9(),{mergeOptions:u,optionsAtMedia:c,optionsMediaQueries:d}=a,{on:f,off:p,emit:g}=l,m=k,x=!1,h,v=u(W9,om.globalOptions),y=u(v),w=[],C,b,S;function I(){let{container:pe,slides:X}=y;b=(Nb(pe)?e.querySelector(pe):pe)||e.children[0];let J=Nb(X)?b.querySelectorAll(X):X;S=[].slice.call(J||b.children)}function L(pe){let X=z9(e,b,S,o,n,pe,l);if(pe.loop&&!X.slideLooper.canLoop()){let Ie=Object.assign({},pe,{loop:!1});return L(Ie)}return X}function T(pe,X){x||(v=u(v,pe),y=c(v),w=X||w,I(),h=L(y),d([v,...w.map(({options:Ie})=>Ie)]).forEach(Ie=>s.add(Ie,"change",k)),y.active&&(h.translate.to(h.location.get()),h.animation.init(),h.slidesInView.init(),h.slideFocus.init(xe),h.eventHandler.init(xe),h.resizeHandler.init(xe),h.slidesHandler.init(xe),h.options.loop&&h.slideLooper.loop(),b.offsetParent&&S.length&&h.dragHandler.init(xe),C=i.init(xe,w)))}function k(pe,X){let Ie=ae();E(),T(u({startIndex:Ie},pe),X),l.emit("reInit")}function E(){h.dragHandler.destroy(),h.eventStore.clear(),h.translate.clear(),h.slideLooper.clear(),h.resizeHandler.destroy(),h.slidesHandler.destroy(),h.slidesInView.destroy(),h.animation.destroy(),i.destroy(),s.clear()}function _(){x||(x=!0,s.clear(),E(),l.emit("destroy"),l.clear())}function D(pe,X,Ie){!y.active||x||(h.scrollBody.useBaseFriction().useDuration(X===!0?0:y.duration),h.scrollTo.index(pe,Ie||0))}function z(pe){let X=h.index.add(1).get();D(X,pe,-1)}function F(pe){let X=h.index.add(-1).get();D(X,pe,1)}function O(){return h.index.add(1).get()!==ae()}function B(){return h.index.add(-1).get()!==ae()}function A(){return h.scrollSnapList}function te(){return h.scrollProgress.get(h.offsetLocation.get())}function ae(){return h.index.get()}function V(){return h.indexPrevious.get()}function Q(){return h.slidesInView.get()}function re(){return h.slidesInView.get(!1)}function Y(){return C}function ce(){return h}function U(){return e}function ne(){return b}function he(){return S}let xe={canScrollNext:O,canScrollPrev:B,containerNode:ne,internalEngine:ce,destroy:_,off:p,on:f,emit:g,plugins:Y,previousScrollSnap:V,reInit:m,rootNode:U,scrollNext:z,scrollPrev:F,scrollProgress:te,scrollSnapList:A,scrollTo:D,selectedScrollSnap:ae,slideNodes:he,slidesInView:Q,slidesNotInView:re};return T(t,r),setTimeout(()=>l.emit("init"),0),xe}om.globalOptions=void 0;function Cx(e={},t=[]){let r=(0,jo.useRef)(e),o=(0,jo.useRef)(t),[n,a]=(0,jo.useState)(),[i,s]=(0,jo.useState)(),l=(0,jo.useCallback)(()=>{n&&n.reInit(r.current,o.current)},[n]);return(0,jo.useEffect)(()=>{yx(r.current,e)||(r.current=e,l())},[e,l]),(0,jo.useEffect)(()=>{TO(o.current,t)||(o.current=t,l())},[t,l]),(0,jo.useEffect)(()=>{if(LO()&&i){om.globalOptions=Cx.globalOptions;let u=om(i,r.current,o.current);return a(u),()=>u.destroy()}else a(void 0)},[i,a]),[s,n]}Cx.globalOptions=void 0;var Co=R(N()),NO=It.createContext(null);function zc(){let e=It.useContext(NO);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}var Bb=It.forwardRef(({orientation:e="horizontal",opts:t,setApi:r,plugins:o,className:n,children:a,...i},s)=>{let l=e||(t?.axis==="y"?"vertical":"horizontal"),[u,c]=Cx({...t,axis:l==="horizontal"?"x":"y"},o),[d,f]=It.useState(!1),[p,g]=It.useState(!1),m=It.useCallback(y=>{y&&(f(y.canScrollPrev()),g(y.canScrollNext()))},[]),x=It.useCallback(()=>{c?.scrollPrev()},[c]),h=It.useCallback(()=>{c?.scrollNext()},[c]),v=It.useCallback(y=>{let w=l==="horizontal"?"ArrowLeft":"ArrowUp",C=l==="horizontal"?"ArrowRight":"ArrowDown";y.key===w?(y.preventDefault(),x()):y.key===C&&(y.preventDefault(),h())},[l,x,h]);return It.useEffect(()=>{!c||!r||r(c)},[c,r]),It.useEffect(()=>{if(c)return m(c),c.on("reInit",m),c.on("select",m),()=>{c.off("reInit",m),c.off("select",m)}},[c,m]),(0,Co.jsx)(NO.Provider,{value:{carouselRef:u,api:c,opts:t,scrollPrev:x,scrollNext:h,canScrollPrev:d,canScrollNext:p,orientation:l},children:(0,Co.jsx)("div",{ref:s,onKeyDownCapture:v,className:P("moonui-theme","relative",n),role:"region","aria-roledescription":"carousel",...i,children:a})})});Bb.displayName="Carousel";var Hb=K("flex",{variants:{orientation:{horizontal:"-ml-4",vertical:"-mt-4 flex-col"}},defaultVariants:{orientation:"horizontal"}}),Ub=It.forwardRef(({className:e,...t},r)=>{let{carouselRef:o,orientation:n}=zc();return(0,Co.jsx)("div",{ref:o,className:"overflow-hidden",children:(0,Co.jsx)("div",{ref:r,className:P(Hb({orientation:n}),e),...t})})});Ub.displayName="CarouselContent";var zb=K("min-w-0 shrink-0 grow-0 basis-full",{variants:{orientation:{horizontal:"pl-4",vertical:"pt-4"}},defaultVariants:{orientation:"horizontal"}}),Gb=It.forwardRef(({className:e,...t},r)=>{let{orientation:o}=zc();return(0,Co.jsx)("div",{ref:r,role:"group","aria-roledescription":"slide",className:P(zb({orientation:o}),e),...t})});Gb.displayName="CarouselItem";var Wb=It.forwardRef(({className:e,variant:t="outline",size:r="icon-sm",...o},n)=>{let{orientation:a,scrollPrev:i,canScrollPrev:s}=zc();return(0,Co.jsxs)(Ee,{ref:n,variant:t,size:r,rounded:"full",className:P("absolute",a==="horizontal"?"-left-12 top-1/2 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",e),disabled:!s,onClick:i,...o,children:[(0,Co.jsx)(Lf,{className:"h-4 w-4","aria-hidden":"true"}),(0,Co.jsx)("span",{className:"sr-only",children:"Previous slide"})]})});Wb.displayName="CarouselPrevious";var jb=It.forwardRef(({className:e,variant:t="outline",size:r="icon-sm",...o},n)=>{let{orientation:a,scrollNext:i,canScrollNext:s}=zc();return(0,Co.jsxs)(Ee,{ref:n,variant:t,size:r,rounded:"full",className:P("absolute",a==="horizontal"?"-right-12 top-1/2 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",e),disabled:!s,onClick:i,...o,children:[(0,Co.jsx)(Tf,{className:"h-4 w-4","aria-hidden":"true"}),(0,Co.jsx)("span",{className:"sr-only",children:"Next slide"})]})});jb.displayName="CarouselNext";var _l=R(M());var Hr=R(M(),1);var Sx=R(M(),1);function Gc(e){let t=Sx.useRef({value:e,previous:e});return Sx.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var OO=R(M(),1);function Wc(e){let[t,r]=OO.useState(void 0);return Ve(()=>{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 So=R(N(),1),bx="Checkbox",[q9,hIe]=Fe(bx),[K9,$b]=q9(bx);function X9(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]=qe({prop:r,defaultProp:n??!1,onChange:l,caller:bx}),[g,m]=Hr.useState(null),[x,h]=Hr.useState(null),v=Hr.useRef(!1),y=g?!!i||!!g.closest("form"):!0,w={checked:f,disabled:a,setChecked:p,control:g,setControl:m,name:s,form:i,value:c,hasConsumerStoppedPropagationRef:v,required:u,defaultChecked:fs(n)?!1:n,isFormControl:y,bubbleInput:x,setBubbleInput:h};return(0,So.jsx)(K9,{scope:t,...w,children:Y9(d)?d(w):o})}var FO="CheckboxTrigger",_O=Hr.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:g}=$b(FO,e),m=de(n,c),x=Hr.useRef(l);return Hr.useEffect(()=>{let h=a?.form;if(h){let v=()=>d(x.current);return h.addEventListener("reset",v),()=>h.removeEventListener("reset",v)}},[a,d]),(0,So.jsx)(q.button,{type:"button",role:"checkbox","aria-checked":fs(l)?"mixed":l,"aria-required":u,"data-state":UO(l),"data-disabled":s?"":void 0,disabled:s,value:i,...o,ref:m,onKeyDown:W(t,h=>{h.key==="Enter"&&h.preventDefault()}),onClick:W(r,h=>{d(v=>fs(v)?!0:!v),g&&p&&(f.current=h.isPropagationStopped(),f.current||h.stopPropagation())})})});_O.displayName=FO;var Rx=Hr.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,So.jsx)(X9,{__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,So.jsxs)(So.Fragment,{children:[(0,So.jsx)(_O,{...d,ref:t,__scopeCheckbox:r}),f&&(0,So.jsx)(HO,{__scopeCheckbox:r})]})})});Rx.displayName=bx;var VO="CheckboxIndicator",qb=Hr.forwardRef((e,t)=>{let{__scopeCheckbox:r,forceMount:o,...n}=e,a=$b(VO,r);return(0,So.jsx)(lt,{present:o||fs(a.checked)||a.checked===!0,children:(0,So.jsx)(q.span,{"data-state":UO(a.checked),"data-disabled":a.disabled?"":void 0,...n,ref:t,style:{pointerEvents:"none",...e.style}})})});qb.displayName=VO;var BO="CheckboxBubbleInput",HO=Hr.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}=$b(BO,e),g=de(r,p),m=Gc(a),x=Wc(o);Hr.useEffect(()=>{let v=f;if(!v)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});v.indeterminate=fs(a),C.call(v,fs(a)?!1:a),v.dispatchEvent(S)}},[f,m,a,n]);let h=Hr.useRef(fs(a)?!1:a);return(0,So.jsx)(q.input,{type:"checkbox","aria-hidden":!0,defaultChecked:i??h.current,required:s,disabled:l,name:u,value:c,form:d,...t,tabIndex:-1,ref:g,style:{...t.style,...x,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});HO.displayName=BO;function Y9(e){return typeof e=="function"}function fs(e){return e==="indeterminate"}function UO(e){return fs(e)?"indeterminate":e?"checked":"unchecked"}var $o=R(N()),Z9=K("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 data-[state=indeterminate]:text-primary-foreground",{variants:{variant:{default:"border-border bg-background data-[state=checked]:bg-primary data-[state=checked]:border-primary data-[state=indeterminate]:bg-primary data-[state=indeterminate]:border-primary",outline:"border-border bg-transparent data-[state=checked]:bg-primary data-[state=checked]:border-primary data-[state=indeterminate]:bg-primary data-[state=indeterminate]:border-primary",muted:"border-border bg-accent data-[state=checked]:bg-primary data-[state=checked]:border-primary data-[state=indeterminate]:bg-primary data-[state=indeterminate]:border-primary",ghost:"border-transparent bg-transparent hover:bg-accent data-[state=checked]:bg-primary data-[state=checked]:border-primary data-[state=indeterminate]:bg-primary data-[state=indeterminate]: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"}}),Ix=_l.forwardRef(({className:e,variant:t,size:r,radius:o,animation:n,indeterminate:a=!1,icon:i,checked:s,...l},u)=>(0,$o.jsx)(Rx,{ref:u,checked:a?"indeterminate":s,className:P("moonui-theme",Z9({variant:t,size:r,radius:o,animation:n}),e),...l,children:(0,$o.jsx)(qb,{className:P("flex items-center justify-center text-current",n==="bounce"&&"data-[state=checked]:animate-bounce"),children:a?(0,$o.jsx)(Wf,{className:"h-[65%] w-[65%]"}):i||(0,$o.jsx)(xr,{className:"h-[65%] w-[65%]"})})}));Ix.displayName=Rx.displayName;var Kb=_l.forwardRef(({className:e,orientation:t="vertical",spacing:r="1rem",children:o,...n},a)=>(0,$o.jsx)("div",{ref:a,className:P("flex",t==="vertical"?"flex-col":"flex-row flex-wrap",e),style:{gap:r},role:"group",...n,children:o}));Kb.displayName="CheckboxGroup";var nm=_l.forwardRef(({className:e,htmlFor:t,children:r,position:o="end",disabled:n=!1,...a},i)=>(0,$o.jsx)("label",{ref:i,htmlFor:t,className:P("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}));nm.displayName="CheckboxLabel";var Xb=_l.forwardRef(({id:e,label:t,labelPosition:r="end",labelClassName:o,...n},a)=>{let i=_l.useId(),s=e||i;return(0,$o.jsxs)("div",{className:"flex items-center",children:[r==="start"&&(0,$o.jsx)(nm,{htmlFor:s,position:"start",disabled:n.disabled,className:o,children:t}),(0,$o.jsx)(Ix,{ref:a,id:s,...n}),r==="end"&&(0,$o.jsx)(nm,{htmlFor:s,position:"end",disabled:n.disabled,className:o,children:t})]})});Xb.displayName="CheckboxWithLabel";var Qb=R(M());var Vl=R(N()),zO=Nh,Yb=K("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"}}),Zb=Qb.forwardRef(({className:e,children:t,variant:r,size:o,asChild:n,...a},i)=>n?(0,Vl.jsx)(ju,{ref:i,className:P("moonui-theme",Yb({variant:r,size:o}),e),asChild:n,...a,children:t}):(0,Vl.jsxs)(ju,{ref:i,className:P("moonui-theme",Yb({variant:r,size:o}),e),...a,children:[t,(0,Vl.jsx)(sa,{className:"h-4 w-4 shrink-0 ml-auto transition-transform duration-200 [&[data-state=open]]:rotate-180"})]}));Zb.displayName=ju.displayName;var GO=K("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"}}),Jb=Qb.forwardRef(({className:e,children:t,variant:r,size:o,...n},a)=>(0,Vl.jsx)(Cf,{ref:a,className:P("moonui-theme",GO({variant:r,size:o}),e),...n,children:(0,Vl.jsx)("div",{className:"p-4",children:t})}));Jb.displayName=Cf.displayName;var Zo=R(M());var ri=R(M());var bo=R(N()),J9=K("group relative flex items-center w-full transition-colors",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),e7=K(["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}}),ur=ri.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:g,floatingLabel:m=!1,floatingLabelClassName:x,value:h,defaultValue:v,onChange:y,onFocus:w,onBlur:C,placeholder:b,...S},I)=>{let L=ri.useId(),T=S.id||L,[k,E]=ri.useState(!1),[_,D]=ri.useState(h||v||""),F=k||_!==""&&_!==null&&_!==void 0,O=V=>{E(!0),w?.(V)},B=V=>{E(!1),C?.(V)},A=V=>{D(V.target.value),y?.(V)};ri.useEffect(()=>{h!==void 0&&D(h)},[h]);let te=p||s||l,ae=s?"error":l?"success":"normal";return(0,bo.jsxs)("div",{className:"space-y-1.5 w-full",children:[(0,bo.jsxs)("div",{className:P("moonui-theme",J9({size:n}),t),children:[m&&g&&(0,bo.jsx)("label",{htmlFor:S.id,className:P("absolute transition-all duration-200 pointer-events-none",c||u?"left-10":"left-3","text-gray-500 dark:text-gray-400",F?"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",k&&"text-primary dark:text-primary",!!s&&"text-error",i&&"opacity-50",x),children:g}),c&&(0,bo.jsx)("div",{className:"absolute left-3 text-gray-500 flex items-center justify-center pointer-events-none",children:u?(0,bo.jsx)(Bt,{className:"h-4 w-4 animate-spin"}):c}),(0,bo.jsx)("input",{className:P(e7({variant:o,size:n,isError:!!s||a,isSuccess:!!l,isDisabled:i||u,hasLeftIcon:!!c||u,hasRightIcon:!!d,hasRightButton:!!f}),e),ref:I,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?`${T}-error`:l?`${T}-success`:void 0,value:h,defaultValue:v,onChange:A,onFocus:O,onBlur:B,placeholder:m?F?b:"":b,...S}),d&&!u&&(0,bo.jsx)("div",{className:"absolute right-3 text-gray-500 flex items-center justify-center pointer-events-none",children:d}),f&&(0,bo.jsx)("div",{className:"absolute right-3",children:f}),u&&!c&&(0,bo.jsx)("div",{className:"absolute left-3 text-gray-500 flex items-center justify-center pointer-events-none",children:(0,bo.jsx)(Bt,{className:"h-4 w-4 animate-spin","aria-hidden":"true"})})]}),te&&(0,bo.jsx)("p",{className:P("text-xs transition-all",ae==="error"&&"text-error",ae==="success"&&"text-success",ae==="normal"&&"text-muted-foreground",r),id:s?`${T}-error`:l?`${T}-success`:void 0,children:s||l||""})]})});ur.displayName="Input";var qO=R(M());var WO=R(M(),1);var jO=R(N(),1),t7="Label",$O=WO.forwardRef((e,t)=>(0,jO.jsx)(q.label,{...e,ref:t,onMouseDown:r=>{r.target.closest("button, input, select, textarea")||(e.onMouseDown?.(r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));$O.displayName=t7;var eR=$O;var KO=R(N()),o7=K("text-sm font-medium leading-none text-foreground peer-disabled:cursor-not-allowed peer-disabled:opacity-70 dark:peer-disabled:opacity-60 transition-colors duration-200"),Ur=qO.forwardRef(({className:e,...t},r)=>(0,KO.jsx)(eR,{ref:r,className:P(o7(),e),...t}));Ur.displayName=eR.displayName;var nV=R(M());var ct=R(M(),1);var vt=R(M(),1);var XO=R(M(),1);function YO(e,t=globalThis?.document){let r=nt(e);XO.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 rR=R(N(),1),n7="DismissableLayer",tR="dismissableLayer.update",a7="dismissableLayer.pointerDownOutside",i7="dismissableLayer.focusOutside",QO,JO=vt.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),qo=vt.forwardRef((e,t)=>{let{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:n,onFocusOutside:a,onInteractOutside:i,onDismiss:s,...l}=e,u=vt.useContext(JO),[c,d]=vt.useState(null),f=c?.ownerDocument??globalThis?.document,[,p]=vt.useState({}),g=de(t,S=>d(S)),m=Array.from(u.layers),[x]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),h=m.indexOf(x),v=c?m.indexOf(c):-1,y=u.layersWithOutsidePointerEventsDisabled.size>0,w=v>=h,C=l7(S=>{let I=S.target,L=[...u.branches].some(T=>T.contains(I));!w||L||(n?.(S),i?.(S),S.defaultPrevented||s?.())},f),b=u7(S=>{let I=S.target;[...u.branches].some(T=>T.contains(I))||(a?.(S),i?.(S),S.defaultPrevented||s?.())},f);return YO(S=>{v===u.layers.size-1&&(o?.(S),!S.defaultPrevented&&s&&(S.preventDefault(),s()))},f),vt.useEffect(()=>{if(c)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(QO=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(c)),u.layers.add(c),ZO(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=QO)}},[c,f,r,u]),vt.useEffect(()=>()=>{c&&(u.layers.delete(c),u.layersWithOutsidePointerEventsDisabled.delete(c),ZO())},[c,u]),vt.useEffect(()=>{let S=()=>p({});return document.addEventListener(tR,S),()=>document.removeEventListener(tR,S)},[]),(0,rR.jsx)(q.div,{...l,ref:g,style:{pointerEvents:y?w?"auto":"none":void 0,...e.style},onFocusCapture:W(e.onFocusCapture,b.onFocusCapture),onBlurCapture:W(e.onBlurCapture,b.onBlurCapture),onPointerDownCapture:W(e.onPointerDownCapture,C.onPointerDownCapture)})});qo.displayName=n7;var s7="DismissableLayerBranch",eF=vt.forwardRef((e,t)=>{let r=vt.useContext(JO),o=vt.useRef(null),n=de(t,o);return vt.useEffect(()=>{let a=o.current;if(a)return r.branches.add(a),()=>{r.branches.delete(a)}},[r.branches]),(0,rR.jsx)(q.div,{...e,ref:n})});eF.displayName=s7;function l7(e,t=globalThis?.document){let r=nt(e),o=vt.useRef(!1),n=vt.useRef(()=>{});return vt.useEffect(()=>{let a=s=>{if(s.target&&!o.current){let u=function(){tF(a7,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 u7(e,t=globalThis?.document){let r=nt(e),o=vt.useRef(!1);return vt.useEffect(()=>{let n=a=>{a.target&&!o.current&&tF(i7,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 ZO(){let e=new CustomEvent(tR);document.dispatchEvent(e)}function tF(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?Wu(n,a):n.dispatchEvent(a)}var rF=qo,oF=eF;var aF=R(M(),1),oR=0;function ps(){aF.useEffect(()=>{let e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??nF()),document.body.insertAdjacentElement("beforeend",e[1]??nF()),oR++,()=>{oR===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),oR--}},[])}function nF(){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 Ko=R(M(),1);var cF=R(N(),1),nR="focusScope.autoFocusOnMount",aR="focusScope.autoFocusOnUnmount",iF={bubbles:!1,cancelable:!0},d7="FocusScope",oi=Ko.forwardRef((e,t)=>{let{loop:r=!1,trapped:o=!1,onMountAutoFocus:n,onUnmountAutoFocus:a,...i}=e,[s,l]=Ko.useState(null),u=nt(n),c=nt(a),d=Ko.useRef(null),f=de(t,m=>l(m)),p=Ko.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;Ko.useEffect(()=>{if(o){let v=function(b){if(p.paused||!s)return;let S=b.target;s.contains(S)?d.current=S:ms(d.current,{select:!0})},y=function(b){if(p.paused||!s)return;let S=b.relatedTarget;S!==null&&(s.contains(S)||ms(d.current,{select:!0}))},w=function(b){if(document.activeElement===document.body)for(let I of b)I.removedNodes.length>0&&ms(s)};var m=v,x=y,h=w;document.addEventListener("focusin",v),document.addEventListener("focusout",y);let C=new MutationObserver(w);return s&&C.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",y),C.disconnect()}}},[o,s,p.paused]),Ko.useEffect(()=>{if(s){lF.add(p);let m=document.activeElement;if(!s.contains(m)){let h=new CustomEvent(nR,iF);s.addEventListener(nR,u),s.dispatchEvent(h),h.defaultPrevented||(f7(v7(dF(s)),{select:!0}),document.activeElement===m&&ms(s))}return()=>{s.removeEventListener(nR,u),setTimeout(()=>{let h=new CustomEvent(aR,iF);s.addEventListener(aR,c),s.dispatchEvent(h),h.defaultPrevented||ms(m??document.body,{select:!0}),s.removeEventListener(aR,c),lF.remove(p)},0)}}},[s,u,c,p]);let g=Ko.useCallback(m=>{if(!r&&!o||p.paused)return;let x=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,h=document.activeElement;if(x&&h){let v=m.currentTarget,[y,w]=p7(v);y&&w?!m.shiftKey&&h===w?(m.preventDefault(),r&&ms(y,{select:!0})):m.shiftKey&&h===y&&(m.preventDefault(),r&&ms(w,{select:!0})):h===v&&m.preventDefault()}},[r,o,p.paused]);return(0,cF.jsx)(q.div,{tabIndex:-1,...i,ref:f,onKeyDown:g})});oi.displayName=d7;function f7(e,{select:t=!1}={}){let r=document.activeElement;for(let o of e)if(ms(o,{select:t}),document.activeElement!==r)return}function p7(e){let t=dF(e),r=sF(t,e),o=sF(t.reverse(),e);return[r,o]}function dF(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 sF(e,t){for(let r of e)if(!m7(r,{upTo:t}))return r}function m7(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 g7(e){return e instanceof HTMLInputElement&&"select"in e}function ms(e,{select:t=!1}={}){if(e&&e.focus){let r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&g7(e)&&t&&e.select()}}var lF=h7();function h7(){let e=[];return{add(t){let r=e[0];t!==r&&r?.pause(),e=uF(e,t),e.unshift(t)},remove(t){e=uF(e,t),e[0]?.resume()}}}function uF(e,t){let r=[...e],o=r.indexOf(t);return o!==-1&&r.splice(o,1),r}function v7(e){return e.filter(t=>t.tagName!=="A")}var io=R(M(),1);var mF=["top","right","bottom","left"];var ha=Math.min,zr=Math.max,im=Math.round,sm=Math.floor,Nn=e=>({x:e,y:e}),x7={left:"right",right:"left",bottom:"top",top:"bottom"},y7={start:"end",end:"start"};function Lx(e,t,r){return zr(e,ha(t,r))}function va(e,t){return typeof e=="function"?e(t):e}function xa(e){return e.split("-")[0]}function Bl(e){return e.split("-")[1]}function Tx(e){return e==="x"?"y":"x"}function kx(e){return e==="y"?"height":"width"}var w7=new Set(["top","bottom"]);function On(e){return w7.has(xa(e))?"y":"x"}function Mx(e){return Tx(On(e))}function gF(e,t,r){r===void 0&&(r=!1);let o=Bl(e),n=Mx(e),a=kx(n),i=n==="x"?o===(r?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=am(i)),[i,am(i)]}function hF(e){let t=am(e);return[Px(e),t,Px(t)]}function Px(e){return e.replace(/start|end/g,t=>y7[t])}var fF=["left","right"],pF=["right","left"],C7=["top","bottom"],S7=["bottom","top"];function b7(e,t,r){switch(e){case"top":case"bottom":return r?t?pF:fF:t?fF:pF;case"left":case"right":return t?C7:S7;default:return[]}}function vF(e,t,r,o){let n=Bl(e),a=b7(xa(e),r==="start",o);return n&&(a=a.map(i=>i+"-"+n),t&&(a=a.concat(a.map(Px)))),a}function am(e){return e.replace(/left|right|bottom|top/g,t=>x7[t])}function R7(e){return{top:0,right:0,bottom:0,left:0,...e}}function iR(e){return typeof e!="number"?R7(e):{top:e,right:e,bottom:e,left:e}}function Hl(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 xF(e,t,r){let{reference:o,floating:n}=e,a=On(t),i=Mx(t),s=kx(i),l=xa(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(Bl(t)){case"start":p[i]-=f*(r&&u?-1:1);break;case"end":p[i]+=f*(r&&u?-1:1);break}return p}var CF=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}=xF(u,o,l),f=o,p={},g=0;for(let m=0;m<s.length;m++){let{name:x,fn:h}=s[m],{x:v,y,data:w,reset:C}=await h({x:c,y:d,initialPlacement:o,placement:f,strategy:n,middlewareData:p,rects:u,platform:i,elements:{reference:e,floating:t}});c=v??c,d=y??d,p={...p,[x]:{...p[x],...w}},C&&g<=50&&(g++,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}=xF(u,f,l)),m=-1)}return{x:c,y:d,placement:f,strategy:n,middlewareData:p}};async function jc(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}=va(t,e),g=iR(p),x=s[f?d==="floating"?"reference":"floating":d],h=Hl(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})),v=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=Hl(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:v,offsetParent:y,strategy:l}):v);return{top:(h.top-C.top+g.top)/w.y,bottom:(C.bottom-h.bottom+g.bottom)/w.y,left:(h.left-C.left+g.left)/w.x,right:(C.right-h.right+g.right)/w.x}}var SF=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}=va(e,t)||{};if(u==null)return{};let d=iR(c),f={x:r,y:o},p=Mx(n),g=kx(p),m=await i.getDimensions(u),x=p==="y",h=x?"top":"left",v=x?"bottom":"right",y=x?"clientHeight":"clientWidth",w=a.reference[g]+a.reference[p]-f[p]-a.floating[g],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[g]);let I=w/2-C/2,L=S/2-m[g]/2-1,T=ha(d[h],L),k=ha(d[v],L),E=T,_=S-m[g]-k,D=S/2-m[g]/2+I,z=Lx(E,D,_),F=!l.arrow&&Bl(n)!=null&&D!==z&&a.reference[g]/2-(D<E?T:k)-m[g]/2<0,O=F?D<E?D-E:D-_:0;return{[p]:f[p]+O,data:{[p]:z,centerOffset:D-z-O,...F&&{alignmentOffset:O}},reset:F}}});var bF=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:g="none",flipAlignment:m=!0,...x}=va(e,t);if((r=a.arrow)!=null&&r.alignmentOffset)return{};let h=xa(n),v=On(s),y=xa(s)===s,w=await(l.isRTL==null?void 0:l.isRTL(u.floating)),C=f||(y||!m?[am(s)]:hF(s)),b=g!=="none";!f&&b&&C.push(...vF(s,m,g,w));let S=[s,...C],I=await jc(t,x),L=[],T=((o=a.flip)==null?void 0:o.overflows)||[];if(c&&L.push(I[h]),d){let D=gF(n,i,w);L.push(I[D[0]],I[D[1]])}if(T=[...T,{placement:n,overflows:L}],!L.every(D=>D<=0)){var k,E;let D=(((k=a.flip)==null?void 0:k.index)||0)+1,z=S[D];if(z&&(!(d==="alignment"?v!==On(z):!1)||T.every(B=>On(B.placement)===v?B.overflows[0]>0:!0)))return{data:{index:D,overflows:T},reset:{placement:z}};let F=(E=T.filter(O=>O.overflows[0]<=0).sort((O,B)=>O.overflows[1]-B.overflows[1])[0])==null?void 0:E.placement;if(!F)switch(p){case"bestFit":{var _;let O=(_=T.filter(B=>{if(b){let A=On(B.placement);return A===v||A==="y"}return!0}).map(B=>[B.placement,B.overflows.filter(A=>A>0).reduce((A,te)=>A+te,0)]).sort((B,A)=>B[1]-A[1])[0])==null?void 0:_[0];O&&(F=O);break}case"initialPlacement":F=s;break}if(n!==F)return{reset:{placement:F}}}return{}}}};function yF(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function wF(e){return mF.some(t=>e[t]>=0)}var RF=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){let{rects:r}=t,{strategy:o="referenceHidden",...n}=va(e,t);switch(o){case"referenceHidden":{let a=await jc(t,{...n,elementContext:"reference"}),i=yF(a,r.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:wF(i)}}}case"escaped":{let a=await jc(t,{...n,altBoundary:!0}),i=yF(a,r.floating);return{data:{escapedOffsets:i,escaped:wF(i)}}}default:return{}}}}};var IF=new Set(["left","top"]);async function I7(e,t){let{placement:r,platform:o,elements:n}=e,a=await(o.isRTL==null?void 0:o.isRTL(n.floating)),i=xa(r),s=Bl(r),l=On(r)==="y",u=IF.has(i)?-1:1,c=a&&l?-1:1,d=va(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:g}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof g=="number"&&(p=s==="end"?g*-1:g),l?{x:p*c,y:f*u}:{x:f*u,y:p*c}}var PF=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 I7(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}}}}},LF=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:h,y:v}=x;return{x:h,y:v}}},...l}=va(e,t),u={x:r,y:o},c=await jc(t,l),d=On(xa(n)),f=Tx(d),p=u[f],g=u[d];if(a){let x=f==="y"?"top":"left",h=f==="y"?"bottom":"right",v=p+c[x],y=p-c[h];p=Lx(v,p,y)}if(i){let x=d==="y"?"top":"left",h=d==="y"?"bottom":"right",v=g+c[x],y=g-c[h];g=Lx(v,g,y)}let m=s.fn({...t,[f]:p,[d]:g});return{...m,data:{x:m.x-r,y:m.y-o,enabled:{[f]:a,[d]:i}}}}}},TF=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}=va(e,t),c={x:r,y:o},d=On(n),f=Tx(d),p=c[f],g=c[d],m=va(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 h,v;let y=f==="y"?"width":"height",w=IF.has(xa(n)),C=a.reference[d]-a.floating[y]+(w&&((h=i.offset)==null?void 0:h[d])||0)+(w?0:x.crossAxis),b=a.reference[d]+a.reference[y]+(w?0:((v=i.offset)==null?void 0:v[d])||0)-(w?x.crossAxis:0);g<C?g=C:g>b&&(g=b)}return{[f]:p,[d]:g}}}},kF=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}=va(e,t),c=await jc(t,u),d=xa(n),f=Bl(n),p=On(n)==="y",{width:g,height:m}=a.floating,x,h;d==="top"||d==="bottom"?(x=d,h=f===(await(i.isRTL==null?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(h=d,x=f==="end"?"top":"bottom");let v=m-c.top-c.bottom,y=g-c.left-c.right,w=ha(m-c[x],v),C=ha(g-c[h],y),b=!t.middlewareData.shift,S=w,I=C;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(I=y),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(S=v),b&&!f){let T=zr(c.left,0),k=zr(c.right,0),E=zr(c.top,0),_=zr(c.bottom,0);p?I=g-2*(T!==0||k!==0?T+k:zr(c.left,c.right)):S=m-2*(E!==0||_!==0?E+_:zr(c.top,c.bottom))}await l({...t,availableWidth:I,availableHeight:S});let L=await i.getDimensions(s.floating);return g!==L.width||m!==L.height?{reset:{rects:!0}}:{}}}};function Ex(){return typeof window<"u"}function zl(e){return EF(e)?(e.nodeName||"").toLowerCase():"#document"}function ao(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Fn(e){var t;return(t=(EF(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function EF(e){return Ex()?e instanceof Node||e instanceof ao(e).Node:!1}function Xo(e){return Ex()?e instanceof Element||e instanceof ao(e).Element:!1}function _n(e){return Ex()?e instanceof HTMLElement||e instanceof ao(e).HTMLElement:!1}function MF(e){return!Ex()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ao(e).ShadowRoot}var P7=new Set(["inline","contents"]);function $c(e){let{overflow:t,overflowX:r,overflowY:o,display:n}=Yo(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+r)&&!P7.has(n)}var L7=new Set(["table","td","th"]);function AF(e){return L7.has(zl(e))}var T7=[":popover-open",":modal"];function lm(e){return T7.some(t=>{try{return e.matches(t)}catch{return!1}})}var k7=["transform","translate","scale","rotate","perspective"],M7=["transform","translate","scale","rotate","perspective","filter"],E7=["paint","layout","strict","content"];function Ax(e){let t=Dx(),r=Xo(e)?Yo(e):e;return k7.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)||M7.some(o=>(r.willChange||"").includes(o))||E7.some(o=>(r.contain||"").includes(o))}function DF(e){let t=ni(e);for(;_n(t)&&!Gl(t);){if(Ax(t))return t;if(lm(t))return null;t=ni(t)}return null}function Dx(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}var A7=new Set(["html","body","#document"]);function Gl(e){return A7.has(zl(e))}function Yo(e){return ao(e).getComputedStyle(e)}function um(e){return Xo(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ni(e){if(zl(e)==="html")return e;let t=e.assignedSlot||e.parentNode||MF(e)&&e.host||Fn(e);return MF(t)?t.host:t}function NF(e){let t=ni(e);return Gl(t)?e.ownerDocument?e.ownerDocument.body:e.body:_n(t)&&$c(t)?t:NF(t)}function Ul(e,t,r){var o;t===void 0&&(t=[]),r===void 0&&(r=!0);let n=NF(e),a=n===((o=e.ownerDocument)==null?void 0:o.body),i=ao(n);if(a){let s=Nx(i);return t.concat(i,i.visualViewport||[],$c(n)?n:[],s&&r?Ul(s):[])}return t.concat(n,Ul(n,[],r))}function Nx(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function VF(e){let t=Yo(e),r=parseFloat(t.width)||0,o=parseFloat(t.height)||0,n=_n(e),a=n?e.offsetWidth:r,i=n?e.offsetHeight:o,s=im(r)!==a||im(o)!==i;return s&&(r=a,o=i),{width:r,height:o,$:s}}function lR(e){return Xo(e)?e:e.contextElement}function qc(e){let t=lR(e);if(!_n(t))return Nn(1);let r=t.getBoundingClientRect(),{width:o,height:n,$:a}=VF(t),i=(a?im(r.width):r.width)/o,s=(a?im(r.height):r.height)/n;return(!i||!Number.isFinite(i))&&(i=1),(!s||!Number.isFinite(s))&&(s=1),{x:i,y:s}}var D7=Nn(0);function BF(e){let t=ao(e);return!Dx()||!t.visualViewport?D7:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function N7(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==ao(e)?!1:t}function Wl(e,t,r,o){t===void 0&&(t=!1),r===void 0&&(r=!1);let n=e.getBoundingClientRect(),a=lR(e),i=Nn(1);t&&(o?Xo(o)&&(i=qc(o)):i=qc(e));let s=N7(a,r,o)?BF(a):Nn(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=ao(a),p=o&&Xo(o)?ao(o):o,g=f,m=Nx(g);for(;m&&o&&p!==g;){let x=qc(m),h=m.getBoundingClientRect(),v=Yo(m),y=h.left+(m.clientLeft+parseFloat(v.paddingLeft))*x.x,w=h.top+(m.clientTop+parseFloat(v.paddingTop))*x.y;l*=x.x,u*=x.y,c*=x.x,d*=x.y,l+=y,u+=w,g=ao(m),m=Nx(g)}}return Hl({width:c,height:d,x:l,y:u})}function Ox(e,t){let r=um(e).scrollLeft;return t?t.left+r:Wl(Fn(e)).left+r}function HF(e,t){let r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-Ox(e,r),n=r.top+t.scrollTop;return{x:o,y:n}}function O7(e){let{elements:t,rect:r,offsetParent:o,strategy:n}=e,a=n==="fixed",i=Fn(o),s=t?lm(t.floating):!1;if(o===i||s&&a)return r;let l={scrollLeft:0,scrollTop:0},u=Nn(1),c=Nn(0),d=_n(o);if((d||!d&&!a)&&((zl(o)!=="body"||$c(i))&&(l=um(o)),_n(o))){let p=Wl(o);u=qc(o),c.x=p.x+o.clientLeft,c.y=p.y+o.clientTop}let f=i&&!d&&!a?HF(i,l):Nn(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 F7(e){return Array.from(e.getClientRects())}function _7(e){let t=Fn(e),r=um(e),o=e.ownerDocument.body,n=zr(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),a=zr(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight),i=-r.scrollLeft+Ox(e),s=-r.scrollTop;return Yo(o).direction==="rtl"&&(i+=zr(t.clientWidth,o.clientWidth)-n),{width:n,height:a,x:i,y:s}}var OF=25;function V7(e,t){let r=ao(e),o=Fn(e),n=r.visualViewport,a=o.clientWidth,i=o.clientHeight,s=0,l=0;if(n){a=n.width,i=n.height;let c=Dx();(!c||c&&t==="fixed")&&(s=n.offsetLeft,l=n.offsetTop)}let u=Ox(o);if(u<=0){let c=o.ownerDocument,d=c.body,f=getComputedStyle(d),p=c.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,g=Math.abs(o.clientWidth-d.clientWidth-p);g<=OF&&(a-=g)}else u<=OF&&(a+=u);return{width:a,height:i,x:s,y:l}}var B7=new Set(["absolute","fixed"]);function H7(e,t){let r=Wl(e,!0,t==="fixed"),o=r.top+e.clientTop,n=r.left+e.clientLeft,a=_n(e)?qc(e):Nn(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 FF(e,t,r){let o;if(t==="viewport")o=V7(e,r);else if(t==="document")o=_7(Fn(e));else if(Xo(t))o=H7(t,r);else{let n=BF(e);o={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Hl(o)}function UF(e,t){let r=ni(e);return r===t||!Xo(r)||Gl(r)?!1:Yo(r).position==="fixed"||UF(r,t)}function U7(e,t){let r=t.get(e);if(r)return r;let o=Ul(e,[],!1).filter(s=>Xo(s)&&zl(s)!=="body"),n=null,a=Yo(e).position==="fixed",i=a?ni(e):e;for(;Xo(i)&&!Gl(i);){let s=Yo(i),l=Ax(i);!l&&s.position==="fixed"&&(n=null),(a?!l&&!n:!l&&s.position==="static"&&!!n&&B7.has(n.position)||$c(i)&&!l&&UF(e,i))?o=o.filter(c=>c!==i):n=s,i=ni(i)}return t.set(e,o),o}function z7(e){let{element:t,boundary:r,rootBoundary:o,strategy:n}=e,i=[...r==="clippingAncestors"?lm(t)?[]:U7(t,this._c):[].concat(r),o],s=i[0],l=i.reduce((u,c)=>{let d=FF(t,c,n);return u.top=zr(d.top,u.top),u.right=ha(d.right,u.right),u.bottom=ha(d.bottom,u.bottom),u.left=zr(d.left,u.left),u},FF(t,s,n));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function G7(e){let{width:t,height:r}=VF(e);return{width:t,height:r}}function W7(e,t,r){let o=_n(t),n=Fn(t),a=r==="fixed",i=Wl(e,!0,a,t),s={scrollLeft:0,scrollTop:0},l=Nn(0);function u(){l.x=Ox(n)}if(o||!o&&!a)if((zl(t)!=="body"||$c(n))&&(s=um(t)),o){let p=Wl(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?HF(n,s):Nn(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 sR(e){return Yo(e).position==="static"}function _F(e,t){if(!_n(e)||Yo(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Fn(e)===r&&(r=r.ownerDocument.body),r}function zF(e,t){let r=ao(e);if(lm(e))return r;if(!_n(e)){let n=ni(e);for(;n&&!Gl(n);){if(Xo(n)&&!sR(n))return n;n=ni(n)}return r}let o=_F(e,t);for(;o&&AF(o)&&sR(o);)o=_F(o,t);return o&&Gl(o)&&sR(o)&&!Ax(o)?r:o||DF(e)||r}var j7=async function(e){let t=this.getOffsetParent||zF,r=this.getDimensions,o=await r(e.floating);return{reference:W7(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function $7(e){return Yo(e).direction==="rtl"}var GF={convertOffsetParentRelativeRectToViewportRelativeRect:O7,getDocumentElement:Fn,getClippingRect:z7,getOffsetParent:zF,getElementRects:j7,getClientRects:F7,getDimensions:G7,getScale:qc,isElement:Xo,isRTL:$7};function WF(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function q7(e,t){let r=null,o,n=Fn(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 g=sm(d),m=sm(n.clientWidth-(c+f)),x=sm(n.clientHeight-(d+p)),h=sm(c),y={rootMargin:-g+"px "+-m+"px "+-x+"px "+-h+"px",threshold:zr(0,ha(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&&!WF(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 uR(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=lR(e),c=n||a?[...u?Ul(u):[],...Ul(t)]:[];c.forEach(h=>{n&&h.addEventListener("scroll",r,{passive:!0}),a&&h.addEventListener("resize",r)});let d=u&&s?q7(u,r):null,f=-1,p=null;i&&(p=new ResizeObserver(h=>{let[v]=h;v&&v.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 g,m=l?Wl(e):null;l&&x();function x(){let h=Wl(e);m&&!WF(m,h)&&r(),m=h,g=requestAnimationFrame(x)}return r(),()=>{var h;c.forEach(v=>{n&&v.removeEventListener("scroll",r),a&&v.removeEventListener("resize",r)}),d?.(),(h=p)==null||h.disconnect(),p=null,l&&cancelAnimationFrame(g)}}var jF=PF;var $F=LF,qF=bF,KF=kF,XF=RF,cR=SF;var YF=TF,dR=(e,t,r)=>{let o=new Map,n={platform:GF,...r},a={...n.platform,_c:o};return CF(e,t,{...n,platform:a})};var Mt=R(M(),1),ZF=R(M(),1),JF=R(Va(),1),K7=typeof document<"u",X7=function(){},Fx=K7?ZF.useLayoutEffect:X7;function _x(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(!_x(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)&&!_x(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function e_(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function QF(e,t){let r=e_(e);return Math.round(t*r)/r}function fR(e){let t=Mt.useRef(e);return Fx(()=>{t.current=e}),t}function t_(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]=Mt.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=Mt.useState(o);_x(f,o)||p(o);let[g,m]=Mt.useState(null),[x,h]=Mt.useState(null),v=Mt.useCallback(B=>{B!==b.current&&(b.current=B,m(B))},[]),y=Mt.useCallback(B=>{B!==S.current&&(S.current=B,h(B))},[]),w=a||g,C=i||x,b=Mt.useRef(null),S=Mt.useRef(null),I=Mt.useRef(c),L=l!=null,T=fR(l),k=fR(n),E=fR(u),_=Mt.useCallback(()=>{if(!b.current||!S.current)return;let B={placement:t,strategy:r,middleware:f};k.current&&(B.platform=k.current),dR(b.current,S.current,B).then(A=>{let te={...A,isPositioned:E.current!==!1};D.current&&!_x(I.current,te)&&(I.current=te,JF.flushSync(()=>{d(te)}))})},[f,t,r,k,E]);Fx(()=>{u===!1&&I.current.isPositioned&&(I.current.isPositioned=!1,d(B=>({...B,isPositioned:!1})))},[u]);let D=Mt.useRef(!1);Fx(()=>(D.current=!0,()=>{D.current=!1}),[]),Fx(()=>{if(w&&(b.current=w),C&&(S.current=C),w&&C){if(T.current)return T.current(w,C,_);_()}},[w,C,_,T,L]);let z=Mt.useMemo(()=>({reference:b,floating:S,setReference:v,setFloating:y}),[v,y]),F=Mt.useMemo(()=>({reference:w,floating:C}),[w,C]),O=Mt.useMemo(()=>{let B={position:r,left:0,top:0};if(!F.floating)return B;let A=QF(F.floating,c.x),te=QF(F.floating,c.y);return s?{...B,transform:"translate("+A+"px, "+te+"px)",...e_(F.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:A,top:te}},[r,s,F.floating,c.x,c.y]);return Mt.useMemo(()=>({...c,update:_,refs:z,elements:F,floatingStyles:O}),[c,_,z,F,O])}var Y7=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?cR({element:o.current,padding:n}).fn(r):{}:o?cR({element:o,padding:n}).fn(r):{}}}},r_=(e,t)=>({...jF(e),options:[e,t]}),o_=(e,t)=>({...$F(e),options:[e,t]}),n_=(e,t)=>({...YF(e),options:[e,t]}),a_=(e,t)=>({...qF(e),options:[e,t]}),i_=(e,t)=>({...KF(e),options:[e,t]});var s_=(e,t)=>({...XF(e),options:[e,t]});var l_=(e,t)=>({...Y7(e),options:[e,t]});var u_=R(M(),1);var pR=R(N(),1),Q7="Arrow",c_=u_.forwardRef((e,t)=>{let{children:r,width:o=10,height:n=5,...a}=e;return(0,pR.jsx)(q.svg,{...a,ref:t,width:o,height:n,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:(0,pR.jsx)("polygon",{points:"0,0 30,0 15,10"})})});c_.displayName=Q7;var d_=c_;var gs=R(N(),1);var mR="Popper",[f_,Qo]=Fe(mR),[J7,p_]=f_(mR),m_=e=>{let{__scopePopper:t,children:r}=e,[o,n]=io.useState(null);return(0,gs.jsx)(J7,{scope:t,anchor:o,onAnchorChange:n,children:r})};m_.displayName=mR;var g_="PopperAnchor",h_=io.forwardRef((e,t)=>{let{__scopePopper:r,virtualRef:o,...n}=e,a=p_(g_,r),i=io.useRef(null),s=de(t,i),l=io.useRef(null);return io.useEffect(()=>{let u=l.current;l.current=o?.current||i.current,u!==l.current&&a.onAnchorChange(l.current)}),o?null:(0,gs.jsx)(q.div,{...n,ref:s})});h_.displayName=g_;var gR="PopperContent",[eK,tK]=f_(gR),v_=io.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:g,...m}=e,x=p_(gR,r),[h,v]=io.useState(null),y=de(t,U=>v(U)),[w,C]=io.useState(null),b=Wc(w),S=b?.width??0,I=b?.height??0,L=o+(a!=="center"?"-"+a:""),T=typeof c=="number"?c:{top:0,right:0,bottom:0,left:0,...c},k=Array.isArray(u)?u:[u],E=k.length>0,_={padding:T,boundary:k.filter(oK),altBoundary:E},{refs:D,floatingStyles:z,placement:F,isPositioned:O,middlewareData:B}=t_({strategy:"fixed",placement:L,whileElementsMounted:(...U)=>uR(...U,{animationFrame:p==="always"}),elements:{reference:x.anchor},middleware:[r_({mainAxis:n+I,alignmentAxis:i}),l&&o_({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?n_():void 0,..._}),l&&a_({..._}),i_({..._,apply:({elements:U,rects:ne,availableWidth:he,availableHeight:xe})=>{let{width:pe,height:X}=ne.reference,Ie=U.floating.style;Ie.setProperty("--radix-popper-available-width",`${he}px`),Ie.setProperty("--radix-popper-available-height",`${xe}px`),Ie.setProperty("--radix-popper-anchor-width",`${pe}px`),Ie.setProperty("--radix-popper-anchor-height",`${X}px`)}}),w&&l_({element:w,padding:s}),nK({arrowWidth:S,arrowHeight:I}),f&&s_({strategy:"referenceHidden",..._})]}),[A,te]=w_(F),ae=nt(g);Ve(()=>{O&&ae?.()},[O,ae]);let V=B.arrow?.x,Q=B.arrow?.y,re=B.arrow?.centerOffset!==0,[Y,ce]=io.useState();return Ve(()=>{h&&ce(window.getComputedStyle(h).zIndex)},[h]),(0,gs.jsx)("div",{ref:D.setFloating,"data-radix-popper-content-wrapper":"",style:{...z,transform:O?z.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Y,"--radix-popper-transform-origin":[B.transformOrigin?.x,B.transformOrigin?.y].join(" "),...B.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:(0,gs.jsx)(eK,{scope:r,placedSide:A,onArrowChange:C,arrowX:V,arrowY:Q,shouldHideArrow:re,children:(0,gs.jsx)(q.div,{"data-side":A,"data-align":te,...m,ref:y,style:{...m.style,animation:O?void 0:"none"}})})})});v_.displayName=gR;var x_="PopperArrow",rK={top:"bottom",right:"left",bottom:"top",left:"right"},y_=io.forwardRef(function(t,r){let{__scopePopper:o,...n}=t,a=tK(x_,o),i=rK[a.placedSide];return(0,gs.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,gs.jsx)(d_,{...n,ref:r,style:{...n.style,display:"block"}})})});y_.displayName=x_;function oK(e){return e!==null}var nK=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]=w_(r),d={start:"0%",center:"50%",end:"100%"}[c],f=(n.arrow?.x??0)+s/2,p=(n.arrow?.y??0)+l/2,g="",m="";return u==="bottom"?(g=i?d:`${f}px`,m=`${-l}px`):u==="top"?(g=i?d:`${f}px`,m=`${o.floating.height+l}px`):u==="right"?(g=`${-l}px`,m=i?d:`${p}px`):u==="left"&&(g=`${o.floating.width+l}px`,m=i?d:`${p}px`),{data:{x:g,y:m}}}});function w_(e){let[t,r="center"]=e.split("-");return[t,r]}var ai=m_,ii=h_,hs=v_,vs=y_;var Bx=R(M(),1),C_=R(Va(),1);var S_=R(N(),1),aK="Portal",Ro=Bx.forwardRef((e,t)=>{let{container:r,...o}=e,[n,a]=Bx.useState(!1);Ve(()=>a(!0),[]);let i=r||n&&globalThis?.document?.body;return i?C_.default.createPortal((0,S_.jsx)(q.div,{...o,ref:t}),i):null});Ro.displayName=aK;var iK=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Kc=new WeakMap,Hx=new WeakMap,Ux={},hR=0,b_=function(e){return e&&(e.host||b_(e.parentNode))},sK=function(e,t){return t.map(function(r){if(e.contains(r))return r;var o=b_(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})},lK=function(e,t,r,o){var n=sK(t,Array.isArray(e)?e:[e]);Ux[r]||(Ux[r]=new WeakMap);var a=Ux[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),g=p!==null&&p!=="false",m=(Kc.get(f)||0)+1,x=(a.get(f)||0)+1;Kc.set(f,m),a.set(f,x),i.push(f),m===1&&g&&Hx.set(f,!0),x===1&&f.setAttribute(r,"true"),g||f.setAttribute(o,"true")}catch(h){console.error("aria-hidden: cannot operate on ",f,h)}})};return c(t),s.clear(),hR++,function(){i.forEach(function(d){var f=Kc.get(d)-1,p=a.get(d)-1;Kc.set(d,f),a.set(d,p),f||(Hx.has(d)||d.removeAttribute(o),Hx.delete(d)),p||d.removeAttribute(r)}),hR--,hR||(Kc=new WeakMap,Kc=new WeakMap,Hx=new WeakMap,Ux={})}},xs=function(e,t,r){r===void 0&&(r="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),n=t||iK(e);return n?(o.push.apply(o,Array.from(n.querySelectorAll("[aria-live], script"))),lK(o,n,r,"aria-hidden")):function(){return null}};var so=function(){return so=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},so.apply(this,arguments)};function zx(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 R_(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 qx=R(M());var Rr=R(M());var jl="right-scroll-bar-position",$l="width-before-scroll-bar",vR="with-scroll-bars-hidden",xR="--removed-body-scroll-bar-size";function Gx(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}var I_=R(M());function P_(e,t){var r=(0,I_.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 Wx=R(M());var uK=typeof window<"u"?Wx.useLayoutEffect:Wx.useEffect,L_=new WeakMap;function yR(e,t){var r=P_(t||null,function(o){return e.forEach(function(n){return Gx(n,o)})});return uK(function(){var o=L_.get(r);if(o){var n=new Set(o),a=new Set(e),i=r.current;n.forEach(function(s){a.has(s)||Gx(s,null)}),a.forEach(function(s){n.has(s)||Gx(s,i)})}L_.set(r,e)},[e]),r}function cK(e){return e}function dK(e,t){t===void 0&&(t=cK);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 wR(e){e===void 0&&(e={});var t=dK(null);return t.options=so({async:!0,ssr:!1},e),t}var T_=R(M()),k_=function(e){var t=e.sideCar,r=zx(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 T_.createElement(o,so({},r))};k_.isSideCarExport=!0;function CR(e,t){return e.useMedium(t),k_}var jx=wR();var SR=function(){},cm=Rr.forwardRef(function(e,t){var r=Rr.useRef(null),o=Rr.useState({onScrollCapture:SR,onWheelCapture:SR,onTouchMoveCapture:SR}),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,g=e.noIsolation,m=e.inert,x=e.allowPinchZoom,h=e.as,v=h===void 0?"div":h,y=e.gapMode,w=zx(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=f,b=yR([r,t]),S=so(so({},w),n);return Rr.createElement(Rr.Fragment,null,c&&Rr.createElement(C,{sideCar:jx,removeScrollBar:u,shards:d,noRelative:p,noIsolation:g,inert:m,setCallbacks:a,allowPinchZoom:!!x,lockRef:r,gapMode:y}),i?Rr.cloneElement(Rr.Children.only(s),so(so({},S),{ref:b})):Rr.createElement(v,so({},S,{className:l,ref:b}),s))});cm.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};cm.classNames={fullWidth:$l,zeroRight:jl};var it=R(M());var Yc=R(M());var A_=R(M());var M_;var E_=function(){if(M_)return M_;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function fK(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=E_();return t&&e.setAttribute("nonce",t),e}function pK(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function mK(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var bR=function(){var e=0,t=null;return{add:function(r){e==0&&(t=fK())&&(pK(t,r),mK(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}};var RR=function(){var e=bR();return function(t,r){A_.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}};var dm=function(){var e=RR(),t=function(r){var o=r.styles,n=r.dynamic;return e(o,n),null};return t};var gK={left:0,top:0,right:0,gap:0},IR=function(e){return parseInt(e||"",10)||0},hK=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[IR(r),IR(o),IR(n)]},PR=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return gK;var t=hK(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 vK=dm(),Xc="data-scroll-locked",xK=function(e,t,r,o){var n=e.left,a=e.top,i=e.right,s=e.gap;return r===void 0&&(r="margin"),`
|
|
20
|
-
.`.concat(
|
|
21
|
-
overflow: hidden `).concat(
|
|
22
|
-
padding-right: `).concat(
|
|
12
|
+
`),()=>{m.contains(g)&&m.removeChild(g)}},[t]),(0,RS.jsx)(vh,{isPresent:t,childRef:n,sizeRef:s,children:If.cloneElement(e,{ref:n})})}var LS=({children:e,initial:t,isPresent:o,onExitComplete:r,custom:a,presenceAffectsLayout:n,mode:s,anchorX:i,root:l})=>{let u=na(H_),c=(0,bc.useId)(),d=!0,f=(0,bc.useMemo)(()=>(d=!1,{id:c,initial:t,isPresent:o,custom:a,onExitComplete:p=>{u.set(p,!0);for(let g of u.values())if(!g)return;r&&r()},register:p=>(u.set(p,!1),()=>u.delete(p))}),[o,u,r]);return n&&d&&(f={...f}),(0,bc.useMemo)(()=>{u.forEach((p,g)=>u.set(g,!1))},[o]),PS.useEffect(()=>{!o&&!u.size&&r&&r()},[o]),s==="popLayout"&&(e=(0,xh.jsx)(IS,{isPresent:o,anchorX:i,root:l,children:e})),(0,xh.jsx)(hn.Provider,{value:f,children:e})};function H_(){return new Map}var Rn=b(k(),1);function Pf(e=!0){let t=(0,Rn.useContext)(hn);if(t===null)return[!0,null];let{isPresent:o,onExitComplete:r,register:a}=t,n=(0,Rn.useId)();(0,Rn.useEffect)(()=>{if(e)return a(n)},[e]);let s=(0,Rn.useCallback)(()=>e&&r&&r(n),[n,r,e]);return!o&&r?[!1,s]:[!0]}var Lf=b(k(),1),Cc=e=>e.key||"";function yh(e){let t=[];return Lf.Children.forEach(e,o=>{(0,Lf.isValidElement)(o)&&t.push(o)}),t}var Da=({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]=Pf(s),d=(0,la.useMemo)(()=>yh(e),[e]),f=s&&!u?[]:d.map(Cc),p=(0,la.useRef)(!0),g=(0,la.useRef)(d),m=na(()=>new Map),[h,v]=(0,la.useState)(d),[x,y]=(0,la.useState)(d);Ai(()=>{p.current=!1,g.current=d;for(let C=0;C<x.length;C++){let w=Cc(x[C]);f.includes(w)?m.delete(w):m.get(w)!==!0&&m.set(w,!1)}},[x,f.length,f.join("-")]);let R=[];if(d!==h){let C=[...d];for(let w=0;w<x.length;w++){let I=x[w],L=Cc(I);f.includes(L)||(C.splice(w,0,I),R.push(I))}return n==="wait"&&R.length&&(C=R),y(yh(C)),v(d),null}let{forceRender:S}=(0,la.useContext)(ki);return(0,wc.jsx)(wc.Fragment,{children:x.map(C=>{let w=Cc(C),I=s&&!u?!1:d===x||f.includes(w),L=()=>{if(m.has(w))m.set(w,!0);else return;let T=!0;m.forEach(M=>{M||(T=!1)}),T&&(S?.(),y(g.current),s&&c?.(),r&&r())};return(0,wc.jsx)(LS,{isPresent:I,initial:!p.current||o?void 0:!1,custom:t,presenceAffectsLayout:a,mode:n,root:l,onExitComplete:I?void 0:L,anchorX:i,children:C},w)})})};var TS=b(k(),1),Tf=(0,TS.createContext)({strict:!1});var MS={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"]},Na={};for(let e in MS)Na[e]={isEnabled:t=>MS[e].some(o=>!!t[o])};function kS(e){for(let t in e)Na[t]={...Na[t],...e[t]}}var U_=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 Sc(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||U_.has(e)}var ES=e=>!Sc(e);function G_(e){typeof e=="function"&&(ES=t=>t.startsWith("on")?!Sc(t):e(t))}try{G_(rO("@emotion/is-prop-valid").default)}catch{}function AS(e,t,o){let r={};for(let a in e)a==="values"&&typeof e.values=="object"||(ES(a)||o===!0&&Sc(a)||!t&&!Sc(a)||e.draggable&&a.startsWith("onDrag"))&&(r[a]=e[a]);return r}var Hf=b(N(),1);var Xi=b(k(),1);var DS=b(k(),1),In=(0,DS.createContext)({});var Ef=b(k(),1);function Pn(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Oa(e){return typeof e=="string"||Array.isArray(e)}var Mf=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Rc=["initial",...Mf];function ks(e){return Pn(e.animate)||Rc.some(t=>Oa(e[t]))}function kf(e){return!!(ks(e)||e.variants)}function NS(e,t){if(ks(e)){let{initial:o,animate:r}=e;return{initial:o===!1||Oa(o)?o:void 0,animate:Oa(r)?r:void 0}}return e.inherit!==!1?t:{}}function FS(e){let{initial:t,animate:o}=NS(e,(0,Ef.useContext)(In));return(0,Ef.useMemo)(()=>({initial:t,animate:o}),[OS(t),OS(o)])}function OS(e){return Array.isArray(e)?e.join(" "):e}var qi=b(k(),1);var BS=b(k(),1);var Es={};function _S(e){for(let t in e)Es[t]=e[t],vs(t)&&(Es[t].isCSSVariable=!0)}function Af(e,{layout:t,layoutId:o}){return No.has(e)||e.startsWith("origin")||(t||o!==void 0)&&(!!Es[e]||e==="opacity")}var z_={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},q_=kr.length;function VS(e,t,o){let r="",a=!0;for(let n=0;n<q_;n++){let s=kr[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=vc(i,Is[s]);if(!l){a=!1;let c=z_[s]||s;r+=`${c}(${u}) `}o&&(t[s]=u)}}return r=r.trim(),o?r=o(t,a?"":r):a&&(r="none"),r}function Ui(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(No.has(l)){s=!0;continue}else if(vs(l)){a[l]=u;continue}else{let c=vc(u,Is[l]);l.startsWith("origin")?(i=!0,n[l]=c):r[l]=c}}if(t.transform||(s||o?r.transform=VS(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 Gi=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function bh(e,t,o){for(let r in t)!_e(t[r])&&!Af(r,o)&&(e[r]=t[r])}function W_({transformTemplate:e},t){return(0,BS.useMemo)(()=>{let o=Gi();return Ui(o,t,e),Object.assign({},o.vars,o.style)},[t])}function $_(e,t){let o=e.style||{},r={};return bh(r,o,e),Object.assign(r,W_(e,t)),r}function HS(e,t){let o={},r=$_(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 GS=b(k(),1);var j_={offset:"stroke-dashoffset",array:"stroke-dasharray"},K_={offset:"strokeDashoffset",array:"strokeDasharray"};function US(e,t,o=1,r=0,a=!0){e.pathLength=1;let n=a?j_:K_;e[n.offset]=ce.transform(-r);let s=ce.transform(t),i=ce.transform(o);e[n.array]=`${s} ${i}`}function Df(e,{attrX:t,attrY:o,attrScale:r,pathLength:a,pathSpacing:n=1,pathOffset:s=0,...i},l,u,c){if(Ui(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&&US(d,a,n,s,!1)}var Nf=()=>({...Gi(),attrs:{}});var Of=e=>typeof e=="string"&&e.toLowerCase()==="svg";function zS(e,t,o,r){let a=(0,GS.useMemo)(()=>{let n=Nf();return Df(n,t,Of(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let n={};bh(n,e.style,e),a.style={...n,...a.style}}return a}var qS=["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 zi(e){return typeof e!="string"||e.includes("-")?!1:!!(qS.indexOf(e)>-1||/[A-Z]/u.test(e))}function WS(e,t,o,{latestValues:r},a,n=!1){let i=(zi(e)?zS:HS)(t,r,a,e),l=AS(t,typeof e=="string",n),u=e!==qi.Fragment?{...l,...i,ref:o}:{},{children:c}=t,d=(0,qi.useMemo)(()=>_e(c)?c.get():c,[c]);return(0,qi.createElement)(e,{...u,children:d})}var Ch=b(k(),1);function $S(e){let t=[{},{}];return e?.values.forEach((o,r)=>{t[0][r]=o.get(),t[1][r]=o.getVelocity()}),t}function Wi(e,t,o,r){if(typeof t=="function"){let[a,n]=$S(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]=$S(r);t=t(o!==void 0?o:e.custom,a,n)}return t}function $i(e){return _e(e)?e.get():e}function X_({scrapeMotionValuesFromProps:e,createRenderState:t},o,r,a){return{latestValues:Y_(o,r,a,e),renderState:t()}}function Y_(e,t,o,r){let a={},n=r(e,{});for(let f in n)a[f]=$i(n[f]);let{initial:s,animate:i}=e,l=ks(e),u=kf(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"&&!Pn(d)){let f=Array.isArray(d)?d:[d];for(let p=0;p<f.length;p++){let g=Wi(e,f[p]);if(g){let{transitionEnd:m,transition:h,...v}=g;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 m)a[x]=m[x]}}}return a}var Ff=e=>(t,o)=>{let r=(0,Ch.useContext)(In),a=(0,Ch.useContext)(hn),n=()=>X_(e,t,r,a);return o?n():na(n)};function ji(e,t,o){let{style:r}=e,a={};for(let n in r)(_e(r[n])||t.style&&_e(t.style[n])||Af(n,e)||o?.getValue(n)?.liveStyle!==void 0)&&(a[n]=r[n]);return a}var jS=Ff({scrapeMotionValuesFromProps:ji,createRenderState:Gi});function _f(e,t,o){let r=ji(e,t,o);for(let a in e)if(_e(e[a])||_e(t[a])){let n=kr.indexOf(a)!==-1?"attr"+a.charAt(0).toUpperCase()+a.substring(1):a;r[n]=e[a]}return r}var KS=Ff({scrapeMotionValuesFromProps:_f,createRenderState:Nf});var XS=Symbol.for("motionComponentSymbol");var YS=b(k(),1);function Fa(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function ZS(e,t,o){return(0,YS.useCallback)(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),o&&(typeof o=="function"?o(r):Fa(o)&&(o.current=r))},[t])}var Io=b(k(),1);var Ki=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase();var Z_="framerAppearId",Vf="data-"+Ki(Z_);var QS=b(k(),1),Bf=(0,QS.createContext)({});function JS(e,t,o,r,a){let{visualElement:n}=(0,Io.useContext)(In),s=(0,Io.useContext)(Tf),i=(0,Io.useContext)(hn),l=(0,Io.useContext)(Sn).reducedMotion,u=(0,Io.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,Io.useContext)(Bf);c&&!c.projection&&a&&(c.type==="html"||c.type==="svg")&&Q_(u.current,o,a,d);let f=(0,Io.useRef)(!1);(0,Io.useInsertionEffect)(()=>{c&&f.current&&c.update(o,i)});let p=o[Vf],g=(0,Io.useRef)(!!p&&!window.MotionHandoffIsComplete?.(p)&&window.MotionHasOptimisedAnimation?.(p));return Ai(()=>{c&&(f.current=!0,window.MotionIsMounted=!0,c.updateFeatures(),c.scheduleRenderMicrotask(),g.current&&c.animationState&&c.animationState.animateChanges())}),(0,Io.useEffect)(()=>{c&&(!g.current&&c.animationState&&c.animationState.animateChanges(),g.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(p)}),g.current=!1),c.enteringChildren=void 0)}),c}function Q_(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:eR(e.parent)),e.projection.setOptions({layoutId:a,layout:n,alwaysMeasureLayout:!!s||i&&Fa(i),visualElement:e,animationType:typeof n=="string"?n:"both",initialPromotionConfig:r,crossfade:c,layoutScroll:l,layoutRoot:u})}function eR(e){if(e)return e.options.allowProjection!==!1?e.projection:eR(e.parent)}function Uf(e,{forwardMotionProps:t=!1}={},o,r){o&&kS(o);let a=zi(e)?KS:jS;function n(i,l){let u,c={...(0,Xi.useContext)(Sn),...i,layoutId:J_(i)},{isStatic:d}=c,f=FS(i),p=a(i,d);if(!d&&Ei){eV(c,o);let g=tV(c);u=g.MeasureLayout,f.visualElement=JS(e,p,c,r,g.ProjectionNode)}return(0,Hf.jsxs)(In.Provider,{value:f,children:[u&&f.visualElement?(0,Hf.jsx)(u,{visualElement:f.visualElement,...c}):null,WS(e,i,ZS(p,f.visualElement,l),p,d,t)]})}n.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;let s=(0,Xi.forwardRef)(n);return s[XS]=e,s}function J_({layoutId:e}){let t=(0,Xi.useContext)(ki).id;return t&&e!==void 0?t+"-"+e:e}function eV(e,t){let o=(0,Xi.useContext)(Tf).strict}function tV(e){let{drag:t,layout:o}=Na;if(!t&&!o)return{};let r={...t,...o};return{MeasureLayout:t?.isEnabled(e)||o?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function tR(e,t){if(typeof Proxy>"u")return Uf;let o=new Map,r=(n,s)=>Uf(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,Uf(s,void 0,e,t)),o.get(s))})}var vR=b(k(),1);function Gf({top:e,left:t,right:o,bottom:r}){return{x:{min:t,max:o},y:{min:e,max:r}}}function oR({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function rR(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 wh(e){return e===void 0||e===1}function zf({scale:e,scaleX:t,scaleY:o}){return!wh(e)||!wh(t)||!wh(o)}function _a(e){return zf(e)||Sh(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Sh(e){return aR(e.x)||aR(e.y)}function aR(e){return e&&e!=="0%"}function Ic(e,t,o){let r=e-o,a=t*r;return o+a}function nR(e,t,o,r,a){return a!==void 0&&(e=Ic(e,a,r)),Ic(e,o,r)+t}function Rh(e,t=0,o=1,r,a){e.min=nR(e.min,t,o,r,a),e.max=nR(e.max,t,o,r,a)}function Ih(e,{x:t,y:o}){Rh(e.x,t.translate,t.scale,t.originPoint),Rh(e.y,o.translate,o.scale,o.originPoint)}var sR=.999999999999,iR=1.0000000000001;function uR(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&&As(e,{x:-n.scroll.offset.x,y:-n.scroll.offset.y}),s&&(t.x*=s.x.scale,t.y*=s.y.scale,Ih(e,s)),r&&_a(n.latestValues)&&As(e,n.latestValues))}t.x<iR&&t.x>sR&&(t.x=1),t.y<iR&&t.y>sR&&(t.y=1)}function Ln(e,t){e.min=e.min+t,e.max=e.max+t}function lR(e,t,o,r,a=.5){let n=Te(e.min,e.max,a);Rh(e,t,o,n,r)}function As(e,t){lR(e.x,t.x,t.scaleX,t.scale,t.originX),lR(e.y,t.y,t.scaleY,t.scale,t.originY)}function Ph(e,t){return Gf(rR(e.getBoundingClientRect(),t))}function cR(e,t,o){let r=Ph(e,o),{scroll:a}=t;return a&&(Ln(r.x,a.offset.x),Ln(r.y,a.offset.y)),r}var dR=()=>({translate:0,scale:1,origin:0,originPoint:0}),Ds=()=>({x:dR(),y:dR()}),fR=()=>({min:0,max:0}),We=()=>({x:fR(),y:fR()});var Pc={current:null},qf={current:!1};function pR(){if(qf.current=!0,!!Ei)if(window.matchMedia){let e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Pc.current=e.matches;e.addEventListener("change",t),t()}else Pc.current=!1}var Tn=new WeakMap;function mR(e,t,o){for(let r in t){let a=t[r],n=o[r];if(_e(a))e.addValue(r,a);else if(_e(n))e.addValue(r,Ro(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,Ro(s!==void 0?s:a,{owner:e}))}}for(let r in o)t[r]===void 0&&e.removeValue(r);return t}var gR=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],Yi=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=Ea,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=ut.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,Pe.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=ks(o),this.isVariantNode=kf(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 p=d[f];l[f]!==void 0&&_e(p)&&p.set(l[f])}}mount(t){this.current=t,Tn.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)),qf.current||pR(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Pc.current,this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Xt(this.notifyUpdate),Xt(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=No.has(t);r&&this.onBindTransform&&this.onBindTransform();let a=o.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&Pe.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 Na){let o=Na[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):We()}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<gR.length;r++){let a=gR[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=mR(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=Ro(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"&&(Bu(r)||Uu(r))?r=parseFloat(r):!hh(r)&&Zt.test(o)&&(r=mc(t,o)),this.setBaseTarget(t,_e(r)?r.get():r)),_e(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=Wi(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&&!_e(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 La),this.events[t].add(o)}notify(t,...o){this.events[t]&&this.events[t].notify(...o)}scheduleRenderMicrotask(){Ls.render(this.render)}};var Zi=class extends Yi{constructor(){super(...arguments),this.KeyframeResolver=gc}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;_e(t)&&(this.childSubscription=t.on("change",o=>{this.current&&(this.current.textContent=`${o}`)}))}};function Wf(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 oV(e){return window.getComputedStyle(e)}var Qi=class extends Zi{constructor(){super(...arguments),this.type="html",this.renderInstance=Wf}readValueFromInstance(t,o){if(No.has(o))return this.projection?.isProjecting?ic(o):Zg(t,o);{let r=oV(t),a=(vs(o)?r.getPropertyValue(o):r[o])||0;return typeof a=="string"?a.trim():a}}measureInstanceViewportBox(t,{transformPagePoint:o}){return Ph(t,o)}build(t,o,r){Ui(t,o,r.transformTemplate)}scrapeMotionValuesFromProps(t,o,r){return ji(t,o,r)}};var $f=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 hR(e,t,o,r){Wf(e,t,void 0,r);for(let a in t.attrs)e.setAttribute($f.has(a)?a:Ki(a),t.attrs[a])}var Ji=class extends Zi{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=We}getBaseTargetFromProps(t,o){return t[o]}readValueFromInstance(t,o){if(No.has(o)){let r=pc(o);return r&&r.default||0}return o=$f.has(o)?o:Ki(o),t.getAttribute(o)}scrapeMotionValuesFromProps(t,o,r){return _f(t,o,r)}build(t,o,r){Df(t,o,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(t,o,r,a){hR(t,o,r,a)}mount(t){this.isSVGTag=Of(t.tagName),super.mount(t)}};var xR=(e,t)=>zi(e)?new Ji(t):new Qi(t,{allowProjection:e!==vR.Fragment});function ua(e,t,o){let r=e.getProps();return Wi(r,t,o!==void 0?o:r.custom,e)}var Lc=e=>Array.isArray(e);function rV(e,t,o){e.hasValue(t)?e.getValue(t).set(o):e.addValue(t,Ro(o))}function aV(e){return Lc(e)?e[e.length-1]||0:e}function yR(e,t){let o=ua(e,t),{transitionEnd:r={},transition:a={},...n}=o||{};n={...n,...r};for(let s in n){let i=aV(n[s]);rV(e,s,i)}}function bR(e){return!!(_e(e)&&e.add)}function Tc(e,t){let o=e.getValue("willChange");if(bR(o))return o.add(t);if(!o&&Kt.WillChange){let r=new Kt.WillChange("auto");e.addValue("willChange",r),r.add(t)}}function jf(e){return e.props[Vf]}var nV=e=>e!==null;function CR(e,{repeat:t,repeatType:o="loop"},r){let a=e.filter(nV),n=t&&o!=="loop"&&t%2===1?0:a.length-1;return!n||r===void 0?a[n]:r}var sV={type:"spring",stiffness:500,damping:25,restSpeed:10},iV=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),lV={type:"keyframes",duration:.8},uV={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},wR=(e,{keyframes:t})=>t.length>2?lV:No.has(e)?e.startsWith("scale")?iV(t[1]):sV:uV;function SR({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 el=(e,t,o,r={},a,n)=>s=>{let i=Rs(r,e)||{},l=i.delay||r.delay||0,{elapsed:u=0}=r;u=u-ft(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};SR(i)||Object.assign(c,wR(e,c)),c.duration&&(c.duration=ft(c.duration)),c.repeatDelay&&(c.repeatDelay=ft(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let d=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(Bi(c),c.delay===0&&(d=!0)),(Kt.instantAnimations||Kt.skipAnimations)&&(d=!0,Bi(c),c.delay=0),c.allowFlatten=!i.type&&!i.ease,d&&!n&&t.get()!==void 0){let f=CR(c.keyframes,i);if(f!==void 0){Pe.update(()=>{c.onUpdate(f),c.onComplete()});return}}return i.isSync?new ka(c):new uc(c)};function cV({protectedKeys:e,needsAnimating:t},o){let r=e.hasOwnProperty(o)&&t[o]!==!0;return t[o]=!1,r}function tl(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&&cV(u,c))continue;let p={delay:o,...Rs(n||{},c)},g=d.get();if(g!==void 0&&!d.isAnimating&&!Array.isArray(f)&&f===g&&!p.velocity)continue;let m=!1;if(window.MotionHandoffAnimation){let v=jf(e);if(v){let x=window.MotionHandoffAnimation(v,c,Pe);x!==null&&(p.startTime=x,m=!0)}}Tc(e,c),d.start(el(c,d,f,e.shouldReduceMotion&&dc.has(c)?{type:!1}:p,e,m));let h=d.animation;h&&l.push(h)}return s&&Promise.all(l).then(()=>{Pe.update(()=>{s&&yR(e,s)})}),l}function Kf(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 Xf(e,t,o={}){let r=ua(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(tl(e,r,o)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(l=0)=>{let{delayChildren:u=0,staggerChildren:c,staggerDirection:d}=a;return dV(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 dV(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(Xf(l,t,{...s,delay:o+(typeof r=="function"?0:r)+Kf(e.variantChildren,l,r,a,n)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(i)}function RR(e,t,o={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){let a=t.map(n=>Xf(e,n,o));r=Promise.all(a)}else if(typeof t=="string")r=Xf(e,t,o);else{let a=typeof t=="function"?ua(e,t,o.custom):t;r=Promise.all(tl(e,a,o))}return r.then(()=>{e.notify("AnimationComplete",t)})}function Lh(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 fV=Rc.length;function Th(e){if(!e)return;if(!e.isControllingVariants){let o=e.parent?Th(e.parent)||{}:{};return e.props.initial!==void 0&&(o.initial=e.props.initial),o}let t={};for(let o=0;o<fV;o++){let r=Rc[o],a=e.props[r];(Oa(a)||a===!1)&&(t[r]=a)}return t}var pV=[...Mf].reverse(),mV=Mf.length;function gV(e){return t=>Promise.all(t.map(({animation:o,options:r})=>RR(e,o,r)))}function PR(e){let t=gV(e),o=IR(),r=!0,a=l=>(u,c)=>{let d=ua(e,c,l==="exit"?e.presenceContext?.custom:void 0);if(d){let{transition:f,transitionEnd:p,...g}=d;u={...u,...g,...p}}return u};function n(l){t=l(e)}function s(l){let{props:u}=e,c=Th(e.parent)||{},d=[],f=new Set,p={},g=1/0;for(let h=0;h<mV;h++){let v=pV[h],x=o[v],y=u[v]!==void 0?u[v]:c[v],R=Oa(y),S=v===l?x.isActive:null;S===!1&&(g=h);let C=y===c[v]&&y!==u[v]&&R;if(C&&r&&e.manuallyAnimateOnMount&&(C=!1),x.protectedKeys={...p},!x.isActive&&S===null||!y&&!x.prevProp||Pn(y)||typeof y=="boolean")continue;let w=hV(x.prevProp,y),I=w||v===l&&x.isActive&&!C&&R||h>g&&R,L=!1,T=Array.isArray(y)?y:[y],M=T.reduce(a(v),{});S===!1&&(M={});let{prevResolvedValues:F={}}=x,V={...F,...M},A=O=>{I=!0,f.has(O)&&(L=!0,f.delete(O)),x.needsAnimating[O]=!0;let E=e.getValue(O);E&&(E.liveStyle=!1)};for(let O in V){let E=M[O],D=F[O];if(p.hasOwnProperty(O))continue;let te=!1;Lc(E)&&Lc(D)?te=!Lh(E,D):te=E!==D,te?E!=null?A(O):f.add(O):E!==void 0&&f.has(O)?A(O):x.protectedKeys[O]=!0}x.prevProp=y,x.prevResolvedValues=M,x.isActive&&(p={...p,...M}),r&&e.blockInitialAnimation&&(I=!1);let G=C&&w;I&&(!G||L)&&d.push(...T.map(O=>{let E={type:v};if(typeof O=="string"&&r&&!G&&e.manuallyAnimateOnMount&&e.parent){let{parent:D}=e,te=ua(D,O);if(D.enteringChildren&&te){let{delayChildren:ue}=te.transition||{};E.delay=Kf(D.enteringChildren,e,ue)}}return{animation:O,options:E}}))}if(f.size){let h={};if(typeof u.initial!="boolean"){let v=ua(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 m=!!d.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(m=!1),r=!1,m?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=IR(),r=!0}}}function hV(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Lh(t,e):!1}function Ns(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function IR(){return{animate:Ns(!0),whileInView:Ns(),whileHover:Ns(),whileTap:Ns(),whileDrag:Ns(),whileFocus:Ns(),exit:Ns()}}var At=class{constructor(t){this.isMounted=!1,this.node=t}update(){}};var Yf=class extends At{constructor(t){super(t),t.animationState||(t.animationState=PR(t))}updateAnimationControlsSubscription(){let{animate:t}=this.node.getProps();Pn(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 vV=0,Zf=class extends At{constructor(){super(...arguments),this.id=vV++}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 LR={animation:{Feature:Yf},exit:{Feature:Zf}};function Va(e,t,o,r={passive:!0}){return e.addEventListener(t,o,r),()=>e.removeEventListener(t,o)}function Ba(e){return{point:{x:e.pageX,y:e.pageY}}}var TR=e=>t=>Ts(t)&&e(t,Ba(t));function Mn(e,t,o,r){return Va(e,t,TR(o),r)}var AR=1e-4,xV=1-AR,yV=1+AR,DR=.01,bV=0-DR,CV=0+DR;function Pt(e){return e.max-e.min}function NR(e,t,o){return Math.abs(e-t)<=o}function MR(e,t,o,r=.5){e.origin=r,e.originPoint=Te(t.min,t.max,e.origin),e.scale=Pt(o)/Pt(t),e.translate=Te(o.min,o.max,e.origin)-e.originPoint,(e.scale>=xV&&e.scale<=yV||isNaN(e.scale))&&(e.scale=1),(e.translate>=bV&&e.translate<=CV||isNaN(e.translate))&&(e.translate=0)}function ol(e,t,o,r){MR(e.x,t.x,o.x,r?r.originX:void 0),MR(e.y,t.y,o.y,r?r.originY:void 0)}function kR(e,t,o){e.min=o.min+t.min,e.max=e.min+Pt(t)}function OR(e,t,o){kR(e.x,t.x,o.x),kR(e.y,t.y,o.y)}function ER(e,t,o){e.min=t.min-o.min,e.max=e.min+Pt(t)}function rl(e,t,o){ER(e.x,t.x,o.x),ER(e.y,t.y,o.y)}function Po(e){return[e("x"),e("y")]}var Qf=({current:e})=>e?e.ownerDocument.defaultView:null;var FR=(e,t)=>Math.abs(e-t);function _R(e,t){let o=FR(e.x,t.x),r=FR(e.y,t.y);return Math.sqrt(o**2+r**2)}var al=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=kh(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,g=_R(f.offset,{x:0,y:0})>=this.distanceThreshold;if(!p&&!g)return;let{point:m}=f,{timestamp:h}=lt;this.history.push({...m,timestamp:h});let{onStart:v,onMove:x}=this.handlers;p||(v&&v(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),x&&x(this.lastMoveEvent,f)},this.handlePointerMove=(f,p)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=Mh(p,this.transformPagePoint),Pe.update(this.updatePoint,!0)},this.handlePointerUp=(f,p)=>{this.end();let{onEnd:g,onSessionEnd:m,resumeAnimation:h}=this.handlers;if(this.dragSnapToOrigin&&h&&h(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let v=kh(f.type==="pointercancel"?this.lastMoveEventInfo:Mh(p,this.transformPagePoint),this.history);this.startEvent&&g&&g(f,v),m&&m(f,v)},!Ts(t))return;this.dragSnapToOrigin=n,this.handlers=o,this.transformPagePoint=r,this.distanceThreshold=s,this.contextWindow=a||window;let i=Ba(t),l=Mh(i,this.transformPagePoint),{point:u}=l,{timestamp:c}=lt;this.history=[{...u,timestamp:c}];let{onSessionStart:d}=o;d&&d(t,kh(l,this.history)),this.removeListeners=Lr(Mn(this.contextWindow,"pointermove",this.handlePointerMove),Mn(this.contextWindow,"pointerup",this.handlePointerUp),Mn(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Xt(this.updatePoint)}};function Mh(e,t){return t?{point:t(e.point)}:e}function VR(e,t){return{x:e.x-t.x,y:e.y-t.y}}function kh({point:e},t){return{point:e,delta:VR(e,BR(t)),offset:VR(e,wV(t)),velocity:SV(t,.1)}}function wV(e){return e[0]}function BR(e){return e[e.length-1]}function SV(e,t){if(e.length<2)return{x:0,y:0};let o=e.length-1,r=null,a=BR(e);for(;o>=0&&(r=e[o],!(a.timestamp-r.timestamp>ft(t)));)o--;if(!r)return{x:0,y:0};let n=Gt(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 qR(e,{min:t,max:o},r){return t!==void 0&&e<t?e=r?Te(t,e,r.min):Math.max(e,t):o!==void 0&&e>o&&(e=r?Te(o,e,r.max):Math.min(e,o)),e}function HR(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 WR(e,{top:t,left:o,bottom:r,right:a}){return{x:HR(e.x,o,a),y:HR(e.y,t,r)}}function UR(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 $R(e,t){return{x:UR(e.x,t.x),y:UR(e.y,t.y)}}function jR(e,t){let o=.5,r=Pt(e),a=Pt(t);return a>r?o=Yo(t.min,t.max-r,e.min):r>a&&(o=Yo(e.min,e.max-a,t.min)),Et(0,1,o)}function KR(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 Jf=.35;function XR(e=Jf){return e===!1?e=0:e===!0&&(e=Jf),{x:GR(e,"left","right"),y:GR(e,"top","bottom")}}function GR(e,t,o){return{min:zR(e,t),max:zR(e,o)}}function zR(e,t){return typeof e=="number"?e:e[t]||0}var RV=new WeakMap,tp=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: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(Ba(d).point)},s=(d,f)=>{let{drag:p,dragPropagation:g,onDragStart:m}=this.getProps();if(p&&!g&&(this.openDragLock&&this.openDragLock(),this.openDragLock=ch(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),Po(v=>{let x=this.getAxisMotionValue(v).get()||0;if(Yt.test(x)){let{projection:y}=this.visualElement;if(y&&y.layout){let R=y.layout.layoutBox[v];R&&(x=Pt(R)*(parseFloat(x)/100))}}this.originPoint[v]=x}),m&&Pe.postRender(()=>m(d,f)),Tc(this.visualElement,"transform");let{animationState:h}=this.visualElement;h&&h.setActive("whileDrag",!0)},i=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f;let{dragPropagation:p,dragDirectionLock:g,onDirectionLock:m,onDrag:h}=this.getProps();if(!p&&!this.openDragLock)return;let{offset:v}=f;if(g&&this.currentDirection===null){this.currentDirection=IV(v),this.currentDirection!==null&&m&&m(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=()=>Po(d=>this.getAnimationState(d)==="paused"&&this.getAxisMotionValue(d).animation?.play()),{dragSnapToOrigin:c}=this.getProps();this.panSession=new al(t,{onSessionStart:n,onStart:s,onMove:i,onSessionEnd:l,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:r,contextWindow:Qf(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&&Pe.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||!ep(t,a,this.currentDirection))return;let n=this.getAxisMotionValue(t),s=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(s=qR(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&&Fa(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=WR(r.layoutBox,t):this.constraints=!1,this.elastic=XR(o),a!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Po(n=>{this.constraints!==!1&&this.getAxisMotionValue(n)&&(this.constraints[n]=KR(r.layoutBox[n],this.constraints[n]))})}resolveRefConstraints(){let{dragConstraints:t,onMeasureDragConstraints:o}=this.getProps();if(!t||!Fa(t))return!1;let r=t.current;Ut(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=cR(r,a.root,this.visualElement.getTransformPagePoint()),s=$R(a.layout.layoutBox,n);if(o){let i=o(oR(s));this.hasMutatedConstraints=!!i,i&&(s=Gf(i))}return s}startAnimation(t){let{drag:o,dragMomentum:r,dragElastic:a,dragTransition:n,dragSnapToOrigin:s,onDragTransitionEnd:i}=this.getProps(),l=this.constraints||{},u=Po(c=>{if(!ep(c,o,this.currentDirection))return;let d=l&&l[c]||{};s&&(d={min:0,max:0});let f=a?200:1e6,p=a?40:1e7,g={type:"inertia",velocity:r?t[c]:0,bounceStiffness:f,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...n,...d};return this.startAxisValueAnimation(c,g)});return Promise.all(u).then(i)}startAxisValueAnimation(t,o){let r=this.getAxisMotionValue(t);return Tc(this.visualElement,t),r.start(el(t,r,0,o,this.visualElement,!1))}stopAnimation(){Po(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Po(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){Po(o=>{let{drag:r}=this.getProps();if(!ep(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]-Te(s,i,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:t,dragConstraints:o}=this.getProps(),{projection:r}=this.visualElement;if(!Fa(o)||!r||!this.constraints)return;this.stopAnimation();let a={x:0,y:0};Po(s=>{let i=this.getAxisMotionValue(s);if(i&&this.constraints!==!1){let l=i.get();a[s]=jR({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(),Po(s=>{if(!ep(s,t,null))return;let i=this.getAxisMotionValue(s),{min:l,max:u}=this.constraints[s];i.set(Te(l,u,a[s]))})}addListeners(){if(!this.visualElement.current)return;RV.set(this.visualElement,this);let t=this.visualElement.current,o=Mn(t,"pointerdown",l=>{let{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(l)}),r=()=>{let{dragConstraints:l}=this.getProps();Fa(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()),Pe.read(r);let s=Va(window,"resize",()=>this.scalePositionWithinConstraints()),i=a.addEventListener("didUpdate",(({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(Po(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=Jf,dragMomentum:i=!0}=t;return{...t,drag:o,dragDirectionLock:r,dragPropagation:a,dragConstraints:n,dragElastic:s,dragMomentum:i}}};function ep(e,t,o){return(t===!0||t===e)&&(o===null||o===e)}function IV(e,t=10){let o=null;return Math.abs(e.y)>t?o="y":Math.abs(e.x)>t&&(o="x"),o}var op=class extends At{constructor(t){super(t),this.removeGroupControls=ot,this.removeListeners=ot,this.controls=new tp(t)}mount(){let{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ot}unmount(){this.removeGroupControls(),this.removeListeners()}};var YR=e=>(t,o)=>{e&&Pe.postRender(()=>e(t,o))},rp=class extends At{constructor(){super(...arguments),this.removePointerDownListener=ot}onPointerDown(t){this.session=new al(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Qf(this.node)})}createPanHandlers(){let{onPanSessionStart:t,onPanStart:o,onPan:r,onPanEnd:a}=this.node.getProps();return{onSessionStart:YR(t),onStart:YR(o),onMove:r,onEnd:(n,s)=>{delete this.session,a&&Pe.postRender(()=>a(n,s))}}}mount(){this.removePointerDownListener=Mn(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 JR=b(N(),1);var Mc=b(k(),1);var nl={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function ZR(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var sl={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(ce.test(e))e=parseFloat(e);else return e;let o=ZR(e,t.target.x),r=ZR(e,t.target.y);return`${o}% ${r}%`}};var QR={correct:(e,{treeScale:t,projectionDelta:o})=>{let r=e,a=Zt.parse(e);if(a.length>5)return r;let n=Zt.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=Te(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 Eh=!1,Ah=class extends Mc.Component{componentDidMount(){let{visualElement:t,layoutGroup:o,switchLayoutGroup:r,layoutId:a}=this.props,{projection:n}=t;_S(PV),n&&(o.group&&o.group.add(n),r&&r.register&&a&&r.register(n),Eh&&n.root.didUpdate(),n.addEventListener("animationComplete",()=>{this.safeToRemove()}),n.setOptions({...n.options,onExitComplete:()=>this.safeToRemove()})),nl.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){let{layoutDependency:o,visualElement:r,drag:a,isPresent:n}=this.props,{projection:s}=r;return s&&(s.isPresent=n,Eh=!0,a||t.layoutDependency!==o||o===void 0||t.isPresent!==n?s.willUpdate():this.safeToRemove(),t.isPresent!==n&&(n?s.promote():s.relegate()||Pe.postRender(()=>{let i=s.getStack();(!i||!i.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){let{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Ls.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:t,layoutGroup:o,switchLayoutGroup:r}=this.props,{projection:a}=t;Eh=!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 ap(e){let[t,o]=Pf(),r=(0,Mc.useContext)(ki);return(0,JR.jsx)(Ah,{...e,layoutGroup:r,switchLayoutGroup:(0,Mc.useContext)(Bf),isPresent:t,safeToRemove:o})}var PV={borderRadius:{...sl,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:sl,borderTopRightRadius:sl,borderBottomLeftRadius:sl,borderBottomRightRadius:sl,boxShadow:QR};function np(e,t,o){let r=_e(e)?e:Ro(e);return r.start(el("",r,t,o)),r.animation}var e0=(e,t)=>e.depth-t.depth;var sp=class{constructor(){this.children=[],this.isDirty=!1}add(t){gs(this.children,t),this.isDirty=!0}remove(t){Pr(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(e0),this.isDirty=!1,this.children.forEach(t)}};function t0(e,t){let o=ut.now(),r=({timestamp:a})=>{let n=a-o;n>=t&&(Xt(r),e(n-t))};return Pe.setup(r,!0),()=>Xt(r)}var n0=["TopLeft","TopRight","BottomLeft","BottomRight"],LV=n0.length,o0=e=>typeof e=="string"?parseFloat(e):e,r0=e=>typeof e=="number"||ce.test(e);function s0(e,t,o,r,a,n){a?(e.opacity=Te(0,o.opacity??1,TV(r)),e.opacityExit=Te(t.opacity??1,0,MV(r))):n&&(e.opacity=Te(t.opacity??1,o.opacity??1,r));for(let s=0;s<LV;s++){let i=`border${n0[s]}Radius`,l=a0(t,i),u=a0(o,i);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||r0(l)===r0(u)?(e[i]=Math.max(Te(o0(l),o0(u),r),0),(Yt.test(u)||Yt.test(l))&&(e[i]+="%")):e[i]=u}(t.rotate||o.rotate)&&(e.rotate=Te(t.rotate||0,o.rotate||0,r))}function a0(e,t){return e[t]!==void 0?e[t]:e.borderRadius}var TV=i0(0,.5,$u),MV=i0(.5,.95,ot);function i0(e,t,o){return r=>r<e?0:r>t?1:o(Yo(e,t,r))}function l0(e,t){e.min=t.min,e.max=t.max}function Oo(e,t){l0(e.x,t.x),l0(e.y,t.y)}function Dh(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function u0(e,t,o,r,a){return e-=t,e=Ic(e,1/o,r),a!==void 0&&(e=Ic(e,1/a,r)),e}function kV(e,t=0,o=1,r=.5,a,n=e,s=e){if(Yt.test(t)&&(t=parseFloat(t),t=Te(s.min,s.max,t/100)-s.min),typeof t!="number")return;let i=Te(n.min,n.max,r);e===n&&(i-=t),e.min=u0(e.min,t,o,i,a),e.max=u0(e.max,t,o,i,a)}function c0(e,t,[o,r,a],n,s){kV(e,t[o],t[r],t[a],t.scale,n,s)}var EV=["x","scaleX","originX"],AV=["y","scaleY","originY"];function Nh(e,t,o,r){c0(e.x,t,EV,o?o.x:void 0,r?r.x:void 0),c0(e.y,t,AV,o?o.y:void 0,r?r.y:void 0)}function d0(e){return e.translate===0&&e.scale===1}function Oh(e){return d0(e.x)&&d0(e.y)}function f0(e,t){return e.min===t.min&&e.max===t.max}function m0(e,t){return f0(e.x,t.x)&&f0(e.y,t.y)}function p0(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Fh(e,t){return p0(e.x,t.x)&&p0(e.y,t.y)}function _h(e){return Pt(e.x)/Pt(e.y)}function Vh(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}var ip=class{constructor(){this.members=[]}add(t){gs(this.members,t),t.scheduleRender()}remove(t){if(Pr(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 g0(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:p,skewY:g}=o;u&&(r=`perspective(${u}px) ${r}`),c&&(r+=`rotate(${c}deg) `),d&&(r+=`rotateX(${d}deg) `),f&&(r+=`rotateY(${f}deg) `),p&&(r+=`skewX(${p}deg) `),g&&(r+=`skewY(${g}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 Os={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},Bh=["","X","Y","Z"],DV=1e3,NV=0;function Hh(e,t,o,r){let{latestValues:a}=t;a[e]&&(o[e]=a[e],t.setStaticValue(e,0),r&&(r[e]=0))}function R0(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let o=jf(t);if(window.MotionHasOptimisedAnimation(o,"transform")){let{layout:a,layoutId:n}=e.options;window.MotionCancelOptimisedAnimation(o,"transform",Pe,!(a||n))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&R0(r)}function lp({attachResizeListener:e,defaultParent:t,measureScroll:o,checkIsScrollRoot:r,resetTransform:a}){return class{constructor(s={},i=t?.()){this.id=NV++,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,So.value&&(Os.nodes=Os.calculatedTargetDeltas=Os.calculatedProjections=0),this.nodes.forEach(_V),this.nodes.forEach(UV),this.nodes.forEach(GV),this.nodes.forEach(VV),So.addProjectionMetrics&&So.addProjectionMetrics(Os)},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 sp)}addEventListener(s,i){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new La),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=Ms(s)&&!yc(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;Pe.read(()=>{d=window.innerWidth}),e(s,()=>{let p=window.innerWidth;p!==d&&(d=p,this.root.updateBlockedByResize=!0,c&&c(),c=t0(f,250),nl.hasAnimatedSinceResize&&(nl.hasAnimatedSinceResize=!1,this.nodes.forEach(x0)))})}i&&this.root.registerSharedNode(i,this),this.options.animate!==!1&&u&&(i||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 g=this.options.transition||u.getDefaultTransition()||jV,{onLayoutAnimationStart:m,onLayoutAnimationComplete:h}=u.getProps(),v=!this.targetLayout||!Fh(this.targetLayout,p),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={...Rs(g,"layout"),onPlay:m,onComplete:h};(u.shouldReduceMotion||this.options.layoutRoot)&&(y.delay=0,y.type=!1),this.startAnimation(y),this.setAnimationOrigin(c,x)}else d||x0(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}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(),Xt(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(zV),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&&R0(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(h0);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(v0);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(HV),this.nodes.forEach(OV),this.nodes.forEach(FV)):this.nodes.forEach(v0),this.clearAllSnapshots();let i=ut.now();lt.delta=Et(0,1e3/60,i-lt.timestamp),lt.timestamp=i,lt.isProcessing=!0,Ju.update.process(lt),Ju.preRender.process(lt),Ju.render.process(lt),lt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Ls.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(BV),this.sharedNodes.forEach(qV)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Pe.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Pe.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Pt(this.snapshot.measuredBox.x)&&!Pt(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=We(),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&&!Oh(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;s&&this.instance&&(i||_a(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)),KV(l),{animationId:this.root.animationId,measuredBox:i,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:s}=this.options;if(!s)return We();let i=s.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(XV))){let{scroll:u}=this.root;u&&(Ln(i.x,u.offset.x),Ln(i.y,u.offset.y))}return i}removeElementScroll(s){let i=We();if(Oo(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&&Oo(i,s),Ln(i.x,c.offset.x),Ln(i.y,c.offset.y))}return i}applyTransform(s,i=!1){let l=We();Oo(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&&As(l,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),_a(c.latestValues)&&As(l,c.latestValues)}return _a(this.latestValues)&&As(l,this.latestValues),l}removeTransform(s){let i=We();Oo(i,s);for(let l=0;l<this.path.length;l++){let u=this.path[l];if(!u.instance||!_a(u.latestValues))continue;zf(u.latestValues)&&u.updateSnapshot();let c=We(),d=u.measurePageBox();Oo(c,d),Nh(i,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,c)}return _a(this.latestValues)&&Nh(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!==lt.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=lt.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(),rl(this.relativeTargetOrigin,this.layout.layoutBox,f.layout.layoutBox),Oo(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(),OR(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Oo(this.target,this.layout.layoutBox),Ih(this.target,this.targetDelta)):Oo(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(),rl(this.relativeTargetOrigin,this.target,f.target),Oo(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}So.value&&Os.calculatedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||zf(this.parent.latestValues)||Sh(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===lt.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;Oo(this.layoutCorrected,this.layout.layoutBox);let d=this.treeScale.x,f=this.treeScale.y;uR(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=We());let{target:p}=s;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Dh(this.prevProjectionDelta.x,this.projectionDelta.x),Dh(this.prevProjectionDelta.y,this.projectionDelta.y)),ol(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==f||!Vh(this.projectionDelta.x,this.prevProjectionDelta.x)||!Vh(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p)),So.value&&Os.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=Ds(),this.projectionDelta=Ds(),this.projectionDeltaWithTransform=Ds()}setAnimationOrigin(s,i=!1){let l=this.snapshot,u=l?l.latestValues:{},c={...this.latestValues},d=Ds();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!i;let f=We(),p=l?l.source:void 0,g=this.layout?this.layout.source:void 0,m=p!==g,h=this.getStack(),v=!h||h.members.length<=1,x=!!(m&&!v&&this.options.crossfade===!0&&!this.path.some($V));this.animationProgress=0;let y;this.mixTargetDelta=R=>{let S=R/1e3;y0(d.x,s.x,S),y0(d.y,s.y,S),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(rl(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),WV(this.relativeTarget,this.relativeTargetOrigin,f,S),y&&m0(this.relativeTarget,y)&&(this.isProjectionDirty=!1),y||(y=We()),Oo(y,this.relativeTarget)),m&&(this.animationValues=c,s0(c,u,this.latestValues,S,x,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Xt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Pe.update(()=>{nl.hasAnimatedSinceResize=!0,Tr.layout++,this.motionValue||(this.motionValue=Ro(0)),this.currentAnimation=np(this.motionValue,[0,1e3],{...s,velocity:0,isSync:!0,onUpdate:i=>{this.mixTargetDelta(i),s.onUpdate&&s.onUpdate(i)},onStop:()=>{Tr.layout--},onComplete:()=>{Tr.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(DV),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&&I0(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||We();let d=Pt(this.layout.layoutBox.x);l.x.min=s.target.x.min,l.x.max=l.x.min+d;let f=Pt(this.layout.layoutBox.y);l.y.min=s.target.y.min,l.y.max=l.y.min+f}Oo(i,l),As(i,c),ol(this.projectionDeltaWithTransform,this.layoutCorrected,i,c)}}registerSharedNode(s,i){this.sharedNodes.has(s)||this.sharedNodes.set(s,new ip),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&&Hh("z",s,u,this.animationValues);for(let c=0;c<Bh.length;c++)Hh(`rotate${Bh[c]}`,s,u,this.animationValues),Hh(`skew${Bh[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=$i(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=$i(i?.pointerEvents)||""),this.hasProjected&&!_a(this.latestValues)&&(s.transform=l?l({},""):"none",this.hasProjected=!1);return}s.visibility="";let c=u.animationValues||u.latestValues;this.applyTransformsToTarget();let d=g0(this.projectionDeltaWithTransform,this.treeScale,c);l&&(d=l(c,d)),s.transform=d;let{x:f,y:p}=this.projectionDelta;s.transformOrigin=`${f.origin*100}% ${p.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 g in Es){if(c[g]===void 0)continue;let{correct:m,applyTo:h,isCSSVariable:v}=Es[g],x=d==="none"?c[g]:m(c[g],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[g]=x:s[g]=x}this.options.layoutId&&(s.pointerEvents=u===this?$i(i?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(s=>s.currentAnimation?.stop()),this.root.nodes.forEach(h0),this.root.sharedNodes.clear()}}}function OV(e){e.updateLayout()}function FV(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"?Po(c=>{let d=n?t.measuredBox[c]:t.layoutBox[c],f=Pt(d);d.min=o[c].min,d.max=d.min+f}):I0(a,t.layoutBox,o)&&Po(c=>{let d=n?t.measuredBox[c]:t.layoutBox[c],f=Pt(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=Ds();ol(s,o,t.layoutBox);let i=Ds();n?ol(i,e.applyTransform(r,!0),t.measuredBox):ol(i,o,t.layoutBox);let l=!Oh(s),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();rl(p,t.layoutBox,d.layoutBox);let g=We();rl(g,o,f.layoutBox),Fh(p,g)||(u=!0),c.options.layoutRoot&&(e.relativeTarget=g,e.relativeTargetOrigin=p,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 _V(e){So.value&&Os.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 VV(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function BV(e){e.clearSnapshot()}function h0(e){e.clearMeasurements()}function v0(e){e.isLayoutDirty=!1}function HV(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function x0(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function UV(e){e.resolveTargetDelta()}function GV(e){e.calcProjection()}function zV(e){e.resetSkewAndRotation()}function qV(e){e.removeLeadSnapshot()}function y0(e,t,o){e.translate=Te(t.translate,0,o),e.scale=Te(t.scale,1,o),e.origin=t.origin,e.originPoint=t.originPoint}function b0(e,t,o,r){e.min=Te(t.min,o.min,r),e.max=Te(t.max,o.max,r)}function WV(e,t,o,r){b0(e.x,t.x,o.x,r),b0(e.y,t.y,o.y,r)}function $V(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var jV={duration:.45,ease:[.4,0,.1,1]},C0=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),w0=C0("applewebkit/")&&!C0("chrome/")?Math.round:ot;function S0(e){e.min=w0(e.min),e.max=w0(e.max)}function KV(e){S0(e.x),S0(e.y)}function I0(e,t,o){return e==="position"||e==="preserve-aspect"&&!NR(_h(t),_h(o),.2)}function XV(e){return e!==e.root&&e.scroll?.wasRoot}var P0=lp({attachResizeListener:(e,t)=>Va(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0});var Uh={current:void 0},up=lp({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Uh.current){let e=new P0({});e.mount(window),e.setOptions({layoutScroll:!0}),Uh.current=e}return Uh.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"});var L0={pan:{Feature:rp},drag:{Feature:op,ProjectionNode:up,MeasureLayout:ap}};function T0(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&&Pe.postRender(()=>n(t,Ba(t)))}var cp=class extends At{mount(){let{current:t}=this.node;t&&(this.unmount=dh(t,(o,r)=>(T0(this.node,r,"Start"),a=>T0(this.node,a,"End"))))}unmount(){}};var dp=class extends At{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=Lr(Va(this.node.current,"focus",()=>this.onFocus()),Va(this.node.current,"blur",()=>this.onBlur()))}unmount(){}};function M0(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&&Pe.postRender(()=>n(t,Ba(t)))}var fp=class extends At{mount(){let{current:t}=this.node;t&&(this.unmount=mh(t,(o,r)=>(M0(this.node,r,"Start"),(a,{success:n})=>M0(this.node,a,n?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}};var zh=new WeakMap,Gh=new WeakMap,YV=e=>{let t=zh.get(e.target);t&&t(e)},ZV=e=>{e.forEach(YV)};function QV({root:e,...t}){let o=e||document;Gh.has(o)||Gh.set(o,{});let r=Gh.get(o),a=JSON.stringify(t);return r[a]||(r[a]=new IntersectionObserver(ZV,{root:e,...t})),r[a]}function k0(e,t,o){let r=QV(t);return zh.set(e,o),r.observe(e),()=>{zh.delete(e),r.unobserve(e)}}var JV={some:0,all:1},pp=class extends At{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:JV[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 k0(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(eB(t,o))&&this.startObserver()}unmount(){}};function eB({viewport:e={}},{viewport:t={}}={}){return o=>e[o]!==t[o]}var E0={inView:{Feature:pp},tap:{Feature:fp},focus:{Feature:dp},hover:{Feature:cp}};var A0={layout:{ProjectionNode:up,MeasureLayout:ap}};var D0={...LR,...E0,...L0,...A0};var Ve=tR(D0,xR);var il=b(k(),1);function ll(e){let t=na(()=>Ro(e)),{isStatic:o}=(0,il.useContext)(Sn);if(o){let[,r]=(0,il.useState)(e);(0,il.useEffect)(()=>t.on("change",r),[])}return t}function mp(e,t){let o=ll(t()),r=()=>o.set(t());return r(),Ai(()=>{let a=()=>Pe.preRender(r,!1,!0),n=e.map(s=>s.on("change",a));return()=>{n.forEach(s=>s()),Xt(r)}}),o}function N0(e){Ps.current=[],e();let t=mp(Ps.current,e);return Ps.current=void 0,t}function qh(e,t,o,r){if(typeof e=="function")return N0(e);let a=typeof t=="function"?t:gh(t,o,r);return Array.isArray(e)?O0(e,a):O0([e],([n])=>a(n))}function O0(e,t){let o=na(()=>[]);return mp(e,()=>{o.length=0;let r=e.length;for(let a=0;a<r;a++)o[a]=e[a].get();return t(o)})}function kc(e){return typeof e=="object"&&!Array.isArray(e)}function gp(e,t,o,r){return typeof e=="string"&&kc(t)?hc(e,o,r):e instanceof NodeList?Array.from(e):Array.isArray(e)?e:[e]}function F0(e,t,o){return e*(t+1)}function Wh(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 tB(e,t,o){for(let r=0;r<e.length;r++){let a=e[r];a.at>t&&a.at<o&&(Pr(e,a),r--)}}function _0(e,t,o,r,a,n){tB(e,a,n);for(let s=0;s<t.length;s++)e.push({value:t[s],at:Te(a,n,r[s]),easing:Yu(o,s)})}function V0(e,t){for(let o=0;o<e.length;o++)e[o]=e[o]/(t+1)}function B0(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}var oB="easeInOut",rB=20;function G0(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 p=0;p<e.length;p++){let g=e[p];if(typeof g=="string"){u.set(g,d);continue}else if(!Array.isArray(g)){u.set(g.name,Wh(d,g.at,c,u));continue}let[m,h,v={}]=g;v.at!==void 0&&(d=Wh(d,v.at,c,u));let x=0,y=(R,S,C,w=0,I=0)=>{let L=aB(R),{delay:T=0,times:M=sc(L),type:F="keyframes",repeat:V,repeatType:A,repeatDelay:G=0,..._}=S,{ease:O=t.ease||"easeOut",duration:E}=S,D=typeof T=="function"?T(w,I):T,te=L.length,ue=Ss(F)?F:a?.[F||"keyframes"];if(te<=2&&ue){let X=100;if(te===2&&iB(L)){let oe=L[1]-L[0];X=Math.abs(oe)}let se={..._};E!==void 0&&(se.duration=ft(E));let H=rc(se,X,ue);O=H.ease,E=H.duration}E??(E=n);let B=d+D;M.length===1&&M[0]===0&&(M[1]=1);let $=M.length-L.length;if($>0&&nc(M,$),L.length===1&&L.unshift(null),V){Ut(V<rB,"Repeat count too high, must be less than 20","repeat-count-high"),E=F0(E,V);let X=[...L],se=[...M];O=Array.isArray(O)?[...O]:[O];let H=[...O];for(let oe=0;oe<V;oe++){L.push(...X);for(let fe=0;fe<X.length;fe++)M.push(se[fe]+(oe+1)),O.push(fe===0?"linear":Yu(H,fe-1))}V0(M,V)}let Z=B+E;_0(C,L,O,M,B,Z),x=Math.max(D+E,x),f=Math.max(Z,f)};if(_e(m)){let R=H0(m,i);y(h,v,U0("default",R))}else{let R=gp(m,h,r,l),S=R.length;for(let C=0;C<S;C++){h=h,v=v;let w=R[C],I=H0(w,i);for(let L in h)y(h[L],nB(v,L),U0(L,I),C,S)}}c=d,d+=x}return i.forEach((p,g)=>{for(let m in p){let h=p[m];h.sort(B0);let v=[],x=[],y=[];for(let S=0;S<h.length;S++){let{at:C,value:w,easing:I}=h[S];v.push(w),x.push(Yo(0,f,C)),y.push(I||"easeOut")}x[0]!==0&&(x.unshift(0),v.unshift(v[0]),y.unshift(oB)),x[x.length-1]!==1&&(x.push(1),v.push(null)),s.has(g)||s.set(g,{keyframes:{},transition:{}});let R=s.get(g);R.keyframes[m]=v,R.transition[m]={...t,duration:f,ease:y,times:x,...o}}}),s}function H0(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function U0(e,t){return t[e]||(t[e]=[]),t[e]}function aB(e){return Array.isArray(e)?e:[e]}function nB(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}var sB=e=>typeof e=="number",iB=e=>e.every(sB);function lB(e,t){return e in t}var hp=class extends Yi{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,o){if(lB(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 We()}build(t,o){Object.assign(t.output,o)}renderInstance(t,{output:o}){Object.assign(t,o)}sortInstanceNodePosition(){return 0}};function z0(e){let t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},o=Ms(e)&&!yc(e)?new Ji(t):new Qi(t);o.mount(e),Tn.set(e,o)}function q0(e){let t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},o=new hp(t);o.mount(e),Tn.set(e,o)}function uB(e,t){return _e(e)||typeof e=="number"||typeof e=="string"&&!kc(t)}function vp(e,t,o,r){let a=[];if(uB(e,t))a.push(np(e,kc(t)&&t.default||t,o&&(o.default||o)));else{let n=gp(e,t,r),s=n.length;Ut(!!s,"No valid elements provided.","no-valid-elements");for(let i=0;i<s;i++){let l=n[i];Ut(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?z0:q0;Tn.has(l)||u(l);let c=Tn.get(l),d={...o};"delay"in d&&typeof d.delay=="function"&&(d.delay=d.delay(i,s)),a.push(...tl(c,{...t,transition:d},{}))}}return a}function W0(e,t,o){let r=[];return G0(e,t,o,{spring:Ma}).forEach(({keyframes:n,transition:s},i)=>{r.push(...vp(i,n,s))}),r}function cB(e){return Array.isArray(e)&&e.some(Array.isArray)}function $0(e){function t(o,r,a){let n=[];cB(o)?n=W0(o,r,e):n=vp(o,r,a,e);let s=new cc(n);return e&&(e.animations.push(s),s.finished.then(()=>{Pr(e.animations,s)})),s}return t}var $h=$0();var kce=Y("",{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"}}),Er={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}},xp={lift:{y:-2,transition:Er.smooth},scale:{scale:1.05,transition:Er.smooth},glow:{boxShadow:"0 0 20px rgba(var(--primary), 0.3)",transition:Er.smooth},rotate:{rotate:2,transition:Er.bouncy}},j0={scale:{scale:.95,transition:{duration:.1}},depress:{y:1,transition:{duration:.1}}},Ece={ring:{boxShadow:"0 0 0 2px var(--background), 0 0 0 4px var(--primary)",transition:Er.smooth},glow:{boxShadow:"0 0 0 3px rgba(var(--primary), 0.3)",transition:Er.smooth}},Ace={container:{hidden:{opacity:0},show:{opacity:1,transition:{staggerChildren:.05}}},item:{hidden:{opacity:0,y:20},show:{opacity:1,y:0,transition:Er.smooth}}},Dce={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:Er.smooth},slideRight:{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},exit:{opacity:0,x:20},transition:Er.smooth},scale:{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:1.05},transition:Er.smooth}},K0={initial:{opacity:.5},animate:{opacity:[.5,.8,.5],transition:{duration:1.5,repeat:1/0,ease:"easeInOut"}}};var Nce={initial:{opacity:0,y:-20,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,scale:.95,transition:{duration:.15}},transition:Er.bouncy};var kn=b(N()),X0=Y("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"}}),Y0=Fs.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"?xp.scale:n==="glow"?xp.glow:xp.lift,whileTap:j0.scale};return(0,kn.jsx)(Ve.div,{ref:i,className:P("moonui-theme",X0({variant:t,size:o,radius:r,interactive:a,className:e})),...l,...s})}return(0,kn.jsx)("div",{ref:i,className:P("moonui-theme",X0({variant:t,size:o,radius:r,interactive:a,className:e})),...s})});Y0.displayName="Card";var Z0=Fs.forwardRef(({className:e,...t},o)=>(0,kn.jsx)("div",{ref:o,className:P("moonui-theme","flex flex-col space-y-1.5 p-6",e),...t}));Z0.displayName="CardHeader";var Q0=Fs.forwardRef(({className:e,...t},o)=>(0,kn.jsx)("h3",{ref:o,className:P("moonui-theme","text-lg font-semibold leading-none tracking-tight",e),...t}));Q0.displayName="CardTitle";var J0=Fs.forwardRef(({className:e,...t},o)=>(0,kn.jsx)("p",{ref:o,className:P("moonui-theme","text-sm text-muted-foreground",e),...t}));J0.displayName="CardDescription";var eI=Fs.forwardRef(({className:e,...t},o)=>(0,kn.jsx)("div",{ref:o,className:P("moonui-theme","p-6 pt-0",e),...t}));eI.displayName="CardContent";var tI=Fs.forwardRef(({className:e,...t},o)=>(0,kn.jsx)("div",{ref:o,className:P("moonui-theme","flex items-center p-6 pt-0",e),...t}));tI.displayName="CardFooter";var NI=b(k());var dB=Math.pow(10,8)*24*60*60*1e3,Gce=-dB,yp=6048e5,oI=864e5;var fB=3600;var rI=fB*24,zce=rI*7,pB=rI*365.2425,mB=pB/12,qce=mB*3,jh=Symbol.for("constructDateFrom");function rt(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&jh in e?e[jh](t):e instanceof Date?new e.constructor(t):new Date(t)}function Oe(e,t){return rt(t||e,e)}function bp(e,t,o){let r=Oe(e,o?.in);if(isNaN(t))return rt(o?.in||e,NaN);if(!t)return r;let a=r.getDate(),n=rt(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 gB={};function ca(){return gB}function Ar(e,t){let o=ca(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??o.weekStartsOn??o.locale?.options?.weekStartsOn??0,a=Oe(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 _s(e,t){return Ar(e,{...t,weekStartsOn:1})}function Cp(e,t){let o=Oe(e,t?.in),r=o.getFullYear(),a=rt(o,0);a.setFullYear(r+1,0,4),a.setHours(0,0,0,0);let n=_s(a),s=rt(o,0);s.setFullYear(r,0,4),s.setHours(0,0,0,0);let i=_s(s);return o.getTime()>=n.getTime()?r+1:o.getTime()>=i.getTime()?r:r-1}function Kh(e){let t=Oe(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 En(e,...t){let o=rt.bind(null,e||t.find(r=>typeof r=="object"));return t.map(o)}function ul(e,t){let o=Oe(e,t?.in);return o.setHours(0,0,0,0),o}function aI(e,t,o){let[r,a]=En(o?.in,e,t),n=ul(r),s=ul(a),i=+n-Kh(n),l=+s-Kh(s);return Math.round((i-l)/oI)}function nI(e,t){let o=Cp(e,t),r=rt(t?.in||e,0);return r.setFullYear(o,0,4),r.setHours(0,0,0,0),_s(r)}function sI(e){return rt(e,Date.now())}function Vs(e,t,o){let[r,a]=En(o?.in,e,t);return+ul(r)==+ul(a)}function iI(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function wp(e){return!(!iI(e)&&typeof e!="number"||isNaN(+Oe(e)))}function lI(e,t){let o=Oe(e,t?.in),r=o.getMonth();return o.setFullYear(o.getFullYear(),r+1,0),o.setHours(23,59,59,999),o}function uI(e,t){let[o,r]=En(e,t.start,t.end);return{start:o,end:r}}function Sp(e,t){let{start:o,end:r}=uI(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(rt(o,s)),s.setDate(s.getDate()+i),s.setHours(0,0,0,0);return a?l.reverse():l}function cI(e,t){let o=Oe(e,t?.in);return o.setDate(1),o.setHours(0,0,0,0),o}function dI(e,t){let o=Oe(e,t?.in);return o.setFullYear(o.getFullYear(),0,1),o.setHours(0,0,0,0),o}function fI(e,t){let o=ca(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??o.weekStartsOn??o.locale?.options?.weekStartsOn??0,a=Oe(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 hB={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"}},pI=(e,t,o)=>{let r,a=hB[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 Rp(e){return(t={})=>{let o=t.width?String(t.width):e.defaultWidth;return e.formats[o]||e.formats[e.defaultWidth]}}var vB={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},xB={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},yB={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},mI={date:Rp({formats:vB,defaultWidth:"full"}),time:Rp({formats:xB,defaultWidth:"full"}),dateTime:Rp({formats:yB,defaultWidth:"full"})};var bB={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},gI=(e,t,o,r)=>bB[e];function cl(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 CB={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},wB={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},SB={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"]},RB={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"]},IB={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"}},PB={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"}},LB=(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"},hI={ordinalNumber:LB,era:cl({values:CB,defaultWidth:"wide"}),quarter:cl({values:wB,defaultWidth:"wide",argumentCallback:e=>e-1}),month:cl({values:SB,defaultWidth:"wide"}),day:cl({values:RB,defaultWidth:"wide"}),dayPeriod:cl({values:IB,defaultWidth:"wide",formattingValues:PB,defaultFormattingWidth:"wide"})};function dl(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)?MB(i,d=>d.test(s)):TB(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 TB(e,t){for(let o in e)if(Object.prototype.hasOwnProperty.call(e,o)&&t(e[o]))return o}function MB(e,t){for(let o=0;o<e.length;o++)if(t(e[o]))return o}function vI(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 kB=/^(\d+)(th|st|nd|rd)?/i,EB=/\d+/i,AB={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},DB={any:[/^b/i,/^(a|c)/i]},NB={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},OB={any:[/1/i,/2/i,/3/i,/4/i]},FB={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},_B={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]},VB={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},BB={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]},HB={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},UB={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}},xI={ordinalNumber:vI({matchPattern:kB,parsePattern:EB,valueCallback:e=>parseInt(e,10)}),era:dl({matchPatterns:AB,defaultMatchWidth:"wide",parsePatterns:DB,defaultParseWidth:"any"}),quarter:dl({matchPatterns:NB,defaultMatchWidth:"wide",parsePatterns:OB,defaultParseWidth:"any",valueCallback:e=>e+1}),month:dl({matchPatterns:FB,defaultMatchWidth:"wide",parsePatterns:_B,defaultParseWidth:"any"}),day:dl({matchPatterns:VB,defaultMatchWidth:"wide",parsePatterns:BB,defaultParseWidth:"any"}),dayPeriod:dl({matchPatterns:HB,defaultMatchWidth:"any",parsePatterns:UB,defaultParseWidth:"any"})};var Xh={code:"en-US",formatDistance:pI,formatLong:mI,formatRelative:gI,localize:hI,match:xI,options:{weekStartsOn:0,firstWeekContainsDate:1}};function yI(e,t){let o=Oe(e,t?.in);return aI(o,dI(o))+1}function bI(e,t){let o=Oe(e,t?.in),r=+_s(o)-+nI(o);return Math.round(r/yp)+1}function Ip(e,t){let o=Oe(e,t?.in),r=o.getFullYear(),a=ca(),n=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??a.firstWeekContainsDate??a.locale?.options?.firstWeekContainsDate??1,s=rt(t?.in||e,0);s.setFullYear(r+1,0,n),s.setHours(0,0,0,0);let i=Ar(s,t),l=rt(t?.in||e,0);l.setFullYear(r,0,n),l.setHours(0,0,0,0);let u=Ar(l,t);return+o>=+i?r+1:+o>=+u?r:r-1}function CI(e,t){let o=ca(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,a=Ip(e,t),n=rt(t?.in||e,0);return n.setFullYear(a,0,r),n.setHours(0,0,0,0),Ar(n,t)}function wI(e,t){let o=Oe(e,t?.in),r=+Ar(o,t)-+CI(o,t);return Math.round(r/yp)+1}function Be(e,t){let o=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return o+r}var Ha={y(e,t){let o=e.getFullYear(),r=o>0?o:1-o;return Be(t==="yy"?r%100:r,t.length)},M(e,t){let o=e.getMonth();return t==="M"?String(o+1):Be(o+1,2)},d(e,t){return Be(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 Be(e.getHours()%12||12,t.length)},H(e,t){return Be(e.getHours(),t.length)},m(e,t){return Be(e.getMinutes(),t.length)},s(e,t){return Be(e.getSeconds(),t.length)},S(e,t){let o=t.length,r=e.getMilliseconds(),a=Math.trunc(r*Math.pow(10,o-3));return Be(a,t.length)}};var fl={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Yh={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 Ha.y(e,t)},Y:function(e,t,o,r){let a=Ip(e,r),n=a>0?a:1-a;if(t==="YY"){let s=n%100;return Be(s,2)}return t==="Yo"?o.ordinalNumber(n,{unit:"year"}):Be(n,t.length)},R:function(e,t){let o=Cp(e);return Be(o,t.length)},u:function(e,t){let o=e.getFullYear();return Be(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 Be(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 Be(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 Ha.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 Be(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=wI(e,r);return t==="wo"?o.ordinalNumber(a,{unit:"week"}):Be(a,t.length)},I:function(e,t,o){let r=bI(e);return t==="Io"?o.ordinalNumber(r,{unit:"week"}):Be(r,t.length)},d:function(e,t,o){return t==="do"?o.ordinalNumber(e.getDate(),{unit:"date"}):Ha.d(e,t)},D:function(e,t,o){let r=yI(e);return t==="Do"?o.ordinalNumber(r,{unit:"dayOfYear"}):Be(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 Be(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 Be(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 Be(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=fl.noon:r===0?a=fl.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=fl.evening:r>=12?a=fl.afternoon:r>=4?a=fl.morning:a=fl.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 Ha.h(e,t)},H:function(e,t,o){return t==="Ho"?o.ordinalNumber(e.getHours(),{unit:"hour"}):Ha.H(e,t)},K:function(e,t,o){let r=e.getHours()%12;return t==="Ko"?o.ordinalNumber(r,{unit:"hour"}):Be(r,t.length)},k:function(e,t,o){let r=e.getHours();return r===0&&(r=24),t==="ko"?o.ordinalNumber(r,{unit:"hour"}):Be(r,t.length)},m:function(e,t,o){return t==="mo"?o.ordinalNumber(e.getMinutes(),{unit:"minute"}):Ha.m(e,t)},s:function(e,t,o){return t==="so"?o.ordinalNumber(e.getSeconds(),{unit:"second"}):Ha.s(e,t)},S:function(e,t){return Ha.S(e,t)},X:function(e,t,o){let r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return RI(r);case"XXXX":case"XX":return Bs(r);case"XXXXX":case"XXX":default:return Bs(r,":")}},x:function(e,t,o){let r=e.getTimezoneOffset();switch(t){case"x":return RI(r);case"xxxx":case"xx":return Bs(r);case"xxxxx":case"xxx":default:return Bs(r,":")}},O:function(e,t,o){let r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+SI(r,":");case"OOOO":default:return"GMT"+Bs(r,":")}},z:function(e,t,o){let r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+SI(r,":");case"zzzz":default:return"GMT"+Bs(r,":")}},t:function(e,t,o){let r=Math.trunc(+e/1e3);return Be(r,t.length)},T:function(e,t,o){return Be(+e,t.length)}};function SI(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+Be(n,2)}function RI(e,t){return e%60===0?(e>0?"-":"+")+Be(Math.abs(e)/60,2):Bs(e,t)}function Bs(e,t=""){let o=e>0?"-":"+",r=Math.abs(e),a=Be(Math.trunc(r/60),2),n=Be(r%60,2);return o+a+t+n}var II=(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"})}},PI=(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"})}},GB=(e,t)=>{let o=e.match(/(P+)(p+)?/)||[],r=o[1],a=o[2];if(!a)return II(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}}",II(r,t)).replace("{{time}}",PI(a,t))},LI={p:PI,P:GB};var zB=/^D+$/,qB=/^Y+$/,WB=["D","DD","YY","YYYY"];function TI(e){return zB.test(e)}function MI(e){return qB.test(e)}function kI(e,t,o){let r=$B(e,t,o);if(console.warn(r),WB.includes(e))throw new RangeError(r)}function $B(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 jB=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,KB=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,XB=/^'([^]*?)'?$/,YB=/''/g,ZB=/[a-zA-Z]/;function Dr(e,t,o){let r=ca(),a=o?.locale??r.locale??Xh,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=Oe(e,o?.in);if(!wp(i))throw new RangeError("Invalid time value");let l=t.match(KB).map(c=>{let d=c[0];if(d==="p"||d==="P"){let f=LI[d];return f(c,a.formatLong)}return c}).join("").match(jB).map(c=>{if(c==="''")return{isToken:!1,value:"'"};let d=c[0];if(d==="'")return{isToken:!1,value:QB(c)};if(Yh[d])return{isToken:!0,value:c};if(d.match(ZB))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&&MI(d)||!o?.useAdditionalDayOfYearTokens&&TI(d))&&kI(d,t,String(e));let f=Yh[d[0]];return f(i,d,a.localize,u)}).join("")}function QB(e){let t=e.match(XB);return t?t[1].replace(YB,"'"):e}function Zh(e,t){return Oe(e,t?.in).getDay()}function EI(e,t,o){let[r,a]=En(o?.in,e,t);return r.getFullYear()===a.getFullYear()&&r.getMonth()===a.getMonth()}function AI(e,t){return Vs(rt(t?.in||e,e),sI(t?.in||e))}function DI(e,t,o){return bp(e,-t,o)}var co=b(N());function Ec({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]=NI.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(DI(c,1))},g=()=>{d(bp(c,1))},m=C=>{if(!r?.(C)){if(e==="single")o?.(C);else if(e==="range"){let w=t;!w?.from||w.from&&w.to?o?.({from:C,to:void 0}):C<w.from?o?.({from:C,to:w.from}):o?.({from:w.from,to:C})}}},h=C=>{if(!t)return!1;if(e==="single")return Vs(C,t);if(e==="range"){let w=t;return w.from&&w.to?C>=w.from&&C<=w.to:w.from?Vs(C,w.from):!1}return!1},v=C=>{if(e!=="range"||!t)return!1;let w=t;return w.from?Vs(C,w.from):!1},x=C=>{if(e!=="range"||!t)return!1;let w=t;return w.to?Vs(C,w.to):!1},y=C=>{if(e!=="range"||!t)return!1;let w=t;return!w.from||!w.to?!1:C>w.from&&C<w.to},S=(()=>{let C=cI(c),w=lI(c),I=Sp({start:C,end:w}),L=Zh(C),T=[];if(L>0&&a){let A=Ar(C),G=new Date(C);G.setDate(G.getDate()-1),T.push(...Sp({start:A,end:G}))}let M=Zh(w),F=[];if(M<6&&a){let A=new Date(w);A.setDate(A.getDate()+1);let G=fI(w);F.push(...Sp({start:A,end:G}))}let V=[];if(!a&&L>0)for(let A=0;A<L;A++)V.push(null);return[...T,...V,...I,...F]})();return(0,co.jsxs)("div",{className:P("moonui-theme","p-0",n),children:[(0,co.jsxs)("div",{className:"flex items-center justify-between px-6 py-4 border-b border-border/50 dark:border-gray-700/50",children:[(0,co.jsx)("button",{onClick:p,className:P("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,co.jsx)(Sr,{className:"h-5 w-5"})}),(0,co.jsx)("h2",{className:"text-base font-medium",children:Dr(c,"MMMM yyyy")}),(0,co.jsx)("button",{onClick:g,className:P("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,co.jsx)(lo,{className:"h-5 w-5"})})]}),(0,co.jsxs)("div",{className:"px-6 pb-4",children:[(0,co.jsx)("div",{className:"grid grid-cols-7 mb-2",children:f.map((C,w)=>(0,co.jsx)("div",{className:"text-muted-foreground text-xs font-medium h-10 flex items-center justify-center",title:C.full,children:C.short},`weekday-${w}`))}),(0,co.jsx)("div",{className:"grid grid-cols-7 gap-1",children:S.map((C,w)=>{if(!C)return(0,co.jsx)("div",{className:"h-10 w-10"},`empty-${w}`);let I=!EI(C,c),L=r?.(C)||!1,T=h(C),M=AI(C),F=v(C),V=x(C),A=y(C);return(0,co.jsx)("button",{onClick:()=>m(C),disabled:L,className:P("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",I&&"text-muted-foreground/50",L&&"text-muted-foreground/30 cursor-not-allowed hover:bg-transparent",T&&!A&&"bg-primary text-primary-foreground font-medium hover:bg-primary hover:text-primary-foreground",M&&"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",A&&"bg-accent/30 text-accent-foreground rounded-none",F&&"rounded-r-none",V&&"rounded-l-none"),type:"button",children:Dr(C,"d")},C.toISOString())})})]})]})}Ec.displayName="Calendar";var Hs=b(k());var An=b(N()),JB=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"},OI=(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},FI=Hs.forwardRef(({className:e,value:t="",onChange:o,showIcon:r=!0,size:a,...n},s)=>{let[i,l]=Hs.useState("unknown"),u=c=>{let d=c.target.value.replace(/\D/g,""),f=JB(d);l(f);let p=f==="amex"?15:16,g=d.slice(0,p),m=OI(g,f);o?.(g,f),c.target.value=m};return(0,An.jsxs)("div",{className:"relative",children:[(0,An.jsx)(Qt,{ref:s,type:"text",inputMode:"numeric",autoComplete:"cc-number",placeholder:"1234 5678 9012 3456",value:OI(t,i),onChange:u,className:P(r&&"pl-10",e),...n}),r&&(0,An.jsx)(vu,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"})]})});FI.displayName="CardNumberInput";var _I=Hs.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,An.jsx)(Qt,{ref:n,type:"text",inputMode:"numeric",autoComplete:"cc-exp",placeholder:"MM/YY",value:i,onChange:s,className:e,...a})});_I.displayName="CardExpiryInput";var VI=Hs.forwardRef(({className:e,value:t="",onChange:o,cardType:r="unknown",size:a,...n},s)=>{let i=r==="amex"?4:3;return(0,An.jsx)(Qt,{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})});VI.displayName="CardCVCInput";var BI=Hs.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,An.jsx)(Qt,{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})});BI.displayName="CardZipInput";var pt=b(k());var Qo=b(k(),1);function eH(e){return Object.prototype.toString.call(e)==="[object Object]"}function HI(e){return eH(e)||Array.isArray(e)}function GI(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function Pp(e,t){let o=Object.keys(e),r=Object.keys(t);if(o.length!==r.length)return!1;let a=JSON.stringify(Object.keys(e.breakpoints||{})),n=JSON.stringify(Object.keys(t.breakpoints||{}));return a!==n?!1:o.every(s=>{let i=e[s],l=t[s];return typeof i=="function"?`${i}`==`${l}`:!HI(i)||!HI(l)?i===l:Pp(i,l)})}function UI(e){return e.concat().sort((t,o)=>t.name>o.name?1:-1).map(t=>t.options)}function zI(e,t){if(e.length!==t.length)return!1;let o=UI(e),r=UI(t);return o.every((a,n)=>{let s=r[n];return Pp(a,s)})}function ev(e){return typeof e=="number"}function Qh(e){return typeof e=="string"}function Lp(e){return typeof e=="boolean"}function qI(e){return Object.prototype.toString.call(e)==="[object Object]"}function at(e){return Math.abs(e)}function tv(e){return Math.sign(e)}function Dc(e,t){return at(e-t)}function tH(e,t){if(e===0||t===0||at(e)<=at(t))return 0;let o=Dc(at(e),at(t));return at(o/e)}function oH(e){return Math.round(e*100)/100}function Nc(e){return Oc(e).map(Number)}function Nr(e){return e[_c(e)]}function _c(e){return Math.max(0,e.length-1)}function ov(e,t){return t===_c(e)}function WI(e,t=0){return Array.from(Array(e),(o,r)=>t+r)}function Oc(e){return Object.keys(e)}function $I(e,t){return[e,t].reduce((o,r)=>(Oc(r).forEach(a=>{let n=o[a],s=r[a],i=qI(n)&&qI(s);o[a]=i?$I(n,s):s}),o),{})}function Jh(e,t){return typeof t.MouseEvent<"u"&&e instanceof t.MouseEvent}function rH(e,t){let o={start:r,center:a,end:n};function r(){return 0}function a(l){return n(l)/2}function n(l){return t-l}function s(l,u){return Qh(e)?o[e](l):e(t,l,u)}return{measure:s}}function Fc(){let e=[];function t(a,n,s,i={passive:!0}){let l;if("addEventListener"in a)a.addEventListener(n,s,i),l=()=>a.removeEventListener(n,s,i);else{let u=a;u.addListener(s),l=()=>u.removeListener(s)}return e.push(l),r}function o(){e=e.filter(a=>a())}let r={add:t,clear:o};return r}function aH(e,t,o,r){let a=Fc(),n=1e3/60,s=null,i=0,l=0;function u(){a.add(e,"visibilitychange",()=>{e.hidden&&g()})}function c(){p(),a.clear()}function d(h){if(!l)return;s||(s=h,o(),o());let v=h-s;for(s=h,i+=v;i>=n;)o(),i-=n;let x=i/n;r(x),l&&(l=t.requestAnimationFrame(d))}function f(){l||(l=t.requestAnimationFrame(d))}function p(){t.cancelAnimationFrame(l),s=null,i=0,l=0}function g(){s=null,i=0}return{init:u,destroy:c,start:f,stop:p,update:o,render:r}}function nH(e,t){let o=t==="rtl",r=e==="y",a=r?"y":"x",n=r?"x":"y",s=!r&&o?-1:1,i=c(),l=d();function u(g){let{height:m,width:h}=g;return r?m:h}function c(){return r?"top":o?"right":"left"}function d(){return r?"bottom":o?"left":"right"}function f(g){return g*s}return{scroll:a,cross:n,startEdge:i,endEdge:l,measureSize:u,direction:f}}function Us(e=0,t=0){let o=at(e-t);function r(u){return u<e}function a(u){return u>t}function n(u){return r(u)||a(u)}function s(u){return n(u)?r(u)?e:t:u}function i(u){return o?u-o*Math.ceil((u-t)/o):u}return{length:o,max:t,min:e,constrain:s,reachedAny:n,reachedMax:a,reachedMin:r,removeOffset:i}}function jI(e,t,o){let{constrain:r}=Us(0,e),a=e+1,n=s(t);function s(f){return o?at((a+f)%a):r(f)}function i(){return n}function l(f){return n=s(f),d}function u(f){return c().set(i()+f)}function c(){return jI(e,i(),o)}let d={get:i,set:l,add:u,clone:c};return d}function sH(e,t,o,r,a,n,s,i,l,u,c,d,f,p,g,m,h,v,x){let{cross:y,direction:R}=e,S=["INPUT","SELECT","TEXTAREA"],C={passive:!1},w=Fc(),I=Fc(),L=Us(50,225).constrain(p.measure(20)),T={mouse:300,touch:400},M={mouse:500,touch:600},F=g?43:25,V=!1,A=0,G=0,_=!1,O=!1,E=!1,D=!1;function te(K){if(!x)return;function Ie(ne){(Lp(x)||x(K,ne))&&se(ne)}let J=t;w.add(J,"dragstart",ne=>ne.preventDefault(),C).add(J,"touchmove",()=>{},C).add(J,"touchend",()=>{}).add(J,"touchstart",Ie).add(J,"mousedown",Ie).add(J,"touchcancel",oe).add(J,"contextmenu",oe).add(J,"click",fe,!0)}function ue(){w.clear(),I.clear()}function B(){let K=D?o:t;I.add(K,"touchmove",H,C).add(K,"touchend",oe).add(K,"mousemove",H,C).add(K,"mouseup",oe)}function $(K){let Ie=K.nodeName||"";return S.includes(Ie)}function Z(){return(g?M:T)[D?"mouse":"touch"]}function X(K,Ie){let J=d.add(tv(K)*-1),ne=c.byDistance(K,!g).distance;return g||at(K)<L?ne:h&&Ie?ne*.5:c.byIndex(J.get(),0).distance}function se(K){let Ie=Jh(K,r);D=Ie,E=g&&Ie&&!K.buttons&&V,V=Dc(a.get(),s.get())>=2,!(Ie&&K.button!==0)&&($(K.target)||(_=!0,n.pointerDown(K),u.useFriction(0).useDuration(0),a.set(s),B(),A=n.readPoint(K),G=n.readPoint(K,y),f.emit("pointerDown")))}function H(K){if(!Jh(K,r)&&K.touches.length>=2)return oe(K);let J=n.readPoint(K),ne=n.readPoint(K,y),Ge=Dc(J,A),$e=Dc(ne,G);if(!O&&!D&&(!K.cancelable||(O=Ge>$e,!O)))return oe(K);let ht=n.pointerMove(K);Ge>m&&(E=!0),u.useFriction(.3).useDuration(.75),i.start(),a.add(R(ht)),K.preventDefault()}function oe(K){let J=c.byDistance(0,!1).index!==d.get(),ne=n.pointerUp(K)*Z(),Ge=X(R(ne),J),$e=tH(ne,Ge),ht=F-10*$e,De=v+$e/50;O=!1,_=!1,I.clear(),u.useDuration(ht).useFriction(De),l.distance(Ge,!g),D=!1,f.emit("pointerUp")}function fe(K){E&&(K.stopPropagation(),K.preventDefault(),E=!1)}function me(){return _}return{init:te,destroy:ue,pointerDown:me}}function iH(e,t){let r,a;function n(d){return d.timeStamp}function s(d,f){let g=`client${(f||e.scroll)==="x"?"X":"Y"}`;return(Jh(d,t)?d:d.touches[0])[g]}function i(d){return r=d,a=d,s(d)}function l(d){let f=s(d)-s(a),p=n(d)-n(r)>170;return a=d,p&&(r=d),f}function u(d){if(!r||!a)return 0;let f=s(a)-s(r),p=n(d)-n(r),g=n(d)-n(a)>170,m=f/p;return p&&!g&&at(m)>.1?m:0}return{pointerDown:i,pointerMove:l,pointerUp:u,readPoint:s}}function lH(){function e(o){let{offsetTop:r,offsetLeft:a,offsetWidth:n,offsetHeight:s}=o;return{top:r,right:a+n,bottom:r+s,left:a,width:n,height:s}}return{measure:e}}function uH(e){function t(r){return e*(r/100)}return{measure:t}}function cH(e,t,o,r,a,n,s){let i=[e].concat(r),l,u,c=[],d=!1;function f(h){return a.measureSize(s.measure(h))}function p(h){if(!n)return;u=f(e),c=r.map(f);function v(x){for(let y of x){if(d)return;let R=y.target===e,S=r.indexOf(y.target),C=R?u:c[S],w=f(R?e:r[S]);if(at(w-C)>=.5){h.reInit(),t.emit("resize");break}}}l=new ResizeObserver(x=>{(Lp(n)||n(h,x))&&v(x)}),o.requestAnimationFrame(()=>{i.forEach(x=>l.observe(x))})}function g(){d=!0,l&&l.disconnect()}return{init:p,destroy:g}}function dH(e,t,o,r,a,n){let s=0,i=0,l=a,u=n,c=e.get(),d=0;function f(){let C=r.get()-e.get(),w=!l,I=0;return w?(s=0,o.set(r),e.set(r),I=C):(o.set(e),s+=C/l,s*=u,c+=s,e.add(s),I=c-d),i=tv(I),d=c,S}function p(){let C=r.get()-t.get();return at(C)<.001}function g(){return l}function m(){return i}function h(){return s}function v(){return y(a)}function x(){return R(n)}function y(C){return l=C,S}function R(C){return u=C,S}let S={direction:m,duration:g,velocity:h,seek:f,settled:p,useBaseFriction:x,useBaseDuration:v,useFriction:R,useDuration:y};return S}function fH(e,t,o,r,a){let n=a.measure(10),s=a.measure(50),i=Us(.1,.99),l=!1;function u(){return!(l||!e.reachedAny(o.get())||!e.reachedAny(t.get()))}function c(p){if(!u())return;let g=e.reachedMin(t.get())?"min":"max",m=at(e[g]-t.get()),h=o.get()-t.get(),v=i.constrain(m/s);o.subtract(h*v),!p&&at(h)<n&&(o.set(e.constrain(o.get())),r.useDuration(25).useBaseFriction())}function d(p){l=!p}return{shouldConstrain:u,constrain:c,toggleActive:d}}function pH(e,t,o,r,a){let n=Us(-t+e,0),s=d(),i=c(),l=f();function u(g,m){return Dc(g,m)<=1}function c(){let g=s[0],m=Nr(s),h=s.lastIndexOf(g),v=s.indexOf(m)+1;return Us(h,v)}function d(){return o.map((g,m)=>{let{min:h,max:v}=n,x=n.constrain(g),y=!m,R=ov(o,m);return y?v:R||u(h,x)?h:u(v,x)?v:x}).map(g=>parseFloat(g.toFixed(3)))}function f(){if(t<=e+a)return[n.max];if(r==="keepSnaps")return s;let{min:g,max:m}=i;return s.slice(g,m)}return{snapsContained:l,scrollContainLimit:i}}function mH(e,t,o){let r=t[0],a=o?r-e:Nr(t);return{limit:Us(a,r)}}function gH(e,t,o,r){let n=t.min+.1,s=t.max+.1,{reachedMin:i,reachedMax:l}=Us(n,s);function u(f){return f===1?l(o.get()):f===-1?i(o.get()):!1}function c(f){if(!u(f))return;let p=e*(f*-1);r.forEach(g=>g.add(p))}return{loop:c}}function hH(e){let{max:t,length:o}=e;function r(n){let s=n-t;return o?s/-o:0}return{get:r}}function vH(e,t,o,r,a){let{startEdge:n,endEdge:s}=e,{groupSlides:i}=a,l=d().map(t.measure),u=f(),c=p();function d(){return i(r).map(m=>Nr(m)[s]-m[0][n]).map(at)}function f(){return r.map(m=>o[n]-m[n]).map(m=>-at(m))}function p(){return i(u).map(m=>m[0]).map((m,h)=>m+l[h])}return{snaps:u,snapsAligned:c}}function xH(e,t,o,r,a,n){let{groupSlides:s}=a,{min:i,max:l}=r,u=c();function c(){let f=s(n),p=!e||t==="keepSnaps";return o.length===1?[n]:p?f:f.slice(i,l).map((g,m,h)=>{let v=!m,x=ov(h,m);if(v){let y=Nr(h[0])+1;return WI(y)}if(x){let y=_c(n)-Nr(h)[0]+1;return WI(y,Nr(h)[0])}return g})}return{slideRegistry:u}}function yH(e,t,o,r,a){let{reachedAny:n,removeOffset:s,constrain:i}=r;function l(g){return g.concat().sort((m,h)=>at(m)-at(h))[0]}function u(g){let m=e?s(g):i(g),h=t.map((x,y)=>({diff:c(x-m,0),index:y})).sort((x,y)=>at(x.diff)-at(y.diff)),{index:v}=h[0];return{index:v,distance:m}}function c(g,m){let h=[g,g+o,g-o];if(!e)return g;if(!m)return l(h);let v=h.filter(x=>tv(x)===m);return v.length?l(v):Nr(h)-o}function d(g,m){let h=t[g]-a.get(),v=c(h,m);return{index:g,distance:v}}function f(g,m){let h=a.get()+g,{index:v,distance:x}=u(h),y=!e&&n(h);if(!m||y)return{index:v,distance:g};let R=t[v]-x,S=g+c(R,0);return{index:v,distance:S}}return{byDistance:f,byIndex:d,shortcut:c}}function bH(e,t,o,r,a,n,s){function i(d){let f=d.distance,p=d.index!==t.get();n.add(f),f&&(r.duration()?e.start():(e.update(),e.render(1),e.update())),p&&(o.set(t.get()),t.set(d.index),s.emit("select"))}function l(d,f){let p=a.byDistance(d,f);i(p)}function u(d,f){let p=t.clone().set(d),g=a.byIndex(p.get(),f);i(g)}return{distance:l,index:u}}function CH(e,t,o,r,a,n,s,i){let l={passive:!0,capture:!0},u=0;function c(p){if(!i)return;function g(m){if(new Date().getTime()-u>10)return;s.emit("slideFocusStart"),e.scrollLeft=0;let x=o.findIndex(y=>y.includes(m));ev(x)&&(a.useDuration(0),r.index(x,0),s.emit("slideFocus"))}n.add(document,"keydown",d,!1),t.forEach((m,h)=>{n.add(m,"focus",v=>{(Lp(i)||i(p,v))&&g(h)},l)})}function d(p){p.code==="Tab"&&(u=new Date().getTime())}return{init:c}}function Ac(e){let t=e;function o(){return t}function r(l){t=s(l)}function a(l){t+=s(l)}function n(l){t-=s(l)}function s(l){return ev(l)?l:l.get()}return{get:o,set:r,add:a,subtract:n}}function KI(e,t){let o=e.scroll==="x"?s:i,r=t.style,a=null,n=!1;function s(f){return`translate3d(${f}px,0px,0px)`}function i(f){return`translate3d(0px,${f}px,0px)`}function l(f){if(n)return;let p=oH(e.direction(f));p!==a&&(r.transform=o(p),a=p)}function u(f){n=!f}function c(){n||(r.transform="",t.getAttribute("style")||t.removeAttribute("style"))}return{clear:c,to:l,toggleActive:u}}function wH(e,t,o,r,a,n,s,i,l){let c=Nc(a),d=Nc(a).reverse(),f=v().concat(x());function p(w,I){return w.reduce((L,T)=>L-a[T],I)}function g(w,I){return w.reduce((L,T)=>p(L,I)>0?L.concat([T]):L,[])}function m(w){return n.map((I,L)=>({start:I-r[L]+.5+w,end:I+t-.5+w}))}function h(w,I,L){let T=m(I);return w.map(M=>{let F=L?0:-o,V=L?o:0,A=L?"end":"start",G=T[M][A];return{index:M,loopPoint:G,slideLocation:Ac(-1),translate:KI(e,l[M]),target:()=>i.get()>G?F:V}})}function v(){let w=s[0],I=g(d,w);return h(I,o,!1)}function x(){let w=t-s[0]-1,I=g(c,w);return h(I,-o,!0)}function y(){return f.every(({index:w})=>{let I=c.filter(L=>L!==w);return p(I,t)<=.1})}function R(){f.forEach(w=>{let{target:I,translate:L,slideLocation:T}=w,M=I();M!==T.get()&&(L.to(M),T.set(M))})}function S(){f.forEach(w=>w.translate.clear())}return{canLoop:y,clear:S,loop:R,loopPoints:f}}function SH(e,t,o){let r,a=!1;function n(l){if(!o)return;function u(c){for(let d of c)if(d.type==="childList"){l.reInit(),t.emit("slidesChanged");break}}r=new MutationObserver(c=>{a||(Lp(o)||o(l,c))&&u(c)}),r.observe(e,{childList:!0})}function s(){r&&r.disconnect(),a=!0}return{init:n,destroy:s}}function RH(e,t,o,r){let a={},n=null,s=null,i,l=!1;function u(){i=new IntersectionObserver(g=>{l||(g.forEach(m=>{let h=t.indexOf(m.target);a[h]=m}),n=null,s=null,o.emit("slidesInView"))},{root:e.parentElement,threshold:r}),t.forEach(g=>i.observe(g))}function c(){i&&i.disconnect(),l=!0}function d(g){return Oc(a).reduce((m,h)=>{let v=parseInt(h),{isIntersecting:x}=a[v];return(g&&x||!g&&!x)&&m.push(v),m},[])}function f(g=!0){if(g&&n)return n;if(!g&&s)return s;let m=d(g);return g&&(n=m),g||(s=m),m}return{init:u,destroy:c,get:f}}function IH(e,t,o,r,a,n){let{measureSize:s,startEdge:i,endEdge:l}=e,u=o[0]&&a,c=g(),d=m(),f=o.map(s),p=h();function g(){if(!u)return 0;let x=o[0];return at(t[i]-x[i])}function m(){if(!u)return 0;let x=n.getComputedStyle(Nr(r));return parseFloat(x.getPropertyValue(`margin-${l}`))}function h(){return o.map((x,y,R)=>{let S=!y,C=ov(R,y);return S?f[y]+c:C?f[y]+d:R[y+1][i]-x[i]}).map(at)}return{slideSizes:f,slideSizesWithGaps:p,startGap:c,endGap:d}}function PH(e,t,o,r,a,n,s,i,l){let{startEdge:u,endEdge:c,direction:d}=e,f=ev(o);function p(v,x){return Nc(v).filter(y=>y%x===0).map(y=>v.slice(y,y+x))}function g(v){return v.length?Nc(v).reduce((x,y,R)=>{let S=Nr(x)||0,C=S===0,w=y===_c(v),I=a[u]-n[S][u],L=a[u]-n[y][c],T=!r&&C?d(s):0,M=!r&&w?d(i):0,F=at(L-M-(I+T));return R&&F>t+l&&x.push(y),w&&x.push(v.length),x},[]).map((x,y,R)=>{let S=Math.max(R[y-1]||0);return v.slice(S,x)}):[]}function m(v){return f?p(v,o):g(v)}return{groupSlides:m}}function LH(e,t,o,r,a,n,s){let{align:i,axis:l,direction:u,startIndex:c,loop:d,duration:f,dragFree:p,dragThreshold:g,inViewThreshold:m,slidesToScroll:h,skipSnaps:v,containScroll:x,watchResize:y,watchSlides:R,watchDrag:S,watchFocus:C}=n,w=2,I=lH(),L=I.measure(t),T=o.map(I.measure),M=nH(l,u),F=M.measureSize(L),V=uH(F),A=rH(i,F),G=!d&&!!x,_=d||!!x,{slideSizes:O,slideSizesWithGaps:E,startGap:D,endGap:te}=IH(M,L,T,o,_,a),ue=PH(M,F,h,d,L,T,D,te,w),{snaps:B,snapsAligned:$}=vH(M,A,L,T,ue),Z=-Nr(B)+Nr(E),{snapsContained:X,scrollContainLimit:se}=pH(F,Z,$,x,w),H=G?X:$,{limit:oe}=mH(Z,H,d),fe=jI(_c(H),c,d),me=fe.clone(),pe=Nc(o),K=({dragHandler:ln,scrollBody:eu,scrollBounds:tu,options:{loop:$o}})=>{$o||tu.constrain(ln.pointerDown()),eu.seek()},Ie=({scrollBody:ln,translate:eu,location:tu,offsetLocation:$o,previousLocation:ou,scrollLooper:pg,slideLooper:ZN,dragHandler:QN,animation:JN,eventHandler:Vb,scrollBounds:eO,options:{loop:Bb}},Hb)=>{let Ub=ln.settled(),tO=!eO.shouldConstrain(),Gb=Bb?Ub:Ub&&tO,zb=Gb&&!QN.pointerDown();zb&&JN.stop();let oO=tu.get()*Hb+ou.get()*(1-Hb);$o.set(oO),Bb&&(pg.loop(ln.direction()),ZN.loop()),eu.to($o.get()),zb&&Vb.emit("settle"),Gb||Vb.emit("scroll")},J=aH(r,a,()=>K(fi),ln=>Ie(fi,ln)),ne=.68,Ge=H[fe.get()],$e=Ac(Ge),ht=Ac(Ge),De=Ac(Ge),dt=Ac(Ge),Zr=dH($e,De,ht,dt,f,ne),no=yH(d,H,Z,oe,dt),yr=bH(J,fe,me,Zr,no,dt,s),Wo=hH(oe),br=Fc(),Qr=RH(t,o,s,m),{slideRegistry:Jr}=xH(G,x,H,se,ue,pe),Ed=CH(e,o,Jr,yr,Zr,br,s,C),fi={ownerDocument:r,ownerWindow:a,eventHandler:s,containerRect:L,slideRects:T,animation:J,axis:M,dragHandler:sH(M,e,r,a,dt,iH(M,a),$e,J,yr,Zr,no,fe,s,V,p,g,v,ne,S),eventStore:br,percentOfView:V,index:fe,indexPrevious:me,limit:oe,location:$e,offsetLocation:De,previousLocation:ht,options:n,resizeHandler:cH(t,s,a,o,M,y,I),scrollBody:Zr,scrollBounds:fH(oe,De,dt,Zr,V),scrollLooper:gH(Z,oe,De,[$e,De,ht,dt]),scrollProgress:Wo,scrollSnapList:H.map(Wo.get),scrollSnaps:H,scrollTarget:no,scrollTo:yr,slideLooper:wH(M,F,Z,O,E,B,H,De,o),slideFocus:Ed,slidesHandler:SH(t,s,R),slidesInView:Qr,slideIndexes:pe,slideRegistry:Jr,slidesToScroll:ue,target:dt,translate:KI(M,t)};return fi}function TH(){let e={},t;function o(u){t=u}function r(u){return e[u]||[]}function a(u){return r(u).forEach(c=>c(t,u)),l}function n(u,c){return e[u]=r(u).concat([c]),l}function s(u,c){return e[u]=r(u).filter(d=>d!==c),l}function i(){e={}}let l={init:o,emit:a,off:s,on:n,clear:i};return l}var MH={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0};function kH(e){function t(n,s){return $I(n,s||{})}function o(n){let s=n.breakpoints||{},i=Oc(s).filter(l=>e.matchMedia(l).matches).map(l=>s[l]).reduce((l,u)=>t(l,u),{});return t(n,i)}function r(n){return n.map(s=>Oc(s.breakpoints||{})).reduce((s,i)=>s.concat(i),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:o,optionsMediaQueries:r}}function EH(e){let t=[];function o(n,s){return t=s.filter(({options:i})=>e.optionsAtMedia(i).active!==!1),t.forEach(i=>i.init(n,e)),s.reduce((i,l)=>Object.assign(i,{[l.name]:l}),{})}function r(){t=t.filter(n=>n.destroy())}return{init:o,destroy:r}}function Vc(e,t,o){let r=e.ownerDocument,a=r.defaultView,n=kH(a),s=EH(n),i=Fc(),l=TH(),{mergeOptions:u,optionsAtMedia:c,optionsMediaQueries:d}=n,{on:f,off:p,emit:g}=l,m=M,h=!1,v,x=u(MH,Vc.globalOptions),y=u(x),R=[],S,C,w;function I(){let{container:pe,slides:K}=y;C=(Qh(pe)?e.querySelector(pe):pe)||e.children[0];let J=Qh(K)?C.querySelectorAll(K):K;w=[].slice.call(J||C.children)}function L(pe){let K=LH(e,C,w,r,a,pe,l);if(pe.loop&&!K.slideLooper.canLoop()){let Ie=Object.assign({},pe,{loop:!1});return L(Ie)}return K}function T(pe,K){h||(x=u(x,pe),y=c(x),R=K||R,I(),v=L(y),d([x,...R.map(({options:Ie})=>Ie)]).forEach(Ie=>i.add(Ie,"change",M)),y.active&&(v.translate.to(v.location.get()),v.animation.init(),v.slidesInView.init(),v.slideFocus.init(me),v.eventHandler.init(me),v.resizeHandler.init(me),v.slidesHandler.init(me),v.options.loop&&v.slideLooper.loop(),C.offsetParent&&w.length&&v.dragHandler.init(me),S=s.init(me,R)))}function M(pe,K){let Ie=ue();F(),T(u({startIndex:Ie},pe),K),l.emit("reInit")}function F(){v.dragHandler.destroy(),v.eventStore.clear(),v.translate.clear(),v.slideLooper.clear(),v.resizeHandler.destroy(),v.slidesHandler.destroy(),v.slidesInView.destroy(),v.animation.destroy(),s.destroy(),i.clear()}function V(){h||(h=!0,i.clear(),F(),l.emit("destroy"),l.clear())}function A(pe,K,Ie){!y.active||h||(v.scrollBody.useBaseFriction().useDuration(K===!0?0:y.duration),v.scrollTo.index(pe,Ie||0))}function G(pe){let K=v.index.add(1).get();A(K,pe,-1)}function _(pe){let K=v.index.add(-1).get();A(K,pe,1)}function O(){return v.index.add(1).get()!==ue()}function E(){return v.index.add(-1).get()!==ue()}function D(){return v.scrollSnapList}function te(){return v.scrollProgress.get(v.offsetLocation.get())}function ue(){return v.index.get()}function B(){return v.indexPrevious.get()}function $(){return v.slidesInView.get()}function Z(){return v.slidesInView.get(!1)}function X(){return S}function se(){return v}function H(){return e}function oe(){return C}function fe(){return w}let me={canScrollNext:O,canScrollPrev:E,containerNode:oe,internalEngine:se,destroy:V,off:p,on:f,emit:g,plugins:X,previousScrollSnap:B,reInit:m,rootNode:H,scrollNext:G,scrollPrev:_,scrollProgress:te,scrollSnapList:D,scrollTo:A,selectedScrollSnap:ue,slideNodes:fe,slidesInView:$,slidesNotInView:Z};return T(t,o),setTimeout(()=>l.emit("init"),0),me}Vc.globalOptions=void 0;function Tp(e={},t=[]){let o=(0,Qo.useRef)(e),r=(0,Qo.useRef)(t),[a,n]=(0,Qo.useState)(),[s,i]=(0,Qo.useState)(),l=(0,Qo.useCallback)(()=>{a&&a.reInit(o.current,r.current)},[a]);return(0,Qo.useEffect)(()=>{Pp(o.current,e)||(o.current=e,l())},[e,l]),(0,Qo.useEffect)(()=>{zI(r.current,t)||(r.current=t,l())},[t,l]),(0,Qo.useEffect)(()=>{if(GI()&&s){Vc.globalOptions=Tp.globalOptions;let u=Vc(s,o.current,r.current);return n(u),()=>u.destroy()}else n(void 0)},[s,n]),[i,a]}Tp.globalOptions=void 0;var Fo=b(N()),XI=pt.createContext(null);function Bc(){let e=pt.useContext(XI);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}var YI=pt.forwardRef(({orientation:e="horizontal",opts:t,setApi:o,plugins:r,className:a,children:n,...s},i)=>{let l=e||(t?.axis==="y"?"vertical":"horizontal"),[u,c]=Tp({...t,axis:l==="horizontal"?"x":"y"},r),[d,f]=pt.useState(!1),[p,g]=pt.useState(!1),m=pt.useCallback(y=>{y&&(f(y.canScrollPrev()),g(y.canScrollNext()))},[]),h=pt.useCallback(()=>{c?.scrollPrev()},[c]),v=pt.useCallback(()=>{c?.scrollNext()},[c]),x=pt.useCallback(y=>{let R=l==="horizontal"?"ArrowLeft":"ArrowUp",S=l==="horizontal"?"ArrowRight":"ArrowDown";y.key===R?(y.preventDefault(),h()):y.key===S&&(y.preventDefault(),v())},[l,h,v]);return pt.useEffect(()=>{!c||!o||o(c)},[c,o]),pt.useEffect(()=>{if(c)return m(c),c.on("reInit",m),c.on("select",m),()=>{c.off("reInit",m),c.off("select",m)}},[c,m]),(0,Fo.jsx)(XI.Provider,{value:{carouselRef:u,api:c,opts:t,scrollPrev:h,scrollNext:v,canScrollPrev:d,canScrollNext:p,orientation:l},children:(0,Fo.jsx)("div",{ref:i,onKeyDownCapture:x,className:P("moonui-theme","relative",a),role:"region","aria-roledescription":"carousel",...s,children:n})})});YI.displayName="Carousel";var ZI=Y("flex",{variants:{orientation:{horizontal:"-ml-4",vertical:"-mt-4 flex-col"}},defaultVariants:{orientation:"horizontal"}}),QI=pt.forwardRef(({className:e,...t},o)=>{let{carouselRef:r,orientation:a}=Bc();return(0,Fo.jsx)("div",{ref:r,className:"overflow-hidden",children:(0,Fo.jsx)("div",{ref:o,className:P(ZI({orientation:a}),e),...t})})});QI.displayName="CarouselContent";var JI=Y("min-w-0 shrink-0 grow-0 basis-full",{variants:{orientation:{horizontal:"pl-4",vertical:"pt-4"}},defaultVariants:{orientation:"horizontal"}}),eP=pt.forwardRef(({className:e,...t},o)=>{let{orientation:r}=Bc();return(0,Fo.jsx)("div",{ref:o,role:"group","aria-roledescription":"slide",className:P(JI({orientation:r}),e),...t})});eP.displayName="CarouselItem";var tP=pt.forwardRef(({className:e,variant:t="outline",size:o="icon-sm",...r},a)=>{let{orientation:n,scrollPrev:s,canScrollPrev:i}=Bc();return(0,Fo.jsxs)(Ae,{ref:a,variant:t,size:o,rounded:"full",className:P("absolute",n==="horizontal"?"-left-12 top-1/2 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",e),disabled:!i,onClick:s,...r,children:[(0,Fo.jsx)(cu,{className:"h-4 w-4","aria-hidden":"true"}),(0,Fo.jsx)("span",{className:"sr-only",children:"Previous slide"})]})});tP.displayName="CarouselPrevious";var oP=pt.forwardRef(({className:e,variant:t="outline",size:o="icon-sm",...r},a)=>{let{orientation:n,scrollNext:s,canScrollNext:i}=Bc();return(0,Fo.jsxs)(Ae,{ref:a,variant:t,size:o,rounded:"full",className:P("absolute",n==="horizontal"?"-right-12 top-1/2 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",e),disabled:!i,onClick:s,...r,children:[(0,Fo.jsx)(du,{className:"h-4 w-4","aria-hidden":"true"}),(0,Fo.jsx)("span",{className:"sr-only",children:"Next slide"})]})});oP.displayName="CarouselNext";var Gs=b(k());var fo=b(k(),1);var Mp=b(k(),1);function pl(e){let t=Mp.useRef({value:e,previous:e});return Mp.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var rP=b(k(),1);function ml(e){let[t,o]=rP.useState(void 0);return ke(()=>{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 _o=b(N(),1),kp="Checkbox",[AH,Wpe]=Ne(kp),[DH,rv]=AH(kp);function NH(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,p]=Xe({prop:o,defaultProp:a??!1,onChange:l,caller:kp}),[g,m]=fo.useState(null),[h,v]=fo.useState(null),x=fo.useRef(!1),y=g?!!s||!!g.closest("form"):!0,R={checked:f,disabled:n,setChecked:p,control:g,setControl:m,name:i,form:s,value:c,hasConsumerStoppedPropagationRef:x,required:u,defaultChecked:Dn(a)?!1:a,isFormControl:y,bubbleInput:h,setBubbleInput:v};return(0,_o.jsx)(DH,{scope:t,...R,children:OH(d)?d(R):r})}var aP="CheckboxTrigger",nP=fo.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:p,bubbleInput:g}=rv(aP,e),m=ie(a,c),h=fo.useRef(l);return fo.useEffect(()=>{let v=n?.form;if(v){let x=()=>d(h.current);return v.addEventListener("reset",x),()=>v.removeEventListener("reset",x)}},[n,d]),(0,_o.jsx)(j.button,{type:"button",role:"checkbox","aria-checked":Dn(l)?"mixed":l,"aria-required":u,"data-state":uP(l),"data-disabled":i?"":void 0,disabled:i,value:s,...r,ref:m,onKeyDown:z(t,v=>{v.key==="Enter"&&v.preventDefault()}),onClick:z(o,v=>{d(x=>Dn(x)?!0:!x),g&&p&&(f.current=v.isPropagationStopped(),f.current||v.stopPropagation())})})});nP.displayName=aP;var Ep=fo.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,_o.jsx)(NH,{__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,_o.jsxs)(_o.Fragment,{children:[(0,_o.jsx)(nP,{...d,ref:t,__scopeCheckbox:o}),f&&(0,_o.jsx)(lP,{__scopeCheckbox:o})]})})});Ep.displayName=kp;var sP="CheckboxIndicator",av=fo.forwardRef((e,t)=>{let{__scopeCheckbox:o,forceMount:r,...a}=e,n=rv(sP,o);return(0,_o.jsx)(Ye,{present:r||Dn(n.checked)||n.checked===!0,children:(0,_o.jsx)(j.span,{"data-state":uP(n.checked),"data-disabled":n.disabled?"":void 0,...a,ref:t,style:{pointerEvents:"none",...e.style}})})});av.displayName=sP;var iP="CheckboxBubbleInput",lP=fo.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:p}=rv(iP,e),g=ie(o,p),m=pl(n),h=ml(r);fo.useEffect(()=>{let x=f;if(!x)return;let y=window.HTMLInputElement.prototype,S=Object.getOwnPropertyDescriptor(y,"checked").set,C=!a.current;if(m!==n&&S){let w=new Event("click",{bubbles:C});x.indeterminate=Dn(n),S.call(x,Dn(n)?!1:n),x.dispatchEvent(w)}},[f,m,n,a]);let v=fo.useRef(Dn(n)?!1:n);return(0,_o.jsx)(j.input,{type:"checkbox","aria-hidden":!0,defaultChecked:s??v.current,required:i,disabled:l,name:u,value:c,form:d,...t,tabIndex:-1,ref:g,style:{...t.style,...h,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});lP.displayName=iP;function OH(e){return typeof e=="function"}function Dn(e){return e==="indeterminate"}function uP(e){return Dn(e)?"indeterminate":e?"checked":"unchecked"}var Jo=b(N()),_H=Y("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 data-[state=indeterminate]:text-primary-foreground",{variants:{variant:{default:"border-border bg-background data-[state=checked]:bg-primary data-[state=checked]:border-primary data-[state=indeterminate]:bg-primary data-[state=indeterminate]:border-primary",outline:"border-border bg-transparent data-[state=checked]:bg-primary data-[state=checked]:border-primary data-[state=indeterminate]:bg-primary data-[state=indeterminate]:border-primary",muted:"border-border bg-accent data-[state=checked]:bg-primary data-[state=checked]:border-primary data-[state=indeterminate]:bg-primary data-[state=indeterminate]:border-primary",ghost:"border-transparent bg-transparent hover:bg-accent data-[state=checked]:bg-primary data-[state=checked]:border-primary data-[state=indeterminate]:bg-primary data-[state=indeterminate]: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"}}),nv=Gs.forwardRef(({className:e,variant:t,size:o,radius:r,animation:a,indeterminate:n=!1,icon:s,checked:i,...l},u)=>(0,Jo.jsx)(Ep,{ref:u,checked:n?"indeterminate":i,className:P("moonui-theme",_H({variant:t,size:o,radius:r,animation:a}),e),...l,children:(0,Jo.jsx)(av,{className:P("flex items-center justify-center text-current",a==="bounce"&&"data-[state=checked]:animate-bounce"),children:n?(0,Jo.jsx)(Lu,{className:"h-[65%] w-[65%]"}):s||(0,Jo.jsx)($t,{className:"h-[65%] w-[65%]"})})}));nv.displayName=Ep.displayName;var cP=Gs.forwardRef(({className:e,orientation:t="vertical",spacing:o="1rem",children:r,...a},n)=>(0,Jo.jsx)("div",{ref:n,className:P("flex",t==="vertical"?"flex-col":"flex-row flex-wrap",e),style:{gap:o},role:"group",...a,children:r}));cP.displayName="CheckboxGroup";var Ap=Gs.forwardRef(({className:e,htmlFor:t,children:o,position:r="end",disabled:a=!1,...n},s)=>(0,Jo.jsx)("label",{ref:s,htmlFor:t,className:P("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}));Ap.displayName="CheckboxLabel";var dP=Gs.forwardRef(({id:e,label:t,labelPosition:o="end",labelClassName:r,...a},n)=>{let s=Gs.useId(),i=e||s;return(0,Jo.jsxs)("div",{className:"flex items-center",children:[o==="start"&&(0,Jo.jsx)(Ap,{htmlFor:i,position:"start",disabled:a.disabled,className:r,children:t}),(0,Jo.jsx)(nv,{ref:n,id:i,...a}),o==="end"&&(0,Jo.jsx)(Ap,{htmlFor:i,position:"end",disabled:a.disabled,className:r,children:t})]})});dP.displayName="CheckboxWithLabel";var sv=b(k());var zs=b(N()),VH=Bd,fP=Y("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"}}),pP=sv.forwardRef(({className:e,children:t,variant:o,size:r,asChild:a,...n},s)=>a?(0,zs.jsx)(gi,{ref:s,className:P("moonui-theme",fP({variant:o,size:r}),e),asChild:a,...n,children:t}):(0,zs.jsxs)(gi,{ref:s,className:P("moonui-theme",fP({variant:o,size:r}),e),...n,children:[t,(0,zs.jsx)(oa,{className:"h-4 w-4 shrink-0 ml-auto transition-transform duration-200 [&[data-state=open]]:rotate-180"})]}));pP.displayName=gi.displayName;var BH=Y("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"}}),mP=sv.forwardRef(({className:e,children:t,variant:o,size:r,...a},n)=>(0,zs.jsx)(au,{ref:n,className:P("moonui-theme",BH({variant:o,size:r}),e),...a,children:(0,zs.jsx)("div",{className:"p-4",children:t})}));mP.displayName=au.displayName;var ar=b(k());var Ua=b(k());var Vo=b(N()),HH=Y("group relative flex items-center w-full transition-colors",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),UH=Y(["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}}),Qt=Ua.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:p=!1,label:g,floatingLabel:m=!1,floatingLabelClassName:h,value:v,defaultValue:x,onChange:y,onFocus:R,onBlur:S,placeholder:C,...w},I)=>{let L=Ua.useId(),T=w.id||L,[M,F]=Ua.useState(!1),[V,A]=Ua.useState(v||x||""),_=M||V!==""&&V!==null&&V!==void 0,O=B=>{F(!0),R?.(B)},E=B=>{F(!1),S?.(B)},D=B=>{A(B.target.value),y?.(B)};Ua.useEffect(()=>{v!==void 0&&A(v)},[v]);let te=p||i||l,ue=i?"error":l?"success":"normal";return(0,Vo.jsxs)("div",{className:"space-y-1.5 w-full",children:[(0,Vo.jsxs)("div",{className:P("moonui-theme",HH({size:a}),t),children:[m&&g&&(0,Vo.jsx)("label",{htmlFor:w.id,className:P("absolute transition-all duration-200 pointer-events-none",c||u?"left-10":"left-3","text-gray-500 dark:text-gray-400",_?"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",M&&"text-primary dark:text-primary",!!i&&"text-error",s&&"opacity-50",h),children:g}),c&&(0,Vo.jsx)("div",{className:"absolute left-3 text-gray-500 flex items-center justify-center pointer-events-none",children:u?(0,Vo.jsx)(Rt,{className:"h-4 w-4 animate-spin"}):c}),(0,Vo.jsx)("input",{className:P(UH({variant:r,size:a,isError:!!i||n,isSuccess:!!l,isDisabled:s||u,hasLeftIcon:!!c||u,hasRightIcon:!!d,hasRightButton:!!f}),e),ref:I,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?`${T}-error`:l?`${T}-success`:void 0,value:v,defaultValue:x,onChange:D,onFocus:O,onBlur:E,placeholder:m?_?C:"":C,...w}),d&&!u&&(0,Vo.jsx)("div",{className:"absolute right-3 text-gray-500 flex items-center justify-center pointer-events-none",children:d}),f&&(0,Vo.jsx)("div",{className:"absolute right-3",children:f}),u&&!c&&(0,Vo.jsx)("div",{className:"absolute left-3 text-gray-500 flex items-center justify-center pointer-events-none",children:(0,Vo.jsx)(Rt,{className:"h-4 w-4 animate-spin","aria-hidden":"true"})})]}),te&&(0,Vo.jsx)("p",{className:P("text-xs transition-all",ue==="error"&&"text-error",ue==="success"&&"text-success",ue==="normal"&&"text-muted-foreground",o),id:i?`${T}-error`:l?`${T}-success`:void 0,children:i||l||""})]})});Qt.displayName="Input";var xP=b(k());var gP=b(k(),1);var hP=b(N(),1),GH="Label",vP=gP.forwardRef((e,t)=>(0,hP.jsx)(j.label,{...e,ref:t,onMouseDown:o=>{o.target.closest("button, input, select, textarea")||(e.onMouseDown?.(o),!o.defaultPrevented&&o.detail>1&&o.preventDefault())}}));vP.displayName=GH;var iv=vP;var yP=b(N()),qH=Y("text-sm font-medium leading-none text-foreground peer-disabled:cursor-not-allowed peer-disabled:opacity-70 dark:peer-disabled:opacity-60 transition-colors duration-200"),Lo=xP.forwardRef(({className:e,...t},o)=>(0,yP.jsx)(iv,{ref:o,className:P(qH(),e),...t}));Lo.displayName=iv.displayName;var MT=b(k());var et=b(k(),1);var nt=b(k(),1);var bP=b(k(),1);function CP(e,t=globalThis?.document){let o=Ee(e);bP.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 uv=b(N(),1),WH="DismissableLayer",lv="dismissableLayer.update",$H="dismissableLayer.pointerDownOutside",jH="dismissableLayer.focusOutside",wP,RP=nt.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),da=nt.forwardRef((e,t)=>{let{disableOutsidePointerEvents:o=!1,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:n,onInteractOutside:s,onDismiss:i,...l}=e,u=nt.useContext(RP),[c,d]=nt.useState(null),f=c?.ownerDocument??globalThis?.document,[,p]=nt.useState({}),g=ie(t,w=>d(w)),m=Array.from(u.layers),[h]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=m.indexOf(h),x=c?m.indexOf(c):-1,y=u.layersWithOutsidePointerEventsDisabled.size>0,R=x>=v,S=XH(w=>{let I=w.target,L=[...u.branches].some(T=>T.contains(I));!R||L||(a?.(w),s?.(w),w.defaultPrevented||i?.())},f),C=YH(w=>{let I=w.target;[...u.branches].some(T=>T.contains(I))||(n?.(w),s?.(w),w.defaultPrevented||i?.())},f);return CP(w=>{x===u.layers.size-1&&(r?.(w),!w.defaultPrevented&&i&&(w.preventDefault(),i()))},f),nt.useEffect(()=>{if(c)return o&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(wP=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(c)),u.layers.add(c),SP(),()=>{o&&u.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=wP)}},[c,f,o,u]),nt.useEffect(()=>()=>{c&&(u.layers.delete(c),u.layersWithOutsidePointerEventsDisabled.delete(c),SP())},[c,u]),nt.useEffect(()=>{let w=()=>p({});return document.addEventListener(lv,w),()=>document.removeEventListener(lv,w)},[]),(0,uv.jsx)(j.div,{...l,ref:g,style:{pointerEvents:y?R?"auto":"none":void 0,...e.style},onFocusCapture:z(e.onFocusCapture,C.onFocusCapture),onBlurCapture:z(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:z(e.onPointerDownCapture,S.onPointerDownCapture)})});da.displayName=WH;var KH="DismissableLayerBranch",IP=nt.forwardRef((e,t)=>{let o=nt.useContext(RP),r=nt.useRef(null),a=ie(t,r);return nt.useEffect(()=>{let n=r.current;if(n)return o.branches.add(n),()=>{o.branches.delete(n)}},[o.branches]),(0,uv.jsx)(j.div,{...e,ref:a})});IP.displayName=KH;function XH(e,t=globalThis?.document){let o=Ee(e),r=nt.useRef(!1),a=nt.useRef(()=>{});return nt.useEffect(()=>{let n=i=>{if(i.target&&!r.current){let u=function(){PP($H,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 YH(e,t=globalThis?.document){let o=Ee(e),r=nt.useRef(!1);return nt.useEffect(()=>{let a=n=>{n.target&&!r.current&&PP(jH,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 SP(){let e=new CustomEvent(lv);document.dispatchEvent(e)}function PP(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?mi(a,n):a.dispatchEvent(n)}var LP=da,TP=IP;var kP=b(k(),1),cv=0;function gl(){kP.useEffect(()=>{let e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??MP()),document.body.insertAdjacentElement("beforeend",e[1]??MP()),cv++,()=>{cv===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),cv--}},[])}function MP(){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 er=b(k(),1);var OP=b(N(),1),dv="focusScope.autoFocusOnMount",fv="focusScope.autoFocusOnUnmount",EP={bubbles:!1,cancelable:!0},QH="FocusScope",qs=er.forwardRef((e,t)=>{let{loop:o=!1,trapped:r=!1,onMountAutoFocus:a,onUnmountAutoFocus:n,...s}=e,[i,l]=er.useState(null),u=Ee(a),c=Ee(n),d=er.useRef(null),f=ie(t,m=>l(m)),p=er.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;er.useEffect(()=>{if(r){let x=function(C){if(p.paused||!i)return;let w=C.target;i.contains(w)?d.current=w:Nn(d.current,{select:!0})},y=function(C){if(p.paused||!i)return;let w=C.relatedTarget;w!==null&&(i.contains(w)||Nn(d.current,{select:!0}))},R=function(C){if(document.activeElement===document.body)for(let I of C)I.removedNodes.length>0&&Nn(i)};var m=x,h=y,v=R;document.addEventListener("focusin",x),document.addEventListener("focusout",y);let S=new MutationObserver(R);return i&&S.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",x),document.removeEventListener("focusout",y),S.disconnect()}}},[r,i,p.paused]),er.useEffect(()=>{if(i){DP.add(p);let m=document.activeElement;if(!i.contains(m)){let v=new CustomEvent(dv,EP);i.addEventListener(dv,u),i.dispatchEvent(v),v.defaultPrevented||(JH(aU(FP(i)),{select:!0}),document.activeElement===m&&Nn(i))}return()=>{i.removeEventListener(dv,u),setTimeout(()=>{let v=new CustomEvent(fv,EP);i.addEventListener(fv,c),i.dispatchEvent(v),v.defaultPrevented||Nn(m??document.body,{select:!0}),i.removeEventListener(fv,c),DP.remove(p)},0)}}},[i,u,c,p]);let g=er.useCallback(m=>{if(!o&&!r||p.paused)return;let h=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,v=document.activeElement;if(h&&v){let x=m.currentTarget,[y,R]=eU(x);y&&R?!m.shiftKey&&v===R?(m.preventDefault(),o&&Nn(y,{select:!0})):m.shiftKey&&v===y&&(m.preventDefault(),o&&Nn(R,{select:!0})):v===x&&m.preventDefault()}},[o,r,p.paused]);return(0,OP.jsx)(j.div,{tabIndex:-1,...s,ref:f,onKeyDown:g})});qs.displayName=QH;function JH(e,{select:t=!1}={}){let o=document.activeElement;for(let r of e)if(Nn(r,{select:t}),document.activeElement!==o)return}function eU(e){let t=FP(e),o=AP(t,e),r=AP(t.reverse(),e);return[o,r]}function FP(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 AP(e,t){for(let o of e)if(!tU(o,{upTo:t}))return o}function tU(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 oU(e){return e instanceof HTMLInputElement&&"select"in e}function Nn(e,{select:t=!1}={}){if(e&&e.focus){let o=document.activeElement;e.focus({preventScroll:!0}),e!==o&&oU(e)&&t&&e.select()}}var DP=rU();function rU(){let e=[];return{add(t){let o=e[0];t!==o&&o?.pause(),e=NP(e,t),e.unshift(t)},remove(t){e=NP(e,t),e[0]?.resume()}}}function NP(e,t){let o=[...e],r=o.indexOf(t);return r!==-1&&o.splice(r,1),o}function aU(e){return e.filter(t=>t.tagName!=="A")}var Mo=b(k(),1);var BP=["top","right","bottom","left"];var fa=Math.min,po=Math.max,Uc=Math.round,Gc=Math.floor,Or=e=>({x:e,y:e}),nU={left:"right",right:"left",bottom:"top",top:"bottom"},sU={start:"end",end:"start"};function Np(e,t,o){return po(e,fa(t,o))}function pa(e,t){return typeof e=="function"?e(t):e}function ma(e){return e.split("-")[0]}function Ws(e){return e.split("-")[1]}function Op(e){return e==="x"?"y":"x"}function Fp(e){return e==="y"?"height":"width"}var iU=new Set(["top","bottom"]);function Fr(e){return iU.has(ma(e))?"y":"x"}function _p(e){return Op(Fr(e))}function HP(e,t,o){o===void 0&&(o=!1);let r=Ws(e),a=_p(e),n=Fp(a),s=a==="x"?r===(o?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[n]>t.floating[n]&&(s=Hc(s)),[s,Hc(s)]}function UP(e){let t=Hc(e);return[Dp(e),t,Dp(t)]}function Dp(e){return e.replace(/start|end/g,t=>sU[t])}var _P=["left","right"],VP=["right","left"],lU=["top","bottom"],uU=["bottom","top"];function cU(e,t,o){switch(e){case"top":case"bottom":return o?t?VP:_P:t?_P:VP;case"left":case"right":return t?lU:uU;default:return[]}}function GP(e,t,o,r){let a=Ws(e),n=cU(ma(e),o==="start",r);return a&&(n=n.map(s=>s+"-"+a),t&&(n=n.concat(n.map(Dp)))),n}function Hc(e){return e.replace(/left|right|bottom|top/g,t=>nU[t])}function dU(e){return{top:0,right:0,bottom:0,left:0,...e}}function pv(e){return typeof e!="number"?dU(e):{top:e,right:e,bottom:e,left:e}}function $s(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 zP(e,t,o){let{reference:r,floating:a}=e,n=Fr(t),s=_p(t),i=Fp(s),l=ma(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,p;switch(l){case"top":p={x:c,y:r.y-a.height};break;case"bottom":p={x:c,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-a.width,y:d};break;default:p={x:r.x,y:r.y}}switch(Ws(t)){case"start":p[s]-=f*(o&&u?-1:1);break;case"end":p[s]+=f*(o&&u?-1:1);break}return p}var $P=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}=zP(u,r,l),f=r,p={},g=0;for(let m=0;m<i.length;m++){let{name:h,fn:v}=i[m],{x,y,data:R,reset:S}=await v({x:c,y:d,initialPlacement:r,placement:f,strategy:a,middlewareData:p,rects:u,platform:s,elements:{reference:e,floating:t}});c=x??c,d=y??d,p={...p,[h]:{...p[h],...R}},S&&g<=50&&(g++,typeof S=="object"&&(S.placement&&(f=S.placement),S.rects&&(u=S.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:a}):S.rects),{x:c,y:d}=zP(u,f,l)),m=-1)}return{x:c,y:d,placement:f,strategy:a,middlewareData:p}};async function hl(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:p=0}=pa(t,e),g=pv(p),h=i[f?d==="floating"?"reference":"floating":d],v=$s(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},S=$s(n.convertOffsetParentRelativeRectToViewportRelativeRect?await n.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:x,offsetParent:y,strategy:l}):x);return{top:(v.top-S.top+g.top)/R.y,bottom:(S.bottom-v.bottom+g.bottom)/R.y,left:(v.left-S.left+g.left)/R.x,right:(S.right-v.right+g.right)/R.x}}var jP=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}=pa(e,t)||{};if(u==null)return{};let d=pv(c),f={x:o,y:r},p=_p(a),g=Fp(p),m=await s.getDimensions(u),h=p==="y",v=h?"top":"left",x=h?"bottom":"right",y=h?"clientHeight":"clientWidth",R=n.reference[g]+n.reference[p]-f[p]-n.floating[g],S=f[p]-n.reference[p],C=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u)),w=C?C[y]:0;(!w||!await(s.isElement==null?void 0:s.isElement(C)))&&(w=i.floating[y]||n.floating[g]);let I=R/2-S/2,L=w/2-m[g]/2-1,T=fa(d[v],L),M=fa(d[x],L),F=T,V=w-m[g]-M,A=w/2-m[g]/2+I,G=Np(F,A,V),_=!l.arrow&&Ws(a)!=null&&A!==G&&n.reference[g]/2-(A<F?T:M)-m[g]/2<0,O=_?A<F?A-F:A-V:0;return{[p]:f[p]+O,data:{[p]:G,centerOffset:A-G-O,..._&&{alignmentOffset:O}},reset:_}}});var KP=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:p="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:m=!0,...h}=pa(e,t);if((o=n.arrow)!=null&&o.alignmentOffset)return{};let v=ma(a),x=Fr(i),y=ma(i)===i,R=await(l.isRTL==null?void 0:l.isRTL(u.floating)),S=f||(y||!m?[Hc(i)]:UP(i)),C=g!=="none";!f&&C&&S.push(...GP(i,m,g,R));let w=[i,...S],I=await hl(t,h),L=[],T=((r=n.flip)==null?void 0:r.overflows)||[];if(c&&L.push(I[v]),d){let A=HP(a,s,R);L.push(I[A[0]],I[A[1]])}if(T=[...T,{placement:a,overflows:L}],!L.every(A=>A<=0)){var M,F;let A=(((M=n.flip)==null?void 0:M.index)||0)+1,G=w[A];if(G&&(!(d==="alignment"?x!==Fr(G):!1)||T.every(E=>Fr(E.placement)===x?E.overflows[0]>0:!0)))return{data:{index:A,overflows:T},reset:{placement:G}};let _=(F=T.filter(O=>O.overflows[0]<=0).sort((O,E)=>O.overflows[1]-E.overflows[1])[0])==null?void 0:F.placement;if(!_)switch(p){case"bestFit":{var V;let O=(V=T.filter(E=>{if(C){let D=Fr(E.placement);return D===x||D==="y"}return!0}).map(E=>[E.placement,E.overflows.filter(D=>D>0).reduce((D,te)=>D+te,0)]).sort((E,D)=>E[1]-D[1])[0])==null?void 0:V[0];O&&(_=O);break}case"initialPlacement":_=i;break}if(a!==_)return{reset:{placement:_}}}return{}}}};function qP(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function WP(e){return BP.some(t=>e[t]>=0)}var XP=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){let{rects:o}=t,{strategy:r="referenceHidden",...a}=pa(e,t);switch(r){case"referenceHidden":{let n=await hl(t,{...a,elementContext:"reference"}),s=qP(n,o.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:WP(s)}}}case"escaped":{let n=await hl(t,{...a,altBoundary:!0}),s=qP(n,o.floating);return{data:{escapedOffsets:s,escaped:WP(s)}}}default:return{}}}}};var YP=new Set(["left","top"]);async function fU(e,t){let{placement:o,platform:r,elements:a}=e,n=await(r.isRTL==null?void 0:r.isRTL(a.floating)),s=ma(o),i=Ws(o),l=Fr(o)==="y",u=YP.has(s)?-1:1,c=n&&l?-1:1,d=pa(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:g}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return i&&typeof g=="number"&&(p=i==="end"?g*-1:g),l?{x:p*c,y:f*u}:{x:f*u,y:p*c}}var ZP=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 fU(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}}}}},QP=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}=pa(e,t),u={x:o,y:r},c=await hl(t,l),d=Fr(ma(a)),f=Op(d),p=u[f],g=u[d];if(n){let h=f==="y"?"top":"left",v=f==="y"?"bottom":"right",x=p+c[h],y=p-c[v];p=Np(x,p,y)}if(s){let h=d==="y"?"top":"left",v=d==="y"?"bottom":"right",x=g+c[h],y=g-c[v];g=Np(x,g,y)}let m=i.fn({...t,[f]:p,[d]:g});return{...m,data:{x:m.x-o,y:m.y-r,enabled:{[f]:n,[d]:s}}}}}},JP=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}=pa(e,t),c={x:o,y:r},d=Fr(a),f=Op(d),p=c[f],g=c[d],m=pa(i,t),h=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){let y=f==="y"?"height":"width",R=n.reference[f]-n.floating[y]+h.mainAxis,S=n.reference[f]+n.reference[y]-h.mainAxis;p<R?p=R:p>S&&(p=S)}if(u){var v,x;let y=f==="y"?"width":"height",R=YP.has(ma(a)),S=n.reference[d]-n.floating[y]+(R&&((v=s.offset)==null?void 0:v[d])||0)+(R?0:h.crossAxis),C=n.reference[d]+n.reference[y]+(R?0:((x=s.offset)==null?void 0:x[d])||0)-(R?h.crossAxis:0);g<S?g=S:g>C&&(g=C)}return{[f]:p,[d]:g}}}},eL=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}=pa(e,t),c=await hl(t,u),d=ma(a),f=Ws(a),p=Fr(a)==="y",{width:g,height:m}=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=m-c.top-c.bottom,y=g-c.left-c.right,R=fa(m-c[h],x),S=fa(g-c[v],y),C=!t.middlewareData.shift,w=R,I=S;if((o=t.middlewareData.shift)!=null&&o.enabled.x&&(I=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(w=x),C&&!f){let T=po(c.left,0),M=po(c.right,0),F=po(c.top,0),V=po(c.bottom,0);p?I=g-2*(T!==0||M!==0?T+M:po(c.left,c.right)):w=m-2*(F!==0||V!==0?F+V:po(c.top,c.bottom))}await l({...t,availableWidth:I,availableHeight:w});let L=await s.getDimensions(i.floating);return g!==L.width||m!==L.height?{reset:{rects:!0}}:{}}}};function Vp(){return typeof window<"u"}function Ks(e){return oL(e)?(e.nodeName||"").toLowerCase():"#document"}function To(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function _r(e){var t;return(t=(oL(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function oL(e){return Vp()?e instanceof Node||e instanceof To(e).Node:!1}function tr(e){return Vp()?e instanceof Element||e instanceof To(e).Element:!1}function Vr(e){return Vp()?e instanceof HTMLElement||e instanceof To(e).HTMLElement:!1}function tL(e){return!Vp()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof To(e).ShadowRoot}var pU=new Set(["inline","contents"]);function vl(e){let{overflow:t,overflowX:o,overflowY:r,display:a}=or(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+o)&&!pU.has(a)}var mU=new Set(["table","td","th"]);function rL(e){return mU.has(Ks(e))}var gU=[":popover-open",":modal"];function zc(e){return gU.some(t=>{try{return e.matches(t)}catch{return!1}})}var hU=["transform","translate","scale","rotate","perspective"],vU=["transform","translate","scale","rotate","perspective","filter"],xU=["paint","layout","strict","content"];function Bp(e){let t=Hp(),o=tr(e)?or(e):e;return hU.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)||vU.some(r=>(o.willChange||"").includes(r))||xU.some(r=>(o.contain||"").includes(r))}function aL(e){let t=Ga(e);for(;Vr(t)&&!Xs(t);){if(Bp(t))return t;if(zc(t))return null;t=Ga(t)}return null}function Hp(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}var yU=new Set(["html","body","#document"]);function Xs(e){return yU.has(Ks(e))}function or(e){return To(e).getComputedStyle(e)}function qc(e){return tr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ga(e){if(Ks(e)==="html")return e;let t=e.assignedSlot||e.parentNode||tL(e)&&e.host||_r(e);return tL(t)?t.host:t}function nL(e){let t=Ga(e);return Xs(t)?e.ownerDocument?e.ownerDocument.body:e.body:Vr(t)&&vl(t)?t:nL(t)}function js(e,t,o){var r;t===void 0&&(t=[]),o===void 0&&(o=!0);let a=nL(e),n=a===((r=e.ownerDocument)==null?void 0:r.body),s=To(a);if(n){let i=Up(s);return t.concat(s,s.visualViewport||[],vl(a)?a:[],i&&o?js(i):[])}return t.concat(a,js(a,[],o))}function Up(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function uL(e){let t=or(e),o=parseFloat(t.width)||0,r=parseFloat(t.height)||0,a=Vr(e),n=a?e.offsetWidth:o,s=a?e.offsetHeight:r,i=Uc(o)!==n||Uc(r)!==s;return i&&(o=n,r=s),{width:o,height:r,$:i}}function gv(e){return tr(e)?e:e.contextElement}function xl(e){let t=gv(e);if(!Vr(t))return Or(1);let o=t.getBoundingClientRect(),{width:r,height:a,$:n}=uL(t),s=(n?Uc(o.width):o.width)/r,i=(n?Uc(o.height):o.height)/a;return(!s||!Number.isFinite(s))&&(s=1),(!i||!Number.isFinite(i))&&(i=1),{x:s,y:i}}var bU=Or(0);function cL(e){let t=To(e);return!Hp()||!t.visualViewport?bU:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function CU(e,t,o){return t===void 0&&(t=!1),!o||t&&o!==To(e)?!1:t}function Ys(e,t,o,r){t===void 0&&(t=!1),o===void 0&&(o=!1);let a=e.getBoundingClientRect(),n=gv(e),s=Or(1);t&&(r?tr(r)&&(s=xl(r)):s=xl(e));let i=CU(n,o,r)?cL(n):Or(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=To(n),p=r&&tr(r)?To(r):r,g=f,m=Up(g);for(;m&&r&&p!==g;){let h=xl(m),v=m.getBoundingClientRect(),x=or(m),y=v.left+(m.clientLeft+parseFloat(x.paddingLeft))*h.x,R=v.top+(m.clientTop+parseFloat(x.paddingTop))*h.y;l*=h.x,u*=h.y,c*=h.x,d*=h.y,l+=y,u+=R,g=To(m),m=Up(g)}}return $s({width:c,height:d,x:l,y:u})}function Gp(e,t){let o=qc(e).scrollLeft;return t?t.left+o:Ys(_r(e)).left+o}function dL(e,t){let o=e.getBoundingClientRect(),r=o.left+t.scrollLeft-Gp(e,o),a=o.top+t.scrollTop;return{x:r,y:a}}function wU(e){let{elements:t,rect:o,offsetParent:r,strategy:a}=e,n=a==="fixed",s=_r(r),i=t?zc(t.floating):!1;if(r===s||i&&n)return o;let l={scrollLeft:0,scrollTop:0},u=Or(1),c=Or(0),d=Vr(r);if((d||!d&&!n)&&((Ks(r)!=="body"||vl(s))&&(l=qc(r)),Vr(r))){let p=Ys(r);u=xl(r),c.x=p.x+r.clientLeft,c.y=p.y+r.clientTop}let f=s&&!d&&!n?dL(s,l):Or(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 SU(e){return Array.from(e.getClientRects())}function RU(e){let t=_r(e),o=qc(e),r=e.ownerDocument.body,a=po(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),n=po(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),s=-o.scrollLeft+Gp(e),i=-o.scrollTop;return or(r).direction==="rtl"&&(s+=po(t.clientWidth,r.clientWidth)-a),{width:a,height:n,x:s,y:i}}var sL=25;function IU(e,t){let o=To(e),r=_r(e),a=o.visualViewport,n=r.clientWidth,s=r.clientHeight,i=0,l=0;if(a){n=a.width,s=a.height;let c=Hp();(!c||c&&t==="fixed")&&(i=a.offsetLeft,l=a.offsetTop)}let u=Gp(r);if(u<=0){let c=r.ownerDocument,d=c.body,f=getComputedStyle(d),p=c.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,g=Math.abs(r.clientWidth-d.clientWidth-p);g<=sL&&(n-=g)}else u<=sL&&(n+=u);return{width:n,height:s,x:i,y:l}}var PU=new Set(["absolute","fixed"]);function LU(e,t){let o=Ys(e,!0,t==="fixed"),r=o.top+e.clientTop,a=o.left+e.clientLeft,n=Vr(e)?xl(e):Or(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 iL(e,t,o){let r;if(t==="viewport")r=IU(e,o);else if(t==="document")r=RU(_r(e));else if(tr(t))r=LU(t,o);else{let a=cL(e);r={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return $s(r)}function fL(e,t){let o=Ga(e);return o===t||!tr(o)||Xs(o)?!1:or(o).position==="fixed"||fL(o,t)}function TU(e,t){let o=t.get(e);if(o)return o;let r=js(e,[],!1).filter(i=>tr(i)&&Ks(i)!=="body"),a=null,n=or(e).position==="fixed",s=n?Ga(e):e;for(;tr(s)&&!Xs(s);){let i=or(s),l=Bp(s);!l&&i.position==="fixed"&&(a=null),(n?!l&&!a:!l&&i.position==="static"&&!!a&&PU.has(a.position)||vl(s)&&!l&&fL(e,s))?r=r.filter(c=>c!==s):a=i,s=Ga(s)}return t.set(e,r),r}function MU(e){let{element:t,boundary:o,rootBoundary:r,strategy:a}=e,s=[...o==="clippingAncestors"?zc(t)?[]:TU(t,this._c):[].concat(o),r],i=s[0],l=s.reduce((u,c)=>{let d=iL(t,c,a);return u.top=po(d.top,u.top),u.right=fa(d.right,u.right),u.bottom=fa(d.bottom,u.bottom),u.left=po(d.left,u.left),u},iL(t,i,a));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function kU(e){let{width:t,height:o}=uL(e);return{width:t,height:o}}function EU(e,t,o){let r=Vr(t),a=_r(t),n=o==="fixed",s=Ys(e,!0,n,t),i={scrollLeft:0,scrollTop:0},l=Or(0);function u(){l.x=Gp(a)}if(r||!r&&!n)if((Ks(t)!=="body"||vl(a))&&(i=qc(t)),r){let p=Ys(t,!0,n,t);l.x=p.x+t.clientLeft,l.y=p.y+t.clientTop}else a&&u();n&&!r&&a&&u();let c=a&&!r&&!n?dL(a,i):Or(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 mv(e){return or(e).position==="static"}function lL(e,t){if(!Vr(e)||or(e).position==="fixed")return null;if(t)return t(e);let o=e.offsetParent;return _r(e)===o&&(o=o.ownerDocument.body),o}function pL(e,t){let o=To(e);if(zc(e))return o;if(!Vr(e)){let a=Ga(e);for(;a&&!Xs(a);){if(tr(a)&&!mv(a))return a;a=Ga(a)}return o}let r=lL(e,t);for(;r&&rL(r)&&mv(r);)r=lL(r,t);return r&&Xs(r)&&mv(r)&&!Bp(r)?o:r||aL(e)||o}var AU=async function(e){let t=this.getOffsetParent||pL,o=this.getDimensions,r=await o(e.floating);return{reference:EU(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function DU(e){return or(e).direction==="rtl"}var mL={convertOffsetParentRelativeRectToViewportRelativeRect:wU,getDocumentElement:_r,getClippingRect:MU,getOffsetParent:pL,getElementRects:AU,getClientRects:SU,getDimensions:kU,getScale:xl,isElement:tr,isRTL:DU};function gL(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function NU(e,t){let o=null,r,a=_r(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:p}=u;if(i||t(),!f||!p)return;let g=Gc(d),m=Gc(a.clientWidth-(c+f)),h=Gc(a.clientHeight-(d+p)),v=Gc(c),y={rootMargin:-g+"px "+-m+"px "+-h+"px "+-v+"px",threshold:po(0,fa(1,l))||1},R=!0;function S(C){let w=C[0].intersectionRatio;if(w!==l){if(!R)return s();w?s(!1,w):r=setTimeout(()=>{s(!1,1e-7)},1e3)}w===1&&!gL(u,e.getBoundingClientRect())&&s(),R=!1}try{o=new IntersectionObserver(S,{...y,root:a.ownerDocument})}catch{o=new IntersectionObserver(S,y)}o.observe(e)}return s(!0),n}function hv(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=gv(e),c=a||n?[...u?js(u):[],...js(t)]:[];c.forEach(v=>{a&&v.addEventListener("scroll",o,{passive:!0}),n&&v.addEventListener("resize",o)});let d=u&&i?NU(u,o):null,f=-1,p=null;s&&(p=new ResizeObserver(v=>{let[x]=v;x&&x.target===u&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var y;(y=p)==null||y.observe(t)})),o()}),u&&!l&&p.observe(u),p.observe(t));let g,m=l?Ys(e):null;l&&h();function h(){let v=Ys(e);m&&!gL(m,v)&&o(),m=v,g=requestAnimationFrame(h)}return o(),()=>{var v;c.forEach(x=>{a&&x.removeEventListener("scroll",o),n&&x.removeEventListener("resize",o)}),d?.(),(v=p)==null||v.disconnect(),p=null,l&&cancelAnimationFrame(g)}}var hL=ZP;var vL=QP,xL=KP,yL=eL,bL=XP,vv=jP;var CL=JP,xv=(e,t,o)=>{let r=new Map,a={platform:mL,...o},n={...a.platform,_c:r};return $P(e,t,{...a,platform:n})};var vt=b(k(),1),SL=b(k(),1),RL=b(ta(),1),OU=typeof document<"u",FU=function(){},zp=OU?SL.useLayoutEffect:FU;function qp(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(!qp(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)&&!qp(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function IL(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function wL(e,t){let o=IL(e);return Math.round(t*o)/o}function yv(e){let t=vt.useRef(e);return zp(()=>{t.current=e}),t}function PL(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]=vt.useState({x:0,y:0,strategy:o,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=vt.useState(r);qp(f,r)||p(r);let[g,m]=vt.useState(null),[h,v]=vt.useState(null),x=vt.useCallback(E=>{E!==C.current&&(C.current=E,m(E))},[]),y=vt.useCallback(E=>{E!==w.current&&(w.current=E,v(E))},[]),R=n||g,S=s||h,C=vt.useRef(null),w=vt.useRef(null),I=vt.useRef(c),L=l!=null,T=yv(l),M=yv(a),F=yv(u),V=vt.useCallback(()=>{if(!C.current||!w.current)return;let E={placement:t,strategy:o,middleware:f};M.current&&(E.platform=M.current),xv(C.current,w.current,E).then(D=>{let te={...D,isPositioned:F.current!==!1};A.current&&!qp(I.current,te)&&(I.current=te,RL.flushSync(()=>{d(te)}))})},[f,t,o,M,F]);zp(()=>{u===!1&&I.current.isPositioned&&(I.current.isPositioned=!1,d(E=>({...E,isPositioned:!1})))},[u]);let A=vt.useRef(!1);zp(()=>(A.current=!0,()=>{A.current=!1}),[]),zp(()=>{if(R&&(C.current=R),S&&(w.current=S),R&&S){if(T.current)return T.current(R,S,V);V()}},[R,S,V,T,L]);let G=vt.useMemo(()=>({reference:C,floating:w,setReference:x,setFloating:y}),[x,y]),_=vt.useMemo(()=>({reference:R,floating:S}),[R,S]),O=vt.useMemo(()=>{let E={position:o,left:0,top:0};if(!_.floating)return E;let D=wL(_.floating,c.x),te=wL(_.floating,c.y);return i?{...E,transform:"translate("+D+"px, "+te+"px)",...IL(_.floating)>=1.5&&{willChange:"transform"}}:{position:o,left:D,top:te}},[o,i,_.floating,c.x,c.y]);return vt.useMemo(()=>({...c,update:V,refs:G,elements:_,floatingStyles:O}),[c,V,G,_,O])}var _U=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?vv({element:r.current,padding:a}).fn(o):{}:r?vv({element:r,padding:a}).fn(o):{}}}},LL=(e,t)=>({...hL(e),options:[e,t]}),TL=(e,t)=>({...vL(e),options:[e,t]}),ML=(e,t)=>({...CL(e),options:[e,t]}),kL=(e,t)=>({...xL(e),options:[e,t]}),EL=(e,t)=>({...yL(e),options:[e,t]});var AL=(e,t)=>({...bL(e),options:[e,t]});var DL=(e,t)=>({..._U(e),options:[e,t]});var NL=b(k(),1);var bv=b(N(),1),VU="Arrow",OL=NL.forwardRef((e,t)=>{let{children:o,width:r=10,height:a=5,...n}=e;return(0,bv.jsx)(j.svg,{...n,ref:t,width:r,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?o:(0,bv.jsx)("polygon",{points:"0,0 30,0 15,10"})})});OL.displayName=VU;var FL=OL;var On=b(N(),1);var Cv="Popper",[_L,rr]=Ne(Cv),[HU,VL]=_L(Cv),BL=e=>{let{__scopePopper:t,children:o}=e,[r,a]=Mo.useState(null);return(0,On.jsx)(HU,{scope:t,anchor:r,onAnchorChange:a,children:o})};BL.displayName=Cv;var HL="PopperAnchor",UL=Mo.forwardRef((e,t)=>{let{__scopePopper:o,virtualRef:r,...a}=e,n=VL(HL,o),s=Mo.useRef(null),i=ie(t,s),l=Mo.useRef(null);return Mo.useEffect(()=>{let u=l.current;l.current=r?.current||s.current,u!==l.current&&n.onAnchorChange(l.current)}),r?null:(0,On.jsx)(j.div,{...a,ref:i})});UL.displayName=HL;var wv="PopperContent",[UU,GU]=_L(wv),GL=Mo.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:p="optimized",onPlaced:g,...m}=e,h=VL(wv,o),[v,x]=Mo.useState(null),y=ie(t,H=>x(H)),[R,S]=Mo.useState(null),C=ml(R),w=C?.width??0,I=C?.height??0,L=r+(n!=="center"?"-"+n:""),T=typeof c=="number"?c:{top:0,right:0,bottom:0,left:0,...c},M=Array.isArray(u)?u:[u],F=M.length>0,V={padding:T,boundary:M.filter(qU),altBoundary:F},{refs:A,floatingStyles:G,placement:_,isPositioned:O,middlewareData:E}=PL({strategy:"fixed",placement:L,whileElementsMounted:(...H)=>hv(...H,{animationFrame:p==="always"}),elements:{reference:h.anchor},middleware:[LL({mainAxis:a+I,alignmentAxis:s}),l&&TL({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?ML():void 0,...V}),l&&kL({...V}),EL({...V,apply:({elements:H,rects:oe,availableWidth:fe,availableHeight:me})=>{let{width:pe,height:K}=oe.reference,Ie=H.floating.style;Ie.setProperty("--radix-popper-available-width",`${fe}px`),Ie.setProperty("--radix-popper-available-height",`${me}px`),Ie.setProperty("--radix-popper-anchor-width",`${pe}px`),Ie.setProperty("--radix-popper-anchor-height",`${K}px`)}}),R&&DL({element:R,padding:i}),WU({arrowWidth:w,arrowHeight:I}),f&&AL({strategy:"referenceHidden",...V})]}),[D,te]=WL(_),ue=Ee(g);ke(()=>{O&&ue?.()},[O,ue]);let B=E.arrow?.x,$=E.arrow?.y,Z=E.arrow?.centerOffset!==0,[X,se]=Mo.useState();return ke(()=>{v&&se(window.getComputedStyle(v).zIndex)},[v]),(0,On.jsx)("div",{ref:A.setFloating,"data-radix-popper-content-wrapper":"",style:{...G,transform:O?G.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:X,"--radix-popper-transform-origin":[E.transformOrigin?.x,E.transformOrigin?.y].join(" "),...E.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:(0,On.jsx)(UU,{scope:o,placedSide:D,onArrowChange:S,arrowX:B,arrowY:$,shouldHideArrow:Z,children:(0,On.jsx)(j.div,{"data-side":D,"data-align":te,...m,ref:y,style:{...m.style,animation:O?void 0:"none"}})})})});GL.displayName=wv;var zL="PopperArrow",zU={top:"bottom",right:"left",bottom:"top",left:"right"},qL=Mo.forwardRef(function(t,o){let{__scopePopper:r,...a}=t,n=GU(zL,r),s=zU[n.placedSide];return(0,On.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,On.jsx)(FL,{...a,ref:o,style:{...a.style,display:"block"}})})});qL.displayName=zL;function qU(e){return e!==null}var WU=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]=WL(o),d={start:"0%",center:"50%",end:"100%"}[c],f=(a.arrow?.x??0)+i/2,p=(a.arrow?.y??0)+l/2,g="",m="";return u==="bottom"?(g=s?d:`${f}px`,m=`${-l}px`):u==="top"?(g=s?d:`${f}px`,m=`${r.floating.height+l}px`):u==="right"?(g=`${-l}px`,m=s?d:`${p}px`):u==="left"&&(g=`${r.floating.width+l}px`,m=s?d:`${p}px`),{data:{x:g,y:m}}}});function WL(e){let[t,o="center"]=e.split("-");return[t,o]}var za=BL,qa=UL,Fn=GL,_n=qL;var $p=b(k(),1),$L=b(ta(),1);var jL=b(N(),1),$U="Portal",Br=$p.forwardRef((e,t)=>{let{container:o,...r}=e,[a,n]=$p.useState(!1);ke(()=>n(!0),[]);let s=o||a&&globalThis?.document?.body;return s?$L.default.createPortal((0,jL.jsx)(j.div,{...r,ref:t}),s):null});Br.displayName=$U;var jU=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},yl=new WeakMap,jp=new WeakMap,Kp={},Sv=0,KL=function(e){return e&&(e.host||KL(e.parentNode))},KU=function(e,t){return t.map(function(o){if(e.contains(o))return o;var r=KL(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})},XU=function(e,t,o,r){var a=KU(t,Array.isArray(e)?e:[e]);Kp[o]||(Kp[o]=new WeakMap);var n=Kp[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 p=f.getAttribute(r),g=p!==null&&p!=="false",m=(yl.get(f)||0)+1,h=(n.get(f)||0)+1;yl.set(f,m),n.set(f,h),s.push(f),m===1&&g&&jp.set(f,!0),h===1&&f.setAttribute(o,"true"),g||f.setAttribute(r,"true")}catch(v){console.error("aria-hidden: cannot operate on ",f,v)}})};return c(t),i.clear(),Sv++,function(){s.forEach(function(d){var f=yl.get(d)-1,p=n.get(d)-1;yl.set(d,f),n.set(d,p),f||(jp.has(d)||d.removeAttribute(r),jp.delete(d)),p||d.removeAttribute(o)}),Sv--,Sv||(yl=new WeakMap,yl=new WeakMap,jp=new WeakMap,Kp={})}},Vn=function(e,t,o){o===void 0&&(o="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),a=t||jU(e);return a?(r.push.apply(r,Array.from(a.querySelectorAll("[aria-live], script"))),XU(r,a,o,"aria-hidden")):function(){return null}};var ko=function(){return ko=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},ko.apply(this,arguments)};function Xp(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 XL(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 em=b(k());var Jt=b(k());var Zs="right-scroll-bar-position",Qs="width-before-scroll-bar",Rv="with-scroll-bars-hidden",Iv="--removed-body-scroll-bar-size";function Yp(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}var YL=b(k());function ZL(e,t){var o=(0,YL.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 Zp=b(k());var YU=typeof window<"u"?Zp.useLayoutEffect:Zp.useEffect,QL=new WeakMap;function Pv(e,t){var o=ZL(t||null,function(r){return e.forEach(function(a){return Yp(a,r)})});return YU(function(){var r=QL.get(o);if(r){var a=new Set(r),n=new Set(e),s=o.current;a.forEach(function(i){n.has(i)||Yp(i,null)}),n.forEach(function(i){a.has(i)||Yp(i,s)})}QL.set(o,e)},[e]),o}function ZU(e){return e}function QU(e,t){t===void 0&&(t=ZU);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 Lv(e){e===void 0&&(e={});var t=QU(null);return t.options=ko({async:!0,ssr:!1},e),t}var JL=b(k()),eT=function(e){var t=e.sideCar,o=Xp(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 JL.createElement(r,ko({},o))};eT.isSideCarExport=!0;function Tv(e,t){return e.useMedium(t),eT}var Qp=Lv();var Mv=function(){},Wc=Jt.forwardRef(function(e,t){var o=Jt.useRef(null),r=Jt.useState({onScrollCapture:Mv,onWheelCapture:Mv,onTouchMoveCapture:Mv}),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,p=e.noRelative,g=e.noIsolation,m=e.inert,h=e.allowPinchZoom,v=e.as,x=v===void 0?"div":v,y=e.gapMode,R=Xp(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=f,C=Pv([o,t]),w=ko(ko({},R),a);return Jt.createElement(Jt.Fragment,null,c&&Jt.createElement(S,{sideCar:Qp,removeScrollBar:u,shards:d,noRelative:p,noIsolation:g,inert:m,setCallbacks:n,allowPinchZoom:!!h,lockRef:o,gapMode:y}),s?Jt.cloneElement(Jt.Children.only(i),ko(ko({},w),{ref:C})):Jt.createElement(x,ko({},w,{className:l,ref:C}),i))});Wc.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Wc.classNames={fullWidth:Qs,zeroRight:Zs};var Qe=b(k());var Cl=b(k());var rT=b(k());var tT;var oT=function(){if(tT)return tT;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function JU(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=oT();return t&&e.setAttribute("nonce",t),e}function eG(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function tG(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var kv=function(){var e=0,t=null;return{add:function(o){e==0&&(t=JU())&&(eG(t,o),tG(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}};var Ev=function(){var e=kv();return function(t,o){rT.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&o])}};var $c=function(){var e=Ev(),t=function(o){var r=o.styles,a=o.dynamic;return e(r,a),null};return t};var oG={left:0,top:0,right:0,gap:0},Av=function(e){return parseInt(e||"",10)||0},rG=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[Av(o),Av(r),Av(a)]},Dv=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return oG;var t=rG(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 aG=$c(),bl="data-scroll-locked",nG=function(e,t,o,r){var a=e.left,n=e.top,s=e.right,i=e.gap;return o===void 0&&(o="margin"),`
|
|
13
|
+
.`.concat(Rv,` {
|
|
14
|
+
overflow: hidden `).concat(r,`;
|
|
15
|
+
padding-right: `).concat(i,"px ").concat(r,`;
|
|
23
16
|
}
|
|
24
|
-
body[`).concat(
|
|
25
|
-
overflow: hidden `).concat(
|
|
17
|
+
body[`).concat(bl,`] {
|
|
18
|
+
overflow: hidden `).concat(r,`;
|
|
26
19
|
overscroll-behavior: contain;
|
|
27
|
-
`).concat([t&&"position: relative ".concat(
|
|
28
|
-
padding-left: `.concat(
|
|
29
|
-
padding-top: `).concat(
|
|
30
|
-
padding-right: `).concat(
|
|
20
|
+
`).concat([t&&"position: relative ".concat(r,";"),o==="margin"&&`
|
|
21
|
+
padding-left: `.concat(a,`px;
|
|
22
|
+
padding-top: `).concat(n,`px;
|
|
23
|
+
padding-right: `).concat(s,`px;
|
|
31
24
|
margin-left:0;
|
|
32
25
|
margin-top:0;
|
|
33
|
-
margin-right: `).concat(
|
|
34
|
-
`),
|
|
26
|
+
margin-right: `).concat(i,"px ").concat(r,`;
|
|
27
|
+
`),o==="padding"&&"padding-right: ".concat(i,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
35
28
|
}
|
|
36
29
|
|
|
37
|
-
.`).concat(
|
|
38
|
-
right: `).concat(
|
|
30
|
+
.`).concat(Zs,` {
|
|
31
|
+
right: `).concat(i,"px ").concat(r,`;
|
|
39
32
|
}
|
|
40
33
|
|
|
41
|
-
.`).concat(
|
|
42
|
-
margin-right: `).concat(
|
|
34
|
+
.`).concat(Qs,` {
|
|
35
|
+
margin-right: `).concat(i,"px ").concat(r,`;
|
|
43
36
|
}
|
|
44
37
|
|
|
45
|
-
.`).concat(
|
|
46
|
-
right: 0 `).concat(
|
|
38
|
+
.`).concat(Zs," .").concat(Zs,` {
|
|
39
|
+
right: 0 `).concat(r,`;
|
|
47
40
|
}
|
|
48
41
|
|
|
49
|
-
.`).concat(
|
|
50
|
-
margin-right: 0 `).concat(
|
|
42
|
+
.`).concat(Qs," .").concat(Qs,` {
|
|
43
|
+
margin-right: 0 `).concat(r,`;
|
|
51
44
|
}
|
|
52
45
|
|
|
53
|
-
body[`).concat(
|
|
54
|
-
`).concat(
|
|
46
|
+
body[`).concat(bl,`] {
|
|
47
|
+
`).concat(Iv,": ").concat(i,`px;
|
|
55
48
|
}
|
|
56
|
-
`)},
|
|
49
|
+
`)},aT=function(){var e=parseInt(document.body.getAttribute(bl)||"0",10);return isFinite(e)?e:0},sG=function(){Cl.useEffect(function(){return document.body.setAttribute(bl,(aT()+1).toString()),function(){var e=aT()-1;e<=0?document.body.removeAttribute(bl):document.body.setAttribute(bl,e.toString())}},[])},Nv=function(e){var t=e.noRelative,o=e.noImportant,r=e.gapMode,a=r===void 0?"margin":r;sG();var n=Cl.useMemo(function(){return Dv(a)},[a]);return Cl.createElement(aG,{styles:nG(n,!t,a,o?"":"!important")})};var Ov=!1;if(typeof window<"u")try{jc=Object.defineProperty({},"passive",{get:function(){return Ov=!0,!0}}),window.addEventListener("test",jc,jc),window.removeEventListener("test",jc,jc)}catch{Ov=!1}var jc,Js=Ov?{passive:!1}:!1;var iG=function(e){return e.tagName==="TEXTAREA"},nT=function(e,t){if(!(e instanceof Element))return!1;var o=window.getComputedStyle(e);return o[t]!=="hidden"&&!(o.overflowY===o.overflowX&&!iG(e)&&o[t]==="visible")},lG=function(e){return nT(e,"overflowY")},uG=function(e){return nT(e,"overflowX")},Fv=function(e,t){var o=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var a=sT(e,r);if(a){var n=iT(e,r),s=n[1],i=n[2];if(s>i)return!0}r=r.parentNode}while(r&&r!==o.body);return!1},cG=function(e){var t=e.scrollTop,o=e.scrollHeight,r=e.clientHeight;return[t,o,r]},dG=function(e){var t=e.scrollLeft,o=e.scrollWidth,r=e.clientWidth;return[t,o,r]},sT=function(e,t){return e==="v"?lG(t):uG(t)},iT=function(e,t){return e==="v"?cG(t):dG(t)},fG=function(e,t){return e==="h"&&t==="rtl"?-1:1},lT=function(e,t,o,r,a){var n=fG(e,window.getComputedStyle(t).direction),s=n*r,i=o.target,l=t.contains(i),u=!1,c=s>0,d=0,f=0;do{if(!i)break;var p=iT(e,i),g=p[0],m=p[1],h=p[2],v=m-h-n*g;(g||v)&&sT(e,i)&&(d+=v,f+=g);var x=i.parentNode;i=x&&x.nodeType===Node.DOCUMENT_FRAGMENT_NODE?x.host:x}while(!l&&i!==document.body||l&&(t.contains(i)||t===i));return(c&&(a&&Math.abs(d)<1||!a&&s>d)||!c&&(a&&Math.abs(f)<1||!a&&-s>f))&&(u=!0),u};var Jp=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},uT=function(e){return[e.deltaX,e.deltaY]},cT=function(e){return e&&"current"in e?e.current:e},pG=function(e,t){return e[0]===t[0]&&e[1]===t[1]},mG=function(e){return`
|
|
57
50
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
58
51
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
59
|
-
`)},TK=0,Qc=[];function H_(e){var t=it.useRef([]),r=it.useRef([0,0]),o=it.useRef(),n=it.useState(TK++)[0],a=it.useState(dm)[0],i=it.useRef(e);it.useEffect(function(){i.current=e},[e]),it.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(n));var m=R_([e.lockRef.current],(e.shards||[]).map(B_),!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=it.useCallback(function(m,x){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!i.current.allowPinchZoom;var h=$x(m),v=r.current,y="deltaX"in m?m.deltaX:v[0]-h[0],w="deltaY"in m?m.deltaY:v[1]-h[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 I=kR(S,b);if(!I)return!0;if(I?C=S:(C=S==="v"?"h":"v",I=kR(S,b)),!I)return!1;if(!o.current&&"changedTouches"in m&&(y||w)&&(o.current=C),!C)return!0;var L=o.current||C;return __(L,x,m,L==="h"?y:w,!0)},[]),l=it.useCallback(function(m){var x=m;if(!(!Qc.length||Qc[Qc.length-1]!==a)){var h="deltaY"in x?V_(x):$x(x),v=t.current.filter(function(C){return C.name===x.type&&(C.target===x.target||x.target===C.shadowParent)&&PK(C.delta,h)})[0];if(v&&v.should){x.cancelable&&x.preventDefault();return}if(!v){var y=(i.current.shards||[]).map(B_).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=it.useCallback(function(m,x,h,v){var y={name:m,delta:x,target:h,should:v,shadowParent:kK(h)};t.current.push(y),setTimeout(function(){t.current=t.current.filter(function(w){return w!==y})},1)},[]),c=it.useCallback(function(m){r.current=$x(m),o.current=void 0},[]),d=it.useCallback(function(m){u(m.type,V_(m),m.target,s(m,e.lockRef.current))},[]),f=it.useCallback(function(m){u(m.type,$x(m),m.target,s(m,e.lockRef.current))},[]);it.useEffect(function(){return Qc.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",l,ql),document.addEventListener("touchmove",l,ql),document.addEventListener("touchstart",c,ql),function(){Qc=Qc.filter(function(m){return m!==a}),document.removeEventListener("wheel",l,ql),document.removeEventListener("touchmove",l,ql),document.removeEventListener("touchstart",c,ql)}},[]);var p=e.removeScrollBar,g=e.inert;return it.createElement(it.Fragment,null,g?it.createElement(a,{styles:LK(n)}):null,p?it.createElement(LR,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function kK(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var U_=CR(jx,H_);var z_=qx.forwardRef(function(e,t){return qx.createElement(cm,so({},e,{ref:t,sideCar:U_}))});z_.classNames=cm.classNames;var si=z_;var Et=R(N(),1),Kx="Popover",[G_,WLe]=Fe(Kx,[Qo]),pm=Qo(),[MK,ys]=G_(Kx),W_=e=>{let{__scopePopover:t,children:r,open:o,defaultOpen:n,onOpenChange:a,modal:i=!1}=e,s=pm(t),l=ct.useRef(null),[u,c]=ct.useState(!1),[d,f]=qe({prop:o,defaultProp:n??!1,onChange:a,caller:Kx});return(0,Et.jsx)(ai,{...s,children:(0,Et.jsx)(MK,{scope:t,contentId:Ne(),triggerRef:l,open:d,onOpenChange:f,onOpenToggle:ct.useCallback(()=>f(p=>!p),[f]),hasCustomAnchor:u,onCustomAnchorAdd:ct.useCallback(()=>c(!0),[]),onCustomAnchorRemove:ct.useCallback(()=>c(!1),[]),modal:i,children:r})})};W_.displayName=Kx;var j_="PopoverAnchor",$_=ct.forwardRef((e,t)=>{let{__scopePopover:r,...o}=e,n=ys(j_,r),a=pm(r),{onCustomAnchorAdd:i,onCustomAnchorRemove:s}=n;return ct.useEffect(()=>(i(),()=>s()),[i,s]),(0,Et.jsx)(ii,{...a,...o,ref:t})});$_.displayName=j_;var q_="PopoverTrigger",K_=ct.forwardRef((e,t)=>{let{__scopePopover:r,...o}=e,n=ys(q_,r),a=pm(r),i=de(t,n.triggerRef),s=(0,Et.jsx)(q.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":J_(n.open),...o,ref:i,onClick:W(e.onClick,n.onOpenToggle)});return n.hasCustomAnchor?s:(0,Et.jsx)(ii,{asChild:!0,...a,children:s})});K_.displayName=q_;var MR="PopoverPortal",[EK,AK]=G_(MR,{forceMount:void 0}),DK=e=>{let{__scopePopover:t,forceMount:r,children:o,container:n}=e,a=ys(MR,t);return(0,Et.jsx)(EK,{scope:t,forceMount:r,children:(0,Et.jsx)(lt,{present:r||a.open,children:(0,Et.jsx)(Ro,{asChild:!0,container:n,children:o})})})};DK.displayName=MR;var Zc="PopoverContent",X_=ct.forwardRef((e,t)=>{let r=AK(Zc,e.__scopePopover),{forceMount:o=r.forceMount,...n}=e,a=ys(Zc,e.__scopePopover);return(0,Et.jsx)(lt,{present:o||a.open,children:a.modal?(0,Et.jsx)(OK,{...n,ref:t}):(0,Et.jsx)(FK,{...n,ref:t})})});X_.displayName=Zc;var NK=co("PopoverContent.RemoveScroll"),OK=ct.forwardRef((e,t)=>{let r=ys(Zc,e.__scopePopover),o=ct.useRef(null),n=de(t,o),a=ct.useRef(!1);return ct.useEffect(()=>{let i=o.current;if(i)return xs(i)},[]),(0,Et.jsx)(si,{as:NK,allowPinchZoom:!0,children:(0,Et.jsx)(Y_,{...e,ref:n,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:W(e.onCloseAutoFocus,i=>{i.preventDefault(),a.current||r.triggerRef.current?.focus()}),onPointerDownOutside:W(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:W(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1})})})}),FK=ct.forwardRef((e,t)=>{let r=ys(Zc,e.__scopePopover),o=ct.useRef(!1),n=ct.useRef(!1);return(0,Et.jsx)(Y_,{...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()}})}),Y_=ct.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=ys(Zc,r),p=pm(r);return ps(),(0,Et.jsx)(oi,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:n,onUnmountAutoFocus:a,children:(0,Et.jsx)(qo,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:c,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:u,onDismiss:()=>f.onOpenChange(!1),children:(0,Et.jsx)(hs,{"data-state":J_(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)"}})})})}),Q_="PopoverClose",Z_=ct.forwardRef((e,t)=>{let{__scopePopover:r,...o}=e,n=ys(Q_,r);return(0,Et.jsx)(q.button,{type:"button",...o,ref:t,onClick:W(e.onClick,()=>n.onOpenChange(!1))})});Z_.displayName=Q_;var _K="PopoverArrow",VK=ct.forwardRef((e,t)=>{let{__scopePopover:r,...o}=e,n=pm(r);return(0,Et.jsx)(vs,{...n,...o,ref:t})});VK.displayName=_K;function J_(e){return e?"open":"closed"}var eV=W_,tV=$_,rV=K_;var ER=X_,oV=Z_;var ya=R(N()),aV=K("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"}}),wa=eV,Ca=rV,HK=tV,Vn=nV.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,ya.jsxs)(ya.Fragment,{children:[u&&(0,ya.jsx)("div",{className:"fixed inset-0 z-40 bg-overlay opacity-30"}),(0,ya.jsx)(ER,{ref:f,sideOffset:c,collisionPadding:8,onInteractOutside:p=>{l||p.preventDefault()},className:P(aV({variant:t,size:r,side:o,position:n,radius:a,shadow:i}),s&&"backdrop-blur-md bg-opacity-80",e),...d})]}));Vn.displayName=ER.displayName;var UK=oV,iV=({className:e,...t})=>(0,ya.jsx)("div",{className:P("moonui-theme","my-2 h-px bg-border",e),...t});iV.displayName="PopoverSeparator";var sV=({className:e,...t})=>(0,ya.jsx)("div",{className:P("moonui-theme","-mx-4 -mt-4 mb-3 px-4 pt-4 pb-3 border-b border-border",e),...t});sV.displayName="PopoverHeader";var lV=({className:e,...t})=>(0,ya.jsx)("div",{className:P("moonui-theme","-mx-4 -mb-4 mt-3 px-4 pt-3 pb-4 border-t border-border",e),...t});lV.displayName="PopoverFooter";var gm=R(M());var ui=R(M(),1);var Yt=R(M(),1);var ws=R(N(),1),AR="rovingFocusGroup.onEntryFocus",zK={bubbles:!1,cancelable:!0},mm="RovingFocusGroup",[DR,uV,GK]=Jn(mm),[WK,Jc]=Fe(mm,[GK]),[jK,$K]=WK(mm),cV=Yt.forwardRef((e,t)=>(0,ws.jsx)(DR.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,ws.jsx)(DR.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,ws.jsx)(qK,{...e,ref:t})})}));cV.displayName=mm;var qK=Yt.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=Yt.useRef(null),p=de(t,f),g=ia(a),[m,x]=qe({prop:i,defaultProp:s??null,onChange:l,caller:mm}),[h,v]=Yt.useState(!1),y=nt(u),w=uV(r),C=Yt.useRef(!1),[b,S]=Yt.useState(0);return Yt.useEffect(()=>{let I=f.current;if(I)return I.addEventListener(AR,y),()=>I.removeEventListener(AR,y)},[y]),(0,ws.jsx)(jK,{scope:r,orientation:o,dir:g,loop:n,currentTabStopId:m,onItemFocus:Yt.useCallback(I=>x(I),[x]),onItemShiftTab:Yt.useCallback(()=>v(!0),[]),onFocusableItemAdd:Yt.useCallback(()=>S(I=>I+1),[]),onFocusableItemRemove:Yt.useCallback(()=>S(I=>I-1),[]),children:(0,ws.jsx)(q.div,{tabIndex:h||b===0?-1:0,"data-orientation":o,...d,ref:p,style:{outline:"none",...e.style},onMouseDown:W(e.onMouseDown,()=>{C.current=!0}),onFocus:W(e.onFocus,I=>{let L=!C.current;if(I.target===I.currentTarget&&L&&!h){let T=new CustomEvent(AR,zK);if(I.currentTarget.dispatchEvent(T),!T.defaultPrevented){let k=w().filter(F=>F.focusable),E=k.find(F=>F.active),_=k.find(F=>F.id===m),z=[E,_,...k].filter(Boolean).map(F=>F.ref.current);pV(z,c)}}C.current=!1}),onBlur:W(e.onBlur,()=>v(!1))})})}),dV="RovingFocusGroupItem",fV=Yt.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:r,focusable:o=!0,active:n=!1,tabStopId:a,children:i,...s}=e,l=Ne(),u=a||l,c=$K(dV,r),d=c.currentTabStopId===u,f=uV(r),{onFocusableItemAdd:p,onFocusableItemRemove:g,currentTabStopId:m}=c;return Yt.useEffect(()=>{if(o)return p(),()=>g()},[o,p,g]),(0,ws.jsx)(DR.ItemSlot,{scope:r,id:u,focusable:o,active:n,children:(0,ws.jsx)(q.span,{tabIndex:d?0:-1,"data-orientation":c.orientation,...s,ref:t,onMouseDown:W(e.onMouseDown,x=>{o?c.onItemFocus(u):x.preventDefault()}),onFocus:W(e.onFocus,()=>c.onItemFocus(u)),onKeyDown:W(e.onKeyDown,x=>{if(x.key==="Tab"&&x.shiftKey){c.onItemShiftTab();return}if(x.target!==x.currentTarget)return;let h=YK(x,c.orientation,c.dir);if(h!==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(h==="last")y.reverse();else if(h==="prev"||h==="next"){h==="prev"&&y.reverse();let w=y.indexOf(x.currentTarget);y=c.loop?QK(y,w+1):y.slice(w+1)}setTimeout(()=>pV(y))}}),children:typeof i=="function"?i({isCurrentTabStop:d,hasTabStop:m!=null}):i})})});fV.displayName=dV;var KK={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function XK(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function YK(e,t,r){let o=XK(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return KK[o]}function pV(e,t=!1){let r=document.activeElement;for(let o of e)if(o===r||(o.focus({preventScroll:t}),document.activeElement!==r))return}function QK(e,t){return e.map((r,o)=>e[(t+o)%e.length])}var Xx=cV,Yx=fV;var li=R(N(),1),Qx="Tabs",[ZK,d1e]=Fe(Qx,[Jc]),gV=Jc(),[JK,NR]=ZK(Qx),hV=ui.forwardRef((e,t)=>{let{__scopeTabs:r,value:o,onValueChange:n,defaultValue:a,orientation:i="horizontal",dir:s,activationMode:l="automatic",...u}=e,c=ia(s),[d,f]=qe({prop:o,onChange:n,defaultProp:a??"",caller:Qx});return(0,li.jsx)(JK,{scope:r,baseId:Ne(),value:d,onValueChange:f,orientation:i,dir:c,activationMode:l,children:(0,li.jsx)(q.div,{dir:c,"data-orientation":i,...u,ref:t})})});hV.displayName=Qx;var vV="TabsList",xV=ui.forwardRef((e,t)=>{let{__scopeTabs:r,loop:o=!0,...n}=e,a=NR(vV,r),i=gV(r);return(0,li.jsx)(Xx,{asChild:!0,...i,orientation:a.orientation,dir:a.dir,loop:o,children:(0,li.jsx)(q.div,{role:"tablist","aria-orientation":a.orientation,...n,ref:t})})});xV.displayName=vV;var yV="TabsTrigger",wV=ui.forwardRef((e,t)=>{let{__scopeTabs:r,value:o,disabled:n=!1,...a}=e,i=NR(yV,r),s=gV(r),l=bV(i.baseId,o),u=RV(i.baseId,o),c=o===i.value;return(0,li.jsx)(Yx,{asChild:!0,...s,focusable:!n,active:c,children:(0,li.jsx)(q.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:W(e.onMouseDown,d=>{!n&&d.button===0&&d.ctrlKey===!1?i.onValueChange(o):d.preventDefault()}),onKeyDown:W(e.onKeyDown,d=>{[" ","Enter"].includes(d.key)&&i.onValueChange(o)}),onFocus:W(e.onFocus,()=>{let d=i.activationMode!=="manual";!c&&!n&&d&&i.onValueChange(o)})})})});wV.displayName=yV;var CV="TabsContent",SV=ui.forwardRef((e,t)=>{let{__scopeTabs:r,value:o,forceMount:n,children:a,...i}=e,s=NR(CV,r),l=bV(s.baseId,o),u=RV(s.baseId,o),c=o===s.value,d=ui.useRef(c);return ui.useEffect(()=>{let f=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(f)},[]),(0,li.jsx)(lt,{present:n||c,children:({present:f})=>(0,li.jsx)(q.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})})});SV.displayName=CV;function bV(e,t){return`${e}-trigger-${t}`}function RV(e,t){return`${e}-content-${t}`}var OR=hV,FR=xV,_R=wV,VR=SV;var ci=R(N()),hm=gm.forwardRef(({vertical:e=!1,...t},r)=>(0,ci.jsx)(OR,{ref:r,className:P("moonui-theme",t.className),orientation:e?"vertical":"horizontal",...t}));hm.displayName=OR.displayName;var tX=K("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-3 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"},scrollable:{true:"overflow-x-auto overflow-y-hidden flex-nowrap hide-scrollbar",false:"flex-wrap"}},defaultVariants:{variant:"default",orientation:"horizontal",fullWidth:!1,scrollable:!1}}),vm=gm.forwardRef(({className:e,variant:t,orientation:r,fullWidth:o,scrollable:n,...a},i)=>(0,ci.jsx)(FR,{ref:i,className:P("moonui-theme",tX({variant:t,orientation:r,fullWidth:o,scrollable:n,className:e})),...a}));vm.displayName=FR.displayName;var rX=K("inline-flex items-center justify-center whitespace-nowrap flex-shrink-0 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-lg bg-gray-100 hover:bg-gray-200/80 border border-gray-300 data-[state=active]:bg-primary data-[state=active]:text-primary-foreground data-[state=active]:border-primary dark:bg-gray-800 dark:hover:bg-gray-700 dark:border-gray-700 dark:data-[state=active]:bg-primary/90 dark:data-[state=active]:text-white dark:data-[state=active]:border-primary",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}}),Kl=gm.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,ci.jsxs)(_R,{ref:d,className:P("moonui-theme",rX({variant:t,size:r,orientation:s,fullWidth:l}),i&&"data-[state=inactive]:opacity-60",e),...c,children:[o&&n==="left"&&(0,ci.jsx)("span",{className:"mr-2",children:o}),u,o&&n==="right"&&(0,ci.jsx)("span",{className:"ml-2",children:o}),a&&(0,ci.jsx)("span",{className:"ml-2",children:a})]}));Kl.displayName=_R.displayName;var Xl=gm.forwardRef(({className:e,animated:t=!1,...r},o)=>(0,ci.jsx)(VR,{ref:o,className:P("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}));Xl.displayName=VR.displayName;var Cs=R(M());var Sa=R(N()),oX=K("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"}}),nX=K("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"}}),aX=K("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"}}),iX=K("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"}}),ba=Cs.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},g)=>{let[m,x]=Cs.useState(u||c||[0]);Cs.useEffect(()=>{u!==void 0&&x(u)},[u]);let h=k=>s?s(k):`${Math.round(k*100)/100}`,v=(k,E,_)=>(k-E)/(_-E)*100,y=Cs.useRef(null),w=p.min||0,C=p.max||100,b=p.step||1,S=k=>{let E=k.map(_=>{if(b<1){let D=b.toString().split(".")[1]?.length||0;return Math.round(_*Math.pow(10,D))/Math.pow(10,D)}return Math.round(_)});x(E),d&&d(E)},I=k=>{if(f)return;let E=y.current;if(!E)return;let _=E.getBoundingClientRect(),D=(k.clientX-_.left)/_.width,z=w+D*(C-w),F=Math.round(z/b)*b,O=Math.max(w,Math.min(C,F)),B=[...m];B[0]=O,S(B)},L=k=>E=>{if(f)return;E.preventDefault();let _=z=>{let F=y.current;if(!F)return;let O=F.getBoundingClientRect(),B=(z.clientX-O.left)/O.width,A=w+B*(C-w),te=Math.round(A/b)*b,ae=Math.max(w,Math.min(C,te)),V=[...m];V[k]=ae,S(V)},D=()=>{document.removeEventListener("mousemove",_),document.removeEventListener("mouseup",D)};document.addEventListener("mousemove",_),document.addEventListener("mouseup",D)},T=k=>E=>{if(f)return;let _=b*10,D=m[k],z;switch(E.key){case"ArrowRight":case"ArrowUp":z=D+b;break;case"ArrowLeft":case"ArrowDown":z=D-b;break;case"PageUp":z=D+_;break;case"PageDown":z=D-_;break;case"Home":z=w;break;case"End":z=C;break;default:return}E.preventDefault();let F=k>0?m[k-1]:w,O=k<m.length-1?m[k+1]:C,B=Math.max(F,Math.min(O,z)),A=[...m];A[k]=B,S(A)};return(0,Sa.jsxs)("div",{className:"w-full",ref:g,...p,children:[i&&(0,Sa.jsx)("div",{className:P("flex justify-end mb-1 text-sm text-muted-foreground",l),children:m.length===1?(0,Sa.jsx)("span",{children:h(m[0])}):(0,Sa.jsxs)("span",{children:[h(m[0])," - ",h(m[m.length-1])]})}),(0,Sa.jsxs)("div",{className:P("moonui-theme",oX({size:t}),e),"data-disabled":f?!0:void 0,children:[(0,Sa.jsx)("div",{ref:y,className:P(nX({variant:r||n||"default"})),onClick:I,children:(0,Sa.jsx)("div",{className:P(aX({variant:o||n||"primary"})),style:{left:"0%",width:`${v(m[0],w,C)}%`}})}),m.map((k,E)=>(0,Sa.jsx)("div",{className:P(iX({variant:n||"primary",size:a})),style:{left:`${v(k,w,C)}%`,transform:"translateX(-50%)",position:"absolute",top:"50%",marginTop:a==="sm"?"-6px":a==="lg"?"-12px":"-8px",cursor:f?"not-allowed":"pointer"},onMouseDown:L(E),onKeyDown:T(E),"aria-label":`Thumb ${E+1}`,tabIndex:f?-1:0,role:"slider","aria-valuemin":w,"aria-valuemax":C,"aria-valuenow":k,"aria-disabled":f},E))]})]})});ba.displayName="Slider";var j=R(N()),IV=K("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 PV(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 LV(e,t,r){return"#"+((1<<24)+(e<<16)+(t<<8)+r).toString(16).slice(1)}function sX(e){let t=PV(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 lX(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 LV(Math.round(o*255),Math.round(n*255),Math.round(a*255))}var TV=["#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 Zx({className:e,size:t,shape:r,value:o="#000000",onChange:n,showInput:a=!0,showPresets:i=!0,presets:s=TV,allowOpacity:l=!1,format:u="hex",disableCopy:c=!1,triggerMode:d="click",disabled:f,...p}){let[g,m]=Zo.useState(!1),[x,h]=Zo.useState(o),[v,y]=Zo.useState(100),[w,C]=Zo.useState(!1),[b,S]=Zo.useState(o),I=Zo.useMemo(()=>sX(x)||{h:0,s:0,l:0},[x]),L=Zo.useMemo(()=>PV(x)||{r:0,g:0,b:0},[x]);Zo.useEffect(()=>{h(o),S(o)},[o]);let T=F=>{h(F),S(F),n?.(F)},k=(F,O)=>{let B={...I,[F]:O},A=lX(B.h,B.s,B.l);T(A)},E=(F,O)=>{let B={...L,[F]:O},A=LV(B.r,B.g,B.b);T(A)},_=F=>{let O=F.target.value;S(O),/^#[0-9A-F]{6}$/i.test(O)&&T(O)},D=async()=>{try{let F=x;u==="rgb"?F=`rgb(${L.r}, ${L.g}, ${L.b})`:u==="hsl"&&(F=`hsl(${I.h}, ${I.s}%, ${I.l}%)`),await navigator.clipboard.writeText(F),C(!0),setTimeout(()=>C(!1),2e3)}catch(F){console.error("Failed to copy:",F)}},z=()=>u==="rgb"?`rgb(${L.r}, ${L.g}, ${L.b})`:u==="hsl"?`hsl(${I.h}, ${I.s}%, ${I.l}%)`:x;return(0,j.jsxs)(wa,{open:g,onOpenChange:m,children:[(0,j.jsx)(Ca,{asChild:!0,children:(0,j.jsx)(Ee,{variant:"outline",className:P(IV({size:t,shape:r}),"p-0 border-2",e),style:{backgroundColor:x},disabled:f,...p,children:(0,j.jsx)("span",{className:"sr-only",children:"Pick a color"})})}),(0,j.jsxs)(Vn,{className:"w-80",align:"start",sideOffset:8,children:[(0,j.jsxs)(hm,{defaultValue:"picker",className:"w-full",children:[(0,j.jsxs)(vm,{className:"grid w-full grid-cols-3",children:[(0,j.jsx)(Kl,{value:"picker",children:"Picker"}),(0,j.jsx)(Kl,{value:"sliders",children:"Sliders"}),(0,j.jsx)(Kl,{value:"input",children:"Input"})]}),(0,j.jsxs)(Xl,{value:"picker",className:"space-y-4",children:[(0,j.jsxs)("div",{className:"relative h-48 rounded-md overflow-hidden",children:[(0,j.jsx)("div",{className:"absolute inset-0",style:{background:`linear-gradient(to right, #fff, hsl(${I.h}, 100%, 50%))`}}),(0,j.jsx)("div",{className:"absolute inset-0",style:{background:"linear-gradient(to bottom, transparent, #000)"}}),(0,j.jsx)(He.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:`${I.s/100*280-8}px`,top:`${(1-I.l/100)*192-8}px`}})]}),(0,j.jsxs)("div",{className:"space-y-2",children:[(0,j.jsx)(Ur,{children:"Hue"}),(0,j.jsx)("div",{className:"relative h-3 rounded-full",style:{background:"linear-gradient(to right, #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000)"},children:(0,j.jsx)(ba,{value:[I.h],onValueChange:([F])=>k("h",F),max:360,step:1,className:"absolute inset-0"})})]}),l&&(0,j.jsxs)("div",{className:"space-y-2",children:[(0,j.jsx)(Ur,{children:"Opacity"}),(0,j.jsxs)("div",{className:"flex items-center gap-3",children:[(0,j.jsx)(ba,{value:[v],onValueChange:([F])=>y(F),max:100,step:1,className:"flex-1"}),(0,j.jsxs)("span",{className:"text-sm w-10 text-right",children:[v,"%"]})]})]})]}),(0,j.jsxs)(Xl,{value:"sliders",className:"space-y-4",children:[(0,j.jsxs)("div",{className:"space-y-3",children:[(0,j.jsxs)("div",{className:"space-y-2",children:[(0,j.jsxs)("div",{className:"flex items-center justify-between",children:[(0,j.jsx)(Ur,{children:"Red"}),(0,j.jsx)("span",{className:"text-sm text-muted-foreground",children:L.r})]}),(0,j.jsx)(ba,{value:[L.r],onValueChange:([F])=>E("r",F),max:255,step:1,className:"[&_[role=slider]]:bg-red-500"})]}),(0,j.jsxs)("div",{className:"space-y-2",children:[(0,j.jsxs)("div",{className:"flex items-center justify-between",children:[(0,j.jsx)(Ur,{children:"Green"}),(0,j.jsx)("span",{className:"text-sm text-muted-foreground",children:L.g})]}),(0,j.jsx)(ba,{value:[L.g],onValueChange:([F])=>E("g",F),max:255,step:1,className:"[&_[role=slider]]:bg-green-500"})]}),(0,j.jsxs)("div",{className:"space-y-2",children:[(0,j.jsxs)("div",{className:"flex items-center justify-between",children:[(0,j.jsx)(Ur,{children:"Blue"}),(0,j.jsx)("span",{className:"text-sm text-muted-foreground",children:L.b})]}),(0,j.jsx)(ba,{value:[L.b],onValueChange:([F])=>E("b",F),max:255,step:1,className:"[&_[role=slider]]:bg-blue-500"})]})]}),(0,j.jsx)("div",{className:"pt-2 border-t",children:(0,j.jsxs)("div",{className:"grid grid-cols-3 gap-2 text-sm",children:[(0,j.jsxs)("div",{children:[(0,j.jsx)("p",{className:"text-muted-foreground",children:"H"}),(0,j.jsxs)("p",{className:"font-medium",children:[I.h,"\xB0"]})]}),(0,j.jsxs)("div",{children:[(0,j.jsx)("p",{className:"text-muted-foreground",children:"S"}),(0,j.jsxs)("p",{className:"font-medium",children:[I.s,"%"]})]}),(0,j.jsxs)("div",{children:[(0,j.jsx)("p",{className:"text-muted-foreground",children:"L"}),(0,j.jsxs)("p",{className:"font-medium",children:[I.l,"%"]})]})]})})]}),(0,j.jsxs)(Xl,{value:"input",className:"space-y-4",children:[(0,j.jsxs)("div",{className:"space-y-2",children:[(0,j.jsx)(Ur,{children:"Hex Color"}),(0,j.jsxs)("div",{className:"flex gap-2",children:[(0,j.jsx)(ur,{value:b,onChange:_,placeholder:"#000000",className:"font-mono"}),(0,j.jsx)(Ee,{size:"icon",variant:"outline",onClick:()=>T(b),children:(0,j.jsx)(xr,{className:"h-4 w-4"})})]})]}),(0,j.jsxs)("div",{className:"space-y-2",children:[(0,j.jsx)(Ur,{children:"RGB Values"}),(0,j.jsxs)("div",{className:"grid grid-cols-3 gap-2",children:[(0,j.jsx)(ur,{type:"number",value:L.r,onChange:F=>E("r",parseInt(F.target.value)||0),min:0,max:255,className:"text-center"}),(0,j.jsx)(ur,{type:"number",value:L.g,onChange:F=>E("g",parseInt(F.target.value)||0),min:0,max:255,className:"text-center"}),(0,j.jsx)(ur,{type:"number",value:L.b,onChange:F=>E("b",parseInt(F.target.value)||0),min:0,max:255,className:"text-center"})]})]})]})]}),(0,j.jsxs)("div",{className:"mt-4 flex items-center justify-between p-3 border rounded-lg",children:[(0,j.jsxs)("div",{className:"flex items-center gap-3",children:[(0,j.jsx)("div",{className:P("h-10 w-10 rounded border-2",IV({shape:r})),style:{backgroundColor:x}}),(0,j.jsxs)("div",{children:[(0,j.jsx)("p",{className:"text-sm font-medium",children:z()}),(0,j.jsx)("p",{className:"text-xs text-muted-foreground",children:"Current color"})]})]}),!c&&(0,j.jsx)(Ee,{size:"icon",variant:"ghost",onClick:D,className:"h-8 w-8",children:(0,j.jsx)(Ka,{mode:"wait",children:w?(0,j.jsx)(He.div,{initial:{scale:0},animate:{scale:1},exit:{scale:0},children:(0,j.jsx)(xr,{className:"h-4 w-4 text-green-600"})},"check"):(0,j.jsx)(He.div,{initial:{scale:0},animate:{scale:1},exit:{scale:0},children:(0,j.jsx)(Df,{className:"h-4 w-4"})},"copy")})})]}),i&&s.length>0&&(0,j.jsxs)("div",{className:"mt-4 space-y-2",children:[(0,j.jsx)(Ur,{children:"Preset Colors"}),(0,j.jsx)("div",{className:"grid grid-cols-10 gap-1",children:s.map(F=>(0,j.jsx)("button",{type:"button","aria-label":`Select color ${F}`,"aria-pressed":x===F,className:P("h-7 w-7 rounded border-2 transition-all hover:scale-110","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",x===F?"border-primary":"border-transparent"),style:{backgroundColor:F},onClick:()=>T(F)},F))})]})]})]})}function kV({value:e="#000000",onChange:t,colors:r=TV.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,j.jsx)("div",{className:P("moonui-theme","flex flex-wrap gap-2",o),children:r.map(i=>(0,j.jsx)("button",{type:"button","aria-label":`Select color ${i}`,"aria-pressed":e===i,className:P("rounded-full border-2 transition-all hover:scale-110","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",a[n],e===i?"border-primary ring-2 ring-primary/20":"border-transparent"),style:{backgroundColor:i},onClick:()=>t?.(i)},i))})}function MV({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,j.jsxs)("div",{className:P("moonui-theme","space-y-4",r),children:[(0,j.jsx)("div",{className:"h-20 rounded-lg border-2",style:{background:`linear-gradient(${o.angle}deg, ${o.start}, ${o.end})`}}),(0,j.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,j.jsxs)("div",{className:"space-y-2",children:[(0,j.jsx)(Ur,{children:"Start Color"}),(0,j.jsx)(Zx,{value:o.start,onChange:i=>a("start",i),size:"sm"})]}),(0,j.jsxs)("div",{className:"space-y-2",children:[(0,j.jsx)(Ur,{children:"End Color"}),(0,j.jsx)(Zx,{value:o.end,onChange:i=>a("end",i),size:"sm"})]})]}),(0,j.jsxs)("div",{className:"space-y-2",children:[(0,j.jsxs)("div",{className:"flex items-center justify-between",children:[(0,j.jsx)(Ur,{children:"Angle"}),(0,j.jsxs)("span",{className:"text-sm text-muted-foreground",children:[o.angle,"\xB0"]})]}),(0,j.jsx)(ba,{value:[o.angle||90],onValueChange:([i])=>a("angle",i),max:360,step:1})]})]})}var Rs=R(M());var EV=1,uX=.9,cX=.8,dX=.17,BR=.1,HR=.999,fX=.9999,pX=.99,mX=/[\\\/_+.#"@\[\(\{&]/,gX=/[\\\/_+.#"@\[\(\{&]/g,hX=/[\s-]/,DV=/[\s-]/g;function UR(e,t,r,o,n,a,i){if(a===t.length)return n===e.length?EV:pX;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,g;u>=0;)d=UR(e,t,r,o,u+1,a+1,i),d>c&&(u===n?d*=EV:mX.test(e.charAt(u-1))?(d*=cX,p=e.slice(n,u-1).match(gX),p&&n>0&&(d*=Math.pow(HR,p.length))):hX.test(e.charAt(u-1))?(d*=uX,g=e.slice(n,u-1).match(DV),g&&n>0&&(d*=Math.pow(HR,g.length))):(d*=dX,n>0&&(d*=Math.pow(HR,u-n))),e.charAt(u)!==t.charAt(a)&&(d*=fX)),(d<BR&&r.charAt(u-1)===o.charAt(a+1)||o.charAt(a+1)===o.charAt(a)&&r.charAt(u-1)!==o.charAt(a))&&(f=UR(e,t,r,o,u+1,a+2,i),f*BR>d&&(d=f*BR)),d>c&&(c=d),u=r.indexOf(l,u+1);return i[s]=c,c}function AV(e){return e.toLowerCase().replace(DV," ")}function NV(e,t,r){return e=r&&r.length>0?`${e+" "+r.join(" ")}`:e,UR(e,t,AV(e),AV(t),0,0,{})}var Ze=R(M(),1);var je=R(N(),1),ey="Dialog",[OV,q1e]=Fe(ey),[vX,Bn]=OV(ey),FV=e=>{let{__scopeDialog:t,children:r,open:o,defaultOpen:n,onOpenChange:a,modal:i=!0}=e,s=Ze.useRef(null),l=Ze.useRef(null),[u,c]=qe({prop:o,defaultProp:n??!1,onChange:a,caller:ey});return(0,je.jsx)(vX,{scope:t,triggerRef:s,contentRef:l,contentId:Ne(),titleId:Ne(),descriptionId:Ne(),open:u,onOpenChange:c,onOpenToggle:Ze.useCallback(()=>c(d=>!d),[c]),modal:i,children:r})};FV.displayName=ey;var _V="DialogTrigger",VV=Ze.forwardRef((e,t)=>{let{__scopeDialog:r,...o}=e,n=Bn(_V,r),a=de(t,n.triggerRef);return(0,je.jsx)(q.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":WR(n.open),...o,ref:a,onClick:W(e.onClick,n.onOpenToggle)})});VV.displayName=_V;var zR="DialogPortal",[xX,BV]=OV(zR,{forceMount:void 0}),HV=e=>{let{__scopeDialog:t,forceMount:r,children:o,container:n}=e,a=Bn(zR,t);return(0,je.jsx)(xX,{scope:t,forceMount:r,children:Ze.Children.map(o,i=>(0,je.jsx)(lt,{present:r||a.open,children:(0,je.jsx)(Ro,{asChild:!0,container:n,children:i})}))})};HV.displayName=zR;var Jx="DialogOverlay",UV=Ze.forwardRef((e,t)=>{let r=BV(Jx,e.__scopeDialog),{forceMount:o=r.forceMount,...n}=e,a=Bn(Jx,e.__scopeDialog);return a.modal?(0,je.jsx)(lt,{present:o||a.open,children:(0,je.jsx)(wX,{...n,ref:t})}):null});UV.displayName=Jx;var yX=co("DialogOverlay.RemoveScroll"),wX=Ze.forwardRef((e,t)=>{let{__scopeDialog:r,...o}=e,n=Bn(Jx,r);return(0,je.jsx)(si,{as:yX,allowPinchZoom:!0,shards:[n.contentRef],children:(0,je.jsx)(q.div,{"data-state":WR(n.open),...o,ref:t,style:{pointerEvents:"auto",...o.style}})})}),Yl="DialogContent",zV=Ze.forwardRef((e,t)=>{let r=BV(Yl,e.__scopeDialog),{forceMount:o=r.forceMount,...n}=e,a=Bn(Yl,e.__scopeDialog);return(0,je.jsx)(lt,{present:o||a.open,children:a.modal?(0,je.jsx)(CX,{...n,ref:t}):(0,je.jsx)(SX,{...n,ref:t})})});zV.displayName=Yl;var CX=Ze.forwardRef((e,t)=>{let r=Bn(Yl,e.__scopeDialog),o=Ze.useRef(null),n=de(t,r.contentRef,o);return Ze.useEffect(()=>{let a=o.current;if(a)return xs(a)},[]),(0,je.jsx)(GV,{...e,ref:n,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:W(e.onCloseAutoFocus,a=>{a.preventDefault(),r.triggerRef.current?.focus()}),onPointerDownOutside:W(e.onPointerDownOutside,a=>{let i=a.detail.originalEvent,s=i.button===0&&i.ctrlKey===!0;(i.button===2||s)&&a.preventDefault()}),onFocusOutside:W(e.onFocusOutside,a=>a.preventDefault())})}),SX=Ze.forwardRef((e,t)=>{let r=Bn(Yl,e.__scopeDialog),o=Ze.useRef(!1),n=Ze.useRef(!1);return(0,je.jsx)(GV,{...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()}})}),GV=Ze.forwardRef((e,t)=>{let{__scopeDialog:r,trapFocus:o,onOpenAutoFocus:n,onCloseAutoFocus:a,...i}=e,s=Bn(Yl,r),l=Ze.useRef(null),u=de(t,l);return ps(),(0,je.jsxs)(je.Fragment,{children:[(0,je.jsx)(oi,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:n,onUnmountAutoFocus:a,children:(0,je.jsx)(qo,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":WR(s.open),...i,ref:u,onDismiss:()=>s.onOpenChange(!1)})}),(0,je.jsxs)(je.Fragment,{children:[(0,je.jsx)(bX,{titleId:s.titleId}),(0,je.jsx)(IX,{contentRef:l,descriptionId:s.descriptionId})]})]})}),GR="DialogTitle",WV=Ze.forwardRef((e,t)=>{let{__scopeDialog:r,...o}=e,n=Bn(GR,r);return(0,je.jsx)(q.h2,{id:n.titleId,...o,ref:t})});WV.displayName=GR;var jV="DialogDescription",$V=Ze.forwardRef((e,t)=>{let{__scopeDialog:r,...o}=e,n=Bn(jV,r);return(0,je.jsx)(q.p,{id:n.descriptionId,...o,ref:t})});$V.displayName=jV;var qV="DialogClose",KV=Ze.forwardRef((e,t)=>{let{__scopeDialog:r,...o}=e,n=Bn(qV,r);return(0,je.jsx)(q.button,{type:"button",...o,ref:t,onClick:W(e.onClick,()=>n.onOpenChange(!1))})});KV.displayName=qV;function WR(e){return e?"open":"closed"}var XV="DialogTitleWarning",[K1e,YV]=G1(XV,{contentName:Yl,titleName:GR,docsSlug:"dialog"}),bX=({titleId:e})=>{let t=YV(XV),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
60
|
-
|
|
61
|
-
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
62
|
-
|
|
63
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return Ze.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},RX="DialogDescriptionWarning",IX=({contentRef:e,descriptionId:t})=>{let o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${YV(RX).contentName}}.`;return Ze.useEffect(()=>{let n=e.current?.getAttribute("aria-describedby");t&&n&&(document.getElementById(t)||console.warn(o))},[o,e,t]),null},ty=FV,QV=VV,ry=HV,xm=UV,ym=zV,jR=WV,$R=$V,qR=KV;var ee=R(M(),1);var wm='[cmdk-group=""]',KR='[cmdk-group-items=""]',PX='[cmdk-group-heading=""]',eB='[cmdk-item=""]',JV=`${eB}:not([aria-disabled="true"])`,XR="cmdk-item-select",ed="data-value",LX=(e,t,r)=>NV(e,t,r),tB=ee.createContext(void 0),Cm=()=>ee.useContext(tB),rB=ee.createContext(void 0),YR=()=>ee.useContext(rB),oB=ee.createContext(void 0),nB=ee.forwardRef((e,t)=>{let r=td(()=>{var V,Q;return{search:"",value:(Q=(V=e.value)!=null?V:e.defaultValue)!=null?Q:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),o=td(()=>new Set),n=td(()=>new Map),a=td(()=>new Map),i=td(()=>new Set),s=aB(e),{label:l,children:u,value:c,onValueChange:d,filter:f,shouldFilter:p,loop:g,disablePointerSelection:m=!1,vimBindings:x=!0,...h}=e,v=Ne(),y=Ne(),w=Ne(),C=ee.useRef(null),b=VX();Ql(()=>{if(c!==void 0){let V=c.trim();r.current.value=V,S.emit()}},[c]),Ql(()=>{b(6,_)},[]);let S=ee.useMemo(()=>({subscribe:V=>(i.current.add(V),()=>i.current.delete(V)),snapshot:()=>r.current,setState:(V,Q,re)=>{var Y,ce,U,ne;if(!Object.is(r.current[V],Q)){if(r.current[V]=Q,V==="search")E(),T(),b(1,k);else if(V==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let he=document.getElementById(w);he?he.focus():(Y=document.getElementById(v))==null||Y.focus()}if(b(7,()=>{var he;r.current.selectedItemId=(he=D())==null?void 0:he.id,S.emit()}),re||b(5,_),((ce=s.current)==null?void 0:ce.value)!==void 0){let he=Q??"";(ne=(U=s.current).onValueChange)==null||ne.call(U,he);return}}S.emit()}},emit:()=>{i.current.forEach(V=>V())}}),[]),I=ee.useMemo(()=>({value:(V,Q,re)=>{var Y;Q!==((Y=a.current.get(V))==null?void 0:Y.value)&&(a.current.set(V,{value:Q,keywords:re}),r.current.filtered.items.set(V,L(Q,re)),b(2,()=>{T(),S.emit()}))},item:(V,Q)=>(o.current.add(V),Q&&(n.current.has(Q)?n.current.get(Q).add(V):n.current.set(Q,new Set([V]))),b(3,()=>{E(),T(),r.current.value||k(),S.emit()}),()=>{a.current.delete(V),o.current.delete(V),r.current.filtered.items.delete(V);let re=D();b(4,()=>{E(),re?.getAttribute("id")===V&&k(),S.emit()})}),group:V=>(n.current.has(V)||n.current.set(V,new Set),()=>{a.current.delete(V),n.current.delete(V)}),filter:()=>s.current.shouldFilter,label:l||e["aria-label"],getDisablePointerSelection:()=>s.current.disablePointerSelection,listId:v,inputId:w,labelId:y,listInnerRef:C}),[]);function L(V,Q){var re,Y;let ce=(Y=(re=s.current)==null?void 0:re.filter)!=null?Y:LX;return V?ce(V,r.current.search,Q):0}function T(){if(!r.current.search||s.current.shouldFilter===!1)return;let V=r.current.filtered.items,Q=[];r.current.filtered.groups.forEach(Y=>{let ce=n.current.get(Y),U=0;ce.forEach(ne=>{let he=V.get(ne);U=Math.max(he,U)}),Q.push([Y,U])});let re=C.current;z().sort((Y,ce)=>{var U,ne;let he=Y.getAttribute("id"),xe=ce.getAttribute("id");return((U=V.get(xe))!=null?U:0)-((ne=V.get(he))!=null?ne:0)}).forEach(Y=>{let ce=Y.closest(KR);ce?ce.appendChild(Y.parentElement===ce?Y:Y.closest(`${KR} > *`)):re.appendChild(Y.parentElement===re?Y:Y.closest(`${KR} > *`))}),Q.sort((Y,ce)=>ce[1]-Y[1]).forEach(Y=>{var ce;let U=(ce=C.current)==null?void 0:ce.querySelector(`${wm}[${ed}="${encodeURIComponent(Y[0])}"]`);U?.parentElement.appendChild(U)})}function k(){let V=z().find(re=>re.getAttribute("aria-disabled")!=="true"),Q=V?.getAttribute(ed);S.setState("value",Q||void 0)}function E(){var V,Q,re,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 U of o.current){let ne=(Q=(V=a.current.get(U))==null?void 0:V.value)!=null?Q:"",he=(Y=(re=a.current.get(U))==null?void 0:re.keywords)!=null?Y:[],xe=L(ne,he);r.current.filtered.items.set(U,xe),xe>0&&ce++}for(let[U,ne]of n.current)for(let he of ne)if(r.current.filtered.items.get(he)>0){r.current.filtered.groups.add(U);break}r.current.filtered.count=ce}function _(){var V,Q,re;let Y=D();Y&&(((V=Y.parentElement)==null?void 0:V.firstChild)===Y&&((re=(Q=Y.closest(wm))==null?void 0:Q.querySelector(PX))==null||re.scrollIntoView({block:"nearest"})),Y.scrollIntoView({block:"nearest"}))}function D(){var V;return(V=C.current)==null?void 0:V.querySelector(`${eB}[aria-selected="true"]`)}function z(){var V;return Array.from(((V=C.current)==null?void 0:V.querySelectorAll(JV))||[])}function F(V){let Q=z()[V];Q&&S.setState("value",Q.getAttribute(ed))}function O(V){var Q;let re=D(),Y=z(),ce=Y.findIndex(ne=>ne===re),U=Y[ce+V];(Q=s.current)!=null&&Q.loop&&(U=ce+V<0?Y[Y.length-1]:ce+V===Y.length?Y[0]:Y[ce+V]),U&&S.setState("value",U.getAttribute(ed))}function B(V){let Q=D(),re=Q?.closest(wm),Y;for(;re&&!Y;)re=V>0?FX(re,wm):_X(re,wm),Y=re?.querySelector(JV);Y?S.setState("value",Y.getAttribute(ed)):O(V)}let A=()=>F(z().length-1),te=V=>{V.preventDefault(),V.metaKey?A():V.altKey?B(1):O(1)},ae=V=>{V.preventDefault(),V.metaKey?F(0):V.altKey?B(-1):O(-1)};return ee.createElement(q.div,{ref:t,tabIndex:-1,...h,"cmdk-root":"",onKeyDown:V=>{var Q;(Q=h.onKeyDown)==null||Q.call(h,V);let re=V.nativeEvent.isComposing||V.keyCode===229;if(!(V.defaultPrevented||re))switch(V.key){case"n":case"j":{x&&V.ctrlKey&&te(V);break}case"ArrowDown":{te(V);break}case"p":case"k":{x&&V.ctrlKey&&ae(V);break}case"ArrowUp":{ae(V);break}case"Home":{V.preventDefault(),F(0);break}case"End":{V.preventDefault(),A();break}case"Enter":{V.preventDefault();let Y=D();if(Y){let ce=new Event(XR);Y.dispatchEvent(ce)}}}}},ee.createElement("label",{"cmdk-label":"",htmlFor:I.inputId,id:I.labelId,style:HX},l),oy(e,V=>ee.createElement(rB.Provider,{value:S},ee.createElement(tB.Provider,{value:I},V))))}),TX=ee.forwardRef((e,t)=>{var r,o;let n=Ne(),a=ee.useRef(null),i=ee.useContext(oB),s=Cm(),l=aB(e),u=(o=(r=l.current)==null?void 0:r.forceMount)!=null?o:i?.forceMount;Ql(()=>{if(!u)return s.item(n,i?.id)},[u]);let c=iB(n,a,[e.value,e.children,a],e.keywords),d=YR(),f=Ss(b=>b.value&&b.value===c.current),p=Ss(b=>u||s.filter()===!1?!0:b.search?b.filtered.items.get(n)>0:!0);ee.useEffect(()=>{let b=a.current;if(!(!b||e.disabled))return b.addEventListener(XR,g),()=>b.removeEventListener(XR,g)},[p,e.onSelect,e.disabled]);function g(){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:h,onSelect:v,forceMount:y,keywords:w,...C}=e;return ee.createElement(q.div,{ref:uo(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:g},e.children)}),kX=ee.forwardRef((e,t)=>{let{heading:r,children:o,forceMount:n,...a}=e,i=Ne(),s=ee.useRef(null),l=ee.useRef(null),u=Ne(),c=Cm(),d=Ss(p=>n||c.filter()===!1?!0:p.search?p.filtered.groups.has(i):!0);Ql(()=>c.group(i),[]),iB(i,s,[e.value,e.heading,l]);let f=ee.useMemo(()=>({id:i,forceMount:n}),[n]);return ee.createElement(q.div,{ref:uo(s,t),...a,"cmdk-group":"",role:"presentation",hidden:d?void 0:!0},r&&ee.createElement("div",{ref:l,"cmdk-group-heading":"","aria-hidden":!0,id:u},r),oy(e,p=>ee.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?u:void 0},ee.createElement(oB.Provider,{value:f},p))))}),MX=ee.forwardRef((e,t)=>{let{alwaysRender:r,...o}=e,n=ee.useRef(null),a=Ss(i=>!i.search);return!r&&!a?null:ee.createElement(q.div,{ref:uo(n,t),...o,"cmdk-separator":"",role:"separator"})}),EX=ee.forwardRef((e,t)=>{let{onValueChange:r,...o}=e,n=e.value!=null,a=YR(),i=Ss(u=>u.search),s=Ss(u=>u.selectedItemId),l=Cm();return ee.useEffect(()=>{e.value!=null&&a.setState("search",e.value)},[e.value]),ee.createElement(q.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)}})}),AX=ee.forwardRef((e,t)=>{let{children:r,label:o="Suggestions",...n}=e,a=ee.useRef(null),i=ee.useRef(null),s=Ss(u=>u.selectedItemId),l=Cm();return ee.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)}}},[]),ee.createElement(q.div,{ref:uo(a,t),...n,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":s,"aria-label":o,id:l.listId},oy(e,u=>ee.createElement("div",{ref:uo(i,l.listInnerRef),"cmdk-list-sizer":""},u)))}),DX=ee.forwardRef((e,t)=>{let{open:r,onOpenChange:o,overlayClassName:n,contentClassName:a,container:i,...s}=e;return ee.createElement(ty,{open:r,onOpenChange:o},ee.createElement(ry,{container:i},ee.createElement(xm,{"cmdk-overlay":"",className:n}),ee.createElement(ym,{"aria-label":e.label,"cmdk-dialog":"",className:a},ee.createElement(nB,{ref:t,...s}))))}),NX=ee.forwardRef((e,t)=>Ss(r=>r.filtered.count===0)?ee.createElement(q.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),OX=ee.forwardRef((e,t)=>{let{progress:r,children:o,label:n="Loading...",...a}=e;return ee.createElement(q.div,{ref:t,...a,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":n},oy(e,i=>ee.createElement("div",{"aria-hidden":!0},i)))}),bs=Object.assign(nB,{List:AX,Item:TX,Input:EX,Group:kX,Separator:MX,Dialog:DX,Empty:NX,Loading:OX});function FX(e,t){let r=e.nextElementSibling;for(;r;){if(r.matches(t))return r;r=r.nextElementSibling}}function _X(e,t){let r=e.previousElementSibling;for(;r;){if(r.matches(t))return r;r=r.previousElementSibling}}function aB(e){let t=ee.useRef(e);return Ql(()=>{t.current=e}),t}var Ql=typeof window>"u"?ee.useEffect:ee.useLayoutEffect;function td(e){let t=ee.useRef();return t.current===void 0&&(t.current=e()),t}function Ss(e){let t=YR(),r=()=>e(t.snapshot());return ee.useSyncExternalStore(t.subscribe,r,r)}function iB(e,t,r,o=[]){let n=ee.useRef(),a=Cm();return Ql(()=>{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(ed,s),n.current=s}),n}var VX=()=>{let[e,t]=ee.useState(),r=td(()=>new Map);return Ql(()=>{r.current.forEach(o=>o()),r.current=new Map},[e]),(o,n)=>{r.current.set(o,n),t({})}};function BX(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function oy({asChild:e,children:t},r){return e&&ee.isValidElement(t)?ee.cloneElement(BX(t),{ref:t.ref},r(t.props.children)):r(t)}var HX={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};var rd=R(M());var Ct=R(N()),ny=ty,sB=QV,UX=ry,lB=qR,zX=K("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"}}),uB=rd.forwardRef(({className:e,variant:t,animation:r,...o},n)=>(0,Ct.jsx)(xm,{ref:n,className:P("moonui-theme",zX({variant:t,animation:r}),e),...o}));uB.displayName=xm.displayName;var GX=K("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"}}),Sm=rd.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:g=!1,onClose:m,...x},h)=>{let v=()=>{m&&m()};return(0,Ct.jsxs)(UX,{children:[(0,Ct.jsx)(uB,{variant:s,animation:l,onClick:u?void 0:v}),(0,Ct.jsxs)(ym,{ref:h,onEscapeKeyDown:u?void 0:v,onInteractOutside:u?void 0:v,className:P(GX({variant:r,size:o,radius:n,animation:a,position:i}),"outline-none",p&&"pointer-events-none",g&&"border-success/40",e),...x,children:[(c||d||f)&&(0,Ct.jsxs)(ay,{className:"flex gap-4",children:[(f||p||g)&&(0,Ct.jsxs)("div",{className:"flex shrink-0 items-center justify-center",children:[p&&(0,Ct.jsx)(Bt,{className:"h-5 w-5 animate-spin text-primary"}),g&&(0,Ct.jsx)(xr,{className:"h-5 w-5 text-success"}),!p&&!g&&f&&(0,Ct.jsx)("span",{className:"text-primary",children:f})]}),(0,Ct.jsxs)("div",{className:"flex-1",children:[c&&(0,Ct.jsx)(od,{children:c}),d&&(0,Ct.jsx)(iy,{children:d})]})]}),t,!u&&(0,Ct.jsxs)(qR,{onClick:v,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,Ct.jsx)(xo,{className:"h-4 w-4"}),(0,Ct.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})});Sm.displayName=ym.displayName;var ay=({className:e,...t})=>(0,Ct.jsx)("div",{className:P("flex flex-col space-y-2 text-center sm:text-left",e),...t});ay.displayName="DialogHeader";var QR=({className:e,...t})=>(0,Ct.jsx)("div",{className:P("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end sm:space-x-2 mt-6",e),...t});QR.displayName="DialogFooter";var od=rd.forwardRef(({className:e,...t},r)=>(0,Ct.jsx)(jR,{ref:r,className:P("text-xl font-semibold leading-snug tracking-tight dark:text-white",e),...t}));od.displayName=jR.displayName;var iy=rd.forwardRef(({className:e,...t},r)=>(0,Ct.jsx)($R,{ref:r,className:P("text-sm text-muted-foreground leading-normal dark:text-gray-400",e),...t}));iy.displayName=$R.displayName;var cB=rd.forwardRef(({className:e,...t},r)=>(0,Ct.jsx)("form",{ref:r,className:P("moonui-theme","flex flex-col gap-4",e),...t}));cB.displayName="DialogForm";var Ir=R(N()),WX=K("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"}}),sy=Rs.forwardRef(({className:e,variant:t,size:r,...o},n)=>(0,Ir.jsx)(bs,{ref:n,className:P("moonui-theme",WX({variant:t,size:r}),e),...o}));sy.displayName="Command";var dB=({children:e,commandClassName:t,...r})=>(0,Ir.jsx)(ny,{...r,children:(0,Ir.jsxs)(Sm,{className:"overflow-hidden p-0 shadow-lg",hideCloseButton:!0,children:[(0,Ir.jsx)(od,{className:"sr-only",children:"Command Menu"}),(0,Ir.jsx)(sy,{className:P("[&_[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})]})}),ZR=Rs.forwardRef(({className:e,...t},r)=>(0,Ir.jsxs)("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[(0,Ir.jsx)(ll,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),(0,Ir.jsx)(bs.Input,{ref:r,className:P("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})]}));ZR.displayName="CommandInput";var JR=Rs.forwardRef(({className:e,...t},r)=>(0,Ir.jsx)(bs.List,{ref:r,className:P("moonui-theme","max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));JR.displayName="CommandList";var eI=Rs.forwardRef(({className:e,...t},r)=>(0,Ir.jsx)(bs.Empty,{ref:r,className:P("moonui-theme","py-6 text-center text-sm text-muted-foreground",e),...t}));eI.displayName="CommandEmpty";var tI=Rs.forwardRef(({className:e,...t},r)=>(0,Ir.jsx)(bs.Group,{ref:r,className:P("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}));tI.displayName="CommandGroup";var rI=Rs.forwardRef(({className:e,...t},r)=>(0,Ir.jsx)(bs.Separator,{ref:r,className:P("moonui-theme","-mx-1 h-px bg-border",e),...t}));rI.displayName="CommandSeparator";var oI=Rs.forwardRef(({className:e,...t},r)=>(0,Ir.jsx)(bs.Item,{ref:r,className:P("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}));oI.displayName="CommandItem";var nI=({className:e,...t})=>(0,Ir.jsx)("span",{className:P("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});nI.displayName="CommandShortcut";var RI=R(M());var Im=R(M(),1);function Is(e,t){return typeof e=="function"?e(t):e}function Io(e,t){return r=>{t.setState(o=>({...o,[e]:Is(r,o[e])}))}}function dy(e){return e instanceof Function}function jX(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function $X(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 me(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=(g,m)=>{for(g=String(g);g.length<m;)g=" "+g;return g};console.info(`%c\u23F1 ${p(d,5)} /${p(c,5)} ms`,`
|
|
52
|
+
`)},gG=0,wl=[];function dT(e){var t=Qe.useRef([]),o=Qe.useRef([0,0]),r=Qe.useRef(),a=Qe.useState(gG++)[0],n=Qe.useState($c)[0],s=Qe.useRef(e);Qe.useEffect(function(){s.current=e},[e]),Qe.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var m=XL([e.lockRef.current],(e.shards||[]).map(cT),!0).filter(Boolean);return m.forEach(function(h){return h.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),m.forEach(function(h){return h.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var i=Qe.useCallback(function(m,h){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!s.current.allowPinchZoom;var v=Jp(m),x=o.current,y="deltaX"in m?m.deltaX:x[0]-v[0],R="deltaY"in m?m.deltaY:x[1]-v[1],S,C=m.target,w=Math.abs(y)>Math.abs(R)?"h":"v";if("touches"in m&&w==="h"&&C.type==="range")return!1;var I=window.getSelection(),L=I&&I.anchorNode,T=L?L===C||L.contains(C):!1;if(T)return!1;var M=Fv(w,C);if(!M)return!0;if(M?S=w:(S=w==="v"?"h":"v",M=Fv(w,C)),!M)return!1;if(!r.current&&"changedTouches"in m&&(y||R)&&(r.current=S),!S)return!0;var F=r.current||S;return lT(F,h,m,F==="h"?y:R,!0)},[]),l=Qe.useCallback(function(m){var h=m;if(!(!wl.length||wl[wl.length-1]!==n)){var v="deltaY"in h?uT(h):Jp(h),x=t.current.filter(function(S){return S.name===h.type&&(S.target===h.target||h.target===S.shadowParent)&&pG(S.delta,v)})[0];if(x&&x.should){h.cancelable&&h.preventDefault();return}if(!x){var y=(s.current.shards||[]).map(cT).filter(Boolean).filter(function(S){return S.contains(h.target)}),R=y.length>0?i(h,y[0]):!s.current.noIsolation;R&&h.cancelable&&h.preventDefault()}}},[]),u=Qe.useCallback(function(m,h,v,x){var y={name:m,delta:h,target:v,should:x,shadowParent:hG(v)};t.current.push(y),setTimeout(function(){t.current=t.current.filter(function(R){return R!==y})},1)},[]),c=Qe.useCallback(function(m){o.current=Jp(m),r.current=void 0},[]),d=Qe.useCallback(function(m){u(m.type,uT(m),m.target,i(m,e.lockRef.current))},[]),f=Qe.useCallback(function(m){u(m.type,Jp(m),m.target,i(m,e.lockRef.current))},[]);Qe.useEffect(function(){return wl.push(n),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",l,Js),document.addEventListener("touchmove",l,Js),document.addEventListener("touchstart",c,Js),function(){wl=wl.filter(function(m){return m!==n}),document.removeEventListener("wheel",l,Js),document.removeEventListener("touchmove",l,Js),document.removeEventListener("touchstart",c,Js)}},[]);var p=e.removeScrollBar,g=e.inert;return Qe.createElement(Qe.Fragment,null,g?Qe.createElement(n,{styles:mG(a)}):null,p?Qe.createElement(Nv,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function hG(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var fT=Tv(Qp,dT);var pT=em.forwardRef(function(e,t){return em.createElement(Wc,ko({},e,{ref:t,sideCar:fT}))});pT.classNames=Wc.classNames;var Wa=pT;var xt=b(N(),1),tm="Popover",[mT,yhe]=Ne(tm,[rr]),Kc=rr(),[vG,Bn]=mT(tm),gT=e=>{let{__scopePopover:t,children:o,open:r,defaultOpen:a,onOpenChange:n,modal:s=!1}=e,i=Kc(t),l=et.useRef(null),[u,c]=et.useState(!1),[d,f]=Xe({prop:r,defaultProp:a??!1,onChange:n,caller:tm});return(0,xt.jsx)(za,{...i,children:(0,xt.jsx)(vG,{scope:t,contentId:ze(),triggerRef:l,open:d,onOpenChange:f,onOpenToggle:et.useCallback(()=>f(p=>!p),[f]),hasCustomAnchor:u,onCustomAnchorAdd:et.useCallback(()=>c(!0),[]),onCustomAnchorRemove:et.useCallback(()=>c(!1),[]),modal:s,children:o})})};gT.displayName=tm;var hT="PopoverAnchor",vT=et.forwardRef((e,t)=>{let{__scopePopover:o,...r}=e,a=Bn(hT,o),n=Kc(o),{onCustomAnchorAdd:s,onCustomAnchorRemove:i}=a;return et.useEffect(()=>(s(),()=>i()),[s,i]),(0,xt.jsx)(qa,{...n,...r,ref:t})});vT.displayName=hT;var xT="PopoverTrigger",yT=et.forwardRef((e,t)=>{let{__scopePopover:o,...r}=e,a=Bn(xT,o),n=Kc(o),s=ie(t,a.triggerRef),i=(0,xt.jsx)(j.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":RT(a.open),...r,ref:s,onClick:z(e.onClick,a.onOpenToggle)});return a.hasCustomAnchor?i:(0,xt.jsx)(qa,{asChild:!0,...n,children:i})});yT.displayName=xT;var _v="PopoverPortal",[xG,yG]=mT(_v,{forceMount:void 0}),bG=e=>{let{__scopePopover:t,forceMount:o,children:r,container:a}=e,n=Bn(_v,t);return(0,xt.jsx)(xG,{scope:t,forceMount:o,children:(0,xt.jsx)(Ye,{present:o||n.open,children:(0,xt.jsx)(Br,{asChild:!0,container:a,children:r})})})};bG.displayName=_v;var Sl="PopoverContent",bT=et.forwardRef((e,t)=>{let o=yG(Sl,e.__scopePopover),{forceMount:r=o.forceMount,...a}=e,n=Bn(Sl,e.__scopePopover);return(0,xt.jsx)(Ye,{present:r||n.open,children:n.modal?(0,xt.jsx)(wG,{...a,ref:t}):(0,xt.jsx)(SG,{...a,ref:t})})});bT.displayName=Sl;var CG=Cr("PopoverContent.RemoveScroll"),wG=et.forwardRef((e,t)=>{let o=Bn(Sl,e.__scopePopover),r=et.useRef(null),a=ie(t,r),n=et.useRef(!1);return et.useEffect(()=>{let s=r.current;if(s)return Vn(s)},[]),(0,xt.jsx)(Wa,{as:CG,allowPinchZoom:!0,children:(0,xt.jsx)(CT,{...e,ref:a,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:z(e.onCloseAutoFocus,s=>{s.preventDefault(),n.current||o.triggerRef.current?.focus()}),onPointerDownOutside:z(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:z(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1})})})}),SG=et.forwardRef((e,t)=>{let o=Bn(Sl,e.__scopePopover),r=et.useRef(!1),a=et.useRef(!1);return(0,xt.jsx)(CT,{...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()}})}),CT=et.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=Bn(Sl,o),p=Kc(o);return gl(),(0,xt.jsx)(qs,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:a,onUnmountAutoFocus:n,children:(0,xt.jsx)(da,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:c,onEscapeKeyDown:i,onPointerDownOutside:l,onFocusOutside:u,onDismiss:()=>f.onOpenChange(!1),children:(0,xt.jsx)(Fn,{"data-state":RT(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)"}})})})}),wT="PopoverClose",ST=et.forwardRef((e,t)=>{let{__scopePopover:o,...r}=e,a=Bn(wT,o);return(0,xt.jsx)(j.button,{type:"button",...r,ref:t,onClick:z(e.onClick,()=>a.onOpenChange(!1))})});ST.displayName=wT;var RG="PopoverArrow",IG=et.forwardRef((e,t)=>{let{__scopePopover:o,...r}=e,a=Kc(o);return(0,xt.jsx)(_n,{...a,...r,ref:t})});IG.displayName=RG;function RT(e){return e?"open":"closed"}var IT=gT,PT=vT,LT=yT;var Vv=bT,TT=ST;var ga=b(N()),LG=Y("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"}}),$a=IT,ja=LT,whe=PT,ha=MT.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,ga.jsxs)(ga.Fragment,{children:[u&&(0,ga.jsx)("div",{className:"fixed inset-0 z-40 bg-overlay opacity-30"}),(0,ga.jsx)(Vv,{ref:f,sideOffset:c,collisionPadding:8,onInteractOutside:p=>{l||p.preventDefault()},className:P(LG({variant:t,size:o,side:r,position:a,radius:n,shadow:s}),i&&"backdrop-blur-md bg-opacity-80",e),...d})]}));ha.displayName=Vv.displayName;var She=TT,TG=({className:e,...t})=>(0,ga.jsx)("div",{className:P("moonui-theme","my-2 h-px bg-border",e),...t});TG.displayName="PopoverSeparator";var MG=({className:e,...t})=>(0,ga.jsx)("div",{className:P("moonui-theme","-mx-4 -mt-4 mb-3 px-4 pt-4 pb-3 border-b border-border",e),...t});MG.displayName="PopoverHeader";var kG=({className:e,...t})=>(0,ga.jsx)("div",{className:P("moonui-theme","-mx-4 -mb-4 mt-3 px-4 pt-3 pb-4 border-t border-border",e),...t});kG.displayName="PopoverFooter";var Yc=b(k());var Xa=b(k(),1);var Dt=b(k(),1);var Hn=b(N(),1),Bv="rovingFocusGroup.onEntryFocus",EG={bubbles:!1,cancelable:!0},Xc="RovingFocusGroup",[Hv,kT,AG]=ea(Xc),[DG,Rl]=Ne(Xc,[AG]),[NG,OG]=DG(Xc),ET=Dt.forwardRef((e,t)=>(0,Hn.jsx)(Hv.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,Hn.jsx)(Hv.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,Hn.jsx)(FG,{...e,ref:t})})}));ET.displayName=Xc;var FG=Dt.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=Dt.useRef(null),p=ie(t,f),g=Ko(n),[m,h]=Xe({prop:s,defaultProp:i??null,onChange:l,caller:Xc}),[v,x]=Dt.useState(!1),y=Ee(u),R=kT(o),S=Dt.useRef(!1),[C,w]=Dt.useState(0);return Dt.useEffect(()=>{let I=f.current;if(I)return I.addEventListener(Bv,y),()=>I.removeEventListener(Bv,y)},[y]),(0,Hn.jsx)(NG,{scope:o,orientation:r,dir:g,loop:a,currentTabStopId:m,onItemFocus:Dt.useCallback(I=>h(I),[h]),onItemShiftTab:Dt.useCallback(()=>x(!0),[]),onFocusableItemAdd:Dt.useCallback(()=>w(I=>I+1),[]),onFocusableItemRemove:Dt.useCallback(()=>w(I=>I-1),[]),children:(0,Hn.jsx)(j.div,{tabIndex:v||C===0?-1:0,"data-orientation":r,...d,ref:p,style:{outline:"none",...e.style},onMouseDown:z(e.onMouseDown,()=>{S.current=!0}),onFocus:z(e.onFocus,I=>{let L=!S.current;if(I.target===I.currentTarget&&L&&!v){let T=new CustomEvent(Bv,EG);if(I.currentTarget.dispatchEvent(T),!T.defaultPrevented){let M=R().filter(_=>_.focusable),F=M.find(_=>_.active),V=M.find(_=>_.id===m),G=[F,V,...M].filter(Boolean).map(_=>_.ref.current);NT(G,c)}}S.current=!1}),onBlur:z(e.onBlur,()=>x(!1))})})}),AT="RovingFocusGroupItem",DT=Dt.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:o,focusable:r=!0,active:a=!1,tabStopId:n,children:s,...i}=e,l=ze(),u=n||l,c=OG(AT,o),d=c.currentTabStopId===u,f=kT(o),{onFocusableItemAdd:p,onFocusableItemRemove:g,currentTabStopId:m}=c;return Dt.useEffect(()=>{if(r)return p(),()=>g()},[r,p,g]),(0,Hn.jsx)(Hv.ItemSlot,{scope:o,id:u,focusable:r,active:a,children:(0,Hn.jsx)(j.span,{tabIndex:d?0:-1,"data-orientation":c.orientation,...i,ref:t,onMouseDown:z(e.onMouseDown,h=>{r?c.onItemFocus(u):h.preventDefault()}),onFocus:z(e.onFocus,()=>c.onItemFocus(u)),onKeyDown:z(e.onKeyDown,h=>{if(h.key==="Tab"&&h.shiftKey){c.onItemShiftTab();return}if(h.target!==h.currentTarget)return;let v=BG(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?HG(y,R+1):y.slice(R+1)}setTimeout(()=>NT(y))}}),children:typeof s=="function"?s({isCurrentTabStop:d,hasTabStop:m!=null}):s})})});DT.displayName=AT;var _G={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function VG(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function BG(e,t,o){let r=VG(e.key,o);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return _G[r]}function NT(e,t=!1){let o=document.activeElement;for(let r of e)if(r===o||(r.focus({preventScroll:t}),document.activeElement!==o))return}function HG(e,t){return e.map((o,r)=>e[(t+r)%e.length])}var om=ET,rm=DT;var Ka=b(N(),1),am="Tabs",[UG,Ghe]=Ne(am,[Rl]),FT=Rl(),[GG,Uv]=UG(am),_T=Xa.forwardRef((e,t)=>{let{__scopeTabs:o,value:r,onValueChange:a,defaultValue:n,orientation:s="horizontal",dir:i,activationMode:l="automatic",...u}=e,c=Ko(i),[d,f]=Xe({prop:r,onChange:a,defaultProp:n??"",caller:am});return(0,Ka.jsx)(GG,{scope:o,baseId:ze(),value:d,onValueChange:f,orientation:s,dir:c,activationMode:l,children:(0,Ka.jsx)(j.div,{dir:c,"data-orientation":s,...u,ref:t})})});_T.displayName=am;var VT="TabsList",BT=Xa.forwardRef((e,t)=>{let{__scopeTabs:o,loop:r=!0,...a}=e,n=Uv(VT,o),s=FT(o);return(0,Ka.jsx)(om,{asChild:!0,...s,orientation:n.orientation,dir:n.dir,loop:r,children:(0,Ka.jsx)(j.div,{role:"tablist","aria-orientation":n.orientation,...a,ref:t})})});BT.displayName=VT;var HT="TabsTrigger",UT=Xa.forwardRef((e,t)=>{let{__scopeTabs:o,value:r,disabled:a=!1,...n}=e,s=Uv(HT,o),i=FT(o),l=qT(s.baseId,r),u=WT(s.baseId,r),c=r===s.value;return(0,Ka.jsx)(rm,{asChild:!0,...i,focusable:!a,active:c,children:(0,Ka.jsx)(j.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:z(e.onMouseDown,d=>{!a&&d.button===0&&d.ctrlKey===!1?s.onValueChange(r):d.preventDefault()}),onKeyDown:z(e.onKeyDown,d=>{[" ","Enter"].includes(d.key)&&s.onValueChange(r)}),onFocus:z(e.onFocus,()=>{let d=s.activationMode!=="manual";!c&&!a&&d&&s.onValueChange(r)})})})});UT.displayName=HT;var GT="TabsContent",zT=Xa.forwardRef((e,t)=>{let{__scopeTabs:o,value:r,forceMount:a,children:n,...s}=e,i=Uv(GT,o),l=qT(i.baseId,r),u=WT(i.baseId,r),c=r===i.value,d=Xa.useRef(c);return Xa.useEffect(()=>{let f=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(f)},[]),(0,Ka.jsx)(Ye,{present:a||c,children:({present:f})=>(0,Ka.jsx)(j.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})})});zT.displayName=GT;function qT(e,t){return`${e}-trigger-${t}`}function WT(e,t){return`${e}-content-${t}`}var Gv=_T,zv=BT,qv=UT,Wv=zT;var Ya=b(N()),nm=Yc.forwardRef(({vertical:e=!1,...t},o)=>(0,Ya.jsx)(Gv,{ref:o,className:P("moonui-theme",t.className),orientation:e?"vertical":"horizontal",...t}));nm.displayName=Gv.displayName;var qG=Y("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-3 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"},scrollable:{true:"overflow-x-auto overflow-y-hidden flex-nowrap hide-scrollbar",false:"flex-wrap"}},defaultVariants:{variant:"default",orientation:"horizontal",fullWidth:!1,scrollable:!1}}),sm=Yc.forwardRef(({className:e,variant:t,orientation:o,fullWidth:r,scrollable:a,...n},s)=>(0,Ya.jsx)(zv,{ref:s,className:P("moonui-theme",qG({variant:t,orientation:o,fullWidth:r,scrollable:a,className:e})),...n}));sm.displayName=zv.displayName;var WG=Y("inline-flex items-center justify-center whitespace-nowrap flex-shrink-0 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-lg bg-gray-100 hover:bg-gray-200/80 border border-gray-300 data-[state=active]:bg-primary data-[state=active]:text-primary-foreground data-[state=active]:border-primary dark:bg-gray-800 dark:hover:bg-gray-700 dark:border-gray-700 dark:data-[state=active]:bg-primary/90 dark:data-[state=active]:text-white dark:data-[state=active]:border-primary",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}}),Il=Yc.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,Ya.jsxs)(qv,{ref:d,className:P("moonui-theme",WG({variant:t,size:o,orientation:i,fullWidth:l}),s&&"data-[state=inactive]:opacity-60",e),...c,children:[r&&a==="left"&&(0,Ya.jsx)("span",{className:"mr-2",children:r}),u,r&&a==="right"&&(0,Ya.jsx)("span",{className:"ml-2",children:r}),n&&(0,Ya.jsx)("span",{className:"ml-2",children:n})]}));Il.displayName=qv.displayName;var Pl=Yc.forwardRef(({className:e,animated:t=!1,...o},r)=>(0,Ya.jsx)(Wv,{ref:r,className:P("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}));Pl.displayName=Wv.displayName;var Un=b(k());var va=b(N()),$G=Y("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"}}),jG=Y("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"}}),KG=Y("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"}}),XG=Y("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"}}),Za=Un.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,...p},g)=>{let[m,h]=Un.useState(u||c||[0]);Un.useEffect(()=>{u!==void 0&&h(u)},[u]);let v=M=>i?i(M):`${Math.round(M*100)/100}`,x=(M,F,V)=>(M-F)/(V-F)*100,y=Un.useRef(null),R=p.min||0,S=p.max||100,C=p.step||1,w=M=>{let F=M.map(V=>{if(C<1){let A=C.toString().split(".")[1]?.length||0;return Math.round(V*Math.pow(10,A))/Math.pow(10,A)}return Math.round(V)});h(F),d&&d(F)},I=M=>{if(f)return;let F=y.current;if(!F)return;let V=F.getBoundingClientRect(),A=(M.clientX-V.left)/V.width,G=R+A*(S-R),_=Math.round(G/C)*C,O=Math.max(R,Math.min(S,_)),E=[...m];E[0]=O,w(E)},L=M=>F=>{if(f)return;F.preventDefault();let V=G=>{let _=y.current;if(!_)return;let O=_.getBoundingClientRect(),E=(G.clientX-O.left)/O.width,D=R+E*(S-R),te=Math.round(D/C)*C,ue=Math.max(R,Math.min(S,te)),B=[...m];B[M]=ue,w(B)},A=()=>{document.removeEventListener("mousemove",V),document.removeEventListener("mouseup",A)};document.addEventListener("mousemove",V),document.addEventListener("mouseup",A)},T=M=>F=>{if(f)return;let V=C*10,A=m[M],G;switch(F.key){case"ArrowRight":case"ArrowUp":G=A+C;break;case"ArrowLeft":case"ArrowDown":G=A-C;break;case"PageUp":G=A+V;break;case"PageDown":G=A-V;break;case"Home":G=R;break;case"End":G=S;break;default:return}F.preventDefault();let _=M>0?m[M-1]:R,O=M<m.length-1?m[M+1]:S,E=Math.max(_,Math.min(O,G)),D=[...m];D[M]=E,w(D)};return(0,va.jsxs)("div",{className:"w-full",ref:g,...p,children:[s&&(0,va.jsx)("div",{className:P("flex justify-end mb-1 text-sm text-muted-foreground",l),children:m.length===1?(0,va.jsx)("span",{children:v(m[0])}):(0,va.jsxs)("span",{children:[v(m[0])," - ",v(m[m.length-1])]})}),(0,va.jsxs)("div",{className:P("moonui-theme",$G({size:t}),e),"data-disabled":f?!0:void 0,children:[(0,va.jsx)("div",{ref:y,className:P(jG({variant:o||a||"default"})),onClick:I,children:(0,va.jsx)("div",{className:P(KG({variant:r||a||"primary"})),style:{left:"0%",width:`${x(m[0],R,S)}%`}})}),m.map((M,F)=>(0,va.jsx)("div",{className:P(XG({variant:a||"primary",size:n})),style:{left:`${x(M,R,S)}%`,transform:"translateX(-50%)",position:"absolute",top:"50%",marginTop:n==="sm"?"-6px":n==="lg"?"-12px":"-8px",cursor:f?"not-allowed":"pointer"},onMouseDown:L(F),onKeyDown:T(F),"aria-label":`Thumb ${F+1}`,tabIndex:f?-1:0,role:"slider","aria-valuemin":R,"aria-valuemax":S,"aria-valuenow":M,"aria-disabled":f},F))]})]})});Za.displayName="Slider";var W=b(N()),$T=Y("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 jT(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 KT(e,t,o){return"#"+((1<<24)+(e<<16)+(t<<8)+o).toString(16).slice(1)}function YG(e){let t=jT(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 ZG(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 KT(Math.round(r*255),Math.round(a*255),Math.round(n*255))}var XT=["#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 $v({className:e,size:t,shape:o,value:r="#000000",onChange:a,showInput:n=!0,showPresets:s=!0,presets:i=XT,allowOpacity:l=!1,format:u="hex",disableCopy:c=!1,triggerMode:d="click",disabled:f,...p}){let[g,m]=ar.useState(!1),[h,v]=ar.useState(r),[x,y]=ar.useState(100),[R,S]=ar.useState(!1),[C,w]=ar.useState(r),I=ar.useMemo(()=>YG(h)||{h:0,s:0,l:0},[h]),L=ar.useMemo(()=>jT(h)||{r:0,g:0,b:0},[h]);ar.useEffect(()=>{v(r),w(r)},[r]);let T=_=>{v(_),w(_),a?.(_)},M=(_,O)=>{let E={...I,[_]:O},D=ZG(E.h,E.s,E.l);T(D)},F=(_,O)=>{let E={...L,[_]:O},D=KT(E.r,E.g,E.b);T(D)},V=_=>{let O=_.target.value;w(O),/^#[0-9A-F]{6}$/i.test(O)&&T(O)},A=async()=>{try{let _=h;u==="rgb"?_=`rgb(${L.r}, ${L.g}, ${L.b})`:u==="hsl"&&(_=`hsl(${I.h}, ${I.s}%, ${I.l}%)`),await navigator.clipboard.writeText(_),S(!0),setTimeout(()=>S(!1),2e3)}catch(_){console.error("Failed to copy:",_)}},G=()=>u==="rgb"?`rgb(${L.r}, ${L.g}, ${L.b})`:u==="hsl"?`hsl(${I.h}, ${I.s}%, ${I.l}%)`:h;return(0,W.jsxs)($a,{open:g,onOpenChange:m,children:[(0,W.jsx)(ja,{asChild:!0,children:(0,W.jsx)(Ae,{variant:"outline",className:P($T({size:t,shape:o}),"p-0 border-2",e),style:{backgroundColor:h},disabled:f,...p,children:(0,W.jsx)("span",{className:"sr-only",children:"Pick a color"})})}),(0,W.jsxs)(ha,{className:"w-80",align:"start",sideOffset:8,children:[(0,W.jsxs)(nm,{defaultValue:"picker",className:"w-full",children:[(0,W.jsxs)(sm,{className:"grid w-full grid-cols-3",children:[(0,W.jsx)(Il,{value:"picker",children:"Picker"}),(0,W.jsx)(Il,{value:"sliders",children:"Sliders"}),(0,W.jsx)(Il,{value:"input",children:"Input"})]}),(0,W.jsxs)(Pl,{value:"picker",className:"space-y-4",children:[(0,W.jsxs)("div",{className:"relative h-48 rounded-md overflow-hidden",children:[(0,W.jsx)("div",{className:"absolute inset-0",style:{background:`linear-gradient(to right, #fff, hsl(${I.h}, 100%, 50%))`}}),(0,W.jsx)("div",{className:"absolute inset-0",style:{background:"linear-gradient(to bottom, transparent, #000)"}}),(0,W.jsx)(Ve.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:`${I.s/100*280-8}px`,top:`${(1-I.l/100)*192-8}px`}})]}),(0,W.jsxs)("div",{className:"space-y-2",children:[(0,W.jsx)(Lo,{children:"Hue"}),(0,W.jsx)("div",{className:"relative h-3 rounded-full",style:{background:"linear-gradient(to right, #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000)"},children:(0,W.jsx)(Za,{value:[I.h],onValueChange:([_])=>M("h",_),max:360,step:1,className:"absolute inset-0"})})]}),l&&(0,W.jsxs)("div",{className:"space-y-2",children:[(0,W.jsx)(Lo,{children:"Opacity"}),(0,W.jsxs)("div",{className:"flex items-center gap-3",children:[(0,W.jsx)(Za,{value:[x],onValueChange:([_])=>y(_),max:100,step:1,className:"flex-1"}),(0,W.jsxs)("span",{className:"text-sm w-10 text-right",children:[x,"%"]})]})]})]}),(0,W.jsxs)(Pl,{value:"sliders",className:"space-y-4",children:[(0,W.jsxs)("div",{className:"space-y-3",children:[(0,W.jsxs)("div",{className:"space-y-2",children:[(0,W.jsxs)("div",{className:"flex items-center justify-between",children:[(0,W.jsx)(Lo,{children:"Red"}),(0,W.jsx)("span",{className:"text-sm text-muted-foreground",children:L.r})]}),(0,W.jsx)(Za,{value:[L.r],onValueChange:([_])=>F("r",_),max:255,step:1,className:"[&_[role=slider]]:bg-red-500"})]}),(0,W.jsxs)("div",{className:"space-y-2",children:[(0,W.jsxs)("div",{className:"flex items-center justify-between",children:[(0,W.jsx)(Lo,{children:"Green"}),(0,W.jsx)("span",{className:"text-sm text-muted-foreground",children:L.g})]}),(0,W.jsx)(Za,{value:[L.g],onValueChange:([_])=>F("g",_),max:255,step:1,className:"[&_[role=slider]]:bg-green-500"})]}),(0,W.jsxs)("div",{className:"space-y-2",children:[(0,W.jsxs)("div",{className:"flex items-center justify-between",children:[(0,W.jsx)(Lo,{children:"Blue"}),(0,W.jsx)("span",{className:"text-sm text-muted-foreground",children:L.b})]}),(0,W.jsx)(Za,{value:[L.b],onValueChange:([_])=>F("b",_),max:255,step:1,className:"[&_[role=slider]]:bg-blue-500"})]})]}),(0,W.jsx)("div",{className:"pt-2 border-t",children:(0,W.jsxs)("div",{className:"grid grid-cols-3 gap-2 text-sm",children:[(0,W.jsxs)("div",{children:[(0,W.jsx)("p",{className:"text-muted-foreground",children:"H"}),(0,W.jsxs)("p",{className:"font-medium",children:[I.h,"\xB0"]})]}),(0,W.jsxs)("div",{children:[(0,W.jsx)("p",{className:"text-muted-foreground",children:"S"}),(0,W.jsxs)("p",{className:"font-medium",children:[I.s,"%"]})]}),(0,W.jsxs)("div",{children:[(0,W.jsx)("p",{className:"text-muted-foreground",children:"L"}),(0,W.jsxs)("p",{className:"font-medium",children:[I.l,"%"]})]})]})})]}),(0,W.jsxs)(Pl,{value:"input",className:"space-y-4",children:[(0,W.jsxs)("div",{className:"space-y-2",children:[(0,W.jsx)(Lo,{children:"Hex Color"}),(0,W.jsxs)("div",{className:"flex gap-2",children:[(0,W.jsx)(Qt,{value:C,onChange:V,placeholder:"#000000",className:"font-mono"}),(0,W.jsx)(Ae,{size:"icon",variant:"outline",onClick:()=>T(C),children:(0,W.jsx)($t,{className:"h-4 w-4"})})]})]}),(0,W.jsxs)("div",{className:"space-y-2",children:[(0,W.jsx)(Lo,{children:"RGB Values"}),(0,W.jsxs)("div",{className:"grid grid-cols-3 gap-2",children:[(0,W.jsx)(Qt,{type:"number",value:L.r,onChange:_=>F("r",parseInt(_.target.value)||0),min:0,max:255,className:"text-center"}),(0,W.jsx)(Qt,{type:"number",value:L.g,onChange:_=>F("g",parseInt(_.target.value)||0),min:0,max:255,className:"text-center"}),(0,W.jsx)(Qt,{type:"number",value:L.b,onChange:_=>F("b",parseInt(_.target.value)||0),min:0,max:255,className:"text-center"})]})]})]})]}),(0,W.jsxs)("div",{className:"mt-4 flex items-center justify-between p-3 border rounded-lg",children:[(0,W.jsxs)("div",{className:"flex items-center gap-3",children:[(0,W.jsx)("div",{className:P("h-10 w-10 rounded border-2",$T({shape:o})),style:{backgroundColor:h}}),(0,W.jsxs)("div",{children:[(0,W.jsx)("p",{className:"text-sm font-medium",children:G()}),(0,W.jsx)("p",{className:"text-xs text-muted-foreground",children:"Current color"})]})]}),!c&&(0,W.jsx)(Ae,{size:"icon",variant:"ghost",onClick:A,className:"h-8 w-8",children:(0,W.jsx)(Da,{mode:"wait",children:R?(0,W.jsx)(Ve.div,{initial:{scale:0},animate:{scale:1},exit:{scale:0},children:(0,W.jsx)($t,{className:"h-4 w-4 text-green-600"})},"check"):(0,W.jsx)(Ve.div,{initial:{scale:0},animate:{scale:1},exit:{scale:0},children:(0,W.jsx)(hu,{className:"h-4 w-4"})},"copy")})})]}),s&&i.length>0&&(0,W.jsxs)("div",{className:"mt-4 space-y-2",children:[(0,W.jsx)(Lo,{children:"Preset Colors"}),(0,W.jsx)("div",{className:"grid grid-cols-10 gap-1",children:i.map(_=>(0,W.jsx)("button",{type:"button","aria-label":`Select color ${_}`,"aria-pressed":h===_,className:P("h-7 w-7 rounded border-2 transition-all hover:scale-110","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",h===_?"border-primary":"border-transparent"),style:{backgroundColor:_},onClick:()=>T(_)},_))})]})]})]})}function QG({value:e="#000000",onChange:t,colors:o=XT.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,W.jsx)("div",{className:P("moonui-theme","flex flex-wrap gap-2",r),children:o.map(s=>(0,W.jsx)("button",{type:"button","aria-label":`Select color ${s}`,"aria-pressed":e===s,className:P("rounded-full border-2 transition-all hover:scale-110","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",n[a],e===s?"border-primary ring-2 ring-primary/20":"border-transparent"),style:{backgroundColor:s},onClick:()=>t?.(s)},s))})}function JG({value:e={start:"#ff0000",end:"#0000ff",angle:90},onChange:t,className:o}){let[r,a]=ar.useState(e),n=(s,i)=>{let l={...r,[s]:i};a(l),t?.(l)};return(0,W.jsxs)("div",{className:P("moonui-theme","space-y-4",o),children:[(0,W.jsx)("div",{className:"h-20 rounded-lg border-2",style:{background:`linear-gradient(${r.angle}deg, ${r.start}, ${r.end})`}}),(0,W.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,W.jsxs)("div",{className:"space-y-2",children:[(0,W.jsx)(Lo,{children:"Start Color"}),(0,W.jsx)($v,{value:r.start,onChange:s=>n("start",s),size:"sm"})]}),(0,W.jsxs)("div",{className:"space-y-2",children:[(0,W.jsx)(Lo,{children:"End Color"}),(0,W.jsx)($v,{value:r.end,onChange:s=>n("end",s),size:"sm"})]})]}),(0,W.jsxs)("div",{className:"space-y-2",children:[(0,W.jsxs)("div",{className:"flex items-center justify-between",children:[(0,W.jsx)(Lo,{children:"Angle"}),(0,W.jsxs)("span",{className:"text-sm text-muted-foreground",children:[r.angle,"\xB0"]})]}),(0,W.jsx)(Za,{value:[r.angle||90],onValueChange:([s])=>n("angle",s),max:360,step:1})]})]})}var Wn=b(k());var YT=1,ez=.9,tz=.8,oz=.17,jv=.1,Kv=.999,rz=.9999,az=.99,nz=/[\\\/_+.#"@\[\(\{&]/,sz=/[\\\/_+.#"@\[\(\{&]/g,iz=/[\s-]/,QT=/[\s-]/g;function Xv(e,t,o,r,a,n,s){if(n===t.length)return a===e.length?YT:az;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,p,g;u>=0;)d=Xv(e,t,o,r,u+1,n+1,s),d>c&&(u===a?d*=YT:nz.test(e.charAt(u-1))?(d*=tz,p=e.slice(a,u-1).match(sz),p&&a>0&&(d*=Math.pow(Kv,p.length))):iz.test(e.charAt(u-1))?(d*=ez,g=e.slice(a,u-1).match(QT),g&&a>0&&(d*=Math.pow(Kv,g.length))):(d*=oz,a>0&&(d*=Math.pow(Kv,u-a))),e.charAt(u)!==t.charAt(n)&&(d*=rz)),(d<jv&&o.charAt(u-1)===r.charAt(n+1)||r.charAt(n+1)===r.charAt(n)&&o.charAt(u-1)!==r.charAt(n))&&(f=Xv(e,t,o,r,u+1,n+2,s),f*jv>d&&(d=f*jv)),d>c&&(c=d),u=o.indexOf(l,u+1);return s[i]=c,c}function ZT(e){return e.toLowerCase().replace(QT," ")}function JT(e,t,o){return e=o&&o.length>0?`${e+" "+o.join(" ")}`:e,Xv(e,t,ZT(e),ZT(t),0,0,{})}var it=b(k(),1);var cve=!!(typeof window<"u"&&window.document&&window.document.createElement);function xa(e,t,{checkForDefaultPrevented:o=!0}={}){return function(a){if(e?.(a),o===!1||!a||!a.defaultPrevented)return t?.(a)}}var tM=b(k(),1);function eM(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function lz(...e){return t=>{let o=!1,r=e.map(a=>{let n=eM(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():eM(e[a],null)}}}}function Hr(...e){return tM.useCallback(lz(...e),e)}var Qa=b(k(),1),oM=b(N(),1);function rM(e,t=[]){let o=[];function r(n,s){let i=Qa.createContext(s);i.displayName=n+"Context";let l=o.length;o=[...o,s];let u=d=>{let{scope:f,children:p,...g}=d,m=f?.[e]?.[l]||i,h=Qa.useMemo(()=>g,Object.values(g));return(0,oM.jsx)(m.Provider,{value:h,children:p})};u.displayName=n+"Provider";function c(d,f,p={}){let{optional:g=!1}=p,m=f?.[e]?.[l]||i,h=Qa.useContext(m);if(h)return h;if(s!==void 0)return s;if(!g)throw new Error(`\`${d}\` must be used within \`${n}\``)}return[u,c]}let a=()=>{let n=o.map(s=>Qa.createContext(s));return function(i){let l=i?.[e]||n;return Qa.useMemo(()=>({[`__scope${e}`]:{...i,[e]:l}}),[i,l])}};return a.scopeName=e,[r,uz(a,...t)]}function uz(...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 Qa.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return o.scopeName=t.scopeName,o}var Yv=b(k(),1);var aM=b(k(),1),Ja=globalThis?.document?aM.useLayoutEffect:()=>{};var cz=Yv[" useId ".trim().toString()]||(()=>{}),dz=0;function im(e){let[t,o]=Yv.useState(cz());return Ja(()=>{e||o(r=>r??String(dz++))},[e]),e||(t?`radix-${t}`:"")}var nr=b(k(),1);var lm=b(k(),1);var fz=nr[" useInsertionEffect ".trim().toString()]||Ja;function nM({prop:e,defaultProp:t,onChange:o=()=>{},caller:r}){let[a,n,s]=pz({defaultProp:t,onChange:o}),i=e!==void 0,l=i?e:a;{let c=nr.useRef(e!==void 0);nr.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=nr.useCallback(c=>{if(i){let d=mz(c)?c(e):c;d!==e&&s.current?.(d)}else n(c)},[i,e,n,s]);return[l,u]}function pz({defaultProp:e,onChange:t}){let[o,r]=nr.useState(e),a=nr.useRef(o),n=nr.useRef(t);return fz(()=>{n.current=t},[t]),nr.useEffect(()=>{a.current!==o&&(n.current?.(o),a.current=o)},[o,a]),[o,r,n]}function mz(e){return typeof e=="function"}var xve=Symbol("RADIX:SYNC_STATE");var Fe=b(k(),1);var iM=b(k(),1),lM=b(ta(),1);var zt=b(k(),1);function cm(e){let t=zt.forwardRef((o,r)=>{let{children:a,...n}=o,s=null,i=!1,l=[];sM(a)&&typeof um=="function"&&(a=um(a._payload)),zt.Children.forEach(a,f=>{if(yz(f)){i=!0;let p=f,g="child"in p.props?p.props.child:p.props.children;sM(g)&&typeof um=="function"&&(g=um(g._payload)),s=hz(p,g),l.push(s?.props?.children)}else l.push(f)}),s?s=zt.cloneElement(s,void 0,l):!i&&zt.Children.count(a)===1&&zt.isValidElement(a)&&(s=a);let u=s?xz(s):void 0,c=Hr(r,u);if(!s){if(a||a===0)throw new Error(i?Sz(e):wz(e));return a}let d=vz(n,s.props??{});return s.type!==zt.Fragment&&(d.ref=r?c:u),zt.cloneElement(s,d)});return t.displayName=`${e}.Slot`,t}var gz=Symbol.for("radix.slottable");var hz=(e,t)=>{if("child"in e.props){let o=e.props.child;return zt.isValidElement(o)?zt.cloneElement(o,void 0,e.props.children(o.props.children)):null}return zt.isValidElement(t)?t:null};function vz(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 xz(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)}function yz(e){return zt.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===gz}var bz=Symbol.for("react.lazy");function sM(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===bz&&"_payload"in e&&Cz(e._payload)}function Cz(e){return typeof e=="object"&&e!==null&&"then"in e}var wz=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,Sz=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,um=zt[" use ".trim().toString()];var uM=b(N(),1),Rz=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Bo=Rz.reduce((e,t)=>{let o=cm(`Primitive.${t}`),r=iM.forwardRef((a,n)=>{let{asChild:s,...i}=a,l=s?o:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,uM.jsx)(l,{...i,ref:n})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function cM(e,t){e&&lM.flushSync(()=>e.dispatchEvent(t))}var Ll=b(k(),1);function ei(e){let t=Ll.useRef(e);return Ll.useEffect(()=>{t.current=e}),Ll.useMemo(()=>((...o)=>t.current?.(...o)),[])}var Qv=b(N(),1),Iz="DismissableLayer",Zv="dismissableLayer.update",Pz="dismissableLayer.pointerDownOutside",Lz="dismissableLayer.focusOutside",dM,Jv=Fe.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),ex=Fe.forwardRef((e,t)=>{let{disableOutsidePointerEvents:o=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:a,onPointerDownOutside:n,onFocusOutside:s,onInteractOutside:i,onDismiss:l,...u}=e,c=Fe.useContext(Jv),[d,f]=Fe.useState(null),p=d?.ownerDocument??globalThis?.document,[,g]=Fe.useState({}),m=Hr(t,f),h=Array.from(c.layers),[v]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),x=v?h.indexOf(v):-1,y=d?h.indexOf(d):-1,R=c.layersWithOutsidePointerEventsDisabled.size>0,S=y>=x,C=Fe.useRef(!1),w=Ez(M=>{n?.(M),i?.(M),M.defaultPrevented||l?.()},{ownerDocument:p,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:C,dismissableSurfaces:c.dismissableSurfaces,shouldHandlePointerDownOutside:Fe.useCallback(M=>{if(!(M instanceof Node))return!1;let F=[...c.branches].some(V=>V.contains(M));return S&&!F},[c.branches,S])}),I=Az(M=>{if(r&&C.current)return;let F=M.target;[...c.branches].some(A=>A.contains(F))||(s?.(M),i?.(M),M.defaultPrevented||l?.())},p),L=d?y===h.length-1:!1,T=ei(M=>{M.key==="Escape"&&(a?.(M),!M.defaultPrevented&&l&&(M.preventDefault(),l()))});return Fe.useEffect(()=>{if(L)return p.addEventListener("keydown",T,{capture:!0}),()=>p.removeEventListener("keydown",T,{capture:!0})},[p,L,T]),Fe.useEffect(()=>{if(d)return o&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(dM=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),fM(),()=>{o&&(c.layersWithOutsidePointerEventsDisabled.delete(d),c.layersWithOutsidePointerEventsDisabled.size===0&&(p.body.style.pointerEvents=dM))}},[d,p,o,c]),Fe.useEffect(()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),fM())},[d,c]),Fe.useEffect(()=>{let M=()=>g({});return document.addEventListener(Zv,M),()=>document.removeEventListener(Zv,M)},[]),(0,Qv.jsx)(Bo.div,{...u,ref:m,style:{pointerEvents:R?S?"auto":"none":void 0,...e.style},onFocusCapture:xa(e.onFocusCapture,I.onFocusCapture),onBlurCapture:xa(e.onBlurCapture,I.onBlurCapture),onPointerDownCapture:xa(e.onPointerDownCapture,w.onPointerDownCapture)})});ex.displayName=Iz;var Tz="DismissableLayerBranch",Mz=Fe.forwardRef((e,t)=>{let o=Fe.useContext(Jv),r=Fe.useRef(null),a=Hr(t,r);return Fe.useEffect(()=>{let n=r.current;if(n)return o.branches.add(n),()=>{o.branches.delete(n)}},[o.branches]),(0,Qv.jsx)(Bo.div,{...e,ref:a})});Mz.displayName=Tz;function pM(){let e=Fe.useContext(Jv),[t,o]=Fe.useState(null);return Fe.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),o}var kz=()=>!0;function Ez(e,t){let{ownerDocument:o=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:a,dismissableSurfaces:n,shouldHandlePointerDownOutside:s=kz}=t,i=ei(e),l=Fe.useRef(!1),u=Fe.useRef(!1),c=Fe.useRef(new Map),d=Fe.useRef(()=>{});return Fe.useEffect(()=>{function f(){u.current=!1,a.current=!1,c.current.clear()}function p(){return Array.from(c.current.values()).some(Boolean)}function g(y){if(!u.current)return;let R=y.target;R instanceof Node&&[...n].some(C=>C.contains(R))||c.current.set(y.type,!0),y.type==="click"&&window.setTimeout(()=>{u.current&&d.current()},0)}function m(y){u.current&&c.current.set(y.type,!1)}let h=y=>{if(y.target&&!l.current){let S=function(){o.removeEventListener("click",d.current);let w=p();f(),w||mM(Pz,i,C,{discrete:!0})};var R=S;if(!s(y.target)){o.removeEventListener("click",d.current),f(),l.current=!1;return}let C={originalEvent:y};u.current=!0,a.current=r&&y.button===0,c.current.clear(),!r||y.button!==0?S():(o.removeEventListener("click",d.current),d.current=S,o.addEventListener("click",d.current,{once:!0}))}else o.removeEventListener("click",d.current),f();l.current=!1},v=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(let y of v)o.addEventListener(y,g,!0),o.addEventListener(y,m);let x=window.setTimeout(()=>{o.addEventListener("pointerdown",h)},0);return()=>{window.clearTimeout(x),o.removeEventListener("pointerdown",h),o.removeEventListener("click",d.current);for(let y of v)o.removeEventListener(y,g,!0),o.removeEventListener(y,m)}},[o,i,r,a,n,s]),{onPointerDownCapture:()=>l.current=!0}}function Az(e,t=globalThis?.document){let o=ei(e),r=Fe.useRef(!1);return Fe.useEffect(()=>{let a=n=>{n.target&&!r.current&&mM(Lz,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 fM(){let e=new CustomEvent(Zv);document.dispatchEvent(e)}function mM(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?cM(a,n):a.dispatchEvent(n)}var sr=b(k(),1);var yM=b(N(),1),tx="focusScope.autoFocusOnMount",ox="focusScope.autoFocusOnUnmount",gM={bubbles:!1,cancelable:!0},Dz="FocusScope",rx=sr.forwardRef((e,t)=>{let{loop:o=!1,trapped:r=!1,onMountAutoFocus:a,onUnmountAutoFocus:n,...s}=e,[i,l]=sr.useState(null),u=ei(a),c=ei(n),d=sr.useRef(null),f=Hr(t,l),p=sr.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;sr.useEffect(()=>{if(r){let x=function(C){if(p.paused||!i)return;let w=C.target;i.contains(w)?d.current=w:Gn(d.current,{select:!0})},y=function(C){if(p.paused||!i)return;let w=C.relatedTarget;w!==null&&(i.contains(w)||Gn(d.current,{select:!0}))},R=function(C){if(document.activeElement===document.body)for(let I of C)I.removedNodes.length>0&&Gn(i)};var m=x,h=y,v=R;document.addEventListener("focusin",x),document.addEventListener("focusout",y);let S=new MutationObserver(R);return i&&S.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",x),document.removeEventListener("focusout",y),S.disconnect()}}},[r,i,p.paused]),sr.useEffect(()=>{if(i){vM.add(p);let m=document.activeElement;if(!i.contains(m)){let v=new CustomEvent(tx,gM);i.addEventListener(tx,u),i.dispatchEvent(v),v.defaultPrevented||(Nz(Bz(bM(i)),{select:!0}),document.activeElement===m&&Gn(i))}return()=>{i.removeEventListener(tx,u),setTimeout(()=>{let v=new CustomEvent(ox,gM);i.addEventListener(ox,c),i.dispatchEvent(v),v.defaultPrevented||Gn(m??document.body,{select:!0}),i.removeEventListener(ox,c),vM.remove(p)},0)}}},[i,u,c,p]);let g=sr.useCallback(m=>{if(!o&&!r||p.paused)return;let h=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,v=document.activeElement;if(h&&v){let x=m.currentTarget,[y,R]=Oz(x);y&&R?!m.shiftKey&&v===R?(m.preventDefault(),o&&Gn(y,{select:!0})):m.shiftKey&&v===y&&(m.preventDefault(),o&&Gn(R,{select:!0})):v===x&&m.preventDefault()}},[o,r,p.paused]);return(0,yM.jsx)(Bo.div,{tabIndex:-1,...s,ref:f,onKeyDown:g})});rx.displayName=Dz;function Nz(e,{select:t=!1}={}){let o=document.activeElement;for(let r of e)if(Gn(r,{select:t}),document.activeElement!==o)return}function Oz(e){let t=bM(e),o=hM(t,e),r=hM(t.reverse(),e);return[o,r]}function bM(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 hM(e,t){let o=typeof t.checkVisibility=="function"&&t.checkVisibility({checkVisibilityCSS:!0});for(let r of e)if(!(o?!r.checkVisibility({checkVisibilityCSS:!0}):Fz(r,{upTo:t})))return r}function Fz(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 _z(e){return e instanceof HTMLInputElement&&"select"in e}function Gn(e,{select:t=!1}={}){if(e&&e.focus){let o=document.activeElement;e.focus({preventScroll:!0}),e!==o&&_z(e)&&t&&e.select()}}var vM=Vz();function Vz(){let e=[];return{add(t){let o=e[0];t!==o&&o?.pause(),e=xM(e,t),e.unshift(t)},remove(t){e=xM(e,t),e[0]?.resume()}}}function xM(e,t){let o=[...e],r=o.indexOf(t);return r!==-1&&o.splice(r,1),o}function Bz(e){return e.filter(t=>t.tagName!=="A")}var dm=b(k(),1),CM=b(ta(),1);var wM=b(N(),1),Hz="Portal",ax=dm.forwardRef((e,t)=>{let{container:o,...r}=e,[a,n]=dm.useState(!1);Ja(()=>n(!0),[]);let s=o||a&&globalThis?.document?.body;return s?CM.createPortal((0,wM.jsx)(Bo.div,{...r,ref:t}),s):null});ax.displayName=Hz;var qt=b(k(),1);var RM=b(k(),1);function Uz(e,t){return RM.useReducer((o,r)=>t[o][r]??o,e)}var Qc=e=>{let{present:t,children:o}=e,r=Gz(t),a=typeof o=="function"?o({present:r.isPresent}):qt.Children.only(o),n=zz(r.ref,qz(a));return typeof o=="function"||r.isPresent?qt.cloneElement(a,{ref:n}):null};Qc.displayName="Presence";function Gz(e){let[t,o]=qt.useState(),r=qt.useRef(null),a=qt.useRef(e),n=qt.useRef("none"),s=qt.useRef(void 0),i=e?"mounted":"unmounted",[l,u]=Uz(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return qt.useEffect(()=>{l==="mounted"?(n.current=s.current??Zc(r.current),s.current=void 0):n.current="none"},[l]),Ja(()=>{let c=r.current,d=a.current;if(d!==e){let p=n.current,g=Zc(c);e?(s.current=g,u("MOUNT")):g==="none"||c?.display==="none"?u("UNMOUNT"):u(d&&p!==g?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,u]),Ja(()=>{if(t){let c,d=t.ownerDocument.defaultView??window,f=g=>{let h=Zc(r.current).includes(CSS.escape(g.animationName));if(g.target===t&&h&&(u("ANIMATION_END"),!a.current)){let v=t.style.animationFillMode;t.style.animationFillMode="forwards",c=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},p=g=>{g.target===t&&(n.current=Zc(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{d.clearTimeout(c),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:qt.useCallback(c=>{if(c){let d=getComputedStyle(c);r.current=d,s.current=Zc(d)}else r.current=null;o(c)},[])}}function SM(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function zz(...e){let t=qt.useRef(e);return t.current=e,qt.useCallback(o=>{let r=t.current,a=!1,n=r.map(s=>{let i=SM(s,o);return!a&&typeof i=="function"&&(a=!0),i});if(a)return()=>{for(let s=0;s<n.length;s++){let i=n[s];typeof i=="function"?i():SM(r[s],null)}}},[])}function Zc(e){return e?.animationName||"none"}function qz(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 PM=b(k(),1),fm=0,Tl=null;function LM(){PM.useEffect(()=>{Tl||(Tl={start:IM(),end:IM()});let{start:e,end:t}=Tl;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement("afterbegin",e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement("beforeend",t),fm++,()=>{fm===1&&(Tl?.start.remove(),Tl?.end.remove(),Tl=null),fm=Math.max(0,fm-1)}},[])}function IM(){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 st=b(N(),1),mm="Dialog",[TM,exe]=rM(mm),[Wz,Ur]=TM(mm),Jc=e=>{let{__scopeDialog:t,children:o,open:r,defaultOpen:a,onOpenChange:n,modal:s=!0}=e,i=it.useRef(null),l=it.useRef(null),[u,c]=nM({prop:r,defaultProp:a??!1,onChange:n,caller:mm});return(0,st.jsx)(Wz,{scope:t,triggerRef:i,contentRef:l,contentId:im(),titleId:im(),descriptionId:im(),open:u,onOpenChange:c,onOpenToggle:it.useCallback(()=>c(d=>!d),[c]),modal:s,children:o})};Jc.displayName=mm;var MM="DialogTrigger",nx=it.forwardRef((e,t)=>{let{__scopeDialog:o,...r}=e,a=Ur(MM,o),n=Hr(t,a.triggerRef);return(0,st.jsx)(Bo.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":ix(a.open),...r,ref:n,onClick:xa(e.onClick,a.onOpenToggle)})});nx.displayName=MM;var sx="DialogPortal",[$z,kM]=TM(sx,{forceMount:void 0}),ed=e=>{let{__scopeDialog:t,forceMount:o,children:r,container:a}=e,n=Ur(sx,t);return(0,st.jsx)($z,{scope:t,forceMount:o,children:it.Children.map(r,s=>(0,st.jsx)(Qc,{present:o||n.open,children:(0,st.jsx)(ax,{asChild:!0,container:a,children:s})}))})};ed.displayName=sx;var pm="DialogOverlay",kl=it.forwardRef((e,t)=>{let o=kM(pm,e.__scopeDialog),{forceMount:r=o.forceMount,...a}=e,n=Ur(pm,e.__scopeDialog);return n.modal?(0,st.jsx)(Qc,{present:r||n.open,children:(0,st.jsx)(Kz,{...a,ref:t})}):null});kl.displayName=pm;var jz=cm("DialogOverlay.RemoveScroll"),Kz=it.forwardRef((e,t)=>{let{__scopeDialog:o,...r}=e,a=Ur(pm,o),n=pM(),s=Hr(t,n);return(0,st.jsx)(Wa,{as:jz,allowPinchZoom:!0,shards:[a.contentRef],children:(0,st.jsx)(Bo.div,{"data-state":ix(a.open),...r,ref:s,style:{pointerEvents:"auto",...r.style}})})}),Ml="DialogContent",El=it.forwardRef((e,t)=>{let o=kM(Ml,e.__scopeDialog),{forceMount:r=o.forceMount,...a}=e,n=Ur(Ml,e.__scopeDialog);return(0,st.jsx)(Qc,{present:r||n.open,children:n.modal?(0,st.jsx)(Xz,{...a,ref:t}):(0,st.jsx)(Yz,{...a,ref:t})})});El.displayName=Ml;var Xz=it.forwardRef((e,t)=>{let o=Ur(Ml,e.__scopeDialog),r=it.useRef(null),a=Hr(t,o.contentRef,r);return it.useEffect(()=>{let n=r.current;if(n)return Vn(n)},[]),(0,st.jsx)(EM,{...e,ref:a,trapFocus:o.open,disableOutsidePointerEvents:o.open,onCloseAutoFocus:xa(e.onCloseAutoFocus,n=>{n.preventDefault(),o.triggerRef.current?.focus()}),onPointerDownOutside:xa(e.onPointerDownOutside,n=>{let s=n.detail.originalEvent,i=s.button===0&&s.ctrlKey===!0;(s.button===2||i)&&n.preventDefault()}),onFocusOutside:xa(e.onFocusOutside,n=>n.preventDefault())})}),Yz=it.forwardRef((e,t)=>{let o=Ur(Ml,e.__scopeDialog),r=it.useRef(!1),a=it.useRef(!1);return(0,st.jsx)(EM,{...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()}})}),EM=it.forwardRef((e,t)=>{let{__scopeDialog:o,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:n,...s}=e,i=Ur(Ml,o);return LM(),(0,st.jsx)(st.Fragment,{children:(0,st.jsx)(rx,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:a,onUnmountAutoFocus:n,children:(0,st.jsx)(ex,{role:"dialog",id:i.contentId,"aria-describedby":i.descriptionId,"aria-labelledby":i.titleId,"data-state":ix(i.open),...s,ref:t,deferPointerDownOutside:!0,onDismiss:()=>i.onOpenChange(!1)})})})}),AM="DialogTitle",gm=it.forwardRef((e,t)=>{let{__scopeDialog:o,...r}=e,a=Ur(AM,o);return(0,st.jsx)(Bo.h2,{id:a.titleId,...r,ref:t})});gm.displayName=AM;var DM="DialogDescription",hm=it.forwardRef((e,t)=>{let{__scopeDialog:o,...r}=e,a=Ur(DM,o);return(0,st.jsx)(Bo.p,{id:a.descriptionId,...r,ref:t})});hm.displayName=DM;var NM="DialogClose",vm=it.forwardRef((e,t)=>{let{__scopeDialog:o,...r}=e,a=Ur(NM,o);return(0,st.jsx)(Bo.button,{type:"button",...r,ref:t,onClick:xa(e.onClick,()=>a.onOpenChange(!1))})});vm.displayName=NM;function ix(e){return e?"open":"closed"}var ee=b(k(),1);var td='[cmdk-group=""]',lx='[cmdk-group-items=""]',Zz='[cmdk-group-heading=""]',_M='[cmdk-item=""]',FM=`${_M}:not([aria-disabled="true"])`,ux="cmdk-item-select",Al="data-value",Qz=(e,t,o)=>JT(e,t,o),VM=ee.createContext(void 0),od=()=>ee.useContext(VM),BM=ee.createContext(void 0),cx=()=>ee.useContext(BM),HM=ee.createContext(void 0),UM=ee.forwardRef((e,t)=>{let o=Dl(()=>{var B,$;return{search:"",value:($=(B=e.value)!=null?B:e.defaultValue)!=null?$:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=Dl(()=>new Set),a=Dl(()=>new Map),n=Dl(()=>new Map),s=Dl(()=>new Set),i=GM(e),{label:l,children:u,value:c,onValueChange:d,filter:f,shouldFilter:p,loop:g,disablePointerSelection:m=!1,vimBindings:h=!0,...v}=e,x=ze(),y=ze(),R=ze(),S=ee.useRef(null),C=u3();ti(()=>{if(c!==void 0){let B=c.trim();o.current.value=B,w.emit()}},[c]),ti(()=>{C(6,V)},[]);let w=ee.useMemo(()=>({subscribe:B=>(s.current.add(B),()=>s.current.delete(B)),snapshot:()=>o.current,setState:(B,$,Z)=>{var X,se,H,oe;if(!Object.is(o.current[B],$)){if(o.current[B]=$,B==="search")F(),T(),C(1,M);else if(B==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let fe=document.getElementById(R);fe?fe.focus():(X=document.getElementById(x))==null||X.focus()}if(C(7,()=>{var fe;o.current.selectedItemId=(fe=A())==null?void 0:fe.id,w.emit()}),Z||C(5,V),((se=i.current)==null?void 0:se.value)!==void 0){let fe=$??"";(oe=(H=i.current).onValueChange)==null||oe.call(H,fe);return}}w.emit()}},emit:()=>{s.current.forEach(B=>B())}}),[]),I=ee.useMemo(()=>({value:(B,$,Z)=>{var X;$!==((X=n.current.get(B))==null?void 0:X.value)&&(n.current.set(B,{value:$,keywords:Z}),o.current.filtered.items.set(B,L($,Z)),C(2,()=>{T(),w.emit()}))},item:(B,$)=>(r.current.add(B),$&&(a.current.has($)?a.current.get($).add(B):a.current.set($,new Set([B]))),C(3,()=>{F(),T(),o.current.value||M(),w.emit()}),()=>{n.current.delete(B),r.current.delete(B),o.current.filtered.items.delete(B);let Z=A();C(4,()=>{F(),Z?.getAttribute("id")===B&&M(),w.emit()})}),group:B=>(a.current.has(B)||a.current.set(B,new Set),()=>{n.current.delete(B),a.current.delete(B)}),filter:()=>i.current.shouldFilter,label:l||e["aria-label"],getDisablePointerSelection:()=>i.current.disablePointerSelection,listId:x,inputId:R,labelId:y,listInnerRef:S}),[]);function L(B,$){var Z,X;let se=(X=(Z=i.current)==null?void 0:Z.filter)!=null?X:Qz;return B?se(B,o.current.search,$):0}function T(){if(!o.current.search||i.current.shouldFilter===!1)return;let B=o.current.filtered.items,$=[];o.current.filtered.groups.forEach(X=>{let se=a.current.get(X),H=0;se.forEach(oe=>{let fe=B.get(oe);H=Math.max(fe,H)}),$.push([X,H])});let Z=S.current;G().sort((X,se)=>{var H,oe;let fe=X.getAttribute("id"),me=se.getAttribute("id");return((H=B.get(me))!=null?H:0)-((oe=B.get(fe))!=null?oe:0)}).forEach(X=>{let se=X.closest(lx);se?se.appendChild(X.parentElement===se?X:X.closest(`${lx} > *`)):Z.appendChild(X.parentElement===Z?X:X.closest(`${lx} > *`))}),$.sort((X,se)=>se[1]-X[1]).forEach(X=>{var se;let H=(se=S.current)==null?void 0:se.querySelector(`${td}[${Al}="${encodeURIComponent(X[0])}"]`);H?.parentElement.appendChild(H)})}function M(){let B=G().find(Z=>Z.getAttribute("aria-disabled")!=="true"),$=B?.getAttribute(Al);w.setState("value",$||void 0)}function F(){var B,$,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 se=0;for(let H of r.current){let oe=($=(B=n.current.get(H))==null?void 0:B.value)!=null?$:"",fe=(X=(Z=n.current.get(H))==null?void 0:Z.keywords)!=null?X:[],me=L(oe,fe);o.current.filtered.items.set(H,me),me>0&&se++}for(let[H,oe]of a.current)for(let fe of oe)if(o.current.filtered.items.get(fe)>0){o.current.filtered.groups.add(H);break}o.current.filtered.count=se}function V(){var B,$,Z;let X=A();X&&(((B=X.parentElement)==null?void 0:B.firstChild)===X&&((Z=($=X.closest(td))==null?void 0:$.querySelector(Zz))==null||Z.scrollIntoView({block:"nearest"})),X.scrollIntoView({block:"nearest"}))}function A(){var B;return(B=S.current)==null?void 0:B.querySelector(`${_M}[aria-selected="true"]`)}function G(){var B;return Array.from(((B=S.current)==null?void 0:B.querySelectorAll(FM))||[])}function _(B){let $=G()[B];$&&w.setState("value",$.getAttribute(Al))}function O(B){var $;let Z=A(),X=G(),se=X.findIndex(oe=>oe===Z),H=X[se+B];($=i.current)!=null&&$.loop&&(H=se+B<0?X[X.length-1]:se+B===X.length?X[0]:X[se+B]),H&&w.setState("value",H.getAttribute(Al))}function E(B){let $=A(),Z=$?.closest(td),X;for(;Z&&!X;)Z=B>0?i3(Z,td):l3(Z,td),X=Z?.querySelector(FM);X?w.setState("value",X.getAttribute(Al)):O(B)}let D=()=>_(G().length-1),te=B=>{B.preventDefault(),B.metaKey?D():B.altKey?E(1):O(1)},ue=B=>{B.preventDefault(),B.metaKey?_(0):B.altKey?E(-1):O(-1)};return ee.createElement(j.div,{ref:t,tabIndex:-1,...v,"cmdk-root":"",onKeyDown:B=>{var $;($=v.onKeyDown)==null||$.call(v,B);let Z=B.nativeEvent.isComposing||B.keyCode===229;if(!(B.defaultPrevented||Z))switch(B.key){case"n":case"j":{h&&B.ctrlKey&&te(B);break}case"ArrowDown":{te(B);break}case"p":case"k":{h&&B.ctrlKey&&ue(B);break}case"ArrowUp":{ue(B);break}case"Home":{B.preventDefault(),_(0);break}case"End":{B.preventDefault(),D();break}case"Enter":{B.preventDefault();let X=A();if(X){let se=new Event(ux);X.dispatchEvent(se)}}}}},ee.createElement("label",{"cmdk-label":"",htmlFor:I.inputId,id:I.labelId,style:d3},l),xm(e,B=>ee.createElement(BM.Provider,{value:w},ee.createElement(VM.Provider,{value:I},B))))}),Jz=ee.forwardRef((e,t)=>{var o,r;let a=ze(),n=ee.useRef(null),s=ee.useContext(HM),i=od(),l=GM(e),u=(r=(o=l.current)==null?void 0:o.forceMount)!=null?r:s?.forceMount;ti(()=>{if(!u)return i.item(a,s?.id)},[u]);let c=zM(a,n,[e.value,e.children,n],e.keywords),d=cx(),f=zn(C=>C.value&&C.value===c.current),p=zn(C=>u||i.filter()===!1?!0:C.search?C.filtered.items.get(a)>0:!0);ee.useEffect(()=>{let C=n.current;if(!(!C||e.disabled))return C.addEventListener(ux,g),()=>C.removeEventListener(ux,g)},[p,e.onSelect,e.disabled]);function g(){var C,w;m(),(w=(C=l.current).onSelect)==null||w.call(C,c.current)}function m(){d.setState("value",c.current,!0)}if(!p)return null;let{disabled:h,value:v,onSelect:x,forceMount:y,keywords:R,...S}=e;return ee.createElement(j.div,{ref:Ao(n,t),...S,id:a,"cmdk-item":"",role:"option","aria-disabled":!!h,"aria-selected":!!f,"data-disabled":!!h,"data-selected":!!f,onPointerMove:h||i.getDisablePointerSelection()?void 0:m,onClick:h?void 0:g},e.children)}),e3=ee.forwardRef((e,t)=>{let{heading:o,children:r,forceMount:a,...n}=e,s=ze(),i=ee.useRef(null),l=ee.useRef(null),u=ze(),c=od(),d=zn(p=>a||c.filter()===!1?!0:p.search?p.filtered.groups.has(s):!0);ti(()=>c.group(s),[]),zM(s,i,[e.value,e.heading,l]);let f=ee.useMemo(()=>({id:s,forceMount:a}),[a]);return ee.createElement(j.div,{ref:Ao(i,t),...n,"cmdk-group":"",role:"presentation",hidden:d?void 0:!0},o&&ee.createElement("div",{ref:l,"cmdk-group-heading":"","aria-hidden":!0,id:u},o),xm(e,p=>ee.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":o?u:void 0},ee.createElement(HM.Provider,{value:f},p))))}),t3=ee.forwardRef((e,t)=>{let{alwaysRender:o,...r}=e,a=ee.useRef(null),n=zn(s=>!s.search);return!o&&!n?null:ee.createElement(j.div,{ref:Ao(a,t),...r,"cmdk-separator":"",role:"separator"})}),o3=ee.forwardRef((e,t)=>{let{onValueChange:o,...r}=e,a=e.value!=null,n=cx(),s=zn(u=>u.search),i=zn(u=>u.selectedItemId),l=od();return ee.useEffect(()=>{e.value!=null&&n.setState("search",e.value)},[e.value]),ee.createElement(j.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)}})}),r3=ee.forwardRef((e,t)=>{let{children:o,label:r="Suggestions",...a}=e,n=ee.useRef(null),s=ee.useRef(null),i=zn(u=>u.selectedItemId),l=od();return ee.useEffect(()=>{if(s.current&&n.current){let u=s.current,c=n.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)}}},[]),ee.createElement(j.div,{ref:Ao(n,t),...a,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":i,"aria-label":r,id:l.listId},xm(e,u=>ee.createElement("div",{ref:Ao(s,l.listInnerRef),"cmdk-list-sizer":""},u)))}),a3=ee.forwardRef((e,t)=>{let{open:o,onOpenChange:r,overlayClassName:a,contentClassName:n,container:s,...i}=e;return ee.createElement(Jc,{open:o,onOpenChange:r},ee.createElement(ed,{container:s},ee.createElement(kl,{"cmdk-overlay":"",className:a}),ee.createElement(El,{"aria-label":e.label,"cmdk-dialog":"",className:n},ee.createElement(UM,{ref:t,...i}))))}),n3=ee.forwardRef((e,t)=>zn(o=>o.filtered.count===0)?ee.createElement(j.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),s3=ee.forwardRef((e,t)=>{let{progress:o,children:r,label:a="Loading...",...n}=e;return ee.createElement(j.div,{ref:t,...n,"cmdk-loading":"",role:"progressbar","aria-valuenow":o,"aria-valuemin":0,"aria-valuemax":100,"aria-label":a},xm(e,s=>ee.createElement("div",{"aria-hidden":!0},s)))}),qn=Object.assign(UM,{List:r3,Item:Jz,Input:o3,Group:e3,Separator:t3,Dialog:a3,Empty:n3,Loading:s3});function i3(e,t){let o=e.nextElementSibling;for(;o;){if(o.matches(t))return o;o=o.nextElementSibling}}function l3(e,t){let o=e.previousElementSibling;for(;o;){if(o.matches(t))return o;o=o.previousElementSibling}}function GM(e){let t=ee.useRef(e);return ti(()=>{t.current=e}),t}var ti=typeof window>"u"?ee.useEffect:ee.useLayoutEffect;function Dl(e){let t=ee.useRef();return t.current===void 0&&(t.current=e()),t}function zn(e){let t=cx(),o=()=>e(t.snapshot());return ee.useSyncExternalStore(t.subscribe,o,o)}function zM(e,t,o,r=[]){let a=ee.useRef(),n=od();return ti(()=>{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(Al,i),a.current=i}),a}var u3=()=>{let[e,t]=ee.useState(),o=Dl(()=>new Map);return ti(()=>{o.current.forEach(r=>r()),o.current=new Map},[e]),(r,a)=>{o.current.set(r,a),t({})}};function c3(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function xm({asChild:e,children:t},o){return e&&ee.isValidElement(t)?ee.cloneElement(c3(t),{ref:t.ref},o(t.props.children)):o(t)}var d3={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};var Nl=b(k());var ct=b(N()),dx=Jc,f3=nx,p3=ed,m3=vm,g3=Y("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"}}),qM=Nl.forwardRef(({className:e,variant:t,animation:o,...r},a)=>(0,ct.jsx)(kl,{ref:a,className:P("moonui-theme",g3({variant:t,animation:o}),e),...r}));qM.displayName=kl.displayName;var h3=Y("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"}}),ym=Nl.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:p=!1,success:g=!1,onClose:m,...h},v)=>{let x=()=>{m&&m()};return(0,ct.jsxs)(p3,{children:[(0,ct.jsx)(qM,{variant:i,animation:l,onClick:u?void 0:x}),(0,ct.jsxs)(El,{ref:v,onEscapeKeyDown:u?void 0:x,onInteractOutside:u?void 0:x,className:P(h3({variant:o,size:r,radius:a,animation:n,position:s}),"outline-none",p&&"pointer-events-none",g&&"border-success/40",e),...h,children:[(c||d||f)&&(0,ct.jsxs)(fx,{className:"flex gap-4",children:[(f||p||g)&&(0,ct.jsxs)("div",{className:"flex shrink-0 items-center justify-center",children:[p&&(0,ct.jsx)(Rt,{className:"h-5 w-5 animate-spin text-primary"}),g&&(0,ct.jsx)($t,{className:"h-5 w-5 text-success"}),!p&&!g&&f&&(0,ct.jsx)("span",{className:"text-primary",children:f})]}),(0,ct.jsxs)("div",{className:"flex-1",children:[c&&(0,ct.jsx)(rd,{children:c}),d&&(0,ct.jsx)(px,{children:d})]})]}),t,!u&&(0,ct.jsxs)(vm,{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,ct.jsx)(Do,{className:"h-4 w-4"}),(0,ct.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})});ym.displayName=El.displayName;var fx=({className:e,...t})=>(0,ct.jsx)("div",{className:P("flex flex-col space-y-2 text-center sm:text-left",e),...t});fx.displayName="DialogHeader";var WM=({className:e,...t})=>(0,ct.jsx)("div",{className:P("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end sm:space-x-2 mt-6",e),...t});WM.displayName="DialogFooter";var rd=Nl.forwardRef(({className:e,...t},o)=>(0,ct.jsx)(gm,{ref:o,className:P("text-xl font-semibold leading-snug tracking-tight dark:text-white",e),...t}));rd.displayName=gm.displayName;var px=Nl.forwardRef(({className:e,...t},o)=>(0,ct.jsx)(hm,{ref:o,className:P("text-sm text-muted-foreground leading-normal dark:text-gray-400",e),...t}));px.displayName=hm.displayName;var v3=Nl.forwardRef(({className:e,...t},o)=>(0,ct.jsx)("form",{ref:o,className:P("moonui-theme","flex flex-col gap-4",e),...t}));v3.displayName="DialogForm";var eo=b(N()),x3=Y("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"}}),mx=Wn.forwardRef(({className:e,variant:t,size:o,...r},a)=>(0,eo.jsx)(qn,{ref:a,className:P("moonui-theme",x3({variant:t,size:o}),e),...r}));mx.displayName="Command";var y3=({children:e,commandClassName:t,...o})=>(0,eo.jsx)(dx,{...o,children:(0,eo.jsxs)(ym,{className:"overflow-hidden p-0 shadow-lg",hideCloseButton:!0,children:[(0,eo.jsx)(rd,{className:"sr-only",children:"Command Menu"}),(0,eo.jsx)(mx,{className:P("[&_[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})]})}),$M=Wn.forwardRef(({className:e,...t},o)=>(0,eo.jsxs)("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[(0,eo.jsx)(fs,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),(0,eo.jsx)(qn.Input,{ref:o,className:P("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})]}));$M.displayName="CommandInput";var jM=Wn.forwardRef(({className:e,...t},o)=>(0,eo.jsx)(qn.List,{ref:o,className:P("moonui-theme","max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));jM.displayName="CommandList";var KM=Wn.forwardRef(({className:e,...t},o)=>(0,eo.jsx)(qn.Empty,{ref:o,className:P("moonui-theme","py-6 text-center text-sm text-muted-foreground",e),...t}));KM.displayName="CommandEmpty";var XM=Wn.forwardRef(({className:e,...t},o)=>(0,eo.jsx)(qn.Group,{ref:o,className:P("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}));XM.displayName="CommandGroup";var YM=Wn.forwardRef(({className:e,...t},o)=>(0,eo.jsx)(qn.Separator,{ref:o,className:P("moonui-theme","-mx-1 h-px bg-border",e),...t}));YM.displayName="CommandSeparator";var ZM=Wn.forwardRef(({className:e,...t},o)=>(0,eo.jsx)(qn.Item,{ref:o,className:P("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}));ZM.displayName="CommandItem";var QM=({className:e,...t})=>(0,eo.jsx)("span",{className:P("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});QM.displayName="CommandShortcut";var Ax=b(k());var sd=b(k(),1);function $n(e,t){return typeof e=="function"?e(t):e}function Ho(e,t){return o=>{t.setState(r=>({...r,[e]:$n(o,r[e])}))}}function Sm(e){return e instanceof Function}function b3(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function C3(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 he(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,p=(g,m)=>{for(g=String(g);g.length<m;)g=" "+g;return g};console.info(`%c\u23F1 ${p(d,5)} /${p(c,5)} ms`,`
|
|
64
53
|
font-size: .6rem;
|
|
65
54
|
font-weight: bold;
|
|
66
|
-
color: hsl(${Math.max(0,Math.min(120-120*f,120))}deg 100% 31%);`,r?.key)}return n}}function ge(e,t,r,o){return{debug:()=>{var n;return(n=e?.debugAll)!=null?n:e[t]},key:!1,onChange:o}}function qX(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:me(()=>[e,r,t,a],(i,s,l,u)=>({table:i,column:s,row:l,cell:u,getValue:u.getValue,renderValue:u.renderValue}),ge(e.options,"debugCells","cell.getContext"))};return e._features.forEach(i=>{i.createCell==null||i.createCell(a,r,t,e)},{}),a}function KX(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 g;p=(g=p)==null?void 0:g[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:me(()=>[!0],()=>{var f;return[d,...(f=d.columns)==null?void 0:f.flatMap(p=>p.getFlatColumns())]},ge(e.options,"debugColumns","column.getFlatColumns")),getLeafColumns:me(()=>[e._getOrderColumnsFn()],f=>{var p;if((p=d.columns)!=null&&p.length){let g=d.columns.flatMap(m=>m.getLeafColumns());return f(g)}return[d]},ge(e.options,"debugColumns","column.getLeafColumns"))};for(let f of e._features)f.createColumn==null||f.createColumn(d,e);return d}var Pr="debugHeaders";function fB(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 XX={createTable:e=>{e.getHeaderGroups=me(()=>[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 ly(t,[...s,...u,...l],e)},ge(e.options,Pr,"getHeaderGroups")),e.getCenterHeaderGroups=me(()=>[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))),ly(t,r,e,"center")),ge(e.options,Pr,"getCenterHeaderGroups")),e.getLeftHeaderGroups=me(()=>[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 ly(t,a,e,"left")},ge(e.options,Pr,"getLeftHeaderGroups")),e.getRightHeaderGroups=me(()=>[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 ly(t,a,e,"right")},ge(e.options,Pr,"getRightHeaderGroups")),e.getFooterGroups=me(()=>[e.getHeaderGroups()],t=>[...t].reverse(),ge(e.options,Pr,"getFooterGroups")),e.getLeftFooterGroups=me(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),ge(e.options,Pr,"getLeftFooterGroups")),e.getCenterFooterGroups=me(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),ge(e.options,Pr,"getCenterFooterGroups")),e.getRightFooterGroups=me(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),ge(e.options,Pr,"getRightFooterGroups")),e.getFlatHeaders=me(()=>[e.getHeaderGroups()],t=>t.map(r=>r.headers).flat(),ge(e.options,Pr,"getFlatHeaders")),e.getLeftFlatHeaders=me(()=>[e.getLeftHeaderGroups()],t=>t.map(r=>r.headers).flat(),ge(e.options,Pr,"getLeftFlatHeaders")),e.getCenterFlatHeaders=me(()=>[e.getCenterHeaderGroups()],t=>t.map(r=>r.headers).flat(),ge(e.options,Pr,"getCenterFlatHeaders")),e.getRightFlatHeaders=me(()=>[e.getRightHeaderGroups()],t=>t.map(r=>r.headers).flat(),ge(e.options,Pr,"getRightFlatHeaders")),e.getCenterLeafHeaders=me(()=>[e.getCenterFlatHeaders()],t=>t.filter(r=>{var o;return!((o=r.subHeaders)!=null&&o.length)}),ge(e.options,Pr,"getCenterLeafHeaders")),e.getLeftLeafHeaders=me(()=>[e.getLeftFlatHeaders()],t=>t.filter(r=>{var o;return!((o=r.subHeaders)!=null&&o.length)}),ge(e.options,Pr,"getLeftLeafHeaders")),e.getRightLeafHeaders=me(()=>[e.getRightFlatHeaders()],t=>t.filter(r=>{var o;return!((o=r.subHeaders)!=null&&o.length)}),ge(e.options,Pr,"getRightLeafHeaders")),e.getLeafHeaders=me(()=>[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()},ge(e.options,Pr,"getLeafHeaders"))}};function ly(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(g=>g.getIsVisible()).forEach(g=>{var m;(m=g.columns)!=null&&m.length&&s(g.columns,p+1)},0)};s(e);let l=[],u=(f,p)=>{let g={depth:p,id:[o,`${p}`].filter(Boolean).join("_"),headers:[]},m=[];f.forEach(x=>{let h=[...m].reverse()[0],v=x.column.depth===g.depth,y,w=!1;if(v&&x.column.parent?y=x.column.parent:(y=x.column,w=!0),h&&h?.column===y)h.subHeaders.push(x);else{let C=fB(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)}g.headers.push(x),x.headerGroup=g}),l.push(g),p>0&&u(m,p-1)},c=t.map((f,p)=>fB(r,f,{depth:i,index:p}));u(c,i-1),l.reverse();let d=f=>f.filter(g=>g.column.getIsVisible()).map(g=>{let m=0,x=0,h=[0];g.subHeaders&&g.subHeaders.length?(h=[],d(g.subHeaders).forEach(y=>{let{colSpan:w,rowSpan:C}=y;m+=w,h.push(C)})):m=1;let v=Math.min(...h);return x=x+v,g.colSpan=m,g.rowSpan=x,{colSpan:m,rowSpan:x}});return d((n=(a=l[0])==null?void 0:a.headers)!=null?n:[]),l}var vI=(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:()=>$X(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:me(()=>[e.getAllLeafColumns()],l=>l.map(u=>qX(e,s,u,u.id)),ge(e.options,"debugRows","getAllCells")),_getAllCellsByColumnId:me(()=>[s.getAllCells()],l=>l.reduce((u,c)=>(u[c.column.id]=c,u),{}),ge(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},YX={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()}}},mB=(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))};mB.autoRemove=e=>Hn(e);var gB=(e,t,r)=>{var o;return!!(!((o=e.getValue(t))==null||(o=o.toString())==null)&&o.includes(r))};gB.autoRemove=e=>Hn(e);var hB=(e,t,r)=>{var o;return((o=e.getValue(t))==null||(o=o.toString())==null?void 0:o.toLowerCase())===r?.toLowerCase()};hB.autoRemove=e=>Hn(e);var vB=(e,t,r)=>{var o;return(o=e.getValue(t))==null?void 0:o.includes(r)};vB.autoRemove=e=>Hn(e);var xB=(e,t,r)=>!r.some(o=>{var n;return!((n=e.getValue(t))!=null&&n.includes(o))});xB.autoRemove=e=>Hn(e)||!(e!=null&&e.length);var yB=(e,t,r)=>r.some(o=>{var n;return(n=e.getValue(t))==null?void 0:n.includes(o)});yB.autoRemove=e=>Hn(e)||!(e!=null&&e.length);var wB=(e,t,r)=>e.getValue(t)===r;wB.autoRemove=e=>Hn(e);var CB=(e,t,r)=>e.getValue(t)==r;CB.autoRemove=e=>Hn(e);var xI=(e,t,r)=>{let[o,n]=r,a=e.getValue(t);return a>=o&&a<=n};xI.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]};xI.autoRemove=e=>Hn(e)||Hn(e[0])&&Hn(e[1]);var di={includesString:mB,includesStringSensitive:gB,equalsString:hB,arrIncludes:vB,arrIncludesAll:xB,arrIncludesSome:yB,equals:wB,weakEquals:CB,inNumberRange:xI};function Hn(e){return e==null||e===""}var QX={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:Io("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"?di.includesString:typeof o=="number"?di.inNumberRange:typeof o=="boolean"||o!==null&&typeof o=="object"?di.equals:Array.isArray(o)?di.arrIncludes:di.weakEquals},e.getFilterFn=()=>{var r,o;return dy(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:di[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=Is(r,a?a.value:void 0);if(pB(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=Is(t,n))==null?void 0:a.filter(i=>{let s=r.find(l=>l.id===i.id);if(s){let l=s.getFilterFn();if(pB(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 pB(e,t,r){return(e&&e.autoRemove?e.autoRemove(t,r):!1)||typeof t>"u"||typeof t=="string"&&!t}var ZX=(e,t,r)=>r.reduce((o,n)=>{let a=n.getValue(e);return o+(typeof a=="number"?a:0)},0),JX=(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},eY=(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},tY=(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]},rY=(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},oY=(e,t)=>{if(!t.length)return;let r=t.map(a=>a.getValue(e));if(!jX(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},nY=(e,t)=>Array.from(new Set(t.map(r=>r.getValue(e))).values()),aY=(e,t)=>new Set(t.map(r=>r.getValue(e))).size,iY=(e,t)=>t.length,aI={sum:ZX,min:JX,max:eY,extent:tY,mean:rY,median:oY,unique:nY,uniqueCount:aY,count:iY},sY={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:Io("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 aI.sum;if(Object.prototype.toString.call(o)==="[object Date]")return aI.extent},e.getAggregationFn=()=>{var r,o;if(!e)throw new Error;return dy(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:aI[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 lY(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 uY={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:Io("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=me(r=>[Rm(t,r)],r=>r.findIndex(o=>o.id===e.id),ge(t.options,"debugColumns","getIndex")),e.getIsFirstColumn=r=>{var o;return((o=Rm(t,r)[0])==null?void 0:o.id)===e.id},e.getIsLastColumn=r=>{var o;let n=Rm(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=me(()=>[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 lY(a,r,o)},ge(e.options,"debugTable","_getOrderColumnsFn"))}},iI=()=>({left:[],right:[]}),cY={getInitialState:e=>({columnPinning:iI(),...e}),getDefaultOptions:e=>({onColumnPinningChange:Io("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=me(()=>[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))},ge(t.options,"debugRows","getCenterVisibleCells")),e.getLeftVisibleCells=me(()=>[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"})),ge(t.options,"debugRows","getLeftVisibleCells")),e.getRightVisibleCells=me(()=>[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"})),ge(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?iI():(r=(o=e.initialState)==null?void 0:o.columnPinning)!=null?r:iI())},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=me(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,r)=>(r??[]).map(o=>t.find(n=>n.id===o)).filter(Boolean),ge(e.options,"debugColumns","getLeftLeafColumns")),e.getRightLeafColumns=me(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,r)=>(r??[]).map(o=>t.find(n=>n.id===o)).filter(Boolean),ge(e.options,"debugColumns","getRightLeafColumns")),e.getCenterLeafColumns=me(()=>[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))},ge(e.options,"debugColumns","getCenterLeafColumns"))}};function dY(e){return e||(typeof document<"u"?document:null)}var uy={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},sI=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),fY={getDefaultColumnDef:()=>uy,getInitialState:e=>({columnSizing:{},columnSizingInfo:sI(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:Io("columnSizing",e),onColumnSizingInfoChange:Io("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:uy.minSize,(o=a??e.columnDef.size)!=null?o:uy.size),(n=e.columnDef.maxSize)!=null?n:uy.maxSize)},e.getStart=me(r=>[r,Rm(t,r),t.getState().columnSizing],(r,o)=>o.slice(0,e.getIndex(r)).reduce((n,a)=>n+a.getSize(),0),ge(t.options,"debugColumns","getStart")),e.getAfter=me(r=>[r,Rm(t,r),t.getState().columnSizing],(r,o)=>o.slice(e.getIndex(r)+1).reduce((n,a)=>n+a.getSize(),0),ge(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(),lI(a)&&a.touches&&a.touches.length>1))return;let i=e.getSize(),s=e?e.getLeafHeaders().map(h=>[h.column.id,h.column.getSize()]):[[o.id,o.getSize()]],l=lI(a)?Math.round(a.touches[0].clientX):a.clientX,u={},c=(h,v)=>{typeof v=="number"&&(t.setColumnSizingInfo(y=>{var w,C;let b=t.options.columnResizeDirection==="rtl"?-1:1,S=(v-((w=y?.startOffset)!=null?w:0))*b,I=Math.max(S/((C=y?.startSize)!=null?C:0),-.999999);return y.columnSizingStart.forEach(L=>{let[T,k]=L;u[T]=Math.round(Math.max(k+k*I,0)*100)/100}),{...y,deltaOffset:S,deltaPercentage:I}}),(t.options.columnResizeMode==="onChange"||h==="end")&&t.setColumnSizing(y=>({...y,...u})))},d=h=>c("move",h),f=h=>{c("end",h),t.setColumnSizingInfo(v=>({...v,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},p=dY(r),g={moveHandler:h=>d(h.clientX),upHandler:h=>{p?.removeEventListener("mousemove",g.moveHandler),p?.removeEventListener("mouseup",g.upHandler),f(h.clientX)}},m={moveHandler:h=>(h.cancelable&&(h.preventDefault(),h.stopPropagation()),d(h.touches[0].clientX),!1),upHandler:h=>{var v;p?.removeEventListener("touchmove",m.moveHandler),p?.removeEventListener("touchend",m.upHandler),h.cancelable&&(h.preventDefault(),h.stopPropagation()),f((v=h.touches[0])==null?void 0:v.clientX)}},x=pY()?{passive:!1}:!1;lI(a)?(p?.addEventListener("touchmove",m.moveHandler,x),p?.addEventListener("touchend",m.upHandler,x)):(p?.addEventListener("mousemove",g.moveHandler,x),p?.addEventListener("mouseup",g.upHandler,x)),t.setColumnSizingInfo(h=>({...h,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?sI():(r=e.initialState.columnSizingInfo)!=null?r:sI())},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}}},cy=null;function pY(){if(typeof cy=="boolean")return cy;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 cy=e,cy}function lI(e){return e.type==="touchstart"}var mY={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:Io("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=me(()=>[e.getAllCells(),t.getState().columnVisibility],r=>r.filter(o=>o.column.getIsVisible()),ge(t.options,"debugRows","_getAllVisibleCells")),e.getVisibleCells=me(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(r,o,n)=>[...r,...o,...n],ge(t.options,"debugRows","getVisibleCells"))},createTable:e=>{let t=(r,o)=>me(()=>[o(),o().filter(n=>n.getIsVisible()).map(n=>n.id).join("_")],n=>n.filter(a=>a.getIsVisible==null?void 0:a.getIsVisible()),ge(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 Rm(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}var gY={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()}}},hY={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:Io("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=()=>di.includesString,e.getGlobalFilterFn=()=>{var t,r;let{globalFilterFn:o}=e.options;return dy(o)?o:o==="auto"?e.getGlobalAutoFilterFn():(t=(r=e.options.filterFns)==null?void 0:r[o])!=null?t:di[o]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},vY={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:Io("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()}}}},fI=0,pI=10,uI=()=>({pageIndex:fI,pageSize:pI}),xY={getInitialState:e=>({...e,pagination:{...uI(),...e?.pagination}}),getDefaultOptions:e=>({onPaginationChange:Io("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=>Is(o,a);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(n)},e.resetPagination=o=>{var n;e.setPagination(o?uI():(n=e.initialState.pagination)!=null?n:uI())},e.setPageIndex=o=>{e.setPagination(n=>{let a=Is(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?fI:(n=(a=e.initialState)==null||(a=a.pagination)==null?void 0:a.pageIndex)!=null?n:fI)},e.resetPageSize=o=>{var n,a;e.setPageSize(o?pI:(n=(a=e.initialState)==null||(a=a.pagination)==null?void 0:a.pageSize)!=null?n:pI)},e.setPageSize=o=>{e.setPagination(n=>{let a=Math.max(1,Is(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=Is(o,(a=e.options.pageCount)!=null?a:-1);return typeof i=="number"&&(i=Math.max(-1,i)),{...n,pageCount:i}}),e.getPageOptions=me(()=>[e.getPageCount()],o=>{let n=[];return o&&o>0&&(n=[...new Array(o)].fill(null).map((a,i)=>i)),n},ge(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}}},cI=()=>({top:[],bottom:[]}),yY={getInitialState:e=>({rowPinning:cI(),...e}),getDefaultOptions:e=>({onRowPinningChange:Io("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,g;return{top:[...((p=l?.top)!=null?p:[]).filter(m=>!(s!=null&&s.has(m))),...Array.from(s)],bottom:((g=l?.bottom)!=null?g:[]).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?cI():(r=(o=e.initialState)==null?void 0:o.rowPinning)!=null?r:cI())},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=me(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,r)=>e._getPinnedRows(t,r,"top"),ge(e.options,"debugRows","getTopRows")),e.getBottomRows=me(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,r)=>e._getPinnedRows(t,r,"bottom"),ge(e.options,"debugRows","getBottomRows")),e.getCenterRows=me(()=>[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))},ge(e.options,"debugRows","getCenterRows"))}},wY={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:Io("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=>{mI(n,a.id,o,!0,e)}),n}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=me(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,r)=>Object.keys(t).length?dI(e,r):{rows:[],flatRows:[],rowsById:{}},ge(e.options,"debugTable","getSelectedRowModel")),e.getFilteredSelectedRowModel=me(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,r)=>Object.keys(t).length?dI(e,r):{rows:[],flatRows:[],rowsById:{}},ge(e.options,"debugTable","getFilteredSelectedRowModel")),e.getGroupedSelectedRowModel=me(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,r)=>Object.keys(t).length?dI(e,r):{rows:[],flatRows:[],rowsById:{}},ge(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 mI(s,e.id,r,(i=o?.selectChildren)!=null?i:!0,t),s})},e.getIsSelected=()=>{let{rowSelection:r}=t.getState();return yI(e,r)},e.getIsSomeSelected=()=>{let{rowSelection:r}=t.getState();return gI(e,r)==="some"},e.getIsAllSubRowsSelected=()=>{let{rowSelection:r}=t.getState();return gI(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)}}}},mI=(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=>mI(e,s.id,r,o,n))};function dI(e,t){let r=e.getState().rowSelection,o=[],n={},a=function(i,s){return i.map(l=>{var u;let c=yI(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 yI(e,t){var r;return(r=t[e.id])!=null?r:!1}function gI(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()&&(yI(i,t)?a=!0:n=!1),i.subRows&&i.subRows.length)){let s=gI(i,t);s==="all"?a=!0:(s==="some"&&(a=!0),n=!1)}}),n?"all":a?"some":!1}var hI=/([0-9]+)/gm,CY=(e,t,r)=>SB(Ps(e.getValue(r)).toLowerCase(),Ps(t.getValue(r)).toLowerCase()),SY=(e,t,r)=>SB(Ps(e.getValue(r)),Ps(t.getValue(r))),bY=(e,t,r)=>wI(Ps(e.getValue(r)).toLowerCase(),Ps(t.getValue(r)).toLowerCase()),RY=(e,t,r)=>wI(Ps(e.getValue(r)),Ps(t.getValue(r))),IY=(e,t,r)=>{let o=e.getValue(r),n=t.getValue(r);return o>n?1:o<n?-1:0},PY=(e,t,r)=>wI(e.getValue(r),t.getValue(r));function wI(e,t){return e===t?0:e>t?1:-1}function Ps(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function SB(e,t){let r=e.split(hI).filter(Boolean),o=t.split(hI).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 bm={alphanumeric:CY,alphanumericCaseSensitive:SY,text:bY,textCaseSensitive:RY,datetime:IY,basic:PY},LY={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:Io("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 bm.datetime;if(typeof a=="string"&&(o=!0,a.split(hI).length>1))return bm.alphanumeric}return o?bm.text:bm.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 dy(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:bm[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())}},TY=[XX,mY,uY,cY,YX,QX,gY,hY,LY,sY,vY,xY,yY,wY,fY];function bB(e){var t,r;let o=[...TY,...(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=Is(f,n.options);n.options=i(p)},getState:()=>n.options.state,setState:f=>{n.options.onStateChange==null||n.options.onStateChange(f)},_getRowId:(f,p,g)=>{var m;return(m=n.options.getRowId==null?void 0:n.options.getRowId(f,p,g))!=null?m:`${g?[g.id,p].join("."):p}`},getCoreRowModel:()=>(n._getCoreRowModel||(n._getCoreRowModel=n.options.getCoreRowModel(n)),n._getCoreRowModel()),getRowModel:()=>n.getPaginationRowModel(),getRow:(f,p)=>{let g=(p?n.getPrePaginationRowModel():n.getRowModel()).rowsById[f];if(!g&&(g=n.getCoreRowModel().rowsById[f],!g))throw new Error;return g},_getDefaultColumnDef:me(()=>[n.options.defaultColumn],f=>{var p;return f=(p=f)!=null?p:{},{header:g=>{let m=g.header.column.columnDef;return m.accessorKey?m.accessorKey:m.accessorFn?m.id:null},cell:g=>{var m,x;return(m=(x=g.renderValue())==null||x.toString==null?void 0:x.toString())!=null?m:null},...n._features.reduce((g,m)=>Object.assign(g,m.getDefaultColumnDef==null?void 0:m.getDefaultColumnDef()),{}),...f}},ge(e,"debugColumns","_getDefaultColumnDef")),_getColumnDefs:()=>n.options.columns,getAllColumns:me(()=>[n._getColumnDefs()],f=>{let p=function(g,m,x){return x===void 0&&(x=0),g.map(h=>{let v=KX(n,h,x,m),y=h;return v.columns=y.columns?p(y.columns,v,x+1):[],v})};return p(f)},ge(e,"debugColumns","getAllColumns")),getAllFlatColumns:me(()=>[n.getAllColumns()],f=>f.flatMap(p=>p.getFlatColumns()),ge(e,"debugColumns","getAllFlatColumns")),_getAllFlatColumnsById:me(()=>[n.getAllFlatColumns()],f=>f.reduce((p,g)=>(p[g.id]=g,p),{}),ge(e,"debugColumns","getAllFlatColumnsById")),getAllLeafColumns:me(()=>[n.getAllColumns(),n._getOrderColumnsFn()],(f,p)=>{let g=f.flatMap(m=>m.getLeafColumns());return p(g)},ge(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 RB(){return e=>me(()=>[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=vI(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},ge(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}function kY(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 MY(e,t,r){return r.options.filterFromLeafRows?EY(e,t,r):AY(e,t,r)}function EY(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],g=vI(r,p.id,p.original,p.index,p.depth,void 0,p.parentId);if(g.columnFilters=p.columnFilters,(d=p.subRows)!=null&&d.length&&u<i){if(g.subRows=s(p.subRows,u+1),p=g,t(p)&&!g.subRows.length){c.push(p),a[p.id]=p,n.push(p);continue}if(t(p)||g.subRows.length){c.push(p),a[p.id]=p,n.push(p);continue}}else p=g,t(p)&&(c.push(p),a[p.id]=p,n.push(p))}return c};return{rows:s(e),flatRows:n,rowsById:a}}function AY(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=vI(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 IB(){return e=>me(()=>[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 g=e.getColumn(f.id);if(!g)return;let m=g.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 g=0;g<n.length;g++){u=n[g];let m=u.id;p.columnFilters[m]=u.filterFn(p,m,u.resolvedValue,x=>{p.columnFiltersMeta[m]=x})}if(a.length){for(let g=0;g<a.length;g++){c=a[g];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 MY(t.rows,d,e)},ge(e.options,"debugTable","getFilteredRowModel",()=>e._autoResetPageIndex()))}function PB(e){return t=>me(()=>[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=kY({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},ge(t.options,"debugTable","getPaginationRowModel"))}function LB(){return e=>me(()=>[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 g=a[p],m=i[g.id],x=m.sortUndefined,h=(f=g?.desc)!=null?f:!1,v=0;if(x){let y=c.getValue(g.id),w=d.getValue(g.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;v=C&&b?0:C?x:-x}}if(v===0&&(v=m.sortingFn(c,d,g.id)),v!==0)return h&&(v*=-1),m.invertSorting&&(v*=-1),v}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}},ge(e.options,"debugTable","getSortedRowModel",()=>e._autoResetPageIndex()))}function CI(e,t){return e?DY(e)?Im.createElement(e,t):e:null}function DY(e){return NY(e)||typeof e=="function"||OY(e)}function NY(e){return typeof e=="function"&&(()=>{let t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function OY(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function TB(e){let t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[r]=Im.useState(()=>({current:bB(t)})),[o,n]=Im.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 Lr=R(M());var dt=R(N()),FY=K("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"}}),Pm=Lr.forwardRef(({className:e,variant:t,size:r,loading:o,emptyContent:n,...a},i)=>{let s=t==="striped",l=Lr.Children.map(a.children,u=>{if(Lr.isValidElement(u)&&u.type==="tbody"){let c=u.props;return Lr.cloneElement(u,{className:P(c.className,s&&"even:[&>tr]:bg-muted/50")})}return u});return(0,dt.jsxs)("div",{className:"relative w-full overflow-auto",children:[o&&(0,dt.jsx)("div",{className:"absolute inset-0 bg-background/60 flex items-center justify-center z-10",children:(0,dt.jsx)("div",{className:"h-8 w-8 animate-spin rounded-full border-2 border-primary border-t-transparent"})}),(0,dt.jsx)("table",{ref:i,className:P(FY({variant:t,size:r}),o&&"opacity-70",e),...a,children:l})]})});Pm.displayName="Table";var Lm=Lr.forwardRef(({className:e,...t},r)=>(0,dt.jsx)("thead",{ref:r,className:P("moonui-theme","[&_tr]:border-b",e),...t}));Lm.displayName="TableHeader";var Tm=Lr.forwardRef(({className:e,emptyContent:t,emptyMessage:r="No data available",children:o,...n},a)=>{let i=Lr.Children.count(o)>0;return(0,dt.jsx)("tbody",{ref:a,className:P("moonui-theme","[&_tr:last-child]:border-0",e),...n,children:i?o:(0,dt.jsx)("tr",{children:(0,dt.jsx)("td",{colSpan:100,className:"h-24 text-center",children:t||(0,dt.jsx)("div",{className:"py-6 text-muted-foreground",children:(0,dt.jsx)("div",{className:"text-sm",children:r})})})})})});Tm.displayName="TableBody";var SI=Lr.forwardRef(({className:e,...t},r)=>(0,dt.jsx)("tfoot",{ref:r,className:P("moonui-theme","bg-primary text-primary-foreground font-medium",e),...t}));SI.displayName="TableFooter";var Zl=Lr.forwardRef(({className:e,...t},r)=>(0,dt.jsx)("tr",{ref:r,className:P("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));Zl.displayName="TableRow";var km=Lr.forwardRef(({className:e,sortable:t,sorted:r,onSort:o,align:n="left",children:a,...i},s)=>{let l=()=>t?r==="asc"?(0,dt.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,dt.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,dt.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,dt.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,dt.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,dt.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,dt.jsx)("th",{ref:s,className:P("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,dt.jsxs)("div",{className:P("flex items-center",u[n].split(" ")[1]),children:[a,t&&l()]}):a})});km.displayName="TableHead";var nd=Lr.forwardRef(({className:e,align:t="left",...r},o)=>{let n={left:"text-left",center:"text-center",right:"text-right"}[t];return(0,dt.jsx)("td",{ref:o,className:P("moonui-theme","p-4 align-middle [&:has([role=checkbox])]:pr-0",n,e),...r})});nd.displayName="TableCell";var bI=Lr.forwardRef(({className:e,...t},r)=>(0,dt.jsx)("caption",{ref:r,className:P("moonui-theme","mt-4 text-sm text-muted-foreground",e),...t}));bI.displayName="TableCaption";var Ae=R(N());function kB({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]=RI.useState([]),[d,f]=RI.useState(""),p=TB({data:t,columns:e,onSortingChange:r?c:void 0,onGlobalFilterChange:n?f:void 0,getCoreRowModel:RB(),getPaginationRowModel:o?PB():void 0,getSortedRowModel:r?LB():void 0,getFilteredRowModel:n?IB():void 0,state:{sorting:u,globalFilter:d},initialState:{pagination:{pageSize:a}}});return(0,Ae.jsxs)("div",{className:P("space-y-4",l),children:[n&&(0,Ae.jsx)("div",{className:"flex items-center",children:(0,Ae.jsxs)("div",{className:"relative max-w-sm",children:[(0,Ae.jsx)(ll,{className:"absolute left-2 top-2.5 h-4 w-4 text-muted-foreground"}),(0,Ae.jsx)(ur,{placeholder:i,value:d,onChange:g=>f(g.target.value),className:"pl-8"})]})}),(0,Ae.jsx)("div",{className:"rounded-md border",children:(0,Ae.jsxs)(Pm,{children:[(0,Ae.jsx)(Lm,{children:p.getHeaderGroups().map(g=>(0,Ae.jsx)(Zl,{children:g.headers.map(m=>(0,Ae.jsx)(km,{children:m.isPlaceholder?null:(0,Ae.jsxs)("div",{className:P("flex items-center gap-2",m.column.getCanSort()&&"cursor-pointer select-none"),onClick:m.column.getToggleSortingHandler(),children:[CI(m.column.columnDef.header,m.getContext()),r&&m.column.getCanSort()&&(0,Ae.jsx)("div",{className:"ml-auto",children:m.column.getIsSorted()==="desc"?(0,Ae.jsx)($u,{className:"h-4 w-4"}):m.column.getIsSorted()==="asc"?(0,Ae.jsx)(Ku,{className:"h-4 w-4"}):(0,Ae.jsx)(qu,{className:"h-4 w-4 opacity-50"})})]})},m.id))},g.id))}),(0,Ae.jsx)(Tm,{children:p.getRowModel().rows?.length?p.getRowModel().rows.map(g=>(0,Ae.jsx)(Zl,{"data-state":g.getIsSelected()&&"selected",children:g.getVisibleCells().map(m=>(0,Ae.jsx)(nd,{children:CI(m.column.columnDef.cell,m.getContext())},m.id))},g.id)):(0,Ae.jsx)(Zl,{children:(0,Ae.jsx)(nd,{colSpan:e.length,className:"h-24 text-center",children:s})})})]})}),o&&(0,Ae.jsxs)("div",{className:"flex items-center justify-end space-x-2",children:[(0,Ae.jsxs)("div",{className:"flex-1 text-sm text-muted-foreground",children:[p.getFilteredRowModel().rows.length," row(s)"]}),(0,Ae.jsxs)("div",{className:"space-x-2",children:[(0,Ae.jsxs)(Ee,{variant:"outline",size:"sm",onClick:()=>p.previousPage(),disabled:!p.getCanPreviousPage(),children:[(0,Ae.jsx)(bn,{className:"h-4 w-4"}),"Previous"]}),(0,Ae.jsxs)("span",{className:"text-sm",children:["Page ",p.getState().pagination.pageIndex+1," of"," ",p.getPageCount()]}),(0,Ae.jsxs)(Ee,{variant:"outline",size:"sm",onClick:()=>p.nextPage(),disabled:!p.getCanNextPage(),children:["Next",(0,Ae.jsx)(Fr,{className:"h-4 w-4"})]})]})]})]})}function MB(e){return({column:t})=>(0,Ae.jsxs)(Ee,{variant:"ghost",className:"-ml-3 h-8 data-[state=open]:bg-accent",onClick:()=>t.toggleSorting(t.getIsSorted()==="asc"),children:[e,t.getIsSorted()==="desc"?(0,Ae.jsx)($u,{className:"ml-2 h-4 w-4"}):t.getIsSorted()==="asc"?(0,Ae.jsx)(Ku,{className:"ml-2 h-4 w-4"}):(0,Ae.jsx)(qu,{className:"ml-2 h-4 w-4"})]})}var At=R(M());var ye=R(N()),_Y={initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20}},II=K("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"}}),fy=At.forwardRef(function({className:t,variant:r,size:o,state:n,value:a,onChange:i,placeholder:s="Pick a date",formatString:l="PPP",minDate:u,maxDate:c,disabledDates:d,disabledDaysOfWeek:f,showWeekNumbers:p,iconPosition:g="left",icon:m,allowClear:x=!0,readOnly:h=!1,showTodayButton:v=!0,calendarProps:y,disabled:w,...C},b){let[S,I]=At.useState(!1),[L,T]=At.useState(a);At.useEffect(()=>{T(a)},[a]);let k=O=>{let B=Array.isArray(O)?O[0]:O&&typeof O=="object"&&"from"in O?O.from:O;T(B),i?.(B),B&&I(!1)},E=O=>{O.stopPropagation(),k(void 0)},_=()=>{k(new Date)},D=O=>!!(u&&O<u||c&&O>c||d?.some(B=>B.toDateString()===O.toDateString())||f?.includes(O.getDay())),z=L&&gx(L)?Wo(L,l):null,F=m||(0,ye.jsx)(ol,{className:"h-4 w-4"});return(0,ye.jsx)("div",{ref:b,className:"moonui-theme",children:(0,ye.jsxs)(wa,{open:S,onOpenChange:I,children:[(0,ye.jsx)(Ca,{asChild:!0,children:(0,ye.jsxs)(Ee,{variant:r==="ghost"?"ghost":"outline",className:P(II({variant:r,size:o,state:n}),!z&&"text-muted-foreground",t),disabled:w||h,...C,children:[(0,ye.jsx)(Ka,{mode:"wait",children:(0,ye.jsxs)(He.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:[g==="left"&&F,(0,ye.jsx)("span",{className:"flex-1 truncate",children:z||s}),g==="right"&&F]},z||"placeholder")}),x&&z&&!h&&!w&&(0,ye.jsxs)(He.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:E,role:"button",tabIndex:0,onKeyDown:O=>{(O.key==="Enter"||O.key===" ")&&(O.preventDefault(),E(O))},children:[(0,ye.jsx)("span",{className:"sr-only",children:"Clear date"}),(0,ye.jsx)("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,ye.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,ye.jsx)(Vn,{className:"w-[360px] p-0 shadow-2xl rounded-2xl border border-border bg-background/95 backdrop-blur-sm !z-[9999]",align:"start",sideOffset:12,children:(0,ye.jsxs)(He.div,{..._Y,className:"rounded-2xl bg-background overflow-hidden",children:[(0,ye.jsx)(Uc,{mode:"single",selected:L,onSelect:k,disabled:D,showOutsideDays:!1,className:P("rounded-2xl",y?.className),...y}),v&&(0,ye.jsx)("div",{className:"border-t px-4 py-3",children:(0,ye.jsx)(Ee,{variant:"ghost",size:"sm",onClick:_,className:"w-full justify-center hover:bg-accent hover:text-accent-foreground transition-all duration-200",children:"Today"})})]})})]})})});fy.displayName="DatePicker";var PI=At.forwardRef(function({className:t,value:r,onChange:o,placeholder:n="Pick a date range",formatString:a="LLL dd, y",separator:i=" - ",...s},l){let[u,c]=At.useState(!1),[d,f]=At.useState(r);At.useEffect(()=>{f(r)},[r]);let p=m=>{f(m),o?.(m),m?.from&&m?.to&&c(!1)},g=At.useMemo(()=>d?.from?d?.to?`${Wo(d.from,a)}${i}${Wo(d.to,a)}`:Wo(d.from,a):null,[d,a,i]);return(0,ye.jsxs)(wa,{open:u,onOpenChange:c,children:[(0,ye.jsx)(Ca,{asChild:!0,children:(0,ye.jsxs)(Ee,{ref:l,variant:s.variant==="ghost"?"ghost":"outline",className:P(II({variant:s.variant,size:s.size,state:s.state}),!g&&"text-muted-foreground",t),disabled:s.disabled||s.readOnly,children:[(0,ye.jsx)(ol,{className:"mr-2 h-4 w-4"}),(0,ye.jsx)("span",{className:"flex-1 truncate text-left",children:g||n})]})}),(0,ye.jsx)(Vn,{className:"w-auto p-0 shadow-2xl rounded-2xl border border-border bg-background/95 backdrop-blur-sm !z-[9999]",align:"start",sideOffset:12,children:(0,ye.jsx)(Uc,{mode:"range",defaultMonth:d?.from,selected:d,onSelect:p,showOutsideDays:!1,...s.calendarProps,className:"rounded-2xl"})})]})});PI.displayName="DateRangePicker";var LI=At.forwardRef(function({value:t,onChange:r,formatString:o="PPP",showTimePicker:n=!0,timeFormat:a="24",timeInterval:i=15,...s},l){let[u,c]=At.useState(t),[d,f]=At.useState(t?Wo(t,a==="24"?"HH:mm":"hh:mm a"):"00:00"),p=x=>{if(!x){c(void 0),r?.(void 0);return}let[h,v]=d.split(":").map(Number);x.setHours(h,v),c(x),r?.(x)},g=x=>{let h=x.target.value;if(f(h),u){let[v,y]=h.split(":").map(Number),w=new Date(u);w.setHours(v,y),c(w),r?.(w)}},m=At.useMemo(()=>{let x=[];for(let h=0;h<24;h++)for(let v=0;v<60;v+=i){let y=h.toString().padStart(2,"0"),w=v.toString().padStart(2,"0"),C=`${y}:${w}`;if(a==="12"){let b=h===0?12:h>12?h-12:h,S=h<12?"AM":"PM",I=`${b}:${w} ${S}`;x.push({value:C,label:I})}else x.push({value:C,label:C})}return x},[a,i]);return(0,ye.jsxs)("div",{ref:l,className:"flex flex-col gap-2",children:[(0,ye.jsx)(fy,{...s,value:u,onChange:p,formatString:o,showTodayButton:!1}),n&&u&&(0,ye.jsxs)(He.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:"flex items-center gap-2",children:[(0,ye.jsx)(Ef,{className:"h-4 w-4 text-muted-foreground"}),(0,ye.jsx)("select",{value:d,onChange:g,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(x=>(0,ye.jsx)("option",{value:x.value,children:x.label},x.value))})]})]})});LI.displayName="DateTimePicker";var TI=At.forwardRef(function({value:t,onChange:r,placeholder:o="Pick a month",formatString:n="MMMM yyyy",...a},i){let[s,l]=At.useState(!1),[u,c]=At.useState(t||new Date),d=["January","February","March","April","May","June","July","August","September","October","November","December"],f=m=>{let x=new Date(u);x.setMonth(m),r?.(x),l(!1)},p=m=>{let x=new Date(u);x.setFullYear(x.getFullYear()+m),c(x)},g=t?Wo(t,n):null;return(0,ye.jsxs)(wa,{open:s,onOpenChange:l,children:[(0,ye.jsx)(Ca,{asChild:!0,children:(0,ye.jsxs)(Ee,{ref:i,variant:a.variant==="default"?"outline":a.variant||"outline",className:P(II({variant:a.variant,size:a.size,state:a.state}),!g&&"text-muted-foreground",a.className),disabled:a.disabled||a.readOnly,children:[(0,ye.jsx)(ol,{className:"mr-2 h-4 w-4"}),g||o]})}),(0,ye.jsx)(Vn,{className:"w-64 p-0 shadow-2xl border border-border bg-background !z-[9999]",align:"start",children:(0,ye.jsxs)("div",{className:"p-3",children:[(0,ye.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,ye.jsx)(Ee,{variant:"outline",size:"icon","aria-label":`Previous year, ${u.getFullYear()-1}`,onClick:()=>p(-1),children:(0,ye.jsx)(bn,{className:"h-4 w-4"})}),(0,ye.jsx)("span",{className:"font-semibold",children:u.getFullYear()}),(0,ye.jsx)(Ee,{variant:"outline",size:"icon","aria-label":`Next year, ${u.getFullYear()+1}`,onClick:()=>p(1),children:(0,ye.jsx)(Fr,{className:"h-4 w-4"})})]}),(0,ye.jsx)("div",{className:"grid grid-cols-3 gap-2",children:d.map((m,x)=>(0,ye.jsx)(Ee,{variant:t&&t.getMonth()===x?"primary":"outline",size:"sm",onClick:()=>f(x),className:"h-8 text-xs",children:m.slice(0,3)},m))})]})})]})});TI.displayName="MonthPicker";var EB=R(M());var kI=R(N());function AB({items:e,onReorder:t,renderItem:r,keyExtractor:o,className:n,disabled:a=!1}){let[i,s]=EB.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 g=[...e],m=g[i];g.splice(i,1),g.splice(p,0,m),t(g),s(null)},d=()=>{s(null)};return(0,kI.jsx)("div",{className:P("moonui-theme","space-y-2",n),children:e.map((f,p)=>(0,kI.jsx)("div",{draggable:!a,onDragStart:g=>l(g,p),onDragOver:u,onDrop:g=>c(g,p),onDragEnd:d,className:P("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 fi=R(M());var Gt=R(M(),1);var le=R(M(),1);var we=R(N(),1),MI=["Enter"," "],VY=["ArrowDown","PageUp","Home"],NB=["ArrowUp","PageDown","End"],BY=[...VY,...NB],HY={ltr:[...MI,"ArrowRight"],rtl:[...MI,"ArrowLeft"]},UY={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Dm="Menu",[Em,zY,GY]=Jn(Dm),[Jl,EI]=Fe(Dm,[GY,Qo,Jc]),Nm=Qo(),OB=Jc(),[FB,Ls]=Jl(Dm),[WY,Om]=Jl(Dm),_B=e=>{let{__scopeMenu:t,open:r=!1,children:o,dir:n,onOpenChange:a,modal:i=!0}=e,s=Nm(t),[l,u]=le.useState(null),c=le.useRef(!1),d=nt(a),f=ia(n);return le.useEffect(()=>{let p=()=>{c.current=!0,document.addEventListener("pointerdown",g,{capture:!0,once:!0}),document.addEventListener("pointermove",g,{capture:!0,once:!0})},g=()=>c.current=!1;return document.addEventListener("keydown",p,{capture:!0}),()=>{document.removeEventListener("keydown",p,{capture:!0}),document.removeEventListener("pointerdown",g,{capture:!0}),document.removeEventListener("pointermove",g,{capture:!0})}},[]),(0,we.jsx)(ai,{...s,children:(0,we.jsx)(FB,{scope:t,open:r,onOpenChange:d,content:l,onContentChange:u,children:(0,we.jsx)(WY,{scope:t,onClose:le.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:c,dir:f,modal:i,children:o})})})};_B.displayName=Dm;var jY="MenuAnchor",AI=le.forwardRef((e,t)=>{let{__scopeMenu:r,...o}=e,n=Nm(r);return(0,we.jsx)(ii,{...n,...o,ref:t})});AI.displayName=jY;var DI="MenuPortal",[$Y,VB]=Jl(DI,{forceMount:void 0}),BB=e=>{let{__scopeMenu:t,forceMount:r,children:o,container:n}=e,a=Ls(DI,t);return(0,we.jsx)($Y,{scope:t,forceMount:r,children:(0,we.jsx)(lt,{present:r||a.open,children:(0,we.jsx)(Ro,{asChild:!0,container:n,children:o})})})};BB.displayName=DI;var Jo="MenuContent",[qY,NI]=Jl(Jo),HB=le.forwardRef((e,t)=>{let r=VB(Jo,e.__scopeMenu),{forceMount:o=r.forceMount,...n}=e,a=Ls(Jo,e.__scopeMenu),i=Om(Jo,e.__scopeMenu);return(0,we.jsx)(Em.Provider,{scope:e.__scopeMenu,children:(0,we.jsx)(lt,{present:o||a.open,children:(0,we.jsx)(Em.Slot,{scope:e.__scopeMenu,children:i.modal?(0,we.jsx)(KY,{...n,ref:t}):(0,we.jsx)(XY,{...n,ref:t})})})})}),KY=le.forwardRef((e,t)=>{let r=Ls(Jo,e.__scopeMenu),o=le.useRef(null),n=de(t,o);return le.useEffect(()=>{let a=o.current;if(a)return xs(a)},[]),(0,we.jsx)(OI,{...e,ref:n,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:W(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),XY=le.forwardRef((e,t)=>{let r=Ls(Jo,e.__scopeMenu);return(0,we.jsx)(OI,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),YY=co("MenuContent.ScrollLock"),OI=le.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:g,...m}=e,x=Ls(Jo,r),h=Om(Jo,r),v=Nm(r),y=OB(r),w=zY(r),[C,b]=le.useState(null),S=le.useRef(null),I=de(t,S,x.onContentChange),L=le.useRef(0),T=le.useRef(""),k=le.useRef(0),E=le.useRef(null),_=le.useRef("right"),D=le.useRef(0),z=g?si:le.Fragment,F=g?{as:YY,allowPinchZoom:!0}:void 0,O=A=>{let te=T.current+A,ae=w().filter(U=>!U.disabled),V=document.activeElement,Q=ae.find(U=>U.ref.current===V)?.textValue,re=ae.map(U=>U.textValue),Y=lQ(re,te,Q),ce=ae.find(U=>U.textValue===Y)?.ref.current;(function U(ne){T.current=ne,window.clearTimeout(L.current),ne!==""&&(L.current=window.setTimeout(()=>U(""),1e3))})(te),ce&&setTimeout(()=>ce.focus())};le.useEffect(()=>()=>window.clearTimeout(L.current),[]),ps();let B=le.useCallback(A=>_.current===E.current?.side&&cQ(A,E.current?.area),[]);return(0,we.jsx)(qY,{scope:r,searchRef:T,onItemEnter:le.useCallback(A=>{B(A)&&A.preventDefault()},[B]),onItemLeave:le.useCallback(A=>{B(A)||(S.current?.focus(),b(null))},[B]),onTriggerLeave:le.useCallback(A=>{B(A)&&A.preventDefault()},[B]),pointerGraceTimerRef:k,onPointerGraceIntentChange:le.useCallback(A=>{E.current=A},[]),children:(0,we.jsx)(z,{...F,children:(0,we.jsx)(oi,{asChild:!0,trapped:n,onMountAutoFocus:W(a,A=>{A.preventDefault(),S.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:(0,we.jsx)(qo,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:u,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:f,onDismiss:p,children:(0,we.jsx)(Xx,{asChild:!0,...y,dir:h.dir,orientation:"vertical",loop:o,currentTabStopId:C,onCurrentTabStopIdChange:b,onEntryFocus:W(l,A=>{h.isUsingKeyboardRef.current||A.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,we.jsx)(hs,{role:"menu","aria-orientation":"vertical","data-state":oH(x.open),"data-radix-menu-content":"",dir:h.dir,...v,...m,ref:I,style:{outline:"none",...m.style},onKeyDown:W(m.onKeyDown,A=>{let ae=A.target.closest("[data-radix-menu-content]")===A.currentTarget,V=A.ctrlKey||A.altKey||A.metaKey,Q=A.key.length===1;ae&&(A.key==="Tab"&&A.preventDefault(),!V&&Q&&O(A.key));let re=S.current;if(A.target!==re||!BY.includes(A.key))return;A.preventDefault();let ce=w().filter(U=>!U.disabled).map(U=>U.ref.current);NB.includes(A.key)&&ce.reverse(),iQ(ce)}),onBlur:W(e.onBlur,A=>{A.currentTarget.contains(A.target)||(window.clearTimeout(L.current),T.current="")}),onPointerMove:W(e.onPointerMove,Am(A=>{let te=A.target,ae=D.current!==A.clientX;if(A.currentTarget.contains(te)&&ae){let V=A.clientX>D.current?"right":"left";_.current=V,D.current=A.clientX}}))})})})})})})});HB.displayName=Jo;var QY="MenuGroup",FI=le.forwardRef((e,t)=>{let{__scopeMenu:r,...o}=e;return(0,we.jsx)(q.div,{role:"group",...o,ref:t})});FI.displayName=QY;var ZY="MenuLabel",UB=le.forwardRef((e,t)=>{let{__scopeMenu:r,...o}=e;return(0,we.jsx)(q.div,{...o,ref:t})});UB.displayName=ZY;var py="MenuItem",DB="menu.itemSelect",gy=le.forwardRef((e,t)=>{let{disabled:r=!1,onSelect:o,...n}=e,a=le.useRef(null),i=Om(py,e.__scopeMenu),s=NI(py,e.__scopeMenu),l=de(t,a),u=le.useRef(!1),c=()=>{let d=a.current;if(!r&&d){let f=new CustomEvent(DB,{bubbles:!0,cancelable:!0});d.addEventListener(DB,p=>o?.(p),{once:!0}),Wu(d,f),f.defaultPrevented?u.current=!1:i.onClose()}};return(0,we.jsx)(zB,{...n,ref:l,disabled:r,onClick:W(e.onClick,c),onPointerDown:d=>{e.onPointerDown?.(d),u.current=!0},onPointerUp:W(e.onPointerUp,d=>{u.current||d.currentTarget?.click()}),onKeyDown:W(e.onKeyDown,d=>{let f=s.searchRef.current!=="";r||f&&d.key===" "||MI.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})})});gy.displayName=py;var zB=le.forwardRef((e,t)=>{let{__scopeMenu:r,disabled:o=!1,textValue:n,...a}=e,i=NI(py,r),s=OB(r),l=le.useRef(null),u=de(t,l),[c,d]=le.useState(!1),[f,p]=le.useState("");return le.useEffect(()=>{let g=l.current;g&&p((g.textContent??"").trim())},[a.children]),(0,we.jsx)(Em.ItemSlot,{scope:r,disabled:o,textValue:n??f,children:(0,we.jsx)(Yx,{asChild:!0,...s,focusable:!o,children:(0,we.jsx)(q.div,{role:"menuitem","data-highlighted":c?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...a,ref:u,onPointerMove:W(e.onPointerMove,Am(g=>{o?i.onItemLeave(g):(i.onItemEnter(g),g.defaultPrevented||g.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:W(e.onPointerLeave,Am(g=>i.onItemLeave(g))),onFocus:W(e.onFocus,()=>d(!0)),onBlur:W(e.onBlur,()=>d(!1))})})})}),JY="MenuCheckboxItem",GB=le.forwardRef((e,t)=>{let{checked:r=!1,onCheckedChange:o,...n}=e;return(0,we.jsx)(KB,{scope:e.__scopeMenu,checked:r,children:(0,we.jsx)(gy,{role:"menuitemcheckbox","aria-checked":my(r)?"mixed":r,...n,ref:t,"data-state":BI(r),onSelect:W(n.onSelect,()=>o?.(my(r)?!0:!r),{checkForDefaultPrevented:!1})})})});GB.displayName=JY;var WB="MenuRadioGroup",[eQ,tQ]=Jl(WB,{value:void 0,onValueChange:()=>{}}),jB=le.forwardRef((e,t)=>{let{value:r,onValueChange:o,...n}=e,a=nt(o);return(0,we.jsx)(eQ,{scope:e.__scopeMenu,value:r,onValueChange:a,children:(0,we.jsx)(FI,{...n,ref:t})})});jB.displayName=WB;var $B="MenuRadioItem",qB=le.forwardRef((e,t)=>{let{value:r,...o}=e,n=tQ($B,e.__scopeMenu),a=r===n.value;return(0,we.jsx)(KB,{scope:e.__scopeMenu,checked:a,children:(0,we.jsx)(gy,{role:"menuitemradio","aria-checked":a,...o,ref:t,"data-state":BI(a),onSelect:W(o.onSelect,()=>n.onValueChange?.(r),{checkForDefaultPrevented:!1})})})});qB.displayName=$B;var _I="MenuItemIndicator",[KB,rQ]=Jl(_I,{checked:!1}),XB=le.forwardRef((e,t)=>{let{__scopeMenu:r,forceMount:o,...n}=e,a=rQ(_I,r);return(0,we.jsx)(lt,{present:o||my(a.checked)||a.checked===!0,children:(0,we.jsx)(q.span,{...n,ref:t,"data-state":BI(a.checked)})})});XB.displayName=_I;var oQ="MenuSeparator",YB=le.forwardRef((e,t)=>{let{__scopeMenu:r,...o}=e;return(0,we.jsx)(q.div,{role:"separator","aria-orientation":"horizontal",...o,ref:t})});YB.displayName=oQ;var nQ="MenuArrow",QB=le.forwardRef((e,t)=>{let{__scopeMenu:r,...o}=e,n=Nm(r);return(0,we.jsx)(vs,{...n,...o,ref:t})});QB.displayName=nQ;var VI="MenuSub",[aQ,ZB]=Jl(VI),JB=e=>{let{__scopeMenu:t,children:r,open:o=!1,onOpenChange:n}=e,a=Ls(VI,t),i=Nm(t),[s,l]=le.useState(null),[u,c]=le.useState(null),d=nt(n);return le.useEffect(()=>(a.open===!1&&d(!1),()=>d(!1)),[a.open,d]),(0,we.jsx)(ai,{...i,children:(0,we.jsx)(FB,{scope:t,open:o,onOpenChange:d,content:u,onContentChange:c,children:(0,we.jsx)(aQ,{scope:t,contentId:Ne(),triggerId:Ne(),trigger:s,onTriggerChange:l,children:r})})})};JB.displayName=VI;var Mm="MenuSubTrigger",eH=le.forwardRef((e,t)=>{let r=Ls(Mm,e.__scopeMenu),o=Om(Mm,e.__scopeMenu),n=ZB(Mm,e.__scopeMenu),a=NI(Mm,e.__scopeMenu),i=le.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:l}=a,u={__scopeMenu:e.__scopeMenu},c=le.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return le.useEffect(()=>c,[c]),le.useEffect(()=>{let d=s.current;return()=>{window.clearTimeout(d),l(null)}},[s,l]),(0,we.jsx)(AI,{asChild:!0,...u,children:(0,we.jsx)(zB,{id:n.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":n.contentId,"data-state":oH(r.open),...e,ref:uo(t,n.onTriggerChange),onClick:d=>{e.onClick?.(d),!(e.disabled||d.defaultPrevented)&&(d.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:W(e.onPointerMove,Am(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:W(e.onPointerLeave,Am(d=>{c();let f=r.content?.getBoundingClientRect();if(f){let p=r.content?.dataset.side,g=p==="right",m=g?-5:5,x=f[g?"left":"right"],h=f[g?"right":"left"];a.onPointerGraceIntentChange({area:[{x:d.clientX+m,y:d.clientY},{x,y:f.top},{x:h,y:f.top},{x:h,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:W(e.onKeyDown,d=>{let f=a.searchRef.current!=="";e.disabled||f&&d.key===" "||HY[o.dir].includes(d.key)&&(r.onOpenChange(!0),r.content?.focus(),d.preventDefault())})})})});eH.displayName=Mm;var tH="MenuSubContent",rH=le.forwardRef((e,t)=>{let r=VB(Jo,e.__scopeMenu),{forceMount:o=r.forceMount,...n}=e,a=Ls(Jo,e.__scopeMenu),i=Om(Jo,e.__scopeMenu),s=ZB(tH,e.__scopeMenu),l=le.useRef(null),u=de(t,l);return(0,we.jsx)(Em.Provider,{scope:e.__scopeMenu,children:(0,we.jsx)(lt,{present:o||a.open,children:(0,we.jsx)(Em.Slot,{scope:e.__scopeMenu,children:(0,we.jsx)(OI,{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:W(e.onFocusOutside,c=>{c.target!==s.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:W(e.onEscapeKeyDown,c=>{i.onClose(),c.preventDefault()}),onKeyDown:W(e.onKeyDown,c=>{let d=c.currentTarget.contains(c.target),f=UY[i.dir].includes(c.key);d&&f&&(a.onOpenChange(!1),s.trigger?.focus(),c.preventDefault())})})})})})});rH.displayName=tH;function oH(e){return e?"open":"closed"}function my(e){return e==="indeterminate"}function BI(e){return my(e)?"indeterminate":e?"checked":"unchecked"}function iQ(e){let t=document.activeElement;for(let r of e)if(r===t||(r.focus(),document.activeElement!==t))return}function sQ(e,t){return e.map((r,o)=>e[(t+o)%e.length])}function lQ(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=sQ(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 uQ(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 cQ(e,t){if(!t)return!1;let r={x:e.clientX,y:e.clientY};return uQ(r,t)}function Am(e){return t=>t.pointerType==="mouse"?e(t):void 0}var nH=_B,aH=AI,iH=BB,sH=HB,lH=FI,uH=UB,cH=gy,dH=GB,fH=jB,pH=qB,mH=XB,gH=YB,hH=QB,vH=JB,xH=eH,yH=rH;var zt=R(N(),1),hy="DropdownMenu",[fQ,cke]=Fe(hy,[EI]),Tr=EI(),[pQ,wH]=fQ(hy),CH=e=>{let{__scopeDropdownMenu:t,children:r,dir:o,open:n,defaultOpen:a,onOpenChange:i,modal:s=!0}=e,l=Tr(t),u=Gt.useRef(null),[c,d]=qe({prop:n,defaultProp:a??!1,onChange:i,caller:hy});return(0,zt.jsx)(pQ,{scope:t,triggerId:Ne(),triggerRef:u,contentId:Ne(),open:c,onOpenChange:d,onOpenToggle:Gt.useCallback(()=>d(f=>!f),[d]),modal:s,children:(0,zt.jsx)(nH,{...l,open:c,onOpenChange:d,dir:o,modal:s,children:r})})};CH.displayName=hy;var SH="DropdownMenuTrigger",bH=Gt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,disabled:o=!1,...n}=e,a=wH(SH,r),i=Tr(r);return(0,zt.jsx)(aH,{asChild:!0,...i,children:(0,zt.jsx)(q.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:uo(t,a.triggerRef),onPointerDown:W(e.onPointerDown,s=>{!o&&s.button===0&&s.ctrlKey===!1&&(a.onOpenToggle(),a.open||s.preventDefault())}),onKeyDown:W(e.onKeyDown,s=>{o||(["Enter"," "].includes(s.key)&&a.onOpenToggle(),s.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(s.key)&&s.preventDefault())})})})});bH.displayName=SH;var mQ="DropdownMenuPortal",RH=e=>{let{__scopeDropdownMenu:t,...r}=e,o=Tr(t);return(0,zt.jsx)(iH,{...o,...r})};RH.displayName=mQ;var IH="DropdownMenuContent",PH=Gt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=wH(IH,r),a=Tr(r),i=Gt.useRef(!1);return(0,zt.jsx)(sH,{id:n.contentId,"aria-labelledby":n.triggerId,...a,...o,ref:t,onCloseAutoFocus:W(e.onCloseAutoFocus,s=>{i.current||n.triggerRef.current?.focus(),i.current=!1,s.preventDefault()}),onInteractOutside:W(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)"}})});PH.displayName=IH;var gQ="DropdownMenuGroup",LH=Gt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=Tr(r);return(0,zt.jsx)(lH,{...n,...o,ref:t})});LH.displayName=gQ;var hQ="DropdownMenuLabel",TH=Gt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=Tr(r);return(0,zt.jsx)(uH,{...n,...o,ref:t})});TH.displayName=hQ;var vQ="DropdownMenuItem",kH=Gt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=Tr(r);return(0,zt.jsx)(cH,{...n,...o,ref:t})});kH.displayName=vQ;var xQ="DropdownMenuCheckboxItem",MH=Gt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=Tr(r);return(0,zt.jsx)(dH,{...n,...o,ref:t})});MH.displayName=xQ;var yQ="DropdownMenuRadioGroup",EH=Gt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=Tr(r);return(0,zt.jsx)(fH,{...n,...o,ref:t})});EH.displayName=yQ;var wQ="DropdownMenuRadioItem",AH=Gt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=Tr(r);return(0,zt.jsx)(pH,{...n,...o,ref:t})});AH.displayName=wQ;var CQ="DropdownMenuItemIndicator",DH=Gt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=Tr(r);return(0,zt.jsx)(mH,{...n,...o,ref:t})});DH.displayName=CQ;var SQ="DropdownMenuSeparator",NH=Gt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=Tr(r);return(0,zt.jsx)(gH,{...n,...o,ref:t})});NH.displayName=SQ;var bQ="DropdownMenuArrow",RQ=Gt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=Tr(r);return(0,zt.jsx)(hH,{...n,...o,ref:t})});RQ.displayName=bQ;var IQ=e=>{let{__scopeDropdownMenu:t,children:r,open:o,onOpenChange:n,defaultOpen:a}=e,i=Tr(t),[s,l]=qe({prop:o,defaultProp:a??!1,onChange:n,caller:"DropdownMenuSub"});return(0,zt.jsx)(vH,{...i,open:s,onOpenChange:l,children:r})},PQ="DropdownMenuSubTrigger",OH=Gt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=Tr(r);return(0,zt.jsx)(xH,{...n,...o,ref:t})});OH.displayName=PQ;var LQ="DropdownMenuSubContent",FH=Gt.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...o}=e,n=Tr(r);return(0,zt.jsx)(yH,{...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)"}})});FH.displayName=LQ;var _H=CH,VH=bH,HI=RH,UI=PH,BH=LH,zI=TH,GI=kH,WI=MH,HH=EH,jI=AH,$I=DH,qI=NH;var UH=IQ,KI=OH,XI=FH;var Wt=R(N()),zH=_H,GH=VH,WH=BH,jH=HI,$H=UH,qH=HH,YI=fi.forwardRef(({className:e,inset:t,children:r,...o},n)=>(0,Wt.jsxs)(KI,{ref:n,className:P("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,Wt.jsx)(Fr,{className:"ml-auto h-4 w-4"})]}));YI.displayName=KI.displayName;var QI=fi.forwardRef(({className:e,...t},r)=>(0,Wt.jsx)(XI,{ref:r,className:P("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}));QI.displayName=XI.displayName;var ZI=fi.forwardRef(({className:e,sideOffset:t=4,...r},o)=>(0,Wt.jsx)(HI,{children:(0,Wt.jsx)(UI,{ref:o,sideOffset:t,className:P("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})}));ZI.displayName=UI.displayName;var JI=fi.forwardRef(({className:e,inset:t,...r},o)=>(0,Wt.jsx)(GI,{ref:o,className:P("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}));JI.displayName=GI.displayName;var eP=fi.forwardRef(({className:e,children:t,checked:r,...o},n)=>(0,Wt.jsxs)(WI,{ref:n,className:P("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,Wt.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,Wt.jsx)($I,{children:(0,Wt.jsx)(xr,{className:"h-4 w-4"})})}),t]}));eP.displayName=WI.displayName;var tP=fi.forwardRef(({className:e,children:t,...r},o)=>(0,Wt.jsxs)(jI,{ref:o,className:P("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,Wt.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,Wt.jsx)($I,{children:(0,Wt.jsx)(nl,{className:"h-2 w-2 fill-current"})})}),t]}));tP.displayName=jI.displayName;var rP=fi.forwardRef(({className:e,inset:t,...r},o)=>(0,Wt.jsx)(zI,{ref:o,className:P("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...r}));rP.displayName=zI.displayName;var oP=fi.forwardRef(({className:e,...t},r)=>(0,Wt.jsx)(qI,{ref:r,className:P("moonui-theme","-mx-1 my-1 h-px bg-muted",e),...t}));oP.displayName=qI.displayName;var nP=({className:e,...t})=>(0,Wt.jsx)("span",{className:P("moonui-theme","ml-auto text-xs tracking-widest opacity-60",e),...t});nP.displayName="DropdownMenuShortcut";var Po=R(M());var KH=R(M());var pi=R(N()),XH=K("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"}}),kQ=K("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"}}),Fm=KH.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 g=Math.max(0,Math.min(t,d)),m=d>0?g/d*100:0,x=l||`${Math.round(m)}%`;return(0,pi.jsxs)(pi.Fragment,{children:[s&&(0,pi.jsx)("div",{className:"flex justify-between items-center mb-1",children:(0,pi.jsx)("span",{className:P("text-sm font-medium text-muted-foreground",u),children:x})}),(0,pi.jsx)("div",{ref:p,className:P("moonui-theme",XH({variant:r,size:o,radius:n,animation:a}),e),role:"progressbar","aria-valuemin":0,"aria-valuemax":d,"aria-valuenow":c?void 0:g,...f,children:(0,pi.jsx)("div",{className:P(kQ({variant:i||"primary",animation:a}),c&&"animate-indeterminate-progress"),style:c?{}:{transform:`translateX(-${100-m}%)`}})})]})});Fm.displayName="Progress";var ve=R(N()),MQ=e=>e.startsWith("image/")?(0,ve.jsx)(il,{className:"h-4 w-4"}):e.startsWith("video/")?(0,ve.jsx)(ep,{className:"h-4 w-4"}):e.startsWith("audio/")?(0,ve.jsx)(jf,{className:"h-4 w-4"}):e.includes("text")||e.includes("document")?(0,ve.jsx)(_f,{className:"h-4 w-4"}):(0,ve.jsx)(Vf,{className:"h-4 w-4"}),aP=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]},EQ=({uploadedFile:e,onRemove:t})=>{let{id:r,file:o,progress:n,status:a,preview:i}=e;return(0,ve.jsxs)(He.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,ve.jsx)("div",{className:"flex-shrink-0",children:i?(0,ve.jsx)("img",{src:i,alt:o.name,className:"h-10 w-10 object-cover rounded"}):(0,ve.jsx)("div",{className:"h-10 w-10 rounded bg-muted flex items-center justify-center",children:MQ(o.type)})}),(0,ve.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,ve.jsxs)("div",{className:"flex items-center justify-between",children:[(0,ve.jsx)("p",{className:"text-sm font-medium truncate",children:o.name}),(0,ve.jsx)(Ee,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0",onClick:()=>t(r),"aria-label":`Remove ${o.name}`,children:(0,ve.jsx)(xo,{className:"h-3 w-3"})})]}),(0,ve.jsxs)("div",{className:"flex items-center space-x-2 mt-1",children:[(0,ve.jsx)("p",{className:"text-xs text-muted-foreground",children:aP(o.size)}),a==="uploading"&&(0,ve.jsxs)(_r,{variant:"secondary",className:"h-5",children:[(0,ve.jsx)(Bt,{className:"h-3 w-3 mr-1 animate-spin"}),"Uploading"]}),a==="success"&&(0,ve.jsxs)(_r,{variant:"success",className:"h-5",children:[(0,ve.jsx)(Wi,{className:"h-3 w-3 mr-1"}),"Done"]}),a==="error"&&(0,ve.jsxs)(_r,{variant:"destructive",className:"h-5",children:[(0,ve.jsx)(Rn,{className:"h-3 w-3 mr-1"}),"Error"]})]}),a==="uploading"&&(0,ve.jsx)("div",{className:"mt-2",children:(0,ve.jsx)(Fm,{value:n,className:"h-1"})})]})]})},iP=Po.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,Po.useState)([]),[p,g]=(0,Po.useState)(!1),[m,x]=(0,Po.useState)(null),h=I=>I.size>r?`File size exceeds ${aP(r)}`:e!=="*"&&!e.split(",").some(L=>{let T=L.trim();return T.includes("*")?I.type.startsWith(T.replace("*","")):I.type===T})?"File type not supported":null,v=(0,Po.useCallback)(async I=>{let L=Array.from(I);if(x(null),d.length+L.length>o){x(`Maximum ${o} files allowed`);return}let T=[],k=[];if(L.forEach(_=>{let D=h(_);D?k.push(`${_.name}: ${D}`):T.push(_)}),k.length>0){x(k.join(", "));return}let E=T.map((_,D)=>({id:`${Date.now()}-${D}-${_.name.replace(/[^a-zA-Z0-9]/g,"")}`,file:_,progress:0,status:"uploading",preview:_.type.startsWith("image/")?URL.createObjectURL(_):void 0}));f(_=>[..._,...E]);for(let _ of E){let D=0,z=setInterval(()=>{D+=15+_.file.size%10,D>=100?(D=100,clearInterval(z),f(F=>F.map(O=>O.id===_.id?{...O,progress:100,status:"success"}:O))):f(F=>F.map(O=>O.id===_.id?{...O,progress:D}:O))},200)}if(i)try{await i(E)}catch(_){console.error("Upload failed:",_),f(D=>D.map(z=>E.some(F=>F.id===z.id)?{...z,status:"error"}:z))}},[d.length,o,r,e,i]),y=(0,Po.useCallback)(I=>{if(I.preventDefault(),g(!1),n)return;let L=I.dataTransfer.files;L.length>0&&v(L)},[v,n]),w=(0,Po.useCallback)(I=>{I.preventDefault(),n||g(!0)},[n]),C=(0,Po.useCallback)(I=>{I.preventDefault(),g(!1)},[]),b=(0,Po.useCallback)(I=>{let L=I.target.files;L&&L.length>0&&v(L),I.target.value=""},[v]),S=(0,Po.useCallback)(I=>{f(L=>{let T=L.find(k=>k.id===I);return T?.preview&&URL.revokeObjectURL(T.preview),L.filter(k=>k.id!==I)}),s&&s(I)},[s]);return(0,ve.jsxs)("div",{ref:c,className:P("moonui-theme","space-y-4",a),...u,children:[(0,ve.jsxs)(He.div,{className:P("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,ve.jsx)("input",{type:"file",accept:e,multiple:t,disabled:n,onChange:b,"aria-label":t?"Choose files to upload":"Choose a file to upload",className:"absolute inset-0 w-full h-full opacity-0 cursor-pointer"}),l||(0,ve.jsxs)("div",{className:"space-y-4",children:[(0,ve.jsx)("div",{className:"mx-auto h-12 w-12 text-muted-foreground",children:(0,ve.jsx)(Jf,{className:"h-full w-full"})}),(0,ve.jsxs)("div",{children:[(0,ve.jsx)("p",{className:"text-lg font-medium",children:p?"Drop files here":"Upload files"}),(0,ve.jsx)("p",{className:"text-sm text-muted-foreground",children:"Drag & drop files here, or click to select"}),(0,ve.jsxs)("p",{className:"text-xs text-muted-foreground mt-2",children:["Max ",o," files, ",aP(r)," each"]})]}),(0,ve.jsx)(Ee,{variant:"outline",disabled:n,children:"Select Files"})]})]}),(0,ve.jsx)(Ka,{children:m&&(0,ve.jsxs)(He.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,ve.jsx)(Rn,{className:"h-4 w-4"}),(0,ve.jsx)("span",{children:m})]})}),(0,ve.jsx)(Ka,{children:d.length>0&&(0,ve.jsxs)(He.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:"space-y-2",children:[(0,ve.jsxs)("h4",{className:"text-sm font-medium",children:["Uploaded Files (",d.length,")"]}),(0,ve.jsx)("div",{className:"space-y-2",children:(0,ve.jsx)(Ka,{children:d.map(I=>(0,ve.jsx)(EQ,{uploadedFile:I,onRemove:S},I.id))})})]})})]})});iP.displayName="FileUpload";var YH=R(M());var eu=R(N()),sP=YH.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=Fc(0),d=Fc(0),f=o==="up"||o==="down",p=f?c:d,g=vb(p,[0,n],[1,.5]),m=(v,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):yb(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%"}}},h=()=>f?{y:0}:{x:0};return t?(0,eu.jsxs)("div",{className:"fixed inset-0 z-50",children:[(0,eu.jsx)(He.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:()=>r(!1),className:P("absolute inset-0 bg-black/50",i)}),(0,eu.jsxs)(He.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:g},initial:x(),animate:h(),exit:x(),transition:{type:"spring",damping:30,stiffness:300},className:P("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,eu.jsx)("div",{className:"flex justify-center p-2",children:(0,eu.jsx)("div",{className:"w-12 h-1 bg-muted rounded-full"})}),e]})]}):null});sP.displayName="GestureDrawer";var Ts=R(M());var Je=R(N());function QH({className:e,size:t="md",showForks:r=!0,showWatchers:o=!1,repoUrl:n="https://github.com/moonui/moonui"}){let[a,i]=(0,Ts.useState)(null),[s,l]=(0,Ts.useState)(!0);(0,Ts.useEffect)(()=>{(async()=>{try{let g=await(await fetch("/api/github-stars")).json();i(g)}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,Je.jsxs)("div",{className:P("flex items-center animate-pulse",c[t],e),children:[(0,Je.jsxs)("div",{className:"flex items-center gap-1",children:[(0,Je.jsx)("div",{className:"w-4 h-4 bg-gray-300 dark:bg-gray-700 rounded"}),(0,Je.jsx)("div",{className:"w-8 h-4 bg-gray-300 dark:bg-gray-700 rounded"})]}),r&&(0,Je.jsxs)("div",{className:"flex items-center gap-1",children:[(0,Je.jsx)("div",{className:"w-4 h-4 bg-gray-300 dark:bg-gray-700 rounded"}),(0,Je.jsx)("div",{className:"w-6 h-4 bg-gray-300 dark:bg-gray-700 rounded"})]})]}):a?(0,Je.jsxs)("div",{className:P("flex items-center",c[t],e),children:[(0,Je.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,Je.jsx)(ji,{className:"fill-current text-yellow-500",size:d[t]}),(0,Je.jsx)("span",{className:"font-medium",children:u(a.stars)})]}),r&&(0,Je.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,Je.jsx)(Bf,{size:d[t]}),(0,Je.jsx)("span",{className:"font-medium",children:u(a.forks)})]}),o&&(0,Je.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,Je.jsx)(al,{size:d[t]}),(0,Je.jsx)("span",{className:"font-medium",children:u(a.watchers)})]}),!a.isLive&&(0,Je.jsx)("span",{className:"text-xs text-gray-500 dark:text-gray-500 ml-2",children:"(demo)"})]}):null}function AQ({className:e,size:t="md",repoUrl:r="https://github.com/moonui/moonui"}){let[o,n]=(0,Ts.useState)(null),[a,i]=(0,Ts.useState)(!0);(0,Ts.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,Je.jsx)(Ee,{variant:"outline",size:t,className:P("moonui-theme","group",e),asChild:!0,children:(0,Je.jsxs)("a",{href:r,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2",children:[(0,Je.jsx)(ji,{className:"fill-current text-yellow-500 group-hover:scale-110 transition-transform",size:16}),(0,Je.jsx)("span",{children:"Star on GitHub"}),!a&&o&&(0,Je.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,Je.jsx)(Ff,{size:14,className:"opacity-50 group-hover:opacity-100 transition-opacity"})]})})}var tu=R(M());var Se=R(M(),1),xy=R(M(),1),Un=R(M(),1),DQ=Object.defineProperty,NQ=Object.defineProperties,OQ=Object.getOwnPropertyDescriptors,vy=Object.getOwnPropertySymbols,JH=Object.prototype.hasOwnProperty,eU=Object.prototype.propertyIsEnumerable,ZH=(e,t,r)=>t in e?DQ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,FQ=(e,t)=>{for(var r in t||(t={}))JH.call(t,r)&&ZH(e,r,t[r]);if(vy)for(var r of vy(t))eU.call(t,r)&&ZH(e,r,t[r]);return e},_Q=(e,t)=>NQ(e,OQ(t)),VQ=(e,t)=>{var r={};for(var o in e)JH.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&vy)for(var o of vy(e))t.indexOf(o)<0&&eU.call(e,o)&&(r[o]=e[o]);return r};function BQ(e){let t=setTimeout(e,0),r=setTimeout(e,10),o=setTimeout(e,50);return[t,r,o]}function HQ(e){let t=xy.useRef();return xy.useEffect(()=>{t.current=e}),t.current}var UQ=18,tU=40,zQ=`${tU}px`,GQ=["[data-lastpass-icon-root]","com-1password-button","[data-dashlanecreated]",'[style$="2147483647 !important;"]'].join(",");function WQ({containerRef:e,inputRef:t,pushPasswordManagerStrategy:r,isFocused:o}){let[n,a]=Un.useState(!1),[i,s]=Un.useState(!1),[l,u]=Un.useState(!1),c=Un.useMemo(()=>r==="none"?!1:(r==="increase-width"||r==="experimental-no-flickering")&&n&&i,[n,i,r]),d=Un.useCallback(()=>{let f=e.current,p=t.current;if(!f||!p||l||r==="none")return;let g=f,m=g.getBoundingClientRect().left+g.offsetWidth,x=g.getBoundingClientRect().top+g.offsetHeight/2,h=m-UQ,v=x;document.querySelectorAll(GQ).length===0&&document.elementFromPoint(h,v)===f||(a(!0),u(!0))},[e,t,l,r]);return Un.useEffect(()=>{let f=e.current;if(!f||r==="none")return;function p(){let m=window.innerWidth-f.getBoundingClientRect().right;s(m>=tU)}p();let g=setInterval(p,1e3);return()=>{clearInterval(g)}},[e,r]),Un.useEffect(()=>{let f=o||document.activeElement===t.current;if(r==="none"||!f)return;let p=setTimeout(d,0),g=setTimeout(d,2e3),m=setTimeout(d,5e3),x=setTimeout(()=>{u(!0)},6e3);return()=>{clearTimeout(p),clearTimeout(g),clearTimeout(m),clearTimeout(x)}},[t,o,r,d]),{hasPWMBadge:n,willPushPWMBadge:c,PWM_BADGE_SPACE_WIDTH:zQ}}var lP=Se.createContext({}),uP=Se.forwardRef((e,t)=>{var r=e,{value:o,onChange:n,maxLength:a,textAlign:i="left",pattern:s,placeholder:l,inputMode:u="numeric",onComplete:c,pushPasswordManagerStrategy:d="increase-width",pasteTransformer:f,containerClassName:p,noScriptCSSFallback:g=jQ,render:m,children:x}=r,h=VQ(r,["value","onChange","maxLength","textAlign","pattern","placeholder","inputMode","onComplete","pushPasswordManagerStrategy","pasteTransformer","containerClassName","noScriptCSSFallback","render","children"]),v,y,w,C,b;let[S,I]=Se.useState(typeof h.defaultValue=="string"?h.defaultValue:""),L=o??S,T=HQ(L),k=Se.useCallback(J=>{n?.(J),I(J)},[n]),E=Se.useMemo(()=>s?typeof s=="string"?new RegExp(s):s:null,[s]),_=Se.useRef(null),D=Se.useRef(null),z=Se.useRef({value:L,onChange:k,isIOS:typeof window<"u"&&((y=(v=window?.CSS)==null?void 0:v.supports)==null?void 0:y.call(v,"-webkit-touch-callout","none"))}),F=Se.useRef({prev:[(w=_.current)==null?void 0:w.selectionStart,(C=_.current)==null?void 0:C.selectionEnd,(b=_.current)==null?void 0:b.selectionDirection]});Se.useImperativeHandle(t,()=>_.current,[]),Se.useEffect(()=>{let J=_.current,ie=D.current;if(!J||!ie)return;z.current.value!==J.value&&z.current.onChange(J.value),F.current.prev=[J.selectionStart,J.selectionEnd,J.selectionDirection];function Ge(){if(document.activeElement!==J){V(null),re(null);return}let Oe=J.selectionStart,St=J.selectionEnd,Xn=J.selectionDirection,Er=J.maxLength,fn=J.value,Mo=F.current.prev,pn=-1,Yn=-1,Qn;if(fn.length!==0&&Oe!==null&&St!==null){let Id=Oe===St,Pd=Oe===fn.length&&fn.length<Er;if(Id&&!Pd){let Eo=Oe;if(Eo===0)pn=0,Yn=1,Qn="forward";else if(Eo===Er)pn=Eo-1,Yn=Eo,Qn="backward";else if(Er>1&&fn.length>1){let Ld=0;if(Mo[0]!==null&&Mo[1]!==null){Qn=Eo<Mo[1]?"backward":"forward";let l0=Mo[0]===Mo[1]&&Mo[0]<Er;Qn==="backward"&&!l0&&(Ld=-1)}pn=Ld+Eo,Yn=Ld+Eo+1}}pn!==-1&&Yn!==-1&&pn!==Yn&&_.current.setSelectionRange(pn,Yn,Qn)}let ng=pn!==-1?pn:Oe,fu=Yn!==-1?Yn:St,Ci=Qn??Xn;V(ng),re(fu),F.current.prev=[ng,fu,Ci]}if(document.addEventListener("selectionchange",Ge,{capture:!0}),Ge(),document.activeElement===J&&te(!0),!document.getElementById("input-otp-style")){let Oe=document.createElement("style");if(Oe.id="input-otp-style",document.head.appendChild(Oe),Oe.sheet){let St="background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;";_m(Oe.sheet,"[data-input-otp]::selection { background: transparent !important; color: transparent !important; }"),_m(Oe.sheet,`[data-input-otp]:autofill { ${St} }`),_m(Oe.sheet,`[data-input-otp]:-webkit-autofill { ${St} }`),_m(Oe.sheet,"@supports (-webkit-touch-callout: none) { [data-input-otp] { letter-spacing: -.6em !important; font-weight: 100 !important; font-stretch: ultra-condensed; font-optical-sizing: none !important; left: -1px !important; right: 1px !important; } }"),_m(Oe.sheet,"[data-input-otp] + * { pointer-events: all !important; }")}}let Xe=()=>{ie&&ie.style.setProperty("--root-height",`${J.clientHeight}px`)};Xe();let Tt=new ResizeObserver(Xe);return Tt.observe(J),()=>{document.removeEventListener("selectionchange",Ge,{capture:!0}),Tt.disconnect()}},[]);let[O,B]=Se.useState(!1),[A,te]=Se.useState(!1),[ae,V]=Se.useState(null),[Q,re]=Se.useState(null);Se.useEffect(()=>{BQ(()=>{var J,ie,Ge,Xe;(J=_.current)==null||J.dispatchEvent(new Event("input"));let Tt=(ie=_.current)==null?void 0:ie.selectionStart,Oe=(Ge=_.current)==null?void 0:Ge.selectionEnd,St=(Xe=_.current)==null?void 0:Xe.selectionDirection;Tt!==null&&Oe!==null&&(V(Tt),re(Oe),F.current.prev=[Tt,Oe,St])})},[L,A]),Se.useEffect(()=>{T!==void 0&&L!==T&&T.length<a&&L.length===a&&c?.(L)},[a,c,T,L]);let Y=WQ({containerRef:D,inputRef:_,pushPasswordManagerStrategy:d,isFocused:A}),ce=Se.useCallback(J=>{let ie=J.currentTarget.value.slice(0,a);if(ie.length>0&&E&&!E.test(ie)){J.preventDefault();return}typeof T=="string"&&ie.length<T.length&&document.dispatchEvent(new Event("selectionchange")),k(ie)},[a,k,T,E]),U=Se.useCallback(()=>{var J;if(_.current){let ie=Math.min(_.current.value.length,a-1),Ge=_.current.value.length;(J=_.current)==null||J.setSelectionRange(ie,Ge),V(ie),re(Ge)}te(!0)},[a]),ne=Se.useCallback(J=>{var ie,Ge;let Xe=_.current;if(!f&&(!z.current.isIOS||!J.clipboardData||!Xe))return;let Tt=J.clipboardData.getData("text/plain"),Oe=f?f(Tt):Tt;J.preventDefault();let St=(ie=_.current)==null?void 0:ie.selectionStart,Xn=(Ge=_.current)==null?void 0:Ge.selectionEnd,Er=(St!==Xn?L.slice(0,St)+Oe+L.slice(Xn):L.slice(0,St)+Oe+L.slice(St)).slice(0,a);if(Er.length>0&&E&&!E.test(Er))return;Xe.value=Er,k(Er);let fn=Math.min(Er.length,a-1),Mo=Er.length;Xe.setSelectionRange(fn,Mo),V(fn),re(Mo)},[a,k,E,L]),he=Se.useMemo(()=>({position:"relative",cursor:h.disabled?"default":"text",userSelect:"none",WebkitUserSelect:"none",pointerEvents:"none"}),[h.disabled]),xe=Se.useMemo(()=>({position:"absolute",inset:0,width:Y.willPushPWMBadge?`calc(100% + ${Y.PWM_BADGE_SPACE_WIDTH})`:"100%",clipPath:Y.willPushPWMBadge?`inset(0 ${Y.PWM_BADGE_SPACE_WIDTH} 0 0)`:void 0,height:"100%",display:"flex",textAlign:i,opacity:"1",color:"transparent",pointerEvents:"all",background:"transparent",caretColor:"transparent",border:"0 solid transparent",outline:"0 solid transparent",boxShadow:"none",lineHeight:"1",letterSpacing:"-.5em",fontSize:"var(--root-height)",fontFamily:"monospace",fontVariantNumeric:"tabular-nums"}),[Y.PWM_BADGE_SPACE_WIDTH,Y.willPushPWMBadge,i]),pe=Se.useMemo(()=>Se.createElement("input",_Q(FQ({autoComplete:h.autoComplete||"one-time-code"},h),{"data-input-otp":!0,"data-input-otp-placeholder-shown":L.length===0||void 0,"data-input-otp-mss":ae,"data-input-otp-mse":Q,inputMode:u,pattern:E?.source,"aria-placeholder":l,style:xe,maxLength:a,value:L,ref:_,onPaste:J=>{var ie;ne(J),(ie=h.onPaste)==null||ie.call(h,J)},onChange:ce,onMouseOver:J=>{var ie;B(!0),(ie=h.onMouseOver)==null||ie.call(h,J)},onMouseLeave:J=>{var ie;B(!1),(ie=h.onMouseLeave)==null||ie.call(h,J)},onFocus:J=>{var ie;U(),(ie=h.onFocus)==null||ie.call(h,J)},onBlur:J=>{var ie;te(!1),(ie=h.onBlur)==null||ie.call(h,J)}})),[ce,U,ne,u,xe,a,Q,ae,h,E?.source,L]),X=Se.useMemo(()=>({slots:Array.from({length:a}).map((J,ie)=>{var Ge;let Xe=A&&ae!==null&&Q!==null&&(ae===Q&&ie===ae||ie>=ae&&ie<Q),Tt=L[ie]!==void 0?L[ie]:null,Oe=L[0]!==void 0?null:(Ge=l?.[ie])!=null?Ge:null;return{char:Tt,placeholderChar:Oe,isActive:Xe,hasFakeCaret:Xe&&Tt===null}}),isFocused:A,isHovering:!h.disabled&&O}),[A,O,a,Q,ae,h.disabled,L]),Ie=Se.useMemo(()=>m?m(X):Se.createElement(lP.Provider,{value:X},x),[x,X,m]);return Se.createElement(Se.Fragment,null,g!==null&&Se.createElement("noscript",null,Se.createElement("style",null,g)),Se.createElement("div",{ref:D,"data-input-otp-container":!0,style:he,className:p},Ie,Se.createElement("div",{style:{position:"absolute",inset:0,pointerEvents:"none"}},pe)))});uP.displayName="Input";function _m(e,t){try{e.insertRule(t)}catch{console.error("input-otp could not insert CSS rule:",t)}}var jQ=`
|
|
55
|
+
color: hsl(${Math.max(0,Math.min(120-120*f,120))}deg 100% 31%);`,o?.key)}return a}}function ve(e,t,o,r){return{debug:()=>{var a;return(a=e?.debugAll)!=null?a:e[t]},key:!1,onChange:r}}function w3(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:he(()=>[e,o,t,n],(s,i,l,u)=>({table:s,column:i,row:l,cell:u,getValue:u.getValue,renderValue:u.renderValue}),ve(e.options,"debugCells","cell.getContext"))};return e._features.forEach(s=>{s.createCell==null||s.createCell(n,o,t,e)},{}),n}function S3(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 p=f;for(let m of l.split(".")){var g;p=(g=p)==null?void 0:g[m]}return p}:c=f=>f[i.accessorKey]),!u)throw new Error;let d={id:`${String(u)}`,accessorFn:c,parent:r,depth:o,columnDef:i,columns:[],getFlatColumns:he(()=>[!0],()=>{var f;return[d,...(f=d.columns)==null?void 0:f.flatMap(p=>p.getFlatColumns())]},ve(e.options,"debugColumns","column.getFlatColumns")),getLeafColumns:he(()=>[e._getOrderColumnsFn()],f=>{var p;if((p=d.columns)!=null&&p.length){let g=d.columns.flatMap(m=>m.getLeafColumns());return f(g)}return[d]},ve(e.options,"debugColumns","column.getLeafColumns"))};for(let f of e._features)f.createColumn==null||f.createColumn(d,e);return d}var to="debugHeaders";function JM(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 R3={createTable:e=>{e.getHeaderGroups=he(()=>[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 bm(t,[...i,...u,...l],e)},ve(e.options,to,"getHeaderGroups")),e.getCenterHeaderGroups=he(()=>[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))),bm(t,o,e,"center")),ve(e.options,to,"getCenterHeaderGroups")),e.getLeftHeaderGroups=he(()=>[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 bm(t,n,e,"left")},ve(e.options,to,"getLeftHeaderGroups")),e.getRightHeaderGroups=he(()=>[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 bm(t,n,e,"right")},ve(e.options,to,"getRightHeaderGroups")),e.getFooterGroups=he(()=>[e.getHeaderGroups()],t=>[...t].reverse(),ve(e.options,to,"getFooterGroups")),e.getLeftFooterGroups=he(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),ve(e.options,to,"getLeftFooterGroups")),e.getCenterFooterGroups=he(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),ve(e.options,to,"getCenterFooterGroups")),e.getRightFooterGroups=he(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),ve(e.options,to,"getRightFooterGroups")),e.getFlatHeaders=he(()=>[e.getHeaderGroups()],t=>t.map(o=>o.headers).flat(),ve(e.options,to,"getFlatHeaders")),e.getLeftFlatHeaders=he(()=>[e.getLeftHeaderGroups()],t=>t.map(o=>o.headers).flat(),ve(e.options,to,"getLeftFlatHeaders")),e.getCenterFlatHeaders=he(()=>[e.getCenterHeaderGroups()],t=>t.map(o=>o.headers).flat(),ve(e.options,to,"getCenterFlatHeaders")),e.getRightFlatHeaders=he(()=>[e.getRightHeaderGroups()],t=>t.map(o=>o.headers).flat(),ve(e.options,to,"getRightFlatHeaders")),e.getCenterLeafHeaders=he(()=>[e.getCenterFlatHeaders()],t=>t.filter(o=>{var r;return!((r=o.subHeaders)!=null&&r.length)}),ve(e.options,to,"getCenterLeafHeaders")),e.getLeftLeafHeaders=he(()=>[e.getLeftFlatHeaders()],t=>t.filter(o=>{var r;return!((r=o.subHeaders)!=null&&r.length)}),ve(e.options,to,"getLeftLeafHeaders")),e.getRightLeafHeaders=he(()=>[e.getRightFlatHeaders()],t=>t.filter(o=>{var r;return!((r=o.subHeaders)!=null&&r.length)}),ve(e.options,to,"getRightLeafHeaders")),e.getLeafHeaders=he(()=>[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()},ve(e.options,to,"getLeafHeaders"))}};function bm(e,t,o,r){var a,n;let s=0,i=function(f,p){p===void 0&&(p=1),s=Math.max(s,p),f.filter(g=>g.getIsVisible()).forEach(g=>{var m;(m=g.columns)!=null&&m.length&&i(g.columns,p+1)},0)};i(e);let l=[],u=(f,p)=>{let g={depth:p,id:[r,`${p}`].filter(Boolean).join("_"),headers:[]},m=[];f.forEach(h=>{let v=[...m].reverse()[0],x=h.column.depth===g.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 S=JM(o,y,{id:[r,p,y.id,h?.id].filter(Boolean).join("_"),isPlaceholder:R,placeholderId:R?`${m.filter(C=>C.column===y).length}`:void 0,depth:p,index:m.length});S.subHeaders.push(h),m.push(S)}g.headers.push(h),h.headerGroup=g}),l.push(g),p>0&&u(m,p-1)},c=t.map((f,p)=>JM(o,f,{depth:s,index:p}));u(c,s-1),l.reverse();let d=f=>f.filter(g=>g.column.getIsVisible()).map(g=>{let m=0,h=0,v=[0];g.subHeaders&&g.subHeaders.length?(v=[],d(g.subHeaders).forEach(y=>{let{colSpan:R,rowSpan:S}=y;m+=R,v.push(S)})):m=1;let x=Math.min(...v);return h=h+x,g.colSpan=m,g.rowSpan=h,{colSpan:m,rowSpan:h}});return d((a=(n=l[0])==null?void 0:n.headers)!=null?a:[]),l}var Lx=(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:()=>C3(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:he(()=>[e.getAllLeafColumns()],l=>l.map(u=>w3(e,i,u,u.id)),ve(e.options,"debugRows","getAllCells")),_getAllCellsByColumnId:he(()=>[i.getAllCells()],l=>l.reduce((u,c)=>(u[c.column.id]=c,u),{}),ve(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},I3={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()}}},tk=(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))};tk.autoRemove=e=>Gr(e);var ok=(e,t,o)=>{var r;return!!(!((r=e.getValue(t))==null||(r=r.toString())==null)&&r.includes(o))};ok.autoRemove=e=>Gr(e);var rk=(e,t,o)=>{var r;return((r=e.getValue(t))==null||(r=r.toString())==null?void 0:r.toLowerCase())===o?.toLowerCase()};rk.autoRemove=e=>Gr(e);var ak=(e,t,o)=>{var r;return(r=e.getValue(t))==null?void 0:r.includes(o)};ak.autoRemove=e=>Gr(e);var nk=(e,t,o)=>!o.some(r=>{var a;return!((a=e.getValue(t))!=null&&a.includes(r))});nk.autoRemove=e=>Gr(e)||!(e!=null&&e.length);var sk=(e,t,o)=>o.some(r=>{var a;return(a=e.getValue(t))==null?void 0:a.includes(r)});sk.autoRemove=e=>Gr(e)||!(e!=null&&e.length);var ik=(e,t,o)=>e.getValue(t)===o;ik.autoRemove=e=>Gr(e);var lk=(e,t,o)=>e.getValue(t)==o;lk.autoRemove=e=>Gr(e);var Tx=(e,t,o)=>{let[r,a]=o,n=e.getValue(t);return n>=r&&n<=a};Tx.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]};Tx.autoRemove=e=>Gr(e)||Gr(e[0])&&Gr(e[1]);var en={includesString:tk,includesStringSensitive:ok,equalsString:rk,arrIncludes:ak,arrIncludesAll:nk,arrIncludesSome:sk,equals:ik,weakEquals:lk,inNumberRange:Tx};function Gr(e){return e==null||e===""}var P3={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:Ho("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"?en.includesString:typeof r=="number"?en.inNumberRange:typeof r=="boolean"||r!==null&&typeof r=="object"?en.equals:Array.isArray(r)?en.arrIncludes:en.weakEquals},e.getFilterFn=()=>{var o,r;return Sm(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:en[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=$n(o,n?n.value:void 0);if(ek(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=$n(t,a))==null?void 0:n.filter(s=>{let i=o.find(l=>l.id===s.id);if(i){let l=i.getFilterFn();if(ek(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 ek(e,t,o){return(e&&e.autoRemove?e.autoRemove(t,o):!1)||typeof t>"u"||typeof t=="string"&&!t}var L3=(e,t,o)=>o.reduce((r,a)=>{let n=a.getValue(e);return r+(typeof n=="number"?n:0)},0),T3=(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},M3=(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},k3=(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]},E3=(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},A3=(e,t)=>{if(!t.length)return;let o=t.map(n=>n.getValue(e));if(!b3(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},D3=(e,t)=>Array.from(new Set(t.map(o=>o.getValue(e))).values()),N3=(e,t)=>new Set(t.map(o=>o.getValue(e))).size,O3=(e,t)=>t.length,gx={sum:L3,min:T3,max:M3,extent:k3,mean:E3,median:A3,unique:D3,uniqueCount:N3,count:O3},F3={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:Ho("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 gx.sum;if(Object.prototype.toString.call(r)==="[object Date]")return gx.extent},e.getAggregationFn=()=>{var o,r;if(!e)throw new Error;return Sm(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:gx[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 _3(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 V3={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:Ho("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=he(o=>[nd(t,o)],o=>o.findIndex(r=>r.id===e.id),ve(t.options,"debugColumns","getIndex")),e.getIsFirstColumn=o=>{var r;return((r=nd(t,o)[0])==null?void 0:r.id)===e.id},e.getIsLastColumn=o=>{var r;let a=nd(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=he(()=>[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 _3(n,o,r)},ve(e.options,"debugTable","_getOrderColumnsFn"))}},hx=()=>({left:[],right:[]}),B3={getInitialState:e=>({columnPinning:hx(),...e}),getDefaultOptions:e=>({onColumnPinningChange:Ho("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=he(()=>[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))},ve(t.options,"debugRows","getCenterVisibleCells")),e.getLeftVisibleCells=he(()=>[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"})),ve(t.options,"debugRows","getLeftVisibleCells")),e.getRightVisibleCells=he(()=>[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"})),ve(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?hx():(o=(r=e.initialState)==null?void 0:r.columnPinning)!=null?o:hx())},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=he(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,o)=>(o??[]).map(r=>t.find(a=>a.id===r)).filter(Boolean),ve(e.options,"debugColumns","getLeftLeafColumns")),e.getRightLeafColumns=he(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,o)=>(o??[]).map(r=>t.find(a=>a.id===r)).filter(Boolean),ve(e.options,"debugColumns","getRightLeafColumns")),e.getCenterLeafColumns=he(()=>[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))},ve(e.options,"debugColumns","getCenterLeafColumns"))}};function H3(e){return e||(typeof document<"u"?document:null)}var Cm={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},vx=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),U3={getDefaultColumnDef:()=>Cm,getInitialState:e=>({columnSizing:{},columnSizingInfo:vx(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:Ho("columnSizing",e),onColumnSizingInfoChange:Ho("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:Cm.minSize,(r=n??e.columnDef.size)!=null?r:Cm.size),(a=e.columnDef.maxSize)!=null?a:Cm.maxSize)},e.getStart=he(o=>[o,nd(t,o),t.getState().columnSizing],(o,r)=>r.slice(0,e.getIndex(o)).reduce((a,n)=>a+n.getSize(),0),ve(t.options,"debugColumns","getStart")),e.getAfter=he(o=>[o,nd(t,o),t.getState().columnSizing],(o,r)=>r.slice(e.getIndex(o)+1).reduce((a,n)=>a+n.getSize(),0),ve(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(),xx(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=xx(n)?Math.round(n.touches[0].clientX):n.clientX,u={},c=(v,x)=>{typeof x=="number"&&(t.setColumnSizingInfo(y=>{var R,S;let C=t.options.columnResizeDirection==="rtl"?-1:1,w=(x-((R=y?.startOffset)!=null?R:0))*C,I=Math.max(w/((S=y?.startSize)!=null?S:0),-.999999);return y.columnSizingStart.forEach(L=>{let[T,M]=L;u[T]=Math.round(Math.max(M+M*I,0)*100)/100}),{...y,deltaOffset:w,deltaPercentage:I}}),(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:[]}))},p=H3(o),g={moveHandler:v=>d(v.clientX),upHandler:v=>{p?.removeEventListener("mousemove",g.moveHandler),p?.removeEventListener("mouseup",g.upHandler),f(v.clientX)}},m={moveHandler:v=>(v.cancelable&&(v.preventDefault(),v.stopPropagation()),d(v.touches[0].clientX),!1),upHandler:v=>{var x;p?.removeEventListener("touchmove",m.moveHandler),p?.removeEventListener("touchend",m.upHandler),v.cancelable&&(v.preventDefault(),v.stopPropagation()),f((x=v.touches[0])==null?void 0:x.clientX)}},h=G3()?{passive:!1}:!1;xx(n)?(p?.addEventListener("touchmove",m.moveHandler,h),p?.addEventListener("touchend",m.upHandler,h)):(p?.addEventListener("mousemove",g.moveHandler,h),p?.addEventListener("mouseup",g.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?vx():(o=e.initialState.columnSizingInfo)!=null?o:vx())},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}}},wm=null;function G3(){if(typeof wm=="boolean")return wm;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 wm=e,wm}function xx(e){return e.type==="touchstart"}var z3={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:Ho("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=he(()=>[e.getAllCells(),t.getState().columnVisibility],o=>o.filter(r=>r.column.getIsVisible()),ve(t.options,"debugRows","_getAllVisibleCells")),e.getVisibleCells=he(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(o,r,a)=>[...o,...r,...a],ve(t.options,"debugRows","getVisibleCells"))},createTable:e=>{let t=(o,r)=>he(()=>[r(),r().filter(a=>a.getIsVisible()).map(a=>a.id).join("_")],a=>a.filter(n=>n.getIsVisible==null?void 0:n.getIsVisible()),ve(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 nd(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}var q3={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()}}},W3={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:Ho("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=()=>en.includesString,e.getGlobalFilterFn=()=>{var t,o;let{globalFilterFn:r}=e.options;return Sm(r)?r:r==="auto"?e.getGlobalAutoFilterFn():(t=(o=e.options.filterFns)==null?void 0:o[r])!=null?t:en[r]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},$3={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:Ho("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()}}}},wx=0,Sx=10,yx=()=>({pageIndex:wx,pageSize:Sx}),j3={getInitialState:e=>({...e,pagination:{...yx(),...e?.pagination}}),getDefaultOptions:e=>({onPaginationChange:Ho("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=>$n(r,n);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(a)},e.resetPagination=r=>{var a;e.setPagination(r?yx():(a=e.initialState.pagination)!=null?a:yx())},e.setPageIndex=r=>{e.setPagination(a=>{let n=$n(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?wx:(a=(n=e.initialState)==null||(n=n.pagination)==null?void 0:n.pageIndex)!=null?a:wx)},e.resetPageSize=r=>{var a,n;e.setPageSize(r?Sx:(a=(n=e.initialState)==null||(n=n.pagination)==null?void 0:n.pageSize)!=null?a:Sx)},e.setPageSize=r=>{e.setPagination(a=>{let n=Math.max(1,$n(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=$n(r,(n=e.options.pageCount)!=null?n:-1);return typeof s=="number"&&(s=Math.max(-1,s)),{...a,pageCount:s}}),e.getPageOptions=he(()=>[e.getPageCount()],r=>{let a=[];return r&&r>0&&(a=[...new Array(r)].fill(null).map((n,s)=>s)),a},ve(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}}},bx=()=>({top:[],bottom:[]}),K3={getInitialState:e=>({rowPinning:bx(),...e}),getDefaultOptions:e=>({onRowPinningChange:Ho("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(m=>!(i!=null&&i.has(m))),bottom:[...((f=l?.bottom)!=null?f:[]).filter(m=>!(i!=null&&i.has(m))),...Array.from(i)]}}if(o==="top"){var p,g;return{top:[...((p=l?.top)!=null?p:[]).filter(m=>!(i!=null&&i.has(m))),...Array.from(i)],bottom:((g=l?.bottom)!=null?g:[]).filter(m=>!(i!=null&&i.has(m)))}}return{top:((u=l?.top)!=null?u:[]).filter(m=>!(i!=null&&i.has(m))),bottom:((c=l?.bottom)!=null?c:[]).filter(m=>!(i!=null&&i.has(m)))}})},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?bx():(o=(r=e.initialState)==null?void 0:r.rowPinning)!=null?o:bx())},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=he(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,o)=>e._getPinnedRows(t,o,"top"),ve(e.options,"debugRows","getTopRows")),e.getBottomRows=he(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,o)=>e._getPinnedRows(t,o,"bottom"),ve(e.options,"debugRows","getBottomRows")),e.getCenterRows=he(()=>[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))},ve(e.options,"debugRows","getCenterRows"))}},X3={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:Ho("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=>{Rx(a,n.id,r,!0,e)}),a}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=he(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,o)=>Object.keys(t).length?Cx(e,o):{rows:[],flatRows:[],rowsById:{}},ve(e.options,"debugTable","getSelectedRowModel")),e.getFilteredSelectedRowModel=he(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,o)=>Object.keys(t).length?Cx(e,o):{rows:[],flatRows:[],rowsById:{}},ve(e.options,"debugTable","getFilteredSelectedRowModel")),e.getGroupedSelectedRowModel=he(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,o)=>Object.keys(t).length?Cx(e,o):{rows:[],flatRows:[],rowsById:{}},ve(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 Rx(i,e.id,o,(s=r?.selectChildren)!=null?s:!0,t),i})},e.getIsSelected=()=>{let{rowSelection:o}=t.getState();return Mx(e,o)},e.getIsSomeSelected=()=>{let{rowSelection:o}=t.getState();return Ix(e,o)==="some"},e.getIsAllSubRowsSelected=()=>{let{rowSelection:o}=t.getState();return Ix(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)}}}},Rx=(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=>Rx(e,i.id,o,r,a))};function Cx(e,t){let o=e.getState().rowSelection,r=[],a={},n=function(s,i){return s.map(l=>{var u;let c=Mx(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 Mx(e,t){var o;return(o=t[e.id])!=null?o:!1}function Ix(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()&&(Mx(s,t)?n=!0:a=!1),s.subRows&&s.subRows.length)){let i=Ix(s,t);i==="all"?n=!0:(i==="some"&&(n=!0),a=!1)}}),a?"all":n?"some":!1}var Px=/([0-9]+)/gm,Y3=(e,t,o)=>uk(jn(e.getValue(o)).toLowerCase(),jn(t.getValue(o)).toLowerCase()),Z3=(e,t,o)=>uk(jn(e.getValue(o)),jn(t.getValue(o))),Q3=(e,t,o)=>kx(jn(e.getValue(o)).toLowerCase(),jn(t.getValue(o)).toLowerCase()),J3=(e,t,o)=>kx(jn(e.getValue(o)),jn(t.getValue(o))),e5=(e,t,o)=>{let r=e.getValue(o),a=t.getValue(o);return r>a?1:r<a?-1:0},t5=(e,t,o)=>kx(e.getValue(o),t.getValue(o));function kx(e,t){return e===t?0:e>t?1:-1}function jn(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function uk(e,t){let o=e.split(Px).filter(Boolean),r=t.split(Px).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 ad={alphanumeric:Y3,alphanumericCaseSensitive:Z3,text:Q3,textCaseSensitive:J3,datetime:e5,basic:t5},o5={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:Ho("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 ad.datetime;if(typeof n=="string"&&(r=!0,n.split(Px).length>1))return ad.alphanumeric}return r?ad.text:ad.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 Sm(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:ad[e.columnDef.sortingFn]},e.toggleSorting=(o,r)=>{let a=e.getNextSortingOrder(),n=typeof o<"u"&&o!==null;t.setSorting(s=>{let i=s?.find(p=>p.id===e.id),l=s?.findIndex(p=>p.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(p=>p.id===e.id?{...p,desc:d}:p):c==="remove"?u=s.filter(p=>p.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())}},r5=[R3,z3,V3,B3,I3,P3,q3,W3,o5,F3,$3,j3,K3,X3,U3];function ck(e){var t,o;let r=[...r5,...(t=e._features)!=null?t:[]],a={_features:r},n=a._features.reduce((f,p)=>Object.assign(f,p.getDefaultOptions==null?void 0:p.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 p;l=(p=f.getInitialState==null?void 0:f.getInitialState(l))!=null?p: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(p=>setTimeout(()=>{throw p})))},reset:()=>{a.setState(a.initialState)},setOptions:f=>{let p=$n(f,a.options);a.options=s(p)},getState:()=>a.options.state,setState:f=>{a.options.onStateChange==null||a.options.onStateChange(f)},_getRowId:(f,p,g)=>{var m;return(m=a.options.getRowId==null?void 0:a.options.getRowId(f,p,g))!=null?m:`${g?[g.id,p].join("."):p}`},getCoreRowModel:()=>(a._getCoreRowModel||(a._getCoreRowModel=a.options.getCoreRowModel(a)),a._getCoreRowModel()),getRowModel:()=>a.getPaginationRowModel(),getRow:(f,p)=>{let g=(p?a.getPrePaginationRowModel():a.getRowModel()).rowsById[f];if(!g&&(g=a.getCoreRowModel().rowsById[f],!g))throw new Error;return g},_getDefaultColumnDef:he(()=>[a.options.defaultColumn],f=>{var p;return f=(p=f)!=null?p:{},{header:g=>{let m=g.header.column.columnDef;return m.accessorKey?m.accessorKey:m.accessorFn?m.id:null},cell:g=>{var m,h;return(m=(h=g.renderValue())==null||h.toString==null?void 0:h.toString())!=null?m:null},...a._features.reduce((g,m)=>Object.assign(g,m.getDefaultColumnDef==null?void 0:m.getDefaultColumnDef()),{}),...f}},ve(e,"debugColumns","_getDefaultColumnDef")),_getColumnDefs:()=>a.options.columns,getAllColumns:he(()=>[a._getColumnDefs()],f=>{let p=function(g,m,h){return h===void 0&&(h=0),g.map(v=>{let x=S3(a,v,h,m),y=v;return x.columns=y.columns?p(y.columns,x,h+1):[],x})};return p(f)},ve(e,"debugColumns","getAllColumns")),getAllFlatColumns:he(()=>[a.getAllColumns()],f=>f.flatMap(p=>p.getFlatColumns()),ve(e,"debugColumns","getAllFlatColumns")),_getAllFlatColumnsById:he(()=>[a.getAllFlatColumns()],f=>f.reduce((p,g)=>(p[g.id]=g,p),{}),ve(e,"debugColumns","getAllFlatColumnsById")),getAllLeafColumns:he(()=>[a.getAllColumns(),a._getOrderColumnsFn()],(f,p)=>{let g=f.flatMap(m=>m.getLeafColumns());return p(g)},ve(e,"debugColumns","getAllLeafColumns")),getColumn:f=>a._getAllFlatColumnsById()[f]};Object.assign(a,d);for(let f=0;f<a._features.length;f++){let p=a._features[f];p==null||p.createTable==null||p.createTable(a)}return a}function dk(){return e=>he(()=>[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=Lx(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},ve(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}function a5(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 n5(e,t,o){return o.options.filterFromLeafRows?s5(e,t,o):i5(e,t,o)}function s5(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 p=l[f],g=Lx(o,p.id,p.original,p.index,p.depth,void 0,p.parentId);if(g.columnFilters=p.columnFilters,(d=p.subRows)!=null&&d.length&&u<s){if(g.subRows=i(p.subRows,u+1),p=g,t(p)&&!g.subRows.length){c.push(p),n[p.id]=p,a.push(p);continue}if(t(p)||g.subRows.length){c.push(p),n[p.id]=p,a.push(p);continue}}else p=g,t(p)&&(c.push(p),n[p.id]=p,a.push(p))}return c};return{rows:i(e),flatRows:a,rowsById:n}}function i5(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 p=l[f];if(t(p)){var d;if((d=p.subRows)!=null&&d.length&&u<s){let m=Lx(o,p.id,p.original,p.index,p.depth,void 0,p.parentId);m.subRows=i(p.subRows,u+1),p=m}c.push(p),a.push(p),n[p.id]=p}}return c};return{rows:i(e),flatRows:a,rowsById:n}}function fk(){return e=>he(()=>[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 p;let g=e.getColumn(f.id);if(!g)return;let m=g.getFilterFn();m&&a.push({id:f.id,filterFn:m,resolvedValue:(p=m.resolveFilterValue==null?void 0:m.resolveFilterValue(f.value))!=null?p: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 p;n.push({id:f.id,filterFn:i,resolvedValue:(p=i.resolveFilterValue==null?void 0:i.resolveFilterValue(r))!=null?p:r})}));let u,c;for(let f=0;f<t.flatRows.length;f++){let p=t.flatRows[f];if(p.columnFilters={},a.length)for(let g=0;g<a.length;g++){u=a[g];let m=u.id;p.columnFilters[m]=u.filterFn(p,m,u.resolvedValue,h=>{p.columnFiltersMeta[m]=h})}if(n.length){for(let g=0;g<n.length;g++){c=n[g];let m=c.id;if(c.filterFn(p,m,c.resolvedValue,h=>{p.columnFiltersMeta[m]=h})){p.columnFilters.__global__=!0;break}}p.columnFilters.__global__!==!0&&(p.columnFilters.__global__=!1)}}let d=f=>{for(let p=0;p<s.length;p++)if(f.columnFilters[s[p]]===!1)return!1;return!0};return n5(t.rows,d,e)},ve(e.options,"debugTable","getFilteredRowModel",()=>e._autoResetPageIndex()))}function pk(e){return t=>he(()=>[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=a5({rows:s,flatRows:i,rowsById:l}),d.flatRows=[];let f=p=>{d.flatRows.push(p),p.subRows.length&&p.subRows.forEach(f)};return d.rows.forEach(f),d},ve(t.options,"debugTable","getPaginationRowModel"))}function mk(){return e=>he(()=>[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 p=0;p<n.length;p+=1){var f;let g=n[p],m=s[g.id],h=m.sortUndefined,v=(f=g?.desc)!=null?f:!1,x=0;if(h){let y=c.getValue(g.id),R=d.getValue(g.id),S=y===void 0,C=R===void 0;if(S||C){if(h==="first")return S?-1:1;if(h==="last")return S?1:-1;x=S&&C?0:S?h:-h}}if(x===0&&(x=m.sortingFn(c,d,g.id)),x!==0)return v&&(x*=-1),m.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}},ve(e.options,"debugTable","getSortedRowModel",()=>e._autoResetPageIndex()))}function Ex(e,t){return e?l5(e)?sd.createElement(e,t):e:null}function l5(e){return u5(e)||typeof e=="function"||c5(e)}function u5(e){return typeof e=="function"&&(()=>{let t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function c5(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function gk(e){let t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[o]=sd.useState(()=>({current:ck(t)})),[r,a]=sd.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 oo=b(k());var tt=b(N()),d5=Y("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"}}),Rm=oo.forwardRef(({className:e,variant:t,size:o,loading:r,emptyContent:a,...n},s)=>{let i=t==="striped",l=oo.Children.map(n.children,u=>{if(oo.isValidElement(u)&&u.type==="tbody"){let c=u.props;return oo.cloneElement(u,{className:P(c.className,i&&"even:[&>tr]:bg-muted/50")})}return u});return(0,tt.jsxs)("div",{className:"relative w-full overflow-auto",children:[r&&(0,tt.jsx)("div",{className:"absolute inset-0 bg-background/60 flex items-center justify-center z-10",children:(0,tt.jsx)("div",{className:"h-8 w-8 animate-spin rounded-full border-2 border-primary border-t-transparent"})}),(0,tt.jsx)("table",{ref:s,className:P(d5({variant:t,size:o}),r&&"opacity-70",e),...n,children:l})]})});Rm.displayName="Table";var Im=oo.forwardRef(({className:e,...t},o)=>(0,tt.jsx)("thead",{ref:o,className:P("moonui-theme","[&_tr]:border-b",e),...t}));Im.displayName="TableHeader";var Pm=oo.forwardRef(({className:e,emptyContent:t,emptyMessage:o="No data available",children:r,...a},n)=>{let s=oo.Children.count(r)>0;return(0,tt.jsx)("tbody",{ref:n,className:P("moonui-theme","[&_tr:last-child]:border-0",e),...a,children:s?r:(0,tt.jsx)("tr",{children:(0,tt.jsx)("td",{colSpan:100,className:"h-24 text-center",children:t||(0,tt.jsx)("div",{className:"py-6 text-muted-foreground",children:(0,tt.jsx)("div",{className:"text-sm",children:o})})})})})});Pm.displayName="TableBody";var hk=oo.forwardRef(({className:e,...t},o)=>(0,tt.jsx)("tfoot",{ref:o,className:P("moonui-theme","bg-primary text-primary-foreground font-medium",e),...t}));hk.displayName="TableFooter";var Ol=oo.forwardRef(({className:e,...t},o)=>(0,tt.jsx)("tr",{ref:o,className:P("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));Ol.displayName="TableRow";var Lm=oo.forwardRef(({className:e,sortable:t,sorted:o,onSort:r,align:a="left",children:n,...s},i)=>{let l=()=>t?o==="asc"?(0,tt.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,tt.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,tt.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,tt.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,tt.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,tt.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,tt.jsx)("th",{ref:i,className:P("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,tt.jsxs)("div",{className:P("flex items-center",u[a].split(" ")[1]),children:[n,t&&l()]}):n})});Lm.displayName="TableHead";var id=oo.forwardRef(({className:e,align:t="left",...o},r)=>{let a={left:"text-left",center:"text-center",right:"text-right"}[t];return(0,tt.jsx)("td",{ref:r,className:P("moonui-theme","p-4 align-middle [&:has([role=checkbox])]:pr-0",a,e),...o})});id.displayName="TableCell";var vk=oo.forwardRef(({className:e,...t},o)=>(0,tt.jsx)("caption",{ref:o,className:P("moonui-theme","mt-4 text-sm text-muted-foreground",e),...t}));vk.displayName="TableCaption";var Me=b(N());function f5({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]=Ax.useState([]),[d,f]=Ax.useState(""),p=gk({data:t,columns:e,onSortingChange:o?c:void 0,onGlobalFilterChange:a?f:void 0,getCoreRowModel:dk(),getPaginationRowModel:r?pk():void 0,getSortedRowModel:o?mk():void 0,getFilteredRowModel:a?fk():void 0,state:{sorting:u,globalFilter:d},initialState:{pagination:{pageSize:n}}});return(0,Me.jsxs)("div",{className:P("space-y-4",l),children:[a&&(0,Me.jsx)("div",{className:"flex items-center",children:(0,Me.jsxs)("div",{className:"relative max-w-sm",children:[(0,Me.jsx)(fs,{className:"absolute left-2 top-2.5 h-4 w-4 text-muted-foreground"}),(0,Me.jsx)(Qt,{placeholder:s,value:d,onChange:g=>f(g.target.value),className:"pl-8"})]})}),(0,Me.jsx)("div",{className:"rounded-md border",children:(0,Me.jsxs)(Rm,{children:[(0,Me.jsx)(Im,{children:p.getHeaderGroups().map(g=>(0,Me.jsx)(Ol,{children:g.headers.map(m=>(0,Me.jsx)(Lm,{children:m.isPlaceholder?null:(0,Me.jsxs)("div",{className:P("flex items-center gap-2",m.column.getCanSort()&&"cursor-pointer select-none"),onClick:m.column.getToggleSortingHandler(),children:[Ex(m.column.columnDef.header,m.getContext()),o&&m.column.getCanSort()&&(0,Me.jsx)("div",{className:"ml-auto",children:m.column.getIsSorted()==="desc"?(0,Me.jsx)(hi,{className:"h-4 w-4"}):m.column.getIsSorted()==="asc"?(0,Me.jsx)(xi,{className:"h-4 w-4"}):(0,Me.jsx)(vi,{className:"h-4 w-4 opacity-50"})})]})},m.id))},g.id))}),(0,Me.jsx)(Pm,{children:p.getRowModel().rows?.length?p.getRowModel().rows.map(g=>(0,Me.jsx)(Ol,{"data-state":g.getIsSelected()&&"selected",children:g.getVisibleCells().map(m=>(0,Me.jsx)(id,{children:Ex(m.column.columnDef.cell,m.getContext())},m.id))},g.id)):(0,Me.jsx)(Ol,{children:(0,Me.jsx)(id,{colSpan:e.length,className:"h-24 text-center",children:i})})})]})}),r&&(0,Me.jsxs)("div",{className:"flex items-center justify-end space-x-2",children:[(0,Me.jsxs)("div",{className:"flex-1 text-sm text-muted-foreground",children:[p.getFilteredRowModel().rows.length," row(s)"]}),(0,Me.jsxs)("div",{className:"space-x-2",children:[(0,Me.jsxs)(Ae,{variant:"outline",size:"sm",onClick:()=>p.previousPage(),disabled:!p.getCanPreviousPage(),children:[(0,Me.jsx)(Sr,{className:"h-4 w-4"}),"Previous"]}),(0,Me.jsxs)("span",{className:"text-sm",children:["Page ",p.getState().pagination.pageIndex+1," of"," ",p.getPageCount()]}),(0,Me.jsxs)(Ae,{variant:"outline",size:"sm",onClick:()=>p.nextPage(),disabled:!p.getCanNextPage(),children:["Next",(0,Me.jsx)(lo,{className:"h-4 w-4"})]})]})]})]})}function p5(e){return({column:t})=>(0,Me.jsxs)(Ae,{variant:"ghost",className:"-ml-3 h-8 data-[state=open]:bg-accent",onClick:()=>t.toggleSorting(t.getIsSorted()==="asc"),children:[e,t.getIsSorted()==="desc"?(0,Me.jsx)(hi,{className:"ml-2 h-4 w-4"}):t.getIsSorted()==="asc"?(0,Me.jsx)(xi,{className:"ml-2 h-4 w-4"}):(0,Me.jsx)(vi,{className:"ml-2 h-4 w-4"})]})}var yt=b(k());var ye=b(N()),m5={initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20}},Dx=Y("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"}}),Nx=yt.forwardRef(function({className:t,variant:o,size:r,state:a,value:n,onChange:s,placeholder:i="Pick a date",formatString:l="PPP",minDate:u,maxDate:c,disabledDates:d,disabledDaysOfWeek:f,showWeekNumbers:p,iconPosition:g="left",icon:m,allowClear:h=!0,readOnly:v=!1,showTodayButton:x=!0,calendarProps:y,disabled:R,...S},C){let[w,I]=yt.useState(!1),[L,T]=yt.useState(n);yt.useEffect(()=>{T(n)},[n]);let M=O=>{let E=Array.isArray(O)?O[0]:O&&typeof O=="object"&&"from"in O?O.from:O;T(E),s?.(E),E&&I(!1)},F=O=>{O.stopPropagation(),M(void 0)},V=()=>{M(new Date)},A=O=>!!(u&&O<u||c&&O>c||d?.some(E=>E.toDateString()===O.toDateString())||f?.includes(O.getDay())),G=L&&wp(L)?Dr(L,l):null,_=m||(0,ye.jsx)(ls,{className:"h-4 w-4"});return(0,ye.jsx)("div",{ref:C,className:"moonui-theme",children:(0,ye.jsxs)($a,{open:w,onOpenChange:I,children:[(0,ye.jsx)(ja,{asChild:!0,children:(0,ye.jsxs)(Ae,{variant:o==="ghost"?"ghost":"outline",className:P(Dx({variant:o,size:r,state:a}),!G&&"text-muted-foreground",t),disabled:R||v,...S,children:[(0,ye.jsx)(Da,{mode:"wait",children:(0,ye.jsxs)(Ve.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:[g==="left"&&_,(0,ye.jsx)("span",{className:"flex-1 truncate",children:G||i}),g==="right"&&_]},G||"placeholder")}),h&&G&&!v&&!R&&(0,ye.jsxs)(Ve.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:F,role:"button",tabIndex:0,onKeyDown:O=>{(O.key==="Enter"||O.key===" ")&&(O.preventDefault(),F(O))},children:[(0,ye.jsx)("span",{className:"sr-only",children:"Clear date"}),(0,ye.jsx)("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,ye.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,ye.jsx)(ha,{className:"w-[360px] p-0 shadow-2xl rounded-2xl border border-border bg-background/95 backdrop-blur-sm !z-[9999]",align:"start",sideOffset:12,children:(0,ye.jsxs)(Ve.div,{...m5,className:"rounded-2xl bg-background overflow-hidden",children:[(0,ye.jsx)(Ec,{mode:"single",selected:L,onSelect:M,disabled:A,showOutsideDays:!1,className:P("rounded-2xl",y?.className),...y}),x&&(0,ye.jsx)("div",{className:"border-t px-4 py-3",children:(0,ye.jsx)(Ae,{variant:"ghost",size:"sm",onClick:V,className:"w-full justify-center hover:bg-accent hover:text-accent-foreground transition-all duration-200",children:"Today"})})]})})]})})});Nx.displayName="DatePicker";var xk=yt.forwardRef(function({className:t,value:o,onChange:r,placeholder:a="Pick a date range",formatString:n="LLL dd, y",separator:s=" - ",...i},l){let[u,c]=yt.useState(!1),[d,f]=yt.useState(o);yt.useEffect(()=>{f(o)},[o]);let p=m=>{f(m),r?.(m),m?.from&&m?.to&&c(!1)},g=yt.useMemo(()=>d?.from?d?.to?`${Dr(d.from,n)}${s}${Dr(d.to,n)}`:Dr(d.from,n):null,[d,n,s]);return(0,ye.jsxs)($a,{open:u,onOpenChange:c,children:[(0,ye.jsx)(ja,{asChild:!0,children:(0,ye.jsxs)(Ae,{ref:l,variant:i.variant==="ghost"?"ghost":"outline",className:P(Dx({variant:i.variant,size:i.size,state:i.state}),!g&&"text-muted-foreground",t),disabled:i.disabled||i.readOnly,children:[(0,ye.jsx)(ls,{className:"mr-2 h-4 w-4"}),(0,ye.jsx)("span",{className:"flex-1 truncate text-left",children:g||a})]})}),(0,ye.jsx)(ha,{className:"w-auto p-0 shadow-2xl rounded-2xl border border-border bg-background/95 backdrop-blur-sm !z-[9999]",align:"start",sideOffset:12,children:(0,ye.jsx)(Ec,{mode:"range",defaultMonth:d?.from,selected:d,onSelect:p,showOutsideDays:!1,...i.calendarProps,className:"rounded-2xl"})})]})});xk.displayName="DateRangePicker";var yk=yt.forwardRef(function({value:t,onChange:o,formatString:r="PPP",showTimePicker:a=!0,timeFormat:n="24",timeInterval:s=15,...i},l){let[u,c]=yt.useState(t),[d,f]=yt.useState(t?Dr(t,n==="24"?"HH:mm":"hh:mm a"):"00:00"),p=h=>{if(!h){c(void 0),o?.(void 0);return}let[v,x]=d.split(":").map(Number);h.setHours(v,x),c(h),o?.(h)},g=h=>{let v=h.target.value;if(f(v),u){let[x,y]=v.split(":").map(Number),R=new Date(u);R.setHours(x,y),c(R),o?.(R)}},m=yt.useMemo(()=>{let h=[];for(let v=0;v<24;v++)for(let x=0;x<60;x+=s){let y=v.toString().padStart(2,"0"),R=x.toString().padStart(2,"0"),S=`${y}:${R}`;if(n==="12"){let C=v===0?12:v>12?v-12:v,w=v<12?"AM":"PM",I=`${C}:${R} ${w}`;h.push({value:S,label:I})}else h.push({value:S,label:S})}return h},[n,s]);return(0,ye.jsxs)("div",{ref:l,className:"flex flex-col gap-2",children:[(0,ye.jsx)(Nx,{...i,value:u,onChange:p,formatString:r,showTodayButton:!1}),a&&u&&(0,ye.jsxs)(Ve.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:"flex items-center gap-2",children:[(0,ye.jsx)(mu,{className:"h-4 w-4 text-muted-foreground"}),(0,ye.jsx)("select",{value:d,onChange:g,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(h=>(0,ye.jsx)("option",{value:h.value,children:h.label},h.value))})]})]})});yk.displayName="DateTimePicker";var bk=yt.forwardRef(function({value:t,onChange:o,placeholder:r="Pick a month",formatString:a="MMMM yyyy",...n},s){let[i,l]=yt.useState(!1),[u,c]=yt.useState(t||new Date),d=["January","February","March","April","May","June","July","August","September","October","November","December"],f=m=>{let h=new Date(u);h.setMonth(m),o?.(h),l(!1)},p=m=>{let h=new Date(u);h.setFullYear(h.getFullYear()+m),c(h)},g=t?Dr(t,a):null;return(0,ye.jsxs)($a,{open:i,onOpenChange:l,children:[(0,ye.jsx)(ja,{asChild:!0,children:(0,ye.jsxs)(Ae,{ref:s,variant:n.variant==="default"?"outline":n.variant||"outline",className:P(Dx({variant:n.variant,size:n.size,state:n.state}),!g&&"text-muted-foreground",n.className),disabled:n.disabled||n.readOnly,children:[(0,ye.jsx)(ls,{className:"mr-2 h-4 w-4"}),g||r]})}),(0,ye.jsx)(ha,{className:"w-64 p-0 shadow-2xl border border-border bg-background !z-[9999]",align:"start",children:(0,ye.jsxs)("div",{className:"p-3",children:[(0,ye.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,ye.jsx)(Ae,{variant:"outline",size:"icon","aria-label":`Previous year, ${u.getFullYear()-1}`,onClick:()=>p(-1),children:(0,ye.jsx)(Sr,{className:"h-4 w-4"})}),(0,ye.jsx)("span",{className:"font-semibold",children:u.getFullYear()}),(0,ye.jsx)(Ae,{variant:"outline",size:"icon","aria-label":`Next year, ${u.getFullYear()+1}`,onClick:()=>p(1),children:(0,ye.jsx)(lo,{className:"h-4 w-4"})})]}),(0,ye.jsx)("div",{className:"grid grid-cols-3 gap-2",children:d.map((m,h)=>(0,ye.jsx)(Ae,{variant:t&&t.getMonth()===h?"primary":"outline",size:"sm",onClick:()=>f(h),className:"h-8 text-xs",children:m.slice(0,3)},m))})]})})]})});bk.displayName="MonthPicker";var Ck=b(k());var Ox=b(N());function g5({items:e,onReorder:t,renderItem:o,keyExtractor:r,className:a,disabled:n=!1}){let[s,i]=Ck.useState(null),l=(f,p)=>{n||(i(p),f.dataTransfer.effectAllowed="move")},u=f=>{f.preventDefault(),f.dataTransfer.dropEffect="move"},c=(f,p)=>{if(f.preventDefault(),n||s===null||s===p){i(null);return}let g=[...e],m=g[s];g.splice(s,1),g.splice(p,0,m),t(g),i(null)},d=()=>{i(null)};return(0,Ox.jsx)("div",{className:P("moonui-theme","space-y-2",a),children:e.map((f,p)=>(0,Ox.jsx)("div",{draggable:!n,onDragStart:g=>l(g,p),onDragOver:u,onDrop:g=>c(g,p),onDragEnd:d,className:P("transition-opacity duration-200",!n&&"cursor-move hover:opacity-80",s===p&&"opacity-50",n&&"cursor-not-allowed"),children:o(f,p)},r(f)))})}var tn=b(k());var Tt=b(k(),1);var le=b(k(),1);var be=b(N(),1),Fx=["Enter"," "],h5=["ArrowDown","PageUp","Home"],Sk=["ArrowUp","PageDown","End"],v5=[...h5,...Sk],x5={ltr:[...Fx,"ArrowRight"],rtl:[...Fx,"ArrowLeft"]},y5={ltr:["ArrowLeft"],rtl:["ArrowRight"]},dd="Menu",[ud,b5,C5]=ea(dd),[oi,_x]=Ne(dd,[C5,rr,Rl]),fd=rr(),Rk=Rl(),[Ik,Kn]=oi(dd),[w5,pd]=oi(dd),Pk=e=>{let{__scopeMenu:t,open:o=!1,children:r,dir:a,onOpenChange:n,modal:s=!0}=e,i=fd(t),[l,u]=le.useState(null),c=le.useRef(!1),d=Ee(n),f=Ko(a);return le.useEffect(()=>{let p=()=>{c.current=!0,document.addEventListener("pointerdown",g,{capture:!0,once:!0}),document.addEventListener("pointermove",g,{capture:!0,once:!0})},g=()=>c.current=!1;return document.addEventListener("keydown",p,{capture:!0}),()=>{document.removeEventListener("keydown",p,{capture:!0}),document.removeEventListener("pointerdown",g,{capture:!0}),document.removeEventListener("pointermove",g,{capture:!0})}},[]),(0,be.jsx)(za,{...i,children:(0,be.jsx)(Ik,{scope:t,open:o,onOpenChange:d,content:l,onContentChange:u,children:(0,be.jsx)(w5,{scope:t,onClose:le.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:c,dir:f,modal:s,children:r})})})};Pk.displayName=dd;var S5="MenuAnchor",Vx=le.forwardRef((e,t)=>{let{__scopeMenu:o,...r}=e,a=fd(o);return(0,be.jsx)(qa,{...a,...r,ref:t})});Vx.displayName=S5;var Bx="MenuPortal",[R5,Lk]=oi(Bx,{forceMount:void 0}),Tk=e=>{let{__scopeMenu:t,forceMount:o,children:r,container:a}=e,n=Kn(Bx,t);return(0,be.jsx)(R5,{scope:t,forceMount:o,children:(0,be.jsx)(Ye,{present:o||n.open,children:(0,be.jsx)(Br,{asChild:!0,container:a,children:r})})})};Tk.displayName=Bx;var ir="MenuContent",[I5,Hx]=oi(ir),Mk=le.forwardRef((e,t)=>{let o=Lk(ir,e.__scopeMenu),{forceMount:r=o.forceMount,...a}=e,n=Kn(ir,e.__scopeMenu),s=pd(ir,e.__scopeMenu);return(0,be.jsx)(ud.Provider,{scope:e.__scopeMenu,children:(0,be.jsx)(Ye,{present:r||n.open,children:(0,be.jsx)(ud.Slot,{scope:e.__scopeMenu,children:s.modal?(0,be.jsx)(P5,{...a,ref:t}):(0,be.jsx)(L5,{...a,ref:t})})})})}),P5=le.forwardRef((e,t)=>{let o=Kn(ir,e.__scopeMenu),r=le.useRef(null),a=ie(t,r);return le.useEffect(()=>{let n=r.current;if(n)return Vn(n)},[]),(0,be.jsx)(Ux,{...e,ref:a,trapFocus:o.open,disableOutsidePointerEvents:o.open,disableOutsideScroll:!0,onFocusOutside:z(e.onFocusOutside,n=>n.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>o.onOpenChange(!1)})}),L5=le.forwardRef((e,t)=>{let o=Kn(ir,e.__scopeMenu);return(0,be.jsx)(Ux,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>o.onOpenChange(!1)})}),T5=Cr("MenuContent.ScrollLock"),Ux=le.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:p,disableOutsideScroll:g,...m}=e,h=Kn(ir,o),v=pd(ir,o),x=fd(o),y=Rk(o),R=b5(o),[S,C]=le.useState(null),w=le.useRef(null),I=ie(t,w,h.onContentChange),L=le.useRef(0),T=le.useRef(""),M=le.useRef(0),F=le.useRef(null),V=le.useRef("right"),A=le.useRef(0),G=g?Wa:le.Fragment,_=g?{as:T5,allowPinchZoom:!0}:void 0,O=D=>{let te=T.current+D,ue=R().filter(H=>!H.disabled),B=document.activeElement,$=ue.find(H=>H.ref.current===B)?.textValue,Z=ue.map(H=>H.textValue),X=H5(Z,te,$),se=ue.find(H=>H.textValue===X)?.ref.current;(function H(oe){T.current=oe,window.clearTimeout(L.current),oe!==""&&(L.current=window.setTimeout(()=>H(""),1e3))})(te),se&&setTimeout(()=>se.focus())};le.useEffect(()=>()=>window.clearTimeout(L.current),[]),gl();let E=le.useCallback(D=>V.current===F.current?.side&&G5(D,F.current?.area),[]);return(0,be.jsx)(I5,{scope:o,searchRef:T,onItemEnter:le.useCallback(D=>{E(D)&&D.preventDefault()},[E]),onItemLeave:le.useCallback(D=>{E(D)||(w.current?.focus(),C(null))},[E]),onTriggerLeave:le.useCallback(D=>{E(D)&&D.preventDefault()},[E]),pointerGraceTimerRef:M,onPointerGraceIntentChange:le.useCallback(D=>{F.current=D},[]),children:(0,be.jsx)(G,{..._,children:(0,be.jsx)(qs,{asChild:!0,trapped:a,onMountAutoFocus:z(n,D=>{D.preventDefault(),w.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:s,children:(0,be.jsx)(da,{asChild:!0,disableOutsidePointerEvents:i,onEscapeKeyDown:u,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:f,onDismiss:p,children:(0,be.jsx)(om,{asChild:!0,...y,dir:v.dir,orientation:"vertical",loop:r,currentTabStopId:S,onCurrentTabStopIdChange:C,onEntryFocus:z(l,D=>{v.isUsingKeyboardRef.current||D.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,be.jsx)(Fn,{role:"menu","aria-orientation":"vertical","data-state":$k(h.open),"data-radix-menu-content":"",dir:v.dir,...x,...m,ref:I,style:{outline:"none",...m.style},onKeyDown:z(m.onKeyDown,D=>{let ue=D.target.closest("[data-radix-menu-content]")===D.currentTarget,B=D.ctrlKey||D.altKey||D.metaKey,$=D.key.length===1;ue&&(D.key==="Tab"&&D.preventDefault(),!B&&$&&O(D.key));let Z=w.current;if(D.target!==Z||!v5.includes(D.key))return;D.preventDefault();let se=R().filter(H=>!H.disabled).map(H=>H.ref.current);Sk.includes(D.key)&&se.reverse(),V5(se)}),onBlur:z(e.onBlur,D=>{D.currentTarget.contains(D.target)||(window.clearTimeout(L.current),T.current="")}),onPointerMove:z(e.onPointerMove,cd(D=>{let te=D.target,ue=A.current!==D.clientX;if(D.currentTarget.contains(te)&&ue){let B=D.clientX>A.current?"right":"left";V.current=B,A.current=D.clientX}}))})})})})})})});Mk.displayName=ir;var M5="MenuGroup",Gx=le.forwardRef((e,t)=>{let{__scopeMenu:o,...r}=e;return(0,be.jsx)(j.div,{role:"group",...r,ref:t})});Gx.displayName=M5;var k5="MenuLabel",kk=le.forwardRef((e,t)=>{let{__scopeMenu:o,...r}=e;return(0,be.jsx)(j.div,{...r,ref:t})});kk.displayName=k5;var Tm="MenuItem",wk="menu.itemSelect",km=le.forwardRef((e,t)=>{let{disabled:o=!1,onSelect:r,...a}=e,n=le.useRef(null),s=pd(Tm,e.__scopeMenu),i=Hx(Tm,e.__scopeMenu),l=ie(t,n),u=le.useRef(!1),c=()=>{let d=n.current;if(!o&&d){let f=new CustomEvent(wk,{bubbles:!0,cancelable:!0});d.addEventListener(wk,p=>r?.(p),{once:!0}),mi(d,f),f.defaultPrevented?u.current=!1:s.onClose()}};return(0,be.jsx)(Ek,{...a,ref:l,disabled:o,onClick:z(e.onClick,c),onPointerDown:d=>{e.onPointerDown?.(d),u.current=!0},onPointerUp:z(e.onPointerUp,d=>{u.current||d.currentTarget?.click()}),onKeyDown:z(e.onKeyDown,d=>{let f=i.searchRef.current!=="";o||f&&d.key===" "||Fx.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})})});km.displayName=Tm;var Ek=le.forwardRef((e,t)=>{let{__scopeMenu:o,disabled:r=!1,textValue:a,...n}=e,s=Hx(Tm,o),i=Rk(o),l=le.useRef(null),u=ie(t,l),[c,d]=le.useState(!1),[f,p]=le.useState("");return le.useEffect(()=>{let g=l.current;g&&p((g.textContent??"").trim())},[n.children]),(0,be.jsx)(ud.ItemSlot,{scope:o,disabled:r,textValue:a??f,children:(0,be.jsx)(rm,{asChild:!0,...i,focusable:!r,children:(0,be.jsx)(j.div,{role:"menuitem","data-highlighted":c?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...n,ref:u,onPointerMove:z(e.onPointerMove,cd(g=>{r?s.onItemLeave(g):(s.onItemEnter(g),g.defaultPrevented||g.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:z(e.onPointerLeave,cd(g=>s.onItemLeave(g))),onFocus:z(e.onFocus,()=>d(!0)),onBlur:z(e.onBlur,()=>d(!1))})})})}),E5="MenuCheckboxItem",Ak=le.forwardRef((e,t)=>{let{checked:o=!1,onCheckedChange:r,...a}=e;return(0,be.jsx)(_k,{scope:e.__scopeMenu,checked:o,children:(0,be.jsx)(km,{role:"menuitemcheckbox","aria-checked":Mm(o)?"mixed":o,...a,ref:t,"data-state":Wx(o),onSelect:z(a.onSelect,()=>r?.(Mm(o)?!0:!o),{checkForDefaultPrevented:!1})})})});Ak.displayName=E5;var Dk="MenuRadioGroup",[A5,D5]=oi(Dk,{value:void 0,onValueChange:()=>{}}),Nk=le.forwardRef((e,t)=>{let{value:o,onValueChange:r,...a}=e,n=Ee(r);return(0,be.jsx)(A5,{scope:e.__scopeMenu,value:o,onValueChange:n,children:(0,be.jsx)(Gx,{...a,ref:t})})});Nk.displayName=Dk;var Ok="MenuRadioItem",Fk=le.forwardRef((e,t)=>{let{value:o,...r}=e,a=D5(Ok,e.__scopeMenu),n=o===a.value;return(0,be.jsx)(_k,{scope:e.__scopeMenu,checked:n,children:(0,be.jsx)(km,{role:"menuitemradio","aria-checked":n,...r,ref:t,"data-state":Wx(n),onSelect:z(r.onSelect,()=>a.onValueChange?.(o),{checkForDefaultPrevented:!1})})})});Fk.displayName=Ok;var zx="MenuItemIndicator",[_k,N5]=oi(zx,{checked:!1}),Vk=le.forwardRef((e,t)=>{let{__scopeMenu:o,forceMount:r,...a}=e,n=N5(zx,o);return(0,be.jsx)(Ye,{present:r||Mm(n.checked)||n.checked===!0,children:(0,be.jsx)(j.span,{...a,ref:t,"data-state":Wx(n.checked)})})});Vk.displayName=zx;var O5="MenuSeparator",Bk=le.forwardRef((e,t)=>{let{__scopeMenu:o,...r}=e;return(0,be.jsx)(j.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});Bk.displayName=O5;var F5="MenuArrow",Hk=le.forwardRef((e,t)=>{let{__scopeMenu:o,...r}=e,a=fd(o);return(0,be.jsx)(_n,{...a,...r,ref:t})});Hk.displayName=F5;var qx="MenuSub",[_5,Uk]=oi(qx),Gk=e=>{let{__scopeMenu:t,children:o,open:r=!1,onOpenChange:a}=e,n=Kn(qx,t),s=fd(t),[i,l]=le.useState(null),[u,c]=le.useState(null),d=Ee(a);return le.useEffect(()=>(n.open===!1&&d(!1),()=>d(!1)),[n.open,d]),(0,be.jsx)(za,{...s,children:(0,be.jsx)(Ik,{scope:t,open:r,onOpenChange:d,content:u,onContentChange:c,children:(0,be.jsx)(_5,{scope:t,contentId:ze(),triggerId:ze(),trigger:i,onTriggerChange:l,children:o})})})};Gk.displayName=qx;var ld="MenuSubTrigger",zk=le.forwardRef((e,t)=>{let o=Kn(ld,e.__scopeMenu),r=pd(ld,e.__scopeMenu),a=Uk(ld,e.__scopeMenu),n=Hx(ld,e.__scopeMenu),s=le.useRef(null),{pointerGraceTimerRef:i,onPointerGraceIntentChange:l}=n,u={__scopeMenu:e.__scopeMenu},c=le.useCallback(()=>{s.current&&window.clearTimeout(s.current),s.current=null},[]);return le.useEffect(()=>c,[c]),le.useEffect(()=>{let d=i.current;return()=>{window.clearTimeout(d),l(null)}},[i,l]),(0,be.jsx)(Vx,{asChild:!0,...u,children:(0,be.jsx)(Ek,{id:a.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":a.contentId,"data-state":$k(o.open),...e,ref:Ao(t,a.onTriggerChange),onClick:d=>{e.onClick?.(d),!(e.disabled||d.defaultPrevented)&&(d.currentTarget.focus(),o.open||o.onOpenChange(!0))},onPointerMove:z(e.onPointerMove,cd(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:z(e.onPointerLeave,cd(d=>{c();let f=o.content?.getBoundingClientRect();if(f){let p=o.content?.dataset.side,g=p==="right",m=g?-5:5,h=f[g?"left":"right"],v=f[g?"right":"left"];n.onPointerGraceIntentChange({area:[{x:d.clientX+m,y:d.clientY},{x:h,y:f.top},{x:v,y:f.top},{x:v,y:f.bottom},{x:h,y:f.bottom}],side:p}),window.clearTimeout(i.current),i.current=window.setTimeout(()=>n.onPointerGraceIntentChange(null),300)}else{if(n.onTriggerLeave(d),d.defaultPrevented)return;n.onPointerGraceIntentChange(null)}})),onKeyDown:z(e.onKeyDown,d=>{let f=n.searchRef.current!=="";e.disabled||f&&d.key===" "||x5[r.dir].includes(d.key)&&(o.onOpenChange(!0),o.content?.focus(),d.preventDefault())})})})});zk.displayName=ld;var qk="MenuSubContent",Wk=le.forwardRef((e,t)=>{let o=Lk(ir,e.__scopeMenu),{forceMount:r=o.forceMount,...a}=e,n=Kn(ir,e.__scopeMenu),s=pd(ir,e.__scopeMenu),i=Uk(qk,e.__scopeMenu),l=le.useRef(null),u=ie(t,l);return(0,be.jsx)(ud.Provider,{scope:e.__scopeMenu,children:(0,be.jsx)(Ye,{present:r||n.open,children:(0,be.jsx)(ud.Slot,{scope:e.__scopeMenu,children:(0,be.jsx)(Ux,{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:z(e.onFocusOutside,c=>{c.target!==i.trigger&&n.onOpenChange(!1)}),onEscapeKeyDown:z(e.onEscapeKeyDown,c=>{s.onClose(),c.preventDefault()}),onKeyDown:z(e.onKeyDown,c=>{let d=c.currentTarget.contains(c.target),f=y5[s.dir].includes(c.key);d&&f&&(n.onOpenChange(!1),i.trigger?.focus(),c.preventDefault())})})})})})});Wk.displayName=qk;function $k(e){return e?"open":"closed"}function Mm(e){return e==="indeterminate"}function Wx(e){return Mm(e)?"indeterminate":e?"checked":"unchecked"}function V5(e){let t=document.activeElement;for(let o of e)if(o===t||(o.focus(),document.activeElement!==t))return}function B5(e,t){return e.map((o,r)=>e[(t+r)%e.length])}function H5(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=B5(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 U5(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 G5(e,t){if(!t)return!1;let o={x:e.clientX,y:e.clientY};return U5(o,t)}function cd(e){return t=>t.pointerType==="mouse"?e(t):void 0}var jk=Pk,Kk=Vx,Xk=Tk,Yk=Mk,Zk=Gx,Qk=kk,Jk=km,eE=Ak,tE=Nk,oE=Fk,rE=Vk,aE=Bk,nE=Hk,sE=Gk,iE=zk,lE=Wk;var Lt=b(N(),1),Em="DropdownMenu",[q5,hye]=Ne(Em,[_x]),ro=_x(),[W5,uE]=q5(Em),cE=e=>{let{__scopeDropdownMenu:t,children:o,dir:r,open:a,defaultOpen:n,onOpenChange:s,modal:i=!0}=e,l=ro(t),u=Tt.useRef(null),[c,d]=Xe({prop:a,defaultProp:n??!1,onChange:s,caller:Em});return(0,Lt.jsx)(W5,{scope:t,triggerId:ze(),triggerRef:u,contentId:ze(),open:c,onOpenChange:d,onOpenToggle:Tt.useCallback(()=>d(f=>!f),[d]),modal:i,children:(0,Lt.jsx)(jk,{...l,open:c,onOpenChange:d,dir:r,modal:i,children:o})})};cE.displayName=Em;var dE="DropdownMenuTrigger",fE=Tt.forwardRef((e,t)=>{let{__scopeDropdownMenu:o,disabled:r=!1,...a}=e,n=uE(dE,o),s=ro(o);return(0,Lt.jsx)(Kk,{asChild:!0,...s,children:(0,Lt.jsx)(j.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:Ao(t,n.triggerRef),onPointerDown:z(e.onPointerDown,i=>{!r&&i.button===0&&i.ctrlKey===!1&&(n.onOpenToggle(),n.open||i.preventDefault())}),onKeyDown:z(e.onKeyDown,i=>{r||(["Enter"," "].includes(i.key)&&n.onOpenToggle(),i.key==="ArrowDown"&&n.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(i.key)&&i.preventDefault())})})})});fE.displayName=dE;var $5="DropdownMenuPortal",pE=e=>{let{__scopeDropdownMenu:t,...o}=e,r=ro(t);return(0,Lt.jsx)(Xk,{...r,...o})};pE.displayName=$5;var mE="DropdownMenuContent",gE=Tt.forwardRef((e,t)=>{let{__scopeDropdownMenu:o,...r}=e,a=uE(mE,o),n=ro(o),s=Tt.useRef(!1);return(0,Lt.jsx)(Yk,{id:a.contentId,"aria-labelledby":a.triggerId,...n,...r,ref:t,onCloseAutoFocus:z(e.onCloseAutoFocus,i=>{s.current||a.triggerRef.current?.focus(),s.current=!1,i.preventDefault()}),onInteractOutside:z(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)"}})});gE.displayName=mE;var j5="DropdownMenuGroup",hE=Tt.forwardRef((e,t)=>{let{__scopeDropdownMenu:o,...r}=e,a=ro(o);return(0,Lt.jsx)(Zk,{...a,...r,ref:t})});hE.displayName=j5;var K5="DropdownMenuLabel",vE=Tt.forwardRef((e,t)=>{let{__scopeDropdownMenu:o,...r}=e,a=ro(o);return(0,Lt.jsx)(Qk,{...a,...r,ref:t})});vE.displayName=K5;var X5="DropdownMenuItem",xE=Tt.forwardRef((e,t)=>{let{__scopeDropdownMenu:o,...r}=e,a=ro(o);return(0,Lt.jsx)(Jk,{...a,...r,ref:t})});xE.displayName=X5;var Y5="DropdownMenuCheckboxItem",yE=Tt.forwardRef((e,t)=>{let{__scopeDropdownMenu:o,...r}=e,a=ro(o);return(0,Lt.jsx)(eE,{...a,...r,ref:t})});yE.displayName=Y5;var Z5="DropdownMenuRadioGroup",bE=Tt.forwardRef((e,t)=>{let{__scopeDropdownMenu:o,...r}=e,a=ro(o);return(0,Lt.jsx)(tE,{...a,...r,ref:t})});bE.displayName=Z5;var Q5="DropdownMenuRadioItem",CE=Tt.forwardRef((e,t)=>{let{__scopeDropdownMenu:o,...r}=e,a=ro(o);return(0,Lt.jsx)(oE,{...a,...r,ref:t})});CE.displayName=Q5;var J5="DropdownMenuItemIndicator",wE=Tt.forwardRef((e,t)=>{let{__scopeDropdownMenu:o,...r}=e,a=ro(o);return(0,Lt.jsx)(rE,{...a,...r,ref:t})});wE.displayName=J5;var eq="DropdownMenuSeparator",SE=Tt.forwardRef((e,t)=>{let{__scopeDropdownMenu:o,...r}=e,a=ro(o);return(0,Lt.jsx)(aE,{...a,...r,ref:t})});SE.displayName=eq;var tq="DropdownMenuArrow",oq=Tt.forwardRef((e,t)=>{let{__scopeDropdownMenu:o,...r}=e,a=ro(o);return(0,Lt.jsx)(nE,{...a,...r,ref:t})});oq.displayName=tq;var rq=e=>{let{__scopeDropdownMenu:t,children:o,open:r,onOpenChange:a,defaultOpen:n}=e,s=ro(t),[i,l]=Xe({prop:r,defaultProp:n??!1,onChange:a,caller:"DropdownMenuSub"});return(0,Lt.jsx)(sE,{...s,open:i,onOpenChange:l,children:o})},aq="DropdownMenuSubTrigger",RE=Tt.forwardRef((e,t)=>{let{__scopeDropdownMenu:o,...r}=e,a=ro(o);return(0,Lt.jsx)(iE,{...a,...r,ref:t})});RE.displayName=aq;var nq="DropdownMenuSubContent",IE=Tt.forwardRef((e,t)=>{let{__scopeDropdownMenu:o,...r}=e,a=ro(o);return(0,Lt.jsx)(lE,{...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)"}})});IE.displayName=nq;var PE=cE,LE=fE,$x=pE,jx=gE,TE=hE,Kx=vE,Xx=xE,Yx=yE,ME=bE,Zx=CE,Qx=wE,Jx=SE;var kE=rq,ey=RE,ty=IE;var Mt=b(N()),iq=PE,lq=LE,uq=TE,cq=$x,dq=kE,fq=ME,EE=tn.forwardRef(({className:e,inset:t,children:o,...r},a)=>(0,Mt.jsxs)(ey,{ref:a,className:P("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,Mt.jsx)(lo,{className:"ml-auto h-4 w-4"})]}));EE.displayName=ey.displayName;var AE=tn.forwardRef(({className:e,...t},o)=>(0,Mt.jsx)(ty,{ref:o,className:P("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}));AE.displayName=ty.displayName;var DE=tn.forwardRef(({className:e,sideOffset:t=4,...o},r)=>(0,Mt.jsx)($x,{children:(0,Mt.jsx)(jx,{ref:r,sideOffset:t,className:P("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})}));DE.displayName=jx.displayName;var NE=tn.forwardRef(({className:e,inset:t,...o},r)=>(0,Mt.jsx)(Xx,{ref:r,className:P("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}));NE.displayName=Xx.displayName;var OE=tn.forwardRef(({className:e,children:t,checked:o,...r},a)=>(0,Mt.jsxs)(Yx,{ref:a,className:P("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,Mt.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,Mt.jsx)(Qx,{children:(0,Mt.jsx)($t,{className:"h-4 w-4"})})}),t]}));OE.displayName=Yx.displayName;var FE=tn.forwardRef(({className:e,children:t,...o},r)=>(0,Mt.jsxs)(Zx,{ref:r,className:P("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,Mt.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,Mt.jsx)(Qx,{children:(0,Mt.jsx)(us,{className:"h-2 w-2 fill-current"})})}),t]}));FE.displayName=Zx.displayName;var _E=tn.forwardRef(({className:e,inset:t,...o},r)=>(0,Mt.jsx)(Kx,{ref:r,className:P("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...o}));_E.displayName=Kx.displayName;var VE=tn.forwardRef(({className:e,...t},o)=>(0,Mt.jsx)(Jx,{ref:o,className:P("moonui-theme","-mx-1 my-1 h-px bg-muted",e),...t}));VE.displayName=Jx.displayName;var BE=({className:e,...t})=>(0,Mt.jsx)("span",{className:P("moonui-theme","ml-auto text-xs tracking-widest opacity-60",e),...t});BE.displayName="DropdownMenuShortcut";var Uo=b(k());var HE=b(k());var on=b(N()),pq=Y("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"}}),mq=Y("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"}}),Am=HE.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},p)=>{let g=Math.max(0,Math.min(t,d)),m=d>0?g/d*100:0,h=l||`${Math.round(m)}%`;return(0,on.jsxs)(on.Fragment,{children:[i&&(0,on.jsx)("div",{className:"flex justify-between items-center mb-1",children:(0,on.jsx)("span",{className:P("text-sm font-medium text-muted-foreground",u),children:h})}),(0,on.jsx)("div",{ref:p,className:P("moonui-theme",pq({variant:o,size:r,radius:a,animation:n}),e),role:"progressbar","aria-valuemin":0,"aria-valuemax":d,"aria-valuenow":c?void 0:g,...f,children:(0,on.jsx)("div",{className:P(mq({variant:s||"primary",animation:n}),c&&"animate-indeterminate-progress"),style:c?{}:{transform:`translateX(-${100-m}%)`}})})]})});Am.displayName="Progress";var xe=b(N()),gq=e=>e.startsWith("image/")?(0,xe.jsx)(ds,{className:"h-4 w-4"}):e.startsWith("video/")?(0,xe.jsx)(Fu,{className:"h-4 w-4"}):e.startsWith("audio/")?(0,xe.jsx)(Tu,{className:"h-4 w-4"}):e.includes("text")||e.includes("document")?(0,xe.jsx)(bu,{className:"h-4 w-4"}):(0,xe.jsx)(Cu,{className:"h-4 w-4"}),oy=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]},hq=({uploadedFile:e,onRemove:t})=>{let{id:o,file:r,progress:a,status:n,preview:s}=e;return(0,xe.jsxs)(Ve.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,xe.jsx)("div",{className:"flex-shrink-0",children:s?(0,xe.jsx)("img",{src:s,alt:r.name,className:"h-10 w-10 object-cover rounded"}):(0,xe.jsx)("div",{className:"h-10 w-10 rounded bg-muted flex items-center justify-center",children:gq(r.type)})}),(0,xe.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,xe.jsxs)("div",{className:"flex items-center justify-between",children:[(0,xe.jsx)("p",{className:"text-sm font-medium truncate",children:r.name}),(0,xe.jsx)(Ae,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0",onClick:()=>t(o),"aria-label":`Remove ${r.name}`,children:(0,xe.jsx)(Do,{className:"h-3 w-3"})})]}),(0,xe.jsxs)("div",{className:"flex items-center space-x-2 mt-1",children:[(0,xe.jsx)("p",{className:"text-xs text-muted-foreground",children:oy(r.size)}),n==="uploading"&&(0,xe.jsxs)(wo,{variant:"secondary",className:"h-5",children:[(0,xe.jsx)(Rt,{className:"h-3 w-3 mr-1 animate-spin"}),"Uploading"]}),n==="success"&&(0,xe.jsxs)(wo,{variant:"success",className:"h-5",children:[(0,xe.jsx)(dn,{className:"h-3 w-3 mr-1"}),"Done"]}),n==="error"&&(0,xe.jsxs)(wo,{variant:"destructive",className:"h-5",children:[(0,xe.jsx)(Rr,{className:"h-3 w-3 mr-1"}),"Error"]})]}),n==="uploading"&&(0,xe.jsx)("div",{className:"mt-2",children:(0,xe.jsx)(Am,{value:a,className:"h-1"})})]})]})},UE=Uo.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,Uo.useState)([]),[p,g]=(0,Uo.useState)(!1),[m,h]=(0,Uo.useState)(null),v=I=>I.size>o?`File size exceeds ${oy(o)}`:e!=="*"&&!e.split(",").some(L=>{let T=L.trim();return T.includes("*")?I.type.startsWith(T.replace("*","")):I.type===T})?"File type not supported":null,x=(0,Uo.useCallback)(async I=>{let L=Array.from(I);if(h(null),d.length+L.length>r){h(`Maximum ${r} files allowed`);return}let T=[],M=[];if(L.forEach(V=>{let A=v(V);A?M.push(`${V.name}: ${A}`):T.push(V)}),M.length>0){h(M.join(", "));return}let F=T.map((V,A)=>({id:`${Date.now()}-${A}-${V.name.replace(/[^a-zA-Z0-9]/g,"")}`,file:V,progress:0,status:"uploading",preview:V.type.startsWith("image/")?URL.createObjectURL(V):void 0}));f(V=>[...V,...F]);for(let V of F){let A=0,G=setInterval(()=>{A+=15+V.file.size%10,A>=100?(A=100,clearInterval(G),f(_=>_.map(O=>O.id===V.id?{...O,progress:100,status:"success"}:O))):f(_=>_.map(O=>O.id===V.id?{...O,progress:A}:O))},200)}if(s)try{await s(F)}catch(V){console.error("Upload failed:",V),f(A=>A.map(G=>F.some(_=>_.id===G.id)?{...G,status:"error"}:G))}},[d.length,r,o,e,s]),y=(0,Uo.useCallback)(I=>{if(I.preventDefault(),g(!1),a)return;let L=I.dataTransfer.files;L.length>0&&x(L)},[x,a]),R=(0,Uo.useCallback)(I=>{I.preventDefault(),a||g(!0)},[a]),S=(0,Uo.useCallback)(I=>{I.preventDefault(),g(!1)},[]),C=(0,Uo.useCallback)(I=>{let L=I.target.files;L&&L.length>0&&x(L),I.target.value=""},[x]),w=(0,Uo.useCallback)(I=>{f(L=>{let T=L.find(M=>M.id===I);return T?.preview&&URL.revokeObjectURL(T.preview),L.filter(M=>M.id!==I)}),i&&i(I)},[i]);return(0,xe.jsxs)("div",{ref:c,className:P("moonui-theme","space-y-4",n),...u,children:[(0,xe.jsxs)(Ve.div,{className:P("relative border-2 border-dashed rounded-lg p-8 text-center transition-colors",p&&"border-primary bg-primary/5",a&&"opacity-50 cursor-not-allowed",!a&&"hover:border-primary/50 cursor-pointer"),onDrop:y,onDragOver:R,onDragLeave:S,animate:{scale:p?1.02:1,borderColor:p?"hsl(var(--primary))":"hsl(var(--border))"},children:[(0,xe.jsx)("input",{type:"file",accept:e,multiple:t,disabled:a,onChange:C,"aria-label":t?"Choose files to upload":"Choose a file to upload",className:"absolute inset-0 w-full h-full opacity-0 cursor-pointer"}),l||(0,xe.jsxs)("div",{className:"space-y-4",children:[(0,xe.jsx)("div",{className:"mx-auto h-12 w-12 text-muted-foreground",children:(0,xe.jsx)(Ou,{className:"h-full w-full"})}),(0,xe.jsxs)("div",{children:[(0,xe.jsx)("p",{className:"text-lg font-medium",children:p?"Drop files here":"Upload files"}),(0,xe.jsx)("p",{className:"text-sm text-muted-foreground",children:"Drag & drop files here, or click to select"}),(0,xe.jsxs)("p",{className:"text-xs text-muted-foreground mt-2",children:["Max ",r," files, ",oy(o)," each"]})]}),(0,xe.jsx)(Ae,{variant:"outline",disabled:a,children:"Select Files"})]})]}),(0,xe.jsx)(Da,{children:m&&(0,xe.jsxs)(Ve.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,xe.jsx)(Rr,{className:"h-4 w-4"}),(0,xe.jsx)("span",{children:m})]})}),(0,xe.jsx)(Da,{children:d.length>0&&(0,xe.jsxs)(Ve.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:"space-y-2",children:[(0,xe.jsxs)("h4",{className:"text-sm font-medium",children:["Uploaded Files (",d.length,")"]}),(0,xe.jsx)("div",{className:"space-y-2",children:(0,xe.jsx)(Da,{children:d.map(I=>(0,xe.jsx)(hq,{uploadedFile:I,onRemove:w},I.id))})})]})})]})});UE.displayName="FileUpload";var GE=b(k());var ri=b(N()),zE=GE.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=ll(0),d=ll(0),f=r==="up"||r==="down",p=f?c:d,g=qh(p,[0,a],[1,.5]),m=(x,y)=>{if(!i)return;let R=f?y.offset.y:y.offset.x,S=f?y.velocity.y:y.velocity.x,C=!1;switch(r){case"up":C=R>a||S>500;break;case"down":C=R<-a||S<-500;break;case"left":C=R>a||S>500;break;case"right":C=R<-a||S<-500;break}C?o(!1):$h(p,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,ri.jsxs)("div",{className:"fixed inset-0 z-50",children:[(0,ri.jsx)(Ve.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:()=>o(!1),className:P("absolute inset-0 bg-black/50",s)}),(0,ri.jsxs)(Ve.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:m,style:{[f?"y":"x"]:p,opacity:g},initial:h(),animate:v(),exit:h(),transition:{type:"spring",damping:30,stiffness:300},className:P("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,ri.jsx)("div",{className:"flex justify-center p-2",children:(0,ri.jsx)("div",{className:"w-12 h-1 bg-muted rounded-full"})}),e]})]}):null});zE.displayName="GestureDrawer";var Xn=b(k());var je=b(N());function vq({className:e,size:t="md",showForks:o=!0,showWatchers:r=!1,repoUrl:a="https://github.com/moonui/moonui"}){let[n,s]=(0,Xn.useState)(null),[i,l]=(0,Xn.useState)(!0);(0,Xn.useEffect)(()=>{(async()=>{try{let g=await(await fetch("/api/github-stars")).json();s(g)}catch(p){console.error("Failed to fetch GitHub stats:",p),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,je.jsxs)("div",{className:P("flex items-center animate-pulse",c[t],e),children:[(0,je.jsxs)("div",{className:"flex items-center gap-1",children:[(0,je.jsx)("div",{className:"w-4 h-4 bg-gray-300 dark:bg-gray-700 rounded"}),(0,je.jsx)("div",{className:"w-8 h-4 bg-gray-300 dark:bg-gray-700 rounded"})]}),o&&(0,je.jsxs)("div",{className:"flex items-center gap-1",children:[(0,je.jsx)("div",{className:"w-4 h-4 bg-gray-300 dark:bg-gray-700 rounded"}),(0,je.jsx)("div",{className:"w-6 h-4 bg-gray-300 dark:bg-gray-700 rounded"})]})]}):n?(0,je.jsxs)("div",{className:P("flex items-center",c[t],e),children:[(0,je.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,je.jsx)(fn,{className:"fill-current text-yellow-500",size:d[t]}),(0,je.jsx)("span",{className:"font-medium",children:u(n.stars)})]}),o&&(0,je.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,je.jsx)(wu,{size:d[t]}),(0,je.jsx)("span",{className:"font-medium",children:u(n.forks)})]}),r&&(0,je.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,je.jsx)(cs,{size:d[t]}),(0,je.jsx)("span",{className:"font-medium",children:u(n.watchers)})]}),!n.isLive&&(0,je.jsx)("span",{className:"text-xs text-gray-500 dark:text-gray-500 ml-2",children:"(demo)"})]}):null}function Uye({className:e,size:t="md",repoUrl:o="https://github.com/moonui/moonui"}){let[r,a]=(0,Xn.useState)(null),[n,s]=(0,Xn.useState)(!0);(0,Xn.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,je.jsx)(Ae,{variant:"outline",size:t,className:P("moonui-theme","group",e),asChild:!0,children:(0,je.jsxs)("a",{href:o,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2",children:[(0,je.jsx)(fn,{className:"fill-current text-yellow-500 group-hover:scale-110 transition-transform",size:16}),(0,je.jsx)("span",{children:"Star on GitHub"}),!n&&r&&(0,je.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,je.jsx)(yu,{size:14,className:"opacity-50 group-hover:opacity-100 transition-opacity"})]})})}var ai=b(k());var we=b(k(),1),Nm=b(k(),1),zr=b(k(),1),xq=Object.defineProperty,yq=Object.defineProperties,bq=Object.getOwnPropertyDescriptors,Dm=Object.getOwnPropertySymbols,WE=Object.prototype.hasOwnProperty,$E=Object.prototype.propertyIsEnumerable,qE=(e,t,o)=>t in e?xq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,Cq=(e,t)=>{for(var o in t||(t={}))WE.call(t,o)&&qE(e,o,t[o]);if(Dm)for(var o of Dm(t))$E.call(t,o)&&qE(e,o,t[o]);return e},wq=(e,t)=>yq(e,bq(t)),Sq=(e,t)=>{var o={};for(var r in e)WE.call(e,r)&&t.indexOf(r)<0&&(o[r]=e[r]);if(e!=null&&Dm)for(var r of Dm(e))t.indexOf(r)<0&&$E.call(e,r)&&(o[r]=e[r]);return o};function Rq(e){let t=setTimeout(e,0),o=setTimeout(e,10),r=setTimeout(e,50);return[t,o,r]}function Iq(e){let t=Nm.useRef();return Nm.useEffect(()=>{t.current=e}),t.current}var Pq=18,jE=40,Lq=`${jE}px`,Tq=["[data-lastpass-icon-root]","com-1password-button","[data-dashlanecreated]",'[style$="2147483647 !important;"]'].join(",");function Mq({containerRef:e,inputRef:t,pushPasswordManagerStrategy:o,isFocused:r}){let[a,n]=zr.useState(!1),[s,i]=zr.useState(!1),[l,u]=zr.useState(!1),c=zr.useMemo(()=>o==="none"?!1:(o==="increase-width"||o==="experimental-no-flickering")&&a&&s,[a,s,o]),d=zr.useCallback(()=>{let f=e.current,p=t.current;if(!f||!p||l||o==="none")return;let g=f,m=g.getBoundingClientRect().left+g.offsetWidth,h=g.getBoundingClientRect().top+g.offsetHeight/2,v=m-Pq,x=h;document.querySelectorAll(Tq).length===0&&document.elementFromPoint(v,x)===f||(n(!0),u(!0))},[e,t,l,o]);return zr.useEffect(()=>{let f=e.current;if(!f||o==="none")return;function p(){let m=window.innerWidth-f.getBoundingClientRect().right;i(m>=jE)}p();let g=setInterval(p,1e3);return()=>{clearInterval(g)}},[e,o]),zr.useEffect(()=>{let f=r||document.activeElement===t.current;if(o==="none"||!f)return;let p=setTimeout(d,0),g=setTimeout(d,2e3),m=setTimeout(d,5e3),h=setTimeout(()=>{u(!0)},6e3);return()=>{clearTimeout(p),clearTimeout(g),clearTimeout(m),clearTimeout(h)}},[t,r,o,d]),{hasPWMBadge:a,willPushPWMBadge:c,PWM_BADGE_SPACE_WIDTH:Lq}}var ry=we.createContext({}),ay=we.forwardRef((e,t)=>{var o=e,{value:r,onChange:a,maxLength:n,textAlign:s="left",pattern:i,placeholder:l,inputMode:u="numeric",onComplete:c,pushPasswordManagerStrategy:d="increase-width",pasteTransformer:f,containerClassName:p,noScriptCSSFallback:g=kq,render:m,children:h}=o,v=Sq(o,["value","onChange","maxLength","textAlign","pattern","placeholder","inputMode","onComplete","pushPasswordManagerStrategy","pasteTransformer","containerClassName","noScriptCSSFallback","render","children"]),x,y,R,S,C;let[w,I]=we.useState(typeof v.defaultValue=="string"?v.defaultValue:""),L=r??w,T=Iq(L),M=we.useCallback(J=>{a?.(J),I(J)},[a]),F=we.useMemo(()=>i?typeof i=="string"?new RegExp(i):i:null,[i]),V=we.useRef(null),A=we.useRef(null),G=we.useRef({value:L,onChange:M,isIOS:typeof window<"u"&&((y=(x=window?.CSS)==null?void 0:x.supports)==null?void 0:y.call(x,"-webkit-touch-callout","none"))}),_=we.useRef({prev:[(R=V.current)==null?void 0:R.selectionStart,(S=V.current)==null?void 0:S.selectionEnd,(C=V.current)==null?void 0:C.selectionDirection]});we.useImperativeHandle(t,()=>V.current,[]),we.useEffect(()=>{let J=V.current,ne=A.current;if(!J||!ne)return;G.current.value!==J.value&&G.current.onChange(J.value),_.current.prev=[J.selectionStart,J.selectionEnd,J.selectionDirection];function Ge(){if(document.activeElement!==J){B(null),Z(null);return}let De=J.selectionStart,dt=J.selectionEnd,Zr=J.selectionDirection,no=J.maxLength,yr=J.value,Wo=_.current.prev,br=-1,Qr=-1,Jr;if(yr.length!==0&&De!==null&&dt!==null){let eu=De===dt,tu=De===yr.length&&yr.length<no;if(eu&&!tu){let $o=De;if($o===0)br=0,Qr=1,Jr="forward";else if($o===no)br=$o-1,Qr=$o,Jr="backward";else if(no>1&&yr.length>1){let ou=0;if(Wo[0]!==null&&Wo[1]!==null){Jr=$o<Wo[1]?"backward":"forward";let pg=Wo[0]===Wo[1]&&Wo[0]<no;Jr==="backward"&&!pg&&(ou=-1)}br=ou+$o,Qr=ou+$o+1}}br!==-1&&Qr!==-1&&br!==Qr&&V.current.setSelectionRange(br,Qr,Jr)}let Ed=br!==-1?br:De,fi=Qr!==-1?Qr:dt,ln=Jr??Zr;B(Ed),Z(fi),_.current.prev=[Ed,fi,ln]}if(document.addEventListener("selectionchange",Ge,{capture:!0}),Ge(),document.activeElement===J&&te(!0),!document.getElementById("input-otp-style")){let De=document.createElement("style");if(De.id="input-otp-style",document.head.appendChild(De),De.sheet){let dt="background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;";md(De.sheet,"[data-input-otp]::selection { background: transparent !important; color: transparent !important; }"),md(De.sheet,`[data-input-otp]:autofill { ${dt} }`),md(De.sheet,`[data-input-otp]:-webkit-autofill { ${dt} }`),md(De.sheet,"@supports (-webkit-touch-callout: none) { [data-input-otp] { letter-spacing: -.6em !important; font-weight: 100 !important; font-stretch: ultra-condensed; font-optical-sizing: none !important; left: -1px !important; right: 1px !important; } }"),md(De.sheet,"[data-input-otp] + * { pointer-events: all !important; }")}}let $e=()=>{ne&&ne.style.setProperty("--root-height",`${J.clientHeight}px`)};$e();let ht=new ResizeObserver($e);return ht.observe(J),()=>{document.removeEventListener("selectionchange",Ge,{capture:!0}),ht.disconnect()}},[]);let[O,E]=we.useState(!1),[D,te]=we.useState(!1),[ue,B]=we.useState(null),[$,Z]=we.useState(null);we.useEffect(()=>{Rq(()=>{var J,ne,Ge,$e;(J=V.current)==null||J.dispatchEvent(new Event("input"));let ht=(ne=V.current)==null?void 0:ne.selectionStart,De=(Ge=V.current)==null?void 0:Ge.selectionEnd,dt=($e=V.current)==null?void 0:$e.selectionDirection;ht!==null&&De!==null&&(B(ht),Z(De),_.current.prev=[ht,De,dt])})},[L,D]),we.useEffect(()=>{T!==void 0&&L!==T&&T.length<n&&L.length===n&&c?.(L)},[n,c,T,L]);let X=Mq({containerRef:A,inputRef:V,pushPasswordManagerStrategy:d,isFocused:D}),se=we.useCallback(J=>{let ne=J.currentTarget.value.slice(0,n);if(ne.length>0&&F&&!F.test(ne)){J.preventDefault();return}typeof T=="string"&&ne.length<T.length&&document.dispatchEvent(new Event("selectionchange")),M(ne)},[n,M,T,F]),H=we.useCallback(()=>{var J;if(V.current){let ne=Math.min(V.current.value.length,n-1),Ge=V.current.value.length;(J=V.current)==null||J.setSelectionRange(ne,Ge),B(ne),Z(Ge)}te(!0)},[n]),oe=we.useCallback(J=>{var ne,Ge;let $e=V.current;if(!f&&(!G.current.isIOS||!J.clipboardData||!$e))return;let ht=J.clipboardData.getData("text/plain"),De=f?f(ht):ht;J.preventDefault();let dt=(ne=V.current)==null?void 0:ne.selectionStart,Zr=(Ge=V.current)==null?void 0:Ge.selectionEnd,no=(dt!==Zr?L.slice(0,dt)+De+L.slice(Zr):L.slice(0,dt)+De+L.slice(dt)).slice(0,n);if(no.length>0&&F&&!F.test(no))return;$e.value=no,M(no);let yr=Math.min(no.length,n-1),Wo=no.length;$e.setSelectionRange(yr,Wo),B(yr),Z(Wo)},[n,M,F,L]),fe=we.useMemo(()=>({position:"relative",cursor:v.disabled?"default":"text",userSelect:"none",WebkitUserSelect:"none",pointerEvents:"none"}),[v.disabled]),me=we.useMemo(()=>({position:"absolute",inset:0,width:X.willPushPWMBadge?`calc(100% + ${X.PWM_BADGE_SPACE_WIDTH})`:"100%",clipPath:X.willPushPWMBadge?`inset(0 ${X.PWM_BADGE_SPACE_WIDTH} 0 0)`:void 0,height:"100%",display:"flex",textAlign:s,opacity:"1",color:"transparent",pointerEvents:"all",background:"transparent",caretColor:"transparent",border:"0 solid transparent",outline:"0 solid transparent",boxShadow:"none",lineHeight:"1",letterSpacing:"-.5em",fontSize:"var(--root-height)",fontFamily:"monospace",fontVariantNumeric:"tabular-nums"}),[X.PWM_BADGE_SPACE_WIDTH,X.willPushPWMBadge,s]),pe=we.useMemo(()=>we.createElement("input",wq(Cq({autoComplete:v.autoComplete||"one-time-code"},v),{"data-input-otp":!0,"data-input-otp-placeholder-shown":L.length===0||void 0,"data-input-otp-mss":ue,"data-input-otp-mse":$,inputMode:u,pattern:F?.source,"aria-placeholder":l,style:me,maxLength:n,value:L,ref:V,onPaste:J=>{var ne;oe(J),(ne=v.onPaste)==null||ne.call(v,J)},onChange:se,onMouseOver:J=>{var ne;E(!0),(ne=v.onMouseOver)==null||ne.call(v,J)},onMouseLeave:J=>{var ne;E(!1),(ne=v.onMouseLeave)==null||ne.call(v,J)},onFocus:J=>{var ne;H(),(ne=v.onFocus)==null||ne.call(v,J)},onBlur:J=>{var ne;te(!1),(ne=v.onBlur)==null||ne.call(v,J)}})),[se,H,oe,u,me,n,$,ue,v,F?.source,L]),K=we.useMemo(()=>({slots:Array.from({length:n}).map((J,ne)=>{var Ge;let $e=D&&ue!==null&&$!==null&&(ue===$&&ne===ue||ne>=ue&&ne<$),ht=L[ne]!==void 0?L[ne]:null,De=L[0]!==void 0?null:(Ge=l?.[ne])!=null?Ge:null;return{char:ht,placeholderChar:De,isActive:$e,hasFakeCaret:$e&&ht===null}}),isFocused:D,isHovering:!v.disabled&&O}),[D,O,n,$,ue,v.disabled,L]),Ie=we.useMemo(()=>m?m(K):we.createElement(ry.Provider,{value:K},h),[h,K,m]);return we.createElement(we.Fragment,null,g!==null&&we.createElement("noscript",null,we.createElement("style",null,g)),we.createElement("div",{ref:A,"data-input-otp-container":!0,style:fe,className:p},Ie,we.createElement("div",{style:{position:"absolute",inset:0,pointerEvents:"none"}},pe)))});ay.displayName="Input";function md(e,t){try{e.insertRule(t)}catch{console.error("input-otp could not insert CSS rule:",t)}}var kq=`
|
|
67
56
|
[data-input-otp] {
|
|
68
57
|
--nojs-bg: white !important;
|
|
69
58
|
--nojs-fg: black !important;
|
|
@@ -82,57 +71,157 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
|
|
|
82
71
|
--nojs-bg: black !important;
|
|
83
72
|
--nojs-fg: white !important;
|
|
84
73
|
}
|
|
85
|
-
}`,rU="^\\d+$",oU="^[a-zA-Z]+$",nU="^[a-zA-Z0-9]+$";var mi=R(N()),cP=tu.forwardRef(({className:e,containerClassName:t,...r},o)=>(0,mi.jsx)(uP,{ref:o,"aria-label":"One-time password",containerClassName:P("moonui-theme","flex items-center gap-2 has-[:disabled]:opacity-50",t),className:P("disabled:cursor-not-allowed",e),...r}));cP.displayName="InputOTP";var dP=tu.forwardRef(({className:e,...t},r)=>(0,mi.jsx)("div",{ref:r,className:P("flex items-center",e),...t}));dP.displayName="InputOTPGroup";var fP=K(["relative flex h-10 w-10 items-center justify-center","border-y border-r border-input text-sm text-foreground","transition-all duration-200","first:rounded-l-md first:border-l last:rounded-r-md"],{variants:{isActive:{true:"z-10 ring-2 ring-ring ring-offset-background",false:""}},defaultVariants:{isActive:!1}}),pP=tu.forwardRef(({index:e,className:t,...r},o)=>{let a=tu.useContext(lP)?.slots?.[e],i=a?.char,s=a?.hasFakeCaret,l=a?.isActive;return(0,mi.jsxs)("div",{ref:o,"data-active":l?"":void 0,className:P(fP({isActive:!!l}),t),...r,children:[i,s&&(0,mi.jsx)("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:(0,mi.jsx)("div",{className:"h-4 w-px animate-caret-blink bg-foreground duration-1000"})})]})});pP.displayName="InputOTPSlot";var mP=tu.forwardRef(({className:e,...t},r)=>(0,mi.jsx)("div",{ref:r,role:"separator",className:P("text-muted-foreground",e),...t,children:(0,mi.jsx)(Of,{"aria-hidden":"true"})}));mP.displayName="InputOTPSeparator";var ad=R(M());var Ce=R(N());function gP({children:e,componentName:t,className:r,showPreview:o=!0,previewDuration:n=2e3}){let[a,i]=(0,ad.useState)(!1),[s,l]=(0,ad.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,Ce.jsxs)("div",{className:P("relative group cursor-pointer transition-all duration-300",r),onMouseEnter:u,onMouseLeave:c,children:[(0,Ce.jsx)("div",{className:P("transition-all duration-300",!a&&"blur-sm grayscale-[0.3] opacity-60"),children:e}),(0,Ce.jsx)("div",{className:P("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,Ce.jsxs)("div",{className:"text-center space-y-3 p-6",children:[(0,Ce.jsx)("div",{className:"flex justify-center",children:(0,Ce.jsxs)(_r,{variant:"secondary",className:"bg-gradient-to-r from-amber-500 to-orange-500 text-white border-0 px-3 py-1",children:[(0,Ce.jsx)(Xu,{className:"w-3 h-3 mr-1"}),"PRO ONLY"]})}),(0,Ce.jsx)("div",{className:"flex justify-center",children:(0,Ce.jsx)("div",{className:"p-3 rounded-full bg-amber-100 dark:bg-amber-900/30",children:(0,Ce.jsx)(Qu,{className:"w-6 h-6 text-amber-600 dark:text-amber-400"})})}),(0,Ce.jsx)("h3",{className:"font-semibold text-gray-900 dark:text-gray-100",children:t}),(0,Ce.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,Ce.jsxs)(Ee,{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,Ce.jsx)(Zu,{className:"w-4 h-4 mr-2"}),"Upgrade to Pro"]})]})}),o&&!a&&(0,Ce.jsx)("div",{className:"absolute top-2 right-2 opacity-0 group-hover:opacity-100 transition-opacity duration-200",children:(0,Ce.jsx)("div",{className:"bg-black/80 text-white text-xs px-2 py-1 rounded",children:"Hover to preview"})})]})}function aU({children:e,componentId:t,componentName:r,className:o,fallback:n,requireCLI:a=!0}){let[i,s]=(0,ad.useState)({isAuthenticated:!1,deviceValid:!1,hasProAccess:!1,loading:!0});if((0,ad.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 g=await p.json();s({isAuthenticated:!0,deviceValid:g.valid,hasProAccess:g.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,Ce.jsx)("div",{className:P("animate-pulse bg-gray-200 dark:bg-gray-800 rounded-lg h-32",o),children:(0,Ce.jsx)("div",{className:"flex items-center justify-center h-full",children:(0,Ce.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,Ce.jsxs)("div",{className:P("relative",o),children:[(0,Ce.jsx)("div",{className:"blur-sm grayscale-[0.3] opacity-60 pointer-events-none",children:n||e}),(0,Ce.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,Ce.jsxs)("div",{className:"text-center space-y-3 p-6",children:[(0,Ce.jsxs)(_r,{variant:"destructive",className:"mb-2",children:[(0,Ce.jsx)(Qu,{className:"w-3 h-3 mr-1"}),"CLI AUTH REQUIRED"]}),(0,Ce.jsx)("h3",{className:"font-semibold text-gray-900 dark:text-gray-100",children:"CLI Authentication Required"}),(0,Ce.jsx)("p",{className:"text-sm text-gray-600 dark:text-gray-400 max-w-xs",children:"Run the following command to authenticate:"}),(0,Ce.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,Ce.jsxs)("div",{className:P("relative",o),children:[(0,Ce.jsx)("div",{className:"blur-sm grayscale-[0.3] opacity-60 pointer-events-none",children:n||e}),(0,Ce.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,Ce.jsxs)("div",{className:"text-center space-y-3 p-6",children:[(0,Ce.jsxs)(_r,{variant:"secondary",className:"bg-yellow-500 text-white mb-2",children:[(0,Ce.jsx)(Zu,{className:"w-3 h-3 mr-1"}),"DEVICE LIMIT"]}),(0,Ce.jsx)("h3",{className:"font-semibold text-gray-900 dark:text-gray-100",children:"Device Limit Exceeded"}),(0,Ce.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,Ce.jsx)(Ee,{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,Ce.jsx)(gP,{componentName:r||t,className:o,children:n||e})}return(0,Ce.jsx)("div",{className:o,children:e})}function iU({className:e}){return(0,Ce.jsxs)(_r,{variant:"secondary",className:P("bg-gradient-to-r from-amber-500 to-orange-500 text-white border-0 text-xs",e),children:[(0,Ce.jsx)(Xu,{className:"w-3 h-3 mr-1"}),"PRO"]})}function sU({className:e}){return(0,Ce.jsx)(_r,{variant:"outline",className:P("border-green-500 text-green-600 dark:text-green-400 text-xs",e),children:"FREE"})}var lU=R(M());var Qt=R(N());function yy({className:e,variant:t="default",showText:r=!0,...o}){let n=lU.useId(),a=`moon-gradient-${n}`,i=`moon-mask-${n}`;return(0,Qt.jsxs)("div",{className:P("flex items-center gap-2",e),children:[(0,Qt.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,Qt.jsxs)("defs",{children:[t==="gradient"&&(0,Qt.jsxs)("linearGradient",{id:a,x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[(0,Qt.jsx)("stop",{offset:"0%",stopColor:"#3B82F6"}),(0,Qt.jsx)("stop",{offset:"50%",stopColor:"#8B5CF6"}),(0,Qt.jsx)("stop",{offset:"100%",stopColor:"#EC4899"})]}),(0,Qt.jsxs)("mask",{id:i,children:[(0,Qt.jsx)("rect",{width:"32",height:"32",fill:"white"}),(0,Qt.jsx)("circle",{cx:"22",cy:"10",r:"10",fill:"black"})]})]}),(0,Qt.jsx)("circle",{cx:"16",cy:"16",r:"14",fill:t==="gradient"?`url(#${a})`:"currentColor",className:t==="default"?"fill-primary":"",mask:`url(#${i})`})]}),r&&(0,Qt.jsxs)("span",{className:"text-xl font-bold",children:[(0,Qt.jsx)("span",{className:"text-foreground",children:"Moon"}),(0,Qt.jsx)("span",{className:"text-primary",children:"UI"})]})]})}function $Q({className:e,variant:t="default",...r}){return(0,Qt.jsx)(yy,{showText:!1,className:e,variant:t,...r})}function qQ({className:e,variant:t="default",showText:r=!0,...o}){return(0,Qt.jsx)(yy,{className:P("transition-all duration-300 hover:scale-105",e),variant:t,showText:r,...o})}var hP=R(M());var Gr=R(N()),vP=({className:e,...t})=>(0,Gr.jsx)("nav",{role:"navigation","aria-label":"pagination",className:P("moonui-theme","mx-auto flex w-full justify-center",e),...t});vP.displayName="Pagination";var xP=hP.forwardRef(({className:e,...t},r)=>(0,Gr.jsx)("ul",{ref:r,className:P("moonui-theme","flex flex-row items-center gap-1",e),...t}));xP.displayName="PaginationContent";var yP=hP.forwardRef(({className:e,...t},r)=>(0,Gr.jsx)("li",{ref:r,className:P("moonui-theme","",e),...t}));yP.displayName="PaginationItem";var Vm=({className:e,isActive:t,size:r="icon",...o})=>(0,Gr.jsx)("a",{"aria-current":t?"page":void 0,className:P(np({variant:t?"outline":"ghost",size:r}),e),...o});Vm.displayName="PaginationLink";var wP=({className:e,...t})=>(0,Gr.jsxs)(Vm,{"aria-label":"Go to previous page",size:"md",className:P("moonui-theme","gap-1 pl-2.5",e),...t,children:[(0,Gr.jsx)(bn,{className:"h-4 w-4"}),(0,Gr.jsx)("span",{children:"Previous"})]});wP.displayName="PaginationPrevious";var CP=({className:e,...t})=>(0,Gr.jsxs)(Vm,{"aria-label":"Go to next page",size:"md",className:P("moonui-theme","gap-1 pr-2.5",e),...t,children:[(0,Gr.jsx)("span",{children:"Next"}),(0,Gr.jsx)(Fr,{className:"h-4 w-4"})]});CP.displayName="PaginationNext";var SP=({className:e,...t})=>(0,Gr.jsxs)("span",{"aria-hidden":!0,className:P("moonui-theme","flex h-9 w-9 items-center justify-center",e),...t,children:[(0,Gr.jsx)(la,{className:"h-4 w-4"}),(0,Gr.jsx)("span",{className:"sr-only",children:"More pages"})]});SP.displayName="PaginationEllipsis";var Um=R(M());var Es=R(M());var Z=R(M(),1),MP=R(Va(),1);function bP(e,[t,r]){return Math.min(r,Math.max(t,e))}var uU=R(M(),1);var cU=R(N(),1),RP=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"}),KQ="VisuallyHidden",Bm=uU.forwardRef((e,t)=>(0,cU.jsx)(q.span,{...e,ref:t,style:{...RP,...e.style}}));Bm.displayName=KQ;var dU=Bm;var fe=R(N(),1),YQ=[" ","Enter","ArrowUp","ArrowDown"],QQ=[" ","Enter"],ru="Select",[Cy,Sy,ZQ]=Jn(ru),[id,PMe]=Fe(ru,[ZQ,Qo]),by=Qo(),[JQ,ks]=id(ru),[eZ,tZ]=id(ru),fU=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:g}=e,m=by(t),[x,h]=Z.useState(null),[v,y]=Z.useState(null),[w,C]=Z.useState(!1),b=ia(u),[S,I]=qe({prop:o,defaultProp:n??!1,onChange:a,caller:ru}),[L,T]=qe({prop:i,defaultProp:s,onChange:l,caller:ru}),k=Z.useRef(null),E=x?g||!!x.closest("form"):!0,[_,D]=Z.useState(new Set),z=Array.from(_).map(F=>F.props.value).join(";");return(0,fe.jsx)(ai,{...m,children:(0,fe.jsxs)(JQ,{required:p,scope:t,trigger:x,onTriggerChange:h,valueNode:v,onValueNodeChange:y,valueNodeHasChildren:w,onValueNodeHasChildrenChange:C,contentId:Ne(),value:L,onValueChange:T,open:S,onOpenChange:I,dir:b,triggerPointerDownPosRef:k,disabled:f,children:[(0,fe.jsx)(Cy.Provider,{scope:t,children:(0,fe.jsx)(eZ,{scope:e.__scopeSelect,onNativeOptionAdd:Z.useCallback(F=>{D(O=>new Set(O).add(F))},[]),onNativeOptionRemove:Z.useCallback(F=>{D(O=>{let B=new Set(O);return B.delete(F),B})},[]),children:r})}),E?(0,fe.jsxs)(_U,{"aria-hidden":!0,required:p,tabIndex:-1,name:c,autoComplete:d,value:L,onChange:F=>T(F.target.value),disabled:f,form:g,children:[L===void 0?(0,fe.jsx)("option",{value:""}):null,Array.from(_)]},z):null]})})};fU.displayName=ru;var pU="SelectTrigger",mU=Z.forwardRef((e,t)=>{let{__scopeSelect:r,disabled:o=!1,...n}=e,a=by(r),i=ks(pU,r),s=i.disabled||o,l=de(t,i.onTriggerChange),u=Sy(r),c=Z.useRef("touch"),[d,f,p]=BU(m=>{let x=u().filter(y=>!y.disabled),h=x.find(y=>y.value===i.value),v=HU(x,m,h);v!==void 0&&i.onValueChange(v.value)}),g=m=>{s||(i.onOpenChange(!0),p()),m&&(i.triggerPointerDownPosRef.current={x:Math.round(m.pageX),y:Math.round(m.pageY)})};return(0,fe.jsx)(ii,{asChild:!0,...a,children:(0,fe.jsx)(q.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":VU(i.value)?"":void 0,...n,ref:l,onClick:W(n.onClick,m=>{m.currentTarget.focus(),c.current!=="mouse"&&g(m)}),onPointerDown:W(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"&&(g(m),m.preventDefault())}),onKeyDown:W(n.onKeyDown,m=>{let x=d.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&f(m.key),!(x&&m.key===" ")&&YQ.includes(m.key)&&(g(),m.preventDefault())})})})});mU.displayName=pU;var gU="SelectValue",hU=Z.forwardRef((e,t)=>{let{__scopeSelect:r,className:o,style:n,children:a,placeholder:i="",...s}=e,l=ks(gU,r),{onValueNodeHasChildrenChange:u}=l,c=a!==void 0,d=de(t,l.onValueNodeChange);return Ve(()=>{u(c)},[u,c]),(0,fe.jsx)(q.span,{...s,ref:d,style:{pointerEvents:"none"},children:VU(l.value)?(0,fe.jsx)(fe.Fragment,{children:i}):a})});hU.displayName=gU;var rZ="SelectIcon",vU=Z.forwardRef((e,t)=>{let{__scopeSelect:r,children:o,...n}=e;return(0,fe.jsx)(q.span,{"aria-hidden":!0,...n,ref:t,children:o||"\u25BC"})});vU.displayName=rZ;var oZ="SelectPortal",xU=e=>(0,fe.jsx)(Ro,{asChild:!0,...e});xU.displayName=oZ;var ou="SelectContent",yU=Z.forwardRef((e,t)=>{let r=ks(ou,e.__scopeSelect),[o,n]=Z.useState();if(Ve(()=>{n(new DocumentFragment)},[]),!r.open){let a=o;return a?MP.createPortal((0,fe.jsx)(wU,{scope:e.__scopeSelect,children:(0,fe.jsx)(Cy.Slot,{scope:e.__scopeSelect,children:(0,fe.jsx)("div",{children:e.children})})}),a):null}return(0,fe.jsx)(CU,{...e,ref:t})});yU.displayName=ou;var zn=10,[wU,Ms]=id(ou),nZ="SelectContentImpl",aZ=co("SelectContent.RemoveScroll"),CU=Z.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:g,hideWhenDetached:m,avoidCollisions:x,...h}=e,v=ks(ou,r),[y,w]=Z.useState(null),[C,b]=Z.useState(null),S=de(t,U=>w(U)),[I,L]=Z.useState(null),[T,k]=Z.useState(null),E=Sy(r),[_,D]=Z.useState(!1),z=Z.useRef(!1);Z.useEffect(()=>{if(y)return xs(y)},[y]),ps();let F=Z.useCallback(U=>{let[ne,...he]=E().map(X=>X.ref.current),[xe]=he.slice(-1),pe=document.activeElement;for(let X of U)if(X===pe||(X?.scrollIntoView({block:"nearest"}),X===ne&&C&&(C.scrollTop=0),X===xe&&C&&(C.scrollTop=C.scrollHeight),X?.focus(),document.activeElement!==pe))return},[E,C]),O=Z.useCallback(()=>F([I,y]),[F,I,y]);Z.useEffect(()=>{_&&O()},[_,O]);let{onOpenChange:B,triggerPointerDownPosRef:A}=v;Z.useEffect(()=>{if(y){let U={x:0,y:0},ne=xe=>{U={x:Math.abs(Math.round(xe.pageX)-(A.current?.x??0)),y:Math.abs(Math.round(xe.pageY)-(A.current?.y??0))}},he=xe=>{U.x<=10&&U.y<=10?xe.preventDefault():y.contains(xe.target)||B(!1),document.removeEventListener("pointermove",ne),A.current=null};return A.current!==null&&(document.addEventListener("pointermove",ne),document.addEventListener("pointerup",he,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ne),document.removeEventListener("pointerup",he,{capture:!0})}}},[y,B,A]),Z.useEffect(()=>{let U=()=>B(!1);return window.addEventListener("blur",U),window.addEventListener("resize",U),()=>{window.removeEventListener("blur",U),window.removeEventListener("resize",U)}},[B]);let[te,ae]=BU(U=>{let ne=E().filter(pe=>!pe.disabled),he=ne.find(pe=>pe.ref.current===document.activeElement),xe=HU(ne,U,he);xe&&setTimeout(()=>xe.ref.current.focus())}),V=Z.useCallback((U,ne,he)=>{let xe=!z.current&&!he;(v.value!==void 0&&v.value===ne||xe)&&(L(U),xe&&(z.current=!0))},[v.value]),Q=Z.useCallback(()=>y?.focus(),[y]),re=Z.useCallback((U,ne,he)=>{let xe=!z.current&&!he;(v.value!==void 0&&v.value===ne||xe)&&k(U)},[v.value]),Y=o==="popper"?IP:SU,ce=Y===IP?{side:s,sideOffset:l,align:u,alignOffset:c,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:g,hideWhenDetached:m,avoidCollisions:x}:{};return(0,fe.jsx)(wU,{scope:r,content:y,viewport:C,onViewportChange:b,itemRefCallback:V,selectedItem:I,onItemLeave:Q,itemTextRefCallback:re,focusSelectedItem:O,selectedItemText:T,position:o,isPositioned:_,searchRef:te,children:(0,fe.jsx)(si,{as:aZ,allowPinchZoom:!0,children:(0,fe.jsx)(oi,{asChild:!0,trapped:v.open,onMountAutoFocus:U=>{U.preventDefault()},onUnmountAutoFocus:W(n,U=>{v.trigger?.focus({preventScroll:!0}),U.preventDefault()}),children:(0,fe.jsx)(qo,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:U=>U.preventDefault(),onDismiss:()=>v.onOpenChange(!1),children:(0,fe.jsx)(Y,{role:"listbox",id:v.contentId,"data-state":v.open?"open":"closed",dir:v.dir,onContextMenu:U=>U.preventDefault(),...h,...ce,onPlaced:()=>D(!0),ref:S,style:{display:"flex",flexDirection:"column",outline:"none",...h.style},onKeyDown:W(h.onKeyDown,U=>{let ne=U.ctrlKey||U.altKey||U.metaKey;if(U.key==="Tab"&&U.preventDefault(),!ne&&U.key.length===1&&ae(U.key),["ArrowUp","ArrowDown","Home","End"].includes(U.key)){let xe=E().filter(pe=>!pe.disabled).map(pe=>pe.ref.current);if(["ArrowUp","End"].includes(U.key)&&(xe=xe.slice().reverse()),["ArrowUp","ArrowDown"].includes(U.key)){let pe=U.target,X=xe.indexOf(pe);xe=xe.slice(X+1)}setTimeout(()=>F(xe)),U.preventDefault()}})})})})})})});CU.displayName=nZ;var iZ="SelectItemAlignedPosition",SU=Z.forwardRef((e,t)=>{let{__scopeSelect:r,onPlaced:o,...n}=e,a=ks(ou,r),i=Ms(ou,r),[s,l]=Z.useState(null),[u,c]=Z.useState(null),d=de(t,S=>c(S)),f=Sy(r),p=Z.useRef(!1),g=Z.useRef(!0),{viewport:m,selectedItem:x,selectedItemText:h,focusSelectedItem:v}=i,y=Z.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&u&&m&&x&&h){let S=a.trigger.getBoundingClientRect(),I=u.getBoundingClientRect(),L=a.valueNode.getBoundingClientRect(),T=h.getBoundingClientRect();if(a.dir!=="rtl"){let pe=T.left-I.left,X=L.left-pe,Ie=S.left-X,J=S.width+Ie,ie=Math.max(J,I.width),Ge=window.innerWidth-zn,Xe=bP(X,[zn,Math.max(zn,Ge-ie)]);s.style.minWidth=J+"px",s.style.left=Xe+"px"}else{let pe=I.right-T.right,X=window.innerWidth-L.right-pe,Ie=window.innerWidth-S.right-X,J=S.width+Ie,ie=Math.max(J,I.width),Ge=window.innerWidth-zn,Xe=bP(X,[zn,Math.max(zn,Ge-ie)]);s.style.minWidth=J+"px",s.style.right=Xe+"px"}let k=f(),E=window.innerHeight-zn*2,_=m.scrollHeight,D=window.getComputedStyle(u),z=parseInt(D.borderTopWidth,10),F=parseInt(D.paddingTop,10),O=parseInt(D.borderBottomWidth,10),B=parseInt(D.paddingBottom,10),A=z+F+_+B+O,te=Math.min(x.offsetHeight*5,A),ae=window.getComputedStyle(m),V=parseInt(ae.paddingTop,10),Q=parseInt(ae.paddingBottom,10),re=S.top+S.height/2-zn,Y=E-re,ce=x.offsetHeight/2,U=x.offsetTop+ce,ne=z+F+U,he=A-ne;if(ne<=re){let pe=k.length>0&&x===k[k.length-1].ref.current;s.style.bottom="0px";let X=u.clientHeight-m.offsetTop-m.offsetHeight,Ie=Math.max(Y,ce+(pe?Q:0)+X+O),J=ne+Ie;s.style.height=J+"px"}else{let pe=k.length>0&&x===k[0].ref.current;s.style.top="0px";let Ie=Math.max(re,z+m.offsetTop+(pe?V:0)+ce)+he;s.style.height=Ie+"px",m.scrollTop=ne-re+m.offsetTop}s.style.margin=`${zn}px 0`,s.style.minHeight=te+"px",s.style.maxHeight=E+"px",o?.(),requestAnimationFrame(()=>p.current=!0)}},[f,a.trigger,a.valueNode,s,u,m,x,h,a.dir,o]);Ve(()=>y(),[y]);let[w,C]=Z.useState();Ve(()=>{u&&C(window.getComputedStyle(u).zIndex)},[u]);let b=Z.useCallback(S=>{S&&g.current===!0&&(y(),v?.(),g.current=!1)},[y,v]);return(0,fe.jsx)(lZ,{scope:r,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:b,children:(0,fe.jsx)("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:w},children:(0,fe.jsx)(q.div,{...n,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...n.style}})})})});SU.displayName=iZ;var sZ="SelectPopperPosition",IP=Z.forwardRef((e,t)=>{let{__scopeSelect:r,align:o="start",collisionPadding:n=zn,...a}=e,i=by(r);return(0,fe.jsx)(hs,{...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)"}})});IP.displayName=sZ;var[lZ,EP]=id(ou,{}),PP="SelectViewport",bU=Z.forwardRef((e,t)=>{let{__scopeSelect:r,nonce:o,...n}=e,a=Ms(PP,r),i=EP(PP,r),s=de(t,a.onViewportChange),l=Z.useRef(0);return(0,fe.jsxs)(fe.Fragment,{children:[(0,fe.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,fe.jsx)(Cy.Slot,{scope:r,children:(0,fe.jsx)(q.div,{"data-radix-select-viewport":"",role:"presentation",...n,ref:s,style:{position:"relative",flex:1,overflow:"hidden auto",...n.style},onScroll:W(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 g=window.innerHeight-zn*2,m=parseFloat(d.style.minHeight),x=parseFloat(d.style.height),h=Math.max(m,x);if(h<g){let v=h+p,y=Math.min(g,v),w=v-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})})})]})});bU.displayName=PP;var RU="SelectGroup",[uZ,cZ]=id(RU),IU=Z.forwardRef((e,t)=>{let{__scopeSelect:r,...o}=e,n=Ne();return(0,fe.jsx)(uZ,{scope:r,id:n,children:(0,fe.jsx)(q.div,{role:"group","aria-labelledby":n,...o,ref:t})})});IU.displayName=RU;var PU="SelectLabel",LU=Z.forwardRef((e,t)=>{let{__scopeSelect:r,...o}=e,n=cZ(PU,r);return(0,fe.jsx)(q.div,{id:n.id,...o,ref:t})});LU.displayName=PU;var wy="SelectItem",[dZ,TU]=id(wy),kU=Z.forwardRef((e,t)=>{let{__scopeSelect:r,value:o,disabled:n=!1,textValue:a,...i}=e,s=ks(wy,r),l=Ms(wy,r),u=s.value===o,[c,d]=Z.useState(a??""),[f,p]=Z.useState(!1),g=de(t,v=>l.itemRefCallback?.(v,o,n)),m=Ne(),x=Z.useRef("touch"),h=()=>{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,fe.jsx)(dZ,{scope:r,value:o,disabled:n,textId:m,isSelected:u,onItemTextChange:Z.useCallback(v=>{d(y=>y||(v?.textContent??"").trim())},[]),children:(0,fe.jsx)(Cy.ItemSlot,{scope:r,value:o,disabled:n,textValue:c,children:(0,fe.jsx)(q.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:g,onFocus:W(i.onFocus,()=>p(!0)),onBlur:W(i.onBlur,()=>p(!1)),onClick:W(i.onClick,()=>{x.current!=="mouse"&&h()}),onPointerUp:W(i.onPointerUp,()=>{x.current==="mouse"&&h()}),onPointerDown:W(i.onPointerDown,v=>{x.current=v.pointerType}),onPointerMove:W(i.onPointerMove,v=>{x.current=v.pointerType,n?l.onItemLeave?.():x.current==="mouse"&&v.currentTarget.focus({preventScroll:!0})}),onPointerLeave:W(i.onPointerLeave,v=>{v.currentTarget===document.activeElement&&l.onItemLeave?.()}),onKeyDown:W(i.onKeyDown,v=>{l.searchRef?.current!==""&&v.key===" "||(QQ.includes(v.key)&&h(),v.key===" "&&v.preventDefault())})})})})});kU.displayName=wy;var Hm="SelectItemText",MU=Z.forwardRef((e,t)=>{let{__scopeSelect:r,className:o,style:n,...a}=e,i=ks(Hm,r),s=Ms(Hm,r),l=TU(Hm,r),u=tZ(Hm,r),[c,d]=Z.useState(null),f=de(t,h=>d(h),l.onItemTextChange,h=>s.itemTextRefCallback?.(h,l.value,l.disabled)),p=c?.textContent,g=Z.useMemo(()=>(0,fe.jsx)("option",{value:l.value,disabled:l.disabled,children:p},l.value),[l.disabled,l.value,p]),{onNativeOptionAdd:m,onNativeOptionRemove:x}=u;return Ve(()=>(m(g),()=>x(g)),[m,x,g]),(0,fe.jsxs)(fe.Fragment,{children:[(0,fe.jsx)(q.span,{id:l.textId,...a,ref:f}),l.isSelected&&i.valueNode&&!i.valueNodeHasChildren?MP.createPortal(a.children,i.valueNode):null]})});MU.displayName=Hm;var EU="SelectItemIndicator",AU=Z.forwardRef((e,t)=>{let{__scopeSelect:r,...o}=e;return TU(EU,r).isSelected?(0,fe.jsx)(q.span,{"aria-hidden":!0,...o,ref:t}):null});AU.displayName=EU;var LP="SelectScrollUpButton",DU=Z.forwardRef((e,t)=>{let r=Ms(LP,e.__scopeSelect),o=EP(LP,e.__scopeSelect),[n,a]=Z.useState(!1),i=de(t,o.onScrollButtonChange);return Ve(()=>{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,fe.jsx)(OU,{...e,ref:i,onAutoScroll:()=>{let{viewport:s,selectedItem:l}=r;s&&l&&(s.scrollTop=s.scrollTop-l.offsetHeight)}}):null});DU.displayName=LP;var TP="SelectScrollDownButton",NU=Z.forwardRef((e,t)=>{let r=Ms(TP,e.__scopeSelect),o=EP(TP,e.__scopeSelect),[n,a]=Z.useState(!1),i=de(t,o.onScrollButtonChange);return Ve(()=>{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,fe.jsx)(OU,{...e,ref:i,onAutoScroll:()=>{let{viewport:s,selectedItem:l}=r;s&&l&&(s.scrollTop=s.scrollTop+l.offsetHeight)}}):null});NU.displayName=TP;var OU=Z.forwardRef((e,t)=>{let{__scopeSelect:r,onAutoScroll:o,...n}=e,a=Ms("SelectScrollButton",r),i=Z.useRef(null),s=Sy(r),l=Z.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return Z.useEffect(()=>()=>l(),[l]),Ve(()=>{s().find(c=>c.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[s]),(0,fe.jsx)(q.div,{"aria-hidden":!0,...n,ref:t,style:{flexShrink:0,...n.style},onPointerDown:W(n.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(o,50))}),onPointerMove:W(n.onPointerMove,()=>{a.onItemLeave?.(),i.current===null&&(i.current=window.setInterval(o,50))}),onPointerLeave:W(n.onPointerLeave,()=>{l()})})}),fZ="SelectSeparator",FU=Z.forwardRef((e,t)=>{let{__scopeSelect:r,...o}=e;return(0,fe.jsx)(q.div,{"aria-hidden":!0,...o,ref:t})});FU.displayName=fZ;var kP="SelectArrow",pZ=Z.forwardRef((e,t)=>{let{__scopeSelect:r,...o}=e,n=by(r),a=ks(kP,r),i=Ms(kP,r);return a.open&&i.position==="popper"?(0,fe.jsx)(vs,{...n,...o,ref:t}):null});pZ.displayName=kP;var mZ="SelectBubbleInput",_U=Z.forwardRef(({__scopeSelect:e,value:t,...r},o)=>{let n=Z.useRef(null),a=de(o,n),i=Gc(t);return Z.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,fe.jsx)(q.select,{...r,style:{...RP,...r.style},ref:a,defaultValue:t})});_U.displayName=mZ;function VU(e){return e===""||e===void 0}function BU(e){let t=nt(e),r=Z.useRef(""),o=Z.useRef(0),n=Z.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=Z.useCallback(()=>{r.current="",window.clearTimeout(o.current)},[]);return Z.useEffect(()=>()=>window.clearTimeout(o.current),[]),[r,n,a]}function HU(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=gZ(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 gZ(e,t){return e.map((r,o)=>e[(t+o)%e.length])}var UU=fU,AP=mU,zU=hU,GU=vU,WU=xU,DP=yU,jU=bU,$U=IU,NP=LU,OP=kU,qU=MU,KU=AU,FP=DU,_P=NU,VP=FU;var $e=R(N()),nu=UU;nu.displayName="Select";var XU=$U,sd=zU,vZ=K(["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 text-foreground"],{variants:{variant:{standard:"border border-input bg-background hover:border-ring focus-visible:ring-2 focus-visible:ring-primary/30 focus-visible:border-primary",outline:"border border-input bg-transparent hover:border-ring focus-visible:ring-2 focus-visible:ring-primary/30 focus-visible:border-primary",ghost:"border-none bg-muted hover:bg-muted/80 focus-visible:ring-2 focus-visible:ring-primary/30",underline:"border-t-0 border-l-0 border-r-0 border-b border-input rounded-none px-0 bg-transparent hover:border-ring focus-visible:ring-0 focus-visible:border-b-2 focus-visible:border-primary"},size:{sm:"h-8 text-xs px-2",md:"h-10 text-sm px-3",lg:"h-12 text-base px-4"},state:{none:"",error:"border-error focus-visible:ring-error/30 focus-visible:border-error",success:"border-success focus-visible:ring-success/30 focus-visible:border-success"}},defaultVariants:{variant:"standard",size:"md",state:"none"}}),au=Es.forwardRef(({className:e,children:t,variant:r,size:o,error:n,success:a,loading:i,leftIcon:s,rightIcon:l,...u},c)=>(0,$e.jsxs)(AP,{ref:c,className:P(vZ({variant:r,size:o,state:n?"error":a?"success":"none"}),e),...u,disabled:u.disabled||i,"aria-invalid":n?!0:void 0,"data-error":n?!0:void 0,"data-success":a?!0:void 0,"data-loading":i?!0:void 0,children:[(0,$e.jsxs)("div",{className:"flex items-center flex-1 gap-2",children:[s&&(0,$e.jsx)("span",{className:"flex items-center justify-center text-muted-foreground",children:s}),i?(0,$e.jsxs)("div",{className:"flex items-center gap-2",children:[(0,$e.jsx)(Bt,{className:"h-3.5 w-3.5 animate-spin text-muted-foreground"}),(0,$e.jsx)("span",{className:"text-muted-foreground",children:"Loading..."})]}):t]}),!i&&(0,$e.jsx)(GU,{asChild:!0,children:l?(0,$e.jsx)("span",{className:"opacity-60",children:l}):(0,$e.jsx)(sa,{className:"h-4 w-4 opacity-60 transition-transform duration-200 ease-out group-data-[state=open]:rotate-180"})})]}));au.displayName=AP.displayName;var Ry=Es.forwardRef(({className:e,...t},r)=>(0,$e.jsx)(FP,{ref:r,className:P("flex cursor-default items-center justify-center py-1 text-muted-foreground hover:text-foreground transition-colors",e),...t,children:(0,$e.jsx)(Mf,{className:"h-4 w-4"})}));Ry.displayName=FP.displayName;var Iy=Es.forwardRef(({className:e,...t},r)=>(0,$e.jsx)(_P,{ref:r,className:P("flex cursor-default items-center justify-center py-1 text-muted-foreground hover:text-foreground transition-colors",e),...t,children:(0,$e.jsx)(sa,{className:"h-4 w-4"})}));Iy.displayName=_P.displayName;var iu=Es.forwardRef(({className:e,children:t,position:r="popper",side:o="bottom",sideOffset:n=4,align:a="start",...i},s)=>(0,$e.jsx)(WU,{children:(0,$e.jsxs)(DP,{ref:s,side:o,sideOffset:n,align:a,avoidCollisions:!1,className:P(["relative z-50 max-h-96 min-w-[8rem] overflow-hidden","rounded-md border border-gray-200 dark:border-gray-700","bg-background dark:bg-gray-800/80 backdrop-blur-sm text-foreground dark:text-gray-200","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,$e.jsx)(Ry,{}),(0,$e.jsx)(jU,{className:P("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),(0,$e.jsx)(Iy,{})]})}));iu.displayName=DP.displayName;var BP=Es.forwardRef(({className:e,...t},r)=>(0,$e.jsx)(NP,{ref:r,className:P("moonui-theme","py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));BP.displayName=NP.displayName;var kr=Es.forwardRef(({className:e,children:t,variant:r="default",size:o="md",rightIcon:n,customIndicator:a,...i},s)=>(0,$e.jsxs)(OP,{ref:s,className:P("moonui-theme","relative flex w-full cursor-default select-none items-center rounded-sm outline-none","data-[disabled]:pointer-events-none data-[disabled]:opacity-50","transition-colors duration-150",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,$e.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,$e.jsx)(KU,{children:a||(0,$e.jsx)(xr,{className:"h-4 w-4"})})}),(0,$e.jsx)(qU,{children:t}),n&&(0,$e.jsx)("span",{className:"ml-auto pl-2 opacity-70",children:n})]}));kr.displayName=OP.displayName;var HP=Es.forwardRef(({className:e,...t},r)=>(0,$e.jsx)(VP,{ref:r,className:P("moonui-theme","-mx-1 my-1 h-px bg-muted dark:bg-gray-700",e),...t}));HP.displayName=VP.displayName;var Zt=R(N()),xZ=[{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"}],YU=(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}},yZ=e=>{switch(e){case"+1":return 10;case"+44":return 11;case"+90":return 10;default:return 15}},UP=Um.forwardRef(({className:e,value:t="",onChange:r,defaultCountry:o="+1",showIcon:n=!0,showCountrySelect:a=!0,countries:i=xZ,size:s,...l},u)=>{let[c,d]=Um.useState(o),[f,p]=Um.useState(t),g=i.find(v=>v.code===c)||i[0],m=v=>{let y=v.target.value.replace(/\D/g,""),w=yZ(c),C=y.slice(0,w),b=YU(C,c);p(C),r?.(C,c),v.target.value=b},x=v=>{d(v),r?.(f,v)},h=YU(f,c);return(0,Zt.jsxs)("div",{className:P("relative flex gap-2",e),children:[a&&(0,Zt.jsxs)(nu,{value:c,onValueChange:x,children:[(0,Zt.jsx)(au,{className:"w-[120px]",children:(0,Zt.jsx)(sd,{children:(0,Zt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Zt.jsx)("span",{children:g.flag}),(0,Zt.jsx)("span",{children:g.code})]})})}),(0,Zt.jsx)(iu,{children:i.map(v=>(0,Zt.jsx)(kr,{value:v.code,children:(0,Zt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Zt.jsx)("span",{children:v.flag}),(0,Zt.jsx)("span",{children:v.code}),(0,Zt.jsx)("span",{className:"text-muted-foreground",children:v.name})]})},v.code))})]}),(0,Zt.jsxs)("div",{className:"relative flex-1",children:[(0,Zt.jsx)(ur,{ref:u,type:"tel",inputMode:"numeric",autoComplete:"tel",placeholder:c==="+1"?"(555) 123-4567":"123 456 789",value:h,onChange:m,className:P(n&&"pl-10",e),...l}),n&&(0,Zt.jsx)($f,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"})]})]})});UP.displayName="PhoneInput";var Mr=R(M());var Lo=R(N()),wZ=K("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"}}),QU=Mr.createContext({}),zP=Mr.forwardRef(({className:e,value:t,defaultValue:r,onValueChange:o,disabled:n,name:a,...i},s)=>{let[l,u]=Mr.useState(r),c=t!==void 0,d=c?t:l,f=Mr.useCallback(p=>{c||u(p),o?.(p)},[c,o]);return(0,Lo.jsx)(QU.Provider,{value:{value:d,onValueChange:f,disabled:n,name:a},children:(0,Lo.jsx)("div",{ref:s,role:"radiogroup",className:P("moonui-theme","grid gap-2",e),...i})})});zP.displayName="RadioGroup";var Py=Mr.forwardRef(({className:e,variant:t,size:r,indicator:o,id:n,value:a,disabled:i,...s},l)=>{let u=Mr.useContext(QU),c=Mr.useId(),d=n||c,f=u.value===a,p=g=>{u.onValueChange&&u.onValueChange(g.target.value),s.onChange&&s.onChange(g)};return(0,Lo.jsxs)("div",{className:"relative flex items-center",children:[(0,Lo.jsx)("input",{type:"radio",id:d,ref:l,value:a,checked:f,disabled:i||u.disabled,name:u.name,onChange:p,className:"peer sr-only",...s}),(0,Lo.jsx)("label",{htmlFor:d,className:P(wZ({variant:t,size:r}),"rounded-full","peer-focus-visible:ring-2 peer-focus-visible:ring-offset-2 peer-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,Lo.jsx)("span",{className:P("absolute inset-0 pointer-events-none",f&&"flex items-center justify-center"),children:f&&(o||(0,Lo.jsx)(nl,{className:"h-[60%] w-[60%] fill-current text-current"}))})})]})});Py.displayName="RadioGroupItem";var Ly=Mr.forwardRef(({className:e,htmlFor:t,children:r,disabled:o=!1,...n},a)=>(0,Lo.jsx)("label",{ref:a,htmlFor:t,className:P("text-sm font-medium leading-none ml-2 text-foreground",o&&"cursor-not-allowed opacity-70",e),...n,children:r}));Ly.displayName="RadioLabel";var GP=Mr.forwardRef(({id:e,label:t,labelClassName:r,...o},n)=>{let a=Mr.useId(),i=e||a;return(0,Lo.jsxs)("div",{className:"flex items-center",children:[(0,Lo.jsx)(Py,{ref:n,id:i,...o}),(0,Lo.jsx)(Ly,{htmlFor:i,disabled:o.disabled,className:r,children:t})]})});GP.displayName="RadioItemWithLabel";var gi=R(N());function ZU({value:e="",onChange:t,placeholder:r="Start typing...",className:o,disabled:n=!1}){let a=i=>{!n&&t&&t(i.target.value)};return(0,gi.jsxs)("div",{className:P("border border-input rounded-md",o),children:[(0,gi.jsx)("div",{className:"border-b border-border p-2 bg-muted/50",children:(0,gi.jsxs)("div",{className:"flex gap-1",children:[(0,gi.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,gi.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,gi.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,gi.jsx)("textarea",{value:e,onChange:a,placeholder:r,disabled:n,className:P("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 XP=R(M());var se=R(M(),1);var o3=R(M(),1),EZ=R(Va(),1);var cr=R(M(),1);var e3=R(M(),1);function JU(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function CZ(...e){return t=>{let r=!1,o=e.map(n=>{let a=JU(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():JU(e[n],null)}}}}function hi(...e){return e3.useCallback(CZ(...e),e)}function r3(e){let t=cr.forwardRef((r,o)=>{let{children:n,...a}=r,i=null,s=!1,l=[];t3(n)&&typeof Ty=="function"&&(n=Ty(n._payload)),cr.Children.forEach(n,f=>{if(PZ(f)){s=!0;let p=f,g="child"in p.props?p.props.child:p.props.children;t3(g)&&typeof Ty=="function"&&(g=Ty(g._payload)),i=bZ(p,g),l.push(i?.props?.children)}else l.push(f)}),i?i=cr.cloneElement(i,void 0,l):!s&&cr.Children.count(n)===1&&cr.isValidElement(n)&&(i=n);let u=i?IZ(i):void 0,c=hi(o,u);if(!i){if(n||n===0)throw new Error(s?MZ(e):kZ(e));return n}let d=RZ(a,i.props??{});return i.type!==cr.Fragment&&(d.ref=o?c:u),cr.cloneElement(i,d)});return t.displayName=`${e}.Slot`,t}var SZ=Symbol.for("radix.slottable");var bZ=(e,t)=>{if("child"in e.props){let r=e.props.child;return cr.isValidElement(r)?cr.cloneElement(r,void 0,e.props.children(r.props.children)):null}return cr.isValidElement(t)?t:null};function RZ(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 IZ(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)}function PZ(e){return cr.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===SZ}var LZ=Symbol.for("react.lazy");function t3(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===LZ&&"_payload"in e&&TZ(e._payload)}function TZ(e){return typeof e=="object"&&e!==null&&"then"in e}var kZ=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,MZ=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,Ty=cr[" use ".trim().toString()];var n3=R(N(),1),AZ=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ld=AZ.reduce((e,t)=>{let r=r3(`Primitive.${t}`),o=o3.forwardRef((n,a)=>{let{asChild:i,...s}=n,l=i?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,n3.jsx)(l,{...s,ref:a})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});var dr=R(M(),1);var a3=R(M(),1),zm=globalThis?.document?a3.useLayoutEffect:()=>{};var s3=R(M(),1);function DZ(e,t){return s3.useReducer((r,o)=>t[r][o]??r,e)}var ud=e=>{let{present:t,children:r}=e,o=NZ(t),n=typeof r=="function"?r({present:o.isPresent}):dr.Children.only(r),a=OZ(o.ref,FZ(n));return typeof r=="function"||o.isPresent?dr.cloneElement(n,{ref:a}):null};ud.displayName="Presence";function NZ(e){let[t,r]=dr.useState(),o=dr.useRef(null),n=dr.useRef(e),a=dr.useRef("none"),i=dr.useRef(void 0),s=e?"mounted":"unmounted",[l,u]=DZ(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return dr.useEffect(()=>{l==="mounted"?(a.current=i.current??Gm(o.current),i.current=void 0):a.current="none"},[l]),zm(()=>{let c=o.current,d=n.current;if(d!==e){let p=a.current,g=Gm(c);e?(i.current=g,u("MOUNT")):g==="none"||c?.display==="none"?u("UNMOUNT"):u(d&&p!==g?"ANIMATION_OUT":"UNMOUNT"),n.current=e}},[e,u]),zm(()=>{if(t){let c,d=t.ownerDocument.defaultView??window,f=g=>{let x=Gm(o.current).includes(CSS.escape(g.animationName));if(g.target===t&&x&&(u("ANIMATION_END"),!n.current)){let h=t.style.animationFillMode;t.style.animationFillMode="forwards",c=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=h)})}},p=g=>{g.target===t&&(a.current=Gm(o.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{d.clearTimeout(c),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:dr.useCallback(c=>{if(c){let d=getComputedStyle(c);o.current=d,i.current=Gm(d)}else o.current=null;r(c)},[])}}function i3(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function OZ(...e){let t=dr.useRef(e);return t.current=e,dr.useCallback(r=>{let o=t.current,n=!1,a=o.map(i=>{let s=i3(i,r);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let i=0;i<a.length;i++){let s=a[i];typeof s=="function"?s():i3(o[i],null)}}},[])}function Gm(e){return e?.animationName||"none"}function FZ(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 vi=R(M(),1),l3=R(N(),1);function u3(e,t=[]){let r=[];function o(a,i){let s=vi.createContext(i);s.displayName=a+"Context";let l=r.length;r=[...r,i];let u=d=>{let{scope:f,children:p,...g}=d,m=f?.[e]?.[l]||s,x=vi.useMemo(()=>g,Object.values(g));return(0,l3.jsx)(m.Provider,{value:x,children:p})};u.displayName=a+"Provider";function c(d,f,p={}){let{optional:g=!1}=p,m=f?.[e]?.[l]||s,x=vi.useContext(m);if(x)return x;if(i!==void 0)return i;if(!g)throw new Error(`\`${d}\` must be used within \`${a}\``)}return[u,c]}let n=()=>{let a=r.map(i=>vi.createContext(i));return function(s){let l=s?.[e]||a;return vi.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return n.scopeName=e,[o,_Z(n,...t)]}function _Z(...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 vi.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return r.scopeName=t.scopeName,r}var cd=R(M(),1);function As(e){let t=cd.useRef(e);return cd.useEffect(()=>{t.current=e}),cd.useMemo(()=>(...r)=>t.current?.(...r),[])}var ky=R(M(),1),VZ=R(N(),1),BZ=ky.createContext(void 0);function c3(e){let t=ky.useContext(BZ);return e||t||"ltr"}function d3(e,[t,r]){return Math.min(r,Math.max(t,e))}var eEe=!!(typeof window<"u"&&window.document&&window.document.createElement);function Ds(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(e?.(n),r===!1||!n||!n.defaultPrevented)return t?.(n)}}var p3=R(M(),1),_e=R(N(),1);function HZ(e,t){return p3.useReducer((r,o)=>t[r][o]??r,e)}var WP="ScrollArea",[m3,dEe]=u3(WP),[UZ,en]=m3(WP),g3=se.forwardRef((e,t)=>{let{__scopeScrollArea:r,type:o="hover",dir:n,scrollHideDelay:a=600,...i}=e,[s,l]=se.useState(null),[u,c]=se.useState(null),[d,f]=se.useState(null),[p,g]=se.useState(null),[m,x]=se.useState(null),[h,v]=se.useState(0),[y,w]=se.useState(0),[C,b]=se.useState(!1),[S,I]=se.useState(!1),L=hi(t,l),T=c3(n);return(0,_e.jsx)(UZ,{scope:r,type:o,dir:T,scrollHideDelay:a,scrollArea:s,viewport:u,onViewportChange:c,content:d,onContentChange:f,scrollbarX:p,onScrollbarXChange:g,scrollbarXEnabled:C,onScrollbarXEnabledChange:b,scrollbarY:m,onScrollbarYChange:x,scrollbarYEnabled:S,onScrollbarYEnabledChange:I,onCornerWidthChange:v,onCornerHeightChange:w,children:(0,_e.jsx)(ld.div,{dir:T,...i,ref:L,style:{position:"relative","--radix-scroll-area-corner-width":h+"px","--radix-scroll-area-corner-height":y+"px",...e.style}})})});g3.displayName=WP;var h3="ScrollAreaViewport",v3=se.forwardRef((e,t)=>{let{__scopeScrollArea:r,children:o,nonce:n,...a}=e,i=en(h3,r),s=se.useRef(null),l=hi(t,s,i.onViewportChange);return(0,_e.jsxs)(_e.Fragment,{children:[(0,_e.jsx)(zZ,{nonce:n}),(0,_e.jsx)(ld.div,{"data-radix-scroll-area-viewport":"",...a,ref:l,style:{overflowX:i.scrollbarXEnabled?"scroll":"hidden",overflowY:i.scrollbarYEnabled?"scroll":"hidden",...e.style},children:(0,_e.jsx)("div",{ref:i.onContentChange,style:{minWidth:"100%",display:"table"},children:o})})]})});v3.displayName=h3;var zZ=se.memo(({nonce:e})=>(0,_e.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:e}),(e,t)=>e.nonce===t.nonce),Ra="ScrollAreaScrollbar",Ay=se.forwardRef((e,t)=>{let{forceMount:r,...o}=e,n=en(Ra,e.__scopeScrollArea),{onScrollbarXEnabledChange:a,onScrollbarYEnabledChange:i}=n,s=e.orientation==="horizontal";return se.useEffect(()=>(s?a(!0):i(!0),()=>{s?a(!1):i(!1)}),[s,a,i]),n.type==="hover"?(0,_e.jsx)(GZ,{...o,ref:t,forceMount:r}):n.type==="scroll"?(0,_e.jsx)(WZ,{...o,ref:t,forceMount:r}):n.type==="auto"?(0,_e.jsx)(x3,{...o,ref:t,forceMount:r}):n.type==="always"?(0,_e.jsx)(jP,{...o,ref:t,"data-state":"visible"}):null});Ay.displayName=Ra;var GZ=se.forwardRef((e,t)=>{let{forceMount:r,...o}=e,n=en(Ra,e.__scopeScrollArea),[a,i]=se.useState(!1);return se.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,_e.jsx)(ud,{present:r||a,children:(0,_e.jsx)(x3,{"data-state":a?"visible":"hidden",...o,ref:t})})}),WZ=se.forwardRef((e,t)=>{let{forceMount:r,...o}=e,n=en(Ra,e.__scopeScrollArea),a=e.orientation==="horizontal",i=Ny(()=>l("SCROLL_END"),100),[s,l]=HZ("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 se.useEffect(()=>{if(s==="idle"){let u=window.setTimeout(()=>l("HIDE"),n.scrollHideDelay);return()=>window.clearTimeout(u)}},[s,n.scrollHideDelay,l]),se.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,_e.jsx)(ud,{present:r||s!=="hidden",children:(0,_e.jsx)(jP,{"data-state":s==="hidden"?"hidden":"visible",...o,ref:t,onPointerEnter:Ds(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:Ds(e.onPointerLeave,()=>l("POINTER_LEAVE"))})})}),x3=se.forwardRef((e,t)=>{let r=en(Ra,e.__scopeScrollArea),{forceMount:o,...n}=e,[a,i]=se.useState(!1),s=e.orientation==="horizontal",l=Ny(()=>{if(r.viewport){let u=r.viewport.offsetWidth<r.viewport.scrollWidth,c=r.viewport.offsetHeight<r.viewport.scrollHeight;i(s?u:c)}},10);return dd(r.viewport,l),dd(r.content,l),(0,_e.jsx)(ud,{present:o||a,children:(0,_e.jsx)(jP,{"data-state":a?"visible":"hidden",...n,ref:t})})}),jP=se.forwardRef((e,t)=>{let{orientation:r="vertical",...o}=e,n=en(Ra,e.__scopeScrollArea),a=se.useRef(null),i=se.useRef(0),[s,l]=se.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=S3(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 YZ(f,i.current,s,p)}return r==="horizontal"?(0,_e.jsx)(jZ,{...c,ref:t,onThumbPositionChange:()=>{if(n.viewport&&a.current){let f=n.viewport.scrollLeft,p=f3(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,_e.jsx)($Z,{...c,ref:t,onThumbPositionChange:()=>{if(n.viewport&&a.current){let f=n.viewport.scrollTop,p=f3(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}),jZ=se.forwardRef((e,t)=>{let{sizes:r,onSizesChange:o,...n}=e,a=en(Ra,e.__scopeScrollArea),[i,s]=se.useState(),l=se.useRef(null),u=hi(t,l,a.onScrollbarXChange);return se.useEffect(()=>{l.current&&s(getComputedStyle(l.current))},[l]),(0,_e.jsx)(w3,{"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":Dy(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),R3(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:Ey(i.paddingLeft),paddingEnd:Ey(i.paddingRight)}})}})}),$Z=se.forwardRef((e,t)=>{let{sizes:r,onSizesChange:o,...n}=e,a=en(Ra,e.__scopeScrollArea),[i,s]=se.useState(),l=se.useRef(null),u=hi(t,l,a.onScrollbarYChange);return se.useEffect(()=>{l.current&&s(getComputedStyle(l.current))},[l]),(0,_e.jsx)(w3,{"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":Dy(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),R3(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:Ey(i.paddingTop),paddingEnd:Ey(i.paddingBottom)}})}})}),[qZ,y3]=m3(Ra),w3=se.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=en(Ra,r),[g,m]=se.useState(null),x=hi(t,m),h=se.useRef(null),v=se.useRef(""),y=p.viewport,w=o.content-o.viewport,C=As(c),b=As(l),S=Ny(d,10);function I(L){if(h.current){let T=L.clientX-h.current.left,k=L.clientY-h.current.top;u({x:T,y:k})}}return se.useEffect(()=>{let L=T=>{let k=T.target;g?.contains(k)&&C(T,w)};return document.addEventListener("wheel",L,{passive:!1}),()=>document.removeEventListener("wheel",L,{passive:!1})},[y,g,w,C]),se.useEffect(b,[o,b]),dd(g,S),dd(p.content,S),(0,_e.jsx)(qZ,{scope:r,scrollbar:g,hasThumb:n,onThumbChange:As(a),onThumbPointerUp:As(i),onThumbPositionChange:b,onThumbPointerDown:As(s),children:(0,_e.jsx)(ld.div,{...f,ref:x,style:{position:"absolute",...f.style},onPointerDown:Ds(e.onPointerDown,L=>{L.button===0&&(L.target.setPointerCapture(L.pointerId),h.current=g.getBoundingClientRect(),v.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",p.viewport&&(p.viewport.style.scrollBehavior="auto"),I(L))}),onPointerMove:Ds(e.onPointerMove,I),onPointerUp:Ds(e.onPointerUp,L=>{let T=L.target;T.hasPointerCapture(L.pointerId)&&T.releasePointerCapture(L.pointerId),document.body.style.webkitUserSelect=v.current,p.viewport&&(p.viewport.style.scrollBehavior=""),h.current=null})})})}),My="ScrollAreaThumb",$P=se.forwardRef((e,t)=>{let{forceMount:r,...o}=e,n=y3(My,e.__scopeScrollArea);return(0,_e.jsx)(ud,{present:r||n.hasThumb,children:(0,_e.jsx)(KZ,{ref:t,...o})})}),KZ=se.forwardRef((e,t)=>{let{__scopeScrollArea:r,style:o,...n}=e,a=en(My,r),i=y3(My,r),{onThumbPositionChange:s}=i,l=hi(t,i.onThumbChange),u=se.useRef(void 0),c=Ny(()=>{u.current&&(u.current(),u.current=void 0)},100);return se.useEffect(()=>{let d=a.viewport;if(d){let f=()=>{if(c(),!u.current){let p=QZ(d,s);u.current=p,s()}};return s(),d.addEventListener("scroll",f),()=>d.removeEventListener("scroll",f)}},[a.viewport,c,s]),(0,_e.jsx)(ld.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:Ds(e.onPointerDownCapture,d=>{let p=d.target.getBoundingClientRect(),g=d.clientX-p.left,m=d.clientY-p.top;i.onThumbPointerDown({x:g,y:m})}),onPointerUp:Ds(e.onPointerUp,i.onThumbPointerUp)})});$P.displayName=My;var qP="ScrollAreaCorner",C3=se.forwardRef((e,t)=>{let r=en(qP,e.__scopeScrollArea),o=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&o?(0,_e.jsx)(XZ,{...e,ref:t}):null});C3.displayName=qP;var XZ=se.forwardRef((e,t)=>{let{__scopeScrollArea:r,...o}=e,n=en(qP,r),[a,i]=se.useState(0),[s,l]=se.useState(0),u=!!(a&&s),{onCornerWidthChange:c,onCornerHeightChange:d}=n;return dd(n.scrollbarX,()=>{let f=n.scrollbarX?.offsetHeight||0;n.onCornerHeightChange(f),l(f)}),dd(n.scrollbarY,()=>{let f=n.scrollbarY?.offsetWidth||0;n.onCornerWidthChange(f),i(f)}),se.useEffect(()=>()=>{c(0),d(0)},[c,d]),u?(0,_e.jsx)(ld.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 Ey(e){return e?parseInt(e,10):0}function S3(e,t){let r=e/t;return isNaN(r)?0:r}function Dy(e){let t=S3(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,o=(e.scrollbar.size-r)*t;return Math.max(o,18)}function YZ(e,t,r,o="ltr"){let n=Dy(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 b3([l,u],d)(e)}function f3(e,t,r="ltr"){let o=Dy(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=d3(e,l);return b3([0,i],[0,s])(u)}function b3(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 R3(e,t){return e>0&&e<t}var QZ=(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 Ny(e,t){let r=As(e),o=se.useRef(0);return se.useEffect(()=>()=>window.clearTimeout(o.current),[]),se.useCallback(()=>{window.clearTimeout(o.current),o.current=window.setTimeout(r,t)},[r,t])}function dd(e,t){let r=As(t);zm(()=>{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 KP=g3,I3=v3;var P3=C3;var Ns=R(N()),YP=XP.forwardRef(({className:e,children:t,...r},o)=>(0,Ns.jsxs)(KP,{ref:o,className:P("relative overflow-hidden",e),...r,children:[(0,Ns.jsx)(I3,{className:"h-full w-full rounded-[inherit]",children:t}),(0,Ns.jsx)(Oy,{}),(0,Ns.jsx)(P3,{})]}));YP.displayName=KP.displayName;var Oy=XP.forwardRef(({className:e,orientation:t="vertical",...r},o)=>(0,Ns.jsx)(Ay,{ref:o,orientation:t,className:P("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)($P,{className:"relative flex-1 rounded-full bg-border"})}));Oy.displayName=Ay.displayName;var Gn=R(M());var Wm=R(N()),L3=(e,t)=>{let r={up:{hidden:{opacity:0,y:t},visible:{opacity:1,y:0}},down:{hidden:{opacity:0,y:-t},visible:{opacity:1,y:0}},left:{hidden:{opacity:0,x:t},visible:{opacity:1,x:0}},right:{hidden:{opacity:0,x:-t},visible:{opacity:1,x:0}},fade:{hidden:{opacity:0},visible:{opacity:1}},scale:{hidden:{opacity:0,scale:.85},visible:{opacity:1,scale:1}},blur:{hidden:{opacity:0,filter:"blur(10px)"},visible:{opacity:1,filter:"blur(0px)"}}};return r[e]||r.up},T3={duration:.5,ease:[.25,.46,.45,.94]},QP=Gn.forwardRef(({children:e,direction:t="up",delay:r=0,duration:o=.5,distance:n=50,threshold:a=.3,once:i=!0,triggerOnce:s,stagger:l=0,className:u,variants:c,animate:d=!0,style:f,id:p,viewport:g},m)=>{let x=s!==void 0?s:i,h=Gn.useMemo(()=>c||L3(t,n),[t,n,c]),v=Gn.useMemo(()=>({...T3,duration:o,delay:r+l}),[o,r,l]),y=Gn.useMemo(()=>({once:x,amount:a,...g}),[x,a,g]);return d?(0,Wm.jsx)(He.div,{ref:m,initial:"hidden",whileInView:"visible",viewport:y,variants:h,transition:v,className:P(u),style:f,id:p,children:e}):(0,Wm.jsx)("div",{ref:m,className:u,style:f,id:p,children:e})});QP.displayName="ScrollReveal";var ZP=Gn.forwardRef(({children:e,stagger:t=.1,className:r,style:o,id:n,threshold:a=.3,once:i=!0,triggerOnce:s,viewport:l},u)=>{let c=s!==void 0?s:i,d=Gn.useMemo(()=>({once:c,amount:a,...l}),[c,a,l]),f={hidden:{},visible:{transition:{staggerChildren:t,delayChildren:0}}};return(0,Wm.jsx)(He.div,{ref:u,initial:"hidden",whileInView:"visible",viewport:d,variants:f,className:P(r),style:o,id:n,children:e})});ZP.displayName="ScrollRevealContainer";var JP=Gn.forwardRef(({children:e,direction:t="up",duration:r=.5,distance:o=50,className:n,variants:a,style:i,id:s},l)=>{let u=Gn.useMemo(()=>a||L3(t,o),[t,o,a]),c=Gn.useMemo(()=>({...T3,duration:r}),[r]);return(0,Wm.jsx)(He.div,{ref:l,variants:u,transition:c,className:P(n),style:i,id:s,children:e})});JP.displayName="ScrollRevealItem";var D3=R(M());var M3=R(M(),1);var E3=R(N(),1),JZ="Separator",k3="horizontal",eJ=["horizontal","vertical"],A3=M3.forwardRef((e,t)=>{let{decorative:r,orientation:o=k3,...n}=e,a=tJ(o)?o:k3,s=r?{role:"none"}:{"aria-orientation":a==="vertical"?a:void 0,role:"separator"};return(0,E3.jsx)(q.div,{"data-orientation":a,...s,...n,ref:t})});A3.displayName=JZ;function tJ(e){return eJ.includes(e)}var eL=A3;var O3=R(N()),N3=K("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"}}),To=D3.forwardRef(({className:e,orientation:t="horizontal",variant:r="default",size:o="md",decorative:n=!0,...a},i)=>(0,O3.jsx)(eL,{ref:i,decorative:n,orientation:t||void 0,className:P(N3({orientation:t,variant:r,size:o}),e),...a}));To.displayName=eL.displayName;var et=R(M());var az=R(M());var oz=R(M(),1);var oJ=Object.defineProperty,fd=(e,t)=>oJ(e,"name",{value:t,configurable:!0}),F3=!!(typeof window<"u"&&window.document&&window.document.createElement);function rL(e,t,{checkForDefaultPrevented:r=!0}={}){return fd(function(n){if(e?.(n),r===!1||!n||!n.defaultPrevented)return t?.(n)},"handleEvent")}fd(rL,"composeEventHandlers");function nJ(e){if(!F3)throw new Error("Cannot access window outside of the DOM");return e?.ownerDocument?.defaultView??window}fd(nJ,"getOwnerWindow");function tL(e){if(!F3)throw new Error("Cannot access document outside of the DOM");return e?.ownerDocument??document}fd(tL,"getOwnerDocument");function _3(e,t=!1){let{activeElement:r}=tL(e);if(!r?.nodeName)return null;if(V3(r)&&r.contentDocument)return _3(r.contentDocument.body,t);if(t){let o=r.getAttribute("aria-activedescendant");if(o){let n=tL(r).getElementById(o);if(n)return n}}return r}fd(_3,"getActiveElement");function V3(e){return e.tagName==="IFRAME"}fd(V3,"isFrame");var tn=R(M(),1);var pd=!1;var B3=R(M(),1),Fy=globalThis?.document?B3.useLayoutEffect:()=>{};var Wn=R(M(),1);var md=R(M(),1),aJ=Object.defineProperty,iJ=(e,t)=>aJ(e,"name",{value:t,configurable:!0}),H3=md[" useEffectEvent ".trim().toString()],U3=md[" useInsertionEffect ".trim().toString()];function oL(e){if(typeof H3=="function")return H3(e);let t=md.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof U3=="function"?U3(()=>{t.current=e}):Fy(()=>{t.current=e}),md.useMemo(()=>(...r)=>t.current?.(...r),[])}iJ(oL,"useEffectEvent");var sJ=Object.defineProperty,jm=(e,t)=>sJ(e,"name",{value:t,configurable:!0}),lJ=tn[" useInsertionEffect ".trim().toString()]||Fy;function nL({prop:e,defaultProp:t,onChange:r=jm(()=>{},"onChange"),caller:o}){let[n,a,i]=G3({defaultProp:t,onChange:r}),s=e!==void 0,l=s?e:n;if(pd){let c=tn.useRef(e!==void 0);tn.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=tn.useCallback(c=>{if(s){let d=W3(c)?c(e):c;d!==e&&i.current?.(d)}else a(c)},[s,e,a,i]);return[l,u]}jm(nL,"useControllableState");function G3({defaultProp:e,onChange:t}){let[r,o]=tn.useState(e),n=tn.useRef(r),a=tn.useRef(t);return lJ(()=>{a.current=t},[t]),tn.useEffect(()=>{n.current!==r&&(a.current?.(r),n.current=r)},[r,n]),[r,o,a]}jm(G3,"useUncontrolledState");function W3(e){return typeof e=="function"}jm(W3,"isFunction");var z3=Symbol("RADIX:SYNC_STATE");function uJ(e,t,r,o){let{prop:n,defaultProp:a,onChange:i,caller:s}=t,l=n!==void 0,u=oL(i);if(pd){let x=Wn.useRef(n!==void 0);Wn.useEffect(()=>{let h=x.current;h!==l&&console.warn(`${s} is changing from ${h?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),x.current=l},[l,s])}let c=[{...r,state:a}];o&&c.push(o);let[d,f]=Wn.useReducer((x,h)=>{if(h.type===z3)return{...x,state:h.state};let v=e(x,h);return l&&!Object.is(v.state,x.state)&&u(v.state),v},...c),p=d.state,g=Wn.useRef(p);Wn.useEffect(()=>{g.current!==p&&(g.current=p,l||u(p))},[p,g,l]);let m=Wn.useMemo(()=>n!==void 0?{...d,state:n}:d,[d,n]);return Wn.useEffect(()=>{l&&!Object.is(n,d.state)&&f({type:z3,state:n})},[n,d.state,l]),[m,f]}jm(uJ,"useControllableStateReducer");var J3=R(M(),1),ez=R(Va(),1);var Pt=R(M(),1);var j3=R(M(),1),cJ=Object.defineProperty,iL=(e,t)=>cJ(e,"name",{value:t,configurable:!0});function aL(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}iL(aL,"setRef");function $3(...e){return t=>{let r=!1,o=e.map(n=>{let a=aL(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():aL(e[n],null)}}}}iL($3,"composeRefs");function sL(...e){return j3.useCallback($3(...e),e)}iL(sL,"useComposedRefs");var pJ=R(N(),1),dJ=Object.defineProperty,rn=(e,t)=>dJ(e,"name",{value:t,configurable:!0}),fJ=rn((e,t)=>{let r={...t};for(let o in t){let n=e[o],a=t[o];if(/^on[A-Z]/.test(o))if(n&&a){let s=typeof n=="function",l=typeof a=="function";pd&&(!s||!l)&&console.warn(`Slot: Expected a function for ${o}, but received ${[typeof n,typeof a].filter(u=>u!=="function").join(" and ")}.`),r[o]=(...u)=>{let c=l?a(...u):void 0;return s&&n(...u),c}}else n&&(r[o]=n);else o==="style"?r[o]={...typeof n=="object"?n:null,...typeof a=="object"?a:null}:o==="className"?r[o]=[n,a].filter(Boolean).join(" "):o==="aria-describedby"&&(r[o]=q3(a,n))}return{...e,...r}},"mergeProps");function q3(...e){let t=new Set;for(let r of e)if(typeof r=="string")for(let o of String(r).trim().split(/\s+/))o&&t.add(o);return t.size>0?Array.from(t).join(" "):void 0}rn(q3,"concatAriaDescribedby");var K3=Pt.createContext(fJ);K3.displayName="SlotContext";function uL(e){let t=Pt.forwardRef((r,o)=>{let n=Pt.useContext(K3),{children:a,mergeProps:i=n,...s}=r,l=null,u=!1,c=[];lL(a)&&typeof _y=="function"&&(a=_y(a._payload)),Pt.Children.forEach(a,g=>{if(Q3(g)){u=!0;let m=g,x="child"in m.props?m.props.child:m.props.children;lL(x)&&typeof _y=="function"&&(x=_y(x._payload)),l=gJ(m,x),c.push(l?.props?.children)}else c.push(g)}),l?l=Pt.cloneElement(l,void 0,c):!u&&Pt.Children.count(a)===1&&Pt.isValidElement(a)&&(l=a);let d=l?Y3(l):void 0,f=sL(o,d);if(!l){if(a||a===0)throw new Error(u?xJ(e):vJ(e));return a}let p=i(s,l.props??{});return l.type!==Pt.Fragment&&(p.ref=o?f:d),Pt.cloneElement(l,p)});return t.displayName=`${e}.Slot`,t}rn(uL,"createSlot");var X3=Symbol.for("radix.slottable");function mJ(e){let t=rn(r=>"child"in r?r.children(r.child):r.children,"Slottable");return t.displayName=`${e}.Slottable`,t.__radixId=X3,t}rn(mJ,"createSlottable");var gJ=rn((e,t)=>{if("child"in e.props){let r=e.props.child;return Pt.isValidElement(r)?Pt.cloneElement(r,void 0,e.props.children(r.props.children)):null}return Pt.isValidElement(t)?t:null},"getSlottableElementFromSlottable");function Y3(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)}rn(Y3,"getElementRef");function Q3(e){return Pt.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===X3}rn(Q3,"isSlottable");var hJ=Symbol.for("react.lazy");function lL(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===hJ&&"_payload"in e&&Z3(e._payload)}rn(lL,"isLazyComponent");function Z3(e){return typeof e=="object"&&e!==null&&"then"in e}rn(Z3,"isPromiseLike");var vJ=rn(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),xJ=rn(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),_y=Pt[" use ".trim().toString()];var tz=R(N(),1),yJ=Object.defineProperty,wJ=(e,t)=>yJ(e,"name",{value:t,configurable:!0}),CJ=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],rz=CJ.reduce((e,t)=>{let r=uL(`Primitive.${t}`),o=J3.forwardRef((n,a)=>{let{asChild:i,...s}=n,l=i?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,tz.jsx)(l,{...s,ref:a})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function SJ(e,t){e&&ez.flushSync(()=>e.dispatchEvent(t))}wJ(SJ,"dispatchDiscreteCustomEvent");var nz=R(N(),1),bJ=Object.defineProperty,RJ=(e,t)=>bJ(e,"name",{value:t,configurable:!0}),IJ="Toggle",$m=oz.forwardRef(RJ(function(t,r){let{pressed:o,defaultPressed:n,onPressedChange:a,...i}=t,[s,l]=nL({prop:o,onChange:a,defaultProp:n??!1,caller:IJ});return(0,nz.jsx)(rz.button,{type:"button","aria-pressed":s,"data-state":s?"on":"off","data-disabled":t.disabled?"":void 0,...i,ref:r,onClick:rL(t.onClick,()=>{t.disabled||l(!s)})})},"Toggle"));var iz=R(N()),qm=K("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"}}),Km=az.forwardRef(({className:e,variant:t,size:r,...o},n)=>(0,iz.jsx)($m,{ref:n,className:P("moonui-theme",qm({variant:t,size:r,className:e})),...o}));Km.displayName=$m.displayName;var Hy=R(M());var Re=R(M(),1);var Dt=R(N(),1),[Vy,oAe]=Fe("Tooltip",[Qo]),By=Qo(),sz="TooltipProvider",LJ=700,cL="tooltip.open",[TJ,fL]=Vy(sz),lz=e=>{let{__scopeTooltip:t,delayDuration:r=LJ,skipDelayDuration:o=300,disableHoverableContent:n=!1,children:a}=e,i=Re.useRef(!0),s=Re.useRef(!1),l=Re.useRef(0);return Re.useEffect(()=>{let u=l.current;return()=>window.clearTimeout(u)},[]),(0,Dt.jsx)(TJ,{scope:t,isOpenDelayedRef:i,delayDuration:r,onOpen:Re.useCallback(()=>{window.clearTimeout(l.current),i.current=!1},[]),onClose:Re.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>i.current=!0,o)},[o]),isPointerInTransitRef:s,onPointerInTransitChange:Re.useCallback(u=>{s.current=u},[]),disableHoverableContent:n,children:a})};lz.displayName=sz;var Xm="Tooltip",[kJ,Ym]=Vy(Xm),uz=e=>{let{__scopeTooltip:t,children:r,open:o,defaultOpen:n,onOpenChange:a,disableHoverableContent:i,delayDuration:s}=e,l=fL(Xm,e.__scopeTooltip),u=By(t),[c,d]=Re.useState(null),f=Ne(),p=Re.useRef(0),g=i??l.disableHoverableContent,m=s??l.delayDuration,x=Re.useRef(!1),[h,v]=qe({prop:o,defaultProp:n??!1,onChange:S=>{S?(l.onOpen(),document.dispatchEvent(new CustomEvent(cL))):l.onClose(),a?.(S)},caller:Xm}),y=Re.useMemo(()=>h?x.current?"delayed-open":"instant-open":"closed",[h]),w=Re.useCallback(()=>{window.clearTimeout(p.current),p.current=0,x.current=!1,v(!0)},[v]),C=Re.useCallback(()=>{window.clearTimeout(p.current),p.current=0,v(!1)},[v]),b=Re.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{x.current=!0,v(!0),p.current=0},m)},[m,v]);return Re.useEffect(()=>()=>{p.current&&(window.clearTimeout(p.current),p.current=0)},[]),(0,Dt.jsx)(ai,{...u,children:(0,Dt.jsx)(kJ,{scope:t,contentId:f,open:h,stateAttribute:y,trigger:c,onTriggerChange:d,onTriggerEnter:Re.useCallback(()=>{l.isOpenDelayedRef.current?b():w()},[l.isOpenDelayedRef,b,w]),onTriggerLeave:Re.useCallback(()=>{g?C():(window.clearTimeout(p.current),p.current=0)},[C,g]),onOpen:w,onClose:C,disableHoverableContent:g,children:r})})};uz.displayName=Xm;var dL="TooltipTrigger",cz=Re.forwardRef((e,t)=>{let{__scopeTooltip:r,...o}=e,n=Ym(dL,r),a=fL(dL,r),i=By(r),s=Re.useRef(null),l=de(t,s,n.onTriggerChange),u=Re.useRef(!1),c=Re.useRef(!1),d=Re.useCallback(()=>u.current=!1,[]);return Re.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),(0,Dt.jsx)(ii,{asChild:!0,...i,children:(0,Dt.jsx)(q.button,{"aria-describedby":n.open?n.contentId:void 0,"data-state":n.stateAttribute,...o,ref:l,onPointerMove:W(e.onPointerMove,f=>{f.pointerType!=="touch"&&!c.current&&!a.isPointerInTransitRef.current&&(n.onTriggerEnter(),c.current=!0)}),onPointerLeave:W(e.onPointerLeave,()=>{n.onTriggerLeave(),c.current=!1}),onPointerDown:W(e.onPointerDown,()=>{n.open&&n.onClose(),u.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:W(e.onFocus,()=>{u.current||n.onOpen()}),onBlur:W(e.onBlur,n.onClose),onClick:W(e.onClick,n.onClose)})})});cz.displayName=dL;var pL="TooltipPortal",[MJ,EJ]=Vy(pL,{forceMount:void 0}),AJ=e=>{let{__scopeTooltip:t,forceMount:r,children:o,container:n}=e,a=Ym(pL,t);return(0,Dt.jsx)(MJ,{scope:t,forceMount:r,children:(0,Dt.jsx)(lt,{present:r||a.open,children:(0,Dt.jsx)(Ro,{asChild:!0,container:n,children:o})})})};AJ.displayName=pL;var gd="TooltipContent",dz=Re.forwardRef((e,t)=>{let r=EJ(gd,e.__scopeTooltip),{forceMount:o=r.forceMount,side:n="top",...a}=e,i=Ym(gd,e.__scopeTooltip);return(0,Dt.jsx)(lt,{present:o||i.open,children:i.disableHoverableContent?(0,Dt.jsx)(fz,{side:n,...a,ref:t}):(0,Dt.jsx)(DJ,{side:n,...a,ref:t})})}),DJ=Re.forwardRef((e,t)=>{let r=Ym(gd,e.__scopeTooltip),o=fL(gd,e.__scopeTooltip),n=Re.useRef(null),a=de(t,n),[i,s]=Re.useState(null),{trigger:l,onClose:u}=r,c=n.current,{onPointerInTransitChange:d}=o,f=Re.useCallback(()=>{s(null),d(!1)},[d]),p=Re.useCallback((g,m)=>{let x=g.currentTarget,h={x:g.clientX,y:g.clientY},v=_J(h,x.getBoundingClientRect()),y=VJ(h,v),w=BJ(m.getBoundingClientRect()),C=UJ([...y,...w]);s(C),d(!0)},[d]);return Re.useEffect(()=>()=>f(),[f]),Re.useEffect(()=>{if(l&&c){let g=x=>p(x,c),m=x=>p(x,l);return l.addEventListener("pointerleave",g),c.addEventListener("pointerleave",m),()=>{l.removeEventListener("pointerleave",g),c.removeEventListener("pointerleave",m)}}},[l,c,p,f]),Re.useEffect(()=>{if(i){let g=m=>{let x=m.target,h={x:m.clientX,y:m.clientY},v=l?.contains(x)||c?.contains(x),y=!HJ(h,i);v?f():y&&(f(),u())};return document.addEventListener("pointermove",g),()=>document.removeEventListener("pointermove",g)}},[l,c,i,u,f]),(0,Dt.jsx)(fz,{...e,ref:a})}),[NJ,OJ]=Vy(Xm,{isInside:!1}),FJ=q1("TooltipContent"),fz=Re.forwardRef((e,t)=>{let{__scopeTooltip:r,children:o,"aria-label":n,onEscapeKeyDown:a,onPointerDownOutside:i,...s}=e,l=Ym(gd,r),u=By(r),{onClose:c}=l;return Re.useEffect(()=>(document.addEventListener(cL,c),()=>document.removeEventListener(cL,c)),[c]),Re.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,Dt.jsx)(qo,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:d=>d.preventDefault(),onDismiss:c,children:(0,Dt.jsxs)(hs,{"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,Dt.jsx)(FJ,{children:o}),(0,Dt.jsx)(NJ,{scope:r,isInside:!0,children:(0,Dt.jsx)(dU,{id:l.contentId,role:"tooltip",children:n||o})})]})})});dz.displayName=gd;var pz="TooltipArrow",mz=Re.forwardRef((e,t)=>{let{__scopeTooltip:r,...o}=e,n=By(r);return OJ(pz,r).isInside?null:(0,Dt.jsx)(vs,{...n,...o,ref:t})});mz.displayName=pz;function _J(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 VJ(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 BJ(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 HJ(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 UJ(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),zJ(t)}function zJ(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 gz=lz,hz=uz,vz=cz;var mL=dz,gL=mz;var Os=R(N()),Uy=gz,xz=K("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"}}),Qm=hz,Zm=vz,hL=Hy.forwardRef(({className:e,...t},r)=>(0,Os.jsx)(gL,{ref:r,className:P("moonui-theme","fill-current",e),...t}));hL.displayName=gL.displayName;var hd=Hy.forwardRef(({className:e,variant:t,size:r,showArrow:o=!1,sideOffset:n=4,...a},i)=>(0,Os.jsxs)(mL,{ref:i,sideOffset:n,className:P("moonui-theme",xz({variant:t,size:r}),e),...a,children:[a.children,o&&(0,Os.jsx)(hL,{})]}));hd.displayName=mL.displayName;var yz=Hy.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},g)=>(0,Os.jsxs)(Qm,{open:c,defaultOpen:d,onOpenChange:f,delayDuration:i,children:[(0,Os.jsx)(Zm,{asChild:!0,children:e}),(0,Os.jsx)(hd,{ref:g,side:n,align:a,variant:r,size:o,sideOffset:s,showArrow:l,className:u,...p,children:t})]}));yz.displayName="SimpleTooltip";var G=R(N()),jt=({icon:e,tooltip:t,active:r,onClick:o,disabled:n})=>(0,G.jsxs)(Qm,{children:[(0,G.jsx)(Zm,{asChild:!0,children:(0,G.jsx)(Km,{pressed:r,onPressedChange:()=>o(),disabled:n,"aria-label":t,className:"h-8 w-8 p-0",children:e})}),(0,G.jsx)(hd,{children:(0,G.jsx)("p",{children:t})})]}),WJ=({onColorSelect:e})=>(0,G.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,G.jsx)("button",{type:"button","aria-label":`Select color ${r}`,className:"w-6 h-6 rounded border-2 border-border hover:border-ring focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",style:{backgroundColor:r},onClick:()=>e(r)},r))}),vL=et.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,et.useState)(e),[p,g]=(0,et.useState)(!1),[m,x]=(0,et.useState)(e),[h,v]=(0,et.useState)(null),y=et.default.useRef(null),w=et.default.useRef(null),[C,b]=(0,et.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,et.useCallback)(A=>{f(A),t?.(A)},[t]),I=(0,et.useCallback)(()=>{let A=window.getSelection();return A&&A.rangeCount>0?A.getRangeAt(0):null},[]),L=(0,et.useCallback)(A=>{if(!A)return;let te=window.getSelection();te&&(te.removeAllRanges(),te.addRange(A))},[]),T=(0,et.useCallback)((A,te)=>{if(o)return;y.current&&y.current.focus();let ae=I();if(document.execCommand(A,!1,te)||console.warn(`Command '${A}' failed to execute`),y.current){let Q=y.current.innerHTML;S(Q)}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,I,S]),k=(0,et.useCallback)(A=>{let te=A.currentTarget.innerHTML;S(te)},[S]),E=(0,et.useCallback)(A=>{if(A.ctrlKey||A.metaKey)switch(A.key){case"b":A.preventDefault(),T("bold");break;case"i":A.preventDefault(),T("italic");break;case"u":A.preventDefault(),T("underline");break;case"z":A.preventDefault(),A.shiftKey?T("redo"):T("undo");break}A.key==="Tab"&&(A.preventDefault(),T("insertHTML"," "))},[T]),_=(0,et.useCallback)(()=>{let A=prompt("Enter URL:");A&&T("createLink",A)},[T]),D=(0,et.useCallback)(()=>{let A=prompt("Enter image URL:");A&&T("insertImage",A)},[T]),z=(0,et.useCallback)(A=>{T("formatBlock",`<h${A}>`)},[T]),F=(0,et.useCallback)(A=>{let te=window.getSelection();if(te&&te.rangeCount>0){let ae=te.getRangeAt(0),V=document.createElement("span");V.style.color=A;try{ae.surroundContents(V)}catch{T("foreColor",A)}if(y.current){let Q=y.current.innerHTML;S(Q)}}},[T,S]),O=A=>{if(typeof window>"u")return A.replace(/<[^>]*>/g,"").replace(/ /g," ").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/'/g,"'");let te=document.createElement("div");return te.innerHTML=A,te.textContent||te.innerText||""};et.default.useEffect(()=>{y.current&&d&&d!==y.current.innerHTML&&(y.current.innerHTML=d)},[d]),et.default.useEffect(()=>{e!==void 0&&e!==d&&(f(e),x(e))},[e,d]);let B=s&&(0,G.jsx)(Uy,{children:(0,G.jsxs)(He.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,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)("div",{className:"flex items-center gap-1",children:[(0,G.jsx)(jt,{icon:(0,G.jsx)(kf,{className:"h-3 w-3"}),tooltip:"Bold (Ctrl+B)",active:C.bold,onClick:()=>T("bold"),disabled:o}),(0,G.jsx)(jt,{icon:(0,G.jsx)(Hf,{className:"h-3 w-3"}),tooltip:"Italic (Ctrl+I)",active:C.italic,onClick:()=>T("italic"),disabled:o}),(0,G.jsx)(jt,{icon:(0,G.jsx)(Qf,{className:"h-3 w-3"}),tooltip:"Underline (Ctrl+U)",active:C.underline,onClick:()=>T("underline"),disabled:o}),(0,G.jsx)(jt,{icon:(0,G.jsx)(Yf,{className:"h-3 w-3"}),tooltip:"Strikethrough",active:C.strikethrough,onClick:()=>T("strikeThrough"),disabled:o})]}),(0,G.jsx)(To,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),(0,G.jsxs)(nu,{onValueChange:A=>{A.startsWith("h")?z(A.substring(1)):A==="normal"?T("formatBlock","p"):T("fontSize",A)},disabled:o,children:[(0,G.jsx)(au,{className:"w-24 h-8",children:(0,G.jsx)(sd,{placeholder:"Size"})}),(0,G.jsxs)(iu,{children:[(0,G.jsx)(kr,{value:"1",children:"Small"}),(0,G.jsx)(kr,{value:"3",children:"Normal"}),(0,G.jsx)(kr,{value:"5",children:"Large"}),(0,G.jsx)(kr,{value:"7",children:"X-Large"}),(0,G.jsx)(To,{className:"my-1"}),(0,G.jsx)(kr,{value:"h1",children:"Heading 1"}),(0,G.jsx)(kr,{value:"h2",children:"Heading 2"}),(0,G.jsx)(kr,{value:"h3",children:"Heading 3"}),(0,G.jsx)(kr,{value:"h4",children:"Heading 4"}),(0,G.jsx)(kr,{value:"h5",children:"Heading 5"}),(0,G.jsx)(kr,{value:"h6",children:"Heading 6"})]})]}),(0,G.jsx)(To,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),(0,G.jsxs)("div",{className:"flex items-center gap-1",children:[(0,G.jsx)(jt,{icon:(0,G.jsx)(If,{className:"h-3 w-3"}),tooltip:"Align Left",active:C.alignLeft,onClick:()=>T("justifyLeft"),disabled:o}),(0,G.jsx)(jt,{icon:(0,G.jsx)(bf,{className:"h-3 w-3"}),tooltip:"Align Center",active:C.alignCenter,onClick:()=>T("justifyCenter"),disabled:o}),(0,G.jsx)(jt,{icon:(0,G.jsx)(Pf,{className:"h-3 w-3"}),tooltip:"Align Right",active:C.alignRight,onClick:()=>T("justifyRight"),disabled:o}),(0,G.jsx)(jt,{icon:(0,G.jsx)(Rf,{className:"h-3 w-3"}),tooltip:"Justify",active:C.alignJustify,onClick:()=>T("justifyFull"),disabled:o})]}),(0,G.jsx)(To,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),(0,G.jsxs)("div",{className:"flex items-center gap-1",children:[(0,G.jsx)(jt,{icon:(0,G.jsx)(Gf,{className:"h-3 w-3"}),tooltip:"Bullet List",active:C.unorderedList,onClick:()=>T("insertUnorderedList"),disabled:o}),(0,G.jsx)(jt,{icon:(0,G.jsx)(zf,{className:"h-3 w-3"}),tooltip:"Numbered List",active:C.orderedList,onClick:()=>T("insertOrderedList"),disabled:o}),(0,G.jsx)(jt,{icon:(0,G.jsx)(Kf,{className:"h-3 w-3"}),tooltip:"Quote",active:C.quote,onClick:()=>T("formatBlock","blockquote"),disabled:o}),(0,G.jsx)(jt,{icon:(0,G.jsx)(Af,{className:"h-3 w-3"}),tooltip:"Code Block",active:C.code,onClick:()=>T("formatBlock","pre"),disabled:o})]}),(0,G.jsx)(To,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),(0,G.jsxs)("div",{className:"flex items-center gap-1",children:[(0,G.jsx)(jt,{icon:(0,G.jsx)("span",{className:"text-xs font-mono",children:"\u2190"}),tooltip:"Decrease Indent",onClick:()=>T("outdent"),disabled:o}),(0,G.jsx)(jt,{icon:(0,G.jsx)("span",{className:"text-xs font-mono",children:"\u2192"}),tooltip:"Increase Indent",onClick:()=>T("indent"),disabled:o})]}),(0,G.jsx)(To,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),(0,G.jsxs)("div",{className:"flex items-center gap-1",children:[(0,G.jsx)(jt,{icon:(0,G.jsx)(Uf,{className:"h-3 w-3"}),tooltip:"Insert Link",onClick:_,disabled:o}),(0,G.jsx)(jt,{icon:(0,G.jsx)(il,{className:"h-3 w-3"}),tooltip:"Insert Image",onClick:D,disabled:o})]}),(0,G.jsx)(To,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),(0,G.jsxs)(wa,{children:[(0,G.jsx)(Ca,{asChild:!0,children:(0,G.jsx)(Ee,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",disabled:o,title:"Text Color",children:(0,G.jsx)(sl,{className:"h-3 w-3"})})}),(0,G.jsx)(Vn,{className:"w-auto p-0",children:(0,G.jsx)(WJ,{onColorSelect:F})})]}),(0,G.jsx)(To,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),(0,G.jsxs)("div",{className:"flex items-center gap-1",children:[(0,G.jsx)(jt,{icon:(0,G.jsx)(Zf,{className:"h-3 w-3"}),tooltip:"Undo (Ctrl+Z)",onClick:()=>T("undo"),disabled:o}),(0,G.jsx)(jt,{icon:(0,G.jsx)(Xf,{className:"h-3 w-3"}),tooltip:"Redo (Ctrl+Shift+Z)",onClick:()=>T("redo"),disabled:o})]})]}),l&&(0,G.jsxs)(G.Fragment,{children:[!p&&(0,G.jsx)(To,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),(0,G.jsx)(jt,{icon:p?(0,G.jsx)(eo,{className:"h-3 w-3"}):(0,G.jsx)(al,{className:"h-3 w-3"}),tooltip:p?"Edit Mode":"View Source Code",active:p,onClick:()=>{p?S(m):x(d),g(!p)},disabled:o})]})]})});return(0,G.jsxs)("div",{ref:c,className:P("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:[B,(0,G.jsxs)("div",{className:"relative",children:[p?(0,G.jsx)(He.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,G.jsx)("textarea",{ref:w,value:m,onChange:A=>x(A.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,G.jsx)(He.div,{ref:y,contentEditable:!o,suppressContentEditableWarning:!0,role:"textbox","aria-multiline":"true","aria-label":r,"aria-disabled":o||void 0,className:P("p-4 outline-none prose prose-sm dark:prose-invert max-w-none overflow-y-auto","bg-background text-foreground","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:k,onKeyDown:E,"data-placeholder":r,initial:{opacity:0},animate:{opacity:1}}),!d&&!p&&(0,G.jsx)("div",{className:"absolute top-4 left-4 text-muted-foreground pointer-events-none",style:{fontSize:"16px"},children:r})]}),(0,G.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,G.jsx)(jJ,{content:d})})]})});vL.displayName="SimpleEditor";var jJ=({content:e})=>{let[t,r]=(0,et.useState)(0);return(0,et.useEffect)(()=>{r((n=>{let a=document.createElement("div");return a.innerHTML=n,a.textContent||a.innerText||""})(e).length)},[e]),(0,G.jsxs)(G.Fragment,{children:[t," characters"]})};var Jm=R(M());var Jt=R(N()),xL=K("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"}}),xi=Jm.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:g,onDragEnd:m,onDragStart:x,onAnimationStart:h,onAnimationEnd:v,onAnimationIteration:y,...w}=f;if(s&&l)return c?(0,Jt.jsx)(He.div,{ref:p,initial:{opacity:0},animate:{opacity:1},transition:{duration:u/1e3},className:P("moonui-theme",e),style:{height:a,width:i,...d},...w,children:l}):(0,Jt.jsx)("div",{ref:p,className:P("moonui-theme","animate-fade-in",e),style:{animationDuration:`${u}ms`,height:a,width:i,...d},...f,children:l});let C=c?He.div:"div";return(0,Jt.jsx)(C,{ref:p,className:P("moonui-theme",xL({variant:t,size:r,shape:o,animation:n}),"relative isolate",e),style:{height:a,width:i,...d},...c?W2:{},...w})});xi.displayName="Skeleton";var zy=Jm.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,Jt.jsx)("div",{ref:u,className:P("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,Jt.jsx)(xi,{variant:i,animation:s,className:"w-full",style:{height:r,width:`${p}%`}},d)})}));zy.displayName="SkeletonText";var Gy=Jm.forwardRef(({className:e,size:t="2.5rem",variant:r="default",animation:o="pulse",...n},a)=>(0,Jt.jsx)(xi,{ref:a,variant:r,animation:o,shape:"circle",className:P("moonui-theme","shrink-0",e),style:{height:t,width:t},...n}));Gy.displayName="SkeletonAvatar";var yL=Jm.forwardRef(({className:e,showHeader:t=!0,contentLines:r=3,showFooter:o=!0,variant:n="default",animation:a="pulse",...i},s)=>(0,Jt.jsxs)("div",{ref:s,className:P("overflow-hidden rounded-md border border-border bg-background p-4",e),...i,children:[t&&(0,Jt.jsxs)("div",{className:"mb-4 flex items-center gap-4",children:[(0,Jt.jsx)(Gy,{size:"2.5rem",variant:n,animation:a}),(0,Jt.jsxs)("div",{className:"flex-1",children:[(0,Jt.jsx)(xi,{variant:n,animation:a,className:"mb-2 h-4 w-1/3"}),(0,Jt.jsx)(xi,{variant:n,animation:a,className:"h-3 w-1/4"})]})]}),(0,Jt.jsx)(zy,{lines:r,variant:n,animation:a,className:"mb-4"}),o&&(0,Jt.jsxs)("div",{className:"flex items-center justify-between mt-4 pt-4 border-t border-border",children:[(0,Jt.jsx)(xi,{variant:n,animation:a,className:"h-4 w-1/4"}),(0,Jt.jsx)(xi,{variant:n,animation:a,className:"h-4 w-1/5"})]})]}));yL.displayName="SkeletonCard";var vd=R(M());var wz=R(N()),wL=vd.forwardRef(({className:e,children:t,onSwipeLeft:r,onSwipeRight:o,threshold:n=100,disabled:a=!1,...i},s)=>{let[l,u]=vd.useState(0),[c,d]=vd.useState(0),[f,p]=vd.useState(!1),g=h=>{a||(u(h.touches[0].clientX),p(!0))},m=h=>{a||!f||d(h.touches[0].clientX)},x=()=>{if(a||!f)return;let h=c-l;Math.abs(h)>n&&(h>0&&o?o():h<0&&r&&r()),p(!1),d(0),u(0)};return(0,wz.jsx)("div",{ref:s,className:P("touch-pan-y select-none transition-transform duration-200",f&&"cursor-grabbing",e),onTouchStart:g,onTouchMove:m,onTouchEnd:x,...i,children:t})});wL.displayName="SwipeableCard";var jy=R(M());var jn=R(M(),1);var su=R(N(),1),Wy="Switch",[$J,AAe]=Fe(Wy),[qJ,KJ]=$J(Wy),Cz=jn.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]=jn.useState(null),g=de(t,y=>p(y)),m=jn.useRef(!1),x=f?c||!!f.closest("form"):!0,[h,v]=qe({prop:n,defaultProp:a??!1,onChange:u,caller:Wy});return(0,su.jsxs)(qJ,{scope:r,checked:h,disabled:s,children:[(0,su.jsx)(q.button,{type:"button",role:"switch","aria-checked":h,"aria-required":i,"data-state":Iz(h),"data-disabled":s?"":void 0,disabled:s,value:l,...d,ref:g,onClick:W(e.onClick,y=>{v(w=>!w),x&&(m.current=y.isPropagationStopped(),m.current||y.stopPropagation())})}),x&&(0,su.jsx)(Rz,{control:f,bubbles:!m.current,name:o,value:l,checked:h,required:i,disabled:s,form:c,style:{transform:"translateX(-100%)"}})]})});Cz.displayName=Wy;var Sz="SwitchThumb",bz=jn.forwardRef((e,t)=>{let{__scopeSwitch:r,...o}=e,n=KJ(Sz,r);return(0,su.jsx)(q.span,{"data-state":Iz(n.checked),"data-disabled":n.disabled?"":void 0,...o,ref:t})});bz.displayName=Sz;var XJ="SwitchBubbleInput",Rz=jn.forwardRef(({__scopeSwitch:e,control:t,checked:r,bubbles:o=!0,...n},a)=>{let i=jn.useRef(null),s=de(i,a),l=Gc(r),u=Wc(t);return jn.useEffect(()=>{let c=i.current;if(!c)return;let d=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(d,"checked").set;if(l!==r&&p){let g=new Event("click",{bubbles:o});p.call(c,r),c.dispatchEvent(g)}},[l,r,o]),(0,su.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}})});Rz.displayName=XJ;function Iz(e){return e?"checked":"unchecked"}var CL=Cz,Pz=bz;var Ia=R(N()),Lz=K(["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","data-[state=unchecked]:bg-input","dark:focus-visible:ring-primary/40"],{variants:{size:{sm:"h-4 w-8",md:"h-6 w-11",lg:"h-7 w-14"},variant:{primary:"data-[state=checked]:bg-primary",success:"data-[state=checked]:bg-success",warning:"data-[state=checked]:bg-warning",destructive:"data-[state=checked]:bg-error",secondary:"data-[state=checked]:bg-accent"}},defaultVariants:{size:"md",variant:"primary"}}),QJ=K("pointer-events-none block rounded-full bg-background shadow-lg ring-0 transition-transform",{variants:{size:{sm:"h-3 w-3 data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0",md:"h-5 w-5 data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0",lg:"h-6 w-6 data-[state=checked]:translate-x-7 data-[state=unchecked]:translate-x-0"}},defaultVariants:{size:"md"}}),SL=jy.forwardRef(({className:e,size:t,variant:r,loading:o,leftIcon:n,rightIcon:a,description:i,"aria-describedby":s,...l},u)=>{let c=jy.useId(),d=i?`${c}-description`:void 0,f=[s,d].filter(Boolean).join(" ")||void 0;return(0,Ia.jsxs)("div",{className:"moonui-theme inline-flex items-center gap-2",children:[n&&(0,Ia.jsx)("span",{className:"text-muted-foreground",children:n}),(0,Ia.jsxs)(CL,{className:P(Lz({size:t,variant:r}),o&&"opacity-80 cursor-wait",e),disabled:o||l.disabled,"aria-describedby":f,...l,ref:u,children:[o?(0,Ia.jsx)("div",{className:"absolute inset-0 flex items-center justify-center",children:(0,Ia.jsx)("div",{className:"h-3 w-3 animate-spin rounded-full border-2 border-muted border-t-primary"})}):null,(0,Ia.jsx)(Pz,{className:P(QJ({size:t}))})]}),a&&(0,Ia.jsx)("span",{className:"text-muted-foreground",children:a}),i&&(0,Ia.jsx)("span",{id:d,className:"text-sm text-muted-foreground",children:i})]})});SL.displayName=CL.displayName;var on=R(M());var Pa=R(N()),bL=on.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]=on.useState(""),[p,g]=on.useState(""),m=on.useRef(null);on.useImperativeHandle(c,()=>m.current);let x=on.useRef([]),h=on.useId(),v=S=>{if(e.length===0)return;let I=Math.max(0,Math.min(e.length-1,S));x.current[I]?.focus()},y=S=>{S.key==="Enter"||S.key===a?(S.preventDefault(),C()):S.key==="Backspace"&&d===""&&e.length>0?b(e.length-1):S.key==="ArrowLeft"&&d===""&&e.length>0&&(S.preventDefault(),v(e.length-1))},w=S=>I=>{switch(I.key){case"ArrowLeft":I.preventDefault(),v(S-1);break;case"ArrowRight":I.preventDefault(),S>=e.length-1?m.current?.focus():v(S+1);break;case"Home":I.preventDefault(),v(0);break;case"End":I.preventDefault(),v(e.length-1);break;case"Delete":case"Backspace":{I.preventDefault();let L=e.length-1;b(S),requestAnimationFrame(()=>{L>0?v(Math.min(S,L-1)):m.current?.focus()});break}default:break}},C=()=>{let S=d.trim();if(S){if(!n&&e.includes(S)){g("This tag already exists"),setTimeout(()=>g(""),2e3);return}if(r&&e.length>=r){g(`Maximum ${r} tags allowed`),setTimeout(()=>g(""),2e3);return}t([...e,S]),f(""),g("")}},b=S=>{l||t(e.filter((I,L)=>L!==S))};return(0,Pa.jsxs)("div",{className:"relative",children:[(0,Pa.jsxs)("div",{className:P("flex items-center 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","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((S,I)=>(0,Pa.jsxs)(_r,{variant:o,className:"gap-1 pr-1.5",children:[(0,Pa.jsx)("span",{className:"text-xs",children:S}),!l&&(0,Pa.jsx)("button",{ref:L=>{x.current[I]=L},type:"button","aria-label":`Remove ${S}`,onClick:()=>b(I),onKeyDown:w(I),className:"ml-1 rounded-full outline-none ring-offset-background focus:ring-2 focus:ring-ring focus:ring-offset-2",children:(0,Pa.jsx)(xo,{className:"h-3 w-3 text-muted-foreground hover:text-foreground transition-colors"})})]},I)),(0,Pa.jsx)("input",{ref:m,type:"text",value:d,onChange:S=>f(S.target.value),onKeyDown:y,onBlur:C,disabled:l,placeholder:e.length===0?i:"","aria-label":"Add tag","aria-describedby":p?h:void 0,"aria-invalid":p?!0:void 0,className:P("flex-1 bg-transparent outline-none placeholder:text-muted-foreground","min-w-[120px]",l&&"cursor-not-allowed"),...u})]}),p&&(0,Pa.jsx)("p",{id:h,role:"status",className:"mt-1 text-xs text-destructive",children:p})]})});bL.displayName="TagsInput";var Wr=R(M());var La=R(N()),ZJ=K(["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}}),RL=Wr.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:g,onChange:m,...x},h)=>{let v=Wr.useId(),y=x.id||v,w=Wr.useRef(null),[C,b]=Wr.useState(p||g||"");Wr.useImperativeHandle(h,()=>w.current);let S=Wr.useCallback(()=>{let D=w.current;if(!D||!l)return;D.style.height="auto";let z=D.scrollHeight;u&&z>u?(D.style.height=`${u}px`,D.style.overflowY="auto"):(D.style.height=`${z}px`,D.style.overflowY="hidden")},[l,u]);Wr.useEffect(()=>{S()},[C,S]),Wr.useEffect(()=>{p!==void 0&&b(p)},[p]);let I=D=>{b(D.target.value),m?.(D)},L=String(C).length,T=c&&(f!==void 0||L>0),k=typeof a=="string"?a:void 0,E=typeof i=="string"?i:void 0,_=k||E;return(0,La.jsxs)("div",{className:P("moonui-theme","space-y-1.5 w-full",t),children:[(0,La.jsxs)("div",{className:"relative",children:[(0,La.jsx)("textarea",{ref:w,className:P(ZJ({variant:o,size:n,isError:!!a,isSuccess:!!i}),s&&"pr-10",e),disabled:d||s,value:p,defaultValue:g,onChange:I,maxLength:f,"aria-invalid":!!a||void 0,"aria-describedby":k?`${y}-error`:E?`${y}-success`:void 0,...x}),s&&(0,La.jsx)("div",{className:"absolute top-3 right-3 text-gray-500",children:(0,La.jsx)(Bt,{className:"h-4 w-4 animate-spin","aria-hidden":"true"})})]}),(0,La.jsxs)("div",{className:"flex items-center justify-between",children:[_&&(0,La.jsx)("p",{className:P("text-xs transition-all",k&&"text-error",E&&"text-success",r),id:k?`${y}-error`:E?`${y}-success`:void 0,children:k||E}),T&&(0,La.jsxs)("p",{className:"text-xs text-muted-foreground dark:text-gray-500 ml-auto",children:[L,f!==void 0&&` / ${f}`]})]})]})});RL.displayName="Textarea";var $n=R(M());var be=R(M(),1),kz=R(Va(),1);var ze=R(N(),1),kL="ToastProvider",[ML,JJ,eee]=Jn("Toast"),[Mz,tDe]=Fe("Toast",[eee]),[tee,qy]=Mz(kL),Ez=e=>{let{__scopeToast:t,label:r="Notification",duration:o=5e3,swipeDirection:n="right",swipeThreshold:a=50,children:i}=e,[s,l]=be.useState(null),[u,c]=be.useState(0),d=be.useRef(!1),f=be.useRef(!1);return r.trim()||console.error(`Invalid prop \`label\` supplied to \`${kL}\`. Expected non-empty \`string\`.`),(0,ze.jsx)(ML.Provider,{scope:t,children:(0,ze.jsx)(tee,{scope:t,label:r,duration:o,swipeDirection:n,swipeThreshold:a,toastCount:u,viewport:s,onViewportChange:l,onToastAdd:be.useCallback(()=>c(p=>p+1),[]),onToastRemove:be.useCallback(()=>c(p=>p-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:f,children:i})})};Ez.displayName=kL;var Az="ToastViewport",ree=["F8"],PL="toast.viewportPause",LL="toast.viewportResume",Dz=be.forwardRef((e,t)=>{let{__scopeToast:r,hotkey:o=ree,label:n="Notifications ({hotkey})",...a}=e,i=qy(Az,r),s=JJ(r),l=be.useRef(null),u=be.useRef(null),c=be.useRef(null),d=be.useRef(null),f=de(t,d,i.onViewportChange),p=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),g=i.toastCount>0;be.useEffect(()=>{let x=h=>{o.length!==0&&o.every(y=>h[y]||h.code===y)&&d.current?.focus()};return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[o]),be.useEffect(()=>{let x=l.current,h=d.current;if(g&&x&&h){let v=()=>{if(!i.isClosePausedRef.current){let b=new CustomEvent(PL);h.dispatchEvent(b),i.isClosePausedRef.current=!0}},y=()=>{if(i.isClosePausedRef.current){let b=new CustomEvent(LL);h.dispatchEvent(b),i.isClosePausedRef.current=!1}},w=b=>{!x.contains(b.relatedTarget)&&y()},C=()=>{x.contains(document.activeElement)||y()};return x.addEventListener("focusin",v),x.addEventListener("focusout",w),x.addEventListener("pointermove",v),x.addEventListener("pointerleave",C),window.addEventListener("blur",v),window.addEventListener("focus",y),()=>{x.removeEventListener("focusin",v),x.removeEventListener("focusout",w),x.removeEventListener("pointermove",v),x.removeEventListener("pointerleave",C),window.removeEventListener("blur",v),window.removeEventListener("focus",y)}}},[g,i.isClosePausedRef]);let m=be.useCallback(({tabbingDirection:x})=>{let v=s().map(y=>{let w=y.ref.current,C=[w,...gee(w)];return x==="forwards"?C:C.reverse()});return(x==="forwards"?v.reverse():v).flat()},[s]);return be.useEffect(()=>{let x=d.current;if(x){let h=v=>{let y=v.altKey||v.ctrlKey||v.metaKey;if(v.key==="Tab"&&!y){let C=document.activeElement,b=v.shiftKey;if(v.target===x&&b){u.current?.focus();return}let L=m({tabbingDirection:b?"backwards":"forwards"}),T=L.findIndex(k=>k===C);IL(L.slice(T+1))?v.preventDefault():b?u.current?.focus():c.current?.focus()}};return x.addEventListener("keydown",h),()=>x.removeEventListener("keydown",h)}},[s,m]),(0,ze.jsxs)(oF,{ref:l,role:"region","aria-label":n.replace("{hotkey}",p),tabIndex:-1,style:{pointerEvents:g?void 0:"none"},children:[g&&(0,ze.jsx)(TL,{ref:u,onFocusFromOutsideViewport:()=>{let x=m({tabbingDirection:"forwards"});IL(x)}}),(0,ze.jsx)(ML.Slot,{scope:r,children:(0,ze.jsx)(q.ol,{tabIndex:-1,...a,ref:f})}),g&&(0,ze.jsx)(TL,{ref:c,onFocusFromOutsideViewport:()=>{let x=m({tabbingDirection:"backwards"});IL(x)}})]})});Dz.displayName=Az;var Nz="ToastFocusProxy",TL=be.forwardRef((e,t)=>{let{__scopeToast:r,onFocusFromOutsideViewport:o,...n}=e,a=qy(Nz,r);return(0,ze.jsx)(Bm,{tabIndex:0,...n,ref:t,style:{position:"fixed"},onFocus:i=>{let s=i.relatedTarget;!a.viewport?.contains(s)&&o()}})});TL.displayName=Nz;var eg="Toast",oee="toast.swipeStart",nee="toast.swipeMove",aee="toast.swipeCancel",iee="toast.swipeEnd",Oz=be.forwardRef((e,t)=>{let{forceMount:r,open:o,defaultOpen:n,onOpenChange:a,...i}=e,[s,l]=qe({prop:o,defaultProp:n??!0,onChange:a,caller:eg});return(0,ze.jsx)(lt,{present:r||s,children:(0,ze.jsx)(uee,{open:s,...i,ref:t,onClose:()=>l(!1),onPause:nt(e.onPause),onResume:nt(e.onResume),onSwipeStart:W(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:W(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:W(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:W(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)})})})});Oz.displayName=eg;var[see,lee]=Mz(eg,{onClose(){}}),uee=be.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,...g}=e,m=qy(eg,r),[x,h]=be.useState(null),v=de(t,D=>h(D)),y=be.useRef(null),w=be.useRef(null),C=n||m.duration,b=be.useRef(0),S=be.useRef(C),I=be.useRef(0),{onToastAdd:L,onToastRemove:T}=m,k=nt(()=>{x?.contains(document.activeElement)&&m.viewport?.focus(),i()}),E=be.useCallback(D=>{!D||D===1/0||(window.clearTimeout(I.current),b.current=new Date().getTime(),I.current=window.setTimeout(k,D))},[k]);be.useEffect(()=>{let D=m.viewport;if(D){let z=()=>{E(S.current),u?.()},F=()=>{let O=new Date().getTime()-b.current;S.current=S.current-O,window.clearTimeout(I.current),l?.()};return D.addEventListener(PL,F),D.addEventListener(LL,z),()=>{D.removeEventListener(PL,F),D.removeEventListener(LL,z)}}},[m.viewport,C,l,u,E]),be.useEffect(()=>{a&&!m.isClosePausedRef.current&&E(C)},[a,C,m.isClosePausedRef,E]),be.useEffect(()=>(L(),()=>T()),[L,T]);let _=be.useMemo(()=>x?zz(x):null,[x]);return m.viewport?(0,ze.jsxs)(ze.Fragment,{children:[_&&(0,ze.jsx)(cee,{__scopeToast:r,role:"status","aria-live":o==="foreground"?"assertive":"polite",children:_}),(0,ze.jsx)(see,{scope:r,onClose:k,children:kz.createPortal((0,ze.jsx)(ML.ItemSlot,{scope:r,children:(0,ze.jsx)(rF,{asChild:!0,onEscapeKeyDown:W(s,()=>{m.isFocusedToastEscapeKeyDownRef.current||k(),m.isFocusedToastEscapeKeyDownRef.current=!1}),children:(0,ze.jsx)(q.li,{tabIndex:0,"data-state":a?"open":"closed","data-swipe-direction":m.swipeDirection,...g,ref:v,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:W(e.onKeyDown,D=>{D.key==="Escape"&&(s?.(D.nativeEvent),D.nativeEvent.defaultPrevented||(m.isFocusedToastEscapeKeyDownRef.current=!0,k()))}),onPointerDown:W(e.onPointerDown,D=>{D.button===0&&(y.current={x:D.clientX,y:D.clientY})}),onPointerMove:W(e.onPointerMove,D=>{if(!y.current)return;let z=D.clientX-y.current.x,F=D.clientY-y.current.y,O=!!w.current,B=["left","right"].includes(m.swipeDirection),A=["left","up"].includes(m.swipeDirection)?Math.min:Math.max,te=B?A(0,z):0,ae=B?0:A(0,F),V=D.pointerType==="touch"?10:2,Q={x:te,y:ae},re={originalEvent:D,delta:Q};O?(w.current=Q,$y(nee,d,re,{discrete:!1})):Tz(Q,m.swipeDirection,V)?(w.current=Q,$y(oee,c,re,{discrete:!1}),D.target.setPointerCapture(D.pointerId)):(Math.abs(z)>V||Math.abs(F)>V)&&(y.current=null)}),onPointerUp:W(e.onPointerUp,D=>{let z=w.current,F=D.target;if(F.hasPointerCapture(D.pointerId)&&F.releasePointerCapture(D.pointerId),w.current=null,y.current=null,z){let O=D.currentTarget,B={originalEvent:D,delta:z};Tz(z,m.swipeDirection,m.swipeThreshold)?$y(iee,p,B,{discrete:!0}):$y(aee,f,B,{discrete:!0}),O.addEventListener("click",A=>A.preventDefault(),{once:!0})}})})})}),m.viewport)})]}):null}),cee=e=>{let{__scopeToast:t,children:r,...o}=e,n=qy(eg,t),[a,i]=be.useState(!1),[s,l]=be.useState(!1);return pee(()=>i(!0)),be.useEffect(()=>{let u=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(u)},[]),s?null:(0,ze.jsx)(Ro,{asChild:!0,children:(0,ze.jsx)(Bm,{...o,children:a&&(0,ze.jsxs)(ze.Fragment,{children:[n.label," ",r]})})})},dee="ToastTitle",Fz=be.forwardRef((e,t)=>{let{__scopeToast:r,...o}=e;return(0,ze.jsx)(q.div,{...o,ref:t})});Fz.displayName=dee;var fee="ToastDescription",_z=be.forwardRef((e,t)=>{let{__scopeToast:r,...o}=e;return(0,ze.jsx)(q.div,{...o,ref:t})});_z.displayName=fee;var Vz="ToastAction",Bz=be.forwardRef((e,t)=>{let{altText:r,...o}=e;return r.trim()?(0,ze.jsx)(Uz,{altText:r,asChild:!0,children:(0,ze.jsx)(EL,{...o,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Vz}\`. Expected non-empty \`string\`.`),null)});Bz.displayName=Vz;var Hz="ToastClose",EL=be.forwardRef((e,t)=>{let{__scopeToast:r,...o}=e,n=lee(Hz,r);return(0,ze.jsx)(Uz,{asChild:!0,children:(0,ze.jsx)(q.button,{type:"button",...o,ref:t,onClick:W(e.onClick,n.onClose)})})});EL.displayName=Hz;var Uz=be.forwardRef((e,t)=>{let{__scopeToast:r,altText:o,...n}=e;return(0,ze.jsx)(q.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":o||void 0,...n,ref:t})});function zz(e){let t=[];return Array.from(e.childNodes).forEach(o=>{if(o.nodeType===o.TEXT_NODE&&o.textContent&&t.push(o.textContent),mee(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(...zz(o))}}),t}function $y(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?Wu(n,a):n.dispatchEvent(a)}var Tz=(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 pee(e=()=>{}){let t=nt(e);Ve(()=>{let r=0,o=0;return r=window.requestAnimationFrame(()=>o=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(o)}},[t])}function mee(e){return e.nodeType===e.ELEMENT_NODE}function gee(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 Gz=Ez,AL=Dz,DL=Oz,NL=Fz,OL=_z,FL=Bz,_L=EL;var fr=R(N()),BL=Gz,Yy=$n.forwardRef(({className:e,...t},r)=>(0,fr.jsx)(AL,{ref:r,className:P("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}));Yy.displayName=AL.displayName;var vee=K("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"}}),Qy=$n.forwardRef(({className:e,variant:t,...r},o)=>(0,fr.jsx)(DL,{ref:o,className:P("moonui-theme",vee({variant:t}),e),...r}));Qy.displayName=DL.displayName;var HL=$n.forwardRef(({className:e,...t},r)=>(0,fr.jsx)(FL,{ref:r,className:P("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}));HL.displayName=FL.displayName;var Zy=$n.forwardRef(({className:e,...t},r)=>(0,fr.jsxs)(_L,{ref:r,className:P("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,fr.jsx)(xo,{className:"h-4 w-4"}),(0,fr.jsx)("span",{className:"sr-only",children:"Close"})]}));Zy.displayName=_L.displayName;var Jy=$n.forwardRef(({className:e,...t},r)=>(0,fr.jsx)(NL,{ref:r,className:P("moonui-theme","text-sm font-semibold [&+div]:text-xs",e),...t}));Jy.displayName=NL.displayName;var e0=$n.forwardRef(({className:e,...t},r)=>(0,fr.jsx)(OL,{ref:r,className:P("moonui-theme","text-sm opacity-90",e),...t}));e0.displayName=OL.displayName;var xee=5,yee=1e6,VL=new Map,Wz=e=>{if(VL.has(e))return;let t=setTimeout(()=>{VL.delete(e),tg({type:"REMOVE_TOAST",toastId:e})},yee);VL.set(e,t)},wee=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,xee)};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?Wz(r):e.toasts.forEach(o=>{Wz(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}},Ky=[],Xy={toasts:[]},Cee=0;function tg(e){Xy=wee(Xy,e),Ky.forEach(t=>{t(Xy)})}function UL({...e}){let t=`toast-${Date.now()}-${++Cee}`,r=n=>tg({type:"UPDATE_TOAST",toast:{...n,id:t}}),o=()=>tg({type:"DISMISS_TOAST",toastId:t});return tg({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:n=>{n||o()}}}),{id:t,dismiss:o,update:r}}function zL(){let[e,t]=$n.useState(Xy);return $n.useEffect(()=>(Ky.push(t),()=>{let r=Ky.indexOf(t);r>-1&&Ky.splice(r,1)}),[e]),{...e,toast:UL,dismiss:r=>tg({type:"DISMISS_TOAST",toastId:r})}}function jz(){let{toasts:e}=zL();return(0,fr.jsxs)(BL,{children:[e.map(function({id:t,title:r,description:o,action:n,variant:a,open:i,onOpenChange:s,...l}){return(0,fr.jsxs)(Qy,{variant:a,open:i,onOpenChange:s,...l,children:[(0,fr.jsxs)("div",{className:"grid gap-1",children:[r&&(0,fr.jsx)(Jy,{children:r}),o&&(0,fr.jsx)(e0,{children:o})]}),n,(0,fr.jsx)(Zy,{})]},t)}),(0,fr.jsx)(Yy,{})]})}var $z=R(M());var qz=R(N()),GL=K(["inline-flex items-center justify-center rounded","border border-border bg-muted","px-1.5 font-mono font-medium text-muted-foreground","shadow-[0_1px_0_1px_hsl(var(--border))]","select-none whitespace-nowrap"],{variants:{size:{sm:"h-5 min-w-5 text-[10px]",md:"h-6 min-w-6 text-xs"}},defaultVariants:{size:"md"}}),WL=$z.forwardRef(({className:e,size:t,children:r,...o},n)=>(0,qz.jsx)("kbd",{ref:n,className:P("moonui-theme",GL({size:t}),e),...o,children:r}));WL.displayName="Kbd";var nn=R(M());var ko=R(N()),jL=K(["moonui-theme inline-flex items-center rounded-md outline-none","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background"],{variants:{size:{sm:"gap-0.5",md:"gap-1",lg:"gap-1.5"}},defaultVariants:{size:"md"}}),See={sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"},$L=nn.forwardRef(({className:e,value:t,defaultValue:r,onValueChange:o,max:n=5,readOnly:a=!1,precision:i="full",icon:s,size:l,"aria-label":u="Rating",...c},d)=>{let p=See[l??"md"],g=i==="half"?.5:1,m=t!==void 0,[x,h]=nn.useState(r??0),v=m?t??0:x,[y,w]=nn.useState(null),C=y!==null?y:v,b=nn.useCallback(T=>{a||(m||h(T),o?.(T))},[a,m,o]),S=nn.useCallback(T=>{if(a)return;let k=null;switch(T.key){case"ArrowRight":case"ArrowUp":k=Math.min(n,v+g);break;case"ArrowLeft":case"ArrowDown":k=Math.max(g,v-g);break;case"Home":k=g;break;case"End":k=n;break;default:return}T.preventDefault(),b(k)},[a,n,v,g,b]),I=T=>{if(nn.isValidElement(s)){let k=s;return nn.cloneElement(k,{className:P(p,"shrink-0",T&&"fill-current",k.props?.className)})}return(0,ko.jsx)(ji,{className:P(p,"shrink-0",T&&"fill-current"),"aria-hidden":"true"})},L=Array.from({length:n},(T,k)=>k+1);return(0,ko.jsx)("div",{ref:d,role:"radiogroup","aria-label":u,"aria-orientation":"horizontal","aria-readonly":a||void 0,tabIndex:a?void 0:0,onKeyDown:S,onMouseLeave:()=>w(null),className:P(jL({size:l}),e),...c,children:L.map(T=>{let k=Math.max(0,Math.min(1,C-(T-1))),E=T-.5;return(0,ko.jsxs)("span",{"data-slot":"rating-star",className:P("relative inline-flex shrink-0",!a&&"cursor-pointer"),children:[(0,ko.jsx)("span",{"aria-hidden":"true",className:"inline-flex text-muted-foreground/30",children:I(!1)}),(0,ko.jsx)("span",{"aria-hidden":"true",className:"pointer-events-none absolute left-0 top-0 h-full overflow-hidden text-amber-400",style:{width:`${k*100}%`},children:I(!0)}),!a&&i==="half"&&(0,ko.jsxs)(ko.Fragment,{children:[(0,ko.jsx)("button",{type:"button",role:"radio","aria-checked":v===E,"aria-label":`${E} stars`,tabIndex:-1,onClick:()=>b(E),onMouseEnter:()=>w(E),className:"absolute inset-y-0 left-0 z-10 w-1/2 cursor-pointer bg-transparent"}),(0,ko.jsx)("button",{type:"button",role:"radio","aria-checked":v===T,"aria-label":`${T} stars`,tabIndex:-1,onClick:()=>b(T),onMouseEnter:()=>w(T),className:"absolute inset-y-0 right-0 z-10 w-1/2 cursor-pointer bg-transparent"})]}),!a&&i==="full"&&(0,ko.jsx)("button",{type:"button",role:"radio","aria-checked":v===T,"aria-label":`${T} ${T===1?"star":"stars"}`,tabIndex:-1,onClick:()=>b(T),onMouseEnter:()=>w(T),className:"absolute inset-0 z-10 cursor-pointer bg-transparent"})]},T)})})});$L.displayName="Rating";var Kz=R(M());var lu=R(N()),qL=K(["inline-block shrink-0 rounded-full","border-current border-t-transparent","animate-spin motion-reduce:animate-none"],{variants:{size:{sm:"h-4 w-4 border-2",md:"h-6 w-6 border-2",lg:"h-8 w-8 border-[3px]",xl:"h-10 w-10 border-4"}},defaultVariants:{size:"md"}}),bee={sm:"h-1 w-1",md:"h-1.5 w-1.5",lg:"h-2 w-2",xl:"h-2.5 w-2.5"},KL=Kz.forwardRef(({className:e,size:t,variant:r="default",label:o="Loading",...n},a)=>(0,lu.jsxs)("div",{ref:a,role:"status","aria-live":"polite",className:P("moonui-theme inline-flex items-center justify-center",e),...n,children:[r==="dots"?(0,lu.jsx)("span",{className:"inline-flex items-center gap-1","aria-hidden":"true",children:[0,1,2].map(i=>(0,lu.jsx)("span",{className:P("inline-block rounded-full bg-current","animate-bounce motion-reduce:animate-none",bee[t??"md"]),style:{animationDelay:`${i*.15}s`}},i))}):(0,lu.jsx)("span",{className:P(qL({size:t})),"aria-hidden":"true"}),(0,lu.jsx)("span",{className:"sr-only",children:o})]}));KL.displayName="Spinner";var Fs=R(M());var Xz=R(N()),XL=K("moonui-theme inline-flex",{variants:{orientation:{horizontal:"flex-row items-center",vertical:"flex-col items-stretch"},attached:{true:"",false:"gap-2"}},compoundVariants:[{orientation:"horizontal",attached:!0,class:["[&>*:not(:first-child)]:rounded-l-none","[&>*:not(:last-child)]:rounded-r-none","[&>*:not(:first-child)]:-ml-px"]},{orientation:"vertical",attached:!0,class:["[&>*:not(:first-child)]:rounded-t-none","[&>*:not(:last-child)]:rounded-b-none","[&>*:not(:first-child)]:-mt-px"]}],defaultVariants:{orientation:"horizontal",attached:!0}}),YL=Fs.forwardRef(({className:e,orientation:t,attached:r,size:o,variant:n,children:a,...i},s)=>{let u=o!==void 0||n!==void 0?Fs.Children.map(a,c=>{if(!Fs.isValidElement(c)||c.type!==Ee)return c;let d=c.props;return Fs.cloneElement(c,{size:d.size??o,variant:d.variant??n})}):a;return(0,Xz.jsx)("div",{ref:s,role:"group",className:P(XL({orientation:t,attached:r}),e),...i,children:u})});YL.displayName="ButtonGroup";var du=R(M());var $r=R(M(),1);var sn=R(M(),1),QL=R(N(),1),Ree=Object.defineProperty,an=(e,t)=>Ree(e,"name",{value:t,configurable:!0});function Iee(e,t){let r=sn.createContext(t);r.displayName=e+"Context";let o=an(a=>{let{children:i,...s}=a,l=sn.useMemo(()=>s,Object.values(s));return(0,QL.jsx)(r.Provider,{value:l,children:i})},"Provider");o.displayName=e+"Provider";function n(a,i={}){let{optional:s=!1}=i,l=sn.useContext(r);if(l)return l;if(t!==void 0)return t;if(!s)throw new Error(`\`${a}\` must be used within \`${e}\``)}return an(n,"useContext"),[o,n]}an(Iee,"createContext");function yi(e,t=[]){let r=[];function o(a,i){let s=sn.createContext(i);s.displayName=a+"Context";let l=r.length;r=[...r,i];let u=an(d=>{let{scope:f,children:p,...g}=d,m=f?.[e]?.[l]||s,x=sn.useMemo(()=>g,Object.values(g));return(0,QL.jsx)(m.Provider,{value:x,children:p})},"Provider");u.displayName=a+"Provider";function c(d,f,p={}){let{optional:g=!1}=p,m=f?.[e]?.[l]||s,x=sn.useContext(m);if(x)return x;if(i!==void 0)return i;if(!g)throw new Error(`\`${d}\` must be used within \`${a}\``)}return an(c,"useContext"),[u,c]}an(o,"createContext");let n=an(()=>{let a=r.map(i=>sn.createContext(i));return an(function(s){let l=s?.[e]||a;return sn.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])},"useScope")},"createScope");return n.scopeName=e,[o,Yz(n,...t)]}an(yi,"createContextScope");function Yz(...e){let t=e[0];if(e.length===1)return t;let r=an(()=>{let o=e.map(n=>({useScope:n(),scopeName:n.scopeName}));return an(function(a){let i=o.reduce((s,{useScope:l,scopeName:u})=>{let d=l(a)[`__scope${u}`];return{...s,...d}},{});return sn.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])},"useComposedScopes")},"createScope");return r.scopeName=t.scopeName,r}an(Yz,"composeContextScopes");var a4=R(M(),1),i4=R(Va(),1);var Lt=R(M(),1);var Qz=R(M(),1),Pee=Object.defineProperty,JL=(e,t)=>Pee(e,"name",{value:t,configurable:!0});function ZL(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}JL(ZL,"setRef");function Zz(...e){return t=>{let r=!1,o=e.map(n=>{let a=ZL(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():ZL(e[n],null)}}}}JL(Zz,"composeRefs");function ln(...e){return Qz.useCallback(Zz(...e),e)}JL(ln,"useComposedRefs");var xd=!1;var kee=R(N(),1),Lee=Object.defineProperty,un=(e,t)=>Lee(e,"name",{value:t,configurable:!0}),Tee=un((e,t)=>{let r={...t};for(let o in t){let n=e[o],a=t[o];if(/^on[A-Z]/.test(o))if(n&&a){let s=typeof n=="function",l=typeof a=="function";xd&&(!s||!l)&&console.warn(`Slot: Expected a function for ${o}, but received ${[typeof n,typeof a].filter(u=>u!=="function").join(" and ")}.`),r[o]=(...u)=>{let c=l?a(...u):void 0;return s&&n(...u),c}}else n&&(r[o]=n);else o==="style"?r[o]={...typeof n=="object"?n:null,...typeof a=="object"?a:null}:o==="className"?r[o]=[n,a].filter(Boolean).join(" "):o==="aria-describedby"&&(r[o]=Jz(a,n))}return{...e,...r}},"mergeProps");function Jz(...e){let t=new Set;for(let r of e)if(typeof r=="string")for(let o of String(r).trim().split(/\s+/))o&&t.add(o);return t.size>0?Array.from(t).join(" "):void 0}un(Jz,"concatAriaDescribedby");var e4=Lt.createContext(Tee);e4.displayName="SlotContext";function wi(e){let t=Lt.forwardRef((r,o)=>{let n=Lt.useContext(e4),{children:a,mergeProps:i=n,...s}=r,l=null,u=!1,c=[];e1(a)&&typeof t0=="function"&&(a=t0(a._payload)),Lt.Children.forEach(a,g=>{if(o4(g)){u=!0;let m=g,x="child"in m.props?m.props.child:m.props.children;e1(x)&&typeof t0=="function"&&(x=t0(x._payload)),l=Eee(m,x),c.push(l?.props?.children)}else c.push(g)}),l?l=Lt.cloneElement(l,void 0,c):!u&&Lt.Children.count(a)===1&&Lt.isValidElement(a)&&(l=a);let d=l?r4(l):void 0,f=ln(o,d);if(!l){if(a||a===0)throw new Error(u?Nee(e):Dee(e));return a}let p=i(s,l.props??{});return l.type!==Lt.Fragment&&(p.ref=o?f:d),Lt.cloneElement(l,p)});return t.displayName=`${e}.Slot`,t}un(wi,"createSlot");var t4=Symbol.for("radix.slottable");function Mee(e){let t=un(r=>"child"in r?r.children(r.child):r.children,"Slottable");return t.displayName=`${e}.Slottable`,t.__radixId=t4,t}un(Mee,"createSlottable");var Eee=un((e,t)=>{if("child"in e.props){let r=e.props.child;return Lt.isValidElement(r)?Lt.cloneElement(r,void 0,e.props.children(r.props.children)):null}return Lt.isValidElement(t)?t:null},"getSlottableElementFromSlottable");function r4(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)}un(r4,"getElementRef");function o4(e){return Lt.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===t4}un(o4,"isSlottable");var Aee=Symbol.for("react.lazy");function e1(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===Aee&&"_payload"in e&&n4(e._payload)}un(e1,"isLazyComponent");function n4(e){return typeof e=="object"&&e!==null&&"then"in e}un(n4,"isPromiseLike");var Dee=un(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),Nee=un(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),t0=Lt[" use ".trim().toString()];var s4=R(N(),1),Oee=Object.defineProperty,Fee=(e,t)=>Oee(e,"name",{value:t,configurable:!0}),_ee=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],yd=_ee.reduce((e,t)=>{let r=wi(`Primitive.${t}`),o=a4.forwardRef((n,a)=>{let{asChild:i,...s}=n,l=i?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,s4.jsx)(l,{...s,ref:a})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function Vee(e,t){e&&i4.flushSync(()=>e.dispatchEvent(t))}Fee(Vee,"dispatchDiscreteCustomEvent");var tr=R(M(),1);var Bee=Object.defineProperty,wd=(e,t)=>Bee(e,"name",{value:t,configurable:!0}),l4=!!(typeof window<"u"&&window.document&&window.document.createElement);function _s(e,t,{checkForDefaultPrevented:r=!0}={}){return wd(function(n){if(e?.(n),r===!1||!n||!n.defaultPrevented)return t?.(n)},"handleEvent")}wd(_s,"composeEventHandlers");function Hee(e){if(!l4)throw new Error("Cannot access window outside of the DOM");return e?.ownerDocument?.defaultView??window}wd(Hee,"getOwnerWindow");function t1(e){if(!l4)throw new Error("Cannot access document outside of the DOM");return e?.ownerDocument??document}wd(t1,"getOwnerDocument");function u4(e,t=!1){let{activeElement:r}=t1(e);if(!r?.nodeName)return null;if(c4(r)&&r.contentDocument)return u4(r.contentDocument.body,t);if(t){let o=r.getAttribute("aria-activedescendant");if(o){let n=t1(r).getElementById(o);if(n)return n}}return r}wd(u4,"getActiveElement");function c4(e){return e.tagName==="IFRAME"}wd(c4,"isFrame");var qn=R(M(),1);var r0=R(N(),1),lo=R(M(),1);var uu=R(N(),1);var Uee=Object.defineProperty,er=(e,t)=>Uee(e,"name",{value:t,configurable:!0});function n1(e){let t=e+"CollectionProvider",[r,o]=yi(t),[n,a]=r(t,{collectionRef:{current:null},itemMap:new Map}),i=er(m=>{let{scope:x,children:h}=m,v=qn.useRef(null),y=qn.useRef(new Map).current;return(0,r0.jsx)(n,{scope:x,itemMap:y,collectionRef:v,children:h})},"CollectionProvider");i.displayName=t;let s=e+"CollectionSlot",l=wi(s),u=qn.forwardRef((m,x)=>{let{scope:h,children:v}=m,y=a(s,h),w=ln(x,y.collectionRef);return(0,r0.jsx)(l,{ref:w,children:v})});u.displayName=s;let c=e+"CollectionItemSlot",d="data-radix-collection-item",f=wi(c),p=qn.forwardRef((m,x)=>{let{scope:h,children:v,...y}=m,w=qn.useRef(null),C=ln(x,w),b=a(c,h);return qn.useEffect(()=>(b.itemMap.set(w,{ref:w,...y}),()=>void b.itemMap.delete(w))),(0,r0.jsx)(f,{[d]:"",ref:C,children:v})});p.displayName=c;function g(m){let x=a(e+"CollectionConsumer",m);return qn.useCallback(()=>{let v=x.collectionRef.current;if(!v)return[];let y=Array.from(v.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 er(g,"useCollection"),[{Provider:i,Slot:u,ItemSlot:p},g,o]}er(n1,"createCollection");var d4=new WeakMap,Nt,cn,r1=(cn=class extends Map{constructor(r){super(r);u0(this,Nt,void 0);ig(this,Nt,[...super.keys()]),d4.set(this,!0)}set(r,o){return d4.get(this)&&(this.has(r)?rr(this,Nt)[rr(this,Nt).indexOf(r)]=r:rr(this,Nt).push(r)),super.set(r,o),this}insert(r,o,n){let a=this.has(o),i=rr(this,Nt).length,s=a1(r),l=s>=0?s:i+s,u=l<0||l>=i?-1:l;if(u===this.size||a&&u===this.size-1||u===-1)return this.set(o,n),this;let c=this.size+(a?0:1);s<0&&l++;let d=[...rr(this,Nt)],f,p=!1;for(let g=l;g<c;g++)if(l===g){let m=d[g];d[g]===o&&(m=d[g+1]),a&&this.delete(o),f=this.get(m),this.set(o,n)}else{!p&&d[g-1]===o&&(p=!0);let m=d[p?g:g-1],x=f;f=this.get(m),this.delete(m),this.set(m,x)}return this}with(r,o,n){let a=new cn(this);return a.insert(r,o,n),a}before(r){let o=rr(this,Nt).indexOf(r)-1;if(!(o<0))return this.entryAt(o)}setBefore(r,o,n){let a=rr(this,Nt).indexOf(r);return a===-1?this:this.insert(a,o,n)}after(r){let o=rr(this,Nt).indexOf(r);if(o=o===-1||o===this.size-1?-1:o+1,o!==-1)return this.entryAt(o)}setAfter(r,o,n){let a=rr(this,Nt).indexOf(r);return a===-1?this:this.insert(a+1,o,n)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return ig(this,Nt,[]),super.clear()}delete(r){let o=super.delete(r);return o&&rr(this,Nt).splice(rr(this,Nt).indexOf(r),1),o}deleteAt(r){let o=this.keyAt(r);return o!==void 0?this.delete(o):!1}at(r){let o=o0(rr(this,Nt),r);if(o!==void 0)return this.get(o)}entryAt(r){let o=o0(rr(this,Nt),r);if(o!==void 0)return[o,this.get(o)]}indexOf(r){return rr(this,Nt).indexOf(r)}keyAt(r){return o0(rr(this,Nt),r)}from(r,o){let n=this.indexOf(r);if(n===-1)return;let a=n+o;return a<0&&(a=0),a>=this.size&&(a=this.size-1),this.at(a)}keyFrom(r,o){let n=this.indexOf(r);if(n===-1)return;let a=n+o;return a<0&&(a=0),a>=this.size&&(a=this.size-1),this.keyAt(a)}find(r,o){let n=0;for(let a of this){if(Reflect.apply(r,o,[a,n,this]))return a;n++}}findIndex(r,o){let n=0;for(let a of this){if(Reflect.apply(r,o,[a,n,this]))return n;n++}return-1}filter(r,o){let n=[],a=0;for(let i of this)Reflect.apply(r,o,[i,a,this])&&n.push(i),a++;return new cn(n)}map(r,o){let n=[],a=0;for(let i of this)n.push([i[0],Reflect.apply(r,o,[i,a,this])]),a++;return new cn(n)}reduce(...r){let[o,n]=r,a=0,i=n??this.at(0);for(let s of this)a===0&&r.length===1?i=s:i=Reflect.apply(o,this,[i,s,a,this]),a++;return i}reduceRight(...r){let[o,n]=r,a=n??this.at(-1);for(let i=this.size-1;i>=0;i--){let s=this.at(i);i===this.size-1&&r.length===1?a=s:a=Reflect.apply(o,this,[a,s,i,this])}return a}toSorted(r){let o=[...this.entries()].sort(r);return new cn(o)}toReversed(){let r=new cn;for(let o=this.size-1;o>=0;o--){let n=this.keyAt(o),a=this.get(n);r.set(n,a)}return r}toSpliced(...r){let o=[...this.entries()];return o.splice(...r),new cn(o)}slice(r,o){let n=new cn,a=this.size-1;if(r===void 0)return n;r<0&&(r=r+this.size),o!==void 0&&o>0&&(a=o-1);for(let i=r;i<=a;i++){let s=this.keyAt(i),l=this.get(s);n.set(s,l)}return n}every(r,o){let n=0;for(let a of this){if(!Reflect.apply(r,o,[a,n,this]))return!1;n++}return!0}some(r,o){let n=0;for(let a of this){if(Reflect.apply(r,o,[a,n,this]))return!0;n++}return!1}},Nt=new WeakMap,er(cn,"OrderedDict"),cn);function o0(e,t){if("at"in Array.prototype)return Array.prototype.at.call(e,t);let r=f4(e,t);return r===-1?void 0:e[r]}er(o0,"at");function f4(e,t){let r=e.length,o=a1(t),n=o>=0?o:r+o;return n<0||n>=r?-1:n}er(f4,"toSafeIndex");function a1(e){return e!==e||e===0?0:Math.trunc(e)}er(a1,"toSafeInteger");function zee(e){let t=e+"CollectionProvider",[r,o]=yi(t),[n,a]=r(t,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new r1,setItemMap:er(()=>{},"setItemMap")}),i=er(({state:y,...w})=>y?(0,uu.jsx)(l,{...w,state:y}):(0,uu.jsx)(s,{...w}),"CollectionProvider");i.displayName=t;let s=er(y=>{let w=x();return(0,uu.jsx)(l,{...y,state:w})},"CollectionInit");s.displayName=t+"Init";let l=er(y=>{let{scope:w,children:C,state:b}=y,S=lo.useRef(null),[I,L]=lo.useState(null),T=ln(S,L),[k,E]=b;return lo.useEffect(()=>{if(!I)return;let _=g4(()=>{});return _.observe(I,{childList:!0,subtree:!0}),()=>{_.disconnect()}},[I]),(0,uu.jsx)(n,{scope:w,itemMap:k,setItemMap:E,collectionRef:T,collectionRefObject:S,collectionElement:I,children:C})},"CollectionProviderImpl");l.displayName=t+"Impl";let u=e+"CollectionSlot",c=wi(u),d=lo.forwardRef((y,w)=>{let{scope:C,children:b}=y,S=a(u,C),I=ln(w,S.collectionRef);return(0,uu.jsx)(c,{ref:I,children:b})});d.displayName=u;let f=e+"CollectionItemSlot",p="data-radix-collection-item",g=wi(f),m=lo.forwardRef((y,w)=>{let{scope:C,children:b,...S}=y,I=lo.useRef(null),[L,T]=lo.useState(null),k=ln(w,I,T),E=a(f,C),{setItemMap:_}=E,D=lo.useRef(S);p4(D.current,S)||(D.current=S);let z=D.current;return lo.useEffect(()=>{let F=z;return _(O=>L?O.has(L)?O.set(L,{...F,element:L}).toSorted(o1):(O.set(L,{...F,element:L}),O.toSorted(o1)):O),()=>{_(O=>!L||!O.has(L)?O:(O.delete(L),new r1(O)))}},[L,z,_]),(0,uu.jsx)(g,{[p]:"",ref:k,children:b})});m.displayName=f;function x(){return lo.useState(new r1)}er(x,"useInitCollection");function h(y){let{itemMap:w}=a(e+"CollectionConsumer",y);return w}return er(h,"useCollection"),[{Provider:i,Slot:d,ItemSlot:m},{createCollectionScope:o,useCollection:h,useInitCollection:x}]}er(zee,"createCollection");function p4(e,t){if(e===t)return!0;if(typeof e!="object"||typeof t!="object"||e==null||t==null)return!1;let r=Object.keys(e),o=Object.keys(t);if(r.length!==o.length)return!1;for(let n of r)if(!Object.prototype.hasOwnProperty.call(t,n)||e[n]!==t[n])return!1;return!0}er(p4,"shallowEqual");function m4(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}er(m4,"isElementPreceding");function o1(e,t){return!e[1].element||!t[1].element?0:m4(e[1].element,t[1].element)?-1:1}er(o1,"sortByDocumentPosition");function g4(e){return new MutationObserver(r=>{for(let o of r)if(o.type==="childList"){e();return}})}er(g4,"getChildListObserver");var i1=R(M(),1);var h4=R(M(),1),Vs=globalThis?.document?h4.useLayoutEffect:()=>{};var Gee=Object.defineProperty,Wee=(e,t)=>Gee(e,"name",{value:t,configurable:!0}),jee=i1[" useId ".trim().toString()]||(()=>{}),$ee=0;function s1(e){let[t,r]=i1.useState(jee());return Vs(()=>{e||r(o=>o??String($ee++))},[e]),e||(t?`radix-${t}`:"")}Wee(s1,"useId");var Cd=R(M(),1),qee=Object.defineProperty,Kee=(e,t)=>qee(e,"name",{value:t,configurable:!0});function l1(e){let t=Cd.useRef(e);return Cd.useEffect(()=>{t.current=e}),Cd.useMemo(()=>(...r)=>t.current?.(...r),[])}Kee(l1,"useCallbackRef");var dn=R(M(),1);var Kn=R(M(),1);var Sd=R(M(),1),Xee=Object.defineProperty,Yee=(e,t)=>Xee(e,"name",{value:t,configurable:!0}),v4=Sd[" useEffectEvent ".trim().toString()],x4=Sd[" useInsertionEffect ".trim().toString()];function u1(e){if(typeof v4=="function")return v4(e);let t=Sd.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof x4=="function"?x4(()=>{t.current=e}):Vs(()=>{t.current=e}),Sd.useMemo(()=>(...r)=>t.current?.(...r),[])}Yee(u1,"useEffectEvent");var Qee=Object.defineProperty,rg=(e,t)=>Qee(e,"name",{value:t,configurable:!0}),Zee=dn[" useInsertionEffect ".trim().toString()]||Vs;function bd({prop:e,defaultProp:t,onChange:r=rg(()=>{},"onChange"),caller:o}){let[n,a,i]=w4({defaultProp:t,onChange:r}),s=e!==void 0,l=s?e:n;if(xd){let c=dn.useRef(e!==void 0);dn.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=dn.useCallback(c=>{if(s){let d=C4(c)?c(e):c;d!==e&&i.current?.(d)}else a(c)},[s,e,a,i]);return[l,u]}rg(bd,"useControllableState");function w4({defaultProp:e,onChange:t}){let[r,o]=dn.useState(e),n=dn.useRef(r),a=dn.useRef(t);return Zee(()=>{a.current=t},[t]),dn.useEffect(()=>{n.current!==r&&(a.current?.(r),n.current=r)},[r,n]),[r,o,a]}rg(w4,"useUncontrolledState");function C4(e){return typeof e=="function"}rg(C4,"isFunction");var y4=Symbol("RADIX:SYNC_STATE");function Jee(e,t,r,o){let{prop:n,defaultProp:a,onChange:i,caller:s}=t,l=n!==void 0,u=u1(i);if(xd){let x=Kn.useRef(n!==void 0);Kn.useEffect(()=>{let h=x.current;h!==l&&console.warn(`${s} is changing from ${h?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),x.current=l},[l,s])}let c=[{...r,state:a}];o&&c.push(o);let[d,f]=Kn.useReducer((x,h)=>{if(h.type===y4)return{...x,state:h.state};let v=e(x,h);return l&&!Object.is(v.state,x.state)&&u(v.state),v},...c),p=d.state,g=Kn.useRef(p);Kn.useEffect(()=>{g.current!==p&&(g.current=p,l||u(p))},[p,g,l]);let m=Kn.useMemo(()=>n!==void 0?{...d,state:n}:d,[d,n]);return Kn.useEffect(()=>{l&&!Object.is(n,d.state)&&f({type:y4,state:n})},[n,d.state,l]),[m,f]}rg(Jee,"useControllableStateReducer");var n0=R(M(),1),rte=R(N(),1),ete=Object.defineProperty,tte=(e,t)=>ete(e,"name",{value:t,configurable:!0}),ote=n0.createContext(void 0);function og(e){let t=n0.useContext(ote);return e||t||"ltr"}tte(og,"useDirection");var ate=R(M(),1),a0=R(M(),1),nte=Object.defineProperty,d1=(e,t)=>nte(e,"name",{value:t,configurable:!0}),c1=!1;function S4(){let[e,t]=a0.useState(c1);return a0.useEffect(()=>{c1||(c1=!0,t(!0))},[]),e}d1(S4,"useIsHydrated");var b4=ate[" useSyncExternalStore ".trim().toString()];function R4(){return()=>{}}d1(R4,"subscribe");function I4(){return b4(R4,()=>!0,()=>!1)}d1(I4,"useIsHydratedModern");var P4=typeof b4=="function"?I4:S4;var Bs=R(N(),1),ite=Object.defineProperty,cu=(e,t)=>ite(e,"name",{value:t,configurable:!0}),f1="rovingFocusGroup.onEntryFocus",ste={bubbles:!1,cancelable:!0},i0="RovingFocusGroup",[p1,L4,lte]=n1(i0),[ute,m1]=yi(i0,[lte]),[cte,dte]=ute(i0),T4=tr.forwardRef(cu(function(t,r){return(0,Bs.jsx)(p1.Provider,{scope:t.__scopeRovingFocusGroup,children:(0,Bs.jsx)(p1.Slot,{scope:t.__scopeRovingFocusGroup,children:(0,Bs.jsx)(fte,{...t,ref:r})})})},"RovingFocusGroup")),fte=tr.forwardRef(cu(function(t,r){let{__scopeRovingFocusGroup:o,orientation:n,loop:a=!1,dir:i,currentTabStopId:s,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:u,onEntryFocus:c,preventScrollOnEntryFocus:d=!1,...f}=t,p=tr.useRef(null),g=ln(r,p),m=og(i),[x,h]=bd({prop:s,defaultProp:l??null,onChange:u,caller:i0}),[v,y]=tr.useState(!1),w=l1(c),C=L4(o),b=tr.useRef(!1),[S,I]=tr.useState(0);return tr.useEffect(()=>{let L=p.current;if(L)return L.addEventListener(f1,w),()=>L.removeEventListener(f1,w)},[w]),(0,Bs.jsx)(cte,{scope:o,orientation:n,dir:m,loop:a,currentTabStopId:x,onItemFocus:tr.useCallback(L=>h(L),[h]),onItemShiftTab:tr.useCallback(()=>y(!0),[]),onFocusableItemAdd:tr.useCallback(()=>I(L=>L+1),[]),onFocusableItemRemove:tr.useCallback(()=>I(L=>L-1),[]),children:(0,Bs.jsx)(yd.div,{tabIndex:v||S===0?-1:0,"data-orientation":n,...f,ref:g,style:{outline:"none",...t.style},onMouseDown:_s(t.onMouseDown,()=>{b.current=!0}),onFocus:_s(t.onFocus,L=>{let T=!b.current;if(L.target===L.currentTarget&&T&&!v){let k=new CustomEvent(f1,ste);if(L.currentTarget.dispatchEvent(k),!k.defaultPrevented){let E=C().filter(O=>O.focusable),_=E.find(O=>O.active),D=E.find(O=>O.id===x),F=[_,D,...E].filter(Boolean).map(O=>O.ref.current);g1(F,d)}}b.current=!1}),onBlur:_s(t.onBlur,()=>y(!1))})})},"RovingFocusGroupImpl")),pte="RovingFocusGroupItem",k4=tr.forwardRef(cu(function(t,r){let{__scopeRovingFocusGroup:o,focusable:n=!0,active:a=!1,tabStopId:i,children:s,...l}=t,u=s1(),c=i||u,d=dte(pte,o),f=d.currentTabStopId===c,p=L4(o),{onFocusableItemAdd:g,onFocusableItemRemove:m,currentTabStopId:x}=d,h=P4();return Vs(()=>{if(!(!h||!n))return g(),()=>m()},[h,n,g,m]),tr.useEffect(()=>{if(!(h||!n))return g(),()=>m()},[h,n,g,m]),(0,Bs.jsx)(p1.ItemSlot,{scope:o,id:c,focusable:n,active:a,children:(0,Bs.jsx)(yd.span,{tabIndex:f?0:-1,"data-orientation":d.orientation,...l,ref:r,onMouseDown:_s(t.onMouseDown,v=>{n?d.onItemFocus(c):v.preventDefault()}),onFocus:_s(t.onFocus,()=>d.onItemFocus(c)),onKeyDown:_s(t.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){d.onItemShiftTab();return}if(v.target!==v.currentTarget)return;let y=E4(v,d.orientation,d.dir);if(y!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let C=p().filter(b=>b.focusable).map(b=>b.ref.current);if(y==="last")C.reverse();else if(y==="prev"||y==="next"){y==="prev"&&C.reverse();let b=C.indexOf(v.currentTarget);C=d.loop?A4(C,b+1):C.slice(b+1)}setTimeout(()=>g1(C))}}),children:typeof s=="function"?s({isCurrentTabStop:f,hasTabStop:x!=null}):s})})},"RovingFocusGroupItem")),mte={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function M4(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}cu(M4,"getDirectionAwareKey");function E4(e,t,r){let o=M4(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return mte[o]}cu(E4,"getFocusIntent");function g1(e,t=!1){let r=document.activeElement;for(let o of e)if(o===r||(o.focus({preventScroll:t}),document.activeElement!==r))return}cu(g1,"focusFirst");function A4(e,t){return e.map((r,o)=>e[(t+o)%e.length])}cu(A4,"wrapArray");var jr=R(N(),1),hte=Object.defineProperty,Hs=(e,t)=>hte(e,"name",{value:t,configurable:!0}),Rd="ToggleGroup",[N4,pNe]=yi(Rd,[m1]),O4=m1(),F4=$r.forwardRef(Hs(function(t,r){let{type:o,...n}=t;if(o==="single")return(0,jr.jsx)(vte,{role:"radiogroup",...n,ref:r});if(o==="multiple")return(0,jr.jsx)(xte,{role:"toolbar",...n,ref:r});throw new Error(`Missing prop \`type\` expected on \`${Rd}\``)},"ToggleGroup")),[_4,V4]=N4(Rd),vte=$r.forwardRef(Hs(function(t,r){let{value:o,defaultValue:n,onValueChange:a=Hs(()=>{},"onValueChange"),...i}=t,[s,l]=bd({prop:o,defaultProp:n??"",onChange:a,caller:Rd});return(0,jr.jsx)(_4,{scope:t.__scopeToggleGroup,type:"single",value:$r.useMemo(()=>s?[s]:[],[s]),onItemActivate:l,onItemDeactivate:$r.useCallback(()=>l(""),[l]),children:(0,jr.jsx)(B4,{...i,ref:r})})},"ToggleGroupImplSingle")),xte=$r.forwardRef(Hs(function(t,r){let{value:o,defaultValue:n,onValueChange:a=Hs(()=>{},"onValueChange"),...i}=t,[s,l]=bd({prop:o,defaultProp:n??[],onChange:a,caller:Rd}),u=$r.useCallback(d=>l((f=[])=>[...f,d]),[l]),c=$r.useCallback(d=>l((f=[])=>f.filter(p=>p!==d)),[l]);return(0,jr.jsx)(_4,{scope:t.__scopeToggleGroup,type:"multiple",value:s,onItemActivate:u,onItemDeactivate:c,children:(0,jr.jsx)(B4,{...i,ref:r})})},"ToggleGroupImplMultiple")),[yte,wte]=N4(Rd),B4=$r.forwardRef(Hs(function(t,r){let{__scopeToggleGroup:o,disabled:n=!1,rovingFocus:a=!0,orientation:i,dir:s,loop:l=!0,...u}=t,c=O4(o),d=og(s),f={dir:d,...u};return(0,jr.jsx)(yte,{scope:o,rovingFocus:a,disabled:n,children:a?(0,jr.jsx)(T4,{asChild:!0,...c,orientation:i,dir:d,loop:l,children:(0,jr.jsx)(yd.div,{...f,ref:r})}):(0,jr.jsx)(yd.div,{...f,ref:r})})},"ToggleGroupImpl")),h1="ToggleGroupItem",H4=$r.forwardRef(Hs(function(t,r){let o=V4(h1,t.__scopeToggleGroup),n=wte(h1,t.__scopeToggleGroup),a=O4(t.__scopeToggleGroup),i=o.value.includes(t.value),s=n.disabled||t.disabled,l={...t,pressed:i,disabled:s},u=$r.useRef(null);return n.rovingFocus?(0,jr.jsx)(k4,{asChild:!0,...a,focusable:!s,active:i,ref:u,children:(0,jr.jsx)(D4,{...l,ref:r})}):(0,jr.jsx)(D4,{...l,ref:r})},"ToggleGroupItem")),D4=$r.forwardRef(Hs(function(t,r){let{__scopeToggleGroup:o,value:n,...a}=t,i=V4(h1,o),s={role:"radio","aria-checked":t.pressed,"aria-pressed":void 0},l=i.type==="single"?s:void 0;return(0,jr.jsx)($m,{...l,...a,ref:r,onPressedChange:u=>{u?i.onItemActivate(n):i.onItemDeactivate(n)}})},"ToggleGroupItemImpl"));var s0=R(N()),U4=du.createContext({size:"default",variant:"default"}),v1=du.forwardRef(({className:e,variant:t,size:r,children:o,...n},a)=>(0,s0.jsx)(F4,{ref:a,className:P("moonui-theme inline-flex items-center justify-center gap-1","data-[orientation=vertical]:flex-col data-[orientation=vertical]:items-stretch data-[orientation=vertical]:justify-start",e),...n,children:(0,s0.jsx)(U4.Provider,{value:{variant:t,size:r},children:o})}));v1.displayName="ToggleGroup";var x1=du.forwardRef(({className:e,children:t,variant:r,size:o,...n},a)=>{let i=du.useContext(U4);return(0,s0.jsx)(H4,{ref:a,className:P(qm({variant:i.variant??r,size:i.size??o}),e),...n,children:t})});x1.displayName="ToggleGroupItem";
|
|
74
|
+
}`,Eq="^\\d+$",Aq="^[a-zA-Z]+$",Dq="^[a-zA-Z0-9]+$";var rn=b(N()),KE=ai.forwardRef(({className:e,containerClassName:t,...o},r)=>(0,rn.jsx)(ay,{ref:r,"aria-label":"One-time password",containerClassName:P("moonui-theme","flex items-center gap-2 has-[:disabled]:opacity-50",t),className:P("disabled:cursor-not-allowed",e),...o}));KE.displayName="InputOTP";var XE=ai.forwardRef(({className:e,...t},o)=>(0,rn.jsx)("div",{ref:o,className:P("flex items-center",e),...t}));XE.displayName="InputOTPGroup";var YE=Y(["relative flex h-10 w-10 items-center justify-center","border-y border-r border-input text-sm text-foreground","transition-all duration-200","first:rounded-l-md first:border-l last:rounded-r-md"],{variants:{isActive:{true:"z-10 ring-2 ring-ring ring-offset-background",false:""}},defaultVariants:{isActive:!1}}),ZE=ai.forwardRef(({index:e,className:t,...o},r)=>{let n=ai.useContext(ry)?.slots?.[e],s=n?.char,i=n?.hasFakeCaret,l=n?.isActive;return(0,rn.jsxs)("div",{ref:r,"data-active":l?"":void 0,className:P(YE({isActive:!!l}),t),...o,children:[s,i&&(0,rn.jsx)("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:(0,rn.jsx)("div",{className:"h-4 w-px animate-caret-blink bg-foreground duration-1000"})})]})});ZE.displayName="InputOTPSlot";var QE=ai.forwardRef(({className:e,...t},o)=>(0,rn.jsx)("div",{ref:o,role:"separator",className:P("text-muted-foreground",e),...t,children:(0,rn.jsx)(xu,{"aria-hidden":"true"})}));QE.displayName="InputOTPSeparator";var Fl=b(k());var Ce=b(N());function JE({children:e,componentName:t,className:o,showPreview:r=!0,previewDuration:a=2e3}){let[n,s]=(0,Fl.useState)(!1),[i,l]=(0,Fl.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,Ce.jsxs)("div",{className:P("relative group cursor-pointer transition-all duration-300",o),onMouseEnter:u,onMouseLeave:c,children:[(0,Ce.jsx)("div",{className:P("transition-all duration-300",!n&&"blur-sm grayscale-[0.3] opacity-60"),children:e}),(0,Ce.jsx)("div",{className:P("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,Ce.jsxs)("div",{className:"text-center space-y-3 p-6",children:[(0,Ce.jsx)("div",{className:"flex justify-center",children:(0,Ce.jsxs)(wo,{variant:"secondary",className:"bg-gradient-to-r from-amber-500 to-orange-500 text-white border-0 px-3 py-1",children:[(0,Ce.jsx)(yi,{className:"w-3 h-3 mr-1"}),"PRO ONLY"]})}),(0,Ce.jsx)("div",{className:"flex justify-center",children:(0,Ce.jsx)("div",{className:"p-3 rounded-full bg-amber-100 dark:bg-amber-900/30",children:(0,Ce.jsx)(Ci,{className:"w-6 h-6 text-amber-600 dark:text-amber-400"})})}),(0,Ce.jsx)("h3",{className:"font-semibold text-gray-900 dark:text-gray-100",children:t}),(0,Ce.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,Ce.jsxs)(Ae,{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,Ce.jsx)(Si,{className:"w-4 h-4 mr-2"}),"Upgrade to Pro"]})]})}),r&&!n&&(0,Ce.jsx)("div",{className:"absolute top-2 right-2 opacity-0 group-hover:opacity-100 transition-opacity duration-200",children:(0,Ce.jsx)("div",{className:"bg-black/80 text-white text-xs px-2 py-1 rounded",children:"Hover to preview"})})]})}function Nq({children:e,componentId:t,componentName:o,className:r,fallback:a,requireCLI:n=!0}){let[s,i]=(0,Fl.useState)({isAuthenticated:!1,deviceValid:!1,hasProAccess:!1,loading:!0});if((0,Fl.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 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 g=await p.json();i({isAuthenticated:!0,deviceValid:g.valid,hasProAccess:g.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,Ce.jsx)("div",{className:P("animate-pulse bg-gray-200 dark:bg-gray-800 rounded-lg h-32",r),children:(0,Ce.jsx)("div",{className:"flex items-center justify-center h-full",children:(0,Ce.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,Ce.jsxs)("div",{className:P("relative",r),children:[(0,Ce.jsx)("div",{className:"blur-sm grayscale-[0.3] opacity-60 pointer-events-none",children:a||e}),(0,Ce.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,Ce.jsxs)("div",{className:"text-center space-y-3 p-6",children:[(0,Ce.jsxs)(wo,{variant:"destructive",className:"mb-2",children:[(0,Ce.jsx)(Ci,{className:"w-3 h-3 mr-1"}),"CLI AUTH REQUIRED"]}),(0,Ce.jsx)("h3",{className:"font-semibold text-gray-900 dark:text-gray-100",children:"CLI Authentication Required"}),(0,Ce.jsx)("p",{className:"text-sm text-gray-600 dark:text-gray-400 max-w-xs",children:"Run the following command to authenticate:"}),(0,Ce.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,Ce.jsxs)("div",{className:P("relative",r),children:[(0,Ce.jsx)("div",{className:"blur-sm grayscale-[0.3] opacity-60 pointer-events-none",children:a||e}),(0,Ce.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,Ce.jsxs)("div",{className:"text-center space-y-3 p-6",children:[(0,Ce.jsxs)(wo,{variant:"secondary",className:"bg-yellow-500 text-white mb-2",children:[(0,Ce.jsx)(Si,{className:"w-3 h-3 mr-1"}),"DEVICE LIMIT"]}),(0,Ce.jsx)("h3",{className:"font-semibold text-gray-900 dark:text-gray-100",children:"Device Limit Exceeded"}),(0,Ce.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,Ce.jsx)(Ae,{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,Ce.jsx)(JE,{componentName:o||t,className:r,children:a||e})}return(0,Ce.jsx)("div",{className:r,children:e})}function Oq({className:e}){return(0,Ce.jsxs)(wo,{variant:"secondary",className:P("bg-gradient-to-r from-amber-500 to-orange-500 text-white border-0 text-xs",e),children:[(0,Ce.jsx)(yi,{className:"w-3 h-3 mr-1"}),"PRO"]})}function Fq({className:e}){return(0,Ce.jsx)(wo,{variant:"outline",className:P("border-green-500 text-green-600 dark:text-green-400 text-xs",e),children:"FREE"})}var eA=b(k());var Nt=b(N());function ny({className:e,variant:t="default",showText:o=!0,...r}){let a=eA.useId(),n=`moon-gradient-${a}`,s=`moon-mask-${a}`;return(0,Nt.jsxs)("div",{className:P("flex items-center gap-2",e),children:[(0,Nt.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:[(0,Nt.jsxs)("defs",{children:[t==="gradient"&&(0,Nt.jsxs)("linearGradient",{id:n,x1:"0%",y1:"0%",x2:"100%",y2:"100%",children:[(0,Nt.jsx)("stop",{offset:"0%",stopColor:"#3B82F6"}),(0,Nt.jsx)("stop",{offset:"50%",stopColor:"#8B5CF6"}),(0,Nt.jsx)("stop",{offset:"100%",stopColor:"#EC4899"})]}),(0,Nt.jsxs)("mask",{id:s,children:[(0,Nt.jsx)("rect",{width:"32",height:"32",fill:"white"}),(0,Nt.jsx)("circle",{cx:"22",cy:"10",r:"10",fill:"black"})]})]}),(0,Nt.jsx)("circle",{cx:"16",cy:"16",r:"14",fill:t==="gradient"?`url(#${n})`:"currentColor",className:t==="default"?"fill-primary":"",mask:`url(#${s})`})]}),o&&(0,Nt.jsxs)("span",{className:"text-xl font-bold",children:[(0,Nt.jsx)("span",{className:"text-foreground",children:"Moon"}),(0,Nt.jsx)("span",{className:"text-primary",children:"UI"})]})]})}function abe({className:e,variant:t="default",...o}){return(0,Nt.jsx)(ny,{showText:!1,className:e,variant:t,...o})}function nbe({className:e,variant:t="default",showText:o=!0,...r}){return(0,Nt.jsx)(ny,{className:P("transition-all duration-300 hover:scale-105",e),variant:t,showText:o,...r})}var sy=b(k());var mo=b(N()),tA=({className:e,...t})=>(0,mo.jsx)("nav",{role:"navigation","aria-label":"pagination",className:P("moonui-theme","mx-auto flex w-full justify-center",e),...t});tA.displayName="Pagination";var oA=sy.forwardRef(({className:e,...t},o)=>(0,mo.jsx)("ul",{ref:o,className:P("moonui-theme","flex flex-row items-center gap-1",e),...t}));oA.displayName="PaginationContent";var rA=sy.forwardRef(({className:e,...t},o)=>(0,mo.jsx)("li",{ref:o,className:P("moonui-theme","",e),...t}));rA.displayName="PaginationItem";var Om=({className:e,isActive:t,size:o="icon",...r})=>(0,mo.jsx)("a",{"aria-current":t?"page":void 0,className:P(Zd({variant:t?"outline":"ghost",size:o}),e),...r});Om.displayName="PaginationLink";var aA=({className:e,...t})=>(0,mo.jsxs)(Om,{"aria-label":"Go to previous page",size:"md",className:P("moonui-theme","gap-1 pl-2.5",e),...t,children:[(0,mo.jsx)(Sr,{className:"h-4 w-4"}),(0,mo.jsx)("span",{children:"Previous"})]});aA.displayName="PaginationPrevious";var nA=({className:e,...t})=>(0,mo.jsxs)(Om,{"aria-label":"Go to next page",size:"md",className:P("moonui-theme","gap-1 pr-2.5",e),...t,children:[(0,mo.jsx)("span",{children:"Next"}),(0,mo.jsx)(lo,{className:"h-4 w-4"})]});nA.displayName="PaginationNext";var sA=({className:e,...t})=>(0,mo.jsxs)("span",{"aria-hidden":!0,className:P("moonui-theme","flex h-9 w-9 items-center justify-center",e),...t,children:[(0,mo.jsx)(ra,{className:"h-4 w-4"}),(0,mo.jsx)("span",{className:"sr-only",children:"More pages"})]});sA.displayName="PaginationEllipsis";var yd=b(k());var Qn=b(k());var Q=b(k(),1),py=b(ta(),1);function gd(e,[t,o]){return Math.min(o,Math.max(t,e))}var iA=b(k(),1);var lA=b(N(),1),iy=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"}),_q="VisuallyHidden",hd=iA.forwardRef((e,t)=>(0,lA.jsx)(j.span,{...e,ref:t,style:{...iy,...e.style}}));hd.displayName=_q;var uA=hd;var ge=b(N(),1),Bq=[" ","Enter","ArrowUp","ArrowDown"],Hq=[" ","Enter"],ni="Select",[_m,Vm,Uq]=ea(ni),[_l,Obe]=Ne(ni,[Uq,rr]),Bm=rr(),[Gq,Yn]=_l(ni),[zq,qq]=_l(ni),cA=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:p,form:g}=e,m=Bm(t),[h,v]=Q.useState(null),[x,y]=Q.useState(null),[R,S]=Q.useState(!1),C=Ko(u),[w,I]=Xe({prop:r,defaultProp:a??!1,onChange:n,caller:ni}),[L,T]=Xe({prop:s,defaultProp:i,onChange:l,caller:ni}),M=Q.useRef(null),F=h?g||!!h.closest("form"):!0,[V,A]=Q.useState(new Set),G=Array.from(V).map(_=>_.props.value).join(";");return(0,ge.jsx)(za,{...m,children:(0,ge.jsxs)(Gq,{required:p,scope:t,trigger:h,onTriggerChange:v,valueNode:x,onValueNodeChange:y,valueNodeHasChildren:R,onValueNodeHasChildrenChange:S,contentId:ze(),value:L,onValueChange:T,open:w,onOpenChange:I,dir:C,triggerPointerDownPosRef:M,disabled:f,children:[(0,ge.jsx)(_m.Provider,{scope:t,children:(0,ge.jsx)(zq,{scope:e.__scopeSelect,onNativeOptionAdd:Q.useCallback(_=>{A(O=>new Set(O).add(_))},[]),onNativeOptionRemove:Q.useCallback(_=>{A(O=>{let E=new Set(O);return E.delete(_),E})},[]),children:o})}),F?(0,ge.jsxs)(OA,{"aria-hidden":!0,required:p,tabIndex:-1,name:c,autoComplete:d,value:L,onChange:_=>T(_.target.value),disabled:f,form:g,children:[L===void 0?(0,ge.jsx)("option",{value:""}):null,Array.from(V)]},G):null]})})};cA.displayName=ni;var dA="SelectTrigger",fA=Q.forwardRef((e,t)=>{let{__scopeSelect:o,disabled:r=!1,...a}=e,n=Bm(o),s=Yn(dA,o),i=s.disabled||r,l=ie(t,s.onTriggerChange),u=Vm(o),c=Q.useRef("touch"),[d,f,p]=_A(m=>{let h=u().filter(y=>!y.disabled),v=h.find(y=>y.value===s.value),x=VA(h,m,v);x!==void 0&&s.onValueChange(x.value)}),g=m=>{i||(s.onOpenChange(!0),p()),m&&(s.triggerPointerDownPosRef.current={x:Math.round(m.pageX),y:Math.round(m.pageY)})};return(0,ge.jsx)(qa,{asChild:!0,...n,children:(0,ge.jsx)(j.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":FA(s.value)?"":void 0,...a,ref:l,onClick:z(a.onClick,m=>{m.currentTarget.focus(),c.current!=="mouse"&&g(m)}),onPointerDown:z(a.onPointerDown,m=>{c.current=m.pointerType;let h=m.target;h.hasPointerCapture(m.pointerId)&&h.releasePointerCapture(m.pointerId),m.button===0&&m.ctrlKey===!1&&m.pointerType==="mouse"&&(g(m),m.preventDefault())}),onKeyDown:z(a.onKeyDown,m=>{let h=d.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&f(m.key),!(h&&m.key===" ")&&Bq.includes(m.key)&&(g(),m.preventDefault())})})})});fA.displayName=dA;var pA="SelectValue",mA=Q.forwardRef((e,t)=>{let{__scopeSelect:o,className:r,style:a,children:n,placeholder:s="",...i}=e,l=Yn(pA,o),{onValueNodeHasChildrenChange:u}=l,c=n!==void 0,d=ie(t,l.onValueNodeChange);return ke(()=>{u(c)},[u,c]),(0,ge.jsx)(j.span,{...i,ref:d,style:{pointerEvents:"none"},children:FA(l.value)?(0,ge.jsx)(ge.Fragment,{children:s}):n})});mA.displayName=pA;var Wq="SelectIcon",gA=Q.forwardRef((e,t)=>{let{__scopeSelect:o,children:r,...a}=e;return(0,ge.jsx)(j.span,{"aria-hidden":!0,...a,ref:t,children:r||"\u25BC"})});gA.displayName=Wq;var $q="SelectPortal",hA=e=>(0,ge.jsx)(Br,{asChild:!0,...e});hA.displayName=$q;var si="SelectContent",vA=Q.forwardRef((e,t)=>{let o=Yn(si,e.__scopeSelect),[r,a]=Q.useState();if(ke(()=>{a(new DocumentFragment)},[]),!o.open){let n=r;return n?py.createPortal((0,ge.jsx)(xA,{scope:e.__scopeSelect,children:(0,ge.jsx)(_m.Slot,{scope:e.__scopeSelect,children:(0,ge.jsx)("div",{children:e.children})})}),n):null}return(0,ge.jsx)(yA,{...e,ref:t})});vA.displayName=si;var qr=10,[xA,Zn]=_l(si),jq="SelectContentImpl",Kq=Cr("SelectContent.RemoveScroll"),yA=Q.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:p,sticky:g,hideWhenDetached:m,avoidCollisions:h,...v}=e,x=Yn(si,o),[y,R]=Q.useState(null),[S,C]=Q.useState(null),w=ie(t,H=>R(H)),[I,L]=Q.useState(null),[T,M]=Q.useState(null),F=Vm(o),[V,A]=Q.useState(!1),G=Q.useRef(!1);Q.useEffect(()=>{if(y)return Vn(y)},[y]),gl();let _=Q.useCallback(H=>{let[oe,...fe]=F().map(K=>K.ref.current),[me]=fe.slice(-1),pe=document.activeElement;for(let K of H)if(K===pe||(K?.scrollIntoView({block:"nearest"}),K===oe&&S&&(S.scrollTop=0),K===me&&S&&(S.scrollTop=S.scrollHeight),K?.focus(),document.activeElement!==pe))return},[F,S]),O=Q.useCallback(()=>_([I,y]),[_,I,y]);Q.useEffect(()=>{V&&O()},[V,O]);let{onOpenChange:E,triggerPointerDownPosRef:D}=x;Q.useEffect(()=>{if(y){let H={x:0,y:0},oe=me=>{H={x:Math.abs(Math.round(me.pageX)-(D.current?.x??0)),y:Math.abs(Math.round(me.pageY)-(D.current?.y??0))}},fe=me=>{H.x<=10&&H.y<=10?me.preventDefault():y.contains(me.target)||E(!1),document.removeEventListener("pointermove",oe),D.current=null};return D.current!==null&&(document.addEventListener("pointermove",oe),document.addEventListener("pointerup",fe,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",oe),document.removeEventListener("pointerup",fe,{capture:!0})}}},[y,E,D]),Q.useEffect(()=>{let H=()=>E(!1);return window.addEventListener("blur",H),window.addEventListener("resize",H),()=>{window.removeEventListener("blur",H),window.removeEventListener("resize",H)}},[E]);let[te,ue]=_A(H=>{let oe=F().filter(pe=>!pe.disabled),fe=oe.find(pe=>pe.ref.current===document.activeElement),me=VA(oe,H,fe);me&&setTimeout(()=>me.ref.current.focus())}),B=Q.useCallback((H,oe,fe)=>{let me=!G.current&&!fe;(x.value!==void 0&&x.value===oe||me)&&(L(H),me&&(G.current=!0))},[x.value]),$=Q.useCallback(()=>y?.focus(),[y]),Z=Q.useCallback((H,oe,fe)=>{let me=!G.current&&!fe;(x.value!==void 0&&x.value===oe||me)&&M(H)},[x.value]),X=r==="popper"?ly:bA,se=X===ly?{side:i,sideOffset:l,align:u,alignOffset:c,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:g,hideWhenDetached:m,avoidCollisions:h}:{};return(0,ge.jsx)(xA,{scope:o,content:y,viewport:S,onViewportChange:C,itemRefCallback:B,selectedItem:I,onItemLeave:$,itemTextRefCallback:Z,focusSelectedItem:O,selectedItemText:T,position:r,isPositioned:V,searchRef:te,children:(0,ge.jsx)(Wa,{as:Kq,allowPinchZoom:!0,children:(0,ge.jsx)(qs,{asChild:!0,trapped:x.open,onMountAutoFocus:H=>{H.preventDefault()},onUnmountAutoFocus:z(a,H=>{x.trigger?.focus({preventScroll:!0}),H.preventDefault()}),children:(0,ge.jsx)(da,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:n,onPointerDownOutside:s,onFocusOutside:H=>H.preventDefault(),onDismiss:()=>x.onOpenChange(!1),children:(0,ge.jsx)(X,{role:"listbox",id:x.contentId,"data-state":x.open?"open":"closed",dir:x.dir,onContextMenu:H=>H.preventDefault(),...v,...se,onPlaced:()=>A(!0),ref:w,style:{display:"flex",flexDirection:"column",outline:"none",...v.style},onKeyDown:z(v.onKeyDown,H=>{let oe=H.ctrlKey||H.altKey||H.metaKey;if(H.key==="Tab"&&H.preventDefault(),!oe&&H.key.length===1&&ue(H.key),["ArrowUp","ArrowDown","Home","End"].includes(H.key)){let me=F().filter(pe=>!pe.disabled).map(pe=>pe.ref.current);if(["ArrowUp","End"].includes(H.key)&&(me=me.slice().reverse()),["ArrowUp","ArrowDown"].includes(H.key)){let pe=H.target,K=me.indexOf(pe);me=me.slice(K+1)}setTimeout(()=>_(me)),H.preventDefault()}})})})})})})});yA.displayName=jq;var Xq="SelectItemAlignedPosition",bA=Q.forwardRef((e,t)=>{let{__scopeSelect:o,onPlaced:r,...a}=e,n=Yn(si,o),s=Zn(si,o),[i,l]=Q.useState(null),[u,c]=Q.useState(null),d=ie(t,w=>c(w)),f=Vm(o),p=Q.useRef(!1),g=Q.useRef(!0),{viewport:m,selectedItem:h,selectedItemText:v,focusSelectedItem:x}=s,y=Q.useCallback(()=>{if(n.trigger&&n.valueNode&&i&&u&&m&&h&&v){let w=n.trigger.getBoundingClientRect(),I=u.getBoundingClientRect(),L=n.valueNode.getBoundingClientRect(),T=v.getBoundingClientRect();if(n.dir!=="rtl"){let pe=T.left-I.left,K=L.left-pe,Ie=w.left-K,J=w.width+Ie,ne=Math.max(J,I.width),Ge=window.innerWidth-qr,$e=gd(K,[qr,Math.max(qr,Ge-ne)]);i.style.minWidth=J+"px",i.style.left=$e+"px"}else{let pe=I.right-T.right,K=window.innerWidth-L.right-pe,Ie=window.innerWidth-w.right-K,J=w.width+Ie,ne=Math.max(J,I.width),Ge=window.innerWidth-qr,$e=gd(K,[qr,Math.max(qr,Ge-ne)]);i.style.minWidth=J+"px",i.style.right=$e+"px"}let M=f(),F=window.innerHeight-qr*2,V=m.scrollHeight,A=window.getComputedStyle(u),G=parseInt(A.borderTopWidth,10),_=parseInt(A.paddingTop,10),O=parseInt(A.borderBottomWidth,10),E=parseInt(A.paddingBottom,10),D=G+_+V+E+O,te=Math.min(h.offsetHeight*5,D),ue=window.getComputedStyle(m),B=parseInt(ue.paddingTop,10),$=parseInt(ue.paddingBottom,10),Z=w.top+w.height/2-qr,X=F-Z,se=h.offsetHeight/2,H=h.offsetTop+se,oe=G+_+H,fe=D-oe;if(oe<=Z){let pe=M.length>0&&h===M[M.length-1].ref.current;i.style.bottom="0px";let K=u.clientHeight-m.offsetTop-m.offsetHeight,Ie=Math.max(X,se+(pe?$:0)+K+O),J=oe+Ie;i.style.height=J+"px"}else{let pe=M.length>0&&h===M[0].ref.current;i.style.top="0px";let Ie=Math.max(Z,G+m.offsetTop+(pe?B:0)+se)+fe;i.style.height=Ie+"px",m.scrollTop=oe-Z+m.offsetTop}i.style.margin=`${qr}px 0`,i.style.minHeight=te+"px",i.style.maxHeight=F+"px",r?.(),requestAnimationFrame(()=>p.current=!0)}},[f,n.trigger,n.valueNode,i,u,m,h,v,n.dir,r]);ke(()=>y(),[y]);let[R,S]=Q.useState();ke(()=>{u&&S(window.getComputedStyle(u).zIndex)},[u]);let C=Q.useCallback(w=>{w&&g.current===!0&&(y(),x?.(),g.current=!1)},[y,x]);return(0,ge.jsx)(Zq,{scope:o,contentWrapper:i,shouldExpandOnScrollRef:p,onScrollButtonChange:C,children:(0,ge.jsx)("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:R},children:(0,ge.jsx)(j.div,{...a,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...a.style}})})})});bA.displayName=Xq;var Yq="SelectPopperPosition",ly=Q.forwardRef((e,t)=>{let{__scopeSelect:o,align:r="start",collisionPadding:a=qr,...n}=e,s=Bm(o);return(0,ge.jsx)(Fn,{...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)"}})});ly.displayName=Yq;var[Zq,my]=_l(si,{}),uy="SelectViewport",CA=Q.forwardRef((e,t)=>{let{__scopeSelect:o,nonce:r,...a}=e,n=Zn(uy,o),s=my(uy,o),i=ie(t,n.onViewportChange),l=Q.useRef(0);return(0,ge.jsxs)(ge.Fragment,{children:[(0,ge.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,ge.jsx)(_m.Slot,{scope:o,children:(0,ge.jsx)(j.div,{"data-radix-select-viewport":"",role:"presentation",...a,ref:i,style:{position:"relative",flex:1,overflow:"hidden auto",...a.style},onScroll:z(a.onScroll,u=>{let c=u.currentTarget,{contentWrapper:d,shouldExpandOnScrollRef:f}=s;if(f?.current&&d){let p=Math.abs(l.current-c.scrollTop);if(p>0){let g=window.innerHeight-qr*2,m=parseFloat(d.style.minHeight),h=parseFloat(d.style.height),v=Math.max(m,h);if(v<g){let x=v+p,y=Math.min(g,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})})})]})});CA.displayName=uy;var wA="SelectGroup",[Qq,Jq]=_l(wA),SA=Q.forwardRef((e,t)=>{let{__scopeSelect:o,...r}=e,a=ze();return(0,ge.jsx)(Qq,{scope:o,id:a,children:(0,ge.jsx)(j.div,{role:"group","aria-labelledby":a,...r,ref:t})})});SA.displayName=wA;var RA="SelectLabel",IA=Q.forwardRef((e,t)=>{let{__scopeSelect:o,...r}=e,a=Jq(RA,o);return(0,ge.jsx)(j.div,{id:a.id,...r,ref:t})});IA.displayName=RA;var Fm="SelectItem",[eW,PA]=_l(Fm),LA=Q.forwardRef((e,t)=>{let{__scopeSelect:o,value:r,disabled:a=!1,textValue:n,...s}=e,i=Yn(Fm,o),l=Zn(Fm,o),u=i.value===r,[c,d]=Q.useState(n??""),[f,p]=Q.useState(!1),g=ie(t,x=>l.itemRefCallback?.(x,r,a)),m=ze(),h=Q.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,ge.jsx)(eW,{scope:o,value:r,disabled:a,textId:m,isSelected:u,onItemTextChange:Q.useCallback(x=>{d(y=>y||(x?.textContent??"").trim())},[]),children:(0,ge.jsx)(_m.ItemSlot,{scope:o,value:r,disabled:a,textValue:c,children:(0,ge.jsx)(j.div,{role:"option","aria-labelledby":m,"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:g,onFocus:z(s.onFocus,()=>p(!0)),onBlur:z(s.onBlur,()=>p(!1)),onClick:z(s.onClick,()=>{h.current!=="mouse"&&v()}),onPointerUp:z(s.onPointerUp,()=>{h.current==="mouse"&&v()}),onPointerDown:z(s.onPointerDown,x=>{h.current=x.pointerType}),onPointerMove:z(s.onPointerMove,x=>{h.current=x.pointerType,a?l.onItemLeave?.():h.current==="mouse"&&x.currentTarget.focus({preventScroll:!0})}),onPointerLeave:z(s.onPointerLeave,x=>{x.currentTarget===document.activeElement&&l.onItemLeave?.()}),onKeyDown:z(s.onKeyDown,x=>{l.searchRef?.current!==""&&x.key===" "||(Hq.includes(x.key)&&v(),x.key===" "&&x.preventDefault())})})})})});LA.displayName=Fm;var vd="SelectItemText",TA=Q.forwardRef((e,t)=>{let{__scopeSelect:o,className:r,style:a,...n}=e,s=Yn(vd,o),i=Zn(vd,o),l=PA(vd,o),u=qq(vd,o),[c,d]=Q.useState(null),f=ie(t,v=>d(v),l.onItemTextChange,v=>i.itemTextRefCallback?.(v,l.value,l.disabled)),p=c?.textContent,g=Q.useMemo(()=>(0,ge.jsx)("option",{value:l.value,disabled:l.disabled,children:p},l.value),[l.disabled,l.value,p]),{onNativeOptionAdd:m,onNativeOptionRemove:h}=u;return ke(()=>(m(g),()=>h(g)),[m,h,g]),(0,ge.jsxs)(ge.Fragment,{children:[(0,ge.jsx)(j.span,{id:l.textId,...n,ref:f}),l.isSelected&&s.valueNode&&!s.valueNodeHasChildren?py.createPortal(n.children,s.valueNode):null]})});TA.displayName=vd;var MA="SelectItemIndicator",kA=Q.forwardRef((e,t)=>{let{__scopeSelect:o,...r}=e;return PA(MA,o).isSelected?(0,ge.jsx)(j.span,{"aria-hidden":!0,...r,ref:t}):null});kA.displayName=MA;var cy="SelectScrollUpButton",EA=Q.forwardRef((e,t)=>{let o=Zn(cy,e.__scopeSelect),r=my(cy,e.__scopeSelect),[a,n]=Q.useState(!1),s=ie(t,r.onScrollButtonChange);return ke(()=>{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,ge.jsx)(DA,{...e,ref:s,onAutoScroll:()=>{let{viewport:i,selectedItem:l}=o;i&&l&&(i.scrollTop=i.scrollTop-l.offsetHeight)}}):null});EA.displayName=cy;var dy="SelectScrollDownButton",AA=Q.forwardRef((e,t)=>{let o=Zn(dy,e.__scopeSelect),r=my(dy,e.__scopeSelect),[a,n]=Q.useState(!1),s=ie(t,r.onScrollButtonChange);return ke(()=>{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,ge.jsx)(DA,{...e,ref:s,onAutoScroll:()=>{let{viewport:i,selectedItem:l}=o;i&&l&&(i.scrollTop=i.scrollTop+l.offsetHeight)}}):null});AA.displayName=dy;var DA=Q.forwardRef((e,t)=>{let{__scopeSelect:o,onAutoScroll:r,...a}=e,n=Zn("SelectScrollButton",o),s=Q.useRef(null),i=Vm(o),l=Q.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return Q.useEffect(()=>()=>l(),[l]),ke(()=>{i().find(c=>c.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[i]),(0,ge.jsx)(j.div,{"aria-hidden":!0,...a,ref:t,style:{flexShrink:0,...a.style},onPointerDown:z(a.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(r,50))}),onPointerMove:z(a.onPointerMove,()=>{n.onItemLeave?.(),s.current===null&&(s.current=window.setInterval(r,50))}),onPointerLeave:z(a.onPointerLeave,()=>{l()})})}),tW="SelectSeparator",NA=Q.forwardRef((e,t)=>{let{__scopeSelect:o,...r}=e;return(0,ge.jsx)(j.div,{"aria-hidden":!0,...r,ref:t})});NA.displayName=tW;var fy="SelectArrow",oW=Q.forwardRef((e,t)=>{let{__scopeSelect:o,...r}=e,a=Bm(o),n=Yn(fy,o),s=Zn(fy,o);return n.open&&s.position==="popper"?(0,ge.jsx)(_n,{...a,...r,ref:t}):null});oW.displayName=fy;var rW="SelectBubbleInput",OA=Q.forwardRef(({__scopeSelect:e,value:t,...o},r)=>{let a=Q.useRef(null),n=ie(r,a),s=pl(t);return Q.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,ge.jsx)(j.select,{...o,style:{...iy,...o.style},ref:n,defaultValue:t})});OA.displayName=rW;function FA(e){return e===""||e===void 0}function _A(e){let t=Ee(e),o=Q.useRef(""),r=Q.useRef(0),a=Q.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=Q.useCallback(()=>{o.current="",window.clearTimeout(r.current)},[]);return Q.useEffect(()=>()=>window.clearTimeout(r.current),[]),[o,a,n]}function VA(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=aW(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 aW(e,t){return e.map((o,r)=>e[(t+r)%e.length])}var BA=cA,gy=fA,HA=mA,UA=gA,GA=hA,hy=vA,zA=CA,qA=SA,vy=IA,xy=LA,WA=TA,$A=kA,yy=EA,by=AA,Cy=NA;var qe=b(N()),Vl=BA;Vl.displayName="Select";var sW=qA,xd=HA,iW=Y(["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 text-foreground"],{variants:{variant:{standard:"border border-input bg-background hover:border-ring focus-visible:ring-2 focus-visible:ring-primary/30 focus-visible:border-primary",outline:"border border-input bg-transparent hover:border-ring focus-visible:ring-2 focus-visible:ring-primary/30 focus-visible:border-primary",ghost:"border-none bg-muted hover:bg-muted/80 focus-visible:ring-2 focus-visible:ring-primary/30",underline:"border-t-0 border-l-0 border-r-0 border-b border-input rounded-none px-0 bg-transparent hover:border-ring focus-visible:ring-0 focus-visible:border-b-2 focus-visible:border-primary"},size:{sm:"h-8 text-xs px-2",md:"h-10 text-sm px-3",lg:"h-12 text-base px-4"},state:{none:"",error:"border-error focus-visible:ring-error/30 focus-visible:border-error",success:"border-success focus-visible:ring-success/30 focus-visible:border-success"}},defaultVariants:{variant:"standard",size:"md",state:"none"}}),Bl=Qn.forwardRef(({className:e,children:t,variant:o,size:r,error:a,success:n,loading:s,leftIcon:i,rightIcon:l,...u},c)=>(0,qe.jsxs)(gy,{ref:c,className:P(iW({variant:o,size:r,state:a?"error":n?"success":"none"}),e),...u,disabled:u.disabled||s,"aria-invalid":a?!0:void 0,"data-error":a?!0:void 0,"data-success":n?!0:void 0,"data-loading":s?!0:void 0,children:[(0,qe.jsxs)("div",{className:"flex items-center flex-1 gap-2",children:[i&&(0,qe.jsx)("span",{className:"flex items-center justify-center text-muted-foreground",children:i}),s?(0,qe.jsxs)("div",{className:"flex items-center gap-2",children:[(0,qe.jsx)(Rt,{className:"h-3.5 w-3.5 animate-spin text-muted-foreground"}),(0,qe.jsx)("span",{className:"text-muted-foreground",children:"Loading..."})]}):t]}),!s&&(0,qe.jsx)(UA,{asChild:!0,children:l?(0,qe.jsx)("span",{className:"opacity-60",children:l}):(0,qe.jsx)(oa,{className:"h-4 w-4 opacity-60 transition-transform duration-200 ease-out group-data-[state=open]:rotate-180"})})]}));Bl.displayName=gy.displayName;var wy=Qn.forwardRef(({className:e,...t},o)=>(0,qe.jsx)(yy,{ref:o,className:P("flex cursor-default items-center justify-center py-1 text-muted-foreground hover:text-foreground transition-colors",e),...t,children:(0,qe.jsx)(pu,{className:"h-4 w-4"})}));wy.displayName=yy.displayName;var Sy=Qn.forwardRef(({className:e,...t},o)=>(0,qe.jsx)(by,{ref:o,className:P("flex cursor-default items-center justify-center py-1 text-muted-foreground hover:text-foreground transition-colors",e),...t,children:(0,qe.jsx)(oa,{className:"h-4 w-4"})}));Sy.displayName=by.displayName;var Hl=Qn.forwardRef(({className:e,children:t,position:o="popper",side:r="bottom",sideOffset:a=4,align:n="start",...s},i)=>(0,qe.jsx)(GA,{children:(0,qe.jsxs)(hy,{ref:i,side:r,sideOffset:a,align:n,avoidCollisions:!1,className:P(["relative z-50 max-h-96 min-w-[8rem] overflow-hidden","rounded-md border border-gray-200 dark:border-gray-700","bg-background dark:bg-gray-800/80 backdrop-blur-sm text-foreground dark:text-gray-200","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,qe.jsx)(wy,{}),(0,qe.jsx)(zA,{className:P("p-1",o==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),(0,qe.jsx)(Sy,{})]})}));Hl.displayName=hy.displayName;var jA=Qn.forwardRef(({className:e,...t},o)=>(0,qe.jsx)(vy,{ref:o,className:P("moonui-theme","py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));jA.displayName=vy.displayName;var go=Qn.forwardRef(({className:e,children:t,variant:o="default",size:r="md",rightIcon:a,customIndicator:n,...s},i)=>(0,qe.jsxs)(xy,{ref:i,className:P("moonui-theme","relative flex w-full cursor-default select-none items-center rounded-sm outline-none","data-[disabled]:pointer-events-none data-[disabled]:opacity-50","transition-colors duration-150",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,qe.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,qe.jsx)($A,{children:n||(0,qe.jsx)($t,{className:"h-4 w-4"})})}),(0,qe.jsx)(WA,{children:t}),a&&(0,qe.jsx)("span",{className:"ml-auto pl-2 opacity-70",children:a})]}));go.displayName=xy.displayName;var KA=Qn.forwardRef(({className:e,...t},o)=>(0,qe.jsx)(Cy,{ref:o,className:P("moonui-theme","-mx-1 my-1 h-px bg-muted dark:bg-gray-700",e),...t}));KA.displayName=Cy.displayName;var Ot=b(N()),lW=[{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"}],XA=(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}},uW=e=>{switch(e){case"+1":return 10;case"+44":return 11;case"+90":return 10;default:return 15}},YA=yd.forwardRef(({className:e,value:t="",onChange:o,defaultCountry:r="+1",showIcon:a=!0,showCountrySelect:n=!0,countries:s=lW,size:i,...l},u)=>{let[c,d]=yd.useState(r),[f,p]=yd.useState(t),g=s.find(x=>x.code===c)||s[0],m=x=>{let y=x.target.value.replace(/\D/g,""),R=uW(c),S=y.slice(0,R),C=XA(S,c);p(S),o?.(S,c),x.target.value=C},h=x=>{d(x),o?.(f,x)},v=XA(f,c);return(0,Ot.jsxs)("div",{className:P("relative flex gap-2",e),children:[n&&(0,Ot.jsxs)(Vl,{value:c,onValueChange:h,children:[(0,Ot.jsx)(Bl,{className:"w-[120px]",children:(0,Ot.jsx)(xd,{children:(0,Ot.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Ot.jsx)("span",{children:g.flag}),(0,Ot.jsx)("span",{children:g.code})]})})}),(0,Ot.jsx)(Hl,{children:s.map(x=>(0,Ot.jsx)(go,{value:x.code,children:(0,Ot.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Ot.jsx)("span",{children:x.flag}),(0,Ot.jsx)("span",{children:x.code}),(0,Ot.jsx)("span",{className:"text-muted-foreground",children:x.name})]})},x.code))})]}),(0,Ot.jsxs)("div",{className:"relative flex-1",children:[(0,Ot.jsx)(Qt,{ref:u,type:"tel",inputMode:"numeric",autoComplete:"tel",placeholder:c==="+1"?"(555) 123-4567":"123 456 789",value:v,onChange:m,className:P(a&&"pl-10",e),...l}),a&&(0,Ot.jsx)(Mu,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"})]})]})});YA.displayName="PhoneInput";var ao=b(k());var Go=b(N()),cW=Y("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"}}),ZA=ao.createContext({}),QA=ao.forwardRef(({className:e,value:t,defaultValue:o,onValueChange:r,disabled:a,name:n,...s},i)=>{let[l,u]=ao.useState(o),c=t!==void 0,d=c?t:l,f=ao.useCallback(p=>{c||u(p),r?.(p)},[c,r]);return(0,Go.jsx)(ZA.Provider,{value:{value:d,onValueChange:f,disabled:a,name:n},children:(0,Go.jsx)("div",{ref:i,role:"radiogroup",className:P("moonui-theme","grid gap-2",e),...s})})});QA.displayName="RadioGroup";var Ry=ao.forwardRef(({className:e,variant:t,size:o,indicator:r,id:a,value:n,disabled:s,...i},l)=>{let u=ao.useContext(ZA),c=ao.useId(),d=a||c,f=u.value===n,p=g=>{u.onValueChange&&u.onValueChange(g.target.value),i.onChange&&i.onChange(g)};return(0,Go.jsxs)("div",{className:"relative flex items-center",children:[(0,Go.jsx)("input",{type:"radio",id:d,ref:l,value:n,checked:f,disabled:s||u.disabled,name:u.name,onChange:p,className:"peer sr-only",...i}),(0,Go.jsx)("label",{htmlFor:d,className:P(cW({variant:t,size:o}),"rounded-full","peer-focus-visible:ring-2 peer-focus-visible:ring-offset-2 peer-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,Go.jsx)("span",{className:P("absolute inset-0 pointer-events-none",f&&"flex items-center justify-center"),children:f&&(r||(0,Go.jsx)(us,{className:"h-[60%] w-[60%] fill-current text-current"}))})})]})});Ry.displayName="RadioGroupItem";var Iy=ao.forwardRef(({className:e,htmlFor:t,children:o,disabled:r=!1,...a},n)=>(0,Go.jsx)("label",{ref:n,htmlFor:t,className:P("text-sm font-medium leading-none ml-2 text-foreground",r&&"cursor-not-allowed opacity-70",e),...a,children:o}));Iy.displayName="RadioLabel";var JA=ao.forwardRef(({id:e,label:t,labelClassName:o,...r},a)=>{let n=ao.useId(),s=e||n;return(0,Go.jsxs)("div",{className:"flex items-center",children:[(0,Go.jsx)(Ry,{ref:a,id:s,...r}),(0,Go.jsx)(Iy,{htmlFor:s,disabled:r.disabled,className:o,children:t})]})});JA.displayName="RadioItemWithLabel";var an=b(N());function dW({value:e="",onChange:t,placeholder:o="Start typing...",className:r,disabled:a=!1}){let n=s=>{!a&&t&&t(s.target.value)};return(0,an.jsxs)("div",{className:P("border border-input rounded-md",r),children:[(0,an.jsx)("div",{className:"border-b border-border p-2 bg-muted/50",children:(0,an.jsxs)("div",{className:"flex gap-1",children:[(0,an.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,an.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,an.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,an.jsx)("textarea",{value:e,onChange:n,placeholder:o,disabled:a,className:P("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 Ey=b(k());var de=b(k(),1);var tD=b(k(),1),He=b(N(),1);function fW(e,t){return tD.useReducer((o,r)=>t[o][r]??o,e)}var Py="ScrollArea",[oD,sCe]=Ne(Py),[pW,lr]=oD(Py),rD=de.forwardRef((e,t)=>{let{__scopeScrollArea:o,type:r="hover",dir:a,scrollHideDelay:n=600,...s}=e,[i,l]=de.useState(null),[u,c]=de.useState(null),[d,f]=de.useState(null),[p,g]=de.useState(null),[m,h]=de.useState(null),[v,x]=de.useState(0),[y,R]=de.useState(0),[S,C]=de.useState(!1),[w,I]=de.useState(!1),L=ie(t,M=>l(M)),T=Ko(a);return(0,He.jsx)(pW,{scope:o,type:r,dir:T,scrollHideDelay:n,scrollArea:i,viewport:u,onViewportChange:c,content:d,onContentChange:f,scrollbarX:p,onScrollbarXChange:g,scrollbarXEnabled:S,onScrollbarXEnabledChange:C,scrollbarY:m,onScrollbarYChange:h,scrollbarYEnabled:w,onScrollbarYEnabledChange:I,onCornerWidthChange:x,onCornerHeightChange:R,children:(0,He.jsx)(j.div,{dir:T,...s,ref:L,style:{position:"relative","--radix-scroll-area-corner-width":v+"px","--radix-scroll-area-corner-height":y+"px",...e.style}})})});rD.displayName=Py;var aD="ScrollAreaViewport",nD=de.forwardRef((e,t)=>{let{__scopeScrollArea:o,children:r,nonce:a,...n}=e,s=lr(aD,o),i=de.useRef(null),l=ie(t,i,s.onViewportChange);return(0,He.jsxs)(He.Fragment,{children:[(0,He.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,He.jsx)(j.div,{"data-radix-scroll-area-viewport":"",...n,ref:l,style:{overflowX:s.scrollbarXEnabled?"scroll":"hidden",overflowY:s.scrollbarYEnabled?"scroll":"hidden",...e.style},children:(0,He.jsx)("div",{ref:s.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});nD.displayName=aD;var ya="ScrollAreaScrollbar",Gm=de.forwardRef((e,t)=>{let{forceMount:o,...r}=e,a=lr(ya,e.__scopeScrollArea),{onScrollbarXEnabledChange:n,onScrollbarYEnabledChange:s}=a,i=e.orientation==="horizontal";return de.useEffect(()=>(i?n(!0):s(!0),()=>{i?n(!1):s(!1)}),[i,n,s]),a.type==="hover"?(0,He.jsx)(mW,{...r,ref:t,forceMount:o}):a.type==="scroll"?(0,He.jsx)(gW,{...r,ref:t,forceMount:o}):a.type==="auto"?(0,He.jsx)(sD,{...r,ref:t,forceMount:o}):a.type==="always"?(0,He.jsx)(Ly,{...r,ref:t}):null});Gm.displayName=ya;var mW=de.forwardRef((e,t)=>{let{forceMount:o,...r}=e,a=lr(ya,e.__scopeScrollArea),[n,s]=de.useState(!1);return de.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,He.jsx)(Ye,{present:o||n,children:(0,He.jsx)(sD,{"data-state":n?"visible":"hidden",...r,ref:t})})}),gW=de.forwardRef((e,t)=>{let{forceMount:o,...r}=e,a=lr(ya,e.__scopeScrollArea),n=e.orientation==="horizontal",s=qm(()=>l("SCROLL_END"),100),[i,l]=fW("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 de.useEffect(()=>{if(i==="idle"){let u=window.setTimeout(()=>l("HIDE"),a.scrollHideDelay);return()=>window.clearTimeout(u)}},[i,a.scrollHideDelay,l]),de.useEffect(()=>{let u=a.viewport,c=n?"scrollLeft":"scrollTop";if(u){let d=u[c],f=()=>{let p=u[c];d!==p&&(l("SCROLL"),s()),d=p};return u.addEventListener("scroll",f),()=>u.removeEventListener("scroll",f)}},[a.viewport,n,l,s]),(0,He.jsx)(Ye,{present:o||i!=="hidden",children:(0,He.jsx)(Ly,{"data-state":i==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:z(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:z(e.onPointerLeave,()=>l("POINTER_LEAVE"))})})}),sD=de.forwardRef((e,t)=>{let o=lr(ya,e.__scopeScrollArea),{forceMount:r,...a}=e,[n,s]=de.useState(!1),i=e.orientation==="horizontal",l=qm(()=>{if(o.viewport){let u=o.viewport.offsetWidth<o.viewport.scrollWidth,c=o.viewport.offsetHeight<o.viewport.scrollHeight;s(i?u:c)}},10);return Ul(o.viewport,l),Ul(o.content,l),(0,He.jsx)(Ye,{present:r||n,children:(0,He.jsx)(Ly,{"data-state":n?"visible":"hidden",...a,ref:t})})}),Ly=de.forwardRef((e,t)=>{let{orientation:o="vertical",...r}=e,a=lr(ya,e.__scopeScrollArea),n=de.useRef(null),s=de.useRef(0),[i,l]=de.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=cD(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,p){return CW(f,s.current,i,p)}return o==="horizontal"?(0,He.jsx)(hW,{...c,ref:t,onThumbPositionChange:()=>{if(a.viewport&&n.current){let f=a.viewport.scrollLeft,p=eD(f,i,a.dir);n.current.style.transform=`translate3d(${p}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,He.jsx)(vW,{...c,ref:t,onThumbPositionChange:()=>{if(a.viewport&&n.current){let f=a.viewport.scrollTop,p=eD(f,i);n.current.style.transform=`translate3d(0, ${p}px, 0)`}},onWheelScroll:f=>{a.viewport&&(a.viewport.scrollTop=f)},onDragScroll:f=>{a.viewport&&(a.viewport.scrollTop=d(f))}}):null}),hW=de.forwardRef((e,t)=>{let{sizes:o,onSizesChange:r,...a}=e,n=lr(ya,e.__scopeScrollArea),[s,i]=de.useState(),l=de.useRef(null),u=ie(t,l,n.onScrollbarXChange);return de.useEffect(()=>{l.current&&i(getComputedStyle(l.current))},[l]),(0,He.jsx)(lD,{"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":zm(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),fD(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:Um(s.paddingLeft),paddingEnd:Um(s.paddingRight)}})}})}),vW=de.forwardRef((e,t)=>{let{sizes:o,onSizesChange:r,...a}=e,n=lr(ya,e.__scopeScrollArea),[s,i]=de.useState(),l=de.useRef(null),u=ie(t,l,n.onScrollbarYChange);return de.useEffect(()=>{l.current&&i(getComputedStyle(l.current))},[l]),(0,He.jsx)(lD,{"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":zm(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),fD(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:Um(s.paddingTop),paddingEnd:Um(s.paddingBottom)}})}})}),[xW,iD]=oD(ya),lD=de.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,p=lr(ya,o),[g,m]=de.useState(null),h=ie(t,L=>m(L)),v=de.useRef(null),x=de.useRef(""),y=p.viewport,R=r.content-r.viewport,S=Ee(c),C=Ee(l),w=qm(d,10);function I(L){if(v.current){let T=L.clientX-v.current.left,M=L.clientY-v.current.top;u({x:T,y:M})}}return de.useEffect(()=>{let L=T=>{let M=T.target;g?.contains(M)&&S(T,R)};return document.addEventListener("wheel",L,{passive:!1}),()=>document.removeEventListener("wheel",L,{passive:!1})},[y,g,R,S]),de.useEffect(C,[r,C]),Ul(g,w),Ul(p.content,w),(0,He.jsx)(xW,{scope:o,scrollbar:g,hasThumb:a,onThumbChange:Ee(n),onThumbPointerUp:Ee(s),onThumbPositionChange:C,onThumbPointerDown:Ee(i),children:(0,He.jsx)(j.div,{...f,ref:h,style:{position:"absolute",...f.style},onPointerDown:z(e.onPointerDown,L=>{L.button===0&&(L.target.setPointerCapture(L.pointerId),v.current=g.getBoundingClientRect(),x.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",p.viewport&&(p.viewport.style.scrollBehavior="auto"),I(L))}),onPointerMove:z(e.onPointerMove,I),onPointerUp:z(e.onPointerUp,L=>{let T=L.target;T.hasPointerCapture(L.pointerId)&&T.releasePointerCapture(L.pointerId),document.body.style.webkitUserSelect=x.current,p.viewport&&(p.viewport.style.scrollBehavior=""),v.current=null})})})}),Hm="ScrollAreaThumb",Ty=de.forwardRef((e,t)=>{let{forceMount:o,...r}=e,a=iD(Hm,e.__scopeScrollArea);return(0,He.jsx)(Ye,{present:o||a.hasThumb,children:(0,He.jsx)(yW,{ref:t,...r})})}),yW=de.forwardRef((e,t)=>{let{__scopeScrollArea:o,style:r,...a}=e,n=lr(Hm,o),s=iD(Hm,o),{onThumbPositionChange:i}=s,l=ie(t,d=>s.onThumbChange(d)),u=de.useRef(void 0),c=qm(()=>{u.current&&(u.current(),u.current=void 0)},100);return de.useEffect(()=>{let d=n.viewport;if(d){let f=()=>{if(c(),!u.current){let p=wW(d,i);u.current=p,i()}};return i(),d.addEventListener("scroll",f),()=>d.removeEventListener("scroll",f)}},[n.viewport,c,i]),(0,He.jsx)(j.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:z(e.onPointerDownCapture,d=>{let p=d.target.getBoundingClientRect(),g=d.clientX-p.left,m=d.clientY-p.top;s.onThumbPointerDown({x:g,y:m})}),onPointerUp:z(e.onPointerUp,s.onThumbPointerUp)})});Ty.displayName=Hm;var My="ScrollAreaCorner",uD=de.forwardRef((e,t)=>{let o=lr(My,e.__scopeScrollArea),r=!!(o.scrollbarX&&o.scrollbarY);return o.type!=="scroll"&&r?(0,He.jsx)(bW,{...e,ref:t}):null});uD.displayName=My;var bW=de.forwardRef((e,t)=>{let{__scopeScrollArea:o,...r}=e,a=lr(My,o),[n,s]=de.useState(0),[i,l]=de.useState(0),u=!!(n&&i);return Ul(a.scrollbarX,()=>{let c=a.scrollbarX?.offsetHeight||0;a.onCornerHeightChange(c),l(c)}),Ul(a.scrollbarY,()=>{let c=a.scrollbarY?.offsetWidth||0;a.onCornerWidthChange(c),s(c)}),u?(0,He.jsx)(j.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 Um(e){return e?parseInt(e,10):0}function cD(e,t){let o=e/t;return isNaN(o)?0:o}function zm(e){let t=cD(e.viewport,e.content),o=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-o)*t;return Math.max(r,18)}function CW(e,t,o,r="ltr"){let a=zm(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 dD([l,u],d)(e)}function eD(e,t,o="ltr"){let r=zm(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=gd(e,l);return dD([0,s],[0,i])(u)}function dD(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 fD(e,t){return e>0&&e<t}var wW=(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 qm(e,t){let o=Ee(e),r=de.useRef(0);return de.useEffect(()=>()=>window.clearTimeout(r.current),[]),de.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(o,t)},[o,t])}function Ul(e,t){let o=Ee(t);ke(()=>{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 ky=rD,pD=nD;var mD=uD;var Jn=b(N()),gD=Ey.forwardRef(({className:e,children:t,...o},r)=>(0,Jn.jsxs)(ky,{ref:r,className:P("relative overflow-hidden",e),...o,children:[(0,Jn.jsx)(pD,{className:"h-full w-full rounded-[inherit]",children:t}),(0,Jn.jsx)(Ay,{}),(0,Jn.jsx)(mD,{})]}));gD.displayName=ky.displayName;var Ay=Ey.forwardRef(({className:e,orientation:t="vertical",...o},r)=>(0,Jn.jsx)(Gm,{ref:r,orientation:t,className:P("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,Jn.jsx)(Ty,{className:"relative flex-1 rounded-full bg-border"})}));Ay.displayName=Gm.displayName;var Wr=b(k());var bd=b(N()),hD=(e,t)=>{let o={up:{hidden:{opacity:0,y:t},visible:{opacity:1,y:0}},down:{hidden:{opacity:0,y:-t},visible:{opacity:1,y:0}},left:{hidden:{opacity:0,x:t},visible:{opacity:1,x:0}},right:{hidden:{opacity:0,x:-t},visible:{opacity:1,x:0}},fade:{hidden:{opacity:0},visible:{opacity:1}},scale:{hidden:{opacity:0,scale:.85},visible:{opacity:1,scale:1}},blur:{hidden:{opacity:0,filter:"blur(10px)"},visible:{opacity:1,filter:"blur(0px)"}}};return o[e]||o.up},vD={duration:.5,ease:[.25,.46,.45,.94]},xD=Wr.forwardRef(({children:e,direction:t="up",delay:o=0,duration:r=.5,distance:a=50,threshold:n=.3,once:s=!0,triggerOnce:i,stagger:l=0,className:u,variants:c,animate:d=!0,style:f,id:p,viewport:g},m)=>{let h=i!==void 0?i:s,v=Wr.useMemo(()=>c||hD(t,a),[t,a,c]),x=Wr.useMemo(()=>({...vD,duration:r,delay:o+l}),[r,o,l]),y=Wr.useMemo(()=>({once:h,amount:n,...g}),[h,n,g]);return d?(0,bd.jsx)(Ve.div,{ref:m,initial:"hidden",whileInView:"visible",viewport:y,variants:v,transition:x,className:P(u),style:f,id:p,children:e}):(0,bd.jsx)("div",{ref:m,className:u,style:f,id:p,children:e})});xD.displayName="ScrollReveal";var yD=Wr.forwardRef(({children:e,stagger:t=.1,className:o,style:r,id:a,threshold:n=.3,once:s=!0,triggerOnce:i,viewport:l},u)=>{let c=i!==void 0?i:s,d=Wr.useMemo(()=>({once:c,amount:n,...l}),[c,n,l]),f={hidden:{},visible:{transition:{staggerChildren:t,delayChildren:0}}};return(0,bd.jsx)(Ve.div,{ref:u,initial:"hidden",whileInView:"visible",viewport:d,variants:f,className:P(o),style:r,id:a,children:e})});yD.displayName="ScrollRevealContainer";var bD=Wr.forwardRef(({children:e,direction:t="up",duration:o=.5,distance:r=50,className:a,variants:n,style:s,id:i},l)=>{let u=Wr.useMemo(()=>n||hD(t,r),[t,r,n]),c=Wr.useMemo(()=>({...vD,duration:o}),[o]);return(0,bd.jsx)(Ve.div,{ref:l,variants:u,transition:c,className:P(a),style:s,id:i,children:e})});bD.displayName="ScrollRevealItem";var ID=b(k());var wD=b(k(),1);var SD=b(N(),1),RW="Separator",CD="horizontal",IW=["horizontal","vertical"],RD=wD.forwardRef((e,t)=>{let{decorative:o,orientation:r=CD,...a}=e,n=PW(r)?r:CD,i=o?{role:"none"}:{"aria-orientation":n==="vertical"?n:void 0,role:"separator"};return(0,SD.jsx)(j.div,{"data-orientation":n,...i,...a,ref:t})});RD.displayName=RW;function PW(e){return IW.includes(e)}var Dy=RD;var PD=b(N()),TW=Y("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"}}),ur=ID.forwardRef(({className:e,orientation:t="horizontal",variant:o="default",size:r="md",decorative:a=!0,...n},s)=>(0,PD.jsx)(Dy,{ref:s,decorative:a,orientation:t||void 0,className:P(TW({orientation:t,variant:o,size:r}),e),...n}));ur.displayName=Dy.displayName;var Ke=b(k());var YD=b(k());var KD=b(k(),1);var MW=Object.defineProperty,Gl=(e,t)=>MW(e,"name",{value:t,configurable:!0}),LD=!!(typeof window<"u"&&window.document&&window.document.createElement);function Oy(e,t,{checkForDefaultPrevented:o=!0}={}){return Gl(function(a){if(e?.(a),o===!1||!a||!a.defaultPrevented)return t?.(a)},"handleEvent")}Gl(Oy,"composeEventHandlers");function kW(e){if(!LD)throw new Error("Cannot access window outside of the DOM");return e?.ownerDocument?.defaultView??window}Gl(kW,"getOwnerWindow");function Ny(e){if(!LD)throw new Error("Cannot access document outside of the DOM");return e?.ownerDocument??document}Gl(Ny,"getOwnerDocument");function TD(e,t=!1){let{activeElement:o}=Ny(e);if(!o?.nodeName)return null;if(MD(o)&&o.contentDocument)return TD(o.contentDocument.body,t);if(t){let r=o.getAttribute("aria-activedescendant");if(r){let a=Ny(o).getElementById(r);if(a)return a}}return o}Gl(TD,"getActiveElement");function MD(e){return e.tagName==="IFRAME"}Gl(MD,"isFrame");var cr=b(k(),1);var zl=!1;var kD=b(k(),1),Wm=globalThis?.document?kD.useLayoutEffect:()=>{};var $r=b(k(),1);var ql=b(k(),1),EW=Object.defineProperty,AW=(e,t)=>EW(e,"name",{value:t,configurable:!0}),ED=ql[" useEffectEvent ".trim().toString()],AD=ql[" useInsertionEffect ".trim().toString()];function Fy(e){if(typeof ED=="function")return ED(e);let t=ql.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof AD=="function"?AD(()=>{t.current=e}):Wm(()=>{t.current=e}),ql.useMemo(()=>((...o)=>t.current?.(...o)),[])}AW(Fy,"useEffectEvent");var DW=Object.defineProperty,Cd=(e,t)=>DW(e,"name",{value:t,configurable:!0}),NW=cr[" useInsertionEffect ".trim().toString()]||Wm;function _y({prop:e,defaultProp:t,onChange:o=Cd(()=>{},"onChange"),caller:r}){let[a,n,s]=ND({defaultProp:t,onChange:o}),i=e!==void 0,l=i?e:a;if(zl){let c=cr.useRef(e!==void 0);cr.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=cr.useCallback(c=>{if(i){let d=OD(c)?c(e):c;d!==e&&s.current?.(d)}else n(c)},[i,e,n,s]);return[l,u]}Cd(_y,"useControllableState");function ND({defaultProp:e,onChange:t}){let[o,r]=cr.useState(e),a=cr.useRef(o),n=cr.useRef(t);return NW(()=>{n.current=t},[t]),cr.useEffect(()=>{a.current!==o&&(n.current?.(o),a.current=o)},[o,a]),[o,r,n]}Cd(ND,"useUncontrolledState");function OD(e){return typeof e=="function"}Cd(OD,"isFunction");var DD=Symbol("RADIX:SYNC_STATE");function OW(e,t,o,r){let{prop:a,defaultProp:n,onChange:s,caller:i}=t,l=a!==void 0,u=Fy(s);if(zl){let h=$r.useRef(a!==void 0);$r.useEffect(()=>{let v=h.current;v!==l&&console.warn(`${i} is changing from ${v?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),h.current=l},[l,i])}let c=[{...o,state:n}];r&&c.push(r);let[d,f]=$r.useReducer((h,v)=>{if(v.type===DD)return{...h,state:v.state};let x=e(h,v);return l&&!Object.is(x.state,h.state)&&u(x.state),x},...c),p=d.state,g=$r.useRef(p);$r.useEffect(()=>{g.current!==p&&(g.current=p,l||u(p))},[p,g,l]);let m=$r.useMemo(()=>a!==void 0?{...d,state:a}:d,[d,a]);return $r.useEffect(()=>{l&&!Object.is(a,d.state)&&f({type:DD,state:a})},[a,d.state,l]),[m,f]}Cd(OW,"useControllableStateReducer");var qD=b(k(),1),WD=b(ta(),1);var mt=b(k(),1);var FD=b(k(),1),FW=Object.defineProperty,By=(e,t)=>FW(e,"name",{value:t,configurable:!0});function Vy(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}By(Vy,"setRef");function _D(...e){return t=>{let o=!1,r=e.map(a=>{let n=Vy(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():Vy(e[a],null)}}}}By(_D,"composeRefs");function Hy(...e){return FD.useCallback(_D(...e),e)}By(Hy,"useComposedRefs");var BW=b(N(),1),_W=Object.defineProperty,dr=(e,t)=>_W(e,"name",{value:t,configurable:!0}),VW=dr(((e,t)=>{let o={...t};for(let r in t){let a=e[r],n=t[r];if(/^on[A-Z]/.test(r))if(a&&n){let i=typeof a=="function",l=typeof n=="function";zl&&(!i||!l)&&console.warn(`Slot: Expected a function for ${r}, but received ${[typeof a,typeof n].filter(u=>u!=="function").join(" and ")}.`),o[r]=(...u)=>{let c=l?n(...u):void 0;return i&&a(...u),c}}else a&&(o[r]=a);else r==="style"?o[r]={...typeof a=="object"?a:null,...typeof n=="object"?n:null}:r==="className"?o[r]=[a,n].filter(Boolean).join(" "):r==="aria-describedby"&&(o[r]=VD(n,a))}return{...e,...o}}),"mergeProps");function VD(...e){let t=new Set;for(let o of e)if(typeof o=="string")for(let r of String(o).trim().split(/\s+/))r&&t.add(r);return t.size>0?Array.from(t).join(" "):void 0}dr(VD,"concatAriaDescribedby");var BD=mt.createContext(VW);BD.displayName="SlotContext";function Gy(e){let t=mt.forwardRef((o,r)=>{let a=mt.useContext(BD),{children:n,mergeProps:s=a,...i}=o,l=null,u=!1,c=[];Uy(n)&&typeof $m=="function"&&(n=$m(n._payload)),mt.Children.forEach(n,g=>{if(GD(g)){u=!0;let m=g,h="child"in m.props?m.props.child:m.props.children;Uy(h)&&typeof $m=="function"&&(h=$m(h._payload)),l=UW(m,h),c.push(l?.props?.children)}else c.push(g)}),l?l=mt.cloneElement(l,void 0,c):!u&&mt.Children.count(n)===1&&mt.isValidElement(n)&&(l=n);let d=l?UD(l):void 0,f=Hy(r,d);if(!l){if(n||n===0)throw new Error(u?qW(e):zW(e));return n}let p=s(i,l.props??{});return l.type!==mt.Fragment&&(p.ref=r?f:d),mt.cloneElement(l,p)});return t.displayName=`${e}.Slot`,t}dr(Gy,"createSlot");var HD=Symbol.for("radix.slottable");function HW(e){let t=dr(o=>"child"in o?o.children(o.child):o.children,"Slottable");return t.displayName=`${e}.Slottable`,t.__radixId=HD,t}dr(HW,"createSlottable");var UW=dr((e,t)=>{if("child"in e.props){let o=e.props.child;return mt.isValidElement(o)?mt.cloneElement(o,void 0,e.props.children(o.props.children)):null}return mt.isValidElement(t)?t:null},"getSlottableElementFromSlottable");function UD(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)}dr(UD,"getElementRef");function GD(e){return mt.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===HD}dr(GD,"isSlottable");var GW=Symbol.for("react.lazy");function Uy(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===GW&&"_payload"in e&&zD(e._payload)}dr(Uy,"isLazyComponent");function zD(e){return typeof e=="object"&&e!==null&&"then"in e}dr(zD,"isPromiseLike");var zW=dr(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),qW=dr(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),$m=mt[" use ".trim().toString()];var $D=b(N(),1),WW=Object.defineProperty,$W=(e,t)=>WW(e,"name",{value:t,configurable:!0}),jW=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],jD=jW.reduce((e,t)=>{let o=Gy(`Primitive.${t}`),r=qD.forwardRef((a,n)=>{let{asChild:s,...i}=a,l=s?o:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,$D.jsx)(l,{...i,ref:n})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function KW(e,t){e&&WD.flushSync(()=>e.dispatchEvent(t))}$W(KW,"dispatchDiscreteCustomEvent");var XD=b(N(),1),XW=Object.defineProperty,YW=(e,t)=>XW(e,"name",{value:t,configurable:!0}),ZW="Toggle",wd=KD.forwardRef(YW(function(t,o){let{pressed:r,defaultPressed:a,onPressedChange:n,...s}=t,[i,l]=_y({prop:r,onChange:n,defaultProp:a??!1,caller:ZW});return(0,XD.jsx)(jD.button,{type:"button","aria-pressed":i,"data-state":i?"on":"off","data-disabled":t.disabled?"":void 0,...s,ref:o,onClick:Oy(t.onClick,()=>{t.disabled||l(!i)})})},"Toggle"));var ZD=b(N()),jm=Y("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"}}),Km=YD.forwardRef(({className:e,variant:t,size:o,...r},a)=>(0,ZD.jsx)(wd,{ref:a,className:P("moonui-theme",jm({variant:t,size:o,className:e})),...r}));Km.displayName=wd.displayName;var Zm=b(k());var Re=b(k(),1);var bt=b(N(),1),[Xm,QCe]=Ne("Tooltip",[rr]),Ym=rr(),QD="TooltipProvider",JW=700,zy="tooltip.open",[e4,Wy]=Xm(QD),JD=e=>{let{__scopeTooltip:t,delayDuration:o=JW,skipDelayDuration:r=300,disableHoverableContent:a=!1,children:n}=e,s=Re.useRef(!0),i=Re.useRef(!1),l=Re.useRef(0);return Re.useEffect(()=>{let u=l.current;return()=>window.clearTimeout(u)},[]),(0,bt.jsx)(e4,{scope:t,isOpenDelayedRef:s,delayDuration:o,onOpen:Re.useCallback(()=>{window.clearTimeout(l.current),s.current=!1},[]),onClose:Re.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>s.current=!0,r)},[r]),isPointerInTransitRef:i,onPointerInTransitChange:Re.useCallback(u=>{i.current=u},[]),disableHoverableContent:a,children:n})};JD.displayName=QD;var Sd="Tooltip",[t4,Rd]=Xm(Sd),e1=e=>{let{__scopeTooltip:t,children:o,open:r,defaultOpen:a,onOpenChange:n,disableHoverableContent:s,delayDuration:i}=e,l=Wy(Sd,e.__scopeTooltip),u=Ym(t),[c,d]=Re.useState(null),f=ze(),p=Re.useRef(0),g=s??l.disableHoverableContent,m=i??l.delayDuration,h=Re.useRef(!1),[v,x]=Xe({prop:r,defaultProp:a??!1,onChange:w=>{w?(l.onOpen(),document.dispatchEvent(new CustomEvent(zy))):l.onClose(),n?.(w)},caller:Sd}),y=Re.useMemo(()=>v?h.current?"delayed-open":"instant-open":"closed",[v]),R=Re.useCallback(()=>{window.clearTimeout(p.current),p.current=0,h.current=!1,x(!0)},[x]),S=Re.useCallback(()=>{window.clearTimeout(p.current),p.current=0,x(!1)},[x]),C=Re.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{h.current=!0,x(!0),p.current=0},m)},[m,x]);return Re.useEffect(()=>()=>{p.current&&(window.clearTimeout(p.current),p.current=0)},[]),(0,bt.jsx)(za,{...u,children:(0,bt.jsx)(t4,{scope:t,contentId:f,open:v,stateAttribute:y,trigger:c,onTriggerChange:d,onTriggerEnter:Re.useCallback(()=>{l.isOpenDelayedRef.current?C():R()},[l.isOpenDelayedRef,C,R]),onTriggerLeave:Re.useCallback(()=>{g?S():(window.clearTimeout(p.current),p.current=0)},[S,g]),onOpen:R,onClose:S,disableHoverableContent:g,children:o})})};e1.displayName=Sd;var qy="TooltipTrigger",t1=Re.forwardRef((e,t)=>{let{__scopeTooltip:o,...r}=e,a=Rd(qy,o),n=Wy(qy,o),s=Ym(o),i=Re.useRef(null),l=ie(t,i,a.onTriggerChange),u=Re.useRef(!1),c=Re.useRef(!1),d=Re.useCallback(()=>u.current=!1,[]);return Re.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),(0,bt.jsx)(qa,{asChild:!0,...s,children:(0,bt.jsx)(j.button,{"aria-describedby":a.open?a.contentId:void 0,"data-state":a.stateAttribute,...r,ref:l,onPointerMove:z(e.onPointerMove,f=>{f.pointerType!=="touch"&&!c.current&&!n.isPointerInTransitRef.current&&(a.onTriggerEnter(),c.current=!0)}),onPointerLeave:z(e.onPointerLeave,()=>{a.onTriggerLeave(),c.current=!1}),onPointerDown:z(e.onPointerDown,()=>{a.open&&a.onClose(),u.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:z(e.onFocus,()=>{u.current||a.onOpen()}),onBlur:z(e.onBlur,a.onClose),onClick:z(e.onClick,a.onClose)})})});t1.displayName=qy;var $y="TooltipPortal",[o4,r4]=Xm($y,{forceMount:void 0}),a4=e=>{let{__scopeTooltip:t,forceMount:o,children:r,container:a}=e,n=Rd($y,t);return(0,bt.jsx)(o4,{scope:t,forceMount:o,children:(0,bt.jsx)(Ye,{present:o||n.open,children:(0,bt.jsx)(Br,{asChild:!0,container:a,children:r})})})};a4.displayName=$y;var Wl="TooltipContent",o1=Re.forwardRef((e,t)=>{let o=r4(Wl,e.__scopeTooltip),{forceMount:r=o.forceMount,side:a="top",...n}=e,s=Rd(Wl,e.__scopeTooltip);return(0,bt.jsx)(Ye,{present:r||s.open,children:s.disableHoverableContent?(0,bt.jsx)(r1,{side:a,...n,ref:t}):(0,bt.jsx)(n4,{side:a,...n,ref:t})})}),n4=Re.forwardRef((e,t)=>{let o=Rd(Wl,e.__scopeTooltip),r=Wy(Wl,e.__scopeTooltip),a=Re.useRef(null),n=ie(t,a),[s,i]=Re.useState(null),{trigger:l,onClose:u}=o,c=a.current,{onPointerInTransitChange:d}=r,f=Re.useCallback(()=>{i(null),d(!1)},[d]),p=Re.useCallback((g,m)=>{let h=g.currentTarget,v={x:g.clientX,y:g.clientY},x=u4(v,h.getBoundingClientRect()),y=c4(v,x),R=d4(m.getBoundingClientRect()),S=p4([...y,...R]);i(S),d(!0)},[d]);return Re.useEffect(()=>()=>f(),[f]),Re.useEffect(()=>{if(l&&c){let g=h=>p(h,c),m=h=>p(h,l);return l.addEventListener("pointerleave",g),c.addEventListener("pointerleave",m),()=>{l.removeEventListener("pointerleave",g),c.removeEventListener("pointerleave",m)}}},[l,c,p,f]),Re.useEffect(()=>{if(s){let g=m=>{let h=m.target,v={x:m.clientX,y:m.clientY},x=l?.contains(h)||c?.contains(h),y=!f4(v,s);x?f():y&&(f(),u())};return document.addEventListener("pointermove",g),()=>document.removeEventListener("pointermove",g)}},[l,c,s,u,f]),(0,bt.jsx)(r1,{...e,ref:n})}),[s4,i4]=Xm(Sd,{isInside:!1}),l4=Kb("TooltipContent"),r1=Re.forwardRef((e,t)=>{let{__scopeTooltip:o,children:r,"aria-label":a,onEscapeKeyDown:n,onPointerDownOutside:s,...i}=e,l=Rd(Wl,o),u=Ym(o),{onClose:c}=l;return Re.useEffect(()=>(document.addEventListener(zy,c),()=>document.removeEventListener(zy,c)),[c]),Re.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,bt.jsx)(da,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:n,onPointerDownOutside:s,onFocusOutside:d=>d.preventDefault(),onDismiss:c,children:(0,bt.jsxs)(Fn,{"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,bt.jsx)(l4,{children:r}),(0,bt.jsx)(s4,{scope:o,isInside:!0,children:(0,bt.jsx)(uA,{id:l.contentId,role:"tooltip",children:a||r})})]})})});o1.displayName=Wl;var a1="TooltipArrow",n1=Re.forwardRef((e,t)=>{let{__scopeTooltip:o,...r}=e,a=Ym(o);return i4(a1,o).isInside?null:(0,bt.jsx)(_n,{...a,...r,ref:t})});n1.displayName=a1;function u4(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 c4(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 d4(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 f4(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 p4(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),m4(t)}function m4(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 s1=JD,i1=e1,l1=t1;var jy=o1,Ky=n1;var es=b(N()),Xy=s1,h4=Y("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"}}),Qm=i1,Jm=l1,u1=Zm.forwardRef(({className:e,...t},o)=>(0,es.jsx)(Ky,{ref:o,className:P("moonui-theme","fill-current",e),...t}));u1.displayName=Ky.displayName;var Id=Zm.forwardRef(({className:e,variant:t,size:o,showArrow:r=!1,sideOffset:a=4,...n},s)=>(0,es.jsxs)(jy,{ref:s,sideOffset:a,className:P("moonui-theme",h4({variant:t,size:o}),e),...n,children:[n.children,r&&(0,es.jsx)(u1,{})]}));Id.displayName=jy.displayName;var v4=Zm.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,...p},g)=>(0,es.jsxs)(Qm,{open:c,defaultOpen:d,onOpenChange:f,delayDuration:s,children:[(0,es.jsx)(Jm,{asChild:!0,children:e}),(0,es.jsx)(Id,{ref:g,side:a,align:n,variant:o,size:r,sideOffset:i,showArrow:l,className:u,...p,children:t})]}));v4.displayName="SimpleTooltip";var q=b(N()),kt=({icon:e,tooltip:t,active:o,onClick:r,disabled:a})=>(0,q.jsxs)(Qm,{children:[(0,q.jsx)(Jm,{asChild:!0,children:(0,q.jsx)(Km,{pressed:o,onPressedChange:()=>r(),disabled:a,"aria-label":t,className:"h-8 w-8 p-0",children:e})}),(0,q.jsx)(Id,{children:(0,q.jsx)("p",{children:t})})]}),x4=({onColorSelect:e})=>(0,q.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,q.jsx)("button",{type:"button","aria-label":`Select color ${o}`,className:"w-6 h-6 rounded border-2 border-border hover:border-ring focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",style:{backgroundColor:o},onClick:()=>e(o)},o))}),c1=Ke.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,Ke.useState)(e),[p,g]=(0,Ke.useState)(!1),[m,h]=(0,Ke.useState)(e),[v,x]=(0,Ke.useState)(null),y=Ke.default.useRef(null),R=Ke.default.useRef(null),[S,C]=(0,Ke.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}),w=(0,Ke.useCallback)(D=>{f(D),t?.(D)},[t]),I=(0,Ke.useCallback)(()=>{let D=window.getSelection();return D&&D.rangeCount>0?D.getRangeAt(0):null},[]),L=(0,Ke.useCallback)(D=>{if(!D)return;let te=window.getSelection();te&&(te.removeAllRanges(),te.addRange(D))},[]),T=(0,Ke.useCallback)((D,te)=>{if(r)return;y.current&&y.current.focus();let ue=I();if(document.execCommand(D,!1,te)||console.warn(`Command '${D}' failed to execute`),y.current){let $=y.current.innerHTML;w($)}C({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,I,w]),M=(0,Ke.useCallback)(D=>{let te=D.currentTarget.innerHTML;w(te)},[w]),F=(0,Ke.useCallback)(D=>{if(D.ctrlKey||D.metaKey)switch(D.key){case"b":D.preventDefault(),T("bold");break;case"i":D.preventDefault(),T("italic");break;case"u":D.preventDefault(),T("underline");break;case"z":D.preventDefault(),D.shiftKey?T("redo"):T("undo");break}D.key==="Tab"&&(D.preventDefault(),T("insertHTML"," "))},[T]),V=(0,Ke.useCallback)(()=>{let D=prompt("Enter URL:");D&&T("createLink",D)},[T]),A=(0,Ke.useCallback)(()=>{let D=prompt("Enter image URL:");D&&T("insertImage",D)},[T]),G=(0,Ke.useCallback)(D=>{T("formatBlock",`<h${D}>`)},[T]),_=(0,Ke.useCallback)(D=>{let te=window.getSelection();if(te&&te.rangeCount>0){let ue=te.getRangeAt(0),B=document.createElement("span");B.style.color=D;try{ue.surroundContents(B)}catch{T("foreColor",D)}if(y.current){let $=y.current.innerHTML;w($)}}},[T,w]),O=D=>{if(typeof window>"u")return D.replace(/<[^>]*>/g,"").replace(/ /g," ").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/'/g,"'");let te=document.createElement("div");return te.innerHTML=D,te.textContent||te.innerText||""};Ke.default.useEffect(()=>{y.current&&d&&d!==y.current.innerHTML&&(y.current.innerHTML=d)},[d]),Ke.default.useEffect(()=>{e!==void 0&&e!==d&&(f(e),h(e))},[e,d]);let E=i&&(0,q.jsx)(Xy,{children:(0,q.jsxs)(Ve.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,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)("div",{className:"flex items-center gap-1",children:[(0,q.jsx)(kt,{icon:(0,q.jsx)(fu,{className:"h-3 w-3"}),tooltip:"Bold (Ctrl+B)",active:S.bold,onClick:()=>T("bold"),disabled:r}),(0,q.jsx)(kt,{icon:(0,q.jsx)(Su,{className:"h-3 w-3"}),tooltip:"Italic (Ctrl+I)",active:S.italic,onClick:()=>T("italic"),disabled:r}),(0,q.jsx)(kt,{icon:(0,q.jsx)(Du,{className:"h-3 w-3"}),tooltip:"Underline (Ctrl+U)",active:S.underline,onClick:()=>T("underline"),disabled:r}),(0,q.jsx)(kt,{icon:(0,q.jsx)(Au,{className:"h-3 w-3"}),tooltip:"Strikethrough",active:S.strikethrough,onClick:()=>T("strikeThrough"),disabled:r})]}),(0,q.jsx)(ur,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),(0,q.jsxs)(Vl,{onValueChange:D=>{D.startsWith("h")?G(D.substring(1)):D==="normal"?T("formatBlock","p"):T("fontSize",D)},disabled:r,children:[(0,q.jsx)(Bl,{className:"w-24 h-8",children:(0,q.jsx)(xd,{placeholder:"Size"})}),(0,q.jsxs)(Hl,{children:[(0,q.jsx)(go,{value:"1",children:"Small"}),(0,q.jsx)(go,{value:"3",children:"Normal"}),(0,q.jsx)(go,{value:"5",children:"Large"}),(0,q.jsx)(go,{value:"7",children:"X-Large"}),(0,q.jsx)(ur,{className:"my-1"}),(0,q.jsx)(go,{value:"h1",children:"Heading 1"}),(0,q.jsx)(go,{value:"h2",children:"Heading 2"}),(0,q.jsx)(go,{value:"h3",children:"Heading 3"}),(0,q.jsx)(go,{value:"h4",children:"Heading 4"}),(0,q.jsx)(go,{value:"h5",children:"Heading 5"}),(0,q.jsx)(go,{value:"h6",children:"Heading 6"})]})]}),(0,q.jsx)(ur,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),(0,q.jsxs)("div",{className:"flex items-center gap-1",children:[(0,q.jsx)(kt,{icon:(0,q.jsx)(lu,{className:"h-3 w-3"}),tooltip:"Align Left",active:S.alignLeft,onClick:()=>T("justifyLeft"),disabled:r}),(0,q.jsx)(kt,{icon:(0,q.jsx)(su,{className:"h-3 w-3"}),tooltip:"Align Center",active:S.alignCenter,onClick:()=>T("justifyCenter"),disabled:r}),(0,q.jsx)(kt,{icon:(0,q.jsx)(uu,{className:"h-3 w-3"}),tooltip:"Align Right",active:S.alignRight,onClick:()=>T("justifyRight"),disabled:r}),(0,q.jsx)(kt,{icon:(0,q.jsx)(iu,{className:"h-3 w-3"}),tooltip:"Justify",active:S.alignJustify,onClick:()=>T("justifyFull"),disabled:r})]}),(0,q.jsx)(ur,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),(0,q.jsxs)("div",{className:"flex items-center gap-1",children:[(0,q.jsx)(kt,{icon:(0,q.jsx)(Pu,{className:"h-3 w-3"}),tooltip:"Bullet List",active:S.unorderedList,onClick:()=>T("insertUnorderedList"),disabled:r}),(0,q.jsx)(kt,{icon:(0,q.jsx)(Iu,{className:"h-3 w-3"}),tooltip:"Numbered List",active:S.orderedList,onClick:()=>T("insertOrderedList"),disabled:r}),(0,q.jsx)(kt,{icon:(0,q.jsx)(ku,{className:"h-3 w-3"}),tooltip:"Quote",active:S.quote,onClick:()=>T("formatBlock","blockquote"),disabled:r}),(0,q.jsx)(kt,{icon:(0,q.jsx)(gu,{className:"h-3 w-3"}),tooltip:"Code Block",active:S.code,onClick:()=>T("formatBlock","pre"),disabled:r})]}),(0,q.jsx)(ur,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),(0,q.jsxs)("div",{className:"flex items-center gap-1",children:[(0,q.jsx)(kt,{icon:(0,q.jsx)("span",{className:"text-xs font-mono",children:"\u2190"}),tooltip:"Decrease Indent",onClick:()=>T("outdent"),disabled:r}),(0,q.jsx)(kt,{icon:(0,q.jsx)("span",{className:"text-xs font-mono",children:"\u2192"}),tooltip:"Increase Indent",onClick:()=>T("indent"),disabled:r})]}),(0,q.jsx)(ur,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),(0,q.jsxs)("div",{className:"flex items-center gap-1",children:[(0,q.jsx)(kt,{icon:(0,q.jsx)(Ru,{className:"h-3 w-3"}),tooltip:"Insert Link",onClick:V,disabled:r}),(0,q.jsx)(kt,{icon:(0,q.jsx)(ds,{className:"h-3 w-3"}),tooltip:"Insert Image",onClick:A,disabled:r})]}),(0,q.jsx)(ur,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),(0,q.jsxs)($a,{children:[(0,q.jsx)(ja,{asChild:!0,children:(0,q.jsx)(Ae,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",disabled:r,title:"Text Color",children:(0,q.jsx)(wi,{className:"h-3 w-3"})})}),(0,q.jsx)(ha,{className:"w-auto p-0",children:(0,q.jsx)(x4,{onColorSelect:_})})]}),(0,q.jsx)(ur,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),(0,q.jsxs)("div",{className:"flex items-center gap-1",children:[(0,q.jsx)(kt,{icon:(0,q.jsx)(Nu,{className:"h-3 w-3"}),tooltip:"Undo (Ctrl+Z)",onClick:()=>T("undo"),disabled:r}),(0,q.jsx)(kt,{icon:(0,q.jsx)(Eu,{className:"h-3 w-3"}),tooltip:"Redo (Ctrl+Shift+Z)",onClick:()=>T("redo"),disabled:r})]})]}),l&&(0,q.jsxs)(q.Fragment,{children:[!p&&(0,q.jsx)(ur,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),(0,q.jsx)(kt,{icon:p?(0,q.jsx)(Co,{className:"h-3 w-3"}):(0,q.jsx)(cs,{className:"h-3 w-3"}),tooltip:p?"Edit Mode":"View Source Code",active:p,onClick:()=>{p?w(m):h(d),g(!p)},disabled:r})]})]})});return(0,q.jsxs)("div",{ref:c,className:P("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:[E,(0,q.jsxs)("div",{className:"relative",children:[p?(0,q.jsx)(Ve.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,q.jsx)("textarea",{ref:R,value:m,onChange:D=>h(D.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,q.jsx)(Ve.div,{ref:y,contentEditable:!r,suppressContentEditableWarning:!0,role:"textbox","aria-multiline":"true","aria-label":o,"aria-disabled":r||void 0,className:P("p-4 outline-none prose prose-sm dark:prose-invert max-w-none overflow-y-auto","bg-background text-foreground","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:M,onKeyDown:F,"data-placeholder":o,initial:{opacity:0},animate:{opacity:1}}),!d&&!p&&(0,q.jsx)("div",{className:"absolute top-4 left-4 text-muted-foreground pointer-events-none",style:{fontSize:"16px"},children:o})]}),(0,q.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,q.jsx)(y4,{content:d})})]})});c1.displayName="SimpleEditor";var y4=({content:e})=>{let[t,o]=(0,Ke.useState)(0);return(0,Ke.useEffect)(()=>{o((a=>{let n=document.createElement("div");return n.innerHTML=a,n.textContent||n.innerText||""})(e).length)},[e]),(0,q.jsxs)(q.Fragment,{children:[t," characters"]})};var Pd=b(k());var Ft=b(N()),d1=Y("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"}}),ts=Pd.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},p)=>{let{onDrag:g,onDragEnd:m,onDragStart:h,onAnimationStart:v,onAnimationEnd:x,onAnimationIteration:y,...R}=f;if(i&&l)return c?(0,Ft.jsx)(Ve.div,{ref:p,initial:{opacity:0},animate:{opacity:1},transition:{duration:u/1e3},className:P("moonui-theme",e),style:{height:n,width:s,...d},...R,children:l}):(0,Ft.jsx)("div",{ref:p,className:P("moonui-theme","animate-fade-in",e),style:{animationDuration:`${u}ms`,height:n,width:s,...d},...f,children:l});let S=c?Ve.div:"div";return(0,Ft.jsx)(S,{ref:p,className:P("moonui-theme",d1({variant:t,size:o,shape:r,animation:a}),"relative isolate",e),style:{height:n,width:s,...d},...c?K0:{},...R})});ts.displayName="Skeleton";var Yy=Pd.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,Ft.jsx)("div",{ref:u,className:P("moonui-theme","flex flex-col",e),style:{gap:r},...l,children:Array.from({length:t}).map((c,d)=>{let p=d===t-1?a:n?85+d%3*5:100;return(0,Ft.jsx)(ts,{variant:s,animation:i,className:"w-full",style:{height:o,width:`${p}%`}},d)})}));Yy.displayName="SkeletonText";var Zy=Pd.forwardRef(({className:e,size:t="2.5rem",variant:o="default",animation:r="pulse",...a},n)=>(0,Ft.jsx)(ts,{ref:n,variant:o,animation:r,shape:"circle",className:P("moonui-theme","shrink-0",e),style:{height:t,width:t},...a}));Zy.displayName="SkeletonAvatar";var f1=Pd.forwardRef(({className:e,showHeader:t=!0,contentLines:o=3,showFooter:r=!0,variant:a="default",animation:n="pulse",...s},i)=>(0,Ft.jsxs)("div",{ref:i,className:P("overflow-hidden rounded-md border border-border bg-background p-4",e),...s,children:[t&&(0,Ft.jsxs)("div",{className:"mb-4 flex items-center gap-4",children:[(0,Ft.jsx)(Zy,{size:"2.5rem",variant:a,animation:n}),(0,Ft.jsxs)("div",{className:"flex-1",children:[(0,Ft.jsx)(ts,{variant:a,animation:n,className:"mb-2 h-4 w-1/3"}),(0,Ft.jsx)(ts,{variant:a,animation:n,className:"h-3 w-1/4"})]})]}),(0,Ft.jsx)(Yy,{lines:o,variant:a,animation:n,className:"mb-4"}),r&&(0,Ft.jsxs)("div",{className:"flex items-center justify-between mt-4 pt-4 border-t border-border",children:[(0,Ft.jsx)(ts,{variant:a,animation:n,className:"h-4 w-1/4"}),(0,Ft.jsx)(ts,{variant:a,animation:n,className:"h-4 w-1/5"})]})]}));f1.displayName="SkeletonCard";var $l=b(k());var m1=b(N()),p1=$l.forwardRef(({className:e,children:t,onSwipeLeft:o,onSwipeRight:r,threshold:a=100,disabled:n=!1,...s},i)=>{let[l,u]=$l.useState(0),[c,d]=$l.useState(0),[f,p]=$l.useState(!1),g=v=>{n||(u(v.touches[0].clientX),p(!0))},m=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()),p(!1),d(0),u(0)};return(0,m1.jsx)("div",{ref:i,className:P("touch-pan-y select-none transition-transform duration-200",f&&"cursor-grabbing",e),onTouchStart:g,onTouchMove:m,onTouchEnd:h,...s,children:t})});p1.displayName="SwipeableCard";var tg=b(k());var jr=b(k(),1);var ii=b(N(),1),eg="Switch",[b4,Lwe]=Ne(eg),[C4,w4]=b4(eg),g1=jr.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,p]=jr.useState(null),g=ie(t,y=>p(y)),m=jr.useRef(!1),h=f?c||!!f.closest("form"):!0,[v,x]=Xe({prop:a,defaultProp:n??!1,onChange:u,caller:eg});return(0,ii.jsxs)(C4,{scope:o,checked:v,disabled:i,children:[(0,ii.jsx)(j.button,{type:"button",role:"switch","aria-checked":v,"aria-required":s,"data-state":y1(v),"data-disabled":i?"":void 0,disabled:i,value:l,...d,ref:g,onClick:z(e.onClick,y=>{x(R=>!R),h&&(m.current=y.isPropagationStopped(),m.current||y.stopPropagation())})}),h&&(0,ii.jsx)(x1,{control:f,bubbles:!m.current,name:r,value:l,checked:v,required:s,disabled:i,form:c,style:{transform:"translateX(-100%)"}})]})});g1.displayName=eg;var h1="SwitchThumb",v1=jr.forwardRef((e,t)=>{let{__scopeSwitch:o,...r}=e,a=w4(h1,o);return(0,ii.jsx)(j.span,{"data-state":y1(a.checked),"data-disabled":a.disabled?"":void 0,...r,ref:t})});v1.displayName=h1;var S4="SwitchBubbleInput",x1=jr.forwardRef(({__scopeSwitch:e,control:t,checked:o,bubbles:r=!0,...a},n)=>{let s=jr.useRef(null),i=ie(s,n),l=pl(o),u=ml(t);return jr.useEffect(()=>{let c=s.current;if(!c)return;let d=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(d,"checked").set;if(l!==o&&p){let g=new Event("click",{bubbles:r});p.call(c,o),c.dispatchEvent(g)}},[l,o,r]),(0,ii.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}})});x1.displayName=S4;function y1(e){return e?"checked":"unchecked"}var Qy=g1,b1=v1;var ba=b(N()),I4=Y(["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","data-[state=unchecked]:bg-input","dark:focus-visible:ring-primary/40"],{variants:{size:{sm:"h-4 w-8",md:"h-6 w-11",lg:"h-7 w-14"},variant:{primary:"data-[state=checked]:bg-primary",success:"data-[state=checked]:bg-success",warning:"data-[state=checked]:bg-warning",destructive:"data-[state=checked]:bg-error",secondary:"data-[state=checked]:bg-accent"}},defaultVariants:{size:"md",variant:"primary"}}),P4=Y("pointer-events-none block rounded-full bg-background shadow-lg ring-0 transition-transform",{variants:{size:{sm:"h-3 w-3 data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0",md:"h-5 w-5 data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0",lg:"h-6 w-6 data-[state=checked]:translate-x-7 data-[state=unchecked]:translate-x-0"}},defaultVariants:{size:"md"}}),C1=tg.forwardRef(({className:e,size:t,variant:o,loading:r,leftIcon:a,rightIcon:n,description:s,"aria-describedby":i,...l},u)=>{let c=tg.useId(),d=s?`${c}-description`:void 0,f=[i,d].filter(Boolean).join(" ")||void 0;return(0,ba.jsxs)("div",{className:"moonui-theme inline-flex items-center gap-2",children:[a&&(0,ba.jsx)("span",{className:"text-muted-foreground",children:a}),(0,ba.jsxs)(Qy,{className:P(I4({size:t,variant:o}),r&&"opacity-80 cursor-wait",e),disabled:r||l.disabled,"aria-describedby":f,...l,ref:u,children:[r?(0,ba.jsx)("div",{className:"absolute inset-0 flex items-center justify-center",children:(0,ba.jsx)("div",{className:"h-3 w-3 animate-spin rounded-full border-2 border-muted border-t-primary"})}):null,(0,ba.jsx)(b1,{className:P(P4({size:t}))})]}),n&&(0,ba.jsx)("span",{className:"text-muted-foreground",children:n}),s&&(0,ba.jsx)("span",{id:d,className:"text-sm text-muted-foreground",children:s})]})});C1.displayName=Qy.displayName;var fr=b(k());var Ca=b(N()),w1=fr.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]=fr.useState(""),[p,g]=fr.useState(""),m=fr.useRef(null);fr.useImperativeHandle(c,()=>m.current);let h=fr.useRef([]),v=fr.useId(),x=w=>{if(e.length===0)return;let I=Math.max(0,Math.min(e.length-1,w));h.current[I]?.focus()},y=w=>{w.key==="Enter"||w.key===n?(w.preventDefault(),S()):w.key==="Backspace"&&d===""&&e.length>0?C(e.length-1):w.key==="ArrowLeft"&&d===""&&e.length>0&&(w.preventDefault(),x(e.length-1))},R=w=>I=>{switch(I.key){case"ArrowLeft":I.preventDefault(),x(w-1);break;case"ArrowRight":I.preventDefault(),w>=e.length-1?m.current?.focus():x(w+1);break;case"Home":I.preventDefault(),x(0);break;case"End":I.preventDefault(),x(e.length-1);break;case"Delete":case"Backspace":{I.preventDefault();let L=e.length-1;C(w),requestAnimationFrame(()=>{L>0?x(Math.min(w,L-1)):m.current?.focus()});break}default:break}},S=()=>{let w=d.trim();if(w){if(!a&&e.includes(w)){g("This tag already exists"),setTimeout(()=>g(""),2e3);return}if(o&&e.length>=o){g(`Maximum ${o} tags allowed`),setTimeout(()=>g(""),2e3);return}t([...e,w]),f(""),g("")}},C=w=>{l||t(e.filter((I,L)=>L!==w))};return(0,Ca.jsxs)("div",{className:"relative",children:[(0,Ca.jsxs)("div",{className:P("flex items-center 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","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((w,I)=>(0,Ca.jsxs)(wo,{variant:r,className:"gap-1 pr-1.5",children:[(0,Ca.jsx)("span",{className:"text-xs",children:w}),!l&&(0,Ca.jsx)("button",{ref:L=>{h.current[I]=L},type:"button","aria-label":`Remove ${w}`,onClick:()=>C(I),onKeyDown:R(I),className:"ml-1 rounded-full outline-none ring-offset-background focus:ring-2 focus:ring-ring focus:ring-offset-2",children:(0,Ca.jsx)(Do,{className:"h-3 w-3 text-muted-foreground hover:text-foreground transition-colors"})})]},I)),(0,Ca.jsx)("input",{ref:m,type:"text",value:d,onChange:w=>f(w.target.value),onKeyDown:y,onBlur:S,disabled:l,placeholder:e.length===0?s:"","aria-label":"Add tag","aria-describedby":p?v:void 0,"aria-invalid":p?!0:void 0,className:P("flex-1 bg-transparent outline-none placeholder:text-muted-foreground","min-w-[120px]",l&&"cursor-not-allowed"),...u})]}),p&&(0,Ca.jsx)("p",{id:v,role:"status",className:"mt-1 text-xs text-destructive",children:p})]})});w1.displayName="TagsInput";var ho=b(k());var wa=b(N()),L4=Y(["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}}),S1=ho.forwardRef(({className:e,wrapperClassName:t,messageClassName:o,variant:r,size:a,error:n,success:s,loading:i,autoResize:l=!1,maxHeight:u,characterCount:c=!1,disabled:d,maxLength:f,value:p,defaultValue:g,onChange:m,...h},v)=>{let x=ho.useId(),y=h.id||x,R=ho.useRef(null),[S,C]=ho.useState(p||g||"");ho.useImperativeHandle(v,()=>R.current);let w=ho.useCallback(()=>{let A=R.current;if(!A||!l)return;A.style.height="auto";let G=A.scrollHeight;u&&G>u?(A.style.height=`${u}px`,A.style.overflowY="auto"):(A.style.height=`${G}px`,A.style.overflowY="hidden")},[l,u]);ho.useEffect(()=>{w()},[S,w]),ho.useEffect(()=>{p!==void 0&&C(p)},[p]);let I=A=>{C(A.target.value),m?.(A)},L=String(S).length,T=c&&(f!==void 0||L>0),M=typeof n=="string"?n:void 0,F=typeof s=="string"?s:void 0,V=M||F;return(0,wa.jsxs)("div",{className:P("moonui-theme","space-y-1.5 w-full",t),children:[(0,wa.jsxs)("div",{className:"relative",children:[(0,wa.jsx)("textarea",{ref:R,className:P(L4({variant:r,size:a,isError:!!n,isSuccess:!!s}),i&&"pr-10",e),disabled:d||i,value:p,defaultValue:g,onChange:I,maxLength:f,"aria-invalid":!!n||void 0,"aria-describedby":M?`${y}-error`:F?`${y}-success`:void 0,...h}),i&&(0,wa.jsx)("div",{className:"absolute top-3 right-3 text-gray-500",children:(0,wa.jsx)(Rt,{className:"h-4 w-4 animate-spin","aria-hidden":"true"})})]}),(0,wa.jsxs)("div",{className:"flex items-center justify-between",children:[V&&(0,wa.jsx)("p",{className:P("text-xs transition-all",M&&"text-error",F&&"text-success",o),id:M?`${y}-error`:F?`${y}-success`:void 0,children:M||F}),T&&(0,wa.jsxs)("p",{className:"text-xs text-muted-foreground dark:text-gray-500 ml-auto",children:[L,f!==void 0&&` / ${f}`]})]})]})});S1.displayName="Textarea";var Kr=b(k());var Se=b(k(),1),I1=b(ta(),1);var Ue=b(N(),1),rb="ToastProvider",[ab,T4,M4]=ea("Toast"),[P1,Ywe]=Ne("Toast",[M4]),[k4,rg]=P1(rb),L1=e=>{let{__scopeToast:t,label:o="Notification",duration:r=5e3,swipeDirection:a="right",swipeThreshold:n=50,children:s}=e,[i,l]=Se.useState(null),[u,c]=Se.useState(0),d=Se.useRef(!1),f=Se.useRef(!1);return o.trim()||console.error(`Invalid prop \`label\` supplied to \`${rb}\`. Expected non-empty \`string\`.`),(0,Ue.jsx)(ab.Provider,{scope:t,children:(0,Ue.jsx)(k4,{scope:t,label:o,duration:r,swipeDirection:a,swipeThreshold:n,toastCount:u,viewport:i,onViewportChange:l,onToastAdd:Se.useCallback(()=>c(p=>p+1),[]),onToastRemove:Se.useCallback(()=>c(p=>p-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:f,children:s})})};L1.displayName=rb;var T1="ToastViewport",E4=["F8"],eb="toast.viewportPause",tb="toast.viewportResume",M1=Se.forwardRef((e,t)=>{let{__scopeToast:o,hotkey:r=E4,label:a="Notifications ({hotkey})",...n}=e,s=rg(T1,o),i=T4(o),l=Se.useRef(null),u=Se.useRef(null),c=Se.useRef(null),d=Se.useRef(null),f=ie(t,d,s.onViewportChange),p=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),g=s.toastCount>0;Se.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]),Se.useEffect(()=>{let h=l.current,v=d.current;if(g&&h&&v){let x=()=>{if(!s.isClosePausedRef.current){let C=new CustomEvent(eb);v.dispatchEvent(C),s.isClosePausedRef.current=!0}},y=()=>{if(s.isClosePausedRef.current){let C=new CustomEvent(tb);v.dispatchEvent(C),s.isClosePausedRef.current=!1}},R=C=>{!h.contains(C.relatedTarget)&&y()},S=()=>{h.contains(document.activeElement)||y()};return h.addEventListener("focusin",x),h.addEventListener("focusout",R),h.addEventListener("pointermove",x),h.addEventListener("pointerleave",S),window.addEventListener("blur",x),window.addEventListener("focus",y),()=>{h.removeEventListener("focusin",x),h.removeEventListener("focusout",R),h.removeEventListener("pointermove",x),h.removeEventListener("pointerleave",S),window.removeEventListener("blur",x),window.removeEventListener("focus",y)}}},[g,s.isClosePausedRef]);let m=Se.useCallback(({tabbingDirection:h})=>{let x=i().map(y=>{let R=y.ref.current,S=[R,...q4(R)];return h==="forwards"?S:S.reverse()});return(h==="forwards"?x.reverse():x).flat()},[i]);return Se.useEffect(()=>{let h=d.current;if(h){let v=x=>{let y=x.altKey||x.ctrlKey||x.metaKey;if(x.key==="Tab"&&!y){let S=document.activeElement,C=x.shiftKey;if(x.target===h&&C){u.current?.focus();return}let L=m({tabbingDirection:C?"backwards":"forwards"}),T=L.findIndex(M=>M===S);Jy(L.slice(T+1))?x.preventDefault():C?u.current?.focus():c.current?.focus()}};return h.addEventListener("keydown",v),()=>h.removeEventListener("keydown",v)}},[i,m]),(0,Ue.jsxs)(TP,{ref:l,role:"region","aria-label":a.replace("{hotkey}",p),tabIndex:-1,style:{pointerEvents:g?void 0:"none"},children:[g&&(0,Ue.jsx)(ob,{ref:u,onFocusFromOutsideViewport:()=>{let h=m({tabbingDirection:"forwards"});Jy(h)}}),(0,Ue.jsx)(ab.Slot,{scope:o,children:(0,Ue.jsx)(j.ol,{tabIndex:-1,...n,ref:f})}),g&&(0,Ue.jsx)(ob,{ref:c,onFocusFromOutsideViewport:()=>{let h=m({tabbingDirection:"backwards"});Jy(h)}})]})});M1.displayName=T1;var k1="ToastFocusProxy",ob=Se.forwardRef((e,t)=>{let{__scopeToast:o,onFocusFromOutsideViewport:r,...a}=e,n=rg(k1,o);return(0,Ue.jsx)(hd,{tabIndex:0,...a,ref:t,style:{position:"fixed"},onFocus:s=>{let i=s.relatedTarget;!n.viewport?.contains(i)&&r()}})});ob.displayName=k1;var Ld="Toast",A4="toast.swipeStart",D4="toast.swipeMove",N4="toast.swipeCancel",O4="toast.swipeEnd",E1=Se.forwardRef((e,t)=>{let{forceMount:o,open:r,defaultOpen:a,onOpenChange:n,...s}=e,[i,l]=Xe({prop:r,defaultProp:a??!0,onChange:n,caller:Ld});return(0,Ue.jsx)(Ye,{present:o||i,children:(0,Ue.jsx)(V4,{open:i,...s,ref:t,onClose:()=>l(!1),onPause:Ee(e.onPause),onResume:Ee(e.onResume),onSwipeStart:z(e.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:z(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:z(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:z(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)})})})});E1.displayName=Ld;var[F4,_4]=P1(Ld,{onClose(){}}),V4=Se.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:p,...g}=e,m=rg(Ld,o),[h,v]=Se.useState(null),x=ie(t,A=>v(A)),y=Se.useRef(null),R=Se.useRef(null),S=a||m.duration,C=Se.useRef(0),w=Se.useRef(S),I=Se.useRef(0),{onToastAdd:L,onToastRemove:T}=m,M=Ee(()=>{h?.contains(document.activeElement)&&m.viewport?.focus(),s()}),F=Se.useCallback(A=>{!A||A===1/0||(window.clearTimeout(I.current),C.current=new Date().getTime(),I.current=window.setTimeout(M,A))},[M]);Se.useEffect(()=>{let A=m.viewport;if(A){let G=()=>{F(w.current),u?.()},_=()=>{let O=new Date().getTime()-C.current;w.current=w.current-O,window.clearTimeout(I.current),l?.()};return A.addEventListener(eb,_),A.addEventListener(tb,G),()=>{A.removeEventListener(eb,_),A.removeEventListener(tb,G)}}},[m.viewport,S,l,u,F]),Se.useEffect(()=>{n&&!m.isClosePausedRef.current&&F(S)},[n,S,m.isClosePausedRef,F]),Se.useEffect(()=>(L(),()=>T()),[L,T]);let V=Se.useMemo(()=>h?V1(h):null,[h]);return m.viewport?(0,Ue.jsxs)(Ue.Fragment,{children:[V&&(0,Ue.jsx)(B4,{__scopeToast:o,role:"status","aria-live":r==="foreground"?"assertive":"polite",children:V}),(0,Ue.jsx)(F4,{scope:o,onClose:M,children:I1.createPortal((0,Ue.jsx)(ab.ItemSlot,{scope:o,children:(0,Ue.jsx)(LP,{asChild:!0,onEscapeKeyDown:z(i,()=>{m.isFocusedToastEscapeKeyDownRef.current||M(),m.isFocusedToastEscapeKeyDownRef.current=!1}),children:(0,Ue.jsx)(j.li,{tabIndex:0,"data-state":n?"open":"closed","data-swipe-direction":m.swipeDirection,...g,ref:x,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:z(e.onKeyDown,A=>{A.key==="Escape"&&(i?.(A.nativeEvent),A.nativeEvent.defaultPrevented||(m.isFocusedToastEscapeKeyDownRef.current=!0,M()))}),onPointerDown:z(e.onPointerDown,A=>{A.button===0&&(y.current={x:A.clientX,y:A.clientY})}),onPointerMove:z(e.onPointerMove,A=>{if(!y.current)return;let G=A.clientX-y.current.x,_=A.clientY-y.current.y,O=!!R.current,E=["left","right"].includes(m.swipeDirection),D=["left","up"].includes(m.swipeDirection)?Math.min:Math.max,te=E?D(0,G):0,ue=E?0:D(0,_),B=A.pointerType==="touch"?10:2,$={x:te,y:ue},Z={originalEvent:A,delta:$};O?(R.current=$,og(D4,d,Z,{discrete:!1})):R1($,m.swipeDirection,B)?(R.current=$,og(A4,c,Z,{discrete:!1}),A.target.setPointerCapture(A.pointerId)):(Math.abs(G)>B||Math.abs(_)>B)&&(y.current=null)}),onPointerUp:z(e.onPointerUp,A=>{let G=R.current,_=A.target;if(_.hasPointerCapture(A.pointerId)&&_.releasePointerCapture(A.pointerId),R.current=null,y.current=null,G){let O=A.currentTarget,E={originalEvent:A,delta:G};R1(G,m.swipeDirection,m.swipeThreshold)?og(O4,p,E,{discrete:!0}):og(N4,f,E,{discrete:!0}),O.addEventListener("click",D=>D.preventDefault(),{once:!0})}})})})}),m.viewport)})]}):null}),B4=e=>{let{__scopeToast:t,children:o,...r}=e,a=rg(Ld,t),[n,s]=Se.useState(!1),[i,l]=Se.useState(!1);return G4(()=>s(!0)),Se.useEffect(()=>{let u=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(u)},[]),i?null:(0,Ue.jsx)(Br,{asChild:!0,children:(0,Ue.jsx)(hd,{...r,children:n&&(0,Ue.jsxs)(Ue.Fragment,{children:[a.label," ",o]})})})},H4="ToastTitle",A1=Se.forwardRef((e,t)=>{let{__scopeToast:o,...r}=e;return(0,Ue.jsx)(j.div,{...r,ref:t})});A1.displayName=H4;var U4="ToastDescription",D1=Se.forwardRef((e,t)=>{let{__scopeToast:o,...r}=e;return(0,Ue.jsx)(j.div,{...r,ref:t})});D1.displayName=U4;var N1="ToastAction",O1=Se.forwardRef((e,t)=>{let{altText:o,...r}=e;return o.trim()?(0,Ue.jsx)(_1,{altText:o,asChild:!0,children:(0,Ue.jsx)(nb,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${N1}\`. Expected non-empty \`string\`.`),null)});O1.displayName=N1;var F1="ToastClose",nb=Se.forwardRef((e,t)=>{let{__scopeToast:o,...r}=e,a=_4(F1,o);return(0,Ue.jsx)(_1,{asChild:!0,children:(0,Ue.jsx)(j.button,{type:"button",...r,ref:t,onClick:z(e.onClick,a.onClose)})})});nb.displayName=F1;var _1=Se.forwardRef((e,t)=>{let{__scopeToast:o,altText:r,...a}=e;return(0,Ue.jsx)(j.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...a,ref:t})});function V1(e){let t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),z4(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(...V1(r))}}),t}function og(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?mi(a,n):a.dispatchEvent(n)}var R1=(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 G4(e=()=>{}){let t=Ee(e);ke(()=>{let o=0,r=0;return o=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(o),window.cancelAnimationFrame(r)}},[t])}function z4(e){return e.nodeType===e.ELEMENT_NODE}function q4(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 Jy(e){let t=document.activeElement;return e.some(o=>o===t?!0:(o.focus(),document.activeElement!==t))}var B1=L1,sb=M1,ib=E1,lb=A1,ub=D1,cb=O1,db=nb;var Wt=b(N()),U1=B1,pb=Kr.forwardRef(({className:e,...t},o)=>(0,Wt.jsx)(sb,{ref:o,className:P("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}));pb.displayName=sb.displayName;var $4=Y("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"}}),mb=Kr.forwardRef(({className:e,variant:t,...o},r)=>(0,Wt.jsx)(ib,{ref:r,className:P("moonui-theme",$4({variant:t}),e),...o}));mb.displayName=ib.displayName;var G1=Kr.forwardRef(({className:e,...t},o)=>(0,Wt.jsx)(cb,{ref:o,className:P("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}));G1.displayName=cb.displayName;var gb=Kr.forwardRef(({className:e,...t},o)=>(0,Wt.jsxs)(db,{ref:o,className:P("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,Wt.jsx)(Do,{className:"h-4 w-4"}),(0,Wt.jsx)("span",{className:"sr-only",children:"Close"})]}));gb.displayName=db.displayName;var hb=Kr.forwardRef(({className:e,...t},o)=>(0,Wt.jsx)(lb,{ref:o,className:P("moonui-theme","text-sm font-semibold [&+div]:text-xs",e),...t}));hb.displayName=lb.displayName;var vb=Kr.forwardRef(({className:e,...t},o)=>(0,Wt.jsx)(ub,{ref:o,className:P("moonui-theme","text-sm opacity-90",e),...t}));vb.displayName=ub.displayName;var j4=5,K4=1e6,fb=new Map,H1=e=>{if(fb.has(e))return;let t=setTimeout(()=>{fb.delete(e),Td({type:"REMOVE_TOAST",toastId:e})},K4);fb.set(e,t)},X4=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,j4)};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?H1(o):e.toasts.forEach(r=>{H1(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}},ag=[],ng={toasts:[]},Y4=0;function Td(e){ng=X4(ng,e),ag.forEach(t=>{t(ng)})}function z1({...e}){let t=`toast-${Date.now()}-${++Y4}`,o=a=>Td({type:"UPDATE_TOAST",toast:{...a,id:t}}),r=()=>Td({type:"DISMISS_TOAST",toastId:t});return Td({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:a=>{a||r()}}}),{id:t,dismiss:r,update:o}}function q1(){let[e,t]=Kr.useState(ng);return Kr.useEffect(()=>(ag.push(t),()=>{let o=ag.indexOf(t);o>-1&&ag.splice(o,1)}),[e]),{...e,toast:z1,dismiss:o=>Td({type:"DISMISS_TOAST",toastId:o})}}function Z4(){let{toasts:e}=q1();return(0,Wt.jsxs)(U1,{children:[e.map(function({id:t,title:o,description:r,action:a,variant:n,open:s,onOpenChange:i,...l}){return(0,Wt.jsxs)(mb,{variant:n,open:s,onOpenChange:i,...l,children:[(0,Wt.jsxs)("div",{className:"grid gap-1",children:[o&&(0,Wt.jsx)(hb,{children:o}),r&&(0,Wt.jsx)(vb,{children:r})]}),a,(0,Wt.jsx)(gb,{})]},t)}),(0,Wt.jsx)(pb,{})]})}var W1=b(k());var K1=b(N()),$1=Y(["inline-flex items-center justify-center rounded","border border-border bg-muted","px-1.5 font-mono font-medium text-muted-foreground","shadow-[0_1px_0_1px_hsl(var(--border))]","select-none whitespace-nowrap"],{variants:{size:{sm:"h-5 min-w-5 text-[10px]",md:"h-6 min-w-6 text-xs"}},defaultVariants:{size:"md"}}),j1=W1.forwardRef(({className:e,size:t,children:o,...r},a)=>(0,K1.jsx)("kbd",{ref:a,className:P("moonui-theme",$1({size:t}),e),...r,children:o}));j1.displayName="Kbd";var pr=b(k());var zo=b(N()),X1=Y(["moonui-theme inline-flex items-center rounded-md outline-none","focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background"],{variants:{size:{sm:"gap-0.5",md:"gap-1",lg:"gap-1.5"}},defaultVariants:{size:"md"}}),Q4={sm:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"},Y1=pr.forwardRef(({className:e,value:t,defaultValue:o,onValueChange:r,max:a=5,readOnly:n=!1,precision:s="full",icon:i,size:l,"aria-label":u="Rating",...c},d)=>{let p=Q4[l??"md"],g=s==="half"?.5:1,m=t!==void 0,[h,v]=pr.useState(o??0),x=m?t??0:h,[y,R]=pr.useState(null),S=y!==null?y:x,C=pr.useCallback(T=>{n||(m||v(T),r?.(T))},[n,m,r]),w=pr.useCallback(T=>{if(n)return;let M=null;switch(T.key){case"ArrowRight":case"ArrowUp":M=Math.min(a,x+g);break;case"ArrowLeft":case"ArrowDown":M=Math.max(g,x-g);break;case"Home":M=g;break;case"End":M=a;break;default:return}T.preventDefault(),C(M)},[n,a,x,g,C]),I=T=>{if(pr.isValidElement(i)){let M=i;return pr.cloneElement(M,{className:P(p,"shrink-0",T&&"fill-current",M.props?.className)})}return(0,zo.jsx)(fn,{className:P(p,"shrink-0",T&&"fill-current"),"aria-hidden":"true"})},L=Array.from({length:a},(T,M)=>M+1);return(0,zo.jsx)("div",{ref:d,role:"radiogroup","aria-label":u,"aria-orientation":"horizontal","aria-readonly":n||void 0,tabIndex:n?void 0:0,onKeyDown:w,onMouseLeave:()=>R(null),className:P(X1({size:l}),e),...c,children:L.map(T=>{let M=Math.max(0,Math.min(1,S-(T-1))),F=T-.5;return(0,zo.jsxs)("span",{"data-slot":"rating-star",className:P("relative inline-flex shrink-0",!n&&"cursor-pointer"),children:[(0,zo.jsx)("span",{"aria-hidden":"true",className:"inline-flex text-muted-foreground/30",children:I(!1)}),(0,zo.jsx)("span",{"aria-hidden":"true",className:"pointer-events-none absolute left-0 top-0 h-full overflow-hidden text-amber-400",style:{width:`${M*100}%`},children:I(!0)}),!n&&s==="half"&&(0,zo.jsxs)(zo.Fragment,{children:[(0,zo.jsx)("button",{type:"button",role:"radio","aria-checked":x===F,"aria-label":`${F} stars`,tabIndex:-1,onClick:()=>C(F),onMouseEnter:()=>R(F),className:"absolute inset-y-0 left-0 z-10 w-1/2 cursor-pointer bg-transparent"}),(0,zo.jsx)("button",{type:"button",role:"radio","aria-checked":x===T,"aria-label":`${T} stars`,tabIndex:-1,onClick:()=>C(T),onMouseEnter:()=>R(T),className:"absolute inset-y-0 right-0 z-10 w-1/2 cursor-pointer bg-transparent"})]}),!n&&s==="full"&&(0,zo.jsx)("button",{type:"button",role:"radio","aria-checked":x===T,"aria-label":`${T} ${T===1?"star":"stars"}`,tabIndex:-1,onClick:()=>C(T),onMouseEnter:()=>R(T),className:"absolute inset-0 z-10 cursor-pointer bg-transparent"})]},T)})})});Y1.displayName="Rating";var Z1=b(k());var li=b(N()),Q1=Y(["inline-block shrink-0 rounded-full","border-current border-t-transparent","animate-spin motion-reduce:animate-none"],{variants:{size:{sm:"h-4 w-4 border-2",md:"h-6 w-6 border-2",lg:"h-8 w-8 border-[3px]",xl:"h-10 w-10 border-4"}},defaultVariants:{size:"md"}}),J4={sm:"h-1 w-1",md:"h-1.5 w-1.5",lg:"h-2 w-2",xl:"h-2.5 w-2.5"},J1=Z1.forwardRef(({className:e,size:t,variant:o="default",label:r="Loading",...a},n)=>(0,li.jsxs)("div",{ref:n,role:"status","aria-live":"polite",className:P("moonui-theme inline-flex items-center justify-center",e),...a,children:[o==="dots"?(0,li.jsx)("span",{className:"inline-flex items-center gap-1","aria-hidden":"true",children:[0,1,2].map(s=>(0,li.jsx)("span",{className:P("inline-block rounded-full bg-current","animate-bounce motion-reduce:animate-none",J4[t??"md"]),style:{animationDelay:`${s*.15}s`}},s))}):(0,li.jsx)("span",{className:P(Q1({size:t})),"aria-hidden":"true"}),(0,li.jsx)("span",{className:"sr-only",children:r})]}));J1.displayName="Spinner";var os=b(k());var oN=b(N()),eN=Y("moonui-theme inline-flex",{variants:{orientation:{horizontal:"flex-row items-center",vertical:"flex-col items-stretch"},attached:{true:"",false:"gap-2"}},compoundVariants:[{orientation:"horizontal",attached:!0,class:["[&>*:not(:first-child)]:rounded-l-none","[&>*:not(:last-child)]:rounded-r-none","[&>*:not(:first-child)]:-ml-px"]},{orientation:"vertical",attached:!0,class:["[&>*:not(:first-child)]:rounded-t-none","[&>*:not(:last-child)]:rounded-b-none","[&>*:not(:first-child)]:-mt-px"]}],defaultVariants:{orientation:"horizontal",attached:!0}}),tN=os.forwardRef(({className:e,orientation:t,attached:o,size:r,variant:a,children:n,...s},i)=>{let u=r!==void 0||a!==void 0?os.Children.map(n,c=>{if(!os.isValidElement(c)||c.type!==Ae)return c;let d=c.props;return os.cloneElement(c,{size:d.size??r,variant:d.variant??a})}):n;return(0,oN.jsx)("div",{ref:i,role:"group",className:P(eN({orientation:t,attached:o}),e),...s,children:u})});tN.displayName="ButtonGroup";var di=b(k());var xo=b(k(),1);var gr=b(k(),1),xb=b(N(),1),e$=Object.defineProperty,mr=(e,t)=>e$(e,"name",{value:t,configurable:!0});function t$(e,t){let o=gr.createContext(t);o.displayName=e+"Context";let r=mr(n=>{let{children:s,...i}=n,l=gr.useMemo(()=>i,Object.values(i));return(0,xb.jsx)(o.Provider,{value:l,children:s})},"Provider");r.displayName=e+"Provider";function a(n,s={}){let{optional:i=!1}=s,l=gr.useContext(o);if(l)return l;if(t!==void 0)return t;if(!i)throw new Error(`\`${n}\` must be used within \`${e}\``)}return mr(a,"useContext"),[r,a]}mr(t$,"createContext");function nn(e,t=[]){let o=[];function r(n,s){let i=gr.createContext(s);i.displayName=n+"Context";let l=o.length;o=[...o,s];let u=mr(d=>{let{scope:f,children:p,...g}=d,m=f?.[e]?.[l]||i,h=gr.useMemo(()=>g,Object.values(g));return(0,xb.jsx)(m.Provider,{value:h,children:p})},"Provider");u.displayName=n+"Provider";function c(d,f,p={}){let{optional:g=!1}=p,m=f?.[e]?.[l]||i,h=gr.useContext(m);if(h)return h;if(s!==void 0)return s;if(!g)throw new Error(`\`${d}\` must be used within \`${n}\``)}return mr(c,"useContext"),[u,c]}mr(r,"createContext");let a=mr(()=>{let n=o.map(s=>gr.createContext(s));return mr(function(i){let l=i?.[e]||n;return gr.useMemo(()=>({[`__scope${e}`]:{...i,[e]:l}}),[i,l])},"useScope")},"createScope");return a.scopeName=e,[r,rN(a,...t)]}mr(nn,"createContextScope");function rN(...e){let t=e[0];if(e.length===1)return t;let o=mr(()=>{let r=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return mr(function(n){let s=r.reduce((i,{useScope:l,scopeName:u})=>{let d=l(n)[`__scope${u}`];return{...i,...d}},{});return gr.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])},"useComposedScopes")},"createScope");return o.scopeName=t.scopeName,o}mr(rN,"composeContextScopes");var fN=b(k(),1),pN=b(ta(),1);var gt=b(k(),1);var aN=b(k(),1),o$=Object.defineProperty,bb=(e,t)=>o$(e,"name",{value:t,configurable:!0});function yb(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}bb(yb,"setRef");function nN(...e){return t=>{let o=!1,r=e.map(a=>{let n=yb(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():yb(e[a],null)}}}}bb(nN,"composeRefs");function hr(...e){return aN.useCallback(nN(...e),e)}bb(hr,"useComposedRefs");var jl=!1;var n$=b(N(),1),r$=Object.defineProperty,vr=(e,t)=>r$(e,"name",{value:t,configurable:!0}),a$=vr(((e,t)=>{let o={...t};for(let r in t){let a=e[r],n=t[r];if(/^on[A-Z]/.test(r))if(a&&n){let i=typeof a=="function",l=typeof n=="function";jl&&(!i||!l)&&console.warn(`Slot: Expected a function for ${r}, but received ${[typeof a,typeof n].filter(u=>u!=="function").join(" and ")}.`),o[r]=(...u)=>{let c=l?n(...u):void 0;return i&&a(...u),c}}else a&&(o[r]=a);else r==="style"?o[r]={...typeof a=="object"?a:null,...typeof n=="object"?n:null}:r==="className"?o[r]=[a,n].filter(Boolean).join(" "):r==="aria-describedby"&&(o[r]=sN(n,a))}return{...e,...o}}),"mergeProps");function sN(...e){let t=new Set;for(let o of e)if(typeof o=="string")for(let r of String(o).trim().split(/\s+/))r&&t.add(r);return t.size>0?Array.from(t).join(" "):void 0}vr(sN,"concatAriaDescribedby");var iN=gt.createContext(a$);iN.displayName="SlotContext";function sn(e){let t=gt.forwardRef((o,r)=>{let a=gt.useContext(iN),{children:n,mergeProps:s=a,...i}=o,l=null,u=!1,c=[];Cb(n)&&typeof sg=="function"&&(n=sg(n._payload)),gt.Children.forEach(n,g=>{if(cN(g)){u=!0;let m=g,h="child"in m.props?m.props.child:m.props.children;Cb(h)&&typeof sg=="function"&&(h=sg(h._payload)),l=i$(m,h),c.push(l?.props?.children)}else c.push(g)}),l?l=gt.cloneElement(l,void 0,c):!u&>.Children.count(n)===1&>.isValidElement(n)&&(l=n);let d=l?uN(l):void 0,f=hr(r,d);if(!l){if(n||n===0)throw new Error(u?c$(e):u$(e));return n}let p=s(i,l.props??{});return l.type!==gt.Fragment&&(p.ref=r?f:d),gt.cloneElement(l,p)});return t.displayName=`${e}.Slot`,t}vr(sn,"createSlot");var lN=Symbol.for("radix.slottable");function s$(e){let t=vr(o=>"child"in o?o.children(o.child):o.children,"Slottable");return t.displayName=`${e}.Slottable`,t.__radixId=lN,t}vr(s$,"createSlottable");var i$=vr((e,t)=>{if("child"in e.props){let o=e.props.child;return gt.isValidElement(o)?gt.cloneElement(o,void 0,e.props.children(o.props.children)):null}return gt.isValidElement(t)?t:null},"getSlottableElementFromSlottable");function uN(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)}vr(uN,"getElementRef");function cN(e){return gt.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===lN}vr(cN,"isSlottable");var l$=Symbol.for("react.lazy");function Cb(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===l$&&"_payload"in e&&dN(e._payload)}vr(Cb,"isLazyComponent");function dN(e){return typeof e=="object"&&e!==null&&"then"in e}vr(dN,"isPromiseLike");var u$=vr(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),c$=vr(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),sg=gt[" use ".trim().toString()];var mN=b(N(),1),d$=Object.defineProperty,f$=(e,t)=>d$(e,"name",{value:t,configurable:!0}),p$=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Kl=p$.reduce((e,t)=>{let o=sn(`Primitive.${t}`),r=fN.forwardRef((a,n)=>{let{asChild:s,...i}=a,l=s?o:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,mN.jsx)(l,{...i,ref:n})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function m$(e,t){e&&pN.flushSync(()=>e.dispatchEvent(t))}f$(m$,"dispatchDiscreteCustomEvent");var Vt=b(k(),1);var g$=Object.defineProperty,Xl=(e,t)=>g$(e,"name",{value:t,configurable:!0}),gN=!!(typeof window<"u"&&window.document&&window.document.createElement);function rs(e,t,{checkForDefaultPrevented:o=!0}={}){return Xl(function(a){if(e?.(a),o===!1||!a||!a.defaultPrevented)return t?.(a)},"handleEvent")}Xl(rs,"composeEventHandlers");function h$(e){if(!gN)throw new Error("Cannot access window outside of the DOM");return e?.ownerDocument?.defaultView??window}Xl(h$,"getOwnerWindow");function wb(e){if(!gN)throw new Error("Cannot access document outside of the DOM");return e?.ownerDocument??document}Xl(wb,"getOwnerDocument");function hN(e,t=!1){let{activeElement:o}=wb(e);if(!o?.nodeName)return null;if(vN(o)&&o.contentDocument)return hN(o.contentDocument.body,t);if(t){let r=o.getAttribute("aria-activedescendant");if(r){let a=wb(o).getElementById(r);if(a)return a}}return o}Xl(hN,"getActiveElement");function vN(e){return e.tagName==="IFRAME"}Xl(vN,"isFrame");var Xr=b(k(),1);var ig=b(N(),1),Eo=b(k(),1);var ui=b(N(),1);var v$=Object.defineProperty,_t=(e,t)=>v$(e,"name",{value:t,configurable:!0});function Ib(e){let t=e+"CollectionProvider",[o,r]=nn(t),[a,n]=o(t,{collectionRef:{current:null},itemMap:new Map}),s=_t(m=>{let{scope:h,children:v}=m,x=Xr.useRef(null),y=Xr.useRef(new Map).current;return(0,ig.jsx)(a,{scope:h,itemMap:y,collectionRef:x,children:v})},"CollectionProvider");s.displayName=t;let i=e+"CollectionSlot",l=sn(i),u=Xr.forwardRef((m,h)=>{let{scope:v,children:x}=m,y=n(i,v),R=hr(h,y.collectionRef);return(0,ig.jsx)(l,{ref:R,children:x})});u.displayName=i;let c=e+"CollectionItemSlot",d="data-radix-collection-item",f=sn(c),p=Xr.forwardRef((m,h)=>{let{scope:v,children:x,...y}=m,R=Xr.useRef(null),S=hr(h,R),C=n(c,v);return Xr.useEffect(()=>(C.itemMap.set(R,{ref:R,...y}),()=>void C.itemMap.delete(R))),(0,ig.jsx)(f,{[d]:"",ref:S,children:x})});p.displayName=c;function g(m){let h=n(e+"CollectionConsumer",m);return Xr.useCallback(()=>{let x=h.collectionRef.current;if(!x)return[];let y=Array.from(x.querySelectorAll(`[${d}]`));return Array.from(h.itemMap.values()).sort((C,w)=>y.indexOf(C.ref.current)-y.indexOf(w.ref.current))},[h.collectionRef,h.itemMap])}return _t(g,"useCollection"),[{Provider:s,Slot:u,ItemSlot:p},g,r]}_t(Ib,"createCollection");var xN=new WeakMap,Ct,qo,Sb=(qo=class extends Map{constructor(o){super(o);mg(this,Ct);Dd(this,Ct,[...super.keys()]),xN.set(this,!0)}set(o,r){return xN.get(this)&&(this.has(o)?Bt(this,Ct)[Bt(this,Ct).indexOf(o)]=o:Bt(this,Ct).push(o)),super.set(o,r),this}insert(o,r,a){let n=this.has(r),s=Bt(this,Ct).length,i=Pb(o),l=i>=0?i:s+i,u=l<0||l>=s?-1:l;if(u===this.size||n&&u===this.size-1||u===-1)return this.set(r,a),this;let c=this.size+(n?0:1);i<0&&l++;let d=[...Bt(this,Ct)],f,p=!1;for(let g=l;g<c;g++)if(l===g){let m=d[g];d[g]===r&&(m=d[g+1]),n&&this.delete(r),f=this.get(m),this.set(r,a)}else{!p&&d[g-1]===r&&(p=!0);let m=d[p?g:g-1],h=f;f=this.get(m),this.delete(m),this.set(m,h)}return this}with(o,r,a){let n=new qo(this);return n.insert(o,r,a),n}before(o){let r=Bt(this,Ct).indexOf(o)-1;if(!(r<0))return this.entryAt(r)}setBefore(o,r,a){let n=Bt(this,Ct).indexOf(o);return n===-1?this:this.insert(n,r,a)}after(o){let r=Bt(this,Ct).indexOf(o);if(r=r===-1||r===this.size-1?-1:r+1,r!==-1)return this.entryAt(r)}setAfter(o,r,a){let n=Bt(this,Ct).indexOf(o);return n===-1?this:this.insert(n+1,r,a)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return Dd(this,Ct,[]),super.clear()}delete(o){let r=super.delete(o);return r&&Bt(this,Ct).splice(Bt(this,Ct).indexOf(o),1),r}deleteAt(o){let r=this.keyAt(o);return r!==void 0?this.delete(r):!1}at(o){let r=lg(Bt(this,Ct),o);if(r!==void 0)return this.get(r)}entryAt(o){let r=lg(Bt(this,Ct),o);if(r!==void 0)return[r,this.get(r)]}indexOf(o){return Bt(this,Ct).indexOf(o)}keyAt(o){return lg(Bt(this,Ct),o)}from(o,r){let a=this.indexOf(o);if(a===-1)return;let n=a+r;return n<0&&(n=0),n>=this.size&&(n=this.size-1),this.at(n)}keyFrom(o,r){let a=this.indexOf(o);if(a===-1)return;let n=a+r;return n<0&&(n=0),n>=this.size&&(n=this.size-1),this.keyAt(n)}find(o,r){let a=0;for(let n of this){if(Reflect.apply(o,r,[n,a,this]))return n;a++}}findIndex(o,r){let a=0;for(let n of this){if(Reflect.apply(o,r,[n,a,this]))return a;a++}return-1}filter(o,r){let a=[],n=0;for(let s of this)Reflect.apply(o,r,[s,n,this])&&a.push(s),n++;return new qo(a)}map(o,r){let a=[],n=0;for(let s of this)a.push([s[0],Reflect.apply(o,r,[s,n,this])]),n++;return new qo(a)}reduce(...o){let[r,a]=o,n=0,s=a??this.at(0);for(let i of this)n===0&&o.length===1?s=i:s=Reflect.apply(r,this,[s,i,n,this]),n++;return s}reduceRight(...o){let[r,a]=o,n=a??this.at(-1);for(let s=this.size-1;s>=0;s--){let i=this.at(s);s===this.size-1&&o.length===1?n=i:n=Reflect.apply(r,this,[n,i,s,this])}return n}toSorted(o){let r=[...this.entries()].sort(o);return new qo(r)}toReversed(){let o=new qo;for(let r=this.size-1;r>=0;r--){let a=this.keyAt(r),n=this.get(a);o.set(a,n)}return o}toSpliced(...o){let r=[...this.entries()];return r.splice(...o),new qo(r)}slice(o,r){let a=new qo,n=this.size-1;if(o===void 0)return a;o<0&&(o=o+this.size),r!==void 0&&r>0&&(n=r-1);for(let s=o;s<=n;s++){let i=this.keyAt(s),l=this.get(i);a.set(i,l)}return a}every(o,r){let a=0;for(let n of this){if(!Reflect.apply(o,r,[n,a,this]))return!1;a++}return!0}some(o,r){let a=0;for(let n of this){if(Reflect.apply(o,r,[n,a,this]))return!0;a++}return!1}},Ct=new WeakMap,_t(qo,"OrderedDict"),qo);function lg(e,t){if("at"in Array.prototype)return Array.prototype.at.call(e,t);let o=yN(e,t);return o===-1?void 0:e[o]}_t(lg,"at");function yN(e,t){let o=e.length,r=Pb(t),a=r>=0?r:o+r;return a<0||a>=o?-1:a}_t(yN,"toSafeIndex");function Pb(e){return e!==e||e===0?0:Math.trunc(e)}_t(Pb,"toSafeInteger");function x$(e){let t=e+"CollectionProvider",[o,r]=nn(t),[a,n]=o(t,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new Sb,setItemMap:_t(()=>{},"setItemMap")}),s=_t(({state:y,...R})=>y?(0,ui.jsx)(l,{...R,state:y}):(0,ui.jsx)(i,{...R}),"CollectionProvider");s.displayName=t;let i=_t(y=>{let R=h();return(0,ui.jsx)(l,{...y,state:R})},"CollectionInit");i.displayName=t+"Init";let l=_t(y=>{let{scope:R,children:S,state:C}=y,w=Eo.useRef(null),[I,L]=Eo.useState(null),T=hr(w,L),[M,F]=C;return Eo.useEffect(()=>{if(!I)return;let V=wN(()=>{});return V.observe(I,{childList:!0,subtree:!0}),()=>{V.disconnect()}},[I]),(0,ui.jsx)(a,{scope:R,itemMap:M,setItemMap:F,collectionRef:T,collectionRefObject:w,collectionElement:I,children:S})},"CollectionProviderImpl");l.displayName=t+"Impl";let u=e+"CollectionSlot",c=sn(u),d=Eo.forwardRef((y,R)=>{let{scope:S,children:C}=y,w=n(u,S),I=hr(R,w.collectionRef);return(0,ui.jsx)(c,{ref:I,children:C})});d.displayName=u;let f=e+"CollectionItemSlot",p="data-radix-collection-item",g=sn(f),m=Eo.forwardRef((y,R)=>{let{scope:S,children:C,...w}=y,I=Eo.useRef(null),[L,T]=Eo.useState(null),M=hr(R,I,T),F=n(f,S),{setItemMap:V}=F,A=Eo.useRef(w);bN(A.current,w)||(A.current=w);let G=A.current;return Eo.useEffect(()=>{let _=G;return V(O=>L?O.has(L)?O.set(L,{..._,element:L}).toSorted(Rb):(O.set(L,{..._,element:L}),O.toSorted(Rb)):O),()=>{V(O=>!L||!O.has(L)?O:(O.delete(L),new Sb(O)))}},[L,G,V]),(0,ui.jsx)(g,{[p]:"",ref:M,children:C})});m.displayName=f;function h(){return Eo.useState(new Sb)}_t(h,"useInitCollection");function v(y){let{itemMap:R}=n(e+"CollectionConsumer",y);return R}return _t(v,"useCollection"),[{Provider:s,Slot:d,ItemSlot:m},{createCollectionScope:r,useCollection:v,useInitCollection:h}]}_t(x$,"createCollection");function bN(e,t){if(e===t)return!0;if(typeof e!="object"||typeof t!="object"||e==null||t==null)return!1;let o=Object.keys(e),r=Object.keys(t);if(o.length!==r.length)return!1;for(let a of o)if(!Object.prototype.hasOwnProperty.call(t,a)||e[a]!==t[a])return!1;return!0}_t(bN,"shallowEqual");function CN(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}_t(CN,"isElementPreceding");function Rb(e,t){return!e[1].element||!t[1].element?0:CN(e[1].element,t[1].element)?-1:1}_t(Rb,"sortByDocumentPosition");function wN(e){return new MutationObserver(o=>{for(let r of o)if(r.type==="childList"){e();return}})}_t(wN,"getChildListObserver");var Lb=b(k(),1);var SN=b(k(),1),as=globalThis?.document?SN.useLayoutEffect:()=>{};var y$=Object.defineProperty,b$=(e,t)=>y$(e,"name",{value:t,configurable:!0}),C$=Lb[" useId ".trim().toString()]||(()=>{}),w$=0;function Tb(e){let[t,o]=Lb.useState(C$());return as(()=>{e||o(r=>r??String(w$++))},[e]),e||(t?`radix-${t}`:"")}b$(Tb,"useId");var Yl=b(k(),1),S$=Object.defineProperty,R$=(e,t)=>S$(e,"name",{value:t,configurable:!0});function Mb(e){let t=Yl.useRef(e);return Yl.useEffect(()=>{t.current=e}),Yl.useMemo(()=>((...o)=>t.current?.(...o)),[])}R$(Mb,"useCallbackRef");var xr=b(k(),1);var Yr=b(k(),1);var Zl=b(k(),1),I$=Object.defineProperty,P$=(e,t)=>I$(e,"name",{value:t,configurable:!0}),RN=Zl[" useEffectEvent ".trim().toString()],IN=Zl[" useInsertionEffect ".trim().toString()];function kb(e){if(typeof RN=="function")return RN(e);let t=Zl.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof IN=="function"?IN(()=>{t.current=e}):as(()=>{t.current=e}),Zl.useMemo(()=>((...o)=>t.current?.(...o)),[])}P$(kb,"useEffectEvent");var L$=Object.defineProperty,Md=(e,t)=>L$(e,"name",{value:t,configurable:!0}),T$=xr[" useInsertionEffect ".trim().toString()]||as;function Ql({prop:e,defaultProp:t,onChange:o=Md(()=>{},"onChange"),caller:r}){let[a,n,s]=LN({defaultProp:t,onChange:o}),i=e!==void 0,l=i?e:a;if(jl){let c=xr.useRef(e!==void 0);xr.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=xr.useCallback(c=>{if(i){let d=TN(c)?c(e):c;d!==e&&s.current?.(d)}else n(c)},[i,e,n,s]);return[l,u]}Md(Ql,"useControllableState");function LN({defaultProp:e,onChange:t}){let[o,r]=xr.useState(e),a=xr.useRef(o),n=xr.useRef(t);return T$(()=>{n.current=t},[t]),xr.useEffect(()=>{a.current!==o&&(n.current?.(o),a.current=o)},[o,a]),[o,r,n]}Md(LN,"useUncontrolledState");function TN(e){return typeof e=="function"}Md(TN,"isFunction");var PN=Symbol("RADIX:SYNC_STATE");function M$(e,t,o,r){let{prop:a,defaultProp:n,onChange:s,caller:i}=t,l=a!==void 0,u=kb(s);if(jl){let h=Yr.useRef(a!==void 0);Yr.useEffect(()=>{let v=h.current;v!==l&&console.warn(`${i} is changing from ${v?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),h.current=l},[l,i])}let c=[{...o,state:n}];r&&c.push(r);let[d,f]=Yr.useReducer((h,v)=>{if(v.type===PN)return{...h,state:v.state};let x=e(h,v);return l&&!Object.is(x.state,h.state)&&u(x.state),x},...c),p=d.state,g=Yr.useRef(p);Yr.useEffect(()=>{g.current!==p&&(g.current=p,l||u(p))},[p,g,l]);let m=Yr.useMemo(()=>a!==void 0?{...d,state:a}:d,[d,a]);return Yr.useEffect(()=>{l&&!Object.is(a,d.state)&&f({type:PN,state:a})},[a,d.state,l]),[m,f]}Md(M$,"useControllableStateReducer");var ug=b(k(),1),A$=b(N(),1),k$=Object.defineProperty,E$=(e,t)=>k$(e,"name",{value:t,configurable:!0}),D$=ug.createContext(void 0);function kd(e){let t=ug.useContext(D$);return e||t||"ltr"}E$(kd,"useDirection");var O$=b(k(),1),cg=b(k(),1),N$=Object.defineProperty,Ab=(e,t)=>N$(e,"name",{value:t,configurable:!0}),Eb=!1;function MN(){let[e,t]=cg.useState(Eb);return cg.useEffect(()=>{Eb||(Eb=!0,t(!0))},[]),e}Ab(MN,"useIsHydrated");var kN=O$[" useSyncExternalStore ".trim().toString()];function EN(){return()=>{}}Ab(EN,"subscribe");function AN(){return kN(EN,()=>!0,()=>!1)}Ab(AN,"useIsHydratedModern");var DN=typeof kN=="function"?AN:MN;var ns=b(N(),1),F$=Object.defineProperty,ci=(e,t)=>F$(e,"name",{value:t,configurable:!0}),Db="rovingFocusGroup.onEntryFocus",_$={bubbles:!1,cancelable:!0},dg="RovingFocusGroup",[Nb,NN,V$]=Ib(dg),[B$,Ob]=nn(dg,[V$]),[H$,U$]=B$(dg),ON=Vt.forwardRef(ci(function(t,o){return(0,ns.jsx)(Nb.Provider,{scope:t.__scopeRovingFocusGroup,children:(0,ns.jsx)(Nb.Slot,{scope:t.__scopeRovingFocusGroup,children:(0,ns.jsx)(G$,{...t,ref:o})})})},"RovingFocusGroup")),G$=Vt.forwardRef(ci(function(t,o){let{__scopeRovingFocusGroup:r,orientation:a,loop:n=!1,dir:s,currentTabStopId:i,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:u,onEntryFocus:c,preventScrollOnEntryFocus:d=!1,...f}=t,p=Vt.useRef(null),g=hr(o,p),m=kd(s),[h,v]=Ql({prop:i,defaultProp:l??null,onChange:u,caller:dg}),[x,y]=Vt.useState(!1),R=Mb(c),S=NN(r),C=Vt.useRef(!1),[w,I]=Vt.useState(0);return Vt.useEffect(()=>{let L=p.current;if(L)return L.addEventListener(Db,R),()=>L.removeEventListener(Db,R)},[R]),(0,ns.jsx)(H$,{scope:r,orientation:a,dir:m,loop:n,currentTabStopId:h,onItemFocus:Vt.useCallback(L=>v(L),[v]),onItemShiftTab:Vt.useCallback(()=>y(!0),[]),onFocusableItemAdd:Vt.useCallback(()=>I(L=>L+1),[]),onFocusableItemRemove:Vt.useCallback(()=>I(L=>L-1),[]),children:(0,ns.jsx)(Kl.div,{tabIndex:x||w===0?-1:0,"data-orientation":a,...f,ref:g,style:{outline:"none",...t.style},onMouseDown:rs(t.onMouseDown,()=>{C.current=!0}),onFocus:rs(t.onFocus,L=>{let T=!C.current;if(L.target===L.currentTarget&&T&&!x){let M=new CustomEvent(Db,_$);if(L.currentTarget.dispatchEvent(M),!M.defaultPrevented){let F=S().filter(O=>O.focusable),V=F.find(O=>O.active),A=F.find(O=>O.id===h),_=[V,A,...F].filter(Boolean).map(O=>O.ref.current);Fb(_,d)}}C.current=!1}),onBlur:rs(t.onBlur,()=>y(!1))})})},"RovingFocusGroupImpl")),z$="RovingFocusGroupItem",FN=Vt.forwardRef(ci(function(t,o){let{__scopeRovingFocusGroup:r,focusable:a=!0,active:n=!1,tabStopId:s,children:i,...l}=t,u=Tb(),c=s||u,d=U$(z$,r),f=d.currentTabStopId===c,p=NN(r),{onFocusableItemAdd:g,onFocusableItemRemove:m,currentTabStopId:h}=d,v=DN();return as(()=>{if(!(!v||!a))return g(),()=>m()},[v,a,g,m]),Vt.useEffect(()=>{if(!(v||!a))return g(),()=>m()},[v,a,g,m]),(0,ns.jsx)(Nb.ItemSlot,{scope:r,id:c,focusable:a,active:n,children:(0,ns.jsx)(Kl.span,{tabIndex:f?0:-1,"data-orientation":d.orientation,...l,ref:o,onMouseDown:rs(t.onMouseDown,x=>{a?d.onItemFocus(c):x.preventDefault()}),onFocus:rs(t.onFocus,()=>d.onItemFocus(c)),onKeyDown:rs(t.onKeyDown,x=>{if(x.key==="Tab"&&x.shiftKey){d.onItemShiftTab();return}if(x.target!==x.currentTarget)return;let y=VN(x,d.orientation,d.dir);if(y!==void 0){if(x.metaKey||x.ctrlKey||x.altKey||x.shiftKey)return;x.preventDefault();let S=p().filter(C=>C.focusable).map(C=>C.ref.current);if(y==="last")S.reverse();else if(y==="prev"||y==="next"){y==="prev"&&S.reverse();let C=S.indexOf(x.currentTarget);S=d.loop?BN(S,C+1):S.slice(C+1)}setTimeout(()=>Fb(S))}}),children:typeof i=="function"?i({isCurrentTabStop:f,hasTabStop:h!=null}):i})})},"RovingFocusGroupItem")),q$={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function _N(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}ci(_N,"getDirectionAwareKey");function VN(e,t,o){let r=_N(e.key,o);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return q$[r]}ci(VN,"getFocusIntent");function Fb(e,t=!1){let o=document.activeElement;for(let r of e)if(r===o||(r.focus({preventScroll:t}),document.activeElement!==o))return}ci(Fb,"focusFirst");function BN(e,t){return e.map((o,r)=>e[(t+r)%e.length])}ci(BN,"wrapArray");var vo=b(N(),1),$$=Object.defineProperty,ss=(e,t)=>$$(e,"name",{value:t,configurable:!0}),Jl="ToggleGroup",[UN,lRe]=nn(Jl,[Ob]),GN=Ob(),zN=xo.forwardRef(ss(function(t,o){let{type:r,...a}=t;if(r==="single")return(0,vo.jsx)(j$,{role:"radiogroup",...a,ref:o});if(r==="multiple")return(0,vo.jsx)(K$,{role:"toolbar",...a,ref:o});throw new Error(`Missing prop \`type\` expected on \`${Jl}\``)},"ToggleGroup")),[qN,WN]=UN(Jl),j$=xo.forwardRef(ss(function(t,o){let{value:r,defaultValue:a,onValueChange:n=ss(()=>{},"onValueChange"),...s}=t,[i,l]=Ql({prop:r,defaultProp:a??"",onChange:n,caller:Jl});return(0,vo.jsx)(qN,{scope:t.__scopeToggleGroup,type:"single",value:xo.useMemo(()=>i?[i]:[],[i]),onItemActivate:l,onItemDeactivate:xo.useCallback(()=>l(""),[l]),children:(0,vo.jsx)($N,{...s,ref:o})})},"ToggleGroupImplSingle")),K$=xo.forwardRef(ss(function(t,o){let{value:r,defaultValue:a,onValueChange:n=ss(()=>{},"onValueChange"),...s}=t,[i,l]=Ql({prop:r,defaultProp:a??[],onChange:n,caller:Jl}),u=xo.useCallback(d=>l((f=[])=>[...f,d]),[l]),c=xo.useCallback(d=>l((f=[])=>f.filter(p=>p!==d)),[l]);return(0,vo.jsx)(qN,{scope:t.__scopeToggleGroup,type:"multiple",value:i,onItemActivate:u,onItemDeactivate:c,children:(0,vo.jsx)($N,{...s,ref:o})})},"ToggleGroupImplMultiple")),[X$,Y$]=UN(Jl),$N=xo.forwardRef(ss(function(t,o){let{__scopeToggleGroup:r,disabled:a=!1,rovingFocus:n=!0,orientation:s,dir:i,loop:l=!0,...u}=t,c=GN(r),d=kd(i),f={dir:d,...u};return(0,vo.jsx)(X$,{scope:r,rovingFocus:n,disabled:a,children:n?(0,vo.jsx)(ON,{asChild:!0,...c,orientation:s,dir:d,loop:l,children:(0,vo.jsx)(Kl.div,{...f,ref:o})}):(0,vo.jsx)(Kl.div,{...f,ref:o})})},"ToggleGroupImpl")),_b="ToggleGroupItem",jN=xo.forwardRef(ss(function(t,o){let r=WN(_b,t.__scopeToggleGroup),a=Y$(_b,t.__scopeToggleGroup),n=GN(t.__scopeToggleGroup),s=r.value.includes(t.value),i=a.disabled||t.disabled,l={...t,pressed:s,disabled:i},u=xo.useRef(null);return a.rovingFocus?(0,vo.jsx)(FN,{asChild:!0,...n,focusable:!i,active:s,ref:u,children:(0,vo.jsx)(HN,{...l,ref:o})}):(0,vo.jsx)(HN,{...l,ref:o})},"ToggleGroupItem")),HN=xo.forwardRef(ss(function(t,o){let{__scopeToggleGroup:r,value:a,...n}=t,s=WN(_b,r),i={role:"radio","aria-checked":t.pressed,"aria-pressed":void 0},l=s.type==="single"?i:void 0;return(0,vo.jsx)(wd,{...l,...n,ref:o,onPressedChange:u=>{u?s.onItemActivate(a):s.onItemDeactivate(a)}})},"ToggleGroupItemImpl"));var fg=b(N()),KN=di.createContext({size:"default",variant:"default"}),XN=di.forwardRef(({className:e,variant:t,size:o,children:r,...a},n)=>(0,fg.jsx)(zN,{ref:n,className:P("moonui-theme inline-flex items-center justify-center gap-1","data-[orientation=vertical]:flex-col data-[orientation=vertical]:items-stretch data-[orientation=vertical]:justify-start",e),...a,children:(0,fg.jsx)(KN.Provider,{value:{variant:t,size:o},children:r})}));XN.displayName="ToggleGroup";var YN=di.forwardRef(({className:e,children:t,variant:o,size:r,...a},n)=>{let s=di.useContext(KN);return(0,fg.jsx)(jN,{ref:n,className:P(jm({variant:s.variant??o,size:s.size??r}),e),...a,children:t})});YN.displayName="ToggleGroupItem";export{b2 as Accordion,WC as AccordionContent,zC as AccordionItem,qC as AccordionTrigger,KC as Alert,YC as AlertDescription,XC as AlertTitle,QC as AspectRatio,Fg as Avatar,_g as AvatarFallback,pw as AvatarGroup,fw as AvatarImage,wo as Badge,hw as Breadcrumb,Vg as BreadcrumbEllipsis,xw as BreadcrumbItem,bw as BreadcrumbLink,vw as BreadcrumbList,Cw as BreadcrumbPage,yw as BreadcrumbSeparator,Ae as Button,tN as ButtonGroup,Y0 as Card,VI as CardCVCInput,eI as CardContent,J0 as CardDescription,_I as CardExpiryInput,tI as CardFooter,Z0 as CardHeader,FI as CardNumberInput,Q0 as CardTitle,BI as CardZipInput,YI as Carousel,QI as CarouselContent,eP as CarouselItem,oP as CarouselNext,tP as CarouselPrevious,nv as Checkbox,cP as CheckboxGroup,Ap as CheckboxLabel,dP as CheckboxWithLabel,VH as Collapsible,mP as CollapsibleContent,pP as CollapsibleTrigger,$v as ColorPicker,mx as Command,y3 as CommandDialog,KM as CommandEmpty,XM as CommandGroup,$M as CommandInput,ZM as CommandItem,jM as CommandList,YM as CommandSeparator,QM as CommandShortcut,Nx as DatePicker,xk as DateRangePicker,yk as DateTimePicker,dx as Dialog,m3 as DialogClose,ym as DialogContent,px as DialogDescription,WM as DialogFooter,v3 as DialogForm,fx as DialogHeader,rd as DialogTitle,f3 as DialogTrigger,g5 as DraggableList,iq as DropdownMenu,OE as DropdownMenuCheckboxItem,DE as DropdownMenuContent,uq as DropdownMenuGroup,NE as DropdownMenuItem,_E as DropdownMenuLabel,cq as DropdownMenuPortal,fq as DropdownMenuRadioGroup,FE as DropdownMenuRadioItem,VE as DropdownMenuSeparator,BE as DropdownMenuShortcut,dq as DropdownMenuSub,AE as DropdownMenuSubContent,EE as DropdownMenuSubTrigger,lq as DropdownMenuTrigger,UE as FileUpload,Fq as FreeBadge,zE as GestureDrawer,Uye as GitHubStarButton,vq as GitHubStars,JG as GradientPicker,Qt as Input,KE as InputOTP,XE as InputOTPGroup,QE as InputOTPSeparator,ZE as InputOTPSlot,j1 as Kbd,Lo as Label,JE as LockedComponent,bk as MonthPicker,ny as MoonLogo,nbe as MoonLogoAnimated,abe as MoonLogoIcon,b2 as MoonUIAccordion,WC as MoonUIAccordionContent,zC as MoonUIAccordionItem,qC as MoonUIAccordionTrigger,KC as MoonUIAlert,YC as MoonUIAlertDescription,XC as MoonUIAlertTitle,QC as MoonUIAspectRatio,Fg as MoonUIAvatar,_g as MoonUIAvatarFallback,pw as MoonUIAvatarGroup,fw as MoonUIAvatarImage,wo as MoonUIBadge,hw as MoonUIBreadcrumb,Vg as MoonUIBreadcrumbEllipsis,xw as MoonUIBreadcrumbItem,bw as MoonUIBreadcrumbLink,vw as MoonUIBreadcrumbList,Cw as MoonUIBreadcrumbPage,yw as MoonUIBreadcrumbSeparator,Ae as MoonUIButton,tN as MoonUIButtonGroup,Ec as MoonUICalendar,Y0 as MoonUICard,VI as MoonUICardCVCInput,eI as MoonUICardContent,J0 as MoonUICardDescription,_I as MoonUICardExpiryInput,tI as MoonUICardFooter,Z0 as MoonUICardHeader,FI as MoonUICardNumberInput,Q0 as MoonUICardTitle,BI as MoonUICardZipInput,YI as MoonUICarousel,QI as MoonUICarouselContent,eP as MoonUICarouselItem,oP as MoonUICarouselNext,tP as MoonUICarouselPrevious,nv as MoonUICheckbox,cP as MoonUICheckboxGroup,Ap as MoonUICheckboxLabel,dP as MoonUICheckboxWithLabel,VH as MoonUICollapsible,mP as MoonUICollapsibleContent,pP as MoonUICollapsibleTrigger,$v as MoonUIColorPicker,mx as MoonUICommand,y3 as MoonUICommandDialog,KM as MoonUICommandEmpty,XM as MoonUICommandGroup,$M as MoonUICommandInput,ZM as MoonUICommandItem,jM as MoonUICommandList,YM as MoonUICommandSeparator,QM as MoonUICommandShortcut,f5 as MoonUIDataTableBasic,Nx as MoonUIDatePicker,xk as MoonUIDateRangePicker,yk as MoonUIDateTimePicker,dx as MoonUIDialog,m3 as MoonUIDialogClose,ym as MoonUIDialogContent,px as MoonUIDialogDescription,WM as MoonUIDialogFooter,fx as MoonUIDialogHeader,rd as MoonUIDialogTitle,f3 as MoonUIDialogTrigger,g5 as MoonUIDraggableList,iq as MoonUIDropdownMenu,OE as MoonUIDropdownMenuCheckboxItem,DE as MoonUIDropdownMenuContent,uq as MoonUIDropdownMenuGroup,NE as MoonUIDropdownMenuItem,_E as MoonUIDropdownMenuLabel,cq as MoonUIDropdownMenuPortal,fq as MoonUIDropdownMenuRadioGroup,FE as MoonUIDropdownMenuRadioItem,VE as MoonUIDropdownMenuSeparator,BE as MoonUIDropdownMenuShortcut,dq as MoonUIDropdownMenuSub,AE as MoonUIDropdownMenuSubContent,EE as MoonUIDropdownMenuSubTrigger,lq as MoonUIDropdownMenuTrigger,UE as MoonUIFileUpload,Fq as MoonUIFreeBadge,zE as MoonUIGestureDrawer,vq as MoonUIGitHubStars,JG as MoonUIGradientPicker,Qt as MoonUIInput,KE as MoonUIInputOTP,XE as MoonUIInputOTPGroup,QE as MoonUIInputOTPSeparator,ZE as MoonUIInputOTPSlot,j1 as MoonUIKbd,Lo as MoonUILabel,JE as MoonUILockedComponent,bk as MoonUIMonthPicker,ny as MoonUIMoonLogo,tA as MoonUIPagination,oA as MoonUIPaginationContent,sA as MoonUIPaginationEllipsis,rA as MoonUIPaginationItem,Om as MoonUIPaginationLink,nA as MoonUIPaginationNext,aA as MoonUIPaginationPrevious,YA as MoonUIPhoneInput,$a as MoonUIPopover,ha as MoonUIPopoverContent,ja as MoonUIPopoverTrigger,Oq as MoonUIProBadge,Nq as MoonUIProComponentWrapper,Am as MoonUIProgress,QA as MoonUIRadioGroup,Ry as MoonUIRadioGroupItem,JA as MoonUIRadioItemWithLabel,Iy as MoonUIRadioLabel,Y1 as MoonUIRating,dW as MoonUIRichTextEditor,gD as MoonUIScrollArea,Ay as MoonUIScrollBar,xD as MoonUIScrollReveal,yD as MoonUIScrollRevealContainer,bD as MoonUIScrollRevealItem,Vl as MoonUISelect,Hl as MoonUISelectContent,sW as MoonUISelectGroup,go as MoonUISelectItem,jA as MoonUISelectLabel,Sy as MoonUISelectScrollDownButton,wy as MoonUISelectScrollUpButton,KA as MoonUISelectSeparator,Bl as MoonUISelectTrigger,xd as MoonUISelectValue,ur as MoonUISeparator,QG as MoonUISimpleColorPicker,c1 as MoonUISimpleEditor,ts as MoonUISkeleton,Zy as MoonUISkeletonAvatar,f1 as MoonUISkeletonCard,Yy as MoonUISkeletonText,Za as MoonUISlider,J1 as MoonUISpinner,p1 as MoonUISwipeableCard,C1 as MoonUISwitch,Rm as MoonUITable,Pm as MoonUITableBody,vk as MoonUITableCaption,id as MoonUITableCell,hk as MoonUITableFooter,Lm as MoonUITableHead,Im as MoonUITableHeader,Ol as MoonUITableRow,nm as MoonUITabs,Pl as MoonUITabsContent,sm as MoonUITabsList,Il as MoonUITabsTrigger,w1 as MoonUITagsInput,S1 as MoonUITextarea,mb as MoonUIToast,G1 as MoonUIToastAction,gb as MoonUIToastClose,vb as MoonUIToastDescription,U1 as MoonUIToastProvider,hb as MoonUIToastTitle,pb as MoonUIToastViewport,Z4 as MoonUIToaster,Km as MoonUIToggle,XN as MoonUIToggleGroup,YN as MoonUIToggleGroupItem,Qm as MoonUITooltip,Id as MoonUITooltipContent,Xy as MoonUITooltipProvider,Jm as MoonUITooltipTrigger,tA as Pagination,oA as PaginationContent,sA as PaginationEllipsis,rA as PaginationItem,Om as PaginationLink,nA as PaginationNext,aA as PaginationPrevious,wi as Palette,YA as PhoneInput,$d as Pipette,$a as Popover,whe as PopoverAnchor,She as PopoverClose,ha as PopoverContent,kG as PopoverFooter,MG as PopoverHeader,TG as PopoverSeparator,ja as PopoverTrigger,Oq as ProBadge,Nq as ProComponentWrapper,Am as Progress,Aq as REGEXP_ONLY_CHARS,Eq as REGEXP_ONLY_DIGITS,Dq as REGEXP_ONLY_DIGITS_AND_CHARS,QA as RadioGroup,Ry as RadioGroupItem,JA as RadioItemWithLabel,Iy as RadioLabel,Y1 as Rating,dW as RichTextEditor,gD as ScrollArea,Ay as ScrollBar,xD as ScrollReveal,yD as ScrollRevealContainer,bD as ScrollRevealItem,Vl as Select,Hl as SelectContent,sW as SelectGroup,go as SelectItem,jA as SelectLabel,Sy as SelectScrollDownButton,wy as SelectScrollUpButton,KA as SelectSeparator,Bl as SelectTrigger,xd as SelectValue,ur as Separator,QG as SimpleColorPicker,c1 as SimpleEditor,v4 as SimpleTooltip,ts as Skeleton,Zy as SkeletonAvatar,f1 as SkeletonCard,Yy as SkeletonText,Za as Slider,J1 as Spinner,p1 as SwipeableCard,C1 as Switch,Rm as Table,Pm as TableBody,vk as TableCaption,id as TableCell,hk as TableFooter,Lm as TableHead,Im as TableHeader,Ol as TableRow,nm as Tabs,Pl as TabsContent,sm as TabsList,Il as TabsTrigger,w1 as TagsInput,S1 as Textarea,mb as Toast,G1 as ToastAction,gb as ToastClose,vb as ToastDescription,U1 as ToastProvider,hb as ToastTitle,pb as ToastViewport,Z4 as Toaster,Km as Toggle,XN as ToggleGroup,YN as ToggleGroupItem,Qm as Tooltip,u1 as TooltipArrow,Id as TooltipContent,Xy as TooltipProvider,Jm as TooltipTrigger,w2 as aspectRatioVariants,gw as badgeVariants,eN as buttonGroupVariants,Zd as buttonVariants,ZI as carouselContentVariants,JI as carouselItemVariants,P as cn,BH as collapsibleContentVariants,fP as collapsibleTriggerVariants,Dr as format,YE as inputOTPSlotVariants,$1 as kbdVariants,gw as moonUIBadgeVariants,eN as moonUIButtonGroupVariants,Zd as moonUIButtonVariants,ZI as moonUICarouselContentVariants,JI as moonUICarouselItemVariants,p5 as moonUICreateSortableHeader,YE as moonUIInputOTPSlotVariants,$1 as moonUIKbdVariants,X1 as moonUIRatingVariants,d1 as moonUISkeletonVariants,Q1 as moonUISpinnerVariants,jm as moonUIToggleVariants,LG as popoverContentVariants,pq as progressVariants,X1 as ratingVariants,TW as separatorVariants,d1 as skeletonVariants,Q1 as spinnerVariants,I4 as switchVariants,z1 as toast,jm as toggleVariants,h4 as tooltipVariants,Bc as useCarousel,q1 as useToast};
|
|
86
75
|
/*! Bundled license information:
|
|
87
76
|
|
|
88
|
-
react/cjs/react.production.
|
|
77
|
+
react-dom/cjs/react-dom.production.js:
|
|
89
78
|
(**
|
|
90
79
|
* @license React
|
|
91
|
-
* react.production.
|
|
80
|
+
* react-dom.production.js
|
|
92
81
|
*
|
|
93
|
-
* Copyright (c)
|
|
82
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
94
83
|
*
|
|
95
84
|
* This source code is licensed under the MIT license found in the
|
|
96
85
|
* LICENSE file in the root directory of this source tree.
|
|
97
86
|
*)
|
|
98
87
|
|
|
99
|
-
|
|
88
|
+
use-sync-external-store/cjs/use-sync-external-store-shim.production.js:
|
|
100
89
|
(**
|
|
101
90
|
* @license React
|
|
102
|
-
*
|
|
91
|
+
* use-sync-external-store-shim.production.js
|
|
103
92
|
*
|
|
104
|
-
* Copyright (c)
|
|
93
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
105
94
|
*
|
|
106
95
|
* This source code is licensed under the MIT license found in the
|
|
107
96
|
* LICENSE file in the root directory of this source tree.
|
|
108
97
|
*)
|
|
109
98
|
|
|
110
|
-
|
|
99
|
+
lucide-react/dist/esm/shared/src/utils.js:
|
|
100
|
+
lucide-react/dist/esm/defaultAttributes.js:
|
|
101
|
+
lucide-react/dist/esm/Icon.js:
|
|
102
|
+
lucide-react/dist/esm/createLucideIcon.js:
|
|
103
|
+
lucide-react/dist/esm/icons/align-center.js:
|
|
104
|
+
lucide-react/dist/esm/icons/align-justify.js:
|
|
105
|
+
lucide-react/dist/esm/icons/align-left.js:
|
|
106
|
+
lucide-react/dist/esm/icons/align-right.js:
|
|
107
|
+
lucide-react/dist/esm/icons/arrow-down.js:
|
|
108
|
+
lucide-react/dist/esm/icons/arrow-left.js:
|
|
109
|
+
lucide-react/dist/esm/icons/arrow-right.js:
|
|
110
|
+
lucide-react/dist/esm/icons/arrow-up-down.js:
|
|
111
|
+
lucide-react/dist/esm/icons/arrow-up.js:
|
|
112
|
+
lucide-react/dist/esm/icons/bold.js:
|
|
113
|
+
lucide-react/dist/esm/icons/calendar.js:
|
|
114
|
+
lucide-react/dist/esm/icons/check.js:
|
|
115
|
+
lucide-react/dist/esm/icons/chevron-down.js:
|
|
116
|
+
lucide-react/dist/esm/icons/chevron-left.js:
|
|
117
|
+
lucide-react/dist/esm/icons/chevron-right.js:
|
|
118
|
+
lucide-react/dist/esm/icons/chevron-up.js:
|
|
119
|
+
lucide-react/dist/esm/icons/circle-alert.js:
|
|
120
|
+
lucide-react/dist/esm/icons/circle-check-big.js:
|
|
121
|
+
lucide-react/dist/esm/icons/circle.js:
|
|
122
|
+
lucide-react/dist/esm/icons/clock.js:
|
|
123
|
+
lucide-react/dist/esm/icons/code.js:
|
|
124
|
+
lucide-react/dist/esm/icons/copy.js:
|
|
125
|
+
lucide-react/dist/esm/icons/credit-card.js:
|
|
126
|
+
lucide-react/dist/esm/icons/crown.js:
|
|
127
|
+
lucide-react/dist/esm/icons/dot.js:
|
|
128
|
+
lucide-react/dist/esm/icons/ellipsis.js:
|
|
129
|
+
lucide-react/dist/esm/icons/external-link.js:
|
|
130
|
+
lucide-react/dist/esm/icons/eye.js:
|
|
131
|
+
lucide-react/dist/esm/icons/file-text.js:
|
|
132
|
+
lucide-react/dist/esm/icons/file.js:
|
|
133
|
+
lucide-react/dist/esm/icons/git-fork.js:
|
|
134
|
+
lucide-react/dist/esm/icons/image.js:
|
|
135
|
+
lucide-react/dist/esm/icons/info.js:
|
|
136
|
+
lucide-react/dist/esm/icons/italic.js:
|
|
137
|
+
lucide-react/dist/esm/icons/link.js:
|
|
138
|
+
lucide-react/dist/esm/icons/list-ordered.js:
|
|
139
|
+
lucide-react/dist/esm/icons/list.js:
|
|
140
|
+
lucide-react/dist/esm/icons/loader-circle.js:
|
|
141
|
+
lucide-react/dist/esm/icons/lock.js:
|
|
142
|
+
lucide-react/dist/esm/icons/minus.js:
|
|
143
|
+
lucide-react/dist/esm/icons/music.js:
|
|
144
|
+
lucide-react/dist/esm/icons/palette.js:
|
|
145
|
+
lucide-react/dist/esm/icons/phone.js:
|
|
146
|
+
lucide-react/dist/esm/icons/pipette.js:
|
|
147
|
+
lucide-react/dist/esm/icons/quote.js:
|
|
148
|
+
lucide-react/dist/esm/icons/redo.js:
|
|
149
|
+
lucide-react/dist/esm/icons/search.js:
|
|
150
|
+
lucide-react/dist/esm/icons/square-pen.js:
|
|
151
|
+
lucide-react/dist/esm/icons/star.js:
|
|
152
|
+
lucide-react/dist/esm/icons/strikethrough.js:
|
|
153
|
+
lucide-react/dist/esm/icons/triangle-alert.js:
|
|
154
|
+
lucide-react/dist/esm/icons/underline.js:
|
|
155
|
+
lucide-react/dist/esm/icons/undo.js:
|
|
156
|
+
lucide-react/dist/esm/icons/upload.js:
|
|
157
|
+
lucide-react/dist/esm/icons/video.js:
|
|
158
|
+
lucide-react/dist/esm/icons/x.js:
|
|
159
|
+
lucide-react/dist/esm/icons/zap.js:
|
|
160
|
+
lucide-react/dist/esm/lucide-react.js:
|
|
161
|
+
(**
|
|
162
|
+
* @license lucide-react v0.525.0 - ISC
|
|
163
|
+
*
|
|
164
|
+
* This source code is licensed under the ISC license.
|
|
165
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
166
|
+
*)
|
|
167
|
+
|
|
168
|
+
@tanstack/table-core/build/lib/index.mjs:
|
|
169
|
+
(**
|
|
170
|
+
* table-core
|
|
171
|
+
*
|
|
172
|
+
* Copyright (c) TanStack
|
|
173
|
+
*
|
|
174
|
+
* This source code is licensed under the MIT license found in the
|
|
175
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
176
|
+
*
|
|
177
|
+
* @license MIT
|
|
178
|
+
*)
|
|
179
|
+
|
|
180
|
+
@tanstack/react-table/build/lib/index.mjs:
|
|
181
|
+
(**
|
|
182
|
+
* react-table
|
|
183
|
+
*
|
|
184
|
+
* Copyright (c) TanStack
|
|
185
|
+
*
|
|
186
|
+
* This source code is licensed under the MIT license found in the
|
|
187
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
188
|
+
*
|
|
189
|
+
* @license MIT
|
|
190
|
+
*)
|
|
191
|
+
*/
|
|
192
|
+
|
|
193
|
+
if (typeof window !== 'undefined' && !window.React) {
|
|
194
|
+
console.warn('MoonUI: React not found. Please include React and ReactDOM before MoonUI.');
|
|
195
|
+
}
|
|
196
|
+
//# sourceMappingURL=index.global.js.map(Gw,qj);if(L.currentTarget.dispatchEvent(M),!M.defaultPrevented){let F=S().filter(O=>O.focusable),V=F.find(O=>O.active),A=F.find(O=>O.id===h),_=[V,A,...F].filter(Boolean).map(O=>O.ref.current);Ww(_,d)}}C.current=!1}),onBlur:ss(t.onBlur,()=>y(!1))})})},"RovingFocusGroupImpl")),Yj="RovingFocusGroupItem",eF=Ht.forwardRef(bi(function(t,o){let{__scopeRovingFocusGroup:r,focusable:a=!0,active:n=!1,tabStopId:s,children:i,...l}=t,u=_w(),c=s||u,d=Kj(Yj,r),f=d.currentTabStopId===c,p=QO(r),{onFocusableItemAdd:g,onFocusableItemRemove:m,currentTabStopId:h}=d,v=ZO();return is(()=>{if(!(!v||!a))return g(),()=>m()},[v,a,g,m]),Ht.useEffect(()=>{if(!(v||!a))return g(),()=>m()},[v,a,g,m]),(0,ls.jsx)(zw.ItemSlot,{scope:r,id:c,focusable:a,active:n,children:(0,ls.jsx)(nu.span,{tabIndex:f?0:-1,"data-orientation":d.orientation,...l,ref:o,onMouseDown:ss(t.onMouseDown,x=>{a?d.onItemFocus(c):x.preventDefault()}),onFocus:ss(t.onFocus,()=>d.onItemFocus(c)),onKeyDown:ss(t.onKeyDown,x=>{if(x.key==="Tab"&&x.shiftKey){d.onItemShiftTab();return}if(x.target!==x.currentTarget)return;let y=oF(x,d.orientation,d.dir);if(y!==void 0){if(x.metaKey||x.ctrlKey||x.altKey||x.shiftKey)return;x.preventDefault();let S=p().filter(C=>C.focusable).map(C=>C.ref.current);if(y==="last")S.reverse();else if(y==="prev"||y==="next"){y==="prev"&&S.reverse();let C=S.indexOf(x.currentTarget);S=d.loop?rF(S,C+1):S.slice(C+1)}setTimeout(()=>Ww(S))}}),children:typeof i=="function"?i({isCurrentTabStop:f,hasTabStop:h!=null}):i})})},"RovingFocusGroupItem")),Zj={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function tF(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}bi(tF,"getDirectionAwareKey");function oF(e,t,o){let r=tF(e.key,o);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Zj[r]}bi(oF,"getFocusIntent");function Ww(e,t=!1){let o=document.activeElement;for(let r of e)if(r===o||(r.focus({preventScroll:t}),document.activeElement!==o))return}bi(Ww,"focusFirst");function rF(e,t){return e.map((o,r)=>e[(t+r)%e.length])}bi(rF,"wrapArray");var Co=b(N(),1),Jj=Object.defineProperty,us=(e,t)=>Jj(e,"name",{value:t,configurable:!0}),cu="ToggleGroup",[nF,h0e]=un(cu,[qw]),sF=qw(),iF=wo.forwardRef(us(function(t,o){let{type:r,...a}=t;if(r==="single")return(0,Co.jsx)(e6,{role:"radiogroup",...a,ref:o});if(r==="multiple")return(0,Co.jsx)(t6,{role:"toolbar",...a,ref:o});throw new Error(`Missing prop \`type\` expected on \`${cu}\``)},"ToggleGroup")),[lF,uF]=nF(cu),e6=wo.forwardRef(us(function(t,o){let{value:r,defaultValue:a,onValueChange:n=us(()=>{},"onValueChange"),...s}=t,[i,l]=uu({prop:r,defaultProp:a??"",onChange:n,caller:cu});return(0,Co.jsx)(lF,{scope:t.__scopeToggleGroup,type:"single",value:wo.useMemo(()=>i?[i]:[],[i]),onItemActivate:l,onItemDeactivate:wo.useCallback(()=>l(""),[l]),children:(0,Co.jsx)(cF,{...s,ref:o})})},"ToggleGroupImplSingle")),t6=wo.forwardRef(us(function(t,o){let{value:r,defaultValue:a,onValueChange:n=us(()=>{},"onValueChange"),...s}=t,[i,l]=uu({prop:r,defaultProp:a??[],onChange:n,caller:cu}),u=wo.useCallback(d=>l((f=[])=>[...f,d]),[l]),c=wo.useCallback(d=>l((f=[])=>f.filter(p=>p!==d)),[l]);return(0,Co.jsx)(lF,{scope:t.__scopeToggleGroup,type:"multiple",value:i,onItemActivate:u,onItemDeactivate:c,children:(0,Co.jsx)(cF,{...s,ref:o})})},"ToggleGroupImplMultiple")),[o6,r6]=nF(cu),cF=wo.forwardRef(us(function(t,o){let{__scopeToggleGroup:r,disabled:a=!1,rovingFocus:n=!0,orientation:s,dir:i,loop:l=!0,...u}=t,c=sF(r),d=Zd(i),f={dir:d,...u};return(0,Co.jsx)(o6,{scope:r,rovingFocus:n,disabled:a,children:n?(0,Co.jsx)(JO,{asChild:!0,...c,orientation:s,dir:d,loop:l,children:(0,Co.jsx)(nu.div,{...f,ref:o})}):(0,Co.jsx)(nu.div,{...f,ref:o})})},"ToggleGroupImpl")),$w="ToggleGroupItem",dF=wo.forwardRef(us(function(t,o){let r=uF($w,t.__scopeToggleGroup),a=r6($w,t.__scopeToggleGroup),n=sF(t.__scopeToggleGroup),s=r.value.includes(t.value),i=a.disabled||t.disabled,l={...t,pressed:s,disabled:i},u=wo.useRef(null);return a.rovingFocus?(0,Co.jsx)(eF,{asChild:!0,...n,focusable:!i,active:s,ref:u,children:(0,Co.jsx)(aF,{...l,ref:o})}):(0,Co.jsx)(aF,{...l,ref:o})},"ToggleGroupItem")),aF=wo.forwardRef(us(function(t,o){let{__scopeToggleGroup:r,value:a,...n}=t,s=uF($w,r),i={role:"radio","aria-checked":t.pressed,"aria-pressed":void 0},l=s.type==="single"?i:void 0;return(0,Co.jsx)(Hd,{...l,...n,ref:o,onPressedChange:u=>{u?s.onItemActivate(a):s.onItemDeactivate(a)}})},"ToggleGroupItemImpl"));var zg=b(N()),fF=Ci.createContext({size:"default",variant:"default"}),jw=Ci.forwardRef(({className:e,variant:t,size:o,children:r,...a},n)=>(0,zg.jsx)(iF,{ref:n,className:P("moonui-theme inline-flex items-center justify-center gap-1","data-[orientation=vertical]:flex-col data-[orientation=vertical]:items-stretch data-[orientation=vertical]:justify-start",e),...a,children:(0,zg.jsx)(fF.Provider,{value:{variant:t,size:o},children:r})}));jw.displayName="ToggleGroup";var Kw=Ci.forwardRef(({className:e,children:t,variant:o,size:r,...a},n)=>{let s=Ci.useContext(fF);return(0,zg.jsx)(dF,{ref:n,className:P(Ud({variant:s.variant??o,size:s.size??r}),e),...a,children:t})});Kw.displayName="ToggleGroupItem";
|
|
197
|
+
/*! Bundled license information:
|
|
198
|
+
|
|
199
|
+
react/cjs/react.production.js:
|
|
111
200
|
(**
|
|
112
201
|
* @license React
|
|
113
|
-
*
|
|
202
|
+
* react.production.js
|
|
114
203
|
*
|
|
115
|
-
* Copyright (c)
|
|
204
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
116
205
|
*
|
|
117
206
|
* This source code is licensed under the MIT license found in the
|
|
118
207
|
* LICENSE file in the root directory of this source tree.
|
|
119
208
|
*)
|
|
120
209
|
|
|
121
|
-
react
|
|
210
|
+
react/cjs/react-jsx-runtime.production.js:
|
|
122
211
|
(**
|
|
123
212
|
* @license React
|
|
124
|
-
* react-
|
|
213
|
+
* react-jsx-runtime.production.js
|
|
125
214
|
*
|
|
126
|
-
* Copyright (c)
|
|
215
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
127
216
|
*
|
|
128
217
|
* This source code is licensed under the MIT license found in the
|
|
129
218
|
* LICENSE file in the root directory of this source tree.
|
|
130
219
|
*)
|
|
131
220
|
|
|
132
|
-
|
|
221
|
+
react-dom/cjs/react-dom.production.js:
|
|
133
222
|
(**
|
|
134
223
|
* @license React
|
|
135
|
-
*
|
|
224
|
+
* react-dom.production.js
|
|
136
225
|
*
|
|
137
226
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
138
227
|
*
|
|
@@ -140,494 +229,78 @@ use-sync-external-store/cjs/use-sync-external-store-shim.production.js:
|
|
|
140
229
|
* LICENSE file in the root directory of this source tree.
|
|
141
230
|
*)
|
|
142
231
|
|
|
143
|
-
|
|
232
|
+
use-sync-external-store/cjs/use-sync-external-store-shim.production.js:
|
|
144
233
|
(**
|
|
145
|
-
* @license
|
|
234
|
+
* @license React
|
|
235
|
+
* use-sync-external-store-shim.production.js
|
|
146
236
|
*
|
|
147
|
-
*
|
|
148
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
149
|
-
*)
|
|
150
|
-
|
|
151
|
-
lucide-react/dist/esm/defaultAttributes.js:
|
|
152
|
-
(**
|
|
153
|
-
* @license lucide-react v0.525.0 - ISC
|
|
237
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
154
238
|
*
|
|
155
|
-
* This source code is licensed under the
|
|
156
|
-
*
|
|
239
|
+
* This source code is licensed under the MIT license found in the
|
|
240
|
+
* LICENSE file in the root directory of this source tree.
|
|
157
241
|
*)
|
|
158
242
|
|
|
243
|
+
lucide-react/dist/esm/shared/src/utils.js:
|
|
244
|
+
lucide-react/dist/esm/defaultAttributes.js:
|
|
159
245
|
lucide-react/dist/esm/Icon.js:
|
|
160
|
-
(**
|
|
161
|
-
* @license lucide-react v0.525.0 - ISC
|
|
162
|
-
*
|
|
163
|
-
* This source code is licensed under the ISC license.
|
|
164
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
165
|
-
*)
|
|
166
|
-
|
|
167
246
|
lucide-react/dist/esm/createLucideIcon.js:
|
|
168
|
-
(**
|
|
169
|
-
* @license lucide-react v0.525.0 - ISC
|
|
170
|
-
*
|
|
171
|
-
* This source code is licensed under the ISC license.
|
|
172
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
173
|
-
*)
|
|
174
|
-
|
|
175
247
|
lucide-react/dist/esm/icons/align-center.js:
|
|
176
|
-
(**
|
|
177
|
-
* @license lucide-react v0.525.0 - ISC
|
|
178
|
-
*
|
|
179
|
-
* This source code is licensed under the ISC license.
|
|
180
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
181
|
-
*)
|
|
182
|
-
|
|
183
248
|
lucide-react/dist/esm/icons/align-justify.js:
|
|
184
|
-
(**
|
|
185
|
-
* @license lucide-react v0.525.0 - ISC
|
|
186
|
-
*
|
|
187
|
-
* This source code is licensed under the ISC license.
|
|
188
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
189
|
-
*)
|
|
190
|
-
|
|
191
249
|
lucide-react/dist/esm/icons/align-left.js:
|
|
192
|
-
(**
|
|
193
|
-
* @license lucide-react v0.525.0 - ISC
|
|
194
|
-
*
|
|
195
|
-
* This source code is licensed under the ISC license.
|
|
196
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
197
|
-
*)
|
|
198
|
-
|
|
199
250
|
lucide-react/dist/esm/icons/align-right.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
|
-
|
|
207
251
|
lucide-react/dist/esm/icons/arrow-down.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
|
-
|
|
215
252
|
lucide-react/dist/esm/icons/arrow-left.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
|
-
|
|
223
253
|
lucide-react/dist/esm/icons/arrow-right.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
|
-
|
|
231
254
|
lucide-react/dist/esm/icons/arrow-up-down.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
|
-
|
|
239
255
|
lucide-react/dist/esm/icons/arrow-up.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
|
-
|
|
247
256
|
lucide-react/dist/esm/icons/bold.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
|
-
|
|
255
257
|
lucide-react/dist/esm/icons/calendar.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
|
-
|
|
263
258
|
lucide-react/dist/esm/icons/check.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
|
-
|
|
271
259
|
lucide-react/dist/esm/icons/chevron-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
|
-
|
|
279
260
|
lucide-react/dist/esm/icons/chevron-left.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
|
-
|
|
287
261
|
lucide-react/dist/esm/icons/chevron-right.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
|
-
|
|
295
262
|
lucide-react/dist/esm/icons/chevron-up.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
|
-
|
|
303
263
|
lucide-react/dist/esm/icons/circle-alert.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
|
-
|
|
311
264
|
lucide-react/dist/esm/icons/circle-check-big.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
|
-
|
|
319
265
|
lucide-react/dist/esm/icons/circle.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
|
-
|
|
327
266
|
lucide-react/dist/esm/icons/clock.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
|
-
|
|
335
267
|
lucide-react/dist/esm/icons/code.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
|
-
|
|
343
268
|
lucide-react/dist/esm/icons/copy.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
|
-
|
|
351
269
|
lucide-react/dist/esm/icons/credit-card.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
|
-
|
|
359
270
|
lucide-react/dist/esm/icons/crown.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
|
-
|
|
367
271
|
lucide-react/dist/esm/icons/dot.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
|
-
|
|
375
272
|
lucide-react/dist/esm/icons/ellipsis.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
|
-
|
|
383
273
|
lucide-react/dist/esm/icons/external-link.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
|
-
|
|
391
274
|
lucide-react/dist/esm/icons/eye.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
|
-
|
|
399
275
|
lucide-react/dist/esm/icons/file-text.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
|
-
|
|
407
276
|
lucide-react/dist/esm/icons/file.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
|
-
|
|
415
277
|
lucide-react/dist/esm/icons/git-fork.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
|
-
|
|
423
278
|
lucide-react/dist/esm/icons/image.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
|
-
|
|
431
279
|
lucide-react/dist/esm/icons/info.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
|
-
|
|
439
280
|
lucide-react/dist/esm/icons/italic.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
|
-
|
|
447
281
|
lucide-react/dist/esm/icons/link.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
|
-
|
|
455
282
|
lucide-react/dist/esm/icons/list-ordered.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
|
-
|
|
463
283
|
lucide-react/dist/esm/icons/list.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
|
-
|
|
471
284
|
lucide-react/dist/esm/icons/loader-circle.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
|
-
|
|
479
285
|
lucide-react/dist/esm/icons/lock.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
|
-
|
|
487
286
|
lucide-react/dist/esm/icons/minus.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
|
-
|
|
495
287
|
lucide-react/dist/esm/icons/music.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
|
-
|
|
503
288
|
lucide-react/dist/esm/icons/palette.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
|
-
|
|
511
289
|
lucide-react/dist/esm/icons/phone.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
|
-
|
|
519
290
|
lucide-react/dist/esm/icons/pipette.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
|
-
|
|
527
291
|
lucide-react/dist/esm/icons/quote.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
|
-
|
|
535
292
|
lucide-react/dist/esm/icons/redo.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
|
-
|
|
543
293
|
lucide-react/dist/esm/icons/search.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
|
-
|
|
551
294
|
lucide-react/dist/esm/icons/square-pen.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
|
-
|
|
559
295
|
lucide-react/dist/esm/icons/star.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
|
-
|
|
567
296
|
lucide-react/dist/esm/icons/strikethrough.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
|
-
|
|
575
297
|
lucide-react/dist/esm/icons/triangle-alert.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
|
-
|
|
583
298
|
lucide-react/dist/esm/icons/underline.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
|
-
|
|
591
299
|
lucide-react/dist/esm/icons/undo.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
|
-
|
|
599
300
|
lucide-react/dist/esm/icons/upload.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
|
-
|
|
607
301
|
lucide-react/dist/esm/icons/video.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
|
-
|
|
615
302
|
lucide-react/dist/esm/icons/x.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
|
-
|
|
623
303
|
lucide-react/dist/esm/icons/zap.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
|
-
|
|
631
304
|
lucide-react/dist/esm/lucide-react.js:
|
|
632
305
|
(**
|
|
633
306
|
* @license lucide-react v0.525.0 - ISC
|