@udixio/ui-react 1.5.0 → 1.6.0
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 +19 -0
- package/dist/index.cjs +2 -2
- package/dist/index.js +882 -757
- package/dist/lib/components/SlideSheet.d.ts +9 -0
- package/dist/lib/components/SlideSheet.d.ts.map +1 -0
- package/dist/lib/components/index.d.ts +1 -0
- package/dist/lib/components/index.d.ts.map +1 -1
- package/dist/lib/effects/ThemeProvider.d.ts +3 -2
- package/dist/lib/effects/ThemeProvider.d.ts.map +1 -1
- package/dist/lib/interfaces/index.d.ts +1 -0
- package/dist/lib/interfaces/index.d.ts.map +1 -1
- package/dist/lib/interfaces/navigation-rail.interface.d.ts +1 -1
- package/dist/lib/interfaces/navigation-rail.interface.d.ts.map +1 -1
- package/dist/lib/interfaces/slide-sheet.interface.d.ts +29 -0
- package/dist/lib/interfaces/slide-sheet.interface.d.ts.map +1 -0
- package/dist/lib/styles/index.d.ts +1 -0
- package/dist/lib/styles/index.d.ts.map +1 -1
- package/dist/lib/styles/navigation-rail.style.d.ts +2 -2
- package/dist/lib/styles/slide-sheet.style.d.ts +25 -0
- package/dist/lib/styles/slide-sheet.style.d.ts.map +1 -0
- package/package.json +2 -2
- package/src/lib/components/SlideSheet.tsx +122 -0
- package/src/lib/components/index.ts +1 -0
- package/src/lib/effects/ThemeProvider.tsx +13 -18
- package/src/lib/interfaces/index.ts +1 -0
- package/src/lib/interfaces/navigation-rail.interface.ts +1 -1
- package/src/lib/interfaces/slide-sheet.interface.tsx +27 -0
- package/src/lib/styles/index.ts +1 -0
- package/src/lib/styles/slide-sheet.style.ts +31 -0
- package/src/stories/containment/slide-sheet.stories.tsx +50 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,22 @@
|
|
|
1
|
+
## 1.6.0 (2025-08-29)
|
|
2
|
+
|
|
3
|
+
### 🚀 Features
|
|
4
|
+
|
|
5
|
+
- **ui-react:** add SlideSheet component with styles, interface, and stories ([b9d493c](https://github.com/Udixio/UI/commit/b9d493c))
|
|
6
|
+
- **theme:** add `onLoad` callback and enhance theme update logic ([7778504](https://github.com/Udixio/UI/commit/7778504))
|
|
7
|
+
|
|
8
|
+
### 🩹 Fixes
|
|
9
|
+
|
|
10
|
+
- **ui-react:** remove error state and replace with exception handling in ThemeProvider ([b8087e4](https://github.com/Udixio/UI/commit/b8087e4))
|
|
11
|
+
|
|
12
|
+
### 🧱 Updated Dependencies
|
|
13
|
+
|
|
14
|
+
- Updated @udixio/tailwind to 1.6.0
|
|
15
|
+
|
|
16
|
+
### ❤️ Thank You
|
|
17
|
+
|
|
18
|
+
- Joël VIGREUX
|
|
19
|
+
|
|
1
20
|
## 1.5.0 (2025-08-28)
|
|
2
21
|
|
|
3
22
|
### 🚀 Features
|
package/dist/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),se=require("clsx"),Pe=require("tailwind-merge"),a=require("react"),k=require("motion/react"),Ve=require("throttle-debounce"),We=require("react-dom"),De=require("@udixio/theme"),$e=require("@udixio/tailwind"),Fe=require("react-textarea-autosize"),oe=Pe.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"]}}}),m=(...e)=>oe(se.clsx(e)),le=(...e)=>oe(se.clsx(e));function qe(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 ae=e=>{const t={};e.classNameList.forEach(s=>{var n;if(s)if(typeof s=="string")(t[n=e.default]??(t[n]=[])).push(s);else{const i=s(e.states);Object.entries(i).map(f=>{const[c,d]=f;(t[c]??(t[c]=[])).push(d)})}});const r=t;return Object.entries(t).map(s=>{let[n,i]=s;i=i.reverse(),n==e.default&&i.unshift("relative"),i.unshift(qe(n)),r[n]=le(...i)}),r},H=(e,t)=>r=>ae({classNameList:[r.className,t],default:e,states:r}),ce=H("button",({variant:e,disableTextMargins:t,disabled:r,iconPosition:s,icon:n,isActive:i,loading:f,shape:c,onToggle:d,size:o,allowShapeTransformation:x})=>({button:m(" relative cursor-pointer group outline-none inline-block flex justify-center items-center ",o==="xSmall"&&"text-label-large px-3 py-1.5 gap-1",o==="small"&&"text-label-large px-4 py-2.5 gap-2",o==="medium"&&"text-title-medium px-6 py-4 gap-2",o==="large"&&"text-headline-small px-12 py-8 gap-3",o==="xLarge"&&"text-headline-large px-16 py-12 gap-4",c==="rounded"&&{"rounded-[30px]":o==="xSmall"||o=="small","rounded-[40px]":o==="medium","rounded-[70px]":o==="large"||o=="xLarge"},(c==="squared"||x&&i)&&{"rounded-[12px]":o==="xSmall"||o=="small","rounded-[16px]":o==="medium","rounded-[28px]":o==="large"||o=="xLarge"},x&&!r&&{"active:rounded-[12px]":o==="xSmall"||o=="small","active:rounded-[16px]":o==="medium","active:rounded-[28px]":o==="large"||o=="xLarge"},e==="elevated"&&{"shadow-1 hover:shadow-2":!r,"bg-surface-container-low text-primary":!r&&!i,"bg-primary text-on-primary":!r&&i,"text-on-surface/[38%]":r},e==="filled"&&{"hover:shadow-1":!r,"bg-surface-container text-on-surface-variant":!r&&!i&&d,"bg-primary text-on-primary":!r&&(i&&d||!d),"text-on-surface/[38%]":r},e==="tonal"&&{"hover:shadow-1":!r,"bg-secondary-container text-on-secondary-container":!r&&!i,"bg-secondary text-on-secondary":!r&&i,"text-on-surface/[0.38]":r},e==="outlined"&&[" border",{"border-on-surface/[0.12] text-on-surface/[0.38]":r,"text-primary border-outline focus:border-primary":!r&&!i,"text-inverse-on-surface bg-inverse-surface border-inverse-surface":!r&&i}],e==="text"&&["w-fit",{"text-primary":!r,"text-on-surface/[0.38]":r},t&&[o==="xSmall"&&"-mx-3 ",o==="small"&&"-mx-4 ",o==="medium"&&"-mx-6 ",o==="large"&&"-mx-12",o==="xLarge"&&"-mx-16 "]],r&&"cursor-default"),touchTarget:m("absolute -translate-x-1/2 -translate-y-1/2 left-1/2 top-1/2 h-12 w-full"),stateLayer:m("min-h-full min-w-full absolute top-0 left-0 overflow-hidden",e==="elevated"&&{"bg-on-surface/[0.12]":r,"group-state-primary":!r},e==="filled"&&{"bg-on-surface/[0.12]":r,"group-state-on-primary":!r&&!d,"group-state-on-surface-variant":!r&&d},c==="rounded"&&{"rounded-[30px]":o==="xSmall"||o=="small","rounded-[40px]":o==="medium","rounded-[70px]":o==="large"||o=="xLarge"},(c==="squared"||x&&i)&&{"rounded-[12px]":o==="xSmall"||o=="small","rounded-[16px]":o==="medium","rounded-[28px]":o==="large"||o=="xLarge"},x&&!r&&{"group-active:rounded-[12px]":o==="xSmall"||o=="small","group-active:rounded-[16px]":o==="medium","group-active:rounded-[28px]":o==="large"||o=="xLarge"},e==="tonal"&&{"bg-on-surface/[0.12]":r,"group-state-on-secondary-container ":!r},e==="outlined"&&{"group-state-primary group-state-primary":!r},e==="text"&&{"group-state-primary":!r}),label:m({invisible:f}),icon:m({invisible:f},o==="xSmall"&&"size-5",o==="small"&&"size-5",o==="medium"&&"size-6",o==="large"&&"size-8",o==="xLarge"&&"size-10")})),ue=H("card",({variant:e,isInteractive:t})=>({card:m("card 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"),stateLayer:m(["w-full top-0 left-0 h-full absolute -z-10",{" group-hover/card:hover-state-on-surface group-focus-visible/card:focus-state-on-surface":t}])})),ie=H("carouselItem",()=>({carouselItem:m("rounded-[28px] overflow-hidden flex-none")})),fe=H("carousel",()=>({carousel:m(["w-full h-[400px]"]),track:m("grid grid-flow-col h-full transition-transform ease-out w-fit")})),de=H("divider",({orientation:e})=>({divider:m("border-outline-variant ",{"h-fit w-full border-t":e==="horizontal"},{"h-auto self-stretch w-fit border-l":e==="vertical"})})),me=H("fab",({size:e,variant:t,isExtended:r})=>({fab:m("flex shadow-3 hover:shadow-4 group overflow-hidden outline-none items-center cursor-pointer",{"rounded-[12px]":e=="small"&&!r,"rounded-[16px]":e=="medium"||r,"rounded-[28px]":e=="large"&&!r},{"p-2":e=="small"&&!r,"p-4":e=="medium"||r,"p-[30px]":e=="large"&&!r},t==="surface"&&"bg-surface-container",t==="primary"&&"bg-primary-container",t==="secondary"&&"bg-secondary-container",t==="tertiary"&&"bg-tertiary-container"),stateLayer:m("absolute w-full h-full overflow-hidden left-1/2 top-1/2 transform -translate-y-1/2 -translate-x-1/2",t==="surface"&&"group-hover:hover-state-primary group-focus:focus-state-primary",t==="primary"&&"group-hover:hover-state-on-primary-container group-focus-visible:focus-state-on-primary-container",t==="secondary"&&"group-hover:hover-state-on-secondary-container group-focus-visible:focus-state-on-secondary-container",t==="tertiary"&&"group-hover:hover-state-on-tertiary-container group-focus-visible:focus-state-on-tertiary-container"),icon:m({"size-6":e=="small"||e=="medium"||r,"size-9":e=="large"&&!r},t==="surface"&&"text-primary",t==="primary"&&"text-on-primary-container",t==="secondary"&&"text-on-secondary-container",t==="tertiary"&&"text-on-tertiary-container"),label:m("text-title-medium text-nowrap",t==="surface"&&"text-primary",t==="primary"&&"text-on-primary-container",t==="secondary"&&"text-on-secondary-container",t==="tertiary"&&"text-on-tertiary-container")})),pe=H("iconButton",({variant:e,disabled:t,onToggle:r,isActive:s,size:n,width:i,shape:f,allowShapeTransformation:c})=>({iconButton:m("rounded-full relative flex transition-all duration-300","group cursor-pointer",{"cursor-default":t},(f==="rounded"||f==="squared"&&r&&!t&&s&&c)&&{"rounded-[30px]":n==="xSmall"||n=="small","rounded-[40px]":n==="medium","rounded-[70px]":n==="large"||n=="xLarge"},(f==="squared"||f==="rounded"&&r&&!t&&s&&c)&&{"rounded-[12px]":n==="xSmall"||n=="small","rounded-[16px]":n==="medium","rounded-[28px]":n==="large"||n=="xLarge"},c&&!t&&{"group-active:rounded-[12px]":n==="xSmall"||n=="small","group-active:rounded-[16px]":n==="medium","group-active:rounded-[28px]":n==="large"||n=="xLarge"},e==="filled"&&[!t&&{"bg-surface-container":!s&&!!r,"bg-primary":s||!r},!!t&&"bg-on-surface/[0.12]"],e==="tonal"&&[!t&&{"bg-surface-container":!s&&!!r,"bg-secondary-container":s||!r},!!t&&"bg-on-surface/[0.12]"],e==="outlined"&&[!t&&{"border border-outline":!s,"border border-transparent bg-inverse-surface":s},!!t&&{"border border-on-surface/[0.12]":!s,"border border-transparent bg-on-surface/[0.12]":s}]),touchTarget:m("absolute -translate-x-1/2 -translate-y-1/2 left-1/2 top-1/2 h-12 w-full"),stateLayer:m("absolute top-0 left-0 h-full w-full overflow-hidden",(f==="rounded"||f==="squared"&&r&&!t&&s&&c)&&{"rounded-[30px]":n==="xSmall"||n=="small","rounded-[40px]":n==="medium","rounded-[70px]":n==="large"||n=="xLarge"},(f==="squared"||f==="rounded"&&r&&!t&&s&&c)&&{"rounded-[12px]":n==="xSmall"||n=="small","rounded-[16px]":n==="medium","rounded-[28px]":n==="large"||n=="xLarge"},c&&!t&&{"group-active:rounded-[12px]":n==="xSmall"||n=="small","group-active:rounded-[16px]":n==="medium","group-active:rounded-[28px]":n==="large"||n=="xLarge"},!t&&[e==="standard"&&{"state-on-surface-variant":!s,"state-primary":s},e==="filled"&&{"state-primary":!s&&!!r,"state-inverse-on-surface":s||!r},e==="tonal"&&{"state-on-surface-variant":!s&&!!r,"state-on-secondary-container":s||!r},e==="outlined"&&{"state-on-surface-variant":!s,"state-on-primary":s}]),icon:m(" transition-all duration-300",{"size-5 p-1.5":n==="xSmall"},{"size-6 p-2":n==="small"},{"size-6 p-4":n==="medium"},{"size-8 p-8":n==="large"},{"size-10 p-12":n==="xLarge"},i=="narrow"&&[{"px-1":n==="xSmall"},{"px-1":n==="small"},{"px-3":n==="medium"},{"px-4":n==="large"},{"px-8":n==="xLarge"}],i=="wide"&&[{"px-2.5":n==="xSmall"},{"px-3.5":n==="small"},{"px-6":n==="medium"},{"px-12":n==="large"},{"px-[72px]":n==="xLarge"}],!t&&[e==="standard"&&{"text-on-surface-variant":!s,"text-primary":s},e==="filled"&&{"text-primary":!s&&!!r,"text-on-primary":s||!r},e==="tonal"&&{"text-on-surface-variant":!s&&!!r,"text-on-secondary-container":s||!r},e==="outlined"&&{"text-on-surface-variant":!s,"text-inverse-on-surface":s}],!!t&&"text-on-surface/[0.38]")})),he=H("progressIndicator",({variant:e,isVisible:t})=>({progressIndicator:m((e==="linear-determinate"||e=="linear-indeterminate")&&"flex w-full h-1"),track:m("h-full rounded-full bg-primary rounded-l-full",{"max-h-0":!t,"max-h-full":t}),activeIndicator:m({"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:m("absolute top-1/2 -translate-y-1/2 right-0 bg-primary rounded-full size-1",{"max-h-0":!t,"max-h-full":t})})),xe=H("slider",({isChanging:e})=>({slider:m(["relative w-full h-11 flex items-center rounded gap-x-1.5 cursor-pointer"]),activeTrack:m(["h-4 relative transition-all duration-100 bg-primary overflow-hidden rounded-l-full "]),inactiveTrack:m(["h-4 relative transition-all duration-100 bg-primary-container rounded-r-full overflow-hidden"]),handle:m(["transform transition-all duration-100 bg-primary h-full rounded-full ",{"w-0.5":e,"w-1":!e}]),valueIndicator:m(["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:m(["h-1 w-1 absolute transform -translate-y-1/2 -translate-x-1/2 top-1/2 rounded-full"])})),ye=H("snackbar",()=>({snackbar:m(" rounded bg-inverse-surface "),container:m("pl-4 pr-2 max-w-full py-1 flex items-center flex-wrap"),supportingText:m("text-body-medium text-inverse-on-surface "),icon:m(" ml-auto mr-0 text-inverse-on-surface block dark")})),ge=H("switch",({isSelected:e,disabled:t,inactiveIcon:r})=>({switch:m("group 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:m("flex items-center justify-center absolute",{"left-[14px]":!e},{"right-[14px]":e}),handle:m("transition-all duration-100 z-10 rounded-full flex items-center justify-center",{"w-[16px] h-[16px]":!e&&!r},{"w-[24px] h-[24px]":!(!e&&!r)},!t&&["cursor-pointer group-active:h-[28px] group-active:w-[28px]",{"bg-on-primary group-hover:bg-primary-container":e},{"bg-outline group-hover:bg-on-surface-variant":!e}],{"bg-surface":t}),handleStateLayer:m("w-[40px] h-[40px] -z-10 rounded-full absolute",{"group-state-primary":!t}),icon:m("w-[16px] h-[16px]",!t&&[{"text-on-primary-container":e},{"text-on-primary":!e}],{"text-on-surface/[0.38]":t})})),ve=H("tab",({isSelected:e,icon:t,label:r,variant:s})=>({tab:m("bg-surface flex-1 group outline-none flex px-4 justify-center items-center cursor-pointer",{"z-10":e},!!(t&&r)&&s==="primary"&&"h-16",!(t&&r&&s==="primary")&&"h-12"),stateLayer:m("absolute w-full h-full overflow-hidden left-1/2 top-1/2 transform -translate-y-1/2 -translate-x-1/2",s==="primary"&&{"group-hover:hover-state-on-surface group-focus-visible:focus-state-on-surface":!e,"group-hover:hover-state-primary group-focus-visible:focus-state-primary":e},s==="secondary"&&"group-hover:hover-state-on-surface group-focus-visible:focus-state-on-surface"),content:m("flex gap-0.5 h-full justify-center",{relative:s=="primary"},{"":!!(r&&!t)},s==="primary"&&"flex-col items-center",s==="secondary"&&{"flex-col items-center":!(r&&t),"flex-row items-center gap-2":!!(r&&t)}),icon:m("h-6 w-6 p-0.5 !box-border",s==="primary"&&{"text-on-surface-variant":!e,"text-primary":e},s==="secondary"&&{"text-on-surface-variant":!e,"text-on-surface":e}),label:m("text-title-small text-nowrap",s==="primary"&&{"text-on-surface-variant":!e,"text-primary":e},s==="secondary"&&{"text-on-surface-variant":!e,"text-on-surface":e}),underline:m("bg-primary absolute w-full left-0 bottom-0",s==="primary"&&"h-[3px] rounded-t",s==="secondary"&&"h-0.5")})),we=H("tabs",({scrollable:e})=>({tabs:m("border-b border-surface-container-highest","flex relative ",{"overflow-x-auto":e})})),be=H("textField",({disabled:e,leadingIcon:t,trailingIcon:r,variant:s,errorText:n,isFocused:i,value:f,suffix:c,textLine:d})=>({textField:m({"opacity-[.38]":e}),content:m("group transition-border duration-200 relative flex items-center ",{"h-14":d=="singleLine"},{"border-on-surface-variant":!(n!=null&&n.length)&&!i&&s=="filled","border-outline":!(n!=null&&n.length)&&!i&&s=="outlined","border-primary":!(n!=null&&n.length)&&i,"border-error":!!(n!=null&&n.length)},{"bg-on-surface/[0.04]":e},s=="filled"&&["rounded-t overflow-hidden border-b",{"bg-surface-container-highest":!e}],s=="outlined"&&["border rounded box-border",{"border-[3px]":i}]),stateLayer:m("absolute -z-10 w-full h-full top-0 left-0",{hidden:s=="outlined"},{"group-state-on-surface":!e,"focus-state-on-surface":i}),label:m("inline-flex outline-none whitespace-nowrap",{"text-on-surface-variant":!e&&!(n!=null&&n.length)},{"text-on-surface":e},{"text-error":!!(n!=null&&n.length)},{"text-primary":!(n!=null&&n.length)&&i}),input:m("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":!!c},s=="filled"&&" pb-2 pt-6",s=="outlined"&&"py-4 relative z-10"),activeIndicator:m("absolute w-0 inset-x-0 border-rounded mx-auto bottom-0",s=="filled"&&["h-[2px] transition-all duration-300",{"bg-primary":!(n!=null&&n.length)},{"bg-error":!!(n!=null&&n.length)},{"!w-full":i}]),supportingText:m(" text-body-small px-4 pt-1",{"text-on-surface-variant":!e&&!(n!=null&&n.length)},{"text-on-surface":e},{"!w-full":i},{"text-error":!!(n!=null&&n.length)}),leadingIcon:m(["h-12 ml-3 flex items-center justify-center",{"cursor-text":!a.isValidElement(t)}]),trailingIcon:m("h-12 w-12 flex items-center justify-center",{"cursor-text":!a.isValidElement(r)}),suffix:m("text-on-surface-variant pl-0 pr-4",s=="filled"&&" pb-2 pt-6",s=="outlined"&&"py-4 relative z-10")})),je=H("toolTip",({position:e,variant:t})=>({toolTip:m(" 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:m("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:m("flex gap-10 px-1 mt-2",t=="plain"&&"hidden"),subHead:m("text-title-small mb-1",t=="plain"&&"hidden"),supportingText:m("")})),K=({icon:e,colors:t=[],className:r})=>{if(typeof e=="string"){let o=e;return t[0]&&(o=o.replace(/<svg([^>]*)>/,`<svg$1 fill="${t[0]}" color="${t[0]}">`),o=o.replace(/<path([^>]*?)>/g,'<path$1 fill="currentColor">')),l.jsx("div",{className:m("size-5 box-content inline-flex fill-current",r),style:{color:t[0]||"inherit"},dangerouslySetInnerHTML:{__html:o}})}if(e&&typeof e=="object"&&"src"in e){const o=e;return l.jsx("img",{src:o.src,width:o.width,height:o.height,className:m("size-5 box-content",r),style:{filter:t[0]?"brightness(0) saturate(100%) invert(1)":void 0},alt:"","aria-hidden":"true"})}const s=e;if(!(s!=null&&s.prefix))throw new Error(`Invalid icon type: ${typeof e}`);const{icon:n}=s,[i,f,,,c]=n||[],d=o=>{switch(o.length){case 2:return{"--fa-primary-color":o[0]||"inherit","--fa-secondary-color":o[1]||"inherit"};case 1:return{color:o[0]};default:return{}}};return l.jsx("svg",{className:m("size-5 box-content",r),style:{...d(t)},xmlns:"http://www.w3.org/2000/svg",viewBox:`0 0 ${i} ${f}`,role:"img","aria-hidden":"true",children:typeof c=="string"?l.jsx("path",{className:"fill-current",d:c}):c.map((o,x)=>l.jsx("path",{d:o},x))})},Ne=({variant:e="linear-determinate",value:t=0,transitionDuration:r=1e3,className:s,...n})=>{const[i,f]=a.useState(t),[c]=a.useState(1.5);a.useEffect(()=>{t>100&&(t=100),t<0&&(t=0),f(t)},[t]);const[d,o]=a.useState(!0),x=()=>d?c:c*.5;a.useEffect(()=>{if((e==="circular-indeterminate"||e==="linear-indeterminate")&&i!==100){const b=setInterval(()=>{f(d?10:90),o(!d)},x()*1e3);return()=>clearInterval(b)}},[e,d,i]);const[h,u]=a.useState(!1);a.useEffect(()=>{if(i>=100){const b=setTimeout(()=>{u(!1)},r);return()=>{clearTimeout(b)}}else u(!0)},[i,r]);const y=he({className:s,variant:e,value:t,transitionDuration:r,isVisible:h});return l.jsxs(l.Fragment,{children:[(e==="linear-determinate"||e=="linear-indeterminate")&&l.jsxs("div",{className:y.progressIndicator,...n,children:[l.jsx("div",{style:{width:`${i}%`,transition:`width ${r}ms ease-in-out ${i==100?", max-height 200ms 0.5s ease-in-out":""}`},className:y.track}),l.jsx("div",{style:{marginLeft:i!=100?"6px":"0px",transition:`width ${r}ms ease-in-out ${i==100?`, max-height 200ms 0.5s ease-in-out, margin-left ${r}ms ${r/1.5}ms`:""}`},className:y.activeIndicator}),l.jsx("div",{style:{width:"4 px",transition:`width ${r}ms ease-in-out, max-height 200ms 0.5s ease-in-out`},className:y.stop})]}),(e==="circular-determinate"||e=="circular-indeterminate")&&l.jsx(k.motion.svg,{width:"48",height:"48",viewBox:"0 0 48 48",initial:{rotate:-90},animate:{rotate:270},transition:{repeat:1/0,duration:x(),ease:"linear"},className:y.progressIndicator,...n,children:l.jsx(k.motion.circle,{cx:"50%",cy:"50%",r:h?"calc(50% - 2px)":"50%",style:{strokeLinecap:"round"},initial:"hidden",animate:"visible",className:y.activeIndicator,variants:{hidden:{pathLength:d?10/100:90/100},visible:{pathLength:d?90/100:10/100}},transition:{pathLength:{type:"tween",ease:"linear",duration:x(),bounce:0}}})},d+"")]})},J=({colorName:e="on-surface",triggerRef:t})=>{const r={initial:{opacity:0,borderRadius:"50%",width:"25%",height:"25%"},animate:{opacity:1,borderRadius:0,width:"200%",height:"200%",transition:{duration:.3,borderRadius:{duration:.3,delay:.3}}}},[s,n]=a.useState(!0),[i,f]=a.useState(!1),[c,d]=a.useState({x:0,y:0});a.useEffect(()=>{i&&(n(!0),n(!1))},[i]),a.useEffect(()=>{const u=t==null?void 0:t.current;if(u)return u.addEventListener("mousedown",o),u.addEventListener("mouseup",h),u.addEventListener("mouseleave",x),()=>{u.removeEventListener("mousedown",o),u.removeEventListener("mouseup",h),u.removeEventListener("mouseleave",x)}},[t]);const o=u=>{const y=t==null?void 0:t.current,b=y.getBoundingClientRect();f(!0),d({x:(u.clientX-b.left)/y.clientWidth*100,y:(u.clientY-b.top)/y.clientHeight*100})},x=u=>{f(!1)},h=u=>{f(!1)};return l.jsx(k.AnimatePresence,{mode:"wait",children:(i||!i&&!s)&&l.jsx(k.motion.div,{style:{position:"absolute",width:"100%",height:"100%",top:c.y+"%",left:c.x+"%",background:`color-mix(in srgb, var(--color-${e}) 12%, transparent)`,pointerEvents:"none"},variants:r,initial:"initial",animate:"animate",exit:{opacity:0,transition:{duration:0}},onAnimationComplete:()=>n(!0),className:"transform -translate-x-1/2 -translate-y-1/2"})})},Se=H("customScroll",({orientation:e,draggable:t,isDragging:r})=>({customScroll:m("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":r,"[&::-webkit-scrollbar-thumb]:bg-transparent":!r},{"[&::-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&&!r,"cursor-grabbing":t&&r}),track:m("overflow-hidden flex-none sticky",{"left-0 h-full":e==="horizontal","top-0 w-full":e==="vertical"})})),T=({children:e,orientation:t="vertical",scrollSize:r,onScroll:s,className:n,draggable:i=!1,throttleDuration:f=75})=>{var V,D;const c=a.useRef(null),d=a.useRef(null),[o,x]=a.useState({width:null,height:null});a.useEffect(()=>{if(!c.current)return;const R=new ResizeObserver($=>{for(const F of $)F.target===c.current&&x({width:F.contentRect.width,height:F.contentRect.height})});return R.observe(c.current),()=>{R.disconnect()}},[c]);const h=a.useRef(null),u=a.useRef(null),y=()=>{const R=d.current;return R?{width:r??R.scrollWidth,height:r??R.scrollHeight}:null},b=()=>{const R=c.current;return R?{width:R.clientWidth,height:R.clientHeight}:null},{scrollYProgress:S,scrollXProgress:N}=k.useScroll({container:c}),E=a.useRef(null);E.current||(E.current=Ve.throttle(f,(R,$)=>{!u.current||!h.current||s&&(t==="horizontal"&&$==="x"&&s({scrollProgress:R,scroll:R*h.current.width,scrollTotal:h.current.width,scrollVisible:u.current.width}),t==="vertical"&&$==="y"&&s({scrollProgress:R,scroll:R*h.current.height,scrollTotal:h.current.height,scrollVisible:u.current.height}))}));const w=(R,$)=>{E.current&&E.current(R,$)};a.useEffect(()=>{o.width&&w(N.get(),"x"),o.height&&w(S.get(),"y")},[o]),k.useMotionValueEvent(N,"change",R=>{w(R,"x")}),k.useMotionValueEvent(S,"change",R=>{w(R,"y")});const[B,j]=a.useState(!1);a.useLayoutEffect(()=>{B||!u.current||!h.current||!s||(s({scrollProgress:0,scroll:0,scrollTotal:t=="vertical"?h.current.height:h.current.width,scrollVisible:t=="vertical"?u.current.height:u.current.width}),j(!0))},[u,h,s]),h.current=y(),u.current=b();const[L,C]=a.useState(!1),W=Se({isDragging:L,children:e,className:n,onScroll:s,orientation:t,scrollSize:r,draggable:i,throttleDuration:f}),[P,I]=a.useState(0),[p,M]=a.useState(0),q=R=>{if(!i)return;const $=c.current;if(!$||P==null)return;const G=(R.pageX-$.offsetLeft-P)*1.5;$.scrollLeft=p-G},O=R=>{const $=c.current;$&&(C(!0),I(R.pageX-$.offsetLeft),M($.scrollLeft))},_=R=>{L&&(R.preventDefault(),q(R))},U=()=>{C(!1)},Y=()=>{C(!1)},v=R=>{R.preventDefault()},g=a.useRef(null);return a.useEffect(()=>()=>{g.current&&clearTimeout(g.current)},[]),l.jsxs("div",{className:W.customScroll,ref:c,onMouseDown:O,onMouseMove:_,onMouseUp:U,onMouseLeave:Y,onDragStart:v,onScroll:R=>{L||(I(null),C(!0),g.current&&clearTimeout(g.current),g.current=setTimeout(()=>{C(!1)},1e3))},children:[l.jsx("div",{ref:d,style:t==="vertical"?{height:((V=u==null?void 0:u.current)==null?void 0:V.height)??"100%"}:{width:((D=u==null?void 0:u.current)==null?void 0:D.width)??"100%"},className:W.track,children:e}),u.current&&h.current&&l.jsxs(l.Fragment,{children:[t==="vertical"&&h.current.height>u.current.height&&l.jsx(k.motion.div,{className:"flex-none",style:{height:h.current.height-u.current.height}}),t==="horizontal"&&h.current.width>u.current.width&&l.jsx(k.motion.div,{className:"flex-none",style:{width:h.current.width-u.current.width}})]})]})},Ue=({children:e,transition:t=".5s",orientation:r="vertical",throttleDuration:s=25,...n})=>{const[i,f]=a.useState(null),c=k.motionValue((i==null?void 0:i.scrollProgress)??0),d=k.useTransform(c,[0,1],[0,1-((i==null?void 0:i.scrollVisible)??0)/((i==null?void 0:i.scrollTotal)??0)]),o=k.useTransform(d,u=>`${-u*100}%`),x=u=>{c.set(u.scrollProgress),u.scrollTotal>0&&f(u)},h=a.useRef(null);return k.useMotionValueEvent(o,"change",u=>{const y=performance.now();if(h.current!==null){const b=y-h.current;console.log(`Delta temps : ${b} ms`)}h.current=y,console.log(u)}),l.jsx(T,{onScroll:x,throttleDuration:s,...n,children:l.jsx(k.motion.div,{className:m("transition-transform ease-out",{"w-fit h-full":r==="horizontal","h-fit w-full":r==="vertical"}),style:{transitionDuration:t,...r=="vertical"?{y:o}:{x:o}},children:e})})},Ee=({targetRef:e,children:t})=>{const[r,s]=a.useState(null),n=a.useRef(null),i=()=>{const f=e.current;if(!f)return;const c=f.getBoundingClientRect();s({position:"fixed",top:c.top,left:c.left,width:c.width,height:c.height,pointerEvents:"none",zIndex:999})};return a.useEffect(()=>{const f=e.current;if(f)return i(),window.addEventListener("scroll",i,!0),window.addEventListener("resize",i),n.current=new ResizeObserver(i),n.current.observe(f),()=>{var c;window.removeEventListener("scroll",i,!0),window.removeEventListener("resize",i),(c=n.current)==null||c.disconnect()}},[e]),r?We.createPortal(l.jsx("div",{style:r,children:t}),document.body):null};function He(e){return/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(e)}const Oe=({config:e,throttleDelay:t=100})=>{const[r,s]=a.useState(null),[n,i]=a.useState(null),f=a.useRef(null),c=a.useRef(e.sourceColor),d=a.useRef(!0);a.useEffect(()=>{if(d.current){d.current=!1,c.current=e.sourceColor,o(e.sourceColor);return}if(e.sourceColor!==c.current)return f.current&&clearTimeout(f.current),f.current=setTimeout(()=>{c.current=e.sourceColor,o(e.sourceColor),f.current=null},t),()=>{f.current&&(clearTimeout(f.current),f.current=null)}},[e.sourceColor,t]);const o=async x=>{if(!He(x)){s("Invalid hex color");return}s(null);try{const h=await De.loader(e);h.themes.update({sourceColorHex:x}),await h.load();const u=h.plugins.getPlugin($e.TailwindPlugin).getInstance().outputCss;u&&i(u)}catch(h){s(h instanceof Error?h.message:"Theme loading failed")}};return a.useEffect(()=>()=>{f.current&&clearTimeout(f.current)},[]),r?null:n?l.jsx("style",{dangerouslySetInnerHTML:{__html:n}}):(console.error("ThemeProvider null"),null)},Le=({variant:e="filled",disabled:t=!1,icon:r,href:s,label:n,disableTextMargins:i,className:f,iconPosition:c="left",loading:d=!1,shape:o="rounded",onClick:x,onToggle:h,activated:u,ref:y,size:b="medium",allowShapeTransformation:S=!0,transition:N,children:E,...w})=>{if(E&&(n=E),!n)throw new Error("Button component requires either a label prop or children content");const B=s?"a":"button",j=a.useRef(null),L=y||j,[C,W]=a.useState(u);a.useEffect(()=>{W(u)},[u]),N={duration:.3,...N};let P;h?h&&(P=M=>{t&&M.preventDefault();const q=!C;W(q),h(q)}):P=M=>{t&&M.preventDefault(),x&&x(M)};const I=ce({allowShapeTransformation:S,size:b,disableTextMargins:i,shape:o,href:s,disabled:t,icon:r,iconPosition:c,loading:d,variant:e,transition:N,className:f,isActive:C??!1,onToggle:h,activated:C,label:n,children:n}),p=r?l.jsx(K,{icon:r,className:I.icon}):l.jsx(l.Fragment,{});return l.jsxs(B,{ref:L,href:s,className:I.button,...w,onClick:P,disabled:t,"aria-pressed":h?C:void 0,style:{transition:N.duration+"s"},children:[l.jsx("div",{className:I.touchTarget}),l.jsx("div",{className:I.stateLayer,style:{transition:N.duration+"s"},children:!t&&l.jsx(J,{colorName:e==="filled"&&h&&"on-surface-variant"||e==="filled"&&!h&&"on-primary"||e==="elevated"&&"primary"||e==="tonal"&&"on-secondary-container"||e==="outlined"&&"primary"||e==="text"&&"primary"||"",triggerRef:L})}),c==="left"&&p,d&&l.jsx("div",{className:"!absolute left-1/2 -translate-x-1/2 top-1/2 -translate-y-1/2",children:l.jsx(Ne,{className:()=>({progressIndicator:"h-6 w-6",activeIndicator:m({"!stroke-primary":e==="elevated"&&!t,"!stroke-on-surface/[38%]":e==="elevated"&&t},{"!stroke-on-primary":e==="filled"&&!t,"!stroke-on-surface/[38%]":e==="filled"&&t},{"!stroke-on-secondary-container":e==="tonal"&&!t,"!stroke-on-surface/[38%]":e==="tonal"&&t},{"!stroke-primary":e==="outlined"&&!t,"!stroke-on-surface/[38%]":e==="outlined"&&t},{"!stroke-primary":e==="text"&&!t,"!stroke-on-surface/[38%]":e==="text"&&t})}),variant:"circular-indeterminate"})}),l.jsx("span",{className:I.label,children:n}),c==="right"&&p]})},Xe=({variant:e="outlined",className:t,children:r,isInteractive:s=!1,ref:n,...i})=>{const f=ue({className:t,isInteractive:s,variant:e,children:r}),c=a.useRef(null),d=n||c;return l.jsxs("div",{...i,ref:d,className:f.card,children:[l.jsx("div",{className:f.stateLayer,children:s&&l.jsx(J,{colorName:"on-surface",triggerRef:d})}),r]})},Ie=(e,t,r=[0,1])=>{const[s,n]=t,[i,f]=r,d=(Math.max(s,Math.min(e,n))-s)/(n-s);return i+d*(f-i)},Re=({className:e,children:t,width:r=1,index:s=0,ref:n,...i})=>{const f=a.useRef(null),c=n||f,d=ie({className:e,index:s,width:r,children:t});return l.jsx(k.motion.div,{ref:c,animate:{width:r+"px"},transition:{duration:.5,ease:"linear"},className:d.carouselItem,...i,children:t})},_e=({variant:e="hero",className:t,children:r,ref:s,marginPourcent:n=0,inputRange:i=[.21,.65],outputRange:f=[42,300],gap:c=8,onChange:d,scrollSensitivity:o=1.25,...x})=>{var U,Y;const h=a.useRef(null),u=s||h,y=fe({className:t,children:r,variant:e,inputRange:i,outputRange:f,marginPourcent:n,onChange:d,gap:c,scrollSensitivity:o}),b=a.Children.toArray(r).filter(v=>a.isValidElement(v)&&v.type===Re),S=a.useRef(null),[N,E]=a.useState([]),[w,B]=a.useState(null),j=()=>{var $;if(!S.current||!u.current||!w)return[];const{scrollVisible:v,scrollProgress:g}=w;function V(F,G){return F.map(Z=>(Z-G)/Math.abs(F[1]-F[0]))}let D=b.map((F,G)=>{if(!L[G].current||!S.current)return 0;let Q=G/(b.length-1);return Q>1&&(Q=1),Q<0&&(Q=0),Q});D=V(D,g);let R=(((($=u.current)==null?void 0:$.clientWidth)??v)-(f[0]+c))/(f[1]+c);return D.map((F,G)=>({value:Math.abs(F),originalIndex:G})).sort((F,G)=>F.value-G.value).forEach((F,G)=>{G===0&&W(F.originalIndex);let Z=Ie(R,[0,1],[0,f[1]]);Z<f[0]&&(Z=f[0]),R--,D[F.originalIndex]=Z}),D},L=a.useRef([]).current,[C,W]=a.useState(0);a.useEffect(()=>{d&&d(C)},[C]),L.length!==b.length&&b.forEach((v,g)=>{L[g]||(L[g]=a.createRef())});const P=b.map((v,g)=>a.cloneElement(v,{width:N[g],ref:L[g],key:g,index:g})),I=k.motionValue((w==null?void 0:w.scrollProgress)??0),p=k.useTransform(I,[0,1],[0,1-(((U=u.current)==null?void 0:U.clientWidth)??0)/(((Y=S==null?void 0:S.current)==null?void 0:Y.clientWidth)??0)]),M=k.useTransform(p,v=>`${-v*100}%`),q=v=>{v.scrollTotal>0&&B(v)};a.useEffect(()=>{const v=j();E(v)},[w]);const[O,_]=a.useState(0);return a.useLayoutEffect(()=>{let v=f[1];w&&v>w.scrollVisible&&(v=w.scrollVisible);const g=(v+c)*P.length/o;_(g)},[u,L,w]),l.jsx("div",{className:y.carousel,ref:u,...x,children:l.jsx(T,{draggable:!0,orientation:"horizontal",onScroll:q,scrollSize:O,children:l.jsx(k.motion.div,{className:y.track,ref:S,style:{transitionDuration:"0.5s",transitionTimingFunction:"ease-out",gap:`${c}px`,x:M},children:P})})})},Ge=({orientation:e="horizontal",className:t,...r})=>{const s=de({orientation:e,className:t});return l.jsx("hr",{className:s.divider,...r})},X=[];for(let e=0;e<256;++e)X.push((e+256).toString(16).slice(1));function Ke(e,t=0){return(X[e[t+0]]+X[e[t+1]]+X[e[t+2]]+X[e[t+3]]+"-"+X[e[t+4]]+X[e[t+5]]+"-"+X[e[t+6]]+X[e[t+7]]+"-"+X[e[t+8]]+X[e[t+9]]+"-"+X[e[t+10]]+X[e[t+11]]+X[e[t+12]]+X[e[t+13]]+X[e[t+14]]+X[e[t+15]]).toLowerCase()}let A;const Ye=new Uint8Array(16);function Ze(){if(!A){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");A=crypto.getRandomValues.bind(crypto)}return A(Ye)}const Je=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),ne={randomUUID:Je};function ee(e,t,r){var n;if(ne.randomUUID&&!e)return ne.randomUUID();e=e||{};const s=e.random??((n=e.rng)==null?void 0:n.call(e))??Ze();if(s.length<16)throw new Error("Random bytes length must be >= 16");return s[6]=s[6]&15|64,s[8]=s[8]&63|128,Ke(s)}const te=({variant:e="plain",buttons:t,className:r,children:s,title:n,text:i,position:f,targetRef:c,ref:d,trigger:o=["hover","focus"],...x})=>{if(!s&&!c)throw new Error("ToolTip must have a child or a targetRef");Array.isArray(o)||(o=[o]),t&&!Array.isArray(t)&&(t=[t]);const h=a.useRef(null),u=c||h,[y,b]=a.useState(null),[S]=a.useState(ee()),[N,E]=a.useState(!1),w=a.useRef(null);a.useEffect(()=>{const p=M=>{b(M.detail)};return document.addEventListener("tooltip-update",p),()=>{document.removeEventListener("tooltip-update",p)}},[]),a.useEffect(()=>{w.current&&clearTimeout(w.current),y?E(y===S):w.current=setTimeout(()=>{E(!1)},1200)},[y,S]);const B=()=>{if(o.includes("hover")){const p=new CustomEvent("tooltip-update",{detail:S});document.dispatchEvent(p)}},j=()=>{if(o.includes("hover")){const p=new CustomEvent("tooltip-update",{detail:null});document.dispatchEvent(p)}},L=()=>{if(o.includes("click")){const p=new CustomEvent("tooltip-update",{detail:N?null:S});document.dispatchEvent(p)}},C=()=>{if(o.includes("focus")){const p=new CustomEvent("tooltip-update",{detail:S});document.dispatchEvent(p)}},W=()=>{if(o.includes("focus")){const p=new CustomEvent("tooltip-update",{detail:null});document.dispatchEvent(p)}};a.useEffect(()=>{if(u!=null&&u.current){const p=u.current;return p.addEventListener("mouseenter",B),p.addEventListener("mouseleave",j),p.addEventListener("click",L),p.addEventListener("focus",C),p.addEventListener("blur",W),()=>{p.removeEventListener("mouseenter",B),p.removeEventListener("mouseleave",j),p.removeEventListener("click",L),p.removeEventListener("focus",C),p.removeEventListener("blur",W)}}},[u,o,S,N]);const P=!c&&a.isValidElement(s)?a.cloneElement(s,{ref:h}):s;if(!f&&typeof window<"u"&&u!=null&&u.current&&!f){const p=u.current.getBoundingClientRect(),M=window.innerWidth,q=window.innerHeight,O=p.left/M,_=p.top/q;e==="plain"?O<1/3?f="right":O>2/3?f="left":f=_>.5?"top":"bottom":O<1/2&&_<1/2?f="bottom-right":O>1/2&&_<1/2?f="bottom-left":O>1/2&&_>1/2?f="top-left":O<1/2&&_>1/2&&(f="top-right")}const I=je({variant:e,buttons:t,className:r,title:n,text:i,position:f,trigger:o,targetRef:c,children:s});return l.jsxs(l.Fragment,{children:[P,l.jsx(k.AnimatePresence,{children:N&&l.jsx(Ee,{targetRef:u,children:l.jsx(k.motion.div,{initial:{opacity:y?1:0},animate:{opacity:1},transition:{duration:y?0:.3},exit:{opacity:y?1:0},className:I.toolTip,...x,onMouseEnter:B,onMouseLeave:j,children:l.jsxs(k.motion.div,{className:I.container,layoutId:"tool-tip",transition:{type:"spring",stiffness:200,damping:20},children:[n&&l.jsx("div",{className:I.subHead,children:n}),l.jsx("div",{className:I.supportingText,children:i}),t&&l.jsx("div",{className:I.actions,children:Array.isArray(t)&&t.map((p,M)=>l.jsx(Le,{size:"small",variant:"text",...p},M))})]})})})})]})},z=({className:e,label:t,variant:r="primary",size:s="medium",href:n,type:i,icon:f,isExtended:c=!1,ref:d,transition:o,children:x,...h})=>{if(x&&(t=x),!t)throw new Error("FAB component requires either a label prop or children content");const u=n?"a":"button",y=me({href:n,icon:f,isExtended:c,label:t,size:s,variant:r,className:e,transition:o,children:t});o={duration:.3,...o};const b=a.useRef(null),S=d||b,N={visible:{width:"auto",marginLeft:12,opacity:1,transition:{...o,opacity:{duration:o.duration/2,delay:o.duration-o.duration/2}}},hidden:{width:0,marginLeft:0,opacity:0,transition:{...o,marginLeft:{duration:o.duration/2,delay:o.duration-o.duration/2}}}};return l.jsxs(u,{...h,ref:S,href:n,"aria-label":c?void 0:t,className:y.fab,children:[l.jsx(te,{trigger:c?null:void 0,text:t,targetRef:S}),l.jsx("span",{className:y.stateLayer,children:l.jsx(J,{colorName:m({primary:r=="surface","on-primary-container":r=="primary","on-secondary-container":r=="secondary","on-tertiary-container":r=="tertiary"}),triggerRef:S})}),l.jsx(K,{icon:f,className:y.icon}),l.jsx(k.AnimatePresence,{children:c&&l.jsx(k.motion.span,{variants:N,initial:"hidden",animate:"visible",exit:"hidden",className:y.label,children:t})})]})},re=({variant:e="standard",href:t,disabled:r=!1,type:s="button",title:n,label:i,onToggle:f,activated:c=!1,onClick:d,icon:o,size:x="medium",iconSelected:h,className:u,ref:y,width:b="default",shape:S="rounded",allowShapeTransformation:N=!0,transition:E,children:w,...B})=>{if(w&&(i=w),!i)throw new Error("IconButton component requires either a label prop or children content to provide an accessible aria-label");n||(n=i);const[j,L]=a.useState(c);let C;f?f&&(C=M=>{r&&M.preventDefault(),L(!j),f(!!j)},o=j&&h||o):C=M=>{r&&M.preventDefault(),d&&d(M)},a.useEffect(()=>{L(c)},[c]);const W=t?"a":"button",P=pe({transition:E,shape:S,allowShapeTransformation:N,width:b,href:t,activated:j,label:i,iconSelected:h,isActive:j,onToggle:f,disabled:r,icon:o,variant:e,className:u,size:x,children:i,...B}),I=a.useRef(null),p=y||I;return E={duration:.3,...E},l.jsxs(W,{disabled:r,href:t,style:{transition:E.duration+"s"},className:P.iconButton,"aria-label":i,...B,title:void 0,onClick:C,ref:p,children:[l.jsx(te,{targetRef:p,trigger:r?null:void 0,text:n}),l.jsx("div",{className:P.touchTarget}),l.jsx("div",{className:P.stateLayer,style:{transition:E.duration+"s"},children:!r&&l.jsx(J,{colorName:m(e==="standard"&&{"on-surface-variant":!j,primary:j},e==="filled"&&{primary:!j&&!!f,"inverse-on-surface":j||!f},e==="tonal"&&{"on-surface-variant":!j&&!!f,"on-secondary-container":j||!f},e==="outlined"&&{"on-surface-variant":!j,"on-primary":j}),triggerRef:p})}),o&&l.jsx(K,{icon:o,className:P.icon})]})},Qe=({className:e,valueFormatter:t,step:r=10,name:s,value:n=0,min:i=0,max:f=100,marks:c=[{value:0,label:"0"},{value:100,label:"100"}],ref:d,onChange:o,...x})=>{const h=v=>{const g=y(),V=u();return v===1/0?100:v===-1/0?0:(v-g)/(V-g)*100},u=(v=!1)=>v?f:f==1/0?c[(c==null?void 0:c.length)-1].value:f,y=(v=!1)=>v?i:i==-1/0?c[0].value:i,b=v=>{const g=y(!1);return(u(!1)-g)*v/100+g},[S,N]=a.useState(!1),E=a.useRef(null),w=d||E,[B,j]=a.useState(n),[L,C]=a.useState(h(n)),[W,P]=a.useState(!1),I=v=>{P(!0),N(!0),q(v)},p=()=>{P(!1),N(!1)};a.useEffect(()=>(W?(window.addEventListener("mouseup",p),window.addEventListener("mousemove",q),window.addEventListener("touchend",p),window.addEventListener("touchmove",q)):(window.removeEventListener("mouseup",p),window.removeEventListener("mousemove",q),window.removeEventListener("touchend",p),window.removeEventListener("touchmove",q)),()=>{window.removeEventListener("mouseup",p),window.removeEventListener("mousemove",q),window.removeEventListener("touchend",p),window.removeEventListener("touchmove",q)}),[W]);const M=xe({className:e,isChanging:S,marks:c,max:f,min:i,name:s,step:r,value:B,valueFormatter:t,onChange:o}),q=v=>{const g=w==null?void 0:w.current;if(g){const V=g.getBoundingClientRect().left,R=((v.type==="touchmove"||v.type==="touchstart"?v.touches[0].clientX:v.clientX)-V)/g.offsetWidth*100;O({pourcent:R})}},O=({pourcent:v,value:g})=>{if(v){if(v>=100){j(u(!0)),C(100);return}if(v<=0){j(y(!0)),C(0);return}g=b(v),g==y()&&(g=y(!0)),g==u()&&(g=u(!0))}else if(g!=null){if(g>=u()){j(u(!0)),C(100);return}if(g<=y()){j(y(!0)),C(0);return}v=h(g)}else return;r!=null?g=Math.round((g-y())/r)*r+y():c&&(g=c.reduce((V,D,R)=>{let $=D.value===1/0?u():D.value===-1/0?y():D.value,F=V.value===1/0?u():V.value===-1/0?y():V.value;return $=Math.abs($-g),F=Math.abs(F-g),$<F?D:V}).value),g>=u()&&(g=u(!0)),g<=y()&&(g=y(!0)),v=h(g),j(g),C(v),o&&o(g)},[_,U]=a.useState(0);a.useEffect(()=>{const v=()=>{w.current&&U(w.current.offsetWidth)};return v(),window.addEventListener("resize",v),()=>{window.removeEventListener("resize",v)}},[]);const Y=v=>{switch(v.key){case"ArrowRight":if(r)O({value:B+r});else if(c){const g=c.find(V=>V.value>B);g&&O({value:g.value})}break;case"ArrowLeft":if(r)O({value:B-r});else if(c){const g=c.slice(0).reverse().find((V,D,R)=>B===1/0?D===1:V.value<B);g&&O({value:g.value})}break;default:return}};return l.jsxs("div",{tabIndex:0,onKeyDown:Y,role:"slider","aria-valuemin":y(!0),"aria-valuemax":u(!0),"aria-valuenow":B,"aria-valuetext":B.toString(),className:M.slider,onMouseDown:I,onClick:q,ref:w,onTouchStart:I,onDragStart:v=>v.preventDefault(),...x,children:[l.jsx("input",{type:"hidden",name:s,value:B}),l.jsx("div",{className:M.activeTrack,style:{flex:L/100}}),l.jsx("div",{className:M.handle,children:l.jsx(k.AnimatePresence,{children:S&&l.jsx(k.motion.div,{className:M.valueIndicator,initial:"hidden",animate:"visible",exit:"hidden",style:{translate:"-50%",transformOrigin:"center bottom",textWrap:"nowrap"},variants:{visible:{opacity:1,scale:1},hidden:{opacity:1,scale:0}},transition:{duration:.1},children:t?t(B):B})})}),l.jsx("div",{className:M.inactiveTrack,style:{flex:1-L/100}}),l.jsx("div",{className:"w-[calc(100%-12px)] h-full absolute -translate-x-1/2 transform left-1/2",children:c&&c.map((v,g)=>{let V=null;const D=(S?9:10)/_*100,R=h(v.value);return R<=L-D?V=!0:R>=L+D&&(V=!1),l.jsx("div",{className:m(M.dot,{"bg-primary-container":V!=null&&V,"bg-primary":V!=null&&!V}),style:{left:`${h(v.value)}%`}},g)})})]})};/*!
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),le=require("clsx"),De=require("tailwind-merge"),c=require("react"),E=require("motion/react"),$e=require("throttle-debounce"),oe=require("react-dom"),Fe=require("@udixio/theme"),qe=require("@udixio/tailwind"),Ue=require("react-textarea-autosize"),ae=De.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"]}}}),m=(...e)=>ae(le.clsx(e)),ce=(...e)=>ae(le.clsx(e));function Oe(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 ie=e=>{const t={};e.classNameList.forEach(s=>{var n;if(s)if(typeof s=="string")(t[n=e.default]??(t[n]=[])).push(s);else{const a=s(e.states);Object.entries(a).map(f=>{const[u,d]=f;(t[u]??(t[u]=[])).push(d)})}});const r=t;return Object.entries(t).map(s=>{let[n,a]=s;a=a.reverse(),n==e.default&&a.unshift("relative"),a.unshift(Oe(n)),r[n]=ce(...a)}),r},q=(e,t)=>r=>ie({classNameList:[r.className,t],default:e,states:r}),ue=q("button",({variant:e,disableTextMargins:t,disabled:r,iconPosition:s,icon:n,isActive:a,loading:f,shape:u,onToggle:d,size:l,allowShapeTransformation:p})=>({button:m(" relative cursor-pointer group outline-none inline-block flex justify-center items-center ",l==="xSmall"&&"text-label-large px-3 py-1.5 gap-1",l==="small"&&"text-label-large px-4 py-2.5 gap-2",l==="medium"&&"text-title-medium px-6 py-4 gap-2",l==="large"&&"text-headline-small px-12 py-8 gap-3",l==="xLarge"&&"text-headline-large px-16 py-12 gap-4",u==="rounded"&&{"rounded-[30px]":l==="xSmall"||l=="small","rounded-[40px]":l==="medium","rounded-[70px]":l==="large"||l=="xLarge"},(u==="squared"||p&&a)&&{"rounded-[12px]":l==="xSmall"||l=="small","rounded-[16px]":l==="medium","rounded-[28px]":l==="large"||l=="xLarge"},p&&!r&&{"active:rounded-[12px]":l==="xSmall"||l=="small","active:rounded-[16px]":l==="medium","active:rounded-[28px]":l==="large"||l=="xLarge"},e==="elevated"&&{"shadow-1 hover:shadow-2":!r,"bg-surface-container-low text-primary":!r&&!a,"bg-primary text-on-primary":!r&&a,"text-on-surface/[38%]":r},e==="filled"&&{"hover:shadow-1":!r,"bg-surface-container text-on-surface-variant":!r&&!a&&d,"bg-primary text-on-primary":!r&&(a&&d||!d),"text-on-surface/[38%]":r},e==="tonal"&&{"hover:shadow-1":!r,"bg-secondary-container text-on-secondary-container":!r&&!a,"bg-secondary text-on-secondary":!r&&a,"text-on-surface/[0.38]":r},e==="outlined"&&[" border",{"border-on-surface/[0.12] text-on-surface/[0.38]":r,"text-primary border-outline focus:border-primary":!r&&!a,"text-inverse-on-surface bg-inverse-surface border-inverse-surface":!r&&a}],e==="text"&&["w-fit",{"text-primary":!r,"text-on-surface/[0.38]":r},t&&[l==="xSmall"&&"-mx-3 ",l==="small"&&"-mx-4 ",l==="medium"&&"-mx-6 ",l==="large"&&"-mx-12",l==="xLarge"&&"-mx-16 "]],r&&"cursor-default"),touchTarget:m("absolute -translate-x-1/2 -translate-y-1/2 left-1/2 top-1/2 h-12 w-full"),stateLayer:m("min-h-full min-w-full absolute top-0 left-0 overflow-hidden",e==="elevated"&&{"bg-on-surface/[0.12]":r,"group-state-primary":!r},e==="filled"&&{"bg-on-surface/[0.12]":r,"group-state-on-primary":!r&&!d,"group-state-on-surface-variant":!r&&d},u==="rounded"&&{"rounded-[30px]":l==="xSmall"||l=="small","rounded-[40px]":l==="medium","rounded-[70px]":l==="large"||l=="xLarge"},(u==="squared"||p&&a)&&{"rounded-[12px]":l==="xSmall"||l=="small","rounded-[16px]":l==="medium","rounded-[28px]":l==="large"||l=="xLarge"},p&&!r&&{"group-active:rounded-[12px]":l==="xSmall"||l=="small","group-active:rounded-[16px]":l==="medium","group-active:rounded-[28px]":l==="large"||l=="xLarge"},e==="tonal"&&{"bg-on-surface/[0.12]":r,"group-state-on-secondary-container ":!r},e==="outlined"&&{"group-state-primary group-state-primary":!r},e==="text"&&{"group-state-primary":!r}),label:m({invisible:f}),icon:m({invisible:f},l==="xSmall"&&"size-5",l==="small"&&"size-5",l==="medium"&&"size-6",l==="large"&&"size-8",l==="xLarge"&&"size-10")})),fe=q("card",({variant:e,isInteractive:t})=>({card:m("card 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"),stateLayer:m(["w-full top-0 left-0 h-full absolute -z-10",{" group-hover/card:hover-state-on-surface group-focus-visible/card:focus-state-on-surface":t}])})),de=q("carouselItem",()=>({carouselItem:m("rounded-[28px] overflow-hidden flex-none")})),me=q("carousel",()=>({carousel:m(["w-full h-[400px]"]),track:m("grid grid-flow-col h-full transition-transform ease-out w-fit")})),pe=q("divider",({orientation:e})=>({divider:m("border-outline-variant ",{"h-fit w-full border-t":e==="horizontal"},{"h-auto self-stretch w-fit border-l":e==="vertical"})})),he=q("fab",({size:e,variant:t,isExtended:r})=>({fab:m("flex shadow-3 hover:shadow-4 group overflow-hidden outline-none items-center cursor-pointer",{"rounded-[12px]":e=="small"&&!r,"rounded-[16px]":e=="medium"||r,"rounded-[28px]":e=="large"&&!r},{"p-2":e=="small"&&!r,"p-4":e=="medium"||r,"p-[30px]":e=="large"&&!r},t==="surface"&&"bg-surface-container",t==="primary"&&"bg-primary-container",t==="secondary"&&"bg-secondary-container",t==="tertiary"&&"bg-tertiary-container"),stateLayer:m("absolute w-full h-full overflow-hidden left-1/2 top-1/2 transform -translate-y-1/2 -translate-x-1/2",t==="surface"&&"group-hover:hover-state-primary group-focus:focus-state-primary",t==="primary"&&"group-hover:hover-state-on-primary-container group-focus-visible:focus-state-on-primary-container",t==="secondary"&&"group-hover:hover-state-on-secondary-container group-focus-visible:focus-state-on-secondary-container",t==="tertiary"&&"group-hover:hover-state-on-tertiary-container group-focus-visible:focus-state-on-tertiary-container"),icon:m({"size-6":e=="small"||e=="medium"||r,"size-9":e=="large"&&!r},t==="surface"&&"text-primary",t==="primary"&&"text-on-primary-container",t==="secondary"&&"text-on-secondary-container",t==="tertiary"&&"text-on-tertiary-container"),label:m("text-title-medium text-nowrap",t==="surface"&&"text-primary",t==="primary"&&"text-on-primary-container",t==="secondary"&&"text-on-secondary-container",t==="tertiary"&&"text-on-tertiary-container")})),xe=q("iconButton",({variant:e,disabled:t,onToggle:r,isActive:s,size:n,width:a,shape:f,allowShapeTransformation:u})=>({iconButton:m("rounded-full relative flex transition-all duration-300","group cursor-pointer",{"cursor-default":t},(f==="rounded"||f==="squared"&&r&&!t&&s&&u)&&{"rounded-[30px]":n==="xSmall"||n=="small","rounded-[40px]":n==="medium","rounded-[70px]":n==="large"||n=="xLarge"},(f==="squared"||f==="rounded"&&r&&!t&&s&&u)&&{"rounded-[12px]":n==="xSmall"||n=="small","rounded-[16px]":n==="medium","rounded-[28px]":n==="large"||n=="xLarge"},u&&!t&&{"group-active:rounded-[12px]":n==="xSmall"||n=="small","group-active:rounded-[16px]":n==="medium","group-active:rounded-[28px]":n==="large"||n=="xLarge"},e==="filled"&&[!t&&{"bg-surface-container":!s&&!!r,"bg-primary":s||!r},!!t&&"bg-on-surface/[0.12]"],e==="tonal"&&[!t&&{"bg-surface-container":!s&&!!r,"bg-secondary-container":s||!r},!!t&&"bg-on-surface/[0.12]"],e==="outlined"&&[!t&&{"border border-outline":!s,"border border-transparent bg-inverse-surface":s},!!t&&{"border border-on-surface/[0.12]":!s,"border border-transparent bg-on-surface/[0.12]":s}]),touchTarget:m("absolute -translate-x-1/2 -translate-y-1/2 left-1/2 top-1/2 h-12 w-full"),stateLayer:m("absolute top-0 left-0 h-full w-full overflow-hidden",(f==="rounded"||f==="squared"&&r&&!t&&s&&u)&&{"rounded-[30px]":n==="xSmall"||n=="small","rounded-[40px]":n==="medium","rounded-[70px]":n==="large"||n=="xLarge"},(f==="squared"||f==="rounded"&&r&&!t&&s&&u)&&{"rounded-[12px]":n==="xSmall"||n=="small","rounded-[16px]":n==="medium","rounded-[28px]":n==="large"||n=="xLarge"},u&&!t&&{"group-active:rounded-[12px]":n==="xSmall"||n=="small","group-active:rounded-[16px]":n==="medium","group-active:rounded-[28px]":n==="large"||n=="xLarge"},!t&&[e==="standard"&&{"state-on-surface-variant":!s,"state-primary":s},e==="filled"&&{"state-primary":!s&&!!r,"state-inverse-on-surface":s||!r},e==="tonal"&&{"state-on-surface-variant":!s&&!!r,"state-on-secondary-container":s||!r},e==="outlined"&&{"state-on-surface-variant":!s,"state-on-primary":s}]),icon:m(" transition-all duration-300",{"size-5 p-1.5":n==="xSmall"},{"size-6 p-2":n==="small"},{"size-6 p-4":n==="medium"},{"size-8 p-8":n==="large"},{"size-10 p-12":n==="xLarge"},a=="narrow"&&[{"px-1":n==="xSmall"},{"px-1":n==="small"},{"px-3":n==="medium"},{"px-4":n==="large"},{"px-8":n==="xLarge"}],a=="wide"&&[{"px-2.5":n==="xSmall"},{"px-3.5":n==="small"},{"px-6":n==="medium"},{"px-12":n==="large"},{"px-[72px]":n==="xLarge"}],!t&&[e==="standard"&&{"text-on-surface-variant":!s,"text-primary":s},e==="filled"&&{"text-primary":!s&&!!r,"text-on-primary":s||!r},e==="tonal"&&{"text-on-surface-variant":!s&&!!r,"text-on-secondary-container":s||!r},e==="outlined"&&{"text-on-surface-variant":!s,"text-inverse-on-surface":s}],!!t&&"text-on-surface/[0.38]")})),ye=q("progressIndicator",({variant:e,isVisible:t})=>({progressIndicator:m((e==="linear-determinate"||e=="linear-indeterminate")&&"flex w-full h-1"),track:m("h-full rounded-full bg-primary rounded-l-full",{"max-h-0":!t,"max-h-full":t}),activeIndicator:m({"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:m("absolute top-1/2 -translate-y-1/2 right-0 bg-primary rounded-full size-1",{"max-h-0":!t,"max-h-full":t})})),ge=q("slideSheet",({variant:e,position:t})=>({slideSheet:m("bg-surface flex justify-between max-w-xs z-10",{"flex-row-reverse":t=="right","h-screen":e=="standard"},e=="modal"&&["rounded-2xl fixed top-0 m-[1rem] h-[calc(100dvh-2rem)]",{"right-0":t=="right","left-0":t=="left"}]),container:m("w-full overflow-hidden",{}),content:m("w-fit "),header:m("p-4 flex items-center gap-2"),title:m("text-on-surface-variant text-title-large"),closeButton:m("ml-auto"),divider:m({hidden:e=="modal"}),overlay:m("bg-[black]/[0.32] fixed top-0 left-0 w-screen h-screen")})),we=q("slider",({isChanging:e})=>({slider:m(["relative w-full h-11 flex items-center rounded gap-x-1.5 cursor-pointer"]),activeTrack:m(["h-4 relative transition-all duration-100 bg-primary overflow-hidden rounded-l-full "]),inactiveTrack:m(["h-4 relative transition-all duration-100 bg-primary-container rounded-r-full overflow-hidden"]),handle:m(["transform transition-all duration-100 bg-primary h-full rounded-full ",{"w-0.5":e,"w-1":!e}]),valueIndicator:m(["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:m(["h-1 w-1 absolute transform -translate-y-1/2 -translate-x-1/2 top-1/2 rounded-full"])})),ve=q("snackbar",()=>({snackbar:m(" rounded bg-inverse-surface "),container:m("pl-4 pr-2 max-w-full py-1 flex items-center flex-wrap"),supportingText:m("text-body-medium text-inverse-on-surface "),icon:m(" ml-auto mr-0 text-inverse-on-surface block dark")})),be=q("switch",({isSelected:e,disabled:t,inactiveIcon:r})=>({switch:m("group 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:m("flex items-center justify-center absolute",{"left-[14px]":!e},{"right-[14px]":e}),handle:m("transition-all duration-100 z-10 rounded-full flex items-center justify-center",{"w-[16px] h-[16px]":!e&&!r},{"w-[24px] h-[24px]":!(!e&&!r)},!t&&["cursor-pointer group-active:h-[28px] group-active:w-[28px]",{"bg-on-primary group-hover:bg-primary-container":e},{"bg-outline group-hover:bg-on-surface-variant":!e}],{"bg-surface":t}),handleStateLayer:m("w-[40px] h-[40px] -z-10 rounded-full absolute",{"group-state-primary":!t}),icon:m("w-[16px] h-[16px]",!t&&[{"text-on-primary-container":e},{"text-on-primary":!e}],{"text-on-surface/[0.38]":t})})),je=q("tab",({isSelected:e,icon:t,label:r,variant:s})=>({tab:m("bg-surface flex-1 group outline-none flex px-4 justify-center items-center cursor-pointer",{"z-10":e},!!(t&&r)&&s==="primary"&&"h-16",!(t&&r&&s==="primary")&&"h-12"),stateLayer:m("absolute w-full h-full overflow-hidden left-1/2 top-1/2 transform -translate-y-1/2 -translate-x-1/2",s==="primary"&&{"group-hover:hover-state-on-surface group-focus-visible:focus-state-on-surface":!e,"group-hover:hover-state-primary group-focus-visible:focus-state-primary":e},s==="secondary"&&"group-hover:hover-state-on-surface group-focus-visible:focus-state-on-surface"),content:m("flex gap-0.5 h-full justify-center",{relative:s=="primary"},{"":!!(r&&!t)},s==="primary"&&"flex-col items-center",s==="secondary"&&{"flex-col items-center":!(r&&t),"flex-row items-center gap-2":!!(r&&t)}),icon:m("h-6 w-6 p-0.5 !box-border",s==="primary"&&{"text-on-surface-variant":!e,"text-primary":e},s==="secondary"&&{"text-on-surface-variant":!e,"text-on-surface":e}),label:m("text-title-small text-nowrap",s==="primary"&&{"text-on-surface-variant":!e,"text-primary":e},s==="secondary"&&{"text-on-surface-variant":!e,"text-on-surface":e}),underline:m("bg-primary absolute w-full left-0 bottom-0",s==="primary"&&"h-[3px] rounded-t",s==="secondary"&&"h-0.5")})),Se=q("tabs",({scrollable:e})=>({tabs:m("border-b border-surface-container-highest","flex relative ",{"overflow-x-auto":e})})),Ne=q("textField",({disabled:e,leadingIcon:t,trailingIcon:r,variant:s,errorText:n,isFocused:a,value:f,suffix:u,textLine:d})=>({textField:m({"opacity-[.38]":e}),content:m("group transition-border duration-200 relative flex items-center ",{"h-14":d=="singleLine"},{"border-on-surface-variant":!(n!=null&&n.length)&&!a&&s=="filled","border-outline":!(n!=null&&n.length)&&!a&&s=="outlined","border-primary":!(n!=null&&n.length)&&a,"border-error":!!(n!=null&&n.length)},{"bg-on-surface/[0.04]":e},s=="filled"&&["rounded-t overflow-hidden border-b",{"bg-surface-container-highest":!e}],s=="outlined"&&["border rounded box-border",{"border-[3px]":a}]),stateLayer:m("absolute -z-10 w-full h-full top-0 left-0",{hidden:s=="outlined"},{"group-state-on-surface":!e,"focus-state-on-surface":a}),label:m("inline-flex outline-none whitespace-nowrap",{"text-on-surface-variant":!e&&!(n!=null&&n.length)},{"text-on-surface":e},{"text-error":!!(n!=null&&n.length)},{"text-primary":!(n!=null&&n.length)&&a}),input:m("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":!!u},s=="filled"&&" pb-2 pt-6",s=="outlined"&&"py-4 relative z-10"),activeIndicator:m("absolute w-0 inset-x-0 border-rounded mx-auto bottom-0",s=="filled"&&["h-[2px] transition-all duration-300",{"bg-primary":!(n!=null&&n.length)},{"bg-error":!!(n!=null&&n.length)},{"!w-full":a}]),supportingText:m(" text-body-small px-4 pt-1",{"text-on-surface-variant":!e&&!(n!=null&&n.length)},{"text-on-surface":e},{"!w-full":a},{"text-error":!!(n!=null&&n.length)}),leadingIcon:m(["h-12 ml-3 flex items-center justify-center",{"cursor-text":!c.isValidElement(t)}]),trailingIcon:m("h-12 w-12 flex items-center justify-center",{"cursor-text":!c.isValidElement(r)}),suffix:m("text-on-surface-variant pl-0 pr-4",s=="filled"&&" pb-2 pt-6",s=="outlined"&&"py-4 relative z-10")})),Ee=q("toolTip",({position:e,variant:t})=>({toolTip:m(" 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:m("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:m("flex gap-10 px-1 mt-2",t=="plain"&&"hidden"),subHead:m("text-title-small mb-1",t=="plain"&&"hidden"),supportingText:m("")})),K=({icon:e,colors:t=[],className:r})=>{if(typeof e=="string"){let l=e;return t[0]&&(l=l.replace(/<svg([^>]*)>/,`<svg$1 fill="${t[0]}" color="${t[0]}">`),l=l.replace(/<path([^>]*?)>/g,'<path$1 fill="currentColor">')),o.jsx("div",{className:m("size-5 box-content inline-flex fill-current",r),style:{color:t[0]||"inherit"},dangerouslySetInnerHTML:{__html:l}})}if(e&&typeof e=="object"&&"src"in e){const l=e;return o.jsx("img",{src:l.src,width:l.width,height:l.height,className:m("size-5 box-content",r),style:{filter:t[0]?"brightness(0) saturate(100%) invert(1)":void 0},alt:"","aria-hidden":"true"})}const s=e;if(!(s!=null&&s.prefix))throw new Error(`Invalid icon type: ${typeof e}`);const{icon:n}=s,[a,f,,,u]=n||[],d=l=>{switch(l.length){case 2:return{"--fa-primary-color":l[0]||"inherit","--fa-secondary-color":l[1]||"inherit"};case 1:return{color:l[0]};default:return{}}};return o.jsx("svg",{className:m("size-5 box-content",r),style:{...d(t)},xmlns:"http://www.w3.org/2000/svg",viewBox:`0 0 ${a} ${f}`,role:"img","aria-hidden":"true",children:typeof u=="string"?o.jsx("path",{className:"fill-current",d:u}):u.map((l,p)=>o.jsx("path",{d:l},p))})},Le=({variant:e="linear-determinate",value:t=0,transitionDuration:r=1e3,className:s,...n})=>{const[a,f]=c.useState(t),[u]=c.useState(1.5);c.useEffect(()=>{t>100&&(t=100),t<0&&(t=0),f(t)},[t]);const[d,l]=c.useState(!0),p=()=>d?u:u*.5;c.useEffect(()=>{if((e==="circular-indeterminate"||e==="linear-indeterminate")&&a!==100){const b=setInterval(()=>{f(d?10:90),l(!d)},p()*1e3);return()=>clearInterval(b)}},[e,d,a]);const[x,i]=c.useState(!1);c.useEffect(()=>{if(a>=100){const b=setTimeout(()=>{i(!1)},r);return()=>{clearTimeout(b)}}else i(!0)},[a,r]);const y=ye({className:s,variant:e,value:t,transitionDuration:r,isVisible:x});return o.jsxs(o.Fragment,{children:[(e==="linear-determinate"||e=="linear-indeterminate")&&o.jsxs("div",{className:y.progressIndicator,...n,children:[o.jsx("div",{style:{width:`${a}%`,transition:`width ${r}ms ease-in-out ${a==100?", max-height 200ms 0.5s ease-in-out":""}`},className:y.track}),o.jsx("div",{style:{marginLeft:a!=100?"6px":"0px",transition:`width ${r}ms ease-in-out ${a==100?`, max-height 200ms 0.5s ease-in-out, margin-left ${r}ms ${r/1.5}ms`:""}`},className:y.activeIndicator}),o.jsx("div",{style:{width:"4 px",transition:`width ${r}ms ease-in-out, max-height 200ms 0.5s ease-in-out`},className:y.stop})]}),(e==="circular-determinate"||e=="circular-indeterminate")&&o.jsx(E.motion.svg,{width:"48",height:"48",viewBox:"0 0 48 48",initial:{rotate:-90},animate:{rotate:270},transition:{repeat:1/0,duration:p(),ease:"linear"},className:y.progressIndicator,...n,children:o.jsx(E.motion.circle,{cx:"50%",cy:"50%",r:x?"calc(50% - 2px)":"50%",style:{strokeLinecap:"round"},initial:"hidden",animate:"visible",className:y.activeIndicator,variants:{hidden:{pathLength:d?10/100:90/100},visible:{pathLength:d?90/100:10/100}},transition:{pathLength:{type:"tween",ease:"linear",duration:p(),bounce:0}}})},d+"")]})},Z=({colorName:e="on-surface",triggerRef:t})=>{const r={initial:{opacity:0,borderRadius:"50%",width:"25%",height:"25%"},animate:{opacity:1,borderRadius:0,width:"200%",height:"200%",transition:{duration:.3,borderRadius:{duration:.3,delay:.3}}}},[s,n]=c.useState(!0),[a,f]=c.useState(!1),[u,d]=c.useState({x:0,y:0});c.useEffect(()=>{a&&(n(!0),n(!1))},[a]),c.useEffect(()=>{const i=t==null?void 0:t.current;if(i)return i.addEventListener("mousedown",l),i.addEventListener("mouseup",x),i.addEventListener("mouseleave",p),()=>{i.removeEventListener("mousedown",l),i.removeEventListener("mouseup",x),i.removeEventListener("mouseleave",p)}},[t]);const l=i=>{const y=t==null?void 0:t.current,b=y.getBoundingClientRect();f(!0),d({x:(i.clientX-b.left)/y.clientWidth*100,y:(i.clientY-b.top)/y.clientHeight*100})},p=i=>{f(!1)},x=i=>{f(!1)};return o.jsx(E.AnimatePresence,{mode:"wait",children:(a||!a&&!s)&&o.jsx(E.motion.div,{style:{position:"absolute",width:"100%",height:"100%",top:u.y+"%",left:u.x+"%",background:`color-mix(in srgb, var(--color-${e}) 12%, transparent)`,pointerEvents:"none"},variants:r,initial:"initial",animate:"animate",exit:{opacity:0,transition:{duration:0}},onAnimationComplete:()=>n(!0),className:"transform -translate-x-1/2 -translate-y-1/2"})})},Ie=q("customScroll",({orientation:e,draggable:t,isDragging:r})=>({customScroll:m("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":r,"[&::-webkit-scrollbar-thumb]:bg-transparent":!r},{"[&::-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&&!r,"cursor-grabbing":t&&r}),track:m("overflow-hidden flex-none sticky",{"left-0 h-full":e==="horizontal","top-0 w-full":e==="vertical"})})),ee=({children:e,orientation:t="vertical",scrollSize:r,onScroll:s,className:n,draggable:a=!1,throttleDuration:f=75})=>{var V,D;const u=c.useRef(null),d=c.useRef(null),[l,p]=c.useState({width:null,height:null});c.useEffect(()=>{if(!u.current)return;const k=new ResizeObserver($=>{for(const F of $)F.target===u.current&&p({width:F.contentRect.width,height:F.contentRect.height})});return k.observe(u.current),()=>{k.disconnect()}},[u]);const x=c.useRef(null),i=c.useRef(null),y=()=>{const k=d.current;return k?{width:r??k.scrollWidth,height:r??k.scrollHeight}:null},b=()=>{const k=u.current;return k?{width:k.clientWidth,height:k.clientHeight}:null},{scrollYProgress:N,scrollXProgress:S}=E.useScroll({container:u}),L=c.useRef(null);L.current||(L.current=$e.throttle(f,(k,$)=>{!i.current||!x.current||s&&(t==="horizontal"&&$==="x"&&s({scrollProgress:k,scroll:k*x.current.width,scrollTotal:x.current.width,scrollVisible:i.current.width}),t==="vertical"&&$==="y"&&s({scrollProgress:k,scroll:k*x.current.height,scrollTotal:x.current.height,scrollVisible:i.current.height}))}));const v=(k,$)=>{L.current&&L.current(k,$)};c.useEffect(()=>{l.width&&v(S.get(),"x"),l.height&&v(N.get(),"y")},[l]),E.useMotionValueEvent(S,"change",k=>{v(k,"x")}),E.useMotionValueEvent(N,"change",k=>{v(k,"y")});const[B,j]=c.useState(!1);c.useLayoutEffect(()=>{B||!i.current||!x.current||!s||(s({scrollProgress:0,scroll:0,scrollTotal:t=="vertical"?x.current.height:x.current.width,scrollVisible:t=="vertical"?i.current.height:i.current.width}),j(!0))},[i,x,s]),x.current=y(),i.current=b();const[I,C]=c.useState(!1),W=Ie({isDragging:I,children:e,className:n,onScroll:s,orientation:t,scrollSize:r,draggable:a,throttleDuration:f}),[P,R]=c.useState(0),[h,M]=c.useState(0),U=k=>{if(!a)return;const $=u.current;if(!$||P==null)return;const G=(k.pageX-$.offsetLeft-P)*1.5;$.scrollLeft=h-G},X=k=>{const $=u.current;$&&(C(!0),R(k.pageX-$.offsetLeft),M($.scrollLeft))},_=k=>{I&&(k.preventDefault(),U(k))},O=()=>{C(!1)},Y=()=>{C(!1)},w=k=>{k.preventDefault()},g=c.useRef(null);return c.useEffect(()=>()=>{g.current&&clearTimeout(g.current)},[]),o.jsxs("div",{className:W.customScroll,ref:u,onMouseDown:X,onMouseMove:_,onMouseUp:O,onMouseLeave:Y,onDragStart:w,onScroll:k=>{I||(R(null),C(!0),g.current&&clearTimeout(g.current),g.current=setTimeout(()=>{C(!1)},1e3))},children:[o.jsx("div",{ref:d,style:t==="vertical"?{height:((V=i==null?void 0:i.current)==null?void 0:V.height)??"100%"}:{width:((D=i==null?void 0:i.current)==null?void 0:D.width)??"100%"},className:W.track,children:e}),i.current&&x.current&&o.jsxs(o.Fragment,{children:[t==="vertical"&&x.current.height>i.current.height&&o.jsx(E.motion.div,{className:"flex-none",style:{height:x.current.height-i.current.height}}),t==="horizontal"&&x.current.width>i.current.width&&o.jsx(E.motion.div,{className:"flex-none",style:{width:x.current.width-i.current.width}})]})]})},Xe=({children:e,transition:t=".5s",orientation:r="vertical",throttleDuration:s=25,...n})=>{const[a,f]=c.useState(null),u=E.motionValue((a==null?void 0:a.scrollProgress)??0),d=E.useTransform(u,[0,1],[0,1-((a==null?void 0:a.scrollVisible)??0)/((a==null?void 0:a.scrollTotal)??0)]),l=E.useTransform(d,i=>`${-i*100}%`),p=i=>{u.set(i.scrollProgress),i.scrollTotal>0&&f(i)},x=c.useRef(null);return E.useMotionValueEvent(l,"change",i=>{const y=performance.now();if(x.current!==null){const b=y-x.current;console.log(`Delta temps : ${b} ms`)}x.current=y,console.log(i)}),o.jsx(ee,{onScroll:p,throttleDuration:s,...n,children:o.jsx(E.motion.div,{className:m("transition-transform ease-out",{"w-fit h-full":r==="horizontal","h-fit w-full":r==="vertical"}),style:{transitionDuration:t,...r=="vertical"?{y:l}:{x:l}},children:e})})},Re=({targetRef:e,children:t})=>{const[r,s]=c.useState(null),n=c.useRef(null),a=()=>{const f=e.current;if(!f)return;const u=f.getBoundingClientRect();s({position:"fixed",top:u.top,left:u.left,width:u.width,height:u.height,pointerEvents:"none",zIndex:999})};return c.useEffect(()=>{const f=e.current;if(f)return a(),window.addEventListener("scroll",a,!0),window.addEventListener("resize",a),n.current=new ResizeObserver(a),n.current.observe(f),()=>{var u;window.removeEventListener("scroll",a,!0),window.removeEventListener("resize",a),(u=n.current)==null||u.disconnect()}},[e]),r?oe.createPortal(o.jsx("div",{style:r,children:t}),document.body):null};function He(e){return/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(e)}const _e=({config:e,throttleDelay:t=100,onLoad:r})=>{const[s,n]=c.useState(null),a=c.useRef(null),f=c.useRef(e.sourceColor),u=c.useRef(!0);c.useEffect(()=>{if(u.current){u.current=!1,f.current=e.sourceColor,d(e.sourceColor);return}if(e.sourceColor!==f.current)return a.current&&clearTimeout(a.current),a.current=setTimeout(async()=>{f.current=e.sourceColor,await d(e.sourceColor),a.current=null},t),()=>{a.current&&(clearTimeout(a.current),a.current=null)}},[e.sourceColor,t]);const d=async l=>{if(!He(l))throw new Error("Invalid hex color");try{const p=await Fe.loader({...e,sourceColor:l});r==null||r(p);const x=p.plugins.getPlugin(qe.TailwindPlugin).getInstance().outputCss;x&&n(x)}catch(p){throw new Error(p instanceof Error?p.message:"Theme loading failed")}};return c.useEffect(()=>()=>{a.current&&clearTimeout(a.current)},[]),s?o.jsx("style",{dangerouslySetInnerHTML:{__html:s}}):null},ke=({variant:e="filled",disabled:t=!1,icon:r,href:s,label:n,disableTextMargins:a,className:f,iconPosition:u="left",loading:d=!1,shape:l="rounded",onClick:p,onToggle:x,activated:i,ref:y,size:b="medium",allowShapeTransformation:N=!0,transition:S,children:L,...v})=>{if(L&&(n=L),!n)throw new Error("Button component requires either a label prop or children content");const B=s?"a":"button",j=c.useRef(null),I=y||j,[C,W]=c.useState(i);c.useEffect(()=>{W(i)},[i]),S={duration:.3,...S};let P;x?x&&(P=M=>{t&&M.preventDefault();const U=!C;W(U),x(U)}):P=M=>{t&&M.preventDefault(),p&&p(M)};const R=ue({allowShapeTransformation:N,size:b,disableTextMargins:a,shape:l,href:s,disabled:t,icon:r,iconPosition:u,loading:d,variant:e,transition:S,className:f,isActive:C??!1,onToggle:x,activated:C,label:n,children:n}),h=r?o.jsx(K,{icon:r,className:R.icon}):o.jsx(o.Fragment,{});return o.jsxs(B,{ref:I,href:s,className:R.button,...v,onClick:P,disabled:t,"aria-pressed":x?C:void 0,style:{transition:S.duration+"s"},children:[o.jsx("div",{className:R.touchTarget}),o.jsx("div",{className:R.stateLayer,style:{transition:S.duration+"s"},children:!t&&o.jsx(Z,{colorName:e==="filled"&&x&&"on-surface-variant"||e==="filled"&&!x&&"on-primary"||e==="elevated"&&"primary"||e==="tonal"&&"on-secondary-container"||e==="outlined"&&"primary"||e==="text"&&"primary"||"",triggerRef:I})}),u==="left"&&h,d&&o.jsx("div",{className:"!absolute left-1/2 -translate-x-1/2 top-1/2 -translate-y-1/2",children:o.jsx(Le,{className:()=>({progressIndicator:"h-6 w-6",activeIndicator:m({"!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"})}),o.jsx("span",{className:R.label,children:n}),u==="right"&&h]})},Ge=({variant:e="outlined",className:t,children:r,isInteractive:s=!1,ref:n,...a})=>{const f=fe({className:t,isInteractive:s,variant:e,children:r}),u=c.useRef(null),d=n||u;return o.jsxs("div",{...a,ref:d,className:f.card,children:[o.jsx("div",{className:f.stateLayer,children:s&&o.jsx(Z,{colorName:"on-surface",triggerRef:d})}),r]})},Ce=(e,t,r=[0,1])=>{const[s,n]=t,[a,f]=r,d=(Math.max(s,Math.min(e,n))-s)/(n-s);return a+d*(f-a)},Me=({className:e,children:t,width:r=1,index:s=0,ref:n,...a})=>{const f=c.useRef(null),u=n||f,d=de({className:e,index:s,width:r,children:t});return o.jsx(E.motion.div,{ref:u,animate:{width:r+"px"},transition:{duration:.5,ease:"linear"},className:d.carouselItem,...a,children:t})},Ke=({variant:e="hero",className:t,children:r,ref:s,marginPourcent:n=0,inputRange:a=[.21,.65],outputRange:f=[42,300],gap:u=8,onChange:d,scrollSensitivity:l=1.25,...p})=>{var O,Y;const x=c.useRef(null),i=s||x,y=me({className:t,children:r,variant:e,inputRange:a,outputRange:f,marginPourcent:n,onChange:d,gap:u,scrollSensitivity:l}),b=c.Children.toArray(r).filter(w=>c.isValidElement(w)&&w.type===Me),N=c.useRef(null),[S,L]=c.useState([]),[v,B]=c.useState(null),j=()=>{var $;if(!N.current||!i.current||!v)return[];const{scrollVisible:w,scrollProgress:g}=v;function V(F,G){return F.map(A=>(A-G)/Math.abs(F[1]-F[0]))}let D=b.map((F,G)=>{if(!I[G].current||!N.current)return 0;let J=G/(b.length-1);return J>1&&(J=1),J<0&&(J=0),J});D=V(D,g);let k=(((($=i.current)==null?void 0:$.clientWidth)??w)-(f[0]+u))/(f[1]+u);return D.map((F,G)=>({value:Math.abs(F),originalIndex:G})).sort((F,G)=>F.value-G.value).forEach((F,G)=>{G===0&&W(F.originalIndex);let A=Ce(k,[0,1],[0,f[1]]);A<f[0]&&(A=f[0]),k--,D[F.originalIndex]=A}),D},I=c.useRef([]).current,[C,W]=c.useState(0);c.useEffect(()=>{d&&d(C)},[C]),I.length!==b.length&&b.forEach((w,g)=>{I[g]||(I[g]=c.createRef())});const P=b.map((w,g)=>c.cloneElement(w,{width:S[g],ref:I[g],key:g,index:g})),R=E.motionValue((v==null?void 0:v.scrollProgress)??0),h=E.useTransform(R,[0,1],[0,1-(((O=i.current)==null?void 0:O.clientWidth)??0)/(((Y=N==null?void 0:N.current)==null?void 0:Y.clientWidth)??0)]),M=E.useTransform(h,w=>`${-w*100}%`),U=w=>{w.scrollTotal>0&&B(w)};c.useEffect(()=>{const w=j();L(w)},[v]);const[X,_]=c.useState(0);return c.useLayoutEffect(()=>{let w=f[1];v&&w>v.scrollVisible&&(w=v.scrollVisible);const g=(w+u)*P.length/l;_(g)},[i,I,v]),o.jsx("div",{className:y.carousel,ref:i,...p,children:o.jsx(ee,{draggable:!0,orientation:"horizontal",onScroll:U,scrollSize:X,children:o.jsx(E.motion.div,{className:y.track,ref:N,style:{transitionDuration:"0.5s",transitionTimingFunction:"ease-out",gap:`${u}px`,x:M},children:P})})})},Be=({orientation:e="horizontal",className:t,...r})=>{const s=pe({orientation:e,className:t});return o.jsx("hr",{className:s.divider,...r})},H=[];for(let e=0;e<256;++e)H.push((e+256).toString(16).slice(1));function Ye(e,t=0){return(H[e[t+0]]+H[e[t+1]]+H[e[t+2]]+H[e[t+3]]+"-"+H[e[t+4]]+H[e[t+5]]+"-"+H[e[t+6]]+H[e[t+7]]+"-"+H[e[t+8]]+H[e[t+9]]+"-"+H[e[t+10]]+H[e[t+11]]+H[e[t+12]]+H[e[t+13]]+H[e[t+14]]+H[e[t+15]]).toLowerCase()}let z;const Ae=new Uint8Array(16);function Ze(){if(!z){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");z=crypto.getRandomValues.bind(crypto)}return z(Ae)}const Je=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),se={randomUUID:Je};function te(e,t,r){var n;if(se.randomUUID&&!e)return se.randomUUID();e=e||{};const s=e.random??((n=e.rng)==null?void 0:n.call(e))??Ze();if(s.length<16)throw new Error("Random bytes length must be >= 16");return s[6]=s[6]&15|64,s[8]=s[8]&63|128,Ye(s)}const re=({variant:e="plain",buttons:t,className:r,children:s,title:n,text:a,position:f,targetRef:u,ref:d,trigger:l=["hover","focus"],...p})=>{if(!s&&!u)throw new Error("ToolTip must have a child or a targetRef");Array.isArray(l)||(l=[l]),t&&!Array.isArray(t)&&(t=[t]);const x=c.useRef(null),i=u||x,[y,b]=c.useState(null),[N]=c.useState(te()),[S,L]=c.useState(!1),v=c.useRef(null);c.useEffect(()=>{const h=M=>{b(M.detail)};return document.addEventListener("tooltip-update",h),()=>{document.removeEventListener("tooltip-update",h)}},[]),c.useEffect(()=>{v.current&&clearTimeout(v.current),y?L(y===N):v.current=setTimeout(()=>{L(!1)},1200)},[y,N]);const B=()=>{if(l.includes("hover")){const h=new CustomEvent("tooltip-update",{detail:N});document.dispatchEvent(h)}},j=()=>{if(l.includes("hover")){const h=new CustomEvent("tooltip-update",{detail:null});document.dispatchEvent(h)}},I=()=>{if(l.includes("click")){const h=new CustomEvent("tooltip-update",{detail:S?null:N});document.dispatchEvent(h)}},C=()=>{if(l.includes("focus")){const h=new CustomEvent("tooltip-update",{detail:N});document.dispatchEvent(h)}},W=()=>{if(l.includes("focus")){const h=new CustomEvent("tooltip-update",{detail:null});document.dispatchEvent(h)}};c.useEffect(()=>{if(i!=null&&i.current){const h=i.current;return h.addEventListener("mouseenter",B),h.addEventListener("mouseleave",j),h.addEventListener("click",I),h.addEventListener("focus",C),h.addEventListener("blur",W),()=>{h.removeEventListener("mouseenter",B),h.removeEventListener("mouseleave",j),h.removeEventListener("click",I),h.removeEventListener("focus",C),h.removeEventListener("blur",W)}}},[i,l,N,S]);const P=!u&&c.isValidElement(s)?c.cloneElement(s,{ref:x}):s;if(!f&&typeof window<"u"&&i!=null&&i.current&&!f){const h=i.current.getBoundingClientRect(),M=window.innerWidth,U=window.innerHeight,X=h.left/M,_=h.top/U;e==="plain"?X<1/3?f="right":X>2/3?f="left":f=_>.5?"top":"bottom":X<1/2&&_<1/2?f="bottom-right":X>1/2&&_<1/2?f="bottom-left":X>1/2&&_>1/2?f="top-left":X<1/2&&_>1/2&&(f="top-right")}const R=Ee({variant:e,buttons:t,className:r,title:n,text:a,position:f,trigger:l,targetRef:u,children:s});return o.jsxs(o.Fragment,{children:[P,o.jsx(E.AnimatePresence,{children:S&&o.jsx(Re,{targetRef:i,children:o.jsx(E.motion.div,{initial:{opacity:y?1:0},animate:{opacity:1},transition:{duration:y?0:.3},exit:{opacity:y?1:0},className:R.toolTip,...p,onMouseEnter:B,onMouseLeave:j,children:o.jsxs(E.motion.div,{className:R.container,layoutId:"tool-tip",transition:{type:"spring",stiffness:200,damping:20},children:[n&&o.jsx("div",{className:R.subHead,children:n}),o.jsx("div",{className:R.supportingText,children:a}),t&&o.jsx("div",{className:R.actions,children:Array.isArray(t)&&t.map((h,M)=>o.jsx(ke,{size:"small",variant:"text",...h},M))})]})})})})]})},T=({className:e,label:t,variant:r="primary",size:s="medium",href:n,type:a,icon:f,isExtended:u=!1,ref:d,transition:l,children:p,...x})=>{if(p&&(t=p),!t)throw new Error("FAB component requires either a label prop or children content");const i=n?"a":"button",y=he({href:n,icon:f,isExtended:u,label:t,size:s,variant:r,className:e,transition:l,children:t});l={duration:.3,...l};const b=c.useRef(null),N=d||b,S={visible:{width:"auto",marginLeft:12,opacity:1,transition:{...l,opacity:{duration:l.duration/2,delay:l.duration-l.duration/2}}},hidden:{width:0,marginLeft:0,opacity:0,transition:{...l,marginLeft:{duration:l.duration/2,delay:l.duration-l.duration/2}}}};return o.jsxs(i,{...x,ref:N,href:n,"aria-label":u?void 0:t,className:y.fab,children:[o.jsx(re,{trigger:u?null:void 0,text:t,targetRef:N}),o.jsx("span",{className:y.stateLayer,children:o.jsx(Z,{colorName:m({primary:r=="surface","on-primary-container":r=="primary","on-secondary-container":r=="secondary","on-tertiary-container":r=="tertiary"}),triggerRef:N})}),o.jsx(K,{icon:f,className:y.icon}),o.jsx(E.AnimatePresence,{children:u&&o.jsx(E.motion.span,{variants:S,initial:"hidden",animate:"visible",exit:"hidden",className:y.label,children:t})})]})},Q=({variant:e="standard",href:t,disabled:r=!1,type:s="button",title:n,label:a,onToggle:f,activated:u=!1,onClick:d,icon:l,size:p="medium",iconSelected:x,className:i,ref:y,width:b="default",shape:N="rounded",allowShapeTransformation:S=!0,transition:L,children:v,...B})=>{if(v&&(a=v),!a)throw new Error("IconButton component requires either a label prop or children content to provide an accessible aria-label");n||(n=a);const[j,I]=c.useState(u);let C;f?f&&(C=M=>{r&&M.preventDefault(),I(!j),f(!!j)},l=j&&x||l):C=M=>{r&&M.preventDefault(),d&&d(M)},c.useEffect(()=>{I(u)},[u]);const W=t?"a":"button",P=xe({transition:L,shape:N,allowShapeTransformation:S,width:b,href:t,activated:j,label:a,iconSelected:x,isActive:j,onToggle:f,disabled:r,icon:l,variant:e,className:i,size:p,children:a,...B}),R=c.useRef(null),h=y||R;return L={duration:.3,...L},o.jsxs(W,{disabled:r,href:t,style:{transition:L.duration+"s"},className:P.iconButton,"aria-label":a,...B,title:void 0,onClick:C,ref:h,children:[o.jsx(re,{targetRef:h,trigger:r?null:void 0,text:n}),o.jsx("div",{className:P.touchTarget}),o.jsx("div",{className:P.stateLayer,style:{transition:L.duration+"s"},children:!r&&o.jsx(Z,{colorName:m(e==="standard"&&{"on-surface-variant":!j,primary:j},e==="filled"&&{primary:!j&&!!f,"inverse-on-surface":j||!f},e==="tonal"&&{"on-surface-variant":!j&&!!f,"on-secondary-container":j||!f},e==="outlined"&&{"on-surface-variant":!j,"on-primary":j}),triggerRef:h})}),l&&o.jsx(K,{icon:l,className:P.icon})]})},Qe=({className:e,valueFormatter:t,step:r=10,name:s,value:n=0,min:a=0,max:f=100,marks:u=[{value:0,label:"0"},{value:100,label:"100"}],ref:d,onChange:l,...p})=>{const x=w=>{const g=y(),V=i();return w===1/0?100:w===-1/0?0:(w-g)/(V-g)*100},i=(w=!1)=>w?f:f==1/0?u[(u==null?void 0:u.length)-1].value:f,y=(w=!1)=>w?a:a==-1/0?u[0].value:a,b=w=>{const g=y(!1);return(i(!1)-g)*w/100+g},[N,S]=c.useState(!1),L=c.useRef(null),v=d||L,[B,j]=c.useState(n),[I,C]=c.useState(x(n)),[W,P]=c.useState(!1),R=w=>{P(!0),S(!0),U(w)},h=()=>{P(!1),S(!1)};c.useEffect(()=>(W?(window.addEventListener("mouseup",h),window.addEventListener("mousemove",U),window.addEventListener("touchend",h),window.addEventListener("touchmove",U)):(window.removeEventListener("mouseup",h),window.removeEventListener("mousemove",U),window.removeEventListener("touchend",h),window.removeEventListener("touchmove",U)),()=>{window.removeEventListener("mouseup",h),window.removeEventListener("mousemove",U),window.removeEventListener("touchend",h),window.removeEventListener("touchmove",U)}),[W]);const M=we({className:e,isChanging:N,marks:u,max:f,min:a,name:s,step:r,value:B,valueFormatter:t,onChange:l}),U=w=>{const g=v==null?void 0:v.current;if(g){const V=g.getBoundingClientRect().left,k=((w.type==="touchmove"||w.type==="touchstart"?w.touches[0].clientX:w.clientX)-V)/g.offsetWidth*100;X({pourcent:k})}},X=({pourcent:w,value:g})=>{if(w){if(w>=100){j(i(!0)),C(100);return}if(w<=0){j(y(!0)),C(0);return}g=b(w),g==y()&&(g=y(!0)),g==i()&&(g=i(!0))}else if(g!=null){if(g>=i()){j(i(!0)),C(100);return}if(g<=y()){j(y(!0)),C(0);return}w=x(g)}else return;r!=null?g=Math.round((g-y())/r)*r+y():u&&(g=u.reduce((V,D,k)=>{let $=D.value===1/0?i():D.value===-1/0?y():D.value,F=V.value===1/0?i():V.value===-1/0?y():V.value;return $=Math.abs($-g),F=Math.abs(F-g),$<F?D:V}).value),g>=i()&&(g=i(!0)),g<=y()&&(g=y(!0)),w=x(g),j(g),C(w),l&&l(g)},[_,O]=c.useState(0);c.useEffect(()=>{const w=()=>{v.current&&O(v.current.offsetWidth)};return w(),window.addEventListener("resize",w),()=>{window.removeEventListener("resize",w)}},[]);const Y=w=>{switch(w.key){case"ArrowRight":if(r)X({value:B+r});else if(u){const g=u.find(V=>V.value>B);g&&X({value:g.value})}break;case"ArrowLeft":if(r)X({value:B-r});else if(u){const g=u.slice(0).reverse().find((V,D,k)=>B===1/0?D===1:V.value<B);g&&X({value:g.value})}break;default:return}};return o.jsxs("div",{tabIndex:0,onKeyDown:Y,role:"slider","aria-valuemin":y(!0),"aria-valuemax":i(!0),"aria-valuenow":B,"aria-valuetext":B.toString(),className:M.slider,onMouseDown:R,onClick:U,ref:v,onTouchStart:R,onDragStart:w=>w.preventDefault(),...p,children:[o.jsx("input",{type:"hidden",name:s,value:B}),o.jsx("div",{className:M.activeTrack,style:{flex:I/100}}),o.jsx("div",{className:M.handle,children:o.jsx(E.AnimatePresence,{children:N&&o.jsx(E.motion.div,{className:M.valueIndicator,initial:"hidden",animate:"visible",exit:"hidden",style:{translate:"-50%",transformOrigin:"center bottom",textWrap:"nowrap"},variants:{visible:{opacity:1,scale:1},hidden:{opacity:1,scale:0}},transition:{duration:.1},children:t?t(B):B})})}),o.jsx("div",{className:M.inactiveTrack,style:{flex:1-I/100}}),o.jsx("div",{className:"w-[calc(100%-12px)] h-full absolute -translate-x-1/2 transform left-1/2",children:u&&u.map((w,g)=>{let V=null;const D=(N?9:10)/_*100,k=x(w.value);return k<=I-D?V=!0:k>=I+D&&(V=!1),o.jsx("div",{className:m(M.dot,{"bg-primary-container":V!=null&&V,"bg-primary":V!=null&&!V}),style:{left:`${x(w.value)}%`}},g)})})]})};/*!
|
|
2
2
|
* Font Awesome Free 7.0.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 Ae={prefix:"fas",iconName:"circle-exclamation",icon:[512,512,["exclamation-circle"],"f06a","M256 512a256 256 0 1 0 0-512 256 256 0 1 0 0 512zm0-376c13.3 0 24 10.7 24 24l0 112c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-112c0-13.3 10.7-24 24-24zM229.3 352a26.7 26.7 0 1 1 53.3 0 26.7 26.7 0 1 1 -53.3 0z"]},ke={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"]},ze={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 Te=({message:e,className:t,duration:r,closeIcon:s=ke,onClose:n,...i})=>{const[f,c]=a.useState(!0),d=ye({className:t,closeIcon:s,duration:r,isVisible:f,onClose:n,message:e});a.useEffect(()=>{r&&setTimeout(()=>{o()},r)},[r]);const o=()=>{c(!1),n==null||n()};return l.jsx(k.AnimatePresence,{children:f&&l.jsx(k.motion.div,{initial:{height:0},animate:{height:"auto"},exit:{height:0},transition:{duration:.1},className:d.snackbar,...i,children:l.jsxs("div",{className:d.container,children:[l.jsx("p",{className:d.supportingText,children:e}),l.jsx(re,{onClick:()=>o(),className:d.icon,icon:s,label:"close the snackbar"})]})})})},et=({selected:e=!1,className:t,activeIcon:r,disabled:s=!1,inactiveIcon:n,onChange:i,onClick:f,onKeyDown:c,ref:d,...o})=>{const[x,h]=a.useState(e),u=w=>{s||(b(),f&&f(w))},y=w=>{s||((w.key===" "||w.key==="Enter")&&(w.preventDefault(),b()),c&&c(w))},b=()=>{h(!x),i==null||i(!x)},S=ge({className:t,isSelected:x,activeIcon:r,inactiveIcon:n,disabled:s,selected:x,onChange:i}),N=a.useRef(null),E=d||N;return l.jsxs(k.motion.div,{role:"switch","aria-checked":x,tabIndex:s?-1:0,onKeyDown:y,onClick:u,ref:E,className:S.switch,...o,children:[l.jsx("input",{type:"hidden",value:x?"1":"0"}),l.jsxs(k.motion.div,{layout:!0,style:{translate:x?"50%":"-50%"},transition:{type:"spring",stiffness:700,damping:30},className:S.handleContainer,children:[l.jsx("div",{className:S.handle,children:(x?r:n)&&l.jsx(K,{className:S.icon,icon:x?r:n})}),l.jsx("div",{className:S.handleStateLayer})]})]})},Ce=({className:e,onClick:t,label:r,variant:s="primary",href:n,icon:i,selectedTab:f,setSelectedTab:c,tabsId:d,index:o,onTabSelected:x,scrollable:h=!1,selected:u=!1,ref:y,...b})=>{const S=a.useRef(null),N=y||S,[E,w]=a.useState(u);a.useEffect(()=>{u&&f==null?w(!0):w(f==o&&o!=null)},[f]),a.useEffect(()=>{f==o&&x&&x({ref:N,index:o||0,label:r,icon:i})},[f]);const B=n?"a":"button",j=C=>{c&&c(o??null),t&&t(C)},L=ve({className:e,onTabSelected:x,scrollable:h,selectedTab:f,index:o,tabsId:d,selected:E,variant:s,icon:i,label:r,isSelected:E,setSelectedTab:c,href:n});return l.jsxs(B,{...b,role:"tab","aria-selected":E,ref:N,href:n,className:L.tab,onClick:j,...b,children:[l.jsx("span",{className:L.stateLayer,children:l.jsx(J,{colorName:s==="primary"&&E?"primary":"on-surface",triggerRef:N})}),l.jsxs("span",{className:L.content,children:[i&&l.jsx(K,{icon:i,className:L.icon}),l.jsx("span",{className:L.label,children:r}),E&&l.jsx(k.motion.span,{layoutId:`underline-${d}`,className:L.underline,transition:{duration:.3}})]})]})},tt=({variant:e="primary",onTabSelected:t,children:r,className:s,selectedTab:n,setSelectedTab:i,scrollable:f=!1})=>{const[c,d]=a.useState(null);let o;n==0||n!=null?o=n:o=c;const x=i||d,h=a.Children.toArray(r).filter(N=>a.isValidElement(N)&&N.type===Ce),u=a.useRef(null),y=N=>{if(t==null||t(N),f){const E=u.current,w=N.ref.current;if(E&&w){const B=w.offsetLeft+w.offsetWidth/2-E.offsetWidth/2;E.scrollTo({left:B,behavior:"smooth"})}}},b=a.useMemo(()=>ee(),[]),S=we({children:r,onTabSelected:t,scrollable:f,selectedTab:o,setSelectedTab:x,className:s,variant:e});return l.jsx("div",{ref:u,role:"tablist",className:S.tabs,children:h.map((N,E)=>a.cloneElement(N,{key:E,index:E,variant:e,selectedTab:o,setSelectedTab:x,tabsId:b,onTabSelected:y,scrollable:f}))})},rt=({variant:e="filled",disabled:t=!1,errorText:r,placeholder:s,suffix:n,name:i,label:f,className:c,supportingText:d,trailingIcon:o,leadingIcon:x,type:h="text",textLine:u="singleLine",autoComplete:y="on",onChange:b,value:S,showSupportingText:N=!1,...E})=>{const[w,B]=a.useState(S??""),[j,L]=a.useState(!1),[C,W]=a.useState(!1),[P,I]=a.useState(N);a.useEffect(()=>{B(S??"")},[S]),a.useEffect(()=>{r!=null&&r.length?W(!0):W(!1)},[r]),a.useEffect(()=>{N?I(N):d!=null&&d.length?I(!0):I(!1)},[P,d]),a.useEffect(()=>{j&&W(!1)},[j]);const p=a.useRef(null),M=()=>{p.current&&!j&&p.current.focus()},q=()=>{L(!0)},O=V=>{const D=V.target.value;B(D),W(!1),typeof b=="function"&&b(D)},_=()=>{L(!1)},U=be({showSupportingText:P,isFocused:j,showErrorIcon:C,disabled:t,name:i,label:f,autoComplete:y,className:c,onChange:b,placeholder:s,supportingText:d,type:h,leadingIcon:x,trailingIcon:o,variant:e,errorText:r,value:w,suffix:n,textLine:u}),[Y]=a.useState(ee());let v,g;switch(u){case"multiLine":g=Fe,v={};break;case"textAreas":g="textarea",v={};break;case"singleLine":default:g="input",v={type:h};break}return l.jsxs("div",{className:U.textField,...E,children:[l.jsxs("fieldset",{onClick:M,className:U.content,children:[l.jsx("div",{className:U.stateLayer}),x&&l.jsx("div",{className:U.leadingIcon,children:a.isValidElement(x)?x:l.jsx(K,{className:"w-5 h-5",icon:x})}),!(!j&&!w.length||e=="filled")&&l.jsx(k.motion.legend,{variants:{hidden:{width:0,padding:0},visible:{width:"auto",padding:"0 8px"}},initial:"hidden",animate:!j&&!w.length?"hidden":"visible",className:"max-w-full ml-2 px-2 text-body-small h-0",transition:{duration:.2},children:l.jsx("span",{className:"transform inline-flex -translate-y-1/2",children:l.jsx(k.motion.span,{className:U.label,transition:{duration:.3},layoutId:Y,children:f})})}),l.jsxs("div",{className:"flex-1 relative",children:[(!j&&!w.length||e=="filled")&&l.jsx(k.motion.label,{htmlFor:i,className:m("absolute left-4 transition-all duration-300",{"text-body-small top-2":e=="filled"&&!(!j&&!w.length),"text-body-large top-1/2 transform -translate-y-1/2":!(e=="filled"&&!(!j&&!w.length))}),transition:{duration:.3},children:l.jsx(k.motion.span,{className:U.label,transition:{duration:.3},layoutId:e=="outlined"?Y:void 0,children:f})}),l.jsx(g,{ref:p,value:w,onChange:O,className:U.input,id:i,name:i,placeholder:j?s??void 0:"",onFocus:q,onBlur:_,disabled:t,autoComplete:y,"aria-invalid":!!(r!=null&&r.length),"aria-label":f,...v})]}),l.jsx("div",{className:U.activeIndicator}),!C&&l.jsxs(l.Fragment,{children:[o&&l.jsx("div",{onClick:V=>{V.stopPropagation()},className:U.trailingIcon,children:a.isValidElement(o)?o:l.jsx(K,{className:"h-5",icon:o})}),!o&&n&&l.jsx("span",{className:U.suffix,children:n})]}),C&&l.jsx("div",{className:m(U.trailingIcon,{" absolute right-0":!o}),children:l.jsx(K,{className:"h-5 text-error",icon:Ae})})]}),P&&l.jsx("p",{className:U.supportingText,children:r!=null&&r.length?r:d!=null&&d.length?d:" "})]})},nt=H("navigationRailItem",({isSelected:e,icon:t,label:r,variant:s})=>({navigationRailItem:m(" group flex flex-col pt-1 pb-1.5 cursor-pointer",{"text-on-surface-variant":!e,"text-on-secondary-container":e,"gap-2 h-[68px]":s=="vertical","gap-0 h-[66px]":s=="horizontal"}),container:m(" w-fit flex justify-center relative rounded-full items-center mx-5",{"bg-secondary-container overflow-hidden":e,"gap-2 ":s=="horizontal","gap-0 ":s=="vertical","p-4":!r},r&&["px-4",{"py-1 ":s=="vertical","py-4 ":s=="horizontal"}]),stateLayer:m(" absolute w-full rounded-full h-full left-0 top-0 ",{"group-state-on-surface":!e,"group-state-on-secondary-container":e}),icon:m("size-6 flex"),label:m("w-fit mx-auto text-nowrap",{"text-label-large ":s=="horizontal","text-label-medium":s=="vertical"})})),Me=({label:e})=>l.jsx("div",{className:" h-9 flex items-center mx-9 mt-3",children:l.jsx("p",{className:"text-label-large text-on-surface-variant",children:e})}),Be=({className:e,onClick:t,label:r,variant:s="vertical",href:n,icon:i,selectedItem:f,setSelectedItem:c,index:d,onItemSelected:o,selected:x=!1,ref:h,transition:u,isExtended:y,iconSelected:b,style:S,extendedOnly:N,children:E,...w})=>{E&&(r=E);const B=a.useRef(null),j=h||B,[L,C]=a.useState(x);a.useEffect(()=>{x&&f==null?C(!0):C(f==d&&d!=null)},[f]),a.useEffect(()=>{f==d&&o&&o({ref:j,index:d||0,label:r,icon:i})},[f]);const W=n?"a":"button",P=p=>{c&&c(d??null),t&&t(p)},I=nt({isExtended:y,extendedOnly:N,className:e,onItemSelected:o,selectedItem:f,index:d,transition:u,selected:L,variant:s,icon:i,label:r,isSelected:L,setSelectedItem:c,href:n,children:r,iconSelected:b});return u={duration:.3,...u},N&&!y?null:l.jsxs(W,{...w,role:"tab","aria-selected":L,ref:j,href:n,className:I.navigationRailItem,onClick:P,style:{transition:u.duration+"s",...S},children:[l.jsxs(k.motion.div,{style:{transition:s=="horizontal"?u.duration+`s, gap ${u.duration/2}s ${u.duration-u.duration/2}s`:u.duration+`s, gap ${u.duration/3}s ${u.duration-u.duration/3}s`},transition:u,className:I.container,children:[l.jsx(k.motion.div,{layout:!0,className:I.stateLayer}),i&&l.jsx(K,{icon:L?b:i,className:I.icon}),l.jsx(k.AnimatePresence,{children:s=="horizontal"&&(()=>{const p={width:0,opacity:0,transition:{...u}},M={width:"auto",opacity:1,transition:{...u,opacity:{duration:u.duration/2,delay:u.duration-u.duration/2}}};return l.jsx(k.motion.span,{initial:p,animate:M,exit:p,className:I.label,children:r})})()})]}),l.jsx(k.AnimatePresence,{children:s=="vertical"&&(()=>{const p={height:0,opacity:0,transition:{...u,opacity:{duration:0}}},M={height:"auto",opacity:1,transition:{...u,opacity:{duration:u.duration/3,delay:u.duration-u.duration/3}}};return l.jsx(k.motion.span,{initial:M,animate:M,exit:p,className:I.label,transition:u,children:r})})()})]})},st=H("navigationRail",({isExtended:e,alignment:t})=>({navigationRail:m("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:m("flex flex-col gap-1 items-start"),menuIcon:"mx-5",segments:m(" flex flex-col overflow-auto min-w-full mt-10",{"w-full":!e,"w-fit items-start":e})})),ot=({variant:e="standard",onItemSelected:t,children:r,className:s,selectedItem:n,extended:i,alignment:f="top",menu:c={closed:{icon:ze,label:"Open menu"},opened:{icon:ke,label:"Close menu"}},style:d,onExtendedChange:o,transition:x,setSelectedItem:h})=>{const[u,y]=a.useState(null),[b,S]=a.useState(i);let N;n==0||n!=null?N=n:N=u;const E=h||y,w=a.useRef(null),B=I=>{t==null||t(I)};function j(I){const p=[];return a.Children.forEach(I,M=>{a.isValidElement(M)&&M.type===a.Fragment?p.push(...j(M.props.children)):p.push(M)}),p}const L=j(r),C=L.filter(I=>a.isValidElement(I)&&I.type===z),W=st({children:r,onItemSelected:t,selectedItem:N,setSelectedItem:E,className:s,variant:e,extended:b,isExtended:b,alignment:f,menu:c,transition:x,onExtendedChange:o});x={duration:.3,...x};const P=a.useRef(!1);return P.current=!1,a.useEffect(()=>{o==null||o(b??!1)},[b]),l.jsxs("div",{style:{transition:x.duration+"s",...d},ref:w,className:W.navigationRail,children:[l.jsxs("div",{className:W.header,children:[l.jsx(re,{onClick:()=>S(!b),label:b?c==null?void 0:c.opened.label:c==null?void 0:c.closed.label,className:W.menuIcon,icon:b?c.opened.icon:c==null?void 0:c.closed.icon}),C.length>0&&a.cloneElement(C[0],{transition:x,isExtended:b,className:"!shadow-none mx-5 "+C[0].props.className})]}),l.jsx("div",{className:W.segments,children:(()=>{let I=0;return L.map(p=>a.isValidElement(p)&&p.type===Be?a.cloneElement(p,{key:I,index:I++,variant:b?"horizontal":"vertical",selectedItem:N,setSelectedItem:E,onItemSelected:B,transition:x,extendedOnly:P.current,isExtended:b}):a.isValidElement(p)&&p.type===z?null:a.isValidElement(p)&&p.type===Me?(P.current=!0,b?a.cloneElement(p,{}):null):p)})()}),l.jsx("div",{className:"flex-1 max-h-[160px]"})]})};exports.Button=Le;exports.Card=Xe;exports.Carousel=_e;exports.CarouselItem=Re;exports.CustomScroll=T;exports.Divider=Ge;exports.Fab=z;exports.Icon=K;exports.IconButton=re;exports.NavigationRail=ot;exports.NavigationRailItem=Be;exports.NavigationRailSection=Me;exports.ProgressIndicator=Ne;exports.RippleEffect=J;exports.Slider=Qe;exports.SmoothScroll=Ue;exports.Snackbar=Te;exports.Switch=et;exports.SyncedFixedWrapper=Ee;exports.Tab=Ce;exports.Tabs=tt;exports.TextField=rt;exports.ThemeProvider=Oe;exports.ToolTip=te;exports.buttonStyle=ce;exports.cardStyle=ue;exports.carouselItemStyle=ie;exports.carouselStyle=fe;exports.classNames=m;exports.classnames=le;exports.customScrollStyle=Se;exports.defaultClassNames=H;exports.dividerStyle=de;exports.fabStyle=me;exports.getClassNames=ae;exports.iconButtonStyle=pe;exports.normalize=Ie;exports.progressIndicatorStyle=he;exports.sliderStyle=xe;exports.snackbarStyle=ye;exports.switchStyle=ge;exports.tabStyle=ve;exports.tabsStyle=we;exports.textFieldStyle=be;exports.toolStyle=je;
|
|
5
|
+
*/var ze={prefix:"fas",iconName:"circle-exclamation",icon:[512,512,["exclamation-circle"],"f06a","M256 512a256 256 0 1 0 0-512 256 256 0 1 0 0 512zm0-376c13.3 0 24 10.7 24 24l0 112c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-112c0-13.3 10.7-24 24-24zM229.3 352a26.7 26.7 0 1 1 53.3 0 26.7 26.7 0 1 1 -53.3 0z"]},ne={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"]},Te={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 et=({variant:e="standard",className:t,children:r,title:s,position:n="right",extended:a,onExtendedChange:f,closeIcon:u=ne,transition:d,...l})=>{d={duration:.3,...d};const[p,x]=c.useState(a??!0),i=ge({transition:d,title:s,position:n,closeIcon:u,className:t,children:r,onExtendedChange:f,isExtended:p,extended:p,variant:e});c.useEffect(()=>{f==null||f(p??!1)},[p]),c.useEffect(()=>{a!=null&&x(a)},[a]);const y={close:{width:0},open:{width:"auto"}},b=()=>o.jsxs(o.Fragment,{children:[o.jsx(E.AnimatePresence,{children:e=="modal"&&p&&o.jsx(E.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:d,onClick:()=>x(!1),className:i.overlay})}),o.jsx(E.AnimatePresence,{children:p&&o.jsxs("div",{...l,className:i.slideSheet,style:{transition:d.duration+"s"},children:[o.jsxs(E.motion.div,{variants:y,initial:a===!1?"open":"close",animate:"open",exit:"close",className:i.container,children:[o.jsxs("div",{className:i.header,children:[s&&o.jsx("p",{className:i.title,children:s}),o.jsx(Q,{size:"small",label:"close",icon:u,onClick:()=>x(!1),className:i.closeButton})]}),o.jsx("div",{className:i.content,style:{transition:d.duration+"s"},children:r})]}),o.jsx(Be,{className:i.divider,orientation:"vertical"})]})})]});return e=="modal"?oe.createPortal(b(),document.body):b()},tt=({message:e,className:t,duration:r,closeIcon:s=ne,onClose:n,...a})=>{const[f,u]=c.useState(!0),d=ve({className:t,closeIcon:s,duration:r,isVisible:f,onClose:n,message:e});c.useEffect(()=>{r&&setTimeout(()=>{l()},r)},[r]);const l=()=>{u(!1),n==null||n()};return o.jsx(E.AnimatePresence,{children:f&&o.jsx(E.motion.div,{initial:{height:0},animate:{height:"auto"},exit:{height:0},transition:{duration:.1},className:d.snackbar,...a,children:o.jsxs("div",{className:d.container,children:[o.jsx("p",{className:d.supportingText,children:e}),o.jsx(Q,{onClick:()=>l(),className:d.icon,icon:s,label:"close the snackbar"})]})})})},rt=({selected:e=!1,className:t,activeIcon:r,disabled:s=!1,inactiveIcon:n,onChange:a,onClick:f,onKeyDown:u,ref:d,...l})=>{const[p,x]=c.useState(e),i=v=>{s||(b(),f&&f(v))},y=v=>{s||((v.key===" "||v.key==="Enter")&&(v.preventDefault(),b()),u&&u(v))},b=()=>{x(!p),a==null||a(!p)},N=be({className:t,isSelected:p,activeIcon:r,inactiveIcon:n,disabled:s,selected:p,onChange:a}),S=c.useRef(null),L=d||S;return o.jsxs(E.motion.div,{role:"switch","aria-checked":p,tabIndex:s?-1:0,onKeyDown:y,onClick:i,ref:L,className:N.switch,...l,children:[o.jsx("input",{type:"hidden",value:p?"1":"0"}),o.jsxs(E.motion.div,{layout:!0,style:{translate:p?"50%":"-50%"},transition:{type:"spring",stiffness:700,damping:30},className:N.handleContainer,children:[o.jsx("div",{className:N.handle,children:(p?r:n)&&o.jsx(K,{className:N.icon,icon:p?r:n})}),o.jsx("div",{className:N.handleStateLayer})]})]})},Pe=({className:e,onClick:t,label:r,variant:s="primary",href:n,icon:a,selectedTab:f,setSelectedTab:u,tabsId:d,index:l,onTabSelected:p,scrollable:x=!1,selected:i=!1,ref:y,...b})=>{const N=c.useRef(null),S=y||N,[L,v]=c.useState(i);c.useEffect(()=>{i&&f==null?v(!0):v(f==l&&l!=null)},[f]),c.useEffect(()=>{f==l&&p&&p({ref:S,index:l||0,label:r,icon:a})},[f]);const B=n?"a":"button",j=C=>{u&&u(l??null),t&&t(C)},I=je({className:e,onTabSelected:p,scrollable:x,selectedTab:f,index:l,tabsId:d,selected:L,variant:s,icon:a,label:r,isSelected:L,setSelectedTab:u,href:n});return o.jsxs(B,{...b,role:"tab","aria-selected":L,ref:S,href:n,className:I.tab,onClick:j,...b,children:[o.jsx("span",{className:I.stateLayer,children:o.jsx(Z,{colorName:s==="primary"&&L?"primary":"on-surface",triggerRef:S})}),o.jsxs("span",{className:I.content,children:[a&&o.jsx(K,{icon:a,className:I.icon}),o.jsx("span",{className:I.label,children:r}),L&&o.jsx(E.motion.span,{layoutId:`underline-${d}`,className:I.underline,transition:{duration:.3}})]})]})},nt=({variant:e="primary",onTabSelected:t,children:r,className:s,selectedTab:n,setSelectedTab:a,scrollable:f=!1})=>{const[u,d]=c.useState(null);let l;n==0||n!=null?l=n:l=u;const p=a||d,x=c.Children.toArray(r).filter(S=>c.isValidElement(S)&&S.type===Pe),i=c.useRef(null),y=S=>{if(t==null||t(S),f){const L=i.current,v=S.ref.current;if(L&&v){const B=v.offsetLeft+v.offsetWidth/2-L.offsetWidth/2;L.scrollTo({left:B,behavior:"smooth"})}}},b=c.useMemo(()=>te(),[]),N=Se({children:r,onTabSelected:t,scrollable:f,selectedTab:l,setSelectedTab:p,className:s,variant:e});return o.jsx("div",{ref:i,role:"tablist",className:N.tabs,children:x.map((S,L)=>c.cloneElement(S,{key:L,index:L,variant:e,selectedTab:l,setSelectedTab:p,tabsId:b,onTabSelected:y,scrollable:f}))})},st=({variant:e="filled",disabled:t=!1,errorText:r,placeholder:s,suffix:n,name:a,label:f,className:u,supportingText:d,trailingIcon:l,leadingIcon:p,type:x="text",textLine:i="singleLine",autoComplete:y="on",onChange:b,value:N,showSupportingText:S=!1,...L})=>{const[v,B]=c.useState(N??""),[j,I]=c.useState(!1),[C,W]=c.useState(!1),[P,R]=c.useState(S);c.useEffect(()=>{B(N??"")},[N]),c.useEffect(()=>{r!=null&&r.length?W(!0):W(!1)},[r]),c.useEffect(()=>{S?R(S):d!=null&&d.length?R(!0):R(!1)},[P,d]),c.useEffect(()=>{j&&W(!1)},[j]);const h=c.useRef(null),M=()=>{h.current&&!j&&h.current.focus()},U=()=>{I(!0)},X=V=>{const D=V.target.value;B(D),W(!1),typeof b=="function"&&b(D)},_=()=>{I(!1)},O=Ne({showSupportingText:P,isFocused:j,showErrorIcon:C,disabled:t,name:a,label:f,autoComplete:y,className:u,onChange:b,placeholder:s,supportingText:d,type:x,leadingIcon:p,trailingIcon:l,variant:e,errorText:r,value:v,suffix:n,textLine:i}),[Y]=c.useState(te());let w,g;switch(i){case"multiLine":g=Ue,w={};break;case"textAreas":g="textarea",w={};break;case"singleLine":default:g="input",w={type:x};break}return o.jsxs("div",{className:O.textField,...L,children:[o.jsxs("fieldset",{onClick:M,className:O.content,children:[o.jsx("div",{className:O.stateLayer}),p&&o.jsx("div",{className:O.leadingIcon,children:c.isValidElement(p)?p:o.jsx(K,{className:"w-5 h-5",icon:p})}),!(!j&&!v.length||e=="filled")&&o.jsx(E.motion.legend,{variants:{hidden:{width:0,padding:0},visible:{width:"auto",padding:"0 8px"}},initial:"hidden",animate:!j&&!v.length?"hidden":"visible",className:"max-w-full ml-2 px-2 text-body-small h-0",transition:{duration:.2},children:o.jsx("span",{className:"transform inline-flex -translate-y-1/2",children:o.jsx(E.motion.span,{className:O.label,transition:{duration:.3},layoutId:Y,children:f})})}),o.jsxs("div",{className:"flex-1 relative",children:[(!j&&!v.length||e=="filled")&&o.jsx(E.motion.label,{htmlFor:a,className:m("absolute left-4 transition-all duration-300",{"text-body-small top-2":e=="filled"&&!(!j&&!v.length),"text-body-large top-1/2 transform -translate-y-1/2":!(e=="filled"&&!(!j&&!v.length))}),transition:{duration:.3},children:o.jsx(E.motion.span,{className:O.label,transition:{duration:.3},layoutId:e=="outlined"?Y:void 0,children:f})}),o.jsx(g,{ref:h,value:v,onChange:X,className:O.input,id:a,name:a,placeholder:j?s??void 0:"",onFocus:U,onBlur:_,disabled:t,autoComplete:y,"aria-invalid":!!(r!=null&&r.length),"aria-label":f,...w})]}),o.jsx("div",{className:O.activeIndicator}),!C&&o.jsxs(o.Fragment,{children:[l&&o.jsx("div",{onClick:V=>{V.stopPropagation()},className:O.trailingIcon,children:c.isValidElement(l)?l:o.jsx(K,{className:"h-5",icon:l})}),!l&&n&&o.jsx("span",{className:O.suffix,children:n})]}),C&&o.jsx("div",{className:m(O.trailingIcon,{" absolute right-0":!l}),children:o.jsx(K,{className:"h-5 text-error",icon:ze})})]}),P&&o.jsx("p",{className:O.supportingText,children:r!=null&&r.length?r:d!=null&&d.length?d:" "})]})},lt=q("navigationRailItem",({isSelected:e,icon:t,label:r,variant:s})=>({navigationRailItem:m(" group flex flex-col pt-1 pb-1.5 cursor-pointer",{"text-on-surface-variant":!e,"text-on-secondary-container":e,"gap-2 h-[68px]":s=="vertical","gap-0 h-[66px]":s=="horizontal"}),container:m(" w-fit flex justify-center relative rounded-full items-center mx-5",{"bg-secondary-container overflow-hidden":e,"gap-2 ":s=="horizontal","gap-0 ":s=="vertical","p-4":!r},r&&["px-4",{"py-1 ":s=="vertical","py-4 ":s=="horizontal"}]),stateLayer:m(" absolute w-full rounded-full h-full left-0 top-0 ",{"group-state-on-surface":!e,"group-state-on-secondary-container":e}),icon:m("size-6 flex"),label:m("w-fit mx-auto text-nowrap",{"text-label-large ":s=="horizontal","text-label-medium":s=="vertical"})})),Ve=({label:e})=>o.jsx("div",{className:" h-9 flex items-center mx-9 mt-3",children:o.jsx("p",{className:"text-label-large text-on-surface-variant",children:e})}),We=({className:e,onClick:t,label:r,variant:s="vertical",href:n,icon:a,selectedItem:f,setSelectedItem:u,index:d,onItemSelected:l,selected:p=!1,ref:x,transition:i,isExtended:y,iconSelected:b,style:N,extendedOnly:S,children:L,...v})=>{L&&(r=L);const B=c.useRef(null),j=x||B,[I,C]=c.useState(p);c.useEffect(()=>{p&&f==null?C(!0):C(f==d&&d!=null)},[f]),c.useEffect(()=>{f==d&&l&&l({ref:j,index:d||0,label:r,icon:a})},[f]);const W=n?"a":"button",P=h=>{u&&u(d??null),t&&t(h)},R=lt({isExtended:y,extendedOnly:S,className:e,onItemSelected:l,selectedItem:f,index:d,transition:i,selected:I,variant:s,icon:a,label:r,isSelected:I,setSelectedItem:u,href:n,children:r,iconSelected:b});return i={duration:.3,...i},S&&!y?null:o.jsxs(W,{...v,role:"tab","aria-selected":I,ref:j,href:n,className:R.navigationRailItem,onClick:P,style:{transition:i.duration+"s",...N},children:[o.jsxs(E.motion.div,{style:{transition:s=="horizontal"?i.duration+`s, gap ${i.duration/2}s ${i.duration-i.duration/2}s`:i.duration+`s, gap ${i.duration/3}s ${i.duration-i.duration/3}s`},transition:i,className:R.container,children:[o.jsx(E.motion.div,{layout:!0,className:R.stateLayer}),a&&o.jsx(K,{icon:I?b:a,className:R.icon}),o.jsx(E.AnimatePresence,{children:s=="horizontal"&&(()=>{const h={width:0,opacity:0,transition:{...i}},M={width:"auto",opacity:1,transition:{...i,opacity:{duration:i.duration/2,delay:i.duration-i.duration/2}}};return o.jsx(E.motion.span,{initial:h,animate:M,exit:h,className:R.label,children:r})})()})]}),o.jsx(E.AnimatePresence,{children:s=="vertical"&&(()=>{const h={height:0,opacity:0,transition:{...i,opacity:{duration:0}}},M={height:"auto",opacity:1,transition:{...i,opacity:{duration:i.duration/3,delay:i.duration-i.duration/3}}};return o.jsx(E.motion.span,{initial:M,animate:M,exit:h,className:R.label,transition:i,children:r})})()})]})},ot=q("navigationRail",({isExtended:e,alignment:t})=>({navigationRail:m("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:m("flex flex-col gap-1 items-start"),menuIcon:"mx-5",segments:m(" flex flex-col overflow-auto min-w-full mt-10",{"w-full":!e,"w-fit items-start":e})})),at=({variant:e="standard",onItemSelected:t,children:r,className:s,selectedItem:n,extended:a,alignment:f="top",menu:u={closed:{icon:Te,label:"Open menu"},opened:{icon:ne,label:"Close menu"}},style:d,onExtendedChange:l,transition:p,setSelectedItem:x})=>{const[i,y]=c.useState(null),[b,N]=c.useState(a);let S;n==0||n!=null?S=n:S=i;const L=x||y,v=c.useRef(null),B=R=>{t==null||t(R)};function j(R){const h=[];return c.Children.forEach(R,M=>{c.isValidElement(M)&&M.type===c.Fragment?h.push(...j(M.props.children)):h.push(M)}),h}const I=j(r),C=I.filter(R=>c.isValidElement(R)&&R.type===T),W=ot({children:r,onItemSelected:t,selectedItem:S,setSelectedItem:L,className:s,variant:e,extended:b,isExtended:b,alignment:f,menu:u,transition:p,onExtendedChange:l});p={duration:.3,...p};const P=c.useRef(!1);return P.current=!1,c.useEffect(()=>{l==null||l(b??!1)},[b]),o.jsxs("div",{style:{transition:p.duration+"s",...d},ref:v,className:W.navigationRail,children:[o.jsxs("div",{className:W.header,children:[o.jsx(Q,{onClick:()=>N(!b),label:b?u==null?void 0:u.opened.label:u==null?void 0:u.closed.label,className:W.menuIcon,icon:b?u.opened.icon:u==null?void 0:u.closed.icon}),C.length>0&&c.cloneElement(C[0],{transition:p,isExtended:b,className:"!shadow-none mx-5 "+C[0].props.className})]}),o.jsx("div",{className:W.segments,children:(()=>{let R=0;return I.map(h=>c.isValidElement(h)&&h.type===We?c.cloneElement(h,{key:R,index:R++,variant:b?"horizontal":"vertical",selectedItem:S,setSelectedItem:L,onItemSelected:B,transition:p,extendedOnly:P.current,isExtended:b}):c.isValidElement(h)&&h.type===T?null:c.isValidElement(h)&&h.type===Ve?(P.current=!0,b?c.cloneElement(h,{}):null):h)})()}),o.jsx("div",{className:"flex-1 max-h-[160px]"})]})};exports.Button=ke;exports.Card=Ge;exports.Carousel=Ke;exports.CarouselItem=Me;exports.CustomScroll=ee;exports.Divider=Be;exports.Fab=T;exports.Icon=K;exports.IconButton=Q;exports.NavigationRail=at;exports.NavigationRailItem=We;exports.NavigationRailSection=Ve;exports.ProgressIndicator=Le;exports.RippleEffect=Z;exports.SlideSheet=et;exports.Slider=Qe;exports.SmoothScroll=Xe;exports.Snackbar=tt;exports.Switch=rt;exports.SyncedFixedWrapper=Re;exports.Tab=Pe;exports.Tabs=nt;exports.TextField=st;exports.ThemeProvider=_e;exports.ToolTip=re;exports.buttonStyle=ue;exports.cardStyle=fe;exports.carouselItemStyle=de;exports.carouselStyle=me;exports.classNames=m;exports.classnames=ce;exports.customScrollStyle=Ie;exports.defaultClassNames=q;exports.dividerStyle=pe;exports.fabStyle=he;exports.getClassNames=ie;exports.iconButtonStyle=xe;exports.normalize=Ce;exports.progressIndicatorStyle=ye;exports.slideSheetStyle=ge;exports.sliderStyle=we;exports.snackbarStyle=ve;exports.switchStyle=be;exports.tabStyle=je;exports.tabsStyle=Se;exports.textFieldStyle=Ne;exports.toolStyle=Ee;
|