@udixio/ui-react 2.9.19 → 2.9.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1,10 +1,10 @@
1
- "use strict";var nn=Object.defineProperty;var sn=(t,n,s)=>n in t?nn(t,n,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[n]=s;var B=(t,n,s)=>sn(t,typeof n!="symbol"?n+"":n,s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react/jsx-runtime"),l=require("react"),U=require("motion/react"),Ue=require("clsx"),rn=require("tailwind-merge"),Me=require("react-dom"),Se=require("@udixio/theme"),Ke=require("@udixio/tailwind"),on=require("react-textarea-autosize"),Ge=({colorName:t="on-surface",triggerRef:n})=>{const s={initial:{opacity:1,"--r":"25%"},animate:{opacity:1,"--r":"100%",transition:{duration:.5}},exit:{opacity:0,"--r":"100%",transition:{duration:.3}}},[o,r]=l.useState(!0),[d,u]=l.useState(!1),[a,f]=l.useState({x:50,y:50});l.useEffect(()=>{d&&(r(!0),r(!1))},[d]),l.useEffect(()=>{const p=n==null?void 0:n.current;if(p)return p.addEventListener("mousedown",i),p.addEventListener("mouseup",x),p.addEventListener("mouseleave",h),()=>{p.removeEventListener("mousedown",i),p.removeEventListener("mouseup",x),p.removeEventListener("mouseleave",h)}},[n]);const i=p=>{const N=n==null?void 0:n.current,b=N.getBoundingClientRect();u(!0),f({x:(p.clientX-b.left)/N.clientWidth*100,y:(p.clientY-b.top)/N.clientHeight*100})},h=p=>{u(!1)},x=p=>{u(!1)},m=`color-mix(in srgb, var(--state-color,_var(--color-${t})) 10%, transparent)`,y={position:"absolute",inset:0,width:"100%",height:"100%","--x":a.x+"%","--y":a.y+"%","--r":"0%",background:`radial-gradient(ellipse at var(--x) var(--y), ${m} var(--r), transparent calc(var(--r) * 2))`,pointerEvents:"none"};return c.jsx(U.AnimatePresence,{mode:"wait",children:(d||!d&&!o)&&c.jsx(U.motion.div,{style:y,variants:s,initial:"initial",animate:"animate",exit:"exit",onAnimationComplete:()=>r(!0)})})},Je=rn.extendTailwindMerge({override:{classGroups:{"text-color":[{text:[t=>!t.startsWith("display-")&&!t.startsWith("headline-")&&!t.startsWith("title-")&&!t.startsWith("body-")&&!t.startsWith("label-")]}]}},extend:{classGroups:{font:[{text:[t=>t.startsWith("display-")||t.startsWith("headline-")||t.startsWith("title-")||t.startsWith("body-")||t.startsWith("label-")]}]},conflictingClassGroups:{font:["font"]}}}),g=(...t)=>Je(Ue.clsx(t)),Ze=(...t)=>Je(Ue.clsx(t));function ln(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}const Ee=t=>{const n={};t.classNameList.forEach(o=>{var r;if(o)if(typeof o=="string")(n[r=t.default]??(n[r]=[])).push(o);else{const d=o(t.states);Object.entries(d).map(u=>{const[a,f]=u;(n[a]??(n[a]=[])).push(f)})}});const s=n;return Object.entries(n).map(o=>{let[r,d]=o;d=d.reverse(),r==t.default&&d.unshift("relative"),d.unshift(ln(r)),s[r]=Ze(...d)}),s},ne=(t,n)=>s=>Ee({classNameList:[s.className,n],default:t,states:s}),ee=(t,n)=>s=>l.useMemo(()=>Ee({classNameList:[s.className,n],default:t,states:s}),[s]);function an(t,n,s){return l.useMemo(()=>Ee({classNameList:[s==null?void 0:s.className,n],default:t,states:s}),[t,n,s])}const Qe=ne("customScroll",({orientation:t,draggable:n,isDragging:s})=>({customScroll:g("flex h-full w-full",n&&["[&::-webkit-scrollbar-track]:rounded-full","[&::-webkit-scrollbar-track]:bg-transparent","[&::-webkit-scrollbar-thumb]:rounded-full",{"[&::-webkit-scrollbar-thumb]:bg-outline":s,"[&::-webkit-scrollbar-thumb]:bg-transparent":!s},{"[&::-webkit-scrollbar]:h-2":t==="horizontal"},{"[&::-webkit-scrollbar]:w-2":t==="vertical"}],{"overflow-y-scroll flex-col":t==="vertical","overflow-x-scroll flex-row":t==="horizontal","cursor-grab":n&&!s,"cursor-grabbing":n&&s}),track:g("overflow-hidden flex-none sticky",{"left-0 h-full":t==="horizontal","top-0 w-full":t==="vertical"})}));function cn(t,n){let s=0,o=null,r=null;const d=(u,a)=>{s=Date.now(),n(u,a)};return(u,a)=>{const f=Date.now(),i=t-(f-s);i<=0?(o&&(clearTimeout(o),o=null),d(u,a)):(r={v:u,o:a},o||(o=setTimeout(()=>{o=null;const h=r;r=null,h&&d(h.v,h.o)},i)))}}const et=({children:t,orientation:n="vertical",scrollSize:s,onScroll:o,className:r,draggable:d=!1,throttleDuration:u=75,scroll:a,setScroll:f})=>{var te,k;const i=l.useRef(null),h=l.useRef(null),[x,m]=l.useState({width:null,height:null});l.useEffect(()=>{if(!i.current)return;const j=new ResizeObserver(L=>{for(const D of L)D.target===i.current&&m({width:D.contentRect.width,height:D.contentRect.height})});return j.observe(i.current),()=>{j.disconnect()}},[i]);const y=l.useRef(null),p=l.useRef(null),N=()=>{const j=h.current;return j?{width:s??j.scrollWidth,height:s??j.scrollHeight}:null},b=()=>{const j=i.current;return j?{width:j.clientWidth,height:j.clientHeight}:null},{scrollYProgress:M,scrollXProgress:S}=U.useScroll({container:i}),w=l.useRef(null);w.current||(w.current=cn(u,(j,L)=>{!p.current||!y.current||!i.current||(L===(n==="horizontal"?"x":"y")&&(f==null||f(j)),o&&(n==="horizontal"&&L==="x"&&o({scrollProgress:j,scroll:j*(y.current.width-i.current.clientWidth),scrollTotal:y.current.width-i.current.clientWidth,scrollVisible:p.current.width}),n==="vertical"&&L==="y"&&o({scrollProgress:j,scroll:j*(y.current.height-i.current.clientHeight),scrollTotal:y.current.height-i.current.clientHeight,scrollVisible:p.current.height})))}));const O=(j,L)=>{w.current&&w.current(j,L)};l.useEffect(()=>{x.width&&O(S.get(),"x"),x.height&&O(M.get(),"y")},[x]),l.useEffect(()=>{const j=i.current,L=h.current;if(!j||!L||typeof a!="number")return;const D=(z,Y,X)=>Math.min(X,Math.max(Y,z));if(n==="horizontal"){const z=Math.max(0,(s??L.scrollWidth)-j.clientWidth);j.scrollLeft=D(a*z,0,z)}else{const z=Math.max(0,(s??L.scrollHeight)-j.clientHeight);j.scrollTop=D(a*z,0,z)}},[a,n,s]),U.useMotionValueEvent(S,"change",j=>{O(j,"x")}),U.useMotionValueEvent(M,"change",j=>{O(j,"y")});const[A,v]=l.useState(!1);l.useLayoutEffect(()=>{A||!p.current||!y.current||!o||(o({scrollProgress:0,scroll:0,scrollTotal:n=="vertical"?y.current.height:y.current.width,scrollVisible:n=="vertical"?p.current.height:p.current.width}),v(!0))},[p,y,o]),y.current=N(),p.current=b();const[E,$]=l.useState(!1),I=Qe({isDragging:E,children:t,className:r,onScroll:o,orientation:n,scrollSize:s,draggable:d,throttleDuration:u}),[P,C]=l.useState(0),[_,T]=l.useState(0),Z=j=>{if(!d)return;const L=i.current;if(!L||P==null)return;const z=(j.pageX-L.offsetLeft-P)*1.5;L.scrollLeft=_-z},H=j=>{const L=i.current;L&&($(!0),C(j.pageX-L.offsetLeft),T(L.scrollLeft))},R=j=>{E&&(j.preventDefault(),Z(j))},F=()=>{$(!1)},V=()=>{$(!1)},G=j=>{j.preventDefault()},J=l.useRef(null);return l.useEffect(()=>()=>{J.current&&clearTimeout(J.current)},[]),l.useEffect(()=>{const j=i.current;if(!j)return;const L=D=>{var Q,W,q,se;const z=D.detail,Y=i.current;if(!Y||!z)return;const X=z.orientation??n;if(typeof z.progress=="number")if(X==="horizontal"){const re=Math.max(0,(((Q=y.current)==null?void 0:Q.width)??0)-Y.clientWidth);Y.scrollLeft=Math.min(re,Math.max(0,z.progress*re))}else{const re=Math.max(0,(((W=y.current)==null?void 0:W.height)??0)-Y.clientHeight);Y.scrollTop=Math.min(re,Math.max(0,z.progress*re))}else if(typeof z.scroll=="number")if(X==="horizontal"){const re=Math.max(0,(((q=y.current)==null?void 0:q.width)??0)-Y.clientWidth);Y.scrollLeft=Math.min(re,Math.max(0,z.scroll))}else{const re=Math.max(0,(((se=y.current)==null?void 0:se.height)??0)-Y.clientHeight);Y.scrollTop=Math.min(re,Math.max(0,z.scroll))}};return j.addEventListener("udx:customScroll:set",L),()=>{j.removeEventListener("udx:customScroll:set",L)}},[n]),c.jsxs("div",{className:I.customScroll,ref:i,onMouseDown:H,onMouseMove:R,onMouseUp:F,onMouseLeave:V,onDragStart:G,onScroll:j=>{E||(C(null),$(!0),J.current&&clearTimeout(J.current),J.current=setTimeout(()=>{$(!1)},1e3))},children:[c.jsx("div",{ref:h,style:n==="vertical"?{height:((te=p==null?void 0:p.current)==null?void 0:te.height)??"100%"}:{width:((k=p==null?void 0:p.current)==null?void 0:k.width)??"100%"},className:I.track,children:t}),p.current&&y.current&&c.jsxs(c.Fragment,{children:[n==="vertical"&&y.current.height>p.current.height&&c.jsx(U.motion.div,{className:"flex-none",style:{height:y.current.height-p.current.height}}),n==="horizontal"&&y.current.width>p.current.width&&c.jsx(U.motion.div,{className:"flex-none",style:{width:y.current.width-p.current.width}})]})]})};var un="1.3.17";function tt(t,n,s){return Math.max(t,Math.min(n,s))}function dn(t,n,s){return(1-s)*t+s*n}function fn(t,n,s,o){return dn(t,n,1-Math.exp(-s*o))}function hn(t,n){return(t%n+n)%n}var mn=class{constructor(){B(this,"isRunning",!1);B(this,"value",0);B(this,"from",0);B(this,"to",0);B(this,"currentTime",0);B(this,"lerp");B(this,"duration");B(this,"easing");B(this,"onUpdate")}advance(t){var s;if(!this.isRunning)return;let n=!1;if(this.duration&&this.easing){this.currentTime+=t;const o=tt(0,this.currentTime/this.duration,1);n=o>=1;const r=n?1:this.easing(o);this.value=this.from+(this.to-this.from)*r}else this.lerp?(this.value=fn(this.value,this.to,this.lerp*60,t),Math.round(this.value)===this.to&&(this.value=this.to,n=!0)):(this.value=this.to,n=!0);n&&this.stop(),(s=this.onUpdate)==null||s.call(this,this.value,n)}stop(){this.isRunning=!1}fromTo(t,n,{lerp:s,duration:o,easing:r,onStart:d,onUpdate:u}){this.from=this.value=t,this.to=n,this.lerp=s,this.duration=o,this.easing=r,this.currentTime=0,this.isRunning=!0,d==null||d(),this.onUpdate=u}};function pn(t,n){let s;return function(...o){let r=this;clearTimeout(s),s=setTimeout(()=>{s=void 0,t.apply(r,o)},n)}}var yn=class{constructor(t,n,{autoResize:s=!0,debounce:o=250}={}){B(this,"width",0);B(this,"height",0);B(this,"scrollHeight",0);B(this,"scrollWidth",0);B(this,"debouncedResize");B(this,"wrapperResizeObserver");B(this,"contentResizeObserver");B(this,"resize",()=>{this.onWrapperResize(),this.onContentResize()});B(this,"onWrapperResize",()=>{this.wrapper instanceof Window?(this.width=window.innerWidth,this.height=window.innerHeight):(this.width=this.wrapper.clientWidth,this.height=this.wrapper.clientHeight)});B(this,"onContentResize",()=>{this.wrapper instanceof Window?(this.scrollHeight=this.content.scrollHeight,this.scrollWidth=this.content.scrollWidth):(this.scrollHeight=this.wrapper.scrollHeight,this.scrollWidth=this.wrapper.scrollWidth)});this.wrapper=t,this.content=n,s&&(this.debouncedResize=pn(this.resize,o),this.wrapper instanceof Window?window.addEventListener("resize",this.debouncedResize,!1):(this.wrapperResizeObserver=new ResizeObserver(this.debouncedResize),this.wrapperResizeObserver.observe(this.wrapper)),this.contentResizeObserver=new ResizeObserver(this.debouncedResize),this.contentResizeObserver.observe(this.content)),this.resize()}destroy(){var t,n;(t=this.wrapperResizeObserver)==null||t.disconnect(),(n=this.contentResizeObserver)==null||n.disconnect(),this.wrapper===window&&this.debouncedResize&&window.removeEventListener("resize",this.debouncedResize,!1)}get limit(){return{x:this.scrollWidth-this.width,y:this.scrollHeight-this.height}}},nt=class{constructor(){B(this,"events",{})}emit(t,...n){var o;let s=this.events[t]||[];for(let r=0,d=s.length;r<d;r++)(o=s[r])==null||o.call(s,...n)}on(t,n){var s;return(s=this.events[t])!=null&&s.push(n)||(this.events[t]=[n]),()=>{var o;this.events[t]=(o=this.events[t])==null?void 0:o.filter(r=>n!==r)}}off(t,n){var s;this.events[t]=(s=this.events[t])==null?void 0:s.filter(o=>n!==o)}destroy(){this.events={}}},He=100/6,he={passive:!1},xn=class{constructor(t,n={wheelMultiplier:1,touchMultiplier:1}){B(this,"touchStart",{x:0,y:0});B(this,"lastDelta",{x:0,y:0});B(this,"window",{width:0,height:0});B(this,"emitter",new nt);B(this,"onTouchStart",t=>{const{clientX:n,clientY:s}=t.targetTouches?t.targetTouches[0]:t;this.touchStart.x=n,this.touchStart.y=s,this.lastDelta={x:0,y:0},this.emitter.emit("scroll",{deltaX:0,deltaY:0,event:t})});B(this,"onTouchMove",t=>{const{clientX:n,clientY:s}=t.targetTouches?t.targetTouches[0]:t,o=-(n-this.touchStart.x)*this.options.touchMultiplier,r=-(s-this.touchStart.y)*this.options.touchMultiplier;this.touchStart.x=n,this.touchStart.y=s,this.lastDelta={x:o,y:r},this.emitter.emit("scroll",{deltaX:o,deltaY:r,event:t})});B(this,"onTouchEnd",t=>{this.emitter.emit("scroll",{deltaX:this.lastDelta.x,deltaY:this.lastDelta.y,event:t})});B(this,"onWheel",t=>{let{deltaX:n,deltaY:s,deltaMode:o}=t;const r=o===1?He:o===2?this.window.width:1,d=o===1?He:o===2?this.window.height:1;n*=r,s*=d,n*=this.options.wheelMultiplier,s*=this.options.wheelMultiplier,this.emitter.emit("scroll",{deltaX:n,deltaY:s,event:t})});B(this,"onWindowResize",()=>{this.window={width:window.innerWidth,height:window.innerHeight}});this.element=t,this.options=n,window.addEventListener("resize",this.onWindowResize,!1),this.onWindowResize(),this.element.addEventListener("wheel",this.onWheel,he),this.element.addEventListener("touchstart",this.onTouchStart,he),this.element.addEventListener("touchmove",this.onTouchMove,he),this.element.addEventListener("touchend",this.onTouchEnd,he)}on(t,n){return this.emitter.on(t,n)}destroy(){this.emitter.destroy(),window.removeEventListener("resize",this.onWindowResize,!1),this.element.removeEventListener("wheel",this.onWheel,he),this.element.removeEventListener("touchstart",this.onTouchStart,he),this.element.removeEventListener("touchmove",this.onTouchMove,he),this.element.removeEventListener("touchend",this.onTouchEnd,he)}},Oe=t=>Math.min(1,1.001-Math.pow(2,-10*t)),gn=class{constructor({wrapper:t=window,content:n=document.documentElement,eventsTarget:s=t,smoothWheel:o=!0,syncTouch:r=!1,syncTouchLerp:d=.075,touchInertiaExponent:u=1.7,duration:a,easing:f,lerp:i=.1,infinite:h=!1,orientation:x="vertical",gestureOrientation:m=x==="horizontal"?"both":"vertical",touchMultiplier:y=1,wheelMultiplier:p=1,autoResize:N=!0,prevent:b,virtualScroll:M,overscroll:S=!0,autoRaf:w=!1,anchors:O=!1,autoToggle:A=!1,allowNestedScroll:v=!1,__experimental__naiveDimensions:E=!1,naiveDimensions:$=E,stopInertiaOnNavigate:I=!1}={}){B(this,"_isScrolling",!1);B(this,"_isStopped",!1);B(this,"_isLocked",!1);B(this,"_preventNextNativeScrollEvent",!1);B(this,"_resetVelocityTimeout",null);B(this,"_rafId",null);B(this,"isTouching");B(this,"time",0);B(this,"userData",{});B(this,"lastVelocity",0);B(this,"velocity",0);B(this,"direction",0);B(this,"options");B(this,"targetScroll");B(this,"animatedScroll");B(this,"animate",new mn);B(this,"emitter",new nt);B(this,"dimensions");B(this,"virtualScroll");B(this,"onScrollEnd",t=>{t instanceof CustomEvent||(this.isScrolling==="smooth"||this.isScrolling===!1)&&t.stopPropagation()});B(this,"dispatchScrollendEvent",()=>{this.options.wrapper.dispatchEvent(new CustomEvent("scrollend",{bubbles:this.options.wrapper===window,detail:{lenisScrollEnd:!0}}))});B(this,"onTransitionEnd",t=>{t.propertyName.includes("overflow")&&this.checkOverflow()});B(this,"onClick",t=>{const s=t.composedPath().filter(o=>o instanceof HTMLAnchorElement&&o.getAttribute("href"));if(this.options.anchors){const o=s.find(r=>{var d;return(d=r.getAttribute("href"))==null?void 0:d.includes("#")});if(o){const r=o.getAttribute("href");if(r){const d=typeof this.options.anchors=="object"&&this.options.anchors?this.options.anchors:void 0,u=`#${r.split("#")[1]}`;this.scrollTo(u,d)}}}this.options.stopInertiaOnNavigate&&s.find(r=>r.host===window.location.host)&&this.reset()});B(this,"onPointerDown",t=>{t.button===1&&this.reset()});B(this,"onVirtualScroll",t=>{if(typeof this.options.virtualScroll=="function"&&this.options.virtualScroll(t)===!1)return;const{deltaX:n,deltaY:s,event:o}=t;if(this.emitter.emit("virtual-scroll",{deltaX:n,deltaY:s,event:o}),o.ctrlKey||o.lenisStopPropagation)return;const r=o.type.includes("touch"),d=o.type.includes("wheel");this.isTouching=o.type==="touchstart"||o.type==="touchmove";const u=n===0&&s===0;if(this.options.syncTouch&&r&&o.type==="touchstart"&&u&&!this.isStopped&&!this.isLocked){this.reset();return}const f=this.options.gestureOrientation==="vertical"&&s===0||this.options.gestureOrientation==="horizontal"&&n===0;if(u||f)return;let i=o.composedPath();i=i.slice(0,i.indexOf(this.rootElement));const h=this.options.prevent;if(i.find(b=>{var M,S,w;return b instanceof HTMLElement&&(typeof h=="function"&&(h==null?void 0:h(b))||((M=b.hasAttribute)==null?void 0:M.call(b,"data-lenis-prevent"))||r&&((S=b.hasAttribute)==null?void 0:S.call(b,"data-lenis-prevent-touch"))||d&&((w=b.hasAttribute)==null?void 0:w.call(b,"data-lenis-prevent-wheel"))||this.options.allowNestedScroll&&this.checkNestedScroll(b,{deltaX:n,deltaY:s}))}))return;if(this.isStopped||this.isLocked){o.cancelable&&o.preventDefault();return}if(!(this.options.syncTouch&&r||this.options.smoothWheel&&d)){this.isScrolling="native",this.animate.stop(),o.lenisStopPropagation=!0;return}let m=s;this.options.gestureOrientation==="both"?m=Math.abs(s)>Math.abs(n)?s:n:this.options.gestureOrientation==="horizontal"&&(m=n),(!this.options.overscroll||this.options.infinite||this.options.wrapper!==window&&this.limit>0&&(this.animatedScroll>0&&this.animatedScroll<this.limit||this.animatedScroll===0&&s>0||this.animatedScroll===this.limit&&s<0))&&(o.lenisStopPropagation=!0),o.cancelable&&o.preventDefault();const y=r&&this.options.syncTouch,N=r&&o.type==="touchend";N&&(m=Math.sign(this.velocity)*Math.pow(Math.abs(this.velocity),this.options.touchInertiaExponent)),this.scrollTo(this.targetScroll+m,{programmatic:!1,...y?{lerp:N?this.options.syncTouchLerp:1}:{lerp:this.options.lerp,duration:this.options.duration,easing:this.options.easing}})});B(this,"onNativeScroll",()=>{if(this._resetVelocityTimeout!==null&&(clearTimeout(this._resetVelocityTimeout),this._resetVelocityTimeout=null),this._preventNextNativeScrollEvent){this._preventNextNativeScrollEvent=!1;return}if(this.isScrolling===!1||this.isScrolling==="native"){const t=this.animatedScroll;this.animatedScroll=this.targetScroll=this.actualScroll,this.lastVelocity=this.velocity,this.velocity=this.animatedScroll-t,this.direction=Math.sign(this.animatedScroll-t),this.isStopped||(this.isScrolling="native"),this.emit(),this.velocity!==0&&(this._resetVelocityTimeout=setTimeout(()=>{this.lastVelocity=this.velocity,this.velocity=0,this.isScrolling=!1,this.emit()},400))}});B(this,"raf",t=>{const n=t-(this.time||t);this.time=t,this.animate.advance(n*.001),this.options.autoRaf&&(this._rafId=requestAnimationFrame(this.raf))});window.lenisVersion=un,(!t||t===document.documentElement)&&(t=window),typeof a=="number"&&typeof f!="function"?f=Oe:typeof f=="function"&&typeof a!="number"&&(a=1),this.options={wrapper:t,content:n,eventsTarget:s,smoothWheel:o,syncTouch:r,syncTouchLerp:d,touchInertiaExponent:u,duration:a,easing:f,lerp:i,infinite:h,gestureOrientation:m,orientation:x,touchMultiplier:y,wheelMultiplier:p,autoResize:N,prevent:b,virtualScroll:M,overscroll:S,autoRaf:w,anchors:O,autoToggle:A,allowNestedScroll:v,naiveDimensions:$,stopInertiaOnNavigate:I},this.dimensions=new yn(t,n,{autoResize:N}),this.updateClassName(),this.targetScroll=this.animatedScroll=this.actualScroll,this.options.wrapper.addEventListener("scroll",this.onNativeScroll,!1),this.options.wrapper.addEventListener("scrollend",this.onScrollEnd,{capture:!0}),(this.options.anchors||this.options.stopInertiaOnNavigate)&&this.options.wrapper.addEventListener("click",this.onClick,!1),this.options.wrapper.addEventListener("pointerdown",this.onPointerDown,!1),this.virtualScroll=new xn(s,{touchMultiplier:y,wheelMultiplier:p}),this.virtualScroll.on("scroll",this.onVirtualScroll),this.options.autoToggle&&(this.checkOverflow(),this.rootElement.addEventListener("transitionend",this.onTransitionEnd,{passive:!0})),this.options.autoRaf&&(this._rafId=requestAnimationFrame(this.raf))}destroy(){this.emitter.destroy(),this.options.wrapper.removeEventListener("scroll",this.onNativeScroll,!1),this.options.wrapper.removeEventListener("scrollend",this.onScrollEnd,{capture:!0}),this.options.wrapper.removeEventListener("pointerdown",this.onPointerDown,!1),(this.options.anchors||this.options.stopInertiaOnNavigate)&&this.options.wrapper.removeEventListener("click",this.onClick,!1),this.virtualScroll.destroy(),this.dimensions.destroy(),this.cleanUpClassName(),this._rafId&&cancelAnimationFrame(this._rafId)}on(t,n){return this.emitter.on(t,n)}off(t,n){return this.emitter.off(t,n)}get overflow(){const t=this.isHorizontal?"overflow-x":"overflow-y";return getComputedStyle(this.rootElement)[t]}checkOverflow(){["hidden","clip"].includes(this.overflow)?this.internalStop():this.internalStart()}setScroll(t){this.isHorizontal?this.options.wrapper.scrollTo({left:t,behavior:"instant"}):this.options.wrapper.scrollTo({top:t,behavior:"instant"})}resize(){this.dimensions.resize(),this.animatedScroll=this.targetScroll=this.actualScroll,this.emit()}emit(){this.emitter.emit("scroll",this)}reset(){this.isLocked=!1,this.isScrolling=!1,this.animatedScroll=this.targetScroll=this.actualScroll,this.lastVelocity=this.velocity=0,this.animate.stop()}start(){if(this.isStopped){if(this.options.autoToggle){this.rootElement.style.removeProperty("overflow");return}this.internalStart()}}internalStart(){this.isStopped&&(this.reset(),this.isStopped=!1,this.emit())}stop(){if(!this.isStopped){if(this.options.autoToggle){this.rootElement.style.setProperty("overflow","clip");return}this.internalStop()}}internalStop(){this.isStopped||(this.reset(),this.isStopped=!0,this.emit())}scrollTo(t,{offset:n=0,immediate:s=!1,lock:o=!1,programmatic:r=!0,lerp:d=r?this.options.lerp:void 0,duration:u=r?this.options.duration:void 0,easing:a=r?this.options.easing:void 0,onStart:f,onComplete:i,force:h=!1,userData:x}={}){if(!((this.isStopped||this.isLocked)&&!h)){if(typeof t=="string"&&["top","left","start","#"].includes(t))t=0;else if(typeof t=="string"&&["bottom","right","end"].includes(t))t=this.limit;else{let m;if(typeof t=="string"?(m=document.querySelector(t),m||(t==="#top"?t=0:console.warn("Lenis: Target not found",t))):t instanceof HTMLElement&&(t!=null&&t.nodeType)&&(m=t),m){if(this.options.wrapper!==window){const p=this.rootElement.getBoundingClientRect();n-=this.isHorizontal?p.left:p.top}const y=m.getBoundingClientRect();t=(this.isHorizontal?y.left:y.top)+this.animatedScroll}}if(typeof t=="number"){if(t+=n,t=Math.round(t),this.options.infinite){if(r){this.targetScroll=this.animatedScroll=this.scroll;const m=t-this.animatedScroll;m>this.limit/2?t=t-this.limit:m<-this.limit/2&&(t=t+this.limit)}}else t=tt(0,t,this.limit);if(t===this.targetScroll){f==null||f(this),i==null||i(this);return}if(this.userData=x??{},s){this.animatedScroll=this.targetScroll=t,this.setScroll(this.scroll),this.reset(),this.preventNextNativeScrollEvent(),this.emit(),i==null||i(this),this.userData={},requestAnimationFrame(()=>{this.dispatchScrollendEvent()});return}r||(this.targetScroll=t),typeof u=="number"&&typeof a!="function"?a=Oe:typeof a=="function"&&typeof u!="number"&&(u=1),this.animate.fromTo(this.animatedScroll,t,{duration:u,easing:a,lerp:d,onStart:()=>{o&&(this.isLocked=!0),this.isScrolling="smooth",f==null||f(this)},onUpdate:(m,y)=>{this.isScrolling="smooth",this.lastVelocity=this.velocity,this.velocity=m-this.animatedScroll,this.direction=Math.sign(this.velocity),this.animatedScroll=m,this.setScroll(this.scroll),r&&(this.targetScroll=m),y||this.emit(),y&&(this.reset(),this.emit(),i==null||i(this),this.userData={},requestAnimationFrame(()=>{this.dispatchScrollendEvent()}),this.preventNextNativeScrollEvent())}})}}}preventNextNativeScrollEvent(){this._preventNextNativeScrollEvent=!0,requestAnimationFrame(()=>{this._preventNextNativeScrollEvent=!1})}checkNestedScroll(t,{deltaX:n,deltaY:s}){const o=Date.now(),r=t._lenis??(t._lenis={});let d,u,a,f,i,h,x,m;const y=this.options.gestureOrientation;if(o-(r.time??0)>2e3){r.time=Date.now();const A=window.getComputedStyle(t);r.computedStyle=A;const v=A.overflowX,E=A.overflowY;if(d=["auto","overlay","scroll"].includes(v),u=["auto","overlay","scroll"].includes(E),r.hasOverflowX=d,r.hasOverflowY=u,!d&&!u||y==="vertical"&&!u||y==="horizontal"&&!d)return!1;i=t.scrollWidth,h=t.scrollHeight,x=t.clientWidth,m=t.clientHeight,a=i>x,f=h>m,r.isScrollableX=a,r.isScrollableY=f,r.scrollWidth=i,r.scrollHeight=h,r.clientWidth=x,r.clientHeight=m}else a=r.isScrollableX,f=r.isScrollableY,d=r.hasOverflowX,u=r.hasOverflowY,i=r.scrollWidth,h=r.scrollHeight,x=r.clientWidth,m=r.clientHeight;if(!d&&!u||!a&&!f||y==="vertical"&&(!u||!f)||y==="horizontal"&&(!d||!a))return!1;let p;if(y==="horizontal")p="x";else if(y==="vertical")p="y";else{const A=n!==0,v=s!==0;A&&d&&a&&(p="x"),v&&u&&f&&(p="y")}if(!p)return!1;let N,b,M,S,w;if(p==="x")N=t.scrollLeft,b=i-x,M=n,S=d,w=a;else if(p==="y")N=t.scrollTop,b=h-m,M=s,S=u,w=f;else return!1;return(M>0?N<b:N>0)&&S&&w}get rootElement(){return this.options.wrapper===window?document.documentElement:this.options.wrapper}get limit(){return this.options.naiveDimensions?this.isHorizontal?this.rootElement.scrollWidth-this.rootElement.clientWidth:this.rootElement.scrollHeight-this.rootElement.clientHeight:this.dimensions.limit[this.isHorizontal?"x":"y"]}get isHorizontal(){return this.options.orientation==="horizontal"}get actualScroll(){const t=this.options.wrapper;return this.isHorizontal?t.scrollX??t.scrollLeft:t.scrollY??t.scrollTop}get scroll(){return this.options.infinite?hn(this.animatedScroll,this.limit):this.animatedScroll}get progress(){return this.limit===0?1:this.scroll/this.limit}get isScrolling(){return this._isScrolling}set isScrolling(t){this._isScrolling!==t&&(this._isScrolling=t,this.updateClassName())}get isStopped(){return this._isStopped}set isStopped(t){this._isStopped!==t&&(this._isStopped=t,this.updateClassName())}get isLocked(){return this._isLocked}set isLocked(t){this._isLocked!==t&&(this._isLocked=t,this.updateClassName())}get isSmooth(){return this.isScrolling==="smooth"}get className(){let t="lenis";return this.options.autoToggle&&(t+=" lenis-autoToggle"),this.isStopped&&(t+=" lenis-stopped"),this.isLocked&&(t+=" lenis-locked"),this.isScrolling&&(t+=" lenis-scrolling"),this.isScrolling==="smooth"&&(t+=" lenis-smooth"),t}updateClassName(){this.cleanUpClassName(),this.rootElement.className=`${this.rootElement.className} ${this.className}`.trim()}cleanUpClassName(){this.rootElement.className=this.rootElement.className.replace(/lenis(-\w+)?/g,"").trim()}};const vn=({transition:t=1.2,easing:n,orientation:s="vertical",smoothTouch:o=!1,touchMultiplier:r=2,children:d})=>{const u=l.useRef(null),a=l.useRef(null);return l.useEffect(()=>{let f;typeof t=="string"?t.endsWith("ms")?f=parseFloat(t)/1e3:t.endsWith("s")?f=parseFloat(t):f=parseFloat(t)||1.2:f=t;const i=x=>1-Math.pow(1-x,5);u.current=new gn({duration:f,easing:n??i,orientation:s,smoothWheel:!0,touchMultiplier:r,syncTouch:o});const h=x=>{var m;(m=u.current)==null||m.raf(x),a.current=requestAnimationFrame(h)};return a.current=requestAnimationFrame(h),()=>{var x;a.current!==null&&cancelAnimationFrame(a.current),(x=u.current)==null||x.destroy(),u.current=null}},[t,n,s,o,r]),d?c.jsx(c.Fragment,{children:d}):null},fe=({style:t,colorName:n,stateClassName:s="state-ripple-group",children:o,className:r})=>{const d=l.useRef(null),u=l.useRef(null),[a,f]=l.useState(!1),i=st({isClient:a,stateClassName:s,className:r,colorName:n});return l.useEffect(()=>{if(d.current&&s!=="state-layer"){const x=(s.includes("[")?"group/"+s.split("[")[1].split("]")[0]:"group").replace(/\//g,"\\/"),m=d.current.closest(`.${x}:not(.${x} .${x})`);u.current=m}f(!0)},[]),c.jsxs("div",{ref:d,className:i.stateLayer,style:{"--state-color":`var(--default-color, var(--color-${n}))`,...t},children:[a&&c.jsx(Ge,{triggerRef:u}),o]})},wn=({isClient:t,stateClassName:n})=>({stateLayer:g(["w-full top-0 left-0 h-full absolute pointer-events-none overflow-hidden",n])}),st=ee("stateLayer",wn),rt=({targetRef:t,children:n})=>{const[s,o]=l.useState(null),r=l.useRef(null),d=()=>{const u=t.current;if(!u)return;const a=u.getBoundingClientRect();o({position:"fixed",top:a.top,left:a.left,width:a.width,height:a.height,pointerEvents:"none",zIndex:999})};return l.useEffect(()=>{const u=t.current;if(u)return d(),window.addEventListener("scroll",d,!0),window.addEventListener("resize",d),r.current=new ResizeObserver(d),r.current.observe(u),()=>{var a;window.removeEventListener("scroll",d,!0),window.removeEventListener("resize",d),(a=r.current)==null||a.disconnect()}},[t]),s?Me.createPortal(c.jsx("div",{style:s,children:n}),document.body):null};function bn(t){return/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(t)}const Sn=({config:t,throttleDelay:n=100,onLoad:s,loadTheme:o=!1})=>{const[r,d]=l.useState(null);l.useEffect(()=>{(async()=>{const m=await Se.loader(t,o);d(m)})()},[]);const[u,a]=l.useState(null),f=l.useRef(null),i=l.useRef(0),h=l.useRef(null);l.useEffect(()=>{if(!r)return;const m={...t,sourceColor:t.sourceColor},y=Date.now(),p=y-i.current,N=async b=>{await x(b)};if(i.current===0||p>=n)f.current&&(clearTimeout(f.current),f.current=null),h.current=null,i.current=y,N(m);else if(h.current=m,!f.current){const b=Math.max(0,n-p);f.current=setTimeout(async()=>{f.current=null;const M=h.current;h.current=null,M&&(i.current=Date.now(),await N(M))},b)}return()=>{}},[t,n,r]);const x=async m=>{if(typeof m.sourceColor=="string"&&!bn(m.sourceColor))throw new Error("Invalid hex color");if(!r)return;r.context.update(m),await r.load();const y=r==null?void 0:r.plugins.getPlugin(Ke.TailwindPlugin).getInstance().outputCss;a(y),s==null||s(r)};return l.useEffect(()=>()=>{f.current&&(clearTimeout(f.current),f.current=null)},[]),u?c.jsx("style",{dangerouslySetInnerHTML:{__html:u}}):null};function Nn(){if(typeof window>"u")return!1;try{if(window.CSS&&typeof window.CSS.supports=="function")return CSS.supports("animation-timeline: view()")||CSS.supports("animation-timeline: scroll()")||CSS.supports("view-timeline-name: --a")}catch{}return!1}function En(){return typeof window>"u"||!("matchMedia"in window)?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches}function Ce(t){if(!(t instanceof HTMLElement))return!1;const n=t.classList;return Array.from(n).some(s=>s.startsWith("anim-")&&s.includes("scroll"))}function Ve(t){if(!(t instanceof HTMLElement))return!1;const n=t.classList;return Array.from(n).some(s=>s.startsWith("anim-"))}function ke(t,n){if(!Ce(t))return;if(t.hasAttribute(`data-${n}-scroll`)){const u=(t.getAttribute(`data-${n}-scroll`)||"").trim().toLowerCase(),a=u==="x"||u==="inline"?"inline":u==="y"||u==="block"?"block":"auto";t.classList.contains(`${n}-timeline`)||t.classList.contains(`${n}-timeline-inline`)||t.classList.contains(`${n}-timeline-block`)||t.classList.contains(`${n}-timeline-x`)||t.classList.contains(`${n}-timeline-y`)||(a==="inline"?t.classList.add(`${n}-timeline-inline`):a==="block"?t.classList.add(`${n}-timeline-block`):t.classList.add(`${n}-scroll`))}const s=t.getAttribute(`data-${n}-start`);s&&t.style.setProperty(`--${n}-range-start`,s);const o=t.getAttribute(`data-${n}-end`);o&&t.style.setProperty(`--${n}-range-end`,o);const r=t.hasAttribute(`data-${n}-paused`)||t.classList.contains(`${n}-paused`),d=t.hasAttribute(`data-${n}-run`)||t.classList.contains(`${n}-run`);!r&&!d&&t.setAttribute(`data-${n}-run`,"")}function Le(t=document,n){return Array.from(t.querySelectorAll(`[class*="${n}-"][class*="-scroll"]`)).filter(o=>Ce(o))}function kn(t=document,n){const s=Array.from(t.querySelectorAll(`[class*="${n}-"]`)),o=new Set([`${n}-run`,`${n}-in`,`${n}-out`,`${n}-in-run`,`${n}-out-run`,`${n}-paused`,`${n}-timeline`,`${n}-timeline-inline`,`${n}-timeline-block`,`${n}-timeline-x`,`${n}-timeline-y`,`${n}-scroll`]);return s.filter(r=>{if(!(r instanceof HTMLElement))return!1;const d=r.classList;return d.contains(`${n}-in`)||d.contains(`${n}-out`)||Array.from(d).some(f=>f.startsWith(`${n}-`)&&!f.includes("scroll")&&!o.has(f))?!0:!Ce(r)})}function Ln(t,n){return Array.from(t).some(s=>s.startsWith(n)&&s.includes("-out"))}function ze(t,n,s){t.setAttribute(`data-${n}-run`,""),t.setAttribute(`data-${n}-${s}-run`,"")}function Ye(t,n,s){const o=t.style.animationName;t.style.animationName="none",t.removeAttribute(`data-${n}-run`),s?t.removeAttribute(`data-${n}-${s}-run`):(t.removeAttribute(`data-${n}-in-run`),t.removeAttribute(`data-${n}-out-run`)),t.offsetWidth,t.style.animationName=o}const jn=[0,.2],_e=new WeakSet;function qe(t,n){if(_e.has(t))return;_e.add(t);const s=r=>{r.target===t&&(t.hasAttribute(`data-${n}-in-run`)||t.hasAttribute(`data-${n}-out-run`))&&t.setAttribute(`data-${n}-animating`,"")},o=r=>{r.target===t&&t.removeAttribute(`data-${n}-animating`)};t.addEventListener("animationstart",s),t.addEventListener("animationend",o),t.addEventListener("animationcancel",o)}function Re(t={}){const{prefix:n="anim",once:s=!0}=t;if(En())return()=>{};const o=Nn(),r=new WeakSet;let d=typeof window<"u"&&(window.pageYOffset||window.scrollY)||0,u=!0;const a=()=>{const y=window.pageYOffset||window.scrollY||0;u=y>=d,d=y};typeof window<"u"&&window.addEventListener("scroll",a,{passive:!0});const f=new IntersectionObserver(y=>{for(const p of y){const N=p.target;if(!Ve(N)||N.hasAttribute(`data-${n}-animating`))continue;const b=Ln(N.classList,n);p.isIntersecting?(b&&Ye(N,n,"out"),ze(N,n,"in"),s&&f.unobserve(N)):s||(u||Ye(N,n,"in"),b&&ze(N,n,"out"))}},{threshold:jn}),i=y=>{const p=kn(y||document,n);for(const N of p)r.has(N)||(r.add(N),f.observe(N),qe(N,n))};i();let h,x=null,m=null;if(o)(()=>{m==null&&(m=requestAnimationFrame(()=>{m=null;const p=Le(void 0,n);for(const N of p)ke(N,n)}))})(),x=new MutationObserver(p=>{for(const N of p)if(N.type==="attributes"){const b=N.target;b instanceof HTMLElement&&(ke(b,n),Ve(b)&&(r.has(b)||(r.add(b),f.observe(b),qe(b,n))))}else if(N.type==="childList"&&N.addedNodes&&N.addedNodes.length){for(const b of Array.from(N.addedNodes))if(b instanceof HTMLElement){const M=Le(b,n);for(const S of M)ke(S,n);i(b)}}}),x.observe(document.documentElement,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["class",`data-${n}-scroll`,`data-${n}-start`,`data-${n}-end`,`data-${n}-paused`,`data-${n}-run`]}),h=()=>{m!=null&&cancelAnimationFrame(m),x&&x.disconnect()};else{let y;Le(void 0,n).length>0&&Promise.resolve().then(()=>require("./scrollDriven-DWAu7CR0.cjs")).then(N=>{y=N.initScrollViewFallback({once:s})}),h=()=>{typeof y=="function"&&y()}}return()=>{h&&h(),typeof window<"u"&&window.removeEventListener("scroll",a),f.disconnect()}}const In=Re,Mn=Re,De=({anchorRef:t,position:n="bottom",children:s,style:o,...r})=>{const u=`--anchor-${l.useId().replace(/:/g,"")}`,[a,f]=l.useState(!1);if(l.useLayoutEffect(()=>{typeof CSS<"u"&&CSS.supports("anchor-name","--a")&&f(!0)},[]),l.useLayoutEffect(()=>{if(a&&t.current){const h=t.current;return h.style.anchorName=u,()=>{t.current&&(t.current.style.anchorName="")}}},[a,t,u]),a){const x={position:"fixed",margin:0,zIndex:9999,positionAnchor:u,positionArea:{top:"top",bottom:"bottom",left:"left",right:"right","top-left":"top left","top-right":"top right","bottom-left":"bottom left","bottom-right":"bottom right"}[n],positionTryFallbacks:"flip-block, flip-inline",...o};return Me.createPortal(c.jsx("div",{style:x,...r,children:s}),document.body)}const i={position:"absolute",pointerEvents:"auto",...o};switch(n){case"top":i.bottom="100%",i.left="50%",i.transform="translateX(-50%)";break;case"top-left":i.bottom="100%",i.left=0;break;case"top-right":i.bottom="100%",i.right=0;break;case"bottom":i.top="100%",i.left="50%",i.transform="translateX(-50%)";break;case"bottom-left":i.top="100%",i.left=0;break;case"bottom-right":i.top="100%",i.right=0;break;case"left":i.right="100%",i.top="50%",i.transform="translateY(-50%)";break;case"right":i.left="100%",i.top="50%",i.transform="translateY(-50%)";break}return c.jsx(rt,{targetRef:t,children:c.jsx("div",{style:i,...r,children:s})})},ot=({variant:t,disableTextMargins:n,disabled:s,iconPosition:o,icon:r,isActive:d,loading:u,shape:a,onToggle:f,size:i,allowShapeTransformation:h})=>({button:g(" relative cursor-pointer group/button outline-none inline-block flex justify-center items-center ",i==="xSmall"&&"text-label-large px-3 py-1.5 gap-1",i==="small"&&"text-label-large px-4 py-2.5 gap-2",i==="medium"&&"text-title-medium px-6 py-4 gap-2",i==="large"&&"text-headline-small px-12 py-8 gap-3",i==="xLarge"&&"text-headline-large px-16 py-12 gap-4",a==="rounded"&&{"rounded-[30px]":i==="xSmall"||i=="small","rounded-[40px]":i==="medium","rounded-[70px]":i==="large"||i=="xLarge"},(a==="squared"||h&&d)&&{"rounded-[12px]":i==="xSmall"||i=="small","rounded-[16px]":i==="medium","rounded-[28px]":i==="large"||i=="xLarge"},h&&!s&&{"active:rounded-[12px]":i==="xSmall"||i=="small","active:rounded-[16px]":i==="medium","active:rounded-[28px]":i==="large"||i=="xLarge"},t==="elevated"&&{"shadow-1 hover:shadow-2":!s,"bg-surface-container-low text-primary":!s&&!d,"bg-primary text-on-primary":!s&&d,"text-on-surface/[38%]":s},t==="filled"&&{"hover:shadow-1":!s,"bg-surface-container text-on-surface-variant":!s&&!d&&f,"bg-primary text-on-primary":!s&&(d&&f||!f),"text-on-surface/[38%]":s},t==="tonal"&&{"hover:shadow-1":!s,"bg-secondary-container text-on-secondary-container":!s&&!d,"bg-secondary text-on-secondary":!s&&d,"text-on-surface/[0.38]":s},t==="outlined"&&[" border",{"border-on-surface/[0.12] text-on-surface/[0.38]":s,"text-primary border-outline focus:border-primary":!s&&!d,"text-inverse-on-surface bg-inverse-surface border-inverse-surface":!s&&d}],t==="text"&&["w-fit",{"text-primary":!s,"text-on-surface/[0.38]":s},n&&[i==="xSmall"&&"-mx-3 ",i==="small"&&"-mx-4 ",i==="medium"&&"-mx-6 ",i==="large"&&"-mx-12",i==="xLarge"&&"-mx-16 "]],s&&"cursor-default"),touchTarget:g("absolute -translate-x-1/2 -translate-y-1/2 left-1/2 top-1/2 h-12 w-full"),stateLayer:g("overflow-hidden",a==="rounded"&&{"rounded-[30px]":i==="xSmall"||i=="small","rounded-[40px]":i==="medium","rounded-[70px]":i==="large"||i=="xLarge"},(a==="squared"||h&&d)&&{"rounded-[12px]":i==="xSmall"||i=="small","rounded-[16px]":i==="medium","rounded-[28px]":i==="large"||i=="xLarge"},h&&!s&&{"group-active/button:rounded-[12px]":i==="xSmall"||i=="small","group-active/button:rounded-[16px]":i==="medium","group-active/button:rounded-[28px]":i==="large"||i=="xLarge"}),label:g({invisible:u}),icon:g({invisible:u},i==="xSmall"&&"size-5",i==="small"&&"size-5",i==="medium"&&"size-6",i==="large"&&"size-8",i==="xLarge"&&"size-10")}),Cn=ne("button",ot),it=ee("button",ot),lt=({variant:t,isInteractive:n})=>({card:g(" rounded-xl overflow-hidden ",t==="outlined"&&"bg-surface border border-outline-variant",t==="elevated"&&"bg-surface-container-low shadow-1",t==="filled"&&"bg-surface-container-highest",{"group/card":n})}),Rn=ne("card",lt),at=ee("card",lt),Fe=({width:t})=>({carouselItem:g("rounded-[28px] overflow-hidden flex-none",{hidden:t===void 0,"flex-1":t==null})}),Dn=ne("carouselItem",Fe),ct=ee("carouselItem",Fe),ut=()=>({carousel:g(["w-full h-[400px]"]),track:g("flex h-full w-full")}),Fn=ne("carousel",ut),dt=ee("carousel",ut),ft=({isChecked:t,isIndeterminate:n,isDisabled:s,isError:o,isFocused:r,isHovered:d})=>({checkbox:g("inline-flex items-center justify-center relative size-4.5 ",{"pointer-events-none opacity-[0.38]":s}),input:g("absolute inset-0 w-full h-full opacity-0 z-10 cursor-pointer"),container:g("relative flex items-center justify-center w-[18px] h-[18px] "),box:g("absolute left-1/2 top-1/2 -translate-1/2 to rounded-[2px] size-4 border-2 transition-colors duration-200",!t&&!n&&{"border-on-surface-variant":!o&&!s,"border-error":o&&!s,"border-on-surface":s},(t||n)&&{"bg-primary border-primary":!o&&!s,"bg-error border-error":o&&!s,"bg-on-surface border-on-surface":s}),icon:g("z-10 relative text-on-primary w-full h-full flex items-center justify-center pointer-events-none",{"text-on-error":o&&!s,"text-surface":s}),stateLayer:"size-10 state-ripple-group-[checkbox] rounded-full cursor-pointer pointer-events-auto absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2"}),An=ne("checkbox",ft),ht=ee("checkbox",ft),mt=({variant:t,disabled:n,trailingIcon:s,icon:o,isActive:r,isInteractive:d,activated:u,isFocused:a,isDragging:f,isEditing:i})=>({chip:g(" group/chip px-3 py-1.5 rounded-lg flex items-center gap-2 outline-none",{"pl-2":o,"pr-2":s,"cursor-pointer":!n&&d},{" text-on-surface-variant":!u&&!a||i,"bg-secondary-container text-on-secondary-container":(u||a)&&!i},f&&["opacity-100 cursor-grabbing shadow-3"],t==="outlined"&&["border border-outline-variant",{"border-transparent":i}],t==="elevated"&&!i&&["shadow-1 bg-surface-container-low","border border-outline-variant"]),stateLayer:g("rounded-lg overflow-hidden",{}),label:g("outline-none text-nowrap",{"opacity-[0.38]":n}),leadingIcon:g("text-primary size-[18px]",{"opacity-[0.38]":n}),trailingIcon:g("cursor-pointer size-[18px]",{"opacity-[0.38]":n})}),$n=ne("chip",mt),pt=ee("chip",mt),yt=({scrollable:t})=>({chips:g(" flex gap-3 outline-none",{"flex-wrap":!t,"overflow-x-auto":t})}),Wn=ne("chips",yt),xt=ee("chips",yt),gt=({orientation:t})=>({divider:g("border-outline-variant ",{"h-fit w-full border-t":t==="horizontal"},{"h-auto self-stretch w-fit border-l":t==="vertical"})}),Pn=ne("divider",gt),vt=ee("divider",gt),wt=({size:t,variant:n,extended:s})=>({fab:g("flex shadow-3 hover:shadow-4 group/fab overflow-hidden outline-none items-center cursor-pointer",{"rounded-[12px]":t=="small","rounded-[16px]":t=="medium","rounded-[28px]":t=="large"},{"p-2":t=="small","p-4":t=="medium","p-[30px]":t=="large"},n==="primary"&&"bg-primary text-on-primary",n==="secondary"&&"bg-secondary text-on-secondary",n==="tertiary"&&"bg-tertiary text-on-tertiary",n==="primaryContainer"&&"bg-primary-container text-on-primary-container",n==="secondaryContainer"&&"bg-secondary-container text-on-secondary-container",n==="tertiaryContainer"&&"bg-tertiary-container text-on-tertiary-container"),icon:g({"size-6":t=="small"||t=="medium","size-9":t=="large"}),label:g("text-nowrap",{"text-title-medium":t=="small","text-title-large":t=="medium","text-headline-small":t=="large"})}),Bn=ne("fab",wt),bt=ee("fab",wt),St=({size:t,variant:n,open:s})=>({fabMenu:g("relative inline-flex flex-col items-end"),actions:g("flex flex-col gap-1 items-end absolute bottom-[calc(100%_+_8px)] right-0"),label:g("text-nowrap")}),Tn=ne("fabMenu",St),Nt=ee("fabMenu",St),Et=({variant:t,disabled:n,onToggle:s,isActive:o,size:r,width:d,shape:u,allowShapeTransformation:a})=>({iconButton:g("rounded-full relative flex transition-all duration-300","group/icon-button cursor-pointer",{"cursor-default":n},u==="rounded"&&{"rounded-[30px]":r==="xSmall"||r=="small","rounded-[40px]":r==="medium","rounded-[70px]":r==="large"||r=="xLarge"},(u==="squared"||a&&o)&&{"rounded-[12px]":r==="xSmall"||r=="small","rounded-[16px]":r==="medium","rounded-[28px]":r==="large"||r=="xLarge"},a&&!n&&{"active:rounded-[12px]":r==="xSmall"||r=="small","active:rounded-[16px]":r==="medium","active:rounded-[28px]":r==="large"||r=="xLarge"},t==="filled"&&[!n&&{"bg-surface-container":!o&&!!s,"bg-primary":o||!s},!!n&&"bg-on-surface/[0.12]"],t==="tonal"&&[!n&&{"bg-secondary-container text-on-secondary-container":!o&&!!s,"bg-secondary text-on-secondary":o||!s},!!n&&"bg-on-surface/[0.12]"],t==="outlined"&&[!n&&{"border border-outline":!o,"border border-transparent bg-inverse-surface":o},!!n&&{"border border-on-surface/[0.12]":!o,"border border-transparent bg-on-surface/[0.12]":o}]),touchTarget:g("absolute -translate-x-1/2 -translate-y-1/2 left-1/2 top-1/2 h-12 w-full"),stateLayer:g("absolute top-0 left-0 h-full w-full overflow-hidden",(u==="rounded"||u==="squared"&&s&&!n&&o&&a)&&{"rounded-[30px]":r==="xSmall"||r=="small","rounded-[40px]":r==="medium","rounded-[70px]":r==="large"||r=="xLarge"},(u==="squared"||u==="rounded"&&s&&!n&&o&&a)&&{"rounded-[12px]":r==="xSmall"||r=="small","rounded-[16px]":r==="medium","rounded-[28px]":r==="large"||r=="xLarge"},a&&!n&&{"group-active/icon-button:rounded-[12px]":r==="xSmall"||r=="small","group-active/icon-button:rounded-[16px]":r==="medium","group-active/icon-button:rounded-[28px]":r==="large"||r=="xLarge"},!n&&[t==="standard"&&{"state-on-surface-variant":!o,"state-primary":o},t==="filled"&&{"state-primary":!o&&!!s,"state-inverse-on-surface":o||!s},t==="tonal"&&{"state-on-surface-variant":!o&&!!s,"state-on-secondary-container":o||!s},t==="outlined"&&{"state-on-surface-variant":!o,"state-on-primary":o}]),icon:g(" transition-all duration-300",{"size-5 p-1.5":r==="xSmall"},{"size-6 p-2":r==="small"},{"size-6 p-4":r==="medium"},{"size-8 p-8":r==="large"},{"size-10 p-12":r==="xLarge"},d=="narrow"&&[{"px-1":r==="xSmall"},{"px-1":r==="small"},{"px-3":r==="medium"},{"px-4":r==="large"},{"px-8":r==="xLarge"}],d=="wide"&&[{"px-2.5":r==="xSmall"},{"px-3.5":r==="small"},{"px-6":r==="medium"},{"px-12":r==="large"},{"px-[72px]":r==="xLarge"}],!n&&[t==="standard"&&{"text-on-surface-variant":!o,"text-primary":o},t==="filled"&&{"text-primary":!o&&!!s,"text-on-primary":o||!s},t==="outlined"&&{"text-on-surface-variant":!o,"text-inverse-on-surface":o}],!!n&&"text-on-surface/[0.38]")}),Hn=ne("iconButton",Et),kt=ee("iconButton",Et),Lt=({variant:t,isVisible:n})=>({progressIndicator:g((t==="linear-determinate"||t=="linear-indeterminate")&&"flex w-full h-1"),track:g("h-full rounded-full bg-primary rounded-l-full",{"max-h-0":!n,"max-h-full":n}),activeIndicator:g({"max-h-0":!n,"max-h-full":n},(t==="linear-determinate"||t=="linear-indeterminate")&&"h-full flex-1 rounded-full bg-primary-container",(t==="circular-determinate"||t=="circular-indeterminate")&&["stroke-primary fill-transparent ",{"stroke-[4px]":n,"stroke-[0px]":!n}]),stop:g("absolute top-1/2 -translate-y-1/2 right-0 bg-primary rounded-full size-1",{"max-h-0":!n,"max-h-full":n})}),On=ne("progressIndicator",Lt),jt=ee("progressIndicator",Lt),Ae=({variant:t,position:n})=>({sideSheet:g("bg-surface flex justify-between max-w-xs z-10",{"flex-row-reverse":n=="right","h-full":t=="standard"},t=="modal"&&["rounded-2xl fixed top-0 m-[1rem] h-[calc(100dvh-2rem)]",{"right-0":n=="right","left-0":n=="left"}]),container:g("w-full overflow-hidden flex flex-col",{}),header:g("p-4 flex items-center gap-2"),content:g("flex-1 overflow-y-auto"),title:g("text-on-surface-variant text-title-large"),closeButton:g("ml-auto"),divider:g({hidden:t=="modal"}),overlay:g("bg-[black]/[0.32] fixed top-0 left-0 w-screen h-screen")}),It=ne("sideSheet",Ae),Vn=ee("sideSheet",Ae),$e=({isChanging:t})=>({slider:g(["relative w-full h-11 flex items-center rounded gap-x-1.5 cursor-pointer min-w-32"]),activeTrack:g(["h-4 relative transition-all duration-100 bg-primary overflow-hidden rounded-l-full "]),inactiveTrack:g(["h-4 relative transition-all duration-100 bg-primary-container rounded-r-full overflow-hidden"]),handle:g(["transform relative transition-all duration-100 bg-primary h-full rounded-full ",{"w-0.5":t,"w-1":!t}]),valueIndicator:g(["absolute select-none bg-inverse-surface text-inverse-on-surface py-3 px-4 text-label-large rounded-full bottom-[calc(100%+4px)] transform left-1/2 -translate-x-1/2"]),dot:g(["h-1 w-1 absolute transform -translate-y-1/2 -translate-x-1/2 top-1/2 rounded-full"])}),zn=ne("slider",$e),Mt=ee("slider",$e),Ct=()=>({snackbar:g(" rounded bg-inverse-surface "),container:g("pl-4 pr-2 max-w-full py-1 flex items-center flex-wrap"),supportingText:g("text-body-medium text-inverse-on-surface "),icon:g(" ml-auto mr-0 text-inverse-on-surface block dark")}),Yn=ne("snackbar",Ct),Rt=ee("snackbar",Ct),Dt=({isSelected:t,disabled:n,inactiveIcon:s})=>({switch:g("group/switch w-[52px] h-[32px] outline-none rounded-full border-2 flex items-center",{"bg-on-surface/[0.12] border-transparent":n},!n&&["cursor-pointer ",{"bg-primary border-primary":t},{"bg-surface-container border-outline":!t}]),handleContainer:g("flex items-center justify-center absolute",{"left-[14px]":!t},{"right-[14px]":t}),handle:g("transition-all duration-100 z-10 rounded-full flex items-center justify-center",{"w-[16px] h-[16px]":!t&&!s},{"w-[24px] h-[24px]":!(!t&&!s)},!n&&["cursor-pointer group-active/switch:h-[28px] group-active/switch:w-[28px]",{"bg-on-primary group-hover/switch:bg-primary-container":t},{"bg-outline group-hover/switch:bg-on-surface-variant":!t}],{"bg-surface":n}),handleStateLayer:g("w-[40px] h-[40px] -z-10 rounded-full absolute",{"group-state-primary":!n}),icon:g("w-[16px] h-[16px]",!n&&[{"text-on-primary-container":t},{"text-on-primary":!t}],{"text-on-surface/[0.38]":n})}),_n=ne("switch",Dt),Ft=ee("switch",Dt),At=({isSelected:t,icon:n,label:s,variant:o})=>({tab:g("flex-1 group/tab outline-none flex px-4 justify-center items-center cursor-pointer",{"z-10":t},!!(n&&s)&&o==="primary"&&"h-16",!(n&&s&&o==="primary")&&"h-12"),stateLayer:g("absolute w-full h-full overflow-hidden left-1/2 top-1/2 transform -translate-y-1/2 -translate-x-1/2",o==="primary"&&{"group-hover/tab:hover-state-on-surface group-focus-visible/tab:focus-state-on-surface":!t,"group-hover/tab:hover-state-primary group-focus-visible/tab:focus-state-primary":t},o==="secondary"&&"group-hover/tab:hover-state-on-surface group-focus-visible/tab:focus-state-on-surface"),content:g("flex gap-0.5 h-full justify-center",{relative:o=="primary"},{"":!!(s&&!n)},o==="primary"&&"flex-col items-center",o==="secondary"&&{"flex-col items-center":!(s&&n),"flex-row items-center gap-2":!!(s&&n)}),icon:g("h-6 w-6 p-0.5 !box-border",o==="primary"&&{"text-on-surface-variant":!t,"text-primary":t},o==="secondary"&&{"text-on-surface-variant":!t,"text-on-surface":t}),label:g("text-title-small text-nowrap",o==="primary"&&{"text-on-surface-variant":!t,"text-primary":t},o==="secondary"&&{"text-on-surface-variant":!t,"text-on-surface":t}),underline:g("bg-primary absolute w-full left-0 bottom-0",o==="primary"&&"h-[3px] rounded-t",o==="secondary"&&"h-0.5")}),qn=ne("tab",At),$t=ee("tab",At),Wt=({scrollable:t})=>({tabs:g("border-b border-surface-container-highest bg-surface","flex relative ",{"overflow-x-auto":t})}),Xn=ne("tabs",Wt),Pt=ee("tabs",Wt),Bt=()=>({tabPanels:g("overflow-hidden")}),Un=ne("tabPanels",Bt),Tt=ee("tabPanels",Bt),Ht=()=>({tabPanel:g("")}),Kn=ne("tabPanel",Ht),Ot=ee("tabPanel",Ht),Vt=({disabled:t,leadingIcon:n,trailingIcon:s,variant:o,errorText:r,isFocused:d,value:u,suffix:a,multiline:f})=>({textField:g({"opacity-[.38]":t}),content:g("group/text-field transition-border duration-200 relative flex items-center ",{"h-14":!f},{"border-on-surface-variant":!(r!=null&&r.length)&&!d&&o=="filled","border-outline":!(r!=null&&r.length)&&!d&&o=="outlined","border-primary":!(r!=null&&r.length)&&d,"border-error":!!(r!=null&&r.length)},{"bg-on-surface/[0.04]":t},o=="filled"&&["rounded-t overflow-hidden border-b",{"bg-surface-container-highest":!t}],o=="outlined"&&["border rounded box-border",{"border-[3px]":d}]),stateLayer:g("absolute -z-10 w-full h-full top-0 left-0",{hidden:o=="outlined"},{"group-state-on-surface":!t,"focus-state-on-surface":d}),label:g("inline-flex outline-none whitespace-nowrap",{"text-on-surface-variant":!t&&!(r!=null&&r.length)},{"text-on-surface":t},{"text-error":!!(r!=null&&r.length)},{"text-primary":!(r!=null&&r.length)&&d}),input:g("w-full resize-none px-4 text-body-large bg-[inherit] outline-none autofill:transition-colors autofill:duration-[5000000ms]",{" text-on-surface placeholder:text-on-surface-variant":!t,"placeholder:text-on-surface text-on-surface":t},{"pr-0":!!a},o=="filled"&&" pb-2 pt-6",o=="outlined"&&"py-4 relative z-10"),activeIndicator:g("absolute w-0 inset-x-0 border-rounded mx-auto bottom-0",o=="filled"&&["h-[2px] transition-all duration-300",{"bg-primary":!(r!=null&&r.length)},{"bg-error":!!(r!=null&&r.length)},{"!w-full":d}]),supportingText:g(" text-body-small px-4 pt-1",{"text-on-surface-variant":!t&&!(r!=null&&r.length)},{"text-on-surface":t},{"!w-full":d},{"text-error":!!(r!=null&&r.length)}),leadingIcon:g(["h-12 ml-3 flex items-center justify-center",{"cursor-text":!l.isValidElement(n)}]),trailingIcon:g("h-12 w-12 flex items-center justify-center",{"cursor-text":!l.isValidElement(s)}),suffix:g("text-on-surface-variant pl-0 pr-4",o=="filled"&&" pb-2 pt-6",o=="outlined"&&"py-4 relative z-10")}),Gn=ne("textField",Vt),zt=ee("textField",Vt),Yt=({position:t,variant:n})=>({toolTip:g(" pointer-events-auto w-max z-10 absolute m-1 w-max-content max-w-[312px]",n=="rich"&&"bg-surface-container rounded-2xl text-on-surface-container shadow-2",n=="plain"&&"bg-inverse-surface rounded text-inverse-on-surface ",{"bottom-full left-1/2 -translate-x-1/2":t=="top","top-full left-1/2 -translate-x-1/2":t=="bottom","right-full top-1/2 -translate-y-1/2":t=="left","left-full top-1/2 -translate-y-1/2":t=="right","bottom-full right-full":t=="top-left","bottom-full left-full":t=="top-right","top-full right-full":t=="bottom-left","top-full left-full":t=="bottom-right"}),container:g("pb-2",n=="rich"&&"px-4 pt-3 ",n=="plain"&&"px-2 py-1"),actions:g("flex gap-10 px-1 mt-2",n=="plain"&&"hidden"),subHead:g("text-title-small mb-1",n=="plain"&&"hidden"),supportingText:g(""),content:g("w-full")}),Jn=ne("toolTip",Yt),_t=ee("toolTip",Yt),ue=({icon:t,colors:n=[],className:s,...o})=>{if(typeof t=="string"){let h=t;return n[0]&&(h=h.replace(/<svg([^>]*)>/,`<svg$1 fill="${n[0]}" color="${n[0]}">`),h=h.replace(/<path([^>]*?)>/g,'<path$1 fill="currentColor">')),c.jsx("div",{className:g("size-5 box-content inline-flex fill-current",s),style:{color:n[0]||"inherit"},dangerouslySetInnerHTML:{__html:h}})}if(t&&typeof t=="object"&&"src"in t){const h=t;return c.jsx("img",{src:h.src,width:h.width,height:h.height,className:g("size-5 box-content",s),style:{filter:n[0]?"brightness(0) saturate(100%) invert(1)":void 0},alt:"","aria-hidden":"true"})}const r=t;if(!(r!=null&&r.prefix))throw new Error(`Invalid icon type: ${typeof t}`);const{icon:d}=r,[u,a,,,f]=d||[],i=h=>{switch(h.length){case 2:return{"--fa-primary-color":h[0]||"inherit","--fa-secondary-color":h[1]||"inherit"};case 1:return{color:h[0]};default:return{}}};return c.jsx("svg",{className:g("size-5 box-content",s),style:{...i(n)},xmlns:"http://www.w3.org/2000/svg",viewBox:`0 0 ${u} ${a}`,role:"img","aria-hidden":"true",...o,children:typeof f=="string"?c.jsx("path",{className:"fill-current",d:f}):f.map((h,x)=>c.jsx("path",{d:h},x))})},qt=({variant:t="linear-determinate",value:n=0,transitionDuration:s=1e3,className:o,...r})=>{const[d,u]=l.useState(n),[a]=l.useState(1.5);l.useEffect(()=>{n>100&&(n=100),n<0&&(n=0),u(n)},[n]);const[f,i]=l.useState(!0),h=()=>f?a:a*.5;l.useEffect(()=>{if((t==="circular-indeterminate"||t==="linear-indeterminate")&&d!==100){const p=setInterval(()=>{u(f?10:90),i(!f)},h()*1e3);return()=>clearInterval(p)}},[t,f,d]);const[x,m]=l.useState(!1);l.useEffect(()=>{if(d>=100){const p=setTimeout(()=>{m(!1)},s);return()=>{clearTimeout(p)}}else m(!0)},[d,s]);const y=jt({className:o,variant:t,value:n,transitionDuration:s,isVisible:x});return c.jsxs(c.Fragment,{children:[(t==="linear-determinate"||t=="linear-indeterminate")&&c.jsxs("div",{className:y.progressIndicator,...r,children:[c.jsx("div",{style:{width:`${d}%`,transition:`width ${s}ms ease-in-out ${d==100?", max-height 200ms 0.5s ease-in-out":""}`},className:y.track}),c.jsx("div",{style:{marginLeft:d!=100?"6px":"0px",transition:`width ${s}ms ease-in-out ${d==100?`, max-height 200ms 0.5s ease-in-out, margin-left ${s}ms ${s/1.5}ms`:""}`},className:y.activeIndicator}),c.jsx("div",{style:{width:"4 px",transition:`width ${s}ms ease-in-out, max-height 200ms 0.5s ease-in-out`},className:y.stop})]}),(t==="circular-determinate"||t=="circular-indeterminate")&&c.jsx(U.motion.svg,{width:"48",height:"48",viewBox:"0 0 48 48",initial:{rotate:-90},animate:{rotate:270},transition:{repeat:1/0,duration:h(),ease:"linear"},className:y.progressIndicator,...r,children:c.jsx(U.motion.circle,{cx:"50%",cy:"50%",r:x?"calc(50% - 2px)":"50%",style:{strokeLinecap:"round"},initial:"hidden",animate:"visible",className:y.activeIndicator,variants:{hidden:{pathLength:f?10/100:90/100},visible:{pathLength:f?90/100:10/100}},transition:{pathLength:{type:"tween",ease:"linear",duration:h(),bounce:0}}})},f+"")]})};function Zn(t){const n={primary:"filled",secondary:"tonal"};return t&&t in n?n[t]:t||"filled"}const me=({variant:t="filled",disabled:n=!1,icon:s,href:o,label:r,disableTextMargins:d,className:u,iconPosition:a="left",loading:f=!1,shape:i="rounded",onClick:h,onToggle:x,activated:m,ref:y,size:p="medium",allowShapeTransformation:N=!0,transition:b,children:M,...S})=>{if(M&&(r=M),!r)throw new Error("Button component requires either a label prop or children content");t=Zn(t);const w=o?"a":"button",O=l.useRef(null),A=y||O,[v,E]=l.useState(m);l.useEffect(()=>{E(m)},[m]),b={duration:.3,...b};const $=C=>{n&&C.preventDefault(),x?(E(!v),x(!v)):h&&h(C)},I=it({allowShapeTransformation:N,size:p,disableTextMargins:d,shape:i,href:o,disabled:n,icon:s,iconPosition:a,loading:f,variant:t,transition:b,className:u,isActive:v??!1,onToggle:x,activated:v,label:r,children:r}),P=s?c.jsx(ue,{icon:s,className:I.icon}):c.jsx(c.Fragment,{});return c.jsxs(w,{ref:A,href:o,className:I.button,...S,onClick:$,disabled:n,"aria-pressed":x?v:void 0,style:{transition:b.duration+"s"},children:[c.jsx("div",{className:I.touchTarget}),c.jsx(fe,{style:{transition:b.duration+"s"},className:I.stateLayer,colorName:g(t==="filled"&&{"on-surface-variant":!v&&!!x,"on-primary":v||!x},t==="elevated"&&{"on-primary":v&&!!x,primary:!v||!x},t==="tonal"&&{"on-secondary":v&&!!x,"on-secondary-container":!v||!x},t==="outlined"&&{"inverse-on-surface":v&&!!x,"on-surface-variant":!v||!x},t==="text"&&"primary"),stateClassName:"state-ripple-group-[button]"}),a==="left"&&P,f&&c.jsx("div",{className:"!absolute left-1/2 -translate-x-1/2 top-1/2 -translate-y-1/2",children:c.jsx(qt,{className:()=>({progressIndicator:"h-6 w-6",activeIndicator:g({"!stroke-primary":t==="elevated"&&!n,"!stroke-on-surface/[38%]":t==="elevated"&&n},{"!stroke-on-primary":t==="filled"&&!n,"!stroke-on-surface/[38%]":t==="filled"&&n},{"!stroke-on-secondary-container":t==="tonal"&&!n,"!stroke-on-surface/[38%]":t==="tonal"&&n},{"!stroke-primary":t==="outlined"&&!n,"!stroke-on-surface/[38%]":t==="outlined"&&n},{"!stroke-primary":t==="text"&&!n,"!stroke-on-surface/[38%]":t==="text"&&n})}),variant:"circular-indeterminate"})}),c.jsx("span",{className:I.label,children:r}),a==="right"&&P]})},Qn=({variant:t="outlined",className:n,children:s,interactive:o=!1,ref:r,...d})=>{const u=at({className:n,isInteractive:o,variant:t,children:s}),a=l.useRef(null),f=r||a;return c.jsxs("div",{...d,ref:f,className:u.card,children:[o&&c.jsx(fe,{className:u.stateLayer,colorName:"on-surface",stateClassName:"state-ripple-group-[card]"}),s]})},xe=(t,n,s=[0,1])=>{const[o,r]=n,[d,u]=s,f=(Math.max(o,Math.min(t,r))-o)/(r-o);return d+f*(u-d)},Xt=({className:t,children:n,width:s,index:o=0,outputRange:r,ref:d,...u})=>{const a=l.useRef(null),f=d||a,i=ct({className:t,index:o,width:s,children:n,outputRange:r});return c.jsx("div",{ref:f,style:{width:s+"px",maxWidth:r[1]+"px",minWidth:r[0]+"px",willChange:"width"},transition:{duration:.5,ease:"linear"},className:i.carouselItem,...u,children:n})},es=({variant:t="hero",className:n,children:s,ref:o,marginPourcent:r=0,inputRange:d=[.21,.65],outputRange:u=[42,300],gap:a=8,onChange:f,onMetricsChange:i,index:h,scrollSensitivity:x=1.25,...m})=>{const y=l.useRef(null),p=o||y,[N,b]=l.useState(0),M=dt({index:h,className:n,children:s,variant:t,inputRange:d,outputRange:u,marginPourcent:r,onChange:f,gap:a,scrollSensitivity:x,onMetricsChange:i}),S=l.Children.toArray(s).filter(L=>l.isValidElement(L)&&L.type===Xt),w=l.useRef(null),[O,A]=l.useState({}),[v,E]=l.useState(null),$=l.useRef(0),I=l.useRef(null),P=()=>{var le,pe;if(!w.current||!p.current||(v==null?void 0:v.scrollProgress)===void 0)return[];const L=(v==null?void 0:v.scrollVisible)??((le=p.current)==null?void 0:le.clientWidth)??0;function D(K,oe){return K.map((ie,ye)=>{const ae=(ie-oe)/Math.abs(K[1]-K[0]);return{itemScrollXCenter:ie,relativeIndex:ae,index:ye,width:0}})}const z=S.map((K,oe)=>{if(!C[oe].current||!w.current)return 0;const ye=oe/(S.length-1);return xe(ye,[0,1],[0,1])}),Y=D(z,(v==null?void 0:v.scrollProgress)??0).sort((K,oe)=>K.index-oe.index);let X=(((pe=p.current)==null?void 0:pe.clientWidth)??L)+a+u[0]+a;const Q=Y.sort((K,oe)=>Math.abs(K.relativeIndex)-Math.abs(oe.relativeIndex)).map((K,oe)=>{if(!(X<=0)){if(oe==0&&T(K.index),K.width=xe(X-a,[u[0],u[1]],[u[0],u[1]]),X-=K.width+a,X!=0&&X<(u[0]+a)*2){const ie=K.width-((u[0]+a)*2-X);X+=K.width,K.width=ie,X-=K.width}else if(X==0&&K.width>=u[0]*2+a){const ie=K.width-(u[0]+a-X);X+=K.width,K.width=ie,X-=K.width}return K}}).filter(Boolean),W=Q.reverse(),q=[...Q].sort((K,oe)=>Math.abs(K.index)-Math.abs(oe.index));W.forEach((K,oe)=>{const ie=W[oe+1];if(!ie)return;const ye=1-(Math.abs(K.relativeIndex)-Math.abs(ie==null?void 0:ie.relativeIndex)),ae=xe(ye,[0,2],[K.width+X,ie.width]);X+=K.width,K.width=ae,X-=K.width});const se=Q.length/2,re=xe(Math.abs(q[0].relativeIndex),[q[0].index==0?0:se-1,se],[0,1]),ve=xe(re,[0,1],[0,1])*-(u[0]+a);return b(ve),Object.fromEntries(Q.map(K=>[K.index,K.width]))},C=l.useRef([]).current,[_,T]=l.useState(0);l.useEffect(()=>{f&&f(_)},[_]),l.useEffect(()=>{typeof h=="number"&&S.length>0&&h!==_&&R(h)},[h,S.length]),l.useEffect(()=>{H(_)},[_]),C.length!==S.length&&S.forEach((L,D)=>{C[D]||(C[D]=l.createRef())});const[Z,H]=l.useState(0),R=(L,D={})=>{if(!S.length)return 0;const z=C[L];if(!z||!z.current||!w.current)return 0;const Y=xe(L/Math.max(1,S.length-1),[0,1],[0,1]);return H(L),w.current.dispatchEvent(new CustomEvent("udx:customScroll:set",{bubbles:!0,detail:{progress:Y,orientation:"horizontal",animate:D.animate!==!1}})),Y},F=S.map((L,D)=>{var Q;const z=(Q=L.props)==null?void 0:Q.onClick,Y=W=>{z==null||z(W)},X=()=>H(D);return l.cloneElement(L,{width:O[D],outputRange:u,ref:C[D],key:D,index:D,role:"option","aria-selected":_===D,tabIndex:_===D?0:-1,onClick:Y,onFocus:X})}),V=L=>{var D;if(L.scrollTotal>0){(D=I.current)==null||D.stop();const z=$.current??0,Y=L.scrollProgress??0;I.current=U.animate(z,Y,{type:"spring",stiffness:260,damping:32,mass:.6,restDelta:5e-4,onUpdate:X=>{$.current=X,E({...L,scrollProgress:X})}})}};l.useEffect(()=>{const L=P();A(L)},[v]);const G=l.useRef(i);l.useEffect(()=>{G.current=i},[i]);const J=l.useRef(null);l.useEffect(()=>{var oe;const L=G.current;if(!L||!(p!=null&&p.current))return;const D=S.length;if(D<=0)return;const z=((oe=p.current)==null?void 0:oe.clientWidth)??0,Y=u[1],X=$.current??(v==null?void 0:v.scrollProgress)??0,Q=(z+a)/(Y+a),W=Math.max(1,Math.floor(Q)),q=Math.max(1,Math.round(W*(2/3))),se=Math.min(Math.max(0,_),Math.max(0,D-1)),re=se>0,ve=se<D-1,le={total:D,selectedIndex:se,visibleApprox:Q,visibleFull:W,stepHalf:q,canPrev:re,canNext:ve,scrollProgress:X,viewportWidth:z,itemMaxWidth:Y,gap:a},pe=J.current;let K=!pe;if(!K){for(const ie in le)if(le[ie]!==pe[ie]){K=!0;break}}K&&(J.current=le,L(le))},[p,S.length,_,v,a,u]),l.useEffect(()=>()=>{var L;(L=I.current)==null||L.stop()},[]);const[te,k]=l.useState(0);l.useLayoutEffect(()=>{let L=u[1];v&&L>v.scrollVisible&&(L=v.scrollVisible);const D=(L+a)*F.length/x;k(D)},[p,C,v]);const j=L=>{if(!S.length)return;const D=Z??_;switch(L.key){case"ArrowLeft":L.preventDefault(),R(Math.max(0,D-1));break;case"ArrowRight":L.preventDefault(),R(Math.min(S.length-1,D+1));break;case"Home":L.preventDefault(),R(0);break;case"End":L.preventDefault(),R(S.length-1);break;case"Enter":case" ":L.preventDefault(),R(D);break}};return l.useEffect(()=>{const L=p.current;if(!L)return;const D=z=>{const Y=z.detail;Y&&typeof Y.index=="number"&&R(Y.index)};return L.addEventListener("udx:carousel:centerIndex",D),()=>{L.removeEventListener("udx:carousel:centerIndex",D)}},[p,S.length]),c.jsx("div",{className:M.carousel,ref:p,role:"listbox","aria-orientation":"horizontal",onKeyDown:j,...m,children:c.jsx(et,{draggable:!0,orientation:"horizontal",onScroll:V,scrollSize:te,children:c.jsx("div",{className:M.track,ref:w,style:{gap:`${a}px`,translate:N,willChange:"translate"},children:F})})})};/*!
1
+ "use strict";var rn=Object.defineProperty;var on=(e,t,n)=>t in e?rn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var T=(e,t,n)=>on(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),i=require("react"),X=require("motion/react"),Ke=require("clsx"),ln=require("tailwind-merge"),Me=require("react-dom"),Se=require("@udixio/theme"),Ge=require("@udixio/tailwind"),an=require("react-textarea-autosize"),Je=({colorName:e="on-surface",triggerRef:t})=>{const n={initial:{opacity:1,"--r":"25%"},animate:{opacity:1,"--r":"100%",transition:{duration:.5}},exit:{opacity:0,"--r":"100%",transition:{duration:.3}}},[s,r]=i.useState(!0),[u,c]=i.useState(!1),[l,d]=i.useState({x:50,y:50});i.useEffect(()=>{u&&(r(!0),r(!1))},[u]),i.useEffect(()=>{const p=t==null?void 0:t.current;if(p)return p.addEventListener("mousedown",o),p.addEventListener("mouseup",y),p.addEventListener("mouseleave",f),()=>{p.removeEventListener("mousedown",o),p.removeEventListener("mouseup",y),p.removeEventListener("mouseleave",f)}},[t]);const o=p=>{const b=t==null?void 0:t.current,w=b.getBoundingClientRect();c(!0),d({x:(p.clientX-w.left)/b.clientWidth*100,y:(p.clientY-w.top)/b.clientHeight*100})},f=p=>{c(!1)},y=p=>{c(!1)},h=`color-mix(in srgb, var(--state-color,_var(--color-${e})) 10%, transparent)`,m={position:"absolute",inset:0,width:"100%",height:"100%","--x":l.x+"%","--y":l.y+"%","--r":"0%",background:`radial-gradient(ellipse at var(--x) var(--y), ${h} var(--r), transparent calc(var(--r) * 2))`,pointerEvents:"none"};return a.jsx(X.AnimatePresence,{mode:"wait",children:(u||!u&&!s)&&a.jsx(X.motion.div,{style:m,variants:n,initial:"initial",animate:"animate",exit:"exit",onAnimationComplete:()=>r(!0)})})},Ze=ln.extendTailwindMerge({override:{classGroups:{"text-color":[{text:[e=>!e.startsWith("display-")&&!e.startsWith("headline-")&&!e.startsWith("title-")&&!e.startsWith("body-")&&!e.startsWith("label-")]}]}},extend:{classGroups:{font:[{text:[e=>e.startsWith("display-")||e.startsWith("headline-")||e.startsWith("title-")||e.startsWith("body-")||e.startsWith("label-")]}]},conflictingClassGroups:{font:["font"]}}}),x=(...e)=>Ze(Ke.clsx(e)),Qe=(...e)=>Ze(Ke.clsx(e));function cn(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}const Ee=e=>{const t={};e.classNameList.forEach(s=>{var r;if(s)if(typeof s=="string")(t[r=e.default]??(t[r]=[])).push(s);else{const u=s(e.states);Object.entries(u).map(c=>{const[l,d]=c;(t[l]??(t[l]=[])).push(d)})}});const n=t;return Object.entries(t).map(s=>{let[r,u]=s;u=u.reverse(),r==e.default&&u.unshift("relative"),u.unshift(cn(r)),n[r]=Qe(...u)}),n},ne=(e,t)=>n=>Ee({classNameList:[n.className,t],default:e,states:n}),ee=(e,t)=>n=>i.useMemo(()=>Ee({classNameList:[n.className,t],default:e,states:n}),[n]);function un(e,t,n){return i.useMemo(()=>Ee({classNameList:[n==null?void 0:n.className,t],default:e,states:n}),[e,t,n])}const et=ne("customScroll",({orientation:e,draggable:t,isDragging:n})=>({customScroll:x("flex h-full w-full",t&&["[&::-webkit-scrollbar-track]:rounded-full","[&::-webkit-scrollbar-track]:bg-transparent","[&::-webkit-scrollbar-thumb]:rounded-full",{"[&::-webkit-scrollbar-thumb]:bg-outline":n,"[&::-webkit-scrollbar-thumb]:bg-transparent":!n},{"[&::-webkit-scrollbar]:h-2":e==="horizontal"},{"[&::-webkit-scrollbar]:w-2":e==="vertical"}],{"overflow-y-scroll flex-col":e==="vertical","overflow-x-scroll flex-row":e==="horizontal","cursor-grab":t&&!n,"cursor-grabbing":t&&n}),track:x("overflow-hidden flex-none sticky",{"left-0 h-full":e==="horizontal","top-0 w-full":e==="vertical"})}));function dn(e,t){let n=0,s=null,r=null;const u=(c,l)=>{n=Date.now(),t(c,l)};return(c,l)=>{const d=Date.now(),o=e-(d-n);o<=0?(s&&(clearTimeout(s),s=null),u(c,l)):(r={v:c,o:l},s||(s=setTimeout(()=>{s=null;const f=r;r=null,f&&u(f.v,f.o)},o)))}}const tt=({children:e,orientation:t="vertical",scrollSize:n,onScroll:s,className:r,draggable:u=!1,throttleDuration:c=75,scroll:l,setScroll:d})=>{var te,E;const o=i.useRef(null),f=i.useRef(null),[y,h]=i.useState({width:null,height:null});i.useEffect(()=>{if(!o.current)return;const L=new ResizeObserver(N=>{for(const A of N)A.target===o.current&&h({width:A.contentRect.width,height:A.contentRect.height})});return L.observe(o.current),()=>{L.disconnect()}},[o]);const m=i.useRef(null),p=i.useRef(null),b=()=>{const L=f.current;return L?{width:n??L.scrollWidth,height:n??L.scrollHeight}:null},w=()=>{const L=o.current;return L?{width:L.clientWidth,height:L.clientHeight}:null},{scrollYProgress:I,scrollXProgress:S}=X.useScroll({container:o}),g=i.useRef(null);g.current||(g.current=dn(c,(L,N)=>{!p.current||!m.current||!o.current||(N===(t==="horizontal"?"x":"y")&&(d==null||d(L)),s&&(t==="horizontal"&&N==="x"&&s({scrollProgress:L,scroll:L*(m.current.width-o.current.clientWidth),scrollTotal:m.current.width-o.current.clientWidth,scrollVisible:p.current.width}),t==="vertical"&&N==="y"&&s({scrollProgress:L,scroll:L*(m.current.height-o.current.clientHeight),scrollTotal:m.current.height-o.current.clientHeight,scrollVisible:p.current.height})))}));const B=(L,N)=>{g.current&&g.current(L,N)};i.useEffect(()=>{y.width&&B(S.get(),"x"),y.height&&B(I.get(),"y")},[y]),i.useEffect(()=>{const L=o.current,N=f.current;if(!L||!N||typeof l!="number")return;const A=(O,_,z)=>Math.min(z,Math.max(_,O));if(t==="horizontal"){const O=Math.max(0,(n??N.scrollWidth)-L.clientWidth);L.scrollLeft=A(l*O,0,O)}else{const O=Math.max(0,(n??N.scrollHeight)-L.clientHeight);L.scrollTop=A(l*O,0,O)}},[l,t,n]),X.useMotionValueEvent(S,"change",L=>{B(L,"x")}),X.useMotionValueEvent(I,"change",L=>{B(L,"y")});const[$,v]=i.useState(!1);i.useLayoutEffect(()=>{$||!p.current||!m.current||!s||(s({scrollProgress:0,scroll:0,scrollTotal:t=="vertical"?m.current.height:m.current.width,scrollVisible:t=="vertical"?p.current.height:p.current.width}),v(!0))},[p,m,s]),m.current=b(),p.current=w();const[k,F]=i.useState(!1),j=et({isDragging:k,children:e,className:r,onScroll:s,orientation:t,scrollSize:n,draggable:u,throttleDuration:c}),[P,M]=i.useState(0),[q,V]=i.useState(0),Q=L=>{if(!u)return;const N=o.current;if(!N||P==null)return;const O=(L.pageX-N.offsetLeft-P)*1.5;N.scrollLeft=q-O},W=L=>{const N=o.current;N&&(F(!0),M(L.pageX-N.offsetLeft),V(N.scrollLeft))},C=L=>{k&&(L.preventDefault(),Q(L))},R=()=>{F(!1)},H=()=>{F(!1)},U=L=>{L.preventDefault()},G=i.useRef(null);return i.useEffect(()=>()=>{G.current&&clearTimeout(G.current)},[]),i.useEffect(()=>{const L=o.current;if(!L)return;const N=A=>{var Z,D,Y,se;const O=A.detail,_=o.current;if(!_||!O)return;const z=O.orientation??t;if(typeof O.progress=="number")if(z==="horizontal"){const ie=Math.max(0,(((Z=m.current)==null?void 0:Z.width)??0)-_.clientWidth);_.scrollLeft=Math.min(ie,Math.max(0,O.progress*ie))}else{const ie=Math.max(0,(((D=m.current)==null?void 0:D.height)??0)-_.clientHeight);_.scrollTop=Math.min(ie,Math.max(0,O.progress*ie))}else if(typeof O.scroll=="number")if(z==="horizontal"){const ie=Math.max(0,(((Y=m.current)==null?void 0:Y.width)??0)-_.clientWidth);_.scrollLeft=Math.min(ie,Math.max(0,O.scroll))}else{const ie=Math.max(0,(((se=m.current)==null?void 0:se.height)??0)-_.clientHeight);_.scrollTop=Math.min(ie,Math.max(0,O.scroll))}};return L.addEventListener("udx:customScroll:set",N),()=>{L.removeEventListener("udx:customScroll:set",N)}},[t]),a.jsxs("div",{className:j.customScroll,ref:o,onMouseDown:W,onMouseMove:C,onMouseUp:R,onMouseLeave:H,onDragStart:U,onScroll:L=>{k||(M(null),F(!0),G.current&&clearTimeout(G.current),G.current=setTimeout(()=>{F(!1)},1e3))},children:[a.jsx("div",{ref:f,style:t==="vertical"?{height:((te=p==null?void 0:p.current)==null?void 0:te.height)??"100%"}:{width:((E=p==null?void 0:p.current)==null?void 0:E.width)??"100%"},className:j.track,children:e}),p.current&&m.current&&a.jsxs(a.Fragment,{children:[t==="vertical"&&m.current.height>p.current.height&&a.jsx(X.motion.div,{className:"flex-none",style:{height:m.current.height-p.current.height}}),t==="horizontal"&&m.current.width>p.current.width&&a.jsx(X.motion.div,{className:"flex-none",style:{width:m.current.width-p.current.width}})]})]})};var fn="1.3.17";function nt(e,t,n){return Math.max(e,Math.min(t,n))}function hn(e,t,n){return(1-n)*e+n*t}function mn(e,t,n,s){return hn(e,t,1-Math.exp(-n*s))}function pn(e,t){return(e%t+t)%t}var yn=class{constructor(){T(this,"isRunning",!1);T(this,"value",0);T(this,"from",0);T(this,"to",0);T(this,"currentTime",0);T(this,"lerp");T(this,"duration");T(this,"easing");T(this,"onUpdate")}advance(e){var n;if(!this.isRunning)return;let t=!1;if(this.duration&&this.easing){this.currentTime+=e;const s=nt(0,this.currentTime/this.duration,1);t=s>=1;const r=t?1:this.easing(s);this.value=this.from+(this.to-this.from)*r}else this.lerp?(this.value=mn(this.value,this.to,this.lerp*60,e),Math.round(this.value)===this.to&&(this.value=this.to,t=!0)):(this.value=this.to,t=!0);t&&this.stop(),(n=this.onUpdate)==null||n.call(this,this.value,t)}stop(){this.isRunning=!1}fromTo(e,t,{lerp:n,duration:s,easing:r,onStart:u,onUpdate:c}){this.from=this.value=e,this.to=t,this.lerp=n,this.duration=s,this.easing=r,this.currentTime=0,this.isRunning=!0,u==null||u(),this.onUpdate=c}};function xn(e,t){let n;return function(...s){let r=this;clearTimeout(n),n=setTimeout(()=>{n=void 0,e.apply(r,s)},t)}}var vn=class{constructor(e,t,{autoResize:n=!0,debounce:s=250}={}){T(this,"width",0);T(this,"height",0);T(this,"scrollHeight",0);T(this,"scrollWidth",0);T(this,"debouncedResize");T(this,"wrapperResizeObserver");T(this,"contentResizeObserver");T(this,"resize",()=>{this.onWrapperResize(),this.onContentResize()});T(this,"onWrapperResize",()=>{this.wrapper instanceof Window?(this.width=window.innerWidth,this.height=window.innerHeight):(this.width=this.wrapper.clientWidth,this.height=this.wrapper.clientHeight)});T(this,"onContentResize",()=>{this.wrapper instanceof Window?(this.scrollHeight=this.content.scrollHeight,this.scrollWidth=this.content.scrollWidth):(this.scrollHeight=this.wrapper.scrollHeight,this.scrollWidth=this.wrapper.scrollWidth)});this.wrapper=e,this.content=t,n&&(this.debouncedResize=xn(this.resize,s),this.wrapper instanceof Window?window.addEventListener("resize",this.debouncedResize,!1):(this.wrapperResizeObserver=new ResizeObserver(this.debouncedResize),this.wrapperResizeObserver.observe(this.wrapper)),this.contentResizeObserver=new ResizeObserver(this.debouncedResize),this.contentResizeObserver.observe(this.content)),this.resize()}destroy(){var e,t;(e=this.wrapperResizeObserver)==null||e.disconnect(),(t=this.contentResizeObserver)==null||t.disconnect(),this.wrapper===window&&this.debouncedResize&&window.removeEventListener("resize",this.debouncedResize,!1)}get limit(){return{x:this.scrollWidth-this.width,y:this.scrollHeight-this.height}}},st=class{constructor(){T(this,"events",{})}emit(e,...t){var s;let n=this.events[e]||[];for(let r=0,u=n.length;r<u;r++)(s=n[r])==null||s.call(n,...t)}on(e,t){var n;return(n=this.events[e])!=null&&n.push(t)||(this.events[e]=[t]),()=>{var s;this.events[e]=(s=this.events[e])==null?void 0:s.filter(r=>t!==r)}}off(e,t){var n;this.events[e]=(n=this.events[e])==null?void 0:n.filter(s=>t!==s)}destroy(){this.events={}}},Oe=100/6,he={passive:!1},gn=class{constructor(e,t={wheelMultiplier:1,touchMultiplier:1}){T(this,"touchStart",{x:0,y:0});T(this,"lastDelta",{x:0,y:0});T(this,"window",{width:0,height:0});T(this,"emitter",new st);T(this,"onTouchStart",e=>{const{clientX:t,clientY:n}=e.targetTouches?e.targetTouches[0]:e;this.touchStart.x=t,this.touchStart.y=n,this.lastDelta={x:0,y:0},this.emitter.emit("scroll",{deltaX:0,deltaY:0,event:e})});T(this,"onTouchMove",e=>{const{clientX:t,clientY:n}=e.targetTouches?e.targetTouches[0]:e,s=-(t-this.touchStart.x)*this.options.touchMultiplier,r=-(n-this.touchStart.y)*this.options.touchMultiplier;this.touchStart.x=t,this.touchStart.y=n,this.lastDelta={x:s,y:r},this.emitter.emit("scroll",{deltaX:s,deltaY:r,event:e})});T(this,"onTouchEnd",e=>{this.emitter.emit("scroll",{deltaX:this.lastDelta.x,deltaY:this.lastDelta.y,event:e})});T(this,"onWheel",e=>{let{deltaX:t,deltaY:n,deltaMode:s}=e;const r=s===1?Oe:s===2?this.window.width:1,u=s===1?Oe:s===2?this.window.height:1;t*=r,n*=u,t*=this.options.wheelMultiplier,n*=this.options.wheelMultiplier,this.emitter.emit("scroll",{deltaX:t,deltaY:n,event:e})});T(this,"onWindowResize",()=>{this.window={width:window.innerWidth,height:window.innerHeight}});this.element=e,this.options=t,window.addEventListener("resize",this.onWindowResize,!1),this.onWindowResize(),this.element.addEventListener("wheel",this.onWheel,he),this.element.addEventListener("touchstart",this.onTouchStart,he),this.element.addEventListener("touchmove",this.onTouchMove,he),this.element.addEventListener("touchend",this.onTouchEnd,he)}on(e,t){return this.emitter.on(e,t)}destroy(){this.emitter.destroy(),window.removeEventListener("resize",this.onWindowResize,!1),this.element.removeEventListener("wheel",this.onWheel,he),this.element.removeEventListener("touchstart",this.onTouchStart,he),this.element.removeEventListener("touchmove",this.onTouchMove,he),this.element.removeEventListener("touchend",this.onTouchEnd,he)}},Ve=e=>Math.min(1,1.001-Math.pow(2,-10*e)),wn=class{constructor({wrapper:e=window,content:t=document.documentElement,eventsTarget:n=e,smoothWheel:s=!0,syncTouch:r=!1,syncTouchLerp:u=.075,touchInertiaExponent:c=1.7,duration:l,easing:d,lerp:o=.1,infinite:f=!1,orientation:y="vertical",gestureOrientation:h=y==="horizontal"?"both":"vertical",touchMultiplier:m=1,wheelMultiplier:p=1,autoResize:b=!0,prevent:w,virtualScroll:I,overscroll:S=!0,autoRaf:g=!1,anchors:B=!1,autoToggle:$=!1,allowNestedScroll:v=!1,__experimental__naiveDimensions:k=!1,naiveDimensions:F=k,stopInertiaOnNavigate:j=!1}={}){T(this,"_isScrolling",!1);T(this,"_isStopped",!1);T(this,"_isLocked",!1);T(this,"_preventNextNativeScrollEvent",!1);T(this,"_resetVelocityTimeout",null);T(this,"_rafId",null);T(this,"isTouching");T(this,"time",0);T(this,"userData",{});T(this,"lastVelocity",0);T(this,"velocity",0);T(this,"direction",0);T(this,"options");T(this,"targetScroll");T(this,"animatedScroll");T(this,"animate",new yn);T(this,"emitter",new st);T(this,"dimensions");T(this,"virtualScroll");T(this,"onScrollEnd",e=>{e instanceof CustomEvent||(this.isScrolling==="smooth"||this.isScrolling===!1)&&e.stopPropagation()});T(this,"dispatchScrollendEvent",()=>{this.options.wrapper.dispatchEvent(new CustomEvent("scrollend",{bubbles:this.options.wrapper===window,detail:{lenisScrollEnd:!0}}))});T(this,"onTransitionEnd",e=>{e.propertyName.includes("overflow")&&this.checkOverflow()});T(this,"onClick",e=>{const n=e.composedPath().filter(s=>s instanceof HTMLAnchorElement&&s.getAttribute("href"));if(this.options.anchors){const s=n.find(r=>{var u;return(u=r.getAttribute("href"))==null?void 0:u.includes("#")});if(s){const r=s.getAttribute("href");if(r){const u=typeof this.options.anchors=="object"&&this.options.anchors?this.options.anchors:void 0,c=`#${r.split("#")[1]}`;this.scrollTo(c,u)}}}this.options.stopInertiaOnNavigate&&n.find(r=>r.host===window.location.host)&&this.reset()});T(this,"onPointerDown",e=>{e.button===1&&this.reset()});T(this,"onVirtualScroll",e=>{if(typeof this.options.virtualScroll=="function"&&this.options.virtualScroll(e)===!1)return;const{deltaX:t,deltaY:n,event:s}=e;if(this.emitter.emit("virtual-scroll",{deltaX:t,deltaY:n,event:s}),s.ctrlKey||s.lenisStopPropagation)return;const r=s.type.includes("touch"),u=s.type.includes("wheel");this.isTouching=s.type==="touchstart"||s.type==="touchmove";const c=t===0&&n===0;if(this.options.syncTouch&&r&&s.type==="touchstart"&&c&&!this.isStopped&&!this.isLocked){this.reset();return}const d=this.options.gestureOrientation==="vertical"&&n===0||this.options.gestureOrientation==="horizontal"&&t===0;if(c||d)return;let o=s.composedPath();o=o.slice(0,o.indexOf(this.rootElement));const f=this.options.prevent;if(o.find(w=>{var I,S,g;return w instanceof HTMLElement&&(typeof f=="function"&&(f==null?void 0:f(w))||((I=w.hasAttribute)==null?void 0:I.call(w,"data-lenis-prevent"))||r&&((S=w.hasAttribute)==null?void 0:S.call(w,"data-lenis-prevent-touch"))||u&&((g=w.hasAttribute)==null?void 0:g.call(w,"data-lenis-prevent-wheel"))||this.options.allowNestedScroll&&this.checkNestedScroll(w,{deltaX:t,deltaY:n}))}))return;if(this.isStopped||this.isLocked){s.cancelable&&s.preventDefault();return}if(!(this.options.syncTouch&&r||this.options.smoothWheel&&u)){this.isScrolling="native",this.animate.stop(),s.lenisStopPropagation=!0;return}let h=n;this.options.gestureOrientation==="both"?h=Math.abs(n)>Math.abs(t)?n:t:this.options.gestureOrientation==="horizontal"&&(h=t),(!this.options.overscroll||this.options.infinite||this.options.wrapper!==window&&this.limit>0&&(this.animatedScroll>0&&this.animatedScroll<this.limit||this.animatedScroll===0&&n>0||this.animatedScroll===this.limit&&n<0))&&(s.lenisStopPropagation=!0),s.cancelable&&s.preventDefault();const m=r&&this.options.syncTouch,b=r&&s.type==="touchend";b&&(h=Math.sign(this.velocity)*Math.pow(Math.abs(this.velocity),this.options.touchInertiaExponent)),this.scrollTo(this.targetScroll+h,{programmatic:!1,...m?{lerp:b?this.options.syncTouchLerp:1}:{lerp:this.options.lerp,duration:this.options.duration,easing:this.options.easing}})});T(this,"onNativeScroll",()=>{if(this._resetVelocityTimeout!==null&&(clearTimeout(this._resetVelocityTimeout),this._resetVelocityTimeout=null),this._preventNextNativeScrollEvent){this._preventNextNativeScrollEvent=!1;return}if(this.isScrolling===!1||this.isScrolling==="native"){const e=this.animatedScroll;this.animatedScroll=this.targetScroll=this.actualScroll,this.lastVelocity=this.velocity,this.velocity=this.animatedScroll-e,this.direction=Math.sign(this.animatedScroll-e),this.isStopped||(this.isScrolling="native"),this.emit(),this.velocity!==0&&(this._resetVelocityTimeout=setTimeout(()=>{this.lastVelocity=this.velocity,this.velocity=0,this.isScrolling=!1,this.emit()},400))}});T(this,"raf",e=>{const t=e-(this.time||e);this.time=e,this.animate.advance(t*.001),this.options.autoRaf&&(this._rafId=requestAnimationFrame(this.raf))});window.lenisVersion=fn,(!e||e===document.documentElement)&&(e=window),typeof l=="number"&&typeof d!="function"?d=Ve:typeof d=="function"&&typeof l!="number"&&(l=1),this.options={wrapper:e,content:t,eventsTarget:n,smoothWheel:s,syncTouch:r,syncTouchLerp:u,touchInertiaExponent:c,duration:l,easing:d,lerp:o,infinite:f,gestureOrientation:h,orientation:y,touchMultiplier:m,wheelMultiplier:p,autoResize:b,prevent:w,virtualScroll:I,overscroll:S,autoRaf:g,anchors:B,autoToggle:$,allowNestedScroll:v,naiveDimensions:F,stopInertiaOnNavigate:j},this.dimensions=new vn(e,t,{autoResize:b}),this.updateClassName(),this.targetScroll=this.animatedScroll=this.actualScroll,this.options.wrapper.addEventListener("scroll",this.onNativeScroll,!1),this.options.wrapper.addEventListener("scrollend",this.onScrollEnd,{capture:!0}),(this.options.anchors||this.options.stopInertiaOnNavigate)&&this.options.wrapper.addEventListener("click",this.onClick,!1),this.options.wrapper.addEventListener("pointerdown",this.onPointerDown,!1),this.virtualScroll=new gn(n,{touchMultiplier:m,wheelMultiplier:p}),this.virtualScroll.on("scroll",this.onVirtualScroll),this.options.autoToggle&&(this.checkOverflow(),this.rootElement.addEventListener("transitionend",this.onTransitionEnd,{passive:!0})),this.options.autoRaf&&(this._rafId=requestAnimationFrame(this.raf))}destroy(){this.emitter.destroy(),this.options.wrapper.removeEventListener("scroll",this.onNativeScroll,!1),this.options.wrapper.removeEventListener("scrollend",this.onScrollEnd,{capture:!0}),this.options.wrapper.removeEventListener("pointerdown",this.onPointerDown,!1),(this.options.anchors||this.options.stopInertiaOnNavigate)&&this.options.wrapper.removeEventListener("click",this.onClick,!1),this.virtualScroll.destroy(),this.dimensions.destroy(),this.cleanUpClassName(),this._rafId&&cancelAnimationFrame(this._rafId)}on(e,t){return this.emitter.on(e,t)}off(e,t){return this.emitter.off(e,t)}get overflow(){const e=this.isHorizontal?"overflow-x":"overflow-y";return getComputedStyle(this.rootElement)[e]}checkOverflow(){["hidden","clip"].includes(this.overflow)?this.internalStop():this.internalStart()}setScroll(e){this.isHorizontal?this.options.wrapper.scrollTo({left:e,behavior:"instant"}):this.options.wrapper.scrollTo({top:e,behavior:"instant"})}resize(){this.dimensions.resize(),this.animatedScroll=this.targetScroll=this.actualScroll,this.emit()}emit(){this.emitter.emit("scroll",this)}reset(){this.isLocked=!1,this.isScrolling=!1,this.animatedScroll=this.targetScroll=this.actualScroll,this.lastVelocity=this.velocity=0,this.animate.stop()}start(){if(this.isStopped){if(this.options.autoToggle){this.rootElement.style.removeProperty("overflow");return}this.internalStart()}}internalStart(){this.isStopped&&(this.reset(),this.isStopped=!1,this.emit())}stop(){if(!this.isStopped){if(this.options.autoToggle){this.rootElement.style.setProperty("overflow","clip");return}this.internalStop()}}internalStop(){this.isStopped||(this.reset(),this.isStopped=!0,this.emit())}scrollTo(e,{offset:t=0,immediate:n=!1,lock:s=!1,programmatic:r=!0,lerp:u=r?this.options.lerp:void 0,duration:c=r?this.options.duration:void 0,easing:l=r?this.options.easing:void 0,onStart:d,onComplete:o,force:f=!1,userData:y}={}){if(!((this.isStopped||this.isLocked)&&!f)){if(typeof e=="string"&&["top","left","start","#"].includes(e))e=0;else if(typeof e=="string"&&["bottom","right","end"].includes(e))e=this.limit;else{let h;if(typeof e=="string"?(h=document.querySelector(e),h||(e==="#top"?e=0:console.warn("Lenis: Target not found",e))):e instanceof HTMLElement&&(e!=null&&e.nodeType)&&(h=e),h){if(this.options.wrapper!==window){const p=this.rootElement.getBoundingClientRect();t-=this.isHorizontal?p.left:p.top}const m=h.getBoundingClientRect();e=(this.isHorizontal?m.left:m.top)+this.animatedScroll}}if(typeof e=="number"){if(e+=t,e=Math.round(e),this.options.infinite){if(r){this.targetScroll=this.animatedScroll=this.scroll;const h=e-this.animatedScroll;h>this.limit/2?e=e-this.limit:h<-this.limit/2&&(e=e+this.limit)}}else e=nt(0,e,this.limit);if(e===this.targetScroll){d==null||d(this),o==null||o(this);return}if(this.userData=y??{},n){this.animatedScroll=this.targetScroll=e,this.setScroll(this.scroll),this.reset(),this.preventNextNativeScrollEvent(),this.emit(),o==null||o(this),this.userData={},requestAnimationFrame(()=>{this.dispatchScrollendEvent()});return}r||(this.targetScroll=e),typeof c=="number"&&typeof l!="function"?l=Ve:typeof l=="function"&&typeof c!="number"&&(c=1),this.animate.fromTo(this.animatedScroll,e,{duration:c,easing:l,lerp:u,onStart:()=>{s&&(this.isLocked=!0),this.isScrolling="smooth",d==null||d(this)},onUpdate:(h,m)=>{this.isScrolling="smooth",this.lastVelocity=this.velocity,this.velocity=h-this.animatedScroll,this.direction=Math.sign(this.velocity),this.animatedScroll=h,this.setScroll(this.scroll),r&&(this.targetScroll=h),m||this.emit(),m&&(this.reset(),this.emit(),o==null||o(this),this.userData={},requestAnimationFrame(()=>{this.dispatchScrollendEvent()}),this.preventNextNativeScrollEvent())}})}}}preventNextNativeScrollEvent(){this._preventNextNativeScrollEvent=!0,requestAnimationFrame(()=>{this._preventNextNativeScrollEvent=!1})}checkNestedScroll(e,{deltaX:t,deltaY:n}){const s=Date.now(),r=e._lenis??(e._lenis={});let u,c,l,d,o,f,y,h;const m=this.options.gestureOrientation;if(s-(r.time??0)>2e3){r.time=Date.now();const $=window.getComputedStyle(e);r.computedStyle=$;const v=$.overflowX,k=$.overflowY;if(u=["auto","overlay","scroll"].includes(v),c=["auto","overlay","scroll"].includes(k),r.hasOverflowX=u,r.hasOverflowY=c,!u&&!c||m==="vertical"&&!c||m==="horizontal"&&!u)return!1;o=e.scrollWidth,f=e.scrollHeight,y=e.clientWidth,h=e.clientHeight,l=o>y,d=f>h,r.isScrollableX=l,r.isScrollableY=d,r.scrollWidth=o,r.scrollHeight=f,r.clientWidth=y,r.clientHeight=h}else l=r.isScrollableX,d=r.isScrollableY,u=r.hasOverflowX,c=r.hasOverflowY,o=r.scrollWidth,f=r.scrollHeight,y=r.clientWidth,h=r.clientHeight;if(!u&&!c||!l&&!d||m==="vertical"&&(!c||!d)||m==="horizontal"&&(!u||!l))return!1;let p;if(m==="horizontal")p="x";else if(m==="vertical")p="y";else{const $=t!==0,v=n!==0;$&&u&&l&&(p="x"),v&&c&&d&&(p="y")}if(!p)return!1;let b,w,I,S,g;if(p==="x")b=e.scrollLeft,w=o-y,I=t,S=u,g=l;else if(p==="y")b=e.scrollTop,w=f-h,I=n,S=c,g=d;else return!1;return(I>0?b<w:b>0)&&S&&g}get rootElement(){return this.options.wrapper===window?document.documentElement:this.options.wrapper}get limit(){return this.options.naiveDimensions?this.isHorizontal?this.rootElement.scrollWidth-this.rootElement.clientWidth:this.rootElement.scrollHeight-this.rootElement.clientHeight:this.dimensions.limit[this.isHorizontal?"x":"y"]}get isHorizontal(){return this.options.orientation==="horizontal"}get actualScroll(){const e=this.options.wrapper;return this.isHorizontal?e.scrollX??e.scrollLeft:e.scrollY??e.scrollTop}get scroll(){return this.options.infinite?pn(this.animatedScroll,this.limit):this.animatedScroll}get progress(){return this.limit===0?1:this.scroll/this.limit}get isScrolling(){return this._isScrolling}set isScrolling(e){this._isScrolling!==e&&(this._isScrolling=e,this.updateClassName())}get isStopped(){return this._isStopped}set isStopped(e){this._isStopped!==e&&(this._isStopped=e,this.updateClassName())}get isLocked(){return this._isLocked}set isLocked(e){this._isLocked!==e&&(this._isLocked=e,this.updateClassName())}get isSmooth(){return this.isScrolling==="smooth"}get className(){let e="lenis";return this.options.autoToggle&&(e+=" lenis-autoToggle"),this.isStopped&&(e+=" lenis-stopped"),this.isLocked&&(e+=" lenis-locked"),this.isScrolling&&(e+=" lenis-scrolling"),this.isScrolling==="smooth"&&(e+=" lenis-smooth"),e}updateClassName(){this.cleanUpClassName(),this.rootElement.className=`${this.rootElement.className} ${this.className}`.trim()}cleanUpClassName(){this.rootElement.className=this.rootElement.className.replace(/lenis(-\w+)?/g,"").trim()}};const bn=({transition:e=1.2,easing:t,orientation:n="vertical",smoothTouch:s=!1,touchMultiplier:r=2,children:u})=>{const c=i.useRef(null),l=i.useRef(null);return i.useEffect(()=>{let d;typeof e=="string"?e.endsWith("ms")?d=parseFloat(e)/1e3:e.endsWith("s")?d=parseFloat(e):d=parseFloat(e)||1.2:d=e;const o=y=>1-Math.pow(1-y,5);c.current=new wn({duration:d,easing:t??o,orientation:n,smoothWheel:!0,touchMultiplier:r,syncTouch:s});const f=y=>{var h;(h=c.current)==null||h.raf(y),l.current=requestAnimationFrame(f)};return l.current=requestAnimationFrame(f),()=>{var y;l.current!==null&&cancelAnimationFrame(l.current),(y=c.current)==null||y.destroy(),c.current=null}},[e,t,n,s,r]),u?a.jsx(a.Fragment,{children:u}):null},de=({style:e,colorName:t,stateClassName:n="state-ripple-group",children:s,className:r})=>{const u=i.useRef(null),c=i.useRef(null),[l,d]=i.useState(!1),o=rt({isClient:l,stateClassName:n,className:r,colorName:t});return i.useEffect(()=>{if(u.current&&n!=="state-layer"){const y=(n.includes("[")?"group/"+n.split("[")[1].split("]")[0]:"group").replace(/\//g,"\\/"),h=u.current.closest(`.${y}:not(.${y} .${y})`);c.current=h}d(!0)},[]),a.jsxs("div",{ref:u,className:o.stateLayer,style:{"--state-color":`var(--default-color, var(--color-${t}))`,...e},children:[l&&a.jsx(Je,{triggerRef:c}),s]})},Sn=({isClient:e,stateClassName:t})=>({stateLayer:x(["w-full top-0 left-0 h-full absolute pointer-events-none overflow-hidden",t])}),rt=ee("stateLayer",Sn),ot=({targetRef:e,children:t})=>{const[n,s]=i.useState(null),r=i.useRef(null),u=()=>{const c=e.current;if(!c)return;const l=c.getBoundingClientRect();s({position:"fixed",top:l.top,left:l.left,width:l.width,height:l.height,pointerEvents:"none",zIndex:999})};return i.useEffect(()=>{const c=e.current;if(c)return u(),window.addEventListener("scroll",u,!0),window.addEventListener("resize",u),r.current=new ResizeObserver(u),r.current.observe(c),()=>{var l;window.removeEventListener("scroll",u,!0),window.removeEventListener("resize",u),(l=r.current)==null||l.disconnect()}},[e]),n?Me.createPortal(a.jsx("div",{style:n,children:t}),document.body):null};function Nn(e){return/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(e)}const En=({config:e,throttleDelay:t=100,onLoad:n,loadTheme:s=!1})=>{const[r,u]=i.useState(null);i.useEffect(()=>{(async()=>{const h=await Se.loader(e,s);u(h)})()},[]);const[c,l]=i.useState(null),d=i.useRef(null),o=i.useRef(0),f=i.useRef(null);i.useEffect(()=>{if(!r)return;const h={...e,sourceColor:e.sourceColor},m=Date.now(),p=m-o.current,b=async w=>{await y(w)};if(o.current===0||p>=t)d.current&&(clearTimeout(d.current),d.current=null),f.current=null,o.current=m,b(h);else if(f.current=h,!d.current){const w=Math.max(0,t-p);d.current=setTimeout(async()=>{d.current=null;const I=f.current;f.current=null,I&&(o.current=Date.now(),await b(I))},w)}return()=>{}},[e,t,r]);const y=async h=>{if(typeof h.sourceColor=="string"&&!Nn(h.sourceColor))throw new Error("Invalid hex color");if(!r)return;r.context.update(h),await r.load();const m=r==null?void 0:r.plugins.getPlugin(Ge.TailwindPlugin).getInstance().outputCss;l(m),n==null||n(r)};return i.useEffect(()=>()=>{d.current&&(clearTimeout(d.current),d.current=null)},[]),c?a.jsx("style",{dangerouslySetInnerHTML:{__html:c}}):null};function kn(){if(typeof window>"u")return!1;try{if(window.CSS&&typeof window.CSS.supports=="function")return CSS.supports("animation-timeline: view()")||CSS.supports("animation-timeline: scroll()")||CSS.supports("view-timeline-name: --a")}catch{}return!1}function Ln(){return typeof window>"u"||!("matchMedia"in window)?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches}function Ce(e){if(!(e instanceof HTMLElement))return!1;const t=e.classList;return Array.from(t).some(n=>n.startsWith("anim-")&&n.includes("scroll"))}function ze(e){if(!(e instanceof HTMLElement))return!1;const t=e.classList;return Array.from(t).some(n=>n.startsWith("anim-"))}function ke(e,t){if(!Ce(e))return;if(e.hasAttribute(`data-${t}-scroll`)){const c=(e.getAttribute(`data-${t}-scroll`)||"").trim().toLowerCase(),l=c==="x"||c==="inline"?"inline":c==="y"||c==="block"?"block":"auto";e.classList.contains(`${t}-timeline`)||e.classList.contains(`${t}-timeline-inline`)||e.classList.contains(`${t}-timeline-block`)||e.classList.contains(`${t}-timeline-x`)||e.classList.contains(`${t}-timeline-y`)||(l==="inline"?e.classList.add(`${t}-timeline-inline`):l==="block"?e.classList.add(`${t}-timeline-block`):e.classList.add(`${t}-scroll`))}const n=e.getAttribute(`data-${t}-start`);n&&e.style.setProperty(`--${t}-range-start`,n);const s=e.getAttribute(`data-${t}-end`);s&&e.style.setProperty(`--${t}-range-end`,s);const r=e.hasAttribute(`data-${t}-paused`)||e.classList.contains(`${t}-paused`),u=e.hasAttribute(`data-${t}-run`)||e.classList.contains(`${t}-run`);!r&&!u&&e.setAttribute(`data-${t}-run`,"")}function Le(e=document,t){return Array.from(e.querySelectorAll(`[class*="${t}-"][class*="-scroll"]`)).filter(s=>Ce(s))}function jn(e=document,t){const n=Array.from(e.querySelectorAll(`[class*="${t}-"]`)),s=new Set([`${t}-run`,`${t}-in`,`${t}-out`,`${t}-in-run`,`${t}-out-run`,`${t}-paused`,`${t}-timeline`,`${t}-timeline-inline`,`${t}-timeline-block`,`${t}-timeline-x`,`${t}-timeline-y`,`${t}-scroll`]);return n.filter(r=>{if(!(r instanceof HTMLElement))return!1;const u=r.classList;return u.contains(`${t}-in`)||u.contains(`${t}-out`)||Array.from(u).some(d=>d.startsWith(`${t}-`)&&!d.includes("scroll")&&!s.has(d))?!0:!Ce(r)})}function In(e,t){return Array.from(e).some(n=>n.startsWith(t)&&n.includes("-out"))}function Ye(e,t,n){e.setAttribute(`data-${t}-run`,""),e.setAttribute(`data-${t}-${n}-run`,"")}function _e(e,t,n){const s=e.style.animationName;e.style.animationName="none",e.removeAttribute(`data-${t}-run`),n?e.removeAttribute(`data-${t}-${n}-run`):(e.removeAttribute(`data-${t}-in-run`),e.removeAttribute(`data-${t}-out-run`)),e.offsetWidth,e.style.animationName=s}const Mn=[0,.2],qe=new WeakSet;function Xe(e,t){if(qe.has(e))return;qe.add(e);const n=r=>{r.target===e&&(e.hasAttribute(`data-${t}-in-run`)||e.hasAttribute(`data-${t}-out-run`))&&e.setAttribute(`data-${t}-animating`,"")},s=r=>{r.target===e&&e.removeAttribute(`data-${t}-animating`)};e.addEventListener("animationstart",n),e.addEventListener("animationend",s),e.addEventListener("animationcancel",s)}function Re(e={}){const{prefix:t="anim",once:n=!0}=e;if(Ln())return()=>{};const s=kn(),r=new WeakSet;let u=typeof window<"u"&&(window.pageYOffset||window.scrollY)||0,c=!0;const l=()=>{const m=window.pageYOffset||window.scrollY||0;c=m>=u,u=m};typeof window<"u"&&window.addEventListener("scroll",l,{passive:!0});const d=new IntersectionObserver(m=>{for(const p of m){const b=p.target;if(!ze(b)||b.hasAttribute(`data-${t}-animating`))continue;const w=In(b.classList,t);p.isIntersecting?(w&&_e(b,t,"out"),Ye(b,t,"in"),n&&d.unobserve(b)):n||(c||_e(b,t,"in"),w&&Ye(b,t,"out"))}},{threshold:Mn}),o=m=>{const p=jn(m||document,t);for(const b of p)r.has(b)||(r.add(b),d.observe(b),Xe(b,t))};o();let f,y=null,h=null;if(s)(()=>{h==null&&(h=requestAnimationFrame(()=>{h=null;const p=Le(void 0,t);for(const b of p)ke(b,t)}))})(),y=new MutationObserver(p=>{for(const b of p)if(b.type==="attributes"){const w=b.target;w instanceof HTMLElement&&(ke(w,t),ze(w)&&(r.has(w)||(r.add(w),d.observe(w),Xe(w,t))))}else if(b.type==="childList"&&b.addedNodes&&b.addedNodes.length){for(const w of Array.from(b.addedNodes))if(w instanceof HTMLElement){const I=Le(w,t);for(const S of I)ke(S,t);o(w)}}}),y.observe(document.documentElement,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["class",`data-${t}-scroll`,`data-${t}-start`,`data-${t}-end`,`data-${t}-paused`,`data-${t}-run`]}),f=()=>{h!=null&&cancelAnimationFrame(h),y&&y.disconnect()};else{let m;Le(void 0,t).length>0&&Promise.resolve().then(()=>require("./scrollDriven-DWAu7CR0.cjs")).then(b=>{m=b.initScrollViewFallback({once:n})}),f=()=>{typeof m=="function"&&m()}}return()=>{f&&f(),typeof window<"u"&&window.removeEventListener("scroll",l),d.disconnect()}}const Cn=Re,Rn=Re,De=({anchorRef:e,position:t="bottom",children:n,style:s,...r})=>{const c=`--anchor-${i.useId().replace(/:/g,"")}`,[l,d]=i.useState(!1);if(i.useLayoutEffect(()=>{typeof CSS<"u"&&CSS.supports("anchor-name","--a")&&d(!0)},[]),i.useLayoutEffect(()=>{if(l&&e.current){const f=e.current;return f.style.anchorName=c,()=>{e.current&&(e.current.style.anchorName="")}}},[l,e,c]),l){const y={position:"fixed",margin:0,zIndex:9999,positionAnchor:c,positionArea:{top:"top",bottom:"bottom",left:"left",right:"right","top-left":"top left","top-right":"top right","bottom-left":"bottom left","bottom-right":"bottom right"}[t],positionTryFallbacks:"flip-block, flip-inline",...s};return Me.createPortal(a.jsx("div",{style:y,...r,children:n}),document.body)}const o={position:"absolute",pointerEvents:"auto",...s};switch(t){case"top":o.bottom="100%",o.left="50%",o.transform="translateX(-50%)";break;case"top-left":o.bottom="100%",o.left=0;break;case"top-right":o.bottom="100%",o.right=0;break;case"bottom":o.top="100%",o.left="50%",o.transform="translateX(-50%)";break;case"bottom-left":o.top="100%",o.left=0;break;case"bottom-right":o.top="100%",o.right=0;break;case"left":o.right="100%",o.top="50%",o.transform="translateY(-50%)";break;case"right":o.left="100%",o.top="50%",o.transform="translateY(-50%)";break}return a.jsx(ot,{targetRef:e,children:a.jsx("div",{style:o,...r,children:n})})},it=({variant:e,disableTextMargins:t,disabled:n,iconPosition:s,icon:r,isActive:u,loading:c,shape:l,onToggle:d,size:o,allowShapeTransformation:f})=>({button:x(" relative cursor-pointer group/button outline-none inline-block flex justify-center items-center ",o==="xSmall"&&"text-label-large px-3 py-1.5 gap-1",o==="small"&&"text-label-large px-4 py-2.5 gap-2",o==="medium"&&"text-title-medium px-6 py-4 gap-2",o==="large"&&"text-headline-small px-12 py-8 gap-3",o==="xLarge"&&"text-headline-large px-16 py-12 gap-4",l==="rounded"&&{"rounded-[30px]":o==="xSmall"||o=="small","rounded-[40px]":o==="medium","rounded-[70px]":o==="large"||o=="xLarge"},(l==="squared"||f&&u)&&{"rounded-[12px]":o==="xSmall"||o=="small","rounded-[16px]":o==="medium","rounded-[28px]":o==="large"||o=="xLarge"},f&&!n&&{"active:rounded-[12px]":o==="xSmall"||o=="small","active:rounded-[16px]":o==="medium","active:rounded-[28px]":o==="large"||o=="xLarge"},e==="elevated"&&{"shadow-1 hover:shadow-2":!n,"bg-surface-container-low text-primary":!n&&!u,"bg-primary text-on-primary":!n&&u,"text-on-surface/[38%]":n},e==="filled"&&{"hover:shadow-1":!n,"bg-surface-container text-on-surface-variant":!n&&!u&&d,"bg-primary text-on-primary":!n&&(u&&d||!d),"text-on-surface/[38%]":n},e==="tonal"&&{"hover:shadow-1":!n,"bg-secondary-container text-on-secondary-container":!n&&!u,"bg-secondary text-on-secondary":!n&&u,"text-on-surface/[0.38]":n},e==="outlined"&&[" border",{"border-on-surface/[0.12] text-on-surface/[0.38]":n,"text-primary border-outline focus:border-primary":!n&&!u,"text-inverse-on-surface bg-inverse-surface border-inverse-surface":!n&&u}],e==="text"&&["w-fit",{"text-primary":!n,"text-on-surface/[0.38]":n},t&&[o==="xSmall"&&"-mx-3 ",o==="small"&&"-mx-4 ",o==="medium"&&"-mx-6 ",o==="large"&&"-mx-12",o==="xLarge"&&"-mx-16 "]],n&&"cursor-default"),touchTarget:x("absolute -translate-x-1/2 -translate-y-1/2 left-1/2 top-1/2 h-12 w-full"),stateLayer:x("overflow-hidden",l==="rounded"&&{"rounded-[30px]":o==="xSmall"||o=="small","rounded-[40px]":o==="medium","rounded-[70px]":o==="large"||o=="xLarge"},(l==="squared"||f&&u)&&{"rounded-[12px]":o==="xSmall"||o=="small","rounded-[16px]":o==="medium","rounded-[28px]":o==="large"||o=="xLarge"},f&&!n&&{"group-active/button:rounded-[12px]":o==="xSmall"||o=="small","group-active/button:rounded-[16px]":o==="medium","group-active/button:rounded-[28px]":o==="large"||o=="xLarge"}),label:x({invisible:c}),icon:x({invisible:c},o==="xSmall"&&"size-5",o==="small"&&"size-5",o==="medium"&&"size-6",o==="large"&&"size-8",o==="xLarge"&&"size-10")}),Dn=ne("button",it),lt=ee("button",it),at=({variant:e,isInteractive:t})=>({card:x(" rounded-xl overflow-hidden ",e==="outlined"&&"bg-surface border border-outline-variant",e==="elevated"&&"bg-surface-container-low shadow-1",e==="filled"&&"bg-surface-container-highest",{"group/card":t})}),An=ne("card",at),ct=ee("card",at),Ae=({width:e})=>({carouselItem:x("rounded-[28px] overflow-hidden flex-none",{hidden:e===void 0,"flex-1":e==null})}),Fn=ne("carouselItem",Ae),ut=ee("carouselItem",Ae),dt=()=>({carousel:x(["w-full h-[400px]"]),track:x("flex h-full w-full")}),$n=ne("carousel",dt),ft=ee("carousel",dt),ht=({isChecked:e,isIndeterminate:t,isDisabled:n,isError:s,isFocused:r,isHovered:u})=>({checkbox:x("inline-flex items-center justify-center relative size-4.5 ",{"pointer-events-none opacity-[0.38]":n}),input:x("absolute inset-0 w-full h-full opacity-0 z-10 cursor-pointer"),container:x("relative flex items-center justify-center w-[18px] h-[18px] "),box:x("absolute left-1/2 top-1/2 -translate-1/2 to rounded-[2px] size-4 border-2 transition-colors duration-200",!e&&!t&&{"border-on-surface-variant":!s&&!n,"border-error":s&&!n,"border-on-surface":n},(e||t)&&{"bg-primary border-primary":!s&&!n,"bg-error border-error":s&&!n,"bg-on-surface border-on-surface":n}),icon:x("z-10 relative text-on-primary w-full h-full flex items-center justify-center pointer-events-none",{"text-on-error":s&&!n,"text-surface":n}),stateLayer:"size-10 state-ripple-group-[checkbox] rounded-full cursor-pointer pointer-events-auto absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2"}),Pn=ne("checkbox",ht),mt=ee("checkbox",ht),pt=({variant:e,disabled:t,trailingIcon:n,icon:s,isActive:r,isInteractive:u,activated:c,isFocused:l,isDragging:d,isEditing:o})=>({chip:x(" group/chip px-3 py-1.5 rounded-lg flex items-center gap-2 outline-none",{"pl-2":s,"pr-2":n,"cursor-pointer":!t&&u},{" text-on-surface-variant":!c&&!l||o,"bg-secondary-container text-on-secondary-container":(c||l)&&!o},d&&["opacity-100 cursor-grabbing shadow-3"],e==="outlined"&&["border border-outline-variant",{"border-transparent":o}],e==="elevated"&&!o&&["shadow-1 bg-surface-container-low","border border-outline-variant"]),stateLayer:x("rounded-lg overflow-hidden",{}),label:x("outline-none text-nowrap",{"opacity-[0.38]":t}),leadingIcon:x("text-primary size-[18px]",{"opacity-[0.38]":t}),trailingIcon:x("cursor-pointer size-[18px]",{"opacity-[0.38]":t})}),Wn=ne("chip",pt),yt=ee("chip",pt),xt=({scrollable:e})=>({chips:x(" flex gap-3 outline-none",{"flex-wrap":!e,"overflow-x-auto":e})}),Tn=ne("chips",xt),vt=ee("chips",xt),gt=({orientation:e})=>({divider:x("border-outline-variant ",{"h-fit w-full border-t":e==="horizontal"},{"h-auto self-stretch w-fit border-l":e==="vertical"})}),Bn=ne("divider",gt),wt=ee("divider",gt),bt=({size:e,variant:t,extended:n})=>({fab:x("flex shadow-3 hover:shadow-4 group/fab overflow-hidden outline-none items-center cursor-pointer",{"rounded-[12px]":e=="small","rounded-[16px]":e=="medium","rounded-[28px]":e=="large"},{"p-2":e=="small","p-4":e=="medium","p-[30px]":e=="large"},t==="primary"&&"bg-primary text-on-primary",t==="secondary"&&"bg-secondary text-on-secondary",t==="tertiary"&&"bg-tertiary text-on-tertiary",t==="primaryContainer"&&"bg-primary-container text-on-primary-container",t==="secondaryContainer"&&"bg-secondary-container text-on-secondary-container",t==="tertiaryContainer"&&"bg-tertiary-container text-on-tertiary-container"),icon:x({"size-6":e=="small"||e=="medium","size-9":e=="large"}),label:x("text-nowrap",{"text-title-medium":e=="small","text-title-large":e=="medium","text-headline-small":e=="large"})}),Hn=ne("fab",bt),St=ee("fab",bt),Nt=({size:e,variant:t,open:n})=>({fabMenu:x("relative inline-flex flex-col items-end"),actions:x("flex flex-col gap-1 items-end absolute bottom-[calc(100%_+_8px)] right-0"),label:x("text-nowrap")}),On=ne("fabMenu",Nt),Et=ee("fabMenu",Nt),kt=({variant:e,disabled:t,onToggle:n,isActive:s,size:r,width:u,shape:c,allowShapeTransformation:l})=>({iconButton:x("rounded-full relative flex transition-all duration-300","group/icon-button cursor-pointer",{"cursor-default":t},c==="rounded"&&{"rounded-[30px]":r==="xSmall"||r=="small","rounded-[40px]":r==="medium","rounded-[70px]":r==="large"||r=="xLarge"},(c==="squared"||l&&s)&&{"rounded-[12px]":r==="xSmall"||r=="small","rounded-[16px]":r==="medium","rounded-[28px]":r==="large"||r=="xLarge"},l&&!t&&{"active:rounded-[12px]":r==="xSmall"||r=="small","active:rounded-[16px]":r==="medium","active:rounded-[28px]":r==="large"||r=="xLarge"},e==="filled"&&[!t&&{"bg-surface-container":!s&&!!n,"bg-primary":s||!n},!!t&&"bg-on-surface/[0.12]"],e==="tonal"&&[!t&&{"bg-secondary-container text-on-secondary-container":!s&&!!n,"bg-secondary text-on-secondary":s||!n},!!t&&"bg-on-surface/[0.12]"],e==="outlined"&&[!t&&{"border border-outline":!s,"border border-transparent bg-inverse-surface":s},!!t&&{"border border-on-surface/[0.12]":!s,"border border-transparent bg-on-surface/[0.12]":s}]),touchTarget:x("absolute -translate-x-1/2 -translate-y-1/2 left-1/2 top-1/2 h-12 w-full"),stateLayer:x("absolute top-0 left-0 h-full w-full overflow-hidden",(c==="rounded"||c==="squared"&&n&&!t&&s&&l)&&{"rounded-[30px]":r==="xSmall"||r=="small","rounded-[40px]":r==="medium","rounded-[70px]":r==="large"||r=="xLarge"},(c==="squared"||c==="rounded"&&n&&!t&&s&&l)&&{"rounded-[12px]":r==="xSmall"||r=="small","rounded-[16px]":r==="medium","rounded-[28px]":r==="large"||r=="xLarge"},l&&!t&&{"group-active/icon-button:rounded-[12px]":r==="xSmall"||r=="small","group-active/icon-button:rounded-[16px]":r==="medium","group-active/icon-button:rounded-[28px]":r==="large"||r=="xLarge"},!t&&[e==="standard"&&{"state-on-surface-variant":!s,"state-primary":s},e==="filled"&&{"state-primary":!s&&!!n,"state-inverse-on-surface":s||!n},e==="tonal"&&{"state-on-surface-variant":!s&&!!n,"state-on-secondary-container":s||!n},e==="outlined"&&{"state-on-surface-variant":!s,"state-on-primary":s}]),icon:x(" transition-all duration-300",{"size-5 p-1.5":r==="xSmall"},{"size-6 p-2":r==="small"},{"size-6 p-4":r==="medium"},{"size-8 p-8":r==="large"},{"size-10 p-12":r==="xLarge"},u=="narrow"&&[{"px-1":r==="xSmall"},{"px-1":r==="small"},{"px-3":r==="medium"},{"px-4":r==="large"},{"px-8":r==="xLarge"}],u=="wide"&&[{"px-2.5":r==="xSmall"},{"px-3.5":r==="small"},{"px-6":r==="medium"},{"px-12":r==="large"},{"px-[72px]":r==="xLarge"}],!t&&[e==="standard"&&{"text-on-surface-variant":!s,"text-primary":s},e==="filled"&&{"text-primary":!s&&!!n,"text-on-primary":s||!n},e==="outlined"&&{"text-on-surface-variant":!s,"text-inverse-on-surface":s}],!!t&&"text-on-surface/[0.38]")}),Vn=ne("iconButton",kt),Lt=ee("iconButton",kt),jt=({variant:e,isVisible:t})=>({progressIndicator:x((e==="linear-determinate"||e=="linear-indeterminate")&&"flex w-full h-1"),track:x("h-full rounded-full bg-primary rounded-l-full",{"max-h-0":!t,"max-h-full":t}),activeIndicator:x({"max-h-0":!t,"max-h-full":t},(e==="linear-determinate"||e=="linear-indeterminate")&&"h-full flex-1 rounded-full bg-primary-container",(e==="circular-determinate"||e=="circular-indeterminate")&&["stroke-primary fill-transparent ",{"stroke-[4px]":t,"stroke-[0px]":!t}]),stop:x("absolute top-1/2 -translate-y-1/2 right-0 bg-primary rounded-full size-1",{"max-h-0":!t,"max-h-full":t})}),zn=ne("progressIndicator",jt),It=ee("progressIndicator",jt),Fe=({variant:e,position:t})=>({sideSheet:x("bg-surface flex justify-between max-w-xs z-10",{"flex-row-reverse":t=="right","h-full":e=="standard"},e=="modal"&&["rounded-2xl fixed top-0 m-[1rem] h-[calc(100dvh-2rem)]",{"right-0":t=="right","left-0":t=="left"}]),container:x("w-full overflow-hidden flex flex-col",{}),header:x("p-4 flex items-center gap-2"),content:x("flex-1 overflow-y-auto"),title:x("text-on-surface-variant text-title-large"),closeButton:x("ml-auto"),divider:x({hidden:e=="modal"}),overlay:x("bg-[black]/[0.32] fixed top-0 left-0 w-screen h-screen")}),Mt=ne("sideSheet",Fe),Yn=ee("sideSheet",Fe),$e=({isChanging:e})=>({slider:x(["relative w-full h-11 flex items-center rounded gap-x-1.5 cursor-pointer min-w-32"]),activeTrack:x(["h-4 relative transition-all duration-100 bg-primary overflow-hidden rounded-l-full "]),inactiveTrack:x(["h-4 relative transition-all duration-100 bg-primary-container rounded-r-full overflow-hidden"]),handle:x(["transform relative transition-all duration-100 bg-primary h-full rounded-full ",{"w-0.5":e,"w-1":!e}]),valueIndicator:x(["absolute select-none bg-inverse-surface text-inverse-on-surface py-3 px-4 text-label-large rounded-full bottom-[calc(100%+4px)] transform left-1/2 -translate-x-1/2"]),dot:x(["h-1 w-1 absolute transform -translate-y-1/2 -translate-x-1/2 top-1/2 rounded-full"])}),_n=ne("slider",$e),Ct=ee("slider",$e),Rt=()=>({snackbar:x(" rounded bg-inverse-surface "),container:x("pl-4 pr-2 max-w-full py-1 flex items-center flex-wrap"),supportingText:x("text-body-medium text-inverse-on-surface "),icon:x(" ml-auto mr-0 text-inverse-on-surface block dark")}),qn=ne("snackbar",Rt),Dt=ee("snackbar",Rt),At=({isSelected:e,disabled:t,inactiveIcon:n})=>({switch:x("group/switch w-[52px] h-[32px] outline-none rounded-full border-2 flex items-center",{"bg-on-surface/[0.12] border-transparent":t},!t&&["cursor-pointer ",{"bg-primary border-primary":e},{"bg-surface-container border-outline":!e}]),handleContainer:x("flex items-center justify-center absolute",{"left-[14px]":!e},{"right-[14px]":e}),handle:x("transition-all duration-100 z-10 rounded-full flex items-center justify-center",{"w-[16px] h-[16px]":!e&&!n},{"w-[24px] h-[24px]":!(!e&&!n)},!t&&["cursor-pointer group-active/switch:h-[28px] group-active/switch:w-[28px]",{"bg-on-primary group-hover/switch:bg-primary-container":e},{"bg-outline group-hover/switch:bg-on-surface-variant":!e}],{"bg-surface":t}),handleStateLayer:x("w-[40px] h-[40px] -z-10 rounded-full absolute",{"group-state-primary":!t}),icon:x("w-[16px] h-[16px]",!t&&[{"text-on-primary-container":e},{"text-on-primary":!e}],{"text-on-surface/[0.38]":t})}),Xn=ne("switch",At),Ft=ee("switch",At),$t=({isSelected:e,icon:t,label:n,variant:s})=>({tab:x("flex-1 group/tab outline-none flex px-4 justify-center items-center cursor-pointer",{"z-10":e},!!(t&&n)&&s==="primary"&&"h-16",!(t&&n&&s==="primary")&&"h-12"),stateLayer:x("absolute w-full h-full overflow-hidden left-1/2 top-1/2 transform -translate-y-1/2 -translate-x-1/2",s==="primary"&&{"group-hover/tab:hover-state-on-surface group-focus-visible/tab:focus-state-on-surface":!e,"group-hover/tab:hover-state-primary group-focus-visible/tab:focus-state-primary":e},s==="secondary"&&"group-hover/tab:hover-state-on-surface group-focus-visible/tab:focus-state-on-surface"),content:x("flex gap-0.5 h-full justify-center",{relative:s=="primary"},{"":!!(n&&!t)},s==="primary"&&"flex-col items-center",s==="secondary"&&{"flex-col items-center":!(n&&t),"flex-row items-center gap-2":!!(n&&t)}),icon:x("h-6 w-6 p-0.5 !box-border",s==="primary"&&{"text-on-surface-variant":!e,"text-primary":e},s==="secondary"&&{"text-on-surface-variant":!e,"text-on-surface":e}),label:x("text-title-small text-nowrap",s==="primary"&&{"text-on-surface-variant":!e,"text-primary":e},s==="secondary"&&{"text-on-surface-variant":!e,"text-on-surface":e}),underline:x("bg-primary absolute w-full left-0 bottom-0",s==="primary"&&"h-[3px] rounded-t",s==="secondary"&&"h-0.5")}),Un=ne("tab",$t),Pt=ee("tab",$t),Wt=({scrollable:e})=>({tabs:x("border-b border-surface-container-highest bg-surface","flex relative ",{"overflow-x-auto":e})}),Kn=ne("tabs",Wt),Tt=ee("tabs",Wt),Bt=()=>({tabPanels:x("overflow-hidden")}),Gn=ne("tabPanels",Bt),Ht=ee("tabPanels",Bt),Ot=()=>({tabPanel:x("")}),Jn=ne("tabPanel",Ot),Vt=ee("tabPanel",Ot),zt=({disabled:e,leadingIcon:t,trailingIcon:n,variant:s,errorText:r,isFocused:u,value:c,suffix:l,multiline:d})=>({textField:x({"opacity-[.38]":e}),content:x("group/text-field transition-border duration-200 relative flex items-center ",{"h-14":!d},{"border-on-surface-variant":!(r!=null&&r.length)&&!u&&s=="filled","border-outline":!(r!=null&&r.length)&&!u&&s=="outlined","border-primary":!(r!=null&&r.length)&&u,"border-error":!!(r!=null&&r.length)},{"bg-on-surface/[0.04]":e},s=="filled"&&["rounded-t overflow-hidden border-b",{"bg-surface-container-highest":!e}],s=="outlined"&&["border rounded box-border",{"border-[3px]":u}]),stateLayer:x("absolute -z-10 w-full h-full top-0 left-0",{hidden:s=="outlined"},{"group-state-on-surface":!e,"focus-state-on-surface":u}),label:x("inline-flex outline-none whitespace-nowrap",{"text-on-surface-variant":!e&&!(r!=null&&r.length)},{"text-on-surface":e},{"text-error":!!(r!=null&&r.length)},{"text-primary":!(r!=null&&r.length)&&u}),input:x("w-full resize-none px-4 text-body-large bg-[inherit] outline-none autofill:transition-colors autofill:duration-[5000000ms]",{" text-on-surface placeholder:text-on-surface-variant":!e,"placeholder:text-on-surface text-on-surface":e},{"pr-0":!!l},s=="filled"&&" pb-2 pt-6",s=="outlined"&&"py-4 relative z-10"),activeIndicator:x("absolute w-0 inset-x-0 border-rounded mx-auto bottom-0",s=="filled"&&["h-[2px] transition-all duration-300",{"bg-primary":!(r!=null&&r.length)},{"bg-error":!!(r!=null&&r.length)},{"!w-full":u}]),supportingText:x(" text-body-small px-4 pt-1",{"text-on-surface-variant":!e&&!(r!=null&&r.length)},{"text-on-surface":e},{"!w-full":u},{"text-error":!!(r!=null&&r.length)}),leadingIcon:x(["h-12 ml-3 flex items-center justify-center",{"cursor-text":!i.isValidElement(t)}]),trailingIcon:x("h-12 w-12 flex items-center justify-center",{"cursor-text":!i.isValidElement(n)}),suffix:x("text-on-surface-variant pl-0 pr-4",s=="filled"&&" pb-2 pt-6",s=="outlined"&&"py-4 relative z-10")}),Zn=ne("textField",zt),Yt=ee("textField",zt),_t=({position:e,variant:t})=>({toolTip:x(" pointer-events-auto w-max z-10 absolute m-1 w-max-content max-w-[312px]",t=="rich"&&"bg-surface-container rounded-2xl text-on-surface-container shadow-2",t=="plain"&&"bg-inverse-surface rounded text-inverse-on-surface ",{"bottom-full left-1/2 -translate-x-1/2":e=="top","top-full left-1/2 -translate-x-1/2":e=="bottom","right-full top-1/2 -translate-y-1/2":e=="left","left-full top-1/2 -translate-y-1/2":e=="right","bottom-full right-full":e=="top-left","bottom-full left-full":e=="top-right","top-full right-full":e=="bottom-left","top-full left-full":e=="bottom-right"}),container:x("pb-2",t=="rich"&&"px-4 pt-3 ",t=="plain"&&"px-2 py-1"),actions:x("flex gap-10 px-1 mt-2",t=="plain"&&"hidden"),subHead:x("text-title-small mb-1",t=="plain"&&"hidden"),supportingText:x(""),content:x("w-full")}),Qn=ne("toolTip",_t),qt=ee("toolTip",_t),ae=({icon:e,colors:t=[],className:n,...s})=>{if(typeof e=="string"){let f=e;return t[0]&&(f=f.replace(/<svg([^>]*)>/,`<svg$1 fill="${t[0]}" color="${t[0]}">`),f=f.replace(/<path([^>]*?)>/g,'<path$1 fill="currentColor">')),a.jsx("div",{className:x("size-5 box-content inline-flex fill-current",n),style:{color:t[0]||"inherit"},dangerouslySetInnerHTML:{__html:f}})}if(e&&typeof e=="object"&&"src"in e){const f=e;return a.jsx("img",{src:f.src,width:f.width,height:f.height,className:x("size-5 box-content",n),style:{filter:t[0]?"brightness(0) saturate(100%) invert(1)":void 0},alt:"","aria-hidden":"true"})}const r=e;if(!(r!=null&&r.prefix))throw new Error(`Invalid icon type: ${typeof e}`);const{icon:u}=r,[c,l,,,d]=u||[],o=f=>{switch(f.length){case 2:return{"--fa-primary-color":f[0]||"inherit","--fa-secondary-color":f[1]||"inherit"};case 1:return{color:f[0]};default:return{}}};return a.jsx("svg",{className:x("size-5 box-content",n),style:{...o(t)},xmlns:"http://www.w3.org/2000/svg",viewBox:`0 0 ${c} ${l}`,role:"img","aria-hidden":"true",...s,children:typeof d=="string"?a.jsx("path",{className:"fill-current",d}):d.map((f,y)=>a.jsx("path",{d:f},y))})},Xt=({variant:e="linear-determinate",value:t=0,transitionDuration:n=1e3,className:s,...r})=>{const[u,c]=i.useState(t),[l]=i.useState(1.5);i.useEffect(()=>{t>100&&(t=100),t<0&&(t=0),c(t)},[t]);const[d,o]=i.useState(!0),f=()=>d?l:l*.5;i.useEffect(()=>{if((e==="circular-indeterminate"||e==="linear-indeterminate")&&u!==100){const p=setInterval(()=>{c(d?10:90),o(!d)},f()*1e3);return()=>clearInterval(p)}},[e,d,u]);const[y,h]=i.useState(!1);i.useEffect(()=>{if(u>=100){const p=setTimeout(()=>{h(!1)},n);return()=>{clearTimeout(p)}}else h(!0)},[u,n]);const m=It({className:s,variant:e,value:t,transitionDuration:n,isVisible:y});return a.jsxs(a.Fragment,{children:[(e==="linear-determinate"||e=="linear-indeterminate")&&a.jsxs("div",{className:m.progressIndicator,...r,children:[a.jsx("div",{style:{width:`${u}%`,transition:`width ${n}ms ease-in-out ${u==100?", max-height 200ms 0.5s ease-in-out":""}`},className:m.track}),a.jsx("div",{style:{marginLeft:u!=100?"6px":"0px",transition:`width ${n}ms ease-in-out ${u==100?`, max-height 200ms 0.5s ease-in-out, margin-left ${n}ms ${n/1.5}ms`:""}`},className:m.activeIndicator}),a.jsx("div",{style:{width:"4 px",transition:`width ${n}ms ease-in-out, max-height 200ms 0.5s ease-in-out`},className:m.stop})]}),(e==="circular-determinate"||e=="circular-indeterminate")&&a.jsx(X.motion.svg,{width:"48",height:"48",viewBox:"0 0 48 48",initial:{rotate:-90},animate:{rotate:270},transition:{repeat:1/0,duration:f(),ease:"linear"},className:m.progressIndicator,...r,children:a.jsx(X.motion.circle,{cx:"50%",cy:"50%",r:y?"calc(50% - 2px)":"50%",style:{strokeLinecap:"round"},initial:"hidden",animate:"visible",className:m.activeIndicator,variants:{hidden:{pathLength:d?10/100:90/100},visible:{pathLength:d?90/100:10/100}},transition:{pathLength:{type:"tween",ease:"linear",duration:f(),bounce:0}}})},d+"")]})};function es(e){const t={primary:"filled",secondary:"tonal"};return e&&e in t?t[e]:e||"filled"}const me=({variant:e="filled",disabled:t=!1,icon:n,href:s,label:r,disableTextMargins:u,className:c,iconPosition:l="left",loading:d=!1,shape:o="rounded",onClick:f,onToggle:y,activated:h,ref:m,size:p="medium",allowShapeTransformation:b=!0,transition:w,children:I,...S})=>{if(I&&(r=I),!r)throw new Error("Button component requires either a label prop or children content");e=es(e);const g=s?"a":"button",B=i.useRef(null),$=m||B,[v,k]=i.useState(h);i.useEffect(()=>{k(h)},[h]),w={duration:.3,...w};const F=M=>{t&&M.preventDefault(),y?(k(!v),y(!v)):f&&f(M)},j=lt({allowShapeTransformation:b,size:p,disableTextMargins:u,shape:o,href:s,disabled:t,icon:n,iconPosition:l,loading:d,variant:e,transition:w,className:c,isActive:v??!1,onToggle:y,activated:v,label:r,children:r}),P=n?a.jsx(ae,{icon:n,className:j.icon}):a.jsx(a.Fragment,{});return a.jsxs(g,{ref:$,href:s,className:j.button,...S,onClick:F,disabled:t,"aria-pressed":y?v:void 0,style:{transition:w.duration+"s"},children:[a.jsx("div",{className:j.touchTarget}),a.jsx(de,{style:{transition:w.duration+"s"},className:j.stateLayer,colorName:x(e==="filled"&&{"on-surface-variant":!v&&!!y,"on-primary":v||!y},e==="elevated"&&{"on-primary":v&&!!y,primary:!v||!y},e==="tonal"&&{"on-secondary":v&&!!y,"on-secondary-container":!v||!y},e==="outlined"&&{"inverse-on-surface":v&&!!y,"on-surface-variant":!v||!y},e==="text"&&"primary"),stateClassName:"state-ripple-group-[button]"}),l==="left"&&P,d&&a.jsx("div",{className:"!absolute left-1/2 -translate-x-1/2 top-1/2 -translate-y-1/2",children:a.jsx(Xt,{className:()=>({progressIndicator:"h-6 w-6",activeIndicator:x({"!stroke-primary":e==="elevated"&&!t,"!stroke-on-surface/[38%]":e==="elevated"&&t},{"!stroke-on-primary":e==="filled"&&!t,"!stroke-on-surface/[38%]":e==="filled"&&t},{"!stroke-on-secondary-container":e==="tonal"&&!t,"!stroke-on-surface/[38%]":e==="tonal"&&t},{"!stroke-primary":e==="outlined"&&!t,"!stroke-on-surface/[38%]":e==="outlined"&&t},{"!stroke-primary":e==="text"&&!t,"!stroke-on-surface/[38%]":e==="text"&&t})}),variant:"circular-indeterminate"})}),a.jsx("span",{className:j.label,children:r}),l==="right"&&P]})},ts=({variant:e="outlined",className:t,children:n,interactive:s=!1,ref:r,...u})=>{const c=ct({className:t,isInteractive:s,variant:e,children:n}),l=i.useRef(null),d=r||l;return a.jsxs("div",{...u,ref:d,className:c.card,children:[s&&a.jsx(de,{className:c.stateLayer,colorName:"on-surface",stateClassName:"state-ripple-group-[card]"}),n]})},xe=(e,t,n=[0,1])=>{const[s,r]=t,[u,c]=n,d=(Math.max(s,Math.min(e,r))-s)/(r-s);return u+d*(c-u)},Ut=({className:e,children:t,width:n,index:s=0,outputRange:r,ref:u,...c})=>{const l=i.useRef(null),d=u||l,o=ut({className:e,index:s,width:n,children:t,outputRange:r});return a.jsx("div",{ref:d,style:{width:n+"px",maxWidth:r[1]+"px",minWidth:r[0]+"px",willChange:"width"},transition:{duration:.5,ease:"linear"},className:o.carouselItem,...c,children:t})},ns=({variant:e="hero",className:t,children:n,ref:s,marginPourcent:r=0,inputRange:u=[.21,.65],outputRange:c=[42,300],gap:l=8,onChange:d,onMetricsChange:o,index:f,scrollSensitivity:y=1.25,...h})=>{const m=i.useRef(null),p=s||m,[b,w]=i.useState(0),I=ft({index:f,className:t,children:n,variant:e,inputRange:u,outputRange:c,marginPourcent:r,onChange:d,gap:l,scrollSensitivity:y,onMetricsChange:o}),S=i.Children.toArray(n).filter(N=>i.isValidElement(N)&&N.type===Ut),g=i.useRef(null),[B,$]=i.useState({}),[v,k]=i.useState(null),F=i.useRef(0),j=i.useRef(null),P=()=>{var ue,ce;if(!g.current||!p.current||(v==null?void 0:v.scrollProgress)===void 0)return[];const N=(v==null?void 0:v.scrollVisible)??((ue=p.current)==null?void 0:ue.clientWidth)??0;function A(K,J){return K.map((re,pe)=>{const ye=(re-J)/Math.abs(K[1]-K[0]);return{itemScrollXCenter:re,relativeIndex:ye,index:pe,width:0}})}const O=S.map((K,J)=>{if(!M[J].current||!g.current)return 0;const pe=J/(S.length-1);return xe(pe,[0,1],[0,1])}),_=A(O,(v==null?void 0:v.scrollProgress)??0).sort((K,J)=>K.index-J.index);let z=(((ce=p.current)==null?void 0:ce.clientWidth)??N)+l+c[0]+l;const Z=_.sort((K,J)=>Math.abs(K.relativeIndex)-Math.abs(J.relativeIndex)).map((K,J)=>{if(!(z<=0)){if(J==0&&V(K.index),K.width=xe(z-l,[c[0],c[1]],[c[0],c[1]]),z-=K.width+l,z!=0&&z<(c[0]+l)*2){const re=K.width-((c[0]+l)*2-z);z+=K.width,K.width=re,z-=K.width}else if(z==0&&K.width>=c[0]*2+l){const re=K.width-(c[0]+l-z);z+=K.width,K.width=re,z-=K.width}return K}}).filter(Boolean),D=Z.reverse(),Y=[...Z].sort((K,J)=>Math.abs(K.index)-Math.abs(J.index));D.forEach((K,J)=>{const re=D[J+1];if(!re)return;const pe=1-(Math.abs(K.relativeIndex)-Math.abs(re==null?void 0:re.relativeIndex)),ye=xe(pe,[0,2],[K.width+z,re.width]);z+=K.width,K.width=ye,z-=K.width});const se=Z.length/2,ie=xe(Math.abs(Y[0].relativeIndex),[Y[0].index==0?0:se-1,se],[0,1]),ge=xe(ie,[0,1],[0,1])*-(c[0]+l);return w(ge),Object.fromEntries(Z.map(K=>[K.index,K.width]))},M=i.useRef([]).current,[q,V]=i.useState(0);i.useEffect(()=>{d&&d(q)},[q]),i.useEffect(()=>{typeof f=="number"&&S.length>0&&f!==q&&C(f)},[f,S.length]),i.useEffect(()=>{W(q)},[q]),M.length!==S.length&&S.forEach((N,A)=>{M[A]||(M[A]=i.createRef())});const[Q,W]=i.useState(0),C=(N,A={})=>{if(!S.length)return 0;const O=M[N];if(!O||!O.current||!g.current)return 0;const _=xe(N/Math.max(1,S.length-1),[0,1],[0,1]);return W(N),g.current.dispatchEvent(new CustomEvent("udx:customScroll:set",{bubbles:!0,detail:{progress:_,orientation:"horizontal",animate:A.animate!==!1}})),_},R=S.map((N,A)=>{var Z;const O=(Z=N.props)==null?void 0:Z.onClick,_=D=>{O==null||O(D)},z=()=>W(A);return i.cloneElement(N,{width:B[A],outputRange:c,ref:M[A],key:A,index:A,role:"option","aria-selected":q===A,tabIndex:q===A?0:-1,onClick:_,onFocus:z})}),H=N=>{var A;if(N.scrollTotal>0){(A=j.current)==null||A.stop();const O=F.current??0,_=N.scrollProgress??0;j.current=X.animate(O,_,{type:"spring",stiffness:260,damping:32,mass:.6,restDelta:5e-4,onUpdate:z=>{F.current=z,k({...N,scrollProgress:z})}})}};i.useEffect(()=>{const N=P();$(N)},[v]);const U=i.useRef(o);i.useEffect(()=>{U.current=o},[o]);const G=i.useRef(null);i.useEffect(()=>{var J;const N=U.current;if(!N||!(p!=null&&p.current))return;const A=S.length;if(A<=0)return;const O=((J=p.current)==null?void 0:J.clientWidth)??0,_=c[1],z=F.current??(v==null?void 0:v.scrollProgress)??0,Z=(O+l)/(_+l),D=Math.max(1,Math.floor(Z)),Y=Math.max(1,Math.round(D*(2/3))),se=Math.min(Math.max(0,q),Math.max(0,A-1)),ie=se>0,ge=se<A-1,ue={total:A,selectedIndex:se,visibleApprox:Z,visibleFull:D,stepHalf:Y,canPrev:ie,canNext:ge,scrollProgress:z,viewportWidth:O,itemMaxWidth:_,gap:l},ce=G.current;let K=!ce;if(!K){for(const re in ue)if(ue[re]!==ce[re]){K=!0;break}}K&&(G.current=ue,N(ue))},[p,S.length,q,v,l,c]),i.useEffect(()=>()=>{var N;(N=j.current)==null||N.stop()},[]);const[te,E]=i.useState(0);i.useLayoutEffect(()=>{let N=c[1];v&&N>v.scrollVisible&&(N=v.scrollVisible);const A=(N+l)*R.length/y;E(A)},[p,M,v]);const L=N=>{if(!S.length)return;const A=Q??q;switch(N.key){case"ArrowLeft":N.preventDefault(),C(Math.max(0,A-1));break;case"ArrowRight":N.preventDefault(),C(Math.min(S.length-1,A+1));break;case"Home":N.preventDefault(),C(0);break;case"End":N.preventDefault(),C(S.length-1);break;case"Enter":case" ":N.preventDefault(),C(A);break}};return i.useEffect(()=>{const N=p.current;if(!N)return;const A=O=>{const _=O.detail;_&&typeof _.index=="number"&&C(_.index)};return N.addEventListener("udx:carousel:centerIndex",A),()=>{N.removeEventListener("udx:carousel:centerIndex",A)}},[p,S.length]),a.jsx("div",{className:I.carousel,ref:p,role:"listbox","aria-orientation":"horizontal",onKeyDown:L,...h,children:a.jsx(tt,{draggable:!0,orientation:"horizontal",onScroll:H,scrollSize:te,children:a.jsx("div",{className:I.track,ref:g,style:{gap:`${l}px`,translate:b,willChange:"translate"},children:R})})})};/*!
2
2
  * Font Awesome Free 7.1.0 by @fontawesome - https://fontawesome.com
3
3
  * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
4
4
  * Copyright 2025 Fonticons, Inc.
5
- */var ts={prefix:"fas",iconName:"minus",icon:[448,512,[8211,8722,10134,"subtract"],"f068","M0 256c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 288c-17.7 0-32-14.3-32-32z"]},ns={prefix:"fas",iconName:"calendar-days",icon:[448,512,["calendar-alt"],"f073","M128 0c17.7 0 32 14.3 32 32l0 32 128 0 0-32c0-17.7 14.3-32 32-32s32 14.3 32 32l0 32 32 0c35.3 0 64 28.7 64 64l0 288c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64L0 128C0 92.7 28.7 64 64 64l32 0 0-32c0-17.7 14.3-32 32-32zM64 240l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16zm128 0l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16zm144-16c-8.8 0-16 7.2-16 16l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0zM64 368l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16zm144-16c-8.8 0-16 7.2-16 16l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0zm112 16l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16z"]},ss={prefix:"fas",iconName:"chevron-right",icon:[320,512,[9002],"f054","M311.1 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L243.2 256 73.9 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z"]},rs={prefix:"fas",iconName:"circle-exclamation",icon:[512,512,["exclamation-circle"],"f06a","M256 512a256 256 0 1 1 0-512 256 256 0 1 1 0 512zm0-192a32 32 0 1 0 0 64 32 32 0 1 0 0-64zm0-192c-18.2 0-32.7 15.5-31.4 33.7l7.4 104c.9 12.6 11.4 22.3 23.9 22.3 12.6 0 23-9.7 23.9-22.3l7.4-104c1.3-18.2-13.1-33.7-31.4-33.7z"]},Ut={prefix:"fas",iconName:"check",icon:[448,512,[10003,10004],"f00c","M434.8 70.1c14.3 10.4 17.5 30.4 7.1 44.7l-256 352c-5.5 7.6-14 12.3-23.4 13.1s-18.5-2.7-25.1-9.3l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l101.5 101.5 234-321.7c10.4-14.3 30.4-17.5 44.7-7.1z"]},be={prefix:"fas",iconName:"xmark",icon:[384,512,[128473,10005,10006,10060,215,"close","multiply","remove","times"],"f00d","M55.1 73.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L147.2 256 9.9 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192.5 301.3 329.9 438.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.8 256 375.1 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192.5 210.7 55.1 73.4z"]},os=be,is={prefix:"fas",iconName:"chevron-down",icon:[448,512,[],"f078","M201.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 338.7 54.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"]},ls={prefix:"fas",iconName:"chevron-left",icon:[320,512,[9001],"f053","M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l192 192c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256 246.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-192 192z"]},as={prefix:"fas",iconName:"bars",icon:[448,512,["navicon"],"f0c9","M0 96C0 78.3 14.3 64 32 64l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 128C14.3 128 0 113.7 0 96zM0 256c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 288c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32L32 448c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"]};const cs=({checked:t,defaultChecked:n,indeterminate:s=!1,disabled:o=!1,error:r=!1,onChange:d,id:u,name:a,value:f,style:i,className:h,...x})=>{const m=l.useId(),y=u||m,p=t!==void 0,[N,b]=l.useState(n??!1),M=p?t:N,[S,w]=l.useState(!1),O=l.useRef(null);l.useEffect(()=>{O.current&&(O.current.indeterminate=s)},[s]);const A=E=>{o||(p||b(E.target.checked),d&&d(E))},v=ht({isChecked:!!M,isIndeterminate:s,isDisabled:o,isError:r,isFocused:S,isHovered:!1});return c.jsx("div",{className:g(v.checkbox,h,"group/checkbox"),style:i,children:c.jsxs(fe,{stateClassName:v.stateLayer,colorName:M||s?"primary":"on-surface",children:[c.jsx("input",{ref:O,type:"checkbox",id:y,name:a,value:f,checked:M,disabled:o,onChange:A,onFocus:()=>w(!0),onBlur:()=>w(!1),className:v.input,...x}),c.jsx("div",{className:v.box}),c.jsx(U.AnimatePresence,{children:(M||s)&&c.jsx(U.motion.div,{initial:{opacity:0,scale:.5},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.5},transition:{duration:.15},className:v.icon,children:c.jsx(ue,{icon:s?ts:Ut,className:"size-3.5"})})})]})})},Ie=({variant:t="outlined",disabled:n=!1,icon:s,href:o,label:r,className:d,onClick:u,onToggle:a,activated:f,ref:i,onRemove:h,editable:x,onEditStart:m,onEditCommit:y,onEditCancel:p,onChange:N,transition:b,children:M,editing:S,...w})=>{if(M&&(r=M),r===void 0&&!x)throw new Error("Chip component requires either a label prop or children content");const O=o?"a":"button",A=l.useRef(null),v=i||A,[E,$]=l.useState(f),[I,P]=l.useState(!1),[C,_]=l.useState(S&&x),[T,Z]=l.useState(!1),[H,R]=l.useState(typeof r=="string"?r:""),F=l.useRef(null);l.useEffect(()=>{$(f)},[f]),l.useEffect(()=>{if(S&&_(S),x&&I){const W=setTimeout(()=>{w!=null&&w.draggable&&T||_(!0)},1e3);return()=>clearTimeout(W)}else I||_(!1)},[I,x,T,w,H]),l.useEffect(()=>{if(C){R(typeof r=="string"?r:"");const W=X.current||F.current;if(W){W.focus();const q=document.createRange();q.selectNodeContents(W),q.collapse(!1);const se=window.getSelection();se==null||se.removeAllRanges(),se==null||se.addRange(q)}}},[C]),b={duration:.3,...b};const V=W=>{n&&W.preventDefault(),a?($(!E),a(!E)):u&&u(W)},G=!!a||!!h||!!u||!!o||!!x;f&&(s=Ut);const{onFocus:J,onBlur:te,onKeyDown:k,onDragStart:j,onDragEnd:L,onDoubleClick:D,...z}=w??{},Y=pt({href:o,disabled:n,icon:s,variant:t,transition:b,className:d,isActive:E??!1,onToggle:a,activated:E,label:r,isInteractive:G,children:r,isFocused:I,isDragging:T,onEditCommit:y,isEditing:C}),X=l.useRef(null),Q=()=>{const W=(H??"").trim();if(!W){h&&h();return}y==null||y(W)};return c.jsxs(O,{contentEditable:!1,ref:v,href:o,className:Y.chip,...z,onClick:W=>{C||V(W)},draggable:!n&&!!(w!=null&&w.draggable),onDragStart:W=>{!n&&(w!=null&&w.draggable)&&Z(!0),j==null||j(W)},onDragEnd:W=>{w!=null&&w.draggable&&Z(!1),L==null||L(W)},onDoubleClick:W=>{!n&&x&&!C&&(m==null||m(),W.preventDefault(),W.stopPropagation()),D==null||D(W)},onFocus:W=>{G&&P(!0),J==null||J(W)},onBlur:W=>{P(!1),te==null||te(W)},onKeyDown:W=>{const q=W.key;if(!n&&C){q==="Enter"?(W.preventDefault(),Q()):q==="Escape"?(W.preventDefault(),p==null||p()):h&&(H==null?void 0:H.trim())===""&&(q==="Backspace"||q==="Delete"||q==="Del")&&(W.preventDefault(),W.stopPropagation(),h());return}if(!n&&I){if(x&&!a&&(q==="F2"||q==="Enter")){W.preventDefault(),m==null||m();return}if(a&&(q==="Enter"||q===" "||q==="Spacebar")){W.preventDefault();const se=!E;$(se),a(se)}h&&(q==="Backspace"||q==="Delete"||q==="Del")&&(W.preventDefault(),W.stopPropagation(),h())}k==null||k(W)},disabled:n,"aria-pressed":a?E:void 0,style:{transition:b.duration+"s"},children:[G&&!n&&!C&&c.jsx(fe,{style:{transition:b.duration+"s"},className:Y.stateLayer,colorName:g({"on-surface-variant":!E,"on-secondary-container":E}),stateClassName:"state-ripple-group-[chip]"}),s&&c.jsx(ue,{icon:s,className:Y.leadingIcon}),c.jsx("span",{ref:X,contentEditable:!!x&&!!C,suppressContentEditableWarning:!0,className:Y.label,role:x?"textbox":void 0,spellCheck:!1,onInput:W=>{const q=W.currentTarget.innerText;R(q),N==null||N(q)},onBlur:W=>{x&&C&&Q()},onKeyDown:W=>{if(x&&C&&W.key==="Enter"){W.preventDefault(),W.stopPropagation(),Q();return}x&&C&&W.key==="Escape"&&(W.preventDefault(),W.stopPropagation(),p==null||p())},children:r}),h&&!C&&c.jsx(ue,{icon:be,className:Y.trailingIcon,onMouseDown:W=>{W.preventDefault(),W.stopPropagation()},onClick:W=>{W.stopPropagation(),n||h()}})]})},We=({orientation:t="horizontal",className:n,...s})=>{const o=vt({orientation:t,className:n});return c.jsx("hr",{className:o.divider,...s})},ce=[];for(let t=0;t<256;++t)ce.push((t+256).toString(16).slice(1));function us(t,n=0){return(ce[t[n+0]]+ce[t[n+1]]+ce[t[n+2]]+ce[t[n+3]]+"-"+ce[t[n+4]]+ce[t[n+5]]+"-"+ce[t[n+6]]+ce[t[n+7]]+"-"+ce[t[n+8]]+ce[t[n+9]]+"-"+ce[t[n+10]]+ce[t[n+11]]+ce[t[n+12]]+ce[t[n+13]]+ce[t[n+14]]+ce[t[n+15]]).toLowerCase()}let je;const ds=new Uint8Array(16);function fs(){if(!je){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");je=crypto.getRandomValues.bind(crypto)}return je(ds)}const hs=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Xe={randomUUID:hs};function Kt(t,n,s){var r;if(Xe.randomUUID&&!t)return Xe.randomUUID();t=t||{};const o=t.random??((r=t.rng)==null?void 0:r.call(t))??fs();if(o.length<16)throw new Error("Random bytes length must be >= 16");return o[6]=o[6]&15|64,o[8]=o[8]&63|128,us(o)}const ms=({variant:t="input",className:n,scrollable:s=!0,draggable:o=!1,items:r,onItemsChange:d})=>{const u=r??[],a=l.useRef(null),[f,i]=l.useState(!1),h=l.useRef(new WeakMap),x=l.useCallback(v=>{const E=h.current;let $=E.get(v);return $||($=Kt(),E.set(v,$)),$},[]);l.useEffect(()=>{var v,E;f&&(t=="input"?(v=O.current)==null||v.focus():(E=a.current)==null||E.focus())},[f]);const m=l.useRef([]),y=l.useRef(!1),p=l.useCallback(v=>{d==null||d(v(u))},[d,u]),N=l.useCallback(v=>{p(E=>E.filter(($,I)=>I!==v))},[p]),b=xt({scrollable:s,className:n,variant:t}),M=l.useCallback((v="")=>{if(t!=="input"||y.current)return;y.current=!0;const E={label:v},$=x(E),I=[...u,E];d==null||d(I),requestAnimationFrame(()=>{w($),y.current=!1})},[t,d,u,x]),[S,w]=l.useState(null);l.useEffect(()=>{var v;if(S){const E=u.findIndex($=>x($)===S);if(E!==-1){const $=m.current[E];(v=$==null?void 0:$.focus)==null||v.call($);const I=a.current,P=$.offsetLeft+$.offsetWidth/2-I.offsetWidth/2;I.scrollTo({left:P,behavior:"smooth"})}}},[S,u,x]);const O=l.useRef(null),A=(f||u.length===0)&&t==="input";return c.jsxs("div",{ref:a,role:"list","aria-label":"Chips",className:b.chips,tabIndex:t==="input"?0:void 0,onFocus:v=>{v.target===v.currentTarget&&i(!0)},onBlur:()=>{i(!1)},onKeyDown:v=>{var _;if(t!=="input")return;const E=v.key,I=v.target===v.currentTarget;if(!f)return;const P=document.activeElement,C=m.current.findIndex(T=>T===P);if(E==="ArrowLeft"){v.preventDefault();const T=C>0?C-1:u.length-1,Z=x(u[T]);w(Z);return}if(E==="ArrowRight"){v.preventDefault();const T=C>=0?(C+1)%Math.max(1,u.length):0,Z=x(u[T]);w(Z);return}if(E==="Home"){v.preventDefault();const T=x(u[0]);w(T);return}if(E==="End"){v.preventDefault();const T=x(u[u.length-1]);w(T);return}if(I&&E==="Backspace"){if(v.preventDefault(),u.length>0){const T=m.current[u.length-1];(_=T==null?void 0:T.focus)==null||_.call(T)}return}},children:[u.map((v,E)=>{const $=x(v),I=t==="input",P=I?{editable:!0,editing:S===$,onEditCommit:C=>{i(!0),p(_=>_.map((T,Z)=>Z===E?{...T,label:C}:T))},onEditCancel:()=>{i(!0)},onChange:()=>{if(m.current.length==E+1){const C=a.current;requestAnimationFrame(()=>{C.scrollTo({left:C.scrollWidth,behavior:"smooth"})})}}}:{};return c.jsx(Ie,{ref:C=>m.current[E]=C,label:v.label??"",icon:v.icon,activated:v.activated,disabled:v.disabled,variant:v.variant,href:v.href,draggable:o,...P,onToggle:v.activated===void 0?void 0:C=>p(_=>_.map((T,Z)=>Z===E?{...T,activated:C}:T)),onBlur:()=>{S===$&&w(null)},onRemove:I?()=>{i(!0),N(E)}:void 0},$)}),f&&c.jsxs(c.Fragment,{children:[c.jsx(We,{orientation:"vertical",className:"animate-[var(--animate-blink)] border-outline",style:{"--animate-blink":"blink 1s cubic-bezier(0.4, 0, 0.6, 1) infinite"}}),c.jsx("style",{children:`
5
+ */var ss={prefix:"fas",iconName:"minus",icon:[448,512,[8211,8722,10134,"subtract"],"f068","M0 256c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 288c-17.7 0-32-14.3-32-32z"]},rs={prefix:"fas",iconName:"calendar-days",icon:[448,512,["calendar-alt"],"f073","M128 0c17.7 0 32 14.3 32 32l0 32 128 0 0-32c0-17.7 14.3-32 32-32s32 14.3 32 32l0 32 32 0c35.3 0 64 28.7 64 64l0 288c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64L0 128C0 92.7 28.7 64 64 64l32 0 0-32c0-17.7 14.3-32 32-32zM64 240l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16zm128 0l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16zm144-16c-8.8 0-16 7.2-16 16l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0zM64 368l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16zm144-16c-8.8 0-16 7.2-16 16l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0zm112 16l0 32c0 8.8 7.2 16 16 16l32 0c8.8 0 16-7.2 16-16l0-32c0-8.8-7.2-16-16-16l-32 0c-8.8 0-16 7.2-16 16z"]},os={prefix:"fas",iconName:"chevron-right",icon:[320,512,[9002],"f054","M311.1 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L243.2 256 73.9 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z"]},is={prefix:"fas",iconName:"circle-exclamation",icon:[512,512,["exclamation-circle"],"f06a","M256 512a256 256 0 1 1 0-512 256 256 0 1 1 0 512zm0-192a32 32 0 1 0 0 64 32 32 0 1 0 0-64zm0-192c-18.2 0-32.7 15.5-31.4 33.7l7.4 104c.9 12.6 11.4 22.3 23.9 22.3 12.6 0 23-9.7 23.9-22.3l7.4-104c1.3-18.2-13.1-33.7-31.4-33.7z"]},Kt={prefix:"fas",iconName:"check",icon:[448,512,[10003,10004],"f00c","M434.8 70.1c14.3 10.4 17.5 30.4 7.1 44.7l-256 352c-5.5 7.6-14 12.3-23.4 13.1s-18.5-2.7-25.1-9.3l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l101.5 101.5 234-321.7c10.4-14.3 30.4-17.5 44.7-7.1z"]},we={prefix:"fas",iconName:"xmark",icon:[384,512,[128473,10005,10006,10060,215,"close","multiply","remove","times"],"f00d","M55.1 73.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L147.2 256 9.9 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192.5 301.3 329.9 438.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.8 256 375.1 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192.5 210.7 55.1 73.4z"]},ls=we,as={prefix:"fas",iconName:"chevron-down",icon:[448,512,[],"f078","M201.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 338.7 54.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"]},cs={prefix:"fas",iconName:"chevron-left",icon:[320,512,[9001],"f053","M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l192 192c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256 246.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-192 192z"]},us={prefix:"fas",iconName:"bars",icon:[448,512,["navicon"],"f0c9","M0 96C0 78.3 14.3 64 32 64l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 128C14.3 128 0 113.7 0 96zM0 256c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 288c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32L32 448c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"]};const ds=({checked:e,defaultChecked:t,indeterminate:n=!1,disabled:s=!1,error:r=!1,onChange:u,id:c,name:l,value:d,style:o,className:f,...y})=>{const h=i.useId(),m=c||h,p=e!==void 0,[b,w]=i.useState(t??!1),I=p?e:b,[S,g]=i.useState(!1),B=i.useRef(null);i.useEffect(()=>{B.current&&(B.current.indeterminate=n)},[n]);const $=k=>{s||(p||w(k.target.checked),u&&u(k))},v=mt({isChecked:!!I,isIndeterminate:n,isDisabled:s,isError:r,isFocused:S,isHovered:!1});return a.jsx("div",{className:x(v.checkbox,f,"group/checkbox"),style:o,children:a.jsxs(de,{stateClassName:v.stateLayer,colorName:I||n?"primary":"on-surface",children:[a.jsx("input",{ref:B,type:"checkbox",id:m,name:l,value:d,checked:I,disabled:s,onChange:$,onFocus:()=>g(!0),onBlur:()=>g(!1),className:v.input,...y}),a.jsx("div",{className:v.box}),a.jsx(X.AnimatePresence,{children:(I||n)&&a.jsx(X.motion.div,{initial:{opacity:0,scale:.5},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.5},transition:{duration:.15},className:v.icon,children:a.jsx(ae,{icon:n?ss:Kt,className:"size-3.5"})})})]})})},Ie=({variant:e="outlined",disabled:t=!1,icon:n,href:s,label:r,className:u,onClick:c,onToggle:l,activated:d,ref:o,onRemove:f,editable:y,onEditStart:h,onEditCommit:m,onEditCancel:p,onChange:b,transition:w,children:I,editing:S,...g})=>{if(I&&(r=I),r===void 0&&!y)throw new Error("Chip component requires either a label prop or children content");const B=s?"a":"button",$=i.useRef(null),v=o||$,[k,F]=i.useState(d),[j,P]=i.useState(!1),[M,q]=i.useState(S&&y),[V,Q]=i.useState(!1),[W,C]=i.useState(typeof r=="string"?r:""),R=i.useRef(null);i.useEffect(()=>{F(d)},[d]),i.useEffect(()=>{if(S&&q(S),y&&j){const D=setTimeout(()=>{g!=null&&g.draggable&&V||q(!0)},1e3);return()=>clearTimeout(D)}else j||q(!1)},[j,y,V,g,W]),i.useEffect(()=>{if(M){C(typeof r=="string"?r:"");const D=z.current||R.current;if(D){D.focus();const Y=document.createRange();Y.selectNodeContents(D),Y.collapse(!1);const se=window.getSelection();se==null||se.removeAllRanges(),se==null||se.addRange(Y)}}},[M]),w={duration:.3,...w};const H=D=>{t&&D.preventDefault(),l?(F(!k),l(!k)):c&&c(D)},U=!!l||!!f||!!c||!!s||!!y;d&&(n=Kt);const{onFocus:G,onBlur:te,onKeyDown:E,onDragStart:L,onDragEnd:N,onDoubleClick:A,...O}=g??{},_=yt({href:s,disabled:t,icon:n,variant:e,transition:w,className:u,isActive:k??!1,onToggle:l,activated:k,label:r,isInteractive:U,children:r,isFocused:j,isDragging:V,onEditCommit:m,isEditing:M}),z=i.useRef(null),Z=()=>{const D=(W??"").trim();if(!D){f&&f();return}m==null||m(D)};return a.jsxs(B,{contentEditable:!1,ref:v,href:s,className:_.chip,...O,onClick:D=>{M||H(D)},draggable:!t&&!!(g!=null&&g.draggable),onDragStart:D=>{!t&&(g!=null&&g.draggable)&&Q(!0),L==null||L(D)},onDragEnd:D=>{g!=null&&g.draggable&&Q(!1),N==null||N(D)},onDoubleClick:D=>{!t&&y&&!M&&(h==null||h(),D.preventDefault(),D.stopPropagation()),A==null||A(D)},onFocus:D=>{U&&P(!0),G==null||G(D)},onBlur:D=>{P(!1),te==null||te(D)},onKeyDown:D=>{const Y=D.key;if(!t&&M){Y==="Enter"?(D.preventDefault(),Z()):Y==="Escape"?(D.preventDefault(),p==null||p()):f&&(W==null?void 0:W.trim())===""&&(Y==="Backspace"||Y==="Delete"||Y==="Del")&&(D.preventDefault(),D.stopPropagation(),f());return}if(!t&&j){if(y&&!l&&(Y==="F2"||Y==="Enter")){D.preventDefault(),h==null||h();return}if(l&&(Y==="Enter"||Y===" "||Y==="Spacebar")){D.preventDefault();const se=!k;F(se),l(se)}f&&(Y==="Backspace"||Y==="Delete"||Y==="Del")&&(D.preventDefault(),D.stopPropagation(),f())}E==null||E(D)},disabled:t,"aria-pressed":l?k:void 0,style:{transition:w.duration+"s"},children:[U&&!t&&!M&&a.jsx(de,{style:{transition:w.duration+"s"},className:_.stateLayer,colorName:x({"on-surface-variant":!k,"on-secondary-container":k}),stateClassName:"state-ripple-group-[chip]"}),n&&a.jsx(ae,{icon:n,className:_.leadingIcon}),a.jsx("span",{ref:z,contentEditable:!!y&&!!M,suppressContentEditableWarning:!0,className:_.label,role:y?"textbox":void 0,spellCheck:!1,onInput:D=>{const Y=D.currentTarget.innerText;C(Y),b==null||b(Y)},onBlur:D=>{y&&M&&Z()},onKeyDown:D=>{if(y&&M&&D.key==="Enter"){D.preventDefault(),D.stopPropagation(),Z();return}y&&M&&D.key==="Escape"&&(D.preventDefault(),D.stopPropagation(),p==null||p())},children:r}),f&&!M&&a.jsx(ae,{icon:we,className:_.trailingIcon,onMouseDown:D=>{D.preventDefault(),D.stopPropagation()},onClick:D=>{D.stopPropagation(),t||f()}})]})},Pe=({orientation:e="horizontal",className:t,...n})=>{const s=wt({orientation:e,className:t});return a.jsx("hr",{className:s.divider,...n})},oe=[];for(let e=0;e<256;++e)oe.push((e+256).toString(16).slice(1));function fs(e,t=0){return(oe[e[t+0]]+oe[e[t+1]]+oe[e[t+2]]+oe[e[t+3]]+"-"+oe[e[t+4]]+oe[e[t+5]]+"-"+oe[e[t+6]]+oe[e[t+7]]+"-"+oe[e[t+8]]+oe[e[t+9]]+"-"+oe[e[t+10]]+oe[e[t+11]]+oe[e[t+12]]+oe[e[t+13]]+oe[e[t+14]]+oe[e[t+15]]).toLowerCase()}let je;const hs=new Uint8Array(16);function ms(){if(!je){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");je=crypto.getRandomValues.bind(crypto)}return je(hs)}const ps=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Ue={randomUUID:ps};function Gt(e,t,n){var r;if(Ue.randomUUID&&!e)return Ue.randomUUID();e=e||{};const s=e.random??((r=e.rng)==null?void 0:r.call(e))??ms();if(s.length<16)throw new Error("Random bytes length must be >= 16");return s[6]=s[6]&15|64,s[8]=s[8]&63|128,fs(s)}const ys=({variant:e="input",className:t,scrollable:n=!0,draggable:s=!1,items:r,onItemsChange:u})=>{const c=r??[],l=i.useRef(null),[d,o]=i.useState(!1),f=i.useRef(new WeakMap),y=i.useCallback(v=>{const k=f.current;let F=k.get(v);return F||(F=Gt(),k.set(v,F)),F},[]);i.useEffect(()=>{var v,k;d&&(e=="input"?(v=B.current)==null||v.focus():(k=l.current)==null||k.focus())},[d]);const h=i.useRef([]),m=i.useRef(!1),p=i.useCallback(v=>{u==null||u(v(c))},[u,c]),b=i.useCallback(v=>{p(k=>k.filter((F,j)=>j!==v))},[p]),w=vt({scrollable:n,className:t,variant:e}),I=i.useCallback((v="")=>{if(e!=="input"||m.current)return;m.current=!0;const k={label:v},F=y(k),j=[...c,k];u==null||u(j),requestAnimationFrame(()=>{g(F),m.current=!1})},[e,u,c,y]),[S,g]=i.useState(null);i.useEffect(()=>{var v;if(S){const k=c.findIndex(F=>y(F)===S);if(k!==-1){const F=h.current[k];(v=F==null?void 0:F.focus)==null||v.call(F);const j=l.current,P=F.offsetLeft+F.offsetWidth/2-j.offsetWidth/2;j.scrollTo({left:P,behavior:"smooth"})}}},[S,c,y]);const B=i.useRef(null),$=(d||c.length===0)&&e==="input";return a.jsxs("div",{ref:l,role:"list","aria-label":"Chips",className:w.chips,tabIndex:e==="input"?0:void 0,onFocus:v=>{v.target===v.currentTarget&&o(!0)},onBlur:()=>{o(!1)},onKeyDown:v=>{var q;if(e!=="input")return;const k=v.key,j=v.target===v.currentTarget;if(!d)return;const P=document.activeElement,M=h.current.findIndex(V=>V===P);if(k==="ArrowLeft"){v.preventDefault();const V=M>0?M-1:c.length-1,Q=y(c[V]);g(Q);return}if(k==="ArrowRight"){v.preventDefault();const V=M>=0?(M+1)%Math.max(1,c.length):0,Q=y(c[V]);g(Q);return}if(k==="Home"){v.preventDefault();const V=y(c[0]);g(V);return}if(k==="End"){v.preventDefault();const V=y(c[c.length-1]);g(V);return}if(j&&k==="Backspace"){if(v.preventDefault(),c.length>0){const V=h.current[c.length-1];(q=V==null?void 0:V.focus)==null||q.call(V)}return}},children:[c.map((v,k)=>{const F=y(v),j=e==="input",P=j?{editable:!0,editing:S===F,onEditCommit:M=>{o(!0),p(q=>q.map((V,Q)=>Q===k?{...V,label:M}:V))},onEditCancel:()=>{o(!0)},onChange:()=>{if(h.current.length==k+1){const M=l.current;requestAnimationFrame(()=>{M.scrollTo({left:M.scrollWidth,behavior:"smooth"})})}}}:{};return a.jsx(Ie,{ref:M=>h.current[k]=M,label:v.label??"",icon:v.icon,activated:v.activated,disabled:v.disabled,variant:v.variant,href:v.href,draggable:s,...P,onToggle:v.activated===void 0?void 0:M=>p(q=>q.map((V,Q)=>Q===k?{...V,activated:M}:V)),onBlur:()=>{S===F&&g(null)},onRemove:j?()=>{o(!0),b(k)}:void 0},F)}),d&&a.jsxs(a.Fragment,{children:[a.jsx(Pe,{orientation:"vertical",className:"animate-[var(--animate-blink)] border-outline",style:{"--animate-blink":"blink 1s cubic-bezier(0.4, 0, 0.6, 1) infinite"}}),a.jsx("style",{children:`
6
6
  @keyframes blink {
7
7
  0%, 50% { opacity: 1; }
8
8
  50.01%, 100% { opacity: 0; }
9
9
  }
10
- `})]}),A&&c.jsx(Ie,{ref:O,className:"opacity-0",draggable:o,editable:!0,editing:!0,onChange:v=>{var E;if(v=v.replace(/(&nbsp;)+/g," ").trim(),console.log("Ghost chip onChange",v,!!v),v)M(v);else if(u.length>0){const $=m.current[u.length-1];(E=$==null?void 0:$.focus)==null||E.call($)}},onEditCommit:()=>{},onBlur:()=>{i(!1)},onFocus:v=>{i(!0),v.stopPropagation()},children:" "})]})};function Gt({trigger:t=["hover","focus"],isOpen:n,defaultOpen:s=!1,onOpenChange:o,openDelay:r=400,closeDelay:d=150,id:u}={}){const a=l.useId(),f=u??`tooltip-${a}`,i=Array.isArray(t)?t:[t],h=typeof n=="boolean",[x,m]=l.useState(s?"hovered":"hidden"),[y,p]=l.useState(!1),N=l.useRef(null),b=l.useRef(null),M=l.useCallback(()=>{N.current&&(clearTimeout(N.current),N.current=null),b.current&&(clearTimeout(b.current),b.current=null)},[]);l.useEffect(()=>()=>M(),[M]);const S=l.useCallback(R=>{if(h){const F=R!=="hidden";o==null||o(F)}else{m(R);const F=R!=="hidden";o==null||o(F)}},[h,o]),w=h?n?"hovered":"hidden":x,O=w!=="hidden",A=R=>{switch(R){case"hidden":return 0;case"hovered":return 1;case"focused":return 2;case"clicked":return 3;default:return 0}},v=l.useCallback(R=>{M(),!(A(R)<=A(w))&&(N.current=setTimeout(()=>{S(R)},r))},[M,r,w,S]),E=l.useCallback(R=>{M(),b.current=setTimeout(()=>{(!h&&A(x)<=A(R)||h)&&S("hidden")},d)},[M,d,x,h,S]),$=l.useCallback(()=>{i.includes("hover")&&v("hovered")},[i,v]),I=l.useCallback(()=>{i.includes("hover")&&(w==="focused"||w==="clicked"||y||E("hovered"))},[i,w,y,E]),P=l.useCallback(()=>{i.includes("focus")&&(M(),S("focused"))},[i,M,S]),C=l.useCallback(()=>{if(i.includes("focus")&&w!=="clicked"){if(i.includes("hover")&&y){S("hovered");return}E("focused")}},[i,w,y,E,S]),_=l.useCallback(()=>{i.includes("click")&&(M(),S(w==="clicked"?"hidden":"clicked"))},[i,w,M,S]),T=l.useCallback(R=>{R.key==="Escape"&&O&&(M(),S("hidden"),R.preventDefault())},[O,M,S]),Z=l.useCallback(()=>{p(!0),M()},[M]),H=l.useCallback(()=>{p(!1),i.includes("hover")&&w==="hovered"&&E("hovered")},[i,w,E]);return{triggerProps:{"aria-describedby":O?f:void 0,onMouseEnter:$,onMouseLeave:I,onFocus:P,onBlur:C,onClick:_,onKeyDown:T},tooltipProps:{id:f,role:"tooltip","aria-hidden":!O,onMouseEnter:Z,onMouseLeave:H},isOpen:O,state:w}}const Pe=({variant:t="plain",buttons:n,className:s,children:o,title:r,text:d,content:u,position:a,targetRef:f,ref:i,trigger:h=["hover","focus"],transition:x,openDelay:m=400,closeDelay:y=150,isOpen:p,defaultOpen:N=!1,onOpenChange:b,id:M,anchorRef:S,...w})=>{const A=a||(t==="rich"?"bottom-right":"bottom");if(x={duration:.3,...x},!o&&!f)throw new Error("Tooltip must have a child or a targetRef");n&&!Array.isArray(n)&&(n=[n]);const v=l.useRef(null),$=S||(f||v),{triggerProps:I,tooltipProps:P,isOpen:C}=Gt({trigger:h,isOpen:p,defaultOpen:N,onOpenChange:b,openDelay:m,closeDelay:y,id:M}),_=!f&&l.isValidElement(o)?l.cloneElement(o,{ref:v,...I,onMouseEnter:H=>{var R,F;I.onMouseEnter(),(F=(R=o.props)==null?void 0:R.onMouseEnter)==null||F.call(R,H)},onMouseLeave:H=>{var R,F;I.onMouseLeave(),(F=(R=o.props)==null?void 0:R.onMouseLeave)==null||F.call(R,H)},onFocus:H=>{var R,F;I.onFocus(),(F=(R=o.props)==null?void 0:R.onFocus)==null||F.call(R,H)},onBlur:H=>{var R,F;I.onBlur(),(F=(R=o.props)==null?void 0:R.onBlur)==null||F.call(R,H)},onClick:H=>{var R,F;I.onClick(),(F=(R=o.props)==null?void 0:R.onClick)==null||F.call(R,H)},onKeyDown:H=>{var R,F;I.onKeyDown(H),(F=(R=o.props)==null?void 0:R.onKeyDown)==null||F.call(R,H)}}):o;l.useEffect(()=>{if(!f)return;const H=f.current;if(!H)return;const R=()=>I.onMouseEnter(),F=()=>I.onMouseLeave(),V=()=>I.onFocus(),G=()=>I.onBlur(),J=()=>I.onClick(),te=k=>I.onKeyDown(k);return H.addEventListener("mouseenter",R),H.addEventListener("mouseleave",F),H.addEventListener("focus",V,!0),H.addEventListener("blur",G,!0),H.addEventListener("click",J),H.addEventListener("keydown",te),I["aria-describedby"]?H.setAttribute("aria-describedby",I["aria-describedby"]):H.removeAttribute("aria-describedby"),()=>{H.removeEventListener("mouseenter",R),H.removeEventListener("mouseleave",F),H.removeEventListener("focus",V,!0),H.removeEventListener("blur",G,!0),H.removeEventListener("click",J),H.removeEventListener("keydown",te)}},[f,I]);const T=_t({variant:t,buttons:n,className:s,title:r,text:d,position:A,trigger:h,targetRef:f,children:o}),Z={open:{opacity:1,height:"auto"},close:{opacity:0,height:16}};return c.jsxs(c.Fragment,{children:[_,c.jsx(U.AnimatePresence,{children:C&&c.jsx(De,{anchorRef:$,position:A,children:c.jsx(U.motion.div,{initial:"close",variants:Z,animate:"open",transition:{duration:x.duration},exit:"close",className:T.toolTip,...w,...P,children:c.jsx("div",{className:T.container,children:u?c.jsx("div",{className:T.content,children:u}):c.jsxs(c.Fragment,{children:[r&&c.jsx("div",{className:T.subHead,children:r}),d&&c.jsx("div",{className:T.supportingText,children:d}),n&&c.jsx("div",{className:T.actions,children:Array.isArray(n)&&n.map((H,R)=>c.jsx(me,{size:"small",variant:"text",...H},R))})]})})})})})]})},Ne=({className:t,label:n,variant:s="primary",size:o="medium",href:r,type:d,icon:u,extended:a=!1,ref:f,transition:i,children:h,...x})=>{if(h&&(n=h),!n)throw new Error("FAB component requires either a label prop or children content");const m=r?"a":"button",y=bt({href:r,icon:u,extended:a,label:n,size:o,variant:s,className:t,transition:i,children:n});i={duration:.3,...i};const p=l.useRef(null),N=f||p,b={visible:{width:"auto",marginLeft:12,opacity:1,transition:{...i,opacity:{duration:i.duration/2,delay:i.duration-i.duration/2}}},hidden:{width:0,marginLeft:0,opacity:0,transition:{...i,marginLeft:{duration:i.duration/2,delay:i.duration-i.duration/2}}}};return c.jsxs(m,{...x,ref:N,href:r,"aria-label":a?void 0:n,className:y.fab,children:[c.jsx(Pe,{trigger:a?null:void 0,text:n,targetRef:N}),c.jsx(fe,{style:{transition:i.duration+"s"},className:y.stateLayer,colorName:g({"on-primary":s=="primary","on-secondary":s=="secondary","on-tertiary":s=="tertiary","on-primary-container":s=="primaryContainer","on-secondary-container":s=="secondaryContainer","on-tertiary-container":s=="tertiaryContainer"}),stateClassName:"state-ripple-group-[fab]"}),c.jsx(ue,{icon:u,className:y.icon}),c.jsx(U.AnimatePresence,{children:a&&c.jsx(U.motion.span,{variants:b,initial:"hidden",animate:"visible",exit:"hidden",className:y.label,children:n})})]})},ge=({variant:t="standard",href:n,disabled:s=!1,title:o,label:r,onToggle:d,activated:u=!1,onClick:a,icon:f,size:i="medium",iconSelected:h,className:x,ref:m,width:y="default",shape:p="rounded",allowShapeTransformation:N=!0,transition:b,children:M,...S})=>{if(M&&(r=M),!r)throw new Error("IconButton component requires either a label prop or children content to provide an accessible aria-label");!o&&o!==null&&(o=r);const[w,O]=l.useState(u),A=P=>{s&&P.preventDefault(),d?(O(!w),d(!w)):a&&a(P)};l.useEffect(()=>{O(u)},[u]);const v=n?"a":"button",E=kt({transition:b,shape:p,allowShapeTransformation:N,width:y,href:n,activated:w,label:r,iconSelected:h,isActive:w,onToggle:d,disabled:s,icon:f,variant:t,className:x,size:i,children:r,...S}),$=l.useRef(null),I=m||$;return b={duration:.3,...b},c.jsxs(v,{disabled:s,href:n,style:{transition:b.duration+"s"},className:E.iconButton,"aria-label":r,...S,title:void 0,onClick:A,ref:I,children:[o!==null&&c.jsx(Pe,{targetRef:I,trigger:s?null:void 0,text:o}),c.jsx("div",{className:E.touchTarget}),c.jsx(fe,{style:{transition:b.duration+"s"},className:E.stateLayer,colorName:g(t==="standard"&&{"on-surface-variant":!w,"on-primary":w},t==="filled"&&{"on-surface-variant":!w&&!!d,"on-primary":w||!d},t==="tonal"&&{"on-secondary":w&&!!d,"on-secondary-container":!w||!d},t==="outlined"&&{"inverse-on-surface":w&&!!d,"on-surface-variant":!w||!d}),stateClassName:"state-ripple-group-[icon-button]"}),f?c.jsx(ue,{icon:f,className:E.icon}):M]})},ps=({className:t,label:n,variant:s="primary",size:o="medium",href:r,icon:d,extended:u=!1,ref:a,transition:f,children:i,open:h,defaultOpen:x=!1,onOpenChange:m,...y})=>{f={duration:.3,ease:"easeInOut",...f};const p=l.useRef(null),N=a||p,b=typeof h=="boolean",[M,S]=l.useState(x),w=b?h:M,O=C=>{b||S(C),m==null||m(C)},A=l.Children.toArray(i).filter(C=>l.isValidElement(C)&&C.type===me),v=Nt({href:r,icon:d,extended:u,label:n,size:o,variant:s,className:t,transition:f,children:n,open:w}),E=U.motion.create(Ne),$=U.motion.create(ge),I=C=>c.jsx(E,{icon:d,extended:u,label:n,variant:s+"Container",size:o,className:v.fab+" "+(t??""),"aria-expanded":w,onClick:()=>O(!0),style:{transition:"border-radius 0.3s ease-in-out"},transition:{duration:f.duration,ease:"easeInOut",borderRadius:{duration:f.duration,ease:"easeInOut"},background:{duration:f.duration,ease:"easeInOut"},...f},...C}),P=l.useId();return c.jsxs("div",{className:v.fabMenu,ref:N,...y,children:[c.jsx(U.AnimatePresence,{children:w&&c.jsx("div",{className:v.actions,role:"menu","aria-hidden":!w,children:(()=>{const C=A.length;return A.map((_,T)=>{_.props;const Z=C-1-T,H=((f==null?void 0:f.delay)??0)+Z*.06,R={open:{overflow:"visible",opacity:1,width:"auto",transition:{...f,delay:H,opacity:{delay:(f==null?void 0:f.duration)/2+H}}},close:{overflow:"hidden",opacity:0,width:0,transition:{...f,delay:H,opacity:{duration:(f==null?void 0:f.duration)/1.5}}}};return c.jsx(U.motion.div,{initial:"close",animate:"open",variants:R,transition:f,exit:"close",children:l.cloneElement(_,{key:T,shape:"rounded",variant:"filled",className:()=>({button:g("max-w-full overflow-hidden text-nowrap",{"px-0":!w,"bg-primary-container text-on-primary-container ":s==="primary","bg-secondary-container text-on-secondary-container":s==="secondary","bg-tertiary-container text-on-tertiary-container":s==="tertiary"}),stateLayer:g({"state-on-primary-container":s==="primary","state-on-secondary-container":s==="secondary","state-on-tertiary-container":s==="tertiary"})})})})})})()})}),I({className:"invisible pointer-events-none"}),c.jsxs("div",{className:"absolute right-0 top-0",children:[!w&&I({className:"",layout:!0,layoutId:"fab-menu"+P}),w&&c.jsx(c.Fragment,{children:c.jsx($,{layout:!0,layoutId:"fab-menu"+P,variant:"filled",className:()=>({iconButton:g({"bg-primary text-on-primary":s==="primary","bg-secondary text-on-secondary":s==="secondary","bg-tertiary text-on-tertiary":s==="tertiary"}),stateLayer:g({"[--default-color:var(--color-on-primary)]":s==="primary","[--default-color:var(--color-on-secondary)]":s==="secondary","[--default-color:var(--color-on-tertiary)]":s==="tertiary"})}),style:{transition:"border-radius 0.3s ease-in-out"},transition:{duration:f.duration,ease:"easeInOut",borderRadius:{duration:f.duration,ease:"easeInOut"},background:{duration:f.duration,ease:"easeInOut"},...f},icon:os,onClick:()=>O(!1),children:"Close"})})]})]})},ys=({className:t,valueFormatter:n,step:s=10,name:o,value:r=0,min:d=0,max:u=100,marks:a=[{value:0,label:"0"},{value:100,label:"100"}],ref:f,onChange:i,...h})=>{const x=F=>{const V=y(),G=m();return F===1/0?100:F===-1/0?0:(F-V)/(G-V)*100},m=(F=!1)=>F?u:u==1/0?a[(a==null?void 0:a.length)-1].value:u,y=(F=!1)=>F?d:d==-1/0?a[0].value:d,p=F=>{const V=y(!1);return(m(!1)-V)*F/100+V},[N,b]=l.useState(!1),M=l.useRef(null),S=f||M,[w,O]=l.useState(r),[A,v]=l.useState(x(r)),[E,$]=l.useState(!1);l.useEffect(()=>{O(r),v(x(r))},[r]);const I=F=>{$(!0),b(!0),_(F)},P=()=>{$(!1),b(!1)};l.useEffect(()=>(E?(window.addEventListener("mouseup",P),window.addEventListener("mousemove",_),window.addEventListener("touchend",P),window.addEventListener("touchmove",_)):(window.removeEventListener("mouseup",P),window.removeEventListener("mousemove",_),window.removeEventListener("touchend",P),window.removeEventListener("touchmove",_)),()=>{window.removeEventListener("mouseup",P),window.removeEventListener("mousemove",_),window.removeEventListener("touchend",P),window.removeEventListener("touchmove",_)}),[E]);const C=Mt({className:t,isChanging:N,marks:a,max:u,min:d,name:o,step:s,value:w,valueFormatter:n,onChange:i}),_=F=>{const V=S==null?void 0:S.current;if(V){const G=V.getBoundingClientRect().left,te=((F.type==="touchmove"||F.type==="touchstart"?F.touches[0].clientX:F.clientX)-G)/V.offsetWidth*100;T({percent:te})}},T=({percent:F,value:V})=>{if(F){if(F>=100){O(m(!0)),v(100);return}if(F<=0){O(y(!0)),v(0);return}V=p(F),V==y()&&(V=y(!0)),V==m()&&(V=m(!0))}else if(V!=null){if(V>=m()){O(m(!0)),v(100);return}if(V<=y()){O(y(!0)),v(0);return}F=x(V)}else return;s!=null?V=Math.round((V-y())/s)*s+y():a&&(V=a.reduce((G,J,te)=>{let k=J.value===1/0?m():J.value===-1/0?y():J.value,j=G.value===1/0?m():G.value===-1/0?y():G.value;return k=Math.abs(k-V),j=Math.abs(j-V),k<j?J:G}).value),V>=m()&&(V=m(!0)),V<=y()&&(V=y(!0)),F=x(V),O(V),v(F),i&&i(V)},[Z,H]=l.useState(0);l.useEffect(()=>{const F=()=>{S.current&&H(S.current.offsetWidth)};return F(),window.addEventListener("resize",F),()=>{window.removeEventListener("resize",F)}},[]);const R=F=>{switch(F.key){case"ArrowRight":if(s)T({value:w+s});else if(a){const V=a.find(G=>G.value>w);V&&T({value:V.value})}break;case"ArrowLeft":if(s)T({value:w-s});else if(a){const V=a.slice(0).reverse().find((G,J,te)=>w===1/0?J===1:G.value<w);V&&T({value:V.value})}break;default:return}};return c.jsxs("div",{tabIndex:0,onKeyDown:R,role:"slider","aria-valuemin":y(!0),"aria-valuemax":m(!0),"aria-valuenow":w,"aria-valuetext":w.toString(),className:C.slider,onMouseDown:I,onClick:_,ref:S,onTouchStart:I,onDragStart:F=>F.preventDefault(),...h,children:[c.jsx("input",{type:"hidden",name:o,value:w}),c.jsx("div",{className:C.activeTrack,style:{flex:A/100}}),c.jsx("div",{className:C.handle,children:c.jsx(U.AnimatePresence,{children:N&&c.jsx(U.motion.div,{className:C.valueIndicator,initial:"hidden",animate:"visible",exit:"hidden",style:{translate:"-50%",transformOrigin:"center bottom",textWrap:"nowrap"},variants:{visible:{opacity:1,scale:1},hidden:{opacity:1,scale:0}},transition:{duration:.1},children:n?n(w):w})})}),c.jsx("div",{className:C.inactiveTrack,style:{flex:1-A/100}}),c.jsx("div",{className:"w-[calc(100%-12px)] h-full absolute -translate-x-1/2 transform left-1/2",children:a&&a.map((F,V)=>{let G=null;const J=(N?9:10)/Z*100,te=x(F.value);return te<=A-J?G=!0:te>=A+J&&(G=!1),c.jsx("div",{className:g(C.dot,{"bg-primary-container":G!=null&&G,"bg-primary":G!=null&&!G}),style:{left:`${x(F.value)}%`}},V)})})]})},xs=({variant:t="standard",className:n,children:s,title:o,position:r="right",extended:d,divider:u,onExtendedChange:a,closeIcon:f=be,transition:i,...h})=>{i={duration:.3,...i};const[x,m]=l.useState(d??!0),y=It({transition:i,title:o,position:r,closeIcon:f,className:n,children:s,onExtendedChange:a,divider:u,isExtended:x,extended:x,variant:t});l.useEffect(()=>{a==null||a(x??!1)},[x]),l.useEffect(()=>{d!=null&&m(d)},[d]);const p={close:{width:0},open:{width:"auto"}},N=()=>c.jsxs(c.Fragment,{children:[c.jsx(U.AnimatePresence,{children:t=="modal"&&x&&c.jsx(U.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:i,onClick:()=>m(!1),className:y.overlay})}),c.jsx(U.AnimatePresence,{children:x&&c.jsxs("div",{...h,className:y.sideSheet,style:{transition:i.duration+"s"},children:[c.jsxs(U.motion.div,{variants:p,initial:d===!1?"open":"close",animate:"open",exit:"close",className:y.container,children:[c.jsxs("div",{className:y.header,children:[o&&c.jsx("p",{className:y.title,children:o}),c.jsx(ge,{size:"small",label:"close",icon:f,onClick:()=>m(!1),className:y.closeButton})]}),c.jsx("div",{className:y.content,style:{transition:i.duration+"s"},children:s})]}),(u==null&&t=="standard"?!0:u)&&c.jsx(We,{className:y.divider,orientation:"vertical"})]})})]});return t=="modal"?Me.createPortal(N(),document.body):N()},gs=({message:t,className:n,duration:s,closeIcon:o=be,onClose:r,...d})=>{const[u,a]=l.useState(!0),f=Rt({className:n,closeIcon:o,duration:s,isVisible:u,onClose:r,message:t});l.useEffect(()=>{s&&setTimeout(()=>{i()},s)},[s]);const i=()=>{a(!1),r==null||r()};return c.jsx(U.AnimatePresence,{children:u&&c.jsx(U.motion.div,{initial:{height:0},animate:{height:"auto"},exit:{height:0},transition:{duration:.1},className:f.snackbar,...d,children:c.jsxs("div",{className:f.container,children:[c.jsx("p",{className:f.supportingText,children:t}),c.jsx(ge,{onClick:()=>i(),className:f.icon,icon:o,label:"close the snackbar"})]})})})},vs=({selected:t=!1,className:n,activeIcon:s,disabled:o=!1,inactiveIcon:r,onChange:d,onClick:u,onKeyDown:a,ref:f,...i})=>{const[h,x]=l.useState(t);l.useEffect(()=>{x(t)},[t]);const m=S=>{o||(p(),u&&u(S))},y=S=>{o||((S.key===" "||S.key==="Enter")&&(S.preventDefault(),p()),a&&a(S))},p=()=>{x(!h),d==null||d(!h)},N=Ft({className:n,isSelected:h,activeIcon:s,inactiveIcon:r,disabled:o,selected:h,onChange:d}),b=l.useRef(null),M=f||b;return c.jsxs(U.motion.div,{role:"switch","aria-checked":h,tabIndex:o?-1:0,onKeyDown:y,onClick:m,ref:M,className:N.switch,...i,children:[c.jsx("input",{type:"hidden",value:h?"1":"0"}),c.jsxs(U.motion.div,{layout:!0,style:{translate:h?"50%":"-50%"},transition:{type:"spring",stiffness:700,damping:30},className:N.handleContainer,children:[c.jsx("div",{className:N.handle,children:(h?s:r)&&c.jsx(ue,{className:N.icon,icon:h?s:r})}),c.jsx("div",{className:N.handleStateLayer})]})]})},Jt=({className:t,onClick:n,label:s,variant:o="primary",href:r,icon:d,selectedTab:u,setSelectedTab:a,tabsId:f,index:i,onTabSelected:h,scrollable:x=!1,selected:m=!1,children:y,ref:p,...N})=>{const b=l.useRef(null),M=p||b,S=s??(typeof y=="string"?y:void 0),[w,O]=l.useState(m);l.useEffect(()=>{m&&u==null?O(!0):O(u==i&&i!=null)},[u]),l.useEffect(()=>{u==i&&h&&h({ref:M,index:i||0,label:S,icon:d})},[u]);const A=r?"a":"button",v=$=>{a&&a(i??null),n&&n($)},E=$t({className:t,onTabSelected:h,scrollable:x,selectedTab:u,index:i,tabsId:f,selected:w,variant:o,icon:d,label:S,isSelected:w,setSelectedTab:a,href:r});return c.jsxs(A,{...N,role:"tab","aria-selected":w,ref:M,href:r,className:E.tab,onClick:v,...N,children:[c.jsx(fe,{style:{transition:.3+"s"},className:E.stateLayer,colorName:o==="primary"&&w?"primary":"on-surface",stateClassName:"state-ripple-group-[tab]"}),c.jsxs("span",{className:E.content,children:[d&&c.jsx(ue,{icon:d,className:E.icon}),c.jsx("span",{className:E.label,children:S}),w&&c.jsx(U.motion.span,{layoutId:`underline-${f}`,className:E.underline,transition:{duration:.3}})]})]})},Be=l.createContext(null),ws=({variant:t="primary",onTabSelected:n,children:s,className:o,selectedTab:r,setSelectedTab:d,scrollable:u=!1})=>{const a=l.useContext(Be),[f,i]=l.useState(null);let h;r===0||r!=null?h=r:a?h=a.selectedTab:h=f;const x=d??(a==null?void 0:a.setSelectedTab)??i,m=l.Children.toArray(s).filter(M=>l.isValidElement(M)&&M.type===Jt),y=l.useRef(null),p=M=>{if(n==null||n(M),u){const S=y.current,w=M.ref.current;if(S&&w){const O=w.offsetLeft+w.offsetWidth/2-S.offsetWidth/2;S.scrollTo({left:O,behavior:"smooth"})}}},N=l.useMemo(()=>(a==null?void 0:a.tabsId)??Kt(),[a==null?void 0:a.tabsId]),b=Pt({children:s,onTabSelected:n,scrollable:u,selectedTab:h,setSelectedTab:x,className:o,variant:t});return c.jsx("div",{ref:y,role:"tablist",className:b.tabs,children:m.map((M,S)=>l.cloneElement(M,{key:S,index:S,variant:t,selectedTab:h,setSelectedTab:x,tabsId:N,onTabSelected:p,scrollable:u}))})},bs=({children:t,selectedTab:n,setSelectedTab:s,defaultTab:o=0})=>{const[r,d]=l.useState(o),u=l.useRef(null),a=n!==void 0?n:r,f=s??d,i=u.current!==null&&a!==null?a>u.current?1:-1:0;a!==u.current&&(u.current=a);const h=l.useId(),x=l.useMemo(()=>({selectedTab:a,setSelectedTab:f,previousTab:u.current,direction:i,tabsId:h}),[a,f,i,h]);return c.jsx(Be.Provider,{value:x,children:t})},Zt=({children:t,className:n,isSelected:s=!1})=>{const o=Ot({children:t,className:n,isSelected:s});return c.jsx("div",{className:o.tabPanel,children:t})},Ss=({children:t,className:n})=>{const s=l.useContext(Be);if(!s)return console.warn("TabPanels must be used within a TabGroup"),null;const{selectedTab:o,direction:r,tabsId:d}=s,u=l.Children.toArray(t).filter(f=>l.isValidElement(f)&&f.type===Zt),a=Tt({children:t,className:n});return c.jsx("div",{className:a.tabPanels,children:c.jsx(U.AnimatePresence,{initial:!1,custom:r,mode:"popLayout",children:u.map((f,i)=>o===i&&c.jsx(U.motion.div,{custom:r,variants:{enter:h=>({x:h*100+"%",opacity:1}),center:{x:0,opacity:1},exit:h=>({x:h*-100+"%",opacity:1})},initial:"enter",animate:"center",exit:"exit",transition:{type:"spring",stiffness:400,damping:40},role:"tabpanel","aria-labelledby":`tab-${d}-${i}`,children:l.cloneElement(f,{isSelected:!0})},i))})})},Ns=({hasSelected:t})=>({datePicker:g("inline-flex flex-col bg-surface-container-high rounded-[28px] p-3 select-none","min-w-[320px]"),header:g("flex items-center justify-between h-12 mb-2 px-2"),monthNav:g("flex items-center justify-center w-10 h-10 rounded-full text-on-surface-variant hover:bg-on-surface-variant/8 transition-colors cursor-pointer"),monthLabel:g("text-label-large text-on-surface font-bold capitalize"),weekDays:g("grid grid-cols-7 mb-2"),weekDay:g("h-10 flex items-center justify-center text-body-small text-on-surface-variant"),daysGrid:g("grid grid-cols-7 row-auto gap-y-2"),dayCell:g("flex items-center justify-center h-10 p-0 relative"),dayButton:g("w-10 h-10 rounded-full flex items-center justify-center text-body-large transition-all duration-200 relative overflow-hidden z-10 outline-none")}),Es=ee("datePicker",Ns),Qt=({value:t,defaultValue:n,onChange:s,minDate:o,maxDate:r,shouldDisableDate:d,locale:u="default",weekStartDay:a=0,className:f,style:i,mode:h="single",...x})=>{const[m,y]=l.useState(()=>{const k=L=>L instanceof Date?L:Array.isArray(L)&&L[0]?L[0]:null,j=k(t)||k(n)||new Date;return new Date(j.getFullYear(),j.getMonth(),1)}),[p,N]=l.useState(0),[b,M]=l.useState("day"),S=t!==void 0,[w,O]=l.useState(n||null),A=S?t||null:w,v=(k,j)=>new Date(k,j+1,0).getDate(),E=l.useMemo(()=>{const k=m.getFullYear(),j=m.getMonth(),L=v(k,j),z=(new Date(k,j,1).getDay()-a+7)%7,Y=[],X=v(k,j-1);for(let q=z-1;q>=0;q--)Y.push({date:new Date(k,j-1,X-q),isCurrentMonth:!1});for(let q=1;q<=L;q++)Y.push({date:new Date(k,j,q),isCurrentMonth:!0});const W=42-Y.length;for(let q=1;q<=W;q++)Y.push({date:new Date(k,j+1,q),isCurrentMonth:!1});return Y},[m,a]),$=l.useMemo(()=>{const k=new Date().getFullYear(),j=k-100,L=k+100,D=[];for(let z=j;z<=L;z++)D.push(z);return D},[]),I=l.useRef(null);l.useEffect(()=>{if(b==="year"&&I.current){const k=I.current.querySelector('[data-selected="true"]');k&&k.scrollIntoView({block:"center"})}},[b]);const P=l.useMemo(()=>new Intl.DateTimeFormat(u,{month:"long",year:"numeric"}),[u]),C=l.useMemo(()=>new Intl.DateTimeFormat(u,{weekday:"narrow"}),[u]),_=l.useMemo(()=>{const k=new Date(2023,0,1+a);return Array.from({length:7}).map((j,L)=>{const D=new Date(k);return D.setDate(k.getDate()+L),C.format(D).charAt(0).toUpperCase()})},[C,a]),T=()=>{N(-1),y(k=>new Date(k.getFullYear(),k.getMonth()-1,1))},Z=()=>{N(1),y(k=>new Date(k.getFullYear(),k.getMonth()+1,1))},H=k=>{y(j=>new Date(k,j.getMonth(),1)),M("day")},R=(k,j)=>k?k.getDate()===j.getDate()&&k.getMonth()===j.getMonth()&&k.getFullYear()===j.getFullYear():!1,F=k=>R(new Date,k),V=k=>{let j=k;if(h==="single")j=k;else{const L=A,[D,z]=Array.isArray(L)?L:[null,null];!D||D&&z?j=[k,null]:k<D?j=[k,D]:j=[D,k]}S||O(j),s&&s(j)},G=k=>{if(h==="single")return{isSelected:R(A,k),isStart:!1,isEnd:!1,isInRange:!1};const j=Array.isArray(A)?A:[A,null],[L,D]=j,z=R(L,k),Y=R(D,k);let X=!1;if(L&&D){const Q=new Date(L.getFullYear(),L.getMonth(),L.getDate()).getTime(),W=new Date(D.getFullYear(),D.getMonth(),D.getDate()).getTime(),q=new Date(k.getFullYear(),k.getMonth(),k.getDate()).getTime();X=q>Q&&q<W}return{isSelected:z||Y,isStart:z,isEnd:Y,isInRange:X}},J=Es({hasSelected:!!A}),te={enter:k=>({x:k>0?"100%":"-100%",opacity:0}),center:{x:0,opacity:1},exit:k=>({x:k<0?"100%":"-100%",opacity:0})};return c.jsxs("div",{className:g(J.datePicker,f),style:i,...x,children:[c.jsxs("div",{className:J.header,children:[c.jsxs(me,{variant:"text",disableTextMargins:!0,size:"small",onClick:()=>M(k=>k==="day"?"year":"day"),className:"text-label-large font-bold capitalize text-on-surface hover:bg-surface-container-highest",children:[c.jsx("span",{className:"mr-2",children:b==="day"?P.format(m):m.getFullYear()}),c.jsx(ue,{icon:is,className:g("w-3 h-3 transition-transform duration-200 inline",b==="year"&&"rotate-180")})]}),b==="day"&&c.jsxs("div",{className:"flex items-center",children:[c.jsx(ge,{size:"xSmall",allowShapeTransformation:!1,onClick:T,icon:ls,label:"Previous month",title:null}),c.jsx(ge,{size:"xSmall",allowShapeTransformation:!1,onClick:Z,icon:ss,label:"Next month",title:null})]})]}),b==="year"?c.jsx("div",{className:"h-[280px] overflow-y-auto grid grid-cols-3 gap-2 p-2 scrollbar-hide",ref:I,children:$.map(k=>c.jsx(me,{size:"small",variant:k===m.getFullYear()?"filled":"text",onClick:()=>H(k),"data-selected":k===m.getFullYear(),className:g("w-full",{"text-on-surface":k!==m.getFullYear()}),label:k.toString(),children:k},k))}):c.jsxs(c.Fragment,{children:[c.jsx("div",{className:J.weekDays,children:_.map((k,j)=>c.jsx("div",{className:J.weekDay,children:k},j))}),c.jsx("div",{className:"overflow-hidden relative min-h-[240px]",children:c.jsx(U.AnimatePresence,{mode:"popLayout",initial:!1,custom:p,children:c.jsx(U.motion.div,{custom:p,variants:te,initial:"enter",animate:"center",exit:"exit",transition:{type:"spring",bounce:0,duration:.3},className:J.daysGrid,children:E.map((k,j)=>{if(!k.isCurrentMonth)return c.jsx("div",{className:J.dayCell},j);const{isSelected:L,isStart:D,isEnd:z,isInRange:Y}=G(k.date),X=F(k.date),Q=o&&k.date<o||r&&k.date>r||(d==null?void 0:d(k.date));return c.jsx("div",{className:g(J.dayCell,Y&&"bg-primary/20",D&&(A==null?void 0:A[1])&&"bg-gradient-to-r from-transparent to-primary/20",z&&(A==null?void 0:A[0])&&"bg-gradient-to-l from-transparent to-primary/20"),children:c.jsx(me,{className:()=>({button:g("aspect-square h-[40px] p-0",{"text-on-surface":!L&&!X,"opacity-50":Q}),stateLayer:g({"!bg-transparent":Q})}),size:"small",allowShapeTransformation:!1,variant:g({filled:L,outlined:X,text:!L&&!X}),label:k.date.getDate().toString(),onClick:()=>V(k.date),disabled:Q,children:k.date.getDate().toString()})},j)})},m.toISOString())})})]})]})},ks=({variant:t="filled",disabled:n=!1,errorText:s,placeholder:o,suffix:r,name:d,label:u,className:a,supportingText:f,trailingIcon:i,leadingIcon:h,type:x="text",multiline:m=!1,autoComplete:y="on",onChange:p,value:N,defaultValue:b,showSupportingText:M,id:S,style:w,ref:O,...A})=>{const v=l.useId(),E=S||v,$=`${E}-helper`,I=N!==void 0,[P,C]=l.useState(b??""),_=I?N:P,[T,Z]=l.useState(!1),[H,R]=l.useState(!!(s!=null&&s.length)),F=l.useRef(null),V=O||F,G=l.useRef(null),J=l.useRef(null),te=l.useRef(null),k=M??(!!(s!=null&&s.length)||!!(f!=null&&f.length));l.useEffect(()=>{R(!!(s!=null&&s.length))},[s]);const j=()=>{V.current&&!T&&V.current.focus()};l.useEffect(()=>{var ae,de;T?(R(!1),(ae=A.onFocus)==null||ae.call(A,e)):(s!=null&&s.length&&R(!0),(de=A.onBlur)==null||de.call(A,e))},[T]);const L=ae=>{const de=ae.target.value;I||C(de),R(!1),p&&p(ae)},D=x==="date",[z,Y]=l.useState(!1),[X,Q]=l.useState(null),W=l.useMemo(()=>{const ae=String(_);if(!ae)return null;const[de,we,Te]=ae.split("-").map(Number);return de&&we&&Te?new Date(de,we-1,Te):null},[_]),q=()=>{n||(Q(W),Y(!0))};l.useEffect(()=>{Z(!!z)},[z]);const se=()=>{const ae=X?X.toLocaleDateString("en-CA"):"";I||C(ae),p&&p({target:{value:ae,name:d,type:x}}),Y(!1)},re=D&&!i?ns:i,ve=D?"[&::-webkit-calendar-picker-indicator]:hidden cursor-pointer":"",le=zt({showSupportingText:k,isFocused:T,showErrorIcon:H,disabled:n,name:d,label:u,autoComplete:y,className:a,onChange:p,placeholder:o,supportingText:f,type:x,leadingIcon:h,trailingIcon:re,variant:t,errorText:s,value:String(_),suffix:r,multiline:m}),pe=m?on:"input",K=m?{}:{type:x},oe=T||typeof _=="string"&&_.length>0||x=="date",ie=oe&&t==="outlined",ye=!ie;return c.jsxs("div",{ref:G,className:le.textField,style:w,children:[c.jsxs("fieldset",{onClick:j,className:le.content,role:"presentation",children:[c.jsx("div",{className:le.stateLayer}),h&&c.jsx("div",{className:le.leadingIcon,children:l.isValidElement(h)?h:c.jsx(ue,{className:"w-5 h-5",icon:h})}),c.jsx(U.motion.legend,{"aria-hidden":"true",variants:{hidden:{width:0,padding:0},visible:{width:"auto",padding:"0 8px"}},initial:ie?"visible":"hidden",animate:ie?"visible":"hidden",className:"max-w-full ml-2 px-2 text-body-small h-0 overflow-hidden whitespace-nowrap",transition:{duration:.2},children:c.jsx("span",{className:"transform inline-flex -translate-y-1/2 opacity-0",children:u})}),c.jsxs("div",{className:"flex-1 relative",children:[ye&&c.jsx(U.motion.label,{htmlFor:E,className:g("absolute left-4 transition-all duration-300 pointer-events-none",{"text-body-small top-2":t=="filled"&&oe,"text-body-large top-1/2 transform -translate-y-1/2":!(t=="filled"&&oe)}),transition:{duration:.3},layoutId:t==="outlined"?`${E}-label`:void 0,children:c.jsx("span",{className:le.label,children:u})}),ie&&c.jsx(U.motion.label,{htmlFor:E,className:g("absolute left-2 -top-3 px-1 text-body-small z-10",le.label),layoutId:`${E}-label`,transition:{duration:.3},children:u}),c.jsx(pe,{...A,ref:V,value:_,onChange:L,className:g(le.input,ve),id:E,name:d,placeholder:T?o??void 0:"",onFocus:()=>Z(!0),onBlur:()=>Z(!1),disabled:n,autoComplete:y,"aria-invalid":!!(s!=null&&s.length),"aria-describedby":k?$:void 0,...K})]}),c.jsx("div",{className:le.activeIndicator}),!H&&c.jsxs(c.Fragment,{children:[re&&c.jsx("div",{ref:D?J:void 0,onClick:ae=>{ae.stopPropagation(),D&&q()},className:g(le.trailingIcon,D&&"cursor-pointer"),children:c.jsx("div",{className:"flex items-center justify-center w-full h-full",children:l.isValidElement(re)?re:c.jsx(ue,{className:"h-5",icon:re})})}),!re&&r&&c.jsx("span",{className:le.suffix,children:r})]}),H&&c.jsx("div",{className:g(le.trailingIcon,{" absolute right-0":!re}),children:c.jsx(ue,{className:"h-5 text-error",icon:rs})})]}),k&&c.jsx("p",{className:le.supportingText,id:$,children:s!=null&&s.length?s:f!=null&&f.length?f:" "}),D&&z&&c.jsx(c.Fragment,{children:c.jsx(De,{onBlur:ae=>{var de,we;console.log(te.current,!((de=te.current)!=null&&de.contains(ae.relatedTarget))),te.current&&!((we=te.current)!=null&&we.contains(ae.relatedTarget))&&Y(!1)},anchorRef:G,position:"bottom",children:c.jsxs("div",{ref:te,className:"z-50 shadow-xl rounded-[28px] bg-surface-container-high overflow-hidden",children:[c.jsx(Qt,{className:"",value:X,onChange:Q}),c.jsxs("div",{className:"flex justify-end gap-2 p-4 pt-0",children:[c.jsx(me,{variant:"text",size:"small",onClick:()=>Y(!1),children:"Cancel"}),c.jsx(me,{variant:"filled",size:"small",onClick:se,children:"OK"})]})]})})})]})},Ls=({isSelected:t,icon:n,label:s,variant:o})=>({navigationRailItem:g(" group/navigation-rail-item flex flex-col pt-1 pb-1.5 cursor-pointer",{"text-on-surface-variant":!t,"text-on-secondary-container":t,"gap-2 h-[68px]":o=="vertical","gap-0 h-[66px]":o=="horizontal"}),container:g(" w-fit flex justify-center relative rounded-full items-center mx-5",{"bg-secondary-container overflow-hidden":t,"gap-2 ":o=="horizontal","gap-0 ":o=="vertical","p-4":!s},s&&["px-4",{"py-1 ":o=="vertical","py-4 ":o=="horizontal"}]),stateLayer:g("rounded-full"),icon:g("size-6 flex"),label:g("w-fit mx-auto text-nowrap",{"text-label-large ":o=="horizontal","text-label-medium":o=="vertical"})}),js=ee("navigationRailItem",Ls),en=({label:t})=>c.jsx("div",{className:" h-9 flex items-center mx-9 mt-3",children:c.jsx("p",{className:"text-label-large text-on-surface-variant",children:t})}),tn=({className:t,onClick:n,label:s,variant:o="vertical",href:r,icon:d,selectedItem:u,setSelectedItem:a,index:f,onItemSelected:i,selected:h=!1,ref:x,transition:m,isExtended:y,iconSelected:p,style:N,extendedOnly:b,children:M,...S})=>{M&&(s=M);const w=l.useRef(null),O=x||w,[A,v]=l.useState(h);l.useEffect(()=>{h&&u==null?v(!0):v(u==f&&f!=null)},[u]),l.useEffect(()=>{u==f&&i&&i({ref:O,index:f||0,label:s,icon:d})},[u]);const E=r?"a":"button",$=P=>{a&&a(f??null),n&&n(P)},I=js({isExtended:y,extendedOnly:b,className:t,onItemSelected:i,selectedItem:u,index:f,transition:m,selected:A,variant:o,icon:d,label:s,isSelected:A,setSelectedItem:a,href:r,children:s,iconSelected:p});return m={duration:.3,...m},b&&!y?null:c.jsxs(E,{...S,role:"tab","aria-selected":A,ref:O,href:r,className:I.navigationRailItem,onClick:$,style:{transition:m.duration+"s",...N},children:[c.jsxs(U.motion.div,{style:{transition:o=="horizontal"?m.duration+`s, gap ${m.duration/2}s ${m.duration-m.duration/2}s`:m.duration+`s, gap ${m.duration/3}s ${m.duration-m.duration/3}s`},transition:m,className:I.container,children:[c.jsx(fe,{style:{transition:m.duration+"s"},className:I.stateLayer,colorName:g({"on-surface":!A,"on-secondary-container":A}),stateClassName:"state-ripple-group-[navigation-rail-item]"}),d&&c.jsx(ue,{icon:A?p:d,className:I.icon}),c.jsx(U.AnimatePresence,{children:o=="horizontal"&&(()=>{const P={width:0,opacity:0,transition:{...m}},C={width:"auto",opacity:1,transition:{...m,opacity:{duration:m.duration/2,delay:m.duration-m.duration/2}}};return c.jsx(U.motion.span,{initial:P,animate:C,exit:P,className:I.label,children:s})})()})]}),c.jsx(U.AnimatePresence,{children:o=="vertical"&&(()=>{const P={height:0,opacity:0,transition:{...m,opacity:{duration:0}}},C={height:"auto",opacity:1,transition:{...m,opacity:{duration:m.duration/3,delay:m.duration-m.duration/3}}};return c.jsx(U.motion.span,{initial:C,animate:C,exit:P,className:I.label,transition:m,children:s})})()})]})},Is=({isExtended:t,alignment:n})=>({navigationRail:g("flex flex-col left-0 h-full top-0 pt-11",{"w-fit max-w-24":!t,"w-fit min-w-[220px] max-w-[360px]":t,"justify-between":n=="middle","justify-start":n=="top"}),header:g("flex flex-col gap-1 items-start"),menuIcon:"mx-5",segments:g(" flex flex-col overflow-auto min-w-full mt-10",{"w-full":!t,"w-fit items-start":t})}),Ms=ee("navigationRail",Is),Cs=({variant:t="standard",onItemSelected:n,children:s,className:o,selectedItem:r,extended:d,alignment:u="top",menu:a={closed:{icon:as,label:"Open menu"},opened:{icon:be,label:"Close menu"}},style:f,onExtendedChange:i,transition:h,setSelectedItem:x})=>{const[m,y]=l.useState(null),[p,N]=l.useState(d);let b;r==0||r!=null?b=r:b=m;const M=x||y,S=l.useRef(null),w=I=>{n==null||n(I)};function O(I){const P=[];return l.Children.forEach(I,C=>{l.isValidElement(C)&&C.type===l.Fragment?P.push(...O(C.props.children)):P.push(C)}),P}const A=O(s),v=A.filter(I=>l.isValidElement(I)&&I.type===Ne),E=Ms({children:s,onItemSelected:n,selectedItem:b,setSelectedItem:M,className:o,variant:t,extended:p,isExtended:p,alignment:u,menu:a,transition:h,onExtendedChange:i});h={duration:.3,...h};const $=l.useRef(!1);return $.current=!1,l.useEffect(()=>{i==null||i(p??!1)},[p]),c.jsxs("div",{style:{transition:h.duration+"s",...f},ref:S,className:E.navigationRail,children:[c.jsxs("div",{className:E.header,children:[c.jsx(ge,{onClick:()=>N(!p),label:p?a==null?void 0:a.opened.label:a==null?void 0:a.closed.label,className:E.menuIcon,icon:p?a.opened.icon:a==null?void 0:a.closed.icon}),v.length>0&&l.cloneElement(v[0],{transition:h,isExtended:p,className:"!shadow-none mx-5 "+v[0].props.className})]}),c.jsx("div",{className:E.segments,children:(()=>{let I=0;return A.map(P=>l.isValidElement(P)&&P.type===tn?l.cloneElement(P,{key:I,index:I++,variant:p?"horizontal":"vertical",selectedItem:b,setSelectedItem:M,onItemSelected:w,transition:h,extendedOnly:$.current,isExtended:p}):l.isValidElement(P)&&P.type===Ne?null:l.isValidElement(P)&&P.type===en?($.current=!0,p?l.cloneElement(P,{}):null):P)})()}),c.jsx("div",{className:"flex-1 max-h-[160px]"})]})};function Rs(t){return Se.defineConfig({variant:Se.Variants.Udixio,...t,plugins:[new Se.FontPlugin(t),new Ke.TailwindPlugin(t)]})}exports.AnchorPositioner=De;exports.AnimateOnScrollInit=In;exports.Button=me;exports.Card=Qn;exports.Carousel=es;exports.CarouselItem=Xt;exports.Checkbox=cs;exports.Chip=Ie;exports.Chips=ms;exports.CustomScroll=et;exports.DatePicker=Qt;exports.Divider=We;exports.Fab=Ne;exports.FabMenu=ps;exports.Icon=ue;exports.IconButton=ge;exports.NavigationRail=Cs;exports.NavigationRailItem=tn;exports.NavigationRailSection=en;exports.ProgressIndicator=qt;exports.RippleEffect=Ge;exports.SideSheet=xs;exports.Slider=ys;exports.SmoothScroll=vn;exports.Snackbar=gs;exports.State=fe;exports.Switch=vs;exports.SyncedFixedWrapper=rt;exports.Tab=Jt;exports.TabGroup=bs;exports.TabPanel=Zt;exports.TabPanels=Ss;exports.Tabs=ws;exports.TextField=ks;exports.ThemeProvider=Sn;exports.Tooltip=Pe;exports.animateOnScroll=Mn;exports.buttonStyle=Cn;exports.cardStyle=Rn;exports.carouselItemConfig=Fe;exports.carouselItemStyle=Dn;exports.carouselStyle=Fn;exports.checkboxStyle=An;exports.chipStyle=$n;exports.chipsStyle=Wn;exports.classNames=g;exports.classnames=Ze;exports.createUseClassNames=ee;exports.customScrollStyle=Qe;exports.defaultClassNames=ne;exports.defineConfig=Rs;exports.dividerStyle=Pn;exports.fabMenuStyle=Tn;exports.fabStyle=Bn;exports.getClassNames=Ee;exports.iconButtonStyle=Hn;exports.initAnimateOnScroll=Re;exports.normalize=xe;exports.progressIndicatorStyle=On;exports.sideSheetConfig=Ae;exports.sideSheetStyle=It;exports.sliderConfig=$e;exports.sliderStyle=zn;exports.snackbarStyle=Yn;exports.switchStyle=_n;exports.tabPanelStyle=Kn;exports.tabPanelsStyle=Un;exports.tabStyle=qn;exports.tabsStyle=Xn;exports.textFieldStyle=Gn;exports.toolStyle=Jn;exports.useButtonStyle=it;exports.useCardStyle=at;exports.useCarouselItemStyle=ct;exports.useCarouselStyle=dt;exports.useCheckboxStyle=ht;exports.useChipStyle=pt;exports.useChipsStyle=xt;exports.useClassNames=an;exports.useDividerStyle=vt;exports.useFabMenuStyle=Nt;exports.useFabStyle=bt;exports.useIconButtonStyle=kt;exports.useProgressIndicatorStyle=jt;exports.useSideSheetStyle=Vn;exports.useSliderStyle=Mt;exports.useSnackbarStyle=Rt;exports.useStateStyle=st;exports.useSwitchStyle=Ft;exports.useTabPanelStyle=Ot;exports.useTabPanelsStyle=Tt;exports.useTabStyle=$t;exports.useTabsStyle=Pt;exports.useTextFieldStyle=zt;exports.useToolTipStyle=_t;exports.useTooltipTrigger=Gt;
10
+ `})]}),$&&a.jsx(Ie,{ref:B,className:"opacity-0",draggable:s,editable:!0,editing:!0,onChange:v=>{var k;if(v=v.replace(/(&nbsp;)+/g," ").trim(),console.log("Ghost chip onChange",v,!!v),v)I(v);else if(c.length>0){const F=h.current[c.length-1];(k=F==null?void 0:F.focus)==null||k.call(F)}},onEditCommit:()=>{},onBlur:()=>{o(!1)},onFocus:v=>{o(!0),v.stopPropagation()},children:" "})]})};function Jt({trigger:e=["hover","focus"],isOpen:t,defaultOpen:n=!1,onOpenChange:s,openDelay:r=400,closeDelay:u=150,id:c}={}){const l=i.useId(),d=c??`tooltip-${l}`,o=Array.isArray(e)?e:[e],f=typeof t=="boolean",[y,h]=i.useState(n?"hovered":"hidden"),[m,p]=i.useState(!1),b=i.useRef(null),w=i.useRef(null),I=i.useCallback(()=>{b.current&&(clearTimeout(b.current),b.current=null),w.current&&(clearTimeout(w.current),w.current=null)},[]);i.useEffect(()=>()=>I(),[I]);const S=i.useCallback(C=>{if(f){const R=C!=="hidden";s==null||s(R)}else{h(C);const R=C!=="hidden";s==null||s(R)}},[f,s]),g=f?t?"hovered":"hidden":y,B=g!=="hidden",$=C=>{switch(C){case"hidden":return 0;case"hovered":return 1;case"focused":return 2;case"clicked":return 3;default:return 0}},v=i.useCallback(C=>{I(),!($(C)<=$(g))&&(b.current=setTimeout(()=>{S(C)},r))},[I,r,g,S]),k=i.useCallback(C=>{I(),w.current=setTimeout(()=>{(!f&&$(y)<=$(C)||f)&&S("hidden")},u)},[I,u,y,f,S]),F=i.useCallback(()=>{o.includes("hover")&&v("hovered")},[o,v]),j=i.useCallback(()=>{o.includes("hover")&&(g==="focused"||g==="clicked"||m||k("hovered"))},[o,g,m,k]),P=i.useCallback(()=>{o.includes("focus")&&(I(),S("focused"))},[o,I,S]),M=i.useCallback(()=>{if(o.includes("focus")&&g!=="clicked"){if(o.includes("hover")&&m){S("hovered");return}k("focused")}},[o,g,m,k,S]),q=i.useCallback(()=>{o.includes("click")&&(I(),S(g==="clicked"?"hidden":"clicked"))},[o,g,I,S]),V=i.useCallback(C=>{C.key==="Escape"&&B&&(I(),S("hidden"),C.preventDefault())},[B,I,S]),Q=i.useCallback(()=>{p(!0),I()},[I]),W=i.useCallback(()=>{p(!1),o.includes("hover")&&g==="hovered"&&k("hovered")},[o,g,k]);return{triggerProps:{"aria-describedby":B?d:void 0,onMouseEnter:F,onMouseLeave:j,onFocus:P,onBlur:M,onClick:q,onKeyDown:V},tooltipProps:{id:d,role:"tooltip","aria-hidden":!B,onMouseEnter:Q,onMouseLeave:W},isOpen:B,state:g}}const We=({variant:e="plain",buttons:t,className:n,children:s,title:r,text:u,content:c,position:l,targetRef:d,ref:o,trigger:f=["hover","focus"],transition:y,openDelay:h=400,closeDelay:m=150,isOpen:p,defaultOpen:b=!1,onOpenChange:w,id:I,anchorRef:S,...g})=>{const $=l||(e==="rich"?"bottom-right":"bottom");if(y={duration:.3,...y},!s&&!d)throw new Error("Tooltip must have a child or a targetRef");t&&!Array.isArray(t)&&(t=[t]);const v=i.useRef(null),F=S||(d||v),{triggerProps:j,tooltipProps:P,isOpen:M}=Jt({trigger:f,isOpen:p,defaultOpen:b,onOpenChange:w,openDelay:h,closeDelay:m,id:I}),q=!d&&i.isValidElement(s)?i.cloneElement(s,{ref:v,...j,onMouseEnter:W=>{var C,R;j.onMouseEnter(),(R=(C=s.props)==null?void 0:C.onMouseEnter)==null||R.call(C,W)},onMouseLeave:W=>{var C,R;j.onMouseLeave(),(R=(C=s.props)==null?void 0:C.onMouseLeave)==null||R.call(C,W)},onFocus:W=>{var C,R;j.onFocus(),(R=(C=s.props)==null?void 0:C.onFocus)==null||R.call(C,W)},onBlur:W=>{var C,R;j.onBlur(),(R=(C=s.props)==null?void 0:C.onBlur)==null||R.call(C,W)},onClick:W=>{var C,R;j.onClick(),(R=(C=s.props)==null?void 0:C.onClick)==null||R.call(C,W)},onKeyDown:W=>{var C,R;j.onKeyDown(W),(R=(C=s.props)==null?void 0:C.onKeyDown)==null||R.call(C,W)}}):s;i.useEffect(()=>{if(!d)return;const W=d.current;if(!W)return;const C=()=>j.onMouseEnter(),R=()=>j.onMouseLeave(),H=()=>j.onFocus(),U=()=>j.onBlur(),G=()=>j.onClick(),te=E=>j.onKeyDown(E);return W.addEventListener("mouseenter",C),W.addEventListener("mouseleave",R),W.addEventListener("focus",H,!0),W.addEventListener("blur",U,!0),W.addEventListener("click",G),W.addEventListener("keydown",te),j["aria-describedby"]?W.setAttribute("aria-describedby",j["aria-describedby"]):W.removeAttribute("aria-describedby"),()=>{W.removeEventListener("mouseenter",C),W.removeEventListener("mouseleave",R),W.removeEventListener("focus",H,!0),W.removeEventListener("blur",U,!0),W.removeEventListener("click",G),W.removeEventListener("keydown",te)}},[d,j]);const V=qt({variant:e,buttons:t,className:n,title:r,text:u,position:$,trigger:f,targetRef:d,children:s}),Q={open:{opacity:1,height:"auto"},close:{opacity:0,height:16}};return a.jsxs(a.Fragment,{children:[q,a.jsx(X.AnimatePresence,{children:M&&a.jsx(De,{anchorRef:F,position:$,children:a.jsx(X.motion.div,{initial:"close",variants:Q,animate:"open",transition:{duration:y.duration},exit:"close",className:V.toolTip,...g,...P,children:a.jsx("div",{className:V.container,children:c?a.jsx("div",{className:V.content,children:c}):a.jsxs(a.Fragment,{children:[r&&a.jsx("div",{className:V.subHead,children:r}),u&&a.jsx("div",{className:V.supportingText,children:u}),t&&a.jsx("div",{className:V.actions,children:Array.isArray(t)&&t.map((W,C)=>a.jsx(me,{size:"small",variant:"text",...W},C))})]})})})})})]})},Ne=({className:e,label:t,variant:n="primary",size:s="medium",href:r,type:u,icon:c,extended:l=!1,ref:d,transition:o,children:f,...y})=>{if(f&&(t=f),!t)throw new Error("FAB component requires either a label prop or children content");const h=r?"a":"button",m=St({href:r,icon:c,extended:l,label:t,size:s,variant:n,className:e,transition:o,children:t});o={duration:.3,...o};const p=i.useRef(null),b=d||p,w={visible:{width:"auto",marginLeft:12,opacity:1,transition:{...o,opacity:{duration:o.duration/2,delay:o.duration-o.duration/2}}},hidden:{width:0,marginLeft:0,opacity:0,transition:{...o,marginLeft:{duration:o.duration/2,delay:o.duration-o.duration/2}}}};return a.jsxs(h,{...y,ref:b,href:r,"aria-label":l?void 0:t,className:m.fab,children:[a.jsx(We,{trigger:l?null:void 0,text:t,targetRef:b}),a.jsx(de,{style:{transition:o.duration+"s"},className:m.stateLayer,colorName:x({"on-primary":n=="primary","on-secondary":n=="secondary","on-tertiary":n=="tertiary","on-primary-container":n=="primaryContainer","on-secondary-container":n=="secondaryContainer","on-tertiary-container":n=="tertiaryContainer"}),stateClassName:"state-ripple-group-[fab]"}),a.jsx(ae,{icon:c,className:m.icon}),a.jsx(X.AnimatePresence,{children:l&&a.jsx(X.motion.span,{variants:w,initial:"hidden",animate:"visible",exit:"hidden",className:m.label,children:t})})]})},ve=({variant:e="standard",href:t,disabled:n=!1,title:s,label:r,onToggle:u,activated:c=!1,onClick:l,icon:d,size:o="medium",iconSelected:f,className:y,ref:h,width:m="default",shape:p="rounded",allowShapeTransformation:b=!0,transition:w,children:I,...S})=>{if(I&&(r=I),!r)throw new Error("IconButton component requires either a label prop or children content to provide an accessible aria-label");!s&&s!==null&&(s=r);const[g,B]=i.useState(c),$=P=>{n&&P.preventDefault(),u?(B(!g),u(!g)):l&&l(P)};i.useEffect(()=>{B(c)},[c]);const v=t?"a":"button",k=Lt({transition:w,shape:p,allowShapeTransformation:b,width:m,href:t,activated:g,label:r,iconSelected:f,isActive:g,onToggle:u,disabled:n,icon:d,variant:e,className:y,size:o,children:r,...S}),F=i.useRef(null),j=h||F;return w={duration:.3,...w},a.jsxs(v,{disabled:n,href:t,style:{transition:w.duration+"s"},className:k.iconButton,"aria-label":r,...S,title:void 0,onClick:$,ref:j,children:[s!==null&&a.jsx(We,{targetRef:j,trigger:n?null:void 0,text:s}),a.jsx("div",{className:k.touchTarget}),a.jsx(de,{style:{transition:w.duration+"s"},className:k.stateLayer,colorName:x(e==="standard"&&{"on-surface-variant":!g,"on-primary":g},e==="filled"&&{"on-surface-variant":!g&&!!u,"on-primary":g||!u},e==="tonal"&&{"on-secondary":g&&!!u,"on-secondary-container":!g||!u},e==="outlined"&&{"inverse-on-surface":g&&!!u,"on-surface-variant":!g||!u}),stateClassName:"state-ripple-group-[icon-button]"}),d?a.jsx(ae,{icon:d,className:k.icon}):I]})},xs=({className:e,label:t,variant:n="primary",size:s="medium",href:r,icon:u,extended:c=!1,ref:l,transition:d,children:o,open:f,defaultOpen:y=!1,onOpenChange:h,...m})=>{d={duration:.3,ease:"easeInOut",...d};const p=i.useRef(null),b=l||p,w=typeof f=="boolean",[I,S]=i.useState(y),g=w?f:I,B=M=>{w||S(M),h==null||h(M)},$=i.Children.toArray(o).filter(M=>i.isValidElement(M)&&M.type===me),v=Et({href:r,icon:u,extended:c,label:t,size:s,variant:n,className:e,transition:d,children:t,open:g}),k=X.motion.create(Ne),F=X.motion.create(ve),j=M=>a.jsx(k,{icon:u,extended:c,label:t,variant:n+"Container",size:s,className:v.fab+" "+(e??""),"aria-expanded":g,onClick:()=>B(!0),style:{transition:"border-radius 0.3s ease-in-out"},transition:{duration:d.duration,ease:"easeInOut",borderRadius:{duration:d.duration,ease:"easeInOut"},background:{duration:d.duration,ease:"easeInOut"},...d},...M}),P=i.useId();return a.jsxs("div",{className:v.fabMenu,ref:b,...m,children:[a.jsx(X.AnimatePresence,{children:g&&a.jsx("div",{className:v.actions,role:"menu","aria-hidden":!g,children:(()=>{const M=$.length;return $.map((q,V)=>{q.props;const Q=M-1-V,W=((d==null?void 0:d.delay)??0)+Q*.06,C={open:{overflow:"visible",opacity:1,width:"auto",transition:{...d,delay:W,opacity:{delay:(d==null?void 0:d.duration)/2+W}}},close:{overflow:"hidden",opacity:0,width:0,transition:{...d,delay:W,opacity:{duration:(d==null?void 0:d.duration)/1.5}}}};return a.jsx(X.motion.div,{initial:"close",animate:"open",variants:C,transition:d,exit:"close",children:i.cloneElement(q,{key:V,shape:"rounded",variant:"filled",className:()=>({button:x("max-w-full overflow-hidden text-nowrap",{"px-0":!g,"bg-primary-container text-on-primary-container ":n==="primary","bg-secondary-container text-on-secondary-container":n==="secondary","bg-tertiary-container text-on-tertiary-container":n==="tertiary"}),stateLayer:x({"state-on-primary-container":n==="primary","state-on-secondary-container":n==="secondary","state-on-tertiary-container":n==="tertiary"})})})})})})()})}),j({className:"invisible pointer-events-none"}),a.jsxs("div",{className:"absolute right-0 top-0",children:[!g&&j({className:"",layout:!0,layoutId:"fab-menu"+P}),g&&a.jsx(a.Fragment,{children:a.jsx(F,{layout:!0,layoutId:"fab-menu"+P,variant:"filled",className:()=>({iconButton:x({"bg-primary text-on-primary":n==="primary","bg-secondary text-on-secondary":n==="secondary","bg-tertiary text-on-tertiary":n==="tertiary"}),stateLayer:x({"[--default-color:var(--color-on-primary)]":n==="primary","[--default-color:var(--color-on-secondary)]":n==="secondary","[--default-color:var(--color-on-tertiary)]":n==="tertiary"})}),style:{transition:"border-radius 0.3s ease-in-out"},transition:{duration:d.duration,ease:"easeInOut",borderRadius:{duration:d.duration,ease:"easeInOut"},background:{duration:d.duration,ease:"easeInOut"},...d},icon:ls,onClick:()=>B(!1),children:"Close"})})]})]})},vs=({className:e,valueFormatter:t,step:n=10,name:s,value:r=0,min:u=0,max:c=100,marks:l=[{value:0,label:"0"},{value:100,label:"100"}],ref:d,onChange:o,...f})=>{const y=R=>{const H=m(),U=h();return R===1/0?100:R===-1/0?0:(R-H)/(U-H)*100},h=(R=!1)=>R?c:c==1/0?l[(l==null?void 0:l.length)-1].value:c,m=(R=!1)=>R?u:u==-1/0?l[0].value:u,p=R=>{const H=m(!1);return(h(!1)-H)*R/100+H},[b,w]=i.useState(!1),I=i.useRef(null),S=d||I,[g,B]=i.useState(r),[$,v]=i.useState(y(r)),[k,F]=i.useState(!1);i.useEffect(()=>{B(r),v(y(r))},[r]);const j=R=>{F(!0),w(!0),q(R)},P=()=>{F(!1),w(!1)};i.useEffect(()=>(k?(window.addEventListener("mouseup",P),window.addEventListener("mousemove",q),window.addEventListener("touchend",P),window.addEventListener("touchmove",q)):(window.removeEventListener("mouseup",P),window.removeEventListener("mousemove",q),window.removeEventListener("touchend",P),window.removeEventListener("touchmove",q)),()=>{window.removeEventListener("mouseup",P),window.removeEventListener("mousemove",q),window.removeEventListener("touchend",P),window.removeEventListener("touchmove",q)}),[k]);const M=Ct({className:e,isChanging:b,marks:l,max:c,min:u,name:s,step:n,value:g,valueFormatter:t,onChange:o}),q=R=>{const H=S==null?void 0:S.current;if(H){const U=H.getBoundingClientRect().left,te=((R.type==="touchmove"||R.type==="touchstart"?R.touches[0].clientX:R.clientX)-U)/H.offsetWidth*100;V({percent:te})}},V=({percent:R,value:H})=>{if(R){if(R>=100){B(h(!0)),v(100);return}if(R<=0){B(m(!0)),v(0);return}H=p(R),H==m()&&(H=m(!0)),H==h()&&(H=h(!0))}else if(H!=null){if(H>=h()){B(h(!0)),v(100);return}if(H<=m()){B(m(!0)),v(0);return}R=y(H)}else return;n!=null?H=Math.round((H-m())/n)*n+m():l&&(H=l.reduce((U,G,te)=>{let E=G.value===1/0?h():G.value===-1/0?m():G.value,L=U.value===1/0?h():U.value===-1/0?m():U.value;return E=Math.abs(E-H),L=Math.abs(L-H),E<L?G:U}).value),H>=h()&&(H=h(!0)),H<=m()&&(H=m(!0)),R=y(H),B(H),v(R),o&&o(H)},[Q,W]=i.useState(0);i.useEffect(()=>{const R=()=>{S.current&&W(S.current.offsetWidth)};return R(),window.addEventListener("resize",R),()=>{window.removeEventListener("resize",R)}},[]);const C=R=>{switch(R.key){case"ArrowRight":if(n)V({value:g+n});else if(l){const H=l.find(U=>U.value>g);H&&V({value:H.value})}break;case"ArrowLeft":if(n)V({value:g-n});else if(l){const H=l.slice(0).reverse().find((U,G,te)=>g===1/0?G===1:U.value<g);H&&V({value:H.value})}break;default:return}};return a.jsxs("div",{tabIndex:0,onKeyDown:C,role:"slider","aria-valuemin":m(!0),"aria-valuemax":h(!0),"aria-valuenow":g,"aria-valuetext":g.toString(),className:M.slider,onMouseDown:j,onClick:q,ref:S,onTouchStart:j,onDragStart:R=>R.preventDefault(),...f,children:[a.jsx("input",{type:"hidden",name:s,value:g}),a.jsx("div",{className:M.activeTrack,style:{flex:$/100}}),a.jsx("div",{className:M.handle,children:a.jsx(X.AnimatePresence,{children:b&&a.jsx(X.motion.div,{className:M.valueIndicator,initial:"hidden",animate:"visible",exit:"hidden",style:{translate:"-50%",transformOrigin:"center bottom",textWrap:"nowrap"},variants:{visible:{opacity:1,scale:1},hidden:{opacity:1,scale:0}},transition:{duration:.1},children:t?t(g):g})})}),a.jsx("div",{className:M.inactiveTrack,style:{flex:1-$/100}}),a.jsx("div",{className:"w-[calc(100%-12px)] h-full absolute -translate-x-1/2 transform left-1/2",children:l&&l.map((R,H)=>{let U=null;const G=(b?9:10)/Q*100,te=y(R.value);return te<=$-G?U=!0:te>=$+G&&(U=!1),a.jsx("div",{className:x(M.dot,{"bg-primary-container":U!=null&&U,"bg-primary":U!=null&&!U}),style:{left:`${y(R.value)}%`}},H)})})]})},gs=({variant:e="standard",className:t,children:n,title:s,position:r="right",extended:u,divider:c,onExtendedChange:l,closeIcon:d=we,transition:o,...f})=>{o={duration:.3,...o};const[y,h]=i.useState(u??!0),m=Mt({transition:o,title:s,position:r,closeIcon:d,className:t,children:n,onExtendedChange:l,divider:c,isExtended:y,extended:y,variant:e});i.useEffect(()=>{l==null||l(y??!1)},[y]),i.useEffect(()=>{u!=null&&h(u)},[u]);const p={close:{width:0},open:{width:"auto"}},b=()=>a.jsxs(a.Fragment,{children:[a.jsx(X.AnimatePresence,{children:e=="modal"&&y&&a.jsx(X.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:o,onClick:()=>h(!1),className:m.overlay})}),a.jsx(X.AnimatePresence,{children:y&&a.jsxs("div",{...f,className:m.sideSheet,style:{transition:o.duration+"s"},children:[a.jsxs(X.motion.div,{variants:p,initial:u===!1?"open":"close",animate:"open",exit:"close",className:m.container,children:[a.jsxs("div",{className:m.header,children:[s&&a.jsx("p",{className:m.title,children:s}),a.jsx(ve,{size:"small",label:"close",icon:d,onClick:()=>h(!1),className:m.closeButton})]}),a.jsx("div",{className:m.content,style:{transition:o.duration+"s"},children:n})]}),(c==null&&e=="standard"?!0:c)&&a.jsx(Pe,{className:m.divider,orientation:"vertical"})]})})]});return e=="modal"?Me.createPortal(b(),document.body):b()},ws=({message:e,className:t,duration:n,closeIcon:s=we,onClose:r,...u})=>{const[c,l]=i.useState(!0),d=Dt({className:t,closeIcon:s,duration:n,isVisible:c,onClose:r,message:e});i.useEffect(()=>{n&&setTimeout(()=>{o()},n)},[n]);const o=()=>{l(!1),r==null||r()};return a.jsx(X.AnimatePresence,{children:c&&a.jsx(X.motion.div,{initial:{height:0},animate:{height:"auto"},exit:{height:0},transition:{duration:.1},className:d.snackbar,...u,children:a.jsxs("div",{className:d.container,children:[a.jsx("p",{className:d.supportingText,children:e}),a.jsx(ve,{onClick:()=>o(),className:d.icon,icon:s,label:"close the snackbar"})]})})})},bs=({selected:e=!1,className:t,activeIcon:n,disabled:s=!1,inactiveIcon:r,onChange:u,onClick:c,onKeyDown:l,ref:d,...o})=>{const[f,y]=i.useState(e);i.useEffect(()=>{y(e)},[e]);const h=S=>{s||(p(),c&&c(S))},m=S=>{s||((S.key===" "||S.key==="Enter")&&(S.preventDefault(),p()),l&&l(S))},p=()=>{y(!f),u==null||u(!f)},b=Ft({className:t,isSelected:f,activeIcon:n,inactiveIcon:r,disabled:s,selected:f,onChange:u}),w=i.useRef(null),I=d||w;return a.jsxs(X.motion.div,{role:"switch","aria-checked":f,tabIndex:s?-1:0,onKeyDown:m,onClick:h,ref:I,className:b.switch,...o,children:[a.jsx("input",{type:"hidden",value:f?"1":"0"}),a.jsxs(X.motion.div,{layout:!0,style:{translate:f?"50%":"-50%"},transition:{type:"spring",stiffness:700,damping:30},className:b.handleContainer,children:[a.jsx("div",{className:b.handle,children:(f?n:r)&&a.jsx(ae,{className:b.icon,icon:f?n:r})}),a.jsx("div",{className:b.handleStateLayer})]})]})},Zt=({className:e,onClick:t,label:n,variant:s="primary",href:r,icon:u,selectedTab:c,setSelectedTab:l,tabsId:d,index:o,onTabSelected:f,scrollable:y=!1,selected:h=!1,children:m,ref:p,...b})=>{const w=i.useRef(null),I=p||w,S=n??(typeof m=="string"?m:void 0),[g,B]=i.useState(h);i.useEffect(()=>{h&&c==null?B(!0):B(c==o&&o!=null)},[c]),i.useEffect(()=>{c==o&&f&&f({ref:I,index:o||0,label:S,icon:u})},[c]);const $=r?"a":"button",v=F=>{l&&l(o??null),t&&t(F)},k=Pt({className:e,onTabSelected:f,scrollable:y,selectedTab:c,index:o,tabsId:d,selected:g,variant:s,icon:u,label:S,isSelected:g,setSelectedTab:l,href:r});return a.jsxs($,{...b,role:"tab","aria-selected":g,ref:I,href:r,className:k.tab,onClick:v,...b,children:[a.jsx(de,{style:{transition:.3+"s"},className:k.stateLayer,colorName:s==="primary"&&g?"primary":"on-surface",stateClassName:"state-ripple-group-[tab]"}),a.jsxs("span",{className:k.content,children:[u&&a.jsx(ae,{icon:u,className:k.icon}),a.jsx("span",{className:k.label,children:S}),g&&a.jsx(X.motion.span,{layoutId:`underline-${d}`,className:k.underline,transition:{duration:.3}})]})]})},Te=i.createContext(null),Ss=({variant:e="primary",onTabSelected:t,children:n,className:s,selectedTab:r,setSelectedTab:u,scrollable:c=!1})=>{const l=i.useContext(Te),[d,o]=i.useState(null);let f;r===0||r!=null?f=r:l?f=l.selectedTab:f=d;const y=u??(l==null?void 0:l.setSelectedTab)??o,h=i.Children.toArray(n).filter(I=>i.isValidElement(I)&&I.type===Zt),m=i.useRef(null),p=I=>{if(t==null||t(I),c){const S=m.current,g=I.ref.current;if(S&&g){const B=g.offsetLeft+g.offsetWidth/2-S.offsetWidth/2;S.scrollTo({left:B,behavior:"smooth"})}}},b=i.useMemo(()=>(l==null?void 0:l.tabsId)??Gt(),[l==null?void 0:l.tabsId]),w=Tt({children:n,onTabSelected:t,scrollable:c,selectedTab:f,setSelectedTab:y,className:s,variant:e});return a.jsx("div",{ref:m,role:"tablist",className:w.tabs,children:h.map((I,S)=>i.cloneElement(I,{key:S,index:S,variant:e,selectedTab:f,setSelectedTab:y,tabsId:b,onTabSelected:p,scrollable:c}))})},Ns=({children:e,selectedTab:t,setSelectedTab:n,defaultTab:s=0})=>{const[r,u]=i.useState(s),c=i.useRef(null),l=t!==void 0?t:r,d=n??u,o=c.current!==null&&l!==null?l>c.current?1:-1:0;l!==c.current&&(c.current=l);const f=i.useId(),y=i.useMemo(()=>({selectedTab:l,setSelectedTab:d,previousTab:c.current,direction:o,tabsId:f}),[l,d,o,f]);return a.jsx(Te.Provider,{value:y,children:e})},Qt=({children:e,className:t,isSelected:n=!1})=>{const s=Vt({children:e,className:t,isSelected:n});return a.jsx("div",{className:s.tabPanel,children:e})},Es=({children:e,className:t})=>{const n=i.useContext(Te);if(!n)return console.warn("TabPanels must be used within a TabGroup"),null;const{selectedTab:s,direction:r,tabsId:u}=n,c=i.Children.toArray(e).filter(d=>i.isValidElement(d)&&d.type===Qt),l=Ht({children:e,className:t});return a.jsx("div",{className:l.tabPanels,children:a.jsx(X.AnimatePresence,{initial:!1,custom:r,mode:"popLayout",children:c.map((d,o)=>s===o&&a.jsx(X.motion.div,{custom:r,variants:{enter:f=>({x:f*100+"%",opacity:1}),center:{x:0,opacity:1},exit:f=>({x:f*-100+"%",opacity:1})},initial:"enter",animate:"center",exit:"exit",transition:{type:"spring",stiffness:400,damping:40},role:"tabpanel","aria-labelledby":`tab-${u}-${o}`,children:i.cloneElement(d,{isSelected:!0})},o))})})},ks=({hasSelected:e})=>({datePicker:x("inline-flex flex-col bg-surface-container-high rounded-[28px] p-3 select-none","min-w-[320px]"),header:x("flex items-center justify-between h-12 mb-2 px-2"),monthNav:x("flex items-center justify-center w-10 h-10 rounded-full text-on-surface-variant hover:bg-on-surface-variant/8 transition-colors cursor-pointer"),monthLabel:x("text-label-large text-on-surface font-bold capitalize"),weekDays:x("grid grid-cols-7 mb-2"),weekDay:x("h-10 flex items-center justify-center text-body-small text-on-surface-variant"),daysGrid:x("grid grid-cols-7 row-auto gap-y-2"),dayCell:x("flex items-center justify-center h-10 p-0 relative"),dayButton:x("w-10 h-10 rounded-full flex items-center justify-center text-body-large transition-all duration-200 relative overflow-hidden z-10 outline-none")}),Ls=ee("datePicker",ks),en=({value:e,defaultValue:t,onChange:n,minDate:s,maxDate:r,shouldDisableDate:u,locale:c="default",weekStartDay:l=0,className:d,style:o,mode:f="single",...y})=>{const[h,m]=i.useState(()=>{const E=N=>N instanceof Date?N:Array.isArray(N)&&N[0]?N[0]:null,L=E(e)||E(t)||new Date;return new Date(L.getFullYear(),L.getMonth(),1)}),[p,b]=i.useState(0),[w,I]=i.useState("day"),S=e!==void 0,[g,B]=i.useState(t||null),$=S?e||null:g,v=(E,L)=>new Date(E,L+1,0).getDate(),k=i.useMemo(()=>{const E=h.getFullYear(),L=h.getMonth(),N=v(E,L),O=(new Date(E,L,1).getDay()-l+7)%7,_=[],z=v(E,L-1);for(let Y=O-1;Y>=0;Y--)_.push({date:new Date(E,L-1,z-Y),isCurrentMonth:!1});for(let Y=1;Y<=N;Y++)_.push({date:new Date(E,L,Y),isCurrentMonth:!0});const D=42-_.length;for(let Y=1;Y<=D;Y++)_.push({date:new Date(E,L+1,Y),isCurrentMonth:!1});return _},[h,l]),F=i.useMemo(()=>{const E=new Date().getFullYear(),L=E-100,N=E+100,A=[];for(let O=L;O<=N;O++)A.push(O);return A},[]),j=i.useRef(null);i.useEffect(()=>{if(w==="year"&&j.current){const E=j.current.querySelector('[data-selected="true"]');E&&E.scrollIntoView({block:"center"})}},[w]);const P=i.useMemo(()=>new Intl.DateTimeFormat(c,{month:"long",year:"numeric"}),[c]),M=i.useMemo(()=>new Intl.DateTimeFormat(c,{weekday:"narrow"}),[c]),q=i.useMemo(()=>{const E=new Date(2023,0,1+l);return Array.from({length:7}).map((L,N)=>{const A=new Date(E);return A.setDate(E.getDate()+N),M.format(A).charAt(0).toUpperCase()})},[M,l]),V=()=>{b(-1),m(E=>new Date(E.getFullYear(),E.getMonth()-1,1))},Q=()=>{b(1),m(E=>new Date(E.getFullYear(),E.getMonth()+1,1))},W=E=>{m(L=>new Date(E,L.getMonth(),1)),I("day")},C=(E,L)=>E?E.getDate()===L.getDate()&&E.getMonth()===L.getMonth()&&E.getFullYear()===L.getFullYear():!1,R=E=>C(new Date,E),H=E=>{let L=E;if(f==="single")L=E;else{const N=$,[A,O]=Array.isArray(N)?N:[null,null];!A||A&&O?L=[E,null]:E<A?L=[E,A]:L=[A,E]}S||B(L),n&&n(L)},U=E=>{if(f==="single")return{isSelected:C($,E),isStart:!1,isEnd:!1,isInRange:!1};const L=Array.isArray($)?$:[$,null],[N,A]=L,O=C(N,E),_=C(A,E);let z=!1;if(N&&A){const Z=new Date(N.getFullYear(),N.getMonth(),N.getDate()).getTime(),D=new Date(A.getFullYear(),A.getMonth(),A.getDate()).getTime(),Y=new Date(E.getFullYear(),E.getMonth(),E.getDate()).getTime();z=Y>Z&&Y<D}return{isSelected:O||_,isStart:O,isEnd:_,isInRange:z}},G=Ls({hasSelected:!!$}),te={enter:E=>({x:E>0?"100%":"-100%",opacity:0}),center:{x:0,opacity:1},exit:E=>({x:E<0?"100%":"-100%",opacity:0})};return a.jsxs("div",{className:x(G.datePicker,d),style:o,...y,children:[a.jsxs("div",{className:G.header,children:[a.jsxs(me,{variant:"text",disableTextMargins:!0,size:"small",onClick:()=>I(E=>E==="day"?"year":"day"),className:"text-label-large font-bold capitalize text-on-surface hover:bg-surface-container-highest",children:[a.jsx("span",{className:"mr-2",children:w==="day"?P.format(h):h.getFullYear()}),a.jsx(ae,{icon:as,className:x("w-3 h-3 transition-transform duration-200 inline",w==="year"&&"rotate-180")})]}),w==="day"&&a.jsxs("div",{className:"flex items-center",children:[a.jsx(ve,{size:"xSmall",allowShapeTransformation:!1,onClick:V,icon:cs,label:"Previous month",title:null}),a.jsx(ve,{size:"xSmall",allowShapeTransformation:!1,onClick:Q,icon:os,label:"Next month",title:null})]})]}),w==="year"?a.jsx("div",{className:"h-[280px] overflow-y-auto grid grid-cols-3 gap-2 p-2 scrollbar-hide",ref:j,children:F.map(E=>a.jsx(me,{size:"small",variant:E===h.getFullYear()?"filled":"text",onClick:()=>W(E),"data-selected":E===h.getFullYear(),className:x("w-full",{"text-on-surface":E!==h.getFullYear()}),label:E.toString(),children:E},E))}):a.jsxs(a.Fragment,{children:[a.jsx("div",{className:G.weekDays,children:q.map((E,L)=>a.jsx("div",{className:G.weekDay,children:E},L))}),a.jsx("div",{className:"overflow-hidden relative min-h-[240px]",children:a.jsx(X.AnimatePresence,{mode:"popLayout",initial:!1,custom:p,children:a.jsx(X.motion.div,{custom:p,variants:te,initial:"enter",animate:"center",exit:"exit",transition:{type:"spring",bounce:0,duration:.3},className:G.daysGrid,children:k.map((E,L)=>{if(!E.isCurrentMonth)return a.jsx("div",{className:G.dayCell},L);const{isSelected:N,isStart:A,isEnd:O,isInRange:_}=U(E.date),z=R(E.date),Z=s&&E.date<s||r&&E.date>r||(u==null?void 0:u(E.date));return a.jsx("div",{className:x(G.dayCell,_&&"bg-primary/20",A&&($==null?void 0:$[1])&&"bg-gradient-to-r from-transparent to-primary/20",O&&($==null?void 0:$[0])&&"bg-gradient-to-l from-transparent to-primary/20"),children:a.jsx(me,{className:()=>({button:x("aspect-square h-[40px] p-0",{"text-on-surface":!N&&!z,"opacity-50":Z}),stateLayer:x({"!bg-transparent":Z})}),size:"small",allowShapeTransformation:!1,variant:x({filled:N,outlined:z,text:!N&&!z}),label:E.date.getDate().toString(),onClick:()=>H(E.date),disabled:Z,children:E.date.getDate().toString()})},L)})},h.toISOString())})})]})]})},js=({variant:e="filled",autoFocus:t,disabled:n=!1,errorText:s,placeholder:r,suffix:u,name:c,label:l,className:d,supportingText:o,trailingIcon:f,leadingIcon:y,type:h="text",multiline:m=!1,autoComplete:p="on",onChange:b,value:w,defaultValue:I,showSupportingText:S,id:g,style:B,ref:$,onFocus:v,onBlur:k,...F})=>{const j=i.useId(),P=g||j,M=`${P}-helper`,q=w!==void 0,[V,Q]=i.useState(I??""),W=q?w:V,[C,R]=i.useState(!1),[H,U]=i.useState(!!(s!=null&&s.length)),G=i.useRef(null),te=$||G,E=i.useRef(null),L=i.useRef(null),N=i.useRef(null),A=S??(!!(s!=null&&s.length)||!!(o!=null&&o.length));i.useEffect(()=>{U(!!(s!=null&&s.length))},[s]);const O=()=>{te.current&&!C&&te.current.focus()};i.useEffect(()=>{if(!t||n)return;const le=window.requestAnimationFrame(()=>{O()});return()=>window.cancelAnimationFrame(le)},[t,n,te]),i.useEffect(()=>{C?(U(!1),v==null||v()):(s!=null&&s.length&&U(!0),k==null||k())},[C]);const _=le=>{const fe=le.target.value;q||Q(fe),U(!1),b&&b(le)},z=h==="date",[Z,D]=i.useState(!1),[Y,se]=i.useState(null),ie=i.useMemo(()=>{const le=String(W);if(!le)return null;const[fe,Be,He]=le.split("-").map(Number);return fe&&Be&&He?new Date(fe,Be-1,He):null},[W]),ge=()=>{n||(se(ie),D(!0))};i.useEffect(()=>{R(!!Z)},[Z]);const ue=()=>{const le=Y?Y.toLocaleDateString("en-CA"):"";q||Q(le),b&&b({target:{value:le,name:c,type:h}}),D(!1)},ce=z&&!f?rs:f,K=z?"[&::-webkit-calendar-picker-indicator]:hidden cursor-pointer":"",J=Yt({showSupportingText:A,isFocused:C,showErrorIcon:H,disabled:n,name:c,label:l,autoComplete:p,className:d,onChange:b,placeholder:r,supportingText:o,type:h,leadingIcon:y,trailingIcon:ce,variant:e,errorText:s,value:String(W),suffix:u,multiline:m}),re=m?an:"input",pe=m?{}:{type:h},ye=C||typeof W=="string"&&W.length>0||h=="date",be=ye&&e==="outlined",sn=!be;return a.jsxs("div",{ref:E,className:J.textField,style:B,children:[a.jsxs("fieldset",{onClick:O,className:J.content,role:"presentation",children:[a.jsx("div",{className:J.stateLayer}),y&&a.jsx("div",{className:J.leadingIcon,children:i.isValidElement(y)?y:a.jsx(ae,{className:"w-5 h-5",icon:y})}),a.jsx(X.motion.legend,{"aria-hidden":"true",variants:{hidden:{width:0,padding:0},visible:{width:"auto",padding:"0 8px"}},initial:be?"visible":"hidden",animate:be?"visible":"hidden",className:"max-w-full ml-2 px-2 text-body-small h-0 overflow-hidden whitespace-nowrap",transition:{duration:.2},children:a.jsx("span",{className:"transform inline-flex -translate-y-1/2 opacity-0",children:l})}),a.jsxs("div",{className:"flex-1 relative",children:[sn&&a.jsx(X.motion.label,{htmlFor:P,className:x("absolute left-4 transition-all duration-300 pointer-events-none",{"text-body-small top-2":e=="filled"&&ye,"text-body-large top-1/2 transform -translate-y-1/2":!(e=="filled"&&ye)}),transition:{duration:.3},layoutId:e==="outlined"?`${P}-label`:void 0,children:a.jsx("span",{className:J.label,children:l})}),be&&a.jsx(X.motion.label,{htmlFor:P,className:x("absolute left-2 -top-3 px-1 text-body-small z-10",J.label),layoutId:`${P}-label`,transition:{duration:.3},children:l}),a.jsx(re,{...F,ref:te,value:W,onChange:_,className:x(J.input,K),id:P,name:c,placeholder:C?r??void 0:"",onFocus:()=>R(!0),onBlur:()=>R(!1),disabled:n,autoComplete:p,"aria-invalid":!!(s!=null&&s.length),"aria-describedby":A?M:void 0,autoFocus:t,...pe})]}),a.jsx("div",{className:J.activeIndicator}),!H&&a.jsxs(a.Fragment,{children:[ce&&a.jsx("div",{ref:z?L:void 0,onClick:le=>{le.stopPropagation(),z&&ge()},className:x(J.trailingIcon,z&&"cursor-pointer"),children:a.jsx("div",{className:"flex items-center justify-center w-full h-full",children:i.isValidElement(ce)?ce:a.jsx(ae,{className:"h-5",icon:ce})})}),!ce&&u&&a.jsx("span",{className:J.suffix,children:u})]}),H&&a.jsx("div",{className:x(J.trailingIcon,{" absolute right-0":!ce}),children:a.jsx(ae,{className:"h-5 text-error",icon:is})})]}),A&&a.jsx("p",{className:J.supportingText,id:M,children:s!=null&&s.length?s:o!=null&&o.length?o:" "}),z&&Z&&a.jsx(a.Fragment,{children:a.jsx(De,{onBlur:le=>{var fe;N.current&&!((fe=N.current)!=null&&fe.contains(le.relatedTarget))&&D(!1)},anchorRef:E,position:"bottom",children:a.jsxs("div",{ref:N,className:"z-50 shadow-xl rounded-[28px] bg-surface-container-high overflow-hidden",children:[a.jsx(en,{className:"",value:Y,onChange:se}),a.jsxs("div",{className:"flex justify-end gap-2 p-4 pt-0",children:[a.jsx(me,{variant:"text",size:"small",onClick:()=>D(!1),children:"Cancel"}),a.jsx(me,{variant:"filled",size:"small",onClick:ue,children:"OK"})]})]})})})]})},Is=({isSelected:e,icon:t,label:n,variant:s})=>({navigationRailItem:x(" group/navigation-rail-item flex flex-col pt-1 pb-1.5 cursor-pointer",{"text-on-surface-variant":!e,"text-on-secondary-container":e,"gap-2 h-[68px]":s=="vertical","gap-0 h-[66px]":s=="horizontal"}),container:x(" w-fit flex justify-center relative rounded-full items-center mx-5",{"bg-secondary-container overflow-hidden":e,"gap-2 ":s=="horizontal","gap-0 ":s=="vertical","p-4":!n},n&&["px-4",{"py-1 ":s=="vertical","py-4 ":s=="horizontal"}]),stateLayer:x("rounded-full"),icon:x("size-6 flex"),label:x("w-fit mx-auto text-nowrap",{"text-label-large ":s=="horizontal","text-label-medium":s=="vertical"})}),Ms=ee("navigationRailItem",Is),tn=({label:e})=>a.jsx("div",{className:" h-9 flex items-center mx-9 mt-3",children:a.jsx("p",{className:"text-label-large text-on-surface-variant",children:e})}),nn=({className:e,onClick:t,label:n,variant:s="vertical",href:r,icon:u,selectedItem:c,setSelectedItem:l,index:d,onItemSelected:o,selected:f=!1,ref:y,transition:h,isExtended:m,iconSelected:p,style:b,extendedOnly:w,children:I,...S})=>{I&&(n=I);const g=i.useRef(null),B=y||g,[$,v]=i.useState(f);i.useEffect(()=>{f&&c==null?v(!0):v(c==d&&d!=null)},[c]),i.useEffect(()=>{c==d&&o&&o({ref:B,index:d||0,label:n,icon:u})},[c]);const k=r?"a":"button",F=P=>{l&&l(d??null),t&&t(P)},j=Ms({isExtended:m,extendedOnly:w,className:e,onItemSelected:o,selectedItem:c,index:d,transition:h,selected:$,variant:s,icon:u,label:n,isSelected:$,setSelectedItem:l,href:r,children:n,iconSelected:p});return h={duration:.3,...h},w&&!m?null:a.jsxs(k,{...S,role:"tab","aria-selected":$,ref:B,href:r,className:j.navigationRailItem,onClick:F,style:{transition:h.duration+"s",...b},children:[a.jsxs(X.motion.div,{style:{transition:s=="horizontal"?h.duration+`s, gap ${h.duration/2}s ${h.duration-h.duration/2}s`:h.duration+`s, gap ${h.duration/3}s ${h.duration-h.duration/3}s`},transition:h,className:j.container,children:[a.jsx(de,{style:{transition:h.duration+"s"},className:j.stateLayer,colorName:x({"on-surface":!$,"on-secondary-container":$}),stateClassName:"state-ripple-group-[navigation-rail-item]"}),u&&a.jsx(ae,{icon:$?p:u,className:j.icon}),a.jsx(X.AnimatePresence,{children:s=="horizontal"&&(()=>{const P={width:0,opacity:0,transition:{...h}},M={width:"auto",opacity:1,transition:{...h,opacity:{duration:h.duration/2,delay:h.duration-h.duration/2}}};return a.jsx(X.motion.span,{initial:P,animate:M,exit:P,className:j.label,children:n})})()})]}),a.jsx(X.AnimatePresence,{children:s=="vertical"&&(()=>{const P={height:0,opacity:0,transition:{...h,opacity:{duration:0}}},M={height:"auto",opacity:1,transition:{...h,opacity:{duration:h.duration/3,delay:h.duration-h.duration/3}}};return a.jsx(X.motion.span,{initial:M,animate:M,exit:P,className:j.label,transition:h,children:n})})()})]})},Cs=({isExtended:e,alignment:t})=>({navigationRail:x("flex flex-col left-0 h-full top-0 pt-11",{"w-fit max-w-24":!e,"w-fit min-w-[220px] max-w-[360px]":e,"justify-between":t=="middle","justify-start":t=="top"}),header:x("flex flex-col gap-1 items-start"),menuIcon:"mx-5",segments:x(" flex flex-col overflow-auto min-w-full mt-10",{"w-full":!e,"w-fit items-start":e})}),Rs=ee("navigationRail",Cs),Ds=({variant:e="standard",onItemSelected:t,children:n,className:s,selectedItem:r,extended:u,alignment:c="top",menu:l={closed:{icon:us,label:"Open menu"},opened:{icon:we,label:"Close menu"}},style:d,onExtendedChange:o,transition:f,setSelectedItem:y})=>{const[h,m]=i.useState(null),[p,b]=i.useState(u);let w;r==0||r!=null?w=r:w=h;const I=y||m,S=i.useRef(null),g=j=>{t==null||t(j)};function B(j){const P=[];return i.Children.forEach(j,M=>{i.isValidElement(M)&&M.type===i.Fragment?P.push(...B(M.props.children)):P.push(M)}),P}const $=B(n),v=$.filter(j=>i.isValidElement(j)&&j.type===Ne),k=Rs({children:n,onItemSelected:t,selectedItem:w,setSelectedItem:I,className:s,variant:e,extended:p,isExtended:p,alignment:c,menu:l,transition:f,onExtendedChange:o});f={duration:.3,...f};const F=i.useRef(!1);return F.current=!1,i.useEffect(()=>{o==null||o(p??!1)},[p]),a.jsxs("div",{style:{transition:f.duration+"s",...d},ref:S,className:k.navigationRail,children:[a.jsxs("div",{className:k.header,children:[a.jsx(ve,{onClick:()=>b(!p),label:p?l==null?void 0:l.opened.label:l==null?void 0:l.closed.label,className:k.menuIcon,icon:p?l.opened.icon:l==null?void 0:l.closed.icon}),v.length>0&&i.cloneElement(v[0],{transition:f,isExtended:p,className:"!shadow-none mx-5 "+v[0].props.className})]}),a.jsx("div",{className:k.segments,children:(()=>{let j=0;return $.map(P=>i.isValidElement(P)&&P.type===nn?i.cloneElement(P,{key:j,index:j++,variant:p?"horizontal":"vertical",selectedItem:w,setSelectedItem:I,onItemSelected:g,transition:f,extendedOnly:F.current,isExtended:p}):i.isValidElement(P)&&P.type===Ne?null:i.isValidElement(P)&&P.type===tn?(F.current=!0,p?i.cloneElement(P,{}):null):P)})()}),a.jsx("div",{className:"flex-1 max-h-[160px]"})]})};function As(e){return Se.defineConfig({variant:Se.Variants.Udixio,...e,plugins:[new Se.FontPlugin(e),new Ge.TailwindPlugin(e)]})}exports.AnchorPositioner=De;exports.AnimateOnScrollInit=Cn;exports.Button=me;exports.Card=ts;exports.Carousel=ns;exports.CarouselItem=Ut;exports.Checkbox=ds;exports.Chip=Ie;exports.Chips=ys;exports.CustomScroll=tt;exports.DatePicker=en;exports.Divider=Pe;exports.Fab=Ne;exports.FabMenu=xs;exports.Icon=ae;exports.IconButton=ve;exports.NavigationRail=Ds;exports.NavigationRailItem=nn;exports.NavigationRailSection=tn;exports.ProgressIndicator=Xt;exports.RippleEffect=Je;exports.SideSheet=gs;exports.Slider=vs;exports.SmoothScroll=bn;exports.Snackbar=ws;exports.State=de;exports.Switch=bs;exports.SyncedFixedWrapper=ot;exports.Tab=Zt;exports.TabGroup=Ns;exports.TabPanel=Qt;exports.TabPanels=Es;exports.Tabs=Ss;exports.TextField=js;exports.ThemeProvider=En;exports.Tooltip=We;exports.animateOnScroll=Rn;exports.buttonStyle=Dn;exports.cardStyle=An;exports.carouselItemConfig=Ae;exports.carouselItemStyle=Fn;exports.carouselStyle=$n;exports.checkboxStyle=Pn;exports.chipStyle=Wn;exports.chipsStyle=Tn;exports.classNames=x;exports.classnames=Qe;exports.createUseClassNames=ee;exports.customScrollStyle=et;exports.defaultClassNames=ne;exports.defineConfig=As;exports.dividerStyle=Bn;exports.fabMenuStyle=On;exports.fabStyle=Hn;exports.getClassNames=Ee;exports.iconButtonStyle=Vn;exports.initAnimateOnScroll=Re;exports.normalize=xe;exports.progressIndicatorStyle=zn;exports.sideSheetConfig=Fe;exports.sideSheetStyle=Mt;exports.sliderConfig=$e;exports.sliderStyle=_n;exports.snackbarStyle=qn;exports.switchStyle=Xn;exports.tabPanelStyle=Jn;exports.tabPanelsStyle=Gn;exports.tabStyle=Un;exports.tabsStyle=Kn;exports.textFieldStyle=Zn;exports.toolStyle=Qn;exports.useButtonStyle=lt;exports.useCardStyle=ct;exports.useCarouselItemStyle=ut;exports.useCarouselStyle=ft;exports.useCheckboxStyle=mt;exports.useChipStyle=yt;exports.useChipsStyle=vt;exports.useClassNames=un;exports.useDividerStyle=wt;exports.useFabMenuStyle=Et;exports.useFabStyle=St;exports.useIconButtonStyle=Lt;exports.useProgressIndicatorStyle=It;exports.useSideSheetStyle=Yn;exports.useSliderStyle=Ct;exports.useSnackbarStyle=Dt;exports.useStateStyle=rt;exports.useSwitchStyle=Ft;exports.useTabPanelStyle=Vt;exports.useTabPanelsStyle=Ht;exports.useTabStyle=Pt;exports.useTabsStyle=Tt;exports.useTextFieldStyle=Yt;exports.useToolTipStyle=qt;exports.useTooltipTrigger=Jt;