@udixio/ui-react 2.8.2 → 2.8.3

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,10 @@
1
+ ## 2.8.3 (2025-11-05)
2
+
3
+ ### 🧱 Updated Dependencies
4
+
5
+ - Updated @udixio/tailwind to 2.4.1
6
+ - Updated @udixio/theme to 2.1.3
7
+
1
8
  ## 2.8.2 (2025-11-04)
2
9
 
3
10
  ### 🩹 Fixes
package/dist/index.cjs CHANGED
@@ -1,5 +1,5 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react/jsx-runtime"),De=require("clsx"),Mt=require("tailwind-merge"),a=require("react"),A=require("motion/react"),kt=require("motion"),We=require("react-dom"),me=require("@udixio/theme"),Fe=require("@udixio/tailwind"),Rt=require("react-textarea-autosize"),Ve=Mt.extendTailwindMerge({override:{classGroups:{"text-color":[{text:[e=>!e.startsWith("display-")&&!e.startsWith("headline-")&&!e.startsWith("title-")&&!e.startsWith("body-")&&!e.startsWith("label-")]}]}},extend:{classGroups:{font:[{text:[e=>e.startsWith("display-")||e.startsWith("headline-")||e.startsWith("title-")||e.startsWith("body-")||e.startsWith("label-")]}]},conflictingClassGroups:{font:["font"]}}}),x=(...e)=>Ve(De.clsx(e)),Oe=(...e)=>Ve(De.clsx(e));function $t(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 ye=e=>{const t={};e.classNameList.forEach(o=>{var r;if(o)if(typeof o=="string")(t[r=e.default]??(t[r]=[])).push(o);else{const c=o(e.states);Object.entries(c).map(i=>{const[l,f]=i;(t[l]??(t[l]=[])).push(f)})}});const n=t;return Object.entries(t).map(o=>{let[r,c]=o;c=c.reverse(),r==e.default&&c.unshift("relative"),c.unshift($t(r)),n[r]=Oe(...c)}),n},K=(e,t)=>n=>ye({classNameList:[n.className,t],default:e,states:n}),_=(e,t)=>n=>a.useMemo(()=>ye({classNameList:[n.className,t],default:e,states:n}),[n]);function At(e,t,n){return a.useMemo(()=>ye({classNameList:[n==null?void 0:n.className,t],default:e,states:n}),[e,t,n])}const He=({variant:e,disableTextMargins:t,disabled:n,iconPosition:o,icon:r,isActive:c,loading:i,shape:l,onToggle:f,size:s,allowShapeTransformation:y})=>({button:x(" relative cursor-pointer group/button outline-none inline-block flex justify-center items-center ",s==="xSmall"&&"text-label-large px-3 py-1.5 gap-1",s==="small"&&"text-label-large px-4 py-2.5 gap-2",s==="medium"&&"text-title-medium px-6 py-4 gap-2",s==="large"&&"text-headline-small px-12 py-8 gap-3",s==="xLarge"&&"text-headline-large px-16 py-12 gap-4",l==="rounded"&&{"rounded-[30px]":s==="xSmall"||s=="small","rounded-[40px]":s==="medium","rounded-[70px]":s==="large"||s=="xLarge"},(l==="squared"||y&&c)&&{"rounded-[12px]":s==="xSmall"||s=="small","rounded-[16px]":s==="medium","rounded-[28px]":s==="large"||s=="xLarge"},y&&!n&&{"active:rounded-[12px]":s==="xSmall"||s=="small","active:rounded-[16px]":s==="medium","active:rounded-[28px]":s==="large"||s=="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&&f,"bg-primary text-on-primary":!n&&(c&&f||!f),"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&&[s==="xSmall"&&"-mx-3 ",s==="small"&&"-mx-4 ",s==="medium"&&"-mx-6 ",s==="large"&&"-mx-12",s==="xLarge"&&"-mx-16 "]],n&&"cursor-default"),touchTarget:x("absolute -translate-x-1/2 -translate-y-1/2 left-1/2 top-1/2 h-12 w-full"),stateLayer:x("overflow-hidden",l==="rounded"&&{"rounded-[30px]":s==="xSmall"||s=="small","rounded-[40px]":s==="medium","rounded-[70px]":s==="large"||s=="xLarge"},(l==="squared"||y&&c)&&{"rounded-[12px]":s==="xSmall"||s=="small","rounded-[16px]":s==="medium","rounded-[28px]":s==="large"||s=="xLarge"},y&&!n&&{"group-active/button:rounded-[12px]":s==="xSmall"||s=="small","group-active/button:rounded-[16px]":s==="medium","group-active/button:rounded-[28px]":s==="large"||s=="xLarge"}),label:x({invisible:i}),icon:x({invisible:i},s==="xSmall"&&"size-5",s==="small"&&"size-5",s==="medium"&&"size-6",s==="large"&&"size-8",s==="xLarge"&&"size-10")}),Bt=K("button",He),Ye=_("button",He),Ue=({variant:e,isInteractive:t})=>({card:x("group/card rounded-xl overflow-hidden z-10",e==="outlined"&&"bg-surface border border-outline-variant",e==="elevated"&&"bg-surface-container-low shadow-1",e==="filled"&&"bg-surface-container-highest")}),Pt=K("card",Ue),qe=_("card",Ue),Le=({width:e})=>({carouselItem:x("rounded-[28px] overflow-hidden flex-none",{hidden:e===void 0,"flex-1":e==null})}),Dt=K("carouselItem",Le),Xe=_("carouselItem",Le),_e=()=>({carousel:x(["w-full h-[400px]"]),track:x("flex h-full w-full")}),Wt=K("carousel",_e),Ke=_("carousel",_e),Ge=({orientation:e})=>({divider:x("border-outline-variant ",{"h-fit w-full border-t":e==="horizontal"},{"h-auto self-stretch w-fit border-l":e==="vertical"})}),Ft=K("divider",Ge),Je=_("divider",Ge),Ze=({size:e,variant:t,extended:n})=>({fab:x("flex shadow-3 hover:shadow-4 group/fab overflow-hidden outline-none items-center cursor-pointer",{"rounded-[12px]":e=="small","rounded-[16px]":e=="medium","rounded-[28px]":e=="large"},{"p-2":e=="small","p-4":e=="medium","p-[30px]":e=="large"},t==="primary"&&"bg-primary text-on-primary",t==="secondary"&&"bg-secondary text-on-secondary",t==="tertiary"&&"bg-tertiary text-on-tertiary",t==="primaryContainer"&&"bg-primary-container text-on-primary-container",t==="secondaryContainer"&&"bg-secondary-container text-on-secondary-container",t==="tertiaryContainer"&&"bg-tertiary-container text-on-tertiary-container"),icon:x({"size-6":e=="small"||e=="medium","size-9":e=="large"}),label:x("text-nowrap",{"text-title-medium":e=="small","text-title-large":e=="medium","text-headline-small":e=="large"})}),Vt=K("fab",Ze),Qe=_("fab",Ze),Te=({size:e,variant:t,open:n})=>({fabMenu:x("relative inline-flex flex-col items-end"),actions:x("flex flex-col gap-1 items-end absolute bottom-[calc(100%_+_8px)] right-0")}),Ot=K("fabMenu",Te),ze=_("fabMenu",Te),et=({variant:e,disabled:t,onToggle:n,isActive:o,size:r,width:c,shape:i,allowShapeTransformation:l})=>({iconButton:x("rounded-full relative flex transition-all duration-300","group/icon-button cursor-pointer",{"cursor-default":t},i==="rounded"&&{"rounded-[30px]":r==="xSmall"||r=="small","rounded-[40px]":r==="medium","rounded-[70px]":r==="large"||r=="xLarge"},(i==="squared"||l&&o)&&{"rounded-[12px]":r==="xSmall"||r=="small","rounded-[16px]":r==="medium","rounded-[28px]":r==="large"||r=="xLarge"},l&&!t&&{"active:rounded-[12px]":r==="xSmall"||r=="small","active:rounded-[16px]":r==="medium","active:rounded-[28px]":r==="large"||r=="xLarge"},e==="filled"&&[!t&&{"bg-surface-container":!o&&!!n,"bg-primary":o||!n},!!t&&"bg-on-surface/[0.12]"],e==="tonal"&&[!t&&{"bg-secondary-container text-on-secondary-container":!o&&!!n,"bg-secondary text-on-secondary":o||!n},!!t&&"bg-on-surface/[0.12]"],e==="outlined"&&[!t&&{"border border-outline":!o,"border border-transparent bg-inverse-surface":o},!!t&&{"border border-on-surface/[0.12]":!o,"border border-transparent bg-on-surface/[0.12]":o}]),touchTarget:x("absolute -translate-x-1/2 -translate-y-1/2 left-1/2 top-1/2 h-12 w-full"),stateLayer:x("absolute top-0 left-0 h-full w-full overflow-hidden",(i==="rounded"||i==="squared"&&n&&!t&&o&&l)&&{"rounded-[30px]":r==="xSmall"||r=="small","rounded-[40px]":r==="medium","rounded-[70px]":r==="large"||r=="xLarge"},(i==="squared"||i==="rounded"&&n&&!t&&o&&l)&&{"rounded-[12px]":r==="xSmall"||r=="small","rounded-[16px]":r==="medium","rounded-[28px]":r==="large"||r=="xLarge"},l&&!t&&{"group-active/icon-button:rounded-[12px]":r==="xSmall"||r=="small","group-active/icon-button:rounded-[16px]":r==="medium","group-active/icon-button:rounded-[28px]":r==="large"||r=="xLarge"},!t&&[e==="standard"&&{"state-on-surface-variant":!o,"state-primary":o},e==="filled"&&{"state-primary":!o&&!!n,"state-inverse-on-surface":o||!n},e==="tonal"&&{"state-on-surface-variant":!o&&!!n,"state-on-secondary-container":o||!n},e==="outlined"&&{"state-on-surface-variant":!o,"state-on-primary":o}]),icon:x(" transition-all duration-300",{"size-5 p-1.5":r==="xSmall"},{"size-6 p-2":r==="small"},{"size-6 p-4":r==="medium"},{"size-8 p-8":r==="large"},{"size-10 p-12":r==="xLarge"},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":!o,"text-primary":o},e==="filled"&&{"text-primary":!o&&!!n,"text-on-primary":o||!n},e==="outlined"&&{"text-on-surface-variant":!o,"text-inverse-on-surface":o}],!!t&&"text-on-surface/[0.38]")}),Ht=K("iconButton",et),tt=_("iconButton",et),nt=({variant:e,isVisible:t})=>({progressIndicator:x((e==="linear-determinate"||e=="linear-indeterminate")&&"flex w-full h-1"),track:x("h-full rounded-full bg-primary rounded-l-full",{"max-h-0":!t,"max-h-full":t}),activeIndicator:x({"max-h-0":!t,"max-h-full":t},(e==="linear-determinate"||e=="linear-indeterminate")&&"h-full flex-1 rounded-full bg-primary-container",(e==="circular-determinate"||e=="circular-indeterminate")&&["stroke-primary fill-transparent ",{"stroke-[4px]":t,"stroke-[0px]":!t}]),stop:x("absolute top-1/2 -translate-y-1/2 right-0 bg-primary rounded-full size-1",{"max-h-0":!t,"max-h-full":t})}),Yt=K("progressIndicator",nt),rt=_("progressIndicator",nt),Ne=({variant:e,position:t})=>({sideSheet:x("bg-surface flex justify-between max-w-xs z-10",{"flex-row-reverse":t=="right","h-full":e=="standard"},e=="modal"&&["rounded-2xl fixed top-0 m-[1rem] h-[calc(100dvh-2rem)]",{"right-0":t=="right","left-0":t=="left"}]),container:x("w-full overflow-hidden",{}),content:x("w-fit "),header:x("p-4 flex items-center gap-2"),title:x("text-on-surface-variant text-title-large"),closeButton:x("ml-auto"),divider:x({hidden:e=="modal"}),overlay:x("bg-[black]/[0.32] fixed top-0 left-0 w-screen h-screen")}),st=K("sideSheet",Ne),Ut=_("sideSheet",Ne),je=({isChanging:e})=>({slider:x(["relative w-full h-11 flex items-center rounded gap-x-1.5 cursor-pointer min-w-32"]),activeTrack:x(["h-4 relative transition-all duration-100 bg-primary overflow-hidden rounded-l-full "]),inactiveTrack:x(["h-4 relative transition-all duration-100 bg-primary-container rounded-r-full overflow-hidden"]),handle:x(["transform relative transition-all duration-100 bg-primary h-full rounded-full ",{"w-0.5":e,"w-1":!e}]),valueIndicator:x(["absolute select-none bg-inverse-surface text-inverse-on-surface py-3 px-4 text-label-large rounded-full bottom-[calc(100%+4px)] transform left-1/2 -translate-x-1/2"]),dot:x(["h-1 w-1 absolute transform -translate-y-1/2 -translate-x-1/2 top-1/2 rounded-full"])}),qt=K("slider",je),ot=_("slider",je),at=()=>({snackbar:x(" rounded bg-inverse-surface "),container:x("pl-4 pr-2 max-w-full py-1 flex items-center flex-wrap"),supportingText:x("text-body-medium text-inverse-on-surface "),icon:x(" ml-auto mr-0 text-inverse-on-surface block dark")}),Xt=K("snackbar",at),lt=_("snackbar",at),ct=({isSelected:e,disabled:t,inactiveIcon:n})=>({switch:x("group/switch w-[52px] h-[32px] outline-none rounded-full border-2 flex items-center",{"bg-on-surface/[0.12] border-transparent":t},!t&&["cursor-pointer ",{"bg-primary border-primary":e},{"bg-surface-container border-outline":!e}]),handleContainer:x("flex items-center justify-center absolute",{"left-[14px]":!e},{"right-[14px]":e}),handle:x("transition-all duration-100 z-10 rounded-full flex items-center justify-center",{"w-[16px] h-[16px]":!e&&!n},{"w-[24px] h-[24px]":!(!e&&!n)},!t&&["cursor-pointer group-active/switch:h-[28px] group-active/switch:w-[28px]",{"bg-on-primary group-hover/switch:bg-primary-container":e},{"bg-outline group-hover/switch:bg-on-surface-variant":!e}],{"bg-surface":t}),handleStateLayer:x("w-[40px] h-[40px] -z-10 rounded-full absolute",{"group-state-primary":!t}),icon:x("w-[16px] h-[16px]",!t&&[{"text-on-primary-container":e},{"text-on-primary":!e}],{"text-on-surface/[0.38]":t})}),_t=K("switch",ct),it=_("switch",ct),ut=({isSelected:e,icon:t,label:n,variant:o})=>({tab:x("flex-1 group/tab outline-none flex px-4 justify-center items-center cursor-pointer",{"z-10":e},!!(t&&n)&&o==="primary"&&"h-16",!(t&&n&&o==="primary")&&"h-12"),stateLayer:x("absolute w-full h-full overflow-hidden left-1/2 top-1/2 transform -translate-y-1/2 -translate-x-1/2",o==="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},o==="secondary"&&"group-hover/tab:hover-state-on-surface group-focus-visible/tab:focus-state-on-surface"),content:x("flex gap-0.5 h-full justify-center",{relative:o=="primary"},{"":!!(n&&!t)},o==="primary"&&"flex-col items-center",o==="secondary"&&{"flex-col items-center":!(n&&t),"flex-row items-center gap-2":!!(n&&t)}),icon:x("h-6 w-6 p-0.5 !box-border",o==="primary"&&{"text-on-surface-variant":!e,"text-primary":e},o==="secondary"&&{"text-on-surface-variant":!e,"text-on-surface":e}),label:x("text-title-small text-nowrap",o==="primary"&&{"text-on-surface-variant":!e,"text-primary":e},o==="secondary"&&{"text-on-surface-variant":!e,"text-on-surface":e}),underline:x("bg-primary absolute w-full left-0 bottom-0",o==="primary"&&"h-[3px] rounded-t",o==="secondary"&&"h-0.5")}),Kt=K("tab",ut),dt=_("tab",ut),ft=({scrollable:e})=>({tabs:x("border-b border-surface-container-highest bg-surface","flex relative ",{"overflow-x-auto":e})}),Gt=K("tabs",ft),mt=_("tabs",ft),ht=({disabled:e,leadingIcon:t,trailingIcon:n,variant:o,errorText:r,isFocused:c,value:i,suffix:l,textLine:f})=>({textField:x({"opacity-[.38]":e}),content:x("group/text-field transition-border duration-200 relative flex items-center ",{"h-14":f=="singleLine"},{"border-on-surface-variant":!(r!=null&&r.length)&&!c&&o=="filled","border-outline":!(r!=null&&r.length)&&!c&&o=="outlined","border-primary":!(r!=null&&r.length)&&c,"border-error":!!(r!=null&&r.length)},{"bg-on-surface/[0.04]":e},o=="filled"&&["rounded-t overflow-hidden border-b",{"bg-surface-container-highest":!e}],o=="outlined"&&["border rounded box-border",{"border-[3px]":c}]),stateLayer:x("absolute -z-10 w-full h-full top-0 left-0",{hidden:o=="outlined"},{"group-state-on-surface":!e,"focus-state-on-surface":c}),label:x("inline-flex outline-none whitespace-nowrap",{"text-on-surface-variant":!e&&!(r!=null&&r.length)},{"text-on-surface":e},{"text-error":!!(r!=null&&r.length)},{"text-primary":!(r!=null&&r.length)&&c}),input:x("w-full resize-none px-4 text-body-large bg-[inherit] outline-none autofill:transition-colors autofill:duration-[5000000ms]",{" text-on-surface placeholder:text-on-surface-variant":!e,"placeholder:text-on-surface text-on-surface":e},{"pr-0":!!l},o=="filled"&&" pb-2 pt-6",o=="outlined"&&"py-4 relative z-10"),activeIndicator:x("absolute w-0 inset-x-0 border-rounded mx-auto bottom-0",o=="filled"&&["h-[2px] transition-all duration-300",{"bg-primary":!(r!=null&&r.length)},{"bg-error":!!(r!=null&&r.length)},{"!w-full":c}]),supportingText:x(" 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:x(["h-12 ml-3 flex items-center justify-center",{"cursor-text":!a.isValidElement(t)}]),trailingIcon:x("h-12 w-12 flex items-center justify-center",{"cursor-text":!a.isValidElement(n)}),suffix:x("text-on-surface-variant pl-0 pr-4",o=="filled"&&" pb-2 pt-6",o=="outlined"&&"py-4 relative z-10")}),Jt=K("textField",ht),pt=_("textField",ht),yt=({position:e,variant:t})=>({toolTip:x(" pointer-events-auto w-max z-10 absolute m-1 w-max-content max-w-[312px]",{"bottom-full left-1/2 -translate-x-1/2":e=="top","top-full left-1/2 -translate-x-1/2":e=="bottom","right-full top-1/2 -translate-y-1/2":e=="left","left-full top-1/2 -translate-y-1/2":e=="right","bottom-full right-full":e=="top-left","bottom-full left-full":e=="top-right","top-full right-full":e=="bottom-left","top-full left-full":e=="bottom-right"}),container:x("pb-2",t=="rich"&&"bg-surface-container rounded-2xl text-on-surface-container px-4 pt-3 shadow-2",t=="plain"&&"bg-inverse-surface rounded text-inverse-on-surface px-2 py-1"),actions:x("flex gap-10 px-1 mt-2",t=="plain"&&"hidden"),subHead:x("text-title-small mb-1",t=="plain"&&"hidden"),supportingText:x("")}),Zt=K("toolTip",yt),xt=_("toolTip",yt),re=({icon:e,colors:t=[],className:n})=>{if(typeof e=="string"){let s=e;return t[0]&&(s=s.replace(/<svg([^>]*)>/,`<svg$1 fill="${t[0]}" color="${t[0]}">`),s=s.replace(/<path([^>]*?)>/g,'<path$1 fill="currentColor">')),u.jsx("div",{className:x("size-5 box-content inline-flex fill-current",n),style:{color:t[0]||"inherit"},dangerouslySetInnerHTML:{__html:s}})}if(e&&typeof e=="object"&&"src"in e){const s=e;return u.jsx("img",{src:s.src,width:s.width,height:s.height,className:x("size-5 box-content",n),style:{filter:t[0]?"brightness(0) saturate(100%) invert(1)":void 0},alt:"","aria-hidden":"true"})}const o=e;if(!(o!=null&&o.prefix))throw new Error(`Invalid icon type: ${typeof e}`);const{icon:r}=o,[c,i,,,l]=r||[],f=s=>{switch(s.length){case 2:return{"--fa-primary-color":s[0]||"inherit","--fa-secondary-color":s[1]||"inherit"};case 1:return{color:s[0]};default:return{}}};return u.jsx("svg",{className:x("size-5 box-content",n),style:{...f(t)},xmlns:"http://www.w3.org/2000/svg",viewBox:`0 0 ${c} ${i}`,role:"img","aria-hidden":"true",children:typeof l=="string"?u.jsx("path",{className:"fill-current",d:l}):l.map((s,y)=>u.jsx("path",{d:s},y))})},wt=({variant:e="linear-determinate",value:t=0,transitionDuration:n=1e3,className:o,...r})=>{const[c,i]=a.useState(t),[l]=a.useState(1.5);a.useEffect(()=>{t>100&&(t=100),t<0&&(t=0),i(t)},[t]);const[f,s]=a.useState(!0),y=()=>f?l:l*.5;a.useEffect(()=>{if((e==="circular-indeterminate"||e==="linear-indeterminate")&&c!==100){const m=setInterval(()=>{i(f?10:90),s(!f)},y()*1e3);return()=>clearInterval(m)}},[e,f,c]);const[v,h]=a.useState(!1);a.useEffect(()=>{if(c>=100){const m=setTimeout(()=>{h(!1)},n);return()=>{clearTimeout(m)}}else h(!0)},[c,n]);const d=rt({className:o,variant:e,value:t,transitionDuration:n,isVisible:v});return u.jsxs(u.Fragment,{children:[(e==="linear-determinate"||e=="linear-indeterminate")&&u.jsxs("div",{className:d.progressIndicator,...r,children:[u.jsx("div",{style:{width:`${c}%`,transition:`width ${n}ms ease-in-out ${c==100?", max-height 200ms 0.5s ease-in-out":""}`},className:d.track}),u.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:d.activeIndicator}),u.jsx("div",{style:{width:"4 px",transition:`width ${n}ms ease-in-out, max-height 200ms 0.5s ease-in-out`},className:d.stop})]}),(e==="circular-determinate"||e=="circular-indeterminate")&&u.jsx(A.motion.svg,{width:"48",height:"48",viewBox:"0 0 48 48",initial:{rotate:-90},animate:{rotate:270},transition:{repeat:1/0,duration:y(),ease:"linear"},className:d.progressIndicator,...r,children:u.jsx(A.motion.circle,{cx:"50%",cy:"50%",r:v?"calc(50% - 2px)":"50%",style:{strokeLinecap:"round"},initial:"hidden",animate:"visible",className:d.activeIndicator,variants:{hidden:{pathLength:f?10/100:90/100},visible:{pathLength:f?90/100:10/100}},transition:{pathLength:{type:"tween",ease:"linear",duration:y(),bounce:0}}})},f+"")]})},vt=({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}}},[o,r]=a.useState(!0),[c,i]=a.useState(!1),[l,f]=a.useState({x:50,y:50});a.useEffect(()=>{c&&(r(!0),r(!1))},[c]),a.useEffect(()=>{const m=t==null?void 0:t.current;if(m)return m.addEventListener("mousedown",s),m.addEventListener("mouseup",v),m.addEventListener("mouseleave",y),()=>{m.removeEventListener("mousedown",s),m.removeEventListener("mouseup",v),m.removeEventListener("mouseleave",y)}},[t]);const s=m=>{const p=t==null?void 0:t.current,w=p.getBoundingClientRect();i(!0),f({x:(m.clientX-w.left)/p.clientWidth*100,y:(m.clientY-w.top)/p.clientHeight*100})},y=m=>{i(!1)},v=m=>{i(!1)},h=`color-mix(in srgb, var(--state-color,_var(--color-${e})) 10%, transparent)`,d={position:"absolute",inset:0,width:"100%",height:"100%","--x":l.x+"%","--y":l.y+"%","--r":"0%",background:`radial-gradient(ellipse at var(--x) var(--y), ${h} var(--r), transparent calc(var(--r) * 2))`,pointerEvents:"none"};return u.jsx(A.AnimatePresence,{mode:"wait",children:(c||!c&&!o)&&u.jsx(A.motion.div,{style:d,variants:n,initial:"initial",animate:"animate",exit:"exit",onAnimationComplete:()=>r(!0)})})},gt=K("customScroll",({orientation:e,draggable:t,isDragging:n})=>({customScroll:x("flex h-full w-full",t&&["[&::-webkit-scrollbar-track]:rounded-full","[&::-webkit-scrollbar-track]:bg-transparent","[&::-webkit-scrollbar-thumb]:rounded-full",{"[&::-webkit-scrollbar-thumb]:bg-outline":n,"[&::-webkit-scrollbar-thumb]:bg-transparent":!n},{"[&::-webkit-scrollbar]:h-2":e==="horizontal"},{"[&::-webkit-scrollbar]:w-2":e==="vertical"}],{"overflow-y-scroll flex-col":e==="vertical","overflow-x-scroll flex-row":e==="horizontal","cursor-grab":t&&!n,"cursor-grabbing":t&&n}),track:x("overflow-hidden flex-none sticky",{"left-0 h-full":e==="horizontal","top-0 w-full":e==="vertical"})}));function Qt(e,t){let n=0,o=null,r=null;const c=(i,l)=>{n=Date.now(),t(i,l)};return(i,l)=>{const f=Date.now(),s=e-(f-n);s<=0?(o&&(clearTimeout(o),o=null),c(i,l)):(r={v:i,o:l},o||(o=setTimeout(()=>{o=null;const y=r;r=null,y&&c(y.v,y.o)},s)))}}const bt=({children:e,orientation:t="vertical",scrollSize:n,onScroll:o,className:r,draggable:c=!1,throttleDuration:i=75,scroll:l,setScroll:f})=>{var te,oe;const s=a.useRef(null),y=a.useRef(null),[v,h]=a.useState({width:null,height:null});a.useEffect(()=>{if(!s.current)return;const M=new ResizeObserver(L=>{for(const $ of L)$.target===s.current&&h({width:$.contentRect.width,height:$.contentRect.height})});return M.observe(s.current),()=>{M.disconnect()}},[s]);const d=a.useRef(null),m=a.useRef(null),p=()=>{const M=y.current;return M?{width:n??M.scrollWidth,height:n??M.scrollHeight}:null},w=()=>{const M=s.current;return M?{width:M.clientWidth,height:M.clientHeight}:null},{scrollYProgress:S,scrollXProgress:b}=A.useScroll({container:s}),I=a.useRef(null);I.current||(I.current=Qt(i,(M,L)=>{!m.current||!d.current||!s.current||(L===(t==="horizontal"?"x":"y")&&(f==null||f(M)),o&&(t==="horizontal"&&L==="x"&&o({scrollProgress:M,scroll:M*(d.current.width-s.current.clientWidth),scrollTotal:d.current.width-s.current.clientWidth,scrollVisible:m.current.width}),t==="vertical"&&L==="y"&&o({scrollProgress:M,scroll:M*(d.current.height-s.current.clientHeight),scrollTotal:d.current.height-s.current.clientHeight,scrollVisible:m.current.height})))}));const N=(M,L)=>{I.current&&I.current(M,L)};a.useEffect(()=>{v.width&&N(b.get(),"x"),v.height&&N(S.get(),"y")},[v]),a.useEffect(()=>{const M=s.current,L=y.current;if(!M||!L||typeof l!="number")return;const $=(W,Y,H)=>Math.min(H,Math.max(Y,W));if(t==="horizontal"){const W=Math.max(0,(n??L.scrollWidth)-M.clientWidth);M.scrollLeft=$(l*W,0,W)}else{const W=Math.max(0,(n??L.scrollHeight)-M.clientHeight);M.scrollTop=$(l*W,0,W)}},[l,t,n]),A.useMotionValueEvent(b,"change",M=>{N(M,"x")}),A.useMotionValueEvent(S,"change",M=>{N(M,"y")});const[B,E]=a.useState(!1);a.useLayoutEffect(()=>{B||!m.current||!d.current||!o||(o({scrollProgress:0,scroll:0,scrollTotal:t=="vertical"?d.current.height:d.current.width,scrollVisible:t=="vertical"?m.current.height:m.current.width}),E(!0))},[m,d,o]),d.current=p(),m.current=w();const[V,D]=a.useState(!1),k=gt({isDragging:V,children:e,className:r,onScroll:o,orientation:t,scrollSize:n,draggable:c,throttleDuration:i}),[g,j]=a.useState(0),[F,X]=a.useState(0),T=M=>{if(!c)return;const L=s.current;if(!L||g==null)return;const W=(M.pageX-L.offsetLeft-g)*1.5;L.scrollLeft=F-W},U=M=>{const L=s.current;L&&(D(!0),j(M.pageX-L.offsetLeft),X(L.scrollLeft))},Z=M=>{V&&(M.preventDefault(),T(M))},R=()=>{D(!1)},C=()=>{D(!1)},O=M=>{M.preventDefault()},q=a.useRef(null);return a.useEffect(()=>()=>{q.current&&clearTimeout(q.current)},[]),a.useEffect(()=>{const M=s.current;if(!M)return;const L=$=>{var z,ne,ae,se;const W=$.detail,Y=s.current;if(!Y||!W)return;const H=W.orientation??t;if(typeof W.progress=="number")if(H==="horizontal"){const ee=Math.max(0,(((z=d.current)==null?void 0:z.width)??0)-Y.clientWidth);Y.scrollLeft=Math.min(ee,Math.max(0,W.progress*ee))}else{const ee=Math.max(0,(((ne=d.current)==null?void 0:ne.height)??0)-Y.clientHeight);Y.scrollTop=Math.min(ee,Math.max(0,W.progress*ee))}else if(typeof W.scroll=="number")if(H==="horizontal"){const ee=Math.max(0,(((ae=d.current)==null?void 0:ae.width)??0)-Y.clientWidth);Y.scrollLeft=Math.min(ee,Math.max(0,W.scroll))}else{const ee=Math.max(0,(((se=d.current)==null?void 0:se.height)??0)-Y.clientHeight);Y.scrollTop=Math.min(ee,Math.max(0,W.scroll))}};return M.addEventListener("udx:customScroll:set",L),()=>{M.removeEventListener("udx:customScroll:set",L)}},[t]),u.jsxs("div",{className:k.customScroll,ref:s,onMouseDown:U,onMouseMove:Z,onMouseUp:R,onMouseLeave:C,onDragStart:O,onScroll:M=>{V||(j(null),D(!0),q.current&&clearTimeout(q.current),q.current=setTimeout(()=>{D(!1)},1e3))},children:[u.jsx("div",{ref:y,style:t==="vertical"?{height:((te=m==null?void 0:m.current)==null?void 0:te.height)??"100%"}:{width:((oe=m==null?void 0:m.current)==null?void 0:oe.width)??"100%"},className:k.track,children:e}),m.current&&d.current&&u.jsxs(u.Fragment,{children:[t==="vertical"&&d.current.height>m.current.height&&u.jsx(A.motion.div,{className:"flex-none",style:{height:d.current.height-m.current.height}}),t==="horizontal"&&d.current.width>m.current.width&&u.jsx(A.motion.div,{className:"flex-none",style:{width:d.current.width-m.current.width}})]})]})},Tt=({onScroll:e,el:t,touch:n=!0})=>{const o=a.useRef(null),r=a.useRef(0),c=a.useRef(0);a.useEffect(()=>{if(!t)return;r.current=t.scrollTop,c.current=t.scrollLeft;const i=d=>{e==null||e(d)},l=d=>{let m=d;for(;m&&m!==document.body&&m!==document.documentElement;){const p=window.getComputedStyle(m),w=p.overflowY||p.overflow;if((w==="auto"||w==="scroll")&&m.scrollHeight>m.clientHeight)return m;m=m.parentElement}return null},f=d=>{const m=d.target,p=l(m);if(p&&p!==t){const w=p.scrollTop<p.scrollHeight-p.clientHeight,S=p.scrollTop>0;if(d.deltaY>0&&w||d.deltaY<0&&S)return}d.preventDefault(),i({type:"intent",source:"wheel",deltaX:d.deltaX,deltaY:d.deltaY,originalEvent:d})},s=d=>{if(!n)return;const m=d.touches[0];m&&(o.current={x:m.clientX,y:m.clientY})},y=d=>{if(!n)return;const m=d.touches[0];if(!m||!o.current)return;const p=o.current.x-m.clientX,w=o.current.y-m.clientY,S=d.target,b=l(S);if(b&&b!==t){const I=b.scrollTop<b.scrollHeight-b.clientHeight,N=b.scrollTop>0;if(w>0&&I||w<0&&N){o.current={x:m.clientX,y:m.clientY};return}}d.preventDefault(),o.current={x:m.clientX,y:m.clientY},i({type:"intent",source:"touch",deltaX:p,deltaY:w,originalEvent:d})},v=()=>{n&&(o.current=null)},h=d=>{const p=t.clientHeight*.9;let w=0,S=0;switch(d.key){case"ArrowDown":S=40;break;case"ArrowUp":S=-40;break;case"ArrowRight":w=40;break;case"ArrowLeft":w=-40;break;case"PageDown":S=p;break;case"PageUp":S=-p;break;case"Home":S=Number.NEGATIVE_INFINITY;break;case"End":S=Number.POSITIVE_INFINITY;break;case" ":S=d.shiftKey?-p:p;break;default:return}d.preventDefault(),i({type:"intent",source:"keyboard",deltaX:w,deltaY:S,originalEvent:d})};return t.addEventListener("wheel",f,{passive:!1}),t.addEventListener("touchstart",s,{passive:!0}),t.addEventListener("touchmove",y,{passive:!1}),t.addEventListener("touchend",v,{passive:!0}),t.addEventListener("keydown",h),()=>{t.removeEventListener("wheel",f),t.removeEventListener("touchstart",s),t.removeEventListener("touchmove",y),t.removeEventListener("touchend",v),t.removeEventListener("keydown",h)}},[e])},zt=({transition:e,orientation:t="vertical",throttleDuration:n=25})=>{const[o,r]=a.useState(0),[c,i]=a.useState(),l=a.useRef(!1),f=a.useRef(),s=a.useRef(0);a.useEffect(()=>{i(document);const h=document.documentElement.scrollTop;r(h),s.current=h},[]),a.useEffect(()=>{const h=()=>{l.current||r(document.documentElement.scrollTop)};return c==null||c.addEventListener("scroll",h),()=>{f.current&&clearTimeout(f.current),c==null||c.removeEventListener("scroll",h)}},[c]);const y=a.useRef(),v=a.useRef(null);return a.useEffect(()=>{const h=o;if(v.current&&(v.current.stop(),v.current=null),!l.current){y.current=h;return}return v.current=kt.animate(y.current??h,h,{duration:((e==null?void 0:e.duration)??500)/1e3,ease:(e==null?void 0:e.ease)??"easeOut",onUpdate:d=>{f.current&&clearTimeout(f.current),y.current=d;const m=document.documentElement,p=Math.round(d*1e3)/1e3,w=s.current;Math.abs(p-w)<.1||(s.current=p,l.current&&m.scrollTo({top:p}))},onComplete:()=>{f.current=setTimeout(()=>{l.current=!1},300),v.current=null}}),()=>{v.current&&(v.current.stop(),v.current=null)}},[o]),c?u.jsx(Tt,{touch:!1,el:c,onScroll:h=>{if("deltaY"in h&&h.deltaY!==0&&c&&o!==null){let d=o+h.deltaY;const m=c.querySelector("html");m&&(d=Math.min(d,m.scrollHeight-m.clientHeight)),d=Math.max(d,0),r(d),l.current=!0}}}):null},ie=({style:e,colorName:t,stateClassName:n="state-ripple-group",className:o})=>{const r=a.useRef(null),c=a.useRef(null),[i,l]=a.useState(!1),f=St({isClient:i,stateClassName:n,className:o,colorName:t});return a.useEffect(()=>{if(r.current&&n!=="state-layer"){const s=n.includes("[")?n.split("[")[1].split("]")[0]:"group",y=r.current.closest(`.${s}:not(.${s} .${s})`);c.current=y}l(!0)},[]),u.jsx("div",{ref:r,className:f.stateLayer,style:{"--state-color":`var(--default-color, var(--color-${t}))`,...e},children:i&&u.jsx(vt,{triggerRef:c})})},en=({isClient:e,stateClassName:t})=>({stateLayer:x([t,"w-full top-0 left-0 h-full absolute pointer-events-none overflow-hidden"])}),St=_("stateLayer",en),Et=({targetRef:e,children:t})=>{const[n,o]=a.useState(null),r=a.useRef(null),c=()=>{const i=e.current;if(!i)return;const l=i.getBoundingClientRect();o({position:"fixed",top:l.top,left:l.left,width:l.width,height:l.height,pointerEvents:"none",zIndex:999})};return a.useEffect(()=>{const i=e.current;if(i)return c(),window.addEventListener("scroll",c,!0),window.addEventListener("resize",c),r.current=new ResizeObserver(c),r.current.observe(i),()=>{var l;window.removeEventListener("scroll",c,!0),window.removeEventListener("resize",c),(l=r.current)==null||l.disconnect()}},[e]),n?We.createPortal(u.jsx("div",{style:n,children:t}),document.body):null};function tn(e){return/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(e)}const nn=({config:e,throttleDelay:t=100,onLoad:n,loadTheme:o=!1})=>{const[r,c]=a.useState(null);a.useEffect(()=>{(async()=>{const h=await me.loader(e,o);c(h)})()},[]);const[i,l]=a.useState(null),f=a.useRef(null),s=a.useRef(0),y=a.useRef(null);a.useEffect(()=>{if(!r)return;const h={...e,sourceColor:e.sourceColor},d=Date.now(),m=d-s.current,p=async w=>{await v(w)};if(s.current===0||m>=t)f.current&&(clearTimeout(f.current),f.current=null),y.current=null,s.current=d,p(h);else if(y.current=h,!f.current){const w=Math.max(0,t-m);f.current=setTimeout(async()=>{f.current=null;const S=y.current;y.current=null,S&&(s.current=Date.now(),await p(S))},w)}return()=>{}},[e,t,r]);const v=async h=>{if(typeof h.sourceColor=="string"&&!tn(h.sourceColor))throw new Error("Invalid hex color");if(!r)return;r.context.update(h),await r.load();const d=r==null?void 0:r.plugins.getPlugin(Fe.TailwindPlugin).getInstance().outputCss;l(d),n==null||n(r)};return a.useEffect(()=>()=>{f.current&&(clearTimeout(f.current),f.current=null)},[]),i?u.jsx("style",{dangerouslySetInnerHTML:{__html:i}}):null};function rn(){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 sn(){return typeof window>"u"||!("matchMedia"in window)?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches}function Ie(e){if(!(e instanceof HTMLElement))return!1;const t=e.classList;return Array.from(t).some(n=>n.startsWith("anim-")&&n.includes("scroll"))}function ke(e){if(!(e instanceof HTMLElement))return!1;const t=e.classList;return Array.from(t).some(n=>n.startsWith("anim-"))}function be(e,t){if(!Ie(e))return;if(e.hasAttribute(`data-${t}-scroll`)){const i=(e.getAttribute(`data-${t}-scroll`)||"").trim().toLowerCase(),l=i==="x"||i==="inline"?"inline":i==="y"||i==="block"?"block":"auto";e.classList.contains(`${t}-timeline`)||e.classList.contains(`${t}-timeline-inline`)||e.classList.contains(`${t}-timeline-block`)||e.classList.contains(`${t}-timeline-x`)||e.classList.contains(`${t}-timeline-y`)||(l==="inline"?e.classList.add(`${t}-timeline-inline`):l==="block"?e.classList.add(`${t}-timeline-block`):e.classList.add(`${t}-scroll`))}const n=e.getAttribute(`data-${t}-start`);n&&e.style.setProperty(`--${t}-range-start`,n);const o=e.getAttribute(`data-${t}-end`);o&&e.style.setProperty(`--${t}-range-end`,o);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 Se(e=document,t){return Array.from(e.querySelectorAll(`[class*="${t}-"][class*="-scroll"]`)).filter(o=>Ie(o))}function on(e=document,t){const n=Array.from(e.querySelectorAll(`[class*="${t}-"]`)),o=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(f=>f.startsWith(`${t}-`)&&!f.includes("scroll")&&!o.has(f))?!0:!Ie(r)})}function an(e,t){return Array.from(e).some(n=>n.startsWith(t)&&n.includes("-out"))}function Re(e,t,n){e.setAttribute(`data-${t}-run`,""),e.setAttribute(`data-${t}-${n}-run`,"")}function $e(e,t,n){const o=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=o}const ln=[0,.2],Ae=new WeakSet;function Be(e,t){if(Ae.has(e))return;Ae.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`,"")},o=r=>{r.target===e&&e.removeAttribute(`data-${t}-animating`)};e.addEventListener("animationstart",n),e.addEventListener("animationend",o),e.addEventListener("animationcancel",o)}function Ce(e={}){const{prefix:t="anim",once:n=!0}=e;if(sn())return()=>{};const o=rn(),r=new WeakSet;let c=typeof window<"u"&&(window.pageYOffset||window.scrollY)||0,i=!0;const l=()=>{const d=window.pageYOffset||window.scrollY||0;i=d>=c,c=d};typeof window<"u"&&window.addEventListener("scroll",l,{passive:!0});const f=new IntersectionObserver(d=>{for(const m of d){const p=m.target;if(!ke(p)||p.hasAttribute(`data-${t}-animating`))continue;const w=an(p.classList,t);m.isIntersecting?(w&&$e(p,t,"out"),Re(p,t,"in"),n&&f.unobserve(p)):n||(i||$e(p,t,"in"),w&&Re(p,t,"out"))}},{threshold:ln}),s=d=>{const m=on(d||document,t);for(const p of m)r.has(p)||(r.add(p),f.observe(p),Be(p,t))};s();let y,v=null,h=null;if(o)(()=>{h==null&&(h=requestAnimationFrame(()=>{h=null;const m=Se(void 0,t);for(const p of m)be(p,t)}))})(),v=new MutationObserver(m=>{for(const p of m)if(p.type==="attributes"){const w=p.target;w instanceof HTMLElement&&(be(w,t),ke(w)&&(r.has(w)||(r.add(w),f.observe(w),Be(w,t))))}else if(p.type==="childList"&&p.addedNodes&&p.addedNodes.length){for(const w of Array.from(p.addedNodes))if(w instanceof HTMLElement){const S=Se(w,t);for(const b of S)be(b,t);s(w)}}}),v.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`]}),y=()=>{h!=null&&cancelAnimationFrame(h),v&&v.disconnect()};else{let d;Se(void 0,t).length>0&&Promise.resolve().then(()=>require("./scrollDriven-DWAu7CR0.cjs")).then(p=>{d=p.initScrollViewFallback({once:n})}),y=()=>{typeof d=="function"&&d()}}return()=>{y&&y(),typeof window<"u"&&window.removeEventListener("scroll",l),f.disconnect()}}const cn=Ce,un=Ce;function dn(e){const t={primary:"filled",secondary:"tonal"};return e&&e in t?t[e]:e||"filled"}const he=({variant:e="filled",disabled:t=!1,icon:n,href:o,label:r,disableTextMargins:c,className:i,iconPosition:l="left",loading:f=!1,shape:s="rounded",onClick:y,onToggle:v,activated:h,ref:d,size:m="medium",allowShapeTransformation:p=!0,transition:w,children:S,...b})=>{if(S&&(r=S),!r)throw new Error("Button component requires either a label prop or children content");e=dn(e);const I=o?"a":"button",N=a.useRef(null),B=d||N,[E,V]=a.useState(h);a.useEffect(()=>{V(h)},[h]),w={duration:.3,...w};let D;v?v&&(D=j=>{t&&j.preventDefault();const F=!E;V(F),v(F)}):D=j=>{t&&j.preventDefault(),y&&y(j)};const k=Ye({allowShapeTransformation:p,size:m,disableTextMargins:c,shape:s,href:o,disabled:t,icon:n,iconPosition:l,loading:f,variant:e,transition:w,className:i,isActive:E??!1,onToggle:v,activated:E,label:r,children:r}),g=n?u.jsx(re,{icon:n,className:k.icon}):u.jsx(u.Fragment,{});return u.jsxs(I,{ref:B,href:o,className:k.button,...b,onClick:D,disabled:t,"aria-pressed":v?E:void 0,style:{transition:w.duration+"s"},children:[u.jsx("div",{className:k.touchTarget}),u.jsx(ie,{style:{transition:w.duration+"s"},className:k.stateLayer,colorName:x(e==="filled"&&{"on-surface-variant":!E&&!!v,"on-primary":E||!v},e==="elevated"&&{"on-primary":E&&!!v,primary:!E||!v},e==="tonal"&&{"on-secondary":E&&!!v,"on-secondary-container":!E||!v},e==="outlined"&&{"inverse-on-surface":E&&!!v,"on-surface-variant":!E||!v},e==="text"&&"primary"),stateClassName:"state-ripple-group-[button]"}),l==="left"&&g,f&&u.jsx("div",{className:"!absolute left-1/2 -translate-x-1/2 top-1/2 -translate-y-1/2",children:u.jsx(wt,{className:()=>({progressIndicator:"h-6 w-6",activeIndicator:x({"!stroke-primary":e==="elevated"&&!t,"!stroke-on-surface/[38%]":e==="elevated"&&t},{"!stroke-on-primary":e==="filled"&&!t,"!stroke-on-surface/[38%]":e==="filled"&&t},{"!stroke-on-secondary-container":e==="tonal"&&!t,"!stroke-on-surface/[38%]":e==="tonal"&&t},{"!stroke-primary":e==="outlined"&&!t,"!stroke-on-surface/[38%]":e==="outlined"&&t},{"!stroke-primary":e==="text"&&!t,"!stroke-on-surface/[38%]":e==="text"&&t})}),variant:"circular-indeterminate"})}),u.jsx("span",{className:k.label,children:r}),l==="right"&&g]})},fn=({variant:e="outlined",className:t,children:n,isInteractive:o=!1,ref:r,...c})=>{const i=qe({className:t,isInteractive:o,variant:e,children:n}),l=a.useRef(null),f=r||l;return u.jsxs("div",{...c,ref:f,className:i.card,children:[o&&u.jsx(ie,{className:i.stateLayer,colorName:"on-surface",stateClassName:"state-ripple-group-[card]"}),n]})},ce=(e,t,n=[0,1])=>{const[o,r]=t,[c,i]=n,f=(Math.max(o,Math.min(e,r))-o)/(r-o);return c+f*(i-c)},Lt=({className:e,children:t,width:n,index:o=0,outputRange:r,ref:c,...i})=>{const l=a.useRef(null),f=c||l,s=Xe({className:e,index:o,width:n,children:t,outputRange:r});return u.jsx("div",{ref:f,style:{width:n+"px",maxWidth:r[1]+"px",minWidth:r[0]+"px",willChange:"width"},transition:{duration:.5,ease:"linear"},className:s.carouselItem,...i,children:t})},mn=({variant:e="hero",className:t,children:n,ref:o,marginPourcent:r=0,inputRange:c=[.21,.65],outputRange:i=[42,300],gap:l=8,onChange:f,onMetricsChange:s,index:y,scrollSensitivity:v=1.25,...h})=>{const d=a.useRef(null),m=o||d,[p,w]=a.useState(0),S=Ke({index:y,className:t,children:n,variant:e,inputRange:c,outputRange:i,marginPourcent:r,onChange:f,gap:l,scrollSensitivity:v,onMetricsChange:s}),b=a.Children.toArray(n).filter(L=>a.isValidElement(L)&&L.type===Lt),I=a.useRef(null),[N,B]=a.useState({}),[E,V]=a.useState(null),D=a.useRef(0),k=a.useRef(null),g=()=>{var le,ue;if(!I.current||!m.current||(E==null?void 0:E.scrollProgress)===void 0)return[];const L=(E==null?void 0:E.scrollVisible)??((le=m.current)==null?void 0:le.clientWidth)??0;function $(P,G){return P.map((Q,de)=>{const ge=(Q-G)/Math.abs(P[1]-P[0]);return{itemScrollXCenter:Q,relativeIndex:ge,index:de,width:0}})}const W=b.map((P,G)=>{if(!j[G].current||!I.current)return 0;const de=G/(b.length-1);return ce(de,[0,1],[0,1])}),Y=$(W,(E==null?void 0:E.scrollProgress)??0).sort((P,G)=>P.index-G.index);let H=(((ue=m.current)==null?void 0:ue.clientWidth)??L)+l+i[0]+l;const z=Y.sort((P,G)=>Math.abs(P.relativeIndex)-Math.abs(G.relativeIndex)).map((P,G)=>{if(!(H<=0)){if(G==0&&X(P.index),P.width=ce(H-l,[i[0],i[1]],[i[0],i[1]]),H-=P.width+l,H!=0&&H<(i[0]+l)*2){const Q=P.width-((i[0]+l)*2-H);H+=P.width,P.width=Q,H-=P.width}else if(H==0&&P.width>=i[0]*2+l){const Q=P.width-(i[0]+l-H);H+=P.width,P.width=Q,H-=P.width}return P}}).filter(Boolean),ne=z.reverse(),ae=[...z].sort((P,G)=>Math.abs(P.index)-Math.abs(G.index));ne.forEach((P,G)=>{const Q=ne[G+1];if(!Q)return;const de=1-(Math.abs(P.relativeIndex)-Math.abs(Q==null?void 0:Q.relativeIndex)),ge=ce(de,[0,2],[P.width+H,Q.width]);H+=P.width,P.width=ge,H-=P.width});const se=z.length/2,ee=ce(Math.abs(ae[0].relativeIndex),[ae[0].index==0?0:se-1,se],[0,1]),ve=ce(ee,[0,1],[0,1])*-(i[0]+l);return w(ve),Object.fromEntries(z.map(P=>[P.index,P.width]))},j=a.useRef([]).current,[F,X]=a.useState(0);a.useEffect(()=>{f&&f(F)},[F]),a.useEffect(()=>{typeof y=="number"&&b.length>0&&y!==F&&Z(y)},[y,b.length]),a.useEffect(()=>{U(F)},[F]),j.length!==b.length&&b.forEach((L,$)=>{j[$]||(j[$]=a.createRef())});const[T,U]=a.useState(0),Z=(L,$={})=>{if(!b.length)return 0;const W=j[L];if(!W||!W.current||!I.current)return 0;const Y=ce(L/Math.max(1,b.length-1),[0,1],[0,1]);return U(L),I.current.dispatchEvent(new CustomEvent("udx:customScroll:set",{bubbles:!0,detail:{progress:Y,orientation:"horizontal",animate:$.animate!==!1}})),Y},R=b.map((L,$)=>{var z;const W=(z=L.props)==null?void 0:z.onClick,Y=ne=>{W==null||W(ne)},H=()=>U($);return a.cloneElement(L,{width:N[$],outputRange:i,ref:j[$],key:$,index:$,role:"option","aria-selected":F===$,tabIndex:F===$?0:-1,onClick:Y,onFocus:H})}),C=L=>{var $;if(L.scrollTotal>0){($=k.current)==null||$.stop();const W=D.current??0,Y=L.scrollProgress??0;k.current=A.animate(W,Y,{type:"spring",stiffness:260,damping:32,mass:.6,restDelta:5e-4,onUpdate:H=>{D.current=H,V({...L,scrollProgress:H})}})}};a.useEffect(()=>{const L=g();B(L)},[E]);const O=a.useRef(s);a.useEffect(()=>{O.current=s},[s]);const q=a.useRef(null);a.useEffect(()=>{var G;const L=O.current;if(!L||!(m!=null&&m.current))return;const $=b.length;if($<=0)return;const W=((G=m.current)==null?void 0:G.clientWidth)??0,Y=i[1],H=D.current??(E==null?void 0:E.scrollProgress)??0,z=(W+l)/(Y+l),ne=Math.max(1,Math.floor(z)),ae=Math.max(1,Math.round(ne*(2/3))),se=Math.min(Math.max(0,F),Math.max(0,$-1)),ee=se>0,ve=se<$-1,le={total:$,selectedIndex:se,visibleApprox:z,visibleFull:ne,stepHalf:ae,canPrev:ee,canNext:ve,scrollProgress:H,viewportWidth:W,itemMaxWidth:Y,gap:l},ue=q.current;let P=!ue;if(!P){for(const Q in le)if(le[Q]!==ue[Q]){P=!0;break}}P&&(q.current=le,L(le))},[m,b.length,F,E,l,i]),a.useEffect(()=>()=>{var L;(L=k.current)==null||L.stop()},[]);const[te,oe]=a.useState(0);a.useLayoutEffect(()=>{let L=i[1];E&&L>E.scrollVisible&&(L=E.scrollVisible);const $=(L+l)*R.length/v;oe($)},[m,j,E]);const M=L=>{if(!b.length)return;const $=T??F;switch(L.key){case"ArrowLeft":L.preventDefault(),Z(Math.max(0,$-1));break;case"ArrowRight":L.preventDefault(),Z(Math.min(b.length-1,$+1));break;case"Home":L.preventDefault(),Z(0);break;case"End":L.preventDefault(),Z(b.length-1);break;case"Enter":case" ":L.preventDefault(),Z($);break}};return a.useEffect(()=>{const L=m.current;if(!L)return;const $=W=>{const Y=W.detail;Y&&typeof Y.index=="number"&&Z(Y.index)};return L.addEventListener("udx:carousel:centerIndex",$),()=>{L.removeEventListener("udx:carousel:centerIndex",$)}},[m,b.length]),u.jsx("div",{className:S.carousel,ref:m,role:"listbox","aria-orientation":"horizontal",onKeyDown:M,...h,children:u.jsx(bt,{draggable:!0,orientation:"horizontal",onScroll:C,scrollSize:te,children:u.jsx("div",{className:S.track,ref:I,style:{gap:`${l}px`,translate:p,willChange:"translate"},children:R})})})},Nt=({orientation:e="horizontal",className:t,...n})=>{const o=Je({orientation:e,className:t});return u.jsx("hr",{className:o.divider,...n})},J=[];for(let e=0;e<256;++e)J.push((e+256).toString(16).slice(1));function hn(e,t=0){return(J[e[t+0]]+J[e[t+1]]+J[e[t+2]]+J[e[t+3]]+"-"+J[e[t+4]]+J[e[t+5]]+"-"+J[e[t+6]]+J[e[t+7]]+"-"+J[e[t+8]]+J[e[t+9]]+"-"+J[e[t+10]]+J[e[t+11]]+J[e[t+12]]+J[e[t+13]]+J[e[t+14]]+J[e[t+15]]).toLowerCase()}let Ee;const pn=new Uint8Array(16);function yn(){if(!Ee){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Ee=crypto.getRandomValues.bind(crypto)}return Ee(pn)}const xn=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Pe={randomUUID:xn};function xe(e,t,n){var r;if(Pe.randomUUID&&!e)return Pe.randomUUID();e=e||{};const o=e.random??((r=e.rng)==null?void 0:r.call(e))??yn();if(o.length<16)throw new Error("Random bytes length must be >= 16");return o[6]=o[6]&15|64,o[8]=o[8]&63|128,hn(o)}const Me=({variant:e="plain",buttons:t,className:n,children:o,title:r,text:c,position:i,targetRef:l,ref:f,trigger:s=["hover","focus"],...y})=>{if(!o&&!l)throw new Error("ToolTip must have a child or a targetRef");Array.isArray(s)||(s=[s]),t&&!Array.isArray(t)&&(t=[t]);const v=a.useRef(null),h=l||v,[d,m]=a.useState(null),[p]=a.useState(xe()),[w,S]=a.useState(!1),b=a.useRef(null);a.useEffect(()=>{const g=j=>{m(j.detail)};return document.addEventListener("tooltip-update",g),()=>{document.removeEventListener("tooltip-update",g)}},[]),a.useEffect(()=>{b.current&&clearTimeout(b.current),d?S(d===p):b.current=setTimeout(()=>{S(!1)},1200)},[d,p]);const I=()=>{if(s.includes("hover")){const g=new CustomEvent("tooltip-update",{detail:p});document.dispatchEvent(g)}},N=()=>{if(s.includes("hover")){const g=new CustomEvent("tooltip-update",{detail:null});document.dispatchEvent(g)}},B=()=>{if(s.includes("click")){const g=new CustomEvent("tooltip-update",{detail:w?null:p});document.dispatchEvent(g)}},E=()=>{if(s.includes("focus")){const g=new CustomEvent("tooltip-update",{detail:p});document.dispatchEvent(g)}},V=()=>{if(s.includes("focus")){const g=new CustomEvent("tooltip-update",{detail:null});document.dispatchEvent(g)}};a.useEffect(()=>{if(h!=null&&h.current){const g=h.current;return g.addEventListener("mouseenter",I),g.addEventListener("mouseleave",N),g.addEventListener("click",B),g.addEventListener("focus",E),g.addEventListener("blur",V),()=>{g.removeEventListener("mouseenter",I),g.removeEventListener("mouseleave",N),g.removeEventListener("click",B),g.removeEventListener("focus",E),g.removeEventListener("blur",V)}}},[h,s,p,w]);const D=!l&&a.isValidElement(o)?a.cloneElement(o,{ref:v}):o;if(!i&&typeof window<"u"&&h!=null&&h.current&&!i){const g=h.current.getBoundingClientRect(),j=window.innerWidth,F=window.innerHeight,X=g.left/j,T=g.top/F;e==="plain"?X<1/3?i="right":X>2/3?i="left":i=T>.5?"top":"bottom":X<1/2&&T<1/2?i="bottom-right":X>1/2&&T<1/2?i="bottom-left":X>1/2&&T>1/2?i="top-left":X<1/2&&T>1/2&&(i="top-right")}const k=xt({variant:e,buttons:t,className:n,title:r,text:c,position:i,trigger:s,targetRef:l,children:o});return u.jsxs(u.Fragment,{children:[D,u.jsx(A.AnimatePresence,{children:w&&u.jsx(Et,{targetRef:h,children:u.jsx(A.motion.div,{initial:{opacity:d?1:0},animate:{opacity:1},transition:{duration:d?0:.3},exit:{opacity:d?1:0},className:k.toolTip,...y,onMouseEnter:I,onMouseLeave:N,children:u.jsxs(A.motion.div,{className:k.container,layoutId:"tool-tip",transition:{type:"spring",stiffness:200,damping:20},children:[r&&u.jsx("div",{className:k.subHead,children:r}),u.jsx("div",{className:k.supportingText,children:c}),t&&u.jsx("div",{className:k.actions,children:Array.isArray(t)&&t.map((g,j)=>u.jsx(he,{size:"small",variant:"text",...g},j))})]})})})})]})},pe=({className:e,label:t,variant:n="primary",size:o="medium",href:r,type:c,icon:i,extended:l=!1,ref:f,transition:s,children:y,...v})=>{if(y&&(t=y),!t)throw new Error("FAB component requires either a label prop or children content");const h=r?"a":"button",d=Qe({href:r,icon:i,extended:l,label:t,size:o,variant:n,className:e,transition:s,children:t});s={duration:.3,...s};const m=a.useRef(null),p=f||m,w={visible:{width:"auto",marginLeft:12,opacity:1,transition:{...s,opacity:{duration:s.duration/2,delay:s.duration-s.duration/2}}},hidden:{width:0,marginLeft:0,opacity:0,transition:{...s,marginLeft:{duration:s.duration/2,delay:s.duration-s.duration/2}}}};return u.jsxs(h,{...v,ref:p,href:r,"aria-label":l?void 0:t,className:d.fab,children:[u.jsx(Me,{trigger:l?null:void 0,text:t,targetRef:p}),u.jsx(ie,{style:{transition:s.duration+"s"},className:d.stateLayer,colorName:x({"on-primary":n=="primary","on-secondary":n=="secondary","on-tertiary":n=="tertiary","on-primary-container":n=="primaryContainer","on-secondary-container":n=="secondaryContainer","on-tertiary-container":n=="tertiaryContainer"}),stateClassName:"state-ripple-group-[fab]"}),u.jsx(re,{icon:i,className:d.icon}),u.jsx(A.AnimatePresence,{children:l&&u.jsx(A.motion.span,{variants:w,initial:"hidden",animate:"visible",exit:"hidden",className:d.label,children:t})})]})},fe=({variant:e="standard",href:t,disabled:n=!1,type:o="button",title:r,label:c,onToggle:i,activated:l=!1,onClick:f,icon:s,size:y="medium",iconSelected:v,className:h,ref:d,width:m="default",shape:p="rounded",allowShapeTransformation:w=!0,transition:S,children:b,...I})=>{if(b&&(c=b),!c)throw new Error("IconButton component requires either a label prop or children content to provide an accessible aria-label");r||(r=c);const[N,B]=a.useState(l);let E;i?i&&(E=j=>{n&&j.preventDefault(),B(!N),i(!!N)},s=N&&v||s):E=j=>{n&&j.preventDefault(),f&&f(j)},a.useEffect(()=>{B(l)},[l]);const V=t?"a":"button",D=tt({transition:S,shape:p,allowShapeTransformation:w,width:m,href:t,activated:N,label:c,iconSelected:v,isActive:N,onToggle:i,disabled:n,icon:s,variant:e,className:h,size:y,children:c,...I}),k=a.useRef(null),g=d||k;return S={duration:.3,...S},u.jsxs(V,{disabled:n,href:t,style:{transition:S.duration+"s"},className:D.iconButton,"aria-label":c,...I,title:void 0,onClick:E,ref:g,children:[u.jsx(Me,{targetRef:g,trigger:n?null:void 0,text:r}),u.jsx("div",{className:D.touchTarget}),u.jsx(ie,{style:{transition:S.duration+"s"},className:D.stateLayer,colorName:x(e==="standard"&&{"on-surface-variant":!N,"on-primary":N},e==="filled"&&{"on-surface-variant":!N&&!!i,"on-primary":N||!i},e==="tonal"&&{"on-secondary":N&&!!i,"on-secondary-container":!N||!i},e==="outlined"&&{"inverse-on-surface":N&&!!i,"on-surface-variant":!N||!i}),stateClassName:"state-ripple-group-[icon-button]"}),s&&u.jsx(re,{icon:s,className:D.icon})]})};/*!
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react/jsx-runtime"),De=require("clsx"),Mt=require("tailwind-merge"),a=require("react"),B=require("motion/react"),kt=require("motion"),We=require("react-dom"),me=require("@udixio/theme"),Fe=require("@udixio/tailwind"),Rt=require("react-textarea-autosize"),Ve=Mt.extendTailwindMerge({override:{classGroups:{"text-color":[{text:[e=>!e.startsWith("display-")&&!e.startsWith("headline-")&&!e.startsWith("title-")&&!e.startsWith("body-")&&!e.startsWith("label-")]}]}},extend:{classGroups:{font:[{text:[e=>e.startsWith("display-")||e.startsWith("headline-")||e.startsWith("title-")||e.startsWith("body-")||e.startsWith("label-")]}]},conflictingClassGroups:{font:["font"]}}}),x=(...e)=>Ve(De.clsx(e)),Oe=(...e)=>Ve(De.clsx(e));function $t(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 pe=e=>{const t={};e.classNameList.forEach(o=>{var r;if(o)if(typeof o=="string")(t[r=e.default]??(t[r]=[])).push(o);else{const c=o(e.states);Object.entries(c).map(i=>{const[l,f]=i;(t[l]??(t[l]=[])).push(f)})}});const n=t;return Object.entries(t).map(o=>{let[r,c]=o;c=c.reverse(),r==e.default&&c.unshift("relative"),c.unshift($t(r)),n[r]=Oe(...c)}),n},K=(e,t)=>n=>pe({classNameList:[n.className,t],default:e,states:n}),_=(e,t)=>n=>a.useMemo(()=>pe({classNameList:[n.className,t],default:e,states:n}),[n]);function At(e,t,n){return a.useMemo(()=>pe({classNameList:[n==null?void 0:n.className,t],default:e,states:n}),[e,t,n])}const He=({variant:e,disableTextMargins:t,disabled:n,iconPosition:o,icon:r,isActive:c,loading:i,shape:l,onToggle:f,size:s,allowShapeTransformation:y})=>({button:x(" relative cursor-pointer group/button outline-none inline-block flex justify-center items-center ",s==="xSmall"&&"text-label-large px-3 py-1.5 gap-1",s==="small"&&"text-label-large px-4 py-2.5 gap-2",s==="medium"&&"text-title-medium px-6 py-4 gap-2",s==="large"&&"text-headline-small px-12 py-8 gap-3",s==="xLarge"&&"text-headline-large px-16 py-12 gap-4",l==="rounded"&&{"rounded-[30px]":s==="xSmall"||s=="small","rounded-[40px]":s==="medium","rounded-[70px]":s==="large"||s=="xLarge"},(l==="squared"||y&&c)&&{"rounded-[12px]":s==="xSmall"||s=="small","rounded-[16px]":s==="medium","rounded-[28px]":s==="large"||s=="xLarge"},y&&!n&&{"active:rounded-[12px]":s==="xSmall"||s=="small","active:rounded-[16px]":s==="medium","active:rounded-[28px]":s==="large"||s=="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&&f,"bg-primary text-on-primary":!n&&(c&&f||!f),"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&&[s==="xSmall"&&"-mx-3 ",s==="small"&&"-mx-4 ",s==="medium"&&"-mx-6 ",s==="large"&&"-mx-12",s==="xLarge"&&"-mx-16 "]],n&&"cursor-default"),touchTarget:x("absolute -translate-x-1/2 -translate-y-1/2 left-1/2 top-1/2 h-12 w-full"),stateLayer:x("overflow-hidden",l==="rounded"&&{"rounded-[30px]":s==="xSmall"||s=="small","rounded-[40px]":s==="medium","rounded-[70px]":s==="large"||s=="xLarge"},(l==="squared"||y&&c)&&{"rounded-[12px]":s==="xSmall"||s=="small","rounded-[16px]":s==="medium","rounded-[28px]":s==="large"||s=="xLarge"},y&&!n&&{"group-active/button:rounded-[12px]":s==="xSmall"||s=="small","group-active/button:rounded-[16px]":s==="medium","group-active/button:rounded-[28px]":s==="large"||s=="xLarge"}),label:x({invisible:i}),icon:x({invisible:i},s==="xSmall"&&"size-5",s==="small"&&"size-5",s==="medium"&&"size-6",s==="large"&&"size-8",s==="xLarge"&&"size-10")}),Bt=K("button",He),Ye=_("button",He),Ue=({variant:e,isInteractive:t})=>({card:x("group/card rounded-xl overflow-hidden z-10",e==="outlined"&&"bg-surface border border-outline-variant",e==="elevated"&&"bg-surface-container-low shadow-1",e==="filled"&&"bg-surface-container-highest")}),Pt=K("card",Ue),qe=_("card",Ue),Ee=({width:e})=>({carouselItem:x("rounded-[28px] overflow-hidden flex-none",{hidden:e===void 0,"flex-1":e==null})}),Dt=K("carouselItem",Ee),Xe=_("carouselItem",Ee),_e=()=>({carousel:x(["w-full h-[400px]"]),track:x("flex h-full w-full")}),Wt=K("carousel",_e),Ke=_("carousel",_e),Ge=({orientation:e})=>({divider:x("border-outline-variant ",{"h-fit w-full border-t":e==="horizontal"},{"h-auto self-stretch w-fit border-l":e==="vertical"})}),Ft=K("divider",Ge),Je=_("divider",Ge),Ze=({size:e,variant:t,extended:n})=>({fab:x("flex shadow-3 hover:shadow-4 group/fab overflow-hidden outline-none items-center cursor-pointer",{"rounded-[12px]":e=="small","rounded-[16px]":e=="medium","rounded-[28px]":e=="large"},{"p-2":e=="small","p-4":e=="medium","p-[30px]":e=="large"},t==="primary"&&"bg-primary text-on-primary",t==="secondary"&&"bg-secondary text-on-secondary",t==="tertiary"&&"bg-tertiary text-on-tertiary",t==="primaryContainer"&&"bg-primary-container text-on-primary-container",t==="secondaryContainer"&&"bg-secondary-container text-on-secondary-container",t==="tertiaryContainer"&&"bg-tertiary-container text-on-tertiary-container"),icon:x({"size-6":e=="small"||e=="medium","size-9":e=="large"}),label:x("text-nowrap",{"text-title-medium":e=="small","text-title-large":e=="medium","text-headline-small":e=="large"})}),Vt=K("fab",Ze),Qe=_("fab",Ze),Te=({size:e,variant:t,open:n})=>({fabMenu:x("relative inline-flex flex-col items-end"),actions:x("flex flex-col gap-1 items-end absolute bottom-[calc(100%_+_8px)] right-0")}),Ot=K("fabMenu",Te),ze=_("fabMenu",Te),et=({variant:e,disabled:t,onToggle:n,isActive:o,size:r,width:c,shape:i,allowShapeTransformation:l})=>({iconButton:x("rounded-full relative flex transition-all duration-300","group/icon-button cursor-pointer",{"cursor-default":t},i==="rounded"&&{"rounded-[30px]":r==="xSmall"||r=="small","rounded-[40px]":r==="medium","rounded-[70px]":r==="large"||r=="xLarge"},(i==="squared"||l&&o)&&{"rounded-[12px]":r==="xSmall"||r=="small","rounded-[16px]":r==="medium","rounded-[28px]":r==="large"||r=="xLarge"},l&&!t&&{"active:rounded-[12px]":r==="xSmall"||r=="small","active:rounded-[16px]":r==="medium","active:rounded-[28px]":r==="large"||r=="xLarge"},e==="filled"&&[!t&&{"bg-surface-container":!o&&!!n,"bg-primary":o||!n},!!t&&"bg-on-surface/[0.12]"],e==="tonal"&&[!t&&{"bg-secondary-container text-on-secondary-container":!o&&!!n,"bg-secondary text-on-secondary":o||!n},!!t&&"bg-on-surface/[0.12]"],e==="outlined"&&[!t&&{"border border-outline":!o,"border border-transparent bg-inverse-surface":o},!!t&&{"border border-on-surface/[0.12]":!o,"border border-transparent bg-on-surface/[0.12]":o}]),touchTarget:x("absolute -translate-x-1/2 -translate-y-1/2 left-1/2 top-1/2 h-12 w-full"),stateLayer:x("absolute top-0 left-0 h-full w-full overflow-hidden",(i==="rounded"||i==="squared"&&n&&!t&&o&&l)&&{"rounded-[30px]":r==="xSmall"||r=="small","rounded-[40px]":r==="medium","rounded-[70px]":r==="large"||r=="xLarge"},(i==="squared"||i==="rounded"&&n&&!t&&o&&l)&&{"rounded-[12px]":r==="xSmall"||r=="small","rounded-[16px]":r==="medium","rounded-[28px]":r==="large"||r=="xLarge"},l&&!t&&{"group-active/icon-button:rounded-[12px]":r==="xSmall"||r=="small","group-active/icon-button:rounded-[16px]":r==="medium","group-active/icon-button:rounded-[28px]":r==="large"||r=="xLarge"},!t&&[e==="standard"&&{"state-on-surface-variant":!o,"state-primary":o},e==="filled"&&{"state-primary":!o&&!!n,"state-inverse-on-surface":o||!n},e==="tonal"&&{"state-on-surface-variant":!o&&!!n,"state-on-secondary-container":o||!n},e==="outlined"&&{"state-on-surface-variant":!o,"state-on-primary":o}]),icon:x(" transition-all duration-300",{"size-5 p-1.5":r==="xSmall"},{"size-6 p-2":r==="small"},{"size-6 p-4":r==="medium"},{"size-8 p-8":r==="large"},{"size-10 p-12":r==="xLarge"},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":!o,"text-primary":o},e==="filled"&&{"text-primary":!o&&!!n,"text-on-primary":o||!n},e==="outlined"&&{"text-on-surface-variant":!o,"text-inverse-on-surface":o}],!!t&&"text-on-surface/[0.38]")}),Ht=K("iconButton",et),tt=_("iconButton",et),nt=({variant:e,isVisible:t})=>({progressIndicator:x((e==="linear-determinate"||e=="linear-indeterminate")&&"flex w-full h-1"),track:x("h-full rounded-full bg-primary rounded-l-full",{"max-h-0":!t,"max-h-full":t}),activeIndicator:x({"max-h-0":!t,"max-h-full":t},(e==="linear-determinate"||e=="linear-indeterminate")&&"h-full flex-1 rounded-full bg-primary-container",(e==="circular-determinate"||e=="circular-indeterminate")&&["stroke-primary fill-transparent ",{"stroke-[4px]":t,"stroke-[0px]":!t}]),stop:x("absolute top-1/2 -translate-y-1/2 right-0 bg-primary rounded-full size-1",{"max-h-0":!t,"max-h-full":t})}),Yt=K("progressIndicator",nt),rt=_("progressIndicator",nt),Le=({variant:e,position:t})=>({sideSheet:x("bg-surface flex justify-between max-w-xs z-10",{"flex-row-reverse":t=="right","h-full":e=="standard"},e=="modal"&&["rounded-2xl fixed top-0 m-[1rem] h-[calc(100dvh-2rem)]",{"right-0":t=="right","left-0":t=="left"}]),container:x("w-full overflow-hidden",{}),content:x("w-fit "),header:x("p-4 flex items-center gap-2"),title:x("text-on-surface-variant text-title-large"),closeButton:x("ml-auto"),divider:x({hidden:e=="modal"}),overlay:x("bg-[black]/[0.32] fixed top-0 left-0 w-screen h-screen")}),st=K("sideSheet",Le),Ut=_("sideSheet",Le),Ne=({isChanging:e})=>({slider:x(["relative w-full h-11 flex items-center rounded gap-x-1.5 cursor-pointer min-w-32"]),activeTrack:x(["h-4 relative transition-all duration-100 bg-primary overflow-hidden rounded-l-full "]),inactiveTrack:x(["h-4 relative transition-all duration-100 bg-primary-container rounded-r-full overflow-hidden"]),handle:x(["transform relative transition-all duration-100 bg-primary h-full rounded-full ",{"w-0.5":e,"w-1":!e}]),valueIndicator:x(["absolute select-none bg-inverse-surface text-inverse-on-surface py-3 px-4 text-label-large rounded-full bottom-[calc(100%+4px)] transform left-1/2 -translate-x-1/2"]),dot:x(["h-1 w-1 absolute transform -translate-y-1/2 -translate-x-1/2 top-1/2 rounded-full"])}),qt=K("slider",Ne),ot=_("slider",Ne),at=()=>({snackbar:x(" rounded bg-inverse-surface "),container:x("pl-4 pr-2 max-w-full py-1 flex items-center flex-wrap"),supportingText:x("text-body-medium text-inverse-on-surface "),icon:x(" ml-auto mr-0 text-inverse-on-surface block dark")}),Xt=K("snackbar",at),lt=_("snackbar",at),ct=({isSelected:e,disabled:t,inactiveIcon:n})=>({switch:x("group/switch w-[52px] h-[32px] outline-none rounded-full border-2 flex items-center",{"bg-on-surface/[0.12] border-transparent":t},!t&&["cursor-pointer ",{"bg-primary border-primary":e},{"bg-surface-container border-outline":!e}]),handleContainer:x("flex items-center justify-center absolute",{"left-[14px]":!e},{"right-[14px]":e}),handle:x("transition-all duration-100 z-10 rounded-full flex items-center justify-center",{"w-[16px] h-[16px]":!e&&!n},{"w-[24px] h-[24px]":!(!e&&!n)},!t&&["cursor-pointer group-active/switch:h-[28px] group-active/switch:w-[28px]",{"bg-on-primary group-hover/switch:bg-primary-container":e},{"bg-outline group-hover/switch:bg-on-surface-variant":!e}],{"bg-surface":t}),handleStateLayer:x("w-[40px] h-[40px] -z-10 rounded-full absolute",{"group-state-primary":!t}),icon:x("w-[16px] h-[16px]",!t&&[{"text-on-primary-container":e},{"text-on-primary":!e}],{"text-on-surface/[0.38]":t})}),_t=K("switch",ct),it=_("switch",ct),ut=({isSelected:e,icon:t,label:n,variant:o})=>({tab:x("flex-1 group/tab outline-none flex px-4 justify-center items-center cursor-pointer",{"z-10":e},!!(t&&n)&&o==="primary"&&"h-16",!(t&&n&&o==="primary")&&"h-12"),stateLayer:x("absolute w-full h-full overflow-hidden left-1/2 top-1/2 transform -translate-y-1/2 -translate-x-1/2",o==="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},o==="secondary"&&"group-hover/tab:hover-state-on-surface group-focus-visible/tab:focus-state-on-surface"),content:x("flex gap-0.5 h-full justify-center",{relative:o=="primary"},{"":!!(n&&!t)},o==="primary"&&"flex-col items-center",o==="secondary"&&{"flex-col items-center":!(n&&t),"flex-row items-center gap-2":!!(n&&t)}),icon:x("h-6 w-6 p-0.5 !box-border",o==="primary"&&{"text-on-surface-variant":!e,"text-primary":e},o==="secondary"&&{"text-on-surface-variant":!e,"text-on-surface":e}),label:x("text-title-small text-nowrap",o==="primary"&&{"text-on-surface-variant":!e,"text-primary":e},o==="secondary"&&{"text-on-surface-variant":!e,"text-on-surface":e}),underline:x("bg-primary absolute w-full left-0 bottom-0",o==="primary"&&"h-[3px] rounded-t",o==="secondary"&&"h-0.5")}),Kt=K("tab",ut),dt=_("tab",ut),ft=({scrollable:e})=>({tabs:x("border-b border-surface-container-highest bg-surface","flex relative ",{"overflow-x-auto":e})}),Gt=K("tabs",ft),mt=_("tabs",ft),ht=({disabled:e,leadingIcon:t,trailingIcon:n,variant:o,errorText:r,isFocused:c,value:i,suffix:l,textLine:f})=>({textField:x({"opacity-[.38]":e}),content:x("group/text-field transition-border duration-200 relative flex items-center ",{"h-14":f=="singleLine"},{"border-on-surface-variant":!(r!=null&&r.length)&&!c&&o=="filled","border-outline":!(r!=null&&r.length)&&!c&&o=="outlined","border-primary":!(r!=null&&r.length)&&c,"border-error":!!(r!=null&&r.length)},{"bg-on-surface/[0.04]":e},o=="filled"&&["rounded-t overflow-hidden border-b",{"bg-surface-container-highest":!e}],o=="outlined"&&["border rounded box-border",{"border-[3px]":c}]),stateLayer:x("absolute -z-10 w-full h-full top-0 left-0",{hidden:o=="outlined"},{"group-state-on-surface":!e,"focus-state-on-surface":c}),label:x("inline-flex outline-none whitespace-nowrap",{"text-on-surface-variant":!e&&!(r!=null&&r.length)},{"text-on-surface":e},{"text-error":!!(r!=null&&r.length)},{"text-primary":!(r!=null&&r.length)&&c}),input:x("w-full resize-none px-4 text-body-large bg-[inherit] outline-none autofill:transition-colors autofill:duration-[5000000ms]",{" text-on-surface placeholder:text-on-surface-variant":!e,"placeholder:text-on-surface text-on-surface":e},{"pr-0":!!l},o=="filled"&&" pb-2 pt-6",o=="outlined"&&"py-4 relative z-10"),activeIndicator:x("absolute w-0 inset-x-0 border-rounded mx-auto bottom-0",o=="filled"&&["h-[2px] transition-all duration-300",{"bg-primary":!(r!=null&&r.length)},{"bg-error":!!(r!=null&&r.length)},{"!w-full":c}]),supportingText:x(" 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:x(["h-12 ml-3 flex items-center justify-center",{"cursor-text":!a.isValidElement(t)}]),trailingIcon:x("h-12 w-12 flex items-center justify-center",{"cursor-text":!a.isValidElement(n)}),suffix:x("text-on-surface-variant pl-0 pr-4",o=="filled"&&" pb-2 pt-6",o=="outlined"&&"py-4 relative z-10")}),Jt=K("textField",ht),pt=_("textField",ht),yt=({position:e,variant:t})=>({toolTip:x(" pointer-events-auto w-max z-10 absolute m-1 w-max-content max-w-[312px]",{"bottom-full left-1/2 -translate-x-1/2":e=="top","top-full left-1/2 -translate-x-1/2":e=="bottom","right-full top-1/2 -translate-y-1/2":e=="left","left-full top-1/2 -translate-y-1/2":e=="right","bottom-full right-full":e=="top-left","bottom-full left-full":e=="top-right","top-full right-full":e=="bottom-left","top-full left-full":e=="bottom-right"}),container:x("pb-2",t=="rich"&&"bg-surface-container rounded-2xl text-on-surface-container px-4 pt-3 shadow-2",t=="plain"&&"bg-inverse-surface rounded text-inverse-on-surface px-2 py-1"),actions:x("flex gap-10 px-1 mt-2",t=="plain"&&"hidden"),subHead:x("text-title-small mb-1",t=="plain"&&"hidden"),supportingText:x("")}),Zt=K("toolTip",yt),xt=_("toolTip",yt),re=({icon:e,colors:t=[],className:n})=>{if(typeof e=="string"){let s=e;return t[0]&&(s=s.replace(/<svg([^>]*)>/,`<svg$1 fill="${t[0]}" color="${t[0]}">`),s=s.replace(/<path([^>]*?)>/g,'<path$1 fill="currentColor">')),u.jsx("div",{className:x("size-5 box-content inline-flex fill-current",n),style:{color:t[0]||"inherit"},dangerouslySetInnerHTML:{__html:s}})}if(e&&typeof e=="object"&&"src"in e){const s=e;return u.jsx("img",{src:s.src,width:s.width,height:s.height,className:x("size-5 box-content",n),style:{filter:t[0]?"brightness(0) saturate(100%) invert(1)":void 0},alt:"","aria-hidden":"true"})}const o=e;if(!(o!=null&&o.prefix))throw new Error(`Invalid icon type: ${typeof e}`);const{icon:r}=o,[c,i,,,l]=r||[],f=s=>{switch(s.length){case 2:return{"--fa-primary-color":s[0]||"inherit","--fa-secondary-color":s[1]||"inherit"};case 1:return{color:s[0]};default:return{}}};return u.jsx("svg",{className:x("size-5 box-content",n),style:{...f(t)},xmlns:"http://www.w3.org/2000/svg",viewBox:`0 0 ${c} ${i}`,role:"img","aria-hidden":"true",children:typeof l=="string"?u.jsx("path",{className:"fill-current",d:l}):l.map((s,y)=>u.jsx("path",{d:s},y))})},wt=({variant:e="linear-determinate",value:t=0,transitionDuration:n=1e3,className:o,...r})=>{const[c,i]=a.useState(t),[l]=a.useState(1.5);a.useEffect(()=>{t>100&&(t=100),t<0&&(t=0),i(t)},[t]);const[f,s]=a.useState(!0),y=()=>f?l:l*.5;a.useEffect(()=>{if((e==="circular-indeterminate"||e==="linear-indeterminate")&&c!==100){const m=setInterval(()=>{i(f?10:90),s(!f)},y()*1e3);return()=>clearInterval(m)}},[e,f,c]);const[v,h]=a.useState(!1);a.useEffect(()=>{if(c>=100){const m=setTimeout(()=>{h(!1)},n);return()=>{clearTimeout(m)}}else h(!0)},[c,n]);const d=rt({className:o,variant:e,value:t,transitionDuration:n,isVisible:v});return u.jsxs(u.Fragment,{children:[(e==="linear-determinate"||e=="linear-indeterminate")&&u.jsxs("div",{className:d.progressIndicator,...r,children:[u.jsx("div",{style:{width:`${c}%`,transition:`width ${n}ms ease-in-out ${c==100?", max-height 200ms 0.5s ease-in-out":""}`},className:d.track}),u.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:d.activeIndicator}),u.jsx("div",{style:{width:"4 px",transition:`width ${n}ms ease-in-out, max-height 200ms 0.5s ease-in-out`},className:d.stop})]}),(e==="circular-determinate"||e=="circular-indeterminate")&&u.jsx(B.motion.svg,{width:"48",height:"48",viewBox:"0 0 48 48",initial:{rotate:-90},animate:{rotate:270},transition:{repeat:1/0,duration:y(),ease:"linear"},className:d.progressIndicator,...r,children:u.jsx(B.motion.circle,{cx:"50%",cy:"50%",r:v?"calc(50% - 2px)":"50%",style:{strokeLinecap:"round"},initial:"hidden",animate:"visible",className:d.activeIndicator,variants:{hidden:{pathLength:f?10/100:90/100},visible:{pathLength:f?90/100:10/100}},transition:{pathLength:{type:"tween",ease:"linear",duration:y(),bounce:0}}})},f+"")]})},vt=({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}}},[o,r]=a.useState(!0),[c,i]=a.useState(!1),[l,f]=a.useState({x:50,y:50});a.useEffect(()=>{c&&(r(!0),r(!1))},[c]),a.useEffect(()=>{const m=t==null?void 0:t.current;if(m)return m.addEventListener("mousedown",s),m.addEventListener("mouseup",v),m.addEventListener("mouseleave",y),()=>{m.removeEventListener("mousedown",s),m.removeEventListener("mouseup",v),m.removeEventListener("mouseleave",y)}},[t]);const s=m=>{const p=t==null?void 0:t.current,w=p.getBoundingClientRect();i(!0),f({x:(m.clientX-w.left)/p.clientWidth*100,y:(m.clientY-w.top)/p.clientHeight*100})},y=m=>{i(!1)},v=m=>{i(!1)},h=`color-mix(in srgb, var(--state-color,_var(--color-${e})) 10%, transparent)`,d={position:"absolute",inset:0,width:"100%",height:"100%","--x":l.x+"%","--y":l.y+"%","--r":"0%",background:`radial-gradient(ellipse at var(--x) var(--y), ${h} var(--r), transparent calc(var(--r) * 2))`,pointerEvents:"none"};return u.jsx(B.AnimatePresence,{mode:"wait",children:(c||!c&&!o)&&u.jsx(B.motion.div,{style:d,variants:n,initial:"initial",animate:"animate",exit:"exit",onAnimationComplete:()=>r(!0)})})},gt=K("customScroll",({orientation:e,draggable:t,isDragging:n})=>({customScroll:x("flex h-full w-full",t&&["[&::-webkit-scrollbar-track]:rounded-full","[&::-webkit-scrollbar-track]:bg-transparent","[&::-webkit-scrollbar-thumb]:rounded-full",{"[&::-webkit-scrollbar-thumb]:bg-outline":n,"[&::-webkit-scrollbar-thumb]:bg-transparent":!n},{"[&::-webkit-scrollbar]:h-2":e==="horizontal"},{"[&::-webkit-scrollbar]:w-2":e==="vertical"}],{"overflow-y-scroll flex-col":e==="vertical","overflow-x-scroll flex-row":e==="horizontal","cursor-grab":t&&!n,"cursor-grabbing":t&&n}),track:x("overflow-hidden flex-none sticky",{"left-0 h-full":e==="horizontal","top-0 w-full":e==="vertical"})}));function Qt(e,t){let n=0,o=null,r=null;const c=(i,l)=>{n=Date.now(),t(i,l)};return(i,l)=>{const f=Date.now(),s=e-(f-n);s<=0?(o&&(clearTimeout(o),o=null),c(i,l)):(r={v:i,o:l},o||(o=setTimeout(()=>{o=null;const y=r;r=null,y&&c(y.v,y.o)},s)))}}const bt=({children:e,orientation:t="vertical",scrollSize:n,onScroll:o,className:r,draggable:c=!1,throttleDuration:i=75,scroll:l,setScroll:f})=>{var te,oe;const s=a.useRef(null),y=a.useRef(null),[v,h]=a.useState({width:null,height:null});a.useEffect(()=>{if(!s.current)return;const M=new ResizeObserver(L=>{for(const $ of L)$.target===s.current&&h({width:$.contentRect.width,height:$.contentRect.height})});return M.observe(s.current),()=>{M.disconnect()}},[s]);const d=a.useRef(null),m=a.useRef(null),p=()=>{const M=y.current;return M?{width:n??M.scrollWidth,height:n??M.scrollHeight}:null},w=()=>{const M=s.current;return M?{width:M.clientWidth,height:M.clientHeight}:null},{scrollYProgress:S,scrollXProgress:b}=B.useScroll({container:s}),I=a.useRef(null);I.current||(I.current=Qt(i,(M,L)=>{!m.current||!d.current||!s.current||(L===(t==="horizontal"?"x":"y")&&(f==null||f(M)),o&&(t==="horizontal"&&L==="x"&&o({scrollProgress:M,scroll:M*(d.current.width-s.current.clientWidth),scrollTotal:d.current.width-s.current.clientWidth,scrollVisible:m.current.width}),t==="vertical"&&L==="y"&&o({scrollProgress:M,scroll:M*(d.current.height-s.current.clientHeight),scrollTotal:d.current.height-s.current.clientHeight,scrollVisible:m.current.height})))}));const N=(M,L)=>{I.current&&I.current(M,L)};a.useEffect(()=>{v.width&&N(b.get(),"x"),v.height&&N(S.get(),"y")},[v]),a.useEffect(()=>{const M=s.current,L=y.current;if(!M||!L||typeof l!="number")return;const $=(W,Y,H)=>Math.min(H,Math.max(Y,W));if(t==="horizontal"){const W=Math.max(0,(n??L.scrollWidth)-M.clientWidth);M.scrollLeft=$(l*W,0,W)}else{const W=Math.max(0,(n??L.scrollHeight)-M.clientHeight);M.scrollTop=$(l*W,0,W)}},[l,t,n]),B.useMotionValueEvent(b,"change",M=>{N(M,"x")}),B.useMotionValueEvent(S,"change",M=>{N(M,"y")});const[A,E]=a.useState(!1);a.useLayoutEffect(()=>{A||!m.current||!d.current||!o||(o({scrollProgress:0,scroll:0,scrollTotal:t=="vertical"?d.current.height:d.current.width,scrollVisible:t=="vertical"?m.current.height:m.current.width}),E(!0))},[m,d,o]),d.current=p(),m.current=w();const[V,D]=a.useState(!1),k=gt({isDragging:V,children:e,className:r,onScroll:o,orientation:t,scrollSize:n,draggable:c,throttleDuration:i}),[g,j]=a.useState(0),[F,X]=a.useState(0),T=M=>{if(!c)return;const L=s.current;if(!L||g==null)return;const W=(M.pageX-L.offsetLeft-g)*1.5;L.scrollLeft=F-W},U=M=>{const L=s.current;L&&(D(!0),j(M.pageX-L.offsetLeft),X(L.scrollLeft))},Z=M=>{V&&(M.preventDefault(),T(M))},R=()=>{D(!1)},C=()=>{D(!1)},O=M=>{M.preventDefault()},q=a.useRef(null);return a.useEffect(()=>()=>{q.current&&clearTimeout(q.current)},[]),a.useEffect(()=>{const M=s.current;if(!M)return;const L=$=>{var z,ne,ae,se;const W=$.detail,Y=s.current;if(!Y||!W)return;const H=W.orientation??t;if(typeof W.progress=="number")if(H==="horizontal"){const ee=Math.max(0,(((z=d.current)==null?void 0:z.width)??0)-Y.clientWidth);Y.scrollLeft=Math.min(ee,Math.max(0,W.progress*ee))}else{const ee=Math.max(0,(((ne=d.current)==null?void 0:ne.height)??0)-Y.clientHeight);Y.scrollTop=Math.min(ee,Math.max(0,W.progress*ee))}else if(typeof W.scroll=="number")if(H==="horizontal"){const ee=Math.max(0,(((ae=d.current)==null?void 0:ae.width)??0)-Y.clientWidth);Y.scrollLeft=Math.min(ee,Math.max(0,W.scroll))}else{const ee=Math.max(0,(((se=d.current)==null?void 0:se.height)??0)-Y.clientHeight);Y.scrollTop=Math.min(ee,Math.max(0,W.scroll))}};return M.addEventListener("udx:customScroll:set",L),()=>{M.removeEventListener("udx:customScroll:set",L)}},[t]),u.jsxs("div",{className:k.customScroll,ref:s,onMouseDown:U,onMouseMove:Z,onMouseUp:R,onMouseLeave:C,onDragStart:O,onScroll:M=>{V||(j(null),D(!0),q.current&&clearTimeout(q.current),q.current=setTimeout(()=>{D(!1)},1e3))},children:[u.jsx("div",{ref:y,style:t==="vertical"?{height:((te=m==null?void 0:m.current)==null?void 0:te.height)??"100%"}:{width:((oe=m==null?void 0:m.current)==null?void 0:oe.width)??"100%"},className:k.track,children:e}),m.current&&d.current&&u.jsxs(u.Fragment,{children:[t==="vertical"&&d.current.height>m.current.height&&u.jsx(B.motion.div,{className:"flex-none",style:{height:d.current.height-m.current.height}}),t==="horizontal"&&d.current.width>m.current.width&&u.jsx(B.motion.div,{className:"flex-none",style:{width:d.current.width-m.current.width}})]})]})},Tt=({onScroll:e,el:t,touch:n=!0})=>{const o=a.useRef(null),r=a.useRef(0),c=a.useRef(0);a.useEffect(()=>{if(!t)return;r.current=t.scrollTop,c.current=t.scrollLeft;const i=d=>{e==null||e(d)},l=d=>{let m=d;for(;m&&m!==document.body&&m!==document.documentElement;){const p=window.getComputedStyle(m),w=p.overflowY||p.overflow;if((w==="auto"||w==="scroll")&&m.scrollHeight>m.clientHeight)return m;m=m.parentElement}return null},f=d=>{const m=d.target,p=l(m);if(p&&p!==t){const w=p.scrollTop<p.scrollHeight-p.clientHeight,S=p.scrollTop>0;if(d.deltaY>0&&w||d.deltaY<0&&S)return}d.preventDefault(),i({type:"intent",source:"wheel",deltaX:d.deltaX,deltaY:d.deltaY,originalEvent:d})},s=d=>{if(!n)return;const m=d.touches[0];m&&(o.current={x:m.clientX,y:m.clientY})},y=d=>{if(!n)return;const m=d.touches[0];if(!m||!o.current)return;const p=o.current.x-m.clientX,w=o.current.y-m.clientY,S=d.target,b=l(S);if(b&&b!==t){const I=b.scrollTop<b.scrollHeight-b.clientHeight,N=b.scrollTop>0;if(w>0&&I||w<0&&N){o.current={x:m.clientX,y:m.clientY};return}}d.preventDefault(),o.current={x:m.clientX,y:m.clientY},i({type:"intent",source:"touch",deltaX:p,deltaY:w,originalEvent:d})},v=()=>{n&&(o.current=null)},h=d=>{const p=t.clientHeight*.9;let w=0,S=0;switch(d.key){case"ArrowDown":S=40;break;case"ArrowUp":S=-40;break;case"ArrowRight":w=40;break;case"ArrowLeft":w=-40;break;case"PageDown":S=p;break;case"PageUp":S=-p;break;case"Home":S=Number.NEGATIVE_INFINITY;break;case"End":S=Number.POSITIVE_INFINITY;break;case" ":S=d.shiftKey?-p:p;break;default:return}d.preventDefault(),i({type:"intent",source:"keyboard",deltaX:w,deltaY:S,originalEvent:d})};return t.addEventListener("wheel",f,{passive:!1}),t.addEventListener("touchstart",s,{passive:!0}),t.addEventListener("touchmove",y,{passive:!1}),t.addEventListener("touchend",v,{passive:!0}),t.addEventListener("keydown",h),()=>{t.removeEventListener("wheel",f),t.removeEventListener("touchstart",s),t.removeEventListener("touchmove",y),t.removeEventListener("touchend",v),t.removeEventListener("keydown",h)}},[e])},zt=({transition:e,orientation:t="vertical",throttleDuration:n=25})=>{const[o,r]=a.useState(0),[c,i]=a.useState(),l=a.useRef(!1),f=a.useRef(),s=a.useRef(0);a.useEffect(()=>{i(document);const h=document.documentElement.scrollTop;r(h),s.current=h},[]),a.useEffect(()=>{const h=()=>{l.current||r(document.documentElement.scrollTop)};return c==null||c.addEventListener("scroll",h),()=>{f.current&&clearTimeout(f.current),c==null||c.removeEventListener("scroll",h)}},[c]);const y=a.useRef(),v=a.useRef(null);return a.useEffect(()=>{const h=o;if(v.current&&(v.current.stop(),v.current=null),!l.current){y.current=h;return}return v.current=kt.animate(y.current??h,h,{duration:((e==null?void 0:e.duration)??500)/1e3,ease:(e==null?void 0:e.ease)??"easeOut",onUpdate:d=>{f.current&&clearTimeout(f.current),y.current=d;const m=document.documentElement,p=Math.round(d*1e3)/1e3,w=s.current;Math.abs(p-w)<.1||(s.current=p,l.current&&m.scrollTo({top:p}))},onComplete:()=>{f.current=setTimeout(()=>{l.current=!1},300),v.current=null}}),()=>{v.current&&(v.current.stop(),v.current=null)}},[o]),c?u.jsx(Tt,{touch:!1,el:c,onScroll:h=>{if("deltaY"in h&&h.deltaY!==0&&c&&o!==null){let d=o+h.deltaY;const m=c.querySelector("html");m&&(d=Math.min(d,m.scrollHeight-m.clientHeight)),d=Math.max(d,0),r(d),l.current=!0}}}):null},ie=({style:e,colorName:t,stateClassName:n="state-ripple-group",className:o})=>{const r=a.useRef(null),c=a.useRef(null),[i,l]=a.useState(!1),f=St({isClient:i,stateClassName:n,className:o,colorName:t});return a.useEffect(()=>{if(r.current&&n!=="state-layer"){const s=n.includes("[")?n.split("[")[1].split("]")[0]:"group",y=r.current.closest(`.${s}:not(.${s} .${s})`);c.current=y}l(!0)},[]),u.jsx("div",{ref:r,className:f.stateLayer,style:{"--state-color":`var(--default-color, var(--color-${t}))`,...e},children:i&&u.jsx(vt,{triggerRef:c})})},en=({isClient:e,stateClassName:t})=>({stateLayer:x([t,"w-full top-0 left-0 h-full absolute pointer-events-none overflow-hidden"])}),St=_("stateLayer",en),Et=({targetRef:e,children:t})=>{const[n,o]=a.useState(null),r=a.useRef(null),c=()=>{const i=e.current;if(!i)return;const l=i.getBoundingClientRect();o({position:"fixed",top:l.top,left:l.left,width:l.width,height:l.height,pointerEvents:"none",zIndex:999})};return a.useEffect(()=>{const i=e.current;if(i)return c(),window.addEventListener("scroll",c,!0),window.addEventListener("resize",c),r.current=new ResizeObserver(c),r.current.observe(i),()=>{var l;window.removeEventListener("scroll",c,!0),window.removeEventListener("resize",c),(l=r.current)==null||l.disconnect()}},[e]),n?We.createPortal(u.jsx("div",{style:n,children:t}),document.body):null};function tn(e){return/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(e)}const nn=({config:e,throttleDelay:t=100,onLoad:n,loadTheme:o=!1})=>{const[r,c]=a.useState(null);a.useEffect(()=>{(async()=>{const h=await me.loader(e,o);c(h)})()},[]);const[i,l]=a.useState(null),f=a.useRef(null),s=a.useRef(0),y=a.useRef(null);a.useEffect(()=>{if(!r)return;const h={...e,sourceColor:e.sourceColor},d=Date.now(),m=d-s.current,p=async w=>{await v(w)};if(s.current===0||m>=t)f.current&&(clearTimeout(f.current),f.current=null),y.current=null,s.current=d,p(h);else if(y.current=h,!f.current){const w=Math.max(0,t-m);f.current=setTimeout(async()=>{f.current=null;const S=y.current;y.current=null,S&&(s.current=Date.now(),await p(S))},w)}return()=>{}},[e,t,r]);const v=async h=>{if(typeof h.sourceColor=="string"&&!tn(h.sourceColor))throw new Error("Invalid hex color");if(!r)return;r.context.update(h),await r.load();const d=r==null?void 0:r.plugins.getPlugin(Fe.TailwindPlugin).getInstance().outputCss;l(d),n==null||n(r)};return a.useEffect(()=>()=>{f.current&&(clearTimeout(f.current),f.current=null)},[]),i?u.jsx("style",{dangerouslySetInnerHTML:{__html:i}}):null};function rn(){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 sn(){return typeof window>"u"||!("matchMedia"in window)?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches}function je(e){if(!(e instanceof HTMLElement))return!1;const t=e.classList;return Array.from(t).some(n=>n.startsWith("anim-")&&n.includes("scroll"))}function ke(e){if(!(e instanceof HTMLElement))return!1;const t=e.classList;return Array.from(t).some(n=>n.startsWith("anim-"))}function ge(e,t){if(!je(e))return;if(e.hasAttribute(`data-${t}-scroll`)){const i=(e.getAttribute(`data-${t}-scroll`)||"").trim().toLowerCase(),l=i==="x"||i==="inline"?"inline":i==="y"||i==="block"?"block":"auto";e.classList.contains(`${t}-timeline`)||e.classList.contains(`${t}-timeline-inline`)||e.classList.contains(`${t}-timeline-block`)||e.classList.contains(`${t}-timeline-x`)||e.classList.contains(`${t}-timeline-y`)||(l==="inline"?e.classList.add(`${t}-timeline-inline`):l==="block"?e.classList.add(`${t}-timeline-block`):e.classList.add(`${t}-scroll`))}const n=e.getAttribute(`data-${t}-start`);n&&e.style.setProperty(`--${t}-range-start`,n);const o=e.getAttribute(`data-${t}-end`);o&&e.style.setProperty(`--${t}-range-end`,o);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 be(e=document,t){return Array.from(e.querySelectorAll(`[class*="${t}-"][class*="-scroll"]`)).filter(o=>je(o))}function on(e=document,t){const n=Array.from(e.querySelectorAll(`[class*="${t}-"]`)),o=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(f=>f.startsWith(`${t}-`)&&!f.includes("scroll")&&!o.has(f))?!0:!je(r)})}function an(e,t){return Array.from(e).some(n=>n.startsWith(t)&&n.includes("-out"))}function Re(e,t,n){e.setAttribute(`data-${t}-run`,""),e.setAttribute(`data-${t}-${n}-run`,"")}function $e(e,t,n){const o=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=o}const ln=[0,.2],Ae=new WeakSet;function Be(e,t){if(Ae.has(e))return;Ae.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`,"")},o=r=>{r.target===e&&e.removeAttribute(`data-${t}-animating`)};e.addEventListener("animationstart",n),e.addEventListener("animationend",o),e.addEventListener("animationcancel",o)}function Ie(e={}){const{prefix:t="anim",once:n=!0}=e;if(sn())return()=>{};const o=rn(),r=new WeakSet;let c=typeof window<"u"&&(window.pageYOffset||window.scrollY)||0,i=!0;const l=()=>{const d=window.pageYOffset||window.scrollY||0;i=d>=c,c=d};typeof window<"u"&&window.addEventListener("scroll",l,{passive:!0});const f=new IntersectionObserver(d=>{for(const m of d){const p=m.target;if(!ke(p)||p.hasAttribute(`data-${t}-animating`))continue;const w=an(p.classList,t);m.isIntersecting?(w&&$e(p,t,"out"),Re(p,t,"in"),n&&f.unobserve(p)):n||(i||$e(p,t,"in"),w&&Re(p,t,"out"))}},{threshold:ln}),s=d=>{const m=on(d||document,t);for(const p of m)r.has(p)||(r.add(p),f.observe(p),Be(p,t))};s();let y,v=null,h=null;if(o)(()=>{h==null&&(h=requestAnimationFrame(()=>{h=null;const m=be(void 0,t);for(const p of m)ge(p,t)}))})(),v=new MutationObserver(m=>{for(const p of m)if(p.type==="attributes"){const w=p.target;w instanceof HTMLElement&&(ge(w,t),ke(w)&&(r.has(w)||(r.add(w),f.observe(w),Be(w,t))))}else if(p.type==="childList"&&p.addedNodes&&p.addedNodes.length){for(const w of Array.from(p.addedNodes))if(w instanceof HTMLElement){const S=be(w,t);for(const b of S)ge(b,t);s(w)}}}),v.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`]}),y=()=>{h!=null&&cancelAnimationFrame(h),v&&v.disconnect()};else{let d;be(void 0,t).length>0&&Promise.resolve().then(()=>require("./scrollDriven-DWAu7CR0.cjs")).then(p=>{d=p.initScrollViewFallback({once:n})}),y=()=>{typeof d=="function"&&d()}}return()=>{y&&y(),typeof window<"u"&&window.removeEventListener("scroll",l),f.disconnect()}}const cn=Ie,un=Ie;function dn(e){const t={primary:"filled",secondary:"tonal"};return e&&e in t?t[e]:e||"filled"}const Ce=({variant:e="filled",disabled:t=!1,icon:n,href:o,label:r,disableTextMargins:c,className:i,iconPosition:l="left",loading:f=!1,shape:s="rounded",onClick:y,onToggle:v,activated:h,ref:d,size:m="medium",allowShapeTransformation:p=!0,transition:w,children:S,...b})=>{if(S&&(r=S),!r)throw new Error("Button component requires either a label prop or children content");e=dn(e);const I=o?"a":"button",N=a.useRef(null),A=d||N,[E,V]=a.useState(h);a.useEffect(()=>{V(h)},[h]),w={duration:.3,...w};let D;v?v&&(D=j=>{t&&j.preventDefault();const F=!E;V(F),v(F)}):D=j=>{t&&j.preventDefault(),y&&y(j)};const k=Ye({allowShapeTransformation:p,size:m,disableTextMargins:c,shape:s,href:o,disabled:t,icon:n,iconPosition:l,loading:f,variant:e,transition:w,className:i,isActive:E??!1,onToggle:v,activated:E,label:r,children:r}),g=n?u.jsx(re,{icon:n,className:k.icon}):u.jsx(u.Fragment,{});return u.jsxs(I,{ref:A,href:o,className:k.button,...b,onClick:D,disabled:t,"aria-pressed":v?E:void 0,style:{transition:w.duration+"s"},children:[u.jsx("div",{className:k.touchTarget}),u.jsx(ie,{style:{transition:w.duration+"s"},className:k.stateLayer,colorName:x(e==="filled"&&{"on-surface-variant":!E&&!!v,"on-primary":E||!v},e==="elevated"&&{"on-primary":E&&!!v,primary:!E||!v},e==="tonal"&&{"on-secondary":E&&!!v,"on-secondary-container":!E||!v},e==="outlined"&&{"inverse-on-surface":E&&!!v,"on-surface-variant":!E||!v},e==="text"&&"primary"),stateClassName:"state-ripple-group-[button]"}),l==="left"&&g,f&&u.jsx("div",{className:"!absolute left-1/2 -translate-x-1/2 top-1/2 -translate-y-1/2",children:u.jsx(wt,{className:()=>({progressIndicator:"h-6 w-6",activeIndicator:x({"!stroke-primary":e==="elevated"&&!t,"!stroke-on-surface/[38%]":e==="elevated"&&t},{"!stroke-on-primary":e==="filled"&&!t,"!stroke-on-surface/[38%]":e==="filled"&&t},{"!stroke-on-secondary-container":e==="tonal"&&!t,"!stroke-on-surface/[38%]":e==="tonal"&&t},{"!stroke-primary":e==="outlined"&&!t,"!stroke-on-surface/[38%]":e==="outlined"&&t},{"!stroke-primary":e==="text"&&!t,"!stroke-on-surface/[38%]":e==="text"&&t})}),variant:"circular-indeterminate"})}),u.jsx("span",{className:k.label,children:r}),l==="right"&&g]})},fn=({variant:e="outlined",className:t,children:n,isInteractive:o=!1,ref:r,...c})=>{const i=qe({className:t,isInteractive:o,variant:e,children:n}),l=a.useRef(null),f=r||l;return u.jsxs("div",{...c,ref:f,className:i.card,children:[o&&u.jsx(ie,{className:i.stateLayer,colorName:"on-surface",stateClassName:"state-ripple-group-[card]"}),n]})},ce=(e,t,n=[0,1])=>{const[o,r]=t,[c,i]=n,f=(Math.max(o,Math.min(e,r))-o)/(r-o);return c+f*(i-c)},Lt=({className:e,children:t,width:n,index:o=0,outputRange:r,ref:c,...i})=>{const l=a.useRef(null),f=c||l,s=Xe({className:e,index:o,width:n,children:t,outputRange:r});return u.jsx("div",{ref:f,style:{width:n+"px",maxWidth:r[1]+"px",minWidth:r[0]+"px",willChange:"width"},transition:{duration:.5,ease:"linear"},className:s.carouselItem,...i,children:t})},mn=({variant:e="hero",className:t,children:n,ref:o,marginPourcent:r=0,inputRange:c=[.21,.65],outputRange:i=[42,300],gap:l=8,onChange:f,onMetricsChange:s,index:y,scrollSensitivity:v=1.25,...h})=>{const d=a.useRef(null),m=o||d,[p,w]=a.useState(0),S=Ke({index:y,className:t,children:n,variant:e,inputRange:c,outputRange:i,marginPourcent:r,onChange:f,gap:l,scrollSensitivity:v,onMetricsChange:s}),b=a.Children.toArray(n).filter(L=>a.isValidElement(L)&&L.type===Lt),I=a.useRef(null),[N,A]=a.useState({}),[E,V]=a.useState(null),D=a.useRef(0),k=a.useRef(null),g=()=>{var le,ue;if(!I.current||!m.current||(E==null?void 0:E.scrollProgress)===void 0)return[];const L=(E==null?void 0:E.scrollVisible)??((le=m.current)==null?void 0:le.clientWidth)??0;function $(P,G){return P.map((Q,de)=>{const ve=(Q-G)/Math.abs(P[1]-P[0]);return{itemScrollXCenter:Q,relativeIndex:ve,index:de,width:0}})}const W=b.map((P,G)=>{if(!j[G].current||!I.current)return 0;const de=G/(b.length-1);return ce(de,[0,1],[0,1])}),Y=$(W,(E==null?void 0:E.scrollProgress)??0).sort((P,G)=>P.index-G.index);let H=(((ue=m.current)==null?void 0:ue.clientWidth)??L)+l+i[0]+l;const z=Y.sort((P,G)=>Math.abs(P.relativeIndex)-Math.abs(G.relativeIndex)).map((P,G)=>{if(!(H<=0)){if(G==0&&X(P.index),P.width=ce(H-l,[i[0],i[1]],[i[0],i[1]]),H-=P.width+l,H!=0&&H<(i[0]+l)*2){const Q=P.width-((i[0]+l)*2-H);H+=P.width,P.width=Q,H-=P.width}else if(H==0&&P.width>=i[0]*2+l){const Q=P.width-(i[0]+l-H);H+=P.width,P.width=Q,H-=P.width}return P}}).filter(Boolean),ne=z.reverse(),ae=[...z].sort((P,G)=>Math.abs(P.index)-Math.abs(G.index));ne.forEach((P,G)=>{const Q=ne[G+1];if(!Q)return;const de=1-(Math.abs(P.relativeIndex)-Math.abs(Q==null?void 0:Q.relativeIndex)),ve=ce(de,[0,2],[P.width+H,Q.width]);H+=P.width,P.width=ve,H-=P.width});const se=z.length/2,ee=ce(Math.abs(ae[0].relativeIndex),[ae[0].index==0?0:se-1,se],[0,1]),we=ce(ee,[0,1],[0,1])*-(i[0]+l);return w(we),Object.fromEntries(z.map(P=>[P.index,P.width]))},j=a.useRef([]).current,[F,X]=a.useState(0);a.useEffect(()=>{f&&f(F)},[F]),a.useEffect(()=>{typeof y=="number"&&b.length>0&&y!==F&&Z(y)},[y,b.length]),a.useEffect(()=>{U(F)},[F]),j.length!==b.length&&b.forEach((L,$)=>{j[$]||(j[$]=a.createRef())});const[T,U]=a.useState(0),Z=(L,$={})=>{if(!b.length)return 0;const W=j[L];if(!W||!W.current||!I.current)return 0;const Y=ce(L/Math.max(1,b.length-1),[0,1],[0,1]);return U(L),I.current.dispatchEvent(new CustomEvent("udx:customScroll:set",{bubbles:!0,detail:{progress:Y,orientation:"horizontal",animate:$.animate!==!1}})),Y},R=b.map((L,$)=>{var z;const W=(z=L.props)==null?void 0:z.onClick,Y=ne=>{W==null||W(ne)},H=()=>U($);return a.cloneElement(L,{width:N[$],outputRange:i,ref:j[$],key:$,index:$,role:"option","aria-selected":F===$,tabIndex:F===$?0:-1,onClick:Y,onFocus:H})}),C=L=>{var $;if(L.scrollTotal>0){($=k.current)==null||$.stop();const W=D.current??0,Y=L.scrollProgress??0;k.current=B.animate(W,Y,{type:"spring",stiffness:260,damping:32,mass:.6,restDelta:5e-4,onUpdate:H=>{D.current=H,V({...L,scrollProgress:H})}})}};a.useEffect(()=>{const L=g();A(L)},[E]);const O=a.useRef(s);a.useEffect(()=>{O.current=s},[s]);const q=a.useRef(null);a.useEffect(()=>{var G;const L=O.current;if(!L||!(m!=null&&m.current))return;const $=b.length;if($<=0)return;const W=((G=m.current)==null?void 0:G.clientWidth)??0,Y=i[1],H=D.current??(E==null?void 0:E.scrollProgress)??0,z=(W+l)/(Y+l),ne=Math.max(1,Math.floor(z)),ae=Math.max(1,Math.round(ne*(2/3))),se=Math.min(Math.max(0,F),Math.max(0,$-1)),ee=se>0,we=se<$-1,le={total:$,selectedIndex:se,visibleApprox:z,visibleFull:ne,stepHalf:ae,canPrev:ee,canNext:we,scrollProgress:H,viewportWidth:W,itemMaxWidth:Y,gap:l},ue=q.current;let P=!ue;if(!P){for(const Q in le)if(le[Q]!==ue[Q]){P=!0;break}}P&&(q.current=le,L(le))},[m,b.length,F,E,l,i]),a.useEffect(()=>()=>{var L;(L=k.current)==null||L.stop()},[]);const[te,oe]=a.useState(0);a.useLayoutEffect(()=>{let L=i[1];E&&L>E.scrollVisible&&(L=E.scrollVisible);const $=(L+l)*R.length/v;oe($)},[m,j,E]);const M=L=>{if(!b.length)return;const $=T??F;switch(L.key){case"ArrowLeft":L.preventDefault(),Z(Math.max(0,$-1));break;case"ArrowRight":L.preventDefault(),Z(Math.min(b.length-1,$+1));break;case"Home":L.preventDefault(),Z(0);break;case"End":L.preventDefault(),Z(b.length-1);break;case"Enter":case" ":L.preventDefault(),Z($);break}};return a.useEffect(()=>{const L=m.current;if(!L)return;const $=W=>{const Y=W.detail;Y&&typeof Y.index=="number"&&Z(Y.index)};return L.addEventListener("udx:carousel:centerIndex",$),()=>{L.removeEventListener("udx:carousel:centerIndex",$)}},[m,b.length]),u.jsx("div",{className:S.carousel,ref:m,role:"listbox","aria-orientation":"horizontal",onKeyDown:M,...h,children:u.jsx(bt,{draggable:!0,orientation:"horizontal",onScroll:C,scrollSize:te,children:u.jsx("div",{className:S.track,ref:I,style:{gap:`${l}px`,translate:p,willChange:"translate"},children:R})})})},Nt=({orientation:e="horizontal",className:t,...n})=>{const o=Je({orientation:e,className:t});return u.jsx("hr",{className:o.divider,...n})},J=[];for(let e=0;e<256;++e)J.push((e+256).toString(16).slice(1));function hn(e,t=0){return(J[e[t+0]]+J[e[t+1]]+J[e[t+2]]+J[e[t+3]]+"-"+J[e[t+4]]+J[e[t+5]]+"-"+J[e[t+6]]+J[e[t+7]]+"-"+J[e[t+8]]+J[e[t+9]]+"-"+J[e[t+10]]+J[e[t+11]]+J[e[t+12]]+J[e[t+13]]+J[e[t+14]]+J[e[t+15]]).toLowerCase()}let Se;const pn=new Uint8Array(16);function yn(){if(!Se){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Se=crypto.getRandomValues.bind(crypto)}return Se(pn)}const xn=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Pe={randomUUID:xn};function ye(e,t,n){var r;if(Pe.randomUUID&&!e)return Pe.randomUUID();e=e||{};const o=e.random??((r=e.rng)==null?void 0:r.call(e))??yn();if(o.length<16)throw new Error("Random bytes length must be >= 16");return o[6]=o[6]&15|64,o[8]=o[8]&63|128,hn(o)}const Me=({variant:e="plain",buttons:t,className:n,children:o,title:r,text:c,position:i,targetRef:l,ref:f,trigger:s=["hover","focus"],...y})=>{if(!o&&!l)throw new Error("ToolTip must have a child or a targetRef");Array.isArray(s)||(s=[s]),t&&!Array.isArray(t)&&(t=[t]);const v=a.useRef(null),h=l||v,[d,m]=a.useState(null),[p]=a.useState(ye()),[w,S]=a.useState(!1),b=a.useRef(null);a.useEffect(()=>{const g=j=>{m(j.detail)};return document.addEventListener("tooltip-update",g),()=>{document.removeEventListener("tooltip-update",g)}},[]),a.useEffect(()=>{b.current&&clearTimeout(b.current),d?S(d===p):b.current=setTimeout(()=>{S(!1)},1200)},[d,p]);const I=()=>{if(s.includes("hover")){const g=new CustomEvent("tooltip-update",{detail:p});document.dispatchEvent(g)}},N=()=>{if(s.includes("hover")){const g=new CustomEvent("tooltip-update",{detail:null});document.dispatchEvent(g)}},A=()=>{if(s.includes("click")){const g=new CustomEvent("tooltip-update",{detail:w?null:p});document.dispatchEvent(g)}},E=()=>{if(s.includes("focus")){const g=new CustomEvent("tooltip-update",{detail:p});document.dispatchEvent(g)}},V=()=>{if(s.includes("focus")){const g=new CustomEvent("tooltip-update",{detail:null});document.dispatchEvent(g)}};a.useEffect(()=>{if(h!=null&&h.current){const g=h.current;return g.addEventListener("mouseenter",I),g.addEventListener("mouseleave",N),g.addEventListener("click",A),g.addEventListener("focus",E),g.addEventListener("blur",V),()=>{g.removeEventListener("mouseenter",I),g.removeEventListener("mouseleave",N),g.removeEventListener("click",A),g.removeEventListener("focus",E),g.removeEventListener("blur",V)}}},[h,s,p,w]);const D=!l&&a.isValidElement(o)?a.cloneElement(o,{ref:v}):o;if(!i&&typeof window<"u"&&h!=null&&h.current&&!i){const g=h.current.getBoundingClientRect(),j=window.innerWidth,F=window.innerHeight,X=g.left/j,T=g.top/F;e==="plain"?X<1/3?i="right":X>2/3?i="left":i=T>.5?"top":"bottom":X<1/2&&T<1/2?i="bottom-right":X>1/2&&T<1/2?i="bottom-left":X>1/2&&T>1/2?i="top-left":X<1/2&&T>1/2&&(i="top-right")}const k=xt({variant:e,buttons:t,className:n,title:r,text:c,position:i,trigger:s,targetRef:l,children:o});return u.jsxs(u.Fragment,{children:[D,u.jsx(B.AnimatePresence,{children:w&&u.jsx(Et,{targetRef:h,children:u.jsx(B.motion.div,{initial:{opacity:d?1:0},animate:{opacity:1},transition:{duration:d?0:.3},exit:{opacity:d?1:0},className:k.toolTip,...y,onMouseEnter:I,onMouseLeave:N,children:u.jsxs(B.motion.div,{className:k.container,layoutId:"tool-tip",transition:{type:"spring",stiffness:200,damping:20},children:[r&&u.jsx("div",{className:k.subHead,children:r}),u.jsx("div",{className:k.supportingText,children:c}),t&&u.jsx("div",{className:k.actions,children:Array.isArray(t)&&t.map((g,j)=>u.jsx(Ce,{size:"small",variant:"text",...g},j))})]})})})})]})},he=({className:e,label:t,variant:n="primary",size:o="medium",href:r,type:c,icon:i,extended:l=!1,ref:f,transition:s,children:y,...v})=>{if(y&&(t=y),!t)throw new Error("FAB component requires either a label prop or children content");const h=r?"a":"button",d=Qe({href:r,icon:i,extended:l,label:t,size:o,variant:n,className:e,transition:s,children:t});s={duration:.3,...s};const m=a.useRef(null),p=f||m,w={visible:{width:"auto",marginLeft:12,opacity:1,transition:{...s,opacity:{duration:s.duration/2,delay:s.duration-s.duration/2}}},hidden:{width:0,marginLeft:0,opacity:0,transition:{...s,marginLeft:{duration:s.duration/2,delay:s.duration-s.duration/2}}}};return u.jsxs(h,{...v,ref:p,href:r,"aria-label":l?void 0:t,className:d.fab,children:[u.jsx(Me,{trigger:l?null:void 0,text:t,targetRef:p}),u.jsx(ie,{style:{transition:s.duration+"s"},className:d.stateLayer,colorName:x({"on-primary":n=="primary","on-secondary":n=="secondary","on-tertiary":n=="tertiary","on-primary-container":n=="primaryContainer","on-secondary-container":n=="secondaryContainer","on-tertiary-container":n=="tertiaryContainer"}),stateClassName:"state-ripple-group-[fab]"}),u.jsx(re,{icon:i,className:d.icon}),u.jsx(B.AnimatePresence,{children:l&&u.jsx(B.motion.span,{variants:w,initial:"hidden",animate:"visible",exit:"hidden",className:d.label,children:t})})]})},fe=({variant:e="standard",href:t,disabled:n=!1,type:o="button",title:r,label:c,onToggle:i,activated:l=!1,onClick:f,icon:s,size:y="medium",iconSelected:v,className:h,ref:d,width:m="default",shape:p="rounded",allowShapeTransformation:w=!0,transition:S,children:b,...I})=>{if(b&&(c=b),!c)throw new Error("IconButton component requires either a label prop or children content to provide an accessible aria-label");r||(r=c);const[N,A]=a.useState(l);let E;i?i&&(E=j=>{n&&j.preventDefault(),A(!N),i(!!N)},s=N&&v||s):E=j=>{n&&j.preventDefault(),f&&f(j)},a.useEffect(()=>{A(l)},[l]);const V=t?"a":"button",D=tt({transition:S,shape:p,allowShapeTransformation:w,width:m,href:t,activated:N,label:c,iconSelected:v,isActive:N,onToggle:i,disabled:n,icon:s,variant:e,className:h,size:y,children:c,...I}),k=a.useRef(null),g=d||k;return S={duration:.3,...S},u.jsxs(V,{disabled:n,href:t,style:{transition:S.duration+"s"},className:D.iconButton,"aria-label":c,...I,title:void 0,onClick:E,ref:g,children:[u.jsx(Me,{targetRef:g,trigger:n?null:void 0,text:r}),u.jsx("div",{className:D.touchTarget}),u.jsx(ie,{style:{transition:S.duration+"s"},className:D.stateLayer,colorName:x(e==="standard"&&{"on-surface-variant":!N,"on-primary":N},e==="filled"&&{"on-surface-variant":!N&&!!i,"on-primary":N||!i},e==="tonal"&&{"on-secondary":N&&!!i,"on-secondary-container":!N||!i},e==="outlined"&&{"inverse-on-surface":N&&!!i,"on-surface-variant":!N||!i}),stateClassName:"state-ripple-group-[icon-button]"}),s&&u.jsx(re,{icon:s,className:D.icon})]})};/*!
2
2
  * Font Awesome Free 7.1.0 by @fontawesome - https://fontawesome.com
3
3
  * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
4
4
  * Copyright 2025 Fonticons, Inc.
5
- */var wn={prefix:"fas",iconName:"circle-exclamation",icon:[512,512,["exclamation-circle"],"f06a","M256 512a256 256 0 1 1 0-512 256 256 0 1 1 0 512zm0-192a32 32 0 1 0 0 64 32 32 0 1 0 0-64zm0-192c-18.2 0-32.7 15.5-31.4 33.7l7.4 104c.9 12.6 11.4 22.3 23.9 22.3 12.6 0 23-9.7 23.9-22.3l7.4-104c1.3-18.2-13.1-33.7-31.4-33.7z"]},we={prefix:"fas",iconName:"xmark",icon:[384,512,[128473,10005,10006,10060,215,"close","multiply","remove","times"],"f00d","M55.1 73.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L147.2 256 9.9 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192.5 301.3 329.9 438.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.8 256 375.1 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192.5 210.7 55.1 73.4z"]},vn=we,gn={prefix:"fas",iconName:"bars",icon:[448,512,["navicon"],"f0c9","M0 96C0 78.3 14.3 64 32 64l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 128C14.3 128 0 113.7 0 96zM0 256c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 288c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32L32 448c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"]};const bn=({className:e,label:t,variant:n="primary",size:o="medium",href:r,icon:c,extended:i=!1,ref:l,transition:f,children:s,open:y,defaultOpen:v=!1,onOpenChange:h,...d})=>{f={duration:.3,ease:"easeInOut",...f};const m=a.useRef(null),p=l||m,w=typeof y=="boolean",[S,b]=a.useState(v),I=w?y:S,N=j=>{w||b(j),h==null||h(j)},B=a.Children.toArray(s).filter(j=>a.isValidElement(j)&&j.type===he),E=ze({href:r,icon:c,extended:i,label:t,size:o,variant:n,className:e,transition:f,children:t,open:I}),V=A.motion.create(pe),D=A.motion.create(fe);A.motion.create(he);const k=j=>u.jsx(V,{icon:c,extended:i,label:t,variant:n+"Container",size:o,className:E.fab+" "+(e??""),"aria-expanded":I,onClick:()=>N(!0),style:{transition:"border-radius 0.3s ease-in-out"},transition:{duration:f.duration,ease:"easeInOut",borderRadius:{duration:f.duration,ease:"easeInOut"},background:{duration:f.duration,ease:"easeInOut"},...f},...j}),[g]=a.useState(xe());return u.jsxs("div",{className:E.fabMenu,ref:p,...d,children:[u.jsx(A.AnimatePresence,{children:I&&u.jsx("div",{className:E.actions,role:"menu","aria-hidden":!I,children:(()=>{const j=B.length;return B.map((F,X)=>{F.props;const T=j-1-X,U=((f==null?void 0:f.delay)??0)+T*.06,Z={open:{overflow:"visible",opacity:1,width:"auto",transition:{...f,delay:U,opacity:{delay:(f==null?void 0:f.duration)/2+U}}},close:{overflow:"hidden",opacity:0,width:0,transition:{...f,delay:U,opacity:{duration:(f==null?void 0:f.duration)/1.5}}}};return u.jsx(A.motion.div,{initial:"close",animate:"open",variants:Z,transition:f,exit:"close",children:a.cloneElement(F,{key:X,shape:"rounded",variant:"filled",className:()=>({button:x("max-w-full overflow-hidden",{"px-0":!I,"bg-primary-container text-on-primary-container ":n==="primary","bg-secondary-container text-on-secondary-container":n==="secondary","bg-tertiary-container text-on-tertiary-container":n==="tertiary"}),stateLayer:x({"state-on-primary-container":n==="primary","state-on-secondary-container":n==="secondary","state-on-tertiary-container":n==="tertiary"})})})})})})()})}),k({className:"invisible pointer-events-none"}),u.jsxs("div",{className:"absolute right-0 top-0",children:[!I&&k({className:"",layout:!0,layoutId:"fab-menu"+g}),I&&u.jsx(u.Fragment,{children:u.jsx(D,{layout:!0,layoutId:"fab-menu"+g,variant:"filled",className:()=>({iconButton:x("",{"bg-primary text-on-primary":n==="primary","bg-secondary text-on-secondary":n==="secondary","bg-tertiary text-on-tertiary":n==="tertiary"}),stateLayer:x({"[--default-color:var(--color-on-primary)]":n==="primary","[--default-color:var(--color-on-secondary)]":n==="secondary","[--default-color:var(--color-on-tertiary)]":n==="tertiary"})}),style:{transition:"border-radius 0.3s ease-in-out"},transition:{duration:f.duration,ease:"easeInOut",borderRadius:{duration:f.duration,ease:"easeInOut"},background:{duration:f.duration,ease:"easeInOut"},...f},icon:vn,onClick:()=>N(!1),children:"Close"})})]})]})},Sn=({className:e,valueFormatter:t,step:n=10,name:o,value:r=0,min:c=0,max:i=100,marks:l=[{value:0,label:"0"},{value:100,label:"100"}],ref:f,onChange:s,...y})=>{const v=R=>{const C=d(),O=h();return R===1/0?100:R===-1/0?0:(R-C)/(O-C)*100},h=(R=!1)=>R?i:i==1/0?l[(l==null?void 0:l.length)-1].value:i,d=(R=!1)=>R?c:c==-1/0?l[0].value:c,m=R=>{const C=d(!1);return(h(!1)-C)*R/100+C},[p,w]=a.useState(!1),S=a.useRef(null),b=f||S,[I,N]=a.useState(r),[B,E]=a.useState(v(r)),[V,D]=a.useState(!1),k=R=>{D(!0),w(!0),F(R)},g=()=>{D(!1),w(!1)};a.useEffect(()=>(V?(window.addEventListener("mouseup",g),window.addEventListener("mousemove",F),window.addEventListener("touchend",g),window.addEventListener("touchmove",F)):(window.removeEventListener("mouseup",g),window.removeEventListener("mousemove",F),window.removeEventListener("touchend",g),window.removeEventListener("touchmove",F)),()=>{window.removeEventListener("mouseup",g),window.removeEventListener("mousemove",F),window.removeEventListener("touchend",g),window.removeEventListener("touchmove",F)}),[V]);const j=ot({className:e,isChanging:p,marks:l,max:i,min:c,name:o,step:n,value:I,valueFormatter:t,onChange:s}),F=R=>{const C=b==null?void 0:b.current;if(C){const O=C.getBoundingClientRect().left,te=((R.type==="touchmove"||R.type==="touchstart"?R.touches[0].clientX:R.clientX)-O)/C.offsetWidth*100;X({percent:te})}},X=({percent:R,value:C})=>{if(R){if(R>=100){N(h(!0)),E(100);return}if(R<=0){N(d(!0)),E(0);return}C=m(R),C==d()&&(C=d(!0)),C==h()&&(C=h(!0))}else if(C!=null){if(C>=h()){N(h(!0)),E(100);return}if(C<=d()){N(d(!0)),E(0);return}R=v(C)}else return;n!=null?C=Math.round((C-d())/n)*n+d():l&&(C=l.reduce((O,q,te)=>{let oe=q.value===1/0?h():q.value===-1/0?d():q.value,M=O.value===1/0?h():O.value===-1/0?d():O.value;return oe=Math.abs(oe-C),M=Math.abs(M-C),oe<M?q:O}).value),C>=h()&&(C=h(!0)),C<=d()&&(C=d(!0)),R=v(C),N(C),E(R),s&&s(C)},[T,U]=a.useState(0);a.useEffect(()=>{const R=()=>{b.current&&U(b.current.offsetWidth)};return R(),window.addEventListener("resize",R),()=>{window.removeEventListener("resize",R)}},[]);const Z=R=>{switch(R.key){case"ArrowRight":if(n)X({value:I+n});else if(l){const C=l.find(O=>O.value>I);C&&X({value:C.value})}break;case"ArrowLeft":if(n)X({value:I-n});else if(l){const C=l.slice(0).reverse().find((O,q,te)=>I===1/0?q===1:O.value<I);C&&X({value:C.value})}break;default:return}};return u.jsxs("div",{tabIndex:0,onKeyDown:Z,role:"slider","aria-valuemin":d(!0),"aria-valuemax":h(!0),"aria-valuenow":I,"aria-valuetext":I.toString(),className:j.slider,onMouseDown:k,onClick:F,ref:b,onTouchStart:k,onDragStart:R=>R.preventDefault(),...y,children:[u.jsx("input",{type:"hidden",name:o,value:I}),u.jsx("div",{className:j.activeTrack,style:{flex:B/100}}),u.jsx("div",{className:j.handle,children:u.jsx(A.AnimatePresence,{children:p&&u.jsx(A.motion.div,{className:j.valueIndicator,initial:"hidden",animate:"visible",exit:"hidden",style:{translate:"-50%",transformOrigin:"center bottom",textWrap:"nowrap"},variants:{visible:{opacity:1,scale:1},hidden:{opacity:1,scale:0}},transition:{duration:.1},children:t?t(I):I})})}),u.jsx("div",{className:j.inactiveTrack,style:{flex:1-B/100}}),u.jsx("div",{className:"w-[calc(100%-12px)] h-full absolute -translate-x-1/2 transform left-1/2",children:l&&l.map((R,C)=>{let O=null;const q=(p?9:10)/T*100,te=v(R.value);return te<=B-q?O=!0:te>=B+q&&(O=!1),u.jsx("div",{className:x(j.dot,{"bg-primary-container":O!=null&&O,"bg-primary":O!=null&&!O}),style:{left:`${v(R.value)}%`}},C)})})]})},En=({variant:e="standard",className:t,children:n,title:o,position:r="right",extended:c,divider:i,onExtendedChange:l,closeIcon:f=we,transition:s,...y})=>{s={duration:.3,...s};const[v,h]=a.useState(c??!0),d=st({transition:s,title:o,position:r,closeIcon:f,className:t,children:n,onExtendedChange:l,divider:i,isExtended:v,extended:v,variant:e});a.useEffect(()=>{l==null||l(v??!1)},[v]),a.useEffect(()=>{c!=null&&h(c)},[c]);const m={close:{width:0},open:{width:"auto"}},p=()=>u.jsxs(u.Fragment,{children:[u.jsx(A.AnimatePresence,{children:e=="modal"&&v&&u.jsx(A.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:s,onClick:()=>h(!1),className:d.overlay})}),u.jsx(A.AnimatePresence,{children:v&&u.jsxs("div",{...y,className:d.sideSheet,style:{transition:s.duration+"s"},children:[u.jsxs(A.motion.div,{variants:m,initial:c===!1?"open":"close",animate:"open",exit:"close",className:d.container,children:[u.jsxs("div",{className:d.header,children:[o&&u.jsx("p",{className:d.title,children:o}),u.jsx(fe,{size:"small",label:"close",icon:f,onClick:()=>h(!1),className:d.closeButton})]}),u.jsx("div",{className:d.content,style:{transition:s.duration+"s"},children:n})]}),(i==null&&e=="standard"?!0:i)&&u.jsx(Nt,{className:d.divider,orientation:"vertical"})]})})]});return e=="modal"?We.createPortal(p(),document.body):p()},Ln=({message:e,className:t,duration:n,closeIcon:o=we,onClose:r,...c})=>{const[i,l]=a.useState(!0),f=lt({className:t,closeIcon:o,duration:n,isVisible:i,onClose:r,message:e});a.useEffect(()=>{n&&setTimeout(()=>{s()},n)},[n]);const s=()=>{l(!1),r==null||r()};return u.jsx(A.AnimatePresence,{children:i&&u.jsx(A.motion.div,{initial:{height:0},animate:{height:"auto"},exit:{height:0},transition:{duration:.1},className:f.snackbar,...c,children:u.jsxs("div",{className:f.container,children:[u.jsx("p",{className:f.supportingText,children:e}),u.jsx(fe,{onClick:()=>s(),className:f.icon,icon:o,label:"close the snackbar"})]})})})},Nn=({selected:e=!1,className:t,activeIcon:n,disabled:o=!1,inactiveIcon:r,onChange:c,onClick:i,onKeyDown:l,ref:f,...s})=>{const[y,v]=a.useState(e),h=b=>{o||(m(),i&&i(b))},d=b=>{o||((b.key===" "||b.key==="Enter")&&(b.preventDefault(),m()),l&&l(b))},m=()=>{v(!y),c==null||c(!y)},p=it({className:t,isSelected:y,activeIcon:n,inactiveIcon:r,disabled:o,selected:y,onChange:c}),w=a.useRef(null),S=f||w;return u.jsxs(A.motion.div,{role:"switch","aria-checked":y,tabIndex:o?-1:0,onKeyDown:d,onClick:h,ref:S,className:p.switch,...s,children:[u.jsx("input",{type:"hidden",value:y?"1":"0"}),u.jsxs(A.motion.div,{layout:!0,style:{translate:y?"50%":"-50%"},transition:{type:"spring",stiffness:700,damping:30},className:p.handleContainer,children:[u.jsx("div",{className:p.handle,children:(y?n:r)&&u.jsx(re,{className:p.icon,icon:y?n:r})}),u.jsx("div",{className:p.handleStateLayer})]})]})},jt=({className:e,onClick:t,label:n,variant:o="primary",href:r,icon:c,selectedTab:i,setSelectedTab:l,tabsId:f,index:s,onTabSelected:y,scrollable:v=!1,selected:h=!1,ref:d,...m})=>{const p=a.useRef(null),w=d||p,[S,b]=a.useState(h);a.useEffect(()=>{h&&i==null?b(!0):b(i==s&&s!=null)},[i]),a.useEffect(()=>{i==s&&y&&y({ref:w,index:s||0,label:n,icon:c})},[i]);const I=r?"a":"button",N=E=>{l&&l(s??null),t&&t(E)},B=dt({className:e,onTabSelected:y,scrollable:v,selectedTab:i,index:s,tabsId:f,selected:S,variant:o,icon:c,label:n,isSelected:S,setSelectedTab:l,href:r});return u.jsxs(I,{...m,role:"tab","aria-selected":S,ref:w,href:r,className:B.tab,onClick:N,...m,children:[u.jsx(ie,{style:{transition:.3+"s"},className:B.stateLayer,colorName:o==="primary"&&S?"primary":"on-surface",stateClassName:"state-ripple-group-[tab]"}),u.jsxs("span",{className:B.content,children:[c&&u.jsx(re,{icon:c,className:B.icon}),u.jsx("span",{className:B.label,children:n}),S&&u.jsx(A.motion.span,{layoutId:`underline-${f}`,className:B.underline,transition:{duration:.3}})]})]})},jn=({variant:e="primary",onTabSelected:t,children:n,className:o,selectedTab:r,setSelectedTab:c,scrollable:i=!1})=>{const[l,f]=a.useState(null);let s;r==0||r!=null?s=r:s=l;const y=c||f,v=a.Children.toArray(n).filter(w=>a.isValidElement(w)&&w.type===jt),h=a.useRef(null),d=w=>{if(t==null||t(w),i){const S=h.current,b=w.ref.current;if(S&&b){const I=b.offsetLeft+b.offsetWidth/2-S.offsetWidth/2;S.scrollTo({left:I,behavior:"smooth"})}}},m=a.useMemo(()=>xe(),[]),p=mt({children:n,onTabSelected:t,scrollable:i,selectedTab:s,setSelectedTab:y,className:o,variant:e});return u.jsx("div",{ref:h,role:"tablist",className:p.tabs,children:v.map((w,S)=>a.cloneElement(w,{key:S,index:S,variant:e,selectedTab:s,setSelectedTab:y,tabsId:m,onTabSelected:d,scrollable:i}))})},In=({variant:e="filled",disabled:t=!1,errorText:n,placeholder:o,suffix:r,name:c,label:i,className:l,supportingText:f,trailingIcon:s,leadingIcon:y,type:v="text",textLine:h="singleLine",autoComplete:d="on",onChange:m,value:p,showSupportingText:w=!1,...S})=>{const[b,I]=a.useState(p??""),[N,B]=a.useState(!1),[E,V]=a.useState(!1),[D,k]=a.useState(w);a.useEffect(()=>{I(p??"")},[p]),a.useEffect(()=>{n!=null&&n.length?V(!0):V(!1)},[n]),a.useEffect(()=>{w?k(w):f!=null&&f.length?k(!0):k(!1)},[D,f]),a.useEffect(()=>{N&&V(!1)},[N]);const g=a.useRef(null),j=()=>{g.current&&!N&&g.current.focus()},F=()=>{B(!0)},X=O=>{const q=O.target.value;I(q),V(!1),typeof m=="function"&&m(q)},T=()=>{B(!1)},U=pt({showSupportingText:D,isFocused:N,showErrorIcon:E,disabled:t,name:c,label:i,autoComplete:d,className:l,onChange:m,placeholder:o,supportingText:f,type:v,leadingIcon:y,trailingIcon:s,variant:e,errorText:n,value:b,suffix:r,textLine:h}),[Z]=a.useState(xe());let R,C;switch(h){case"multiLine":C=Rt,R={};break;case"textAreas":C="textarea",R={};break;case"singleLine":default:C="input",R={type:v};break}return u.jsxs("div",{className:U.textField,...S,children:[u.jsxs("fieldset",{onClick:j,className:U.content,children:[u.jsx("div",{className:U.stateLayer}),y&&u.jsx("div",{className:U.leadingIcon,children:a.isValidElement(y)?y:u.jsx(re,{className:"w-5 h-5",icon:y})}),!(!N&&!b.length||e=="filled")&&u.jsx(A.motion.legend,{variants:{hidden:{width:0,padding:0},visible:{width:"auto",padding:"0 8px"}},initial:"hidden",animate:!N&&!b.length?"hidden":"visible",className:"max-w-full ml-2 px-2 text-body-small h-0",transition:{duration:.2},children:u.jsx("span",{className:"transform inline-flex -translate-y-1/2",children:u.jsx(A.motion.span,{className:U.label,transition:{duration:.3},layoutId:Z,children:i})})}),u.jsxs("div",{className:"flex-1 relative",children:[(!N&&!b.length||e=="filled")&&u.jsx(A.motion.label,{htmlFor:c,className:x("absolute left-4 transition-all duration-300",{"text-body-small top-2":e=="filled"&&!(!N&&!b.length),"text-body-large top-1/2 transform -translate-y-1/2":!(e=="filled"&&!(!N&&!b.length))}),transition:{duration:.3},children:u.jsx(A.motion.span,{className:U.label,transition:{duration:.3},layoutId:e=="outlined"?Z:void 0,children:i})}),u.jsx(C,{ref:g,value:b,onChange:X,className:U.input,id:c,name:c,placeholder:N?o??void 0:"",onFocus:F,onBlur:T,disabled:t,autoComplete:d,"aria-invalid":!!(n!=null&&n.length),"aria-label":i,...R})]}),u.jsx("div",{className:U.activeIndicator}),!E&&u.jsxs(u.Fragment,{children:[s&&u.jsx("div",{onClick:O=>{O.stopPropagation()},className:U.trailingIcon,children:a.isValidElement(s)?s:u.jsx(re,{className:"h-5",icon:s})}),!s&&r&&u.jsx("span",{className:U.suffix,children:r})]}),E&&u.jsx("div",{className:x(U.trailingIcon,{" absolute right-0":!s}),children:u.jsx(re,{className:"h-5 text-error",icon:wn})})]}),D&&u.jsx("p",{className:U.supportingText,children:n!=null&&n.length?n:f!=null&&f.length?f:" "})]})},Cn=({isSelected:e,icon:t,label:n,variant:o})=>({navigationRailItem:x(" group/navigation-rail-item flex flex-col pt-1 pb-1.5 cursor-pointer",{"text-on-surface-variant":!e,"text-on-secondary-container":e,"gap-2 h-[68px]":o=="vertical","gap-0 h-[66px]":o=="horizontal"}),container:x(" w-fit flex justify-center relative rounded-full items-center mx-5",{"bg-secondary-container overflow-hidden":e,"gap-2 ":o=="horizontal","gap-0 ":o=="vertical","p-4":!n},n&&["px-4",{"py-1 ":o=="vertical","py-4 ":o=="horizontal"}]),stateLayer:x("rounded-full"),icon:x("size-6 flex"),label:x("w-fit mx-auto text-nowrap",{"text-label-large ":o=="horizontal","text-label-medium":o=="vertical"})}),Mn=_("navigationRailItem",Cn),It=({label:e})=>u.jsx("div",{className:" h-9 flex items-center mx-9 mt-3",children:u.jsx("p",{className:"text-label-large text-on-surface-variant",children:e})}),Ct=({className:e,onClick:t,label:n,variant:o="vertical",href:r,icon:c,selectedItem:i,setSelectedItem:l,index:f,onItemSelected:s,selected:y=!1,ref:v,transition:h,isExtended:d,iconSelected:m,style:p,extendedOnly:w,children:S,...b})=>{S&&(n=S);const I=a.useRef(null),N=v||I,[B,E]=a.useState(y);a.useEffect(()=>{y&&i==null?E(!0):E(i==f&&f!=null)},[i]),a.useEffect(()=>{i==f&&s&&s({ref:N,index:f||0,label:n,icon:c})},[i]);const V=r?"a":"button",D=g=>{l&&l(f??null),t&&t(g)},k=Mn({isExtended:d,extendedOnly:w,className:e,onItemSelected:s,selectedItem:i,index:f,transition:h,selected:B,variant:o,icon:c,label:n,isSelected:B,setSelectedItem:l,href:r,children:n,iconSelected:m});return h={duration:.3,...h},w&&!d?null:u.jsxs(V,{...b,role:"tab","aria-selected":B,ref:N,href:r,className:k.navigationRailItem,onClick:D,style:{transition:h.duration+"s",...p},children:[u.jsxs(A.motion.div,{style:{transition:o=="horizontal"?h.duration+`s, gap ${h.duration/2}s ${h.duration-h.duration/2}s`:h.duration+`s, gap ${h.duration/3}s ${h.duration-h.duration/3}s`},transition:h,className:k.container,children:[u.jsx(ie,{style:{transition:h.duration+"s"},className:k.stateLayer,colorName:x({"on-surface":!B,"on-secondary-container":B}),stateClassName:"state-ripple-group-[navigation-rail-item]"}),c&&u.jsx(re,{icon:B?m:c,className:k.icon}),u.jsx(A.AnimatePresence,{children:o=="horizontal"&&(()=>{const g={width:0,opacity:0,transition:{...h}},j={width:"auto",opacity:1,transition:{...h,opacity:{duration:h.duration/2,delay:h.duration-h.duration/2}}};return u.jsx(A.motion.span,{initial:g,animate:j,exit:g,className:k.label,children:n})})()})]}),u.jsx(A.AnimatePresence,{children:o=="vertical"&&(()=>{const g={height:0,opacity:0,transition:{...h,opacity:{duration:0}}},j={height:"auto",opacity:1,transition:{...h,opacity:{duration:h.duration/3,delay:h.duration-h.duration/3}}};return u.jsx(A.motion.span,{initial:j,animate:j,exit:g,className:k.label,transition:h,children:n})})()})]})},kn=({isExtended:e,alignment:t})=>({navigationRail:x("flex flex-col left-0 h-full top-0 pt-11",{"w-fit max-w-24":!e,"w-fit min-w-[220px] max-w-[360px]":e,"justify-between":t=="middle","justify-start":t=="top"}),header:x("flex flex-col gap-1 items-start"),menuIcon:"mx-5",segments:x(" flex flex-col overflow-auto min-w-full mt-10",{"w-full":!e,"w-fit items-start":e})}),Rn=_("navigationRail",kn),$n=({variant:e="standard",onItemSelected:t,children:n,className:o,selectedItem:r,extended:c,alignment:i="top",menu:l={closed:{icon:gn,label:"Open menu"},opened:{icon:we,label:"Close menu"}},style:f,onExtendedChange:s,transition:y,setSelectedItem:v})=>{const[h,d]=a.useState(null),[m,p]=a.useState(c);let w;r==0||r!=null?w=r:w=h;const S=v||d,b=a.useRef(null),I=k=>{t==null||t(k)};function N(k){const g=[];return a.Children.forEach(k,j=>{a.isValidElement(j)&&j.type===a.Fragment?g.push(...N(j.props.children)):g.push(j)}),g}const B=N(n),E=B.filter(k=>a.isValidElement(k)&&k.type===pe),V=Rn({children:n,onItemSelected:t,selectedItem:w,setSelectedItem:S,className:o,variant:e,extended:m,isExtended:m,alignment:i,menu:l,transition:y,onExtendedChange:s});y={duration:.3,...y};const D=a.useRef(!1);return D.current=!1,a.useEffect(()=>{s==null||s(m??!1)},[m]),u.jsxs("div",{style:{transition:y.duration+"s",...f},ref:b,className:V.navigationRail,children:[u.jsxs("div",{className:V.header,children:[u.jsx(fe,{onClick:()=>p(!m),label:m?l==null?void 0:l.opened.label:l==null?void 0:l.closed.label,className:V.menuIcon,icon:m?l.opened.icon:l==null?void 0:l.closed.icon}),E.length>0&&a.cloneElement(E[0],{transition:y,isExtended:m,className:"!shadow-none mx-5 "+E[0].props.className})]}),u.jsx("div",{className:V.segments,children:(()=>{let k=0;return B.map(g=>a.isValidElement(g)&&g.type===Ct?a.cloneElement(g,{key:k,index:k++,variant:m?"horizontal":"vertical",selectedItem:w,setSelectedItem:S,onItemSelected:I,transition:y,extendedOnly:D.current,isExtended:m}):a.isValidElement(g)&&g.type===pe?null:a.isValidElement(g)&&g.type===It?(D.current=!0,m?a.cloneElement(g,{}):null):g)})()}),u.jsx("div",{className:"flex-1 max-h-[160px]"})]})};function An(e){return me.defineConfig({variant:me.Variants.Udixio,...e,plugins:[new me.FontPlugin(e),new Fe.TailwindPlugin(e)]})}exports.AnimateOnScrollInit=cn;exports.Button=he;exports.Card=fn;exports.Carousel=mn;exports.CarouselItem=Lt;exports.CustomScroll=bt;exports.Divider=Nt;exports.Fab=pe;exports.FabMenu=bn;exports.Icon=re;exports.IconButton=fe;exports.NavigationRail=$n;exports.NavigationRailItem=Ct;exports.NavigationRailSection=It;exports.ProgressIndicator=wt;exports.RippleEffect=vt;exports.SideSheet=En;exports.Slider=Sn;exports.SmoothScroll=zt;exports.Snackbar=Ln;exports.State=ie;exports.Switch=Nn;exports.SyncedFixedWrapper=Et;exports.Tab=jt;exports.Tabs=jn;exports.TextField=In;exports.ThemeProvider=nn;exports.ToolTip=Me;exports.animateOnScroll=un;exports.buttonStyle=Bt;exports.cardStyle=Pt;exports.carouselItemConfig=Le;exports.carouselItemStyle=Dt;exports.carouselStyle=Wt;exports.classNames=x;exports.classnames=Oe;exports.createUseClassNames=_;exports.customScrollStyle=gt;exports.defaultClassNames=K;exports.defineConfig=An;exports.dividerStyle=Ft;exports.fabMenuStyle=Ot;exports.fabStyle=Vt;exports.getClassNames=ye;exports.iconButtonStyle=Ht;exports.initAnimateOnScroll=Ce;exports.normalize=ce;exports.progressIndicatorStyle=Yt;exports.sideSheetConfig=Ne;exports.sideSheetStyle=st;exports.sliderConfig=je;exports.sliderStyle=qt;exports.snackbarStyle=Xt;exports.switchStyle=_t;exports.tabStyle=Kt;exports.tabsStyle=Gt;exports.textFieldStyle=Jt;exports.toolStyle=Zt;exports.useButtonStyle=Ye;exports.useCardStyle=qe;exports.useCarouselItemStyle=Xe;exports.useCarouselStyle=Ke;exports.useClassNames=At;exports.useDividerStyle=Je;exports.useFabMenuStyle=ze;exports.useFabStyle=Qe;exports.useIconButtonStyle=tt;exports.useProgressIndicatorStyle=rt;exports.useSideSheetStyle=Ut;exports.useSliderStyle=ot;exports.useSnackbarStyle=lt;exports.useStateStyle=St;exports.useSwitchStyle=it;exports.useTabStyle=dt;exports.useTabsStyle=mt;exports.useTextFieldStyle=pt;exports.useToolTipStyle=xt;
5
+ */var wn={prefix:"fas",iconName:"circle-exclamation",icon:[512,512,["exclamation-circle"],"f06a","M256 512a256 256 0 1 1 0-512 256 256 0 1 1 0 512zm0-192a32 32 0 1 0 0 64 32 32 0 1 0 0-64zm0-192c-18.2 0-32.7 15.5-31.4 33.7l7.4 104c.9 12.6 11.4 22.3 23.9 22.3 12.6 0 23-9.7 23.9-22.3l7.4-104c1.3-18.2-13.1-33.7-31.4-33.7z"]},xe={prefix:"fas",iconName:"xmark",icon:[384,512,[128473,10005,10006,10060,215,"close","multiply","remove","times"],"f00d","M55.1 73.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L147.2 256 9.9 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192.5 301.3 329.9 438.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.8 256 375.1 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192.5 210.7 55.1 73.4z"]},vn=xe,gn={prefix:"fas",iconName:"bars",icon:[448,512,["navicon"],"f0c9","M0 96C0 78.3 14.3 64 32 64l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 128C14.3 128 0 113.7 0 96zM0 256c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 288c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32L32 448c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"]};const bn=({className:e,label:t,variant:n="primary",size:o="medium",href:r,icon:c,extended:i=!1,ref:l,transition:f,children:s,open:y,defaultOpen:v=!1,onOpenChange:h,...d})=>{f={duration:.3,ease:"easeInOut",...f};const m=a.useRef(null),p=l||m,w=typeof y=="boolean",[S,b]=a.useState(v),I=w?y:S,N=j=>{w||b(j),h==null||h(j)},A=a.Children.toArray(s).filter(j=>a.isValidElement(j)&&j.type===Ce),E=ze({href:r,icon:c,extended:i,label:t,size:o,variant:n,className:e,transition:f,children:t,open:I}),V=B.motion.create(he),D=B.motion.create(fe),k=j=>u.jsx(V,{icon:c,extended:i,label:t,variant:n+"Container",size:o,className:E.fab+" "+(e??""),"aria-expanded":I,onClick:()=>N(!0),style:{transition:"border-radius 0.3s ease-in-out"},transition:{duration:f.duration,ease:"easeInOut",borderRadius:{duration:f.duration,ease:"easeInOut"},background:{duration:f.duration,ease:"easeInOut"},...f},...j}),[g]=a.useState(ye());return u.jsxs("div",{className:E.fabMenu,ref:p,...d,children:[u.jsx(B.AnimatePresence,{children:I&&u.jsx("div",{className:E.actions,role:"menu","aria-hidden":!I,children:(()=>{const j=A.length;return A.map((F,X)=>{F.props;const T=j-1-X,U=((f==null?void 0:f.delay)??0)+T*.06,Z={open:{overflow:"visible",opacity:1,width:"auto",transition:{...f,delay:U,opacity:{delay:(f==null?void 0:f.duration)/2+U}}},close:{overflow:"hidden",opacity:0,width:0,transition:{...f,delay:U,opacity:{duration:(f==null?void 0:f.duration)/1.5}}}};return u.jsx(B.motion.div,{initial:"close",animate:"open",variants:Z,transition:f,exit:"close",children:a.cloneElement(F,{key:X,shape:"rounded",variant:"filled",className:()=>({button:x("max-w-full overflow-hidden",{"px-0":!I,"bg-primary-container text-on-primary-container ":n==="primary","bg-secondary-container text-on-secondary-container":n==="secondary","bg-tertiary-container text-on-tertiary-container":n==="tertiary"}),stateLayer:x({"state-on-primary-container":n==="primary","state-on-secondary-container":n==="secondary","state-on-tertiary-container":n==="tertiary"})})})})})})()})}),k({className:"invisible pointer-events-none"}),u.jsxs("div",{className:"absolute right-0 top-0",children:[!I&&k({className:"",layout:!0,layoutId:"fab-menu"+g}),I&&u.jsx(u.Fragment,{children:u.jsx(D,{layout:!0,layoutId:"fab-menu"+g,variant:"filled",className:()=>({iconButton:x("",{"bg-primary text-on-primary":n==="primary","bg-secondary text-on-secondary":n==="secondary","bg-tertiary text-on-tertiary":n==="tertiary"}),stateLayer:x({"[--default-color:var(--color-on-primary)]":n==="primary","[--default-color:var(--color-on-secondary)]":n==="secondary","[--default-color:var(--color-on-tertiary)]":n==="tertiary"})}),style:{transition:"border-radius 0.3s ease-in-out"},transition:{duration:f.duration,ease:"easeInOut",borderRadius:{duration:f.duration,ease:"easeInOut"},background:{duration:f.duration,ease:"easeInOut"},...f},icon:vn,onClick:()=>N(!1),children:"Close"})})]})]})},Sn=({className:e,valueFormatter:t,step:n=10,name:o,value:r=0,min:c=0,max:i=100,marks:l=[{value:0,label:"0"},{value:100,label:"100"}],ref:f,onChange:s,...y})=>{const v=R=>{const C=d(),O=h();return R===1/0?100:R===-1/0?0:(R-C)/(O-C)*100},h=(R=!1)=>R?i:i==1/0?l[(l==null?void 0:l.length)-1].value:i,d=(R=!1)=>R?c:c==-1/0?l[0].value:c,m=R=>{const C=d(!1);return(h(!1)-C)*R/100+C},[p,w]=a.useState(!1),S=a.useRef(null),b=f||S,[I,N]=a.useState(r),[A,E]=a.useState(v(r)),[V,D]=a.useState(!1),k=R=>{D(!0),w(!0),F(R)},g=()=>{D(!1),w(!1)};a.useEffect(()=>(V?(window.addEventListener("mouseup",g),window.addEventListener("mousemove",F),window.addEventListener("touchend",g),window.addEventListener("touchmove",F)):(window.removeEventListener("mouseup",g),window.removeEventListener("mousemove",F),window.removeEventListener("touchend",g),window.removeEventListener("touchmove",F)),()=>{window.removeEventListener("mouseup",g),window.removeEventListener("mousemove",F),window.removeEventListener("touchend",g),window.removeEventListener("touchmove",F)}),[V]);const j=ot({className:e,isChanging:p,marks:l,max:i,min:c,name:o,step:n,value:I,valueFormatter:t,onChange:s}),F=R=>{const C=b==null?void 0:b.current;if(C){const O=C.getBoundingClientRect().left,te=((R.type==="touchmove"||R.type==="touchstart"?R.touches[0].clientX:R.clientX)-O)/C.offsetWidth*100;X({percent:te})}},X=({percent:R,value:C})=>{if(R){if(R>=100){N(h(!0)),E(100);return}if(R<=0){N(d(!0)),E(0);return}C=m(R),C==d()&&(C=d(!0)),C==h()&&(C=h(!0))}else if(C!=null){if(C>=h()){N(h(!0)),E(100);return}if(C<=d()){N(d(!0)),E(0);return}R=v(C)}else return;n!=null?C=Math.round((C-d())/n)*n+d():l&&(C=l.reduce((O,q,te)=>{let oe=q.value===1/0?h():q.value===-1/0?d():q.value,M=O.value===1/0?h():O.value===-1/0?d():O.value;return oe=Math.abs(oe-C),M=Math.abs(M-C),oe<M?q:O}).value),C>=h()&&(C=h(!0)),C<=d()&&(C=d(!0)),R=v(C),N(C),E(R),s&&s(C)},[T,U]=a.useState(0);a.useEffect(()=>{const R=()=>{b.current&&U(b.current.offsetWidth)};return R(),window.addEventListener("resize",R),()=>{window.removeEventListener("resize",R)}},[]);const Z=R=>{switch(R.key){case"ArrowRight":if(n)X({value:I+n});else if(l){const C=l.find(O=>O.value>I);C&&X({value:C.value})}break;case"ArrowLeft":if(n)X({value:I-n});else if(l){const C=l.slice(0).reverse().find((O,q,te)=>I===1/0?q===1:O.value<I);C&&X({value:C.value})}break;default:return}};return u.jsxs("div",{tabIndex:0,onKeyDown:Z,role:"slider","aria-valuemin":d(!0),"aria-valuemax":h(!0),"aria-valuenow":I,"aria-valuetext":I.toString(),className:j.slider,onMouseDown:k,onClick:F,ref:b,onTouchStart:k,onDragStart:R=>R.preventDefault(),...y,children:[u.jsx("input",{type:"hidden",name:o,value:I}),u.jsx("div",{className:j.activeTrack,style:{flex:A/100}}),u.jsx("div",{className:j.handle,children:u.jsx(B.AnimatePresence,{children:p&&u.jsx(B.motion.div,{className:j.valueIndicator,initial:"hidden",animate:"visible",exit:"hidden",style:{translate:"-50%",transformOrigin:"center bottom",textWrap:"nowrap"},variants:{visible:{opacity:1,scale:1},hidden:{opacity:1,scale:0}},transition:{duration:.1},children:t?t(I):I})})}),u.jsx("div",{className:j.inactiveTrack,style:{flex:1-A/100}}),u.jsx("div",{className:"w-[calc(100%-12px)] h-full absolute -translate-x-1/2 transform left-1/2",children:l&&l.map((R,C)=>{let O=null;const q=(p?9:10)/T*100,te=v(R.value);return te<=A-q?O=!0:te>=A+q&&(O=!1),u.jsx("div",{className:x(j.dot,{"bg-primary-container":O!=null&&O,"bg-primary":O!=null&&!O}),style:{left:`${v(R.value)}%`}},C)})})]})},En=({variant:e="standard",className:t,children:n,title:o,position:r="right",extended:c,divider:i,onExtendedChange:l,closeIcon:f=xe,transition:s,...y})=>{s={duration:.3,...s};const[v,h]=a.useState(c??!0),d=st({transition:s,title:o,position:r,closeIcon:f,className:t,children:n,onExtendedChange:l,divider:i,isExtended:v,extended:v,variant:e});a.useEffect(()=>{l==null||l(v??!1)},[v]),a.useEffect(()=>{c!=null&&h(c)},[c]);const m={close:{width:0},open:{width:"auto"}},p=()=>u.jsxs(u.Fragment,{children:[u.jsx(B.AnimatePresence,{children:e=="modal"&&v&&u.jsx(B.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:s,onClick:()=>h(!1),className:d.overlay})}),u.jsx(B.AnimatePresence,{children:v&&u.jsxs("div",{...y,className:d.sideSheet,style:{transition:s.duration+"s"},children:[u.jsxs(B.motion.div,{variants:m,initial:c===!1?"open":"close",animate:"open",exit:"close",className:d.container,children:[u.jsxs("div",{className:d.header,children:[o&&u.jsx("p",{className:d.title,children:o}),u.jsx(fe,{size:"small",label:"close",icon:f,onClick:()=>h(!1),className:d.closeButton})]}),u.jsx("div",{className:d.content,style:{transition:s.duration+"s"},children:n})]}),(i==null&&e=="standard"?!0:i)&&u.jsx(Nt,{className:d.divider,orientation:"vertical"})]})})]});return e=="modal"?We.createPortal(p(),document.body):p()},Ln=({message:e,className:t,duration:n,closeIcon:o=xe,onClose:r,...c})=>{const[i,l]=a.useState(!0),f=lt({className:t,closeIcon:o,duration:n,isVisible:i,onClose:r,message:e});a.useEffect(()=>{n&&setTimeout(()=>{s()},n)},[n]);const s=()=>{l(!1),r==null||r()};return u.jsx(B.AnimatePresence,{children:i&&u.jsx(B.motion.div,{initial:{height:0},animate:{height:"auto"},exit:{height:0},transition:{duration:.1},className:f.snackbar,...c,children:u.jsxs("div",{className:f.container,children:[u.jsx("p",{className:f.supportingText,children:e}),u.jsx(fe,{onClick:()=>s(),className:f.icon,icon:o,label:"close the snackbar"})]})})})},Nn=({selected:e=!1,className:t,activeIcon:n,disabled:o=!1,inactiveIcon:r,onChange:c,onClick:i,onKeyDown:l,ref:f,...s})=>{const[y,v]=a.useState(e),h=b=>{o||(m(),i&&i(b))},d=b=>{o||((b.key===" "||b.key==="Enter")&&(b.preventDefault(),m()),l&&l(b))},m=()=>{v(!y),c==null||c(!y)},p=it({className:t,isSelected:y,activeIcon:n,inactiveIcon:r,disabled:o,selected:y,onChange:c}),w=a.useRef(null),S=f||w;return u.jsxs(B.motion.div,{role:"switch","aria-checked":y,tabIndex:o?-1:0,onKeyDown:d,onClick:h,ref:S,className:p.switch,...s,children:[u.jsx("input",{type:"hidden",value:y?"1":"0"}),u.jsxs(B.motion.div,{layout:!0,style:{translate:y?"50%":"-50%"},transition:{type:"spring",stiffness:700,damping:30},className:p.handleContainer,children:[u.jsx("div",{className:p.handle,children:(y?n:r)&&u.jsx(re,{className:p.icon,icon:y?n:r})}),u.jsx("div",{className:p.handleStateLayer})]})]})},jt=({className:e,onClick:t,label:n,variant:o="primary",href:r,icon:c,selectedTab:i,setSelectedTab:l,tabsId:f,index:s,onTabSelected:y,scrollable:v=!1,selected:h=!1,ref:d,...m})=>{const p=a.useRef(null),w=d||p,[S,b]=a.useState(h);a.useEffect(()=>{h&&i==null?b(!0):b(i==s&&s!=null)},[i]),a.useEffect(()=>{i==s&&y&&y({ref:w,index:s||0,label:n,icon:c})},[i]);const I=r?"a":"button",N=E=>{l&&l(s??null),t&&t(E)},A=dt({className:e,onTabSelected:y,scrollable:v,selectedTab:i,index:s,tabsId:f,selected:S,variant:o,icon:c,label:n,isSelected:S,setSelectedTab:l,href:r});return u.jsxs(I,{...m,role:"tab","aria-selected":S,ref:w,href:r,className:A.tab,onClick:N,...m,children:[u.jsx(ie,{style:{transition:.3+"s"},className:A.stateLayer,colorName:o==="primary"&&S?"primary":"on-surface",stateClassName:"state-ripple-group-[tab]"}),u.jsxs("span",{className:A.content,children:[c&&u.jsx(re,{icon:c,className:A.icon}),u.jsx("span",{className:A.label,children:n}),S&&u.jsx(B.motion.span,{layoutId:`underline-${f}`,className:A.underline,transition:{duration:.3}})]})]})},jn=({variant:e="primary",onTabSelected:t,children:n,className:o,selectedTab:r,setSelectedTab:c,scrollable:i=!1})=>{const[l,f]=a.useState(null);let s;r==0||r!=null?s=r:s=l;const y=c||f,v=a.Children.toArray(n).filter(w=>a.isValidElement(w)&&w.type===jt),h=a.useRef(null),d=w=>{if(t==null||t(w),i){const S=h.current,b=w.ref.current;if(S&&b){const I=b.offsetLeft+b.offsetWidth/2-S.offsetWidth/2;S.scrollTo({left:I,behavior:"smooth"})}}},m=a.useMemo(()=>ye(),[]),p=mt({children:n,onTabSelected:t,scrollable:i,selectedTab:s,setSelectedTab:y,className:o,variant:e});return u.jsx("div",{ref:h,role:"tablist",className:p.tabs,children:v.map((w,S)=>a.cloneElement(w,{key:S,index:S,variant:e,selectedTab:s,setSelectedTab:y,tabsId:m,onTabSelected:d,scrollable:i}))})},In=({variant:e="filled",disabled:t=!1,errorText:n,placeholder:o,suffix:r,name:c,label:i,className:l,supportingText:f,trailingIcon:s,leadingIcon:y,type:v="text",textLine:h="singleLine",autoComplete:d="on",onChange:m,value:p,showSupportingText:w=!1,...S})=>{const[b,I]=a.useState(p??""),[N,A]=a.useState(!1),[E,V]=a.useState(!1),[D,k]=a.useState(w);a.useEffect(()=>{I(p??"")},[p]),a.useEffect(()=>{n!=null&&n.length?V(!0):V(!1)},[n]),a.useEffect(()=>{w?k(w):f!=null&&f.length?k(!0):k(!1)},[D,f]),a.useEffect(()=>{N&&V(!1)},[N]);const g=a.useRef(null),j=()=>{g.current&&!N&&g.current.focus()},F=()=>{A(!0)},X=O=>{const q=O.target.value;I(q),V(!1),typeof m=="function"&&m(q)},T=()=>{A(!1)},U=pt({showSupportingText:D,isFocused:N,showErrorIcon:E,disabled:t,name:c,label:i,autoComplete:d,className:l,onChange:m,placeholder:o,supportingText:f,type:v,leadingIcon:y,trailingIcon:s,variant:e,errorText:n,value:b,suffix:r,textLine:h}),[Z]=a.useState(ye());let R,C;switch(h){case"multiLine":C=Rt,R={};break;case"textAreas":C="textarea",R={};break;case"singleLine":default:C="input",R={type:v};break}return u.jsxs("div",{className:U.textField,...S,children:[u.jsxs("fieldset",{onClick:j,className:U.content,children:[u.jsx("div",{className:U.stateLayer}),y&&u.jsx("div",{className:U.leadingIcon,children:a.isValidElement(y)?y:u.jsx(re,{className:"w-5 h-5",icon:y})}),!(!N&&!b.length||e=="filled")&&u.jsx(B.motion.legend,{variants:{hidden:{width:0,padding:0},visible:{width:"auto",padding:"0 8px"}},initial:"hidden",animate:!N&&!b.length?"hidden":"visible",className:"max-w-full ml-2 px-2 text-body-small h-0",transition:{duration:.2},children:u.jsx("span",{className:"transform inline-flex -translate-y-1/2",children:u.jsx(B.motion.span,{className:U.label,transition:{duration:.3},layoutId:Z,children:i})})}),u.jsxs("div",{className:"flex-1 relative",children:[(!N&&!b.length||e=="filled")&&u.jsx(B.motion.label,{htmlFor:c,className:x("absolute left-4 transition-all duration-300",{"text-body-small top-2":e=="filled"&&!(!N&&!b.length),"text-body-large top-1/2 transform -translate-y-1/2":!(e=="filled"&&!(!N&&!b.length))}),transition:{duration:.3},children:u.jsx(B.motion.span,{className:U.label,transition:{duration:.3},layoutId:e=="outlined"?Z:void 0,children:i})}),u.jsx(C,{ref:g,value:b,onChange:X,className:U.input,id:c,name:c,placeholder:N?o??void 0:"",onFocus:F,onBlur:T,disabled:t,autoComplete:d,"aria-invalid":!!(n!=null&&n.length),"aria-label":i,...R})]}),u.jsx("div",{className:U.activeIndicator}),!E&&u.jsxs(u.Fragment,{children:[s&&u.jsx("div",{onClick:O=>{O.stopPropagation()},className:U.trailingIcon,children:a.isValidElement(s)?s:u.jsx(re,{className:"h-5",icon:s})}),!s&&r&&u.jsx("span",{className:U.suffix,children:r})]}),E&&u.jsx("div",{className:x(U.trailingIcon,{" absolute right-0":!s}),children:u.jsx(re,{className:"h-5 text-error",icon:wn})})]}),D&&u.jsx("p",{className:U.supportingText,children:n!=null&&n.length?n:f!=null&&f.length?f:" "})]})},Cn=({isSelected:e,icon:t,label:n,variant:o})=>({navigationRailItem:x(" group/navigation-rail-item flex flex-col pt-1 pb-1.5 cursor-pointer",{"text-on-surface-variant":!e,"text-on-secondary-container":e,"gap-2 h-[68px]":o=="vertical","gap-0 h-[66px]":o=="horizontal"}),container:x(" w-fit flex justify-center relative rounded-full items-center mx-5",{"bg-secondary-container overflow-hidden":e,"gap-2 ":o=="horizontal","gap-0 ":o=="vertical","p-4":!n},n&&["px-4",{"py-1 ":o=="vertical","py-4 ":o=="horizontal"}]),stateLayer:x("rounded-full"),icon:x("size-6 flex"),label:x("w-fit mx-auto text-nowrap",{"text-label-large ":o=="horizontal","text-label-medium":o=="vertical"})}),Mn=_("navigationRailItem",Cn),It=({label:e})=>u.jsx("div",{className:" h-9 flex items-center mx-9 mt-3",children:u.jsx("p",{className:"text-label-large text-on-surface-variant",children:e})}),Ct=({className:e,onClick:t,label:n,variant:o="vertical",href:r,icon:c,selectedItem:i,setSelectedItem:l,index:f,onItemSelected:s,selected:y=!1,ref:v,transition:h,isExtended:d,iconSelected:m,style:p,extendedOnly:w,children:S,...b})=>{S&&(n=S);const I=a.useRef(null),N=v||I,[A,E]=a.useState(y);a.useEffect(()=>{y&&i==null?E(!0):E(i==f&&f!=null)},[i]),a.useEffect(()=>{i==f&&s&&s({ref:N,index:f||0,label:n,icon:c})},[i]);const V=r?"a":"button",D=g=>{l&&l(f??null),t&&t(g)},k=Mn({isExtended:d,extendedOnly:w,className:e,onItemSelected:s,selectedItem:i,index:f,transition:h,selected:A,variant:o,icon:c,label:n,isSelected:A,setSelectedItem:l,href:r,children:n,iconSelected:m});return h={duration:.3,...h},w&&!d?null:u.jsxs(V,{...b,role:"tab","aria-selected":A,ref:N,href:r,className:k.navigationRailItem,onClick:D,style:{transition:h.duration+"s",...p},children:[u.jsxs(B.motion.div,{style:{transition:o=="horizontal"?h.duration+`s, gap ${h.duration/2}s ${h.duration-h.duration/2}s`:h.duration+`s, gap ${h.duration/3}s ${h.duration-h.duration/3}s`},transition:h,className:k.container,children:[u.jsx(ie,{style:{transition:h.duration+"s"},className:k.stateLayer,colorName:x({"on-surface":!A,"on-secondary-container":A}),stateClassName:"state-ripple-group-[navigation-rail-item]"}),c&&u.jsx(re,{icon:A?m:c,className:k.icon}),u.jsx(B.AnimatePresence,{children:o=="horizontal"&&(()=>{const g={width:0,opacity:0,transition:{...h}},j={width:"auto",opacity:1,transition:{...h,opacity:{duration:h.duration/2,delay:h.duration-h.duration/2}}};return u.jsx(B.motion.span,{initial:g,animate:j,exit:g,className:k.label,children:n})})()})]}),u.jsx(B.AnimatePresence,{children:o=="vertical"&&(()=>{const g={height:0,opacity:0,transition:{...h,opacity:{duration:0}}},j={height:"auto",opacity:1,transition:{...h,opacity:{duration:h.duration/3,delay:h.duration-h.duration/3}}};return u.jsx(B.motion.span,{initial:j,animate:j,exit:g,className:k.label,transition:h,children:n})})()})]})},kn=({isExtended:e,alignment:t})=>({navigationRail:x("flex flex-col left-0 h-full top-0 pt-11",{"w-fit max-w-24":!e,"w-fit min-w-[220px] max-w-[360px]":e,"justify-between":t=="middle","justify-start":t=="top"}),header:x("flex flex-col gap-1 items-start"),menuIcon:"mx-5",segments:x(" flex flex-col overflow-auto min-w-full mt-10",{"w-full":!e,"w-fit items-start":e})}),Rn=_("navigationRail",kn),$n=({variant:e="standard",onItemSelected:t,children:n,className:o,selectedItem:r,extended:c,alignment:i="top",menu:l={closed:{icon:gn,label:"Open menu"},opened:{icon:xe,label:"Close menu"}},style:f,onExtendedChange:s,transition:y,setSelectedItem:v})=>{const[h,d]=a.useState(null),[m,p]=a.useState(c);let w;r==0||r!=null?w=r:w=h;const S=v||d,b=a.useRef(null),I=k=>{t==null||t(k)};function N(k){const g=[];return a.Children.forEach(k,j=>{a.isValidElement(j)&&j.type===a.Fragment?g.push(...N(j.props.children)):g.push(j)}),g}const A=N(n),E=A.filter(k=>a.isValidElement(k)&&k.type===he),V=Rn({children:n,onItemSelected:t,selectedItem:w,setSelectedItem:S,className:o,variant:e,extended:m,isExtended:m,alignment:i,menu:l,transition:y,onExtendedChange:s});y={duration:.3,...y};const D=a.useRef(!1);return D.current=!1,a.useEffect(()=>{s==null||s(m??!1)},[m]),u.jsxs("div",{style:{transition:y.duration+"s",...f},ref:b,className:V.navigationRail,children:[u.jsxs("div",{className:V.header,children:[u.jsx(fe,{onClick:()=>p(!m),label:m?l==null?void 0:l.opened.label:l==null?void 0:l.closed.label,className:V.menuIcon,icon:m?l.opened.icon:l==null?void 0:l.closed.icon}),E.length>0&&a.cloneElement(E[0],{transition:y,isExtended:m,className:"!shadow-none mx-5 "+E[0].props.className})]}),u.jsx("div",{className:V.segments,children:(()=>{let k=0;return A.map(g=>a.isValidElement(g)&&g.type===Ct?a.cloneElement(g,{key:k,index:k++,variant:m?"horizontal":"vertical",selectedItem:w,setSelectedItem:S,onItemSelected:I,transition:y,extendedOnly:D.current,isExtended:m}):a.isValidElement(g)&&g.type===he?null:a.isValidElement(g)&&g.type===It?(D.current=!0,m?a.cloneElement(g,{}):null):g)})()}),u.jsx("div",{className:"flex-1 max-h-[160px]"})]})};function An(e){return me.defineConfig({variant:me.Variants.Udixio,...e,plugins:[new me.FontPlugin(e),new Fe.TailwindPlugin(e)]})}exports.AnimateOnScrollInit=cn;exports.Button=Ce;exports.Card=fn;exports.Carousel=mn;exports.CarouselItem=Lt;exports.CustomScroll=bt;exports.Divider=Nt;exports.Fab=he;exports.FabMenu=bn;exports.Icon=re;exports.IconButton=fe;exports.NavigationRail=$n;exports.NavigationRailItem=Ct;exports.NavigationRailSection=It;exports.ProgressIndicator=wt;exports.RippleEffect=vt;exports.SideSheet=En;exports.Slider=Sn;exports.SmoothScroll=zt;exports.Snackbar=Ln;exports.State=ie;exports.Switch=Nn;exports.SyncedFixedWrapper=Et;exports.Tab=jt;exports.Tabs=jn;exports.TextField=In;exports.ThemeProvider=nn;exports.ToolTip=Me;exports.animateOnScroll=un;exports.buttonStyle=Bt;exports.cardStyle=Pt;exports.carouselItemConfig=Ee;exports.carouselItemStyle=Dt;exports.carouselStyle=Wt;exports.classNames=x;exports.classnames=Oe;exports.createUseClassNames=_;exports.customScrollStyle=gt;exports.defaultClassNames=K;exports.defineConfig=An;exports.dividerStyle=Ft;exports.fabMenuStyle=Ot;exports.fabStyle=Vt;exports.getClassNames=pe;exports.iconButtonStyle=Ht;exports.initAnimateOnScroll=Ie;exports.normalize=ce;exports.progressIndicatorStyle=Yt;exports.sideSheetConfig=Le;exports.sideSheetStyle=st;exports.sliderConfig=Ne;exports.sliderStyle=qt;exports.snackbarStyle=Xt;exports.switchStyle=_t;exports.tabStyle=Kt;exports.tabsStyle=Gt;exports.textFieldStyle=Jt;exports.toolStyle=Zt;exports.useButtonStyle=Ye;exports.useCardStyle=qe;exports.useCarouselItemStyle=Xe;exports.useCarouselStyle=Ke;exports.useClassNames=At;exports.useDividerStyle=Je;exports.useFabMenuStyle=ze;exports.useFabStyle=Qe;exports.useIconButtonStyle=tt;exports.useProgressIndicatorStyle=rt;exports.useSideSheetStyle=Ut;exports.useSliderStyle=ot;exports.useSnackbarStyle=lt;exports.useStateStyle=St;exports.useSwitchStyle=it;exports.useTabStyle=dt;exports.useTabsStyle=mt;exports.useTextFieldStyle=pt;exports.useToolTipStyle=xt;
package/dist/index.js CHANGED
@@ -1,14 +1,14 @@
1
1
  import { jsx as m, jsxs as Y, Fragment as me } from "react/jsx-runtime";
2
- import { clsx as Ve } from "clsx";
2
+ import { clsx as Oe } from "clsx";
3
3
  import { extendTailwindMerge as ut } from "tailwind-merge";
4
- import Z, { useMemo as $e, useState as $, useEffect as R, useRef as W, useLayoutEffect as Ye, isValidElement as pe, cloneElement as xe, Children as dt, Fragment as ft } from "react";
5
- import { motion as q, AnimatePresence as se, useScroll as mt, useMotionValueEvent as De, animate as ht } from "motion/react";
4
+ import Z, { useMemo as Me, useState as $, useEffect as R, useRef as W, useLayoutEffect as Ve, isValidElement as pe, cloneElement as xe, Children as dt, Fragment as ft } from "react";
5
+ import { motion as q, AnimatePresence as se, useScroll as mt, useMotionValueEvent as Be, animate as ht } from "motion/react";
6
6
  import { animate as pt } from "motion";
7
- import { createPortal as Ue } from "react-dom";
7
+ import { createPortal as Ye } from "react-dom";
8
8
  import { loader as yt, defineConfig as wt, FontPlugin as vt, Variants as xt } from "@udixio/theme";
9
- import { TailwindPlugin as Xe } from "@udixio/tailwind";
9
+ import { TailwindPlugin as Ue } from "@udixio/tailwind";
10
10
  import gt from "react-textarea-autosize";
11
- const je = ut({
11
+ const Xe = ut({
12
12
  override: {
13
13
  classGroups: {
14
14
  "text-color": [
@@ -34,11 +34,11 @@ const je = ut({
34
34
  font: ["font"]
35
35
  }
36
36
  }
37
- }), y = (...e) => je(Ve(e)), bt = (...e) => je(Ve(e));
37
+ }), y = (...e) => Xe(Oe(e)), bt = (...e) => Xe(Oe(e));
38
38
  function Lt(e) {
39
39
  return e.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g, "").replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "");
40
40
  }
41
- const Re = (e) => {
41
+ const $e = (e) => {
42
42
  const t = {};
43
43
  e.classNameList.forEach((l) => {
44
44
  var r;
@@ -58,12 +58,12 @@ const Re = (e) => {
58
58
  let [r, s] = l;
59
59
  s = s.reverse(), r == e.default && s.unshift("relative"), s.unshift(Lt(r)), n[r] = bt(...s);
60
60
  }), n;
61
- }, Q = (e, t) => (n) => Re({
61
+ }, Q = (e, t) => (n) => $e({
62
62
  classNameList: [n.className, t],
63
63
  default: e,
64
64
  states: n
65
- }), J = (e, t) => (n) => $e(
66
- () => Re({
65
+ }), J = (e, t) => (n) => Me(
66
+ () => $e({
67
67
  classNameList: [n.className, t],
68
68
  default: e,
69
69
  states: n
@@ -71,8 +71,8 @@ const Re = (e) => {
71
71
  [n]
72
72
  );
73
73
  function Mn(e, t, n) {
74
- return $e(
75
- () => Re({
74
+ return Me(
75
+ () => $e({
76
76
  classNameList: [n == null ? void 0 : n.className, t],
77
77
  default: e,
78
78
  states: n
@@ -80,7 +80,7 @@ function Mn(e, t, n) {
80
80
  [e, t, n]
81
81
  );
82
82
  }
83
- const qe = ({
83
+ const je = ({
84
84
  variant: e,
85
85
  disableTextMargins: t,
86
86
  disabled: n,
@@ -193,11 +193,11 @@ const qe = ({
193
193
  )
194
194
  }), $n = Q(
195
195
  "button",
196
- qe
196
+ je
197
197
  ), Nt = J(
198
198
  "button",
199
- qe
200
- ), _e = ({
199
+ je
200
+ ), qe = ({
201
201
  variant: e,
202
202
  isInteractive: t
203
203
  }) => ({
@@ -207,10 +207,10 @@ const qe = ({
207
207
  e === "elevated" && "bg-surface-container-low shadow-1",
208
208
  e === "filled" && "bg-surface-container-highest"
209
209
  )
210
- }), Rn = Q("card", _e), Et = J(
210
+ }), Rn = Q("card", qe), Et = J(
211
211
  "card",
212
- _e
213
- ), Ke = ({
212
+ qe
213
+ ), _e = ({
214
214
  width: e
215
215
  }) => ({
216
216
  carouselItem: y("rounded-[28px] overflow-hidden flex-none", {
@@ -219,20 +219,20 @@ const qe = ({
219
219
  })
220
220
  }), Bn = Q(
221
221
  "carouselItem",
222
- Ke
222
+ _e
223
223
  ), St = J(
224
224
  "carouselItem",
225
- Ke
226
- ), Ge = () => ({
225
+ _e
226
+ ), Ke = () => ({
227
227
  carousel: y(["w-full h-[400px]"]),
228
228
  track: y("flex h-full w-full")
229
229
  }), Dn = Q(
230
230
  "carousel",
231
- Ge
231
+ Ke
232
232
  ), It = J(
233
233
  "carousel",
234
- Ge
235
- ), Je = ({
234
+ Ke
235
+ ), Ge = ({
236
236
  orientation: e
237
237
  }) => ({
238
238
  divider: y(
@@ -246,11 +246,11 @@ const qe = ({
246
246
  )
247
247
  }), Wn = Q(
248
248
  "divider",
249
- Je
249
+ Ge
250
250
  ), kt = J(
251
251
  "divider",
252
- Je
253
- ), Ze = ({
252
+ Ge
253
+ ), Je = ({
254
254
  size: e,
255
255
  variant: t,
256
256
  extended: n
@@ -283,7 +283,7 @@ const qe = ({
283
283
  "text-title-large": e == "medium",
284
284
  "text-headline-small": e == "large"
285
285
  })
286
- }), An = Q("fab", Ze), Ct = J("fab", Ze), Qe = ({
286
+ }), An = Q("fab", Je), Ct = J("fab", Je), Ze = ({
287
287
  size: e,
288
288
  variant: t,
289
289
  open: n
@@ -294,11 +294,11 @@ const qe = ({
294
294
  )
295
295
  }), Pn = Q(
296
296
  "fabMenu",
297
- Qe
297
+ Ze
298
298
  ), Mt = J(
299
299
  "fabMenu",
300
- Qe
301
- ), Te = ({
300
+ Ze
301
+ ), Qe = ({
302
302
  variant: e,
303
303
  disabled: t,
304
304
  onToggle: n,
@@ -432,11 +432,11 @@ const qe = ({
432
432
  )
433
433
  }), Hn = Q(
434
434
  "iconButton",
435
- Te
435
+ Qe
436
436
  ), $t = J(
437
437
  "iconButton",
438
- Te
439
- ), ze = ({ variant: e, isVisible: t }) => ({
438
+ Qe
439
+ ), Te = ({ variant: e, isVisible: t }) => ({
440
440
  progressIndicator: y(
441
441
  (e === "linear-determinate" || e == "linear-indeterminate") && "flex w-full h-1"
442
442
  ),
@@ -467,11 +467,11 @@ const qe = ({
467
467
  )
468
468
  }), Fn = Q(
469
469
  "progressIndicator",
470
- ze
470
+ Te
471
471
  ), Rt = J(
472
472
  "progressIndicator",
473
- ze
474
- ), et = ({
473
+ Te
474
+ ), ze = ({
475
475
  variant: e,
476
476
  position: t
477
477
  }) => ({
@@ -498,11 +498,11 @@ const qe = ({
498
498
  overlay: y("bg-[black]/[0.32] fixed top-0 left-0 w-screen h-screen")
499
499
  }), Bt = Q(
500
500
  "sideSheet",
501
- et
501
+ ze
502
502
  ), On = J(
503
503
  "sideSheet",
504
- et
505
- ), tt = ({
504
+ ze
505
+ ), et = ({
506
506
  isChanging: e
507
507
  }) => ({
508
508
  slider: y([
@@ -526,11 +526,11 @@ const qe = ({
526
526
  ])
527
527
  }), Vn = Q(
528
528
  "slider",
529
- tt
529
+ et
530
530
  ), Dt = J(
531
531
  "slider",
532
- tt
533
- ), nt = () => ({
532
+ et
533
+ ), tt = () => ({
534
534
  snackbar: y(" rounded bg-inverse-surface "),
535
535
  container: y(
536
536
  "pl-4 pr-2 max-w-full py-1 flex items-center flex-wrap"
@@ -539,11 +539,11 @@ const qe = ({
539
539
  icon: y(" ml-auto mr-0 text-inverse-on-surface block dark")
540
540
  }), Yn = Q(
541
541
  "snackbar",
542
- nt
542
+ tt
543
543
  ), Wt = J(
544
544
  "snackbar",
545
- nt
546
- ), rt = ({
545
+ tt
546
+ ), nt = ({
547
547
  isSelected: e,
548
548
  disabled: t,
549
549
  inactiveIcon: n
@@ -589,11 +589,11 @@ const qe = ({
589
589
  )
590
590
  }), Un = Q(
591
591
  "switch",
592
- rt
592
+ nt
593
593
  ), At = J(
594
594
  "switch",
595
- rt
596
- ), ot = ({
595
+ nt
596
+ ), rt = ({
597
597
  isSelected: e,
598
598
  icon: t,
599
599
  label: n,
@@ -654,16 +654,16 @@ const qe = ({
654
654
  l === "primary" && "h-[3px] rounded-t",
655
655
  l === "secondary" && "h-0.5"
656
656
  )
657
- }), Xn = Q("tab", ot), Pt = J("tab", ot), lt = ({ scrollable: e }) => ({
657
+ }), Xn = Q("tab", rt), Pt = J("tab", rt), ot = ({ scrollable: e }) => ({
658
658
  tabs: y(
659
659
  "border-b border-surface-container-highest bg-surface",
660
660
  "flex relative ",
661
661
  { "overflow-x-auto": e }
662
662
  )
663
- }), jn = Q("tabs", lt), Ht = J(
663
+ }), jn = Q("tabs", ot), Ht = J(
664
664
  "tabs",
665
- lt
666
- ), at = ({
665
+ ot
666
+ ), lt = ({
667
667
  disabled: e,
668
668
  leadingIcon: t,
669
669
  trailingIcon: n,
@@ -757,11 +757,11 @@ const qe = ({
757
757
  )
758
758
  }), qn = Q(
759
759
  "textField",
760
- at
760
+ lt
761
761
  ), Ft = J(
762
762
  "textField",
763
- at
764
- ), st = ({
763
+ lt
764
+ ), at = ({
765
765
  position: e,
766
766
  variant: t
767
767
  }) => ({
@@ -788,10 +788,10 @@ const qe = ({
788
788
  supportingText: y("")
789
789
  }), _n = Q(
790
790
  "toolTip",
791
- st
791
+ at
792
792
  ), Ot = J(
793
793
  "toolTip",
794
- st
794
+ at
795
795
  ), ie = ({ icon: e, colors: t = [], className: n }) => {
796
796
  if (typeof e == "string") {
797
797
  let o = e;
@@ -1167,13 +1167,13 @@ const jt = ({
1167
1167
  const F = Math.max(0, (n ?? N.scrollHeight) - C.clientHeight);
1168
1168
  C.scrollTop = D(a * F, 0, F);
1169
1169
  }
1170
- }, [a, t, n]), De(g, "change", (C) => {
1170
+ }, [a, t, n]), Be(g, "change", (C) => {
1171
1171
  E(C, "x");
1172
- }), De(b, "change", (C) => {
1172
+ }), Be(b, "change", (C) => {
1173
1173
  E(C, "y");
1174
1174
  });
1175
1175
  const [A, L] = $(!1);
1176
- Ye(() => {
1176
+ Ve(() => {
1177
1177
  A || !d.current || !i.current || !l || (l({
1178
1178
  scrollProgress: 0,
1179
1179
  scroll: 0,
@@ -1527,7 +1527,7 @@ const jt = ({
1527
1527
  var a;
1528
1528
  window.removeEventListener("scroll", s, !0), window.removeEventListener("resize", s), (a = r.current) == null || a.disconnect();
1529
1529
  };
1530
- }, [e]), n ? Ue(/* @__PURE__ */ m("div", { style: n, children: t }), document.body) : null;
1530
+ }, [e]), n ? Ye(/* @__PURE__ */ m("div", { style: n, children: t }), document.body) : null;
1531
1531
  };
1532
1532
  function Jt(e) {
1533
1533
  return /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(e);
@@ -1575,7 +1575,7 @@ const Gn = ({
1575
1575
  if (!r)
1576
1576
  return;
1577
1577
  r.context.update(f), await r.load();
1578
- const i = r == null ? void 0 : r.plugins.getPlugin(Xe).getInstance().outputCss;
1578
+ const i = r == null ? void 0 : r.plugins.getPlugin(Ue).getInstance().outputCss;
1579
1579
  a(i), n == null || n(r);
1580
1580
  };
1581
1581
  return R(() => () => {
@@ -1595,20 +1595,20 @@ function Zt() {
1595
1595
  function Qt() {
1596
1596
  return typeof window > "u" || !("matchMedia" in window) ? !1 : window.matchMedia("(prefers-reduced-motion: reduce)").matches;
1597
1597
  }
1598
- function Be(e) {
1598
+ function Re(e) {
1599
1599
  if (!(e instanceof HTMLElement)) return !1;
1600
1600
  const t = e.classList;
1601
1601
  return Array.from(t).some(
1602
1602
  (n) => n.startsWith("anim-") && n.includes("scroll")
1603
1603
  );
1604
1604
  }
1605
- function We(e) {
1605
+ function De(e) {
1606
1606
  if (!(e instanceof HTMLElement)) return !1;
1607
1607
  const t = e.classList;
1608
1608
  return Array.from(t).some((n) => n.startsWith("anim-"));
1609
1609
  }
1610
1610
  function Se(e, t) {
1611
- if (!Be(e)) return;
1611
+ if (!Re(e)) return;
1612
1612
  if (e.hasAttribute(`data-${t}-scroll`)) {
1613
1613
  const c = (e.getAttribute(`data-${t}-scroll`) || "").trim().toLowerCase(), a = c === "x" || c === "inline" ? "inline" : c === "y" || c === "block" ? "block" : "auto";
1614
1614
  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`));
@@ -1625,7 +1625,7 @@ function Ie(e = document, t) {
1625
1625
  e.querySelectorAll(
1626
1626
  `[class*="${t}-"][class*="-scroll"]`
1627
1627
  )
1628
- ).filter((l) => Be(l));
1628
+ ).filter((l) => Re(l));
1629
1629
  }
1630
1630
  function Tt(e = document, t) {
1631
1631
  const n = Array.from(
@@ -1649,7 +1649,7 @@ function Tt(e = document, t) {
1649
1649
  const s = r.classList;
1650
1650
  return s.contains(`${t}-in`) || s.contains(`${t}-out`) || Array.from(s).some(
1651
1651
  (u) => u.startsWith(`${t}-`) && !u.includes("scroll") && !l.has(u)
1652
- ) ? !0 : !Be(r);
1652
+ ) ? !0 : !Re(r);
1653
1653
  });
1654
1654
  }
1655
1655
  function zt(e, t) {
@@ -1657,17 +1657,17 @@ function zt(e, t) {
1657
1657
  (n) => n.startsWith(t) && n.includes("-out")
1658
1658
  );
1659
1659
  }
1660
- function Ae(e, t, n) {
1660
+ function We(e, t, n) {
1661
1661
  e.setAttribute(`data-${t}-run`, ""), e.setAttribute(`data-${t}-${n}-run`, "");
1662
1662
  }
1663
- function Pe(e, t, n) {
1663
+ function Ae(e, t, n) {
1664
1664
  const l = e.style.animationName;
1665
1665
  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 = l;
1666
1666
  }
1667
- const en = [0, 0.2], He = /* @__PURE__ */ new WeakSet();
1668
- function Fe(e, t) {
1669
- if (He.has(e)) return;
1670
- He.add(e);
1667
+ const en = [0, 0.2], Pe = /* @__PURE__ */ new WeakSet();
1668
+ function He(e, t) {
1669
+ if (Pe.has(e)) return;
1670
+ Pe.add(e);
1671
1671
  const n = (r) => {
1672
1672
  r.target === e && (e.hasAttribute(`data-${t}-in-run`) || e.hasAttribute(`data-${t}-out-run`)) && e.setAttribute(`data-${t}-animating`, "");
1673
1673
  }, l = (r) => {
@@ -1675,7 +1675,7 @@ function Fe(e, t) {
1675
1675
  };
1676
1676
  e.addEventListener("animationstart", n), e.addEventListener("animationend", l), e.addEventListener("animationcancel", l);
1677
1677
  }
1678
- function ct(e = {}) {
1678
+ function st(e = {}) {
1679
1679
  const { prefix: t = "anim", once: n = !0 } = e;
1680
1680
  if (Qt())
1681
1681
  return () => {
@@ -1691,16 +1691,16 @@ function ct(e = {}) {
1691
1691
  (i) => {
1692
1692
  for (const d of i) {
1693
1693
  const h = d.target;
1694
- if (!We(h) || h.hasAttribute(`data-${t}-animating`)) continue;
1694
+ if (!De(h) || h.hasAttribute(`data-${t}-animating`)) continue;
1695
1695
  const w = zt(h.classList, t);
1696
- d.isIntersecting ? (w && Pe(h, t, "out"), Ae(h, t, "in"), n && u.unobserve(h)) : n || (c || Pe(h, t, "in"), w && Ae(h, t, "out"));
1696
+ d.isIntersecting ? (w && Ae(h, t, "out"), We(h, t, "in"), n && u.unobserve(h)) : n || (c || Ae(h, t, "in"), w && We(h, t, "out"));
1697
1697
  }
1698
1698
  },
1699
1699
  { threshold: en }
1700
1700
  ), o = (i) => {
1701
1701
  const d = Tt(i || document, t);
1702
1702
  for (const h of d)
1703
- r.has(h) || (r.add(h), u.observe(h), Fe(h, t));
1703
+ r.has(h) || (r.add(h), u.observe(h), He(h, t));
1704
1704
  };
1705
1705
  o();
1706
1706
  let p, v = null, f = null;
@@ -1715,7 +1715,7 @@ function ct(e = {}) {
1715
1715
  for (const h of d)
1716
1716
  if (h.type === "attributes") {
1717
1717
  const w = h.target;
1718
- w instanceof HTMLElement && (Se(w, t), We(w) && (r.has(w) || (r.add(w), u.observe(w), Fe(w, t))));
1718
+ w instanceof HTMLElement && (Se(w, t), De(w) && (r.has(w) || (r.add(w), u.observe(w), He(w, t))));
1719
1719
  } else if (h.type === "childList" && h.addedNodes && h.addedNodes.length) {
1720
1720
  for (const w of Array.from(h.addedNodes))
1721
1721
  if (w instanceof HTMLElement) {
@@ -1751,7 +1751,7 @@ function ct(e = {}) {
1751
1751
  p && p(), typeof window < "u" && window.removeEventListener("scroll", a), u.disconnect();
1752
1752
  };
1753
1753
  }
1754
- const Jn = ct, Zn = ct;
1754
+ const Jn = st, Zn = st;
1755
1755
  function tn(e) {
1756
1756
  const t = {
1757
1757
  primary: "filled",
@@ -1759,7 +1759,7 @@ function tn(e) {
1759
1759
  };
1760
1760
  return e && e in t ? t[e] : e || "filled";
1761
1761
  }
1762
- const Ce = ({
1762
+ const ct = ({
1763
1763
  variant: e = "filled",
1764
1764
  disabled: t = !1,
1765
1765
  icon: n,
@@ -2161,7 +2161,7 @@ const Ce = ({
2161
2161
  (N = M.current) == null || N.stop();
2162
2162
  }, []);
2163
2163
  const [le, ue] = $(0);
2164
- Ye(() => {
2164
+ Ve(() => {
2165
2165
  let N = c[1];
2166
2166
  L && N > L.scrollVisible && (N = L.scrollVisible);
2167
2167
  const D = (N + a) * B.length / v;
@@ -2258,11 +2258,11 @@ function an() {
2258
2258
  }
2259
2259
  return ke(ln);
2260
2260
  }
2261
- const sn = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), Oe = { randomUUID: sn };
2261
+ const sn = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), Fe = { randomUUID: sn };
2262
2262
  function ge(e, t, n) {
2263
2263
  var r;
2264
- if (Oe.randomUUID && !e)
2265
- return Oe.randomUUID();
2264
+ if (Fe.randomUUID && !e)
2265
+ return Fe.randomUUID();
2266
2266
  e = e || {};
2267
2267
  const l = e.random ?? ((r = e.rng) == null ? void 0 : r.call(e)) ?? an();
2268
2268
  if (l.length < 16)
@@ -2380,7 +2380,7 @@ const it = ({
2380
2380
  r && /* @__PURE__ */ m("div", { className: M.subHead, children: r }),
2381
2381
  /* @__PURE__ */ m("div", { className: M.supportingText, children: s }),
2382
2382
  t && /* @__PURE__ */ m("div", { className: M.actions, children: Array.isArray(t) && t.map((x, S) => /* @__PURE__ */ m(
2383
- Ce,
2383
+ ct,
2384
2384
  {
2385
2385
  size: "small",
2386
2386
  variant: "text",
@@ -2394,7 +2394,7 @@ const it = ({
2394
2394
  }
2395
2395
  ) }) })
2396
2396
  ] });
2397
- }, Me = ({
2397
+ }, Ce = ({
2398
2398
  className: e,
2399
2399
  label: t,
2400
2400
  variant: n = "primary",
@@ -2644,7 +2644,7 @@ const zn = ({
2644
2644
  const d = W(null), h = a || d, w = typeof p == "boolean", [b, g] = $(v), I = w ? p : b, E = (S) => {
2645
2645
  w || g(S), f == null || f(S);
2646
2646
  }, A = Z.Children.toArray(o).filter(
2647
- (S) => Z.isValidElement(S) && S.type === Ce
2647
+ (S) => Z.isValidElement(S) && S.type === ct
2648
2648
  ), L = Mt({
2649
2649
  href: r,
2650
2650
  icon: s,
@@ -2656,9 +2656,7 @@ const zn = ({
2656
2656
  transition: u,
2657
2657
  children: t,
2658
2658
  open: I
2659
- }), V = q.create(Me), H = q.create(be);
2660
- q.create(Ce);
2661
- const M = (S) => /* @__PURE__ */ m(
2659
+ }), V = q.create(Ce), H = q.create(be), M = (S) => /* @__PURE__ */ m(
2662
2660
  V,
2663
2661
  {
2664
2662
  icon: s,
@@ -3073,7 +3071,7 @@ const zn = ({
3073
3071
  }
3074
3072
  ) })
3075
3073
  ] });
3076
- return e == "modal" ? Ue(h(), document.body) : h();
3074
+ return e == "modal" ? Ye(h(), document.body) : h();
3077
3075
  }, nr = ({
3078
3076
  message: e,
3079
3077
  className: t,
@@ -3292,7 +3290,7 @@ const zn = ({
3292
3290
  b.scrollTo({ left: I, behavior: "smooth" });
3293
3291
  }
3294
3292
  }
3295
- }, d = $e(() => ge(), []), h = Ht({
3293
+ }, d = Me(() => ge(), []), h = Ht({
3296
3294
  children: n,
3297
3295
  onTabSelected: t,
3298
3296
  scrollable: c,
@@ -3743,7 +3741,7 @@ const zn = ({
3743
3741
  }), x;
3744
3742
  }
3745
3743
  const A = E(n), L = A.filter(
3746
- (M) => pe(M) && M.type === Me
3744
+ (M) => pe(M) && M.type === Ce
3747
3745
  ), V = vn({
3748
3746
  children: n,
3749
3747
  onItemSelected: t,
@@ -3801,7 +3799,7 @@ const zn = ({
3801
3799
  extendedOnly: H.current,
3802
3800
  isExtended: d
3803
3801
  }
3804
- ) : pe(x) && x.type === Me ? null : pe(x) && x.type === pn ? (H.current = !0, d ? xe(x, {}) : null) : x);
3802
+ ) : pe(x) && x.type === Ce ? null : pe(x) && x.type === pn ? (H.current = !0, d ? xe(x, {}) : null) : x);
3805
3803
  })() }),
3806
3804
  /* @__PURE__ */ m("div", { className: "flex-1 max-h-[160px]" })
3807
3805
  ]
@@ -3812,18 +3810,18 @@ function sr(e) {
3812
3810
  return wt({
3813
3811
  variant: xt.Udixio,
3814
3812
  ...e,
3815
- plugins: [new vt(e), new Xe(e)]
3813
+ plugins: [new vt(e), new Ue(e)]
3816
3814
  });
3817
3815
  }
3818
3816
  export {
3819
3817
  Jn as AnimateOnScrollInit,
3820
- Ce as Button,
3818
+ ct as Button,
3821
3819
  Qn as Card,
3822
3820
  Tn as Carousel,
3823
3821
  nn as CarouselItem,
3824
3822
  jt as CustomScroll,
3825
3823
  rn as Divider,
3826
- Me as Fab,
3824
+ Ce as Fab,
3827
3825
  zn as FabMenu,
3828
3826
  ie as Icon,
3829
3827
  be as IconButton,
@@ -3847,7 +3845,7 @@ export {
3847
3845
  Zn as animateOnScroll,
3848
3846
  $n as buttonStyle,
3849
3847
  Rn as cardStyle,
3850
- Ke as carouselItemConfig,
3848
+ _e as carouselItemConfig,
3851
3849
  Bn as carouselItemStyle,
3852
3850
  Dn as carouselStyle,
3853
3851
  y as classNames,
@@ -3859,14 +3857,14 @@ export {
3859
3857
  Wn as dividerStyle,
3860
3858
  Pn as fabMenuStyle,
3861
3859
  An as fabStyle,
3862
- Re as getClassNames,
3860
+ $e as getClassNames,
3863
3861
  Hn as iconButtonStyle,
3864
- ct as initAnimateOnScroll,
3862
+ st as initAnimateOnScroll,
3865
3863
  he as normalize,
3866
3864
  Fn as progressIndicatorStyle,
3867
- et as sideSheetConfig,
3865
+ ze as sideSheetConfig,
3868
3866
  Bt as sideSheetStyle,
3869
- tt as sliderConfig,
3867
+ et as sliderConfig,
3870
3868
  Vn as sliderStyle,
3871
3869
  Yn as snackbarStyle,
3872
3870
  Un as switchStyle,
@@ -1 +1 @@
1
- {"version":3,"file":"FabMenu.d.ts","sourceRoot":"","sources":["../../../src/lib/components/FabMenu.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAEpE,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAUhD;;;;GAIG;AACH,eAAO,MAAM,OAAO,GAAI,+IAerB,UAAU,CAAC,gBAAgB,CAAC,4CAsM9B,CAAC"}
1
+ {"version":3,"file":"FabMenu.d.ts","sourceRoot":"","sources":["../../../src/lib/components/FabMenu.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAEpE,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAUhD;;;;GAIG;AACH,eAAO,MAAM,OAAO,GAAI,+IAerB,UAAU,CAAC,gBAAgB,CAAC,4CAoM9B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@udixio/ui-react",
3
- "version": "2.8.2",
3
+ "version": "2.8.3",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",
@@ -36,8 +36,8 @@
36
36
  "devDependencies": {
37
37
  "react": "^19.1.1",
38
38
  "react-dom": "^19.1.1",
39
- "@udixio/theme": "2.1.2",
40
- "@udixio/tailwind": "2.4.0"
39
+ "@udixio/theme": "2.1.3",
40
+ "@udixio/tailwind": "2.4.1"
41
41
  },
42
42
  "repository": {
43
43
  "type": "git",
@@ -65,8 +65,6 @@ export const FabMenu = ({
65
65
 
66
66
  const MotionFab = motion.create(Fab);
67
67
  const MotionIconButton = motion.create(IconButton);
68
- const MotionButton = motion.create(Button);
69
-
70
68
  const renderFab = (props) => (
71
69
  <MotionFab
72
70
  icon={icon}