@udixio/ui-react 2.10.6 → 2.10.7

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/CHANGELOG.md CHANGED
@@ -1,3 +1,13 @@
1
+ ## 2.10.7 (2026-02-23)
2
+
3
+ ### 🩹 Fixes
4
+
5
+ - **icon:** update default color fallback to empty string in style attribute ([bda1694](https://github.com/Udixio/UI/commit/bda1694))
6
+
7
+ ### ❤️ Thank You
8
+
9
+ - Joël VIGREUX
10
+
1
11
  ## 2.10.6 (2026-02-15)
2
12
 
3
13
  ### 🧱 Updated Dependencies
package/dist/index.cjs CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";var Rn=Object.defineProperty;var Dn=(e,t,n)=>t in e?Rn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var B=(e,t,n)=>Dn(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),o=require("react"),He=require("react-dom"),X=require("motion/react"),ft=require("clsx"),An=require("tailwind-merge"),Re=require("@udixio/theme"),ht=require("@udixio/tailwind"),Fn=require("react-textarea-autosize"),mt=({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]=o.useState(!0),[c,u]=o.useState(!1),[a,d]=o.useState({x:50,y:50});o.useEffect(()=>{c&&(r(!0),r(!1))},[c]),o.useEffect(()=>{const x=t==null?void 0:t.current;if(x)return x.addEventListener("mousedown",i),x.addEventListener("mouseup",y),x.addEventListener("mouseleave",f),()=>{x.removeEventListener("mousedown",i),x.removeEventListener("mouseup",y),x.removeEventListener("mouseleave",f)}},[t]);const i=x=>{const b=t==null?void 0:t.current,w=b.getBoundingClientRect();u(!0),d({x:(x.clientX-w.left)/b.clientWidth*100,y:(x.clientY-w.top)/b.clientHeight*100})},f=x=>{u(!1)},y=x=>{u(!1)},h=`color-mix(in srgb, var(--state-color,_var(--color-${e})) 10%, transparent)`,m={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), ${h} var(--r), transparent calc(var(--r) * 2))`,pointerEvents:"none"};return l.jsx(X.AnimatePresence,{mode:"wait",children:(c||!c&&!s)&&l.jsx(X.motion.div,{style:m,variants:n,initial:"initial",animate:"animate",exit:"exit",onAnimationComplete:()=>r(!0)})})},pt=An.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"]}}}),p=(...e)=>pt(ft.clsx(e)),yt=(...e)=>pt(ft.clsx(e));function Pn(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 Fe=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 c=s(e.states);Object.entries(c).map(u=>{const[a,d]=u;(t[a]??(t[a]=[])).push(d)})}});const n=t;return Object.entries(t).map(s=>{let[r,c]=s;c=c.reverse(),r==e.default&&c.unshift("relative"),c.unshift(Pn(r)),n[r]=yt(...c)}),n},re=(e,t)=>n=>Fe({classNameList:[n.className,t],default:e,states:n}),Q=(e,t)=>n=>o.useMemo(()=>Fe({classNameList:[n.className,t],default:e,states:n}),[n]);function $n(e,t,n){return o.useMemo(()=>Fe({classNameList:[n==null?void 0:n.className,t],default:e,states:n}),[e,t,n])}const xt=re("customScroll",({orientation:e,draggable:t,isDragging:n})=>({customScroll:p("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:p("overflow-hidden flex-none sticky",{"left-0 h-full":e==="horizontal","top-0 w-full":e==="vertical"})}));function Wn(e,t){let n=0,s=null,r=null;const c=(u,a)=>{n=Date.now(),t(u,a)};return(u,a)=>{const d=Date.now(),i=e-(d-n);i<=0?(s&&(clearTimeout(s),s=null),c(u,a)):(r={v:u,o:a},s||(s=setTimeout(()=>{s=null;const f=r;r=null,f&&c(f.v,f.o)},i)))}}const vt=({children:e,orientation:t="vertical",scrollSize:n,onScroll:s,className:r,draggable:c=!1,throttleDuration:u=75,scroll:a,setScroll:d})=>{var oe,j;const i=o.useRef(null),f=o.useRef(null),[y,h]=o.useState({width:null,height:null});o.useEffect(()=>{if(!i.current)return;const L=new ResizeObserver(E=>{for(const P of E)P.target===i.current&&h({width:P.contentRect.width,height:P.contentRect.height})});return L.observe(i.current),()=>{L.disconnect()}},[i]);const m=o.useRef(null),x=o.useRef(null),b=()=>{const L=f.current;return L?{width:n??L.scrollWidth,height:n??L.scrollHeight}:null},w=()=>{const L=i.current;return L?{width:L.clientWidth,height:L.clientHeight}:null},{scrollYProgress:M,scrollXProgress:S}=X.useScroll({container:i}),g=o.useRef(null);g.current||(g.current=Wn(u,(L,E)=>{!x.current||!m.current||!i.current||(E===(t==="horizontal"?"x":"y")&&(d==null||d(L)),s&&(t==="horizontal"&&E==="x"&&s({scrollProgress:L,scroll:L*(m.current.width-i.current.clientWidth),scrollTotal:m.current.width-i.current.clientWidth,scrollVisible:x.current.width}),t==="vertical"&&E==="y"&&s({scrollProgress:L,scroll:L*(m.current.height-i.current.clientHeight),scrollTotal:m.current.height-i.current.clientHeight,scrollVisible:x.current.height})))}));const $=(L,E)=>{g.current&&g.current(L,E)};o.useEffect(()=>{y.width&&$(S.get(),"x"),y.height&&$(M.get(),"y")},[y]),o.useEffect(()=>{const L=i.current,E=f.current;if(!L||!E||typeof a!="number")return;const P=(V,_,q)=>Math.min(q,Math.max(_,V));if(t==="horizontal"){const V=Math.max(0,(n??E.scrollWidth)-L.clientWidth);L.scrollLeft=P(a*V,0,V)}else{const V=Math.max(0,(n??E.scrollHeight)-L.clientHeight);L.scrollTop=P(a*V,0,V)}},[a,t,n]),X.useMotionValueEvent(S,"change",L=>{$(L,"x")}),X.useMotionValueEvent(M,"change",L=>{$(L,"y")});const[F,v]=o.useState(!1);o.useLayoutEffect(()=>{F||!x.current||!m.current||!s||(s({scrollProgress:0,scroll:0,scrollTotal:t=="vertical"?m.current.height:m.current.width,scrollVisible:t=="vertical"?x.current.height:x.current.width}),v(!0))},[x,m,s]),m.current=b(),x.current=w();const[k,R]=o.useState(!1),I=xt({isDragging:k,children:e,className:r,onScroll:s,orientation:t,scrollSize:n,draggable:c,throttleDuration:u}),[W,N]=o.useState(0),[z,O]=o.useState(0),ee=L=>{if(!c)return;const E=i.current;if(!E||W==null)return;const V=(L.pageX-E.offsetLeft-W)*1.5;E.scrollLeft=z-V},H=L=>{const E=i.current;E&&(R(!0),N(L.pageX-E.offsetLeft),O(E.scrollLeft))},D=L=>{k&&(L.preventDefault(),ee(L))},C=()=>{R(!1)},T=()=>{R(!1)},U=L=>{L.preventDefault()},J=o.useRef(null);return o.useEffect(()=>()=>{J.current&&clearTimeout(J.current)},[]),o.useEffect(()=>{const L=i.current;if(!L)return;const E=P=>{var ne,A,Y,te;const V=P.detail,_=i.current;if(!_||!V)return;const q=V.orientation??t;if(typeof V.progress=="number")if(q==="horizontal"){const le=Math.max(0,(((ne=m.current)==null?void 0:ne.width)??0)-_.clientWidth);_.scrollLeft=Math.min(le,Math.max(0,V.progress*le))}else{const le=Math.max(0,(((A=m.current)==null?void 0:A.height)??0)-_.clientHeight);_.scrollTop=Math.min(le,Math.max(0,V.progress*le))}else if(typeof V.scroll=="number")if(q==="horizontal"){const le=Math.max(0,(((Y=m.current)==null?void 0:Y.width)??0)-_.clientWidth);_.scrollLeft=Math.min(le,Math.max(0,V.scroll))}else{const le=Math.max(0,(((te=m.current)==null?void 0:te.height)??0)-_.clientHeight);_.scrollTop=Math.min(le,Math.max(0,V.scroll))}};return L.addEventListener("udx:customScroll:set",E),()=>{L.removeEventListener("udx:customScroll:set",E)}},[t]),l.jsxs("div",{className:I.customScroll,ref:i,onMouseDown:H,onMouseMove:D,onMouseUp:C,onMouseLeave:T,onDragStart:U,onScroll:L=>{k||(N(null),R(!0),J.current&&clearTimeout(J.current),J.current=setTimeout(()=>{R(!1)},1e3))},children:[l.jsx("div",{ref:f,style:t==="vertical"?{height:((oe=x==null?void 0:x.current)==null?void 0:oe.height)??"100%"}:{width:((j=x==null?void 0:x.current)==null?void 0:j.width)??"100%"},className:I.track,children:e}),x.current&&m.current&&l.jsxs(l.Fragment,{children:[t==="vertical"&&m.current.height>x.current.height&&l.jsx(X.motion.div,{className:"flex-none",style:{height:m.current.height-x.current.height}}),t==="horizontal"&&m.current.width>x.current.width&&l.jsx(X.motion.div,{className:"flex-none",style:{width:m.current.width-x.current.width}})]})]})};var Tn="1.3.17";function gt(e,t,n){return Math.max(e,Math.min(t,n))}function Bn(e,t,n){return(1-n)*e+n*t}function On(e,t,n,s){return Bn(e,t,1-Math.exp(-n*s))}function Hn(e,t){return(e%t+t)%t}var Vn=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(e){var n;if(!this.isRunning)return;let t=!1;if(this.duration&&this.easing){this.currentTime+=e;const s=gt(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=On(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:c,onUpdate:u}){this.from=this.value=e,this.to=t,this.lerp=n,this.duration=s,this.easing=r,this.currentTime=0,this.isRunning=!0,c==null||c(),this.onUpdate=u}};function zn(e,t){let n;return function(...s){let r=this;clearTimeout(n),n=setTimeout(()=>{n=void 0,e.apply(r,s)},t)}}var Yn=class{constructor(e,t,{autoResize:n=!0,debounce:s=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=e,this.content=t,n&&(this.debouncedResize=zn(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}}},wt=class{constructor(){B(this,"events",{})}emit(e,...t){var s;let n=this.events[e]||[];for(let r=0,c=n.length;r<c;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={}}},rt=100/6,pe={passive:!1},_n=class{constructor(e,t={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 wt);B(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})});B(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})});B(this,"onTouchEnd",e=>{this.emitter.emit("scroll",{deltaX:this.lastDelta.x,deltaY:this.lastDelta.y,event:e})});B(this,"onWheel",e=>{let{deltaX:t,deltaY:n,deltaMode:s}=e;const r=s===1?rt:s===2?this.window.width:1,c=s===1?rt:s===2?this.window.height:1;t*=r,n*=c,t*=this.options.wheelMultiplier,n*=this.options.wheelMultiplier,this.emitter.emit("scroll",{deltaX:t,deltaY:n,event:e})});B(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,pe),this.element.addEventListener("touchstart",this.onTouchStart,pe),this.element.addEventListener("touchmove",this.onTouchMove,pe),this.element.addEventListener("touchend",this.onTouchEnd,pe)}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,pe),this.element.removeEventListener("touchstart",this.onTouchStart,pe),this.element.removeEventListener("touchmove",this.onTouchMove,pe),this.element.removeEventListener("touchend",this.onTouchEnd,pe)}},ot=e=>Math.min(1,1.001-Math.pow(2,-10*e)),qn=class{constructor({wrapper:e=window,content:t=document.documentElement,eventsTarget:n=e,smoothWheel:s=!0,syncTouch:r=!1,syncTouchLerp:c=.075,touchInertiaExponent:u=1.7,duration:a,easing:d,lerp:i=.1,infinite:f=!1,orientation:y="vertical",gestureOrientation:h=y==="horizontal"?"both":"vertical",touchMultiplier:m=1,wheelMultiplier:x=1,autoResize:b=!0,prevent:w,virtualScroll:M,overscroll:S=!0,autoRaf:g=!1,anchors:$=!1,autoToggle:F=!1,allowNestedScroll:v=!1,__experimental__naiveDimensions:k=!1,naiveDimensions:R=k,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 Vn);B(this,"emitter",new wt);B(this,"dimensions");B(this,"virtualScroll");B(this,"onScrollEnd",e=>{e instanceof CustomEvent||(this.isScrolling==="smooth"||this.isScrolling===!1)&&e.stopPropagation()});B(this,"dispatchScrollendEvent",()=>{this.options.wrapper.dispatchEvent(new CustomEvent("scrollend",{bubbles:this.options.wrapper===window,detail:{lenisScrollEnd:!0}}))});B(this,"onTransitionEnd",e=>{e.propertyName.includes("overflow")&&this.checkOverflow()});B(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 c;return(c=r.getAttribute("href"))==null?void 0:c.includes("#")});if(s){const r=s.getAttribute("href");if(r){const c=typeof this.options.anchors=="object"&&this.options.anchors?this.options.anchors:void 0,u=`#${r.split("#")[1]}`;this.scrollTo(u,c)}}}this.options.stopInertiaOnNavigate&&n.find(r=>r.host===window.location.host)&&this.reset()});B(this,"onPointerDown",e=>{e.button===1&&this.reset()});B(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"),c=s.type.includes("wheel");this.isTouching=s.type==="touchstart"||s.type==="touchmove";const u=t===0&&n===0;if(this.options.syncTouch&&r&&s.type==="touchstart"&&u&&!this.isStopped&&!this.isLocked){this.reset();return}const d=this.options.gestureOrientation==="vertical"&&n===0||this.options.gestureOrientation==="horizontal"&&t===0;if(u||d)return;let i=s.composedPath();i=i.slice(0,i.indexOf(this.rootElement));const f=this.options.prevent;if(i.find(w=>{var M,S,g;return w instanceof HTMLElement&&(typeof f=="function"&&(f==null?void 0:f(w))||((M=w.hasAttribute)==null?void 0:M.call(w,"data-lenis-prevent"))||r&&((S=w.hasAttribute)==null?void 0:S.call(w,"data-lenis-prevent-touch"))||c&&((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&&c)){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}})});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 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))}});B(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=Tn,(!e||e===document.documentElement)&&(e=window),typeof a=="number"&&typeof d!="function"?d=ot:typeof d=="function"&&typeof a!="number"&&(a=1),this.options={wrapper:e,content:t,eventsTarget:n,smoothWheel:s,syncTouch:r,syncTouchLerp:c,touchInertiaExponent:u,duration:a,easing:d,lerp:i,infinite:f,gestureOrientation:h,orientation:y,touchMultiplier:m,wheelMultiplier:x,autoResize:b,prevent:w,virtualScroll:M,overscroll:S,autoRaf:g,anchors:$,autoToggle:F,allowNestedScroll:v,naiveDimensions:R,stopInertiaOnNavigate:I},this.dimensions=new Yn(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 _n(n,{touchMultiplier:m,wheelMultiplier:x}),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:c=r?this.options.lerp:void 0,duration:u=r?this.options.duration:void 0,easing:a=r?this.options.easing:void 0,onStart:d,onComplete:i,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 x=this.rootElement.getBoundingClientRect();t-=this.isHorizontal?x.left:x.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=gt(0,e,this.limit);if(e===this.targetScroll){d==null||d(this),i==null||i(this);return}if(this.userData=y??{},n){this.animatedScroll=this.targetScroll=e,this.setScroll(this.scroll),this.reset(),this.preventNextNativeScrollEvent(),this.emit(),i==null||i(this),this.userData={},requestAnimationFrame(()=>{this.dispatchScrollendEvent()});return}r||(this.targetScroll=e),typeof u=="number"&&typeof a!="function"?a=ot:typeof a=="function"&&typeof u!="number"&&(u=1),this.animate.fromTo(this.animatedScroll,e,{duration:u,easing:a,lerp:c,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(),i==null||i(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 c,u,a,d,i,f,y,h;const m=this.options.gestureOrientation;if(s-(r.time??0)>2e3){r.time=Date.now();const F=window.getComputedStyle(e);r.computedStyle=F;const v=F.overflowX,k=F.overflowY;if(c=["auto","overlay","scroll"].includes(v),u=["auto","overlay","scroll"].includes(k),r.hasOverflowX=c,r.hasOverflowY=u,!c&&!u||m==="vertical"&&!u||m==="horizontal"&&!c)return!1;i=e.scrollWidth,f=e.scrollHeight,y=e.clientWidth,h=e.clientHeight,a=i>y,d=f>h,r.isScrollableX=a,r.isScrollableY=d,r.scrollWidth=i,r.scrollHeight=f,r.clientWidth=y,r.clientHeight=h}else a=r.isScrollableX,d=r.isScrollableY,c=r.hasOverflowX,u=r.hasOverflowY,i=r.scrollWidth,f=r.scrollHeight,y=r.clientWidth,h=r.clientHeight;if(!c&&!u||!a&&!d||m==="vertical"&&(!u||!d)||m==="horizontal"&&(!c||!a))return!1;let x;if(m==="horizontal")x="x";else if(m==="vertical")x="y";else{const F=t!==0,v=n!==0;F&&c&&a&&(x="x"),v&&u&&d&&(x="y")}if(!x)return!1;let b,w,M,S,g;if(x==="x")b=e.scrollLeft,w=i-y,M=t,S=c,g=a;else if(x==="y")b=e.scrollTop,w=f-h,M=n,S=u,g=d;else return!1;return(M>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?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(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 Xn=({transition:e=1.2,easing:t,orientation:n="vertical",smoothTouch:s=!1,touchMultiplier:r=2,children:c})=>{const u=o.useRef(null),a=o.useRef(null);return o.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 i=y=>1-Math.pow(1-y,5);u.current=new qn({duration:d,easing:t??i,orientation:n,smoothWheel:!0,touchMultiplier:r,syncTouch:s});const f=y=>{var h;(h=u.current)==null||h.raf(y),a.current=requestAnimationFrame(f)};return a.current=requestAnimationFrame(f),()=>{var y;a.current!==null&&cancelAnimationFrame(a.current),(y=u.current)==null||y.destroy(),u.current=null}},[e,t,n,s,r]),c?l.jsx(l.Fragment,{children:c}):null},de=({style:e,colorName:t,stateClassName:n="state-ripple-group",children:s,className:r})=>{const c=o.useRef(null),u=o.useRef(null),[a,d]=o.useState(!1),i=bt({isClient:a,stateClassName:n,className:r,colorName:t});return o.useEffect(()=>{if(c.current&&n!=="state-layer"){const y=(n.includes("[")?"group/"+n.split("[")[1].split("]")[0]:"group").replace(/\//g,"\\/"),h=c.current.closest(`.${y}:not(.${y} .${y})`);u.current=h}d(!0)},[]),l.jsxs("div",{ref:c,className:i.stateLayer,style:{"--state-color":`var(--default-color, var(--color-${t}))`,...e},children:[a&&l.jsx(mt,{triggerRef:u}),s]})},Un=({isClient:e,stateClassName:t})=>({stateLayer:p(["w-full top-0 left-0 h-full absolute pointer-events-none overflow-hidden",t])}),bt=Q("stateLayer",Un),St=({targetRef:e,children:t})=>{const[n,s]=o.useState(null),r=o.useRef(null),c=()=>{const u=e.current;if(!u)return;const a=u.getBoundingClientRect();s({position:"fixed",top:a.top,left:a.left,width:a.width,height:a.height,pointerEvents:"none",zIndex:999})};return o.useEffect(()=>{const u=e.current;if(u)return c(),window.addEventListener("scroll",c,!0),window.addEventListener("resize",c),r.current=new ResizeObserver(c),r.current.observe(u),()=>{var a;window.removeEventListener("scroll",c,!0),window.removeEventListener("resize",c),(a=r.current)==null||a.disconnect()}},[e]),n?He.createPortal(l.jsx("div",{style:n,children:t}),document.body):null};function Gn(e){return/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(e)}const Kn=({config:e,throttleDelay:t=100,onLoad:n,loadTheme:s=!1})=>{const[r,c]=o.useState(null);o.useEffect(()=>{(async()=>{const h=await Re.loader(e,s);c(h)})()},[]);const[u,a]=o.useState(null),d=o.useRef(null),i=o.useRef(0),f=o.useRef(null);o.useEffect(()=>{if(!r)return;const h={...e,sourceColor:e.sourceColor},m=Date.now(),x=m-i.current,b=async w=>{await y(w)};if(i.current===0||x>=t)d.current&&(clearTimeout(d.current),d.current=null),f.current=null,i.current=m,b(h);else if(f.current=h,!d.current){const w=Math.max(0,t-x);d.current=setTimeout(async()=>{d.current=null;const M=f.current;f.current=null,M&&(i.current=Date.now(),await b(M))},w)}return()=>{}},[e,t,r]);const y=async h=>{if(typeof h.sourceColor=="string"&&!Gn(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(ht.TailwindPlugin).getInstance().outputCss;a(m),n==null||n(r)};return o.useEffect(()=>()=>{d.current&&(clearTimeout(d.current),d.current=null)},[]),u?l.jsx("style",{dangerouslySetInnerHTML:{__html:u}}):null};function Jn(){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 Zn(){return typeof window>"u"||!("matchMedia"in window)?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches}function Ve(e){if(!(e instanceof HTMLElement))return!1;const t=e.classList;return Array.from(t).some(n=>n.startsWith("anim-")&&n.includes("scroll"))}function it(e){if(!(e instanceof HTMLElement))return!1;const t=e.classList;return Array.from(t).some(n=>n.startsWith("anim-"))}function $e(e,t){if(!Ve(e))return;if(e.hasAttribute(`data-${t}-scroll`)){const u=(e.getAttribute(`data-${t}-scroll`)||"").trim().toLowerCase(),a=u==="x"||u==="inline"?"inline":u==="y"||u==="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`)||(a==="inline"?e.classList.add(`${t}-timeline-inline`):a==="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`),c=e.hasAttribute(`data-${t}-run`)||e.classList.contains(`${t}-run`);!r&&!c&&e.setAttribute(`data-${t}-run`,"")}function We(e=document,t){return Array.from(e.querySelectorAll(`[class*="${t}-"][class*="-scroll"]`)).filter(s=>Ve(s))}function Qn(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 c=r.classList;return c.contains(`${t}-in`)||c.contains(`${t}-out`)||Array.from(c).some(d=>d.startsWith(`${t}-`)&&!d.includes("scroll")&&!s.has(d))?!0:!Ve(r)})}function es(e,t){return Array.from(e).some(n=>n.startsWith(t)&&n.includes("-out"))}function lt(e,t,n){e.setAttribute(`data-${t}-run`,""),e.setAttribute(`data-${t}-${n}-run`,"")}function at(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 ts=[0,.2],ct=new WeakSet;function ut(e,t){if(ct.has(e))return;ct.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 ze(e={}){const{prefix:t="anim",once:n=!0}=e;if(Zn())return()=>{};const s=Jn(),r=new WeakSet;let c=typeof window<"u"&&(window.pageYOffset||window.scrollY)||0,u=!0;const a=()=>{const m=window.pageYOffset||window.scrollY||0;u=m>=c,c=m};typeof window<"u"&&window.addEventListener("scroll",a,{passive:!0});const d=new IntersectionObserver(m=>{for(const x of m){const b=x.target;if(!it(b)||b.hasAttribute(`data-${t}-animating`))continue;const w=es(b.classList,t);x.isIntersecting?(w&&at(b,t,"out"),lt(b,t,"in"),n&&d.unobserve(b)):n||(u||at(b,t,"in"),w&&lt(b,t,"out"))}},{threshold:ts}),i=m=>{const x=Qn(m||document,t);for(const b of x)r.has(b)||(r.add(b),d.observe(b),ut(b,t))};i();let f,y=null,h=null;if(s)(()=>{h==null&&(h=requestAnimationFrame(()=>{h=null;const x=We(void 0,t);for(const b of x)$e(b,t)}))})(),y=new MutationObserver(x=>{for(const b of x)if(b.type==="attributes"){const w=b.target;w instanceof HTMLElement&&($e(w,t),it(w)&&(r.has(w)||(r.add(w),d.observe(w),ut(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 M=We(w,t);for(const S of M)$e(S,t);i(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;We(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",a),d.disconnect()}}const ns=ze,ss=ze,Ne=({anchorRef:e,position:t="bottom",children:n,style:s,...r})=>{const u=`--anchor-${o.useId().replace(/:/g,"")}`,[a,d]=o.useState(!1);if(o.useLayoutEffect(()=>{typeof CSS<"u"&&CSS.supports("anchor-name","--a")&&d(!0)},[]),o.useLayoutEffect(()=>{if(a&&e.current){const f=e.current;return f.style.anchorName=u,()=>{e.current&&(e.current.style.anchorName="")}}},[a,e,u]),a){const f={position:"fixed",margin:0,zIndex:9999,positionAnchor:u,positionArea:t,positionTryFallbacks:"flip-block, flip-inline",...s};return He.createPortal(l.jsx("div",{style:f,...r,children:n}),document.body)}const i={position:"absolute",pointerEvents:"auto",...s};switch(t){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 l.jsx(St,{targetRef:e,children:l.jsx("div",{style:i,...r,children:n})})},Et=({variant:e,disableTextMargins:t,disabled:n,iconPosition:s,icon:r,isActive:c,loading:u,shape:a,onToggle:d,size:i,allowShapeTransformation:f})=>({button:p(" 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"||f&&c)&&{"rounded-[12px]":i==="xSmall"||i=="small","rounded-[16px]":i==="medium","rounded-[28px]":i==="large"||i=="xLarge"},f&&!n&&{"active:rounded-[12px]":i==="xSmall"||i=="small","active:rounded-[16px]":i==="medium","active:rounded-[28px]":i==="large"||i=="xLarge"},e==="elevated"&&{"shadow-1 hover:shadow-2":!n,"bg-surface-container-low text-primary":!n&&!c,"bg-primary text-on-primary":!n&&c,"text-on-surface/[38%]":n},e==="filled"&&{"hover:shadow-1":!n,"bg-surface-container text-on-surface-variant":!n&&!c&&d,"bg-primary text-on-primary":!n&&(c&&d||!d),"text-on-surface/[38%]":n},e==="tonal"&&{"hover:shadow-1":!n,"bg-secondary-container text-on-secondary-container":!n&&!c,"bg-secondary text-on-secondary":!n&&c,"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&&!c,"text-inverse-on-surface bg-inverse-surface border-inverse-surface":!n&&c}],e==="text"&&["w-fit",{"text-primary":!n,"text-on-surface/[0.38]":n},t&&[i==="xSmall"&&"-mx-3 ",i==="small"&&"-mx-4 ",i==="medium"&&"-mx-6 ",i==="large"&&"-mx-12",i==="xLarge"&&"-mx-16 "]],n&&"cursor-default"),touchTarget:p("absolute -translate-x-1/2 -translate-y-1/2 left-1/2 top-1/2 h-12 w-full"),stateLayer:p("overflow-hidden",a==="rounded"&&{"rounded-[30px]":i==="xSmall"||i=="small","rounded-[40px]":i==="medium","rounded-[70px]":i==="large"||i=="xLarge"},(a==="squared"||f&&c)&&{"rounded-[12px]":i==="xSmall"||i=="small","rounded-[16px]":i==="medium","rounded-[28px]":i==="large"||i=="xLarge"},f&&!n&&{"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:p({invisible:u}),icon:p({invisible:u},i==="xSmall"&&"size-5",i==="small"&&"size-5",i==="medium"&&"size-6",i==="large"&&"size-8",i==="xLarge"&&"size-10")}),rs=re("button",Et),Nt=Q("button",Et),kt=({variant:e,isInteractive:t})=>({card:p(" 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})}),os=re("card",kt),jt=Q("card",kt),Ye=({width:e})=>({carouselItem:p("rounded-[28px] overflow-hidden flex-none",{hidden:e===void 0,"flex-1":e==null})}),is=re("carouselItem",Ye),Lt=Q("carouselItem",Ye),Mt=()=>({carousel:p(["w-full h-[400px]"]),track:p("flex h-full w-full")}),ls=re("carousel",Mt),It=Q("carousel",Mt),Ct=({isChecked:e,isIndeterminate:t,isDisabled:n,isError:s,isFocused:r,isHovered:c})=>({checkbox:p("inline-flex items-center justify-center relative size-4.5 ",{"pointer-events-none opacity-[0.38]":n}),input:p("absolute inset-0 w-full h-full opacity-0 z-10 cursor-pointer"),container:p("relative flex items-center justify-center w-[18px] h-[18px] "),box:p("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:p("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"}),as=re("checkbox",Ct),Rt=Q("checkbox",Ct),Dt=({variant:e,disabled:t,trailingIcon:n,icon:s,isActive:r,isInteractive:c,activated:u,isFocused:a,isDragging:d,isEditing:i})=>({chip:p(" 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&&c},{" text-on-surface-variant":!u&&!a||i,"bg-secondary-container text-on-secondary-container":(u||a)&&!i},d&&["opacity-100 cursor-grabbing shadow-3"],e==="outlined"&&["border border-outline-variant",{"border-transparent":i}],e==="elevated"&&!i&&["shadow-1 bg-surface-container-low","border border-outline-variant"]),stateLayer:p("rounded-lg overflow-hidden",{}),label:p("outline-none text-nowrap",{"opacity-[0.38]":t}),leadingIcon:p("text-primary size-[18px]",{"opacity-[0.38]":t}),trailingIcon:p("cursor-pointer size-[18px]",{"opacity-[0.38]":t})}),cs=re("chip",Dt),At=Q("chip",Dt),Ft=({scrollable:e})=>({chips:p(" flex gap-3 outline-none",{"flex-wrap":!e,"overflow-x-auto":e})}),us=re("chips",Ft),Pt=Q("chips",Ft),$t=({orientation:e})=>({divider:p("border-outline-variant ",{"h-fit w-full border-t":e==="horizontal"},{"h-auto self-stretch w-fit border-l":e==="vertical"})}),ds=re("divider",$t),Wt=Q("divider",$t),Tt=({size:e,variant:t,extended:n})=>({fab:p("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:p({"size-6":e=="small"||e=="medium","size-9":e=="large"}),label:p("text-nowrap",{"text-title-medium":e=="small","text-title-large":e=="medium","text-headline-small":e=="large"})}),fs=re("fab",Tt),Bt=Q("fab",Tt),Ot=({size:e,variant:t,open:n})=>({fabMenu:p("relative inline-flex flex-col items-end"),actions:p("flex flex-col gap-1 items-end absolute bottom-[calc(100%_+_8px)] right-0"),label:p("text-nowrap")}),hs=re("fabMenu",Ot),Ht=Q("fabMenu",Ot),Vt=({variant:e,disabled:t,onToggle:n,isActive:s,size:r,width:c,shape:u,allowShapeTransformation:a})=>({iconButton:p("rounded-full relative flex transition-all duration-300","group/icon-button cursor-pointer",{"cursor-default":t},u==="rounded"&&{"rounded-[30px]":r==="xSmall"||r=="small","rounded-[40px]":r==="medium","rounded-[70px]":r==="large"||r=="xLarge"},(u==="squared"||a&&s)&&{"rounded-[12px]":r==="xSmall"||r=="small","rounded-[16px]":r==="medium","rounded-[28px]":r==="large"||r=="xLarge"},a&&!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:p("absolute -translate-x-1/2 -translate-y-1/2 left-1/2 top-1/2 h-12 w-full"),stateLayer:p("absolute top-0 left-0 h-full w-full overflow-hidden",(u==="rounded"||u==="squared"&&n&&!t&&s&&a)&&{"rounded-[30px]":r==="xSmall"||r=="small","rounded-[40px]":r==="medium","rounded-[70px]":r==="large"||r=="xLarge"},(u==="squared"||u==="rounded"&&n&&!t&&s&&a)&&{"rounded-[12px]":r==="xSmall"||r=="small","rounded-[16px]":r==="medium","rounded-[28px]":r==="large"||r=="xLarge"},a&&!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:p(" 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"},c=="narrow"&&[{"px-1":r==="xSmall"},{"px-1":r==="small"},{"px-3":r==="medium"},{"px-4":r==="large"},{"px-8":r==="xLarge"}],c=="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]")}),ms=re("iconButton",Vt),zt=Q("iconButton",Vt),Yt=({variant:e,hasGroups:t})=>({menu:p("z-50 min-w-[112px] max-w-[280px] max-h-[300px] ","flex flex-col",{"overflow-y-auto":!t},{"bg-surface-container":!e||e==="standard","bg-tertiary-container text-on-tertiary-container":e==="vibrant","py-0.5 shadow-2 px-1 rounded-2xl":!t,"bg-transparent ":t})}),ps=re("menu",Yt),_t=Q("menu",Yt),qt=({variant:e})=>({menuGroup:p("flex flex-col gap-0.5 mb-0.5 last:mb-0","rounded-lg py-0.5 px-1 shadow-2 first:rounded-t-2xl last:rounded-b-2xl",{"bg-surface-container":e==="standard","bg-tertiary-container text-on-tertiary-container":e==="vibrant"}),groupLabel:p("px-3 pt-2 text-label-small tracking-wide ",{"text-on-surface-variant":e==="standard","text-on-tertiary-container opacity-80":e==="vibrant"})}),ys=re("menuGroup",qt),Xt=Q("menuGroup",qt),Ut=({variant:e,isVisible:t})=>({progressIndicator:p((e==="linear-determinate"||e=="linear-indeterminate")&&"flex w-full h-1"),track:p("h-full rounded-full bg-primary rounded-l-full",{"max-h-0":!t,"max-h-full":t}),activeIndicator:p({"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:p("absolute top-1/2 -translate-y-1/2 right-0 bg-primary rounded-full size-1",{"max-h-0":!t,"max-h-full":t})}),xs=re("progressIndicator",Ut),Gt=Q("progressIndicator",Ut),_e=({variant:e,position:t})=>({sideSheet:p("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:p("w-full overflow-hidden flex flex-col",{}),header:p("p-4 flex items-center gap-2"),content:p("flex-1 overflow-y-auto"),title:p("text-on-surface-variant text-title-large"),closeButton:p("ml-auto"),divider:p({hidden:e=="modal"}),overlay:p("bg-[black]/[0.32] fixed top-0 left-0 w-screen h-screen")}),Kt=re("sideSheet",_e),vs=Q("sideSheet",_e),qe=({isChanging:e})=>({slider:p(["relative w-full h-11 flex items-center rounded gap-x-1.5 cursor-pointer min-w-32"]),activeTrack:p(["h-4 relative transition-all duration-100 bg-primary overflow-hidden rounded-l-full "]),inactiveTrack:p(["h-4 relative transition-all duration-100 bg-primary-container rounded-r-full overflow-hidden"]),handle:p(["transform relative transition-all duration-100 bg-primary h-full rounded-full ",{"w-0.5":e,"w-1":!e}]),valueIndicator:p(["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:p(["h-1 w-1 absolute transform -translate-y-1/2 -translate-x-1/2 top-1/2 rounded-full"])}),gs=re("slider",qe),Jt=Q("slider",qe),Zt=()=>({snackbar:p(" rounded bg-inverse-surface "),container:p("pl-4 pr-2 max-w-full py-1 flex items-center flex-wrap"),supportingText:p("text-body-medium text-inverse-on-surface "),icon:p(" ml-auto mr-0 text-inverse-on-surface block dark")}),ws=re("snackbar",Zt),Qt=Q("snackbar",Zt),en=({isSelected:e,disabled:t,inactiveIcon:n})=>({switch:p("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:p("flex items-center justify-center absolute",{"left-[14px]":!e},{"right-[14px]":e}),handle:p("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:p("w-[40px] h-[40px] -z-10 rounded-full absolute",{"group-state-primary":!t}),icon:p("w-[16px] h-[16px]",!t&&[{"text-on-primary-container":e},{"text-on-primary":!e}],{"text-on-surface/[0.38]":t})}),bs=re("switch",en),tn=Q("switch",en),nn=({isSelected:e,icon:t,label:n,variant:s})=>({tab:p("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:p("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:p("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:p("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:p("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:p("bg-primary absolute w-full left-0 bottom-0",s==="primary"&&"h-[3px] rounded-t",s==="secondary"&&"h-0.5")}),Ss=re("tab",nn),sn=Q("tab",nn),rn=({scrollable:e})=>({tabs:p("border-b border-surface-container-highest bg-surface","flex relative ",{"overflow-x-auto":e})}),Es=re("tabs",rn),on=Q("tabs",rn),ln=()=>({tabPanels:p("overflow-hidden")}),Ns=re("tabPanels",ln),an=Q("tabPanels",ln),cn=()=>({tabPanel:p("")}),ks=re("tabPanel",cn),un=Q("tabPanel",cn),dn=({disabled:e,leadingIcon:t,trailingIcon:n,variant:s,errorText:r,isFocused:c,value:u,suffix:a,multiline:d})=>({textField:p({"opacity-[.38]":e}),content:p("group/text-field transition-border duration-200 relative flex items-center ",{"h-14":!d},{"border-on-surface-variant":!(r!=null&&r.length)&&!c&&s=="filled","border-outline":!(r!=null&&r.length)&&!c&&s=="outlined","border-primary":!(r!=null&&r.length)&&c,"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]":c}]),stateLayer:p("absolute -z-10 w-full h-full top-0 left-0",{hidden:s=="outlined"},{"group-state-on-surface":!e,"focus-state-on-surface":c}),label:p("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)&&c}),input:p("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":!!a},s=="filled"&&" pb-2 pt-6",s=="outlined"&&"py-4 relative z-10"),activeIndicator:p("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":c}]),supportingText:p(" text-body-small px-4 pt-1",{"text-on-surface-variant":!e&&!(r!=null&&r.length)},{"text-on-surface":e},{"!w-full":c},{"text-error":!!(r!=null&&r.length)}),leadingIcon:p(["h-12 ml-3 flex items-center justify-center",{"cursor-text":!o.isValidElement(t)}]),trailingIcon:p("h-12 w-12 flex items-center justify-center",{"cursor-text":!o.isValidElement(n)}),suffix:p("text-on-surface-variant pl-0 pr-4",s=="filled"&&" pb-2 pt-6",s=="outlined"&&"py-4 relative z-10")}),js=re("textField",dn),fn=Q("textField",dn),hn=({position:e,variant:t})=>({toolTip:p(" 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:p("pb-2",t=="rich"&&"px-4 pt-3 ",t=="plain"&&"px-2 py-1"),actions:p("flex gap-10 px-1 mt-2",t=="plain"&&"hidden"),subHead:p("text-title-small mb-1",t=="plain"&&"hidden"),supportingText:p(""),content:p("w-full")}),Ls=re("toolTip",hn),mn=Q("toolTip",hn),ce=({icon:e,colors:t=[],className:n,...s})=>{if(typeof e=="string"){let f=e,y="";return t[0]&&(y=` fill="${t[0]}" color="${t[0]}"`,f=f.replace(/<path([^>]*?)>/g,'<path$1 fill="currentColor">')),f=f.replace(/<svg([^>]*)>/,(h,m)=>`<svg${m.replace(/\s+(width|height)=["'][^"']*["']/g,"")} width="100%" height="100%"${y}>`),l.jsx("div",{className:p("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 l.jsx("img",{src:f.src,width:f.width,height:f.height,className:p("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:c}=r,[u,a,,,d]=c||[],i=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 l.jsx("svg",{className:p("size-5 box-content",n),style:{...i(t)},xmlns:"http://www.w3.org/2000/svg",viewBox:`0 0 ${u} ${a}`,role:"img","aria-hidden":"true",...s,children:typeof d=="string"?l.jsx("path",{className:"fill-current",d}):d.map((f,y)=>l.jsx("path",{d:f},y))})},pn=({variant:e="linear-determinate",value:t=0,transitionDuration:n=1e3,className:s,...r})=>{const[c,u]=o.useState(t),[a]=o.useState(1.5);o.useEffect(()=>{t>100&&(t=100),t<0&&(t=0),u(t)},[t]);const[d,i]=o.useState(!0),f=()=>d?a:a*.5;o.useEffect(()=>{if((e==="circular-indeterminate"||e==="linear-indeterminate")&&c!==100){const x=setInterval(()=>{u(d?10:90),i(!d)},f()*1e3);return()=>clearInterval(x)}},[e,d,c]);const[y,h]=o.useState(!1);o.useEffect(()=>{if(c>=100){const x=setTimeout(()=>{h(!1)},n);return()=>{clearTimeout(x)}}else h(!0)},[c,n]);const m=Gt({className:s,variant:e,value:t,transitionDuration:n,isVisible:y});return l.jsxs(l.Fragment,{children:[(e==="linear-determinate"||e=="linear-indeterminate")&&l.jsxs("div",{className:m.progressIndicator,...r,children:[l.jsx("div",{style:{width:`${c}%`,transition:`width ${n}ms ease-in-out ${c==100?", max-height 200ms 0.5s ease-in-out":""}`},className:m.track}),l.jsx("div",{style:{marginLeft:c!=100?"6px":"0px",transition:`width ${n}ms ease-in-out ${c==100?`, max-height 200ms 0.5s ease-in-out, margin-left ${n}ms ${n/1.5}ms`:""}`},className:m.activeIndicator}),l.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")&&l.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:l.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 Ms(e){const t={primary:"filled",secondary:"tonal"};return e&&e in t?t[e]:e||"filled"}const ye=({variant:e="filled",disabled:t=!1,icon:n,href:s,label:r,disableTextMargins:c,className:u,iconPosition:a="left",loading:d=!1,shape:i="rounded",onClick:f,onToggle:y,activated:h,ref:m,size:x="medium",allowShapeTransformation:b=!0,transition:w,children:M,...S})=>{if(M&&(r=M),!r)throw new Error("Button component requires either a label prop or children content");e=Ms(e);const g=s?"a":"button",$=o.useRef(null),F=m||$,[v,k]=o.useState(h);o.useEffect(()=>{k(h)},[h]),w={duration:.3,...w};const R=N=>{t&&N.preventDefault(),y?(k(!v),y(!v)):f&&f(N)},I=Nt({allowShapeTransformation:b,size:x,disableTextMargins:c,shape:i,href:s,disabled:t,icon:n,iconPosition:a,loading:d,variant:e,transition:w,className:u,isActive:v??!1,onToggle:y,activated:v,label:r,children:r}),W=n?l.jsx(ce,{icon:n,className:I.icon}):l.jsx(l.Fragment,{});return l.jsxs(g,{ref:F,href:s,className:I.button,...S,onClick:R,disabled:t,"aria-pressed":y?v:void 0,style:{transition:w.duration+"s"},children:[l.jsx("div",{className:I.touchTarget}),l.jsx(de,{style:{transition:w.duration+"s"},className:I.stateLayer,colorName:p(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]"}),a==="left"&&W,d&&l.jsx("div",{className:"!absolute left-1/2 -translate-x-1/2 top-1/2 -translate-y-1/2",children:l.jsx(pn,{className:()=>({progressIndicator:"h-6 w-6",activeIndicator:p({"!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"})}),l.jsx("span",{className:I.label,children:r}),a==="right"&&W]})},Is=({variant:e="outlined",className:t,children:n,interactive:s=!1,ref:r,...c})=>{const u=jt({className:t,isInteractive:s,variant:e,children:n}),a=o.useRef(null),d=r||a;return l.jsxs("div",{...c,ref:d,className:u.card,children:[s&&l.jsx(de,{className:u.stateLayer,colorName:"on-surface",stateClassName:"state-ripple-group-[card]"}),n]})},be=(e,t,n=[0,1])=>{const[s,r]=t,[c,u]=n,d=(Math.max(s,Math.min(e,r))-s)/(r-s);return c+d*(u-c)},yn=({className:e,children:t,width:n,index:s=0,outputRange:r,ref:c,...u})=>{const a=o.useRef(null),d=c||a,i=Lt({className:e,index:s,width:n,children:t,outputRange:r});return l.jsx("div",{ref:d,style:{width:n+"px",maxWidth:r[1]+"px",minWidth:r[0]+"px",willChange:"width"},transition:{duration:.5,ease:"linear"},className:i.carouselItem,...u,children:t})},Cs=({variant:e="hero",className:t,children:n,ref:s,marginPourcent:r=0,inputRange:c=[.21,.65],outputRange:u=[42,300],gap:a=8,onChange:d,onMetricsChange:i,index:f,scrollSensitivity:y=1.25,...h})=>{const m=o.useRef(null),x=s||m,[b,w]=o.useState(0),M=It({index:f,className:t,children:n,variant:e,inputRange:c,outputRange:u,marginPourcent:r,onChange:d,gap:a,scrollSensitivity:y,onMetricsChange:i}),S=o.Children.toArray(n).filter(E=>o.isValidElement(E)&&E.type===yn),g=o.useRef(null),[$,F]=o.useState({}),[v,k]=o.useState(null),R=o.useRef(0),I=o.useRef(null),W=()=>{var fe,xe;if(!g.current||!x.current||(v==null?void 0:v.scrollProgress)===void 0)return[];const E=(v==null?void 0:v.scrollVisible)??((fe=x.current)==null?void 0:fe.clientWidth)??0;function P(K,Z){return K.map((se,he)=>{const ve=(se-Z)/Math.abs(K[1]-K[0]);return{itemScrollXCenter:se,relativeIndex:ve,index:he,width:0}})}const V=S.map((K,Z)=>{if(!N[Z].current||!g.current)return 0;const he=Z/(S.length-1);return be(he,[0,1],[0,1])}),_=P(V,(v==null?void 0:v.scrollProgress)??0).sort((K,Z)=>K.index-Z.index);let q=(((xe=x.current)==null?void 0:xe.clientWidth)??E)+a+u[0]+a;const ne=_.sort((K,Z)=>Math.abs(K.relativeIndex)-Math.abs(Z.relativeIndex)).map((K,Z)=>{if(!(q<=0)){if(Z==0&&O(K.index),K.width=be(q-a,[u[0],u[1]],[u[0],u[1]]),q-=K.width+a,q!=0&&q<(u[0]+a)*2){const se=K.width-((u[0]+a)*2-q);q+=K.width,K.width=se,q-=K.width}else if(q==0&&K.width>=u[0]*2+a){const se=K.width-(u[0]+a-q);q+=K.width,K.width=se,q-=K.width}return K}}).filter(Boolean),A=ne.reverse(),Y=[...ne].sort((K,Z)=>Math.abs(K.index)-Math.abs(Z.index));A.forEach((K,Z)=>{const se=A[Z+1];if(!se)return;const he=1-(Math.abs(K.relativeIndex)-Math.abs(se==null?void 0:se.relativeIndex)),ve=be(he,[0,2],[K.width+q,se.width]);q+=K.width,K.width=ve,q-=K.width});const te=ne.length/2,le=be(Math.abs(Y[0].relativeIndex),[Y[0].index==0?0:te-1,te],[0,1]),Ee=be(le,[0,1],[0,1])*-(u[0]+a);return w(Ee),Object.fromEntries(ne.map(K=>[K.index,K.width]))},N=o.useRef([]).current,[z,O]=o.useState(0);o.useEffect(()=>{d&&d(z)},[z]),o.useEffect(()=>{typeof f=="number"&&S.length>0&&f!==z&&D(f)},[f,S.length]),o.useEffect(()=>{H(z)},[z]),N.length!==S.length&&S.forEach((E,P)=>{N[P]||(N[P]=o.createRef())});const[ee,H]=o.useState(0),D=(E,P={})=>{if(!S.length)return 0;const V=N[E];if(!V||!V.current||!g.current)return 0;const _=be(E/Math.max(1,S.length-1),[0,1],[0,1]);return H(E),g.current.dispatchEvent(new CustomEvent("udx:customScroll:set",{bubbles:!0,detail:{progress:_,orientation:"horizontal",animate:P.animate!==!1}})),_},C=S.map((E,P)=>{var ne;const V=(ne=E.props)==null?void 0:ne.onClick,_=A=>{V==null||V(A)},q=()=>H(P);return o.cloneElement(E,{width:$[P],outputRange:u,ref:N[P],key:P,index:P,role:"option","aria-selected":z===P,tabIndex:z===P?0:-1,onClick:_,onFocus:q})}),T=E=>{var P;if(E.scrollTotal>0){(P=I.current)==null||P.stop();const V=R.current??0,_=E.scrollProgress??0;I.current=X.animate(V,_,{type:"spring",stiffness:260,damping:32,mass:.6,restDelta:5e-4,onUpdate:q=>{R.current=q,k({...E,scrollProgress:q})}})}};o.useEffect(()=>{const E=W();F(E)},[v]);const U=o.useRef(i);o.useEffect(()=>{U.current=i},[i]);const J=o.useRef(null);o.useEffect(()=>{var Z;const E=U.current;if(!E||!(x!=null&&x.current))return;const P=S.length;if(P<=0)return;const V=((Z=x.current)==null?void 0:Z.clientWidth)??0,_=u[1],q=R.current??(v==null?void 0:v.scrollProgress)??0,ne=(V+a)/(_+a),A=Math.max(1,Math.floor(ne)),Y=Math.max(1,Math.round(A*(2/3))),te=Math.min(Math.max(0,z),Math.max(0,P-1)),le=te>0,Ee=te<P-1,fe={total:P,selectedIndex:te,visibleApprox:ne,visibleFull:A,stepHalf:Y,canPrev:le,canNext:Ee,scrollProgress:q,viewportWidth:V,itemMaxWidth:_,gap:a},xe=J.current;let K=!xe;if(!K){for(const se in fe)if(fe[se]!==xe[se]){K=!0;break}}K&&(J.current=fe,E(fe))},[x,S.length,z,v,a,u]),o.useEffect(()=>()=>{var E;(E=I.current)==null||E.stop()},[]);const[oe,j]=o.useState(0);o.useLayoutEffect(()=>{let E=u[1];v&&E>v.scrollVisible&&(E=v.scrollVisible);const P=(E+a)*C.length/y;j(P)},[x,N,v]);const L=E=>{if(!S.length)return;const P=ee??z;switch(E.key){case"ArrowLeft":E.preventDefault(),D(Math.max(0,P-1));break;case"ArrowRight":E.preventDefault(),D(Math.min(S.length-1,P+1));break;case"Home":E.preventDefault(),D(0);break;case"End":E.preventDefault(),D(S.length-1);break;case"Enter":case" ":E.preventDefault(),D(P);break}};return o.useEffect(()=>{const E=x.current;if(!E)return;const P=V=>{const _=V.detail;_&&typeof _.index=="number"&&D(_.index)};return E.addEventListener("udx:carousel:centerIndex",P),()=>{E.removeEventListener("udx:carousel:centerIndex",P)}},[x,S.length]),l.jsx("div",{className:M.carousel,ref:x,role:"listbox","aria-orientation":"horizontal",onKeyDown:L,...h,children:l.jsx(vt,{draggable:!0,orientation:"horizontal",onScroll:T,scrollSize:oe,children:l.jsx("div",{className:M.track,ref:g,style:{gap:`${a}px`,translate:b,willChange:"translate"},children:C})})})};/*!
1
+ "use strict";var Rn=Object.defineProperty;var Dn=(e,t,n)=>t in e?Rn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var B=(e,t,n)=>Dn(e,typeof t!="symbol"?t+"":t,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),o=require("react"),He=require("react-dom"),X=require("motion/react"),ft=require("clsx"),An=require("tailwind-merge"),Re=require("@udixio/theme"),ht=require("@udixio/tailwind"),Fn=require("react-textarea-autosize"),mt=({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]=o.useState(!0),[c,u]=o.useState(!1),[a,d]=o.useState({x:50,y:50});o.useEffect(()=>{c&&(r(!0),r(!1))},[c]),o.useEffect(()=>{const x=t==null?void 0:t.current;if(x)return x.addEventListener("mousedown",i),x.addEventListener("mouseup",y),x.addEventListener("mouseleave",f),()=>{x.removeEventListener("mousedown",i),x.removeEventListener("mouseup",y),x.removeEventListener("mouseleave",f)}},[t]);const i=x=>{const b=t==null?void 0:t.current,w=b.getBoundingClientRect();u(!0),d({x:(x.clientX-w.left)/b.clientWidth*100,y:(x.clientY-w.top)/b.clientHeight*100})},f=x=>{u(!1)},y=x=>{u(!1)},h=`color-mix(in srgb, var(--state-color,_var(--color-${e})) 10%, transparent)`,m={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), ${h} var(--r), transparent calc(var(--r) * 2))`,pointerEvents:"none"};return l.jsx(X.AnimatePresence,{mode:"wait",children:(c||!c&&!s)&&l.jsx(X.motion.div,{style:m,variants:n,initial:"initial",animate:"animate",exit:"exit",onAnimationComplete:()=>r(!0)})})},pt=An.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"]}}}),p=(...e)=>pt(ft.clsx(e)),yt=(...e)=>pt(ft.clsx(e));function Pn(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 Fe=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 c=s(e.states);Object.entries(c).map(u=>{const[a,d]=u;(t[a]??(t[a]=[])).push(d)})}});const n=t;return Object.entries(t).map(s=>{let[r,c]=s;c=c.reverse(),r==e.default&&c.unshift("relative"),c.unshift(Pn(r)),n[r]=yt(...c)}),n},re=(e,t)=>n=>Fe({classNameList:[n.className,t],default:e,states:n}),Q=(e,t)=>n=>o.useMemo(()=>Fe({classNameList:[n.className,t],default:e,states:n}),[n]);function $n(e,t,n){return o.useMemo(()=>Fe({classNameList:[n==null?void 0:n.className,t],default:e,states:n}),[e,t,n])}const xt=re("customScroll",({orientation:e,draggable:t,isDragging:n})=>({customScroll:p("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:p("overflow-hidden flex-none sticky",{"left-0 h-full":e==="horizontal","top-0 w-full":e==="vertical"})}));function Wn(e,t){let n=0,s=null,r=null;const c=(u,a)=>{n=Date.now(),t(u,a)};return(u,a)=>{const d=Date.now(),i=e-(d-n);i<=0?(s&&(clearTimeout(s),s=null),c(u,a)):(r={v:u,o:a},s||(s=setTimeout(()=>{s=null;const f=r;r=null,f&&c(f.v,f.o)},i)))}}const vt=({children:e,orientation:t="vertical",scrollSize:n,onScroll:s,className:r,draggable:c=!1,throttleDuration:u=75,scroll:a,setScroll:d})=>{var oe,j;const i=o.useRef(null),f=o.useRef(null),[y,h]=o.useState({width:null,height:null});o.useEffect(()=>{if(!i.current)return;const L=new ResizeObserver(E=>{for(const P of E)P.target===i.current&&h({width:P.contentRect.width,height:P.contentRect.height})});return L.observe(i.current),()=>{L.disconnect()}},[i]);const m=o.useRef(null),x=o.useRef(null),b=()=>{const L=f.current;return L?{width:n??L.scrollWidth,height:n??L.scrollHeight}:null},w=()=>{const L=i.current;return L?{width:L.clientWidth,height:L.clientHeight}:null},{scrollYProgress:M,scrollXProgress:S}=X.useScroll({container:i}),g=o.useRef(null);g.current||(g.current=Wn(u,(L,E)=>{!x.current||!m.current||!i.current||(E===(t==="horizontal"?"x":"y")&&(d==null||d(L)),s&&(t==="horizontal"&&E==="x"&&s({scrollProgress:L,scroll:L*(m.current.width-i.current.clientWidth),scrollTotal:m.current.width-i.current.clientWidth,scrollVisible:x.current.width}),t==="vertical"&&E==="y"&&s({scrollProgress:L,scroll:L*(m.current.height-i.current.clientHeight),scrollTotal:m.current.height-i.current.clientHeight,scrollVisible:x.current.height})))}));const $=(L,E)=>{g.current&&g.current(L,E)};o.useEffect(()=>{y.width&&$(S.get(),"x"),y.height&&$(M.get(),"y")},[y]),o.useEffect(()=>{const L=i.current,E=f.current;if(!L||!E||typeof a!="number")return;const P=(V,_,q)=>Math.min(q,Math.max(_,V));if(t==="horizontal"){const V=Math.max(0,(n??E.scrollWidth)-L.clientWidth);L.scrollLeft=P(a*V,0,V)}else{const V=Math.max(0,(n??E.scrollHeight)-L.clientHeight);L.scrollTop=P(a*V,0,V)}},[a,t,n]),X.useMotionValueEvent(S,"change",L=>{$(L,"x")}),X.useMotionValueEvent(M,"change",L=>{$(L,"y")});const[F,v]=o.useState(!1);o.useLayoutEffect(()=>{F||!x.current||!m.current||!s||(s({scrollProgress:0,scroll:0,scrollTotal:t=="vertical"?m.current.height:m.current.width,scrollVisible:t=="vertical"?x.current.height:x.current.width}),v(!0))},[x,m,s]),m.current=b(),x.current=w();const[k,R]=o.useState(!1),I=xt({isDragging:k,children:e,className:r,onScroll:s,orientation:t,scrollSize:n,draggable:c,throttleDuration:u}),[W,N]=o.useState(0),[z,O]=o.useState(0),ee=L=>{if(!c)return;const E=i.current;if(!E||W==null)return;const V=(L.pageX-E.offsetLeft-W)*1.5;E.scrollLeft=z-V},H=L=>{const E=i.current;E&&(R(!0),N(L.pageX-E.offsetLeft),O(E.scrollLeft))},D=L=>{k&&(L.preventDefault(),ee(L))},C=()=>{R(!1)},T=()=>{R(!1)},U=L=>{L.preventDefault()},J=o.useRef(null);return o.useEffect(()=>()=>{J.current&&clearTimeout(J.current)},[]),o.useEffect(()=>{const L=i.current;if(!L)return;const E=P=>{var ne,A,Y,te;const V=P.detail,_=i.current;if(!_||!V)return;const q=V.orientation??t;if(typeof V.progress=="number")if(q==="horizontal"){const le=Math.max(0,(((ne=m.current)==null?void 0:ne.width)??0)-_.clientWidth);_.scrollLeft=Math.min(le,Math.max(0,V.progress*le))}else{const le=Math.max(0,(((A=m.current)==null?void 0:A.height)??0)-_.clientHeight);_.scrollTop=Math.min(le,Math.max(0,V.progress*le))}else if(typeof V.scroll=="number")if(q==="horizontal"){const le=Math.max(0,(((Y=m.current)==null?void 0:Y.width)??0)-_.clientWidth);_.scrollLeft=Math.min(le,Math.max(0,V.scroll))}else{const le=Math.max(0,(((te=m.current)==null?void 0:te.height)??0)-_.clientHeight);_.scrollTop=Math.min(le,Math.max(0,V.scroll))}};return L.addEventListener("udx:customScroll:set",E),()=>{L.removeEventListener("udx:customScroll:set",E)}},[t]),l.jsxs("div",{className:I.customScroll,ref:i,onMouseDown:H,onMouseMove:D,onMouseUp:C,onMouseLeave:T,onDragStart:U,onScroll:L=>{k||(N(null),R(!0),J.current&&clearTimeout(J.current),J.current=setTimeout(()=>{R(!1)},1e3))},children:[l.jsx("div",{ref:f,style:t==="vertical"?{height:((oe=x==null?void 0:x.current)==null?void 0:oe.height)??"100%"}:{width:((j=x==null?void 0:x.current)==null?void 0:j.width)??"100%"},className:I.track,children:e}),x.current&&m.current&&l.jsxs(l.Fragment,{children:[t==="vertical"&&m.current.height>x.current.height&&l.jsx(X.motion.div,{className:"flex-none",style:{height:m.current.height-x.current.height}}),t==="horizontal"&&m.current.width>x.current.width&&l.jsx(X.motion.div,{className:"flex-none",style:{width:m.current.width-x.current.width}})]})]})};var Tn="1.3.17";function gt(e,t,n){return Math.max(e,Math.min(t,n))}function Bn(e,t,n){return(1-n)*e+n*t}function On(e,t,n,s){return Bn(e,t,1-Math.exp(-n*s))}function Hn(e,t){return(e%t+t)%t}var Vn=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(e){var n;if(!this.isRunning)return;let t=!1;if(this.duration&&this.easing){this.currentTime+=e;const s=gt(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=On(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:c,onUpdate:u}){this.from=this.value=e,this.to=t,this.lerp=n,this.duration=s,this.easing=r,this.currentTime=0,this.isRunning=!0,c==null||c(),this.onUpdate=u}};function zn(e,t){let n;return function(...s){let r=this;clearTimeout(n),n=setTimeout(()=>{n=void 0,e.apply(r,s)},t)}}var Yn=class{constructor(e,t,{autoResize:n=!0,debounce:s=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=e,this.content=t,n&&(this.debouncedResize=zn(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}}},wt=class{constructor(){B(this,"events",{})}emit(e,...t){var s;let n=this.events[e]||[];for(let r=0,c=n.length;r<c;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={}}},rt=100/6,pe={passive:!1},_n=class{constructor(e,t={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 wt);B(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})});B(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})});B(this,"onTouchEnd",e=>{this.emitter.emit("scroll",{deltaX:this.lastDelta.x,deltaY:this.lastDelta.y,event:e})});B(this,"onWheel",e=>{let{deltaX:t,deltaY:n,deltaMode:s}=e;const r=s===1?rt:s===2?this.window.width:1,c=s===1?rt:s===2?this.window.height:1;t*=r,n*=c,t*=this.options.wheelMultiplier,n*=this.options.wheelMultiplier,this.emitter.emit("scroll",{deltaX:t,deltaY:n,event:e})});B(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,pe),this.element.addEventListener("touchstart",this.onTouchStart,pe),this.element.addEventListener("touchmove",this.onTouchMove,pe),this.element.addEventListener("touchend",this.onTouchEnd,pe)}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,pe),this.element.removeEventListener("touchstart",this.onTouchStart,pe),this.element.removeEventListener("touchmove",this.onTouchMove,pe),this.element.removeEventListener("touchend",this.onTouchEnd,pe)}},ot=e=>Math.min(1,1.001-Math.pow(2,-10*e)),qn=class{constructor({wrapper:e=window,content:t=document.documentElement,eventsTarget:n=e,smoothWheel:s=!0,syncTouch:r=!1,syncTouchLerp:c=.075,touchInertiaExponent:u=1.7,duration:a,easing:d,lerp:i=.1,infinite:f=!1,orientation:y="vertical",gestureOrientation:h=y==="horizontal"?"both":"vertical",touchMultiplier:m=1,wheelMultiplier:x=1,autoResize:b=!0,prevent:w,virtualScroll:M,overscroll:S=!0,autoRaf:g=!1,anchors:$=!1,autoToggle:F=!1,allowNestedScroll:v=!1,__experimental__naiveDimensions:k=!1,naiveDimensions:R=k,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 Vn);B(this,"emitter",new wt);B(this,"dimensions");B(this,"virtualScroll");B(this,"onScrollEnd",e=>{e instanceof CustomEvent||(this.isScrolling==="smooth"||this.isScrolling===!1)&&e.stopPropagation()});B(this,"dispatchScrollendEvent",()=>{this.options.wrapper.dispatchEvent(new CustomEvent("scrollend",{bubbles:this.options.wrapper===window,detail:{lenisScrollEnd:!0}}))});B(this,"onTransitionEnd",e=>{e.propertyName.includes("overflow")&&this.checkOverflow()});B(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 c;return(c=r.getAttribute("href"))==null?void 0:c.includes("#")});if(s){const r=s.getAttribute("href");if(r){const c=typeof this.options.anchors=="object"&&this.options.anchors?this.options.anchors:void 0,u=`#${r.split("#")[1]}`;this.scrollTo(u,c)}}}this.options.stopInertiaOnNavigate&&n.find(r=>r.host===window.location.host)&&this.reset()});B(this,"onPointerDown",e=>{e.button===1&&this.reset()});B(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"),c=s.type.includes("wheel");this.isTouching=s.type==="touchstart"||s.type==="touchmove";const u=t===0&&n===0;if(this.options.syncTouch&&r&&s.type==="touchstart"&&u&&!this.isStopped&&!this.isLocked){this.reset();return}const d=this.options.gestureOrientation==="vertical"&&n===0||this.options.gestureOrientation==="horizontal"&&t===0;if(u||d)return;let i=s.composedPath();i=i.slice(0,i.indexOf(this.rootElement));const f=this.options.prevent;if(i.find(w=>{var M,S,g;return w instanceof HTMLElement&&(typeof f=="function"&&(f==null?void 0:f(w))||((M=w.hasAttribute)==null?void 0:M.call(w,"data-lenis-prevent"))||r&&((S=w.hasAttribute)==null?void 0:S.call(w,"data-lenis-prevent-touch"))||c&&((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&&c)){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}})});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 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))}});B(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=Tn,(!e||e===document.documentElement)&&(e=window),typeof a=="number"&&typeof d!="function"?d=ot:typeof d=="function"&&typeof a!="number"&&(a=1),this.options={wrapper:e,content:t,eventsTarget:n,smoothWheel:s,syncTouch:r,syncTouchLerp:c,touchInertiaExponent:u,duration:a,easing:d,lerp:i,infinite:f,gestureOrientation:h,orientation:y,touchMultiplier:m,wheelMultiplier:x,autoResize:b,prevent:w,virtualScroll:M,overscroll:S,autoRaf:g,anchors:$,autoToggle:F,allowNestedScroll:v,naiveDimensions:R,stopInertiaOnNavigate:I},this.dimensions=new Yn(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 _n(n,{touchMultiplier:m,wheelMultiplier:x}),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:c=r?this.options.lerp:void 0,duration:u=r?this.options.duration:void 0,easing:a=r?this.options.easing:void 0,onStart:d,onComplete:i,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 x=this.rootElement.getBoundingClientRect();t-=this.isHorizontal?x.left:x.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=gt(0,e,this.limit);if(e===this.targetScroll){d==null||d(this),i==null||i(this);return}if(this.userData=y??{},n){this.animatedScroll=this.targetScroll=e,this.setScroll(this.scroll),this.reset(),this.preventNextNativeScrollEvent(),this.emit(),i==null||i(this),this.userData={},requestAnimationFrame(()=>{this.dispatchScrollendEvent()});return}r||(this.targetScroll=e),typeof u=="number"&&typeof a!="function"?a=ot:typeof a=="function"&&typeof u!="number"&&(u=1),this.animate.fromTo(this.animatedScroll,e,{duration:u,easing:a,lerp:c,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(),i==null||i(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 c,u,a,d,i,f,y,h;const m=this.options.gestureOrientation;if(s-(r.time??0)>2e3){r.time=Date.now();const F=window.getComputedStyle(e);r.computedStyle=F;const v=F.overflowX,k=F.overflowY;if(c=["auto","overlay","scroll"].includes(v),u=["auto","overlay","scroll"].includes(k),r.hasOverflowX=c,r.hasOverflowY=u,!c&&!u||m==="vertical"&&!u||m==="horizontal"&&!c)return!1;i=e.scrollWidth,f=e.scrollHeight,y=e.clientWidth,h=e.clientHeight,a=i>y,d=f>h,r.isScrollableX=a,r.isScrollableY=d,r.scrollWidth=i,r.scrollHeight=f,r.clientWidth=y,r.clientHeight=h}else a=r.isScrollableX,d=r.isScrollableY,c=r.hasOverflowX,u=r.hasOverflowY,i=r.scrollWidth,f=r.scrollHeight,y=r.clientWidth,h=r.clientHeight;if(!c&&!u||!a&&!d||m==="vertical"&&(!u||!d)||m==="horizontal"&&(!c||!a))return!1;let x;if(m==="horizontal")x="x";else if(m==="vertical")x="y";else{const F=t!==0,v=n!==0;F&&c&&a&&(x="x"),v&&u&&d&&(x="y")}if(!x)return!1;let b,w,M,S,g;if(x==="x")b=e.scrollLeft,w=i-y,M=t,S=c,g=a;else if(x==="y")b=e.scrollTop,w=f-h,M=n,S=u,g=d;else return!1;return(M>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?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(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 Xn=({transition:e=1.2,easing:t,orientation:n="vertical",smoothTouch:s=!1,touchMultiplier:r=2,children:c})=>{const u=o.useRef(null),a=o.useRef(null);return o.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 i=y=>1-Math.pow(1-y,5);u.current=new qn({duration:d,easing:t??i,orientation:n,smoothWheel:!0,touchMultiplier:r,syncTouch:s});const f=y=>{var h;(h=u.current)==null||h.raf(y),a.current=requestAnimationFrame(f)};return a.current=requestAnimationFrame(f),()=>{var y;a.current!==null&&cancelAnimationFrame(a.current),(y=u.current)==null||y.destroy(),u.current=null}},[e,t,n,s,r]),c?l.jsx(l.Fragment,{children:c}):null},de=({style:e,colorName:t,stateClassName:n="state-ripple-group",children:s,className:r})=>{const c=o.useRef(null),u=o.useRef(null),[a,d]=o.useState(!1),i=bt({isClient:a,stateClassName:n,className:r,colorName:t});return o.useEffect(()=>{if(c.current&&n!=="state-layer"){const y=(n.includes("[")?"group/"+n.split("[")[1].split("]")[0]:"group").replace(/\//g,"\\/"),h=c.current.closest(`.${y}:not(.${y} .${y})`);u.current=h}d(!0)},[]),l.jsxs("div",{ref:c,className:i.stateLayer,style:{"--state-color":`var(--default-color, var(--color-${t}))`,...e},children:[a&&l.jsx(mt,{triggerRef:u}),s]})},Un=({isClient:e,stateClassName:t})=>({stateLayer:p(["w-full top-0 left-0 h-full absolute pointer-events-none overflow-hidden",t])}),bt=Q("stateLayer",Un),St=({targetRef:e,children:t})=>{const[n,s]=o.useState(null),r=o.useRef(null),c=()=>{const u=e.current;if(!u)return;const a=u.getBoundingClientRect();s({position:"fixed",top:a.top,left:a.left,width:a.width,height:a.height,pointerEvents:"none",zIndex:999})};return o.useEffect(()=>{const u=e.current;if(u)return c(),window.addEventListener("scroll",c,!0),window.addEventListener("resize",c),r.current=new ResizeObserver(c),r.current.observe(u),()=>{var a;window.removeEventListener("scroll",c,!0),window.removeEventListener("resize",c),(a=r.current)==null||a.disconnect()}},[e]),n?He.createPortal(l.jsx("div",{style:n,children:t}),document.body):null};function Gn(e){return/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(e)}const Kn=({config:e,throttleDelay:t=100,onLoad:n,loadTheme:s=!1})=>{const[r,c]=o.useState(null);o.useEffect(()=>{(async()=>{const h=await Re.loader(e,s);c(h)})()},[]);const[u,a]=o.useState(null),d=o.useRef(null),i=o.useRef(0),f=o.useRef(null);o.useEffect(()=>{if(!r)return;const h={...e,sourceColor:e.sourceColor},m=Date.now(),x=m-i.current,b=async w=>{await y(w)};if(i.current===0||x>=t)d.current&&(clearTimeout(d.current),d.current=null),f.current=null,i.current=m,b(h);else if(f.current=h,!d.current){const w=Math.max(0,t-x);d.current=setTimeout(async()=>{d.current=null;const M=f.current;f.current=null,M&&(i.current=Date.now(),await b(M))},w)}return()=>{}},[e,t,r]);const y=async h=>{if(typeof h.sourceColor=="string"&&!Gn(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(ht.TailwindPlugin).getInstance().outputCss;a(m),n==null||n(r)};return o.useEffect(()=>()=>{d.current&&(clearTimeout(d.current),d.current=null)},[]),u?l.jsx("style",{dangerouslySetInnerHTML:{__html:u}}):null};function Jn(){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 Zn(){return typeof window>"u"||!("matchMedia"in window)?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches}function Ve(e){if(!(e instanceof HTMLElement))return!1;const t=e.classList;return Array.from(t).some(n=>n.startsWith("anim-")&&n.includes("scroll"))}function it(e){if(!(e instanceof HTMLElement))return!1;const t=e.classList;return Array.from(t).some(n=>n.startsWith("anim-"))}function $e(e,t){if(!Ve(e))return;if(e.hasAttribute(`data-${t}-scroll`)){const u=(e.getAttribute(`data-${t}-scroll`)||"").trim().toLowerCase(),a=u==="x"||u==="inline"?"inline":u==="y"||u==="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`)||(a==="inline"?e.classList.add(`${t}-timeline-inline`):a==="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`),c=e.hasAttribute(`data-${t}-run`)||e.classList.contains(`${t}-run`);!r&&!c&&e.setAttribute(`data-${t}-run`,"")}function We(e=document,t){return Array.from(e.querySelectorAll(`[class*="${t}-"][class*="-scroll"]`)).filter(s=>Ve(s))}function Qn(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 c=r.classList;return c.contains(`${t}-in`)||c.contains(`${t}-out`)||Array.from(c).some(d=>d.startsWith(`${t}-`)&&!d.includes("scroll")&&!s.has(d))?!0:!Ve(r)})}function es(e,t){return Array.from(e).some(n=>n.startsWith(t)&&n.includes("-out"))}function lt(e,t,n){e.setAttribute(`data-${t}-run`,""),e.setAttribute(`data-${t}-${n}-run`,"")}function at(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 ts=[0,.2],ct=new WeakSet;function ut(e,t){if(ct.has(e))return;ct.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 ze(e={}){const{prefix:t="anim",once:n=!0}=e;if(Zn())return()=>{};const s=Jn(),r=new WeakSet;let c=typeof window<"u"&&(window.pageYOffset||window.scrollY)||0,u=!0;const a=()=>{const m=window.pageYOffset||window.scrollY||0;u=m>=c,c=m};typeof window<"u"&&window.addEventListener("scroll",a,{passive:!0});const d=new IntersectionObserver(m=>{for(const x of m){const b=x.target;if(!it(b)||b.hasAttribute(`data-${t}-animating`))continue;const w=es(b.classList,t);x.isIntersecting?(w&&at(b,t,"out"),lt(b,t,"in"),n&&d.unobserve(b)):n||(u||at(b,t,"in"),w&&lt(b,t,"out"))}},{threshold:ts}),i=m=>{const x=Qn(m||document,t);for(const b of x)r.has(b)||(r.add(b),d.observe(b),ut(b,t))};i();let f,y=null,h=null;if(s)(()=>{h==null&&(h=requestAnimationFrame(()=>{h=null;const x=We(void 0,t);for(const b of x)$e(b,t)}))})(),y=new MutationObserver(x=>{for(const b of x)if(b.type==="attributes"){const w=b.target;w instanceof HTMLElement&&($e(w,t),it(w)&&(r.has(w)||(r.add(w),d.observe(w),ut(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 M=We(w,t);for(const S of M)$e(S,t);i(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;We(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",a),d.disconnect()}}const ns=ze,ss=ze,Ne=({anchorRef:e,position:t="bottom",children:n,style:s,...r})=>{const u=`--anchor-${o.useId().replace(/:/g,"")}`,[a,d]=o.useState(!1);if(o.useLayoutEffect(()=>{typeof CSS<"u"&&CSS.supports("anchor-name","--a")&&d(!0)},[]),o.useLayoutEffect(()=>{if(a&&e.current){const f=e.current;return f.style.anchorName=u,()=>{e.current&&(e.current.style.anchorName="")}}},[a,e,u]),a){const f={position:"fixed",margin:0,zIndex:9999,positionAnchor:u,positionArea:t,positionTryFallbacks:"flip-block, flip-inline",...s};return He.createPortal(l.jsx("div",{style:f,...r,children:n}),document.body)}const i={position:"absolute",pointerEvents:"auto",...s};switch(t){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 l.jsx(St,{targetRef:e,children:l.jsx("div",{style:i,...r,children:n})})},Et=({variant:e,disableTextMargins:t,disabled:n,iconPosition:s,icon:r,isActive:c,loading:u,shape:a,onToggle:d,size:i,allowShapeTransformation:f})=>({button:p(" 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"||f&&c)&&{"rounded-[12px]":i==="xSmall"||i=="small","rounded-[16px]":i==="medium","rounded-[28px]":i==="large"||i=="xLarge"},f&&!n&&{"active:rounded-[12px]":i==="xSmall"||i=="small","active:rounded-[16px]":i==="medium","active:rounded-[28px]":i==="large"||i=="xLarge"},e==="elevated"&&{"shadow-1 hover:shadow-2":!n,"bg-surface-container-low text-primary":!n&&!c,"bg-primary text-on-primary":!n&&c,"text-on-surface/[38%]":n},e==="filled"&&{"hover:shadow-1":!n,"bg-surface-container text-on-surface-variant":!n&&!c&&d,"bg-primary text-on-primary":!n&&(c&&d||!d),"text-on-surface/[38%]":n},e==="tonal"&&{"hover:shadow-1":!n,"bg-secondary-container text-on-secondary-container":!n&&!c,"bg-secondary text-on-secondary":!n&&c,"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&&!c,"text-inverse-on-surface bg-inverse-surface border-inverse-surface":!n&&c}],e==="text"&&["w-fit",{"text-primary":!n,"text-on-surface/[0.38]":n},t&&[i==="xSmall"&&"-mx-3 ",i==="small"&&"-mx-4 ",i==="medium"&&"-mx-6 ",i==="large"&&"-mx-12",i==="xLarge"&&"-mx-16 "]],n&&"cursor-default"),touchTarget:p("absolute -translate-x-1/2 -translate-y-1/2 left-1/2 top-1/2 h-12 w-full"),stateLayer:p("overflow-hidden",a==="rounded"&&{"rounded-[30px]":i==="xSmall"||i=="small","rounded-[40px]":i==="medium","rounded-[70px]":i==="large"||i=="xLarge"},(a==="squared"||f&&c)&&{"rounded-[12px]":i==="xSmall"||i=="small","rounded-[16px]":i==="medium","rounded-[28px]":i==="large"||i=="xLarge"},f&&!n&&{"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:p({invisible:u}),icon:p({invisible:u},i==="xSmall"&&"size-5",i==="small"&&"size-5",i==="medium"&&"size-6",i==="large"&&"size-8",i==="xLarge"&&"size-10")}),rs=re("button",Et),Nt=Q("button",Et),kt=({variant:e,isInteractive:t})=>({card:p(" 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})}),os=re("card",kt),jt=Q("card",kt),Ye=({width:e})=>({carouselItem:p("rounded-[28px] overflow-hidden flex-none",{hidden:e===void 0,"flex-1":e==null})}),is=re("carouselItem",Ye),Lt=Q("carouselItem",Ye),Mt=()=>({carousel:p(["w-full h-[400px]"]),track:p("flex h-full w-full")}),ls=re("carousel",Mt),It=Q("carousel",Mt),Ct=({isChecked:e,isIndeterminate:t,isDisabled:n,isError:s,isFocused:r,isHovered:c})=>({checkbox:p("inline-flex items-center justify-center relative size-4.5 ",{"pointer-events-none opacity-[0.38]":n}),input:p("absolute inset-0 w-full h-full opacity-0 z-10 cursor-pointer"),container:p("relative flex items-center justify-center w-[18px] h-[18px] "),box:p("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:p("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"}),as=re("checkbox",Ct),Rt=Q("checkbox",Ct),Dt=({variant:e,disabled:t,trailingIcon:n,icon:s,isActive:r,isInteractive:c,activated:u,isFocused:a,isDragging:d,isEditing:i})=>({chip:p(" 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&&c},{" text-on-surface-variant":!u&&!a||i,"bg-secondary-container text-on-secondary-container":(u||a)&&!i},d&&["opacity-100 cursor-grabbing shadow-3"],e==="outlined"&&["border border-outline-variant",{"border-transparent":i}],e==="elevated"&&!i&&["shadow-1 bg-surface-container-low","border border-outline-variant"]),stateLayer:p("rounded-lg overflow-hidden",{}),label:p("outline-none text-nowrap",{"opacity-[0.38]":t}),leadingIcon:p("text-primary size-[18px]",{"opacity-[0.38]":t}),trailingIcon:p("cursor-pointer size-[18px]",{"opacity-[0.38]":t})}),cs=re("chip",Dt),At=Q("chip",Dt),Ft=({scrollable:e})=>({chips:p(" flex gap-3 outline-none",{"flex-wrap":!e,"overflow-x-auto":e})}),us=re("chips",Ft),Pt=Q("chips",Ft),$t=({orientation:e})=>({divider:p("border-outline-variant ",{"h-fit w-full border-t":e==="horizontal"},{"h-auto self-stretch w-fit border-l":e==="vertical"})}),ds=re("divider",$t),Wt=Q("divider",$t),Tt=({size:e,variant:t,extended:n})=>({fab:p("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:p({"size-6":e=="small"||e=="medium","size-9":e=="large"}),label:p("text-nowrap",{"text-title-medium":e=="small","text-title-large":e=="medium","text-headline-small":e=="large"})}),fs=re("fab",Tt),Bt=Q("fab",Tt),Ot=({size:e,variant:t,open:n})=>({fabMenu:p("relative inline-flex flex-col items-end"),actions:p("flex flex-col gap-1 items-end absolute bottom-[calc(100%_+_8px)] right-0"),label:p("text-nowrap")}),hs=re("fabMenu",Ot),Ht=Q("fabMenu",Ot),Vt=({variant:e,disabled:t,onToggle:n,isActive:s,size:r,width:c,shape:u,allowShapeTransformation:a})=>({iconButton:p("rounded-full relative flex transition-all duration-300","group/icon-button cursor-pointer",{"cursor-default":t},u==="rounded"&&{"rounded-[30px]":r==="xSmall"||r=="small","rounded-[40px]":r==="medium","rounded-[70px]":r==="large"||r=="xLarge"},(u==="squared"||a&&s)&&{"rounded-[12px]":r==="xSmall"||r=="small","rounded-[16px]":r==="medium","rounded-[28px]":r==="large"||r=="xLarge"},a&&!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:p("absolute -translate-x-1/2 -translate-y-1/2 left-1/2 top-1/2 h-12 w-full"),stateLayer:p("absolute top-0 left-0 h-full w-full overflow-hidden",(u==="rounded"||u==="squared"&&n&&!t&&s&&a)&&{"rounded-[30px]":r==="xSmall"||r=="small","rounded-[40px]":r==="medium","rounded-[70px]":r==="large"||r=="xLarge"},(u==="squared"||u==="rounded"&&n&&!t&&s&&a)&&{"rounded-[12px]":r==="xSmall"||r=="small","rounded-[16px]":r==="medium","rounded-[28px]":r==="large"||r=="xLarge"},a&&!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:p(" 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"},c=="narrow"&&[{"px-1":r==="xSmall"},{"px-1":r==="small"},{"px-3":r==="medium"},{"px-4":r==="large"},{"px-8":r==="xLarge"}],c=="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]")}),ms=re("iconButton",Vt),zt=Q("iconButton",Vt),Yt=({variant:e,hasGroups:t})=>({menu:p("z-50 min-w-[112px] max-w-[280px] max-h-[300px] ","flex flex-col",{"overflow-y-auto":!t},{"bg-surface-container":!e||e==="standard","bg-tertiary-container text-on-tertiary-container":e==="vibrant","py-0.5 shadow-2 px-1 rounded-2xl":!t,"bg-transparent ":t})}),ps=re("menu",Yt),_t=Q("menu",Yt),qt=({variant:e})=>({menuGroup:p("flex flex-col gap-0.5 mb-0.5 last:mb-0","rounded-lg py-0.5 px-1 shadow-2 first:rounded-t-2xl last:rounded-b-2xl",{"bg-surface-container":e==="standard","bg-tertiary-container text-on-tertiary-container":e==="vibrant"}),groupLabel:p("px-3 pt-2 text-label-small tracking-wide ",{"text-on-surface-variant":e==="standard","text-on-tertiary-container opacity-80":e==="vibrant"})}),ys=re("menuGroup",qt),Xt=Q("menuGroup",qt),Ut=({variant:e,isVisible:t})=>({progressIndicator:p((e==="linear-determinate"||e=="linear-indeterminate")&&"flex w-full h-1"),track:p("h-full rounded-full bg-primary rounded-l-full",{"max-h-0":!t,"max-h-full":t}),activeIndicator:p({"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:p("absolute top-1/2 -translate-y-1/2 right-0 bg-primary rounded-full size-1",{"max-h-0":!t,"max-h-full":t})}),xs=re("progressIndicator",Ut),Gt=Q("progressIndicator",Ut),_e=({variant:e,position:t})=>({sideSheet:p("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:p("w-full overflow-hidden flex flex-col",{}),header:p("p-4 flex items-center gap-2"),content:p("flex-1 overflow-y-auto"),title:p("text-on-surface-variant text-title-large"),closeButton:p("ml-auto"),divider:p({hidden:e=="modal"}),overlay:p("bg-[black]/[0.32] fixed top-0 left-0 w-screen h-screen")}),Kt=re("sideSheet",_e),vs=Q("sideSheet",_e),qe=({isChanging:e})=>({slider:p(["relative w-full h-11 flex items-center rounded gap-x-1.5 cursor-pointer min-w-32"]),activeTrack:p(["h-4 relative transition-all duration-100 bg-primary overflow-hidden rounded-l-full "]),inactiveTrack:p(["h-4 relative transition-all duration-100 bg-primary-container rounded-r-full overflow-hidden"]),handle:p(["transform relative transition-all duration-100 bg-primary h-full rounded-full ",{"w-0.5":e,"w-1":!e}]),valueIndicator:p(["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:p(["h-1 w-1 absolute transform -translate-y-1/2 -translate-x-1/2 top-1/2 rounded-full"])}),gs=re("slider",qe),Jt=Q("slider",qe),Zt=()=>({snackbar:p(" rounded bg-inverse-surface "),container:p("pl-4 pr-2 max-w-full py-1 flex items-center flex-wrap"),supportingText:p("text-body-medium text-inverse-on-surface "),icon:p(" ml-auto mr-0 text-inverse-on-surface block dark")}),ws=re("snackbar",Zt),Qt=Q("snackbar",Zt),en=({isSelected:e,disabled:t,inactiveIcon:n})=>({switch:p("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:p("flex items-center justify-center absolute",{"left-[14px]":!e},{"right-[14px]":e}),handle:p("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:p("w-[40px] h-[40px] -z-10 rounded-full absolute",{"group-state-primary":!t}),icon:p("w-[16px] h-[16px]",!t&&[{"text-on-primary-container":e},{"text-on-primary":!e}],{"text-on-surface/[0.38]":t})}),bs=re("switch",en),tn=Q("switch",en),nn=({isSelected:e,icon:t,label:n,variant:s})=>({tab:p("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:p("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:p("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:p("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:p("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:p("bg-primary absolute w-full left-0 bottom-0",s==="primary"&&"h-[3px] rounded-t",s==="secondary"&&"h-0.5")}),Ss=re("tab",nn),sn=Q("tab",nn),rn=({scrollable:e})=>({tabs:p("border-b border-surface-container-highest bg-surface","flex relative ",{"overflow-x-auto":e})}),Es=re("tabs",rn),on=Q("tabs",rn),ln=()=>({tabPanels:p("overflow-hidden")}),Ns=re("tabPanels",ln),an=Q("tabPanels",ln),cn=()=>({tabPanel:p("")}),ks=re("tabPanel",cn),un=Q("tabPanel",cn),dn=({disabled:e,leadingIcon:t,trailingIcon:n,variant:s,errorText:r,isFocused:c,value:u,suffix:a,multiline:d})=>({textField:p({"opacity-[.38]":e}),content:p("group/text-field transition-border duration-200 relative flex items-center ",{"h-14":!d},{"border-on-surface-variant":!(r!=null&&r.length)&&!c&&s=="filled","border-outline":!(r!=null&&r.length)&&!c&&s=="outlined","border-primary":!(r!=null&&r.length)&&c,"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]":c}]),stateLayer:p("absolute -z-10 w-full h-full top-0 left-0",{hidden:s=="outlined"},{"group-state-on-surface":!e,"focus-state-on-surface":c}),label:p("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)&&c}),input:p("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":!!a},s=="filled"&&" pb-2 pt-6",s=="outlined"&&"py-4 relative z-10"),activeIndicator:p("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":c}]),supportingText:p(" text-body-small px-4 pt-1",{"text-on-surface-variant":!e&&!(r!=null&&r.length)},{"text-on-surface":e},{"!w-full":c},{"text-error":!!(r!=null&&r.length)}),leadingIcon:p(["h-12 ml-3 flex items-center justify-center",{"cursor-text":!o.isValidElement(t)}]),trailingIcon:p("h-12 w-12 flex items-center justify-center",{"cursor-text":!o.isValidElement(n)}),suffix:p("text-on-surface-variant pl-0 pr-4",s=="filled"&&" pb-2 pt-6",s=="outlined"&&"py-4 relative z-10")}),js=re("textField",dn),fn=Q("textField",dn),hn=({position:e,variant:t})=>({toolTip:p(" 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:p("pb-2",t=="rich"&&"px-4 pt-3 ",t=="plain"&&"px-2 py-1"),actions:p("flex gap-10 px-1 mt-2",t=="plain"&&"hidden"),subHead:p("text-title-small mb-1",t=="plain"&&"hidden"),supportingText:p(""),content:p("w-full")}),Ls=re("toolTip",hn),mn=Q("toolTip",hn),ce=({icon:e,colors:t=[],className:n,...s})=>{if(typeof e=="string"){let f=e,y="";return t[0]&&(y=` fill="${t[0]}" color="${t[0]}"`,f=f.replace(/<path([^>]*?)>/g,'<path$1 fill="currentColor">')),f=f.replace(/<svg([^>]*)>/,(h,m)=>`<svg${m.replace(/\s+(width|height)=["'][^"']*["']/g,"")} width="100%" height="100%"${y}>`),l.jsx("div",{className:p("size-5 box-content inline-flex fill-current",n),style:{color:t[0]||""},dangerouslySetInnerHTML:{__html:f}})}if(e&&typeof e=="object"&&"src"in e){const f=e;return l.jsx("img",{src:f.src,width:f.width,height:f.height,className:p("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:c}=r,[u,a,,,d]=c||[],i=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 l.jsx("svg",{className:p("size-5 box-content",n),style:{...i(t)},xmlns:"http://www.w3.org/2000/svg",viewBox:`0 0 ${u} ${a}`,role:"img","aria-hidden":"true",...s,children:typeof d=="string"?l.jsx("path",{className:"fill-current",d}):d.map((f,y)=>l.jsx("path",{d:f},y))})},pn=({variant:e="linear-determinate",value:t=0,transitionDuration:n=1e3,className:s,...r})=>{const[c,u]=o.useState(t),[a]=o.useState(1.5);o.useEffect(()=>{t>100&&(t=100),t<0&&(t=0),u(t)},[t]);const[d,i]=o.useState(!0),f=()=>d?a:a*.5;o.useEffect(()=>{if((e==="circular-indeterminate"||e==="linear-indeterminate")&&c!==100){const x=setInterval(()=>{u(d?10:90),i(!d)},f()*1e3);return()=>clearInterval(x)}},[e,d,c]);const[y,h]=o.useState(!1);o.useEffect(()=>{if(c>=100){const x=setTimeout(()=>{h(!1)},n);return()=>{clearTimeout(x)}}else h(!0)},[c,n]);const m=Gt({className:s,variant:e,value:t,transitionDuration:n,isVisible:y});return l.jsxs(l.Fragment,{children:[(e==="linear-determinate"||e=="linear-indeterminate")&&l.jsxs("div",{className:m.progressIndicator,...r,children:[l.jsx("div",{style:{width:`${c}%`,transition:`width ${n}ms ease-in-out ${c==100?", max-height 200ms 0.5s ease-in-out":""}`},className:m.track}),l.jsx("div",{style:{marginLeft:c!=100?"6px":"0px",transition:`width ${n}ms ease-in-out ${c==100?`, max-height 200ms 0.5s ease-in-out, margin-left ${n}ms ${n/1.5}ms`:""}`},className:m.activeIndicator}),l.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")&&l.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:l.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 Ms(e){const t={primary:"filled",secondary:"tonal"};return e&&e in t?t[e]:e||"filled"}const ye=({variant:e="filled",disabled:t=!1,icon:n,href:s,label:r,disableTextMargins:c,className:u,iconPosition:a="left",loading:d=!1,shape:i="rounded",onClick:f,onToggle:y,activated:h,ref:m,size:x="medium",allowShapeTransformation:b=!0,transition:w,children:M,...S})=>{if(M&&(r=M),!r)throw new Error("Button component requires either a label prop or children content");e=Ms(e);const g=s?"a":"button",$=o.useRef(null),F=m||$,[v,k]=o.useState(h);o.useEffect(()=>{k(h)},[h]),w={duration:.3,...w};const R=N=>{t&&N.preventDefault(),y?(k(!v),y(!v)):f&&f(N)},I=Nt({allowShapeTransformation:b,size:x,disableTextMargins:c,shape:i,href:s,disabled:t,icon:n,iconPosition:a,loading:d,variant:e,transition:w,className:u,isActive:v??!1,onToggle:y,activated:v,label:r,children:r}),W=n?l.jsx(ce,{icon:n,className:I.icon}):l.jsx(l.Fragment,{});return l.jsxs(g,{ref:F,href:s,className:I.button,...S,onClick:R,disabled:t,"aria-pressed":y?v:void 0,style:{transition:w.duration+"s"},children:[l.jsx("div",{className:I.touchTarget}),l.jsx(de,{style:{transition:w.duration+"s"},className:I.stateLayer,colorName:p(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]"}),a==="left"&&W,d&&l.jsx("div",{className:"!absolute left-1/2 -translate-x-1/2 top-1/2 -translate-y-1/2",children:l.jsx(pn,{className:()=>({progressIndicator:"h-6 w-6",activeIndicator:p({"!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"})}),l.jsx("span",{className:I.label,children:r}),a==="right"&&W]})},Is=({variant:e="outlined",className:t,children:n,interactive:s=!1,ref:r,...c})=>{const u=jt({className:t,isInteractive:s,variant:e,children:n}),a=o.useRef(null),d=r||a;return l.jsxs("div",{...c,ref:d,className:u.card,children:[s&&l.jsx(de,{className:u.stateLayer,colorName:"on-surface",stateClassName:"state-ripple-group-[card]"}),n]})},be=(e,t,n=[0,1])=>{const[s,r]=t,[c,u]=n,d=(Math.max(s,Math.min(e,r))-s)/(r-s);return c+d*(u-c)},yn=({className:e,children:t,width:n,index:s=0,outputRange:r,ref:c,...u})=>{const a=o.useRef(null),d=c||a,i=Lt({className:e,index:s,width:n,children:t,outputRange:r});return l.jsx("div",{ref:d,style:{width:n+"px",maxWidth:r[1]+"px",minWidth:r[0]+"px",willChange:"width"},transition:{duration:.5,ease:"linear"},className:i.carouselItem,...u,children:t})},Cs=({variant:e="hero",className:t,children:n,ref:s,marginPourcent:r=0,inputRange:c=[.21,.65],outputRange:u=[42,300],gap:a=8,onChange:d,onMetricsChange:i,index:f,scrollSensitivity:y=1.25,...h})=>{const m=o.useRef(null),x=s||m,[b,w]=o.useState(0),M=It({index:f,className:t,children:n,variant:e,inputRange:c,outputRange:u,marginPourcent:r,onChange:d,gap:a,scrollSensitivity:y,onMetricsChange:i}),S=o.Children.toArray(n).filter(E=>o.isValidElement(E)&&E.type===yn),g=o.useRef(null),[$,F]=o.useState({}),[v,k]=o.useState(null),R=o.useRef(0),I=o.useRef(null),W=()=>{var fe,xe;if(!g.current||!x.current||(v==null?void 0:v.scrollProgress)===void 0)return[];const E=(v==null?void 0:v.scrollVisible)??((fe=x.current)==null?void 0:fe.clientWidth)??0;function P(K,Z){return K.map((se,he)=>{const ve=(se-Z)/Math.abs(K[1]-K[0]);return{itemScrollXCenter:se,relativeIndex:ve,index:he,width:0}})}const V=S.map((K,Z)=>{if(!N[Z].current||!g.current)return 0;const he=Z/(S.length-1);return be(he,[0,1],[0,1])}),_=P(V,(v==null?void 0:v.scrollProgress)??0).sort((K,Z)=>K.index-Z.index);let q=(((xe=x.current)==null?void 0:xe.clientWidth)??E)+a+u[0]+a;const ne=_.sort((K,Z)=>Math.abs(K.relativeIndex)-Math.abs(Z.relativeIndex)).map((K,Z)=>{if(!(q<=0)){if(Z==0&&O(K.index),K.width=be(q-a,[u[0],u[1]],[u[0],u[1]]),q-=K.width+a,q!=0&&q<(u[0]+a)*2){const se=K.width-((u[0]+a)*2-q);q+=K.width,K.width=se,q-=K.width}else if(q==0&&K.width>=u[0]*2+a){const se=K.width-(u[0]+a-q);q+=K.width,K.width=se,q-=K.width}return K}}).filter(Boolean),A=ne.reverse(),Y=[...ne].sort((K,Z)=>Math.abs(K.index)-Math.abs(Z.index));A.forEach((K,Z)=>{const se=A[Z+1];if(!se)return;const he=1-(Math.abs(K.relativeIndex)-Math.abs(se==null?void 0:se.relativeIndex)),ve=be(he,[0,2],[K.width+q,se.width]);q+=K.width,K.width=ve,q-=K.width});const te=ne.length/2,le=be(Math.abs(Y[0].relativeIndex),[Y[0].index==0?0:te-1,te],[0,1]),Ee=be(le,[0,1],[0,1])*-(u[0]+a);return w(Ee),Object.fromEntries(ne.map(K=>[K.index,K.width]))},N=o.useRef([]).current,[z,O]=o.useState(0);o.useEffect(()=>{d&&d(z)},[z]),o.useEffect(()=>{typeof f=="number"&&S.length>0&&f!==z&&D(f)},[f,S.length]),o.useEffect(()=>{H(z)},[z]),N.length!==S.length&&S.forEach((E,P)=>{N[P]||(N[P]=o.createRef())});const[ee,H]=o.useState(0),D=(E,P={})=>{if(!S.length)return 0;const V=N[E];if(!V||!V.current||!g.current)return 0;const _=be(E/Math.max(1,S.length-1),[0,1],[0,1]);return H(E),g.current.dispatchEvent(new CustomEvent("udx:customScroll:set",{bubbles:!0,detail:{progress:_,orientation:"horizontal",animate:P.animate!==!1}})),_},C=S.map((E,P)=>{var ne;const V=(ne=E.props)==null?void 0:ne.onClick,_=A=>{V==null||V(A)},q=()=>H(P);return o.cloneElement(E,{width:$[P],outputRange:u,ref:N[P],key:P,index:P,role:"option","aria-selected":z===P,tabIndex:z===P?0:-1,onClick:_,onFocus:q})}),T=E=>{var P;if(E.scrollTotal>0){(P=I.current)==null||P.stop();const V=R.current??0,_=E.scrollProgress??0;I.current=X.animate(V,_,{type:"spring",stiffness:260,damping:32,mass:.6,restDelta:5e-4,onUpdate:q=>{R.current=q,k({...E,scrollProgress:q})}})}};o.useEffect(()=>{const E=W();F(E)},[v]);const U=o.useRef(i);o.useEffect(()=>{U.current=i},[i]);const J=o.useRef(null);o.useEffect(()=>{var Z;const E=U.current;if(!E||!(x!=null&&x.current))return;const P=S.length;if(P<=0)return;const V=((Z=x.current)==null?void 0:Z.clientWidth)??0,_=u[1],q=R.current??(v==null?void 0:v.scrollProgress)??0,ne=(V+a)/(_+a),A=Math.max(1,Math.floor(ne)),Y=Math.max(1,Math.round(A*(2/3))),te=Math.min(Math.max(0,z),Math.max(0,P-1)),le=te>0,Ee=te<P-1,fe={total:P,selectedIndex:te,visibleApprox:ne,visibleFull:A,stepHalf:Y,canPrev:le,canNext:Ee,scrollProgress:q,viewportWidth:V,itemMaxWidth:_,gap:a},xe=J.current;let K=!xe;if(!K){for(const se in fe)if(fe[se]!==xe[se]){K=!0;break}}K&&(J.current=fe,E(fe))},[x,S.length,z,v,a,u]),o.useEffect(()=>()=>{var E;(E=I.current)==null||E.stop()},[]);const[oe,j]=o.useState(0);o.useLayoutEffect(()=>{let E=u[1];v&&E>v.scrollVisible&&(E=v.scrollVisible);const P=(E+a)*C.length/y;j(P)},[x,N,v]);const L=E=>{if(!S.length)return;const P=ee??z;switch(E.key){case"ArrowLeft":E.preventDefault(),D(Math.max(0,P-1));break;case"ArrowRight":E.preventDefault(),D(Math.min(S.length-1,P+1));break;case"Home":E.preventDefault(),D(0);break;case"End":E.preventDefault(),D(S.length-1);break;case"Enter":case" ":E.preventDefault(),D(P);break}};return o.useEffect(()=>{const E=x.current;if(!E)return;const P=V=>{const _=V.detail;_&&typeof _.index=="number"&&D(_.index)};return E.addEventListener("udx:carousel:centerIndex",P),()=>{E.removeEventListener("udx:carousel:centerIndex",P)}},[x,S.length]),l.jsx("div",{className:M.carousel,ref:x,role:"listbox","aria-orientation":"horizontal",onKeyDown:L,...h,children:l.jsx(vt,{draggable:!0,orientation:"horizontal",onScroll:T,scrollSize:oe,children:l.jsx("div",{className:M.track,ref:g,style:{gap:`${a}px`,translate:b,willChange:"translate"},children:C})})})};/*!
2
2
  * Font Awesome Free 7.2.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 2026 Fonticons, Inc.
package/dist/index.js CHANGED
@@ -2477,7 +2477,7 @@ const ns = Nt, rs = Nt, Pe = ({
2477
2477
  "size-5 box-content inline-flex fill-current",
2478
2478
  n
2479
2479
  ),
2480
- style: { color: t[0] || "inherit" },
2480
+ style: { color: t[0] || "" },
2481
2481
  dangerouslySetInnerHTML: { __html: u }
2482
2482
  }
2483
2483
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@udixio/ui-react",
3
- "version": "2.10.6",
3
+ "version": "2.10.7",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",
@@ -56,7 +56,7 @@ export const Icon: React.FC<Props> = ({
56
56
  'size-5 box-content inline-flex fill-current',
57
57
  className,
58
58
  )}
59
- style={{ color: colors[0] || 'inherit' }}
59
+ style={{ color: colors[0] || '' }}
60
60
  dangerouslySetInnerHTML={{ __html: svgContent }}
61
61
  />
62
62
  );