@moontra/moonui-pro 2.30.7 → 2.30.9

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.
@@ -16,7 +16,7 @@ Error generating stack: `+a.message+`
16
16
  https://github.com/highlightjs/highlight.js/issues/2277`),U=k,_=R),E===void 0&&(E=!0);let V={code:_,language:U};F("before:highlight",V);let L=V.result?V.result:d(V.language,V.code,E);return L.code=V.code,F("after:highlight",L),L}function d(k,R,E,_){let U=Object.create(null);function V(te,ye){return te.keywords[ye]}function L(){if(!ve.keywords){Q.addText(Z);return}let te=0;ve.keywordPatternRe.lastIndex=0;let ye=ve.keywordPatternRe.exec(Z),le="";for(;ye;){le+=Z.substring(te,ye.index);let se=Be.case_insensitive?ye[0].toLowerCase():ye[0],_e=V(ve,se);if(_e){let[Tt,vo]=_e;if(Q.addText(le),le="",U[se]=(U[se]||0)+1,U[se]<=ZNt&&(re+=vo),Tt.startsWith("_"))le+=ye[0];else{let Ye=Be.classNameAliases[Tt]||Tt;$(ye[0],Ye)}}else le+=ye[0];te=ve.keywordPatternRe.lastIndex,ye=ve.keywordPatternRe.exec(Z)}le+=Z.substring(te),Q.addText(le)}function H(){if(Z==="")return;let te=null;if(typeof ve.subLanguage=="string"){if(!t[ve.subLanguage]){Q.addText(Z);return}te=d(ve.subLanguage,Z,!0,Oe[ve.subLanguage]),Oe[ve.subLanguage]=te._top}else te=p(Z,ve.subLanguage.length?ve.subLanguage:null);ve.relevance>0&&(re+=te.relevance),Q.__addSublanguage(te._emitter,te.language)}function j(){ve.subLanguage!=null?H():L(),Z=""}function $(te,ye){te!==""&&(Q.startScope(ye),Q.addText(te),Q.endScope())}function W(te,ye){let le=1,se=ye.length-1;for(;le<=se;){if(!te._emit[le]){le++;continue}let _e=Be.classNameAliases[te[le]]||te[le],Tt=ye[le];_e?$(Tt,_e):(Z=Tt,L(),Z=""),le++}}function z(te,ye){return te.scope&&typeof te.scope=="string"&&Q.openNode(Be.classNameAliases[te.scope]||te.scope),te.beginScope&&(te.beginScope._wrap?($(Z,Be.classNameAliases[te.beginScope._wrap]||te.beginScope._wrap),Z=""):te.beginScope._multi&&(W(te.beginScope,ye),Z="")),ve=Object.create(te,{parent:{value:ve}}),ve}function G(te,ye,le){let se=hNt(te.endRe,le);if(se){if(te["on:end"]){let _e=new KH(te);te["on:end"](ye,_e),_e.isMatchIgnored&&(se=!1)}if(se){for(;te.endsParent&&te.parent;)te=te.parent;return te}}if(te.endsWithParent)return G(te.parent,ye,le)}function X(te){return ve.matcher.regexIndex===0?(Z+=te[0],1):(Ie=!0,0)}function Y(te){let ye=te[0],le=te.rule,se=new KH(le),_e=[le.__beforeBegin,le["on:begin"]];for(let Tt of _e)if(Tt&&(Tt(te,se),se.isMatchIgnored))return X(ye);return le.skip?Z+=ye:(le.excludeBegin&&(Z+=ye),j(),!le.returnBegin&&!le.excludeBegin&&(Z=ye)),z(le,te),le.returnBegin?0:ye.length}function ae(te){let ye=te[0],le=R.substring(te.index),se=G(ve,te,le);if(!se)return YDe;let _e=ve;ve.endScope&&ve.endScope._wrap?(j(),$(ye,ve.endScope._wrap)):ve.endScope&&ve.endScope._multi?(j(),W(ve.endScope,te)):_e.skip?Z+=ye:(_e.returnEnd||_e.excludeEnd||(Z+=ye),j(),_e.excludeEnd&&(Z=ye));do ve.scope&&Q.closeNode(),!ve.skip&&!ve.subLanguage&&(re+=ve.relevance),ve=ve.parent;while(ve!==se.parent);return se.starts&&z(se.starts,te),_e.returnEnd?0:ye.length}function ie(){let te=[];for(let ye=ve;ye!==Be;ye=ye.parent)ye.scope&&te.unshift(ye.scope);te.forEach(ye=>Q.openNode(ye))}let Le={};function Se(te,ye){let le=ye&&ye[0];if(Z+=te,le==null)return j(),0;if(Le.type==="begin"&&ye.type==="end"&&Le.index===ye.index&&le===""){if(Z+=R.slice(ye.index,ye.index+1),!o){let se=new Error(`0 width match regex (${k})`);throw se.languageName=k,se.badRule=Le.rule,se}return 1}if(Le=ye,ye.type==="begin")return Y(ye);if(ye.type==="illegal"&&!E){let se=new Error('Illegal lexeme "'+le+'" for mode "'+(ve.scope||"<unnamed>")+'"');throw se.mode=ve,se}else if(ye.type==="end"){let se=ae(ye);if(se!==YDe)return se}if(ye.type==="illegal"&&le==="")return Z+=`
17
17
  `,1;if(ke>1e5&&ke>ye.index*3)throw new Error("potential infinite loop, way more iterations than matches");return Z+=le,le.length}let Be=P(k);if(!Be)throw fS(a.replace("{}",k)),new Error('Unknown language: "'+k+'"');let me=XNt(Be),Re="",ve=_||me,Oe={},Q=new s.__emitter(s);ie();let Z="",re=0,Ce=0,ke=0,Ie=!1;try{if(Be.__emitTokens)Be.__emitTokens(R,Q);else{for(ve.matcher.considerAll();;){ke++,Ie?Ie=!1:ve.matcher.considerAll(),ve.matcher.lastIndex=Ce;let te=ve.matcher.exec(R);if(!te)break;let ye=R.substring(Ce,te.index),le=Se(ye,te);Ce=te.index+le}Se(R.substring(Ce))}return Q.finalize(),Re=Q.toHTML(),{language:k,value:Re,relevance:re,illegal:!1,_emitter:Q,_top:ve}}catch(te){if(te.message&&te.message.includes("Illegal"))return{language:k,value:Ote(R),illegal:!0,relevance:0,_illegalBy:{message:te.message,index:Ce,context:R.slice(Ce-100,Ce+100),mode:te.mode,resultSoFar:Re},_emitter:Q};if(o)return{language:k,value:Ote(R),illegal:!1,relevance:0,errorRaised:te,_emitter:Q,_top:ve};throw te}}function f(k){let R={value:Ote(k),illegal:!1,relevance:0,_top:i,_emitter:new s.__emitter(s)};return R._emitter.addText(k),R}function p(k,R){R=R||s.languages||Object.keys(t);let E=f(k),_=R.filter(P).filter(T).map(j=>d(j,k,!1));_.unshift(E);let U=_.sort((j,$)=>{if(j.relevance!==$.relevance)return $.relevance-j.relevance;if(j.language&&$.language){if(P(j.language).supersetOf===$.language)return 1;if(P($.language).supersetOf===j.language)return-1}return 0}),[V,L]=U,H=V;return H.secondBest=L,H}function m(k,R,E){let _=R&&r[R]||E;k.classList.add("hljs"),k.classList.add(`language-${_}`)}function h(k){let R=null,E=c(k);if(l(E))return;if(F("before:highlightElement",{el:k,language:E}),k.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",k);return}if(k.children.length>0&&(s.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(k)),s.throwUnescapedHTML))throw new Bte("One of your code blocks includes unescaped HTML.",k.innerHTML);R=k;let _=R.textContent,U=E?u(_,{language:E,ignoreIllegals:!0}):p(_);k.innerHTML=U.value,k.dataset.highlighted="yes",m(k,E,U.language),k.result={language:U.language,re:U.relevance,relevance:U.relevance},U.secondBest&&(k.secondBest={language:U.secondBest.language,relevance:U.secondBest.relevance}),F("after:highlightElement",{el:k,result:U,text:_})}function g(k){s=XDe(s,k)}let v=()=>{w(),jk("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function y(){w(),jk("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let x=!1;function w(){function k(){w()}if(document.readyState==="loading"){x||window.addEventListener("DOMContentLoaded",k,!1),x=!0;return}document.querySelectorAll(s.cssSelector).forEach(h)}function b(k,R){let E=null;try{E=R(e)}catch(_){if(fS("Language definition for '{}' could not be registered.".replace("{}",k)),o)fS(_);else throw _;E=i}E.name||(E.name=k),t[k]=E,E.rawDefinition=R.bind(null,e),E.aliases&&N(E.aliases,{languageName:k})}function C(k){delete t[k];for(let R of Object.keys(r))r[R]===k&&delete r[R]}function S(){return Object.keys(t)}function P(k){return k=(k||"").toLowerCase(),t[k]||t[r[k]]}function N(k,{languageName:R}){typeof k=="string"&&(k=[k]),k.forEach(E=>{r[E.toLowerCase()]=R})}function T(k){let R=P(k);return R&&!R.disableAutodetect}function A(k){k["before:highlightBlock"]&&!k["before:highlightElement"]&&(k["before:highlightElement"]=R=>{k["before:highlightBlock"](Object.assign({block:R.el},R))}),k["after:highlightBlock"]&&!k["after:highlightElement"]&&(k["after:highlightElement"]=R=>{k["after:highlightBlock"](Object.assign({block:R.el},R))})}function M(k){A(k),n.push(k)}function O(k){let R=n.indexOf(k);R!==-1&&n.splice(R,1)}function F(k,R){let E=k;n.forEach(function(_){_[E]&&_[E](R)})}function I(k){return jk("10.7.0","highlightBlock will be removed entirely in v12.0"),jk("10.7.0","Please use highlightElement now."),h(k)}Object.assign(e,{highlight:u,highlightAuto:p,highlightAll:w,highlightElement:h,highlightBlock:I,configure:g,initHighlighting:v,initHighlightingOnLoad:y,registerLanguage:b,unregisterLanguage:C,listLanguages:S,getLanguage:P,registerAliases:N,autoDetection:T,inherit:XDe,addPlugin:M,removePlugin:O}),e.debugMode=function(){o=!1},e.safeMode=function(){o=!0},e.versionString=QNt,e.regex={concat:pS,lookahead:JDe,either:Vte,optional:pNt,anyNumberOfTimes:fNt};for(let k in GH)typeof GH[k]=="object"&&QDe(GH[k]);return Object.assign(e,GH),e},$k=lOe({});$k.newInstance=()=>lOe({});cOe.exports=$k;$k.HighlightJS=$k;$k.default=$k});var Su=de((nnn,D2e)=>{var eTt=Array.isArray;D2e.exports=eTt});var nre=de((onn,O2e)=>{var tTt=typeof global=="object"&&global&&global.Object===Object&&global;O2e.exports=tTt});var jm=de((ann,_2e)=>{var rTt=nre(),nTt=typeof self=="object"&&self&&self.Object===Object&&self,oTt=rTt||nTt||Function("return this")();_2e.exports=oTt});var Gk=de((inn,F2e)=>{var aTt=jm(),iTt=aTt.Symbol;F2e.exports=iTt});var z2e=de((snn,U2e)=>{var B2e=Gk(),V2e=Object.prototype,sTt=V2e.hasOwnProperty,lTt=V2e.toString,DD=B2e?B2e.toStringTag:void 0;function cTt(e){var t=sTt.call(e,DD),r=e[DD];try{e[DD]=void 0;var n=!0}catch{}var o=lTt.call(e);return n&&(t?e[DD]=r:delete e[DD]),o}U2e.exports=cTt});var j2e=de((lnn,H2e)=>{var uTt=Object.prototype,dTt=uTt.toString;function fTt(e){return dTt.call(e)}H2e.exports=fTt});var Tg=de((cnn,W2e)=>{var $2e=Gk(),pTt=z2e(),mTt=j2e(),hTt="[object Null]",gTt="[object Undefined]",q2e=$2e?$2e.toStringTag:void 0;function vTt(e){return e==null?e===void 0?gTt:hTt:q2e&&q2e in Object(e)?pTt(e):mTt(e)}W2e.exports=vTt});var Ag=de((unn,G2e)=>{function yTt(e){return e!=null&&typeof e=="object"}G2e.exports=yTt});var mS=de((dnn,K2e)=>{var xTt=Tg(),bTt=Ag(),wTt="[object Symbol]";function CTt(e){return typeof e=="symbol"||bTt(e)&&xTt(e)==wTt}K2e.exports=CTt});var aj=de((fnn,X2e)=>{var STt=Su(),PTt=mS(),ITt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,kTt=/^\w*$/;function RTt(e,t){if(STt(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||PTt(e)?!0:kTt.test(e)||!ITt.test(e)||t!=null&&e in Object(t)}X2e.exports=RTt});var Lp=de((pnn,Y2e)=>{function NTt(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}Y2e.exports=NTt});var Qo=de((mnn,Q2e)=>{var MTt=Tg(),TTt=Lp(),ATt="[object AsyncFunction]",LTt="[object Function]",ETt="[object GeneratorFunction]",DTt="[object Proxy]";function OTt(e){if(!TTt(e))return!1;var t=MTt(e);return t==LTt||t==ETt||t==ATt||t==DTt}Q2e.exports=OTt});var J2e=de((hnn,Z2e)=>{var _Tt=jm(),FTt=_Tt["__core-js_shared__"];Z2e.exports=FTt});var r_e=de((gnn,t_e)=>{var ore=J2e(),e_e=function(){var e=/[^.]+$/.exec(ore&&ore.keys&&ore.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function BTt(e){return!!e_e&&e_e in e}t_e.exports=BTt});var are=de((vnn,n_e)=>{var VTt=Function.prototype,UTt=VTt.toString;function zTt(e){if(e!=null){try{return UTt.call(e)}catch{}try{return e+""}catch{}}return""}n_e.exports=zTt});var a_e=de((ynn,o_e)=>{var HTt=Qo(),jTt=r_e(),$Tt=Lp(),qTt=are(),WTt=/[\\^$.*+?()[\]{}|]/g,GTt=/^\[object .+?Constructor\]$/,KTt=Function.prototype,XTt=Object.prototype,YTt=KTt.toString,QTt=XTt.hasOwnProperty,ZTt=RegExp("^"+YTt.call(QTt).replace(WTt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function JTt(e){if(!$Tt(e)||jTt(e))return!1;var t=HTt(e)?ZTt:GTt;return t.test(qTt(e))}o_e.exports=JTt});var s_e=de((xnn,i_e)=>{function eAt(e,t){return e?.[t]}i_e.exports=eAt});var d0=de((bnn,l_e)=>{var tAt=a_e(),rAt=s_e();function nAt(e,t){var r=rAt(e,t);return tAt(r)?r:void 0}l_e.exports=nAt});var OD=de((wnn,c_e)=>{var oAt=d0(),aAt=oAt(Object,"create");c_e.exports=aAt});var f_e=de((Cnn,d_e)=>{var u_e=OD();function iAt(){this.__data__=u_e?u_e(null):{},this.size=0}d_e.exports=iAt});var m_e=de((Snn,p_e)=>{function sAt(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}p_e.exports=sAt});var g_e=de((Pnn,h_e)=>{var lAt=OD(),cAt="__lodash_hash_undefined__",uAt=Object.prototype,dAt=uAt.hasOwnProperty;function fAt(e){var t=this.__data__;if(lAt){var r=t[e];return r===cAt?void 0:r}return dAt.call(t,e)?t[e]:void 0}h_e.exports=fAt});var y_e=de((Inn,v_e)=>{var pAt=OD(),mAt=Object.prototype,hAt=mAt.hasOwnProperty;function gAt(e){var t=this.__data__;return pAt?t[e]!==void 0:hAt.call(t,e)}v_e.exports=gAt});var b_e=de((knn,x_e)=>{var vAt=OD(),yAt="__lodash_hash_undefined__";function xAt(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=vAt&&t===void 0?yAt:t,this}x_e.exports=xAt});var C_e=de((Rnn,w_e)=>{var bAt=f_e(),wAt=m_e(),CAt=g_e(),SAt=y_e(),PAt=b_e();function Kk(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Kk.prototype.clear=bAt;Kk.prototype.delete=wAt;Kk.prototype.get=CAt;Kk.prototype.has=SAt;Kk.prototype.set=PAt;w_e.exports=Kk});var P_e=de((Nnn,S_e)=>{function IAt(){this.__data__=[],this.size=0}S_e.exports=IAt});var ij=de((Mnn,I_e)=>{function kAt(e,t){return e===t||e!==e&&t!==t}I_e.exports=kAt});var _D=de((Tnn,k_e)=>{var RAt=ij();function NAt(e,t){for(var r=e.length;r--;)if(RAt(e[r][0],t))return r;return-1}k_e.exports=NAt});var N_e=de((Ann,R_e)=>{var MAt=_D(),TAt=Array.prototype,AAt=TAt.splice;function LAt(e){var t=this.__data__,r=MAt(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():AAt.call(t,r,1),--this.size,!0}R_e.exports=LAt});var T_e=de((Lnn,M_e)=>{var EAt=_D();function DAt(e){var t=this.__data__,r=EAt(t,e);return r<0?void 0:t[r][1]}M_e.exports=DAt});var L_e=de((Enn,A_e)=>{var OAt=_D();function _At(e){return OAt(this.__data__,e)>-1}A_e.exports=_At});var D_e=de((Dnn,E_e)=>{var FAt=_D();function BAt(e,t){var r=this.__data__,n=FAt(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}E_e.exports=BAt});var FD=de((Onn,O_e)=>{var VAt=P_e(),UAt=N_e(),zAt=T_e(),HAt=L_e(),jAt=D_e();function Xk(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Xk.prototype.clear=VAt;Xk.prototype.delete=UAt;Xk.prototype.get=zAt;Xk.prototype.has=HAt;Xk.prototype.set=jAt;O_e.exports=Xk});var sj=de((_nn,__e)=>{var $At=d0(),qAt=jm(),WAt=$At(qAt,"Map");__e.exports=WAt});var V_e=de((Fnn,B_e)=>{var F_e=C_e(),GAt=FD(),KAt=sj();function XAt(){this.size=0,this.__data__={hash:new F_e,map:new(KAt||GAt),string:new F_e}}B_e.exports=XAt});var z_e=de((Bnn,U_e)=>{function YAt(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}U_e.exports=YAt});var BD=de((Vnn,H_e)=>{var QAt=z_e();function ZAt(e,t){var r=e.__data__;return QAt(t)?r[typeof t=="string"?"string":"hash"]:r.map}H_e.exports=ZAt});var $_e=de((Unn,j_e)=>{var JAt=BD();function eLt(e){var t=JAt(this,e).delete(e);return this.size-=t?1:0,t}j_e.exports=eLt});var W_e=de((znn,q_e)=>{var tLt=BD();function rLt(e){return tLt(this,e).get(e)}q_e.exports=rLt});var K_e=de((Hnn,G_e)=>{var nLt=BD();function oLt(e){return nLt(this,e).has(e)}G_e.exports=oLt});var Y_e=de((jnn,X_e)=>{var aLt=BD();function iLt(e,t){var r=aLt(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}X_e.exports=iLt});var lj=de(($nn,Q_e)=>{var sLt=V_e(),lLt=$_e(),cLt=W_e(),uLt=K_e(),dLt=Y_e();function Yk(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Yk.prototype.clear=sLt;Yk.prototype.delete=lLt;Yk.prototype.get=cLt;Yk.prototype.has=uLt;Yk.prototype.set=dLt;Q_e.exports=Yk});var sre=de((qnn,J_e)=>{var Z_e=lj(),fLt="Expected a function";function ire(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(fLt);var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],a=r.cache;if(a.has(o))return a.get(o);var i=e.apply(this,n);return r.cache=a.set(o,i)||a,i};return r.cache=new(ire.Cache||Z_e),r}ire.Cache=Z_e;J_e.exports=ire});var tFe=de((Wnn,eFe)=>{var pLt=sre(),mLt=500;function hLt(e){var t=pLt(e,function(n){return r.size===mLt&&r.clear(),n}),r=t.cache;return t}eFe.exports=hLt});var nFe=de((Gnn,rFe)=>{var gLt=tFe(),vLt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,yLt=/\\(\\)?/g,xLt=gLt(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(vLt,function(r,n,o,a){t.push(o?a.replace(yLt,"$1"):n||r)}),t});rFe.exports=xLt});var cj=de((Knn,oFe)=>{function bLt(e,t){for(var r=-1,n=e==null?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}oFe.exports=bLt});var uFe=de((Xnn,cFe)=>{var aFe=Gk(),wLt=cj(),CLt=Su(),SLt=mS(),PLt=1/0,iFe=aFe?aFe.prototype:void 0,sFe=iFe?iFe.toString:void 0;function lFe(e){if(typeof e=="string")return e;if(CLt(e))return wLt(e,lFe)+"";if(SLt(e))return sFe?sFe.call(e):"";var t=e+"";return t=="0"&&1/e==-PLt?"-0":t}cFe.exports=lFe});var lre=de((Ynn,dFe)=>{var ILt=uFe();function kLt(e){return e==null?"":ILt(e)}dFe.exports=kLt});var cre=de((Qnn,fFe)=>{var RLt=Su(),NLt=aj(),MLt=nFe(),TLt=lre();function ALt(e,t){return RLt(e)?e:NLt(e,t)?[e]:MLt(TLt(e))}fFe.exports=ALt});var VD=de((Znn,pFe)=>{var LLt=mS(),ELt=1/0;function DLt(e){if(typeof e=="string"||LLt(e))return e;var t=e+"";return t=="0"&&1/e==-ELt?"-0":t}pFe.exports=DLt});var uj=de((Jnn,mFe)=>{var OLt=cre(),_Lt=VD();function FLt(e,t){t=OLt(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[_Lt(t[r++])];return r&&r==n?e:void 0}mFe.exports=FLt});var f0=de((eon,hFe)=>{var BLt=uj();function VLt(e,t,r){var n=e==null?void 0:BLt(e,t);return n===void 0?r:n}hFe.exports=VLt});var Ac=de((ton,gFe)=>{function ULt(e){return e==null}gFe.exports=ULt});var dj=de((ron,vFe)=>{var zLt=Tg(),HLt=Su(),jLt=Ag(),$Lt="[object String]";function qLt(e){return typeof e=="string"||!HLt(e)&&jLt(e)&&zLt(e)==$Lt}vFe.exports=qLt});var xFe=de(Uo=>{"use strict";var ure=Symbol.for("react.element"),dre=Symbol.for("react.portal"),fj=Symbol.for("react.fragment"),pj=Symbol.for("react.strict_mode"),mj=Symbol.for("react.profiler"),hj=Symbol.for("react.provider"),gj=Symbol.for("react.context"),WLt=Symbol.for("react.server_context"),vj=Symbol.for("react.forward_ref"),yj=Symbol.for("react.suspense"),xj=Symbol.for("react.suspense_list"),bj=Symbol.for("react.memo"),wj=Symbol.for("react.lazy"),GLt=Symbol.for("react.offscreen"),yFe;yFe=Symbol.for("react.module.reference");function Ep(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case ure:switch(e=e.type,e){case fj:case mj:case pj:case yj:case xj:return e;default:switch(e=e&&e.$$typeof,e){case WLt:case gj:case vj:case wj:case bj:case hj:return e;default:return t}}case dre:return t}}}Uo.ContextConsumer=gj;Uo.ContextProvider=hj;Uo.Element=ure;Uo.ForwardRef=vj;Uo.Fragment=fj;Uo.Lazy=wj;Uo.Memo=bj;Uo.Portal=dre;Uo.Profiler=mj;Uo.StrictMode=pj;Uo.Suspense=yj;Uo.SuspenseList=xj;Uo.isAsyncMode=function(){return!1};Uo.isConcurrentMode=function(){return!1};Uo.isContextConsumer=function(e){return Ep(e)===gj};Uo.isContextProvider=function(e){return Ep(e)===hj};Uo.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===ure};Uo.isForwardRef=function(e){return Ep(e)===vj};Uo.isFragment=function(e){return Ep(e)===fj};Uo.isLazy=function(e){return Ep(e)===wj};Uo.isMemo=function(e){return Ep(e)===bj};Uo.isPortal=function(e){return Ep(e)===dre};Uo.isProfiler=function(e){return Ep(e)===mj};Uo.isStrictMode=function(e){return Ep(e)===pj};Uo.isSuspense=function(e){return Ep(e)===yj};Uo.isSuspenseList=function(e){return Ep(e)===xj};Uo.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===fj||e===mj||e===pj||e===yj||e===xj||e===GLt||typeof e=="object"&&e!==null&&(e.$$typeof===wj||e.$$typeof===bj||e.$$typeof===hj||e.$$typeof===gj||e.$$typeof===vj||e.$$typeof===yFe||e.getModuleId!==void 0)};Uo.typeOf=Ep});var wFe=de((oon,bFe)=>{"use strict";bFe.exports=xFe()});var fre=de((aon,CFe)=>{var KLt=Tg(),XLt=Ag(),YLt="[object Number]";function QLt(e){return typeof e=="number"||XLt(e)&&KLt(e)==YLt}CFe.exports=QLt});var Cj=de((ion,SFe)=>{var ZLt=fre();function JLt(e){return ZLt(e)&&e!=+e}SFe.exports=JLt});var qFe=de((won,$Fe)=>{function gEt(e,t,r){var n=-1,o=e.length;t<0&&(t=-t>o?0:o+t),r=r>o?o:r,r<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var a=Array(o);++n<o;)a[n]=e[n+t];return a}$Fe.exports=gEt});var GFe=de((Con,WFe)=>{var vEt=qFe();function yEt(e,t,r){var n=e.length;return r=r===void 0?n:r,!t&&r>=n?e:vEt(e,t,r)}WFe.exports=yEt});var Ire=de((Son,KFe)=>{var xEt="\\ud800-\\udfff",bEt="\\u0300-\\u036f",wEt="\\ufe20-\\ufe2f",CEt="\\u20d0-\\u20ff",SEt=bEt+wEt+CEt,PEt="\\ufe0e\\ufe0f",IEt="\\u200d",kEt=RegExp("["+IEt+xEt+SEt+PEt+"]");function REt(e){return kEt.test(e)}KFe.exports=REt});var YFe=de((Pon,XFe)=>{function NEt(e){return e.split("")}XFe.exports=NEt});var oBe=de((Ion,nBe)=>{var QFe="\\ud800-\\udfff",MEt="\\u0300-\\u036f",TEt="\\ufe20-\\ufe2f",AEt="\\u20d0-\\u20ff",LEt=MEt+TEt+AEt,EEt="\\ufe0e\\ufe0f",DEt="["+QFe+"]",kre="["+LEt+"]",Rre="\\ud83c[\\udffb-\\udfff]",OEt="(?:"+kre+"|"+Rre+")",ZFe="[^"+QFe+"]",JFe="(?:\\ud83c[\\udde6-\\uddff]){2}",eBe="[\\ud800-\\udbff][\\udc00-\\udfff]",_Et="\\u200d",tBe=OEt+"?",rBe="["+EEt+"]?",FEt="(?:"+_Et+"(?:"+[ZFe,JFe,eBe].join("|")+")"+rBe+tBe+")*",BEt=rBe+tBe+FEt,VEt="(?:"+[ZFe+kre+"?",kre,JFe,eBe,DEt].join("|")+")",UEt=RegExp(Rre+"(?="+Rre+")|"+VEt+BEt,"g");function zEt(e){return e.match(UEt)||[]}nBe.exports=zEt});var iBe=de((kon,aBe)=>{var HEt=YFe(),jEt=Ire(),$Et=oBe();function qEt(e){return jEt(e)?$Et(e):HEt(e)}aBe.exports=qEt});var lBe=de((Ron,sBe)=>{var WEt=GFe(),GEt=Ire(),KEt=iBe(),XEt=lre();function YEt(e){return function(t){t=XEt(t);var r=GEt(t)?KEt(t):void 0,n=r?r[0]:t.charAt(0),o=r?WEt(r,1).join(""):t.slice(1);return n[e]()+o}}sBe.exports=YEt});var Nj=de((Non,cBe)=>{var QEt=lBe(),ZEt=QEt("toUpperCase");cBe.exports=ZEt});var OBe=de((Tin,DBe)=>{var RDt=FD();function NDt(){this.__data__=new RDt,this.size=0}DBe.exports=NDt});var FBe=de((Ain,_Be)=>{function MDt(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}_Be.exports=MDt});var VBe=de((Lin,BBe)=>{function TDt(e){return this.__data__.get(e)}BBe.exports=TDt});var zBe=de((Ein,UBe)=>{function ADt(e){return this.__data__.has(e)}UBe.exports=ADt});var jBe=de((Din,HBe)=>{var LDt=FD(),EDt=sj(),DDt=lj(),ODt=200;function _Dt(e,t){var r=this.__data__;if(r instanceof LDt){var n=r.__data__;if(!EDt||n.length<ODt-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new DDt(n)}return r.set(e,t),this.size=r.size,this}HBe.exports=_Dt});var sne=de((Oin,$Be)=>{var FDt=FD(),BDt=OBe(),VDt=FBe(),UDt=VBe(),zDt=zBe(),HDt=jBe();function uR(e){var t=this.__data__=new FDt(e);this.size=t.size}uR.prototype.clear=BDt;uR.prototype.delete=VDt;uR.prototype.get=UDt;uR.prototype.has=zDt;uR.prototype.set=HDt;$Be.exports=uR});var WBe=de((_in,qBe)=>{var jDt="__lodash_hash_undefined__";function $Dt(e){return this.__data__.set(e,jDt),this}qBe.exports=$Dt});var KBe=de((Fin,GBe)=>{function qDt(e){return this.__data__.has(e)}GBe.exports=qDt});var lne=de((Bin,XBe)=>{var WDt=lj(),GDt=WBe(),KDt=KBe();function Fj(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new WDt;++t<r;)this.add(e[t])}Fj.prototype.add=Fj.prototype.push=GDt;Fj.prototype.has=KDt;XBe.exports=Fj});var cne=de((Vin,YBe)=>{function XDt(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}YBe.exports=XDt});var une=de((Uin,QBe)=>{function YDt(e,t){return e.has(t)}QBe.exports=YDt});var dne=de((zin,ZBe)=>{var QDt=lne(),ZDt=cne(),JDt=une(),eOt=1,tOt=2;function rOt(e,t,r,n,o,a){var i=r&eOt,s=e.length,l=t.length;if(s!=l&&!(i&&l>s))return!1;var c=a.get(e),u=a.get(t);if(c&&u)return c==t&&u==e;var d=-1,f=!0,p=r&tOt?new QDt:void 0;for(a.set(e,t),a.set(t,e);++d<s;){var m=e[d],h=t[d];if(n)var g=i?n(h,m,d,t,e,a):n(m,h,d,e,t,a);if(g!==void 0){if(g)continue;f=!1;break}if(p){if(!ZDt(t,function(v,y){if(!JDt(p,y)&&(m===v||o(m,v,r,n,a)))return p.push(y)})){f=!1;break}}else if(!(m===h||o(m,h,r,n,a))){f=!1;break}}return a.delete(e),a.delete(t),f}ZBe.exports=rOt});var e4e=de((Hin,JBe)=>{var nOt=jm(),oOt=nOt.Uint8Array;JBe.exports=oOt});var r4e=de((jin,t4e)=>{function aOt(e){var t=-1,r=Array(e.size);return e.forEach(function(n,o){r[++t]=[o,n]}),r}t4e.exports=aOt});var Bj=de(($in,n4e)=>{function iOt(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}n4e.exports=iOt});var l4e=de((qin,s4e)=>{var o4e=Gk(),a4e=e4e(),sOt=ij(),lOt=dne(),cOt=r4e(),uOt=Bj(),dOt=1,fOt=2,pOt="[object Boolean]",mOt="[object Date]",hOt="[object Error]",gOt="[object Map]",vOt="[object Number]",yOt="[object RegExp]",xOt="[object Set]",bOt="[object String]",wOt="[object Symbol]",COt="[object ArrayBuffer]",SOt="[object DataView]",i4e=o4e?o4e.prototype:void 0,fne=i4e?i4e.valueOf:void 0;function POt(e,t,r,n,o,a,i){switch(r){case SOt:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case COt:return!(e.byteLength!=t.byteLength||!a(new a4e(e),new a4e(t)));case pOt:case mOt:case vOt:return sOt(+e,+t);case hOt:return e.name==t.name&&e.message==t.message;case yOt:case bOt:return e==t+"";case gOt:var s=cOt;case xOt:var l=n&dOt;if(s||(s=uOt),e.size!=t.size&&!l)return!1;var c=i.get(e);if(c)return c==t;n|=fOt,i.set(e,t);var u=lOt(s(e),s(t),n,o,a,i);return i.delete(e),u;case wOt:if(fne)return fne.call(e)==fne.call(t)}return!1}s4e.exports=POt});var pne=de((Win,c4e)=>{function IOt(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}c4e.exports=IOt});var d4e=de((Gin,u4e)=>{var kOt=pne(),ROt=Su();function NOt(e,t,r){var n=t(e);return ROt(e)?n:kOt(n,r(e))}u4e.exports=NOt});var p4e=de((Kin,f4e)=>{function MOt(e,t){for(var r=-1,n=e==null?0:e.length,o=0,a=[];++r<n;){var i=e[r];t(i,r,e)&&(a[o++]=i)}return a}f4e.exports=MOt});var h4e=de((Xin,m4e)=>{function TOt(){return[]}m4e.exports=TOt});var y4e=de((Yin,v4e)=>{var AOt=p4e(),LOt=h4e(),EOt=Object.prototype,DOt=EOt.propertyIsEnumerable,g4e=Object.getOwnPropertySymbols,OOt=g4e?function(e){return e==null?[]:(e=Object(e),AOt(g4e(e),function(t){return DOt.call(e,t)}))}:LOt;v4e.exports=OOt});var b4e=de((Qin,x4e)=>{function _Ot(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}x4e.exports=_Ot});var C4e=de((Zin,w4e)=>{var FOt=Tg(),BOt=Ag(),VOt="[object Arguments]";function UOt(e){return BOt(e)&&FOt(e)==VOt}w4e.exports=UOt});var Vj=de((Jin,I4e)=>{var S4e=C4e(),zOt=Ag(),P4e=Object.prototype,HOt=P4e.hasOwnProperty,jOt=P4e.propertyIsEnumerable,$Ot=S4e(function(){return arguments}())?S4e:function(e){return zOt(e)&&HOt.call(e,"callee")&&!jOt.call(e,"callee")};I4e.exports=$Ot});var R4e=de((esn,k4e)=>{function qOt(){return!1}k4e.exports=qOt});var mne=de((qD,dR)=>{var WOt=jm(),GOt=R4e(),T4e=typeof qD=="object"&&qD&&!qD.nodeType&&qD,N4e=T4e&&typeof dR=="object"&&dR&&!dR.nodeType&&dR,KOt=N4e&&N4e.exports===T4e,M4e=KOt?WOt.Buffer:void 0,XOt=M4e?M4e.isBuffer:void 0,YOt=XOt||GOt;dR.exports=YOt});var Uj=de((tsn,A4e)=>{var QOt=9007199254740991,ZOt=/^(?:0|[1-9]\d*)$/;function JOt(e,t){var r=typeof e;return t=t??QOt,!!t&&(r=="number"||r!="symbol"&&ZOt.test(e))&&e>-1&&e%1==0&&e<t}A4e.exports=JOt});var zj=de((rsn,L4e)=>{var e2t=9007199254740991;function t2t(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=e2t}L4e.exports=t2t});var D4e=de((nsn,E4e)=>{var r2t=Tg(),n2t=zj(),o2t=Ag(),a2t="[object Arguments]",i2t="[object Array]",s2t="[object Boolean]",l2t="[object Date]",c2t="[object Error]",u2t="[object Function]",d2t="[object Map]",f2t="[object Number]",p2t="[object Object]",m2t="[object RegExp]",h2t="[object Set]",g2t="[object String]",v2t="[object WeakMap]",y2t="[object ArrayBuffer]",x2t="[object DataView]",b2t="[object Float32Array]",w2t="[object Float64Array]",C2t="[object Int8Array]",S2t="[object Int16Array]",P2t="[object Int32Array]",I2t="[object Uint8Array]",k2t="[object Uint8ClampedArray]",R2t="[object Uint16Array]",N2t="[object Uint32Array]",Ha={};Ha[b2t]=Ha[w2t]=Ha[C2t]=Ha[S2t]=Ha[P2t]=Ha[I2t]=Ha[k2t]=Ha[R2t]=Ha[N2t]=!0;Ha[a2t]=Ha[i2t]=Ha[y2t]=Ha[s2t]=Ha[x2t]=Ha[l2t]=Ha[c2t]=Ha[u2t]=Ha[d2t]=Ha[f2t]=Ha[p2t]=Ha[m2t]=Ha[h2t]=Ha[g2t]=Ha[v2t]=!1;function M2t(e){return o2t(e)&&n2t(e.length)&&!!Ha[r2t(e)]}E4e.exports=M2t});var hne=de((osn,O4e)=>{function T2t(e){return function(t){return e(t)}}O4e.exports=T2t});var F4e=de((WD,fR)=>{var A2t=nre(),_4e=typeof WD=="object"&&WD&&!WD.nodeType&&WD,GD=_4e&&typeof fR=="object"&&fR&&!fR.nodeType&&fR,L2t=GD&&GD.exports===_4e,gne=L2t&&A2t.process,E2t=function(){try{var e=GD&&GD.require&&GD.require("util").types;return e||gne&&gne.binding&&gne.binding("util")}catch{}}();fR.exports=E2t});var vne=de((asn,U4e)=>{var D2t=D4e(),O2t=hne(),B4e=F4e(),V4e=B4e&&B4e.isTypedArray,_2t=V4e?O2t(V4e):D2t;U4e.exports=_2t});var H4e=de((isn,z4e)=>{var F2t=b4e(),B2t=Vj(),V2t=Su(),U2t=mne(),z2t=Uj(),H2t=vne(),j2t=Object.prototype,$2t=j2t.hasOwnProperty;function q2t(e,t){var r=V2t(e),n=!r&&B2t(e),o=!r&&!n&&U2t(e),a=!r&&!n&&!o&&H2t(e),i=r||n||o||a,s=i?F2t(e.length,String):[],l=s.length;for(var c in e)(t||$2t.call(e,c))&&!(i&&(c=="length"||o&&(c=="offset"||c=="parent")||a&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||z2t(c,l)))&&s.push(c);return s}z4e.exports=q2t});var $4e=de((ssn,j4e)=>{var W2t=Object.prototype;function G2t(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||W2t;return e===r}j4e.exports=G2t});var yne=de((lsn,q4e)=>{function K2t(e,t){return function(r){return e(t(r))}}q4e.exports=K2t});var G4e=de((csn,W4e)=>{var X2t=yne(),Y2t=X2t(Object.keys,Object);W4e.exports=Y2t});var X4e=de((usn,K4e)=>{var Q2t=$4e(),Z2t=G4e(),J2t=Object.prototype,e_t=J2t.hasOwnProperty;function t_t(e){if(!Q2t(e))return Z2t(e);var t=[];for(var r in Object(e))e_t.call(e,r)&&r!="constructor"&&t.push(r);return t}K4e.exports=t_t});var pR=de((dsn,Y4e)=>{var r_t=Qo(),n_t=zj();function o_t(e){return e!=null&&n_t(e.length)&&!r_t(e)}Y4e.exports=o_t});var KD=de((fsn,Q4e)=>{var a_t=H4e(),i_t=X4e(),s_t=pR();function l_t(e){return s_t(e)?a_t(e):i_t(e)}Q4e.exports=l_t});var J4e=de((psn,Z4e)=>{var c_t=d4e(),u_t=y4e(),d_t=KD();function f_t(e){return c_t(e,d_t,u_t)}Z4e.exports=f_t});var r3e=de((msn,t3e)=>{var e3e=J4e(),p_t=1,m_t=Object.prototype,h_t=m_t.hasOwnProperty;function g_t(e,t,r,n,o,a){var i=r&p_t,s=e3e(e),l=s.length,c=e3e(t),u=c.length;if(l!=u&&!i)return!1;for(var d=l;d--;){var f=s[d];if(!(i?f in t:h_t.call(t,f)))return!1}var p=a.get(e),m=a.get(t);if(p&&m)return p==t&&m==e;var h=!0;a.set(e,t),a.set(t,e);for(var g=i;++d<l;){f=s[d];var v=e[f],y=t[f];if(n)var x=i?n(y,v,f,t,e,a):n(v,y,f,e,t,a);if(!(x===void 0?v===y||o(v,y,r,n,a):x)){h=!1;break}g||(g=f=="constructor")}if(h&&!g){var w=e.constructor,b=t.constructor;w!=b&&"constructor"in e&&"constructor"in t&&!(typeof w=="function"&&w instanceof w&&typeof b=="function"&&b instanceof b)&&(h=!1)}return a.delete(e),a.delete(t),h}t3e.exports=g_t});var o3e=de((hsn,n3e)=>{var v_t=d0(),y_t=jm(),x_t=v_t(y_t,"DataView");n3e.exports=x_t});var i3e=de((gsn,a3e)=>{var b_t=d0(),w_t=jm(),C_t=b_t(w_t,"Promise");a3e.exports=C_t});var xne=de((vsn,s3e)=>{var S_t=d0(),P_t=jm(),I_t=S_t(P_t,"Set");s3e.exports=I_t});var c3e=de((ysn,l3e)=>{var k_t=d0(),R_t=jm(),N_t=k_t(R_t,"WeakMap");l3e.exports=N_t});var v3e=de((xsn,g3e)=>{var bne=o3e(),wne=sj(),Cne=i3e(),Sne=xne(),Pne=c3e(),h3e=Tg(),mR=are(),u3e="[object Map]",M_t="[object Object]",d3e="[object Promise]",f3e="[object Set]",p3e="[object WeakMap]",m3e="[object DataView]",T_t=mR(bne),A_t=mR(wne),L_t=mR(Cne),E_t=mR(Sne),D_t=mR(Pne),bS=h3e;(bne&&bS(new bne(new ArrayBuffer(1)))!=m3e||wne&&bS(new wne)!=u3e||Cne&&bS(Cne.resolve())!=d3e||Sne&&bS(new Sne)!=f3e||Pne&&bS(new Pne)!=p3e)&&(bS=function(e){var t=h3e(e),r=t==M_t?e.constructor:void 0,n=r?mR(r):"";if(n)switch(n){case T_t:return m3e;case A_t:return u3e;case L_t:return d3e;case E_t:return f3e;case D_t:return p3e}return t});g3e.exports=bS});var I3e=de((bsn,P3e)=>{var Ine=sne(),O_t=dne(),__t=l4e(),F_t=r3e(),y3e=v3e(),x3e=Su(),b3e=mne(),B_t=vne(),V_t=1,w3e="[object Arguments]",C3e="[object Array]",Hj="[object Object]",U_t=Object.prototype,S3e=U_t.hasOwnProperty;function z_t(e,t,r,n,o,a){var i=x3e(e),s=x3e(t),l=i?C3e:y3e(e),c=s?C3e:y3e(t);l=l==w3e?Hj:l,c=c==w3e?Hj:c;var u=l==Hj,d=c==Hj,f=l==c;if(f&&b3e(e)){if(!b3e(t))return!1;i=!0,u=!1}if(f&&!u)return a||(a=new Ine),i||B_t(e)?O_t(e,t,r,n,o,a):__t(e,t,l,r,n,o,a);if(!(r&V_t)){var p=u&&S3e.call(e,"__wrapped__"),m=d&&S3e.call(t,"__wrapped__");if(p||m){var h=p?e.value():e,g=m?t.value():t;return a||(a=new Ine),o(h,g,r,n,a)}}return f?(a||(a=new Ine),F_t(e,t,r,n,o,a)):!1}P3e.exports=z_t});var jj=de((wsn,N3e)=>{var H_t=I3e(),k3e=Ag();function R3e(e,t,r,n,o){return e===t?!0:e==null||t==null||!k3e(e)&&!k3e(t)?e!==e&&t!==t:H_t(e,t,r,n,R3e,o)}N3e.exports=R3e});var T3e=de((Csn,M3e)=>{var j_t=sne(),$_t=jj(),q_t=1,W_t=2;function G_t(e,t,r,n){var o=r.length,a=o,i=!n;if(e==null)return!a;for(e=Object(e);o--;){var s=r[o];if(i&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++o<a;){s=r[o];var l=s[0],c=e[l],u=s[1];if(i&&s[2]){if(c===void 0&&!(l in e))return!1}else{var d=new j_t;if(n)var f=n(c,u,l,e,t,d);if(!(f===void 0?$_t(u,c,q_t|W_t,n,d):f))return!1}}return!0}M3e.exports=G_t});var kne=de((Ssn,A3e)=>{var K_t=Lp();function X_t(e){return e===e&&!K_t(e)}A3e.exports=X_t});var E3e=de((Psn,L3e)=>{var Y_t=kne(),Q_t=KD();function Z_t(e){for(var t=Q_t(e),r=t.length;r--;){var n=t[r],o=e[n];t[r]=[n,o,Y_t(o)]}return t}L3e.exports=Z_t});var Rne=de((Isn,D3e)=>{function J_t(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}D3e.exports=J_t});var _3e=de((ksn,O3e)=>{var eFt=T3e(),tFt=E3e(),rFt=Rne();function nFt(e){var t=tFt(e);return t.length==1&&t[0][2]?rFt(t[0][0],t[0][1]):function(r){return r===e||eFt(r,e,t)}}O3e.exports=nFt});var B3e=de((Rsn,F3e)=>{function oFt(e,t){return e!=null&&t in Object(e)}F3e.exports=oFt});var U3e=de((Nsn,V3e)=>{var aFt=cre(),iFt=Vj(),sFt=Su(),lFt=Uj(),cFt=zj(),uFt=VD();function dFt(e,t,r){t=aFt(t,e);for(var n=-1,o=t.length,a=!1;++n<o;){var i=uFt(t[n]);if(!(a=e!=null&&r(e,i)))break;e=e[i]}return a||++n!=o?a:(o=e==null?0:e.length,!!o&&cFt(o)&&lFt(i,o)&&(sFt(e)||iFt(e)))}V3e.exports=dFt});var H3e=de((Msn,z3e)=>{var fFt=B3e(),pFt=U3e();function mFt(e,t){return e!=null&&pFt(e,t,fFt)}z3e.exports=mFt});var $3e=de((Tsn,j3e)=>{var hFt=jj(),gFt=f0(),vFt=H3e(),yFt=aj(),xFt=kne(),bFt=Rne(),wFt=VD(),CFt=1,SFt=2;function PFt(e,t){return yFt(e)&&xFt(t)?bFt(wFt(e),t):function(r){var n=gFt(r,e);return n===void 0&&n===t?vFt(r,e):hFt(t,n,CFt|SFt)}}j3e.exports=PFt});var wS=de((Asn,q3e)=>{function IFt(e){return e}q3e.exports=IFt});var G3e=de((Lsn,W3e)=>{function kFt(e){return function(t){return t?.[e]}}W3e.exports=kFt});var X3e=de((Esn,K3e)=>{var RFt=uj();function NFt(e){return function(t){return RFt(t,e)}}K3e.exports=NFt});var Q3e=de((Dsn,Y3e)=>{var MFt=G3e(),TFt=X3e(),AFt=aj(),LFt=VD();function EFt(e){return AFt(e)?MFt(LFt(e)):TFt(e)}Y3e.exports=EFt});var $m=de((Osn,Z3e)=>{var DFt=_3e(),OFt=$3e(),_Ft=wS(),FFt=Su(),BFt=Q3e();function VFt(e){return typeof e=="function"?e:e==null?_Ft:typeof e=="object"?FFt(e)?OFt(e[0],e[1]):DFt(e):BFt(e)}Z3e.exports=VFt});var Nne=de((_sn,J3e)=>{function UFt(e,t,r,n){for(var o=e.length,a=r+(n?1:-1);n?a--:++a<o;)if(t(e[a],a,e))return a;return-1}J3e.exports=UFt});var tVe=de((Fsn,eVe)=>{function zFt(e){return e!==e}eVe.exports=zFt});var nVe=de((Bsn,rVe)=>{function HFt(e,t,r){for(var n=r-1,o=e.length;++n<o;)if(e[n]===t)return n;return-1}rVe.exports=HFt});var aVe=de((Vsn,oVe)=>{var jFt=Nne(),$Ft=tVe(),qFt=nVe();function WFt(e,t,r){return t===t?qFt(e,t,r):jFt(e,$Ft,r)}oVe.exports=WFt});var sVe=de((Usn,iVe)=>{var GFt=aVe();function KFt(e,t){var r=e==null?0:e.length;return!!r&&GFt(e,t,0)>-1}iVe.exports=KFt});var cVe=de((zsn,lVe)=>{function XFt(e,t,r){for(var n=-1,o=e==null?0:e.length;++n<o;)if(r(t,e[n]))return!0;return!1}lVe.exports=XFt});var dVe=de((Hsn,uVe)=>{function YFt(){}uVe.exports=YFt});var pVe=de((jsn,fVe)=>{var Mne=xne(),QFt=dVe(),ZFt=Bj(),JFt=1/0,eBt=Mne&&1/ZFt(new Mne([,-0]))[1]==JFt?function(e){return new Mne(e)}:QFt;fVe.exports=eBt});var hVe=de(($sn,mVe)=>{var tBt=lne(),rBt=sVe(),nBt=cVe(),oBt=une(),aBt=pVe(),iBt=Bj(),sBt=200;function lBt(e,t,r){var n=-1,o=rBt,a=e.length,i=!0,s=[],l=s;if(r)i=!1,o=nBt;else if(a>=sBt){var c=t?null:aBt(e);if(c)return iBt(c);i=!1,o=oBt,l=new tBt}else l=t?[]:s;e:for(;++n<a;){var u=e[n],d=t?t(u):u;if(u=r||u!==0?u:0,i&&d===d){for(var f=l.length;f--;)if(l[f]===d)continue e;t&&l.push(d),s.push(u)}else o(l,d,r)||(l!==s&&l.push(d),s.push(u))}return s}mVe.exports=lBt});var vVe=de((qsn,gVe)=>{var cBt=$m(),uBt=hVe();function dBt(e,t){return e&&e.length?uBt(e,cBt(t,2)):[]}gVe.exports=dBt});var RVe=de((Qsn,kVe)=>{var PVe=Gk(),PBt=Vj(),IBt=Su(),IVe=PVe?PVe.isConcatSpreadable:void 0;function kBt(e){return IBt(e)||PBt(e)||!!(IVe&&e&&e[IVe])}kVe.exports=kBt});var Lne=de((Zsn,MVe)=>{var RBt=pne(),NBt=RVe();function NVe(e,t,r,n,o){var a=-1,i=e.length;for(r||(r=NBt),o||(o=[]);++a<i;){var s=e[a];t>0&&r(s)?t>1?NVe(s,t-1,r,n,o):RBt(o,s):n||(o[o.length]=s)}return o}MVe.exports=NVe});var AVe=de((Jsn,TVe)=>{function MBt(e){return function(t,r,n){for(var o=-1,a=Object(t),i=n(t),s=i.length;s--;){var l=i[e?s:++o];if(r(a[l],l,a)===!1)break}return t}}TVe.exports=MBt});var EVe=de((eln,LVe)=>{var TBt=AVe(),ABt=TBt();LVe.exports=ABt});var Ene=de((tln,DVe)=>{var LBt=EVe(),EBt=KD();function DBt(e,t){return e&&LBt(e,t,EBt)}DVe.exports=DBt});var _Ve=de((rln,OVe)=>{var OBt=pR();function _Bt(e,t){return function(r,n){if(r==null)return r;if(!OBt(r))return e(r,n);for(var o=r.length,a=t?o:-1,i=Object(r);(t?a--:++a<o)&&n(i[a],a,i)!==!1;);return r}}OVe.exports=_Bt});var Gj=de((nln,FVe)=>{var FBt=Ene(),BBt=_Ve(),VBt=BBt(FBt);FVe.exports=VBt});var Dne=de((oln,BVe)=>{var UBt=Gj(),zBt=pR();function HBt(e,t){var r=-1,n=zBt(e)?Array(e.length):[];return UBt(e,function(o,a,i){n[++r]=t(o,a,i)}),n}BVe.exports=HBt});var UVe=de((aln,VVe)=>{function jBt(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e}VVe.exports=jBt});var jVe=de((iln,HVe)=>{var zVe=mS();function $Bt(e,t){if(e!==t){var r=e!==void 0,n=e===null,o=e===e,a=zVe(e),i=t!==void 0,s=t===null,l=t===t,c=zVe(t);if(!s&&!c&&!a&&e>t||a&&i&&l&&!s&&!c||n&&i&&l||!r&&l||!o)return 1;if(!n&&!a&&!c&&e<t||c&&r&&o&&!n&&!a||s&&r&&o||!i&&o||!l)return-1}return 0}HVe.exports=$Bt});var qVe=de((sln,$Ve)=>{var qBt=jVe();function WBt(e,t,r){for(var n=-1,o=e.criteria,a=t.criteria,i=o.length,s=r.length;++n<i;){var l=qBt(o[n],a[n]);if(l){if(n>=s)return l;var c=r[n];return l*(c=="desc"?-1:1)}}return e.index-t.index}$Ve.exports=WBt});var GVe=de((lln,WVe)=>{var One=cj(),GBt=uj(),KBt=$m(),XBt=Dne(),YBt=UVe(),QBt=hne(),ZBt=qVe(),JBt=wS(),e4t=Su();function t4t(e,t,r){t.length?t=One(t,function(a){return e4t(a)?function(i){return GBt(i,a.length===1?a[0]:a)}:a}):t=[JBt];var n=-1;t=One(t,QBt(KBt));var o=XBt(e,function(a,i,s){var l=One(t,function(c){return c(a)});return{criteria:l,index:++n,value:a}});return YBt(o,function(a,i){return ZBt(a,i,r)})}WVe.exports=t4t});var XVe=de((cln,KVe)=>{function r4t(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}KVe.exports=r4t});var ZVe=de((uln,QVe)=>{var n4t=XVe(),YVe=Math.max;function o4t(e,t,r){return t=YVe(t===void 0?e.length-1:t,0),function(){for(var n=arguments,o=-1,a=YVe(n.length-t,0),i=Array(a);++o<a;)i[o]=n[t+o];o=-1;for(var s=Array(t+1);++o<t;)s[o]=n[o];return s[t]=r(i),n4t(e,this,s)}}QVe.exports=o4t});var e5e=de((dln,JVe)=>{function a4t(e){return function(){return e}}JVe.exports=a4t});var _ne=de((fln,t5e)=>{var i4t=d0(),s4t=function(){try{var e=i4t(Object,"defineProperty");return e({},"",{}),e}catch{}}();t5e.exports=s4t});var o5e=de((pln,n5e)=>{var l4t=e5e(),r5e=_ne(),c4t=wS(),u4t=r5e?function(e,t){return r5e(e,"toString",{configurable:!0,enumerable:!1,value:l4t(t),writable:!0})}:c4t;n5e.exports=u4t});var i5e=de((mln,a5e)=>{var d4t=800,f4t=16,p4t=Date.now;function m4t(e){var t=0,r=0;return function(){var n=p4t(),o=f4t-(n-r);if(r=n,o>0){if(++t>=d4t)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}a5e.exports=m4t});var l5e=de((hln,s5e)=>{var h4t=o5e(),g4t=i5e(),v4t=g4t(h4t);s5e.exports=v4t});var u5e=de((gln,c5e)=>{var y4t=wS(),x4t=ZVe(),b4t=l5e();function w4t(e,t){return b4t(x4t(e,t,y4t),e+"")}c5e.exports=w4t});var XD=de((vln,d5e)=>{var C4t=ij(),S4t=pR(),P4t=Uj(),I4t=Lp();function k4t(e,t,r){if(!I4t(r))return!1;var n=typeof t;return(n=="number"?S4t(r)&&P4t(t,r.length):n=="string"&&t in r)?C4t(r[t],e):!1}d5e.exports=k4t});var Kj=de((yln,p5e)=>{var R4t=Lne(),N4t=GVe(),M4t=u5e(),f5e=XD(),T4t=M4t(function(e,t){if(e==null)return[];var r=t.length;return r>1&&f5e(e,t[0],t[1])?t=[]:r>2&&f5e(t[0],t[1],t[2])&&(t=[t[0]]),N4t(e,R4t(t,1),[])});p5e.exports=T4t});var D5e=de((Eln,E5e)=>{var l3t=jm(),c3t=function(){return l3t.Date.now()};E5e.exports=c3t});var _5e=de((Dln,O5e)=>{var u3t=/\s/;function d3t(e){for(var t=e.length;t--&&u3t.test(e.charAt(t)););return t}O5e.exports=d3t});var B5e=de((Oln,F5e)=>{var f3t=_5e(),p3t=/^\s+/;function m3t(e){return e&&e.slice(0,f3t(e)+1).replace(p3t,"")}F5e.exports=m3t});var jne=de((_ln,z5e)=>{var h3t=B5e(),V5e=Lp(),g3t=mS(),U5e=0/0,v3t=/^[-+]0x[0-9a-f]+$/i,y3t=/^0b[01]+$/i,x3t=/^0o[0-7]+$/i,b3t=parseInt;function w3t(e){if(typeof e=="number")return e;if(g3t(e))return U5e;if(V5e(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=V5e(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=h3t(e);var r=y3t.test(e);return r||x3t.test(e)?b3t(e.slice(2),r?2:8):v3t.test(e)?U5e:+e}z5e.exports=w3t});var $5e=de((Fln,j5e)=>{var C3t=Lp(),$ne=D5e(),H5e=jne(),S3t="Expected a function",P3t=Math.max,I3t=Math.min;function k3t(e,t,r){var n,o,a,i,s,l,c=0,u=!1,d=!1,f=!0;if(typeof e!="function")throw new TypeError(S3t);t=H5e(t)||0,C3t(r)&&(u=!!r.leading,d="maxWait"in r,a=d?P3t(H5e(r.maxWait)||0,t):a,f="trailing"in r?!!r.trailing:f);function p(C){var S=n,P=o;return n=o=void 0,c=C,i=e.apply(P,S),i}function m(C){return c=C,s=setTimeout(v,t),u?p(C):i}function h(C){var S=C-l,P=C-c,N=t-S;return d?I3t(N,a-P):N}function g(C){var S=C-l,P=C-c;return l===void 0||S>=t||S<0||d&&P>=a}function v(){var C=$ne();if(g(C))return y(C);s=setTimeout(v,h(C))}function y(C){return s=void 0,f&&n?p(C):(n=o=void 0,i)}function x(){s!==void 0&&clearTimeout(s),c=0,n=l=o=s=void 0}function w(){return s===void 0?i:y($ne())}function b(){var C=$ne(),S=g(C);if(n=arguments,o=this,l=C,S){if(s===void 0)return m(l);if(d)return clearTimeout(s),s=setTimeout(v,t),p(l)}return s===void 0&&(s=setTimeout(v,t)),i}return b.cancel=x,b.flush=w,b}j5e.exports=k3t});var qne=de((Bln,q5e)=>{var R3t=$5e(),N3t=Lp(),M3t="Expected a function";function T3t(e,t,r){var n=!0,o=!0;if(typeof e!="function")throw new TypeError(M3t);return N3t(r)&&(n="leading"in r?!!r.leading:n,o="trailing"in r?!!r.trailing:o),R3t(e,t,{leading:n,maxWait:t,trailing:o})}q5e.exports=T3t});var wO=de((Jpn,Eze)=>{var CUt=mS();function SUt(e,t,r){for(var n=-1,o=e.length;++n<o;){var a=e[n],i=t(a);if(i!=null&&(s===void 0?i===i&&!CUt(i):r(i,s)))var s=i,l=a}return l}Eze.exports=SUt});var Toe=de((emn,Dze)=>{function PUt(e,t){return e>t}Dze.exports=PUt});var Aoe=de((tmn,Oze)=>{var IUt=wO(),kUt=Toe(),RUt=wS();function NUt(e){return e&&e.length?IUt(e,RUt,kUt):void 0}Oze.exports=NUt});var Loe=de((rmn,_ze)=>{function MUt(e,t){return e<t}_ze.exports=MUt});var Bze=de((nmn,Fze)=>{var TUt=wO(),AUt=Loe(),LUt=wS();function EUt(e){return e&&e.length?TUt(e,LUt,AUt):void 0}Fze.exports=EUt});var Uze=de((omn,Vze)=>{var DUt=cj(),OUt=$m(),_Ut=Dne(),FUt=Su();function BUt(e,t){var r=FUt(e)?DUt:_Ut;return r(e,OUt(t,3))}Vze.exports=BUt});var Hze=de((amn,zze)=>{var VUt=Lne(),UUt=Uze();function zUt(e,t){return VUt(UUt(e,t),1)}zze.exports=zUt});var Ug=de((imn,jze)=>{var HUt=jj();function jUt(e,t){return HUt(e,t)}jze.exports=jUt});var Eoe=de(($ze,V6)=>{(function(e){"use strict";var t=1e9,r={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},n=!0,o="[DecimalError] ",a=o+"Invalid argument: ",i=o+"Exponent out of range: ",s=Math.floor,l=Math.pow,c=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,u,d=1e7,f=7,p=9007199254740991,m=s(p/f),h={};h.absoluteValue=h.abs=function(){var k=new this.constructor(this);return k.s&&(k.s=1),k},h.comparedTo=h.cmp=function(k){var R,E,_,U,V=this;if(k=new V.constructor(k),V.s!==k.s)return V.s||-k.s;if(V.e!==k.e)return V.e>k.e^V.s<0?1:-1;for(_=V.d.length,U=k.d.length,R=0,E=_<U?_:U;R<E;++R)if(V.d[R]!==k.d[R])return V.d[R]>k.d[R]^V.s<0?1:-1;return _===U?0:_>U^V.s<0?1:-1},h.decimalPlaces=h.dp=function(){var k=this,R=k.d.length-1,E=(R-k.e)*f;if(R=k.d[R],R)for(;R%10==0;R/=10)E--;return E<0?0:E},h.dividedBy=h.div=function(k){return x(this,new this.constructor(k))},h.dividedToIntegerBy=h.idiv=function(k){var R=this,E=R.constructor;return T(x(R,new E(k),0,1),E.precision)},h.equals=h.eq=function(k){return!this.cmp(k)},h.exponent=function(){return b(this)},h.greaterThan=h.gt=function(k){return this.cmp(k)>0},h.greaterThanOrEqualTo=h.gte=function(k){return this.cmp(k)>=0},h.isInteger=h.isint=function(){return this.e>this.d.length-2},h.isNegative=h.isneg=function(){return this.s<0},h.isPositive=h.ispos=function(){return this.s>0},h.isZero=function(){return this.s===0},h.lessThan=h.lt=function(k){return this.cmp(k)<0},h.lessThanOrEqualTo=h.lte=function(k){return this.cmp(k)<1},h.logarithm=h.log=function(k){var R,E=this,_=E.constructor,U=_.precision,V=U+5;if(k===void 0)k=new _(10);else if(k=new _(k),k.s<1||k.eq(u))throw Error(o+"NaN");if(E.s<1)throw Error(o+(E.s?"NaN":"-Infinity"));return E.eq(u)?new _(0):(n=!1,R=x(P(E,V),P(k,V),V),n=!0,T(R,U))},h.minus=h.sub=function(k){var R=this;return k=new R.constructor(k),R.s==k.s?A(R,k):g(R,(k.s=-k.s,k))},h.modulo=h.mod=function(k){var R,E=this,_=E.constructor,U=_.precision;if(k=new _(k),!k.s)throw Error(o+"NaN");return E.s?(n=!1,R=x(E,k,0,1).times(k),n=!0,E.minus(R)):T(new _(E),U)},h.naturalExponential=h.exp=function(){return w(this)},h.naturalLogarithm=h.ln=function(){return P(this)},h.negated=h.neg=function(){var k=new this.constructor(this);return k.s=-k.s||0,k},h.plus=h.add=function(k){var R=this;return k=new R.constructor(k),R.s==k.s?g(R,k):A(R,(k.s=-k.s,k))},h.precision=h.sd=function(k){var R,E,_,U=this;if(k!==void 0&&k!==!!k&&k!==1&&k!==0)throw Error(a+k);if(R=b(U)+1,_=U.d.length-1,E=_*f+1,_=U.d[_],_){for(;_%10==0;_/=10)E--;for(_=U.d[0];_>=10;_/=10)E++}return k&&R>E?R:E},h.squareRoot=h.sqrt=function(){var k,R,E,_,U,V,L,H=this,j=H.constructor;if(H.s<1){if(!H.s)return new j(0);throw Error(o+"NaN")}for(k=b(H),n=!1,U=Math.sqrt(+H),U==0||U==1/0?(R=y(H.d),(R.length+k)%2==0&&(R+="0"),U=Math.sqrt(R),k=s((k+1)/2)-(k<0||k%2),U==1/0?R="5e"+k:(R=U.toExponential(),R=R.slice(0,R.indexOf("e")+1)+k),_=new j(R)):_=new j(U.toString()),E=j.precision,U=L=E+3;;)if(V=_,_=V.plus(x(H,V,L+2)).times(.5),y(V.d).slice(0,L)===(R=y(_.d)).slice(0,L)){if(R=R.slice(L-3,L+1),U==L&&R=="4999"){if(T(V,E+1,0),V.times(V).eq(H)){_=V;break}}else if(R!="9999")break;L+=4}return n=!0,T(_,E)},h.times=h.mul=function(k){var R,E,_,U,V,L,H,j,$,W=this,z=W.constructor,G=W.d,X=(k=new z(k)).d;if(!W.s||!k.s)return new z(0);for(k.s*=W.s,E=W.e+k.e,j=G.length,$=X.length,j<$&&(V=G,G=X,X=V,L=j,j=$,$=L),V=[],L=j+$,_=L;_--;)V.push(0);for(_=$;--_>=0;){for(R=0,U=j+_;U>_;)H=V[U]+X[_]*G[U-_-1]+R,V[U--]=H%d|0,R=H/d|0;V[U]=(V[U]+R)%d|0}for(;!V[--L];)V.pop();return R?++E:V.shift(),k.d=V,k.e=E,n?T(k,z.precision):k},h.toDecimalPlaces=h.todp=function(k,R){var E=this,_=E.constructor;return E=new _(E),k===void 0?E:(v(k,0,t),R===void 0?R=_.rounding:v(R,0,8),T(E,k+b(E)+1,R))},h.toExponential=function(k,R){var E,_=this,U=_.constructor;return k===void 0?E=M(_,!0):(v(k,0,t),R===void 0?R=U.rounding:v(R,0,8),_=T(new U(_),k+1,R),E=M(_,!0,k+1)),E},h.toFixed=function(k,R){var E,_,U=this,V=U.constructor;return k===void 0?M(U):(v(k,0,t),R===void 0?R=V.rounding:v(R,0,8),_=T(new V(U),k+b(U)+1,R),E=M(_.abs(),!1,k+b(_)+1),U.isneg()&&!U.isZero()?"-"+E:E)},h.toInteger=h.toint=function(){var k=this,R=k.constructor;return T(new R(k),b(k)+1,R.rounding)},h.toNumber=function(){return+this},h.toPower=h.pow=function(k){var R,E,_,U,V,L,H=this,j=H.constructor,$=12,W=+(k=new j(k));if(!k.s)return new j(u);if(H=new j(H),!H.s){if(k.s<1)throw Error(o+"Infinity");return H}if(H.eq(u))return H;if(_=j.precision,k.eq(u))return T(H,_);if(R=k.e,E=k.d.length-1,L=R>=E,V=H.s,L){if((E=W<0?-W:W)<=p){for(U=new j(u),R=Math.ceil(_/f+4),n=!1;E%2&&(U=U.times(H),O(U.d,R)),E=s(E/2),E!==0;)H=H.times(H),O(H.d,R);return n=!0,k.s<0?new j(u).div(U):T(U,_)}}else if(V<0)throw Error(o+"NaN");return V=V<0&&k.d[Math.max(R,E)]&1?-1:1,H.s=1,n=!1,U=k.times(P(H,_+$)),n=!0,U=w(U),U.s=V,U},h.toPrecision=function(k,R){var E,_,U=this,V=U.constructor;return k===void 0?(E=b(U),_=M(U,E<=V.toExpNeg||E>=V.toExpPos)):(v(k,1,t),R===void 0?R=V.rounding:v(R,0,8),U=T(new V(U),k,R),E=b(U),_=M(U,k<=E||E<=V.toExpNeg,k)),_},h.toSignificantDigits=h.tosd=function(k,R){var E=this,_=E.constructor;return k===void 0?(k=_.precision,R=_.rounding):(v(k,1,t),R===void 0?R=_.rounding:v(R,0,8)),T(new _(E),k,R)},h.toString=h.valueOf=h.val=h.toJSON=function(){var k=this,R=b(k),E=k.constructor;return M(k,R<=E.toExpNeg||R>=E.toExpPos)};function g(k,R){var E,_,U,V,L,H,j,$,W=k.constructor,z=W.precision;if(!k.s||!R.s)return R.s||(R=new W(k)),n?T(R,z):R;if(j=k.d,$=R.d,L=k.e,U=R.e,j=j.slice(),V=L-U,V){for(V<0?(_=j,V=-V,H=$.length):(_=$,U=L,H=j.length),L=Math.ceil(z/f),H=L>H?L+1:H+1,V>H&&(V=H,_.length=1),_.reverse();V--;)_.push(0);_.reverse()}for(H=j.length,V=$.length,H-V<0&&(V=H,_=$,$=j,j=_),E=0;V;)E=(j[--V]=j[V]+$[V]+E)/d|0,j[V]%=d;for(E&&(j.unshift(E),++U),H=j.length;j[--H]==0;)j.pop();return R.d=j,R.e=U,n?T(R,z):R}function v(k,R,E){if(k!==~~k||k<R||k>E)throw Error(a+k)}function y(k){var R,E,_,U=k.length-1,V="",L=k[0];if(U>0){for(V+=L,R=1;R<U;R++)_=k[R]+"",E=f-_.length,E&&(V+=S(E)),V+=_;L=k[R],_=L+"",E=f-_.length,E&&(V+=S(E))}else if(L===0)return"0";for(;L%10===0;)L/=10;return V+L}var x=function(){function k(_,U){var V,L=0,H=_.length;for(_=_.slice();H--;)V=_[H]*U+L,_[H]=V%d|0,L=V/d|0;return L&&_.unshift(L),_}function R(_,U,V,L){var H,j;if(V!=L)j=V>L?1:-1;else for(H=j=0;H<V;H++)if(_[H]!=U[H]){j=_[H]>U[H]?1:-1;break}return j}function E(_,U,V){for(var L=0;V--;)_[V]-=L,L=_[V]<U[V]?1:0,_[V]=L*d+_[V]-U[V];for(;!_[0]&&_.length>1;)_.shift()}return function(_,U,V,L){var H,j,$,W,z,G,X,Y,ae,ie,Le,Se,Be,me,Re,ve,Oe,Q,Z=_.constructor,re=_.s==U.s?1:-1,Ce=_.d,ke=U.d;if(!_.s)return new Z(_);if(!U.s)throw Error(o+"Division by zero");for(j=_.e-U.e,Oe=ke.length,Re=Ce.length,X=new Z(re),Y=X.d=[],$=0;ke[$]==(Ce[$]||0);)++$;if(ke[$]>(Ce[$]||0)&&--j,V==null?Se=V=Z.precision:L?Se=V+(b(_)-b(U))+1:Se=V,Se<0)return new Z(0);if(Se=Se/f+2|0,$=0,Oe==1)for(W=0,ke=ke[0],Se++;($<Re||W)&&Se--;$++)Be=W*d+(Ce[$]||0),Y[$]=Be/ke|0,W=Be%ke|0;else{for(W=d/(ke[0]+1)|0,W>1&&(ke=k(ke,W),Ce=k(Ce,W),Oe=ke.length,Re=Ce.length),me=Oe,ae=Ce.slice(0,Oe),ie=ae.length;ie<Oe;)ae[ie++]=0;Q=ke.slice(),Q.unshift(0),ve=ke[0],ke[1]>=d/2&&++ve;do W=0,H=R(ke,ae,Oe,ie),H<0?(Le=ae[0],Oe!=ie&&(Le=Le*d+(ae[1]||0)),W=Le/ve|0,W>1?(W>=d&&(W=d-1),z=k(ke,W),G=z.length,ie=ae.length,H=R(z,ae,G,ie),H==1&&(W--,E(z,Oe<G?Q:ke,G))):(W==0&&(H=W=1),z=ke.slice()),G=z.length,G<ie&&z.unshift(0),E(ae,z,ie),H==-1&&(ie=ae.length,H=R(ke,ae,Oe,ie),H<1&&(W++,E(ae,Oe<ie?Q:ke,ie))),ie=ae.length):H===0&&(W++,ae=[0]),Y[$++]=W,H&&ae[0]?ae[ie++]=Ce[me]||0:(ae=[Ce[me]],ie=1);while((me++<Re||ae[0]!==void 0)&&Se--)}return Y[0]||Y.shift(),X.e=j,T(X,L?V+b(X)+1:V)}}();function w(k,R){var E,_,U,V,L,H,j=0,$=0,W=k.constructor,z=W.precision;if(b(k)>16)throw Error(i+b(k));if(!k.s)return new W(u);for(R==null?(n=!1,H=z):H=R,L=new W(.03125);k.abs().gte(.1);)k=k.times(L),$+=5;for(_=Math.log(l(2,$))/Math.LN10*2+5|0,H+=_,E=U=V=new W(u),W.precision=H;;){if(U=T(U.times(k),H),E=E.times(++j),L=V.plus(x(U,E,H)),y(L.d).slice(0,H)===y(V.d).slice(0,H)){for(;$--;)V=T(V.times(V),H);return W.precision=z,R==null?(n=!0,T(V,z)):V}V=L}}function b(k){for(var R=k.e*f,E=k.d[0];E>=10;E/=10)R++;return R}function C(k,R,E){if(R>k.LN10.sd())throw n=!0,E&&(k.precision=E),Error(o+"LN10 precision limit exceeded");return T(new k(k.LN10),R)}function S(k){for(var R="";k--;)R+="0";return R}function P(k,R){var E,_,U,V,L,H,j,$,W,z=1,G=10,X=k,Y=X.d,ae=X.constructor,ie=ae.precision;if(X.s<1)throw Error(o+(X.s?"NaN":"-Infinity"));if(X.eq(u))return new ae(0);if(R==null?(n=!1,$=ie):$=R,X.eq(10))return R==null&&(n=!0),C(ae,$);if($+=G,ae.precision=$,E=y(Y),_=E.charAt(0),V=b(X),Math.abs(V)<15e14){for(;_<7&&_!=1||_==1&&E.charAt(1)>3;)X=X.times(k),E=y(X.d),_=E.charAt(0),z++;V=b(X),_>1?(X=new ae("0."+E),V++):X=new ae(_+"."+E.slice(1))}else return j=C(ae,$+2,ie).times(V+""),X=P(new ae(_+"."+E.slice(1)),$-G).plus(j),ae.precision=ie,R==null?(n=!0,T(X,ie)):X;for(H=L=X=x(X.minus(u),X.plus(u),$),W=T(X.times(X),$),U=3;;){if(L=T(L.times(W),$),j=H.plus(x(L,new ae(U),$)),y(j.d).slice(0,$)===y(H.d).slice(0,$))return H=H.times(2),V!==0&&(H=H.plus(C(ae,$+2,ie).times(V+""))),H=x(H,new ae(z),$),ae.precision=ie,R==null?(n=!0,T(H,ie)):H;H=j,U+=2}}function N(k,R){var E,_,U;for((E=R.indexOf("."))>-1&&(R=R.replace(".","")),(_=R.search(/e/i))>0?(E<0&&(E=_),E+=+R.slice(_+1),R=R.substring(0,_)):E<0&&(E=R.length),_=0;R.charCodeAt(_)===48;)++_;for(U=R.length;R.charCodeAt(U-1)===48;)--U;if(R=R.slice(_,U),R){if(U-=_,E=E-_-1,k.e=s(E/f),k.d=[],_=(E+1)%f,E<0&&(_+=f),_<U){for(_&&k.d.push(+R.slice(0,_)),U-=f;_<U;)k.d.push(+R.slice(_,_+=f));R=R.slice(_),_=f-R.length}else _-=U;for(;_--;)R+="0";if(k.d.push(+R),n&&(k.e>m||k.e<-m))throw Error(i+E)}else k.s=0,k.e=0,k.d=[0];return k}function T(k,R,E){var _,U,V,L,H,j,$,W,z=k.d;for(L=1,V=z[0];V>=10;V/=10)L++;if(_=R-L,_<0)_+=f,U=R,$=z[W=0];else{if(W=Math.ceil((_+1)/f),V=z.length,W>=V)return k;for($=V=z[W],L=1;V>=10;V/=10)L++;_%=f,U=_-f+L}if(E!==void 0&&(V=l(10,L-U-1),H=$/V%10|0,j=R<0||z[W+1]!==void 0||$%V,j=E<4?(H||j)&&(E==0||E==(k.s<0?3:2)):H>5||H==5&&(E==4||j||E==6&&(_>0?U>0?$/l(10,L-U):0:z[W-1])%10&1||E==(k.s<0?8:7))),R<1||!z[0])return j?(V=b(k),z.length=1,R=R-V-1,z[0]=l(10,(f-R%f)%f),k.e=s(-R/f)||0):(z.length=1,z[0]=k.e=k.s=0),k;if(_==0?(z.length=W,V=1,W--):(z.length=W+1,V=l(10,f-_),z[W]=U>0?($/l(10,L-U)%l(10,U)|0)*V:0),j)for(;;)if(W==0){(z[0]+=V)==d&&(z[0]=1,++k.e);break}else{if(z[W]+=V,z[W]!=d)break;z[W--]=0,V=1}for(_=z.length;z[--_]===0;)z.pop();if(n&&(k.e>m||k.e<-m))throw Error(i+b(k));return k}function A(k,R){var E,_,U,V,L,H,j,$,W,z,G=k.constructor,X=G.precision;if(!k.s||!R.s)return R.s?R.s=-R.s:R=new G(k),n?T(R,X):R;if(j=k.d,z=R.d,_=R.e,$=k.e,j=j.slice(),L=$-_,L){for(W=L<0,W?(E=j,L=-L,H=z.length):(E=z,_=$,H=j.length),U=Math.max(Math.ceil(X/f),H)+2,L>U&&(L=U,E.length=1),E.reverse(),U=L;U--;)E.push(0);E.reverse()}else{for(U=j.length,H=z.length,W=U<H,W&&(H=U),U=0;U<H;U++)if(j[U]!=z[U]){W=j[U]<z[U];break}L=0}for(W&&(E=j,j=z,z=E,R.s=-R.s),H=j.length,U=z.length-H;U>0;--U)j[H++]=0;for(U=z.length;U>L;){if(j[--U]<z[U]){for(V=U;V&&j[--V]===0;)j[V]=d-1;--j[V],j[U]+=d}j[U]-=z[U]}for(;j[--H]===0;)j.pop();for(;j[0]===0;j.shift())--_;return j[0]?(R.d=j,R.e=_,n?T(R,X):R):new G(0)}function M(k,R,E){var _,U=b(k),V=y(k.d),L=V.length;return R?(E&&(_=E-L)>0?V=V.charAt(0)+"."+V.slice(1)+S(_):L>1&&(V=V.charAt(0)+"."+V.slice(1)),V=V+(U<0?"e":"e+")+U):U<0?(V="0."+S(-U-1)+V,E&&(_=E-L)>0&&(V+=S(_))):U>=L?(V+=S(U+1-L),E&&(_=E-U-1)>0&&(V=V+"."+S(_))):((_=U+1)<L&&(V=V.slice(0,_)+"."+V.slice(_)),E&&(_=E-L)>0&&(U+1===L&&(V+="."),V+=S(_))),k.s<0?"-"+V:V}function O(k,R){if(k.length>R)return k.length=R,!0}function F(k){var R,E,_;function U(V){var L=this;if(!(L instanceof U))return new U(V);if(L.constructor=U,V instanceof U){L.s=V.s,L.e=V.e,L.d=(V=V.d)?V.slice():V;return}if(typeof V=="number"){if(V*0!==0)throw Error(a+V);if(V>0)L.s=1;else if(V<0)V=-V,L.s=-1;else{L.s=0,L.e=0,L.d=[0];return}if(V===~~V&&V<1e7){L.e=0,L.d=[V];return}return N(L,V.toString())}else if(typeof V!="string")throw Error(a+V);if(V.charCodeAt(0)===45?(V=V.slice(1),L.s=-1):L.s=1,c.test(V))N(L,V);else throw Error(a+V)}if(U.prototype=h,U.ROUND_UP=0,U.ROUND_DOWN=1,U.ROUND_CEIL=2,U.ROUND_FLOOR=3,U.ROUND_HALF_UP=4,U.ROUND_HALF_DOWN=5,U.ROUND_HALF_EVEN=6,U.ROUND_HALF_CEIL=7,U.ROUND_HALF_FLOOR=8,U.clone=F,U.config=U.set=I,k===void 0&&(k={}),k)for(_=["precision","rounding","toExpNeg","toExpPos","LN10"],R=0;R<_.length;)k.hasOwnProperty(E=_[R++])||(k[E]=this[E]);return U.config(k),U}function I(k){if(!k||typeof k!="object")throw Error(o+"Object expected");var R,E,_,U=["precision",1,t,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(R=0;R<U.length;R+=3)if((_=k[E=U[R]])!==void 0)if(s(_)===_&&_>=U[R+1]&&_<=U[R+2])this[E]=_;else throw Error(a+E+": "+_);if((_=k[E="LN10"])!==void 0)if(_==Math.LN10)this[E]=new this(_);else throw Error(a+E+": "+_);return this}r=F(r),r.default=r.Decimal=r,u=new r(1),typeof define=="function"&&define.amd?define(function(){return r}):typeof V6<"u"&&V6.exports?V6.exports=r:(e||(e=typeof self<"u"&&self&&self.self==self?self:Function("return this")()),e.Decimal=r)})($ze)});var oae=de((Umn,MHe)=>{function bHt(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}MHe.exports=bHt});var GHe=de((nhn,WHe)=>{"use strict";var WHt="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";WHe.exports=WHt});var QHe=de((ohn,YHe)=>{"use strict";var GHt=GHe();function KHe(){}function XHe(){}XHe.resetWarningCache=KHe;YHe.exports=function(){function e(n,o,a,i,s,l){if(l!==GHt){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}e.isRequired=e;function t(){return e}var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:XHe,resetWarningCache:KHe};return r.PropTypes=r,r}});var Hg=de((shn,ZHe)=>{ZHe.exports=QHe()();var ahn,ihn});var Hje=de((Qhn,zje)=>{var e$t=wO(),t$t=Toe(),r$t=$m();function n$t(e,t){return e&&e.length?e$t(e,r$t(t,2),t$t):void 0}zje.exports=n$t});var $je=de((Zhn,jje)=>{var o$t=wO(),a$t=$m(),i$t=Loe();function s$t(e,t){return e&&e.length?o$t(e,a$t(t,2),i$t):void 0}jje.exports=s$t});var i6e=de((ggn,a6e)=>{var k$t=yne(),R$t=k$t(Object.getPrototypeOf,Object);a6e.exports=R$t});var c6e=de((vgn,l6e)=>{var N$t=Tg(),M$t=i6e(),T$t=Ag(),A$t="[object Object]",L$t=Function.prototype,E$t=Object.prototype,s6e=L$t.toString,D$t=E$t.hasOwnProperty,O$t=s6e.call(Object);function _$t(e){if(!T$t(e)||N$t(e)!=A$t)return!1;var t=M$t(e);if(t===null)return!0;var r=D$t.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&s6e.call(r)==O$t}l6e.exports=_$t});var d6e=de((ygn,u6e)=>{var F$t=Tg(),B$t=Ag(),V$t="[object Boolean]";function U$t(e){return e===!0||e===!1||B$t(e)&&F$t(e)==V$t}u6e.exports=U$t});var A6e=de((Wgn,T6e)=>{function yqt(e){return e&&e.length?e[0]:void 0}T6e.exports=yqt});var E6e=de((Ggn,L6e)=>{L6e.exports=A6e()});var Y6e=de((wvn,X6e)=>{var jqt=Math.ceil,$qt=Math.max;function qqt(e,t,r,n){for(var o=-1,a=$qt(jqt((t-e)/(r||1)),0),i=Array(a);a--;)i[n?a:++o]=e,e+=r;return i}X6e.exports=qqt});var Dae=de((Cvn,Z6e)=>{var Wqt=jne(),Q6e=1/0,Gqt=17976931348623157e292;function Kqt(e){if(!e)return e===0?e:0;if(e=Wqt(e),e===Q6e||e===-Q6e){var t=e<0?-1:1;return t*Gqt}return e===e?e:0}Z6e.exports=Kqt});var e$e=de((Svn,J6e)=>{var Xqt=Y6e(),Yqt=XD(),Oae=Dae();function Qqt(e){return function(t,r,n){return n&&typeof n!="number"&&Yqt(t,r,n)&&(r=n=void 0),t=Oae(t),r===void 0?(r=t,t=0):r=Oae(r),n=n===void 0?t<r?1:-1:Oae(n),Xqt(t,r,n,e)}}J6e.exports=Qqt});var _ae=de((Pvn,t$e)=>{var Zqt=e$e(),Jqt=Zqt();t$e.exports=Jqt});var p$e=de((Ovn,f$e)=>{var dWt=Gj();function fWt(e,t){var r;return dWt(e,function(n,o,a){return r=t(n,o,a),!r}),!!r}f$e.exports=fWt});var h$e=de((_vn,m$e)=>{var pWt=cne(),mWt=$m(),hWt=p$e(),gWt=Su(),vWt=XD();function yWt(e,t,r){var n=gWt(e)?pWt:hWt;return r&&vWt(e,t,r)&&(t=void 0),n(e,mWt(t,3))}m$e.exports=yWt});var y$e=de((Bvn,v$e)=>{var g$e=_ne();function xWt(e,t,r){t=="__proto__"&&g$e?g$e(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}v$e.exports=xWt});var b$e=de((Vvn,x$e)=>{var bWt=y$e(),wWt=Ene(),CWt=$m();function SWt(e,t){var r={};return t=CWt(t,3),wWt(e,function(n,o,a){bWt(r,o,t(n,o,a))}),r}x$e.exports=SWt});var C$e=de((Uvn,w$e)=>{function PWt(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(!t(e[r],r,e))return!1;return!0}w$e.exports=PWt});var P$e=de((zvn,S$e)=>{var IWt=Gj();function kWt(e,t){var r=!0;return IWt(e,function(n,o,a){return r=!!t(n,o,a),r}),r}S$e.exports=kWt});var Uae=de((Hvn,I$e)=>{var RWt=C$e(),NWt=P$e(),MWt=$m(),TWt=Su(),AWt=XD();function LWt(e,t,r){var n=TWt(e)?RWt:NWt;return r&&AWt(e,t,r)&&(t=void 0),n(e,MWt(t,3))}I$e.exports=LWt});var q$e=de((dyn,$$e)=>{var eGt=$m(),tGt=pR(),rGt=KD();function nGt(e){return function(t,r,n){var o=Object(t);if(!tGt(t)){var a=eGt(r,3);t=rGt(t),r=function(s){return a(o[s],s,o)}}var i=e(t,r,n);return i>-1?o[a?t[i]:i]:void 0}}$$e.exports=nGt});var G$e=de((fyn,W$e)=>{var oGt=Dae();function aGt(e){var t=oGt(e),r=t%1;return t===t?r?t-r:t:0}W$e.exports=aGt});var X$e=de((pyn,K$e)=>{var iGt=Nne(),sGt=$m(),lGt=G$e(),cGt=Math.max;function uGt(e,t,r){var n=e==null?0:e.length;if(!n)return-1;var o=r==null?0:lGt(r);return o<0&&(o=cGt(n+o,0)),iGt(e,sGt(t,3),o)}K$e.exports=uGt});var Q$e=de((myn,Y$e)=>{var dGt=q$e(),fGt=X$e(),pGt=dGt(fGt);Y$e.exports=pGt});var RWe=de((Lbn,vie)=>{"use strict";var N9t=Object.prototype.hasOwnProperty,Nu="~";function b2(){}Object.create&&(b2.prototype=Object.create(null),new b2().__proto__||(Nu=!1));function M9t(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function kWe(e,t,r,n,o){if(typeof r!="function")throw new TypeError("The listener must be a function");var a=new M9t(r,n||e,o),i=Nu?Nu+t:t;return e._events[i]?e._events[i].fn?e._events[i]=[e._events[i],a]:e._events[i].push(a):(e._events[i]=a,e._eventsCount++),e}function Y$(e,t){--e._eventsCount===0?e._events=new b2:delete e._events[t]}function _c(){this._events=new b2,this._eventsCount=0}_c.prototype.eventNames=function(){var t=[],r,n;if(this._eventsCount===0)return t;for(n in r=this._events)N9t.call(r,n)&&t.push(Nu?n.slice(1):n);return Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(r)):t};_c.prototype.listeners=function(t){var r=Nu?Nu+t:t,n=this._events[r];if(!n)return[];if(n.fn)return[n.fn];for(var o=0,a=n.length,i=new Array(a);o<a;o++)i[o]=n[o].fn;return i};_c.prototype.listenerCount=function(t){var r=Nu?Nu+t:t,n=this._events[r];return n?n.fn?1:n.length:0};_c.prototype.emit=function(t,r,n,o,a,i){var s=Nu?Nu+t:t;if(!this._events[s])return!1;var l=this._events[s],c=arguments.length,u,d;if(l.fn){switch(l.once&&this.removeListener(t,l.fn,void 0,!0),c){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,r),!0;case 3:return l.fn.call(l.context,r,n),!0;case 4:return l.fn.call(l.context,r,n,o),!0;case 5:return l.fn.call(l.context,r,n,o,a),!0;case 6:return l.fn.call(l.context,r,n,o,a,i),!0}for(d=1,u=new Array(c-1);d<c;d++)u[d-1]=arguments[d];l.fn.apply(l.context,u)}else{var f=l.length,p;for(d=0;d<f;d++)switch(l[d].once&&this.removeListener(t,l[d].fn,void 0,!0),c){case 1:l[d].fn.call(l[d].context);break;case 2:l[d].fn.call(l[d].context,r);break;case 3:l[d].fn.call(l[d].context,r,n);break;case 4:l[d].fn.call(l[d].context,r,n,o);break;default:if(!u)for(p=1,u=new Array(c-1);p<c;p++)u[p-1]=arguments[p];l[d].fn.apply(l[d].context,u)}}return!0};_c.prototype.on=function(t,r,n){return kWe(this,t,r,n,!1)};_c.prototype.once=function(t,r,n){return kWe(this,t,r,n,!0)};_c.prototype.removeListener=function(t,r,n,o){var a=Nu?Nu+t:t;if(!this._events[a])return this;if(!r)return Y$(this,a),this;var i=this._events[a];if(i.fn)i.fn===r&&(!o||i.once)&&(!n||i.context===n)&&Y$(this,a);else{for(var s=0,l=[],c=i.length;s<c;s++)(i[s].fn!==r||o&&!i[s].once||n&&i[s].context!==n)&&l.push(i[s]);l.length?this._events[a]=l.length===1?l[0]:l:Y$(this,a)}return this};_c.prototype.removeAllListeners=function(t){var r;return t?(r=Nu?Nu+t:t,this._events[r]&&Y$(this,r)):(this._events=new b2,this._eventsCount=0),this};_c.prototype.off=_c.prototype.removeListener;_c.prototype.addListener=_c.prototype.on;_c.prefixed=Nu;_c.EventEmitter=_c;typeof vie<"u"&&(vie.exports=_c)});var fq=de((dq,JWe)=>{(function(e,t){typeof dq=="object"&&typeof JWe<"u"?t(dq):typeof define=="function"&&define.amd?define(["exports"],t):(e=typeof globalThis<"u"?globalThis:e||self,t(e["fast-equals"]={}))})(dq,function(e){"use strict";function t(W){return function(G,X,Y,ae,ie,Le,Se){return W(G,X,Se)}}function r(W){return function(G,X,Y,ae){if(!G||!X||typeof G!="object"||typeof X!="object")return W(G,X,Y,ae);var ie=ae.get(G),Le=ae.get(X);if(ie&&Le)return ie===X&&Le===G;ae.set(G,X),ae.set(X,G);var Se=W(G,X,Y,ae);return ae.delete(G),ae.delete(X),Se}}function n(W,z){var G={};for(var X in W)G[X]=W[X];for(var X in z)G[X]=z[X];return G}function o(W){return W.constructor===Object||W.constructor==null}function a(W){return typeof W.then=="function"}function i(W,z){return W===z||W!==W&&z!==z}var s="[object Arguments]",l="[object Boolean]",c="[object Date]",u="[object RegExp]",d="[object Map]",f="[object Number]",p="[object Object]",m="[object Set]",h="[object String]",g=Object.prototype.toString;function v(W){var z=W.areArraysEqual,G=W.areDatesEqual,X=W.areMapsEqual,Y=W.areObjectsEqual,ae=W.areRegExpsEqual,ie=W.areSetsEqual,Le=W.createIsNestedEqual,Se=Le(Be);function Be(me,Re,ve){if(me===Re)return!0;if(!me||!Re||typeof me!="object"||typeof Re!="object")return me!==me&&Re!==Re;if(o(me)&&o(Re))return Y(me,Re,Se,ve);var Oe=Array.isArray(me),Q=Array.isArray(Re);if(Oe||Q)return Oe===Q&&z(me,Re,Se,ve);var Z=g.call(me);return Z!==g.call(Re)?!1:Z===c?G(me,Re,Se,ve):Z===u?ae(me,Re,Se,ve):Z===d?X(me,Re,Se,ve):Z===m?ie(me,Re,Se,ve):Z===p||Z===s?a(me)||a(Re)?!1:Y(me,Re,Se,ve):Z===l||Z===f||Z===h?i(me.valueOf(),Re.valueOf()):!1}return Be}function y(W,z,G,X){var Y=W.length;if(z.length!==Y)return!1;for(;Y-- >0;)if(!G(W[Y],z[Y],Y,Y,W,z,X))return!1;return!0}var x=r(y);function w(W,z){return i(W.valueOf(),z.valueOf())}function b(W,z,G,X){var Y=W.size===z.size;if(!Y)return!1;if(!W.size)return!0;var ae={},ie=0;return W.forEach(function(Le,Se){if(Y){var Be=!1,me=0;z.forEach(function(Re,ve){!Be&&!ae[me]&&(Be=G(Se,ve,ie,me,W,z,X)&&G(Le,Re,Se,ve,W,z,X))&&(ae[me]=!0),me++}),ie++,Y=Be}}),Y}var C=r(b),S="_owner",P=Object.prototype.hasOwnProperty;function N(W,z,G,X){var Y=Object.keys(W),ae=Y.length;if(Object.keys(z).length!==ae)return!1;for(var ie;ae-- >0;){if(ie=Y[ae],ie===S){var Le=!!W.$$typeof,Se=!!z.$$typeof;if((Le||Se)&&Le!==Se)return!1}if(!P.call(z,ie)||!G(W[ie],z[ie],ie,ie,W,z,X))return!1}return!0}var T=r(N);function A(W,z){return W.source===z.source&&W.flags===z.flags}function M(W,z,G,X){var Y=W.size===z.size;if(!Y)return!1;if(!W.size)return!0;var ae={};return W.forEach(function(ie,Le){if(Y){var Se=!1,Be=0;z.forEach(function(me,Re){!Se&&!ae[Be]&&(Se=G(ie,me,Le,Re,W,z,X))&&(ae[Be]=!0),Be++}),Y=Se}}),Y}var O=r(M),F=Object.freeze({areArraysEqual:y,areDatesEqual:w,areMapsEqual:b,areObjectsEqual:N,areRegExpsEqual:A,areSetsEqual:M,createIsNestedEqual:t}),I=Object.freeze({areArraysEqual:x,areDatesEqual:w,areMapsEqual:C,areObjectsEqual:T,areRegExpsEqual:A,areSetsEqual:O,createIsNestedEqual:t}),k=v(F);function R(W,z){return k(W,z,void 0)}var E=v(n(F,{createIsNestedEqual:function(){return i}}));function _(W,z){return E(W,z,void 0)}var U=v(I);function V(W,z){return U(W,z,new WeakMap)}var L=v(n(I,{createIsNestedEqual:function(){return i}}));function H(W,z){return L(W,z,new WeakMap)}function j(W){return v(n(F,W(F)))}function $(W){var z=v(n(I,W(I)));return function(G,X,Y){return Y===void 0&&(Y=new WeakMap),z(G,X,Y)}}e.circularDeepEqual=V,e.circularShallowEqual=H,e.createCustomCircularEqual=$,e.createCustomEqual=j,e.deepEqual=R,e.sameValueZeroEqual=i,e.shallowEqual=_,Object.defineProperty(e,"__esModule",{value:!0})})});var R2=de((rSn,Tie)=>{function tGe(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=tGe(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function eGe(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=tGe(e))&&(n&&(n+=" "),n+=t);return n}Tie.exports=eGe,Tie.exports.clsx=eGe});var nGe=de((nSn,rGe)=>{rGe.exports=function(t,r,n){return t===r?!0:t.className===r.className&&n(t.style,r.style)&&t.width===r.width&&t.autoSize===r.autoSize&&t.cols===r.cols&&t.draggableCancel===r.draggableCancel&&t.draggableHandle===r.draggableHandle&&n(t.verticalCompact,r.verticalCompact)&&n(t.compactType,r.compactType)&&n(t.layout,r.layout)&&n(t.margin,r.margin)&&n(t.containerPadding,r.containerPadding)&&t.rowHeight===r.rowHeight&&t.maxRows===r.maxRows&&t.isBounded===r.isBounded&&t.isDraggable===r.isDraggable&&t.isResizable===r.isResizable&&t.allowOverlap===r.allowOverlap&&t.preventCollision===r.preventCollision&&t.useCSSTransforms===r.useCSSTransforms&&t.transformScale===r.transformScale&&t.isDroppable===r.isDroppable&&n(t.resizeHandles,r.resizeHandles)&&n(t.resizeHandle,r.resizeHandle)&&t.onLayoutChange===r.onLayoutChange&&t.onDragStart===r.onDragStart&&t.onDrag===r.onDrag&&t.onDragStop===r.onDragStop&&t.onResizeStart===r.onResizeStart&&t.onResize===r.onResize&&t.onResizeStop===r.onResizeStop&&t.onDrop===r.onDrop&&n(t.droppingItem,r.droppingItem)&&n(t.innerRef,r.innerRef)}});var e1=de(oo=>{"use strict";Object.defineProperty(oo,"__esModule",{value:!0});oo.bottom=Eie;oo.childrenEqual=gKt;oo.cloneLayout=aGe;oo.cloneLayoutItem=JS;oo.collides=mq;oo.compact=sGe;oo.compactItem=lGe;oo.compactType=MKt;oo.correctBounds=cGe;oo.fastPositionEqual=vKt;oo.fastRGLPropsEqual=void 0;oo.getAllCollisions=uGe;oo.getFirstCollision=ZS;oo.getLayoutItem=Die;oo.getStatics=Oie;oo.modifyLayout=iGe;oo.moveElement=M2;oo.moveElementAwayFromCollision=Lie;oo.noop=void 0;oo.perc=xKt;oo.resizeItemInDirection=IKt;oo.setTopLeft=RKt;oo.setTransform=kKt;oo.sortLayoutItems=zie;oo.sortLayoutItemsByColRow=hGe;oo.sortLayoutItemsByRowCol=mGe;oo.synchronizeLayoutWithChildren=NKt;oo.validateLayout=gGe;oo.withLayoutItem=hKt;var oGe=fq(),N2=fKt(ue());function fKt(e){return e&&e.__esModule?e:{default:e}}var pKt=!0,mKt=!1;function Eie(e){let t=0,r;for(let n=0,o=e.length;n<o;n++)r=e[n].y+e[n].h,r>t&&(t=r);return t}function aGe(e){let t=Array(e.length);for(let r=0,n=e.length;r<n;r++)t[r]=JS(e[r]);return t}function iGe(e,t){let r=Array(e.length);for(let n=0,o=e.length;n<o;n++)t.i===e[n].i?r[n]=t:r[n]=e[n];return r}function hKt(e,t,r){let n=Die(e,t);return n?(n=r(JS(n)),e=iGe(e,n),[e,n]):[e,null]}function JS(e){return{w:e.w,h:e.h,x:e.x,y:e.y,i:e.i,minW:e.minW,maxW:e.maxW,minH:e.minH,maxH:e.maxH,moved:!!e.moved,static:!!e.static,isDraggable:e.isDraggable,isResizable:e.isResizable,resizeHandles:e.resizeHandles,isBounded:e.isBounded}}function gKt(e,t){return(0,oGe.deepEqual)(N2.default.Children.map(e,r=>r?.key),N2.default.Children.map(t,r=>r?.key))&&(0,oGe.deepEqual)(N2.default.Children.map(e,r=>r?.props["data-grid"]),N2.default.Children.map(t,r=>r?.props["data-grid"]))}var oSn=oo.fastRGLPropsEqual=nGe();function vKt(e,t){return e.left===t.left&&e.top===t.top&&e.width===t.width&&e.height===t.height}function mq(e,t){return!(e.i===t.i||e.x+e.w<=t.x||e.x>=t.x+t.w||e.y+e.h<=t.y||e.y>=t.y+t.h)}function sGe(e,t,r,n){let o=Oie(e),a=zie(e,t),i=Array(e.length);for(let s=0,l=a.length;s<l;s++){let c=JS(a[s]);c.static||(c=lGe(o,c,t,r,a,n),o.push(c)),i[e.indexOf(a[s])]=c,c.moved=!1}return i}var yKt={x:"w",y:"h"};function Aie(e,t,r,n){let o=yKt[n];t[n]+=1;let a=e.map(i=>i.i).indexOf(t.i);for(let i=a+1;i<e.length;i++){let s=e[i];if(!s.static){if(s.y>t.y+t.h)break;mq(t,s)&&Aie(e,s,r+t[o],n)}}t[n]=r}function lGe(e,t,r,n,o,a){let i=r==="vertical",s=r==="horizontal";if(i)for(t.y=Math.min(Eie(e),t.y);t.y>0&&!ZS(e,t);)t.y--;else if(s)for(;t.x>0&&!ZS(e,t);)t.x--;let l;for(;(l=ZS(e,t))&&!(r===null&&a);)if(s?Aie(o,t,l.x+l.w,"x"):Aie(o,t,l.y+l.h,"y"),s&&t.x+t.w>n)for(t.x=n-t.w,t.y++;t.x>0&&!ZS(e,t);)t.x--;return t.y=Math.max(t.y,0),t.x=Math.max(t.x,0),t}function cGe(e,t){let r=Oie(e);for(let n=0,o=e.length;n<o;n++){let a=e[n];if(a.x+a.w>t.cols&&(a.x=t.cols-a.w),a.x<0&&(a.x=0,a.w=t.cols),!a.static)r.push(a);else for(;ZS(r,a);)a.y++}return e}function Die(e,t){for(let r=0,n=e.length;r<n;r++)if(e[r].i===t)return e[r]}function ZS(e,t){for(let r=0,n=e.length;r<n;r++)if(mq(e[r],t))return e[r]}function uGe(e,t){return e.filter(r=>mq(r,t))}function Oie(e){return e.filter(t=>t.static)}function M2(e,t,r,n,o,a,i,s,l){if(t.static&&t.isDraggable!==!0||t.y===n&&t.x===r)return e;pq(`Moving element ${t.i} to [${String(r)},${String(n)}] from [${t.x},${t.y}]`);let c=t.x,u=t.y;typeof r=="number"&&(t.x=r),typeof n=="number"&&(t.y=n),t.moved=!0;let d=zie(e,i);(i==="vertical"&&typeof n=="number"?u>=n:i==="horizontal"&&typeof r=="number"?c>=r:!1)&&(d=d.reverse());let p=uGe(d,t),m=p.length>0;if(m&&l)return aGe(e);if(m&&a)return pq(`Collision prevented on ${t.i}, reverting.`),t.x=c,t.y=u,t.moved=!1,e;for(let h=0,g=p.length;h<g;h++){let v=p[h];pq(`Resolving collision between ${t.i} at [${t.x},${t.y}] and ${v.i} at [${v.x},${v.y}]`),!v.moved&&(v.static?e=Lie(e,v,t,o,i,s):e=Lie(e,t,v,o,i,s))}return e}function Lie(e,t,r,n,o,a){let i=o==="horizontal",s=o==="vertical",l=t.static;if(n){n=!1;let d={x:i?Math.max(t.x-r.w,0):r.x,y:s?Math.max(t.y-r.h,0):r.y,w:r.w,h:r.h,i:"-1"},f=ZS(e,d),p=f&&f.y+f.h>t.y,m=f&&t.x+t.w>f.x;if(f){if(p&&s)return M2(e,r,void 0,t.y+1,n,l,o,a);if(p&&o==null)return t.y=r.y,r.y=r.y+r.h,e;if(m&&i)return M2(e,t,r.x,void 0,n,l,o,a)}else return pq(`Doing reverse collision on ${r.i} up to [${d.x},${d.y}].`),M2(e,r,i?d.x:void 0,s?d.y:void 0,n,l,o,a)}let c=i?r.x+1:void 0,u=s?r.y+1:void 0;return c==null&&u==null?e:M2(e,r,i?r.x+1:void 0,s?r.y+1:void 0,n,l,o,a)}function xKt(e){return e*100+"%"}var dGe=(e,t,r,n)=>e+r>n?t:r,fGe=(e,t,r)=>e<0?t:r,pGe=e=>Math.max(0,e),_ie=e=>Math.max(0,e),Fie=(e,t,r)=>{let{left:n,height:o,width:a}=t,i=e.top-(o-e.height);return{left:n,width:a,height:fGe(i,e.height,o),top:_ie(i)}},Bie=(e,t,r)=>{let{top:n,left:o,height:a,width:i}=t;return{top:n,height:a,width:dGe(e.left,e.width,i,r),left:pGe(o)}},Vie=(e,t,r)=>{let{top:n,height:o,width:a}=t,i=e.left-(a-e.width);return{height:o,width:i<0?e.width:dGe(e.left,e.width,a,r),top:_ie(n),left:pGe(i)}},Uie=(e,t,r)=>{let{top:n,left:o,height:a,width:i}=t;return{width:i,left:o,height:fGe(n,e.height,a),top:_ie(n)}},bKt=function(){return Fie(arguments.length<=0?void 0:arguments[0],Bie(...arguments),arguments.length<=2?void 0:arguments[2])},wKt=function(){return Fie(arguments.length<=0?void 0:arguments[0],Vie(...arguments),arguments.length<=2?void 0:arguments[2])},CKt=function(){return Uie(arguments.length<=0?void 0:arguments[0],Bie(...arguments),arguments.length<=2?void 0:arguments[2])},SKt=function(){return Uie(arguments.length<=0?void 0:arguments[0],Vie(...arguments),arguments.length<=2?void 0:arguments[2])},PKt={n:Fie,ne:bKt,e:Bie,se:CKt,s:Uie,sw:SKt,w:Vie,nw:wKt};function IKt(e,t,r,n){let o=PKt[e];return o?o(t,{...t,...r},n):r}function kKt(e){let{top:t,left:r,width:n,height:o}=e,a=`translate(${r}px,${t}px)`;return{transform:a,WebkitTransform:a,MozTransform:a,msTransform:a,OTransform:a,width:`${n}px`,height:`${o}px`,position:"absolute"}}function RKt(e){let{top:t,left:r,width:n,height:o}=e;return{top:`${t}px`,left:`${r}px`,width:`${n}px`,height:`${o}px`,position:"absolute"}}function zie(e,t){return t==="horizontal"?hGe(e):t==="vertical"?mGe(e):e}function mGe(e){return e.slice(0).sort(function(t,r){return t.y>r.y||t.y===r.y&&t.x>r.x?1:t.y===r.y&&t.x===r.x?0:-1})}function hGe(e){return e.slice(0).sort(function(t,r){return t.x>r.x||t.x===r.x&&t.y>r.y?1:-1})}function NKt(e,t,r,n,o){e=e||[];let a=[];N2.default.Children.forEach(t,s=>{if(s?.key==null)return;let l=Die(e,String(s.key)),c=s.props["data-grid"];l&&c==null?a.push(JS(l)):c?(pKt||gGe([c],"ReactGridLayout.children"),a.push(JS({...c,i:s.key}))):a.push(JS({w:1,h:1,x:0,y:Eie(a),i:String(s.key)}))});let i=cGe(a,{cols:r});return o?i:sGe(i,n,r)}function gGe(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Layout",r=["x","y","w","h"];if(!Array.isArray(e))throw new Error(t+" must be an array!");for(let n=0,o=e.length;n<o;n++){let a=e[n];for(let i=0;i<r.length;i++){let s=r[i],l=a[s];if(typeof l!="number"||Number.isNaN(l))throw new Error(`ReactGridLayout: ${t}[${n}].${s} must be a number! Received: ${l} (${typeof l})`)}if(typeof a.i<"u"&&typeof a.i!="string")throw new Error(`ReactGridLayout: ${t}[${n}].i must be a string! Received: ${a.i} (${typeof a.i})`)}}function MKt(e){let{verticalCompact:t,compactType:r}=e||{};return t===!1?null:r}function pq(){mKt&&console.log(...arguments)}var TKt=()=>{};oo.noop=TKt});var gq=de(T0=>{"use strict";Object.defineProperty(T0,"__esModule",{value:!0});T0.calcGridColWidth=hq;T0.calcGridItemPosition=AKt;T0.calcGridItemWHPx=Hie;T0.calcWH=EKt;T0.calcXY=LKt;T0.clamp=t1;function hq(e){let{margin:t,containerPadding:r,containerWidth:n,cols:o}=e;return(n-t[0]*(o-1)-r[0]*2)/o}function Hie(e,t,r){return Number.isFinite(e)?Math.round(t*e+Math.max(0,e-1)*r):e}function AKt(e,t,r,n,o,a){let{margin:i,containerPadding:s,rowHeight:l}=e,c=hq(e),u={};return a&&a.resizing?(u.width=Math.round(a.resizing.width),u.height=Math.round(a.resizing.height)):(u.width=Hie(n,c,i[0]),u.height=Hie(o,l,i[1])),a&&a.dragging?(u.top=Math.round(a.dragging.top),u.left=Math.round(a.dragging.left)):a&&a.resizing&&typeof a.resizing.top=="number"&&typeof a.resizing.left=="number"?(u.top=Math.round(a.resizing.top),u.left=Math.round(a.resizing.left)):(u.top=Math.round((l+i[1])*r+s[1]),u.left=Math.round((c+i[0])*t+s[0])),u}function LKt(e,t,r,n,o){let{margin:a,containerPadding:i,cols:s,rowHeight:l,maxRows:c}=e,u=hq(e),d=Math.round((r-i[0])/(u+a[0])),f=Math.round((t-i[1])/(l+a[1]));return d=t1(d,0,s-n),f=t1(f,0,c-o),{x:d,y:f}}function EKt(e,t,r,n,o,a){let{margin:i,maxRows:s,cols:l,rowHeight:c}=e,u=hq(e),d=Math.round((t+i[0])/(u+i[0])),f=Math.round((r+i[1])/(c+i[1])),p=t1(d,0,l-n),m=t1(f,0,s-o);return["sw","w","nw"].indexOf(a)!==-1&&(p=t1(d,0,l)),["nw","n","ne"].indexOf(a)!==-1&&(m=t1(f,0,s)),{w:p,h:m}}function t1(e,t,r){return Math.max(Math.min(e,r),t)}});var T2=de(r1=>{"use strict";Object.defineProperty(r1,"__esModule",{value:!0});r1.dontSetMe=BKt;r1.findInArray=DKt;r1.int=FKt;r1.isFunction=OKt;r1.isNum=_Kt;function DKt(e,t){for(let r=0,n=e.length;r<n;r++)if(t.apply(t,[e[r],r,e]))return e[r]}function OKt(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Function]"}function _Kt(e){return typeof e=="number"&&!isNaN(e)}function FKt(e){return parseInt(e,10)}function BKt(e,t,r){if(e[t])return new Error(`Invalid prop ${t} passed to ${r} - do not set this, set it on the child.`)}});var xGe=de(n1=>{"use strict";Object.defineProperty(n1,"__esModule",{value:!0});n1.browserPrefixToKey=yGe;n1.browserPrefixToStyle=VKt;n1.default=void 0;n1.getPrefix=vGe;var jie=["Moz","Webkit","O","ms"];function vGe(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"transform";if(typeof window>"u")return"";let t=window.document?.documentElement?.style;if(!t||e in t)return"";for(let r=0;r<jie.length;r++)if(yGe(e,jie[r])in t)return jie[r];return""}function yGe(e,t){return t?`${t}${UKt(e)}`:e}function VKt(e,t){return t?`-${t.toLowerCase()}-${e}`:e}function UKt(e){let t="",r=!0;for(let n=0;n<e.length;n++)r?(t+=e[n].toUpperCase(),r=!1):e[n]==="-"?r=!0:t+=e[n];return t}var lSn=n1.default=vGe()});var yq=de(Bs=>{"use strict";Object.defineProperty(Bs,"__esModule",{value:!0});Bs.addClassName=PGe;Bs.addEvent=HKt;Bs.addUserSelectStyles=JKt;Bs.createCSSTransform=XKt;Bs.createSVGTransform=YKt;Bs.getTouch=QKt;Bs.getTouchIdentifier=ZKt;Bs.getTranslation=$ie;Bs.innerHeight=WKt;Bs.innerWidth=GKt;Bs.matchesSelector=SGe;Bs.matchesSelectorAndParentsTo=zKt;Bs.offsetXYFromParent=KKt;Bs.outerHeight=$Kt;Bs.outerWidth=qKt;Bs.removeClassName=IGe;Bs.removeEvent=jKt;Bs.scheduleRemoveUserSelectStyles=e7t;var Nf=T2(),bGe=CGe(xGe());function CGe(e,t){if(typeof WeakMap=="function")var r=new WeakMap,n=new WeakMap;return(CGe=function(o,a){if(!a&&o&&o.__esModule)return o;var i,s,l={__proto__:null,default:o};if(o===null||typeof o!="object"&&typeof o!="function")return l;if(i=a?n:r){if(i.has(o))return i.get(o);i.set(o,l)}for(let c in o)c!=="default"&&{}.hasOwnProperty.call(o,c)&&((s=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(o,c))&&(s.get||s.set)?i(l,c,s):l[c]=o[c]);return l})(e,t)}var vq="";function SGe(e,t){return vq||(vq=(0,Nf.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],function(r){return(0,Nf.isFunction)(e[r])})),(0,Nf.isFunction)(e[vq])?e[vq](t):!1}function zKt(e,t,r){let n=e;do{if(SGe(n,t))return!0;if(n===r)return!1;n=n.parentNode}while(n);return!1}function HKt(e,t,r,n){if(!e)return;let o={capture:!0,...n};e.addEventListener?e.addEventListener(t,r,o):e.attachEvent?e.attachEvent("on"+t,r):e["on"+t]=r}function jKt(e,t,r,n){if(!e)return;let o={capture:!0,...n};e.removeEventListener?e.removeEventListener(t,r,o):e.detachEvent?e.detachEvent("on"+t,r):e["on"+t]=null}function $Kt(e){let t=e.clientHeight,r=e.ownerDocument.defaultView.getComputedStyle(e);return t+=(0,Nf.int)(r.borderTopWidth),t+=(0,Nf.int)(r.borderBottomWidth),t}function qKt(e){let t=e.clientWidth,r=e.ownerDocument.defaultView.getComputedStyle(e);return t+=(0,Nf.int)(r.borderLeftWidth),t+=(0,Nf.int)(r.borderRightWidth),t}function WKt(e){let t=e.clientHeight,r=e.ownerDocument.defaultView.getComputedStyle(e);return t-=(0,Nf.int)(r.paddingTop),t-=(0,Nf.int)(r.paddingBottom),t}function GKt(e){let t=e.clientWidth,r=e.ownerDocument.defaultView.getComputedStyle(e);return t-=(0,Nf.int)(r.paddingLeft),t-=(0,Nf.int)(r.paddingRight),t}function KKt(e,t,r){let o=t===t.ownerDocument.body?{left:0,top:0}:t.getBoundingClientRect(),a=(e.clientX+t.scrollLeft-o.left)/r,i=(e.clientY+t.scrollTop-o.top)/r;return{x:a,y:i}}function XKt(e,t){let r=$ie(e,t,"px");return{[(0,bGe.browserPrefixToKey)("transform",bGe.default)]:r}}function YKt(e,t){return $ie(e,t,"")}function $ie(e,t,r){let{x:n,y:o}=e,a=`translate(${n}${r},${o}${r})`;if(t){let i=`${typeof t.x=="string"?t.x:t.x+r}`,s=`${typeof t.y=="string"?t.y:t.y+r}`;a=`translate(${i}, ${s})`+a}return a}function QKt(e,t){return e.targetTouches&&(0,Nf.findInArray)(e.targetTouches,r=>t===r.identifier)||e.changedTouches&&(0,Nf.findInArray)(e.changedTouches,r=>t===r.identifier)}function ZKt(e){if(e.targetTouches&&e.targetTouches[0])return e.targetTouches[0].identifier;if(e.changedTouches&&e.changedTouches[0])return e.changedTouches[0].identifier}function JKt(e){if(!e)return;let t=e.getElementById("react-draggable-style-el");t||(t=e.createElement("style"),t.type="text/css",t.id="react-draggable-style-el",t.innerHTML=`.react-draggable-transparent-selection *::-moz-selection {all: inherit;}
18
18
  `,t.innerHTML+=`.react-draggable-transparent-selection *::selection {all: inherit;}
19
- `,e.getElementsByTagName("head")[0].appendChild(t)),e.body&&PGe(e.body,"react-draggable-transparent-selection")}function e7t(e){window.requestAnimationFrame?window.requestAnimationFrame(()=>{wGe(e)}):wGe(e)}function wGe(e){if(e)try{if(e.body&&IGe(e.body,"react-draggable-transparent-selection"),e.selection)e.selection.empty();else{let t=(e.defaultView||window).getSelection();t&&t.type!=="Caret"&&t.removeAllRanges()}}catch{}}function PGe(e,t){e.classList?e.classList.add(t):e.className.match(new RegExp(`(?:^|\\s)${t}(?!\\S)`))||(e.className+=` ${t}`)}function IGe(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp(`(?:^|\\s)${t}(?!\\S)`,"g"),"")}});var Wie=de(zy=>{"use strict";Object.defineProperty(zy,"__esModule",{value:!0});zy.canDragX=n7t;zy.canDragY=o7t;zy.createCoreData=i7t;zy.createDraggableData=s7t;zy.getBoundPosition=t7t;zy.getControlPosition=a7t;zy.snapToGrid=r7t;var Mf=T2(),EN=yq();function t7t(e,t,r){if(!e.props.bounds)return[t,r];let{bounds:n}=e.props;n=typeof n=="string"?n:l7t(n);let o=qie(e);if(typeof n=="string"){let{ownerDocument:a}=o,i=a.defaultView,s;if(n==="parent"?s=o.parentNode:s=o.getRootNode().querySelector(n),!(s instanceof i.HTMLElement))throw new Error('Bounds selector "'+n+'" could not find an element.');let l=s,c=i.getComputedStyle(o),u=i.getComputedStyle(l);n={left:-o.offsetLeft+(0,Mf.int)(u.paddingLeft)+(0,Mf.int)(c.marginLeft),top:-o.offsetTop+(0,Mf.int)(u.paddingTop)+(0,Mf.int)(c.marginTop),right:(0,EN.innerWidth)(l)-(0,EN.outerWidth)(o)-o.offsetLeft+(0,Mf.int)(u.paddingRight)-(0,Mf.int)(c.marginRight),bottom:(0,EN.innerHeight)(l)-(0,EN.outerHeight)(o)-o.offsetTop+(0,Mf.int)(u.paddingBottom)-(0,Mf.int)(c.marginBottom)}}return(0,Mf.isNum)(n.right)&&(t=Math.min(t,n.right)),(0,Mf.isNum)(n.bottom)&&(r=Math.min(r,n.bottom)),(0,Mf.isNum)(n.left)&&(t=Math.max(t,n.left)),(0,Mf.isNum)(n.top)&&(r=Math.max(r,n.top)),[t,r]}function r7t(e,t,r){let n=Math.round(t/e[0])*e[0],o=Math.round(r/e[1])*e[1];return[n,o]}function n7t(e){return e.props.axis==="both"||e.props.axis==="x"}function o7t(e){return e.props.axis==="both"||e.props.axis==="y"}function a7t(e,t,r){let n=typeof t=="number"?(0,EN.getTouch)(e,t):null;if(typeof t=="number"&&!n)return null;let o=qie(r),a=r.props.offsetParent||o.offsetParent||o.ownerDocument.body;return(0,EN.offsetXYFromParent)(n||e,a,r.props.scale)}function i7t(e,t,r){let n=!(0,Mf.isNum)(e.lastX),o=qie(e);return n?{node:o,deltaX:0,deltaY:0,lastX:t,lastY:r,x:t,y:r}:{node:o,deltaX:t-e.lastX,deltaY:r-e.lastY,lastX:e.lastX,lastY:e.lastY,x:t,y:r}}function s7t(e,t){let r=e.props.scale;return{node:t.node,x:e.state.x+t.deltaX/r,y:e.state.y+t.deltaY/r,deltaX:t.deltaX/r,deltaY:t.deltaY/r,lastX:e.state.x,lastY:e.state.y}}function l7t(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom}}function qie(e){let t=e.findDOMNode();if(!t)throw new Error("<DraggableCore>: Unmounted during event!");return t}});var Kie=de(Gie=>{"use strict";Object.defineProperty(Gie,"__esModule",{value:!0});Gie.default=c7t;function c7t(){}});var RGe=de(xq=>{"use strict";Object.defineProperty(xq,"__esModule",{value:!0});xq.default=void 0;var Xie=kGe(ue()),Mu=Qie(Hg()),u7t=Qie(kh()),Fc=yq(),A0=Wie(),Yie=T2(),A2=Qie(Kie());function Qie(e){return e&&e.__esModule?e:{default:e}}function kGe(e,t){if(typeof WeakMap=="function")var r=new WeakMap,n=new WeakMap;return(kGe=function(o,a){if(!a&&o&&o.__esModule)return o;var i,s,l={__proto__:null,default:o};if(o===null||typeof o!="object"&&typeof o!="function")return l;if(i=a?n:r){if(i.has(o))return i.get(o);i.set(o,l)}for(let c in o)c!=="default"&&{}.hasOwnProperty.call(o,c)&&((s=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(o,c))&&(s.get||s.set)?i(l,c,s):l[c]=o[c]);return l})(e,t)}function Tu(e,t,r){return(t=d7t(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function d7t(e){var t=f7t(e,"string");return typeof t=="symbol"?t:t+""}function f7t(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var nh={touch:{start:"touchstart",move:"touchmove",stop:"touchend"},mouse:{start:"mousedown",move:"mousemove",stop:"mouseup"}},L0=nh.mouse,DN=class extends Xie.Component{constructor(){super(...arguments),Tu(this,"dragging",!1),Tu(this,"lastX",NaN),Tu(this,"lastY",NaN),Tu(this,"touchIdentifier",null),Tu(this,"mounted",!1),Tu(this,"handleDragStart",t=>{if(this.props.onMouseDown(t),!this.props.allowAnyClick&&typeof t.button=="number"&&t.button!==0)return!1;let r=this.findDOMNode();if(!r||!r.ownerDocument||!r.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");let{ownerDocument:n}=r;if(this.props.disabled||!(t.target instanceof n.defaultView.Node)||this.props.handle&&!(0,Fc.matchesSelectorAndParentsTo)(t.target,this.props.handle,r)||this.props.cancel&&(0,Fc.matchesSelectorAndParentsTo)(t.target,this.props.cancel,r))return;t.type==="touchstart"&&!this.props.allowMobileScroll&&t.preventDefault();let o=(0,Fc.getTouchIdentifier)(t);this.touchIdentifier=o;let a=(0,A0.getControlPosition)(t,o,this);if(a==null)return;let{x:i,y:s}=a,l=(0,A0.createCoreData)(this,i,s);(0,A2.default)("DraggableCore: handleDragStart: %j",l),(0,A2.default)("calling",this.props.onStart),!(this.props.onStart(t,l)===!1||this.mounted===!1)&&(this.props.enableUserSelectHack&&(0,Fc.addUserSelectStyles)(n),this.dragging=!0,this.lastX=i,this.lastY=s,(0,Fc.addEvent)(n,L0.move,this.handleDrag),(0,Fc.addEvent)(n,L0.stop,this.handleDragStop))}),Tu(this,"handleDrag",t=>{let r=(0,A0.getControlPosition)(t,this.touchIdentifier,this);if(r==null)return;let{x:n,y:o}=r;if(Array.isArray(this.props.grid)){let s=n-this.lastX,l=o-this.lastY;if([s,l]=(0,A0.snapToGrid)(this.props.grid,s,l),!s&&!l)return;n=this.lastX+s,o=this.lastY+l}let a=(0,A0.createCoreData)(this,n,o);if((0,A2.default)("DraggableCore: handleDrag: %j",a),this.props.onDrag(t,a)===!1||this.mounted===!1){try{this.handleDragStop(new MouseEvent("mouseup"))}catch{let l=document.createEvent("MouseEvents");l.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(l)}return}this.lastX=n,this.lastY=o}),Tu(this,"handleDragStop",t=>{if(!this.dragging)return;let r=(0,A0.getControlPosition)(t,this.touchIdentifier,this);if(r==null)return;let{x:n,y:o}=r;if(Array.isArray(this.props.grid)){let l=n-this.lastX||0,c=o-this.lastY||0;[l,c]=(0,A0.snapToGrid)(this.props.grid,l,c),n=this.lastX+l,o=this.lastY+c}let a=(0,A0.createCoreData)(this,n,o);if(this.props.onStop(t,a)===!1||this.mounted===!1)return!1;let s=this.findDOMNode();s&&this.props.enableUserSelectHack&&(0,Fc.scheduleRemoveUserSelectStyles)(s.ownerDocument),(0,A2.default)("DraggableCore: handleDragStop: %j",a),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,s&&((0,A2.default)("DraggableCore: Removing handlers"),(0,Fc.removeEvent)(s.ownerDocument,L0.move,this.handleDrag),(0,Fc.removeEvent)(s.ownerDocument,L0.stop,this.handleDragStop))}),Tu(this,"onMouseDown",t=>(L0=nh.mouse,this.handleDragStart(t))),Tu(this,"onMouseUp",t=>(L0=nh.mouse,this.handleDragStop(t))),Tu(this,"onTouchStart",t=>(L0=nh.touch,this.handleDragStart(t))),Tu(this,"onTouchEnd",t=>(L0=nh.touch,this.handleDragStop(t)))}componentDidMount(){this.mounted=!0;let t=this.findDOMNode();t&&(0,Fc.addEvent)(t,nh.touch.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;let t=this.findDOMNode();if(t){let{ownerDocument:r}=t;(0,Fc.removeEvent)(r,nh.mouse.move,this.handleDrag),(0,Fc.removeEvent)(r,nh.touch.move,this.handleDrag),(0,Fc.removeEvent)(r,nh.mouse.stop,this.handleDragStop),(0,Fc.removeEvent)(r,nh.touch.stop,this.handleDragStop),(0,Fc.removeEvent)(t,nh.touch.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,Fc.scheduleRemoveUserSelectStyles)(r)}}findDOMNode(){return this.props?.nodeRef?this.props?.nodeRef?.current:u7t.default.findDOMNode(this)}render(){return Xie.cloneElement(Xie.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}};xq.default=DN;Tu(DN,"displayName","DraggableCore");Tu(DN,"propTypes",{allowAnyClick:Mu.default.bool,allowMobileScroll:Mu.default.bool,children:Mu.default.node.isRequired,disabled:Mu.default.bool,enableUserSelectHack:Mu.default.bool,offsetParent:function(e,t){if(e[t]&&e[t].nodeType!==1)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:Mu.default.arrayOf(Mu.default.number),handle:Mu.default.string,cancel:Mu.default.string,nodeRef:Mu.default.object,onStart:Mu.default.func,onDrag:Mu.default.func,onStop:Mu.default.func,onMouseDown:Mu.default.func,scale:Mu.default.number,className:Yie.dontSetMe,style:Yie.dontSetMe,transform:Yie.dontSetMe});Tu(DN,"defaultProps",{allowAnyClick:!1,allowMobileScroll:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1})});var TGe=de(L2=>{"use strict";Object.defineProperty(L2,"__esModule",{value:!0});Object.defineProperty(L2,"DraggableCore",{enumerable:!0,get:function(){return Cq.default}});L2.default=void 0;var bq=MGe(ue()),Ga=Sq(Hg()),p7t=Sq(kh()),m7t=R2(),NGe=yq(),ON=Wie(),Zie=T2(),Cq=Sq(RGe()),wq=Sq(Kie());function Sq(e){return e&&e.__esModule?e:{default:e}}function MGe(e,t){if(typeof WeakMap=="function")var r=new WeakMap,n=new WeakMap;return(MGe=function(o,a){if(!a&&o&&o.__esModule)return o;var i,s,l={__proto__:null,default:o};if(o===null||typeof o!="object"&&typeof o!="function")return l;if(i=a?n:r){if(i.has(o))return i.get(o);i.set(o,l)}for(let c in o)c!=="default"&&{}.hasOwnProperty.call(o,c)&&((s=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(o,c))&&(s.get||s.set)?i(l,c,s):l[c]=o[c]);return l})(e,t)}function Jie(){return Jie=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Jie.apply(null,arguments)}function _N(e,t,r){return(t=h7t(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function h7t(e){var t=g7t(e,"string");return typeof t=="symbol"?t:t+""}function g7t(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var FN=class extends bq.Component{static getDerivedStateFromProps(t,r){let{position:n}=t,{prevPropsPosition:o}=r;return n&&(!o||n.x!==o.x||n.y!==o.y)?((0,wq.default)("Draggable: getDerivedStateFromProps %j",{position:n,prevPropsPosition:o}),{x:n.x,y:n.y,prevPropsPosition:{...n}}):null}constructor(t){super(t),_N(this,"onDragStart",(r,n)=>{if((0,wq.default)("Draggable: onDragStart: %j",n),this.props.onStart(r,(0,ON.createDraggableData)(this,n))===!1)return!1;this.setState({dragging:!0,dragged:!0})}),_N(this,"onDrag",(r,n)=>{if(!this.state.dragging)return!1;(0,wq.default)("Draggable: onDrag: %j",n);let o=(0,ON.createDraggableData)(this,n),a={x:o.x,y:o.y,slackX:0,slackY:0};if(this.props.bounds){let{x:s,y:l}=a;a.x+=this.state.slackX,a.y+=this.state.slackY;let[c,u]=(0,ON.getBoundPosition)(this,a.x,a.y);a.x=c,a.y=u,a.slackX=this.state.slackX+(s-a.x),a.slackY=this.state.slackY+(l-a.y),o.x=a.x,o.y=a.y,o.deltaX=a.x-this.state.x,o.deltaY=a.y-this.state.y}if(this.props.onDrag(r,o)===!1)return!1;this.setState(a)}),_N(this,"onDragStop",(r,n)=>{if(!this.state.dragging||this.props.onStop(r,(0,ON.createDraggableData)(this,n))===!1)return!1;(0,wq.default)("Draggable: onDragStop: %j",n);let a={dragging:!1,slackX:0,slackY:0};if(!!this.props.position){let{x:s,y:l}=this.props.position;a.x=s,a.y=l}this.setState(a)}),this.state={dragging:!1,dragged:!1,x:t.position?t.position.x:t.defaultPosition.x,y:t.position?t.position.y:t.defaultPosition.y,prevPropsPosition:{...t.position},slackX:0,slackY:0,isElementSVG:!1},t.position&&!(t.onDrag||t.onStop)&&console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}componentDidMount(){typeof window.SVGElement<"u"&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.state.dragging&&this.setState({dragging:!1})}findDOMNode(){return this.props?.nodeRef?.current??p7t.default.findDOMNode(this)}render(){let{axis:t,bounds:r,children:n,defaultPosition:o,defaultClassName:a,defaultClassNameDragging:i,defaultClassNameDragged:s,position:l,positionOffset:c,scale:u,...d}=this.props,f={},p=null,h=!!!l||this.state.dragging,g=l||o,v={x:(0,ON.canDragX)(this)&&h?this.state.x:g.x,y:(0,ON.canDragY)(this)&&h?this.state.y:g.y};this.state.isElementSVG?p=(0,NGe.createSVGTransform)(v,c):f=(0,NGe.createCSSTransform)(v,c);let y=(0,m7t.clsx)(n.props.className||"",a,{[i]:this.state.dragging,[s]:this.state.dragged});return bq.createElement(Cq.default,Jie({},d,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),bq.cloneElement(bq.Children.only(n),{className:y,style:{...n.props.style,...f},transform:p}))}};L2.default=FN;_N(FN,"displayName","Draggable");_N(FN,"propTypes",{...Cq.default.propTypes,axis:Ga.default.oneOf(["both","x","y","none"]),bounds:Ga.default.oneOfType([Ga.default.shape({left:Ga.default.number,right:Ga.default.number,top:Ga.default.number,bottom:Ga.default.number}),Ga.default.string,Ga.default.oneOf([!1])]),defaultClassName:Ga.default.string,defaultClassNameDragging:Ga.default.string,defaultClassNameDragged:Ga.default.string,defaultPosition:Ga.default.shape({x:Ga.default.number,y:Ga.default.number}),positionOffset:Ga.default.shape({x:Ga.default.oneOfType([Ga.default.number,Ga.default.string]),y:Ga.default.oneOfType([Ga.default.number,Ga.default.string])}),position:Ga.default.shape({x:Ga.default.number,y:Ga.default.number}),className:Zie.dontSetMe,style:Zie.dontSetMe,transform:Zie.dontSetMe});_N(FN,"defaultProps",{...Cq.default.defaultProps,axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1})});var Iq=de((hSn,Pq)=>{"use strict";var{default:AGe,DraggableCore:v7t}=TGe();Pq.exports=AGe;Pq.exports.default=AGe;Pq.exports.DraggableCore=v7t});var DGe=de(ese=>{"use strict";ese.__esModule=!0;ese.cloneElement=S7t;var y7t=x7t(ue());function x7t(e){return e&&e.__esModule?e:{default:e}}function LGe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function EGe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?LGe(Object(r),!0).forEach(function(n){b7t(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):LGe(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function b7t(e,t,r){return t=w7t(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function w7t(e){var t=C7t(e,"string");return typeof t=="symbol"?t:String(t)}function C7t(e,t){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function S7t(e,t){return t.style&&e.props.style&&(t.style=EGe(EGe({},e.props.style),t.style)),t.className&&e.props.className&&(t.className=e.props.className+" "+t.className),y7t.default.cloneElement(e,t)}});var tse=de(kq=>{"use strict";kq.__esModule=!0;kq.resizableProps=void 0;var cn=P7t(Hg()),vSn=Iq();function P7t(e){return e&&e.__esModule?e:{default:e}}var I7t={axis:cn.default.oneOf(["both","x","y","none"]),className:cn.default.string,children:cn.default.element.isRequired,draggableOpts:cn.default.shape({allowAnyClick:cn.default.bool,cancel:cn.default.string,children:cn.default.node,disabled:cn.default.bool,enableUserSelectHack:cn.default.bool,offsetParent:cn.default.node,grid:cn.default.arrayOf(cn.default.number),handle:cn.default.string,nodeRef:cn.default.object,onStart:cn.default.func,onDrag:cn.default.func,onStop:cn.default.func,onMouseDown:cn.default.func,scale:cn.default.number}),height:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var o=r[0];if(o.axis==="both"||o.axis==="y"){var a;return(a=cn.default.number).isRequired.apply(a,r)}return cn.default.number.apply(cn.default,r)},handle:cn.default.oneOfType([cn.default.node,cn.default.func]),handleSize:cn.default.arrayOf(cn.default.number),lockAspectRatio:cn.default.bool,maxConstraints:cn.default.arrayOf(cn.default.number),minConstraints:cn.default.arrayOf(cn.default.number),onResizeStop:cn.default.func,onResizeStart:cn.default.func,onResize:cn.default.func,resizeHandles:cn.default.arrayOf(cn.default.oneOf(["s","w","e","n","sw","nw","se","ne"])),transformScale:cn.default.number,width:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var o=r[0];if(o.axis==="both"||o.axis==="x"){var a;return(a=cn.default.number).isRequired.apply(a,r)}return cn.default.number.apply(cn.default,r)}};kq.resizableProps=I7t});var ise=de(Rq=>{"use strict";Rq.__esModule=!0;Rq.default=void 0;var E2=T7t(ue()),k7t=Iq(),R7t=DGe(),N7t=tse(),M7t=["children","className","draggableOpts","width","height","handle","handleSize","lockAspectRatio","axis","minConstraints","maxConstraints","onResize","onResizeStop","onResizeStart","resizeHandles","transformScale"];function _Ge(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,r=new WeakMap;return(_Ge=function(o){return o?r:t})(e)}function T7t(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var r=_Ge(t);if(r&&r.has(e))return r.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(a!=="default"&&Object.prototype.hasOwnProperty.call(e,a)){var i=o?Object.getOwnPropertyDescriptor(e,a):null;i&&(i.get||i.set)?Object.defineProperty(n,a,i):n[a]=e[a]}return n.default=e,r&&r.set(e,n),n}function nse(){return nse=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},nse.apply(this,arguments)}function A7t(e,t){if(e==null)return{};var r={},n=Object.keys(e),o,a;for(a=0;a<n.length;a++)o=n[a],!(t.indexOf(o)>=0)&&(r[o]=e[o]);return r}function OGe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function rse(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?OGe(Object(r),!0).forEach(function(n){L7t(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):OGe(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function L7t(e,t,r){return t=E7t(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function E7t(e){var t=D7t(e,"string");return typeof t=="symbol"?t:String(t)}function D7t(e,t){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function O7t(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,ose(e,t)}function ose(e,t){return ose=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},ose(e,t)}var ase=function(e){O7t(t,e);function t(){for(var n,o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return n=e.call.apply(e,[this].concat(a))||this,n.handleRefs={},n.lastHandleRect=null,n.slack=null,n}var r=t.prototype;return r.componentWillUnmount=function(){this.resetData()},r.resetData=function(){this.lastHandleRect=this.slack=null},r.runConstraints=function(o,a){var i=this.props,s=i.minConstraints,l=i.maxConstraints,c=i.lockAspectRatio;if(!s&&!l&&!c)return[o,a];if(c){var u=this.props.width/this.props.height,d=o-this.props.width,f=a-this.props.height;Math.abs(d)>Math.abs(f*u)?a=o/u:o=a*u}var p=o,m=a,h=this.slack||[0,0],g=h[0],v=h[1];return o+=g,a+=v,s&&(o=Math.max(s[0],o),a=Math.max(s[1],a)),l&&(o=Math.min(l[0],o),a=Math.min(l[1],a)),this.slack=[g+(p-o),v+(m-a)],[o,a]},r.resizeHandler=function(o,a){var i=this;return function(s,l){var c=l.node,u=l.deltaX,d=l.deltaY;o==="onResizeStart"&&i.resetData();var f=(i.props.axis==="both"||i.props.axis==="x")&&a!=="n"&&a!=="s",p=(i.props.axis==="both"||i.props.axis==="y")&&a!=="e"&&a!=="w";if(!(!f&&!p)){var m=a[0],h=a[a.length-1],g=c.getBoundingClientRect();if(i.lastHandleRect!=null){if(h==="w"){var v=g.left-i.lastHandleRect.left;u+=v}if(m==="n"){var y=g.top-i.lastHandleRect.top;d+=y}}i.lastHandleRect=g,h==="w"&&(u=-u),m==="n"&&(d=-d);var x=i.props.width+(f?u/i.props.transformScale:0),w=i.props.height+(p?d/i.props.transformScale:0),b=i.runConstraints(x,w);x=b[0],w=b[1];var C=x!==i.props.width||w!==i.props.height,S=typeof i.props[o]=="function"?i.props[o]:null,P=o==="onResize"&&!C;S&&!P&&(s.persist==null||s.persist(),S(s,{node:c,size:{width:x,height:w},handle:a})),o==="onResizeStop"&&i.resetData()}}},r.renderResizeHandle=function(o,a){var i=this.props.handle;if(!i)return E2.createElement("span",{className:"react-resizable-handle react-resizable-handle-"+o,ref:a});if(typeof i=="function")return i(o,a);var s=typeof i.type=="string",l=rse({ref:a},s?{}:{handleAxis:o});return E2.cloneElement(i,l)},r.render=function(){var o=this,a=this.props,i=a.children,s=a.className,l=a.draggableOpts,c=a.width,u=a.height,d=a.handle,f=a.handleSize,p=a.lockAspectRatio,m=a.axis,h=a.minConstraints,g=a.maxConstraints,v=a.onResize,y=a.onResizeStop,x=a.onResizeStart,w=a.resizeHandles,b=a.transformScale,C=A7t(a,M7t);return(0,R7t.cloneElement)(i,rse(rse({},C),{},{className:(s?s+" ":"")+"react-resizable",children:[].concat(i.props.children,w.map(function(S){var P,N=(P=o.handleRefs[S])!=null?P:o.handleRefs[S]=E2.createRef();return E2.createElement(k7t.DraggableCore,nse({},l,{nodeRef:N,key:"resizableHandle-"+S,onStop:o.resizeHandler("onResizeStop",S),onStart:o.resizeHandler("onResizeStart",S),onDrag:o.resizeHandler("onResize",S)}),o.renderResizeHandle(S,N))}))}))},t}(E2.Component);Rq.default=ase;ase.propTypes=N7t.resizableProps;ase.defaultProps={axis:"both",handleSize:[20,20],lockAspectRatio:!1,minConstraints:[20,20],maxConstraints:[1/0,1/0],resizeHandles:["se"],transformScale:1}});var zGe=de(Mq=>{"use strict";Mq.__esModule=!0;Mq.default=void 0;var sse=U7t(ue()),_7t=BGe(Hg()),F7t=BGe(ise()),B7t=tse(),V7t=["handle","handleSize","onResize","onResizeStart","onResizeStop","draggableOpts","minConstraints","maxConstraints","lockAspectRatio","axis","width","height","resizeHandles","style","transformScale"];function BGe(e){return e&&e.__esModule?e:{default:e}}function VGe(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,r=new WeakMap;return(VGe=function(o){return o?r:t})(e)}function U7t(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var r=VGe(t);if(r&&r.has(e))return r.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(a!=="default"&&Object.prototype.hasOwnProperty.call(e,a)){var i=o?Object.getOwnPropertyDescriptor(e,a):null;i&&(i.get||i.set)?Object.defineProperty(n,a,i):n[a]=e[a]}return n.default=e,r&&r.set(e,n),n}function lse(){return lse=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},lse.apply(this,arguments)}function FGe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Nq(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?FGe(Object(r),!0).forEach(function(n){z7t(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):FGe(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function z7t(e,t,r){return t=H7t(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function H7t(e){var t=j7t(e,"string");return typeof t=="symbol"?t:String(t)}function j7t(e,t){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function $7t(e,t){if(e==null)return{};var r={},n=Object.keys(e),o,a;for(a=0;a<n.length;a++)o=n[a],!(t.indexOf(o)>=0)&&(r[o]=e[o]);return r}function q7t(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,cse(e,t)}function cse(e,t){return cse=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},cse(e,t)}var UGe=function(e){q7t(t,e);function t(){for(var n,o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return n=e.call.apply(e,[this].concat(a))||this,n.state={width:n.props.width,height:n.props.height,propsWidth:n.props.width,propsHeight:n.props.height},n.onResize=function(s,l){var c=l.size;n.props.onResize?(s.persist==null||s.persist(),n.setState(c,function(){return n.props.onResize&&n.props.onResize(s,l)})):n.setState(c)},n}t.getDerivedStateFromProps=function(o,a){return a.propsWidth!==o.width||a.propsHeight!==o.height?{width:o.width,height:o.height,propsWidth:o.width,propsHeight:o.height}:null};var r=t.prototype;return r.render=function(){var o=this.props,a=o.handle,i=o.handleSize,s=o.onResize,l=o.onResizeStart,c=o.onResizeStop,u=o.draggableOpts,d=o.minConstraints,f=o.maxConstraints,p=o.lockAspectRatio,m=o.axis,h=o.width,g=o.height,v=o.resizeHandles,y=o.style,x=o.transformScale,w=$7t(o,V7t);return sse.createElement(F7t.default,{axis:m,draggableOpts:u,handle:a,handleSize:i,height:this.state.height,lockAspectRatio:p,maxConstraints:f,minConstraints:d,onResizeStart:l,onResize:this.onResize,onResizeStop:c,resizeHandles:v,transformScale:x,width:this.state.width},sse.createElement("div",lse({},w,{style:Nq(Nq({},y),{},{width:this.state.width+"px",height:this.state.height+"px"})})))},t}(sse.Component);Mq.default=UGe;UGe.propTypes=Nq(Nq({},B7t.resizableProps),{},{children:_7t.default.element})});var HGe=de((wSn,Tq)=>{"use strict";Tq.exports=function(){throw new Error("Don't instantiate Resizable directly! Use require('react-resizable').Resizable")};Tq.exports.Resizable=ise().default;Tq.exports.ResizableBox=zGe().default});var use=de(E0=>{"use strict";Object.defineProperty(E0,"__esModule",{value:!0});E0.resizeHandleType=E0.resizeHandleAxesType=E0.default=void 0;var vn=jGe(Hg()),W7t=jGe(ue());function jGe(e){return e&&e.__esModule?e:{default:e}}var G7t=E0.resizeHandleAxesType=vn.default.arrayOf(vn.default.oneOf(["s","w","e","n","sw","nw","se","ne"])),K7t=E0.resizeHandleType=vn.default.oneOfType([vn.default.node,vn.default.func]),CSn=E0.default={className:vn.default.string,style:vn.default.object,width:vn.default.number,autoSize:vn.default.bool,cols:vn.default.number,draggableCancel:vn.default.string,draggableHandle:vn.default.string,verticalCompact:function(e){e.verticalCompact},compactType:vn.default.oneOf(["vertical","horizontal"]),layout:function(e){var t=e.layout;t!==void 0&&e1().validateLayout(t,"layout")},margin:vn.default.arrayOf(vn.default.number),containerPadding:vn.default.arrayOf(vn.default.number),rowHeight:vn.default.number,maxRows:vn.default.number,isBounded:vn.default.bool,isDraggable:vn.default.bool,isResizable:vn.default.bool,allowOverlap:vn.default.bool,preventCollision:vn.default.bool,useCSSTransforms:vn.default.bool,transformScale:vn.default.number,isDroppable:vn.default.bool,resizeHandles:G7t,resizeHandle:K7t,onLayoutChange:vn.default.func,onDragStart:vn.default.func,onDrag:vn.default.func,onDragStop:vn.default.func,onResizeStart:vn.default.func,onResize:vn.default.func,onResizeStop:vn.default.func,onDrop:vn.default.func,droppingItem:vn.default.shape({i:vn.default.string.isRequired,w:vn.default.number.isRequired,h:vn.default.number.isRequired}),children:function(e,t){let r=e[t],n={};W7t.default.Children.forEach(r,function(o){if(o?.key!=null){if(n[o.key])throw new Error('Duplicate child key "'+o.key+'" found! This will cause problems in ReactGridLayout.');n[o.key]=!0}})},innerRef:vn.default.any}});var WGe=de(Aq=>{"use strict";Object.defineProperty(Aq,"__esModule",{value:!0});Aq.default=void 0;var BN=dse(ue()),$Ge=kh(),Po=dse(Hg()),X7t=Iq(),Y7t=HGe(),VN=e1(),oc=gq(),qGe=use(),Q7t=dse(R2());function dse(e){return e&&e.__esModule?e:{default:e}}function Kg(e,t,r){return(t=Z7t(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Z7t(e){var t=J7t(e,"string");return typeof t=="symbol"?t:t+""}function J7t(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var D2=class extends BN.default.Component{constructor(){super(...arguments),Kg(this,"state",{resizing:null,dragging:null,className:""}),Kg(this,"elementRef",BN.default.createRef()),Kg(this,"onDragStart",(t,r)=>{let{node:n}=r,{onDragStart:o,transformScale:a}=this.props;if(!o)return;let i={top:0,left:0},{offsetParent:s}=n;if(!s)return;let l=s.getBoundingClientRect(),c=n.getBoundingClientRect(),u=c.left/a,d=l.left/a,f=c.top/a,p=l.top/a;i.left=u-d+s.scrollLeft,i.top=f-p+s.scrollTop,this.setState({dragging:i});let{x:m,y:h}=(0,oc.calcXY)(this.getPositionParams(),i.top,i.left,this.props.w,this.props.h);return o.call(this,this.props.i,m,h,{e:t,node:n,newPosition:i})}),Kg(this,"onDrag",(t,r,n)=>{let{node:o,deltaX:a,deltaY:i}=r,{onDrag:s}=this.props;if(!s)return;if(!this.state.dragging)throw new Error("onDrag called before onDragStart.");let l=this.state.dragging.top+i,c=this.state.dragging.left+a,{isBounded:u,i:d,w:f,h:p,containerWidth:m}=this.props,h=this.getPositionParams();if(u){let{offsetParent:x}=o;if(x){let{margin:w,rowHeight:b}=this.props,C=x.clientHeight-(0,oc.calcGridItemWHPx)(p,b,w[1]);l=(0,oc.clamp)(l,0,C);let S=(0,oc.calcGridColWidth)(h),P=m-(0,oc.calcGridItemWHPx)(f,S,w[0]);c=(0,oc.clamp)(c,0,P)}}let g={top:l,left:c};n?this.setState({dragging:g}):(0,$Ge.flushSync)(()=>{this.setState({dragging:g})});let{x:v,y}=(0,oc.calcXY)(h,l,c,f,p);return s.call(this,d,v,y,{e:t,node:o,newPosition:g})}),Kg(this,"onDragStop",(t,r)=>{let{node:n}=r,{onDragStop:o}=this.props;if(!o)return;if(!this.state.dragging)throw new Error("onDragEnd called before onDragStart.");let{w:a,h:i,i:s}=this.props,{left:l,top:c}=this.state.dragging,u={top:c,left:l};this.setState({dragging:null});let{x:d,y:f}=(0,oc.calcXY)(this.getPositionParams(),c,l,a,i);return o.call(this,s,d,f,{e:t,node:n,newPosition:u})}),Kg(this,"onResizeStop",(t,r,n)=>this.onResizeHandler(t,r,n,"onResizeStop")),Kg(this,"onResizeStart",(t,r,n)=>this.onResizeHandler(t,r,n,"onResizeStart")),Kg(this,"onResize",(t,r,n)=>this.onResizeHandler(t,r,n,"onResize"))}shouldComponentUpdate(t,r){if(this.props.children!==t.children||this.props.droppingPosition!==t.droppingPosition)return!0;let n=(0,oc.calcGridItemPosition)(this.getPositionParams(this.props),this.props.x,this.props.y,this.props.w,this.props.h,this.state),o=(0,oc.calcGridItemPosition)(this.getPositionParams(t),t.x,t.y,t.w,t.h,r);return!(0,VN.fastPositionEqual)(n,o)||this.props.useCSSTransforms!==t.useCSSTransforms}componentDidMount(){this.moveDroppingItem({})}componentDidUpdate(t){this.moveDroppingItem(t)}moveDroppingItem(t){let{droppingPosition:r}=this.props;if(!r)return;let n=this.elementRef.current;if(!n)return;let o=t.droppingPosition||{left:0,top:0},{dragging:a}=this.state,i=a&&r.left!==o.left||r.top!==o.top;if(!a)this.onDragStart(r.e,{node:n,deltaX:r.left,deltaY:r.top});else if(i){let s=r.left-a.left,l=r.top-a.top;this.onDrag(r.e,{node:n,deltaX:s,deltaY:l},!0)}}getPositionParams(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props;return{cols:t.cols,containerPadding:t.containerPadding,containerWidth:t.containerWidth,margin:t.margin,maxRows:t.maxRows,rowHeight:t.rowHeight}}createStyle(t){let{usePercentages:r,containerWidth:n,useCSSTransforms:o}=this.props,a;return o?a=(0,VN.setTransform)(t):(a=(0,VN.setTopLeft)(t),r&&(a.left=(0,VN.perc)(t.left/n),a.width=(0,VN.perc)(t.width/n))),a}mixinDraggable(t,r){return BN.default.createElement(X7t.DraggableCore,{disabled:!r,onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop,handle:this.props.handle,cancel:".react-resizable-handle"+(this.props.cancel?","+this.props.cancel:""),scale:this.props.transformScale,nodeRef:this.elementRef},t)}curryResizeHandler(t,r){return(n,o)=>r(n,o,t)}mixinResizable(t,r,n){let{cols:o,minW:a,minH:i,maxW:s,maxH:l,transformScale:c,resizeHandles:u,resizeHandle:d}=this.props,f=this.getPositionParams(),p=(0,oc.calcGridItemPosition)(f,0,0,o,0).width,m=(0,oc.calcGridItemPosition)(f,0,0,a,i),h=(0,oc.calcGridItemPosition)(f,0,0,s,l),g=[m.width,m.height],v=[Math.min(h.width,p),Math.min(h.height,1/0)];return BN.default.createElement(Y7t.Resizable,{draggableOpts:{disabled:!n},className:n?void 0:"react-resizable-hide",width:r.width,height:r.height,minConstraints:g,maxConstraints:v,onResizeStop:this.curryResizeHandler(r,this.onResizeStop),onResizeStart:this.curryResizeHandler(r,this.onResizeStart),onResize:this.curryResizeHandler(r,this.onResize),transformScale:c,resizeHandles:u,handle:d},t)}onResizeHandler(t,r,n,o){let{node:a,size:i,handle:s}=r,l=this.props[o];if(!l)return;let{x:c,y:u,i:d,maxH:f,minH:p,containerWidth:m}=this.props,{minW:h,maxW:g}=this.props,v=i;a&&(v=(0,VN.resizeItemInDirection)(s,n,i,m),(0,$Ge.flushSync)(()=>{this.setState({resizing:o==="onResizeStop"?null:v})}));let{w:y,h:x}=(0,oc.calcWH)(this.getPositionParams(),v.width,v.height,c,u,s);y=(0,oc.clamp)(y,Math.max(h,1),g),x=(0,oc.clamp)(x,p,f),l.call(this,d,y,x,{e:t,node:a,size:v,handle:s})}render(){let{x:t,y:r,w:n,h:o,isDraggable:a,isResizable:i,droppingPosition:s,useCSSTransforms:l}=this.props,c=(0,oc.calcGridItemPosition)(this.getPositionParams(),t,r,n,o,this.state),u=BN.default.Children.only(this.props.children),d=BN.default.cloneElement(u,{ref:this.elementRef,className:(0,Q7t.default)("react-grid-item",u.props.className,this.props.className,{static:this.props.static,resizing:!!this.state.resizing,"react-draggable":a,"react-draggable-dragging":!!this.state.dragging,dropping:!!s,cssTransforms:l}),style:{...this.props.style,...u.props.style,...this.createStyle(c)}});return d=this.mixinResizable(d,c,i),d=this.mixinDraggable(d,a),d}};Aq.default=D2;Kg(D2,"propTypes",{children:Po.default.element,cols:Po.default.number.isRequired,containerWidth:Po.default.number.isRequired,rowHeight:Po.default.number.isRequired,margin:Po.default.array.isRequired,maxRows:Po.default.number.isRequired,containerPadding:Po.default.array.isRequired,x:Po.default.number.isRequired,y:Po.default.number.isRequired,w:Po.default.number.isRequired,h:Po.default.number.isRequired,minW:function(e,t){let r=e[t];if(typeof r!="number")return new Error("minWidth not Number");if(r>e.w||r>e.maxW)return new Error("minWidth larger than item width/maxWidth")},maxW:function(e,t){let r=e[t];if(typeof r!="number")return new Error("maxWidth not Number");if(r<e.w||r<e.minW)return new Error("maxWidth smaller than item width/minWidth")},minH:function(e,t){let r=e[t];if(typeof r!="number")return new Error("minHeight not Number");if(r>e.h||r>e.maxH)return new Error("minHeight larger than item height/maxHeight")},maxH:function(e,t){let r=e[t];if(typeof r!="number")return new Error("maxHeight not Number");if(r<e.h||r<e.minH)return new Error("maxHeight smaller than item height/minHeight")},i:Po.default.string.isRequired,resizeHandles:qGe.resizeHandleAxesType,resizeHandle:qGe.resizeHandleType,onDragStop:Po.default.func,onDragStart:Po.default.func,onDrag:Po.default.func,onResizeStop:Po.default.func,onResizeStart:Po.default.func,onResize:Po.default.func,isDraggable:Po.default.bool.isRequired,isResizable:Po.default.bool.isRequired,isBounded:Po.default.bool.isRequired,static:Po.default.bool,useCSSTransforms:Po.default.bool.isRequired,transformScale:Po.default.number,className:Po.default.string,handle:Po.default.string,cancel:Po.default.string,droppingPosition:Po.default.shape({e:Po.default.object.isRequired,left:Po.default.number.isRequired,top:Po.default.number.isRequired})});Kg(D2,"defaultProps",{className:"",cancel:"",handle:"",minH:1,minW:1,maxH:1/0,maxW:1/0,transformScale:1})});var mse=de(Lq=>{"use strict";Object.defineProperty(Lq,"__esModule",{value:!0});Lq.default=void 0;var o1=XGe(ue()),fse=fq(),eXt=pse(R2()),Vr=e1(),tXt=gq(),GGe=pse(WGe()),rXt=pse(use());function pse(e){return e&&e.__esModule?e:{default:e}}function XGe(e,t){if(typeof WeakMap=="function")var r=new WeakMap,n=new WeakMap;return(XGe=function(o,a){if(!a&&o&&o.__esModule)return o;var i,s,l={__proto__:null,default:o};if(o===null||typeof o!="object"&&typeof o!="function")return l;if(i=a?n:r){if(i.has(o))return i.get(o);i.set(o,l)}for(let c in o)c!=="default"&&{}.hasOwnProperty.call(o,c)&&((s=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(o,c))&&(s.get||s.set)?i(l,c,s):l[c]=o[c]);return l})(e,t)}function Bc(e,t,r){return(t=nXt(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function nXt(e){var t=oXt(e,"string");return typeof t=="symbol"?t:t+""}function oXt(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var KGe="react-grid-layout",YGe=!1;try{YGe=/firefox/i.test(navigator.userAgent)}catch{}var UN=class extends o1.Component{constructor(){super(...arguments),Bc(this,"state",{activeDrag:null,layout:(0,Vr.synchronizeLayoutWithChildren)(this.props.layout,this.props.children,this.props.cols,(0,Vr.compactType)(this.props),this.props.allowOverlap),mounted:!1,oldDragItem:null,oldLayout:null,oldResizeItem:null,resizing:!1,droppingDOMNode:null,children:[]}),Bc(this,"dragEnterCounter",0),Bc(this,"onDragStart",(t,r,n,o)=>{let{e:a,node:i}=o,{layout:s}=this.state,l=(0,Vr.getLayoutItem)(s,t);if(!l)return;let c={w:l.w,h:l.h,x:l.x,y:l.y,placeholder:!0,i:t};return this.setState({oldDragItem:(0,Vr.cloneLayoutItem)(l),oldLayout:s,activeDrag:c}),this.props.onDragStart(s,l,l,null,a,i)}),Bc(this,"onDrag",(t,r,n,o)=>{let{e:a,node:i}=o,{oldDragItem:s}=this.state,{layout:l}=this.state,{cols:c,allowOverlap:u,preventCollision:d}=this.props,f=(0,Vr.getLayoutItem)(l,t);if(!f)return;let p={w:f.w,h:f.h,x:f.x,y:f.y,placeholder:!0,i:t},m=!0;l=(0,Vr.moveElement)(l,f,r,n,m,d,(0,Vr.compactType)(this.props),c,u),this.props.onDrag(l,s,f,p,a,i),this.setState({layout:u?l:(0,Vr.compact)(l,(0,Vr.compactType)(this.props),c),activeDrag:p})}),Bc(this,"onDragStop",(t,r,n,o)=>{let{e:a,node:i}=o;if(!this.state.activeDrag)return;let{oldDragItem:s}=this.state,{layout:l}=this.state,{cols:c,preventCollision:u,allowOverlap:d}=this.props,f=(0,Vr.getLayoutItem)(l,t);if(!f)return;let p=!0;l=(0,Vr.moveElement)(l,f,r,n,p,u,(0,Vr.compactType)(this.props),c,d);let m=d?l:(0,Vr.compact)(l,(0,Vr.compactType)(this.props),c);this.props.onDragStop(m,s,f,null,a,i);let{oldLayout:h}=this.state;this.setState({activeDrag:null,layout:m,oldDragItem:null,oldLayout:null}),this.onLayoutMaybeChanged(m,h)}),Bc(this,"onResizeStart",(t,r,n,o)=>{let{e:a,node:i}=o,{layout:s}=this.state,l=(0,Vr.getLayoutItem)(s,t);l&&(this.setState({oldResizeItem:(0,Vr.cloneLayoutItem)(l),oldLayout:this.state.layout,resizing:!0}),this.props.onResizeStart(s,l,l,null,a,i))}),Bc(this,"onResize",(t,r,n,o)=>{let{e:a,node:i,size:s,handle:l}=o,{oldResizeItem:c}=this.state,{layout:u}=this.state,{cols:d,preventCollision:f,allowOverlap:p}=this.props,m=!1,h,g,v,[y,x]=(0,Vr.withLayoutItem)(u,t,b=>{let C;return g=b.x,v=b.y,["sw","w","nw","n","ne"].indexOf(l)!==-1&&(["sw","nw","w"].indexOf(l)!==-1&&(g=b.x+(b.w-r),r=b.x!==g&&g<0?b.w:r,g=g<0?0:g),["ne","n","nw"].indexOf(l)!==-1&&(v=b.y+(b.h-n),n=b.y!==v&&v<0?b.h:n,v=v<0?0:v),m=!0),f&&!p&&(C=(0,Vr.getAllCollisions)(u,{...b,w:r,h:n,x:g,y:v}).filter(P=>P.i!==b.i).length>0,C&&(v=b.y,n=b.h,g=b.x,r=b.w,m=!1)),b.w=r,b.h=n,b});if(!x)return;h=y,m&&(h=(0,Vr.moveElement)(y,x,g,v,!0,this.props.preventCollision,(0,Vr.compactType)(this.props),d,p));let w={w:x.w,h:x.h,x:x.x,y:x.y,static:!0,i:t};this.props.onResize(h,c,x,w,a,i),this.setState({layout:p?h:(0,Vr.compact)(h,(0,Vr.compactType)(this.props),d),activeDrag:w})}),Bc(this,"onResizeStop",(t,r,n,o)=>{let{e:a,node:i}=o,{layout:s,oldResizeItem:l}=this.state,{cols:c,allowOverlap:u}=this.props,d=(0,Vr.getLayoutItem)(s,t),f=u?s:(0,Vr.compact)(s,(0,Vr.compactType)(this.props),c);this.props.onResizeStop(f,l,d,null,a,i);let{oldLayout:p}=this.state;this.setState({activeDrag:null,layout:f,oldResizeItem:null,oldLayout:null,resizing:!1}),this.onLayoutMaybeChanged(f,p)}),Bc(this,"onDragOver",t=>{if(t.preventDefault(),t.stopPropagation(),YGe&&!t.nativeEvent.target?.classList.contains(KGe))return!1;let{droppingItem:r,onDropDragOver:n,margin:o,cols:a,rowHeight:i,maxRows:s,width:l,containerPadding:c,transformScale:u}=this.props,d=n?.(t);if(d===!1)return this.state.droppingDOMNode&&this.removeDroppingPlaceholder(),!1;let f={...r,...d},{layout:p}=this.state,m=t.currentTarget.getBoundingClientRect(),h=t.clientX-m.left,g=t.clientY-m.top,v={left:h/u,top:g/u,e:t};if(this.state.droppingDOMNode){if(this.state.droppingPosition){let{left:y,top:x}=this.state.droppingPosition;(y!=h||x!=g)&&this.setState({droppingPosition:v})}}else{let y={cols:a,margin:o,maxRows:s,rowHeight:i,containerWidth:l,containerPadding:c||o},x=(0,tXt.calcXY)(y,g,h,f.w,f.h);this.setState({droppingDOMNode:o1.createElement("div",{key:f.i}),droppingPosition:v,layout:[...p,{...f,x:x.x,y:x.y,static:!1,isDraggable:!0}]})}}),Bc(this,"removeDroppingPlaceholder",()=>{let{droppingItem:t,cols:r}=this.props,{layout:n}=this.state,o=(0,Vr.compact)(n.filter(a=>a.i!==t.i),(0,Vr.compactType)(this.props),r,this.props.allowOverlap);this.setState({layout:o,droppingDOMNode:null,activeDrag:null,droppingPosition:void 0})}),Bc(this,"onDragLeave",t=>{t.preventDefault(),t.stopPropagation(),this.dragEnterCounter--,this.dragEnterCounter===0&&this.removeDroppingPlaceholder()}),Bc(this,"onDragEnter",t=>{t.preventDefault(),t.stopPropagation(),this.dragEnterCounter++}),Bc(this,"onDrop",t=>{t.preventDefault(),t.stopPropagation();let{droppingItem:r}=this.props,{layout:n}=this.state,o=n.find(a=>a.i===r.i);this.dragEnterCounter=0,this.removeDroppingPlaceholder(),this.props.onDrop(n,o,t)})}componentDidMount(){this.setState({mounted:!0}),this.onLayoutMaybeChanged(this.state.layout,this.props.layout)}static getDerivedStateFromProps(t,r){let n;return r.activeDrag?null:(!(0,fse.deepEqual)(t.layout,r.propsLayout)||t.compactType!==r.compactType?n=t.layout:(0,Vr.childrenEqual)(t.children,r.children)||(n=r.layout),n?{layout:(0,Vr.synchronizeLayoutWithChildren)(n,t.children,t.cols,(0,Vr.compactType)(t),t.allowOverlap),compactType:t.compactType,children:t.children,propsLayout:t.layout}:null)}shouldComponentUpdate(t,r){return this.props.children!==t.children||!(0,Vr.fastRGLPropsEqual)(this.props,t,fse.deepEqual)||this.state.activeDrag!==r.activeDrag||this.state.mounted!==r.mounted||this.state.droppingPosition!==r.droppingPosition}componentDidUpdate(t,r){if(!this.state.activeDrag){let n=this.state.layout,o=r.layout;this.onLayoutMaybeChanged(n,o)}}containerHeight(){if(!this.props.autoSize)return;let t=(0,Vr.bottom)(this.state.layout),r=this.props.containerPadding?this.props.containerPadding[1]:this.props.margin[1];return t*this.props.rowHeight+(t-1)*this.props.margin[1]+r*2+"px"}onLayoutMaybeChanged(t,r){r||(r=this.state.layout),(0,fse.deepEqual)(r,t)||this.props.onLayoutChange(t)}placeholder(){let{activeDrag:t}=this.state;if(!t)return null;let{width:r,cols:n,margin:o,containerPadding:a,rowHeight:i,maxRows:s,useCSSTransforms:l,transformScale:c}=this.props;return o1.createElement(GGe.default,{w:t.w,h:t.h,x:t.x,y:t.y,i:t.i,className:`react-grid-placeholder ${this.state.resizing?"placeholder-resizing":""}`,containerWidth:r,cols:n,margin:o,containerPadding:a||o,maxRows:s,rowHeight:i,isDraggable:!1,isResizable:!1,isBounded:!1,useCSSTransforms:l,transformScale:c},o1.createElement("div",null))}processGridItem(t,r){if(!t||!t.key)return;let n=(0,Vr.getLayoutItem)(this.state.layout,String(t.key));if(!n)return null;let{width:o,cols:a,margin:i,containerPadding:s,rowHeight:l,maxRows:c,isDraggable:u,isResizable:d,isBounded:f,useCSSTransforms:p,transformScale:m,draggableCancel:h,draggableHandle:g,resizeHandles:v,resizeHandle:y}=this.props,{mounted:x,droppingPosition:w}=this.state,b=typeof n.isDraggable=="boolean"?n.isDraggable:!n.static&&u,C=typeof n.isResizable=="boolean"?n.isResizable:!n.static&&d,S=n.resizeHandles||v,P=b&&f&&n.isBounded!==!1;return o1.createElement(GGe.default,{containerWidth:o,cols:a,margin:i,containerPadding:s||i,maxRows:c,rowHeight:l,cancel:h,handle:g,onDragStop:this.onDragStop,onDragStart:this.onDragStart,onDrag:this.onDrag,onResizeStart:this.onResizeStart,onResize:this.onResize,onResizeStop:this.onResizeStop,isDraggable:b,isResizable:C,isBounded:P,useCSSTransforms:p&&x,usePercentages:!x,transformScale:m,w:n.w,h:n.h,x:n.x,y:n.y,i:n.i,minH:n.minH,minW:n.minW,maxH:n.maxH,maxW:n.maxW,static:n.static,droppingPosition:r?w:void 0,resizeHandles:S,resizeHandle:y},t)}render(){let{className:t,style:r,isDroppable:n,innerRef:o}=this.props,a=(0,eXt.default)(KGe,t),i={height:this.containerHeight(),...r};return o1.createElement("div",{ref:o,className:a,style:i,onDrop:n?this.onDrop:Vr.noop,onDragLeave:n?this.onDragLeave:Vr.noop,onDragEnter:n?this.onDragEnter:Vr.noop,onDragOver:n?this.onDragOver:Vr.noop},o1.Children.map(this.props.children,s=>this.processGridItem(s)),n&&this.state.droppingDOMNode&&this.processGridItem(this.state.droppingDOMNode,!0),this.placeholder())}};Lq.default=UN;Bc(UN,"displayName","ReactGridLayout");Bc(UN,"propTypes",rXt.default);Bc(UN,"defaultProps",{autoSize:!0,cols:12,className:"",style:{},draggableHandle:"",draggableCancel:"",containerPadding:null,rowHeight:150,maxRows:1/0,layout:[],margin:[10,10],isBounded:!1,isDraggable:!0,isResizable:!0,allowOverlap:!1,isDroppable:!1,useCSSTransforms:!0,transformScale:1,verticalCompact:!0,compactType:"vertical",preventCollision:!1,droppingItem:{i:"__dropping-elem__",h:1,w:1},resizeHandles:["se"],onLayoutChange:Vr.noop,onDragStart:Vr.noop,onDrag:Vr.noop,onDragStop:Vr.noop,onResizeStart:Vr.noop,onResize:Vr.noop,onResizeStop:Vr.noop,onDrop:Vr.noop,onDropDragOver:Vr.noop})});var gse=de(zN=>{"use strict";Object.defineProperty(zN,"__esModule",{value:!0});zN.findOrGenerateResponsiveLayout=sXt;zN.getBreakpointFromWidth=aXt;zN.getColsFromBreakpoint=iXt;zN.sortBreakpoints=hse;var Eq=e1();function aXt(e,t){let r=hse(e),n=r[0];for(let o=1,a=r.length;o<a;o++){let i=r[o];t>e[i]&&(n=i)}return n}function iXt(e,t){if(!t[e])throw new Error("ResponsiveReactGridLayout: `cols` entry for breakpoint "+e+" is missing!");return t[e]}function sXt(e,t,r,n,o,a){if(e[r])return(0,Eq.cloneLayout)(e[r]);let i=e[n],s=hse(t),l=s.slice(s.indexOf(r));for(let c=0,u=l.length;c<u;c++){let d=l[c];if(e[d]){i=e[d];break}}return i=(0,Eq.cloneLayout)(i||[]),(0,Eq.compact)((0,Eq.correctBounds)(i,{cols:o}),a,o)}function hse(e){return Object.keys(e).sort(function(r,n){return e[r]-e[n]})}});var t8e=de(_q=>{"use strict";Object.defineProperty(_q,"__esModule",{value:!0});_q.default=void 0;var QGe=e8e(ue()),yd=JGe(Hg()),vse=fq(),HN=e1(),a1=gse(),lXt=JGe(mse());function JGe(e){return e&&e.__esModule?e:{default:e}}function e8e(e,t){if(typeof WeakMap=="function")var r=new WeakMap,n=new WeakMap;return(e8e=function(o,a){if(!a&&o&&o.__esModule)return o;var i,s,l={__proto__:null,default:o};if(o===null||typeof o!="object"&&typeof o!="function")return l;if(i=a?n:r){if(i.has(o))return i.get(o);i.set(o,l)}for(let c in o)c!=="default"&&{}.hasOwnProperty.call(o,c)&&((s=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(o,c))&&(s.get||s.set)?i(l,c,s):l[c]=o[c]);return l})(e,t)}function yse(){return yse=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},yse.apply(null,arguments)}function Oq(e,t,r){return(t=cXt(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function cXt(e){var t=uXt(e,"string");return typeof t=="symbol"?t:t+""}function uXt(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ZGe=e=>Object.prototype.toString.call(e);function Dq(e,t){return e==null?null:Array.isArray(e)?e:e[t]}var O2=class extends QGe.Component{constructor(){super(...arguments),Oq(this,"state",this.generateInitialState()),Oq(this,"onLayoutChange",t=>{this.props.onLayoutChange(t,{...this.props.layouts,[this.state.breakpoint]:t})})}generateInitialState(){let{width:t,breakpoints:r,layouts:n,cols:o}=this.props,a=(0,a1.getBreakpointFromWidth)(r,t),i=(0,a1.getColsFromBreakpoint)(a,o),s=this.props.verticalCompact===!1?null:this.props.compactType;return{layout:(0,a1.findOrGenerateResponsiveLayout)(n,r,a,a,i,s),breakpoint:a,cols:i}}static getDerivedStateFromProps(t,r){if(!(0,vse.deepEqual)(t.layouts,r.layouts)){let{breakpoint:n,cols:o}=r;return{layout:(0,a1.findOrGenerateResponsiveLayout)(t.layouts,t.breakpoints,n,n,o,t.compactType),layouts:t.layouts}}return null}componentDidUpdate(t){(this.props.width!=t.width||this.props.breakpoint!==t.breakpoint||!(0,vse.deepEqual)(this.props.breakpoints,t.breakpoints)||!(0,vse.deepEqual)(this.props.cols,t.cols))&&this.onWidthChange(t)}onWidthChange(t){let{breakpoints:r,cols:n,layouts:o,compactType:a}=this.props,i=this.props.breakpoint||(0,a1.getBreakpointFromWidth)(this.props.breakpoints,this.props.width),s=this.state.breakpoint,l=(0,a1.getColsFromBreakpoint)(i,n),c={...o};if(s!==i||t.breakpoints!==r||t.cols!==n){s in c||(c[s]=(0,HN.cloneLayout)(this.state.layout));let f=(0,a1.findOrGenerateResponsiveLayout)(c,r,i,s,l,a);f=(0,HN.synchronizeLayoutWithChildren)(f,this.props.children,l,a,this.props.allowOverlap),c[i]=f,this.props.onBreakpointChange(i,l),this.props.onLayoutChange(f,c),this.setState({breakpoint:i,layout:f,cols:l})}let u=Dq(this.props.margin,i),d=Dq(this.props.containerPadding,i);this.props.onWidthChange(this.props.width,u,l,d)}render(){let{breakpoint:t,breakpoints:r,cols:n,layouts:o,margin:a,containerPadding:i,onBreakpointChange:s,onLayoutChange:l,onWidthChange:c,...u}=this.props;return QGe.createElement(lXt.default,yse({},u,{margin:Dq(a,this.state.breakpoint),containerPadding:Dq(i,this.state.breakpoint),onLayoutChange:this.onLayoutChange,layout:this.state.layout,cols:this.state.cols}))}};_q.default=O2;Oq(O2,"propTypes",{breakpoint:yd.default.string,breakpoints:yd.default.object,allowOverlap:yd.default.bool,cols:yd.default.object,margin:yd.default.oneOfType([yd.default.array,yd.default.object]),containerPadding:yd.default.oneOfType([yd.default.array,yd.default.object]),layouts(e,t){if(ZGe(e[t])!=="[object Object]")throw new Error("Layout property must be an object. Received: "+ZGe(e[t]));Object.keys(e[t]).forEach(r=>{if(!(r in e.breakpoints))throw new Error("Each key in layouts must align with a key in breakpoints.");(0,HN.validateLayout)(e.layouts[r],"layouts."+r)})},width:yd.default.number.isRequired,onBreakpointChange:yd.default.func,onLayoutChange:yd.default.func,onWidthChange:yd.default.func});Oq(O2,"defaultProps",{breakpoints:{lg:1200,md:996,sm:768,xs:480,xxs:0},cols:{lg:12,md:10,sm:6,xs:4,xxs:2},containerPadding:{lg:null,md:null,sm:null,xs:null,xxs:null},layouts:{},margin:[10,10],allowOverlap:!1,onBreakpointChange:HN.noop,onLayoutChange:HN.noop,onWidthChange:HN.noop})});var l8e={};XF(l8e,{default:()=>MXt});function pXt(e,t){var r=!1,n=!1,o=0;function a(){r&&(r=!1,e()),n&&s()}function i(){dXt(a)}function s(){var l=Date.now();if(r){if(l-o<fXt)return;n=!0}else r=!0,n=!1,setTimeout(i,t);o=l}return s}function Bq(e){return parseFloat(e)||0}function r8e(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return t.reduce(function(n,o){var a=e["border-"+o+"-width"];return n+Bq(a)},0)}function yXt(e){for(var t=["top","right","bottom","left"],r={},n=0,o=t;n<o.length;n++){var a=o[n],i=e["padding-"+a];r[a]=Bq(i)}return r}function xXt(e){var t=e.getBBox();return Vq(0,0,t.width,t.height)}function bXt(e){var t=e.clientWidth,r=e.clientHeight;if(!t&&!r)return a8e;var n=jN(e).getComputedStyle(e),o=yXt(n),a=o.left+o.right,i=o.top+o.bottom,s=Bq(n.width),l=Bq(n.height);if(n.boxSizing==="border-box"&&(Math.round(s+a)!==t&&(s-=r8e(n,"left","right")+a),Math.round(l+i)!==r&&(l-=r8e(n,"top","bottom")+i)),!CXt(e)){var c=Math.round(s+a)-t,u=Math.round(l+i)-r;Math.abs(c)!==1&&(s-=c),Math.abs(u)!==1&&(l-=u)}return Vq(o.left,o.top,s,l)}function CXt(e){return e===jN(e).document.documentElement}function SXt(e){return xse?wXt(e)?xXt(e):bXt(e):a8e}function PXt(e){var t=e.x,r=e.y,n=e.width,o=e.height,a=typeof DOMRectReadOnly<"u"?DOMRectReadOnly:Object,i=Object.create(a.prototype);return o8e(i,{x:t,y:r,width:n,height:o,top:r,right:t+n,bottom:o+r,left:t}),i}function Vq(e,t,r,n){return{x:e,y:t,width:r,height:n}}var n8e,xse,Fq,dXt,fXt,mXt,hXt,gXt,vXt,o8e,jN,a8e,wXt,IXt,kXt,RXt,i8e,s8e,NXt,MXt,c8e=snt(()=>{n8e=function(){if(typeof Map<"u")return Map;function e(t,r){var n=-1;return t.some(function(o,a){return o[0]===r?(n=a,!0):!1}),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(r){var n=e(this.__entries__,r),o=this.__entries__[n];return o&&o[1]},t.prototype.set=function(r,n){var o=e(this.__entries__,r);~o?this.__entries__[o][1]=n:this.__entries__.push([r,n])},t.prototype.delete=function(r){var n=this.__entries__,o=e(n,r);~o&&n.splice(o,1)},t.prototype.has=function(r){return!!~e(this.__entries__,r)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(r,n){n===void 0&&(n=null);for(var o=0,a=this.__entries__;o<a.length;o++){var i=a[o];r.call(n,i[1],i[0])}},t}()}(),xse=typeof window<"u"&&typeof document<"u"&&window.document===document,Fq=function(){return typeof global<"u"&&global.Math===Math?global:typeof self<"u"&&self.Math===Math?self:typeof window<"u"&&window.Math===Math?window:Function("return this")()}(),dXt=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(Fq):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)}}(),fXt=2;mXt=20,hXt=["top","right","bottom","left","width","height","size","weight"],gXt=typeof MutationObserver<"u",vXt=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=pXt(this.refresh.bind(this),mXt)}return e.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},e.prototype.removeObserver=function(t){var r=this.observers_,n=r.indexOf(t);~n&&r.splice(n,1),!r.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){var t=this.updateObservers_();t&&this.refresh()},e.prototype.updateObservers_=function(){var t=this.observers_.filter(function(r){return r.gatherActive(),r.hasActive()});return t.forEach(function(r){return r.broadcastActive()}),t.length>0},e.prototype.connect_=function(){!xse||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),gXt?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){!xse||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(t){var r=t.propertyName,n=r===void 0?"":r,o=hXt.some(function(a){return!!~n.indexOf(a)});o&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),o8e=function(e,t){for(var r=0,n=Object.keys(t);r<n.length;r++){var o=n[r];Object.defineProperty(e,o,{value:t[o],enumerable:!1,writable:!1,configurable:!0})}return e},jN=function(e){var t=e&&e.ownerDocument&&e.ownerDocument.defaultView;return t||Fq},a8e=Vq(0,0,0,0);wXt=function(){return typeof SVGGraphicsElement<"u"?function(e){return e instanceof jN(e).SVGGraphicsElement}:function(e){return e instanceof jN(e).SVGElement&&typeof e.getBBox=="function"}}();IXt=function(){function e(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=Vq(0,0,0,0),this.target=t}return e.prototype.isActive=function(){var t=SXt(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t},e}(),kXt=function(){function e(t,r){var n=PXt(r);o8e(this,{target:t,contentRect:n})}return e}(),RXt=function(){function e(t,r,n){if(this.activeObservations_=[],this.observations_=new n8e,typeof t!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=r,this.callbackCtx_=n}return e.prototype.observe=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(t instanceof jN(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var r=this.observations_;r.has(t)||(r.set(t,new IXt(t)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(t instanceof jN(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var r=this.observations_;r.has(t)&&(r.delete(t),r.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach(function(r){r.isActive()&&t.activeObservations_.push(r)})},e.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,r=this.activeObservations_.map(function(n){return new kXt(n.target,n.broadcastRect())});this.callback_.call(t,r,t),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),i8e=typeof WeakMap<"u"?new WeakMap:new n8e,s8e=function(){function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var r=vXt.getInstance(),n=new RXt(t,r,this);i8e.set(this,n)}return e}();["observe","unobserve","disconnect"].forEach(function(e){s8e.prototype[e]=function(){var t;return(t=i8e.get(this))[e].apply(t,arguments)}});NXt=function(){return typeof Fq.ResizeObserver<"u"?Fq.ResizeObserver:s8e}(),MXt=NXt});var d8e=de(Cse=>{"use strict";Object.defineProperty(Cse,"__esModule",{value:!0});Cse.default=_Xt;var Uq=u8e(ue()),TXt=wse(Hg()),AXt=wse((c8e(),wfe(l8e))),LXt=wse(R2());function wse(e){return e&&e.__esModule?e:{default:e}}function u8e(e,t){if(typeof WeakMap=="function")var r=new WeakMap,n=new WeakMap;return(u8e=function(o,a){if(!a&&o&&o.__esModule)return o;var i,s,l={__proto__:null,default:o};if(o===null||typeof o!="object"&&typeof o!="function")return l;if(i=a?n:r){if(i.has(o))return i.get(o);i.set(o,l)}for(let c in o)c!=="default"&&{}.hasOwnProperty.call(o,c)&&((s=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(o,c))&&(s.get||s.set)?i(l,c,s):l[c]=o[c]);return l})(e,t)}function bse(){return bse=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},bse.apply(null,arguments)}function $N(e,t,r){return(t=EXt(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function EXt(e){var t=DXt(e,"string");return typeof t=="symbol"?t:t+""}function DXt(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var OXt="react-grid-layout";function _Xt(e){var t;return t=class extends Uq.Component{constructor(){super(...arguments),$N(this,"state",{width:1280}),$N(this,"elementRef",Uq.createRef()),$N(this,"mounted",!1),$N(this,"resizeObserver",void 0)}componentDidMount(){this.mounted=!0,this.resizeObserver=new AXt.default(o=>{if(this.elementRef.current instanceof HTMLElement){let i=o[0].contentRect.width;this.setState({width:i})}});let n=this.elementRef.current;n instanceof HTMLElement&&this.resizeObserver.observe(n)}componentWillUnmount(){this.mounted=!1;let n=this.elementRef.current;n instanceof HTMLElement&&this.resizeObserver.unobserve(n),this.resizeObserver.disconnect()}render(){let{measureBeforeMount:n,...o}=this.props;return n&&!this.mounted?Uq.createElement("div",{className:(0,LXt.default)(this.props.className,OXt),style:this.props.style,ref:this.elementRef}):Uq.createElement(e,bse({innerRef:this.elementRef},o,this.state))}},$N(t,"defaultProps",{measureBeforeMount:!1}),$N(t,"propTypes",{measureBeforeMount:TXt.default.bool}),t}});var f8e=de((TSn,i1)=>{i1.exports=mse().default;i1.exports.utils=e1();i1.exports.calculateUtils=gq();i1.exports.Responsive=t8e().default;i1.exports.Responsive.utils=gse();i1.exports.WidthProvider=d8e().default});var Ule=de((Vle,VKe)=>{(function(e,t){typeof define=="function"&&define.amd?define(t):typeof Vle=="object"?VKe.exports=t():e.NProgress=t()})(Vle,function(){var e={};e.version="0.2.0";var t=e.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'<div class="bar" role="bar"><div class="peg"></div></div><div class="spinner" role="spinner"><div class="spinner-icon"></div></div>'};e.configure=function(f){var p,m;for(p in f)m=f[p],m!==void 0&&f.hasOwnProperty(p)&&(t[p]=m);return this},e.status=null,e.set=function(f){var p=e.isStarted();f=r(f,t.minimum,1),e.status=f===1?null:f;var m=e.render(!p),h=m.querySelector(t.barSelector),g=t.speed,v=t.easing;return m.offsetWidth,a(function(y){t.positionUsing===""&&(t.positionUsing=e.getPositioningCSS()),i(h,o(f,g,v)),f===1?(i(m,{transition:"none",opacity:1}),m.offsetWidth,setTimeout(function(){i(m,{transition:"all "+g+"ms linear",opacity:0}),setTimeout(function(){e.remove(),y()},g)},g)):setTimeout(y,g)}),this},e.isStarted=function(){return typeof e.status=="number"},e.start=function(){e.status||e.set(0);var f=function(){setTimeout(function(){e.status&&(e.trickle(),f())},t.trickleSpeed)};return t.trickle&&f(),this},e.done=function(f){return!f&&!e.status?this:e.inc(.3+.5*Math.random()).set(1)},e.inc=function(f){var p=e.status;return p?(typeof f!="number"&&(f=(1-p)*r(Math.random()*p,.1,.95)),p=r(p+f,0,.994),e.set(p)):e.start()},e.trickle=function(){return e.inc(Math.random()*t.trickleRate)},function(){var f=0,p=0;e.promise=function(m){return!m||m.state()==="resolved"?this:(p===0&&e.start(),f++,p++,m.always(function(){p--,p===0?(f=0,e.done()):e.set((f-p)/f)}),this)}}(),e.render=function(f){if(e.isRendered())return document.getElementById("nprogress");l(document.documentElement,"nprogress-busy");var p=document.createElement("div");p.id="nprogress",p.innerHTML=t.template;var m=p.querySelector(t.barSelector),h=f?"-100":n(e.status||0),g=document.querySelector(t.parent),v;return i(m,{transition:"all 0 linear",transform:"translate3d("+h+"%,0,0)"}),t.showSpinner||(v=p.querySelector(t.spinnerSelector),v&&d(v)),g!=document.body&&l(g,"nprogress-custom-parent"),g.appendChild(p),p},e.remove=function(){c(document.documentElement,"nprogress-busy"),c(document.querySelector(t.parent),"nprogress-custom-parent");var f=document.getElementById("nprogress");f&&d(f)},e.isRendered=function(){return!!document.getElementById("nprogress")},e.getPositioningCSS=function(){var f=document.body.style,p="WebkitTransform"in f?"Webkit":"MozTransform"in f?"Moz":"msTransform"in f?"ms":"OTransform"in f?"O":"";return p+"Perspective"in f?"translate3d":p+"Transform"in f?"translate":"margin"};function r(f,p,m){return f<p?p:f>m?m:f}function n(f){return(-1+f)*100}function o(f,p,m){var h;return t.positionUsing==="translate3d"?h={transform:"translate3d("+n(f)+"%,0,0)"}:t.positionUsing==="translate"?h={transform:"translate("+n(f)+"%,0)"}:h={"margin-left":n(f)+"%"},h.transition="all "+p+"ms "+m,h}var a=function(){var f=[];function p(){var m=f.shift();m&&m(p)}return function(m){f.push(m),f.length==1&&p()}}(),i=function(){var f=["Webkit","O","Moz","ms"],p={};function m(y){return y.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,function(x,w){return w.toUpperCase()})}function h(y){var x=document.body.style;if(y in x)return y;for(var w=f.length,b=y.charAt(0).toUpperCase()+y.slice(1),C;w--;)if(C=f[w]+b,C in x)return C;return y}function g(y){return y=m(y),p[y]||(p[y]=h(y))}function v(y,x,w){x=g(x),y.style[x]=w}return function(y,x){var w=arguments,b,C;if(w.length==2)for(b in x)C=x[b],C!==void 0&&x.hasOwnProperty(b)&&v(y,b,C);else v(y,w[1],w[2])}}();function s(f,p){var m=typeof f=="string"?f:u(f);return m.indexOf(" "+p+" ")>=0}function l(f,p){var m=u(f),h=m+p;s(m,p)||(f.className=h.substring(1))}function c(f,p){var m=u(f),h;s(f,p)&&(h=m.replace(" "+p+" "," "),f.className=h.substring(1,h.length-1))}function u(f){return(" "+(f.className||"")+" ").replace(/\s+/gi," ")}function d(f){f&&f.parentNode&&f.parentNode.removeChild(f)}return e})});var Uur={};XF(Uur,{Accordion:()=>L4,AccordionContent:()=>_4,AccordionItem:()=>D4,AccordionTrigger:()=>O4,AdvancedCalendar:()=>tJ,AdvancedChart:()=>Iie,AdvancedForms:()=>gYt,Alert:()=>Yx,AlertDescription:()=>Qx,AlertTitle:()=>B4,AspectRatio:()=>U4,Avatar:()=>Da,AvatarFallback:()=>ti,AvatarImage:()=>_i,Badge:()=>dt,Breadcrumb:()=>j4,BreadcrumbEllipsis:()=>hL,BreadcrumbItem:()=>q4,BreadcrumbLink:()=>G4,BreadcrumbList:()=>$4,BreadcrumbPage:()=>K4,BreadcrumbSeparator:()=>W4,Button:()=>ne,Calendar:()=>Dv,CalendarPro:()=>tJ,Card:()=>Ve,CardContent:()=>ze,CardDescription:()=>ts,CardFooter:()=>BV,CardHeader:()=>vr,CardTitle:()=>Dr,ChartWidget:()=>ufe,Checkbox:()=>ql,ClaudeProvider:()=>iT,Collapsible:()=>HV,CollapsibleContent:()=>qV,CollapsibleTrigger:()=>jV,ColorPicker:()=>DI,Command:()=>Ob,CommandDialog:()=>uE,CommandEmpty:()=>eg,CommandGroup:()=>pp,CommandInput:()=>Jh,CommandItem:()=>rd,CommandList:()=>YI,CommandSeparator:()=>D5,CommandShortcut:()=>O5,Dashboard:()=>b8e,DataTable:()=>Ble,Dialog:()=>ba,DialogClose:()=>pY,DialogContent:()=>aa,DialogDescription:()=>wl,DialogFooter:()=>Pm,DialogHeader:()=>Ba,DialogTitle:()=>wa,DialogTrigger:()=>Rb,DraggableList:()=>hk,DropdownMenu:()=>Nr,DropdownMenuCheckboxItem:()=>H5,DropdownMenuContent:()=>Sr,DropdownMenuGroup:()=>bQ,DropdownMenuItem:()=>Ue,DropdownMenuLabel:()=>tg,DropdownMenuPortal:()=>wQ,DropdownMenuRadioGroup:()=>CQ,DropdownMenuRadioItem:()=>j5,DropdownMenuSeparator:()=>Gr,DropdownMenuShortcut:()=>$5,DropdownMenuSub:()=>nd,DropdownMenuSubContent:()=>uu,DropdownMenuSubTrigger:()=>cu,DropdownMenuTrigger:()=>Mr,ErrorBoundary:()=>Cwt,FloatingActionButton:()=>gMe,FormWizard:()=>jZt,FormWizardNavigation:()=>CW,FormWizardProgress:()=>xW,FormWizardStep:()=>wW,FunnelWidget:()=>ffe,GalleryItem:()=>pMe,GaugeWidget:()=>dfe,GeminiProvider:()=>oT,GestureDrawer:()=>lMe,GitHubStars:()=>xYt,HealthCheck:()=>wYt,HoverCard:()=>EE,HoverCard3D:()=>xMe,HoverCardContent:()=>dk,HoverCardTrigger:()=>DE,Input:()=>Jt,KPIWidget:()=>lfe,Kanban:()=>nJ,LANGUAGE_COLORS:()=>l1,Label:()=>Pt,LazyComponent:()=>IYt,LazyImage:()=>SYt,LazyList:()=>PYt,LightboxContent:()=>jC,LightboxProvider:()=>mk,LightboxTrigger:()=>HC,MagneticButton:()=>wMe,MediaGallery:()=>fMe,MemoryAnalytics:()=>P2e,MemoryEfficientData:()=>Jte,MoonUIAccordionContentPro:()=>_4,MoonUIAccordionItemPro:()=>D4,MoonUIAccordionPro:()=>L4,MoonUIAccordionTriggerPro:()=>O4,MoonUIAdvancedChartPro:()=>ZWe,MoonUIAlertDescriptionPro:()=>Qx,MoonUIAlertPro:()=>Yx,MoonUIAlertTitlePro:()=>B4,MoonUIAnimatedButtonPro:()=>ZZ,MoonUIAspectRatioPro:()=>U4,MoonUIAsyncAvatarPro:()=>sfe,MoonUIAvatarFallbackPro:()=>ti,MoonUIAvatarGroupPro:()=>ife,MoonUIAvatarImagePro:()=>_i,MoonUIAvatarPro:()=>A8,MoonUIBadgePro:()=>dt,MoonUIBreadcrumbEllipsisPro:()=>hL,MoonUIBreadcrumbItemPro:()=>q4,MoonUIBreadcrumbLinkPro:()=>G4,MoonUIBreadcrumbListPro:()=>$4,MoonUIBreadcrumbPagePro:()=>K4,MoonUIBreadcrumbPro:()=>j4,MoonUIBreadcrumbSeparatorPro:()=>W4,MoonUIButtonPro:()=>ne,MoonUICardContentPro:()=>ze,MoonUICardDescriptionPro:()=>ts,MoonUICardFooterPro:()=>BV,MoonUICardHeaderPro:()=>vr,MoonUICardPro:()=>Ve,MoonUICardTitlePro:()=>Dr,MoonUIChartWidget:()=>ufe,MoonUICheckboxPro:()=>ql,MoonUICollapsibleContentPro:()=>qV,MoonUICollapsiblePro:()=>HV,MoonUICollapsibleTriggerPro:()=>jV,MoonUIColorPickerPro:()=>DI,MoonUICommandDialogPro:()=>uE,MoonUICommandEmptyPro:()=>eg,MoonUICommandGroupPro:()=>pp,MoonUICommandInputPro:()=>Jh,MoonUICommandItemPro:()=>rd,MoonUICommandListPro:()=>YI,MoonUICommandPro:()=>Ob,MoonUICommandSeparatorPro:()=>D5,MoonUICommandShortcutPro:()=>O5,MoonUICreditCardInputPro:()=>GKe,MoonUIDashboardPro:()=>HXt,MoonUIDataTable:()=>_Zt,MoonUIDataTablePro:()=>FZt,MoonUIDialogClosePro:()=>pY,MoonUIDialogContentPro:()=>aa,MoonUIDialogDescriptionPro:()=>wl,MoonUIDialogFooterPro:()=>Pm,MoonUIDialogHeaderPro:()=>Ba,MoonUIDialogPro:()=>ba,MoonUIDialogTitlePro:()=>wa,MoonUIDialogTriggerPro:()=>Rb,MoonUIDraggableListPro:()=>hk,MoonUIDropdownMenuCheckboxItemPro:()=>H5,MoonUIDropdownMenuContentPro:()=>Sr,MoonUIDropdownMenuGroupPro:()=>bQ,MoonUIDropdownMenuItemPro:()=>Ue,MoonUIDropdownMenuLabelPro:()=>tg,MoonUIDropdownMenuPortalPro:()=>wQ,MoonUIDropdownMenuPro:()=>Nr,MoonUIDropdownMenuRadioGroupPro:()=>CQ,MoonUIDropdownMenuRadioItemPro:()=>j5,MoonUIDropdownMenuSeparatorPro:()=>Gr,MoonUIDropdownMenuShortcutPro:()=>$5,MoonUIDropdownMenuSubContentPro:()=>uu,MoonUIDropdownMenuSubPro:()=>nd,MoonUIDropdownMenuSubTriggerPro:()=>cu,MoonUIDropdownMenuTriggerPro:()=>Mr,MoonUIFileUploadPro:()=>o9e,MoonUIFormWizardPro:()=>n_,MoonUIFunnelWidget:()=>ffe,MoonUIGalleryItemPro:()=>pMe,MoonUIGaugeWidget:()=>dfe,MoonUIGestureDrawerPro:()=>uz,MoonUIInputPro:()=>Jt,MoonUIKPIWidget:()=>lfe,MoonUILabelPro:()=>Pt,MoonUILightboxContentPro:()=>jC,MoonUILightboxPro:()=>bwt,MoonUILightboxProviderPro:()=>mk,MoonUILightboxTriggerPro:()=>HC,MoonUIMediaGalleryPro:()=>fMe,MoonUIMemoryEfficientDataPro:()=>k2e,MoonUINavbarPro:()=>zZt,MoonUIPaginationContentPro:()=>W5,MoonUIPaginationEllipsisPro:()=>Y5,MoonUIPaginationItemPro:()=>G5,MoonUIPaginationLinkPro:()=>ZI,MoonUIPaginationNextPro:()=>X5,MoonUIPaginationPreviousPro:()=>K5,MoonUIPaginationPro:()=>q5,MoonUIPhoneNumberInputPro:()=>j2,MoonUIPhoneNumberInputSimple:()=>Lse,MoonUIPopoverContentPro:()=>ki,MoonUIPopoverPro:()=>Vi,MoonUIPopoverTriggerPro:()=>Ui,MoonUIProgressPro:()=>Mo,MoonUIQuizFormPro:()=>jle,MoonUIRadioGroupContextPro:()=>bE,MoonUIRadioGroupItemPro:()=>ty,MoonUIRadioGroupPro:()=>AC,MoonUIRadioItemWithLabelPro:()=>aU,MoonUIRadioLabelPro:()=>wE,MoonUIRevenueWidget:()=>pfe,MoonUISelectContentPro:()=>Wo,MoonUISelectGroupPro:()=>E5,MoonUISelectItemPro:()=>Vt,MoonUISelectLabelPro:()=>lE,MoonUISelectPro:()=>$o,MoonUISelectSeparatorPro:()=>cE,MoonUISelectTriggerPro:()=>qo,MoonUISelectValuePro:()=>ia,MoonUISelectableVirtualListPro:()=>KMt,MoonUISeparatorPro:()=>Is,MoonUIServerMonitorWidget:()=>mfe,MoonUISidebarPro:()=>VZt,MoonUISkeletonPro:()=>Ca,MoonUISliderPro:()=>jb,MoonUISwipeableCardPro:()=>XMt,MoonUISwitchPro:()=>sg,MoonUITableBodyPro:()=>xU,MoonUITableCaptionPro:()=>PU,MoonUITableCellPro:()=>SU,MoonUITableFooterPro:()=>bU,MoonUITableHeadPro:()=>CU,MoonUITableHeaderPro:()=>yU,MoonUITablePro:()=>vU,MoonUITableRowPro:()=>wU,MoonUITabsContentPro:()=>QQ,MoonUITabsEnhanced:()=>MU,MoonUITabsListPro:()=>XQ,MoonUITabsPro:()=>MU,MoonUITabsTriggerPro:()=>YQ,MoonUITextareaPro:()=>mu,MoonUITimelinePro:()=>JMt,MoonUIToastPro:()=>EU,MoonUITogglePro:()=>_U,MoonUITooltipContentPro:()=>ns,MoonUITooltipPro:()=>ws,MoonUITooltipProviderPro:()=>Ys,MoonUITooltipTriggerPro:()=>Cs,MoonUIVirtualListPro:()=>GMt,MoonUIWidgetBase:()=>_u,MoonUIalertVariantsPro:()=>F4,MoonUIaspectRatioVariantsPro:()=>V4,MoonUIbreadcrumbVariantsPro:()=>H4,MoonUIcollapsibleContentVariantsPro:()=>$V,MoonUIcollapsibleTriggerVariantsPro:()=>$L,MoonUIradioGroupItemVariantsPro:()=>oU,MoonUItableVariantsPro:()=>gU,MoonUItoggleVariantsPro:()=>OU,Navbar:()=>zKe,NavigationMenu:()=>_E,NavigationMenuContent:()=>zE,NavigationMenuIndicator:()=>XZ,NavigationMenuItem:()=>BE,NavigationMenuLink:()=>HE,NavigationMenuList:()=>FE,NavigationMenuTrigger:()=>UE,NavigationMenuViewport:()=>lz,OpenAIProvider:()=>aT,OptimizedImage:()=>RYt,Pagination:()=>q5,PaginationContent:()=>W5,PaginationEllipsis:()=>Y5,PaginationItem:()=>G5,PaginationLink:()=>ZI,PaginationNext:()=>X5,PaginationPrevious:()=>K5,PerformanceDebugger:()=>MYt,PerformanceMonitor:()=>AYt,PhoneNumberInput:()=>mYt,PinchZoom:()=>SMe,Popover:()=>Vi,PopoverContent:()=>ki,PopoverTrigger:()=>Ui,Progress:()=>Mo,QuizForm:()=>WZt,RadioGroup:()=>AC,RadioGroupContext:()=>bE,RadioGroupItem:()=>ty,RadioItemWithLabel:()=>aU,RadioLabel:()=>wE,RealTimePerformanceMonitor:()=>Zte,RevenueWidget:()=>pfe,RichTextEditor:()=>jMt,ScrollArea:()=>Pc,ScrollBar:()=>dU,Select:()=>$o,SelectContent:()=>Wo,SelectGroup:()=>E5,SelectItem:()=>Vt,SelectLabel:()=>lE,SelectSeparator:()=>cE,SelectTrigger:()=>qo,SelectValue:()=>ia,SelectableVirtualList:()=>M2e,Separator:()=>Is,ServerMonitorWidget:()=>mfe,Sheet:()=>zb,SheetClose:()=>fke,SheetContent:()=>ry,SheetDescription:()=>IE,SheetFooter:()=>WQ,SheetHeader:()=>SE,SheetOverlay:()=>mU,SheetPortal:()=>qQ,SheetTitle:()=>PE,SheetTrigger:()=>pU,Sidebar:()=>UKe,SimpleLightbox:()=>bwt,Skeleton:()=>Ca,Slider:()=>jb,SpotlightCard:()=>IMe,SwipeableCard:()=>tre,Switch:()=>sg,Table:()=>vU,TableBody:()=>xU,TableCaption:()=>PU,TableCell:()=>SU,TableFooter:()=>bU,TableHead:()=>CU,TableHeader:()=>yU,TableRow:()=>wU,Tabs:()=>Sl,TabsContent:()=>Xn,TabsList:()=>el,TabsTrigger:()=>Dn,Textarea:()=>mu,Timeline:()=>E2e,Toast:()=>EU,Toggle:()=>_U,Tooltip:()=>ws,TooltipContent:()=>ns,TooltipProvider:()=>Ys,TooltipTrigger:()=>Cs,VirtualList:()=>N2e,WidgetBase:()=>_u,alertVariants:()=>F4,aspectRatioVariants:()=>V4,badgeVariants:()=>z4,breadcrumbVariants:()=>H4,buttonVariants:()=>Ku,cn:()=>B,collapsibleContentVariants:()=>$V,collapsibleTriggerVariants:()=>$L,commandVariantsPro:()=>YY,createAIProvider:()=>Z1,galleryItemVariants:()=>dz,galleryVariants:()=>dMe,getExpandableColumn:()=>DZt,hoverCard3DVariants:()=>vMe,moonUIAnimatedButtonProVariants:()=>QZ,moonUIAvatarBadgeVariants:()=>afe,moonUIAvatarProVariants:()=>T8,moonUIAvatarStatusVariants:()=>ofe,moonUIBadgeVariantsPro:()=>z4,moonUIButtonProVariants:()=>Ku,moonUIGestureDrawerProVariants:()=>YZ,moonUISeparatorVariantsPro:()=>fU,navigationMenuTriggerStyle:()=>VE,phoneCountries:()=>Yq,radioGroupItemVariants:()=>oU,separatorVariants:()=>fU,tableVariants:()=>gU,toggleVariants:()=>OU,useAccordionAnalytics:()=>Qge,useCollapsibleAnalytics:()=>H0e,useExpandableRows:()=>OZt,useFormWizard:()=>z0,useStreamingData:()=>I2e,useVirtualList:()=>qMt});function Sfe(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=Sfe(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function tT(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=Sfe(e))&&(n&&(n+=" "),n+=t);return n}var vt=tT;var F8="-",lnt=e=>{let t=unt(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:i=>{let s=i.split(F8);return s[0]===""&&s.length!==1&&s.shift(),kfe(s,t)||cnt(i)},getConflictingClassGroupIds:(i,s)=>{let l=r[i]||[];return s&&n[i]?[...l,...n[i]]:l}}},kfe=(e,t)=>{if(e.length===0)return t.classGroupId;let r=e[0],n=t.nextPart.get(r),o=n?kfe(e.slice(1),n):void 0;if(o)return o;if(t.validators.length===0)return;let a=e.join(F8);return t.validators.find(({validator:i})=>i(a))?.classGroupId},Pfe=/^\[(.+)\]$/,cnt=e=>{if(Pfe.test(e)){let t=Pfe.exec(e)[1],r=t?.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},unt=e=>{let{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return fnt(Object.entries(e.classGroups),r).forEach(([a,i])=>{_8(i,n,a,t)}),n},_8=(e,t,r,n)=>{e.forEach(o=>{if(typeof o=="string"){let a=o===""?t:Ife(t,o);a.classGroupId=r;return}if(typeof o=="function"){if(dnt(o)){_8(o(n),t,r,n);return}t.validators.push({validator:o,classGroupId:r});return}Object.entries(o).forEach(([a,i])=>{_8(i,Ife(t,a),r,n)})})},Ife=(e,t)=>{let r=e;return t.split(F8).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},dnt=e=>e.isThemeGetter,fnt=(e,t)=>t?e.map(([r,n])=>{let o=n.map(a=>typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([i,s])=>[t+i,s])):a);return[r,o]}):e,pnt=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map,o=(a,i)=>{r.set(a,i),t++,t>e&&(t=0,n=r,r=new Map)};return{get(a){let i=r.get(a);if(i!==void 0)return i;if((i=n.get(a))!==void 0)return o(a,i),i},set(a,i){r.has(a)?r.set(a,i):o(a,i)}}},Rfe="!",mnt=e=>{let{separator:t,experimentalParseClassName:r}=e,n=t.length===1,o=t[0],a=t.length,i=s=>{let l=[],c=0,u=0,d;for(let g=0;g<s.length;g++){let v=s[g];if(c===0){if(v===o&&(n||s.slice(g,g+a)===t)){l.push(s.slice(u,g)),u=g+a;continue}if(v==="/"){d=g;continue}}v==="["?c++:v==="]"&&c--}let f=l.length===0?s:s.substring(u),p=f.startsWith(Rfe),m=p?f.substring(1):f,h=d&&d>u?d-u:void 0;return{modifiers:l,hasImportantModifier:p,baseClassName:m,maybePostfixModifierPosition:h}};return r?s=>r({className:s,parseClassName:i}):i},hnt=e=>{if(e.length<=1)return e;let t=[],r=[];return e.forEach(n=>{n[0]==="["?(t.push(...r.sort(),n),r=[]):r.push(n)}),t.push(...r.sort()),t},gnt=e=>({cache:pnt(e.cacheSize),parseClassName:mnt(e),...lnt(e)}),vnt=/\s+/,ynt=(e,t)=>{let{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:o}=t,a=[],i=e.trim().split(vnt),s="";for(let l=i.length-1;l>=0;l-=1){let c=i[l],{modifiers:u,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:p}=r(c),m=!!p,h=n(m?f.substring(0,p):f);if(!h){if(!m){s=c+(s.length>0?" "+s:s);continue}if(h=n(f),!h){s=c+(s.length>0?" "+s:s);continue}m=!1}let g=hnt(u).join(":"),v=d?g+Rfe:g,y=v+h;if(a.includes(y))continue;a.push(y);let x=o(h,m);for(let w=0;w<x.length;++w){let b=x[w];a.push(v+b)}s=c+(s.length>0?" "+s:s)}return s};function xnt(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=Nfe(t))&&(n&&(n+=" "),n+=r);return n}var Nfe=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=Nfe(e[n]))&&(r&&(r+=" "),r+=t);return r};function bnt(e,...t){let r,n,o,a=i;function i(l){let c=t.reduce((u,d)=>d(u),e());return r=gnt(c),n=r.cache.get,o=r.cache.set,a=s,s(l)}function s(l){let c=n(l);if(c)return c;let u=ynt(l,r);return o(l,u),u}return function(){return a(xnt.apply(null,arguments))}}var Ta=e=>{let t=r=>r[e]||[];return t.isThemeGetter=!0,t},Mfe=/^\[(?:([a-z-]+):)?(.+)\]$/i,wnt=/^\d+\/\d+$/,Cnt=new Set(["px","full","screen"]),Snt=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Pnt=/\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$/,Int=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,knt=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Rnt=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,uv=e=>Y1(e)||Cnt.has(e)||wnt.test(e),gx=e=>Q1(e,"length",Ont),Y1=e=>!!e&&!Number.isNaN(Number(e)),O8=e=>Q1(e,"number",Y1),rT=e=>!!e&&Number.isInteger(Number(e)),Nnt=e=>e.endsWith("%")&&Y1(e.slice(0,-1)),sn=e=>Mfe.test(e),vx=e=>Snt.test(e),Mnt=new Set(["length","size","percentage"]),Tnt=e=>Q1(e,Mnt,Tfe),Ant=e=>Q1(e,"position",Tfe),Lnt=new Set(["image","url"]),Ent=e=>Q1(e,Lnt,Fnt),Dnt=e=>Q1(e,"",_nt),nT=()=>!0,Q1=(e,t,r)=>{let n=Mfe.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1},Ont=e=>Pnt.test(e)&&!Int.test(e),Tfe=()=>!1,_nt=e=>knt.test(e),Fnt=e=>Rnt.test(e);var Bnt=()=>{let e=Ta("colors"),t=Ta("spacing"),r=Ta("blur"),n=Ta("brightness"),o=Ta("borderColor"),a=Ta("borderRadius"),i=Ta("borderSpacing"),s=Ta("borderWidth"),l=Ta("contrast"),c=Ta("grayscale"),u=Ta("hueRotate"),d=Ta("invert"),f=Ta("gap"),p=Ta("gradientColorStops"),m=Ta("gradientColorStopPositions"),h=Ta("inset"),g=Ta("margin"),v=Ta("opacity"),y=Ta("padding"),x=Ta("saturate"),w=Ta("scale"),b=Ta("sepia"),C=Ta("skew"),S=Ta("space"),P=Ta("translate"),N=()=>["auto","contain","none"],T=()=>["auto","hidden","clip","visible","scroll"],A=()=>["auto",sn,t],M=()=>[sn,t],O=()=>["",uv,gx],F=()=>["auto",Y1,sn],I=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],k=()=>["solid","dashed","dotted","double","none"],R=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],E=()=>["start","end","center","between","around","evenly","stretch"],_=()=>["","0",sn],U=()=>["auto","avoid","all","avoid-page","page","left","right","column"],V=()=>[Y1,sn];return{cacheSize:500,separator:":",theme:{colors:[nT],spacing:[uv,gx],blur:["none","",vx,sn],brightness:V(),borderColor:[e],borderRadius:["none","","full",vx,sn],borderSpacing:M(),borderWidth:O(),contrast:V(),grayscale:_(),hueRotate:V(),invert:_(),gap:M(),gradientColorStops:[e],gradientColorStopPositions:[Nnt,gx],inset:A(),margin:A(),opacity:V(),padding:M(),saturate:V(),scale:V(),sepia:_(),skew:V(),space:M(),translate:M()},classGroups:{aspect:[{aspect:["auto","square","video",sn]}],container:["container"],columns:[{columns:[vx]}],"break-after":[{"break-after":U()}],"break-before":[{"break-before":U()}],"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:[...I(),sn]}],overflow:[{overflow:T()}],"overflow-x":[{"overflow-x":T()}],"overflow-y":[{"overflow-y":T()}],overscroll:[{overscroll:N()}],"overscroll-x":[{"overscroll-x":N()}],"overscroll-y":[{"overscroll-y":N()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[h]}],"inset-x":[{"inset-x":[h]}],"inset-y":[{"inset-y":[h]}],start:[{start:[h]}],end:[{end:[h]}],top:[{top:[h]}],right:[{right:[h]}],bottom:[{bottom:[h]}],left:[{left:[h]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",rT,sn]}],basis:[{basis:A()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",sn]}],grow:[{grow:_()}],shrink:[{shrink:_()}],order:[{order:["first","last","none",rT,sn]}],"grid-cols":[{"grid-cols":[nT]}],"col-start-end":[{col:["auto",{span:["full",rT,sn]},sn]}],"col-start":[{"col-start":F()}],"col-end":[{"col-end":F()}],"grid-rows":[{"grid-rows":[nT]}],"row-start-end":[{row:["auto",{span:[rT,sn]},sn]}],"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":["auto","min","max","fr",sn]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",sn]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...E()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...E(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...E(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[y]}],px:[{px:[y]}],py:[{py:[y]}],ps:[{ps:[y]}],pe:[{pe:[y]}],pt:[{pt:[y]}],pr:[{pr:[y]}],pb:[{pb:[y]}],pl:[{pl:[y]}],m:[{m:[g]}],mx:[{mx:[g]}],my:[{my:[g]}],ms:[{ms:[g]}],me:[{me:[g]}],mt:[{mt:[g]}],mr:[{mr:[g]}],mb:[{mb:[g]}],ml:[{ml:[g]}],"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",sn,t]}],"min-w":[{"min-w":[sn,t,"min","max","fit"]}],"max-w":[{"max-w":[sn,t,"none","full","min","max","fit","prose",{screen:[vx]},vx]}],h:[{h:[sn,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[sn,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[sn,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[sn,t,"auto","min","max","fit"]}],"font-size":[{text:["base",vx,gx]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",O8]}],"font-family":[{font:[nT]}],"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",sn]}],"line-clamp":[{"line-clamp":["none",Y1,O8]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",uv,sn]}],"list-image":[{"list-image":["none",sn]}],"list-style-type":[{list:["none","disc","decimal",sn]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...k(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",uv,gx]}],"underline-offset":[{"underline-offset":["auto",uv,sn]}],"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:M()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",sn]}],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",sn]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...I(),Ant]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Tnt]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Ent]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[m]}],"gradient-via-pos":[{via:[m]}],"gradient-to-pos":[{to:[m]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[v]}],"border-style":[{border:[...k(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[v]}],"divide-style":[{divide:k()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...k()]}],"outline-offset":[{"outline-offset":[uv,sn]}],"outline-w":[{outline:[uv,gx]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:O()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[uv,gx]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",vx,Dnt]}],"shadow-color":[{shadow:[nT]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":[...R(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":R()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",vx,sn]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[x]}],sepia:[{sepia:[b]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[x]}],"backdrop-sepia":[{"backdrop-sepia":[b]}],"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",sn]}],duration:[{duration:V()}],ease:[{ease:["linear","in","out","in-out",sn]}],delay:[{delay:V()}],animate:[{animate:["none","spin","ping","pulse","bounce",sn]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[w]}],"scale-x":[{"scale-x":[w]}],"scale-y":[{"scale-y":[w]}],rotate:[{rotate:[rT,sn]}],"translate-x":[{"translate-x":[P]}],"translate-y":[{"translate-y":[P]}],"skew-x":[{"skew-x":[C]}],"skew-y":[{"skew-y":[C]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",sn]}],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",sn]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":M()}],"scroll-mx":[{"scroll-mx":M()}],"scroll-my":[{"scroll-my":M()}],"scroll-ms":[{"scroll-ms":M()}],"scroll-me":[{"scroll-me":M()}],"scroll-mt":[{"scroll-mt":M()}],"scroll-mr":[{"scroll-mr":M()}],"scroll-mb":[{"scroll-mb":M()}],"scroll-ml":[{"scroll-ml":M()}],"scroll-p":[{"scroll-p":M()}],"scroll-px":[{"scroll-px":M()}],"scroll-py":[{"scroll-py":M()}],"scroll-ps":[{"scroll-ps":M()}],"scroll-pe":[{"scroll-pe":M()}],"scroll-pt":[{"scroll-pt":M()}],"scroll-pr":[{"scroll-pr":M()}],"scroll-pb":[{"scroll-pb":M()}],"scroll-pl":[{"scroll-pl":M()}],"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",sn]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[uv,gx,O8]}],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 Afe=bnt(Bnt);function B(...e){return Afe(tT(e))}var oT=class{constructor(t){this.apiUrl="https://generativelanguage.googleapis.com/v1beta/models";this.apiKey=t.apiKey,this.model=t.model||"gemini-2.0-flash"}async callGeminiAPI(t){try{let r=await fetch(`${this.apiUrl}/${this.model}:generateContent`,{method:"POST",headers:{"Content-Type":"application/json","X-goog-api-key":this.apiKey},body:JSON.stringify({contents:[{parts:[{text:t}]}]})});if(!r.ok){let a=await r.text();throw console.error("Gemini API error response:",a),new Error(`Gemini API error: ${r.status} ${r.statusText} - ${a}`)}let n=await r.json();if(n.error)throw new Error(`Gemini API error: ${n.error.message||JSON.stringify(n.error)}`);if(n.candidates?.[0]?.finishReason==="SAFETY")throw new Error("Content was blocked by safety filters");let o=n.candidates?.[0]?.content?.parts?.[0]?.text;if(!o)throw console.error("Gemini API response:",JSON.stringify(n,null,2)),new Error("No text content in Gemini API response");return o.trim()}catch(r){throw console.error("Gemini API error details:",r),r instanceof Error?r:new Error("Unknown error occurred while calling Gemini API")}}async generateText(t){return this.callGeminiAPI(t)}async rewrite(t){let r=`Rewrite the following text to make it clearer, more engaging, and better structured while maintaining the original meaning. Respond in the same language:
19
+ `,e.getElementsByTagName("head")[0].appendChild(t)),e.body&&PGe(e.body,"react-draggable-transparent-selection")}function e7t(e){window.requestAnimationFrame?window.requestAnimationFrame(()=>{wGe(e)}):wGe(e)}function wGe(e){if(e)try{if(e.body&&IGe(e.body,"react-draggable-transparent-selection"),e.selection)e.selection.empty();else{let t=(e.defaultView||window).getSelection();t&&t.type!=="Caret"&&t.removeAllRanges()}}catch{}}function PGe(e,t){e.classList?e.classList.add(t):e.className.match(new RegExp(`(?:^|\\s)${t}(?!\\S)`))||(e.className+=` ${t}`)}function IGe(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp(`(?:^|\\s)${t}(?!\\S)`,"g"),"")}});var Wie=de(zy=>{"use strict";Object.defineProperty(zy,"__esModule",{value:!0});zy.canDragX=n7t;zy.canDragY=o7t;zy.createCoreData=i7t;zy.createDraggableData=s7t;zy.getBoundPosition=t7t;zy.getControlPosition=a7t;zy.snapToGrid=r7t;var Mf=T2(),EN=yq();function t7t(e,t,r){if(!e.props.bounds)return[t,r];let{bounds:n}=e.props;n=typeof n=="string"?n:l7t(n);let o=qie(e);if(typeof n=="string"){let{ownerDocument:a}=o,i=a.defaultView,s;if(n==="parent"?s=o.parentNode:s=o.getRootNode().querySelector(n),!(s instanceof i.HTMLElement))throw new Error('Bounds selector "'+n+'" could not find an element.');let l=s,c=i.getComputedStyle(o),u=i.getComputedStyle(l);n={left:-o.offsetLeft+(0,Mf.int)(u.paddingLeft)+(0,Mf.int)(c.marginLeft),top:-o.offsetTop+(0,Mf.int)(u.paddingTop)+(0,Mf.int)(c.marginTop),right:(0,EN.innerWidth)(l)-(0,EN.outerWidth)(o)-o.offsetLeft+(0,Mf.int)(u.paddingRight)-(0,Mf.int)(c.marginRight),bottom:(0,EN.innerHeight)(l)-(0,EN.outerHeight)(o)-o.offsetTop+(0,Mf.int)(u.paddingBottom)-(0,Mf.int)(c.marginBottom)}}return(0,Mf.isNum)(n.right)&&(t=Math.min(t,n.right)),(0,Mf.isNum)(n.bottom)&&(r=Math.min(r,n.bottom)),(0,Mf.isNum)(n.left)&&(t=Math.max(t,n.left)),(0,Mf.isNum)(n.top)&&(r=Math.max(r,n.top)),[t,r]}function r7t(e,t,r){let n=Math.round(t/e[0])*e[0],o=Math.round(r/e[1])*e[1];return[n,o]}function n7t(e){return e.props.axis==="both"||e.props.axis==="x"}function o7t(e){return e.props.axis==="both"||e.props.axis==="y"}function a7t(e,t,r){let n=typeof t=="number"?(0,EN.getTouch)(e,t):null;if(typeof t=="number"&&!n)return null;let o=qie(r),a=r.props.offsetParent||o.offsetParent||o.ownerDocument.body;return(0,EN.offsetXYFromParent)(n||e,a,r.props.scale)}function i7t(e,t,r){let n=!(0,Mf.isNum)(e.lastX),o=qie(e);return n?{node:o,deltaX:0,deltaY:0,lastX:t,lastY:r,x:t,y:r}:{node:o,deltaX:t-e.lastX,deltaY:r-e.lastY,lastX:e.lastX,lastY:e.lastY,x:t,y:r}}function s7t(e,t){let r=e.props.scale;return{node:t.node,x:e.state.x+t.deltaX/r,y:e.state.y+t.deltaY/r,deltaX:t.deltaX/r,deltaY:t.deltaY/r,lastX:e.state.x,lastY:e.state.y}}function l7t(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom}}function qie(e){let t=e.findDOMNode();if(!t)throw new Error("<DraggableCore>: Unmounted during event!");return t}});var Kie=de(Gie=>{"use strict";Object.defineProperty(Gie,"__esModule",{value:!0});Gie.default=c7t;function c7t(){}});var RGe=de(xq=>{"use strict";Object.defineProperty(xq,"__esModule",{value:!0});xq.default=void 0;var Xie=kGe(ue()),Mu=Qie(Hg()),u7t=Qie(kh()),Fc=yq(),A0=Wie(),Yie=T2(),A2=Qie(Kie());function Qie(e){return e&&e.__esModule?e:{default:e}}function kGe(e,t){if(typeof WeakMap=="function")var r=new WeakMap,n=new WeakMap;return(kGe=function(o,a){if(!a&&o&&o.__esModule)return o;var i,s,l={__proto__:null,default:o};if(o===null||typeof o!="object"&&typeof o!="function")return l;if(i=a?n:r){if(i.has(o))return i.get(o);i.set(o,l)}for(let c in o)c!=="default"&&{}.hasOwnProperty.call(o,c)&&((s=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(o,c))&&(s.get||s.set)?i(l,c,s):l[c]=o[c]);return l})(e,t)}function Tu(e,t,r){return(t=d7t(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function d7t(e){var t=f7t(e,"string");return typeof t=="symbol"?t:t+""}function f7t(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var nh={touch:{start:"touchstart",move:"touchmove",stop:"touchend"},mouse:{start:"mousedown",move:"mousemove",stop:"mouseup"}},L0=nh.mouse,DN=class extends Xie.Component{constructor(){super(...arguments),Tu(this,"dragging",!1),Tu(this,"lastX",NaN),Tu(this,"lastY",NaN),Tu(this,"touchIdentifier",null),Tu(this,"mounted",!1),Tu(this,"handleDragStart",t=>{if(this.props.onMouseDown(t),!this.props.allowAnyClick&&typeof t.button=="number"&&t.button!==0)return!1;let r=this.findDOMNode();if(!r||!r.ownerDocument||!r.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");let{ownerDocument:n}=r;if(this.props.disabled||!(t.target instanceof n.defaultView.Node)||this.props.handle&&!(0,Fc.matchesSelectorAndParentsTo)(t.target,this.props.handle,r)||this.props.cancel&&(0,Fc.matchesSelectorAndParentsTo)(t.target,this.props.cancel,r))return;t.type==="touchstart"&&!this.props.allowMobileScroll&&t.preventDefault();let o=(0,Fc.getTouchIdentifier)(t);this.touchIdentifier=o;let a=(0,A0.getControlPosition)(t,o,this);if(a==null)return;let{x:i,y:s}=a,l=(0,A0.createCoreData)(this,i,s);(0,A2.default)("DraggableCore: handleDragStart: %j",l),(0,A2.default)("calling",this.props.onStart),!(this.props.onStart(t,l)===!1||this.mounted===!1)&&(this.props.enableUserSelectHack&&(0,Fc.addUserSelectStyles)(n),this.dragging=!0,this.lastX=i,this.lastY=s,(0,Fc.addEvent)(n,L0.move,this.handleDrag),(0,Fc.addEvent)(n,L0.stop,this.handleDragStop))}),Tu(this,"handleDrag",t=>{let r=(0,A0.getControlPosition)(t,this.touchIdentifier,this);if(r==null)return;let{x:n,y:o}=r;if(Array.isArray(this.props.grid)){let s=n-this.lastX,l=o-this.lastY;if([s,l]=(0,A0.snapToGrid)(this.props.grid,s,l),!s&&!l)return;n=this.lastX+s,o=this.lastY+l}let a=(0,A0.createCoreData)(this,n,o);if((0,A2.default)("DraggableCore: handleDrag: %j",a),this.props.onDrag(t,a)===!1||this.mounted===!1){try{this.handleDragStop(new MouseEvent("mouseup"))}catch{let l=document.createEvent("MouseEvents");l.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(l)}return}this.lastX=n,this.lastY=o}),Tu(this,"handleDragStop",t=>{if(!this.dragging)return;let r=(0,A0.getControlPosition)(t,this.touchIdentifier,this);if(r==null)return;let{x:n,y:o}=r;if(Array.isArray(this.props.grid)){let l=n-this.lastX||0,c=o-this.lastY||0;[l,c]=(0,A0.snapToGrid)(this.props.grid,l,c),n=this.lastX+l,o=this.lastY+c}let a=(0,A0.createCoreData)(this,n,o);if(this.props.onStop(t,a)===!1||this.mounted===!1)return!1;let s=this.findDOMNode();s&&this.props.enableUserSelectHack&&(0,Fc.scheduleRemoveUserSelectStyles)(s.ownerDocument),(0,A2.default)("DraggableCore: handleDragStop: %j",a),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,s&&((0,A2.default)("DraggableCore: Removing handlers"),(0,Fc.removeEvent)(s.ownerDocument,L0.move,this.handleDrag),(0,Fc.removeEvent)(s.ownerDocument,L0.stop,this.handleDragStop))}),Tu(this,"onMouseDown",t=>(L0=nh.mouse,this.handleDragStart(t))),Tu(this,"onMouseUp",t=>(L0=nh.mouse,this.handleDragStop(t))),Tu(this,"onTouchStart",t=>(L0=nh.touch,this.handleDragStart(t))),Tu(this,"onTouchEnd",t=>(L0=nh.touch,this.handleDragStop(t)))}componentDidMount(){this.mounted=!0;let t=this.findDOMNode();t&&(0,Fc.addEvent)(t,nh.touch.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;let t=this.findDOMNode();if(t){let{ownerDocument:r}=t;(0,Fc.removeEvent)(r,nh.mouse.move,this.handleDrag),(0,Fc.removeEvent)(r,nh.touch.move,this.handleDrag),(0,Fc.removeEvent)(r,nh.mouse.stop,this.handleDragStop),(0,Fc.removeEvent)(r,nh.touch.stop,this.handleDragStop),(0,Fc.removeEvent)(t,nh.touch.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,Fc.scheduleRemoveUserSelectStyles)(r)}}findDOMNode(){return this.props?.nodeRef?this.props?.nodeRef?.current:u7t.default.findDOMNode(this)}render(){return Xie.cloneElement(Xie.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}};xq.default=DN;Tu(DN,"displayName","DraggableCore");Tu(DN,"propTypes",{allowAnyClick:Mu.default.bool,allowMobileScroll:Mu.default.bool,children:Mu.default.node.isRequired,disabled:Mu.default.bool,enableUserSelectHack:Mu.default.bool,offsetParent:function(e,t){if(e[t]&&e[t].nodeType!==1)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:Mu.default.arrayOf(Mu.default.number),handle:Mu.default.string,cancel:Mu.default.string,nodeRef:Mu.default.object,onStart:Mu.default.func,onDrag:Mu.default.func,onStop:Mu.default.func,onMouseDown:Mu.default.func,scale:Mu.default.number,className:Yie.dontSetMe,style:Yie.dontSetMe,transform:Yie.dontSetMe});Tu(DN,"defaultProps",{allowAnyClick:!1,allowMobileScroll:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1})});var TGe=de(L2=>{"use strict";Object.defineProperty(L2,"__esModule",{value:!0});Object.defineProperty(L2,"DraggableCore",{enumerable:!0,get:function(){return Cq.default}});L2.default=void 0;var bq=MGe(ue()),Ga=Sq(Hg()),p7t=Sq(kh()),m7t=R2(),NGe=yq(),ON=Wie(),Zie=T2(),Cq=Sq(RGe()),wq=Sq(Kie());function Sq(e){return e&&e.__esModule?e:{default:e}}function MGe(e,t){if(typeof WeakMap=="function")var r=new WeakMap,n=new WeakMap;return(MGe=function(o,a){if(!a&&o&&o.__esModule)return o;var i,s,l={__proto__:null,default:o};if(o===null||typeof o!="object"&&typeof o!="function")return l;if(i=a?n:r){if(i.has(o))return i.get(o);i.set(o,l)}for(let c in o)c!=="default"&&{}.hasOwnProperty.call(o,c)&&((s=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(o,c))&&(s.get||s.set)?i(l,c,s):l[c]=o[c]);return l})(e,t)}function Jie(){return Jie=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Jie.apply(null,arguments)}function _N(e,t,r){return(t=h7t(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function h7t(e){var t=g7t(e,"string");return typeof t=="symbol"?t:t+""}function g7t(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var FN=class extends bq.Component{static getDerivedStateFromProps(t,r){let{position:n}=t,{prevPropsPosition:o}=r;return n&&(!o||n.x!==o.x||n.y!==o.y)?((0,wq.default)("Draggable: getDerivedStateFromProps %j",{position:n,prevPropsPosition:o}),{x:n.x,y:n.y,prevPropsPosition:{...n}}):null}constructor(t){super(t),_N(this,"onDragStart",(r,n)=>{if((0,wq.default)("Draggable: onDragStart: %j",n),this.props.onStart(r,(0,ON.createDraggableData)(this,n))===!1)return!1;this.setState({dragging:!0,dragged:!0})}),_N(this,"onDrag",(r,n)=>{if(!this.state.dragging)return!1;(0,wq.default)("Draggable: onDrag: %j",n);let o=(0,ON.createDraggableData)(this,n),a={x:o.x,y:o.y,slackX:0,slackY:0};if(this.props.bounds){let{x:s,y:l}=a;a.x+=this.state.slackX,a.y+=this.state.slackY;let[c,u]=(0,ON.getBoundPosition)(this,a.x,a.y);a.x=c,a.y=u,a.slackX=this.state.slackX+(s-a.x),a.slackY=this.state.slackY+(l-a.y),o.x=a.x,o.y=a.y,o.deltaX=a.x-this.state.x,o.deltaY=a.y-this.state.y}if(this.props.onDrag(r,o)===!1)return!1;this.setState(a)}),_N(this,"onDragStop",(r,n)=>{if(!this.state.dragging||this.props.onStop(r,(0,ON.createDraggableData)(this,n))===!1)return!1;(0,wq.default)("Draggable: onDragStop: %j",n);let a={dragging:!1,slackX:0,slackY:0};if(!!this.props.position){let{x:s,y:l}=this.props.position;a.x=s,a.y=l}this.setState(a)}),this.state={dragging:!1,dragged:!1,x:t.position?t.position.x:t.defaultPosition.x,y:t.position?t.position.y:t.defaultPosition.y,prevPropsPosition:{...t.position},slackX:0,slackY:0,isElementSVG:!1},t.position&&!(t.onDrag||t.onStop)&&console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}componentDidMount(){typeof window.SVGElement<"u"&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.state.dragging&&this.setState({dragging:!1})}findDOMNode(){return this.props?.nodeRef?.current??p7t.default.findDOMNode(this)}render(){let{axis:t,bounds:r,children:n,defaultPosition:o,defaultClassName:a,defaultClassNameDragging:i,defaultClassNameDragged:s,position:l,positionOffset:c,scale:u,...d}=this.props,f={},p=null,h=!!!l||this.state.dragging,g=l||o,v={x:(0,ON.canDragX)(this)&&h?this.state.x:g.x,y:(0,ON.canDragY)(this)&&h?this.state.y:g.y};this.state.isElementSVG?p=(0,NGe.createSVGTransform)(v,c):f=(0,NGe.createCSSTransform)(v,c);let y=(0,m7t.clsx)(n.props.className||"",a,{[i]:this.state.dragging,[s]:this.state.dragged});return bq.createElement(Cq.default,Jie({},d,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),bq.cloneElement(bq.Children.only(n),{className:y,style:{...n.props.style,...f},transform:p}))}};L2.default=FN;_N(FN,"displayName","Draggable");_N(FN,"propTypes",{...Cq.default.propTypes,axis:Ga.default.oneOf(["both","x","y","none"]),bounds:Ga.default.oneOfType([Ga.default.shape({left:Ga.default.number,right:Ga.default.number,top:Ga.default.number,bottom:Ga.default.number}),Ga.default.string,Ga.default.oneOf([!1])]),defaultClassName:Ga.default.string,defaultClassNameDragging:Ga.default.string,defaultClassNameDragged:Ga.default.string,defaultPosition:Ga.default.shape({x:Ga.default.number,y:Ga.default.number}),positionOffset:Ga.default.shape({x:Ga.default.oneOfType([Ga.default.number,Ga.default.string]),y:Ga.default.oneOfType([Ga.default.number,Ga.default.string])}),position:Ga.default.shape({x:Ga.default.number,y:Ga.default.number}),className:Zie.dontSetMe,style:Zie.dontSetMe,transform:Zie.dontSetMe});_N(FN,"defaultProps",{...Cq.default.defaultProps,axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1})});var Iq=de((hSn,Pq)=>{"use strict";var{default:AGe,DraggableCore:v7t}=TGe();Pq.exports=AGe;Pq.exports.default=AGe;Pq.exports.DraggableCore=v7t});var DGe=de(ese=>{"use strict";ese.__esModule=!0;ese.cloneElement=S7t;var y7t=x7t(ue());function x7t(e){return e&&e.__esModule?e:{default:e}}function LGe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function EGe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?LGe(Object(r),!0).forEach(function(n){b7t(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):LGe(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function b7t(e,t,r){return t=w7t(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function w7t(e){var t=C7t(e,"string");return typeof t=="symbol"?t:String(t)}function C7t(e,t){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function S7t(e,t){return t.style&&e.props.style&&(t.style=EGe(EGe({},e.props.style),t.style)),t.className&&e.props.className&&(t.className=e.props.className+" "+t.className),y7t.default.cloneElement(e,t)}});var tse=de(kq=>{"use strict";kq.__esModule=!0;kq.resizableProps=void 0;var cn=P7t(Hg()),vSn=Iq();function P7t(e){return e&&e.__esModule?e:{default:e}}var I7t={axis:cn.default.oneOf(["both","x","y","none"]),className:cn.default.string,children:cn.default.element.isRequired,draggableOpts:cn.default.shape({allowAnyClick:cn.default.bool,cancel:cn.default.string,children:cn.default.node,disabled:cn.default.bool,enableUserSelectHack:cn.default.bool,offsetParent:cn.default.node,grid:cn.default.arrayOf(cn.default.number),handle:cn.default.string,nodeRef:cn.default.object,onStart:cn.default.func,onDrag:cn.default.func,onStop:cn.default.func,onMouseDown:cn.default.func,scale:cn.default.number}),height:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var o=r[0];if(o.axis==="both"||o.axis==="y"){var a;return(a=cn.default.number).isRequired.apply(a,r)}return cn.default.number.apply(cn.default,r)},handle:cn.default.oneOfType([cn.default.node,cn.default.func]),handleSize:cn.default.arrayOf(cn.default.number),lockAspectRatio:cn.default.bool,maxConstraints:cn.default.arrayOf(cn.default.number),minConstraints:cn.default.arrayOf(cn.default.number),onResizeStop:cn.default.func,onResizeStart:cn.default.func,onResize:cn.default.func,resizeHandles:cn.default.arrayOf(cn.default.oneOf(["s","w","e","n","sw","nw","se","ne"])),transformScale:cn.default.number,width:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var o=r[0];if(o.axis==="both"||o.axis==="x"){var a;return(a=cn.default.number).isRequired.apply(a,r)}return cn.default.number.apply(cn.default,r)}};kq.resizableProps=I7t});var ise=de(Rq=>{"use strict";Rq.__esModule=!0;Rq.default=void 0;var E2=T7t(ue()),k7t=Iq(),R7t=DGe(),N7t=tse(),M7t=["children","className","draggableOpts","width","height","handle","handleSize","lockAspectRatio","axis","minConstraints","maxConstraints","onResize","onResizeStop","onResizeStart","resizeHandles","transformScale"];function _Ge(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,r=new WeakMap;return(_Ge=function(o){return o?r:t})(e)}function T7t(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var r=_Ge(t);if(r&&r.has(e))return r.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(a!=="default"&&Object.prototype.hasOwnProperty.call(e,a)){var i=o?Object.getOwnPropertyDescriptor(e,a):null;i&&(i.get||i.set)?Object.defineProperty(n,a,i):n[a]=e[a]}return n.default=e,r&&r.set(e,n),n}function nse(){return nse=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},nse.apply(this,arguments)}function A7t(e,t){if(e==null)return{};var r={},n=Object.keys(e),o,a;for(a=0;a<n.length;a++)o=n[a],!(t.indexOf(o)>=0)&&(r[o]=e[o]);return r}function OGe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function rse(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?OGe(Object(r),!0).forEach(function(n){L7t(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):OGe(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function L7t(e,t,r){return t=E7t(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function E7t(e){var t=D7t(e,"string");return typeof t=="symbol"?t:String(t)}function D7t(e,t){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function O7t(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,ose(e,t)}function ose(e,t){return ose=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},ose(e,t)}var ase=function(e){O7t(t,e);function t(){for(var n,o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return n=e.call.apply(e,[this].concat(a))||this,n.handleRefs={},n.lastHandleRect=null,n.slack=null,n}var r=t.prototype;return r.componentWillUnmount=function(){this.resetData()},r.resetData=function(){this.lastHandleRect=this.slack=null},r.runConstraints=function(o,a){var i=this.props,s=i.minConstraints,l=i.maxConstraints,c=i.lockAspectRatio;if(!s&&!l&&!c)return[o,a];if(c){var u=this.props.width/this.props.height,d=o-this.props.width,f=a-this.props.height;Math.abs(d)>Math.abs(f*u)?a=o/u:o=a*u}var p=o,m=a,h=this.slack||[0,0],g=h[0],v=h[1];return o+=g,a+=v,s&&(o=Math.max(s[0],o),a=Math.max(s[1],a)),l&&(o=Math.min(l[0],o),a=Math.min(l[1],a)),this.slack=[g+(p-o),v+(m-a)],[o,a]},r.resizeHandler=function(o,a){var i=this;return function(s,l){var c=l.node,u=l.deltaX,d=l.deltaY;o==="onResizeStart"&&i.resetData();var f=(i.props.axis==="both"||i.props.axis==="x")&&a!=="n"&&a!=="s",p=(i.props.axis==="both"||i.props.axis==="y")&&a!=="e"&&a!=="w";if(!(!f&&!p)){var m=a[0],h=a[a.length-1],g=c.getBoundingClientRect();if(i.lastHandleRect!=null){if(h==="w"){var v=g.left-i.lastHandleRect.left;u+=v}if(m==="n"){var y=g.top-i.lastHandleRect.top;d+=y}}i.lastHandleRect=g,h==="w"&&(u=-u),m==="n"&&(d=-d);var x=i.props.width+(f?u/i.props.transformScale:0),w=i.props.height+(p?d/i.props.transformScale:0),b=i.runConstraints(x,w);x=b[0],w=b[1];var C=x!==i.props.width||w!==i.props.height,S=typeof i.props[o]=="function"?i.props[o]:null,P=o==="onResize"&&!C;S&&!P&&(s.persist==null||s.persist(),S(s,{node:c,size:{width:x,height:w},handle:a})),o==="onResizeStop"&&i.resetData()}}},r.renderResizeHandle=function(o,a){var i=this.props.handle;if(!i)return E2.createElement("span",{className:"react-resizable-handle react-resizable-handle-"+o,ref:a});if(typeof i=="function")return i(o,a);var s=typeof i.type=="string",l=rse({ref:a},s?{}:{handleAxis:o});return E2.cloneElement(i,l)},r.render=function(){var o=this,a=this.props,i=a.children,s=a.className,l=a.draggableOpts,c=a.width,u=a.height,d=a.handle,f=a.handleSize,p=a.lockAspectRatio,m=a.axis,h=a.minConstraints,g=a.maxConstraints,v=a.onResize,y=a.onResizeStop,x=a.onResizeStart,w=a.resizeHandles,b=a.transformScale,C=A7t(a,M7t);return(0,R7t.cloneElement)(i,rse(rse({},C),{},{className:(s?s+" ":"")+"react-resizable",children:[].concat(i.props.children,w.map(function(S){var P,N=(P=o.handleRefs[S])!=null?P:o.handleRefs[S]=E2.createRef();return E2.createElement(k7t.DraggableCore,nse({},l,{nodeRef:N,key:"resizableHandle-"+S,onStop:o.resizeHandler("onResizeStop",S),onStart:o.resizeHandler("onResizeStart",S),onDrag:o.resizeHandler("onResize",S)}),o.renderResizeHandle(S,N))}))}))},t}(E2.Component);Rq.default=ase;ase.propTypes=N7t.resizableProps;ase.defaultProps={axis:"both",handleSize:[20,20],lockAspectRatio:!1,minConstraints:[20,20],maxConstraints:[1/0,1/0],resizeHandles:["se"],transformScale:1}});var zGe=de(Mq=>{"use strict";Mq.__esModule=!0;Mq.default=void 0;var sse=U7t(ue()),_7t=BGe(Hg()),F7t=BGe(ise()),B7t=tse(),V7t=["handle","handleSize","onResize","onResizeStart","onResizeStop","draggableOpts","minConstraints","maxConstraints","lockAspectRatio","axis","width","height","resizeHandles","style","transformScale"];function BGe(e){return e&&e.__esModule?e:{default:e}}function VGe(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,r=new WeakMap;return(VGe=function(o){return o?r:t})(e)}function U7t(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var r=VGe(t);if(r&&r.has(e))return r.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(a!=="default"&&Object.prototype.hasOwnProperty.call(e,a)){var i=o?Object.getOwnPropertyDescriptor(e,a):null;i&&(i.get||i.set)?Object.defineProperty(n,a,i):n[a]=e[a]}return n.default=e,r&&r.set(e,n),n}function lse(){return lse=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},lse.apply(this,arguments)}function FGe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Nq(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?FGe(Object(r),!0).forEach(function(n){z7t(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):FGe(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function z7t(e,t,r){return t=H7t(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function H7t(e){var t=j7t(e,"string");return typeof t=="symbol"?t:String(t)}function j7t(e,t){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function $7t(e,t){if(e==null)return{};var r={},n=Object.keys(e),o,a;for(a=0;a<n.length;a++)o=n[a],!(t.indexOf(o)>=0)&&(r[o]=e[o]);return r}function q7t(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,cse(e,t)}function cse(e,t){return cse=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},cse(e,t)}var UGe=function(e){q7t(t,e);function t(){for(var n,o=arguments.length,a=new Array(o),i=0;i<o;i++)a[i]=arguments[i];return n=e.call.apply(e,[this].concat(a))||this,n.state={width:n.props.width,height:n.props.height,propsWidth:n.props.width,propsHeight:n.props.height},n.onResize=function(s,l){var c=l.size;n.props.onResize?(s.persist==null||s.persist(),n.setState(c,function(){return n.props.onResize&&n.props.onResize(s,l)})):n.setState(c)},n}t.getDerivedStateFromProps=function(o,a){return a.propsWidth!==o.width||a.propsHeight!==o.height?{width:o.width,height:o.height,propsWidth:o.width,propsHeight:o.height}:null};var r=t.prototype;return r.render=function(){var o=this.props,a=o.handle,i=o.handleSize,s=o.onResize,l=o.onResizeStart,c=o.onResizeStop,u=o.draggableOpts,d=o.minConstraints,f=o.maxConstraints,p=o.lockAspectRatio,m=o.axis,h=o.width,g=o.height,v=o.resizeHandles,y=o.style,x=o.transformScale,w=$7t(o,V7t);return sse.createElement(F7t.default,{axis:m,draggableOpts:u,handle:a,handleSize:i,height:this.state.height,lockAspectRatio:p,maxConstraints:f,minConstraints:d,onResizeStart:l,onResize:this.onResize,onResizeStop:c,resizeHandles:v,transformScale:x,width:this.state.width},sse.createElement("div",lse({},w,{style:Nq(Nq({},y),{},{width:this.state.width+"px",height:this.state.height+"px"})})))},t}(sse.Component);Mq.default=UGe;UGe.propTypes=Nq(Nq({},B7t.resizableProps),{},{children:_7t.default.element})});var HGe=de((wSn,Tq)=>{"use strict";Tq.exports=function(){throw new Error("Don't instantiate Resizable directly! Use require('react-resizable').Resizable")};Tq.exports.Resizable=ise().default;Tq.exports.ResizableBox=zGe().default});var use=de(E0=>{"use strict";Object.defineProperty(E0,"__esModule",{value:!0});E0.resizeHandleType=E0.resizeHandleAxesType=E0.default=void 0;var vn=jGe(Hg()),W7t=jGe(ue());function jGe(e){return e&&e.__esModule?e:{default:e}}var G7t=E0.resizeHandleAxesType=vn.default.arrayOf(vn.default.oneOf(["s","w","e","n","sw","nw","se","ne"])),K7t=E0.resizeHandleType=vn.default.oneOfType([vn.default.node,vn.default.func]),CSn=E0.default={className:vn.default.string,style:vn.default.object,width:vn.default.number,autoSize:vn.default.bool,cols:vn.default.number,draggableCancel:vn.default.string,draggableHandle:vn.default.string,verticalCompact:function(e){e.verticalCompact},compactType:vn.default.oneOf(["vertical","horizontal"]),layout:function(e){var t=e.layout;t!==void 0&&e1().validateLayout(t,"layout")},margin:vn.default.arrayOf(vn.default.number),containerPadding:vn.default.arrayOf(vn.default.number),rowHeight:vn.default.number,maxRows:vn.default.number,isBounded:vn.default.bool,isDraggable:vn.default.bool,isResizable:vn.default.bool,allowOverlap:vn.default.bool,preventCollision:vn.default.bool,useCSSTransforms:vn.default.bool,transformScale:vn.default.number,isDroppable:vn.default.bool,resizeHandles:G7t,resizeHandle:K7t,onLayoutChange:vn.default.func,onDragStart:vn.default.func,onDrag:vn.default.func,onDragStop:vn.default.func,onResizeStart:vn.default.func,onResize:vn.default.func,onResizeStop:vn.default.func,onDrop:vn.default.func,droppingItem:vn.default.shape({i:vn.default.string.isRequired,w:vn.default.number.isRequired,h:vn.default.number.isRequired}),children:function(e,t){let r=e[t],n={};W7t.default.Children.forEach(r,function(o){if(o?.key!=null){if(n[o.key])throw new Error('Duplicate child key "'+o.key+'" found! This will cause problems in ReactGridLayout.');n[o.key]=!0}})},innerRef:vn.default.any}});var WGe=de(Aq=>{"use strict";Object.defineProperty(Aq,"__esModule",{value:!0});Aq.default=void 0;var BN=dse(ue()),$Ge=kh(),Po=dse(Hg()),X7t=Iq(),Y7t=HGe(),VN=e1(),oc=gq(),qGe=use(),Q7t=dse(R2());function dse(e){return e&&e.__esModule?e:{default:e}}function Kg(e,t,r){return(t=Z7t(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Z7t(e){var t=J7t(e,"string");return typeof t=="symbol"?t:t+""}function J7t(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var D2=class extends BN.default.Component{constructor(){super(...arguments),Kg(this,"state",{resizing:null,dragging:null,className:""}),Kg(this,"elementRef",BN.default.createRef()),Kg(this,"onDragStart",(t,r)=>{let{node:n}=r,{onDragStart:o,transformScale:a}=this.props;if(!o)return;let i={top:0,left:0},{offsetParent:s}=n;if(!s)return;let l=s.getBoundingClientRect(),c=n.getBoundingClientRect(),u=c.left/a,d=l.left/a,f=c.top/a,p=l.top/a;i.left=u-d+s.scrollLeft,i.top=f-p+s.scrollTop,this.setState({dragging:i});let{x:m,y:h}=(0,oc.calcXY)(this.getPositionParams(),i.top,i.left,this.props.w,this.props.h);return o.call(this,this.props.i,m,h,{e:t,node:n,newPosition:i})}),Kg(this,"onDrag",(t,r,n)=>{let{node:o,deltaX:a,deltaY:i}=r,{onDrag:s}=this.props;if(!s)return;if(!this.state.dragging)throw new Error("onDrag called before onDragStart.");let l=this.state.dragging.top+i,c=this.state.dragging.left+a,{isBounded:u,i:d,w:f,h:p,containerWidth:m}=this.props,h=this.getPositionParams();if(u){let{offsetParent:x}=o;if(x){let{margin:w,rowHeight:b}=this.props,C=x.clientHeight-(0,oc.calcGridItemWHPx)(p,b,w[1]);l=(0,oc.clamp)(l,0,C);let S=(0,oc.calcGridColWidth)(h),P=m-(0,oc.calcGridItemWHPx)(f,S,w[0]);c=(0,oc.clamp)(c,0,P)}}let g={top:l,left:c};n?this.setState({dragging:g}):(0,$Ge.flushSync)(()=>{this.setState({dragging:g})});let{x:v,y}=(0,oc.calcXY)(h,l,c,f,p);return s.call(this,d,v,y,{e:t,node:o,newPosition:g})}),Kg(this,"onDragStop",(t,r)=>{let{node:n}=r,{onDragStop:o}=this.props;if(!o)return;if(!this.state.dragging)throw new Error("onDragEnd called before onDragStart.");let{w:a,h:i,i:s}=this.props,{left:l,top:c}=this.state.dragging,u={top:c,left:l};this.setState({dragging:null});let{x:d,y:f}=(0,oc.calcXY)(this.getPositionParams(),c,l,a,i);return o.call(this,s,d,f,{e:t,node:n,newPosition:u})}),Kg(this,"onResizeStop",(t,r,n)=>this.onResizeHandler(t,r,n,"onResizeStop")),Kg(this,"onResizeStart",(t,r,n)=>this.onResizeHandler(t,r,n,"onResizeStart")),Kg(this,"onResize",(t,r,n)=>this.onResizeHandler(t,r,n,"onResize"))}shouldComponentUpdate(t,r){if(this.props.children!==t.children||this.props.droppingPosition!==t.droppingPosition)return!0;let n=(0,oc.calcGridItemPosition)(this.getPositionParams(this.props),this.props.x,this.props.y,this.props.w,this.props.h,this.state),o=(0,oc.calcGridItemPosition)(this.getPositionParams(t),t.x,t.y,t.w,t.h,r);return!(0,VN.fastPositionEqual)(n,o)||this.props.useCSSTransforms!==t.useCSSTransforms}componentDidMount(){this.moveDroppingItem({})}componentDidUpdate(t){this.moveDroppingItem(t)}moveDroppingItem(t){let{droppingPosition:r}=this.props;if(!r)return;let n=this.elementRef.current;if(!n)return;let o=t.droppingPosition||{left:0,top:0},{dragging:a}=this.state,i=a&&r.left!==o.left||r.top!==o.top;if(!a)this.onDragStart(r.e,{node:n,deltaX:r.left,deltaY:r.top});else if(i){let s=r.left-a.left,l=r.top-a.top;this.onDrag(r.e,{node:n,deltaX:s,deltaY:l},!0)}}getPositionParams(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props;return{cols:t.cols,containerPadding:t.containerPadding,containerWidth:t.containerWidth,margin:t.margin,maxRows:t.maxRows,rowHeight:t.rowHeight}}createStyle(t){let{usePercentages:r,containerWidth:n,useCSSTransforms:o}=this.props,a;return o?a=(0,VN.setTransform)(t):(a=(0,VN.setTopLeft)(t),r&&(a.left=(0,VN.perc)(t.left/n),a.width=(0,VN.perc)(t.width/n))),a}mixinDraggable(t,r){return BN.default.createElement(X7t.DraggableCore,{disabled:!r,onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop,handle:this.props.handle,cancel:".react-resizable-handle"+(this.props.cancel?","+this.props.cancel:""),scale:this.props.transformScale,nodeRef:this.elementRef},t)}curryResizeHandler(t,r){return(n,o)=>r(n,o,t)}mixinResizable(t,r,n){let{cols:o,minW:a,minH:i,maxW:s,maxH:l,transformScale:c,resizeHandles:u,resizeHandle:d}=this.props,f=this.getPositionParams(),p=(0,oc.calcGridItemPosition)(f,0,0,o,0).width,m=(0,oc.calcGridItemPosition)(f,0,0,a,i),h=(0,oc.calcGridItemPosition)(f,0,0,s,l),g=[m.width,m.height],v=[Math.min(h.width,p),Math.min(h.height,1/0)];return BN.default.createElement(Y7t.Resizable,{draggableOpts:{disabled:!n},className:n?void 0:"react-resizable-hide",width:r.width,height:r.height,minConstraints:g,maxConstraints:v,onResizeStop:this.curryResizeHandler(r,this.onResizeStop),onResizeStart:this.curryResizeHandler(r,this.onResizeStart),onResize:this.curryResizeHandler(r,this.onResize),transformScale:c,resizeHandles:u,handle:d},t)}onResizeHandler(t,r,n,o){let{node:a,size:i,handle:s}=r,l=this.props[o];if(!l)return;let{x:c,y:u,i:d,maxH:f,minH:p,containerWidth:m}=this.props,{minW:h,maxW:g}=this.props,v=i;a&&(v=(0,VN.resizeItemInDirection)(s,n,i,m),(0,$Ge.flushSync)(()=>{this.setState({resizing:o==="onResizeStop"?null:v})}));let{w:y,h:x}=(0,oc.calcWH)(this.getPositionParams(),v.width,v.height,c,u,s);y=(0,oc.clamp)(y,Math.max(h,1),g),x=(0,oc.clamp)(x,p,f),l.call(this,d,y,x,{e:t,node:a,size:v,handle:s})}render(){let{x:t,y:r,w:n,h:o,isDraggable:a,isResizable:i,droppingPosition:s,useCSSTransforms:l}=this.props,c=(0,oc.calcGridItemPosition)(this.getPositionParams(),t,r,n,o,this.state),u=BN.default.Children.only(this.props.children),d=BN.default.cloneElement(u,{ref:this.elementRef,className:(0,Q7t.default)("react-grid-item",u.props.className,this.props.className,{static:this.props.static,resizing:!!this.state.resizing,"react-draggable":a,"react-draggable-dragging":!!this.state.dragging,dropping:!!s,cssTransforms:l}),style:{...this.props.style,...u.props.style,...this.createStyle(c)}});return d=this.mixinResizable(d,c,i),d=this.mixinDraggable(d,a),d}};Aq.default=D2;Kg(D2,"propTypes",{children:Po.default.element,cols:Po.default.number.isRequired,containerWidth:Po.default.number.isRequired,rowHeight:Po.default.number.isRequired,margin:Po.default.array.isRequired,maxRows:Po.default.number.isRequired,containerPadding:Po.default.array.isRequired,x:Po.default.number.isRequired,y:Po.default.number.isRequired,w:Po.default.number.isRequired,h:Po.default.number.isRequired,minW:function(e,t){let r=e[t];if(typeof r!="number")return new Error("minWidth not Number");if(r>e.w||r>e.maxW)return new Error("minWidth larger than item width/maxWidth")},maxW:function(e,t){let r=e[t];if(typeof r!="number")return new Error("maxWidth not Number");if(r<e.w||r<e.minW)return new Error("maxWidth smaller than item width/minWidth")},minH:function(e,t){let r=e[t];if(typeof r!="number")return new Error("minHeight not Number");if(r>e.h||r>e.maxH)return new Error("minHeight larger than item height/maxHeight")},maxH:function(e,t){let r=e[t];if(typeof r!="number")return new Error("maxHeight not Number");if(r<e.h||r<e.minH)return new Error("maxHeight smaller than item height/minHeight")},i:Po.default.string.isRequired,resizeHandles:qGe.resizeHandleAxesType,resizeHandle:qGe.resizeHandleType,onDragStop:Po.default.func,onDragStart:Po.default.func,onDrag:Po.default.func,onResizeStop:Po.default.func,onResizeStart:Po.default.func,onResize:Po.default.func,isDraggable:Po.default.bool.isRequired,isResizable:Po.default.bool.isRequired,isBounded:Po.default.bool.isRequired,static:Po.default.bool,useCSSTransforms:Po.default.bool.isRequired,transformScale:Po.default.number,className:Po.default.string,handle:Po.default.string,cancel:Po.default.string,droppingPosition:Po.default.shape({e:Po.default.object.isRequired,left:Po.default.number.isRequired,top:Po.default.number.isRequired})});Kg(D2,"defaultProps",{className:"",cancel:"",handle:"",minH:1,minW:1,maxH:1/0,maxW:1/0,transformScale:1})});var mse=de(Lq=>{"use strict";Object.defineProperty(Lq,"__esModule",{value:!0});Lq.default=void 0;var o1=XGe(ue()),fse=fq(),eXt=pse(R2()),Vr=e1(),tXt=gq(),GGe=pse(WGe()),rXt=pse(use());function pse(e){return e&&e.__esModule?e:{default:e}}function XGe(e,t){if(typeof WeakMap=="function")var r=new WeakMap,n=new WeakMap;return(XGe=function(o,a){if(!a&&o&&o.__esModule)return o;var i,s,l={__proto__:null,default:o};if(o===null||typeof o!="object"&&typeof o!="function")return l;if(i=a?n:r){if(i.has(o))return i.get(o);i.set(o,l)}for(let c in o)c!=="default"&&{}.hasOwnProperty.call(o,c)&&((s=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(o,c))&&(s.get||s.set)?i(l,c,s):l[c]=o[c]);return l})(e,t)}function Bc(e,t,r){return(t=nXt(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function nXt(e){var t=oXt(e,"string");return typeof t=="symbol"?t:t+""}function oXt(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var KGe="react-grid-layout",YGe=!1;try{YGe=/firefox/i.test(navigator.userAgent)}catch{}var UN=class extends o1.Component{constructor(){super(...arguments),Bc(this,"state",{activeDrag:null,layout:(0,Vr.synchronizeLayoutWithChildren)(this.props.layout,this.props.children,this.props.cols,(0,Vr.compactType)(this.props),this.props.allowOverlap),mounted:!1,oldDragItem:null,oldLayout:null,oldResizeItem:null,resizing:!1,droppingDOMNode:null,children:[]}),Bc(this,"dragEnterCounter",0),Bc(this,"onDragStart",(t,r,n,o)=>{let{e:a,node:i}=o,{layout:s}=this.state,l=(0,Vr.getLayoutItem)(s,t);if(!l)return;let c={w:l.w,h:l.h,x:l.x,y:l.y,placeholder:!0,i:t};return this.setState({oldDragItem:(0,Vr.cloneLayoutItem)(l),oldLayout:s,activeDrag:c}),this.props.onDragStart(s,l,l,null,a,i)}),Bc(this,"onDrag",(t,r,n,o)=>{let{e:a,node:i}=o,{oldDragItem:s}=this.state,{layout:l}=this.state,{cols:c,allowOverlap:u,preventCollision:d}=this.props,f=(0,Vr.getLayoutItem)(l,t);if(!f)return;let p={w:f.w,h:f.h,x:f.x,y:f.y,placeholder:!0,i:t},m=!0;l=(0,Vr.moveElement)(l,f,r,n,m,d,(0,Vr.compactType)(this.props),c,u),this.props.onDrag(l,s,f,p,a,i),this.setState({layout:u?l:(0,Vr.compact)(l,(0,Vr.compactType)(this.props),c),activeDrag:p})}),Bc(this,"onDragStop",(t,r,n,o)=>{let{e:a,node:i}=o;if(!this.state.activeDrag)return;let{oldDragItem:s}=this.state,{layout:l}=this.state,{cols:c,preventCollision:u,allowOverlap:d}=this.props,f=(0,Vr.getLayoutItem)(l,t);if(!f)return;let p=!0;l=(0,Vr.moveElement)(l,f,r,n,p,u,(0,Vr.compactType)(this.props),c,d);let m=d?l:(0,Vr.compact)(l,(0,Vr.compactType)(this.props),c);this.props.onDragStop(m,s,f,null,a,i);let{oldLayout:h}=this.state;this.setState({activeDrag:null,layout:m,oldDragItem:null,oldLayout:null}),this.onLayoutMaybeChanged(m,h)}),Bc(this,"onResizeStart",(t,r,n,o)=>{let{e:a,node:i}=o,{layout:s}=this.state,l=(0,Vr.getLayoutItem)(s,t);l&&(this.setState({oldResizeItem:(0,Vr.cloneLayoutItem)(l),oldLayout:this.state.layout,resizing:!0}),this.props.onResizeStart(s,l,l,null,a,i))}),Bc(this,"onResize",(t,r,n,o)=>{let{e:a,node:i,size:s,handle:l}=o,{oldResizeItem:c}=this.state,{layout:u}=this.state,{cols:d,preventCollision:f,allowOverlap:p}=this.props,m=!1,h,g,v,[y,x]=(0,Vr.withLayoutItem)(u,t,b=>{let C;return g=b.x,v=b.y,["sw","w","nw","n","ne"].indexOf(l)!==-1&&(["sw","nw","w"].indexOf(l)!==-1&&(g=b.x+(b.w-r),r=b.x!==g&&g<0?b.w:r,g=g<0?0:g),["ne","n","nw"].indexOf(l)!==-1&&(v=b.y+(b.h-n),n=b.y!==v&&v<0?b.h:n,v=v<0?0:v),m=!0),f&&!p&&(C=(0,Vr.getAllCollisions)(u,{...b,w:r,h:n,x:g,y:v}).filter(P=>P.i!==b.i).length>0,C&&(v=b.y,n=b.h,g=b.x,r=b.w,m=!1)),b.w=r,b.h=n,b});if(!x)return;h=y,m&&(h=(0,Vr.moveElement)(y,x,g,v,!0,this.props.preventCollision,(0,Vr.compactType)(this.props),d,p));let w={w:x.w,h:x.h,x:x.x,y:x.y,static:!0,i:t};this.props.onResize(h,c,x,w,a,i),this.setState({layout:p?h:(0,Vr.compact)(h,(0,Vr.compactType)(this.props),d),activeDrag:w})}),Bc(this,"onResizeStop",(t,r,n,o)=>{let{e:a,node:i}=o,{layout:s,oldResizeItem:l}=this.state,{cols:c,allowOverlap:u}=this.props,d=(0,Vr.getLayoutItem)(s,t),f=u?s:(0,Vr.compact)(s,(0,Vr.compactType)(this.props),c);this.props.onResizeStop(f,l,d,null,a,i);let{oldLayout:p}=this.state;this.setState({activeDrag:null,layout:f,oldResizeItem:null,oldLayout:null,resizing:!1}),this.onLayoutMaybeChanged(f,p)}),Bc(this,"onDragOver",t=>{if(t.preventDefault(),t.stopPropagation(),YGe&&!t.nativeEvent.target?.classList.contains(KGe))return!1;let{droppingItem:r,onDropDragOver:n,margin:o,cols:a,rowHeight:i,maxRows:s,width:l,containerPadding:c,transformScale:u}=this.props,d=n?.(t);if(d===!1)return this.state.droppingDOMNode&&this.removeDroppingPlaceholder(),!1;let f={...r,...d},{layout:p}=this.state,m=t.currentTarget.getBoundingClientRect(),h=t.clientX-m.left,g=t.clientY-m.top,v={left:h/u,top:g/u,e:t};if(this.state.droppingDOMNode){if(this.state.droppingPosition){let{left:y,top:x}=this.state.droppingPosition;(y!=h||x!=g)&&this.setState({droppingPosition:v})}}else{let y={cols:a,margin:o,maxRows:s,rowHeight:i,containerWidth:l,containerPadding:c||o},x=(0,tXt.calcXY)(y,g,h,f.w,f.h);this.setState({droppingDOMNode:o1.createElement("div",{key:f.i}),droppingPosition:v,layout:[...p,{...f,x:x.x,y:x.y,static:!1,isDraggable:!0}]})}}),Bc(this,"removeDroppingPlaceholder",()=>{let{droppingItem:t,cols:r}=this.props,{layout:n}=this.state,o=(0,Vr.compact)(n.filter(a=>a.i!==t.i),(0,Vr.compactType)(this.props),r,this.props.allowOverlap);this.setState({layout:o,droppingDOMNode:null,activeDrag:null,droppingPosition:void 0})}),Bc(this,"onDragLeave",t=>{t.preventDefault(),t.stopPropagation(),this.dragEnterCounter--,this.dragEnterCounter===0&&this.removeDroppingPlaceholder()}),Bc(this,"onDragEnter",t=>{t.preventDefault(),t.stopPropagation(),this.dragEnterCounter++}),Bc(this,"onDrop",t=>{t.preventDefault(),t.stopPropagation();let{droppingItem:r}=this.props,{layout:n}=this.state,o=n.find(a=>a.i===r.i);this.dragEnterCounter=0,this.removeDroppingPlaceholder(),this.props.onDrop(n,o,t)})}componentDidMount(){this.setState({mounted:!0}),this.onLayoutMaybeChanged(this.state.layout,this.props.layout)}static getDerivedStateFromProps(t,r){let n;return r.activeDrag?null:(!(0,fse.deepEqual)(t.layout,r.propsLayout)||t.compactType!==r.compactType?n=t.layout:(0,Vr.childrenEqual)(t.children,r.children)||(n=r.layout),n?{layout:(0,Vr.synchronizeLayoutWithChildren)(n,t.children,t.cols,(0,Vr.compactType)(t),t.allowOverlap),compactType:t.compactType,children:t.children,propsLayout:t.layout}:null)}shouldComponentUpdate(t,r){return this.props.children!==t.children||!(0,Vr.fastRGLPropsEqual)(this.props,t,fse.deepEqual)||this.state.activeDrag!==r.activeDrag||this.state.mounted!==r.mounted||this.state.droppingPosition!==r.droppingPosition}componentDidUpdate(t,r){if(!this.state.activeDrag){let n=this.state.layout,o=r.layout;this.onLayoutMaybeChanged(n,o)}}containerHeight(){if(!this.props.autoSize)return;let t=(0,Vr.bottom)(this.state.layout),r=this.props.containerPadding?this.props.containerPadding[1]:this.props.margin[1];return t*this.props.rowHeight+(t-1)*this.props.margin[1]+r*2+"px"}onLayoutMaybeChanged(t,r){r||(r=this.state.layout),(0,fse.deepEqual)(r,t)||this.props.onLayoutChange(t)}placeholder(){let{activeDrag:t}=this.state;if(!t)return null;let{width:r,cols:n,margin:o,containerPadding:a,rowHeight:i,maxRows:s,useCSSTransforms:l,transformScale:c}=this.props;return o1.createElement(GGe.default,{w:t.w,h:t.h,x:t.x,y:t.y,i:t.i,className:`react-grid-placeholder ${this.state.resizing?"placeholder-resizing":""}`,containerWidth:r,cols:n,margin:o,containerPadding:a||o,maxRows:s,rowHeight:i,isDraggable:!1,isResizable:!1,isBounded:!1,useCSSTransforms:l,transformScale:c},o1.createElement("div",null))}processGridItem(t,r){if(!t||!t.key)return;let n=(0,Vr.getLayoutItem)(this.state.layout,String(t.key));if(!n)return null;let{width:o,cols:a,margin:i,containerPadding:s,rowHeight:l,maxRows:c,isDraggable:u,isResizable:d,isBounded:f,useCSSTransforms:p,transformScale:m,draggableCancel:h,draggableHandle:g,resizeHandles:v,resizeHandle:y}=this.props,{mounted:x,droppingPosition:w}=this.state,b=typeof n.isDraggable=="boolean"?n.isDraggable:!n.static&&u,C=typeof n.isResizable=="boolean"?n.isResizable:!n.static&&d,S=n.resizeHandles||v,P=b&&f&&n.isBounded!==!1;return o1.createElement(GGe.default,{containerWidth:o,cols:a,margin:i,containerPadding:s||i,maxRows:c,rowHeight:l,cancel:h,handle:g,onDragStop:this.onDragStop,onDragStart:this.onDragStart,onDrag:this.onDrag,onResizeStart:this.onResizeStart,onResize:this.onResize,onResizeStop:this.onResizeStop,isDraggable:b,isResizable:C,isBounded:P,useCSSTransforms:p&&x,usePercentages:!x,transformScale:m,w:n.w,h:n.h,x:n.x,y:n.y,i:n.i,minH:n.minH,minW:n.minW,maxH:n.maxH,maxW:n.maxW,static:n.static,droppingPosition:r?w:void 0,resizeHandles:S,resizeHandle:y},t)}render(){let{className:t,style:r,isDroppable:n,innerRef:o}=this.props,a=(0,eXt.default)(KGe,t),i={height:this.containerHeight(),...r};return o1.createElement("div",{ref:o,className:a,style:i,onDrop:n?this.onDrop:Vr.noop,onDragLeave:n?this.onDragLeave:Vr.noop,onDragEnter:n?this.onDragEnter:Vr.noop,onDragOver:n?this.onDragOver:Vr.noop},o1.Children.map(this.props.children,s=>this.processGridItem(s)),n&&this.state.droppingDOMNode&&this.processGridItem(this.state.droppingDOMNode,!0),this.placeholder())}};Lq.default=UN;Bc(UN,"displayName","ReactGridLayout");Bc(UN,"propTypes",rXt.default);Bc(UN,"defaultProps",{autoSize:!0,cols:12,className:"",style:{},draggableHandle:"",draggableCancel:"",containerPadding:null,rowHeight:150,maxRows:1/0,layout:[],margin:[10,10],isBounded:!1,isDraggable:!0,isResizable:!0,allowOverlap:!1,isDroppable:!1,useCSSTransforms:!0,transformScale:1,verticalCompact:!0,compactType:"vertical",preventCollision:!1,droppingItem:{i:"__dropping-elem__",h:1,w:1},resizeHandles:["se"],onLayoutChange:Vr.noop,onDragStart:Vr.noop,onDrag:Vr.noop,onDragStop:Vr.noop,onResizeStart:Vr.noop,onResize:Vr.noop,onResizeStop:Vr.noop,onDrop:Vr.noop,onDropDragOver:Vr.noop})});var gse=de(zN=>{"use strict";Object.defineProperty(zN,"__esModule",{value:!0});zN.findOrGenerateResponsiveLayout=sXt;zN.getBreakpointFromWidth=aXt;zN.getColsFromBreakpoint=iXt;zN.sortBreakpoints=hse;var Eq=e1();function aXt(e,t){let r=hse(e),n=r[0];for(let o=1,a=r.length;o<a;o++){let i=r[o];t>e[i]&&(n=i)}return n}function iXt(e,t){if(!t[e])throw new Error("ResponsiveReactGridLayout: `cols` entry for breakpoint "+e+" is missing!");return t[e]}function sXt(e,t,r,n,o,a){if(e[r])return(0,Eq.cloneLayout)(e[r]);let i=e[n],s=hse(t),l=s.slice(s.indexOf(r));for(let c=0,u=l.length;c<u;c++){let d=l[c];if(e[d]){i=e[d];break}}return i=(0,Eq.cloneLayout)(i||[]),(0,Eq.compact)((0,Eq.correctBounds)(i,{cols:o}),a,o)}function hse(e){return Object.keys(e).sort(function(r,n){return e[r]-e[n]})}});var t8e=de(_q=>{"use strict";Object.defineProperty(_q,"__esModule",{value:!0});_q.default=void 0;var QGe=e8e(ue()),yd=JGe(Hg()),vse=fq(),HN=e1(),a1=gse(),lXt=JGe(mse());function JGe(e){return e&&e.__esModule?e:{default:e}}function e8e(e,t){if(typeof WeakMap=="function")var r=new WeakMap,n=new WeakMap;return(e8e=function(o,a){if(!a&&o&&o.__esModule)return o;var i,s,l={__proto__:null,default:o};if(o===null||typeof o!="object"&&typeof o!="function")return l;if(i=a?n:r){if(i.has(o))return i.get(o);i.set(o,l)}for(let c in o)c!=="default"&&{}.hasOwnProperty.call(o,c)&&((s=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(o,c))&&(s.get||s.set)?i(l,c,s):l[c]=o[c]);return l})(e,t)}function yse(){return yse=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},yse.apply(null,arguments)}function Oq(e,t,r){return(t=cXt(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function cXt(e){var t=uXt(e,"string");return typeof t=="symbol"?t:t+""}function uXt(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ZGe=e=>Object.prototype.toString.call(e);function Dq(e,t){return e==null?null:Array.isArray(e)?e:e[t]}var O2=class extends QGe.Component{constructor(){super(...arguments),Oq(this,"state",this.generateInitialState()),Oq(this,"onLayoutChange",t=>{this.props.onLayoutChange(t,{...this.props.layouts,[this.state.breakpoint]:t})})}generateInitialState(){let{width:t,breakpoints:r,layouts:n,cols:o}=this.props,a=(0,a1.getBreakpointFromWidth)(r,t),i=(0,a1.getColsFromBreakpoint)(a,o),s=this.props.verticalCompact===!1?null:this.props.compactType;return{layout:(0,a1.findOrGenerateResponsiveLayout)(n,r,a,a,i,s),breakpoint:a,cols:i}}static getDerivedStateFromProps(t,r){if(!(0,vse.deepEqual)(t.layouts,r.layouts)){let{breakpoint:n,cols:o}=r;return{layout:(0,a1.findOrGenerateResponsiveLayout)(t.layouts,t.breakpoints,n,n,o,t.compactType),layouts:t.layouts}}return null}componentDidUpdate(t){(this.props.width!=t.width||this.props.breakpoint!==t.breakpoint||!(0,vse.deepEqual)(this.props.breakpoints,t.breakpoints)||!(0,vse.deepEqual)(this.props.cols,t.cols))&&this.onWidthChange(t)}onWidthChange(t){let{breakpoints:r,cols:n,layouts:o,compactType:a}=this.props,i=this.props.breakpoint||(0,a1.getBreakpointFromWidth)(this.props.breakpoints,this.props.width),s=this.state.breakpoint,l=(0,a1.getColsFromBreakpoint)(i,n),c={...o};if(s!==i||t.breakpoints!==r||t.cols!==n){s in c||(c[s]=(0,HN.cloneLayout)(this.state.layout));let f=(0,a1.findOrGenerateResponsiveLayout)(c,r,i,s,l,a);f=(0,HN.synchronizeLayoutWithChildren)(f,this.props.children,l,a,this.props.allowOverlap),c[i]=f,this.props.onBreakpointChange(i,l),this.props.onLayoutChange(f,c),this.setState({breakpoint:i,layout:f,cols:l})}let u=Dq(this.props.margin,i),d=Dq(this.props.containerPadding,i);this.props.onWidthChange(this.props.width,u,l,d)}render(){let{breakpoint:t,breakpoints:r,cols:n,layouts:o,margin:a,containerPadding:i,onBreakpointChange:s,onLayoutChange:l,onWidthChange:c,...u}=this.props;return QGe.createElement(lXt.default,yse({},u,{margin:Dq(a,this.state.breakpoint),containerPadding:Dq(i,this.state.breakpoint),onLayoutChange:this.onLayoutChange,layout:this.state.layout,cols:this.state.cols}))}};_q.default=O2;Oq(O2,"propTypes",{breakpoint:yd.default.string,breakpoints:yd.default.object,allowOverlap:yd.default.bool,cols:yd.default.object,margin:yd.default.oneOfType([yd.default.array,yd.default.object]),containerPadding:yd.default.oneOfType([yd.default.array,yd.default.object]),layouts(e,t){if(ZGe(e[t])!=="[object Object]")throw new Error("Layout property must be an object. Received: "+ZGe(e[t]));Object.keys(e[t]).forEach(r=>{if(!(r in e.breakpoints))throw new Error("Each key in layouts must align with a key in breakpoints.");(0,HN.validateLayout)(e.layouts[r],"layouts."+r)})},width:yd.default.number.isRequired,onBreakpointChange:yd.default.func,onLayoutChange:yd.default.func,onWidthChange:yd.default.func});Oq(O2,"defaultProps",{breakpoints:{lg:1200,md:996,sm:768,xs:480,xxs:0},cols:{lg:12,md:10,sm:6,xs:4,xxs:2},containerPadding:{lg:null,md:null,sm:null,xs:null,xxs:null},layouts:{},margin:[10,10],allowOverlap:!1,onBreakpointChange:HN.noop,onLayoutChange:HN.noop,onWidthChange:HN.noop})});var l8e={};XF(l8e,{default:()=>MXt});function pXt(e,t){var r=!1,n=!1,o=0;function a(){r&&(r=!1,e()),n&&s()}function i(){dXt(a)}function s(){var l=Date.now();if(r){if(l-o<fXt)return;n=!0}else r=!0,n=!1,setTimeout(i,t);o=l}return s}function Bq(e){return parseFloat(e)||0}function r8e(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return t.reduce(function(n,o){var a=e["border-"+o+"-width"];return n+Bq(a)},0)}function yXt(e){for(var t=["top","right","bottom","left"],r={},n=0,o=t;n<o.length;n++){var a=o[n],i=e["padding-"+a];r[a]=Bq(i)}return r}function xXt(e){var t=e.getBBox();return Vq(0,0,t.width,t.height)}function bXt(e){var t=e.clientWidth,r=e.clientHeight;if(!t&&!r)return a8e;var n=jN(e).getComputedStyle(e),o=yXt(n),a=o.left+o.right,i=o.top+o.bottom,s=Bq(n.width),l=Bq(n.height);if(n.boxSizing==="border-box"&&(Math.round(s+a)!==t&&(s-=r8e(n,"left","right")+a),Math.round(l+i)!==r&&(l-=r8e(n,"top","bottom")+i)),!CXt(e)){var c=Math.round(s+a)-t,u=Math.round(l+i)-r;Math.abs(c)!==1&&(s-=c),Math.abs(u)!==1&&(l-=u)}return Vq(o.left,o.top,s,l)}function CXt(e){return e===jN(e).document.documentElement}function SXt(e){return xse?wXt(e)?xXt(e):bXt(e):a8e}function PXt(e){var t=e.x,r=e.y,n=e.width,o=e.height,a=typeof DOMRectReadOnly<"u"?DOMRectReadOnly:Object,i=Object.create(a.prototype);return o8e(i,{x:t,y:r,width:n,height:o,top:r,right:t+n,bottom:o+r,left:t}),i}function Vq(e,t,r,n){return{x:e,y:t,width:r,height:n}}var n8e,xse,Fq,dXt,fXt,mXt,hXt,gXt,vXt,o8e,jN,a8e,wXt,IXt,kXt,RXt,i8e,s8e,NXt,MXt,c8e=snt(()=>{n8e=function(){if(typeof Map<"u")return Map;function e(t,r){var n=-1;return t.some(function(o,a){return o[0]===r?(n=a,!0):!1}),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(r){var n=e(this.__entries__,r),o=this.__entries__[n];return o&&o[1]},t.prototype.set=function(r,n){var o=e(this.__entries__,r);~o?this.__entries__[o][1]=n:this.__entries__.push([r,n])},t.prototype.delete=function(r){var n=this.__entries__,o=e(n,r);~o&&n.splice(o,1)},t.prototype.has=function(r){return!!~e(this.__entries__,r)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(r,n){n===void 0&&(n=null);for(var o=0,a=this.__entries__;o<a.length;o++){var i=a[o];r.call(n,i[1],i[0])}},t}()}(),xse=typeof window<"u"&&typeof document<"u"&&window.document===document,Fq=function(){return typeof global<"u"&&global.Math===Math?global:typeof self<"u"&&self.Math===Math?self:typeof window<"u"&&window.Math===Math?window:Function("return this")()}(),dXt=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(Fq):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)}}(),fXt=2;mXt=20,hXt=["top","right","bottom","left","width","height","size","weight"],gXt=typeof MutationObserver<"u",vXt=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=pXt(this.refresh.bind(this),mXt)}return e.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},e.prototype.removeObserver=function(t){var r=this.observers_,n=r.indexOf(t);~n&&r.splice(n,1),!r.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){var t=this.updateObservers_();t&&this.refresh()},e.prototype.updateObservers_=function(){var t=this.observers_.filter(function(r){return r.gatherActive(),r.hasActive()});return t.forEach(function(r){return r.broadcastActive()}),t.length>0},e.prototype.connect_=function(){!xse||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),gXt?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){!xse||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(t){var r=t.propertyName,n=r===void 0?"":r,o=hXt.some(function(a){return!!~n.indexOf(a)});o&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),o8e=function(e,t){for(var r=0,n=Object.keys(t);r<n.length;r++){var o=n[r];Object.defineProperty(e,o,{value:t[o],enumerable:!1,writable:!1,configurable:!0})}return e},jN=function(e){var t=e&&e.ownerDocument&&e.ownerDocument.defaultView;return t||Fq},a8e=Vq(0,0,0,0);wXt=function(){return typeof SVGGraphicsElement<"u"?function(e){return e instanceof jN(e).SVGGraphicsElement}:function(e){return e instanceof jN(e).SVGElement&&typeof e.getBBox=="function"}}();IXt=function(){function e(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=Vq(0,0,0,0),this.target=t}return e.prototype.isActive=function(){var t=SXt(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t},e}(),kXt=function(){function e(t,r){var n=PXt(r);o8e(this,{target:t,contentRect:n})}return e}(),RXt=function(){function e(t,r,n){if(this.activeObservations_=[],this.observations_=new n8e,typeof t!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=r,this.callbackCtx_=n}return e.prototype.observe=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(t instanceof jN(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var r=this.observations_;r.has(t)||(r.set(t,new IXt(t)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(t instanceof jN(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var r=this.observations_;r.has(t)&&(r.delete(t),r.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach(function(r){r.isActive()&&t.activeObservations_.push(r)})},e.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,r=this.activeObservations_.map(function(n){return new kXt(n.target,n.broadcastRect())});this.callback_.call(t,r,t),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),i8e=typeof WeakMap<"u"?new WeakMap:new n8e,s8e=function(){function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var r=vXt.getInstance(),n=new RXt(t,r,this);i8e.set(this,n)}return e}();["observe","unobserve","disconnect"].forEach(function(e){s8e.prototype[e]=function(){var t;return(t=i8e.get(this))[e].apply(t,arguments)}});NXt=function(){return typeof Fq.ResizeObserver<"u"?Fq.ResizeObserver:s8e}(),MXt=NXt});var d8e=de(Cse=>{"use strict";Object.defineProperty(Cse,"__esModule",{value:!0});Cse.default=_Xt;var Uq=u8e(ue()),TXt=wse(Hg()),AXt=wse((c8e(),wfe(l8e))),LXt=wse(R2());function wse(e){return e&&e.__esModule?e:{default:e}}function u8e(e,t){if(typeof WeakMap=="function")var r=new WeakMap,n=new WeakMap;return(u8e=function(o,a){if(!a&&o&&o.__esModule)return o;var i,s,l={__proto__:null,default:o};if(o===null||typeof o!="object"&&typeof o!="function")return l;if(i=a?n:r){if(i.has(o))return i.get(o);i.set(o,l)}for(let c in o)c!=="default"&&{}.hasOwnProperty.call(o,c)&&((s=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(o,c))&&(s.get||s.set)?i(l,c,s):l[c]=o[c]);return l})(e,t)}function bse(){return bse=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},bse.apply(null,arguments)}function $N(e,t,r){return(t=EXt(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function EXt(e){var t=DXt(e,"string");return typeof t=="symbol"?t:t+""}function DXt(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var OXt="react-grid-layout";function _Xt(e){var t;return t=class extends Uq.Component{constructor(){super(...arguments),$N(this,"state",{width:1280}),$N(this,"elementRef",Uq.createRef()),$N(this,"mounted",!1),$N(this,"resizeObserver",void 0)}componentDidMount(){this.mounted=!0,this.resizeObserver=new AXt.default(o=>{if(this.elementRef.current instanceof HTMLElement){let i=o[0].contentRect.width;this.setState({width:i})}});let n=this.elementRef.current;n instanceof HTMLElement&&this.resizeObserver.observe(n)}componentWillUnmount(){this.mounted=!1;let n=this.elementRef.current;n instanceof HTMLElement&&this.resizeObserver.unobserve(n),this.resizeObserver.disconnect()}render(){let{measureBeforeMount:n,...o}=this.props;return n&&!this.mounted?Uq.createElement("div",{className:(0,LXt.default)(this.props.className,OXt),style:this.props.style,ref:this.elementRef}):Uq.createElement(e,bse({innerRef:this.elementRef},o,this.state))}},$N(t,"defaultProps",{measureBeforeMount:!1}),$N(t,"propTypes",{measureBeforeMount:TXt.default.bool}),t}});var f8e=de((TSn,i1)=>{i1.exports=mse().default;i1.exports.utils=e1();i1.exports.calculateUtils=gq();i1.exports.Responsive=t8e().default;i1.exports.Responsive.utils=gse();i1.exports.WidthProvider=d8e().default});var Ule=de((Vle,VKe)=>{(function(e,t){typeof define=="function"&&define.amd?define(t):typeof Vle=="object"?VKe.exports=t():e.NProgress=t()})(Vle,function(){var e={};e.version="0.2.0";var t=e.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'<div class="bar" role="bar"><div class="peg"></div></div><div class="spinner" role="spinner"><div class="spinner-icon"></div></div>'};e.configure=function(f){var p,m;for(p in f)m=f[p],m!==void 0&&f.hasOwnProperty(p)&&(t[p]=m);return this},e.status=null,e.set=function(f){var p=e.isStarted();f=r(f,t.minimum,1),e.status=f===1?null:f;var m=e.render(!p),h=m.querySelector(t.barSelector),g=t.speed,v=t.easing;return m.offsetWidth,a(function(y){t.positionUsing===""&&(t.positionUsing=e.getPositioningCSS()),i(h,o(f,g,v)),f===1?(i(m,{transition:"none",opacity:1}),m.offsetWidth,setTimeout(function(){i(m,{transition:"all "+g+"ms linear",opacity:0}),setTimeout(function(){e.remove(),y()},g)},g)):setTimeout(y,g)}),this},e.isStarted=function(){return typeof e.status=="number"},e.start=function(){e.status||e.set(0);var f=function(){setTimeout(function(){e.status&&(e.trickle(),f())},t.trickleSpeed)};return t.trickle&&f(),this},e.done=function(f){return!f&&!e.status?this:e.inc(.3+.5*Math.random()).set(1)},e.inc=function(f){var p=e.status;return p?(typeof f!="number"&&(f=(1-p)*r(Math.random()*p,.1,.95)),p=r(p+f,0,.994),e.set(p)):e.start()},e.trickle=function(){return e.inc(Math.random()*t.trickleRate)},function(){var f=0,p=0;e.promise=function(m){return!m||m.state()==="resolved"?this:(p===0&&e.start(),f++,p++,m.always(function(){p--,p===0?(f=0,e.done()):e.set((f-p)/f)}),this)}}(),e.render=function(f){if(e.isRendered())return document.getElementById("nprogress");l(document.documentElement,"nprogress-busy");var p=document.createElement("div");p.id="nprogress",p.innerHTML=t.template;var m=p.querySelector(t.barSelector),h=f?"-100":n(e.status||0),g=document.querySelector(t.parent),v;return i(m,{transition:"all 0 linear",transform:"translate3d("+h+"%,0,0)"}),t.showSpinner||(v=p.querySelector(t.spinnerSelector),v&&d(v)),g!=document.body&&l(g,"nprogress-custom-parent"),g.appendChild(p),p},e.remove=function(){c(document.documentElement,"nprogress-busy"),c(document.querySelector(t.parent),"nprogress-custom-parent");var f=document.getElementById("nprogress");f&&d(f)},e.isRendered=function(){return!!document.getElementById("nprogress")},e.getPositioningCSS=function(){var f=document.body.style,p="WebkitTransform"in f?"Webkit":"MozTransform"in f?"Moz":"msTransform"in f?"ms":"OTransform"in f?"O":"";return p+"Perspective"in f?"translate3d":p+"Transform"in f?"translate":"margin"};function r(f,p,m){return f<p?p:f>m?m:f}function n(f){return(-1+f)*100}function o(f,p,m){var h;return t.positionUsing==="translate3d"?h={transform:"translate3d("+n(f)+"%,0,0)"}:t.positionUsing==="translate"?h={transform:"translate("+n(f)+"%,0)"}:h={"margin-left":n(f)+"%"},h.transition="all "+p+"ms "+m,h}var a=function(){var f=[];function p(){var m=f.shift();m&&m(p)}return function(m){f.push(m),f.length==1&&p()}}(),i=function(){var f=["Webkit","O","Moz","ms"],p={};function m(y){return y.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,function(x,w){return w.toUpperCase()})}function h(y){var x=document.body.style;if(y in x)return y;for(var w=f.length,b=y.charAt(0).toUpperCase()+y.slice(1),C;w--;)if(C=f[w]+b,C in x)return C;return y}function g(y){return y=m(y),p[y]||(p[y]=h(y))}function v(y,x,w){x=g(x),y.style[x]=w}return function(y,x){var w=arguments,b,C;if(w.length==2)for(b in x)C=x[b],C!==void 0&&x.hasOwnProperty(b)&&v(y,b,C);else v(y,w[1],w[2])}}();function s(f,p){var m=typeof f=="string"?f:u(f);return m.indexOf(" "+p+" ")>=0}function l(f,p){var m=u(f),h=m+p;s(m,p)||(f.className=h.substring(1))}function c(f,p){var m=u(f),h;s(f,p)&&(h=m.replace(" "+p+" "," "),f.className=h.substring(1,h.length-1))}function u(f){return(" "+(f.className||"")+" ").replace(/\s+/gi," ")}function d(f){f&&f.parentNode&&f.parentNode.removeChild(f)}return e})});var Uur={};XF(Uur,{Accordion:()=>L4,AccordionContent:()=>_4,AccordionItem:()=>D4,AccordionTrigger:()=>O4,AdvancedCalendar:()=>tJ,AdvancedChart:()=>Iie,AdvancedForms:()=>gYt,Alert:()=>Yx,AlertDescription:()=>Qx,AlertTitle:()=>B4,AspectRatio:()=>U4,Avatar:()=>Da,AvatarFallback:()=>ti,AvatarImage:()=>_i,Badge:()=>dt,Breadcrumb:()=>j4,BreadcrumbEllipsis:()=>hL,BreadcrumbItem:()=>q4,BreadcrumbLink:()=>G4,BreadcrumbList:()=>$4,BreadcrumbPage:()=>K4,BreadcrumbSeparator:()=>W4,Button:()=>ne,Calendar:()=>Dv,CalendarPro:()=>tJ,Card:()=>Ve,CardContent:()=>ze,CardDescription:()=>ts,CardFooter:()=>BV,CardHeader:()=>vr,CardTitle:()=>Dr,ChartWidget:()=>ufe,Checkbox:()=>ql,ClaudeProvider:()=>iT,Collapsible:()=>HV,CollapsibleContent:()=>qV,CollapsibleTrigger:()=>jV,ColorPicker:()=>DI,Command:()=>Ob,CommandDialog:()=>uE,CommandEmpty:()=>eg,CommandGroup:()=>pp,CommandInput:()=>Jh,CommandItem:()=>rd,CommandList:()=>YI,CommandSeparator:()=>D5,CommandShortcut:()=>O5,Dashboard:()=>b8e,DataTable:()=>Ble,Dialog:()=>ba,DialogClose:()=>pY,DialogContent:()=>aa,DialogDescription:()=>wl,DialogFooter:()=>Pm,DialogHeader:()=>Ba,DialogTitle:()=>wa,DialogTrigger:()=>Rb,DraggableList:()=>hk,DropdownMenu:()=>Nr,DropdownMenuCheckboxItem:()=>H5,DropdownMenuContent:()=>Sr,DropdownMenuGroup:()=>bQ,DropdownMenuItem:()=>Ue,DropdownMenuLabel:()=>tg,DropdownMenuPortal:()=>wQ,DropdownMenuRadioGroup:()=>CQ,DropdownMenuRadioItem:()=>j5,DropdownMenuSeparator:()=>Gr,DropdownMenuShortcut:()=>$5,DropdownMenuSub:()=>nd,DropdownMenuSubContent:()=>uu,DropdownMenuSubTrigger:()=>cu,DropdownMenuTrigger:()=>Mr,ErrorBoundary:()=>Cwt,FloatingActionButton:()=>gMe,FormWizard:()=>jZt,FormWizardNavigation:()=>CW,FormWizardProgress:()=>xW,FormWizardStep:()=>wW,FunnelWidget:()=>ffe,GalleryItem:()=>pMe,GaugeWidget:()=>dfe,GeminiProvider:()=>oT,GestureDrawer:()=>lMe,GitHubStars:()=>xYt,HealthCheck:()=>wYt,HoverCard:()=>EE,HoverCard3D:()=>xMe,HoverCardContent:()=>dk,HoverCardTrigger:()=>DE,Input:()=>Jt,KPIWidget:()=>lfe,Kanban:()=>nJ,LANGUAGE_COLORS:()=>l1,Label:()=>Pt,LazyComponent:()=>IYt,LazyImage:()=>SYt,LazyList:()=>PYt,LightboxContent:()=>jC,LightboxProvider:()=>mk,LightboxTrigger:()=>HC,MagneticButton:()=>wMe,MediaGallery:()=>fMe,MemoryAnalytics:()=>P2e,MemoryEfficientData:()=>Jte,MoonUIAccordionContentPro:()=>_4,MoonUIAccordionItemPro:()=>D4,MoonUIAccordionPro:()=>L4,MoonUIAccordionTriggerPro:()=>O4,MoonUIAdvancedChartPro:()=>ZWe,MoonUIAlertDescriptionPro:()=>Qx,MoonUIAlertPro:()=>Yx,MoonUIAlertTitlePro:()=>B4,MoonUIAnimatedButtonPro:()=>ZZ,MoonUIAspectRatioPro:()=>U4,MoonUIAsyncAvatarPro:()=>sfe,MoonUIAvatarFallbackPro:()=>ti,MoonUIAvatarGroupPro:()=>ife,MoonUIAvatarImagePro:()=>_i,MoonUIAvatarPro:()=>A8,MoonUIBadgePro:()=>dt,MoonUIBreadcrumbEllipsisPro:()=>hL,MoonUIBreadcrumbItemPro:()=>q4,MoonUIBreadcrumbLinkPro:()=>G4,MoonUIBreadcrumbListPro:()=>$4,MoonUIBreadcrumbPagePro:()=>K4,MoonUIBreadcrumbPro:()=>j4,MoonUIBreadcrumbSeparatorPro:()=>W4,MoonUIButtonPro:()=>ne,MoonUICardContentPro:()=>ze,MoonUICardDescriptionPro:()=>ts,MoonUICardFooterPro:()=>BV,MoonUICardHeaderPro:()=>vr,MoonUICardPro:()=>Ve,MoonUICardTitlePro:()=>Dr,MoonUIChartWidget:()=>ufe,MoonUICheckboxPro:()=>ql,MoonUICollapsibleContentPro:()=>qV,MoonUICollapsiblePro:()=>HV,MoonUICollapsibleTriggerPro:()=>jV,MoonUIColorPickerPro:()=>DI,MoonUICommandDialogPro:()=>uE,MoonUICommandEmptyPro:()=>eg,MoonUICommandGroupPro:()=>pp,MoonUICommandInputPro:()=>Jh,MoonUICommandItemPro:()=>rd,MoonUICommandListPro:()=>YI,MoonUICommandPro:()=>Ob,MoonUICommandSeparatorPro:()=>D5,MoonUICommandShortcutPro:()=>O5,MoonUICreditCardInputPro:()=>GKe,MoonUIDashboardPro:()=>HXt,MoonUIDataTable:()=>_Zt,MoonUIDataTablePro:()=>FZt,MoonUIDialogClosePro:()=>pY,MoonUIDialogContentPro:()=>aa,MoonUIDialogDescriptionPro:()=>wl,MoonUIDialogFooterPro:()=>Pm,MoonUIDialogHeaderPro:()=>Ba,MoonUIDialogPro:()=>ba,MoonUIDialogTitlePro:()=>wa,MoonUIDialogTriggerPro:()=>Rb,MoonUIDraggableListPro:()=>hk,MoonUIDropdownMenuCheckboxItemPro:()=>H5,MoonUIDropdownMenuContentPro:()=>Sr,MoonUIDropdownMenuGroupPro:()=>bQ,MoonUIDropdownMenuItemPro:()=>Ue,MoonUIDropdownMenuLabelPro:()=>tg,MoonUIDropdownMenuPortalPro:()=>wQ,MoonUIDropdownMenuPro:()=>Nr,MoonUIDropdownMenuRadioGroupPro:()=>CQ,MoonUIDropdownMenuRadioItemPro:()=>j5,MoonUIDropdownMenuSeparatorPro:()=>Gr,MoonUIDropdownMenuShortcutPro:()=>$5,MoonUIDropdownMenuSubContentPro:()=>uu,MoonUIDropdownMenuSubPro:()=>nd,MoonUIDropdownMenuSubTriggerPro:()=>cu,MoonUIDropdownMenuTriggerPro:()=>Mr,MoonUIFileUploadPro:()=>o9e,MoonUIFormWizardPro:()=>n_,MoonUIFunnelWidget:()=>ffe,MoonUIGalleryItemPro:()=>pMe,MoonUIGaugeWidget:()=>dfe,MoonUIGestureDrawerPro:()=>uz,MoonUIInputPro:()=>Jt,MoonUIKPIWidget:()=>lfe,MoonUILabelPro:()=>Pt,MoonUILightboxContentPro:()=>jC,MoonUILightboxPro:()=>bwt,MoonUILightboxProviderPro:()=>mk,MoonUILightboxTriggerPro:()=>HC,MoonUIMediaGalleryPro:()=>fMe,MoonUIMemoryEfficientDataPro:()=>k2e,MoonUINavbarPro:()=>zZt,MoonUIPaginationContentPro:()=>W5,MoonUIPaginationEllipsisPro:()=>Y5,MoonUIPaginationItemPro:()=>G5,MoonUIPaginationLinkPro:()=>ZI,MoonUIPaginationNextPro:()=>X5,MoonUIPaginationPreviousPro:()=>K5,MoonUIPaginationPro:()=>q5,MoonUIPhoneNumberInputPro:()=>j2,MoonUIPhoneNumberInputSimple:()=>Lse,MoonUIPopoverContentPro:()=>ki,MoonUIPopoverPro:()=>Vi,MoonUIPopoverTriggerPro:()=>Ui,MoonUIProgressPro:()=>Mo,MoonUIQuizFormPro:()=>jle,MoonUIRadioGroupContextPro:()=>bE,MoonUIRadioGroupItemPro:()=>ty,MoonUIRadioGroupPro:()=>AC,MoonUIRadioItemWithLabelPro:()=>aU,MoonUIRadioLabelPro:()=>wE,MoonUIRevenueWidget:()=>pfe,MoonUIRichTextEditorPro:()=>jMt,MoonUISelectContentPro:()=>Wo,MoonUISelectGroupPro:()=>E5,MoonUISelectItemPro:()=>Vt,MoonUISelectLabelPro:()=>lE,MoonUISelectPro:()=>$o,MoonUISelectSeparatorPro:()=>cE,MoonUISelectTriggerPro:()=>qo,MoonUISelectValuePro:()=>ia,MoonUISelectableVirtualListPro:()=>KMt,MoonUISeparatorPro:()=>Is,MoonUIServerMonitorWidget:()=>mfe,MoonUISidebarPro:()=>VZt,MoonUISkeletonPro:()=>Ca,MoonUISliderPro:()=>jb,MoonUISwipeableCardPro:()=>XMt,MoonUISwitchPro:()=>sg,MoonUITableBodyPro:()=>xU,MoonUITableCaptionPro:()=>PU,MoonUITableCellPro:()=>SU,MoonUITableFooterPro:()=>bU,MoonUITableHeadPro:()=>CU,MoonUITableHeaderPro:()=>yU,MoonUITablePro:()=>vU,MoonUITableRowPro:()=>wU,MoonUITabsContentPro:()=>QQ,MoonUITabsEnhanced:()=>MU,MoonUITabsListPro:()=>XQ,MoonUITabsPro:()=>MU,MoonUITabsTriggerPro:()=>YQ,MoonUITextareaPro:()=>mu,MoonUITimelinePro:()=>JMt,MoonUIToastPro:()=>EU,MoonUITogglePro:()=>_U,MoonUITooltipContentPro:()=>ns,MoonUITooltipPro:()=>ws,MoonUITooltipProviderPro:()=>Ys,MoonUITooltipTriggerPro:()=>Cs,MoonUIVirtualListPro:()=>GMt,MoonUIWidgetBase:()=>_u,MoonUIalertVariantsPro:()=>F4,MoonUIaspectRatioVariantsPro:()=>V4,MoonUIbreadcrumbVariantsPro:()=>H4,MoonUIcollapsibleContentVariantsPro:()=>$V,MoonUIcollapsibleTriggerVariantsPro:()=>$L,MoonUIradioGroupItemVariantsPro:()=>oU,MoonUItableVariantsPro:()=>gU,MoonUItoggleVariantsPro:()=>OU,Navbar:()=>zKe,NavigationMenu:()=>_E,NavigationMenuContent:()=>zE,NavigationMenuIndicator:()=>XZ,NavigationMenuItem:()=>BE,NavigationMenuLink:()=>HE,NavigationMenuList:()=>FE,NavigationMenuTrigger:()=>UE,NavigationMenuViewport:()=>lz,OpenAIProvider:()=>aT,OptimizedImage:()=>RYt,Pagination:()=>q5,PaginationContent:()=>W5,PaginationEllipsis:()=>Y5,PaginationItem:()=>G5,PaginationLink:()=>ZI,PaginationNext:()=>X5,PaginationPrevious:()=>K5,PerformanceDebugger:()=>MYt,PerformanceMonitor:()=>AYt,PhoneNumberInput:()=>mYt,PinchZoom:()=>SMe,Popover:()=>Vi,PopoverContent:()=>ki,PopoverTrigger:()=>Ui,Progress:()=>Mo,QuizForm:()=>WZt,RadioGroup:()=>AC,RadioGroupContext:()=>bE,RadioGroupItem:()=>ty,RadioItemWithLabel:()=>aU,RadioLabel:()=>wE,RealTimePerformanceMonitor:()=>Zte,RevenueWidget:()=>pfe,RichTextEditor:()=>jMt,ScrollArea:()=>Pc,ScrollBar:()=>dU,Select:()=>$o,SelectContent:()=>Wo,SelectGroup:()=>E5,SelectItem:()=>Vt,SelectLabel:()=>lE,SelectSeparator:()=>cE,SelectTrigger:()=>qo,SelectValue:()=>ia,SelectableVirtualList:()=>M2e,Separator:()=>Is,ServerMonitorWidget:()=>mfe,Sheet:()=>zb,SheetClose:()=>fke,SheetContent:()=>ry,SheetDescription:()=>IE,SheetFooter:()=>WQ,SheetHeader:()=>SE,SheetOverlay:()=>mU,SheetPortal:()=>qQ,SheetTitle:()=>PE,SheetTrigger:()=>pU,Sidebar:()=>UKe,SimpleLightbox:()=>bwt,Skeleton:()=>Ca,Slider:()=>jb,SpotlightCard:()=>IMe,SwipeableCard:()=>tre,Switch:()=>sg,Table:()=>vU,TableBody:()=>xU,TableCaption:()=>PU,TableCell:()=>SU,TableFooter:()=>bU,TableHead:()=>CU,TableHeader:()=>yU,TableRow:()=>wU,Tabs:()=>Sl,TabsContent:()=>Xn,TabsList:()=>el,TabsTrigger:()=>Dn,Textarea:()=>mu,Timeline:()=>E2e,Toast:()=>EU,Toggle:()=>_U,Tooltip:()=>ws,TooltipContent:()=>ns,TooltipProvider:()=>Ys,TooltipTrigger:()=>Cs,VirtualList:()=>N2e,WidgetBase:()=>_u,alertVariants:()=>F4,aspectRatioVariants:()=>V4,badgeVariants:()=>z4,breadcrumbVariants:()=>H4,buttonVariants:()=>Ku,cn:()=>B,collapsibleContentVariants:()=>$V,collapsibleTriggerVariants:()=>$L,commandVariantsPro:()=>YY,createAIProvider:()=>Z1,galleryItemVariants:()=>dz,galleryVariants:()=>dMe,getExpandableColumn:()=>DZt,hoverCard3DVariants:()=>vMe,moonUIAnimatedButtonProVariants:()=>QZ,moonUIAvatarBadgeVariants:()=>afe,moonUIAvatarProVariants:()=>T8,moonUIAvatarStatusVariants:()=>ofe,moonUIBadgeVariantsPro:()=>z4,moonUIButtonProVariants:()=>Ku,moonUIGestureDrawerProVariants:()=>YZ,moonUISeparatorVariantsPro:()=>fU,navigationMenuTriggerStyle:()=>VE,phoneCountries:()=>Yq,radioGroupItemVariants:()=>oU,separatorVariants:()=>fU,tableVariants:()=>gU,toggleVariants:()=>OU,useAccordionAnalytics:()=>Qge,useCollapsibleAnalytics:()=>H0e,useExpandableRows:()=>OZt,useFormWizard:()=>z0,useStreamingData:()=>I2e,useVirtualList:()=>qMt});function Sfe(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=Sfe(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function tT(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=Sfe(e))&&(n&&(n+=" "),n+=t);return n}var vt=tT;var F8="-",lnt=e=>{let t=unt(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:i=>{let s=i.split(F8);return s[0]===""&&s.length!==1&&s.shift(),kfe(s,t)||cnt(i)},getConflictingClassGroupIds:(i,s)=>{let l=r[i]||[];return s&&n[i]?[...l,...n[i]]:l}}},kfe=(e,t)=>{if(e.length===0)return t.classGroupId;let r=e[0],n=t.nextPart.get(r),o=n?kfe(e.slice(1),n):void 0;if(o)return o;if(t.validators.length===0)return;let a=e.join(F8);return t.validators.find(({validator:i})=>i(a))?.classGroupId},Pfe=/^\[(.+)\]$/,cnt=e=>{if(Pfe.test(e)){let t=Pfe.exec(e)[1],r=t?.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},unt=e=>{let{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return fnt(Object.entries(e.classGroups),r).forEach(([a,i])=>{_8(i,n,a,t)}),n},_8=(e,t,r,n)=>{e.forEach(o=>{if(typeof o=="string"){let a=o===""?t:Ife(t,o);a.classGroupId=r;return}if(typeof o=="function"){if(dnt(o)){_8(o(n),t,r,n);return}t.validators.push({validator:o,classGroupId:r});return}Object.entries(o).forEach(([a,i])=>{_8(i,Ife(t,a),r,n)})})},Ife=(e,t)=>{let r=e;return t.split(F8).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},dnt=e=>e.isThemeGetter,fnt=(e,t)=>t?e.map(([r,n])=>{let o=n.map(a=>typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([i,s])=>[t+i,s])):a);return[r,o]}):e,pnt=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map,o=(a,i)=>{r.set(a,i),t++,t>e&&(t=0,n=r,r=new Map)};return{get(a){let i=r.get(a);if(i!==void 0)return i;if((i=n.get(a))!==void 0)return o(a,i),i},set(a,i){r.has(a)?r.set(a,i):o(a,i)}}},Rfe="!",mnt=e=>{let{separator:t,experimentalParseClassName:r}=e,n=t.length===1,o=t[0],a=t.length,i=s=>{let l=[],c=0,u=0,d;for(let g=0;g<s.length;g++){let v=s[g];if(c===0){if(v===o&&(n||s.slice(g,g+a)===t)){l.push(s.slice(u,g)),u=g+a;continue}if(v==="/"){d=g;continue}}v==="["?c++:v==="]"&&c--}let f=l.length===0?s:s.substring(u),p=f.startsWith(Rfe),m=p?f.substring(1):f,h=d&&d>u?d-u:void 0;return{modifiers:l,hasImportantModifier:p,baseClassName:m,maybePostfixModifierPosition:h}};return r?s=>r({className:s,parseClassName:i}):i},hnt=e=>{if(e.length<=1)return e;let t=[],r=[];return e.forEach(n=>{n[0]==="["?(t.push(...r.sort(),n),r=[]):r.push(n)}),t.push(...r.sort()),t},gnt=e=>({cache:pnt(e.cacheSize),parseClassName:mnt(e),...lnt(e)}),vnt=/\s+/,ynt=(e,t)=>{let{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:o}=t,a=[],i=e.trim().split(vnt),s="";for(let l=i.length-1;l>=0;l-=1){let c=i[l],{modifiers:u,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:p}=r(c),m=!!p,h=n(m?f.substring(0,p):f);if(!h){if(!m){s=c+(s.length>0?" "+s:s);continue}if(h=n(f),!h){s=c+(s.length>0?" "+s:s);continue}m=!1}let g=hnt(u).join(":"),v=d?g+Rfe:g,y=v+h;if(a.includes(y))continue;a.push(y);let x=o(h,m);for(let w=0;w<x.length;++w){let b=x[w];a.push(v+b)}s=c+(s.length>0?" "+s:s)}return s};function xnt(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=Nfe(t))&&(n&&(n+=" "),n+=r);return n}var Nfe=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=Nfe(e[n]))&&(r&&(r+=" "),r+=t);return r};function bnt(e,...t){let r,n,o,a=i;function i(l){let c=t.reduce((u,d)=>d(u),e());return r=gnt(c),n=r.cache.get,o=r.cache.set,a=s,s(l)}function s(l){let c=n(l);if(c)return c;let u=ynt(l,r);return o(l,u),u}return function(){return a(xnt.apply(null,arguments))}}var Ta=e=>{let t=r=>r[e]||[];return t.isThemeGetter=!0,t},Mfe=/^\[(?:([a-z-]+):)?(.+)\]$/i,wnt=/^\d+\/\d+$/,Cnt=new Set(["px","full","screen"]),Snt=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Pnt=/\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$/,Int=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,knt=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Rnt=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,uv=e=>Y1(e)||Cnt.has(e)||wnt.test(e),gx=e=>Q1(e,"length",Ont),Y1=e=>!!e&&!Number.isNaN(Number(e)),O8=e=>Q1(e,"number",Y1),rT=e=>!!e&&Number.isInteger(Number(e)),Nnt=e=>e.endsWith("%")&&Y1(e.slice(0,-1)),sn=e=>Mfe.test(e),vx=e=>Snt.test(e),Mnt=new Set(["length","size","percentage"]),Tnt=e=>Q1(e,Mnt,Tfe),Ant=e=>Q1(e,"position",Tfe),Lnt=new Set(["image","url"]),Ent=e=>Q1(e,Lnt,Fnt),Dnt=e=>Q1(e,"",_nt),nT=()=>!0,Q1=(e,t,r)=>{let n=Mfe.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1},Ont=e=>Pnt.test(e)&&!Int.test(e),Tfe=()=>!1,_nt=e=>knt.test(e),Fnt=e=>Rnt.test(e);var Bnt=()=>{let e=Ta("colors"),t=Ta("spacing"),r=Ta("blur"),n=Ta("brightness"),o=Ta("borderColor"),a=Ta("borderRadius"),i=Ta("borderSpacing"),s=Ta("borderWidth"),l=Ta("contrast"),c=Ta("grayscale"),u=Ta("hueRotate"),d=Ta("invert"),f=Ta("gap"),p=Ta("gradientColorStops"),m=Ta("gradientColorStopPositions"),h=Ta("inset"),g=Ta("margin"),v=Ta("opacity"),y=Ta("padding"),x=Ta("saturate"),w=Ta("scale"),b=Ta("sepia"),C=Ta("skew"),S=Ta("space"),P=Ta("translate"),N=()=>["auto","contain","none"],T=()=>["auto","hidden","clip","visible","scroll"],A=()=>["auto",sn,t],M=()=>[sn,t],O=()=>["",uv,gx],F=()=>["auto",Y1,sn],I=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],k=()=>["solid","dashed","dotted","double","none"],R=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],E=()=>["start","end","center","between","around","evenly","stretch"],_=()=>["","0",sn],U=()=>["auto","avoid","all","avoid-page","page","left","right","column"],V=()=>[Y1,sn];return{cacheSize:500,separator:":",theme:{colors:[nT],spacing:[uv,gx],blur:["none","",vx,sn],brightness:V(),borderColor:[e],borderRadius:["none","","full",vx,sn],borderSpacing:M(),borderWidth:O(),contrast:V(),grayscale:_(),hueRotate:V(),invert:_(),gap:M(),gradientColorStops:[e],gradientColorStopPositions:[Nnt,gx],inset:A(),margin:A(),opacity:V(),padding:M(),saturate:V(),scale:V(),sepia:_(),skew:V(),space:M(),translate:M()},classGroups:{aspect:[{aspect:["auto","square","video",sn]}],container:["container"],columns:[{columns:[vx]}],"break-after":[{"break-after":U()}],"break-before":[{"break-before":U()}],"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:[...I(),sn]}],overflow:[{overflow:T()}],"overflow-x":[{"overflow-x":T()}],"overflow-y":[{"overflow-y":T()}],overscroll:[{overscroll:N()}],"overscroll-x":[{"overscroll-x":N()}],"overscroll-y":[{"overscroll-y":N()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[h]}],"inset-x":[{"inset-x":[h]}],"inset-y":[{"inset-y":[h]}],start:[{start:[h]}],end:[{end:[h]}],top:[{top:[h]}],right:[{right:[h]}],bottom:[{bottom:[h]}],left:[{left:[h]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",rT,sn]}],basis:[{basis:A()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",sn]}],grow:[{grow:_()}],shrink:[{shrink:_()}],order:[{order:["first","last","none",rT,sn]}],"grid-cols":[{"grid-cols":[nT]}],"col-start-end":[{col:["auto",{span:["full",rT,sn]},sn]}],"col-start":[{"col-start":F()}],"col-end":[{"col-end":F()}],"grid-rows":[{"grid-rows":[nT]}],"row-start-end":[{row:["auto",{span:[rT,sn]},sn]}],"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":["auto","min","max","fr",sn]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",sn]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...E()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...E(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...E(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[y]}],px:[{px:[y]}],py:[{py:[y]}],ps:[{ps:[y]}],pe:[{pe:[y]}],pt:[{pt:[y]}],pr:[{pr:[y]}],pb:[{pb:[y]}],pl:[{pl:[y]}],m:[{m:[g]}],mx:[{mx:[g]}],my:[{my:[g]}],ms:[{ms:[g]}],me:[{me:[g]}],mt:[{mt:[g]}],mr:[{mr:[g]}],mb:[{mb:[g]}],ml:[{ml:[g]}],"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",sn,t]}],"min-w":[{"min-w":[sn,t,"min","max","fit"]}],"max-w":[{"max-w":[sn,t,"none","full","min","max","fit","prose",{screen:[vx]},vx]}],h:[{h:[sn,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[sn,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[sn,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[sn,t,"auto","min","max","fit"]}],"font-size":[{text:["base",vx,gx]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",O8]}],"font-family":[{font:[nT]}],"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",sn]}],"line-clamp":[{"line-clamp":["none",Y1,O8]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",uv,sn]}],"list-image":[{"list-image":["none",sn]}],"list-style-type":[{list:["none","disc","decimal",sn]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...k(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",uv,gx]}],"underline-offset":[{"underline-offset":["auto",uv,sn]}],"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:M()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",sn]}],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",sn]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...I(),Ant]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Tnt]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Ent]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[m]}],"gradient-via-pos":[{via:[m]}],"gradient-to-pos":[{to:[m]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[v]}],"border-style":[{border:[...k(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[v]}],"divide-style":[{divide:k()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...k()]}],"outline-offset":[{"outline-offset":[uv,sn]}],"outline-w":[{outline:[uv,gx]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:O()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[uv,gx]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",vx,Dnt]}],"shadow-color":[{shadow:[nT]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":[...R(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":R()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",vx,sn]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[x]}],sepia:[{sepia:[b]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[x]}],"backdrop-sepia":[{"backdrop-sepia":[b]}],"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",sn]}],duration:[{duration:V()}],ease:[{ease:["linear","in","out","in-out",sn]}],delay:[{delay:V()}],animate:[{animate:["none","spin","ping","pulse","bounce",sn]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[w]}],"scale-x":[{"scale-x":[w]}],"scale-y":[{"scale-y":[w]}],rotate:[{rotate:[rT,sn]}],"translate-x":[{"translate-x":[P]}],"translate-y":[{"translate-y":[P]}],"skew-x":[{"skew-x":[C]}],"skew-y":[{"skew-y":[C]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",sn]}],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",sn]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":M()}],"scroll-mx":[{"scroll-mx":M()}],"scroll-my":[{"scroll-my":M()}],"scroll-ms":[{"scroll-ms":M()}],"scroll-me":[{"scroll-me":M()}],"scroll-mt":[{"scroll-mt":M()}],"scroll-mr":[{"scroll-mr":M()}],"scroll-mb":[{"scroll-mb":M()}],"scroll-ml":[{"scroll-ml":M()}],"scroll-p":[{"scroll-p":M()}],"scroll-px":[{"scroll-px":M()}],"scroll-py":[{"scroll-py":M()}],"scroll-ps":[{"scroll-ps":M()}],"scroll-pe":[{"scroll-pe":M()}],"scroll-pt":[{"scroll-pt":M()}],"scroll-pr":[{"scroll-pr":M()}],"scroll-pb":[{"scroll-pb":M()}],"scroll-pl":[{"scroll-pl":M()}],"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",sn]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[uv,gx,O8]}],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 Afe=bnt(Bnt);function B(...e){return Afe(tT(e))}var oT=class{constructor(t){this.apiUrl="https://generativelanguage.googleapis.com/v1beta/models";this.apiKey=t.apiKey,this.model=t.model||"gemini-2.0-flash"}async callGeminiAPI(t){try{let r=await fetch(`${this.apiUrl}/${this.model}:generateContent`,{method:"POST",headers:{"Content-Type":"application/json","X-goog-api-key":this.apiKey},body:JSON.stringify({contents:[{parts:[{text:t}]}]})});if(!r.ok){let a=await r.text();throw console.error("Gemini API error response:",a),new Error(`Gemini API error: ${r.status} ${r.statusText} - ${a}`)}let n=await r.json();if(n.error)throw new Error(`Gemini API error: ${n.error.message||JSON.stringify(n.error)}`);if(n.candidates?.[0]?.finishReason==="SAFETY")throw new Error("Content was blocked by safety filters");let o=n.candidates?.[0]?.content?.parts?.[0]?.text;if(!o)throw console.error("Gemini API response:",JSON.stringify(n,null,2)),new Error("No text content in Gemini API response");return o.trim()}catch(r){throw console.error("Gemini API error details:",r),r instanceof Error?r:new Error("Unknown error occurred while calling Gemini API")}}async generateText(t){return this.callGeminiAPI(t)}async rewrite(t){let r=`Rewrite the following text to make it clearer, more engaging, and better structured while maintaining the original meaning. Respond in the same language:
20
20
 
21
21
  ${t}`;return this.callGeminiAPI(r)}async expand(t){let r=`Expand this text with more details, specific examples, explanations, and supporting information while keeping the same structure and tone. Respond in the same language:
22
22
 
@@ -412,7 +412,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/alert-
412
412
  ${p}px !important;
413
413
  top: ${u}px !important;
414
414
  }
415
- `),()=>{h.contains(m)&&h.removeChild(m)}},[t]),(0,UXe.jsx)(Uce,{isPresent:t,childRef:a,sizeRef:i,children:tG.cloneElement(e,{ref:a})})}var jXe=({children:e,initial:t,isPresent:r,onExitComplete:n,custom:o,presenceAffectsLayout:a,mode:i,anchorX:s,root:l})=>{let c=ev(Vtr),u=(0,gF.useId)(),d=!0,f=(0,gF.useMemo)(()=>(d=!1,{id:u,initial:t,isPresent:r,custom:o,onExitComplete:p=>{c.set(p,!0);for(let m of c.values())if(!m)return;n&&n()},register:p=>(c.set(p,!1),()=>c.delete(p))}),[r,c,n]);return a&&d&&(f={...f}),(0,gF.useMemo)(()=>{c.forEach((p,m)=>c.set(m,!1))},[r]),HXe.useEffect(()=>{!r&&!c.size&&n&&n()},[r]),i==="popLayout"&&(e=(0,zce.jsx)(zXe,{isPresent:r,anchorX:s,root:l,children:e})),(0,zce.jsx)(X0.Provider,{value:f,children:e})};function Vtr(){return new Map}var nw=D(lt(),1);function rG(e=!0){let t=(0,nw.useContext)(X0);if(t===null)return[!0,null];let{isPresent:r,onExitComplete:n,register:o}=t,a=(0,nw.useId)();(0,nw.useEffect)(()=>{if(e)return o(a)},[e]);let i=(0,nw.useCallback)(()=>e&&n&&n(a),[a,n,e]);return!r&&n?[!1,i]:[!0]}var nG=D(lt(),1),vF=e=>e.key||"";function Hce(e){let t=[];return nG.Children.forEach(e,r=>{(0,nG.isValidElement)(r)&&t.push(r)}),t}var xF=({children:e,custom:t,initial:r=!0,onExitComplete:n,presenceAffectsLayout:o=!0,mode:a="sync",propagate:i=!1,anchorX:s="left",root:l})=>{let[c,u]=rG(i),d=(0,nv.useMemo)(()=>Hce(e),[e]),f=i&&!c?[]:d.map(vF),p=(0,nv.useRef)(!0),m=(0,nv.useRef)(d),h=ev(()=>new Map),[g,v]=(0,nv.useState)(d),[y,x]=(0,nv.useState)(d);cM(()=>{p.current=!1,m.current=d;for(let C=0;C<y.length;C++){let S=vF(y[C]);f.includes(S)?h.delete(S):h.get(S)!==!0&&h.set(S,!1)}},[y,f.length,f.join("-")]);let w=[];if(d!==g){let C=[...d];for(let S=0;S<y.length;S++){let P=y[S],N=vF(P);f.includes(N)||(C.splice(S,0,P),w.push(P))}return a==="wait"&&w.length&&(C=w),x(Hce(C)),v(d),null}let{forceRender:b}=(0,nv.useContext)(sM);return(0,yF.jsx)(yF.Fragment,{children:y.map(C=>{let S=vF(C),P=i&&!c?!1:d===y||f.includes(S),N=()=>{if(h.has(S))h.set(S,!0);else return;let T=!0;h.forEach(A=>{A||(T=!1)}),T&&(b?.(),x(m.current),i&&u?.(),n&&n())};return(0,yF.jsx)(jXe,{isPresent:P,initial:!p.current||r?void 0:!1,custom:t,presenceAffectsLayout:o,mode:a,root:l,onExitComplete:P?void 0:N,anchorX:s,children:C},S)})})};var $Xe=D(lt(),1),oG=(0,$Xe.createContext)({strict:!1});var qXe={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"]},ax={};for(let e in qXe)ax[e]={isEnabled:t=>qXe[e].some(r=>!!t[r])};function WXe(e){for(let t in e)ax[t]={...ax[t],...e[t]}}var Utr=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 bF(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Utr.has(e)}var GXe=e=>!bF(e);function ztr(e){typeof e=="function"&&(GXe=t=>t.startsWith("on")?!bF(t):e(t))}try{ztr(xfe("@emotion/is-prop-valid").default)}catch{}function KXe(e,t,r){let n={};for(let o in e)o==="values"&&typeof e.values=="object"||(GXe(o)||r===!0&&bF(o)||!t&&!bF(o)||e.draggable&&o.startsWith("onDrag"))&&(n[o]=e[o]);return n}var gG=D(Or(),1);var kM=D(lt(),1);var XXe=D(lt(),1),ow=(0,XXe.createContext)({});var sG=D(lt(),1);function aw(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function ix(e){return typeof e=="string"||Array.isArray(e)}var aG=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],wF=["initial",...aG];function A1(e){return aw(e.animate)||wF.some(t=>ix(e[t]))}function iG(e){return!!(A1(e)||e.variants)}function YXe(e,t){if(A1(e)){let{initial:r,animate:n}=e;return{initial:r===!1||ix(r)?r:void 0,animate:ix(n)?n:void 0}}return e.inherit!==!1?t:{}}function ZXe(e){let{initial:t,animate:r}=YXe(e,(0,sG.useContext)(ow));return(0,sG.useMemo)(()=>({initial:t,animate:r}),[QXe(t),QXe(r)])}function QXe(e){return Array.isArray(e)?e.join(" "):e}var wM=D(lt(),1);var tYe=D(lt(),1);var L1={};function JXe(e){for(let t in e)L1[t]=e[t],y1(t)&&(L1[t].isCSSVariable=!0)}function lG(e,{layout:t,layoutId:r}){return Df.has(e)||e.startsWith("origin")||(t||r!==void 0)&&(!!L1[e]||e==="opacity")}var Htr={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},jtr=mh.length;function eYe(e,t,r){let n="",o=!0;for(let a=0;a<jtr;a++){let i=mh[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 c=pF(s,k1[i]);if(!l){o=!1;let u=Htr[i]||i;n+=`${u}(${c}) `}r&&(t[i]=c)}}return n=n.trim(),r?n=r(t,o?"":n):o&&(n="none"),n}function yM(e,t,r){let{style:n,vars:o,transformOrigin:a}=e,i=!1,s=!1;for(let l in t){let c=t[l];if(Df.has(l)){i=!0;continue}else if(y1(l)){o[l]=c;continue}else{let u=pF(c,k1[l]);l.startsWith("origin")?(s=!0,a[l]=u):n[l]=u}}if(t.transform||(i||r?n.transform=eYe(t,e.transform,r):n.transform&&(n.transform="none")),s){let{originX:l="50%",originY:c="50%",originZ:u=0}=a;n.transformOrigin=`${l} ${c} ${u}`}}var xM=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function jce(e,t,r){for(let n in t)!Io(t[n])&&!lG(n,r)&&(e[n]=t[n])}function $tr({transformTemplate:e},t){return(0,tYe.useMemo)(()=>{let r=xM();return yM(r,t,e),Object.assign({},r.vars,r.style)},[t])}function qtr(e,t){let r=e.style||{},n={};return jce(n,r,e),Object.assign(n,$tr(e,t)),n}function rYe(e,t){let r={},n=qtr(e,t);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,n.userSelect=n.WebkitUserSelect=n.WebkitTouchCallout="none",n.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=n,r}var oYe=D(lt(),1);var Wtr={offset:"stroke-dashoffset",array:"stroke-dasharray"},Gtr={offset:"strokeDashoffset",array:"strokeDasharray"};function nYe(e,t,r=1,n=0,o=!0){e.pathLength=1;let a=o?Wtr:Gtr;e[a.offset]=mr.transform(-n);let i=mr.transform(t),s=mr.transform(r);e[a.array]=`${i} ${s}`}function cG(e,{attrX:t,attrY:r,attrScale:n,pathLength:o,pathSpacing:a=1,pathOffset:i=0,...s},l,c,u){if(yM(e,s,c),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=u?.transformBox??"fill-box",delete d.transformBox),t!==void 0&&(d.x=t),r!==void 0&&(d.y=r),n!==void 0&&(d.scale=n),o!==void 0&&nYe(d,o,a,i,!1)}var uG=()=>({...xM(),attrs:{}});var dG=e=>typeof e=="string"&&e.toLowerCase()==="svg";function aYe(e,t,r,n){let o=(0,oYe.useMemo)(()=>{let a=uG();return cG(a,t,dG(n),e.transformTemplate,e.style),{...a.attrs,style:{...a.style}}},[t]);if(e.style){let a={};jce(a,e.style,e),o.style={...a,...o.style}}return o}var iYe=["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 bM(e){return typeof e!="string"||e.includes("-")?!1:!!(iYe.indexOf(e)>-1||/[A-Z]/u.test(e))}function sYe(e,t,r,{latestValues:n},o,a=!1){let s=(bM(e)?aYe:rYe)(t,n,o,e),l=KXe(t,typeof e=="string",a),c=e!==wM.Fragment?{...l,...s,ref:r}:{},{children:u}=t,d=(0,wM.useMemo)(()=>Io(u)?u.get():u,[u]);return(0,wM.createElement)(e,{...c,children:d})}var $ce=D(lt(),1);function lYe(e){let t=[{},{}];return e?.values.forEach((r,n)=>{t[0][n]=r.get(),t[1][n]=r.getVelocity()}),t}function CM(e,t,r,n){if(typeof t=="function"){let[o,a]=lYe(n);t=t(r!==void 0?r:e.custom,o,a)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){let[o,a]=lYe(n);t=t(r!==void 0?r:e.custom,o,a)}return t}function SM(e){return Io(e)?e.get():e}function Ktr({scrapeMotionValuesFromProps:e,createRenderState:t},r,n,o){return{latestValues:Xtr(r,n,o,e),renderState:t()}}function Xtr(e,t,r,n){let o={},a=n(e,{});for(let f in a)o[f]=SM(a[f]);let{initial:i,animate:s}=e,l=A1(e),c=iG(e);t&&c&&!l&&e.inherit!==!1&&(i===void 0&&(i=t.initial),s===void 0&&(s=t.animate));let u=r?r.initial===!1:!1;u=u||i===!1;let d=u?s:i;if(d&&typeof d!="boolean"&&!aw(d)){let f=Array.isArray(d)?d:[d];for(let p=0;p<f.length;p++){let m=CM(e,f[p]);if(m){let{transitionEnd:h,transition:g,...v}=m;for(let y in v){let x=v[y];if(Array.isArray(x)){let w=u?x.length-1:0;x=x[w]}x!==null&&(o[y]=x)}for(let y in h)o[y]=h[y]}}}return o}var fG=e=>(t,r)=>{let n=(0,$ce.useContext)(ow),o=(0,$ce.useContext)(X0),a=()=>Ktr(e,t,n,o);return r?a():ev(a)};function PM(e,t,r){let{style:n}=e,o={};for(let a in n)(Io(n[a])||t.style&&Io(t.style[a])||lG(a,e)||r?.getValue(a)?.liveStyle!==void 0)&&(o[a]=n[a]);return o}var cYe=fG({scrapeMotionValuesFromProps:PM,createRenderState:xM});function pG(e,t,r){let n=PM(e,t,r);for(let o in e)if(Io(e[o])||Io(t[o])){let a=mh.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;n[a]=e[o]}return n}var uYe=fG({scrapeMotionValuesFromProps:pG,createRenderState:uG});var dYe=Symbol.for("motionComponentSymbol");var fYe=D(lt(),1);function sx(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function pYe(e,t,r){return(0,fYe.useCallback)(n=>{n&&e.onMount&&e.onMount(n),t&&(n?t.mount(n):t.unmount()),r&&(typeof r=="function"?r(n):sx(r)&&(r.current=n))},[t])}var Md=D(lt(),1);var IM=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase();var Ytr="framerAppearId",mG="data-"+IM(Ytr);var mYe=D(lt(),1),hG=(0,mYe.createContext)({});function hYe(e,t,r,n,o){let{visualElement:a}=(0,Md.useContext)(ow),i=(0,Md.useContext)(oG),s=(0,Md.useContext)(X0),l=(0,Md.useContext)(rw).reducedMotion,c=(0,Md.useRef)(null);n=n||i.renderer,!c.current&&n&&(c.current=n(e,{visualState:t,parent:a,props:r,presenceContext:s,blockInitialAnimation:s?s.initial===!1:!1,reducedMotionConfig:l}));let u=c.current,d=(0,Md.useContext)(hG);u&&!u.projection&&o&&(u.type==="html"||u.type==="svg")&&Qtr(c.current,r,o,d);let f=(0,Md.useRef)(!1);(0,Md.useInsertionEffect)(()=>{u&&f.current&&u.update(r,s)});let p=r[mG],m=(0,Md.useRef)(!!p&&!window.MotionHandoffIsComplete?.(p)&&window.MotionHasOptimisedAnimation?.(p));return cM(()=>{u&&(f.current=!0,window.MotionIsMounted=!0,u.updateFeatures(),u.scheduleRenderMicrotask(),m.current&&u.animationState&&u.animationState.animateChanges())}),(0,Md.useEffect)(()=>{u&&(!m.current&&u.animationState&&u.animationState.animateChanges(),m.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(p)}),m.current=!1),u.enteringChildren=void 0)}),u}function Qtr(e,t,r,n){let{layoutId:o,layout:a,drag:i,dragConstraints:s,layoutScroll:l,layoutRoot:c,layoutCrossfade:u}=t;e.projection=new r(e.latestValues,t["data-framer-portal-id"]?void 0:gYe(e.parent)),e.projection.setOptions({layoutId:o,layout:a,alwaysMeasureLayout:!!i||s&&sx(s),visualElement:e,animationType:typeof a=="string"?a:"both",initialPromotionConfig:n,crossfade:u,layoutScroll:l,layoutRoot:c})}function gYe(e){if(e)return e.options.allowProjection!==!1?e.projection:gYe(e.parent)}function vG(e,{forwardMotionProps:t=!1}={},r,n){r&&WXe(r);let o=bM(e)?uYe:cYe;function a(s,l){let c,u={...(0,kM.useContext)(rw),...s,layoutId:Ztr(s)},{isStatic:d}=u,f=ZXe(s),p=o(s,d);if(!d&&lM){Jtr(u,r);let m=err(u);c=m.MeasureLayout,f.visualElement=hYe(e,p,u,n,m.ProjectionNode)}return(0,gG.jsxs)(ow.Provider,{value:f,children:[c&&f.visualElement?(0,gG.jsx)(c,{visualElement:f.visualElement,...u}):null,sYe(e,s,pYe(p,f.visualElement,l),p,d,t)]})}a.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;let i=(0,kM.forwardRef)(a);return i[dYe]=e,i}function Ztr({layoutId:e}){let t=(0,kM.useContext)(sM).id;return t&&e!==void 0?t+"-"+e:e}function Jtr(e,t){let r=(0,kM.useContext)(oG).strict}function err(e){let{drag:t,layout:r}=ax;if(!t&&!r)return{};let n={...t,...r};return{MeasureLayout:t?.isEnabled(e)||r?.isEnabled(e)?n.MeasureLayout:void 0,ProjectionNode:n.ProjectionNode}}function vYe(e,t){if(typeof Proxy>"u")return vG;let r=new Map,n=(a,i)=>vG(a,i,e,t),o=(a,i)=>n(a,i);return new Proxy(o,{get:(a,i)=>i==="create"?n:(r.has(i)||r.set(i,vG(i,void 0,e,t)),r.get(i))})}var EYe=D(lt(),1);function yG({top:e,left:t,right:r,bottom:n}){return{x:{min:t,max:r},y:{min:e,max:n}}}function yYe({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function xYe(e,t){if(!t)return e;let r=t({x:e.left,y:e.top}),n=t({x:e.right,y:e.bottom});return{top:r.y,left:r.x,bottom:n.y,right:n.x}}function qce(e){return e===void 0||e===1}function xG({scale:e,scaleX:t,scaleY:r}){return!qce(e)||!qce(t)||!qce(r)}function lx(e){return xG(e)||Wce(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Wce(e){return bYe(e.x)||bYe(e.y)}function bYe(e){return e&&e!=="0%"}function CF(e,t,r){let n=e-r,o=t*n;return r+o}function wYe(e,t,r,n,o){return o!==void 0&&(e=CF(e,o,n)),CF(e,r,n)+t}function Gce(e,t=0,r=1,n,o){e.min=wYe(e.min,t,r,n,o),e.max=wYe(e.max,t,r,n,o)}function Kce(e,{x:t,y:r}){Gce(e.x,t.translate,t.scale,t.originPoint),Gce(e.y,r.translate,r.scale,r.originPoint)}var CYe=.999999999999,SYe=1.0000000000001;function IYe(e,t,r,n=!1){let o=r.length;if(!o)return;t.x=t.y=1;let a,i;for(let s=0;s<o;s++){a=r[s],i=a.projectionDelta;let{visualElement:l}=a.options;l&&l.props.style&&l.props.style.display==="contents"||(n&&a.options.layoutScroll&&a.scroll&&a!==a.root&&E1(e,{x:-a.scroll.offset.x,y:-a.scroll.offset.y}),i&&(t.x*=i.x.scale,t.y*=i.y.scale,Kce(e,i)),n&&lx(a.latestValues)&&E1(e,a.latestValues))}t.x<SYe&&t.x>CYe&&(t.x=1),t.y<SYe&&t.y>CYe&&(t.y=1)}function iw(e,t){e.min=e.min+t,e.max=e.max+t}function PYe(e,t,r,n,o=.5){let a=Ln(e.min,e.max,o);Gce(e,t,r,a,n)}function E1(e,t){PYe(e.x,t.x,t.scaleX,t.scale,t.originX),PYe(e.y,t.y,t.scaleY,t.scale,t.originY)}function Xce(e,t){return yG(xYe(e.getBoundingClientRect(),t))}function kYe(e,t,r){let n=Xce(e,r),{scroll:o}=t;return o&&(iw(n.x,o.offset.x),iw(n.y,o.offset.y)),n}var RYe=()=>({translate:0,scale:1,origin:0,originPoint:0}),D1=()=>({x:RYe(),y:RYe()}),NYe=()=>({min:0,max:0}),da=()=>({x:NYe(),y:NYe()});var SF={current:null},bG={current:!1};function MYe(){if(bG.current=!0,!!lM)if(window.matchMedia){let e=window.matchMedia("(prefers-reduced-motion)"),t=()=>SF.current=e.matches;e.addEventListener("change",t),t()}else SF.current=!1}var sw=new WeakMap;function TYe(e,t,r){for(let n in t){let o=t[n],a=r[n];if(Io(o))e.addValue(n,o);else if(Io(a))e.addValue(n,Nd(o,{owner:e}));else if(a!==o)if(e.hasValue(n)){let i=e.getValue(n);i.liveStyle===!0?i.jump(o):i.hasAnimated||i.set(o)}else{let i=e.getStaticValue(n);e.addValue(n,Nd(i!==void 0?i:o,{owner:e}))}}for(let n in r)t[n]===void 0&&e.removeValue(n);return t}var AYe=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],RM=class{scrapeMotionValuesFromProps(t,r,n){return{}}constructor({parent:t,props:r,presenceContext:n,reducedMotionConfig:o,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=nx,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=Qi.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,dn.render(this.render,!1,!0))};let{latestValues:l,renderState:c}=i;this.latestValues=l,this.baseTarget={...l},this.initialValues=r.initial?{...l}:{},this.renderState=c,this.parent=t,this.props=r,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=s,this.blockInitialAnimation=!!a,this.isControllingVariants=A1(r),this.isVariantNode=iG(r),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);let{willChange:u,...d}=this.scrapeMotionValuesFromProps(r,{},this);for(let f in d){let p=d[f];l[f]!==void 0&&Io(p)&&p.set(l[f])}}mount(t){this.current=t,sw.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,n)=>this.bindToMotionValue(n,r)),bG.current||MYe(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:SF.current,this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Hc(this.notifyUpdate),Hc(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 n=Df.has(t);n&&this.onBindTransform&&this.onBindTransform();let o=r.on("change",i=>{this.latestValues[t]=i,this.props.onUpdate&&dn.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()}),a;window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,t,r)),this.valueSubscriptions.set(t,()=>{o(),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 ax){let r=ax[t];if(!r)continue;let{isEnabled:n,Feature:o}=r;if(!this.features[t]&&o&&n(this.props)&&(this.features[t]=new o(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):da()}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 n=0;n<AYe.length;n++){let o=AYe[n];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);let a="on"+o,i=t[a];i&&(this.propEventSubscriptions[o]=this.on(o,i))}this.prevMotionValues=TYe(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 n=this.values.get(t);r!==n&&(n&&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 n=this.values.get(t);return n===void 0&&r!==void 0&&(n=Nd(r===null?void 0:r,{owner:this}),this.addValue(t,n)),n}readValue(t,r){let n=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return n!=null&&(typeof n=="string"&&(O_(n)||F_(n))?n=parseFloat(n):!Vce(n)&&$c.test(r)&&(n=uF(t,r)),this.setBaseTarget(t,Io(n)?n.get():n)),Io(n)?n.get():n}setBaseTarget(t,r){this.baseTarget[t]=r}getBaseTarget(t){let{initial:r}=this.props,n;if(typeof r=="string"||typeof r=="object"){let a=CM(this.props,r,this.presenceContext?.custom);a&&(n=a[t])}if(r&&n!==void 0)return n;let o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!Io(o)?o:this.initialValues[t]!==void 0&&n===void 0?void 0:this.baseTarget[t]}on(t,r){return this.events[t]||(this.events[t]=new Jy),this.events[t].add(r)}notify(t,...r){this.events[t]&&this.events[t].notify(...r)}scheduleRenderMicrotask(){N1.render(this.render)}};var NM=class extends RM{constructor(){super(...arguments),this.KeyframeResolver=dF}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:n}){delete r[t],delete n[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:t}=this.props;Io(t)&&(this.childSubscription=t.on("change",r=>{this.current&&(this.current.textContent=`${r}`)}))}};function wG(e,{style:t,vars:r},n,o){let a=e.style,i;for(i in t)a[i]=t[i];o?.applyProjectionStyles(a,n);for(i in r)a.setProperty(i,r[i])}function trr(e){return window.getComputedStyle(e)}var MM=class extends NM{constructor(){super(...arguments),this.type="html",this.renderInstance=wG}readValueFromInstance(t,r){if(Df.has(r))return this.projection?.isProjecting?nF(r):bce(t,r);{let n=trr(t),o=(y1(r)?n.getPropertyValue(r):n[r])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:r}){return Xce(t,r)}build(t,r,n){yM(t,r,n.transformTemplate)}scrapeMotionValuesFromProps(t,r,n){return PM(t,r,n)}};var CG=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 LYe(e,t,r,n){wG(e,t,void 0,n);for(let o in t.attrs)e.setAttribute(CG.has(o)?o:IM(o),t.attrs[o])}var TM=class extends NM{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=da}getBaseTargetFromProps(t,r){return t[r]}readValueFromInstance(t,r){if(Df.has(r)){let n=cF(r);return n&&n.default||0}return r=CG.has(r)?r:IM(r),t.getAttribute(r)}scrapeMotionValuesFromProps(t,r,n){return pG(t,r,n)}build(t,r,n){cG(t,r,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(t,r,n,o){LYe(t,r,n,o)}mount(t){this.isSVGTag=dG(t.tagName),super.mount(t)}};var DYe=(e,t)=>bM(e)?new TM(t):new MM(t,{allowProjection:e!==EYe.Fragment});function ov(e,t,r){let n=e.getProps();return CM(n,t,r!==void 0?r:n.custom,e)}var PF=e=>Array.isArray(e);function rrr(e,t,r){e.hasValue(t)?e.getValue(t).set(r):e.addValue(t,Nd(r))}function nrr(e){return PF(e)?e[e.length-1]||0:e}function OYe(e,t){let r=ov(e,t),{transitionEnd:n={},transition:o={},...a}=r||{};a={...a,...n};for(let i in a){let s=nrr(a[i]);rrr(e,i,s)}}function _Ye(e){return!!(Io(e)&&e.add)}function IF(e,t){let r=e.getValue("willChange");if(_Ye(r))return r.add(t);if(!r&&zc.WillChange){let n=new zc.WillChange("auto");e.addValue("willChange",n),n.add(t)}}function SG(e){return e.props[mG]}var orr=e=>e!==null;function FYe(e,{repeat:t,repeatType:r="loop"},n){let o=e.filter(orr),a=t&&r!=="loop"&&t%2===1?0:o.length-1;return!a||n===void 0?o[a]:n}var arr={type:"spring",stiffness:500,damping:25,restSpeed:10},irr=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),srr={type:"keyframes",duration:.8},lrr={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},BYe=(e,{keyframes:t})=>t.length>2?srr:Df.has(e)?e.startsWith("scale")?irr(t[1]):arr:lrr;function VYe({when:e,delay:t,delayChildren:r,staggerChildren:n,staggerDirection:o,repeat:a,repeatType:i,repeatDelay:s,from:l,elapsed:c,...u}){return!!Object.keys(u).length}var AM=(e,t,r,n={},o,a)=>i=>{let s=I1(n,e)||{},l=s.delay||n.delay||0,{elapsed:c=0}=n;c=c-ds(l);let u={keyframes:Array.isArray(r)?r:[null,r],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-c,onUpdate:f=>{t.set(f),s.onUpdate&&s.onUpdate(f)},onComplete:()=>{i(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:o};VYe(s)||Object.assign(u,BYe(e,u)),u.duration&&(u.duration=ds(u.duration)),u.repeatDelay&&(u.repeatDelay=ds(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(gM(u),u.delay===0&&(d=!0)),(zc.instantAnimations||zc.skipAnimations)&&(d=!0,gM(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){let f=FYe(u.keyframes,s);if(f!==void 0){dn.update(()=>{u.onUpdate(f),u.onComplete()});return}}return s.isSync?new rx(u):new aF(u)};function crr({protectedKeys:e,needsAnimating:t},r){let n=e.hasOwnProperty(r)&&t[r]!==!0;return t[r]=!1,n}function LM(e,t,{delay:r=0,transitionOverride:n,type:o}={}){let{transition:a=e.getDefaultTransition(),transitionEnd:i,...s}=t;n&&(a=n);let l=[],c=o&&e.animationState&&e.animationState.getState()[o];for(let u in s){let d=e.getValue(u,e.latestValues[u]??null),f=s[u];if(f===void 0||c&&crr(c,u))continue;let p={delay:r,...I1(a||{},u)},m=d.get();if(m!==void 0&&!d.isAnimating&&!Array.isArray(f)&&f===m&&!p.velocity)continue;let h=!1;if(window.MotionHandoffAnimation){let v=SG(e);if(v){let y=window.MotionHandoffAnimation(v,u,dn);y!==null&&(p.startTime=y,h=!0)}}IF(e,u),d.start(AM(u,d,f,e.shouldReduceMotion&&sF.has(u)?{type:!1}:p,e,h));let g=d.animation;g&&l.push(g)}return i&&Promise.all(l).then(()=>{dn.update(()=>{i&&OYe(e,i)})}),l}function PG(e,t,r,n=0,o=1){let a=Array.from(e).sort((c,u)=>c.sortNodePosition(u)).indexOf(t),i=e.size,s=(i-1)*n;return typeof r=="function"?r(a,i):o===1?a*n:s-a*n}function IG(e,t,r={}){let n=ov(e,t,r.type==="exit"?e.presenceContext?.custom:void 0),{transition:o=e.getDefaultTransition()||{}}=n||{};r.transitionOverride&&(o=r.transitionOverride);let a=n?()=>Promise.all(LM(e,n,r)):()=>Promise.resolve(),i=e.variantChildren&&e.variantChildren.size?(l=0)=>{let{delayChildren:c=0,staggerChildren:u,staggerDirection:d}=o;return urr(e,t,l,c,u,d,r)}:()=>Promise.resolve(),{when:s}=o;if(s){let[l,c]=s==="beforeChildren"?[a,i]:[i,a];return l().then(()=>c())}else return Promise.all([a(),i(r.delay)])}function urr(e,t,r=0,n=0,o=0,a=1,i){let s=[];for(let l of e.variantChildren)l.notify("AnimationStart",t),s.push(IG(l,t,{...i,delay:r+(typeof n=="function"?0:n)+PG(e.variantChildren,l,n,o,a)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(s)}function UYe(e,t,r={}){e.notify("AnimationStart",t);let n;if(Array.isArray(t)){let o=t.map(a=>IG(e,a,r));n=Promise.all(o)}else if(typeof t=="string")n=IG(e,t,r);else{let o=typeof t=="function"?ov(e,t,r.custom):t;n=Promise.all(LM(e,o,r))}return n.then(()=>{e.notify("AnimationComplete",t)})}function Yce(e,t){if(!Array.isArray(t))return!1;let r=t.length;if(r!==e.length)return!1;for(let n=0;n<r;n++)if(t[n]!==e[n])return!1;return!0}var drr=wF.length;function Qce(e){if(!e)return;if(!e.isControllingVariants){let r=e.parent?Qce(e.parent)||{}:{};return e.props.initial!==void 0&&(r.initial=e.props.initial),r}let t={};for(let r=0;r<drr;r++){let n=wF[r],o=e.props[n];(ix(o)||o===!1)&&(t[n]=o)}return t}var frr=[...aG].reverse(),prr=aG.length;function mrr(e){return t=>Promise.all(t.map(({animation:r,options:n})=>UYe(e,r,n)))}function HYe(e){let t=mrr(e),r=zYe(),n=!0,o=l=>(c,u)=>{let d=ov(e,u,l==="exit"?e.presenceContext?.custom:void 0);if(d){let{transition:f,transitionEnd:p,...m}=d;c={...c,...m,...p}}return c};function a(l){t=l(e)}function i(l){let{props:c}=e,u=Qce(e.parent)||{},d=[],f=new Set,p={},m=1/0;for(let g=0;g<prr;g++){let v=frr[g],y=r[v],x=c[v]!==void 0?c[v]:u[v],w=ix(x),b=v===l?y.isActive:null;b===!1&&(m=g);let C=x===u[v]&&x!==c[v]&&w;if(C&&n&&e.manuallyAnimateOnMount&&(C=!1),y.protectedKeys={...p},!y.isActive&&b===null||!x&&!y.prevProp||aw(x)||typeof x=="boolean")continue;let S=hrr(y.prevProp,x),P=S||v===l&&y.isActive&&!C&&w||g>m&&w,N=!1,T=Array.isArray(x)?x:[x],A=T.reduce(o(v),{});b===!1&&(A={});let{prevResolvedValues:M={}}=y,O={...M,...A},F=R=>{P=!0,f.has(R)&&(N=!0,f.delete(R)),y.needsAnimating[R]=!0;let E=e.getValue(R);E&&(E.liveStyle=!1)};for(let R in O){let E=A[R],_=M[R];if(p.hasOwnProperty(R))continue;let U=!1;PF(E)&&PF(_)?U=!Yce(E,_):U=E!==_,U?E!=null?F(R):f.add(R):E!==void 0&&f.has(R)?F(R):y.protectedKeys[R]=!0}y.prevProp=x,y.prevResolvedValues=A,y.isActive&&(p={...p,...A}),n&&e.blockInitialAnimation&&(P=!1);let I=C&&S;P&&(!I||N)&&d.push(...T.map(R=>{let E={type:v};if(typeof R=="string"&&n&&!I&&e.manuallyAnimateOnMount&&e.parent){let{parent:_}=e,U=ov(_,R);if(_.enteringChildren&&U){let{delayChildren:V}=U.transition||{};E.delay=PG(_.enteringChildren,e,V)}}return{animation:R,options:E}}))}if(f.size){let g={};if(typeof c.initial!="boolean"){let v=ov(e,Array.isArray(c.initial)?c.initial[0]:c.initial);v&&v.transition&&(g.transition=v.transition)}f.forEach(v=>{let y=e.getBaseTarget(v),x=e.getValue(v);x&&(x.liveStyle=!0),g[v]=y??null}),d.push({animation:g})}let h=!!d.length;return n&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(h=!1),n=!1,h?t(d):Promise.resolve()}function s(l,c){if(r[l].isActive===c)return Promise.resolve();e.variantChildren?.forEach(d=>d.animationState?.setActive(l,c)),r[l].isActive=c;let u=i(l);for(let d in r)r[d].protectedKeys={};return u}return{animateChanges:i,setActive:s,setAnimateFunction:a,getState:()=>r,reset:()=>{r=zYe(),n=!0}}}function hrr(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Yce(t,e):!1}function O1(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function zYe(){return{animate:O1(!0),whileInView:O1(),whileHover:O1(),whileTap:O1(),whileDrag:O1(),whileFocus:O1(),exit:O1()}}var Ol=class{constructor(t){this.isMounted=!1,this.node=t}update(){}};var kG=class extends Ol{constructor(t){super(t),t.animationState||(t.animationState=HYe(t))}updateAnimationControlsSubscription(){let{animate:t}=this.node.getProps();aw(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 grr=0,RG=class extends Ol{constructor(){super(...arguments),this.id=grr++}update(){if(!this.node.presenceContext)return;let{isPresent:t,onExitComplete:r}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===n)return;let o=this.node.animationState.setActive("exit",!t);r&&!t&&o.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 jYe={animation:{Feature:kG},exit:{Feature:RG}};function cx(e,t,r,n={passive:!0}){return e.addEventListener(t,r,n),()=>e.removeEventListener(t,r)}function ux(e){return{point:{x:e.pageX,y:e.pageY}}}var $Ye=e=>t=>M1(t)&&e(t,ux(t));function lw(e,t,r,n){return cx(e,t,$Ye(r),n)}var KYe=1e-4,vrr=1-KYe,yrr=1+KYe,XYe=.01,xrr=0-XYe,brr=0+XYe;function ll(e){return e.max-e.min}function YYe(e,t,r){return Math.abs(e-t)<=r}function qYe(e,t,r,n=.5){e.origin=n,e.originPoint=Ln(t.min,t.max,e.origin),e.scale=ll(r)/ll(t),e.translate=Ln(r.min,r.max,e.origin)-e.originPoint,(e.scale>=vrr&&e.scale<=yrr||isNaN(e.scale))&&(e.scale=1),(e.translate>=xrr&&e.translate<=brr||isNaN(e.translate))&&(e.translate=0)}function EM(e,t,r,n){qYe(e.x,t.x,r.x,n?n.originX:void 0),qYe(e.y,t.y,r.y,n?n.originY:void 0)}function WYe(e,t,r){e.min=r.min+t.min,e.max=e.min+ll(t)}function QYe(e,t,r){WYe(e.x,t.x,r.x),WYe(e.y,t.y,r.y)}function GYe(e,t,r){e.min=t.min-r.min,e.max=e.min+ll(t)}function DM(e,t,r){GYe(e.x,t.x,r.x),GYe(e.y,t.y,r.y)}function Td(e){return[e("x"),e("y")]}var NG=({current:e})=>e?e.ownerDocument.defaultView:null;var ZYe=(e,t)=>Math.abs(e-t);function JYe(e,t){let r=ZYe(e.x,t.x),n=ZYe(e.y,t.y);return Math.sqrt(r**2+n**2)}var OM=class{constructor(t,r,{transformPagePoint:n,contextWindow:o=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=Jce(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,m=JYe(f.offset,{x:0,y:0})>=this.distanceThreshold;if(!p&&!m)return;let{point:h}=f,{timestamp:g}=Yi;this.history.push({...h,timestamp:g});let{onStart:v,onMove:y}=this.handlers;p||(v&&v(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,f)},this.handlePointerMove=(f,p)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=Zce(p,this.transformPagePoint),dn.update(this.updatePoint,!0)},this.handlePointerUp=(f,p)=>{this.end();let{onEnd:m,onSessionEnd:h,resumeAnimation:g}=this.handlers;if(this.dragSnapToOrigin&&g&&g(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let v=Jce(f.type==="pointercancel"?this.lastMoveEventInfo:Zce(p,this.transformPagePoint),this.history);this.startEvent&&m&&m(f,v),h&&h(f,v)},!M1(t))return;this.dragSnapToOrigin=a,this.handlers=r,this.transformPagePoint=n,this.distanceThreshold=i,this.contextWindow=o||window;let s=ux(t),l=Zce(s,this.transformPagePoint),{point:c}=l,{timestamp:u}=Yi;this.history=[{...c,timestamp:u}];let{onSessionStart:d}=r;d&&d(t,Jce(l,this.history)),this.removeListeners=dh(lw(this.contextWindow,"pointermove",this.handlePointerMove),lw(this.contextWindow,"pointerup",this.handlePointerUp),lw(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Hc(this.updatePoint)}};function Zce(e,t){return t?{point:t(e.point)}:e}function eQe(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Jce({point:e},t){return{point:e,delta:eQe(e,tQe(t)),offset:eQe(e,wrr(t)),velocity:Crr(t,.1)}}function wrr(e){return e[0]}function tQe(e){return e[e.length-1]}function Crr(e,t){if(e.length<2)return{x:0,y:0};let r=e.length-1,n=null,o=tQe(e);for(;r>=0&&(n=e[r],!(o.timestamp-n.timestamp>ds(t)));)r--;if(!n)return{x:0,y:0};let a=lc(o.timestamp-n.timestamp);if(a===0)return{x:0,y:0};let i={x:(o.x-n.x)/a,y:(o.y-n.y)/a};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}function iQe(e,{min:t,max:r},n){return t!==void 0&&e<t?e=n?Ln(t,e,n.min):Math.max(e,t):r!==void 0&&e>r&&(e=n?Ln(r,e,n.max):Math.min(e,r)),e}function rQe(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 sQe(e,{top:t,left:r,bottom:n,right:o}){return{x:rQe(e.x,r,o),y:rQe(e.y,t,n)}}function nQe(e,t){let r=t.min-e.min,n=t.max-e.max;return t.max-t.min<e.max-e.min&&([r,n]=[n,r]),{min:r,max:n}}function lQe(e,t){return{x:nQe(e.x,t.x),y:nQe(e.y,t.y)}}function cQe(e,t){let r=.5,n=ll(e),o=ll(t);return o>n?r=Zp(t.min,t.max-n,e.min):n>o&&(r=Zp(e.min,e.max-o,t.min)),Dl(0,1,r)}function uQe(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 MG=.35;function dQe(e=MG){return e===!1?e=0:e===!0&&(e=MG),{x:oQe(e,"left","right"),y:oQe(e,"top","bottom")}}function oQe(e,t,r){return{min:aQe(e,t),max:aQe(e,r)}}function aQe(e,t){return typeof e=="number"?e:e[t]||0}var Srr=new WeakMap,AG=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=da(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:r=!1,distanceThreshold:n}={}){let{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;let a=d=>{let{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),r&&this.snapToCursor(ux(d).point)},i=(d,f)=>{let{drag:p,dragPropagation:m,onDragStart:h}=this.getProps();if(p&&!m&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Ece(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),Td(v=>{let y=this.getAxisMotionValue(v).get()||0;if(jc.test(y)){let{projection:x}=this.visualElement;if(x&&x.layout){let w=x.layout.layoutBox[v];w&&(y=ll(w)*(parseFloat(y)/100))}}this.originPoint[v]=y}),h&&dn.postRender(()=>h(d,f)),IF(this.visualElement,"transform");let{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",!0)},s=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f;let{dragPropagation:p,dragDirectionLock:m,onDirectionLock:h,onDrag:g}=this.getProps();if(!p&&!this.openDragLock)return;let{offset:v}=f;if(m&&this.currentDirection===null){this.currentDirection=Prr(v),this.currentDirection!==null&&h&&h(this.currentDirection);return}this.updateAxis("x",f.point,v),this.updateAxis("y",f.point,v),this.visualElement.render(),g&&g(d,f)},l=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f,this.stop(d,f),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>Td(d=>this.getAnimationState(d)==="paused"&&this.getAxisMotionValue(d).animation?.play()),{dragSnapToOrigin:u}=this.getProps();this.panSession=new OM(t,{onSessionStart:a,onStart:i,onMove:s,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:n,contextWindow:NG(this.visualElement)})}stop(t,r){let n=t||this.latestPointerEvent,o=r||this.latestPanInfo,a=this.isDragging;if(this.cancel(),!a||!o||!n)return;let{velocity:i}=o;this.startAnimation(i);let{onDragEnd:s}=this.getProps();s&&dn.postRender(()=>s(n,o))}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:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),r&&r.setActive("whileDrag",!1)}updateAxis(t,r,n){let{drag:o}=this.getProps();if(!n||!TG(t,o,this.currentDirection))return;let a=this.getAxisMotionValue(t),i=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(i=iQe(i,this.constraints[t],this.elastic[t])),a.set(i)}resolveConstraints(){let{dragConstraints:t,dragElastic:r}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,o=this.constraints;t&&sx(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&n?this.constraints=sQe(n.layoutBox,t):this.constraints=!1,this.elastic=dQe(r),o!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&Td(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=uQe(n.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){let{dragConstraints:t,onMeasureDragConstraints:r}=this.getProps();if(!t||!sx(t))return!1;let n=t.current;sc(n!==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:o}=this.visualElement;if(!o||!o.layout)return!1;let a=kYe(n,o.root,this.visualElement.getTransformPagePoint()),i=lQe(o.layout.layoutBox,a);if(r){let s=r(yYe(i));this.hasMutatedConstraints=!!s,s&&(i=yG(s))}return i}startAnimation(t){let{drag:r,dragMomentum:n,dragElastic:o,dragTransition:a,dragSnapToOrigin:i,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},c=Td(u=>{if(!TG(u,r,this.currentDirection))return;let d=l&&l[u]||{};i&&(d={min:0,max:0});let f=o?200:1e6,p=o?40:1e7,m={type:"inertia",velocity:n?t[u]:0,bounceStiffness:f,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...a,...d};return this.startAxisValueAnimation(u,m)});return Promise.all(c).then(s)}startAxisValueAnimation(t,r){let n=this.getAxisMotionValue(t);return IF(this.visualElement,t),n.start(AM(t,n,0,r,this.visualElement,!1))}stopAnimation(){Td(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Td(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){let r=`_drag${t.toUpperCase()}`,n=this.visualElement.getProps(),o=n[r];return o||this.visualElement.getValue(t,(n.initial?n.initial[t]:void 0)||0)}snapToCursor(t){Td(r=>{let{drag:n}=this.getProps();if(!TG(r,n,this.currentDirection))return;let{projection:o}=this.visualElement,a=this.getAxisMotionValue(r);if(o&&o.layout){let{min:i,max:s}=o.layout.layoutBox[r];a.set(t[r]-Ln(i,s,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:t,dragConstraints:r}=this.getProps(),{projection:n}=this.visualElement;if(!sx(r)||!n||!this.constraints)return;this.stopAnimation();let o={x:0,y:0};Td(i=>{let s=this.getAxisMotionValue(i);if(s&&this.constraints!==!1){let l=s.get();o[i]=cQe({min:l,max:l},this.constraints[i])}});let{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),Td(i=>{if(!TG(i,t,null))return;let s=this.getAxisMotionValue(i),{min:l,max:c}=this.constraints[i];s.set(Ln(l,c,o[i]))})}addListeners(){if(!this.visualElement.current)return;Srr.set(this.visualElement,this);let t=this.visualElement.current,r=lw(t,"pointerdown",l=>{let{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),n=()=>{let{dragConstraints:l}=this.getProps();sx(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,a=o.addEventListener("measure",n);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),dn.read(n);let i=cx(window,"resize",()=>this.scalePositionWithinConstraints()),s=o.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(Td(u=>{let d=this.getAxisMotionValue(u);d&&(this.originPoint[u]+=l[u].translate,d.set(d.get()+l[u].translate))}),this.visualElement.render())});return()=>{i(),r(),a(),s&&s()}}getProps(){let t=this.visualElement.getProps(),{drag:r=!1,dragDirectionLock:n=!1,dragPropagation:o=!1,dragConstraints:a=!1,dragElastic:i=MG,dragMomentum:s=!0}=t;return{...t,drag:r,dragDirectionLock:n,dragPropagation:o,dragConstraints:a,dragElastic:i,dragMomentum:s}}};function TG(e,t,r){return(t===!0||t===e)&&(r===null||r===e)}function Prr(e,t=10){let r=null;return Math.abs(e.y)>t?r="y":Math.abs(e.x)>t&&(r="x"),r}var LG=class extends Ol{constructor(t){super(t),this.removeGroupControls=Ei,this.removeListeners=Ei,this.controls=new AG(t)}mount(){let{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ei}unmount(){this.removeGroupControls(),this.removeListeners()}};var fQe=e=>(t,r)=>{e&&dn.postRender(()=>e(t,r))},EG=class extends Ol{constructor(){super(...arguments),this.removePointerDownListener=Ei}onPointerDown(t){this.session=new OM(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:NG(this.node)})}createPanHandlers(){let{onPanSessionStart:t,onPanStart:r,onPan:n,onPanEnd:o}=this.node.getProps();return{onSessionStart:fQe(t),onStart:fQe(r),onMove:n,onEnd:(a,i)=>{delete this.session,o&&dn.postRender(()=>o(a,i))}}}mount(){this.removePointerDownListener=lw(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 hQe=D(Or(),1);var kF=D(lt(),1);var _M={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function pQe(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var FM={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(mr.test(e))e=parseFloat(e);else return e;let r=pQe(e,t.target.x),n=pQe(e,t.target.y);return`${r}% ${n}%`}};var mQe={correct:(e,{treeScale:t,projectionDelta:r})=>{let n=e,o=$c.parse(e);if(o.length>5)return n;let a=$c.createTransformer(e),i=typeof o[0]!="number"?1:0,s=r.x.scale*t.x,l=r.y.scale*t.y;o[0+i]/=s,o[1+i]/=l;let c=Ln(s,l,.5);return typeof o[2+i]=="number"&&(o[2+i]/=c),typeof o[3+i]=="number"&&(o[3+i]/=c),a(o)}};var eue=!1,tue=class extends kF.Component{componentDidMount(){let{visualElement:t,layoutGroup:r,switchLayoutGroup:n,layoutId:o}=this.props,{projection:a}=t;JXe(Irr),a&&(r.group&&r.group.add(a),n&&n.register&&o&&n.register(a),eue&&a.root.didUpdate(),a.addEventListener("animationComplete",()=>{this.safeToRemove()}),a.setOptions({...a.options,onExitComplete:()=>this.safeToRemove()})),_M.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){let{layoutDependency:r,visualElement:n,drag:o,isPresent:a}=this.props,{projection:i}=n;return i&&(i.isPresent=a,eue=!0,o||t.layoutDependency!==r||r===void 0||t.isPresent!==a?i.willUpdate():this.safeToRemove(),t.isPresent!==a&&(a?i.promote():i.relegate()||dn.postRender(()=>{let s=i.getStack();(!s||!s.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){let{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),N1.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:t,layoutGroup:r,switchLayoutGroup:n}=this.props,{projection:o}=t;eue=!0,o&&(o.scheduleCheckAfterUnmount(),r&&r.group&&r.group.remove(o),n&&n.deregister&&n.deregister(o))}safeToRemove(){let{safeToRemove:t}=this.props;t&&t()}render(){return null}};function DG(e){let[t,r]=rG(),n=(0,kF.useContext)(sM);return(0,hQe.jsx)(tue,{...e,layoutGroup:n,switchLayoutGroup:(0,kF.useContext)(hG),isPresent:t,safeToRemove:r})}var Irr={borderRadius:{...FM,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:FM,borderTopRightRadius:FM,borderBottomLeftRadius:FM,borderBottomRightRadius:FM,boxShadow:mQe};function OG(e,t,r){let n=Io(e)?e:Nd(e);return n.start(AM("",n,t,r)),n.animation}var gQe=(e,t)=>e.depth-t.depth;var _G=class{constructor(){this.children=[],this.isDirty=!1}add(t){g1(this.children,t),this.isDirty=!0}remove(t){uh(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(gQe),this.isDirty=!1,this.children.forEach(t)}};function vQe(e,t){let r=Qi.now(),n=({timestamp:o})=>{let a=o-r;a>=t&&(Hc(n),e(a-t))};return dn.setup(n,!0),()=>Hc(n)}var wQe=["TopLeft","TopRight","BottomLeft","BottomRight"],krr=wQe.length,yQe=e=>typeof e=="string"?parseFloat(e):e,xQe=e=>typeof e=="number"||mr.test(e);function CQe(e,t,r,n,o,a){o?(e.opacity=Ln(0,r.opacity??1,Rrr(n)),e.opacityExit=Ln(t.opacity??1,0,Nrr(n))):a&&(e.opacity=Ln(t.opacity??1,r.opacity??1,n));for(let i=0;i<krr;i++){let s=`border${wQe[i]}Radius`,l=bQe(t,s),c=bQe(r,s);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||xQe(l)===xQe(c)?(e[s]=Math.max(Ln(yQe(l),yQe(c),n),0),(jc.test(c)||jc.test(l))&&(e[s]+="%")):e[s]=c}(t.rotate||r.rotate)&&(e.rotate=Ln(t.rotate||0,r.rotate||0,n))}function bQe(e,t){return e[t]!==void 0?e[t]:e.borderRadius}var Rrr=SQe(0,.5,H_),Nrr=SQe(.5,.95,Ei);function SQe(e,t,r){return n=>n<e?0:n>t?1:r(Zp(e,t,n))}function PQe(e,t){e.min=t.min,e.max=t.max}function Of(e,t){PQe(e.x,t.x),PQe(e.y,t.y)}function rue(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function IQe(e,t,r,n,o){return e-=t,e=CF(e,1/r,n),o!==void 0&&(e=CF(e,1/o,n)),e}function Mrr(e,t=0,r=1,n=.5,o,a=e,i=e){if(jc.test(t)&&(t=parseFloat(t),t=Ln(i.min,i.max,t/100)-i.min),typeof t!="number")return;let s=Ln(a.min,a.max,n);e===a&&(s-=t),e.min=IQe(e.min,t,r,s,o),e.max=IQe(e.max,t,r,s,o)}function kQe(e,t,[r,n,o],a,i){Mrr(e,t[r],t[n],t[o],t.scale,a,i)}var Trr=["x","scaleX","originX"],Arr=["y","scaleY","originY"];function nue(e,t,r,n){kQe(e.x,t,Trr,r?r.x:void 0,n?n.x:void 0),kQe(e.y,t,Arr,r?r.y:void 0,n?n.y:void 0)}function RQe(e){return e.translate===0&&e.scale===1}function oue(e){return RQe(e.x)&&RQe(e.y)}function NQe(e,t){return e.min===t.min&&e.max===t.max}function TQe(e,t){return NQe(e.x,t.x)&&NQe(e.y,t.y)}function MQe(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function aue(e,t){return MQe(e.x,t.x)&&MQe(e.y,t.y)}function iue(e){return ll(e.x)/ll(e.y)}function sue(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}var FG=class{constructor(){this.members=[]}add(t){g1(this.members,t),t.scheduleRender()}remove(t){if(uh(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(o=>t===o);if(r===0)return!1;let n;for(let o=r;o>=0;o--){let a=this.members[o];if(a.isPresent!==!1){n=a;break}}return n?(this.promote(n),!0):!1}promote(t,r){let n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.instance&&n.scheduleRender(),t.scheduleRender(),t.resumeFrom=n,r&&(t.resumeFrom.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);let{crossfade:o}=t.options;o===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(t=>{let{options:r,resumingFrom:n}=t;r.onExitComplete&&r.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}};function AQe(e,t,r){let n="",o=e.x.translate/t.x,a=e.y.translate/t.y,i=r?.z||0;if((o||a||i)&&(n=`translate3d(${o}px, ${a}px, ${i}px) `),(t.x!==1||t.y!==1)&&(n+=`scale(${1/t.x}, ${1/t.y}) `),r){let{transformPerspective:c,rotate:u,rotateX:d,rotateY:f,skewX:p,skewY:m}=r;c&&(n=`perspective(${c}px) ${n}`),u&&(n+=`rotate(${u}deg) `),d&&(n+=`rotateX(${d}deg) `),f&&(n+=`rotateY(${f}deg) `),p&&(n+=`skewX(${p}deg) `),m&&(n+=`skewY(${m}deg) `)}let s=e.x.scale*t.x,l=e.y.scale*t.y;return(s!==1||l!==1)&&(n+=`scale(${s}, ${l})`),n||"none"}var _1={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},lue=["","X","Y","Z"],Lrr=1e3,Err=0;function cue(e,t,r,n){let{latestValues:o}=t;o[e]&&(r[e]=o[e],t.setStaticValue(e,0),n&&(n[e]=0))}function UQe(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let r=SG(t);if(window.MotionHasOptimisedAnimation(r,"transform")){let{layout:o,layoutId:a}=e.options;window.MotionCancelOptimisedAnimation(r,"transform",dn,!(o||a))}let{parent:n}=e;n&&!n.hasCheckedOptimisedAppear&&UQe(n)}function BG({attachResizeListener:e,defaultParent:t,measureScroll:r,checkIsScrollRoot:n,resetTransform:o}){return class{constructor(i={},s=t?.()){this.id=Err++,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,Rd.value&&(_1.nodes=_1.calculatedTargetDeltas=_1.calculatedProjections=0),this.nodes.forEach(_rr),this.nodes.forEach(Urr),this.nodes.forEach(zrr),this.nodes.forEach(Frr),Rd.addProjectionMetrics&&Rd.addProjectionMetrics(_1)},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 _G)}addEventListener(i,s){return this.eventHandlers.has(i)||this.eventHandlers.set(i,new Jy),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=T1(i)&&!hF(i),this.instance=i;let{layoutId:s,layout:l,visualElement:c}=this.options;if(c&&!c.current&&c.mount(i),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||s)&&(this.isLayoutDirty=!0),e){let u,d=0,f=()=>this.root.updateBlockedByResize=!1;dn.read(()=>{d=window.innerWidth}),e(i,()=>{let p=window.innerWidth;p!==d&&(d=p,this.root.updateBlockedByResize=!0,u&&u(),u=vQe(f,250),_M.hasAnimatedSinceResize&&(_M.hasAnimatedSinceResize=!1,this.nodes.forEach(DQe)))})}s&&this.root.registerSharedNode(s,this),this.options.animate!==!1&&c&&(s||l)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:d,hasRelativeLayoutChanged:f,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let m=this.options.transition||c.getDefaultTransition()||Wrr,{onLayoutAnimationStart:h,onLayoutAnimationComplete:g}=c.getProps(),v=!this.targetLayout||!aue(this.targetLayout,p),y=!d&&f;if(this.options.layoutRoot||this.resumeFrom||y||d&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let x={...I1(m,"layout"),onPlay:h,onComplete:g};(c.shouldReduceMotion||this.options.layoutRoot)&&(x.delay=0,x.type=!1),this.startAnimation(x),this.setAnimationOrigin(u,y)}else d||DQe(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(),Hc(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(Hrr),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&&UQe(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){let d=this.path[u];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 c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),i&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(LQe);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(EQe);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Vrr),this.nodes.forEach(Drr),this.nodes.forEach(Orr)):this.nodes.forEach(EQe),this.clearAllSnapshots();let s=Qi.now();Yi.delta=Dl(0,1e3/60,s-Yi.timestamp),Yi.timestamp=s,Yi.isProcessing=!0,X_.update.process(Yi),X_.preRender.process(Yi),X_.render.process(Yi),Yi.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,N1.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Brr),this.sharedNodes.forEach(jrr)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,dn.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){dn.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!ll(this.snapshot.measuredBox.x)&&!ll(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=da(),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=n(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(!o)return;let i=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,s=this.projectionDelta&&!oue(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;i&&this.instance&&(s||lx(this.latestValues)||u)&&(o(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(i=!0){let s=this.measurePageBox(),l=this.removeElementScroll(s);return i&&(l=this.removeTransform(l)),Grr(l),{animationId:this.root.animationId,measuredBox:s,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:i}=this.options;if(!i)return da();let s=i.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Krr))){let{scroll:c}=this.root;c&&(iw(s.x,c.offset.x),iw(s.y,c.offset.y))}return s}removeElementScroll(i){let s=da();if(Of(s,i),this.scroll?.wasRoot)return s;for(let l=0;l<this.path.length;l++){let c=this.path[l],{scroll:u,options:d}=c;c!==this.root&&u&&d.layoutScroll&&(u.wasRoot&&Of(s,i),iw(s.x,u.offset.x),iw(s.y,u.offset.y))}return s}applyTransform(i,s=!1){let l=da();Of(l,i);for(let c=0;c<this.path.length;c++){let u=this.path[c];!s&&u.options.layoutScroll&&u.scroll&&u!==u.root&&E1(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),lx(u.latestValues)&&E1(l,u.latestValues)}return lx(this.latestValues)&&E1(l,this.latestValues),l}removeTransform(i){let s=da();Of(s,i);for(let l=0;l<this.path.length;l++){let c=this.path[l];if(!c.instance||!lx(c.latestValues))continue;xG(c.latestValues)&&c.updateSnapshot();let u=da(),d=c.measurePageBox();Of(u,d),nue(s,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return lx(this.latestValues)&&nue(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!==Yi.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:u,layoutId:d}=this.options;if(!(!this.layout||!(u||d))){if(this.resolvedRelativeTargetAt=Yi.timestamp,!this.targetDelta&&!this.relativeTarget){let f=this.getClosestProjectingParent();f&&f.layout&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=da(),this.relativeTargetOrigin=da(),DM(this.relativeTargetOrigin,this.layout.layoutBox,f.layout.layoutBox),Of(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=da(),this.targetWithTransforms=da()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),QYe(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Of(this.target,this.layout.layoutBox),Kce(this.target,this.targetDelta)):Of(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=da(),this.relativeTargetOrigin=da(),DM(this.relativeTargetOrigin,this.target,f.target),Of(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}Rd.value&&_1.calculatedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||xG(this.parent.latestValues)||Wce(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===Yi.timestamp&&(l=!1),l)return;let{layout:c,layoutId:u}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||u))return;Of(this.layoutCorrected,this.layout.layoutBox);let d=this.treeScale.x,f=this.treeScale.y;IYe(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=da());let{target:p}=i;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(rue(this.prevProjectionDelta.x,this.projectionDelta.x),rue(this.prevProjectionDelta.y,this.projectionDelta.y)),EM(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==f||!sue(this.projectionDelta.x,this.prevProjectionDelta.x)||!sue(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p)),Rd.value&&_1.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=D1(),this.projectionDelta=D1(),this.projectionDeltaWithTransform=D1()}setAnimationOrigin(i,s=!1){let l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=D1();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!s;let f=da(),p=l?l.source:void 0,m=this.layout?this.layout.source:void 0,h=p!==m,g=this.getStack(),v=!g||g.members.length<=1,y=!!(h&&!v&&this.options.crossfade===!0&&!this.path.some(qrr));this.animationProgress=0;let x;this.mixTargetDelta=w=>{let b=w/1e3;OQe(d.x,i.x,b),OQe(d.y,i.y,b),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(DM(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),$rr(this.relativeTarget,this.relativeTargetOrigin,f,b),x&&TQe(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=da()),Of(x,this.relativeTarget)),h&&(this.animationValues=u,CQe(u,c,this.latestValues,b,y,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=b},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(i){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Hc(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=dn.update(()=>{_M.hasAnimatedSinceResize=!0,fh.layout++,this.motionValue||(this.motionValue=Nd(0)),this.currentAnimation=OG(this.motionValue,[0,1e3],{...i,velocity:0,isSync:!0,onUpdate:s=>{this.mixTargetDelta(s),i.onUpdate&&i.onUpdate(s)},onStop:()=>{fh.layout--},onComplete:()=>{fh.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(Lrr),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let i=this.getLead(),{targetWithTransforms:s,target:l,layout:c,latestValues:u}=i;if(!(!s||!l||!c)){if(this!==i&&this.layout&&c&&zQe(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||da();let d=ll(this.layout.layoutBox.x);l.x.min=i.target.x.min,l.x.max=l.x.min+d;let f=ll(this.layout.layoutBox.y);l.y.min=i.target.y.min,l.y.max=l.y.min+f}Of(s,l),E1(s,u),EM(this.projectionDeltaWithTransform,this.layoutCorrected,s,u)}}registerSharedNode(i,s){this.sharedNodes.has(i)||this.sharedNodes.set(i,new FG),this.sharedNodes.get(i).add(s);let c=s.options.initialPromotionConfig;s.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.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 c=this.getStack();c&&c.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 c={};l.z&&cue("z",i,c,this.animationValues);for(let u=0;u<lue.length;u++)cue(`rotate${lue[u]}`,i,c,this.animationValues),cue(`skew${lue[u]}`,i,c,this.animationValues);i.render();for(let u in c)i.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);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=SM(s?.pointerEvents)||"",i.transform=l?l(this.latestValues,""):"none";return}let c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){this.options.layoutId&&(i.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,i.pointerEvents=SM(s?.pointerEvents)||""),this.hasProjected&&!lx(this.latestValues)&&(i.transform=l?l({},""):"none",this.hasProjected=!1);return}i.visibility="";let u=c.animationValues||c.latestValues;this.applyTransformsToTarget();let d=AQe(this.projectionDeltaWithTransform,this.treeScale,u);l&&(d=l(u,d)),i.transform=d;let{x:f,y:p}=this.projectionDelta;i.transformOrigin=`${f.origin*100}% ${p.origin*100}% 0`,c.animationValues?i.opacity=c===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:i.opacity=c===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(let m in L1){if(u[m]===void 0)continue;let{correct:h,applyTo:g,isCSSVariable:v}=L1[m],y=d==="none"?u[m]:h(u[m],c);if(g){let x=g.length;for(let w=0;w<x;w++)i[g[w]]=y}else v?this.options.visualElement.renderState.vars[m]=y:i[m]=y}this.options.layoutId&&(i.pointerEvents=c===this?SM(s?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(i=>i.currentAnimation?.stop()),this.root.nodes.forEach(LQe),this.root.sharedNodes.clear()}}}function Drr(e){e.updateLayout()}function Orr(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){let{layoutBox:r,measuredBox:n}=e.layout,{animationType:o}=e.options,a=t.source!==e.layout.source;o==="size"?Td(u=>{let d=a?t.measuredBox[u]:t.layoutBox[u],f=ll(d);d.min=r[u].min,d.max=d.min+f}):zQe(o,t.layoutBox,r)&&Td(u=>{let d=a?t.measuredBox[u]:t.layoutBox[u],f=ll(r[u]);d.max=d.min+f,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[u].max=e.relativeTarget[u].min+f)});let i=D1();EM(i,r,t.layoutBox);let s=D1();a?EM(s,e.applyTransform(n,!0),t.measuredBox):EM(s,r,t.layoutBox);let l=!oue(i),c=!1;if(!e.resumeFrom){let u=e.getClosestProjectingParent();if(u&&!u.resumeFrom){let{snapshot:d,layout:f}=u;if(d&&f){let p=da();DM(p,t.layoutBox,d.layoutBox);let m=da();DM(m,r,f.layoutBox),aue(p,m)||(c=!0),u.options.layoutRoot&&(e.relativeTarget=m,e.relativeTargetOrigin=p,e.relativeParent=u)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:s,layoutDelta:i,hasLayoutChanged:l,hasRelativeLayoutChanged:c})}else if(e.isLead()){let{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function _rr(e){Rd.value&&_1.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 Frr(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Brr(e){e.clearSnapshot()}function LQe(e){e.clearMeasurements()}function EQe(e){e.isLayoutDirty=!1}function Vrr(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function DQe(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Urr(e){e.resolveTargetDelta()}function zrr(e){e.calcProjection()}function Hrr(e){e.resetSkewAndRotation()}function jrr(e){e.removeLeadSnapshot()}function OQe(e,t,r){e.translate=Ln(t.translate,0,r),e.scale=Ln(t.scale,1,r),e.origin=t.origin,e.originPoint=t.originPoint}function _Qe(e,t,r,n){e.min=Ln(t.min,r.min,n),e.max=Ln(t.max,r.max,n)}function $rr(e,t,r,n){_Qe(e.x,t.x,r.x,n),_Qe(e.y,t.y,r.y,n)}function qrr(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var Wrr={duration:.45,ease:[.4,0,.1,1]},FQe=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),BQe=FQe("applewebkit/")&&!FQe("chrome/")?Math.round:Ei;function VQe(e){e.min=BQe(e.min),e.max=BQe(e.max)}function Grr(e){VQe(e.x),VQe(e.y)}function zQe(e,t,r){return e==="position"||e==="preserve-aspect"&&!YYe(iue(t),iue(r),.2)}function Krr(e){return e!==e.root&&e.scroll?.wasRoot}var HQe=BG({attachResizeListener:(e,t)=>cx(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0});var uue={current:void 0},VG=BG({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!uue.current){let e=new HQe({});e.mount(window),e.setOptions({layoutScroll:!0}),uue.current=e}return uue.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"});var jQe={pan:{Feature:EG},drag:{Feature:LG,ProjectionNode:VG,MeasureLayout:DG}};function $Qe(e,t,r){let{props:n}=e;e.animationState&&n.whileHover&&e.animationState.setActive("whileHover",r==="Start");let o="onHover"+r,a=n[o];a&&dn.postRender(()=>a(t,ux(t)))}var UG=class extends Ol{mount(){let{current:t}=this.node;t&&(this.unmount=Dce(t,(r,n)=>($Qe(this.node,n,"Start"),o=>$Qe(this.node,o,"End"))))}unmount(){}};var zG=class extends Ol{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=dh(cx(this.node.current,"focus",()=>this.onFocus()),cx(this.node.current,"blur",()=>this.onBlur()))}unmount(){}};function qQe(e,t,r){let{props:n}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&n.whileTap&&e.animationState.setActive("whileTap",r==="Start");let o="onTap"+(r==="End"?"":r),a=n[o];a&&dn.postRender(()=>a(t,ux(t)))}var HG=class extends Ol{mount(){let{current:t}=this.node;t&&(this.unmount=Fce(t,(r,n)=>(qQe(this.node,n,"Start"),(o,{success:a})=>qQe(this.node,o,a?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}};var fue=new WeakMap,due=new WeakMap,Xrr=e=>{let t=fue.get(e.target);t&&t(e)},Yrr=e=>{e.forEach(Xrr)};function Qrr({root:e,...t}){let r=e||document;due.has(r)||due.set(r,{});let n=due.get(r),o=JSON.stringify(t);return n[o]||(n[o]=new IntersectionObserver(Yrr,{root:e,...t})),n[o]}function WQe(e,t,r){let n=Qrr(t);return fue.set(e,r),n.observe(e),()=>{fue.delete(e),n.unobserve(e)}}var Zrr={some:0,all:1},jG=class extends Ol{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();let{viewport:t={}}=this.node.getProps(),{root:r,margin:n,amount:o="some",once:a}=t,i={root:r?r.current:void 0,rootMargin:n,threshold:typeof o=="number"?o:Zrr[o]},s=l=>{let{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,a&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);let{onViewportEnter:u,onViewportLeave:d}=this.node.getProps(),f=c?u:d;f&&f(l)};return WQe(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(Jrr(t,r))&&this.startObserver()}unmount(){}};function Jrr({viewport:e={}},{viewport:t={}}={}){return r=>e[r]!==t[r]}var GQe={inView:{Feature:jG},tap:{Feature:HG},focus:{Feature:zG},hover:{Feature:UG}};var KQe={layout:{ProjectionNode:VG,MeasureLayout:DG}};var XQe={...jYe,...GQe,...jQe,...KQe};var Ad=vYe(XQe,DYe);var BM=D(lt(),1);function VM(e){let t=ev(()=>Nd(e)),{isStatic:r}=(0,BM.useContext)(rw);if(r){let[,n]=(0,BM.useState)(e);(0,BM.useEffect)(()=>t.on("change",n),[])}return t}function $G(e,t){let r=VM(t()),n=()=>r.set(t());return n(),cM(()=>{let o=()=>dn.preRender(n,!1,!0),a=e.map(i=>i.on("change",o));return()=>{a.forEach(i=>i()),Hc(n)}}),r}function YQe(e){R1.current=[],e();let t=$G(R1.current,e);return R1.current=void 0,t}function pue(e,t,r,n){if(typeof e=="function")return YQe(e);let o=typeof t=="function"?t:Bce(t,r,n);return Array.isArray(e)?QQe(e,o):QQe([e],([a])=>o(a))}function QQe(e,t){let r=ev(()=>[]);return $G(e,()=>{r.length=0;let n=e.length;for(let o=0;o<n;o++)r[o]=e[o].get();return t(r)})}function RF(e){return typeof e=="object"&&!Array.isArray(e)}function qG(e,t,r,n){return typeof e=="string"&&RF(t)?fF(e,r,n):e instanceof NodeList?Array.from(e):Array.isArray(e)?e:[e]}function ZQe(e,t,r){return e*(t+1)}function mue(e,t,r,n){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))):n.get(t)??e}function enr(e,t,r){for(let n=0;n<e.length;n++){let o=e[n];o.at>t&&o.at<r&&(uh(e,o),n--)}}function JQe(e,t,r,n,o,a){enr(e,o,a);for(let i=0;i<t.length;i++)e.push({value:t[i],at:Ln(o,a,n[i]),easing:W_(r,i)})}function eZe(e,t){for(let r=0;r<e.length;r++)e[r]=e[r]/(t+1)}function tZe(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}var tnr="easeInOut",rnr=20;function oZe(e,{defaultTransition:t={},...r}={},n,o){let a=t.duration||.3,i=new Map,s=new Map,l={},c=new Map,u=0,d=0,f=0;for(let p=0;p<e.length;p++){let m=e[p];if(typeof m=="string"){c.set(m,d);continue}else if(!Array.isArray(m)){c.set(m.name,mue(d,m.at,u,c));continue}let[h,g,v={}]=m;v.at!==void 0&&(d=mue(d,v.at,u,c));let y=0,x=(w,b,C,S=0,P=0)=>{let N=nnr(w),{delay:T=0,times:A=rF(N),type:M="keyframes",repeat:O,repeatType:F,repeatDelay:I=0,...k}=b,{ease:R=t.ease||"easeOut",duration:E}=b,_=typeof T=="function"?T(S,P):T,U=N.length,V=P1(M)?M:o?.[M||"keyframes"];if(U<=2&&V){let $=100;if(U===2&&inr(N)){let G=N[1]-N[0];$=Math.abs(G)}let W={...k};E!==void 0&&(W.duration=ds(E));let z=J_(W,$,V);R=z.ease,E=z.duration}E??(E=a);let L=d+_;A.length===1&&A[0]===0&&(A[1]=1);let H=A.length-N.length;if(H>0&&tF(A,H),N.length===1&&N.unshift(null),O){sc(O<rnr,"Repeat count too high, must be less than 20","repeat-count-high"),E=ZQe(E,O);let $=[...N],W=[...A];R=Array.isArray(R)?[...R]:[R];let z=[...R];for(let G=0;G<O;G++){N.push(...$);for(let X=0;X<$.length;X++)A.push(W[X]+(G+1)),R.push(X===0?"linear":W_(z,X-1))}eZe(A,O)}let j=L+E;JQe(C,N,R,A,L,j),y=Math.max(_+E,y),f=Math.max(j,f)};if(Io(h)){let w=rZe(h,s);x(g,v,nZe("default",w))}else{let w=qG(h,g,n,l),b=w.length;for(let C=0;C<b;C++){g=g,v=v;let S=w[C],P=rZe(S,s);for(let N in g)x(g[N],onr(v,N),nZe(N,P),C,b)}}u=d,d+=y}return s.forEach((p,m)=>{for(let h in p){let g=p[h];g.sort(tZe);let v=[],y=[],x=[];for(let b=0;b<g.length;b++){let{at:C,value:S,easing:P}=g[b];v.push(S),y.push(Zp(0,f,C)),x.push(P||"easeOut")}y[0]!==0&&(y.unshift(0),v.unshift(v[0]),x.unshift(tnr)),y[y.length-1]!==1&&(y.push(1),v.push(null)),i.has(m)||i.set(m,{keyframes:{},transition:{}});let w=i.get(m);w.keyframes[h]=v,w.transition[h]={...t,duration:f,ease:x,times:y,...r}}}),i}function rZe(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function nZe(e,t){return t[e]||(t[e]=[]),t[e]}function nnr(e){return Array.isArray(e)?e:[e]}function onr(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}var anr=e=>typeof e=="number",inr=e=>e.every(anr);function snr(e,t){return e in t}var WG=class extends RM{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,r){if(snr(r,t)){let n=t[r];if(typeof n=="string"||typeof n=="number")return n}}getBaseTargetFromProps(){}removeValueFromRenderState(t,r){delete r.output[t]}measureInstanceViewportBox(){return da()}build(t,r){Object.assign(t.output,r)}renderInstance(t,{output:r}){Object.assign(t,r)}sortInstanceNodePosition(){return 0}};function aZe(e){let t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},r=T1(e)&&!hF(e)?new TM(t):new MM(t);r.mount(e),sw.set(e,r)}function iZe(e){let t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},r=new WG(t);r.mount(e),sw.set(e,r)}function lnr(e,t){return Io(e)||typeof e=="number"||typeof e=="string"&&!RF(t)}function GG(e,t,r,n){let o=[];if(lnr(e,t))o.push(OG(e,RF(t)&&t.default||t,r&&(r.default||r)));else{let a=qG(e,t,n),i=a.length;sc(!!i,"No valid elements provided.","no-valid-elements");for(let s=0;s<i;s++){let l=a[s];sc(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 c=l instanceof Element?aZe:iZe;sw.has(l)||c(l);let u=sw.get(l),d={...r};"delay"in d&&typeof d.delay=="function"&&(d.delay=d.delay(s,i)),o.push(...LM(u,{...t,transition:d},{}))}}return o}function sZe(e,t,r){let n=[];return oZe(e,t,r,{spring:tx}).forEach(({keyframes:a,transition:i},s)=>{n.push(...GG(s,a,i))}),n}function cnr(e){return Array.isArray(e)&&e.some(Array.isArray)}function lZe(e){function t(r,n,o){let a=[];cnr(r)?a=sZe(r,n,e):a=GG(r,n,o,e);let i=new iF(a);return e&&(e.animations.push(i),i.finished.then(()=>{uh(e.animations,i)})),i}return t}var hue=lZe();var Du=D(lt(),1);var _f=D(Or(),1),KG="Checkbox",[unr,eGn]=hn(KG),[dnr,gue]=unr(KG);function fnr(e){let{__scopeCheckbox:t,checked:r,children:n,defaultChecked:o,disabled:a,form:i,name:s,onCheckedChange:l,required:c,value:u="on",internal_do_not_use_render:d}=e,[f,p]=eo({prop:r,defaultProp:o??!1,onChange:l,caller:KG}),[m,h]=Du.useState(null),[g,v]=Du.useState(null),y=Du.useRef(!1),x=m?!!i||!!m.closest("form"):!0,w={checked:f,disabled:a,setChecked:p,control:m,setControl:h,name:s,form:i,value:u,hasConsumerStoppedPropagationRef:y,required:c,defaultChecked:cw(o)?!1:o,isFormControl:x,bubbleInput:g,setBubbleInput:v};return(0,_f.jsx)(dnr,{scope:t,...w,children:pnr(d)?d(w):n})}var cZe="CheckboxTrigger",uZe=Du.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:r,...n},o)=>{let{control:a,value:i,disabled:s,checked:l,required:c,setControl:u,setChecked:d,hasConsumerStoppedPropagationRef:f,isFormControl:p,bubbleInput:m}=gue(cZe,e),h=Xt(o,u),g=Du.useRef(l);return Du.useEffect(()=>{let v=a?.form;if(v){let y=()=>d(g.current);return v.addEventListener("reset",y),()=>v.removeEventListener("reset",y)}},[a,d]),(0,_f.jsx)(rt.button,{type:"button",role:"checkbox","aria-checked":cw(l)?"mixed":l,"aria-required":c,"data-state":mZe(l),"data-disabled":s?"":void 0,disabled:s,value:i,...n,ref:h,onKeyDown:He(t,v=>{v.key==="Enter"&&v.preventDefault()}),onClick:He(r,v=>{d(y=>cw(y)?!0:!y),m&&p&&(f.current=v.isPropagationStopped(),f.current||v.stopPropagation())})})});uZe.displayName=cZe;var XG=Du.forwardRef((e,t)=>{let{__scopeCheckbox:r,name:n,checked:o,defaultChecked:a,required:i,disabled:s,value:l,onCheckedChange:c,form:u,...d}=e;return(0,_f.jsx)(fnr,{__scopeCheckbox:r,checked:o,defaultChecked:a,disabled:s,required:i,onCheckedChange:c,name:n,form:u,value:l,internal_do_not_use_render:({isFormControl:f})=>(0,_f.jsxs)(_f.Fragment,{children:[(0,_f.jsx)(uZe,{...d,ref:t,__scopeCheckbox:r}),f&&(0,_f.jsx)(pZe,{__scopeCheckbox:r})]})})});XG.displayName=KG;var dZe="CheckboxIndicator",vue=Du.forwardRef((e,t)=>{let{__scopeCheckbox:r,forceMount:n,...o}=e,a=gue(dZe,r);return(0,_f.jsx)(uo,{present:n||cw(a.checked)||a.checked===!0,children:(0,_f.jsx)(rt.span,{"data-state":mZe(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});vue.displayName=dZe;var fZe="CheckboxBubbleInput",pZe=Du.forwardRef(({__scopeCheckbox:e,...t},r)=>{let{control:n,hasConsumerStoppedPropagationRef:o,checked:a,defaultChecked:i,required:s,disabled:l,name:c,value:u,form:d,bubbleInput:f,setBubbleInput:p}=gue(fZe,e),m=Xt(r,p),h=Wb(a),g=uk(n);Du.useEffect(()=>{let y=f;if(!y)return;let x=window.HTMLInputElement.prototype,b=Object.getOwnPropertyDescriptor(x,"checked").set,C=!o.current;if(h!==a&&b){let S=new Event("click",{bubbles:C});y.indeterminate=cw(a),b.call(y,cw(a)?!1:a),y.dispatchEvent(S)}},[f,h,a,o]);let v=Du.useRef(cw(a)?!1:a);return(0,_f.jsx)(rt.input,{type:"checkbox","aria-hidden":!0,defaultChecked:i??v.current,required:s,disabled:l,name:c,value:u,form:d,...t,tabIndex:-1,ref:m,style:{...t.style,...g,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});pZe.displayName=fZe;function pnr(e){return typeof e=="function"}function cw(e){return e==="indeterminate"}function mZe(e){return cw(e)?"indeterminate":e?"checked":"unchecked"}var rXn=D(ng(),1);var hZe=D(lt(),1);var gZe=D(Or(),1),hnr="Label",vZe=hZe.forwardRef((e,t)=>(0,gZe.jsx)(rt.label,{...e,ref:t,onMouseDown:r=>{r.target.closest("button, input, select, textarea")||(e.onMouseDown?.(r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));vZe.displayName=hnr;var yue=vZe;var pi=D(lt(),1);var zs=D(Or(),1),YG="Popover",[yZe,vGn]=hn(YG,[gu]),NF=gu(),[vnr,uw]=yZe(YG),xZe=e=>{let{__scopePopover:t,children:r,open:n,defaultOpen:o,onOpenChange:a,modal:i=!1}=e,s=NF(t),l=pi.useRef(null),[c,u]=pi.useState(!1),[d,f]=eo({prop:n,defaultProp:o??!1,onChange:a,caller:YG});return(0,zs.jsx)(_m,{...s,children:(0,zs.jsx)(vnr,{scope:t,contentId:Vo(),triggerRef:l,open:d,onOpenChange:f,onOpenToggle:pi.useCallback(()=>f(p=>!p),[f]),hasCustomAnchor:c,onCustomAnchorAdd:pi.useCallback(()=>u(!0),[]),onCustomAnchorRemove:pi.useCallback(()=>u(!1),[]),modal:i,children:r})})};xZe.displayName=YG;var bZe="PopoverAnchor",ynr=pi.forwardRef((e,t)=>{let{__scopePopover:r,...n}=e,o=uw(bZe,r),a=NF(r),{onCustomAnchorAdd:i,onCustomAnchorRemove:s}=o;return pi.useEffect(()=>(i(),()=>s()),[i,s]),(0,zs.jsx)(Fm,{...a,...n,ref:t})});ynr.displayName=bZe;var wZe="PopoverTrigger",CZe=pi.forwardRef((e,t)=>{let{__scopePopover:r,...n}=e,o=uw(wZe,r),a=NF(r),i=Xt(t,o.triggerRef),s=(0,zs.jsx)(rt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":kZe(o.open),...n,ref:i,onClick:He(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?s:(0,zs.jsx)(Fm,{asChild:!0,...a,children:s})});CZe.displayName=wZe;var xue="PopoverPortal",[xnr,bnr]=yZe(xue,{forceMount:void 0}),wnr=e=>{let{__scopePopover:t,forceMount:r,children:n,container:o}=e,a=uw(xue,t);return(0,zs.jsx)(xnr,{scope:t,forceMount:r,children:(0,zs.jsx)(uo,{present:r||a.open,children:(0,zs.jsx)(vu,{asChild:!0,container:o,children:n})})})};wnr.displayName=xue;var UM="PopoverContent",SZe=pi.forwardRef((e,t)=>{let r=bnr(UM,e.__scopePopover),{forceMount:n=r.forceMount,...o}=e,a=uw(UM,e.__scopePopover);return(0,zs.jsx)(uo,{present:n||a.open,children:a.modal?(0,zs.jsx)(Snr,{...o,ref:t}):(0,zs.jsx)(Pnr,{...o,ref:t})})});SZe.displayName=UM;var Cnr=Sc("PopoverContent.RemoveScroll"),Snr=pi.forwardRef((e,t)=>{let r=uw(UM,e.__scopePopover),n=pi.useRef(null),o=Xt(t,n),a=pi.useRef(!1);return pi.useEffect(()=>{let i=n.current;if(i)return U0(i)},[]),(0,zs.jsx)(Wy,{as:Cnr,allowPinchZoom:!0,children:(0,zs.jsx)(PZe,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:He(e.onCloseAutoFocus,i=>{i.preventDefault(),a.current||r.triggerRef.current?.focus()}),onPointerDownOutside:He(e.onPointerDownOutside,i=>{let s=i.detail.originalEvent,l=s.button===0&&s.ctrlKey===!0,c=s.button===2||l;a.current=c},{checkForDefaultPrevented:!1}),onFocusOutside:He(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1})})})}),Pnr=pi.forwardRef((e,t)=>{let r=uw(UM,e.__scopePopover),n=pi.useRef(!1),o=pi.useRef(!1);return(0,zs.jsx)(PZe,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{e.onCloseAutoFocus?.(a),a.defaultPrevented||(n.current||r.triggerRef.current?.focus(),a.preventDefault()),n.current=!1,o.current=!1},onInteractOutside:a=>{e.onInteractOutside?.(a),a.defaultPrevented||(n.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));let i=a.target;r.triggerRef.current?.contains(i)&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),PZe=pi.forwardRef((e,t)=>{let{__scopePopover:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:i,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:c,onInteractOutside:u,...d}=e,f=uw(UM,r),p=NF(r);return V0(),(0,zs.jsx)(qy,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:a,children:(0,zs.jsx)(kc,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:u,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:c,onDismiss:()=>f.onOpenChange(!1),children:(0,zs.jsx)(dg,{"data-state":kZe(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)"}})})})}),IZe="PopoverClose",Inr=pi.forwardRef((e,t)=>{let{__scopePopover:r,...n}=e,o=uw(IZe,r);return(0,zs.jsx)(rt.button,{type:"button",...n,ref:t,onClick:He(e.onClick,()=>o.onOpenChange(!1))})});Inr.displayName=IZe;var knr="PopoverArrow",Rnr=pi.forwardRef((e,t)=>{let{__scopePopover:r,...n}=e,o=NF(r);return(0,zs.jsx)(fg,{...o,...n,ref:t})});Rnr.displayName=knr;function kZe(e){return e?"open":"closed"}var RZe=xZe;var NZe=CZe;var bue=SZe;var fx=D(lt(),1);var _l=D(lt(),1);var dw=D(Or(),1),wue="rovingFocusGroup.onEntryFocus",Mnr={bubbles:!1,cancelable:!0},MF="RovingFocusGroup",[Cue,MZe,Tnr]=cf(MF),[Anr,zM]=hn(MF,[Tnr]),[Lnr,Enr]=Anr(MF),TZe=_l.forwardRef((e,t)=>(0,dw.jsx)(Cue.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,dw.jsx)(Cue.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,dw.jsx)(Dnr,{...e,ref:t})})}));TZe.displayName=MF;var Dnr=_l.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:r,orientation:n,loop:o=!1,dir:a,currentTabStopId:i,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:c,preventScrollOnEntryFocus:u=!1,...d}=e,f=_l.useRef(null),p=Xt(t,f),m=wp(a),[h,g]=eo({prop:i,defaultProp:s??null,onChange:l,caller:MF}),[v,y]=_l.useState(!1),x=to(c),w=MZe(r),b=_l.useRef(!1),[C,S]=_l.useState(0);return _l.useEffect(()=>{let P=f.current;if(P)return P.addEventListener(wue,x),()=>P.removeEventListener(wue,x)},[x]),(0,dw.jsx)(Lnr,{scope:r,orientation:n,dir:m,loop:o,currentTabStopId:h,onItemFocus:_l.useCallback(P=>g(P),[g]),onItemShiftTab:_l.useCallback(()=>y(!0),[]),onFocusableItemAdd:_l.useCallback(()=>S(P=>P+1),[]),onFocusableItemRemove:_l.useCallback(()=>S(P=>P-1),[]),children:(0,dw.jsx)(rt.div,{tabIndex:v||C===0?-1:0,"data-orientation":n,...d,ref:p,style:{outline:"none",...e.style},onMouseDown:He(e.onMouseDown,()=>{b.current=!0}),onFocus:He(e.onFocus,P=>{let N=!b.current;if(P.target===P.currentTarget&&N&&!v){let T=new CustomEvent(wue,Mnr);if(P.currentTarget.dispatchEvent(T),!T.defaultPrevented){let A=w().filter(k=>k.focusable),M=A.find(k=>k.active),O=A.find(k=>k.id===h),I=[M,O,...A].filter(Boolean).map(k=>k.ref.current);EZe(I,u)}}b.current=!1}),onBlur:He(e.onBlur,()=>y(!1))})})}),AZe="RovingFocusGroupItem",LZe=_l.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:r,focusable:n=!0,active:o=!1,tabStopId:a,children:i,...s}=e,l=Vo(),c=a||l,u=Enr(AZe,r),d=u.currentTabStopId===c,f=MZe(r),{onFocusableItemAdd:p,onFocusableItemRemove:m,currentTabStopId:h}=u;return _l.useEffect(()=>{if(n)return p(),()=>m()},[n,p,m]),(0,dw.jsx)(Cue.ItemSlot,{scope:r,id:c,focusable:n,active:o,children:(0,dw.jsx)(rt.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...s,ref:t,onMouseDown:He(e.onMouseDown,g=>{n?u.onItemFocus(c):g.preventDefault()}),onFocus:He(e.onFocus,()=>u.onItemFocus(c)),onKeyDown:He(e.onKeyDown,g=>{if(g.key==="Tab"&&g.shiftKey){u.onItemShiftTab();return}if(g.target!==g.currentTarget)return;let v=Fnr(g,u.orientation,u.dir);if(v!==void 0){if(g.metaKey||g.ctrlKey||g.altKey||g.shiftKey)return;g.preventDefault();let x=f().filter(w=>w.focusable).map(w=>w.ref.current);if(v==="last")x.reverse();else if(v==="prev"||v==="next"){v==="prev"&&x.reverse();let w=x.indexOf(g.currentTarget);x=u.loop?Bnr(x,w+1):x.slice(w+1)}setTimeout(()=>EZe(x))}}),children:typeof i=="function"?i({isCurrentTabStop:d,hasTabStop:h!=null}):i})})});LZe.displayName=AZe;var Onr={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function _nr(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Fnr(e,t,r){let n=_nr(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return Onr[n]}function EZe(e,t=!1){let r=document.activeElement;for(let n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}function Bnr(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var QG=TZe,ZG=LZe;var dx=D(Or(),1),JG="Tabs",[Vnr,OGn]=hn(JG,[zM]),OZe=zM(),[Unr,Sue]=Vnr(JG),_Ze=fx.forwardRef((e,t)=>{let{__scopeTabs:r,value:n,onValueChange:o,defaultValue:a,orientation:i="horizontal",dir:s,activationMode:l="automatic",...c}=e,u=wp(s),[d,f]=eo({prop:n,onChange:o,defaultProp:a??"",caller:JG});return(0,dx.jsx)(Unr,{scope:r,baseId:Vo(),value:d,onValueChange:f,orientation:i,dir:u,activationMode:l,children:(0,dx.jsx)(rt.div,{dir:u,"data-orientation":i,...c,ref:t})})});_Ze.displayName=JG;var FZe="TabsList",BZe=fx.forwardRef((e,t)=>{let{__scopeTabs:r,loop:n=!0,...o}=e,a=Sue(FZe,r),i=OZe(r);return(0,dx.jsx)(QG,{asChild:!0,...i,orientation:a.orientation,dir:a.dir,loop:n,children:(0,dx.jsx)(rt.div,{role:"tablist","aria-orientation":a.orientation,...o,ref:t})})});BZe.displayName=FZe;var VZe="TabsTrigger",UZe=fx.forwardRef((e,t)=>{let{__scopeTabs:r,value:n,disabled:o=!1,...a}=e,i=Sue(VZe,r),s=OZe(r),l=jZe(i.baseId,n),c=$Ze(i.baseId,n),u=n===i.value;return(0,dx.jsx)(ZG,{asChild:!0,...s,focusable:!o,active:u,children:(0,dx.jsx)(rt.button,{type:"button",role:"tab","aria-selected":u,"aria-controls":c,"data-state":u?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:l,...a,ref:t,onMouseDown:He(e.onMouseDown,d=>{!o&&d.button===0&&d.ctrlKey===!1?i.onValueChange(n):d.preventDefault()}),onKeyDown:He(e.onKeyDown,d=>{[" ","Enter"].includes(d.key)&&i.onValueChange(n)}),onFocus:He(e.onFocus,()=>{let d=i.activationMode!=="manual";!u&&!o&&d&&i.onValueChange(n)})})})});UZe.displayName=VZe;var zZe="TabsContent",HZe=fx.forwardRef((e,t)=>{let{__scopeTabs:r,value:n,forceMount:o,children:a,...i}=e,s=Sue(zZe,r),l=jZe(s.baseId,n),c=$Ze(s.baseId,n),u=n===s.value,d=fx.useRef(u);return fx.useEffect(()=>{let f=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(f)},[]),(0,dx.jsx)(uo,{present:o||u,children:({present:f})=>(0,dx.jsx)(rt.div,{"data-state":u?"active":"inactive","data-orientation":s.orientation,role:"tabpanel","aria-labelledby":l,hidden:!f,id:c,tabIndex:0,...i,ref:t,style:{...e.style,animationDuration:d.current?"0s":void 0},children:f&&a})})});HZe.displayName=zZe;function jZe(e,t){return`${e}-trigger-${t}`}function $Ze(e,t){return`${e}-content-${t}`}var Pue=_Ze,Iue=BZe,kue=UZe,Rue=HZe;function Rn(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 cc(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function e8(e,t){let r=Rn(e);if(isNaN(t))return cc(e,NaN);if(!t)return r;let n=r.getDate(),o=cc(e,r.getTime());o.setMonth(r.getMonth()+t+1,0);let a=o.getDate();return n>=a?o:(r.setFullYear(o.getFullYear(),o.getMonth(),n),r)}var Hnr=Math.pow(10,8)*24*60*60*1e3,zGn=-Hnr,t8=6048e5,qZe=864e5;var jnr=3600;var WZe=jnr*24,HGn=WZe*7,$nr=WZe*365.2425,qnr=$nr/12,jGn=qnr*3;var Wnr={};function av(){return Wnr}function hh(e,t){let r=av(),n=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,o=Rn(e),a=o.getDay(),i=(a<n?7:0)+a-n;return o.setDate(o.getDate()-i),o.setHours(0,0,0,0),o}function F1(e){return hh(e,{weekStartsOn:1})}function r8(e){let t=Rn(e),r=t.getFullYear(),n=cc(e,0);n.setFullYear(r+1,0,4),n.setHours(0,0,0,0);let o=F1(n),a=cc(e,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);let i=F1(a);return t.getTime()>=o.getTime()?r+1:t.getTime()>=i.getTime()?r:r-1}function HM(e){let t=Rn(e);return t.setHours(0,0,0,0),t}function Nue(e){let t=Rn(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 GZe(e,t){let r=HM(e),n=HM(t),o=+r-Nue(r),a=+n-Nue(n);return Math.round((o-a)/qZe)}function KZe(e){let t=r8(e),r=cc(e,0);return r.setFullYear(t,0,4),r.setHours(0,0,0,0),F1(r)}function XZe(e){return cc(e,Date.now())}function B1(e,t){let r=HM(e),n=HM(t);return+r==+n}function YZe(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Mue(e){if(!YZe(e)&&typeof e!="number")return!1;let t=Rn(e);return!isNaN(Number(t))}function QZe(e){let t=Rn(e),r=t.getMonth();return t.setFullYear(t.getFullYear(),r+1,0),t.setHours(23,59,59,999),t}function n8(e,t){let r=Rn(e.start),n=Rn(e.end),o=+r>+n,a=o?+r:+n,i=o?n:r;i.setHours(0,0,0,0);let s=t?.step??1;if(!s)return[];s<0&&(s=-s,o=!o);let l=[];for(;+i<=a;)l.push(Rn(i)),i.setDate(i.getDate()+s),i.setHours(0,0,0,0);return o?l.reverse():l}function ZZe(e){let t=Rn(e);return t.setDate(1),t.setHours(0,0,0,0),t}function JZe(e){let t=Rn(e),r=cc(e,0);return r.setFullYear(t.getFullYear(),0,1),r.setHours(0,0,0,0),r}function eJe(e,t){let r=av(),n=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,o=Rn(e),a=o.getDay(),i=(a<n?-7:0)+6-(a-n);return o.setDate(o.getDate()+i),o.setHours(23,59,59,999),o}var Gnr={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"}},tJe=(e,t,r)=>{let n,o=Gnr[e];return typeof o=="string"?n=o:t===1?n=o.one:n=o.other.replace("{{count}}",t.toString()),r?.addSuffix?r.comparison&&r.comparison>0?"in "+n:n+" ago":n};function o8(e){return(t={})=>{let r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}var Knr={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Xnr={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Ynr={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},rJe={date:o8({formats:Knr,defaultWidth:"full"}),time:o8({formats:Xnr,defaultWidth:"full"}),dateTime:o8({formats:Ynr,defaultWidth:"full"})};var Qnr={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},nJe=(e,t,r,n)=>Qnr[e];function jM(e){return(t,r)=>{let n=r?.context?String(r.context):"standalone",o;if(n==="formatting"&&e.formattingValues){let i=e.defaultFormattingWidth||e.defaultWidth,s=r?.width?String(r.width):i;o=e.formattingValues[s]||e.formattingValues[i]}else{let i=e.defaultWidth,s=r?.width?String(r.width):e.defaultWidth;o=e.values[s]||e.values[i]}let a=e.argumentCallback?e.argumentCallback(t):t;return o[a]}}var Znr={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Jnr={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},eor={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"]},tor={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"]},ror={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"}},nor={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"}},oor=(e,t)=>{let r=Number(e),n=r%100;if(n>20||n<10)switch(n%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},oJe={ordinalNumber:oor,era:jM({values:Znr,defaultWidth:"wide"}),quarter:jM({values:Jnr,defaultWidth:"wide",argumentCallback:e=>e-1}),month:jM({values:eor,defaultWidth:"wide"}),day:jM({values:tor,defaultWidth:"wide"}),dayPeriod:jM({values:ror,defaultWidth:"wide",formattingValues:nor,defaultFormattingWidth:"wide"})};function $M(e){return(t,r={})=>{let n=r.width,o=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],a=t.match(o);if(!a)return null;let i=a[0],s=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?ior(s,d=>d.test(i)):aor(s,d=>d.test(i)),c;c=e.valueCallback?e.valueCallback(l):l,c=r.valueCallback?r.valueCallback(c):c;let u=t.slice(i.length);return{value:c,rest:u}}}function aor(e,t){for(let r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r}function ior(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r}function aJe(e){return(t,r={})=>{let n=t.match(e.matchPattern);if(!n)return null;let o=n[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(o.length);return{value:i,rest:s}}}var sor=/^(\d+)(th|st|nd|rd)?/i,lor=/\d+/i,cor={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},uor={any:[/^b/i,/^(a|c)/i]},dor={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},por={any:[/1/i,/2/i,/3/i,/4/i]},mor={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},hor={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]},gor={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},vor={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]},yor={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},xor={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}},iJe={ordinalNumber:aJe({matchPattern:sor,parsePattern:lor,valueCallback:e=>parseInt(e,10)}),era:$M({matchPatterns:cor,defaultMatchWidth:"wide",parsePatterns:uor,defaultParseWidth:"any"}),quarter:$M({matchPatterns:dor,defaultMatchWidth:"wide",parsePatterns:por,defaultParseWidth:"any",valueCallback:e=>e+1}),month:$M({matchPatterns:mor,defaultMatchWidth:"wide",parsePatterns:hor,defaultParseWidth:"any"}),day:$M({matchPatterns:gor,defaultMatchWidth:"wide",parsePatterns:vor,defaultParseWidth:"any"}),dayPeriod:$M({matchPatterns:yor,defaultMatchWidth:"any",parsePatterns:xor,defaultParseWidth:"any"})};var Tue={code:"en-US",formatDistance:tJe,formatLong:rJe,formatRelative:nJe,localize:oJe,match:iJe,options:{weekStartsOn:0,firstWeekContainsDate:1}};function sJe(e){let t=Rn(e);return GZe(t,JZe(t))+1}function lJe(e){let t=Rn(e),r=+F1(t)-+KZe(t);return Math.round(r/t8)+1}function a8(e,t){let r=Rn(e),n=r.getFullYear(),o=av(),a=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,i=cc(e,0);i.setFullYear(n+1,0,a),i.setHours(0,0,0,0);let s=hh(i,t),l=cc(e,0);l.setFullYear(n,0,a),l.setHours(0,0,0,0);let c=hh(l,t);return r.getTime()>=s.getTime()?n+1:r.getTime()>=c.getTime()?n:n-1}function cJe(e,t){let r=av(),n=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,o=a8(e,t),a=cc(e,0);return a.setFullYear(o,0,n),a.setHours(0,0,0,0),hh(a,t)}function uJe(e,t){let r=Rn(e),n=+hh(r,t)-+cJe(r,t);return Math.round(n/t8)+1}function ko(e,t){let r=e<0?"-":"",n=Math.abs(e).toString().padStart(t,"0");return r+n}var px={y(e,t){let r=e.getFullYear(),n=r>0?r:1-r;return ko(t==="yy"?n%100:n,t.length)},M(e,t){let r=e.getMonth();return t==="M"?String(r+1):ko(r+1,2)},d(e,t){return ko(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 ko(e.getHours()%12||12,t.length)},H(e,t){return ko(e.getHours(),t.length)},m(e,t){return ko(e.getMinutes(),t.length)},s(e,t){return ko(e.getSeconds(),t.length)},S(e,t){let r=t.length,n=e.getMilliseconds(),o=Math.trunc(n*Math.pow(10,r-3));return ko(o,t.length)}};var qM={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Aue={G:function(e,t,r){let n=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return r.era(n,{width:"abbreviated"});case"GGGGG":return r.era(n,{width:"narrow"});case"GGGG":default:return r.era(n,{width:"wide"})}},y:function(e,t,r){if(t==="yo"){let n=e.getFullYear(),o=n>0?n:1-n;return r.ordinalNumber(o,{unit:"year"})}return px.y(e,t)},Y:function(e,t,r,n){let o=a8(e,n),a=o>0?o:1-o;if(t==="YY"){let i=a%100;return ko(i,2)}return t==="Yo"?r.ordinalNumber(a,{unit:"year"}):ko(a,t.length)},R:function(e,t){let r=r8(e);return ko(r,t.length)},u:function(e,t){let r=e.getFullYear();return ko(r,t.length)},Q:function(e,t,r){let n=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(n);case"QQ":return ko(n,2);case"Qo":return r.ordinalNumber(n,{unit:"quarter"});case"QQQ":return r.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(n,{width:"wide",context:"formatting"})}},q:function(e,t,r){let n=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(n);case"qq":return ko(n,2);case"qo":return r.ordinalNumber(n,{unit:"quarter"});case"qqq":return r.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(n,{width:"wide",context:"standalone"})}},M:function(e,t,r){let n=e.getMonth();switch(t){case"M":case"MM":return px.M(e,t);case"Mo":return r.ordinalNumber(n+1,{unit:"month"});case"MMM":return r.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(n,{width:"wide",context:"formatting"})}},L:function(e,t,r){let n=e.getMonth();switch(t){case"L":return String(n+1);case"LL":return ko(n+1,2);case"Lo":return r.ordinalNumber(n+1,{unit:"month"});case"LLL":return r.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(n,{width:"wide",context:"standalone"})}},w:function(e,t,r,n){let o=uJe(e,n);return t==="wo"?r.ordinalNumber(o,{unit:"week"}):ko(o,t.length)},I:function(e,t,r){let n=lJe(e);return t==="Io"?r.ordinalNumber(n,{unit:"week"}):ko(n,t.length)},d:function(e,t,r){return t==="do"?r.ordinalNumber(e.getDate(),{unit:"date"}):px.d(e,t)},D:function(e,t,r){let n=sJe(e);return t==="Do"?r.ordinalNumber(n,{unit:"dayOfYear"}):ko(n,t.length)},E:function(e,t,r){let n=e.getDay();switch(t){case"E":case"EE":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"})}},e:function(e,t,r,n){let o=e.getDay(),a=(o-n.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return ko(a,2);case"eo":return r.ordinalNumber(a,{unit:"day"});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"})}},c:function(e,t,r,n){let o=e.getDay(),a=(o-n.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return ko(a,t.length);case"co":return r.ordinalNumber(a,{unit:"day"});case"ccc":return r.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(o,{width:"narrow",context:"standalone"});case"cccccc":return r.day(o,{width:"short",context:"standalone"});case"cccc":default:return r.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,r){let n=e.getDay(),o=n===0?7:n;switch(t){case"i":return String(o);case"ii":return ko(o,t.length);case"io":return r.ordinalNumber(o,{unit:"day"});case"iii":return r.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(n,{width:"short",context:"formatting"});case"iiii":default:return r.day(n,{width:"wide",context:"formatting"})}},a:function(e,t,r){let o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,r){let n=e.getHours(),o;switch(n===12?o=qM.noon:n===0?o=qM.midnight:o=n/12>=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,r){let n=e.getHours(),o;switch(n>=17?o=qM.evening:n>=12?o=qM.afternoon:n>=4?o=qM.morning:o=qM.night,t){case"B":case"BB":case"BBB":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,r){if(t==="ho"){let n=e.getHours()%12;return n===0&&(n=12),r.ordinalNumber(n,{unit:"hour"})}return px.h(e,t)},H:function(e,t,r){return t==="Ho"?r.ordinalNumber(e.getHours(),{unit:"hour"}):px.H(e,t)},K:function(e,t,r){let n=e.getHours()%12;return t==="Ko"?r.ordinalNumber(n,{unit:"hour"}):ko(n,t.length)},k:function(e,t,r){let n=e.getHours();return n===0&&(n=24),t==="ko"?r.ordinalNumber(n,{unit:"hour"}):ko(n,t.length)},m:function(e,t,r){return t==="mo"?r.ordinalNumber(e.getMinutes(),{unit:"minute"}):px.m(e,t)},s:function(e,t,r){return t==="so"?r.ordinalNumber(e.getSeconds(),{unit:"second"}):px.s(e,t)},S:function(e,t){return px.S(e,t)},X:function(e,t,r){let n=e.getTimezoneOffset();if(n===0)return"Z";switch(t){case"X":return fJe(n);case"XXXX":case"XX":return V1(n);case"XXXXX":case"XXX":default:return V1(n,":")}},x:function(e,t,r){let n=e.getTimezoneOffset();switch(t){case"x":return fJe(n);case"xxxx":case"xx":return V1(n);case"xxxxx":case"xxx":default:return V1(n,":")}},O:function(e,t,r){let n=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+dJe(n,":");case"OOOO":default:return"GMT"+V1(n,":")}},z:function(e,t,r){let n=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+dJe(n,":");case"zzzz":default:return"GMT"+V1(n,":")}},t:function(e,t,r){let n=Math.trunc(e.getTime()/1e3);return ko(n,t.length)},T:function(e,t,r){let n=e.getTime();return ko(n,t.length)}};function dJe(e,t=""){let r=e>0?"-":"+",n=Math.abs(e),o=Math.trunc(n/60),a=n%60;return a===0?r+String(o):r+String(o)+t+ko(a,2)}function fJe(e,t){return e%60===0?(e>0?"-":"+")+ko(Math.abs(e)/60,2):V1(e,t)}function V1(e,t=""){let r=e>0?"-":"+",n=Math.abs(e),o=ko(Math.trunc(n/60),2),a=ko(n%60,2);return r+o+t+a}var pJe=(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"})}},mJe=(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"})}},bor=(e,t)=>{let r=e.match(/(P+)(p+)?/)||[],n=r[1],o=r[2];if(!o)return pJe(e,t);let a;switch(n){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}}",pJe(n,t)).replace("{{time}}",mJe(o,t))},hJe={p:mJe,P:bor};var wor=/^D+$/,Cor=/^Y+$/,Sor=["D","DD","YY","YYYY"];function gJe(e){return wor.test(e)}function vJe(e){return Cor.test(e)}function yJe(e,t,r){let n=Por(e,t,r);if(console.warn(n),Sor.includes(e))throw new RangeError(n)}function Por(e,t,r){let n=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${n} to the input \`${r}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}var Ior=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,kor=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Ror=/^'([^]*?)'?$/,Nor=/''/g,Mor=/[a-zA-Z]/;function Lue(e,t,r){let n=av(),o=r?.locale??n.locale??Tue,a=r?.firstWeekContainsDate??r?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=r?.weekStartsOn??r?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,s=Rn(e);if(!Mue(s))throw new RangeError("Invalid time value");let l=t.match(kor).map(u=>{let d=u[0];if(d==="p"||d==="P"){let f=hJe[d];return f(u,o.formatLong)}return u}).join("").match(Ior).map(u=>{if(u==="''")return{isToken:!1,value:"'"};let d=u[0];if(d==="'")return{isToken:!1,value:Tor(u)};if(Aue[d])return{isToken:!0,value:u};if(d.match(Mor))throw new RangeError("Format string contains an unescaped latin alphabet character `"+d+"`");return{isToken:!1,value:u}});o.localize.preprocessor&&(l=o.localize.preprocessor(s,l));let c={firstWeekContainsDate:a,weekStartsOn:i,locale:o};return l.map(u=>{if(!u.isToken)return u.value;let d=u.value;(!r?.useAdditionalWeekYearTokens&&vJe(d)||!r?.useAdditionalDayOfYearTokens&&gJe(d))&&yJe(d,t,String(e));let f=Aue[d[0]];return f(s,d,o.localize,c)}).join("")}function Tor(e){let t=e.match(Ror);return t?t[1].replace(Nor,"'"):e}function Eue(e){return Rn(e).getDay()}function xJe(e,t){let r=Rn(e),n=Rn(t);return r.getFullYear()===n.getFullYear()&&r.getMonth()===n.getMonth()}function bJe(e){return B1(e,XZe(e))}function wJe(e,t){return e8(e,-t)}var cl=D(lt(),1);var ur=D(lt(),1);var Ur=D(Or(),1),Due=["Enter"," "],Aor=["ArrowDown","PageUp","Home"],SJe=["ArrowUp","PageDown","End"],Lor=[...Aor,...SJe],Eor={ltr:[...Due,"ArrowRight"],rtl:[...Due,"ArrowLeft"]},Dor={ltr:["ArrowLeft"],rtl:["ArrowRight"]},EF="Menu",[AF,Oor,_or]=cf(EF),[U1,Oue]=hn(EF,[_or,gu,zM]),DF=gu(),PJe=zM(),[IJe,fw]=U1(EF),[For,OF]=U1(EF),kJe=e=>{let{__scopeMenu:t,open:r=!1,children:n,dir:o,onOpenChange:a,modal:i=!0}=e,s=DF(t),[l,c]=ur.useState(null),u=ur.useRef(!1),d=to(a),f=wp(o);return ur.useEffect(()=>{let p=()=>{u.current=!0,document.addEventListener("pointerdown",m,{capture:!0,once:!0}),document.addEventListener("pointermove",m,{capture:!0,once:!0})},m=()=>u.current=!1;return document.addEventListener("keydown",p,{capture:!0}),()=>{document.removeEventListener("keydown",p,{capture:!0}),document.removeEventListener("pointerdown",m,{capture:!0}),document.removeEventListener("pointermove",m,{capture:!0})}},[]),(0,Ur.jsx)(_m,{...s,children:(0,Ur.jsx)(IJe,{scope:t,open:r,onOpenChange:d,content:l,onContentChange:c,children:(0,Ur.jsx)(For,{scope:t,onClose:ur.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:u,dir:f,modal:i,children:n})})})};kJe.displayName=EF;var Bor="MenuAnchor",_ue=ur.forwardRef((e,t)=>{let{__scopeMenu:r,...n}=e,o=DF(r);return(0,Ur.jsx)(Fm,{...o,...n,ref:t})});_ue.displayName=Bor;var Fue="MenuPortal",[Vor,RJe]=U1(Fue,{forceMount:void 0}),NJe=e=>{let{__scopeMenu:t,forceMount:r,children:n,container:o}=e,a=fw(Fue,t);return(0,Ur.jsx)(Vor,{scope:t,forceMount:r,children:(0,Ur.jsx)(uo,{present:r||a.open,children:(0,Ur.jsx)(vu,{asChild:!0,container:o,children:n})})})};NJe.displayName=Fue;var em="MenuContent",[Uor,Bue]=U1(em),MJe=ur.forwardRef((e,t)=>{let r=RJe(em,e.__scopeMenu),{forceMount:n=r.forceMount,...o}=e,a=fw(em,e.__scopeMenu),i=OF(em,e.__scopeMenu);return(0,Ur.jsx)(AF.Provider,{scope:e.__scopeMenu,children:(0,Ur.jsx)(uo,{present:n||a.open,children:(0,Ur.jsx)(AF.Slot,{scope:e.__scopeMenu,children:i.modal?(0,Ur.jsx)(zor,{...o,ref:t}):(0,Ur.jsx)(Hor,{...o,ref:t})})})})}),zor=ur.forwardRef((e,t)=>{let r=fw(em,e.__scopeMenu),n=ur.useRef(null),o=Xt(t,n);return ur.useEffect(()=>{let a=n.current;if(a)return U0(a)},[]),(0,Ur.jsx)(Vue,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:He(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),Hor=ur.forwardRef((e,t)=>{let r=fw(em,e.__scopeMenu);return(0,Ur.jsx)(Vue,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),jor=Sc("MenuContent.ScrollLock"),Vue=ur.forwardRef((e,t)=>{let{__scopeMenu:r,loop:n=!1,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:i,disableOutsidePointerEvents:s,onEntryFocus:l,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,disableOutsideScroll:m,...h}=e,g=fw(em,r),v=OF(em,r),y=DF(r),x=PJe(r),w=Oor(r),[b,C]=ur.useState(null),S=ur.useRef(null),P=Xt(t,S,g.onContentChange),N=ur.useRef(0),T=ur.useRef(""),A=ur.useRef(0),M=ur.useRef(null),O=ur.useRef("right"),F=ur.useRef(0),I=m?Wy:ur.Fragment,k=m?{as:jor,allowPinchZoom:!0}:void 0,R=_=>{let U=T.current+_,V=w().filter(z=>!z.disabled),L=document.activeElement,H=V.find(z=>z.ref.current===L)?.textValue,j=V.map(z=>z.textValue),$=rar(j,U,H),W=V.find(z=>z.textValue===$)?.ref.current;(function z(G){T.current=G,window.clearTimeout(N.current),G!==""&&(N.current=window.setTimeout(()=>z(""),1e3))})(U),W&&setTimeout(()=>W.focus())};ur.useEffect(()=>()=>window.clearTimeout(N.current),[]),V0();let E=ur.useCallback(_=>O.current===M.current?.side&&oar(_,M.current?.area),[]);return(0,Ur.jsx)(Uor,{scope:r,searchRef:T,onItemEnter:ur.useCallback(_=>{E(_)&&_.preventDefault()},[E]),onItemLeave:ur.useCallback(_=>{E(_)||(S.current?.focus(),C(null))},[E]),onTriggerLeave:ur.useCallback(_=>{E(_)&&_.preventDefault()},[E]),pointerGraceTimerRef:A,onPointerGraceIntentChange:ur.useCallback(_=>{M.current=_},[]),children:(0,Ur.jsx)(I,{...k,children:(0,Ur.jsx)(qy,{asChild:!0,trapped:o,onMountAutoFocus:He(a,_=>{_.preventDefault(),S.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:(0,Ur.jsx)(kc,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,children:(0,Ur.jsx)(QG,{asChild:!0,...x,dir:v.dir,orientation:"vertical",loop:n,currentTabStopId:b,onCurrentTabStopIdChange:C,onEntryFocus:He(l,_=>{v.isUsingKeyboardRef.current||_.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,Ur.jsx)(dg,{role:"menu","aria-orientation":"vertical","data-state":qJe(g.open),"data-radix-menu-content":"",dir:v.dir,...y,...h,ref:P,style:{outline:"none",...h.style},onKeyDown:He(h.onKeyDown,_=>{let V=_.target.closest("[data-radix-menu-content]")===_.currentTarget,L=_.ctrlKey||_.altKey||_.metaKey,H=_.key.length===1;V&&(_.key==="Tab"&&_.preventDefault(),!L&&H&&R(_.key));let j=S.current;if(_.target!==j||!Lor.includes(_.key))return;_.preventDefault();let W=w().filter(z=>!z.disabled).map(z=>z.ref.current);SJe.includes(_.key)&&W.reverse(),ear(W)}),onBlur:He(e.onBlur,_=>{_.currentTarget.contains(_.target)||(window.clearTimeout(N.current),T.current="")}),onPointerMove:He(e.onPointerMove,LF(_=>{let U=_.target,V=F.current!==_.clientX;if(_.currentTarget.contains(U)&&V){let L=_.clientX>F.current?"right":"left";O.current=L,F.current=_.clientX}}))})})})})})})});MJe.displayName=em;var $or="MenuGroup",Uue=ur.forwardRef((e,t)=>{let{__scopeMenu:r,...n}=e;return(0,Ur.jsx)(rt.div,{role:"group",...n,ref:t})});Uue.displayName=$or;var qor="MenuLabel",TJe=ur.forwardRef((e,t)=>{let{__scopeMenu:r,...n}=e;return(0,Ur.jsx)(rt.div,{...n,ref:t})});TJe.displayName=qor;var i8="MenuItem",CJe="menu.itemSelect",l8=ur.forwardRef((e,t)=>{let{disabled:r=!1,onSelect:n,...o}=e,a=ur.useRef(null),i=OF(i8,e.__scopeMenu),s=Bue(i8,e.__scopeMenu),l=Xt(t,a),c=ur.useRef(!1),u=()=>{let d=a.current;if(!r&&d){let f=new CustomEvent(CJe,{bubbles:!0,cancelable:!0});d.addEventListener(CJe,p=>n?.(p),{once:!0}),ey(d,f),f.defaultPrevented?c.current=!1:i.onClose()}};return(0,Ur.jsx)(AJe,{...o,ref:l,disabled:r,onClick:He(e.onClick,u),onPointerDown:d=>{e.onPointerDown?.(d),c.current=!0},onPointerUp:He(e.onPointerUp,d=>{c.current||d.currentTarget?.click()}),onKeyDown:He(e.onKeyDown,d=>{let f=s.searchRef.current!=="";r||f&&d.key===" "||Due.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})})});l8.displayName=i8;var AJe=ur.forwardRef((e,t)=>{let{__scopeMenu:r,disabled:n=!1,textValue:o,...a}=e,i=Bue(i8,r),s=PJe(r),l=ur.useRef(null),c=Xt(t,l),[u,d]=ur.useState(!1),[f,p]=ur.useState("");return ur.useEffect(()=>{let m=l.current;m&&p((m.textContent??"").trim())},[a.children]),(0,Ur.jsx)(AF.ItemSlot,{scope:r,disabled:n,textValue:o??f,children:(0,Ur.jsx)(ZG,{asChild:!0,...s,focusable:!n,children:(0,Ur.jsx)(rt.div,{role:"menuitem","data-highlighted":u?"":void 0,"aria-disabled":n||void 0,"data-disabled":n?"":void 0,...a,ref:c,onPointerMove:He(e.onPointerMove,LF(m=>{n?i.onItemLeave(m):(i.onItemEnter(m),m.defaultPrevented||m.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:He(e.onPointerLeave,LF(m=>i.onItemLeave(m))),onFocus:He(e.onFocus,()=>d(!0)),onBlur:He(e.onBlur,()=>d(!1))})})})}),Wor="MenuCheckboxItem",LJe=ur.forwardRef((e,t)=>{let{checked:r=!1,onCheckedChange:n,...o}=e;return(0,Ur.jsx)(FJe,{scope:e.__scopeMenu,checked:r,children:(0,Ur.jsx)(l8,{role:"menuitemcheckbox","aria-checked":s8(r)?"mixed":r,...o,ref:t,"data-state":jue(r),onSelect:He(o.onSelect,()=>n?.(s8(r)?!0:!r),{checkForDefaultPrevented:!1})})})});LJe.displayName=Wor;var EJe="MenuRadioGroup",[Gor,Kor]=U1(EJe,{value:void 0,onValueChange:()=>{}}),DJe=ur.forwardRef((e,t)=>{let{value:r,onValueChange:n,...o}=e,a=to(n);return(0,Ur.jsx)(Gor,{scope:e.__scopeMenu,value:r,onValueChange:a,children:(0,Ur.jsx)(Uue,{...o,ref:t})})});DJe.displayName=EJe;var OJe="MenuRadioItem",_Je=ur.forwardRef((e,t)=>{let{value:r,...n}=e,o=Kor(OJe,e.__scopeMenu),a=r===o.value;return(0,Ur.jsx)(FJe,{scope:e.__scopeMenu,checked:a,children:(0,Ur.jsx)(l8,{role:"menuitemradio","aria-checked":a,...n,ref:t,"data-state":jue(a),onSelect:He(n.onSelect,()=>o.onValueChange?.(r),{checkForDefaultPrevented:!1})})})});_Je.displayName=OJe;var zue="MenuItemIndicator",[FJe,Xor]=U1(zue,{checked:!1}),BJe=ur.forwardRef((e,t)=>{let{__scopeMenu:r,forceMount:n,...o}=e,a=Xor(zue,r);return(0,Ur.jsx)(uo,{present:n||s8(a.checked)||a.checked===!0,children:(0,Ur.jsx)(rt.span,{...o,ref:t,"data-state":jue(a.checked)})})});BJe.displayName=zue;var Yor="MenuSeparator",VJe=ur.forwardRef((e,t)=>{let{__scopeMenu:r,...n}=e;return(0,Ur.jsx)(rt.div,{role:"separator","aria-orientation":"horizontal",...n,ref:t})});VJe.displayName=Yor;var Qor="MenuArrow",UJe=ur.forwardRef((e,t)=>{let{__scopeMenu:r,...n}=e,o=DF(r);return(0,Ur.jsx)(fg,{...o,...n,ref:t})});UJe.displayName=Qor;var Hue="MenuSub",[Zor,zJe]=U1(Hue),Jor=e=>{let{__scopeMenu:t,children:r,open:n=!1,onOpenChange:o}=e,a=fw(Hue,t),i=DF(t),[s,l]=ur.useState(null),[c,u]=ur.useState(null),d=to(o);return ur.useEffect(()=>(a.open===!1&&d(!1),()=>d(!1)),[a.open,d]),(0,Ur.jsx)(_m,{...i,children:(0,Ur.jsx)(IJe,{scope:t,open:n,onOpenChange:d,content:c,onContentChange:u,children:(0,Ur.jsx)(Zor,{scope:t,contentId:Vo(),triggerId:Vo(),trigger:s,onTriggerChange:l,children:r})})})};Jor.displayName=Hue;var TF="MenuSubTrigger",HJe=ur.forwardRef((e,t)=>{let r=fw(TF,e.__scopeMenu),n=OF(TF,e.__scopeMenu),o=zJe(TF,e.__scopeMenu),a=Bue(TF,e.__scopeMenu),i=ur.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:l}=a,c={__scopeMenu:e.__scopeMenu},u=ur.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return ur.useEffect(()=>u,[u]),ur.useEffect(()=>{let d=s.current;return()=>{window.clearTimeout(d),l(null)}},[s,l]),(0,Ur.jsx)(_ue,{asChild:!0,...c,children:(0,Ur.jsx)(AJe,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":o.contentId,"data-state":qJe(r.open),...e,ref:Jv(t,o.onTriggerChange),onClick:d=>{e.onClick?.(d),!(e.disabled||d.defaultPrevented)&&(d.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:He(e.onPointerMove,LF(d=>{a.onItemEnter(d),!d.defaultPrevented&&!e.disabled&&!r.open&&!i.current&&(a.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{r.onOpenChange(!0),u()},100))})),onPointerLeave:He(e.onPointerLeave,LF(d=>{u();let f=r.content?.getBoundingClientRect();if(f){let p=r.content?.dataset.side,m=p==="right",h=m?-5:5,g=f[m?"left":"right"],v=f[m?"right":"left"];a.onPointerGraceIntentChange({area:[{x:d.clientX+h,y:d.clientY},{x:g,y:f.top},{x:v,y:f.top},{x:v,y:f.bottom},{x:g,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:He(e.onKeyDown,d=>{let f=a.searchRef.current!=="";e.disabled||f&&d.key===" "||Eor[n.dir].includes(d.key)&&(r.onOpenChange(!0),r.content?.focus(),d.preventDefault())})})})});HJe.displayName=TF;var jJe="MenuSubContent",$Je=ur.forwardRef((e,t)=>{let r=RJe(em,e.__scopeMenu),{forceMount:n=r.forceMount,...o}=e,a=fw(em,e.__scopeMenu),i=OF(em,e.__scopeMenu),s=zJe(jJe,e.__scopeMenu),l=ur.useRef(null),c=Xt(t,l);return(0,Ur.jsx)(AF.Provider,{scope:e.__scopeMenu,children:(0,Ur.jsx)(uo,{present:n||a.open,children:(0,Ur.jsx)(AF.Slot,{scope:e.__scopeMenu,children:(0,Ur.jsx)(Vue,{id:s.contentId,"aria-labelledby":s.triggerId,...o,ref:c,align:"start",side:i.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:u=>{i.isUsingKeyboardRef.current&&l.current?.focus(),u.preventDefault()},onCloseAutoFocus:u=>u.preventDefault(),onFocusOutside:He(e.onFocusOutside,u=>{u.target!==s.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:He(e.onEscapeKeyDown,u=>{i.onClose(),u.preventDefault()}),onKeyDown:He(e.onKeyDown,u=>{let d=u.currentTarget.contains(u.target),f=Dor[i.dir].includes(u.key);d&&f&&(a.onOpenChange(!1),s.trigger?.focus(),u.preventDefault())})})})})})});$Je.displayName=jJe;function qJe(e){return e?"open":"closed"}function s8(e){return e==="indeterminate"}function jue(e){return s8(e)?"indeterminate":e?"checked":"unchecked"}function ear(e){let t=document.activeElement;for(let r of e)if(r===t||(r.focus(),document.activeElement!==t))return}function tar(e,t){return e.map((r,n)=>e[(t+n)%e.length])}function rar(e,t,r){let o=t.length>1&&Array.from(t).every(c=>c===t[0])?t[0]:t,a=r?e.indexOf(r):-1,i=tar(e,Math.max(a,0));o.length===1&&(i=i.filter(c=>c!==r));let l=i.find(c=>c.toLowerCase().startsWith(o.toLowerCase()));return l!==r?l:void 0}function nar(e,t){let{x:r,y:n}=e,o=!1;for(let a=0,i=t.length-1;a<t.length;i=a++){let s=t[a],l=t[i],c=s.x,u=s.y,d=l.x,f=l.y;u>n!=f>n&&r<(d-c)*(n-u)/(f-u)+c&&(o=!o)}return o}function oar(e,t){if(!t)return!1;let r={x:e.clientX,y:e.clientY};return nar(r,t)}function LF(e){return t=>t.pointerType==="mouse"?e(t):void 0}var WJe=kJe,GJe=_ue,KJe=NJe,XJe=MJe,YJe=Uue,QJe=TJe,ZJe=l8,JJe=LJe,eet=DJe,tet=_Je,ret=BJe,net=VJe,oet=UJe;var aet=HJe,iet=$Je;var Fl=D(Or(),1),c8="DropdownMenu",[iar,kKn]=hn(c8,[Oue]),Ou=Oue(),[sar,set]=iar(c8),lar=e=>{let{__scopeDropdownMenu:t,children:r,dir:n,open:o,defaultOpen:a,onOpenChange:i,modal:s=!0}=e,l=Ou(t),c=cl.useRef(null),[u,d]=eo({prop:o,defaultProp:a??!1,onChange:i,caller:c8});return(0,Fl.jsx)(sar,{scope:t,triggerId:Vo(),triggerRef:c,contentId:Vo(),open:u,onOpenChange:d,onOpenToggle:cl.useCallback(()=>d(f=>!f),[d]),modal:s,children:(0,Fl.jsx)(WJe,{...l,open:u,onOpenChange:d,dir:n,modal:s,children:r})})};lar.displayName=c8;var cet="DropdownMenuTrigger",car=cl.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,disabled:n=!1,...o}=e,a=set(cet,r),i=Ou(r);return(0,Fl.jsx)(GJe,{asChild:!0,...i,children:(0,Fl.jsx)(rt.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":n?"":void 0,disabled:n,...o,ref:Jv(t,a.triggerRef),onPointerDown:He(e.onPointerDown,s=>{!n&&s.button===0&&s.ctrlKey===!1&&(a.onOpenToggle(),a.open||s.preventDefault())}),onKeyDown:He(e.onKeyDown,s=>{n||(["Enter"," "].includes(s.key)&&a.onOpenToggle(),s.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(s.key)&&s.preventDefault())})})})});car.displayName=cet;var uar="DropdownMenuPortal",uet=e=>{let{__scopeDropdownMenu:t,...r}=e,n=Ou(t);return(0,Fl.jsx)(KJe,{...n,...r})};uet.displayName=uar;var det="DropdownMenuContent",fet=cl.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,o=set(det,r),a=Ou(r),i=cl.useRef(!1);return(0,Fl.jsx)(XJe,{id:o.contentId,"aria-labelledby":o.triggerId,...a,...n,ref:t,onCloseAutoFocus:He(e.onCloseAutoFocus,s=>{i.current||o.triggerRef.current?.focus(),i.current=!1,s.preventDefault()}),onInteractOutside:He(e.onInteractOutside,s=>{let l=s.detail.originalEvent,c=l.button===0&&l.ctrlKey===!0,u=l.button===2||c;(!o.modal||u)&&(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)"}})});fet.displayName=det;var dar="DropdownMenuGroup",far=cl.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,o=Ou(r);return(0,Fl.jsx)(YJe,{...o,...n,ref:t})});far.displayName=dar;var par="DropdownMenuLabel",pet=cl.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,o=Ou(r);return(0,Fl.jsx)(QJe,{...o,...n,ref:t})});pet.displayName=par;var mar="DropdownMenuItem",met=cl.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,o=Ou(r);return(0,Fl.jsx)(ZJe,{...o,...n,ref:t})});met.displayName=mar;var har="DropdownMenuCheckboxItem",het=cl.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,o=Ou(r);return(0,Fl.jsx)(JJe,{...o,...n,ref:t})});het.displayName=har;var gar="DropdownMenuRadioGroup",yar=cl.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,o=Ou(r);return(0,Fl.jsx)(eet,{...o,...n,ref:t})});yar.displayName=gar;var xar="DropdownMenuRadioItem",get=cl.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,o=Ou(r);return(0,Fl.jsx)(tet,{...o,...n,ref:t})});get.displayName=xar;var bar="DropdownMenuItemIndicator",vet=cl.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,o=Ou(r);return(0,Fl.jsx)(ret,{...o,...n,ref:t})});vet.displayName=bar;var war="DropdownMenuSeparator",yet=cl.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,o=Ou(r);return(0,Fl.jsx)(net,{...o,...n,ref:t})});yet.displayName=war;var Car="DropdownMenuArrow",Sar=cl.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,o=Ou(r);return(0,Fl.jsx)(oet,{...o,...n,ref:t})});Sar.displayName=Car;var Par="DropdownMenuSubTrigger",xet=cl.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,o=Ou(r);return(0,Fl.jsx)(aet,{...o,...n,ref:t})});xet.displayName=Par;var Iar="DropdownMenuSubContent",bet=cl.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,o=Ou(r);return(0,Fl.jsx)(iet,{...o,...n,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)"}})});bet.displayName=Iar;var wet=uet,$ue=fet;var que=pet,Wue=met,Gue=het;var Kue=get,Xue=vet,Yue=yet;var Que=xet,Zue=bet;var Dt=D(lt(),1),ade=D(ng(),1);function Jue(e,[t,r]){return Math.min(r,Math.max(t,e))}var Cr=D(Or(),1),Rar=[" ","Enter","ArrowUp","ArrowDown"],Nar=[" ","Enter"],z1="Select",[d8,f8,Mar]=cf(z1),[WM,XKn]=hn(z1,[Mar,gu]),p8=gu(),[Tar,pw]=WM(z1),[Aar,Lar]=WM(z1),Cet=e=>{let{__scopeSelect:t,children:r,open:n,defaultOpen:o,onOpenChange:a,value:i,defaultValue:s,onValueChange:l,dir:c,name:u,autoComplete:d,disabled:f,required:p,form:m}=e,h=p8(t),[g,v]=Dt.useState(null),[y,x]=Dt.useState(null),[w,b]=Dt.useState(!1),C=wp(c),[S,P]=eo({prop:n,defaultProp:o??!1,onChange:a,caller:z1}),[N,T]=eo({prop:i,defaultProp:s,onChange:l,caller:z1}),A=Dt.useRef(null),M=g?m||!!g.closest("form"):!0,[O,F]=Dt.useState(new Set),I=Array.from(O).map(k=>k.props.value).join(";");return(0,Cr.jsx)(_m,{...h,children:(0,Cr.jsxs)(Tar,{required:p,scope:t,trigger:g,onTriggerChange:v,valueNode:y,onValueNodeChange:x,valueNodeHasChildren:w,onValueNodeHasChildrenChange:b,contentId:Vo(),value:N,onValueChange:T,open:S,onOpenChange:P,dir:C,triggerPointerDownPosRef:A,disabled:f,children:[(0,Cr.jsx)(d8.Provider,{scope:t,children:(0,Cr.jsx)(Aar,{scope:e.__scopeSelect,onNativeOptionAdd:Dt.useCallback(k=>{F(R=>new Set(R).add(k))},[]),onNativeOptionRemove:Dt.useCallback(k=>{F(R=>{let E=new Set(R);return E.delete(k),E})},[]),children:r})}),M?(0,Cr.jsxs)(Get,{"aria-hidden":!0,required:p,tabIndex:-1,name:u,autoComplete:d,value:N,onChange:k=>T(k.target.value),disabled:f,form:m,children:[N===void 0?(0,Cr.jsx)("option",{value:""}):null,Array.from(O)]},I):null]})})};Cet.displayName=z1;var Pet="SelectTrigger",Iet=Dt.forwardRef((e,t)=>{let{__scopeSelect:r,disabled:n=!1,...o}=e,a=p8(r),i=pw(Pet,r),s=i.disabled||n,l=Xt(t,i.onTriggerChange),c=f8(r),u=Dt.useRef("touch"),[d,f,p]=Xet(h=>{let g=c().filter(x=>!x.disabled),v=g.find(x=>x.value===i.value),y=Yet(g,h,v);y!==void 0&&i.onValueChange(y.value)}),m=h=>{s||(i.onOpenChange(!0),p()),h&&(i.triggerPointerDownPosRef.current={x:Math.round(h.pageX),y:Math.round(h.pageY)})};return(0,Cr.jsx)(Fm,{asChild:!0,...a,children:(0,Cr.jsx)(rt.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":Ket(i.value)?"":void 0,...o,ref:l,onClick:He(o.onClick,h=>{h.currentTarget.focus(),u.current!=="mouse"&&m(h)}),onPointerDown:He(o.onPointerDown,h=>{u.current=h.pointerType;let g=h.target;g.hasPointerCapture(h.pointerId)&&g.releasePointerCapture(h.pointerId),h.button===0&&h.ctrlKey===!1&&h.pointerType==="mouse"&&(m(h),h.preventDefault())}),onKeyDown:He(o.onKeyDown,h=>{let g=d.current!=="";!(h.ctrlKey||h.altKey||h.metaKey)&&h.key.length===1&&f(h.key),!(g&&h.key===" ")&&Rar.includes(h.key)&&(m(),h.preventDefault())})})})});Iet.displayName=Pet;var ket="SelectValue",Ret=Dt.forwardRef((e,t)=>{let{__scopeSelect:r,className:n,style:o,children:a,placeholder:i="",...s}=e,l=pw(ket,r),{onValueNodeHasChildrenChange:c}=l,u=a!==void 0,d=Xt(t,l.onValueNodeChange);return $n(()=>{c(u)},[c,u]),(0,Cr.jsx)(rt.span,{...s,ref:d,style:{pointerEvents:"none"},children:Ket(l.value)?(0,Cr.jsx)(Cr.Fragment,{children:i}):a})});Ret.displayName=ket;var Ear="SelectIcon",Net=Dt.forwardRef((e,t)=>{let{__scopeSelect:r,children:n,...o}=e;return(0,Cr.jsx)(rt.span,{"aria-hidden":!0,...o,ref:t,children:n||"\u25BC"})});Net.displayName=Ear;var Dar="SelectPortal",Met=e=>(0,Cr.jsx)(vu,{asChild:!0,...e});Met.displayName=Dar;var H1="SelectContent",Tet=Dt.forwardRef((e,t)=>{let r=pw(H1,e.__scopeSelect),[n,o]=Dt.useState();if($n(()=>{o(new DocumentFragment)},[]),!r.open){let a=n;return a?ade.createPortal((0,Cr.jsx)(Aet,{scope:e.__scopeSelect,children:(0,Cr.jsx)(d8.Slot,{scope:e.__scopeSelect,children:(0,Cr.jsx)("div",{children:e.children})})}),a):null}return(0,Cr.jsx)(Let,{...e,ref:t})});Tet.displayName=H1;var gh=10,[Aet,mw]=WM(H1),Oar="SelectContentImpl",_ar=Sc("SelectContent.RemoveScroll"),Let=Dt.forwardRef((e,t)=>{let{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:a,onPointerDownOutside:i,side:s,sideOffset:l,align:c,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g,...v}=e,y=pw(H1,r),[x,w]=Dt.useState(null),[b,C]=Dt.useState(null),S=Xt(t,z=>w(z)),[P,N]=Dt.useState(null),[T,A]=Dt.useState(null),M=f8(r),[O,F]=Dt.useState(!1),I=Dt.useRef(!1);Dt.useEffect(()=>{if(x)return U0(x)},[x]),V0();let k=Dt.useCallback(z=>{let[G,...X]=M().map(ie=>ie.ref.current),[Y]=X.slice(-1),ae=document.activeElement;for(let ie of z)if(ie===ae||(ie?.scrollIntoView({block:"nearest"}),ie===G&&b&&(b.scrollTop=0),ie===Y&&b&&(b.scrollTop=b.scrollHeight),ie?.focus(),document.activeElement!==ae))return},[M,b]),R=Dt.useCallback(()=>k([P,x]),[k,P,x]);Dt.useEffect(()=>{O&&R()},[O,R]);let{onOpenChange:E,triggerPointerDownPosRef:_}=y;Dt.useEffect(()=>{if(x){let z={x:0,y:0},G=Y=>{z={x:Math.abs(Math.round(Y.pageX)-(_.current?.x??0)),y:Math.abs(Math.round(Y.pageY)-(_.current?.y??0))}},X=Y=>{z.x<=10&&z.y<=10?Y.preventDefault():x.contains(Y.target)||E(!1),document.removeEventListener("pointermove",G),_.current=null};return _.current!==null&&(document.addEventListener("pointermove",G),document.addEventListener("pointerup",X,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",G),document.removeEventListener("pointerup",X,{capture:!0})}}},[x,E,_]),Dt.useEffect(()=>{let z=()=>E(!1);return window.addEventListener("blur",z),window.addEventListener("resize",z),()=>{window.removeEventListener("blur",z),window.removeEventListener("resize",z)}},[E]);let[U,V]=Xet(z=>{let G=M().filter(ae=>!ae.disabled),X=G.find(ae=>ae.ref.current===document.activeElement),Y=Yet(G,z,X);Y&&setTimeout(()=>Y.ref.current.focus())}),L=Dt.useCallback((z,G,X)=>{let Y=!I.current&&!X;(y.value!==void 0&&y.value===G||Y)&&(N(z),Y&&(I.current=!0))},[y.value]),H=Dt.useCallback(()=>x?.focus(),[x]),j=Dt.useCallback((z,G,X)=>{let Y=!I.current&&!X;(y.value!==void 0&&y.value===G||Y)&&A(z)},[y.value]),$=n==="popper"?ede:Eet,W=$===ede?{side:s,sideOffset:l,align:c,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g}:{};return(0,Cr.jsx)(Aet,{scope:r,content:x,viewport:b,onViewportChange:C,itemRefCallback:L,selectedItem:P,onItemLeave:H,itemTextRefCallback:j,focusSelectedItem:R,selectedItemText:T,position:n,isPositioned:O,searchRef:U,children:(0,Cr.jsx)(Wy,{as:_ar,allowPinchZoom:!0,children:(0,Cr.jsx)(qy,{asChild:!0,trapped:y.open,onMountAutoFocus:z=>{z.preventDefault()},onUnmountAutoFocus:He(o,z=>{y.trigger?.focus({preventScroll:!0}),z.preventDefault()}),children:(0,Cr.jsx)(kc,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:z=>z.preventDefault(),onDismiss:()=>y.onOpenChange(!1),children:(0,Cr.jsx)($,{role:"listbox",id:y.contentId,"data-state":y.open?"open":"closed",dir:y.dir,onContextMenu:z=>z.preventDefault(),...v,...W,onPlaced:()=>F(!0),ref:S,style:{display:"flex",flexDirection:"column",outline:"none",...v.style},onKeyDown:He(v.onKeyDown,z=>{let G=z.ctrlKey||z.altKey||z.metaKey;if(z.key==="Tab"&&z.preventDefault(),!G&&z.key.length===1&&V(z.key),["ArrowUp","ArrowDown","Home","End"].includes(z.key)){let Y=M().filter(ae=>!ae.disabled).map(ae=>ae.ref.current);if(["ArrowUp","End"].includes(z.key)&&(Y=Y.slice().reverse()),["ArrowUp","ArrowDown"].includes(z.key)){let ae=z.target,ie=Y.indexOf(ae);Y=Y.slice(ie+1)}setTimeout(()=>k(Y)),z.preventDefault()}})})})})})})});Let.displayName=Oar;var Far="SelectItemAlignedPosition",Eet=Dt.forwardRef((e,t)=>{let{__scopeSelect:r,onPlaced:n,...o}=e,a=pw(H1,r),i=mw(H1,r),[s,l]=Dt.useState(null),[c,u]=Dt.useState(null),d=Xt(t,S=>u(S)),f=f8(r),p=Dt.useRef(!1),m=Dt.useRef(!0),{viewport:h,selectedItem:g,selectedItemText:v,focusSelectedItem:y}=i,x=Dt.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&c&&h&&g&&v){let S=a.trigger.getBoundingClientRect(),P=c.getBoundingClientRect(),N=a.valueNode.getBoundingClientRect(),T=v.getBoundingClientRect();if(a.dir!=="rtl"){let ae=T.left-P.left,ie=N.left-ae,Le=S.left-ie,Se=S.width+Le,Be=Math.max(Se,P.width),me=window.innerWidth-gh,Re=Jue(ie,[gh,Math.max(gh,me-Be)]);s.style.minWidth=Se+"px",s.style.left=Re+"px"}else{let ae=P.right-T.right,ie=window.innerWidth-N.right-ae,Le=window.innerWidth-S.right-ie,Se=S.width+Le,Be=Math.max(Se,P.width),me=window.innerWidth-gh,Re=Jue(ie,[gh,Math.max(gh,me-Be)]);s.style.minWidth=Se+"px",s.style.right=Re+"px"}let A=f(),M=window.innerHeight-gh*2,O=h.scrollHeight,F=window.getComputedStyle(c),I=parseInt(F.borderTopWidth,10),k=parseInt(F.paddingTop,10),R=parseInt(F.borderBottomWidth,10),E=parseInt(F.paddingBottom,10),_=I+k+O+E+R,U=Math.min(g.offsetHeight*5,_),V=window.getComputedStyle(h),L=parseInt(V.paddingTop,10),H=parseInt(V.paddingBottom,10),j=S.top+S.height/2-gh,$=M-j,W=g.offsetHeight/2,z=g.offsetTop+W,G=I+k+z,X=_-G;if(G<=j){let ae=A.length>0&&g===A[A.length-1].ref.current;s.style.bottom="0px";let ie=c.clientHeight-h.offsetTop-h.offsetHeight,Le=Math.max($,W+(ae?H:0)+ie+R),Se=G+Le;s.style.height=Se+"px"}else{let ae=A.length>0&&g===A[0].ref.current;s.style.top="0px";let Le=Math.max(j,I+h.offsetTop+(ae?L:0)+W)+X;s.style.height=Le+"px",h.scrollTop=G-j+h.offsetTop}s.style.margin=`${gh}px 0`,s.style.minHeight=U+"px",s.style.maxHeight=M+"px",n?.(),requestAnimationFrame(()=>p.current=!0)}},[f,a.trigger,a.valueNode,s,c,h,g,v,a.dir,n]);$n(()=>x(),[x]);let[w,b]=Dt.useState();$n(()=>{c&&b(window.getComputedStyle(c).zIndex)},[c]);let C=Dt.useCallback(S=>{S&&m.current===!0&&(x(),y?.(),m.current=!1)},[x,y]);return(0,Cr.jsx)(Var,{scope:r,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:C,children:(0,Cr.jsx)("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:w},children:(0,Cr.jsx)(rt.div,{...o,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});Eet.displayName=Far;var Bar="SelectPopperPosition",ede=Dt.forwardRef((e,t)=>{let{__scopeSelect:r,align:n="start",collisionPadding:o=gh,...a}=e,i=p8(r);return(0,Cr.jsx)(dg,{...i,...a,ref:t,align:n,collisionPadding:o,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)"}})});ede.displayName=Bar;var[Var,ide]=WM(H1,{}),tde="SelectViewport",Det=Dt.forwardRef((e,t)=>{let{__scopeSelect:r,nonce:n,...o}=e,a=mw(tde,r),i=ide(tde,r),s=Xt(t,a.onViewportChange),l=Dt.useRef(0);return(0,Cr.jsxs)(Cr.Fragment,{children:[(0,Cr.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:n}),(0,Cr.jsx)(d8.Slot,{scope:r,children:(0,Cr.jsx)(rt.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:s,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:He(o.onScroll,c=>{let u=c.currentTarget,{contentWrapper:d,shouldExpandOnScrollRef:f}=i;if(f?.current&&d){let p=Math.abs(l.current-u.scrollTop);if(p>0){let m=window.innerHeight-gh*2,h=parseFloat(d.style.minHeight),g=parseFloat(d.style.height),v=Math.max(h,g);if(v<m){let y=v+p,x=Math.min(m,y),w=y-x;d.style.height=x+"px",d.style.bottom==="0px"&&(u.scrollTop=w>0?w:0,d.style.justifyContent="flex-end")}}}l.current=u.scrollTop})})})]})});Det.displayName=tde;var Oet="SelectGroup",[Uar,zar]=WM(Oet),Har=Dt.forwardRef((e,t)=>{let{__scopeSelect:r,...n}=e,o=Vo();return(0,Cr.jsx)(Uar,{scope:r,id:o,children:(0,Cr.jsx)(rt.div,{role:"group","aria-labelledby":o,...n,ref:t})})});Har.displayName=Oet;var _et="SelectLabel",Fet=Dt.forwardRef((e,t)=>{let{__scopeSelect:r,...n}=e,o=zar(_et,r);return(0,Cr.jsx)(rt.div,{id:o.id,...n,ref:t})});Fet.displayName=_et;var u8="SelectItem",[jar,Bet]=WM(u8),Vet=Dt.forwardRef((e,t)=>{let{__scopeSelect:r,value:n,disabled:o=!1,textValue:a,...i}=e,s=pw(u8,r),l=mw(u8,r),c=s.value===n,[u,d]=Dt.useState(a??""),[f,p]=Dt.useState(!1),m=Xt(t,y=>l.itemRefCallback?.(y,n,o)),h=Vo(),g=Dt.useRef("touch"),v=()=>{o||(s.onValueChange(n),s.onOpenChange(!1))};if(n==="")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,Cr.jsx)(jar,{scope:r,value:n,disabled:o,textId:h,isSelected:c,onItemTextChange:Dt.useCallback(y=>{d(x=>x||(y?.textContent??"").trim())},[]),children:(0,Cr.jsx)(d8.ItemSlot,{scope:r,value:n,disabled:o,textValue:u,children:(0,Cr.jsx)(rt.div,{role:"option","aria-labelledby":h,"data-highlighted":f?"":void 0,"aria-selected":c&&f,"data-state":c?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...i,ref:m,onFocus:He(i.onFocus,()=>p(!0)),onBlur:He(i.onBlur,()=>p(!1)),onClick:He(i.onClick,()=>{g.current!=="mouse"&&v()}),onPointerUp:He(i.onPointerUp,()=>{g.current==="mouse"&&v()}),onPointerDown:He(i.onPointerDown,y=>{g.current=y.pointerType}),onPointerMove:He(i.onPointerMove,y=>{g.current=y.pointerType,o?l.onItemLeave?.():g.current==="mouse"&&y.currentTarget.focus({preventScroll:!0})}),onPointerLeave:He(i.onPointerLeave,y=>{y.currentTarget===document.activeElement&&l.onItemLeave?.()}),onKeyDown:He(i.onKeyDown,y=>{l.searchRef?.current!==""&&y.key===" "||(Nar.includes(y.key)&&v(),y.key===" "&&y.preventDefault())})})})})});Vet.displayName=u8;var _F="SelectItemText",Uet=Dt.forwardRef((e,t)=>{let{__scopeSelect:r,className:n,style:o,...a}=e,i=pw(_F,r),s=mw(_F,r),l=Bet(_F,r),c=Lar(_F,r),[u,d]=Dt.useState(null),f=Xt(t,v=>d(v),l.onItemTextChange,v=>s.itemTextRefCallback?.(v,l.value,l.disabled)),p=u?.textContent,m=Dt.useMemo(()=>(0,Cr.jsx)("option",{value:l.value,disabled:l.disabled,children:p},l.value),[l.disabled,l.value,p]),{onNativeOptionAdd:h,onNativeOptionRemove:g}=c;return $n(()=>(h(m),()=>g(m)),[h,g,m]),(0,Cr.jsxs)(Cr.Fragment,{children:[(0,Cr.jsx)(rt.span,{id:l.textId,...a,ref:f}),l.isSelected&&i.valueNode&&!i.valueNodeHasChildren?ade.createPortal(a.children,i.valueNode):null]})});Uet.displayName=_F;var zet="SelectItemIndicator",Het=Dt.forwardRef((e,t)=>{let{__scopeSelect:r,...n}=e;return Bet(zet,r).isSelected?(0,Cr.jsx)(rt.span,{"aria-hidden":!0,...n,ref:t}):null});Het.displayName=zet;var rde="SelectScrollUpButton",jet=Dt.forwardRef((e,t)=>{let r=mw(rde,e.__scopeSelect),n=ide(rde,e.__scopeSelect),[o,a]=Dt.useState(!1),i=Xt(t,n.onScrollButtonChange);return $n(()=>{if(r.viewport&&r.isPositioned){let l=function(){let u=c.scrollTop>0;a(u)};var s=l;let c=r.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[r.viewport,r.isPositioned]),o?(0,Cr.jsx)(qet,{...e,ref:i,onAutoScroll:()=>{let{viewport:s,selectedItem:l}=r;s&&l&&(s.scrollTop=s.scrollTop-l.offsetHeight)}}):null});jet.displayName=rde;var nde="SelectScrollDownButton",$et=Dt.forwardRef((e,t)=>{let r=mw(nde,e.__scopeSelect),n=ide(nde,e.__scopeSelect),[o,a]=Dt.useState(!1),i=Xt(t,n.onScrollButtonChange);return $n(()=>{if(r.viewport&&r.isPositioned){let l=function(){let u=c.scrollHeight-c.clientHeight,d=Math.ceil(c.scrollTop)<u;a(d)};var s=l;let c=r.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[r.viewport,r.isPositioned]),o?(0,Cr.jsx)(qet,{...e,ref:i,onAutoScroll:()=>{let{viewport:s,selectedItem:l}=r;s&&l&&(s.scrollTop=s.scrollTop+l.offsetHeight)}}):null});$et.displayName=nde;var qet=Dt.forwardRef((e,t)=>{let{__scopeSelect:r,onAutoScroll:n,...o}=e,a=mw("SelectScrollButton",r),i=Dt.useRef(null),s=f8(r),l=Dt.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return Dt.useEffect(()=>()=>l(),[l]),$n(()=>{s().find(u=>u.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[s]),(0,Cr.jsx)(rt.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:He(o.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(n,50))}),onPointerMove:He(o.onPointerMove,()=>{a.onItemLeave?.(),i.current===null&&(i.current=window.setInterval(n,50))}),onPointerLeave:He(o.onPointerLeave,()=>{l()})})}),$ar="SelectSeparator",Wet=Dt.forwardRef((e,t)=>{let{__scopeSelect:r,...n}=e;return(0,Cr.jsx)(rt.div,{"aria-hidden":!0,...n,ref:t})});Wet.displayName=$ar;var ode="SelectArrow",qar=Dt.forwardRef((e,t)=>{let{__scopeSelect:r,...n}=e,o=p8(r),a=pw(ode,r),i=mw(ode,r);return a.open&&i.position==="popper"?(0,Cr.jsx)(fg,{...o,...n,ref:t}):null});qar.displayName=ode;var War="SelectBubbleInput",Get=Dt.forwardRef(({__scopeSelect:e,value:t,...r},n)=>{let o=Dt.useRef(null),a=Xt(n,o),i=Wb(t);return Dt.useEffect(()=>{let s=o.current;if(!s)return;let l=window.HTMLSelectElement.prototype,u=Object.getOwnPropertyDescriptor(l,"value").set;if(i!==t&&u){let d=new Event("change",{bubbles:!0});u.call(s,t),s.dispatchEvent(d)}},[i,t]),(0,Cr.jsx)(rt.select,{...r,style:{...AZ,...r.style},ref:a,defaultValue:t})});Get.displayName=War;function Ket(e){return e===""||e===void 0}function Xet(e){let t=to(e),r=Dt.useRef(""),n=Dt.useRef(0),o=Dt.useCallback(i=>{let s=r.current+i;t(s),function l(c){r.current=c,window.clearTimeout(n.current),c!==""&&(n.current=window.setTimeout(()=>l(""),1e3))}(s)},[t]),a=Dt.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return Dt.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,o,a]}function Yet(e,t,r){let o=t.length>1&&Array.from(t).every(c=>c===t[0])?t[0]:t,a=r?e.indexOf(r):-1,i=Gar(e,Math.max(a,0));o.length===1&&(i=i.filter(c=>c!==r));let l=i.find(c=>c.textValue.toLowerCase().startsWith(o.toLowerCase()));return l!==r?l:void 0}function Gar(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var Qet=Cet,sde=Iet,Zet=Ret,Jet=Net,ett=Met,lde=Tet,ttt=Det;var cde=Fet,ude=Vet,rtt=Uet,ntt=Het,dde=jet,fde=$et,pde=Wet;var att=D(lt(),1);var itt=D(Or(),1),Xar="Separator",ott="horizontal",Yar=["horizontal","vertical"],stt=att.forwardRef((e,t)=>{let{decorative:r,orientation:n=ott,...o}=e,a=Qar(n)?n:ott,s=r?{role:"none"}:{"aria-orientation":a==="vertical"?a:void 0,role:"separator"};return(0,itt.jsx)(rt.div,{"data-orientation":a,...s,...o,ref:t})});stt.displayName=Xar;function Qar(e){return Yar.includes(e)}var mde=stt;var on=D(lt(),1);var Hs=D(Or(),1),[m8,l7n]=hn("Tooltip",[gu]),h8=gu(),ltt="TooltipProvider",Jar=700,hde="tooltip.open",[eir,vde]=m8(ltt),ctt=e=>{let{__scopeTooltip:t,delayDuration:r=Jar,skipDelayDuration:n=300,disableHoverableContent:o=!1,children:a}=e,i=on.useRef(!0),s=on.useRef(!1),l=on.useRef(0);return on.useEffect(()=>{let c=l.current;return()=>window.clearTimeout(c)},[]),(0,Hs.jsx)(eir,{scope:t,isOpenDelayedRef:i,delayDuration:r,onOpen:on.useCallback(()=>{window.clearTimeout(l.current),i.current=!1},[]),onClose:on.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>i.current=!0,n)},[n]),isPointerInTransitRef:s,onPointerInTransitChange:on.useCallback(c=>{s.current=c},[]),disableHoverableContent:o,children:a})};ctt.displayName=ltt;var FF="Tooltip",[tir,BF]=m8(FF),utt=e=>{let{__scopeTooltip:t,children:r,open:n,defaultOpen:o,onOpenChange:a,disableHoverableContent:i,delayDuration:s}=e,l=vde(FF,e.__scopeTooltip),c=h8(t),[u,d]=on.useState(null),f=Vo(),p=on.useRef(0),m=i??l.disableHoverableContent,h=s??l.delayDuration,g=on.useRef(!1),[v,y]=eo({prop:n,defaultProp:o??!1,onChange:S=>{S?(l.onOpen(),document.dispatchEvent(new CustomEvent(hde))):l.onClose(),a?.(S)},caller:FF}),x=on.useMemo(()=>v?g.current?"delayed-open":"instant-open":"closed",[v]),w=on.useCallback(()=>{window.clearTimeout(p.current),p.current=0,g.current=!1,y(!0)},[y]),b=on.useCallback(()=>{window.clearTimeout(p.current),p.current=0,y(!1)},[y]),C=on.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{g.current=!0,y(!0),p.current=0},h)},[h,y]);return on.useEffect(()=>()=>{p.current&&(window.clearTimeout(p.current),p.current=0)},[]),(0,Hs.jsx)(_m,{...c,children:(0,Hs.jsx)(tir,{scope:t,contentId:f,open:v,stateAttribute:x,trigger:u,onTriggerChange:d,onTriggerEnter:on.useCallback(()=>{l.isOpenDelayedRef.current?C():w()},[l.isOpenDelayedRef,C,w]),onTriggerLeave:on.useCallback(()=>{m?b():(window.clearTimeout(p.current),p.current=0)},[b,m]),onOpen:w,onClose:b,disableHoverableContent:m,children:r})})};utt.displayName=FF;var gde="TooltipTrigger",dtt=on.forwardRef((e,t)=>{let{__scopeTooltip:r,...n}=e,o=BF(gde,r),a=vde(gde,r),i=h8(r),s=on.useRef(null),l=Xt(t,s,o.onTriggerChange),c=on.useRef(!1),u=on.useRef(!1),d=on.useCallback(()=>c.current=!1,[]);return on.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),(0,Hs.jsx)(Fm,{asChild:!0,...i,children:(0,Hs.jsx)(rt.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...n,ref:l,onPointerMove:He(e.onPointerMove,f=>{f.pointerType!=="touch"&&!u.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),u.current=!0)}),onPointerLeave:He(e.onPointerLeave,()=>{o.onTriggerLeave(),u.current=!1}),onPointerDown:He(e.onPointerDown,()=>{o.open&&o.onClose(),c.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:He(e.onFocus,()=>{c.current||o.onOpen()}),onBlur:He(e.onBlur,o.onClose),onClick:He(e.onClick,o.onClose)})})});dtt.displayName=gde;var yde="TooltipPortal",[rir,nir]=m8(yde,{forceMount:void 0}),oir=e=>{let{__scopeTooltip:t,forceMount:r,children:n,container:o}=e,a=BF(yde,t);return(0,Hs.jsx)(rir,{scope:t,forceMount:r,children:(0,Hs.jsx)(uo,{present:r||a.open,children:(0,Hs.jsx)(vu,{asChild:!0,container:o,children:n})})})};oir.displayName=yde;var GM="TooltipContent",ftt=on.forwardRef((e,t)=>{let r=nir(GM,e.__scopeTooltip),{forceMount:n=r.forceMount,side:o="top",...a}=e,i=BF(GM,e.__scopeTooltip);return(0,Hs.jsx)(uo,{present:n||i.open,children:i.disableHoverableContent?(0,Hs.jsx)(ptt,{side:o,...a,ref:t}):(0,Hs.jsx)(air,{side:o,...a,ref:t})})}),air=on.forwardRef((e,t)=>{let r=BF(GM,e.__scopeTooltip),n=vde(GM,e.__scopeTooltip),o=on.useRef(null),a=Xt(t,o),[i,s]=on.useState(null),{trigger:l,onClose:c}=r,u=o.current,{onPointerInTransitChange:d}=n,f=on.useCallback(()=>{s(null),d(!1)},[d]),p=on.useCallback((m,h)=>{let g=m.currentTarget,v={x:m.clientX,y:m.clientY},y=cir(v,g.getBoundingClientRect()),x=uir(v,y),w=dir(h.getBoundingClientRect()),b=pir([...x,...w]);s(b),d(!0)},[d]);return on.useEffect(()=>()=>f(),[f]),on.useEffect(()=>{if(l&&u){let m=g=>p(g,u),h=g=>p(g,l);return l.addEventListener("pointerleave",m),u.addEventListener("pointerleave",h),()=>{l.removeEventListener("pointerleave",m),u.removeEventListener("pointerleave",h)}}},[l,u,p,f]),on.useEffect(()=>{if(i){let m=h=>{let g=h.target,v={x:h.clientX,y:h.clientY},y=l?.contains(g)||u?.contains(g),x=!fir(v,i);y?f():x&&(f(),c())};return document.addEventListener("pointermove",m),()=>document.removeEventListener("pointermove",m)}},[l,u,i,c,f]),(0,Hs.jsx)(ptt,{...e,ref:a})}),[iir,sir]=m8(FF,{isInside:!1}),lir=tU("TooltipContent"),ptt=on.forwardRef((e,t)=>{let{__scopeTooltip:r,children:n,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:i,...s}=e,l=BF(GM,r),c=h8(r),{onClose:u}=l;return on.useEffect(()=>(document.addEventListener(hde,u),()=>document.removeEventListener(hde,u)),[u]),on.useEffect(()=>{if(l.trigger){let d=f=>{f.target?.contains(l.trigger)&&u()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[l.trigger,u]),(0,Hs.jsx)(kc,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:d=>d.preventDefault(),onDismiss:u,children:(0,Hs.jsxs)(dg,{"data-state":l.stateAttribute,...c,...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,Hs.jsx)(lir,{children:n}),(0,Hs.jsx)(iir,{scope:r,isInside:!0,children:(0,Hs.jsx)(az,{id:l.contentId,role:"tooltip",children:o||n})})]})})});ftt.displayName=GM;var mtt="TooltipArrow",htt=on.forwardRef((e,t)=>{let{__scopeTooltip:r,...n}=e,o=h8(r);return sir(mtt,r).isInside?null:(0,Hs.jsx)(fg,{...o,...n,ref:t})});htt.displayName=mtt;function cir(e,t){let r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(r,n,o,a)){case a:return"left";case o:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function uir(e,t,r=5){let n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return n}function dir(e){let{top:t,right:r,bottom:n,left:o}=e;return[{x:o,y:t},{x:r,y:t},{x:r,y:n},{x:o,y:n}]}function fir(e,t){let{x:r,y:n}=e,o=!1;for(let a=0,i=t.length-1;a<t.length;i=a++){let s=t[a],l=t[i],c=s.x,u=s.y,d=l.x,f=l.y;u>n!=f>n&&r<(d-c)*(n-u)/(f-u)+c&&(o=!o)}return o}function pir(e){let t=e.slice();return t.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),mir(t)}function mir(e){if(e.length<=1)return e.slice();let t=[];for(let n=0;n<e.length;n++){let o=e[n];for(;t.length>=2;){let a=t[t.length-1],i=t[t.length-2];if((a.x-i.x)*(o.y-i.y)>=(a.y-i.y)*(o.x-i.x))t.pop();else break}t.push(o)}t.pop();let r=[];for(let n=e.length-1;n>=0;n--){let o=e[n];for(;r.length>=2;){let a=r[r.length-1],i=r[r.length-2];if((a.x-i.x)*(o.y-i.y)>=(a.y-i.y)*(o.x-i.x))r.pop();else break}r.push(o)}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 gtt=ctt,vtt=utt,ytt=dtt;var xde=ftt,bde=htt;var vh=D(lt(),1);var j1=D(Or(),1),g8="Switch",[gir,g7n]=hn(g8),[vir,yir]=gir(g8),xtt=vh.forwardRef((e,t)=>{let{__scopeSwitch:r,name:n,checked:o,defaultChecked:a,required:i,disabled:s,value:l="on",onCheckedChange:c,form:u,...d}=e,[f,p]=vh.useState(null),m=Xt(t,x=>p(x)),h=vh.useRef(!1),g=f?u||!!f.closest("form"):!0,[v,y]=eo({prop:o,defaultProp:a??!1,onChange:c,caller:g8});return(0,j1.jsxs)(vir,{scope:r,checked:v,disabled:s,children:[(0,j1.jsx)(rt.button,{type:"button",role:"switch","aria-checked":v,"aria-required":i,"data-state":Stt(v),"data-disabled":s?"":void 0,disabled:s,value:l,...d,ref:m,onClick:He(e.onClick,x=>{y(w=>!w),g&&(h.current=x.isPropagationStopped(),h.current||x.stopPropagation())})}),g&&(0,j1.jsx)(Ctt,{control:f,bubbles:!h.current,name:n,value:l,checked:v,required:i,disabled:s,form:u,style:{transform:"translateX(-100%)"}})]})});xtt.displayName=g8;var btt="SwitchThumb",wtt=vh.forwardRef((e,t)=>{let{__scopeSwitch:r,...n}=e,o=yir(btt,r);return(0,j1.jsx)(rt.span,{"data-state":Stt(o.checked),"data-disabled":o.disabled?"":void 0,...n,ref:t})});wtt.displayName=btt;var xir="SwitchBubbleInput",Ctt=vh.forwardRef(({__scopeSwitch:e,control:t,checked:r,bubbles:n=!0,...o},a)=>{let i=vh.useRef(null),s=Xt(i,a),l=Wb(r),c=uk(t);return vh.useEffect(()=>{let u=i.current;if(!u)return;let d=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(d,"checked").set;if(l!==r&&p){let m=new Event("click",{bubbles:n});p.call(u,r),u.dispatchEvent(m)}},[l,r,n]),(0,j1.jsx)("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...o,tabIndex:-1,ref:s,style:{...o.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Ctt.displayName=xir;function Stt(e){return e?"checked":"unchecked"}var wde=xtt,Ptt=wtt;var Qr=D(lt(),1),ktt=D(ng(),1);var Ro=D(Or(),1),kde="ToastProvider",[Rde,wir,Cir]=cf("Toast"),[Rtt,N7n]=hn("Toast",[Cir]),[Sir,y8]=Rtt(kde),Pir=e=>{let{__scopeToast:t,label:r="Notification",duration:n=5e3,swipeDirection:o="right",swipeThreshold:a=50,children:i}=e,[s,l]=Qr.useState(null),[c,u]=Qr.useState(0),d=Qr.useRef(!1),f=Qr.useRef(!1);return r.trim()||console.error(`Invalid prop \`label\` supplied to \`${kde}\`. Expected non-empty \`string\`.`),(0,Ro.jsx)(Rde.Provider,{scope:t,children:(0,Ro.jsx)(Sir,{scope:t,label:r,duration:n,swipeDirection:o,swipeThreshold:a,toastCount:c,viewport:s,onViewportChange:l,onToastAdd:Qr.useCallback(()=>u(p=>p+1),[]),onToastRemove:Qr.useCallback(()=>u(p=>p-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:f,children:i})})};Pir.displayName=kde;var Ntt="ToastViewport",Iir=["F8"],Sde="toast.viewportPause",Pde="toast.viewportResume",Mtt=Qr.forwardRef((e,t)=>{let{__scopeToast:r,hotkey:n=Iir,label:o="Notifications ({hotkey})",...a}=e,i=y8(Ntt,r),s=wir(r),l=Qr.useRef(null),c=Qr.useRef(null),u=Qr.useRef(null),d=Qr.useRef(null),f=Xt(t,d,i.onViewportChange),p=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),m=i.toastCount>0;Qr.useEffect(()=>{let g=v=>{n.length!==0&&n.every(x=>v[x]||v.code===x)&&d.current?.focus()};return document.addEventListener("keydown",g),()=>document.removeEventListener("keydown",g)},[n]),Qr.useEffect(()=>{let g=l.current,v=d.current;if(m&&g&&v){let y=()=>{if(!i.isClosePausedRef.current){let C=new CustomEvent(Sde);v.dispatchEvent(C),i.isClosePausedRef.current=!0}},x=()=>{if(i.isClosePausedRef.current){let C=new CustomEvent(Pde);v.dispatchEvent(C),i.isClosePausedRef.current=!1}},w=C=>{!g.contains(C.relatedTarget)&&x()},b=()=>{g.contains(document.activeElement)||x()};return g.addEventListener("focusin",y),g.addEventListener("focusout",w),g.addEventListener("pointermove",y),g.addEventListener("pointerleave",b),window.addEventListener("blur",y),window.addEventListener("focus",x),()=>{g.removeEventListener("focusin",y),g.removeEventListener("focusout",w),g.removeEventListener("pointermove",y),g.removeEventListener("pointerleave",b),window.removeEventListener("blur",y),window.removeEventListener("focus",x)}}},[m,i.isClosePausedRef]);let h=Qr.useCallback(({tabbingDirection:g})=>{let y=s().map(x=>{let w=x.ref.current,b=[w,...Bir(w)];return g==="forwards"?b:b.reverse()});return(g==="forwards"?y.reverse():y).flat()},[s]);return Qr.useEffect(()=>{let g=d.current;if(g){let v=y=>{let x=y.altKey||y.ctrlKey||y.metaKey;if(y.key==="Tab"&&!x){let b=document.activeElement,C=y.shiftKey;if(y.target===g&&C){c.current?.focus();return}let N=h({tabbingDirection:C?"backwards":"forwards"}),T=N.findIndex(A=>A===b);Cde(N.slice(T+1))?y.preventDefault():C?c.current?.focus():u.current?.focus()}};return g.addEventListener("keydown",v),()=>g.removeEventListener("keydown",v)}},[s,h]),(0,Ro.jsxs)(CNe,{ref:l,role:"region","aria-label":o.replace("{hotkey}",p),tabIndex:-1,style:{pointerEvents:m?void 0:"none"},children:[m&&(0,Ro.jsx)(Ide,{ref:c,onFocusFromOutsideViewport:()=>{let g=h({tabbingDirection:"forwards"});Cde(g)}}),(0,Ro.jsx)(Rde.Slot,{scope:r,children:(0,Ro.jsx)(rt.ol,{tabIndex:-1,...a,ref:f})}),m&&(0,Ro.jsx)(Ide,{ref:u,onFocusFromOutsideViewport:()=>{let g=h({tabbingDirection:"backwards"});Cde(g)}})]})});Mtt.displayName=Ntt;var Ttt="ToastFocusProxy",Ide=Qr.forwardRef((e,t)=>{let{__scopeToast:r,onFocusFromOutsideViewport:n,...o}=e,a=y8(Ttt,r);return(0,Ro.jsx)(OE,{tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:i=>{let s=i.relatedTarget;!a.viewport?.contains(s)&&n()}})});Ide.displayName=Ttt;var VF="Toast",kir="toast.swipeStart",Rir="toast.swipeMove",Nir="toast.swipeCancel",Mir="toast.swipeEnd",Att=Qr.forwardRef((e,t)=>{let{forceMount:r,open:n,defaultOpen:o,onOpenChange:a,...i}=e,[s,l]=eo({prop:n,defaultProp:o??!0,onChange:a,caller:VF});return(0,Ro.jsx)(uo,{present:r||s,children:(0,Ro.jsx)(Lir,{open:s,...i,ref:t,onClose:()=>l(!1),onPause:to(e.onPause),onResume:to(e.onResume),onSwipeStart:He(e.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:He(e.onSwipeMove,c=>{let{x:u,y:d}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","move"),c.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${d}px`)}),onSwipeCancel:He(e.onSwipeCancel,c=>{c.currentTarget.setAttribute("data-swipe","cancel"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:He(e.onSwipeEnd,c=>{let{x:u,y:d}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","end"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${d}px`),l(!1)})})})});Att.displayName=VF;var[Tir,Air]=Rtt(VF,{onClose(){}}),Lir=Qr.forwardRef((e,t)=>{let{__scopeToast:r,type:n="foreground",duration:o,open:a,onClose:i,onEscapeKeyDown:s,onPause:l,onResume:c,onSwipeStart:u,onSwipeMove:d,onSwipeCancel:f,onSwipeEnd:p,...m}=e,h=y8(VF,r),[g,v]=Qr.useState(null),y=Xt(t,F=>v(F)),x=Qr.useRef(null),w=Qr.useRef(null),b=o||h.duration,C=Qr.useRef(0),S=Qr.useRef(b),P=Qr.useRef(0),{onToastAdd:N,onToastRemove:T}=h,A=to(()=>{g?.contains(document.activeElement)&&h.viewport?.focus(),i()}),M=Qr.useCallback(F=>{!F||F===1/0||(window.clearTimeout(P.current),C.current=new Date().getTime(),P.current=window.setTimeout(A,F))},[A]);Qr.useEffect(()=>{let F=h.viewport;if(F){let I=()=>{M(S.current),c?.()},k=()=>{let R=new Date().getTime()-C.current;S.current=S.current-R,window.clearTimeout(P.current),l?.()};return F.addEventListener(Sde,k),F.addEventListener(Pde,I),()=>{F.removeEventListener(Sde,k),F.removeEventListener(Pde,I)}}},[h.viewport,b,l,c,M]),Qr.useEffect(()=>{a&&!h.isClosePausedRef.current&&M(b)},[a,b,h.isClosePausedRef,M]),Qr.useEffect(()=>(N(),()=>T()),[N,T]);let O=Qr.useMemo(()=>g?Btt(g):null,[g]);return h.viewport?(0,Ro.jsxs)(Ro.Fragment,{children:[O&&(0,Ro.jsx)(Eir,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite",children:O}),(0,Ro.jsx)(Tir,{scope:r,onClose:A,children:ktt.createPortal((0,Ro.jsx)(Rde.ItemSlot,{scope:r,children:(0,Ro.jsx)(wNe,{asChild:!0,onEscapeKeyDown:He(s,()=>{h.isFocusedToastEscapeKeyDownRef.current||A(),h.isFocusedToastEscapeKeyDownRef.current=!1}),children:(0,Ro.jsx)(rt.li,{tabIndex:0,"data-state":a?"open":"closed","data-swipe-direction":h.swipeDirection,...m,ref:y,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:He(e.onKeyDown,F=>{F.key==="Escape"&&(s?.(F.nativeEvent),F.nativeEvent.defaultPrevented||(h.isFocusedToastEscapeKeyDownRef.current=!0,A()))}),onPointerDown:He(e.onPointerDown,F=>{F.button===0&&(x.current={x:F.clientX,y:F.clientY})}),onPointerMove:He(e.onPointerMove,F=>{if(!x.current)return;let I=F.clientX-x.current.x,k=F.clientY-x.current.y,R=!!w.current,E=["left","right"].includes(h.swipeDirection),_=["left","up"].includes(h.swipeDirection)?Math.min:Math.max,U=E?_(0,I):0,V=E?0:_(0,k),L=F.pointerType==="touch"?10:2,H={x:U,y:V},j={originalEvent:F,delta:H};R?(w.current=H,v8(Rir,d,j,{discrete:!1})):Itt(H,h.swipeDirection,L)?(w.current=H,v8(kir,u,j,{discrete:!1}),F.target.setPointerCapture(F.pointerId)):(Math.abs(I)>L||Math.abs(k)>L)&&(x.current=null)}),onPointerUp:He(e.onPointerUp,F=>{let I=w.current,k=F.target;if(k.hasPointerCapture(F.pointerId)&&k.releasePointerCapture(F.pointerId),w.current=null,x.current=null,I){let R=F.currentTarget,E={originalEvent:F,delta:I};Itt(I,h.swipeDirection,h.swipeThreshold)?v8(Mir,p,E,{discrete:!0}):v8(Nir,f,E,{discrete:!0}),R.addEventListener("click",_=>_.preventDefault(),{once:!0})}})})})}),h.viewport)})]}):null}),Eir=e=>{let{__scopeToast:t,children:r,...n}=e,o=y8(VF,t),[a,i]=Qr.useState(!1),[s,l]=Qr.useState(!1);return _ir(()=>i(!0)),Qr.useEffect(()=>{let c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),s?null:(0,Ro.jsx)(vu,{asChild:!0,children:(0,Ro.jsx)(OE,{...n,children:a&&(0,Ro.jsxs)(Ro.Fragment,{children:[o.label," ",r]})})})},Dir="ToastTitle",Ltt=Qr.forwardRef((e,t)=>{let{__scopeToast:r,...n}=e;return(0,Ro.jsx)(rt.div,{...n,ref:t})});Ltt.displayName=Dir;var Oir="ToastDescription",Ett=Qr.forwardRef((e,t)=>{let{__scopeToast:r,...n}=e;return(0,Ro.jsx)(rt.div,{...n,ref:t})});Ett.displayName=Oir;var Dtt="ToastAction",Ott=Qr.forwardRef((e,t)=>{let{altText:r,...n}=e;return r.trim()?(0,Ro.jsx)(Ftt,{altText:r,asChild:!0,children:(0,Ro.jsx)(Nde,{...n,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Dtt}\`. Expected non-empty \`string\`.`),null)});Ott.displayName=Dtt;var _tt="ToastClose",Nde=Qr.forwardRef((e,t)=>{let{__scopeToast:r,...n}=e,o=Air(_tt,r);return(0,Ro.jsx)(Ftt,{asChild:!0,children:(0,Ro.jsx)(rt.button,{type:"button",...n,ref:t,onClick:He(e.onClick,o.onClose)})})});Nde.displayName=_tt;var Ftt=Qr.forwardRef((e,t)=>{let{__scopeToast:r,altText:n,...o}=e;return(0,Ro.jsx)(rt.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0,...o,ref:t})});function Btt(e){let t=[];return Array.from(e.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&t.push(n.textContent),Fir(n)){let o=n.ariaHidden||n.hidden||n.style.display==="none",a=n.dataset.radixToastAnnounceExclude==="";if(!o)if(a){let i=n.dataset.radixToastAnnounceAlt;i&&t.push(i)}else t.push(...Btt(n))}}),t}function v8(e,t,r,{discrete:n}){let o=r.originalEvent.currentTarget,a=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?ey(o,a):o.dispatchEvent(a)}var Itt=(e,t,r=0)=>{let n=Math.abs(e.x),o=Math.abs(e.y),a=n>o;return t==="left"||t==="right"?a&&n>r:!a&&o>r};function _ir(e=()=>{}){let t=to(e);$n(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[t])}function Fir(e){return e.nodeType===e.ELEMENT_NODE}function Bir(e){let t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{let o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Cde(e){let t=document.activeElement;return e.some(r=>r===t?!0:(r.focus(),document.activeElement!==t))}var Mde=Mtt,Tde=Att,Ade=Ltt,Lde=Ett,Ede=Ott,Dde=Nde;function Ae(...e){return R7e(MW(e))}var Uir=ee.forwardRef(({className:e,...t},r)=>(0,q.jsx)(p7e,{ref:r,className:Ae("moonui-theme","border-b border-gray-200 dark:border-gray-800",e),...t}));Uir.displayName="AccordionItem";var zir=ee.forwardRef(({className:e,children:t,...r},n)=>(0,q.jsx)(m7e,{className:"flex",children:(0,q.jsxs)(Zle,{ref:n,className:Ae("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,q.jsx)(j0,{className:"h-4 w-4 shrink-0 transition-transform duration-200 opacity-70 group-hover:opacity-100"})]})}));zir.displayName=Zle.displayName;var Hir=ee.forwardRef(({className:e,children:t,...r},n)=>(0,q.jsx)(Jle,{ref:n,className:Ae("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,q.jsx)("div",{className:"pb-4 pt-0",children:t})}));Hir.displayName=Jle.displayName;var jir=Hn("relative w-full flex items-center gap-3 p-4 border text-foreground [&>svg]:shrink-0",{variants:{variant:{default:"bg-background text-foreground border-border",primary:"bg-primary/10 text-primary border-primary/30",success:"bg-success/10 text-success border-success/30",warning:"bg-warning/10 text-warning border-warning/30",error:"bg-destructive/10 text-destructive border-destructive/30",info:"bg-blue-500/10 text-blue-500 border-blue-500/30"},size:{sm:"py-2 text-xs",default:"py-3 text-sm",lg:"py-4 text-base"},radius:{none:"rounded-none",sm:"rounded-sm",default:"rounded-md",lg:"rounded-lg",full:"rounded-full"},withClose:{true:"pr-10"}},defaultVariants:{variant:"default",size:"default",radius:"default",withClose:!1}}),$ir=ee.forwardRef(({className:e,variant:t="default",size:r,radius:n,hideIcon:o=!1,closable:a=!1,onClose:i,children:s,...l},c)=>{let u=ee.useMemo(()=>{switch(t){case"success":return Ky;case"warning":return W0;case"error":return Jg;case"info":return oM;default:return oM}},[t]);return(0,q.jsxs)("div",{ref:c,role:"alert",className:Ae("moonui-theme",jir({variant:t,size:r,radius:n,withClose:a}),e),...l,children:[!o&&(0,q.jsx)(u,{className:"h-5 w-5"}),(0,q.jsx)("div",{className:"flex-1",children:s}),a&&i&&(0,q.jsx)("button",{onClick:i,className:"absolute right-3 top-3 inline-flex h-6 w-6 items-center justify-center rounded-full opacity-70 transition-opacity hover:opacity-100","aria-label":"Kapat",children:(0,q.jsx)(Yy,{className:"h-4 w-4"})})]})});$ir.displayName="Alert";var qir=ee.forwardRef(({className:e,...t},r)=>(0,q.jsx)("h5",{ref:r,className:Ae("moonui-theme","font-semibold leading-tight tracking-tight mb-1",e),...t}));qir.displayName="AlertTitle";var Wir=ee.forwardRef(({className:e,...t},r)=>(0,q.jsx)("div",{ref:r,className:Ae("moonui-theme","text-sm leading-5 text-muted-foreground",e),...t}));Wir.displayName="AlertDescription";var Gir=Hn("relative overflow-hidden",{variants:{variant:{default:"rounded-md bg-muted/10",ghost:"bg-transparent",outline:"rounded-md border border-border",card:"rounded-md bg-card shadow-sm"},radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{variant:"default"}}),Kir=ee.forwardRef(({className:e,variant:t,radius:r,ratio:n=16/9,style:o,children:a,...i},s)=>(0,q.jsx)("div",{ref:s,className:Ae("moonui-theme",Gir({variant:t,radius:r}),e),style:{position:"relative",paddingBottom:`${1/n*100}%`,...o},...i,children:(0,q.jsx)("div",{className:"absolute inset-0",children:a})}));Kir.displayName="AspectRatio";var Xir=Hn("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"}}),Xtt=ee.forwardRef(({className:e,size:t,radius:r,variant:n,...o},a)=>(0,q.jsx)(ace,{ref:a,className:Ae("moonui-theme",Xir({size:t,radius:r,variant:n}),e),...o}));Xtt.displayName=ace.displayName;var Yir=ee.forwardRef(({className:e,...t},r)=>(0,q.jsx)(ice,{ref:r,className:Ae("moonui-theme","aspect-square h-full w-full",e),...t}));Yir.displayName=ice.displayName;var Ytt=ee.forwardRef(({className:e,...t},r)=>(0,q.jsx)(sce,{ref:r,className:Ae("flex h-full w-full items-center justify-center bg-muted",e),...t}));Ytt.displayName=sce.displayName;var Qir=ee.forwardRef(({className:e,limit:t,avatars:r,overlapOffset:n=-8,...o},a)=>{let i=t?r.slice(0,t):r,s=t?Math.max(0,r.length-t):0;return(0,q.jsx)("div",{ref:a,className:Ae("moonui-theme","flex items-center",e),...o,children:(0,q.jsxs)("div",{className:"flex",children:[i.map((l,c)=>(0,q.jsx)("div",{className:"relative",style:{marginLeft:c===0?0:`${n}px`,zIndex:i.length-c},children:l},c)),s>0&&(0,q.jsx)("div",{className:"relative z-0",style:{marginLeft:`${n}px`},children:(0,q.jsx)(Xtt,{variant:"border",children:(0,q.jsxs)(Ytt,{children:["+",s]})})})]})})});Qir.displayName="AvatarGroup";var Zir=Hn(["inline-flex items-center justify-center gap-1.5","font-medium transition-colors duration-200","border focus:outline-none","focus-visible:ring-2 focus-visible:ring-offset-1","mr-2 mb-2 last:mr-0"],{variants:{variant:{primary:["border-transparent bg-gray-900 text-white","hover:bg-gray-800 dark:hover:bg-gray-700","focus-visible:ring-gray-500/30 dark:focus-visible:ring-gray-400/40","dark:bg-gray-700 dark:text-gray-50 dark:shadow-inner dark:shadow-gray-950/10"],secondary:["border-transparent bg-secondary text-secondary-foreground","hover:bg-gray-200 dark:hover:bg-gray-600","focus-visible:ring-gray-400/30 dark:focus-visible:ring-gray-500/40","dark:bg-gray-700/50 dark:text-gray-50 dark:shadow-inner dark:shadow-gray-950/10"],outline:["border-gray-200 dark:border-gray-600","bg-transparent text-foreground","hover:border-gray-300 dark:hover:border-gray-500","focus-visible:ring-gray-400/30 dark:focus-visible:ring-gray-500/40","dark:text-gray-100 dark:bg-transparent dark:backdrop-blur-sm"],destructive:["border-transparent bg-error text-white","hover:bg-error/90 dark:hover:bg-error/80","focus-visible:ring-error/30 dark:focus-visible:ring-error/25","dark:bg-error/90 dark:text-white dark:shadow-inner dark:shadow-error/10"],success:["border-transparent bg-success text-white","hover:bg-success/90 dark:hover:bg-success/80","focus-visible:ring-success/30 dark:focus-visible:ring-success/25","dark:bg-success/90 dark:text-white dark:shadow-inner dark:shadow-success/10"],warning:["border-transparent bg-warning text-white","hover:bg-warning/90 dark:hover:bg-warning/80","focus-visible:ring-warning/30 dark:focus-visible:ring-warning/25","dark:bg-warning/90 dark:text-gray-900 dark:shadow-inner dark:shadow-warning/10"],ghost:["border border-gray-200 bg-gray-50/50 text-gray-700","hover:bg-gray-100 dark:hover:bg-gray-800/60","focus-visible:ring-gray-400/30 dark:focus-visible:ring-gray-500/40","dark:border-gray-700 dark:bg-gray-800/30 dark:text-gray-300","transition-all duration-200"],pro:["border-transparent bg-gradient-to-r from-purple-600 to-pink-600 text-white","hover:from-purple-700 hover:to-pink-700","focus-visible:ring-purple-400/30 dark:focus-visible:ring-purple-500/40","shadow-md dark:shadow-lg dark:shadow-purple-500/10"],admin:["border-transparent bg-gradient-to-r from-purple-600 to-pink-600 text-white","hover:from-purple-700 hover:to-pink-700","focus-visible:ring-purple-400/30 dark:focus-visible:ring-purple-500/40","shadow-md dark:shadow-lg dark:shadow-purple-500/10"]},size:{sm:"h-5 px-2 text-xs",md:"h-6 px-3 text-sm",lg:"h-8 px-4 text-base"},radius:{default:"rounded-full",sm:"rounded-md",lg:"rounded-xl",none:"rounded-none"}},defaultVariants:{variant:"primary",size:"md",radius:"default"}});function C8({className:e,variant:t,size:r,radius:n,withDot:o,dotColor:a,removable:i,onRemove:s,leftIcon:l,rightIcon:c,noAutoSpacing:u,children:d,...f}){let p=l,m=d;return t==="pro"&&(p=l||(0,q.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,q.jsx)("path",{d:"M12 0L13.09 8.26L22 9L13.09 9.74L12 18L10.91 9.74L2 9L10.91 8.26L12 0Z",fill:"currentColor"}),(0,q.jsx)("path",{d:"M19 5L19.5 7L21 7.5L19.5 8L19 10L18.5 8L17 7.5L18.5 7L19 5Z",fill:"currentColor"}),(0,q.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"&&(p=l||(0,q.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,q.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,q.jsxs)("div",{className:Ae("moonui-theme",Zir({variant:t,size:r,radius:n}),u&&"mr-0 mb-0",e),"data-removable":i?"":void 0,...f,children:[o&&(0,q.jsx)("span",{className:Ae("h-2 w-2 rounded-full",a||(t==="destructive"||t==="success"||t==="warning"?"bg-white":t==="secondary"?"bg-secondary-foreground":t==="outline"||t==="ghost"?"bg-foreground":t==="pro"||t==="admin"?"bg-white":"bg-primary-foreground")),"aria-hidden":"true"}),p&&(0,q.jsx)("span",{className:"inline-flex shrink-0 items-center",children:p}),(0,q.jsx)("span",{className:"inline-flex items-center",children:m}),c&&(0,q.jsx)("span",{className:"inline-flex shrink-0 items-center",children:c}),i&&s&&(0,q.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(),s()},"aria-label":"Remove badge",children:(0,q.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,q.jsx)("path",{d:"M0.799988 7.19999L7.19999 0.799988M0.799988 0.799988L7.19999 7.19999",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]})}var Jir=Hn("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"}}),esr=ee.forwardRef(({className:e,variant:t,size:r,...n},o)=>(0,q.jsx)("nav",{ref:o,className:Ae("moonui-theme",Jir({variant:t,size:r}),e),"aria-label":"breadcrumb",...n}));esr.displayName="Breadcrumb";var tsr=ee.forwardRef(({className:e,collapsed:t,collapsedWidth:r=3,...n},o)=>{let a=ee.Children.toArray(n.children).filter(Boolean),i=a.length;if(t&&i>r){let s=a[0],l=a.slice(-2);return(0,q.jsxs)("ol",{ref:o,className:Ae("flex flex-wrap items-center gap-1.5 sm:gap-2.5",e),...n,children:[s,(0,q.jsx)(Qtt,{}),l]})}return(0,q.jsx)("ol",{ref:o,className:Ae("flex flex-wrap items-center gap-1.5 sm:gap-2.5",e),...n})});tsr.displayName="BreadcrumbList";var rsr=ee.forwardRef(({className:e,isCurrent:t,href:r,asChild:n=!1,...o},a)=>{let i=n?ee.Fragment:r?"a":"span",s=n?{}:r?{href:r}:{};return(0,q.jsx)("li",{ref:a,className:Ae("moonui-theme","inline-flex items-center gap-1.5",e),"aria-current":t?"page":void 0,...o,children:(0,q.jsx)(i,{className:Ae("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:o.children})})});rsr.displayName="BreadcrumbItem";var nsr=({children:e,className:t,...r})=>(0,q.jsx)("span",{role:"presentation","aria-hidden":"true",className:Ae("moonui-theme","text-muted-foreground opacity-70",t),...r,children:e||(0,q.jsx)($0,{className:"h-3.5 w-3.5"})});nsr.displayName="BreadcrumbSeparator";var Qtt=({className:e,...t})=>(0,q.jsxs)("span",{role:"presentation","aria-hidden":"true",className:Ae("moonui-theme","flex items-center text-muted-foreground hover:text-foreground/80 transition-colors duration-200",e),...t,children:[(0,q.jsx)(Xy,{className:"h-4 w-4"}),(0,q.jsx)("span",{className:"sr-only",children:"More pages"})]});Qtt.displayName="BreadcrumbEllipsis";var osr=ee.forwardRef(({className:e,href:t,...r},n)=>(0,q.jsx)("a",{ref:n,href:t,className:Ae("transition-colors duration-200 hover:text-foreground text-muted-foreground hover:underline hover:underline-offset-4 hover:decoration-muted-foreground/30",e),...r}));osr.displayName="BreadcrumbLink";var asr=ee.forwardRef(({className:e,...t},r)=>(0,q.jsx)("span",{ref:r,className:Ae("font-medium text-foreground dark:text-white dark:text-opacity-95",e),...t}));asr.displayName="BreadcrumbPage";var Ztt=Hn(["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}}),I8=ee.forwardRef(({className:e,variant:t,size:r,rounded:n,fullWidth:o,asChild:a=!1,loading:i=!1,leftIcon:s,rightIcon:l,children:c,disabled:u,...d},f)=>(0,q.jsxs)("button",{className:Ae("moonui-theme",Ztt({variant:t,size:r,rounded:n,fullWidth:o,className:e})),ref:f,disabled:u||i,"data-loading":i?"":void 0,...d,children:[i&&(0,q.jsx)(Ef,{className:"w-4 h-4 animate-spin","aria-hidden":"true"}),!i&&s,c,!i&&l]}));I8.displayName="Button";Hn("",{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"}});var x8={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}},Ode={lift:{y:-2,transition:x8.smooth},scale:{scale:1.05,transition:x8.smooth},glow:{boxShadow:"0 0 20px rgba(var(--primary), 0.3)",transition:x8.smooth},rotate:{rotate:2,transition:x8.bouncy}},isr={scale:{scale:.95,transition:{duration:.1}},depress:{y:1,transition:{duration:.1}}},ssr={initial:{opacity:.5},animate:{opacity:[.5,.8,.5],transition:{duration:1.5,repeat:1/0,ease:"easeInOut"}}},Vtt=Hn("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"}}),lsr=ee.forwardRef(({className:e,variant:t,size:r,radius:n,interactive:o,microInteraction:a="lift",...i},s)=>{if(o&&a!=="none"){let l={whileHover:a==="scale"?Ode.scale:a==="glow"?Ode.glow:Ode.lift,whileTap:isr.scale};return(0,q.jsx)(Ad.div,{ref:s,className:Ae("moonui-theme",Vtt({variant:t,size:r,radius:n,interactive:o,className:e})),...l,...i})}return(0,q.jsx)("div",{ref:s,className:Ae("moonui-theme",Vtt({variant:t,size:r,radius:n,interactive:o,className:e})),...i})});lsr.displayName="Card";var csr=ee.forwardRef(({className:e,...t},r)=>(0,q.jsx)("div",{ref:r,className:Ae("moonui-theme","flex flex-col space-y-1.5 p-6",e),...t}));csr.displayName="CardHeader";var usr=ee.forwardRef(({className:e,...t},r)=>(0,q.jsx)("h3",{ref:r,className:Ae("moonui-theme","text-lg font-semibold leading-none tracking-tight",e),...t}));usr.displayName="CardTitle";var dsr=ee.forwardRef(({className:e,...t},r)=>(0,q.jsx)("p",{ref:r,className:Ae("moonui-theme","text-sm text-muted-foreground",e),...t}));dsr.displayName="CardDescription";var fsr=ee.forwardRef(({className:e,...t},r)=>(0,q.jsx)("div",{ref:r,className:Ae("moonui-theme","p-6 pt-0",e),...t}));fsr.displayName="CardContent";var psr=ee.forwardRef(({className:e,...t},r)=>(0,q.jsx)("div",{ref:r,className:Ae("moonui-theme","flex items-center p-6 pt-0",e),...t}));psr.displayName="CardFooter";var msr=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,n]of Object.entries(t))if(n.test(e))return r;return"unknown"},Utt=(e,t)=>{let r=e.replace(/\s+/g,""),n=t==="amex"?[4,6,5]:[4,4,4,4],o="",a=0;for(let i of n){if(a>=r.length)break;o&&(o+=" "),o+=r.slice(a,a+i),a+=i}return o},hsr=ee.forwardRef(({className:e,value:t="",onChange:r,showIcon:n=!0,size:o,...a},i)=>{let[s,l]=ee.useState("unknown"),c=u=>{let d=u.target.value.replace(/\D/g,""),f=msr(d);l(f);let p=f==="amex"?15:16,m=d.slice(0,p),h=Utt(m,f);r?.(m,f),u.target.value=h};return(0,q.jsxs)("div",{className:"relative",children:[(0,q.jsx)(JM,{ref:i,type:"text",inputMode:"numeric",autoComplete:"cc-number",placeholder:"1234 5678 9012 3456",value:Utt(t,s),onChange:c,className:Ae(n&&"pl-10",e),...a}),n&&(0,q.jsx)(f_,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"})]})});hsr.displayName="CardNumberInput";var gsr=ee.forwardRef(({className:e,value:t="",onChange:r,size:n,...o},a)=>{let i=l=>{let c=l.target.value.replace(/\D/g,"");if(c.length>=2){let d=parseInt(c.slice(0,2));d>12?c="12"+c.slice(2):d===0&&(c="01"+c.slice(2))}c=c.slice(0,4);let u=c;c.length>=2&&(u=c.slice(0,2)+"/"+c.slice(2)),r?.(c),l.target.value=u},s=t.length>=2?t.slice(0,2)+"/"+t.slice(2):t;return(0,q.jsx)(JM,{ref:a,type:"text",inputMode:"numeric",autoComplete:"cc-exp",placeholder:"MM/YY",value:s,onChange:i,className:e,...o})});gsr.displayName="CardExpiryInput";var vsr=ee.forwardRef(({className:e,value:t="",onChange:r,cardType:n="unknown",size:o,...a},i)=>{let s=n==="amex"?4:3;return(0,q.jsx)(JM,{ref:i,type:"text",inputMode:"numeric",autoComplete:"cc-csc",placeholder:n==="amex"?"1234":"123",value:t,onChange:c=>{let u=c.target.value.replace(/\D/g,"").slice(0,s);r?.(u)},maxLength:s,className:e,...a})});vsr.displayName="CardCVCInput";var ysr=ee.forwardRef(({className:e,value:t="",onChange:r,format:n="US",size:o,...a},i)=>{let s=c=>{let u=c.target.value;switch(n){case"US":u=u.replace(/\D/g,"").slice(0,5);break;case"CA":u=u.toUpperCase().replace(/[^A-Z0-9]/g,"").slice(0,6),u.length>=3&&(u=u.slice(0,3)+" "+u.slice(3));break;case"UK":u=u.toUpperCase().replace(/[^A-Z0-9\s]/g,"").slice(0,8);break;default:u=u.slice(0,10)}r?.(u.replace(/\s/g,"")),c.target.value=u};return(0,q.jsx)(JM,{ref:i,type:"text",autoComplete:"postal-code",placeholder:(()=>{switch(n){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})});ysr.displayName="CardZipInput";var xsr=Hn("peer shrink-0 border focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:text-primary-foreground",{variants:{variant:{default:"border-border bg-background data-[state=checked]:bg-primary data-[state=checked]:border-primary",outline:"border-border bg-transparent data-[state=checked]:bg-primary data-[state=checked]:border-primary",muted:"border-border bg-accent data-[state=checked]:bg-primary data-[state=checked]:border-primary",ghost:"border-transparent bg-transparent hover:bg-accent data-[state=checked]:bg-primary data-[state=checked]:border-primary"},size:{sm:"h-3.5 w-3.5",default:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"},radius:{none:"rounded-none",sm:"rounded-sm",default:"rounded-sm",md:"rounded-md",full:"rounded-full"},animation:{none:"",subtle:"transition-all duration-200",default:"transition-all duration-200",bounce:"transition-all duration-200"}},defaultVariants:{variant:"default",size:"default",radius:"default",animation:"default"}}),Jtt=ee.forwardRef(({className:e,variant:t,size:r,radius:n,animation:o,indeterminate:a=!1,icon:i,checked:s,...l},c)=>{let[u,d]=ee.useState(a);return ee.useEffect(()=>{d(a)},[a]),(0,q.jsx)(XG,{ref:c,checked:u?!1:s,className:Ae("moonui-theme",xsr({variant:t,size:r,radius:n,animation:o}),e),...l,children:(0,q.jsx)(vue,{className:Ae("flex items-center justify-center text-current",o==="bounce"&&"data-[state=checked]:animate-bounce"),children:u?(0,q.jsx)(b_,{className:"h-[65%] w-[65%]"}):i||(0,q.jsx)(Ky,{className:"h-[65%] w-[65%]"})})})});Jtt.displayName=XG.displayName;var bsr=ee.forwardRef(({className:e,orientation:t="vertical",spacing:r="1rem",children:n,...o},a)=>(0,q.jsx)("div",{ref:a,className:Ae("flex",t==="vertical"?"flex-col":"flex-row flex-wrap",e),style:{gap:r},role:"group",...o,children:n}));bsr.displayName="CheckboxGroup";var Vde=ee.forwardRef(({className:e,htmlFor:t,children:r,position:n="end",disabled:o=!1,...a},i)=>(0,q.jsx)("label",{ref:i,htmlFor:t,className:Ae("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",n==="start"?"mr-2":"ml-2",o&&"cursor-not-allowed opacity-70",e),...a,children:r}));Vde.displayName="CheckboxLabel";var wsr=ee.forwardRef(({id:e,label:t,labelPosition:r="end",labelClassName:n,...o},a)=>{let i=ee.useId(),s=e||i;return(0,q.jsxs)("div",{className:"flex items-center",children:[r==="start"&&(0,q.jsx)(Vde,{htmlFor:s,position:"start",disabled:o.disabled,className:n,children:t}),(0,q.jsx)(Jtt,{ref:a,id:s,...o}),r==="end"&&(0,q.jsx)(Vde,{htmlFor:s,position:"end",disabled:o.disabled,className:n,children:t})]})});wsr.displayName="CheckboxWithLabel";function Csr(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e?.(o),r===!1||!o.defaultPrevented)return t?.(o)}}function Ssr(e,t=[]){let r=[];function n(a,i){let s=ee.createContext(i),l=r.length;r=[...r,i];let c=d=>{let{scope:f,children:p,...m}=d,h=f?.[e]?.[l]||s,g=ee.useMemo(()=>m,Object.values(m));return(0,q.jsx)(h.Provider,{value:g,children:p})};c.displayName=a+"Provider";function u(d,f){let p=f?.[e]?.[l]||s,m=ee.useContext(p);if(m)return m;if(i!==void 0)return i;throw new Error(`\`${d}\` must be used within \`${a}\``)}return[c,u]}let o=()=>{let a=r.map(i=>ee.createContext(i));return function(s){let l=s?.[e]||a;return ee.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return o.scopeName=e,[n,Psr(o,...t)]}function Psr(...e){let t=e[0];if(e.length===1)return t;let r=()=>{let n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(a){let i=n.reduce((s,{useScope:l,scopeName:c})=>{let d=l(a)[`__scope${c}`];return{...s,...d}},{});return ee.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return r.scopeName=t.scopeName,r}var zF=globalThis?.document?ee.useLayoutEffect:()=>{},Isr=ee[" useInsertionEffect ".trim().toString()]||zF;function ksr({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){let[o,a,i]=Rsr({defaultProp:t,onChange:r}),s=e!==void 0,l=s?e:o;{let u=ee.useRef(e!==void 0);ee.useEffect(()=>{let d=u.current;d!==s&&console.warn(`${n} 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.`),u.current=s},[s,n])}let c=ee.useCallback(u=>{if(s){let d=Nsr(u)?u(e):u;d!==e&&i.current?.(d)}else a(u)},[s,e,a,i]);return[l,c]}function Rsr({defaultProp:e,onChange:t}){let[r,n]=ee.useState(e),o=ee.useRef(r),a=ee.useRef(t);return Isr(()=>{a.current=t},[t]),ee.useEffect(()=>{o.current!==r&&(a.current?.(r),o.current=r)},[r,o]),[r,n,a]}function Nsr(e){return typeof e=="function"}function ztt(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Msr(...e){return t=>{let r=!1,n=e.map(o=>{let a=ztt(o,t);return!r&&typeof a=="function"&&(r=!0),a});if(r)return()=>{for(let o=0;o<n.length;o++){let a=n[o];typeof a=="function"?a():ztt(e[o],null)}}}}function ert(...e){return ee.useCallback(Msr(...e),e)}var Tsr=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],$de=Tsr.reduce((e,t)=>{let r=Sc(`Primitive.${t}`),n=ee.forwardRef((o,a)=>{let{asChild:i,...s}=o,l=i?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,q.jsx)(l,{...s,ref:a})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Asr(e,t){return ee.useReducer((r,n)=>t[r][n]??r,e)}var trt=e=>{let{present:t,children:r}=e,n=Lsr(t),o=typeof r=="function"?r({present:n.isPresent}):ee.Children.only(r),a=ert(n.ref,Esr(o));return typeof r=="function"||n.isPresent?ee.cloneElement(o,{ref:a}):null};trt.displayName="Presence";function Lsr(e){let[t,r]=ee.useState(),n=ee.useRef(null),o=ee.useRef(e),a=ee.useRef("none"),i=e?"mounted":"unmounted",[s,l]=Asr(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return ee.useEffect(()=>{let c=b8(n.current);a.current=s==="mounted"?c:"none"},[s]),zF(()=>{let c=n.current,u=o.current;if(u!==e){let f=a.current,p=b8(c);e?l("MOUNT"):p==="none"||c?.display==="none"?l("UNMOUNT"):l(u&&f!==p?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),zF(()=>{if(t){let c,u=t.ownerDocument.defaultView??window,d=p=>{let h=b8(n.current).includes(CSS.escape(p.animationName));if(p.target===t&&h&&(l("ANIMATION_END"),!o.current)){let g=t.style.animationFillMode;t.style.animationFillMode="forwards",c=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},f=p=>{p.target===t&&(a.current=b8(n.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{u.clearTimeout(c),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:ee.useCallback(c=>{n.current=c?getComputedStyle(c):null,r(c)},[])}}function b8(e){return e?.animationName||"none"}function Esr(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 Dsr=ee[" useId ".trim().toString()]||(()=>{}),Osr=0;function _sr(e){let[t,r]=ee.useState(Dsr());return zF(()=>{e||r(n=>n??String(Osr++))},[e]),e||(t?`radix-${t}`:"")}var k8="Collapsible",[Fsr,aXn]=Ssr(k8),[Bsr,qde]=Fsr(k8),Vsr=ee.forwardRef((e,t)=>{let{__scopeCollapsible:r,open:n,defaultOpen:o,disabled:a,onOpenChange:i,...s}=e,[l,c]=ksr({prop:n,defaultProp:o??!1,onChange:i,caller:k8});return(0,q.jsx)(Bsr,{scope:r,disabled:a,contentId:_sr(),open:l,onOpenToggle:ee.useCallback(()=>c(u=>!u),[c]),children:(0,q.jsx)($de.div,{"data-state":Gde(l),"data-disabled":a?"":void 0,...s,ref:t})})});Vsr.displayName=k8;var rrt="CollapsibleTrigger",nrt=ee.forwardRef((e,t)=>{let{__scopeCollapsible:r,...n}=e,o=qde(rrt,r);return(0,q.jsx)($de.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":Gde(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...n,ref:t,onClick:Csr(e.onClick,o.onOpenToggle)})});nrt.displayName=rrt;var Wde="CollapsibleContent",ort=ee.forwardRef((e,t)=>{let{forceMount:r,...n}=e,o=qde(Wde,e.__scopeCollapsible);return(0,q.jsx)(trt,{present:r||o.open,children:({present:a})=>(0,q.jsx)(Usr,{...n,ref:t,present:a})})});ort.displayName=Wde;var Usr=ee.forwardRef((e,t)=>{let{__scopeCollapsible:r,present:n,children:o,...a}=e,i=qde(Wde,r),[s,l]=ee.useState(n),c=ee.useRef(null),u=ert(t,c),d=ee.useRef(0),f=d.current,p=ee.useRef(0),m=p.current,h=i.open||s,g=ee.useRef(h),v=ee.useRef(void 0);return ee.useEffect(()=>{let y=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(y)},[]),zF(()=>{let y=c.current;if(y){v.current=v.current||{transitionDuration:y.style.transitionDuration,animationName:y.style.animationName},y.style.transitionDuration="0s",y.style.animationName="none";let x=y.getBoundingClientRect();d.current=x.height,p.current=x.width,g.current||(y.style.transitionDuration=v.current.transitionDuration,y.style.animationName=v.current.animationName),l(n)}},[i.open,n]),(0,q.jsx)($de.div,{"data-state":Gde(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!h,...a,ref:u,style:{["--radix-collapsible-content-height"]:f?`${f}px`:void 0,["--radix-collapsible-content-width"]:m?`${m}px`:void 0,...e.style},children:h&&o})});function Gde(e){return e?"open":"closed"}var Ude=nrt,art=ort;var Htt=Hn("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"}}),zsr=ee.forwardRef(({className:e,children:t,variant:r,size:n,asChild:o,...a},i)=>o?(0,q.jsx)(Ude,{ref:i,className:Ae("moonui-theme",Htt({variant:r,size:n}),e),asChild:o,...a,children:t}):(0,q.jsxs)(Ude,{ref:i,className:Ae("moonui-theme",Htt({variant:r,size:n}),e),...a,children:[t,(0,q.jsx)(j0,{className:"h-4 w-4 shrink-0 ml-auto transition-transform duration-200 [&[data-state=open]]:rotate-180"})]}));zsr.displayName=Ude.displayName;var Hsr=Hn("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"}}),jsr=ee.forwardRef(({className:e,children:t,variant:r,size:n,...o},a)=>(0,q.jsx)(art,{ref:a,className:Ae("moonui-theme",Hsr({variant:r,size:n}),e),...o,children:(0,q.jsx)("div",{className:"p-4",children:t})}));jsr.displayName=art.displayName;var $sr=Hn("group relative flex items-center w-full transition-colors",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),qsr=Hn(["w-full bg-background transition-all duration-200","text-foreground placeholder:text-muted-foreground dark:placeholder:text-gray-500","disabled:cursor-not-allowed disabled:opacity-50","file:border-0 file:bg-transparent file:font-medium","focus-visible:outline-none dark:text-gray-200"],{variants:{variant:{standard:"border border-gray-300 dark:border-gray-700 rounded-md px-3 py-2 hover:border-gray-400 dark:hover:border-gray-600 focus-visible:ring-2 focus-visible:ring-primary/30 dark:focus-visible:ring-primary/20 focus-visible:border-primary dark:focus-visible:border-primary/80 dark:bg-gray-900/60 dark:shadow-inner dark:shadow-gray-950/10",filled:"border border-transparent bg-gray-100 dark:bg-gray-800/90 rounded-md px-3 py-2 hover:bg-gray-200 dark:hover:bg-gray-700/90 focus-visible:ring-2 focus-visible:ring-primary/30 dark:focus-visible:ring-primary/20 dark:shadow-inner dark:shadow-gray-950/10",ghost:"border-none bg-transparent shadow-none px-1 dark:text-gray-300 dark:placeholder:text-gray-500 hover:bg-gray-100/50 dark:hover:bg-gray-800/30 focus-visible:bg-transparent",underline:"border-t-0 border-l-0 border-r-0 border-b border-gray-300 dark:border-gray-600 rounded-none px-0 py-2 hover:border-gray-400 dark:hover:border-gray-500 focus-visible:ring-0 focus-visible:border-b-2 focus-visible:border-primary dark:focus-visible:border-primary/80 dark:text-gray-300"},size:{sm:"h-8 text-xs",md:"h-10 text-sm",lg:"h-12 text-base"},hasLeftIcon:{true:"pl-10",false:""},hasRightIcon:{true:"pr-10",false:""},hasRightButton:{true:"pr-10",false:""},isError:{true:"border-error focus-visible:ring-error/30 focus-visible:border-error hover:border-error/80 dark:hover:border-error/80",false:""},isSuccess:{true:"border-success focus-visible:ring-success/30 focus-visible:border-success hover:border-success/80 dark:hover:border-success/80",false:""},isDisabled:{true:"opacity-50 cursor-not-allowed bg-gray-50 dark:bg-gray-800/50 pointer-events-none",false:""}},defaultVariants:{variant:"standard",size:"md",isError:!1,isSuccess:!1,isDisabled:!1,hasLeftIcon:!1,hasRightIcon:!1,hasRightButton:!1}}),JM=ee.forwardRef(({className:e,wrapperClassName:t,messageClassName:r,variant:n,size:o,isError:a,disabled:i,error:s,success:l,loading:c,leftIcon:u,rightIcon:d,rightButton:f,alwaysShowMessage:p=!1,...m},h)=>{let g=p||s||l,v=s?"error":l?"success":"normal";return(0,q.jsxs)("div",{className:"space-y-1.5 w-full",children:[(0,q.jsxs)("div",{className:Ae("moonui-theme",$sr({size:o}),t),children:[u&&(0,q.jsx)("div",{className:"absolute left-3 text-gray-500 flex items-center justify-center pointer-events-none",children:c?(0,q.jsx)(Ef,{className:"h-4 w-4 animate-spin"}):u}),(0,q.jsx)("input",{className:Ae(qsr({variant:n,size:o,isError:!!s||a,isSuccess:!!l,isDisabled:i||c,hasLeftIcon:!!u||c,hasRightIcon:!!d,hasRightButton:!!f}),e),ref:h,disabled:i||c,"data-loading":c?"":void 0,"data-error":s?"":void 0,"data-success":l?"":void 0,"aria-invalid":!!s||!!a||void 0,"aria-describedby":s?`${m.id||""}-error`:l?`${m.id||""}-success`:void 0,...m}),d&&!c&&(0,q.jsx)("div",{className:"absolute right-3 text-gray-500 flex items-center justify-center pointer-events-none",children:d}),f&&(0,q.jsx)("div",{className:"absolute right-3",children:f}),c&&!u&&(0,q.jsx)("div",{className:"absolute left-3 text-gray-500 flex items-center justify-center pointer-events-none",children:(0,q.jsx)(Ef,{className:"h-4 w-4 animate-spin","aria-hidden":"true"})})]}),g&&(0,q.jsx)("p",{className:Ae("text-xs transition-all",v==="error"&&"text-error",v==="success"&&"text-success",v==="normal"&&"text-muted-foreground",r),id:s?`${m.id||""}-error`:l?`${m.id||""}-success`:void 0,children:s||l||""})]})});JM.displayName="Input";var Wsr=Hn("text-sm font-medium leading-none text-gray-900 dark:text-gray-200 peer-disabled:cursor-not-allowed peer-disabled:opacity-70 dark:peer-disabled:opacity-60 transition-colors duration-200"),Gsr=ee.forwardRef(({className:e,...t},r)=>(0,q.jsx)(yue,{ref:r,className:Ae(Wsr(),e),...t}));Gsr.displayName=yue.displayName;var Ksr=Hn("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"}}),Xsr=RZe,Ysr=NZe;var irt=ee.forwardRef(({className:e,variant:t,size:r,side:n,position:o,radius:a,shadow:i,backdrop:s=!1,closeOnInteractOutside:l=!0,overlayBackdrop:c=!1,sideOffset:u=4,...d},f)=>(0,q.jsxs)(q.Fragment,{children:[c&&(0,q.jsx)("div",{className:"fixed inset-0 z-40 bg-overlay opacity-30"}),(0,q.jsx)(bue,{ref:f,sideOffset:u,collisionPadding:8,onInteractOutside:p=>{l||p.preventDefault()},className:Ae(Ksr({variant:t,size:r,side:n,position:o,radius:a,shadow:i}),s&&"backdrop-blur-md bg-opacity-80",e),...d})]}));irt.displayName=bue.displayName;var Qsr=({className:e,...t})=>(0,q.jsx)("div",{className:Ae("moonui-theme","my-2 h-px bg-border",e),...t});Qsr.displayName="PopoverSeparator";var Zsr=({className:e,...t})=>(0,q.jsx)("div",{className:Ae("moonui-theme","-mx-4 -mt-4 mb-3 px-4 pt-4 pb-3 border-b border-border",e),...t});Zsr.displayName="PopoverHeader";var Jsr=({className:e,...t})=>(0,q.jsx)("div",{className:Ae("moonui-theme","-mx-4 -mb-4 mt-3 px-4 pt-3 pb-4 border-t border-border",e),...t});Jsr.displayName="PopoverFooter";var elr=ee.forwardRef(({vertical:e=!1,...t},r)=>(0,q.jsx)(Pue,{ref:r,className:Ae("moonui-theme",t.className),orientation:e?"vertical":"horizontal",...t}));elr.displayName=Pue.displayName;var tlr=Hn("flex items-center justify-start transition-all duration-200",{variants:{variant:{default:"bg-muted rounded-md p-1 text-muted-foreground dark:bg-gray-800/80 dark:text-gray-400",pills:"bg-transparent gap-2 p-0 dark:text-gray-400",underline:"bg-transparent border-b border-border dark:border-gray-700 gap-4 dark:text-gray-400",cards:"bg-transparent gap-2 p-0 dark:text-gray-400",minimal:"bg-transparent gap-1 p-0 dark:text-gray-400"},orientation:{horizontal:"flex-row",vertical:"flex-col items-start gap-1"},fullWidth:{true:"w-full"}},defaultVariants:{variant:"default",orientation:"horizontal",fullWidth:!1}}),rlr=ee.forwardRef(({className:e,variant:t,orientation:r,fullWidth:n,...o},a)=>(0,q.jsx)(Iue,{ref:a,className:Ae("moonui-theme",tlr({variant:t,orientation:r,fullWidth:n,className:e})),...o}));rlr.displayName=Iue.displayName;var nlr=Hn("inline-flex items-center justify-center whitespace-nowrap font-medium ring-offset-background transition-all duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"rounded-md data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm dark:data-[state=active]:bg-gray-900 dark:data-[state=active]:text-gray-100 dark:data-[state=active]:shadow-gray-950/10",underline:"rounded-none border-b-2 border-transparent pb-2 data-[state=active]:border-primary data-[state=active]:bg-transparent data-[state=active]:text-foreground dark:data-[state=active]:border-primary/80 dark:data-[state=active]:text-gray-100",pills:"rounded-full bg-muted hover:bg-muted/80 data-[state=active]:bg-primary data-[state=active]:text-primary-foreground dark:bg-gray-800 dark:hover:bg-gray-700 dark:data-[state=active]:bg-primary/90 dark:data-[state=active]:text-white",cards:"rounded-md bg-muted/50 hover:bg-muted data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-md dark:bg-gray-800/50 dark:hover:bg-gray-700/50 dark:data-[state=active]:bg-gray-900 dark:data-[state=active]:text-gray-100 dark:data-[state=active]:shadow-gray-950/20",minimal:"rounded-sm bg-transparent hover:bg-muted/30 data-[state=active]:bg-transparent data-[state=active]:text-foreground data-[state=active]:underline data-[state=active]:underline-offset-4 dark:hover:bg-gray-800/30 dark:data-[state=active]:text-gray-200"},size:{sm:"h-7 px-2 text-xs",md:"h-9 px-3 py-1.5 text-sm",lg:"h-10 px-4 py-2 text-base"},orientation:{horizontal:"",vertical:"justify-start w-full text-left"},fullWidth:{true:"w-full"}},defaultVariants:{variant:"default",size:"md",orientation:"horizontal",fullWidth:!1}}),olr=ee.forwardRef(({className:e,variant:t,size:r,icon:n,iconPosition:o="left",badge:a,fadeTabs:i=!1,orientation:s,fullWidth:l,children:c,...u},d)=>(0,q.jsxs)(kue,{ref:d,className:Ae("moonui-theme",nlr({variant:t,size:r,orientation:s,fullWidth:l}),i&&"data-[state=inactive]:opacity-60",e),...u,children:[n&&o==="left"&&(0,q.jsx)("span",{className:"mr-2",children:n}),c,n&&o==="right"&&(0,q.jsx)("span",{className:"ml-2",children:n}),a&&(0,q.jsx)("span",{className:"ml-2",children:a})]}));olr.displayName=kue.displayName;var alr=ee.forwardRef(({className:e,animated:t=!1,...r},n)=>(0,q.jsx)(Rue,{ref:n,className:Ae("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}));alr.displayName=Rue.displayName;var ilr=Hn("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"}}),slr=Hn("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"}}),llr=Hn("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"}}),clr=Hn("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"}}),ulr=ee.forwardRef(({className:e,size:t,trackVariant:r,rangeVariant:n,thumbVariant:o,thumbSize:a,showValueLabel:i=!1,valueLabelFormat:s,valueLabelClassName:l,value:c,defaultValue:u=[0],onValueChange:d,disabled:f,...p},m)=>{let[h,g]=ee.useState(c||u||[0]);ee.useEffect(()=>{c!==void 0&&g(c)},[c]);let v=T=>s?s(T):`${Math.round(T*100)/100}`,y=(T,A,M)=>(T-A)/(M-A)*100,x=ee.useRef(null),w=p.min||0,b=p.max||100,C=p.step||1,S=T=>{let A=T.map(M=>{if(C<1){let O=C.toString().split(".")[1]?.length||0;return Math.round(M*Math.pow(10,O))/Math.pow(10,O)}return Math.round(M)});g(A),d&&d(A)},P=T=>{if(f)return;let A=x.current;if(!A)return;let M=A.getBoundingClientRect(),O=(T.clientX-M.left)/M.width,F=w+O*(b-w),I=Math.round(F/C)*C,k=Math.max(w,Math.min(b,I)),R=[...h];R[0]=k,S(R)},N=T=>A=>{if(f)return;A.preventDefault();let M=F=>{let I=x.current;if(!I)return;let k=I.getBoundingClientRect(),R=(F.clientX-k.left)/k.width,E=w+R*(b-w),_=Math.round(E/C)*C,U=Math.max(w,Math.min(b,_)),V=[...h];V[T]=U,S(V)},O=()=>{document.removeEventListener("mousemove",M),document.removeEventListener("mouseup",O)};document.addEventListener("mousemove",M),document.addEventListener("mouseup",O)};return(0,q.jsxs)("div",{className:"w-full",ref:m,...p,children:[i&&(0,q.jsx)("div",{className:Ae("flex justify-end mb-1 text-sm text-muted-foreground",l),children:h.length===1?(0,q.jsx)("span",{children:v(h[0])}):(0,q.jsxs)("span",{children:[v(h[0])," - ",v(h[h.length-1])]})}),(0,q.jsxs)("div",{className:Ae("moonui-theme",ilr({size:t}),e),"data-disabled":f?!0:void 0,children:[(0,q.jsx)("div",{ref:x,className:Ae(slr({variant:r||o||"default"})),onClick:P,children:(0,q.jsx)("div",{className:Ae(llr({variant:n||o||"primary"})),style:{left:"0%",width:`${y(h[0],w,b)}%`}})}),h.map((T,A)=>(0,q.jsx)("div",{className:Ae(clr({variant:o||"primary",size:a})),style:{left:`${y(T,w,b)}%`,transform:"translateX(-50%)",position:"absolute",top:"50%",marginTop:a==="sm"?"-6px":a==="lg"?"-12px":"-8px",cursor:f?"not-allowed":"pointer"},onMouseDown:N(A),"aria-label":`Thumb ${A+1}`,tabIndex:f?-1:0,role:"slider","aria-valuemin":w,"aria-valuemax":b,"aria-valuenow":T,"aria-disabled":f},A))]})]})});ulr.displayName="Slider";var iXn=Hn("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"}});var jtt=1,dlr=.9,flr=.8,plr=.17,_de=.1,Fde=.999,mlr=.9999,hlr=.99,glr=/[\\\/_+.#"@\[\(\{&]/,vlr=/[\\\/_+.#"@\[\(\{&]/g,ylr=/[\s-]/,srt=/[\s-]/g;function zde(e,t,r,n,o,a,i){if(a===t.length)return o===e.length?jtt:hlr;var s=`${o},${a}`;if(i[s]!==void 0)return i[s];for(var l=n.charAt(a),c=r.indexOf(l,o),u=0,d,f,p,m;c>=0;)d=zde(e,t,r,n,c+1,a+1,i),d>u&&(c===o?d*=jtt:glr.test(e.charAt(c-1))?(d*=flr,p=e.slice(o,c-1).match(vlr),p&&o>0&&(d*=Math.pow(Fde,p.length))):ylr.test(e.charAt(c-1))?(d*=dlr,m=e.slice(o,c-1).match(srt),m&&o>0&&(d*=Math.pow(Fde,m.length))):(d*=plr,o>0&&(d*=Math.pow(Fde,c-o))),e.charAt(c)!==t.charAt(a)&&(d*=mlr)),(d<_de&&r.charAt(c-1)===n.charAt(a+1)||n.charAt(a+1)===n.charAt(a)&&r.charAt(c-1)!==n.charAt(a))&&(f=zde(e,t,r,n,c+1,a+2,i),f*_de>d&&(d=f*_de)),d>u&&(u=d),c=r.indexOf(l,c+1);return i[s]=u,u}function $tt(e){return e.toLowerCase().replace(srt," ")}function xlr(e,t,r){return e=r&&r.length>0?`${e+" "+r.join(" ")}`:e,zde(e,t,$tt(e),$tt(t),0,0,{})}var blr=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ld=blr.reduce((e,t)=>{let r=Sc(`Primitive.${t}`),n=ee.forwardRef((o,a)=>{let{asChild:i,...s}=o,l=i?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,q.jsx)(l,{...s,ref:a})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),HF=globalThis?.document?ee.useLayoutEffect:()=>{},wlr=ee[" useId ".trim().toString()]||(()=>{}),Clr=0;function YM(e){let[t,r]=ee.useState(wlr());return HF(()=>{e||r(n=>n??String(Clr++))},[e]),e||(t?`radix-${t}`:"")}function qtt(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function QM(...e){return t=>{let r=!1,n=e.map(o=>{let a=qtt(o,t);return!r&&typeof a=="function"&&(r=!0),a});if(r)return()=>{for(let o=0;o<n.length;o++){let a=n[o];typeof a=="function"?a():qtt(e[o],null)}}}}function G1(...e){return ee.useCallback(QM(...e),e)}var UF='[cmdk-group=""]',Bde='[cmdk-group-items=""]',Slr='[cmdk-group-heading=""]',lrt='[cmdk-item=""]',Wtt=`${lrt}:not([aria-disabled="true"])`,Hde="cmdk-item-select",KM="data-value",Plr=(e,t,r)=>xlr(e,t,r),crt=ee.createContext(void 0),jF=()=>ee.useContext(crt),urt=ee.createContext(void 0),Kde=()=>ee.useContext(urt),drt=ee.createContext(void 0),frt=ee.forwardRef((e,t)=>{let r=XM(()=>{var L,H;return{search:"",value:(H=(L=e.value)!=null?L:e.defaultValue)!=null?H:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),n=XM(()=>new Set),o=XM(()=>new Map),a=XM(()=>new Map),i=XM(()=>new Set),s=prt(e),{label:l,children:c,value:u,onValueChange:d,filter:f,shouldFilter:p,loop:m,disablePointerSelection:h=!1,vimBindings:g=!0,...v}=e,y=YM(),x=YM(),w=YM(),b=ee.useRef(null),C=Olr();W1(()=>{if(u!==void 0){let L=u.trim();r.current.value=L,S.emit()}},[u]),W1(()=>{C(6,O)},[]);let S=ee.useMemo(()=>({subscribe:L=>(i.current.add(L),()=>i.current.delete(L)),snapshot:()=>r.current,setState:(L,H,j)=>{var $,W,z,G;if(!Object.is(r.current[L],H)){if(r.current[L]=H,L==="search")M(),T(),C(1,A);else if(L==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let X=document.getElementById(w);X?X.focus():($=document.getElementById(y))==null||$.focus()}if(C(7,()=>{var X;r.current.selectedItemId=(X=F())==null?void 0:X.id,S.emit()}),j||C(5,O),((W=s.current)==null?void 0:W.value)!==void 0){let X=H??"";(G=(z=s.current).onValueChange)==null||G.call(z,X);return}}S.emit()}},emit:()=>{i.current.forEach(L=>L())}}),[]),P=ee.useMemo(()=>({value:(L,H,j)=>{var $;H!==(($=a.current.get(L))==null?void 0:$.value)&&(a.current.set(L,{value:H,keywords:j}),r.current.filtered.items.set(L,N(H,j)),C(2,()=>{T(),S.emit()}))},item:(L,H)=>(n.current.add(L),H&&(o.current.has(H)?o.current.get(H).add(L):o.current.set(H,new Set([L]))),C(3,()=>{M(),T(),r.current.value||A(),S.emit()}),()=>{a.current.delete(L),n.current.delete(L),r.current.filtered.items.delete(L);let j=F();C(4,()=>{M(),j?.getAttribute("id")===L&&A(),S.emit()})}),group:L=>(o.current.has(L)||o.current.set(L,new Set),()=>{a.current.delete(L),o.current.delete(L)}),filter:()=>s.current.shouldFilter,label:l||e["aria-label"],getDisablePointerSelection:()=>s.current.disablePointerSelection,listId:y,inputId:w,labelId:x,listInnerRef:b}),[]);function N(L,H){var j,$;let W=($=(j=s.current)==null?void 0:j.filter)!=null?$:Plr;return L?W(L,r.current.search,H):0}function T(){if(!r.current.search||s.current.shouldFilter===!1)return;let L=r.current.filtered.items,H=[];r.current.filtered.groups.forEach($=>{let W=o.current.get($),z=0;W.forEach(G=>{let X=L.get(G);z=Math.max(X,z)}),H.push([$,z])});let j=b.current;I().sort(($,W)=>{var z,G;let X=$.getAttribute("id"),Y=W.getAttribute("id");return((z=L.get(Y))!=null?z:0)-((G=L.get(X))!=null?G:0)}).forEach($=>{let W=$.closest(Bde);W?W.appendChild($.parentElement===W?$:$.closest(`${Bde} > *`)):j.appendChild($.parentElement===j?$:$.closest(`${Bde} > *`))}),H.sort(($,W)=>W[1]-$[1]).forEach($=>{var W;let z=(W=b.current)==null?void 0:W.querySelector(`${UF}[${KM}="${encodeURIComponent($[0])}"]`);z?.parentElement.appendChild(z)})}function A(){let L=I().find(j=>j.getAttribute("aria-disabled")!=="true"),H=L?.getAttribute(KM);S.setState("value",H||void 0)}function M(){var L,H,j,$;if(!r.current.search||s.current.shouldFilter===!1){r.current.filtered.count=n.current.size;return}r.current.filtered.groups=new Set;let W=0;for(let z of n.current){let G=(H=(L=a.current.get(z))==null?void 0:L.value)!=null?H:"",X=($=(j=a.current.get(z))==null?void 0:j.keywords)!=null?$:[],Y=N(G,X);r.current.filtered.items.set(z,Y),Y>0&&W++}for(let[z,G]of o.current)for(let X of G)if(r.current.filtered.items.get(X)>0){r.current.filtered.groups.add(z);break}r.current.filtered.count=W}function O(){var L,H,j;let $=F();$&&(((L=$.parentElement)==null?void 0:L.firstChild)===$&&((j=(H=$.closest(UF))==null?void 0:H.querySelector(Slr))==null||j.scrollIntoView({block:"nearest"})),$.scrollIntoView({block:"nearest"}))}function F(){var L;return(L=b.current)==null?void 0:L.querySelector(`${lrt}[aria-selected="true"]`)}function I(){var L;return Array.from(((L=b.current)==null?void 0:L.querySelectorAll(Wtt))||[])}function k(L){let H=I()[L];H&&S.setState("value",H.getAttribute(KM))}function R(L){var H;let j=F(),$=I(),W=$.findIndex(G=>G===j),z=$[W+L];(H=s.current)!=null&&H.loop&&(z=W+L<0?$[$.length-1]:W+L===$.length?$[0]:$[W+L]),z&&S.setState("value",z.getAttribute(KM))}function E(L){let H=F(),j=H?.closest(UF),$;for(;j&&!$;)j=L>0?Elr(j,UF):Dlr(j,UF),$=j?.querySelector(Wtt);$?S.setState("value",$.getAttribute(KM)):R(L)}let _=()=>k(I().length-1),U=L=>{L.preventDefault(),L.metaKey?_():L.altKey?E(1):R(1)},V=L=>{L.preventDefault(),L.metaKey?k(0):L.altKey?E(-1):R(-1)};return ee.createElement(Ld.div,{ref:t,tabIndex:-1,...v,"cmdk-root":"",onKeyDown:L=>{var H;(H=v.onKeyDown)==null||H.call(v,L);let j=L.nativeEvent.isComposing||L.keyCode===229;if(!(L.defaultPrevented||j))switch(L.key){case"n":case"j":{g&&L.ctrlKey&&U(L);break}case"ArrowDown":{U(L);break}case"p":case"k":{g&&L.ctrlKey&&V(L);break}case"ArrowUp":{V(L);break}case"Home":{L.preventDefault(),k(0);break}case"End":{L.preventDefault(),_();break}case"Enter":{L.preventDefault();let $=F();if($){let W=new Event(Hde);$.dispatchEvent(W)}}}}},ee.createElement("label",{"cmdk-label":"",htmlFor:P.inputId,id:P.labelId,style:Flr},l),R8(e,L=>ee.createElement(urt.Provider,{value:S},ee.createElement(crt.Provider,{value:P},L))))}),Ilr=ee.forwardRef((e,t)=>{var r,n;let o=YM(),a=ee.useRef(null),i=ee.useContext(drt),s=jF(),l=prt(e),c=(n=(r=l.current)==null?void 0:r.forceMount)!=null?n:i?.forceMount;W1(()=>{if(!c)return s.item(o,i?.id)},[c]);let u=mrt(o,a,[e.value,e.children,a],e.keywords),d=Kde(),f=gw(C=>C.value&&C.value===u.current),p=gw(C=>c||s.filter()===!1?!0:C.search?C.filtered.items.get(o)>0:!0);ee.useEffect(()=>{let C=a.current;if(!(!C||e.disabled))return C.addEventListener(Hde,m),()=>C.removeEventListener(Hde,m)},[p,e.onSelect,e.disabled]);function m(){var C,S;h(),(S=(C=l.current).onSelect)==null||S.call(C,u.current)}function h(){d.setState("value",u.current,!0)}if(!p)return null;let{disabled:g,value:v,onSelect:y,forceMount:x,keywords:w,...b}=e;return ee.createElement(Ld.div,{ref:QM(a,t),...b,id:o,"cmdk-item":"",role:"option","aria-disabled":!!g,"aria-selected":!!f,"data-disabled":!!g,"data-selected":!!f,onPointerMove:g||s.getDisablePointerSelection()?void 0:h,onClick:g?void 0:m},e.children)}),klr=ee.forwardRef((e,t)=>{let{heading:r,children:n,forceMount:o,...a}=e,i=YM(),s=ee.useRef(null),l=ee.useRef(null),c=YM(),u=jF(),d=gw(p=>o||u.filter()===!1?!0:p.search?p.filtered.groups.has(i):!0);W1(()=>u.group(i),[]),mrt(i,s,[e.value,e.heading,l]);let f=ee.useMemo(()=>({id:i,forceMount:o}),[o]);return ee.createElement(Ld.div,{ref:QM(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:c},r),R8(e,p=>ee.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?c:void 0},ee.createElement(drt.Provider,{value:f},p))))}),Rlr=ee.forwardRef((e,t)=>{let{alwaysRender:r,...n}=e,o=ee.useRef(null),a=gw(i=>!i.search);return!r&&!a?null:ee.createElement(Ld.div,{ref:QM(o,t),...n,"cmdk-separator":"",role:"separator"})}),Nlr=ee.forwardRef((e,t)=>{let{onValueChange:r,...n}=e,o=e.value!=null,a=Kde(),i=gw(c=>c.search),s=gw(c=>c.selectedItemId),l=jF();return ee.useEffect(()=>{e.value!=null&&a.setState("search",e.value)},[e.value]),ee.createElement(Ld.input,{ref:t,...n,"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:o?e.value:i,onChange:c=>{o||a.setState("search",c.target.value),r?.(c.target.value)}})}),Mlr=ee.forwardRef((e,t)=>{let{children:r,label:n="Suggestions",...o}=e,a=ee.useRef(null),i=ee.useRef(null),s=gw(c=>c.selectedItemId),l=jF();return ee.useEffect(()=>{if(i.current&&a.current){let c=i.current,u=a.current,d,f=new ResizeObserver(()=>{d=requestAnimationFrame(()=>{let p=c.offsetHeight;u.style.setProperty("--cmdk-list-height",p.toFixed(1)+"px")})});return f.observe(c),()=>{cancelAnimationFrame(d),f.unobserve(c)}}},[]),ee.createElement(Ld.div,{ref:QM(a,t),...o,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":s,"aria-label":n,id:l.listId},R8(e,c=>ee.createElement("div",{ref:QM(i,l.listInnerRef),"cmdk-list-sizer":""},c)))}),Tlr=ee.forwardRef((e,t)=>{let{open:r,onOpenChange:n,overlayClassName:o,contentClassName:a,container:i,...s}=e;return ee.createElement(gW,{open:r,onOpenChange:n},ee.createElement(Z2,{container:i},ee.createElement(ZN,{"cmdk-overlay":"",className:o}),ee.createElement(JN,{"aria-label":e.label,"cmdk-dialog":"",className:a},ee.createElement(frt,{ref:t,...s}))))}),Alr=ee.forwardRef((e,t)=>gw(r=>r.filtered.count===0)?ee.createElement(Ld.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),Llr=ee.forwardRef((e,t)=>{let{progress:r,children:n,label:o="Loading...",...a}=e;return ee.createElement(Ld.div,{ref:t,...a,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},R8(e,i=>ee.createElement("div",{"aria-hidden":!0},i)))}),Ed=Object.assign(frt,{List:Mlr,Item:Ilr,Input:Nlr,Group:klr,Separator:Rlr,Dialog:Tlr,Empty:Alr,Loading:Llr});function Elr(e,t){let r=e.nextElementSibling;for(;r;){if(r.matches(t))return r;r=r.nextElementSibling}}function Dlr(e,t){let r=e.previousElementSibling;for(;r;){if(r.matches(t))return r;r=r.previousElementSibling}}function prt(e){let t=ee.useRef(e);return W1(()=>{t.current=e}),t}var W1=typeof window>"u"?ee.useEffect:ee.useLayoutEffect;function XM(e){let t=ee.useRef();return t.current===void 0&&(t.current=e()),t}function gw(e){let t=Kde(),r=()=>e(t.snapshot());return ee.useSyncExternalStore(t.subscribe,r,r)}function mrt(e,t,r,n=[]){let o=ee.useRef(),a=jF();return W1(()=>{var i;let s=(()=>{var c;for(let u of r){if(typeof u=="string")return u.trim();if(typeof u=="object"&&"current"in u)return u.current?(c=u.current.textContent)==null?void 0:c.trim():o.current}})(),l=n.map(c=>c.trim());a.value(e,s,l),(i=t.current)==null||i.setAttribute(KM,s),o.current=s}),o}var Olr=()=>{let[e,t]=ee.useState(),r=XM(()=>new Map);return W1(()=>{r.current.forEach(n=>n()),r.current=new Map},[e]),(n,o)=>{r.current.set(n,o),t({})}};function _lr(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function R8({asChild:e,children:t},r){return e&&ee.isValidElement(t)?ee.cloneElement(_lr(t),{ref:t.ref},r(t.props.children)):r(t)}var Flr={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};var Blr=Z2;var Vlr=Hn("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"}}),hrt=ee.forwardRef(({className:e,variant:t,animation:r,...n},o)=>(0,q.jsx)(ZN,{ref:o,className:Ae("moonui-theme",Vlr({variant:t,animation:r}),e),...n}));hrt.displayName=ZN.displayName;var Ulr=Hn("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"}}),zlr=ee.forwardRef(({className:e,children:t,variant:r,size:n,radius:o,animation:a,position:i,overlayVariant:s="default",overlayAnimation:l="default",hideCloseButton:c=!1,title:u,description:d,icon:f,loading:p=!1,success:m=!1,onClose:h,...g},v)=>{let y=()=>{h&&h()};return(0,q.jsxs)(Blr,{children:[(0,q.jsx)(hrt,{variant:s,animation:l,onClick:c?void 0:y}),(0,q.jsxs)(JN,{ref:v,onEscapeKeyDown:c?void 0:y,onInteractOutside:c?void 0:y,className:Ae(Ulr({variant:r,size:n,radius:o,animation:a,position:i}),"outline-none",p&&"pointer-events-none",m&&"border-success/40",e),...g,children:[(u||d||f)&&(0,q.jsxs)(grt,{className:"flex gap-4",children:[(f||p||m)&&(0,q.jsxs)("div",{className:"flex shrink-0 items-center justify-center",children:[p&&(0,q.jsx)(Ef,{className:"h-5 w-5 animate-spin text-primary"}),m&&(0,q.jsx)(Ky,{className:"h-5 w-5 text-success"}),!p&&!m&&f&&(0,q.jsx)("span",{className:"text-primary",children:f})]}),(0,q.jsxs)("div",{className:"flex-1",children:[u&&(0,q.jsx)(vrt,{children:u}),d&&(0,q.jsx)(yrt,{children:d})]})]}),t,!c&&(0,q.jsxs)(t_,{onClick:y,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,q.jsx)(Yy,{className:"h-4 w-4"}),(0,q.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})});zlr.displayName=JN.displayName;var grt=({className:e,...t})=>(0,q.jsx)("div",{className:Ae("flex flex-col space-y-2 text-center sm:text-left",e),...t});grt.displayName="DialogHeader";var Hlr=({className:e,...t})=>(0,q.jsx)("div",{className:Ae("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end sm:space-x-2 mt-6",e),...t});Hlr.displayName="DialogFooter";var vrt=ee.forwardRef(({className:e,...t},r)=>(0,q.jsx)(J2,{ref:r,className:Ae("text-xl font-semibold leading-snug tracking-tight dark:text-white",e),...t}));vrt.displayName=J2.displayName;var yrt=ee.forwardRef(({className:e,...t},r)=>(0,q.jsx)(e_,{ref:r,className:Ae("text-sm text-muted-foreground leading-normal dark:text-gray-400",e),...t}));yrt.displayName=e_.displayName;var jlr=ee.forwardRef(({className:e,...t},r)=>(0,q.jsx)("form",{ref:r,className:Ae("moonui-theme","flex flex-col gap-4",e),...t}));jlr.displayName="DialogForm";var $lr=Hn("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"}}),qlr=ee.forwardRef(({className:e,variant:t,size:r,...n},o)=>(0,q.jsx)(Ed,{ref:o,className:Ae("moonui-theme",$lr({variant:t,size:r}),e),...n}));qlr.displayName=Ed.displayName;var Wlr=ee.forwardRef(({className:e,...t},r)=>(0,q.jsxs)("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[(0,q.jsx)(k_,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),(0,q.jsx)(Ed.Input,{ref:r,className:Ae("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})]}));Wlr.displayName=Ed.Input.displayName;var Glr=ee.forwardRef(({className:e,...t},r)=>(0,q.jsx)(Ed.List,{ref:r,className:Ae("moonui-theme","max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));Glr.displayName=Ed.List.displayName;var Klr=ee.forwardRef(({className:e,...t},r)=>(0,q.jsx)(Ed.Empty,{ref:r,className:Ae("moonui-theme","py-6 text-center text-sm text-muted-foreground",e),...t}));Klr.displayName=Ed.Empty.displayName;var Xlr=ee.forwardRef(({className:e,...t},r)=>(0,q.jsx)(Ed.Group,{ref:r,className:Ae("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}));Xlr.displayName=Ed.Group.displayName;var Ylr=ee.forwardRef(({className:e,...t},r)=>(0,q.jsx)(Ed.Separator,{ref:r,className:Ae("moonui-theme","-mx-1 h-px bg-border",e),...t}));Ylr.displayName=Ed.Separator.displayName;var Qlr=ee.forwardRef(({className:e,...t},r)=>(0,q.jsx)(Ed.Item,{ref:r,className:Ae("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}));Qlr.displayName=Ed.Item.displayName;var Zlr=({className:e,...t})=>(0,q.jsx)("span",{className:Ae("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});Zlr.displayName="CommandShortcut";var Jlr=(e,t,r)=>{var n,o;let a=r==null||(n=r.toString())==null?void 0:n.toLowerCase();return!!(!((o=e.getValue(t))==null||(o=o.toString())==null||(o=o.toLowerCase())==null)&&o.includes(a))};Jlr.autoRemove=e=>yh(e);var ecr=(e,t,r)=>{var n;return!!(!((n=e.getValue(t))==null||(n=n.toString())==null)&&n.includes(r))};ecr.autoRemove=e=>yh(e);var tcr=(e,t,r)=>{var n;return((n=e.getValue(t))==null||(n=n.toString())==null?void 0:n.toLowerCase())===r?.toLowerCase()};tcr.autoRemove=e=>yh(e);var rcr=(e,t,r)=>{var n;return(n=e.getValue(t))==null?void 0:n.includes(r)};rcr.autoRemove=e=>yh(e);var ncr=(e,t,r)=>!r.some(n=>{var o;return!((o=e.getValue(t))!=null&&o.includes(n))});ncr.autoRemove=e=>yh(e)||!(e!=null&&e.length);var ocr=(e,t,r)=>r.some(n=>{var o;return(o=e.getValue(t))==null?void 0:o.includes(n)});ocr.autoRemove=e=>yh(e)||!(e!=null&&e.length);var acr=(e,t,r)=>e.getValue(t)===r;acr.autoRemove=e=>yh(e);var icr=(e,t,r)=>e.getValue(t)==r;icr.autoRemove=e=>yh(e);var xrt=(e,t,r)=>{let[n,o]=r,a=e.getValue(t);return a>=n&&a<=o};xrt.resolveFilterValue=e=>{let[t,r]=e,n=typeof t!="number"?parseFloat(t):t,o=typeof r!="number"?parseFloat(r):r,a=t===null||Number.isNaN(n)?-1/0:n,i=r===null||Number.isNaN(o)?1/0:o;if(a>i){let s=a;a=i,i=s}return[a,i]};xrt.autoRemove=e=>yh(e)||yh(e[0])&&yh(e[1]);function yh(e){return e==null||e===""}var sXn={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER};var scr=Hn("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"}}),lcr=ee.forwardRef(({className:e,variant:t,size:r,loading:n,emptyContent:o,...a},i)=>{let s=t==="striped",l=ee.Children.map(a.children,c=>{if(ee.isValidElement(c)&&c.type==="tbody"){let u=c.props;return ee.cloneElement(c,{className:Ae(u.className,s&&"even:[&>tr]:bg-muted/50")})}return c});return(0,q.jsxs)("div",{className:"relative w-full overflow-auto",children:[n&&(0,q.jsx)("div",{className:"absolute inset-0 bg-background/60 flex items-center justify-center z-10",children:(0,q.jsx)("div",{className:"h-8 w-8 animate-spin rounded-full border-2 border-primary border-t-transparent"})}),(0,q.jsx)("table",{ref:i,className:Ae(scr({variant:t,size:r}),n&&"opacity-70",e),...a,children:l})]})});lcr.displayName="Table";var ccr=ee.forwardRef(({className:e,...t},r)=>(0,q.jsx)("thead",{ref:r,className:Ae("moonui-theme","[&_tr]:border-b",e),...t}));ccr.displayName="TableHeader";var ucr=ee.forwardRef(({className:e,emptyContent:t,emptyMessage:r="No data available",children:n,...o},a)=>{let i=ee.Children.count(n)>0;return(0,q.jsx)("tbody",{ref:a,className:Ae("moonui-theme","[&_tr:last-child]:border-0",e),...o,children:i?n:(0,q.jsx)("tr",{children:(0,q.jsx)("td",{colSpan:100,className:"h-24 text-center",children:t||(0,q.jsx)("div",{className:"py-6 text-muted-foreground",children:(0,q.jsx)("div",{className:"text-sm",children:r})})})})})});ucr.displayName="TableBody";var dcr=ee.forwardRef(({className:e,...t},r)=>(0,q.jsx)("tfoot",{ref:r,className:Ae("moonui-theme","bg-primary text-primary-foreground font-medium",e),...t}));dcr.displayName="TableFooter";var fcr=ee.forwardRef(({className:e,...t},r)=>(0,q.jsx)("tr",{ref:r,className:Ae("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));fcr.displayName="TableRow";var pcr=ee.forwardRef(({className:e,sortable:t,sorted:r,onSort:n,children:o,...a},i)=>{let s=()=>t?r==="asc"?(0,q.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,q.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,q.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,q.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,q.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,q.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;return(0,q.jsx)("th",{ref:i,className:Ae("h-10 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",t&&"cursor-pointer hover:text-foreground select-none",e),onClick:t?n:void 0,...a,children:(0,q.jsxs)("div",{className:"flex items-center",children:[o,t&&s()]})})});pcr.displayName="TableHead";var mcr=ee.forwardRef(({className:e,...t},r)=>(0,q.jsx)("td",{ref:r,className:Ae("moonui-theme","p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));mcr.displayName="TableCell";var hcr=ee.forwardRef(({className:e,...t},r)=>(0,q.jsx)("caption",{ref:r,className:Ae("moonui-theme","mt-4 text-sm text-muted-foreground",e),...t}));hcr.displayName="TableCaption";function gcr({mode:e="single",selected:t,onSelect:r,disabled:n,showOutsideDays:o=!1,className:a,classNames:i,numberOfMonths:s=1,defaultMonth:l,...c}){let[u,d]=ee.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(wJe(u,1))},m=()=>{d(e8(u,1))},h=C=>{if(!n?.(C)){if(e==="single")r?.(C);else if(e==="range"){let S=t;!S?.from||S.from&&S.to?r?.({from:C,to:void 0}):C<S.from?r?.({from:C,to:S.from}):r?.({from:S.from,to:C})}}},g=C=>{if(!t)return!1;if(e==="single")return B1(C,t);if(e==="range"){let S=t;return S.from&&S.to?C>=S.from&&C<=S.to:S.from?B1(C,S.from):!1}return!1},v=C=>{if(e!=="range"||!t)return!1;let S=t;return S.from?B1(C,S.from):!1},y=C=>{if(e!=="range"||!t)return!1;let S=t;return S.to?B1(C,S.to):!1},x=C=>{if(e!=="range"||!t)return!1;let S=t;return!S.from||!S.to?!1:C>S.from&&C<S.to},b=(()=>{let C=ZZe(u),S=QZe(u),P=n8({start:C,end:S}),N=Eue(C),T=[];if(N>0&&o){let F=hh(C),I=new Date(C);I.setDate(I.getDate()-1),T.push(...n8({start:F,end:I}))}let A=Eue(S),M=[];if(A<6&&o){let F=new Date(S);F.setDate(F.getDate()+1);let I=eJe(S);M.push(...n8({start:F,end:I}))}let O=[];if(!o&&N>0)for(let F=0;F<N;F++)O.push(null);return[...T,...O,...P,...M]})();return(0,q.jsxs)("div",{className:Ae("moonui-theme","p-0",a),children:[(0,q.jsxs)("div",{className:"flex items-center justify-between px-6 py-4 border-b border-border/50 dark:border-gray-700/50",children:[(0,q.jsx)("button",{onClick:p,className:Ae("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,q.jsx)(tM,{className:"h-5 w-5"})}),(0,q.jsx)("h2",{className:"text-base font-medium",children:Lue(u,"MMMM yyyy")}),(0,q.jsx)("button",{onClick:m,className:Ae("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,q.jsx)($0,{className:"h-5 w-5"})})]}),(0,q.jsxs)("div",{className:"px-6 pb-4",children:[(0,q.jsx)("div",{className:"grid grid-cols-7 mb-2",children:f.map((C,S)=>(0,q.jsx)("div",{className:"text-muted-foreground text-xs font-medium h-10 flex items-center justify-center",title:C.full,children:C.short},`weekday-${S}`))}),(0,q.jsx)("div",{className:"grid grid-cols-7 gap-1",children:b.map((C,S)=>{if(!C)return(0,q.jsx)("div",{className:"h-10 w-10"},`empty-${S}`);let P=!xJe(C,u),N=n?.(C)||!1,T=g(C),A=bJe(C),M=v(C),O=y(C),F=x(C);return(0,q.jsx)("button",{onClick:()=>h(C),disabled:N,className:Ae("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",P&&"text-muted-foreground/50",N&&"text-muted-foreground/30 cursor-not-allowed hover:bg-transparent",T&&!F&&"bg-primary text-primary-foreground font-medium hover:bg-primary hover:text-primary-foreground",A&&"font-semibold relative after:absolute after:bottom-1 after:left-1/2 after:-translate-x-1/2 after:h-1 after:w-1 after:rounded-full after:bg-primary",F&&"bg-accent/30 text-accent-foreground rounded-none",M&&"rounded-r-none",O&&"rounded-l-none"),type:"button",children:Lue(C,"d")},C.toISOString())})})]})]})}gcr.displayName="Calendar";var lXn=Hn("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"}});var vcr=ee.forwardRef(({className:e,inset:t,children:r,...n},o)=>(0,q.jsxs)(Que,{ref:o,className:Ae("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),...n,children:[r,(0,q.jsx)($0,{className:"ml-auto h-4 w-4"})]}));vcr.displayName=Que.displayName;var ycr=ee.forwardRef(({className:e,...t},r)=>(0,q.jsx)(Zue,{ref:r,className:Ae("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}));ycr.displayName=Zue.displayName;var xcr=ee.forwardRef(({className:e,sideOffset:t=4,...r},n)=>(0,q.jsx)(wet,{children:(0,q.jsx)($ue,{ref:n,sideOffset:t,className:Ae("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})}));xcr.displayName=$ue.displayName;var bcr=ee.forwardRef(({className:e,inset:t,...r},n)=>(0,q.jsx)(Wue,{ref:n,className:Ae("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}));bcr.displayName=Wue.displayName;var wcr=ee.forwardRef(({className:e,children:t,checked:r,...n},o)=>(0,q.jsxs)(Gue,{ref:o,className:Ae("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,...n,children:[(0,q.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,q.jsx)(Xue,{children:(0,q.jsx)(Ky,{className:"h-4 w-4"})})}),t]}));wcr.displayName=Gue.displayName;var Ccr=ee.forwardRef(({className:e,children:t,...r},n)=>(0,q.jsxs)(Kue,{ref:n,className:Ae("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,q.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,q.jsx)(Xue,{children:(0,q.jsx)(rM,{className:"h-2 w-2 fill-current"})})}),t]}));Ccr.displayName=Kue.displayName;var Scr=ee.forwardRef(({className:e,inset:t,...r},n)=>(0,q.jsx)(que,{ref:n,className:Ae("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...r}));Scr.displayName=que.displayName;var Pcr=ee.forwardRef(({className:e,...t},r)=>(0,q.jsx)(Yue,{ref:r,className:Ae("moonui-theme","-mx-1 my-1 h-px bg-muted",e),...t}));Pcr.displayName=Yue.displayName;var Icr=({className:e,...t})=>(0,q.jsx)("span",{className:Ae("moonui-theme","ml-auto text-xs tracking-widest opacity-60",e),...t});Icr.displayName="DropdownMenuShortcut";var kcr=Hn("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"}}),Rcr=Hn("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"}}),brt=ee.forwardRef(({className:e,value:t=0,variant:r,size:n,radius:o,animation:a,indicatorVariant:i,showValueLabel:s=!1,valueLabel:l,labelClassName:c,indeterminate:u=!1,max:d=100,...f},p)=>{let m=Math.max(0,Math.min(t,d)),h=d>0?m/d*100:0,g=l||`${Math.round(h)}%`;return(0,q.jsxs)(q.Fragment,{children:[s&&(0,q.jsx)("div",{className:"flex justify-between items-center mb-1",children:(0,q.jsx)("span",{className:Ae("text-sm font-medium text-muted-foreground",c),children:g})}),(0,q.jsx)("div",{ref:p,className:Ae("moonui-theme",kcr({variant:r,size:n,radius:o,animation:a}),e),role:"progressbar","aria-valuemin":0,"aria-valuemax":d,"aria-valuenow":u?void 0:m,...f,children:(0,q.jsx)("div",{className:Ae(Rcr({variant:i||"primary",animation:a}),u&&"animate-indeterminate-progress"),style:u?{}:{transform:`translateX(-${100-h}%)`}})})]})});brt.displayName="Progress";var Ncr=e=>e.startsWith("image/")?(0,q.jsx)(nM,{className:"h-4 w-4"}):e.startsWith("video/")?(0,q.jsx)(A_,{className:"h-4 w-4"}):e.startsWith("audio/")?(0,q.jsx)(w_,{className:"h-4 w-4"}):e.includes("text")||e.includes("document")?(0,q.jsx)(m_,{className:"h-4 w-4"}):(0,q.jsx)(h_,{className:"h-4 w-4"}),jde=e=>{if(e===0)return"0 Bytes";let t=1024,r=["Bytes","KB","MB","GB"],n=Math.floor(Math.log(e)/Math.log(t));return parseFloat((e/Math.pow(t,n)).toFixed(2))+" "+r[n]},Mcr=({uploadedFile:e,onRemove:t})=>{let{id:r,file:n,progress:o,status:a,preview:i}=e;return(0,q.jsxs)(Ad.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,q.jsx)("div",{className:"flex-shrink-0",children:i?(0,q.jsx)("img",{src:i,alt:n.name,className:"h-10 w-10 object-cover rounded"}):(0,q.jsx)("div",{className:"h-10 w-10 rounded bg-muted flex items-center justify-center",children:Ncr(n.type)})}),(0,q.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,q.jsxs)("div",{className:"flex items-center justify-between",children:[(0,q.jsx)("p",{className:"text-sm font-medium truncate",children:n.name}),(0,q.jsx)(I8,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0",onClick:()=>t(r),children:(0,q.jsx)(Yy,{className:"h-3 w-3"})})]}),(0,q.jsxs)("div",{className:"flex items-center space-x-2 mt-1",children:[(0,q.jsx)("p",{className:"text-xs text-muted-foreground",children:jde(n.size)}),a==="uploading"&&(0,q.jsxs)(C8,{variant:"secondary",className:"h-5",children:[(0,q.jsx)(Ef,{className:"h-3 w-3 mr-1 animate-spin"}),"Uploading"]}),a==="success"&&(0,q.jsxs)(C8,{variant:"success",className:"h-5",children:[(0,q.jsx)(q0,{className:"h-3 w-3 mr-1"}),"Done"]}),a==="error"&&(0,q.jsxs)(C8,{variant:"destructive",className:"h-5",children:[(0,q.jsx)(Jg,{className:"h-3 w-3 mr-1"}),"Error"]})]}),a==="uploading"&&(0,q.jsx)("div",{className:"mt-2",children:(0,q.jsx)(brt,{value:o,className:"h-1"})})]})]})},Tcr=Bn.default.forwardRef(({accept:e="*",multiple:t=!0,maxSize:r=10*1024*1024,maxFiles:n=5,disabled:o=!1,className:a,onUpload:i,onRemove:s,children:l,...c},u)=>{let[d,f]=(0,Bn.useState)([]),[p,m]=(0,Bn.useState)(!1),[h,g]=(0,Bn.useState)(null),v=P=>P.size>r?`File size exceeds ${jde(r)}`:e!=="*"&&!e.split(",").some(N=>{let T=N.trim();return T.includes("*")?P.type.startsWith(T.replace("*","")):P.type===T})?"File type not supported":null,y=(0,Bn.useCallback)(async P=>{let N=Array.from(P);if(g(null),d.length+N.length>n){g(`Maximum ${n} files allowed`);return}let T=[],A=[];if(N.forEach(O=>{let F=v(O);F?A.push(`${O.name}: ${F}`):T.push(O)}),A.length>0){g(A.join(", "));return}let M=T.map((O,F)=>({id:`${Date.now()}-${F}-${O.name.replace(/[^a-zA-Z0-9]/g,"")}`,file:O,progress:0,status:"uploading",preview:O.type.startsWith("image/")?URL.createObjectURL(O):void 0}));f(O=>[...O,...M]);for(let O of M){let F=0,I=setInterval(()=>{F+=15+O.file.size%10,F>=100?(F=100,clearInterval(I),f(k=>k.map(R=>R.id===O.id?{...R,progress:100,status:"success"}:R))):f(k=>k.map(R=>R.id===O.id?{...R,progress:F}:R))},200)}if(i)try{await i(T)}catch(O){console.error("Upload failed:",O),f(F=>F.map(I=>M.some(k=>k.id===I.id)?{...I,status:"error"}:I))}},[d.length,n,r,e,i]),x=(0,Bn.useCallback)(P=>{if(P.preventDefault(),m(!1),o)return;let N=P.dataTransfer.files;N.length>0&&y(N)},[y,o]),w=(0,Bn.useCallback)(P=>{P.preventDefault(),o||m(!0)},[o]),b=(0,Bn.useCallback)(P=>{P.preventDefault(),m(!1)},[]),C=(0,Bn.useCallback)(P=>{let N=P.target.files;N&&N.length>0&&y(N),P.target.value=""},[y]),S=(0,Bn.useCallback)(P=>{f(N=>{let T=N.find(A=>A.id===P);return T?.preview&&URL.revokeObjectURL(T.preview),N.filter(A=>A.id!==P)}),s&&s(P)},[s]);return(0,q.jsxs)("div",{ref:u,className:Ae("moonui-theme","space-y-4",a),...c,children:[(0,q.jsxs)(Ad.div,{className:Ae("relative border-2 border-dashed rounded-lg p-8 text-center transition-colors",p&&"border-primary bg-primary/5",o&&"opacity-50 cursor-not-allowed",!o&&"hover:border-primary/50 cursor-pointer"),onDrop:x,onDragOver:w,onDragLeave:b,animate:{scale:p?1.02:1,borderColor:p?"hsl(var(--primary))":"hsl(var(--border))"},children:[(0,q.jsx)("input",{type:"file",accept:e,multiple:t,disabled:o,onChange:C,className:"absolute inset-0 w-full h-full opacity-0 cursor-pointer"}),l||(0,q.jsxs)("div",{className:"space-y-4",children:[(0,q.jsx)("div",{className:"mx-auto h-12 w-12 text-muted-foreground",children:(0,q.jsx)(T_,{className:"h-full w-full"})}),(0,q.jsxs)("div",{children:[(0,q.jsx)("p",{className:"text-lg font-medium",children:p?"Drop files here":"Upload files"}),(0,q.jsx)("p",{className:"text-sm text-muted-foreground",children:"Drag & drop files here, or click to select"}),(0,q.jsxs)("p",{className:"text-xs text-muted-foreground mt-2",children:["Max ",n," files, ",jde(r)," each"]})]}),(0,q.jsx)(I8,{variant:"outline",disabled:o,children:"Select Files"})]})]}),(0,q.jsx)(xF,{children:h&&(0,q.jsxs)(Ad.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,q.jsx)(Jg,{className:"h-4 w-4"}),(0,q.jsx)("span",{children:h})]})}),(0,q.jsx)(xF,{children:d.length>0&&(0,q.jsxs)(Ad.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:"space-y-2",children:[(0,q.jsxs)("h4",{className:"text-sm font-medium",children:["Uploaded Files (",d.length,")"]}),(0,q.jsx)("div",{className:"space-y-2",children:(0,q.jsx)(xF,{children:d.map(P=>(0,q.jsx)(Mcr,{uploadedFile:P,onRemove:S},P.id))})})]})})]})});Tcr.displayName="FileUpload";var Acr=Bn.default.forwardRef(({children:e,isOpen:t,onOpenChange:r,direction:n="up",threshold:o=50,className:a,overlayClassName:i,enableSwipeToClose:s=!0,...l},c)=>{let u=VM(0),d=VM(0),f=n==="up"||n==="down",p=f?u:d,m=pue(p,[0,o],[1,.5]),h=(y,x)=>{if(!s)return;let w=f?x.offset.y:x.offset.x,b=f?x.velocity.y:x.velocity.x,C=!1;switch(n){case"up":C=w>o||b>500;break;case"down":C=w<-o||b<-500;break;case"left":C=w>o||b>500;break;case"right":C=w<-o||b<-500;break}C?r(!1):hue(p,0,{type:"spring",stiffness:300,damping:20})},g=()=>{switch(n){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,q.jsxs)("div",{className:"fixed inset-0 z-50",children:[(0,q.jsx)(Ad.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:()=>r(!1),className:Ae("absolute inset-0 bg-black/50",i)}),(0,q.jsxs)(Ad.div,{ref:c,drag:s?f?"y":"x":!1,dragConstraints:{top:n==="up"?0:void 0,bottom:n==="down"?0:void 0,left:n==="left"?0:void 0,right:n==="right"?0:void 0},dragElastic:.2,onDragEnd:h,style:{[f?"y":"x"]:p,opacity:m},initial:g(),animate:v(),exit:g(),transition:{type:"spring",damping:30,stiffness:300},className:Ae("absolute bg-background border shadow-lg",{"bottom-0 left-0 right-0 rounded-t-lg":n==="up","top-0 left-0 right-0 rounded-b-lg":n==="down","top-0 bottom-0 right-0 rounded-l-lg":n==="left","top-0 bottom-0 left-0 rounded-r-lg":n==="right"},a),...l,children:[(n==="up"||n==="down")&&(0,q.jsx)("div",{className:"flex justify-center p-2",children:(0,q.jsx)("div",{className:"w-12 h-1 bg-muted rounded-full"})}),e]})]}):null});Acr.displayName="GestureDrawer";var Lcr=({className:e,...t})=>(0,q.jsx)("nav",{role:"navigation","aria-label":"pagination",className:Ae("moonui-theme","mx-auto flex w-full justify-center",e),...t});Lcr.displayName="Pagination";var Ecr=ee.forwardRef(({className:e,...t},r)=>(0,q.jsx)("ul",{ref:r,className:Ae("moonui-theme","flex flex-row items-center gap-1",e),...t}));Ecr.displayName="PaginationContent";var Dcr=ee.forwardRef(({className:e,...t},r)=>(0,q.jsx)("li",{ref:r,className:Ae("moonui-theme","",e),...t}));Dcr.displayName="PaginationItem";var Xde=({className:e,isActive:t,size:r="icon",...n})=>(0,q.jsx)("a",{"aria-current":t?"page":void 0,className:Ae(Ztt({variant:t?"outline":"ghost",size:r}),e),...n});Xde.displayName="PaginationLink";var Ocr=({className:e,...t})=>(0,q.jsxs)(Xde,{"aria-label":"Go to previous page",size:"md",className:Ae("moonui-theme","gap-1 pl-2.5",e),...t,children:[(0,q.jsx)(tM,{className:"h-4 w-4"}),(0,q.jsx)("span",{children:"Previous"})]});Ocr.displayName="PaginationPrevious";var _cr=({className:e,...t})=>(0,q.jsxs)(Xde,{"aria-label":"Go to next page",size:"md",className:Ae("moonui-theme","gap-1 pr-2.5",e),...t,children:[(0,q.jsx)("span",{children:"Next"}),(0,q.jsx)($0,{className:"h-4 w-4"})]});_cr.displayName="PaginationNext";var Fcr=({className:e,...t})=>(0,q.jsxs)("span",{"aria-hidden":!0,className:Ae("moonui-theme","flex h-9 w-9 items-center justify-center",e),...t,children:[(0,q.jsx)(Xy,{className:"h-4 w-4"}),(0,q.jsx)("span",{className:"sr-only",children:"More pages"})]});Fcr.displayName="PaginationEllipsis";var Yde=Qet;Yde.displayName="Select";var wrt=Zet,Qde=ee.forwardRef(({className:e,children:t,variant:r="standard",size:n="md",error:o,success:a,loading:i,leftIcon:s,rightIcon:l,...c},u)=>(0,q.jsxs)(sde,{ref:u,className:Ae("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",o&&"border-error focus-visible:ring-error/30 focus-visible:border-error",a&&"border-success focus-visible:ring-success/30 focus-visible:border-success",n==="sm"&&"h-8 text-xs px-2",n==="md"&&"h-10 text-sm px-3",n==="lg"&&"h-12 text-base px-4",r==="standard"&&"border border-gray-300 dark:border-gray-700 bg-background dark:bg-gray-900 hover:border-gray-400 dark:hover:border-gray-600 focus-visible:ring-2 focus-visible:ring-primary/30 dark:focus-visible:ring-primary/50 focus-visible:border-primary dark:focus-visible:border-primary",r==="outline"&&"border border-gray-300 dark:border-gray-700 bg-transparent hover:border-gray-400 dark:hover:border-gray-600 focus-visible:ring-2 focus-visible:ring-primary/30 dark:focus-visible:ring-primary/50 focus-visible:border-primary dark:focus-visible:border-primary",r==="ghost"&&"border-none bg-gray-100 dark:bg-gray-800 hover:bg-gray-200 dark:hover:bg-gray-700 focus-visible:ring-2 focus-visible:ring-primary/30 dark:focus-visible:ring-primary/50",r==="underline"&&"border-t-0 border-l-0 border-r-0 border-b border-gray-300 dark:border-gray-600 rounded-none px-0 hover:border-gray-400 dark:hover:border-gray-500 focus-visible:ring-0 focus-visible:border-b-2 focus-visible:border-primary dark:focus-visible:border-primary",e),...c,disabled:c.disabled||i,"data-error":o?!0:void 0,"data-success":a?!0:void 0,"data-loading":i?!0:void 0,children:[(0,q.jsxs)("div",{className:"flex items-center flex-1 gap-2",children:[s&&(0,q.jsx)("span",{className:"flex items-center justify-center text-gray-500 dark:text-gray-400",children:s}),i?(0,q.jsxs)("div",{className:"flex items-center gap-2",children:[(0,q.jsx)(Ef,{className:"h-3.5 w-3.5 animate-spin text-muted-foreground dark:text-gray-400"}),(0,q.jsx)("span",{className:"text-muted-foreground dark:text-gray-400",children:"Loading..."})]}):t]}),!i&&(0,q.jsx)(Jet,{asChild:!0,children:l?(0,q.jsx)("span",{className:"opacity-60",children:l}):(0,q.jsx)(j0,{className:"h-4 w-4 opacity-60 transition-transform duration-200 ease-out group-data-[state=open]:rotate-180"})})]}));Qde.displayName=sde.displayName;var Crt=ee.forwardRef(({className:e,...t},r)=>(0,q.jsx)(dde,{ref:r,className:Ae("flex cursor-default items-center justify-center py-1 text-muted-foreground hover:text-foreground transition-colors",e),...t,children:(0,q.jsx)(u_,{className:"h-4 w-4"})}));Crt.displayName=dde.displayName;var Srt=ee.forwardRef(({className:e,...t},r)=>(0,q.jsx)(fde,{ref:r,className:Ae("flex cursor-default items-center justify-center py-1 text-muted-foreground hover:text-foreground transition-colors",e),...t,children:(0,q.jsx)(j0,{className:"h-4 w-4"})}));Srt.displayName=fde.displayName;var Zde=ee.forwardRef(({className:e,children:t,position:r="popper",side:n="bottom",sideOffset:o=4,align:a="start",...i},s)=>(0,q.jsx)(ett,{children:(0,q.jsxs)(lde,{ref:s,side:n,sideOffset:o,align:a,avoidCollisions:!1,className:Ae(["relative z-50 max-h-96 min-w-[8rem] overflow-hidden","rounded-md border border-gray-200 dark:border-gray-700","bg-white dark:bg-gray-900 text-foreground","shadow-lg dark:shadow-gray-900/20","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","data-[state=open]:duration-150"],r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:r,...i,children:[(0,q.jsx)(Crt,{}),(0,q.jsx)(ttt,{className:Ae("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),(0,q.jsx)(Srt,{})]})}));Zde.displayName=lde.displayName;var Bcr=ee.forwardRef(({className:e,...t},r)=>(0,q.jsx)(cde,{ref:r,className:Ae("moonui-theme","py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));Bcr.displayName=cde.displayName;var tm=ee.forwardRef(({className:e,children:t,variant:r="default",size:n="md",rightIcon:o,customIndicator:a,...i},s)=>(0,q.jsxs)(ude,{ref:s,className:Ae("relative flex w-full cursor-default select-none items-center rounded-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",n==="sm"&&"py-1 pl-7 pr-2 text-xs",n==="md"&&"py-1.5 pl-8 pr-2 text-sm",n==="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,q.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,q.jsx)(ntt,{children:a||(0,q.jsx)(Ky,{className:"h-4 w-4"})})}),(0,q.jsx)(rtt,{children:t}),o&&(0,q.jsx)("span",{className:"ml-auto pl-2 opacity-70",children:o})]}));tm.displayName=ude.displayName;var Vcr=ee.forwardRef(({className:e,...t},r)=>(0,q.jsx)(pde,{ref:r,className:Ae("moonui-theme","-mx-1 my-1 h-px bg-muted dark:bg-gray-700",e),...t}));Vcr.displayName=pde.displayName;var Ucr=[{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"}],Gtt=(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 n="";for(let o=0;o<r.length;o++)o>0&&o%3===0&&(n+=" "),n+=r[o];return n}},zcr=e=>{switch(e){case"+1":return 10;case"+44":return 11;case"+90":return 10;default:return 15}},Hcr=ee.forwardRef(({className:e,value:t="",onChange:r,defaultCountry:n="+1",showIcon:o=!0,showCountrySelect:a=!0,countries:i=Ucr,size:s,...l},c)=>{let[u,d]=ee.useState(n),[f,p]=ee.useState(t),m=i.find(y=>y.code===u)||i[0],h=y=>{let x=y.target.value.replace(/\D/g,""),w=zcr(u),b=x.slice(0,w),C=Gtt(b,u);p(b),r?.(b,u),y.target.value=C},g=y=>{d(y),r?.(f,y)},v=Gtt(f,u);return(0,q.jsxs)("div",{className:Ae("relative flex gap-2",e),children:[a&&(0,q.jsxs)(Yde,{value:u,onValueChange:g,children:[(0,q.jsx)(Qde,{className:"w-[120px]",children:(0,q.jsx)(wrt,{children:(0,q.jsxs)("div",{className:"flex items-center gap-2",children:[(0,q.jsx)("span",{children:m.flag}),(0,q.jsx)("span",{children:m.code})]})})}),(0,q.jsx)(Zde,{children:i.map(y=>(0,q.jsx)(tm,{value:y.code,children:(0,q.jsxs)("div",{className:"flex items-center gap-2",children:[(0,q.jsx)("span",{children:y.flag}),(0,q.jsx)("span",{children:y.code}),(0,q.jsx)("span",{className:"text-muted-foreground",children:y.name})]})},y.code))})]}),(0,q.jsxs)("div",{className:"relative flex-1",children:[(0,q.jsx)(JM,{ref:c,type:"tel",inputMode:"numeric",autoComplete:"tel",placeholder:u==="+1"?"(555) 123-4567":"123 456 789",value:v,onChange:h,className:Ae(o&&"pl-10",e),...l}),o&&(0,q.jsx)(S_,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"})]})]})});Hcr.displayName="PhoneInput";var jcr=Hn("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"}}),Prt=ee.createContext({}),$cr=ee.forwardRef(({className:e,value:t,onValueChange:r,disabled:n,name:o,...a},i)=>(0,q.jsx)(Prt.Provider,{value:{value:t,onValueChange:r,disabled:n,name:o},children:(0,q.jsx)("div",{ref:i,role:"radiogroup",className:Ae("moonui-theme","grid gap-2",e),...a})}));$cr.displayName="RadioGroup";var Irt=ee.forwardRef(({className:e,variant:t,size:r,indicator:n,id:o,value:a,disabled:i,...s},l)=>{let c=ee.useContext(Prt),u=ee.useId(),d=o||u,f=c.value===a,p=m=>{c.onValueChange&&c.onValueChange(m.target.value),s.onChange&&s.onChange(m)};return(0,q.jsxs)("div",{className:"relative flex items-center",children:[(0,q.jsx)("input",{type:"radio",id:d,ref:l,value:a,checked:f,disabled:i||c.disabled,name:c.name,onChange:p,className:"sr-only",...s}),(0,q.jsx)("label",{htmlFor:d,className:Ae(jcr({variant:t,size:r}),"rounded-full","focus-visible:ring-primary/50","relative inline-flex shrink-0 cursor-pointer items-center justify-center overflow-hidden",i&&"cursor-not-allowed opacity-50",e),children:(0,q.jsx)("span",{className:Ae("absolute inset-0 pointer-events-none",f&&"flex items-center justify-center"),children:f&&(n||(0,q.jsx)(rM,{className:"h-[60%] w-[60%] fill-current text-current"}))})})]})});Irt.displayName="RadioGroupItem";var krt=ee.forwardRef(({className:e,htmlFor:t,children:r,disabled:n=!1,...o},a)=>(0,q.jsx)("label",{ref:a,htmlFor:t,className:Ae("text-sm font-medium leading-none ml-2 text-foreground",n&&"cursor-not-allowed opacity-70",e),...o,children:r}));krt.displayName="RadioLabel";var qcr=ee.forwardRef(({id:e,label:t,labelClassName:r,...n},o)=>{let a=ee.useId(),i=e||a;return(0,q.jsxs)("div",{className:"flex items-center",children:[(0,q.jsx)(Irt,{ref:o,id:i,...n}),(0,q.jsx)(krt,{htmlFor:i,disabled:n.disabled,className:r,children:t})]})});qcr.displayName="RadioItemWithLabel";function Wcr(e,t){return ee.useReducer((r,n)=>t[r][n]??r,e)}var $F=e=>{let{present:t,children:r}=e,n=Gcr(t),o=typeof r=="function"?r({present:n.isPresent}):ee.Children.only(r),a=G1(n.ref,Kcr(o));return typeof r=="function"||n.isPresent?ee.cloneElement(o,{ref:a}):null};$F.displayName="Presence";function Gcr(e){let[t,r]=ee.useState(),n=ee.useRef(null),o=ee.useRef(e),a=ee.useRef("none"),i=e?"mounted":"unmounted",[s,l]=Wcr(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return ee.useEffect(()=>{let c=w8(n.current);a.current=s==="mounted"?c:"none"},[s]),HF(()=>{let c=n.current,u=o.current;if(u!==e){let f=a.current,p=w8(c);e?l("MOUNT"):p==="none"||c?.display==="none"?l("UNMOUNT"):l(u&&f!==p?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),HF(()=>{if(t){let c,u=t.ownerDocument.defaultView??window,d=p=>{let h=w8(n.current).includes(CSS.escape(p.animationName));if(p.target===t&&h&&(l("ANIMATION_END"),!o.current)){let g=t.style.animationFillMode;t.style.animationFillMode="forwards",c=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},f=p=>{p.target===t&&(a.current=w8(n.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{u.clearTimeout(c),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:ee.useCallback(c=>{n.current=c?getComputedStyle(c):null,r(c)},[])}}function w8(e){return e?.animationName||"none"}function Kcr(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 Xcr(e,t=[]){let r=[];function n(a,i){let s=ee.createContext(i),l=r.length;r=[...r,i];let c=d=>{let{scope:f,children:p,...m}=d,h=f?.[e]?.[l]||s,g=ee.useMemo(()=>m,Object.values(m));return(0,q.jsx)(h.Provider,{value:g,children:p})};c.displayName=a+"Provider";function u(d,f){let p=f?.[e]?.[l]||s,m=ee.useContext(p);if(m)return m;if(i!==void 0)return i;throw new Error(`\`${d}\` must be used within \`${a}\``)}return[c,u]}let o=()=>{let a=r.map(i=>ee.createContext(i));return function(s){let l=s?.[e]||a;return ee.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return o.scopeName=e,[n,Ycr(o,...t)]}function Ycr(...e){let t=e[0];if(e.length===1)return t;let r=()=>{let n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(a){let i=n.reduce((s,{useScope:l,scopeName:c})=>{let d=l(a)[`__scope${c}`];return{...s,...d}},{});return ee.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return r.scopeName=t.scopeName,r}function $1(e){let t=ee.useRef(e);return ee.useEffect(()=>{t.current=e}),ee.useMemo(()=>(...r)=>t.current?.(...r),[])}var Qcr=ee.createContext(void 0);function Zcr(e){let t=ee.useContext(Qcr);return e||t||"ltr"}function Jcr(e,[t,r]){return Math.min(r,Math.max(t,e))}function hw(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e?.(o),r===!1||!o.defaultPrevented)return t?.(o)}}function eur(e,t){return ee.useReducer((r,n)=>t[r][n]??r,e)}var Jde="ScrollArea",[Rrt,cXn]=Xcr(Jde),[tur,rm]=Rrt(Jde),Nrt=ee.forwardRef((e,t)=>{let{__scopeScrollArea:r,type:n="hover",dir:o,scrollHideDelay:a=600,...i}=e,[s,l]=ee.useState(null),[c,u]=ee.useState(null),[d,f]=ee.useState(null),[p,m]=ee.useState(null),[h,g]=ee.useState(null),[v,y]=ee.useState(0),[x,w]=ee.useState(0),[b,C]=ee.useState(!1),[S,P]=ee.useState(!1),N=G1(t,A=>l(A)),T=Zcr(o);return(0,q.jsx)(tur,{scope:r,type:n,dir:T,scrollHideDelay:a,scrollArea:s,viewport:c,onViewportChange:u,content:d,onContentChange:f,scrollbarX:p,onScrollbarXChange:m,scrollbarXEnabled:b,onScrollbarXEnabledChange:C,scrollbarY:h,onScrollbarYChange:g,scrollbarYEnabled:S,onScrollbarYEnabledChange:P,onCornerWidthChange:y,onCornerHeightChange:w,children:(0,q.jsx)(Ld.div,{dir:T,...i,ref:N,style:{position:"relative",["--radix-scroll-area-corner-width"]:v+"px",["--radix-scroll-area-corner-height"]:x+"px",...e.style}})})});Nrt.displayName=Jde;var Mrt="ScrollAreaViewport",Trt=ee.forwardRef((e,t)=>{let{__scopeScrollArea:r,children:n,nonce:o,...a}=e,i=rm(Mrt,r),s=ee.useRef(null),l=G1(t,s,i.onViewportChange);return(0,q.jsxs)(q.Fragment,{children:[(0,q.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:o}),(0,q.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,q.jsx)("div",{ref:i.onContentChange,style:{minWidth:"100%",display:"table"},children:n})})]})});Trt.displayName=Mrt;var sv="ScrollAreaScrollbar",efe=ee.forwardRef((e,t)=>{let{forceMount:r,...n}=e,o=rm(sv,e.__scopeScrollArea),{onScrollbarXEnabledChange:a,onScrollbarYEnabledChange:i}=o,s=e.orientation==="horizontal";return ee.useEffect(()=>(s?a(!0):i(!0),()=>{s?a(!1):i(!1)}),[s,a,i]),o.type==="hover"?(0,q.jsx)(rur,{...n,ref:t,forceMount:r}):o.type==="scroll"?(0,q.jsx)(nur,{...n,ref:t,forceMount:r}):o.type==="auto"?(0,q.jsx)(Art,{...n,ref:t,forceMount:r}):o.type==="always"?(0,q.jsx)(tfe,{...n,ref:t}):null});efe.displayName=sv;var rur=ee.forwardRef((e,t)=>{let{forceMount:r,...n}=e,o=rm(sv,e.__scopeScrollArea),[a,i]=ee.useState(!1);return ee.useEffect(()=>{let s=o.scrollArea,l=0;if(s){let c=()=>{window.clearTimeout(l),i(!0)},u=()=>{l=window.setTimeout(()=>i(!1),o.scrollHideDelay)};return s.addEventListener("pointerenter",c),s.addEventListener("pointerleave",u),()=>{window.clearTimeout(l),s.removeEventListener("pointerenter",c),s.removeEventListener("pointerleave",u)}}},[o.scrollArea,o.scrollHideDelay]),(0,q.jsx)($F,{present:r||a,children:(0,q.jsx)(Art,{"data-state":a?"visible":"hidden",...n,ref:t})})}),nur=ee.forwardRef((e,t)=>{let{forceMount:r,...n}=e,o=rm(sv,e.__scopeScrollArea),a=e.orientation==="horizontal",i=M8(()=>l("SCROLL_END"),100),[s,l]=eur("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 ee.useEffect(()=>{if(s==="idle"){let c=window.setTimeout(()=>l("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(c)}},[s,o.scrollHideDelay,l]),ee.useEffect(()=>{let c=o.viewport,u=a?"scrollLeft":"scrollTop";if(c){let d=c[u],f=()=>{let p=c[u];d!==p&&(l("SCROLL"),i()),d=p};return c.addEventListener("scroll",f),()=>c.removeEventListener("scroll",f)}},[o.viewport,a,l,i]),(0,q.jsx)($F,{present:r||s!=="hidden",children:(0,q.jsx)(tfe,{"data-state":s==="hidden"?"hidden":"visible",...n,ref:t,onPointerEnter:hw(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:hw(e.onPointerLeave,()=>l("POINTER_LEAVE"))})})}),Art=ee.forwardRef((e,t)=>{let r=rm(sv,e.__scopeScrollArea),{forceMount:n,...o}=e,[a,i]=ee.useState(!1),s=e.orientation==="horizontal",l=M8(()=>{if(r.viewport){let c=r.viewport.offsetWidth<r.viewport.scrollWidth,u=r.viewport.offsetHeight<r.viewport.scrollHeight;i(s?c:u)}},10);return ZM(r.viewport,l),ZM(r.content,l),(0,q.jsx)($F,{present:n||a,children:(0,q.jsx)(tfe,{"data-state":a?"visible":"hidden",...o,ref:t})})}),tfe=ee.forwardRef((e,t)=>{let{orientation:r="vertical",...n}=e,o=rm(sv,e.__scopeScrollArea),a=ee.useRef(null),i=ee.useRef(0),[s,l]=ee.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),c=_rt(s.viewport,s.content),u={...n,sizes:s,onSizesChange:l,hasThumb:c>0&&c<1,onThumbChange:f=>a.current=f,onThumbPointerUp:()=>i.current=0,onThumbPointerDown:f=>i.current=f};function d(f,p){return cur(f,i.current,s,p)}return r==="horizontal"?(0,q.jsx)(our,{...u,ref:t,onThumbPositionChange:()=>{if(o.viewport&&a.current){let f=o.viewport.scrollLeft,p=Ktt(f,s,o.dir);a.current.style.transform=`translate3d(${p}px, 0, 0)`}},onWheelScroll:f=>{o.viewport&&(o.viewport.scrollLeft=f)},onDragScroll:f=>{o.viewport&&(o.viewport.scrollLeft=d(f,o.dir))}}):r==="vertical"?(0,q.jsx)(aur,{...u,ref:t,onThumbPositionChange:()=>{if(o.viewport&&a.current){let f=o.viewport.scrollTop,p=Ktt(f,s);a.current.style.transform=`translate3d(0, ${p}px, 0)`}},onWheelScroll:f=>{o.viewport&&(o.viewport.scrollTop=f)},onDragScroll:f=>{o.viewport&&(o.viewport.scrollTop=d(f))}}):null}),our=ee.forwardRef((e,t)=>{let{sizes:r,onSizesChange:n,...o}=e,a=rm(sv,e.__scopeScrollArea),[i,s]=ee.useState(),l=ee.useRef(null),c=G1(t,l,a.onScrollbarXChange);return ee.useEffect(()=>{l.current&&s(getComputedStyle(l.current))},[l]),(0,q.jsx)(Ert,{"data-orientation":"horizontal",...o,ref:c,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"]:N8(r)+"px",...e.style},onThumbPointerDown:u=>e.onThumbPointerDown(u.x),onDragScroll:u=>e.onDragScroll(u.x),onWheelScroll:(u,d)=>{if(a.viewport){let f=a.viewport.scrollLeft+u.deltaX;e.onWheelScroll(f),Brt(f,d)&&u.preventDefault()}},onResize:()=>{l.current&&a.viewport&&i&&n({content:a.viewport.scrollWidth,viewport:a.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:P8(i.paddingLeft),paddingEnd:P8(i.paddingRight)}})}})}),aur=ee.forwardRef((e,t)=>{let{sizes:r,onSizesChange:n,...o}=e,a=rm(sv,e.__scopeScrollArea),[i,s]=ee.useState(),l=ee.useRef(null),c=G1(t,l,a.onScrollbarYChange);return ee.useEffect(()=>{l.current&&s(getComputedStyle(l.current))},[l]),(0,q.jsx)(Ert,{"data-orientation":"vertical",...o,ref:c,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"]:N8(r)+"px",...e.style},onThumbPointerDown:u=>e.onThumbPointerDown(u.y),onDragScroll:u=>e.onDragScroll(u.y),onWheelScroll:(u,d)=>{if(a.viewport){let f=a.viewport.scrollTop+u.deltaY;e.onWheelScroll(f),Brt(f,d)&&u.preventDefault()}},onResize:()=>{l.current&&a.viewport&&i&&n({content:a.viewport.scrollHeight,viewport:a.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:P8(i.paddingTop),paddingEnd:P8(i.paddingBottom)}})}})}),[iur,Lrt]=Rrt(sv),Ert=ee.forwardRef((e,t)=>{let{__scopeScrollArea:r,sizes:n,hasThumb:o,onThumbChange:a,onThumbPointerUp:i,onThumbPointerDown:s,onThumbPositionChange:l,onDragScroll:c,onWheelScroll:u,onResize:d,...f}=e,p=rm(sv,r),[m,h]=ee.useState(null),g=G1(t,N=>h(N)),v=ee.useRef(null),y=ee.useRef(""),x=p.viewport,w=n.content-n.viewport,b=$1(u),C=$1(l),S=M8(d,10);function P(N){if(v.current){let T=N.clientX-v.current.left,A=N.clientY-v.current.top;c({x:T,y:A})}}return ee.useEffect(()=>{let N=T=>{let A=T.target;m?.contains(A)&&b(T,w)};return document.addEventListener("wheel",N,{passive:!1}),()=>document.removeEventListener("wheel",N,{passive:!1})},[x,m,w,b]),ee.useEffect(C,[n,C]),ZM(m,S),ZM(p.content,S),(0,q.jsx)(iur,{scope:r,scrollbar:m,hasThumb:o,onThumbChange:$1(a),onThumbPointerUp:$1(i),onThumbPositionChange:C,onThumbPointerDown:$1(s),children:(0,q.jsx)(Ld.div,{...f,ref:g,style:{position:"absolute",...f.style},onPointerDown:hw(e.onPointerDown,N=>{N.button===0&&(N.target.setPointerCapture(N.pointerId),v.current=m.getBoundingClientRect(),y.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",p.viewport&&(p.viewport.style.scrollBehavior="auto"),P(N))}),onPointerMove:hw(e.onPointerMove,P),onPointerUp:hw(e.onPointerUp,N=>{let T=N.target;T.hasPointerCapture(N.pointerId)&&T.releasePointerCapture(N.pointerId),document.body.style.webkitUserSelect=y.current,p.viewport&&(p.viewport.style.scrollBehavior=""),v.current=null})})})}),S8="ScrollAreaThumb",Drt=ee.forwardRef((e,t)=>{let{forceMount:r,...n}=e,o=Lrt(S8,e.__scopeScrollArea);return(0,q.jsx)($F,{present:r||o.hasThumb,children:(0,q.jsx)(sur,{ref:t,...n})})}),sur=ee.forwardRef((e,t)=>{let{__scopeScrollArea:r,style:n,...o}=e,a=rm(S8,r),i=Lrt(S8,r),{onThumbPositionChange:s}=i,l=G1(t,d=>i.onThumbChange(d)),c=ee.useRef(void 0),u=M8(()=>{c.current&&(c.current(),c.current=void 0)},100);return ee.useEffect(()=>{let d=a.viewport;if(d){let f=()=>{if(u(),!c.current){let p=uur(d,s);c.current=p,s()}};return s(),d.addEventListener("scroll",f),()=>d.removeEventListener("scroll",f)}},[a.viewport,u,s]),(0,q.jsx)(Ld.div,{"data-state":i.hasThumb?"visible":"hidden",...o,ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...n},onPointerDownCapture:hw(e.onPointerDownCapture,d=>{let p=d.target.getBoundingClientRect(),m=d.clientX-p.left,h=d.clientY-p.top;i.onThumbPointerDown({x:m,y:h})}),onPointerUp:hw(e.onPointerUp,i.onThumbPointerUp)})});Drt.displayName=S8;var rfe="ScrollAreaCorner",Ort=ee.forwardRef((e,t)=>{let r=rm(rfe,e.__scopeScrollArea),n=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&n?(0,q.jsx)(lur,{...e,ref:t}):null});Ort.displayName=rfe;var lur=ee.forwardRef((e,t)=>{let{__scopeScrollArea:r,...n}=e,o=rm(rfe,r),[a,i]=ee.useState(0),[s,l]=ee.useState(0),c=!!(a&&s);return ZM(o.scrollbarX,()=>{let u=o.scrollbarX?.offsetHeight||0;o.onCornerHeightChange(u),l(u)}),ZM(o.scrollbarY,()=>{let u=o.scrollbarY?.offsetWidth||0;o.onCornerWidthChange(u),i(u)}),c?(0,q.jsx)(Ld.div,{...n,ref:t,style:{width:a,height:s,position:"absolute",right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function P8(e){return e?parseInt(e,10):0}function _rt(e,t){let r=e/t;return isNaN(r)?0:r}function N8(e){let t=_rt(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=(e.scrollbar.size-r)*t;return Math.max(n,18)}function cur(e,t,r,n="ltr"){let o=N8(r),a=o/2,i=t||a,s=o-i,l=r.scrollbar.paddingStart+i,c=r.scrollbar.size-r.scrollbar.paddingEnd-s,u=r.content-r.viewport,d=n==="ltr"?[0,u]:[u*-1,0];return Frt([l,c],d)(e)}function Ktt(e,t,r="ltr"){let n=N8(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-o,i=t.content-t.viewport,s=a-n,l=r==="ltr"?[0,i]:[i*-1,0],c=Jcr(e,l);return Frt([0,i],[0,s])(c)}function Frt(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}function Brt(e,t){return e>0&&e<t}var uur=(e,t=()=>{})=>{let r={left:e.scrollLeft,top:e.scrollTop},n=0;return function o(){let a={left:e.scrollLeft,top:e.scrollTop},i=r.left!==a.left,s=r.top!==a.top;(i||s)&&t(),r=a,n=window.requestAnimationFrame(o)}(),()=>window.cancelAnimationFrame(n)};function M8(e,t){let r=$1(e),n=ee.useRef(0);return ee.useEffect(()=>()=>window.clearTimeout(n.current),[]),ee.useCallback(()=>{window.clearTimeout(n.current),n.current=window.setTimeout(r,t)},[r,t])}function ZM(e,t){let r=$1(t);HF(()=>{let n=0;if(e){let o=new ResizeObserver(()=>{cancelAnimationFrame(n),n=window.requestAnimationFrame(r)});return o.observe(e),()=>{window.cancelAnimationFrame(n),o.unobserve(e)}}},[e,r])}var Vrt=Nrt,dur=Trt,fur=Ort,pur=ee.forwardRef(({className:e,children:t,...r},n)=>(0,q.jsxs)(Vrt,{ref:n,className:Ae("relative overflow-hidden",e),...r,children:[(0,q.jsx)(dur,{className:"h-full w-full rounded-[inherit]",children:t}),(0,q.jsx)(Urt,{}),(0,q.jsx)(fur,{})]}));pur.displayName=Vrt.displayName;var Urt=ee.forwardRef(({className:e,orientation:t="vertical",...r},n)=>(0,q.jsx)(efe,{ref:n,orientation:t,className:Ae("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,q.jsx)(Drt,{className:"relative flex-1 rounded-full bg-border"})}));Urt.displayName=efe.displayName;var mur=Hn("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"}}),iv=ee.forwardRef(({className:e,orientation:t="horizontal",variant:r="default",size:n="md",decorative:o=!0,...a},i)=>(0,q.jsx)(mde,{ref:i,decorative:o,orientation:t||void 0,className:Ae(mur({orientation:t,variant:r,size:n}),e),...a}));iv.displayName=mde.displayName;var hur=ee[" useInsertionEffect ".trim().toString()]||HF;function gur({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){let[o,a,i]=vur({defaultProp:t,onChange:r}),s=e!==void 0,l=s?e:o;{let u=ee.useRef(e!==void 0);ee.useEffect(()=>{let d=u.current;d!==s&&console.warn(`${n} 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.`),u.current=s},[s,n])}let c=ee.useCallback(u=>{if(s){let d=yur(u)?u(e):u;d!==e&&i.current?.(d)}else a(u)},[s,e,a,i]);return[l,c]}function vur({defaultProp:e,onChange:t}){let[r,n]=ee.useState(e),o=ee.useRef(r),a=ee.useRef(t);return hur(()=>{a.current=t},[t]),ee.useEffect(()=>{o.current!==r&&(a.current?.(r),o.current=r)},[r,o]),[r,n,a]}function yur(e){return typeof e=="function"}var zrt="Toggle",Hrt=ee.forwardRef((e,t)=>{let{pressed:r,defaultPressed:n,onPressedChange:o,...a}=e,[i,s]=gur({prop:r,onChange:o,defaultProp:n??!1,caller:zrt});return(0,q.jsx)(Ld.button,{type:"button","aria-pressed":i,"data-state":i?"on":"off","data-disabled":e.disabled?"":void 0,...a,ref:t,onClick:hw(e.onClick,()=>{e.disabled||s(!i)})})});Hrt.displayName=zrt;var jrt=Hrt,xur=Hn("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"}}),$rt=ee.forwardRef(({className:e,variant:t,size:r,...n},o)=>(0,q.jsx)(jrt,{ref:o,className:Ae("moonui-theme",xur({variant:t,size:r,className:e})),...n}));$rt.displayName=jrt.displayName;var bur=gtt,wur=Hn("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"}}),qrt=vtt,Wrt=ytt,Grt=ee.forwardRef(({className:e,...t},r)=>(0,q.jsx)(bde,{ref:r,className:Ae("moonui-theme","fill-current",e),...t}));Grt.displayName=bde.displayName;var nfe=ee.forwardRef(({className:e,variant:t,size:r,showArrow:n=!1,sideOffset:o=4,...a},i)=>(0,q.jsxs)(xde,{ref:i,sideOffset:o,className:Ae("moonui-theme",wur({variant:t,size:r}),e),...a,children:[a.children,n&&(0,q.jsx)(Grt,{})]}));nfe.displayName=xde.displayName;var Cur=ee.forwardRef(({children:e,content:t,variant:r="default",size:n="md",side:o="top",align:a="center",delayDuration:i=400,sideOffset:s=4,showArrow:l=!1,className:c,open:u,defaultOpen:d,onOpenChange:f,...p},m)=>(0,q.jsxs)(qrt,{open:u,defaultOpen:d,onOpenChange:f,delayDuration:i,children:[(0,q.jsx)(Wrt,{asChild:!0,children:e}),(0,q.jsx)(nfe,{ref:m,side:o,align:a,variant:r,size:n,sideOffset:s,showArrow:l,className:c,...p,children:t})]}));Cur.displayName="SimpleTooltip";var ul=({icon:e,tooltip:t,active:r,onClick:n,disabled:o})=>(0,q.jsxs)(qrt,{children:[(0,q.jsx)(Wrt,{asChild:!0,children:(0,q.jsx)($rt,{pressed:r,onPressedChange:()=>n(),disabled:o,className:"h-8 w-8 p-0",children:e})}),(0,q.jsx)(nfe,{children:(0,q.jsx)("p",{children:t})})]}),Sur=({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(r=>(0,q.jsx)("button",{className:"w-6 h-6 rounded border-2 border-gray-200 hover:border-gray-400",style:{backgroundColor:r},onClick:()=>e(r)},r))}),Pur=Bn.default.forwardRef(({value:e="",onChange:t,placeholder:r="Start writing...",disabled:n=!1,className:o,minHeight:a=200,maxHeight:i=500,showToolbar:s=!0,showPreview:l=!0,...c},u)=>{let[d,f]=(0,Bn.useState)(e),[p,m]=(0,Bn.useState)(!1),[h,g]=(0,Bn.useState)(e);(0,Bn.useState)(null);let v=Bn.default.useRef(null),y=Bn.default.useRef(null),[x,w]=(0,Bn.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}),b=(0,Bn.useCallback)(I=>{f(I),t?.(I)},[t]),C=(0,Bn.useCallback)(()=>{let I=window.getSelection();return I&&I.rangeCount>0?I.getRangeAt(0):null},[]);(0,Bn.useCallback)(I=>{if(!I)return;let k=window.getSelection();k&&(k.removeAllRanges(),k.addRange(I))},[]);let S=(0,Bn.useCallback)((I,k)=>{if(n)return;if(v.current&&v.current.focus(),C(),document.execCommand(I,!1,k)||console.warn(`Command '${I}' failed to execute`),v.current){let E=v.current.innerHTML;b(E)}w({bold:document.queryCommandState("bold"),italic:document.queryCommandState("italic"),underline:document.queryCommandState("underline"),strikethrough:document.queryCommandState("strikeThrough"),alignLeft:document.queryCommandState("justifyLeft"),alignCenter:document.queryCommandState("justifyCenter"),alignRight:document.queryCommandState("justifyRight"),alignJustify:document.queryCommandState("justifyFull"),orderedList:document.queryCommandState("insertOrderedList"),unorderedList:document.queryCommandState("insertUnorderedList"),quote:document.queryCommandState("formatBlock"),code:document.queryCommandState("formatBlock")}),v.current&&v.current.focus()},[n,C,b]),P=(0,Bn.useCallback)(I=>{let k=I.currentTarget.innerHTML;b(k)},[b]),N=(0,Bn.useCallback)(I=>{if(I.ctrlKey||I.metaKey)switch(I.key){case"b":I.preventDefault(),S("bold");break;case"i":I.preventDefault(),S("italic");break;case"u":I.preventDefault(),S("underline");break;case"z":I.preventDefault(),I.shiftKey?S("redo"):S("undo");break}I.key==="Tab"&&(I.preventDefault(),S("insertHTML","&nbsp;&nbsp;&nbsp;&nbsp;"))},[S]),T=(0,Bn.useCallback)(()=>{let I=prompt("Enter URL:");I&&S("createLink",I)},[S]),A=(0,Bn.useCallback)(()=>{let I=prompt("Enter image URL:");I&&S("insertImage",I)},[S]),M=(0,Bn.useCallback)(I=>{S("formatBlock",`<h${I}>`)},[S]),O=(0,Bn.useCallback)(I=>{let k=window.getSelection();if(k&&k.rangeCount>0){let R=k.getRangeAt(0),E=document.createElement("span");E.style.color=I;try{R.surroundContents(E)}catch{S("foreColor",I)}if(v.current){let _=v.current.innerHTML;b(_)}}},[S,b]);Bn.default.useEffect(()=>{v.current&&d&&d!==v.current.innerHTML&&(v.current.innerHTML=d)},[d]),Bn.default.useEffect(()=>{e!==void 0&&e!==d&&(f(e),g(e))},[e,d]);let F=s&&(0,q.jsx)(bur,{children:(0,q.jsxs)(Ad.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)(ul,{icon:(0,q.jsx)(c_,{className:"h-3 w-3"}),tooltip:"Bold (Ctrl+B)",active:x.bold,onClick:()=>S("bold"),disabled:n}),(0,q.jsx)(ul,{icon:(0,q.jsx)(g_,{className:"h-3 w-3"}),tooltip:"Italic (Ctrl+I)",active:x.italic,onClick:()=>S("italic"),disabled:n}),(0,q.jsx)(ul,{icon:(0,q.jsx)(N_,{className:"h-3 w-3"}),tooltip:"Underline (Ctrl+U)",active:x.underline,onClick:()=>S("underline"),disabled:n}),(0,q.jsx)(ul,{icon:(0,q.jsx)(R_,{className:"h-3 w-3"}),tooltip:"Strikethrough",active:x.strikethrough,onClick:()=>S("strikeThrough"),disabled:n})]}),(0,q.jsx)(iv,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),(0,q.jsxs)(Yde,{onValueChange:I=>{I.startsWith("h")?M(I.substring(1)):I==="normal"?S("formatBlock","p"):S("fontSize",I)},disabled:n,children:[(0,q.jsx)(Qde,{className:"w-24 h-8",children:(0,q.jsx)(wrt,{placeholder:"Size"})}),(0,q.jsxs)(Zde,{children:[(0,q.jsx)(tm,{value:"1",children:"Small"}),(0,q.jsx)(tm,{value:"3",children:"Normal"}),(0,q.jsx)(tm,{value:"5",children:"Large"}),(0,q.jsx)(tm,{value:"7",children:"X-Large"}),(0,q.jsx)(iv,{className:"my-1"}),(0,q.jsx)(tm,{value:"h1",children:"Heading 1"}),(0,q.jsx)(tm,{value:"h2",children:"Heading 2"}),(0,q.jsx)(tm,{value:"h3",children:"Heading 3"}),(0,q.jsx)(tm,{value:"h4",children:"Heading 4"}),(0,q.jsx)(tm,{value:"h5",children:"Heading 5"}),(0,q.jsx)(tm,{value:"h6",children:"Heading 6"})]})]}),(0,q.jsx)(iv,{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)(ul,{icon:(0,q.jsx)(s_,{className:"h-3 w-3"}),tooltip:"Align Left",active:x.alignLeft,onClick:()=>S("justifyLeft"),disabled:n}),(0,q.jsx)(ul,{icon:(0,q.jsx)(a_,{className:"h-3 w-3"}),tooltip:"Align Center",active:x.alignCenter,onClick:()=>S("justifyCenter"),disabled:n}),(0,q.jsx)(ul,{icon:(0,q.jsx)(l_,{className:"h-3 w-3"}),tooltip:"Align Right",active:x.alignRight,onClick:()=>S("justifyRight"),disabled:n}),(0,q.jsx)(ul,{icon:(0,q.jsx)(i_,{className:"h-3 w-3"}),tooltip:"Justify",active:x.alignJustify,onClick:()=>S("justifyFull"),disabled:n})]}),(0,q.jsx)(iv,{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)(ul,{icon:(0,q.jsx)(x_,{className:"h-3 w-3"}),tooltip:"Bullet List",active:x.unorderedList,onClick:()=>S("insertUnorderedList"),disabled:n}),(0,q.jsx)(ul,{icon:(0,q.jsx)(y_,{className:"h-3 w-3"}),tooltip:"Numbered List",active:x.orderedList,onClick:()=>S("insertOrderedList"),disabled:n}),(0,q.jsx)(ul,{icon:(0,q.jsx)(P_,{className:"h-3 w-3"}),tooltip:"Quote",active:x.quote,onClick:()=>S("formatBlock","blockquote"),disabled:n}),(0,q.jsx)(ul,{icon:(0,q.jsx)(d_,{className:"h-3 w-3"}),tooltip:"Code Block",active:x.code,onClick:()=>S("formatBlock","pre"),disabled:n})]}),(0,q.jsx)(iv,{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)(ul,{icon:(0,q.jsx)("span",{className:"text-xs font-mono",children:"\u2190"}),tooltip:"Decrease Indent",onClick:()=>S("outdent"),disabled:n}),(0,q.jsx)(ul,{icon:(0,q.jsx)("span",{className:"text-xs font-mono",children:"\u2192"}),tooltip:"Increase Indent",onClick:()=>S("indent"),disabled:n})]}),(0,q.jsx)(iv,{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)(ul,{icon:(0,q.jsx)(v_,{className:"h-3 w-3"}),tooltip:"Insert Link",onClick:T,disabled:n}),(0,q.jsx)(ul,{icon:(0,q.jsx)(nM,{className:"h-3 w-3"}),tooltip:"Insert Image",onClick:A,disabled:n})]}),(0,q.jsx)(iv,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),(0,q.jsxs)(Xsr,{children:[(0,q.jsx)(Ysr,{asChild:!0,children:(0,q.jsx)(I8,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",disabled:n,title:"Text Color",children:(0,q.jsx)(C_,{className:"h-3 w-3"})})}),(0,q.jsx)(irt,{className:"w-auto p-0",children:(0,q.jsx)(Sur,{onColorSelect:O})})]}),(0,q.jsx)(iv,{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)(ul,{icon:(0,q.jsx)(M_,{className:"h-3 w-3"}),tooltip:"Undo (Ctrl+Z)",onClick:()=>S("undo"),disabled:n}),(0,q.jsx)(ul,{icon:(0,q.jsx)(I_,{className:"h-3 w-3"}),tooltip:"Redo (Ctrl+Shift+Z)",onClick:()=>S("redo"),disabled:n})]})]}),l&&(0,q.jsxs)(q.Fragment,{children:[!p&&(0,q.jsx)(iv,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),(0,q.jsx)(ul,{icon:p?(0,q.jsx)(kd,{className:"h-3 w-3"}):(0,q.jsx)(p_,{className:"h-3 w-3"}),tooltip:p?"Edit Mode":"View Source Code",active:p,onClick:()=>{p?b(h):g(d),m(!p)},disabled:n})]})]})});return(0,q.jsxs)("div",{ref:u,className:Ae("border border-gray-200 dark:border-zinc-700 rounded-lg overflow-hidden focus-within:ring-2 focus-within:ring-ring focus-within:border-transparent",n&&"opacity-50 cursor-not-allowed",o),...c,children:[F,(0,q.jsxs)("div",{className:"relative",children:[p?(0,q.jsx)(Ad.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,q.jsx)("textarea",{ref:y,value:h,onChange:I=>g(I.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:n,placeholder:"HTML source code..."})}):(0,q.jsx)(Ad.div,{ref:v,contentEditable:!n,suppressContentEditableWarning:!0,className:Ae("p-4 outline-none prose prose-sm dark:prose-invert max-w-none overflow-y-auto","bg-slate-50 dark:bg-zinc-900/95","text-gray-900 dark:text-gray-100","focus:ring-0","[&_h1]:text-3xl [&_h1]:font-bold [&_h1]:mb-4","[&_h2]:text-2xl [&_h2]:font-bold [&_h2]:mb-3","[&_h3]:text-xl [&_h3]:font-bold [&_h3]:mb-2","[&_h4]:text-lg [&_h4]:font-bold [&_h4]:mb-2","[&_h5]:text-base [&_h5]:font-bold [&_h5]:mb-1","[&_h6]:text-sm [&_h6]:font-bold [&_h6]:mb-1","[&_ul]:list-disc [&_ul]:pl-6 [&_ul]:mb-4","[&_ol]:list-decimal [&_ol]:pl-6 [&_ol]:mb-4","[&_li]:mb-1","[&_blockquote]:border-l-4 [&_blockquote]:border-gray-300 [&_blockquote]:pl-4 [&_blockquote]:italic","[&_pre]:bg-gray-100 [&_pre]:dark:bg-gray-800 [&_pre]:p-4 [&_pre]:rounded [&_pre]:overflow-x-auto"),style:{minHeight:a,maxHeight:i},onInput:P,onKeyDown:N,"data-placeholder":r,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:r})]}),(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)(Iur,{content:d})})]})});Pur.displayName="SimpleEditor";var Iur=({content:e})=>{let[t,r]=(0,Bn.useState)(0);return(0,Bn.useEffect)(()=>{r((o=>{let a=document.createElement("div");return a.innerHTML=o,a.textContent||a.innerText||""})(e).length)},[e]),(0,q.jsxs)(q.Fragment,{children:[t," characters"]})},kur=Hn("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"}}),q1=ee.forwardRef(({className:e,variant:t,size:r,shape:n,animation:o,height:a,width:i,isLoaded:s=!1,children:l,fadeInDuration:c=400,motion:u=!1,style:d,...f},p)=>{let{onDrag:m,onDragEnd:h,onDragStart:g,onAnimationStart:v,onAnimationEnd:y,onAnimationIteration:x,...w}=f;if(s&&l)return u?(0,q.jsx)(Ad.div,{ref:p,initial:{opacity:0},animate:{opacity:1},transition:{duration:c/1e3},className:Ae("moonui-theme",e),style:{height:a,width:i,...d},...w,children:l}):(0,q.jsx)("div",{ref:p,className:Ae("moonui-theme","animate-fade-in",e),style:{animationDuration:`${c}ms`,height:a,width:i,...d},...f,children:l});let b=u?Ad.div:"div";return(0,q.jsx)(b,{ref:p,className:Ae("moonui-theme",kur({variant:t,size:r,shape:n,animation:o}),"relative isolate",e),style:{height:a,width:i,...d},...u?ssr:{},...w})});q1.displayName="Skeleton";var Krt=ee.forwardRef(({className:e,lines:t=3,lineHeight:r="0.85rem",spacing:n="0.5rem",lastLineWidth:o=80,randomWidths:a=!1,variant:i="default",animation:s="pulse",...l},c)=>(0,q.jsx)("div",{ref:c,className:Ae("moonui-theme","flex flex-col",e),style:{gap:n},...l,children:Array.from({length:t}).map((u,d)=>{let p=d===t-1?o:a?85+d%3*5:100;return(0,q.jsx)(q1,{variant:i,animation:s,className:"w-full",style:{height:r,width:`${p}%`}},d)})}));Krt.displayName="SkeletonText";var Xrt=ee.forwardRef(({className:e,size:t="2.5rem",variant:r="default",animation:n="pulse",...o},a)=>(0,q.jsx)(q1,{ref:a,variant:r,animation:n,shape:"circle",className:Ae("moonui-theme","shrink-0",e),style:{height:t,width:t},...o}));Xrt.displayName="SkeletonAvatar";var Rur=ee.forwardRef(({className:e,showHeader:t=!0,contentLines:r=3,showFooter:n=!0,variant:o="default",animation:a="pulse",...i},s)=>(0,q.jsxs)("div",{ref:s,className:Ae("overflow-hidden rounded-md border border-border bg-background p-4",e),...i,children:[t&&(0,q.jsxs)("div",{className:"mb-4 flex items-center gap-4",children:[(0,q.jsx)(Xrt,{size:"2.5rem",variant:o,animation:a}),(0,q.jsxs)("div",{className:"flex-1",children:[(0,q.jsx)(q1,{variant:o,animation:a,className:"mb-2 h-4 w-1/3"}),(0,q.jsx)(q1,{variant:o,animation:a,className:"h-3 w-1/4"})]})]}),(0,q.jsx)(Krt,{lines:r,variant:o,animation:a,className:"mb-4"}),n&&(0,q.jsxs)("div",{className:"flex items-center justify-between mt-4 pt-4 border-t border-border",children:[(0,q.jsx)(q1,{variant:o,animation:a,className:"h-4 w-1/4"}),(0,q.jsx)(q1,{variant:o,animation:a,className:"h-4 w-1/5"})]})]}));Rur.displayName="SkeletonCard";var Nur=ee.forwardRef(({className:e,children:t,onSwipeLeft:r,onSwipeRight:n,threshold:o=100,disabled:a=!1,...i},s)=>{let[l,c]=ee.useState(0),[u,d]=ee.useState(0),[f,p]=ee.useState(!1),m=v=>{a||(c(v.touches[0].clientX),p(!0))},h=v=>{a||!f||d(v.touches[0].clientX)},g=()=>{if(a||!f)return;let v=u-l;Math.abs(v)>o&&(v>0&&n?n():v<0&&r&&r()),p(!1),d(0),c(0)};return(0,q.jsx)("div",{ref:s,className:Ae("touch-pan-y select-none transition-transform duration-200",f&&"cursor-grabbing",e),onTouchStart:m,onTouchMove:h,onTouchEnd:g,...i,children:t})});Nur.displayName="SwipeableCard";var Mur=ee.forwardRef(({className:e,size:t="md",variant:r="primary",loading:n,leftIcon:o,rightIcon:a,description:i,...s},l)=>(0,q.jsxs)("div",{className:"moonui-theme inline-flex items-center gap-2",children:[o&&(0,q.jsx)("span",{className:"text-muted-foreground",children:o}),(0,q.jsxs)(wde,{className:Ae("peer relative inline-flex shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 dark:data-[state=unchecked]:bg-gray-700/70 dark:focus-visible:ring-primary/40 dark:focus-visible:ring-offset-gray-950",t==="sm"&&"h-4 w-8",t==="md"&&"h-6 w-11",t==="lg"&&"h-7 w-14",r==="primary"&&"data-[state=checked]:bg-primary",r==="success"&&"data-[state=checked]:bg-success",r==="warning"&&"data-[state=checked]:bg-warning",r==="danger"&&"data-[state=checked]:bg-error",r==="secondary"&&"data-[state=checked]:bg-accent","data-[state=unchecked]:bg-input",n&&"opacity-80 cursor-wait",e),disabled:n||s.disabled,...s,ref:l,children:[n?(0,q.jsx)("div",{className:"absolute inset-0 flex items-center justify-center",children:(0,q.jsx)("div",{className:"h-3 w-3 animate-spin rounded-full border-2 border-gray-300 border-t-primary"})}):null,(0,q.jsx)(Ptt,{className:Ae("pointer-events-none block rounded-full bg-background shadow-lg ring-0 transition-transform",t==="sm"&&"h-3 w-3 data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0",t==="md"&&"h-5 w-5 data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0",t==="lg"&&"h-6 w-6 data-[state=checked]:translate-x-7 data-[state=unchecked]:translate-x-0")})]}),a&&(0,q.jsx)("span",{className:"text-muted-foreground",children:a}),i&&(0,q.jsx)("span",{className:"text-sm text-muted-foreground",children:i})]}));Mur.displayName=wde.displayName;var Tur=ee.forwardRef(({value:e=[],onChange:t,maxTags:r,variant:n="primary",allowDuplicates:o=!1,delimiter:a=",",placeholder:i="Add tag and press Enter",className:s,disabled:l,...c},u)=>{let[d,f]=ee.useState(""),[p,m]=ee.useState(""),h=y=>{y.key==="Enter"||y.key===a?(y.preventDefault(),g()):y.key==="Backspace"&&d===""&&e.length>0&&v(e.length-1)},g=()=>{let y=d.trim();if(y){if(!o&&e.includes(y)){m("This tag already exists"),setTimeout(()=>m(""),2e3);return}if(r&&e.length>=r){m(`Maximum ${r} tags allowed`),setTimeout(()=>m(""),2e3);return}t([...e,y]),f(""),m("")}},v=y=>{l||t(e.filter((x,w)=>w!==y))};return(0,q.jsxs)("div",{className:"relative",children:[(0,q.jsxs)("div",{className:Ae("flex min-h-[2.5rem] w-full flex-wrap gap-2 rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background","dark:bg-zinc-950/50 dark:border-zinc-800","focus-within:outline-none focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2",l&&"cursor-not-allowed opacity-50",s),children:[e.map((y,x)=>(0,q.jsxs)(C8,{variant:n,className:"gap-1 pr-1.5",children:[(0,q.jsx)("span",{className:"text-xs",children:y}),!l&&(0,q.jsx)("button",{type:"button",onClick:()=>v(x),className:"ml-1 rounded-full outline-none ring-offset-background focus:ring-2 focus:ring-ring focus:ring-offset-2",children:(0,q.jsx)(Yy,{className:"h-3 w-3 text-muted-foreground hover:text-foreground transition-colors"})})]},x)),(0,q.jsx)("input",{ref:u,type:"text",value:d,onChange:y=>f(y.target.value),onKeyDown:h,onBlur:g,disabled:l,placeholder:e.length===0?i:"",className:Ae("flex-1 bg-transparent outline-none placeholder:text-muted-foreground","dark:placeholder:text-zinc-500","min-w-[120px]",l&&"cursor-not-allowed"),...c})]}),p&&(0,q.jsx)("p",{className:"mt-1 text-xs text-destructive",children:p})]})});Tur.displayName="TagsInput";var Aur=ee.forwardRef(({className:e,variant:t,size:r,error:n,success:o,loading:a,autoResize:i,maxHeight:s,characterCount:l,...c},u)=>(0,q.jsx)("textarea",{className:Ae("moonui-theme","flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:u,...c}));Aur.displayName="Textarea";var Lur=ee.forwardRef(({className:e,...t},r)=>(0,q.jsx)(Mde,{ref:r,className:Ae("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}));Lur.displayName=Mde.displayName;var Eur=Hn("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"}}),Dur=ee.forwardRef(({className:e,variant:t,...r},n)=>(0,q.jsx)(Tde,{ref:n,className:Ae("moonui-theme",Eur({variant:t}),e),...r}));Dur.displayName=Tde.displayName;var Our=ee.forwardRef(({className:e,...t},r)=>(0,q.jsx)(Ede,{ref:r,className:Ae("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}));Our.displayName=Ede.displayName;var _ur=ee.forwardRef(({className:e,...t},r)=>(0,q.jsx)(Dde,{ref:r,className:Ae("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,q.jsx)(Yy,{className:"h-4 w-4"})}));_ur.displayName=Dde.displayName;var Fur=ee.forwardRef(({className:e,...t},r)=>(0,q.jsx)(Ade,{ref:r,className:Ae("moonui-theme","text-sm font-semibold [&+div]:text-xs",e),...t}));Fur.displayName=Ade.displayName;var Bur=ee.forwardRef(({className:e,...t},r)=>(0,q.jsx)(Lde,{ref:r,className:Ae("moonui-theme","text-sm opacity-90",e),...t}));Bur.displayName=Lde.displayName;var qc=D(fe(),1),T8=xt("relative inline-flex shrink-0 overflow-hidden font-semibold transition-all",{variants:{size:{xs:"h-6 w-6 text-xs",sm:"h-8 w-8 text-xs",md:"h-10 w-10 text-sm",lg:"h-12 w-12 text-base",xl:"h-14 w-14 text-lg","2xl":"h-16 w-16 text-xl","3xl":"h-20 w-20 text-2xl"},shape:{circle:"rounded-full",square:"rounded-md",hexagon:"mask mask-hexagon"},ring:{none:"",default:"ring-2 ring-offset-2 ring-offset-background",gradient:"ring-2 ring-offset-2 ring-offset-background",glow:"ring-2 ring-offset-2 ring-offset-background shadow-lg"}},defaultVariants:{size:"md",shape:"circle",ring:"none"}}),ofe=xt("absolute rounded-full border-2 border-background",{variants:{size:{xs:"h-2 w-2",sm:"h-2.5 w-2.5",md:"h-3 w-3",lg:"h-3.5 w-3.5",xl:"h-4 w-4","2xl":"h-5 w-5","3xl":"h-6 w-6"},position:{"bottom-right":"bottom-0 right-0","bottom-left":"bottom-0 left-0","top-right":"top-0 right-0","top-left":"top-0 left-0"},status:{online:"bg-green-500",offline:"bg-gray-400",busy:"bg-red-500",away:"bg-yellow-500",focus:"bg-purple-500"}},defaultVariants:{size:"md",position:"bottom-right",status:"offline"}}),afe=xt("absolute flex items-center justify-center rounded-full font-bold text-white",{variants:{size:{xs:"h-3 w-3 text-[8px]",sm:"h-3.5 w-3.5 text-[9px]",md:"h-4 w-4 text-[10px]",lg:"h-5 w-5 text-[11px]",xl:"h-6 w-6 text-xs","2xl":"h-7 w-7 text-sm","3xl":"h-8 w-8 text-base"},position:{"top-right":"-top-1 -right-1","top-left":"-top-1 -left-1","bottom-right":"-bottom-1 -right-1","bottom-left":"-bottom-1 -left-1"},variant:{default:"bg-primary",destructive:"bg-destructive",success:"bg-green-500",warning:"bg-yellow-500",info:"bg-blue-500",pro:"bg-gradient-to-r from-purple-500 to-pink-500",lifetime:"bg-gradient-to-r from-yellow-400 to-amber-500"}},defaultVariants:{size:"md",position:"top-right",variant:"default"}}),Vur={crown:_w,sparkles:bt,star:vs,heart:Vw,shield:YA,award:aA,gem:xA,flame:yA,zap:es},A8=Dd.forwardRef(({className:e,size:t,shape:r,ring:n,src:o,alt:a,fallback:i,delayMs:s,status:l,statusPosition:c="bottom-right",badge:u,ringColor:d,gradientFrom:f,gradientTo:p,animate:m=!1,animationType:h="pulse",onStatusClick:g,loading:v=!1,error:y=!1,...x},w)=>{let b={pulse:"animate-pulse",bounce:"animate-bounce",spin:"animate-spin",ping:"animate-ping"},C=Dd.useMemo(()=>n==="gradient"&&f&&p?{background:`linear-gradient(135deg, ${f}, ${p})`,padding:"2px"}:d?{boxShadow:`0 0 0 2px ${d}`}:{},[n,d,f,p]),S=u?.icon?Vur[u.icon]:null;return(0,qc.jsxs)("div",{className:"relative inline-block",children:[n==="gradient"&&(0,qc.jsx)("div",{className:"absolute -inset-[2px] rounded-full",style:{background:`linear-gradient(135deg, ${f||"#8b5cf6"}, ${p||"#ec4899"})`}}),(0,qc.jsxs)(fL,{ref:w,className:Ae(T8({size:t,shape:r,ring:n}),m&&b[h],n==="gradient"&&"relative",e),style:n!=="gradient"?C:void 0,...x,children:[(0,qc.jsx)(pL,{src:o,alt:a,className:"aspect-square h-full w-full object-cover"}),(0,qc.jsx)(mL,{className:Ae("flex h-full w-full items-center justify-center bg-muted",v&&"animate-pulse",y&&"bg-destructive/10 text-destructive"),delayMs:s,children:v?(0,qc.jsx)("div",{className:"h-1/2 w-1/2 rounded-full bg-muted-foreground/20 animate-pulse"}):y?(0,qc.jsx)(lo,{className:"h-1/2 w-1/2"}):i})]}),l&&!v&&(0,qc.jsx)("button",{className:Ae(ofe({size:t,position:c,status:l}),g&&"cursor-pointer hover:scale-110 transition-transform",l==="online"&&"animate-pulse"),onClick:g,"aria-label":`Status: ${l}`}),u&&!v&&(0,qc.jsx)("div",{className:Ae(afe({size:t,position:u.position,variant:u.variant}),"shadow-sm"),children:S?(0,qc.jsx)(S,{className:"h-full w-full p-0.5"}):u.content})]})});A8.displayName="MoonUIAvatarPro";var ife=Dd.forwardRef(({children:e,max:t=4,size:r="md",spacing:n="normal",className:o},a)=>{let i=Dd.Children.toArray(e),s=i.slice(0,t),l=i.length-t;return(0,qc.jsxs)("div",{ref:a,className:Ae("flex items-center",{tight:"-space-x-3",normal:"-space-x-2",loose:"-space-x-1"}[n],o),children:[s.map((u,d)=>(0,qc.jsx)("div",{className:"relative ring-2 ring-background rounded-full",style:{zIndex:s.length-d},children:u},d)),l>0&&(0,qc.jsxs)("div",{className:Ae(T8({size:r,shape:"circle"}),"relative flex items-center justify-center bg-muted ring-2 ring-background","text-muted-foreground font-medium"),style:{zIndex:0},children:["+",l]})]})});ife.displayName="MoonUIAvatarGroupPro";var sfe=Dd.forwardRef(({userId:e,fetchUser:t,...r},n)=>{let[o,a]=Dd.useState(null),[i,s]=Dd.useState(!1),[l,c]=Dd.useState(!1);return Dd.useEffect(()=>{e&&t&&(s(!0),c(!1),t(e).then(a).catch(()=>c(!0)).finally(()=>s(!1)))},[e,t]),(0,qc.jsx)(A8,{ref:n,src:o?.image||r.src,fallback:o?.name?.[0]||r.fallback,loading:i,error:l,...r})});sfe.displayName="MoonUIAsyncAvatarPro";var dl=D(fe(),1);function _u({title:e,subtitle:t,children:r,variant:n="default",backgroundVariant:o,colorScheme:a="blue",className:i,headerAction:s,loading:l=!1,error:c=null,animate:u=!0,rounded:d="lg",shadow:f="sm",gradientDirection:p="to-br",overlay:m}){let h=o||n,g={blue:"from-blue-500/10 via-blue-500/5 to-transparent border-blue-500/20 dark:from-blue-400/10 dark:via-blue-400/5 dark:border-blue-400/20",green:"from-green-500/10 via-green-500/5 to-transparent border-green-500/20 dark:from-green-400/10 dark:via-green-400/5 dark:border-green-400/20",purple:"from-purple-500/10 via-purple-500/5 to-transparent border-purple-500/20 dark:from-purple-400/10 dark:via-purple-400/5 dark:border-purple-400/20",orange:"from-orange-500/10 via-orange-500/5 to-transparent border-orange-500/20 dark:from-orange-400/10 dark:via-orange-400/5 dark:border-orange-400/20",pink:"from-pink-500/10 via-pink-500/5 to-transparent border-pink-500/20 dark:from-pink-400/10 dark:via-pink-400/5 dark:border-pink-400/20",cyan:"from-cyan-500/10 via-cyan-500/5 to-transparent border-cyan-500/20 dark:from-cyan-400/10 dark:via-cyan-400/5 dark:border-cyan-400/20",neutral:"from-gray-500/10 via-gray-500/5 to-transparent border-gray-500/20 dark:from-gray-400/10 dark:via-gray-400/5 dark:border-gray-400/20"},v={blue:"from-blue-500/20 via-blue-500/10 to-transparent border-blue-500/30 dark:from-blue-400/20 dark:via-blue-400/10 dark:border-blue-400/30",green:"from-green-500/20 via-green-500/10 to-transparent border-green-500/30 dark:from-green-400/20 dark:via-green-400/10 dark:border-green-400/30",purple:"from-purple-500/20 via-purple-500/10 to-transparent border-purple-500/30 dark:from-purple-400/20 dark:via-purple-400/10 dark:border-purple-400/30",orange:"from-orange-500/20 via-orange-500/10 to-transparent border-orange-500/30 dark:from-orange-400/20 dark:via-orange-400/10 dark:border-orange-400/30",pink:"from-pink-500/20 via-pink-500/10 to-transparent border-pink-500/30 dark:from-pink-400/20 dark:via-pink-400/10 dark:border-pink-400/30",cyan:"from-cyan-500/20 via-cyan-500/10 to-transparent border-cyan-500/30 dark:from-cyan-400/20 dark:via-cyan-400/10 dark:border-cyan-400/30",neutral:"from-gray-500/20 via-gray-500/10 to-transparent border-gray-500/30 dark:from-gray-400/20 dark:via-gray-400/10 dark:border-gray-400/30"},y={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl",full:"rounded-full"},x={none:"shadow-none",sm:"shadow-sm",md:"shadow-md",lg:"shadow-lg",xl:"shadow-xl","2xl":"shadow-2xl"},w={dots:"radial-gradient(circle at 1px 1px, currentColor 1px, transparent 0)",grid:"linear-gradient(currentColor 1px, transparent 1px), linear-gradient(90deg, currentColor 1px, transparent 1px)",diagonal:"repeating-linear-gradient(45deg, transparent, transparent 2px, currentColor 2px, currentColor 4px)",waves:"radial-gradient(ellipse at center, transparent 20%, currentColor 21%, currentColor 25%, transparent 26%)",none:"none"},b={"to-t":"bg-gradient-to-t","to-tr":"bg-gradient-to-tr","to-r":"bg-gradient-to-r","to-br":"bg-gradient-to-br","to-b":"bg-gradient-to-b","to-bl":"bg-gradient-to-bl","to-l":"bg-gradient-to-l","to-tl":"bg-gradient-to-tl"},C={"to-t":{backgroundImage:"linear-gradient(to top, var(--tw-gradient-stops))"},"to-tr":{backgroundImage:"linear-gradient(to top right, var(--tw-gradient-stops))"},"to-r":{backgroundImage:"linear-gradient(to right, var(--tw-gradient-stops))"},"to-br":{backgroundImage:"linear-gradient(to bottom right, var(--tw-gradient-stops))"},"to-b":{backgroundImage:"linear-gradient(to bottom, var(--tw-gradient-stops))"},"to-bl":{backgroundImage:"linear-gradient(to bottom left, var(--tw-gradient-stops))"},"to-l":{backgroundImage:"linear-gradient(to left, var(--tw-gradient-stops))"},"to-tl":{backgroundImage:"linear-gradient(to top left, var(--tw-gradient-stops))"}},S={default:"bg-card border",minimal:"border-0 shadow-none bg-card/50",glass:"bg-background/60 backdrop-blur-md border-white/10",bordered:"border-2 bg-card",gradient:`${b[p]} ${g[a]}`,colored:`${b[p]} ${v[a]} border-2`,overlay:"bg-card border relative overflow-hidden",floating:"bg-card border-0 shadow-2xl hover:shadow-3xl transform hover:-translate-y-1 transition-all duration-300 ring-1 ring-gray-200/50 dark:ring-gray-700/50"},P=(0,dl.jsxs)(Ve,{className:B(S[h],y[d],x[f],"transition-all duration-200 relative",i),style:h==="gradient"||h==="colored"?C[p]:void 0,children:[(h==="overlay"||m)&&m?.pattern&&m.pattern!=="none"&&(0,dl.jsx)("div",{className:"absolute inset-0 pointer-events-none",style:{backgroundImage:w[m.pattern],backgroundSize:m.pattern==="dots"?"8px 8px":m.pattern==="grid"?"20px 20px":m.pattern==="diagonal"?"8px 8px":m.pattern==="waves"?"60px 60px":"auto",opacity:m.opacity||.1,color:m.color||"currentColor"}}),(e||t||s)&&(0,dl.jsxs)(vr,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[(0,dl.jsxs)("div",{children:[e&&(0,dl.jsx)(Dr,{className:"text-base font-semibold",children:e}),t&&(0,dl.jsx)("p",{className:"text-sm text-muted-foreground mt-1",children:t})]}),s&&(0,dl.jsx)("div",{className:"ml-4",children:s})]}),(0,dl.jsx)(ze,{className:B(e||t||s?"pt-0":"pt-6"),children:l?(0,dl.jsx)("div",{className:"flex items-center justify-center py-8",children:(0,dl.jsxs)("div",{className:"animate-pulse space-y-2",children:[(0,dl.jsx)("div",{className:"h-4 bg-muted rounded w-24 mx-auto"}),(0,dl.jsx)("div",{className:"h-8 bg-muted rounded w-16 mx-auto"})]})}):c?(0,dl.jsx)("div",{className:"flex items-center justify-center py-8 text-center",children:(0,dl.jsxs)("div",{className:"text-destructive",children:[(0,dl.jsx)("p",{className:"text-sm font-medium",children:"Error"}),(0,dl.jsx)("p",{className:"text-xs text-muted-foreground mt-1",children:c})]})}):r})]});return u?(0,dl.jsx)(oe.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3,ease:"easeOut"},children:P}):P}var Er=D(fe(),1);function lfe({data:e,title:t,variant:r="default",backgroundVariant:n,gradientDirection:o,orientation:a="horizontal",showTrend:i=!0,showTarget:s=!0,showChange:l=!0,animate:c=!0,icon:u,onKPIClick:d,...f}){let p=Array.isArray(e)?e:[e],m=(y,x)=>{if(typeof y=="string")return y;let w;return y%1!==0?w=(Math.round(y*100)/100).toString():w=y.toString(),x?`${w}${x}`:w},h=y=>{switch(y){case"success":return"text-green-600 dark:text-green-400";case"warning":return"text-yellow-600 dark:text-yellow-400";case"danger":return"text-red-600 dark:text-red-400";case"info":return"text-blue-600 dark:text-blue-400";default:return"text-foreground"}},g=y=>{if(!y||y.length<2)return null;let x=Math.max(...y),w=Math.min(...y),b=x-w||1;return(0,Er.jsx)("div",{className:"flex items-end gap-0.5 h-8 w-16",children:y.map((C,S)=>(0,Er.jsx)(oe.div,{className:"flex-1 bg-primary/60 rounded-t-sm min-h-[2px]",initial:{height:0},animate:{height:`${Math.max((C-w)/b*100,10)}%`},transition:{delay:S*.05,duration:c?.3:0}},S))})},v=(y,x)=>{let w=y.target&&typeof y.value=="number"?y.value/y.target.value*100:0;return(0,Er.jsxs)(oe.div,{className:B("space-y-2",d&&"cursor-pointer hover:bg-muted/30 p-2 -m-2 rounded-lg transition-colors"),onClick:()=>d?.(y),initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:x*.1,duration:c?.3:0},children:[(r==="default"||r==="detailed")&&(0,Er.jsxs)("div",{className:B("flex items-center",a==="vertical"?"flex-col space-y-2":"justify-between"),children:[(0,Er.jsxs)("div",{className:B("flex items-center gap-2",a==="vertical"?"flex-col text-center":""),children:[y.icon&&(0,Er.jsx)("div",{className:"text-muted-foreground",children:y.icon}),(0,Er.jsxs)("div",{className:a==="vertical"?"text-center":"",children:[(0,Er.jsx)("p",{className:"text-sm text-muted-foreground font-medium",children:y.label}),y.description&&(0,Er.jsx)("p",{className:"text-xs text-muted-foreground/70",children:y.description})]})]}),(0,Er.jsxs)("div",{className:B("flex items-center gap-3",a==="vertical"?"flex-col":""),children:[(0,Er.jsx)("div",{className:B("text-right",a==="vertical"?"text-center":""),children:(0,Er.jsx)("p",{className:B("text-2xl font-bold tracking-tight",h(y.status)),children:m(y.value,y.unit)})}),l&&y.change&&(0,Er.jsxs)("div",{className:B("flex items-center gap-1",y.change.type==="increase"?"text-green-600":y.change.type==="decrease"?"text-red-600":"text-gray-600"),children:[y.change.type==="increase"?(0,Er.jsx)(va,{className:"h-4 w-4"}):y.change.type==="decrease"?(0,Er.jsx)(vc,{className:"h-4 w-4"}):(0,Er.jsx)(eu,{className:"h-4 w-4"}),(0,Er.jsxs)("span",{className:"text-sm font-medium",children:[y.change.type!=="neutral"&&(y.change.type==="increase"?"+":"-"),Math.abs(y.change.value),"%"]})]}),i&&y.trend&&g(y.trend)]})]}),r==="card"&&(0,Er.jsxs)("div",{className:"space-y-3",children:[(0,Er.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Er.jsxs)("div",{children:[(0,Er.jsx)("p",{className:"text-sm text-muted-foreground",children:y.label}),(0,Er.jsx)("p",{className:"text-3xl font-bold tracking-tight",children:m(y.value,y.unit)})]}),u&&(0,Er.jsx)("div",{className:"flex-shrink-0 p-3 rounded-xl bg-primary/10",children:u})]}),l&&y.change&&(0,Er.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Er.jsxs)(dt,{variant:y.change.type==="increase"?"success":y.change.type==="decrease"?"destructive":"secondary",leftIcon:y.change.type==="increase"?(0,Er.jsx)(Qc,{className:"h-3 w-3"}):y.change.type==="decrease"?(0,Er.jsx)(gc,{className:"h-3 w-3"}):(0,Er.jsx)(eu,{className:"h-3 w-3"}),className:"text-xs",children:[y.change.type!=="neutral"&&(y.change.type==="increase"?"+":"-"),Math.abs(y.change.value),"%"]}),y.change.period&&(0,Er.jsxs)("span",{className:"text-xs text-muted-foreground",children:["vs ",y.change.period]})]})]}),r==="compact"&&(0,Er.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Er.jsxs)("div",{className:"flex items-center gap-2",children:[y.icon&&(0,Er.jsx)("div",{className:"text-muted-foreground text-sm",children:y.icon}),(0,Er.jsx)("span",{className:"text-sm font-medium",children:y.label})]}),(0,Er.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Er.jsx)("span",{className:"font-bold",children:m(y.value,y.unit)}),l&&y.change&&(0,Er.jsxs)(dt,{variant:"outline",className:"text-xs",leftIcon:y.change.type==="increase"?(0,Er.jsx)(Qc,{className:"h-3 w-3"}):y.change.type==="decrease"?(0,Er.jsx)(gc,{className:"h-3 w-3"}):(0,Er.jsx)(eu,{className:"h-3 w-3"}),children:[y.change.type!=="neutral"&&(y.change.type==="increase"?"+":"-"),Math.abs(y.change.value),"%"]})]})]}),r==="detailed"&&s&&y.target&&(0,Er.jsxs)("div",{className:"space-y-2",children:[(0,Er.jsxs)("div",{className:"flex justify-between text-sm",children:[(0,Er.jsx)("span",{className:"text-muted-foreground",children:y.target.label||"Target"}),(0,Er.jsxs)("span",{className:"font-medium",children:[w.toFixed(1),"% of ",m(y.target.value,y.unit)]})]}),(0,Er.jsx)(Mo,{value:w,className:"h-2"})]})]},x)};return(0,Er.jsx)(_u,{title:t,variant:n,gradientDirection:o,...f,children:(0,Er.jsx)("div",{className:B("space-y-4",r==="compact"&&"space-y-2"),children:p.map((y,x)=>v(y,x))})})}var cfe=D(ue(),1);var Qt=D(fe(),1);function ufe({data:e,title:t,type:r="line",variant:n="default",backgroundVariant:o,gradientDirection:a,height:i=300,showLegend:s=!0,showGrid:l=!0,showTooltip:c=!0,showDataLabels:u=!1,animate:d=!0,colors:f,onDataPointClick:p,...m}){let[h,g]=cfe.default.useState(null),y=f||["#3b82f6","#10b981","#f59e0b","#ef4444","#8b5cf6","#ec4899","#14b8a6","#f97316","#06b6d4","#a855f7"],x=cfe.default.useMemo(()=>e.values?Math.max(...e.values):e.series?Math.max(...e.series.flatMap(T=>T.data.map(A=>A.value))):100,[e]),w=T=>T%1!==0?(Math.round(T*100)/100).toString():T.toString(),b=()=>{let T=e.values||[],A=e.labels||e.categories||[];return(0,Qt.jsxs)("div",{className:"relative h-full overflow-hidden",children:[(0,Qt.jsx)("div",{className:"absolute inset-0 flex items-end justify-between gap-1 pl-10 pr-2 pb-6",children:T.map((M,O)=>{let F=M/x*100,I=h===O;return(0,Qt.jsxs)(oe.div,{className:"relative flex flex-col items-center justify-end min-w-0",style:{height:"calc(100% - 24px)",flex:"1 1 0"},onMouseEnter:()=>g(O),onMouseLeave:()=>g(null),initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:O*.05},children:[u&&(0,Qt.jsx)(oe.span,{className:"absolute text-xs font-medium text-white mix-blend-difference",style:{bottom:`calc(${F}% / 2)`,left:"50%",transform:"translateX(-50%)"},initial:{opacity:0},animate:{opacity:1},transition:{delay:O*.1+.6},children:w(M)}),(0,Qt.jsx)("div",{className:"relative h-full w-full flex flex-col justify-end",children:(0,Qt.jsx)(oe.div,{className:B("w-full rounded-t cursor-pointer transition-all duration-200","shadow-lg",I&&"brightness-110 scale-y-105"),style:{background:`linear-gradient(to top, ${y[O%y.length]}, ${y[O%y.length]}dd)`,minHeight:"2px",boxShadow:I?`0 4px 20px ${y[O%y.length]}40`:"none"},initial:{height:0},animate:{height:`${F}%`},transition:{duration:d?.6:0,delay:O*.1,ease:"easeOut"},onClick:()=>p?.({label:A[O],value:M})})})]},O)})}),h!==null&&(()=>{let M=85/T.length,O=10+h*M+M/2;return(0,Qt.jsxs)(oe.div,{className:"absolute bg-background border-2 rounded-lg px-3 py-2 text-xs pointer-events-none shadow-xl",style:{left:`${O}%`,top:"50%",transform:"translate(-50%, -50%)",zIndex:100},initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{duration:.15},children:[(0,Qt.jsx)("div",{className:"font-medium text-foreground",children:A[h]||`Item ${h+1}`}),(0,Qt.jsx)("div",{className:"text-primary font-bold text-sm mt-0.5",children:w(T[h])})]})})(),(0,Qt.jsx)("div",{className:"absolute bottom-0 left-10 right-0 flex justify-between gap-1 pr-2 h-6",children:A.map((M,O)=>(0,Qt.jsx)("div",{className:"flex-1 flex justify-center",children:(0,Qt.jsx)("span",{className:"text-xs text-muted-foreground truncate",children:M})},O))}),l&&(0,Qt.jsxs)("div",{className:"absolute inset-0 pb-6 pointer-events-none",children:[[0,25,50,75,100].map(M=>(0,Qt.jsx)("div",{className:"absolute left-10 right-0 border-b border-muted/20",style:{bottom:`calc(24px + ${M}% * (100% - 24px) / 100)`}},M)),(0,Qt.jsxs)("div",{className:"absolute left-0 top-0 bottom-6 w-9 flex flex-col justify-between text-xs text-muted-foreground pr-1",children:[(0,Qt.jsx)("span",{className:"text-right",children:w(x)}),(0,Qt.jsx)("span",{className:"text-right",children:w(x*.75)}),(0,Qt.jsx)("span",{className:"text-right",children:w(x*.5)}),(0,Qt.jsx)("span",{className:"text-right",children:w(x*.25)}),(0,Qt.jsx)("span",{className:"text-right",children:"0"})]})]})]})},C=()=>{let T=e.values||[],A=e.labels||e.categories||[];if(T.length<2)return null;let M=5,O=100-M*2,F=100-M*2,I=T.map((R,E)=>{let _=M+E/(T.length-1)*O,U=M+(F-R/x*F);return{x:_,y:U,value:R,label:A[E]}}),k=I.map((R,E)=>`${E===0?"M":"L"} ${R.x} ${R.y}`).join(" ");return(0,Qt.jsxs)("div",{className:"relative h-full overflow-hidden",children:[(0,Qt.jsxs)("svg",{className:"w-full h-full",viewBox:"0 0 100 100",preserveAspectRatio:"xMidYMid meet",children:[(0,Qt.jsxs)("defs",{children:[(0,Qt.jsxs)("linearGradient",{id:"chartLineGradient",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[(0,Qt.jsx)("stop",{offset:"0%",stopColor:y[0],stopOpacity:"1"}),(0,Qt.jsx)("stop",{offset:"50%",stopColor:y[1]||y[0],stopOpacity:"1"}),(0,Qt.jsx)("stop",{offset:"100%",stopColor:y[2]||y[0],stopOpacity:"1"})]}),(0,Qt.jsxs)("linearGradient",{id:"chartAreaGradient",x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[(0,Qt.jsx)("stop",{offset:"0%",stopColor:y[0],stopOpacity:"0.3"}),(0,Qt.jsx)("stop",{offset:"50%",stopColor:y[0],stopOpacity:"0.15"}),(0,Qt.jsx)("stop",{offset:"100%",stopColor:y[0],stopOpacity:"0.05"})]})]}),l&&(0,Qt.jsx)("g",{className:"opacity-10",children:[25,50,75].map(R=>{let E=5+R/100*90;return(0,Qt.jsx)("line",{x1:"0",y1:E,x2:"100",y2:E,stroke:"currentColor",strokeWidth:"0.3"},R)})}),(0,Qt.jsx)(oe.path,{d:k,fill:"none",stroke:"url(#chartLineGradient)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",initial:{pathLength:0},animate:{pathLength:1},transition:{duration:d?1:0},style:{vectorEffect:"non-scaling-stroke"}}),r==="area"&&(0,Qt.jsx)(oe.path,{d:`${k} L 90 90 L 10 90 Z`,fill:"url(#chartAreaGradient)",initial:{opacity:0},animate:{opacity:1},transition:{duration:d?.5:0,delay:.5}}),I.map((R,E)=>(0,Qt.jsx)(oe.circle,{cx:R.x,cy:R.y,r:"1.5",fill:y[0],stroke:"white",strokeWidth:"1.5",initial:{r:0,opacity:0},animate:{r:h===E?2.5:1.5,opacity:1,strokeWidth:h===E?2:1.5},onMouseEnter:()=>g(E),onMouseLeave:()=>g(null),className:"cursor-pointer",style:{shapeRendering:"geometricPrecision",vectorEffect:"non-scaling-stroke"},onClick:()=>p?.(R),transition:{duration:.2}},E))]}),c&&h!==null&&I[h]&&(()=>{let R=I[h],E=R.y<30;return(0,Qt.jsxs)("div",{className:"absolute bg-background border rounded px-2 py-1 text-xs pointer-events-none z-10 shadow-lg",style:{left:`${Math.min(90,Math.max(10,R.x))}%`,top:E?`${R.y}%`:`${R.y}%`,transform:E?"translate(-50%, 10px)":"translate(-50%, calc(-100% - 10px))"},children:[(0,Qt.jsx)("div",{className:"font-medium",children:R.label}),(0,Qt.jsx)("div",{children:w(R.value)})]})})()]})},S=()=>{let T=e.values||[],A=e.labels||e.categories||[],M=T.reduce((F,I)=>F+I,0),O=-90;return(0,Qt.jsxs)("div",{className:"flex items-center justify-between gap-4 h-full overflow-hidden",children:[(0,Qt.jsxs)("div",{className:"relative w-48 h-48 flex-shrink-0",children:[(0,Qt.jsxs)("svg",{className:"w-full h-full transform",viewBox:"0 0 100 100",children:[T.map((F,I)=>{let k=F/M*100,R=k/100*360,E=O,_=O+R,U=P(50,50,40,E),V=P(50,50,40,_),L=R>180?1:0,H=["M 50 50",`L ${U.x} ${U.y}`,`A 40 40 0 ${L} 1 ${V.x} ${V.y}`,"Z"].join(" ");return O=_,(0,Qt.jsx)(oe.path,{d:H,fill:y[I%y.length],initial:{scale:0},animate:{scale:h===I?1.05:1},style:{transformOrigin:"50px 50px"},transition:{duration:d?.3:0,delay:I*.05},onMouseEnter:()=>g(I),onMouseLeave:()=>g(null),className:"cursor-pointer",onClick:()=>p?.({label:A[I],value:F,percentage:k})},I)}),r==="donut"&&(0,Qt.jsx)("circle",{cx:"50",cy:"50",r:"25",fill:"var(--background)"})]}),r==="donut"&&(0,Qt.jsxs)("div",{className:"absolute inset-0 flex flex-col items-center justify-center",children:[(0,Qt.jsx)("div",{className:"text-2xl font-bold",children:M}),(0,Qt.jsx)("div",{className:"text-xs text-muted-foreground",children:"Total"})]})]}),s&&(0,Qt.jsx)("div",{className:"space-y-1 overflow-y-auto flex-1 min-w-0",children:T.map((F,I)=>{let k=(F/M*100).toFixed(1);return(0,Qt.jsxs)("div",{className:B("flex items-center gap-2 cursor-pointer",h===I&&"opacity-80"),onMouseEnter:()=>g(I),onMouseLeave:()=>g(null),children:[(0,Qt.jsx)("div",{className:"w-2 h-2 rounded flex-shrink-0",style:{backgroundColor:y[I%y.length]}}),(0,Qt.jsx)("span",{className:"text-xs truncate",children:A[I]}),(0,Qt.jsxs)("span",{className:"text-xs text-muted-foreground ml-auto",children:[k,"%"]})]},I)})})]})},P=(T,A,M,O)=>{let F=O*Math.PI/180;return{x:T+M*Math.cos(F),y:A+M*Math.sin(F)}},N=()=>{switch(r){case"bar":return b();case"line":case"area":return C();case"pie":case"donut":return S();default:return b()}};return(0,Qt.jsx)(_u,{title:t,variant:o,gradientDirection:a,...m,children:(0,Qt.jsxs)("div",{className:"space-y-4",children:[e.total!==void 0&&(0,Qt.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Qt.jsxs)("div",{children:[(0,Qt.jsx)("p",{className:"text-sm text-muted-foreground",children:"Total"}),(0,Qt.jsx)("p",{className:"text-2xl font-bold",children:w(e.total)})]}),e.change&&(0,Qt.jsxs)("div",{className:B("flex items-center gap-1",e.change.type==="increase"?"text-green-600":e.change.type==="decrease"?"text-red-600":"text-gray-600"),children:[e.change.type==="increase"?(0,Qt.jsx)(Qc,{className:"h-4 w-4"}):e.change.type==="decrease"?(0,Qt.jsx)(gc,{className:"h-4 w-4"}):null,(0,Qt.jsxs)("span",{className:"font-medium",children:[e.change.type!=="neutral"&&(e.change.type==="increase"?"+":"-"),Math.abs(e.change.value),"%"]}),e.change.period&&(0,Qt.jsxs)("span",{className:"text-xs text-muted-foreground",children:["vs ",e.change.period]})]})]}),(0,Qt.jsx)("div",{className:"overflow-hidden",style:{height:`${i}px`},children:N()})]})})}var Fr=D(fe(),1);function dfe({data:e,title:t,variant:r="radial",backgroundVariant:n,gradientDirection:o,showValue:a=!0,showTarget:i=!0,showThresholds:s=!0,showLabels:l=!0,showTrend:c=!0,showPercentage:u=!0,size:d="md",animate:f=!0,strokeWidth:p=12,onGaugeClick:m,...h}){let g=Array.isArray(e)?e:[e],y={sm:{width:120,height:120,fontSize:"text-lg",strokeWidth:8},md:{width:180,height:180,fontSize:"text-2xl",strokeWidth:12},lg:{width:240,height:240,fontSize:"text-3xl",strokeWidth:16},xl:{width:320,height:320,fontSize:"text-4xl",strokeWidth:20}}[d],x=N=>N%1!==0?(Math.round(N*100)/100).toString():N.toString(),w=N=>{let T=N.min??0,M=(N.max??100)-T;return(N.value-T)/M*100},b=(N,T)=>{if(N.thresholds&&N.thresholds.length>0){let M=[...N.thresholds].sort((O,F)=>O.value-F.value);for(let O=M.length-1;O>=0;O--)if(T>=M[O].value)return M[O].color;return M[0].color}let A={success:"#22c55e",warning:"#f59e0b",danger:"#ef4444",info:"#3b82f6",neutral:"#6b7280"};return N.status?A[N.status]:T>=75?"#22c55e":T>=50?"#f59e0b":T>=25?"#fb923c":"#ef4444"},C=(N,T)=>{let A=w(N),M=(y.width-y.strokeWidth)/2,O=2*Math.PI*M,F=O-A/100*O,I=b(N,A),k=N.target?(N.target-(N.min??0))/((N.max??100)-(N.min??0))*360:null;return(0,Fr.jsxs)(oe.div,{className:"relative flex flex-col items-center cursor-pointer",onClick:()=>m?.(N),whileHover:{scale:1.02},whileTap:{scale:.98},children:[(0,Fr.jsxs)("svg",{width:y.width,height:y.height,className:"transform -rotate-90",children:[(0,Fr.jsx)("circle",{cx:y.width/2,cy:y.height/2,r:M,fill:"none",stroke:"currentColor",strokeWidth:y.strokeWidth,className:"text-muted/20"}),s&&N.thresholds&&N.thresholds.map((R,E)=>{let _=(R.value/100*360-90)*(Math.PI/180),U=y.width/2+(M-y.strokeWidth)*Math.cos(_),V=y.height/2+(M-y.strokeWidth)*Math.sin(_),L=y.width/2+(M+y.strokeWidth)*Math.cos(_),H=y.height/2+(M+y.strokeWidth)*Math.sin(_);return(0,Fr.jsx)("line",{x1:U,y1:V,x2:L,y2:H,stroke:R.color,strokeWidth:2,opacity:.5},E)}),(0,Fr.jsx)(oe.circle,{cx:y.width/2,cy:y.height/2,r:M,fill:"none",stroke:I,strokeWidth:y.strokeWidth,strokeLinecap:"round",strokeDasharray:O,initial:{strokeDashoffset:O},animate:{strokeDashoffset:F},transition:{duration:f?1:0,ease:"easeOut"}}),i&&k!==null&&(0,Fr.jsx)("g",{transform:`rotate(${k} ${y.width/2} ${y.height/2})`,children:(0,Fr.jsx)("line",{x1:y.width/2,y1:y.strokeWidth,x2:y.width/2,y2:y.strokeWidth+10,stroke:"currentColor",strokeWidth:3,className:"text-primary"})})]}),(0,Fr.jsxs)("div",{className:"absolute inset-0 flex flex-col items-center justify-center transform rotate-0",children:[a&&(0,Fr.jsxs)(oe.div,{className:B(y.fontSize,"font-bold"),initial:{opacity:0,scale:.5},animate:{opacity:1,scale:1},transition:{delay:.3},children:[x(N.value),N.unit&&(0,Fr.jsx)("span",{className:"text-sm ml-1",children:N.unit})]}),u&&(0,Fr.jsxs)("div",{className:"text-sm text-muted-foreground",children:[x(A),"%"]}),l&&(0,Fr.jsx)("div",{className:"text-xs text-muted-foreground mt-1 text-center px-2",children:N.label}),c&&N.trend&&(0,Fr.jsxs)("div",{className:B("flex items-center gap-1 mt-2",N.trend.type==="increase"?"text-green-600":N.trend.type==="decrease"?"text-red-600":"text-gray-600"),children:[N.trend.type==="increase"?(0,Fr.jsx)(va,{className:"h-3 w-3"}):N.trend.type==="decrease"?(0,Fr.jsx)(vc,{className:"h-3 w-3"}):null,(0,Fr.jsxs)("span",{className:"text-xs font-medium",children:[x(N.trend.value),"%"]})]})]})]},T)},S=(N,T)=>{let A=w(N),M=b(N,A);return(0,Fr.jsxs)(oe.div,{className:"w-full space-y-2 cursor-pointer",onClick:()=>m?.(N),whileHover:{scale:1.01},children:[(0,Fr.jsxs)("div",{className:"flex justify-between items-center",children:[(0,Fr.jsxs)("div",{className:"flex items-center gap-2",children:[l&&(0,Fr.jsx)("span",{className:"text-sm font-medium",children:N.label}),N.status&&(0,Fr.jsx)(dt,{variant:"outline",className:"text-xs",children:N.status})]}),(0,Fr.jsxs)("div",{className:"flex items-center gap-2",children:[a&&(0,Fr.jsxs)("span",{className:B("font-bold",d==="sm"?"text-base":"text-lg"),children:[x(N.value),N.unit&&(0,Fr.jsx)("span",{className:"text-sm ml-1 text-muted-foreground",children:N.unit})]}),u&&(0,Fr.jsxs)("span",{className:"text-sm text-muted-foreground",children:["(",x(A),"%)"]})]})]}),(0,Fr.jsxs)("div",{className:"relative",children:[(0,Fr.jsx)("div",{className:B("w-full rounded-full bg-muted/30 overflow-hidden",d==="sm"?"h-2":d==="md"?"h-3":d==="lg"?"h-4":"h-5"),children:(0,Fr.jsx)(oe.div,{className:"h-full rounded-full",style:{backgroundColor:M},initial:{width:0},animate:{width:`${A}%`},transition:{duration:f?1:0,ease:"easeOut"}})}),s&&N.thresholds&&N.thresholds.map((O,F)=>(0,Fr.jsx)(Ys,{children:(0,Fr.jsxs)(ws,{children:[(0,Fr.jsx)(Cs,{asChild:!0,children:(0,Fr.jsx)("div",{className:"absolute top-1/2 -translate-y-1/2 w-0.5 h-full bg-background",style:{left:`${O.value}%`}})}),(0,Fr.jsx)(ns,{children:(0,Fr.jsx)("p",{children:O.label||`${O.value}%`})})]})},F)),i&&N.target&&(0,Fr.jsx)(Ys,{children:(0,Fr.jsxs)(ws,{children:[(0,Fr.jsx)(Cs,{asChild:!0,children:(0,Fr.jsx)("div",{className:"absolute -top-1 w-0 h-0 border-l-[6px] border-l-transparent border-r-[6px] border-r-transparent border-t-[8px] border-t-primary",style:{left:`${(N.target-(N.min??0))/((N.max??100)-(N.min??0))*100}%`,transform:"translateX(-50%)"}})}),(0,Fr.jsx)(ns,{children:(0,Fr.jsxs)("p",{children:["Target: ",x(N.target),N.unit]})})]})})]}),l&&(0,Fr.jsxs)("div",{className:"flex justify-between text-xs text-muted-foreground",children:[(0,Fr.jsx)("span",{children:N.min??0}),(0,Fr.jsx)("span",{children:N.max??100})]})]},T)},P=(N,T)=>{switch(r){case"linear":case"progress":return S(N,T);case"radial":default:return C(N,T)}};return(0,Fr.jsx)(_u,{title:t,variant:n,gradientDirection:o,...h,children:(0,Fr.jsx)("div",{className:B("flex flex-wrap items-center justify-center",r==="linear"||r==="progress"?"flex-col space-y-4":"gap-6","p-4"),children:g.map((N,T)=>P(N,T))})})}var L8=D(ue(),1);var kt=D(fe(),1);function ffe({data:e,title:t,variant:r="vertical",backgroundVariant:n,gradientDirection:o,showValues:a=!0,showPercentages:i=!0,showDropoff:s=!0,showTargets:l=!1,showDuration:c=!1,showConversionRate:u=!0,animate:d=!0,interactive:f=!0,onStageClick:p,...m}){let[h,g]=L8.default.useState(null),v=T=>T%1!==0?(Math.round(T*100)/100).toString():T.toString(),y=L8.default.useMemo(()=>{let T=Math.max(...e.stages.map(A=>A.value));return e.stages.map((A,M)=>{let O=A.percentage??A.value/T*100,F=M>0?e.stages[M-1].value:A.value,I=A.dropoff??F-A.value,k=A.dropoffPercentage??(F>0?(F-A.value)/F*100:0);return{...A,percentage:O,dropoff:I,dropoffPercentage:k}})},[e.stages]),x=(T,A)=>{if(T.color)return T.color;let M=["#3b82f6","#8b5cf6","#ec4899","#f59e0b","#10b981","#06b6d4"];return M[A%M.length]},w=(T,A)=>T.icon?T.icon:[(0,kt.jsx)(Xd,{className:"h-4 w-4"}),(0,kt.jsx)(ZA,{className:"h-4 w-4"}),(0,kt.jsx)(Sv,{className:"h-4 w-4"}),(0,kt.jsx)(Bo,{className:"h-4 w-4"})][A]||(0,kt.jsx)(ep,{className:"h-4 w-4"}),b=T=>e.currency?new Intl.NumberFormat("en-US",{style:"currency",currency:e.currency,minimumFractionDigits:0,maximumFractionDigits:0}).format(T):T>=1e6?`${v(T/1e6)}M`:T>=1e3?`${v(T/1e3)}K`:T.toLocaleString(),C=()=>(0,kt.jsx)("div",{className:"space-y-2",children:y.map((T,A)=>{let M=`${T.percentage}%`,O=x(T,A),F=w(T,A),I=h===T.id;return(0,kt.jsx)(oe.div,{className:B("relative group",f&&"cursor-pointer"),onMouseEnter:()=>g(T.id),onMouseLeave:()=>g(null),onClick:()=>f&&p?.(T),initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:A*.1},children:(0,kt.jsxs)("div",{className:"flex items-center gap-4",children:[(0,kt.jsxs)("div",{className:"flex-1",children:[(0,kt.jsxs)("div",{className:"flex items-center justify-between mb-1",children:[(0,kt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,kt.jsx)("div",{className:"p-1.5 rounded",style:{backgroundColor:`${O}20`},children:(0,kt.jsx)("div",{style:{color:O},children:F})}),(0,kt.jsx)("span",{className:"text-sm font-medium",children:T.name}),T.description&&(0,kt.jsx)(Ys,{children:(0,kt.jsxs)(ws,{children:[(0,kt.jsx)(Cs,{children:(0,kt.jsx)(Nn,{className:"h-3 w-3 text-muted-foreground"})}),(0,kt.jsx)(ns,{children:(0,kt.jsx)("p",{className:"max-w-xs",children:T.description})})]})})]}),(0,kt.jsxs)("div",{className:"flex items-center gap-2",children:[a&&(0,kt.jsx)("span",{className:"text-sm font-bold",children:b(T.value)}),i&&(0,kt.jsxs)(dt,{variant:"outline",className:"text-xs",children:[v(T.percentage),"%"]}),c&&T.duration&&(0,kt.jsx)("span",{className:"text-xs text-muted-foreground",children:T.duration})]})]}),(0,kt.jsxs)("div",{className:"relative",children:[(0,kt.jsx)("div",{className:"h-8 bg-muted/30 rounded overflow-hidden",children:(0,kt.jsx)(oe.div,{className:"h-full rounded transition-all duration-300",style:{backgroundColor:O,opacity:I?1:.8},initial:{width:0},animate:{width:M},transition:{duration:d?.5:0,delay:A*.1}})}),l&&T.target&&(0,kt.jsx)("div",{className:"absolute top-0 bottom-0 w-0.5 bg-foreground/50",style:{left:`${T.target/Math.max(...e.stages.map(k=>k.value))*100}%`},children:(0,kt.jsx)("div",{className:"absolute -top-1 -left-1 w-2 h-2 rounded-full bg-foreground/50"})})]}),A<y.length-1&&(0,kt.jsx)("div",{className:"flex justify-center mt-2 mb-1",children:(0,kt.jsx)(Gf,{className:"h-4 w-4 text-muted-foreground/50"})})]}),s&&A>0&&(0,kt.jsxs)("div",{className:"flex items-center gap-1 text-xs",children:[(0,kt.jsx)(Gf,{className:"h-3 w-3 text-red-500"}),(0,kt.jsxs)("span",{className:"text-red-500 font-medium",children:["-",v(T.dropoffPercentage),"%"]})]})]})},T.id)})}),S=()=>(0,kt.jsx)("div",{className:"flex items-center justify-between",children:y.map((T,A)=>{let M=x(T,A),O=w(T,A),F=h===T.id,I=A===y.length-1;return(0,kt.jsxs)(L8.default.Fragment,{children:[(0,kt.jsxs)(oe.div,{className:B("flex flex-col items-center gap-2 flex-1",f&&"cursor-pointer"),onMouseEnter:()=>g(T.id),onMouseLeave:()=>g(null),onClick:()=>f&&p?.(T),initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:A*.1},children:[(0,kt.jsxs)(oe.div,{className:"relative",whileHover:{scale:1.1},whileTap:{scale:.95},children:[(0,kt.jsx)("div",{className:B("w-16 h-16 rounded-full flex items-center justify-center","border-2 transition-all duration-300"),style:{borderColor:M,backgroundColor:F?`${M}20`:"transparent"},children:(0,kt.jsx)("div",{style:{color:M},children:O})}),(0,kt.jsx)("svg",{className:"absolute inset-0 -rotate-90",width:"64",height:"64",children:(0,kt.jsx)("circle",{cx:"32",cy:"32",r:"30",fill:"none",stroke:M,strokeWidth:"2",strokeDasharray:`${T.percentage*1.88} 188`,opacity:"0.3"})})]}),(0,kt.jsxs)("div",{className:"text-center",children:[(0,kt.jsx)("div",{className:"font-medium text-sm",children:T.name}),a&&(0,kt.jsx)("div",{className:"text-xs text-muted-foreground mt-1",children:b(T.value)}),i&&(0,kt.jsxs)(dt,{variant:"outline",className:"text-xs mt-1",children:[v(T.percentage),"%"]})]})]}),!I&&(0,kt.jsx)("div",{className:"flex-shrink-0 px-2",children:(0,kt.jsxs)("div",{className:"relative",children:[(0,kt.jsx)(Ow,{className:"h-5 w-5 text-muted-foreground"}),s&&(0,kt.jsxs)("div",{className:"absolute -top-6 left-1/2 -translate-x-1/2 text-xs text-red-500 whitespace-nowrap",children:["-",v(y[A+1].dropoffPercentage),"%"]})]})})]},T.id)})}),P=()=>(0,kt.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4",children:y.map((T,A)=>{let M=x(T,A),O=w(T,A),F=h===T.id;return(0,kt.jsxs)(oe.div,{className:B("relative p-4 rounded-lg border transition-all",f&&"cursor-pointer hover:shadow-lg",F&&"border-primary"),style:{borderColor:F?M:void 0},onMouseEnter:()=>g(T.id),onMouseLeave:()=>g(null),onClick:()=>f&&p?.(T),initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:A*.1},children:[(0,kt.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,kt.jsx)("div",{className:"p-2 rounded",style:{backgroundColor:`${M}20`},children:(0,kt.jsx)("div",{style:{color:M},children:O})}),A>0&&s&&(0,kt.jsxs)(dt,{variant:"destructive",className:"text-xs flex items-center gap-1",children:[(0,kt.jsx)(vc,{className:"h-3 w-3"}),v(T.dropoffPercentage),"%"]})]}),(0,kt.jsxs)("div",{className:"space-y-2",children:[(0,kt.jsx)("h4",{className:"font-semibold",children:T.name}),a&&(0,kt.jsx)("div",{className:"text-2xl font-bold",children:b(T.value)}),i&&(0,kt.jsx)(Mo,{value:T.percentage,className:"h-2"}),T.description&&(0,kt.jsx)("p",{className:"text-xs text-muted-foreground",children:T.description}),l&&T.target&&(0,kt.jsxs)("div",{className:"flex items-center justify-between text-xs",children:[(0,kt.jsx)("span",{className:"text-muted-foreground",children:"Target"}),(0,kt.jsx)("span",{className:"font-medium",children:b(T.target)})]})]})]},T.id)})}),N=()=>{switch(r){case"steps":return S();case"cards":return P();case"vertical":default:return C()}};return(0,kt.jsx)(_u,{title:t,variant:n,gradientDirection:o,...m,children:(0,kt.jsxs)("div",{className:"space-y-4",children:[u&&(0,kt.jsxs)("div",{className:"flex items-center justify-between p-3 bg-muted/30 rounded-lg",children:[(0,kt.jsxs)("div",{children:[(0,kt.jsx)("p",{className:"text-sm text-muted-foreground",children:"Overall Conversion Rate"}),(0,kt.jsx)("p",{className:"text-2xl font-bold",children:e.conversionRate?`${v(e.conversionRate)}%`:`${v(y[y.length-1].value/y[0].value*100)}%`})]}),e.comparison&&(0,kt.jsxs)("div",{className:B("flex items-center gap-1",e.comparison.type==="increase"?"text-green-600":"text-red-600"),children:[e.comparison.type==="increase"?(0,kt.jsx)(va,{className:"h-4 w-4"}):(0,kt.jsx)(vc,{className:"h-4 w-4"}),(0,kt.jsxs)("span",{className:"font-medium",children:[e.comparison.type==="increase"?"+":"-",Math.abs(e.comparison.value),"%"]}),(0,kt.jsxs)("span",{className:"text-xs text-muted-foreground",children:["vs ",e.comparison.period]})]})]}),N()]})})}var Yrt=D(ue(),1);var Ke=D(fe(),1);function pfe({data:e,title:t,variant:r="default",showStreams:n=!0,showMetrics:o=!0,showBreakdown:a=!0,showForecast:i=!0,showTimeline:s=!1,showTopProducts:l=!1,showCustomerMetrics:c=!1,animate:u=!0,onStreamClick:d,onMetricClick:f,...p}){let[m,h]=Yrt.default.useState("overview"),g=F=>F%1!==0?(Math.round(F*100)/100).toString():F.toString(),y=(F=>{switch(F){case"EUR":return"\u20AC";case"GBP":return"\xA3";case"USD":default:return"$"}})(e.currency),x=F=>{switch(F){case"EUR":return(0,Ke.jsx)(hA,{className:"h-5 w-5"});case"GBP":return(0,Ke.jsx)(jA,{className:"h-5 w-5"});case"USD":default:return(0,Ke.jsx)(Fw,{className:"h-5 w-5"})}},w=F=>new Intl.NumberFormat("en-US",{style:"currency",currency:e.currency||"USD",minimumFractionDigits:0,maximumFractionDigits:0}).format(F),b=F=>F>=1e6?`${y}${g(F/1e6)}M`:F>=1e3?`${y}${g(F/1e3)}K`:`${y}${g(F)}`,C=e.target?e.total/e.target.value*100:0,S=["#3b82f6","#8b5cf6","#10b981","#f59e0b","#ef4444","#ec4899"],P=(F,I)=>F.color?F.color:S[I%S.length],N=()=>(0,Ke.jsxs)("div",{className:"space-y-4",children:[(0,Ke.jsxs)("div",{className:"flex items-start justify-between",children:[(0,Ke.jsx)("div",{className:"space-y-1",children:(0,Ke.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Ke.jsx)("div",{className:B("p-2 rounded-lg bg-gradient-to-br from-primary/20 to-primary/10"),children:x(e.currency)}),(0,Ke.jsxs)("div",{children:[(0,Ke.jsxs)("p",{className:"text-sm text-muted-foreground",children:["Total Revenue ",e.period&&`(${e.period})`]}),(0,Ke.jsx)(oe.p,{className:"text-3xl font-bold",initial:{opacity:0,scale:.5},animate:{opacity:1,scale:1},transition:{duration:u?.3:0},children:w(e.total)})]})]})}),e.change&&(0,Ke.jsxs)(oe.div,{className:B("flex items-center gap-1",e.change.type==="increase"?"text-green-600":e.change.type==="decrease"?"text-red-600":"text-gray-600"),initial:{opacity:0,x:20},animate:{opacity:1,x:0},transition:{delay:.1},children:[e.change.type==="increase"?(0,Ke.jsx)(Qc,{className:"h-5 w-5"}):e.change.type==="decrease"?(0,Ke.jsx)(gc,{className:"h-5 w-5"}):null,(0,Ke.jsxs)("div",{className:"text-right",children:[(0,Ke.jsxs)("p",{className:"text-lg font-bold",children:[e.change.type!=="neutral"&&(e.change.type==="increase"?"+":"-"),Math.abs(e.change.value),"%"]}),e.change.period&&(0,Ke.jsxs)("p",{className:"text-xs text-muted-foreground",children:["vs ",e.change.period]})]})]})]}),e.target&&(0,Ke.jsxs)("div",{className:"space-y-2",children:[(0,Ke.jsxs)("div",{className:"flex justify-between text-sm",children:[(0,Ke.jsx)("span",{className:"text-muted-foreground",children:e.target.label||"Target"}),(0,Ke.jsxs)("span",{className:"font-medium",children:[g(C),"% of ",w(e.target.value)]})]}),(0,Ke.jsx)(Mo,{value:C,className:"h-2"})]}),i&&e.forecast&&(0,Ke.jsxs)("div",{className:"flex items-center justify-between p-3 bg-muted/30 rounded-lg",children:[(0,Ke.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Ke.jsx)(va,{className:"h-4 w-4 text-muted-foreground"}),(0,Ke.jsx)("span",{className:"text-sm text-muted-foreground",children:e.forecast.label||"Forecast"})]}),(0,Ke.jsxs)("div",{className:"text-right",children:[(0,Ke.jsx)("p",{className:"font-semibold",children:w(e.forecast.value)}),e.forecast.confidence&&(0,Ke.jsxs)("p",{className:"text-xs text-muted-foreground",children:[e.forecast.confidence,"% confidence"]})]})]})]}),T=()=>{if(!e.streams||e.streams.length===0)return null;let F=e.streams.reduce((I,k)=>I+k.amount,0);return(0,Ke.jsxs)("div",{className:"space-y-3",children:[(0,Ke.jsx)("h4",{className:"text-sm font-medium text-muted-foreground",children:"Revenue Streams"}),e.streams.map((I,k)=>{let R=I.percentage??I.amount/F*100,E=P(I,k);return(0,Ke.jsxs)(oe.div,{className:B("space-y-2",d&&"cursor-pointer hover:bg-muted/30 p-2 -m-2 rounded-lg transition-colors"),onClick:()=>d?.(I),initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:k*.05},children:[(0,Ke.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Ke.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Ke.jsx)("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:E}}),(0,Ke.jsx)("span",{className:"text-sm font-medium",children:I.name}),I.icon&&(0,Ke.jsx)("div",{className:"text-muted-foreground",children:I.icon})]}),(0,Ke.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Ke.jsx)("span",{className:"text-sm font-semibold",children:b(I.amount)}),(0,Ke.jsxs)(dt,{variant:"outline",className:"text-xs",children:[g(R),"%"]}),I.change&&(0,Ke.jsxs)("div",{className:B("flex items-center gap-0.5 text-xs",I.change.type==="increase"?"text-green-600":I.change.type==="decrease"?"text-red-600":"text-gray-600"),children:[I.change.type==="increase"?(0,Ke.jsx)(Qc,{className:"h-3 w-3"}):I.change.type==="decrease"?(0,Ke.jsx)(gc,{className:"h-3 w-3"}):null,Math.abs(I.change.value),"%"]})]})]}),(0,Ke.jsx)("div",{className:"relative h-2 bg-muted/30 rounded-full overflow-hidden",children:(0,Ke.jsx)(oe.div,{className:"h-full rounded-full",style:{backgroundColor:E},initial:{width:0},animate:{width:`${R}%`},transition:{duration:u?.5:0,delay:k*.05}})})]},I.id)})]})},A=()=>{if(!e.breakdown)return null;let F=e.breakdown.recurring+e.breakdown.oneTime+(e.breakdown.refunds||0),I=e.breakdown.recurring/F*100,k=e.breakdown.oneTime/F*100,R=e.breakdown.refunds?e.breakdown.refunds/F*100:0;return(0,Ke.jsxs)("div",{className:"space-y-3",children:[(0,Ke.jsx)("h4",{className:"text-sm font-medium text-muted-foreground",children:"Revenue Breakdown"}),(0,Ke.jsxs)("div",{className:"space-y-2",children:[(0,Ke.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Ke.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Ke.jsx)(Ah,{className:"h-4 w-4 text-blue-600"}),(0,Ke.jsx)("span",{className:"text-sm",children:"Recurring"})]}),(0,Ke.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Ke.jsx)("span",{className:"text-sm font-semibold",children:b(e.breakdown.recurring)}),(0,Ke.jsxs)(dt,{variant:"outline",className:"text-xs",children:[g(I),"%"]})]})]}),(0,Ke.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Ke.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Ke.jsx)(Sv,{className:"h-4 w-4 text-green-600"}),(0,Ke.jsx)("span",{className:"text-sm",children:"One-time"})]}),(0,Ke.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Ke.jsx)("span",{className:"text-sm font-semibold",children:b(e.breakdown.oneTime)}),(0,Ke.jsxs)(dt,{variant:"outline",className:"text-xs",children:[g(k),"%"]})]})]}),e.breakdown.refunds&&(0,Ke.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Ke.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Ke.jsx)(gc,{className:"h-4 w-4 text-red-600"}),(0,Ke.jsx)("span",{className:"text-sm",children:"Refunds"})]}),(0,Ke.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Ke.jsxs)("span",{className:"text-sm font-semibold text-red-600",children:["-",b(Math.abs(e.breakdown.refunds))]}),(0,Ke.jsxs)(dt,{variant:"destructive",className:"text-xs",children:[g(R),"%"]})]})]})]}),(0,Ke.jsxs)("div",{className:"h-3 flex rounded-full overflow-hidden",children:[(0,Ke.jsx)(oe.div,{className:"bg-blue-600",initial:{width:0},animate:{width:`${I}%`},transition:{duration:u?.5:0}}),(0,Ke.jsx)(oe.div,{className:"bg-green-600",initial:{width:0},animate:{width:`${k}%`},transition:{duration:u?.5:0,delay:.1}}),e.breakdown.refunds&&(0,Ke.jsx)(oe.div,{className:"bg-red-600",initial:{width:0},animate:{width:`${R}%`},transition:{duration:u?.5:0,delay:.2}})]})]})},M=()=>{if(!e.customerMetrics)return null;let F=[{label:"ARPU (Average Revenue Per User)",value:w(e.customerMetrics.arpu||0),icon:(0,Ke.jsx)(Xd,{className:"h-4 w-4"}),description:"Average revenue generated per user"},{label:"LTV (Lifetime Value)",value:w(e.customerMetrics.ltv||0),icon:(0,Ke.jsx)(va,{className:"h-4 w-4"}),description:"Expected revenue from customer over their lifetime"},{label:"CAC (Customer Acquisition Cost)",value:w(e.customerMetrics.cac||0),icon:(0,Ke.jsx)(QA,{className:"h-4 w-4"}),description:"Cost to acquire one new customer"},{label:"Churn Rate",value:`${g(e.customerMetrics.churnRate||0)}%`,icon:(0,Ke.jsx)(vc,{className:"h-4 w-4"}),description:"Percentage of customers lost per period"},{label:"Retention Rate",value:`${g(e.customerMetrics.retentionRate||0)}%`,icon:(0,Ke.jsx)(Ah,{className:"h-4 w-4"}),description:"Percentage of customers retained"}],I=(e.customerMetrics.ltv||0)/(e.customerMetrics.cac||1);return(0,Ke.jsxs)("div",{className:"space-y-6",children:[(0,Ke.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:F.map((k,R)=>(0,Ke.jsx)(Ys,{children:(0,Ke.jsxs)(ws,{children:[(0,Ke.jsx)(Cs,{asChild:!0,children:(0,Ke.jsx)(oe.div,{className:"p-4 rounded-lg border bg-card hover:bg-muted/50 transition-colors cursor-help",initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:R*.1},children:(0,Ke.jsxs)("div",{className:"flex items-center gap-3",children:[(0,Ke.jsx)("div",{className:"text-muted-foreground",children:k.icon}),(0,Ke.jsxs)("div",{children:[(0,Ke.jsx)("p",{className:"text-xs text-muted-foreground",children:k.label}),(0,Ke.jsx)("p",{className:"text-lg font-semibold",children:k.value})]})]})})}),(0,Ke.jsx)(ns,{children:(0,Ke.jsx)("p",{children:k.description})})]})},R))}),(0,Ke.jsxs)("div",{className:"p-4 rounded-lg border bg-card",children:[(0,Ke.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Ke.jsxs)("div",{children:[(0,Ke.jsx)("p",{className:"text-sm text-muted-foreground",children:"LTV/CAC Ratio"}),(0,Ke.jsx)("p",{className:"text-2xl font-bold",children:g(I)})]}),(0,Ke.jsxs)("div",{className:"text-right",children:[(0,Ke.jsx)(dt,{variant:I>=3?"primary":I>=2?"secondary":"destructive",className:"text-xs",children:I>=3?"Excellent":I>=2?"Good":"Needs Improvement"}),(0,Ke.jsx)("p",{className:"text-xs text-muted-foreground mt-1",children:"Target: 3:1 or higher"})]})]}),(0,Ke.jsxs)("div",{className:"mt-3",children:[(0,Ke.jsx)("div",{className:"text-xs text-muted-foreground mb-1",children:"Ratio Progress"}),(0,Ke.jsx)(Mo,{value:Math.min(100,I/5*100),className:"h-2"})]})]})]})};return(0,Ke.jsx)(_u,{title:t,...p,children:(()=>{switch(r){case"compact":return(0,Ke.jsx)("div",{className:"space-y-4",children:N()});case"detailed":return(0,Ke.jsxs)(Sl,{value:m,onValueChange:h,children:[(0,Ke.jsxs)(el,{className:"grid grid-cols-3 w-full",children:[(0,Ke.jsx)(Dn,{value:"overview",children:"Overview"}),(0,Ke.jsx)(Dn,{value:"streams",children:"Streams"}),(0,Ke.jsx)(Dn,{value:"metrics",children:"Metrics"})]}),(0,Ke.jsxs)(Xn,{value:"overview",className:"space-y-4",children:[N(),a&&A()]}),(0,Ke.jsx)(Xn,{value:"streams",className:"space-y-4",children:T()}),(0,Ke.jsx)(Xn,{value:"metrics",className:"space-y-4",children:M()})]});case"dashboard":return(0,Ke.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[(0,Ke.jsxs)("div",{className:"space-y-4",children:[N(),a&&A()]}),(0,Ke.jsx)("div",{className:"space-y-4",children:n&&T()})]});case"default":default:return(0,Ke.jsxs)("div",{className:"space-y-6",children:[N(),n&&T(),a&&A()]})}})()})}var E8=D(ue(),1);var je=D(fe(),1);function mfe({data:e,title:t,variant:r="default",backgroundVariant:n,gradientDirection:o,showMetrics:a=!0,showAlerts:i=!0,showServices:s=!1,showHistory:l=!1,showUptime:c=!0,updateInterval:u=30,animate:d=!0,onServerClick:f,onAlertClick:p,...m}){let h=Array.isArray(e)?e:[e],[g,v]=E8.default.useState("overview"),[y,x]=E8.default.useState(h),w=O=>typeof O=="string"?O:O%1!==0?(Math.round(O*100)/100).toString():O.toString();E8.default.useEffect(()=>{if(!d)return;let O=setInterval(()=>{x(F=>F.map(I=>({...I,lastUpdated:new Date,metrics:{...I.metrics,cpu:I.metrics.cpu?{...I.metrics.cpu,value:Math.min(100,Math.max(0,I.metrics.cpu.value+(Math.random()-.5)*10))}:void 0,memory:I.metrics.memory?{...I.metrics.memory,value:Math.min(100,Math.max(0,I.metrics.memory.value+(Math.random()-.5)*5))}:void 0}})))},u*1e3);return()=>clearInterval(O)},[u,d]);let b=O=>{switch(O){case"online":case"healthy":case"running":return"text-green-600 dark:text-green-400";case"warning":case"degraded":return"text-yellow-600 dark:text-yellow-400";case"critical":case"error":case"offline":case"stopped":return"text-red-600 dark:text-red-400";case"maintenance":return"text-blue-600 dark:text-blue-400";default:return"text-gray-600 dark:text-gray-400"}},C=O=>{switch(O){case"online":case"healthy":case"running":return(0,je.jsx)(Bo,{className:"h-4 w-4"});case"warning":case"degraded":return(0,je.jsx)(ya,{className:"h-4 w-4"});case"critical":case"error":case"offline":case"stopped":return(0,je.jsx)(lo,{className:"h-4 w-4"});case"maintenance":return(0,je.jsx)(yn,{className:"h-4 w-4"});default:return(0,je.jsx)(Nn,{className:"h-4 w-4"})}},S=O=>{switch(O){case"database":return(0,je.jsx)(mA,{className:"h-5 w-5"});case"cache":return(0,je.jsx)(Mh,{className:"h-5 w-5"});case"storage":return(0,je.jsx)(Rv,{className:"h-5 w-5"});case"compute":return(0,je.jsx)(Xf,{className:"h-5 w-5"});case"web":default:return(0,je.jsx)($w,{className:"h-5 w-5"})}},P=O=>{if(O.status)return O.status;let F=O.value,I=O.max||100,k=F/I*100;return k>=90?"critical":k>=75?"warning":"healthy"},N=(O,F)=>{let I=O.value,k=O.max||100,R=I/k*100,E=P(O),_={healthy:"bg-green-600",warning:"bg-yellow-600",critical:"bg-red-600",offline:"bg-gray-600"};return(0,je.jsxs)("div",{className:"space-y-2",children:[(0,je.jsxs)("div",{className:"flex items-center justify-between",children:[(0,je.jsxs)("div",{className:"flex items-center gap-2",children:[(0,je.jsx)("div",{className:"text-muted-foreground",children:F}),(0,je.jsx)("span",{className:"text-sm font-medium",children:O.label}),O.trend&&(0,je.jsx)("div",{className:B("text-xs",O.trend==="up"?"text-green-600":O.trend==="down"?"text-red-600":"text-gray-600"),children:O.trend==="up"?(0,je.jsx)(va,{className:"h-3 w-3"}):O.trend==="down"?(0,je.jsx)(vc,{className:"h-3 w-3"}):null})]}),(0,je.jsxs)("div",{className:"flex items-center gap-2",children:[(0,je.jsxs)("span",{className:"text-sm font-semibold",children:[w(I),O.unit||"%"]}),k&&k!==100&&(0,je.jsxs)("span",{className:"text-xs text-muted-foreground",children:["/ ",w(k),O.unit]})]})]}),(0,je.jsxs)("div",{className:"relative",children:[(0,je.jsx)(Mo,{value:R,className:"h-2"}),(0,je.jsx)(oe.div,{className:B("absolute top-0 left-0 h-2 rounded-full",_[E]),initial:{width:0},animate:{width:`${R}%`},transition:{duration:d?.5:0}})]}),l&&O.history&&O.history.length>0&&(0,je.jsx)("div",{className:"flex items-end gap-0.5 h-8",children:O.history.slice(-20).map((U,V)=>(0,je.jsx)(oe.div,{className:B("flex-1 rounded-t",U>75?"bg-red-600/50":U>50?"bg-yellow-600/50":"bg-green-600/50"),initial:{height:0},animate:{height:`${U/100*32}px`},transition:{delay:V*.01}},V))})]})},T=O=>{let F=O.status==="online",I=O.metrics;return(0,je.jsxs)(Ve,{className:B("p-4 transition-all",f&&"cursor-pointer hover:shadow-lg",!F&&"opacity-75"),onClick:()=>f?.(O),children:[(0,je.jsxs)("div",{className:"flex items-start justify-between mb-4",children:[(0,je.jsxs)("div",{className:"flex items-center gap-3",children:[(0,je.jsx)("div",{className:B("p-2 rounded-lg bg-gradient-to-br from-primary/20 to-primary/10"),children:S(O.type)}),(0,je.jsxs)("div",{children:[(0,je.jsx)("h4",{className:"font-semibold",children:O.name}),O.location&&(0,je.jsxs)("p",{className:"text-xs text-muted-foreground flex items-center gap-1",children:[(0,je.jsx)(kv,{className:"h-3 w-3"}),O.location]})]})]}),(0,je.jsxs)("div",{className:"flex items-center gap-2",children:[(0,je.jsx)(dt,{variant:F?"secondary":"destructive",leftIcon:F?(0,je.jsx)(Bo,{className:"h-3 w-3"}):(0,je.jsx)(lo,{className:"h-3 w-3"}),children:O.status}),F?(0,je.jsx)(uL,{className:"h-4 w-4 text-green-600"}):(0,je.jsx)(cL,{className:"h-4 w-4 text-red-600"})]})]}),c&&O.uptime!==void 0&&(0,je.jsxs)("div",{className:"mb-4",children:[(0,je.jsxs)("div",{className:"flex justify-between text-sm mb-1",children:[(0,je.jsx)("span",{className:"text-muted-foreground",children:"Uptime"}),(0,je.jsxs)("span",{className:"font-medium",children:[w(O.uptime),"%"]})]}),(0,je.jsx)(Mo,{value:O.uptime,className:"h-1"})]}),a&&(0,je.jsxs)("div",{className:"space-y-3",children:[I.cpu&&N(I.cpu,(0,je.jsx)(Xf,{className:"h-4 w-4"})),I.memory&&N(I.memory,(0,je.jsx)(Mh,{className:"h-4 w-4"})),I.disk&&N(I.disk,(0,je.jsx)(Rv,{className:"h-4 w-4"})),I.network&&N(I.network,(0,je.jsx)(Gx,{className:"h-4 w-4"})),I.temperature&&N(I.temperature,(0,je.jsx)(rL,{className:"h-4 w-4"}))]}),I.requests||I.responseTime||I.errorRate?(0,je.jsxs)("div",{className:"grid grid-cols-3 gap-2 mt-4 pt-4 border-t",children:[I.requests&&(0,je.jsxs)("div",{className:"text-center",children:[(0,je.jsx)("p",{className:"text-xs text-muted-foreground",children:"Requests"}),(0,je.jsxs)("p",{className:"text-sm font-semibold",children:[w(I.requests.value),"/s"]})]}),I.responseTime&&(0,je.jsxs)("div",{className:"text-center",children:[(0,je.jsx)("p",{className:"text-xs text-muted-foreground",children:"Response"}),(0,je.jsxs)("p",{className:"text-sm font-semibold",children:[w(I.responseTime.value),"ms"]})]}),I.errorRate&&(0,je.jsxs)("div",{className:"text-center",children:[(0,je.jsx)("p",{className:"text-xs text-muted-foreground",children:"Errors"}),(0,je.jsxs)("p",{className:"text-sm font-semibold",children:[w(I.errorRate.value),"%"]})]})]}):null,i&&O.alerts&&O.alerts.length>0&&(0,je.jsxs)("div",{className:"mt-4 pt-4 border-t",children:[(0,je.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,je.jsx)("span",{className:"text-sm font-medium",children:"Recent Alerts"}),(0,je.jsx)(dt,{variant:"outline",className:"text-xs",children:O.alerts.length})]}),(0,je.jsx)("div",{className:"space-y-1",children:O.alerts.slice(0,3).map(k=>(0,je.jsxs)("div",{className:B("text-xs p-2 rounded flex items-start gap-2",k.type==="error"?"bg-red-100 dark:bg-red-900/20":k.type==="warning"?"bg-yellow-100 dark:bg-yellow-900/20":"bg-blue-100 dark:bg-blue-900/20",p&&"cursor-pointer hover:opacity-80"),onClick:R=>{R.stopPropagation(),p?.(k)},children:[k.type==="error"?(0,je.jsx)(lo,{className:"h-3 w-3 text-red-600 flex-shrink-0"}):k.type==="warning"?(0,je.jsx)(ya,{className:"h-3 w-3 text-yellow-600 flex-shrink-0"}):(0,je.jsx)(Nn,{className:"h-3 w-3 text-blue-600 flex-shrink-0"}),(0,je.jsx)("span",{className:"flex-1",children:k.message})]},k.id))})]}),O.lastUpdated&&(0,je.jsxs)("div",{className:"mt-4 pt-4 border-t flex items-center justify-between text-xs text-muted-foreground",children:[(0,je.jsx)("span",{children:"Last updated"}),(0,je.jsx)("span",{children:new Date(O.lastUpdated).toLocaleTimeString()})]})]})},A=()=>(0,je.jsx)("div",{className:"space-y-2",children:y.map((O,F)=>(0,je.jsxs)(oe.div,{className:B("flex items-center justify-between p-3 rounded-lg border",f&&"cursor-pointer hover:bg-muted/30 transition-colors"),onClick:()=>f?.(O),initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:F*.05},children:[(0,je.jsxs)("div",{className:"flex items-center gap-3",children:[S(O.type),(0,je.jsxs)("div",{children:[(0,je.jsxs)("div",{className:"flex items-center gap-2",children:[(0,je.jsx)("span",{className:"font-medium",children:O.name}),(0,je.jsx)(dt,{variant:O.status==="online"?"secondary":"destructive",className:"text-xs",leftIcon:O.status==="online"?(0,je.jsx)(Bo,{className:"h-3 w-3"}):(0,je.jsx)(lo,{className:"h-3 w-3"}),children:O.status})]}),O.location&&(0,je.jsx)("p",{className:"text-xs text-muted-foreground",children:O.location})]})]}),(0,je.jsxs)("div",{className:"flex items-center gap-4",children:[O.metrics.cpu&&(0,je.jsxs)("div",{className:"text-right",children:[(0,je.jsx)("p",{className:"text-xs text-muted-foreground",children:"CPU"}),(0,je.jsxs)("p",{className:"text-sm font-semibold",children:[w(O.metrics.cpu.value),"%"]})]}),O.metrics.memory&&(0,je.jsxs)("div",{className:"text-right",children:[(0,je.jsx)("p",{className:"text-xs text-muted-foreground",children:"Memory"}),(0,je.jsxs)("p",{className:"text-sm font-semibold",children:[w(O.metrics.memory.value),O.metrics.memory.unit||"%"]})]}),c&&O.uptime!==void 0&&(0,je.jsxs)("div",{className:"text-right",children:[(0,je.jsx)("p",{className:"text-xs text-muted-foreground",children:"Uptime"}),(0,je.jsxs)("p",{className:"text-sm font-semibold",children:[w(O.uptime),"%"]})]})]})]},O.id))});return(0,je.jsx)(_u,{title:t,variant:n,gradientDirection:o,...m,children:(0,je.jsx)(Bt,{mode:"wait",children:(()=>{switch(r){case"compact":return A();case"grid":return(0,je.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:y.map(O=>(0,je.jsx)("div",{children:T(O)},O.id))});case"detailed":return(0,je.jsxs)(Sl,{value:g,onValueChange:v,children:[(0,je.jsxs)(el,{className:"grid grid-cols-3 w-full",children:[(0,je.jsx)(Dn,{value:"overview",children:"Overview"}),(0,je.jsx)(Dn,{value:"metrics",children:"Metrics"}),(0,je.jsx)(Dn,{value:"alerts",children:"Alerts"})]}),y.map(O=>(0,je.jsxs)("div",{children:[(0,je.jsx)(Xn,{value:"overview",children:T(O)}),(0,je.jsx)(Xn,{value:"metrics",className:"space-y-4",children:(0,je.jsx)("div",{className:"grid grid-cols-2 gap-4",children:Object.entries(O.metrics).map(([F,I])=>!I||F==="custom"||Array.isArray(I)?null:(0,je.jsx)(Ve,{className:"p-4",children:N(I,F==="cpu"?(0,je.jsx)(Xf,{className:"h-4 w-4"}):F==="memory"?(0,je.jsx)(Mh,{className:"h-4 w-4"}):F==="disk"?(0,je.jsx)(Rv,{className:"h-4 w-4"}):F==="network"?(0,je.jsx)(Gx,{className:"h-4 w-4"}):(0,je.jsx)(ha,{className:"h-4 w-4"}))},F))})}),(0,je.jsx)(Xn,{value:"alerts",children:O.alerts&&O.alerts.length>0?(0,je.jsx)("div",{className:"space-y-2",children:O.alerts.map(F=>(0,je.jsxs)("div",{className:B("p-3 rounded-lg flex items-start gap-3",F.type==="error"?"bg-red-100 dark:bg-red-900/20":F.type==="warning"?"bg-yellow-100 dark:bg-yellow-900/20":"bg-blue-100 dark:bg-blue-900/20",p&&"cursor-pointer hover:opacity-80"),onClick:()=>p?.(F),children:[F.type==="error"?(0,je.jsx)(lo,{className:"h-5 w-5 text-red-600"}):F.type==="warning"?(0,je.jsx)(ya,{className:"h-5 w-5 text-yellow-600"}):(0,je.jsx)(Nn,{className:"h-5 w-5 text-blue-600"}),(0,je.jsxs)("div",{className:"flex-1",children:[(0,je.jsx)("p",{className:"font-medium",children:F.message}),(0,je.jsx)("p",{className:"text-xs text-muted-foreground mt-1",children:new Date(F.timestamp).toLocaleString()})]})]},F.id))}):(0,je.jsxs)("div",{className:"text-center py-8 text-muted-foreground",children:[(0,je.jsx)(Bo,{className:"h-12 w-12 mx-auto mb-2 opacity-50"}),(0,je.jsx)("p",{children:"No active alerts"})]})})]},O.id))]});case"default":default:return(0,je.jsx)("div",{className:"space-y-4",children:y.map(O=>(0,je.jsx)("div",{children:T(O)},O.id))})}})()})})}return wfe(Uur);})();
415
+ `),()=>{h.contains(m)&&h.removeChild(m)}},[t]),(0,UXe.jsx)(Uce,{isPresent:t,childRef:a,sizeRef:i,children:tG.cloneElement(e,{ref:a})})}var jXe=({children:e,initial:t,isPresent:r,onExitComplete:n,custom:o,presenceAffectsLayout:a,mode:i,anchorX:s,root:l})=>{let c=ev(Vtr),u=(0,gF.useId)(),d=!0,f=(0,gF.useMemo)(()=>(d=!1,{id:u,initial:t,isPresent:r,custom:o,onExitComplete:p=>{c.set(p,!0);for(let m of c.values())if(!m)return;n&&n()},register:p=>(c.set(p,!1),()=>c.delete(p))}),[r,c,n]);return a&&d&&(f={...f}),(0,gF.useMemo)(()=>{c.forEach((p,m)=>c.set(m,!1))},[r]),HXe.useEffect(()=>{!r&&!c.size&&n&&n()},[r]),i==="popLayout"&&(e=(0,zce.jsx)(zXe,{isPresent:r,anchorX:s,root:l,children:e})),(0,zce.jsx)(X0.Provider,{value:f,children:e})};function Vtr(){return new Map}var nw=D(lt(),1);function rG(e=!0){let t=(0,nw.useContext)(X0);if(t===null)return[!0,null];let{isPresent:r,onExitComplete:n,register:o}=t,a=(0,nw.useId)();(0,nw.useEffect)(()=>{if(e)return o(a)},[e]);let i=(0,nw.useCallback)(()=>e&&n&&n(a),[a,n,e]);return!r&&n?[!1,i]:[!0]}var nG=D(lt(),1),vF=e=>e.key||"";function Hce(e){let t=[];return nG.Children.forEach(e,r=>{(0,nG.isValidElement)(r)&&t.push(r)}),t}var xF=({children:e,custom:t,initial:r=!0,onExitComplete:n,presenceAffectsLayout:o=!0,mode:a="sync",propagate:i=!1,anchorX:s="left",root:l})=>{let[c,u]=rG(i),d=(0,nv.useMemo)(()=>Hce(e),[e]),f=i&&!c?[]:d.map(vF),p=(0,nv.useRef)(!0),m=(0,nv.useRef)(d),h=ev(()=>new Map),[g,v]=(0,nv.useState)(d),[y,x]=(0,nv.useState)(d);cM(()=>{p.current=!1,m.current=d;for(let C=0;C<y.length;C++){let S=vF(y[C]);f.includes(S)?h.delete(S):h.get(S)!==!0&&h.set(S,!1)}},[y,f.length,f.join("-")]);let w=[];if(d!==g){let C=[...d];for(let S=0;S<y.length;S++){let P=y[S],N=vF(P);f.includes(N)||(C.splice(S,0,P),w.push(P))}return a==="wait"&&w.length&&(C=w),x(Hce(C)),v(d),null}let{forceRender:b}=(0,nv.useContext)(sM);return(0,yF.jsx)(yF.Fragment,{children:y.map(C=>{let S=vF(C),P=i&&!c?!1:d===y||f.includes(S),N=()=>{if(h.has(S))h.set(S,!0);else return;let T=!0;h.forEach(A=>{A||(T=!1)}),T&&(b?.(),x(m.current),i&&u?.(),n&&n())};return(0,yF.jsx)(jXe,{isPresent:P,initial:!p.current||r?void 0:!1,custom:t,presenceAffectsLayout:o,mode:a,root:l,onExitComplete:P?void 0:N,anchorX:s,children:C},S)})})};var $Xe=D(lt(),1),oG=(0,$Xe.createContext)({strict:!1});var qXe={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"]},ax={};for(let e in qXe)ax[e]={isEnabled:t=>qXe[e].some(r=>!!t[r])};function WXe(e){for(let t in e)ax[t]={...ax[t],...e[t]}}var Utr=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 bF(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Utr.has(e)}var GXe=e=>!bF(e);function ztr(e){typeof e=="function"&&(GXe=t=>t.startsWith("on")?!bF(t):e(t))}try{ztr(xfe("@emotion/is-prop-valid").default)}catch{}function KXe(e,t,r){let n={};for(let o in e)o==="values"&&typeof e.values=="object"||(GXe(o)||r===!0&&bF(o)||!t&&!bF(o)||e.draggable&&o.startsWith("onDrag"))&&(n[o]=e[o]);return n}var gG=D(Or(),1);var kM=D(lt(),1);var XXe=D(lt(),1),ow=(0,XXe.createContext)({});var sG=D(lt(),1);function aw(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function ix(e){return typeof e=="string"||Array.isArray(e)}var aG=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],wF=["initial",...aG];function A1(e){return aw(e.animate)||wF.some(t=>ix(e[t]))}function iG(e){return!!(A1(e)||e.variants)}function YXe(e,t){if(A1(e)){let{initial:r,animate:n}=e;return{initial:r===!1||ix(r)?r:void 0,animate:ix(n)?n:void 0}}return e.inherit!==!1?t:{}}function ZXe(e){let{initial:t,animate:r}=YXe(e,(0,sG.useContext)(ow));return(0,sG.useMemo)(()=>({initial:t,animate:r}),[QXe(t),QXe(r)])}function QXe(e){return Array.isArray(e)?e.join(" "):e}var wM=D(lt(),1);var tYe=D(lt(),1);var L1={};function JXe(e){for(let t in e)L1[t]=e[t],y1(t)&&(L1[t].isCSSVariable=!0)}function lG(e,{layout:t,layoutId:r}){return Df.has(e)||e.startsWith("origin")||(t||r!==void 0)&&(!!L1[e]||e==="opacity")}var Htr={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},jtr=mh.length;function eYe(e,t,r){let n="",o=!0;for(let a=0;a<jtr;a++){let i=mh[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 c=pF(s,k1[i]);if(!l){o=!1;let u=Htr[i]||i;n+=`${u}(${c}) `}r&&(t[i]=c)}}return n=n.trim(),r?n=r(t,o?"":n):o&&(n="none"),n}function yM(e,t,r){let{style:n,vars:o,transformOrigin:a}=e,i=!1,s=!1;for(let l in t){let c=t[l];if(Df.has(l)){i=!0;continue}else if(y1(l)){o[l]=c;continue}else{let u=pF(c,k1[l]);l.startsWith("origin")?(s=!0,a[l]=u):n[l]=u}}if(t.transform||(i||r?n.transform=eYe(t,e.transform,r):n.transform&&(n.transform="none")),s){let{originX:l="50%",originY:c="50%",originZ:u=0}=a;n.transformOrigin=`${l} ${c} ${u}`}}var xM=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function jce(e,t,r){for(let n in t)!Io(t[n])&&!lG(n,r)&&(e[n]=t[n])}function $tr({transformTemplate:e},t){return(0,tYe.useMemo)(()=>{let r=xM();return yM(r,t,e),Object.assign({},r.vars,r.style)},[t])}function qtr(e,t){let r=e.style||{},n={};return jce(n,r,e),Object.assign(n,$tr(e,t)),n}function rYe(e,t){let r={},n=qtr(e,t);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,n.userSelect=n.WebkitUserSelect=n.WebkitTouchCallout="none",n.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=n,r}var oYe=D(lt(),1);var Wtr={offset:"stroke-dashoffset",array:"stroke-dasharray"},Gtr={offset:"strokeDashoffset",array:"strokeDasharray"};function nYe(e,t,r=1,n=0,o=!0){e.pathLength=1;let a=o?Wtr:Gtr;e[a.offset]=mr.transform(-n);let i=mr.transform(t),s=mr.transform(r);e[a.array]=`${i} ${s}`}function cG(e,{attrX:t,attrY:r,attrScale:n,pathLength:o,pathSpacing:a=1,pathOffset:i=0,...s},l,c,u){if(yM(e,s,c),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=u?.transformBox??"fill-box",delete d.transformBox),t!==void 0&&(d.x=t),r!==void 0&&(d.y=r),n!==void 0&&(d.scale=n),o!==void 0&&nYe(d,o,a,i,!1)}var uG=()=>({...xM(),attrs:{}});var dG=e=>typeof e=="string"&&e.toLowerCase()==="svg";function aYe(e,t,r,n){let o=(0,oYe.useMemo)(()=>{let a=uG();return cG(a,t,dG(n),e.transformTemplate,e.style),{...a.attrs,style:{...a.style}}},[t]);if(e.style){let a={};jce(a,e.style,e),o.style={...a,...o.style}}return o}var iYe=["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 bM(e){return typeof e!="string"||e.includes("-")?!1:!!(iYe.indexOf(e)>-1||/[A-Z]/u.test(e))}function sYe(e,t,r,{latestValues:n},o,a=!1){let s=(bM(e)?aYe:rYe)(t,n,o,e),l=KXe(t,typeof e=="string",a),c=e!==wM.Fragment?{...l,...s,ref:r}:{},{children:u}=t,d=(0,wM.useMemo)(()=>Io(u)?u.get():u,[u]);return(0,wM.createElement)(e,{...c,children:d})}var $ce=D(lt(),1);function lYe(e){let t=[{},{}];return e?.values.forEach((r,n)=>{t[0][n]=r.get(),t[1][n]=r.getVelocity()}),t}function CM(e,t,r,n){if(typeof t=="function"){let[o,a]=lYe(n);t=t(r!==void 0?r:e.custom,o,a)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){let[o,a]=lYe(n);t=t(r!==void 0?r:e.custom,o,a)}return t}function SM(e){return Io(e)?e.get():e}function Ktr({scrapeMotionValuesFromProps:e,createRenderState:t},r,n,o){return{latestValues:Xtr(r,n,o,e),renderState:t()}}function Xtr(e,t,r,n){let o={},a=n(e,{});for(let f in a)o[f]=SM(a[f]);let{initial:i,animate:s}=e,l=A1(e),c=iG(e);t&&c&&!l&&e.inherit!==!1&&(i===void 0&&(i=t.initial),s===void 0&&(s=t.animate));let u=r?r.initial===!1:!1;u=u||i===!1;let d=u?s:i;if(d&&typeof d!="boolean"&&!aw(d)){let f=Array.isArray(d)?d:[d];for(let p=0;p<f.length;p++){let m=CM(e,f[p]);if(m){let{transitionEnd:h,transition:g,...v}=m;for(let y in v){let x=v[y];if(Array.isArray(x)){let w=u?x.length-1:0;x=x[w]}x!==null&&(o[y]=x)}for(let y in h)o[y]=h[y]}}}return o}var fG=e=>(t,r)=>{let n=(0,$ce.useContext)(ow),o=(0,$ce.useContext)(X0),a=()=>Ktr(e,t,n,o);return r?a():ev(a)};function PM(e,t,r){let{style:n}=e,o={};for(let a in n)(Io(n[a])||t.style&&Io(t.style[a])||lG(a,e)||r?.getValue(a)?.liveStyle!==void 0)&&(o[a]=n[a]);return o}var cYe=fG({scrapeMotionValuesFromProps:PM,createRenderState:xM});function pG(e,t,r){let n=PM(e,t,r);for(let o in e)if(Io(e[o])||Io(t[o])){let a=mh.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;n[a]=e[o]}return n}var uYe=fG({scrapeMotionValuesFromProps:pG,createRenderState:uG});var dYe=Symbol.for("motionComponentSymbol");var fYe=D(lt(),1);function sx(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function pYe(e,t,r){return(0,fYe.useCallback)(n=>{n&&e.onMount&&e.onMount(n),t&&(n?t.mount(n):t.unmount()),r&&(typeof r=="function"?r(n):sx(r)&&(r.current=n))},[t])}var Md=D(lt(),1);var IM=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase();var Ytr="framerAppearId",mG="data-"+IM(Ytr);var mYe=D(lt(),1),hG=(0,mYe.createContext)({});function hYe(e,t,r,n,o){let{visualElement:a}=(0,Md.useContext)(ow),i=(0,Md.useContext)(oG),s=(0,Md.useContext)(X0),l=(0,Md.useContext)(rw).reducedMotion,c=(0,Md.useRef)(null);n=n||i.renderer,!c.current&&n&&(c.current=n(e,{visualState:t,parent:a,props:r,presenceContext:s,blockInitialAnimation:s?s.initial===!1:!1,reducedMotionConfig:l}));let u=c.current,d=(0,Md.useContext)(hG);u&&!u.projection&&o&&(u.type==="html"||u.type==="svg")&&Qtr(c.current,r,o,d);let f=(0,Md.useRef)(!1);(0,Md.useInsertionEffect)(()=>{u&&f.current&&u.update(r,s)});let p=r[mG],m=(0,Md.useRef)(!!p&&!window.MotionHandoffIsComplete?.(p)&&window.MotionHasOptimisedAnimation?.(p));return cM(()=>{u&&(f.current=!0,window.MotionIsMounted=!0,u.updateFeatures(),u.scheduleRenderMicrotask(),m.current&&u.animationState&&u.animationState.animateChanges())}),(0,Md.useEffect)(()=>{u&&(!m.current&&u.animationState&&u.animationState.animateChanges(),m.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(p)}),m.current=!1),u.enteringChildren=void 0)}),u}function Qtr(e,t,r,n){let{layoutId:o,layout:a,drag:i,dragConstraints:s,layoutScroll:l,layoutRoot:c,layoutCrossfade:u}=t;e.projection=new r(e.latestValues,t["data-framer-portal-id"]?void 0:gYe(e.parent)),e.projection.setOptions({layoutId:o,layout:a,alwaysMeasureLayout:!!i||s&&sx(s),visualElement:e,animationType:typeof a=="string"?a:"both",initialPromotionConfig:n,crossfade:u,layoutScroll:l,layoutRoot:c})}function gYe(e){if(e)return e.options.allowProjection!==!1?e.projection:gYe(e.parent)}function vG(e,{forwardMotionProps:t=!1}={},r,n){r&&WXe(r);let o=bM(e)?uYe:cYe;function a(s,l){let c,u={...(0,kM.useContext)(rw),...s,layoutId:Ztr(s)},{isStatic:d}=u,f=ZXe(s),p=o(s,d);if(!d&&lM){Jtr(u,r);let m=err(u);c=m.MeasureLayout,f.visualElement=hYe(e,p,u,n,m.ProjectionNode)}return(0,gG.jsxs)(ow.Provider,{value:f,children:[c&&f.visualElement?(0,gG.jsx)(c,{visualElement:f.visualElement,...u}):null,sYe(e,s,pYe(p,f.visualElement,l),p,d,t)]})}a.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;let i=(0,kM.forwardRef)(a);return i[dYe]=e,i}function Ztr({layoutId:e}){let t=(0,kM.useContext)(sM).id;return t&&e!==void 0?t+"-"+e:e}function Jtr(e,t){let r=(0,kM.useContext)(oG).strict}function err(e){let{drag:t,layout:r}=ax;if(!t&&!r)return{};let n={...t,...r};return{MeasureLayout:t?.isEnabled(e)||r?.isEnabled(e)?n.MeasureLayout:void 0,ProjectionNode:n.ProjectionNode}}function vYe(e,t){if(typeof Proxy>"u")return vG;let r=new Map,n=(a,i)=>vG(a,i,e,t),o=(a,i)=>n(a,i);return new Proxy(o,{get:(a,i)=>i==="create"?n:(r.has(i)||r.set(i,vG(i,void 0,e,t)),r.get(i))})}var EYe=D(lt(),1);function yG({top:e,left:t,right:r,bottom:n}){return{x:{min:t,max:r},y:{min:e,max:n}}}function yYe({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function xYe(e,t){if(!t)return e;let r=t({x:e.left,y:e.top}),n=t({x:e.right,y:e.bottom});return{top:r.y,left:r.x,bottom:n.y,right:n.x}}function qce(e){return e===void 0||e===1}function xG({scale:e,scaleX:t,scaleY:r}){return!qce(e)||!qce(t)||!qce(r)}function lx(e){return xG(e)||Wce(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Wce(e){return bYe(e.x)||bYe(e.y)}function bYe(e){return e&&e!=="0%"}function CF(e,t,r){let n=e-r,o=t*n;return r+o}function wYe(e,t,r,n,o){return o!==void 0&&(e=CF(e,o,n)),CF(e,r,n)+t}function Gce(e,t=0,r=1,n,o){e.min=wYe(e.min,t,r,n,o),e.max=wYe(e.max,t,r,n,o)}function Kce(e,{x:t,y:r}){Gce(e.x,t.translate,t.scale,t.originPoint),Gce(e.y,r.translate,r.scale,r.originPoint)}var CYe=.999999999999,SYe=1.0000000000001;function IYe(e,t,r,n=!1){let o=r.length;if(!o)return;t.x=t.y=1;let a,i;for(let s=0;s<o;s++){a=r[s],i=a.projectionDelta;let{visualElement:l}=a.options;l&&l.props.style&&l.props.style.display==="contents"||(n&&a.options.layoutScroll&&a.scroll&&a!==a.root&&E1(e,{x:-a.scroll.offset.x,y:-a.scroll.offset.y}),i&&(t.x*=i.x.scale,t.y*=i.y.scale,Kce(e,i)),n&&lx(a.latestValues)&&E1(e,a.latestValues))}t.x<SYe&&t.x>CYe&&(t.x=1),t.y<SYe&&t.y>CYe&&(t.y=1)}function iw(e,t){e.min=e.min+t,e.max=e.max+t}function PYe(e,t,r,n,o=.5){let a=Ln(e.min,e.max,o);Gce(e,t,r,a,n)}function E1(e,t){PYe(e.x,t.x,t.scaleX,t.scale,t.originX),PYe(e.y,t.y,t.scaleY,t.scale,t.originY)}function Xce(e,t){return yG(xYe(e.getBoundingClientRect(),t))}function kYe(e,t,r){let n=Xce(e,r),{scroll:o}=t;return o&&(iw(n.x,o.offset.x),iw(n.y,o.offset.y)),n}var RYe=()=>({translate:0,scale:1,origin:0,originPoint:0}),D1=()=>({x:RYe(),y:RYe()}),NYe=()=>({min:0,max:0}),da=()=>({x:NYe(),y:NYe()});var SF={current:null},bG={current:!1};function MYe(){if(bG.current=!0,!!lM)if(window.matchMedia){let e=window.matchMedia("(prefers-reduced-motion)"),t=()=>SF.current=e.matches;e.addEventListener("change",t),t()}else SF.current=!1}var sw=new WeakMap;function TYe(e,t,r){for(let n in t){let o=t[n],a=r[n];if(Io(o))e.addValue(n,o);else if(Io(a))e.addValue(n,Nd(o,{owner:e}));else if(a!==o)if(e.hasValue(n)){let i=e.getValue(n);i.liveStyle===!0?i.jump(o):i.hasAnimated||i.set(o)}else{let i=e.getStaticValue(n);e.addValue(n,Nd(i!==void 0?i:o,{owner:e}))}}for(let n in r)t[n]===void 0&&e.removeValue(n);return t}var AYe=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],RM=class{scrapeMotionValuesFromProps(t,r,n){return{}}constructor({parent:t,props:r,presenceContext:n,reducedMotionConfig:o,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=nx,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=Qi.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,dn.render(this.render,!1,!0))};let{latestValues:l,renderState:c}=i;this.latestValues=l,this.baseTarget={...l},this.initialValues=r.initial?{...l}:{},this.renderState=c,this.parent=t,this.props=r,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=s,this.blockInitialAnimation=!!a,this.isControllingVariants=A1(r),this.isVariantNode=iG(r),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);let{willChange:u,...d}=this.scrapeMotionValuesFromProps(r,{},this);for(let f in d){let p=d[f];l[f]!==void 0&&Io(p)&&p.set(l[f])}}mount(t){this.current=t,sw.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,n)=>this.bindToMotionValue(n,r)),bG.current||MYe(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:SF.current,this.parent?.addChild(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Hc(this.notifyUpdate),Hc(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 n=Df.has(t);n&&this.onBindTransform&&this.onBindTransform();let o=r.on("change",i=>{this.latestValues[t]=i,this.props.onUpdate&&dn.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()}),a;window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,t,r)),this.valueSubscriptions.set(t,()=>{o(),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 ax){let r=ax[t];if(!r)continue;let{isEnabled:n,Feature:o}=r;if(!this.features[t]&&o&&n(this.props)&&(this.features[t]=new o(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):da()}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 n=0;n<AYe.length;n++){let o=AYe[n];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);let a="on"+o,i=t[a];i&&(this.propEventSubscriptions[o]=this.on(o,i))}this.prevMotionValues=TYe(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 n=this.values.get(t);r!==n&&(n&&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 n=this.values.get(t);return n===void 0&&r!==void 0&&(n=Nd(r===null?void 0:r,{owner:this}),this.addValue(t,n)),n}readValue(t,r){let n=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return n!=null&&(typeof n=="string"&&(O_(n)||F_(n))?n=parseFloat(n):!Vce(n)&&$c.test(r)&&(n=uF(t,r)),this.setBaseTarget(t,Io(n)?n.get():n)),Io(n)?n.get():n}setBaseTarget(t,r){this.baseTarget[t]=r}getBaseTarget(t){let{initial:r}=this.props,n;if(typeof r=="string"||typeof r=="object"){let a=CM(this.props,r,this.presenceContext?.custom);a&&(n=a[t])}if(r&&n!==void 0)return n;let o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!Io(o)?o:this.initialValues[t]!==void 0&&n===void 0?void 0:this.baseTarget[t]}on(t,r){return this.events[t]||(this.events[t]=new Jy),this.events[t].add(r)}notify(t,...r){this.events[t]&&this.events[t].notify(...r)}scheduleRenderMicrotask(){N1.render(this.render)}};var NM=class extends RM{constructor(){super(...arguments),this.KeyframeResolver=dF}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:n}){delete r[t],delete n[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:t}=this.props;Io(t)&&(this.childSubscription=t.on("change",r=>{this.current&&(this.current.textContent=`${r}`)}))}};function wG(e,{style:t,vars:r},n,o){let a=e.style,i;for(i in t)a[i]=t[i];o?.applyProjectionStyles(a,n);for(i in r)a.setProperty(i,r[i])}function trr(e){return window.getComputedStyle(e)}var MM=class extends NM{constructor(){super(...arguments),this.type="html",this.renderInstance=wG}readValueFromInstance(t,r){if(Df.has(r))return this.projection?.isProjecting?nF(r):bce(t,r);{let n=trr(t),o=(y1(r)?n.getPropertyValue(r):n[r])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:r}){return Xce(t,r)}build(t,r,n){yM(t,r,n.transformTemplate)}scrapeMotionValuesFromProps(t,r,n){return PM(t,r,n)}};var CG=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 LYe(e,t,r,n){wG(e,t,void 0,n);for(let o in t.attrs)e.setAttribute(CG.has(o)?o:IM(o),t.attrs[o])}var TM=class extends NM{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=da}getBaseTargetFromProps(t,r){return t[r]}readValueFromInstance(t,r){if(Df.has(r)){let n=cF(r);return n&&n.default||0}return r=CG.has(r)?r:IM(r),t.getAttribute(r)}scrapeMotionValuesFromProps(t,r,n){return pG(t,r,n)}build(t,r,n){cG(t,r,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(t,r,n,o){LYe(t,r,n,o)}mount(t){this.isSVGTag=dG(t.tagName),super.mount(t)}};var DYe=(e,t)=>bM(e)?new TM(t):new MM(t,{allowProjection:e!==EYe.Fragment});function ov(e,t,r){let n=e.getProps();return CM(n,t,r!==void 0?r:n.custom,e)}var PF=e=>Array.isArray(e);function rrr(e,t,r){e.hasValue(t)?e.getValue(t).set(r):e.addValue(t,Nd(r))}function nrr(e){return PF(e)?e[e.length-1]||0:e}function OYe(e,t){let r=ov(e,t),{transitionEnd:n={},transition:o={},...a}=r||{};a={...a,...n};for(let i in a){let s=nrr(a[i]);rrr(e,i,s)}}function _Ye(e){return!!(Io(e)&&e.add)}function IF(e,t){let r=e.getValue("willChange");if(_Ye(r))return r.add(t);if(!r&&zc.WillChange){let n=new zc.WillChange("auto");e.addValue("willChange",n),n.add(t)}}function SG(e){return e.props[mG]}var orr=e=>e!==null;function FYe(e,{repeat:t,repeatType:r="loop"},n){let o=e.filter(orr),a=t&&r!=="loop"&&t%2===1?0:o.length-1;return!a||n===void 0?o[a]:n}var arr={type:"spring",stiffness:500,damping:25,restSpeed:10},irr=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),srr={type:"keyframes",duration:.8},lrr={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},BYe=(e,{keyframes:t})=>t.length>2?srr:Df.has(e)?e.startsWith("scale")?irr(t[1]):arr:lrr;function VYe({when:e,delay:t,delayChildren:r,staggerChildren:n,staggerDirection:o,repeat:a,repeatType:i,repeatDelay:s,from:l,elapsed:c,...u}){return!!Object.keys(u).length}var AM=(e,t,r,n={},o,a)=>i=>{let s=I1(n,e)||{},l=s.delay||n.delay||0,{elapsed:c=0}=n;c=c-ds(l);let u={keyframes:Array.isArray(r)?r:[null,r],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-c,onUpdate:f=>{t.set(f),s.onUpdate&&s.onUpdate(f)},onComplete:()=>{i(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:o};VYe(s)||Object.assign(u,BYe(e,u)),u.duration&&(u.duration=ds(u.duration)),u.repeatDelay&&(u.repeatDelay=ds(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(gM(u),u.delay===0&&(d=!0)),(zc.instantAnimations||zc.skipAnimations)&&(d=!0,gM(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){let f=FYe(u.keyframes,s);if(f!==void 0){dn.update(()=>{u.onUpdate(f),u.onComplete()});return}}return s.isSync?new rx(u):new aF(u)};function crr({protectedKeys:e,needsAnimating:t},r){let n=e.hasOwnProperty(r)&&t[r]!==!0;return t[r]=!1,n}function LM(e,t,{delay:r=0,transitionOverride:n,type:o}={}){let{transition:a=e.getDefaultTransition(),transitionEnd:i,...s}=t;n&&(a=n);let l=[],c=o&&e.animationState&&e.animationState.getState()[o];for(let u in s){let d=e.getValue(u,e.latestValues[u]??null),f=s[u];if(f===void 0||c&&crr(c,u))continue;let p={delay:r,...I1(a||{},u)},m=d.get();if(m!==void 0&&!d.isAnimating&&!Array.isArray(f)&&f===m&&!p.velocity)continue;let h=!1;if(window.MotionHandoffAnimation){let v=SG(e);if(v){let y=window.MotionHandoffAnimation(v,u,dn);y!==null&&(p.startTime=y,h=!0)}}IF(e,u),d.start(AM(u,d,f,e.shouldReduceMotion&&sF.has(u)?{type:!1}:p,e,h));let g=d.animation;g&&l.push(g)}return i&&Promise.all(l).then(()=>{dn.update(()=>{i&&OYe(e,i)})}),l}function PG(e,t,r,n=0,o=1){let a=Array.from(e).sort((c,u)=>c.sortNodePosition(u)).indexOf(t),i=e.size,s=(i-1)*n;return typeof r=="function"?r(a,i):o===1?a*n:s-a*n}function IG(e,t,r={}){let n=ov(e,t,r.type==="exit"?e.presenceContext?.custom:void 0),{transition:o=e.getDefaultTransition()||{}}=n||{};r.transitionOverride&&(o=r.transitionOverride);let a=n?()=>Promise.all(LM(e,n,r)):()=>Promise.resolve(),i=e.variantChildren&&e.variantChildren.size?(l=0)=>{let{delayChildren:c=0,staggerChildren:u,staggerDirection:d}=o;return urr(e,t,l,c,u,d,r)}:()=>Promise.resolve(),{when:s}=o;if(s){let[l,c]=s==="beforeChildren"?[a,i]:[i,a];return l().then(()=>c())}else return Promise.all([a(),i(r.delay)])}function urr(e,t,r=0,n=0,o=0,a=1,i){let s=[];for(let l of e.variantChildren)l.notify("AnimationStart",t),s.push(IG(l,t,{...i,delay:r+(typeof n=="function"?0:n)+PG(e.variantChildren,l,n,o,a)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(s)}function UYe(e,t,r={}){e.notify("AnimationStart",t);let n;if(Array.isArray(t)){let o=t.map(a=>IG(e,a,r));n=Promise.all(o)}else if(typeof t=="string")n=IG(e,t,r);else{let o=typeof t=="function"?ov(e,t,r.custom):t;n=Promise.all(LM(e,o,r))}return n.then(()=>{e.notify("AnimationComplete",t)})}function Yce(e,t){if(!Array.isArray(t))return!1;let r=t.length;if(r!==e.length)return!1;for(let n=0;n<r;n++)if(t[n]!==e[n])return!1;return!0}var drr=wF.length;function Qce(e){if(!e)return;if(!e.isControllingVariants){let r=e.parent?Qce(e.parent)||{}:{};return e.props.initial!==void 0&&(r.initial=e.props.initial),r}let t={};for(let r=0;r<drr;r++){let n=wF[r],o=e.props[n];(ix(o)||o===!1)&&(t[n]=o)}return t}var frr=[...aG].reverse(),prr=aG.length;function mrr(e){return t=>Promise.all(t.map(({animation:r,options:n})=>UYe(e,r,n)))}function HYe(e){let t=mrr(e),r=zYe(),n=!0,o=l=>(c,u)=>{let d=ov(e,u,l==="exit"?e.presenceContext?.custom:void 0);if(d){let{transition:f,transitionEnd:p,...m}=d;c={...c,...m,...p}}return c};function a(l){t=l(e)}function i(l){let{props:c}=e,u=Qce(e.parent)||{},d=[],f=new Set,p={},m=1/0;for(let g=0;g<prr;g++){let v=frr[g],y=r[v],x=c[v]!==void 0?c[v]:u[v],w=ix(x),b=v===l?y.isActive:null;b===!1&&(m=g);let C=x===u[v]&&x!==c[v]&&w;if(C&&n&&e.manuallyAnimateOnMount&&(C=!1),y.protectedKeys={...p},!y.isActive&&b===null||!x&&!y.prevProp||aw(x)||typeof x=="boolean")continue;let S=hrr(y.prevProp,x),P=S||v===l&&y.isActive&&!C&&w||g>m&&w,N=!1,T=Array.isArray(x)?x:[x],A=T.reduce(o(v),{});b===!1&&(A={});let{prevResolvedValues:M={}}=y,O={...M,...A},F=R=>{P=!0,f.has(R)&&(N=!0,f.delete(R)),y.needsAnimating[R]=!0;let E=e.getValue(R);E&&(E.liveStyle=!1)};for(let R in O){let E=A[R],_=M[R];if(p.hasOwnProperty(R))continue;let U=!1;PF(E)&&PF(_)?U=!Yce(E,_):U=E!==_,U?E!=null?F(R):f.add(R):E!==void 0&&f.has(R)?F(R):y.protectedKeys[R]=!0}y.prevProp=x,y.prevResolvedValues=A,y.isActive&&(p={...p,...A}),n&&e.blockInitialAnimation&&(P=!1);let I=C&&S;P&&(!I||N)&&d.push(...T.map(R=>{let E={type:v};if(typeof R=="string"&&n&&!I&&e.manuallyAnimateOnMount&&e.parent){let{parent:_}=e,U=ov(_,R);if(_.enteringChildren&&U){let{delayChildren:V}=U.transition||{};E.delay=PG(_.enteringChildren,e,V)}}return{animation:R,options:E}}))}if(f.size){let g={};if(typeof c.initial!="boolean"){let v=ov(e,Array.isArray(c.initial)?c.initial[0]:c.initial);v&&v.transition&&(g.transition=v.transition)}f.forEach(v=>{let y=e.getBaseTarget(v),x=e.getValue(v);x&&(x.liveStyle=!0),g[v]=y??null}),d.push({animation:g})}let h=!!d.length;return n&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(h=!1),n=!1,h?t(d):Promise.resolve()}function s(l,c){if(r[l].isActive===c)return Promise.resolve();e.variantChildren?.forEach(d=>d.animationState?.setActive(l,c)),r[l].isActive=c;let u=i(l);for(let d in r)r[d].protectedKeys={};return u}return{animateChanges:i,setActive:s,setAnimateFunction:a,getState:()=>r,reset:()=>{r=zYe(),n=!0}}}function hrr(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Yce(t,e):!1}function O1(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function zYe(){return{animate:O1(!0),whileInView:O1(),whileHover:O1(),whileTap:O1(),whileDrag:O1(),whileFocus:O1(),exit:O1()}}var Ol=class{constructor(t){this.isMounted=!1,this.node=t}update(){}};var kG=class extends Ol{constructor(t){super(t),t.animationState||(t.animationState=HYe(t))}updateAnimationControlsSubscription(){let{animate:t}=this.node.getProps();aw(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 grr=0,RG=class extends Ol{constructor(){super(...arguments),this.id=grr++}update(){if(!this.node.presenceContext)return;let{isPresent:t,onExitComplete:r}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===n)return;let o=this.node.animationState.setActive("exit",!t);r&&!t&&o.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 jYe={animation:{Feature:kG},exit:{Feature:RG}};function cx(e,t,r,n={passive:!0}){return e.addEventListener(t,r,n),()=>e.removeEventListener(t,r)}function ux(e){return{point:{x:e.pageX,y:e.pageY}}}var $Ye=e=>t=>M1(t)&&e(t,ux(t));function lw(e,t,r,n){return cx(e,t,$Ye(r),n)}var KYe=1e-4,vrr=1-KYe,yrr=1+KYe,XYe=.01,xrr=0-XYe,brr=0+XYe;function ll(e){return e.max-e.min}function YYe(e,t,r){return Math.abs(e-t)<=r}function qYe(e,t,r,n=.5){e.origin=n,e.originPoint=Ln(t.min,t.max,e.origin),e.scale=ll(r)/ll(t),e.translate=Ln(r.min,r.max,e.origin)-e.originPoint,(e.scale>=vrr&&e.scale<=yrr||isNaN(e.scale))&&(e.scale=1),(e.translate>=xrr&&e.translate<=brr||isNaN(e.translate))&&(e.translate=0)}function EM(e,t,r,n){qYe(e.x,t.x,r.x,n?n.originX:void 0),qYe(e.y,t.y,r.y,n?n.originY:void 0)}function WYe(e,t,r){e.min=r.min+t.min,e.max=e.min+ll(t)}function QYe(e,t,r){WYe(e.x,t.x,r.x),WYe(e.y,t.y,r.y)}function GYe(e,t,r){e.min=t.min-r.min,e.max=e.min+ll(t)}function DM(e,t,r){GYe(e.x,t.x,r.x),GYe(e.y,t.y,r.y)}function Td(e){return[e("x"),e("y")]}var NG=({current:e})=>e?e.ownerDocument.defaultView:null;var ZYe=(e,t)=>Math.abs(e-t);function JYe(e,t){let r=ZYe(e.x,t.x),n=ZYe(e.y,t.y);return Math.sqrt(r**2+n**2)}var OM=class{constructor(t,r,{transformPagePoint:n,contextWindow:o=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=Jce(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,m=JYe(f.offset,{x:0,y:0})>=this.distanceThreshold;if(!p&&!m)return;let{point:h}=f,{timestamp:g}=Yi;this.history.push({...h,timestamp:g});let{onStart:v,onMove:y}=this.handlers;p||(v&&v(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),y&&y(this.lastMoveEvent,f)},this.handlePointerMove=(f,p)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=Zce(p,this.transformPagePoint),dn.update(this.updatePoint,!0)},this.handlePointerUp=(f,p)=>{this.end();let{onEnd:m,onSessionEnd:h,resumeAnimation:g}=this.handlers;if(this.dragSnapToOrigin&&g&&g(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let v=Jce(f.type==="pointercancel"?this.lastMoveEventInfo:Zce(p,this.transformPagePoint),this.history);this.startEvent&&m&&m(f,v),h&&h(f,v)},!M1(t))return;this.dragSnapToOrigin=a,this.handlers=r,this.transformPagePoint=n,this.distanceThreshold=i,this.contextWindow=o||window;let s=ux(t),l=Zce(s,this.transformPagePoint),{point:c}=l,{timestamp:u}=Yi;this.history=[{...c,timestamp:u}];let{onSessionStart:d}=r;d&&d(t,Jce(l,this.history)),this.removeListeners=dh(lw(this.contextWindow,"pointermove",this.handlePointerMove),lw(this.contextWindow,"pointerup",this.handlePointerUp),lw(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Hc(this.updatePoint)}};function Zce(e,t){return t?{point:t(e.point)}:e}function eQe(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Jce({point:e},t){return{point:e,delta:eQe(e,tQe(t)),offset:eQe(e,wrr(t)),velocity:Crr(t,.1)}}function wrr(e){return e[0]}function tQe(e){return e[e.length-1]}function Crr(e,t){if(e.length<2)return{x:0,y:0};let r=e.length-1,n=null,o=tQe(e);for(;r>=0&&(n=e[r],!(o.timestamp-n.timestamp>ds(t)));)r--;if(!n)return{x:0,y:0};let a=lc(o.timestamp-n.timestamp);if(a===0)return{x:0,y:0};let i={x:(o.x-n.x)/a,y:(o.y-n.y)/a};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}function iQe(e,{min:t,max:r},n){return t!==void 0&&e<t?e=n?Ln(t,e,n.min):Math.max(e,t):r!==void 0&&e>r&&(e=n?Ln(r,e,n.max):Math.min(e,r)),e}function rQe(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 sQe(e,{top:t,left:r,bottom:n,right:o}){return{x:rQe(e.x,r,o),y:rQe(e.y,t,n)}}function nQe(e,t){let r=t.min-e.min,n=t.max-e.max;return t.max-t.min<e.max-e.min&&([r,n]=[n,r]),{min:r,max:n}}function lQe(e,t){return{x:nQe(e.x,t.x),y:nQe(e.y,t.y)}}function cQe(e,t){let r=.5,n=ll(e),o=ll(t);return o>n?r=Zp(t.min,t.max-n,e.min):n>o&&(r=Zp(e.min,e.max-o,t.min)),Dl(0,1,r)}function uQe(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 MG=.35;function dQe(e=MG){return e===!1?e=0:e===!0&&(e=MG),{x:oQe(e,"left","right"),y:oQe(e,"top","bottom")}}function oQe(e,t,r){return{min:aQe(e,t),max:aQe(e,r)}}function aQe(e,t){return typeof e=="number"?e:e[t]||0}var Srr=new WeakMap,AG=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=da(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:r=!1,distanceThreshold:n}={}){let{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;let a=d=>{let{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),r&&this.snapToCursor(ux(d).point)},i=(d,f)=>{let{drag:p,dragPropagation:m,onDragStart:h}=this.getProps();if(p&&!m&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Ece(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),Td(v=>{let y=this.getAxisMotionValue(v).get()||0;if(jc.test(y)){let{projection:x}=this.visualElement;if(x&&x.layout){let w=x.layout.layoutBox[v];w&&(y=ll(w)*(parseFloat(y)/100))}}this.originPoint[v]=y}),h&&dn.postRender(()=>h(d,f)),IF(this.visualElement,"transform");let{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",!0)},s=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f;let{dragPropagation:p,dragDirectionLock:m,onDirectionLock:h,onDrag:g}=this.getProps();if(!p&&!this.openDragLock)return;let{offset:v}=f;if(m&&this.currentDirection===null){this.currentDirection=Prr(v),this.currentDirection!==null&&h&&h(this.currentDirection);return}this.updateAxis("x",f.point,v),this.updateAxis("y",f.point,v),this.visualElement.render(),g&&g(d,f)},l=(d,f)=>{this.latestPointerEvent=d,this.latestPanInfo=f,this.stop(d,f),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>Td(d=>this.getAnimationState(d)==="paused"&&this.getAxisMotionValue(d).animation?.play()),{dragSnapToOrigin:u}=this.getProps();this.panSession=new OM(t,{onSessionStart:a,onStart:i,onMove:s,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,distanceThreshold:n,contextWindow:NG(this.visualElement)})}stop(t,r){let n=t||this.latestPointerEvent,o=r||this.latestPanInfo,a=this.isDragging;if(this.cancel(),!a||!o||!n)return;let{velocity:i}=o;this.startAnimation(i);let{onDragEnd:s}=this.getProps();s&&dn.postRender(()=>s(n,o))}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:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),r&&r.setActive("whileDrag",!1)}updateAxis(t,r,n){let{drag:o}=this.getProps();if(!n||!TG(t,o,this.currentDirection))return;let a=this.getAxisMotionValue(t),i=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(i=iQe(i,this.constraints[t],this.elastic[t])),a.set(i)}resolveConstraints(){let{dragConstraints:t,dragElastic:r}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,o=this.constraints;t&&sx(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&n?this.constraints=sQe(n.layoutBox,t):this.constraints=!1,this.elastic=dQe(r),o!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&Td(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=uQe(n.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){let{dragConstraints:t,onMeasureDragConstraints:r}=this.getProps();if(!t||!sx(t))return!1;let n=t.current;sc(n!==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:o}=this.visualElement;if(!o||!o.layout)return!1;let a=kYe(n,o.root,this.visualElement.getTransformPagePoint()),i=lQe(o.layout.layoutBox,a);if(r){let s=r(yYe(i));this.hasMutatedConstraints=!!s,s&&(i=yG(s))}return i}startAnimation(t){let{drag:r,dragMomentum:n,dragElastic:o,dragTransition:a,dragSnapToOrigin:i,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},c=Td(u=>{if(!TG(u,r,this.currentDirection))return;let d=l&&l[u]||{};i&&(d={min:0,max:0});let f=o?200:1e6,p=o?40:1e7,m={type:"inertia",velocity:n?t[u]:0,bounceStiffness:f,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...a,...d};return this.startAxisValueAnimation(u,m)});return Promise.all(c).then(s)}startAxisValueAnimation(t,r){let n=this.getAxisMotionValue(t);return IF(this.visualElement,t),n.start(AM(t,n,0,r,this.visualElement,!1))}stopAnimation(){Td(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Td(t=>this.getAxisMotionValue(t).animation?.pause())}getAnimationState(t){return this.getAxisMotionValue(t).animation?.state}getAxisMotionValue(t){let r=`_drag${t.toUpperCase()}`,n=this.visualElement.getProps(),o=n[r];return o||this.visualElement.getValue(t,(n.initial?n.initial[t]:void 0)||0)}snapToCursor(t){Td(r=>{let{drag:n}=this.getProps();if(!TG(r,n,this.currentDirection))return;let{projection:o}=this.visualElement,a=this.getAxisMotionValue(r);if(o&&o.layout){let{min:i,max:s}=o.layout.layoutBox[r];a.set(t[r]-Ln(i,s,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:t,dragConstraints:r}=this.getProps(),{projection:n}=this.visualElement;if(!sx(r)||!n||!this.constraints)return;this.stopAnimation();let o={x:0,y:0};Td(i=>{let s=this.getAxisMotionValue(i);if(s&&this.constraints!==!1){let l=s.get();o[i]=cQe({min:l,max:l},this.constraints[i])}});let{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),Td(i=>{if(!TG(i,t,null))return;let s=this.getAxisMotionValue(i),{min:l,max:c}=this.constraints[i];s.set(Ln(l,c,o[i]))})}addListeners(){if(!this.visualElement.current)return;Srr.set(this.visualElement,this);let t=this.visualElement.current,r=lw(t,"pointerdown",l=>{let{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),n=()=>{let{dragConstraints:l}=this.getProps();sx(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,a=o.addEventListener("measure",n);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),dn.read(n);let i=cx(window,"resize",()=>this.scalePositionWithinConstraints()),s=o.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(Td(u=>{let d=this.getAxisMotionValue(u);d&&(this.originPoint[u]+=l[u].translate,d.set(d.get()+l[u].translate))}),this.visualElement.render())});return()=>{i(),r(),a(),s&&s()}}getProps(){let t=this.visualElement.getProps(),{drag:r=!1,dragDirectionLock:n=!1,dragPropagation:o=!1,dragConstraints:a=!1,dragElastic:i=MG,dragMomentum:s=!0}=t;return{...t,drag:r,dragDirectionLock:n,dragPropagation:o,dragConstraints:a,dragElastic:i,dragMomentum:s}}};function TG(e,t,r){return(t===!0||t===e)&&(r===null||r===e)}function Prr(e,t=10){let r=null;return Math.abs(e.y)>t?r="y":Math.abs(e.x)>t&&(r="x"),r}var LG=class extends Ol{constructor(t){super(t),this.removeGroupControls=Ei,this.removeListeners=Ei,this.controls=new AG(t)}mount(){let{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ei}unmount(){this.removeGroupControls(),this.removeListeners()}};var fQe=e=>(t,r)=>{e&&dn.postRender(()=>e(t,r))},EG=class extends Ol{constructor(){super(...arguments),this.removePointerDownListener=Ei}onPointerDown(t){this.session=new OM(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:NG(this.node)})}createPanHandlers(){let{onPanSessionStart:t,onPanStart:r,onPan:n,onPanEnd:o}=this.node.getProps();return{onSessionStart:fQe(t),onStart:fQe(r),onMove:n,onEnd:(a,i)=>{delete this.session,o&&dn.postRender(()=>o(a,i))}}}mount(){this.removePointerDownListener=lw(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 hQe=D(Or(),1);var kF=D(lt(),1);var _M={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function pQe(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var FM={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(mr.test(e))e=parseFloat(e);else return e;let r=pQe(e,t.target.x),n=pQe(e,t.target.y);return`${r}% ${n}%`}};var mQe={correct:(e,{treeScale:t,projectionDelta:r})=>{let n=e,o=$c.parse(e);if(o.length>5)return n;let a=$c.createTransformer(e),i=typeof o[0]!="number"?1:0,s=r.x.scale*t.x,l=r.y.scale*t.y;o[0+i]/=s,o[1+i]/=l;let c=Ln(s,l,.5);return typeof o[2+i]=="number"&&(o[2+i]/=c),typeof o[3+i]=="number"&&(o[3+i]/=c),a(o)}};var eue=!1,tue=class extends kF.Component{componentDidMount(){let{visualElement:t,layoutGroup:r,switchLayoutGroup:n,layoutId:o}=this.props,{projection:a}=t;JXe(Irr),a&&(r.group&&r.group.add(a),n&&n.register&&o&&n.register(a),eue&&a.root.didUpdate(),a.addEventListener("animationComplete",()=>{this.safeToRemove()}),a.setOptions({...a.options,onExitComplete:()=>this.safeToRemove()})),_M.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){let{layoutDependency:r,visualElement:n,drag:o,isPresent:a}=this.props,{projection:i}=n;return i&&(i.isPresent=a,eue=!0,o||t.layoutDependency!==r||r===void 0||t.isPresent!==a?i.willUpdate():this.safeToRemove(),t.isPresent!==a&&(a?i.promote():i.relegate()||dn.postRender(()=>{let s=i.getStack();(!s||!s.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){let{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),N1.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:t,layoutGroup:r,switchLayoutGroup:n}=this.props,{projection:o}=t;eue=!0,o&&(o.scheduleCheckAfterUnmount(),r&&r.group&&r.group.remove(o),n&&n.deregister&&n.deregister(o))}safeToRemove(){let{safeToRemove:t}=this.props;t&&t()}render(){return null}};function DG(e){let[t,r]=rG(),n=(0,kF.useContext)(sM);return(0,hQe.jsx)(tue,{...e,layoutGroup:n,switchLayoutGroup:(0,kF.useContext)(hG),isPresent:t,safeToRemove:r})}var Irr={borderRadius:{...FM,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:FM,borderTopRightRadius:FM,borderBottomLeftRadius:FM,borderBottomRightRadius:FM,boxShadow:mQe};function OG(e,t,r){let n=Io(e)?e:Nd(e);return n.start(AM("",n,t,r)),n.animation}var gQe=(e,t)=>e.depth-t.depth;var _G=class{constructor(){this.children=[],this.isDirty=!1}add(t){g1(this.children,t),this.isDirty=!0}remove(t){uh(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(gQe),this.isDirty=!1,this.children.forEach(t)}};function vQe(e,t){let r=Qi.now(),n=({timestamp:o})=>{let a=o-r;a>=t&&(Hc(n),e(a-t))};return dn.setup(n,!0),()=>Hc(n)}var wQe=["TopLeft","TopRight","BottomLeft","BottomRight"],krr=wQe.length,yQe=e=>typeof e=="string"?parseFloat(e):e,xQe=e=>typeof e=="number"||mr.test(e);function CQe(e,t,r,n,o,a){o?(e.opacity=Ln(0,r.opacity??1,Rrr(n)),e.opacityExit=Ln(t.opacity??1,0,Nrr(n))):a&&(e.opacity=Ln(t.opacity??1,r.opacity??1,n));for(let i=0;i<krr;i++){let s=`border${wQe[i]}Radius`,l=bQe(t,s),c=bQe(r,s);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||xQe(l)===xQe(c)?(e[s]=Math.max(Ln(yQe(l),yQe(c),n),0),(jc.test(c)||jc.test(l))&&(e[s]+="%")):e[s]=c}(t.rotate||r.rotate)&&(e.rotate=Ln(t.rotate||0,r.rotate||0,n))}function bQe(e,t){return e[t]!==void 0?e[t]:e.borderRadius}var Rrr=SQe(0,.5,H_),Nrr=SQe(.5,.95,Ei);function SQe(e,t,r){return n=>n<e?0:n>t?1:r(Zp(e,t,n))}function PQe(e,t){e.min=t.min,e.max=t.max}function Of(e,t){PQe(e.x,t.x),PQe(e.y,t.y)}function rue(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function IQe(e,t,r,n,o){return e-=t,e=CF(e,1/r,n),o!==void 0&&(e=CF(e,1/o,n)),e}function Mrr(e,t=0,r=1,n=.5,o,a=e,i=e){if(jc.test(t)&&(t=parseFloat(t),t=Ln(i.min,i.max,t/100)-i.min),typeof t!="number")return;let s=Ln(a.min,a.max,n);e===a&&(s-=t),e.min=IQe(e.min,t,r,s,o),e.max=IQe(e.max,t,r,s,o)}function kQe(e,t,[r,n,o],a,i){Mrr(e,t[r],t[n],t[o],t.scale,a,i)}var Trr=["x","scaleX","originX"],Arr=["y","scaleY","originY"];function nue(e,t,r,n){kQe(e.x,t,Trr,r?r.x:void 0,n?n.x:void 0),kQe(e.y,t,Arr,r?r.y:void 0,n?n.y:void 0)}function RQe(e){return e.translate===0&&e.scale===1}function oue(e){return RQe(e.x)&&RQe(e.y)}function NQe(e,t){return e.min===t.min&&e.max===t.max}function TQe(e,t){return NQe(e.x,t.x)&&NQe(e.y,t.y)}function MQe(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function aue(e,t){return MQe(e.x,t.x)&&MQe(e.y,t.y)}function iue(e){return ll(e.x)/ll(e.y)}function sue(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}var FG=class{constructor(){this.members=[]}add(t){g1(this.members,t),t.scheduleRender()}remove(t){if(uh(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(o=>t===o);if(r===0)return!1;let n;for(let o=r;o>=0;o--){let a=this.members[o];if(a.isPresent!==!1){n=a;break}}return n?(this.promote(n),!0):!1}promote(t,r){let n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.instance&&n.scheduleRender(),t.scheduleRender(),t.resumeFrom=n,r&&(t.resumeFrom.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);let{crossfade:o}=t.options;o===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(t=>{let{options:r,resumingFrom:n}=t;r.onExitComplete&&r.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}};function AQe(e,t,r){let n="",o=e.x.translate/t.x,a=e.y.translate/t.y,i=r?.z||0;if((o||a||i)&&(n=`translate3d(${o}px, ${a}px, ${i}px) `),(t.x!==1||t.y!==1)&&(n+=`scale(${1/t.x}, ${1/t.y}) `),r){let{transformPerspective:c,rotate:u,rotateX:d,rotateY:f,skewX:p,skewY:m}=r;c&&(n=`perspective(${c}px) ${n}`),u&&(n+=`rotate(${u}deg) `),d&&(n+=`rotateX(${d}deg) `),f&&(n+=`rotateY(${f}deg) `),p&&(n+=`skewX(${p}deg) `),m&&(n+=`skewY(${m}deg) `)}let s=e.x.scale*t.x,l=e.y.scale*t.y;return(s!==1||l!==1)&&(n+=`scale(${s}, ${l})`),n||"none"}var _1={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},lue=["","X","Y","Z"],Lrr=1e3,Err=0;function cue(e,t,r,n){let{latestValues:o}=t;o[e]&&(r[e]=o[e],t.setStaticValue(e,0),n&&(n[e]=0))}function UQe(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let r=SG(t);if(window.MotionHasOptimisedAnimation(r,"transform")){let{layout:o,layoutId:a}=e.options;window.MotionCancelOptimisedAnimation(r,"transform",dn,!(o||a))}let{parent:n}=e;n&&!n.hasCheckedOptimisedAppear&&UQe(n)}function BG({attachResizeListener:e,defaultParent:t,measureScroll:r,checkIsScrollRoot:n,resetTransform:o}){return class{constructor(i={},s=t?.()){this.id=Err++,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,Rd.value&&(_1.nodes=_1.calculatedTargetDeltas=_1.calculatedProjections=0),this.nodes.forEach(_rr),this.nodes.forEach(Urr),this.nodes.forEach(zrr),this.nodes.forEach(Frr),Rd.addProjectionMetrics&&Rd.addProjectionMetrics(_1)},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 _G)}addEventListener(i,s){return this.eventHandlers.has(i)||this.eventHandlers.set(i,new Jy),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=T1(i)&&!hF(i),this.instance=i;let{layoutId:s,layout:l,visualElement:c}=this.options;if(c&&!c.current&&c.mount(i),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||s)&&(this.isLayoutDirty=!0),e){let u,d=0,f=()=>this.root.updateBlockedByResize=!1;dn.read(()=>{d=window.innerWidth}),e(i,()=>{let p=window.innerWidth;p!==d&&(d=p,this.root.updateBlockedByResize=!0,u&&u(),u=vQe(f,250),_M.hasAnimatedSinceResize&&(_M.hasAnimatedSinceResize=!1,this.nodes.forEach(DQe)))})}s&&this.root.registerSharedNode(s,this),this.options.animate!==!1&&c&&(s||l)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:d,hasRelativeLayoutChanged:f,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let m=this.options.transition||c.getDefaultTransition()||Wrr,{onLayoutAnimationStart:h,onLayoutAnimationComplete:g}=c.getProps(),v=!this.targetLayout||!aue(this.targetLayout,p),y=!d&&f;if(this.options.layoutRoot||this.resumeFrom||y||d&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let x={...I1(m,"layout"),onPlay:h,onComplete:g};(c.shouldReduceMotion||this.options.layoutRoot)&&(x.delay=0,x.type=!1),this.startAnimation(x),this.setAnimationOrigin(u,y)}else d||DQe(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(),Hc(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(Hrr),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&&UQe(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){let d=this.path[u];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 c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),i&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(LQe);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(EQe);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Vrr),this.nodes.forEach(Drr),this.nodes.forEach(Orr)):this.nodes.forEach(EQe),this.clearAllSnapshots();let s=Qi.now();Yi.delta=Dl(0,1e3/60,s-Yi.timestamp),Yi.timestamp=s,Yi.isProcessing=!0,X_.update.process(Yi),X_.preRender.process(Yi),X_.render.process(Yi),Yi.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,N1.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Brr),this.sharedNodes.forEach(jrr)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,dn.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){dn.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!ll(this.snapshot.measuredBox.x)&&!ll(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=da(),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=n(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(!o)return;let i=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,s=this.projectionDelta&&!oue(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;i&&this.instance&&(s||lx(this.latestValues)||u)&&(o(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(i=!0){let s=this.measurePageBox(),l=this.removeElementScroll(s);return i&&(l=this.removeTransform(l)),Grr(l),{animationId:this.root.animationId,measuredBox:s,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:i}=this.options;if(!i)return da();let s=i.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Krr))){let{scroll:c}=this.root;c&&(iw(s.x,c.offset.x),iw(s.y,c.offset.y))}return s}removeElementScroll(i){let s=da();if(Of(s,i),this.scroll?.wasRoot)return s;for(let l=0;l<this.path.length;l++){let c=this.path[l],{scroll:u,options:d}=c;c!==this.root&&u&&d.layoutScroll&&(u.wasRoot&&Of(s,i),iw(s.x,u.offset.x),iw(s.y,u.offset.y))}return s}applyTransform(i,s=!1){let l=da();Of(l,i);for(let c=0;c<this.path.length;c++){let u=this.path[c];!s&&u.options.layoutScroll&&u.scroll&&u!==u.root&&E1(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),lx(u.latestValues)&&E1(l,u.latestValues)}return lx(this.latestValues)&&E1(l,this.latestValues),l}removeTransform(i){let s=da();Of(s,i);for(let l=0;l<this.path.length;l++){let c=this.path[l];if(!c.instance||!lx(c.latestValues))continue;xG(c.latestValues)&&c.updateSnapshot();let u=da(),d=c.measurePageBox();Of(u,d),nue(s,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return lx(this.latestValues)&&nue(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!==Yi.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:u,layoutId:d}=this.options;if(!(!this.layout||!(u||d))){if(this.resolvedRelativeTargetAt=Yi.timestamp,!this.targetDelta&&!this.relativeTarget){let f=this.getClosestProjectingParent();f&&f.layout&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=da(),this.relativeTargetOrigin=da(),DM(this.relativeTargetOrigin,this.layout.layoutBox,f.layout.layoutBox),Of(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=da(),this.targetWithTransforms=da()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),QYe(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Of(this.target,this.layout.layoutBox),Kce(this.target,this.targetDelta)):Of(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=da(),this.relativeTargetOrigin=da(),DM(this.relativeTargetOrigin,this.target,f.target),Of(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}Rd.value&&_1.calculatedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||xG(this.parent.latestValues)||Wce(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===Yi.timestamp&&(l=!1),l)return;let{layout:c,layoutId:u}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||u))return;Of(this.layoutCorrected,this.layout.layoutBox);let d=this.treeScale.x,f=this.treeScale.y;IYe(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=da());let{target:p}=i;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(rue(this.prevProjectionDelta.x,this.projectionDelta.x),rue(this.prevProjectionDelta.y,this.projectionDelta.y)),EM(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==d||this.treeScale.y!==f||!sue(this.projectionDelta.x,this.prevProjectionDelta.x)||!sue(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p)),Rd.value&&_1.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=D1(),this.projectionDelta=D1(),this.projectionDeltaWithTransform=D1()}setAnimationOrigin(i,s=!1){let l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},d=D1();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!s;let f=da(),p=l?l.source:void 0,m=this.layout?this.layout.source:void 0,h=p!==m,g=this.getStack(),v=!g||g.members.length<=1,y=!!(h&&!v&&this.options.crossfade===!0&&!this.path.some(qrr));this.animationProgress=0;let x;this.mixTargetDelta=w=>{let b=w/1e3;OQe(d.x,i.x,b),OQe(d.y,i.y,b),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(DM(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),$rr(this.relativeTarget,this.relativeTargetOrigin,f,b),x&&TQe(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=da()),Of(x,this.relativeTarget)),h&&(this.animationValues=u,CQe(u,c,this.latestValues,b,y,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=b},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(i){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Hc(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=dn.update(()=>{_M.hasAnimatedSinceResize=!0,fh.layout++,this.motionValue||(this.motionValue=Nd(0)),this.currentAnimation=OG(this.motionValue,[0,1e3],{...i,velocity:0,isSync:!0,onUpdate:s=>{this.mixTargetDelta(s),i.onUpdate&&i.onUpdate(s)},onStop:()=>{fh.layout--},onComplete:()=>{fh.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(Lrr),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let i=this.getLead(),{targetWithTransforms:s,target:l,layout:c,latestValues:u}=i;if(!(!s||!l||!c)){if(this!==i&&this.layout&&c&&zQe(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||da();let d=ll(this.layout.layoutBox.x);l.x.min=i.target.x.min,l.x.max=l.x.min+d;let f=ll(this.layout.layoutBox.y);l.y.min=i.target.y.min,l.y.max=l.y.min+f}Of(s,l),E1(s,u),EM(this.projectionDeltaWithTransform,this.layoutCorrected,s,u)}}registerSharedNode(i,s){this.sharedNodes.has(i)||this.sharedNodes.set(i,new FG),this.sharedNodes.get(i).add(s);let c=s.options.initialPromotionConfig;s.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.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 c=this.getStack();c&&c.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 c={};l.z&&cue("z",i,c,this.animationValues);for(let u=0;u<lue.length;u++)cue(`rotate${lue[u]}`,i,c,this.animationValues),cue(`skew${lue[u]}`,i,c,this.animationValues);i.render();for(let u in c)i.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);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=SM(s?.pointerEvents)||"",i.transform=l?l(this.latestValues,""):"none";return}let c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){this.options.layoutId&&(i.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,i.pointerEvents=SM(s?.pointerEvents)||""),this.hasProjected&&!lx(this.latestValues)&&(i.transform=l?l({},""):"none",this.hasProjected=!1);return}i.visibility="";let u=c.animationValues||c.latestValues;this.applyTransformsToTarget();let d=AQe(this.projectionDeltaWithTransform,this.treeScale,u);l&&(d=l(u,d)),i.transform=d;let{x:f,y:p}=this.projectionDelta;i.transformOrigin=`${f.origin*100}% ${p.origin*100}% 0`,c.animationValues?i.opacity=c===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:i.opacity=c===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(let m in L1){if(u[m]===void 0)continue;let{correct:h,applyTo:g,isCSSVariable:v}=L1[m],y=d==="none"?u[m]:h(u[m],c);if(g){let x=g.length;for(let w=0;w<x;w++)i[g[w]]=y}else v?this.options.visualElement.renderState.vars[m]=y:i[m]=y}this.options.layoutId&&(i.pointerEvents=c===this?SM(s?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(i=>i.currentAnimation?.stop()),this.root.nodes.forEach(LQe),this.root.sharedNodes.clear()}}}function Drr(e){e.updateLayout()}function Orr(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){let{layoutBox:r,measuredBox:n}=e.layout,{animationType:o}=e.options,a=t.source!==e.layout.source;o==="size"?Td(u=>{let d=a?t.measuredBox[u]:t.layoutBox[u],f=ll(d);d.min=r[u].min,d.max=d.min+f}):zQe(o,t.layoutBox,r)&&Td(u=>{let d=a?t.measuredBox[u]:t.layoutBox[u],f=ll(r[u]);d.max=d.min+f,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[u].max=e.relativeTarget[u].min+f)});let i=D1();EM(i,r,t.layoutBox);let s=D1();a?EM(s,e.applyTransform(n,!0),t.measuredBox):EM(s,r,t.layoutBox);let l=!oue(i),c=!1;if(!e.resumeFrom){let u=e.getClosestProjectingParent();if(u&&!u.resumeFrom){let{snapshot:d,layout:f}=u;if(d&&f){let p=da();DM(p,t.layoutBox,d.layoutBox);let m=da();DM(m,r,f.layoutBox),aue(p,m)||(c=!0),u.options.layoutRoot&&(e.relativeTarget=m,e.relativeTargetOrigin=p,e.relativeParent=u)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:s,layoutDelta:i,hasLayoutChanged:l,hasRelativeLayoutChanged:c})}else if(e.isLead()){let{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function _rr(e){Rd.value&&_1.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 Frr(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Brr(e){e.clearSnapshot()}function LQe(e){e.clearMeasurements()}function EQe(e){e.isLayoutDirty=!1}function Vrr(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function DQe(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Urr(e){e.resolveTargetDelta()}function zrr(e){e.calcProjection()}function Hrr(e){e.resetSkewAndRotation()}function jrr(e){e.removeLeadSnapshot()}function OQe(e,t,r){e.translate=Ln(t.translate,0,r),e.scale=Ln(t.scale,1,r),e.origin=t.origin,e.originPoint=t.originPoint}function _Qe(e,t,r,n){e.min=Ln(t.min,r.min,n),e.max=Ln(t.max,r.max,n)}function $rr(e,t,r,n){_Qe(e.x,t.x,r.x,n),_Qe(e.y,t.y,r.y,n)}function qrr(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var Wrr={duration:.45,ease:[.4,0,.1,1]},FQe=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),BQe=FQe("applewebkit/")&&!FQe("chrome/")?Math.round:Ei;function VQe(e){e.min=BQe(e.min),e.max=BQe(e.max)}function Grr(e){VQe(e.x),VQe(e.y)}function zQe(e,t,r){return e==="position"||e==="preserve-aspect"&&!YYe(iue(t),iue(r),.2)}function Krr(e){return e!==e.root&&e.scroll?.wasRoot}var HQe=BG({attachResizeListener:(e,t)=>cx(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0});var uue={current:void 0},VG=BG({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!uue.current){let e=new HQe({});e.mount(window),e.setOptions({layoutScroll:!0}),uue.current=e}return uue.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"});var jQe={pan:{Feature:EG},drag:{Feature:LG,ProjectionNode:VG,MeasureLayout:DG}};function $Qe(e,t,r){let{props:n}=e;e.animationState&&n.whileHover&&e.animationState.setActive("whileHover",r==="Start");let o="onHover"+r,a=n[o];a&&dn.postRender(()=>a(t,ux(t)))}var UG=class extends Ol{mount(){let{current:t}=this.node;t&&(this.unmount=Dce(t,(r,n)=>($Qe(this.node,n,"Start"),o=>$Qe(this.node,o,"End"))))}unmount(){}};var zG=class extends Ol{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=dh(cx(this.node.current,"focus",()=>this.onFocus()),cx(this.node.current,"blur",()=>this.onBlur()))}unmount(){}};function qQe(e,t,r){let{props:n}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&n.whileTap&&e.animationState.setActive("whileTap",r==="Start");let o="onTap"+(r==="End"?"":r),a=n[o];a&&dn.postRender(()=>a(t,ux(t)))}var HG=class extends Ol{mount(){let{current:t}=this.node;t&&(this.unmount=Fce(t,(r,n)=>(qQe(this.node,n,"Start"),(o,{success:a})=>qQe(this.node,o,a?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}};var fue=new WeakMap,due=new WeakMap,Xrr=e=>{let t=fue.get(e.target);t&&t(e)},Yrr=e=>{e.forEach(Xrr)};function Qrr({root:e,...t}){let r=e||document;due.has(r)||due.set(r,{});let n=due.get(r),o=JSON.stringify(t);return n[o]||(n[o]=new IntersectionObserver(Yrr,{root:e,...t})),n[o]}function WQe(e,t,r){let n=Qrr(t);return fue.set(e,r),n.observe(e),()=>{fue.delete(e),n.unobserve(e)}}var Zrr={some:0,all:1},jG=class extends Ol{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();let{viewport:t={}}=this.node.getProps(),{root:r,margin:n,amount:o="some",once:a}=t,i={root:r?r.current:void 0,rootMargin:n,threshold:typeof o=="number"?o:Zrr[o]},s=l=>{let{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,a&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);let{onViewportEnter:u,onViewportLeave:d}=this.node.getProps(),f=c?u:d;f&&f(l)};return WQe(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(Jrr(t,r))&&this.startObserver()}unmount(){}};function Jrr({viewport:e={}},{viewport:t={}}={}){return r=>e[r]!==t[r]}var GQe={inView:{Feature:jG},tap:{Feature:HG},focus:{Feature:zG},hover:{Feature:UG}};var KQe={layout:{ProjectionNode:VG,MeasureLayout:DG}};var XQe={...jYe,...GQe,...jQe,...KQe};var Ad=vYe(XQe,DYe);var BM=D(lt(),1);function VM(e){let t=ev(()=>Nd(e)),{isStatic:r}=(0,BM.useContext)(rw);if(r){let[,n]=(0,BM.useState)(e);(0,BM.useEffect)(()=>t.on("change",n),[])}return t}function $G(e,t){let r=VM(t()),n=()=>r.set(t());return n(),cM(()=>{let o=()=>dn.preRender(n,!1,!0),a=e.map(i=>i.on("change",o));return()=>{a.forEach(i=>i()),Hc(n)}}),r}function YQe(e){R1.current=[],e();let t=$G(R1.current,e);return R1.current=void 0,t}function pue(e,t,r,n){if(typeof e=="function")return YQe(e);let o=typeof t=="function"?t:Bce(t,r,n);return Array.isArray(e)?QQe(e,o):QQe([e],([a])=>o(a))}function QQe(e,t){let r=ev(()=>[]);return $G(e,()=>{r.length=0;let n=e.length;for(let o=0;o<n;o++)r[o]=e[o].get();return t(r)})}function RF(e){return typeof e=="object"&&!Array.isArray(e)}function qG(e,t,r,n){return typeof e=="string"&&RF(t)?fF(e,r,n):e instanceof NodeList?Array.from(e):Array.isArray(e)?e:[e]}function ZQe(e,t,r){return e*(t+1)}function mue(e,t,r,n){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))):n.get(t)??e}function enr(e,t,r){for(let n=0;n<e.length;n++){let o=e[n];o.at>t&&o.at<r&&(uh(e,o),n--)}}function JQe(e,t,r,n,o,a){enr(e,o,a);for(let i=0;i<t.length;i++)e.push({value:t[i],at:Ln(o,a,n[i]),easing:W_(r,i)})}function eZe(e,t){for(let r=0;r<e.length;r++)e[r]=e[r]/(t+1)}function tZe(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}var tnr="easeInOut",rnr=20;function oZe(e,{defaultTransition:t={},...r}={},n,o){let a=t.duration||.3,i=new Map,s=new Map,l={},c=new Map,u=0,d=0,f=0;for(let p=0;p<e.length;p++){let m=e[p];if(typeof m=="string"){c.set(m,d);continue}else if(!Array.isArray(m)){c.set(m.name,mue(d,m.at,u,c));continue}let[h,g,v={}]=m;v.at!==void 0&&(d=mue(d,v.at,u,c));let y=0,x=(w,b,C,S=0,P=0)=>{let N=nnr(w),{delay:T=0,times:A=rF(N),type:M="keyframes",repeat:O,repeatType:F,repeatDelay:I=0,...k}=b,{ease:R=t.ease||"easeOut",duration:E}=b,_=typeof T=="function"?T(S,P):T,U=N.length,V=P1(M)?M:o?.[M||"keyframes"];if(U<=2&&V){let $=100;if(U===2&&inr(N)){let G=N[1]-N[0];$=Math.abs(G)}let W={...k};E!==void 0&&(W.duration=ds(E));let z=J_(W,$,V);R=z.ease,E=z.duration}E??(E=a);let L=d+_;A.length===1&&A[0]===0&&(A[1]=1);let H=A.length-N.length;if(H>0&&tF(A,H),N.length===1&&N.unshift(null),O){sc(O<rnr,"Repeat count too high, must be less than 20","repeat-count-high"),E=ZQe(E,O);let $=[...N],W=[...A];R=Array.isArray(R)?[...R]:[R];let z=[...R];for(let G=0;G<O;G++){N.push(...$);for(let X=0;X<$.length;X++)A.push(W[X]+(G+1)),R.push(X===0?"linear":W_(z,X-1))}eZe(A,O)}let j=L+E;JQe(C,N,R,A,L,j),y=Math.max(_+E,y),f=Math.max(j,f)};if(Io(h)){let w=rZe(h,s);x(g,v,nZe("default",w))}else{let w=qG(h,g,n,l),b=w.length;for(let C=0;C<b;C++){g=g,v=v;let S=w[C],P=rZe(S,s);for(let N in g)x(g[N],onr(v,N),nZe(N,P),C,b)}}u=d,d+=y}return s.forEach((p,m)=>{for(let h in p){let g=p[h];g.sort(tZe);let v=[],y=[],x=[];for(let b=0;b<g.length;b++){let{at:C,value:S,easing:P}=g[b];v.push(S),y.push(Zp(0,f,C)),x.push(P||"easeOut")}y[0]!==0&&(y.unshift(0),v.unshift(v[0]),x.unshift(tnr)),y[y.length-1]!==1&&(y.push(1),v.push(null)),i.has(m)||i.set(m,{keyframes:{},transition:{}});let w=i.get(m);w.keyframes[h]=v,w.transition[h]={...t,duration:f,ease:x,times:y,...r}}}),i}function rZe(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function nZe(e,t){return t[e]||(t[e]=[]),t[e]}function nnr(e){return Array.isArray(e)?e:[e]}function onr(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}var anr=e=>typeof e=="number",inr=e=>e.every(anr);function snr(e,t){return e in t}var WG=class extends RM{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,r){if(snr(r,t)){let n=t[r];if(typeof n=="string"||typeof n=="number")return n}}getBaseTargetFromProps(){}removeValueFromRenderState(t,r){delete r.output[t]}measureInstanceViewportBox(){return da()}build(t,r){Object.assign(t.output,r)}renderInstance(t,{output:r}){Object.assign(t,r)}sortInstanceNodePosition(){return 0}};function aZe(e){let t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},r=T1(e)&&!hF(e)?new TM(t):new MM(t);r.mount(e),sw.set(e,r)}function iZe(e){let t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},r=new WG(t);r.mount(e),sw.set(e,r)}function lnr(e,t){return Io(e)||typeof e=="number"||typeof e=="string"&&!RF(t)}function GG(e,t,r,n){let o=[];if(lnr(e,t))o.push(OG(e,RF(t)&&t.default||t,r&&(r.default||r)));else{let a=qG(e,t,n),i=a.length;sc(!!i,"No valid elements provided.","no-valid-elements");for(let s=0;s<i;s++){let l=a[s];sc(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 c=l instanceof Element?aZe:iZe;sw.has(l)||c(l);let u=sw.get(l),d={...r};"delay"in d&&typeof d.delay=="function"&&(d.delay=d.delay(s,i)),o.push(...LM(u,{...t,transition:d},{}))}}return o}function sZe(e,t,r){let n=[];return oZe(e,t,r,{spring:tx}).forEach(({keyframes:a,transition:i},s)=>{n.push(...GG(s,a,i))}),n}function cnr(e){return Array.isArray(e)&&e.some(Array.isArray)}function lZe(e){function t(r,n,o){let a=[];cnr(r)?a=sZe(r,n,e):a=GG(r,n,o,e);let i=new iF(a);return e&&(e.animations.push(i),i.finished.then(()=>{uh(e.animations,i)})),i}return t}var hue=lZe();var Du=D(lt(),1);var _f=D(Or(),1),KG="Checkbox",[unr,eGn]=hn(KG),[dnr,gue]=unr(KG);function fnr(e){let{__scopeCheckbox:t,checked:r,children:n,defaultChecked:o,disabled:a,form:i,name:s,onCheckedChange:l,required:c,value:u="on",internal_do_not_use_render:d}=e,[f,p]=eo({prop:r,defaultProp:o??!1,onChange:l,caller:KG}),[m,h]=Du.useState(null),[g,v]=Du.useState(null),y=Du.useRef(!1),x=m?!!i||!!m.closest("form"):!0,w={checked:f,disabled:a,setChecked:p,control:m,setControl:h,name:s,form:i,value:u,hasConsumerStoppedPropagationRef:y,required:c,defaultChecked:cw(o)?!1:o,isFormControl:x,bubbleInput:g,setBubbleInput:v};return(0,_f.jsx)(dnr,{scope:t,...w,children:pnr(d)?d(w):n})}var cZe="CheckboxTrigger",uZe=Du.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:r,...n},o)=>{let{control:a,value:i,disabled:s,checked:l,required:c,setControl:u,setChecked:d,hasConsumerStoppedPropagationRef:f,isFormControl:p,bubbleInput:m}=gue(cZe,e),h=Xt(o,u),g=Du.useRef(l);return Du.useEffect(()=>{let v=a?.form;if(v){let y=()=>d(g.current);return v.addEventListener("reset",y),()=>v.removeEventListener("reset",y)}},[a,d]),(0,_f.jsx)(rt.button,{type:"button",role:"checkbox","aria-checked":cw(l)?"mixed":l,"aria-required":c,"data-state":mZe(l),"data-disabled":s?"":void 0,disabled:s,value:i,...n,ref:h,onKeyDown:He(t,v=>{v.key==="Enter"&&v.preventDefault()}),onClick:He(r,v=>{d(y=>cw(y)?!0:!y),m&&p&&(f.current=v.isPropagationStopped(),f.current||v.stopPropagation())})})});uZe.displayName=cZe;var XG=Du.forwardRef((e,t)=>{let{__scopeCheckbox:r,name:n,checked:o,defaultChecked:a,required:i,disabled:s,value:l,onCheckedChange:c,form:u,...d}=e;return(0,_f.jsx)(fnr,{__scopeCheckbox:r,checked:o,defaultChecked:a,disabled:s,required:i,onCheckedChange:c,name:n,form:u,value:l,internal_do_not_use_render:({isFormControl:f})=>(0,_f.jsxs)(_f.Fragment,{children:[(0,_f.jsx)(uZe,{...d,ref:t,__scopeCheckbox:r}),f&&(0,_f.jsx)(pZe,{__scopeCheckbox:r})]})})});XG.displayName=KG;var dZe="CheckboxIndicator",vue=Du.forwardRef((e,t)=>{let{__scopeCheckbox:r,forceMount:n,...o}=e,a=gue(dZe,r);return(0,_f.jsx)(uo,{present:n||cw(a.checked)||a.checked===!0,children:(0,_f.jsx)(rt.span,{"data-state":mZe(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});vue.displayName=dZe;var fZe="CheckboxBubbleInput",pZe=Du.forwardRef(({__scopeCheckbox:e,...t},r)=>{let{control:n,hasConsumerStoppedPropagationRef:o,checked:a,defaultChecked:i,required:s,disabled:l,name:c,value:u,form:d,bubbleInput:f,setBubbleInput:p}=gue(fZe,e),m=Xt(r,p),h=Wb(a),g=uk(n);Du.useEffect(()=>{let y=f;if(!y)return;let x=window.HTMLInputElement.prototype,b=Object.getOwnPropertyDescriptor(x,"checked").set,C=!o.current;if(h!==a&&b){let S=new Event("click",{bubbles:C});y.indeterminate=cw(a),b.call(y,cw(a)?!1:a),y.dispatchEvent(S)}},[f,h,a,o]);let v=Du.useRef(cw(a)?!1:a);return(0,_f.jsx)(rt.input,{type:"checkbox","aria-hidden":!0,defaultChecked:i??v.current,required:s,disabled:l,name:c,value:u,form:d,...t,tabIndex:-1,ref:m,style:{...t.style,...g,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});pZe.displayName=fZe;function pnr(e){return typeof e=="function"}function cw(e){return e==="indeterminate"}function mZe(e){return cw(e)?"indeterminate":e?"checked":"unchecked"}var rXn=D(ng(),1);var hZe=D(lt(),1);var gZe=D(Or(),1),hnr="Label",vZe=hZe.forwardRef((e,t)=>(0,gZe.jsx)(rt.label,{...e,ref:t,onMouseDown:r=>{r.target.closest("button, input, select, textarea")||(e.onMouseDown?.(r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));vZe.displayName=hnr;var yue=vZe;var pi=D(lt(),1);var zs=D(Or(),1),YG="Popover",[yZe,vGn]=hn(YG,[gu]),NF=gu(),[vnr,uw]=yZe(YG),xZe=e=>{let{__scopePopover:t,children:r,open:n,defaultOpen:o,onOpenChange:a,modal:i=!1}=e,s=NF(t),l=pi.useRef(null),[c,u]=pi.useState(!1),[d,f]=eo({prop:n,defaultProp:o??!1,onChange:a,caller:YG});return(0,zs.jsx)(_m,{...s,children:(0,zs.jsx)(vnr,{scope:t,contentId:Vo(),triggerRef:l,open:d,onOpenChange:f,onOpenToggle:pi.useCallback(()=>f(p=>!p),[f]),hasCustomAnchor:c,onCustomAnchorAdd:pi.useCallback(()=>u(!0),[]),onCustomAnchorRemove:pi.useCallback(()=>u(!1),[]),modal:i,children:r})})};xZe.displayName=YG;var bZe="PopoverAnchor",ynr=pi.forwardRef((e,t)=>{let{__scopePopover:r,...n}=e,o=uw(bZe,r),a=NF(r),{onCustomAnchorAdd:i,onCustomAnchorRemove:s}=o;return pi.useEffect(()=>(i(),()=>s()),[i,s]),(0,zs.jsx)(Fm,{...a,...n,ref:t})});ynr.displayName=bZe;var wZe="PopoverTrigger",CZe=pi.forwardRef((e,t)=>{let{__scopePopover:r,...n}=e,o=uw(wZe,r),a=NF(r),i=Xt(t,o.triggerRef),s=(0,zs.jsx)(rt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":kZe(o.open),...n,ref:i,onClick:He(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?s:(0,zs.jsx)(Fm,{asChild:!0,...a,children:s})});CZe.displayName=wZe;var xue="PopoverPortal",[xnr,bnr]=yZe(xue,{forceMount:void 0}),wnr=e=>{let{__scopePopover:t,forceMount:r,children:n,container:o}=e,a=uw(xue,t);return(0,zs.jsx)(xnr,{scope:t,forceMount:r,children:(0,zs.jsx)(uo,{present:r||a.open,children:(0,zs.jsx)(vu,{asChild:!0,container:o,children:n})})})};wnr.displayName=xue;var UM="PopoverContent",SZe=pi.forwardRef((e,t)=>{let r=bnr(UM,e.__scopePopover),{forceMount:n=r.forceMount,...o}=e,a=uw(UM,e.__scopePopover);return(0,zs.jsx)(uo,{present:n||a.open,children:a.modal?(0,zs.jsx)(Snr,{...o,ref:t}):(0,zs.jsx)(Pnr,{...o,ref:t})})});SZe.displayName=UM;var Cnr=Sc("PopoverContent.RemoveScroll"),Snr=pi.forwardRef((e,t)=>{let r=uw(UM,e.__scopePopover),n=pi.useRef(null),o=Xt(t,n),a=pi.useRef(!1);return pi.useEffect(()=>{let i=n.current;if(i)return U0(i)},[]),(0,zs.jsx)(Wy,{as:Cnr,allowPinchZoom:!0,children:(0,zs.jsx)(PZe,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:He(e.onCloseAutoFocus,i=>{i.preventDefault(),a.current||r.triggerRef.current?.focus()}),onPointerDownOutside:He(e.onPointerDownOutside,i=>{let s=i.detail.originalEvent,l=s.button===0&&s.ctrlKey===!0,c=s.button===2||l;a.current=c},{checkForDefaultPrevented:!1}),onFocusOutside:He(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1})})})}),Pnr=pi.forwardRef((e,t)=>{let r=uw(UM,e.__scopePopover),n=pi.useRef(!1),o=pi.useRef(!1);return(0,zs.jsx)(PZe,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{e.onCloseAutoFocus?.(a),a.defaultPrevented||(n.current||r.triggerRef.current?.focus(),a.preventDefault()),n.current=!1,o.current=!1},onInteractOutside:a=>{e.onInteractOutside?.(a),a.defaultPrevented||(n.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));let i=a.target;r.triggerRef.current?.contains(i)&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),PZe=pi.forwardRef((e,t)=>{let{__scopePopover:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:i,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:c,onInteractOutside:u,...d}=e,f=uw(UM,r),p=NF(r);return V0(),(0,zs.jsx)(qy,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:a,children:(0,zs.jsx)(kc,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:u,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:c,onDismiss:()=>f.onOpenChange(!1),children:(0,zs.jsx)(dg,{"data-state":kZe(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)"}})})})}),IZe="PopoverClose",Inr=pi.forwardRef((e,t)=>{let{__scopePopover:r,...n}=e,o=uw(IZe,r);return(0,zs.jsx)(rt.button,{type:"button",...n,ref:t,onClick:He(e.onClick,()=>o.onOpenChange(!1))})});Inr.displayName=IZe;var knr="PopoverArrow",Rnr=pi.forwardRef((e,t)=>{let{__scopePopover:r,...n}=e,o=NF(r);return(0,zs.jsx)(fg,{...o,...n,ref:t})});Rnr.displayName=knr;function kZe(e){return e?"open":"closed"}var RZe=xZe;var NZe=CZe;var bue=SZe;var fx=D(lt(),1);var _l=D(lt(),1);var dw=D(Or(),1),wue="rovingFocusGroup.onEntryFocus",Mnr={bubbles:!1,cancelable:!0},MF="RovingFocusGroup",[Cue,MZe,Tnr]=cf(MF),[Anr,zM]=hn(MF,[Tnr]),[Lnr,Enr]=Anr(MF),TZe=_l.forwardRef((e,t)=>(0,dw.jsx)(Cue.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,dw.jsx)(Cue.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,dw.jsx)(Dnr,{...e,ref:t})})}));TZe.displayName=MF;var Dnr=_l.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:r,orientation:n,loop:o=!1,dir:a,currentTabStopId:i,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:c,preventScrollOnEntryFocus:u=!1,...d}=e,f=_l.useRef(null),p=Xt(t,f),m=wp(a),[h,g]=eo({prop:i,defaultProp:s??null,onChange:l,caller:MF}),[v,y]=_l.useState(!1),x=to(c),w=MZe(r),b=_l.useRef(!1),[C,S]=_l.useState(0);return _l.useEffect(()=>{let P=f.current;if(P)return P.addEventListener(wue,x),()=>P.removeEventListener(wue,x)},[x]),(0,dw.jsx)(Lnr,{scope:r,orientation:n,dir:m,loop:o,currentTabStopId:h,onItemFocus:_l.useCallback(P=>g(P),[g]),onItemShiftTab:_l.useCallback(()=>y(!0),[]),onFocusableItemAdd:_l.useCallback(()=>S(P=>P+1),[]),onFocusableItemRemove:_l.useCallback(()=>S(P=>P-1),[]),children:(0,dw.jsx)(rt.div,{tabIndex:v||C===0?-1:0,"data-orientation":n,...d,ref:p,style:{outline:"none",...e.style},onMouseDown:He(e.onMouseDown,()=>{b.current=!0}),onFocus:He(e.onFocus,P=>{let N=!b.current;if(P.target===P.currentTarget&&N&&!v){let T=new CustomEvent(wue,Mnr);if(P.currentTarget.dispatchEvent(T),!T.defaultPrevented){let A=w().filter(k=>k.focusable),M=A.find(k=>k.active),O=A.find(k=>k.id===h),I=[M,O,...A].filter(Boolean).map(k=>k.ref.current);EZe(I,u)}}b.current=!1}),onBlur:He(e.onBlur,()=>y(!1))})})}),AZe="RovingFocusGroupItem",LZe=_l.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:r,focusable:n=!0,active:o=!1,tabStopId:a,children:i,...s}=e,l=Vo(),c=a||l,u=Enr(AZe,r),d=u.currentTabStopId===c,f=MZe(r),{onFocusableItemAdd:p,onFocusableItemRemove:m,currentTabStopId:h}=u;return _l.useEffect(()=>{if(n)return p(),()=>m()},[n,p,m]),(0,dw.jsx)(Cue.ItemSlot,{scope:r,id:c,focusable:n,active:o,children:(0,dw.jsx)(rt.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...s,ref:t,onMouseDown:He(e.onMouseDown,g=>{n?u.onItemFocus(c):g.preventDefault()}),onFocus:He(e.onFocus,()=>u.onItemFocus(c)),onKeyDown:He(e.onKeyDown,g=>{if(g.key==="Tab"&&g.shiftKey){u.onItemShiftTab();return}if(g.target!==g.currentTarget)return;let v=Fnr(g,u.orientation,u.dir);if(v!==void 0){if(g.metaKey||g.ctrlKey||g.altKey||g.shiftKey)return;g.preventDefault();let x=f().filter(w=>w.focusable).map(w=>w.ref.current);if(v==="last")x.reverse();else if(v==="prev"||v==="next"){v==="prev"&&x.reverse();let w=x.indexOf(g.currentTarget);x=u.loop?Bnr(x,w+1):x.slice(w+1)}setTimeout(()=>EZe(x))}}),children:typeof i=="function"?i({isCurrentTabStop:d,hasTabStop:h!=null}):i})})});LZe.displayName=AZe;var Onr={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function _nr(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Fnr(e,t,r){let n=_nr(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return Onr[n]}function EZe(e,t=!1){let r=document.activeElement;for(let n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}function Bnr(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var QG=TZe,ZG=LZe;var dx=D(Or(),1),JG="Tabs",[Vnr,OGn]=hn(JG,[zM]),OZe=zM(),[Unr,Sue]=Vnr(JG),_Ze=fx.forwardRef((e,t)=>{let{__scopeTabs:r,value:n,onValueChange:o,defaultValue:a,orientation:i="horizontal",dir:s,activationMode:l="automatic",...c}=e,u=wp(s),[d,f]=eo({prop:n,onChange:o,defaultProp:a??"",caller:JG});return(0,dx.jsx)(Unr,{scope:r,baseId:Vo(),value:d,onValueChange:f,orientation:i,dir:u,activationMode:l,children:(0,dx.jsx)(rt.div,{dir:u,"data-orientation":i,...c,ref:t})})});_Ze.displayName=JG;var FZe="TabsList",BZe=fx.forwardRef((e,t)=>{let{__scopeTabs:r,loop:n=!0,...o}=e,a=Sue(FZe,r),i=OZe(r);return(0,dx.jsx)(QG,{asChild:!0,...i,orientation:a.orientation,dir:a.dir,loop:n,children:(0,dx.jsx)(rt.div,{role:"tablist","aria-orientation":a.orientation,...o,ref:t})})});BZe.displayName=FZe;var VZe="TabsTrigger",UZe=fx.forwardRef((e,t)=>{let{__scopeTabs:r,value:n,disabled:o=!1,...a}=e,i=Sue(VZe,r),s=OZe(r),l=jZe(i.baseId,n),c=$Ze(i.baseId,n),u=n===i.value;return(0,dx.jsx)(ZG,{asChild:!0,...s,focusable:!o,active:u,children:(0,dx.jsx)(rt.button,{type:"button",role:"tab","aria-selected":u,"aria-controls":c,"data-state":u?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:l,...a,ref:t,onMouseDown:He(e.onMouseDown,d=>{!o&&d.button===0&&d.ctrlKey===!1?i.onValueChange(n):d.preventDefault()}),onKeyDown:He(e.onKeyDown,d=>{[" ","Enter"].includes(d.key)&&i.onValueChange(n)}),onFocus:He(e.onFocus,()=>{let d=i.activationMode!=="manual";!u&&!o&&d&&i.onValueChange(n)})})})});UZe.displayName=VZe;var zZe="TabsContent",HZe=fx.forwardRef((e,t)=>{let{__scopeTabs:r,value:n,forceMount:o,children:a,...i}=e,s=Sue(zZe,r),l=jZe(s.baseId,n),c=$Ze(s.baseId,n),u=n===s.value,d=fx.useRef(u);return fx.useEffect(()=>{let f=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(f)},[]),(0,dx.jsx)(uo,{present:o||u,children:({present:f})=>(0,dx.jsx)(rt.div,{"data-state":u?"active":"inactive","data-orientation":s.orientation,role:"tabpanel","aria-labelledby":l,hidden:!f,id:c,tabIndex:0,...i,ref:t,style:{...e.style,animationDuration:d.current?"0s":void 0},children:f&&a})})});HZe.displayName=zZe;function jZe(e,t){return`${e}-trigger-${t}`}function $Ze(e,t){return`${e}-content-${t}`}var Pue=_Ze,Iue=BZe,kue=UZe,Rue=HZe;function Rn(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 cc(e,t){return e instanceof Date?new e.constructor(t):new Date(t)}function e8(e,t){let r=Rn(e);if(isNaN(t))return cc(e,NaN);if(!t)return r;let n=r.getDate(),o=cc(e,r.getTime());o.setMonth(r.getMonth()+t+1,0);let a=o.getDate();return n>=a?o:(r.setFullYear(o.getFullYear(),o.getMonth(),n),r)}var Hnr=Math.pow(10,8)*24*60*60*1e3,zGn=-Hnr,t8=6048e5,qZe=864e5;var jnr=3600;var WZe=jnr*24,HGn=WZe*7,$nr=WZe*365.2425,qnr=$nr/12,jGn=qnr*3;var Wnr={};function av(){return Wnr}function hh(e,t){let r=av(),n=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,o=Rn(e),a=o.getDay(),i=(a<n?7:0)+a-n;return o.setDate(o.getDate()-i),o.setHours(0,0,0,0),o}function F1(e){return hh(e,{weekStartsOn:1})}function r8(e){let t=Rn(e),r=t.getFullYear(),n=cc(e,0);n.setFullYear(r+1,0,4),n.setHours(0,0,0,0);let o=F1(n),a=cc(e,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);let i=F1(a);return t.getTime()>=o.getTime()?r+1:t.getTime()>=i.getTime()?r:r-1}function HM(e){let t=Rn(e);return t.setHours(0,0,0,0),t}function Nue(e){let t=Rn(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 GZe(e,t){let r=HM(e),n=HM(t),o=+r-Nue(r),a=+n-Nue(n);return Math.round((o-a)/qZe)}function KZe(e){let t=r8(e),r=cc(e,0);return r.setFullYear(t,0,4),r.setHours(0,0,0,0),F1(r)}function XZe(e){return cc(e,Date.now())}function B1(e,t){let r=HM(e),n=HM(t);return+r==+n}function YZe(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Mue(e){if(!YZe(e)&&typeof e!="number")return!1;let t=Rn(e);return!isNaN(Number(t))}function QZe(e){let t=Rn(e),r=t.getMonth();return t.setFullYear(t.getFullYear(),r+1,0),t.setHours(23,59,59,999),t}function n8(e,t){let r=Rn(e.start),n=Rn(e.end),o=+r>+n,a=o?+r:+n,i=o?n:r;i.setHours(0,0,0,0);let s=t?.step??1;if(!s)return[];s<0&&(s=-s,o=!o);let l=[];for(;+i<=a;)l.push(Rn(i)),i.setDate(i.getDate()+s),i.setHours(0,0,0,0);return o?l.reverse():l}function ZZe(e){let t=Rn(e);return t.setDate(1),t.setHours(0,0,0,0),t}function JZe(e){let t=Rn(e),r=cc(e,0);return r.setFullYear(t.getFullYear(),0,1),r.setHours(0,0,0,0),r}function eJe(e,t){let r=av(),n=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,o=Rn(e),a=o.getDay(),i=(a<n?-7:0)+6-(a-n);return o.setDate(o.getDate()+i),o.setHours(23,59,59,999),o}var Gnr={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"}},tJe=(e,t,r)=>{let n,o=Gnr[e];return typeof o=="string"?n=o:t===1?n=o.one:n=o.other.replace("{{count}}",t.toString()),r?.addSuffix?r.comparison&&r.comparison>0?"in "+n:n+" ago":n};function o8(e){return(t={})=>{let r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}var Knr={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Xnr={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Ynr={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},rJe={date:o8({formats:Knr,defaultWidth:"full"}),time:o8({formats:Xnr,defaultWidth:"full"}),dateTime:o8({formats:Ynr,defaultWidth:"full"})};var Qnr={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},nJe=(e,t,r,n)=>Qnr[e];function jM(e){return(t,r)=>{let n=r?.context?String(r.context):"standalone",o;if(n==="formatting"&&e.formattingValues){let i=e.defaultFormattingWidth||e.defaultWidth,s=r?.width?String(r.width):i;o=e.formattingValues[s]||e.formattingValues[i]}else{let i=e.defaultWidth,s=r?.width?String(r.width):e.defaultWidth;o=e.values[s]||e.values[i]}let a=e.argumentCallback?e.argumentCallback(t):t;return o[a]}}var Znr={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Jnr={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},eor={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"]},tor={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"]},ror={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"}},nor={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"}},oor=(e,t)=>{let r=Number(e),n=r%100;if(n>20||n<10)switch(n%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},oJe={ordinalNumber:oor,era:jM({values:Znr,defaultWidth:"wide"}),quarter:jM({values:Jnr,defaultWidth:"wide",argumentCallback:e=>e-1}),month:jM({values:eor,defaultWidth:"wide"}),day:jM({values:tor,defaultWidth:"wide"}),dayPeriod:jM({values:ror,defaultWidth:"wide",formattingValues:nor,defaultFormattingWidth:"wide"})};function $M(e){return(t,r={})=>{let n=r.width,o=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],a=t.match(o);if(!a)return null;let i=a[0],s=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?ior(s,d=>d.test(i)):aor(s,d=>d.test(i)),c;c=e.valueCallback?e.valueCallback(l):l,c=r.valueCallback?r.valueCallback(c):c;let u=t.slice(i.length);return{value:c,rest:u}}}function aor(e,t){for(let r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r}function ior(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r}function aJe(e){return(t,r={})=>{let n=t.match(e.matchPattern);if(!n)return null;let o=n[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(o.length);return{value:i,rest:s}}}var sor=/^(\d+)(th|st|nd|rd)?/i,lor=/\d+/i,cor={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},uor={any:[/^b/i,/^(a|c)/i]},dor={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},por={any:[/1/i,/2/i,/3/i,/4/i]},mor={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},hor={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]},gor={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},vor={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]},yor={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},xor={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}},iJe={ordinalNumber:aJe({matchPattern:sor,parsePattern:lor,valueCallback:e=>parseInt(e,10)}),era:$M({matchPatterns:cor,defaultMatchWidth:"wide",parsePatterns:uor,defaultParseWidth:"any"}),quarter:$M({matchPatterns:dor,defaultMatchWidth:"wide",parsePatterns:por,defaultParseWidth:"any",valueCallback:e=>e+1}),month:$M({matchPatterns:mor,defaultMatchWidth:"wide",parsePatterns:hor,defaultParseWidth:"any"}),day:$M({matchPatterns:gor,defaultMatchWidth:"wide",parsePatterns:vor,defaultParseWidth:"any"}),dayPeriod:$M({matchPatterns:yor,defaultMatchWidth:"any",parsePatterns:xor,defaultParseWidth:"any"})};var Tue={code:"en-US",formatDistance:tJe,formatLong:rJe,formatRelative:nJe,localize:oJe,match:iJe,options:{weekStartsOn:0,firstWeekContainsDate:1}};function sJe(e){let t=Rn(e);return GZe(t,JZe(t))+1}function lJe(e){let t=Rn(e),r=+F1(t)-+KZe(t);return Math.round(r/t8)+1}function a8(e,t){let r=Rn(e),n=r.getFullYear(),o=av(),a=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,i=cc(e,0);i.setFullYear(n+1,0,a),i.setHours(0,0,0,0);let s=hh(i,t),l=cc(e,0);l.setFullYear(n,0,a),l.setHours(0,0,0,0);let c=hh(l,t);return r.getTime()>=s.getTime()?n+1:r.getTime()>=c.getTime()?n:n-1}function cJe(e,t){let r=av(),n=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,o=a8(e,t),a=cc(e,0);return a.setFullYear(o,0,n),a.setHours(0,0,0,0),hh(a,t)}function uJe(e,t){let r=Rn(e),n=+hh(r,t)-+cJe(r,t);return Math.round(n/t8)+1}function ko(e,t){let r=e<0?"-":"",n=Math.abs(e).toString().padStart(t,"0");return r+n}var px={y(e,t){let r=e.getFullYear(),n=r>0?r:1-r;return ko(t==="yy"?n%100:n,t.length)},M(e,t){let r=e.getMonth();return t==="M"?String(r+1):ko(r+1,2)},d(e,t){return ko(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 ko(e.getHours()%12||12,t.length)},H(e,t){return ko(e.getHours(),t.length)},m(e,t){return ko(e.getMinutes(),t.length)},s(e,t){return ko(e.getSeconds(),t.length)},S(e,t){let r=t.length,n=e.getMilliseconds(),o=Math.trunc(n*Math.pow(10,r-3));return ko(o,t.length)}};var qM={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Aue={G:function(e,t,r){let n=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return r.era(n,{width:"abbreviated"});case"GGGGG":return r.era(n,{width:"narrow"});case"GGGG":default:return r.era(n,{width:"wide"})}},y:function(e,t,r){if(t==="yo"){let n=e.getFullYear(),o=n>0?n:1-n;return r.ordinalNumber(o,{unit:"year"})}return px.y(e,t)},Y:function(e,t,r,n){let o=a8(e,n),a=o>0?o:1-o;if(t==="YY"){let i=a%100;return ko(i,2)}return t==="Yo"?r.ordinalNumber(a,{unit:"year"}):ko(a,t.length)},R:function(e,t){let r=r8(e);return ko(r,t.length)},u:function(e,t){let r=e.getFullYear();return ko(r,t.length)},Q:function(e,t,r){let n=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(n);case"QQ":return ko(n,2);case"Qo":return r.ordinalNumber(n,{unit:"quarter"});case"QQQ":return r.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(n,{width:"wide",context:"formatting"})}},q:function(e,t,r){let n=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(n);case"qq":return ko(n,2);case"qo":return r.ordinalNumber(n,{unit:"quarter"});case"qqq":return r.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(n,{width:"wide",context:"standalone"})}},M:function(e,t,r){let n=e.getMonth();switch(t){case"M":case"MM":return px.M(e,t);case"Mo":return r.ordinalNumber(n+1,{unit:"month"});case"MMM":return r.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(n,{width:"wide",context:"formatting"})}},L:function(e,t,r){let n=e.getMonth();switch(t){case"L":return String(n+1);case"LL":return ko(n+1,2);case"Lo":return r.ordinalNumber(n+1,{unit:"month"});case"LLL":return r.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(n,{width:"wide",context:"standalone"})}},w:function(e,t,r,n){let o=uJe(e,n);return t==="wo"?r.ordinalNumber(o,{unit:"week"}):ko(o,t.length)},I:function(e,t,r){let n=lJe(e);return t==="Io"?r.ordinalNumber(n,{unit:"week"}):ko(n,t.length)},d:function(e,t,r){return t==="do"?r.ordinalNumber(e.getDate(),{unit:"date"}):px.d(e,t)},D:function(e,t,r){let n=sJe(e);return t==="Do"?r.ordinalNumber(n,{unit:"dayOfYear"}):ko(n,t.length)},E:function(e,t,r){let n=e.getDay();switch(t){case"E":case"EE":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"})}},e:function(e,t,r,n){let o=e.getDay(),a=(o-n.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return ko(a,2);case"eo":return r.ordinalNumber(a,{unit:"day"});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"})}},c:function(e,t,r,n){let o=e.getDay(),a=(o-n.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return ko(a,t.length);case"co":return r.ordinalNumber(a,{unit:"day"});case"ccc":return r.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(o,{width:"narrow",context:"standalone"});case"cccccc":return r.day(o,{width:"short",context:"standalone"});case"cccc":default:return r.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,r){let n=e.getDay(),o=n===0?7:n;switch(t){case"i":return String(o);case"ii":return ko(o,t.length);case"io":return r.ordinalNumber(o,{unit:"day"});case"iii":return r.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(n,{width:"short",context:"formatting"});case"iiii":default:return r.day(n,{width:"wide",context:"formatting"})}},a:function(e,t,r){let o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,r){let n=e.getHours(),o;switch(n===12?o=qM.noon:n===0?o=qM.midnight:o=n/12>=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,r){let n=e.getHours(),o;switch(n>=17?o=qM.evening:n>=12?o=qM.afternoon:n>=4?o=qM.morning:o=qM.night,t){case"B":case"BB":case"BBB":return r.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,r){if(t==="ho"){let n=e.getHours()%12;return n===0&&(n=12),r.ordinalNumber(n,{unit:"hour"})}return px.h(e,t)},H:function(e,t,r){return t==="Ho"?r.ordinalNumber(e.getHours(),{unit:"hour"}):px.H(e,t)},K:function(e,t,r){let n=e.getHours()%12;return t==="Ko"?r.ordinalNumber(n,{unit:"hour"}):ko(n,t.length)},k:function(e,t,r){let n=e.getHours();return n===0&&(n=24),t==="ko"?r.ordinalNumber(n,{unit:"hour"}):ko(n,t.length)},m:function(e,t,r){return t==="mo"?r.ordinalNumber(e.getMinutes(),{unit:"minute"}):px.m(e,t)},s:function(e,t,r){return t==="so"?r.ordinalNumber(e.getSeconds(),{unit:"second"}):px.s(e,t)},S:function(e,t){return px.S(e,t)},X:function(e,t,r){let n=e.getTimezoneOffset();if(n===0)return"Z";switch(t){case"X":return fJe(n);case"XXXX":case"XX":return V1(n);case"XXXXX":case"XXX":default:return V1(n,":")}},x:function(e,t,r){let n=e.getTimezoneOffset();switch(t){case"x":return fJe(n);case"xxxx":case"xx":return V1(n);case"xxxxx":case"xxx":default:return V1(n,":")}},O:function(e,t,r){let n=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+dJe(n,":");case"OOOO":default:return"GMT"+V1(n,":")}},z:function(e,t,r){let n=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+dJe(n,":");case"zzzz":default:return"GMT"+V1(n,":")}},t:function(e,t,r){let n=Math.trunc(e.getTime()/1e3);return ko(n,t.length)},T:function(e,t,r){let n=e.getTime();return ko(n,t.length)}};function dJe(e,t=""){let r=e>0?"-":"+",n=Math.abs(e),o=Math.trunc(n/60),a=n%60;return a===0?r+String(o):r+String(o)+t+ko(a,2)}function fJe(e,t){return e%60===0?(e>0?"-":"+")+ko(Math.abs(e)/60,2):V1(e,t)}function V1(e,t=""){let r=e>0?"-":"+",n=Math.abs(e),o=ko(Math.trunc(n/60),2),a=ko(n%60,2);return r+o+t+a}var pJe=(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"})}},mJe=(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"})}},bor=(e,t)=>{let r=e.match(/(P+)(p+)?/)||[],n=r[1],o=r[2];if(!o)return pJe(e,t);let a;switch(n){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}}",pJe(n,t)).replace("{{time}}",mJe(o,t))},hJe={p:mJe,P:bor};var wor=/^D+$/,Cor=/^Y+$/,Sor=["D","DD","YY","YYYY"];function gJe(e){return wor.test(e)}function vJe(e){return Cor.test(e)}function yJe(e,t,r){let n=Por(e,t,r);if(console.warn(n),Sor.includes(e))throw new RangeError(n)}function Por(e,t,r){let n=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${n} to the input \`${r}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}var Ior=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,kor=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Ror=/^'([^]*?)'?$/,Nor=/''/g,Mor=/[a-zA-Z]/;function Lue(e,t,r){let n=av(),o=r?.locale??n.locale??Tue,a=r?.firstWeekContainsDate??r?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=r?.weekStartsOn??r?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,s=Rn(e);if(!Mue(s))throw new RangeError("Invalid time value");let l=t.match(kor).map(u=>{let d=u[0];if(d==="p"||d==="P"){let f=hJe[d];return f(u,o.formatLong)}return u}).join("").match(Ior).map(u=>{if(u==="''")return{isToken:!1,value:"'"};let d=u[0];if(d==="'")return{isToken:!1,value:Tor(u)};if(Aue[d])return{isToken:!0,value:u};if(d.match(Mor))throw new RangeError("Format string contains an unescaped latin alphabet character `"+d+"`");return{isToken:!1,value:u}});o.localize.preprocessor&&(l=o.localize.preprocessor(s,l));let c={firstWeekContainsDate:a,weekStartsOn:i,locale:o};return l.map(u=>{if(!u.isToken)return u.value;let d=u.value;(!r?.useAdditionalWeekYearTokens&&vJe(d)||!r?.useAdditionalDayOfYearTokens&&gJe(d))&&yJe(d,t,String(e));let f=Aue[d[0]];return f(s,d,o.localize,c)}).join("")}function Tor(e){let t=e.match(Ror);return t?t[1].replace(Nor,"'"):e}function Eue(e){return Rn(e).getDay()}function xJe(e,t){let r=Rn(e),n=Rn(t);return r.getFullYear()===n.getFullYear()&&r.getMonth()===n.getMonth()}function bJe(e){return B1(e,XZe(e))}function wJe(e,t){return e8(e,-t)}var cl=D(lt(),1);var ur=D(lt(),1);var Ur=D(Or(),1),Due=["Enter"," "],Aor=["ArrowDown","PageUp","Home"],SJe=["ArrowUp","PageDown","End"],Lor=[...Aor,...SJe],Eor={ltr:[...Due,"ArrowRight"],rtl:[...Due,"ArrowLeft"]},Dor={ltr:["ArrowLeft"],rtl:["ArrowRight"]},EF="Menu",[AF,Oor,_or]=cf(EF),[U1,Oue]=hn(EF,[_or,gu,zM]),DF=gu(),PJe=zM(),[IJe,fw]=U1(EF),[For,OF]=U1(EF),kJe=e=>{let{__scopeMenu:t,open:r=!1,children:n,dir:o,onOpenChange:a,modal:i=!0}=e,s=DF(t),[l,c]=ur.useState(null),u=ur.useRef(!1),d=to(a),f=wp(o);return ur.useEffect(()=>{let p=()=>{u.current=!0,document.addEventListener("pointerdown",m,{capture:!0,once:!0}),document.addEventListener("pointermove",m,{capture:!0,once:!0})},m=()=>u.current=!1;return document.addEventListener("keydown",p,{capture:!0}),()=>{document.removeEventListener("keydown",p,{capture:!0}),document.removeEventListener("pointerdown",m,{capture:!0}),document.removeEventListener("pointermove",m,{capture:!0})}},[]),(0,Ur.jsx)(_m,{...s,children:(0,Ur.jsx)(IJe,{scope:t,open:r,onOpenChange:d,content:l,onContentChange:c,children:(0,Ur.jsx)(For,{scope:t,onClose:ur.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:u,dir:f,modal:i,children:n})})})};kJe.displayName=EF;var Bor="MenuAnchor",_ue=ur.forwardRef((e,t)=>{let{__scopeMenu:r,...n}=e,o=DF(r);return(0,Ur.jsx)(Fm,{...o,...n,ref:t})});_ue.displayName=Bor;var Fue="MenuPortal",[Vor,RJe]=U1(Fue,{forceMount:void 0}),NJe=e=>{let{__scopeMenu:t,forceMount:r,children:n,container:o}=e,a=fw(Fue,t);return(0,Ur.jsx)(Vor,{scope:t,forceMount:r,children:(0,Ur.jsx)(uo,{present:r||a.open,children:(0,Ur.jsx)(vu,{asChild:!0,container:o,children:n})})})};NJe.displayName=Fue;var em="MenuContent",[Uor,Bue]=U1(em),MJe=ur.forwardRef((e,t)=>{let r=RJe(em,e.__scopeMenu),{forceMount:n=r.forceMount,...o}=e,a=fw(em,e.__scopeMenu),i=OF(em,e.__scopeMenu);return(0,Ur.jsx)(AF.Provider,{scope:e.__scopeMenu,children:(0,Ur.jsx)(uo,{present:n||a.open,children:(0,Ur.jsx)(AF.Slot,{scope:e.__scopeMenu,children:i.modal?(0,Ur.jsx)(zor,{...o,ref:t}):(0,Ur.jsx)(Hor,{...o,ref:t})})})})}),zor=ur.forwardRef((e,t)=>{let r=fw(em,e.__scopeMenu),n=ur.useRef(null),o=Xt(t,n);return ur.useEffect(()=>{let a=n.current;if(a)return U0(a)},[]),(0,Ur.jsx)(Vue,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:He(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),Hor=ur.forwardRef((e,t)=>{let r=fw(em,e.__scopeMenu);return(0,Ur.jsx)(Vue,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),jor=Sc("MenuContent.ScrollLock"),Vue=ur.forwardRef((e,t)=>{let{__scopeMenu:r,loop:n=!1,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:i,disableOutsidePointerEvents:s,onEntryFocus:l,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,disableOutsideScroll:m,...h}=e,g=fw(em,r),v=OF(em,r),y=DF(r),x=PJe(r),w=Oor(r),[b,C]=ur.useState(null),S=ur.useRef(null),P=Xt(t,S,g.onContentChange),N=ur.useRef(0),T=ur.useRef(""),A=ur.useRef(0),M=ur.useRef(null),O=ur.useRef("right"),F=ur.useRef(0),I=m?Wy:ur.Fragment,k=m?{as:jor,allowPinchZoom:!0}:void 0,R=_=>{let U=T.current+_,V=w().filter(z=>!z.disabled),L=document.activeElement,H=V.find(z=>z.ref.current===L)?.textValue,j=V.map(z=>z.textValue),$=rar(j,U,H),W=V.find(z=>z.textValue===$)?.ref.current;(function z(G){T.current=G,window.clearTimeout(N.current),G!==""&&(N.current=window.setTimeout(()=>z(""),1e3))})(U),W&&setTimeout(()=>W.focus())};ur.useEffect(()=>()=>window.clearTimeout(N.current),[]),V0();let E=ur.useCallback(_=>O.current===M.current?.side&&oar(_,M.current?.area),[]);return(0,Ur.jsx)(Uor,{scope:r,searchRef:T,onItemEnter:ur.useCallback(_=>{E(_)&&_.preventDefault()},[E]),onItemLeave:ur.useCallback(_=>{E(_)||(S.current?.focus(),C(null))},[E]),onTriggerLeave:ur.useCallback(_=>{E(_)&&_.preventDefault()},[E]),pointerGraceTimerRef:A,onPointerGraceIntentChange:ur.useCallback(_=>{M.current=_},[]),children:(0,Ur.jsx)(I,{...k,children:(0,Ur.jsx)(qy,{asChild:!0,trapped:o,onMountAutoFocus:He(a,_=>{_.preventDefault(),S.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:(0,Ur.jsx)(kc,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,children:(0,Ur.jsx)(QG,{asChild:!0,...x,dir:v.dir,orientation:"vertical",loop:n,currentTabStopId:b,onCurrentTabStopIdChange:C,onEntryFocus:He(l,_=>{v.isUsingKeyboardRef.current||_.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,Ur.jsx)(dg,{role:"menu","aria-orientation":"vertical","data-state":qJe(g.open),"data-radix-menu-content":"",dir:v.dir,...y,...h,ref:P,style:{outline:"none",...h.style},onKeyDown:He(h.onKeyDown,_=>{let V=_.target.closest("[data-radix-menu-content]")===_.currentTarget,L=_.ctrlKey||_.altKey||_.metaKey,H=_.key.length===1;V&&(_.key==="Tab"&&_.preventDefault(),!L&&H&&R(_.key));let j=S.current;if(_.target!==j||!Lor.includes(_.key))return;_.preventDefault();let W=w().filter(z=>!z.disabled).map(z=>z.ref.current);SJe.includes(_.key)&&W.reverse(),ear(W)}),onBlur:He(e.onBlur,_=>{_.currentTarget.contains(_.target)||(window.clearTimeout(N.current),T.current="")}),onPointerMove:He(e.onPointerMove,LF(_=>{let U=_.target,V=F.current!==_.clientX;if(_.currentTarget.contains(U)&&V){let L=_.clientX>F.current?"right":"left";O.current=L,F.current=_.clientX}}))})})})})})})});MJe.displayName=em;var $or="MenuGroup",Uue=ur.forwardRef((e,t)=>{let{__scopeMenu:r,...n}=e;return(0,Ur.jsx)(rt.div,{role:"group",...n,ref:t})});Uue.displayName=$or;var qor="MenuLabel",TJe=ur.forwardRef((e,t)=>{let{__scopeMenu:r,...n}=e;return(0,Ur.jsx)(rt.div,{...n,ref:t})});TJe.displayName=qor;var i8="MenuItem",CJe="menu.itemSelect",l8=ur.forwardRef((e,t)=>{let{disabled:r=!1,onSelect:n,...o}=e,a=ur.useRef(null),i=OF(i8,e.__scopeMenu),s=Bue(i8,e.__scopeMenu),l=Xt(t,a),c=ur.useRef(!1),u=()=>{let d=a.current;if(!r&&d){let f=new CustomEvent(CJe,{bubbles:!0,cancelable:!0});d.addEventListener(CJe,p=>n?.(p),{once:!0}),ey(d,f),f.defaultPrevented?c.current=!1:i.onClose()}};return(0,Ur.jsx)(AJe,{...o,ref:l,disabled:r,onClick:He(e.onClick,u),onPointerDown:d=>{e.onPointerDown?.(d),c.current=!0},onPointerUp:He(e.onPointerUp,d=>{c.current||d.currentTarget?.click()}),onKeyDown:He(e.onKeyDown,d=>{let f=s.searchRef.current!=="";r||f&&d.key===" "||Due.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})})});l8.displayName=i8;var AJe=ur.forwardRef((e,t)=>{let{__scopeMenu:r,disabled:n=!1,textValue:o,...a}=e,i=Bue(i8,r),s=PJe(r),l=ur.useRef(null),c=Xt(t,l),[u,d]=ur.useState(!1),[f,p]=ur.useState("");return ur.useEffect(()=>{let m=l.current;m&&p((m.textContent??"").trim())},[a.children]),(0,Ur.jsx)(AF.ItemSlot,{scope:r,disabled:n,textValue:o??f,children:(0,Ur.jsx)(ZG,{asChild:!0,...s,focusable:!n,children:(0,Ur.jsx)(rt.div,{role:"menuitem","data-highlighted":u?"":void 0,"aria-disabled":n||void 0,"data-disabled":n?"":void 0,...a,ref:c,onPointerMove:He(e.onPointerMove,LF(m=>{n?i.onItemLeave(m):(i.onItemEnter(m),m.defaultPrevented||m.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:He(e.onPointerLeave,LF(m=>i.onItemLeave(m))),onFocus:He(e.onFocus,()=>d(!0)),onBlur:He(e.onBlur,()=>d(!1))})})})}),Wor="MenuCheckboxItem",LJe=ur.forwardRef((e,t)=>{let{checked:r=!1,onCheckedChange:n,...o}=e;return(0,Ur.jsx)(FJe,{scope:e.__scopeMenu,checked:r,children:(0,Ur.jsx)(l8,{role:"menuitemcheckbox","aria-checked":s8(r)?"mixed":r,...o,ref:t,"data-state":jue(r),onSelect:He(o.onSelect,()=>n?.(s8(r)?!0:!r),{checkForDefaultPrevented:!1})})})});LJe.displayName=Wor;var EJe="MenuRadioGroup",[Gor,Kor]=U1(EJe,{value:void 0,onValueChange:()=>{}}),DJe=ur.forwardRef((e,t)=>{let{value:r,onValueChange:n,...o}=e,a=to(n);return(0,Ur.jsx)(Gor,{scope:e.__scopeMenu,value:r,onValueChange:a,children:(0,Ur.jsx)(Uue,{...o,ref:t})})});DJe.displayName=EJe;var OJe="MenuRadioItem",_Je=ur.forwardRef((e,t)=>{let{value:r,...n}=e,o=Kor(OJe,e.__scopeMenu),a=r===o.value;return(0,Ur.jsx)(FJe,{scope:e.__scopeMenu,checked:a,children:(0,Ur.jsx)(l8,{role:"menuitemradio","aria-checked":a,...n,ref:t,"data-state":jue(a),onSelect:He(n.onSelect,()=>o.onValueChange?.(r),{checkForDefaultPrevented:!1})})})});_Je.displayName=OJe;var zue="MenuItemIndicator",[FJe,Xor]=U1(zue,{checked:!1}),BJe=ur.forwardRef((e,t)=>{let{__scopeMenu:r,forceMount:n,...o}=e,a=Xor(zue,r);return(0,Ur.jsx)(uo,{present:n||s8(a.checked)||a.checked===!0,children:(0,Ur.jsx)(rt.span,{...o,ref:t,"data-state":jue(a.checked)})})});BJe.displayName=zue;var Yor="MenuSeparator",VJe=ur.forwardRef((e,t)=>{let{__scopeMenu:r,...n}=e;return(0,Ur.jsx)(rt.div,{role:"separator","aria-orientation":"horizontal",...n,ref:t})});VJe.displayName=Yor;var Qor="MenuArrow",UJe=ur.forwardRef((e,t)=>{let{__scopeMenu:r,...n}=e,o=DF(r);return(0,Ur.jsx)(fg,{...o,...n,ref:t})});UJe.displayName=Qor;var Hue="MenuSub",[Zor,zJe]=U1(Hue),Jor=e=>{let{__scopeMenu:t,children:r,open:n=!1,onOpenChange:o}=e,a=fw(Hue,t),i=DF(t),[s,l]=ur.useState(null),[c,u]=ur.useState(null),d=to(o);return ur.useEffect(()=>(a.open===!1&&d(!1),()=>d(!1)),[a.open,d]),(0,Ur.jsx)(_m,{...i,children:(0,Ur.jsx)(IJe,{scope:t,open:n,onOpenChange:d,content:c,onContentChange:u,children:(0,Ur.jsx)(Zor,{scope:t,contentId:Vo(),triggerId:Vo(),trigger:s,onTriggerChange:l,children:r})})})};Jor.displayName=Hue;var TF="MenuSubTrigger",HJe=ur.forwardRef((e,t)=>{let r=fw(TF,e.__scopeMenu),n=OF(TF,e.__scopeMenu),o=zJe(TF,e.__scopeMenu),a=Bue(TF,e.__scopeMenu),i=ur.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:l}=a,c={__scopeMenu:e.__scopeMenu},u=ur.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return ur.useEffect(()=>u,[u]),ur.useEffect(()=>{let d=s.current;return()=>{window.clearTimeout(d),l(null)}},[s,l]),(0,Ur.jsx)(_ue,{asChild:!0,...c,children:(0,Ur.jsx)(AJe,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":o.contentId,"data-state":qJe(r.open),...e,ref:Jv(t,o.onTriggerChange),onClick:d=>{e.onClick?.(d),!(e.disabled||d.defaultPrevented)&&(d.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:He(e.onPointerMove,LF(d=>{a.onItemEnter(d),!d.defaultPrevented&&!e.disabled&&!r.open&&!i.current&&(a.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{r.onOpenChange(!0),u()},100))})),onPointerLeave:He(e.onPointerLeave,LF(d=>{u();let f=r.content?.getBoundingClientRect();if(f){let p=r.content?.dataset.side,m=p==="right",h=m?-5:5,g=f[m?"left":"right"],v=f[m?"right":"left"];a.onPointerGraceIntentChange({area:[{x:d.clientX+h,y:d.clientY},{x:g,y:f.top},{x:v,y:f.top},{x:v,y:f.bottom},{x:g,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:He(e.onKeyDown,d=>{let f=a.searchRef.current!=="";e.disabled||f&&d.key===" "||Eor[n.dir].includes(d.key)&&(r.onOpenChange(!0),r.content?.focus(),d.preventDefault())})})})});HJe.displayName=TF;var jJe="MenuSubContent",$Je=ur.forwardRef((e,t)=>{let r=RJe(em,e.__scopeMenu),{forceMount:n=r.forceMount,...o}=e,a=fw(em,e.__scopeMenu),i=OF(em,e.__scopeMenu),s=zJe(jJe,e.__scopeMenu),l=ur.useRef(null),c=Xt(t,l);return(0,Ur.jsx)(AF.Provider,{scope:e.__scopeMenu,children:(0,Ur.jsx)(uo,{present:n||a.open,children:(0,Ur.jsx)(AF.Slot,{scope:e.__scopeMenu,children:(0,Ur.jsx)(Vue,{id:s.contentId,"aria-labelledby":s.triggerId,...o,ref:c,align:"start",side:i.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:u=>{i.isUsingKeyboardRef.current&&l.current?.focus(),u.preventDefault()},onCloseAutoFocus:u=>u.preventDefault(),onFocusOutside:He(e.onFocusOutside,u=>{u.target!==s.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:He(e.onEscapeKeyDown,u=>{i.onClose(),u.preventDefault()}),onKeyDown:He(e.onKeyDown,u=>{let d=u.currentTarget.contains(u.target),f=Dor[i.dir].includes(u.key);d&&f&&(a.onOpenChange(!1),s.trigger?.focus(),u.preventDefault())})})})})})});$Je.displayName=jJe;function qJe(e){return e?"open":"closed"}function s8(e){return e==="indeterminate"}function jue(e){return s8(e)?"indeterminate":e?"checked":"unchecked"}function ear(e){let t=document.activeElement;for(let r of e)if(r===t||(r.focus(),document.activeElement!==t))return}function tar(e,t){return e.map((r,n)=>e[(t+n)%e.length])}function rar(e,t,r){let o=t.length>1&&Array.from(t).every(c=>c===t[0])?t[0]:t,a=r?e.indexOf(r):-1,i=tar(e,Math.max(a,0));o.length===1&&(i=i.filter(c=>c!==r));let l=i.find(c=>c.toLowerCase().startsWith(o.toLowerCase()));return l!==r?l:void 0}function nar(e,t){let{x:r,y:n}=e,o=!1;for(let a=0,i=t.length-1;a<t.length;i=a++){let s=t[a],l=t[i],c=s.x,u=s.y,d=l.x,f=l.y;u>n!=f>n&&r<(d-c)*(n-u)/(f-u)+c&&(o=!o)}return o}function oar(e,t){if(!t)return!1;let r={x:e.clientX,y:e.clientY};return nar(r,t)}function LF(e){return t=>t.pointerType==="mouse"?e(t):void 0}var WJe=kJe,GJe=_ue,KJe=NJe,XJe=MJe,YJe=Uue,QJe=TJe,ZJe=l8,JJe=LJe,eet=DJe,tet=_Je,ret=BJe,net=VJe,oet=UJe;var aet=HJe,iet=$Je;var Fl=D(Or(),1),c8="DropdownMenu",[iar,kKn]=hn(c8,[Oue]),Ou=Oue(),[sar,set]=iar(c8),lar=e=>{let{__scopeDropdownMenu:t,children:r,dir:n,open:o,defaultOpen:a,onOpenChange:i,modal:s=!0}=e,l=Ou(t),c=cl.useRef(null),[u,d]=eo({prop:o,defaultProp:a??!1,onChange:i,caller:c8});return(0,Fl.jsx)(sar,{scope:t,triggerId:Vo(),triggerRef:c,contentId:Vo(),open:u,onOpenChange:d,onOpenToggle:cl.useCallback(()=>d(f=>!f),[d]),modal:s,children:(0,Fl.jsx)(WJe,{...l,open:u,onOpenChange:d,dir:n,modal:s,children:r})})};lar.displayName=c8;var cet="DropdownMenuTrigger",car=cl.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,disabled:n=!1,...o}=e,a=set(cet,r),i=Ou(r);return(0,Fl.jsx)(GJe,{asChild:!0,...i,children:(0,Fl.jsx)(rt.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":n?"":void 0,disabled:n,...o,ref:Jv(t,a.triggerRef),onPointerDown:He(e.onPointerDown,s=>{!n&&s.button===0&&s.ctrlKey===!1&&(a.onOpenToggle(),a.open||s.preventDefault())}),onKeyDown:He(e.onKeyDown,s=>{n||(["Enter"," "].includes(s.key)&&a.onOpenToggle(),s.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(s.key)&&s.preventDefault())})})})});car.displayName=cet;var uar="DropdownMenuPortal",uet=e=>{let{__scopeDropdownMenu:t,...r}=e,n=Ou(t);return(0,Fl.jsx)(KJe,{...n,...r})};uet.displayName=uar;var det="DropdownMenuContent",fet=cl.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,o=set(det,r),a=Ou(r),i=cl.useRef(!1);return(0,Fl.jsx)(XJe,{id:o.contentId,"aria-labelledby":o.triggerId,...a,...n,ref:t,onCloseAutoFocus:He(e.onCloseAutoFocus,s=>{i.current||o.triggerRef.current?.focus(),i.current=!1,s.preventDefault()}),onInteractOutside:He(e.onInteractOutside,s=>{let l=s.detail.originalEvent,c=l.button===0&&l.ctrlKey===!0,u=l.button===2||c;(!o.modal||u)&&(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)"}})});fet.displayName=det;var dar="DropdownMenuGroup",far=cl.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,o=Ou(r);return(0,Fl.jsx)(YJe,{...o,...n,ref:t})});far.displayName=dar;var par="DropdownMenuLabel",pet=cl.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,o=Ou(r);return(0,Fl.jsx)(QJe,{...o,...n,ref:t})});pet.displayName=par;var mar="DropdownMenuItem",met=cl.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,o=Ou(r);return(0,Fl.jsx)(ZJe,{...o,...n,ref:t})});met.displayName=mar;var har="DropdownMenuCheckboxItem",het=cl.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,o=Ou(r);return(0,Fl.jsx)(JJe,{...o,...n,ref:t})});het.displayName=har;var gar="DropdownMenuRadioGroup",yar=cl.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,o=Ou(r);return(0,Fl.jsx)(eet,{...o,...n,ref:t})});yar.displayName=gar;var xar="DropdownMenuRadioItem",get=cl.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,o=Ou(r);return(0,Fl.jsx)(tet,{...o,...n,ref:t})});get.displayName=xar;var bar="DropdownMenuItemIndicator",vet=cl.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,o=Ou(r);return(0,Fl.jsx)(ret,{...o,...n,ref:t})});vet.displayName=bar;var war="DropdownMenuSeparator",yet=cl.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,o=Ou(r);return(0,Fl.jsx)(net,{...o,...n,ref:t})});yet.displayName=war;var Car="DropdownMenuArrow",Sar=cl.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,o=Ou(r);return(0,Fl.jsx)(oet,{...o,...n,ref:t})});Sar.displayName=Car;var Par="DropdownMenuSubTrigger",xet=cl.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,o=Ou(r);return(0,Fl.jsx)(aet,{...o,...n,ref:t})});xet.displayName=Par;var Iar="DropdownMenuSubContent",bet=cl.forwardRef((e,t)=>{let{__scopeDropdownMenu:r,...n}=e,o=Ou(r);return(0,Fl.jsx)(iet,{...o,...n,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)"}})});bet.displayName=Iar;var wet=uet,$ue=fet;var que=pet,Wue=met,Gue=het;var Kue=get,Xue=vet,Yue=yet;var Que=xet,Zue=bet;var Dt=D(lt(),1),ade=D(ng(),1);function Jue(e,[t,r]){return Math.min(r,Math.max(t,e))}var Cr=D(Or(),1),Rar=[" ","Enter","ArrowUp","ArrowDown"],Nar=[" ","Enter"],z1="Select",[d8,f8,Mar]=cf(z1),[WM,XKn]=hn(z1,[Mar,gu]),p8=gu(),[Tar,pw]=WM(z1),[Aar,Lar]=WM(z1),Cet=e=>{let{__scopeSelect:t,children:r,open:n,defaultOpen:o,onOpenChange:a,value:i,defaultValue:s,onValueChange:l,dir:c,name:u,autoComplete:d,disabled:f,required:p,form:m}=e,h=p8(t),[g,v]=Dt.useState(null),[y,x]=Dt.useState(null),[w,b]=Dt.useState(!1),C=wp(c),[S,P]=eo({prop:n,defaultProp:o??!1,onChange:a,caller:z1}),[N,T]=eo({prop:i,defaultProp:s,onChange:l,caller:z1}),A=Dt.useRef(null),M=g?m||!!g.closest("form"):!0,[O,F]=Dt.useState(new Set),I=Array.from(O).map(k=>k.props.value).join(";");return(0,Cr.jsx)(_m,{...h,children:(0,Cr.jsxs)(Tar,{required:p,scope:t,trigger:g,onTriggerChange:v,valueNode:y,onValueNodeChange:x,valueNodeHasChildren:w,onValueNodeHasChildrenChange:b,contentId:Vo(),value:N,onValueChange:T,open:S,onOpenChange:P,dir:C,triggerPointerDownPosRef:A,disabled:f,children:[(0,Cr.jsx)(d8.Provider,{scope:t,children:(0,Cr.jsx)(Aar,{scope:e.__scopeSelect,onNativeOptionAdd:Dt.useCallback(k=>{F(R=>new Set(R).add(k))},[]),onNativeOptionRemove:Dt.useCallback(k=>{F(R=>{let E=new Set(R);return E.delete(k),E})},[]),children:r})}),M?(0,Cr.jsxs)(Get,{"aria-hidden":!0,required:p,tabIndex:-1,name:u,autoComplete:d,value:N,onChange:k=>T(k.target.value),disabled:f,form:m,children:[N===void 0?(0,Cr.jsx)("option",{value:""}):null,Array.from(O)]},I):null]})})};Cet.displayName=z1;var Pet="SelectTrigger",Iet=Dt.forwardRef((e,t)=>{let{__scopeSelect:r,disabled:n=!1,...o}=e,a=p8(r),i=pw(Pet,r),s=i.disabled||n,l=Xt(t,i.onTriggerChange),c=f8(r),u=Dt.useRef("touch"),[d,f,p]=Xet(h=>{let g=c().filter(x=>!x.disabled),v=g.find(x=>x.value===i.value),y=Yet(g,h,v);y!==void 0&&i.onValueChange(y.value)}),m=h=>{s||(i.onOpenChange(!0),p()),h&&(i.triggerPointerDownPosRef.current={x:Math.round(h.pageX),y:Math.round(h.pageY)})};return(0,Cr.jsx)(Fm,{asChild:!0,...a,children:(0,Cr.jsx)(rt.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":Ket(i.value)?"":void 0,...o,ref:l,onClick:He(o.onClick,h=>{h.currentTarget.focus(),u.current!=="mouse"&&m(h)}),onPointerDown:He(o.onPointerDown,h=>{u.current=h.pointerType;let g=h.target;g.hasPointerCapture(h.pointerId)&&g.releasePointerCapture(h.pointerId),h.button===0&&h.ctrlKey===!1&&h.pointerType==="mouse"&&(m(h),h.preventDefault())}),onKeyDown:He(o.onKeyDown,h=>{let g=d.current!=="";!(h.ctrlKey||h.altKey||h.metaKey)&&h.key.length===1&&f(h.key),!(g&&h.key===" ")&&Rar.includes(h.key)&&(m(),h.preventDefault())})})})});Iet.displayName=Pet;var ket="SelectValue",Ret=Dt.forwardRef((e,t)=>{let{__scopeSelect:r,className:n,style:o,children:a,placeholder:i="",...s}=e,l=pw(ket,r),{onValueNodeHasChildrenChange:c}=l,u=a!==void 0,d=Xt(t,l.onValueNodeChange);return $n(()=>{c(u)},[c,u]),(0,Cr.jsx)(rt.span,{...s,ref:d,style:{pointerEvents:"none"},children:Ket(l.value)?(0,Cr.jsx)(Cr.Fragment,{children:i}):a})});Ret.displayName=ket;var Ear="SelectIcon",Net=Dt.forwardRef((e,t)=>{let{__scopeSelect:r,children:n,...o}=e;return(0,Cr.jsx)(rt.span,{"aria-hidden":!0,...o,ref:t,children:n||"\u25BC"})});Net.displayName=Ear;var Dar="SelectPortal",Met=e=>(0,Cr.jsx)(vu,{asChild:!0,...e});Met.displayName=Dar;var H1="SelectContent",Tet=Dt.forwardRef((e,t)=>{let r=pw(H1,e.__scopeSelect),[n,o]=Dt.useState();if($n(()=>{o(new DocumentFragment)},[]),!r.open){let a=n;return a?ade.createPortal((0,Cr.jsx)(Aet,{scope:e.__scopeSelect,children:(0,Cr.jsx)(d8.Slot,{scope:e.__scopeSelect,children:(0,Cr.jsx)("div",{children:e.children})})}),a):null}return(0,Cr.jsx)(Let,{...e,ref:t})});Tet.displayName=H1;var gh=10,[Aet,mw]=WM(H1),Oar="SelectContentImpl",_ar=Sc("SelectContent.RemoveScroll"),Let=Dt.forwardRef((e,t)=>{let{__scopeSelect:r,position:n="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:a,onPointerDownOutside:i,side:s,sideOffset:l,align:c,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g,...v}=e,y=pw(H1,r),[x,w]=Dt.useState(null),[b,C]=Dt.useState(null),S=Xt(t,z=>w(z)),[P,N]=Dt.useState(null),[T,A]=Dt.useState(null),M=f8(r),[O,F]=Dt.useState(!1),I=Dt.useRef(!1);Dt.useEffect(()=>{if(x)return U0(x)},[x]),V0();let k=Dt.useCallback(z=>{let[G,...X]=M().map(ie=>ie.ref.current),[Y]=X.slice(-1),ae=document.activeElement;for(let ie of z)if(ie===ae||(ie?.scrollIntoView({block:"nearest"}),ie===G&&b&&(b.scrollTop=0),ie===Y&&b&&(b.scrollTop=b.scrollHeight),ie?.focus(),document.activeElement!==ae))return},[M,b]),R=Dt.useCallback(()=>k([P,x]),[k,P,x]);Dt.useEffect(()=>{O&&R()},[O,R]);let{onOpenChange:E,triggerPointerDownPosRef:_}=y;Dt.useEffect(()=>{if(x){let z={x:0,y:0},G=Y=>{z={x:Math.abs(Math.round(Y.pageX)-(_.current?.x??0)),y:Math.abs(Math.round(Y.pageY)-(_.current?.y??0))}},X=Y=>{z.x<=10&&z.y<=10?Y.preventDefault():x.contains(Y.target)||E(!1),document.removeEventListener("pointermove",G),_.current=null};return _.current!==null&&(document.addEventListener("pointermove",G),document.addEventListener("pointerup",X,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",G),document.removeEventListener("pointerup",X,{capture:!0})}}},[x,E,_]),Dt.useEffect(()=>{let z=()=>E(!1);return window.addEventListener("blur",z),window.addEventListener("resize",z),()=>{window.removeEventListener("blur",z),window.removeEventListener("resize",z)}},[E]);let[U,V]=Xet(z=>{let G=M().filter(ae=>!ae.disabled),X=G.find(ae=>ae.ref.current===document.activeElement),Y=Yet(G,z,X);Y&&setTimeout(()=>Y.ref.current.focus())}),L=Dt.useCallback((z,G,X)=>{let Y=!I.current&&!X;(y.value!==void 0&&y.value===G||Y)&&(N(z),Y&&(I.current=!0))},[y.value]),H=Dt.useCallback(()=>x?.focus(),[x]),j=Dt.useCallback((z,G,X)=>{let Y=!I.current&&!X;(y.value!==void 0&&y.value===G||Y)&&A(z)},[y.value]),$=n==="popper"?ede:Eet,W=$===ede?{side:s,sideOffset:l,align:c,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g}:{};return(0,Cr.jsx)(Aet,{scope:r,content:x,viewport:b,onViewportChange:C,itemRefCallback:L,selectedItem:P,onItemLeave:H,itemTextRefCallback:j,focusSelectedItem:R,selectedItemText:T,position:n,isPositioned:O,searchRef:U,children:(0,Cr.jsx)(Wy,{as:_ar,allowPinchZoom:!0,children:(0,Cr.jsx)(qy,{asChild:!0,trapped:y.open,onMountAutoFocus:z=>{z.preventDefault()},onUnmountAutoFocus:He(o,z=>{y.trigger?.focus({preventScroll:!0}),z.preventDefault()}),children:(0,Cr.jsx)(kc,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:z=>z.preventDefault(),onDismiss:()=>y.onOpenChange(!1),children:(0,Cr.jsx)($,{role:"listbox",id:y.contentId,"data-state":y.open?"open":"closed",dir:y.dir,onContextMenu:z=>z.preventDefault(),...v,...W,onPlaced:()=>F(!0),ref:S,style:{display:"flex",flexDirection:"column",outline:"none",...v.style},onKeyDown:He(v.onKeyDown,z=>{let G=z.ctrlKey||z.altKey||z.metaKey;if(z.key==="Tab"&&z.preventDefault(),!G&&z.key.length===1&&V(z.key),["ArrowUp","ArrowDown","Home","End"].includes(z.key)){let Y=M().filter(ae=>!ae.disabled).map(ae=>ae.ref.current);if(["ArrowUp","End"].includes(z.key)&&(Y=Y.slice().reverse()),["ArrowUp","ArrowDown"].includes(z.key)){let ae=z.target,ie=Y.indexOf(ae);Y=Y.slice(ie+1)}setTimeout(()=>k(Y)),z.preventDefault()}})})})})})})});Let.displayName=Oar;var Far="SelectItemAlignedPosition",Eet=Dt.forwardRef((e,t)=>{let{__scopeSelect:r,onPlaced:n,...o}=e,a=pw(H1,r),i=mw(H1,r),[s,l]=Dt.useState(null),[c,u]=Dt.useState(null),d=Xt(t,S=>u(S)),f=f8(r),p=Dt.useRef(!1),m=Dt.useRef(!0),{viewport:h,selectedItem:g,selectedItemText:v,focusSelectedItem:y}=i,x=Dt.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&c&&h&&g&&v){let S=a.trigger.getBoundingClientRect(),P=c.getBoundingClientRect(),N=a.valueNode.getBoundingClientRect(),T=v.getBoundingClientRect();if(a.dir!=="rtl"){let ae=T.left-P.left,ie=N.left-ae,Le=S.left-ie,Se=S.width+Le,Be=Math.max(Se,P.width),me=window.innerWidth-gh,Re=Jue(ie,[gh,Math.max(gh,me-Be)]);s.style.minWidth=Se+"px",s.style.left=Re+"px"}else{let ae=P.right-T.right,ie=window.innerWidth-N.right-ae,Le=window.innerWidth-S.right-ie,Se=S.width+Le,Be=Math.max(Se,P.width),me=window.innerWidth-gh,Re=Jue(ie,[gh,Math.max(gh,me-Be)]);s.style.minWidth=Se+"px",s.style.right=Re+"px"}let A=f(),M=window.innerHeight-gh*2,O=h.scrollHeight,F=window.getComputedStyle(c),I=parseInt(F.borderTopWidth,10),k=parseInt(F.paddingTop,10),R=parseInt(F.borderBottomWidth,10),E=parseInt(F.paddingBottom,10),_=I+k+O+E+R,U=Math.min(g.offsetHeight*5,_),V=window.getComputedStyle(h),L=parseInt(V.paddingTop,10),H=parseInt(V.paddingBottom,10),j=S.top+S.height/2-gh,$=M-j,W=g.offsetHeight/2,z=g.offsetTop+W,G=I+k+z,X=_-G;if(G<=j){let ae=A.length>0&&g===A[A.length-1].ref.current;s.style.bottom="0px";let ie=c.clientHeight-h.offsetTop-h.offsetHeight,Le=Math.max($,W+(ae?H:0)+ie+R),Se=G+Le;s.style.height=Se+"px"}else{let ae=A.length>0&&g===A[0].ref.current;s.style.top="0px";let Le=Math.max(j,I+h.offsetTop+(ae?L:0)+W)+X;s.style.height=Le+"px",h.scrollTop=G-j+h.offsetTop}s.style.margin=`${gh}px 0`,s.style.minHeight=U+"px",s.style.maxHeight=M+"px",n?.(),requestAnimationFrame(()=>p.current=!0)}},[f,a.trigger,a.valueNode,s,c,h,g,v,a.dir,n]);$n(()=>x(),[x]);let[w,b]=Dt.useState();$n(()=>{c&&b(window.getComputedStyle(c).zIndex)},[c]);let C=Dt.useCallback(S=>{S&&m.current===!0&&(x(),y?.(),m.current=!1)},[x,y]);return(0,Cr.jsx)(Var,{scope:r,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:C,children:(0,Cr.jsx)("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:w},children:(0,Cr.jsx)(rt.div,{...o,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});Eet.displayName=Far;var Bar="SelectPopperPosition",ede=Dt.forwardRef((e,t)=>{let{__scopeSelect:r,align:n="start",collisionPadding:o=gh,...a}=e,i=p8(r);return(0,Cr.jsx)(dg,{...i,...a,ref:t,align:n,collisionPadding:o,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)"}})});ede.displayName=Bar;var[Var,ide]=WM(H1,{}),tde="SelectViewport",Det=Dt.forwardRef((e,t)=>{let{__scopeSelect:r,nonce:n,...o}=e,a=mw(tde,r),i=ide(tde,r),s=Xt(t,a.onViewportChange),l=Dt.useRef(0);return(0,Cr.jsxs)(Cr.Fragment,{children:[(0,Cr.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:n}),(0,Cr.jsx)(d8.Slot,{scope:r,children:(0,Cr.jsx)(rt.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:s,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:He(o.onScroll,c=>{let u=c.currentTarget,{contentWrapper:d,shouldExpandOnScrollRef:f}=i;if(f?.current&&d){let p=Math.abs(l.current-u.scrollTop);if(p>0){let m=window.innerHeight-gh*2,h=parseFloat(d.style.minHeight),g=parseFloat(d.style.height),v=Math.max(h,g);if(v<m){let y=v+p,x=Math.min(m,y),w=y-x;d.style.height=x+"px",d.style.bottom==="0px"&&(u.scrollTop=w>0?w:0,d.style.justifyContent="flex-end")}}}l.current=u.scrollTop})})})]})});Det.displayName=tde;var Oet="SelectGroup",[Uar,zar]=WM(Oet),Har=Dt.forwardRef((e,t)=>{let{__scopeSelect:r,...n}=e,o=Vo();return(0,Cr.jsx)(Uar,{scope:r,id:o,children:(0,Cr.jsx)(rt.div,{role:"group","aria-labelledby":o,...n,ref:t})})});Har.displayName=Oet;var _et="SelectLabel",Fet=Dt.forwardRef((e,t)=>{let{__scopeSelect:r,...n}=e,o=zar(_et,r);return(0,Cr.jsx)(rt.div,{id:o.id,...n,ref:t})});Fet.displayName=_et;var u8="SelectItem",[jar,Bet]=WM(u8),Vet=Dt.forwardRef((e,t)=>{let{__scopeSelect:r,value:n,disabled:o=!1,textValue:a,...i}=e,s=pw(u8,r),l=mw(u8,r),c=s.value===n,[u,d]=Dt.useState(a??""),[f,p]=Dt.useState(!1),m=Xt(t,y=>l.itemRefCallback?.(y,n,o)),h=Vo(),g=Dt.useRef("touch"),v=()=>{o||(s.onValueChange(n),s.onOpenChange(!1))};if(n==="")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,Cr.jsx)(jar,{scope:r,value:n,disabled:o,textId:h,isSelected:c,onItemTextChange:Dt.useCallback(y=>{d(x=>x||(y?.textContent??"").trim())},[]),children:(0,Cr.jsx)(d8.ItemSlot,{scope:r,value:n,disabled:o,textValue:u,children:(0,Cr.jsx)(rt.div,{role:"option","aria-labelledby":h,"data-highlighted":f?"":void 0,"aria-selected":c&&f,"data-state":c?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...i,ref:m,onFocus:He(i.onFocus,()=>p(!0)),onBlur:He(i.onBlur,()=>p(!1)),onClick:He(i.onClick,()=>{g.current!=="mouse"&&v()}),onPointerUp:He(i.onPointerUp,()=>{g.current==="mouse"&&v()}),onPointerDown:He(i.onPointerDown,y=>{g.current=y.pointerType}),onPointerMove:He(i.onPointerMove,y=>{g.current=y.pointerType,o?l.onItemLeave?.():g.current==="mouse"&&y.currentTarget.focus({preventScroll:!0})}),onPointerLeave:He(i.onPointerLeave,y=>{y.currentTarget===document.activeElement&&l.onItemLeave?.()}),onKeyDown:He(i.onKeyDown,y=>{l.searchRef?.current!==""&&y.key===" "||(Nar.includes(y.key)&&v(),y.key===" "&&y.preventDefault())})})})})});Vet.displayName=u8;var _F="SelectItemText",Uet=Dt.forwardRef((e,t)=>{let{__scopeSelect:r,className:n,style:o,...a}=e,i=pw(_F,r),s=mw(_F,r),l=Bet(_F,r),c=Lar(_F,r),[u,d]=Dt.useState(null),f=Xt(t,v=>d(v),l.onItemTextChange,v=>s.itemTextRefCallback?.(v,l.value,l.disabled)),p=u?.textContent,m=Dt.useMemo(()=>(0,Cr.jsx)("option",{value:l.value,disabled:l.disabled,children:p},l.value),[l.disabled,l.value,p]),{onNativeOptionAdd:h,onNativeOptionRemove:g}=c;return $n(()=>(h(m),()=>g(m)),[h,g,m]),(0,Cr.jsxs)(Cr.Fragment,{children:[(0,Cr.jsx)(rt.span,{id:l.textId,...a,ref:f}),l.isSelected&&i.valueNode&&!i.valueNodeHasChildren?ade.createPortal(a.children,i.valueNode):null]})});Uet.displayName=_F;var zet="SelectItemIndicator",Het=Dt.forwardRef((e,t)=>{let{__scopeSelect:r,...n}=e;return Bet(zet,r).isSelected?(0,Cr.jsx)(rt.span,{"aria-hidden":!0,...n,ref:t}):null});Het.displayName=zet;var rde="SelectScrollUpButton",jet=Dt.forwardRef((e,t)=>{let r=mw(rde,e.__scopeSelect),n=ide(rde,e.__scopeSelect),[o,a]=Dt.useState(!1),i=Xt(t,n.onScrollButtonChange);return $n(()=>{if(r.viewport&&r.isPositioned){let l=function(){let u=c.scrollTop>0;a(u)};var s=l;let c=r.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[r.viewport,r.isPositioned]),o?(0,Cr.jsx)(qet,{...e,ref:i,onAutoScroll:()=>{let{viewport:s,selectedItem:l}=r;s&&l&&(s.scrollTop=s.scrollTop-l.offsetHeight)}}):null});jet.displayName=rde;var nde="SelectScrollDownButton",$et=Dt.forwardRef((e,t)=>{let r=mw(nde,e.__scopeSelect),n=ide(nde,e.__scopeSelect),[o,a]=Dt.useState(!1),i=Xt(t,n.onScrollButtonChange);return $n(()=>{if(r.viewport&&r.isPositioned){let l=function(){let u=c.scrollHeight-c.clientHeight,d=Math.ceil(c.scrollTop)<u;a(d)};var s=l;let c=r.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[r.viewport,r.isPositioned]),o?(0,Cr.jsx)(qet,{...e,ref:i,onAutoScroll:()=>{let{viewport:s,selectedItem:l}=r;s&&l&&(s.scrollTop=s.scrollTop+l.offsetHeight)}}):null});$et.displayName=nde;var qet=Dt.forwardRef((e,t)=>{let{__scopeSelect:r,onAutoScroll:n,...o}=e,a=mw("SelectScrollButton",r),i=Dt.useRef(null),s=f8(r),l=Dt.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return Dt.useEffect(()=>()=>l(),[l]),$n(()=>{s().find(u=>u.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[s]),(0,Cr.jsx)(rt.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:He(o.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(n,50))}),onPointerMove:He(o.onPointerMove,()=>{a.onItemLeave?.(),i.current===null&&(i.current=window.setInterval(n,50))}),onPointerLeave:He(o.onPointerLeave,()=>{l()})})}),$ar="SelectSeparator",Wet=Dt.forwardRef((e,t)=>{let{__scopeSelect:r,...n}=e;return(0,Cr.jsx)(rt.div,{"aria-hidden":!0,...n,ref:t})});Wet.displayName=$ar;var ode="SelectArrow",qar=Dt.forwardRef((e,t)=>{let{__scopeSelect:r,...n}=e,o=p8(r),a=pw(ode,r),i=mw(ode,r);return a.open&&i.position==="popper"?(0,Cr.jsx)(fg,{...o,...n,ref:t}):null});qar.displayName=ode;var War="SelectBubbleInput",Get=Dt.forwardRef(({__scopeSelect:e,value:t,...r},n)=>{let o=Dt.useRef(null),a=Xt(n,o),i=Wb(t);return Dt.useEffect(()=>{let s=o.current;if(!s)return;let l=window.HTMLSelectElement.prototype,u=Object.getOwnPropertyDescriptor(l,"value").set;if(i!==t&&u){let d=new Event("change",{bubbles:!0});u.call(s,t),s.dispatchEvent(d)}},[i,t]),(0,Cr.jsx)(rt.select,{...r,style:{...AZ,...r.style},ref:a,defaultValue:t})});Get.displayName=War;function Ket(e){return e===""||e===void 0}function Xet(e){let t=to(e),r=Dt.useRef(""),n=Dt.useRef(0),o=Dt.useCallback(i=>{let s=r.current+i;t(s),function l(c){r.current=c,window.clearTimeout(n.current),c!==""&&(n.current=window.setTimeout(()=>l(""),1e3))}(s)},[t]),a=Dt.useCallback(()=>{r.current="",window.clearTimeout(n.current)},[]);return Dt.useEffect(()=>()=>window.clearTimeout(n.current),[]),[r,o,a]}function Yet(e,t,r){let o=t.length>1&&Array.from(t).every(c=>c===t[0])?t[0]:t,a=r?e.indexOf(r):-1,i=Gar(e,Math.max(a,0));o.length===1&&(i=i.filter(c=>c!==r));let l=i.find(c=>c.textValue.toLowerCase().startsWith(o.toLowerCase()));return l!==r?l:void 0}function Gar(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var Qet=Cet,sde=Iet,Zet=Ret,Jet=Net,ett=Met,lde=Tet,ttt=Det;var cde=Fet,ude=Vet,rtt=Uet,ntt=Het,dde=jet,fde=$et,pde=Wet;var att=D(lt(),1);var itt=D(Or(),1),Xar="Separator",ott="horizontal",Yar=["horizontal","vertical"],stt=att.forwardRef((e,t)=>{let{decorative:r,orientation:n=ott,...o}=e,a=Qar(n)?n:ott,s=r?{role:"none"}:{"aria-orientation":a==="vertical"?a:void 0,role:"separator"};return(0,itt.jsx)(rt.div,{"data-orientation":a,...s,...o,ref:t})});stt.displayName=Xar;function Qar(e){return Yar.includes(e)}var mde=stt;var on=D(lt(),1);var Hs=D(Or(),1),[m8,l7n]=hn("Tooltip",[gu]),h8=gu(),ltt="TooltipProvider",Jar=700,hde="tooltip.open",[eir,vde]=m8(ltt),ctt=e=>{let{__scopeTooltip:t,delayDuration:r=Jar,skipDelayDuration:n=300,disableHoverableContent:o=!1,children:a}=e,i=on.useRef(!0),s=on.useRef(!1),l=on.useRef(0);return on.useEffect(()=>{let c=l.current;return()=>window.clearTimeout(c)},[]),(0,Hs.jsx)(eir,{scope:t,isOpenDelayedRef:i,delayDuration:r,onOpen:on.useCallback(()=>{window.clearTimeout(l.current),i.current=!1},[]),onClose:on.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>i.current=!0,n)},[n]),isPointerInTransitRef:s,onPointerInTransitChange:on.useCallback(c=>{s.current=c},[]),disableHoverableContent:o,children:a})};ctt.displayName=ltt;var FF="Tooltip",[tir,BF]=m8(FF),utt=e=>{let{__scopeTooltip:t,children:r,open:n,defaultOpen:o,onOpenChange:a,disableHoverableContent:i,delayDuration:s}=e,l=vde(FF,e.__scopeTooltip),c=h8(t),[u,d]=on.useState(null),f=Vo(),p=on.useRef(0),m=i??l.disableHoverableContent,h=s??l.delayDuration,g=on.useRef(!1),[v,y]=eo({prop:n,defaultProp:o??!1,onChange:S=>{S?(l.onOpen(),document.dispatchEvent(new CustomEvent(hde))):l.onClose(),a?.(S)},caller:FF}),x=on.useMemo(()=>v?g.current?"delayed-open":"instant-open":"closed",[v]),w=on.useCallback(()=>{window.clearTimeout(p.current),p.current=0,g.current=!1,y(!0)},[y]),b=on.useCallback(()=>{window.clearTimeout(p.current),p.current=0,y(!1)},[y]),C=on.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{g.current=!0,y(!0),p.current=0},h)},[h,y]);return on.useEffect(()=>()=>{p.current&&(window.clearTimeout(p.current),p.current=0)},[]),(0,Hs.jsx)(_m,{...c,children:(0,Hs.jsx)(tir,{scope:t,contentId:f,open:v,stateAttribute:x,trigger:u,onTriggerChange:d,onTriggerEnter:on.useCallback(()=>{l.isOpenDelayedRef.current?C():w()},[l.isOpenDelayedRef,C,w]),onTriggerLeave:on.useCallback(()=>{m?b():(window.clearTimeout(p.current),p.current=0)},[b,m]),onOpen:w,onClose:b,disableHoverableContent:m,children:r})})};utt.displayName=FF;var gde="TooltipTrigger",dtt=on.forwardRef((e,t)=>{let{__scopeTooltip:r,...n}=e,o=BF(gde,r),a=vde(gde,r),i=h8(r),s=on.useRef(null),l=Xt(t,s,o.onTriggerChange),c=on.useRef(!1),u=on.useRef(!1),d=on.useCallback(()=>c.current=!1,[]);return on.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),(0,Hs.jsx)(Fm,{asChild:!0,...i,children:(0,Hs.jsx)(rt.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...n,ref:l,onPointerMove:He(e.onPointerMove,f=>{f.pointerType!=="touch"&&!u.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),u.current=!0)}),onPointerLeave:He(e.onPointerLeave,()=>{o.onTriggerLeave(),u.current=!1}),onPointerDown:He(e.onPointerDown,()=>{o.open&&o.onClose(),c.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:He(e.onFocus,()=>{c.current||o.onOpen()}),onBlur:He(e.onBlur,o.onClose),onClick:He(e.onClick,o.onClose)})})});dtt.displayName=gde;var yde="TooltipPortal",[rir,nir]=m8(yde,{forceMount:void 0}),oir=e=>{let{__scopeTooltip:t,forceMount:r,children:n,container:o}=e,a=BF(yde,t);return(0,Hs.jsx)(rir,{scope:t,forceMount:r,children:(0,Hs.jsx)(uo,{present:r||a.open,children:(0,Hs.jsx)(vu,{asChild:!0,container:o,children:n})})})};oir.displayName=yde;var GM="TooltipContent",ftt=on.forwardRef((e,t)=>{let r=nir(GM,e.__scopeTooltip),{forceMount:n=r.forceMount,side:o="top",...a}=e,i=BF(GM,e.__scopeTooltip);return(0,Hs.jsx)(uo,{present:n||i.open,children:i.disableHoverableContent?(0,Hs.jsx)(ptt,{side:o,...a,ref:t}):(0,Hs.jsx)(air,{side:o,...a,ref:t})})}),air=on.forwardRef((e,t)=>{let r=BF(GM,e.__scopeTooltip),n=vde(GM,e.__scopeTooltip),o=on.useRef(null),a=Xt(t,o),[i,s]=on.useState(null),{trigger:l,onClose:c}=r,u=o.current,{onPointerInTransitChange:d}=n,f=on.useCallback(()=>{s(null),d(!1)},[d]),p=on.useCallback((m,h)=>{let g=m.currentTarget,v={x:m.clientX,y:m.clientY},y=cir(v,g.getBoundingClientRect()),x=uir(v,y),w=dir(h.getBoundingClientRect()),b=pir([...x,...w]);s(b),d(!0)},[d]);return on.useEffect(()=>()=>f(),[f]),on.useEffect(()=>{if(l&&u){let m=g=>p(g,u),h=g=>p(g,l);return l.addEventListener("pointerleave",m),u.addEventListener("pointerleave",h),()=>{l.removeEventListener("pointerleave",m),u.removeEventListener("pointerleave",h)}}},[l,u,p,f]),on.useEffect(()=>{if(i){let m=h=>{let g=h.target,v={x:h.clientX,y:h.clientY},y=l?.contains(g)||u?.contains(g),x=!fir(v,i);y?f():x&&(f(),c())};return document.addEventListener("pointermove",m),()=>document.removeEventListener("pointermove",m)}},[l,u,i,c,f]),(0,Hs.jsx)(ptt,{...e,ref:a})}),[iir,sir]=m8(FF,{isInside:!1}),lir=tU("TooltipContent"),ptt=on.forwardRef((e,t)=>{let{__scopeTooltip:r,children:n,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:i,...s}=e,l=BF(GM,r),c=h8(r),{onClose:u}=l;return on.useEffect(()=>(document.addEventListener(hde,u),()=>document.removeEventListener(hde,u)),[u]),on.useEffect(()=>{if(l.trigger){let d=f=>{f.target?.contains(l.trigger)&&u()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[l.trigger,u]),(0,Hs.jsx)(kc,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:d=>d.preventDefault(),onDismiss:u,children:(0,Hs.jsxs)(dg,{"data-state":l.stateAttribute,...c,...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,Hs.jsx)(lir,{children:n}),(0,Hs.jsx)(iir,{scope:r,isInside:!0,children:(0,Hs.jsx)(az,{id:l.contentId,role:"tooltip",children:o||n})})]})})});ftt.displayName=GM;var mtt="TooltipArrow",htt=on.forwardRef((e,t)=>{let{__scopeTooltip:r,...n}=e,o=h8(r);return sir(mtt,r).isInside?null:(0,Hs.jsx)(fg,{...o,...n,ref:t})});htt.displayName=mtt;function cir(e,t){let r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(r,n,o,a)){case a:return"left";case o:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function uir(e,t,r=5){let n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return n}function dir(e){let{top:t,right:r,bottom:n,left:o}=e;return[{x:o,y:t},{x:r,y:t},{x:r,y:n},{x:o,y:n}]}function fir(e,t){let{x:r,y:n}=e,o=!1;for(let a=0,i=t.length-1;a<t.length;i=a++){let s=t[a],l=t[i],c=s.x,u=s.y,d=l.x,f=l.y;u>n!=f>n&&r<(d-c)*(n-u)/(f-u)+c&&(o=!o)}return o}function pir(e){let t=e.slice();return t.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),mir(t)}function mir(e){if(e.length<=1)return e.slice();let t=[];for(let n=0;n<e.length;n++){let o=e[n];for(;t.length>=2;){let a=t[t.length-1],i=t[t.length-2];if((a.x-i.x)*(o.y-i.y)>=(a.y-i.y)*(o.x-i.x))t.pop();else break}t.push(o)}t.pop();let r=[];for(let n=e.length-1;n>=0;n--){let o=e[n];for(;r.length>=2;){let a=r[r.length-1],i=r[r.length-2];if((a.x-i.x)*(o.y-i.y)>=(a.y-i.y)*(o.x-i.x))r.pop();else break}r.push(o)}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 gtt=ctt,vtt=utt,ytt=dtt;var xde=ftt,bde=htt;var vh=D(lt(),1);var j1=D(Or(),1),g8="Switch",[gir,g7n]=hn(g8),[vir,yir]=gir(g8),xtt=vh.forwardRef((e,t)=>{let{__scopeSwitch:r,name:n,checked:o,defaultChecked:a,required:i,disabled:s,value:l="on",onCheckedChange:c,form:u,...d}=e,[f,p]=vh.useState(null),m=Xt(t,x=>p(x)),h=vh.useRef(!1),g=f?u||!!f.closest("form"):!0,[v,y]=eo({prop:o,defaultProp:a??!1,onChange:c,caller:g8});return(0,j1.jsxs)(vir,{scope:r,checked:v,disabled:s,children:[(0,j1.jsx)(rt.button,{type:"button",role:"switch","aria-checked":v,"aria-required":i,"data-state":Stt(v),"data-disabled":s?"":void 0,disabled:s,value:l,...d,ref:m,onClick:He(e.onClick,x=>{y(w=>!w),g&&(h.current=x.isPropagationStopped(),h.current||x.stopPropagation())})}),g&&(0,j1.jsx)(Ctt,{control:f,bubbles:!h.current,name:n,value:l,checked:v,required:i,disabled:s,form:u,style:{transform:"translateX(-100%)"}})]})});xtt.displayName=g8;var btt="SwitchThumb",wtt=vh.forwardRef((e,t)=>{let{__scopeSwitch:r,...n}=e,o=yir(btt,r);return(0,j1.jsx)(rt.span,{"data-state":Stt(o.checked),"data-disabled":o.disabled?"":void 0,...n,ref:t})});wtt.displayName=btt;var xir="SwitchBubbleInput",Ctt=vh.forwardRef(({__scopeSwitch:e,control:t,checked:r,bubbles:n=!0,...o},a)=>{let i=vh.useRef(null),s=Xt(i,a),l=Wb(r),c=uk(t);return vh.useEffect(()=>{let u=i.current;if(!u)return;let d=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(d,"checked").set;if(l!==r&&p){let m=new Event("click",{bubbles:n});p.call(u,r),u.dispatchEvent(m)}},[l,r,n]),(0,j1.jsx)("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...o,tabIndex:-1,ref:s,style:{...o.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Ctt.displayName=xir;function Stt(e){return e?"checked":"unchecked"}var wde=xtt,Ptt=wtt;var Qr=D(lt(),1),ktt=D(ng(),1);var Ro=D(Or(),1),kde="ToastProvider",[Rde,wir,Cir]=cf("Toast"),[Rtt,N7n]=hn("Toast",[Cir]),[Sir,y8]=Rtt(kde),Pir=e=>{let{__scopeToast:t,label:r="Notification",duration:n=5e3,swipeDirection:o="right",swipeThreshold:a=50,children:i}=e,[s,l]=Qr.useState(null),[c,u]=Qr.useState(0),d=Qr.useRef(!1),f=Qr.useRef(!1);return r.trim()||console.error(`Invalid prop \`label\` supplied to \`${kde}\`. Expected non-empty \`string\`.`),(0,Ro.jsx)(Rde.Provider,{scope:t,children:(0,Ro.jsx)(Sir,{scope:t,label:r,duration:n,swipeDirection:o,swipeThreshold:a,toastCount:c,viewport:s,onViewportChange:l,onToastAdd:Qr.useCallback(()=>u(p=>p+1),[]),onToastRemove:Qr.useCallback(()=>u(p=>p-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:f,children:i})})};Pir.displayName=kde;var Ntt="ToastViewport",Iir=["F8"],Sde="toast.viewportPause",Pde="toast.viewportResume",Mtt=Qr.forwardRef((e,t)=>{let{__scopeToast:r,hotkey:n=Iir,label:o="Notifications ({hotkey})",...a}=e,i=y8(Ntt,r),s=wir(r),l=Qr.useRef(null),c=Qr.useRef(null),u=Qr.useRef(null),d=Qr.useRef(null),f=Xt(t,d,i.onViewportChange),p=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),m=i.toastCount>0;Qr.useEffect(()=>{let g=v=>{n.length!==0&&n.every(x=>v[x]||v.code===x)&&d.current?.focus()};return document.addEventListener("keydown",g),()=>document.removeEventListener("keydown",g)},[n]),Qr.useEffect(()=>{let g=l.current,v=d.current;if(m&&g&&v){let y=()=>{if(!i.isClosePausedRef.current){let C=new CustomEvent(Sde);v.dispatchEvent(C),i.isClosePausedRef.current=!0}},x=()=>{if(i.isClosePausedRef.current){let C=new CustomEvent(Pde);v.dispatchEvent(C),i.isClosePausedRef.current=!1}},w=C=>{!g.contains(C.relatedTarget)&&x()},b=()=>{g.contains(document.activeElement)||x()};return g.addEventListener("focusin",y),g.addEventListener("focusout",w),g.addEventListener("pointermove",y),g.addEventListener("pointerleave",b),window.addEventListener("blur",y),window.addEventListener("focus",x),()=>{g.removeEventListener("focusin",y),g.removeEventListener("focusout",w),g.removeEventListener("pointermove",y),g.removeEventListener("pointerleave",b),window.removeEventListener("blur",y),window.removeEventListener("focus",x)}}},[m,i.isClosePausedRef]);let h=Qr.useCallback(({tabbingDirection:g})=>{let y=s().map(x=>{let w=x.ref.current,b=[w,...Bir(w)];return g==="forwards"?b:b.reverse()});return(g==="forwards"?y.reverse():y).flat()},[s]);return Qr.useEffect(()=>{let g=d.current;if(g){let v=y=>{let x=y.altKey||y.ctrlKey||y.metaKey;if(y.key==="Tab"&&!x){let b=document.activeElement,C=y.shiftKey;if(y.target===g&&C){c.current?.focus();return}let N=h({tabbingDirection:C?"backwards":"forwards"}),T=N.findIndex(A=>A===b);Cde(N.slice(T+1))?y.preventDefault():C?c.current?.focus():u.current?.focus()}};return g.addEventListener("keydown",v),()=>g.removeEventListener("keydown",v)}},[s,h]),(0,Ro.jsxs)(CNe,{ref:l,role:"region","aria-label":o.replace("{hotkey}",p),tabIndex:-1,style:{pointerEvents:m?void 0:"none"},children:[m&&(0,Ro.jsx)(Ide,{ref:c,onFocusFromOutsideViewport:()=>{let g=h({tabbingDirection:"forwards"});Cde(g)}}),(0,Ro.jsx)(Rde.Slot,{scope:r,children:(0,Ro.jsx)(rt.ol,{tabIndex:-1,...a,ref:f})}),m&&(0,Ro.jsx)(Ide,{ref:u,onFocusFromOutsideViewport:()=>{let g=h({tabbingDirection:"backwards"});Cde(g)}})]})});Mtt.displayName=Ntt;var Ttt="ToastFocusProxy",Ide=Qr.forwardRef((e,t)=>{let{__scopeToast:r,onFocusFromOutsideViewport:n,...o}=e,a=y8(Ttt,r);return(0,Ro.jsx)(OE,{tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:i=>{let s=i.relatedTarget;!a.viewport?.contains(s)&&n()}})});Ide.displayName=Ttt;var VF="Toast",kir="toast.swipeStart",Rir="toast.swipeMove",Nir="toast.swipeCancel",Mir="toast.swipeEnd",Att=Qr.forwardRef((e,t)=>{let{forceMount:r,open:n,defaultOpen:o,onOpenChange:a,...i}=e,[s,l]=eo({prop:n,defaultProp:o??!0,onChange:a,caller:VF});return(0,Ro.jsx)(uo,{present:r||s,children:(0,Ro.jsx)(Lir,{open:s,...i,ref:t,onClose:()=>l(!1),onPause:to(e.onPause),onResume:to(e.onResume),onSwipeStart:He(e.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:He(e.onSwipeMove,c=>{let{x:u,y:d}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","move"),c.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${d}px`)}),onSwipeCancel:He(e.onSwipeCancel,c=>{c.currentTarget.setAttribute("data-swipe","cancel"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:He(e.onSwipeEnd,c=>{let{x:u,y:d}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","end"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${d}px`),l(!1)})})})});Att.displayName=VF;var[Tir,Air]=Rtt(VF,{onClose(){}}),Lir=Qr.forwardRef((e,t)=>{let{__scopeToast:r,type:n="foreground",duration:o,open:a,onClose:i,onEscapeKeyDown:s,onPause:l,onResume:c,onSwipeStart:u,onSwipeMove:d,onSwipeCancel:f,onSwipeEnd:p,...m}=e,h=y8(VF,r),[g,v]=Qr.useState(null),y=Xt(t,F=>v(F)),x=Qr.useRef(null),w=Qr.useRef(null),b=o||h.duration,C=Qr.useRef(0),S=Qr.useRef(b),P=Qr.useRef(0),{onToastAdd:N,onToastRemove:T}=h,A=to(()=>{g?.contains(document.activeElement)&&h.viewport?.focus(),i()}),M=Qr.useCallback(F=>{!F||F===1/0||(window.clearTimeout(P.current),C.current=new Date().getTime(),P.current=window.setTimeout(A,F))},[A]);Qr.useEffect(()=>{let F=h.viewport;if(F){let I=()=>{M(S.current),c?.()},k=()=>{let R=new Date().getTime()-C.current;S.current=S.current-R,window.clearTimeout(P.current),l?.()};return F.addEventListener(Sde,k),F.addEventListener(Pde,I),()=>{F.removeEventListener(Sde,k),F.removeEventListener(Pde,I)}}},[h.viewport,b,l,c,M]),Qr.useEffect(()=>{a&&!h.isClosePausedRef.current&&M(b)},[a,b,h.isClosePausedRef,M]),Qr.useEffect(()=>(N(),()=>T()),[N,T]);let O=Qr.useMemo(()=>g?Btt(g):null,[g]);return h.viewport?(0,Ro.jsxs)(Ro.Fragment,{children:[O&&(0,Ro.jsx)(Eir,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite",children:O}),(0,Ro.jsx)(Tir,{scope:r,onClose:A,children:ktt.createPortal((0,Ro.jsx)(Rde.ItemSlot,{scope:r,children:(0,Ro.jsx)(wNe,{asChild:!0,onEscapeKeyDown:He(s,()=>{h.isFocusedToastEscapeKeyDownRef.current||A(),h.isFocusedToastEscapeKeyDownRef.current=!1}),children:(0,Ro.jsx)(rt.li,{tabIndex:0,"data-state":a?"open":"closed","data-swipe-direction":h.swipeDirection,...m,ref:y,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:He(e.onKeyDown,F=>{F.key==="Escape"&&(s?.(F.nativeEvent),F.nativeEvent.defaultPrevented||(h.isFocusedToastEscapeKeyDownRef.current=!0,A()))}),onPointerDown:He(e.onPointerDown,F=>{F.button===0&&(x.current={x:F.clientX,y:F.clientY})}),onPointerMove:He(e.onPointerMove,F=>{if(!x.current)return;let I=F.clientX-x.current.x,k=F.clientY-x.current.y,R=!!w.current,E=["left","right"].includes(h.swipeDirection),_=["left","up"].includes(h.swipeDirection)?Math.min:Math.max,U=E?_(0,I):0,V=E?0:_(0,k),L=F.pointerType==="touch"?10:2,H={x:U,y:V},j={originalEvent:F,delta:H};R?(w.current=H,v8(Rir,d,j,{discrete:!1})):Itt(H,h.swipeDirection,L)?(w.current=H,v8(kir,u,j,{discrete:!1}),F.target.setPointerCapture(F.pointerId)):(Math.abs(I)>L||Math.abs(k)>L)&&(x.current=null)}),onPointerUp:He(e.onPointerUp,F=>{let I=w.current,k=F.target;if(k.hasPointerCapture(F.pointerId)&&k.releasePointerCapture(F.pointerId),w.current=null,x.current=null,I){let R=F.currentTarget,E={originalEvent:F,delta:I};Itt(I,h.swipeDirection,h.swipeThreshold)?v8(Mir,p,E,{discrete:!0}):v8(Nir,f,E,{discrete:!0}),R.addEventListener("click",_=>_.preventDefault(),{once:!0})}})})})}),h.viewport)})]}):null}),Eir=e=>{let{__scopeToast:t,children:r,...n}=e,o=y8(VF,t),[a,i]=Qr.useState(!1),[s,l]=Qr.useState(!1);return _ir(()=>i(!0)),Qr.useEffect(()=>{let c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),s?null:(0,Ro.jsx)(vu,{asChild:!0,children:(0,Ro.jsx)(OE,{...n,children:a&&(0,Ro.jsxs)(Ro.Fragment,{children:[o.label," ",r]})})})},Dir="ToastTitle",Ltt=Qr.forwardRef((e,t)=>{let{__scopeToast:r,...n}=e;return(0,Ro.jsx)(rt.div,{...n,ref:t})});Ltt.displayName=Dir;var Oir="ToastDescription",Ett=Qr.forwardRef((e,t)=>{let{__scopeToast:r,...n}=e;return(0,Ro.jsx)(rt.div,{...n,ref:t})});Ett.displayName=Oir;var Dtt="ToastAction",Ott=Qr.forwardRef((e,t)=>{let{altText:r,...n}=e;return r.trim()?(0,Ro.jsx)(Ftt,{altText:r,asChild:!0,children:(0,Ro.jsx)(Nde,{...n,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Dtt}\`. Expected non-empty \`string\`.`),null)});Ott.displayName=Dtt;var _tt="ToastClose",Nde=Qr.forwardRef((e,t)=>{let{__scopeToast:r,...n}=e,o=Air(_tt,r);return(0,Ro.jsx)(Ftt,{asChild:!0,children:(0,Ro.jsx)(rt.button,{type:"button",...n,ref:t,onClick:He(e.onClick,o.onClose)})})});Nde.displayName=_tt;var Ftt=Qr.forwardRef((e,t)=>{let{__scopeToast:r,altText:n,...o}=e;return(0,Ro.jsx)(rt.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0,...o,ref:t})});function Btt(e){let t=[];return Array.from(e.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&t.push(n.textContent),Fir(n)){let o=n.ariaHidden||n.hidden||n.style.display==="none",a=n.dataset.radixToastAnnounceExclude==="";if(!o)if(a){let i=n.dataset.radixToastAnnounceAlt;i&&t.push(i)}else t.push(...Btt(n))}}),t}function v8(e,t,r,{discrete:n}){let o=r.originalEvent.currentTarget,a=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?ey(o,a):o.dispatchEvent(a)}var Itt=(e,t,r=0)=>{let n=Math.abs(e.x),o=Math.abs(e.y),a=n>o;return t==="left"||t==="right"?a&&n>r:!a&&o>r};function _ir(e=()=>{}){let t=to(e);$n(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[t])}function Fir(e){return e.nodeType===e.ELEMENT_NODE}function Bir(e){let t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{let o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Cde(e){let t=document.activeElement;return e.some(r=>r===t?!0:(r.focus(),document.activeElement!==t))}var Mde=Mtt,Tde=Att,Ade=Ltt,Lde=Ett,Ede=Ott,Dde=Nde;function Ae(...e){return R7e(MW(e))}var Uir=ee.forwardRef(({className:e,...t},r)=>(0,q.jsx)(p7e,{ref:r,className:Ae("moonui-theme","border-b border-gray-200 dark:border-gray-800",e),...t}));Uir.displayName="AccordionItem";var zir=ee.forwardRef(({className:e,children:t,...r},n)=>(0,q.jsx)(m7e,{className:"flex",children:(0,q.jsxs)(Zle,{ref:n,className:Ae("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,q.jsx)(j0,{className:"h-4 w-4 shrink-0 transition-transform duration-200 opacity-70 group-hover:opacity-100"})]})}));zir.displayName=Zle.displayName;var Hir=ee.forwardRef(({className:e,children:t,...r},n)=>(0,q.jsx)(Jle,{ref:n,className:Ae("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,q.jsx)("div",{className:"pb-4 pt-0",children:t})}));Hir.displayName=Jle.displayName;var jir=Hn("relative w-full flex items-center gap-3 p-4 border text-foreground [&>svg]:shrink-0",{variants:{variant:{default:"bg-background text-foreground border-border",primary:"bg-primary/10 text-primary border-primary/30",success:"bg-success/10 text-success border-success/30",warning:"bg-warning/10 text-warning border-warning/30",error:"bg-destructive/10 text-destructive border-destructive/30",info:"bg-blue-500/10 text-blue-500 border-blue-500/30"},size:{sm:"py-2 text-xs",default:"py-3 text-sm",lg:"py-4 text-base"},radius:{none:"rounded-none",sm:"rounded-sm",default:"rounded-md",lg:"rounded-lg",full:"rounded-full"},withClose:{true:"pr-10"}},defaultVariants:{variant:"default",size:"default",radius:"default",withClose:!1}}),$ir=ee.forwardRef(({className:e,variant:t="default",size:r,radius:n,hideIcon:o=!1,closable:a=!1,onClose:i,children:s,...l},c)=>{let u=ee.useMemo(()=>{switch(t){case"success":return Ky;case"warning":return W0;case"error":return Jg;case"info":return oM;default:return oM}},[t]);return(0,q.jsxs)("div",{ref:c,role:"alert",className:Ae("moonui-theme",jir({variant:t,size:r,radius:n,withClose:a}),e),...l,children:[!o&&(0,q.jsx)(u,{className:"h-5 w-5"}),(0,q.jsx)("div",{className:"flex-1",children:s}),a&&i&&(0,q.jsx)("button",{onClick:i,className:"absolute right-3 top-3 inline-flex h-6 w-6 items-center justify-center rounded-full opacity-70 transition-opacity hover:opacity-100","aria-label":"Kapat",children:(0,q.jsx)(Yy,{className:"h-4 w-4"})})]})});$ir.displayName="Alert";var qir=ee.forwardRef(({className:e,...t},r)=>(0,q.jsx)("h5",{ref:r,className:Ae("moonui-theme","font-semibold leading-tight tracking-tight mb-1",e),...t}));qir.displayName="AlertTitle";var Wir=ee.forwardRef(({className:e,...t},r)=>(0,q.jsx)("div",{ref:r,className:Ae("moonui-theme","text-sm leading-5 text-muted-foreground",e),...t}));Wir.displayName="AlertDescription";var Gir=Hn("relative overflow-hidden",{variants:{variant:{default:"rounded-md bg-muted/10",ghost:"bg-transparent",outline:"rounded-md border border-border",card:"rounded-md bg-card shadow-sm"},radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"}},defaultVariants:{variant:"default"}}),Kir=ee.forwardRef(({className:e,variant:t,radius:r,ratio:n=16/9,style:o,children:a,...i},s)=>(0,q.jsx)("div",{ref:s,className:Ae("moonui-theme",Gir({variant:t,radius:r}),e),style:{position:"relative",paddingBottom:`${1/n*100}%`,...o},...i,children:(0,q.jsx)("div",{className:"absolute inset-0",children:a})}));Kir.displayName="AspectRatio";var Xir=Hn("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"}}),Xtt=ee.forwardRef(({className:e,size:t,radius:r,variant:n,...o},a)=>(0,q.jsx)(ace,{ref:a,className:Ae("moonui-theme",Xir({size:t,radius:r,variant:n}),e),...o}));Xtt.displayName=ace.displayName;var Yir=ee.forwardRef(({className:e,...t},r)=>(0,q.jsx)(ice,{ref:r,className:Ae("moonui-theme","aspect-square h-full w-full",e),...t}));Yir.displayName=ice.displayName;var Ytt=ee.forwardRef(({className:e,...t},r)=>(0,q.jsx)(sce,{ref:r,className:Ae("flex h-full w-full items-center justify-center bg-muted",e),...t}));Ytt.displayName=sce.displayName;var Qir=ee.forwardRef(({className:e,limit:t,avatars:r,overlapOffset:n=-8,...o},a)=>{let i=t?r.slice(0,t):r,s=t?Math.max(0,r.length-t):0;return(0,q.jsx)("div",{ref:a,className:Ae("moonui-theme","flex items-center",e),...o,children:(0,q.jsxs)("div",{className:"flex",children:[i.map((l,c)=>(0,q.jsx)("div",{className:"relative",style:{marginLeft:c===0?0:`${n}px`,zIndex:i.length-c},children:l},c)),s>0&&(0,q.jsx)("div",{className:"relative z-0",style:{marginLeft:`${n}px`},children:(0,q.jsx)(Xtt,{variant:"border",children:(0,q.jsxs)(Ytt,{children:["+",s]})})})]})})});Qir.displayName="AvatarGroup";var Zir=Hn(["inline-flex items-center justify-center gap-1.5","font-medium transition-colors duration-200","border focus:outline-none","focus-visible:ring-2 focus-visible:ring-offset-1","mr-2 mb-2 last:mr-0"],{variants:{variant:{primary:["border-transparent bg-gray-900 text-white","hover:bg-gray-800 dark:hover:bg-gray-700","focus-visible:ring-gray-500/30 dark:focus-visible:ring-gray-400/40","dark:bg-gray-700 dark:text-gray-50 dark:shadow-inner dark:shadow-gray-950/10"],secondary:["border-transparent bg-secondary text-secondary-foreground","hover:bg-gray-200 dark:hover:bg-gray-600","focus-visible:ring-gray-400/30 dark:focus-visible:ring-gray-500/40","dark:bg-gray-700/50 dark:text-gray-50 dark:shadow-inner dark:shadow-gray-950/10"],outline:["border-gray-200 dark:border-gray-600","bg-transparent text-foreground","hover:border-gray-300 dark:hover:border-gray-500","focus-visible:ring-gray-400/30 dark:focus-visible:ring-gray-500/40","dark:text-gray-100 dark:bg-transparent dark:backdrop-blur-sm"],destructive:["border-transparent bg-error text-white","hover:bg-error/90 dark:hover:bg-error/80","focus-visible:ring-error/30 dark:focus-visible:ring-error/25","dark:bg-error/90 dark:text-white dark:shadow-inner dark:shadow-error/10"],success:["border-transparent bg-success text-white","hover:bg-success/90 dark:hover:bg-success/80","focus-visible:ring-success/30 dark:focus-visible:ring-success/25","dark:bg-success/90 dark:text-white dark:shadow-inner dark:shadow-success/10"],warning:["border-transparent bg-warning text-white","hover:bg-warning/90 dark:hover:bg-warning/80","focus-visible:ring-warning/30 dark:focus-visible:ring-warning/25","dark:bg-warning/90 dark:text-gray-900 dark:shadow-inner dark:shadow-warning/10"],ghost:["border border-gray-200 bg-gray-50/50 text-gray-700","hover:bg-gray-100 dark:hover:bg-gray-800/60","focus-visible:ring-gray-400/30 dark:focus-visible:ring-gray-500/40","dark:border-gray-700 dark:bg-gray-800/30 dark:text-gray-300","transition-all duration-200"],pro:["border-transparent bg-gradient-to-r from-purple-600 to-pink-600 text-white","hover:from-purple-700 hover:to-pink-700","focus-visible:ring-purple-400/30 dark:focus-visible:ring-purple-500/40","shadow-md dark:shadow-lg dark:shadow-purple-500/10"],admin:["border-transparent bg-gradient-to-r from-purple-600 to-pink-600 text-white","hover:from-purple-700 hover:to-pink-700","focus-visible:ring-purple-400/30 dark:focus-visible:ring-purple-500/40","shadow-md dark:shadow-lg dark:shadow-purple-500/10"]},size:{sm:"h-5 px-2 text-xs",md:"h-6 px-3 text-sm",lg:"h-8 px-4 text-base"},radius:{default:"rounded-full",sm:"rounded-md",lg:"rounded-xl",none:"rounded-none"}},defaultVariants:{variant:"primary",size:"md",radius:"default"}});function C8({className:e,variant:t,size:r,radius:n,withDot:o,dotColor:a,removable:i,onRemove:s,leftIcon:l,rightIcon:c,noAutoSpacing:u,children:d,...f}){let p=l,m=d;return t==="pro"&&(p=l||(0,q.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,q.jsx)("path",{d:"M12 0L13.09 8.26L22 9L13.09 9.74L12 18L10.91 9.74L2 9L10.91 8.26L12 0Z",fill:"currentColor"}),(0,q.jsx)("path",{d:"M19 5L19.5 7L21 7.5L19.5 8L19 10L18.5 8L17 7.5L18.5 7L19 5Z",fill:"currentColor"}),(0,q.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"&&(p=l||(0,q.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,q.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,q.jsxs)("div",{className:Ae("moonui-theme",Zir({variant:t,size:r,radius:n}),u&&"mr-0 mb-0",e),"data-removable":i?"":void 0,...f,children:[o&&(0,q.jsx)("span",{className:Ae("h-2 w-2 rounded-full",a||(t==="destructive"||t==="success"||t==="warning"?"bg-white":t==="secondary"?"bg-secondary-foreground":t==="outline"||t==="ghost"?"bg-foreground":t==="pro"||t==="admin"?"bg-white":"bg-primary-foreground")),"aria-hidden":"true"}),p&&(0,q.jsx)("span",{className:"inline-flex shrink-0 items-center",children:p}),(0,q.jsx)("span",{className:"inline-flex items-center",children:m}),c&&(0,q.jsx)("span",{className:"inline-flex shrink-0 items-center",children:c}),i&&s&&(0,q.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(),s()},"aria-label":"Remove badge",children:(0,q.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,q.jsx)("path",{d:"M0.799988 7.19999L7.19999 0.799988M0.799988 0.799988L7.19999 7.19999",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})})]})}var Jir=Hn("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"}}),esr=ee.forwardRef(({className:e,variant:t,size:r,...n},o)=>(0,q.jsx)("nav",{ref:o,className:Ae("moonui-theme",Jir({variant:t,size:r}),e),"aria-label":"breadcrumb",...n}));esr.displayName="Breadcrumb";var tsr=ee.forwardRef(({className:e,collapsed:t,collapsedWidth:r=3,...n},o)=>{let a=ee.Children.toArray(n.children).filter(Boolean),i=a.length;if(t&&i>r){let s=a[0],l=a.slice(-2);return(0,q.jsxs)("ol",{ref:o,className:Ae("flex flex-wrap items-center gap-1.5 sm:gap-2.5",e),...n,children:[s,(0,q.jsx)(Qtt,{}),l]})}return(0,q.jsx)("ol",{ref:o,className:Ae("flex flex-wrap items-center gap-1.5 sm:gap-2.5",e),...n})});tsr.displayName="BreadcrumbList";var rsr=ee.forwardRef(({className:e,isCurrent:t,href:r,asChild:n=!1,...o},a)=>{let i=n?ee.Fragment:r?"a":"span",s=n?{}:r?{href:r}:{};return(0,q.jsx)("li",{ref:a,className:Ae("moonui-theme","inline-flex items-center gap-1.5",e),"aria-current":t?"page":void 0,...o,children:(0,q.jsx)(i,{className:Ae("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:o.children})})});rsr.displayName="BreadcrumbItem";var nsr=({children:e,className:t,...r})=>(0,q.jsx)("span",{role:"presentation","aria-hidden":"true",className:Ae("moonui-theme","text-muted-foreground opacity-70",t),...r,children:e||(0,q.jsx)($0,{className:"h-3.5 w-3.5"})});nsr.displayName="BreadcrumbSeparator";var Qtt=({className:e,...t})=>(0,q.jsxs)("span",{role:"presentation","aria-hidden":"true",className:Ae("moonui-theme","flex items-center text-muted-foreground hover:text-foreground/80 transition-colors duration-200",e),...t,children:[(0,q.jsx)(Xy,{className:"h-4 w-4"}),(0,q.jsx)("span",{className:"sr-only",children:"More pages"})]});Qtt.displayName="BreadcrumbEllipsis";var osr=ee.forwardRef(({className:e,href:t,...r},n)=>(0,q.jsx)("a",{ref:n,href:t,className:Ae("transition-colors duration-200 hover:text-foreground text-muted-foreground hover:underline hover:underline-offset-4 hover:decoration-muted-foreground/30",e),...r}));osr.displayName="BreadcrumbLink";var asr=ee.forwardRef(({className:e,...t},r)=>(0,q.jsx)("span",{ref:r,className:Ae("font-medium text-foreground dark:text-white dark:text-opacity-95",e),...t}));asr.displayName="BreadcrumbPage";var Ztt=Hn(["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}}),I8=ee.forwardRef(({className:e,variant:t,size:r,rounded:n,fullWidth:o,asChild:a=!1,loading:i=!1,leftIcon:s,rightIcon:l,children:c,disabled:u,...d},f)=>(0,q.jsxs)("button",{className:Ae("moonui-theme",Ztt({variant:t,size:r,rounded:n,fullWidth:o,className:e})),ref:f,disabled:u||i,"data-loading":i?"":void 0,...d,children:[i&&(0,q.jsx)(Ef,{className:"w-4 h-4 animate-spin","aria-hidden":"true"}),!i&&s,c,!i&&l]}));I8.displayName="Button";Hn("",{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"}});var x8={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}},Ode={lift:{y:-2,transition:x8.smooth},scale:{scale:1.05,transition:x8.smooth},glow:{boxShadow:"0 0 20px rgba(var(--primary), 0.3)",transition:x8.smooth},rotate:{rotate:2,transition:x8.bouncy}},isr={scale:{scale:.95,transition:{duration:.1}},depress:{y:1,transition:{duration:.1}}},ssr={initial:{opacity:.5},animate:{opacity:[.5,.8,.5],transition:{duration:1.5,repeat:1/0,ease:"easeInOut"}}},Vtt=Hn("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"}}),lsr=ee.forwardRef(({className:e,variant:t,size:r,radius:n,interactive:o,microInteraction:a="lift",...i},s)=>{if(o&&a!=="none"){let l={whileHover:a==="scale"?Ode.scale:a==="glow"?Ode.glow:Ode.lift,whileTap:isr.scale};return(0,q.jsx)(Ad.div,{ref:s,className:Ae("moonui-theme",Vtt({variant:t,size:r,radius:n,interactive:o,className:e})),...l,...i})}return(0,q.jsx)("div",{ref:s,className:Ae("moonui-theme",Vtt({variant:t,size:r,radius:n,interactive:o,className:e})),...i})});lsr.displayName="Card";var csr=ee.forwardRef(({className:e,...t},r)=>(0,q.jsx)("div",{ref:r,className:Ae("moonui-theme","flex flex-col space-y-1.5 p-6",e),...t}));csr.displayName="CardHeader";var usr=ee.forwardRef(({className:e,...t},r)=>(0,q.jsx)("h3",{ref:r,className:Ae("moonui-theme","text-lg font-semibold leading-none tracking-tight",e),...t}));usr.displayName="CardTitle";var dsr=ee.forwardRef(({className:e,...t},r)=>(0,q.jsx)("p",{ref:r,className:Ae("moonui-theme","text-sm text-muted-foreground",e),...t}));dsr.displayName="CardDescription";var fsr=ee.forwardRef(({className:e,...t},r)=>(0,q.jsx)("div",{ref:r,className:Ae("moonui-theme","p-6 pt-0",e),...t}));fsr.displayName="CardContent";var psr=ee.forwardRef(({className:e,...t},r)=>(0,q.jsx)("div",{ref:r,className:Ae("moonui-theme","flex items-center p-6 pt-0",e),...t}));psr.displayName="CardFooter";var msr=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,n]of Object.entries(t))if(n.test(e))return r;return"unknown"},Utt=(e,t)=>{let r=e.replace(/\s+/g,""),n=t==="amex"?[4,6,5]:[4,4,4,4],o="",a=0;for(let i of n){if(a>=r.length)break;o&&(o+=" "),o+=r.slice(a,a+i),a+=i}return o},hsr=ee.forwardRef(({className:e,value:t="",onChange:r,showIcon:n=!0,size:o,...a},i)=>{let[s,l]=ee.useState("unknown"),c=u=>{let d=u.target.value.replace(/\D/g,""),f=msr(d);l(f);let p=f==="amex"?15:16,m=d.slice(0,p),h=Utt(m,f);r?.(m,f),u.target.value=h};return(0,q.jsxs)("div",{className:"relative",children:[(0,q.jsx)(JM,{ref:i,type:"text",inputMode:"numeric",autoComplete:"cc-number",placeholder:"1234 5678 9012 3456",value:Utt(t,s),onChange:c,className:Ae(n&&"pl-10",e),...a}),n&&(0,q.jsx)(f_,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"})]})});hsr.displayName="CardNumberInput";var gsr=ee.forwardRef(({className:e,value:t="",onChange:r,size:n,...o},a)=>{let i=l=>{let c=l.target.value.replace(/\D/g,"");if(c.length>=2){let d=parseInt(c.slice(0,2));d>12?c="12"+c.slice(2):d===0&&(c="01"+c.slice(2))}c=c.slice(0,4);let u=c;c.length>=2&&(u=c.slice(0,2)+"/"+c.slice(2)),r?.(c),l.target.value=u},s=t.length>=2?t.slice(0,2)+"/"+t.slice(2):t;return(0,q.jsx)(JM,{ref:a,type:"text",inputMode:"numeric",autoComplete:"cc-exp",placeholder:"MM/YY",value:s,onChange:i,className:e,...o})});gsr.displayName="CardExpiryInput";var vsr=ee.forwardRef(({className:e,value:t="",onChange:r,cardType:n="unknown",size:o,...a},i)=>{let s=n==="amex"?4:3;return(0,q.jsx)(JM,{ref:i,type:"text",inputMode:"numeric",autoComplete:"cc-csc",placeholder:n==="amex"?"1234":"123",value:t,onChange:c=>{let u=c.target.value.replace(/\D/g,"").slice(0,s);r?.(u)},maxLength:s,className:e,...a})});vsr.displayName="CardCVCInput";var ysr=ee.forwardRef(({className:e,value:t="",onChange:r,format:n="US",size:o,...a},i)=>{let s=c=>{let u=c.target.value;switch(n){case"US":u=u.replace(/\D/g,"").slice(0,5);break;case"CA":u=u.toUpperCase().replace(/[^A-Z0-9]/g,"").slice(0,6),u.length>=3&&(u=u.slice(0,3)+" "+u.slice(3));break;case"UK":u=u.toUpperCase().replace(/[^A-Z0-9\s]/g,"").slice(0,8);break;default:u=u.slice(0,10)}r?.(u.replace(/\s/g,"")),c.target.value=u};return(0,q.jsx)(JM,{ref:i,type:"text",autoComplete:"postal-code",placeholder:(()=>{switch(n){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})});ysr.displayName="CardZipInput";var xsr=Hn("peer shrink-0 border focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:text-primary-foreground",{variants:{variant:{default:"border-border bg-background data-[state=checked]:bg-primary data-[state=checked]:border-primary",outline:"border-border bg-transparent data-[state=checked]:bg-primary data-[state=checked]:border-primary",muted:"border-border bg-accent data-[state=checked]:bg-primary data-[state=checked]:border-primary",ghost:"border-transparent bg-transparent hover:bg-accent data-[state=checked]:bg-primary data-[state=checked]:border-primary"},size:{sm:"h-3.5 w-3.5",default:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"},radius:{none:"rounded-none",sm:"rounded-sm",default:"rounded-sm",md:"rounded-md",full:"rounded-full"},animation:{none:"",subtle:"transition-all duration-200",default:"transition-all duration-200",bounce:"transition-all duration-200"}},defaultVariants:{variant:"default",size:"default",radius:"default",animation:"default"}}),Jtt=ee.forwardRef(({className:e,variant:t,size:r,radius:n,animation:o,indeterminate:a=!1,icon:i,checked:s,...l},c)=>{let[u,d]=ee.useState(a);return ee.useEffect(()=>{d(a)},[a]),(0,q.jsx)(XG,{ref:c,checked:u?!1:s,className:Ae("moonui-theme",xsr({variant:t,size:r,radius:n,animation:o}),e),...l,children:(0,q.jsx)(vue,{className:Ae("flex items-center justify-center text-current",o==="bounce"&&"data-[state=checked]:animate-bounce"),children:u?(0,q.jsx)(b_,{className:"h-[65%] w-[65%]"}):i||(0,q.jsx)(Ky,{className:"h-[65%] w-[65%]"})})})});Jtt.displayName=XG.displayName;var bsr=ee.forwardRef(({className:e,orientation:t="vertical",spacing:r="1rem",children:n,...o},a)=>(0,q.jsx)("div",{ref:a,className:Ae("flex",t==="vertical"?"flex-col":"flex-row flex-wrap",e),style:{gap:r},role:"group",...o,children:n}));bsr.displayName="CheckboxGroup";var Vde=ee.forwardRef(({className:e,htmlFor:t,children:r,position:n="end",disabled:o=!1,...a},i)=>(0,q.jsx)("label",{ref:i,htmlFor:t,className:Ae("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",n==="start"?"mr-2":"ml-2",o&&"cursor-not-allowed opacity-70",e),...a,children:r}));Vde.displayName="CheckboxLabel";var wsr=ee.forwardRef(({id:e,label:t,labelPosition:r="end",labelClassName:n,...o},a)=>{let i=ee.useId(),s=e||i;return(0,q.jsxs)("div",{className:"flex items-center",children:[r==="start"&&(0,q.jsx)(Vde,{htmlFor:s,position:"start",disabled:o.disabled,className:n,children:t}),(0,q.jsx)(Jtt,{ref:a,id:s,...o}),r==="end"&&(0,q.jsx)(Vde,{htmlFor:s,position:"end",disabled:o.disabled,className:n,children:t})]})});wsr.displayName="CheckboxWithLabel";function Csr(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e?.(o),r===!1||!o.defaultPrevented)return t?.(o)}}function Ssr(e,t=[]){let r=[];function n(a,i){let s=ee.createContext(i),l=r.length;r=[...r,i];let c=d=>{let{scope:f,children:p,...m}=d,h=f?.[e]?.[l]||s,g=ee.useMemo(()=>m,Object.values(m));return(0,q.jsx)(h.Provider,{value:g,children:p})};c.displayName=a+"Provider";function u(d,f){let p=f?.[e]?.[l]||s,m=ee.useContext(p);if(m)return m;if(i!==void 0)return i;throw new Error(`\`${d}\` must be used within \`${a}\``)}return[c,u]}let o=()=>{let a=r.map(i=>ee.createContext(i));return function(s){let l=s?.[e]||a;return ee.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return o.scopeName=e,[n,Psr(o,...t)]}function Psr(...e){let t=e[0];if(e.length===1)return t;let r=()=>{let n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(a){let i=n.reduce((s,{useScope:l,scopeName:c})=>{let d=l(a)[`__scope${c}`];return{...s,...d}},{});return ee.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return r.scopeName=t.scopeName,r}var zF=globalThis?.document?ee.useLayoutEffect:()=>{},Isr=ee[" useInsertionEffect ".trim().toString()]||zF;function ksr({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){let[o,a,i]=Rsr({defaultProp:t,onChange:r}),s=e!==void 0,l=s?e:o;{let u=ee.useRef(e!==void 0);ee.useEffect(()=>{let d=u.current;d!==s&&console.warn(`${n} 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.`),u.current=s},[s,n])}let c=ee.useCallback(u=>{if(s){let d=Nsr(u)?u(e):u;d!==e&&i.current?.(d)}else a(u)},[s,e,a,i]);return[l,c]}function Rsr({defaultProp:e,onChange:t}){let[r,n]=ee.useState(e),o=ee.useRef(r),a=ee.useRef(t);return Isr(()=>{a.current=t},[t]),ee.useEffect(()=>{o.current!==r&&(a.current?.(r),o.current=r)},[r,o]),[r,n,a]}function Nsr(e){return typeof e=="function"}function ztt(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Msr(...e){return t=>{let r=!1,n=e.map(o=>{let a=ztt(o,t);return!r&&typeof a=="function"&&(r=!0),a});if(r)return()=>{for(let o=0;o<n.length;o++){let a=n[o];typeof a=="function"?a():ztt(e[o],null)}}}}function ert(...e){return ee.useCallback(Msr(...e),e)}var Tsr=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],$de=Tsr.reduce((e,t)=>{let r=Sc(`Primitive.${t}`),n=ee.forwardRef((o,a)=>{let{asChild:i,...s}=o,l=i?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,q.jsx)(l,{...s,ref:a})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Asr(e,t){return ee.useReducer((r,n)=>t[r][n]??r,e)}var trt=e=>{let{present:t,children:r}=e,n=Lsr(t),o=typeof r=="function"?r({present:n.isPresent}):ee.Children.only(r),a=ert(n.ref,Esr(o));return typeof r=="function"||n.isPresent?ee.cloneElement(o,{ref:a}):null};trt.displayName="Presence";function Lsr(e){let[t,r]=ee.useState(),n=ee.useRef(null),o=ee.useRef(e),a=ee.useRef("none"),i=e?"mounted":"unmounted",[s,l]=Asr(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return ee.useEffect(()=>{let c=b8(n.current);a.current=s==="mounted"?c:"none"},[s]),zF(()=>{let c=n.current,u=o.current;if(u!==e){let f=a.current,p=b8(c);e?l("MOUNT"):p==="none"||c?.display==="none"?l("UNMOUNT"):l(u&&f!==p?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),zF(()=>{if(t){let c,u=t.ownerDocument.defaultView??window,d=p=>{let h=b8(n.current).includes(CSS.escape(p.animationName));if(p.target===t&&h&&(l("ANIMATION_END"),!o.current)){let g=t.style.animationFillMode;t.style.animationFillMode="forwards",c=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},f=p=>{p.target===t&&(a.current=b8(n.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{u.clearTimeout(c),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:ee.useCallback(c=>{n.current=c?getComputedStyle(c):null,r(c)},[])}}function b8(e){return e?.animationName||"none"}function Esr(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 Dsr=ee[" useId ".trim().toString()]||(()=>{}),Osr=0;function _sr(e){let[t,r]=ee.useState(Dsr());return zF(()=>{e||r(n=>n??String(Osr++))},[e]),e||(t?`radix-${t}`:"")}var k8="Collapsible",[Fsr,aXn]=Ssr(k8),[Bsr,qde]=Fsr(k8),Vsr=ee.forwardRef((e,t)=>{let{__scopeCollapsible:r,open:n,defaultOpen:o,disabled:a,onOpenChange:i,...s}=e,[l,c]=ksr({prop:n,defaultProp:o??!1,onChange:i,caller:k8});return(0,q.jsx)(Bsr,{scope:r,disabled:a,contentId:_sr(),open:l,onOpenToggle:ee.useCallback(()=>c(u=>!u),[c]),children:(0,q.jsx)($de.div,{"data-state":Gde(l),"data-disabled":a?"":void 0,...s,ref:t})})});Vsr.displayName=k8;var rrt="CollapsibleTrigger",nrt=ee.forwardRef((e,t)=>{let{__scopeCollapsible:r,...n}=e,o=qde(rrt,r);return(0,q.jsx)($de.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":Gde(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...n,ref:t,onClick:Csr(e.onClick,o.onOpenToggle)})});nrt.displayName=rrt;var Wde="CollapsibleContent",ort=ee.forwardRef((e,t)=>{let{forceMount:r,...n}=e,o=qde(Wde,e.__scopeCollapsible);return(0,q.jsx)(trt,{present:r||o.open,children:({present:a})=>(0,q.jsx)(Usr,{...n,ref:t,present:a})})});ort.displayName=Wde;var Usr=ee.forwardRef((e,t)=>{let{__scopeCollapsible:r,present:n,children:o,...a}=e,i=qde(Wde,r),[s,l]=ee.useState(n),c=ee.useRef(null),u=ert(t,c),d=ee.useRef(0),f=d.current,p=ee.useRef(0),m=p.current,h=i.open||s,g=ee.useRef(h),v=ee.useRef(void 0);return ee.useEffect(()=>{let y=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(y)},[]),zF(()=>{let y=c.current;if(y){v.current=v.current||{transitionDuration:y.style.transitionDuration,animationName:y.style.animationName},y.style.transitionDuration="0s",y.style.animationName="none";let x=y.getBoundingClientRect();d.current=x.height,p.current=x.width,g.current||(y.style.transitionDuration=v.current.transitionDuration,y.style.animationName=v.current.animationName),l(n)}},[i.open,n]),(0,q.jsx)($de.div,{"data-state":Gde(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!h,...a,ref:u,style:{["--radix-collapsible-content-height"]:f?`${f}px`:void 0,["--radix-collapsible-content-width"]:m?`${m}px`:void 0,...e.style},children:h&&o})});function Gde(e){return e?"open":"closed"}var Ude=nrt,art=ort;var Htt=Hn("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"}}),zsr=ee.forwardRef(({className:e,children:t,variant:r,size:n,asChild:o,...a},i)=>o?(0,q.jsx)(Ude,{ref:i,className:Ae("moonui-theme",Htt({variant:r,size:n}),e),asChild:o,...a,children:t}):(0,q.jsxs)(Ude,{ref:i,className:Ae("moonui-theme",Htt({variant:r,size:n}),e),...a,children:[t,(0,q.jsx)(j0,{className:"h-4 w-4 shrink-0 ml-auto transition-transform duration-200 [&[data-state=open]]:rotate-180"})]}));zsr.displayName=Ude.displayName;var Hsr=Hn("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"}}),jsr=ee.forwardRef(({className:e,children:t,variant:r,size:n,...o},a)=>(0,q.jsx)(art,{ref:a,className:Ae("moonui-theme",Hsr({variant:r,size:n}),e),...o,children:(0,q.jsx)("div",{className:"p-4",children:t})}));jsr.displayName=art.displayName;var $sr=Hn("group relative flex items-center w-full transition-colors",{variants:{size:{sm:"",md:"",lg:""}},defaultVariants:{size:"md"}}),qsr=Hn(["w-full bg-background transition-all duration-200","text-foreground placeholder:text-muted-foreground dark:placeholder:text-gray-500","disabled:cursor-not-allowed disabled:opacity-50","file:border-0 file:bg-transparent file:font-medium","focus-visible:outline-none dark:text-gray-200"],{variants:{variant:{standard:"border border-gray-300 dark:border-gray-700 rounded-md px-3 py-2 hover:border-gray-400 dark:hover:border-gray-600 focus-visible:ring-2 focus-visible:ring-primary/30 dark:focus-visible:ring-primary/20 focus-visible:border-primary dark:focus-visible:border-primary/80 dark:bg-gray-900/60 dark:shadow-inner dark:shadow-gray-950/10",filled:"border border-transparent bg-gray-100 dark:bg-gray-800/90 rounded-md px-3 py-2 hover:bg-gray-200 dark:hover:bg-gray-700/90 focus-visible:ring-2 focus-visible:ring-primary/30 dark:focus-visible:ring-primary/20 dark:shadow-inner dark:shadow-gray-950/10",ghost:"border-none bg-transparent shadow-none px-1 dark:text-gray-300 dark:placeholder:text-gray-500 hover:bg-gray-100/50 dark:hover:bg-gray-800/30 focus-visible:bg-transparent",underline:"border-t-0 border-l-0 border-r-0 border-b border-gray-300 dark:border-gray-600 rounded-none px-0 py-2 hover:border-gray-400 dark:hover:border-gray-500 focus-visible:ring-0 focus-visible:border-b-2 focus-visible:border-primary dark:focus-visible:border-primary/80 dark:text-gray-300"},size:{sm:"h-8 text-xs",md:"h-10 text-sm",lg:"h-12 text-base"},hasLeftIcon:{true:"pl-10",false:""},hasRightIcon:{true:"pr-10",false:""},hasRightButton:{true:"pr-10",false:""},isError:{true:"border-error focus-visible:ring-error/30 focus-visible:border-error hover:border-error/80 dark:hover:border-error/80",false:""},isSuccess:{true:"border-success focus-visible:ring-success/30 focus-visible:border-success hover:border-success/80 dark:hover:border-success/80",false:""},isDisabled:{true:"opacity-50 cursor-not-allowed bg-gray-50 dark:bg-gray-800/50 pointer-events-none",false:""}},defaultVariants:{variant:"standard",size:"md",isError:!1,isSuccess:!1,isDisabled:!1,hasLeftIcon:!1,hasRightIcon:!1,hasRightButton:!1}}),JM=ee.forwardRef(({className:e,wrapperClassName:t,messageClassName:r,variant:n,size:o,isError:a,disabled:i,error:s,success:l,loading:c,leftIcon:u,rightIcon:d,rightButton:f,alwaysShowMessage:p=!1,...m},h)=>{let g=p||s||l,v=s?"error":l?"success":"normal";return(0,q.jsxs)("div",{className:"space-y-1.5 w-full",children:[(0,q.jsxs)("div",{className:Ae("moonui-theme",$sr({size:o}),t),children:[u&&(0,q.jsx)("div",{className:"absolute left-3 text-gray-500 flex items-center justify-center pointer-events-none",children:c?(0,q.jsx)(Ef,{className:"h-4 w-4 animate-spin"}):u}),(0,q.jsx)("input",{className:Ae(qsr({variant:n,size:o,isError:!!s||a,isSuccess:!!l,isDisabled:i||c,hasLeftIcon:!!u||c,hasRightIcon:!!d,hasRightButton:!!f}),e),ref:h,disabled:i||c,"data-loading":c?"":void 0,"data-error":s?"":void 0,"data-success":l?"":void 0,"aria-invalid":!!s||!!a||void 0,"aria-describedby":s?`${m.id||""}-error`:l?`${m.id||""}-success`:void 0,...m}),d&&!c&&(0,q.jsx)("div",{className:"absolute right-3 text-gray-500 flex items-center justify-center pointer-events-none",children:d}),f&&(0,q.jsx)("div",{className:"absolute right-3",children:f}),c&&!u&&(0,q.jsx)("div",{className:"absolute left-3 text-gray-500 flex items-center justify-center pointer-events-none",children:(0,q.jsx)(Ef,{className:"h-4 w-4 animate-spin","aria-hidden":"true"})})]}),g&&(0,q.jsx)("p",{className:Ae("text-xs transition-all",v==="error"&&"text-error",v==="success"&&"text-success",v==="normal"&&"text-muted-foreground",r),id:s?`${m.id||""}-error`:l?`${m.id||""}-success`:void 0,children:s||l||""})]})});JM.displayName="Input";var Wsr=Hn("text-sm font-medium leading-none text-gray-900 dark:text-gray-200 peer-disabled:cursor-not-allowed peer-disabled:opacity-70 dark:peer-disabled:opacity-60 transition-colors duration-200"),Gsr=ee.forwardRef(({className:e,...t},r)=>(0,q.jsx)(yue,{ref:r,className:Ae(Wsr(),e),...t}));Gsr.displayName=yue.displayName;var Ksr=Hn("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"}}),Xsr=RZe,Ysr=NZe;var irt=ee.forwardRef(({className:e,variant:t,size:r,side:n,position:o,radius:a,shadow:i,backdrop:s=!1,closeOnInteractOutside:l=!0,overlayBackdrop:c=!1,sideOffset:u=4,...d},f)=>(0,q.jsxs)(q.Fragment,{children:[c&&(0,q.jsx)("div",{className:"fixed inset-0 z-40 bg-overlay opacity-30"}),(0,q.jsx)(bue,{ref:f,sideOffset:u,collisionPadding:8,onInteractOutside:p=>{l||p.preventDefault()},className:Ae(Ksr({variant:t,size:r,side:n,position:o,radius:a,shadow:i}),s&&"backdrop-blur-md bg-opacity-80",e),...d})]}));irt.displayName=bue.displayName;var Qsr=({className:e,...t})=>(0,q.jsx)("div",{className:Ae("moonui-theme","my-2 h-px bg-border",e),...t});Qsr.displayName="PopoverSeparator";var Zsr=({className:e,...t})=>(0,q.jsx)("div",{className:Ae("moonui-theme","-mx-4 -mt-4 mb-3 px-4 pt-4 pb-3 border-b border-border",e),...t});Zsr.displayName="PopoverHeader";var Jsr=({className:e,...t})=>(0,q.jsx)("div",{className:Ae("moonui-theme","-mx-4 -mb-4 mt-3 px-4 pt-3 pb-4 border-t border-border",e),...t});Jsr.displayName="PopoverFooter";var elr=ee.forwardRef(({vertical:e=!1,...t},r)=>(0,q.jsx)(Pue,{ref:r,className:Ae("moonui-theme",t.className),orientation:e?"vertical":"horizontal",...t}));elr.displayName=Pue.displayName;var tlr=Hn("flex items-center justify-start transition-all duration-200",{variants:{variant:{default:"bg-muted rounded-md p-1 text-muted-foreground dark:bg-gray-800/80 dark:text-gray-400",pills:"bg-transparent gap-2 p-0 dark:text-gray-400",underline:"bg-transparent border-b border-border dark:border-gray-700 gap-4 dark:text-gray-400",cards:"bg-transparent gap-2 p-0 dark:text-gray-400",minimal:"bg-transparent gap-1 p-0 dark:text-gray-400"},orientation:{horizontal:"flex-row",vertical:"flex-col items-start gap-1"},fullWidth:{true:"w-full"}},defaultVariants:{variant:"default",orientation:"horizontal",fullWidth:!1}}),rlr=ee.forwardRef(({className:e,variant:t,orientation:r,fullWidth:n,...o},a)=>(0,q.jsx)(Iue,{ref:a,className:Ae("moonui-theme",tlr({variant:t,orientation:r,fullWidth:n,className:e})),...o}));rlr.displayName=Iue.displayName;var nlr=Hn("inline-flex items-center justify-center whitespace-nowrap font-medium ring-offset-background transition-all duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"rounded-md data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm dark:data-[state=active]:bg-gray-900 dark:data-[state=active]:text-gray-100 dark:data-[state=active]:shadow-gray-950/10",underline:"rounded-none border-b-2 border-transparent pb-2 data-[state=active]:border-primary data-[state=active]:bg-transparent data-[state=active]:text-foreground dark:data-[state=active]:border-primary/80 dark:data-[state=active]:text-gray-100",pills:"rounded-full bg-muted hover:bg-muted/80 data-[state=active]:bg-primary data-[state=active]:text-primary-foreground dark:bg-gray-800 dark:hover:bg-gray-700 dark:data-[state=active]:bg-primary/90 dark:data-[state=active]:text-white",cards:"rounded-md bg-muted/50 hover:bg-muted data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-md dark:bg-gray-800/50 dark:hover:bg-gray-700/50 dark:data-[state=active]:bg-gray-900 dark:data-[state=active]:text-gray-100 dark:data-[state=active]:shadow-gray-950/20",minimal:"rounded-sm bg-transparent hover:bg-muted/30 data-[state=active]:bg-transparent data-[state=active]:text-foreground data-[state=active]:underline data-[state=active]:underline-offset-4 dark:hover:bg-gray-800/30 dark:data-[state=active]:text-gray-200"},size:{sm:"h-7 px-2 text-xs",md:"h-9 px-3 py-1.5 text-sm",lg:"h-10 px-4 py-2 text-base"},orientation:{horizontal:"",vertical:"justify-start w-full text-left"},fullWidth:{true:"w-full"}},defaultVariants:{variant:"default",size:"md",orientation:"horizontal",fullWidth:!1}}),olr=ee.forwardRef(({className:e,variant:t,size:r,icon:n,iconPosition:o="left",badge:a,fadeTabs:i=!1,orientation:s,fullWidth:l,children:c,...u},d)=>(0,q.jsxs)(kue,{ref:d,className:Ae("moonui-theme",nlr({variant:t,size:r,orientation:s,fullWidth:l}),i&&"data-[state=inactive]:opacity-60",e),...u,children:[n&&o==="left"&&(0,q.jsx)("span",{className:"mr-2",children:n}),c,n&&o==="right"&&(0,q.jsx)("span",{className:"ml-2",children:n}),a&&(0,q.jsx)("span",{className:"ml-2",children:a})]}));olr.displayName=kue.displayName;var alr=ee.forwardRef(({className:e,animated:t=!1,...r},n)=>(0,q.jsx)(Rue,{ref:n,className:Ae("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}));alr.displayName=Rue.displayName;var ilr=Hn("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"}}),slr=Hn("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"}}),llr=Hn("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"}}),clr=Hn("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"}}),ulr=ee.forwardRef(({className:e,size:t,trackVariant:r,rangeVariant:n,thumbVariant:o,thumbSize:a,showValueLabel:i=!1,valueLabelFormat:s,valueLabelClassName:l,value:c,defaultValue:u=[0],onValueChange:d,disabled:f,...p},m)=>{let[h,g]=ee.useState(c||u||[0]);ee.useEffect(()=>{c!==void 0&&g(c)},[c]);let v=T=>s?s(T):`${Math.round(T*100)/100}`,y=(T,A,M)=>(T-A)/(M-A)*100,x=ee.useRef(null),w=p.min||0,b=p.max||100,C=p.step||1,S=T=>{let A=T.map(M=>{if(C<1){let O=C.toString().split(".")[1]?.length||0;return Math.round(M*Math.pow(10,O))/Math.pow(10,O)}return Math.round(M)});g(A),d&&d(A)},P=T=>{if(f)return;let A=x.current;if(!A)return;let M=A.getBoundingClientRect(),O=(T.clientX-M.left)/M.width,F=w+O*(b-w),I=Math.round(F/C)*C,k=Math.max(w,Math.min(b,I)),R=[...h];R[0]=k,S(R)},N=T=>A=>{if(f)return;A.preventDefault();let M=F=>{let I=x.current;if(!I)return;let k=I.getBoundingClientRect(),R=(F.clientX-k.left)/k.width,E=w+R*(b-w),_=Math.round(E/C)*C,U=Math.max(w,Math.min(b,_)),V=[...h];V[T]=U,S(V)},O=()=>{document.removeEventListener("mousemove",M),document.removeEventListener("mouseup",O)};document.addEventListener("mousemove",M),document.addEventListener("mouseup",O)};return(0,q.jsxs)("div",{className:"w-full",ref:m,...p,children:[i&&(0,q.jsx)("div",{className:Ae("flex justify-end mb-1 text-sm text-muted-foreground",l),children:h.length===1?(0,q.jsx)("span",{children:v(h[0])}):(0,q.jsxs)("span",{children:[v(h[0])," - ",v(h[h.length-1])]})}),(0,q.jsxs)("div",{className:Ae("moonui-theme",ilr({size:t}),e),"data-disabled":f?!0:void 0,children:[(0,q.jsx)("div",{ref:x,className:Ae(slr({variant:r||o||"default"})),onClick:P,children:(0,q.jsx)("div",{className:Ae(llr({variant:n||o||"primary"})),style:{left:"0%",width:`${y(h[0],w,b)}%`}})}),h.map((T,A)=>(0,q.jsx)("div",{className:Ae(clr({variant:o||"primary",size:a})),style:{left:`${y(T,w,b)}%`,transform:"translateX(-50%)",position:"absolute",top:"50%",marginTop:a==="sm"?"-6px":a==="lg"?"-12px":"-8px",cursor:f?"not-allowed":"pointer"},onMouseDown:N(A),"aria-label":`Thumb ${A+1}`,tabIndex:f?-1:0,role:"slider","aria-valuemin":w,"aria-valuemax":b,"aria-valuenow":T,"aria-disabled":f},A))]})]})});ulr.displayName="Slider";var iXn=Hn("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"}});var jtt=1,dlr=.9,flr=.8,plr=.17,_de=.1,Fde=.999,mlr=.9999,hlr=.99,glr=/[\\\/_+.#"@\[\(\{&]/,vlr=/[\\\/_+.#"@\[\(\{&]/g,ylr=/[\s-]/,srt=/[\s-]/g;function zde(e,t,r,n,o,a,i){if(a===t.length)return o===e.length?jtt:hlr;var s=`${o},${a}`;if(i[s]!==void 0)return i[s];for(var l=n.charAt(a),c=r.indexOf(l,o),u=0,d,f,p,m;c>=0;)d=zde(e,t,r,n,c+1,a+1,i),d>u&&(c===o?d*=jtt:glr.test(e.charAt(c-1))?(d*=flr,p=e.slice(o,c-1).match(vlr),p&&o>0&&(d*=Math.pow(Fde,p.length))):ylr.test(e.charAt(c-1))?(d*=dlr,m=e.slice(o,c-1).match(srt),m&&o>0&&(d*=Math.pow(Fde,m.length))):(d*=plr,o>0&&(d*=Math.pow(Fde,c-o))),e.charAt(c)!==t.charAt(a)&&(d*=mlr)),(d<_de&&r.charAt(c-1)===n.charAt(a+1)||n.charAt(a+1)===n.charAt(a)&&r.charAt(c-1)!==n.charAt(a))&&(f=zde(e,t,r,n,c+1,a+2,i),f*_de>d&&(d=f*_de)),d>u&&(u=d),c=r.indexOf(l,c+1);return i[s]=u,u}function $tt(e){return e.toLowerCase().replace(srt," ")}function xlr(e,t,r){return e=r&&r.length>0?`${e+" "+r.join(" ")}`:e,zde(e,t,$tt(e),$tt(t),0,0,{})}var blr=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ld=blr.reduce((e,t)=>{let r=Sc(`Primitive.${t}`),n=ee.forwardRef((o,a)=>{let{asChild:i,...s}=o,l=i?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,q.jsx)(l,{...s,ref:a})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),HF=globalThis?.document?ee.useLayoutEffect:()=>{},wlr=ee[" useId ".trim().toString()]||(()=>{}),Clr=0;function YM(e){let[t,r]=ee.useState(wlr());return HF(()=>{e||r(n=>n??String(Clr++))},[e]),e||(t?`radix-${t}`:"")}function qtt(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function QM(...e){return t=>{let r=!1,n=e.map(o=>{let a=qtt(o,t);return!r&&typeof a=="function"&&(r=!0),a});if(r)return()=>{for(let o=0;o<n.length;o++){let a=n[o];typeof a=="function"?a():qtt(e[o],null)}}}}function G1(...e){return ee.useCallback(QM(...e),e)}var UF='[cmdk-group=""]',Bde='[cmdk-group-items=""]',Slr='[cmdk-group-heading=""]',lrt='[cmdk-item=""]',Wtt=`${lrt}:not([aria-disabled="true"])`,Hde="cmdk-item-select",KM="data-value",Plr=(e,t,r)=>xlr(e,t,r),crt=ee.createContext(void 0),jF=()=>ee.useContext(crt),urt=ee.createContext(void 0),Kde=()=>ee.useContext(urt),drt=ee.createContext(void 0),frt=ee.forwardRef((e,t)=>{let r=XM(()=>{var L,H;return{search:"",value:(H=(L=e.value)!=null?L:e.defaultValue)!=null?H:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),n=XM(()=>new Set),o=XM(()=>new Map),a=XM(()=>new Map),i=XM(()=>new Set),s=prt(e),{label:l,children:c,value:u,onValueChange:d,filter:f,shouldFilter:p,loop:m,disablePointerSelection:h=!1,vimBindings:g=!0,...v}=e,y=YM(),x=YM(),w=YM(),b=ee.useRef(null),C=Olr();W1(()=>{if(u!==void 0){let L=u.trim();r.current.value=L,S.emit()}},[u]),W1(()=>{C(6,O)},[]);let S=ee.useMemo(()=>({subscribe:L=>(i.current.add(L),()=>i.current.delete(L)),snapshot:()=>r.current,setState:(L,H,j)=>{var $,W,z,G;if(!Object.is(r.current[L],H)){if(r.current[L]=H,L==="search")M(),T(),C(1,A);else if(L==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let X=document.getElementById(w);X?X.focus():($=document.getElementById(y))==null||$.focus()}if(C(7,()=>{var X;r.current.selectedItemId=(X=F())==null?void 0:X.id,S.emit()}),j||C(5,O),((W=s.current)==null?void 0:W.value)!==void 0){let X=H??"";(G=(z=s.current).onValueChange)==null||G.call(z,X);return}}S.emit()}},emit:()=>{i.current.forEach(L=>L())}}),[]),P=ee.useMemo(()=>({value:(L,H,j)=>{var $;H!==(($=a.current.get(L))==null?void 0:$.value)&&(a.current.set(L,{value:H,keywords:j}),r.current.filtered.items.set(L,N(H,j)),C(2,()=>{T(),S.emit()}))},item:(L,H)=>(n.current.add(L),H&&(o.current.has(H)?o.current.get(H).add(L):o.current.set(H,new Set([L]))),C(3,()=>{M(),T(),r.current.value||A(),S.emit()}),()=>{a.current.delete(L),n.current.delete(L),r.current.filtered.items.delete(L);let j=F();C(4,()=>{M(),j?.getAttribute("id")===L&&A(),S.emit()})}),group:L=>(o.current.has(L)||o.current.set(L,new Set),()=>{a.current.delete(L),o.current.delete(L)}),filter:()=>s.current.shouldFilter,label:l||e["aria-label"],getDisablePointerSelection:()=>s.current.disablePointerSelection,listId:y,inputId:w,labelId:x,listInnerRef:b}),[]);function N(L,H){var j,$;let W=($=(j=s.current)==null?void 0:j.filter)!=null?$:Plr;return L?W(L,r.current.search,H):0}function T(){if(!r.current.search||s.current.shouldFilter===!1)return;let L=r.current.filtered.items,H=[];r.current.filtered.groups.forEach($=>{let W=o.current.get($),z=0;W.forEach(G=>{let X=L.get(G);z=Math.max(X,z)}),H.push([$,z])});let j=b.current;I().sort(($,W)=>{var z,G;let X=$.getAttribute("id"),Y=W.getAttribute("id");return((z=L.get(Y))!=null?z:0)-((G=L.get(X))!=null?G:0)}).forEach($=>{let W=$.closest(Bde);W?W.appendChild($.parentElement===W?$:$.closest(`${Bde} > *`)):j.appendChild($.parentElement===j?$:$.closest(`${Bde} > *`))}),H.sort(($,W)=>W[1]-$[1]).forEach($=>{var W;let z=(W=b.current)==null?void 0:W.querySelector(`${UF}[${KM}="${encodeURIComponent($[0])}"]`);z?.parentElement.appendChild(z)})}function A(){let L=I().find(j=>j.getAttribute("aria-disabled")!=="true"),H=L?.getAttribute(KM);S.setState("value",H||void 0)}function M(){var L,H,j,$;if(!r.current.search||s.current.shouldFilter===!1){r.current.filtered.count=n.current.size;return}r.current.filtered.groups=new Set;let W=0;for(let z of n.current){let G=(H=(L=a.current.get(z))==null?void 0:L.value)!=null?H:"",X=($=(j=a.current.get(z))==null?void 0:j.keywords)!=null?$:[],Y=N(G,X);r.current.filtered.items.set(z,Y),Y>0&&W++}for(let[z,G]of o.current)for(let X of G)if(r.current.filtered.items.get(X)>0){r.current.filtered.groups.add(z);break}r.current.filtered.count=W}function O(){var L,H,j;let $=F();$&&(((L=$.parentElement)==null?void 0:L.firstChild)===$&&((j=(H=$.closest(UF))==null?void 0:H.querySelector(Slr))==null||j.scrollIntoView({block:"nearest"})),$.scrollIntoView({block:"nearest"}))}function F(){var L;return(L=b.current)==null?void 0:L.querySelector(`${lrt}[aria-selected="true"]`)}function I(){var L;return Array.from(((L=b.current)==null?void 0:L.querySelectorAll(Wtt))||[])}function k(L){let H=I()[L];H&&S.setState("value",H.getAttribute(KM))}function R(L){var H;let j=F(),$=I(),W=$.findIndex(G=>G===j),z=$[W+L];(H=s.current)!=null&&H.loop&&(z=W+L<0?$[$.length-1]:W+L===$.length?$[0]:$[W+L]),z&&S.setState("value",z.getAttribute(KM))}function E(L){let H=F(),j=H?.closest(UF),$;for(;j&&!$;)j=L>0?Elr(j,UF):Dlr(j,UF),$=j?.querySelector(Wtt);$?S.setState("value",$.getAttribute(KM)):R(L)}let _=()=>k(I().length-1),U=L=>{L.preventDefault(),L.metaKey?_():L.altKey?E(1):R(1)},V=L=>{L.preventDefault(),L.metaKey?k(0):L.altKey?E(-1):R(-1)};return ee.createElement(Ld.div,{ref:t,tabIndex:-1,...v,"cmdk-root":"",onKeyDown:L=>{var H;(H=v.onKeyDown)==null||H.call(v,L);let j=L.nativeEvent.isComposing||L.keyCode===229;if(!(L.defaultPrevented||j))switch(L.key){case"n":case"j":{g&&L.ctrlKey&&U(L);break}case"ArrowDown":{U(L);break}case"p":case"k":{g&&L.ctrlKey&&V(L);break}case"ArrowUp":{V(L);break}case"Home":{L.preventDefault(),k(0);break}case"End":{L.preventDefault(),_();break}case"Enter":{L.preventDefault();let $=F();if($){let W=new Event(Hde);$.dispatchEvent(W)}}}}},ee.createElement("label",{"cmdk-label":"",htmlFor:P.inputId,id:P.labelId,style:Flr},l),R8(e,L=>ee.createElement(urt.Provider,{value:S},ee.createElement(crt.Provider,{value:P},L))))}),Ilr=ee.forwardRef((e,t)=>{var r,n;let o=YM(),a=ee.useRef(null),i=ee.useContext(drt),s=jF(),l=prt(e),c=(n=(r=l.current)==null?void 0:r.forceMount)!=null?n:i?.forceMount;W1(()=>{if(!c)return s.item(o,i?.id)},[c]);let u=mrt(o,a,[e.value,e.children,a],e.keywords),d=Kde(),f=gw(C=>C.value&&C.value===u.current),p=gw(C=>c||s.filter()===!1?!0:C.search?C.filtered.items.get(o)>0:!0);ee.useEffect(()=>{let C=a.current;if(!(!C||e.disabled))return C.addEventListener(Hde,m),()=>C.removeEventListener(Hde,m)},[p,e.onSelect,e.disabled]);function m(){var C,S;h(),(S=(C=l.current).onSelect)==null||S.call(C,u.current)}function h(){d.setState("value",u.current,!0)}if(!p)return null;let{disabled:g,value:v,onSelect:y,forceMount:x,keywords:w,...b}=e;return ee.createElement(Ld.div,{ref:QM(a,t),...b,id:o,"cmdk-item":"",role:"option","aria-disabled":!!g,"aria-selected":!!f,"data-disabled":!!g,"data-selected":!!f,onPointerMove:g||s.getDisablePointerSelection()?void 0:h,onClick:g?void 0:m},e.children)}),klr=ee.forwardRef((e,t)=>{let{heading:r,children:n,forceMount:o,...a}=e,i=YM(),s=ee.useRef(null),l=ee.useRef(null),c=YM(),u=jF(),d=gw(p=>o||u.filter()===!1?!0:p.search?p.filtered.groups.has(i):!0);W1(()=>u.group(i),[]),mrt(i,s,[e.value,e.heading,l]);let f=ee.useMemo(()=>({id:i,forceMount:o}),[o]);return ee.createElement(Ld.div,{ref:QM(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:c},r),R8(e,p=>ee.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?c:void 0},ee.createElement(drt.Provider,{value:f},p))))}),Rlr=ee.forwardRef((e,t)=>{let{alwaysRender:r,...n}=e,o=ee.useRef(null),a=gw(i=>!i.search);return!r&&!a?null:ee.createElement(Ld.div,{ref:QM(o,t),...n,"cmdk-separator":"",role:"separator"})}),Nlr=ee.forwardRef((e,t)=>{let{onValueChange:r,...n}=e,o=e.value!=null,a=Kde(),i=gw(c=>c.search),s=gw(c=>c.selectedItemId),l=jF();return ee.useEffect(()=>{e.value!=null&&a.setState("search",e.value)},[e.value]),ee.createElement(Ld.input,{ref:t,...n,"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:o?e.value:i,onChange:c=>{o||a.setState("search",c.target.value),r?.(c.target.value)}})}),Mlr=ee.forwardRef((e,t)=>{let{children:r,label:n="Suggestions",...o}=e,a=ee.useRef(null),i=ee.useRef(null),s=gw(c=>c.selectedItemId),l=jF();return ee.useEffect(()=>{if(i.current&&a.current){let c=i.current,u=a.current,d,f=new ResizeObserver(()=>{d=requestAnimationFrame(()=>{let p=c.offsetHeight;u.style.setProperty("--cmdk-list-height",p.toFixed(1)+"px")})});return f.observe(c),()=>{cancelAnimationFrame(d),f.unobserve(c)}}},[]),ee.createElement(Ld.div,{ref:QM(a,t),...o,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":s,"aria-label":n,id:l.listId},R8(e,c=>ee.createElement("div",{ref:QM(i,l.listInnerRef),"cmdk-list-sizer":""},c)))}),Tlr=ee.forwardRef((e,t)=>{let{open:r,onOpenChange:n,overlayClassName:o,contentClassName:a,container:i,...s}=e;return ee.createElement(gW,{open:r,onOpenChange:n},ee.createElement(Z2,{container:i},ee.createElement(ZN,{"cmdk-overlay":"",className:o}),ee.createElement(JN,{"aria-label":e.label,"cmdk-dialog":"",className:a},ee.createElement(frt,{ref:t,...s}))))}),Alr=ee.forwardRef((e,t)=>gw(r=>r.filtered.count===0)?ee.createElement(Ld.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),Llr=ee.forwardRef((e,t)=>{let{progress:r,children:n,label:o="Loading...",...a}=e;return ee.createElement(Ld.div,{ref:t,...a,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},R8(e,i=>ee.createElement("div",{"aria-hidden":!0},i)))}),Ed=Object.assign(frt,{List:Mlr,Item:Ilr,Input:Nlr,Group:klr,Separator:Rlr,Dialog:Tlr,Empty:Alr,Loading:Llr});function Elr(e,t){let r=e.nextElementSibling;for(;r;){if(r.matches(t))return r;r=r.nextElementSibling}}function Dlr(e,t){let r=e.previousElementSibling;for(;r;){if(r.matches(t))return r;r=r.previousElementSibling}}function prt(e){let t=ee.useRef(e);return W1(()=>{t.current=e}),t}var W1=typeof window>"u"?ee.useEffect:ee.useLayoutEffect;function XM(e){let t=ee.useRef();return t.current===void 0&&(t.current=e()),t}function gw(e){let t=Kde(),r=()=>e(t.snapshot());return ee.useSyncExternalStore(t.subscribe,r,r)}function mrt(e,t,r,n=[]){let o=ee.useRef(),a=jF();return W1(()=>{var i;let s=(()=>{var c;for(let u of r){if(typeof u=="string")return u.trim();if(typeof u=="object"&&"current"in u)return u.current?(c=u.current.textContent)==null?void 0:c.trim():o.current}})(),l=n.map(c=>c.trim());a.value(e,s,l),(i=t.current)==null||i.setAttribute(KM,s),o.current=s}),o}var Olr=()=>{let[e,t]=ee.useState(),r=XM(()=>new Map);return W1(()=>{r.current.forEach(n=>n()),r.current=new Map},[e]),(n,o)=>{r.current.set(n,o),t({})}};function _lr(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function R8({asChild:e,children:t},r){return e&&ee.isValidElement(t)?ee.cloneElement(_lr(t),{ref:t.ref},r(t.props.children)):r(t)}var Flr={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};var Blr=Z2;var Vlr=Hn("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"}}),hrt=ee.forwardRef(({className:e,variant:t,animation:r,...n},o)=>(0,q.jsx)(ZN,{ref:o,className:Ae("moonui-theme",Vlr({variant:t,animation:r}),e),...n}));hrt.displayName=ZN.displayName;var Ulr=Hn("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"}}),zlr=ee.forwardRef(({className:e,children:t,variant:r,size:n,radius:o,animation:a,position:i,overlayVariant:s="default",overlayAnimation:l="default",hideCloseButton:c=!1,title:u,description:d,icon:f,loading:p=!1,success:m=!1,onClose:h,...g},v)=>{let y=()=>{h&&h()};return(0,q.jsxs)(Blr,{children:[(0,q.jsx)(hrt,{variant:s,animation:l,onClick:c?void 0:y}),(0,q.jsxs)(JN,{ref:v,onEscapeKeyDown:c?void 0:y,onInteractOutside:c?void 0:y,className:Ae(Ulr({variant:r,size:n,radius:o,animation:a,position:i}),"outline-none",p&&"pointer-events-none",m&&"border-success/40",e),...g,children:[(u||d||f)&&(0,q.jsxs)(grt,{className:"flex gap-4",children:[(f||p||m)&&(0,q.jsxs)("div",{className:"flex shrink-0 items-center justify-center",children:[p&&(0,q.jsx)(Ef,{className:"h-5 w-5 animate-spin text-primary"}),m&&(0,q.jsx)(Ky,{className:"h-5 w-5 text-success"}),!p&&!m&&f&&(0,q.jsx)("span",{className:"text-primary",children:f})]}),(0,q.jsxs)("div",{className:"flex-1",children:[u&&(0,q.jsx)(vrt,{children:u}),d&&(0,q.jsx)(yrt,{children:d})]})]}),t,!c&&(0,q.jsxs)(t_,{onClick:y,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,q.jsx)(Yy,{className:"h-4 w-4"}),(0,q.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})});zlr.displayName=JN.displayName;var grt=({className:e,...t})=>(0,q.jsx)("div",{className:Ae("flex flex-col space-y-2 text-center sm:text-left",e),...t});grt.displayName="DialogHeader";var Hlr=({className:e,...t})=>(0,q.jsx)("div",{className:Ae("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end sm:space-x-2 mt-6",e),...t});Hlr.displayName="DialogFooter";var vrt=ee.forwardRef(({className:e,...t},r)=>(0,q.jsx)(J2,{ref:r,className:Ae("text-xl font-semibold leading-snug tracking-tight dark:text-white",e),...t}));vrt.displayName=J2.displayName;var yrt=ee.forwardRef(({className:e,...t},r)=>(0,q.jsx)(e_,{ref:r,className:Ae("text-sm text-muted-foreground leading-normal dark:text-gray-400",e),...t}));yrt.displayName=e_.displayName;var jlr=ee.forwardRef(({className:e,...t},r)=>(0,q.jsx)("form",{ref:r,className:Ae("moonui-theme","flex flex-col gap-4",e),...t}));jlr.displayName="DialogForm";var $lr=Hn("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"}}),qlr=ee.forwardRef(({className:e,variant:t,size:r,...n},o)=>(0,q.jsx)(Ed,{ref:o,className:Ae("moonui-theme",$lr({variant:t,size:r}),e),...n}));qlr.displayName=Ed.displayName;var Wlr=ee.forwardRef(({className:e,...t},r)=>(0,q.jsxs)("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[(0,q.jsx)(k_,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),(0,q.jsx)(Ed.Input,{ref:r,className:Ae("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})]}));Wlr.displayName=Ed.Input.displayName;var Glr=ee.forwardRef(({className:e,...t},r)=>(0,q.jsx)(Ed.List,{ref:r,className:Ae("moonui-theme","max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));Glr.displayName=Ed.List.displayName;var Klr=ee.forwardRef(({className:e,...t},r)=>(0,q.jsx)(Ed.Empty,{ref:r,className:Ae("moonui-theme","py-6 text-center text-sm text-muted-foreground",e),...t}));Klr.displayName=Ed.Empty.displayName;var Xlr=ee.forwardRef(({className:e,...t},r)=>(0,q.jsx)(Ed.Group,{ref:r,className:Ae("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}));Xlr.displayName=Ed.Group.displayName;var Ylr=ee.forwardRef(({className:e,...t},r)=>(0,q.jsx)(Ed.Separator,{ref:r,className:Ae("moonui-theme","-mx-1 h-px bg-border",e),...t}));Ylr.displayName=Ed.Separator.displayName;var Qlr=ee.forwardRef(({className:e,...t},r)=>(0,q.jsx)(Ed.Item,{ref:r,className:Ae("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}));Qlr.displayName=Ed.Item.displayName;var Zlr=({className:e,...t})=>(0,q.jsx)("span",{className:Ae("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});Zlr.displayName="CommandShortcut";var Jlr=(e,t,r)=>{var n,o;let a=r==null||(n=r.toString())==null?void 0:n.toLowerCase();return!!(!((o=e.getValue(t))==null||(o=o.toString())==null||(o=o.toLowerCase())==null)&&o.includes(a))};Jlr.autoRemove=e=>yh(e);var ecr=(e,t,r)=>{var n;return!!(!((n=e.getValue(t))==null||(n=n.toString())==null)&&n.includes(r))};ecr.autoRemove=e=>yh(e);var tcr=(e,t,r)=>{var n;return((n=e.getValue(t))==null||(n=n.toString())==null?void 0:n.toLowerCase())===r?.toLowerCase()};tcr.autoRemove=e=>yh(e);var rcr=(e,t,r)=>{var n;return(n=e.getValue(t))==null?void 0:n.includes(r)};rcr.autoRemove=e=>yh(e);var ncr=(e,t,r)=>!r.some(n=>{var o;return!((o=e.getValue(t))!=null&&o.includes(n))});ncr.autoRemove=e=>yh(e)||!(e!=null&&e.length);var ocr=(e,t,r)=>r.some(n=>{var o;return(o=e.getValue(t))==null?void 0:o.includes(n)});ocr.autoRemove=e=>yh(e)||!(e!=null&&e.length);var acr=(e,t,r)=>e.getValue(t)===r;acr.autoRemove=e=>yh(e);var icr=(e,t,r)=>e.getValue(t)==r;icr.autoRemove=e=>yh(e);var xrt=(e,t,r)=>{let[n,o]=r,a=e.getValue(t);return a>=n&&a<=o};xrt.resolveFilterValue=e=>{let[t,r]=e,n=typeof t!="number"?parseFloat(t):t,o=typeof r!="number"?parseFloat(r):r,a=t===null||Number.isNaN(n)?-1/0:n,i=r===null||Number.isNaN(o)?1/0:o;if(a>i){let s=a;a=i,i=s}return[a,i]};xrt.autoRemove=e=>yh(e)||yh(e[0])&&yh(e[1]);function yh(e){return e==null||e===""}var sXn={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER};var scr=Hn("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"}}),lcr=ee.forwardRef(({className:e,variant:t,size:r,loading:n,emptyContent:o,...a},i)=>{let s=t==="striped",l=ee.Children.map(a.children,c=>{if(ee.isValidElement(c)&&c.type==="tbody"){let u=c.props;return ee.cloneElement(c,{className:Ae(u.className,s&&"even:[&>tr]:bg-muted/50")})}return c});return(0,q.jsxs)("div",{className:"relative w-full overflow-auto",children:[n&&(0,q.jsx)("div",{className:"absolute inset-0 bg-background/60 flex items-center justify-center z-10",children:(0,q.jsx)("div",{className:"h-8 w-8 animate-spin rounded-full border-2 border-primary border-t-transparent"})}),(0,q.jsx)("table",{ref:i,className:Ae(scr({variant:t,size:r}),n&&"opacity-70",e),...a,children:l})]})});lcr.displayName="Table";var ccr=ee.forwardRef(({className:e,...t},r)=>(0,q.jsx)("thead",{ref:r,className:Ae("moonui-theme","[&_tr]:border-b",e),...t}));ccr.displayName="TableHeader";var ucr=ee.forwardRef(({className:e,emptyContent:t,emptyMessage:r="No data available",children:n,...o},a)=>{let i=ee.Children.count(n)>0;return(0,q.jsx)("tbody",{ref:a,className:Ae("moonui-theme","[&_tr:last-child]:border-0",e),...o,children:i?n:(0,q.jsx)("tr",{children:(0,q.jsx)("td",{colSpan:100,className:"h-24 text-center",children:t||(0,q.jsx)("div",{className:"py-6 text-muted-foreground",children:(0,q.jsx)("div",{className:"text-sm",children:r})})})})})});ucr.displayName="TableBody";var dcr=ee.forwardRef(({className:e,...t},r)=>(0,q.jsx)("tfoot",{ref:r,className:Ae("moonui-theme","bg-primary text-primary-foreground font-medium",e),...t}));dcr.displayName="TableFooter";var fcr=ee.forwardRef(({className:e,...t},r)=>(0,q.jsx)("tr",{ref:r,className:Ae("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));fcr.displayName="TableRow";var pcr=ee.forwardRef(({className:e,sortable:t,sorted:r,onSort:n,children:o,...a},i)=>{let s=()=>t?r==="asc"?(0,q.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,q.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,q.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,q.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,q.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,q.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;return(0,q.jsx)("th",{ref:i,className:Ae("h-10 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",t&&"cursor-pointer hover:text-foreground select-none",e),onClick:t?n:void 0,...a,children:(0,q.jsxs)("div",{className:"flex items-center",children:[o,t&&s()]})})});pcr.displayName="TableHead";var mcr=ee.forwardRef(({className:e,...t},r)=>(0,q.jsx)("td",{ref:r,className:Ae("moonui-theme","p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));mcr.displayName="TableCell";var hcr=ee.forwardRef(({className:e,...t},r)=>(0,q.jsx)("caption",{ref:r,className:Ae("moonui-theme","mt-4 text-sm text-muted-foreground",e),...t}));hcr.displayName="TableCaption";function gcr({mode:e="single",selected:t,onSelect:r,disabled:n,showOutsideDays:o=!1,className:a,classNames:i,numberOfMonths:s=1,defaultMonth:l,...c}){let[u,d]=ee.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(wJe(u,1))},m=()=>{d(e8(u,1))},h=C=>{if(!n?.(C)){if(e==="single")r?.(C);else if(e==="range"){let S=t;!S?.from||S.from&&S.to?r?.({from:C,to:void 0}):C<S.from?r?.({from:C,to:S.from}):r?.({from:S.from,to:C})}}},g=C=>{if(!t)return!1;if(e==="single")return B1(C,t);if(e==="range"){let S=t;return S.from&&S.to?C>=S.from&&C<=S.to:S.from?B1(C,S.from):!1}return!1},v=C=>{if(e!=="range"||!t)return!1;let S=t;return S.from?B1(C,S.from):!1},y=C=>{if(e!=="range"||!t)return!1;let S=t;return S.to?B1(C,S.to):!1},x=C=>{if(e!=="range"||!t)return!1;let S=t;return!S.from||!S.to?!1:C>S.from&&C<S.to},b=(()=>{let C=ZZe(u),S=QZe(u),P=n8({start:C,end:S}),N=Eue(C),T=[];if(N>0&&o){let F=hh(C),I=new Date(C);I.setDate(I.getDate()-1),T.push(...n8({start:F,end:I}))}let A=Eue(S),M=[];if(A<6&&o){let F=new Date(S);F.setDate(F.getDate()+1);let I=eJe(S);M.push(...n8({start:F,end:I}))}let O=[];if(!o&&N>0)for(let F=0;F<N;F++)O.push(null);return[...T,...O,...P,...M]})();return(0,q.jsxs)("div",{className:Ae("moonui-theme","p-0",a),children:[(0,q.jsxs)("div",{className:"flex items-center justify-between px-6 py-4 border-b border-border/50 dark:border-gray-700/50",children:[(0,q.jsx)("button",{onClick:p,className:Ae("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,q.jsx)(tM,{className:"h-5 w-5"})}),(0,q.jsx)("h2",{className:"text-base font-medium",children:Lue(u,"MMMM yyyy")}),(0,q.jsx)("button",{onClick:m,className:Ae("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,q.jsx)($0,{className:"h-5 w-5"})})]}),(0,q.jsxs)("div",{className:"px-6 pb-4",children:[(0,q.jsx)("div",{className:"grid grid-cols-7 mb-2",children:f.map((C,S)=>(0,q.jsx)("div",{className:"text-muted-foreground text-xs font-medium h-10 flex items-center justify-center",title:C.full,children:C.short},`weekday-${S}`))}),(0,q.jsx)("div",{className:"grid grid-cols-7 gap-1",children:b.map((C,S)=>{if(!C)return(0,q.jsx)("div",{className:"h-10 w-10"},`empty-${S}`);let P=!xJe(C,u),N=n?.(C)||!1,T=g(C),A=bJe(C),M=v(C),O=y(C),F=x(C);return(0,q.jsx)("button",{onClick:()=>h(C),disabled:N,className:Ae("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",P&&"text-muted-foreground/50",N&&"text-muted-foreground/30 cursor-not-allowed hover:bg-transparent",T&&!F&&"bg-primary text-primary-foreground font-medium hover:bg-primary hover:text-primary-foreground",A&&"font-semibold relative after:absolute after:bottom-1 after:left-1/2 after:-translate-x-1/2 after:h-1 after:w-1 after:rounded-full after:bg-primary",F&&"bg-accent/30 text-accent-foreground rounded-none",M&&"rounded-r-none",O&&"rounded-l-none"),type:"button",children:Lue(C,"d")},C.toISOString())})})]})]})}gcr.displayName="Calendar";var lXn=Hn("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"}});var vcr=ee.forwardRef(({className:e,inset:t,children:r,...n},o)=>(0,q.jsxs)(Que,{ref:o,className:Ae("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),...n,children:[r,(0,q.jsx)($0,{className:"ml-auto h-4 w-4"})]}));vcr.displayName=Que.displayName;var ycr=ee.forwardRef(({className:e,...t},r)=>(0,q.jsx)(Zue,{ref:r,className:Ae("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}));ycr.displayName=Zue.displayName;var xcr=ee.forwardRef(({className:e,sideOffset:t=4,...r},n)=>(0,q.jsx)(wet,{children:(0,q.jsx)($ue,{ref:n,sideOffset:t,className:Ae("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})}));xcr.displayName=$ue.displayName;var bcr=ee.forwardRef(({className:e,inset:t,...r},n)=>(0,q.jsx)(Wue,{ref:n,className:Ae("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}));bcr.displayName=Wue.displayName;var wcr=ee.forwardRef(({className:e,children:t,checked:r,...n},o)=>(0,q.jsxs)(Gue,{ref:o,className:Ae("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,...n,children:[(0,q.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,q.jsx)(Xue,{children:(0,q.jsx)(Ky,{className:"h-4 w-4"})})}),t]}));wcr.displayName=Gue.displayName;var Ccr=ee.forwardRef(({className:e,children:t,...r},n)=>(0,q.jsxs)(Kue,{ref:n,className:Ae("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,q.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,q.jsx)(Xue,{children:(0,q.jsx)(rM,{className:"h-2 w-2 fill-current"})})}),t]}));Ccr.displayName=Kue.displayName;var Scr=ee.forwardRef(({className:e,inset:t,...r},n)=>(0,q.jsx)(que,{ref:n,className:Ae("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...r}));Scr.displayName=que.displayName;var Pcr=ee.forwardRef(({className:e,...t},r)=>(0,q.jsx)(Yue,{ref:r,className:Ae("moonui-theme","-mx-1 my-1 h-px bg-muted",e),...t}));Pcr.displayName=Yue.displayName;var Icr=({className:e,...t})=>(0,q.jsx)("span",{className:Ae("moonui-theme","ml-auto text-xs tracking-widest opacity-60",e),...t});Icr.displayName="DropdownMenuShortcut";var kcr=Hn("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"}}),Rcr=Hn("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"}}),brt=ee.forwardRef(({className:e,value:t=0,variant:r,size:n,radius:o,animation:a,indicatorVariant:i,showValueLabel:s=!1,valueLabel:l,labelClassName:c,indeterminate:u=!1,max:d=100,...f},p)=>{let m=Math.max(0,Math.min(t,d)),h=d>0?m/d*100:0,g=l||`${Math.round(h)}%`;return(0,q.jsxs)(q.Fragment,{children:[s&&(0,q.jsx)("div",{className:"flex justify-between items-center mb-1",children:(0,q.jsx)("span",{className:Ae("text-sm font-medium text-muted-foreground",c),children:g})}),(0,q.jsx)("div",{ref:p,className:Ae("moonui-theme",kcr({variant:r,size:n,radius:o,animation:a}),e),role:"progressbar","aria-valuemin":0,"aria-valuemax":d,"aria-valuenow":u?void 0:m,...f,children:(0,q.jsx)("div",{className:Ae(Rcr({variant:i||"primary",animation:a}),u&&"animate-indeterminate-progress"),style:u?{}:{transform:`translateX(-${100-h}%)`}})})]})});brt.displayName="Progress";var Ncr=e=>e.startsWith("image/")?(0,q.jsx)(nM,{className:"h-4 w-4"}):e.startsWith("video/")?(0,q.jsx)(A_,{className:"h-4 w-4"}):e.startsWith("audio/")?(0,q.jsx)(w_,{className:"h-4 w-4"}):e.includes("text")||e.includes("document")?(0,q.jsx)(m_,{className:"h-4 w-4"}):(0,q.jsx)(h_,{className:"h-4 w-4"}),jde=e=>{if(e===0)return"0 Bytes";let t=1024,r=["Bytes","KB","MB","GB"],n=Math.floor(Math.log(e)/Math.log(t));return parseFloat((e/Math.pow(t,n)).toFixed(2))+" "+r[n]},Mcr=({uploadedFile:e,onRemove:t})=>{let{id:r,file:n,progress:o,status:a,preview:i}=e;return(0,q.jsxs)(Ad.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,q.jsx)("div",{className:"flex-shrink-0",children:i?(0,q.jsx)("img",{src:i,alt:n.name,className:"h-10 w-10 object-cover rounded"}):(0,q.jsx)("div",{className:"h-10 w-10 rounded bg-muted flex items-center justify-center",children:Ncr(n.type)})}),(0,q.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,q.jsxs)("div",{className:"flex items-center justify-between",children:[(0,q.jsx)("p",{className:"text-sm font-medium truncate",children:n.name}),(0,q.jsx)(I8,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0",onClick:()=>t(r),children:(0,q.jsx)(Yy,{className:"h-3 w-3"})})]}),(0,q.jsxs)("div",{className:"flex items-center space-x-2 mt-1",children:[(0,q.jsx)("p",{className:"text-xs text-muted-foreground",children:jde(n.size)}),a==="uploading"&&(0,q.jsxs)(C8,{variant:"secondary",className:"h-5",children:[(0,q.jsx)(Ef,{className:"h-3 w-3 mr-1 animate-spin"}),"Uploading"]}),a==="success"&&(0,q.jsxs)(C8,{variant:"success",className:"h-5",children:[(0,q.jsx)(q0,{className:"h-3 w-3 mr-1"}),"Done"]}),a==="error"&&(0,q.jsxs)(C8,{variant:"destructive",className:"h-5",children:[(0,q.jsx)(Jg,{className:"h-3 w-3 mr-1"}),"Error"]})]}),a==="uploading"&&(0,q.jsx)("div",{className:"mt-2",children:(0,q.jsx)(brt,{value:o,className:"h-1"})})]})]})},Tcr=Bn.default.forwardRef(({accept:e="*",multiple:t=!0,maxSize:r=10*1024*1024,maxFiles:n=5,disabled:o=!1,className:a,onUpload:i,onRemove:s,children:l,...c},u)=>{let[d,f]=(0,Bn.useState)([]),[p,m]=(0,Bn.useState)(!1),[h,g]=(0,Bn.useState)(null),v=P=>P.size>r?`File size exceeds ${jde(r)}`:e!=="*"&&!e.split(",").some(N=>{let T=N.trim();return T.includes("*")?P.type.startsWith(T.replace("*","")):P.type===T})?"File type not supported":null,y=(0,Bn.useCallback)(async P=>{let N=Array.from(P);if(g(null),d.length+N.length>n){g(`Maximum ${n} files allowed`);return}let T=[],A=[];if(N.forEach(O=>{let F=v(O);F?A.push(`${O.name}: ${F}`):T.push(O)}),A.length>0){g(A.join(", "));return}let M=T.map((O,F)=>({id:`${Date.now()}-${F}-${O.name.replace(/[^a-zA-Z0-9]/g,"")}`,file:O,progress:0,status:"uploading",preview:O.type.startsWith("image/")?URL.createObjectURL(O):void 0}));f(O=>[...O,...M]);for(let O of M){let F=0,I=setInterval(()=>{F+=15+O.file.size%10,F>=100?(F=100,clearInterval(I),f(k=>k.map(R=>R.id===O.id?{...R,progress:100,status:"success"}:R))):f(k=>k.map(R=>R.id===O.id?{...R,progress:F}:R))},200)}if(i)try{await i(T)}catch(O){console.error("Upload failed:",O),f(F=>F.map(I=>M.some(k=>k.id===I.id)?{...I,status:"error"}:I))}},[d.length,n,r,e,i]),x=(0,Bn.useCallback)(P=>{if(P.preventDefault(),m(!1),o)return;let N=P.dataTransfer.files;N.length>0&&y(N)},[y,o]),w=(0,Bn.useCallback)(P=>{P.preventDefault(),o||m(!0)},[o]),b=(0,Bn.useCallback)(P=>{P.preventDefault(),m(!1)},[]),C=(0,Bn.useCallback)(P=>{let N=P.target.files;N&&N.length>0&&y(N),P.target.value=""},[y]),S=(0,Bn.useCallback)(P=>{f(N=>{let T=N.find(A=>A.id===P);return T?.preview&&URL.revokeObjectURL(T.preview),N.filter(A=>A.id!==P)}),s&&s(P)},[s]);return(0,q.jsxs)("div",{ref:u,className:Ae("moonui-theme","space-y-4",a),...c,children:[(0,q.jsxs)(Ad.div,{className:Ae("relative border-2 border-dashed rounded-lg p-8 text-center transition-colors",p&&"border-primary bg-primary/5",o&&"opacity-50 cursor-not-allowed",!o&&"hover:border-primary/50 cursor-pointer"),onDrop:x,onDragOver:w,onDragLeave:b,animate:{scale:p?1.02:1,borderColor:p?"hsl(var(--primary))":"hsl(var(--border))"},children:[(0,q.jsx)("input",{type:"file",accept:e,multiple:t,disabled:o,onChange:C,className:"absolute inset-0 w-full h-full opacity-0 cursor-pointer"}),l||(0,q.jsxs)("div",{className:"space-y-4",children:[(0,q.jsx)("div",{className:"mx-auto h-12 w-12 text-muted-foreground",children:(0,q.jsx)(T_,{className:"h-full w-full"})}),(0,q.jsxs)("div",{children:[(0,q.jsx)("p",{className:"text-lg font-medium",children:p?"Drop files here":"Upload files"}),(0,q.jsx)("p",{className:"text-sm text-muted-foreground",children:"Drag & drop files here, or click to select"}),(0,q.jsxs)("p",{className:"text-xs text-muted-foreground mt-2",children:["Max ",n," files, ",jde(r)," each"]})]}),(0,q.jsx)(I8,{variant:"outline",disabled:o,children:"Select Files"})]})]}),(0,q.jsx)(xF,{children:h&&(0,q.jsxs)(Ad.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,q.jsx)(Jg,{className:"h-4 w-4"}),(0,q.jsx)("span",{children:h})]})}),(0,q.jsx)(xF,{children:d.length>0&&(0,q.jsxs)(Ad.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:"space-y-2",children:[(0,q.jsxs)("h4",{className:"text-sm font-medium",children:["Uploaded Files (",d.length,")"]}),(0,q.jsx)("div",{className:"space-y-2",children:(0,q.jsx)(xF,{children:d.map(P=>(0,q.jsx)(Mcr,{uploadedFile:P,onRemove:S},P.id))})})]})})]})});Tcr.displayName="FileUpload";var Acr=Bn.default.forwardRef(({children:e,isOpen:t,onOpenChange:r,direction:n="up",threshold:o=50,className:a,overlayClassName:i,enableSwipeToClose:s=!0,...l},c)=>{let u=VM(0),d=VM(0),f=n==="up"||n==="down",p=f?u:d,m=pue(p,[0,o],[1,.5]),h=(y,x)=>{if(!s)return;let w=f?x.offset.y:x.offset.x,b=f?x.velocity.y:x.velocity.x,C=!1;switch(n){case"up":C=w>o||b>500;break;case"down":C=w<-o||b<-500;break;case"left":C=w>o||b>500;break;case"right":C=w<-o||b<-500;break}C?r(!1):hue(p,0,{type:"spring",stiffness:300,damping:20})},g=()=>{switch(n){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,q.jsxs)("div",{className:"fixed inset-0 z-50",children:[(0,q.jsx)(Ad.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:()=>r(!1),className:Ae("absolute inset-0 bg-black/50",i)}),(0,q.jsxs)(Ad.div,{ref:c,drag:s?f?"y":"x":!1,dragConstraints:{top:n==="up"?0:void 0,bottom:n==="down"?0:void 0,left:n==="left"?0:void 0,right:n==="right"?0:void 0},dragElastic:.2,onDragEnd:h,style:{[f?"y":"x"]:p,opacity:m},initial:g(),animate:v(),exit:g(),transition:{type:"spring",damping:30,stiffness:300},className:Ae("absolute bg-background border shadow-lg",{"bottom-0 left-0 right-0 rounded-t-lg":n==="up","top-0 left-0 right-0 rounded-b-lg":n==="down","top-0 bottom-0 right-0 rounded-l-lg":n==="left","top-0 bottom-0 left-0 rounded-r-lg":n==="right"},a),...l,children:[(n==="up"||n==="down")&&(0,q.jsx)("div",{className:"flex justify-center p-2",children:(0,q.jsx)("div",{className:"w-12 h-1 bg-muted rounded-full"})}),e]})]}):null});Acr.displayName="GestureDrawer";var Lcr=({className:e,...t})=>(0,q.jsx)("nav",{role:"navigation","aria-label":"pagination",className:Ae("moonui-theme","mx-auto flex w-full justify-center",e),...t});Lcr.displayName="Pagination";var Ecr=ee.forwardRef(({className:e,...t},r)=>(0,q.jsx)("ul",{ref:r,className:Ae("moonui-theme","flex flex-row items-center gap-1",e),...t}));Ecr.displayName="PaginationContent";var Dcr=ee.forwardRef(({className:e,...t},r)=>(0,q.jsx)("li",{ref:r,className:Ae("moonui-theme","",e),...t}));Dcr.displayName="PaginationItem";var Xde=({className:e,isActive:t,size:r="icon",...n})=>(0,q.jsx)("a",{"aria-current":t?"page":void 0,className:Ae(Ztt({variant:t?"outline":"ghost",size:r}),e),...n});Xde.displayName="PaginationLink";var Ocr=({className:e,...t})=>(0,q.jsxs)(Xde,{"aria-label":"Go to previous page",size:"md",className:Ae("moonui-theme","gap-1 pl-2.5",e),...t,children:[(0,q.jsx)(tM,{className:"h-4 w-4"}),(0,q.jsx)("span",{children:"Previous"})]});Ocr.displayName="PaginationPrevious";var _cr=({className:e,...t})=>(0,q.jsxs)(Xde,{"aria-label":"Go to next page",size:"md",className:Ae("moonui-theme","gap-1 pr-2.5",e),...t,children:[(0,q.jsx)("span",{children:"Next"}),(0,q.jsx)($0,{className:"h-4 w-4"})]});_cr.displayName="PaginationNext";var Fcr=({className:e,...t})=>(0,q.jsxs)("span",{"aria-hidden":!0,className:Ae("moonui-theme","flex h-9 w-9 items-center justify-center",e),...t,children:[(0,q.jsx)(Xy,{className:"h-4 w-4"}),(0,q.jsx)("span",{className:"sr-only",children:"More pages"})]});Fcr.displayName="PaginationEllipsis";var Yde=Qet;Yde.displayName="Select";var wrt=Zet,Qde=ee.forwardRef(({className:e,children:t,variant:r="standard",size:n="md",error:o,success:a,loading:i,leftIcon:s,rightIcon:l,...c},u)=>(0,q.jsxs)(sde,{ref:u,className:Ae("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",o&&"border-error focus-visible:ring-error/30 focus-visible:border-error",a&&"border-success focus-visible:ring-success/30 focus-visible:border-success",n==="sm"&&"h-8 text-xs px-2",n==="md"&&"h-10 text-sm px-3",n==="lg"&&"h-12 text-base px-4",r==="standard"&&"border border-gray-300 dark:border-gray-700 bg-background dark:bg-gray-900 hover:border-gray-400 dark:hover:border-gray-600 focus-visible:ring-2 focus-visible:ring-primary/30 dark:focus-visible:ring-primary/50 focus-visible:border-primary dark:focus-visible:border-primary",r==="outline"&&"border border-gray-300 dark:border-gray-700 bg-transparent hover:border-gray-400 dark:hover:border-gray-600 focus-visible:ring-2 focus-visible:ring-primary/30 dark:focus-visible:ring-primary/50 focus-visible:border-primary dark:focus-visible:border-primary",r==="ghost"&&"border-none bg-gray-100 dark:bg-gray-800 hover:bg-gray-200 dark:hover:bg-gray-700 focus-visible:ring-2 focus-visible:ring-primary/30 dark:focus-visible:ring-primary/50",r==="underline"&&"border-t-0 border-l-0 border-r-0 border-b border-gray-300 dark:border-gray-600 rounded-none px-0 hover:border-gray-400 dark:hover:border-gray-500 focus-visible:ring-0 focus-visible:border-b-2 focus-visible:border-primary dark:focus-visible:border-primary",e),...c,disabled:c.disabled||i,"data-error":o?!0:void 0,"data-success":a?!0:void 0,"data-loading":i?!0:void 0,children:[(0,q.jsxs)("div",{className:"flex items-center flex-1 gap-2",children:[s&&(0,q.jsx)("span",{className:"flex items-center justify-center text-gray-500 dark:text-gray-400",children:s}),i?(0,q.jsxs)("div",{className:"flex items-center gap-2",children:[(0,q.jsx)(Ef,{className:"h-3.5 w-3.5 animate-spin text-muted-foreground dark:text-gray-400"}),(0,q.jsx)("span",{className:"text-muted-foreground dark:text-gray-400",children:"Loading..."})]}):t]}),!i&&(0,q.jsx)(Jet,{asChild:!0,children:l?(0,q.jsx)("span",{className:"opacity-60",children:l}):(0,q.jsx)(j0,{className:"h-4 w-4 opacity-60 transition-transform duration-200 ease-out group-data-[state=open]:rotate-180"})})]}));Qde.displayName=sde.displayName;var Crt=ee.forwardRef(({className:e,...t},r)=>(0,q.jsx)(dde,{ref:r,className:Ae("flex cursor-default items-center justify-center py-1 text-muted-foreground hover:text-foreground transition-colors",e),...t,children:(0,q.jsx)(u_,{className:"h-4 w-4"})}));Crt.displayName=dde.displayName;var Srt=ee.forwardRef(({className:e,...t},r)=>(0,q.jsx)(fde,{ref:r,className:Ae("flex cursor-default items-center justify-center py-1 text-muted-foreground hover:text-foreground transition-colors",e),...t,children:(0,q.jsx)(j0,{className:"h-4 w-4"})}));Srt.displayName=fde.displayName;var Zde=ee.forwardRef(({className:e,children:t,position:r="popper",side:n="bottom",sideOffset:o=4,align:a="start",...i},s)=>(0,q.jsx)(ett,{children:(0,q.jsxs)(lde,{ref:s,side:n,sideOffset:o,align:a,avoidCollisions:!1,className:Ae(["relative z-50 max-h-96 min-w-[8rem] overflow-hidden","rounded-md border border-gray-200 dark:border-gray-700","bg-white dark:bg-gray-900 text-foreground","shadow-lg dark:shadow-gray-900/20","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","data-[state=open]:duration-150"],r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:r,...i,children:[(0,q.jsx)(Crt,{}),(0,q.jsx)(ttt,{className:Ae("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),(0,q.jsx)(Srt,{})]})}));Zde.displayName=lde.displayName;var Bcr=ee.forwardRef(({className:e,...t},r)=>(0,q.jsx)(cde,{ref:r,className:Ae("moonui-theme","py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));Bcr.displayName=cde.displayName;var tm=ee.forwardRef(({className:e,children:t,variant:r="default",size:n="md",rightIcon:o,customIndicator:a,...i},s)=>(0,q.jsxs)(ude,{ref:s,className:Ae("relative flex w-full cursor-default select-none items-center rounded-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",n==="sm"&&"py-1 pl-7 pr-2 text-xs",n==="md"&&"py-1.5 pl-8 pr-2 text-sm",n==="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,q.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,q.jsx)(ntt,{children:a||(0,q.jsx)(Ky,{className:"h-4 w-4"})})}),(0,q.jsx)(rtt,{children:t}),o&&(0,q.jsx)("span",{className:"ml-auto pl-2 opacity-70",children:o})]}));tm.displayName=ude.displayName;var Vcr=ee.forwardRef(({className:e,...t},r)=>(0,q.jsx)(pde,{ref:r,className:Ae("moonui-theme","-mx-1 my-1 h-px bg-muted dark:bg-gray-700",e),...t}));Vcr.displayName=pde.displayName;var Ucr=[{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"}],Gtt=(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 n="";for(let o=0;o<r.length;o++)o>0&&o%3===0&&(n+=" "),n+=r[o];return n}},zcr=e=>{switch(e){case"+1":return 10;case"+44":return 11;case"+90":return 10;default:return 15}},Hcr=ee.forwardRef(({className:e,value:t="",onChange:r,defaultCountry:n="+1",showIcon:o=!0,showCountrySelect:a=!0,countries:i=Ucr,size:s,...l},c)=>{let[u,d]=ee.useState(n),[f,p]=ee.useState(t),m=i.find(y=>y.code===u)||i[0],h=y=>{let x=y.target.value.replace(/\D/g,""),w=zcr(u),b=x.slice(0,w),C=Gtt(b,u);p(b),r?.(b,u),y.target.value=C},g=y=>{d(y),r?.(f,y)},v=Gtt(f,u);return(0,q.jsxs)("div",{className:Ae("relative flex gap-2",e),children:[a&&(0,q.jsxs)(Yde,{value:u,onValueChange:g,children:[(0,q.jsx)(Qde,{className:"w-[120px]",children:(0,q.jsx)(wrt,{children:(0,q.jsxs)("div",{className:"flex items-center gap-2",children:[(0,q.jsx)("span",{children:m.flag}),(0,q.jsx)("span",{children:m.code})]})})}),(0,q.jsx)(Zde,{children:i.map(y=>(0,q.jsx)(tm,{value:y.code,children:(0,q.jsxs)("div",{className:"flex items-center gap-2",children:[(0,q.jsx)("span",{children:y.flag}),(0,q.jsx)("span",{children:y.code}),(0,q.jsx)("span",{className:"text-muted-foreground",children:y.name})]})},y.code))})]}),(0,q.jsxs)("div",{className:"relative flex-1",children:[(0,q.jsx)(JM,{ref:c,type:"tel",inputMode:"numeric",autoComplete:"tel",placeholder:u==="+1"?"(555) 123-4567":"123 456 789",value:v,onChange:h,className:Ae(o&&"pl-10",e),...l}),o&&(0,q.jsx)(S_,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"})]})]})});Hcr.displayName="PhoneInput";var jcr=Hn("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"}}),Prt=ee.createContext({}),$cr=ee.forwardRef(({className:e,value:t,onValueChange:r,disabled:n,name:o,...a},i)=>(0,q.jsx)(Prt.Provider,{value:{value:t,onValueChange:r,disabled:n,name:o},children:(0,q.jsx)("div",{ref:i,role:"radiogroup",className:Ae("moonui-theme","grid gap-2",e),...a})}));$cr.displayName="RadioGroup";var Irt=ee.forwardRef(({className:e,variant:t,size:r,indicator:n,id:o,value:a,disabled:i,...s},l)=>{let c=ee.useContext(Prt),u=ee.useId(),d=o||u,f=c.value===a,p=m=>{c.onValueChange&&c.onValueChange(m.target.value),s.onChange&&s.onChange(m)};return(0,q.jsxs)("div",{className:"relative flex items-center",children:[(0,q.jsx)("input",{type:"radio",id:d,ref:l,value:a,checked:f,disabled:i||c.disabled,name:c.name,onChange:p,className:"sr-only",...s}),(0,q.jsx)("label",{htmlFor:d,className:Ae(jcr({variant:t,size:r}),"rounded-full","focus-visible:ring-primary/50","relative inline-flex shrink-0 cursor-pointer items-center justify-center overflow-hidden",i&&"cursor-not-allowed opacity-50",e),children:(0,q.jsx)("span",{className:Ae("absolute inset-0 pointer-events-none",f&&"flex items-center justify-center"),children:f&&(n||(0,q.jsx)(rM,{className:"h-[60%] w-[60%] fill-current text-current"}))})})]})});Irt.displayName="RadioGroupItem";var krt=ee.forwardRef(({className:e,htmlFor:t,children:r,disabled:n=!1,...o},a)=>(0,q.jsx)("label",{ref:a,htmlFor:t,className:Ae("text-sm font-medium leading-none ml-2 text-foreground",n&&"cursor-not-allowed opacity-70",e),...o,children:r}));krt.displayName="RadioLabel";var qcr=ee.forwardRef(({id:e,label:t,labelClassName:r,...n},o)=>{let a=ee.useId(),i=e||a;return(0,q.jsxs)("div",{className:"flex items-center",children:[(0,q.jsx)(Irt,{ref:o,id:i,...n}),(0,q.jsx)(krt,{htmlFor:i,disabled:n.disabled,className:r,children:t})]})});qcr.displayName="RadioItemWithLabel";function Wcr(e,t){return ee.useReducer((r,n)=>t[r][n]??r,e)}var $F=e=>{let{present:t,children:r}=e,n=Gcr(t),o=typeof r=="function"?r({present:n.isPresent}):ee.Children.only(r),a=G1(n.ref,Kcr(o));return typeof r=="function"||n.isPresent?ee.cloneElement(o,{ref:a}):null};$F.displayName="Presence";function Gcr(e){let[t,r]=ee.useState(),n=ee.useRef(null),o=ee.useRef(e),a=ee.useRef("none"),i=e?"mounted":"unmounted",[s,l]=Wcr(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return ee.useEffect(()=>{let c=w8(n.current);a.current=s==="mounted"?c:"none"},[s]),HF(()=>{let c=n.current,u=o.current;if(u!==e){let f=a.current,p=w8(c);e?l("MOUNT"):p==="none"||c?.display==="none"?l("UNMOUNT"):l(u&&f!==p?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),HF(()=>{if(t){let c,u=t.ownerDocument.defaultView??window,d=p=>{let h=w8(n.current).includes(CSS.escape(p.animationName));if(p.target===t&&h&&(l("ANIMATION_END"),!o.current)){let g=t.style.animationFillMode;t.style.animationFillMode="forwards",c=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},f=p=>{p.target===t&&(a.current=w8(n.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{u.clearTimeout(c),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:ee.useCallback(c=>{n.current=c?getComputedStyle(c):null,r(c)},[])}}function w8(e){return e?.animationName||"none"}function Kcr(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 Xcr(e,t=[]){let r=[];function n(a,i){let s=ee.createContext(i),l=r.length;r=[...r,i];let c=d=>{let{scope:f,children:p,...m}=d,h=f?.[e]?.[l]||s,g=ee.useMemo(()=>m,Object.values(m));return(0,q.jsx)(h.Provider,{value:g,children:p})};c.displayName=a+"Provider";function u(d,f){let p=f?.[e]?.[l]||s,m=ee.useContext(p);if(m)return m;if(i!==void 0)return i;throw new Error(`\`${d}\` must be used within \`${a}\``)}return[c,u]}let o=()=>{let a=r.map(i=>ee.createContext(i));return function(s){let l=s?.[e]||a;return ee.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return o.scopeName=e,[n,Ycr(o,...t)]}function Ycr(...e){let t=e[0];if(e.length===1)return t;let r=()=>{let n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(a){let i=n.reduce((s,{useScope:l,scopeName:c})=>{let d=l(a)[`__scope${c}`];return{...s,...d}},{});return ee.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return r.scopeName=t.scopeName,r}function $1(e){let t=ee.useRef(e);return ee.useEffect(()=>{t.current=e}),ee.useMemo(()=>(...r)=>t.current?.(...r),[])}var Qcr=ee.createContext(void 0);function Zcr(e){let t=ee.useContext(Qcr);return e||t||"ltr"}function Jcr(e,[t,r]){return Math.min(r,Math.max(t,e))}function hw(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e?.(o),r===!1||!o.defaultPrevented)return t?.(o)}}function eur(e,t){return ee.useReducer((r,n)=>t[r][n]??r,e)}var Jde="ScrollArea",[Rrt,cXn]=Xcr(Jde),[tur,rm]=Rrt(Jde),Nrt=ee.forwardRef((e,t)=>{let{__scopeScrollArea:r,type:n="hover",dir:o,scrollHideDelay:a=600,...i}=e,[s,l]=ee.useState(null),[c,u]=ee.useState(null),[d,f]=ee.useState(null),[p,m]=ee.useState(null),[h,g]=ee.useState(null),[v,y]=ee.useState(0),[x,w]=ee.useState(0),[b,C]=ee.useState(!1),[S,P]=ee.useState(!1),N=G1(t,A=>l(A)),T=Zcr(o);return(0,q.jsx)(tur,{scope:r,type:n,dir:T,scrollHideDelay:a,scrollArea:s,viewport:c,onViewportChange:u,content:d,onContentChange:f,scrollbarX:p,onScrollbarXChange:m,scrollbarXEnabled:b,onScrollbarXEnabledChange:C,scrollbarY:h,onScrollbarYChange:g,scrollbarYEnabled:S,onScrollbarYEnabledChange:P,onCornerWidthChange:y,onCornerHeightChange:w,children:(0,q.jsx)(Ld.div,{dir:T,...i,ref:N,style:{position:"relative",["--radix-scroll-area-corner-width"]:v+"px",["--radix-scroll-area-corner-height"]:x+"px",...e.style}})})});Nrt.displayName=Jde;var Mrt="ScrollAreaViewport",Trt=ee.forwardRef((e,t)=>{let{__scopeScrollArea:r,children:n,nonce:o,...a}=e,i=rm(Mrt,r),s=ee.useRef(null),l=G1(t,s,i.onViewportChange);return(0,q.jsxs)(q.Fragment,{children:[(0,q.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:o}),(0,q.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,q.jsx)("div",{ref:i.onContentChange,style:{minWidth:"100%",display:"table"},children:n})})]})});Trt.displayName=Mrt;var sv="ScrollAreaScrollbar",efe=ee.forwardRef((e,t)=>{let{forceMount:r,...n}=e,o=rm(sv,e.__scopeScrollArea),{onScrollbarXEnabledChange:a,onScrollbarYEnabledChange:i}=o,s=e.orientation==="horizontal";return ee.useEffect(()=>(s?a(!0):i(!0),()=>{s?a(!1):i(!1)}),[s,a,i]),o.type==="hover"?(0,q.jsx)(rur,{...n,ref:t,forceMount:r}):o.type==="scroll"?(0,q.jsx)(nur,{...n,ref:t,forceMount:r}):o.type==="auto"?(0,q.jsx)(Art,{...n,ref:t,forceMount:r}):o.type==="always"?(0,q.jsx)(tfe,{...n,ref:t}):null});efe.displayName=sv;var rur=ee.forwardRef((e,t)=>{let{forceMount:r,...n}=e,o=rm(sv,e.__scopeScrollArea),[a,i]=ee.useState(!1);return ee.useEffect(()=>{let s=o.scrollArea,l=0;if(s){let c=()=>{window.clearTimeout(l),i(!0)},u=()=>{l=window.setTimeout(()=>i(!1),o.scrollHideDelay)};return s.addEventListener("pointerenter",c),s.addEventListener("pointerleave",u),()=>{window.clearTimeout(l),s.removeEventListener("pointerenter",c),s.removeEventListener("pointerleave",u)}}},[o.scrollArea,o.scrollHideDelay]),(0,q.jsx)($F,{present:r||a,children:(0,q.jsx)(Art,{"data-state":a?"visible":"hidden",...n,ref:t})})}),nur=ee.forwardRef((e,t)=>{let{forceMount:r,...n}=e,o=rm(sv,e.__scopeScrollArea),a=e.orientation==="horizontal",i=M8(()=>l("SCROLL_END"),100),[s,l]=eur("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 ee.useEffect(()=>{if(s==="idle"){let c=window.setTimeout(()=>l("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(c)}},[s,o.scrollHideDelay,l]),ee.useEffect(()=>{let c=o.viewport,u=a?"scrollLeft":"scrollTop";if(c){let d=c[u],f=()=>{let p=c[u];d!==p&&(l("SCROLL"),i()),d=p};return c.addEventListener("scroll",f),()=>c.removeEventListener("scroll",f)}},[o.viewport,a,l,i]),(0,q.jsx)($F,{present:r||s!=="hidden",children:(0,q.jsx)(tfe,{"data-state":s==="hidden"?"hidden":"visible",...n,ref:t,onPointerEnter:hw(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:hw(e.onPointerLeave,()=>l("POINTER_LEAVE"))})})}),Art=ee.forwardRef((e,t)=>{let r=rm(sv,e.__scopeScrollArea),{forceMount:n,...o}=e,[a,i]=ee.useState(!1),s=e.orientation==="horizontal",l=M8(()=>{if(r.viewport){let c=r.viewport.offsetWidth<r.viewport.scrollWidth,u=r.viewport.offsetHeight<r.viewport.scrollHeight;i(s?c:u)}},10);return ZM(r.viewport,l),ZM(r.content,l),(0,q.jsx)($F,{present:n||a,children:(0,q.jsx)(tfe,{"data-state":a?"visible":"hidden",...o,ref:t})})}),tfe=ee.forwardRef((e,t)=>{let{orientation:r="vertical",...n}=e,o=rm(sv,e.__scopeScrollArea),a=ee.useRef(null),i=ee.useRef(0),[s,l]=ee.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),c=_rt(s.viewport,s.content),u={...n,sizes:s,onSizesChange:l,hasThumb:c>0&&c<1,onThumbChange:f=>a.current=f,onThumbPointerUp:()=>i.current=0,onThumbPointerDown:f=>i.current=f};function d(f,p){return cur(f,i.current,s,p)}return r==="horizontal"?(0,q.jsx)(our,{...u,ref:t,onThumbPositionChange:()=>{if(o.viewport&&a.current){let f=o.viewport.scrollLeft,p=Ktt(f,s,o.dir);a.current.style.transform=`translate3d(${p}px, 0, 0)`}},onWheelScroll:f=>{o.viewport&&(o.viewport.scrollLeft=f)},onDragScroll:f=>{o.viewport&&(o.viewport.scrollLeft=d(f,o.dir))}}):r==="vertical"?(0,q.jsx)(aur,{...u,ref:t,onThumbPositionChange:()=>{if(o.viewport&&a.current){let f=o.viewport.scrollTop,p=Ktt(f,s);a.current.style.transform=`translate3d(0, ${p}px, 0)`}},onWheelScroll:f=>{o.viewport&&(o.viewport.scrollTop=f)},onDragScroll:f=>{o.viewport&&(o.viewport.scrollTop=d(f))}}):null}),our=ee.forwardRef((e,t)=>{let{sizes:r,onSizesChange:n,...o}=e,a=rm(sv,e.__scopeScrollArea),[i,s]=ee.useState(),l=ee.useRef(null),c=G1(t,l,a.onScrollbarXChange);return ee.useEffect(()=>{l.current&&s(getComputedStyle(l.current))},[l]),(0,q.jsx)(Ert,{"data-orientation":"horizontal",...o,ref:c,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"]:N8(r)+"px",...e.style},onThumbPointerDown:u=>e.onThumbPointerDown(u.x),onDragScroll:u=>e.onDragScroll(u.x),onWheelScroll:(u,d)=>{if(a.viewport){let f=a.viewport.scrollLeft+u.deltaX;e.onWheelScroll(f),Brt(f,d)&&u.preventDefault()}},onResize:()=>{l.current&&a.viewport&&i&&n({content:a.viewport.scrollWidth,viewport:a.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:P8(i.paddingLeft),paddingEnd:P8(i.paddingRight)}})}})}),aur=ee.forwardRef((e,t)=>{let{sizes:r,onSizesChange:n,...o}=e,a=rm(sv,e.__scopeScrollArea),[i,s]=ee.useState(),l=ee.useRef(null),c=G1(t,l,a.onScrollbarYChange);return ee.useEffect(()=>{l.current&&s(getComputedStyle(l.current))},[l]),(0,q.jsx)(Ert,{"data-orientation":"vertical",...o,ref:c,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"]:N8(r)+"px",...e.style},onThumbPointerDown:u=>e.onThumbPointerDown(u.y),onDragScroll:u=>e.onDragScroll(u.y),onWheelScroll:(u,d)=>{if(a.viewport){let f=a.viewport.scrollTop+u.deltaY;e.onWheelScroll(f),Brt(f,d)&&u.preventDefault()}},onResize:()=>{l.current&&a.viewport&&i&&n({content:a.viewport.scrollHeight,viewport:a.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:P8(i.paddingTop),paddingEnd:P8(i.paddingBottom)}})}})}),[iur,Lrt]=Rrt(sv),Ert=ee.forwardRef((e,t)=>{let{__scopeScrollArea:r,sizes:n,hasThumb:o,onThumbChange:a,onThumbPointerUp:i,onThumbPointerDown:s,onThumbPositionChange:l,onDragScroll:c,onWheelScroll:u,onResize:d,...f}=e,p=rm(sv,r),[m,h]=ee.useState(null),g=G1(t,N=>h(N)),v=ee.useRef(null),y=ee.useRef(""),x=p.viewport,w=n.content-n.viewport,b=$1(u),C=$1(l),S=M8(d,10);function P(N){if(v.current){let T=N.clientX-v.current.left,A=N.clientY-v.current.top;c({x:T,y:A})}}return ee.useEffect(()=>{let N=T=>{let A=T.target;m?.contains(A)&&b(T,w)};return document.addEventListener("wheel",N,{passive:!1}),()=>document.removeEventListener("wheel",N,{passive:!1})},[x,m,w,b]),ee.useEffect(C,[n,C]),ZM(m,S),ZM(p.content,S),(0,q.jsx)(iur,{scope:r,scrollbar:m,hasThumb:o,onThumbChange:$1(a),onThumbPointerUp:$1(i),onThumbPositionChange:C,onThumbPointerDown:$1(s),children:(0,q.jsx)(Ld.div,{...f,ref:g,style:{position:"absolute",...f.style},onPointerDown:hw(e.onPointerDown,N=>{N.button===0&&(N.target.setPointerCapture(N.pointerId),v.current=m.getBoundingClientRect(),y.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",p.viewport&&(p.viewport.style.scrollBehavior="auto"),P(N))}),onPointerMove:hw(e.onPointerMove,P),onPointerUp:hw(e.onPointerUp,N=>{let T=N.target;T.hasPointerCapture(N.pointerId)&&T.releasePointerCapture(N.pointerId),document.body.style.webkitUserSelect=y.current,p.viewport&&(p.viewport.style.scrollBehavior=""),v.current=null})})})}),S8="ScrollAreaThumb",Drt=ee.forwardRef((e,t)=>{let{forceMount:r,...n}=e,o=Lrt(S8,e.__scopeScrollArea);return(0,q.jsx)($F,{present:r||o.hasThumb,children:(0,q.jsx)(sur,{ref:t,...n})})}),sur=ee.forwardRef((e,t)=>{let{__scopeScrollArea:r,style:n,...o}=e,a=rm(S8,r),i=Lrt(S8,r),{onThumbPositionChange:s}=i,l=G1(t,d=>i.onThumbChange(d)),c=ee.useRef(void 0),u=M8(()=>{c.current&&(c.current(),c.current=void 0)},100);return ee.useEffect(()=>{let d=a.viewport;if(d){let f=()=>{if(u(),!c.current){let p=uur(d,s);c.current=p,s()}};return s(),d.addEventListener("scroll",f),()=>d.removeEventListener("scroll",f)}},[a.viewport,u,s]),(0,q.jsx)(Ld.div,{"data-state":i.hasThumb?"visible":"hidden",...o,ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...n},onPointerDownCapture:hw(e.onPointerDownCapture,d=>{let p=d.target.getBoundingClientRect(),m=d.clientX-p.left,h=d.clientY-p.top;i.onThumbPointerDown({x:m,y:h})}),onPointerUp:hw(e.onPointerUp,i.onThumbPointerUp)})});Drt.displayName=S8;var rfe="ScrollAreaCorner",Ort=ee.forwardRef((e,t)=>{let r=rm(rfe,e.__scopeScrollArea),n=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&n?(0,q.jsx)(lur,{...e,ref:t}):null});Ort.displayName=rfe;var lur=ee.forwardRef((e,t)=>{let{__scopeScrollArea:r,...n}=e,o=rm(rfe,r),[a,i]=ee.useState(0),[s,l]=ee.useState(0),c=!!(a&&s);return ZM(o.scrollbarX,()=>{let u=o.scrollbarX?.offsetHeight||0;o.onCornerHeightChange(u),l(u)}),ZM(o.scrollbarY,()=>{let u=o.scrollbarY?.offsetWidth||0;o.onCornerWidthChange(u),i(u)}),c?(0,q.jsx)(Ld.div,{...n,ref:t,style:{width:a,height:s,position:"absolute",right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function P8(e){return e?parseInt(e,10):0}function _rt(e,t){let r=e/t;return isNaN(r)?0:r}function N8(e){let t=_rt(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=(e.scrollbar.size-r)*t;return Math.max(n,18)}function cur(e,t,r,n="ltr"){let o=N8(r),a=o/2,i=t||a,s=o-i,l=r.scrollbar.paddingStart+i,c=r.scrollbar.size-r.scrollbar.paddingEnd-s,u=r.content-r.viewport,d=n==="ltr"?[0,u]:[u*-1,0];return Frt([l,c],d)(e)}function Ktt(e,t,r="ltr"){let n=N8(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-o,i=t.content-t.viewport,s=a-n,l=r==="ltr"?[0,i]:[i*-1,0],c=Jcr(e,l);return Frt([0,i],[0,s])(c)}function Frt(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}function Brt(e,t){return e>0&&e<t}var uur=(e,t=()=>{})=>{let r={left:e.scrollLeft,top:e.scrollTop},n=0;return function o(){let a={left:e.scrollLeft,top:e.scrollTop},i=r.left!==a.left,s=r.top!==a.top;(i||s)&&t(),r=a,n=window.requestAnimationFrame(o)}(),()=>window.cancelAnimationFrame(n)};function M8(e,t){let r=$1(e),n=ee.useRef(0);return ee.useEffect(()=>()=>window.clearTimeout(n.current),[]),ee.useCallback(()=>{window.clearTimeout(n.current),n.current=window.setTimeout(r,t)},[r,t])}function ZM(e,t){let r=$1(t);HF(()=>{let n=0;if(e){let o=new ResizeObserver(()=>{cancelAnimationFrame(n),n=window.requestAnimationFrame(r)});return o.observe(e),()=>{window.cancelAnimationFrame(n),o.unobserve(e)}}},[e,r])}var Vrt=Nrt,dur=Trt,fur=Ort,pur=ee.forwardRef(({className:e,children:t,...r},n)=>(0,q.jsxs)(Vrt,{ref:n,className:Ae("relative overflow-hidden",e),...r,children:[(0,q.jsx)(dur,{className:"h-full w-full rounded-[inherit]",children:t}),(0,q.jsx)(Urt,{}),(0,q.jsx)(fur,{})]}));pur.displayName=Vrt.displayName;var Urt=ee.forwardRef(({className:e,orientation:t="vertical",...r},n)=>(0,q.jsx)(efe,{ref:n,orientation:t,className:Ae("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,q.jsx)(Drt,{className:"relative flex-1 rounded-full bg-border"})}));Urt.displayName=efe.displayName;var mur=Hn("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"}}),iv=ee.forwardRef(({className:e,orientation:t="horizontal",variant:r="default",size:n="md",decorative:o=!0,...a},i)=>(0,q.jsx)(mde,{ref:i,decorative:o,orientation:t||void 0,className:Ae(mur({orientation:t,variant:r,size:n}),e),...a}));iv.displayName=mde.displayName;var hur=ee[" useInsertionEffect ".trim().toString()]||HF;function gur({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){let[o,a,i]=vur({defaultProp:t,onChange:r}),s=e!==void 0,l=s?e:o;{let u=ee.useRef(e!==void 0);ee.useEffect(()=>{let d=u.current;d!==s&&console.warn(`${n} 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.`),u.current=s},[s,n])}let c=ee.useCallback(u=>{if(s){let d=yur(u)?u(e):u;d!==e&&i.current?.(d)}else a(u)},[s,e,a,i]);return[l,c]}function vur({defaultProp:e,onChange:t}){let[r,n]=ee.useState(e),o=ee.useRef(r),a=ee.useRef(t);return hur(()=>{a.current=t},[t]),ee.useEffect(()=>{o.current!==r&&(a.current?.(r),o.current=r)},[r,o]),[r,n,a]}function yur(e){return typeof e=="function"}var zrt="Toggle",Hrt=ee.forwardRef((e,t)=>{let{pressed:r,defaultPressed:n,onPressedChange:o,...a}=e,[i,s]=gur({prop:r,onChange:o,defaultProp:n??!1,caller:zrt});return(0,q.jsx)(Ld.button,{type:"button","aria-pressed":i,"data-state":i?"on":"off","data-disabled":e.disabled?"":void 0,...a,ref:t,onClick:hw(e.onClick,()=>{e.disabled||s(!i)})})});Hrt.displayName=zrt;var jrt=Hrt,xur=Hn("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"}}),$rt=ee.forwardRef(({className:e,variant:t,size:r,...n},o)=>(0,q.jsx)(jrt,{ref:o,className:Ae("moonui-theme",xur({variant:t,size:r,className:e})),...n}));$rt.displayName=jrt.displayName;var bur=gtt,wur=Hn("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"}}),qrt=vtt,Wrt=ytt,Grt=ee.forwardRef(({className:e,...t},r)=>(0,q.jsx)(bde,{ref:r,className:Ae("moonui-theme","fill-current",e),...t}));Grt.displayName=bde.displayName;var nfe=ee.forwardRef(({className:e,variant:t,size:r,showArrow:n=!1,sideOffset:o=4,...a},i)=>(0,q.jsxs)(xde,{ref:i,sideOffset:o,className:Ae("moonui-theme",wur({variant:t,size:r}),e),...a,children:[a.children,n&&(0,q.jsx)(Grt,{})]}));nfe.displayName=xde.displayName;var Cur=ee.forwardRef(({children:e,content:t,variant:r="default",size:n="md",side:o="top",align:a="center",delayDuration:i=400,sideOffset:s=4,showArrow:l=!1,className:c,open:u,defaultOpen:d,onOpenChange:f,...p},m)=>(0,q.jsxs)(qrt,{open:u,defaultOpen:d,onOpenChange:f,delayDuration:i,children:[(0,q.jsx)(Wrt,{asChild:!0,children:e}),(0,q.jsx)(nfe,{ref:m,side:o,align:a,variant:r,size:n,sideOffset:s,showArrow:l,className:c,...p,children:t})]}));Cur.displayName="SimpleTooltip";var ul=({icon:e,tooltip:t,active:r,onClick:n,disabled:o})=>(0,q.jsxs)(qrt,{children:[(0,q.jsx)(Wrt,{asChild:!0,children:(0,q.jsx)($rt,{pressed:r,onPressedChange:()=>n(),disabled:o,className:"h-8 w-8 p-0",children:e})}),(0,q.jsx)(nfe,{children:(0,q.jsx)("p",{children:t})})]}),Sur=({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(r=>(0,q.jsx)("button",{className:"w-6 h-6 rounded border-2 border-gray-200 hover:border-gray-400",style:{backgroundColor:r},onClick:()=>e(r)},r))}),Pur=Bn.default.forwardRef(({value:e="",onChange:t,placeholder:r="Start writing...",disabled:n=!1,className:o,minHeight:a=200,maxHeight:i=500,showToolbar:s=!0,showPreview:l=!0,...c},u)=>{let[d,f]=(0,Bn.useState)(e),[p,m]=(0,Bn.useState)(!1),[h,g]=(0,Bn.useState)(e);(0,Bn.useState)(null);let v=Bn.default.useRef(null),y=Bn.default.useRef(null),[x,w]=(0,Bn.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}),b=(0,Bn.useCallback)(I=>{f(I),t?.(I)},[t]),C=(0,Bn.useCallback)(()=>{let I=window.getSelection();return I&&I.rangeCount>0?I.getRangeAt(0):null},[]);(0,Bn.useCallback)(I=>{if(!I)return;let k=window.getSelection();k&&(k.removeAllRanges(),k.addRange(I))},[]);let S=(0,Bn.useCallback)((I,k)=>{if(n)return;if(v.current&&v.current.focus(),C(),document.execCommand(I,!1,k)||console.warn(`Command '${I}' failed to execute`),v.current){let E=v.current.innerHTML;b(E)}w({bold:document.queryCommandState("bold"),italic:document.queryCommandState("italic"),underline:document.queryCommandState("underline"),strikethrough:document.queryCommandState("strikeThrough"),alignLeft:document.queryCommandState("justifyLeft"),alignCenter:document.queryCommandState("justifyCenter"),alignRight:document.queryCommandState("justifyRight"),alignJustify:document.queryCommandState("justifyFull"),orderedList:document.queryCommandState("insertOrderedList"),unorderedList:document.queryCommandState("insertUnorderedList"),quote:document.queryCommandState("formatBlock"),code:document.queryCommandState("formatBlock")}),v.current&&v.current.focus()},[n,C,b]),P=(0,Bn.useCallback)(I=>{let k=I.currentTarget.innerHTML;b(k)},[b]),N=(0,Bn.useCallback)(I=>{if(I.ctrlKey||I.metaKey)switch(I.key){case"b":I.preventDefault(),S("bold");break;case"i":I.preventDefault(),S("italic");break;case"u":I.preventDefault(),S("underline");break;case"z":I.preventDefault(),I.shiftKey?S("redo"):S("undo");break}I.key==="Tab"&&(I.preventDefault(),S("insertHTML","&nbsp;&nbsp;&nbsp;&nbsp;"))},[S]),T=(0,Bn.useCallback)(()=>{let I=prompt("Enter URL:");I&&S("createLink",I)},[S]),A=(0,Bn.useCallback)(()=>{let I=prompt("Enter image URL:");I&&S("insertImage",I)},[S]),M=(0,Bn.useCallback)(I=>{S("formatBlock",`<h${I}>`)},[S]),O=(0,Bn.useCallback)(I=>{let k=window.getSelection();if(k&&k.rangeCount>0){let R=k.getRangeAt(0),E=document.createElement("span");E.style.color=I;try{R.surroundContents(E)}catch{S("foreColor",I)}if(v.current){let _=v.current.innerHTML;b(_)}}},[S,b]);Bn.default.useEffect(()=>{v.current&&d&&d!==v.current.innerHTML&&(v.current.innerHTML=d)},[d]),Bn.default.useEffect(()=>{e!==void 0&&e!==d&&(f(e),g(e))},[e,d]);let F=s&&(0,q.jsx)(bur,{children:(0,q.jsxs)(Ad.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)(ul,{icon:(0,q.jsx)(c_,{className:"h-3 w-3"}),tooltip:"Bold (Ctrl+B)",active:x.bold,onClick:()=>S("bold"),disabled:n}),(0,q.jsx)(ul,{icon:(0,q.jsx)(g_,{className:"h-3 w-3"}),tooltip:"Italic (Ctrl+I)",active:x.italic,onClick:()=>S("italic"),disabled:n}),(0,q.jsx)(ul,{icon:(0,q.jsx)(N_,{className:"h-3 w-3"}),tooltip:"Underline (Ctrl+U)",active:x.underline,onClick:()=>S("underline"),disabled:n}),(0,q.jsx)(ul,{icon:(0,q.jsx)(R_,{className:"h-3 w-3"}),tooltip:"Strikethrough",active:x.strikethrough,onClick:()=>S("strikeThrough"),disabled:n})]}),(0,q.jsx)(iv,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),(0,q.jsxs)(Yde,{onValueChange:I=>{I.startsWith("h")?M(I.substring(1)):I==="normal"?S("formatBlock","p"):S("fontSize",I)},disabled:n,children:[(0,q.jsx)(Qde,{className:"w-24 h-8",children:(0,q.jsx)(wrt,{placeholder:"Size"})}),(0,q.jsxs)(Zde,{children:[(0,q.jsx)(tm,{value:"1",children:"Small"}),(0,q.jsx)(tm,{value:"3",children:"Normal"}),(0,q.jsx)(tm,{value:"5",children:"Large"}),(0,q.jsx)(tm,{value:"7",children:"X-Large"}),(0,q.jsx)(iv,{className:"my-1"}),(0,q.jsx)(tm,{value:"h1",children:"Heading 1"}),(0,q.jsx)(tm,{value:"h2",children:"Heading 2"}),(0,q.jsx)(tm,{value:"h3",children:"Heading 3"}),(0,q.jsx)(tm,{value:"h4",children:"Heading 4"}),(0,q.jsx)(tm,{value:"h5",children:"Heading 5"}),(0,q.jsx)(tm,{value:"h6",children:"Heading 6"})]})]}),(0,q.jsx)(iv,{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)(ul,{icon:(0,q.jsx)(s_,{className:"h-3 w-3"}),tooltip:"Align Left",active:x.alignLeft,onClick:()=>S("justifyLeft"),disabled:n}),(0,q.jsx)(ul,{icon:(0,q.jsx)(a_,{className:"h-3 w-3"}),tooltip:"Align Center",active:x.alignCenter,onClick:()=>S("justifyCenter"),disabled:n}),(0,q.jsx)(ul,{icon:(0,q.jsx)(l_,{className:"h-3 w-3"}),tooltip:"Align Right",active:x.alignRight,onClick:()=>S("justifyRight"),disabled:n}),(0,q.jsx)(ul,{icon:(0,q.jsx)(i_,{className:"h-3 w-3"}),tooltip:"Justify",active:x.alignJustify,onClick:()=>S("justifyFull"),disabled:n})]}),(0,q.jsx)(iv,{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)(ul,{icon:(0,q.jsx)(x_,{className:"h-3 w-3"}),tooltip:"Bullet List",active:x.unorderedList,onClick:()=>S("insertUnorderedList"),disabled:n}),(0,q.jsx)(ul,{icon:(0,q.jsx)(y_,{className:"h-3 w-3"}),tooltip:"Numbered List",active:x.orderedList,onClick:()=>S("insertOrderedList"),disabled:n}),(0,q.jsx)(ul,{icon:(0,q.jsx)(P_,{className:"h-3 w-3"}),tooltip:"Quote",active:x.quote,onClick:()=>S("formatBlock","blockquote"),disabled:n}),(0,q.jsx)(ul,{icon:(0,q.jsx)(d_,{className:"h-3 w-3"}),tooltip:"Code Block",active:x.code,onClick:()=>S("formatBlock","pre"),disabled:n})]}),(0,q.jsx)(iv,{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)(ul,{icon:(0,q.jsx)("span",{className:"text-xs font-mono",children:"\u2190"}),tooltip:"Decrease Indent",onClick:()=>S("outdent"),disabled:n}),(0,q.jsx)(ul,{icon:(0,q.jsx)("span",{className:"text-xs font-mono",children:"\u2192"}),tooltip:"Increase Indent",onClick:()=>S("indent"),disabled:n})]}),(0,q.jsx)(iv,{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)(ul,{icon:(0,q.jsx)(v_,{className:"h-3 w-3"}),tooltip:"Insert Link",onClick:T,disabled:n}),(0,q.jsx)(ul,{icon:(0,q.jsx)(nM,{className:"h-3 w-3"}),tooltip:"Insert Image",onClick:A,disabled:n})]}),(0,q.jsx)(iv,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),(0,q.jsxs)(Xsr,{children:[(0,q.jsx)(Ysr,{asChild:!0,children:(0,q.jsx)(I8,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",disabled:n,title:"Text Color",children:(0,q.jsx)(C_,{className:"h-3 w-3"})})}),(0,q.jsx)(irt,{className:"w-auto p-0",children:(0,q.jsx)(Sur,{onColorSelect:O})})]}),(0,q.jsx)(iv,{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)(ul,{icon:(0,q.jsx)(M_,{className:"h-3 w-3"}),tooltip:"Undo (Ctrl+Z)",onClick:()=>S("undo"),disabled:n}),(0,q.jsx)(ul,{icon:(0,q.jsx)(I_,{className:"h-3 w-3"}),tooltip:"Redo (Ctrl+Shift+Z)",onClick:()=>S("redo"),disabled:n})]})]}),l&&(0,q.jsxs)(q.Fragment,{children:[!p&&(0,q.jsx)(iv,{orientation:"vertical",className:"h-6 bg-gray-300 dark:bg-zinc-600"}),(0,q.jsx)(ul,{icon:p?(0,q.jsx)(kd,{className:"h-3 w-3"}):(0,q.jsx)(p_,{className:"h-3 w-3"}),tooltip:p?"Edit Mode":"View Source Code",active:p,onClick:()=>{p?b(h):g(d),m(!p)},disabled:n})]})]})});return(0,q.jsxs)("div",{ref:u,className:Ae("border border-gray-200 dark:border-zinc-700 rounded-lg overflow-hidden focus-within:ring-2 focus-within:ring-ring focus-within:border-transparent",n&&"opacity-50 cursor-not-allowed",o),...c,children:[F,(0,q.jsxs)("div",{className:"relative",children:[p?(0,q.jsx)(Ad.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,q.jsx)("textarea",{ref:y,value:h,onChange:I=>g(I.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:n,placeholder:"HTML source code..."})}):(0,q.jsx)(Ad.div,{ref:v,contentEditable:!n,suppressContentEditableWarning:!0,className:Ae("p-4 outline-none prose prose-sm dark:prose-invert max-w-none overflow-y-auto","bg-slate-50 dark:bg-zinc-900/95","text-gray-900 dark:text-gray-100","focus:ring-0","[&_h1]:text-3xl [&_h1]:font-bold [&_h1]:mb-4","[&_h2]:text-2xl [&_h2]:font-bold [&_h2]:mb-3","[&_h3]:text-xl [&_h3]:font-bold [&_h3]:mb-2","[&_h4]:text-lg [&_h4]:font-bold [&_h4]:mb-2","[&_h5]:text-base [&_h5]:font-bold [&_h5]:mb-1","[&_h6]:text-sm [&_h6]:font-bold [&_h6]:mb-1","[&_ul]:list-disc [&_ul]:pl-6 [&_ul]:mb-4","[&_ol]:list-decimal [&_ol]:pl-6 [&_ol]:mb-4","[&_li]:mb-1","[&_blockquote]:border-l-4 [&_blockquote]:border-gray-300 [&_blockquote]:pl-4 [&_blockquote]:italic","[&_pre]:bg-gray-100 [&_pre]:dark:bg-gray-800 [&_pre]:p-4 [&_pre]:rounded [&_pre]:overflow-x-auto"),style:{minHeight:a,maxHeight:i},onInput:P,onKeyDown:N,"data-placeholder":r,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:r})]}),(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)(Iur,{content:d})})]})});Pur.displayName="SimpleEditor";var Iur=({content:e})=>{let[t,r]=(0,Bn.useState)(0);return(0,Bn.useEffect)(()=>{r((o=>{let a=document.createElement("div");return a.innerHTML=o,a.textContent||a.innerText||""})(e).length)},[e]),(0,q.jsxs)(q.Fragment,{children:[t," characters"]})},kur=Hn("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"}}),q1=ee.forwardRef(({className:e,variant:t,size:r,shape:n,animation:o,height:a,width:i,isLoaded:s=!1,children:l,fadeInDuration:c=400,motion:u=!1,style:d,...f},p)=>{let{onDrag:m,onDragEnd:h,onDragStart:g,onAnimationStart:v,onAnimationEnd:y,onAnimationIteration:x,...w}=f;if(s&&l)return u?(0,q.jsx)(Ad.div,{ref:p,initial:{opacity:0},animate:{opacity:1},transition:{duration:c/1e3},className:Ae("moonui-theme",e),style:{height:a,width:i,...d},...w,children:l}):(0,q.jsx)("div",{ref:p,className:Ae("moonui-theme","animate-fade-in",e),style:{animationDuration:`${c}ms`,height:a,width:i,...d},...f,children:l});let b=u?Ad.div:"div";return(0,q.jsx)(b,{ref:p,className:Ae("moonui-theme",kur({variant:t,size:r,shape:n,animation:o}),"relative isolate",e),style:{height:a,width:i,...d},...u?ssr:{},...w})});q1.displayName="Skeleton";var Krt=ee.forwardRef(({className:e,lines:t=3,lineHeight:r="0.85rem",spacing:n="0.5rem",lastLineWidth:o=80,randomWidths:a=!1,variant:i="default",animation:s="pulse",...l},c)=>(0,q.jsx)("div",{ref:c,className:Ae("moonui-theme","flex flex-col",e),style:{gap:n},...l,children:Array.from({length:t}).map((u,d)=>{let p=d===t-1?o:a?85+d%3*5:100;return(0,q.jsx)(q1,{variant:i,animation:s,className:"w-full",style:{height:r,width:`${p}%`}},d)})}));Krt.displayName="SkeletonText";var Xrt=ee.forwardRef(({className:e,size:t="2.5rem",variant:r="default",animation:n="pulse",...o},a)=>(0,q.jsx)(q1,{ref:a,variant:r,animation:n,shape:"circle",className:Ae("moonui-theme","shrink-0",e),style:{height:t,width:t},...o}));Xrt.displayName="SkeletonAvatar";var Rur=ee.forwardRef(({className:e,showHeader:t=!0,contentLines:r=3,showFooter:n=!0,variant:o="default",animation:a="pulse",...i},s)=>(0,q.jsxs)("div",{ref:s,className:Ae("overflow-hidden rounded-md border border-border bg-background p-4",e),...i,children:[t&&(0,q.jsxs)("div",{className:"mb-4 flex items-center gap-4",children:[(0,q.jsx)(Xrt,{size:"2.5rem",variant:o,animation:a}),(0,q.jsxs)("div",{className:"flex-1",children:[(0,q.jsx)(q1,{variant:o,animation:a,className:"mb-2 h-4 w-1/3"}),(0,q.jsx)(q1,{variant:o,animation:a,className:"h-3 w-1/4"})]})]}),(0,q.jsx)(Krt,{lines:r,variant:o,animation:a,className:"mb-4"}),n&&(0,q.jsxs)("div",{className:"flex items-center justify-between mt-4 pt-4 border-t border-border",children:[(0,q.jsx)(q1,{variant:o,animation:a,className:"h-4 w-1/4"}),(0,q.jsx)(q1,{variant:o,animation:a,className:"h-4 w-1/5"})]})]}));Rur.displayName="SkeletonCard";var Nur=ee.forwardRef(({className:e,children:t,onSwipeLeft:r,onSwipeRight:n,threshold:o=100,disabled:a=!1,...i},s)=>{let[l,c]=ee.useState(0),[u,d]=ee.useState(0),[f,p]=ee.useState(!1),m=v=>{a||(c(v.touches[0].clientX),p(!0))},h=v=>{a||!f||d(v.touches[0].clientX)},g=()=>{if(a||!f)return;let v=u-l;Math.abs(v)>o&&(v>0&&n?n():v<0&&r&&r()),p(!1),d(0),c(0)};return(0,q.jsx)("div",{ref:s,className:Ae("touch-pan-y select-none transition-transform duration-200",f&&"cursor-grabbing",e),onTouchStart:m,onTouchMove:h,onTouchEnd:g,...i,children:t})});Nur.displayName="SwipeableCard";var Mur=ee.forwardRef(({className:e,size:t="md",variant:r="primary",loading:n,leftIcon:o,rightIcon:a,description:i,...s},l)=>(0,q.jsxs)("div",{className:"moonui-theme inline-flex items-center gap-2",children:[o&&(0,q.jsx)("span",{className:"text-muted-foreground",children:o}),(0,q.jsxs)(wde,{className:Ae("peer relative inline-flex shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 dark:data-[state=unchecked]:bg-gray-700/70 dark:focus-visible:ring-primary/40 dark:focus-visible:ring-offset-gray-950",t==="sm"&&"h-4 w-8",t==="md"&&"h-6 w-11",t==="lg"&&"h-7 w-14",r==="primary"&&"data-[state=checked]:bg-primary",r==="success"&&"data-[state=checked]:bg-success",r==="warning"&&"data-[state=checked]:bg-warning",r==="danger"&&"data-[state=checked]:bg-error",r==="secondary"&&"data-[state=checked]:bg-accent","data-[state=unchecked]:bg-input",n&&"opacity-80 cursor-wait",e),disabled:n||s.disabled,...s,ref:l,children:[n?(0,q.jsx)("div",{className:"absolute inset-0 flex items-center justify-center",children:(0,q.jsx)("div",{className:"h-3 w-3 animate-spin rounded-full border-2 border-gray-300 border-t-primary"})}):null,(0,q.jsx)(Ptt,{className:Ae("pointer-events-none block rounded-full bg-background shadow-lg ring-0 transition-transform",t==="sm"&&"h-3 w-3 data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0",t==="md"&&"h-5 w-5 data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0",t==="lg"&&"h-6 w-6 data-[state=checked]:translate-x-7 data-[state=unchecked]:translate-x-0")})]}),a&&(0,q.jsx)("span",{className:"text-muted-foreground",children:a}),i&&(0,q.jsx)("span",{className:"text-sm text-muted-foreground",children:i})]}));Mur.displayName=wde.displayName;var Tur=ee.forwardRef(({value:e=[],onChange:t,maxTags:r,variant:n="primary",allowDuplicates:o=!1,delimiter:a=",",placeholder:i="Add tag and press Enter",className:s,disabled:l,...c},u)=>{let[d,f]=ee.useState(""),[p,m]=ee.useState(""),h=y=>{y.key==="Enter"||y.key===a?(y.preventDefault(),g()):y.key==="Backspace"&&d===""&&e.length>0&&v(e.length-1)},g=()=>{let y=d.trim();if(y){if(!o&&e.includes(y)){m("This tag already exists"),setTimeout(()=>m(""),2e3);return}if(r&&e.length>=r){m(`Maximum ${r} tags allowed`),setTimeout(()=>m(""),2e3);return}t([...e,y]),f(""),m("")}},v=y=>{l||t(e.filter((x,w)=>w!==y))};return(0,q.jsxs)("div",{className:"relative",children:[(0,q.jsxs)("div",{className:Ae("flex min-h-[2.5rem] w-full flex-wrap gap-2 rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background","dark:bg-zinc-950/50 dark:border-zinc-800","focus-within:outline-none focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2",l&&"cursor-not-allowed opacity-50",s),children:[e.map((y,x)=>(0,q.jsxs)(C8,{variant:n,className:"gap-1 pr-1.5",children:[(0,q.jsx)("span",{className:"text-xs",children:y}),!l&&(0,q.jsx)("button",{type:"button",onClick:()=>v(x),className:"ml-1 rounded-full outline-none ring-offset-background focus:ring-2 focus:ring-ring focus:ring-offset-2",children:(0,q.jsx)(Yy,{className:"h-3 w-3 text-muted-foreground hover:text-foreground transition-colors"})})]},x)),(0,q.jsx)("input",{ref:u,type:"text",value:d,onChange:y=>f(y.target.value),onKeyDown:h,onBlur:g,disabled:l,placeholder:e.length===0?i:"",className:Ae("flex-1 bg-transparent outline-none placeholder:text-muted-foreground","dark:placeholder:text-zinc-500","min-w-[120px]",l&&"cursor-not-allowed"),...c})]}),p&&(0,q.jsx)("p",{className:"mt-1 text-xs text-destructive",children:p})]})});Tur.displayName="TagsInput";var Aur=ee.forwardRef(({className:e,variant:t,size:r,error:n,success:o,loading:a,autoResize:i,maxHeight:s,characterCount:l,...c},u)=>(0,q.jsx)("textarea",{className:Ae("moonui-theme","flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:u,...c}));Aur.displayName="Textarea";var Lur=ee.forwardRef(({className:e,...t},r)=>(0,q.jsx)(Mde,{ref:r,className:Ae("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}));Lur.displayName=Mde.displayName;var Eur=Hn("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"}}),Dur=ee.forwardRef(({className:e,variant:t,...r},n)=>(0,q.jsx)(Tde,{ref:n,className:Ae("moonui-theme",Eur({variant:t}),e),...r}));Dur.displayName=Tde.displayName;var Our=ee.forwardRef(({className:e,...t},r)=>(0,q.jsx)(Ede,{ref:r,className:Ae("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}));Our.displayName=Ede.displayName;var _ur=ee.forwardRef(({className:e,...t},r)=>(0,q.jsx)(Dde,{ref:r,className:Ae("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,q.jsx)(Yy,{className:"h-4 w-4"})}));_ur.displayName=Dde.displayName;var Fur=ee.forwardRef(({className:e,...t},r)=>(0,q.jsx)(Ade,{ref:r,className:Ae("moonui-theme","text-sm font-semibold [&+div]:text-xs",e),...t}));Fur.displayName=Ade.displayName;var Bur=ee.forwardRef(({className:e,...t},r)=>(0,q.jsx)(Lde,{ref:r,className:Ae("moonui-theme","text-sm opacity-90",e),...t}));Bur.displayName=Lde.displayName;var qc=D(fe(),1),T8=xt("relative inline-flex shrink-0 overflow-hidden font-semibold transition-all",{variants:{size:{xs:"h-6 w-6 text-xs",sm:"h-8 w-8 text-xs",md:"h-10 w-10 text-sm",lg:"h-12 w-12 text-base",xl:"h-14 w-14 text-lg","2xl":"h-16 w-16 text-xl","3xl":"h-20 w-20 text-2xl"},shape:{circle:"rounded-full",square:"rounded-md",hexagon:"mask mask-hexagon"},ring:{none:"",default:"ring-2 ring-offset-2 ring-offset-background",gradient:"ring-2 ring-offset-2 ring-offset-background",glow:"ring-2 ring-offset-2 ring-offset-background shadow-lg"}},defaultVariants:{size:"md",shape:"circle",ring:"none"}}),ofe=xt("absolute rounded-full border-2 border-background",{variants:{size:{xs:"h-2 w-2",sm:"h-2.5 w-2.5",md:"h-3 w-3",lg:"h-3.5 w-3.5",xl:"h-4 w-4","2xl":"h-5 w-5","3xl":"h-6 w-6"},position:{"bottom-right":"bottom-0 right-0","bottom-left":"bottom-0 left-0","top-right":"top-0 right-0","top-left":"top-0 left-0"},status:{online:"bg-green-500",offline:"bg-gray-400",busy:"bg-red-500",away:"bg-yellow-500",focus:"bg-purple-500"}},defaultVariants:{size:"md",position:"bottom-right",status:"offline"}}),afe=xt("absolute flex items-center justify-center rounded-full font-bold text-white",{variants:{size:{xs:"h-3 w-3 text-[8px]",sm:"h-3.5 w-3.5 text-[9px]",md:"h-4 w-4 text-[10px]",lg:"h-5 w-5 text-[11px]",xl:"h-6 w-6 text-xs","2xl":"h-7 w-7 text-sm","3xl":"h-8 w-8 text-base"},position:{"top-right":"-top-1 -right-1","top-left":"-top-1 -left-1","bottom-right":"-bottom-1 -right-1","bottom-left":"-bottom-1 -left-1"},variant:{default:"bg-primary",destructive:"bg-destructive",success:"bg-green-500",warning:"bg-yellow-500",info:"bg-blue-500",pro:"bg-gradient-to-r from-purple-500 to-pink-500",lifetime:"bg-gradient-to-r from-yellow-400 to-amber-500"}},defaultVariants:{size:"md",position:"top-right",variant:"default"}}),Vur={crown:_w,sparkles:bt,star:vs,heart:Vw,shield:YA,award:aA,gem:xA,flame:yA,zap:es},A8=Dd.forwardRef(({className:e,size:t,shape:r,ring:n,src:o,alt:a,fallback:i,delayMs:s,status:l,statusPosition:c="bottom-right",badge:u,ringColor:d,gradientFrom:f,gradientTo:p,animate:m=!1,animationType:h="pulse",onStatusClick:g,loading:v=!1,error:y=!1,...x},w)=>{let b={pulse:"animate-pulse",bounce:"animate-bounce",spin:"animate-spin",ping:"animate-ping"},C=Dd.useMemo(()=>n==="gradient"&&f&&p?{background:`linear-gradient(135deg, ${f}, ${p})`,padding:"2px"}:d?{boxShadow:`0 0 0 2px ${d}`}:{},[n,d,f,p]),S=u?.icon?Vur[u.icon]:null;return(0,qc.jsxs)("div",{className:"relative inline-block",children:[n==="gradient"&&(0,qc.jsx)("div",{className:"absolute -inset-[2px] rounded-full",style:{background:`linear-gradient(135deg, ${f||"#8b5cf6"}, ${p||"#ec4899"})`}}),(0,qc.jsxs)(fL,{ref:w,className:Ae(T8({size:t,shape:r,ring:n}),m&&b[h],n==="gradient"&&"relative",e),style:n!=="gradient"?C:void 0,...x,children:[(0,qc.jsx)(pL,{src:o,alt:a,className:"aspect-square h-full w-full object-cover"}),(0,qc.jsx)(mL,{className:Ae("flex h-full w-full items-center justify-center bg-muted",v&&"animate-pulse",y&&"bg-destructive/10 text-destructive"),delayMs:s,children:v?(0,qc.jsx)("div",{className:"h-1/2 w-1/2 rounded-full bg-muted-foreground/20 animate-pulse"}):y?(0,qc.jsx)(lo,{className:"h-1/2 w-1/2"}):i})]}),l&&!v&&(0,qc.jsx)("button",{className:Ae(ofe({size:t,position:c,status:l}),g&&"cursor-pointer hover:scale-110 transition-transform",l==="online"&&"animate-pulse"),onClick:g,"aria-label":`Status: ${l}`}),u&&!v&&(0,qc.jsx)("div",{className:Ae(afe({size:t,position:u.position,variant:u.variant}),"shadow-sm"),children:S?(0,qc.jsx)(S,{className:"h-full w-full p-0.5"}):u.content})]})});A8.displayName="MoonUIAvatarPro";var ife=Dd.forwardRef(({children:e,max:t=4,size:r="md",spacing:n="normal",className:o},a)=>{let i=Dd.Children.toArray(e),s=i.slice(0,t),l=i.length-t;return(0,qc.jsxs)("div",{ref:a,className:Ae("flex items-center",{tight:"-space-x-3",normal:"-space-x-2",loose:"-space-x-1"}[n],o),children:[s.map((u,d)=>(0,qc.jsx)("div",{className:"relative ring-2 ring-background rounded-full",style:{zIndex:s.length-d},children:u},d)),l>0&&(0,qc.jsxs)("div",{className:Ae(T8({size:r,shape:"circle"}),"relative flex items-center justify-center bg-muted ring-2 ring-background","text-muted-foreground font-medium"),style:{zIndex:0},children:["+",l]})]})});ife.displayName="MoonUIAvatarGroupPro";var sfe=Dd.forwardRef(({userId:e,fetchUser:t,...r},n)=>{let[o,a]=Dd.useState(null),[i,s]=Dd.useState(!1),[l,c]=Dd.useState(!1);return Dd.useEffect(()=>{e&&t&&(s(!0),c(!1),t(e).then(a).catch(()=>c(!0)).finally(()=>s(!1)))},[e,t]),(0,qc.jsx)(A8,{ref:n,src:o?.image||r.src,fallback:o?.name?.[0]||r.fallback,loading:i,error:l,...r})});sfe.displayName="MoonUIAsyncAvatarPro";var dl=D(fe(),1);function _u({title:e,subtitle:t,children:r,variant:n="default",backgroundVariant:o,colorScheme:a="blue",className:i,headerAction:s,loading:l=!1,error:c=null,animate:u=!0,rounded:d="lg",shadow:f="sm",gradientDirection:p="to-br",overlay:m}){let h=o||n,g={blue:"from-blue-500/10 via-blue-500/5 to-transparent border-blue-500/20 dark:from-blue-400/10 dark:via-blue-400/5 dark:border-blue-400/20",green:"from-green-500/10 via-green-500/5 to-transparent border-green-500/20 dark:from-green-400/10 dark:via-green-400/5 dark:border-green-400/20",purple:"from-purple-500/10 via-purple-500/5 to-transparent border-purple-500/20 dark:from-purple-400/10 dark:via-purple-400/5 dark:border-purple-400/20",orange:"from-orange-500/10 via-orange-500/5 to-transparent border-orange-500/20 dark:from-orange-400/10 dark:via-orange-400/5 dark:border-orange-400/20",pink:"from-pink-500/10 via-pink-500/5 to-transparent border-pink-500/20 dark:from-pink-400/10 dark:via-pink-400/5 dark:border-pink-400/20",cyan:"from-cyan-500/10 via-cyan-500/5 to-transparent border-cyan-500/20 dark:from-cyan-400/10 dark:via-cyan-400/5 dark:border-cyan-400/20",neutral:"from-gray-500/10 via-gray-500/5 to-transparent border-gray-500/20 dark:from-gray-400/10 dark:via-gray-400/5 dark:border-gray-400/20"},v={blue:"from-blue-500/20 via-blue-500/10 to-transparent border-blue-500/30 dark:from-blue-400/20 dark:via-blue-400/10 dark:border-blue-400/30",green:"from-green-500/20 via-green-500/10 to-transparent border-green-500/30 dark:from-green-400/20 dark:via-green-400/10 dark:border-green-400/30",purple:"from-purple-500/20 via-purple-500/10 to-transparent border-purple-500/30 dark:from-purple-400/20 dark:via-purple-400/10 dark:border-purple-400/30",orange:"from-orange-500/20 via-orange-500/10 to-transparent border-orange-500/30 dark:from-orange-400/20 dark:via-orange-400/10 dark:border-orange-400/30",pink:"from-pink-500/20 via-pink-500/10 to-transparent border-pink-500/30 dark:from-pink-400/20 dark:via-pink-400/10 dark:border-pink-400/30",cyan:"from-cyan-500/20 via-cyan-500/10 to-transparent border-cyan-500/30 dark:from-cyan-400/20 dark:via-cyan-400/10 dark:border-cyan-400/30",neutral:"from-gray-500/20 via-gray-500/10 to-transparent border-gray-500/30 dark:from-gray-400/20 dark:via-gray-400/10 dark:border-gray-400/30"},y={none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl",full:"rounded-full"},x={none:"shadow-none",sm:"shadow-sm",md:"shadow-md",lg:"shadow-lg",xl:"shadow-xl","2xl":"shadow-2xl"},w={dots:"radial-gradient(circle at 1px 1px, currentColor 1px, transparent 0)",grid:"linear-gradient(currentColor 1px, transparent 1px), linear-gradient(90deg, currentColor 1px, transparent 1px)",diagonal:"repeating-linear-gradient(45deg, transparent, transparent 2px, currentColor 2px, currentColor 4px)",waves:"radial-gradient(ellipse at center, transparent 20%, currentColor 21%, currentColor 25%, transparent 26%)",none:"none"},b={"to-t":"bg-gradient-to-t","to-tr":"bg-gradient-to-tr","to-r":"bg-gradient-to-r","to-br":"bg-gradient-to-br","to-b":"bg-gradient-to-b","to-bl":"bg-gradient-to-bl","to-l":"bg-gradient-to-l","to-tl":"bg-gradient-to-tl"},C={"to-t":{backgroundImage:"linear-gradient(to top, var(--tw-gradient-stops))"},"to-tr":{backgroundImage:"linear-gradient(to top right, var(--tw-gradient-stops))"},"to-r":{backgroundImage:"linear-gradient(to right, var(--tw-gradient-stops))"},"to-br":{backgroundImage:"linear-gradient(to bottom right, var(--tw-gradient-stops))"},"to-b":{backgroundImage:"linear-gradient(to bottom, var(--tw-gradient-stops))"},"to-bl":{backgroundImage:"linear-gradient(to bottom left, var(--tw-gradient-stops))"},"to-l":{backgroundImage:"linear-gradient(to left, var(--tw-gradient-stops))"},"to-tl":{backgroundImage:"linear-gradient(to top left, var(--tw-gradient-stops))"}},S={default:"bg-card border",minimal:"border-0 shadow-none bg-card/50",glass:"bg-background/60 backdrop-blur-md border-white/10",bordered:"border-2 bg-card",gradient:`${b[p]} ${g[a]}`,colored:`${b[p]} ${v[a]} border-2`,overlay:"bg-card border relative overflow-hidden",floating:"bg-card border-0 shadow-2xl hover:shadow-3xl transform hover:-translate-y-1 transition-all duration-300 ring-1 ring-gray-200/50 dark:ring-gray-700/50"},P=(0,dl.jsxs)(Ve,{className:B(S[h],y[d],x[f],"transition-all duration-200 relative",i),style:h==="gradient"||h==="colored"?C[p]:void 0,children:[(h==="overlay"||m)&&m?.pattern&&m.pattern!=="none"&&(0,dl.jsx)("div",{className:"absolute inset-0 pointer-events-none",style:{backgroundImage:w[m.pattern],backgroundSize:m.pattern==="dots"?"8px 8px":m.pattern==="grid"?"20px 20px":m.pattern==="diagonal"?"8px 8px":m.pattern==="waves"?"60px 60px":"auto",opacity:m.opacity||.1,color:m.color||"currentColor"}}),(e||t||s)&&(0,dl.jsxs)(vr,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[(0,dl.jsxs)("div",{children:[e&&(0,dl.jsx)(Dr,{className:"text-base font-semibold",children:e}),t&&(0,dl.jsx)("p",{className:"text-sm text-muted-foreground mt-1",children:t})]}),s&&(0,dl.jsx)("div",{className:"ml-4",children:s})]}),(0,dl.jsx)(ze,{className:B(e||t||s?"pt-0":"pt-6"),children:l?(0,dl.jsx)("div",{className:"flex items-center justify-center py-8",children:(0,dl.jsxs)("div",{className:"animate-pulse space-y-2",children:[(0,dl.jsx)("div",{className:"h-4 bg-muted rounded w-24 mx-auto"}),(0,dl.jsx)("div",{className:"h-8 bg-muted rounded w-16 mx-auto"})]})}):c?(0,dl.jsx)("div",{className:"flex items-center justify-center py-8 text-center",children:(0,dl.jsxs)("div",{className:"text-destructive",children:[(0,dl.jsx)("p",{className:"text-sm font-medium",children:"Error"}),(0,dl.jsx)("p",{className:"text-xs text-muted-foreground mt-1",children:c})]})}):r})]});return u?(0,dl.jsx)(oe.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3,ease:"easeOut"},children:P}):P}var Er=D(fe(),1);function lfe({data:e,title:t,variant:r="default",backgroundVariant:n,gradientDirection:o,orientation:a="horizontal",showTrend:i=!0,showTarget:s=!0,showChange:l=!0,animate:c=!0,icon:u,onKPIClick:d,...f}){let p=Array.isArray(e)?e:[e],m=(y,x)=>{if(typeof y=="string")return y;let w;return y%1!==0?w=(Math.round(y*100)/100).toString():w=y.toString(),x?`${w}${x}`:w},h=y=>{switch(y){case"success":return"text-green-600 dark:text-green-400";case"warning":return"text-yellow-600 dark:text-yellow-400";case"danger":return"text-red-600 dark:text-red-400";case"info":return"text-blue-600 dark:text-blue-400";default:return"text-foreground"}},g=y=>{if(!y||y.length<2)return null;let x=Math.max(...y),w=Math.min(...y),b=x-w||1;return(0,Er.jsx)("div",{className:"flex items-end gap-0.5 h-8 w-16",children:y.map((C,S)=>(0,Er.jsx)(oe.div,{className:"flex-1 bg-primary/60 rounded-t-sm min-h-[2px]",initial:{height:0},animate:{height:`${Math.max((C-w)/b*100,10)}%`},transition:{delay:S*.05,duration:c?.3:0}},S))})},v=(y,x)=>{let w=y.target&&typeof y.value=="number"?y.value/y.target.value*100:0;return(0,Er.jsxs)(oe.div,{className:B("space-y-2",d&&"cursor-pointer hover:bg-muted/30 p-2 -m-2 rounded-lg transition-colors"),onClick:()=>d?.(y),initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:x*.1,duration:c?.3:0},children:[(r==="default"||r==="detailed")&&(0,Er.jsxs)("div",{className:B("flex items-center",a==="vertical"?"flex-col space-y-2":"justify-between"),children:[(0,Er.jsxs)("div",{className:B("flex items-center gap-2",a==="vertical"?"flex-col text-center":""),children:[y.icon&&(0,Er.jsx)("div",{className:"text-muted-foreground",children:y.icon}),(0,Er.jsxs)("div",{className:a==="vertical"?"text-center":"",children:[(0,Er.jsx)("p",{className:"text-sm text-muted-foreground font-medium",children:y.label}),y.description&&(0,Er.jsx)("p",{className:"text-xs text-muted-foreground/70",children:y.description})]})]}),(0,Er.jsxs)("div",{className:B("flex items-center gap-3",a==="vertical"?"flex-col":""),children:[(0,Er.jsx)("div",{className:B("text-right",a==="vertical"?"text-center":""),children:(0,Er.jsx)("p",{className:B("text-2xl font-bold tracking-tight",h(y.status)),children:m(y.value,y.unit)})}),l&&y.change&&(0,Er.jsxs)("div",{className:B("flex items-center gap-1",y.change.type==="increase"?"text-green-600":y.change.type==="decrease"?"text-red-600":"text-gray-600"),children:[y.change.type==="increase"?(0,Er.jsx)(va,{className:"h-4 w-4"}):y.change.type==="decrease"?(0,Er.jsx)(vc,{className:"h-4 w-4"}):(0,Er.jsx)(eu,{className:"h-4 w-4"}),(0,Er.jsxs)("span",{className:"text-sm font-medium",children:[y.change.type!=="neutral"&&(y.change.type==="increase"?"+":"-"),Math.abs(y.change.value),"%"]})]}),i&&y.trend&&g(y.trend)]})]}),r==="card"&&(0,Er.jsxs)("div",{className:"space-y-3",children:[(0,Er.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Er.jsxs)("div",{children:[(0,Er.jsx)("p",{className:"text-sm text-muted-foreground",children:y.label}),(0,Er.jsx)("p",{className:"text-3xl font-bold tracking-tight",children:m(y.value,y.unit)})]}),u&&(0,Er.jsx)("div",{className:"flex-shrink-0 p-3 rounded-xl bg-primary/10",children:u})]}),l&&y.change&&(0,Er.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Er.jsxs)(dt,{variant:y.change.type==="increase"?"success":y.change.type==="decrease"?"destructive":"secondary",leftIcon:y.change.type==="increase"?(0,Er.jsx)(Qc,{className:"h-3 w-3"}):y.change.type==="decrease"?(0,Er.jsx)(gc,{className:"h-3 w-3"}):(0,Er.jsx)(eu,{className:"h-3 w-3"}),className:"text-xs",children:[y.change.type!=="neutral"&&(y.change.type==="increase"?"+":"-"),Math.abs(y.change.value),"%"]}),y.change.period&&(0,Er.jsxs)("span",{className:"text-xs text-muted-foreground",children:["vs ",y.change.period]})]})]}),r==="compact"&&(0,Er.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Er.jsxs)("div",{className:"flex items-center gap-2",children:[y.icon&&(0,Er.jsx)("div",{className:"text-muted-foreground text-sm",children:y.icon}),(0,Er.jsx)("span",{className:"text-sm font-medium",children:y.label})]}),(0,Er.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Er.jsx)("span",{className:"font-bold",children:m(y.value,y.unit)}),l&&y.change&&(0,Er.jsxs)(dt,{variant:"outline",className:"text-xs",leftIcon:y.change.type==="increase"?(0,Er.jsx)(Qc,{className:"h-3 w-3"}):y.change.type==="decrease"?(0,Er.jsx)(gc,{className:"h-3 w-3"}):(0,Er.jsx)(eu,{className:"h-3 w-3"}),children:[y.change.type!=="neutral"&&(y.change.type==="increase"?"+":"-"),Math.abs(y.change.value),"%"]})]})]}),r==="detailed"&&s&&y.target&&(0,Er.jsxs)("div",{className:"space-y-2",children:[(0,Er.jsxs)("div",{className:"flex justify-between text-sm",children:[(0,Er.jsx)("span",{className:"text-muted-foreground",children:y.target.label||"Target"}),(0,Er.jsxs)("span",{className:"font-medium",children:[w.toFixed(1),"% of ",m(y.target.value,y.unit)]})]}),(0,Er.jsx)(Mo,{value:w,className:"h-2"})]})]},x)};return(0,Er.jsx)(_u,{title:t,variant:n,gradientDirection:o,...f,children:(0,Er.jsx)("div",{className:B("space-y-4",r==="compact"&&"space-y-2"),children:p.map((y,x)=>v(y,x))})})}var cfe=D(ue(),1);var Qt=D(fe(),1);function ufe({data:e,title:t,type:r="line",variant:n="default",backgroundVariant:o,gradientDirection:a,height:i=300,showLegend:s=!0,showGrid:l=!0,showTooltip:c=!0,showDataLabels:u=!1,animate:d=!0,colors:f,onDataPointClick:p,...m}){let[h,g]=cfe.default.useState(null),y=f||["#3b82f6","#10b981","#f59e0b","#ef4444","#8b5cf6","#ec4899","#14b8a6","#f97316","#06b6d4","#a855f7"],x=cfe.default.useMemo(()=>e.values?Math.max(...e.values):e.series?Math.max(...e.series.flatMap(T=>T.data.map(A=>A.value))):100,[e]),w=T=>T%1!==0?(Math.round(T*100)/100).toString():T.toString(),b=()=>{let T=e.values||[],A=e.labels||e.categories||[];return(0,Qt.jsxs)("div",{className:"relative h-full overflow-hidden",children:[(0,Qt.jsx)("div",{className:"absolute inset-0 flex items-end justify-between gap-1 pl-10 pr-2 pb-6",children:T.map((M,O)=>{let F=M/x*100,I=h===O;return(0,Qt.jsxs)(oe.div,{className:"relative flex flex-col items-center justify-end min-w-0",style:{height:"calc(100% - 24px)",flex:"1 1 0"},onMouseEnter:()=>g(O),onMouseLeave:()=>g(null),initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:O*.05},children:[u&&(0,Qt.jsx)(oe.span,{className:"absolute text-xs font-medium text-white mix-blend-difference",style:{bottom:`calc(${F}% / 2)`,left:"50%",transform:"translateX(-50%)"},initial:{opacity:0},animate:{opacity:1},transition:{delay:O*.1+.6},children:w(M)}),(0,Qt.jsx)("div",{className:"relative h-full w-full flex flex-col justify-end",children:(0,Qt.jsx)(oe.div,{className:B("w-full rounded-t cursor-pointer transition-all duration-200","shadow-lg",I&&"brightness-110 scale-y-105"),style:{background:`linear-gradient(to top, ${y[O%y.length]}, ${y[O%y.length]}dd)`,minHeight:"2px",boxShadow:I?`0 4px 20px ${y[O%y.length]}40`:"none"},initial:{height:0},animate:{height:`${F}%`},transition:{duration:d?.6:0,delay:O*.1,ease:"easeOut"},onClick:()=>p?.({label:A[O],value:M})})})]},O)})}),h!==null&&(()=>{let M=85/T.length,O=10+h*M+M/2;return(0,Qt.jsxs)(oe.div,{className:"absolute bg-background border-2 rounded-lg px-3 py-2 text-xs pointer-events-none shadow-xl",style:{left:`${O}%`,top:"50%",transform:"translate(-50%, -50%)",zIndex:100},initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{duration:.15},children:[(0,Qt.jsx)("div",{className:"font-medium text-foreground",children:A[h]||`Item ${h+1}`}),(0,Qt.jsx)("div",{className:"text-primary font-bold text-sm mt-0.5",children:w(T[h])})]})})(),(0,Qt.jsx)("div",{className:"absolute bottom-0 left-10 right-0 flex justify-between gap-1 pr-2 h-6",children:A.map((M,O)=>(0,Qt.jsx)("div",{className:"flex-1 flex justify-center",children:(0,Qt.jsx)("span",{className:"text-xs text-muted-foreground truncate",children:M})},O))}),l&&(0,Qt.jsxs)("div",{className:"absolute inset-0 pb-6 pointer-events-none",children:[[0,25,50,75,100].map(M=>(0,Qt.jsx)("div",{className:"absolute left-10 right-0 border-b border-muted/20",style:{bottom:`calc(24px + ${M}% * (100% - 24px) / 100)`}},M)),(0,Qt.jsxs)("div",{className:"absolute left-0 top-0 bottom-6 w-9 flex flex-col justify-between text-xs text-muted-foreground pr-1",children:[(0,Qt.jsx)("span",{className:"text-right",children:w(x)}),(0,Qt.jsx)("span",{className:"text-right",children:w(x*.75)}),(0,Qt.jsx)("span",{className:"text-right",children:w(x*.5)}),(0,Qt.jsx)("span",{className:"text-right",children:w(x*.25)}),(0,Qt.jsx)("span",{className:"text-right",children:"0"})]})]})]})},C=()=>{let T=e.values||[],A=e.labels||e.categories||[];if(T.length<2)return null;let M=5,O=100-M*2,F=100-M*2,I=T.map((R,E)=>{let _=M+E/(T.length-1)*O,U=M+(F-R/x*F);return{x:_,y:U,value:R,label:A[E]}}),k=I.map((R,E)=>`${E===0?"M":"L"} ${R.x} ${R.y}`).join(" ");return(0,Qt.jsxs)("div",{className:"relative h-full overflow-hidden",children:[(0,Qt.jsxs)("svg",{className:"w-full h-full",viewBox:"0 0 100 100",preserveAspectRatio:"none",children:[(0,Qt.jsxs)("defs",{children:[(0,Qt.jsxs)("linearGradient",{id:"chartLineGradient",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[(0,Qt.jsx)("stop",{offset:"0%",stopColor:y[0],stopOpacity:"1"}),(0,Qt.jsx)("stop",{offset:"50%",stopColor:y[1]||y[0],stopOpacity:"1"}),(0,Qt.jsx)("stop",{offset:"100%",stopColor:y[2]||y[0],stopOpacity:"1"})]}),(0,Qt.jsxs)("linearGradient",{id:"chartAreaGradient",x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[(0,Qt.jsx)("stop",{offset:"0%",stopColor:y[0],stopOpacity:"0.3"}),(0,Qt.jsx)("stop",{offset:"50%",stopColor:y[0],stopOpacity:"0.15"}),(0,Qt.jsx)("stop",{offset:"100%",stopColor:y[0],stopOpacity:"0.05"})]})]}),l&&(0,Qt.jsx)("g",{className:"opacity-10",children:[25,50,75].map(R=>{let E=5+R/100*90;return(0,Qt.jsx)("line",{x1:"0",y1:E,x2:"100",y2:E,stroke:"currentColor",strokeWidth:"0.3"},R)})}),(0,Qt.jsx)(oe.path,{d:k,fill:"none",stroke:"url(#chartLineGradient)",strokeWidth:"0.8",strokeLinecap:"round",strokeLinejoin:"round",initial:{pathLength:0},animate:{pathLength:1},transition:{duration:d?1:0}}),r==="area"&&(0,Qt.jsx)(oe.path,{d:`${k} L 90 90 L 10 90 Z`,fill:"url(#chartAreaGradient)",initial:{opacity:0},animate:{opacity:1},transition:{duration:d?.5:0,delay:.5}}),I.map((R,E)=>(0,Qt.jsx)(oe.circle,{cx:R.x,cy:R.y,r:"0.8",fill:y[0],stroke:"white",strokeWidth:"0.3",initial:{r:0,opacity:0},animate:{r:h===E?1.2:.8,opacity:1,strokeWidth:h===E?.5:.3},onMouseEnter:()=>g(E),onMouseLeave:()=>g(null),className:"cursor-pointer",style:{shapeRendering:"geometricPrecision"},onClick:()=>p?.(R),transition:{duration:.2}},E))]}),c&&h!==null&&I[h]&&(()=>{let R=I[h],E=R.y<30;return(0,Qt.jsxs)("div",{className:"absolute bg-background border rounded px-2 py-1 text-xs pointer-events-none z-10 shadow-lg",style:{left:`${Math.min(90,Math.max(10,R.x))}%`,top:E?`${R.y}%`:`${R.y}%`,transform:E?"translate(-50%, 10px)":"translate(-50%, calc(-100% - 10px))"},children:[(0,Qt.jsx)("div",{className:"font-medium",children:R.label}),(0,Qt.jsx)("div",{children:w(R.value)})]})})()]})},S=()=>{let T=e.values||[],A=e.labels||e.categories||[],M=T.reduce((F,I)=>F+I,0),O=-90;return(0,Qt.jsxs)("div",{className:"flex items-center justify-between gap-4 h-full overflow-hidden",children:[(0,Qt.jsxs)("div",{className:"relative w-48 h-48 flex-shrink-0",children:[(0,Qt.jsxs)("svg",{className:"w-full h-full transform",viewBox:"0 0 100 100",children:[T.map((F,I)=>{let k=F/M*100,R=k/100*360,E=O,_=O+R,U=P(50,50,40,E),V=P(50,50,40,_),L=R>180?1:0,H=["M 50 50",`L ${U.x} ${U.y}`,`A 40 40 0 ${L} 1 ${V.x} ${V.y}`,"Z"].join(" ");return O=_,(0,Qt.jsx)(oe.path,{d:H,fill:y[I%y.length],initial:{scale:0},animate:{scale:h===I?1.05:1},style:{transformOrigin:"50px 50px"},transition:{duration:d?.3:0,delay:I*.05},onMouseEnter:()=>g(I),onMouseLeave:()=>g(null),className:"cursor-pointer",onClick:()=>p?.({label:A[I],value:F,percentage:k})},I)}),r==="donut"&&(0,Qt.jsx)("circle",{cx:"50",cy:"50",r:"25",fill:"var(--background)"})]}),r==="donut"&&(0,Qt.jsxs)("div",{className:"absolute inset-0 flex flex-col items-center justify-center",children:[(0,Qt.jsx)("div",{className:"text-2xl font-bold",children:M}),(0,Qt.jsx)("div",{className:"text-xs text-muted-foreground",children:"Total"})]})]}),s&&(0,Qt.jsx)("div",{className:"space-y-1 overflow-y-auto flex-1 min-w-0",children:T.map((F,I)=>{let k=(F/M*100).toFixed(1);return(0,Qt.jsxs)("div",{className:B("flex items-center gap-2 cursor-pointer",h===I&&"opacity-80"),onMouseEnter:()=>g(I),onMouseLeave:()=>g(null),children:[(0,Qt.jsx)("div",{className:"w-2 h-2 rounded flex-shrink-0",style:{backgroundColor:y[I%y.length]}}),(0,Qt.jsx)("span",{className:"text-xs truncate",children:A[I]}),(0,Qt.jsxs)("span",{className:"text-xs text-muted-foreground ml-auto",children:[k,"%"]})]},I)})})]})},P=(T,A,M,O)=>{let F=O*Math.PI/180;return{x:T+M*Math.cos(F),y:A+M*Math.sin(F)}},N=()=>{switch(r){case"bar":return b();case"line":case"area":return C();case"pie":case"donut":return S();default:return b()}};return(0,Qt.jsx)(_u,{title:t,variant:o,gradientDirection:a,...m,children:(0,Qt.jsxs)("div",{className:"space-y-4",children:[e.total!==void 0&&(0,Qt.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Qt.jsxs)("div",{children:[(0,Qt.jsx)("p",{className:"text-sm text-muted-foreground",children:"Total"}),(0,Qt.jsx)("p",{className:"text-2xl font-bold",children:w(e.total)})]}),e.change&&(0,Qt.jsxs)("div",{className:B("flex items-center gap-1",e.change.type==="increase"?"text-green-600":e.change.type==="decrease"?"text-red-600":"text-gray-600"),children:[e.change.type==="increase"?(0,Qt.jsx)(Qc,{className:"h-4 w-4"}):e.change.type==="decrease"?(0,Qt.jsx)(gc,{className:"h-4 w-4"}):null,(0,Qt.jsxs)("span",{className:"font-medium",children:[e.change.type!=="neutral"&&(e.change.type==="increase"?"+":"-"),Math.abs(e.change.value),"%"]}),e.change.period&&(0,Qt.jsxs)("span",{className:"text-xs text-muted-foreground",children:["vs ",e.change.period]})]})]}),(0,Qt.jsx)("div",{className:"overflow-hidden",style:{height:`${i}px`},children:N()})]})})}var Fr=D(fe(),1);function dfe({data:e,title:t,variant:r="radial",backgroundVariant:n,gradientDirection:o,showValue:a=!0,showTarget:i=!0,showThresholds:s=!0,showLabels:l=!0,showTrend:c=!0,showPercentage:u=!0,size:d="md",animate:f=!0,strokeWidth:p=12,onGaugeClick:m,...h}){let g=Array.isArray(e)?e:[e],y={sm:{width:120,height:120,fontSize:"text-lg",strokeWidth:8},md:{width:180,height:180,fontSize:"text-2xl",strokeWidth:12},lg:{width:240,height:240,fontSize:"text-3xl",strokeWidth:16},xl:{width:320,height:320,fontSize:"text-4xl",strokeWidth:20}}[d],x=N=>N%1!==0?(Math.round(N*100)/100).toString():N.toString(),w=N=>{let T=N.min??0,M=(N.max??100)-T;return(N.value-T)/M*100},b=(N,T)=>{if(N.thresholds&&N.thresholds.length>0){let M=[...N.thresholds].sort((O,F)=>O.value-F.value);for(let O=M.length-1;O>=0;O--)if(T>=M[O].value)return M[O].color;return M[0].color}let A={success:"#22c55e",warning:"#f59e0b",danger:"#ef4444",info:"#3b82f6",neutral:"#6b7280"};return N.status?A[N.status]:T>=75?"#22c55e":T>=50?"#f59e0b":T>=25?"#fb923c":"#ef4444"},C=(N,T)=>{let A=w(N),M=(y.width-y.strokeWidth)/2,O=2*Math.PI*M,F=O-A/100*O,I=b(N,A),k=N.target?(N.target-(N.min??0))/((N.max??100)-(N.min??0))*360:null;return(0,Fr.jsxs)(oe.div,{className:"relative flex flex-col items-center cursor-pointer",onClick:()=>m?.(N),whileHover:{scale:1.02},whileTap:{scale:.98},children:[(0,Fr.jsxs)("svg",{width:y.width,height:y.height,className:"transform -rotate-90",children:[(0,Fr.jsx)("circle",{cx:y.width/2,cy:y.height/2,r:M,fill:"none",stroke:"currentColor",strokeWidth:y.strokeWidth,className:"text-muted/20"}),s&&N.thresholds&&N.thresholds.map((R,E)=>{let _=(R.value/100*360-90)*(Math.PI/180),U=y.width/2+(M-y.strokeWidth)*Math.cos(_),V=y.height/2+(M-y.strokeWidth)*Math.sin(_),L=y.width/2+(M+y.strokeWidth)*Math.cos(_),H=y.height/2+(M+y.strokeWidth)*Math.sin(_);return(0,Fr.jsx)("line",{x1:U,y1:V,x2:L,y2:H,stroke:R.color,strokeWidth:2,opacity:.5},E)}),(0,Fr.jsx)(oe.circle,{cx:y.width/2,cy:y.height/2,r:M,fill:"none",stroke:I,strokeWidth:y.strokeWidth,strokeLinecap:"round",strokeDasharray:O,initial:{strokeDashoffset:O},animate:{strokeDashoffset:F},transition:{duration:f?1:0,ease:"easeOut"}}),i&&k!==null&&(0,Fr.jsx)("g",{transform:`rotate(${k} ${y.width/2} ${y.height/2})`,children:(0,Fr.jsx)("line",{x1:y.width/2,y1:y.strokeWidth,x2:y.width/2,y2:y.strokeWidth+10,stroke:"currentColor",strokeWidth:3,className:"text-primary"})})]}),(0,Fr.jsxs)("div",{className:"absolute inset-0 flex flex-col items-center justify-center transform rotate-0",children:[a&&(0,Fr.jsxs)(oe.div,{className:B(y.fontSize,"font-bold"),initial:{opacity:0,scale:.5},animate:{opacity:1,scale:1},transition:{delay:.3},children:[x(N.value),N.unit&&(0,Fr.jsx)("span",{className:"text-sm ml-1",children:N.unit})]}),u&&(0,Fr.jsxs)("div",{className:"text-sm text-muted-foreground",children:[x(A),"%"]}),l&&(0,Fr.jsx)("div",{className:"text-xs text-muted-foreground mt-1 text-center px-2",children:N.label}),c&&N.trend&&(0,Fr.jsxs)("div",{className:B("flex items-center gap-1 mt-2",N.trend.type==="increase"?"text-green-600":N.trend.type==="decrease"?"text-red-600":"text-gray-600"),children:[N.trend.type==="increase"?(0,Fr.jsx)(va,{className:"h-3 w-3"}):N.trend.type==="decrease"?(0,Fr.jsx)(vc,{className:"h-3 w-3"}):null,(0,Fr.jsxs)("span",{className:"text-xs font-medium",children:[x(N.trend.value),"%"]})]})]})]},T)},S=(N,T)=>{let A=w(N),M=b(N,A);return(0,Fr.jsxs)(oe.div,{className:"w-full space-y-2 cursor-pointer",onClick:()=>m?.(N),whileHover:{scale:1.01},children:[(0,Fr.jsxs)("div",{className:"flex justify-between items-center",children:[(0,Fr.jsxs)("div",{className:"flex items-center gap-2",children:[l&&(0,Fr.jsx)("span",{className:"text-sm font-medium",children:N.label}),N.status&&(0,Fr.jsx)(dt,{variant:"outline",className:"text-xs",children:N.status})]}),(0,Fr.jsxs)("div",{className:"flex items-center gap-2",children:[a&&(0,Fr.jsxs)("span",{className:B("font-bold",d==="sm"?"text-base":"text-lg"),children:[x(N.value),N.unit&&(0,Fr.jsx)("span",{className:"text-sm ml-1 text-muted-foreground",children:N.unit})]}),u&&(0,Fr.jsxs)("span",{className:"text-sm text-muted-foreground",children:["(",x(A),"%)"]})]})]}),(0,Fr.jsxs)("div",{className:"relative",children:[(0,Fr.jsx)("div",{className:B("w-full rounded-full bg-muted/30 overflow-hidden",d==="sm"?"h-2":d==="md"?"h-3":d==="lg"?"h-4":"h-5"),children:(0,Fr.jsx)(oe.div,{className:"h-full rounded-full",style:{backgroundColor:M},initial:{width:0},animate:{width:`${A}%`},transition:{duration:f?1:0,ease:"easeOut"}})}),s&&N.thresholds&&N.thresholds.map((O,F)=>(0,Fr.jsx)(Ys,{children:(0,Fr.jsxs)(ws,{children:[(0,Fr.jsx)(Cs,{asChild:!0,children:(0,Fr.jsx)("div",{className:"absolute top-1/2 -translate-y-1/2 w-0.5 h-full bg-background",style:{left:`${O.value}%`}})}),(0,Fr.jsx)(ns,{children:(0,Fr.jsx)("p",{children:O.label||`${O.value}%`})})]})},F)),i&&N.target&&(0,Fr.jsx)(Ys,{children:(0,Fr.jsxs)(ws,{children:[(0,Fr.jsx)(Cs,{asChild:!0,children:(0,Fr.jsx)("div",{className:"absolute -top-1 w-0 h-0 border-l-[6px] border-l-transparent border-r-[6px] border-r-transparent border-t-[8px] border-t-primary",style:{left:`${(N.target-(N.min??0))/((N.max??100)-(N.min??0))*100}%`,transform:"translateX(-50%)"}})}),(0,Fr.jsx)(ns,{children:(0,Fr.jsxs)("p",{children:["Target: ",x(N.target),N.unit]})})]})})]}),l&&(0,Fr.jsxs)("div",{className:"flex justify-between text-xs text-muted-foreground",children:[(0,Fr.jsx)("span",{children:N.min??0}),(0,Fr.jsx)("span",{children:N.max??100})]})]},T)},P=(N,T)=>{switch(r){case"linear":case"progress":return S(N,T);case"radial":default:return C(N,T)}};return(0,Fr.jsx)(_u,{title:t,variant:n,gradientDirection:o,...h,children:(0,Fr.jsx)("div",{className:B("flex flex-wrap items-center justify-center",r==="linear"||r==="progress"?"flex-col space-y-4":"gap-6","p-4"),children:g.map((N,T)=>P(N,T))})})}var L8=D(ue(),1);var kt=D(fe(),1);function ffe({data:e,title:t,variant:r="vertical",backgroundVariant:n,gradientDirection:o,showValues:a=!0,showPercentages:i=!0,showDropoff:s=!0,showTargets:l=!1,showDuration:c=!1,showConversionRate:u=!0,animate:d=!0,interactive:f=!0,onStageClick:p,...m}){let[h,g]=L8.default.useState(null),v=T=>T%1!==0?(Math.round(T*100)/100).toString():T.toString(),y=L8.default.useMemo(()=>{let T=Math.max(...e.stages.map(A=>A.value));return e.stages.map((A,M)=>{let O=A.percentage??A.value/T*100,F=M>0?e.stages[M-1].value:A.value,I=A.dropoff??F-A.value,k=A.dropoffPercentage??(F>0?(F-A.value)/F*100:0);return{...A,percentage:O,dropoff:I,dropoffPercentage:k}})},[e.stages]),x=(T,A)=>{if(T.color)return T.color;let M=["#3b82f6","#8b5cf6","#ec4899","#f59e0b","#10b981","#06b6d4"];return M[A%M.length]},w=(T,A)=>T.icon?T.icon:[(0,kt.jsx)(Xd,{className:"h-4 w-4"}),(0,kt.jsx)(ZA,{className:"h-4 w-4"}),(0,kt.jsx)(Sv,{className:"h-4 w-4"}),(0,kt.jsx)(Bo,{className:"h-4 w-4"})][A]||(0,kt.jsx)(ep,{className:"h-4 w-4"}),b=T=>e.currency?new Intl.NumberFormat("en-US",{style:"currency",currency:e.currency,minimumFractionDigits:0,maximumFractionDigits:0}).format(T):T>=1e6?`${v(T/1e6)}M`:T>=1e3?`${v(T/1e3)}K`:T.toLocaleString(),C=()=>(0,kt.jsx)("div",{className:"space-y-2",children:y.map((T,A)=>{let M=`${T.percentage}%`,O=x(T,A),F=w(T,A),I=h===T.id;return(0,kt.jsx)(oe.div,{className:B("relative group",f&&"cursor-pointer"),onMouseEnter:()=>g(T.id),onMouseLeave:()=>g(null),onClick:()=>f&&p?.(T),initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:A*.1},children:(0,kt.jsxs)("div",{className:"flex items-center gap-4",children:[(0,kt.jsxs)("div",{className:"flex-1",children:[(0,kt.jsxs)("div",{className:"flex items-center justify-between mb-1",children:[(0,kt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,kt.jsx)("div",{className:"p-1.5 rounded",style:{backgroundColor:`${O}20`},children:(0,kt.jsx)("div",{style:{color:O},children:F})}),(0,kt.jsx)("span",{className:"text-sm font-medium",children:T.name}),T.description&&(0,kt.jsx)(Ys,{children:(0,kt.jsxs)(ws,{children:[(0,kt.jsx)(Cs,{children:(0,kt.jsx)(Nn,{className:"h-3 w-3 text-muted-foreground"})}),(0,kt.jsx)(ns,{children:(0,kt.jsx)("p",{className:"max-w-xs",children:T.description})})]})})]}),(0,kt.jsxs)("div",{className:"flex items-center gap-2",children:[a&&(0,kt.jsx)("span",{className:"text-sm font-bold",children:b(T.value)}),i&&(0,kt.jsxs)(dt,{variant:"outline",className:"text-xs",children:[v(T.percentage),"%"]}),c&&T.duration&&(0,kt.jsx)("span",{className:"text-xs text-muted-foreground",children:T.duration})]})]}),(0,kt.jsxs)("div",{className:"relative",children:[(0,kt.jsx)("div",{className:"h-8 bg-muted/30 rounded overflow-hidden",children:(0,kt.jsx)(oe.div,{className:"h-full rounded transition-all duration-300",style:{backgroundColor:O,opacity:I?1:.8},initial:{width:0},animate:{width:M},transition:{duration:d?.5:0,delay:A*.1}})}),l&&T.target&&(0,kt.jsx)("div",{className:"absolute top-0 bottom-0 w-0.5 bg-foreground/50",style:{left:`${T.target/Math.max(...e.stages.map(k=>k.value))*100}%`},children:(0,kt.jsx)("div",{className:"absolute -top-1 -left-1 w-2 h-2 rounded-full bg-foreground/50"})})]}),A<y.length-1&&(0,kt.jsx)("div",{className:"flex justify-center mt-2 mb-1",children:(0,kt.jsx)(Gf,{className:"h-4 w-4 text-muted-foreground/50"})})]}),s&&A>0&&(0,kt.jsxs)("div",{className:"flex items-center gap-1 text-xs",children:[(0,kt.jsx)(Gf,{className:"h-3 w-3 text-red-500"}),(0,kt.jsxs)("span",{className:"text-red-500 font-medium",children:["-",v(T.dropoffPercentage),"%"]})]})]})},T.id)})}),S=()=>(0,kt.jsx)("div",{className:"flex items-center justify-between",children:y.map((T,A)=>{let M=x(T,A),O=w(T,A),F=h===T.id,I=A===y.length-1;return(0,kt.jsxs)(L8.default.Fragment,{children:[(0,kt.jsxs)(oe.div,{className:B("flex flex-col items-center gap-2 flex-1",f&&"cursor-pointer"),onMouseEnter:()=>g(T.id),onMouseLeave:()=>g(null),onClick:()=>f&&p?.(T),initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:A*.1},children:[(0,kt.jsxs)(oe.div,{className:"relative",whileHover:{scale:1.1},whileTap:{scale:.95},children:[(0,kt.jsx)("div",{className:B("w-16 h-16 rounded-full flex items-center justify-center","border-2 transition-all duration-300"),style:{borderColor:M,backgroundColor:F?`${M}20`:"transparent"},children:(0,kt.jsx)("div",{style:{color:M},children:O})}),(0,kt.jsx)("svg",{className:"absolute inset-0 -rotate-90",width:"64",height:"64",children:(0,kt.jsx)("circle",{cx:"32",cy:"32",r:"30",fill:"none",stroke:M,strokeWidth:"2",strokeDasharray:`${T.percentage*1.88} 188`,opacity:"0.3"})})]}),(0,kt.jsxs)("div",{className:"text-center",children:[(0,kt.jsx)("div",{className:"font-medium text-sm",children:T.name}),a&&(0,kt.jsx)("div",{className:"text-xs text-muted-foreground mt-1",children:b(T.value)}),i&&(0,kt.jsxs)(dt,{variant:"outline",className:"text-xs mt-1",children:[v(T.percentage),"%"]})]})]}),!I&&(0,kt.jsx)("div",{className:"flex-shrink-0 px-2",children:(0,kt.jsxs)("div",{className:"relative",children:[(0,kt.jsx)(Ow,{className:"h-5 w-5 text-muted-foreground"}),s&&(0,kt.jsxs)("div",{className:"absolute -top-6 left-1/2 -translate-x-1/2 text-xs text-red-500 whitespace-nowrap",children:["-",v(y[A+1].dropoffPercentage),"%"]})]})})]},T.id)})}),P=()=>(0,kt.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4",children:y.map((T,A)=>{let M=x(T,A),O=w(T,A),F=h===T.id;return(0,kt.jsxs)(oe.div,{className:B("relative p-4 rounded-lg border transition-all",f&&"cursor-pointer hover:shadow-lg",F&&"border-primary"),style:{borderColor:F?M:void 0},onMouseEnter:()=>g(T.id),onMouseLeave:()=>g(null),onClick:()=>f&&p?.(T),initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:A*.1},children:[(0,kt.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,kt.jsx)("div",{className:"p-2 rounded",style:{backgroundColor:`${M}20`},children:(0,kt.jsx)("div",{style:{color:M},children:O})}),A>0&&s&&(0,kt.jsxs)(dt,{variant:"destructive",className:"text-xs flex items-center gap-1",children:[(0,kt.jsx)(vc,{className:"h-3 w-3"}),v(T.dropoffPercentage),"%"]})]}),(0,kt.jsxs)("div",{className:"space-y-2",children:[(0,kt.jsx)("h4",{className:"font-semibold",children:T.name}),a&&(0,kt.jsx)("div",{className:"text-2xl font-bold",children:b(T.value)}),i&&(0,kt.jsx)(Mo,{value:T.percentage,className:"h-2"}),T.description&&(0,kt.jsx)("p",{className:"text-xs text-muted-foreground",children:T.description}),l&&T.target&&(0,kt.jsxs)("div",{className:"flex items-center justify-between text-xs",children:[(0,kt.jsx)("span",{className:"text-muted-foreground",children:"Target"}),(0,kt.jsx)("span",{className:"font-medium",children:b(T.target)})]})]})]},T.id)})}),N=()=>{switch(r){case"steps":return S();case"cards":return P();case"vertical":default:return C()}};return(0,kt.jsx)(_u,{title:t,variant:n,gradientDirection:o,...m,children:(0,kt.jsxs)("div",{className:"space-y-4",children:[u&&(0,kt.jsxs)("div",{className:"flex items-center justify-between p-3 bg-muted/30 rounded-lg",children:[(0,kt.jsxs)("div",{children:[(0,kt.jsx)("p",{className:"text-sm text-muted-foreground",children:"Overall Conversion Rate"}),(0,kt.jsx)("p",{className:"text-2xl font-bold",children:e.conversionRate?`${v(e.conversionRate)}%`:`${v(y[y.length-1].value/y[0].value*100)}%`})]}),e.comparison&&(0,kt.jsxs)("div",{className:B("flex items-center gap-1",e.comparison.type==="increase"?"text-green-600":"text-red-600"),children:[e.comparison.type==="increase"?(0,kt.jsx)(va,{className:"h-4 w-4"}):(0,kt.jsx)(vc,{className:"h-4 w-4"}),(0,kt.jsxs)("span",{className:"font-medium",children:[e.comparison.type==="increase"?"+":"-",Math.abs(e.comparison.value),"%"]}),(0,kt.jsxs)("span",{className:"text-xs text-muted-foreground",children:["vs ",e.comparison.period]})]})]}),N()]})})}var Yrt=D(ue(),1);var Ke=D(fe(),1);function pfe({data:e,title:t,variant:r="default",showStreams:n=!0,showMetrics:o=!0,showBreakdown:a=!0,showForecast:i=!0,showTimeline:s=!1,showTopProducts:l=!1,showCustomerMetrics:c=!1,animate:u=!0,onStreamClick:d,onMetricClick:f,...p}){let[m,h]=Yrt.default.useState("overview"),g=F=>F%1!==0?(Math.round(F*100)/100).toString():F.toString(),y=(F=>{switch(F){case"EUR":return"\u20AC";case"GBP":return"\xA3";case"USD":default:return"$"}})(e.currency),x=F=>{switch(F){case"EUR":return(0,Ke.jsx)(hA,{className:"h-5 w-5"});case"GBP":return(0,Ke.jsx)(jA,{className:"h-5 w-5"});case"USD":default:return(0,Ke.jsx)(Fw,{className:"h-5 w-5"})}},w=F=>new Intl.NumberFormat("en-US",{style:"currency",currency:e.currency||"USD",minimumFractionDigits:0,maximumFractionDigits:0}).format(F),b=F=>F>=1e6?`${y}${g(F/1e6)}M`:F>=1e3?`${y}${g(F/1e3)}K`:`${y}${g(F)}`,C=e.target?e.total/e.target.value*100:0,S=["#3b82f6","#8b5cf6","#10b981","#f59e0b","#ef4444","#ec4899"],P=(F,I)=>F.color?F.color:S[I%S.length],N=()=>(0,Ke.jsxs)("div",{className:"space-y-4",children:[(0,Ke.jsxs)("div",{className:"flex items-start justify-between",children:[(0,Ke.jsx)("div",{className:"space-y-1",children:(0,Ke.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Ke.jsx)("div",{className:B("p-2 rounded-lg bg-gradient-to-br from-primary/20 to-primary/10"),children:x(e.currency)}),(0,Ke.jsxs)("div",{children:[(0,Ke.jsxs)("p",{className:"text-sm text-muted-foreground",children:["Total Revenue ",e.period&&`(${e.period})`]}),(0,Ke.jsx)(oe.p,{className:"text-3xl font-bold",initial:{opacity:0,scale:.5},animate:{opacity:1,scale:1},transition:{duration:u?.3:0},children:w(e.total)})]})]})}),e.change&&(0,Ke.jsxs)(oe.div,{className:B("flex items-center gap-1",e.change.type==="increase"?"text-green-600":e.change.type==="decrease"?"text-red-600":"text-gray-600"),initial:{opacity:0,x:20},animate:{opacity:1,x:0},transition:{delay:.1},children:[e.change.type==="increase"?(0,Ke.jsx)(Qc,{className:"h-5 w-5"}):e.change.type==="decrease"?(0,Ke.jsx)(gc,{className:"h-5 w-5"}):null,(0,Ke.jsxs)("div",{className:"text-right",children:[(0,Ke.jsxs)("p",{className:"text-lg font-bold",children:[e.change.type!=="neutral"&&(e.change.type==="increase"?"+":"-"),Math.abs(e.change.value),"%"]}),e.change.period&&(0,Ke.jsxs)("p",{className:"text-xs text-muted-foreground",children:["vs ",e.change.period]})]})]})]}),e.target&&(0,Ke.jsxs)("div",{className:"space-y-2",children:[(0,Ke.jsxs)("div",{className:"flex justify-between text-sm",children:[(0,Ke.jsx)("span",{className:"text-muted-foreground",children:e.target.label||"Target"}),(0,Ke.jsxs)("span",{className:"font-medium",children:[g(C),"% of ",w(e.target.value)]})]}),(0,Ke.jsx)(Mo,{value:C,className:"h-2"})]}),i&&e.forecast&&(0,Ke.jsxs)("div",{className:"flex items-center justify-between p-3 bg-muted/30 rounded-lg",children:[(0,Ke.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Ke.jsx)(va,{className:"h-4 w-4 text-muted-foreground"}),(0,Ke.jsx)("span",{className:"text-sm text-muted-foreground",children:e.forecast.label||"Forecast"})]}),(0,Ke.jsxs)("div",{className:"text-right",children:[(0,Ke.jsx)("p",{className:"font-semibold",children:w(e.forecast.value)}),e.forecast.confidence&&(0,Ke.jsxs)("p",{className:"text-xs text-muted-foreground",children:[e.forecast.confidence,"% confidence"]})]})]})]}),T=()=>{if(!e.streams||e.streams.length===0)return null;let F=e.streams.reduce((I,k)=>I+k.amount,0);return(0,Ke.jsxs)("div",{className:"space-y-3",children:[(0,Ke.jsx)("h4",{className:"text-sm font-medium text-muted-foreground",children:"Revenue Streams"}),e.streams.map((I,k)=>{let R=I.percentage??I.amount/F*100,E=P(I,k);return(0,Ke.jsxs)(oe.div,{className:B("space-y-2",d&&"cursor-pointer hover:bg-muted/30 p-2 -m-2 rounded-lg transition-colors"),onClick:()=>d?.(I),initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:k*.05},children:[(0,Ke.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Ke.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Ke.jsx)("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:E}}),(0,Ke.jsx)("span",{className:"text-sm font-medium",children:I.name}),I.icon&&(0,Ke.jsx)("div",{className:"text-muted-foreground",children:I.icon})]}),(0,Ke.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Ke.jsx)("span",{className:"text-sm font-semibold",children:b(I.amount)}),(0,Ke.jsxs)(dt,{variant:"outline",className:"text-xs",children:[g(R),"%"]}),I.change&&(0,Ke.jsxs)("div",{className:B("flex items-center gap-0.5 text-xs",I.change.type==="increase"?"text-green-600":I.change.type==="decrease"?"text-red-600":"text-gray-600"),children:[I.change.type==="increase"?(0,Ke.jsx)(Qc,{className:"h-3 w-3"}):I.change.type==="decrease"?(0,Ke.jsx)(gc,{className:"h-3 w-3"}):null,Math.abs(I.change.value),"%"]})]})]}),(0,Ke.jsx)("div",{className:"relative h-2 bg-muted/30 rounded-full overflow-hidden",children:(0,Ke.jsx)(oe.div,{className:"h-full rounded-full",style:{backgroundColor:E},initial:{width:0},animate:{width:`${R}%`},transition:{duration:u?.5:0,delay:k*.05}})})]},I.id)})]})},A=()=>{if(!e.breakdown)return null;let F=e.breakdown.recurring+e.breakdown.oneTime+(e.breakdown.refunds||0),I=e.breakdown.recurring/F*100,k=e.breakdown.oneTime/F*100,R=e.breakdown.refunds?e.breakdown.refunds/F*100:0;return(0,Ke.jsxs)("div",{className:"space-y-3",children:[(0,Ke.jsx)("h4",{className:"text-sm font-medium text-muted-foreground",children:"Revenue Breakdown"}),(0,Ke.jsxs)("div",{className:"space-y-2",children:[(0,Ke.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Ke.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Ke.jsx)(Ah,{className:"h-4 w-4 text-blue-600"}),(0,Ke.jsx)("span",{className:"text-sm",children:"Recurring"})]}),(0,Ke.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Ke.jsx)("span",{className:"text-sm font-semibold",children:b(e.breakdown.recurring)}),(0,Ke.jsxs)(dt,{variant:"outline",className:"text-xs",children:[g(I),"%"]})]})]}),(0,Ke.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Ke.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Ke.jsx)(Sv,{className:"h-4 w-4 text-green-600"}),(0,Ke.jsx)("span",{className:"text-sm",children:"One-time"})]}),(0,Ke.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Ke.jsx)("span",{className:"text-sm font-semibold",children:b(e.breakdown.oneTime)}),(0,Ke.jsxs)(dt,{variant:"outline",className:"text-xs",children:[g(k),"%"]})]})]}),e.breakdown.refunds&&(0,Ke.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Ke.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Ke.jsx)(gc,{className:"h-4 w-4 text-red-600"}),(0,Ke.jsx)("span",{className:"text-sm",children:"Refunds"})]}),(0,Ke.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Ke.jsxs)("span",{className:"text-sm font-semibold text-red-600",children:["-",b(Math.abs(e.breakdown.refunds))]}),(0,Ke.jsxs)(dt,{variant:"destructive",className:"text-xs",children:[g(R),"%"]})]})]})]}),(0,Ke.jsxs)("div",{className:"h-3 flex rounded-full overflow-hidden",children:[(0,Ke.jsx)(oe.div,{className:"bg-blue-600",initial:{width:0},animate:{width:`${I}%`},transition:{duration:u?.5:0}}),(0,Ke.jsx)(oe.div,{className:"bg-green-600",initial:{width:0},animate:{width:`${k}%`},transition:{duration:u?.5:0,delay:.1}}),e.breakdown.refunds&&(0,Ke.jsx)(oe.div,{className:"bg-red-600",initial:{width:0},animate:{width:`${R}%`},transition:{duration:u?.5:0,delay:.2}})]})]})},M=()=>{if(!e.customerMetrics)return null;let F=[{label:"ARPU (Average Revenue Per User)",value:w(e.customerMetrics.arpu||0),icon:(0,Ke.jsx)(Xd,{className:"h-4 w-4"}),description:"Average revenue generated per user"},{label:"LTV (Lifetime Value)",value:w(e.customerMetrics.ltv||0),icon:(0,Ke.jsx)(va,{className:"h-4 w-4"}),description:"Expected revenue from customer over their lifetime"},{label:"CAC (Customer Acquisition Cost)",value:w(e.customerMetrics.cac||0),icon:(0,Ke.jsx)(QA,{className:"h-4 w-4"}),description:"Cost to acquire one new customer"},{label:"Churn Rate",value:`${g(e.customerMetrics.churnRate||0)}%`,icon:(0,Ke.jsx)(vc,{className:"h-4 w-4"}),description:"Percentage of customers lost per period"},{label:"Retention Rate",value:`${g(e.customerMetrics.retentionRate||0)}%`,icon:(0,Ke.jsx)(Ah,{className:"h-4 w-4"}),description:"Percentage of customers retained"}],I=(e.customerMetrics.ltv||0)/(e.customerMetrics.cac||1);return(0,Ke.jsxs)("div",{className:"space-y-6",children:[(0,Ke.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:F.map((k,R)=>(0,Ke.jsx)(Ys,{children:(0,Ke.jsxs)(ws,{children:[(0,Ke.jsx)(Cs,{asChild:!0,children:(0,Ke.jsx)(oe.div,{className:"p-4 rounded-lg border bg-card hover:bg-muted/50 transition-colors cursor-help",initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:R*.1},children:(0,Ke.jsxs)("div",{className:"flex items-center gap-3",children:[(0,Ke.jsx)("div",{className:"text-muted-foreground",children:k.icon}),(0,Ke.jsxs)("div",{children:[(0,Ke.jsx)("p",{className:"text-xs text-muted-foreground",children:k.label}),(0,Ke.jsx)("p",{className:"text-lg font-semibold",children:k.value})]})]})})}),(0,Ke.jsx)(ns,{children:(0,Ke.jsx)("p",{children:k.description})})]})},R))}),(0,Ke.jsxs)("div",{className:"p-4 rounded-lg border bg-card",children:[(0,Ke.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Ke.jsxs)("div",{children:[(0,Ke.jsx)("p",{className:"text-sm text-muted-foreground",children:"LTV/CAC Ratio"}),(0,Ke.jsx)("p",{className:"text-2xl font-bold",children:g(I)})]}),(0,Ke.jsxs)("div",{className:"text-right",children:[(0,Ke.jsx)(dt,{variant:I>=3?"primary":I>=2?"secondary":"destructive",className:"text-xs",children:I>=3?"Excellent":I>=2?"Good":"Needs Improvement"}),(0,Ke.jsx)("p",{className:"text-xs text-muted-foreground mt-1",children:"Target: 3:1 or higher"})]})]}),(0,Ke.jsxs)("div",{className:"mt-3",children:[(0,Ke.jsx)("div",{className:"text-xs text-muted-foreground mb-1",children:"Ratio Progress"}),(0,Ke.jsx)(Mo,{value:Math.min(100,I/5*100),className:"h-2"})]})]})]})};return(0,Ke.jsx)(_u,{title:t,...p,children:(()=>{switch(r){case"compact":return(0,Ke.jsx)("div",{className:"space-y-4",children:N()});case"detailed":return(0,Ke.jsxs)(Sl,{value:m,onValueChange:h,children:[(0,Ke.jsxs)(el,{className:"grid grid-cols-3 w-full",children:[(0,Ke.jsx)(Dn,{value:"overview",children:"Overview"}),(0,Ke.jsx)(Dn,{value:"streams",children:"Streams"}),(0,Ke.jsx)(Dn,{value:"metrics",children:"Metrics"})]}),(0,Ke.jsxs)(Xn,{value:"overview",className:"space-y-4",children:[N(),a&&A()]}),(0,Ke.jsx)(Xn,{value:"streams",className:"space-y-4",children:T()}),(0,Ke.jsx)(Xn,{value:"metrics",className:"space-y-4",children:M()})]});case"dashboard":return(0,Ke.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[(0,Ke.jsxs)("div",{className:"space-y-4",children:[N(),a&&A()]}),(0,Ke.jsx)("div",{className:"space-y-4",children:n&&T()})]});case"default":default:return(0,Ke.jsxs)("div",{className:"space-y-6",children:[N(),n&&T(),a&&A()]})}})()})}var E8=D(ue(),1);var je=D(fe(),1);function mfe({data:e,title:t,variant:r="default",backgroundVariant:n,gradientDirection:o,showMetrics:a=!0,showAlerts:i=!0,showServices:s=!1,showHistory:l=!1,showUptime:c=!0,updateInterval:u=30,animate:d=!0,onServerClick:f,onAlertClick:p,...m}){let h=Array.isArray(e)?e:[e],[g,v]=E8.default.useState("overview"),[y,x]=E8.default.useState(h),w=O=>typeof O=="string"?O:O%1!==0?(Math.round(O*100)/100).toString():O.toString();E8.default.useEffect(()=>{if(!d)return;let O=setInterval(()=>{x(F=>F.map(I=>({...I,lastUpdated:new Date,metrics:{...I.metrics,cpu:I.metrics.cpu?{...I.metrics.cpu,value:Math.min(100,Math.max(0,I.metrics.cpu.value+(Math.random()-.5)*10))}:void 0,memory:I.metrics.memory?{...I.metrics.memory,value:Math.min(100,Math.max(0,I.metrics.memory.value+(Math.random()-.5)*5))}:void 0}})))},u*1e3);return()=>clearInterval(O)},[u,d]);let b=O=>{switch(O){case"online":case"healthy":case"running":return"text-green-600 dark:text-green-400";case"warning":case"degraded":return"text-yellow-600 dark:text-yellow-400";case"critical":case"error":case"offline":case"stopped":return"text-red-600 dark:text-red-400";case"maintenance":return"text-blue-600 dark:text-blue-400";default:return"text-gray-600 dark:text-gray-400"}},C=O=>{switch(O){case"online":case"healthy":case"running":return(0,je.jsx)(Bo,{className:"h-4 w-4"});case"warning":case"degraded":return(0,je.jsx)(ya,{className:"h-4 w-4"});case"critical":case"error":case"offline":case"stopped":return(0,je.jsx)(lo,{className:"h-4 w-4"});case"maintenance":return(0,je.jsx)(yn,{className:"h-4 w-4"});default:return(0,je.jsx)(Nn,{className:"h-4 w-4"})}},S=O=>{switch(O){case"database":return(0,je.jsx)(mA,{className:"h-5 w-5"});case"cache":return(0,je.jsx)(Mh,{className:"h-5 w-5"});case"storage":return(0,je.jsx)(Rv,{className:"h-5 w-5"});case"compute":return(0,je.jsx)(Xf,{className:"h-5 w-5"});case"web":default:return(0,je.jsx)($w,{className:"h-5 w-5"})}},P=O=>{if(O.status)return O.status;let F=O.value,I=O.max||100,k=F/I*100;return k>=90?"critical":k>=75?"warning":"healthy"},N=(O,F)=>{let I=O.value,k=O.max||100,R=I/k*100,E=P(O),_={healthy:"bg-green-600",warning:"bg-yellow-600",critical:"bg-red-600",offline:"bg-gray-600"};return(0,je.jsxs)("div",{className:"space-y-2",children:[(0,je.jsxs)("div",{className:"flex items-center justify-between",children:[(0,je.jsxs)("div",{className:"flex items-center gap-2",children:[(0,je.jsx)("div",{className:"text-muted-foreground",children:F}),(0,je.jsx)("span",{className:"text-sm font-medium",children:O.label}),O.trend&&(0,je.jsx)("div",{className:B("text-xs",O.trend==="up"?"text-green-600":O.trend==="down"?"text-red-600":"text-gray-600"),children:O.trend==="up"?(0,je.jsx)(va,{className:"h-3 w-3"}):O.trend==="down"?(0,je.jsx)(vc,{className:"h-3 w-3"}):null})]}),(0,je.jsxs)("div",{className:"flex items-center gap-2",children:[(0,je.jsxs)("span",{className:"text-sm font-semibold",children:[w(I),O.unit||"%"]}),k&&k!==100&&(0,je.jsxs)("span",{className:"text-xs text-muted-foreground",children:["/ ",w(k),O.unit]})]})]}),(0,je.jsxs)("div",{className:"relative",children:[(0,je.jsx)(Mo,{value:R,className:"h-2"}),(0,je.jsx)(oe.div,{className:B("absolute top-0 left-0 h-2 rounded-full",_[E]),initial:{width:0},animate:{width:`${R}%`},transition:{duration:d?.5:0}})]}),l&&O.history&&O.history.length>0&&(0,je.jsx)("div",{className:"flex items-end gap-0.5 h-8",children:O.history.slice(-20).map((U,V)=>(0,je.jsx)(oe.div,{className:B("flex-1 rounded-t",U>75?"bg-red-600/50":U>50?"bg-yellow-600/50":"bg-green-600/50"),initial:{height:0},animate:{height:`${U/100*32}px`},transition:{delay:V*.01}},V))})]})},T=O=>{let F=O.status==="online",I=O.metrics;return(0,je.jsxs)(Ve,{className:B("p-4 transition-all",f&&"cursor-pointer hover:shadow-lg",!F&&"opacity-75"),onClick:()=>f?.(O),children:[(0,je.jsxs)("div",{className:"flex items-start justify-between mb-4",children:[(0,je.jsxs)("div",{className:"flex items-center gap-3",children:[(0,je.jsx)("div",{className:B("p-2 rounded-lg bg-gradient-to-br from-primary/20 to-primary/10"),children:S(O.type)}),(0,je.jsxs)("div",{children:[(0,je.jsx)("h4",{className:"font-semibold",children:O.name}),O.location&&(0,je.jsxs)("p",{className:"text-xs text-muted-foreground flex items-center gap-1",children:[(0,je.jsx)(kv,{className:"h-3 w-3"}),O.location]})]})]}),(0,je.jsxs)("div",{className:"flex items-center gap-2",children:[(0,je.jsx)(dt,{variant:F?"secondary":"destructive",leftIcon:F?(0,je.jsx)(Bo,{className:"h-3 w-3"}):(0,je.jsx)(lo,{className:"h-3 w-3"}),children:O.status}),F?(0,je.jsx)(uL,{className:"h-4 w-4 text-green-600"}):(0,je.jsx)(cL,{className:"h-4 w-4 text-red-600"})]})]}),c&&O.uptime!==void 0&&(0,je.jsxs)("div",{className:"mb-4",children:[(0,je.jsxs)("div",{className:"flex justify-between text-sm mb-1",children:[(0,je.jsx)("span",{className:"text-muted-foreground",children:"Uptime"}),(0,je.jsxs)("span",{className:"font-medium",children:[w(O.uptime),"%"]})]}),(0,je.jsx)(Mo,{value:O.uptime,className:"h-1"})]}),a&&(0,je.jsxs)("div",{className:"space-y-3",children:[I.cpu&&N(I.cpu,(0,je.jsx)(Xf,{className:"h-4 w-4"})),I.memory&&N(I.memory,(0,je.jsx)(Mh,{className:"h-4 w-4"})),I.disk&&N(I.disk,(0,je.jsx)(Rv,{className:"h-4 w-4"})),I.network&&N(I.network,(0,je.jsx)(Gx,{className:"h-4 w-4"})),I.temperature&&N(I.temperature,(0,je.jsx)(rL,{className:"h-4 w-4"}))]}),I.requests||I.responseTime||I.errorRate?(0,je.jsxs)("div",{className:"grid grid-cols-3 gap-2 mt-4 pt-4 border-t",children:[I.requests&&(0,je.jsxs)("div",{className:"text-center",children:[(0,je.jsx)("p",{className:"text-xs text-muted-foreground",children:"Requests"}),(0,je.jsxs)("p",{className:"text-sm font-semibold",children:[w(I.requests.value),"/s"]})]}),I.responseTime&&(0,je.jsxs)("div",{className:"text-center",children:[(0,je.jsx)("p",{className:"text-xs text-muted-foreground",children:"Response"}),(0,je.jsxs)("p",{className:"text-sm font-semibold",children:[w(I.responseTime.value),"ms"]})]}),I.errorRate&&(0,je.jsxs)("div",{className:"text-center",children:[(0,je.jsx)("p",{className:"text-xs text-muted-foreground",children:"Errors"}),(0,je.jsxs)("p",{className:"text-sm font-semibold",children:[w(I.errorRate.value),"%"]})]})]}):null,i&&O.alerts&&O.alerts.length>0&&(0,je.jsxs)("div",{className:"mt-4 pt-4 border-t",children:[(0,je.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,je.jsx)("span",{className:"text-sm font-medium",children:"Recent Alerts"}),(0,je.jsx)(dt,{variant:"outline",className:"text-xs",children:O.alerts.length})]}),(0,je.jsx)("div",{className:"space-y-1",children:O.alerts.slice(0,3).map(k=>(0,je.jsxs)("div",{className:B("text-xs p-2 rounded flex items-start gap-2",k.type==="error"?"bg-red-100 dark:bg-red-900/20":k.type==="warning"?"bg-yellow-100 dark:bg-yellow-900/20":"bg-blue-100 dark:bg-blue-900/20",p&&"cursor-pointer hover:opacity-80"),onClick:R=>{R.stopPropagation(),p?.(k)},children:[k.type==="error"?(0,je.jsx)(lo,{className:"h-3 w-3 text-red-600 flex-shrink-0"}):k.type==="warning"?(0,je.jsx)(ya,{className:"h-3 w-3 text-yellow-600 flex-shrink-0"}):(0,je.jsx)(Nn,{className:"h-3 w-3 text-blue-600 flex-shrink-0"}),(0,je.jsx)("span",{className:"flex-1",children:k.message})]},k.id))})]}),O.lastUpdated&&(0,je.jsxs)("div",{className:"mt-4 pt-4 border-t flex items-center justify-between text-xs text-muted-foreground",children:[(0,je.jsx)("span",{children:"Last updated"}),(0,je.jsx)("span",{children:new Date(O.lastUpdated).toLocaleTimeString()})]})]})},A=()=>(0,je.jsx)("div",{className:"space-y-2",children:y.map((O,F)=>(0,je.jsxs)(oe.div,{className:B("flex items-center justify-between p-3 rounded-lg border",f&&"cursor-pointer hover:bg-muted/30 transition-colors"),onClick:()=>f?.(O),initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:F*.05},children:[(0,je.jsxs)("div",{className:"flex items-center gap-3",children:[S(O.type),(0,je.jsxs)("div",{children:[(0,je.jsxs)("div",{className:"flex items-center gap-2",children:[(0,je.jsx)("span",{className:"font-medium",children:O.name}),(0,je.jsx)(dt,{variant:O.status==="online"?"secondary":"destructive",className:"text-xs",leftIcon:O.status==="online"?(0,je.jsx)(Bo,{className:"h-3 w-3"}):(0,je.jsx)(lo,{className:"h-3 w-3"}),children:O.status})]}),O.location&&(0,je.jsx)("p",{className:"text-xs text-muted-foreground",children:O.location})]})]}),(0,je.jsxs)("div",{className:"flex items-center gap-4",children:[O.metrics.cpu&&(0,je.jsxs)("div",{className:"text-right",children:[(0,je.jsx)("p",{className:"text-xs text-muted-foreground",children:"CPU"}),(0,je.jsxs)("p",{className:"text-sm font-semibold",children:[w(O.metrics.cpu.value),"%"]})]}),O.metrics.memory&&(0,je.jsxs)("div",{className:"text-right",children:[(0,je.jsx)("p",{className:"text-xs text-muted-foreground",children:"Memory"}),(0,je.jsxs)("p",{className:"text-sm font-semibold",children:[w(O.metrics.memory.value),O.metrics.memory.unit||"%"]})]}),c&&O.uptime!==void 0&&(0,je.jsxs)("div",{className:"text-right",children:[(0,je.jsx)("p",{className:"text-xs text-muted-foreground",children:"Uptime"}),(0,je.jsxs)("p",{className:"text-sm font-semibold",children:[w(O.uptime),"%"]})]})]})]},O.id))});return(0,je.jsx)(_u,{title:t,variant:n,gradientDirection:o,...m,children:(0,je.jsx)(Bt,{mode:"wait",children:(()=>{switch(r){case"compact":return A();case"grid":return(0,je.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:y.map(O=>(0,je.jsx)("div",{children:T(O)},O.id))});case"detailed":return(0,je.jsxs)(Sl,{value:g,onValueChange:v,children:[(0,je.jsxs)(el,{className:"grid grid-cols-3 w-full",children:[(0,je.jsx)(Dn,{value:"overview",children:"Overview"}),(0,je.jsx)(Dn,{value:"metrics",children:"Metrics"}),(0,je.jsx)(Dn,{value:"alerts",children:"Alerts"})]}),y.map(O=>(0,je.jsxs)("div",{children:[(0,je.jsx)(Xn,{value:"overview",children:T(O)}),(0,je.jsx)(Xn,{value:"metrics",className:"space-y-4",children:(0,je.jsx)("div",{className:"grid grid-cols-2 gap-4",children:Object.entries(O.metrics).map(([F,I])=>!I||F==="custom"||Array.isArray(I)?null:(0,je.jsx)(Ve,{className:"p-4",children:N(I,F==="cpu"?(0,je.jsx)(Xf,{className:"h-4 w-4"}):F==="memory"?(0,je.jsx)(Mh,{className:"h-4 w-4"}):F==="disk"?(0,je.jsx)(Rv,{className:"h-4 w-4"}):F==="network"?(0,je.jsx)(Gx,{className:"h-4 w-4"}):(0,je.jsx)(ha,{className:"h-4 w-4"}))},F))})}),(0,je.jsx)(Xn,{value:"alerts",children:O.alerts&&O.alerts.length>0?(0,je.jsx)("div",{className:"space-y-2",children:O.alerts.map(F=>(0,je.jsxs)("div",{className:B("p-3 rounded-lg flex items-start gap-3",F.type==="error"?"bg-red-100 dark:bg-red-900/20":F.type==="warning"?"bg-yellow-100 dark:bg-yellow-900/20":"bg-blue-100 dark:bg-blue-900/20",p&&"cursor-pointer hover:opacity-80"),onClick:()=>p?.(F),children:[F.type==="error"?(0,je.jsx)(lo,{className:"h-5 w-5 text-red-600"}):F.type==="warning"?(0,je.jsx)(ya,{className:"h-5 w-5 text-yellow-600"}):(0,je.jsx)(Nn,{className:"h-5 w-5 text-blue-600"}),(0,je.jsxs)("div",{className:"flex-1",children:[(0,je.jsx)("p",{className:"font-medium",children:F.message}),(0,je.jsx)("p",{className:"text-xs text-muted-foreground mt-1",children:new Date(F.timestamp).toLocaleString()})]})]},F.id))}):(0,je.jsxs)("div",{className:"text-center py-8 text-muted-foreground",children:[(0,je.jsx)(Bo,{className:"h-12 w-12 mx-auto mb-2 opacity-50"}),(0,je.jsx)("p",{children:"No active alerts"})]})})]},O.id))]});case"default":default:return(0,je.jsx)("div",{className:"space-y-4",children:y.map(O=>(0,je.jsx)("div",{children:T(O)},O.id))})}})()})})}return wfe(Uur);})();
416
416
  /*! Bundled license information:
417
417
 
418
418
  react/cjs/react.production.min.js: