@oneclick.dev/cms-kit 0.0.31 → 0.0.33

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.
@@ -49,4 +49,4 @@ var LEe,ZEe,HEe,GEe,YEe,UEe,WEe,XEe,KEe={},JEe=180/Math.PI,$Ee=Math.PI/180,eDe=M
49
49
  * Subject to the terms at https://gsap.com/standard-license
50
50
  * @author: Jack Doyle, jack@greensock.com
51
51
  */
52
- var cMe,hMe,fMe,pMe,AMe,CMe,mMe,IMe,yMe,_Me="transform",FMe=_Me+"Origin",bMe=function(e){var t=e.ownerDocument||e;!(_Me in e.style)&&"msTransform"in e.style&&(FMe=(_Me="msTransform")+"Origin");for(;t.parentNode&&(t=t.parentNode););if(hMe=window,mMe=new MMe,t){cMe=t,fMe=t.documentElement,pMe=t.body,(IMe=cMe.createElementNS("http://www.w3.org/2000/svg","g")).style.transform="none";var a=t.createElement("div"),n=t.createElement("div"),i=t&&(t.body||t.firstElementChild);i&&i.appendChild&&(i.appendChild(a),a.appendChild(n),a.setAttribute("style","position:static;transform:translate3d(0,0,1px)"),yMe=n.offsetParent!==a,i.removeChild(a))}return t},vMe=[],kMe=[],wMe=function(e){return e.ownerSVGElement||("svg"===(e.tagName+"").toLowerCase()?e:null)},xMe=function e(t){return"fixed"===hMe.getComputedStyle(t).position||((t=t.parentNode)&&1===t.nodeType?e(t):void 0)},OMe=function e(t,a){if(t.parentNode&&(cMe||bMe(t))){var n=wMe(t),i=n?n.getAttribute("xmlns")||"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",o=n?a?"rect":"g":"div",r=2!==a?0:100,s=3===a?100:0,l="position:absolute;display:block;pointer-events:none;margin:0;padding:0;",g=cMe.createElementNS?cMe.createElementNS(i.replace(/^https/,"http"),o):cMe.createElement(o);return a&&(n?(CMe||(CMe=e(t)),g.setAttribute("width",.01),g.setAttribute("height",.01),g.setAttribute("transform","translate("+r+","+s+")"),CMe.appendChild(g)):(AMe||((AMe=e(t)).style.cssText=l),g.style.cssText=l+"width:0.1px;height:0.1px;top:"+s+"px;left:"+r+"px",AMe.appendChild(g))),g}throw"Need document and parent."},EMe=function(e,t){var a,n,i,o,r,s,l=wMe(e),g=e===l,u=l?vMe:kMe,d=e.parentNode,c=d&&!l&&d.shadowRoot&&d.shadowRoot.appendChild?d.shadowRoot:d;if(e===hMe)return e;if(u.length||u.push(OMe(e,1),OMe(e,2),OMe(e,3)),a=l?CMe:AMe,l)g?(i=function(e){var t,a=e.getCTM();return a||(t=e.style[_Me],e.style[_Me]="none",e.appendChild(IMe),a=IMe.getCTM(),e.removeChild(IMe),t?e.style[_Me]=t:e.style.removeProperty(_Me.replace(/([A-Z])/g,"-$1").toLowerCase())),a||mMe.clone()}(e),o=-i.e/i.a,r=-i.f/i.d,n=mMe):e.getBBox?(i=e.getBBox(),n=(n=e.transform?e.transform.baseVal:{}).numberOfItems?n.numberOfItems>1?function(e){for(var t=new MMe,a=0;a<e.numberOfItems;a++)t.multiply(e.getItem(a).matrix);return t}(n):n.getItem(0).matrix:mMe,o=n.a*i.x+n.c*i.y,r=n.b*i.x+n.d*i.y):(n=new MMe,o=r=0),(g?l:d).appendChild(a),a.setAttribute("transform","matrix("+n.a+","+n.b+","+n.c+","+n.d+","+(n.e+o)+","+(n.f+r)+")");else{if(o=r=0,yMe)for(n=e.offsetParent,i=e;i&&(i=i.parentNode)&&i!==n&&i.parentNode;)(hMe.getComputedStyle(i)[_Me]+"").length>4&&(o=i.offsetLeft,r=i.offsetTop,i=0);if("absolute"!==(s=hMe.getComputedStyle(e)).position&&"fixed"!==s.position)for(n=e.offsetParent;d&&d!==n;)o+=d.scrollLeft||0,r+=d.scrollTop||0,d=d.parentNode;(i=a.style).top=e.offsetTop-r+"px",i.left=e.offsetLeft-o+"px",i[_Me]=s[_Me],i[FMe]=s[FMe],i.position="fixed"===s.position?"fixed":"absolute",c.appendChild(a)}return a},DMe=function(e,t,a,n,i,o,r){return e.a=t,e.b=a,e.c=n,e.d=i,e.e=o,e.f=r,e},MMe=function(){function e(e,t,a,n,i,o){void 0===e&&(e=1),void 0===t&&(t=0),void 0===a&&(a=0),void 0===n&&(n=1),void 0===i&&(i=0),void 0===o&&(o=0),DMe(this,e,t,a,n,i,o)}var t=e.prototype;return t.inverse=function(){var e=this.a,t=this.b,a=this.c,n=this.d,i=this.e,o=this.f,r=e*n-t*a||1e-10;return DMe(this,n/r,-t/r,-a/r,e/r,(a*o-n*i)/r,-(e*o-t*i)/r)},t.multiply=function(e){var t=this.a,a=this.b,n=this.c,i=this.d,o=this.e,r=this.f,s=e.a,l=e.c,g=e.b,u=e.d,d=e.e,c=e.f;return DMe(this,s*t+g*n,s*a+g*i,l*t+u*n,l*a+u*i,o+d*t+c*n,r+d*a+c*i)},t.clone=function(){return new e(this.a,this.b,this.c,this.d,this.e,this.f)},t.equals=function(e){var t=this.a,a=this.b,n=this.c,i=this.d,o=this.e,r=this.f;return t===e.a&&a===e.b&&n===e.c&&i===e.d&&o===e.e&&r===e.f},t.apply=function(e,t){void 0===t&&(t={});var a=e.x,n=e.y,i=this.a,o=this.b,r=this.c,s=this.d,l=this.e,g=this.f;return t.x=a*i+n*r+l||0,t.y=a*o+n*s+g||0,t},e}();function SMe(e,t,a,n){if(!e||!e.parentNode||(cMe||bMe(e)).documentElement===e)return new MMe;var i=function(e){for(var t,a;e&&e!==pMe;)(a=e._gsap)&&a.uncache&&a.get(e,"x"),a&&!a.scaleX&&!a.scaleY&&a.renderTransform&&(a.scaleX=a.scaleY=1e-4,a.renderTransform(1,a),t?t.push(a):t=[a]),e=e.parentNode;return t}(e),o=wMe(e)?vMe:kMe,r=EMe(e),s=o[0].getBoundingClientRect(),l=o[1].getBoundingClientRect(),g=o[2].getBoundingClientRect(),u=r.parentNode,d=xMe(e),c=new MMe((l.left-s.left)/100,(l.top-s.top)/100,(g.left-s.left)/100,(g.top-s.top)/100,s.left+(d?0:hMe.pageXOffset||cMe.scrollLeft||fMe.scrollLeft||pMe.scrollLeft||0),s.top+(d?0:hMe.pageYOffset||cMe.scrollTop||fMe.scrollTop||pMe.scrollTop||0));if(u.removeChild(r),i)for(s=i.length;s--;)(l=i[s]).scaleX=l.scaleY=0,l.renderTransform(1,l);return t?c.inverse():c}function BMe(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var jMe,TMe,NMe,PMe,VMe,RMe,qMe,zMe,QMe,LMe,ZMe,HMe,GMe,YMe,UMe,WMe,XMe,KMe,JMe,$Me,eSe,tSe,aSe=0,nSe=function(){return"undefined"!=typeof window},iSe=function(){return jMe||nSe()&&(jMe=window.gsap)&&jMe.registerPlugin&&jMe},oSe=function(e){return"function"==typeof e},rSe=function(e){return"object"==typeof e},sSe=function(e){return void 0===e},lSe=function(){return!1},gSe="transform",uSe="transformOrigin",dSe=function(e){return Math.round(1e4*e)/1e4},cSe=Array.isArray,hSe=function(e,t){var a=NMe.createElementNS?NMe.createElementNS("http://www.w3.org/1999/xhtml".replace(/^https/,"http"),e):NMe.createElement(e);return a.style?a:NMe.createElement(e)},fSe=180/Math.PI,pSe=1e20,ASe=new MMe,CSe=Date.now||function(){return(new Date).getTime()},mSe=[],ISe={},ySe=0,_Se=/^(?:a|input|textarea|button|select)$/i,FSe=0,bSe={},vSe={},kSe=function(e,t){var a,n={};for(a in e)n[a]=t?e[a]*t:e[a];return n},wSe=function e(t,a){for(var n,i=t.length;i--;)a?t[i].style.touchAction=a:t[i].style.removeProperty("touch-action"),(n=t[i].children)&&n.length&&e(n,a)},xSe=function(){return mSe.forEach(function(e){return e()})},OSe=function(){return!mSe.length&&jMe.ticker.remove(xSe)},ESe=function(e){for(var t=mSe.length;t--;)mSe[t]===e&&mSe.splice(t,1);jMe.to(OSe,{overwrite:!0,delay:15,duration:0,onComplete:OSe,data:"_draggable"})},DSe=function(e,t,a,n){if(e.addEventListener){var i=GMe[t];n=n||(ZMe?{passive:!1}:null),e.addEventListener(i||t,a,n),i&&t!==i&&e.addEventListener(t,a,n)}},MSe=function(e,t,a,n){if(e.removeEventListener){var i=GMe[t];e.removeEventListener(i||t,a,n),i&&t!==i&&e.removeEventListener(t,a,n)}},SSe=function(e){e.preventDefault&&e.preventDefault(),e.preventManipulation&&e.preventManipulation()},BSe=function e(t){YMe=t.touches&&aSe<t.touches.length,MSe(t.target,"touchend",e)},jSe=function(e){YMe=e.touches&&aSe<e.touches.length,DSe(e.target,"touchend",BSe)},TSe=function(e){return TMe.pageYOffset||e.scrollTop||e.documentElement.scrollTop||e.body.scrollTop||0},NSe=function(e){return TMe.pageXOffset||e.scrollLeft||e.documentElement.scrollLeft||e.body.scrollLeft||0},PSe=function e(t,a){DSe(t,"scroll",a),RSe(t.parentNode)||e(t.parentNode,a)},VSe=function e(t,a){MSe(t,"scroll",a),RSe(t.parentNode)||e(t.parentNode,a)},RSe=function(e){return!(e&&e!==PMe&&9!==e.nodeType&&e!==NMe.body&&e!==TMe&&e.nodeType&&e.parentNode)},qSe=function(e,t){var a="x"===t?"Width":"Height",n="scroll"+a,i="client"+a;return Math.max(0,RSe(e)?Math.max(PMe[n],VMe[n])-(TMe["inner"+a]||PMe[i]||VMe[i]):e[n]-e[i])},zSe=function e(t,a){var n=qSe(t,"x"),i=qSe(t,"y");RSe(t)?t=vSe:e(t.parentNode,a),t._gsMaxScrollX=n,t._gsMaxScrollY=i,a||(t._gsScrollX=t.scrollLeft||0,t._gsScrollY=t.scrollTop||0)},QSe=function(e,t,a){var n=e.style;n&&(sSe(n[t])&&(t=QMe(t,e)||t),null==a?n.removeProperty&&n.removeProperty(t.replace(/([A-Z])/g,"-$1").toLowerCase()):n[t]=a)},LSe=function(e){return TMe.getComputedStyle(e instanceof Element?e:e.host||(e.parentNode||{}).host||e)},ZSe={},HSe=function(e){if(e===TMe)return ZSe.left=ZSe.top=0,ZSe.width=ZSe.right=PMe.clientWidth||e.innerWidth||VMe.clientWidth||0,ZSe.height=ZSe.bottom=(e.innerHeight||0)-20<PMe.clientHeight?PMe.clientHeight:e.innerHeight||VMe.clientHeight||0,ZSe;var t=e.ownerDocument||NMe,a=sSe(e.pageX)?e.nodeType||sSe(e.left)||sSe(e.top)?LMe(e)[0].getBoundingClientRect():e:{left:e.pageX-NSe(t),top:e.pageY-TSe(t),right:e.pageX-NSe(t)+1,bottom:e.pageY-TSe(t)+1};return sSe(a.right)&&!sSe(a.width)?(a.right=a.left+a.width,a.bottom=a.top+a.height):sSe(a.width)&&(a={width:a.right-a.left,height:a.bottom-a.top,right:a.right,left:a.left,bottom:a.bottom,top:a.top}),a},GSe=function(e,t,a){var n,i=e.vars,o=i[a],r=e._listeners[t];return oSe(o)&&(n=o.apply(i.callbackScope||e,i[a+"Params"]||[e.pointerEvent])),r&&!1===e.dispatchEvent(t)&&(n=!1),n},YSe=function(e,t){var a,n,i,o=LMe(e)[0];return o.nodeType||o===TMe?WSe(o,t):sSe(e.left)?{left:n=e.min||e.minX||e.minRotation||0,top:a=e.min||e.minY||0,width:(e.max||e.maxX||e.maxRotation||0)-n,height:(e.max||e.maxY||0)-a}:(i={x:0,y:0},{left:e.left-i.x,top:e.top-i.y,width:e.width,height:e.height})},USe={},WSe=function(e,t){t=LMe(t)[0];var a,n,i,o,r,s,l,g,u,d,c,h,f,p=e.getBBox&&e.ownerSVGElement,A=e.ownerDocument||NMe;if(e===TMe)i=TSe(A),n=(a=NSe(A))+(A.documentElement.clientWidth||e.innerWidth||A.body.clientWidth||0),o=i+((e.innerHeight||0)-20<A.documentElement.clientHeight?A.documentElement.clientHeight:e.innerHeight||A.body.clientHeight||0);else{if(t===TMe||sSe(t))return e.getBoundingClientRect();a=i=0,p?(c=(d=e.getBBox()).width,h=d.height):(e.viewBox&&(d=e.viewBox.baseVal)&&(a=d.x||0,i=d.y||0,c=d.width,h=d.height),c||(d="border-box"===(f=LSe(e)).boxSizing,c=(parseFloat(f.width)||e.clientWidth||0)+(d?0:parseFloat(f.borderLeftWidth)+parseFloat(f.borderRightWidth)),h=(parseFloat(f.height)||e.clientHeight||0)+(d?0:parseFloat(f.borderTopWidth)+parseFloat(f.borderBottomWidth)))),n=c,o=h}return e===t?{left:a,top:i,width:n-a,height:o-i}:(s=(r=SMe(t,!0).multiply(SMe(e))).apply({x:a,y:i}),l=r.apply({x:n,y:i}),g=r.apply({x:n,y:o}),u=r.apply({x:a,y:o}),{left:a=Math.min(s.x,l.x,g.x,u.x),top:i=Math.min(s.y,l.y,g.y,u.y),width:Math.max(s.x,l.x,g.x,u.x)-a,height:Math.max(s.y,l.y,g.y,u.y)-i})},XSe=function(e,t,a,n,i,o){var r,s,l,g={};if(t)if(1!==i&&t instanceof Array){if(g.end=r=[],l=t.length,rSe(t[0]))for(s=0;s<l;s++)r[s]=kSe(t[s],i);else for(s=0;s<l;s++)r[s]=t[s]*i;a+=1.1,n-=1.1}else oSe(t)?g.end=function(a){var n,o,r=t.call(e,a);if(1!==i)if(rSe(r)){for(o in n={},r)n[o]=r[o]*i;r=n}else r*=i;return r}:g.end=t;return(a||0===a)&&(g.max=a),(n||0===n)&&(g.min=n),o&&(g.velocity=0),g},KSe=function e(t){var a;return!(!t||!t.getAttribute||t===VMe)&&(!("true"!==(a=t.getAttribute("data-clickable"))&&("false"===a||!_Se.test(t.nodeName+"")&&"true"!==t.getAttribute("contentEditable")))||e(t.parentNode))},JSe=function(e,t){for(var a,n=e.length;n--;)(a=e[n]).ondragstart=a.onselectstart=t?null:lSe,jMe.set(a,{lazy:!0,userSelect:t?"text":"none"})},$Se=function e(t){return"fixed"===LSe(t).position||((t=t.parentNode)&&1===t.nodeType?e(t):void 0)},eBe=function(e,t){e=jMe.utils.toArray(e)[0],t=t||{};var a,n,i,o,r,s,l=document.createElement("div"),g=l.style,u=e.firstChild,d=0,c=0,h=e.scrollTop,f=e.scrollLeft,p=e.scrollWidth,A=e.scrollHeight,C=0,m=0,I=0;eSe&&!1!==t.force3D?(r="translate3d(",s="px,0px)"):gSe&&(r="translate(",s="px)"),this.scrollTop=function(e,t){if(!arguments.length)return-this.top();this.top(-e,t)},this.scrollLeft=function(e,t){if(!arguments.length)return-this.left();this.left(-e,t)},this.left=function(a,n){if(!arguments.length)return-(e.scrollLeft+c);var i=e.scrollLeft-f,o=c;if((i>2||i<-2)&&!n)return f=e.scrollLeft,jMe.killTweensOf(this,{left:1,scrollLeft:1}),this.left(-f),void(t.onKill&&t.onKill());(a=-a)<0?(c=a-.5|0,a=0):a>m?(c=a-m|0,a=m):c=0,(c||o)&&(this._skip||(g[gSe]=r+-c+"px,"+-d+s),c+C>=0&&(g.paddingRight=c+C+"px")),e.scrollLeft=0|a,f=e.scrollLeft},this.top=function(a,n){if(!arguments.length)return-(e.scrollTop+d);var i=e.scrollTop-h,o=d;if((i>2||i<-2)&&!n)return h=e.scrollTop,jMe.killTweensOf(this,{top:1,scrollTop:1}),this.top(-h),void(t.onKill&&t.onKill());(a=-a)<0?(d=a-.5|0,a=0):a>I?(d=a-I|0,a=I):d=0,(d||o)&&(this._skip||(g[gSe]=r+-c+"px,"+-d+s)),e.scrollTop=0|a,h=e.scrollTop},this.maxScrollTop=function(){return I},this.maxScrollLeft=function(){return m},this.disable=function(){for(u=l.firstChild;u;)o=u.nextSibling,e.appendChild(u),u=o;e===l.parentNode&&e.removeChild(l)},this.enable=function(){if((u=e.firstChild)!==l){for(;u;)o=u.nextSibling,l.appendChild(u),u=o;e.appendChild(l),this.calibrate()}},this.calibrate=function(t){var o,r,s,u=e.clientWidth===a;h=e.scrollTop,f=e.scrollLeft,u&&e.clientHeight===n&&l.offsetHeight===i&&p===e.scrollWidth&&A===e.scrollHeight&&!t||((d||c)&&(r=this.left(),s=this.top(),this.left(-e.scrollLeft),this.top(-e.scrollTop)),o=LSe(e),u&&!t||(g.display="block",g.width="auto",g.paddingRight="0px",(C=Math.max(0,e.scrollWidth-e.clientWidth))&&(C+=parseFloat(o.paddingLeft)+(tSe?parseFloat(o.paddingRight):0))),g.display="inline-block",g.position="relative",g.overflow="visible",g.verticalAlign="top",g.boxSizing="content-box",g.width="100%",g.paddingRight=C+"px",tSe&&(g.paddingBottom=o.paddingBottom),a=e.clientWidth,n=e.clientHeight,p=e.scrollWidth,A=e.scrollHeight,m=e.scrollWidth-a,I=e.scrollHeight-n,i=l.offsetHeight,g.display="block",(r||s)&&(this.left(r),this.top(s)))},this.content=l,this.element=e,this._skip=!1,this.enable()},tBe=function(e){if(nSe()&&document.body){var t=window&&window.navigator;TMe=window,NMe=document,PMe=NMe.documentElement,VMe=NMe.body,RMe=hSe("div"),KMe=!!window.PointerEvent,(qMe=hSe("div")).style.cssText="visibility:hidden;height:1px;top:-1px;pointer-events:none;position:relative;clear:both;cursor:grab",XMe="grab"===qMe.style.cursor?"grab":"move",UMe=t&&-1!==t.userAgent.toLowerCase().indexOf("android"),HMe="ontouchstart"in PMe&&"orientation"in TMe||t&&(t.MaxTouchPoints>0||t.msMaxTouchPoints>0),n=hSe("div"),i=hSe("div"),o=i.style,r=VMe,o.display="inline-block",o.position="relative",n.style.cssText="width:90px;height:40px;padding:10px;overflow:auto;visibility:hidden",n.appendChild(i),r.appendChild(n),a=i.offsetHeight+18>n.scrollHeight,r.removeChild(n),tSe=a,GMe=function(e){for(var t=e.split(","),a=(("onpointerdown"in RMe?"pointerdown,pointermove,pointerup,pointercancel":"onmspointerdown"in RMe?"MSPointerDown,MSPointerMove,MSPointerUp,MSPointerCancel":e).split(",")),n={},i=4;--i>-1;)n[t[i]]=a[i],n[a[i]]=t[i];try{PMe.addEventListener("test",null,Object.defineProperty({},"passive",{get:function(){ZMe=1}}))}catch(o){}return n}("touchstart,touchmove,touchend,touchcancel"),DSe(NMe,"touchcancel",lSe),DSe(TMe,"touchmove",lSe),VMe&&VMe.addEventListener("touchstart",lSe),DSe(NMe,"contextmenu",function(){for(var e in ISe)ISe[e].isPressed&&ISe[e].endDrag()}),jMe=zMe=iSe()}var a,n,i,o,r;jMe?(WMe=jMe.plugins.inertia,JMe=jMe.core.context||function(){},QMe=jMe.utils.checkPrefix,gSe=QMe(gSe),uSe=QMe(uSe),LMe=jMe.utils.toArray,$Me=jMe.core.getStyleSaver,eSe=!!QMe("perspective")):e&&console.warn("Please gsap.registerPlugin(Draggable)")},aBe=function(){function e(e){this._listeners={},this.target=e||this}var t=e.prototype;return t.addEventListener=function(e,t){var a=this._listeners[e]||(this._listeners[e]=[]);~a.indexOf(t)||a.push(t)},t.removeEventListener=function(e,t){var a=this._listeners[e],n=a&&a.indexOf(t);n>=0&&a.splice(n,1)},t.dispatchEvent=function(e){var t,a=this;return(this._listeners[e]||[]).forEach(function(n){return!1===n.call(a,{type:e,target:a.target})&&(t=!1)}),t},e}(),nBe=function(e){var t,a;function n(t,a){var i;i=e.call(this)||this,zMe||tBe(1),t=LMe(t)[0],i.styles=$Me&&$Me(t,"transform,left,top"),WMe||(WMe=jMe.plugins.inertia),i.vars=a=kSe(a||{}),i.target=t,i.x=i.y=i.rotation=0,i.dragResistance=parseFloat(a.dragResistance)||0,i.edgeResistance=isNaN(a.edgeResistance)?1:parseFloat(a.edgeResistance)||0,i.lockAxis=a.lockAxis,i.autoScroll=a.autoScroll||0,i.lockedAxis=null,i.allowEventDefault=!!a.allowEventDefault,jMe.getProperty(t,"x");var o,r,s,l,g,u,d,c,h,f,p,A,C,m,I,y,_,F,b,v,k,w,x,O,E,D,M,S,B,j,T,N,P,V=(a.type||"x,y").toLowerCase(),R=~V.indexOf("x")||~V.indexOf("y"),q=-1!==V.indexOf("rotation"),z=q?"rotation":R?"x":"left",Q=R?"y":"top",L=!(!~V.indexOf("x")&&!~V.indexOf("left")&&"scroll"!==V),Z=!(!~V.indexOf("y")&&!~V.indexOf("top")&&"scroll"!==V),H=a.minimumMovement||2,G=BMe(i),Y=LMe(a.trigger||a.handle||t),U={},W=0,X=!1,K=a.autoScrollMarginTop||40,J=a.autoScrollMarginRight||40,$=a.autoScrollMarginBottom||40,ee=a.autoScrollMarginLeft||40,te=a.clickableTest||KSe,ae=0,ne=t._gsap||jMe.core.getCache(t),ie=$Se(t),oe=function(e,a){return parseFloat(ne.get(t,e,a))},re=t.ownerDocument||NMe,se=function(e){return SSe(e),e.stopImmediatePropagation&&e.stopImmediatePropagation(),!1},le=function e(a){if(G.autoScroll&&G.isDragging&&(X||_)){var n,i,o,s,l,g,u,d,h=t,f=15*G.autoScroll;for(X=!1,vSe.scrollTop=null!=TMe.pageYOffset?TMe.pageYOffset:null!=re.documentElement.scrollTop?re.documentElement.scrollTop:re.body.scrollTop,vSe.scrollLeft=null!=TMe.pageXOffset?TMe.pageXOffset:null!=re.documentElement.scrollLeft?re.documentElement.scrollLeft:re.body.scrollLeft,s=G.pointerX-vSe.scrollLeft,l=G.pointerY-vSe.scrollTop;h&&!i;)n=(i=RSe(h.parentNode))?vSe:h.parentNode,o=i?{bottom:Math.max(PMe.clientHeight,TMe.innerHeight||0),right:Math.max(PMe.clientWidth,TMe.innerWidth||0),left:0,top:0}:n.getBoundingClientRect(),g=u=0,Z&&((d=n._gsMaxScrollY-n.scrollTop)<0?u=d:l>o.bottom-$&&d?(X=!0,u=Math.min(d,f*(1-Math.max(0,o.bottom-l)/$)|0)):l<o.top+K&&n.scrollTop&&(X=!0,u=-Math.min(n.scrollTop,f*(1-Math.max(0,l-o.top)/K)|0)),u&&(n.scrollTop+=u)),L&&((d=n._gsMaxScrollX-n.scrollLeft)<0?g=d:s>o.right-J&&d?(X=!0,g=Math.min(d,f*(1-Math.max(0,o.right-s)/J)|0)):s<o.left+ee&&n.scrollLeft&&(X=!0,g=-Math.min(n.scrollLeft,f*(1-Math.max(0,s-o.left)/ee)|0)),g&&(n.scrollLeft+=g)),i&&(g||u)&&(TMe.scrollTo(n.scrollLeft,n.scrollTop),_e(G.pointerX+g,G.pointerY+u)),h=n}if(_){var p=G.x,A=G.y;q?(G.deltaX=p-parseFloat(ne.rotation),G.rotation=p,ne.rotation=p+"deg",ne.renderTransform(1,ne)):r?(Z&&(G.deltaY=A-r.top(),r.top(A)),L&&(G.deltaX=p-r.left(),r.left(p))):R?(Z&&(G.deltaY=A-parseFloat(ne.y),ne.y=A+"px"),L&&(G.deltaX=p-parseFloat(ne.x),ne.x=p+"px"),ne.renderTransform(1,ne)):(Z&&(G.deltaY=A-parseFloat(t.style.top||0),t.style.top=A+"px"),L&&(G.deltaX=p-parseFloat(t.style.left||0),t.style.left=p+"px")),!c||a||S||(S=!0,!1===GSe(G,"drag","onDrag")&&(L&&(G.x-=G.deltaX),Z&&(G.y-=G.deltaY),e(!0)),S=!1)}_=!1},ge=function(e,a){var n,i,o=G.x,s=G.y;t._gsap||(ne=jMe.core.getCache(t)),ne.uncache&&jMe.getProperty(t,"x"),R?(G.x=parseFloat(ne.x),G.y=parseFloat(ne.y)):q?G.x=G.rotation=parseFloat(ne.rotation):r?(G.y=r.top(),G.x=r.left()):(G.y=parseFloat(t.style.top||(i=LSe(t))&&i.top)||0,G.x=parseFloat(t.style.left||(i||{}).left)||0),(b||v||k)&&!a&&(G.isDragging||G.isThrowing)&&(k&&(bSe.x=G.x,bSe.y=G.y,(n=k(bSe)).x!==G.x&&(G.x=n.x,_=!0),n.y!==G.y&&(G.y=n.y,_=!0)),b&&(n=b(G.x))!==G.x&&(G.x=n,q&&(G.rotation=n),_=!0),v&&((n=v(G.y))!==G.y&&(G.y=n),_=!0)),_&&le(!0),e||(G.deltaX=G.x-o,G.deltaY=G.y-s,GSe(G,"throwupdate","onThrowUpdate"))},ue=function(e,t,a,n){return null==t&&(t=-pSe),null==a&&(a=pSe),oSe(e)?function(i){var o=G.isPressed?1-G.edgeResistance:1;return e.call(G,(i>a?a+(i-a)*o:i<t?t+(i-t)*o:i)*n)*n}:cSe(e)?function(n){for(var i,o,r=e.length,s=0,l=pSe;--r>-1;)(o=(i=e[r])-n)<0&&(o=-o),o<l&&i>=t&&i<=a&&(s=r,l=o);return e[s]}:isNaN(e)?function(e){return e}:function(){return e*n}},de=function(){var e,n,i,o;d=!1,r?(r.calibrate(),G.minX=p=-r.maxScrollLeft(),G.minY=C=-r.maxScrollTop(),G.maxX=f=G.maxY=A=0,d=!0):a.bounds&&(e=YSe(a.bounds,t.parentNode),q?(G.minX=p=e.left,G.maxX=f=e.left+e.width,G.minY=C=G.maxY=A=0):sSe(a.bounds.maxX)&&sSe(a.bounds.maxY)?(n=YSe(t,t.parentNode),G.minX=p=Math.round(oe(z,"px")+e.left-n.left),G.minY=C=Math.round(oe(Q,"px")+e.top-n.top),G.maxX=f=Math.round(p+(e.width-n.width)),G.maxY=A=Math.round(C+(e.height-n.height))):(e=a.bounds,G.minX=p=e.minX,G.minY=C=e.minY,G.maxX=f=e.maxX,G.maxY=A=e.maxY),p>f&&(G.minX=f,G.maxX=f=p,p=G.minX),C>A&&(G.minY=A,G.maxY=A=C,C=G.minY),q&&(G.minRotation=p,G.maxRotation=f),d=!0),a.liveSnap&&(i=!0===a.liveSnap?a.snap||{}:a.liveSnap,o=cSe(i)||oSe(i),q?(b=ue(o?i:i.rotation,p,f,1),v=null):i.points?k=function(e,t,a,n,i,o,r){return o=o&&o<pSe?o*o:pSe,oSe(e)?function(s){var l,g,u,d=G.isPressed?1-G.edgeResistance:1,c=s.x,h=s.y;return s.x=c=c>a?a+(c-a)*d:c<t?t+(c-t)*d:c,s.y=h=h>i?i+(h-i)*d:h<n?n+(h-n)*d:h,(l=e.call(G,s))!==s&&(s.x=l.x,s.y=l.y),1!==r&&(s.x*=r,s.y*=r),o<pSe&&(g=s.x-c)*g+(u=s.y-h)*u>o&&(s.x=c,s.y=h),s}:cSe(e)?function(t){for(var a,n,i,r,s=e.length,l=0,g=pSe;--s>-1;)(r=(a=(i=e[s]).x-t.x)*a+(n=i.y-t.y)*n)<g&&(l=s,g=r);return g<=o?e[l]:t}:function(e){return e}}(o?i:i.points,p,f,C,A,i.radius,r?-1:1):(L&&(b=ue(o?i:i.x||i.left||i.scrollLeft,p,f,r?-1:1)),Z&&(v=ue(o?i:i.y||i.top||i.scrollTop,C,A,r?-1:1))))},ce=function(){G.isThrowing=!1,GSe(G,"throwcomplete","onThrowComplete")},he=function(){G.isThrowing=!1},fe=function(e,n){var i,o,s,l;e&&WMe?(!0===e&&(i=a.snap||a.liveSnap||{},o=cSe(i)||oSe(i),e={resistance:(a.throwResistance||a.resistance||1e3)/(q?10:1)},q?e.rotation=XSe(G,o?i:i.rotation,f,p,1,n):(L&&(e[z]=XSe(G,o?i:i.points||i.x||i.left,f,p,r?-1:1,n||"x"===G.lockedAxis)),Z&&(e[Q]=XSe(G,o?i:i.points||i.y||i.top,A,C,r?-1:1,n||"y"===G.lockedAxis)),(i.points||cSe(i)&&rSe(i[0]))&&(e.linkedProps=z+","+Q,e.radius=i.radius))),G.isThrowing=!0,l=isNaN(a.overshootTolerance)?1===a.edgeResistance?0:1-G.edgeResistance+.2:a.overshootTolerance,e.duration||(e.duration={max:Math.max(a.minDuration||0,"maxDuration"in a?a.maxDuration:2),min:isNaN(a.minDuration)?0===l||rSe(e)&&e.resistance>1e3?0:.5:a.minDuration,overshoot:l}),G.tween=s=jMe.to(r||t,{inertia:e,data:"_draggable",inherit:!1,onComplete:ce,onInterrupt:he,onUpdate:a.fastMode?GSe:ge,onUpdateParams:a.fastMode?[G,"onthrowupdate","onThrowUpdate"]:i&&i.radius?[!1,!0]:[]}),a.fastMode||(r&&(r._skip=!0),s.render(1e9,!0,!0),ge(!0,!0),G.endX=G.x,G.endY=G.y,q&&(G.endRotation=G.x),s.play(0),ge(!0,!0),r&&(r._skip=!1))):d&&G.applyBounds()},pe=function(e){var a,n=O;O=SMe(t.parentNode,!0),e&&G.isPressed&&!O.equals(n||new MMe)&&(a=n.inverse().apply({x:s,y:l}),O.apply(a,a),s=a.x,l=a.y),O.equals(ASe)&&(O=null)},Ae=function(){var e,a,n,i=1-G.edgeResistance,o=ie?NSe(re):0,c=ie?TSe(re):0;R&&(ne.x=oe(z,"px")+"px",ne.y=oe(Q,"px")+"px",ne.renderTransform()),pe(!1),USe.x=G.pointerX-o,USe.y=G.pointerY-c,O&&O.apply(USe,USe),s=USe.x,l=USe.y,_&&(_e(G.pointerX,G.pointerY),le(!0)),N=SMe(t),r?(de(),u=r.top(),g=r.left()):(Ce()?(ge(!0,!0),de()):G.applyBounds(),q?(e=t.ownerSVGElement?[ne.xOrigin-t.getBBox().x,ne.yOrigin-t.getBBox().y]:(LSe(t)[uSe]||"0 0").split(" "),y=G.rotationOrigin=SMe(t).apply({x:parseFloat(e[0])||0,y:parseFloat(e[1])||0}),ge(!0,!0),a=G.pointerX-y.x-o,n=y.y-G.pointerY+c,g=G.x,u=G.y=Math.atan2(n,a)*fSe):(u=oe(Q,"px"),g=oe(z,"px"))),d&&i&&(g>f?g=f+(g-f)/i:g<p&&(g=p-(p-g)/i),q||(u>A?u=A+(u-A)/i:u<C&&(u=C-(C-u)/i))),G.startX=g=dSe(g),G.startY=u=dSe(u)},Ce=function(){return G.tween&&G.tween.isActive()},me=function(){!qMe.parentNode||Ce()||G.isDragging||qMe.parentNode.removeChild(qMe)},Ie=function(e,i){var g;if(!o||G.isPressed||!e||!("mousedown"!==e.type&&"pointerdown"!==e.type||i)&&CSe()-ae<30&&GMe[G.pointerEvent.type])T&&e&&o&&SSe(e);else{if(E=Ce(),P=!1,G.pointerEvent=e,GMe[e.type]?(x=~e.type.indexOf("touch")?e.currentTarget||e.target:re,DSe(x,"touchend",Fe),DSe(x,"touchmove",ye),DSe(x,"touchcancel",Fe),DSe(re,"touchstart",jSe)):(x=null,DSe(re,"mousemove",ye)),M=null,KMe&&x||(DSe(re,"mouseup",Fe),e&&e.target&&DSe(e.target,"mouseup",Fe)),w=te.call(G,e.target)&&!1===a.dragClickables&&!i)return DSe(e.target,"change",Fe),GSe(G,"pressInit","onPressInit"),GSe(G,"press","onPress"),JSe(Y,!0),void(T=!1);var u;if(D=!(!x||L===Z||!1===G.vars.allowNativeTouchScrolling||G.vars.allowContextMenu&&e&&(e.ctrlKey||e.which>2))&&(L?"y":"x"),(T=!D&&!G.allowEventDefault)&&(SSe(e),DSe(TMe,"touchforcechange",SSe)),e.changedTouches?(e=m=e.changedTouches[0],I=e.identifier):e.pointerId?I=e.pointerId:m=I=null,aSe++,u=le,mSe.push(u),1===mSe.length&&jMe.ticker.add(xSe),l=G.pointerY=e.pageY,s=G.pointerX=e.pageX,GSe(G,"pressInit","onPressInit"),(D||G.autoScroll)&&zSe(t.parentNode),!t.parentNode||!G.autoScroll||r||q||!t.parentNode._gsMaxScrollX||qMe.parentNode||t.getBBox||(qMe.style.width=t.parentNode.scrollWidth+"px",t.parentNode.appendChild(qMe)),Ae(),G.tween&&G.tween.kill(),G.isThrowing=!1,jMe.killTweensOf(r||t,U,!0),r&&jMe.killTweensOf(t,{scrollTo:1},!0),G.tween=G.lockedAxis=null,(a.zIndexBoost||!q&&!r&&!1!==a.zIndexBoost)&&(t.style.zIndex=n.zIndex++),G.isPressed=!0,c=!(!a.onDrag&&!G._listeners.drag),h=!(!a.onMove&&!G._listeners.move),!1!==a.cursor||a.activeCursor)for(g=Y.length;--g>-1;)jMe.set(Y[g],{cursor:a.activeCursor||a.cursor||("grab"===XMe?"grabbing":XMe)});GSe(G,"press","onPress")}},ye=function(e){var a,n,i,r,g,u,d=e;if(o&&!YMe&&G.isPressed&&e){if(G.pointerEvent=e,a=e.changedTouches){if((e=a[0])!==m&&e.identifier!==I){for(r=a.length;--r>-1&&(e=a[r]).identifier!==I&&e.target!==t;);if(r<0)return}}else if(e.pointerId&&I&&e.pointerId!==I)return;x&&D&&!M&&(USe.x=e.pageX-(ie?NSe(re):0),USe.y=e.pageY-(ie?TSe(re):0),O&&O.apply(USe,USe),n=USe.x,i=USe.y,((g=Math.abs(n-s))!==(u=Math.abs(i-l))&&(g>H||u>H)||UMe&&D===M)&&(M=g>u&&L?"x":"y",D&&M!==D&&DSe(TMe,"touchforcechange",SSe),!1!==G.vars.lockAxisOnTouchScroll&&L&&Z&&(G.lockedAxis="x"===M?"y":"x",oSe(G.vars.onLockAxis)&&G.vars.onLockAxis.call(G,d)),UMe&&D===M))?Fe(d):(G.allowEventDefault||D&&(!M||D===M)||!1===d.cancelable?T&&(T=!1):(SSe(d),T=!0),G.autoScroll&&(X=!0),_e(e.pageX,e.pageY,h))}else T&&e&&o&&SSe(e)},_e=function(e,t,a){var n,i,o,r,c,h,m=1-G.dragResistance,I=1-G.edgeResistance,F=G.pointerX,w=G.pointerY,x=u,E=G.x,D=G.y,M=G.endX,S=G.endY,B=G.endRotation,j=_;G.pointerX=e,G.pointerY=t,ie&&(e-=NSe(re),t-=TSe(re)),q?(r=Math.atan2(y.y-t,e-y.x)*fSe,(c=G.y-r)>180?(u-=360,G.y=r):c<-180&&(u+=360,G.y=r),G.x!==g||Math.max(Math.abs(s-e),Math.abs(l-t))>H?(G.y=r,o=g+(u-r)*m):o=g):(O&&(h=e*O.a+t*O.c+O.e,t=e*O.b+t*O.d+O.f,e=h),(i=t-l)<H&&i>-H&&(i=0),(n=e-s)<H&&n>-H&&(n=0),(G.lockAxis||G.lockedAxis)&&(n||i)&&((h=G.lockedAxis)||(G.lockedAxis=h=L&&Math.abs(n)>Math.abs(i)?"y":Z?"x":null,h&&oSe(G.vars.onLockAxis)&&G.vars.onLockAxis.call(G,G.pointerEvent)),"y"===h?i=0:"x"===h&&(n=0)),o=dSe(g+n*m),r=dSe(u+i*m)),(b||v||k)&&(G.x!==o||G.y!==r&&!q)&&(k&&(bSe.x=o,bSe.y=r,h=k(bSe),o=dSe(h.x),r=dSe(h.y)),b&&(o=dSe(b(o))),v&&(r=dSe(v(r)))),d&&(o>f?o=f+Math.round((o-f)*I):o<p&&(o=p+Math.round((o-p)*I)),q||(r>A?r=Math.round(A+(r-A)*I):r<C&&(r=Math.round(C+(r-C)*I)))),(G.x!==o||G.y!==r&&!q)&&(q?(G.endRotation=G.x=G.endX=o,_=!0):(Z&&(G.y=G.endY=r,_=!0),L&&(G.x=G.endX=o,_=!0)),a&&!1===GSe(G,"move","onMove")?(G.pointerX=F,G.pointerY=w,u=x,G.x=E,G.y=D,G.endX=M,G.endY=S,G.endRotation=B,_=j):!G.isDragging&&G.isPressed&&(G.isDragging=P=!0,GSe(G,"dragstart","onDragStart")))},Fe=function e(n,i){if(o&&G.isPressed&&(!n||null==I||i||!(n.pointerId&&n.pointerId!==I&&n.target!==t||n.changedTouches&&!function(e,t){for(var a=e.length;a--;)if(e[a].identifier===t)return!0}(n.changedTouches,I)))){G.isPressed=!1;var r,s,l,g,u,d=n,c=G.isDragging,h=G.vars.allowContextMenu&&n&&(n.ctrlKey||n.which>2),f=jMe.delayedCall(.001,me);if(x?(MSe(x,"touchend",e),MSe(x,"touchmove",ye),MSe(x,"touchcancel",e),MSe(re,"touchstart",jSe)):MSe(re,"mousemove",ye),MSe(TMe,"touchforcechange",SSe),KMe&&x||(MSe(re,"mouseup",e),n&&n.target&&MSe(n.target,"mouseup",e)),_=!1,c&&(W=FSe=CSe(),G.isDragging=!1),ESe(le),w&&!h)return n&&(MSe(n.target,"change",e),G.pointerEvent=d),JSe(Y,!1),GSe(G,"release","onRelease"),GSe(G,"click","onClick"),void(w=!1);for(s=Y.length;--s>-1;)QSe(Y[s],"cursor",a.cursor||(!1!==a.cursor?XMe:null));if(aSe--,n){if((r=n.changedTouches)&&(n=r[0])!==m&&n.identifier!==I){for(s=r.length;--s>-1&&(n=r[s]).identifier!==I&&n.target!==t;);if(s<0&&!i)return}G.pointerEvent=d,G.pointerX=n.pageX,G.pointerY=n.pageY}return h&&d?(SSe(d),T=!0,GSe(G,"release","onRelease")):d&&!c?(T=!1,E&&(a.snap||a.bounds)&&fe(a.inertia||a.throwProps),GSe(G,"release","onRelease"),UMe&&"touchmove"===d.type||-1!==d.type.indexOf("cancel")||(GSe(G,"click","onClick"),CSe()-ae<300&&GSe(G,"doubleclick","onDoubleClick"),g=d.target||t,ae=CSe(),u=function(){ae===B||!G.enabled()||G.isPressed||d.defaultPrevented||(g.click?g.click():re.createEvent&&((l=re.createEvent("MouseEvents")).initMouseEvent("click",!0,!0,TMe,1,G.pointerEvent.screenX,G.pointerEvent.screenY,G.pointerX,G.pointerY,!1,!1,!1,!1,0,null),g.dispatchEvent(l)))},UMe||d.defaultPrevented||jMe.delayedCall(.05,u))):(fe(a.inertia||a.throwProps),G.allowEventDefault||!d||!1===a.dragClickables&&te.call(G,d.target)||!c||D&&(!M||D!==M)||!1===d.cancelable?T=!1:(T=!0,SSe(d)),GSe(G,"release","onRelease")),Ce()&&f.duration(G.tween.duration()),c&&GSe(G,"dragend","onDragEnd"),!0}T&&n&&o&&SSe(n)},be=function(e){if(e&&G.isDragging&&!r){var a=e.target||t.parentNode,n=a.scrollLeft-a._gsScrollX,i=a.scrollTop-a._gsScrollY;(n||i)&&(O?(s-=n*O.a+i*O.c,l-=i*O.d+n*O.b):(s-=n,l-=i),a._gsScrollX+=n,a._gsScrollY+=i,_e(G.pointerX,G.pointerY))}},ve=function(e){var t=CSe(),a=t-ae<100,n=t-W<50,i=a&&B===ae,o=G.pointerEvent&&G.pointerEvent.defaultPrevented,r=a&&j===ae,s=e.isTrusted||null==e.isTrusted&&a&&i;if((i||n&&!1!==G.vars.suppressClickOnDrag)&&e.stopImmediatePropagation&&e.stopImmediatePropagation(),a&&(!G.pointerEvent||!G.pointerEvent.defaultPrevented)&&(!i||s&&!r))return s&&i&&(j=ae),void(B=ae);(G.isPressed||n||a)&&(s&&e.detail&&a&&!o||SSe(e)),a||n||P||(e&&e.target&&(G.pointerEvent=e),GSe(G,"click","onClick"))},ke=function(e){return O?{x:e.x*O.a+e.y*O.c+O.e,y:e.x*O.b+e.y*O.d+O.f}:{x:e.x,y:e.y}};return(F=n.get(t))&&F.kill(),i.startDrag=function(e,a){var n,i,o,r;Ie(e||G.pointerEvent,!0),a&&!G.hitTest(e||G.pointerEvent)&&(n=HSe(e||G.pointerEvent),i=HSe(t),o=ke({x:n.left+n.width/2,y:n.top+n.height/2}),r=ke({x:i.left+i.width/2,y:i.top+i.height/2}),s-=o.x-r.x,l-=o.y-r.y),G.isDragging||(G.isDragging=P=!0,GSe(G,"dragstart","onDragStart"))},i.drag=ye,i.endDrag=function(e){return Fe(e||G.pointerEvent,!0)},i.timeSinceDrag=function(){return G.isDragging?0:(CSe()-W)/1e3},i.timeSinceClick=function(){return(CSe()-ae)/1e3},i.hitTest=function(e,t){return n.hitTest(G.target,e,t)},i.getDirection=function(e,a){var n,i,o,r,s,l,d="velocity"===e&&WMe?e:rSe(e)&&!q?"element":"start";return"element"===d&&(s=HSe(G.target),l=HSe(e)),n="start"===d?G.x-g:"velocity"===d?WMe.getVelocity(t,z):s.left+s.width/2-(l.left+l.width/2),q?n<0?"counter-clockwise":"clockwise":(a=a||2,i="start"===d?G.y-u:"velocity"===d?WMe.getVelocity(t,Q):s.top+s.height/2-(l.top+l.height/2),r=(o=Math.abs(n/i))<1/a?"":n<0?"left":"right",o<a&&(""!==r&&(r+="-"),r+=i<0?"up":"down"),r)},i.applyBounds=function(e,n){var i,o,r,s,l,g;if(e&&a.bounds!==e)return a.bounds=e,G.update(!0,n);if(ge(!0),de(),d&&!Ce()){if(i=G.x,o=G.y,i>f?i=f:i<p&&(i=p),o>A?o=A:o<C&&(o=C),(G.x!==i||G.y!==o)&&(r=!0,G.x=G.endX=i,q?G.endRotation=i:G.y=G.endY=o,_=!0,le(!0),G.autoScroll&&!G.isDragging))for(zSe(t.parentNode),s=t,vSe.scrollTop=null!=TMe.pageYOffset?TMe.pageYOffset:null!=re.documentElement.scrollTop?re.documentElement.scrollTop:re.body.scrollTop,vSe.scrollLeft=null!=TMe.pageXOffset?TMe.pageXOffset:null!=re.documentElement.scrollLeft?re.documentElement.scrollLeft:re.body.scrollLeft;s&&!g;)l=(g=RSe(s.parentNode))?vSe:s.parentNode,Z&&l.scrollTop>l._gsMaxScrollY&&(l.scrollTop=l._gsMaxScrollY),L&&l.scrollLeft>l._gsMaxScrollX&&(l.scrollLeft=l._gsMaxScrollX),s=l;G.isThrowing&&(r||G.endX>f||G.endX<p||G.endY>A||G.endY<C)&&fe(a.inertia||a.throwProps,r)}return G},i.update=function(e,a,n){if(a&&G.isPressed){var i=SMe(t),o=N.apply({x:G.x-g,y:G.y-u}),r=SMe(t.parentNode,!0);r.apply({x:i.e-o.x,y:i.f-o.y},o),G.x-=o.x-r.e,G.y-=o.y-r.f,le(!0),Ae()}var s=G.x,l=G.y;return pe(!a),e?G.applyBounds():(_&&n&&le(!0),ge(!0)),a&&(_e(G.pointerX,G.pointerY),_&&le(!0)),G.isPressed&&!a&&(L&&Math.abs(s-G.x)>.01||Z&&Math.abs(l-G.y)>.01&&!q)&&Ae(),G.autoScroll&&(zSe(t.parentNode,G.isDragging),X=G.isDragging,le(!0),VSe(t,be),PSe(t,be)),G},i.enable=function(e){var n,i,s,l={lazy:!0};if(!1!==a.cursor&&(l.cursor=a.cursor||XMe),jMe.utils.checkPrefix("touchCallout")&&(l.touchCallout="none"),"soft"!==e){for(wSe(Y,L===Z?"none":a.allowNativeTouchScrolling&&t.scrollHeight===t.clientHeight==(t.scrollWidth===t.clientHeight)||a.allowEventDefault?"manipulation":L?"pan-y":"pan-x"),i=Y.length;--i>-1;)s=Y[i],KMe||DSe(s,"mousedown",Ie),DSe(s,"touchstart",Ie),DSe(s,"click",ve,!0),jMe.set(s,l),s.getBBox&&s.ownerSVGElement&&L!==Z&&jMe.set(s.ownerSVGElement,{touchAction:a.allowNativeTouchScrolling||a.allowEventDefault?"manipulation":L?"pan-y":"pan-x"}),a.allowContextMenu||DSe(s,"contextmenu",se);JSe(Y,!1)}return PSe(t,be),o=!0,WMe&&"soft"!==e&&WMe.track(r||t,R?"x,y":q?"rotation":"top,left"),t._gsDragID=n=t._gsDragID||"d"+ySe++,ISe[n]=G,r&&(r.enable(),r.element._gsDragID=n),(a.bounds||q)&&Ae(),a.bounds&&G.applyBounds(),G},i.disable=function(e){for(var a,n=G.isDragging,i=Y.length;--i>-1;)QSe(Y[i],"cursor",null);if("soft"!==e){for(wSe(Y,null),i=Y.length;--i>-1;)a=Y[i],QSe(a,"touchCallout",null),MSe(a,"mousedown",Ie),MSe(a,"touchstart",Ie),MSe(a,"click",ve,!0),MSe(a,"contextmenu",se);JSe(Y,!0),x&&(MSe(x,"touchcancel",Fe),MSe(x,"touchend",Fe),MSe(x,"touchmove",ye)),MSe(re,"mouseup",Fe),MSe(re,"mousemove",ye)}return VSe(t,be),o=!1,WMe&&"soft"!==e&&(WMe.untrack(r||t,R?"x,y":q?"rotation":"top,left"),G.tween&&G.tween.kill()),r&&r.disable(),ESe(le),G.isDragging=G.isPressed=w=!1,n&&GSe(G,"dragend","onDragEnd"),G},i.enabled=function(e,t){return arguments.length?e?G.enable(t):G.disable(t):o},i.kill=function(){return G.isThrowing=!1,G.tween&&G.tween.kill(),G.disable(),jMe.set(Y,{clearProps:"userSelect"}),delete ISe[t._gsDragID],G},i.revert=function(){this.kill(),this.styles&&this.styles.revert()},~V.indexOf("scroll")&&(r=i.scrollProxy=new eBe(t,function(e,t){for(var a in t)a in e||(e[a]=t[a]);return e}({onKill:function(){G.isPressed&&Fe(null)}},a)),t.style.overflowY=Z&&!HMe?"auto":"hidden",t.style.overflowX=L&&!HMe?"auto":"hidden",t=r.content),q?U.rotation=1:(L&&(U[z]=1),Z&&(U[Q]=1)),ne.force3D=!("force3D"in a)||a.force3D,JMe(BMe(i)),i.enable(),i}return a=e,(t=n).prototype=Object.create(a.prototype),t.prototype.constructor=t,t.__proto__=a,n.register=function(e){jMe=e,tBe()},n.create=function(e,t){return zMe||tBe(!0),LMe(e).map(function(e){return new n(e,t)})},n.get=function(e){return ISe[(LMe(e)[0]||{})._gsDragID]},n.timeSinceDrag=function(){return(CSe()-FSe)/1e3},n.hitTest=function(e,t,a){if(e===t)return!1;var n,i,o,r=HSe(e),s=HSe(t),l=r.top,g=r.left,u=r.right,d=r.bottom,c=r.width,h=r.height,f=s.left>u||s.right<g||s.top>d||s.bottom<l;return f||!a?!f:(o=-1!==(a+"").indexOf("%"),a=parseFloat(a)||0,(n={left:Math.max(g,s.left),top:Math.max(l,s.top)}).width=Math.min(u,s.right)-n.left,n.height=Math.min(d,s.bottom)-n.top,!(n.width<0||n.height<0)&&(o?(a*=.01,(i=n.width*n.height)>=c*h*a||i>=s.width*s.height*a):n.width>a&&n.height>a))},n}(aBe);!function(e,t){for(var a in t)a in e||(e[a]=t[a])}(nBe.prototype,{pointerX:0,pointerY:0,startX:0,startY:0,deltaX:0,deltaY:0,isDragging:!1,isPressed:!1}),nBe.zIndex=1e3,nBe.version="3.13.0",iSe()&&jMe.registerPlugin(nBe);const iBe={key:0,class:"flex items-center justify-between gap-2"},oBe={class:"text-muted-foreground text-sm ml-1"},rBe={class:"relative"},sBe={class:"background-grid absolute w-full grid grid-cols-6 gap-2 top-4"},lBe=["data-index"],gBe={key:0,class:"-m-1 p-1 col-start-1 col-span-2 row-start-1 row-span-2","data-index":"0"},uBe={key:1,class:"-m-1 p-1"},dBe=["data-index"],cBe=["onClick"],hBe={class:"aspect-square group"},fBe=["src"],pBe=["onClick"],ABe=a.defineComponent({__name:"MediaPickerItems",setup(e){dMe.registerPlugin(nBe);const t=a.inject("sources"),n=a.inject("media-items",{value:[]}),i=a.inject("update-media-items",()=>{}),o=a.ref([]),r=a.ref(null),s=a.ref(null),l=a.ref(-1),g=a.ref(-1),u=a.ref(!1),d=a.computed(()=>o.value.length===n.value.length||0!==o.value.length&&"indeterminate"),c=()=>{!0!==d.value?o.value=n.value.map(e=>e.id):o.value=[]},h=()=>{if(!o.value.length)return;const e=[...n.value];o.value.forEach(t=>{const a=e.findIndex(e=>e.id===t);-1!==a&&e.splice(a,1)}),i(e),o.value=[]};let f=[];a.ref({row:0,col:0});let p=null,A=null,C=null;const m=()=>{if(!A||!C)return;const e=A,t=e.clientX,a=e.clientY,n=document.querySelector(".background-grid");if(!n)return;const o=n.getBoundingClientRect();if(t>=o.left&&t<=o.right&&a>=o.top&&a<=o.bottom){const e=n.querySelectorAll("[data-index]");for(let n=0;n<e.length;n++){const o=e[n],r=o.getBoundingClientRect();if(t>=r.left&&t<=r.right&&a>=r.top&&a<=r.bottom){const e=parseInt(o.getAttribute("data-index"),10);if(o.classList.contains("col-span-2"),e!==g.value&&s.value){g.value=e;let{x:t,y:a}=document.querySelector('.background-grid [data-index="'+l.value+'"]').getBoundingClientRect(),{x:n,y:o}=document.querySelector('.background-grid [data-index="'+e+'"]').getBoundingClientRect();C.style.top=a-o+"px",C.style.left=t-n+"px";const r=[...s.value],u=r[l.value];r.splice(l.value,1),r.splice(e,0,u),i(r)}break}}}p=requestAnimationFrame(m)},I=()=>{f.forEach(e=>{e&&e.kill&&e.kill()}),f=[],a.nextTick(()=>{const e=r.value?r.value.querySelectorAll(".draggable-item"):[];if(e.length)try{const t=nBe.create(e,{type:"x,y",edgeResistance:.65,bounds:r.value,onPress:function(){s.value=[...n.value],l.value=parseInt(this.target.getAttribute("data-index"),10),g.value=-1,this.target.classList.add("dragging"),C=this.target},onRelease:function(e){this.target.classList.remove("dragging"),p&&(cancelAnimationFrame(p),p=null),dMe.to(this.target,{top:0,left:0,x:0,y:0,duration:.3,ease:"power3.out",clearProps:"transform",onComplete:()=>{s.value=null,l.value=-1,g.value=-1}})},onDrag:function(e){A=e,p||(p=requestAnimationFrame(m))}});f.push(t)}catch(t){console.error("Error initializing draggable:",t)}})},y=e=>{n.value.push(...e),i(n.value)};return a.onMounted(()=>{setTimeout(()=>{I()},500)}),a.watch(()=>n.value.length,()=>{setTimeout(()=>{I()},100)}),(e,i)=>{const s=a.resolveComponent("Checkbox");return a.openBlock(),a.createElementBlock(a.Fragment,null,[o.value.length?(a.openBlock(),a.createElementBlock("div",iBe,[a.createVNode(EM,{onClick:c,variant:"ghost",size:"sm"},{default:a.withCtx(()=>[a.createVNode(s,{"model-value":d.value,tabindex:"-1",class:"pointer-events-none data-[state=checked]:bg-black data-[state=checked]:text-white data-[state=checked]:border-muted border-muted group-focus-visible:ring-0"},{default:a.withCtx(()=>["indeterminate"===d.value?(a.openBlock(),a.createBlock(a.unref(PI),{key:0,class:"size-3"})):(a.openBlock(),a.createBlock(a.unref(Ts),{key:1,class:"size-3"}))]),_:1},8,["model-value"]),a.createElementVNode("p",oBe,a.toDisplayString(o.value.length)+" files selected",1)]),_:1}),a.createVNode(EM,{variant:"outline",size:"sm",class:"text-red-500 hover:text-red-600",onClick:h},{default:a.withCtx(()=>i[1]||(i[1]=[a.createTextVNode("Remove")])),_:1,__:[1]})])):a.createCommentVNode("",!0),a.createElementVNode("div",rBe,[a.createElementVNode("div",sBe,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(u.value?a.unref(n):a.unref(n).slice(0,8),(e,t)=>(a.openBlock(),a.createElementBlock("div",{key:e.id,class:a.normalizeClass(["relative -m-1 p-1",{"col-start-1 col-span-2 row-start-1 row-span-2":0===t}]),"data-index":t},[i[2]||(i[2]=a.createElementVNode("div",{class:"w-full h-full bg-muted/80 rounded-md aspect-square"},null,-1)),!u.value&&a.unref(n).length>8&&7===t?(a.openBlock(),a.createElementBlock("div",{key:0,onClick:i[0]||(i[0]=e=>u.value=!0),class:"absolute top-0 left-0 w-[calc(100%-8px)] h-[calc(100%-8px)] bg-black/30 rounded-md aspect-square z-10 flex items-center justify-center backdrop-blur-sm m-1 cursor-pointer"}," + "+a.toDisplayString(a.unref(n).length-7),1)):a.createCommentVNode("",!0)],10,lBe))),128)),0==a.unref(n).length?(a.openBlock(),a.createElementBlock("div",gBe,i[3]||(i[3]=[a.createElementVNode("div",{class:"w-full h-full bg-muted/80 rounded-md aspect-square"},null,-1)]))):(a.openBlock(),a.createElementBlock("div",uBe,i[4]||(i[4]=[a.createElementVNode("div",{class:"w-full h-full bg-muted/80 rounded-md aspect-square"},null,-1)])))]),a.createElementVNode("div",{ref_key:"itemsContainer",ref:r,class:"relative grid grid-cols-6 gap-2 mt-4"},[a.createVNode(a.TransitionGroup,{name:"media-item",tag:"div",class:"contents"},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(u.value?a.unref(n):a.unref(n).slice(0,8),(e,t)=>(a.openBlock(),a.createElementBlock("div",{key:e||t,"data-index":t,class:a.normalizeClass(["draggable-item w-full relative",{"col-start-1 col-span-2 row-start-1 row-span-2":0===t}])},[a.createElementVNode("button",{class:"relative flex justify-center items-center w-full h-full rounded-md outline outline-border group overflow-hidden focus-visible:outline-none focus-visible:ring-ring/80 focus-visible:ring-[3px] transition-all duration-200 cursor-grab active:cursor-grabbing",onClick:t=>{return a=e,void console.log("open media",a);var a},type:"button"},[a.createElementVNode("div",hBe,[a.createElementVNode("img",{src:e,draggable:"false",class:"w-full h-full object-cover group-hover:opacity-75 transition-opacity duration-200 pointer-events-none"},null,8,fBe)]),a.createElementVNode("button",{onClick:t=>((e,t)=>{e.stopPropagation(),o.value.includes(t)?o.value=o.value.filter(e=>e!==t):o.value.push(t)})(t,e),class:"absolute top-0 left-0 p-1 size-6 flex items-center justify-center",type:"button"},[a.createVNode(s,{"model-value":o.value.includes(e),tabindex:"-1",class:"bg-white outline-gray-300 data-[state=checked]:bg-black data-[state=checked]:text-white data-[state=checked]:border-black shadow-xs pointer-events-none"},null,8,["model-value"])],8,pBe),a.createVNode(a.unref(_p),{class:"size-3 absolute top-1 right-1 text-gray-400 hidden group-hover:block"})],8,cBe)],10,dBe))),128))]),_:1}),a.createVNode(awe,{sources:a.unref(t),onSubmit:y},{default:a.withCtx(()=>{var e;return[a.createElementVNode("button",{class:a.normalizeClass(["relative flex justify-center items-center w-full group aspect-square rounded-md cursor-pointer focus-visible:outline-ring focus-visible:outline-[1px] focus-visible:ring-ring/50 focus-visible:ring-[3px] hover:bg-black/10 transition-colors duration-200",{"col-start-1 col-span-2 row-start-1 row-span-2":0===(null==(e=a.unref(n))?void 0:e.length)}]),type:"button"},[a.createVNode(a.unref(bF),{class:"size-8"})],2)]}),_:1},8,["sources"])],512)])],64)}}}),CBe=v(ABe,[["__scopeId","data-v-d84d8ac8"]]),mBe=a.defineComponent({__name:"MediaPicker",props:{modelValue:{},sources:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,i=t,o=a.ref([...n.modelValue||[]]);a.watch(()=>n.modelValue,e=>{o.value=[...e||[]]},{deep:!0});const r=a.computed(()=>n.sources);return a.provide("media-items",o),a.provide("update-media-items",e=>{i("update:modelValue",e)}),a.provide("sources",r),(e,t)=>(a.openBlock(),a.createBlock(CBe))}}),IBe=Object.freeze(Object.defineProperty({__proto__:null,MediaPicker:mBe,MediaPickerDialog:awe},Symbol.toStringTag,{value:"Module"})),yBe=a.defineComponent({__name:"Menubar",props:{modelValue:{},defaultValue:{},dir:{},loop:{type:Boolean},class:{}},emits:["update:modelValue"],setup(e,{emit:t}){const i=e,o=t,r=a.computed(()=>{const{class:e,...t}=i;return t}),s=n.useForwardPropsEmits(r,o);return(e,t)=>(a.openBlock(),a.createBlock(a.unref(n.MenubarRoot),a.mergeProps({"data-slot":"menubar"},a.unref(s),{class:a.unref(Dt)("bg-background flex h-9 items-center gap-1 rounded-md border p-1 shadow-xs",i.class)}),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},16,["class"]))}}),_Be={class:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center"},FBe=a.defineComponent({__name:"MenubarCheckboxItem",props:{modelValue:{type:[Boolean,String]},disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{},class:{}},emits:["select","update:modelValue"],setup(e,{emit:t}){const i=e,o=t,r=a.computed(()=>{const{class:e,...t}=i;return t}),s=n.useForwardPropsEmits(r,o);return(e,t)=>(a.openBlock(),a.createBlock(a.unref(n.MenubarCheckboxItem),a.mergeProps({"data-slot":"menubar-checkbox-item"},a.unref(s),{class:a.unref(Dt)("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-xs py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",i.class)}),{default:a.withCtx(()=>[a.createElementVNode("span",_Be,[a.createVNode(a.unref(n.MenubarItemIndicator),null,{default:a.withCtx(()=>[a.createVNode(a.unref(Ts),{class:"size-4"})]),_:1})]),a.renderSlot(e.$slots,"default")]),_:3},16,["class"]))}}),bBe=a.defineComponent({__name:"MenubarContent",props:{forceMount:{type:Boolean},loop:{type:Boolean},side:{},sideOffset:{default:8},align:{default:"start"},alignOffset:{default:-4},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},disableUpdateOnLayoutShift:{type:Boolean},prioritizePosition:{type:Boolean},reference:{},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,i=a.computed(()=>{const{class:e,...a}=t;return a}),o=n.useForwardProps(i);return(e,i)=>(a.openBlock(),a.createBlock(a.unref(n.MenubarPortal),null,{default:a.withCtx(()=>[a.createVNode(a.unref(n.MenubarContent),a.mergeProps({"data-slot":"menubar-content"},a.unref(o),{class:a.unref(Dt)("bg-popover text-popover-foreground data-[state=open]:animate-in 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 z-50 min-w-[12rem] origin-(--reka-menubar-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-md",t.class)}),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},16,["class"])]),_:3}))}}),vBe=a.defineComponent({__name:"MenubarGroup",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e;return(e,i)=>(a.openBlock(),a.createBlock(a.unref(n.MenubarGroup),a.mergeProps({"data-slot":"menubar-group"},t),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},16))}}),kBe=a.defineComponent({__name:"MenubarItem",props:{disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{},class:{},inset:{type:Boolean},variant:{}},emits:["select"],setup(e,{emit:t}){const i=e,o=t,r=xZ(i,"class","inset","variant"),s=n.useForwardPropsEmits(r,o);return(e,t)=>(a.openBlock(),a.createBlock(a.unref(n.MenubarItem),a.mergeProps({"data-slot":"menubar-item","data-inset":e.inset?"":void 0,"data-variant":e.variant},a.unref(s),{class:a.unref(Dt)("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive-foreground data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/40 data-[variant=destructive]:focus:text-destructive-foreground data-[variant=destructive]:*:[svg]:!text-destructive-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",i.class)}),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},16,["data-inset","data-variant","class"]))}}),wBe=a.defineComponent({__name:"MenubarLabel",props:{asChild:{type:Boolean},as:{},class:{},inset:{type:Boolean}},setup(e){const t=e,i=xZ(t,"class","inset");return(e,o)=>(a.openBlock(),a.createBlock(a.unref(n.MenubarLabel),a.mergeProps({"data-inset":e.inset?"":void 0},a.unref(i),{class:a.unref(Dt)("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",t.class)}),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},16,["data-inset","class"]))}}),xBe=a.defineComponent({__name:"MenubarMenu",props:{value:{}},setup(e){const t=e;return(e,i)=>(a.openBlock(),a.createBlock(a.unref(n.MenubarMenu),a.mergeProps({"data-slot":"menubar-menu"},t),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},16))}}),OBe=a.defineComponent({__name:"MenubarRadioGroup",props:{modelValue:{},asChild:{type:Boolean},as:{}},emits:["update:modelValue"],setup(e,{emit:t}){const i=e,o=t,r=n.useForwardPropsEmits(i,o);return(e,t)=>(a.openBlock(),a.createBlock(a.unref(n.MenubarRadioGroup),a.mergeProps({"data-slot":"menubar-radio-group"},a.unref(r)),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},16))}}),EBe={class:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center"},DBe=a.defineComponent({__name:"MenubarRadioItem",props:{value:{},disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{},class:{}},emits:["select"],setup(e,{emit:t}){const i=e,o=t,r=a.computed(()=>{const{class:e,...t}=i;return t}),s=n.useForwardPropsEmits(r,o);return(e,t)=>(a.openBlock(),a.createBlock(a.unref(n.MenubarRadioItem),a.mergeProps({"data-slot":"menubar-radio-item"},a.unref(s),{class:a.unref(Dt)("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-xs py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",i.class)}),{default:a.withCtx(()=>[a.createElementVNode("span",EBe,[a.createVNode(a.unref(n.MenubarItemIndicator),null,{default:a.withCtx(()=>[a.createVNode(a.unref(Hl),{class:"size-2 fill-current"})]),_:1})]),a.renderSlot(e.$slots,"default")]),_:3},16,["class"]))}}),MBe=a.defineComponent({__name:"MenubarSeparator",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,i=a.computed(()=>{const{class:e,...a}=t;return a}),o=n.useForwardProps(i);return(e,i)=>(a.openBlock(),a.createBlock(a.unref(n.MenubarSeparator),a.mergeProps({"data-slot":"menubar-separator",class:a.unref(Dt)("bg-border -mx-1 my-1 h-px",t.class)},a.unref(o)),null,16,["class"]))}}),SBe=a.defineComponent({__name:"MenubarShortcut",props:{class:{}},setup(e){const t=e;return(e,n)=>(a.openBlock(),a.createElementBlock("span",{"data-slot":"menubar-shortcut",class:a.normalizeClass(a.unref(Dt)("text-muted-foreground ml-auto text-xs tracking-widest",t.class))},[a.renderSlot(e.$slots,"default")],2))}}),BBe=a.defineComponent({__name:"MenubarSub",props:{defaultOpen:{type:Boolean},open:{type:Boolean}},emits:["update:open"],setup(e,{emit:t}){const i=e,o=t,r=n.useForwardPropsEmits(i,o);return(e,t)=>(a.openBlock(),a.createBlock(a.unref(n.MenubarSub),a.mergeProps({"data-slot":"menubar-sub"},a.unref(r)),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},16))}}),jBe=a.defineComponent({__name:"MenubarSubContent",props:{forceMount:{type:Boolean},loop:{type:Boolean},sideOffset:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},disableUpdateOnLayoutShift:{type:Boolean},prioritizePosition:{type:Boolean},reference:{},asChild:{type:Boolean},as:{},class:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","entryFocus","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const i=e,o=t,r=a.computed(()=>{const{class:e,...t}=i;return t}),s=n.useForwardPropsEmits(r,o);return(e,t)=>(a.openBlock(),a.createBlock(a.unref(n.MenubarPortal),null,{default:a.withCtx(()=>[a.createVNode(a.unref(n.MenubarSubContent),a.mergeProps({"data-slot":"menubar-sub-content"},a.unref(s),{class:a.unref(Dt)("bg-popover text-popover-foreground 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 z-50 min-w-[8rem] origin-(--reka-menubar-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",i.class)}),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},16,["class"])]),_:3}))}}),TBe=a.defineComponent({__name:"MenubarSubTrigger",props:{disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{},class:{},inset:{type:Boolean}},setup(e){const t=e,i=xZ(t,"class","inset"),o=n.useForwardProps(i);return(e,i)=>(a.openBlock(),a.createBlock(a.unref(n.MenubarSubTrigger),a.mergeProps({"data-slot":"menubar-sub-trigger","data-inset":e.inset?"":void 0},a.unref(o),{class:a.unref(Dt)("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-none select-none data-[inset]:pl-8",t.class)}),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default"),a.createVNode(a.unref(Qs),{class:"ml-auto size-4"})]),_:3},16,["data-inset","class"]))}}),NBe=a.defineComponent({__name:"MenubarTrigger",props:{disabled:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,i=a.computed(()=>{const{class:e,...a}=t;return a}),o=n.useForwardProps(i);return(e,i)=>(a.openBlock(),a.createBlock(a.unref(n.MenubarTrigger),a.mergeProps({"data-slot":"menubar-trigger"},a.unref(o),{class:a.unref(Dt)("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex items-center rounded-sm px-2 py-1 text-sm font-medium outline-hidden select-none",t.class)}),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},16,["class"]))}}),PBe=Object.freeze(Object.defineProperty({__proto__:null,Menubar:yBe,MenubarCheckboxItem:FBe,MenubarContent:bBe,MenubarGroup:vBe,MenubarItem:kBe,MenubarLabel:wBe,MenubarMenu:xBe,MenubarRadioGroup:OBe,MenubarRadioItem:DBe,MenubarSeparator:MBe,MenubarShortcut:SBe,MenubarSub:BBe,MenubarSubContent:jBe,MenubarSubTrigger:TBe,MenubarTrigger:NBe},Symbol.toStringTag,{value:"Module"})),VBe=a.defineComponent({__name:"NumberField",props:{defaultValue:{},modelValue:{},min:{},max:{},step:{},stepSnapping:{type:Boolean},formatOptions:{},locale:{},disabled:{type:Boolean},disableWheelChange:{type:Boolean},invertWheelChange:{type:Boolean},id:{},asChild:{type:Boolean},as:{},name:{},required:{type:Boolean},class:{}},emits:["update:modelValue"],setup(e,{emit:t}){const i=e,o=t,r=a.computed(()=>{const{class:e,...t}=i;return t}),s=n.useForwardPropsEmits(r,o);return(e,t)=>(a.openBlock(),a.createBlock(a.unref(n.NumberFieldRoot),a.mergeProps(a.unref(s),{class:a.unref(Dt)("grid gap-1.5",i.class)}),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},16,["class"]))}}),RBe=a.defineComponent({__name:"NumberFieldContent",props:{class:{}},setup(e){const t=e;return(e,n)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(a.unref(Dt)("relative [&>[data-slot=input]]:has-[[data-slot=increment]]:pr-5 [&>[data-slot=input]]:has-[[data-slot=decrement]]:pl-5",t.class))},[a.renderSlot(e.$slots,"default")],2))}}),qBe=a.defineComponent({__name:"NumberFieldDecrement",props:{disabled:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,i=a.computed(()=>{const{class:e,...a}=t;return a}),o=n.useForwardProps(i);return(e,i)=>(a.openBlock(),a.createBlock(a.unref(n.NumberFieldDecrement),a.mergeProps({"data-slot":"decrement"},a.unref(o),{class:a.unref(Dt)("absolute top-1/2 -translate-y-1/2 left-0 p-3 disabled:cursor-not-allowed disabled:opacity-20",t.class)}),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default",{},()=>[a.createVNode(a.unref(PI),{class:"size-4"})])]),_:3},16,["class"]))}}),zBe=a.defineComponent({__name:"NumberFieldIncrement",props:{disabled:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,i=a.computed(()=>{const{class:e,...a}=t;return a}),o=n.useForwardProps(i);return(e,i)=>(a.openBlock(),a.createBlock(a.unref(n.NumberFieldIncrement),a.mergeProps({"data-slot":"increment"},a.unref(o),{class:a.unref(Dt)("absolute top-1/2 -translate-y-1/2 right-0 disabled:cursor-not-allowed disabled:opacity-20 p-3",t.class)}),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default",{},()=>[a.createVNode(a.unref(bF),{class:"size-4"})])]),_:3},16,["class"]))}}),QBe=a.defineComponent({__name:"NumberFieldInput",props:{class:{}},setup(e){const t=e;return(e,i)=>(a.openBlock(),a.createBlock(a.unref(n.NumberFieldInput),{"data-slot":"input",class:a.normalizeClass(a.unref(Dt)("flex h-9 w-full rounded-md border border-input bg-transparent py-1 text-sm text-center shadow-sm transition-colors placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",t.class))},null,8,["class"]))}}),LBe=Object.freeze(Object.defineProperty({__proto__:null,NumberField:VBe,NumberFieldContent:RBe,NumberFieldDecrement:qBe,NumberFieldIncrement:zBe,NumberFieldInput:QBe},Symbol.toStringTag,{value:"Module"})),ZBe=a.defineComponent({__name:"PaginationEllipsis",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,i=a.computed(()=>{const{class:e,...a}=t;return a});return(e,o)=>(a.openBlock(),a.createBlock(a.unref(n.PaginationEllipsis),a.mergeProps(i.value,{class:a.unref(Dt)("w-9 h-9 flex items-center justify-center",t.class)}),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default",{},()=>[a.createVNode(a.unref(Hd))])]),_:3},16,["class"]))}}),HBe=a.defineComponent({__name:"PaginationFirst",props:{asChild:{type:Boolean,default:!0},as:{},class:{}},setup(e){const t=e,i=a.computed(()=>{const{class:e,...a}=t;return a});return(e,o)=>(a.openBlock(),a.createBlock(a.unref(n.PaginationFirst),a.normalizeProps(a.guardReactiveProps(i.value)),{default:a.withCtx(()=>[a.createVNode(a.unref(EM),{class:a.normalizeClass(a.unref(Dt)("size-10 p-0",t.class)),variant:"outline"},{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default",{},()=>[a.createVNode(a.unref(Us),{class:"size-4"})])]),_:3},8,["class"])]),_:3},16))}}),GBe=a.defineComponent({__name:"PaginationLast",props:{asChild:{type:Boolean,default:!0},as:{},class:{}},setup(e){const t=e,i=a.computed(()=>{const{class:e,...a}=t;return a});return(e,o)=>(a.openBlock(),a.createBlock(a.unref(n.PaginationLast),a.normalizeProps(a.guardReactiveProps(i.value)),{default:a.withCtx(()=>[a.createVNode(a.unref(EM),{class:a.normalizeClass(a.unref(Dt)("size-10 p-0",t.class)),variant:"outline"},{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default",{},()=>[a.createVNode(a.unref(Xs),{class:"size-4"})])]),_:3},8,["class"])]),_:3},16))}}),YBe=a.defineComponent({__name:"PaginationNext",props:{asChild:{type:Boolean,default:!0},as:{},class:{}},setup(e){const t=e,i=a.computed(()=>{const{class:e,...a}=t;return a});return(e,o)=>(a.openBlock(),a.createBlock(a.unref(n.PaginationNext),a.normalizeProps(a.guardReactiveProps(i.value)),{default:a.withCtx(()=>[a.createVNode(a.unref(EM),{class:a.normalizeClass(a.unref(Dt)("size-10 p-0",t.class)),variant:"outline"},{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default",{},()=>[a.createVNode(a.unref(Qs),{class:"size-4"})])]),_:3},8,["class"])]),_:3},16))}}),UBe=a.defineComponent({__name:"PaginationPrev",props:{asChild:{type:Boolean,default:!0},as:{},class:{}},setup(e){const t=e,i=a.computed(()=>{const{class:e,...a}=t;return a});return(e,o)=>(a.openBlock(),a.createBlock(a.unref(n.PaginationPrev),a.normalizeProps(a.guardReactiveProps(i.value)),{default:a.withCtx(()=>[a.createVNode(a.unref(EM),{class:a.normalizeClass(a.unref(Dt)("size-10 p-0",t.class)),variant:"outline"},{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default",{},()=>[a.createVNode(a.unref(zs),{class:"size-4"})])]),_:3},8,["class"])]),_:3},16))}}),WBe=Object.freeze(Object.defineProperty({__proto__:null,Pagination:n.PaginationRoot,PaginationEllipsis:ZBe,PaginationFirst:HBe,PaginationLast:GBe,PaginationList:n.PaginationList,PaginationListItem:n.PaginationListItem,PaginationNext:YBe,PaginationPrev:UBe},Symbol.toStringTag,{value:"Module"})),XBe=a.defineComponent({__name:"Popover",props:{defaultOpen:{type:Boolean},open:{type:Boolean},modal:{type:Boolean}},emits:["update:open"],setup(e,{emit:t}){const i=e,o=t,r=n.useForwardPropsEmits(i,o);return(e,t)=>(a.openBlock(),a.createBlock(a.unref(n.PopoverRoot),a.mergeProps({"data-slot":"popover"},a.unref(r)),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},16))}}),KBe=a.defineComponent({__name:"PopoverAnchor",props:{reference:{},asChild:{type:Boolean},as:{}},setup(e){const t=e;return(e,i)=>(a.openBlock(),a.createBlock(a.unref(n.PopoverAnchor),a.mergeProps({"data-slot":"popover-anchor"},t),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},16))}}),JBe=a.defineComponent({inheritAttrs:!1,__name:"PopoverContent",props:{forceMount:{type:Boolean},side:{},sideOffset:{default:4},align:{default:"center"},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},disableUpdateOnLayoutShift:{type:Boolean},prioritizePosition:{type:Boolean},reference:{},asChild:{type:Boolean},as:{},disableOutsidePointerEvents:{type:Boolean},class:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const i=e,o=t,r=a.computed(()=>{const{class:e,...t}=i;return t}),s=n.useForwardPropsEmits(r,o);return(e,t)=>(a.openBlock(),a.createBlock(a.unref(n.PopoverPortal),null,{default:a.withCtx(()=>[a.createVNode(a.unref(n.PopoverContent),a.mergeProps({"data-slot":"popover-content"},{...a.unref(s),...e.$attrs},{class:a.unref(Dt)("bg-popover text-popover-foreground 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 z-50 w-72 rounded-md border border-popover-border p-4 shadow-md origin-(--reka-popover-content-transform-origin) outline-hidden",i.class)}),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},16,["class"])]),_:3}))}}),$Be=a.defineComponent({__name:"PopoverTrigger",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e;return(e,i)=>(a.openBlock(),a.createBlock(a.unref(n.PopoverTrigger),a.mergeProps({"data-slot":"popover-trigger"},t),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},16))}}),eje=Object.freeze(Object.defineProperty({__proto__:null,Popover:XBe,PopoverAnchor:KBe,PopoverContent:JBe,PopoverTrigger:$Be},Symbol.toStringTag,{value:"Module"})),tje={key:0},aje={key:1},nje={class:"space-y-6 py-4"},ije={id:"query_builder_dialog_filters"},oje={class:"space-y-2"},rje={class:"space-y-2"},sje={class:"flex items-center justify-between space-x-4 px-4"},lje={class:"grid grid-cols-2 gap-4 mt-2"},gje={key:0},uje={class:"flex items-center gap-2 col-span-2"},dje={class:"space-y-2"},cje={class:"flex gap-2 mb-4"},hje={key:0,class:"bg-gray-100/10 rounded p-2 text-xs font-mono text-gray-300 border border-gray-500"},fje={key:1,class:"bg-green-100/10 rounded p-2 text-xs font-bold text-green-500 border border-green-500"},pje={key:2,class:"flex gap-2 flex-col bg-red-100/10 rounded-lg p-4 pt-3 border border-red-500"},Aje={class:"text-red-500 text-xs font-bold mb-1"},Cje=["href"],mje=a.defineComponent({__name:"QueryBuilderDialog",props:{modelValue:{type:Object,default:()=>({})},integrationId:{type:String},needPredefinedIntegration:{type:Boolean,default:!1},noTrigger:{type:Boolean,default:!1}},emits:["update:modelValue","saved"],async setup(e,{expose:t,emit:n}){let i,r;const s=o.useRoute().params.slug,l=e,g=a.ref(!1);a.watch(g,e=>{var t;if(e){let e=JSON.parse(JSON.stringify(l.modelValue));p.value=(null==(t=null==e?void 0:e.integration)?void 0:t.id)||null,I.value=(null==e?void 0:e.resource)||"",y.value=(null==e?void 0:e.filters)||[],b.value=(null==e?void 0:e.sorts)||[],w.value=(null==e?void 0:e.limit)||null,x.value=(null==e?void 0:e.offset)||null,O.value=(null==e?void 0:e.startAt)||null,E.value=(null==e?void 0:e.endAt)||null,D.value=(null==e?void 0:e.groupBy)||"",M.value=(null==e?void 0:e.distinct)||!1}});const u=n,{getProjectIntegrations:d}=TG(),c=a.ref([]);c.value=([i,r]=a.withAsyncContext(()=>d(s)),i=await i,r(),i);const{buildFirebaseQuery:h,buildSQLQuery:f}=RG(),p=a.ref(l.integrationId),A=a.computed(()=>l.integrationId?c.value.find(e=>e.id===l.integrationId):c.value.find(e=>e.id===p.value)),C=a.ref(null),m=a.ref(null),I=a.ref("");a.ref(["team-building-requests","users","projects"]);const y=a.ref([]),_=[{label:"=",value:"=="},{label:"≠",value:"!="},{label:"<",value:"<"},{label:"≤",value:"<="},{label:"≥",value:">="},{label:">",value:">"},{label:"IN",value:"in"},{label:"NOT IN",value:"not-in"},{label:"CONTAINS",value:"array-contains"},{label:"CONTAINS ANY",value:"array-contains-any"}];async function F(){y.value.push({field:"",operator:"==",value:""}),await a.nextTick();const e=document.querySelectorAll("#query_builder_dialog_filters .filter-field");e.length&&e[e.length-1].focus()}const b=a.ref([]);function v(){b.value.push({field:"",direction:"asc"})}const k=a.ref(!1),w=a.ref(null),x=a.ref(null),O=a.ref(null),E=a.ref(null),D=a.ref(""),M=a.ref(!1),S=a.ref(""),B=a.ref(null);function j(){S.value="",B.value=null,C.value=null,m.value=null}function T(){j(),"FIREBASE"===A.value.type?S.value=h({resource:I.value,filters:y.value,sorts:b.value,limit:w.value,startAt:O.value,endAt:E.value}):S.value=f({resource:I.value,filters:y.value,sorts:b.value,limit:w.value,offset:x.value,groupBy:D.value,distinct:M.value})}async function N(){var e,t,a,n;if(j(),"FIREBASE"===A.value.type)try{const{find:e}=ZG(p.value);let t=await e(I.value,{filters:y.value,sorts:b.value,limit:w.value,startAt:O.value,endAt:E.value});B.value=`Found ${t.length} results`}catch(i){C.value=(null==(e=i.response.data)?void 0:e.message)||"Failed to run query",m.value=(null==(a=null==(t=i.response.data)?void 0:t.data)?void 0:a.indexUrl)||null}else try{B.value=f({resource:I.value,filters:y.value,sorts:b.value,limit:w.value,offset:x.value,groupBy:D.value,distinct:M.value})}catch(i){C.value=(null==(n=i.response.data)?void 0:n.message)||"Failed to run query"}}const P=()=>{g.value=!1,j()},V=()=>{let e={integration:{id:p.value,type:A.value.type},resource:I.value,filters:y.value,sorts:b.value,limit:w.value,offset:x.value,groupBy:D.value,distinct:M.value,startAt:O.value,endAt:E.value};u("update:modelValue",e),u("saved",e),P()};return t({openDialog:async e=>{g.value=!0,await a.nextTick(),e&&(p.value=e.integration.id,I.value=e.resource,y.value=e.filters,b.value=e.sorts,w.value=e.limit,x.value=e.offset,O.value=e.startAt,E.value=e.endAt,D.value=e.groupBy,M.value=e.distinct)}}),(t,n)=>{const i=a.resolveComponent("Button"),o=a.resolveComponent("DialogTrigger"),r=a.resolveComponent("DialogTitle"),s=a.resolveComponent("DialogHeader"),l=a.resolveComponent("ResourceSelect"),u=a.resolveComponent("Label"),d=a.resolveComponent("Input"),c=a.resolveComponent("SelectValue"),h=a.resolveComponent("SelectTrigger"),f=a.resolveComponent("SelectItem"),j=a.resolveComponent("SelectGroup"),R=a.resolveComponent("SelectContent"),q=a.resolveComponent("Select"),z=a.resolveComponent("CollapsibleTrigger"),Q=a.resolveComponent("Checkbox"),L=a.resolveComponent("CollapsibleContent"),Z=a.resolveComponent("Collapsible"),H=a.resolveComponent("DialogFooter"),G=a.resolveComponent("DialogContent"),Y=a.resolveComponent("Dialog");return a.openBlock(),a.createBlock(Y,{open:g.value,"onUpdate:open":n[9]||(n[9]=e=>g.value=e)},{default:a.withCtx(()=>[e.noTrigger?a.createCommentVNode("",!0):(a.openBlock(),a.createBlock(o,{key:0,"as-child":""},{default:a.withCtx(()=>[a.renderSlot(t.$slots,"default",{},()=>[a.createVNode(i,{disabled:!e.integrationId&&e.needPredefinedIntegration},{default:a.withCtx(()=>[e.modelValue?(a.openBlock(),a.createElementBlock("span",tje,"Update Query")):(a.openBlock(),a.createElementBlock("span",aje,"Build Query"))]),_:1},8,["disabled"])])]),_:3})),a.createVNode(G,{class:"sm:max-w-xl w-full"},{default:a.withCtx(()=>[a.createVNode(s,null,{default:a.withCtx(()=>[a.createVNode(r,null,{default:a.withCtx(()=>n[10]||(n[10]=[a.createTextVNode("Query Builder")])),_:1,__:[10]})]),_:1}),a.createElementVNode("div",nje,[a.createVNode(l,{modelValue:p.value,"onUpdate:modelValue":n[0]||(n[0]=e=>p.value=e)},null,8,["modelValue"]),a.createElementVNode("div",null,[a.createVNode(u,{for:"query_builder_dialog_resource",class:"block text-sm font-medium text-muted-foreground mb-2"},{default:a.withCtx(()=>n[11]||(n[11]=[a.createTextVNode("Resource")])),_:1,__:[11]}),a.createVNode(d,{modelValue:I.value,"onUpdate:modelValue":n[1]||(n[1]=e=>I.value=e),placeholder:"team-building-requests",id:"query_builder_dialog_resource"},null,8,["modelValue"])]),a.createElementVNode("div",ije,[a.createVNode(u,{class:"block text-sm font-medium text-muted-foreground mb-2"},{default:a.withCtx(()=>n[12]||(n[12]=[a.createTextVNode("Filters")])),_:1,__:[12]}),a.createElementVNode("div",oje,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(y.value,(e,t)=>(a.openBlock(),a.createElementBlock("div",{key:t,class:"flex items-center gap-2"},[a.createVNode(d,{modelValue:e.field,"onUpdate:modelValue":t=>e.field=t,placeholder:"Field",class:"w-32 filter-field"},null,8,["modelValue","onUpdate:modelValue"]),a.createVNode(q,{modelValue:e.operator,"onUpdate:modelValue":t=>e.operator=t},{default:a.withCtx(()=>[a.createVNode(h,{class:"w-[170px]"},{default:a.withCtx(()=>[a.createVNode(c)]),_:1}),a.createVNode(R,null,{default:a.withCtx(()=>[a.createVNode(j,null,{default:a.withCtx(()=>[(a.openBlock(),a.createElementBlock(a.Fragment,null,a.renderList(_,e=>a.createVNode(f,{key:e.value,value:e.value},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(e.label),1)]),_:2},1032,["value"])),64))]),_:1})]),_:1})]),_:2},1032,["modelValue","onUpdate:modelValue"]),a.createVNode(d,{modelValue:e.value,"onUpdate:modelValue":t=>e.value=t,placeholder:"Value",class:"w-32"},null,8,["modelValue","onUpdate:modelValue"]),a.createVNode(i,{variant:"ghost",onClick:e=>function(e){y.value.splice(e,1)}(t),title:"Remove filter"},{default:a.withCtx(()=>n[13]||(n[13]=[a.createTextVNode("✕")])),_:2,__:[13]},1032,["onClick"])]))),128)),a.createVNode(i,{variant:"outline",onClick:F},{default:a.withCtx(()=>n[14]||(n[14]=[a.createTextVNode("+ Add Filter")])),_:1,__:[14]})])]),a.createElementVNode("div",null,[a.createVNode(u,{class:"block text-sm font-medium text-muted-foreground mb-2"},{default:a.withCtx(()=>n[15]||(n[15]=[a.createTextVNode("Sort")])),_:1,__:[15]}),a.createElementVNode("div",rje,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(b.value,(e,t)=>(a.openBlock(),a.createElementBlock("div",{key:t,class:"flex items-center gap-2"},[a.createVNode(d,{modelValue:e.field,"onUpdate:modelValue":t=>e.field=t,placeholder:"Sort By",class:"w-32"},null,8,["modelValue","onUpdate:modelValue"]),a.createVNode(q,{modelValue:e.direction,"onUpdate:modelValue":t=>e.direction=t},{default:a.withCtx(()=>[a.createVNode(h,{class:"w-[180px]"},{default:a.withCtx(()=>[a.createVNode(c,{placeholder:"Sort by"})]),_:1}),a.createVNode(R,null,{default:a.withCtx(()=>[a.createVNode(j,null,{default:a.withCtx(()=>[a.createVNode(f,{value:"asc"},{default:a.withCtx(()=>n[16]||(n[16]=[a.createTextVNode("ASC")])),_:1,__:[16]}),a.createVNode(f,{value:"desc"},{default:a.withCtx(()=>n[17]||(n[17]=[a.createTextVNode("DESC")])),_:1,__:[17]})]),_:1})]),_:1})]),_:2},1032,["modelValue","onUpdate:modelValue"]),a.createVNode(i,{variant:"ghost",onClick:e=>function(e){b.value.splice(e,1)}(t),title:"Remove sort"},{default:a.withCtx(()=>n[18]||(n[18]=[a.createTextVNode("✕")])),_:2,__:[18]},1032,["onClick"])]))),128)),a.createVNode(i,{variant:"outline",onClick:v},{default:a.withCtx(()=>n[19]||(n[19]=[a.createTextVNode("+ Add Sort")])),_:1,__:[19]})])]),a.createVNode(Z,{modelValue:k.value,"onUpdate:modelValue":n[8]||(n[8]=e=>k.value=e)},{default:a.withCtx(()=>[a.createElementVNode("div",sje,[n[21]||(n[21]=a.createElementVNode("h4",{class:"text-sm font-semibold"}," Advanced Options ",-1)),a.createVNode(z,{"as-child":""},{default:a.withCtx(()=>[a.createVNode(i,{variant:"ghost",size:"sm",class:"w-9 p-0"},{default:a.withCtx(()=>[a.createVNode(a.unref(Ks),{class:"size-4"}),n[20]||(n[20]=a.createElementVNode("span",{class:"sr-only"},"Toggle",-1))]),_:1,__:[20]})]),_:1})]),a.createVNode(L,null,{default:a.withCtx(()=>{var e;return[a.createElementVNode("div",lje,[a.createElementVNode("div",null,[a.createVNode(u,{for:"limit"},{default:a.withCtx(()=>n[22]||(n[22]=[a.createTextVNode("Limit")])),_:1,__:[22]}),a.createVNode(d,{type:"number",modelValue:w.value,"onUpdate:modelValue":n[2]||(n[2]=e=>w.value=e),placeholder:"Limit"},null,8,["modelValue"])]),a.createElementVNode("div",null,[a.createVNode(u,{for:"offset"},{default:a.withCtx(()=>n[23]||(n[23]=[a.createTextVNode("Offset")])),_:1,__:[23]}),a.createVNode(d,{type:"number",modelValue:x.value,"onUpdate:modelValue":n[3]||(n[3]=e=>x.value=e),placeholder:"Offset"},null,8,["modelValue"])]),a.createElementVNode("div",null,[a.createVNode(u,{for:"startAt"},{default:a.withCtx(()=>n[24]||(n[24]=[a.createTextVNode("StartAt")])),_:1,__:[24]}),a.createVNode(d,{modelValue:O.value,"onUpdate:modelValue":n[4]||(n[4]=e=>O.value=e),placeholder:"StartAt (optional)"},null,8,["modelValue"])]),a.createElementVNode("div",null,[a.createVNode(u,{for:"endAt"},{default:a.withCtx(()=>n[25]||(n[25]=[a.createTextVNode("EndAt")])),_:1,__:[25]}),a.createVNode(d,{modelValue:E.value,"onUpdate:modelValue":n[5]||(n[5]=e=>E.value=e),placeholder:"EndAt (optional)"},null,8,["modelValue"])]),"FIREBASE"!==(null==(e=A.value)?void 0:e.type)?(a.openBlock(),a.createElementBlock("div",gje,[a.createVNode(u,{for:"groupBy"},{default:a.withCtx(()=>n[26]||(n[26]=[a.createTextVNode("Group By")])),_:1,__:[26]}),a.createVNode(d,{modelValue:D.value,"onUpdate:modelValue":n[6]||(n[6]=e=>D.value=e),placeholder:"Group By"},null,8,["modelValue"])])):a.createCommentVNode("",!0),a.createElementVNode("div",uje,[a.createVNode(Q,{modelValue:M.value,"onUpdate:modelValue":n[7]||(n[7]=e=>M.value=e),id:"distinct"},null,8,["modelValue"]),a.createVNode(u,{for:"distinct"},{default:a.withCtx(()=>n[27]||(n[27]=[a.createTextVNode("DISTINCT")])),_:1,__:[27]})])])]}),_:1})]),_:1},8,["modelValue"]),a.createElementVNode("div",dje,[a.createElementVNode("div",cje,[a.createVNode(i,{onClick:T},{default:a.withCtx(()=>n[28]||(n[28]=[a.createTextVNode("Preview Query")])),_:1,__:[28]}),a.createVNode(i,{variant:"secondary",onClick:N},{default:a.withCtx(()=>n[29]||(n[29]=[a.createTextVNode("Run Query")])),_:1,__:[29]})]),S.value?(a.openBlock(),a.createElementBlock("div",hje,a.toDisplayString(S.value),1)):a.createCommentVNode("",!0),B.value?(a.openBlock(),a.createElementBlock("div",fje,a.toDisplayString(B.value),1)):a.createCommentVNode("",!0),C.value?(a.openBlock(),a.createElementBlock("div",pje,[a.createElementVNode("p",Aje,a.toDisplayString(C.value),1),m.value?(a.openBlock(),a.createElementBlock("a",{key:0,href:m.value,target:"_blank"},[a.createVNode(i,{size:"sm"},{default:a.withCtx(()=>[n[30]||(n[30]=a.createTextVNode("Create index in Firebase Console ")),a.createVNode(a.unref($d),{class:"size-3.5 ml-0.5"})]),_:1,__:[30]})],8,Cje)):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0)])]),a.createVNode(H,null,{default:a.withCtx(()=>[a.createVNode(i,{variant:"ghost",onClick:P},{default:a.withCtx(()=>n[31]||(n[31]=[a.createTextVNode("Close")])),_:1,__:[31]}),a.createVNode(i,{onClick:V},{default:a.withCtx(()=>n[32]||(n[32]=[a.createTextVNode("Save Query")])),_:1,__:[32]})]),_:1})]),_:1})]),_:3},8,["open"])}}}),Ije=Object.freeze(Object.defineProperty({__proto__:null,QueryBuilderDialog:mje},Symbol.toStringTag,{value:"Module"})),yje=a.defineComponent({__name:"RadioGroup",props:{modelValue:{},defaultValue:{},disabled:{type:Boolean},orientation:{},dir:{},loop:{type:Boolean},asChild:{type:Boolean},as:{},name:{},required:{type:Boolean},class:{}},emits:["update:modelValue"],setup(e,{emit:t}){const i=e,o=t,r=a.computed(()=>{const{class:e,...t}=i;return t}),s=n.useForwardPropsEmits(r,o);return(e,t)=>(a.openBlock(),a.createBlock(a.unref(n.RadioGroupRoot),a.mergeProps({"data-slot":"radio-group",class:a.unref(Dt)("flex gap-3","vertical"===i.orientation?"flex-col":"flex-row",i.class)},a.unref(s)),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},16,["class"]))}}),_je=a.defineComponent({__name:"RadioGroupItem",props:{id:{},value:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{},name:{},required:{type:Boolean},class:{}},setup(e){const t=e,i=a.computed(()=>{const{class:e,...a}=t;return a}),o=n.useForwardProps(i);return(e,i)=>(a.openBlock(),a.createBlock(a.unref(n.RadioGroupItem),a.mergeProps({"data-slot":"radio-group-item"},a.unref(o),{class:a.unref(Dt)("border-input text-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",t.class)}),{default:a.withCtx(()=>[a.createVNode(a.unref(n.RadioGroupIndicator),{"data-slot":"radio-group-indicator",class:"relative flex items-center justify-center"},{default:a.withCtx(()=>[a.createVNode(a.unref(Hl),{class:"fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2"})]),_:1})]),_:1},16,["class"]))}}),Fje=Object.freeze(Object.defineProperty({__proto__:null,RadioGroup:yje,RadioGroupItem:_je},Symbol.toStringTag,{value:"Module"})),bje={class:"flex flex-col gap-y-4 mt-4 sm:flex-row sm:gap-x-4 sm:gap-y-0"},vje=a.defineComponent({__name:"RangeCalendar",props:{defaultPlaceholder:{},defaultValue:{},modelValue:{},placeholder:{},allowNonContiguousRanges:{type:Boolean},pagedNavigation:{type:Boolean},preventDeselect:{type:Boolean},maximumDays:{},weekStartsOn:{},weekdayFormat:{},calendarLabel:{},fixedWeeks:{type:Boolean},maxValue:{},minValue:{},locale:{},numberOfMonths:{},disabled:{type:Boolean},readonly:{type:Boolean},initialFocus:{type:Boolean},isDateDisabled:{type:Function},isDateUnavailable:{type:Function},isDateHighlightable:{type:Function},dir:{},nextPage:{type:Function},prevPage:{type:Function},disableDaysOutsideCurrentView:{type:Boolean},fixedDate:{},asChild:{type:Boolean},as:{},class:{}},emits:["update:modelValue","update:placeholder","update:startValue"],setup(e,{emit:t}){const i=e,o=t,r=xZ(i,"class"),s=n.useForwardPropsEmits(r,o);return(e,t)=>(a.openBlock(),a.createBlock(a.unref(n.RangeCalendarRoot),a.mergeProps({class:a.unref(Dt)("p-3",i.class)},a.unref(s)),{default:a.withCtx(({grid:e,weekDays:t})=>[a.createVNode(a.unref(Sje),null,{default:a.withCtx(()=>[a.createVNode(a.unref(Tje)),a.createVNode(a.unref(Bje)),a.createVNode(a.unref(jje))]),_:1}),a.createElementVNode("div",bje,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(e,e=>(a.openBlock(),a.createBlock(a.unref(xje),{key:e.value.toString()},{default:a.withCtx(()=>[a.createVNode(a.unref(Eje),null,{default:a.withCtx(()=>[a.createVNode(a.unref(Dje),null,{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(t,e=>(a.openBlock(),a.createBlock(a.unref(Mje),{key:e},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(e),1)]),_:2},1024))),128))]),_:2},1024)]),_:2},1024),a.createVNode(a.unref(Oje),null,{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(e.rows,(t,n)=>(a.openBlock(),a.createBlock(a.unref(Dje),{key:`weekDate-${n}`,class:"mt-2 w-full"},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(t,t=>(a.openBlock(),a.createBlock(a.unref(kje),{key:t.toString(),date:t},{default:a.withCtx(()=>[a.createVNode(a.unref(wje),{day:t,month:e.value},null,8,["day","month"])]),_:2},1032,["date"]))),128))]),_:2},1024))),128))]),_:2},1024)]),_:2},1024))),128))])]),_:1},16,["class"]))}}),kje=a.defineComponent({__name:"RangeCalendarCell",props:{date:{},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,i=xZ(t,"class"),o=n.useForwardProps(i);return(e,i)=>(a.openBlock(),a.createBlock(a.unref(n.RangeCalendarCell),a.mergeProps({class:a.unref(Dt)("relative h-9 w-9 p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([data-selected])]:bg-accent first:[&:has([data-selected])]:rounded-l-md last:[&:has([data-selected])]:rounded-r-md [&:has([data-selected][data-outside-view])]:bg-accent/50 [&:has([data-selected][data-selection-end])]:rounded-r-md [&:has([data-selected][data-selection-start])]:rounded-l-md",t.class)},a.unref(o)),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},16,["class"]))}}),wje=a.defineComponent({__name:"RangeCalendarCellTrigger",props:{day:{},month:{},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,i=xZ(t,"class"),o=n.useForwardProps(i);return(e,i)=>(a.openBlock(),a.createBlock(a.unref(n.RangeCalendarCellTrigger),a.mergeProps({class:a.unref(Dt)(a.unref(DM)({variant:"ghost"}),"h-9 w-9 p-0 font-normal data-[selected]:opacity-100","[&[data-today]:not([data-selected])]:bg-accent [&[data-today]:not([data-selected])]:text-accent-foreground","data-[selection-start]:bg-primary data-[selection-start]:text-primary-foreground data-[selection-start]:hover:bg-primary data-[selection-start]:hover:text-primary-foreground data-[selection-start]:focus:bg-primary data-[selection-start]:focus:text-primary-foreground","data-[selection-end]:bg-primary data-[selection-end]:text-primary-foreground data-[selection-end]:hover:bg-primary data-[selection-end]:hover:text-primary-foreground data-[selection-end]:focus:bg-primary data-[selection-end]:focus:text-primary-foreground","data-[outside-view]:text-muted-foreground data-[outside-view]:opacity-50 [&[data-outside-view][data-selected]]:bg-accent/50 [&[data-outside-view][data-selected]]:text-muted-foreground [&[data-outside-view][data-selected]]:opacity-30","data-[disabled]:text-muted-foreground data-[disabled]:opacity-50","data-[unavailable]:text-destructive-foreground data-[unavailable]:line-through",t.class)},a.unref(o)),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},16,["class"]))}}),xje=a.defineComponent({__name:"RangeCalendarGrid",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,i=xZ(t,"class"),o=n.useForwardProps(i);return(e,i)=>(a.openBlock(),a.createBlock(a.unref(n.RangeCalendarGrid),a.mergeProps({class:a.unref(Dt)("w-full border-collapse space-y-1",t.class)},a.unref(o)),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},16,["class"]))}}),Oje=a.defineComponent({__name:"RangeCalendarGridBody",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e;return(e,i)=>(a.openBlock(),a.createBlock(a.unref(n.RangeCalendarGridBody),a.normalizeProps(a.guardReactiveProps(t)),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},16))}}),Eje=a.defineComponent({__name:"RangeCalendarGridHead",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e;return(e,i)=>(a.openBlock(),a.createBlock(a.unref(n.RangeCalendarGridHead),a.normalizeProps(a.guardReactiveProps(t)),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},16))}}),Dje=a.defineComponent({__name:"RangeCalendarGridRow",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,i=xZ(t,"class"),o=n.useForwardProps(i);return(e,i)=>(a.openBlock(),a.createBlock(a.unref(n.RangeCalendarGridRow),a.mergeProps({class:a.unref(Dt)("flex mt-2 w-full",t.class)},a.unref(o)),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},16,["class"]))}}),Mje=a.defineComponent({__name:"RangeCalendarHeadCell",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,i=xZ(t,"class"),o=n.useForwardProps(i);return(e,i)=>(a.openBlock(),a.createBlock(a.unref(n.RangeCalendarHeadCell),a.mergeProps({class:a.unref(Dt)("w-9 rounded-md text-[0.8rem] font-normal text-muted-foreground",t.class)},a.unref(o)),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},16,["class"]))}}),Sje=a.defineComponent({__name:"RangeCalendarHeader",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,i=xZ(t,"class"),o=n.useForwardProps(i);return(e,i)=>(a.openBlock(),a.createBlock(a.unref(n.RangeCalendarHeader),a.mergeProps({class:a.unref(Dt)("relative flex w-full items-center justify-between pt-1",t.class)},a.unref(o)),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},16,["class"]))}}),Bje=a.defineComponent({__name:"RangeCalendarHeading",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,i=xZ(t,"class"),o=n.useForwardProps(i);return(e,i)=>(a.openBlock(),a.createBlock(a.unref(n.RangeCalendarHeading),a.mergeProps({class:a.unref(Dt)("text-sm font-medium",t.class)},a.unref(o)),{default:a.withCtx(({headingValue:t})=>[a.renderSlot(e.$slots,"default",{headingValue:t},()=>[a.createTextVNode(a.toDisplayString(t),1)])]),_:3},16,["class"]))}}),jje=a.defineComponent({__name:"RangeCalendarNextButton",props:{nextPage:{type:Function},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,i=xZ(t,"class"),o=n.useForwardProps(i);return(e,i)=>(a.openBlock(),a.createBlock(a.unref(n.RangeCalendarNext),a.mergeProps({class:a.unref(Dt)(a.unref(DM)({variant:"outline"}),"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100",t.class)},a.unref(o)),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default",{},()=>[a.createVNode(a.unref(Qs),{class:"size-4"})])]),_:3},16,["class"]))}}),Tje=a.defineComponent({__name:"RangeCalendarPrevButton",props:{prevPage:{type:Function},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,i=xZ(t,"class"),o=n.useForwardProps(i);return(e,i)=>(a.openBlock(),a.createBlock(a.unref(n.RangeCalendarPrev),a.mergeProps({class:a.unref(Dt)(a.unref(DM)({variant:"outline"}),"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100",t.class)},a.unref(o)),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default",{},()=>[a.createVNode(a.unref(zs),{class:"size-4"})])]),_:3},16,["class"]))}}),Nje=Object.freeze(Object.defineProperty({__proto__:null,RangeCalendar:vje,RangeCalendarCell:kje,RangeCalendarCellTrigger:wje,RangeCalendarGrid:xje,RangeCalendarGridBody:Oje,RangeCalendarGridHead:Eje,RangeCalendarGridRow:Dje,RangeCalendarHeadCell:Mje,RangeCalendarHeader:Sje,RangeCalendarHeading:Bje,RangeCalendarNextButton:jje,RangeCalendarPrevButton:Tje},Symbol.toStringTag,{value:"Module"})),Pje={key:0,class:"bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border"},Vje=a.defineComponent({__name:"ResizableHandle",props:{id:{},hitAreaMargins:{},tabindex:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{},class:{},withHandle:{type:Boolean}},emits:["dragging"],setup(e,{emit:t}){const i=e,o=t,r=xZ(i,"class","withHandle"),s=n.useForwardPropsEmits(r,o);return(e,t)=>(a.openBlock(),a.createBlock(a.unref(n.SplitterResizeHandle),a.mergeProps({"data-slot":"resizable-handle"},a.unref(s),{class:a.unref(Dt)("bg-border focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden data-[orientation=vertical]:h-px data-[orientation=vertical]:w-full data-[orientation=vertical]:after:left-0 data-[orientation=vertical]:after:h-1 data-[orientation=vertical]:after:w-full data-[orientation=vertical]:after:-translate-y-1/2 data-[orientation=vertical]:after:translate-x-0 [&[data-orientation=vertical]>div]:rotate-90",i.class)}),{default:a.withCtx(()=>[i.withHandle?(a.openBlock(),a.createElementBlock("div",Pje,[a.createVNode(a.unref(_p),{class:"size-2.5"})])):a.createCommentVNode("",!0)]),_:1},16,["class"]))}}),Rje=a.defineComponent({__name:"ResizablePanel",props:{collapsedSize:{},collapsible:{type:Boolean},defaultSize:{},id:{},maxSize:{},minSize:{},order:{},asChild:{type:Boolean},as:{}},emits:["collapse","expand","resize"],setup(e,{emit:t}){const i=e,o=t,r=n.useForwardPropsEmits(i,o);return(e,t)=>(a.openBlock(),a.createBlock(a.unref(n.SplitterPanel),a.mergeProps({"data-slot":"resizable-panel"},a.unref(r)),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},16))}}),qje=a.defineComponent({__name:"ResizablePanelGroup",props:{id:{},autoSaveId:{},direction:{},keyboardResizeBy:{},storage:{},asChild:{type:Boolean},as:{},class:{}},emits:["layout"],setup(e,{emit:t}){const i=e,o=t,r=a.computed(()=>{const{class:e,...t}=i;return t}),s=n.useForwardPropsEmits(r,o);return(e,t)=>(a.openBlock(),a.createBlock(a.unref(n.SplitterGroup),a.mergeProps({"data-slot":"resizable-panel-group"},a.unref(s),{class:a.unref(Dt)("flex h-full w-full data-[orientation=vertical]:flex-col",i.class)}),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},16,["class"]))}}),zje=Object.freeze(Object.defineProperty({__proto__:null,ResizableHandle:Vje,ResizablePanel:Rje,ResizablePanelGroup:qje},Symbol.toStringTag,{value:"Module"})),Qje={key:0,class:"text-xs p-2 text-muted-foreground"},Lje=a.defineComponent({__name:"ResourceSelect",props:{accept:{type:[String,Array],default:"*"},modelValue:{type:String,required:!0}},emits:["update:modelValue"],async setup(e,{emit:t}){let n,i;const r=o.useRoute(),{getProjectIntegrations:s}=TG(),l=e,g=zZ(l,"modelValue",t,{passive:!0}),u=r.params.slug,d=([n,i]=a.withAsyncContext(()=>s(u)),n=await n,i(),n),c="*"===l.accept?d:d.filter(e=>l.accept.includes(e.type));return(e,t)=>{const n=a.resolveComponent("IntegrationIcon"),i=a.resolveComponent("SelectValue"),o=a.resolveComponent("SelectTrigger"),r=a.resolveComponent("SelectItem"),s=a.resolveComponent("SelectGroup"),l=a.resolveComponent("SelectContent"),u=a.resolveComponent("Select");return a.openBlock(),a.createBlock(u,{modelValue:a.unref(g),"onUpdate:modelValue":t[0]||(t[0]=e=>a.isRef(g)?g.value=e:null)},{default:a.withCtx(()=>[a.createVNode(o,null,{default:a.withCtx(()=>{var e,t;return[a.unref(g)?(a.openBlock(),a.createBlock(n,{key:0,type:null==(t=null==(e=a.unref(d))?void 0:e.find(e=>e.id===a.unref(g)))?void 0:t.type,class:"size-6"},null,8,["type"])):a.createCommentVNode("",!0),a.createVNode(i,{placeholder:"Select a resource"})]}),_:1}),a.createVNode(l,null,{default:a.withCtx(()=>[a.createVNode(s,null,{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(a.unref(c),e=>(a.openBlock(),a.createBlock(r,{key:e.id,value:e.id},{default:a.withCtx(()=>[a.createVNode(n,{type:e.type,class:"size-6"},null,8,["type"]),a.createTextVNode(" "+a.toDisplayString(e.name),1)]),_:2},1032,["value"]))),128)),0===a.unref(c).length?(a.openBlock(),a.createElementBlock("p",Qje," No integrations found. ")):a.createCommentVNode("",!0)]),_:1})]),_:1})]),_:1},8,["modelValue"])}}}),Zje=Object.freeze(Object.defineProperty({__proto__:null,ResourceSelect:Lje},Symbol.toStringTag,{value:"Module"})),Hje={class:"relative z-10 flex items-center gap-2"},Gje={class:"pointer-events-none absolute inset-0"},Yje=v(a.defineComponent({__name:"RippleButton",props:{class:{},rippleColor:{default:"#484848"},duration:{default:600}},emits:["click"],setup(e,{emit:t}){const n=e,i=t,o=a.ref(null),r=a.ref([]);function s(e){!function(e){const t=o.value;if(!t)return;const a=t.getBoundingClientRect(),n=Math.max(a.width,a.height),i=e.clientX-a.left-n/2,s=e.clientY-a.top-n/2,l={x:i,y:s,size:n,key:Date.now()};r.value.push(l)}(e),i("click",e)}return a.watchEffect(()=>{if(r.value.length>0){const e=r.value[r.value.length-1];setTimeout(()=>{r.value=r.value.filter(t=>t.key!==e.key)},n.duration)}}),(e,t)=>(a.openBlock(),a.createElementBlock("button",{ref_key:"rippleButtonRef",ref:o,class:a.normalizeClass(a.unref(Dt)("relative overflow-hidden inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground h-9 px-4 py-2",e.$props.class)),style:a.normalizeStyle({"--duration":e.$props.duration+"ms"}),onClick:s},[a.createElementVNode("div",Hje,[a.renderSlot(e.$slots,"default",{},void 0,!0)]),a.createElementVNode("span",Gje,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(r.value,t=>(a.openBlock(),a.createElementBlock("span",{key:t.key,class:"ripple-animation absolute rounded-full bg-background opacity-30",style:a.normalizeStyle({width:t.size+"px",height:t.size+"px",top:t.y+"px",left:t.x+"px",backgroundColor:e.$props.rippleColor,transform:"scale(0)",animationDuration:e.$props.duration+"ms"})},null,4))),128))])],6))}}),[["__scopeId","data-v-8667d741"]]),Uje=Object.freeze(Object.defineProperty({__proto__:null,RippleButton:Yje},Symbol.toStringTag,{value:"Module"})),Wje=a.defineComponent({__name:"Sandbox",props:{modelValue:{type:String,required:!0},variables:{type:Array,default:()=>[]},placeholder:{type:String,default:""}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,i=t,o=a.computed({get:()=>n.modelValue,set:e=>i("update:modelValue",e)});return(t,n)=>{const i=a.resolveComponent("CodeEditor");return a.openBlock(),a.createBlock(i,{modelValue:o.value,"onUpdate:modelValue":n[0]||(n[0]=e=>o.value=e),variables:e.variables,language:"",placeholder:e.placeholder},null,8,["modelValue","variables","placeholder"])}}}),Xje=Object.freeze(Object.defineProperty({__proto__:null,Sandbox:Wje},Symbol.toStringTag,{value:"Module"})),Kje=a.defineComponent({__name:"ScrollBar",props:{orientation:{default:"vertical"},forceMount:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,i=a.computed(()=>{const{class:e,...a}=t;return a});return(e,o)=>(a.openBlock(),a.createBlock(a.unref(n.ScrollAreaScrollbar),a.mergeProps({"data-slot":"scroll-area-scrollbar"},i.value,{class:a.unref(Dt)("flex touch-none p-px transition-colors select-none","vertical"===e.orientation&&"h-full w-2.5 border-l border-l-transparent","horizontal"===e.orientation&&"h-2.5 flex-col border-t border-t-transparent",t.class)}),{default:a.withCtx(()=>[a.createVNode(a.unref(n.ScrollAreaThumb),{"data-slot":"scroll-area-thumb",class:"bg-border relative flex-1 rounded-full"})]),_:1},16,["class"]))}}),Jje=a.defineComponent({__name:"ScrollArea",props:{type:{},dir:{},scrollHideDelay:{},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,i=a.computed(()=>{const{class:e,...a}=t;return a});return(e,o)=>(a.openBlock(),a.createBlock(a.unref(n.ScrollAreaRoot),a.mergeProps({"data-slot":"scroll-area"},i.value,{class:a.unref(Dt)("relative",t.class)}),{default:a.withCtx(()=>[a.createVNode(a.unref(n.ScrollAreaViewport),{"data-slot":"scroll-area-viewport",class:"focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1"},{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3}),a.createVNode(Kje),a.createVNode(a.unref(n.ScrollAreaCorner))]),_:3},16,["class"]))}}),$je=Object.freeze(Object.defineProperty({__proto__:null,ScrollArea:Jje,ScrollBar:Kje},Symbol.toStringTag,{value:"Module"})),eTe=["aria-label"],tTe=a.defineComponent({__name:"SegmentedControl",props:{modelValue:{type:[String,Number],required:!0},ariaLabel:{type:String,default:""},class:{type:String,default:""},direction:{type:String,default:"horizontal"},allowEmpty:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,i=a.computed(()=>Dt(n.class)),o=t,r=a.ref(null),s=a.ref(null),l=a.ref(0);a.provide("segmentedControlValue",a.toRef(n,"modelValue")),a.provide("segmentedControlRegister",function(e,t,a){g[a]=t,u[a]=e,t===n.modelValue&&(l.value=a,d(a))}),a.provide("segmentedControlContainer",s);a.provide("updateSegmentedControl",e=>{n.allowEmpty&&e===n.modelValue?o("update:modelValue",""):o("update:modelValue",e)});const g=[],u=[];function d(e){a.nextTick(()=>{if(!r.value||!u[e])return;const t=u[e],a=r.value;a.style.width=`${t.offsetWidth}px`,a.style.transform=`translateX(${t.offsetLeft}px) translateY(${t.offsetTop}px)`})}return a.watch(()=>n.modelValue,e=>{const t=g.findIndex(t=>t===e);-1!==t&&(l.value=t,d(t))},{immediate:!0}),a.onMounted(()=>{a.nextTick(()=>{d(l.value)})}),(t,n)=>(a.openBlock(),a.createElementBlock("div",{ref_key:"containerRef",ref:s,role:"tablist","aria-label":e.ariaLabel,class:a.normalizeClass(["flex relative rounded-md p-1 bg-muted",`${a.unref(Dt)("vertical"===e.direction?"flex-col":"flex-row",i.value)}`])},[a.createElementVNode("div",{ref_key:"activeIndicator",ref:r,class:a.normalizeClass(["absolute left-0 bg-background rounded-md shadow-xs transition-all duration-200 ease-in-out",{"top-0":"horizontal"===e.direction,"-top-0.5":"vertical"===e.direction,"opacity-0":""===e.modelValue}]),style:a.normalizeStyle({height:"vertical"===e.direction?"32px":"calc(100% - 0.5rem)"})},null,6),a.renderSlot(t.$slots,"default")],10,eTe))}}),aTe=["aria-selected","disabled"],nTe=a.defineComponent({__name:"SegmentedControlButton",props:{value:{},disabled:{type:Boolean},class:{}},setup(e){const t=e,n=a.inject("segmentedControlValue"),i=a.inject("updateSegmentedControl",()=>{}),o=a.inject("segmentedControlRegister",()=>{}),r=a.ref(null),s=a.computed(()=>(null==n?void 0:n.value)===t.value),l=()=>{t.disabled||i(t.value)};return a.onMounted(()=>{if(!r.value)return;const e=r.value.parentElement;if(!e)return;const a=Array.from(e.querySelectorAll('[role="tab"]')).indexOf(r.value);-1!==a&&o(r.value,t.value,a)}),(e,n)=>(a.openBlock(),a.createElementBlock("button",{ref_key:"buttonRef",ref:r,type:"button",role:"tab","aria-selected":s.value,disabled:e.disabled,class:a.normalizeClass(["relative flex-1 px-3 py-1.5 h-8 text-sm font-medium transition-all duration-200 focus:outline-none z-10 focus-visible:ring-ring/50 focus-visible:ring-[3px] disabled:opacity-50 disabled:pointer-events-none",t.class,s.value?"text-foreground dark:text-foreground":"text-muted-foreground hover:text-foreground dark:hover:text-foreground",e.disabled?"cursor-not-allowed":"cursor-pointer"]),onClick:l},[a.renderSlot(e.$slots,"default")],10,aTe))}}),iTe=Object.freeze(Object.defineProperty({__proto__:null,SegmentedControl:tTe,SegmentedControlButton:nTe},Symbol.toStringTag,{value:"Module"})),oTe=a.defineComponent({__name:"Select",props:{open:{type:Boolean},defaultOpen:{type:Boolean},defaultValue:{},modelValue:{},by:{type:[String,Function]},dir:{},multiple:{type:Boolean},autocomplete:{},disabled:{type:Boolean},name:{},required:{type:Boolean}},emits:["update:modelValue","update:open"],setup(e,{emit:t}){const i=e,o=t,r=n.useForwardPropsEmits(i,o);return(e,t)=>(a.openBlock(),a.createBlock(a.unref(n.SelectRoot),a.mergeProps({"data-slot":"select"},a.unref(r)),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},16))}}),rTe=a.defineComponent({inheritAttrs:!1,__name:"SelectContent",props:{forceMount:{type:Boolean},position:{default:"popper"},bodyLock:{type:Boolean},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},disableUpdateOnLayoutShift:{type:Boolean},prioritizePosition:{type:Boolean},reference:{},asChild:{type:Boolean},as:{},class:{}},emits:["closeAutoFocus","escapeKeyDown","pointerDownOutside"],setup(e,{emit:t}){const i=e,o=t,r=a.computed(()=>{const{class:e,...t}=i;return t}),s=n.useForwardPropsEmits(r,o);return(e,t)=>(a.openBlock(),a.createBlock(a.unref(n.SelectPortal),null,{default:a.withCtx(()=>[a.createVNode(a.unref(n.SelectContent),a.mergeProps({"data-slot":"select-content"},{...a.unref(s),...e.$attrs},{class:a.unref(Dt)("bg-popover text-popover-foreground 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 relative z-50 max-h-(--reka-select-content-available-height) min-w-[8rem] overflow-x-hidden overflow-y-auto rounded-md border border-popover-border shadow-md","popper"===e.position&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",i.class)}),{default:a.withCtx(()=>[a.createVNode(a.unref(hTe)),a.createVNode(a.unref(n.SelectViewport),{class:a.normalizeClass(a.unref(Dt)("p-1","popper"===e.position&&"h-[var(--reka-select-trigger-height)] w-full min-w-[var(--reka-select-trigger-width)] scroll-my-1"))},{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},8,["class"]),a.createVNode(a.unref(cTe))]),_:3},16,["class"])]),_:3}))}}),sTe=a.defineComponent({__name:"SelectGroup",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e;return(e,i)=>(a.openBlock(),a.createBlock(a.unref(n.SelectGroup),a.mergeProps({"data-slot":"select-group"},t),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},16))}}),lTe={class:"absolute right-2 flex size-3.5 items-center justify-center"},gTe=a.defineComponent({__name:"SelectItem",props:{value:{},disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,i=a.computed(()=>{const{class:e,...a}=t;return a}),o=n.useForwardProps(i);return(e,i)=>(a.openBlock(),a.createBlock(a.unref(n.SelectItem),a.mergeProps({"data-slot":"select-item"},a.unref(o),{class:a.unref(Dt)("focus:bg-accent text-accent-foreground/60 focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",t.class)}),{default:a.withCtx(()=>[a.createElementVNode("span",lTe,[a.createVNode(a.unref(n.SelectItemIndicator),null,{default:a.withCtx(()=>[a.createVNode(a.unref(Ts),{class:"size-4"})]),_:1})]),a.createVNode(a.unref(n.SelectItemText),null,{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3})]),_:3},16,["class"]))}}),uTe=a.defineComponent({__name:"SelectItemText",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e;return(e,i)=>(a.openBlock(),a.createBlock(a.unref(n.SelectItemText),a.mergeProps({"data-slot":"select-item-text"},t),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},16))}}),dTe=a.defineComponent({__name:"SelectLabel",props:{for:{},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e;return(e,i)=>(a.openBlock(),a.createBlock(a.unref(n.SelectLabel),{"data-slot":"select-label",class:a.normalizeClass(a.unref(Dt)("px-2 py-1.5 text-sm font-medium",t.class))},{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},8,["class"]))}}),cTe=a.defineComponent({__name:"SelectScrollDownButton",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,i=a.computed(()=>{const{class:e,...a}=t;return a}),o=n.useForwardProps(i);return(e,i)=>(a.openBlock(),a.createBlock(a.unref(n.SelectScrollDownButton),a.mergeProps({"data-slot":"select-scroll-down-button"},a.unref(o),{class:a.unref(Dt)("flex cursor-default items-center justify-center py-1",t.class)}),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default",{},()=>[a.createVNode(a.unref(Vs),{class:"size-4"})])]),_:3},16,["class"]))}}),hTe=a.defineComponent({__name:"SelectScrollUpButton",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,i=a.computed(()=>{const{class:e,...a}=t;return a}),o=n.useForwardProps(i);return(e,i)=>(a.openBlock(),a.createBlock(a.unref(n.SelectScrollUpButton),a.mergeProps({"data-slot":"select-scroll-up-button"},a.unref(o),{class:a.unref(Dt)("flex cursor-default items-center justify-center py-1",t.class)}),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default",{},()=>[a.createVNode(a.unref(Ls),{class:"size-4"})])]),_:3},16,["class"]))}}),fTe=a.defineComponent({__name:"SelectSeparator",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,i=a.computed(()=>{const{class:e,...a}=t;return a});return(e,o)=>(a.openBlock(),a.createBlock(a.unref(n.SelectSeparator),a.mergeProps({"data-slot":"select-separator"},i.value,{class:a.unref(Dt)("bg-popover-border pointer-events-none -mx-1 my-1 h-px",t.class)}),null,16,["class"]))}}),pTe=a.defineComponent({__name:"SelectTrigger",props:{disabled:{type:Boolean},reference:{},asChild:{type:Boolean},as:{},class:{},size:{default:"default"}},setup(e){const t=e,i=xZ(t,"class","size"),o=n.useForwardProps(i);return(e,i)=>(a.openBlock(),a.createBlock(a.unref(n.SelectTrigger),a.mergeProps({"data-slot":"select-trigger","data-size":e.size},a.unref(o),{class:a.unref(Dt)("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-background px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t.class)}),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default"),a.createVNode(a.unref(n.SelectIcon),{"as-child":""},{default:a.withCtx(()=>[a.createVNode(a.unref(Vs),{class:"size-4 opacity-50"})]),_:1})]),_:3},16,["data-size","class"]))}}),ATe=a.defineComponent({__name:"SelectValue",props:{placeholder:{},asChild:{type:Boolean},as:{}},setup(e){const t=e;return(e,i)=>(a.openBlock(),a.createBlock(a.unref(n.SelectValue),a.mergeProps({"data-slot":"select-value"},t,{class:"truncate !block"}),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},16))}}),CTe=Object.freeze(Object.defineProperty({__proto__:null,Select:oTe,SelectContent:rTe,SelectGroup:sTe,SelectItem:gTe,SelectItemText:uTe,SelectLabel:dTe,SelectScrollDownButton:cTe,SelectScrollUpButton:hTe,SelectSeparator:fTe,SelectTrigger:pTe,SelectValue:ATe},Symbol.toStringTag,{value:"Module"})),mTe=a.defineComponent({__name:"Separator",props:{orientation:{default:"horizontal"},decorative:{type:Boolean,default:!0},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,i=xZ(t,"class");return(e,o)=>(a.openBlock(),a.createBlock(a.unref(n.Separator),a.mergeProps({"data-slot":"separator-root"},a.unref(i),{class:a.unref(Dt)("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",t.class)}),null,16,["class"]))}}),ITe=Object.freeze(Object.defineProperty({__proto__:null,Separator:mTe},Symbol.toStringTag,{value:"Module"})),yTe=a.defineComponent({__name:"Sheet",props:{open:{type:Boolean},defaultOpen:{type:Boolean},modal:{type:Boolean}},emits:["update:open"],setup(e,{emit:t}){const i=e,o=t,r=n.useForwardPropsEmits(i,o);return(e,t)=>(a.openBlock(),a.createBlock(a.unref(n.DialogRoot),a.mergeProps({"data-slot":"sheet"},a.unref(r)),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},16))}}),_Te=a.defineComponent({__name:"SheetClose",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e;return(e,i)=>(a.openBlock(),a.createBlock(a.unref(n.DialogClose),a.mergeProps({"data-slot":"sheet-close"},t),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},16))}}),FTe=a.defineComponent({__name:"SheetOverlay",props:{forceMount:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,i=xZ(t,"class");return(e,o)=>(a.openBlock(),a.createBlock(a.unref(n.DialogOverlay),a.mergeProps({"data-slot":"sheet-overlay",class:a.unref(Dt)("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80","grid place-items-center overflow-y-auto",t.class)},a.unref(i)),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},16,["class"]))}}),bTe=a.defineComponent({inheritAttrs:!1,__name:"SheetContent",props:{class:{},overlayClass:{},side:{default:"right"},forceMount:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const i=e,o=t,r=xZ(i,"class","side"),s=n.useForwardPropsEmits(r,o);return(e,t)=>(a.openBlock(),a.createBlock(a.unref(n.DialogPortal),null,{default:a.withCtx(()=>[a.createVNode(FTe,{class:a.normalizeClass(e.overlayClass)},{default:a.withCtx(()=>[a.createVNode(a.unref(n.DialogContent),a.mergeProps({"data-slot":"sheet-content",class:a.unref(Dt)("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out absolute z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500","right"===e.side&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-fit min-h-full w-3/4 border-l sm:max-w-sm","left"===e.side&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-fit min-h-full w-3/4 border-r sm:max-w-sm","top"===e.side&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b","bottom"===e.side&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",i.class)},{...a.unref(s),...e.$attrs}),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default"),a.createVNode(a.unref(n.DialogClose),{class:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none"},{default:a.withCtx(()=>[a.createVNode(a.unref(fM),{class:"size-4"}),t[0]||(t[0]=a.createElementVNode("span",{class:"sr-only"},"Close",-1))]),_:1,__:[0]})]),_:3},16,["class"])]),_:3},8,["class"])]),_:3}))}}),vTe=a.defineComponent({__name:"SheetDescription",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,i=xZ(t,"class");return(e,o)=>(a.openBlock(),a.createBlock(a.unref(n.DialogDescription),a.mergeProps({"data-slot":"sheet-description",class:a.unref(Dt)("text-muted-foreground text-sm",t.class)},a.unref(i)),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},16,["class"]))}}),kTe=a.defineComponent({__name:"SheetFooter",props:{class:{}},setup(e){const t=e;return(e,n)=>(a.openBlock(),a.createElementBlock("div",{"data-slot":"sheet-footer",class:a.normalizeClass(a.unref(Dt)("mt-auto flex flex-col gap-2 p-4",t.class))},[a.renderSlot(e.$slots,"default")],2))}}),wTe=a.defineComponent({__name:"SheetHeader",props:{class:{}},setup(e){const t=e;return(e,n)=>(a.openBlock(),a.createElementBlock("div",{"data-slot":"sheet-header",class:a.normalizeClass(a.unref(Dt)("flex flex-col gap-1.5 p-4",t.class))},[a.renderSlot(e.$slots,"default")],2))}}),xTe=a.defineComponent({__name:"SheetTitle",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,i=xZ(t,"class");return(e,o)=>(a.openBlock(),a.createBlock(a.unref(n.DialogTitle),a.mergeProps({"data-slot":"sheet-title",class:a.unref(Dt)("text-foreground font-semibold",t.class)},a.unref(i)),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},16,["class"]))}}),OTe=a.defineComponent({__name:"SheetTrigger",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e;return(e,i)=>(a.openBlock(),a.createBlock(a.unref(n.DialogTrigger),a.mergeProps({"data-slot":"sheet-trigger"},t),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},16))}}),ETe=Object.freeze(Object.defineProperty({__proto__:null,Sheet:yTe,SheetClose:_Te,SheetContent:bTe,SheetDescription:vTe,SheetFooter:kTe,SheetHeader:wTe,SheetTitle:xTe,SheetTrigger:OTe},Symbol.toStringTag,{value:"Module"})),[DTe,MTe]=n.createContext("Sidebar"),STe={class:"flex h-full w-full flex-col"},BTe=["data-state","data-collapsible","data-variant","data-side"],jTe={"data-sidebar":"sidebar",class:"bg-sidebar group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm"},TTe=a.defineComponent({inheritAttrs:!1,__name:"Sidebar",props:{side:{default:"left"},variant:{default:"sidebar"},collapsible:{default:"offcanvas"},class:{}},setup(e){const t=e,{isMobile:n,state:i,openMobile:o,setOpenMobile:r}=DTe();return(e,s)=>"none"===e.collapsible?(a.openBlock(),a.createElementBlock("div",a.mergeProps({key:0,"data-slot":"sidebar",class:a.unref(Dt)("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",t.class)},e.$attrs),[a.renderSlot(e.$slots,"default")],16)):a.unref(n)?(a.openBlock(),a.createBlock(a.unref(yTe),a.mergeProps({key:1,open:a.unref(o)},e.$attrs,{"onUpdate:open":a.unref(r)}),{default:a.withCtx(()=>[a.createVNode(a.unref(bTe),{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",side:e.side,class:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:a.normalizeStyle({"--sidebar-width":a.unref("18rem")})},{default:a.withCtx(()=>[a.createVNode(wTe,{class:"sr-only"},{default:a.withCtx(()=>[a.createVNode(xTe,null,{default:a.withCtx(()=>s[0]||(s[0]=[a.createTextVNode("Sidebar")])),_:1,__:[0]}),a.createVNode(vTe,null,{default:a.withCtx(()=>s[1]||(s[1]=[a.createTextVNode("Displays the mobile sidebar.")])),_:1,__:[1]})]),_:1}),a.createElementVNode("div",STe,[a.renderSlot(e.$slots,"default")])]),_:3},8,["side","style"])]),_:3},16,["open","onUpdate:open"])):(a.openBlock(),a.createElementBlock("div",{key:2,class:"group peer text-sidebar-foreground hidden md:block","data-slot":"sidebar","data-state":a.unref(i),"data-collapsible":"collapsed"===a.unref(i)?e.collapsible:"","data-variant":e.variant,"data-side":e.side},[a.createElementVNode("div",{class:a.normalizeClass(a.unref(Dt)("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180","floating"===e.variant||"inset"===e.variant?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)"))},null,2),a.createElementVNode("div",a.mergeProps({class:a.unref(Dt)("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex","left"===e.side?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]","floating"===e.variant||"inset"===e.variant?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",t.class)},e.$attrs),[a.createElementVNode("div",jTe,[a.renderSlot(e.$slots,"default")])],16)],8,BTe))}}),NTe=a.defineComponent({__name:"SidebarContent",props:{class:{}},setup(e){const t=e;return(e,n)=>(a.openBlock(),a.createElementBlock("div",{"data-slot":"sidebar-content","data-sidebar":"content",class:a.normalizeClass(a.unref(Dt)("flex min-h-0 flex-1 flex-col gap-2 overflow-y-auto overflow-x-hidden",t.class))},[a.renderSlot(e.$slots,"default")],2))}}),PTe=a.defineComponent({__name:"SidebarFooter",props:{class:{}},setup(e){const t=e;return(e,n)=>(a.openBlock(),a.createElementBlock("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",class:a.normalizeClass(a.unref(Dt)("flex flex-col gap-2 p-2",t.class))},[a.renderSlot(e.$slots,"default")],2))}}),VTe=a.defineComponent({__name:"SidebarGroup",props:{class:{}},setup(e){const t=e;return(e,n)=>(a.openBlock(),a.createElementBlock("div",{"data-slot":"sidebar-group","data-sidebar":"group",class:a.normalizeClass(a.unref(Dt)("relative flex w-full min-w-0 flex-col p-2",t.class))},[a.renderSlot(e.$slots,"default")],2))}}),RTe=a.defineComponent({__name:"SidebarGroupAction",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e;return(e,i)=>(a.openBlock(),a.createBlock(a.unref(n.Primitive),{"data-slot":"sidebar-group-action","data-sidebar":"group-action",as:e.as,"as-child":e.asChild,class:a.normalizeClass(a.unref(Dt)("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 md:after:hidden","group-data-[collapsible=icon]:hidden",t.class))},{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},8,["as","as-child","class"]))}}),qTe=a.defineComponent({__name:"SidebarGroupContent",props:{class:{}},setup(e){const t=e;return(e,n)=>(a.openBlock(),a.createElementBlock("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",class:a.normalizeClass(a.unref(Dt)("w-full text-sm",t.class))},[a.renderSlot(e.$slots,"default")],2))}}),zTe=a.defineComponent({__name:"SidebarGroupLabel",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e;return(e,i)=>(a.openBlock(),a.createBlock(a.unref(n.Primitive),{"data-slot":"sidebar-group-label","data-sidebar":"group-label",as:e.as,"as-child":e.asChild,class:a.normalizeClass(a.unref(Dt)("text-sidebar-foreground/70 ring-sidebar-ring flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",t.class))},{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},8,["as","as-child","class"]))}}),QTe=a.defineComponent({__name:"SidebarHeader",props:{class:{}},setup(e){const t=e;return(e,n)=>(a.openBlock(),a.createElementBlock("div",{"data-slot":"sidebar-header","data-sidebar":"header",class:a.normalizeClass(a.unref(Dt)("flex flex-col gap-2 p-2",t.class))},[a.renderSlot(e.$slots,"default")],2))}}),LTe=a.defineComponent({__name:"SidebarInput",props:{class:{}},setup(e){const t=e;return(e,n)=>(a.openBlock(),a.createBlock(a.unref(rke),{"data-slot":"sidebar-input","data-sidebar":"input",class:a.normalizeClass(a.unref(Dt)("bg-background h-8 w-full shadow-none",t.class))},{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},8,["class"]))}}),ZTe=a.defineComponent({__name:"SidebarInset",props:{class:{}},setup(e){const t=e;return(e,n)=>(a.openBlock(),a.createElementBlock("main",{"data-slot":"sidebar-inset",class:a.normalizeClass(a.unref(Dt)("bg-background-accent relative flex w-full min-w-0 flex-1 flex-col","md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",t.class))},[a.renderSlot(e.$slots,"default")],2))}}),HTe=a.defineComponent({__name:"SidebarMenu",props:{class:{}},setup(e){const t=e;return(e,n)=>(a.openBlock(),a.createElementBlock("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",class:a.normalizeClass(a.unref(Dt)("flex w-full min-w-0 flex-col gap-1",t.class))},[a.renderSlot(e.$slots,"default")],2))}}),GTe=a.defineComponent({__name:"SidebarMenuAction",props:{asChild:{type:Boolean},as:{default:"button"},showOnHover:{type:Boolean},class:{}},setup(e){const t=e;return(e,i)=>(a.openBlock(),a.createBlock(a.unref(n.Primitive),{"data-slot":"sidebar-menu-action","data-sidebar":"menu-action",class:a.normalizeClass(a.unref(Dt)("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground peer-hover/menu-button:text-sidebar-accent-foreground absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 md:after:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",e.showOnHover&&"peer-data-[active=true]/menu-button:text-sidebar-accent-foreground group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 md:opacity-0",t.class)),as:e.as,"as-child":e.asChild},{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},8,["class","as","as-child"]))}}),YTe=a.defineComponent({__name:"SidebarMenuBadge",props:{class:{}},setup(e){const t=e;return(e,n)=>(a.openBlock(),a.createElementBlock("div",{"data-slot":"sidebar-menu-badge","data-sidebar":"menu-badge",class:a.normalizeClass(a.unref(Dt)("text-sidebar-foreground pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums select-none","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",t.class))},[a.renderSlot(e.$slots,"default")],2))}}),UTe=a.defineComponent({__name:"Tooltip",props:{defaultOpen:{type:Boolean},open:{type:Boolean},delayDuration:{},disableHoverableContent:{type:Boolean},disableClosingTrigger:{type:Boolean},disabled:{type:Boolean},ignoreNonKeyboardFocus:{type:Boolean}},emits:["update:open"],setup(e,{emit:t}){const i=e,o=t,r=n.useForwardPropsEmits(i,o);return(e,t)=>(a.openBlock(),a.createBlock(a.unref(n.TooltipRoot),a.mergeProps({"data-slot":"tooltip"},a.unref(r)),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},16))}}),WTe=a.defineComponent({inheritAttrs:!1,__name:"TooltipContent",props:{forceMount:{type:Boolean},ariaLabel:{},asChild:{type:Boolean},as:{},side:{},sideOffset:{default:4},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},class:{}},emits:["escapeKeyDown","pointerDownOutside"],setup(e,{emit:t}){const i=e,o=t,r=xZ(i,"class"),s=n.useForwardPropsEmits(r,o);return(e,t)=>(a.openBlock(),a.createBlock(a.unref(n.TooltipPortal),null,{default:a.withCtx(()=>[a.createVNode(a.unref(n.TooltipContent),a.mergeProps({"data-slot":"tooltip-content"},{...a.unref(s),...e.$attrs},{class:a.unref(Dt)("bg-primary text-primary-foreground 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 z-50 w-fit rounded-md px-3 py-1.5 text-xs text-balance",i.class)}),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default"),a.createVNode(a.unref(n.TooltipArrow),{class:"bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]),_:3},16,["class"])]),_:3}))}}),XTe=a.defineComponent({__name:"TooltipProvider",props:{delayDuration:{default:0},skipDelayDuration:{},disableHoverableContent:{type:Boolean},disableClosingTrigger:{type:Boolean},disabled:{type:Boolean},ignoreNonKeyboardFocus:{type:Boolean}},setup(e){const t=e;return(e,i)=>(a.openBlock(),a.createBlock(a.unref(n.TooltipProvider),a.normalizeProps(a.guardReactiveProps(t)),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},16))}}),KTe=a.defineComponent({__name:"TooltipTrigger",props:{reference:{},asChild:{type:Boolean},as:{}},setup(e){const t=e;return(e,i)=>(a.openBlock(),a.createBlock(a.unref(n.TooltipTrigger),a.mergeProps({"data-slot":"tooltip-trigger"},t),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},16))}}),JTe=Object.freeze(Object.defineProperty({__proto__:null,Tooltip:UTe,TooltipContent:WTe,TooltipProvider:XTe,TooltipTrigger:KTe},Symbol.toStringTag,{value:"Module"})),$Te=a.defineComponent({__name:"SidebarMenuButtonChild",props:{variant:{default:"default"},size:{default:"default"},isActive:{type:Boolean},class:{},asChild:{type:Boolean},as:{default:"button"}},setup(e){const t=e;return(e,i)=>(a.openBlock(),a.createBlock(a.unref(n.Primitive),a.mergeProps({"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":e.size,"data-active":e.isActive,class:a.unref(Dt)(a.unref(cNe)({variant:e.variant,size:e.size}),t.class),as:e.as,"as-child":e.asChild},e.$attrs),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},16,["data-size","data-active","class","as","as-child"]))}}),eNe=a.defineComponent({inheritAttrs:!1,__name:"SidebarMenuButton",props:{variant:{default:"default"},size:{default:"default"},isActive:{type:Boolean},class:{},asChild:{type:Boolean},as:{default:"button"},tooltip:{}},setup(e){const t=e,{isMobile:n,state:i}=DTe(),o=a.computed(()=>{const{tooltip:e,...a}=t;return a});return(e,t)=>e.tooltip?(a.openBlock(),a.createBlock(a.unref(UTe),{key:1},{default:a.withCtx(()=>[a.createVNode(a.unref(KTe),{"as-child":""},{default:a.withCtx(()=>[a.createVNode($Te,a.normalizeProps(a.guardReactiveProps({...o.value,...e.$attrs})),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},16)]),_:3}),a.createVNode(a.unref(WTe),{side:"right",align:"center",hidden:"collapsed"!==a.unref(i)||a.unref(n)},{default:a.withCtx(()=>["string"==typeof e.tooltip?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[a.createTextVNode(a.toDisplayString(e.tooltip),1)],64)):(a.openBlock(),a.createBlock(a.resolveDynamicComponent(e.tooltip),{key:1}))]),_:1},8,["hidden"])]),_:3})):(a.openBlock(),a.createBlock($Te,a.normalizeProps(a.mergeProps({key:0},{...o.value,...e.$attrs})),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},16))}}),tNe=a.defineComponent({__name:"SidebarMenuItem",props:{class:{}},setup(e){const t=e;return(e,n)=>(a.openBlock(),a.createElementBlock("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",class:a.normalizeClass(a.unref(Dt)("group/menu-item relative",t.class))},[a.renderSlot(e.$slots,"default")],2))}}),aNe=a.defineComponent({__name:"Skeleton",props:{class:{}},setup(e){const t=e;return(e,n)=>(a.openBlock(),a.createElementBlock("div",{"data-slot":"skeleton",class:a.normalizeClass(a.unref(Dt)("animate-pulse rounded-md bg-primary/10",t.class))},null,2))}}),nNe=Object.freeze(Object.defineProperty({__proto__:null,Skeleton:aNe},Symbol.toStringTag,{value:"Module"})),iNe=a.defineComponent({__name:"SidebarMenuSkeleton",props:{showIcon:{type:Boolean},class:{}},setup(e){const t=e,n=a.computed(()=>`${Math.floor(40*Math.random())+50}%`);return(e,i)=>(a.openBlock(),a.createElementBlock("div",{"data-slot":"sidebar-menu-skeleton","data-sidebar":"menu-skeleton",class:a.normalizeClass(a.unref(Dt)("flex h-8 items-center gap-2 rounded-md px-2",t.class))},[e.showIcon?(a.openBlock(),a.createBlock(a.unref(aNe),{key:0,class:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"})):a.createCommentVNode("",!0),a.createVNode(a.unref(aNe),{class:"h-4 max-w-(--skeleton-width) flex-1","data-sidebar":"menu-skeleton-text",style:a.normalizeStyle({"--skeleton-width":n.value})},null,8,["style"])],2))}}),oNe=a.defineComponent({__name:"SidebarMenuSub",props:{class:{}},setup(e){const t=e;return(e,n)=>(a.openBlock(),a.createElementBlock("ul",{"data-slot":"sidebar-menu-sub","data-sidebar":"menu-badge",class:a.normalizeClass(a.unref(Dt)("border-sidebar-border mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",t.class))},[a.renderSlot(e.$slots,"default")],2))}}),rNe=a.defineComponent({__name:"SidebarMenuSubButton",props:{asChild:{type:Boolean},as:{default:"a"},size:{default:"md"},isActive:{type:Boolean},class:{}},setup(e){const t=e;return(e,i)=>(a.openBlock(),a.createBlock(a.unref(n.Primitive),{"data-slot":"sidebar-menu-sub-button","data-sidebar":"menu-sub-button",as:e.as,"as-child":e.asChild,"data-size":e.size,"data-active":e.isActive,class:a.normalizeClass(a.unref(Dt)("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground [&>svg]:text-sidebar-accent-foreground flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 outline-hidden focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground","sm"===e.size&&"text-xs","md"===e.size&&"text-sm","group-data-[collapsible=icon]:hidden",t.class))},{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},8,["as","as-child","data-size","data-active","class"]))}}),sNe=a.defineComponent({__name:"SidebarMenuSubItem",props:{class:{}},setup(e){const t=e;return(e,n)=>(a.openBlock(),a.createElementBlock("li",{"data-slot":"sidebar-menu-sub-item","data-sidebar":"menu-sub-item",class:a.normalizeClass(a.unref(Dt)("group/menu-sub-item relative",t.class))},[a.renderSlot(e.$slots,"default")],2))}}),lNe=a.defineComponent({__name:"SidebarProvider",props:{defaultOpen:{type:Boolean,default:!0},open:{type:Boolean,default:void 0},class:{}},emits:["update:open"],setup(e,{emit:t}){const i=e,o=t,r=function(e,t={}){const{window:n=BZ,ssrWidth:i=VZ()}=t,o=NZ(()=>n&&"matchMedia"in n&&"function"==typeof n.matchMedia),r=a.shallowRef("number"==typeof i),s=a.shallowRef(),l=a.shallowRef(!1);return a.watchEffect(()=>{if(r.value){r.value=!o.value;const t=a.toValue(e).split(",");return void(l.value=t.some(e=>{const t=e.includes("not all"),a=e.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),n=e.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/);let o=Boolean(a||n);return a&&o&&(o=i>=DZ(a[1])),n&&o&&(o=i<=DZ(n[1])),t?!o:o}))}o.value&&(s.value=n.matchMedia(a.toValue(e)),l.value=s.value.matches)}),TZ(s,"change",e=>{l.value=e.matches},{passive:!0}),a.computed(()=>l.value)}("(max-width: 768px)"),s=a.ref(!1),l=zZ(i,"open",o,{defaultValue:i.defaultOpen??!1,passive:void 0===i.open});function g(e){l.value=e,document.cookie=`sidebar:state=${l.value}; path=/; max-age=604800`}function u(e){s.value=e}function d(){return r.value?u(!s.value):g(!l.value)}TZ("keydown",e=>{"b"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),d())});const c=a.computed(()=>l.value?"expanded":"collapsed");return MTe({state:c,open:l,setOpen:g,isMobile:r,openMobile:s,setOpenMobile:u,toggleSidebar:d}),(e,t)=>(a.openBlock(),a.createBlock(a.unref(n.TooltipProvider),{"delay-duration":0},{default:a.withCtx(()=>[a.createElementVNode("div",a.mergeProps({"data-slot":"sidebar-wrapper",style:{"--sidebar-width":a.unref("16rem"),"--sidebar-width-icon":a.unref("3rem")},class:a.unref(Dt)("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full",i.class)},e.$attrs),[a.renderSlot(e.$slots,"default")],16)]),_:3}))}}),gNe=a.defineComponent({__name:"SidebarRail",props:{class:{}},setup(e){const t=e,{toggleSidebar:n}=DTe();return(e,i)=>(a.openBlock(),a.createElementBlock("button",{"data-sidebar":"rail","data-slot":"sidebar-rail","aria-label":"Toggle Sidebar",tabindex:-1,title:"Toggle Sidebar",class:a.normalizeClass(a.unref(Dt)("hover:after:bg-sidebar-border absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] sm:flex","in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","hover:group-data-[collapsible=offcanvas]:bg-sidebar group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",t.class)),onClick:i[0]||(i[0]=(...e)=>a.unref(n)&&a.unref(n)(...e))},[a.renderSlot(e.$slots,"default")],2))}}),uNe=a.defineComponent({__name:"SidebarSeparator",props:{class:{}},setup(e){const t=e;return(e,n)=>(a.openBlock(),a.createBlock(a.unref(mTe),{"data-slot":"sidebar-separator","data-sidebar":"separator",class:a.normalizeClass(a.unref(Dt)("bg-sidebar-border mx-2 w-auto",t.class))},{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},8,["class"]))}}),dNe=a.defineComponent({__name:"SidebarTrigger",props:{class:{}},setup(e){const t=e,{toggleSidebar:n}=DTe();return(e,i)=>(a.openBlock(),a.createBlock(a.unref(EM),{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon",class:a.normalizeClass(a.unref(Dt)("h-7 w-7",t.class)),onClick:a.unref(n)},{default:a.withCtx(()=>[a.createVNode(a.unref(C_)),i[0]||(i[0]=a.createElementVNode("span",{class:"sr-only"},"Toggle Sidebar",-1))]),_:1,__:[0]},8,["class","onClick"]))}}),cNe=i.cva("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}}),hNe=Object.freeze(Object.defineProperty({__proto__:null,Sidebar:TTe,SidebarContent:NTe,SidebarFooter:PTe,SidebarGroup:VTe,SidebarGroupAction:RTe,SidebarGroupContent:qTe,SidebarGroupLabel:zTe,SidebarHeader:QTe,SidebarInput:LTe,SidebarInset:ZTe,SidebarMenu:HTe,SidebarMenuAction:GTe,SidebarMenuBadge:YTe,SidebarMenuButton:eNe,SidebarMenuItem:tNe,SidebarMenuSkeleton:iNe,SidebarMenuSub:oNe,SidebarMenuSubButton:rNe,SidebarMenuSubItem:sNe,SidebarProvider:lNe,SidebarRail:gNe,SidebarSeparator:uNe,SidebarTrigger:dNe,sidebarMenuButtonVariants:cNe,useSidebar:DTe},Symbol.toStringTag,{value:"Module"})),fNe=a.defineComponent({__name:"Sonner",props:{invert:{type:Boolean},theme:{},position:{},hotkey:{},richColors:{type:Boolean},expand:{type:Boolean},duration:{},gap:{},visibleToasts:{},closeButton:{type:Boolean},toastOptions:{},class:{},style:{},offset:{},dir:{},icons:{},containerAriaLabel:{},pauseWhenPageIsHidden:{type:Boolean},cn:{type:Function}},setup(e){const t=e;return(e,n)=>(a.openBlock(),a.createBlock(a.unref(A4),a.mergeProps({class:"toaster group"},t,{style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)"}}),null,16))}}),pNe=Object.freeze(Object.defineProperty({__proto__:null,Toaster:fNe},Symbol.toStringTag,{value:"Module"})),ANe=e=>t=>"string"==typeof t&&t.startsWith(e),CNe=ANe("--"),mNe=ANe("var(--"),INe=e=>!!mNe(e)&&yNe.test(e.split("/*")[0].trim()),yNe=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,_Ne={};function FNe(e){for(const t in e)_Ne[t]=e[t],CNe(t)&&(_Ne[t].isCSSVariable=!0)}function bNe(e,t){const n=Symbol("string"!=typeof e||t?t:`${e}Context`);return[t=>{const i=a.inject(n,t);if(void 0===i)throw new Error(`Injection \`${n.toString()}\` not found. Component must be used within ${Array.isArray(e)?`one of the following components: ${e.join(", ")}`:`\`${e}\``}`);return i},e=>(a.provide(n,e),e)]}const[vNe,kNe]=bNe("Motion"),[wNe,xNe]=bNe("LayoutGroup");function ONe(e){return null!==e&&"object"==typeof e&&"function"==typeof e.start}class ENe{constructor(e){this.state=e}beforeMount(){}mount(){}unmount(){}update(){}beforeUpdate(){}beforeUnmount(){}}var DNe=function(){},MNe=function(){};function SNe(e,t,a){if(Array.isArray(e))return e.reduce((e,n)=>{const i=SNe(n,t,a);return i?{...e,...i}:e},{});if("object"==typeof e)return e;if(e&&t){const n=t[e];return"function"==typeof n?n(a):n}}function BNe(e){return null==e?void 0:e.startsWith("--")}"production"!==process.env.NODE_ENV&&(DNe=function(e,t){e||"undefined"==typeof console||console.warn(t)},MNe=function(e,t){if(!e)throw new Error(t)});function jNe(e){return"number"==typeof e}const TNe=new Set(["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"]);function NNe(e){return TNe.has(e)}class PNe{constructor(e){this.features=[];const{features:t=[],lazyMotionContext:n}=e.options,i=t.concat(n.features.value);this.features=i.map(t=>new t(e));const o=this.features;a.watch(n.features,t=>{t.forEach(t=>{if(!i.includes(t)){i.push(t);const a=new t(e);o.push(a),e.isMounted()&&(a.beforeMount(),a.mount())}})},{flush:"pre"})}mount(){this.features.forEach(e=>e.mount())}beforeMount(){this.features.forEach(e=>{var t;return null==(t=e.beforeMount)?void 0:t.call(e)})}unmount(){this.features.forEach(e=>e.unmount())}update(){this.features.forEach(e=>{var t;return null==(t=e.update)?void 0:t.call(e)})}beforeUpdate(){this.features.forEach(e=>e.beforeUpdate())}beforeUnmount(){this.features.forEach(e=>e.beforeUnmount())}}const VNe=new WeakMap,[RNe,qNe]=bNe("AnimatePresenceContext");const zNe=e=>e,QNe=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];const LNe={};function ZNe(e,t){let a=!1,n=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>a=!0,r=QNe.reduce((e,t)=>(e[t]=function(e){let t=new Set,a=new Set,n=!1,i=!1;const o=new WeakSet;let r={delta:0,timestamp:0,isProcessing:!1};function s(t){o.has(t)&&(l.schedule(t),e()),t(r)}const l={schedule:(e,i=!1,r=!1)=>{const s=r&&n?t:a;return i&&o.add(e),s.has(e)||s.add(e),e},cancel:e=>{a.delete(e),o.delete(e)},process:e=>{r=e,n?i=!0:(n=!0,[t,a]=[a,t],t.forEach(s),t.clear(),n=!1,i&&(i=!1,l.process(e)))}};return l}(o),e),{}),{setup:s,read:l,resolveKeyframes:g,preUpdate:u,update:d,preRender:c,render:h,postRender:f}=r,p=()=>{const o=LNe.useManualTiming?i.timestamp:performance.now();a=!1,LNe.useManualTiming||(i.delta=n?1e3/60:Math.max(Math.min(o-i.timestamp,40),1)),i.timestamp=o,i.isProcessing=!0,s.process(i),l.process(i),g.process(i),u.process(i),d.process(i),c.process(i),h.process(i),f.process(i),i.isProcessing=!1,a&&t&&(n=!1,e(p))};return{schedule:QNe.reduce((t,o)=>{const s=r[o];return t[o]=(t,o=!1,r=!1)=>(a||(a=!0,n=!0,i.isProcessing||e(p)),s.schedule(t,o,r)),t},{}),cancel:e=>{for(let t=0;t<QNe.length;t++)r[QNe[t]].cancel(e)},state:i,steps:r}}const{schedule:HNe,cancel:GNe,state:YNe,steps:UNe}=ZNe("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:zNe,!0),WNe=new WeakMap;let XNe=0;const KNe=new Set;class JNe{constructor(e,t){var a;this.element=null,this.isSafeToRemove=!1,this.isVShow=!1,this.children=new Set,this.activeStates={initial:!0,animate:!0},this.currentProcess=null,this._context=null,this.animateUpdates=zNe,this.id="motion-state-"+XNe++,this.options=e,this.parent=t,null==(a=null==t?void 0:t.children)||a.add(this),this.depth=(null==t?void 0:t.depth)+1||0;const n=!1===(void 0===e.initial&&e.variants?this.context.initial:e.initial)?["initial","animate"]:["initial"];this.initTarget(n),this.featureManager=new PNe(this),this.type=NNe(this.options.as)?"svg":"html"}get context(){if(!this._context){const e={get:(e,t)=>{var a,n;return"string"==typeof(n=this.options[t])||!1===n||Array.isArray(n)?this.options[t]:null==(a=this.parent)?void 0:a.context[t]}};this._context=new Proxy({},e)}return this._context}initTarget(e){var t;const a=this.options.custom??(null==(t=this.options.animatePresenceContext)?void 0:t.custom);this.baseTarget=e.reduce((e,t)=>({...e,...SNe(this.options[t]||this.context[t],this.options.variants,a)}),{}),this.target={}}updateOptions(e){var t;this.options=e,null==(t=this.visualElement)||t.update({...this.options,whileTap:this.options.whilePress},{isPresent:!VNe.has(this.element)})}beforeMount(){this.featureManager.beforeMount()}mount(e,t,a=!1){var n;MNe(Boolean(e),"Animation state must be mounted with valid Element"),this.element=e,this.updateOptions(t),this.featureManager.mount(),!a&&this.options.animate&&(null==(n=this.startAnimation)||n.call(this)),this.options.layoutId&&(KNe.add(this.options.layoutId),HNe.render(()=>{KNe.clear()}))}clearAnimation(){var e,t;this.currentProcess&&GNe(this.currentProcess),this.currentProcess=null,null==(t=null==(e=this.visualElement)?void 0:e.variantChildren)||t.forEach(e=>{e.state.clearAnimation()})}startAnimation(){this.clearAnimation(),this.currentProcess=HNe.render(()=>{this.currentProcess=null,this.animateUpdates()})}beforeUnmount(){this.featureManager.beforeUnmount()}unmount(e=!1){const t=this.options.layoutId&&!KNe.has(this.options.layoutId);(()=>{const a=()=>{var t,a,n;e&&Array.from(this.children).reverse().forEach(this.unmountChild),null==(a=null==(t=this.parent)?void 0:t.children)||a.delete(this),WNe.delete(this.element),this.featureManager.unmount(),null==(n=this.visualElement)||n.unmount(),this.clearAnimation()};t?Promise.resolve().then(a):a()})()}unmountChild(e){e.unmount(!0)}beforeUpdate(){this.featureManager.beforeUpdate()}update(e){this.updateOptions(e),this.featureManager.update(),this.startAnimation()}setActive(e,t,a=!0){var n;this.element&&this.activeStates[e]!==t&&(this.activeStates[e]=t,null==(n=this.visualElement.variantChildren)||n.forEach(a=>{a.state.setActive(e,t,!1)}),a&&this.animateUpdates({isFallback:!t&&"exit"!==e&&this.visualElement.isControllingVariants,isExit:"exit"===e&&this.activeStates.exit}))}isMounted(){return Boolean(this.element)}willUpdate(e){var t;(this.options.layout||this.options.layoutId)&&(null==(t=this.visualElement.projection)||t.willUpdate())}}const $Ne=new WeakMap;function ePe(e,t,a){return new CustomEvent(e,{detail:{target:t,isExit:a}})}const tPe={syntax:"<angle>",initialValue:"0deg",toDefaultUnit:e=>`${e}deg`},aPe={translate:{syntax:"<length-percentage>",initialValue:"0px",toDefaultUnit:e=>`${e}px`},rotate:tPe,scale:{syntax:"<number>",initialValue:1,toDefaultUnit:e=>e},skew:tPe},nPe=["","X","Y","Z"],iPe=new Map,oPe=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"];["translate","scale","rotate","skew"].forEach(e=>{nPe.forEach(t=>{oPe.push(e+t),iPe.set(e+t,aPe[e])})});const rPe=new Set(oPe),sPe=e=>rPe.has(e),lPe={x:"translateX",y:"translateY",z:"translateZ"};function gPe([e],[t]){return oPe.indexOf(e)-oPe.indexOf(t)}function uPe(e,[t,a]){return`${e} ${t}(${a})`}const dPe={translate:[0,0],rotate:0,scale:1,skew:0,x:0,y:0,z:0},cPe=e=>({test:t=>"string"==typeof t&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),hPe=cPe("deg"),fPe=cPe("%"),pPe=cPe("px"),APe=cPe("vh"),CPe=cPe("vw"),mPe=(()=>({...fPe,parse:e=>fPe.parse(e)/100,transform:e=>fPe.transform(100*e)}))(),IPe=e=>Boolean(e&&e.getVelocity),yPe=(e,t)=>{let a=BNe(t)?e.style.getPropertyValue(t):getComputedStyle(e)[t];if(!a&&"0"!==a){const e=iPe.get(t);e&&(a=e.initialValue)}return a};function _Pe(e){var t;const a={},n=[];for(let i in e){let o=e[i];o=IPe(o)?o.get():o,sPe(i)&&i in lPe&&(i=lPe[i]);let r=Array.isArray(o)?o[0]:o;const s=iPe.get(i);s?(r=jNe(o)?null==(t=s.toDefaultUnit)?void 0:t.call(s,o):o,n.push([i,r])):a[i]=r}return n.length&&(a.transform=function(e){return e.sort(gPe).reduce(uPe,"").trim()}(n)),0===Object.keys(a).length?null:a}const FPe={fill:!0,stroke:!0,opacity:!0,"stroke-width":!0,"fill-opacity":!0,"stroke-opacity":!0,"stroke-linecap":!0,"stroke-linejoin":!0,"stroke-dasharray":!0,"stroke-dashoffset":!0,cx:!0,cy:!0,r:!0,d:!0,x1:!0,y1:!0,x2:!0,y2:!0,points:!0,"path-length":!0,viewBox:!0,width:!0,height:!0,"preserve-aspect-ratio":!0,"clip-path":!0,filter:!0,mask:!0,"stop-color":!0,"stop-opacity":!0,"gradient-transform":!0,"gradient-units":!0,"spread-method":!0,"marker-end":!0,"marker-mid":!0,"marker-start":!0,"text-anchor":!0,"dominant-baseline":!0,"font-family":!0,"font-size":!0,"font-weight":!0,"letter-spacing":!0,"vector-effect":!0};function bPe(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}function vPe(e){const t={},a={};for(const n in e){const i=bPe(n);if(i in FPe){const a=e[n];t[i]=IPe(a)?a.get():a}else a[n]=e[n]}return void 0!==t["path-length"]&&function(e,t,a=1,n=0){e.pathLength=1,delete e["path-length"],e["stroke-dashoffset"]=pPe.transform(-n);const i=pPe.transform(t),o=pPe.transform(a);e["stroke-dasharray"]=`${i} ${o}`}(t,t["path-length"],t["path-spacing"],t["path-offset"]),{attrs:t,style:a}}"undefined"!=typeof WorkerGlobalScope&&(globalThis,WorkerGlobalScope);const kPe=e=>void 0!==e;const wPe={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"]},xPe={};for(const BHe in wPe)xPe[BHe]={isEnabled:e=>wPe[BHe].some(t=>!!e[t])};const OPe=()=>({x:{min:0,max:0},y:{min:0,max:0}}),EPe="undefined"!=typeof window,DPe={current:null},MPe={current:!1};const SPe=["initial","animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"];function BPe(e){return null!==(t=e.animate)&&"object"==typeof t&&"function"==typeof t.start||SPe.some(t=>function(e){return"string"==typeof e||Array.isArray(e)}(e[t]));var t}let jPe;function TPe(){jPe=void 0}const NPe={now:()=>(void 0===jPe&&NPe.set(YNe.isProcessing||LNe.useManualTiming?YNe.timestamp:performance.now()),jPe),set:e=>{jPe=e,queueMicrotask(TPe)}},PPe=new Set;function VPe(e,t,a){e||PPe.has(t)||(console.warn(t),PPe.add(t))}function RPe(e,t){-1===e.indexOf(t)&&e.push(t)}function qPe(e,t){const a=e.indexOf(t);a>-1&&e.splice(a,1)}class zPe{constructor(){this.subscriptions=[]}add(e){return RPe(this.subscriptions,e),()=>qPe(this.subscriptions,e)}notify(e,t,a){const n=this.subscriptions.length;if(n)if(1===n)this.subscriptions[0](e,t,a);else for(let i=0;i<n;i++){const n=this.subscriptions[i];n&&n(e,t,a)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function QPe(e,t){return t?e*(1e3/t):0}class LPe{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=(e,t=!0)=>{var a,n;const i=NPe.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(null==(a=this.events.change)||a.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty();t&&(null==(n=this.events.renderRequest)||n.notify(this.current))},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){var t;this.current=e,this.updatedAt=NPe.now(),null===this.canTrackVelocity&&void 0!==e&&(this.canTrackVelocity=(t=this.current,!isNaN(parseFloat(t))))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return"production"!==process.env.NODE_ENV&&VPe(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new zPe);const a=this.events[e].add(t);return"change"===e?()=>{a(),HNe.read(()=>{this.events.change.getSize()||this.stop()})}:a}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e,t=!0){t&&this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e,t)}setWithVelocity(e,t,a){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-a}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var e;null==(e=this.events.change)||e.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=NPe.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||e-this.updatedAt>30)return 0;const t=Math.min(this.updatedAt-this.prevUpdatedAt,30);return QPe(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var e,t;null==(e=this.dependents)||e.clear(),null==(t=this.events.destroy)||t.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function ZPe(e,t){return new LPe(e,t)}function HPe(e){const t=[{},{}];return null==e||e.values.forEach((e,a)=>{t[0][a]=e.get(),t[1][a]=e.getVelocity()}),t}function GPe(e,t,a,n){if("function"==typeof t){const[i,o]=HPe(n);t=t(void 0!==a?a:e.custom,i,o)}if("string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t){const[i,o]=HPe(n);t=t(void 0!==a?a:e.custom,i,o)}return t}const YPe=e=>180*e/Math.PI,UPe=e=>{const t=YPe(Math.atan2(e[1],e[0]));return XPe(t)},WPe={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:UPe,rotateZ:UPe,skewX:e=>YPe(Math.atan(e[1])),skewY:e=>YPe(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},XPe=e=>((e%=360)<0&&(e+=360),e),KPe=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),JPe=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),$Pe={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:KPe,scaleY:JPe,scale:e=>(KPe(e)+JPe(e))/2,rotateX:e=>XPe(YPe(Math.atan2(e[6],e[5]))),rotateY:e=>XPe(YPe(Math.atan2(-e[2],e[0]))),rotateZ:UPe,rotate:UPe,skewX:e=>YPe(Math.atan(e[4])),skewY:e=>YPe(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function eVe(e){return e.includes("scale")?1:0}function tVe(e,t){if(!e||"none"===e)return eVe(t);const a=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let n,i;if(a)n=$Pe,i=a;else{const t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);n=WPe,i=t}if(!i)return eVe(t);const o=n[t],r=i[1].split(",").map(aVe);return"function"==typeof o?o(r):r[o]}function aVe(e){return parseFloat(e.trim())}const nVe=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],iVe=(()=>new Set(nVe))(),oVe=(e,t,a)=>a>t?t:a<e?e:a,rVe={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},sVe={...rVe,transform:e=>oVe(0,1,e)},lVe={...rVe,default:1},gVe=e=>e===rVe||e===pPe,uVe=new Set(["x","y","z"]),dVe=nVe.filter(e=>!uVe.has(e));const cVe={width:({x:e},{paddingLeft:t="0",paddingRight:a="0"})=>e.max-e.min-parseFloat(t)-parseFloat(a),height:({y:e},{paddingTop:t="0",paddingBottom:a="0"})=>e.max-e.min-parseFloat(t)-parseFloat(a),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>tVe(t,"x"),y:(e,{transform:t})=>tVe(t,"y")};cVe.translateX=cVe.x,cVe.translateY=cVe.y;const hVe=new Set;let fVe=!1,pVe=!1,AVe=!1;function CVe(){if(pVe){const e=Array.from(hVe).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),a=new Map;t.forEach(e=>{const t=function(e){const t=[];return dVe.forEach(a=>{const n=e.getValue(a);void 0!==n&&(t.push([a,n.get()]),n.set(a.startsWith("scale")?1:0))}),t}(e);t.length&&(a.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();const t=a.get(e);t&&t.forEach(([t,a])=>{var n;null==(n=e.getValue(t))||n.set(a)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{void 0!==e.suspendedScrollY&&window.scrollTo(0,e.suspendedScrollY)})}pVe=!1,fVe=!1,hVe.forEach(e=>e.complete(AVe)),hVe.clear()}function mVe(){hVe.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(pVe=!0)})}class IVe{constructor(e,t,a,n,i,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=a,this.motionValue=n,this.element=i,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(hVe.add(this),fVe||(fVe=!0,HNe.read(mVe),HNe.resolveKeyframes(CVe))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:t,element:a,motionValue:n}=this;if(null===e[0]){const i=null==n?void 0:n.get(),o=e[e.length-1];if(void 0!==i)e[0]=i;else if(a&&t){const n=a.readValue(t,o);null!=n&&(e[0]=n)}void 0===e[0]&&(e[0]=o),n&&void 0===i&&n.set(e[0])}!function(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),hVe.delete(this)}cancel(){"scheduled"===this.state&&(hVe.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}const yVe=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),_Ve=e=>/^0[^.\s]+$/u.test(e),FVe=e=>Math.round(1e5*e)/1e5,bVe=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const vVe=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,kVe=(e,t)=>a=>Boolean("string"==typeof a&&vVe.test(a)&&a.startsWith(e)||t&&!function(e){return null==e}(a)&&Object.prototype.hasOwnProperty.call(a,t)),wVe=(e,t,a)=>n=>{if("string"!=typeof n)return n;const[i,o,r,s]=n.match(bVe);return{[e]:parseFloat(i),[t]:parseFloat(o),[a]:parseFloat(r),alpha:void 0!==s?parseFloat(s):1}},xVe={...rVe,transform:e=>Math.round((e=>oVe(0,255,e))(e))},OVe={test:kVe("rgb","red"),parse:wVe("red","green","blue"),transform:({red:e,green:t,blue:a,alpha:n=1})=>"rgba("+xVe.transform(e)+", "+xVe.transform(t)+", "+xVe.transform(a)+", "+FVe(sVe.transform(n))+")"};const EVe={test:kVe("#"),parse:function(e){let t="",a="",n="",i="";return e.length>5?(t=e.substring(1,3),a=e.substring(3,5),n=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),a=e.substring(2,3),n=e.substring(3,4),i=e.substring(4,5),t+=t,a+=a,n+=n,i+=i),{red:parseInt(t,16),green:parseInt(a,16),blue:parseInt(n,16),alpha:i?parseInt(i,16)/255:1}},transform:OVe.transform},DVe={test:kVe("hsl","hue"),parse:wVe("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:a,alpha:n=1})=>"hsla("+Math.round(e)+", "+fPe.transform(FVe(t))+", "+fPe.transform(FVe(a))+", "+FVe(sVe.transform(n))+")"},MVe={test:e=>OVe.test(e)||EVe.test(e)||DVe.test(e),parse:e=>OVe.test(e)?OVe.parse(e):DVe.test(e)?DVe.parse(e):EVe.parse(e),transform:e=>"string"==typeof e?e:e.hasOwnProperty("red")?OVe.transform(e):DVe.transform(e),getAnimatableNone:e=>{const t=MVe.parse(e);return t.alpha=0,MVe.transform(t)}},SVe=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const BVe="number",jVe="color",TVe=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function NVe(e){const t=e.toString(),a=[],n={color:[],number:[],var:[]},i=[];let o=0;const r=t.replace(TVe,e=>(MVe.test(e)?(n.color.push(o),i.push(jVe),a.push(MVe.parse(e))):e.startsWith("var(")?(n.var.push(o),i.push("var"),a.push(e)):(n.number.push(o),i.push(BVe),a.push(parseFloat(e))),++o,"${}")).split("${}");return{values:a,split:r,indexes:n,types:i}}function PVe(e){return NVe(e).values}function VVe(e){const{split:t,types:a}=NVe(e),n=t.length;return e=>{let i="";for(let o=0;o<n;o++)if(i+=t[o],void 0!==e[o]){const t=a[o];i+=t===BVe?FVe(e[o]):t===jVe?MVe.transform(e[o]):e[o]}return i}}const RVe=e=>"number"==typeof e?0:MVe.test(e)?MVe.getAnimatableNone(e):e;const qVe={test:function(e){var t,a;return isNaN(e)&&"string"==typeof e&&((null==(t=e.match(bVe))?void 0:t.length)||0)+((null==(a=e.match(SVe))?void 0:a.length)||0)>0},parse:PVe,createTransformer:VVe,getAnimatableNone:function(e){const t=PVe(e);return VVe(e)(t.map(RVe))}},zVe=e=>t=>t.test(e),QVe=[rVe,pPe,fPe,hPe,CPe,APe,{test:e=>"auto"===e,parse:e=>e}],LVe=e=>QVe.find(zVe(e)),ZVe=[...QVe,MVe,qVe],HVe=new Set(["brightness","contrast","saturate","opacity"]);function GVe(e){const[t,a]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;const[n]=a.match(bVe)||[];if(!n)return e;const i=a.replace(n,"");let o=HVe.has(t)?1:0;return n!==a&&(o*=100),t+"("+o+i+")"}const YVe=/\b([a-z-]*)\(.*?\)/gu,UVe={...qVe,getAnimatableNone:e=>{const t=e.match(YVe);return t?t.map(GVe).join(" "):e}},WVe={...rVe,transform:Math.round},XVe={borderWidth:pPe,borderTopWidth:pPe,borderRightWidth:pPe,borderBottomWidth:pPe,borderLeftWidth:pPe,borderRadius:pPe,radius:pPe,borderTopLeftRadius:pPe,borderTopRightRadius:pPe,borderBottomRightRadius:pPe,borderBottomLeftRadius:pPe,width:pPe,maxWidth:pPe,height:pPe,maxHeight:pPe,top:pPe,right:pPe,bottom:pPe,left:pPe,padding:pPe,paddingTop:pPe,paddingRight:pPe,paddingBottom:pPe,paddingLeft:pPe,margin:pPe,marginTop:pPe,marginRight:pPe,marginBottom:pPe,marginLeft:pPe,backgroundPositionX:pPe,backgroundPositionY:pPe,...{rotate:hPe,rotateX:hPe,rotateY:hPe,rotateZ:hPe,scale:lVe,scaleX:lVe,scaleY:lVe,scaleZ:lVe,skew:hPe,skewX:hPe,skewY:hPe,distance:pPe,translateX:pPe,translateY:pPe,translateZ:pPe,x:pPe,y:pPe,z:pPe,perspective:pPe,transformPerspective:pPe,opacity:sVe,originX:mPe,originY:mPe,originZ:pPe},zIndex:WVe,fillOpacity:sVe,strokeOpacity:sVe,numOctaves:WVe},KVe={...XVe,color:MVe,backgroundColor:MVe,outlineColor:MVe,fill:MVe,stroke:MVe,borderColor:MVe,borderTopColor:MVe,borderRightColor:MVe,borderBottomColor:MVe,borderLeftColor:MVe,filter:UVe,WebkitFilter:UVe},JVe=e=>KVe[e];function $Ve(e,t){let a=JVe(e);return a!==UVe&&(a=qVe),a.getAnimatableNone?a.getAnimatableNone(t):void 0}const eRe=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class tRe{scrapeMotionValuesFromProps(e,t,a){return{}}constructor({parent:e,props:t,presenceContext:a,reducedMotionConfig:n,blockInitialAnimation:i,visualState:o},r={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=IVe,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const e=NPe.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,HNe.render(this.render,!1,!0))};const{latestValues:s,renderState:l}=o;this.latestValues=s,this.baseTarget={...s},this.initialValues=t.initial?{...s}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=a,this.depth=e?e.depth+1:0,this.reducedMotionConfig=n,this.options=r,this.blockInitialAnimation=Boolean(i),this.isControllingVariants=BPe(t),this.isVariantNode=function(e){return Boolean(BPe(e)||e.variants)}(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(e&&e.current);const{willChange:g,...u}=this.scrapeMotionValuesFromProps(t,{},this);for(const d in u){const e=u[d];void 0!==s[d]&&IPe(e)&&e.set(s[d],!1)}}mount(e){this.current=e,$Ne.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),MPe.current||function(){if(MPe.current=!0,EPe)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>DPe.current=e.matches;e.addEventListener("change",t),t()}else DPe.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||DPe.current),"production"!==process.env.NODE_ENV&&VPe(!0!==this.shouldReduceMotion,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),GNe(this.notifyUpdate),GNe(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}bindToMotionValue(e,t){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const a=iVe.has(e);a&&this.onBindTransform&&this.onBindTransform();const n=t.on("change",t=>{this.latestValues[e]=t,this.props.onUpdate&&HNe.preRender(this.notifyUpdate),a&&this.projection&&(this.projection.isTransformDirty=!0)}),i=t.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{n(),i(),o&&o(),t.owner&&t.stop()})}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}updateFeatures(){let e="animation";for(e in xPe){const t=xPe[e];if(!t)continue;const{isEnabled:a,Feature:n}=t;if(!this.features[e]&&n&&a(this.props)&&(this.features[e]=new n(this)),this.features[e]){const t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let a=0;a<eRe.length;a++){const t=eRe[a];this.propEventSubscriptions[t]&&(this.propEventSubscriptions[t](),delete this.propEventSubscriptions[t]);const n=e["on"+t];n&&(this.propEventSubscriptions[t]=this.on(t,n))}this.prevMotionValues=function(e,t,a){for(const n in t){const i=t[n],o=a[n];if(IPe(i))e.addValue(n,i);else if(IPe(o))e.addValue(n,ZPe(i,{owner:e}));else if(o!==i)if(e.hasValue(n)){const t=e.getValue(n);!0===t.liveStyle?t.jump(i):t.hasAnimated||t.set(i)}else{const t=e.getStaticValue(n);e.addValue(n,ZPe(void 0!==t?t:i,{owner:e}))}}for(const n in a)void 0===t[n]&&e.removeValue(n);return t}(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]: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(e){const t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){const a=this.values.get(e);t!==a&&(a&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);const t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let a=this.values.get(e);return void 0===a&&void 0!==t&&(a=ZPe(null===t?void 0:t,{owner:this}),this.addValue(e,a)),a}readValue(e,t){let a=void 0===this.latestValues[e]&&this.current?this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options):this.latestValues[e];var n;return null!=a&&("string"==typeof a&&(yVe(a)||_Ve(a))?a=parseFloat(a):(n=a,!ZVe.find(zVe(n))&&qVe.test(t)&&(a=$Ve(e,t))),this.setBaseTarget(e,IPe(a)?a.get():a)),IPe(a)?a.get():a}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){var t;const{initial:a}=this.props;let n;if("string"==typeof a||"object"==typeof a){const i=GPe(this.props,a,null==(t=this.presenceContext)?void 0:t.custom);i&&(n=i[e])}if(a&&void 0!==n)return n;const i=this.getBaseTargetFromProps(this.props,e);return void 0===i||IPe(i)?void 0!==this.initialValues[e]&&void 0===n?void 0:this.baseTarget[e]:i}on(e,t){return this.events[e]||(this.events[e]=new zPe),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}}const aRe=new Set(["width","height","top","left","right","bottom",...nVe]);let nRe=()=>{},iRe=()=>{};"production"!==process.env.NODE_ENV&&(nRe=(e,t)=>{e||"undefined"==typeof console||console.warn(t)},iRe=(e,t)=>{if(!e)throw new Error(t)});const oRe=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function rRe(e,t,a=1){iRe(a<=4,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[n,i]=function(e){const t=oRe.exec(e);if(!t)return[,];const[,a,n,i]=t;return[`--${a??n}`,i]}(e);if(!n)return;const o=window.getComputedStyle(t).getPropertyValue(n);if(o){const e=o.trim();return yVe(e)?parseFloat(e):e}return INe(i)?rRe(i,t,a+1):i}function sRe(e){return"number"==typeof e?0===e:null===e||("none"===e||"0"===e||_Ve(e))}const lRe=new Set(["auto","none","0"]);class gRe extends IVe{constructor(e,t,a,n,i){super(e,t,a,n,i,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:t,name:a}=this;if(!t||!t.current)return;super.readKeyframes();for(let s=0;s<e.length;s++){let a=e[s];if("string"==typeof a&&(a=a.trim(),INe(a))){const n=rRe(a,t.current);void 0!==n&&(e[s]=n),s===e.length-1&&(this.finalKeyframe=a)}}if(this.resolveNoneKeyframes(),!aRe.has(a)||2!==e.length)return;const[n,i]=e,o=LVe(n),r=LVe(i);if(o!==r)if(gVe(o)&&gVe(r))for(let s=0;s<e.length;s++){const t=e[s];"string"==typeof t&&(e[s]=parseFloat(t))}else cVe[a]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:t}=this,a=[];for(let n=0;n<e.length;n++)(null===e[n]||sRe(e[n]))&&a.push(n);a.length&&function(e,t,a){let n,i=0;for(;i<e.length&&!n;){const t=e[i];"string"==typeof t&&!lRe.has(t)&&NVe(t).values.length&&(n=e[i]),i++}if(n&&a)for(const o of t)e[o]=$Ve(a,n)}(e,a,t)}measureInitialState(){const{element:e,unresolvedKeyframes:t,name:a}=this;if(!e||!e.current)return;"height"===a&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=cVe[a](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;const n=t[t.length-1];void 0!==n&&e.getValue(a,n).jump(n,!1)}measureEndState(){var e;const{element:t,name:a,unresolvedKeyframes:n}=this;if(!t||!t.current)return;const i=t.getValue(a);i&&i.jump(this.measuredOrigin,!1);const o=n.length-1,r=n[o];n[o]=cVe[a](t.measureViewportBox(),window.getComputedStyle(t.current)),null!==r&&void 0===this.finalKeyframe&&(this.finalKeyframe=r),(null==(e=this.removedTransforms)?void 0:e.length)&&this.removedTransforms.forEach(([e,a])=>{t.getValue(e).set(a)}),this.resolveNoneKeyframes()}}class uRe extends tRe{constructor(){super(...arguments),this.KeyframeResolver=gRe}sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){return e.style?e.style[t]:void 0}removeValueFromRenderState(e,{vars:t,style:a}){delete t[e],delete a[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;IPe(e)&&(this.childSubscription=e.on("change",e=>{this.current&&(this.current.textContent=`${e}`)}))}}const dRe=(e,t)=>t&&"number"==typeof e?t.transform(e):e,cRe={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},hRe=nVe.length;function fRe(e,t,a){const{style:n,vars:i,transformOrigin:o}=e;let r=!1,s=!1;for(const l in t){const e=t[l];if(iVe.has(l))r=!0;else if(CNe(l))i[l]=e;else{const t=dRe(e,XVe[l]);l.startsWith("origin")?(s=!0,o[l]=t):n[l]=t}}if(t.transform||(r||a?n.transform=function(e,t,a){let n="",i=!0;for(let o=0;o<hRe;o++){const r=nVe[o],s=e[r];if(void 0===s)continue;let l=!0;if(l="number"==typeof s?s===(r.startsWith("scale")?1:0):0===parseFloat(s),!l||a){const e=dRe(s,XVe[r]);l||(i=!1,n+=`${cRe[r]||r}(${e}) `),a&&(t[r]=e)}}return n=n.trim(),a?n=a(t,i?"":n):i&&(n="none"),n}(t,e.transform,a):n.transform&&(n.transform="none")),s){const{originX:e="50%",originY:t="50%",originZ:a=0}=o;n.transformOrigin=`${e} ${t} ${a}`}}function pRe(e,{style:t,vars:a},n,i){const o=e.style;let r;for(r in t)o[r]=t[r];for(r in null==i||i.applyProjectionStyles(o,n),a)o.setProperty(r,a[r])}function ARe(e,{layout:t,layoutId:a}){return iVe.has(e)||e.startsWith("origin")||(t||void 0!==a)&&(!!_Ne[e]||"opacity"===e)}function CRe(e,t,a){var n;const{style:i}=e,o={};for(const r in i)(IPe(i[r])||t.style&&IPe(t.style[r])||ARe(r,e)||void 0!==(null==(n=null==a?void 0:a.getValue(r))?void 0:n.liveStyle))&&(o[r]=i[r]);return o}class mRe extends uRe{constructor(){super(...arguments),this.type="html",this.renderInstance=pRe}readValueFromInstance(e,t){var a,n;if(iVe.has(t))return(null==(a=this.projection)?void 0:a.isProjecting)?eVe(t):((e,t)=>{const{transform:a="none"}=getComputedStyle(e);return tVe(a,t)})(e,t);{const a=(n=e,window.getComputedStyle(n)),i=(CNe(t)?a.getPropertyValue(t):a[t])||0;return"string"==typeof i?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:t}){return function(e,t){return function({top:e,left:t,right:a,bottom:n}){return{x:{min:t,max:a},y:{min:e,max:n}}}(function(e,t){if(!t)return e;const a=t({x:e.left,y:e.top}),n=t({x:e.right,y:e.bottom});return{top:a.y,left:a.x,bottom:n.y,right:n.x}}(e.getBoundingClientRect(),t))}(e,t)}build(e,t,a){fRe(e,t,a.transformTemplate)}scrapeMotionValuesFromProps(e,t,a){return CRe(e,t,a)}}const IRe=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),yRe={offset:"stroke-dashoffset",array:"stroke-dasharray"},_Re={offset:"strokeDashoffset",array:"strokeDasharray"};function FRe(e,{attrX:t,attrY:a,attrScale:n,pathLength:i,pathSpacing:o=1,pathOffset:r=0,...s},l,g,u){if(fRe(e,s,g),l)return void(e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox));e.attrs=e.style,e.style={};const{attrs:d,style:c}=e;d.transform&&(c.transform=d.transform,delete d.transform),(c.transform||d.transformOrigin)&&(c.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),c.transform&&(c.transformBox=(null==u?void 0:u.transformBox)??"fill-box",delete d.transformBox),void 0!==t&&(d.x=t),void 0!==a&&(d.y=a),void 0!==n&&(d.scale=n),void 0!==i&&function(e,t,a=1,n=0,i=!0){e.pathLength=1;const o=i?yRe:_Re;e[o.offset]=pPe.transform(-n);const r=pPe.transform(t),s=pPe.transform(a);e[o.array]=`${r} ${s}`}(d,i,o,r,!1)}const bRe=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"]);class vRe extends uRe{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=OPe}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(iVe.has(t)){const e=JVe(t);return e&&e.default||0}return t=bRe.has(t)?t:IRe(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,a){return function(e,t,a){const n=CRe(e,t,a);for(const i in e)(IPe(e[i])||IPe(t[i]))&&(n[-1!==nVe.indexOf(i)?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i]=e[i]);return n}(e,t,a)}build(e,t,a){FRe(e,t,this.isSVGTag,a.transformTemplate,a.style)}renderInstance(e,t,a,n){!function(e,t,a,n){pRe(e,t,void 0,n);for(const i in t.attrs)e.setAttribute(bRe.has(i)?i:IRe(i),t.attrs[i])}(e,t,0,n)}mount(e){var t;this.isSVGTag="string"==typeof(t=e.tagName)&&"svg"===t.toLowerCase(),super.mount(e)}}function kRe(e){return"object"==typeof e&&!Array.isArray(e)}function wRe(e,t,a){if(e instanceof EventTarget)return[e];if("string"==typeof e){let t=document;const n=(null==a?void 0:a[e])??t.querySelectorAll(e);return n?Array.from(n):[]}return Array.from(e)}function xRe(e,t,a,n){return"string"==typeof e&&kRe(t)?wRe(e,0,n):e instanceof NodeList?Array.from(e):Array.isArray(e)?e:[e]}function ORe(e,t,a){return e*(t+1)}function ERe(e,t,a,n){return"number"==typeof t?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,e+parseFloat(t)):"<"===t?a:t.startsWith("<")?Math.max(0,a+parseFloat(t.slice(1))):n.get(t)??e}const DRe=(e,t,a)=>e+(t-e)*a,MRe=e=>Array.isArray(e)&&"number"!=typeof e[0];function SRe(e,t){return MRe(e)?e[((e,t,a)=>{const n=t-e;return((a-e)%n+n)%n+e})(0,e.length,t)]:e}function BRe(e,t,a,n,i,o){!function(e,t,a){for(let n=0;n<e.length;n++){const i=e[n];i.at>t&&i.at<a&&(qPe(e,i),n--)}}(e,i,o);for(let r=0;r<t.length;r++)e.push({value:t[r],at:DRe(i,o,n[r]),easing:SRe(a,r)})}function jRe(e,t){for(let a=0;a<e.length;a++)e[a]=e[a]/(t+1)}function TRe(e,t){return e.at===t.at?null===e.value?1:null===t.value?-1:0:e.at-t.at}const NRe=(e,t,a)=>{const n=t-e;return 0===n?1:(a-e)/n};function PRe(e,t){const a=e[e.length-1];for(let n=1;n<=t;n++){const i=NRe(0,t,n);e.push(DRe(a,1,i))}}function VRe(e){const t=[0];return PRe(t,e.length-1),t}const RRe=2e4;function qRe(e){let t=0;let a=e.next(t);for(;!a.done&&t<RRe;)t+=50,a=e.next(t);return t>=RRe?1/0:t}const zRe=e=>1e3*e,QRe=e=>e/1e3;function LRe(e,t=100,a){const n=a({...e,keyframes:[0,t]}),i=Math.min(qRe(n),RRe);return{type:"keyframes",ease:e=>n.next(i*e).value/t,duration:QRe(i)}}function ZRe(e){return"function"==typeof e&&"applyToOptions"in e}function HRe(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function GRe(e,t){return t[e]||(t[e]=[]),t[e]}function YRe(e){return Array.isArray(e)?e:[e]}function URe(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}const WRe=e=>"number"==typeof e,XRe=e=>e.every(WRe);function KRe(e,t,a){e.hasValue(t)?e.getValue(t).set(a):e.addValue(t,ZPe(a))}function JRe(e){return(e=>Array.isArray(e))(e)?e[e.length-1]||0:e}function $Re(e,t){const a=function(e,t){const a=e.getProps();return GPe(a,t,a.custom,e)}(e,t);let{transitionEnd:n={},transition:i={},...o}=a||{};o={...o,...n};for(const r in o){KRe(e,r,JRe(o[r]))}}function eqe(e,t){const a=e.getValue("willChange");if(n=a,Boolean(IPe(n)&&n.add))return a.add(t);if(!a&&LNe.WillChange){const a=new LNe.WillChange("auto");e.addValue("willChange",a),a.add(t)}var n}const tqe="data-"+IRe("framerAppearId");function aqe(e){return e.props[tqe]}const nqe=e=>null!==e;const iqe={type:"spring",stiffness:500,damping:25,restSpeed:10},oqe={type:"keyframes",duration:.8},rqe={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},sqe=(e,{keyframes:t})=>t.length>2?oqe:iVe.has(e)?e.startsWith("scale")?{type:"spring",stiffness:550,damping:0===t[1]?2*Math.sqrt(550):30,restSpeed:10}:iqe:rqe;function lqe(e,t){return(null==e?void 0:e[t])??(null==e?void 0:e.default)??e}function gqe(e,t,a){return a<0&&(a+=1),a>1&&(a-=1),a<1/6?e+6*(t-e)*a:a<.5?t:a<2/3?e+(t-e)*(2/3-a)*6:e}function uqe(e,t){return a=>a>0?t:e}const dqe=(e,t,a)=>{const n=e*e,i=a*(t*t-n)+n;return i<0?0:Math.sqrt(i)},cqe=[EVe,OVe,DVe];function hqe(e){const t=(a=e,cqe.find(e=>e.test(a)));var a;if(nRe(Boolean(t),`'${e}' is not an animatable color. Use the equivalent color code instead.`),!Boolean(t))return!1;let n=t.parse(e);return t===DVe&&(n=function({hue:e,saturation:t,lightness:a,alpha:n}){e/=360,a/=100;let i=0,o=0,r=0;if(t/=100){const n=a<.5?a*(1+t):a+t-a*t,s=2*a-n;i=gqe(s,n,e+1/3),o=gqe(s,n,e),r=gqe(s,n,e-1/3)}else i=o=r=a;return{red:Math.round(255*i),green:Math.round(255*o),blue:Math.round(255*r),alpha:n}}(n)),n}const fqe=(e,t)=>{const a=hqe(e),n=hqe(t);if(!a||!n)return uqe(e,t);const i={...a};return e=>(i.red=dqe(a.red,n.red,e),i.green=dqe(a.green,n.green,e),i.blue=dqe(a.blue,n.blue,e),i.alpha=DRe(a.alpha,n.alpha,e),OVe.transform(i))},pqe=new Set(["none","hidden"]);const Aqe=(e,t)=>a=>t(e(a)),Cqe=(...e)=>e.reduce(Aqe);function mqe(e,t){return a=>DRe(e,t,a)}function Iqe(e){return"number"==typeof e?mqe:"string"==typeof e?INe(e)?uqe:MVe.test(e)?fqe:Fqe:Array.isArray(e)?yqe:"object"==typeof e?MVe.test(e)?fqe:_qe:uqe}function yqe(e,t){const a=[...e],n=a.length,i=e.map((e,a)=>Iqe(e)(e,t[a]));return e=>{for(let t=0;t<n;t++)a[t]=i[t](e);return a}}function _qe(e,t){const a={...e,...t},n={};for(const i in a)void 0!==e[i]&&void 0!==t[i]&&(n[i]=Iqe(e[i])(e[i],t[i]));return e=>{for(const t in n)a[t]=n[t](e);return a}}const Fqe=(e,t)=>{const a=qVe.createTransformer(t),n=NVe(e),i=NVe(t);return n.indexes.var.length===i.indexes.var.length&&n.indexes.color.length===i.indexes.color.length&&n.indexes.number.length>=i.indexes.number.length?pqe.has(e)&&!i.values.length||pqe.has(t)&&!n.values.length?function(e,t){return pqe.has(e)?a=>a<=0?e:t:a=>a>=1?t:e}(e,t):Cqe(yqe(function(e,t){const a=[],n={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const o=t.types[i],r=e.indexes[o][n[o]],s=e.values[r]??0;a[i]=s,n[o]++}return a}(n,i),i.values),a):(nRe(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),uqe(e,t))};function bqe(e,t,a){if("number"==typeof e&&"number"==typeof t&&"number"==typeof a)return DRe(e,t,a);return Iqe(e)(e,t)}const vqe=e=>{const t=({timestamp:t})=>e(t);return{start:(e=!0)=>HNe.update(t,e),stop:()=>GNe(t),now:()=>YNe.isProcessing?YNe.timestamp:NPe.now()}},kqe=(e,t,a=10)=>{let n="";const i=Math.max(Math.round(t/a),2);for(let o=0;o<i;o++)n+=Math.round(1e4*e(o/(i-1)))/1e4+", ";return`linear(${n.substring(0,n.length-2)})`};function wqe(e,t,a){const n=Math.max(t-5,0);return QPe(a-e(n),t-n)}const xqe=100,Oqe=10,Eqe=1,Dqe=0,Mqe=800,Sqe=.3,Bqe=.3,jqe={granular:.01,default:2},Tqe={granular:.005,default:.5},Nqe=.01,Pqe=10,Vqe=.05,Rqe=1,qqe=.001;function zqe({duration:e=Mqe,bounce:t=Sqe,velocity:a=Dqe,mass:n=Eqe}){let i,o;nRe(e<=zRe(Pqe),"Spring duration must be 10 seconds or less");let r=1-t;r=oVe(Vqe,Rqe,r),e=oVe(Nqe,Pqe,QRe(e)),r<1?(i=t=>{const n=t*r,i=n*e,o=n-a,s=Lqe(t,r),l=Math.exp(-i);return qqe-o/s*l},o=t=>{const n=t*r*e,o=n*a+a,s=Math.pow(r,2)*Math.pow(t,2)*e,l=Math.exp(-n),g=Lqe(Math.pow(t,2),r);return(-i(t)+qqe>0?-1:1)*((o-s)*l)/g}):(i=t=>Math.exp(-t*e)*((t-a)*e+1)-.001,o=t=>Math.exp(-t*e)*(e*e*(a-t)));const s=function(e,t,a){let n=a;for(let i=1;i<Qqe;i++)n-=e(n)/t(n);return n}(i,o,5/e);if(e=zRe(e),isNaN(s))return{stiffness:xqe,damping:Oqe,duration:e};{const t=Math.pow(s,2)*n;return{stiffness:t,damping:2*r*Math.sqrt(n*t),duration:e}}}const Qqe=12;function Lqe(e,t){return e*Math.sqrt(1-t*t)}const Zqe=["duration","bounce"],Hqe=["stiffness","damping","mass"];function Gqe(e,t){return t.some(t=>void 0!==e[t])}function Yqe(e=Bqe,t=Sqe){const a="object"!=typeof e?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:n,restDelta:i}=a;const o=a.keyframes[0],r=a.keyframes[a.keyframes.length-1],s={done:!1,value:o},{stiffness:l,damping:g,mass:u,duration:d,velocity:c,isResolvedFromDuration:h}=function(e){let t={velocity:Dqe,stiffness:xqe,damping:Oqe,mass:Eqe,isResolvedFromDuration:!1,...e};if(!Gqe(e,Hqe)&&Gqe(e,Zqe))if(e.visualDuration){const a=e.visualDuration,n=2*Math.PI/(1.2*a),i=n*n,o=2*oVe(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:Eqe,stiffness:i,damping:o}}else{const a=zqe(e);t={...t,...a,mass:Eqe},t.isResolvedFromDuration=!0}return t}({...a,velocity:-QRe(a.velocity||0)}),f=c||0,p=g/(2*Math.sqrt(l*u)),A=r-o,C=QRe(Math.sqrt(l/u)),m=Math.abs(A)<5;let I;if(n||(n=m?jqe.granular:jqe.default),i||(i=m?Tqe.granular:Tqe.default),p<1){const e=Lqe(C,p);I=t=>{const a=Math.exp(-p*C*t);return r-a*((f+p*C*A)/e*Math.sin(e*t)+A*Math.cos(e*t))}}else if(1===p)I=e=>r-Math.exp(-C*e)*(A+(f+C*A)*e);else{const e=C*Math.sqrt(p*p-1);I=t=>{const a=Math.exp(-p*C*t),n=Math.min(e*t,300);return r-a*((f+p*C*A)*Math.sinh(n)+e*A*Math.cosh(n))/e}}const y={calculatedDuration:h&&d||null,next:e=>{const t=I(e);if(h)s.done=e>=d;else{let a=0===e?f:0;p<1&&(a=0===e?zRe(f):wqe(I,e,t));const o=Math.abs(a)<=n,l=Math.abs(r-t)<=i;s.done=o&&l}return s.value=s.done?r:t,s},toString:()=>{const e=Math.min(qRe(y),RRe),t=kqe(t=>y.next(e*t).value,e,30);return e+"ms "+t},toTransition:()=>{}};return y}function Uqe({keyframes:e,velocity:t=0,power:a=.8,timeConstant:n=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:r,min:s,max:l,restDelta:g=.5,restSpeed:u}){const d=e[0],c={done:!1,value:d},h=e=>void 0===s?l:void 0===l||Math.abs(s-e)<Math.abs(l-e)?s:l;let f=a*t;const p=d+f,A=void 0===r?p:r(p);A!==p&&(f=A-d);const C=e=>-f*Math.exp(-e/n),m=e=>A+C(e),I=e=>{const t=C(e),a=m(e);c.done=Math.abs(t)<=g,c.value=c.done?A:a};let y,_;const F=e=>{var t;(t=c.value,void 0!==s&&t<s||void 0!==l&&t>l)&&(y=e,_=Yqe({keyframes:[c.value,h(c.value)],velocity:wqe(m,e,c.value),damping:i,stiffness:o,restDelta:g,restSpeed:u}))};return F(0),{calculatedDuration:null,next:e=>{let t=!1;return _||void 0!==y||(t=!0,I(e),F(e)),void 0!==y&&e>=y?_.next(e-y):(!t&&I(e),c)}}}function Wqe(e,t,{clamp:a=!0,ease:n,mixer:i}={}){const o=e.length;if(iRe(o===t.length,"Both input and output ranges must be the same length"),1===o)return()=>t[0];if(2===o&&t[0]===t[1])return()=>t[1];const r=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=function(e,t,a){const n=[],i=a||LNe.mix||bqe,o=e.length-1;for(let r=0;r<o;r++){let a=i(e[r],e[r+1]);if(t){const e=Array.isArray(t)?t[r]||zNe:t;a=Cqe(e,a)}n.push(a)}return n}(t,n,i),l=s.length,g=a=>{if(r&&a<e[0])return t[0];let n=0;if(l>1)for(;n<e.length-2&&!(a<e[n+1]);n++);const i=NRe(e[n],e[n+1],a);return s[n](i)};return a?t=>g(oVe(e[0],e[o-1],t)):g}Yqe.applyToOptions=e=>{const t=LRe(e,100,Yqe);return e.ease=t.ease,e.duration=zRe(t.duration),e.type="keyframes",e};const Xqe=(e,t,a)=>(((1-3*a+3*t)*e+(3*a-6*t))*e+3*t)*e;function Kqe(e,t,a,n){if(e===t&&a===n)return zNe;const i=t=>function(e,t,a,n,i){let o,r,s=0;do{r=t+(a-t)/2,o=Xqe(r,n,i)-e,o>0?a=r:t=r}while(Math.abs(o)>1e-7&&++s<12);return r}(t,0,1,e,a);return e=>0===e||1===e?e:Xqe(i(e),t,n)}const Jqe=Kqe(.42,0,1,1),$qe=Kqe(0,0,.58,1),eze=Kqe(.42,0,.58,1),tze=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,aze=e=>t=>1-e(1-t),nze=Kqe(.33,1.53,.69,.99),ize=aze(nze),oze=tze(ize),rze=e=>(e*=2)<1?.5*ize(e):.5*(2-Math.pow(2,-10*(e-1))),sze=e=>1-Math.sin(Math.acos(e)),lze=aze(sze),gze=tze(sze),uze=e=>Array.isArray(e)&&"number"==typeof e[0],dze={linear:zNe,easeIn:Jqe,easeInOut:eze,easeOut:$qe,circIn:sze,circInOut:gze,circOut:lze,backIn:ize,backInOut:oze,backOut:nze,anticipate:rze},cze=e=>{if(uze(e)){iRe(4===e.length,"Cubic bezier arrays must contain four numerical values.");const[t,a,n,i]=e;return Kqe(t,a,n,i)}return"string"==typeof e?(iRe(void 0!==dze[e],`Invalid easing type '${e}'`),dze[e]):e};function hze({duration:e=300,keyframes:t,times:a,ease:n="easeInOut"}){const i=MRe(n)?n.map(cze):cze(n),o={done:!1,value:t[0]},r=function(e,t){return e.map(e=>e*t)}(a&&a.length===t.length?a:VRe(t),e),s=Wqe(r,t,{ease:Array.isArray(i)?i:(l=t,g=i,l.map(()=>g||eze).splice(0,l.length-1))});var l,g;return{calculatedDuration:e,next:t=>(o.value=s(t),o.done=t>=e,o)}}const fze=e=>null!==e;function pze(e,{repeat:t,repeatType:a="loop"},n,i=1){const o=e.filter(fze),r=i<0||t&&"loop"!==a&&t%2==1?0:o.length-1;return r&&void 0!==n?n:o[r]}const Aze={decay:Uqe,inertia:Uqe,tween:hze,keyframes:hze,spring:Yqe};function Cze(e){"string"==typeof e.type&&(e.type=Aze[e.type])}class mze{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}}const Ize=e=>e/100;class yze extends mze{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var e,t;const{motionValue:a}=this.options;a&&a.updatedAt!==NPe.now()&&this.tick(NPe.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),null==(t=(e=this.options).onStop)||t.call(e))},this.options=e,this.initAnimation(),this.play(),!1===e.autoplay&&this.pause()}initAnimation(){const{options:e}=this;Cze(e);const{type:t=hze,repeat:a=0,repeatDelay:n=0,repeatType:i,velocity:o=0}=e;let{keyframes:r}=e;const s=t||hze;"production"!==process.env.NODE_ENV&&s!==hze&&iRe(r.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${r}`),s!==hze&&"number"!=typeof r[0]&&(this.mixKeyframes=Cqe(Ize,bqe(r[0],r[1])),r=[0,100]);const l=s({...e,keyframes:r});"mirror"===i&&(this.mirroredGenerator=s({...e,keyframes:[...r].reverse(),velocity:-o})),null===l.calculatedDuration&&(l.calculatedDuration=qRe(l));const{calculatedDuration:g}=l;this.calculatedDuration=g,this.resolvedDuration=g+n,this.totalDuration=this.resolvedDuration*(a+1)-n,this.generator=l}updateTime(e){const t=Math.round(e-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=t}tick(e,t=!1){const{generator:a,totalDuration:n,mixKeyframes:i,mirroredGenerator:o,resolvedDuration:r,calculatedDuration:s}=this;if(null===this.startTime)return a.next(0);const{delay:l=0,keyframes:g,repeat:u,repeatType:d,repeatDelay:c,type:h,onUpdate:f,finalKeyframe:p}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-n/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);const A=this.currentTime-l*(this.playbackSpeed>=0?1:-1),C=this.playbackSpeed>=0?A<0:A>n;this.currentTime=Math.max(A,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=n);let m=this.currentTime,I=a;if(u){const e=Math.min(this.currentTime,n)/r;let t=Math.floor(e),a=e%1;!a&&e>=1&&(a=1),1===a&&t--,t=Math.min(t,u+1);Boolean(t%2)&&("reverse"===d?(a=1-a,c&&(a-=c/r)):"mirror"===d&&(I=o)),m=oVe(0,1,a)*r}const y=C?{done:!1,value:g[0]}:I.next(m);i&&(y.value=i(y.value));let{done:_}=y;C||null===s||(_=this.playbackSpeed>=0?this.currentTime>=n:this.currentTime<=0);const F=null===this.holdTime&&("finished"===this.state||"running"===this.state&&_);return F&&h!==Uqe&&(y.value=pze(g,this.options,p,this.speed)),f&&f(y.value),F&&this.finish(),y}then(e,t){return this.finished.then(e,t)}get duration(){return QRe(this.calculatedDuration)}get time(){return QRe(this.currentTime)}set time(e){var t;e=zRe(e),this.currentTime=e,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),null==(t=this.driver)||t.start(!1)}get speed(){return this.playbackSpeed}set speed(e){this.updateTime(NPe.now());const t=this.playbackSpeed!==e;this.playbackSpeed=e,t&&(this.time=QRe(this.currentTime))}play(){var e,t;if(this.isStopped)return;const{driver:a=vqe,startTime:n}=this.options;this.driver||(this.driver=a(e=>this.tick(e))),null==(t=(e=this.options).onPlay)||t.call(e);const i=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=i):null!==this.holdTime?this.startTime=i-this.holdTime:this.startTime||(this.startTime=n??i),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(NPe.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&this.play(),this.state="finished",this.holdTime=null}finish(){var e,t;this.notifyFinished(),this.teardown(),this.state="finished",null==(t=(e=this.options).onComplete)||t.call(e)}cancel(){var e,t;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),null==(t=(e=this.options).onCancel)||t.call(e)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){var t;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),null==(t=this.driver)||t.stop(),e.observe(this)}}function _ze(e){let t;return()=>(void 0===t&&(t=e()),t)}const Fze=_ze(()=>void 0!==window.ScrollTimeline),bze={};function vze(e,t){const a=_ze(e);return()=>bze[t]??a()}const kze=vze(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(e){return!1}return!0},"linearEasing"),wze=([e,t,a,n])=>`cubic-bezier(${e}, ${t}, ${a}, ${n})`,xze={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:wze([0,.65,.55,1]),circOut:wze([.55,0,1,.45]),backIn:wze([.31,.01,.66,-.59]),backOut:wze([.33,1.53,.69,.99])};function Oze(e,t){return e?"function"==typeof e?kze()?kqe(e,t):"ease-out":uze(e)?wze(e):Array.isArray(e)?e.map(e=>Oze(e,t)||xze.easeOut):xze[e]:void 0}function Eze(e,t,a,{delay:n=0,duration:i=300,repeat:o=0,repeatType:r="loop",ease:s="easeOut",times:l}={},g=void 0){const u={[t]:a};l&&(u.offset=l);const d=Oze(s,i);Array.isArray(d)&&(u.easing=d);const c={delay:n,duration:i,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:o+1,direction:"reverse"===r?"alternate":"normal"};g&&(c.pseudoElement=g);return e.animate(u,c)}class Dze extends mze{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,!e)return;const{element:t,name:a,keyframes:n,pseudoElement:i,allowFlatten:o=!1,finalKeyframe:r,onComplete:s}=e;this.isPseudoElement=Boolean(i),this.allowFlatten=o,this.options=e,iRe("string"!=typeof e.type,'animateMini doesn\'t support "type" as a string. Did you mean to import { spring } from "motion"?');const l=function({type:e,...t}){return ZRe(e)&&kze()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}(e);this.animation=Eze(t,a,n,l,i),!1===l.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const e=pze(n,this.options,r,this.speed);this.updateMotionValue?this.updateMotionValue(e):function(e,t,a){(e=>e.startsWith("--"))(t)?e.style.setProperty(t,a):e.style[t]=a}(t,a,e),this.animation.cancel()}null==s||s(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){var e,t;null==(t=(e=this.animation).finish)||t.call(e)}cancel(){try{this.animation.cancel()}catch(e){}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;"idle"!==e&&"finished"!==e&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var e,t;this.isPseudoElement||null==(t=(e=this.animation).commitStyles)||t.call(e)}get duration(){var e,t;const a=(null==(t=null==(e=this.animation.effect)?void 0:e.getComputedTiming)?void 0:t.call(e).duration)||0;return QRe(Number(a))}get time(){return QRe(Number(this.animation.currentTime)||0)}set time(e){this.finishedTime=null,this.animation.currentTime=zRe(e)}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(e){this.animation.startTime=e}attachTimeline({timeline:e,observe:t}){var a;return this.allowFlatten&&(null==(a=this.animation.effect)||a.updateTiming({easing:"linear"})),this.animation.onfinish=null,e&&Fze()?(this.animation.timeline=e,zNe):t(this)}}const Mze={anticipate:rze,backInOut:oze,circInOut:gze};function Sze(e){"string"==typeof e.ease&&e.ease in Mze&&(e.ease=Mze[e.ease])}class Bze extends Dze{constructor(e){Sze(e),Cze(e),super(e),e.startTime&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:t,onUpdate:a,onComplete:n,element:i,...o}=this.options;if(!t)return;if(void 0!==e)return void t.set(e);const r=new yze({...o,autoplay:!1}),s=zRe(this.finishedTime??this.time);t.setWithVelocity(r.sample(s-10).value,r.sample(s).value,10),r.stop()}}const jze=(e,t)=>"zIndex"!==t&&(!("number"!=typeof e&&!Array.isArray(e))||!("string"!=typeof e||!qVe.test(e)&&"0"!==e||e.startsWith("url(")));function Tze(e){return"object"==typeof e&&null!==e}function Nze(e){return Tze(e)&&"offsetHeight"in e}const Pze=new Set(["opacity","clipPath","filter","transform"]),Vze=_ze(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));class Rze extends mze{constructor({autoplay:e=!0,delay:t=0,type:a="keyframes",repeat:n=0,repeatDelay:i=0,repeatType:o="loop",keyframes:r,name:s,motionValue:l,element:g,...u}){var d;super(),this.stop=()=>{var e,t;this._animation&&(this._animation.stop(),null==(e=this.stopTimeline)||e.call(this)),null==(t=this.keyframeResolver)||t.cancel()},this.createdAt=NPe.now();const c={autoplay:e,delay:t,type:a,repeat:n,repeatDelay:i,repeatType:o,name:s,motionValue:l,element:g,...u},h=(null==g?void 0:g.KeyframeResolver)||IVe;this.keyframeResolver=new h(r,(e,t,a)=>this.onKeyframesResolved(e,t,c,!a),s,l,g),null==(d=this.keyframeResolver)||d.scheduleResolve()}onKeyframesResolved(e,t,a,n){this.keyframeResolver=void 0;const{name:i,type:o,velocity:r,delay:s,isHandoff:l,onUpdate:g}=a;this.resolvedAt=NPe.now(),function(e,t,a,n){const i=e[0];if(null===i)return!1;if("display"===t||"visibility"===t)return!0;const o=e[e.length-1],r=jze(i,t),s=jze(o,t);return nRe(r===s,`You are trying to animate ${t} from "${i}" to "${o}". ${i} is not an animatable value - to enable this animation set ${i} to a value animatable to ${o} via the \`style\` property.`),!(!r||!s)&&(function(e){const t=e[0];if(1===e.length)return!0;for(let a=0;a<e.length;a++)if(e[a]!==t)return!0}(e)||("spring"===a||ZRe(a))&&n)}(e,i,o,r)||(!LNe.instantAnimations&&s||null==g||g(pze(e,a,t)),e[0]=e[e.length-1],a.duration=0,a.repeat=0);const u={startTime:n?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...a,keyframes:e},d=!l&&function(e){var t;const{motionValue:a,name:n,repeatDelay:i,repeatType:o,damping:r,type:s}=e;if(!Nze(null==(t=null==a?void 0:a.owner)?void 0:t.current))return!1;const{onUpdate:l,transformTemplate:g}=a.owner.getProps();return Vze()&&n&&Pze.has(n)&&("transform"!==n||!g)&&!l&&!i&&"mirror"!==o&&0!==r&&"inertia"!==s}(u)?new Bze({...u,element:u.motionValue.owner.current}):new yze(u);d.finished.then(()=>this.notifyFinished()).catch(zNe),this.pendingTimeline&&(this.stopTimeline=d.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=d}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){var e;return this._animation||(null==(e=this.keyframeResolver)||e.resume(),AVe=!0,mVe(),CVe(),AVe=!1),this._animation}get duration(){return this.animation.duration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var e;this._animation&&this.animation.cancel(),null==(e=this.keyframeResolver)||e.cancel()}}const qze=(e,t,a,n={},i,o)=>r=>{const s=lqe(n,e)||{},l=s.delay||n.delay||0;let{elapsed:g=0}=n;g-=zRe(l);const u={keyframes:Array.isArray(a)?a:[null,a],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-g,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{r(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:o?void 0:i};(function({when:e,delay:t,delayChildren:a,staggerChildren:n,staggerDirection:i,repeat:o,repeatType:r,repeatDelay:s,from:l,elapsed:g,...u}){return!!Object.keys(u).length})(s)||Object.assign(u,sqe(e,u)),u.duration&&(u.duration=zRe(u.duration)),u.repeatDelay&&(u.repeatDelay=zRe(u.repeatDelay)),void 0!==u.from&&(u.keyframes[0]=u.from);let d=!1;if((!1===u.type||0===u.duration&&!u.repeatDelay)&&(u.duration=0,0===u.delay&&(d=!0)),(LNe.instantAnimations||LNe.skipAnimations)&&(d=!0,u.duration=0,u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!o&&void 0!==t.get()){const e=function(e,{repeat:t,repeatType:a="loop"}){const n=e.filter(nqe);return n[t&&"loop"!==a&&t%2==1?0:n.length-1]}(u.keyframes,s);if(void 0!==e)return void HNe.update(()=>{u.onUpdate(e),u.onComplete()})}return s.isSync?new yze(u):new Rze(u)};function zze({protectedKeys:e,needsAnimating:t},a){const n=e.hasOwnProperty(a)&&!0!==t[a];return t[a]=!1,n}function Qze(e,t,{delay:a=0,transitionOverride:n,type:i}={}){let{transition:o=e.getDefaultTransition(),transitionEnd:r,...s}=t;n&&(o=n);const l=[],g=i&&e.animationState&&e.animationState.getState()[i];for(const u in s){const t=e.getValue(u,e.latestValues[u]??null),n=s[u];if(void 0===n||g&&zze(g,u))continue;const i={delay:a,...lqe(o||{},u)},r=t.get();if(void 0!==r&&!t.isAnimating&&!Array.isArray(n)&&n===r&&!i.velocity)continue;let d=!1;if(window.MotionHandoffAnimation){const t=aqe(e);if(t){const e=window.MotionHandoffAnimation(t,u,HNe);null!==e&&(i.startTime=e,d=!0)}}eqe(e,u),t.start(qze(u,t,n,e.shouldReduceMotion&&aRe.has(u)?{type:!1}:i,e,d));const c=t.animation;c&&l.push(c)}return r&&Promise.all(l).then(()=>{HNe.update(()=>{r&&$Re(e,r)})}),l}class Lze extends tRe{constructor(){super(...arguments),this.type="object"}readValueFromInstance(e,t){if(function(e,t){return e in t}(t,e)){const a=e[t];if("string"==typeof a||"number"==typeof a)return a}}getBaseTargetFromProps(){}removeValueFromRenderState(e,t){delete t.output[e]}measureInstanceViewportBox(){return{x:{min:0,max:0},y:{min:0,max:0}}}build(e,t){Object.assign(e.output,t)}renderInstance(e,{output:t}){Object.assign(e,t)}sortInstanceNodePosition(){return 0}}function Zze(e){return Tze(e)&&"ownerSVGElement"in e}function Hze(e){return Zze(e)&&"svg"===e.tagName}function Gze(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},a=Zze(e)&&!Hze(e)?new vRe(t):new mRe(t);a.mount(e),$Ne.set(e,a)}function Yze(e){const t=new Lze({presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}});t.mount(e),$Ne.set(e,t)}function Uze(e,t,a){const n=IPe(e)?e:ZPe(e);return n.start(qze("",n,t,a)),n.animation}function Wze(e,t,a,n){const i=[];if(function(e,t){return IPe(e)||"number"==typeof e||"string"==typeof e&&!kRe(t)}(e,t))i.push(Uze(e,kRe(t)&&t.default||t,a&&a.default||a));else{const n=xRe(e,t),o=n.length;iRe(Boolean(o),"No valid elements provided.");for(let e=0;e<o;e++){const r=n[e],s=r instanceof Element?Gze:Yze;$Ne.has(r)||s(r);const l=$Ne.get(r),g={...a};"delay"in g&&"function"==typeof g.delay&&(g.delay=g.delay(e,o)),i.push(...Qze(l,{...t,transition:g},{}))}}return i}function Xze(e,t,a){const n=[],i=function(e,{defaultTransition:t={},...a}={},n,i){const o=t.duration||.3,r=new Map,s=new Map,l={},g=new Map;let u=0,d=0,c=0;for(let h=0;h<e.length;h++){const a=e[h];if("string"==typeof a){g.set(a,d);continue}if(!Array.isArray(a)){g.set(a.name,ERe(d,a.at,u,g));continue}let[n,r,f={}]=a;void 0!==f.at&&(d=ERe(d,f.at,u,g));let p=0;const A=(e,a,n,r=0,s=0)=>{const l=YRe(e),{delay:g=0,times:u=VRe(l),type:h="keyframes",repeat:f,repeatType:A,repeatDelay:C=0,...m}=a;let{ease:I=t.ease||"easeOut",duration:y}=a;const _="function"==typeof g?g(r,s):g,F=l.length,b=ZRe(h)?h:null==i?void 0:i[h||"keyframes"];if(F<=2&&b){let e=100;if(2===F&&XRe(l)){const t=l[1]-l[0];e=Math.abs(t)}const t={...m};void 0!==y&&(t.duration=zRe(y));const a=LRe(t,e,b);I=a.ease,y=a.duration}y??(y=o);const v=d+_;1===u.length&&0===u[0]&&(u[1]=1);const k=u.length-l.length;if(k>0&&PRe(u,k),1===l.length&&l.unshift(null),f){iRe(f<20,"Repeat count too high, must be less than 20"),y=ORe(y,f);const e=[...l],t=[...u];I=Array.isArray(I)?[...I]:[I];const a=[...I];for(let n=0;n<f;n++){l.push(...e);for(let i=0;i<e.length;i++)u.push(t[i]+(n+1)),I.push(0===i?"linear":SRe(a,i-1))}jRe(u,f)}const w=v+y;BRe(n,l,I,u,v,w),p=Math.max(_+y,p),c=Math.max(w,c)};if(IPe(n))A(r,f,GRe("default",HRe(n,s)));else{const e=xRe(n,r,0,l),t=e.length;for(let a=0;a<t;a++){const n=HRe(e[a],s);for(const e in r)A(r[e],URe(f,e),GRe(e,n),a,t)}}u=d,d+=p}return s.forEach((e,n)=>{for(const i in e){const o=e[i];o.sort(TRe);const s=[],l=[],g=[];for(let e=0;e<o.length;e++){const{at:t,value:a,easing:n}=o[e];s.push(a),l.push(NRe(0,c,t)),g.push(n||"easeOut")}0!==l[0]&&(l.unshift(0),s.unshift(s[0]),g.unshift("easeInOut")),1!==l[l.length-1]&&(l.push(1),s.push(null)),r.has(n)||r.set(n,{keyframes:{},transition:{}});const u=r.get(n);u.keyframes[i]=s,u.transition[i]={...t,duration:c,ease:g,times:l,...a}}}),r}(e,t,0,{spring:Yqe});return i.forEach(({keyframes:e,transition:t},a)=>{n.push(...Wze(a,e,t))}),n}class Kze{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}get finished(){return Promise.all(this.animations.map(e=>e.finished))}getAll(e){return this.animations[0][e]}setAll(e,t){for(let a=0;a<this.animations.length;a++)this.animations[a][e]=t}attachTimeline(e){const t=this.animations.map(t=>t.attachTimeline(e));return()=>{t.forEach((e,t)=>{e&&e(),this.animations[t].stop()})}}get time(){return this.getAll("time")}set time(e){this.setAll("time",e)}get speed(){return this.getAll("speed")}set speed(e){this.setAll("speed",e)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){let e=0;for(let t=0;t<this.animations.length;t++)e=Math.max(e,this.animations[t].duration);return e}runAll(e){this.animations.forEach(t=>t[e]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class Jze extends Kze{then(e,t){return this.finished.finally(e).then(()=>{})}}const $ze=function(e,t,a){let n=[];var i;return i=e,n=Array.isArray(i)&&i.some(Array.isArray)?Xze(e,t):Wze(e,t,a),new Jze(n)},eQe=["initial","animate","whileInView","whileHover","whilePress","whileDrag","whileFocus","exit"];const tQe=!1;const aQe=(e,t)=>!!t&&(e===t||aQe(e,t.parentElement));function nQe(e,t){const a=wRe(e),n=new AbortController;return[a,{passive:!0,...t,signal:n.signal},()=>n.abort()]}const iQe=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);const oQe=new WeakSet;function rQe(e){return t=>{"Enter"===t.key&&e(t)}}function sQe(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}function lQe(e){return(e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary)(e)&&!0}function gQe(e,t,a={}){const[n,i,o]=nQe(e,a),r=e=>{const n=e.currentTarget;if(!lQe(e))return;oQe.add(n);const o=t(n,e),r=(e,t)=>{window.removeEventListener("pointerup",s),window.removeEventListener("pointercancel",l),oQe.has(n)&&oQe.delete(n),lQe(e)&&"function"==typeof o&&o(e,{success:t})},s=e=>{r(e,n===window||n===document||a.useGlobalTarget||aQe(n,e.target))},l=e=>{r(e,!1)};window.addEventListener("pointerup",s,i),window.addEventListener("pointercancel",l,i)};return n.forEach(e=>{var t;(a.useGlobalTarget?window:e).addEventListener("pointerdown",r,i),Nze(e)&&(e.addEventListener("focus",e=>((e,t)=>{const a=e.currentTarget;if(!a)return;const n=rQe(()=>{if(oQe.has(a))return;sQe(a,"down");const e=rQe(()=>{sQe(a,"up")});a.addEventListener("keyup",e,t),a.addEventListener("blur",()=>sQe(a,"cancel"),t)});a.addEventListener("keydown",n,t),a.addEventListener("blur",()=>a.removeEventListener("keydown",n),t)})(e,i)),t=e,iQe.has(t.tagName)||-1!==t.tabIndex||e.hasAttribute("tabindex")||(e.tabIndex=0))}),o}function uQe(e){return{point:{x:e.pageX,y:e.pageY}}}function dQe(e,t,a){const n=e.options;n.whilePress&&e.setActive("whilePress","Start"===a);const i=n[`onPress${"End"===a?"":a}`];i&&HNe.postRender(()=>i(t,uQe(t)))}function cQe(e){return!("touch"===e.pointerType||tQe)}function hQe(e,t,a){const n=e.options;n.whileHover&&e.setActive("whileHover","Start"===a);const i=n[`onHover${a}`];i&&HNe.postRender(()=>i(t,uQe(t)))}const fQe={some:0,all:1};function pQe(e,t,a){const n=e.options;n.whileInView&&e.setActive("whileInView","Enter"===a);const i=n[`onViewport${a}`];i&&HNe.postRender(()=>i(t))}function AQe(e,t,a,n={passive:!0}){return e.addEventListener(t,a,n),()=>e.removeEventListener(t,a)}const CQe=(e,t)=>e.depth-t.depth;class mQe{constructor(){this.children=[],this.isDirty=!1}add(e){RPe(this.children,e),this.isDirty=!0}remove(e){qPe(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(CQe),this.isDirty=!1,this.children.forEach(e)}}function IQe(e){return IPe(e)?e.get():e}const yQe=["TopLeft","TopRight","BottomLeft","BottomRight"],_Qe=yQe.length,FQe=e=>"string"==typeof e?parseFloat(e):e,bQe=e=>"number"==typeof e||pPe.test(e);function vQe(e,t){return void 0!==e[t]?e[t]:e.borderRadius}const kQe=xQe(0,.5,lze),wQe=xQe(.5,.95,zNe);function xQe(e,t,a){return n=>n<e?0:n>t?1:a(NRe(e,t,n))}function OQe(e,t){e.min=t.min,e.max=t.max}function EQe(e,t){OQe(e.x,t.x),OQe(e.y,t.y)}function DQe(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function MQe(e){return void 0===e||1===e}function SQe({scale:e,scaleX:t,scaleY:a}){return!MQe(e)||!MQe(t)||!MQe(a)}function BQe(e){return SQe(e)||jQe(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function jQe(e){return TQe(e.x)||TQe(e.y)}function TQe(e){return e&&"0%"!==e}function NQe(e,t,a){return a+t*(e-a)}function PQe(e,t,a,n,i){return void 0!==i&&(e=NQe(e,i,n)),NQe(e,a,n)+t}function VQe(e,t=0,a=1,n,i){e.min=PQe(e.min,t,a,n,i),e.max=PQe(e.max,t,a,n,i)}function RQe(e,{x:t,y:a}){VQe(e.x,t.translate,t.scale,t.originPoint),VQe(e.y,a.translate,a.scale,a.originPoint)}const qQe=.999999999999,zQe=1.0000000000001;function QQe(e,t){e.min=e.min+t,e.max=e.max+t}function LQe(e,t,a,n,i=.5){VQe(e,t,a,DRe(e.min,e.max,i),n)}function ZQe(e,t){LQe(e.x,t.x,t.scaleX,t.scale,t.originX),LQe(e.y,t.y,t.scaleY,t.scale,t.originY)}function HQe(e){return e.max-e.min}function GQe(e,t,a,n=.5){e.origin=n,e.originPoint=DRe(t.min,t.max,e.origin),e.scale=HQe(a)/HQe(t),e.translate=DRe(a.min,a.max,e.origin)-e.originPoint,(e.scale>=.9999&&e.scale<=1.0001||isNaN(e.scale))&&(e.scale=1),(e.translate>=-.01&&e.translate<=.01||isNaN(e.translate))&&(e.translate=0)}function YQe(e,t,a,n){GQe(e.x,t.x,a.x,n?n.originX:void 0),GQe(e.y,t.y,a.y,n?n.originY:void 0)}function UQe(e,t,a){e.min=a.min+t.min,e.max=e.min+HQe(t)}function WQe(e,t,a){e.min=t.min-a.min,e.max=e.min+HQe(t)}function XQe(e,t,a){WQe(e.x,t.x,a.x),WQe(e.y,t.y,a.y)}function KQe(e,t,a,n,i){return e=NQe(e-=t,1/a,n),void 0!==i&&(e=NQe(e,1/i,n)),e}function JQe(e,t,[a,n,i],o,r){!function(e,t=0,a=1,n=.5,i,o=e,r=e){fPe.test(t)&&(t=parseFloat(t),t=DRe(r.min,r.max,t/100)-r.min);if("number"!=typeof t)return;let s=DRe(o.min,o.max,n);e===o&&(s-=t),e.min=KQe(e.min,t,a,s,i),e.max=KQe(e.max,t,a,s,i)}(e,t[a],t[n],t[i],t.scale,o,r)}const $Qe=["x","scaleX","originX"],eLe=["y","scaleY","originY"];function tLe(e,t,a,n){JQe(e.x,t,$Qe,a?a.x:void 0,n?n.x:void 0),JQe(e.y,t,eLe,a?a.y:void 0,n?n.y:void 0)}function aLe(e){return 0===e.translate&&1===e.scale}function nLe(e){return aLe(e.x)&&aLe(e.y)}function iLe(e,t){return e.min===t.min&&e.max===t.max}function oLe(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function rLe(e,t){return oLe(e.x,t.x)&&oLe(e.y,t.y)}function sLe(e){return HQe(e.x)/HQe(e.y)}function lLe(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class gLe{constructor(){this.members=[]}add(e){RPe(this.members,e),e.scheduleRender()}remove(e){if(qPe(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){const t=this.members.findIndex(t=>e===t);if(0===t)return!1;let a;for(let n=t;n>=0;n--){const e=this.members[n];if(!1!==e.isPresent){a=e;break}}return!!a&&(this.promote(a),!0)}promote(e,t){const a=this.lead;if(e!==a&&(this.prevLead=a,this.lead=e,e.show(),a)){a.instance&&a.scheduleRender(),e.scheduleRender(),e.resumeFrom=a,t&&(e.resumeFrom.preserveOpacity=!0),a.snapshot&&(e.snapshot=a.snapshot,e.snapshot.latestValues=a.animationValues||a.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:n}=e.options;!1===n&&a.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:t,resumingFrom:a}=e;t.onExitComplete&&t.onExitComplete(),a&&a.options.onExitComplete&&a.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function uLe(e){return[e("x"),e("y")]}const dLe={hasAnimatedSinceResize:!0,hasEverUpdated:!1},{schedule:cLe}=ZNe(queueMicrotask,!1),hLe=["","X","Y","Z"];let fLe=0;function pLe(e,t,a,n){const{latestValues:i}=t;i[e]&&(a[e]=i[e],t.setStaticValue(e,0),n&&(n[e]=0))}function ALe(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const a=aqe(t);if(window.MotionHasOptimisedAnimation(a,"transform")){const{layout:t,layoutId:n}=e.options;window.MotionCancelOptimisedAnimation(a,"transform",HNe,!(t||n))}const{parent:n}=e;n&&!n.hasCheckedOptimisedAppear&&ALe(n)}function CLe({attachResizeListener:e,defaultParent:t,measureScroll:a,checkIsScrollRoot:n,resetTransform:i}){return class{constructor(e={},a=(null==t?void 0:t())){this.id=fLe++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(yLe),this.nodes.forEach(xLe),this.nodes.forEach(OLe),this.nodes.forEach(_Le)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let t=0;t<this.path.length;t++)this.path[t].shouldResetTransform=!0;this.root===this&&(this.nodes=new mQe)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new zPe),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){const a=this.eventHandlers.get(e);a&&a.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;this.isSVG=Zze(t)&&!Hze(t),this.instance=t;const{layoutId:a,layout:n,visualElement:i}=this.options;if(i&&!i.current&&i.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(n||a)&&(this.isLayoutDirty=!0),e){let a,n=0;const i=()=>this.root.updateBlockedByResize=!1;HNe.read(()=>{n=window.innerWidth}),e(t,()=>{const e=window.innerWidth;e!==n&&(n=e,this.root.updateBlockedByResize=!0,a&&a(),a=function(e,t){const a=NPe.now(),n=({timestamp:i})=>{const o=i-a;o>=t&&(GNe(n),e(o-t))};return HNe.setup(n,!0),()=>GNe(n)}(i,250),dLe.hasAnimatedSinceResize&&(dLe.hasAnimatedSinceResize=!1,this.nodes.forEach(wLe)))})}a&&this.root.registerSharedNode(a,this),!1!==this.options.animate&&i&&(a||n)&&this.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:a,layout:n})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const o=this.options.transition||i.getDefaultTransition()||jLe,{onLayoutAnimationStart:r,onLayoutAnimationComplete:s}=i.getProps(),l=!this.targetLayout||!rLe(this.targetLayout,n),g=!t&&a;if(this.options.layoutRoot||this.resumeFrom||g||t&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const t={...lqe(o,"layout"),onPlay:r,onComplete:s};(i.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,g)}else t||wLe(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=n})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),GNe(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(ELe),this.animationId++)}getTransformTemplate(){const{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&ALe(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let i=0;i<this.path.length;i++){const e=this.path[i];e.shouldResetTransform=!0,e.updateScroll("snapshot"),e.options.layoutRoot&&e.willUpdate(!1)}const{layoutId:t,layout:a}=this.options;if(void 0===t&&!a)return;const n=this.getTransformTemplate();this.prevTransformTemplateValue=n?n(this.latestValues,""):void 0,this.updateSnapshot(),e&&this.notifyListeners("willUpdate")}update(){this.updateScheduled=!1;if(this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(bLe);if(this.animationId<=this.animationCommitId)return void this.nodes.forEach(vLe);this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(kLe),this.nodes.forEach(mLe),this.nodes.forEach(ILe)):this.nodes.forEach(vLe),this.clearAllSnapshots();const e=NPe.now();YNe.delta=oVe(0,1e3/60,e-YNe.timestamp),YNe.timestamp=e,YNe.isProcessing=!0,UNe.update.process(YNe),UNe.preRender.process(YNe),UNe.render.process(YNe),YNe.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,cLe.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(FLe),this.sharedNodes.forEach(DLe)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,HNe.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){HNe.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||HQe(this.snapshot.measuredBox.x)||HQe(this.snapshot.measuredBox.y)||(this.snapshot=void 0))}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let a=0;a<this.path.length;a++){this.path[a].updateScroll()}const e=this.layout;this.layout=this.measure(!1),this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}},this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:t}=this.options;t&&t.notify("LayoutMeasure",this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e="measure"){let t=Boolean(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&this.instance){const t=n(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:a(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!i)return;const e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!nLe(this.projectionDelta),a=this.getTransformTemplate(),n=a?a(this.latestValues,""):void 0,o=n!==this.prevTransformTemplateValue;e&&this.instance&&(t||BQe(this.latestValues)||o)&&(i(this.instance,n),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){const t=this.measurePageBox();let a=this.removeElementScroll(t);var n;return e&&(a=this.removeTransform(a)),PLe((n=a).x),PLe(n.y),{animationId:this.root.animationId,measuredBox:t,layoutBox:a,latestValues:{},source:this.id}}measurePageBox(){var e;const{visualElement:t}=this.options;if(!t)return{x:{min:0,max:0},y:{min:0,max:0}};const a=t.measureViewportBox();if(!((null==(e=this.scroll)?void 0:e.wasRoot)||this.path.some(RLe))){const{scroll:e}=this.root;e&&(QQe(a.x,e.offset.x),QQe(a.y,e.offset.y))}return a}removeElementScroll(e){var t;const a={x:{min:0,max:0},y:{min:0,max:0}};if(EQe(a,e),null==(t=this.scroll)?void 0:t.wasRoot)return a;for(let n=0;n<this.path.length;n++){const t=this.path[n],{scroll:i,options:o}=t;t!==this.root&&i&&o.layoutScroll&&(i.wasRoot&&EQe(a,e),QQe(a.x,i.offset.x),QQe(a.y,i.offset.y))}return a}applyTransform(e,t=!1){const a={x:{min:0,max:0},y:{min:0,max:0}};EQe(a,e);for(let n=0;n<this.path.length;n++){const e=this.path[n];!t&&e.options.layoutScroll&&e.scroll&&e!==e.root&&ZQe(a,{x:-e.scroll.offset.x,y:-e.scroll.offset.y}),BQe(e.latestValues)&&ZQe(a,e.latestValues)}return BQe(this.latestValues)&&ZQe(a,this.latestValues),a}removeTransform(e){const t={x:{min:0,max:0},y:{min:0,max:0}};EQe(t,e);for(let a=0;a<this.path.length;a++){const e=this.path[a];if(!e.instance)continue;if(!BQe(e.latestValues))continue;SQe(e.latestValues)&&e.updateSnapshot();const n=OPe();EQe(n,e.measurePageBox()),tLe(t,e.latestValues,e.snapshot?e.snapshot.layoutBox:void 0,n)}return BQe(this.latestValues)&&tLe(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:void 0===e.crossfade||e.crossfade}}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!==YNe.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){var t;const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const n=Boolean(this.resumingFrom)||this!==a;if(!(e||n&&this.isSharedProjectionDirty||this.isProjectionDirty||(null==(t=this.parent)?void 0:t.isProjectionDirty)||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:i,layoutId:o}=this.options;if(this.layout&&(i||o)){if(this.resolvedRelativeTargetAt=YNe.timestamp,!this.targetDelta&&!this.relativeTarget){const e=this.getClosestProjectingParent();e&&e.layout&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},XQe(this.relativeTargetOrigin,this.layout.layoutBox,e.layout.layoutBox),EQe(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}var r,s,l;if(this.relativeTarget||this.targetDelta)if(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),r=this.target,s=this.relativeTarget,l=this.relativeParent.target,UQe(r.x,s.x,l.x),UQe(r.y,s.y,l.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):EQe(this.target,this.layout.layoutBox),RQe(this.target,this.targetDelta)):EQe(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const e=this.getClosestProjectingParent();e&&Boolean(e.resumingFrom)===Boolean(this.resumingFrom)&&!e.options.layoutScroll&&e.target&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},XQe(this.relativeTargetOrigin,this.target,e.target),EQe(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(this.parent&&!SQe(this.parent.latestValues)&&!jQe(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var e;const t=this.getLead(),a=Boolean(this.resumingFrom)||this!==t;let n=!0;if((this.isProjectionDirty||(null==(e=this.parent)?void 0:e.isProjectionDirty))&&(n=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===YNe.timestamp&&(n=!1),n)return;const{layout:i,layoutId:o}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!i&&!o)return;EQe(this.layoutCorrected,this.layout.layoutBox);const r=this.treeScale.x,s=this.treeScale.y;!function(e,t,a,n=!1){const i=a.length;if(!i)return;let o,r;t.x=t.y=1;for(let s=0;s<i;s++){o=a[s],r=o.projectionDelta;const{visualElement:i}=o.options;i&&i.props.style&&"contents"===i.props.style.display||(n&&o.options.layoutScroll&&o.scroll&&o!==o.root&&ZQe(e,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),r&&(t.x*=r.x.scale,t.y*=r.y.scale,RQe(e,r)),n&&BQe(o.latestValues)&&ZQe(e,o.latestValues))}t.x<zQe&&t.x>qQe&&(t.x=1),t.y<zQe&&t.y>qQe&&(t.y=1)}(this.layoutCorrected,this.treeScale,this.path,a),!t.layout||t.target||1===this.treeScale.x&&1===this.treeScale.y||(t.target=t.layout.layoutBox,t.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}});const{target:l}=t;l?(this.projectionDelta&&this.prevProjectionDelta?(DQe(this.prevProjectionDelta.x,this.projectionDelta.x),DQe(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),YQe(this.projectionDelta,this.layoutCorrected,l,this.latestValues),this.treeScale.x===r&&this.treeScale.y===s&&lLe(this.projectionDelta.x,this.prevProjectionDelta.x)&&lLe(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",l))):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){var t;if(null==(t=this.options.visualElement)||t.scheduleRender(),e){const e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDeltaWithTransform={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}}setAnimationOrigin(e,t=!1){const a=this.snapshot,n=a?a.latestValues:{},i={...this.latestValues},o={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;const r={x:{min:0,max:0},y:{min:0,max:0}},s=(a?a.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),g=!l||l.members.length<=1,u=Boolean(s&&!g&&!0===this.options.crossfade&&!this.path.some(BLe));let d;this.animationProgress=0,this.mixTargetDelta=t=>{const a=t/1e3;var l,c,h,f,p,A;MLe(o.x,e.x,a),MLe(o.y,e.y,a),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(XQe(r,this.layout.layoutBox,this.relativeParent.layout.layoutBox),h=this.relativeTarget,f=this.relativeTargetOrigin,p=r,A=a,SLe(h.x,f.x,p.x,A),SLe(h.y,f.y,p.y,A),d&&(l=this.relativeTarget,c=d,iLe(l.x,c.x)&&iLe(l.y,c.y))&&(this.isProjectionDirty=!1),d||(d={x:{min:0,max:0},y:{min:0,max:0}}),EQe(d,this.relativeTarget)),s&&(this.animationValues=i,function(e,t,a,n,i,o){i?(e.opacity=DRe(0,a.opacity??1,kQe(n)),e.opacityExit=DRe(t.opacity??1,0,wQe(n))):o&&(e.opacity=DRe(t.opacity??1,a.opacity??1,n));for(let r=0;r<_Qe;r++){const i=`border${yQe[r]}Radius`;let o=vQe(t,i),s=vQe(a,i);void 0===o&&void 0===s||(o||(o=0),s||(s=0),0===o||0===s||bQe(o)===bQe(s)?(e[i]=Math.max(DRe(FQe(o),FQe(s),n),0),(fPe.test(s)||fPe.test(o))&&(e[i]+="%")):e[i]=s)}(t.rotate||a.rotate)&&(e.rotate=DRe(t.rotate||0,a.rotate||0,n))}(i,n,this.latestValues,a,u,g)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=a},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){var t,a,n;this.notifyListeners("animationStart"),null==(t=this.currentAnimation)||t.stop(),null==(n=null==(a=this.resumingFrom)?void 0:a.currentAnimation)||n.stop(),this.pendingAnimation&&(GNe(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=HNe.update(()=>{dLe.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=ZPe(0)),this.currentAnimation=Uze(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onStop:()=>{},onComplete:()=>{e.onComplete&&e.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const e=this.getLead();let{targetWithTransforms:t,target:a,layout:n,latestValues:i}=e;if(t&&a&&n){if(this!==e&&this.layout&&n&&VLe(this.options.animationType,this.layout.layoutBox,n.layoutBox)){a=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const t=HQe(this.layout.layoutBox.x);a.x.min=e.target.x.min,a.x.max=a.x.min+t;const n=HQe(this.layout.layoutBox.y);a.y.min=e.target.y.min,a.y.max=a.y.min+n}EQe(t,a),ZQe(t,i),YQe(this.projectionDeltaWithTransform,this.layoutCorrected,t,i)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new gLe);this.sharedNodes.get(e).add(t);const a=t.options.initialPromotionConfig;t.promote({transition:a?a.transition:void 0,preserveFollowOpacity:a&&a.shouldPreserveFollowOpacity?a.shouldPreserveFollowOpacity(t):void 0})}isLead(){const e=this.getStack();return!e||e.lead===this}getLead(){var e;const{layoutId:t}=this.options;return t&&(null==(e=this.getStack())?void 0:e.lead)||this}getPrevLead(){var e;const{layoutId:t}=this.options;return t?null==(e=this.getStack())?void 0:e.prevLead:void 0}getStack(){const{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:a}={}){const n=this.getStack();n&&n.promote(this,a),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){const e=this.getStack();return!!e&&e.relegate(this)}resetSkewAndRotation(){const{visualElement:e}=this.options;if(!e)return;let t=!1;const{latestValues:a}=e;if((a.z||a.rotate||a.rotateX||a.rotateY||a.rotateZ||a.skewX||a.skewY)&&(t=!0),!t)return;const n={};a.z&&pLe("z",e,n,this.animationValues);for(let i=0;i<hLe.length;i++)pLe(`rotate${hLe[i]}`,e,n,this.animationValues),pLe(`skew${hLe[i]}`,e,n,this.animationValues);e.render();for(const i in n)e.setStaticValue(i,n[i]),this.animationValues&&(this.animationValues[i]=n[i]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;if(!this.isVisible)return void(e.visibility="hidden");const a=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,e.visibility="",e.opacity="",e.pointerEvents=IQe(null==t?void 0:t.pointerEvents)||"",void(e.transform=a?a(this.latestValues,""):"none");const n=this.getLead();if(!this.projectionDelta||!this.layout||!n.target)return this.options.layoutId&&(e.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,e.pointerEvents=IQe(null==t?void 0:t.pointerEvents)||""),void(this.hasProjected&&!BQe(this.latestValues)&&(e.transform=a?a({},""):"none",this.hasProjected=!1));e.visibility="";const i=n.animationValues||n.latestValues;this.applyTransformsToTarget();let o=function(e,t,a){let n="";const i=e.x.translate/t.x,o=e.y.translate/t.y,r=(null==a?void 0:a.z)||0;if((i||o||r)&&(n=`translate3d(${i}px, ${o}px, ${r}px) `),1===t.x&&1===t.y||(n+=`scale(${1/t.x}, ${1/t.y}) `),a){const{transformPerspective:e,rotate:t,rotateX:i,rotateY:o,skewX:r,skewY:s}=a;e&&(n=`perspective(${e}px) ${n}`),t&&(n+=`rotate(${t}deg) `),i&&(n+=`rotateX(${i}deg) `),o&&(n+=`rotateY(${o}deg) `),r&&(n+=`skewX(${r}deg) `),s&&(n+=`skewY(${s}deg) `)}const s=e.x.scale*t.x,l=e.y.scale*t.y;return 1===s&&1===l||(n+=`scale(${s}, ${l})`),n||"none"}(this.projectionDeltaWithTransform,this.treeScale,i);a&&(o=a(i,o)),e.transform=o;const{x:r,y:s}=this.projectionDelta;e.transformOrigin=`${100*r.origin}% ${100*s.origin}% 0`,n.animationValues?e.opacity=n===this?i.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:i.opacityExit:e.opacity=n===this?void 0!==i.opacity?i.opacity:"":void 0!==i.opacityExit?i.opacityExit:0;for(const l in _Ne){if(void 0===i[l])continue;const{correct:t,applyTo:a,isCSSVariable:r}=_Ne[l],s="none"===o?i[l]:t(i[l],n);if(a){const t=a.length;for(let n=0;n<t;n++)e[a[n]]=s}else r?this.options.visualElement.renderState.vars[l]=s:e[l]=s}this.options.layoutId&&(e.pointerEvents=n===this?IQe(null==t?void 0:t.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>{var t;return null==(t=e.currentAnimation)?void 0:t.stop()}),this.root.nodes.forEach(bLe),this.root.sharedNodes.clear()}}}function mLe(e){e.updateLayout()}function ILe(e){var t;const a=(null==(t=e.resumeFrom)?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&a&&e.hasListeners("didUpdate")){const{layoutBox:t,measuredBox:n}=e.layout,{animationType:i}=e.options,o=a.source!==e.layout.source;"size"===i?uLe(e=>{const n=o?a.measuredBox[e]:a.layoutBox[e],i=HQe(n);n.min=t[e].min,n.max=n.min+i}):VLe(i,a.layoutBox,t)&&uLe(n=>{const i=o?a.measuredBox[n]:a.layoutBox[n],r=HQe(t[n]);i.max=i.min+r,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[n].max=e.relativeTarget[n].min+r)});const r={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};YQe(r,t,a.layoutBox);const s={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};o?YQe(s,e.applyTransform(n,!0),a.measuredBox):YQe(s,t,a.layoutBox);const l=!nLe(r);let g=!1;if(!e.resumeFrom){const n=e.getClosestProjectingParent();if(n&&!n.resumeFrom){const{snapshot:i,layout:o}=n;if(i&&o){const r={x:{min:0,max:0},y:{min:0,max:0}};XQe(r,a.layoutBox,i.layoutBox);const s={x:{min:0,max:0},y:{min:0,max:0}};XQe(s,t,o.layoutBox),rLe(r,s)||(g=!0),n.options.layoutRoot&&(e.relativeTarget=s,e.relativeTargetOrigin=r,e.relativeParent=n)}}}e.notifyListeners("didUpdate",{layout:t,snapshot:a,delta:s,layoutDelta:r,hasLayoutChanged:l,hasRelativeLayoutChanged:g})}else if(e.isLead()){const{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function yLe(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=Boolean(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function _Le(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function FLe(e){e.clearSnapshot()}function bLe(e){e.clearMeasurements()}function vLe(e){e.isLayoutDirty=!1}function kLe(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function wLe(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function xLe(e){e.resolveTargetDelta()}function OLe(e){e.calcProjection()}function ELe(e){e.resetSkewAndRotation()}function DLe(e){e.removeLeadSnapshot()}function MLe(e,t,a){e.translate=DRe(t.translate,0,a),e.scale=DRe(t.scale,1,a),e.origin=t.origin,e.originPoint=t.originPoint}function SLe(e,t,a,n){e.min=DRe(t.min,a.min,n),e.max=DRe(t.max,a.max,n)}function BLe(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}const jLe={duration:.45,ease:[.4,0,.1,1]},TLe=e=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),NLe=TLe("applewebkit/")&&!TLe("chrome/")?Math.round:zNe;function PLe(e){e.min=NLe(e.min),e.max=NLe(e.max)}function VLe(e,t,a){return"position"===e||"preserve-aspect"===e&&(n=sLe(t),i=sLe(a),o=.2,!(Math.abs(n-i)<=o));var n,i,o}function RLe(e){var t;return e!==e.root&&(null==(t=e.scroll)?void 0:t.wasRoot)}const qLe=CLe({attachResizeListener:(e,t)=>function(e,t,a,n={passive:!0}){return e.addEventListener(t,a,n),()=>e.removeEventListener(t,a)}(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),zLe={current:void 0},QLe=CLe({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!zLe.current){const e=new qLe({});e.mount(window),e.setOptions({layoutScroll:!0}),zLe.current=e}return zLe.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>Boolean("fixed"===window.getComputedStyle(e).position)});function LLe(e){if(e)return!1!==e.options.allowProjection?e.projection:LLe(e.parent)}function ZLe(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const HLe={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e){if(!pPe.test(e))return e;e=parseFloat(e)}return`${ZLe(e,t.target.x)}% ${ZLe(e,t.target.y)}%`}},GLe={correct:(e,{treeScale:t,projectionDelta:a})=>{const n=e,i=qVe.parse(e);if(i.length>5)return n;const o=qVe.createTransformer(e),r="number"!=typeof i[0]?1:0,s=a.x.scale*t.x,l=a.y.scale*t.y;i[0+r]/=s,i[1+r]/=l;const g=DRe(s,l,.5);return"number"==typeof i[2+r]&&(i[2+r]/=g),"number"==typeof i[3+r]&&(i[3+r]/=g),o(i)}},YLe={borderRadius:{...HLe,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:HLe,borderTopRightRadius:HLe,borderBottomLeftRadius:HLe,borderBottomRightRadius:HLe,boxShadow:GLe};function ULe(e){return"object"==typeof e&&null!==e&&"nodeType"in e}function WLe(e){return"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary}function XLe(e,t="page"){return{point:{x:e[`${t}X`],y:e[`${t}Y`]}}}function KLe(e,t,a,n){return AQe(e,t,function(e){return t=>WLe(t)&&e(t,XLe(t))}(a),n)}function JLe(e){let t=null;return()=>{const a=()=>{t=null};return null===t&&(t=e,a)}}const $Le=JLe("dragHorizontal"),eZe=JLe("dragVertical");function tZe(e){return e.max-e.min}const aZe=.35;function nZe(e,t,a){return{min:void 0!==t?e.min+t:void 0,max:void 0!==a?e.max+a-(e.max-e.min):void 0}}function iZe(e,t,a){return{min:oZe(e,t),max:oZe(e,a)}}function oZe(e,t){return"number"==typeof e?e:e[t]||0}function rZe(e,t){let a=t.min-e.min,n=t.max-e.max;return t.max-t.min<e.max-e.min&&([a,n]=[n,a]),{min:a,max:n}}const sZe=(e,t)=>Math.abs(e-t);class lZe{constructor(e,t,{transformPagePoint:a,contextWindow:n,dragSnapToOrigin:i=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const e=dZe(this.lastMoveEventInfo,this.history),t=null!==this.startEvent,a=function(e,t){const a=sZe(e.x,t.x),n=sZe(e.y,t.y);return Math.sqrt(a**2+n**2)}(e.offset,{x:0,y:0})>=3;if(!t&&!a)return;const{point:n}=e,{timestamp:i}=YNe;this.history.push({...n,timestamp:i});const{onStart:o,onMove:r}=this.handlers;t||(o&&o(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),r&&r(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastMoveEventInfo=gZe(t,this.transformPagePoint),HNe.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();const{onEnd:a,onSessionEnd:n,resumeAnimation:i}=this.handlers;if(this.dragSnapToOrigin&&i&&i(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const o=dZe("pointercancel"===e.type?this.lastMoveEventInfo:gZe(t,this.transformPagePoint),this.history);this.startEvent&&a&&a(e,o),n&&n(e,o)},!WLe(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=a,this.contextWindow=n||window;const o=gZe(XLe(e),this.transformPagePoint),{point:r}=o,{timestamp:s}=YNe;this.history=[{...r,timestamp:s}];const{onSessionStart:l}=t;l&&l(e,dZe(o,this.history)),this.removeListeners=Cqe(KLe(this.contextWindow,"pointermove",this.handlePointerMove),KLe(this.contextWindow,"pointerup",this.handlePointerUp),KLe(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),GNe(this.updatePoint)}}function gZe(e,t){return t?{point:t(e.point)}:e}function uZe(e,t){return{x:e.x-t.x,y:e.y-t.y}}function dZe({point:e},t){return{point:e,delta:uZe(e,hZe(t)),offset:uZe(e,cZe(t)),velocity:fZe(t,.1)}}function cZe(e){return e[0]}function hZe(e){return e[e.length-1]}function fZe(e,t){if(e.length<2)return{x:0,y:0};let a=e.length-1,n=null;const i=hZe(e);for(;a>=0&&(n=e[a],!(i.timestamp-n.timestamp>zRe(t)));)a--;if(!n)return{x:0,y:0};const o=QRe(i.timestamp-n.timestamp);if(0===o)return{x:0,y:0};const r={x:(i.x-n.x)/o,y:(i.y-n.y)/o};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function pZe(e){return[e("x"),e("y")]}function AZe(e,t){const a=e.getValue("willChange");if(n=a,Boolean(IPe(n)&&n.add))return a.add(t);var n}function CZe({top:e,left:t,right:a,bottom:n}){return{x:{min:t,max:a},y:{min:e,max:n}}}function mZe(e,t){e.min=e.min+t,e.max=e.max+t}function IZe(e,t,a){const n=(i=a,CZe(function(e,t){if(!t)return e;const a=t({x:e.left,y:e.top}),n=t({x:e.right,y:e.bottom});return{top:a.y,left:a.x,bottom:n.y,right:n.x}}(e.getBoundingClientRect(),i)));var i;const{scroll:o}=t;return o&&(mZe(n.x,o.offset.x),mZe(n.y,o.offset.y)),n}function yZe(e){return!VNe.has(e.current)}function _Ze({current:e}){return e?e.ownerDocument.defaultView:null}const FZe=new WeakMap;class bZe{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic={x:{min:0,max:0},y:{min:0,max:0}},this.visualElement=e}start(e,{snapToCursor:t=!1}={}){if(!yZe(this.visualElement))return;const{dragSnapToOrigin:a}=this.getProps();this.panSession=new lZe(e,{onSessionStart:e=>{const{dragSnapToOrigin:a}=this.getProps();a?this.pauseAnimation():this.stopAnimation(),t&&this.snapToCursor(XLe(e,"page").point)},onStart:(e,t)=>{const{drag:a,dragPropagation:n,onDragStart:i}=this.getProps();if(a&&!n&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=function(e){let t=!1;if("y"===e)t=eZe();else if("x"===e)t=$Le();else{const e=$Le(),a=eZe();e&&a?t=()=>{e(),a()}:(e&&e(),a&&a())}return t}(a),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),pZe(e=>{let t=this.getAxisMotionValue(e).get()||0;if(fPe.test(t)){const{projection:a}=this.visualElement;if(a&&a.layout){const n=a.layout.layoutBox[e];if(n){t=tZe(n)*(parseFloat(t)/100)}}}this.originPoint[e]=t}),i&&HNe.postRender(()=>i(e,t)),AZe(this.visualElement,"transform");this.visualElement.state.setActive("whileDrag",!0)},onMove:(e,t)=>{const{dragPropagation:a,dragDirectionLock:n,onDirectionLock:i,onDrag:o}=this.getProps();if(!a&&!this.openGlobalLock)return;const{offset:r}=t;if(n&&null===this.currentDirection)return this.currentDirection=function(e,t=10){let a=null;Math.abs(e.y)>t?a="y":Math.abs(e.x)>t&&(a="x");return a}(r),void(null!==this.currentDirection&&i&&i(this.currentDirection));this.updateAxis("x",t.point,r),this.updateAxis("y",t.point,r),this.visualElement.render(),o&&o(e,t)},onSessionEnd:(e,t)=>this.stop(e,t),resumeAnimation:()=>pZe(e=>{var t;return"paused"===this.getAnimationState(e)&&(null==(t=this.getAxisMotionValue(e).animation)?void 0:t.play())})},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:a,contextWindow:_Ze(this.visualElement)})}stop(e,t){const a=this.isDragging;if(this.cancel(),!a)return;const{velocity:n}=t;this.startAnimation(n);const{onDragEnd:i}=this.getProps();i&&HNe.postRender(()=>i(e,t))}cancel(){this.isDragging=!1;const{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:a}=this.getProps();!a&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null);this.visualElement.state.setActive("whileDrag",!1)}updateAxis(e,t,a){const{drag:n}=this.getProps();if(!a||!vZe(e,n,this.currentDirection))return;const i=this.getAxisMotionValue(e);let o=this.originPoint[e]+a[e];this.constraints&&this.constraints[e]&&(o=function(e,{min:t,max:a},n){return void 0!==t&&e<t?e=n?DRe(t,e,n.min):Math.max(e,t):void 0!==a&&e>a&&(e=n?DRe(a,e,n.max):Math.min(e,a)),e}(o,this.constraints[e],this.elastic[e])),i.set(o)}resolveConstraints(){var e;const{dragConstraints:t,dragElastic:a}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):null==(e=this.visualElement.projection)?void 0:e.layout,i=this.constraints;t&&ULe(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!t||!n)&&function(e,{top:t,left:a,bottom:n,right:i}){return{x:nZe(e.x,a,i),y:nZe(e.y,t,n)}}(n.layoutBox,t),this.elastic=function(e=aZe){return!1===e?e=0:!0===e&&(e=aZe),{x:iZe(e,"left","right"),y:iZe(e,"top","bottom")}}(a),i!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&pZe(e=>{!1!==this.constraints&&this.getAxisMotionValue(e)&&(this.constraints[e]=function(e,t){const a={};return void 0!==t.min&&(a.min=t.min-e.min),void 0!==t.max&&(a.max=t.max-e.min),a}(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!ULe(e))return!1;const a=e;MNe(null!==a,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:n}=this.visualElement;if(!n||!n.layout)return!1;const i=IZe(a,n.root,this.visualElement.getTransformPagePoint());let o=function(e,t){return{x:rZe(e.x,t.x),y:rZe(e.y,t.y)}}(n.layout.layoutBox,i);if(t){const e=t(function({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}(o));this.hasMutatedConstraints=!!e,e&&(o=CZe(e))}return o}startAnimation(e){const{drag:t,dragMomentum:a,dragElastic:n,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:r}=this.getProps(),s=this.constraints||{},l=pZe(r=>{if(!vZe(r,t,this.currentDirection))return;let l=s&&s[r]||{};o&&(l={min:0,max:0});const g=n?200:1e6,u=n?40:1e7,d={type:"inertia",velocity:a?e[r]:0,bounceStiffness:g,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...i,...l};return this.startAxisValueAnimation(r,d)});return Promise.all(l).then(r)}startAxisValueAnimation(e,t){const a=this.getAxisMotionValue(e);return AZe(this.visualElement,e),a.start(qze(e,a,0,t,this.visualElement,!1))}stopAnimation(){yZe(this.visualElement)&&pZe(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){pZe(e=>{var t;return null==(t=this.getAxisMotionValue(e).animation)?void 0:t.pause()})}getAnimationState(e){var t;return null==(t=this.getAxisMotionValue(e).animation)?void 0:t.state}getAxisMotionValue(e){const t=`_drag${e.toUpperCase()}`,a=this.visualElement.getProps();return a[t]||this.visualElement.getValue(e,(a.initial?a.initial[e]:void 0)||0)}snapToCursor(e){pZe(t=>{const{drag:a}=this.getProps();if(!vZe(t,a,this.currentDirection))return;const{projection:n}=this.visualElement,i=this.getAxisMotionValue(t);if(n&&n.layout){const{min:a,max:o}=n.layout.layoutBox[t];i.set(e[t]-DRe(a,o,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:t}=this.getProps(),{projection:a}=this.visualElement;if(!ULe(t)||!a||!this.constraints)return;this.stopAnimation();const n={x:0,y:0};pZe(e=>{const t=this.getAxisMotionValue(e);if(t&&!1!==this.constraints){const a=t.get();n[e]=function(e,t){let a=.5;const n=tZe(e),i=tZe(t);return i>n?a=NRe(t.min,t.max-n,e.min):n>i&&(a=NRe(e.min,e.max-i,t.min)),oVe(0,1,a)}({min:a,max:a},this.constraints[e])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",a.root&&a.root.updateScroll(),a.updateLayout(),this.resolveConstraints(),pZe(t=>{if(!vZe(t,e,null))return;const a=this.getAxisMotionValue(t),{min:i,max:o}=this.constraints[t];a.set(DRe(i,o,n[t]))})}addListeners(){if(!this.visualElement.current)return;FZe.set(this.visualElement,this);const e=KLe(this.visualElement.current,"pointerdown",e=>{const{drag:t,dragListener:a=!0}=this.getProps();t&&a&&this.start(e)}),t=()=>{const{dragConstraints:e}=this.getProps();ULe(e)&&(this.constraints=this.resolveRefConstraints())},{projection:a}=this.visualElement,n=a.addEventListener("measure",t);a&&!a.layout&&(a.root&&a.root.updateScroll(),a.updateLayout()),HNe.read(t);const i=AQe(window,"resize",()=>this.scalePositionWithinConstraints()),o=a.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(pZe(t=>{const a=this.getAxisMotionValue(t);a&&(this.originPoint[t]+=e[t].translate,a.set(a.get()+e[t].translate))}),this.visualElement.render())});return()=>{i(),e(),n(),o&&o()}}getProps(){const e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:a=!1,dragPropagation:n=!1,dragConstraints:i=!1,dragElastic:o=aZe,dragMomentum:r=!0}=e;return{...e,drag:t,dragDirectionLock:a,dragPropagation:n,dragConstraints:i,dragElastic:o,dragMomentum:r}}}function vZe(e,t,a){return!(!0!==t&&t!==e||null!==a&&a!==e)}function kZe(e){return(t,a)=>{e&&HNe.postRender(()=>e(t,a))}}const wZe=[class extends ENe{constructor(e){var t,a,n;super(e),this.animateUpdates=({controlActiveState:e,directAnimate:t,directTransition:a,controlDelay:n=0,isFallback:i,isExit:o}={})=>{const{reducedMotion:r}=this.state.options.motionConfig;this.state.visualElement.shouldReduceMotion="always"===r||"user"===r&&!!DPe.current;const s=this.state.target;this.state.target={...this.state.baseTarget};let l={};l=this.resolveStateAnimation({controlActiveState:e,directAnimate:t,directTransition:a});const g=this.createAnimationFactories(s,l,n),{getChildAnimations:u}=this.setupChildAnimations(l,this.state.activeStates,i);return this.executeAnimations({factories:g,getChildAnimations:u,transition:l,controlActiveState:e,isExit:o})},this.state.visualElement=(a=this.state.options.as,n={presenceContext:null,parent:null==(t=this.state.parent)?void 0:t.visualElement,props:{...this.state.options,whileTap:this.state.options.whilePress},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{...this.state.baseTarget}},reducedMotionConfig:this.state.options.motionConfig.reducedMotion},NNe(a)?new vRe(n):new mRe(n)),this.state.animateUpdates=this.animateUpdates,this.state.isMounted()&&this.state.startAnimation()}updateAnimationControlsSubscription(){const{animate:e}=this.state.options;ONe(e)&&(this.unmountControls=e.subscribe(this.state))}executeAnimations({factories:e,getChildAnimations:t,transition:a,controlActiveState:n,isExit:i=!1}){const o=()=>Promise.all(e.map(e=>e()).filter(Boolean)),r={...this.state.target},s=this.state.element,l=e=>{var t,a;s.dispatchEvent(ePe("motionstart",r)),null==(a=(t=this.state.options).onAnimationStart)||a.call(t,r),e.then(()=>{var e,t;s.dispatchEvent(ePe("motioncomplete",r,i)),null==(t=(e=this.state.options).onAnimationComplete)||t.call(e,r)}).catch(zNe)},g=()=>{const e=(null==a?void 0:a.when)?("beforeChildren"===a.when?o():t()).then(()=>"beforeChildren"===a.when?t():o()):Promise.all([o(),t()]);return l(e),e};return n?g:g()}setupChildAnimations(e,t,a){var n;const i=this.state.visualElement;if(!(null==(n=i.variantChildren)?void 0:n.size)||!t)return{getChildAnimations:()=>Promise.resolve()};const{staggerChildren:o=0,staggerDirection:r=1,delayChildren:s=0}=e||{},l=i.variantChildren.size,g=(l-1)*o,u="function"==typeof s,d=u?e=>s(e,l):1===r?(e=0)=>e*o:(e=0)=>g-e*o,c=Array.from(i.variantChildren).map((e,a)=>e.state.animateUpdates({controlActiveState:t,controlDelay:(u?0:s)+d(a)}));return{getChildAnimations:()=>Promise.all(c.map(e=>e()))}}createAnimationFactories(e,t,a){const n=[];return Object.keys(this.state.target).forEach(i=>{var o,r,s;if(r=e[i],s=this.state.target[i],typeof r==typeof s&&(Array.isArray(r)&&Array.isArray(s)?function(e,t){const a=t.length;if(a!==e.length)return!1;for(let n=0;n<a;n++)if(t[n]!==e[n])return!1;return!0}(r,s):r===s))return;(o=this.state.baseTarget)[i]??(o[i]=yPe(this.state.element,i));const l="none"===this.state.target[i]&&kPe(dPe[i])?dPe[i]:this.state.target[i];n.push(()=>{var e;return $ze(this.state.element,{[i]:l},{...(null==t?void 0:t[i])||t,delay:((null==(e=null==t?void 0:t[i])?void 0:e.delay)||(null==t?void 0:t.delay)||0)+a})})}),n}resolveStateAnimation({controlActiveState:e,directAnimate:t,directTransition:a}){let n=this.state.options.transition,i={};const{variants:o,custom:r,transition:s,animatePresenceContext:l}=this.state.options,g=r??(null==l?void 0:l.custom);return this.state.activeStates={...this.state.activeStates,...e},eQe.forEach(e=>{if(!this.state.activeStates[e]||ONe(this.state.options[e]))return;const t=this.state.options[e];let a=kPe(t)?SNe(t,o,g):void 0;if(this.state.visualElement.isVariantNode){const t=SNe(this.state.context[e],o,g);a=t?Object.assign(t||{},a):i}a&&("initial"!==e&&(n=a.transition||this.state.options.transition||{}),i=Object.assign(i,a))}),t&&(i=SNe(t,o,g),n=i.transition||a||s),Object.entries(i).forEach(([e,t])=>{"transition"!==e&&(this.state.target[e]=t)}),n}mount(){const{element:e}=this.state;WNe.set(e,this.state),$Ne.get(e)||(this.state.visualElement.mount(e),$Ne.set(e,this.state.visualElement)),this.state.visualElement.state=this.state,this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.state.options,{animate:t}=this.state.visualElement.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){var e;null==(e=this.unmountControls)||e.call(this)}},class extends ENe{isActive(){const{whilePress:e,onPress:t,onPressCancel:a,onPressStart:n}=this.state.options;return Boolean(e||t||a||n)}constructor(e){super(e)}mount(){this.register()}update(){const{whilePress:e,onPress:t,onPressCancel:a,onPressStart:n}=this.state.options;e||t||a||n||this.register()}register(){const e=this.state.element;e&&this.isActive()&&(this.unmount(),this.unmount=gQe(e,(e,t)=>(dQe(this.state,t,"Start"),(e,{success:t})=>dQe(this.state,e,t?"End":"Cancel")),{useGlobalTarget:this.state.options.globalPressTarget}))}},class extends ENe{isActive(){const{whileHover:e,onHoverStart:t,onHoverEnd:a}=this.state.options;return Boolean(e||t||a)}constructor(e){super(e)}mount(){this.register()}update(){const{whileHover:e,onHoverStart:t,onHoverEnd:a}=this.state.visualElement.prevProps;e||t||a||this.register()}register(){const e=this.state.element;e&&this.isActive()&&(this.unmount(),this.unmount=function(e,t,a={}){const[n,i,o]=nQe(e,a),r=e=>{if(!cQe(e))return;const{target:a}=e,n=t(a,e);if("function"!=typeof n||!a)return;const o=e=>{cQe(e)&&(n(e),a.removeEventListener("pointerleave",o))};a.addEventListener("pointerleave",o,i)};return n.forEach(e=>{e.addEventListener("pointerenter",r,i)}),o}(e,(e,t)=>(hQe(this.state,t,"Start"),e=>{hQe(this.state,e,"End")})))}},class extends ENe{isActive(){const{whileInView:e,onViewportEnter:t,onViewportLeave:a}=this.state.options;return Boolean(e||t||a)}constructor(e){super(e)}startObserver(){const e=this.state.element;if(!e||!this.isActive())return;this.unmount();const{once:t,...a}=this.state.options.inViewOptions||{};this.unmount=function(e,t,{root:a,margin:n,amount:i="some"}={}){const o=wRe(e),r=new WeakMap,s=new IntersectionObserver(e=>{e.forEach(e=>{const a=r.get(e.target);if(e.isIntersecting!==Boolean(a))if(e.isIntersecting){const a=t(e.target,e);"function"==typeof a?r.set(e.target,a):s.unobserve(e.target)}else"function"==typeof a&&(a(e),r.delete(e.target))})},{root:a,rootMargin:n,threshold:"number"==typeof i?i:fQe[i]});return o.forEach(e=>s.observe(e)),()=>s.disconnect()}(e,(e,a)=>{if(pQe(this.state,a,"Enter"),!t)return e=>{pQe(this.state,a,"Leave")}},a)}mount(){this.startObserver()}update(){const{props:e,prevProps:t}=this.state.visualElement;["amount","margin","root"].some(function({inViewOptions:e={}},{inViewOptions:t={}}={}){return a=>e[a]!==t[a]}(e,t))&&this.startObserver()}},class extends ENe{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.state.element.matches(":focus-visible")}catch(t){e=!0}e&&(this.state.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&(this.state.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Cqe(AQe(this.state.element,"focus",()=>this.onFocus()),AQe(this.state.element,"blur",()=>this.onBlur()))}},class extends ENe{constructor(e){super(e),FNe(YLe)}initProjection(){const e=this.state.options;this.state.visualElement.projection=new QLe(this.state.visualElement.latestValues,e["data-framer-portal-id"]?void 0:LLe(this.state.visualElement.parent)),this.state.visualElement.projection.isPresent=!0,this.setOptions()}beforeMount(){this.initProjection()}setOptions(){const e=this.state.options;this.state.visualElement.projection.setOptions({layout:e.layout,layoutId:e.layoutId,alwaysMeasureLayout:Boolean(e.drag)||e.dragConstraints&&ULe(e.dragConstraints),visualElement:this.state.visualElement,animationType:"string"==typeof e.layout?e.layout:"both",layoutRoot:e.layoutRoot,layoutScroll:e.layoutScroll,crossfade:e.crossfade,onExitComplete:()=>{var e;if(!(null==(e=this.state.visualElement.projection)?void 0:e.isPresent)){const e=VNe.get(this.state.element);this.state.isSafeToRemove=!0,e&&e({detail:{isExit:!0}},!0)}}})}update(){this.setOptions()}mount(){var e;null==(e=this.state.visualElement.projection)||e.mount(this.state.element)}},class extends ENe{constructor(){super(...arguments),this.removePointerDownListener=zNe}onPointerDown(e){this.session=new lZe(e,this.createPanHandlers(),{transformPagePoint:this.state.visualElement.getTransformPagePoint(),contextWindow:_Ze(this.state.visualElement)})}createPanHandlers(){return{onSessionStart:kZe((e,t)=>{const{onPanSessionStart:a}=this.state.options;a&&a(e,t)}),onStart:kZe((e,t)=>{const{onPanStart:a}=this.state.options;a&&a(e,t)}),onMove:(e,t)=>{const{onPan:a}=this.state.options;a&&a(e,t)},onEnd:(e,t)=>{const{onPanEnd:a}=this.state.options;delete this.session,a&&HNe.postRender(()=>a(e,t))}}}mount(){this.removePointerDownListener=KLe(this.state.element,"pointerdown",this.onPointerDown.bind(this))}update(){}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}},class extends ENe{constructor(e){super(e),this.removeGroupControls=zNe,this.removeListeners=zNe,this.controls=new bZe(e.visualElement)}mount(){const{dragControls:e}=this.state.options;e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||zNe}unmount(){this.removeGroupControls(),this.removeListeners()}},class extends ENe{constructor(e){super(e),FNe(YLe)}beforeUpdate(){this.state.willUpdate("beforeUpdate")}update(){this.didUpdate()}didUpdate(){var e,t;(this.state.options.layout||this.state.options.layoutId||this.state.options.drag)&&(null==(t=null==(e=this.state.visualElement.projection)?void 0:e.root)||t.didUpdate())}mount(){var e;const t=this.state.options,a=this.state.options.layoutGroup;if(t.layout||t.layoutId){const t=this.state.visualElement.projection;t&&(t.promote(),null==(e=null==a?void 0:a.group)||e.add(t)),dLe.hasEverUpdated=!0}this.didUpdate()}beforeUnmount(){const e=this.state.visualElement.projection;e&&(this.state.willUpdate("beforeUnmount"),this.state.options.layoutId?(e.isPresent=!1,e.relegate()):this.state.options.layout&&(this.state.isSafeToRemove=!0))}unmount(){const e=this.state.options.layoutGroup,t=this.state.visualElement.projection;t&&((null==e?void 0:e.group)&&(this.state.options.layout||this.state.options.layoutId)&&e.group.remove(t),this.didUpdate())}}],xZe={reducedMotion:"never",transition:void 0,nonce:void 0},[OZe,EZe]=bNe("MotionConfig");function DZe(){return OZe(a.computed(()=>xZe))}const MZe=a.defineComponent({name:"MotionConfig",inheritAttrs:!1,__name:"MotionConfig",props:{transition:{},reduceMotion:{},reducedMotion:{default:({reduceMotion:e})=>kPe(e)?(DNe(!1,"`reduceMotion` is deprecated. Use `reducedMotion` instead."),e):xZe.reducedMotion},nonce:{},inViewOptions:{}},setup(e){const t=e,n=DZe(),i=a.computed(()=>({transition:t.transition??n.value.transition,reducedMotion:t.reducedMotion??n.value.reducedMotion,nonce:t.nonce??n.value.nonce,inViewOptions:t.inViewOptions??n.value.inViewOptions}));return EZe(i),(e,t)=>a.renderSlot(e.$slots,"default")}});function SZe(e){return 3===(null==e?void 0:e.nodeType)||8===(null==e?void 0:e.nodeType)?SZe(e.nextSibling):e}const[BZe,jZe]=bNe("LazyMotionContext");function TZe(e){var t;const n=vNe(null),i=wNe({}),o=DZe(),r=RNe({}),s=BZe({features:a.ref([]),strict:!1});if("production"!==process.env.NODE_ENV&&(null==(t=e.features)?void 0:t.length)&&s.strict){const t="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?DNe(!1,t):MNe(!1,t)}const l=a.useAttrs();function g(){return{...e,lazyMotionContext:s,layoutId:i.id&&e.layoutId?`${i.id}-${e.layoutId}`:e.layoutId||void 0,transition:e.transition??o.value.transition,layoutGroup:i,motionConfig:o.value,inViewOptions:e.inViewOptions??o.value.inViewOptions,animatePresenceContext:r,initial:!1===r.initial?r.initial:!0===e.initial?void 0:e.initial}}function u(){return{...l,...g()}}const d=new JNe(u(),n);kNe(d);const c=a.getCurrentInstance().proxy;return a.onBeforeMount(()=>{d.beforeMount()}),a.onMounted(()=>{d.mount(SZe(c.$el),u(),function(e){var t;const a="none"===(null==(t=SZe(e.$el))?void 0:t.style.display),n=e.$.vnode.transition;return n&&a}(c))}),a.onBeforeUnmount(()=>d.beforeUnmount()),a.onUnmounted(()=>{const e=SZe(c.$el);(null==e?void 0:e.isConnected)||d.unmount()}),a.onBeforeUpdate(()=>{d.beforeUpdate()}),a.onUpdated(()=>{d.update(u())}),{getProps:g,getAttrs:function(){var t;const a="svg"===d.type,n={...l};Object.keys(l).forEach(e=>{IPe(l[e])&&(n[e]=l[e].get())});let i={...e.style,...a?{}:(null==(t=d.visualElement)?void 0:t.latestValues)||d.baseTarget};if(a){const{attrs:e,style:t}=vPe({...d.isMounted()?d.target:d.baseTarget,...i});(t.transform||e.transformOrigin)&&(t.transformOrigin=e.transformOrigin??"50% 50%",delete e.transformOrigin),t.transform&&(t.transformBox=t.transformBox??"fill-box",delete e.transformBox),Object.assign(n,e),i=t}e.drag&&!1!==e.dragListener&&Object.assign(i,{userSelect:"none",WebkitUserSelect:"none",WebkitTouchCallout:"none",touchAction:!0===e.drag?"none":"pan-"+("x"===e.drag?"y":"x")});const o=_Pe(i);return o&&(n.style=o),n},layoutGroup:i,state:d}}const NZe={ignoreStrict:{type:Boolean},forwardMotionProps:{type:Boolean,default:!1},asChild:{type:Boolean,default:!1},hover:{type:[String,Array,Object]},press:{type:[String,Array,Object]},inView:{type:[String,Array,Object]},focus:{type:[String,Array,Object]},whileDrag:{type:[String,Array,Object]},whileHover:{type:[String,Array,Object],default:({hover:e})=>("development"===process.env.NODE_ENV&&e&&DNe(!0,"hover is deprecated. Use whileHover instead."),e)},whilePress:{type:[String,Array,Object],default:({press:e})=>("development"===process.env.NODE_ENV&&e&&DNe(!0,"press is deprecated. Use whilePress instead."),e)},whileInView:{type:[String,Array,Object],default:({inView:e})=>("development"===process.env.NODE_ENV&&e&&DNe(!0,"inView is deprecated. Use whileInView instead."),e)},whileFocus:{type:[String,Array,Object],default:({focus:e})=>("development"===process.env.NODE_ENV&&e&&DNe(!0,"focus is deprecated. Use whileFocus instead."),e)},custom:{type:[String,Number,Object,Array]},initial:{type:[String,Array,Object,Boolean],default:void 0},animate:{type:[String,Array,Object],default:void 0},exit:{type:[String,Array,Object]},variants:{type:Object},inherit:{type:Boolean},style:{type:Object},transformTemplate:{type:Function},transition:{type:Object},layoutGroup:{type:Object},motionConfig:{type:Object},onAnimationComplete:{type:Function},onUpdate:{type:Function},layout:{type:[Boolean,String],default:!1},layoutId:{type:String,default:void 0},layoutScroll:{type:Boolean,default:!1},layoutRoot:{type:Boolean,default:!1},"data-framer-portal-id":{type:String},crossfade:{type:Boolean,default:!0},layoutDependency:{type:[String,Number,Object,Array]},onBeforeLayoutMeasure:{type:Function},onLayoutMeasure:{type:Function},onLayoutAnimationStart:{type:Function},onLayoutAnimationComplete:{type:Function},globalPressTarget:{type:Boolean},onPressStart:{type:Function},onPress:{type:Function},onPressCancel:{type:Function},onHoverStart:{type:Function},onHoverEnd:{type:Function},inViewOptions:{type:Object},onViewportEnter:{type:Function},onViewportLeave:{type:Function},drag:{type:[Boolean,String]},dragSnapToOrigin:{type:Boolean},dragDirectionLock:{type:Boolean},dragPropagation:{type:Boolean},dragConstraints:{type:[Boolean,Object]},dragElastic:{type:[Boolean,Number,Object],default:.5},dragMomentum:{type:Boolean,default:!0},dragTransition:{type:Object},dragListener:{type:Boolean,default:!0},dragControls:{type:Object},onDragStart:{type:Function},onDragEnd:{type:Function},onDrag:{type:Function},onDirectionLock:{type:Function},onDragTransitionEnd:{type:Function},onMeasureDragConstraints:{type:Function},onPanSessionStart:{type:Function},onPanStart:{type:Function},onPan:{type:Function},onPanEnd:{type:Function}};const PZe=new Map,VZe=new Map;const RZe=["area","img","input"];function qZe(e,t,n){var i,o;if("string"==typeof e&&RZe.includes(e))return a.h(e,t);if("template"===e){if(!n.default)return null;const e=function(e){if(!Array.isArray(e))return[e];const t=[];for(const a of e)Array.isArray(a)?t.push(...a):t.push(a);return t}(n.default()),r=e.findIndex(e=>e.type!==a.Comment);if(-1===r)return e;const s=e[r];null==(i=s.props)||delete i.ref;const l=s.props?a.mergeProps(t,s.props):t;t.class&&(null==(o=s.props)?void 0:o.class)&&delete s.props.class;const g=a.cloneVNode(s,l);for(const t in l)t.startsWith("on")&&(g.props||(g.props={}),g.props[t]=l[t]);return 1===e.length?g:(e[r]=g,e)}return null}function zZe(e,t={}){var n;const i="string"==typeof e,o=i?e:e.name||"",r=(null==(n=t.features)?void 0:n.length)>0?PZe:VZe;if(i&&(null==r?void 0:r.has(e)))return r.get(e);const s=a.defineComponent({inheritAttrs:!1,props:{...NZe,features:{type:Object,default:()=>t.features||[]},as:{type:[String,Object],default:e||"div"}},name:o?`motion.${o}`:"Motion",setup(e,{slots:n}){const{getProps:i,getAttrs:o,state:r}=TZe(e);function s(){const t=r.element;if((!("object"==typeof e.as)||e.asChild)&&t){const{style:e}=o();if(e)for(const[a,n]of Object.entries(e))t.style[a]=n}}return()=>{const r=i(),l=o(),g=e.asChild?"template":e.as,u={...t.forwardMotionProps||e.forwardMotionProps?r:{},...l,onVnodeUpdated:s},d=qZe(g,u,n);return null!==d?d:a.h(g,{...u},n)}}});return i&&(null==r||r.set(e,s)),s}const QZe=function(e=[]){return new Proxy({},{get:(t,a)=>"create"===a?(t,a)=>zZe(t,{...a,features:e}):zZe(a,{features:e})})}(wZe).create("div"),LZe={class:"flex flex-wrap gap-4"},ZZe={class:"text-sm font-medium"},HZe={class:"text-xs text-muted-foreground"},GZe={class:"flex flex-wrap gap-3"},YZe={class:"text-xs font-medium uppercase"},UZe={class:"font-semibold"},WZe={class:"text-xs font-medium uppercase text-primary duration-200"},XZe=a.defineComponent({__name:"SpringCalendar",props:{calendarData:{},initialIndex:{}},emits:["update:activeIndex"],setup(e,{emit:t}){const n=e,i=t,o=a.ref(n.initialIndex??0);return(e,t)=>{const n=a.resolveComponent("TextMorph"),r=a.resolveComponent("Icon");return a.openBlock(),a.createBlock(a.unref(MZe),{transition:{duration:.7,type:"spring",bounce:.5}},{default:a.withCtx(()=>[a.createVNode(a.unref(QZe),{layout:"",as:"div",class:"flex w-full flex-col gap-6 overflow-hidden rounded-3xl border bg-muted/50 p-8",animate:{height:e.calendarData[o.value].events?"auto":"fit"}},{default:a.withCtx(()=>[a.createVNode(n,{text:e.calendarData[o.value].day,class:"w-fit font-bold","morph-time":.5,"cool-down-time":.1},null,8,["text"]),e.calendarData[o.value].events?(a.openBlock(),a.createBlock(a.unref(QZe),{key:"event-container"+Math.random(),layout:"",as:"div",class:"flex flex-col gap-4",initial:{x:10,opacity:0},animate:{x:0,opacity:1}},{default:a.withCtx(()=>[a.createVNode(a.unref(QZe),{as:"div",class:"flex items-center gap-2",layout:"",initial:{x:10,opacity:0},animate:{x:0,opacity:1}},{default:a.withCtx(()=>[a.createVNode(r,{name:"lucide:calendar"}),t[0]||(t[0]=a.createElementVNode("span",{class:"font-medium"},"Upcoming Events",-1))]),_:1,__:[0]}),a.createElementVNode("div",LZe,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(e.calendarData[o.value].events,e=>(a.openBlock(),a.createBlock(a.unref(QZe),{key:e.title+e.time+Math.random(),as:"div",layout:"",class:"w-full max-w-44 rounded-lg border p-3",initial:{x:10,opacity:0},animate:{x:0,opacity:1}},{default:a.withCtx(()=>[a.createElementVNode("p",ZZe,a.toDisplayString(e.title),1),a.createElementVNode("p",HZe,a.toDisplayString(e.day)+", "+a.toDisplayString(e.time),1)]),_:2},1024))),128))])]),_:1})):a.createCommentVNode("",!0),a.createElementVNode("div",GZe,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(e.calendarData,(e,t)=>(a.openBlock(),a.createBlock(a.unref(QZe),{key:e.date+"-"+t,as:"button",layout:"",class:a.normalizeClass(["flex flex-col rounded-2xl border border-border p-3 text-center opacity-100 duration-200 hover:bg-muted-foreground/10",o.value===t?"bg-muted-foreground/5":""]),"while-hover":{scale:1.1},"while-press":{scale:.8},transition:{duration:.01},onClick:e=>function(e){o.value=e,i("update:activeIndex",e)}(t)},{default:a.withCtx(()=>[a.createElementVNode("span",YZe,a.toDisplayString(e.month),1),a.createElementVNode("span",UZe,a.toDisplayString(e.date),1),a.createElementVNode("span",WZe,a.toDisplayString(e.day),1)]),_:2},1032,["class","onClick"]))),128))])]),_:1},8,["animate"])]),_:1})}}}),KZe="absolute inset-x-0 top-0 m-auto inline-block w-full",JZe=a.defineComponent({__name:"TextMorph",props:{class:{},text:{},morphTime:{default:1.5},coolDownTime:{default:.5}},setup(e){const t=e,n=a.ref(),i=a.ref(),o=a.ref(t.text),r=a.ref(t.text),s=a.ref(0),l=a.ref(0),g=a.ref(new Date),u=a.ref(!1);let d=0;function c(){s.value-=l.value,l.value=0;let e=s.value/t.morphTime;e>1&&(l.value=t.coolDownTime,e=1),function(e){if(!n.value||!i.value)return;i.value.textContent=r.value,n.value.textContent=o.value,i.value.style.filter=`blur(${Math.min(8/e-8,100)}px)`,i.value.style.opacity=100*Math.pow(e,.4)+"%";const t=1-e;n.value.style.filter=`blur(${Math.min(8/t-8,100)}px)`,n.value.style.opacity=100*Math.pow(t,.4)+"%"}(e),1===e&&(o.value=r.value)}function h(){d=requestAnimationFrame(h);const e=new Date,t=(e.getTime()-g.value.getTime())/1e3;g.value=e,l.value-=t,l.value<=0?(c(),l.value>0&&(cancelAnimationFrame(d),u.value=!1)):(s.value=0,n.value&&i.value&&(i.value.style.filter="none",i.value.style.opacity="100%",n.value.style.filter="none",n.value.style.opacity="0%"))}return a.watch(()=>t.text,e=>{e!==r.value&&(o.value=r.value,r.value=e,s.value=0,l.value=0,g.value=new Date,u.value||(u.value=!0,h()))}),a.onMounted(()=>{h()}),a.onUnmounted(()=>{cancelAnimationFrame(d)}),(e,o)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(a.unref(Dt)("relative h-16 w-full max-w-screen-md text-center text-[40pt] font-bold leading-none [filter:url(#threshold)_blur(0.6px)]",t.class))},[a.createElementVNode("span",{ref_key:"text1Ref",ref:n,class:a.normalizeClass(a.unref(Dt)(KZe))},null,2),a.createElementVNode("span",{ref_key:"text2Ref",ref:i,class:a.normalizeClass(a.unref(Dt)(KZe))},null,2),o[0]||(o[0]=a.createElementVNode("svg",{id:"filters",class:"fixed size-0",preserveAspectRatio:"xMidYMid slice"},[a.createElementVNode("defs",null,[a.createElementVNode("filter",{id:"threshold"},[a.createElementVNode("feColorMatrix",{in:"SourceGraphic",type:"matrix",values:"1 0 0 0 0\n 0 1 0 0 0\n 0 0 1 0 0\n 0 0 0 255 -140"})])])],-1))],2))}}),$Ze=Object.freeze(Object.defineProperty({__proto__:null,SpringCalendar:XZe,TextMorph:JZe},Symbol.toStringTag,{value:"Module"})),eHe=a.defineComponent({__name:"Switch",props:{defaultValue:{type:Boolean},modelValue:{type:[Boolean,null]},disabled:{type:Boolean},id:{},value:{},asChild:{type:Boolean},as:{},name:{},required:{type:Boolean},class:{}},emits:["update:modelValue"],setup(e,{emit:t}){const i=e,o=t,r=a.computed(()=>{const{class:e,...t}=i;return t}),s=n.useForwardPropsEmits(r,o);return(e,t)=>(a.openBlock(),a.createBlock(a.unref(n.SwitchRoot),a.mergeProps({"data-slot":"switch"},a.unref(s),{class:a.unref(Dt)("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",i.class)}),{default:a.withCtx(()=>[a.createVNode(a.unref(n.SwitchThumb),{"data-slot":"switch-thumb",class:a.normalizeClass(a.unref(Dt)("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0"))},{default:a.withCtx(()=>[a.renderSlot(e.$slots,"thumb")]),_:3},8,["class"])]),_:3},16,["class"]))}}),tHe=Object.freeze(Object.defineProperty({__proto__:null,Switch:eHe},Symbol.toStringTag,{value:"Module"})),aHe={"data-slot":"table-container",class:"relative w-full overflow-auto"},nHe=a.defineComponent({__name:"Table",props:{class:{}},setup(e){const t=e;return(e,n)=>(a.openBlock(),a.createElementBlock("div",aHe,[a.createElementVNode("table",{"data-slot":"table",class:a.normalizeClass(a.unref(Dt)("w-full caption-bottom text-sm",t.class))},[a.renderSlot(e.$slots,"default")],2)]))}}),iHe=a.defineComponent({__name:"TableBody",props:{class:{}},setup(e){const t=e;return(e,n)=>(a.openBlock(),a.createElementBlock("tbody",{"data-slot":"table-body",class:a.normalizeClass(a.unref(Dt)("[&_tr:last-child]:border-0",t.class))},[a.renderSlot(e.$slots,"default")],2))}}),oHe=a.defineComponent({__name:"TableCaption",props:{class:{}},setup(e){const t=e;return(e,n)=>(a.openBlock(),a.createElementBlock("caption",{"data-slot":"table-caption",class:a.normalizeClass(a.unref(Dt)("text-muted-foreground mt-4 text-sm",t.class))},[a.renderSlot(e.$slots,"default")],2))}}),rHe=a.defineComponent({__name:"TableCell",props:{class:{}},setup(e){const t=e;return(e,n)=>(a.openBlock(),a.createElementBlock("td",{"data-slot":"table-cell",class:a.normalizeClass(a.unref(Dt)("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t.class))},[a.renderSlot(e.$slots,"default")],2))}}),sHe=a.defineComponent({__name:"TableRow",props:{class:{}},setup(e){const t=e;return(e,n)=>(a.openBlock(),a.createElementBlock("tr",{"data-slot":"table-row",class:a.normalizeClass(a.unref(Dt)("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",t.class))},[a.renderSlot(e.$slots,"default")],2))}}),lHe={class:"flex items-center justify-center py-10"},gHe=a.defineComponent({__name:"TableEmpty",props:{class:{},colspan:{default:1}},setup(e){const t=e,n=a.computed(()=>{const{class:e,...a}=t;return a});return(e,i)=>(a.openBlock(),a.createBlock(sHe,null,{default:a.withCtx(()=>[a.createVNode(rHe,a.mergeProps({class:a.unref(Dt)("p-4 whitespace-nowrap align-middle text-sm text-foreground",t.class)},n.value),{default:a.withCtx(()=>[a.createElementVNode("div",lHe,[a.renderSlot(e.$slots,"default")])]),_:3},16,["class"])]),_:3}))}}),uHe=a.defineComponent({__name:"TableFooter",props:{class:{}},setup(e){const t=e;return(e,n)=>(a.openBlock(),a.createElementBlock("tfoot",{"data-slot":"table-footer",class:a.normalizeClass(a.unref(Dt)("bg-muted/50 border-t font-medium [&>tr]:last:border-b-0",t.class))},[a.renderSlot(e.$slots,"default")],2))}}),dHe=a.defineComponent({__name:"TableHead",props:{class:{}},setup(e){const t=e;return(e,n)=>(a.openBlock(),a.createElementBlock("th",{"data-slot":"table-head",class:a.normalizeClass(a.unref(Dt)("text-muted-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t.class))},[a.renderSlot(e.$slots,"default")],2))}}),cHe=a.defineComponent({__name:"TableHeader",props:{class:{}},setup(e){const t=e;return(e,n)=>(a.openBlock(),a.createElementBlock("thead",{"data-slot":"table-header",class:a.normalizeClass(a.unref(Dt)("[&_tr]:border-b",t.class))},[a.renderSlot(e.$slots,"default")],2))}}),hHe=Object.freeze(Object.defineProperty({__proto__:null,Table:nHe,TableBody:iHe,TableCaption:oHe,TableCell:rHe,TableEmpty:gHe,TableFooter:uHe,TableHead:dHe,TableHeader:cHe,TableRow:sHe},Symbol.toStringTag,{value:"Module"})),fHe=a.defineComponent({__name:"Tabs",props:{defaultValue:{},orientation:{},dir:{},activationMode:{},modelValue:{},unmountOnHide:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["update:modelValue"],setup(e,{emit:t}){const i=e,o=t,r=n.useForwardPropsEmits(i,o);return(e,t)=>(a.openBlock(),a.createBlock(a.unref(n.TabsRoot),a.normalizeProps(a.guardReactiveProps(a.unref(r))),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},16))}}),pHe=a.defineComponent({__name:"TabsContent",props:{value:{},forceMount:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,i=a.computed(()=>{const{class:e,...a}=t;return a});return(e,o)=>(a.openBlock(),a.createBlock(a.unref(n.TabsContent),a.mergeProps({class:a.unref(Dt)("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",t.class)},i.value),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},16,["class"]))}}),AHe=a.defineComponent({__name:"TabsList",props:{loop:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,i=a.computed(()=>{const{class:e,...a}=t;return a});return(e,o)=>(a.openBlock(),a.createBlock(a.unref(n.TabsList),a.mergeProps(i.value,{class:a.unref(Dt)("inline-flex items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",t.class)}),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},16,["class"]))}}),CHe={class:"truncate"},mHe=a.defineComponent({__name:"TabsTrigger",props:{value:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,i=a.computed(()=>{const{class:e,...a}=t;return a}),o=n.useForwardProps(i);return(e,i)=>(a.openBlock(),a.createBlock(a.unref(n.TabsTrigger),a.mergeProps(a.unref(o),{class:a.unref(Dt)("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all 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=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",t.class)}),{default:a.withCtx(()=>[a.createElementVNode("span",CHe,[a.renderSlot(e.$slots,"default")])]),_:3},16,["class"]))}}),IHe=Object.freeze(Object.defineProperty({__proto__:null,Tabs:fHe,TabsContent:pHe,TabsList:AHe,TabsTrigger:mHe},Symbol.toStringTag,{value:"Module"})),yHe={key:0,class:"flex items-center gap-2"},_He={key:1},FHe=["onClick"],bHe=a.defineComponent({__name:"TailwindColorPicker",props:{defaultValue:{},modelValue:{},class:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=["yellow","green","cyan","blue","purple","pink","red"],i=e,o=t,r=zZ(i,"modelValue",o,{passive:!0,defaultValue:i.defaultValue??""});return(e,t)=>{const s=a.resolveComponent("Button"),l=a.resolveComponent("PopoverTrigger"),g=a.resolveComponent("PopoverContent"),u=a.resolveComponent("Popover");return a.openBlock(),a.createBlock(u,null,{default:a.withCtx(()=>[a.createVNode(l,{"as-child":""},{default:a.withCtx(()=>[a.createVNode(s,{variant:"outline",class:"w-44"},{default:a.withCtx(()=>[a.unref(r)?(a.openBlock(),a.createElementBlock("span",yHe,[a.createElementVNode("div",{class:a.normalizeClass([`bg-${a.unref(r)}`,"size-5 rounded-full"])},null,2),a.createTextVNode(" "+a.toDisplayString(a.unref(r).split("-")[0])+" "+a.toDisplayString(a.unref(r).split("-")[1]),1)])):(a.openBlock(),a.createElementBlock("span",_He," Select color "))]),_:1})]),_:1}),a.createVNode(g,{class:"w-[170px]"},{default:a.withCtx(()=>[(a.openBlock(),a.createElementBlock(a.Fragment,null,a.renderList(n,e=>a.createElementVNode("div",{class:"flex gap-1 mb-1",key:e},[(a.openBlock(),a.createElementBlock(a.Fragment,null,a.renderList(5,t=>a.createElementVNode("div",{key:t,class:a.normalizeClass(["flex flex-col items-center cursor-pointer size-6 rounded-full cursor-pointer transition-all",`bg-${e}-${100*(t+2)} ${a.unref(r)===`${e}-${100*(t+2)}`?"scale-110 z-10 outline-2 outline-white":""}`]),onClick:a=>{var n;(n=`${e}-${100*(t+2)}`)===r.value?o("update:modelValue",i.defaultValue??""):o("update:modelValue",n)}},null,10,FHe)),64))])),64))]),_:1})]),_:1})}}}),vHe=Object.freeze(Object.defineProperty({__proto__:null,TailwindColorPicker:bHe},Symbol.toStringTag,{value:"Module"})),kHe=a.defineComponent({__name:"Textarea",props:{class:{},defaultValue:{},modelValue:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,i=zZ(n,"modelValue",t,{passive:!0,defaultValue:n.defaultValue});return(e,t)=>a.withDirectives((a.openBlock(),a.createElementBlock("textarea",{"onUpdate:modelValue":t[0]||(t[0]=e=>a.isRef(i)?i.value=e:null),"data-slot":"textarea",class:a.normalizeClass(a.unref(Dt)("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",n.class))},null,2)),[[a.vModelText,a.unref(i)]])}}),wHe=Object.freeze(Object.defineProperty({__proto__:null,Textarea:kHe},Symbol.toStringTag,{value:"Module"})),xHe=a.defineComponent({__name:"Toggle",props:{defaultValue:{type:Boolean},modelValue:{type:[Boolean,null]},disabled:{type:Boolean,default:!1},asChild:{type:Boolean},as:{},name:{},required:{type:Boolean},class:{},variant:{default:"default"},size:{default:"default"}},emits:["update:modelValue"],setup(e,{emit:t}){const i=e,o=t,r=xZ(i,"class","size","variant"),s=n.useForwardPropsEmits(r,o);return(e,t)=>(a.openBlock(),a.createBlock(a.unref(n.Toggle),a.mergeProps({"data-slot":"toggle"},a.unref(s),{class:a.unref(Dt)(a.unref(OHe)({variant:e.variant,size:e.size}),i.class)}),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},16,["class"]))}}),OHe=i.cva("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground"},size:{default:"h-9 px-2 min-w-9",sm:"h-8 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}}),EHe=Object.freeze(Object.defineProperty({__proto__:null,Toggle:xHe,toggleVariants:OHe},Symbol.toStringTag,{value:"Module"}));const DHe=Object.assign({"./components/ui/apple-emoji/index.ts":Fe,"./components/ui/avatar/index.ts":Tt,"./components/ui/badge/index.ts":Pt,"./components/ui/breadcrumb/index.ts":xM,"./components/ui/button/index.ts":MM,"./components/ui/calendar/index.ts":GM,"./components/ui/card/index.ts":eS,"./components/ui/checkbox/index.ts":aS,"./components/ui/code-editor/index.ts":dZ,"./components/ui/collapsible/index.ts":pZ,"./components/ui/combobox/index.ts":HZ,"./components/ui/command/index.ts":mH,"./components/ui/context-menu/index.ts":TH,"./components/ui/custom-dialog/index.ts":PH,"./components/ui/dialog/index.ts":nH,"./components/ui/drawer/index.ts":dG,"./components/ui/dropdown-menu/index.ts":OG,"./components/ui/emoji-picker/index.ts":MG,"./components/ui/flow-builder/index.ts":Zue,"./components/ui/form-builder/components/admin/element-setting-views/index.ts":cde,"./components/ui/form-builder/components/elements/button/index.ts":pde,"./components/ui/form-builder/components/elements/checkbox/index.ts":_de,"./components/ui/form-builder/components/elements/file/index.ts":bde,"./components/ui/form-builder/components/elements/images/index.ts":wde,"./components/ui/form-builder/components/elements/index.ts":yme,"./components/ui/form-builder/components/elements/items/index.ts":Ode,"./components/ui/form-builder/components/elements/label/index.ts":Mde,"./components/ui/form-builder/components/elements/location/index.ts":Bde,"./components/ui/form-builder/components/elements/radios/index.ts":Nde,"./components/ui/form-builder/components/elements/richtext/index.ts":Vde,"./components/ui/form-builder/components/elements/scanner/index.ts":mme,"./components/ui/form-builder/components/elements/select/index.ts":zde,"./components/ui/form-builder/components/elements/text/index.ts":Zde,"./components/ui/form-builder/components/elements/textarea/index.ts":Yde,"./components/ui/form-builder/components/elements/textfield/index.ts":Xde,"./components/ui/form-builder/index.ts":nbe,"./components/ui/form/index.ts":oke,"./components/ui/input/index.ts":ske,"./components/ui/integration-action-builder/index.ts":Cke,"./components/ui/integration-action-builder/integrations/firebase/index.ts":age,"./components/ui/integration-action-builder/integrations/index.ts":_ge,"./components/ui/integration-action-builder/integrations/openai/index.ts":fge,"./components/ui/integration-action-builder/integrations/twilio/index.ts":Ige,"./components/ui/integration-icon/index.ts":wke,"./components/ui/label/index.ts":ake,"./components/ui/lucide-icon-selector/index.ts":Tke,"./components/ui/media-picker/index.ts":IBe,"./components/ui/menubar/index.ts":PBe,"./components/ui/number-field/index.ts":LBe,"./components/ui/pagination/index.ts":WBe,"./components/ui/popover/index.ts":eje,"./components/ui/query-builder-dialog/index.ts":Ije,"./components/ui/radio-group/index.ts":Fje,"./components/ui/range-calendar/index.ts":Nje,"./components/ui/resizable/index.ts":zje,"./components/ui/resource-select/index.ts":Zje,"./components/ui/ripple-button/index.ts":Uje,"./components/ui/sandbox/index.ts":Xje,"./components/ui/scroll-area/index.ts":$je,"./components/ui/segmented-control/index.ts":iTe,"./components/ui/select/index.ts":CTe,"./components/ui/separator/index.ts":ITe,"./components/ui/sheet/index.ts":ETe,"./components/ui/sidebar/index.ts":hNe,"./components/ui/skeleton/index.ts":nNe,"./components/ui/sonner/index.ts":pNe,"./components/ui/spring-calendar/index.ts":$Ze,"./components/ui/switch/index.ts":tHe,"./components/ui/table/index.ts":hHe,"./components/ui/tabs/index.ts":IHe,"./components/ui/tailwind-color-picker/index.ts":vHe,"./components/ui/textarea/index.ts":wHe,"./components/ui/toggle/index.ts":EHe,"./components/ui/tooltip/index.ts":JTe}),MHe={};for(const BHe of Object.values(DHe))Object.assign(MHe,BHe);exports.components=MHe,exports.useBreadcrumbs=()=>BG("cms-useBreadcrumbs")(),exports.useCms=function(){const e=a.inject("breadcrumbs"),t=a.inject("currentProject");if(!e||!t)throw new Error("Not inside CMS context");return{breadcrumbs:e,project:t}},exports.useFirebaseIntegration=ZG,exports.useFormBuilder=zG,exports.useIntegrationActionBuilder=jG,exports.useIntegrationActions=NG,exports.useIntegrations=TG,exports.useLayout=Ole,exports.useLogs=()=>BG("cms-useLogs")(),exports.useMediaLibrary=PG,exports.useModulePermissions=()=>BG("cms-useModulePermissions")(),exports.useModuleStorage=()=>BG("cms-useModuleStorage")(),exports.useNavigateToModuleRoute=()=>BG("cms-useNavigateToModuleRoute")(),exports.useProjectService=VG,exports.useQueryBuilder=RG,exports.useRunProcess=w4,exports.useUtilsService=qG;
52
+ var cMe,hMe,fMe,pMe,AMe,CMe,mMe,IMe,yMe,_Me="transform",FMe=_Me+"Origin",bMe=function(e){var t=e.ownerDocument||e;!(_Me in e.style)&&"msTransform"in e.style&&(FMe=(_Me="msTransform")+"Origin");for(;t.parentNode&&(t=t.parentNode););if(hMe=window,mMe=new MMe,t){cMe=t,fMe=t.documentElement,pMe=t.body,(IMe=cMe.createElementNS("http://www.w3.org/2000/svg","g")).style.transform="none";var a=t.createElement("div"),n=t.createElement("div"),i=t&&(t.body||t.firstElementChild);i&&i.appendChild&&(i.appendChild(a),a.appendChild(n),a.setAttribute("style","position:static;transform:translate3d(0,0,1px)"),yMe=n.offsetParent!==a,i.removeChild(a))}return t},vMe=[],kMe=[],wMe=function(e){return e.ownerSVGElement||("svg"===(e.tagName+"").toLowerCase()?e:null)},xMe=function e(t){return"fixed"===hMe.getComputedStyle(t).position||((t=t.parentNode)&&1===t.nodeType?e(t):void 0)},OMe=function e(t,a){if(t.parentNode&&(cMe||bMe(t))){var n=wMe(t),i=n?n.getAttribute("xmlns")||"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",o=n?a?"rect":"g":"div",r=2!==a?0:100,s=3===a?100:0,l="position:absolute;display:block;pointer-events:none;margin:0;padding:0;",g=cMe.createElementNS?cMe.createElementNS(i.replace(/^https/,"http"),o):cMe.createElement(o);return a&&(n?(CMe||(CMe=e(t)),g.setAttribute("width",.01),g.setAttribute("height",.01),g.setAttribute("transform","translate("+r+","+s+")"),CMe.appendChild(g)):(AMe||((AMe=e(t)).style.cssText=l),g.style.cssText=l+"width:0.1px;height:0.1px;top:"+s+"px;left:"+r+"px",AMe.appendChild(g))),g}throw"Need document and parent."},EMe=function(e,t){var a,n,i,o,r,s,l=wMe(e),g=e===l,u=l?vMe:kMe,d=e.parentNode,c=d&&!l&&d.shadowRoot&&d.shadowRoot.appendChild?d.shadowRoot:d;if(e===hMe)return e;if(u.length||u.push(OMe(e,1),OMe(e,2),OMe(e,3)),a=l?CMe:AMe,l)g?(i=function(e){var t,a=e.getCTM();return a||(t=e.style[_Me],e.style[_Me]="none",e.appendChild(IMe),a=IMe.getCTM(),e.removeChild(IMe),t?e.style[_Me]=t:e.style.removeProperty(_Me.replace(/([A-Z])/g,"-$1").toLowerCase())),a||mMe.clone()}(e),o=-i.e/i.a,r=-i.f/i.d,n=mMe):e.getBBox?(i=e.getBBox(),n=(n=e.transform?e.transform.baseVal:{}).numberOfItems?n.numberOfItems>1?function(e){for(var t=new MMe,a=0;a<e.numberOfItems;a++)t.multiply(e.getItem(a).matrix);return t}(n):n.getItem(0).matrix:mMe,o=n.a*i.x+n.c*i.y,r=n.b*i.x+n.d*i.y):(n=new MMe,o=r=0),(g?l:d).appendChild(a),a.setAttribute("transform","matrix("+n.a+","+n.b+","+n.c+","+n.d+","+(n.e+o)+","+(n.f+r)+")");else{if(o=r=0,yMe)for(n=e.offsetParent,i=e;i&&(i=i.parentNode)&&i!==n&&i.parentNode;)(hMe.getComputedStyle(i)[_Me]+"").length>4&&(o=i.offsetLeft,r=i.offsetTop,i=0);if("absolute"!==(s=hMe.getComputedStyle(e)).position&&"fixed"!==s.position)for(n=e.offsetParent;d&&d!==n;)o+=d.scrollLeft||0,r+=d.scrollTop||0,d=d.parentNode;(i=a.style).top=e.offsetTop-r+"px",i.left=e.offsetLeft-o+"px",i[_Me]=s[_Me],i[FMe]=s[FMe],i.position="fixed"===s.position?"fixed":"absolute",c.appendChild(a)}return a},DMe=function(e,t,a,n,i,o,r){return e.a=t,e.b=a,e.c=n,e.d=i,e.e=o,e.f=r,e},MMe=function(){function e(e,t,a,n,i,o){void 0===e&&(e=1),void 0===t&&(t=0),void 0===a&&(a=0),void 0===n&&(n=1),void 0===i&&(i=0),void 0===o&&(o=0),DMe(this,e,t,a,n,i,o)}var t=e.prototype;return t.inverse=function(){var e=this.a,t=this.b,a=this.c,n=this.d,i=this.e,o=this.f,r=e*n-t*a||1e-10;return DMe(this,n/r,-t/r,-a/r,e/r,(a*o-n*i)/r,-(e*o-t*i)/r)},t.multiply=function(e){var t=this.a,a=this.b,n=this.c,i=this.d,o=this.e,r=this.f,s=e.a,l=e.c,g=e.b,u=e.d,d=e.e,c=e.f;return DMe(this,s*t+g*n,s*a+g*i,l*t+u*n,l*a+u*i,o+d*t+c*n,r+d*a+c*i)},t.clone=function(){return new e(this.a,this.b,this.c,this.d,this.e,this.f)},t.equals=function(e){var t=this.a,a=this.b,n=this.c,i=this.d,o=this.e,r=this.f;return t===e.a&&a===e.b&&n===e.c&&i===e.d&&o===e.e&&r===e.f},t.apply=function(e,t){void 0===t&&(t={});var a=e.x,n=e.y,i=this.a,o=this.b,r=this.c,s=this.d,l=this.e,g=this.f;return t.x=a*i+n*r+l||0,t.y=a*o+n*s+g||0,t},e}();function SMe(e,t,a,n){if(!e||!e.parentNode||(cMe||bMe(e)).documentElement===e)return new MMe;var i=function(e){for(var t,a;e&&e!==pMe;)(a=e._gsap)&&a.uncache&&a.get(e,"x"),a&&!a.scaleX&&!a.scaleY&&a.renderTransform&&(a.scaleX=a.scaleY=1e-4,a.renderTransform(1,a),t?t.push(a):t=[a]),e=e.parentNode;return t}(e),o=wMe(e)?vMe:kMe,r=EMe(e),s=o[0].getBoundingClientRect(),l=o[1].getBoundingClientRect(),g=o[2].getBoundingClientRect(),u=r.parentNode,d=xMe(e),c=new MMe((l.left-s.left)/100,(l.top-s.top)/100,(g.left-s.left)/100,(g.top-s.top)/100,s.left+(d?0:hMe.pageXOffset||cMe.scrollLeft||fMe.scrollLeft||pMe.scrollLeft||0),s.top+(d?0:hMe.pageYOffset||cMe.scrollTop||fMe.scrollTop||pMe.scrollTop||0));if(u.removeChild(r),i)for(s=i.length;s--;)(l=i[s]).scaleX=l.scaleY=0,l.renderTransform(1,l);return t?c.inverse():c}function BMe(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var jMe,TMe,NMe,PMe,VMe,RMe,qMe,zMe,QMe,LMe,ZMe,HMe,GMe,YMe,UMe,WMe,XMe,KMe,JMe,$Me,eSe,tSe,aSe=0,nSe=function(){return"undefined"!=typeof window},iSe=function(){return jMe||nSe()&&(jMe=window.gsap)&&jMe.registerPlugin&&jMe},oSe=function(e){return"function"==typeof e},rSe=function(e){return"object"==typeof e},sSe=function(e){return void 0===e},lSe=function(){return!1},gSe="transform",uSe="transformOrigin",dSe=function(e){return Math.round(1e4*e)/1e4},cSe=Array.isArray,hSe=function(e,t){var a=NMe.createElementNS?NMe.createElementNS("http://www.w3.org/1999/xhtml".replace(/^https/,"http"),e):NMe.createElement(e);return a.style?a:NMe.createElement(e)},fSe=180/Math.PI,pSe=1e20,ASe=new MMe,CSe=Date.now||function(){return(new Date).getTime()},mSe=[],ISe={},ySe=0,_Se=/^(?:a|input|textarea|button|select)$/i,FSe=0,bSe={},vSe={},kSe=function(e,t){var a,n={};for(a in e)n[a]=t?e[a]*t:e[a];return n},wSe=function e(t,a){for(var n,i=t.length;i--;)a?t[i].style.touchAction=a:t[i].style.removeProperty("touch-action"),(n=t[i].children)&&n.length&&e(n,a)},xSe=function(){return mSe.forEach(function(e){return e()})},OSe=function(){return!mSe.length&&jMe.ticker.remove(xSe)},ESe=function(e){for(var t=mSe.length;t--;)mSe[t]===e&&mSe.splice(t,1);jMe.to(OSe,{overwrite:!0,delay:15,duration:0,onComplete:OSe,data:"_draggable"})},DSe=function(e,t,a,n){if(e.addEventListener){var i=GMe[t];n=n||(ZMe?{passive:!1}:null),e.addEventListener(i||t,a,n),i&&t!==i&&e.addEventListener(t,a,n)}},MSe=function(e,t,a,n){if(e.removeEventListener){var i=GMe[t];e.removeEventListener(i||t,a,n),i&&t!==i&&e.removeEventListener(t,a,n)}},SSe=function(e){e.preventDefault&&e.preventDefault(),e.preventManipulation&&e.preventManipulation()},BSe=function e(t){YMe=t.touches&&aSe<t.touches.length,MSe(t.target,"touchend",e)},jSe=function(e){YMe=e.touches&&aSe<e.touches.length,DSe(e.target,"touchend",BSe)},TSe=function(e){return TMe.pageYOffset||e.scrollTop||e.documentElement.scrollTop||e.body.scrollTop||0},NSe=function(e){return TMe.pageXOffset||e.scrollLeft||e.documentElement.scrollLeft||e.body.scrollLeft||0},PSe=function e(t,a){DSe(t,"scroll",a),RSe(t.parentNode)||e(t.parentNode,a)},VSe=function e(t,a){MSe(t,"scroll",a),RSe(t.parentNode)||e(t.parentNode,a)},RSe=function(e){return!(e&&e!==PMe&&9!==e.nodeType&&e!==NMe.body&&e!==TMe&&e.nodeType&&e.parentNode)},qSe=function(e,t){var a="x"===t?"Width":"Height",n="scroll"+a,i="client"+a;return Math.max(0,RSe(e)?Math.max(PMe[n],VMe[n])-(TMe["inner"+a]||PMe[i]||VMe[i]):e[n]-e[i])},zSe=function e(t,a){var n=qSe(t,"x"),i=qSe(t,"y");RSe(t)?t=vSe:e(t.parentNode,a),t._gsMaxScrollX=n,t._gsMaxScrollY=i,a||(t._gsScrollX=t.scrollLeft||0,t._gsScrollY=t.scrollTop||0)},QSe=function(e,t,a){var n=e.style;n&&(sSe(n[t])&&(t=QMe(t,e)||t),null==a?n.removeProperty&&n.removeProperty(t.replace(/([A-Z])/g,"-$1").toLowerCase()):n[t]=a)},LSe=function(e){return TMe.getComputedStyle(e instanceof Element?e:e.host||(e.parentNode||{}).host||e)},ZSe={},HSe=function(e){if(e===TMe)return ZSe.left=ZSe.top=0,ZSe.width=ZSe.right=PMe.clientWidth||e.innerWidth||VMe.clientWidth||0,ZSe.height=ZSe.bottom=(e.innerHeight||0)-20<PMe.clientHeight?PMe.clientHeight:e.innerHeight||VMe.clientHeight||0,ZSe;var t=e.ownerDocument||NMe,a=sSe(e.pageX)?e.nodeType||sSe(e.left)||sSe(e.top)?LMe(e)[0].getBoundingClientRect():e:{left:e.pageX-NSe(t),top:e.pageY-TSe(t),right:e.pageX-NSe(t)+1,bottom:e.pageY-TSe(t)+1};return sSe(a.right)&&!sSe(a.width)?(a.right=a.left+a.width,a.bottom=a.top+a.height):sSe(a.width)&&(a={width:a.right-a.left,height:a.bottom-a.top,right:a.right,left:a.left,bottom:a.bottom,top:a.top}),a},GSe=function(e,t,a){var n,i=e.vars,o=i[a],r=e._listeners[t];return oSe(o)&&(n=o.apply(i.callbackScope||e,i[a+"Params"]||[e.pointerEvent])),r&&!1===e.dispatchEvent(t)&&(n=!1),n},YSe=function(e,t){var a,n,i,o=LMe(e)[0];return o.nodeType||o===TMe?WSe(o,t):sSe(e.left)?{left:n=e.min||e.minX||e.minRotation||0,top:a=e.min||e.minY||0,width:(e.max||e.maxX||e.maxRotation||0)-n,height:(e.max||e.maxY||0)-a}:(i={x:0,y:0},{left:e.left-i.x,top:e.top-i.y,width:e.width,height:e.height})},USe={},WSe=function(e,t){t=LMe(t)[0];var a,n,i,o,r,s,l,g,u,d,c,h,f,p=e.getBBox&&e.ownerSVGElement,A=e.ownerDocument||NMe;if(e===TMe)i=TSe(A),n=(a=NSe(A))+(A.documentElement.clientWidth||e.innerWidth||A.body.clientWidth||0),o=i+((e.innerHeight||0)-20<A.documentElement.clientHeight?A.documentElement.clientHeight:e.innerHeight||A.body.clientHeight||0);else{if(t===TMe||sSe(t))return e.getBoundingClientRect();a=i=0,p?(c=(d=e.getBBox()).width,h=d.height):(e.viewBox&&(d=e.viewBox.baseVal)&&(a=d.x||0,i=d.y||0,c=d.width,h=d.height),c||(d="border-box"===(f=LSe(e)).boxSizing,c=(parseFloat(f.width)||e.clientWidth||0)+(d?0:parseFloat(f.borderLeftWidth)+parseFloat(f.borderRightWidth)),h=(parseFloat(f.height)||e.clientHeight||0)+(d?0:parseFloat(f.borderTopWidth)+parseFloat(f.borderBottomWidth)))),n=c,o=h}return e===t?{left:a,top:i,width:n-a,height:o-i}:(s=(r=SMe(t,!0).multiply(SMe(e))).apply({x:a,y:i}),l=r.apply({x:n,y:i}),g=r.apply({x:n,y:o}),u=r.apply({x:a,y:o}),{left:a=Math.min(s.x,l.x,g.x,u.x),top:i=Math.min(s.y,l.y,g.y,u.y),width:Math.max(s.x,l.x,g.x,u.x)-a,height:Math.max(s.y,l.y,g.y,u.y)-i})},XSe=function(e,t,a,n,i,o){var r,s,l,g={};if(t)if(1!==i&&t instanceof Array){if(g.end=r=[],l=t.length,rSe(t[0]))for(s=0;s<l;s++)r[s]=kSe(t[s],i);else for(s=0;s<l;s++)r[s]=t[s]*i;a+=1.1,n-=1.1}else oSe(t)?g.end=function(a){var n,o,r=t.call(e,a);if(1!==i)if(rSe(r)){for(o in n={},r)n[o]=r[o]*i;r=n}else r*=i;return r}:g.end=t;return(a||0===a)&&(g.max=a),(n||0===n)&&(g.min=n),o&&(g.velocity=0),g},KSe=function e(t){var a;return!(!t||!t.getAttribute||t===VMe)&&(!("true"!==(a=t.getAttribute("data-clickable"))&&("false"===a||!_Se.test(t.nodeName+"")&&"true"!==t.getAttribute("contentEditable")))||e(t.parentNode))},JSe=function(e,t){for(var a,n=e.length;n--;)(a=e[n]).ondragstart=a.onselectstart=t?null:lSe,jMe.set(a,{lazy:!0,userSelect:t?"text":"none"})},$Se=function e(t){return"fixed"===LSe(t).position||((t=t.parentNode)&&1===t.nodeType?e(t):void 0)},eBe=function(e,t){e=jMe.utils.toArray(e)[0],t=t||{};var a,n,i,o,r,s,l=document.createElement("div"),g=l.style,u=e.firstChild,d=0,c=0,h=e.scrollTop,f=e.scrollLeft,p=e.scrollWidth,A=e.scrollHeight,C=0,m=0,I=0;eSe&&!1!==t.force3D?(r="translate3d(",s="px,0px)"):gSe&&(r="translate(",s="px)"),this.scrollTop=function(e,t){if(!arguments.length)return-this.top();this.top(-e,t)},this.scrollLeft=function(e,t){if(!arguments.length)return-this.left();this.left(-e,t)},this.left=function(a,n){if(!arguments.length)return-(e.scrollLeft+c);var i=e.scrollLeft-f,o=c;if((i>2||i<-2)&&!n)return f=e.scrollLeft,jMe.killTweensOf(this,{left:1,scrollLeft:1}),this.left(-f),void(t.onKill&&t.onKill());(a=-a)<0?(c=a-.5|0,a=0):a>m?(c=a-m|0,a=m):c=0,(c||o)&&(this._skip||(g[gSe]=r+-c+"px,"+-d+s),c+C>=0&&(g.paddingRight=c+C+"px")),e.scrollLeft=0|a,f=e.scrollLeft},this.top=function(a,n){if(!arguments.length)return-(e.scrollTop+d);var i=e.scrollTop-h,o=d;if((i>2||i<-2)&&!n)return h=e.scrollTop,jMe.killTweensOf(this,{top:1,scrollTop:1}),this.top(-h),void(t.onKill&&t.onKill());(a=-a)<0?(d=a-.5|0,a=0):a>I?(d=a-I|0,a=I):d=0,(d||o)&&(this._skip||(g[gSe]=r+-c+"px,"+-d+s)),e.scrollTop=0|a,h=e.scrollTop},this.maxScrollTop=function(){return I},this.maxScrollLeft=function(){return m},this.disable=function(){for(u=l.firstChild;u;)o=u.nextSibling,e.appendChild(u),u=o;e===l.parentNode&&e.removeChild(l)},this.enable=function(){if((u=e.firstChild)!==l){for(;u;)o=u.nextSibling,l.appendChild(u),u=o;e.appendChild(l),this.calibrate()}},this.calibrate=function(t){var o,r,s,u=e.clientWidth===a;h=e.scrollTop,f=e.scrollLeft,u&&e.clientHeight===n&&l.offsetHeight===i&&p===e.scrollWidth&&A===e.scrollHeight&&!t||((d||c)&&(r=this.left(),s=this.top(),this.left(-e.scrollLeft),this.top(-e.scrollTop)),o=LSe(e),u&&!t||(g.display="block",g.width="auto",g.paddingRight="0px",(C=Math.max(0,e.scrollWidth-e.clientWidth))&&(C+=parseFloat(o.paddingLeft)+(tSe?parseFloat(o.paddingRight):0))),g.display="inline-block",g.position="relative",g.overflow="visible",g.verticalAlign="top",g.boxSizing="content-box",g.width="100%",g.paddingRight=C+"px",tSe&&(g.paddingBottom=o.paddingBottom),a=e.clientWidth,n=e.clientHeight,p=e.scrollWidth,A=e.scrollHeight,m=e.scrollWidth-a,I=e.scrollHeight-n,i=l.offsetHeight,g.display="block",(r||s)&&(this.left(r),this.top(s)))},this.content=l,this.element=e,this._skip=!1,this.enable()},tBe=function(e){if(nSe()&&document.body){var t=window&&window.navigator;TMe=window,NMe=document,PMe=NMe.documentElement,VMe=NMe.body,RMe=hSe("div"),KMe=!!window.PointerEvent,(qMe=hSe("div")).style.cssText="visibility:hidden;height:1px;top:-1px;pointer-events:none;position:relative;clear:both;cursor:grab",XMe="grab"===qMe.style.cursor?"grab":"move",UMe=t&&-1!==t.userAgent.toLowerCase().indexOf("android"),HMe="ontouchstart"in PMe&&"orientation"in TMe||t&&(t.MaxTouchPoints>0||t.msMaxTouchPoints>0),n=hSe("div"),i=hSe("div"),o=i.style,r=VMe,o.display="inline-block",o.position="relative",n.style.cssText="width:90px;height:40px;padding:10px;overflow:auto;visibility:hidden",n.appendChild(i),r.appendChild(n),a=i.offsetHeight+18>n.scrollHeight,r.removeChild(n),tSe=a,GMe=function(e){for(var t=e.split(","),a=(("onpointerdown"in RMe?"pointerdown,pointermove,pointerup,pointercancel":"onmspointerdown"in RMe?"MSPointerDown,MSPointerMove,MSPointerUp,MSPointerCancel":e).split(",")),n={},i=4;--i>-1;)n[t[i]]=a[i],n[a[i]]=t[i];try{PMe.addEventListener("test",null,Object.defineProperty({},"passive",{get:function(){ZMe=1}}))}catch(o){}return n}("touchstart,touchmove,touchend,touchcancel"),DSe(NMe,"touchcancel",lSe),DSe(TMe,"touchmove",lSe),VMe&&VMe.addEventListener("touchstart",lSe),DSe(NMe,"contextmenu",function(){for(var e in ISe)ISe[e].isPressed&&ISe[e].endDrag()}),jMe=zMe=iSe()}var a,n,i,o,r;jMe?(WMe=jMe.plugins.inertia,JMe=jMe.core.context||function(){},QMe=jMe.utils.checkPrefix,gSe=QMe(gSe),uSe=QMe(uSe),LMe=jMe.utils.toArray,$Me=jMe.core.getStyleSaver,eSe=!!QMe("perspective")):e&&console.warn("Please gsap.registerPlugin(Draggable)")},aBe=function(){function e(e){this._listeners={},this.target=e||this}var t=e.prototype;return t.addEventListener=function(e,t){var a=this._listeners[e]||(this._listeners[e]=[]);~a.indexOf(t)||a.push(t)},t.removeEventListener=function(e,t){var a=this._listeners[e],n=a&&a.indexOf(t);n>=0&&a.splice(n,1)},t.dispatchEvent=function(e){var t,a=this;return(this._listeners[e]||[]).forEach(function(n){return!1===n.call(a,{type:e,target:a.target})&&(t=!1)}),t},e}(),nBe=function(e){var t,a;function n(t,a){var i;i=e.call(this)||this,zMe||tBe(1),t=LMe(t)[0],i.styles=$Me&&$Me(t,"transform,left,top"),WMe||(WMe=jMe.plugins.inertia),i.vars=a=kSe(a||{}),i.target=t,i.x=i.y=i.rotation=0,i.dragResistance=parseFloat(a.dragResistance)||0,i.edgeResistance=isNaN(a.edgeResistance)?1:parseFloat(a.edgeResistance)||0,i.lockAxis=a.lockAxis,i.autoScroll=a.autoScroll||0,i.lockedAxis=null,i.allowEventDefault=!!a.allowEventDefault,jMe.getProperty(t,"x");var o,r,s,l,g,u,d,c,h,f,p,A,C,m,I,y,_,F,b,v,k,w,x,O,E,D,M,S,B,j,T,N,P,V=(a.type||"x,y").toLowerCase(),R=~V.indexOf("x")||~V.indexOf("y"),q=-1!==V.indexOf("rotation"),z=q?"rotation":R?"x":"left",Q=R?"y":"top",L=!(!~V.indexOf("x")&&!~V.indexOf("left")&&"scroll"!==V),Z=!(!~V.indexOf("y")&&!~V.indexOf("top")&&"scroll"!==V),H=a.minimumMovement||2,G=BMe(i),Y=LMe(a.trigger||a.handle||t),U={},W=0,X=!1,K=a.autoScrollMarginTop||40,J=a.autoScrollMarginRight||40,$=a.autoScrollMarginBottom||40,ee=a.autoScrollMarginLeft||40,te=a.clickableTest||KSe,ae=0,ne=t._gsap||jMe.core.getCache(t),ie=$Se(t),oe=function(e,a){return parseFloat(ne.get(t,e,a))},re=t.ownerDocument||NMe,se=function(e){return SSe(e),e.stopImmediatePropagation&&e.stopImmediatePropagation(),!1},le=function e(a){if(G.autoScroll&&G.isDragging&&(X||_)){var n,i,o,s,l,g,u,d,h=t,f=15*G.autoScroll;for(X=!1,vSe.scrollTop=null!=TMe.pageYOffset?TMe.pageYOffset:null!=re.documentElement.scrollTop?re.documentElement.scrollTop:re.body.scrollTop,vSe.scrollLeft=null!=TMe.pageXOffset?TMe.pageXOffset:null!=re.documentElement.scrollLeft?re.documentElement.scrollLeft:re.body.scrollLeft,s=G.pointerX-vSe.scrollLeft,l=G.pointerY-vSe.scrollTop;h&&!i;)n=(i=RSe(h.parentNode))?vSe:h.parentNode,o=i?{bottom:Math.max(PMe.clientHeight,TMe.innerHeight||0),right:Math.max(PMe.clientWidth,TMe.innerWidth||0),left:0,top:0}:n.getBoundingClientRect(),g=u=0,Z&&((d=n._gsMaxScrollY-n.scrollTop)<0?u=d:l>o.bottom-$&&d?(X=!0,u=Math.min(d,f*(1-Math.max(0,o.bottom-l)/$)|0)):l<o.top+K&&n.scrollTop&&(X=!0,u=-Math.min(n.scrollTop,f*(1-Math.max(0,l-o.top)/K)|0)),u&&(n.scrollTop+=u)),L&&((d=n._gsMaxScrollX-n.scrollLeft)<0?g=d:s>o.right-J&&d?(X=!0,g=Math.min(d,f*(1-Math.max(0,o.right-s)/J)|0)):s<o.left+ee&&n.scrollLeft&&(X=!0,g=-Math.min(n.scrollLeft,f*(1-Math.max(0,s-o.left)/ee)|0)),g&&(n.scrollLeft+=g)),i&&(g||u)&&(TMe.scrollTo(n.scrollLeft,n.scrollTop),_e(G.pointerX+g,G.pointerY+u)),h=n}if(_){var p=G.x,A=G.y;q?(G.deltaX=p-parseFloat(ne.rotation),G.rotation=p,ne.rotation=p+"deg",ne.renderTransform(1,ne)):r?(Z&&(G.deltaY=A-r.top(),r.top(A)),L&&(G.deltaX=p-r.left(),r.left(p))):R?(Z&&(G.deltaY=A-parseFloat(ne.y),ne.y=A+"px"),L&&(G.deltaX=p-parseFloat(ne.x),ne.x=p+"px"),ne.renderTransform(1,ne)):(Z&&(G.deltaY=A-parseFloat(t.style.top||0),t.style.top=A+"px"),L&&(G.deltaX=p-parseFloat(t.style.left||0),t.style.left=p+"px")),!c||a||S||(S=!0,!1===GSe(G,"drag","onDrag")&&(L&&(G.x-=G.deltaX),Z&&(G.y-=G.deltaY),e(!0)),S=!1)}_=!1},ge=function(e,a){var n,i,o=G.x,s=G.y;t._gsap||(ne=jMe.core.getCache(t)),ne.uncache&&jMe.getProperty(t,"x"),R?(G.x=parseFloat(ne.x),G.y=parseFloat(ne.y)):q?G.x=G.rotation=parseFloat(ne.rotation):r?(G.y=r.top(),G.x=r.left()):(G.y=parseFloat(t.style.top||(i=LSe(t))&&i.top)||0,G.x=parseFloat(t.style.left||(i||{}).left)||0),(b||v||k)&&!a&&(G.isDragging||G.isThrowing)&&(k&&(bSe.x=G.x,bSe.y=G.y,(n=k(bSe)).x!==G.x&&(G.x=n.x,_=!0),n.y!==G.y&&(G.y=n.y,_=!0)),b&&(n=b(G.x))!==G.x&&(G.x=n,q&&(G.rotation=n),_=!0),v&&((n=v(G.y))!==G.y&&(G.y=n),_=!0)),_&&le(!0),e||(G.deltaX=G.x-o,G.deltaY=G.y-s,GSe(G,"throwupdate","onThrowUpdate"))},ue=function(e,t,a,n){return null==t&&(t=-pSe),null==a&&(a=pSe),oSe(e)?function(i){var o=G.isPressed?1-G.edgeResistance:1;return e.call(G,(i>a?a+(i-a)*o:i<t?t+(i-t)*o:i)*n)*n}:cSe(e)?function(n){for(var i,o,r=e.length,s=0,l=pSe;--r>-1;)(o=(i=e[r])-n)<0&&(o=-o),o<l&&i>=t&&i<=a&&(s=r,l=o);return e[s]}:isNaN(e)?function(e){return e}:function(){return e*n}},de=function(){var e,n,i,o;d=!1,r?(r.calibrate(),G.minX=p=-r.maxScrollLeft(),G.minY=C=-r.maxScrollTop(),G.maxX=f=G.maxY=A=0,d=!0):a.bounds&&(e=YSe(a.bounds,t.parentNode),q?(G.minX=p=e.left,G.maxX=f=e.left+e.width,G.minY=C=G.maxY=A=0):sSe(a.bounds.maxX)&&sSe(a.bounds.maxY)?(n=YSe(t,t.parentNode),G.minX=p=Math.round(oe(z,"px")+e.left-n.left),G.minY=C=Math.round(oe(Q,"px")+e.top-n.top),G.maxX=f=Math.round(p+(e.width-n.width)),G.maxY=A=Math.round(C+(e.height-n.height))):(e=a.bounds,G.minX=p=e.minX,G.minY=C=e.minY,G.maxX=f=e.maxX,G.maxY=A=e.maxY),p>f&&(G.minX=f,G.maxX=f=p,p=G.minX),C>A&&(G.minY=A,G.maxY=A=C,C=G.minY),q&&(G.minRotation=p,G.maxRotation=f),d=!0),a.liveSnap&&(i=!0===a.liveSnap?a.snap||{}:a.liveSnap,o=cSe(i)||oSe(i),q?(b=ue(o?i:i.rotation,p,f,1),v=null):i.points?k=function(e,t,a,n,i,o,r){return o=o&&o<pSe?o*o:pSe,oSe(e)?function(s){var l,g,u,d=G.isPressed?1-G.edgeResistance:1,c=s.x,h=s.y;return s.x=c=c>a?a+(c-a)*d:c<t?t+(c-t)*d:c,s.y=h=h>i?i+(h-i)*d:h<n?n+(h-n)*d:h,(l=e.call(G,s))!==s&&(s.x=l.x,s.y=l.y),1!==r&&(s.x*=r,s.y*=r),o<pSe&&(g=s.x-c)*g+(u=s.y-h)*u>o&&(s.x=c,s.y=h),s}:cSe(e)?function(t){for(var a,n,i,r,s=e.length,l=0,g=pSe;--s>-1;)(r=(a=(i=e[s]).x-t.x)*a+(n=i.y-t.y)*n)<g&&(l=s,g=r);return g<=o?e[l]:t}:function(e){return e}}(o?i:i.points,p,f,C,A,i.radius,r?-1:1):(L&&(b=ue(o?i:i.x||i.left||i.scrollLeft,p,f,r?-1:1)),Z&&(v=ue(o?i:i.y||i.top||i.scrollTop,C,A,r?-1:1))))},ce=function(){G.isThrowing=!1,GSe(G,"throwcomplete","onThrowComplete")},he=function(){G.isThrowing=!1},fe=function(e,n){var i,o,s,l;e&&WMe?(!0===e&&(i=a.snap||a.liveSnap||{},o=cSe(i)||oSe(i),e={resistance:(a.throwResistance||a.resistance||1e3)/(q?10:1)},q?e.rotation=XSe(G,o?i:i.rotation,f,p,1,n):(L&&(e[z]=XSe(G,o?i:i.points||i.x||i.left,f,p,r?-1:1,n||"x"===G.lockedAxis)),Z&&(e[Q]=XSe(G,o?i:i.points||i.y||i.top,A,C,r?-1:1,n||"y"===G.lockedAxis)),(i.points||cSe(i)&&rSe(i[0]))&&(e.linkedProps=z+","+Q,e.radius=i.radius))),G.isThrowing=!0,l=isNaN(a.overshootTolerance)?1===a.edgeResistance?0:1-G.edgeResistance+.2:a.overshootTolerance,e.duration||(e.duration={max:Math.max(a.minDuration||0,"maxDuration"in a?a.maxDuration:2),min:isNaN(a.minDuration)?0===l||rSe(e)&&e.resistance>1e3?0:.5:a.minDuration,overshoot:l}),G.tween=s=jMe.to(r||t,{inertia:e,data:"_draggable",inherit:!1,onComplete:ce,onInterrupt:he,onUpdate:a.fastMode?GSe:ge,onUpdateParams:a.fastMode?[G,"onthrowupdate","onThrowUpdate"]:i&&i.radius?[!1,!0]:[]}),a.fastMode||(r&&(r._skip=!0),s.render(1e9,!0,!0),ge(!0,!0),G.endX=G.x,G.endY=G.y,q&&(G.endRotation=G.x),s.play(0),ge(!0,!0),r&&(r._skip=!1))):d&&G.applyBounds()},pe=function(e){var a,n=O;O=SMe(t.parentNode,!0),e&&G.isPressed&&!O.equals(n||new MMe)&&(a=n.inverse().apply({x:s,y:l}),O.apply(a,a),s=a.x,l=a.y),O.equals(ASe)&&(O=null)},Ae=function(){var e,a,n,i=1-G.edgeResistance,o=ie?NSe(re):0,c=ie?TSe(re):0;R&&(ne.x=oe(z,"px")+"px",ne.y=oe(Q,"px")+"px",ne.renderTransform()),pe(!1),USe.x=G.pointerX-o,USe.y=G.pointerY-c,O&&O.apply(USe,USe),s=USe.x,l=USe.y,_&&(_e(G.pointerX,G.pointerY),le(!0)),N=SMe(t),r?(de(),u=r.top(),g=r.left()):(Ce()?(ge(!0,!0),de()):G.applyBounds(),q?(e=t.ownerSVGElement?[ne.xOrigin-t.getBBox().x,ne.yOrigin-t.getBBox().y]:(LSe(t)[uSe]||"0 0").split(" "),y=G.rotationOrigin=SMe(t).apply({x:parseFloat(e[0])||0,y:parseFloat(e[1])||0}),ge(!0,!0),a=G.pointerX-y.x-o,n=y.y-G.pointerY+c,g=G.x,u=G.y=Math.atan2(n,a)*fSe):(u=oe(Q,"px"),g=oe(z,"px"))),d&&i&&(g>f?g=f+(g-f)/i:g<p&&(g=p-(p-g)/i),q||(u>A?u=A+(u-A)/i:u<C&&(u=C-(C-u)/i))),G.startX=g=dSe(g),G.startY=u=dSe(u)},Ce=function(){return G.tween&&G.tween.isActive()},me=function(){!qMe.parentNode||Ce()||G.isDragging||qMe.parentNode.removeChild(qMe)},Ie=function(e,i){var g;if(!o||G.isPressed||!e||!("mousedown"!==e.type&&"pointerdown"!==e.type||i)&&CSe()-ae<30&&GMe[G.pointerEvent.type])T&&e&&o&&SSe(e);else{if(E=Ce(),P=!1,G.pointerEvent=e,GMe[e.type]?(x=~e.type.indexOf("touch")?e.currentTarget||e.target:re,DSe(x,"touchend",Fe),DSe(x,"touchmove",ye),DSe(x,"touchcancel",Fe),DSe(re,"touchstart",jSe)):(x=null,DSe(re,"mousemove",ye)),M=null,KMe&&x||(DSe(re,"mouseup",Fe),e&&e.target&&DSe(e.target,"mouseup",Fe)),w=te.call(G,e.target)&&!1===a.dragClickables&&!i)return DSe(e.target,"change",Fe),GSe(G,"pressInit","onPressInit"),GSe(G,"press","onPress"),JSe(Y,!0),void(T=!1);var u;if(D=!(!x||L===Z||!1===G.vars.allowNativeTouchScrolling||G.vars.allowContextMenu&&e&&(e.ctrlKey||e.which>2))&&(L?"y":"x"),(T=!D&&!G.allowEventDefault)&&(SSe(e),DSe(TMe,"touchforcechange",SSe)),e.changedTouches?(e=m=e.changedTouches[0],I=e.identifier):e.pointerId?I=e.pointerId:m=I=null,aSe++,u=le,mSe.push(u),1===mSe.length&&jMe.ticker.add(xSe),l=G.pointerY=e.pageY,s=G.pointerX=e.pageX,GSe(G,"pressInit","onPressInit"),(D||G.autoScroll)&&zSe(t.parentNode),!t.parentNode||!G.autoScroll||r||q||!t.parentNode._gsMaxScrollX||qMe.parentNode||t.getBBox||(qMe.style.width=t.parentNode.scrollWidth+"px",t.parentNode.appendChild(qMe)),Ae(),G.tween&&G.tween.kill(),G.isThrowing=!1,jMe.killTweensOf(r||t,U,!0),r&&jMe.killTweensOf(t,{scrollTo:1},!0),G.tween=G.lockedAxis=null,(a.zIndexBoost||!q&&!r&&!1!==a.zIndexBoost)&&(t.style.zIndex=n.zIndex++),G.isPressed=!0,c=!(!a.onDrag&&!G._listeners.drag),h=!(!a.onMove&&!G._listeners.move),!1!==a.cursor||a.activeCursor)for(g=Y.length;--g>-1;)jMe.set(Y[g],{cursor:a.activeCursor||a.cursor||("grab"===XMe?"grabbing":XMe)});GSe(G,"press","onPress")}},ye=function(e){var a,n,i,r,g,u,d=e;if(o&&!YMe&&G.isPressed&&e){if(G.pointerEvent=e,a=e.changedTouches){if((e=a[0])!==m&&e.identifier!==I){for(r=a.length;--r>-1&&(e=a[r]).identifier!==I&&e.target!==t;);if(r<0)return}}else if(e.pointerId&&I&&e.pointerId!==I)return;x&&D&&!M&&(USe.x=e.pageX-(ie?NSe(re):0),USe.y=e.pageY-(ie?TSe(re):0),O&&O.apply(USe,USe),n=USe.x,i=USe.y,((g=Math.abs(n-s))!==(u=Math.abs(i-l))&&(g>H||u>H)||UMe&&D===M)&&(M=g>u&&L?"x":"y",D&&M!==D&&DSe(TMe,"touchforcechange",SSe),!1!==G.vars.lockAxisOnTouchScroll&&L&&Z&&(G.lockedAxis="x"===M?"y":"x",oSe(G.vars.onLockAxis)&&G.vars.onLockAxis.call(G,d)),UMe&&D===M))?Fe(d):(G.allowEventDefault||D&&(!M||D===M)||!1===d.cancelable?T&&(T=!1):(SSe(d),T=!0),G.autoScroll&&(X=!0),_e(e.pageX,e.pageY,h))}else T&&e&&o&&SSe(e)},_e=function(e,t,a){var n,i,o,r,c,h,m=1-G.dragResistance,I=1-G.edgeResistance,F=G.pointerX,w=G.pointerY,x=u,E=G.x,D=G.y,M=G.endX,S=G.endY,B=G.endRotation,j=_;G.pointerX=e,G.pointerY=t,ie&&(e-=NSe(re),t-=TSe(re)),q?(r=Math.atan2(y.y-t,e-y.x)*fSe,(c=G.y-r)>180?(u-=360,G.y=r):c<-180&&(u+=360,G.y=r),G.x!==g||Math.max(Math.abs(s-e),Math.abs(l-t))>H?(G.y=r,o=g+(u-r)*m):o=g):(O&&(h=e*O.a+t*O.c+O.e,t=e*O.b+t*O.d+O.f,e=h),(i=t-l)<H&&i>-H&&(i=0),(n=e-s)<H&&n>-H&&(n=0),(G.lockAxis||G.lockedAxis)&&(n||i)&&((h=G.lockedAxis)||(G.lockedAxis=h=L&&Math.abs(n)>Math.abs(i)?"y":Z?"x":null,h&&oSe(G.vars.onLockAxis)&&G.vars.onLockAxis.call(G,G.pointerEvent)),"y"===h?i=0:"x"===h&&(n=0)),o=dSe(g+n*m),r=dSe(u+i*m)),(b||v||k)&&(G.x!==o||G.y!==r&&!q)&&(k&&(bSe.x=o,bSe.y=r,h=k(bSe),o=dSe(h.x),r=dSe(h.y)),b&&(o=dSe(b(o))),v&&(r=dSe(v(r)))),d&&(o>f?o=f+Math.round((o-f)*I):o<p&&(o=p+Math.round((o-p)*I)),q||(r>A?r=Math.round(A+(r-A)*I):r<C&&(r=Math.round(C+(r-C)*I)))),(G.x!==o||G.y!==r&&!q)&&(q?(G.endRotation=G.x=G.endX=o,_=!0):(Z&&(G.y=G.endY=r,_=!0),L&&(G.x=G.endX=o,_=!0)),a&&!1===GSe(G,"move","onMove")?(G.pointerX=F,G.pointerY=w,u=x,G.x=E,G.y=D,G.endX=M,G.endY=S,G.endRotation=B,_=j):!G.isDragging&&G.isPressed&&(G.isDragging=P=!0,GSe(G,"dragstart","onDragStart")))},Fe=function e(n,i){if(o&&G.isPressed&&(!n||null==I||i||!(n.pointerId&&n.pointerId!==I&&n.target!==t||n.changedTouches&&!function(e,t){for(var a=e.length;a--;)if(e[a].identifier===t)return!0}(n.changedTouches,I)))){G.isPressed=!1;var r,s,l,g,u,d=n,c=G.isDragging,h=G.vars.allowContextMenu&&n&&(n.ctrlKey||n.which>2),f=jMe.delayedCall(.001,me);if(x?(MSe(x,"touchend",e),MSe(x,"touchmove",ye),MSe(x,"touchcancel",e),MSe(re,"touchstart",jSe)):MSe(re,"mousemove",ye),MSe(TMe,"touchforcechange",SSe),KMe&&x||(MSe(re,"mouseup",e),n&&n.target&&MSe(n.target,"mouseup",e)),_=!1,c&&(W=FSe=CSe(),G.isDragging=!1),ESe(le),w&&!h)return n&&(MSe(n.target,"change",e),G.pointerEvent=d),JSe(Y,!1),GSe(G,"release","onRelease"),GSe(G,"click","onClick"),void(w=!1);for(s=Y.length;--s>-1;)QSe(Y[s],"cursor",a.cursor||(!1!==a.cursor?XMe:null));if(aSe--,n){if((r=n.changedTouches)&&(n=r[0])!==m&&n.identifier!==I){for(s=r.length;--s>-1&&(n=r[s]).identifier!==I&&n.target!==t;);if(s<0&&!i)return}G.pointerEvent=d,G.pointerX=n.pageX,G.pointerY=n.pageY}return h&&d?(SSe(d),T=!0,GSe(G,"release","onRelease")):d&&!c?(T=!1,E&&(a.snap||a.bounds)&&fe(a.inertia||a.throwProps),GSe(G,"release","onRelease"),UMe&&"touchmove"===d.type||-1!==d.type.indexOf("cancel")||(GSe(G,"click","onClick"),CSe()-ae<300&&GSe(G,"doubleclick","onDoubleClick"),g=d.target||t,ae=CSe(),u=function(){ae===B||!G.enabled()||G.isPressed||d.defaultPrevented||(g.click?g.click():re.createEvent&&((l=re.createEvent("MouseEvents")).initMouseEvent("click",!0,!0,TMe,1,G.pointerEvent.screenX,G.pointerEvent.screenY,G.pointerX,G.pointerY,!1,!1,!1,!1,0,null),g.dispatchEvent(l)))},UMe||d.defaultPrevented||jMe.delayedCall(.05,u))):(fe(a.inertia||a.throwProps),G.allowEventDefault||!d||!1===a.dragClickables&&te.call(G,d.target)||!c||D&&(!M||D!==M)||!1===d.cancelable?T=!1:(T=!0,SSe(d)),GSe(G,"release","onRelease")),Ce()&&f.duration(G.tween.duration()),c&&GSe(G,"dragend","onDragEnd"),!0}T&&n&&o&&SSe(n)},be=function(e){if(e&&G.isDragging&&!r){var a=e.target||t.parentNode,n=a.scrollLeft-a._gsScrollX,i=a.scrollTop-a._gsScrollY;(n||i)&&(O?(s-=n*O.a+i*O.c,l-=i*O.d+n*O.b):(s-=n,l-=i),a._gsScrollX+=n,a._gsScrollY+=i,_e(G.pointerX,G.pointerY))}},ve=function(e){var t=CSe(),a=t-ae<100,n=t-W<50,i=a&&B===ae,o=G.pointerEvent&&G.pointerEvent.defaultPrevented,r=a&&j===ae,s=e.isTrusted||null==e.isTrusted&&a&&i;if((i||n&&!1!==G.vars.suppressClickOnDrag)&&e.stopImmediatePropagation&&e.stopImmediatePropagation(),a&&(!G.pointerEvent||!G.pointerEvent.defaultPrevented)&&(!i||s&&!r))return s&&i&&(j=ae),void(B=ae);(G.isPressed||n||a)&&(s&&e.detail&&a&&!o||SSe(e)),a||n||P||(e&&e.target&&(G.pointerEvent=e),GSe(G,"click","onClick"))},ke=function(e){return O?{x:e.x*O.a+e.y*O.c+O.e,y:e.x*O.b+e.y*O.d+O.f}:{x:e.x,y:e.y}};return(F=n.get(t))&&F.kill(),i.startDrag=function(e,a){var n,i,o,r;Ie(e||G.pointerEvent,!0),a&&!G.hitTest(e||G.pointerEvent)&&(n=HSe(e||G.pointerEvent),i=HSe(t),o=ke({x:n.left+n.width/2,y:n.top+n.height/2}),r=ke({x:i.left+i.width/2,y:i.top+i.height/2}),s-=o.x-r.x,l-=o.y-r.y),G.isDragging||(G.isDragging=P=!0,GSe(G,"dragstart","onDragStart"))},i.drag=ye,i.endDrag=function(e){return Fe(e||G.pointerEvent,!0)},i.timeSinceDrag=function(){return G.isDragging?0:(CSe()-W)/1e3},i.timeSinceClick=function(){return(CSe()-ae)/1e3},i.hitTest=function(e,t){return n.hitTest(G.target,e,t)},i.getDirection=function(e,a){var n,i,o,r,s,l,d="velocity"===e&&WMe?e:rSe(e)&&!q?"element":"start";return"element"===d&&(s=HSe(G.target),l=HSe(e)),n="start"===d?G.x-g:"velocity"===d?WMe.getVelocity(t,z):s.left+s.width/2-(l.left+l.width/2),q?n<0?"counter-clockwise":"clockwise":(a=a||2,i="start"===d?G.y-u:"velocity"===d?WMe.getVelocity(t,Q):s.top+s.height/2-(l.top+l.height/2),r=(o=Math.abs(n/i))<1/a?"":n<0?"left":"right",o<a&&(""!==r&&(r+="-"),r+=i<0?"up":"down"),r)},i.applyBounds=function(e,n){var i,o,r,s,l,g;if(e&&a.bounds!==e)return a.bounds=e,G.update(!0,n);if(ge(!0),de(),d&&!Ce()){if(i=G.x,o=G.y,i>f?i=f:i<p&&(i=p),o>A?o=A:o<C&&(o=C),(G.x!==i||G.y!==o)&&(r=!0,G.x=G.endX=i,q?G.endRotation=i:G.y=G.endY=o,_=!0,le(!0),G.autoScroll&&!G.isDragging))for(zSe(t.parentNode),s=t,vSe.scrollTop=null!=TMe.pageYOffset?TMe.pageYOffset:null!=re.documentElement.scrollTop?re.documentElement.scrollTop:re.body.scrollTop,vSe.scrollLeft=null!=TMe.pageXOffset?TMe.pageXOffset:null!=re.documentElement.scrollLeft?re.documentElement.scrollLeft:re.body.scrollLeft;s&&!g;)l=(g=RSe(s.parentNode))?vSe:s.parentNode,Z&&l.scrollTop>l._gsMaxScrollY&&(l.scrollTop=l._gsMaxScrollY),L&&l.scrollLeft>l._gsMaxScrollX&&(l.scrollLeft=l._gsMaxScrollX),s=l;G.isThrowing&&(r||G.endX>f||G.endX<p||G.endY>A||G.endY<C)&&fe(a.inertia||a.throwProps,r)}return G},i.update=function(e,a,n){if(a&&G.isPressed){var i=SMe(t),o=N.apply({x:G.x-g,y:G.y-u}),r=SMe(t.parentNode,!0);r.apply({x:i.e-o.x,y:i.f-o.y},o),G.x-=o.x-r.e,G.y-=o.y-r.f,le(!0),Ae()}var s=G.x,l=G.y;return pe(!a),e?G.applyBounds():(_&&n&&le(!0),ge(!0)),a&&(_e(G.pointerX,G.pointerY),_&&le(!0)),G.isPressed&&!a&&(L&&Math.abs(s-G.x)>.01||Z&&Math.abs(l-G.y)>.01&&!q)&&Ae(),G.autoScroll&&(zSe(t.parentNode,G.isDragging),X=G.isDragging,le(!0),VSe(t,be),PSe(t,be)),G},i.enable=function(e){var n,i,s,l={lazy:!0};if(!1!==a.cursor&&(l.cursor=a.cursor||XMe),jMe.utils.checkPrefix("touchCallout")&&(l.touchCallout="none"),"soft"!==e){for(wSe(Y,L===Z?"none":a.allowNativeTouchScrolling&&t.scrollHeight===t.clientHeight==(t.scrollWidth===t.clientHeight)||a.allowEventDefault?"manipulation":L?"pan-y":"pan-x"),i=Y.length;--i>-1;)s=Y[i],KMe||DSe(s,"mousedown",Ie),DSe(s,"touchstart",Ie),DSe(s,"click",ve,!0),jMe.set(s,l),s.getBBox&&s.ownerSVGElement&&L!==Z&&jMe.set(s.ownerSVGElement,{touchAction:a.allowNativeTouchScrolling||a.allowEventDefault?"manipulation":L?"pan-y":"pan-x"}),a.allowContextMenu||DSe(s,"contextmenu",se);JSe(Y,!1)}return PSe(t,be),o=!0,WMe&&"soft"!==e&&WMe.track(r||t,R?"x,y":q?"rotation":"top,left"),t._gsDragID=n=t._gsDragID||"d"+ySe++,ISe[n]=G,r&&(r.enable(),r.element._gsDragID=n),(a.bounds||q)&&Ae(),a.bounds&&G.applyBounds(),G},i.disable=function(e){for(var a,n=G.isDragging,i=Y.length;--i>-1;)QSe(Y[i],"cursor",null);if("soft"!==e){for(wSe(Y,null),i=Y.length;--i>-1;)a=Y[i],QSe(a,"touchCallout",null),MSe(a,"mousedown",Ie),MSe(a,"touchstart",Ie),MSe(a,"click",ve,!0),MSe(a,"contextmenu",se);JSe(Y,!0),x&&(MSe(x,"touchcancel",Fe),MSe(x,"touchend",Fe),MSe(x,"touchmove",ye)),MSe(re,"mouseup",Fe),MSe(re,"mousemove",ye)}return VSe(t,be),o=!1,WMe&&"soft"!==e&&(WMe.untrack(r||t,R?"x,y":q?"rotation":"top,left"),G.tween&&G.tween.kill()),r&&r.disable(),ESe(le),G.isDragging=G.isPressed=w=!1,n&&GSe(G,"dragend","onDragEnd"),G},i.enabled=function(e,t){return arguments.length?e?G.enable(t):G.disable(t):o},i.kill=function(){return G.isThrowing=!1,G.tween&&G.tween.kill(),G.disable(),jMe.set(Y,{clearProps:"userSelect"}),delete ISe[t._gsDragID],G},i.revert=function(){this.kill(),this.styles&&this.styles.revert()},~V.indexOf("scroll")&&(r=i.scrollProxy=new eBe(t,function(e,t){for(var a in t)a in e||(e[a]=t[a]);return e}({onKill:function(){G.isPressed&&Fe(null)}},a)),t.style.overflowY=Z&&!HMe?"auto":"hidden",t.style.overflowX=L&&!HMe?"auto":"hidden",t=r.content),q?U.rotation=1:(L&&(U[z]=1),Z&&(U[Q]=1)),ne.force3D=!("force3D"in a)||a.force3D,JMe(BMe(i)),i.enable(),i}return a=e,(t=n).prototype=Object.create(a.prototype),t.prototype.constructor=t,t.__proto__=a,n.register=function(e){jMe=e,tBe()},n.create=function(e,t){return zMe||tBe(!0),LMe(e).map(function(e){return new n(e,t)})},n.get=function(e){return ISe[(LMe(e)[0]||{})._gsDragID]},n.timeSinceDrag=function(){return(CSe()-FSe)/1e3},n.hitTest=function(e,t,a){if(e===t)return!1;var n,i,o,r=HSe(e),s=HSe(t),l=r.top,g=r.left,u=r.right,d=r.bottom,c=r.width,h=r.height,f=s.left>u||s.right<g||s.top>d||s.bottom<l;return f||!a?!f:(o=-1!==(a+"").indexOf("%"),a=parseFloat(a)||0,(n={left:Math.max(g,s.left),top:Math.max(l,s.top)}).width=Math.min(u,s.right)-n.left,n.height=Math.min(d,s.bottom)-n.top,!(n.width<0||n.height<0)&&(o?(a*=.01,(i=n.width*n.height)>=c*h*a||i>=s.width*s.height*a):n.width>a&&n.height>a))},n}(aBe);!function(e,t){for(var a in t)a in e||(e[a]=t[a])}(nBe.prototype,{pointerX:0,pointerY:0,startX:0,startY:0,deltaX:0,deltaY:0,isDragging:!1,isPressed:!1}),nBe.zIndex=1e3,nBe.version="3.13.0",iSe()&&jMe.registerPlugin(nBe);const iBe={key:0,class:"flex items-center justify-between gap-2"},oBe={class:"text-muted-foreground text-sm ml-1"},rBe={class:"relative"},sBe={class:"background-grid absolute w-full grid grid-cols-6 gap-2 top-4"},lBe=["data-index"],gBe={key:0,class:"-m-1 p-1 col-start-1 col-span-2 row-start-1 row-span-2","data-index":"0"},uBe={key:1,class:"-m-1 p-1"},dBe=["data-index"],cBe=["onClick"],hBe={class:"aspect-square group"},fBe=["src"],pBe=["onClick"],ABe=a.defineComponent({__name:"MediaPickerItems",setup(e){dMe.registerPlugin(nBe);const t=a.inject("sources"),n=a.inject("media-items",{value:[]}),i=a.inject("update-media-items",()=>{}),o=a.ref([]),r=a.ref(null),s=a.ref(null),l=a.ref(-1),g=a.ref(-1),u=a.ref(!1),d=a.computed(()=>o.value.length===n.value.length||0!==o.value.length&&"indeterminate"),c=()=>{!0!==d.value?o.value=n.value.map(e=>e.id):o.value=[]},h=()=>{if(!o.value.length)return;const e=[...n.value];o.value.forEach(t=>{const a=e.findIndex(e=>e.id===t);-1!==a&&e.splice(a,1)}),i(e),o.value=[]};let f=[];a.ref({row:0,col:0});let p=null,A=null,C=null;const m=()=>{if(!A||!C)return;const e=A,t=e.clientX,a=e.clientY,n=document.querySelector(".background-grid");if(!n)return;const o=n.getBoundingClientRect();if(t>=o.left&&t<=o.right&&a>=o.top&&a<=o.bottom){const e=n.querySelectorAll("[data-index]");for(let n=0;n<e.length;n++){const o=e[n],r=o.getBoundingClientRect();if(t>=r.left&&t<=r.right&&a>=r.top&&a<=r.bottom){const e=parseInt(o.getAttribute("data-index"),10);if(o.classList.contains("col-span-2"),e!==g.value&&s.value){g.value=e;let{x:t,y:a}=document.querySelector('.background-grid [data-index="'+l.value+'"]').getBoundingClientRect(),{x:n,y:o}=document.querySelector('.background-grid [data-index="'+e+'"]').getBoundingClientRect();C.style.top=a-o+"px",C.style.left=t-n+"px";const r=[...s.value],u=r[l.value];r.splice(l.value,1),r.splice(e,0,u),i(r)}break}}}p=requestAnimationFrame(m)},I=()=>{f.forEach(e=>{e&&e.kill&&e.kill()}),f=[],a.nextTick(()=>{const e=r.value?r.value.querySelectorAll(".draggable-item"):[];if(e.length)try{const t=nBe.create(e,{type:"x,y",edgeResistance:.65,bounds:r.value,onPress:function(){s.value=[...n.value],l.value=parseInt(this.target.getAttribute("data-index"),10),g.value=-1,this.target.classList.add("dragging"),C=this.target},onRelease:function(e){this.target.classList.remove("dragging"),p&&(cancelAnimationFrame(p),p=null),dMe.to(this.target,{top:0,left:0,x:0,y:0,duration:.3,ease:"power3.out",clearProps:"transform",onComplete:()=>{s.value=null,l.value=-1,g.value=-1}})},onDrag:function(e){A=e,p||(p=requestAnimationFrame(m))}});f.push(t)}catch(t){console.error("Error initializing draggable:",t)}})},y=e=>{n.value.push(...e),i(n.value)};return a.onMounted(()=>{setTimeout(()=>{I()},500)}),a.watch(()=>n.value.length,()=>{setTimeout(()=>{I()},100)}),(e,i)=>{const s=a.resolveComponent("Checkbox");return a.openBlock(),a.createElementBlock(a.Fragment,null,[o.value.length?(a.openBlock(),a.createElementBlock("div",iBe,[a.createVNode(EM,{onClick:c,variant:"ghost",size:"sm"},{default:a.withCtx(()=>[a.createVNode(s,{"model-value":d.value,tabindex:"-1",class:"pointer-events-none data-[state=checked]:bg-black data-[state=checked]:text-white data-[state=checked]:border-muted border-muted group-focus-visible:ring-0"},{default:a.withCtx(()=>["indeterminate"===d.value?(a.openBlock(),a.createBlock(a.unref(PI),{key:0,class:"size-3"})):(a.openBlock(),a.createBlock(a.unref(Ts),{key:1,class:"size-3"}))]),_:1},8,["model-value"]),a.createElementVNode("p",oBe,a.toDisplayString(o.value.length)+" files selected",1)]),_:1}),a.createVNode(EM,{variant:"outline",size:"sm",class:"text-red-500 hover:text-red-600",onClick:h},{default:a.withCtx(()=>i[1]||(i[1]=[a.createTextVNode("Remove")])),_:1,__:[1]})])):a.createCommentVNode("",!0),a.createElementVNode("div",rBe,[a.createElementVNode("div",sBe,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(u.value?a.unref(n):a.unref(n).slice(0,8),(e,t)=>(a.openBlock(),a.createElementBlock("div",{key:e.id,class:a.normalizeClass(["relative -m-1 p-1",{"col-start-1 col-span-2 row-start-1 row-span-2":0===t}]),"data-index":t},[i[2]||(i[2]=a.createElementVNode("div",{class:"w-full h-full bg-muted/80 rounded-md aspect-square"},null,-1)),!u.value&&a.unref(n).length>8&&7===t?(a.openBlock(),a.createElementBlock("div",{key:0,onClick:i[0]||(i[0]=e=>u.value=!0),class:"absolute top-0 left-0 w-[calc(100%-8px)] h-[calc(100%-8px)] bg-black/30 rounded-md aspect-square z-10 flex items-center justify-center backdrop-blur-sm m-1 cursor-pointer"}," + "+a.toDisplayString(a.unref(n).length-7),1)):a.createCommentVNode("",!0)],10,lBe))),128)),0==a.unref(n).length?(a.openBlock(),a.createElementBlock("div",gBe,i[3]||(i[3]=[a.createElementVNode("div",{class:"w-full h-full bg-muted/80 rounded-md aspect-square"},null,-1)]))):(a.openBlock(),a.createElementBlock("div",uBe,i[4]||(i[4]=[a.createElementVNode("div",{class:"w-full h-full bg-muted/80 rounded-md aspect-square"},null,-1)])))]),a.createElementVNode("div",{ref_key:"itemsContainer",ref:r,class:"relative grid grid-cols-6 gap-2 mt-4"},[a.createVNode(a.TransitionGroup,{name:"media-item",tag:"div",class:"contents"},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(u.value?a.unref(n):a.unref(n).slice(0,8),(e,t)=>(a.openBlock(),a.createElementBlock("div",{key:e||t,"data-index":t,class:a.normalizeClass(["draggable-item w-full relative",{"col-start-1 col-span-2 row-start-1 row-span-2":0===t}])},[a.createElementVNode("button",{class:"relative flex justify-center items-center w-full h-full rounded-md outline outline-border group overflow-hidden focus-visible:outline-none focus-visible:ring-ring/80 focus-visible:ring-[3px] transition-all duration-200 cursor-grab active:cursor-grabbing",onClick:t=>{return a=e,void console.log("open media",a);var a},type:"button"},[a.createElementVNode("div",hBe,[a.createElementVNode("img",{src:e,draggable:"false",class:"w-full h-full object-cover group-hover:opacity-75 transition-opacity duration-200 pointer-events-none"},null,8,fBe)]),a.createElementVNode("button",{onClick:t=>((e,t)=>{e.stopPropagation(),o.value.includes(t)?o.value=o.value.filter(e=>e!==t):o.value.push(t)})(t,e),class:"absolute top-0 left-0 p-1 size-6 flex items-center justify-center",type:"button"},[a.createVNode(s,{"model-value":o.value.includes(e),tabindex:"-1",class:"bg-white outline-gray-300 data-[state=checked]:bg-black data-[state=checked]:text-white data-[state=checked]:border-black shadow-xs pointer-events-none"},null,8,["model-value"])],8,pBe),a.createVNode(a.unref(_p),{class:"size-3 absolute top-1 right-1 text-gray-400 hidden group-hover:block"})],8,cBe)],10,dBe))),128))]),_:1}),a.createVNode(awe,{sources:a.unref(t),onSubmit:y},{default:a.withCtx(()=>{var e;return[a.createElementVNode("button",{class:a.normalizeClass(["relative flex justify-center items-center w-full group aspect-square rounded-md cursor-pointer focus-visible:outline-ring focus-visible:outline-[1px] focus-visible:ring-ring/50 focus-visible:ring-[3px] hover:bg-black/10 transition-colors duration-200",{"col-start-1 col-span-2 row-start-1 row-span-2":0===(null==(e=a.unref(n))?void 0:e.length)}]),type:"button"},[a.createVNode(a.unref(bF),{class:"size-8"})],2)]}),_:1},8,["sources"])],512)])],64)}}}),CBe=v(ABe,[["__scopeId","data-v-d84d8ac8"]]),mBe=a.defineComponent({__name:"MediaPicker",props:{modelValue:{},sources:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,i=t,o=a.ref([...n.modelValue||[]]);a.watch(()=>n.modelValue,e=>{o.value=[...e||[]]},{deep:!0});const r=a.computed(()=>n.sources);return a.provide("media-items",o),a.provide("update-media-items",e=>{i("update:modelValue",e)}),a.provide("sources",r),(e,t)=>(a.openBlock(),a.createBlock(CBe))}}),IBe=Object.freeze(Object.defineProperty({__proto__:null,MediaPicker:mBe,MediaPickerDialog:awe},Symbol.toStringTag,{value:"Module"})),yBe=a.defineComponent({__name:"Menubar",props:{modelValue:{},defaultValue:{},dir:{},loop:{type:Boolean},class:{}},emits:["update:modelValue"],setup(e,{emit:t}){const i=e,o=t,r=a.computed(()=>{const{class:e,...t}=i;return t}),s=n.useForwardPropsEmits(r,o);return(e,t)=>(a.openBlock(),a.createBlock(a.unref(n.MenubarRoot),a.mergeProps({"data-slot":"menubar"},a.unref(s),{class:a.unref(Dt)("bg-background flex h-9 items-center gap-1 rounded-md border p-1 shadow-xs",i.class)}),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},16,["class"]))}}),_Be={class:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center"},FBe=a.defineComponent({__name:"MenubarCheckboxItem",props:{modelValue:{type:[Boolean,String]},disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{},class:{}},emits:["select","update:modelValue"],setup(e,{emit:t}){const i=e,o=t,r=a.computed(()=>{const{class:e,...t}=i;return t}),s=n.useForwardPropsEmits(r,o);return(e,t)=>(a.openBlock(),a.createBlock(a.unref(n.MenubarCheckboxItem),a.mergeProps({"data-slot":"menubar-checkbox-item"},a.unref(s),{class:a.unref(Dt)("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-xs py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",i.class)}),{default:a.withCtx(()=>[a.createElementVNode("span",_Be,[a.createVNode(a.unref(n.MenubarItemIndicator),null,{default:a.withCtx(()=>[a.createVNode(a.unref(Ts),{class:"size-4"})]),_:1})]),a.renderSlot(e.$slots,"default")]),_:3},16,["class"]))}}),bBe=a.defineComponent({__name:"MenubarContent",props:{forceMount:{type:Boolean},loop:{type:Boolean},side:{},sideOffset:{default:8},align:{default:"start"},alignOffset:{default:-4},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},disableUpdateOnLayoutShift:{type:Boolean},prioritizePosition:{type:Boolean},reference:{},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,i=a.computed(()=>{const{class:e,...a}=t;return a}),o=n.useForwardProps(i);return(e,i)=>(a.openBlock(),a.createBlock(a.unref(n.MenubarPortal),null,{default:a.withCtx(()=>[a.createVNode(a.unref(n.MenubarContent),a.mergeProps({"data-slot":"menubar-content"},a.unref(o),{class:a.unref(Dt)("bg-popover text-popover-foreground data-[state=open]:animate-in 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 z-50 min-w-[12rem] origin-(--reka-menubar-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-md",t.class)}),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},16,["class"])]),_:3}))}}),vBe=a.defineComponent({__name:"MenubarGroup",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e;return(e,i)=>(a.openBlock(),a.createBlock(a.unref(n.MenubarGroup),a.mergeProps({"data-slot":"menubar-group"},t),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},16))}}),kBe=a.defineComponent({__name:"MenubarItem",props:{disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{},class:{},inset:{type:Boolean},variant:{}},emits:["select"],setup(e,{emit:t}){const i=e,o=t,r=xZ(i,"class","inset","variant"),s=n.useForwardPropsEmits(r,o);return(e,t)=>(a.openBlock(),a.createBlock(a.unref(n.MenubarItem),a.mergeProps({"data-slot":"menubar-item","data-inset":e.inset?"":void 0,"data-variant":e.variant},a.unref(s),{class:a.unref(Dt)("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive-foreground data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/40 data-[variant=destructive]:focus:text-destructive-foreground data-[variant=destructive]:*:[svg]:!text-destructive-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",i.class)}),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},16,["data-inset","data-variant","class"]))}}),wBe=a.defineComponent({__name:"MenubarLabel",props:{asChild:{type:Boolean},as:{},class:{},inset:{type:Boolean}},setup(e){const t=e,i=xZ(t,"class","inset");return(e,o)=>(a.openBlock(),a.createBlock(a.unref(n.MenubarLabel),a.mergeProps({"data-inset":e.inset?"":void 0},a.unref(i),{class:a.unref(Dt)("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",t.class)}),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},16,["data-inset","class"]))}}),xBe=a.defineComponent({__name:"MenubarMenu",props:{value:{}},setup(e){const t=e;return(e,i)=>(a.openBlock(),a.createBlock(a.unref(n.MenubarMenu),a.mergeProps({"data-slot":"menubar-menu"},t),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},16))}}),OBe=a.defineComponent({__name:"MenubarRadioGroup",props:{modelValue:{},asChild:{type:Boolean},as:{}},emits:["update:modelValue"],setup(e,{emit:t}){const i=e,o=t,r=n.useForwardPropsEmits(i,o);return(e,t)=>(a.openBlock(),a.createBlock(a.unref(n.MenubarRadioGroup),a.mergeProps({"data-slot":"menubar-radio-group"},a.unref(r)),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},16))}}),EBe={class:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center"},DBe=a.defineComponent({__name:"MenubarRadioItem",props:{value:{},disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{},class:{}},emits:["select"],setup(e,{emit:t}){const i=e,o=t,r=a.computed(()=>{const{class:e,...t}=i;return t}),s=n.useForwardPropsEmits(r,o);return(e,t)=>(a.openBlock(),a.createBlock(a.unref(n.MenubarRadioItem),a.mergeProps({"data-slot":"menubar-radio-item"},a.unref(s),{class:a.unref(Dt)("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-xs py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",i.class)}),{default:a.withCtx(()=>[a.createElementVNode("span",EBe,[a.createVNode(a.unref(n.MenubarItemIndicator),null,{default:a.withCtx(()=>[a.createVNode(a.unref(Hl),{class:"size-2 fill-current"})]),_:1})]),a.renderSlot(e.$slots,"default")]),_:3},16,["class"]))}}),MBe=a.defineComponent({__name:"MenubarSeparator",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,i=a.computed(()=>{const{class:e,...a}=t;return a}),o=n.useForwardProps(i);return(e,i)=>(a.openBlock(),a.createBlock(a.unref(n.MenubarSeparator),a.mergeProps({"data-slot":"menubar-separator",class:a.unref(Dt)("bg-border -mx-1 my-1 h-px",t.class)},a.unref(o)),null,16,["class"]))}}),SBe=a.defineComponent({__name:"MenubarShortcut",props:{class:{}},setup(e){const t=e;return(e,n)=>(a.openBlock(),a.createElementBlock("span",{"data-slot":"menubar-shortcut",class:a.normalizeClass(a.unref(Dt)("text-muted-foreground ml-auto text-xs tracking-widest",t.class))},[a.renderSlot(e.$slots,"default")],2))}}),BBe=a.defineComponent({__name:"MenubarSub",props:{defaultOpen:{type:Boolean},open:{type:Boolean}},emits:["update:open"],setup(e,{emit:t}){const i=e,o=t,r=n.useForwardPropsEmits(i,o);return(e,t)=>(a.openBlock(),a.createBlock(a.unref(n.MenubarSub),a.mergeProps({"data-slot":"menubar-sub"},a.unref(r)),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},16))}}),jBe=a.defineComponent({__name:"MenubarSubContent",props:{forceMount:{type:Boolean},loop:{type:Boolean},sideOffset:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},disableUpdateOnLayoutShift:{type:Boolean},prioritizePosition:{type:Boolean},reference:{},asChild:{type:Boolean},as:{},class:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","entryFocus","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const i=e,o=t,r=a.computed(()=>{const{class:e,...t}=i;return t}),s=n.useForwardPropsEmits(r,o);return(e,t)=>(a.openBlock(),a.createBlock(a.unref(n.MenubarPortal),null,{default:a.withCtx(()=>[a.createVNode(a.unref(n.MenubarSubContent),a.mergeProps({"data-slot":"menubar-sub-content"},a.unref(s),{class:a.unref(Dt)("bg-popover text-popover-foreground 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 z-50 min-w-[8rem] origin-(--reka-menubar-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",i.class)}),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},16,["class"])]),_:3}))}}),TBe=a.defineComponent({__name:"MenubarSubTrigger",props:{disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{},class:{},inset:{type:Boolean}},setup(e){const t=e,i=xZ(t,"class","inset"),o=n.useForwardProps(i);return(e,i)=>(a.openBlock(),a.createBlock(a.unref(n.MenubarSubTrigger),a.mergeProps({"data-slot":"menubar-sub-trigger","data-inset":e.inset?"":void 0},a.unref(o),{class:a.unref(Dt)("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-none select-none data-[inset]:pl-8",t.class)}),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default"),a.createVNode(a.unref(Qs),{class:"ml-auto size-4"})]),_:3},16,["data-inset","class"]))}}),NBe=a.defineComponent({__name:"MenubarTrigger",props:{disabled:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,i=a.computed(()=>{const{class:e,...a}=t;return a}),o=n.useForwardProps(i);return(e,i)=>(a.openBlock(),a.createBlock(a.unref(n.MenubarTrigger),a.mergeProps({"data-slot":"menubar-trigger"},a.unref(o),{class:a.unref(Dt)("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex items-center rounded-sm px-2 py-1 text-sm font-medium outline-hidden select-none",t.class)}),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},16,["class"]))}}),PBe=Object.freeze(Object.defineProperty({__proto__:null,Menubar:yBe,MenubarCheckboxItem:FBe,MenubarContent:bBe,MenubarGroup:vBe,MenubarItem:kBe,MenubarLabel:wBe,MenubarMenu:xBe,MenubarRadioGroup:OBe,MenubarRadioItem:DBe,MenubarSeparator:MBe,MenubarShortcut:SBe,MenubarSub:BBe,MenubarSubContent:jBe,MenubarSubTrigger:TBe,MenubarTrigger:NBe},Symbol.toStringTag,{value:"Module"})),VBe=a.defineComponent({__name:"NumberField",props:{defaultValue:{},modelValue:{},min:{},max:{},step:{},stepSnapping:{type:Boolean},formatOptions:{},locale:{},disabled:{type:Boolean},disableWheelChange:{type:Boolean},invertWheelChange:{type:Boolean},id:{},asChild:{type:Boolean},as:{},name:{},required:{type:Boolean},class:{}},emits:["update:modelValue"],setup(e,{emit:t}){const i=e,o=t,r=a.computed(()=>{const{class:e,...t}=i;return t}),s=n.useForwardPropsEmits(r,o);return(e,t)=>(a.openBlock(),a.createBlock(a.unref(n.NumberFieldRoot),a.mergeProps(a.unref(s),{class:a.unref(Dt)("grid gap-1.5",i.class)}),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},16,["class"]))}}),RBe=a.defineComponent({__name:"NumberFieldContent",props:{class:{}},setup(e){const t=e;return(e,n)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(a.unref(Dt)("relative [&>[data-slot=input]]:has-[[data-slot=increment]]:pr-5 [&>[data-slot=input]]:has-[[data-slot=decrement]]:pl-5",t.class))},[a.renderSlot(e.$slots,"default")],2))}}),qBe=a.defineComponent({__name:"NumberFieldDecrement",props:{disabled:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,i=a.computed(()=>{const{class:e,...a}=t;return a}),o=n.useForwardProps(i);return(e,i)=>(a.openBlock(),a.createBlock(a.unref(n.NumberFieldDecrement),a.mergeProps({"data-slot":"decrement"},a.unref(o),{class:a.unref(Dt)("absolute top-1/2 -translate-y-1/2 left-0 p-3 disabled:cursor-not-allowed disabled:opacity-20",t.class)}),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default",{},()=>[a.createVNode(a.unref(PI),{class:"size-4"})])]),_:3},16,["class"]))}}),zBe=a.defineComponent({__name:"NumberFieldIncrement",props:{disabled:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,i=a.computed(()=>{const{class:e,...a}=t;return a}),o=n.useForwardProps(i);return(e,i)=>(a.openBlock(),a.createBlock(a.unref(n.NumberFieldIncrement),a.mergeProps({"data-slot":"increment"},a.unref(o),{class:a.unref(Dt)("absolute top-1/2 -translate-y-1/2 right-0 disabled:cursor-not-allowed disabled:opacity-20 p-3",t.class)}),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default",{},()=>[a.createVNode(a.unref(bF),{class:"size-4"})])]),_:3},16,["class"]))}}),QBe=a.defineComponent({__name:"NumberFieldInput",props:{class:{}},setup(e){const t=e;return(e,i)=>(a.openBlock(),a.createBlock(a.unref(n.NumberFieldInput),{"data-slot":"input",class:a.normalizeClass(a.unref(Dt)("flex h-9 w-full rounded-md border border-input bg-transparent py-1 text-sm text-center shadow-sm transition-colors placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",t.class))},null,8,["class"]))}}),LBe=Object.freeze(Object.defineProperty({__proto__:null,NumberField:VBe,NumberFieldContent:RBe,NumberFieldDecrement:qBe,NumberFieldIncrement:zBe,NumberFieldInput:QBe},Symbol.toStringTag,{value:"Module"})),ZBe=a.defineComponent({__name:"PaginationEllipsis",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,i=a.computed(()=>{const{class:e,...a}=t;return a});return(e,o)=>(a.openBlock(),a.createBlock(a.unref(n.PaginationEllipsis),a.mergeProps(i.value,{class:a.unref(Dt)("w-9 h-9 flex items-center justify-center",t.class)}),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default",{},()=>[a.createVNode(a.unref(Hd))])]),_:3},16,["class"]))}}),HBe=a.defineComponent({__name:"PaginationFirst",props:{asChild:{type:Boolean,default:!0},as:{},class:{}},setup(e){const t=e,i=a.computed(()=>{const{class:e,...a}=t;return a});return(e,o)=>(a.openBlock(),a.createBlock(a.unref(n.PaginationFirst),a.normalizeProps(a.guardReactiveProps(i.value)),{default:a.withCtx(()=>[a.createVNode(a.unref(EM),{class:a.normalizeClass(a.unref(Dt)("size-10 p-0",t.class)),variant:"outline"},{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default",{},()=>[a.createVNode(a.unref(Us),{class:"size-4"})])]),_:3},8,["class"])]),_:3},16))}}),GBe=a.defineComponent({__name:"PaginationLast",props:{asChild:{type:Boolean,default:!0},as:{},class:{}},setup(e){const t=e,i=a.computed(()=>{const{class:e,...a}=t;return a});return(e,o)=>(a.openBlock(),a.createBlock(a.unref(n.PaginationLast),a.normalizeProps(a.guardReactiveProps(i.value)),{default:a.withCtx(()=>[a.createVNode(a.unref(EM),{class:a.normalizeClass(a.unref(Dt)("size-10 p-0",t.class)),variant:"outline"},{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default",{},()=>[a.createVNode(a.unref(Xs),{class:"size-4"})])]),_:3},8,["class"])]),_:3},16))}}),YBe=a.defineComponent({__name:"PaginationNext",props:{asChild:{type:Boolean,default:!0},as:{},class:{}},setup(e){const t=e,i=a.computed(()=>{const{class:e,...a}=t;return a});return(e,o)=>(a.openBlock(),a.createBlock(a.unref(n.PaginationNext),a.normalizeProps(a.guardReactiveProps(i.value)),{default:a.withCtx(()=>[a.createVNode(a.unref(EM),{class:a.normalizeClass(a.unref(Dt)("size-10 p-0",t.class)),variant:"outline"},{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default",{},()=>[a.createVNode(a.unref(Qs),{class:"size-4"})])]),_:3},8,["class"])]),_:3},16))}}),UBe=a.defineComponent({__name:"PaginationPrev",props:{asChild:{type:Boolean,default:!0},as:{},class:{}},setup(e){const t=e,i=a.computed(()=>{const{class:e,...a}=t;return a});return(e,o)=>(a.openBlock(),a.createBlock(a.unref(n.PaginationPrev),a.normalizeProps(a.guardReactiveProps(i.value)),{default:a.withCtx(()=>[a.createVNode(a.unref(EM),{class:a.normalizeClass(a.unref(Dt)("size-10 p-0",t.class)),variant:"outline"},{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default",{},()=>[a.createVNode(a.unref(zs),{class:"size-4"})])]),_:3},8,["class"])]),_:3},16))}}),WBe=Object.freeze(Object.defineProperty({__proto__:null,Pagination:n.PaginationRoot,PaginationEllipsis:ZBe,PaginationFirst:HBe,PaginationLast:GBe,PaginationList:n.PaginationList,PaginationListItem:n.PaginationListItem,PaginationNext:YBe,PaginationPrev:UBe},Symbol.toStringTag,{value:"Module"})),XBe=a.defineComponent({__name:"Popover",props:{defaultOpen:{type:Boolean},open:{type:Boolean},modal:{type:Boolean}},emits:["update:open"],setup(e,{emit:t}){const i=e,o=t,r=n.useForwardPropsEmits(i,o);return(e,t)=>(a.openBlock(),a.createBlock(a.unref(n.PopoverRoot),a.mergeProps({"data-slot":"popover"},a.unref(r)),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},16))}}),KBe=a.defineComponent({__name:"PopoverAnchor",props:{reference:{},asChild:{type:Boolean},as:{}},setup(e){const t=e;return(e,i)=>(a.openBlock(),a.createBlock(a.unref(n.PopoverAnchor),a.mergeProps({"data-slot":"popover-anchor"},t),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},16))}}),JBe=a.defineComponent({inheritAttrs:!1,__name:"PopoverContent",props:{forceMount:{type:Boolean},side:{},sideOffset:{default:4},align:{default:"center"},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},disableUpdateOnLayoutShift:{type:Boolean},prioritizePosition:{type:Boolean},reference:{},asChild:{type:Boolean},as:{},disableOutsidePointerEvents:{type:Boolean},class:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const i=e,o=t,r=a.computed(()=>{const{class:e,...t}=i;return t}),s=n.useForwardPropsEmits(r,o);return(e,t)=>(a.openBlock(),a.createBlock(a.unref(n.PopoverPortal),null,{default:a.withCtx(()=>[a.createVNode(a.unref(n.PopoverContent),a.mergeProps({"data-slot":"popover-content"},{...a.unref(s),...e.$attrs},{class:a.unref(Dt)("bg-popover text-popover-foreground 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 z-50 w-72 rounded-md border border-popover-border p-4 shadow-md origin-(--reka-popover-content-transform-origin) outline-hidden",i.class)}),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},16,["class"])]),_:3}))}}),$Be=a.defineComponent({__name:"PopoverTrigger",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e;return(e,i)=>(a.openBlock(),a.createBlock(a.unref(n.PopoverTrigger),a.mergeProps({"data-slot":"popover-trigger"},t),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},16))}}),eje=Object.freeze(Object.defineProperty({__proto__:null,Popover:XBe,PopoverAnchor:KBe,PopoverContent:JBe,PopoverTrigger:$Be},Symbol.toStringTag,{value:"Module"})),tje={key:0},aje={key:1},nje={class:"space-y-6 py-4"},ije={id:"query_builder_dialog_filters"},oje={class:"space-y-2"},rje={class:"space-y-2"},sje={class:"flex items-center justify-between space-x-4 px-4"},lje={class:"grid grid-cols-2 gap-4 mt-2"},gje={key:0},uje={class:"flex items-center gap-2 col-span-2"},dje={class:"space-y-2"},cje={class:"flex gap-2 mb-4"},hje={key:0,class:"bg-gray-100/10 rounded p-2 text-xs font-mono text-gray-300 border border-gray-500"},fje={key:1,class:"bg-green-100/10 rounded p-2 text-xs font-bold text-green-500 border border-green-500"},pje={key:2,class:"flex gap-2 flex-col bg-red-100/10 rounded-lg p-4 pt-3 border border-red-500"},Aje={class:"text-red-500 text-xs font-bold mb-1"},Cje=["href"],mje=a.defineComponent({__name:"QueryBuilderDialog",props:{modelValue:{type:Object,default:()=>({})},integrationId:{type:String},needPredefinedIntegration:{type:Boolean,default:!1},noTrigger:{type:Boolean,default:!1}},emits:["update:modelValue","saved"],async setup(e,{expose:t,emit:n}){let i,r;const s=o.useRoute().params.slug,l=e,g=a.ref(!1);a.watch(g,e=>{var t;if(e){let e=JSON.parse(JSON.stringify(l.modelValue));p.value=(null==(t=null==e?void 0:e.integration)?void 0:t.id)||null,I.value=(null==e?void 0:e.resource)||"",y.value=(null==e?void 0:e.filters)||[],b.value=(null==e?void 0:e.sorts)||[],w.value=(null==e?void 0:e.limit)||null,x.value=(null==e?void 0:e.offset)||null,O.value=(null==e?void 0:e.startAt)||null,E.value=(null==e?void 0:e.endAt)||null,D.value=(null==e?void 0:e.groupBy)||"",M.value=(null==e?void 0:e.distinct)||!1}});const u=n,{getProjectIntegrations:d}=TG(),c=a.ref([]);c.value=([i,r]=a.withAsyncContext(()=>d(s)),i=await i,r(),i);const{buildFirebaseQuery:h,buildSQLQuery:f}=RG(),p=a.ref(l.integrationId),A=a.computed(()=>l.integrationId?c.value.find(e=>e.id===l.integrationId):c.value.find(e=>e.id===p.value)),C=a.ref(null),m=a.ref(null),I=a.ref("");a.ref(["team-building-requests","users","projects"]);const y=a.ref([]),_=[{label:"=",value:"=="},{label:"≠",value:"!="},{label:"<",value:"<"},{label:"≤",value:"<="},{label:"≥",value:">="},{label:">",value:">"},{label:"IN",value:"in"},{label:"NOT IN",value:"not-in"},{label:"CONTAINS",value:"array-contains"},{label:"CONTAINS ANY",value:"array-contains-any"}];async function F(){y.value.push({field:"",operator:"==",value:""}),await a.nextTick();const e=document.querySelectorAll("#query_builder_dialog_filters .filter-field");e.length&&e[e.length-1].focus()}const b=a.ref([]);function v(){b.value.push({field:"",direction:"asc"})}const k=a.ref(!1),w=a.ref(null),x=a.ref(null),O=a.ref(null),E=a.ref(null),D=a.ref(""),M=a.ref(!1),S=a.ref(""),B=a.ref(null);function j(){S.value="",B.value=null,C.value=null,m.value=null}function T(){j(),"FIREBASE"===A.value.type?S.value=h({resource:I.value,filters:y.value,sorts:b.value,limit:w.value,startAt:O.value,endAt:E.value}):S.value=f({resource:I.value,filters:y.value,sorts:b.value,limit:w.value,offset:x.value,groupBy:D.value,distinct:M.value})}async function N(){var e,t,a,n;if(j(),"FIREBASE"===A.value.type)try{const{find:e}=ZG(p.value);let t=await e(I.value,{filters:y.value,sorts:b.value,limit:w.value,startAt:O.value,endAt:E.value});B.value=`Found ${t.length} results`}catch(i){C.value=(null==(e=i.response.data)?void 0:e.message)||"Failed to run query",m.value=(null==(a=null==(t=i.response.data)?void 0:t.data)?void 0:a.indexUrl)||null}else try{B.value=f({resource:I.value,filters:y.value,sorts:b.value,limit:w.value,offset:x.value,groupBy:D.value,distinct:M.value})}catch(i){C.value=(null==(n=i.response.data)?void 0:n.message)||"Failed to run query"}}const P=()=>{g.value=!1,j()},V=()=>{let e={integration:{id:p.value,type:A.value.type},resource:I.value,filters:y.value,sorts:b.value,limit:w.value,offset:x.value,groupBy:D.value,distinct:M.value,startAt:O.value,endAt:E.value};u("update:modelValue",e),u("saved",e),P()};return t({openDialog:async e=>{g.value=!0,await a.nextTick(),e&&(p.value=e.integration.id,I.value=e.resource,y.value=e.filters,b.value=e.sorts,w.value=e.limit,x.value=e.offset,O.value=e.startAt,E.value=e.endAt,D.value=e.groupBy,M.value=e.distinct)}}),(t,n)=>{const i=a.resolveComponent("Button"),o=a.resolveComponent("DialogTrigger"),r=a.resolveComponent("DialogTitle"),s=a.resolveComponent("DialogHeader"),l=a.resolveComponent("ResourceSelect"),u=a.resolveComponent("Label"),d=a.resolveComponent("Input"),c=a.resolveComponent("SelectValue"),h=a.resolveComponent("SelectTrigger"),f=a.resolveComponent("SelectItem"),j=a.resolveComponent("SelectGroup"),R=a.resolveComponent("SelectContent"),q=a.resolveComponent("Select"),z=a.resolveComponent("CollapsibleTrigger"),Q=a.resolveComponent("Checkbox"),L=a.resolveComponent("CollapsibleContent"),Z=a.resolveComponent("Collapsible"),H=a.resolveComponent("DialogFooter"),G=a.resolveComponent("DialogContent"),Y=a.resolveComponent("Dialog");return a.openBlock(),a.createBlock(Y,{open:g.value,"onUpdate:open":n[9]||(n[9]=e=>g.value=e)},{default:a.withCtx(()=>[e.noTrigger?a.createCommentVNode("",!0):(a.openBlock(),a.createBlock(o,{key:0,"as-child":""},{default:a.withCtx(()=>[a.renderSlot(t.$slots,"default",{},()=>[a.createVNode(i,{disabled:!e.integrationId&&e.needPredefinedIntegration},{default:a.withCtx(()=>[e.modelValue?(a.openBlock(),a.createElementBlock("span",tje,"Update Query")):(a.openBlock(),a.createElementBlock("span",aje,"Build Query"))]),_:1},8,["disabled"])])]),_:3})),a.createVNode(G,{class:"sm:max-w-xl w-full"},{default:a.withCtx(()=>[a.createVNode(s,null,{default:a.withCtx(()=>[a.createVNode(r,null,{default:a.withCtx(()=>n[10]||(n[10]=[a.createTextVNode("Query Builder")])),_:1,__:[10]})]),_:1}),a.createElementVNode("div",nje,[a.createVNode(l,{modelValue:p.value,"onUpdate:modelValue":n[0]||(n[0]=e=>p.value=e)},null,8,["modelValue"]),a.createElementVNode("div",null,[a.createVNode(u,{for:"query_builder_dialog_resource",class:"block text-sm font-medium text-muted-foreground mb-2"},{default:a.withCtx(()=>n[11]||(n[11]=[a.createTextVNode("Resource")])),_:1,__:[11]}),a.createVNode(d,{modelValue:I.value,"onUpdate:modelValue":n[1]||(n[1]=e=>I.value=e),placeholder:"team-building-requests",id:"query_builder_dialog_resource"},null,8,["modelValue"])]),a.createElementVNode("div",ije,[a.createVNode(u,{class:"block text-sm font-medium text-muted-foreground mb-2"},{default:a.withCtx(()=>n[12]||(n[12]=[a.createTextVNode("Filters")])),_:1,__:[12]}),a.createElementVNode("div",oje,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(y.value,(e,t)=>(a.openBlock(),a.createElementBlock("div",{key:t,class:"flex items-center gap-2"},[a.createVNode(d,{modelValue:e.field,"onUpdate:modelValue":t=>e.field=t,placeholder:"Field",class:"w-32 filter-field"},null,8,["modelValue","onUpdate:modelValue"]),a.createVNode(q,{modelValue:e.operator,"onUpdate:modelValue":t=>e.operator=t},{default:a.withCtx(()=>[a.createVNode(h,{class:"w-[170px]"},{default:a.withCtx(()=>[a.createVNode(c)]),_:1}),a.createVNode(R,null,{default:a.withCtx(()=>[a.createVNode(j,null,{default:a.withCtx(()=>[(a.openBlock(),a.createElementBlock(a.Fragment,null,a.renderList(_,e=>a.createVNode(f,{key:e.value,value:e.value},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(e.label),1)]),_:2},1032,["value"])),64))]),_:1})]),_:1})]),_:2},1032,["modelValue","onUpdate:modelValue"]),a.createVNode(d,{modelValue:e.value,"onUpdate:modelValue":t=>e.value=t,placeholder:"Value",class:"w-32"},null,8,["modelValue","onUpdate:modelValue"]),a.createVNode(i,{variant:"ghost",onClick:e=>function(e){y.value.splice(e,1)}(t),title:"Remove filter"},{default:a.withCtx(()=>n[13]||(n[13]=[a.createTextVNode("✕")])),_:2,__:[13]},1032,["onClick"])]))),128)),a.createVNode(i,{variant:"outline",onClick:F},{default:a.withCtx(()=>n[14]||(n[14]=[a.createTextVNode("+ Add Filter")])),_:1,__:[14]})])]),a.createElementVNode("div",null,[a.createVNode(u,{class:"block text-sm font-medium text-muted-foreground mb-2"},{default:a.withCtx(()=>n[15]||(n[15]=[a.createTextVNode("Sort")])),_:1,__:[15]}),a.createElementVNode("div",rje,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(b.value,(e,t)=>(a.openBlock(),a.createElementBlock("div",{key:t,class:"flex items-center gap-2"},[a.createVNode(d,{modelValue:e.field,"onUpdate:modelValue":t=>e.field=t,placeholder:"Sort By",class:"w-32"},null,8,["modelValue","onUpdate:modelValue"]),a.createVNode(q,{modelValue:e.direction,"onUpdate:modelValue":t=>e.direction=t},{default:a.withCtx(()=>[a.createVNode(h,{class:"w-[180px]"},{default:a.withCtx(()=>[a.createVNode(c,{placeholder:"Sort by"})]),_:1}),a.createVNode(R,null,{default:a.withCtx(()=>[a.createVNode(j,null,{default:a.withCtx(()=>[a.createVNode(f,{value:"asc"},{default:a.withCtx(()=>n[16]||(n[16]=[a.createTextVNode("ASC")])),_:1,__:[16]}),a.createVNode(f,{value:"desc"},{default:a.withCtx(()=>n[17]||(n[17]=[a.createTextVNode("DESC")])),_:1,__:[17]})]),_:1})]),_:1})]),_:2},1032,["modelValue","onUpdate:modelValue"]),a.createVNode(i,{variant:"ghost",onClick:e=>function(e){b.value.splice(e,1)}(t),title:"Remove sort"},{default:a.withCtx(()=>n[18]||(n[18]=[a.createTextVNode("✕")])),_:2,__:[18]},1032,["onClick"])]))),128)),a.createVNode(i,{variant:"outline",onClick:v},{default:a.withCtx(()=>n[19]||(n[19]=[a.createTextVNode("+ Add Sort")])),_:1,__:[19]})])]),a.createVNode(Z,{modelValue:k.value,"onUpdate:modelValue":n[8]||(n[8]=e=>k.value=e)},{default:a.withCtx(()=>[a.createElementVNode("div",sje,[n[21]||(n[21]=a.createElementVNode("h4",{class:"text-sm font-semibold"}," Advanced Options ",-1)),a.createVNode(z,{"as-child":""},{default:a.withCtx(()=>[a.createVNode(i,{variant:"ghost",size:"sm",class:"w-9 p-0"},{default:a.withCtx(()=>[a.createVNode(a.unref(Ks),{class:"size-4"}),n[20]||(n[20]=a.createElementVNode("span",{class:"sr-only"},"Toggle",-1))]),_:1,__:[20]})]),_:1})]),a.createVNode(L,null,{default:a.withCtx(()=>{var e;return[a.createElementVNode("div",lje,[a.createElementVNode("div",null,[a.createVNode(u,{for:"limit"},{default:a.withCtx(()=>n[22]||(n[22]=[a.createTextVNode("Limit")])),_:1,__:[22]}),a.createVNode(d,{type:"number",modelValue:w.value,"onUpdate:modelValue":n[2]||(n[2]=e=>w.value=e),placeholder:"Limit"},null,8,["modelValue"])]),a.createElementVNode("div",null,[a.createVNode(u,{for:"offset"},{default:a.withCtx(()=>n[23]||(n[23]=[a.createTextVNode("Offset")])),_:1,__:[23]}),a.createVNode(d,{type:"number",modelValue:x.value,"onUpdate:modelValue":n[3]||(n[3]=e=>x.value=e),placeholder:"Offset"},null,8,["modelValue"])]),a.createElementVNode("div",null,[a.createVNode(u,{for:"startAt"},{default:a.withCtx(()=>n[24]||(n[24]=[a.createTextVNode("StartAt")])),_:1,__:[24]}),a.createVNode(d,{modelValue:O.value,"onUpdate:modelValue":n[4]||(n[4]=e=>O.value=e),placeholder:"StartAt (optional)"},null,8,["modelValue"])]),a.createElementVNode("div",null,[a.createVNode(u,{for:"endAt"},{default:a.withCtx(()=>n[25]||(n[25]=[a.createTextVNode("EndAt")])),_:1,__:[25]}),a.createVNode(d,{modelValue:E.value,"onUpdate:modelValue":n[5]||(n[5]=e=>E.value=e),placeholder:"EndAt (optional)"},null,8,["modelValue"])]),"FIREBASE"!==(null==(e=A.value)?void 0:e.type)?(a.openBlock(),a.createElementBlock("div",gje,[a.createVNode(u,{for:"groupBy"},{default:a.withCtx(()=>n[26]||(n[26]=[a.createTextVNode("Group By")])),_:1,__:[26]}),a.createVNode(d,{modelValue:D.value,"onUpdate:modelValue":n[6]||(n[6]=e=>D.value=e),placeholder:"Group By"},null,8,["modelValue"])])):a.createCommentVNode("",!0),a.createElementVNode("div",uje,[a.createVNode(Q,{modelValue:M.value,"onUpdate:modelValue":n[7]||(n[7]=e=>M.value=e),id:"distinct"},null,8,["modelValue"]),a.createVNode(u,{for:"distinct"},{default:a.withCtx(()=>n[27]||(n[27]=[a.createTextVNode("DISTINCT")])),_:1,__:[27]})])])]}),_:1})]),_:1},8,["modelValue"]),a.createElementVNode("div",dje,[a.createElementVNode("div",cje,[a.createVNode(i,{onClick:T},{default:a.withCtx(()=>n[28]||(n[28]=[a.createTextVNode("Preview Query")])),_:1,__:[28]}),a.createVNode(i,{variant:"secondary",onClick:N},{default:a.withCtx(()=>n[29]||(n[29]=[a.createTextVNode("Run Query")])),_:1,__:[29]})]),S.value?(a.openBlock(),a.createElementBlock("div",hje,a.toDisplayString(S.value),1)):a.createCommentVNode("",!0),B.value?(a.openBlock(),a.createElementBlock("div",fje,a.toDisplayString(B.value),1)):a.createCommentVNode("",!0),C.value?(a.openBlock(),a.createElementBlock("div",pje,[a.createElementVNode("p",Aje,a.toDisplayString(C.value),1),m.value?(a.openBlock(),a.createElementBlock("a",{key:0,href:m.value,target:"_blank"},[a.createVNode(i,{size:"sm"},{default:a.withCtx(()=>[n[30]||(n[30]=a.createTextVNode("Create index in Firebase Console ")),a.createVNode(a.unref($d),{class:"size-3.5 ml-0.5"})]),_:1,__:[30]})],8,Cje)):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0)])]),a.createVNode(H,null,{default:a.withCtx(()=>[a.createVNode(i,{variant:"ghost",onClick:P},{default:a.withCtx(()=>n[31]||(n[31]=[a.createTextVNode("Close")])),_:1,__:[31]}),a.createVNode(i,{onClick:V},{default:a.withCtx(()=>n[32]||(n[32]=[a.createTextVNode("Save Query")])),_:1,__:[32]})]),_:1})]),_:1})]),_:3},8,["open"])}}}),Ije=Object.freeze(Object.defineProperty({__proto__:null,QueryBuilderDialog:mje},Symbol.toStringTag,{value:"Module"})),yje=a.defineComponent({__name:"RadioGroup",props:{modelValue:{},defaultValue:{},disabled:{type:Boolean},orientation:{},dir:{},loop:{type:Boolean},asChild:{type:Boolean},as:{},name:{},required:{type:Boolean},class:{}},emits:["update:modelValue"],setup(e,{emit:t}){const i=e,o=t,r=a.computed(()=>{const{class:e,...t}=i;return t}),s=n.useForwardPropsEmits(r,o);return(e,t)=>(a.openBlock(),a.createBlock(a.unref(n.RadioGroupRoot),a.mergeProps({"data-slot":"radio-group",class:a.unref(Dt)("flex gap-3","vertical"===i.orientation?"flex-col":"flex-row",i.class)},a.unref(s)),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},16,["class"]))}}),_je=a.defineComponent({__name:"RadioGroupItem",props:{id:{},value:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{},name:{},required:{type:Boolean},class:{}},setup(e){const t=e,i=a.computed(()=>{const{class:e,...a}=t;return a}),o=n.useForwardProps(i);return(e,i)=>(a.openBlock(),a.createBlock(a.unref(n.RadioGroupItem),a.mergeProps({"data-slot":"radio-group-item"},a.unref(o),{class:a.unref(Dt)("border-input text-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",t.class)}),{default:a.withCtx(()=>[a.createVNode(a.unref(n.RadioGroupIndicator),{"data-slot":"radio-group-indicator",class:"relative flex items-center justify-center"},{default:a.withCtx(()=>[a.createVNode(a.unref(Hl),{class:"fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2"})]),_:1})]),_:1},16,["class"]))}}),Fje=Object.freeze(Object.defineProperty({__proto__:null,RadioGroup:yje,RadioGroupItem:_je},Symbol.toStringTag,{value:"Module"})),bje={class:"flex flex-col gap-y-4 mt-4 sm:flex-row sm:gap-x-4 sm:gap-y-0"},vje=a.defineComponent({__name:"RangeCalendar",props:{defaultPlaceholder:{},defaultValue:{},modelValue:{},placeholder:{},allowNonContiguousRanges:{type:Boolean},pagedNavigation:{type:Boolean},preventDeselect:{type:Boolean},maximumDays:{},weekStartsOn:{},weekdayFormat:{},calendarLabel:{},fixedWeeks:{type:Boolean},maxValue:{},minValue:{},locale:{},numberOfMonths:{},disabled:{type:Boolean},readonly:{type:Boolean},initialFocus:{type:Boolean},isDateDisabled:{type:Function},isDateUnavailable:{type:Function},isDateHighlightable:{type:Function},dir:{},nextPage:{type:Function},prevPage:{type:Function},disableDaysOutsideCurrentView:{type:Boolean},fixedDate:{},asChild:{type:Boolean},as:{},class:{}},emits:["update:modelValue","update:placeholder","update:startValue"],setup(e,{emit:t}){const i=e,o=t,r=xZ(i,"class"),s=n.useForwardPropsEmits(r,o);return(e,t)=>(a.openBlock(),a.createBlock(a.unref(n.RangeCalendarRoot),a.mergeProps({class:a.unref(Dt)("p-3",i.class)},a.unref(s)),{default:a.withCtx(({grid:e,weekDays:t})=>[a.createVNode(a.unref(Sje),null,{default:a.withCtx(()=>[a.createVNode(a.unref(Tje)),a.createVNode(a.unref(Bje)),a.createVNode(a.unref(jje))]),_:1}),a.createElementVNode("div",bje,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(e,e=>(a.openBlock(),a.createBlock(a.unref(xje),{key:e.value.toString()},{default:a.withCtx(()=>[a.createVNode(a.unref(Eje),null,{default:a.withCtx(()=>[a.createVNode(a.unref(Dje),null,{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(t,e=>(a.openBlock(),a.createBlock(a.unref(Mje),{key:e},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(e),1)]),_:2},1024))),128))]),_:2},1024)]),_:2},1024),a.createVNode(a.unref(Oje),null,{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(e.rows,(t,n)=>(a.openBlock(),a.createBlock(a.unref(Dje),{key:`weekDate-${n}`,class:"mt-2 w-full"},{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(t,t=>(a.openBlock(),a.createBlock(a.unref(kje),{key:t.toString(),date:t},{default:a.withCtx(()=>[a.createVNode(a.unref(wje),{day:t,month:e.value},null,8,["day","month"])]),_:2},1032,["date"]))),128))]),_:2},1024))),128))]),_:2},1024)]),_:2},1024))),128))])]),_:1},16,["class"]))}}),kje=a.defineComponent({__name:"RangeCalendarCell",props:{date:{},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,i=xZ(t,"class"),o=n.useForwardProps(i);return(e,i)=>(a.openBlock(),a.createBlock(a.unref(n.RangeCalendarCell),a.mergeProps({class:a.unref(Dt)("relative h-9 w-9 p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([data-selected])]:bg-accent first:[&:has([data-selected])]:rounded-l-md last:[&:has([data-selected])]:rounded-r-md [&:has([data-selected][data-outside-view])]:bg-accent/50 [&:has([data-selected][data-selection-end])]:rounded-r-md [&:has([data-selected][data-selection-start])]:rounded-l-md",t.class)},a.unref(o)),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},16,["class"]))}}),wje=a.defineComponent({__name:"RangeCalendarCellTrigger",props:{day:{},month:{},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,i=xZ(t,"class"),o=n.useForwardProps(i);return(e,i)=>(a.openBlock(),a.createBlock(a.unref(n.RangeCalendarCellTrigger),a.mergeProps({class:a.unref(Dt)(a.unref(DM)({variant:"ghost"}),"h-9 w-9 p-0 font-normal data-[selected]:opacity-100","[&[data-today]:not([data-selected])]:bg-accent [&[data-today]:not([data-selected])]:text-accent-foreground","data-[selection-start]:bg-primary data-[selection-start]:text-primary-foreground data-[selection-start]:hover:bg-primary data-[selection-start]:hover:text-primary-foreground data-[selection-start]:focus:bg-primary data-[selection-start]:focus:text-primary-foreground","data-[selection-end]:bg-primary data-[selection-end]:text-primary-foreground data-[selection-end]:hover:bg-primary data-[selection-end]:hover:text-primary-foreground data-[selection-end]:focus:bg-primary data-[selection-end]:focus:text-primary-foreground","data-[outside-view]:text-muted-foreground data-[outside-view]:opacity-50 [&[data-outside-view][data-selected]]:bg-accent/50 [&[data-outside-view][data-selected]]:text-muted-foreground [&[data-outside-view][data-selected]]:opacity-30","data-[disabled]:text-muted-foreground data-[disabled]:opacity-50","data-[unavailable]:text-destructive-foreground data-[unavailable]:line-through",t.class)},a.unref(o)),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},16,["class"]))}}),xje=a.defineComponent({__name:"RangeCalendarGrid",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,i=xZ(t,"class"),o=n.useForwardProps(i);return(e,i)=>(a.openBlock(),a.createBlock(a.unref(n.RangeCalendarGrid),a.mergeProps({class:a.unref(Dt)("w-full border-collapse space-y-1",t.class)},a.unref(o)),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},16,["class"]))}}),Oje=a.defineComponent({__name:"RangeCalendarGridBody",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e;return(e,i)=>(a.openBlock(),a.createBlock(a.unref(n.RangeCalendarGridBody),a.normalizeProps(a.guardReactiveProps(t)),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},16))}}),Eje=a.defineComponent({__name:"RangeCalendarGridHead",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e;return(e,i)=>(a.openBlock(),a.createBlock(a.unref(n.RangeCalendarGridHead),a.normalizeProps(a.guardReactiveProps(t)),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},16))}}),Dje=a.defineComponent({__name:"RangeCalendarGridRow",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,i=xZ(t,"class"),o=n.useForwardProps(i);return(e,i)=>(a.openBlock(),a.createBlock(a.unref(n.RangeCalendarGridRow),a.mergeProps({class:a.unref(Dt)("flex mt-2 w-full",t.class)},a.unref(o)),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},16,["class"]))}}),Mje=a.defineComponent({__name:"RangeCalendarHeadCell",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,i=xZ(t,"class"),o=n.useForwardProps(i);return(e,i)=>(a.openBlock(),a.createBlock(a.unref(n.RangeCalendarHeadCell),a.mergeProps({class:a.unref(Dt)("w-9 rounded-md text-[0.8rem] font-normal text-muted-foreground",t.class)},a.unref(o)),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},16,["class"]))}}),Sje=a.defineComponent({__name:"RangeCalendarHeader",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,i=xZ(t,"class"),o=n.useForwardProps(i);return(e,i)=>(a.openBlock(),a.createBlock(a.unref(n.RangeCalendarHeader),a.mergeProps({class:a.unref(Dt)("relative flex w-full items-center justify-between pt-1",t.class)},a.unref(o)),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},16,["class"]))}}),Bje=a.defineComponent({__name:"RangeCalendarHeading",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,i=xZ(t,"class"),o=n.useForwardProps(i);return(e,i)=>(a.openBlock(),a.createBlock(a.unref(n.RangeCalendarHeading),a.mergeProps({class:a.unref(Dt)("text-sm font-medium",t.class)},a.unref(o)),{default:a.withCtx(({headingValue:t})=>[a.renderSlot(e.$slots,"default",{headingValue:t},()=>[a.createTextVNode(a.toDisplayString(t),1)])]),_:3},16,["class"]))}}),jje=a.defineComponent({__name:"RangeCalendarNextButton",props:{nextPage:{type:Function},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,i=xZ(t,"class"),o=n.useForwardProps(i);return(e,i)=>(a.openBlock(),a.createBlock(a.unref(n.RangeCalendarNext),a.mergeProps({class:a.unref(Dt)(a.unref(DM)({variant:"outline"}),"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100",t.class)},a.unref(o)),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default",{},()=>[a.createVNode(a.unref(Qs),{class:"size-4"})])]),_:3},16,["class"]))}}),Tje=a.defineComponent({__name:"RangeCalendarPrevButton",props:{prevPage:{type:Function},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,i=xZ(t,"class"),o=n.useForwardProps(i);return(e,i)=>(a.openBlock(),a.createBlock(a.unref(n.RangeCalendarPrev),a.mergeProps({class:a.unref(Dt)(a.unref(DM)({variant:"outline"}),"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100",t.class)},a.unref(o)),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default",{},()=>[a.createVNode(a.unref(zs),{class:"size-4"})])]),_:3},16,["class"]))}}),Nje=Object.freeze(Object.defineProperty({__proto__:null,RangeCalendar:vje,RangeCalendarCell:kje,RangeCalendarCellTrigger:wje,RangeCalendarGrid:xje,RangeCalendarGridBody:Oje,RangeCalendarGridHead:Eje,RangeCalendarGridRow:Dje,RangeCalendarHeadCell:Mje,RangeCalendarHeader:Sje,RangeCalendarHeading:Bje,RangeCalendarNextButton:jje,RangeCalendarPrevButton:Tje},Symbol.toStringTag,{value:"Module"})),Pje={key:0,class:"bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border"},Vje=a.defineComponent({__name:"ResizableHandle",props:{id:{},hitAreaMargins:{},tabindex:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{},class:{},withHandle:{type:Boolean}},emits:["dragging"],setup(e,{emit:t}){const i=e,o=t,r=xZ(i,"class","withHandle"),s=n.useForwardPropsEmits(r,o);return(e,t)=>(a.openBlock(),a.createBlock(a.unref(n.SplitterResizeHandle),a.mergeProps({"data-slot":"resizable-handle"},a.unref(s),{class:a.unref(Dt)("bg-border focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden data-[orientation=vertical]:h-px data-[orientation=vertical]:w-full data-[orientation=vertical]:after:left-0 data-[orientation=vertical]:after:h-1 data-[orientation=vertical]:after:w-full data-[orientation=vertical]:after:-translate-y-1/2 data-[orientation=vertical]:after:translate-x-0 [&[data-orientation=vertical]>div]:rotate-90",i.class)}),{default:a.withCtx(()=>[i.withHandle?(a.openBlock(),a.createElementBlock("div",Pje,[a.createVNode(a.unref(_p),{class:"size-2.5"})])):a.createCommentVNode("",!0)]),_:1},16,["class"]))}}),Rje=a.defineComponent({__name:"ResizablePanel",props:{collapsedSize:{},collapsible:{type:Boolean},defaultSize:{},id:{},maxSize:{},minSize:{},order:{},asChild:{type:Boolean},as:{}},emits:["collapse","expand","resize"],setup(e,{emit:t}){const i=e,o=t,r=n.useForwardPropsEmits(i,o);return(e,t)=>(a.openBlock(),a.createBlock(a.unref(n.SplitterPanel),a.mergeProps({"data-slot":"resizable-panel"},a.unref(r)),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},16))}}),qje=a.defineComponent({__name:"ResizablePanelGroup",props:{id:{},autoSaveId:{},direction:{},keyboardResizeBy:{},storage:{},asChild:{type:Boolean},as:{},class:{}},emits:["layout"],setup(e,{emit:t}){const i=e,o=t,r=a.computed(()=>{const{class:e,...t}=i;return t}),s=n.useForwardPropsEmits(r,o);return(e,t)=>(a.openBlock(),a.createBlock(a.unref(n.SplitterGroup),a.mergeProps({"data-slot":"resizable-panel-group"},a.unref(s),{class:a.unref(Dt)("flex h-full w-full data-[orientation=vertical]:flex-col",i.class)}),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},16,["class"]))}}),zje=Object.freeze(Object.defineProperty({__proto__:null,ResizableHandle:Vje,ResizablePanel:Rje,ResizablePanelGroup:qje},Symbol.toStringTag,{value:"Module"})),Qje={key:0,class:"text-xs p-2 text-muted-foreground"},Lje=a.defineComponent({__name:"ResourceSelect",props:{accept:{type:[String,Array],default:"*"},modelValue:{type:String,required:!0}},emits:["update:modelValue"],async setup(e,{emit:t}){let n,i;const r=o.useRoute(),{getProjectIntegrations:s}=TG(),l=e,g=zZ(l,"modelValue",t,{passive:!0}),u=r.params.slug,d=([n,i]=a.withAsyncContext(()=>s(u)),n=await n,i(),n),c="*"===l.accept?d:d.filter(e=>l.accept.includes(e.type));return(e,t)=>{const n=a.resolveComponent("IntegrationIcon"),i=a.resolveComponent("SelectValue"),o=a.resolveComponent("SelectTrigger"),r=a.resolveComponent("SelectItem"),s=a.resolveComponent("SelectGroup"),l=a.resolveComponent("SelectContent"),u=a.resolveComponent("Select");return a.openBlock(),a.createBlock(u,{modelValue:a.unref(g),"onUpdate:modelValue":t[0]||(t[0]=e=>a.isRef(g)?g.value=e:null)},{default:a.withCtx(()=>[a.createVNode(o,null,{default:a.withCtx(()=>{var e,t;return[a.unref(g)?(a.openBlock(),a.createBlock(n,{key:0,type:null==(t=null==(e=a.unref(d))?void 0:e.find(e=>e.id===a.unref(g)))?void 0:t.type,class:"size-6"},null,8,["type"])):a.createCommentVNode("",!0),a.createVNode(i,{placeholder:"Select a resource"})]}),_:1}),a.createVNode(l,null,{default:a.withCtx(()=>[a.createVNode(s,null,{default:a.withCtx(()=>[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(a.unref(c),e=>(a.openBlock(),a.createBlock(r,{key:e.id,value:e.id},{default:a.withCtx(()=>[a.createVNode(n,{type:e.type,class:"size-6"},null,8,["type"]),a.createTextVNode(" "+a.toDisplayString(e.name),1)]),_:2},1032,["value"]))),128)),0===a.unref(c).length?(a.openBlock(),a.createElementBlock("p",Qje," No integrations found. ")):a.createCommentVNode("",!0)]),_:1})]),_:1})]),_:1},8,["modelValue"])}}}),Zje=Object.freeze(Object.defineProperty({__proto__:null,ResourceSelect:Lje},Symbol.toStringTag,{value:"Module"})),Hje={class:"relative z-10 flex items-center gap-2"},Gje={class:"pointer-events-none absolute inset-0"},Yje=v(a.defineComponent({__name:"RippleButton",props:{class:{},rippleColor:{default:"#484848"},duration:{default:600}},emits:["click"],setup(e,{emit:t}){const n=e,i=t,o=a.ref(null),r=a.ref([]);function s(e){!function(e){const t=o.value;if(!t)return;const a=t.getBoundingClientRect(),n=Math.max(a.width,a.height),i=e.clientX-a.left-n/2,s=e.clientY-a.top-n/2,l={x:i,y:s,size:n,key:Date.now()};r.value.push(l)}(e),i("click",e)}return a.watchEffect(()=>{if(r.value.length>0){const e=r.value[r.value.length-1];setTimeout(()=>{r.value=r.value.filter(t=>t.key!==e.key)},n.duration)}}),(e,t)=>(a.openBlock(),a.createElementBlock("button",{ref_key:"rippleButtonRef",ref:o,class:a.normalizeClass(a.unref(Dt)("relative overflow-hidden inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground h-9 px-4 py-2",e.$props.class)),style:a.normalizeStyle({"--duration":e.$props.duration+"ms"}),onClick:s},[a.createElementVNode("div",Hje,[a.renderSlot(e.$slots,"default",{},void 0,!0)]),a.createElementVNode("span",Gje,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(r.value,t=>(a.openBlock(),a.createElementBlock("span",{key:t.key,class:"ripple-animation absolute rounded-full bg-background opacity-30",style:a.normalizeStyle({width:t.size+"px",height:t.size+"px",top:t.y+"px",left:t.x+"px",backgroundColor:e.$props.rippleColor,transform:"scale(0)",animationDuration:e.$props.duration+"ms"})},null,4))),128))])],6))}}),[["__scopeId","data-v-8667d741"]]),Uje=Object.freeze(Object.defineProperty({__proto__:null,RippleButton:Yje},Symbol.toStringTag,{value:"Module"})),Wje=a.defineComponent({__name:"Sandbox",props:{modelValue:{type:String,required:!0},variables:{type:Array,default:()=>[]},placeholder:{type:String,default:""}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,i=t,o=a.computed({get:()=>n.modelValue,set:e=>i("update:modelValue",e)});return(t,n)=>{const i=a.resolveComponent("CodeEditor");return a.openBlock(),a.createBlock(i,{modelValue:o.value,"onUpdate:modelValue":n[0]||(n[0]=e=>o.value=e),variables:e.variables,language:"",placeholder:e.placeholder},null,8,["modelValue","variables","placeholder"])}}}),Xje=Object.freeze(Object.defineProperty({__proto__:null,Sandbox:Wje},Symbol.toStringTag,{value:"Module"})),Kje=a.defineComponent({__name:"ScrollBar",props:{orientation:{default:"vertical"},forceMount:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,i=a.computed(()=>{const{class:e,...a}=t;return a});return(e,o)=>(a.openBlock(),a.createBlock(a.unref(n.ScrollAreaScrollbar),a.mergeProps({"data-slot":"scroll-area-scrollbar"},i.value,{class:a.unref(Dt)("flex touch-none p-px transition-colors select-none","vertical"===e.orientation&&"h-full w-2.5 border-l border-l-transparent","horizontal"===e.orientation&&"h-2.5 flex-col border-t border-t-transparent",t.class)}),{default:a.withCtx(()=>[a.createVNode(a.unref(n.ScrollAreaThumb),{"data-slot":"scroll-area-thumb",class:"bg-border relative flex-1 rounded-full"})]),_:1},16,["class"]))}}),Jje=a.defineComponent({__name:"ScrollArea",props:{type:{},dir:{},scrollHideDelay:{},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,i=a.computed(()=>{const{class:e,...a}=t;return a});return(e,o)=>(a.openBlock(),a.createBlock(a.unref(n.ScrollAreaRoot),a.mergeProps({"data-slot":"scroll-area"},i.value,{class:a.unref(Dt)("relative",t.class)}),{default:a.withCtx(()=>[a.createVNode(a.unref(n.ScrollAreaViewport),{"data-slot":"scroll-area-viewport",class:"focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1"},{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3}),a.createVNode(Kje),a.createVNode(a.unref(n.ScrollAreaCorner))]),_:3},16,["class"]))}}),$je=Object.freeze(Object.defineProperty({__proto__:null,ScrollArea:Jje,ScrollBar:Kje},Symbol.toStringTag,{value:"Module"})),eTe=["aria-label"],tTe=a.defineComponent({__name:"SegmentedControl",props:{modelValue:{type:[String,Number],required:!0},ariaLabel:{type:String,default:""},class:{type:String,default:""},direction:{type:String,default:"horizontal"},allowEmpty:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,i=a.computed(()=>Dt(n.class)),o=t,r=a.ref(null),s=a.ref(null),l=a.ref(0);a.provide("segmentedControlValue",a.toRef(n,"modelValue")),a.provide("segmentedControlRegister",function(e,t,a){g[a]=t,u[a]=e,t===n.modelValue&&(l.value=a,d(a))}),a.provide("segmentedControlContainer",s);a.provide("updateSegmentedControl",e=>{n.allowEmpty&&e===n.modelValue?o("update:modelValue",""):o("update:modelValue",e)});const g=[],u=[];function d(e){a.nextTick(()=>{if(!r.value||!u[e])return;const t=u[e],a=r.value;a.style.width=`${t.offsetWidth}px`,a.style.transform=`translateX(${t.offsetLeft}px) translateY(${t.offsetTop}px)`})}return a.watch(()=>n.modelValue,e=>{const t=g.findIndex(t=>t===e);-1!==t&&(l.value=t,d(t))},{immediate:!0}),a.onMounted(()=>{a.nextTick(()=>{d(l.value)})}),(t,n)=>(a.openBlock(),a.createElementBlock("div",{ref_key:"containerRef",ref:s,role:"tablist","aria-label":e.ariaLabel,class:a.normalizeClass(["flex relative rounded-md p-1 bg-muted",`${a.unref(Dt)("vertical"===e.direction?"flex-col":"flex-row",i.value)}`])},[a.createElementVNode("div",{ref_key:"activeIndicator",ref:r,class:a.normalizeClass(["absolute left-0 bg-background rounded-md shadow-xs transition-all duration-200 ease-in-out",{"top-0":"horizontal"===e.direction,"-top-0.5":"vertical"===e.direction,"opacity-0":""===e.modelValue}]),style:a.normalizeStyle({height:"vertical"===e.direction?"32px":"calc(100% - 0.5rem)"})},null,6),a.renderSlot(t.$slots,"default")],10,eTe))}}),aTe=["aria-selected","disabled"],nTe=a.defineComponent({__name:"SegmentedControlButton",props:{value:{},disabled:{type:Boolean},class:{}},setup(e){const t=e,n=a.inject("segmentedControlValue"),i=a.inject("updateSegmentedControl",()=>{}),o=a.inject("segmentedControlRegister",()=>{}),r=a.ref(null),s=a.computed(()=>(null==n?void 0:n.value)===t.value),l=()=>{t.disabled||i(t.value)};return a.onMounted(()=>{if(!r.value)return;const e=r.value.parentElement;if(!e)return;const a=Array.from(e.querySelectorAll('[role="tab"]')).indexOf(r.value);-1!==a&&o(r.value,t.value,a)}),(e,n)=>(a.openBlock(),a.createElementBlock("button",{ref_key:"buttonRef",ref:r,type:"button",role:"tab","aria-selected":s.value,disabled:e.disabled,class:a.normalizeClass(["relative flex-1 px-3 py-1.5 h-8 text-sm font-medium transition-all duration-200 focus:outline-none z-10 focus-visible:ring-ring/50 focus-visible:ring-[3px] disabled:opacity-50 disabled:pointer-events-none",t.class,s.value?"text-foreground dark:text-foreground":"text-muted-foreground hover:text-foreground dark:hover:text-foreground",e.disabled?"cursor-not-allowed":"cursor-pointer"]),onClick:l},[a.renderSlot(e.$slots,"default")],10,aTe))}}),iTe=Object.freeze(Object.defineProperty({__proto__:null,SegmentedControl:tTe,SegmentedControlButton:nTe},Symbol.toStringTag,{value:"Module"})),oTe=a.defineComponent({__name:"Select",props:{open:{type:Boolean},defaultOpen:{type:Boolean},defaultValue:{},modelValue:{},by:{type:[String,Function]},dir:{},multiple:{type:Boolean},autocomplete:{},disabled:{type:Boolean},name:{},required:{type:Boolean}},emits:["update:modelValue","update:open"],setup(e,{emit:t}){const i=e,o=t,r=n.useForwardPropsEmits(i,o);return(e,t)=>(a.openBlock(),a.createBlock(a.unref(n.SelectRoot),a.mergeProps({"data-slot":"select"},a.unref(r)),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},16))}}),rTe=a.defineComponent({inheritAttrs:!1,__name:"SelectContent",props:{forceMount:{type:Boolean},position:{default:"popper"},bodyLock:{type:Boolean},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},disableUpdateOnLayoutShift:{type:Boolean},prioritizePosition:{type:Boolean},reference:{},asChild:{type:Boolean},as:{},class:{}},emits:["closeAutoFocus","escapeKeyDown","pointerDownOutside"],setup(e,{emit:t}){const i=e,o=t,r=a.computed(()=>{const{class:e,...t}=i;return t}),s=n.useForwardPropsEmits(r,o);return(e,t)=>(a.openBlock(),a.createBlock(a.unref(n.SelectPortal),null,{default:a.withCtx(()=>[a.createVNode(a.unref(n.SelectContent),a.mergeProps({"data-slot":"select-content"},{...a.unref(s),...e.$attrs},{class:a.unref(Dt)("bg-popover text-popover-foreground 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 relative z-50 max-h-(--reka-select-content-available-height) min-w-[8rem] overflow-x-hidden overflow-y-auto rounded-md border border-popover-border shadow-md","popper"===e.position&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",i.class)}),{default:a.withCtx(()=>[a.createVNode(a.unref(hTe)),a.createVNode(a.unref(n.SelectViewport),{class:a.normalizeClass(a.unref(Dt)("p-1","popper"===e.position&&"h-[var(--reka-select-trigger-height)] w-full min-w-[var(--reka-select-trigger-width)] scroll-my-1"))},{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},8,["class"]),a.createVNode(a.unref(cTe))]),_:3},16,["class"])]),_:3}))}}),sTe=a.defineComponent({__name:"SelectGroup",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e;return(e,i)=>(a.openBlock(),a.createBlock(a.unref(n.SelectGroup),a.mergeProps({"data-slot":"select-group"},t),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},16))}}),lTe={class:"absolute right-2 flex size-3.5 items-center justify-center"},gTe=a.defineComponent({__name:"SelectItem",props:{value:{},disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,i=a.computed(()=>{const{class:e,...a}=t;return a}),o=n.useForwardProps(i);return(e,i)=>(a.openBlock(),a.createBlock(a.unref(n.SelectItem),a.mergeProps({"data-slot":"select-item"},a.unref(o),{class:a.unref(Dt)("focus:bg-accent text-accent-foreground/60 focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",t.class)}),{default:a.withCtx(()=>[a.createElementVNode("span",lTe,[a.createVNode(a.unref(n.SelectItemIndicator),null,{default:a.withCtx(()=>[a.createVNode(a.unref(Ts),{class:"size-4"})]),_:1})]),a.createVNode(a.unref(n.SelectItemText),null,{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3})]),_:3},16,["class"]))}}),uTe=a.defineComponent({__name:"SelectItemText",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e;return(e,i)=>(a.openBlock(),a.createBlock(a.unref(n.SelectItemText),a.mergeProps({"data-slot":"select-item-text"},t),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},16))}}),dTe=a.defineComponent({__name:"SelectLabel",props:{for:{},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e;return(e,i)=>(a.openBlock(),a.createBlock(a.unref(n.SelectLabel),{"data-slot":"select-label",class:a.normalizeClass(a.unref(Dt)("px-2 py-1.5 text-sm font-medium",t.class))},{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},8,["class"]))}}),cTe=a.defineComponent({__name:"SelectScrollDownButton",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,i=a.computed(()=>{const{class:e,...a}=t;return a}),o=n.useForwardProps(i);return(e,i)=>(a.openBlock(),a.createBlock(a.unref(n.SelectScrollDownButton),a.mergeProps({"data-slot":"select-scroll-down-button"},a.unref(o),{class:a.unref(Dt)("flex cursor-default items-center justify-center py-1",t.class)}),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default",{},()=>[a.createVNode(a.unref(Vs),{class:"size-4"})])]),_:3},16,["class"]))}}),hTe=a.defineComponent({__name:"SelectScrollUpButton",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,i=a.computed(()=>{const{class:e,...a}=t;return a}),o=n.useForwardProps(i);return(e,i)=>(a.openBlock(),a.createBlock(a.unref(n.SelectScrollUpButton),a.mergeProps({"data-slot":"select-scroll-up-button"},a.unref(o),{class:a.unref(Dt)("flex cursor-default items-center justify-center py-1",t.class)}),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default",{},()=>[a.createVNode(a.unref(Ls),{class:"size-4"})])]),_:3},16,["class"]))}}),fTe=a.defineComponent({__name:"SelectSeparator",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,i=a.computed(()=>{const{class:e,...a}=t;return a});return(e,o)=>(a.openBlock(),a.createBlock(a.unref(n.SelectSeparator),a.mergeProps({"data-slot":"select-separator"},i.value,{class:a.unref(Dt)("bg-popover-border pointer-events-none -mx-1 my-1 h-px",t.class)}),null,16,["class"]))}}),pTe=a.defineComponent({__name:"SelectTrigger",props:{disabled:{type:Boolean},reference:{},asChild:{type:Boolean},as:{},class:{},size:{default:"default"}},setup(e){const t=e,i=xZ(t,"class","size"),o=n.useForwardProps(i);return(e,i)=>(a.openBlock(),a.createBlock(a.unref(n.SelectTrigger),a.mergeProps({"data-slot":"select-trigger","data-size":e.size},a.unref(o),{class:a.unref(Dt)("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-background px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t.class)}),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default"),a.createVNode(a.unref(n.SelectIcon),{"as-child":""},{default:a.withCtx(()=>[a.createVNode(a.unref(Vs),{class:"size-4 opacity-50"})]),_:1})]),_:3},16,["data-size","class"]))}}),ATe=a.defineComponent({__name:"SelectValue",props:{placeholder:{},asChild:{type:Boolean},as:{}},setup(e){const t=e;return(e,i)=>(a.openBlock(),a.createBlock(a.unref(n.SelectValue),a.mergeProps({"data-slot":"select-value"},t,{class:"truncate !block"}),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},16))}}),CTe=Object.freeze(Object.defineProperty({__proto__:null,Select:oTe,SelectContent:rTe,SelectGroup:sTe,SelectItem:gTe,SelectItemText:uTe,SelectLabel:dTe,SelectScrollDownButton:cTe,SelectScrollUpButton:hTe,SelectSeparator:fTe,SelectTrigger:pTe,SelectValue:ATe},Symbol.toStringTag,{value:"Module"})),mTe=a.defineComponent({__name:"Separator",props:{orientation:{default:"horizontal"},decorative:{type:Boolean,default:!0},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,i=xZ(t,"class");return(e,o)=>(a.openBlock(),a.createBlock(a.unref(n.Separator),a.mergeProps({"data-slot":"separator-root"},a.unref(i),{class:a.unref(Dt)("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",t.class)}),null,16,["class"]))}}),ITe=Object.freeze(Object.defineProperty({__proto__:null,Separator:mTe},Symbol.toStringTag,{value:"Module"})),yTe=a.defineComponent({__name:"Sheet",props:{open:{type:Boolean},defaultOpen:{type:Boolean},modal:{type:Boolean}},emits:["update:open"],setup(e,{emit:t}){const i=e,o=t,r=n.useForwardPropsEmits(i,o);return(e,t)=>(a.openBlock(),a.createBlock(a.unref(n.DialogRoot),a.mergeProps({"data-slot":"sheet"},a.unref(r)),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},16))}}),_Te=a.defineComponent({__name:"SheetClose",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e;return(e,i)=>(a.openBlock(),a.createBlock(a.unref(n.DialogClose),a.mergeProps({"data-slot":"sheet-close"},t),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},16))}}),FTe=a.defineComponent({__name:"SheetOverlay",props:{forceMount:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,i=xZ(t,"class");return(e,o)=>(a.openBlock(),a.createBlock(a.unref(n.DialogOverlay),a.mergeProps({"data-slot":"sheet-overlay",class:a.unref(Dt)("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80","grid place-items-center overflow-y-auto",t.class)},a.unref(i)),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},16,["class"]))}}),bTe=a.defineComponent({inheritAttrs:!1,__name:"SheetContent",props:{class:{},overlayClass:{},side:{default:"right"},forceMount:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(e,{emit:t}){const i=e,o=t,r=xZ(i,"class","side"),s=n.useForwardPropsEmits(r,o);return(e,t)=>(a.openBlock(),a.createBlock(a.unref(n.DialogPortal),null,{default:a.withCtx(()=>[a.createVNode(FTe,{class:a.normalizeClass(e.overlayClass)},{default:a.withCtx(()=>[a.createVNode(a.unref(n.DialogContent),a.mergeProps({"data-slot":"sheet-content",class:a.unref(Dt)("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out absolute z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500","right"===e.side&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-fit min-h-full w-3/4 border-l sm:max-w-sm","left"===e.side&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-fit min-h-full w-3/4 border-r sm:max-w-sm","top"===e.side&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b","bottom"===e.side&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",i.class)},{...a.unref(s),...e.$attrs}),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default"),a.createVNode(a.unref(n.DialogClose),{class:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none"},{default:a.withCtx(()=>[a.createVNode(a.unref(fM),{class:"size-4"}),t[0]||(t[0]=a.createElementVNode("span",{class:"sr-only"},"Close",-1))]),_:1,__:[0]})]),_:3},16,["class"])]),_:3},8,["class"])]),_:3}))}}),vTe=a.defineComponent({__name:"SheetDescription",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,i=xZ(t,"class");return(e,o)=>(a.openBlock(),a.createBlock(a.unref(n.DialogDescription),a.mergeProps({"data-slot":"sheet-description",class:a.unref(Dt)("text-muted-foreground text-sm",t.class)},a.unref(i)),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},16,["class"]))}}),kTe=a.defineComponent({__name:"SheetFooter",props:{class:{}},setup(e){const t=e;return(e,n)=>(a.openBlock(),a.createElementBlock("div",{"data-slot":"sheet-footer",class:a.normalizeClass(a.unref(Dt)("mt-auto flex flex-col gap-2 p-4",t.class))},[a.renderSlot(e.$slots,"default")],2))}}),wTe=a.defineComponent({__name:"SheetHeader",props:{class:{}},setup(e){const t=e;return(e,n)=>(a.openBlock(),a.createElementBlock("div",{"data-slot":"sheet-header",class:a.normalizeClass(a.unref(Dt)("flex flex-col gap-1.5 p-4",t.class))},[a.renderSlot(e.$slots,"default")],2))}}),xTe=a.defineComponent({__name:"SheetTitle",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,i=xZ(t,"class");return(e,o)=>(a.openBlock(),a.createBlock(a.unref(n.DialogTitle),a.mergeProps({"data-slot":"sheet-title",class:a.unref(Dt)("text-foreground font-semibold",t.class)},a.unref(i)),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},16,["class"]))}}),OTe=a.defineComponent({__name:"SheetTrigger",props:{asChild:{type:Boolean},as:{}},setup(e){const t=e;return(e,i)=>(a.openBlock(),a.createBlock(a.unref(n.DialogTrigger),a.mergeProps({"data-slot":"sheet-trigger"},t),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},16))}}),ETe=Object.freeze(Object.defineProperty({__proto__:null,Sheet:yTe,SheetClose:_Te,SheetContent:bTe,SheetDescription:vTe,SheetFooter:kTe,SheetHeader:wTe,SheetTitle:xTe,SheetTrigger:OTe},Symbol.toStringTag,{value:"Module"})),[DTe,MTe]=n.createContext("Sidebar"),STe={class:"flex h-full w-full flex-col"},BTe=["data-state","data-collapsible","data-variant","data-side"],jTe={"data-sidebar":"sidebar",class:"bg-sidebar group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm"},TTe=a.defineComponent({inheritAttrs:!1,__name:"Sidebar",props:{side:{default:"left"},variant:{default:"sidebar"},collapsible:{default:"offcanvas"},class:{}},setup(e){const t=e,{isMobile:n,state:i,openMobile:o,setOpenMobile:r}=DTe();return(e,s)=>"none"===e.collapsible?(a.openBlock(),a.createElementBlock("div",a.mergeProps({key:0,"data-slot":"sidebar",class:a.unref(Dt)("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",t.class)},e.$attrs),[a.renderSlot(e.$slots,"default")],16)):a.unref(n)?(a.openBlock(),a.createBlock(a.unref(yTe),a.mergeProps({key:1,open:a.unref(o)},e.$attrs,{"onUpdate:open":a.unref(r)}),{default:a.withCtx(()=>[a.createVNode(a.unref(bTe),{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",side:e.side,class:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:a.normalizeStyle({"--sidebar-width":a.unref("18rem")})},{default:a.withCtx(()=>[a.createVNode(wTe,{class:"sr-only"},{default:a.withCtx(()=>[a.createVNode(xTe,null,{default:a.withCtx(()=>s[0]||(s[0]=[a.createTextVNode("Sidebar")])),_:1,__:[0]}),a.createVNode(vTe,null,{default:a.withCtx(()=>s[1]||(s[1]=[a.createTextVNode("Displays the mobile sidebar.")])),_:1,__:[1]})]),_:1}),a.createElementVNode("div",STe,[a.renderSlot(e.$slots,"default")])]),_:3},8,["side","style"])]),_:3},16,["open","onUpdate:open"])):(a.openBlock(),a.createElementBlock("div",{key:2,class:"group peer text-sidebar-foreground hidden md:block","data-slot":"sidebar","data-state":a.unref(i),"data-collapsible":"collapsed"===a.unref(i)?e.collapsible:"","data-variant":e.variant,"data-side":e.side},[a.createElementVNode("div",{class:a.normalizeClass(a.unref(Dt)("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180","floating"===e.variant||"inset"===e.variant?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)"))},null,2),a.createElementVNode("div",a.mergeProps({class:a.unref(Dt)("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex","left"===e.side?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]","floating"===e.variant||"inset"===e.variant?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",t.class)},e.$attrs),[a.createElementVNode("div",jTe,[a.renderSlot(e.$slots,"default")])],16)],8,BTe))}}),NTe=a.defineComponent({__name:"SidebarContent",props:{class:{}},setup(e){const t=e;return(e,n)=>(a.openBlock(),a.createElementBlock("div",{"data-slot":"sidebar-content","data-sidebar":"content",class:a.normalizeClass(a.unref(Dt)("flex min-h-0 flex-1 flex-col gap-2 overflow-y-auto overflow-x-hidden",t.class))},[a.renderSlot(e.$slots,"default")],2))}}),PTe=a.defineComponent({__name:"SidebarFooter",props:{class:{}},setup(e){const t=e;return(e,n)=>(a.openBlock(),a.createElementBlock("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",class:a.normalizeClass(a.unref(Dt)("flex flex-col gap-2 p-2",t.class))},[a.renderSlot(e.$slots,"default")],2))}}),VTe=a.defineComponent({__name:"SidebarGroup",props:{class:{}},setup(e){const t=e;return(e,n)=>(a.openBlock(),a.createElementBlock("div",{"data-slot":"sidebar-group","data-sidebar":"group",class:a.normalizeClass(a.unref(Dt)("relative flex w-full min-w-0 flex-col p-2",t.class))},[a.renderSlot(e.$slots,"default")],2))}}),RTe=a.defineComponent({__name:"SidebarGroupAction",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e;return(e,i)=>(a.openBlock(),a.createBlock(a.unref(n.Primitive),{"data-slot":"sidebar-group-action","data-sidebar":"group-action",as:e.as,"as-child":e.asChild,class:a.normalizeClass(a.unref(Dt)("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 md:after:hidden","group-data-[collapsible=icon]:hidden",t.class))},{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},8,["as","as-child","class"]))}}),qTe=a.defineComponent({__name:"SidebarGroupContent",props:{class:{}},setup(e){const t=e;return(e,n)=>(a.openBlock(),a.createElementBlock("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",class:a.normalizeClass(a.unref(Dt)("w-full text-sm",t.class))},[a.renderSlot(e.$slots,"default")],2))}}),zTe=a.defineComponent({__name:"SidebarGroupLabel",props:{asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e;return(e,i)=>(a.openBlock(),a.createBlock(a.unref(n.Primitive),{"data-slot":"sidebar-group-label","data-sidebar":"group-label",as:e.as,"as-child":e.asChild,class:a.normalizeClass(a.unref(Dt)("text-sidebar-foreground/70 ring-sidebar-ring flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",t.class))},{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},8,["as","as-child","class"]))}}),QTe=a.defineComponent({__name:"SidebarHeader",props:{class:{}},setup(e){const t=e;return(e,n)=>(a.openBlock(),a.createElementBlock("div",{"data-slot":"sidebar-header","data-sidebar":"header",class:a.normalizeClass(a.unref(Dt)("flex flex-col gap-2 p-2",t.class))},[a.renderSlot(e.$slots,"default")],2))}}),LTe=a.defineComponent({__name:"SidebarInput",props:{class:{}},setup(e){const t=e;return(e,n)=>(a.openBlock(),a.createBlock(a.unref(rke),{"data-slot":"sidebar-input","data-sidebar":"input",class:a.normalizeClass(a.unref(Dt)("bg-background h-8 w-full shadow-none",t.class))},{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},8,["class"]))}}),ZTe=a.defineComponent({__name:"SidebarInset",props:{class:{}},setup(e){const t=e;return(e,n)=>(a.openBlock(),a.createElementBlock("main",{"data-slot":"sidebar-inset",class:a.normalizeClass(a.unref(Dt)("bg-background-accent relative flex w-full min-w-0 flex-1 flex-col","md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",t.class))},[a.renderSlot(e.$slots,"default")],2))}}),HTe=a.defineComponent({__name:"SidebarMenu",props:{class:{}},setup(e){const t=e;return(e,n)=>(a.openBlock(),a.createElementBlock("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",class:a.normalizeClass(a.unref(Dt)("flex w-full min-w-0 flex-col gap-1",t.class))},[a.renderSlot(e.$slots,"default")],2))}}),GTe=a.defineComponent({__name:"SidebarMenuAction",props:{asChild:{type:Boolean},as:{default:"button"},showOnHover:{type:Boolean},class:{}},setup(e){const t=e;return(e,i)=>(a.openBlock(),a.createBlock(a.unref(n.Primitive),{"data-slot":"sidebar-menu-action","data-sidebar":"menu-action",class:a.normalizeClass(a.unref(Dt)("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground peer-hover/menu-button:text-sidebar-accent-foreground absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 md:after:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",e.showOnHover&&"peer-data-[active=true]/menu-button:text-sidebar-accent-foreground group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 md:opacity-0",t.class)),as:e.as,"as-child":e.asChild},{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},8,["class","as","as-child"]))}}),YTe=a.defineComponent({__name:"SidebarMenuBadge",props:{class:{}},setup(e){const t=e;return(e,n)=>(a.openBlock(),a.createElementBlock("div",{"data-slot":"sidebar-menu-badge","data-sidebar":"menu-badge",class:a.normalizeClass(a.unref(Dt)("text-sidebar-foreground pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums select-none","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",t.class))},[a.renderSlot(e.$slots,"default")],2))}}),UTe=a.defineComponent({__name:"Tooltip",props:{defaultOpen:{type:Boolean},open:{type:Boolean},delayDuration:{},disableHoverableContent:{type:Boolean},disableClosingTrigger:{type:Boolean},disabled:{type:Boolean},ignoreNonKeyboardFocus:{type:Boolean}},emits:["update:open"],setup(e,{emit:t}){const i=e,o=t,r=n.useForwardPropsEmits(i,o);return(e,t)=>(a.openBlock(),a.createBlock(a.unref(n.TooltipRoot),a.mergeProps({"data-slot":"tooltip"},a.unref(r)),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},16))}}),WTe=a.defineComponent({inheritAttrs:!1,__name:"TooltipContent",props:{forceMount:{type:Boolean},ariaLabel:{},asChild:{type:Boolean},as:{},side:{},sideOffset:{default:4},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},positionStrategy:{},updatePositionStrategy:{},class:{}},emits:["escapeKeyDown","pointerDownOutside"],setup(e,{emit:t}){const i=e,o=t,r=xZ(i,"class"),s=n.useForwardPropsEmits(r,o);return(e,t)=>(a.openBlock(),a.createBlock(a.unref(n.TooltipPortal),null,{default:a.withCtx(()=>[a.createVNode(a.unref(n.TooltipContent),a.mergeProps({"data-slot":"tooltip-content"},{...a.unref(s),...e.$attrs},{class:a.unref(Dt)("bg-primary text-primary-foreground 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 z-50 w-fit rounded-md px-3 py-1.5 text-xs text-balance",i.class)}),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default"),a.createVNode(a.unref(n.TooltipArrow),{class:"bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]),_:3},16,["class"])]),_:3}))}}),XTe=a.defineComponent({__name:"TooltipProvider",props:{delayDuration:{default:0},skipDelayDuration:{},disableHoverableContent:{type:Boolean},disableClosingTrigger:{type:Boolean},disabled:{type:Boolean},ignoreNonKeyboardFocus:{type:Boolean}},setup(e){const t=e;return(e,i)=>(a.openBlock(),a.createBlock(a.unref(n.TooltipProvider),a.normalizeProps(a.guardReactiveProps(t)),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},16))}}),KTe=a.defineComponent({__name:"TooltipTrigger",props:{reference:{},asChild:{type:Boolean},as:{}},setup(e){const t=e;return(e,i)=>(a.openBlock(),a.createBlock(a.unref(n.TooltipTrigger),a.mergeProps({"data-slot":"tooltip-trigger"},t),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},16))}}),JTe=Object.freeze(Object.defineProperty({__proto__:null,Tooltip:UTe,TooltipContent:WTe,TooltipProvider:XTe,TooltipTrigger:KTe},Symbol.toStringTag,{value:"Module"})),$Te=a.defineComponent({__name:"SidebarMenuButtonChild",props:{variant:{default:"default"},size:{default:"default"},isActive:{type:Boolean},class:{},asChild:{type:Boolean},as:{default:"button"}},setup(e){const t=e;return(e,i)=>(a.openBlock(),a.createBlock(a.unref(n.Primitive),a.mergeProps({"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":e.size,"data-active":e.isActive,class:a.unref(Dt)(a.unref(cNe)({variant:e.variant,size:e.size}),t.class),as:e.as,"as-child":e.asChild},e.$attrs),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},16,["data-size","data-active","class","as","as-child"]))}}),eNe=a.defineComponent({inheritAttrs:!1,__name:"SidebarMenuButton",props:{variant:{default:"default"},size:{default:"default"},isActive:{type:Boolean},class:{},asChild:{type:Boolean},as:{default:"button"},tooltip:{}},setup(e){const t=e,{isMobile:n,state:i}=DTe(),o=a.computed(()=>{const{tooltip:e,...a}=t;return a});return(e,t)=>e.tooltip?(a.openBlock(),a.createBlock(a.unref(UTe),{key:1},{default:a.withCtx(()=>[a.createVNode(a.unref(KTe),{"as-child":""},{default:a.withCtx(()=>[a.createVNode($Te,a.normalizeProps(a.guardReactiveProps({...o.value,...e.$attrs})),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},16)]),_:3}),a.createVNode(a.unref(WTe),{side:"right",align:"center",hidden:"collapsed"!==a.unref(i)||a.unref(n)},{default:a.withCtx(()=>["string"==typeof e.tooltip?(a.openBlock(),a.createElementBlock(a.Fragment,{key:0},[a.createTextVNode(a.toDisplayString(e.tooltip),1)],64)):(a.openBlock(),a.createBlock(a.resolveDynamicComponent(e.tooltip),{key:1}))]),_:1},8,["hidden"])]),_:3})):(a.openBlock(),a.createBlock($Te,a.normalizeProps(a.mergeProps({key:0},{...o.value,...e.$attrs})),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},16))}}),tNe=a.defineComponent({__name:"SidebarMenuItem",props:{class:{}},setup(e){const t=e;return(e,n)=>(a.openBlock(),a.createElementBlock("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",class:a.normalizeClass(a.unref(Dt)("group/menu-item relative",t.class))},[a.renderSlot(e.$slots,"default")],2))}}),aNe=a.defineComponent({__name:"Skeleton",props:{class:{}},setup(e){const t=e;return(e,n)=>(a.openBlock(),a.createElementBlock("div",{"data-slot":"skeleton",class:a.normalizeClass(a.unref(Dt)("animate-pulse rounded-md bg-primary/10",t.class))},null,2))}}),nNe=Object.freeze(Object.defineProperty({__proto__:null,Skeleton:aNe},Symbol.toStringTag,{value:"Module"})),iNe=a.defineComponent({__name:"SidebarMenuSkeleton",props:{showIcon:{type:Boolean},class:{}},setup(e){const t=e,n=a.computed(()=>`${Math.floor(40*Math.random())+50}%`);return(e,i)=>(a.openBlock(),a.createElementBlock("div",{"data-slot":"sidebar-menu-skeleton","data-sidebar":"menu-skeleton",class:a.normalizeClass(a.unref(Dt)("flex h-8 items-center gap-2 rounded-md px-2",t.class))},[e.showIcon?(a.openBlock(),a.createBlock(a.unref(aNe),{key:0,class:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"})):a.createCommentVNode("",!0),a.createVNode(a.unref(aNe),{class:"h-4 max-w-(--skeleton-width) flex-1","data-sidebar":"menu-skeleton-text",style:a.normalizeStyle({"--skeleton-width":n.value})},null,8,["style"])],2))}}),oNe=a.defineComponent({__name:"SidebarMenuSub",props:{class:{}},setup(e){const t=e;return(e,n)=>(a.openBlock(),a.createElementBlock("ul",{"data-slot":"sidebar-menu-sub","data-sidebar":"menu-badge",class:a.normalizeClass(a.unref(Dt)("border-sidebar-border mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",t.class))},[a.renderSlot(e.$slots,"default")],2))}}),rNe=a.defineComponent({__name:"SidebarMenuSubButton",props:{asChild:{type:Boolean},as:{default:"a"},size:{default:"md"},isActive:{type:Boolean},class:{}},setup(e){const t=e;return(e,i)=>(a.openBlock(),a.createBlock(a.unref(n.Primitive),{"data-slot":"sidebar-menu-sub-button","data-sidebar":"menu-sub-button",as:e.as,"as-child":e.asChild,"data-size":e.size,"data-active":e.isActive,class:a.normalizeClass(a.unref(Dt)("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground [&>svg]:text-sidebar-accent-foreground flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 outline-hidden focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground","sm"===e.size&&"text-xs","md"===e.size&&"text-sm","group-data-[collapsible=icon]:hidden",t.class))},{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},8,["as","as-child","data-size","data-active","class"]))}}),sNe=a.defineComponent({__name:"SidebarMenuSubItem",props:{class:{}},setup(e){const t=e;return(e,n)=>(a.openBlock(),a.createElementBlock("li",{"data-slot":"sidebar-menu-sub-item","data-sidebar":"menu-sub-item",class:a.normalizeClass(a.unref(Dt)("group/menu-sub-item relative",t.class))},[a.renderSlot(e.$slots,"default")],2))}}),lNe=a.defineComponent({__name:"SidebarProvider",props:{defaultOpen:{type:Boolean,default:!0},open:{type:Boolean,default:void 0},class:{}},emits:["update:open"],setup(e,{emit:t}){const i=e,o=t,r=function(e,t={}){const{window:n=BZ,ssrWidth:i=VZ()}=t,o=NZ(()=>n&&"matchMedia"in n&&"function"==typeof n.matchMedia),r=a.shallowRef("number"==typeof i),s=a.shallowRef(),l=a.shallowRef(!1);return a.watchEffect(()=>{if(r.value){r.value=!o.value;const t=a.toValue(e).split(",");return void(l.value=t.some(e=>{const t=e.includes("not all"),a=e.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),n=e.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/);let o=Boolean(a||n);return a&&o&&(o=i>=DZ(a[1])),n&&o&&(o=i<=DZ(n[1])),t?!o:o}))}o.value&&(s.value=n.matchMedia(a.toValue(e)),l.value=s.value.matches)}),TZ(s,"change",e=>{l.value=e.matches},{passive:!0}),a.computed(()=>l.value)}("(max-width: 768px)"),s=a.ref(!1),l=zZ(i,"open",o,{defaultValue:i.defaultOpen??!1,passive:void 0===i.open});function g(e){l.value=e,document.cookie=`sidebar:state=${l.value}; path=/; max-age=604800`}function u(e){s.value=e}function d(){return r.value?u(!s.value):g(!l.value)}TZ("keydown",e=>{"b"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),d())});const c=a.computed(()=>l.value?"expanded":"collapsed");return MTe({state:c,open:l,setOpen:g,isMobile:r,openMobile:s,setOpenMobile:u,toggleSidebar:d}),(e,t)=>(a.openBlock(),a.createBlock(a.unref(n.TooltipProvider),{"delay-duration":0},{default:a.withCtx(()=>[a.createElementVNode("div",a.mergeProps({"data-slot":"sidebar-wrapper",style:{"--sidebar-width":a.unref("16rem"),"--sidebar-width-icon":a.unref("3rem")},class:a.unref(Dt)("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full",i.class)},e.$attrs),[a.renderSlot(e.$slots,"default")],16)]),_:3}))}}),gNe=a.defineComponent({__name:"SidebarRail",props:{class:{}},setup(e){const t=e,{toggleSidebar:n}=DTe();return(e,i)=>(a.openBlock(),a.createElementBlock("button",{"data-sidebar":"rail","data-slot":"sidebar-rail","aria-label":"Toggle Sidebar",tabindex:-1,title:"Toggle Sidebar",class:a.normalizeClass(a.unref(Dt)("hover:after:bg-sidebar-border absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] sm:flex","in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","hover:group-data-[collapsible=offcanvas]:bg-sidebar group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",t.class)),onClick:i[0]||(i[0]=(...e)=>a.unref(n)&&a.unref(n)(...e))},[a.renderSlot(e.$slots,"default")],2))}}),uNe=a.defineComponent({__name:"SidebarSeparator",props:{class:{}},setup(e){const t=e;return(e,n)=>(a.openBlock(),a.createBlock(a.unref(mTe),{"data-slot":"sidebar-separator","data-sidebar":"separator",class:a.normalizeClass(a.unref(Dt)("bg-sidebar-border mx-2 w-auto",t.class))},{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},8,["class"]))}}),dNe=a.defineComponent({__name:"SidebarTrigger",props:{class:{}},setup(e){const t=e,{toggleSidebar:n}=DTe();return(e,i)=>(a.openBlock(),a.createBlock(a.unref(EM),{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon",class:a.normalizeClass(a.unref(Dt)("h-7 w-7",t.class)),onClick:a.unref(n)},{default:a.withCtx(()=>[a.createVNode(a.unref(C_)),i[0]||(i[0]=a.createElementVNode("span",{class:"sr-only"},"Toggle Sidebar",-1))]),_:1,__:[0]},8,["class","onClick"]))}}),cNe=i.cva("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}}),hNe=Object.freeze(Object.defineProperty({__proto__:null,Sidebar:TTe,SidebarContent:NTe,SidebarFooter:PTe,SidebarGroup:VTe,SidebarGroupAction:RTe,SidebarGroupContent:qTe,SidebarGroupLabel:zTe,SidebarHeader:QTe,SidebarInput:LTe,SidebarInset:ZTe,SidebarMenu:HTe,SidebarMenuAction:GTe,SidebarMenuBadge:YTe,SidebarMenuButton:eNe,SidebarMenuItem:tNe,SidebarMenuSkeleton:iNe,SidebarMenuSub:oNe,SidebarMenuSubButton:rNe,SidebarMenuSubItem:sNe,SidebarProvider:lNe,SidebarRail:gNe,SidebarSeparator:uNe,SidebarTrigger:dNe,sidebarMenuButtonVariants:cNe,useSidebar:DTe},Symbol.toStringTag,{value:"Module"})),fNe=a.defineComponent({__name:"Sonner",props:{invert:{type:Boolean},theme:{},position:{},hotkey:{},richColors:{type:Boolean},expand:{type:Boolean},duration:{},gap:{},visibleToasts:{},closeButton:{type:Boolean},toastOptions:{},class:{},style:{},offset:{},dir:{},icons:{},containerAriaLabel:{},pauseWhenPageIsHidden:{type:Boolean},cn:{type:Function}},setup(e){const t=e;return(e,n)=>(a.openBlock(),a.createBlock(a.unref(A4),a.mergeProps({class:"toaster group"},t,{style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)"}}),null,16))}}),pNe=Object.freeze(Object.defineProperty({__proto__:null,Toaster:fNe},Symbol.toStringTag,{value:"Module"})),ANe=e=>t=>"string"==typeof t&&t.startsWith(e),CNe=ANe("--"),mNe=ANe("var(--"),INe=e=>!!mNe(e)&&yNe.test(e.split("/*")[0].trim()),yNe=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,_Ne={};function FNe(e){for(const t in e)_Ne[t]=e[t],CNe(t)&&(_Ne[t].isCSSVariable=!0)}function bNe(e,t){const n=Symbol("string"!=typeof e||t?t:`${e}Context`);return[t=>{const i=a.inject(n,t);if(void 0===i)throw new Error(`Injection \`${n.toString()}\` not found. Component must be used within ${Array.isArray(e)?`one of the following components: ${e.join(", ")}`:`\`${e}\``}`);return i},e=>(a.provide(n,e),e)]}const[vNe,kNe]=bNe("Motion"),[wNe,xNe]=bNe("LayoutGroup");function ONe(e){return null!==e&&"object"==typeof e&&"function"==typeof e.start}class ENe{constructor(e){this.state=e}beforeMount(){}mount(){}unmount(){}update(){}beforeUpdate(){}beforeUnmount(){}}var DNe=function(){},MNe=function(){};function SNe(e,t,a){if(Array.isArray(e))return e.reduce((e,n)=>{const i=SNe(n,t,a);return i?{...e,...i}:e},{});if("object"==typeof e)return e;if(e&&t){const n=t[e];return"function"==typeof n?n(a):n}}function BNe(e){return null==e?void 0:e.startsWith("--")}"production"!==process.env.NODE_ENV&&(DNe=function(e,t){e||"undefined"==typeof console||console.warn(t)},MNe=function(e,t){if(!e)throw new Error(t)});function jNe(e){return"number"==typeof e}const TNe=new Set(["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","linearGradient","radialGradient","textPath"]);function NNe(e){return TNe.has(e)}class PNe{constructor(e){this.features=[];const{features:t=[],lazyMotionContext:n}=e.options,i=t.concat(n.features.value);this.features=i.map(t=>new t(e));const o=this.features;a.watch(n.features,t=>{t.forEach(t=>{if(!i.includes(t)){i.push(t);const a=new t(e);o.push(a),e.isMounted()&&(a.beforeMount(),a.mount())}})},{flush:"pre"})}mount(){this.features.forEach(e=>e.mount())}beforeMount(){this.features.forEach(e=>{var t;return null==(t=e.beforeMount)?void 0:t.call(e)})}unmount(){this.features.forEach(e=>e.unmount())}update(){this.features.forEach(e=>{var t;return null==(t=e.update)?void 0:t.call(e)})}beforeUpdate(){this.features.forEach(e=>e.beforeUpdate())}beforeUnmount(){this.features.forEach(e=>e.beforeUnmount())}}const VNe=new WeakMap,[RNe,qNe]=bNe("AnimatePresenceContext");const zNe=e=>e,QNe=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];const LNe={};function ZNe(e,t){let a=!1,n=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>a=!0,r=QNe.reduce((e,t)=>(e[t]=function(e){let t=new Set,a=new Set,n=!1,i=!1;const o=new WeakSet;let r={delta:0,timestamp:0,isProcessing:!1};function s(t){o.has(t)&&(l.schedule(t),e()),t(r)}const l={schedule:(e,i=!1,r=!1)=>{const s=r&&n?t:a;return i&&o.add(e),s.has(e)||s.add(e),e},cancel:e=>{a.delete(e),o.delete(e)},process:e=>{r=e,n?i=!0:(n=!0,[t,a]=[a,t],t.forEach(s),t.clear(),n=!1,i&&(i=!1,l.process(e)))}};return l}(o),e),{}),{setup:s,read:l,resolveKeyframes:g,preUpdate:u,update:d,preRender:c,render:h,postRender:f}=r,p=()=>{const o=LNe.useManualTiming?i.timestamp:performance.now();a=!1,LNe.useManualTiming||(i.delta=n?1e3/60:Math.max(Math.min(o-i.timestamp,40),1)),i.timestamp=o,i.isProcessing=!0,s.process(i),l.process(i),g.process(i),u.process(i),d.process(i),c.process(i),h.process(i),f.process(i),i.isProcessing=!1,a&&t&&(n=!1,e(p))};return{schedule:QNe.reduce((t,o)=>{const s=r[o];return t[o]=(t,o=!1,r=!1)=>(a||(a=!0,n=!0,i.isProcessing||e(p)),s.schedule(t,o,r)),t},{}),cancel:e=>{for(let t=0;t<QNe.length;t++)r[QNe[t]].cancel(e)},state:i,steps:r}}const{schedule:HNe,cancel:GNe,state:YNe,steps:UNe}=ZNe("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:zNe,!0),WNe=new WeakMap;let XNe=0;const KNe=new Set;class JNe{constructor(e,t){var a;this.element=null,this.isSafeToRemove=!1,this.isVShow=!1,this.children=new Set,this.activeStates={initial:!0,animate:!0},this.currentProcess=null,this._context=null,this.animateUpdates=zNe,this.id="motion-state-"+XNe++,this.options=e,this.parent=t,null==(a=null==t?void 0:t.children)||a.add(this),this.depth=(null==t?void 0:t.depth)+1||0;const n=!1===(void 0===e.initial&&e.variants?this.context.initial:e.initial)?["initial","animate"]:["initial"];this.initTarget(n),this.featureManager=new PNe(this),this.type=NNe(this.options.as)?"svg":"html"}get context(){if(!this._context){const e={get:(e,t)=>{var a,n;return"string"==typeof(n=this.options[t])||!1===n||Array.isArray(n)?this.options[t]:null==(a=this.parent)?void 0:a.context[t]}};this._context=new Proxy({},e)}return this._context}initTarget(e){var t;const a=this.options.custom??(null==(t=this.options.animatePresenceContext)?void 0:t.custom);this.baseTarget=e.reduce((e,t)=>({...e,...SNe(this.options[t]||this.context[t],this.options.variants,a)}),{}),this.target={}}updateOptions(e){var t;this.options=e,null==(t=this.visualElement)||t.update({...this.options,whileTap:this.options.whilePress},{isPresent:!VNe.has(this.element)})}beforeMount(){this.featureManager.beforeMount()}mount(e,t,a=!1){var n;MNe(Boolean(e),"Animation state must be mounted with valid Element"),this.element=e,this.updateOptions(t),this.featureManager.mount(),!a&&this.options.animate&&(null==(n=this.startAnimation)||n.call(this)),this.options.layoutId&&(KNe.add(this.options.layoutId),HNe.render(()=>{KNe.clear()}))}clearAnimation(){var e,t;this.currentProcess&&GNe(this.currentProcess),this.currentProcess=null,null==(t=null==(e=this.visualElement)?void 0:e.variantChildren)||t.forEach(e=>{e.state.clearAnimation()})}startAnimation(){this.clearAnimation(),this.currentProcess=HNe.render(()=>{this.currentProcess=null,this.animateUpdates()})}beforeUnmount(){this.featureManager.beforeUnmount()}unmount(e=!1){const t=this.options.layoutId&&!KNe.has(this.options.layoutId);(()=>{const a=()=>{var t,a,n;e&&Array.from(this.children).reverse().forEach(this.unmountChild),null==(a=null==(t=this.parent)?void 0:t.children)||a.delete(this),WNe.delete(this.element),this.featureManager.unmount(),null==(n=this.visualElement)||n.unmount(),this.clearAnimation()};t?Promise.resolve().then(a):a()})()}unmountChild(e){e.unmount(!0)}beforeUpdate(){this.featureManager.beforeUpdate()}update(e){this.updateOptions(e),this.featureManager.update(),this.startAnimation()}setActive(e,t,a=!0){var n;this.element&&this.activeStates[e]!==t&&(this.activeStates[e]=t,null==(n=this.visualElement.variantChildren)||n.forEach(a=>{a.state.setActive(e,t,!1)}),a&&this.animateUpdates({isFallback:!t&&"exit"!==e&&this.visualElement.isControllingVariants,isExit:"exit"===e&&this.activeStates.exit}))}isMounted(){return Boolean(this.element)}willUpdate(e){var t;(this.options.layout||this.options.layoutId)&&(null==(t=this.visualElement.projection)||t.willUpdate())}}const $Ne=new WeakMap;function ePe(e,t,a){return new CustomEvent(e,{detail:{target:t,isExit:a}})}const tPe={syntax:"<angle>",initialValue:"0deg",toDefaultUnit:e=>`${e}deg`},aPe={translate:{syntax:"<length-percentage>",initialValue:"0px",toDefaultUnit:e=>`${e}px`},rotate:tPe,scale:{syntax:"<number>",initialValue:1,toDefaultUnit:e=>e},skew:tPe},nPe=["","X","Y","Z"],iPe=new Map,oPe=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"];["translate","scale","rotate","skew"].forEach(e=>{nPe.forEach(t=>{oPe.push(e+t),iPe.set(e+t,aPe[e])})});const rPe=new Set(oPe),sPe=e=>rPe.has(e),lPe={x:"translateX",y:"translateY",z:"translateZ"};function gPe([e],[t]){return oPe.indexOf(e)-oPe.indexOf(t)}function uPe(e,[t,a]){return`${e} ${t}(${a})`}const dPe={translate:[0,0],rotate:0,scale:1,skew:0,x:0,y:0,z:0},cPe=e=>({test:t=>"string"==typeof t&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),hPe=cPe("deg"),fPe=cPe("%"),pPe=cPe("px"),APe=cPe("vh"),CPe=cPe("vw"),mPe=(()=>({...fPe,parse:e=>fPe.parse(e)/100,transform:e=>fPe.transform(100*e)}))(),IPe=e=>Boolean(e&&e.getVelocity),yPe=(e,t)=>{let a=BNe(t)?e.style.getPropertyValue(t):getComputedStyle(e)[t];if(!a&&"0"!==a){const e=iPe.get(t);e&&(a=e.initialValue)}return a};function _Pe(e){var t;const a={},n=[];for(let i in e){let o=e[i];o=IPe(o)?o.get():o,sPe(i)&&i in lPe&&(i=lPe[i]);let r=Array.isArray(o)?o[0]:o;const s=iPe.get(i);s?(r=jNe(o)?null==(t=s.toDefaultUnit)?void 0:t.call(s,o):o,n.push([i,r])):a[i]=r}return n.length&&(a.transform=function(e){return e.sort(gPe).reduce(uPe,"").trim()}(n)),0===Object.keys(a).length?null:a}const FPe={fill:!0,stroke:!0,opacity:!0,"stroke-width":!0,"fill-opacity":!0,"stroke-opacity":!0,"stroke-linecap":!0,"stroke-linejoin":!0,"stroke-dasharray":!0,"stroke-dashoffset":!0,cx:!0,cy:!0,r:!0,d:!0,x1:!0,y1:!0,x2:!0,y2:!0,points:!0,"path-length":!0,viewBox:!0,width:!0,height:!0,"preserve-aspect-ratio":!0,"clip-path":!0,filter:!0,mask:!0,"stop-color":!0,"stop-opacity":!0,"gradient-transform":!0,"gradient-units":!0,"spread-method":!0,"marker-end":!0,"marker-mid":!0,"marker-start":!0,"text-anchor":!0,"dominant-baseline":!0,"font-family":!0,"font-size":!0,"font-weight":!0,"letter-spacing":!0,"vector-effect":!0};function bPe(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}function vPe(e){const t={},a={};for(const n in e){const i=bPe(n);if(i in FPe){const a=e[n];t[i]=IPe(a)?a.get():a}else a[n]=e[n]}return void 0!==t["path-length"]&&function(e,t,a=1,n=0){e.pathLength=1,delete e["path-length"],e["stroke-dashoffset"]=pPe.transform(-n);const i=pPe.transform(t),o=pPe.transform(a);e["stroke-dasharray"]=`${i} ${o}`}(t,t["path-length"],t["path-spacing"],t["path-offset"]),{attrs:t,style:a}}"undefined"!=typeof WorkerGlobalScope&&(globalThis,WorkerGlobalScope);const kPe=e=>void 0!==e;const wPe={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"]},xPe={};for(const BHe in wPe)xPe[BHe]={isEnabled:e=>wPe[BHe].some(t=>!!e[t])};const OPe=()=>({x:{min:0,max:0},y:{min:0,max:0}}),EPe="undefined"!=typeof window,DPe={current:null},MPe={current:!1};const SPe=["initial","animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"];function BPe(e){return null!==(t=e.animate)&&"object"==typeof t&&"function"==typeof t.start||SPe.some(t=>function(e){return"string"==typeof e||Array.isArray(e)}(e[t]));var t}let jPe;function TPe(){jPe=void 0}const NPe={now:()=>(void 0===jPe&&NPe.set(YNe.isProcessing||LNe.useManualTiming?YNe.timestamp:performance.now()),jPe),set:e=>{jPe=e,queueMicrotask(TPe)}},PPe=new Set;function VPe(e,t,a){e||PPe.has(t)||(console.warn(t),PPe.add(t))}function RPe(e,t){-1===e.indexOf(t)&&e.push(t)}function qPe(e,t){const a=e.indexOf(t);a>-1&&e.splice(a,1)}class zPe{constructor(){this.subscriptions=[]}add(e){return RPe(this.subscriptions,e),()=>qPe(this.subscriptions,e)}notify(e,t,a){const n=this.subscriptions.length;if(n)if(1===n)this.subscriptions[0](e,t,a);else for(let i=0;i<n;i++){const n=this.subscriptions[i];n&&n(e,t,a)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function QPe(e,t){return t?e*(1e3/t):0}class LPe{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=(e,t=!0)=>{var a,n;const i=NPe.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(null==(a=this.events.change)||a.notify(this.current),this.dependents))for(const o of this.dependents)o.dirty();t&&(null==(n=this.events.renderRequest)||n.notify(this.current))},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){var t;this.current=e,this.updatedAt=NPe.now(),null===this.canTrackVelocity&&void 0!==e&&(this.canTrackVelocity=(t=this.current,!isNaN(parseFloat(t))))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return"production"!==process.env.NODE_ENV&&VPe(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new zPe);const a=this.events[e].add(t);return"change"===e?()=>{a(),HNe.read(()=>{this.events.change.getSize()||this.stop()})}:a}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e,t=!0){t&&this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e,t)}setWithVelocity(e,t,a){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-a}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var e;null==(e=this.events.change)||e.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=NPe.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||e-this.updatedAt>30)return 0;const t=Math.min(this.updatedAt-this.prevUpdatedAt,30);return QPe(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var e,t;null==(e=this.dependents)||e.clear(),null==(t=this.events.destroy)||t.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function ZPe(e,t){return new LPe(e,t)}function HPe(e){const t=[{},{}];return null==e||e.values.forEach((e,a)=>{t[0][a]=e.get(),t[1][a]=e.getVelocity()}),t}function GPe(e,t,a,n){if("function"==typeof t){const[i,o]=HPe(n);t=t(void 0!==a?a:e.custom,i,o)}if("string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t){const[i,o]=HPe(n);t=t(void 0!==a?a:e.custom,i,o)}return t}const YPe=e=>180*e/Math.PI,UPe=e=>{const t=YPe(Math.atan2(e[1],e[0]));return XPe(t)},WPe={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:UPe,rotateZ:UPe,skewX:e=>YPe(Math.atan(e[1])),skewY:e=>YPe(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},XPe=e=>((e%=360)<0&&(e+=360),e),KPe=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),JPe=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),$Pe={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:KPe,scaleY:JPe,scale:e=>(KPe(e)+JPe(e))/2,rotateX:e=>XPe(YPe(Math.atan2(e[6],e[5]))),rotateY:e=>XPe(YPe(Math.atan2(-e[2],e[0]))),rotateZ:UPe,rotate:UPe,skewX:e=>YPe(Math.atan(e[4])),skewY:e=>YPe(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function eVe(e){return e.includes("scale")?1:0}function tVe(e,t){if(!e||"none"===e)return eVe(t);const a=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let n,i;if(a)n=$Pe,i=a;else{const t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);n=WPe,i=t}if(!i)return eVe(t);const o=n[t],r=i[1].split(",").map(aVe);return"function"==typeof o?o(r):r[o]}function aVe(e){return parseFloat(e.trim())}const nVe=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],iVe=(()=>new Set(nVe))(),oVe=(e,t,a)=>a>t?t:a<e?e:a,rVe={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},sVe={...rVe,transform:e=>oVe(0,1,e)},lVe={...rVe,default:1},gVe=e=>e===rVe||e===pPe,uVe=new Set(["x","y","z"]),dVe=nVe.filter(e=>!uVe.has(e));const cVe={width:({x:e},{paddingLeft:t="0",paddingRight:a="0"})=>e.max-e.min-parseFloat(t)-parseFloat(a),height:({y:e},{paddingTop:t="0",paddingBottom:a="0"})=>e.max-e.min-parseFloat(t)-parseFloat(a),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>tVe(t,"x"),y:(e,{transform:t})=>tVe(t,"y")};cVe.translateX=cVe.x,cVe.translateY=cVe.y;const hVe=new Set;let fVe=!1,pVe=!1,AVe=!1;function CVe(){if(pVe){const e=Array.from(hVe).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),a=new Map;t.forEach(e=>{const t=function(e){const t=[];return dVe.forEach(a=>{const n=e.getValue(a);void 0!==n&&(t.push([a,n.get()]),n.set(a.startsWith("scale")?1:0))}),t}(e);t.length&&(a.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();const t=a.get(e);t&&t.forEach(([t,a])=>{var n;null==(n=e.getValue(t))||n.set(a)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{void 0!==e.suspendedScrollY&&window.scrollTo(0,e.suspendedScrollY)})}pVe=!1,fVe=!1,hVe.forEach(e=>e.complete(AVe)),hVe.clear()}function mVe(){hVe.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(pVe=!0)})}class IVe{constructor(e,t,a,n,i,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=a,this.motionValue=n,this.element=i,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(hVe.add(this),fVe||(fVe=!0,HNe.read(mVe),HNe.resolveKeyframes(CVe))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:t,element:a,motionValue:n}=this;if(null===e[0]){const i=null==n?void 0:n.get(),o=e[e.length-1];if(void 0!==i)e[0]=i;else if(a&&t){const n=a.readValue(t,o);null!=n&&(e[0]=n)}void 0===e[0]&&(e[0]=o),n&&void 0===i&&n.set(e[0])}!function(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),hVe.delete(this)}cancel(){"scheduled"===this.state&&(hVe.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}const yVe=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),_Ve=e=>/^0[^.\s]+$/u.test(e),FVe=e=>Math.round(1e5*e)/1e5,bVe=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const vVe=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,kVe=(e,t)=>a=>Boolean("string"==typeof a&&vVe.test(a)&&a.startsWith(e)||t&&!function(e){return null==e}(a)&&Object.prototype.hasOwnProperty.call(a,t)),wVe=(e,t,a)=>n=>{if("string"!=typeof n)return n;const[i,o,r,s]=n.match(bVe);return{[e]:parseFloat(i),[t]:parseFloat(o),[a]:parseFloat(r),alpha:void 0!==s?parseFloat(s):1}},xVe={...rVe,transform:e=>Math.round((e=>oVe(0,255,e))(e))},OVe={test:kVe("rgb","red"),parse:wVe("red","green","blue"),transform:({red:e,green:t,blue:a,alpha:n=1})=>"rgba("+xVe.transform(e)+", "+xVe.transform(t)+", "+xVe.transform(a)+", "+FVe(sVe.transform(n))+")"};const EVe={test:kVe("#"),parse:function(e){let t="",a="",n="",i="";return e.length>5?(t=e.substring(1,3),a=e.substring(3,5),n=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),a=e.substring(2,3),n=e.substring(3,4),i=e.substring(4,5),t+=t,a+=a,n+=n,i+=i),{red:parseInt(t,16),green:parseInt(a,16),blue:parseInt(n,16),alpha:i?parseInt(i,16)/255:1}},transform:OVe.transform},DVe={test:kVe("hsl","hue"),parse:wVe("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:a,alpha:n=1})=>"hsla("+Math.round(e)+", "+fPe.transform(FVe(t))+", "+fPe.transform(FVe(a))+", "+FVe(sVe.transform(n))+")"},MVe={test:e=>OVe.test(e)||EVe.test(e)||DVe.test(e),parse:e=>OVe.test(e)?OVe.parse(e):DVe.test(e)?DVe.parse(e):EVe.parse(e),transform:e=>"string"==typeof e?e:e.hasOwnProperty("red")?OVe.transform(e):DVe.transform(e),getAnimatableNone:e=>{const t=MVe.parse(e);return t.alpha=0,MVe.transform(t)}},SVe=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const BVe="number",jVe="color",TVe=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function NVe(e){const t=e.toString(),a=[],n={color:[],number:[],var:[]},i=[];let o=0;const r=t.replace(TVe,e=>(MVe.test(e)?(n.color.push(o),i.push(jVe),a.push(MVe.parse(e))):e.startsWith("var(")?(n.var.push(o),i.push("var"),a.push(e)):(n.number.push(o),i.push(BVe),a.push(parseFloat(e))),++o,"${}")).split("${}");return{values:a,split:r,indexes:n,types:i}}function PVe(e){return NVe(e).values}function VVe(e){const{split:t,types:a}=NVe(e),n=t.length;return e=>{let i="";for(let o=0;o<n;o++)if(i+=t[o],void 0!==e[o]){const t=a[o];i+=t===BVe?FVe(e[o]):t===jVe?MVe.transform(e[o]):e[o]}return i}}const RVe=e=>"number"==typeof e?0:MVe.test(e)?MVe.getAnimatableNone(e):e;const qVe={test:function(e){var t,a;return isNaN(e)&&"string"==typeof e&&((null==(t=e.match(bVe))?void 0:t.length)||0)+((null==(a=e.match(SVe))?void 0:a.length)||0)>0},parse:PVe,createTransformer:VVe,getAnimatableNone:function(e){const t=PVe(e);return VVe(e)(t.map(RVe))}},zVe=e=>t=>t.test(e),QVe=[rVe,pPe,fPe,hPe,CPe,APe,{test:e=>"auto"===e,parse:e=>e}],LVe=e=>QVe.find(zVe(e)),ZVe=[...QVe,MVe,qVe],HVe=new Set(["brightness","contrast","saturate","opacity"]);function GVe(e){const[t,a]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;const[n]=a.match(bVe)||[];if(!n)return e;const i=a.replace(n,"");let o=HVe.has(t)?1:0;return n!==a&&(o*=100),t+"("+o+i+")"}const YVe=/\b([a-z-]*)\(.*?\)/gu,UVe={...qVe,getAnimatableNone:e=>{const t=e.match(YVe);return t?t.map(GVe).join(" "):e}},WVe={...rVe,transform:Math.round},XVe={borderWidth:pPe,borderTopWidth:pPe,borderRightWidth:pPe,borderBottomWidth:pPe,borderLeftWidth:pPe,borderRadius:pPe,radius:pPe,borderTopLeftRadius:pPe,borderTopRightRadius:pPe,borderBottomRightRadius:pPe,borderBottomLeftRadius:pPe,width:pPe,maxWidth:pPe,height:pPe,maxHeight:pPe,top:pPe,right:pPe,bottom:pPe,left:pPe,padding:pPe,paddingTop:pPe,paddingRight:pPe,paddingBottom:pPe,paddingLeft:pPe,margin:pPe,marginTop:pPe,marginRight:pPe,marginBottom:pPe,marginLeft:pPe,backgroundPositionX:pPe,backgroundPositionY:pPe,...{rotate:hPe,rotateX:hPe,rotateY:hPe,rotateZ:hPe,scale:lVe,scaleX:lVe,scaleY:lVe,scaleZ:lVe,skew:hPe,skewX:hPe,skewY:hPe,distance:pPe,translateX:pPe,translateY:pPe,translateZ:pPe,x:pPe,y:pPe,z:pPe,perspective:pPe,transformPerspective:pPe,opacity:sVe,originX:mPe,originY:mPe,originZ:pPe},zIndex:WVe,fillOpacity:sVe,strokeOpacity:sVe,numOctaves:WVe},KVe={...XVe,color:MVe,backgroundColor:MVe,outlineColor:MVe,fill:MVe,stroke:MVe,borderColor:MVe,borderTopColor:MVe,borderRightColor:MVe,borderBottomColor:MVe,borderLeftColor:MVe,filter:UVe,WebkitFilter:UVe},JVe=e=>KVe[e];function $Ve(e,t){let a=JVe(e);return a!==UVe&&(a=qVe),a.getAnimatableNone?a.getAnimatableNone(t):void 0}const eRe=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class tRe{scrapeMotionValuesFromProps(e,t,a){return{}}constructor({parent:e,props:t,presenceContext:a,reducedMotionConfig:n,blockInitialAnimation:i,visualState:o},r={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=IVe,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const e=NPe.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,HNe.render(this.render,!1,!0))};const{latestValues:s,renderState:l}=o;this.latestValues=s,this.baseTarget={...s},this.initialValues=t.initial?{...s}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=a,this.depth=e?e.depth+1:0,this.reducedMotionConfig=n,this.options=r,this.blockInitialAnimation=Boolean(i),this.isControllingVariants=BPe(t),this.isVariantNode=function(e){return Boolean(BPe(e)||e.variants)}(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(e&&e.current);const{willChange:g,...u}=this.scrapeMotionValuesFromProps(t,{},this);for(const d in u){const e=u[d];void 0!==s[d]&&IPe(e)&&e.set(s[d],!1)}}mount(e){this.current=e,$Ne.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),MPe.current||function(){if(MPe.current=!0,EPe)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>DPe.current=e.matches;e.addEventListener("change",t),t()}else DPe.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||DPe.current),"production"!==process.env.NODE_ENV&&VPe(!0!==this.shouldReduceMotion,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),GNe(this.notifyUpdate),GNe(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}bindToMotionValue(e,t){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const a=iVe.has(e);a&&this.onBindTransform&&this.onBindTransform();const n=t.on("change",t=>{this.latestValues[e]=t,this.props.onUpdate&&HNe.preRender(this.notifyUpdate),a&&this.projection&&(this.projection.isTransformDirty=!0)}),i=t.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{n(),i(),o&&o(),t.owner&&t.stop()})}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}updateFeatures(){let e="animation";for(e in xPe){const t=xPe[e];if(!t)continue;const{isEnabled:a,Feature:n}=t;if(!this.features[e]&&n&&a(this.props)&&(this.features[e]=new n(this)),this.features[e]){const t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let a=0;a<eRe.length;a++){const t=eRe[a];this.propEventSubscriptions[t]&&(this.propEventSubscriptions[t](),delete this.propEventSubscriptions[t]);const n=e["on"+t];n&&(this.propEventSubscriptions[t]=this.on(t,n))}this.prevMotionValues=function(e,t,a){for(const n in t){const i=t[n],o=a[n];if(IPe(i))e.addValue(n,i);else if(IPe(o))e.addValue(n,ZPe(i,{owner:e}));else if(o!==i)if(e.hasValue(n)){const t=e.getValue(n);!0===t.liveStyle?t.jump(i):t.hasAnimated||t.set(i)}else{const t=e.getStaticValue(n);e.addValue(n,ZPe(void 0!==t?t:i,{owner:e}))}}for(const n in a)void 0===t[n]&&e.removeValue(n);return t}(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]: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(e){const t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){const a=this.values.get(e);t!==a&&(a&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);const t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let a=this.values.get(e);return void 0===a&&void 0!==t&&(a=ZPe(null===t?void 0:t,{owner:this}),this.addValue(e,a)),a}readValue(e,t){let a=void 0===this.latestValues[e]&&this.current?this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options):this.latestValues[e];var n;return null!=a&&("string"==typeof a&&(yVe(a)||_Ve(a))?a=parseFloat(a):(n=a,!ZVe.find(zVe(n))&&qVe.test(t)&&(a=$Ve(e,t))),this.setBaseTarget(e,IPe(a)?a.get():a)),IPe(a)?a.get():a}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){var t;const{initial:a}=this.props;let n;if("string"==typeof a||"object"==typeof a){const i=GPe(this.props,a,null==(t=this.presenceContext)?void 0:t.custom);i&&(n=i[e])}if(a&&void 0!==n)return n;const i=this.getBaseTargetFromProps(this.props,e);return void 0===i||IPe(i)?void 0!==this.initialValues[e]&&void 0===n?void 0:this.baseTarget[e]:i}on(e,t){return this.events[e]||(this.events[e]=new zPe),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}}const aRe=new Set(["width","height","top","left","right","bottom",...nVe]);let nRe=()=>{},iRe=()=>{};"production"!==process.env.NODE_ENV&&(nRe=(e,t)=>{e||"undefined"==typeof console||console.warn(t)},iRe=(e,t)=>{if(!e)throw new Error(t)});const oRe=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function rRe(e,t,a=1){iRe(a<=4,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[n,i]=function(e){const t=oRe.exec(e);if(!t)return[,];const[,a,n,i]=t;return[`--${a??n}`,i]}(e);if(!n)return;const o=window.getComputedStyle(t).getPropertyValue(n);if(o){const e=o.trim();return yVe(e)?parseFloat(e):e}return INe(i)?rRe(i,t,a+1):i}function sRe(e){return"number"==typeof e?0===e:null===e||("none"===e||"0"===e||_Ve(e))}const lRe=new Set(["auto","none","0"]);class gRe extends IVe{constructor(e,t,a,n,i){super(e,t,a,n,i,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:t,name:a}=this;if(!t||!t.current)return;super.readKeyframes();for(let s=0;s<e.length;s++){let a=e[s];if("string"==typeof a&&(a=a.trim(),INe(a))){const n=rRe(a,t.current);void 0!==n&&(e[s]=n),s===e.length-1&&(this.finalKeyframe=a)}}if(this.resolveNoneKeyframes(),!aRe.has(a)||2!==e.length)return;const[n,i]=e,o=LVe(n),r=LVe(i);if(o!==r)if(gVe(o)&&gVe(r))for(let s=0;s<e.length;s++){const t=e[s];"string"==typeof t&&(e[s]=parseFloat(t))}else cVe[a]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:t}=this,a=[];for(let n=0;n<e.length;n++)(null===e[n]||sRe(e[n]))&&a.push(n);a.length&&function(e,t,a){let n,i=0;for(;i<e.length&&!n;){const t=e[i];"string"==typeof t&&!lRe.has(t)&&NVe(t).values.length&&(n=e[i]),i++}if(n&&a)for(const o of t)e[o]=$Ve(a,n)}(e,a,t)}measureInitialState(){const{element:e,unresolvedKeyframes:t,name:a}=this;if(!e||!e.current)return;"height"===a&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=cVe[a](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;const n=t[t.length-1];void 0!==n&&e.getValue(a,n).jump(n,!1)}measureEndState(){var e;const{element:t,name:a,unresolvedKeyframes:n}=this;if(!t||!t.current)return;const i=t.getValue(a);i&&i.jump(this.measuredOrigin,!1);const o=n.length-1,r=n[o];n[o]=cVe[a](t.measureViewportBox(),window.getComputedStyle(t.current)),null!==r&&void 0===this.finalKeyframe&&(this.finalKeyframe=r),(null==(e=this.removedTransforms)?void 0:e.length)&&this.removedTransforms.forEach(([e,a])=>{t.getValue(e).set(a)}),this.resolveNoneKeyframes()}}class uRe extends tRe{constructor(){super(...arguments),this.KeyframeResolver=gRe}sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){return e.style?e.style[t]:void 0}removeValueFromRenderState(e,{vars:t,style:a}){delete t[e],delete a[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;IPe(e)&&(this.childSubscription=e.on("change",e=>{this.current&&(this.current.textContent=`${e}`)}))}}const dRe=(e,t)=>t&&"number"==typeof e?t.transform(e):e,cRe={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},hRe=nVe.length;function fRe(e,t,a){const{style:n,vars:i,transformOrigin:o}=e;let r=!1,s=!1;for(const l in t){const e=t[l];if(iVe.has(l))r=!0;else if(CNe(l))i[l]=e;else{const t=dRe(e,XVe[l]);l.startsWith("origin")?(s=!0,o[l]=t):n[l]=t}}if(t.transform||(r||a?n.transform=function(e,t,a){let n="",i=!0;for(let o=0;o<hRe;o++){const r=nVe[o],s=e[r];if(void 0===s)continue;let l=!0;if(l="number"==typeof s?s===(r.startsWith("scale")?1:0):0===parseFloat(s),!l||a){const e=dRe(s,XVe[r]);l||(i=!1,n+=`${cRe[r]||r}(${e}) `),a&&(t[r]=e)}}return n=n.trim(),a?n=a(t,i?"":n):i&&(n="none"),n}(t,e.transform,a):n.transform&&(n.transform="none")),s){const{originX:e="50%",originY:t="50%",originZ:a=0}=o;n.transformOrigin=`${e} ${t} ${a}`}}function pRe(e,{style:t,vars:a},n,i){const o=e.style;let r;for(r in t)o[r]=t[r];for(r in null==i||i.applyProjectionStyles(o,n),a)o.setProperty(r,a[r])}function ARe(e,{layout:t,layoutId:a}){return iVe.has(e)||e.startsWith("origin")||(t||void 0!==a)&&(!!_Ne[e]||"opacity"===e)}function CRe(e,t,a){var n;const{style:i}=e,o={};for(const r in i)(IPe(i[r])||t.style&&IPe(t.style[r])||ARe(r,e)||void 0!==(null==(n=null==a?void 0:a.getValue(r))?void 0:n.liveStyle))&&(o[r]=i[r]);return o}class mRe extends uRe{constructor(){super(...arguments),this.type="html",this.renderInstance=pRe}readValueFromInstance(e,t){var a,n;if(iVe.has(t))return(null==(a=this.projection)?void 0:a.isProjecting)?eVe(t):((e,t)=>{const{transform:a="none"}=getComputedStyle(e);return tVe(a,t)})(e,t);{const a=(n=e,window.getComputedStyle(n)),i=(CNe(t)?a.getPropertyValue(t):a[t])||0;return"string"==typeof i?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:t}){return function(e,t){return function({top:e,left:t,right:a,bottom:n}){return{x:{min:t,max:a},y:{min:e,max:n}}}(function(e,t){if(!t)return e;const a=t({x:e.left,y:e.top}),n=t({x:e.right,y:e.bottom});return{top:a.y,left:a.x,bottom:n.y,right:n.x}}(e.getBoundingClientRect(),t))}(e,t)}build(e,t,a){fRe(e,t,a.transformTemplate)}scrapeMotionValuesFromProps(e,t,a){return CRe(e,t,a)}}const IRe=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),yRe={offset:"stroke-dashoffset",array:"stroke-dasharray"},_Re={offset:"strokeDashoffset",array:"strokeDasharray"};function FRe(e,{attrX:t,attrY:a,attrScale:n,pathLength:i,pathSpacing:o=1,pathOffset:r=0,...s},l,g,u){if(fRe(e,s,g),l)return void(e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox));e.attrs=e.style,e.style={};const{attrs:d,style:c}=e;d.transform&&(c.transform=d.transform,delete d.transform),(c.transform||d.transformOrigin)&&(c.transformOrigin=d.transformOrigin??"50% 50%",delete d.transformOrigin),c.transform&&(c.transformBox=(null==u?void 0:u.transformBox)??"fill-box",delete d.transformBox),void 0!==t&&(d.x=t),void 0!==a&&(d.y=a),void 0!==n&&(d.scale=n),void 0!==i&&function(e,t,a=1,n=0,i=!0){e.pathLength=1;const o=i?yRe:_Re;e[o.offset]=pPe.transform(-n);const r=pPe.transform(t),s=pPe.transform(a);e[o.array]=`${r} ${s}`}(d,i,o,r,!1)}const bRe=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"]);class vRe extends uRe{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=OPe}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(iVe.has(t)){const e=JVe(t);return e&&e.default||0}return t=bRe.has(t)?t:IRe(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,a){return function(e,t,a){const n=CRe(e,t,a);for(const i in e)(IPe(e[i])||IPe(t[i]))&&(n[-1!==nVe.indexOf(i)?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i]=e[i]);return n}(e,t,a)}build(e,t,a){FRe(e,t,this.isSVGTag,a.transformTemplate,a.style)}renderInstance(e,t,a,n){!function(e,t,a,n){pRe(e,t,void 0,n);for(const i in t.attrs)e.setAttribute(bRe.has(i)?i:IRe(i),t.attrs[i])}(e,t,0,n)}mount(e){var t;this.isSVGTag="string"==typeof(t=e.tagName)&&"svg"===t.toLowerCase(),super.mount(e)}}function kRe(e){return"object"==typeof e&&!Array.isArray(e)}function wRe(e,t,a){if(e instanceof EventTarget)return[e];if("string"==typeof e){let t=document;const n=(null==a?void 0:a[e])??t.querySelectorAll(e);return n?Array.from(n):[]}return Array.from(e)}function xRe(e,t,a,n){return"string"==typeof e&&kRe(t)?wRe(e,0,n):e instanceof NodeList?Array.from(e):Array.isArray(e)?e:[e]}function ORe(e,t,a){return e*(t+1)}function ERe(e,t,a,n){return"number"==typeof t?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,e+parseFloat(t)):"<"===t?a:t.startsWith("<")?Math.max(0,a+parseFloat(t.slice(1))):n.get(t)??e}const DRe=(e,t,a)=>e+(t-e)*a,MRe=e=>Array.isArray(e)&&"number"!=typeof e[0];function SRe(e,t){return MRe(e)?e[((e,t,a)=>{const n=t-e;return((a-e)%n+n)%n+e})(0,e.length,t)]:e}function BRe(e,t,a,n,i,o){!function(e,t,a){for(let n=0;n<e.length;n++){const i=e[n];i.at>t&&i.at<a&&(qPe(e,i),n--)}}(e,i,o);for(let r=0;r<t.length;r++)e.push({value:t[r],at:DRe(i,o,n[r]),easing:SRe(a,r)})}function jRe(e,t){for(let a=0;a<e.length;a++)e[a]=e[a]/(t+1)}function TRe(e,t){return e.at===t.at?null===e.value?1:null===t.value?-1:0:e.at-t.at}const NRe=(e,t,a)=>{const n=t-e;return 0===n?1:(a-e)/n};function PRe(e,t){const a=e[e.length-1];for(let n=1;n<=t;n++){const i=NRe(0,t,n);e.push(DRe(a,1,i))}}function VRe(e){const t=[0];return PRe(t,e.length-1),t}const RRe=2e4;function qRe(e){let t=0;let a=e.next(t);for(;!a.done&&t<RRe;)t+=50,a=e.next(t);return t>=RRe?1/0:t}const zRe=e=>1e3*e,QRe=e=>e/1e3;function LRe(e,t=100,a){const n=a({...e,keyframes:[0,t]}),i=Math.min(qRe(n),RRe);return{type:"keyframes",ease:e=>n.next(i*e).value/t,duration:QRe(i)}}function ZRe(e){return"function"==typeof e&&"applyToOptions"in e}function HRe(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function GRe(e,t){return t[e]||(t[e]=[]),t[e]}function YRe(e){return Array.isArray(e)?e:[e]}function URe(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}const WRe=e=>"number"==typeof e,XRe=e=>e.every(WRe);function KRe(e,t,a){e.hasValue(t)?e.getValue(t).set(a):e.addValue(t,ZPe(a))}function JRe(e){return(e=>Array.isArray(e))(e)?e[e.length-1]||0:e}function $Re(e,t){const a=function(e,t){const a=e.getProps();return GPe(a,t,a.custom,e)}(e,t);let{transitionEnd:n={},transition:i={},...o}=a||{};o={...o,...n};for(const r in o){KRe(e,r,JRe(o[r]))}}function eqe(e,t){const a=e.getValue("willChange");if(n=a,Boolean(IPe(n)&&n.add))return a.add(t);if(!a&&LNe.WillChange){const a=new LNe.WillChange("auto");e.addValue("willChange",a),a.add(t)}var n}const tqe="data-"+IRe("framerAppearId");function aqe(e){return e.props[tqe]}const nqe=e=>null!==e;const iqe={type:"spring",stiffness:500,damping:25,restSpeed:10},oqe={type:"keyframes",duration:.8},rqe={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},sqe=(e,{keyframes:t})=>t.length>2?oqe:iVe.has(e)?e.startsWith("scale")?{type:"spring",stiffness:550,damping:0===t[1]?2*Math.sqrt(550):30,restSpeed:10}:iqe:rqe;function lqe(e,t){return(null==e?void 0:e[t])??(null==e?void 0:e.default)??e}function gqe(e,t,a){return a<0&&(a+=1),a>1&&(a-=1),a<1/6?e+6*(t-e)*a:a<.5?t:a<2/3?e+(t-e)*(2/3-a)*6:e}function uqe(e,t){return a=>a>0?t:e}const dqe=(e,t,a)=>{const n=e*e,i=a*(t*t-n)+n;return i<0?0:Math.sqrt(i)},cqe=[EVe,OVe,DVe];function hqe(e){const t=(a=e,cqe.find(e=>e.test(a)));var a;if(nRe(Boolean(t),`'${e}' is not an animatable color. Use the equivalent color code instead.`),!Boolean(t))return!1;let n=t.parse(e);return t===DVe&&(n=function({hue:e,saturation:t,lightness:a,alpha:n}){e/=360,a/=100;let i=0,o=0,r=0;if(t/=100){const n=a<.5?a*(1+t):a+t-a*t,s=2*a-n;i=gqe(s,n,e+1/3),o=gqe(s,n,e),r=gqe(s,n,e-1/3)}else i=o=r=a;return{red:Math.round(255*i),green:Math.round(255*o),blue:Math.round(255*r),alpha:n}}(n)),n}const fqe=(e,t)=>{const a=hqe(e),n=hqe(t);if(!a||!n)return uqe(e,t);const i={...a};return e=>(i.red=dqe(a.red,n.red,e),i.green=dqe(a.green,n.green,e),i.blue=dqe(a.blue,n.blue,e),i.alpha=DRe(a.alpha,n.alpha,e),OVe.transform(i))},pqe=new Set(["none","hidden"]);const Aqe=(e,t)=>a=>t(e(a)),Cqe=(...e)=>e.reduce(Aqe);function mqe(e,t){return a=>DRe(e,t,a)}function Iqe(e){return"number"==typeof e?mqe:"string"==typeof e?INe(e)?uqe:MVe.test(e)?fqe:Fqe:Array.isArray(e)?yqe:"object"==typeof e?MVe.test(e)?fqe:_qe:uqe}function yqe(e,t){const a=[...e],n=a.length,i=e.map((e,a)=>Iqe(e)(e,t[a]));return e=>{for(let t=0;t<n;t++)a[t]=i[t](e);return a}}function _qe(e,t){const a={...e,...t},n={};for(const i in a)void 0!==e[i]&&void 0!==t[i]&&(n[i]=Iqe(e[i])(e[i],t[i]));return e=>{for(const t in n)a[t]=n[t](e);return a}}const Fqe=(e,t)=>{const a=qVe.createTransformer(t),n=NVe(e),i=NVe(t);return n.indexes.var.length===i.indexes.var.length&&n.indexes.color.length===i.indexes.color.length&&n.indexes.number.length>=i.indexes.number.length?pqe.has(e)&&!i.values.length||pqe.has(t)&&!n.values.length?function(e,t){return pqe.has(e)?a=>a<=0?e:t:a=>a>=1?t:e}(e,t):Cqe(yqe(function(e,t){const a=[],n={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const o=t.types[i],r=e.indexes[o][n[o]],s=e.values[r]??0;a[i]=s,n[o]++}return a}(n,i),i.values),a):(nRe(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),uqe(e,t))};function bqe(e,t,a){if("number"==typeof e&&"number"==typeof t&&"number"==typeof a)return DRe(e,t,a);return Iqe(e)(e,t)}const vqe=e=>{const t=({timestamp:t})=>e(t);return{start:(e=!0)=>HNe.update(t,e),stop:()=>GNe(t),now:()=>YNe.isProcessing?YNe.timestamp:NPe.now()}},kqe=(e,t,a=10)=>{let n="";const i=Math.max(Math.round(t/a),2);for(let o=0;o<i;o++)n+=Math.round(1e4*e(o/(i-1)))/1e4+", ";return`linear(${n.substring(0,n.length-2)})`};function wqe(e,t,a){const n=Math.max(t-5,0);return QPe(a-e(n),t-n)}const xqe=100,Oqe=10,Eqe=1,Dqe=0,Mqe=800,Sqe=.3,Bqe=.3,jqe={granular:.01,default:2},Tqe={granular:.005,default:.5},Nqe=.01,Pqe=10,Vqe=.05,Rqe=1,qqe=.001;function zqe({duration:e=Mqe,bounce:t=Sqe,velocity:a=Dqe,mass:n=Eqe}){let i,o;nRe(e<=zRe(Pqe),"Spring duration must be 10 seconds or less");let r=1-t;r=oVe(Vqe,Rqe,r),e=oVe(Nqe,Pqe,QRe(e)),r<1?(i=t=>{const n=t*r,i=n*e,o=n-a,s=Lqe(t,r),l=Math.exp(-i);return qqe-o/s*l},o=t=>{const n=t*r*e,o=n*a+a,s=Math.pow(r,2)*Math.pow(t,2)*e,l=Math.exp(-n),g=Lqe(Math.pow(t,2),r);return(-i(t)+qqe>0?-1:1)*((o-s)*l)/g}):(i=t=>Math.exp(-t*e)*((t-a)*e+1)-.001,o=t=>Math.exp(-t*e)*(e*e*(a-t)));const s=function(e,t,a){let n=a;for(let i=1;i<Qqe;i++)n-=e(n)/t(n);return n}(i,o,5/e);if(e=zRe(e),isNaN(s))return{stiffness:xqe,damping:Oqe,duration:e};{const t=Math.pow(s,2)*n;return{stiffness:t,damping:2*r*Math.sqrt(n*t),duration:e}}}const Qqe=12;function Lqe(e,t){return e*Math.sqrt(1-t*t)}const Zqe=["duration","bounce"],Hqe=["stiffness","damping","mass"];function Gqe(e,t){return t.some(t=>void 0!==e[t])}function Yqe(e=Bqe,t=Sqe){const a="object"!=typeof e?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:n,restDelta:i}=a;const o=a.keyframes[0],r=a.keyframes[a.keyframes.length-1],s={done:!1,value:o},{stiffness:l,damping:g,mass:u,duration:d,velocity:c,isResolvedFromDuration:h}=function(e){let t={velocity:Dqe,stiffness:xqe,damping:Oqe,mass:Eqe,isResolvedFromDuration:!1,...e};if(!Gqe(e,Hqe)&&Gqe(e,Zqe))if(e.visualDuration){const a=e.visualDuration,n=2*Math.PI/(1.2*a),i=n*n,o=2*oVe(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:Eqe,stiffness:i,damping:o}}else{const a=zqe(e);t={...t,...a,mass:Eqe},t.isResolvedFromDuration=!0}return t}({...a,velocity:-QRe(a.velocity||0)}),f=c||0,p=g/(2*Math.sqrt(l*u)),A=r-o,C=QRe(Math.sqrt(l/u)),m=Math.abs(A)<5;let I;if(n||(n=m?jqe.granular:jqe.default),i||(i=m?Tqe.granular:Tqe.default),p<1){const e=Lqe(C,p);I=t=>{const a=Math.exp(-p*C*t);return r-a*((f+p*C*A)/e*Math.sin(e*t)+A*Math.cos(e*t))}}else if(1===p)I=e=>r-Math.exp(-C*e)*(A+(f+C*A)*e);else{const e=C*Math.sqrt(p*p-1);I=t=>{const a=Math.exp(-p*C*t),n=Math.min(e*t,300);return r-a*((f+p*C*A)*Math.sinh(n)+e*A*Math.cosh(n))/e}}const y={calculatedDuration:h&&d||null,next:e=>{const t=I(e);if(h)s.done=e>=d;else{let a=0===e?f:0;p<1&&(a=0===e?zRe(f):wqe(I,e,t));const o=Math.abs(a)<=n,l=Math.abs(r-t)<=i;s.done=o&&l}return s.value=s.done?r:t,s},toString:()=>{const e=Math.min(qRe(y),RRe),t=kqe(t=>y.next(e*t).value,e,30);return e+"ms "+t},toTransition:()=>{}};return y}function Uqe({keyframes:e,velocity:t=0,power:a=.8,timeConstant:n=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:r,min:s,max:l,restDelta:g=.5,restSpeed:u}){const d=e[0],c={done:!1,value:d},h=e=>void 0===s?l:void 0===l||Math.abs(s-e)<Math.abs(l-e)?s:l;let f=a*t;const p=d+f,A=void 0===r?p:r(p);A!==p&&(f=A-d);const C=e=>-f*Math.exp(-e/n),m=e=>A+C(e),I=e=>{const t=C(e),a=m(e);c.done=Math.abs(t)<=g,c.value=c.done?A:a};let y,_;const F=e=>{var t;(t=c.value,void 0!==s&&t<s||void 0!==l&&t>l)&&(y=e,_=Yqe({keyframes:[c.value,h(c.value)],velocity:wqe(m,e,c.value),damping:i,stiffness:o,restDelta:g,restSpeed:u}))};return F(0),{calculatedDuration:null,next:e=>{let t=!1;return _||void 0!==y||(t=!0,I(e),F(e)),void 0!==y&&e>=y?_.next(e-y):(!t&&I(e),c)}}}function Wqe(e,t,{clamp:a=!0,ease:n,mixer:i}={}){const o=e.length;if(iRe(o===t.length,"Both input and output ranges must be the same length"),1===o)return()=>t[0];if(2===o&&t[0]===t[1])return()=>t[1];const r=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=function(e,t,a){const n=[],i=a||LNe.mix||bqe,o=e.length-1;for(let r=0;r<o;r++){let a=i(e[r],e[r+1]);if(t){const e=Array.isArray(t)?t[r]||zNe:t;a=Cqe(e,a)}n.push(a)}return n}(t,n,i),l=s.length,g=a=>{if(r&&a<e[0])return t[0];let n=0;if(l>1)for(;n<e.length-2&&!(a<e[n+1]);n++);const i=NRe(e[n],e[n+1],a);return s[n](i)};return a?t=>g(oVe(e[0],e[o-1],t)):g}Yqe.applyToOptions=e=>{const t=LRe(e,100,Yqe);return e.ease=t.ease,e.duration=zRe(t.duration),e.type="keyframes",e};const Xqe=(e,t,a)=>(((1-3*a+3*t)*e+(3*a-6*t))*e+3*t)*e;function Kqe(e,t,a,n){if(e===t&&a===n)return zNe;const i=t=>function(e,t,a,n,i){let o,r,s=0;do{r=t+(a-t)/2,o=Xqe(r,n,i)-e,o>0?a=r:t=r}while(Math.abs(o)>1e-7&&++s<12);return r}(t,0,1,e,a);return e=>0===e||1===e?e:Xqe(i(e),t,n)}const Jqe=Kqe(.42,0,1,1),$qe=Kqe(0,0,.58,1),eze=Kqe(.42,0,.58,1),tze=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,aze=e=>t=>1-e(1-t),nze=Kqe(.33,1.53,.69,.99),ize=aze(nze),oze=tze(ize),rze=e=>(e*=2)<1?.5*ize(e):.5*(2-Math.pow(2,-10*(e-1))),sze=e=>1-Math.sin(Math.acos(e)),lze=aze(sze),gze=tze(sze),uze=e=>Array.isArray(e)&&"number"==typeof e[0],dze={linear:zNe,easeIn:Jqe,easeInOut:eze,easeOut:$qe,circIn:sze,circInOut:gze,circOut:lze,backIn:ize,backInOut:oze,backOut:nze,anticipate:rze},cze=e=>{if(uze(e)){iRe(4===e.length,"Cubic bezier arrays must contain four numerical values.");const[t,a,n,i]=e;return Kqe(t,a,n,i)}return"string"==typeof e?(iRe(void 0!==dze[e],`Invalid easing type '${e}'`),dze[e]):e};function hze({duration:e=300,keyframes:t,times:a,ease:n="easeInOut"}){const i=MRe(n)?n.map(cze):cze(n),o={done:!1,value:t[0]},r=function(e,t){return e.map(e=>e*t)}(a&&a.length===t.length?a:VRe(t),e),s=Wqe(r,t,{ease:Array.isArray(i)?i:(l=t,g=i,l.map(()=>g||eze).splice(0,l.length-1))});var l,g;return{calculatedDuration:e,next:t=>(o.value=s(t),o.done=t>=e,o)}}const fze=e=>null!==e;function pze(e,{repeat:t,repeatType:a="loop"},n,i=1){const o=e.filter(fze),r=i<0||t&&"loop"!==a&&t%2==1?0:o.length-1;return r&&void 0!==n?n:o[r]}const Aze={decay:Uqe,inertia:Uqe,tween:hze,keyframes:hze,spring:Yqe};function Cze(e){"string"==typeof e.type&&(e.type=Aze[e.type])}class mze{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}}const Ize=e=>e/100;class yze extends mze{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var e,t;const{motionValue:a}=this.options;a&&a.updatedAt!==NPe.now()&&this.tick(NPe.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),null==(t=(e=this.options).onStop)||t.call(e))},this.options=e,this.initAnimation(),this.play(),!1===e.autoplay&&this.pause()}initAnimation(){const{options:e}=this;Cze(e);const{type:t=hze,repeat:a=0,repeatDelay:n=0,repeatType:i,velocity:o=0}=e;let{keyframes:r}=e;const s=t||hze;"production"!==process.env.NODE_ENV&&s!==hze&&iRe(r.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${r}`),s!==hze&&"number"!=typeof r[0]&&(this.mixKeyframes=Cqe(Ize,bqe(r[0],r[1])),r=[0,100]);const l=s({...e,keyframes:r});"mirror"===i&&(this.mirroredGenerator=s({...e,keyframes:[...r].reverse(),velocity:-o})),null===l.calculatedDuration&&(l.calculatedDuration=qRe(l));const{calculatedDuration:g}=l;this.calculatedDuration=g,this.resolvedDuration=g+n,this.totalDuration=this.resolvedDuration*(a+1)-n,this.generator=l}updateTime(e){const t=Math.round(e-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=t}tick(e,t=!1){const{generator:a,totalDuration:n,mixKeyframes:i,mirroredGenerator:o,resolvedDuration:r,calculatedDuration:s}=this;if(null===this.startTime)return a.next(0);const{delay:l=0,keyframes:g,repeat:u,repeatType:d,repeatDelay:c,type:h,onUpdate:f,finalKeyframe:p}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-n/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);const A=this.currentTime-l*(this.playbackSpeed>=0?1:-1),C=this.playbackSpeed>=0?A<0:A>n;this.currentTime=Math.max(A,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=n);let m=this.currentTime,I=a;if(u){const e=Math.min(this.currentTime,n)/r;let t=Math.floor(e),a=e%1;!a&&e>=1&&(a=1),1===a&&t--,t=Math.min(t,u+1);Boolean(t%2)&&("reverse"===d?(a=1-a,c&&(a-=c/r)):"mirror"===d&&(I=o)),m=oVe(0,1,a)*r}const y=C?{done:!1,value:g[0]}:I.next(m);i&&(y.value=i(y.value));let{done:_}=y;C||null===s||(_=this.playbackSpeed>=0?this.currentTime>=n:this.currentTime<=0);const F=null===this.holdTime&&("finished"===this.state||"running"===this.state&&_);return F&&h!==Uqe&&(y.value=pze(g,this.options,p,this.speed)),f&&f(y.value),F&&this.finish(),y}then(e,t){return this.finished.then(e,t)}get duration(){return QRe(this.calculatedDuration)}get time(){return QRe(this.currentTime)}set time(e){var t;e=zRe(e),this.currentTime=e,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),null==(t=this.driver)||t.start(!1)}get speed(){return this.playbackSpeed}set speed(e){this.updateTime(NPe.now());const t=this.playbackSpeed!==e;this.playbackSpeed=e,t&&(this.time=QRe(this.currentTime))}play(){var e,t;if(this.isStopped)return;const{driver:a=vqe,startTime:n}=this.options;this.driver||(this.driver=a(e=>this.tick(e))),null==(t=(e=this.options).onPlay)||t.call(e);const i=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=i):null!==this.holdTime?this.startTime=i-this.holdTime:this.startTime||(this.startTime=n??i),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(NPe.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&this.play(),this.state="finished",this.holdTime=null}finish(){var e,t;this.notifyFinished(),this.teardown(),this.state="finished",null==(t=(e=this.options).onComplete)||t.call(e)}cancel(){var e,t;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),null==(t=(e=this.options).onCancel)||t.call(e)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){var t;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),null==(t=this.driver)||t.stop(),e.observe(this)}}function _ze(e){let t;return()=>(void 0===t&&(t=e()),t)}const Fze=_ze(()=>void 0!==window.ScrollTimeline),bze={};function vze(e,t){const a=_ze(e);return()=>bze[t]??a()}const kze=vze(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(e){return!1}return!0},"linearEasing"),wze=([e,t,a,n])=>`cubic-bezier(${e}, ${t}, ${a}, ${n})`,xze={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:wze([0,.65,.55,1]),circOut:wze([.55,0,1,.45]),backIn:wze([.31,.01,.66,-.59]),backOut:wze([.33,1.53,.69,.99])};function Oze(e,t){return e?"function"==typeof e?kze()?kqe(e,t):"ease-out":uze(e)?wze(e):Array.isArray(e)?e.map(e=>Oze(e,t)||xze.easeOut):xze[e]:void 0}function Eze(e,t,a,{delay:n=0,duration:i=300,repeat:o=0,repeatType:r="loop",ease:s="easeOut",times:l}={},g=void 0){const u={[t]:a};l&&(u.offset=l);const d=Oze(s,i);Array.isArray(d)&&(u.easing=d);const c={delay:n,duration:i,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:o+1,direction:"reverse"===r?"alternate":"normal"};g&&(c.pseudoElement=g);return e.animate(u,c)}class Dze extends mze{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,!e)return;const{element:t,name:a,keyframes:n,pseudoElement:i,allowFlatten:o=!1,finalKeyframe:r,onComplete:s}=e;this.isPseudoElement=Boolean(i),this.allowFlatten=o,this.options=e,iRe("string"!=typeof e.type,'animateMini doesn\'t support "type" as a string. Did you mean to import { spring } from "motion"?');const l=function({type:e,...t}){return ZRe(e)&&kze()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}(e);this.animation=Eze(t,a,n,l,i),!1===l.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){const e=pze(n,this.options,r,this.speed);this.updateMotionValue?this.updateMotionValue(e):function(e,t,a){(e=>e.startsWith("--"))(t)?e.style.setProperty(t,a):e.style[t]=a}(t,a,e),this.animation.cancel()}null==s||s(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){var e,t;null==(t=(e=this.animation).finish)||t.call(e)}cancel(){try{this.animation.cancel()}catch(e){}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;"idle"!==e&&"finished"!==e&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var e,t;this.isPseudoElement||null==(t=(e=this.animation).commitStyles)||t.call(e)}get duration(){var e,t;const a=(null==(t=null==(e=this.animation.effect)?void 0:e.getComputedTiming)?void 0:t.call(e).duration)||0;return QRe(Number(a))}get time(){return QRe(Number(this.animation.currentTime)||0)}set time(e){this.finishedTime=null,this.animation.currentTime=zRe(e)}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(e){this.animation.startTime=e}attachTimeline({timeline:e,observe:t}){var a;return this.allowFlatten&&(null==(a=this.animation.effect)||a.updateTiming({easing:"linear"})),this.animation.onfinish=null,e&&Fze()?(this.animation.timeline=e,zNe):t(this)}}const Mze={anticipate:rze,backInOut:oze,circInOut:gze};function Sze(e){"string"==typeof e.ease&&e.ease in Mze&&(e.ease=Mze[e.ease])}class Bze extends Dze{constructor(e){Sze(e),Cze(e),super(e),e.startTime&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:t,onUpdate:a,onComplete:n,element:i,...o}=this.options;if(!t)return;if(void 0!==e)return void t.set(e);const r=new yze({...o,autoplay:!1}),s=zRe(this.finishedTime??this.time);t.setWithVelocity(r.sample(s-10).value,r.sample(s).value,10),r.stop()}}const jze=(e,t)=>"zIndex"!==t&&(!("number"!=typeof e&&!Array.isArray(e))||!("string"!=typeof e||!qVe.test(e)&&"0"!==e||e.startsWith("url(")));function Tze(e){return"object"==typeof e&&null!==e}function Nze(e){return Tze(e)&&"offsetHeight"in e}const Pze=new Set(["opacity","clipPath","filter","transform"]),Vze=_ze(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));class Rze extends mze{constructor({autoplay:e=!0,delay:t=0,type:a="keyframes",repeat:n=0,repeatDelay:i=0,repeatType:o="loop",keyframes:r,name:s,motionValue:l,element:g,...u}){var d;super(),this.stop=()=>{var e,t;this._animation&&(this._animation.stop(),null==(e=this.stopTimeline)||e.call(this)),null==(t=this.keyframeResolver)||t.cancel()},this.createdAt=NPe.now();const c={autoplay:e,delay:t,type:a,repeat:n,repeatDelay:i,repeatType:o,name:s,motionValue:l,element:g,...u},h=(null==g?void 0:g.KeyframeResolver)||IVe;this.keyframeResolver=new h(r,(e,t,a)=>this.onKeyframesResolved(e,t,c,!a),s,l,g),null==(d=this.keyframeResolver)||d.scheduleResolve()}onKeyframesResolved(e,t,a,n){this.keyframeResolver=void 0;const{name:i,type:o,velocity:r,delay:s,isHandoff:l,onUpdate:g}=a;this.resolvedAt=NPe.now(),function(e,t,a,n){const i=e[0];if(null===i)return!1;if("display"===t||"visibility"===t)return!0;const o=e[e.length-1],r=jze(i,t),s=jze(o,t);return nRe(r===s,`You are trying to animate ${t} from "${i}" to "${o}". ${i} is not an animatable value - to enable this animation set ${i} to a value animatable to ${o} via the \`style\` property.`),!(!r||!s)&&(function(e){const t=e[0];if(1===e.length)return!0;for(let a=0;a<e.length;a++)if(e[a]!==t)return!0}(e)||("spring"===a||ZRe(a))&&n)}(e,i,o,r)||(!LNe.instantAnimations&&s||null==g||g(pze(e,a,t)),e[0]=e[e.length-1],a.duration=0,a.repeat=0);const u={startTime:n?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...a,keyframes:e},d=!l&&function(e){var t;const{motionValue:a,name:n,repeatDelay:i,repeatType:o,damping:r,type:s}=e;if(!Nze(null==(t=null==a?void 0:a.owner)?void 0:t.current))return!1;const{onUpdate:l,transformTemplate:g}=a.owner.getProps();return Vze()&&n&&Pze.has(n)&&("transform"!==n||!g)&&!l&&!i&&"mirror"!==o&&0!==r&&"inertia"!==s}(u)?new Bze({...u,element:u.motionValue.owner.current}):new yze(u);d.finished.then(()=>this.notifyFinished()).catch(zNe),this.pendingTimeline&&(this.stopTimeline=d.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=d}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){var e;return this._animation||(null==(e=this.keyframeResolver)||e.resume(),AVe=!0,mVe(),CVe(),AVe=!1),this._animation}get duration(){return this.animation.duration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var e;this._animation&&this.animation.cancel(),null==(e=this.keyframeResolver)||e.cancel()}}const qze=(e,t,a,n={},i,o)=>r=>{const s=lqe(n,e)||{},l=s.delay||n.delay||0;let{elapsed:g=0}=n;g-=zRe(l);const u={keyframes:Array.isArray(a)?a:[null,a],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-g,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{r(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:o?void 0:i};(function({when:e,delay:t,delayChildren:a,staggerChildren:n,staggerDirection:i,repeat:o,repeatType:r,repeatDelay:s,from:l,elapsed:g,...u}){return!!Object.keys(u).length})(s)||Object.assign(u,sqe(e,u)),u.duration&&(u.duration=zRe(u.duration)),u.repeatDelay&&(u.repeatDelay=zRe(u.repeatDelay)),void 0!==u.from&&(u.keyframes[0]=u.from);let d=!1;if((!1===u.type||0===u.duration&&!u.repeatDelay)&&(u.duration=0,0===u.delay&&(d=!0)),(LNe.instantAnimations||LNe.skipAnimations)&&(d=!0,u.duration=0,u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!o&&void 0!==t.get()){const e=function(e,{repeat:t,repeatType:a="loop"}){const n=e.filter(nqe);return n[t&&"loop"!==a&&t%2==1?0:n.length-1]}(u.keyframes,s);if(void 0!==e)return void HNe.update(()=>{u.onUpdate(e),u.onComplete()})}return s.isSync?new yze(u):new Rze(u)};function zze({protectedKeys:e,needsAnimating:t},a){const n=e.hasOwnProperty(a)&&!0!==t[a];return t[a]=!1,n}function Qze(e,t,{delay:a=0,transitionOverride:n,type:i}={}){let{transition:o=e.getDefaultTransition(),transitionEnd:r,...s}=t;n&&(o=n);const l=[],g=i&&e.animationState&&e.animationState.getState()[i];for(const u in s){const t=e.getValue(u,e.latestValues[u]??null),n=s[u];if(void 0===n||g&&zze(g,u))continue;const i={delay:a,...lqe(o||{},u)},r=t.get();if(void 0!==r&&!t.isAnimating&&!Array.isArray(n)&&n===r&&!i.velocity)continue;let d=!1;if(window.MotionHandoffAnimation){const t=aqe(e);if(t){const e=window.MotionHandoffAnimation(t,u,HNe);null!==e&&(i.startTime=e,d=!0)}}eqe(e,u),t.start(qze(u,t,n,e.shouldReduceMotion&&aRe.has(u)?{type:!1}:i,e,d));const c=t.animation;c&&l.push(c)}return r&&Promise.all(l).then(()=>{HNe.update(()=>{r&&$Re(e,r)})}),l}class Lze extends tRe{constructor(){super(...arguments),this.type="object"}readValueFromInstance(e,t){if(function(e,t){return e in t}(t,e)){const a=e[t];if("string"==typeof a||"number"==typeof a)return a}}getBaseTargetFromProps(){}removeValueFromRenderState(e,t){delete t.output[e]}measureInstanceViewportBox(){return{x:{min:0,max:0},y:{min:0,max:0}}}build(e,t){Object.assign(e.output,t)}renderInstance(e,{output:t}){Object.assign(e,t)}sortInstanceNodePosition(){return 0}}function Zze(e){return Tze(e)&&"ownerSVGElement"in e}function Hze(e){return Zze(e)&&"svg"===e.tagName}function Gze(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},a=Zze(e)&&!Hze(e)?new vRe(t):new mRe(t);a.mount(e),$Ne.set(e,a)}function Yze(e){const t=new Lze({presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}});t.mount(e),$Ne.set(e,t)}function Uze(e,t,a){const n=IPe(e)?e:ZPe(e);return n.start(qze("",n,t,a)),n.animation}function Wze(e,t,a,n){const i=[];if(function(e,t){return IPe(e)||"number"==typeof e||"string"==typeof e&&!kRe(t)}(e,t))i.push(Uze(e,kRe(t)&&t.default||t,a&&a.default||a));else{const n=xRe(e,t),o=n.length;iRe(Boolean(o),"No valid elements provided.");for(let e=0;e<o;e++){const r=n[e],s=r instanceof Element?Gze:Yze;$Ne.has(r)||s(r);const l=$Ne.get(r),g={...a};"delay"in g&&"function"==typeof g.delay&&(g.delay=g.delay(e,o)),i.push(...Qze(l,{...t,transition:g},{}))}}return i}function Xze(e,t,a){const n=[],i=function(e,{defaultTransition:t={},...a}={},n,i){const o=t.duration||.3,r=new Map,s=new Map,l={},g=new Map;let u=0,d=0,c=0;for(let h=0;h<e.length;h++){const a=e[h];if("string"==typeof a){g.set(a,d);continue}if(!Array.isArray(a)){g.set(a.name,ERe(d,a.at,u,g));continue}let[n,r,f={}]=a;void 0!==f.at&&(d=ERe(d,f.at,u,g));let p=0;const A=(e,a,n,r=0,s=0)=>{const l=YRe(e),{delay:g=0,times:u=VRe(l),type:h="keyframes",repeat:f,repeatType:A,repeatDelay:C=0,...m}=a;let{ease:I=t.ease||"easeOut",duration:y}=a;const _="function"==typeof g?g(r,s):g,F=l.length,b=ZRe(h)?h:null==i?void 0:i[h||"keyframes"];if(F<=2&&b){let e=100;if(2===F&&XRe(l)){const t=l[1]-l[0];e=Math.abs(t)}const t={...m};void 0!==y&&(t.duration=zRe(y));const a=LRe(t,e,b);I=a.ease,y=a.duration}y??(y=o);const v=d+_;1===u.length&&0===u[0]&&(u[1]=1);const k=u.length-l.length;if(k>0&&PRe(u,k),1===l.length&&l.unshift(null),f){iRe(f<20,"Repeat count too high, must be less than 20"),y=ORe(y,f);const e=[...l],t=[...u];I=Array.isArray(I)?[...I]:[I];const a=[...I];for(let n=0;n<f;n++){l.push(...e);for(let i=0;i<e.length;i++)u.push(t[i]+(n+1)),I.push(0===i?"linear":SRe(a,i-1))}jRe(u,f)}const w=v+y;BRe(n,l,I,u,v,w),p=Math.max(_+y,p),c=Math.max(w,c)};if(IPe(n))A(r,f,GRe("default",HRe(n,s)));else{const e=xRe(n,r,0,l),t=e.length;for(let a=0;a<t;a++){const n=HRe(e[a],s);for(const e in r)A(r[e],URe(f,e),GRe(e,n),a,t)}}u=d,d+=p}return s.forEach((e,n)=>{for(const i in e){const o=e[i];o.sort(TRe);const s=[],l=[],g=[];for(let e=0;e<o.length;e++){const{at:t,value:a,easing:n}=o[e];s.push(a),l.push(NRe(0,c,t)),g.push(n||"easeOut")}0!==l[0]&&(l.unshift(0),s.unshift(s[0]),g.unshift("easeInOut")),1!==l[l.length-1]&&(l.push(1),s.push(null)),r.has(n)||r.set(n,{keyframes:{},transition:{}});const u=r.get(n);u.keyframes[i]=s,u.transition[i]={...t,duration:c,ease:g,times:l,...a}}}),r}(e,t,0,{spring:Yqe});return i.forEach(({keyframes:e,transition:t},a)=>{n.push(...Wze(a,e,t))}),n}class Kze{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}get finished(){return Promise.all(this.animations.map(e=>e.finished))}getAll(e){return this.animations[0][e]}setAll(e,t){for(let a=0;a<this.animations.length;a++)this.animations[a][e]=t}attachTimeline(e){const t=this.animations.map(t=>t.attachTimeline(e));return()=>{t.forEach((e,t)=>{e&&e(),this.animations[t].stop()})}}get time(){return this.getAll("time")}set time(e){this.setAll("time",e)}get speed(){return this.getAll("speed")}set speed(e){this.setAll("speed",e)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){let e=0;for(let t=0;t<this.animations.length;t++)e=Math.max(e,this.animations[t].duration);return e}runAll(e){this.animations.forEach(t=>t[e]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class Jze extends Kze{then(e,t){return this.finished.finally(e).then(()=>{})}}const $ze=function(e,t,a){let n=[];var i;return i=e,n=Array.isArray(i)&&i.some(Array.isArray)?Xze(e,t):Wze(e,t,a),new Jze(n)},eQe=["initial","animate","whileInView","whileHover","whilePress","whileDrag","whileFocus","exit"];const tQe=!1;const aQe=(e,t)=>!!t&&(e===t||aQe(e,t.parentElement));function nQe(e,t){const a=wRe(e),n=new AbortController;return[a,{passive:!0,...t,signal:n.signal},()=>n.abort()]}const iQe=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);const oQe=new WeakSet;function rQe(e){return t=>{"Enter"===t.key&&e(t)}}function sQe(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}function lQe(e){return(e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary)(e)&&!0}function gQe(e,t,a={}){const[n,i,o]=nQe(e,a),r=e=>{const n=e.currentTarget;if(!lQe(e))return;oQe.add(n);const o=t(n,e),r=(e,t)=>{window.removeEventListener("pointerup",s),window.removeEventListener("pointercancel",l),oQe.has(n)&&oQe.delete(n),lQe(e)&&"function"==typeof o&&o(e,{success:t})},s=e=>{r(e,n===window||n===document||a.useGlobalTarget||aQe(n,e.target))},l=e=>{r(e,!1)};window.addEventListener("pointerup",s,i),window.addEventListener("pointercancel",l,i)};return n.forEach(e=>{var t;(a.useGlobalTarget?window:e).addEventListener("pointerdown",r,i),Nze(e)&&(e.addEventListener("focus",e=>((e,t)=>{const a=e.currentTarget;if(!a)return;const n=rQe(()=>{if(oQe.has(a))return;sQe(a,"down");const e=rQe(()=>{sQe(a,"up")});a.addEventListener("keyup",e,t),a.addEventListener("blur",()=>sQe(a,"cancel"),t)});a.addEventListener("keydown",n,t),a.addEventListener("blur",()=>a.removeEventListener("keydown",n),t)})(e,i)),t=e,iQe.has(t.tagName)||-1!==t.tabIndex||e.hasAttribute("tabindex")||(e.tabIndex=0))}),o}function uQe(e){return{point:{x:e.pageX,y:e.pageY}}}function dQe(e,t,a){const n=e.options;n.whilePress&&e.setActive("whilePress","Start"===a);const i=n[`onPress${"End"===a?"":a}`];i&&HNe.postRender(()=>i(t,uQe(t)))}function cQe(e){return!("touch"===e.pointerType||tQe)}function hQe(e,t,a){const n=e.options;n.whileHover&&e.setActive("whileHover","Start"===a);const i=n[`onHover${a}`];i&&HNe.postRender(()=>i(t,uQe(t)))}const fQe={some:0,all:1};function pQe(e,t,a){const n=e.options;n.whileInView&&e.setActive("whileInView","Enter"===a);const i=n[`onViewport${a}`];i&&HNe.postRender(()=>i(t))}function AQe(e,t,a,n={passive:!0}){return e.addEventListener(t,a,n),()=>e.removeEventListener(t,a)}const CQe=(e,t)=>e.depth-t.depth;class mQe{constructor(){this.children=[],this.isDirty=!1}add(e){RPe(this.children,e),this.isDirty=!0}remove(e){qPe(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(CQe),this.isDirty=!1,this.children.forEach(e)}}function IQe(e){return IPe(e)?e.get():e}const yQe=["TopLeft","TopRight","BottomLeft","BottomRight"],_Qe=yQe.length,FQe=e=>"string"==typeof e?parseFloat(e):e,bQe=e=>"number"==typeof e||pPe.test(e);function vQe(e,t){return void 0!==e[t]?e[t]:e.borderRadius}const kQe=xQe(0,.5,lze),wQe=xQe(.5,.95,zNe);function xQe(e,t,a){return n=>n<e?0:n>t?1:a(NRe(e,t,n))}function OQe(e,t){e.min=t.min,e.max=t.max}function EQe(e,t){OQe(e.x,t.x),OQe(e.y,t.y)}function DQe(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function MQe(e){return void 0===e||1===e}function SQe({scale:e,scaleX:t,scaleY:a}){return!MQe(e)||!MQe(t)||!MQe(a)}function BQe(e){return SQe(e)||jQe(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function jQe(e){return TQe(e.x)||TQe(e.y)}function TQe(e){return e&&"0%"!==e}function NQe(e,t,a){return a+t*(e-a)}function PQe(e,t,a,n,i){return void 0!==i&&(e=NQe(e,i,n)),NQe(e,a,n)+t}function VQe(e,t=0,a=1,n,i){e.min=PQe(e.min,t,a,n,i),e.max=PQe(e.max,t,a,n,i)}function RQe(e,{x:t,y:a}){VQe(e.x,t.translate,t.scale,t.originPoint),VQe(e.y,a.translate,a.scale,a.originPoint)}const qQe=.999999999999,zQe=1.0000000000001;function QQe(e,t){e.min=e.min+t,e.max=e.max+t}function LQe(e,t,a,n,i=.5){VQe(e,t,a,DRe(e.min,e.max,i),n)}function ZQe(e,t){LQe(e.x,t.x,t.scaleX,t.scale,t.originX),LQe(e.y,t.y,t.scaleY,t.scale,t.originY)}function HQe(e){return e.max-e.min}function GQe(e,t,a,n=.5){e.origin=n,e.originPoint=DRe(t.min,t.max,e.origin),e.scale=HQe(a)/HQe(t),e.translate=DRe(a.min,a.max,e.origin)-e.originPoint,(e.scale>=.9999&&e.scale<=1.0001||isNaN(e.scale))&&(e.scale=1),(e.translate>=-.01&&e.translate<=.01||isNaN(e.translate))&&(e.translate=0)}function YQe(e,t,a,n){GQe(e.x,t.x,a.x,n?n.originX:void 0),GQe(e.y,t.y,a.y,n?n.originY:void 0)}function UQe(e,t,a){e.min=a.min+t.min,e.max=e.min+HQe(t)}function WQe(e,t,a){e.min=t.min-a.min,e.max=e.min+HQe(t)}function XQe(e,t,a){WQe(e.x,t.x,a.x),WQe(e.y,t.y,a.y)}function KQe(e,t,a,n,i){return e=NQe(e-=t,1/a,n),void 0!==i&&(e=NQe(e,1/i,n)),e}function JQe(e,t,[a,n,i],o,r){!function(e,t=0,a=1,n=.5,i,o=e,r=e){fPe.test(t)&&(t=parseFloat(t),t=DRe(r.min,r.max,t/100)-r.min);if("number"!=typeof t)return;let s=DRe(o.min,o.max,n);e===o&&(s-=t),e.min=KQe(e.min,t,a,s,i),e.max=KQe(e.max,t,a,s,i)}(e,t[a],t[n],t[i],t.scale,o,r)}const $Qe=["x","scaleX","originX"],eLe=["y","scaleY","originY"];function tLe(e,t,a,n){JQe(e.x,t,$Qe,a?a.x:void 0,n?n.x:void 0),JQe(e.y,t,eLe,a?a.y:void 0,n?n.y:void 0)}function aLe(e){return 0===e.translate&&1===e.scale}function nLe(e){return aLe(e.x)&&aLe(e.y)}function iLe(e,t){return e.min===t.min&&e.max===t.max}function oLe(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function rLe(e,t){return oLe(e.x,t.x)&&oLe(e.y,t.y)}function sLe(e){return HQe(e.x)/HQe(e.y)}function lLe(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class gLe{constructor(){this.members=[]}add(e){RPe(this.members,e),e.scheduleRender()}remove(e){if(qPe(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){const t=this.members.findIndex(t=>e===t);if(0===t)return!1;let a;for(let n=t;n>=0;n--){const e=this.members[n];if(!1!==e.isPresent){a=e;break}}return!!a&&(this.promote(a),!0)}promote(e,t){const a=this.lead;if(e!==a&&(this.prevLead=a,this.lead=e,e.show(),a)){a.instance&&a.scheduleRender(),e.scheduleRender(),e.resumeFrom=a,t&&(e.resumeFrom.preserveOpacity=!0),a.snapshot&&(e.snapshot=a.snapshot,e.snapshot.latestValues=a.animationValues||a.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:n}=e.options;!1===n&&a.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:t,resumingFrom:a}=e;t.onExitComplete&&t.onExitComplete(),a&&a.options.onExitComplete&&a.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function uLe(e){return[e("x"),e("y")]}const dLe={hasAnimatedSinceResize:!0,hasEverUpdated:!1},{schedule:cLe}=ZNe(queueMicrotask,!1),hLe=["","X","Y","Z"];let fLe=0;function pLe(e,t,a,n){const{latestValues:i}=t;i[e]&&(a[e]=i[e],t.setStaticValue(e,0),n&&(n[e]=0))}function ALe(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const a=aqe(t);if(window.MotionHasOptimisedAnimation(a,"transform")){const{layout:t,layoutId:n}=e.options;window.MotionCancelOptimisedAnimation(a,"transform",HNe,!(t||n))}const{parent:n}=e;n&&!n.hasCheckedOptimisedAppear&&ALe(n)}function CLe({attachResizeListener:e,defaultParent:t,measureScroll:a,checkIsScrollRoot:n,resetTransform:i}){return class{constructor(e={},a=(null==t?void 0:t())){this.id=fLe++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(yLe),this.nodes.forEach(xLe),this.nodes.forEach(OLe),this.nodes.forEach(_Le)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let t=0;t<this.path.length;t++)this.path[t].shouldResetTransform=!0;this.root===this&&(this.nodes=new mQe)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new zPe),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){const a=this.eventHandlers.get(e);a&&a.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;this.isSVG=Zze(t)&&!Hze(t),this.instance=t;const{layoutId:a,layout:n,visualElement:i}=this.options;if(i&&!i.current&&i.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(n||a)&&(this.isLayoutDirty=!0),e){let a,n=0;const i=()=>this.root.updateBlockedByResize=!1;HNe.read(()=>{n=window.innerWidth}),e(t,()=>{const e=window.innerWidth;e!==n&&(n=e,this.root.updateBlockedByResize=!0,a&&a(),a=function(e,t){const a=NPe.now(),n=({timestamp:i})=>{const o=i-a;o>=t&&(GNe(n),e(o-t))};return HNe.setup(n,!0),()=>GNe(n)}(i,250),dLe.hasAnimatedSinceResize&&(dLe.hasAnimatedSinceResize=!1,this.nodes.forEach(wLe)))})}a&&this.root.registerSharedNode(a,this),!1!==this.options.animate&&i&&(a||n)&&this.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:a,layout:n})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const o=this.options.transition||i.getDefaultTransition()||jLe,{onLayoutAnimationStart:r,onLayoutAnimationComplete:s}=i.getProps(),l=!this.targetLayout||!rLe(this.targetLayout,n),g=!t&&a;if(this.options.layoutRoot||this.resumeFrom||g||t&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const t={...lqe(o,"layout"),onPlay:r,onComplete:s};(i.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,g)}else t||wLe(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=n})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),GNe(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(ELe),this.animationId++)}getTransformTemplate(){const{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&ALe(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let i=0;i<this.path.length;i++){const e=this.path[i];e.shouldResetTransform=!0,e.updateScroll("snapshot"),e.options.layoutRoot&&e.willUpdate(!1)}const{layoutId:t,layout:a}=this.options;if(void 0===t&&!a)return;const n=this.getTransformTemplate();this.prevTransformTemplateValue=n?n(this.latestValues,""):void 0,this.updateSnapshot(),e&&this.notifyListeners("willUpdate")}update(){this.updateScheduled=!1;if(this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(bLe);if(this.animationId<=this.animationCommitId)return void this.nodes.forEach(vLe);this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(kLe),this.nodes.forEach(mLe),this.nodes.forEach(ILe)):this.nodes.forEach(vLe),this.clearAllSnapshots();const e=NPe.now();YNe.delta=oVe(0,1e3/60,e-YNe.timestamp),YNe.timestamp=e,YNe.isProcessing=!0,UNe.update.process(YNe),UNe.preRender.process(YNe),UNe.render.process(YNe),YNe.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,cLe.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(FLe),this.sharedNodes.forEach(DLe)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,HNe.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){HNe.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||HQe(this.snapshot.measuredBox.x)||HQe(this.snapshot.measuredBox.y)||(this.snapshot=void 0))}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let a=0;a<this.path.length;a++){this.path[a].updateScroll()}const e=this.layout;this.layout=this.measure(!1),this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}},this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:t}=this.options;t&&t.notify("LayoutMeasure",this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e="measure"){let t=Boolean(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&this.instance){const t=n(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:a(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!i)return;const e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!nLe(this.projectionDelta),a=this.getTransformTemplate(),n=a?a(this.latestValues,""):void 0,o=n!==this.prevTransformTemplateValue;e&&this.instance&&(t||BQe(this.latestValues)||o)&&(i(this.instance,n),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){const t=this.measurePageBox();let a=this.removeElementScroll(t);var n;return e&&(a=this.removeTransform(a)),PLe((n=a).x),PLe(n.y),{animationId:this.root.animationId,measuredBox:t,layoutBox:a,latestValues:{},source:this.id}}measurePageBox(){var e;const{visualElement:t}=this.options;if(!t)return{x:{min:0,max:0},y:{min:0,max:0}};const a=t.measureViewportBox();if(!((null==(e=this.scroll)?void 0:e.wasRoot)||this.path.some(RLe))){const{scroll:e}=this.root;e&&(QQe(a.x,e.offset.x),QQe(a.y,e.offset.y))}return a}removeElementScroll(e){var t;const a={x:{min:0,max:0},y:{min:0,max:0}};if(EQe(a,e),null==(t=this.scroll)?void 0:t.wasRoot)return a;for(let n=0;n<this.path.length;n++){const t=this.path[n],{scroll:i,options:o}=t;t!==this.root&&i&&o.layoutScroll&&(i.wasRoot&&EQe(a,e),QQe(a.x,i.offset.x),QQe(a.y,i.offset.y))}return a}applyTransform(e,t=!1){const a={x:{min:0,max:0},y:{min:0,max:0}};EQe(a,e);for(let n=0;n<this.path.length;n++){const e=this.path[n];!t&&e.options.layoutScroll&&e.scroll&&e!==e.root&&ZQe(a,{x:-e.scroll.offset.x,y:-e.scroll.offset.y}),BQe(e.latestValues)&&ZQe(a,e.latestValues)}return BQe(this.latestValues)&&ZQe(a,this.latestValues),a}removeTransform(e){const t={x:{min:0,max:0},y:{min:0,max:0}};EQe(t,e);for(let a=0;a<this.path.length;a++){const e=this.path[a];if(!e.instance)continue;if(!BQe(e.latestValues))continue;SQe(e.latestValues)&&e.updateSnapshot();const n=OPe();EQe(n,e.measurePageBox()),tLe(t,e.latestValues,e.snapshot?e.snapshot.layoutBox:void 0,n)}return BQe(this.latestValues)&&tLe(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:void 0===e.crossfade||e.crossfade}}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!==YNe.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){var t;const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const n=Boolean(this.resumingFrom)||this!==a;if(!(e||n&&this.isSharedProjectionDirty||this.isProjectionDirty||(null==(t=this.parent)?void 0:t.isProjectionDirty)||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:i,layoutId:o}=this.options;if(this.layout&&(i||o)){if(this.resolvedRelativeTargetAt=YNe.timestamp,!this.targetDelta&&!this.relativeTarget){const e=this.getClosestProjectingParent();e&&e.layout&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},XQe(this.relativeTargetOrigin,this.layout.layoutBox,e.layout.layoutBox),EQe(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}var r,s,l;if(this.relativeTarget||this.targetDelta)if(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),r=this.target,s=this.relativeTarget,l=this.relativeParent.target,UQe(r.x,s.x,l.x),UQe(r.y,s.y,l.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):EQe(this.target,this.layout.layoutBox),RQe(this.target,this.targetDelta)):EQe(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const e=this.getClosestProjectingParent();e&&Boolean(e.resumingFrom)===Boolean(this.resumingFrom)&&!e.options.layoutScroll&&e.target&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},XQe(this.relativeTargetOrigin,this.target,e.target),EQe(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(this.parent&&!SQe(this.parent.latestValues)&&!jQe(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var e;const t=this.getLead(),a=Boolean(this.resumingFrom)||this!==t;let n=!0;if((this.isProjectionDirty||(null==(e=this.parent)?void 0:e.isProjectionDirty))&&(n=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===YNe.timestamp&&(n=!1),n)return;const{layout:i,layoutId:o}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!i&&!o)return;EQe(this.layoutCorrected,this.layout.layoutBox);const r=this.treeScale.x,s=this.treeScale.y;!function(e,t,a,n=!1){const i=a.length;if(!i)return;let o,r;t.x=t.y=1;for(let s=0;s<i;s++){o=a[s],r=o.projectionDelta;const{visualElement:i}=o.options;i&&i.props.style&&"contents"===i.props.style.display||(n&&o.options.layoutScroll&&o.scroll&&o!==o.root&&ZQe(e,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),r&&(t.x*=r.x.scale,t.y*=r.y.scale,RQe(e,r)),n&&BQe(o.latestValues)&&ZQe(e,o.latestValues))}t.x<zQe&&t.x>qQe&&(t.x=1),t.y<zQe&&t.y>qQe&&(t.y=1)}(this.layoutCorrected,this.treeScale,this.path,a),!t.layout||t.target||1===this.treeScale.x&&1===this.treeScale.y||(t.target=t.layout.layoutBox,t.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}});const{target:l}=t;l?(this.projectionDelta&&this.prevProjectionDelta?(DQe(this.prevProjectionDelta.x,this.projectionDelta.x),DQe(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),YQe(this.projectionDelta,this.layoutCorrected,l,this.latestValues),this.treeScale.x===r&&this.treeScale.y===s&&lLe(this.projectionDelta.x,this.prevProjectionDelta.x)&&lLe(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",l))):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){var t;if(null==(t=this.options.visualElement)||t.scheduleRender(),e){const e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDeltaWithTransform={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}}setAnimationOrigin(e,t=!1){const a=this.snapshot,n=a?a.latestValues:{},i={...this.latestValues},o={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;const r={x:{min:0,max:0},y:{min:0,max:0}},s=(a?a.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),g=!l||l.members.length<=1,u=Boolean(s&&!g&&!0===this.options.crossfade&&!this.path.some(BLe));let d;this.animationProgress=0,this.mixTargetDelta=t=>{const a=t/1e3;var l,c,h,f,p,A;MLe(o.x,e.x,a),MLe(o.y,e.y,a),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(XQe(r,this.layout.layoutBox,this.relativeParent.layout.layoutBox),h=this.relativeTarget,f=this.relativeTargetOrigin,p=r,A=a,SLe(h.x,f.x,p.x,A),SLe(h.y,f.y,p.y,A),d&&(l=this.relativeTarget,c=d,iLe(l.x,c.x)&&iLe(l.y,c.y))&&(this.isProjectionDirty=!1),d||(d={x:{min:0,max:0},y:{min:0,max:0}}),EQe(d,this.relativeTarget)),s&&(this.animationValues=i,function(e,t,a,n,i,o){i?(e.opacity=DRe(0,a.opacity??1,kQe(n)),e.opacityExit=DRe(t.opacity??1,0,wQe(n))):o&&(e.opacity=DRe(t.opacity??1,a.opacity??1,n));for(let r=0;r<_Qe;r++){const i=`border${yQe[r]}Radius`;let o=vQe(t,i),s=vQe(a,i);void 0===o&&void 0===s||(o||(o=0),s||(s=0),0===o||0===s||bQe(o)===bQe(s)?(e[i]=Math.max(DRe(FQe(o),FQe(s),n),0),(fPe.test(s)||fPe.test(o))&&(e[i]+="%")):e[i]=s)}(t.rotate||a.rotate)&&(e.rotate=DRe(t.rotate||0,a.rotate||0,n))}(i,n,this.latestValues,a,u,g)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=a},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){var t,a,n;this.notifyListeners("animationStart"),null==(t=this.currentAnimation)||t.stop(),null==(n=null==(a=this.resumingFrom)?void 0:a.currentAnimation)||n.stop(),this.pendingAnimation&&(GNe(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=HNe.update(()=>{dLe.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=ZPe(0)),this.currentAnimation=Uze(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onStop:()=>{},onComplete:()=>{e.onComplete&&e.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const e=this.getLead();let{targetWithTransforms:t,target:a,layout:n,latestValues:i}=e;if(t&&a&&n){if(this!==e&&this.layout&&n&&VLe(this.options.animationType,this.layout.layoutBox,n.layoutBox)){a=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const t=HQe(this.layout.layoutBox.x);a.x.min=e.target.x.min,a.x.max=a.x.min+t;const n=HQe(this.layout.layoutBox.y);a.y.min=e.target.y.min,a.y.max=a.y.min+n}EQe(t,a),ZQe(t,i),YQe(this.projectionDeltaWithTransform,this.layoutCorrected,t,i)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new gLe);this.sharedNodes.get(e).add(t);const a=t.options.initialPromotionConfig;t.promote({transition:a?a.transition:void 0,preserveFollowOpacity:a&&a.shouldPreserveFollowOpacity?a.shouldPreserveFollowOpacity(t):void 0})}isLead(){const e=this.getStack();return!e||e.lead===this}getLead(){var e;const{layoutId:t}=this.options;return t&&(null==(e=this.getStack())?void 0:e.lead)||this}getPrevLead(){var e;const{layoutId:t}=this.options;return t?null==(e=this.getStack())?void 0:e.prevLead:void 0}getStack(){const{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:a}={}){const n=this.getStack();n&&n.promote(this,a),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){const e=this.getStack();return!!e&&e.relegate(this)}resetSkewAndRotation(){const{visualElement:e}=this.options;if(!e)return;let t=!1;const{latestValues:a}=e;if((a.z||a.rotate||a.rotateX||a.rotateY||a.rotateZ||a.skewX||a.skewY)&&(t=!0),!t)return;const n={};a.z&&pLe("z",e,n,this.animationValues);for(let i=0;i<hLe.length;i++)pLe(`rotate${hLe[i]}`,e,n,this.animationValues),pLe(`skew${hLe[i]}`,e,n,this.animationValues);e.render();for(const i in n)e.setStaticValue(i,n[i]),this.animationValues&&(this.animationValues[i]=n[i]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;if(!this.isVisible)return void(e.visibility="hidden");const a=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,e.visibility="",e.opacity="",e.pointerEvents=IQe(null==t?void 0:t.pointerEvents)||"",void(e.transform=a?a(this.latestValues,""):"none");const n=this.getLead();if(!this.projectionDelta||!this.layout||!n.target)return this.options.layoutId&&(e.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,e.pointerEvents=IQe(null==t?void 0:t.pointerEvents)||""),void(this.hasProjected&&!BQe(this.latestValues)&&(e.transform=a?a({},""):"none",this.hasProjected=!1));e.visibility="";const i=n.animationValues||n.latestValues;this.applyTransformsToTarget();let o=function(e,t,a){let n="";const i=e.x.translate/t.x,o=e.y.translate/t.y,r=(null==a?void 0:a.z)||0;if((i||o||r)&&(n=`translate3d(${i}px, ${o}px, ${r}px) `),1===t.x&&1===t.y||(n+=`scale(${1/t.x}, ${1/t.y}) `),a){const{transformPerspective:e,rotate:t,rotateX:i,rotateY:o,skewX:r,skewY:s}=a;e&&(n=`perspective(${e}px) ${n}`),t&&(n+=`rotate(${t}deg) `),i&&(n+=`rotateX(${i}deg) `),o&&(n+=`rotateY(${o}deg) `),r&&(n+=`skewX(${r}deg) `),s&&(n+=`skewY(${s}deg) `)}const s=e.x.scale*t.x,l=e.y.scale*t.y;return 1===s&&1===l||(n+=`scale(${s}, ${l})`),n||"none"}(this.projectionDeltaWithTransform,this.treeScale,i);a&&(o=a(i,o)),e.transform=o;const{x:r,y:s}=this.projectionDelta;e.transformOrigin=`${100*r.origin}% ${100*s.origin}% 0`,n.animationValues?e.opacity=n===this?i.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:i.opacityExit:e.opacity=n===this?void 0!==i.opacity?i.opacity:"":void 0!==i.opacityExit?i.opacityExit:0;for(const l in _Ne){if(void 0===i[l])continue;const{correct:t,applyTo:a,isCSSVariable:r}=_Ne[l],s="none"===o?i[l]:t(i[l],n);if(a){const t=a.length;for(let n=0;n<t;n++)e[a[n]]=s}else r?this.options.visualElement.renderState.vars[l]=s:e[l]=s}this.options.layoutId&&(e.pointerEvents=n===this?IQe(null==t?void 0:t.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>{var t;return null==(t=e.currentAnimation)?void 0:t.stop()}),this.root.nodes.forEach(bLe),this.root.sharedNodes.clear()}}}function mLe(e){e.updateLayout()}function ILe(e){var t;const a=(null==(t=e.resumeFrom)?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&a&&e.hasListeners("didUpdate")){const{layoutBox:t,measuredBox:n}=e.layout,{animationType:i}=e.options,o=a.source!==e.layout.source;"size"===i?uLe(e=>{const n=o?a.measuredBox[e]:a.layoutBox[e],i=HQe(n);n.min=t[e].min,n.max=n.min+i}):VLe(i,a.layoutBox,t)&&uLe(n=>{const i=o?a.measuredBox[n]:a.layoutBox[n],r=HQe(t[n]);i.max=i.min+r,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[n].max=e.relativeTarget[n].min+r)});const r={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};YQe(r,t,a.layoutBox);const s={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};o?YQe(s,e.applyTransform(n,!0),a.measuredBox):YQe(s,t,a.layoutBox);const l=!nLe(r);let g=!1;if(!e.resumeFrom){const n=e.getClosestProjectingParent();if(n&&!n.resumeFrom){const{snapshot:i,layout:o}=n;if(i&&o){const r={x:{min:0,max:0},y:{min:0,max:0}};XQe(r,a.layoutBox,i.layoutBox);const s={x:{min:0,max:0},y:{min:0,max:0}};XQe(s,t,o.layoutBox),rLe(r,s)||(g=!0),n.options.layoutRoot&&(e.relativeTarget=s,e.relativeTargetOrigin=r,e.relativeParent=n)}}}e.notifyListeners("didUpdate",{layout:t,snapshot:a,delta:s,layoutDelta:r,hasLayoutChanged:l,hasRelativeLayoutChanged:g})}else if(e.isLead()){const{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function yLe(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=Boolean(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function _Le(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function FLe(e){e.clearSnapshot()}function bLe(e){e.clearMeasurements()}function vLe(e){e.isLayoutDirty=!1}function kLe(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function wLe(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function xLe(e){e.resolveTargetDelta()}function OLe(e){e.calcProjection()}function ELe(e){e.resetSkewAndRotation()}function DLe(e){e.removeLeadSnapshot()}function MLe(e,t,a){e.translate=DRe(t.translate,0,a),e.scale=DRe(t.scale,1,a),e.origin=t.origin,e.originPoint=t.originPoint}function SLe(e,t,a,n){e.min=DRe(t.min,a.min,n),e.max=DRe(t.max,a.max,n)}function BLe(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}const jLe={duration:.45,ease:[.4,0,.1,1]},TLe=e=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),NLe=TLe("applewebkit/")&&!TLe("chrome/")?Math.round:zNe;function PLe(e){e.min=NLe(e.min),e.max=NLe(e.max)}function VLe(e,t,a){return"position"===e||"preserve-aspect"===e&&(n=sLe(t),i=sLe(a),o=.2,!(Math.abs(n-i)<=o));var n,i,o}function RLe(e){var t;return e!==e.root&&(null==(t=e.scroll)?void 0:t.wasRoot)}const qLe=CLe({attachResizeListener:(e,t)=>function(e,t,a,n={passive:!0}){return e.addEventListener(t,a,n),()=>e.removeEventListener(t,a)}(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),zLe={current:void 0},QLe=CLe({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!zLe.current){const e=new qLe({});e.mount(window),e.setOptions({layoutScroll:!0}),zLe.current=e}return zLe.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>Boolean("fixed"===window.getComputedStyle(e).position)});function LLe(e){if(e)return!1!==e.options.allowProjection?e.projection:LLe(e.parent)}function ZLe(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const HLe={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e){if(!pPe.test(e))return e;e=parseFloat(e)}return`${ZLe(e,t.target.x)}% ${ZLe(e,t.target.y)}%`}},GLe={correct:(e,{treeScale:t,projectionDelta:a})=>{const n=e,i=qVe.parse(e);if(i.length>5)return n;const o=qVe.createTransformer(e),r="number"!=typeof i[0]?1:0,s=a.x.scale*t.x,l=a.y.scale*t.y;i[0+r]/=s,i[1+r]/=l;const g=DRe(s,l,.5);return"number"==typeof i[2+r]&&(i[2+r]/=g),"number"==typeof i[3+r]&&(i[3+r]/=g),o(i)}},YLe={borderRadius:{...HLe,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:HLe,borderTopRightRadius:HLe,borderBottomLeftRadius:HLe,borderBottomRightRadius:HLe,boxShadow:GLe};function ULe(e){return"object"==typeof e&&null!==e&&"nodeType"in e}function WLe(e){return"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary}function XLe(e,t="page"){return{point:{x:e[`${t}X`],y:e[`${t}Y`]}}}function KLe(e,t,a,n){return AQe(e,t,function(e){return t=>WLe(t)&&e(t,XLe(t))}(a),n)}function JLe(e){let t=null;return()=>{const a=()=>{t=null};return null===t&&(t=e,a)}}const $Le=JLe("dragHorizontal"),eZe=JLe("dragVertical");function tZe(e){return e.max-e.min}const aZe=.35;function nZe(e,t,a){return{min:void 0!==t?e.min+t:void 0,max:void 0!==a?e.max+a-(e.max-e.min):void 0}}function iZe(e,t,a){return{min:oZe(e,t),max:oZe(e,a)}}function oZe(e,t){return"number"==typeof e?e:e[t]||0}function rZe(e,t){let a=t.min-e.min,n=t.max-e.max;return t.max-t.min<e.max-e.min&&([a,n]=[n,a]),{min:a,max:n}}const sZe=(e,t)=>Math.abs(e-t);class lZe{constructor(e,t,{transformPagePoint:a,contextWindow:n,dragSnapToOrigin:i=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const e=dZe(this.lastMoveEventInfo,this.history),t=null!==this.startEvent,a=function(e,t){const a=sZe(e.x,t.x),n=sZe(e.y,t.y);return Math.sqrt(a**2+n**2)}(e.offset,{x:0,y:0})>=3;if(!t&&!a)return;const{point:n}=e,{timestamp:i}=YNe;this.history.push({...n,timestamp:i});const{onStart:o,onMove:r}=this.handlers;t||(o&&o(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),r&&r(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastMoveEventInfo=gZe(t,this.transformPagePoint),HNe.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();const{onEnd:a,onSessionEnd:n,resumeAnimation:i}=this.handlers;if(this.dragSnapToOrigin&&i&&i(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const o=dZe("pointercancel"===e.type?this.lastMoveEventInfo:gZe(t,this.transformPagePoint),this.history);this.startEvent&&a&&a(e,o),n&&n(e,o)},!WLe(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=a,this.contextWindow=n||window;const o=gZe(XLe(e),this.transformPagePoint),{point:r}=o,{timestamp:s}=YNe;this.history=[{...r,timestamp:s}];const{onSessionStart:l}=t;l&&l(e,dZe(o,this.history)),this.removeListeners=Cqe(KLe(this.contextWindow,"pointermove",this.handlePointerMove),KLe(this.contextWindow,"pointerup",this.handlePointerUp),KLe(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),GNe(this.updatePoint)}}function gZe(e,t){return t?{point:t(e.point)}:e}function uZe(e,t){return{x:e.x-t.x,y:e.y-t.y}}function dZe({point:e},t){return{point:e,delta:uZe(e,hZe(t)),offset:uZe(e,cZe(t)),velocity:fZe(t,.1)}}function cZe(e){return e[0]}function hZe(e){return e[e.length-1]}function fZe(e,t){if(e.length<2)return{x:0,y:0};let a=e.length-1,n=null;const i=hZe(e);for(;a>=0&&(n=e[a],!(i.timestamp-n.timestamp>zRe(t)));)a--;if(!n)return{x:0,y:0};const o=QRe(i.timestamp-n.timestamp);if(0===o)return{x:0,y:0};const r={x:(i.x-n.x)/o,y:(i.y-n.y)/o};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function pZe(e){return[e("x"),e("y")]}function AZe(e,t){const a=e.getValue("willChange");if(n=a,Boolean(IPe(n)&&n.add))return a.add(t);var n}function CZe({top:e,left:t,right:a,bottom:n}){return{x:{min:t,max:a},y:{min:e,max:n}}}function mZe(e,t){e.min=e.min+t,e.max=e.max+t}function IZe(e,t,a){const n=(i=a,CZe(function(e,t){if(!t)return e;const a=t({x:e.left,y:e.top}),n=t({x:e.right,y:e.bottom});return{top:a.y,left:a.x,bottom:n.y,right:n.x}}(e.getBoundingClientRect(),i)));var i;const{scroll:o}=t;return o&&(mZe(n.x,o.offset.x),mZe(n.y,o.offset.y)),n}function yZe(e){return!VNe.has(e.current)}function _Ze({current:e}){return e?e.ownerDocument.defaultView:null}const FZe=new WeakMap;class bZe{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic={x:{min:0,max:0},y:{min:0,max:0}},this.visualElement=e}start(e,{snapToCursor:t=!1}={}){if(!yZe(this.visualElement))return;const{dragSnapToOrigin:a}=this.getProps();this.panSession=new lZe(e,{onSessionStart:e=>{const{dragSnapToOrigin:a}=this.getProps();a?this.pauseAnimation():this.stopAnimation(),t&&this.snapToCursor(XLe(e,"page").point)},onStart:(e,t)=>{const{drag:a,dragPropagation:n,onDragStart:i}=this.getProps();if(a&&!n&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=function(e){let t=!1;if("y"===e)t=eZe();else if("x"===e)t=$Le();else{const e=$Le(),a=eZe();e&&a?t=()=>{e(),a()}:(e&&e(),a&&a())}return t}(a),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),pZe(e=>{let t=this.getAxisMotionValue(e).get()||0;if(fPe.test(t)){const{projection:a}=this.visualElement;if(a&&a.layout){const n=a.layout.layoutBox[e];if(n){t=tZe(n)*(parseFloat(t)/100)}}}this.originPoint[e]=t}),i&&HNe.postRender(()=>i(e,t)),AZe(this.visualElement,"transform");this.visualElement.state.setActive("whileDrag",!0)},onMove:(e,t)=>{const{dragPropagation:a,dragDirectionLock:n,onDirectionLock:i,onDrag:o}=this.getProps();if(!a&&!this.openGlobalLock)return;const{offset:r}=t;if(n&&null===this.currentDirection)return this.currentDirection=function(e,t=10){let a=null;Math.abs(e.y)>t?a="y":Math.abs(e.x)>t&&(a="x");return a}(r),void(null!==this.currentDirection&&i&&i(this.currentDirection));this.updateAxis("x",t.point,r),this.updateAxis("y",t.point,r),this.visualElement.render(),o&&o(e,t)},onSessionEnd:(e,t)=>this.stop(e,t),resumeAnimation:()=>pZe(e=>{var t;return"paused"===this.getAnimationState(e)&&(null==(t=this.getAxisMotionValue(e).animation)?void 0:t.play())})},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:a,contextWindow:_Ze(this.visualElement)})}stop(e,t){const a=this.isDragging;if(this.cancel(),!a)return;const{velocity:n}=t;this.startAnimation(n);const{onDragEnd:i}=this.getProps();i&&HNe.postRender(()=>i(e,t))}cancel(){this.isDragging=!1;const{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:a}=this.getProps();!a&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null);this.visualElement.state.setActive("whileDrag",!1)}updateAxis(e,t,a){const{drag:n}=this.getProps();if(!a||!vZe(e,n,this.currentDirection))return;const i=this.getAxisMotionValue(e);let o=this.originPoint[e]+a[e];this.constraints&&this.constraints[e]&&(o=function(e,{min:t,max:a},n){return void 0!==t&&e<t?e=n?DRe(t,e,n.min):Math.max(e,t):void 0!==a&&e>a&&(e=n?DRe(a,e,n.max):Math.min(e,a)),e}(o,this.constraints[e],this.elastic[e])),i.set(o)}resolveConstraints(){var e;const{dragConstraints:t,dragElastic:a}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):null==(e=this.visualElement.projection)?void 0:e.layout,i=this.constraints;t&&ULe(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!t||!n)&&function(e,{top:t,left:a,bottom:n,right:i}){return{x:nZe(e.x,a,i),y:nZe(e.y,t,n)}}(n.layoutBox,t),this.elastic=function(e=aZe){return!1===e?e=0:!0===e&&(e=aZe),{x:iZe(e,"left","right"),y:iZe(e,"top","bottom")}}(a),i!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&pZe(e=>{!1!==this.constraints&&this.getAxisMotionValue(e)&&(this.constraints[e]=function(e,t){const a={};return void 0!==t.min&&(a.min=t.min-e.min),void 0!==t.max&&(a.max=t.max-e.min),a}(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!ULe(e))return!1;const a=e;MNe(null!==a,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:n}=this.visualElement;if(!n||!n.layout)return!1;const i=IZe(a,n.root,this.visualElement.getTransformPagePoint());let o=function(e,t){return{x:rZe(e.x,t.x),y:rZe(e.y,t.y)}}(n.layout.layoutBox,i);if(t){const e=t(function({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}(o));this.hasMutatedConstraints=!!e,e&&(o=CZe(e))}return o}startAnimation(e){const{drag:t,dragMomentum:a,dragElastic:n,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:r}=this.getProps(),s=this.constraints||{},l=pZe(r=>{if(!vZe(r,t,this.currentDirection))return;let l=s&&s[r]||{};o&&(l={min:0,max:0});const g=n?200:1e6,u=n?40:1e7,d={type:"inertia",velocity:a?e[r]:0,bounceStiffness:g,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...i,...l};return this.startAxisValueAnimation(r,d)});return Promise.all(l).then(r)}startAxisValueAnimation(e,t){const a=this.getAxisMotionValue(e);return AZe(this.visualElement,e),a.start(qze(e,a,0,t,this.visualElement,!1))}stopAnimation(){yZe(this.visualElement)&&pZe(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){pZe(e=>{var t;return null==(t=this.getAxisMotionValue(e).animation)?void 0:t.pause()})}getAnimationState(e){var t;return null==(t=this.getAxisMotionValue(e).animation)?void 0:t.state}getAxisMotionValue(e){const t=`_drag${e.toUpperCase()}`,a=this.visualElement.getProps();return a[t]||this.visualElement.getValue(e,(a.initial?a.initial[e]:void 0)||0)}snapToCursor(e){pZe(t=>{const{drag:a}=this.getProps();if(!vZe(t,a,this.currentDirection))return;const{projection:n}=this.visualElement,i=this.getAxisMotionValue(t);if(n&&n.layout){const{min:a,max:o}=n.layout.layoutBox[t];i.set(e[t]-DRe(a,o,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:t}=this.getProps(),{projection:a}=this.visualElement;if(!ULe(t)||!a||!this.constraints)return;this.stopAnimation();const n={x:0,y:0};pZe(e=>{const t=this.getAxisMotionValue(e);if(t&&!1!==this.constraints){const a=t.get();n[e]=function(e,t){let a=.5;const n=tZe(e),i=tZe(t);return i>n?a=NRe(t.min,t.max-n,e.min):n>i&&(a=NRe(e.min,e.max-i,t.min)),oVe(0,1,a)}({min:a,max:a},this.constraints[e])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",a.root&&a.root.updateScroll(),a.updateLayout(),this.resolveConstraints(),pZe(t=>{if(!vZe(t,e,null))return;const a=this.getAxisMotionValue(t),{min:i,max:o}=this.constraints[t];a.set(DRe(i,o,n[t]))})}addListeners(){if(!this.visualElement.current)return;FZe.set(this.visualElement,this);const e=KLe(this.visualElement.current,"pointerdown",e=>{const{drag:t,dragListener:a=!0}=this.getProps();t&&a&&this.start(e)}),t=()=>{const{dragConstraints:e}=this.getProps();ULe(e)&&(this.constraints=this.resolveRefConstraints())},{projection:a}=this.visualElement,n=a.addEventListener("measure",t);a&&!a.layout&&(a.root&&a.root.updateScroll(),a.updateLayout()),HNe.read(t);const i=AQe(window,"resize",()=>this.scalePositionWithinConstraints()),o=a.addEventListener("didUpdate",({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(pZe(t=>{const a=this.getAxisMotionValue(t);a&&(this.originPoint[t]+=e[t].translate,a.set(a.get()+e[t].translate))}),this.visualElement.render())});return()=>{i(),e(),n(),o&&o()}}getProps(){const e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:a=!1,dragPropagation:n=!1,dragConstraints:i=!1,dragElastic:o=aZe,dragMomentum:r=!0}=e;return{...e,drag:t,dragDirectionLock:a,dragPropagation:n,dragConstraints:i,dragElastic:o,dragMomentum:r}}}function vZe(e,t,a){return!(!0!==t&&t!==e||null!==a&&a!==e)}function kZe(e){return(t,a)=>{e&&HNe.postRender(()=>e(t,a))}}const wZe=[class extends ENe{constructor(e){var t,a,n;super(e),this.animateUpdates=({controlActiveState:e,directAnimate:t,directTransition:a,controlDelay:n=0,isFallback:i,isExit:o}={})=>{const{reducedMotion:r}=this.state.options.motionConfig;this.state.visualElement.shouldReduceMotion="always"===r||"user"===r&&!!DPe.current;const s=this.state.target;this.state.target={...this.state.baseTarget};let l={};l=this.resolveStateAnimation({controlActiveState:e,directAnimate:t,directTransition:a});const g=this.createAnimationFactories(s,l,n),{getChildAnimations:u}=this.setupChildAnimations(l,this.state.activeStates,i);return this.executeAnimations({factories:g,getChildAnimations:u,transition:l,controlActiveState:e,isExit:o})},this.state.visualElement=(a=this.state.options.as,n={presenceContext:null,parent:null==(t=this.state.parent)?void 0:t.visualElement,props:{...this.state.options,whileTap:this.state.options.whilePress},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{...this.state.baseTarget}},reducedMotionConfig:this.state.options.motionConfig.reducedMotion},NNe(a)?new vRe(n):new mRe(n)),this.state.animateUpdates=this.animateUpdates,this.state.isMounted()&&this.state.startAnimation()}updateAnimationControlsSubscription(){const{animate:e}=this.state.options;ONe(e)&&(this.unmountControls=e.subscribe(this.state))}executeAnimations({factories:e,getChildAnimations:t,transition:a,controlActiveState:n,isExit:i=!1}){const o=()=>Promise.all(e.map(e=>e()).filter(Boolean)),r={...this.state.target},s=this.state.element,l=e=>{var t,a;s.dispatchEvent(ePe("motionstart",r)),null==(a=(t=this.state.options).onAnimationStart)||a.call(t,r),e.then(()=>{var e,t;s.dispatchEvent(ePe("motioncomplete",r,i)),null==(t=(e=this.state.options).onAnimationComplete)||t.call(e,r)}).catch(zNe)},g=()=>{const e=(null==a?void 0:a.when)?("beforeChildren"===a.when?o():t()).then(()=>"beforeChildren"===a.when?t():o()):Promise.all([o(),t()]);return l(e),e};return n?g:g()}setupChildAnimations(e,t,a){var n;const i=this.state.visualElement;if(!(null==(n=i.variantChildren)?void 0:n.size)||!t)return{getChildAnimations:()=>Promise.resolve()};const{staggerChildren:o=0,staggerDirection:r=1,delayChildren:s=0}=e||{},l=i.variantChildren.size,g=(l-1)*o,u="function"==typeof s,d=u?e=>s(e,l):1===r?(e=0)=>e*o:(e=0)=>g-e*o,c=Array.from(i.variantChildren).map((e,a)=>e.state.animateUpdates({controlActiveState:t,controlDelay:(u?0:s)+d(a)}));return{getChildAnimations:()=>Promise.all(c.map(e=>e()))}}createAnimationFactories(e,t,a){const n=[];return Object.keys(this.state.target).forEach(i=>{var o,r,s;if(r=e[i],s=this.state.target[i],typeof r==typeof s&&(Array.isArray(r)&&Array.isArray(s)?function(e,t){const a=t.length;if(a!==e.length)return!1;for(let n=0;n<a;n++)if(t[n]!==e[n])return!1;return!0}(r,s):r===s))return;(o=this.state.baseTarget)[i]??(o[i]=yPe(this.state.element,i));const l="none"===this.state.target[i]&&kPe(dPe[i])?dPe[i]:this.state.target[i];n.push(()=>{var e;return $ze(this.state.element,{[i]:l},{...(null==t?void 0:t[i])||t,delay:((null==(e=null==t?void 0:t[i])?void 0:e.delay)||(null==t?void 0:t.delay)||0)+a})})}),n}resolveStateAnimation({controlActiveState:e,directAnimate:t,directTransition:a}){let n=this.state.options.transition,i={};const{variants:o,custom:r,transition:s,animatePresenceContext:l}=this.state.options,g=r??(null==l?void 0:l.custom);return this.state.activeStates={...this.state.activeStates,...e},eQe.forEach(e=>{if(!this.state.activeStates[e]||ONe(this.state.options[e]))return;const t=this.state.options[e];let a=kPe(t)?SNe(t,o,g):void 0;if(this.state.visualElement.isVariantNode){const t=SNe(this.state.context[e],o,g);a=t?Object.assign(t||{},a):i}a&&("initial"!==e&&(n=a.transition||this.state.options.transition||{}),i=Object.assign(i,a))}),t&&(i=SNe(t,o,g),n=i.transition||a||s),Object.entries(i).forEach(([e,t])=>{"transition"!==e&&(this.state.target[e]=t)}),n}mount(){const{element:e}=this.state;WNe.set(e,this.state),$Ne.get(e)||(this.state.visualElement.mount(e),$Ne.set(e,this.state.visualElement)),this.state.visualElement.state=this.state,this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.state.options,{animate:t}=this.state.visualElement.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){var e;null==(e=this.unmountControls)||e.call(this)}},class extends ENe{isActive(){const{whilePress:e,onPress:t,onPressCancel:a,onPressStart:n}=this.state.options;return Boolean(e||t||a||n)}constructor(e){super(e)}mount(){this.register()}update(){const{whilePress:e,onPress:t,onPressCancel:a,onPressStart:n}=this.state.options;e||t||a||n||this.register()}register(){const e=this.state.element;e&&this.isActive()&&(this.unmount(),this.unmount=gQe(e,(e,t)=>(dQe(this.state,t,"Start"),(e,{success:t})=>dQe(this.state,e,t?"End":"Cancel")),{useGlobalTarget:this.state.options.globalPressTarget}))}},class extends ENe{isActive(){const{whileHover:e,onHoverStart:t,onHoverEnd:a}=this.state.options;return Boolean(e||t||a)}constructor(e){super(e)}mount(){this.register()}update(){const{whileHover:e,onHoverStart:t,onHoverEnd:a}=this.state.visualElement.prevProps;e||t||a||this.register()}register(){const e=this.state.element;e&&this.isActive()&&(this.unmount(),this.unmount=function(e,t,a={}){const[n,i,o]=nQe(e,a),r=e=>{if(!cQe(e))return;const{target:a}=e,n=t(a,e);if("function"!=typeof n||!a)return;const o=e=>{cQe(e)&&(n(e),a.removeEventListener("pointerleave",o))};a.addEventListener("pointerleave",o,i)};return n.forEach(e=>{e.addEventListener("pointerenter",r,i)}),o}(e,(e,t)=>(hQe(this.state,t,"Start"),e=>{hQe(this.state,e,"End")})))}},class extends ENe{isActive(){const{whileInView:e,onViewportEnter:t,onViewportLeave:a}=this.state.options;return Boolean(e||t||a)}constructor(e){super(e)}startObserver(){const e=this.state.element;if(!e||!this.isActive())return;this.unmount();const{once:t,...a}=this.state.options.inViewOptions||{};this.unmount=function(e,t,{root:a,margin:n,amount:i="some"}={}){const o=wRe(e),r=new WeakMap,s=new IntersectionObserver(e=>{e.forEach(e=>{const a=r.get(e.target);if(e.isIntersecting!==Boolean(a))if(e.isIntersecting){const a=t(e.target,e);"function"==typeof a?r.set(e.target,a):s.unobserve(e.target)}else"function"==typeof a&&(a(e),r.delete(e.target))})},{root:a,rootMargin:n,threshold:"number"==typeof i?i:fQe[i]});return o.forEach(e=>s.observe(e)),()=>s.disconnect()}(e,(e,a)=>{if(pQe(this.state,a,"Enter"),!t)return e=>{pQe(this.state,a,"Leave")}},a)}mount(){this.startObserver()}update(){const{props:e,prevProps:t}=this.state.visualElement;["amount","margin","root"].some(function({inViewOptions:e={}},{inViewOptions:t={}}={}){return a=>e[a]!==t[a]}(e,t))&&this.startObserver()}},class extends ENe{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.state.element.matches(":focus-visible")}catch(t){e=!0}e&&(this.state.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&(this.state.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Cqe(AQe(this.state.element,"focus",()=>this.onFocus()),AQe(this.state.element,"blur",()=>this.onBlur()))}},class extends ENe{constructor(e){super(e),FNe(YLe)}initProjection(){const e=this.state.options;this.state.visualElement.projection=new QLe(this.state.visualElement.latestValues,e["data-framer-portal-id"]?void 0:LLe(this.state.visualElement.parent)),this.state.visualElement.projection.isPresent=!0,this.setOptions()}beforeMount(){this.initProjection()}setOptions(){const e=this.state.options;this.state.visualElement.projection.setOptions({layout:e.layout,layoutId:e.layoutId,alwaysMeasureLayout:Boolean(e.drag)||e.dragConstraints&&ULe(e.dragConstraints),visualElement:this.state.visualElement,animationType:"string"==typeof e.layout?e.layout:"both",layoutRoot:e.layoutRoot,layoutScroll:e.layoutScroll,crossfade:e.crossfade,onExitComplete:()=>{var e;if(!(null==(e=this.state.visualElement.projection)?void 0:e.isPresent)){const e=VNe.get(this.state.element);this.state.isSafeToRemove=!0,e&&e({detail:{isExit:!0}},!0)}}})}update(){this.setOptions()}mount(){var e;null==(e=this.state.visualElement.projection)||e.mount(this.state.element)}},class extends ENe{constructor(){super(...arguments),this.removePointerDownListener=zNe}onPointerDown(e){this.session=new lZe(e,this.createPanHandlers(),{transformPagePoint:this.state.visualElement.getTransformPagePoint(),contextWindow:_Ze(this.state.visualElement)})}createPanHandlers(){return{onSessionStart:kZe((e,t)=>{const{onPanSessionStart:a}=this.state.options;a&&a(e,t)}),onStart:kZe((e,t)=>{const{onPanStart:a}=this.state.options;a&&a(e,t)}),onMove:(e,t)=>{const{onPan:a}=this.state.options;a&&a(e,t)},onEnd:(e,t)=>{const{onPanEnd:a}=this.state.options;delete this.session,a&&HNe.postRender(()=>a(e,t))}}}mount(){this.removePointerDownListener=KLe(this.state.element,"pointerdown",this.onPointerDown.bind(this))}update(){}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}},class extends ENe{constructor(e){super(e),this.removeGroupControls=zNe,this.removeListeners=zNe,this.controls=new bZe(e.visualElement)}mount(){const{dragControls:e}=this.state.options;e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||zNe}unmount(){this.removeGroupControls(),this.removeListeners()}},class extends ENe{constructor(e){super(e),FNe(YLe)}beforeUpdate(){this.state.willUpdate("beforeUpdate")}update(){this.didUpdate()}didUpdate(){var e,t;(this.state.options.layout||this.state.options.layoutId||this.state.options.drag)&&(null==(t=null==(e=this.state.visualElement.projection)?void 0:e.root)||t.didUpdate())}mount(){var e;const t=this.state.options,a=this.state.options.layoutGroup;if(t.layout||t.layoutId){const t=this.state.visualElement.projection;t&&(t.promote(),null==(e=null==a?void 0:a.group)||e.add(t)),dLe.hasEverUpdated=!0}this.didUpdate()}beforeUnmount(){const e=this.state.visualElement.projection;e&&(this.state.willUpdate("beforeUnmount"),this.state.options.layoutId?(e.isPresent=!1,e.relegate()):this.state.options.layout&&(this.state.isSafeToRemove=!0))}unmount(){const e=this.state.options.layoutGroup,t=this.state.visualElement.projection;t&&((null==e?void 0:e.group)&&(this.state.options.layout||this.state.options.layoutId)&&e.group.remove(t),this.didUpdate())}}],xZe={reducedMotion:"never",transition:void 0,nonce:void 0},[OZe,EZe]=bNe("MotionConfig");function DZe(){return OZe(a.computed(()=>xZe))}const MZe=a.defineComponent({name:"MotionConfig",inheritAttrs:!1,__name:"MotionConfig",props:{transition:{},reduceMotion:{},reducedMotion:{default:({reduceMotion:e})=>kPe(e)?(DNe(!1,"`reduceMotion` is deprecated. Use `reducedMotion` instead."),e):xZe.reducedMotion},nonce:{},inViewOptions:{}},setup(e){const t=e,n=DZe(),i=a.computed(()=>({transition:t.transition??n.value.transition,reducedMotion:t.reducedMotion??n.value.reducedMotion,nonce:t.nonce??n.value.nonce,inViewOptions:t.inViewOptions??n.value.inViewOptions}));return EZe(i),(e,t)=>a.renderSlot(e.$slots,"default")}});function SZe(e){return 3===(null==e?void 0:e.nodeType)||8===(null==e?void 0:e.nodeType)?SZe(e.nextSibling):e}const[BZe,jZe]=bNe("LazyMotionContext");function TZe(e){var t;const n=vNe(null),i=wNe({}),o=DZe(),r=RNe({}),s=BZe({features:a.ref([]),strict:!1});if("production"!==process.env.NODE_ENV&&(null==(t=e.features)?void 0:t.length)&&s.strict){const t="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?DNe(!1,t):MNe(!1,t)}const l=a.useAttrs();function g(){return{...e,lazyMotionContext:s,layoutId:i.id&&e.layoutId?`${i.id}-${e.layoutId}`:e.layoutId||void 0,transition:e.transition??o.value.transition,layoutGroup:i,motionConfig:o.value,inViewOptions:e.inViewOptions??o.value.inViewOptions,animatePresenceContext:r,initial:!1===r.initial?r.initial:!0===e.initial?void 0:e.initial}}function u(){return{...l,...g()}}const d=new JNe(u(),n);kNe(d);const c=a.getCurrentInstance().proxy;return a.onBeforeMount(()=>{d.beforeMount()}),a.onMounted(()=>{d.mount(SZe(c.$el),u(),function(e){var t;const a="none"===(null==(t=SZe(e.$el))?void 0:t.style.display),n=e.$.vnode.transition;return n&&a}(c))}),a.onBeforeUnmount(()=>d.beforeUnmount()),a.onUnmounted(()=>{const e=SZe(c.$el);(null==e?void 0:e.isConnected)||d.unmount()}),a.onBeforeUpdate(()=>{d.beforeUpdate()}),a.onUpdated(()=>{d.update(u())}),{getProps:g,getAttrs:function(){var t;const a="svg"===d.type,n={...l};Object.keys(l).forEach(e=>{IPe(l[e])&&(n[e]=l[e].get())});let i={...e.style,...a?{}:(null==(t=d.visualElement)?void 0:t.latestValues)||d.baseTarget};if(a){const{attrs:e,style:t}=vPe({...d.isMounted()?d.target:d.baseTarget,...i});(t.transform||e.transformOrigin)&&(t.transformOrigin=e.transformOrigin??"50% 50%",delete e.transformOrigin),t.transform&&(t.transformBox=t.transformBox??"fill-box",delete e.transformBox),Object.assign(n,e),i=t}e.drag&&!1!==e.dragListener&&Object.assign(i,{userSelect:"none",WebkitUserSelect:"none",WebkitTouchCallout:"none",touchAction:!0===e.drag?"none":"pan-"+("x"===e.drag?"y":"x")});const o=_Pe(i);return o&&(n.style=o),n},layoutGroup:i,state:d}}const NZe={ignoreStrict:{type:Boolean},forwardMotionProps:{type:Boolean,default:!1},asChild:{type:Boolean,default:!1},hover:{type:[String,Array,Object]},press:{type:[String,Array,Object]},inView:{type:[String,Array,Object]},focus:{type:[String,Array,Object]},whileDrag:{type:[String,Array,Object]},whileHover:{type:[String,Array,Object],default:({hover:e})=>("development"===process.env.NODE_ENV&&e&&DNe(!0,"hover is deprecated. Use whileHover instead."),e)},whilePress:{type:[String,Array,Object],default:({press:e})=>("development"===process.env.NODE_ENV&&e&&DNe(!0,"press is deprecated. Use whilePress instead."),e)},whileInView:{type:[String,Array,Object],default:({inView:e})=>("development"===process.env.NODE_ENV&&e&&DNe(!0,"inView is deprecated. Use whileInView instead."),e)},whileFocus:{type:[String,Array,Object],default:({focus:e})=>("development"===process.env.NODE_ENV&&e&&DNe(!0,"focus is deprecated. Use whileFocus instead."),e)},custom:{type:[String,Number,Object,Array]},initial:{type:[String,Array,Object,Boolean],default:void 0},animate:{type:[String,Array,Object],default:void 0},exit:{type:[String,Array,Object]},variants:{type:Object},inherit:{type:Boolean},style:{type:Object},transformTemplate:{type:Function},transition:{type:Object},layoutGroup:{type:Object},motionConfig:{type:Object},onAnimationComplete:{type:Function},onUpdate:{type:Function},layout:{type:[Boolean,String],default:!1},layoutId:{type:String,default:void 0},layoutScroll:{type:Boolean,default:!1},layoutRoot:{type:Boolean,default:!1},"data-framer-portal-id":{type:String},crossfade:{type:Boolean,default:!0},layoutDependency:{type:[String,Number,Object,Array]},onBeforeLayoutMeasure:{type:Function},onLayoutMeasure:{type:Function},onLayoutAnimationStart:{type:Function},onLayoutAnimationComplete:{type:Function},globalPressTarget:{type:Boolean},onPressStart:{type:Function},onPress:{type:Function},onPressCancel:{type:Function},onHoverStart:{type:Function},onHoverEnd:{type:Function},inViewOptions:{type:Object},onViewportEnter:{type:Function},onViewportLeave:{type:Function},drag:{type:[Boolean,String]},dragSnapToOrigin:{type:Boolean},dragDirectionLock:{type:Boolean},dragPropagation:{type:Boolean},dragConstraints:{type:[Boolean,Object]},dragElastic:{type:[Boolean,Number,Object],default:.5},dragMomentum:{type:Boolean,default:!0},dragTransition:{type:Object},dragListener:{type:Boolean,default:!0},dragControls:{type:Object},onDragStart:{type:Function},onDragEnd:{type:Function},onDrag:{type:Function},onDirectionLock:{type:Function},onDragTransitionEnd:{type:Function},onMeasureDragConstraints:{type:Function},onPanSessionStart:{type:Function},onPanStart:{type:Function},onPan:{type:Function},onPanEnd:{type:Function}};const PZe=new Map,VZe=new Map;const RZe=["area","img","input"];function qZe(e,t,n){var i,o;if("string"==typeof e&&RZe.includes(e))return a.h(e,t);if("template"===e){if(!n.default)return null;const e=function(e){if(!Array.isArray(e))return[e];const t=[];for(const a of e)Array.isArray(a)?t.push(...a):t.push(a);return t}(n.default()),r=e.findIndex(e=>e.type!==a.Comment);if(-1===r)return e;const s=e[r];null==(i=s.props)||delete i.ref;const l=s.props?a.mergeProps(t,s.props):t;t.class&&(null==(o=s.props)?void 0:o.class)&&delete s.props.class;const g=a.cloneVNode(s,l);for(const t in l)t.startsWith("on")&&(g.props||(g.props={}),g.props[t]=l[t]);return 1===e.length?g:(e[r]=g,e)}return null}function zZe(e,t={}){var n;const i="string"==typeof e,o=i?e:e.name||"",r=(null==(n=t.features)?void 0:n.length)>0?PZe:VZe;if(i&&(null==r?void 0:r.has(e)))return r.get(e);const s=a.defineComponent({inheritAttrs:!1,props:{...NZe,features:{type:Object,default:()=>t.features||[]},as:{type:[String,Object],default:e||"div"}},name:o?`motion.${o}`:"Motion",setup(e,{slots:n}){const{getProps:i,getAttrs:o,state:r}=TZe(e);function s(){const t=r.element;if((!("object"==typeof e.as)||e.asChild)&&t){const{style:e}=o();if(e)for(const[a,n]of Object.entries(e))t.style[a]=n}}return()=>{const r=i(),l=o(),g=e.asChild?"template":e.as,u={...t.forwardMotionProps||e.forwardMotionProps?r:{},...l,onVnodeUpdated:s},d=qZe(g,u,n);return null!==d?d:a.h(g,{...u},n)}}});return i&&(null==r||r.set(e,s)),s}const QZe=function(e=[]){return new Proxy({},{get:(t,a)=>"create"===a?(t,a)=>zZe(t,{...a,features:e}):zZe(a,{features:e})})}(wZe).create("div"),LZe={class:"flex flex-wrap gap-4"},ZZe={class:"text-sm font-medium"},HZe={class:"text-xs text-muted-foreground"},GZe={class:"flex flex-wrap gap-3"},YZe={class:"text-xs font-medium uppercase"},UZe={class:"font-semibold"},WZe={class:"text-xs font-medium uppercase text-primary duration-200"},XZe=a.defineComponent({__name:"SpringCalendar",props:{calendarData:{},initialIndex:{}},emits:["update:activeIndex"],setup(e,{emit:t}){const n=e,i=t,o=a.ref(n.initialIndex??0);return(e,t)=>{const n=a.resolveComponent("TextMorph"),r=a.resolveComponent("Icon");return a.openBlock(),a.createBlock(a.unref(MZe),{transition:{duration:.7,type:"spring",bounce:.5}},{default:a.withCtx(()=>[a.createVNode(a.unref(QZe),{layout:"",as:"div",class:"flex w-full flex-col gap-6 overflow-hidden rounded-3xl border bg-muted/50 p-8",animate:{height:e.calendarData[o.value].events?"auto":"fit"}},{default:a.withCtx(()=>[a.createVNode(n,{text:e.calendarData[o.value].day,class:"w-fit font-bold","morph-time":.5,"cool-down-time":.1},null,8,["text"]),e.calendarData[o.value].events?(a.openBlock(),a.createBlock(a.unref(QZe),{key:"event-container"+Math.random(),layout:"",as:"div",class:"flex flex-col gap-4",initial:{x:10,opacity:0},animate:{x:0,opacity:1}},{default:a.withCtx(()=>[a.createVNode(a.unref(QZe),{as:"div",class:"flex items-center gap-2",layout:"",initial:{x:10,opacity:0},animate:{x:0,opacity:1}},{default:a.withCtx(()=>[a.createVNode(r,{name:"lucide:calendar"}),t[0]||(t[0]=a.createElementVNode("span",{class:"font-medium"},"Upcoming Events",-1))]),_:1,__:[0]}),a.createElementVNode("div",LZe,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(e.calendarData[o.value].events,e=>(a.openBlock(),a.createBlock(a.unref(QZe),{key:e.title+e.time+Math.random(),as:"div",layout:"",class:"w-full max-w-44 rounded-lg border p-3",initial:{x:10,opacity:0},animate:{x:0,opacity:1}},{default:a.withCtx(()=>[a.createElementVNode("p",ZZe,a.toDisplayString(e.title),1),a.createElementVNode("p",HZe,a.toDisplayString(e.day)+", "+a.toDisplayString(e.time),1)]),_:2},1024))),128))])]),_:1})):a.createCommentVNode("",!0),a.createElementVNode("div",GZe,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(e.calendarData,(e,t)=>(a.openBlock(),a.createBlock(a.unref(QZe),{key:e.date+"-"+t,as:"button",layout:"",class:a.normalizeClass(["flex flex-col rounded-2xl border border-border p-3 text-center opacity-100 duration-200 hover:bg-muted-foreground/10",o.value===t?"bg-muted-foreground/5":""]),"while-hover":{scale:1.1},"while-press":{scale:.8},transition:{duration:.01},onClick:e=>function(e){o.value=e,i("update:activeIndex",e)}(t)},{default:a.withCtx(()=>[a.createElementVNode("span",YZe,a.toDisplayString(e.month),1),a.createElementVNode("span",UZe,a.toDisplayString(e.date),1),a.createElementVNode("span",WZe,a.toDisplayString(e.day),1)]),_:2},1032,["class","onClick"]))),128))])]),_:1},8,["animate"])]),_:1})}}}),KZe="absolute inset-x-0 top-0 m-auto inline-block w-full",JZe=a.defineComponent({__name:"TextMorph",props:{class:{},text:{},morphTime:{default:1.5},coolDownTime:{default:.5}},setup(e){const t=e,n=a.ref(),i=a.ref(),o=a.ref(t.text),r=a.ref(t.text),s=a.ref(0),l=a.ref(0),g=a.ref(new Date),u=a.ref(!1);let d=0;function c(){s.value-=l.value,l.value=0;let e=s.value/t.morphTime;e>1&&(l.value=t.coolDownTime,e=1),function(e){if(!n.value||!i.value)return;i.value.textContent=r.value,n.value.textContent=o.value,i.value.style.filter=`blur(${Math.min(8/e-8,100)}px)`,i.value.style.opacity=100*Math.pow(e,.4)+"%";const t=1-e;n.value.style.filter=`blur(${Math.min(8/t-8,100)}px)`,n.value.style.opacity=100*Math.pow(t,.4)+"%"}(e),1===e&&(o.value=r.value)}function h(){d=requestAnimationFrame(h);const e=new Date,t=(e.getTime()-g.value.getTime())/1e3;g.value=e,l.value-=t,l.value<=0?(c(),l.value>0&&(cancelAnimationFrame(d),u.value=!1)):(s.value=0,n.value&&i.value&&(i.value.style.filter="none",i.value.style.opacity="100%",n.value.style.filter="none",n.value.style.opacity="0%"))}return a.watch(()=>t.text,e=>{e!==r.value&&(o.value=r.value,r.value=e,s.value=0,l.value=0,g.value=new Date,u.value||(u.value=!0,h()))}),a.onMounted(()=>{h()}),a.onUnmounted(()=>{cancelAnimationFrame(d)}),(e,o)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(a.unref(Dt)("relative h-16 w-full max-w-screen-md text-center text-[40pt] font-bold leading-none [filter:url(#threshold)_blur(0.6px)]",t.class))},[a.createElementVNode("span",{ref_key:"text1Ref",ref:n,class:a.normalizeClass(a.unref(Dt)(KZe))},null,2),a.createElementVNode("span",{ref_key:"text2Ref",ref:i,class:a.normalizeClass(a.unref(Dt)(KZe))},null,2),o[0]||(o[0]=a.createElementVNode("svg",{id:"filters",class:"fixed size-0",preserveAspectRatio:"xMidYMid slice"},[a.createElementVNode("defs",null,[a.createElementVNode("filter",{id:"threshold"},[a.createElementVNode("feColorMatrix",{in:"SourceGraphic",type:"matrix",values:"1 0 0 0 0\n 0 1 0 0 0\n 0 0 1 0 0\n 0 0 0 255 -140"})])])],-1))],2))}}),$Ze=Object.freeze(Object.defineProperty({__proto__:null,SpringCalendar:XZe,TextMorph:JZe},Symbol.toStringTag,{value:"Module"})),eHe=a.defineComponent({__name:"Switch",props:{defaultValue:{type:Boolean},modelValue:{type:[Boolean,null]},disabled:{type:Boolean},id:{},value:{},asChild:{type:Boolean},as:{},name:{},required:{type:Boolean},class:{}},emits:["update:modelValue"],setup(e,{emit:t}){const i=e,o=t,r=a.computed(()=>{const{class:e,...t}=i;return t}),s=n.useForwardPropsEmits(r,o);return(e,t)=>(a.openBlock(),a.createBlock(a.unref(n.SwitchRoot),a.mergeProps({"data-slot":"switch"},a.unref(s),{class:a.unref(Dt)("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",i.class)}),{default:a.withCtx(()=>[a.createVNode(a.unref(n.SwitchThumb),{"data-slot":"switch-thumb",class:a.normalizeClass(a.unref(Dt)("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0"))},{default:a.withCtx(()=>[a.renderSlot(e.$slots,"thumb")]),_:3},8,["class"])]),_:3},16,["class"]))}}),tHe=Object.freeze(Object.defineProperty({__proto__:null,Switch:eHe},Symbol.toStringTag,{value:"Module"})),aHe={"data-slot":"table-container",class:"relative w-full overflow-auto"},nHe=a.defineComponent({__name:"Table",props:{class:{}},setup(e){const t=e;return(e,n)=>(a.openBlock(),a.createElementBlock("div",aHe,[a.createElementVNode("table",{"data-slot":"table",class:a.normalizeClass(a.unref(Dt)("w-full caption-bottom text-sm",t.class))},[a.renderSlot(e.$slots,"default")],2)]))}}),iHe=a.defineComponent({__name:"TableBody",props:{class:{}},setup(e){const t=e;return(e,n)=>(a.openBlock(),a.createElementBlock("tbody",{"data-slot":"table-body",class:a.normalizeClass(a.unref(Dt)("[&_tr:last-child]:border-0",t.class))},[a.renderSlot(e.$slots,"default")],2))}}),oHe=a.defineComponent({__name:"TableCaption",props:{class:{}},setup(e){const t=e;return(e,n)=>(a.openBlock(),a.createElementBlock("caption",{"data-slot":"table-caption",class:a.normalizeClass(a.unref(Dt)("text-muted-foreground mt-4 text-sm",t.class))},[a.renderSlot(e.$slots,"default")],2))}}),rHe=a.defineComponent({__name:"TableCell",props:{class:{}},setup(e){const t=e;return(e,n)=>(a.openBlock(),a.createElementBlock("td",{"data-slot":"table-cell",class:a.normalizeClass(a.unref(Dt)("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t.class))},[a.renderSlot(e.$slots,"default")],2))}}),sHe=a.defineComponent({__name:"TableRow",props:{class:{}},setup(e){const t=e;return(e,n)=>(a.openBlock(),a.createElementBlock("tr",{"data-slot":"table-row",class:a.normalizeClass(a.unref(Dt)("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",t.class))},[a.renderSlot(e.$slots,"default")],2))}}),lHe={class:"flex items-center justify-center py-10"},gHe=a.defineComponent({__name:"TableEmpty",props:{class:{},colspan:{default:1}},setup(e){const t=e,n=a.computed(()=>{const{class:e,...a}=t;return a});return(e,i)=>(a.openBlock(),a.createBlock(sHe,null,{default:a.withCtx(()=>[a.createVNode(rHe,a.mergeProps({class:a.unref(Dt)("p-4 whitespace-nowrap align-middle text-sm text-foreground",t.class)},n.value),{default:a.withCtx(()=>[a.createElementVNode("div",lHe,[a.renderSlot(e.$slots,"default")])]),_:3},16,["class"])]),_:3}))}}),uHe=a.defineComponent({__name:"TableFooter",props:{class:{}},setup(e){const t=e;return(e,n)=>(a.openBlock(),a.createElementBlock("tfoot",{"data-slot":"table-footer",class:a.normalizeClass(a.unref(Dt)("bg-muted/50 border-t font-medium [&>tr]:last:border-b-0",t.class))},[a.renderSlot(e.$slots,"default")],2))}}),dHe=a.defineComponent({__name:"TableHead",props:{class:{}},setup(e){const t=e;return(e,n)=>(a.openBlock(),a.createElementBlock("th",{"data-slot":"table-head",class:a.normalizeClass(a.unref(Dt)("text-muted-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t.class))},[a.renderSlot(e.$slots,"default")],2))}}),cHe=a.defineComponent({__name:"TableHeader",props:{class:{}},setup(e){const t=e;return(e,n)=>(a.openBlock(),a.createElementBlock("thead",{"data-slot":"table-header",class:a.normalizeClass(a.unref(Dt)("[&_tr]:border-b",t.class))},[a.renderSlot(e.$slots,"default")],2))}}),hHe=Object.freeze(Object.defineProperty({__proto__:null,Table:nHe,TableBody:iHe,TableCaption:oHe,TableCell:rHe,TableEmpty:gHe,TableFooter:uHe,TableHead:dHe,TableHeader:cHe,TableRow:sHe},Symbol.toStringTag,{value:"Module"})),fHe=a.defineComponent({__name:"Tabs",props:{defaultValue:{},orientation:{},dir:{},activationMode:{},modelValue:{},unmountOnHide:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["update:modelValue"],setup(e,{emit:t}){const i=e,o=t,r=n.useForwardPropsEmits(i,o);return(e,t)=>(a.openBlock(),a.createBlock(a.unref(n.TabsRoot),a.normalizeProps(a.guardReactiveProps(a.unref(r))),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},16))}}),pHe=a.defineComponent({__name:"TabsContent",props:{value:{},forceMount:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,i=a.computed(()=>{const{class:e,...a}=t;return a});return(e,o)=>(a.openBlock(),a.createBlock(a.unref(n.TabsContent),a.mergeProps({class:a.unref(Dt)("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",t.class)},i.value),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},16,["class"]))}}),AHe=a.defineComponent({__name:"TabsList",props:{loop:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,i=a.computed(()=>{const{class:e,...a}=t;return a});return(e,o)=>(a.openBlock(),a.createBlock(a.unref(n.TabsList),a.mergeProps(i.value,{class:a.unref(Dt)("inline-flex items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",t.class)}),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},16,["class"]))}}),CHe={class:"truncate"},mHe=a.defineComponent({__name:"TabsTrigger",props:{value:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(e){const t=e,i=a.computed(()=>{const{class:e,...a}=t;return a}),o=n.useForwardProps(i);return(e,i)=>(a.openBlock(),a.createBlock(a.unref(n.TabsTrigger),a.mergeProps(a.unref(o),{class:a.unref(Dt)("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all 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=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",t.class)}),{default:a.withCtx(()=>[a.createElementVNode("span",CHe,[a.renderSlot(e.$slots,"default")])]),_:3},16,["class"]))}}),IHe=Object.freeze(Object.defineProperty({__proto__:null,Tabs:fHe,TabsContent:pHe,TabsList:AHe,TabsTrigger:mHe},Symbol.toStringTag,{value:"Module"})),yHe={key:0,class:"flex items-center gap-2"},_He={key:1},FHe=["onClick"],bHe=a.defineComponent({__name:"TailwindColorPicker",props:{defaultValue:{},modelValue:{},class:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=["yellow","green","cyan","blue","purple","pink","red"],i=e,o=t,r=zZ(i,"modelValue",o,{passive:!0,defaultValue:i.defaultValue??""});return(e,t)=>{const s=a.resolveComponent("Button"),l=a.resolveComponent("PopoverTrigger"),g=a.resolveComponent("PopoverContent"),u=a.resolveComponent("Popover");return a.openBlock(),a.createBlock(u,null,{default:a.withCtx(()=>[a.createVNode(l,{"as-child":""},{default:a.withCtx(()=>[a.createVNode(s,{variant:"outline",class:"w-44"},{default:a.withCtx(()=>[a.unref(r)?(a.openBlock(),a.createElementBlock("span",yHe,[a.createElementVNode("div",{class:a.normalizeClass([`bg-${a.unref(r)}`,"size-5 rounded-full"])},null,2),a.createTextVNode(" "+a.toDisplayString(a.unref(r).split("-")[0])+" "+a.toDisplayString(a.unref(r).split("-")[1]),1)])):(a.openBlock(),a.createElementBlock("span",_He," Select color "))]),_:1})]),_:1}),a.createVNode(g,{class:"w-[170px]"},{default:a.withCtx(()=>[(a.openBlock(),a.createElementBlock(a.Fragment,null,a.renderList(n,e=>a.createElementVNode("div",{class:"flex gap-1 mb-1",key:e},[(a.openBlock(),a.createElementBlock(a.Fragment,null,a.renderList(5,t=>a.createElementVNode("div",{key:t,class:a.normalizeClass(["flex flex-col items-center cursor-pointer size-6 rounded-full cursor-pointer transition-all",`bg-${e}-${100*(t+2)} ${a.unref(r)===`${e}-${100*(t+2)}`?"scale-110 z-10 outline-2 outline-white":""}`]),onClick:a=>{var n;(n=`${e}-${100*(t+2)}`)===r.value?o("update:modelValue",i.defaultValue??""):o("update:modelValue",n)}},null,10,FHe)),64))])),64))]),_:1})]),_:1})}}}),vHe=Object.freeze(Object.defineProperty({__proto__:null,TailwindColorPicker:bHe},Symbol.toStringTag,{value:"Module"})),kHe=a.defineComponent({__name:"Textarea",props:{class:{},defaultValue:{},modelValue:{}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,i=zZ(n,"modelValue",t,{passive:!0,defaultValue:n.defaultValue});return(e,t)=>a.withDirectives((a.openBlock(),a.createElementBlock("textarea",{"onUpdate:modelValue":t[0]||(t[0]=e=>a.isRef(i)?i.value=e:null),"data-slot":"textarea",class:a.normalizeClass(a.unref(Dt)("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",n.class))},null,2)),[[a.vModelText,a.unref(i)]])}}),wHe=Object.freeze(Object.defineProperty({__proto__:null,Textarea:kHe},Symbol.toStringTag,{value:"Module"})),xHe=a.defineComponent({__name:"Toggle",props:{defaultValue:{type:Boolean},modelValue:{type:[Boolean,null]},disabled:{type:Boolean,default:!1},asChild:{type:Boolean},as:{},name:{},required:{type:Boolean},class:{},variant:{default:"default"},size:{default:"default"}},emits:["update:modelValue"],setup(e,{emit:t}){const i=e,o=t,r=xZ(i,"class","size","variant"),s=n.useForwardPropsEmits(r,o);return(e,t)=>(a.openBlock(),a.createBlock(a.unref(n.Toggle),a.mergeProps({"data-slot":"toggle"},a.unref(s),{class:a.unref(Dt)(a.unref(OHe)({variant:e.variant,size:e.size}),i.class)}),{default:a.withCtx(()=>[a.renderSlot(e.$slots,"default")]),_:3},16,["class"]))}}),OHe=i.cva("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground"},size:{default:"h-9 px-2 min-w-9",sm:"h-8 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}}),EHe=Object.freeze(Object.defineProperty({__proto__:null,Toggle:xHe,toggleVariants:OHe},Symbol.toStringTag,{value:"Module"}));const DHe=Object.assign({"./components/ui/apple-emoji/index.ts":Fe,"./components/ui/avatar/index.ts":Tt,"./components/ui/badge/index.ts":Pt,"./components/ui/breadcrumb/index.ts":xM,"./components/ui/button/index.ts":MM,"./components/ui/calendar/index.ts":GM,"./components/ui/card/index.ts":eS,"./components/ui/checkbox/index.ts":aS,"./components/ui/code-editor/index.ts":dZ,"./components/ui/collapsible/index.ts":pZ,"./components/ui/combobox/index.ts":HZ,"./components/ui/command/index.ts":mH,"./components/ui/context-menu/index.ts":TH,"./components/ui/custom-dialog/index.ts":PH,"./components/ui/dialog/index.ts":nH,"./components/ui/drawer/index.ts":dG,"./components/ui/dropdown-menu/index.ts":OG,"./components/ui/emoji-picker/index.ts":MG,"./components/ui/flow-builder/index.ts":Zue,"./components/ui/form-builder/components/admin/element-setting-views/index.ts":cde,"./components/ui/form-builder/components/elements/button/index.ts":pde,"./components/ui/form-builder/components/elements/checkbox/index.ts":_de,"./components/ui/form-builder/components/elements/file/index.ts":bde,"./components/ui/form-builder/components/elements/images/index.ts":wde,"./components/ui/form-builder/components/elements/index.ts":yme,"./components/ui/form-builder/components/elements/items/index.ts":Ode,"./components/ui/form-builder/components/elements/label/index.ts":Mde,"./components/ui/form-builder/components/elements/location/index.ts":Bde,"./components/ui/form-builder/components/elements/radios/index.ts":Nde,"./components/ui/form-builder/components/elements/richtext/index.ts":Vde,"./components/ui/form-builder/components/elements/scanner/index.ts":mme,"./components/ui/form-builder/components/elements/select/index.ts":zde,"./components/ui/form-builder/components/elements/text/index.ts":Zde,"./components/ui/form-builder/components/elements/textarea/index.ts":Yde,"./components/ui/form-builder/components/elements/textfield/index.ts":Xde,"./components/ui/form-builder/index.ts":nbe,"./components/ui/form/index.ts":oke,"./components/ui/input/index.ts":ske,"./components/ui/integration-action-builder/index.ts":Cke,"./components/ui/integration-action-builder/integrations/firebase/index.ts":age,"./components/ui/integration-action-builder/integrations/index.ts":_ge,"./components/ui/integration-action-builder/integrations/openai/index.ts":fge,"./components/ui/integration-action-builder/integrations/twilio/index.ts":Ige,"./components/ui/integration-icon/index.ts":wke,"./components/ui/label/index.ts":ake,"./components/ui/lucide-icon-selector/index.ts":Tke,"./components/ui/media-picker/index.ts":IBe,"./components/ui/menubar/index.ts":PBe,"./components/ui/number-field/index.ts":LBe,"./components/ui/pagination/index.ts":WBe,"./components/ui/popover/index.ts":eje,"./components/ui/query-builder-dialog/index.ts":Ije,"./components/ui/radio-group/index.ts":Fje,"./components/ui/range-calendar/index.ts":Nje,"./components/ui/resizable/index.ts":zje,"./components/ui/resource-select/index.ts":Zje,"./components/ui/ripple-button/index.ts":Uje,"./components/ui/sandbox/index.ts":Xje,"./components/ui/scroll-area/index.ts":$je,"./components/ui/segmented-control/index.ts":iTe,"./components/ui/select/index.ts":CTe,"./components/ui/separator/index.ts":ITe,"./components/ui/sheet/index.ts":ETe,"./components/ui/sidebar/index.ts":hNe,"./components/ui/skeleton/index.ts":nNe,"./components/ui/sonner/index.ts":pNe,"./components/ui/spring-calendar/index.ts":$Ze,"./components/ui/switch/index.ts":tHe,"./components/ui/table/index.ts":hHe,"./components/ui/tabs/index.ts":IHe,"./components/ui/tailwind-color-picker/index.ts":vHe,"./components/ui/textarea/index.ts":wHe,"./components/ui/toggle/index.ts":EHe,"./components/ui/tooltip/index.ts":JTe}),MHe={};for(const BHe of Object.values(DHe))Object.assign(MHe,BHe);exports.components=MHe,exports.useBreadcrumbs=()=>BG("cms-useBreadcrumbs")(),exports.useCms=function(){const e=a.inject("breadcrumbs"),t=a.inject("currentProject");if(!e||!t)throw new Error("Not inside CMS context");return{breadcrumbs:e,project:t}},exports.useConfirmation=LG,exports.useFirebaseIntegration=ZG,exports.useFlowBuilder=QG,exports.useFormBuilder=zG,exports.useIntegrationActionBuilder=jG,exports.useIntegrationActions=NG,exports.useIntegrations=TG,exports.useLayout=Ole,exports.useLogs=()=>BG("cms-useLogs")(),exports.useMediaLibrary=PG,exports.useModulePermissions=()=>BG("cms-useModulePermissions")(),exports.useModuleStorage=()=>BG("cms-useModuleStorage")(),exports.useNavigateToModuleRoute=()=>BG("cms-useNavigateToModuleRoute")(),exports.useOverlayStack=HG,exports.useProjectService=VG,exports.useQueryBuilder=RG,exports.useRunProcess=w4,exports.useUtilsService=qG;