@udixio/ui-react 2.4.3 → 2.5.1

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.
Files changed (37) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/dist/index.cjs +2 -2
  3. package/dist/index.js +1745 -1460
  4. package/dist/lib/components/Carousel.d.ts +7 -2
  5. package/dist/lib/components/Carousel.d.ts.map +1 -1
  6. package/dist/lib/components/CarouselItem.d.ts +1 -1
  7. package/dist/lib/components/CarouselItem.d.ts.map +1 -1
  8. package/dist/lib/components/Slider.d.ts.map +1 -1
  9. package/dist/lib/effects/AnimateOnScroll.d.ts.map +1 -1
  10. package/dist/lib/effects/custom-scroll/custom-scroll.effect.d.ts +1 -1
  11. package/dist/lib/effects/custom-scroll/custom-scroll.effect.d.ts.map +1 -1
  12. package/dist/lib/effects/custom-scroll/custom-scroll.interface.d.ts +2 -0
  13. package/dist/lib/effects/custom-scroll/custom-scroll.interface.d.ts.map +1 -1
  14. package/dist/lib/effects/custom-scroll/custom-scroll.style.d.ts +4 -0
  15. package/dist/lib/effects/custom-scroll/custom-scroll.style.d.ts.map +1 -1
  16. package/dist/lib/interfaces/carousel-item.interface.d.ts +1 -0
  17. package/dist/lib/interfaces/carousel-item.interface.d.ts.map +1 -1
  18. package/dist/lib/interfaces/carousel.interface.d.ts +19 -1
  19. package/dist/lib/interfaces/carousel.interface.d.ts.map +1 -1
  20. package/dist/lib/styles/carousel-item.style.d.ts +2 -0
  21. package/dist/lib/styles/carousel-item.style.d.ts.map +1 -1
  22. package/dist/lib/styles/carousel.style.d.ts +5 -1
  23. package/dist/lib/styles/carousel.style.d.ts.map +1 -1
  24. package/dist/lib/styles/icon-button.style.d.ts.map +1 -1
  25. package/package.json +1 -1
  26. package/src/lib/components/Carousel.tsx +535 -52
  27. package/src/lib/components/CarouselItem.tsx +12 -6
  28. package/src/lib/components/Slider.tsx +25 -28
  29. package/src/lib/effects/AnimateOnScroll.ts +41 -0
  30. package/src/lib/effects/custom-scroll/custom-scroll.effect.tsx +111 -2
  31. package/src/lib/effects/custom-scroll/custom-scroll.interface.ts +4 -0
  32. package/src/lib/interfaces/carousel-item.interface.ts +1 -0
  33. package/src/lib/interfaces/carousel.interface.ts +20 -1
  34. package/src/lib/styles/carousel-item.style.ts +5 -2
  35. package/src/lib/styles/carousel.style.ts +1 -3
  36. package/src/lib/styles/icon-button.style.ts +5 -15
  37. package/src/lib/styles/slider.style.ts +1 -1
package/dist/index.js CHANGED
@@ -1,15 +1,14 @@
1
- import { jsx as f, jsxs as A, Fragment as te } from "react/jsx-runtime";
2
- import { clsx as ve } from "clsx";
3
- import { extendTailwindMerge as Ie } from "tailwind-merge";
4
- import K, { useState as S, useEffect as R, useRef as D, useLayoutEffect as we, isValidElement as ee, cloneElement as oe, useMemo as ke, Children as Se, Fragment as $e } from "react";
5
- import { motion as H, AnimatePresence as Q, useScroll as Me, useMotionValueEvent as fe, motionValue as Ce, useTransform as me } from "motion/react";
6
- import { throttle as Re } from "throttle-debounce";
7
- import { animate as Be } from "motion";
8
- import { createPortal as xe } from "react-dom";
9
- import { loader as De, defineConfig as We, FontPlugin as Pe, Variants as Ae } from "@udixio/theme";
10
- import { TailwindPlugin as be } from "@udixio/tailwind";
11
- import Ve from "react-textarea-autosize";
12
- const Le = Ie({
1
+ import { jsx as f, jsxs as Y, Fragment as ye } from "react/jsx-runtime";
2
+ import { clsx as Fe } from "clsx";
3
+ import { extendTailwindMerge as Ke } from "tailwind-merge";
4
+ import te, { useState as D, useEffect as $, useRef as B, useLayoutEffect as Xe, isValidElement as pe, cloneElement as be, useMemo as _e, Children as Ge, Fragment as Je } from "react";
5
+ import { motion as j, AnimatePresence as ue, useScroll as Ze, useMotionValueEvent as Re, animate as Qe } from "motion/react";
6
+ import { animate as ze } from "motion";
7
+ import { createPortal as Oe } from "react-dom";
8
+ import { loader as Te, defineConfig as et, FontPlugin as tt, Variants as nt } from "@udixio/theme";
9
+ import { TailwindPlugin as Ue } from "@udixio/tailwind";
10
+ import rt from "react-textarea-autosize";
11
+ const Ye = Ke({
13
12
  override: {
14
13
  classGroups: {
15
14
  "text-color": [
@@ -35,11 +34,11 @@ const Le = Ie({
35
34
  font: ["font"]
36
35
  }
37
36
  }
38
- }), h = (...e) => Le(ve(e)), He = (...e) => Le(ve(e));
39
- function Fe(e) {
37
+ }), p = (...e) => Ye(Fe(e)), ot = (...e) => Ye(Fe(e));
38
+ function lt(e) {
40
39
  return e.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g, "").replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "");
41
40
  }
42
- const Oe = (e) => {
41
+ const at = (e) => {
43
42
  const t = {};
44
43
  e.classNameList.forEach((l) => {
45
44
  var r;
@@ -47,23 +46,23 @@ const Oe = (e) => {
47
46
  if (typeof l == "string")
48
47
  (t[r = e.default] ?? (t[r] = [])).push(l);
49
48
  else {
50
- const c = l(e.states);
51
- Object.entries(c).map((i) => {
52
- const [s, u] = i;
53
- (t[s] ?? (t[s] = [])).push(u);
49
+ const i = l(e.states);
50
+ Object.entries(i).map((c) => {
51
+ const [s, d] = c;
52
+ (t[s] ?? (t[s] = [])).push(d);
54
53
  });
55
54
  }
56
55
  });
57
56
  const n = t;
58
57
  return Object.entries(t).map((l) => {
59
- let [r, c] = l;
60
- c = c.reverse(), r == e.default && c.unshift("relative"), c.unshift(Fe(r)), n[r] = He(...c);
58
+ let [r, i] = l;
59
+ i = i.reverse(), r == e.default && i.unshift("relative"), i.unshift(lt(r)), n[r] = ot(...i);
61
60
  }), n;
62
- }, j = (e, t) => (n) => Oe({
61
+ }, G = (e, t) => (n) => at({
63
62
  classNameList: [n.className, t],
64
63
  default: e,
65
64
  states: n
66
- }), Ue = j(
65
+ }), st = G(
67
66
  "button",
68
67
  ({
69
68
  variant: e,
@@ -71,59 +70,59 @@ const Oe = (e) => {
71
70
  disabled: n,
72
71
  iconPosition: l,
73
72
  icon: r,
74
- isActive: c,
75
- loading: i,
73
+ isActive: i,
74
+ loading: c,
76
75
  shape: s,
77
- onToggle: u,
78
- size: a,
79
- allowShapeTransformation: p
76
+ onToggle: d,
77
+ size: o,
78
+ allowShapeTransformation: h
80
79
  }) => ({
81
- button: h(
80
+ button: p(
82
81
  " relative cursor-pointer group outline-none inline-block flex justify-center items-center ",
83
- a === "xSmall" && "text-label-large px-3 py-1.5 gap-1",
84
- a === "small" && "text-label-large px-4 py-2.5 gap-2",
85
- a === "medium" && "text-title-medium px-6 py-4 gap-2",
86
- a === "large" && "text-headline-small px-12 py-8 gap-3",
87
- a === "xLarge" && "text-headline-large px-16 py-12 gap-4",
82
+ o === "xSmall" && "text-label-large px-3 py-1.5 gap-1",
83
+ o === "small" && "text-label-large px-4 py-2.5 gap-2",
84
+ o === "medium" && "text-title-medium px-6 py-4 gap-2",
85
+ o === "large" && "text-headline-small px-12 py-8 gap-3",
86
+ o === "xLarge" && "text-headline-large px-16 py-12 gap-4",
88
87
  s === "rounded" && {
89
- "rounded-[30px]": a === "xSmall" || a == "small",
90
- "rounded-[40px]": a === "medium",
91
- "rounded-[70px]": a === "large" || a == "xLarge"
88
+ "rounded-[30px]": o === "xSmall" || o == "small",
89
+ "rounded-[40px]": o === "medium",
90
+ "rounded-[70px]": o === "large" || o == "xLarge"
92
91
  },
93
- (s === "squared" || p && c) && {
94
- "rounded-[12px]": a === "xSmall" || a == "small",
95
- "rounded-[16px]": a === "medium",
96
- "rounded-[28px]": a === "large" || a == "xLarge"
92
+ (s === "squared" || h && i) && {
93
+ "rounded-[12px]": o === "xSmall" || o == "small",
94
+ "rounded-[16px]": o === "medium",
95
+ "rounded-[28px]": o === "large" || o == "xLarge"
97
96
  },
98
- p && !n && {
99
- "active:rounded-[12px]": a === "xSmall" || a == "small",
100
- "active:rounded-[16px]": a === "medium",
101
- "active:rounded-[28px]": a === "large" || a == "xLarge"
97
+ h && !n && {
98
+ "active:rounded-[12px]": o === "xSmall" || o == "small",
99
+ "active:rounded-[16px]": o === "medium",
100
+ "active:rounded-[28px]": o === "large" || o == "xLarge"
102
101
  },
103
102
  e === "elevated" && {
104
103
  "shadow-1 hover:shadow-2": !n,
105
- "bg-surface-container-low text-primary": !n && !c,
106
- "bg-primary text-on-primary": !n && c,
104
+ "bg-surface-container-low text-primary": !n && !i,
105
+ "bg-primary text-on-primary": !n && i,
107
106
  "text-on-surface/[38%]": n
108
107
  },
109
108
  e === "filled" && {
110
109
  "hover:shadow-1": !n,
111
- "bg-surface-container text-on-surface-variant": !n && !c && u,
112
- "bg-primary text-on-primary": !n && (c && u || !u),
110
+ "bg-surface-container text-on-surface-variant": !n && !i && d,
111
+ "bg-primary text-on-primary": !n && (i && d || !d),
113
112
  "text-on-surface/[38%]": n
114
113
  },
115
114
  e === "tonal" && {
116
115
  "hover:shadow-1": !n,
117
- "bg-secondary-container text-on-secondary-container": !n && !c,
118
- "bg-secondary text-on-secondary": !n && c,
116
+ "bg-secondary-container text-on-secondary-container": !n && !i,
117
+ "bg-secondary text-on-secondary": !n && i,
119
118
  "text-on-surface/[0.38]": n
120
119
  },
121
120
  e === "outlined" && [
122
121
  " border",
123
122
  {
124
123
  "border-on-surface/[0.12] text-on-surface/[0.38]": n,
125
- "text-primary border-outline focus:border-primary": !n && !c,
126
- "text-inverse-on-surface bg-inverse-surface border-inverse-surface": !n && c
124
+ "text-primary border-outline focus:border-primary": !n && !i,
125
+ "text-inverse-on-surface bg-inverse-surface border-inverse-surface": !n && i
127
126
  }
128
127
  ],
129
128
  e === "text" && [
@@ -133,11 +132,11 @@ const Oe = (e) => {
133
132
  "text-on-surface/[0.38]": n
134
133
  },
135
134
  t && [
136
- a === "xSmall" && "-mx-3 ",
137
- a === "small" && "-mx-4 ",
138
- a === "medium" && "-mx-6 ",
139
- a === "large" && "-mx-12",
140
- a === "xLarge" && "-mx-16 "
135
+ o === "xSmall" && "-mx-3 ",
136
+ o === "small" && "-mx-4 ",
137
+ o === "medium" && "-mx-6 ",
138
+ o === "large" && "-mx-12",
139
+ o === "xLarge" && "-mx-16 "
141
140
  // size === 'small' && ' -my-2.5',
142
141
  // size === 'medium' && ' -my-4',
143
142
  // size === 'large' && '-my-8',
@@ -146,10 +145,10 @@ const Oe = (e) => {
146
145
  ],
147
146
  n && "cursor-default"
148
147
  ),
149
- touchTarget: h(
148
+ touchTarget: p(
150
149
  "absolute -translate-x-1/2 -translate-y-1/2 left-1/2 top-1/2 h-12 w-full"
151
150
  ),
152
- stateLayer: h(
151
+ stateLayer: p(
153
152
  "min-h-full min-w-full absolute top-0 left-0 overflow-hidden",
154
153
  e === "elevated" && {
155
154
  "bg-on-surface/[0.12]": n,
@@ -157,23 +156,23 @@ const Oe = (e) => {
157
156
  },
158
157
  e === "filled" && {
159
158
  "bg-on-surface/[0.12]": n,
160
- "group-state-on-primary": !n && !u,
161
- "group-state-on-surface-variant": !n && u
159
+ "group-state-on-primary": !n && !d,
160
+ "group-state-on-surface-variant": !n && d
162
161
  },
163
162
  s === "rounded" && {
164
- "rounded-[30px]": a === "xSmall" || a == "small",
165
- "rounded-[40px]": a === "medium",
166
- "rounded-[70px]": a === "large" || a == "xLarge"
163
+ "rounded-[30px]": o === "xSmall" || o == "small",
164
+ "rounded-[40px]": o === "medium",
165
+ "rounded-[70px]": o === "large" || o == "xLarge"
167
166
  },
168
- (s === "squared" || p && c) && {
169
- "rounded-[12px]": a === "xSmall" || a == "small",
170
- "rounded-[16px]": a === "medium",
171
- "rounded-[28px]": a === "large" || a == "xLarge"
167
+ (s === "squared" || h && i) && {
168
+ "rounded-[12px]": o === "xSmall" || o == "small",
169
+ "rounded-[16px]": o === "medium",
170
+ "rounded-[28px]": o === "large" || o == "xLarge"
172
171
  },
173
- p && !n && {
174
- "group-active:rounded-[12px]": a === "xSmall" || a == "small",
175
- "group-active:rounded-[16px]": a === "medium",
176
- "group-active:rounded-[28px]": a === "large" || a == "xLarge"
172
+ h && !n && {
173
+ "group-active:rounded-[12px]": o === "xSmall" || o == "small",
174
+ "group-active:rounded-[16px]": o === "medium",
175
+ "group-active:rounded-[28px]": o === "large" || o == "xLarge"
177
176
  },
178
177
  e === "tonal" && {
179
178
  "bg-on-surface/[0.12]": n,
@@ -186,49 +185,50 @@ const Oe = (e) => {
186
185
  "group-state-primary": !n
187
186
  }
188
187
  ),
189
- label: h({ invisible: i }),
190
- icon: h(
191
- { invisible: i },
192
- a === "xSmall" && "size-5",
193
- a === "small" && "size-5",
194
- a === "medium" && "size-6",
195
- a === "large" && "size-8",
196
- a === "xLarge" && "size-10"
188
+ label: p({ invisible: c }),
189
+ icon: p(
190
+ { invisible: c },
191
+ o === "xSmall" && "size-5",
192
+ o === "small" && "size-5",
193
+ o === "medium" && "size-6",
194
+ o === "large" && "size-8",
195
+ o === "xLarge" && "size-10"
197
196
  )
198
197
  })
199
- ), Xe = j(
198
+ ), ct = G(
200
199
  "card",
201
200
  ({ variant: e, isInteractive: t }) => ({
202
- card: h(
201
+ card: p(
203
202
  "group/card rounded-xl overflow-hidden z-10",
204
203
  e === "outlined" && "bg-surface border border-outline-variant",
205
204
  e === "elevated" && "bg-surface-container-low shadow-1",
206
205
  e === "filled" && "bg-surface-container-highest"
207
206
  ),
208
- stateLayer: h([
207
+ stateLayer: p([
209
208
  "w-full top-0 left-0 h-full absolute -z-10",
210
209
  {
211
210
  " group-hover/card:hover-state-on-surface group-focus-visible/card:focus-state-on-surface": t
212
211
  }
213
212
  ])
214
213
  })
215
- ), Ye = j(
214
+ ), it = G(
216
215
  "carouselItem",
217
- () => ({
218
- carouselItem: h("rounded-[28px] overflow-hidden flex-none")
216
+ ({ width: e }) => ({
217
+ carouselItem: p("rounded-[28px] overflow-hidden flex-none", {
218
+ hidden: e === void 0,
219
+ "flex-1": e == null
220
+ })
219
221
  })
220
- ), je = j(
222
+ ), ut = G(
221
223
  "carousel",
222
224
  () => ({
223
- carousel: h(["w-full h-[400px]"]),
224
- track: h(
225
- "grid grid-flow-col h-full transition-transform ease-out w-fit"
226
- )
225
+ carousel: p(["w-full h-[400px]"]),
226
+ track: p("flex h-full w-full")
227
227
  })
228
- ), qe = j(
228
+ ), dt = G(
229
229
  "divider",
230
230
  ({ orientation: e }) => ({
231
- divider: h(
231
+ divider: p(
232
232
  "border-outline-variant ",
233
233
  {
234
234
  "h-fit w-full border-t": e === "horizontal"
@@ -238,10 +238,10 @@ const Oe = (e) => {
238
238
  }
239
239
  )
240
240
  })
241
- ), _e = j(
241
+ ), ft = G(
242
242
  "fab",
243
243
  ({ size: e, variant: t, isExtended: n }) => ({
244
- fab: h(
244
+ fab: p(
245
245
  "flex shadow-3 hover:shadow-4 group overflow-hidden outline-none items-center cursor-pointer",
246
246
  {
247
247
  "rounded-[12px]": e == "small" && !n,
@@ -262,20 +262,20 @@ const Oe = (e) => {
262
262
  t === "secondary" && "text-on-secondary-container",
263
263
  t === "tertiary" && "text-on-tertiary-container"
264
264
  ),
265
- stateLayer: h(
265
+ stateLayer: p(
266
266
  "absolute w-full h-full overflow-hidden left-1/2 top-1/2 transform -translate-y-1/2 -translate-x-1/2",
267
267
  t === "surface" && "group-hover:hover-state-primary group-focus:focus-state-primary",
268
268
  t === "primary" && "group-hover:hover-state-on-primary-container group-focus-visible:focus-state-on-primary-container",
269
269
  t === "secondary" && "group-hover:hover-state-on-secondary-container group-focus-visible:focus-state-on-secondary-container",
270
270
  t === "tertiary" && "group-hover:hover-state-on-tertiary-container group-focus-visible:focus-state-on-tertiary-container"
271
271
  ),
272
- icon: h({
272
+ icon: p({
273
273
  "size-6": e == "small" || e == "medium" || n,
274
274
  "size-9": e == "large" && !n
275
275
  }),
276
- label: h("text-title-medium text-nowrap")
276
+ label: p("text-title-medium text-nowrap")
277
277
  })
278
- ), Ke = j(
278
+ ), mt = G(
279
279
  "iconButton",
280
280
  ({
281
281
  variant: e,
@@ -283,30 +283,30 @@ const Oe = (e) => {
283
283
  onToggle: n,
284
284
  isActive: l,
285
285
  size: r,
286
- width: c,
287
- shape: i,
286
+ width: i,
287
+ shape: c,
288
288
  allowShapeTransformation: s
289
289
  }) => ({
290
- iconButton: h(
290
+ iconButton: p(
291
291
  "rounded-full relative flex transition-all duration-300",
292
292
  "group cursor-pointer",
293
293
  {
294
294
  "cursor-default": t
295
295
  },
296
- (i === "rounded" || i === "squared" && n && !t && l && s) && {
296
+ c === "rounded" && {
297
297
  "rounded-[30px]": r === "xSmall" || r == "small",
298
298
  "rounded-[40px]": r === "medium",
299
299
  "rounded-[70px]": r === "large" || r == "xLarge"
300
300
  },
301
- (i === "squared" || i === "rounded" && n && !t && l && s) && {
301
+ (c === "squared" || s && l) && {
302
302
  "rounded-[12px]": r === "xSmall" || r == "small",
303
303
  "rounded-[16px]": r === "medium",
304
304
  "rounded-[28px]": r === "large" || r == "xLarge"
305
305
  },
306
306
  s && !t && {
307
- "group-active:rounded-[12px]": r === "xSmall" || r == "small",
308
- "group-active:rounded-[16px]": r === "medium",
309
- "group-active:rounded-[28px]": r === "large" || r == "xLarge"
307
+ "active:rounded-[12px]": r === "xSmall" || r == "small",
308
+ "active:rounded-[16px]": r === "medium",
309
+ "active:rounded-[28px]": r === "large" || r == "xLarge"
310
310
  },
311
311
  e === "filled" && [
312
312
  !t && {
@@ -333,17 +333,17 @@ const Oe = (e) => {
333
333
  }
334
334
  ]
335
335
  ),
336
- touchTarget: h(
336
+ touchTarget: p(
337
337
  "absolute -translate-x-1/2 -translate-y-1/2 left-1/2 top-1/2 h-12 w-full"
338
338
  ),
339
- stateLayer: h(
339
+ stateLayer: p(
340
340
  "absolute top-0 left-0 h-full w-full overflow-hidden",
341
- (i === "rounded" || i === "squared" && n && !t && l && s) && {
341
+ (c === "rounded" || c === "squared" && n && !t && l && s) && {
342
342
  "rounded-[30px]": r === "xSmall" || r == "small",
343
343
  "rounded-[40px]": r === "medium",
344
344
  "rounded-[70px]": r === "large" || r == "xLarge"
345
345
  },
346
- (i === "squared" || i === "rounded" && n && !t && l && s) && {
346
+ (c === "squared" || c === "rounded" && n && !t && l && s) && {
347
347
  "rounded-[12px]": r === "xSmall" || r == "small",
348
348
  "rounded-[16px]": r === "medium",
349
349
  "rounded-[28px]": r === "large" || r == "xLarge"
@@ -372,21 +372,21 @@ const Oe = (e) => {
372
372
  }
373
373
  ]
374
374
  ),
375
- icon: h(
375
+ icon: p(
376
376
  " transition-all duration-300",
377
377
  { "size-5 p-1.5": r === "xSmall" },
378
378
  { "size-6 p-2": r === "small" },
379
379
  { "size-6 p-4": r === "medium" },
380
380
  { "size-8 p-8": r === "large" },
381
381
  { "size-10 p-12": r === "xLarge" },
382
- c == "narrow" && [
382
+ i == "narrow" && [
383
383
  { "px-1": r === "xSmall" },
384
384
  { "px-1": r === "small" },
385
385
  { "px-3": r === "medium" },
386
386
  { "px-4": r === "large" },
387
387
  { "px-8": r === "xLarge" }
388
388
  ],
389
- c == "wide" && [
389
+ i == "wide" && [
390
390
  { "px-2.5": r === "xSmall" },
391
391
  { "px-3.5": r === "small" },
392
392
  { "px-6": r === "medium" },
@@ -414,17 +414,17 @@ const Oe = (e) => {
414
414
  !!t && "text-on-surface/[0.38]"
415
415
  )
416
416
  })
417
- ), Ge = j(
417
+ ), ht = G(
418
418
  "progressIndicator",
419
419
  ({ variant: e, isVisible: t }) => ({
420
- progressIndicator: h(
420
+ progressIndicator: p(
421
421
  (e === "linear-determinate" || e == "linear-indeterminate") && "flex w-full h-1"
422
422
  ),
423
- track: h("h-full rounded-full bg-primary rounded-l-full", {
423
+ track: p("h-full rounded-full bg-primary rounded-l-full", {
424
424
  "max-h-0": !t,
425
425
  "max-h-full": t
426
426
  }),
427
- activeIndicator: h(
427
+ activeIndicator: p(
428
428
  {
429
429
  "max-h-0": !t,
430
430
  "max-h-full": t
@@ -438,7 +438,7 @@ const Oe = (e) => {
438
438
  }
439
439
  ]
440
440
  ),
441
- stop: h(
441
+ stop: p(
442
442
  "absolute top-1/2 -translate-y-1/2 right-0 bg-primary rounded-full size-1",
443
443
  {
444
444
  "max-h-0": !t,
@@ -446,10 +446,10 @@ const Oe = (e) => {
446
446
  }
447
447
  )
448
448
  })
449
- ), Je = j(
449
+ ), pt = G(
450
450
  "slideSheet",
451
451
  ({ variant: e, position: t }) => ({
452
- slideSheet: h(
452
+ slideSheet: p(
453
453
  "bg-surface flex justify-between max-w-xs z-10",
454
454
  {
455
455
  "flex-row-reverse": t == "right",
@@ -463,53 +463,53 @@ const Oe = (e) => {
463
463
  }
464
464
  ]
465
465
  ),
466
- container: h("w-full overflow-hidden", {}),
467
- content: h("w-fit "),
468
- header: h("p-4 flex items-center gap-2"),
469
- title: h("text-on-surface-variant text-title-large"),
470
- closeButton: h("ml-auto"),
471
- divider: h({ hidden: e == "modal" }),
472
- overlay: h(
466
+ container: p("w-full overflow-hidden", {}),
467
+ content: p("w-fit "),
468
+ header: p("p-4 flex items-center gap-2"),
469
+ title: p("text-on-surface-variant text-title-large"),
470
+ closeButton: p("ml-auto"),
471
+ divider: p({ hidden: e == "modal" }),
472
+ overlay: p(
473
473
  "bg-[black]/[0.32] fixed top-0 left-0 w-screen h-screen"
474
474
  )
475
475
  })
476
- ), Ze = j(
476
+ ), yt = G(
477
477
  "slider",
478
478
  ({ isChanging: e }) => ({
479
- slider: h([
479
+ slider: p([
480
480
  "relative w-full h-11 flex items-center rounded gap-x-1.5 cursor-pointer min-w-32"
481
481
  ]),
482
- activeTrack: h([
482
+ activeTrack: p([
483
483
  "h-4 relative transition-all duration-100 bg-primary overflow-hidden rounded-l-full "
484
484
  ]),
485
- inactiveTrack: h([
485
+ inactiveTrack: p([
486
486
  "h-4 relative transition-all duration-100 bg-primary-container rounded-r-full overflow-hidden"
487
487
  ]),
488
- handle: h([
489
- "transform transition-all duration-100 bg-primary h-full rounded-full ",
488
+ handle: p([
489
+ "transform relative transition-all duration-100 bg-primary h-full rounded-full ",
490
490
  { "w-0.5": e, "w-1": !e }
491
491
  ]),
492
- valueIndicator: h([
492
+ valueIndicator: p([
493
493
  "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"
494
494
  ]),
495
- dot: h([
495
+ dot: p([
496
496
  "h-1 w-1 absolute transform -translate-y-1/2 -translate-x-1/2 top-1/2 rounded-full"
497
497
  ])
498
498
  })
499
- ), Qe = j(
499
+ ), vt = G(
500
500
  "snackbar",
501
501
  () => ({
502
- snackbar: h(" rounded bg-inverse-surface "),
503
- container: h(
502
+ snackbar: p(" rounded bg-inverse-surface "),
503
+ container: p(
504
504
  "pl-4 pr-2 max-w-full py-1 flex items-center flex-wrap"
505
505
  ),
506
- supportingText: h("text-body-medium text-inverse-on-surface "),
507
- icon: h(" ml-auto mr-0 text-inverse-on-surface block dark")
506
+ supportingText: p("text-body-medium text-inverse-on-surface "),
507
+ icon: p(" ml-auto mr-0 text-inverse-on-surface block dark")
508
508
  })
509
- ), ze = j(
509
+ ), wt = G(
510
510
  "switch",
511
511
  ({ isSelected: e, disabled: t, inactiveIcon: n }) => ({
512
- switch: h(
512
+ switch: p(
513
513
  "group w-[52px] h-[32px] outline-none rounded-full border-2 flex items-center",
514
514
  { "bg-on-surface/[0.12] border-transparent": t },
515
515
  !t && [
@@ -520,12 +520,12 @@ const Oe = (e) => {
520
520
  // { 'justify-start': !isSelected },
521
521
  // { 'justify-end': isSelected },
522
522
  ),
523
- handleContainer: h(
523
+ handleContainer: p(
524
524
  "flex items-center justify-center absolute",
525
525
  { "left-[14px]": !e },
526
526
  { "right-[14px]": e }
527
527
  ),
528
- handle: h(
528
+ handle: p(
529
529
  "transition-all duration-100 z-10 rounded-full flex items-center justify-center",
530
530
  { "w-[16px] h-[16px]": !e && !n },
531
531
  { "w-[24px] h-[24px]": !(!e && !n) },
@@ -536,11 +536,11 @@ const Oe = (e) => {
536
536
  ],
537
537
  { "bg-surface": t }
538
538
  ),
539
- handleStateLayer: h(
539
+ handleStateLayer: p(
540
540
  "w-[40px] h-[40px] -z-10 rounded-full absolute",
541
541
  { "group-state-primary": !t }
542
542
  ),
543
- icon: h(
543
+ icon: p(
544
544
  "w-[16px] h-[16px]",
545
545
  !t && [
546
546
  { "text-on-primary-container": e },
@@ -549,16 +549,16 @@ const Oe = (e) => {
549
549
  { "text-on-surface/[0.38]": t }
550
550
  )
551
551
  })
552
- ), Te = j(
552
+ ), xt = G(
553
553
  "tab",
554
554
  ({ isSelected: e, icon: t, label: n, variant: l }) => ({
555
- tab: h(
555
+ tab: p(
556
556
  "flex-1 group outline-none flex px-4 justify-center items-center cursor-pointer",
557
557
  { "z-10": e },
558
558
  !!(t && n) && l === "primary" && "h-16",
559
559
  !(t && n && l === "primary") && "h-12"
560
560
  ),
561
- stateLayer: h(
561
+ stateLayer: p(
562
562
  "absolute w-full h-full overflow-hidden left-1/2 top-1/2 transform -translate-y-1/2 -translate-x-1/2",
563
563
  l === "primary" && {
564
564
  "group-hover:hover-state-on-surface group-focus-visible:focus-state-on-surface": !e,
@@ -566,7 +566,7 @@ const Oe = (e) => {
566
566
  },
567
567
  l === "secondary" && "group-hover:hover-state-on-surface group-focus-visible:focus-state-on-surface"
568
568
  ),
569
- content: h(
569
+ content: p(
570
570
  "flex gap-0.5 h-full justify-center",
571
571
  {
572
572
  relative: l == "primary"
@@ -580,7 +580,7 @@ const Oe = (e) => {
580
580
  "flex-row items-center gap-2": !!(n && t)
581
581
  }
582
582
  ),
583
- icon: h(
583
+ icon: p(
584
584
  "h-6 w-6 p-0.5 !box-border",
585
585
  l === "primary" && {
586
586
  "text-on-surface-variant": !e,
@@ -591,7 +591,7 @@ const Oe = (e) => {
591
591
  "text-on-surface": e
592
592
  }
593
593
  ),
594
- label: h(
594
+ label: p(
595
595
  "text-title-small text-nowrap",
596
596
  l === "primary" && {
597
597
  "text-on-surface-variant": !e,
@@ -602,22 +602,22 @@ const Oe = (e) => {
602
602
  "text-on-surface": e
603
603
  }
604
604
  ),
605
- underline: h(
605
+ underline: p(
606
606
  "bg-primary absolute w-full left-0 bottom-0",
607
607
  l === "primary" && "h-[3px] rounded-t",
608
608
  l === "secondary" && "h-0.5"
609
609
  )
610
610
  })
611
- ), et = j(
611
+ ), gt = G(
612
612
  "tabs",
613
613
  ({ scrollable: e }) => ({
614
- tabs: h(
614
+ tabs: p(
615
615
  "border-b border-surface-container-highest bg-surface",
616
616
  "flex relative ",
617
617
  { "overflow-x-auto": e }
618
618
  )
619
619
  })
620
- ), tt = j(
620
+ ), bt = G(
621
621
  "textField",
622
622
  ({
623
623
  disabled: e,
@@ -625,21 +625,21 @@ const Oe = (e) => {
625
625
  trailingIcon: n,
626
626
  variant: l,
627
627
  errorText: r,
628
- isFocused: c,
629
- value: i,
628
+ isFocused: i,
629
+ value: c,
630
630
  suffix: s,
631
- textLine: u
631
+ textLine: d
632
632
  }) => ({
633
- textField: h({
633
+ textField: p({
634
634
  "opacity-[.38]": e
635
635
  }),
636
- content: h(
636
+ content: p(
637
637
  "group transition-border duration-200 relative flex items-center ",
638
- { "h-14": u == "singleLine" },
638
+ { "h-14": d == "singleLine" },
639
639
  {
640
- "border-on-surface-variant": !(r != null && r.length) && !c && l == "filled",
641
- "border-outline": !(r != null && r.length) && !c && l == "outlined",
642
- "border-primary": !(r != null && r.length) && c,
640
+ "border-on-surface-variant": !(r != null && r.length) && !i && l == "filled",
641
+ "border-outline": !(r != null && r.length) && !i && l == "outlined",
642
+ "border-primary": !(r != null && r.length) && i,
643
643
  "border-error": !!(r != null && r.length)
644
644
  },
645
645
  { "bg-on-surface/[0.04]": e },
@@ -650,28 +650,28 @@ const Oe = (e) => {
650
650
  l == "outlined" && [
651
651
  "border rounded box-border",
652
652
  {
653
- "border-[3px]": c
653
+ "border-[3px]": i
654
654
  }
655
655
  ]
656
656
  ),
657
- stateLayer: h(
657
+ stateLayer: p(
658
658
  "absolute -z-10 w-full h-full top-0 left-0",
659
659
  {
660
660
  hidden: l == "outlined"
661
661
  },
662
662
  {
663
663
  "group-state-on-surface": !e,
664
- "focus-state-on-surface": c
664
+ "focus-state-on-surface": i
665
665
  }
666
666
  ),
667
- label: h(
667
+ label: p(
668
668
  "inline-flex outline-none whitespace-nowrap",
669
669
  { "text-on-surface-variant": !e && !(r != null && r.length) },
670
670
  { "text-on-surface": e },
671
671
  { "text-error": !!(r != null && r.length) },
672
- { "text-primary": !(r != null && r.length) && c }
672
+ { "text-primary": !(r != null && r.length) && i }
673
673
  ),
674
- input: h(
674
+ input: p(
675
675
  "w-full resize-none px-4 text-body-large bg-[inherit] outline-none autofill:transition-colors autofill:duration-[5000000ms]",
676
676
  {
677
677
  " text-on-surface placeholder:text-on-surface-variant": !e,
@@ -683,39 +683,39 @@ const Oe = (e) => {
683
683
  l == "filled" && " pb-2 pt-6",
684
684
  l == "outlined" && "py-4 relative z-10"
685
685
  ),
686
- activeIndicator: h(
686
+ activeIndicator: p(
687
687
  "absolute w-0 inset-x-0 border-rounded mx-auto bottom-0",
688
688
  l == "filled" && [
689
689
  "h-[2px] transition-all duration-300",
690
690
  { "bg-primary": !(r != null && r.length) },
691
691
  { "bg-error": !!(r != null && r.length) },
692
- { "!w-full": c }
692
+ { "!w-full": i }
693
693
  ]
694
694
  ),
695
- supportingText: h(
695
+ supportingText: p(
696
696
  " text-body-small px-4 pt-1",
697
697
  { "text-on-surface-variant": !e && !(r != null && r.length) },
698
698
  { "text-on-surface": e },
699
- { "!w-full": c },
699
+ { "!w-full": i },
700
700
  { "text-error": !!(r != null && r.length) }
701
701
  ),
702
- leadingIcon: h([
702
+ leadingIcon: p([
703
703
  "h-12 ml-3 flex items-center justify-center",
704
- { "cursor-text": !K.isValidElement(t) }
704
+ { "cursor-text": !te.isValidElement(t) }
705
705
  ]),
706
- trailingIcon: h("h-12 w-12 flex items-center justify-center", {
707
- "cursor-text": !K.isValidElement(n)
706
+ trailingIcon: p("h-12 w-12 flex items-center justify-center", {
707
+ "cursor-text": !te.isValidElement(n)
708
708
  }),
709
- suffix: h(
709
+ suffix: p(
710
710
  "text-on-surface-variant pl-0 pr-4",
711
711
  l == "filled" && " pb-2 pt-6",
712
712
  l == "outlined" && "py-4 relative z-10"
713
713
  )
714
714
  })
715
- ), nt = j(
715
+ ), Lt = G(
716
716
  "toolTip",
717
717
  ({ position: e, variant: t }) => ({
718
- toolTip: h(
718
+ toolTip: p(
719
719
  " pointer-events-auto w-max z-10 absolute m-1 w-max-content max-w-[312px]",
720
720
  {
721
721
  "bottom-full left-1/2 -translate-x-1/2": e == "top",
@@ -728,51 +728,51 @@ const Oe = (e) => {
728
728
  "top-full left-full": e == "bottom-right"
729
729
  }
730
730
  ),
731
- container: h(
731
+ container: p(
732
732
  "pb-2",
733
733
  t == "rich" && "bg-surface-container rounded-2xl text-on-surface-container px-4 pt-3 shadow-2",
734
734
  t == "plain" && "bg-inverse-surface rounded text-inverse-on-surface px-2 py-1"
735
735
  ),
736
- actions: h(
736
+ actions: p(
737
737
  "flex gap-10 px-1 mt-2",
738
738
  t == "plain" && "hidden"
739
739
  ),
740
- subHead: h(
740
+ subHead: p(
741
741
  "text-title-small mb-1",
742
742
  t == "plain" && "hidden"
743
743
  ),
744
- supportingText: h("")
744
+ supportingText: p("")
745
745
  })
746
- ), Z = ({ icon: e, colors: t = [], className: n }) => {
746
+ ), ie = ({ icon: e, colors: t = [], className: n }) => {
747
747
  if (typeof e == "string") {
748
- let a = e;
749
- return t[0] && (a = a.replace(
748
+ let o = e;
749
+ return t[0] && (o = o.replace(
750
750
  /<svg([^>]*)>/,
751
751
  `<svg$1 fill="${t[0]}" color="${t[0]}">`
752
- ), a = a.replace(
752
+ ), o = o.replace(
753
753
  /<path([^>]*?)>/g,
754
754
  '<path$1 fill="currentColor">'
755
755
  )), /* @__PURE__ */ f(
756
756
  "div",
757
757
  {
758
- className: h(
758
+ className: p(
759
759
  "size-5 box-content inline-flex fill-current",
760
760
  n
761
761
  ),
762
762
  style: { color: t[0] || "inherit" },
763
- dangerouslySetInnerHTML: { __html: a }
763
+ dangerouslySetInnerHTML: { __html: o }
764
764
  }
765
765
  );
766
766
  }
767
767
  if (e && typeof e == "object" && "src" in e) {
768
- const a = e;
768
+ const o = e;
769
769
  return /* @__PURE__ */ f(
770
770
  "img",
771
771
  {
772
- src: a.src,
773
- width: a.width,
774
- height: a.height,
775
- className: h("size-5 box-content", n),
772
+ src: o.src,
773
+ width: o.width,
774
+ height: o.height,
775
+ className: p("size-5 box-content", n),
776
776
  style: {
777
777
  filter: t[0] ? "brightness(0) saturate(100%) invert(1)" : void 0
778
778
  },
@@ -784,15 +784,15 @@ const Oe = (e) => {
784
784
  const l = e;
785
785
  if (!(l != null && l.prefix))
786
786
  throw new Error(`Invalid icon type: ${typeof e}`);
787
- const { icon: r } = l, [c, i, , , s] = r || [], u = (a) => {
788
- switch (a.length) {
787
+ const { icon: r } = l, [i, c, , , s] = r || [], d = (o) => {
788
+ switch (o.length) {
789
789
  case 2:
790
790
  return {
791
- "--fa-primary-color": a[0] || "inherit",
792
- "--fa-secondary-color": a[1] || "inherit"
791
+ "--fa-primary-color": o[0] || "inherit",
792
+ "--fa-secondary-color": o[1] || "inherit"
793
793
  };
794
794
  case 1:
795
- return { color: a[0] };
795
+ return { color: o[0] };
796
796
  default:
797
797
  return {};
798
798
  }
@@ -800,74 +800,74 @@ const Oe = (e) => {
800
800
  return /* @__PURE__ */ f(
801
801
  "svg",
802
802
  {
803
- className: h("size-5 box-content", n),
804
- style: { ...u(t) },
803
+ className: p("size-5 box-content", n),
804
+ style: { ...d(t) },
805
805
  xmlns: "http://www.w3.org/2000/svg",
806
- viewBox: `0 0 ${c} ${i}`,
806
+ viewBox: `0 0 ${i} ${c}`,
807
807
  role: "img",
808
808
  "aria-hidden": "true",
809
- children: typeof s == "string" ? /* @__PURE__ */ f("path", { className: "fill-current", d: s }) : s.map((a, p) => /* @__PURE__ */ f("path", { d: a }, p))
809
+ children: typeof s == "string" ? /* @__PURE__ */ f("path", { className: "fill-current", d: s }) : s.map((o, h) => /* @__PURE__ */ f("path", { d: o }, h))
810
810
  }
811
811
  );
812
- }, rt = ({
812
+ }, Nt = ({
813
813
  variant: e = "linear-determinate",
814
814
  value: t = 0,
815
815
  transitionDuration: n = 1e3,
816
816
  className: l,
817
817
  ...r
818
818
  }) => {
819
- const [c, i] = S(t), [s] = S(1.5);
820
- R(() => {
821
- t > 100 && (t = 100), t < 0 && (t = 0), i(t);
819
+ const [i, c] = D(t), [s] = D(1.5);
820
+ $(() => {
821
+ t > 100 && (t = 100), t < 0 && (t = 0), c(t);
822
822
  }, [t]);
823
- const [u, a] = S(!0), p = () => u ? s : s * 0.5;
824
- R(() => {
825
- if ((e === "circular-indeterminate" || e === "linear-indeterminate") && c !== 100) {
826
- const y = setInterval(() => {
827
- i(u ? 10 : 90), a(!u);
828
- }, p() * 1e3);
829
- return () => clearInterval(y);
823
+ const [d, o] = D(!0), h = () => d ? s : s * 0.5;
824
+ $(() => {
825
+ if ((e === "circular-indeterminate" || e === "linear-indeterminate") && i !== 100) {
826
+ const m = setInterval(() => {
827
+ c(d ? 10 : 90), o(!d);
828
+ }, h() * 1e3);
829
+ return () => clearInterval(m);
830
830
  }
831
- }, [e, u, c]);
832
- const [m, o] = S(!1);
833
- R(() => {
834
- if (c >= 100) {
835
- const y = setTimeout(() => {
836
- o(!1);
831
+ }, [e, d, i]);
832
+ const [y, a] = D(!1);
833
+ $(() => {
834
+ if (i >= 100) {
835
+ const m = setTimeout(() => {
836
+ a(!1);
837
837
  }, n);
838
838
  return () => {
839
- clearTimeout(y);
839
+ clearTimeout(m);
840
840
  };
841
841
  } else
842
- o(!0);
843
- }, [c, n]);
844
- const d = Ge({
842
+ a(!0);
843
+ }, [i, n]);
844
+ const u = ht({
845
845
  className: l,
846
846
  variant: e,
847
847
  value: t,
848
848
  transitionDuration: n,
849
- isVisible: m
849
+ isVisible: y
850
850
  });
851
- return /* @__PURE__ */ A(te, { children: [
852
- (e === "linear-determinate" || e == "linear-indeterminate") && /* @__PURE__ */ A("div", { className: d.progressIndicator, ...r, children: [
851
+ return /* @__PURE__ */ Y(ye, { children: [
852
+ (e === "linear-determinate" || e == "linear-indeterminate") && /* @__PURE__ */ Y("div", { className: u.progressIndicator, ...r, children: [
853
853
  /* @__PURE__ */ f(
854
854
  "div",
855
855
  {
856
856
  style: {
857
- width: `${c}%`,
858
- transition: `width ${n}ms ease-in-out ${c == 100 ? ", max-height 200ms 0.5s ease-in-out" : ""}`
857
+ width: `${i}%`,
858
+ transition: `width ${n}ms ease-in-out ${i == 100 ? ", max-height 200ms 0.5s ease-in-out" : ""}`
859
859
  },
860
- className: d.track
860
+ className: u.track
861
861
  }
862
862
  ),
863
863
  /* @__PURE__ */ f(
864
864
  "div",
865
865
  {
866
866
  style: {
867
- marginLeft: c != 100 ? "6px" : "0px",
868
- transition: `width ${n}ms ease-in-out ${c == 100 ? `, max-height 200ms 0.5s ease-in-out, margin-left ${n}ms ${n / 1.5}ms` : ""}`
867
+ marginLeft: i != 100 ? "6px" : "0px",
868
+ transition: `width ${n}ms ease-in-out ${i == 100 ? `, max-height 200ms 0.5s ease-in-out, margin-left ${n}ms ${n / 1.5}ms` : ""}`
869
869
  },
870
- className: d.activeIndicator
870
+ className: u.activeIndicator
871
871
  }
872
872
  ),
873
873
  /* @__PURE__ */ f(
@@ -877,12 +877,12 @@ const Oe = (e) => {
877
877
  width: "4 px",
878
878
  transition: `width ${n}ms ease-in-out, max-height 200ms 0.5s ease-in-out`
879
879
  },
880
- className: d.stop
880
+ className: u.stop
881
881
  }
882
882
  )
883
883
  ] }),
884
884
  (e === "circular-determinate" || e == "circular-indeterminate") && /* @__PURE__ */ f(
885
- H.svg,
885
+ j.svg,
886
886
  {
887
887
  width: "48",
888
888
  height: "48",
@@ -891,46 +891,46 @@ const Oe = (e) => {
891
891
  animate: { rotate: 270 },
892
892
  transition: {
893
893
  repeat: 1 / 0,
894
- duration: p(),
894
+ duration: h(),
895
895
  ease: "linear"
896
896
  },
897
- className: d.progressIndicator,
897
+ className: u.progressIndicator,
898
898
  ...r,
899
899
  children: /* @__PURE__ */ f(
900
- H.circle,
900
+ j.circle,
901
901
  {
902
902
  cx: "50%",
903
903
  cy: "50%",
904
- r: m ? "calc(50% - 2px)" : "50%",
904
+ r: y ? "calc(50% - 2px)" : "50%",
905
905
  style: {
906
906
  strokeLinecap: "round"
907
907
  },
908
908
  initial: "hidden",
909
909
  animate: "visible",
910
- className: d.activeIndicator,
910
+ className: u.activeIndicator,
911
911
  variants: {
912
912
  hidden: {
913
- pathLength: u ? 10 / 100 : 90 / 100
913
+ pathLength: d ? 10 / 100 : 90 / 100
914
914
  },
915
915
  visible: {
916
- pathLength: u ? 90 / 100 : 10 / 100
916
+ pathLength: d ? 90 / 100 : 10 / 100
917
917
  }
918
918
  },
919
919
  transition: {
920
920
  pathLength: {
921
921
  type: "tween",
922
922
  ease: "linear",
923
- duration: p(),
923
+ duration: h(),
924
924
  bounce: 0
925
925
  }
926
926
  }
927
927
  }
928
928
  )
929
929
  },
930
- u + ""
930
+ d + ""
931
931
  )
932
932
  ] });
933
- }, re = ({
933
+ }, we = ({
934
934
  colorName: e = "on-surface",
935
935
  triggerRef: t
936
936
  }) => {
@@ -951,29 +951,29 @@ const Oe = (e) => {
951
951
  borderRadius: { duration: 0.3, delay: 0.3 }
952
952
  }
953
953
  }
954
- }, [l, r] = S(!0), [c, i] = S(!1), [s, u] = S({ x: 0, y: 0 });
955
- R(() => {
956
- c && (r(!0), r(!1));
957
- }, [c]), R(() => {
958
- const o = t == null ? void 0 : t.current;
959
- if (o)
960
- return o.addEventListener("mousedown", a), o.addEventListener("mouseup", m), o.addEventListener("mouseleave", p), () => {
961
- o.removeEventListener("mousedown", a), o.removeEventListener("mouseup", m), o.removeEventListener("mouseleave", p);
954
+ }, [l, r] = D(!0), [i, c] = D(!1), [s, d] = D({ x: 0, y: 0 });
955
+ $(() => {
956
+ i && (r(!0), r(!1));
957
+ }, [i]), $(() => {
958
+ const a = t == null ? void 0 : t.current;
959
+ if (a)
960
+ return a.addEventListener("mousedown", o), a.addEventListener("mouseup", y), a.addEventListener("mouseleave", h), () => {
961
+ a.removeEventListener("mousedown", o), a.removeEventListener("mouseup", y), a.removeEventListener("mouseleave", h);
962
962
  };
963
963
  }, [t]);
964
- const a = (o) => {
965
- const d = t == null ? void 0 : t.current, y = d.getBoundingClientRect();
966
- i(!0), u({
967
- x: (o.clientX - y.left) / d.clientWidth * 100,
968
- y: (o.clientY - y.top) / d.clientHeight * 100
964
+ const o = (a) => {
965
+ const u = t == null ? void 0 : t.current, m = u.getBoundingClientRect();
966
+ c(!0), d({
967
+ x: (a.clientX - m.left) / u.clientWidth * 100,
968
+ y: (a.clientY - m.top) / u.clientHeight * 100
969
969
  });
970
- }, p = (o) => {
971
- i(!1);
972
- }, m = (o) => {
973
- i(!1);
970
+ }, h = (a) => {
971
+ c(!1);
972
+ }, y = (a) => {
973
+ c(!1);
974
974
  };
975
- return /* @__PURE__ */ f(Q, { mode: "wait", children: (c || !c && !l) && /* @__PURE__ */ f(
976
- H.div,
975
+ return /* @__PURE__ */ f(ue, { mode: "wait", children: (i || !i && !l) && /* @__PURE__ */ f(
976
+ j.div,
977
977
  {
978
978
  style: {
979
979
  position: "absolute",
@@ -992,10 +992,10 @@ const Oe = (e) => {
992
992
  className: "transform -translate-x-1/2 -translate-y-1/2"
993
993
  }
994
994
  ) });
995
- }, ot = j(
995
+ }, Et = G(
996
996
  "customScroll",
997
997
  ({ orientation: e, draggable: t, isDragging: n }) => ({
998
- customScroll: h(
998
+ customScroll: p(
999
999
  "flex h-full w-full",
1000
1000
  t && [
1001
1001
  "[&::-webkit-scrollbar-track]:rounded-full",
@@ -1015,160 +1015,228 @@ const Oe = (e) => {
1015
1015
  "cursor-grabbing": t && n
1016
1016
  }
1017
1017
  ),
1018
- track: h("overflow-hidden flex-none sticky", {
1018
+ track: p("overflow-hidden flex-none sticky", {
1019
1019
  "left-0 h-full": e === "horizontal",
1020
1020
  "top-0 w-full": e === "vertical"
1021
1021
  })
1022
1022
  })
1023
- ), lt = ({
1023
+ );
1024
+ function It(e, t) {
1025
+ let n = 0, l = null, r = null;
1026
+ const i = (c, s) => {
1027
+ n = Date.now(), t(c, s);
1028
+ };
1029
+ return (c, s) => {
1030
+ const d = Date.now(), o = e - (d - n);
1031
+ o <= 0 ? (l && (clearTimeout(l), l = null), i(c, s)) : (r = { v: c, o: s }, l || (l = setTimeout(() => {
1032
+ l = null;
1033
+ const h = r;
1034
+ r = null, h && i(h.v, h.o);
1035
+ }, o)));
1036
+ };
1037
+ }
1038
+ const kt = ({
1024
1039
  children: e,
1025
1040
  orientation: t = "vertical",
1026
1041
  scrollSize: n,
1027
1042
  onScroll: l,
1028
1043
  className: r,
1029
- draggable: c = !1,
1030
- throttleDuration: i = 75
1044
+ draggable: i = !1,
1045
+ throttleDuration: c = 75,
1046
+ scroll: s,
1047
+ setScroll: d
1031
1048
  }) => {
1032
- var P, F;
1033
- const s = D(null), u = D(null), [a, p] = S({
1049
+ var ae, de;
1050
+ const o = B(null), h = B(null), [y, a] = D({
1034
1051
  width: null,
1035
1052
  height: null
1036
1053
  });
1037
- R(() => {
1038
- if (!s.current) return;
1039
- const $ = new ResizeObserver((O) => {
1040
- for (const U of O)
1041
- U.target === s.current && p({
1042
- width: U.contentRect.width,
1043
- height: U.contentRect.height
1054
+ $(() => {
1055
+ if (!o.current) return;
1056
+ const I = new ResizeObserver((w) => {
1057
+ for (const A of w)
1058
+ A.target === o.current && a({
1059
+ width: A.contentRect.width,
1060
+ height: A.contentRect.height
1044
1061
  // On observe aussi la hauteur maintenant
1045
1062
  });
1046
1063
  });
1047
- return $.observe(s.current), () => {
1048
- $.disconnect();
1064
+ return I.observe(o.current), () => {
1065
+ I.disconnect();
1049
1066
  };
1050
- }, [s]);
1051
- const m = D(null), o = D(null), d = () => {
1052
- const $ = u.current;
1053
- return $ ? {
1054
- width: n ?? $.scrollWidth,
1055
- height: n ?? $.scrollHeight
1067
+ }, [o]);
1068
+ const u = B(null), m = B(null), b = () => {
1069
+ const I = h.current;
1070
+ return I ? {
1071
+ width: n ?? I.scrollWidth,
1072
+ height: n ?? I.scrollHeight
1056
1073
  } : null;
1057
- }, y = () => {
1058
- const $ = s.current;
1059
- return $ ? {
1060
- width: $.clientWidth,
1061
- height: $.clientHeight
1074
+ }, x = () => {
1075
+ const I = o.current;
1076
+ return I ? {
1077
+ width: I.clientWidth,
1078
+ height: I.clientHeight
1062
1079
  // Correction ici pour retourner la bonne hauteur
1063
1080
  } : null;
1064
- }, { scrollYProgress: v, scrollXProgress: w } = Me({
1065
- container: s
1066
- }), E = D(null);
1067
- E.current || (E.current = Re(
1068
- i,
1069
- ($, O) => {
1070
- !o.current || !m.current || !s.current || l && (t === "horizontal" && O === "x" && l({
1071
- scrollProgress: $,
1072
- scroll: $ * (m.current.width - s.current.clientWidth),
1073
- scrollTotal: m.current.width - s.current.clientWidth,
1074
- scrollVisible: o.current.width
1075
- }), t === "vertical" && O === "y" && l({
1076
- scrollProgress: $,
1077
- scroll: $ * (m.current.height - s.current.clientHeight),
1078
- scrollTotal: m.current.height - s.current.clientHeight,
1079
- scrollVisible: o.current.height
1080
- }));
1081
+ }, { scrollYProgress: M, scrollXProgress: g } = Ze({
1082
+ container: o
1083
+ }), R = B(null);
1084
+ R.current || (R.current = It(
1085
+ c,
1086
+ (I, w) => {
1087
+ !m.current || !u.current || !o.current || (w === (t === "horizontal" ? "x" : "y") && (d == null || d(I)), l && (t === "horizontal" && w === "x" && l({
1088
+ scrollProgress: I,
1089
+ scroll: I * (u.current.width - o.current.clientWidth),
1090
+ scrollTotal: u.current.width - o.current.clientWidth,
1091
+ scrollVisible: m.current.width
1092
+ }), t === "vertical" && w === "y" && l({
1093
+ scrollProgress: I,
1094
+ scroll: I * (u.current.height - o.current.clientHeight),
1095
+ scrollTotal: u.current.height - o.current.clientHeight,
1096
+ scrollVisible: m.current.height
1097
+ })));
1081
1098
  }
1082
1099
  ));
1083
- const L = ($, O) => {
1084
- E.current && E.current($, O);
1100
+ const N = (I, w) => {
1101
+ R.current && R.current(I, w);
1085
1102
  };
1086
- R(() => {
1087
- a.width && L(w.get(), "x"), a.height && L(v.get(), "y");
1088
- }, [a]), fe(w, "change", ($) => {
1089
- L($, "x");
1090
- }), fe(v, "change", ($) => {
1091
- L($, "y");
1103
+ $(() => {
1104
+ y.width && N(g.get(), "x"), y.height && N(M.get(), "y");
1105
+ }, [y]), $(() => {
1106
+ const I = o.current, w = h.current;
1107
+ if (!I || !w || typeof s != "number") return;
1108
+ const A = (H, V, le) => Math.min(le, Math.max(V, H));
1109
+ if (t === "horizontal") {
1110
+ const H = Math.max(0, (n ?? w.scrollWidth) - I.clientWidth);
1111
+ I.scrollLeft = A(s * H, 0, H);
1112
+ } else {
1113
+ const H = Math.max(0, (n ?? w.scrollHeight) - I.clientHeight);
1114
+ I.scrollTop = A(s * H, 0, H);
1115
+ }
1116
+ }, [s, t, n]), Re(g, "change", (I) => {
1117
+ N(I, "x");
1118
+ }), Re(M, "change", (I) => {
1119
+ N(I, "y");
1092
1120
  });
1093
- const [B, N] = S(!1);
1094
- we(() => {
1095
- B || !o.current || !m.current || !l || (l({
1121
+ const [P, L] = D(!1);
1122
+ Xe(() => {
1123
+ P || !m.current || !u.current || !l || (l({
1096
1124
  scrollProgress: 0,
1097
1125
  scroll: 0,
1098
- scrollTotal: t == "vertical" ? m.current.height : m.current.width,
1099
- scrollVisible: t == "vertical" ? o.current.height : o.current.width
1100
- }), N(!0));
1101
- }, [o, m, l]), m.current = d(), o.current = y();
1102
- const [I, M] = S(!1), V = ot({
1103
- isDragging: I,
1126
+ scrollTotal: t == "vertical" ? u.current.height : u.current.width,
1127
+ scrollVisible: t == "vertical" ? m.current.height : m.current.width
1128
+ }), L(!0));
1129
+ }, [m, u, l]), u.current = b(), m.current = x();
1130
+ const [O, F] = D(!1), C = Et({
1131
+ isDragging: O,
1104
1132
  children: e,
1105
1133
  className: r,
1106
1134
  onScroll: l,
1107
1135
  orientation: t,
1108
1136
  scrollSize: n,
1109
- draggable: c,
1110
- throttleDuration: i
1111
- }), [W, k] = S(0), [g, C] = S(0), X = ($) => {
1112
- if (!c) return;
1113
- const O = s.current;
1114
- if (!O || W == null) return;
1115
- const J = ($.pageX - O.offsetLeft - W) * 1.5;
1116
- O.scrollLeft = g - J;
1117
- }, q = ($) => {
1118
- const O = s.current;
1119
- O && (M(!0), k($.pageX - O.offsetLeft), C(O.scrollLeft));
1120
- }, G = ($) => {
1121
- I && ($.preventDefault(), X($));
1122
- }, Y = () => {
1123
- M(!1);
1124
- }, z = () => {
1125
- M(!1);
1126
- }, b = ($) => {
1127
- $.preventDefault();
1128
- }, x = D(null);
1129
- return R(() => () => {
1130
- x.current && clearTimeout(x.current);
1131
- }, []), /* @__PURE__ */ A(
1137
+ draggable: i,
1138
+ throttleDuration: c
1139
+ }), [v, k] = D(0), [U, J] = D(0), re = (I) => {
1140
+ if (!i) return;
1141
+ const w = o.current;
1142
+ if (!w || v == null) return;
1143
+ const H = (I.pageX - w.offsetLeft - v) * 1.5;
1144
+ w.scrollLeft = U - H;
1145
+ }, _ = (I) => {
1146
+ const w = o.current;
1147
+ w && (F(!0), k(I.pageX - w.offsetLeft), J(w.scrollLeft));
1148
+ }, oe = (I) => {
1149
+ O && (I.preventDefault(), re(I));
1150
+ }, S = () => {
1151
+ F(!1);
1152
+ }, E = () => {
1153
+ F(!1);
1154
+ }, X = (I) => {
1155
+ I.preventDefault();
1156
+ }, q = B(null);
1157
+ return $(() => () => {
1158
+ q.current && clearTimeout(q.current);
1159
+ }, []), $(() => {
1160
+ const I = o.current;
1161
+ if (!I) return;
1162
+ const w = (A) => {
1163
+ var se, ne, T, ce;
1164
+ const H = A.detail, V = o.current;
1165
+ if (!V || !H) return;
1166
+ const le = H.orientation ?? t;
1167
+ if (typeof H.progress == "number")
1168
+ if (le === "horizontal") {
1169
+ const ee = Math.max(
1170
+ 0,
1171
+ (((se = u.current) == null ? void 0 : se.width) ?? 0) - V.clientWidth
1172
+ );
1173
+ V.scrollLeft = Math.min(ee, Math.max(0, H.progress * ee));
1174
+ } else {
1175
+ const ee = Math.max(
1176
+ 0,
1177
+ (((ne = u.current) == null ? void 0 : ne.height) ?? 0) - V.clientHeight
1178
+ );
1179
+ V.scrollTop = Math.min(ee, Math.max(0, H.progress * ee));
1180
+ }
1181
+ else if (typeof H.scroll == "number")
1182
+ if (le === "horizontal") {
1183
+ const ee = Math.max(
1184
+ 0,
1185
+ (((T = u.current) == null ? void 0 : T.width) ?? 0) - V.clientWidth
1186
+ );
1187
+ V.scrollLeft = Math.min(ee, Math.max(0, H.scroll));
1188
+ } else {
1189
+ const ee = Math.max(
1190
+ 0,
1191
+ (((ce = u.current) == null ? void 0 : ce.height) ?? 0) - V.clientHeight
1192
+ );
1193
+ V.scrollTop = Math.min(ee, Math.max(0, H.scroll));
1194
+ }
1195
+ };
1196
+ return I.addEventListener("udx:customScroll:set", w), () => {
1197
+ I.removeEventListener("udx:customScroll:set", w);
1198
+ };
1199
+ }, [t]), /* @__PURE__ */ Y(
1132
1200
  "div",
1133
1201
  {
1134
- className: V.customScroll,
1135
- ref: s,
1136
- onMouseDown: q,
1137
- onMouseMove: G,
1138
- onMouseUp: Y,
1139
- onMouseLeave: z,
1140
- onDragStart: b,
1141
- onScroll: ($) => {
1142
- I || (k(null), M(!0), x.current && clearTimeout(x.current), x.current = setTimeout(() => {
1143
- M(!1);
1202
+ className: C.customScroll,
1203
+ ref: o,
1204
+ onMouseDown: _,
1205
+ onMouseMove: oe,
1206
+ onMouseUp: S,
1207
+ onMouseLeave: E,
1208
+ onDragStart: X,
1209
+ onScroll: (I) => {
1210
+ O || (k(null), F(!0), q.current && clearTimeout(q.current), q.current = setTimeout(() => {
1211
+ F(!1);
1144
1212
  }, 1e3));
1145
1213
  },
1146
1214
  children: [
1147
1215
  /* @__PURE__ */ f(
1148
1216
  "div",
1149
1217
  {
1150
- ref: u,
1151
- style: t === "vertical" ? { height: ((P = o == null ? void 0 : o.current) == null ? void 0 : P.height) ?? "100%" } : { width: ((F = o == null ? void 0 : o.current) == null ? void 0 : F.width) ?? "100%" },
1152
- className: V.track,
1218
+ ref: h,
1219
+ style: t === "vertical" ? { height: ((ae = m == null ? void 0 : m.current) == null ? void 0 : ae.height) ?? "100%" } : { width: ((de = m == null ? void 0 : m.current) == null ? void 0 : de.width) ?? "100%" },
1220
+ className: C.track,
1153
1221
  children: e
1154
1222
  }
1155
1223
  ),
1156
- o.current && m.current && /* @__PURE__ */ A(te, { children: [
1157
- t === "vertical" && m.current.height > o.current.height && /* @__PURE__ */ f(
1158
- H.div,
1224
+ m.current && u.current && /* @__PURE__ */ Y(ye, { children: [
1225
+ t === "vertical" && u.current.height > m.current.height && /* @__PURE__ */ f(
1226
+ j.div,
1159
1227
  {
1160
1228
  className: "flex-none",
1161
1229
  style: {
1162
- height: m.current.height - o.current.height
1230
+ height: u.current.height - m.current.height
1163
1231
  }
1164
1232
  }
1165
1233
  ),
1166
- t === "horizontal" && m.current.width > o.current.width && /* @__PURE__ */ f(
1167
- H.div,
1234
+ t === "horizontal" && u.current.width > m.current.width && /* @__PURE__ */ f(
1235
+ j.div,
1168
1236
  {
1169
1237
  className: "flex-none",
1170
1238
  style: {
1171
- width: m.current.width - o.current.width
1239
+ width: u.current.width - m.current.width
1172
1240
  }
1173
1241
  }
1174
1242
  )
@@ -1176,153 +1244,153 @@ const Oe = (e) => {
1176
1244
  ]
1177
1245
  }
1178
1246
  );
1179
- }, at = ({
1247
+ }, Mt = ({
1180
1248
  onScroll: e,
1181
1249
  el: t,
1182
1250
  touch: n = !0
1183
1251
  }) => {
1184
- const l = D(null), r = D(0), c = D(0);
1185
- R(() => {
1252
+ const l = B(null), r = B(0), i = B(0);
1253
+ $(() => {
1186
1254
  if (!t) return;
1187
- r.current = t.scrollTop, c.current = t.scrollLeft;
1188
- const i = (o) => {
1189
- e == null || e(o);
1190
- }, s = (o) => {
1191
- o.preventDefault(), i({
1255
+ r.current = t.scrollTop, i.current = t.scrollLeft;
1256
+ const c = (a) => {
1257
+ e == null || e(a);
1258
+ }, s = (a) => {
1259
+ a.preventDefault(), c({
1192
1260
  type: "intent",
1193
1261
  source: "wheel",
1194
- deltaX: o.deltaX,
1195
- deltaY: o.deltaY,
1196
- originalEvent: o
1262
+ deltaX: a.deltaX,
1263
+ deltaY: a.deltaY,
1264
+ originalEvent: a
1197
1265
  });
1198
- }, u = (o) => {
1266
+ }, d = (a) => {
1199
1267
  if (!n) return;
1200
- const d = o.touches[0];
1201
- d && (l.current = { x: d.clientX, y: d.clientY });
1202
- }, a = (o) => {
1268
+ const u = a.touches[0];
1269
+ u && (l.current = { x: u.clientX, y: u.clientY });
1270
+ }, o = (a) => {
1203
1271
  if (!n) return;
1204
- const d = o.touches[0];
1205
- if (!d || !l.current) return;
1206
- o.preventDefault();
1207
- const y = l.current.x - d.clientX, v = l.current.y - d.clientY;
1208
- l.current = { x: d.clientX, y: d.clientY }, i({
1272
+ const u = a.touches[0];
1273
+ if (!u || !l.current) return;
1274
+ a.preventDefault();
1275
+ const m = l.current.x - u.clientX, b = l.current.y - u.clientY;
1276
+ l.current = { x: u.clientX, y: u.clientY }, c({
1209
1277
  type: "intent",
1210
1278
  source: "touch",
1211
- deltaX: y,
1212
- deltaY: v,
1213
- originalEvent: o
1279
+ deltaX: m,
1280
+ deltaY: b,
1281
+ originalEvent: a
1214
1282
  });
1215
- }, p = () => {
1283
+ }, h = () => {
1216
1284
  n && (l.current = null);
1217
- }, m = (o) => {
1218
- const y = t.clientHeight * 0.9;
1219
- let v = 0, w = 0;
1220
- switch (o.key) {
1285
+ }, y = (a) => {
1286
+ const m = t.clientHeight * 0.9;
1287
+ let b = 0, x = 0;
1288
+ switch (a.key) {
1221
1289
  case "ArrowDown":
1222
- w = 40;
1290
+ x = 40;
1223
1291
  break;
1224
1292
  case "ArrowUp":
1225
- w = -40;
1293
+ x = -40;
1226
1294
  break;
1227
1295
  case "ArrowRight":
1228
- v = 40;
1296
+ b = 40;
1229
1297
  break;
1230
1298
  case "ArrowLeft":
1231
- v = -40;
1299
+ b = -40;
1232
1300
  break;
1233
1301
  case "PageDown":
1234
- w = y;
1302
+ x = m;
1235
1303
  break;
1236
1304
  case "PageUp":
1237
- w = -y;
1305
+ x = -m;
1238
1306
  break;
1239
1307
  case "Home":
1240
- w = Number.NEGATIVE_INFINITY;
1308
+ x = Number.NEGATIVE_INFINITY;
1241
1309
  break;
1242
1310
  case "End":
1243
- w = Number.POSITIVE_INFINITY;
1311
+ x = Number.POSITIVE_INFINITY;
1244
1312
  break;
1245
1313
  case " ":
1246
- w = o.shiftKey ? -y : y;
1314
+ x = a.shiftKey ? -m : m;
1247
1315
  break;
1248
1316
  default:
1249
1317
  return;
1250
1318
  }
1251
- o.preventDefault(), i({
1319
+ a.preventDefault(), c({
1252
1320
  type: "intent",
1253
1321
  source: "keyboard",
1254
- deltaX: v,
1255
- deltaY: w,
1256
- originalEvent: o
1322
+ deltaX: b,
1323
+ deltaY: x,
1324
+ originalEvent: a
1257
1325
  });
1258
1326
  };
1259
- return t.addEventListener("wheel", s, { passive: !1 }), t.addEventListener("touchstart", u, { passive: !0 }), t.addEventListener("touchmove", a, { passive: !1 }), t.addEventListener("touchend", p, { passive: !0 }), t.addEventListener("keydown", m), () => {
1260
- t.removeEventListener("wheel", s), t.removeEventListener("touchstart", u), t.removeEventListener("touchmove", a), t.removeEventListener("touchend", p), t.removeEventListener("keydown", m);
1327
+ return t.addEventListener("wheel", s, { passive: !1 }), t.addEventListener("touchstart", d, { passive: !0 }), t.addEventListener("touchmove", o, { passive: !1 }), t.addEventListener("touchend", h, { passive: !0 }), t.addEventListener("keydown", y), () => {
1328
+ t.removeEventListener("wheel", s), t.removeEventListener("touchstart", d), t.removeEventListener("touchmove", o), t.removeEventListener("touchend", h), t.removeEventListener("keydown", y);
1261
1329
  };
1262
1330
  }, [e]);
1263
- }, Ot = ({
1331
+ }, ln = ({
1264
1332
  transition: e,
1265
1333
  orientation: t = "vertical",
1266
1334
  throttleDuration: n = 25
1267
1335
  }) => {
1268
- const [l, r] = S(0), [c, i] = S(), s = D(!1), u = D(), a = D(0);
1269
- R(() => {
1270
- i(document);
1271
- const o = document.documentElement.scrollTop;
1272
- r(o), a.current = o;
1273
- }, []), R(() => {
1274
- const o = () => {
1336
+ const [l, r] = D(0), [i, c] = D(), s = B(!1), d = B(), o = B(0);
1337
+ $(() => {
1338
+ c(document);
1339
+ const a = document.documentElement.scrollTop;
1340
+ r(a), o.current = a;
1341
+ }, []), $(() => {
1342
+ const a = () => {
1275
1343
  s.current || r(document.documentElement.scrollTop);
1276
1344
  };
1277
- return c == null || c.addEventListener("scroll", o), () => {
1278
- u.current && clearTimeout(u.current), c == null || c.removeEventListener("scroll", o);
1345
+ return i == null || i.addEventListener("scroll", a), () => {
1346
+ d.current && clearTimeout(d.current), i == null || i.removeEventListener("scroll", a);
1279
1347
  };
1280
- }, [c]);
1281
- const p = D(), m = D(null);
1282
- return R(() => {
1283
- const o = l;
1284
- if (m.current && (m.current.stop(), m.current = null), !s.current) {
1285
- p.current = o;
1348
+ }, [i]);
1349
+ const h = B(), y = B(null);
1350
+ return $(() => {
1351
+ const a = l;
1352
+ if (y.current && (y.current.stop(), y.current = null), !s.current) {
1353
+ h.current = a;
1286
1354
  return;
1287
1355
  }
1288
- return m.current = Be(p.current ?? o, o, {
1356
+ return y.current = ze(h.current ?? a, a, {
1289
1357
  duration: ((e == null ? void 0 : e.duration) ?? 500) / 1e3,
1290
1358
  ease: (e == null ? void 0 : e.ease) ?? "easeOut",
1291
- onUpdate: (d) => {
1292
- u.current && clearTimeout(u.current), p.current = d;
1293
- const y = document.documentElement, v = Math.round(d * 1e3) / 1e3, w = a.current;
1294
- Math.abs(v - w) < 0.1 || (a.current = v, s.current && y.scrollTo({ top: v }));
1359
+ onUpdate: (u) => {
1360
+ d.current && clearTimeout(d.current), h.current = u;
1361
+ const m = document.documentElement, b = Math.round(u * 1e3) / 1e3, x = o.current;
1362
+ Math.abs(b - x) < 0.1 || (o.current = b, s.current && m.scrollTo({ top: b }));
1295
1363
  },
1296
1364
  onComplete: () => {
1297
- u.current = setTimeout(() => {
1365
+ d.current = setTimeout(() => {
1298
1366
  s.current = !1;
1299
- }, 300), m.current = null;
1367
+ }, 300), y.current = null;
1300
1368
  }
1301
1369
  }), () => {
1302
- m.current && (m.current.stop(), m.current = null);
1370
+ y.current && (y.current.stop(), y.current = null);
1303
1371
  };
1304
- }, [l]), c ? /* @__PURE__ */ f(
1305
- at,
1372
+ }, [l]), i ? /* @__PURE__ */ f(
1373
+ Mt,
1306
1374
  {
1307
1375
  touch: !1,
1308
- el: c,
1309
- onScroll: (o) => {
1310
- if ("deltaY" in o && o.deltaY !== 0 && c && l !== null) {
1311
- let d = l + o.deltaY;
1312
- const y = c.querySelector("html");
1313
- y && (d = Math.min(d, y.scrollHeight - y.clientHeight)), d = Math.max(d, 0), r(d), s.current = !0;
1376
+ el: i,
1377
+ onScroll: (a) => {
1378
+ if ("deltaY" in a && a.deltaY !== 0 && i && l !== null) {
1379
+ let u = l + a.deltaY;
1380
+ const m = i.querySelector("html");
1381
+ m && (u = Math.min(u, m.scrollHeight - m.clientHeight)), u = Math.max(u, 0), r(u), s.current = !0;
1314
1382
  }
1315
1383
  }
1316
1384
  }
1317
1385
  ) : null;
1318
- }, st = ({
1386
+ }, St = ({
1319
1387
  targetRef: e,
1320
1388
  children: t
1321
1389
  }) => {
1322
- const [n, l] = S(null), r = D(null), c = () => {
1323
- const i = e.current;
1324
- if (!i) return;
1325
- const s = i.getBoundingClientRect();
1390
+ const [n, l] = D(null), r = B(null), i = () => {
1391
+ const c = e.current;
1392
+ if (!c) return;
1393
+ const s = c.getBoundingClientRect();
1326
1394
  l({
1327
1395
  position: "fixed",
1328
1396
  top: s.top,
@@ -1335,69 +1403,69 @@ const Oe = (e) => {
1335
1403
  // personnalise si besoin
1336
1404
  });
1337
1405
  };
1338
- return R(() => {
1339
- const i = e.current;
1340
- if (i)
1341
- return c(), window.addEventListener("scroll", c, !0), window.addEventListener("resize", c), r.current = new ResizeObserver(c), r.current.observe(i), () => {
1406
+ return $(() => {
1407
+ const c = e.current;
1408
+ if (c)
1409
+ return i(), window.addEventListener("scroll", i, !0), window.addEventListener("resize", i), r.current = new ResizeObserver(i), r.current.observe(c), () => {
1342
1410
  var s;
1343
- window.removeEventListener("scroll", c, !0), window.removeEventListener("resize", c), (s = r.current) == null || s.disconnect();
1411
+ window.removeEventListener("scroll", i, !0), window.removeEventListener("resize", i), (s = r.current) == null || s.disconnect();
1344
1412
  };
1345
- }, [e]), n ? xe(/* @__PURE__ */ f("div", { style: n, children: t }), document.body) : null;
1413
+ }, [e]), n ? Oe(/* @__PURE__ */ f("div", { style: n, children: t }), document.body) : null;
1346
1414
  };
1347
- function ct(e) {
1415
+ function $t(e) {
1348
1416
  return /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(e);
1349
1417
  }
1350
- const Ut = ({
1418
+ const an = ({
1351
1419
  config: e,
1352
1420
  throttleDelay: t = 100,
1353
1421
  // Délai par défaut de 300ms
1354
1422
  onLoad: n,
1355
1423
  loadTheme: l = !1
1356
1424
  }) => {
1357
- const [r, c] = S(null);
1358
- R(() => {
1425
+ const [r, i] = D(null);
1426
+ $(() => {
1359
1427
  (async () => {
1360
- const o = await De(e, l);
1361
- c(o);
1428
+ const a = await Te(e, l);
1429
+ i(a);
1362
1430
  })();
1363
1431
  }, []);
1364
- const [i, s] = S(null), u = D(null), a = D(0), p = D(null);
1365
- R(() => {
1432
+ const [c, s] = D(null), d = B(null), o = B(0), h = B(null);
1433
+ $(() => {
1366
1434
  if (!r) return;
1367
- const o = {
1435
+ const a = {
1368
1436
  ...e,
1369
1437
  // Assurer la compatibilité avec l'API qui attend sourceColorHex
1370
1438
  sourceColor: e.sourceColor
1371
- }, d = Date.now(), y = d - a.current, v = async (w) => {
1372
- await m(w);
1439
+ }, u = Date.now(), m = u - o.current, b = async (x) => {
1440
+ await y(x);
1373
1441
  };
1374
- if (a.current === 0 || y >= t)
1375
- u.current && (clearTimeout(u.current), u.current = null), p.current = null, a.current = d, v(o);
1376
- else if (p.current = o, !u.current) {
1377
- const w = Math.max(0, t - y);
1378
- u.current = setTimeout(async () => {
1379
- u.current = null;
1380
- const E = p.current;
1381
- p.current = null, E && (a.current = Date.now(), await v(E));
1382
- }, w);
1442
+ if (o.current === 0 || m >= t)
1443
+ d.current && (clearTimeout(d.current), d.current = null), h.current = null, o.current = u, b(a);
1444
+ else if (h.current = a, !d.current) {
1445
+ const x = Math.max(0, t - m);
1446
+ d.current = setTimeout(async () => {
1447
+ d.current = null;
1448
+ const M = h.current;
1449
+ h.current = null, M && (o.current = Date.now(), await b(M));
1450
+ }, x);
1383
1451
  }
1384
1452
  return () => {
1385
1453
  };
1386
1454
  }, [e, t, r]);
1387
- const m = async (o) => {
1388
- if (typeof o.sourceColor == "string" && !ct(o.sourceColor))
1455
+ const y = async (a) => {
1456
+ if (typeof a.sourceColor == "string" && !$t(a.sourceColor))
1389
1457
  throw new Error("Invalid hex color");
1390
1458
  if (!r)
1391
1459
  return;
1392
- r.context.update(o), await r.load();
1393
- const d = r == null ? void 0 : r.plugins.getPlugin(be).getInstance().outputCss;
1394
- s(d), n == null || n(r);
1460
+ r.context.update(a), await r.load();
1461
+ const u = r == null ? void 0 : r.plugins.getPlugin(Ue).getInstance().outputCss;
1462
+ s(u), n == null || n(r);
1395
1463
  };
1396
- return R(() => () => {
1397
- u.current && (clearTimeout(u.current), u.current = null);
1398
- }, []), i ? /* @__PURE__ */ f("style", { dangerouslySetInnerHTML: { __html: i } }) : null;
1464
+ return $(() => () => {
1465
+ d.current && (clearTimeout(d.current), d.current = null);
1466
+ }, []), c ? /* @__PURE__ */ f("style", { dangerouslySetInnerHTML: { __html: c } }) : null;
1399
1467
  };
1400
- function it() {
1468
+ function Ct() {
1401
1469
  if (typeof window > "u") return !1;
1402
1470
  try {
1403
1471
  if (window.CSS && typeof window.CSS.supports == "function")
@@ -1407,42 +1475,42 @@ function it() {
1407
1475
  }
1408
1476
  return !1;
1409
1477
  }
1410
- function ut() {
1478
+ function Dt() {
1411
1479
  return typeof window > "u" || !("matchMedia" in window) ? !1 : window.matchMedia("(prefers-reduced-motion: reduce)").matches;
1412
1480
  }
1413
- function ce(e) {
1481
+ function Me(e) {
1414
1482
  if (!(e instanceof HTMLElement)) return !1;
1415
1483
  const t = e.classList;
1416
1484
  return Array.from(t).some(
1417
1485
  (n) => n.startsWith("anim-") && n.includes("scroll")
1418
1486
  );
1419
1487
  }
1420
- function he(e) {
1488
+ function We(e) {
1421
1489
  if (!(e instanceof HTMLElement)) return !1;
1422
1490
  const t = e.classList;
1423
1491
  return Array.from(t).some((n) => n.startsWith("anim-"));
1424
1492
  }
1425
- function le(e, t) {
1426
- if (!ce(e)) return;
1493
+ function Ee(e, t) {
1494
+ if (!Me(e)) return;
1427
1495
  if (e.hasAttribute(`data-${t}-scroll`)) {
1428
- const i = (e.getAttribute(`data-${t}-scroll`) || "").trim().toLowerCase(), s = i === "x" || i === "inline" ? "inline" : i === "y" || i === "block" ? "block" : "auto";
1496
+ const c = (e.getAttribute(`data-${t}-scroll`) || "").trim().toLowerCase(), s = c === "x" || c === "inline" ? "inline" : c === "y" || c === "block" ? "block" : "auto";
1429
1497
  e.classList.contains(`${t}-timeline`) || e.classList.contains(`${t}-timeline-inline`) || e.classList.contains(`${t}-timeline-block`) || e.classList.contains(`${t}-timeline-x`) || e.classList.contains(`${t}-timeline-y`) || (s === "inline" ? e.classList.add(`${t}-timeline-inline`) : s === "block" ? e.classList.add(`${t}-timeline-block`) : e.classList.add(`${t}-scroll`));
1430
1498
  }
1431
1499
  const n = e.getAttribute(`data-${t}-start`);
1432
1500
  n && e.style.setProperty(`--${t}-range-start`, n);
1433
1501
  const l = e.getAttribute(`data-${t}-end`);
1434
1502
  l && e.style.setProperty(`--${t}-range-end`, l);
1435
- const r = e.hasAttribute(`data-${t}-paused`) || e.classList.contains(`${t}-paused`), c = e.hasAttribute(`data-${t}-run`) || e.classList.contains(`${t}-run`);
1436
- !r && !c && e.setAttribute(`data-${t}-run`, "");
1503
+ const r = e.hasAttribute(`data-${t}-paused`) || e.classList.contains(`${t}-paused`), i = e.hasAttribute(`data-${t}-run`) || e.classList.contains(`${t}-run`);
1504
+ !r && !i && e.setAttribute(`data-${t}-run`, "");
1437
1505
  }
1438
- function ae(e = document, t) {
1506
+ function Ie(e = document, t) {
1439
1507
  return Array.from(
1440
1508
  e.querySelectorAll(
1441
1509
  `[class*="${t}-"][class*="-scroll"]`
1442
1510
  )
1443
- ).filter((l) => ce(l));
1511
+ ).filter((l) => Me(l));
1444
1512
  }
1445
- function dt(e = document, t) {
1513
+ function Rt(e = document, t) {
1446
1514
  const n = Array.from(
1447
1515
  e.querySelectorAll(`[class*="${t}-"]`)
1448
1516
  ), l = /* @__PURE__ */ new Set([
@@ -1461,63 +1529,73 @@ function dt(e = document, t) {
1461
1529
  ]);
1462
1530
  return n.filter((r) => {
1463
1531
  if (!(r instanceof HTMLElement)) return !1;
1464
- const c = r.classList;
1465
- return c.contains(`${t}-in`) || c.contains(`${t}-out`) || Array.from(c).some(
1466
- (u) => u.startsWith(`${t}-`) && !u.includes("scroll") && !l.has(u)
1467
- ) ? !0 : !ce(r);
1532
+ const i = r.classList;
1533
+ return i.contains(`${t}-in`) || i.contains(`${t}-out`) || Array.from(i).some(
1534
+ (d) => d.startsWith(`${t}-`) && !d.includes("scroll") && !l.has(d)
1535
+ ) ? !0 : !Me(r);
1468
1536
  });
1469
1537
  }
1470
- function pe(e, t, n) {
1538
+ function Ae(e, t, n) {
1471
1539
  e.setAttribute(`data-${t}-run`, ""), e.setAttribute(`data-${t}-${n}-run`, "");
1472
1540
  }
1473
- function ft(e, t) {
1541
+ function Wt(e, t) {
1474
1542
  const n = e.style.animationName;
1475
1543
  e.style.animationName = "none", e.removeAttribute(`data-${t}-run`), e.removeAttribute(`data-${t}-in-run`), e.removeAttribute(`data-${t}-out-run`), e.offsetWidth, e.style.animationName = n;
1476
1544
  }
1477
- const mt = [0, 0.2];
1478
- function Ne(e = {}) {
1545
+ const At = [0, 0.2], Be = /* @__PURE__ */ new WeakSet();
1546
+ function Pe(e, t) {
1547
+ if (Be.has(e)) return;
1548
+ Be.add(e);
1549
+ const n = (r) => {
1550
+ r.target === e && (e.hasAttribute(`data-${t}-in-run`) || e.hasAttribute(`data-${t}-out-run`) || e.hasAttribute(`data-${t}-run`)) && e.setAttribute(`data-${t}-animating`, "");
1551
+ }, l = (r) => {
1552
+ r.target === e && (e.removeAttribute(`data-${t}-animating`), e.removeAttribute(`data-${t}-in-run`), e.removeAttribute(`data-${t}-out-run`));
1553
+ };
1554
+ e.addEventListener("animationstart", n), e.addEventListener("animationend", l), e.addEventListener("animationcancel", l);
1555
+ }
1556
+ function je(e = {}) {
1479
1557
  const { prefix: t = "anim", once: n = !0 } = e;
1480
- if (ut())
1558
+ if (Dt())
1481
1559
  return () => {
1482
1560
  };
1483
- const l = it(), r = /* @__PURE__ */ new WeakSet(), c = new IntersectionObserver(
1484
- (p) => {
1485
- for (const m of p) {
1486
- const o = m.target;
1487
- if (!he(o)) continue;
1488
- const d = o.classList.contains(`${t}-out`);
1489
- !d && m.isIntersecting ? (pe(o, t, "in"), n && c.unobserve(o)) : d && !m.isIntersecting ? (pe(o, t, "out"), n && c.unobserve(o)) : n || ft(o, t);
1561
+ const l = Ct(), r = /* @__PURE__ */ new WeakSet(), i = new IntersectionObserver(
1562
+ (h) => {
1563
+ for (const y of h) {
1564
+ const a = y.target;
1565
+ if (!We(a) || a.hasAttribute(`data-${t}-animating`)) continue;
1566
+ const u = a.classList.contains(`${t}-out`);
1567
+ !u && y.isIntersecting ? (Ae(a, t, "in"), n && i.unobserve(a)) : u && !y.isIntersecting ? (Ae(a, t, "out"), n && i.unobserve(a)) : n || Wt(a, t);
1490
1568
  }
1491
1569
  },
1492
- { threshold: mt }
1493
- ), i = (p) => {
1494
- const m = dt(p || document, t);
1495
- for (const o of m)
1496
- r.has(o) || (r.add(o), c.observe(o));
1570
+ { threshold: At }
1571
+ ), c = (h) => {
1572
+ const y = Rt(h || document, t);
1573
+ for (const a of y)
1574
+ r.has(a) || (r.add(a), i.observe(a), Pe(a, t));
1497
1575
  };
1498
- i();
1499
- let s, u = null, a = null;
1576
+ c();
1577
+ let s, d = null, o = null;
1500
1578
  if (l)
1501
1579
  (() => {
1502
- a == null && (a = requestAnimationFrame(() => {
1503
- a = null;
1504
- const m = ae(void 0, t);
1505
- for (const o of m) le(o, t);
1580
+ o == null && (o = requestAnimationFrame(() => {
1581
+ o = null;
1582
+ const y = Ie(void 0, t);
1583
+ for (const a of y) Ee(a, t);
1506
1584
  }));
1507
- })(), u = new MutationObserver((m) => {
1508
- for (const o of m)
1509
- if (o.type === "attributes") {
1510
- const d = o.target;
1511
- d instanceof HTMLElement && (le(d, t), he(d) && (r.has(d) || (r.add(d), c.observe(d))));
1512
- } else if (o.type === "childList" && o.addedNodes && o.addedNodes.length) {
1513
- for (const d of Array.from(o.addedNodes))
1514
- if (d instanceof HTMLElement) {
1515
- const y = ae(d, t);
1516
- for (const v of y) le(v, t);
1517
- i(d);
1585
+ })(), d = new MutationObserver((y) => {
1586
+ for (const a of y)
1587
+ if (a.type === "attributes") {
1588
+ const u = a.target;
1589
+ u instanceof HTMLElement && (Ee(u, t), We(u) && (r.has(u) || (r.add(u), i.observe(u), Pe(u, t))));
1590
+ } else if (a.type === "childList" && a.addedNodes && a.addedNodes.length) {
1591
+ for (const u of Array.from(a.addedNodes))
1592
+ if (u instanceof HTMLElement) {
1593
+ const m = Ie(u, t);
1594
+ for (const b of m) Ee(b, t);
1595
+ c(u);
1518
1596
  }
1519
1597
  }
1520
- }), u.observe(document.documentElement, {
1598
+ }), d.observe(document.documentElement, {
1521
1599
  subtree: !0,
1522
1600
  childList: !0,
1523
1601
  attributes: !0,
@@ -1530,114 +1608,114 @@ function Ne(e = {}) {
1530
1608
  `data-${t}-run`
1531
1609
  ]
1532
1610
  }), s = () => {
1533
- a != null && cancelAnimationFrame(a), u && u.disconnect();
1611
+ o != null && cancelAnimationFrame(o), d && d.disconnect();
1534
1612
  };
1535
1613
  else {
1536
- let p;
1537
- ae(void 0, t).length > 0 && import("./scrollDriven-AP2yWhzi.js").then((o) => {
1538
- p = o.initScrollViewFallback({ once: n });
1614
+ let h;
1615
+ Ie(void 0, t).length > 0 && import("./scrollDriven-AP2yWhzi.js").then((a) => {
1616
+ h = a.initScrollViewFallback({ once: n });
1539
1617
  }), s = () => {
1540
- typeof p == "function" && p();
1618
+ typeof h == "function" && h();
1541
1619
  };
1542
1620
  }
1543
1621
  return () => {
1544
- s && s(), c.disconnect();
1622
+ s && s(), i.disconnect();
1545
1623
  };
1546
1624
  }
1547
- const Xt = Ne, Yt = Ne, ht = ({
1625
+ const sn = je, cn = je, Bt = ({
1548
1626
  variant: e = "filled",
1549
1627
  disabled: t = !1,
1550
1628
  icon: n,
1551
1629
  href: l,
1552
1630
  label: r,
1553
- disableTextMargins: c,
1554
- className: i,
1631
+ disableTextMargins: i,
1632
+ className: c,
1555
1633
  iconPosition: s = "left",
1556
- loading: u = !1,
1557
- shape: a = "rounded",
1558
- onClick: p,
1559
- onToggle: m,
1560
- activated: o,
1561
- ref: d,
1562
- size: y = "medium",
1563
- allowShapeTransformation: v = !0,
1564
- transition: w,
1565
- children: E,
1566
- ...L
1634
+ loading: d = !1,
1635
+ shape: o = "rounded",
1636
+ onClick: h,
1637
+ onToggle: y,
1638
+ activated: a,
1639
+ ref: u,
1640
+ size: m = "medium",
1641
+ allowShapeTransformation: b = !0,
1642
+ transition: x,
1643
+ children: M,
1644
+ ...g
1567
1645
  }) => {
1568
- if (E && (r = E), !r)
1646
+ if (M && (r = M), !r)
1569
1647
  throw new Error(
1570
1648
  "Button component requires either a label prop or children content"
1571
1649
  );
1572
- const B = l ? "a" : "button", N = D(null), I = d || N, [M, V] = K.useState(o);
1573
- R(() => {
1574
- V(o);
1575
- }, [o]), w = { duration: 0.3, ...w };
1576
- let W;
1577
- m ? m && (W = (C) => {
1578
- t && C.preventDefault();
1579
- const X = !M;
1580
- V(X), m(X);
1581
- }) : W = (C) => {
1582
- t && C.preventDefault(), p && p(C);
1650
+ const R = l ? "a" : "button", N = B(null), P = u || N, [L, O] = te.useState(a);
1651
+ $(() => {
1652
+ O(a);
1653
+ }, [a]), x = { duration: 0.3, ...x };
1654
+ let F;
1655
+ y ? y && (F = (k) => {
1656
+ t && k.preventDefault();
1657
+ const U = !L;
1658
+ O(U), y(U);
1659
+ }) : F = (k) => {
1660
+ t && k.preventDefault(), h && h(k);
1583
1661
  };
1584
- const k = Ue({
1585
- allowShapeTransformation: v,
1586
- size: y,
1587
- disableTextMargins: c,
1588
- shape: a,
1662
+ const C = st({
1663
+ allowShapeTransformation: b,
1664
+ size: m,
1665
+ disableTextMargins: i,
1666
+ shape: o,
1589
1667
  href: l,
1590
1668
  disabled: t,
1591
1669
  icon: n,
1592
1670
  iconPosition: s,
1593
- loading: u,
1671
+ loading: d,
1594
1672
  variant: e,
1595
- transition: w,
1596
- className: i,
1597
- isActive: M ?? !1,
1598
- onToggle: m,
1599
- activated: M,
1673
+ transition: x,
1674
+ className: c,
1675
+ isActive: L ?? !1,
1676
+ onToggle: y,
1677
+ activated: L,
1600
1678
  label: r,
1601
1679
  children: r
1602
- }), g = n ? /* @__PURE__ */ f(Z, { icon: n, className: k.icon }) : /* @__PURE__ */ f(te, {});
1603
- return /* @__PURE__ */ A(
1604
- B,
1680
+ }), v = n ? /* @__PURE__ */ f(ie, { icon: n, className: C.icon }) : /* @__PURE__ */ f(ye, {});
1681
+ return /* @__PURE__ */ Y(
1682
+ R,
1605
1683
  {
1606
- ref: I,
1684
+ ref: P,
1607
1685
  href: l,
1608
- className: k.button,
1609
- ...L,
1610
- onClick: W,
1686
+ className: C.button,
1687
+ ...g,
1688
+ onClick: F,
1611
1689
  disabled: t,
1612
- "aria-pressed": m ? M : void 0,
1613
- style: { transition: w.duration + "s" },
1690
+ "aria-pressed": y ? L : void 0,
1691
+ style: { transition: x.duration + "s" },
1614
1692
  children: [
1615
- /* @__PURE__ */ f("div", { className: k.touchTarget }),
1693
+ /* @__PURE__ */ f("div", { className: C.touchTarget }),
1616
1694
  /* @__PURE__ */ f(
1617
1695
  "div",
1618
1696
  {
1619
- className: k.stateLayer,
1620
- style: { transition: w.duration + "s" },
1697
+ className: C.stateLayer,
1698
+ style: { transition: x.duration + "s" },
1621
1699
  children: !t && /* @__PURE__ */ f(
1622
- re,
1700
+ we,
1623
1701
  {
1624
- colorName: e === "filled" && m && "on-surface-variant" || e === "filled" && !m && "on-primary" || e === "elevated" && "primary" || e === "tonal" && "on-secondary-container" || e === "outlined" && "primary" || e === "text" && "primary" || "",
1625
- triggerRef: I
1702
+ colorName: e === "filled" && y && "on-surface-variant" || e === "filled" && !y && "on-primary" || e === "elevated" && "primary" || e === "tonal" && "on-secondary-container" || e === "outlined" && "primary" || e === "text" && "primary" || "",
1703
+ triggerRef: P
1626
1704
  }
1627
1705
  )
1628
1706
  }
1629
1707
  ),
1630
- s === "left" && g,
1631
- u && /* @__PURE__ */ f(
1708
+ s === "left" && v,
1709
+ d && /* @__PURE__ */ f(
1632
1710
  "div",
1633
1711
  {
1634
1712
  className: "!absolute left-1/2 -translate-x-1/2 top-1/2 -translate-y-1/2",
1635
1713
  children: /* @__PURE__ */ f(
1636
- rt,
1714
+ Nt,
1637
1715
  {
1638
1716
  className: () => ({
1639
1717
  progressIndicator: "h-6 w-6",
1640
- activeIndicator: h(
1718
+ activeIndicator: p(
1641
1719
  {
1642
1720
  "!stroke-primary": e === "elevated" && !t,
1643
1721
  "!stroke-on-surface/[38%]": e === "elevated" && t
@@ -1665,297 +1743,510 @@ const Xt = Ne, Yt = Ne, ht = ({
1665
1743
  )
1666
1744
  }
1667
1745
  ),
1668
- /* @__PURE__ */ f("span", { className: k.label, children: r }),
1669
- s === "right" && g
1746
+ /* @__PURE__ */ f("span", { className: C.label, children: r }),
1747
+ s === "right" && v
1670
1748
  ]
1671
1749
  }
1672
1750
  );
1673
- }, jt = ({
1751
+ }, un = ({
1674
1752
  variant: e = "outlined",
1675
1753
  className: t,
1676
1754
  children: n,
1677
1755
  isInteractive: l = !1,
1678
1756
  ref: r,
1679
- ...c
1757
+ ...i
1680
1758
  }) => {
1681
- const i = Xe({ className: t, isInteractive: l, variant: e, children: n }), s = D(null), u = r || s;
1682
- return /* @__PURE__ */ A("div", { ...c, ref: u, className: i.card, children: [
1683
- /* @__PURE__ */ f("div", { className: i.stateLayer, children: l && /* @__PURE__ */ f(re, { colorName: "on-surface", triggerRef: u }) }),
1759
+ const c = ct({ className: t, isInteractive: l, variant: e, children: n }), s = B(null), d = r || s;
1760
+ return /* @__PURE__ */ Y("div", { ...i, ref: d, className: c.card, children: [
1761
+ /* @__PURE__ */ f("div", { className: c.stateLayer, children: l && /* @__PURE__ */ f(we, { colorName: "on-surface", triggerRef: d }) }),
1684
1762
  n
1685
1763
  ] });
1686
- }, pt = (e, t, n = [0, 1]) => {
1687
- const [l, r] = t, [c, i] = n, u = (Math.max(l, Math.min(e, r)) - l) / (r - l);
1688
- return c + u * (i - c);
1689
- }, yt = ({
1764
+ }, fe = (e, t, n = [0, 1]) => {
1765
+ const [l, r] = t, [i, c] = n, d = (Math.max(l, Math.min(e, r)) - l) / (r - l);
1766
+ return i + d * (c - i);
1767
+ }, Pt = ({
1690
1768
  className: e,
1691
1769
  children: t,
1692
- width: n = 1,
1770
+ width: n,
1693
1771
  index: l = 0,
1694
- ref: r,
1772
+ outputRange: r,
1773
+ ref: i,
1695
1774
  ...c
1696
1775
  }) => {
1697
- const i = D(null), s = r || i, u = Ye({
1776
+ const s = B(null), d = i || s, o = it({
1698
1777
  className: e,
1699
1778
  index: l,
1700
1779
  width: n,
1701
- children: t
1780
+ children: t,
1781
+ outputRange: r
1702
1782
  });
1703
1783
  return /* @__PURE__ */ f(
1704
- H.div,
1784
+ "div",
1705
1785
  {
1706
- ref: s,
1707
- animate: { width: n + "px" },
1786
+ ref: d,
1787
+ style: {
1788
+ width: n + "px",
1789
+ maxWidth: r[1] + "px",
1790
+ minWidth: r[0] + "px",
1791
+ willChange: "width"
1792
+ },
1708
1793
  transition: {
1709
1794
  duration: 0.5,
1710
1795
  ease: "linear"
1711
1796
  },
1712
- className: u.carouselItem,
1797
+ className: o.carouselItem,
1713
1798
  ...c,
1714
1799
  children: t
1715
1800
  }
1716
1801
  );
1717
- }, qt = ({
1802
+ }, dn = ({
1718
1803
  variant: e = "hero",
1719
1804
  className: t,
1720
1805
  children: n,
1721
1806
  ref: l,
1722
1807
  marginPourcent: r = 0,
1723
- inputRange: c = [0.21, 0.65],
1724
- outputRange: i = [42, 300],
1808
+ inputRange: i = [0.21, 0.65],
1809
+ outputRange: c = [42, 300],
1725
1810
  gap: s = 8,
1726
- onChange: u,
1727
- scrollSensitivity: a = 1.25,
1728
- ...p
1811
+ onChange: d,
1812
+ onMetricsChange: o,
1813
+ index: h,
1814
+ scrollSensitivity: y = 1.25,
1815
+ ...a
1729
1816
  }) => {
1730
- var Y, z;
1731
- const m = D(null), o = l || m, d = je({
1817
+ const u = B(null), m = l || u, [b, x] = D(0), M = ut({
1818
+ index: h,
1732
1819
  className: t,
1733
1820
  children: n,
1734
1821
  variant: e,
1735
- inputRange: c,
1736
- outputRange: i,
1822
+ inputRange: i,
1823
+ outputRange: c,
1737
1824
  marginPourcent: r,
1738
- onChange: u,
1825
+ onChange: d,
1739
1826
  gap: s,
1740
- scrollSensitivity: a
1741
- }), y = K.Children.toArray(n).filter(
1742
- (b) => K.isValidElement(b) && b.type === yt
1743
- ), v = D(null), [w, E] = S([]), [L, B] = S(null), N = () => {
1744
- var O;
1745
- if (!v.current || !o.current || !L) return [];
1746
- const { scrollVisible: b, scrollProgress: x } = L;
1747
- function P(U, J) {
1748
- return U.map(
1749
- (T) => (T - J) / Math.abs(U[1] - U[0])
1750
- );
1827
+ scrollSensitivity: y
1828
+ }), g = te.Children.toArray(n).filter(
1829
+ (w) => te.isValidElement(w) && w.type === Pt
1830
+ ), R = B(null), [N, P] = D(
1831
+ {}
1832
+ ), [L, O] = D(null), F = B(0), C = B(null), v = () => {
1833
+ var xe, me, ve;
1834
+ if (!R.current || !m.current || (L == null ? void 0 : L.scrollProgress) === void 0)
1835
+ return [];
1836
+ const w = (L == null ? void 0 : L.scrollVisible) ?? ((xe = m.current) == null ? void 0 : xe.clientWidth) ?? 0;
1837
+ function A(W, K) {
1838
+ return W.map((Z, z) => ({
1839
+ itemScrollXCenter: Z,
1840
+ relativeIndex: (Z - K) / Math.abs(W[1] - W[0]),
1841
+ index: z,
1842
+ width: 0
1843
+ }));
1751
1844
  }
1752
- let F = y.map((U, J) => {
1753
- if (!I[J].current || !v.current) return 0;
1754
- let ne = J / (y.length - 1);
1755
- return ne > 1 && (ne = 1), ne < 0 && (ne = 0), ne;
1845
+ const H = g.map((W, K) => {
1846
+ if (!k[K].current || !R.current) return 0;
1847
+ const z = K / (g.length - 1);
1848
+ return fe(z, [0, 1], [0, 1]);
1849
+ }), V = A(
1850
+ H,
1851
+ (L == null ? void 0 : L.scrollProgress) ?? 0
1852
+ ).sort((W, K) => W.index - K.index);
1853
+ let se = ((((me = m.current) == null ? void 0 : me.clientWidth) ?? w) + s) / (c[1] + s);
1854
+ const ne = V.sort((W, K) => Math.abs(W.relativeIndex) - Math.abs(K.relativeIndex)).map((W, K) => {
1855
+ var z;
1856
+ if (!W) return;
1857
+ K === 0 && J(W.index);
1858
+ const Z = (z = k[W.index]) == null ? void 0 : z.current;
1859
+ if (!(!m.current || !Z) && !(se <= 0))
1860
+ return W.width = c[1], --se, W;
1861
+ }).filter(Boolean).sort((W, K) => W.index - K.index);
1862
+ let T = (((ve = m.current) == null ? void 0 : ve.clientWidth) ?? w) - s;
1863
+ const ce = ne.filter((W, K, Z) => {
1864
+ let z = !1;
1865
+ return W.width == c[1] && (K === 0 || K === Z.length - 1) && (z = !0), z ? !0 : (T -= W.width + s, !1);
1756
1866
  });
1757
- F = P(F, x);
1758
- let $ = ((((O = o.current) == null ? void 0 : O.clientWidth) ?? b) - (i[0] + s)) / (i[1] + s);
1759
- return F.map((U, J) => ({ value: Math.abs(U), originalIndex: J })).sort((U, J) => U.value - J.value).forEach((U, J) => {
1760
- J === 0 && V(U.originalIndex);
1761
- let T = pt($, [0, 1], [0, i[1]]);
1762
- T < i[0] && (T = i[0]), $--, F[U.originalIndex] = T;
1763
- }), F;
1764
- }, I = D([]).current, [M, V] = S(0);
1765
- R(() => {
1766
- u && u(M);
1767
- }, [M]), I.length !== y.length && y.forEach((b, x) => {
1768
- I[x] || (I[x] = K.createRef());
1867
+ ce.forEach((W) => {
1868
+ if (!W) return;
1869
+ const K = fe(
1870
+ 1 - Math.abs(L.scrollProgress - W.itemScrollXCenter),
1871
+ [0, 1],
1872
+ [0, 1]
1873
+ );
1874
+ W.width = K;
1875
+ });
1876
+ let ee = 0;
1877
+ return ce.forEach((W, K) => {
1878
+ if (W)
1879
+ if (K == 0) {
1880
+ const Z = fe(
1881
+ W == null ? void 0 : W.relativeIndex,
1882
+ [-2, W.index == 0 ? 0 : -1],
1883
+ [0, 1]
1884
+ );
1885
+ W.index >= 1 && (V.sort((z, Le) => z.index - Le.index), V[W.index - 1].width = c[0], ne.unshift(V[W.index - 1]), T -= c[0] + s, ee = fe(
1886
+ 1 - Z,
1887
+ [0, 1],
1888
+ [0, -(c[0] + s)]
1889
+ )), T -= ee, W.width = fe(
1890
+ Z,
1891
+ [0, 1],
1892
+ [c[0], c[1]]
1893
+ ), T -= W.width;
1894
+ } else {
1895
+ let Z = W.index, z = Z == V.length - 1;
1896
+ const Le = Z == V.length - 2;
1897
+ for (; T > 0; ) {
1898
+ const he = V.filter(
1899
+ (ge) => ge.index === Z
1900
+ )[0];
1901
+ if (!he) {
1902
+ if (z)
1903
+ throw new Error("dynamicItem not found");
1904
+ z = !0;
1905
+ break;
1906
+ }
1907
+ if (ne.includes(he) || ne.push(he), he.width = fe(
1908
+ T,
1909
+ [c[0], c[1] + (s + c[0]) * 2],
1910
+ [c[0], c[1]]
1911
+ ), T -= he.width + s, (Le || z) && he.index == V.length - 1) {
1912
+ let ge = 1;
1913
+ for (; T > 0; ) {
1914
+ const Ne = ne[ge], De = fe(
1915
+ Ne.width + T,
1916
+ [c[0], c[1]],
1917
+ [c[0], c[1]]
1918
+ ) - Ne.width;
1919
+ Ne.width += De, T -= De, ge--;
1920
+ }
1921
+ break;
1922
+ } else
1923
+ Z++;
1924
+ }
1925
+ }
1926
+ }), x(ee), Object.fromEntries(
1927
+ ne.map((W) => [W.index, W.width])
1928
+ );
1929
+ }, k = B([]).current, [U, J] = D(0);
1930
+ $(() => {
1931
+ d && d(U);
1932
+ }, [U]), $(() => {
1933
+ typeof h == "number" && g.length > 0 && h !== U && oe(h);
1934
+ }, [h, g.length]), $(() => {
1935
+ _(U);
1936
+ }, [U]), k.length !== g.length && g.forEach((w, A) => {
1937
+ k[A] || (k[A] = te.createRef());
1769
1938
  });
1770
- const W = y.map((b, x) => K.cloneElement(
1771
- b,
1772
- {
1773
- width: w[x],
1774
- ref: I[x],
1775
- key: x,
1776
- index: x
1939
+ const [re, _] = D(0), oe = (w, A = {}) => {
1940
+ if (!g.length) return 0;
1941
+ const H = k[w];
1942
+ if (!H || !H.current || !R.current) return 0;
1943
+ const V = fe(
1944
+ w / Math.max(1, g.length - 1),
1945
+ [0, 1],
1946
+ [0, 1]
1947
+ );
1948
+ return _(w), R.current.dispatchEvent(
1949
+ new CustomEvent("udx:customScroll:set", {
1950
+ bubbles: !0,
1951
+ detail: {
1952
+ progress: V,
1953
+ orientation: "horizontal",
1954
+ animate: A.animate !== !1
1955
+ }
1956
+ })
1957
+ ), V;
1958
+ }, S = g.map((w, A) => {
1959
+ var se;
1960
+ const H = (se = w.props) == null ? void 0 : se.onClick, V = (ne) => {
1961
+ H == null || H(ne);
1962
+ }, le = () => _(A);
1963
+ return te.cloneElement(
1964
+ w,
1965
+ {
1966
+ width: N[A],
1967
+ outputRange: c,
1968
+ ref: k[A],
1969
+ key: A,
1970
+ index: A,
1971
+ role: "option",
1972
+ "aria-selected": U === A,
1973
+ tabIndex: U === A ? 0 : -1,
1974
+ onClick: V,
1975
+ onFocus: le
1976
+ }
1977
+ );
1978
+ }), E = (w) => {
1979
+ var A;
1980
+ if (w.scrollTotal > 0) {
1981
+ (A = C.current) == null || A.stop();
1982
+ const H = F.current ?? 0, V = w.scrollProgress ?? 0;
1983
+ C.current = Qe(H, V, {
1984
+ // Spring tuning to add a bit of inertia and smoothness
1985
+ type: "spring",
1986
+ stiffness: 260,
1987
+ damping: 32,
1988
+ mass: 0.6,
1989
+ restDelta: 5e-4,
1990
+ onUpdate: (le) => {
1991
+ F.current = le, O({ ...w, scrollProgress: le });
1992
+ }
1993
+ });
1777
1994
  }
1778
- )), k = Ce((L == null ? void 0 : L.scrollProgress) ?? 0), g = me(
1779
- k,
1780
- [0, 1],
1781
- [
1782
- 0,
1783
- 1 - (((Y = o.current) == null ? void 0 : Y.clientWidth) ?? 0) / (((z = v == null ? void 0 : v.current) == null ? void 0 : z.clientWidth) ?? 0)
1784
- ]
1785
- ), C = me(
1786
- g,
1787
- (b) => `${-b * 100}%`
1788
- ), X = (b) => {
1789
- b.scrollTotal > 0 && B(b);
1790
1995
  };
1791
- R(() => {
1792
- const b = N();
1793
- E(b);
1996
+ $(() => {
1997
+ const w = v();
1998
+ P(w);
1794
1999
  }, [L]);
1795
- const [q, G] = S(0);
1796
- return we(() => {
1797
- let b = i[1];
1798
- L && b > L.scrollVisible && (b = L.scrollVisible);
1799
- const x = (b + s) * W.length / a;
1800
- G(x);
1801
- }, [o, I, L]), /* @__PURE__ */ f("div", { className: d.carousel, ref: o, ...p, children: /* @__PURE__ */ f(
1802
- lt,
2000
+ const X = B(o);
2001
+ $(() => {
2002
+ X.current = o;
2003
+ }, [o]);
2004
+ const q = B(null);
2005
+ $(() => {
2006
+ var K;
2007
+ const w = X.current;
2008
+ if (!w || !(m != null && m.current)) return;
2009
+ const A = g.length;
2010
+ if (A <= 0) return;
2011
+ const H = ((K = m.current) == null ? void 0 : K.clientWidth) ?? 0, V = c[1], le = F.current ?? (L == null ? void 0 : L.scrollProgress) ?? 0, se = (H + s) / (V + s), ne = Math.max(1, Math.floor(se)), T = Math.max(1, Math.round(ne * (2 / 3))), ce = Math.min(
2012
+ Math.max(0, U),
2013
+ Math.max(0, A - 1)
2014
+ ), ee = ce > 0, xe = ce < A - 1, me = {
2015
+ total: A,
2016
+ selectedIndex: ce,
2017
+ visibleApprox: se,
2018
+ visibleFull: ne,
2019
+ stepHalf: T,
2020
+ canPrev: ee,
2021
+ canNext: xe,
2022
+ scrollProgress: le,
2023
+ viewportWidth: H,
2024
+ itemMaxWidth: V,
2025
+ gap: s
2026
+ }, ve = q.current;
2027
+ let W = !ve;
2028
+ if (!W) {
2029
+ for (const Z in me)
2030
+ if (me[Z] !== ve[Z]) {
2031
+ W = !0;
2032
+ break;
2033
+ }
2034
+ }
2035
+ W && (q.current = me, w(me));
2036
+ }, [m, g.length, U, L, s, c]), $(() => () => {
2037
+ var w;
2038
+ (w = C.current) == null || w.stop();
2039
+ }, []);
2040
+ const [ae, de] = D(0);
2041
+ Xe(() => {
2042
+ let w = c[1];
2043
+ L && w > L.scrollVisible && (w = L.scrollVisible);
2044
+ const A = (w + s) * S.length / y;
2045
+ de(A);
2046
+ }, [m, k, L]);
2047
+ const I = (w) => {
2048
+ if (!g.length) return;
2049
+ const A = re ?? U;
2050
+ switch (w.key) {
2051
+ case "ArrowLeft":
2052
+ w.preventDefault(), oe(Math.max(0, A - 1));
2053
+ break;
2054
+ case "ArrowRight":
2055
+ w.preventDefault(), oe(Math.min(g.length - 1, A + 1));
2056
+ break;
2057
+ case "Home":
2058
+ w.preventDefault(), oe(0);
2059
+ break;
2060
+ case "End":
2061
+ w.preventDefault(), oe(g.length - 1);
2062
+ break;
2063
+ case "Enter":
2064
+ case " ":
2065
+ w.preventDefault(), oe(A);
2066
+ break;
2067
+ }
2068
+ };
2069
+ return $(() => {
2070
+ const w = m.current;
2071
+ if (!w) return;
2072
+ const A = (H) => {
2073
+ const V = H.detail;
2074
+ V && typeof V.index == "number" && oe(V.index);
2075
+ };
2076
+ return w.addEventListener("udx:carousel:centerIndex", A), () => {
2077
+ w.removeEventListener(
2078
+ "udx:carousel:centerIndex",
2079
+ A
2080
+ );
2081
+ };
2082
+ }, [m, g.length]), /* @__PURE__ */ f(
2083
+ "div",
1803
2084
  {
1804
- draggable: !0,
1805
- orientation: "horizontal",
1806
- onScroll: X,
1807
- scrollSize: q,
2085
+ className: M.carousel,
2086
+ ref: m,
2087
+ role: "listbox",
2088
+ "aria-orientation": "horizontal",
2089
+ onKeyDown: I,
2090
+ ...a,
1808
2091
  children: /* @__PURE__ */ f(
1809
- H.div,
2092
+ kt,
1810
2093
  {
1811
- className: d.track,
1812
- ref: v,
1813
- style: {
1814
- transitionDuration: "0.5s",
1815
- transitionTimingFunction: "ease-out",
1816
- gap: `${s}px`,
1817
- x: C
1818
- },
1819
- children: W
2094
+ draggable: !0,
2095
+ orientation: "horizontal",
2096
+ onScroll: E,
2097
+ scrollSize: ae,
2098
+ children: /* @__PURE__ */ f(
2099
+ "div",
2100
+ {
2101
+ className: M.track,
2102
+ ref: R,
2103
+ style: {
2104
+ gap: `${s}px`,
2105
+ translate: b,
2106
+ willChange: "translate"
2107
+ },
2108
+ children: S
2109
+ }
2110
+ )
1820
2111
  }
1821
2112
  )
1822
2113
  }
1823
- ) });
1824
- }, gt = ({
2114
+ );
2115
+ }, Ht = ({
1825
2116
  orientation: e = "horizontal",
1826
2117
  className: t,
1827
2118
  ...n
1828
2119
  }) => {
1829
- const l = qe({ orientation: e, className: t });
2120
+ const l = dt({ orientation: e, className: t });
1830
2121
  return /* @__PURE__ */ f("hr", { className: l.divider, ...n });
1831
- }, _ = [];
2122
+ }, Q = [];
1832
2123
  for (let e = 0; e < 256; ++e)
1833
- _.push((e + 256).toString(16).slice(1));
1834
- function vt(e, t = 0) {
1835
- return (_[e[t + 0]] + _[e[t + 1]] + _[e[t + 2]] + _[e[t + 3]] + "-" + _[e[t + 4]] + _[e[t + 5]] + "-" + _[e[t + 6]] + _[e[t + 7]] + "-" + _[e[t + 8]] + _[e[t + 9]] + "-" + _[e[t + 10]] + _[e[t + 11]] + _[e[t + 12]] + _[e[t + 13]] + _[e[t + 14]] + _[e[t + 15]]).toLowerCase();
2124
+ Q.push((e + 256).toString(16).slice(1));
2125
+ function Vt(e, t = 0) {
2126
+ return (Q[e[t + 0]] + Q[e[t + 1]] + Q[e[t + 2]] + Q[e[t + 3]] + "-" + Q[e[t + 4]] + Q[e[t + 5]] + "-" + Q[e[t + 6]] + Q[e[t + 7]] + "-" + Q[e[t + 8]] + Q[e[t + 9]] + "-" + Q[e[t + 10]] + Q[e[t + 11]] + Q[e[t + 12]] + Q[e[t + 13]] + Q[e[t + 14]] + Q[e[t + 15]]).toLowerCase();
1836
2127
  }
1837
- let se;
1838
- const wt = new Uint8Array(16);
1839
- function xt() {
1840
- if (!se) {
2128
+ let ke;
2129
+ const Ft = new Uint8Array(16);
2130
+ function Xt() {
2131
+ if (!ke) {
1841
2132
  if (typeof crypto > "u" || !crypto.getRandomValues)
1842
2133
  throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
1843
- se = crypto.getRandomValues.bind(crypto);
2134
+ ke = crypto.getRandomValues.bind(crypto);
1844
2135
  }
1845
- return se(wt);
2136
+ return ke(Ft);
1846
2137
  }
1847
- const bt = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), ye = { randomUUID: bt };
1848
- function ie(e, t, n) {
2138
+ const Ot = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), He = { randomUUID: Ot };
2139
+ function Se(e, t, n) {
1849
2140
  var r;
1850
- if (ye.randomUUID && !e)
1851
- return ye.randomUUID();
2141
+ if (He.randomUUID && !e)
2142
+ return He.randomUUID();
1852
2143
  e = e || {};
1853
- const l = e.random ?? ((r = e.rng) == null ? void 0 : r.call(e)) ?? xt();
2144
+ const l = e.random ?? ((r = e.rng) == null ? void 0 : r.call(e)) ?? Xt();
1854
2145
  if (l.length < 16)
1855
2146
  throw new Error("Random bytes length must be >= 16");
1856
- return l[6] = l[6] & 15 | 64, l[8] = l[8] & 63 | 128, vt(l);
2147
+ return l[6] = l[6] & 15 | 64, l[8] = l[8] & 63 | 128, Vt(l);
1857
2148
  }
1858
- const Ee = ({
2149
+ const qe = ({
1859
2150
  variant: e = "plain",
1860
2151
  buttons: t,
1861
2152
  className: n,
1862
2153
  children: l,
1863
2154
  title: r,
1864
- text: c,
1865
- position: i,
2155
+ text: i,
2156
+ position: c,
1866
2157
  targetRef: s,
1867
- ref: u,
1868
- trigger: a = ["hover", "focus"],
1869
- ...p
2158
+ ref: d,
2159
+ trigger: o = ["hover", "focus"],
2160
+ ...h
1870
2161
  }) => {
1871
2162
  if (!l && !s)
1872
2163
  throw new Error("ToolTip must have a child or a targetRef");
1873
- Array.isArray(a) || (a = [a]), t && !Array.isArray(t) && (t = [t]);
1874
- const m = D(null), o = s || m, [d, y] = S(null), [v] = S(ie()), [w, E] = S(!1), L = D(null);
1875
- R(() => {
1876
- const g = (C) => {
1877
- y(C.detail);
2164
+ Array.isArray(o) || (o = [o]), t && !Array.isArray(t) && (t = [t]);
2165
+ const y = B(null), a = s || y, [u, m] = D(null), [b] = D(Se()), [x, M] = D(!1), g = B(null);
2166
+ $(() => {
2167
+ const v = (k) => {
2168
+ m(k.detail);
1878
2169
  };
1879
- return document.addEventListener("tooltip-update", g), () => {
2170
+ return document.addEventListener("tooltip-update", v), () => {
1880
2171
  document.removeEventListener(
1881
2172
  "tooltip-update",
1882
- g
2173
+ v
1883
2174
  );
1884
2175
  };
1885
- }, []), R(() => {
1886
- L.current && clearTimeout(L.current), d ? E(d === v) : L.current = setTimeout(() => {
1887
- E(!1);
2176
+ }, []), $(() => {
2177
+ g.current && clearTimeout(g.current), u ? M(u === b) : g.current = setTimeout(() => {
2178
+ M(!1);
1888
2179
  }, 1200);
1889
- }, [d, v]);
1890
- const B = () => {
1891
- if (a.includes("hover")) {
1892
- const g = new CustomEvent("tooltip-update", { detail: v });
1893
- document.dispatchEvent(g);
2180
+ }, [u, b]);
2181
+ const R = () => {
2182
+ if (o.includes("hover")) {
2183
+ const v = new CustomEvent("tooltip-update", { detail: b });
2184
+ document.dispatchEvent(v);
1894
2185
  }
1895
2186
  }, N = () => {
1896
- if (a.includes("hover")) {
1897
- const g = new CustomEvent("tooltip-update", { detail: null });
1898
- document.dispatchEvent(g);
2187
+ if (o.includes("hover")) {
2188
+ const v = new CustomEvent("tooltip-update", { detail: null });
2189
+ document.dispatchEvent(v);
1899
2190
  }
1900
- }, I = () => {
1901
- if (a.includes("click")) {
1902
- const g = new CustomEvent("tooltip-update", {
1903
- detail: w ? null : v
2191
+ }, P = () => {
2192
+ if (o.includes("click")) {
2193
+ const v = new CustomEvent("tooltip-update", {
2194
+ detail: x ? null : b
1904
2195
  });
1905
- document.dispatchEvent(g);
2196
+ document.dispatchEvent(v);
1906
2197
  }
1907
- }, M = () => {
1908
- if (a.includes("focus")) {
1909
- const g = new CustomEvent("tooltip-update", { detail: v });
1910
- document.dispatchEvent(g);
2198
+ }, L = () => {
2199
+ if (o.includes("focus")) {
2200
+ const v = new CustomEvent("tooltip-update", { detail: b });
2201
+ document.dispatchEvent(v);
1911
2202
  }
1912
- }, V = () => {
1913
- if (a.includes("focus")) {
1914
- const g = new CustomEvent("tooltip-update", { detail: null });
1915
- document.dispatchEvent(g);
2203
+ }, O = () => {
2204
+ if (o.includes("focus")) {
2205
+ const v = new CustomEvent("tooltip-update", { detail: null });
2206
+ document.dispatchEvent(v);
1916
2207
  }
1917
2208
  };
1918
- R(() => {
1919
- if (o != null && o.current) {
1920
- const g = o.current;
1921
- return g.addEventListener("mouseenter", B), g.addEventListener("mouseleave", N), g.addEventListener("click", I), g.addEventListener("focus", M), g.addEventListener("blur", V), () => {
1922
- g.removeEventListener("mouseenter", B), g.removeEventListener("mouseleave", N), g.removeEventListener("click", I), g.removeEventListener("focus", M), g.removeEventListener("blur", V);
2209
+ $(() => {
2210
+ if (a != null && a.current) {
2211
+ const v = a.current;
2212
+ return v.addEventListener("mouseenter", R), v.addEventListener("mouseleave", N), v.addEventListener("click", P), v.addEventListener("focus", L), v.addEventListener("blur", O), () => {
2213
+ v.removeEventListener("mouseenter", R), v.removeEventListener("mouseleave", N), v.removeEventListener("click", P), v.removeEventListener("focus", L), v.removeEventListener("blur", O);
1923
2214
  };
1924
2215
  }
1925
- }, [o, a, v, w]);
1926
- const W = !s && ee(l) ? oe(l, { ref: m }) : l;
1927
- if (!i && typeof window < "u" && o != null && o.current && !i) {
1928
- const g = o.current.getBoundingClientRect(), C = window.innerWidth, X = window.innerHeight, q = g.left / C, G = g.top / X;
1929
- e === "plain" ? q < 1 / 3 ? i = "right" : q > 2 / 3 ? i = "left" : i = G > 0.5 ? "top" : "bottom" : q < 1 / 2 && G < 1 / 2 ? i = "bottom-right" : q > 1 / 2 && G < 1 / 2 ? i = "bottom-left" : q > 1 / 2 && G > 1 / 2 ? i = "top-left" : q < 1 / 2 && G > 1 / 2 && (i = "top-right");
2216
+ }, [a, o, b, x]);
2217
+ const F = !s && pe(l) ? be(l, { ref: y }) : l;
2218
+ if (!c && typeof window < "u" && a != null && a.current && !c) {
2219
+ const v = a.current.getBoundingClientRect(), k = window.innerWidth, U = window.innerHeight, J = v.left / k, re = v.top / U;
2220
+ e === "plain" ? J < 1 / 3 ? c = "right" : J > 2 / 3 ? c = "left" : c = re > 0.5 ? "top" : "bottom" : J < 1 / 2 && re < 1 / 2 ? c = "bottom-right" : J > 1 / 2 && re < 1 / 2 ? c = "bottom-left" : J > 1 / 2 && re > 1 / 2 ? c = "top-left" : J < 1 / 2 && re > 1 / 2 && (c = "top-right");
1930
2221
  }
1931
- const k = nt({
2222
+ const C = Lt({
1932
2223
  variant: e,
1933
2224
  buttons: t,
1934
2225
  className: n,
1935
2226
  title: r,
1936
- text: c,
1937
- position: i,
1938
- trigger: a,
2227
+ text: i,
2228
+ position: c,
2229
+ trigger: o,
1939
2230
  targetRef: s,
1940
2231
  children: l
1941
2232
  });
1942
- return /* @__PURE__ */ A(te, { children: [
1943
- W,
1944
- /* @__PURE__ */ f(Q, { children: w && /* @__PURE__ */ f(st, { targetRef: o, children: /* @__PURE__ */ f(
1945
- H.div,
2233
+ return /* @__PURE__ */ Y(ye, { children: [
2234
+ F,
2235
+ /* @__PURE__ */ f(ue, { children: x && /* @__PURE__ */ f(St, { targetRef: a, children: /* @__PURE__ */ f(
2236
+ j.div,
1946
2237
  {
1947
- initial: { opacity: d ? 1 : 0 },
2238
+ initial: { opacity: u ? 1 : 0 },
1948
2239
  animate: { opacity: 1 },
1949
- transition: { duration: d ? 0 : 0.3 },
1950
- exit: { opacity: d ? 1 : 0 },
1951
- className: k.toolTip,
1952
- ...p,
1953
- onMouseEnter: B,
2240
+ transition: { duration: u ? 0 : 0.3 },
2241
+ exit: { opacity: u ? 1 : 0 },
2242
+ className: C.toolTip,
2243
+ ...h,
2244
+ onMouseEnter: R,
1954
2245
  onMouseLeave: N,
1955
- children: /* @__PURE__ */ A(
1956
- H.div,
2246
+ children: /* @__PURE__ */ Y(
2247
+ j.div,
1957
2248
  {
1958
- className: k.container,
2249
+ className: C.container,
1959
2250
  layoutId: "tool-tip",
1960
2251
  transition: {
1961
2252
  type: "spring",
@@ -1963,16 +2254,16 @@ const Ee = ({
1963
2254
  damping: 20
1964
2255
  },
1965
2256
  children: [
1966
- r && /* @__PURE__ */ f("div", { className: k.subHead, children: r }),
1967
- /* @__PURE__ */ f("div", { className: k.supportingText, children: c }),
1968
- t && /* @__PURE__ */ f("div", { className: k.actions, children: Array.isArray(t) && t.map((g, C) => /* @__PURE__ */ f(
1969
- ht,
2257
+ r && /* @__PURE__ */ f("div", { className: C.subHead, children: r }),
2258
+ /* @__PURE__ */ f("div", { className: C.supportingText, children: i }),
2259
+ t && /* @__PURE__ */ f("div", { className: C.actions, children: Array.isArray(t) && t.map((v, k) => /* @__PURE__ */ f(
2260
+ Bt,
1970
2261
  {
1971
2262
  size: "small",
1972
2263
  variant: "text",
1973
- ...g
2264
+ ...v
1974
2265
  },
1975
- C
2266
+ k
1976
2267
  )) })
1977
2268
  ]
1978
2269
  }
@@ -1980,46 +2271,46 @@ const Ee = ({
1980
2271
  }
1981
2272
  ) }) })
1982
2273
  ] });
1983
- }, ge = ({
2274
+ }, Ve = ({
1984
2275
  className: e,
1985
2276
  label: t,
1986
2277
  variant: n = "primary",
1987
2278
  size: l = "medium",
1988
2279
  href: r,
1989
- type: c,
1990
- icon: i,
2280
+ type: i,
2281
+ icon: c,
1991
2282
  isExtended: s = !1,
1992
- ref: u,
1993
- transition: a,
1994
- children: p,
1995
- ...m
2283
+ ref: d,
2284
+ transition: o,
2285
+ children: h,
2286
+ ...y
1996
2287
  }) => {
1997
- if (p && (t = p), !t)
2288
+ if (h && (t = h), !t)
1998
2289
  throw new Error(
1999
2290
  "FAB component requires either a label prop or children content"
2000
2291
  );
2001
- const o = r ? "a" : "button", d = _e({
2292
+ const a = r ? "a" : "button", u = ft({
2002
2293
  href: r,
2003
- icon: i,
2294
+ icon: c,
2004
2295
  isExtended: s,
2005
2296
  label: t,
2006
2297
  size: l,
2007
2298
  variant: n,
2008
2299
  className: e,
2009
- transition: a,
2300
+ transition: o,
2010
2301
  children: t
2011
2302
  });
2012
- a = { duration: 0.3, ...a };
2013
- const y = D(null), v = u || y, w = {
2303
+ o = { duration: 0.3, ...o };
2304
+ const m = B(null), b = d || m, x = {
2014
2305
  visible: {
2015
2306
  width: "auto",
2016
2307
  marginLeft: 12,
2017
2308
  opacity: 1,
2018
2309
  transition: {
2019
- ...a,
2310
+ ...o,
2020
2311
  opacity: {
2021
- duration: a.duration / 2,
2022
- delay: a.duration - a.duration / 2
2312
+ duration: o.duration / 2,
2313
+ delay: o.duration - o.duration / 2
2023
2314
  }
2024
2315
  }
2025
2316
  },
@@ -2028,178 +2319,178 @@ const Ee = ({
2028
2319
  marginLeft: 0,
2029
2320
  opacity: 0,
2030
2321
  transition: {
2031
- ...a,
2322
+ ...o,
2032
2323
  marginLeft: {
2033
- duration: a.duration / 2,
2034
- delay: a.duration - a.duration / 2
2324
+ duration: o.duration / 2,
2325
+ delay: o.duration - o.duration / 2
2035
2326
  }
2036
2327
  }
2037
2328
  }
2038
2329
  };
2039
- return /* @__PURE__ */ A(
2040
- o,
2330
+ return /* @__PURE__ */ Y(
2331
+ a,
2041
2332
  {
2042
- ...m,
2043
- ref: v,
2333
+ ...y,
2334
+ ref: b,
2044
2335
  href: r,
2045
2336
  "aria-label": s ? void 0 : t,
2046
- className: d.fab,
2337
+ className: u.fab,
2047
2338
  children: [
2048
2339
  /* @__PURE__ */ f(
2049
- Ee,
2340
+ qe,
2050
2341
  {
2051
2342
  trigger: s ? null : void 0,
2052
2343
  text: t,
2053
- targetRef: v
2344
+ targetRef: b
2054
2345
  }
2055
2346
  ),
2056
- /* @__PURE__ */ f("span", { className: d.stateLayer, children: /* @__PURE__ */ f(
2057
- re,
2347
+ /* @__PURE__ */ f("span", { className: u.stateLayer, children: /* @__PURE__ */ f(
2348
+ we,
2058
2349
  {
2059
- colorName: h({
2350
+ colorName: p({
2060
2351
  primary: n == "surface",
2061
2352
  "on-primary-container": n == "primary",
2062
2353
  "on-secondary-container": n == "secondary",
2063
2354
  "on-tertiary-container": n == "tertiary"
2064
2355
  }),
2065
- triggerRef: v
2356
+ triggerRef: b
2066
2357
  }
2067
2358
  ) }),
2068
- /* @__PURE__ */ f(Z, { icon: i, className: d.icon }),
2069
- /* @__PURE__ */ f(Q, { children: s && /* @__PURE__ */ f(
2070
- H.span,
2359
+ /* @__PURE__ */ f(ie, { icon: c, className: u.icon }),
2360
+ /* @__PURE__ */ f(ue, { children: s && /* @__PURE__ */ f(
2361
+ j.span,
2071
2362
  {
2072
- variants: w,
2363
+ variants: x,
2073
2364
  initial: "hidden",
2074
2365
  animate: "visible",
2075
2366
  exit: "hidden",
2076
- className: d.label,
2367
+ className: u.label,
2077
2368
  children: t
2078
2369
  }
2079
2370
  ) })
2080
2371
  ]
2081
2372
  }
2082
2373
  );
2083
- }, ue = ({
2374
+ }, $e = ({
2084
2375
  variant: e = "standard",
2085
2376
  href: t,
2086
2377
  disabled: n = !1,
2087
2378
  type: l = "button",
2088
2379
  title: r,
2089
- label: c,
2090
- onToggle: i,
2380
+ label: i,
2381
+ onToggle: c,
2091
2382
  activated: s = !1,
2092
- onClick: u,
2093
- icon: a,
2094
- size: p = "medium",
2095
- iconSelected: m,
2096
- className: o,
2097
- ref: d,
2098
- width: y = "default",
2099
- shape: v = "rounded",
2100
- allowShapeTransformation: w = !0,
2101
- transition: E,
2102
- children: L,
2103
- ...B
2383
+ onClick: d,
2384
+ icon: o,
2385
+ size: h = "medium",
2386
+ iconSelected: y,
2387
+ className: a,
2388
+ ref: u,
2389
+ width: m = "default",
2390
+ shape: b = "rounded",
2391
+ allowShapeTransformation: x = !0,
2392
+ transition: M,
2393
+ children: g,
2394
+ ...R
2104
2395
  }) => {
2105
- if (L && (c = L), !c)
2396
+ if (g && (i = g), !i)
2106
2397
  throw new Error(
2107
2398
  "IconButton component requires either a label prop or children content to provide an accessible aria-label"
2108
2399
  );
2109
- r || (r = c);
2110
- const [N, I] = K.useState(s);
2111
- let M;
2112
- i ? i && (M = (C) => {
2113
- n && C.preventDefault(), I(!N), i(!!N);
2114
- }, a = N && m || a) : M = (C) => {
2115
- n && C.preventDefault(), u && u(C);
2116
- }, R(() => {
2117
- I(s);
2400
+ r || (r = i);
2401
+ const [N, P] = te.useState(s);
2402
+ let L;
2403
+ c ? c && (L = (k) => {
2404
+ n && k.preventDefault(), P(!N), c(!!N);
2405
+ }, o = N && y || o) : L = (k) => {
2406
+ n && k.preventDefault(), d && d(k);
2407
+ }, $(() => {
2408
+ P(s);
2118
2409
  }, [s]);
2119
- const V = t ? "a" : "button", W = Ke({
2120
- transition: E,
2121
- shape: v,
2122
- allowShapeTransformation: w,
2123
- width: y,
2410
+ const O = t ? "a" : "button", F = mt({
2411
+ transition: M,
2412
+ shape: b,
2413
+ allowShapeTransformation: x,
2414
+ width: m,
2124
2415
  href: t,
2125
2416
  activated: N,
2126
- label: c,
2127
- iconSelected: m,
2417
+ label: i,
2418
+ iconSelected: y,
2128
2419
  isActive: N,
2129
- onToggle: i,
2420
+ onToggle: c,
2130
2421
  disabled: n,
2131
- icon: a,
2422
+ icon: o,
2132
2423
  variant: e,
2133
- className: o,
2134
- size: p,
2135
- children: c,
2136
- ...B
2137
- }), k = D(null), g = d || k;
2138
- return E = { duration: 0.3, ...E }, /* @__PURE__ */ A(
2139
- V,
2424
+ className: a,
2425
+ size: h,
2426
+ children: i,
2427
+ ...R
2428
+ }), C = B(null), v = u || C;
2429
+ return M = { duration: 0.3, ...M }, /* @__PURE__ */ Y(
2430
+ O,
2140
2431
  {
2141
2432
  disabled: n,
2142
2433
  href: t,
2143
- style: { transition: E.duration + "s" },
2144
- className: W.iconButton,
2145
- "aria-label": c,
2146
- ...B,
2434
+ style: { transition: M.duration + "s" },
2435
+ className: F.iconButton,
2436
+ "aria-label": i,
2437
+ ...R,
2147
2438
  title: void 0,
2148
- onClick: M,
2149
- ref: g,
2439
+ onClick: L,
2440
+ ref: v,
2150
2441
  children: [
2151
2442
  /* @__PURE__ */ f(
2152
- Ee,
2443
+ qe,
2153
2444
  {
2154
- targetRef: g,
2445
+ targetRef: v,
2155
2446
  trigger: n ? null : void 0,
2156
2447
  text: r
2157
2448
  }
2158
2449
  ),
2159
- /* @__PURE__ */ f("div", { className: W.touchTarget }),
2450
+ /* @__PURE__ */ f("div", { className: F.touchTarget }),
2160
2451
  /* @__PURE__ */ f(
2161
2452
  "div",
2162
2453
  {
2163
- className: W.stateLayer,
2164
- style: { transition: E.duration + "s" },
2454
+ className: F.stateLayer,
2455
+ style: { transition: M.duration + "s" },
2165
2456
  children: !n && /* @__PURE__ */ f(
2166
- re,
2457
+ we,
2167
2458
  {
2168
- colorName: h(
2459
+ colorName: p(
2169
2460
  e === "standard" && {
2170
2461
  "on-surface-variant": !N,
2171
2462
  primary: N
2172
2463
  },
2173
2464
  e === "filled" && {
2174
- primary: !N && !!i,
2175
- "inverse-on-surface": N || !i
2465
+ primary: !N && !!c,
2466
+ "inverse-on-surface": N || !c
2176
2467
  },
2177
2468
  e === "tonal" && {
2178
- "on-surface-variant": !N && !!i,
2179
- "on-secondary-container": N || !i
2469
+ "on-surface-variant": !N && !!c,
2470
+ "on-secondary-container": N || !c
2180
2471
  },
2181
2472
  e === "outlined" && {
2182
2473
  "on-surface-variant": !N,
2183
2474
  "on-primary": N
2184
2475
  }
2185
2476
  ),
2186
- triggerRef: g
2477
+ triggerRef: v
2187
2478
  }
2188
2479
  )
2189
2480
  }
2190
2481
  ),
2191
- a && /* @__PURE__ */ f(Z, { icon: a, className: W.icon })
2482
+ o && /* @__PURE__ */ f(ie, { icon: o, className: F.icon })
2192
2483
  ]
2193
2484
  }
2194
2485
  );
2195
- }, _t = ({
2486
+ }, fn = ({
2196
2487
  className: e,
2197
2488
  valueFormatter: t,
2198
2489
  step: n = 10,
2199
2490
  name: l,
2200
2491
  value: r = 0,
2201
- min: c = 0,
2202
- max: i = 100,
2492
+ min: i = 0,
2493
+ max: c = 100,
2203
2494
  marks: s = [
2204
2495
  {
2205
2496
  value: 0,
@@ -2210,99 +2501,99 @@ const Ee = ({
2210
2501
  label: "100"
2211
2502
  }
2212
2503
  ],
2213
- ref: u,
2214
- onChange: a,
2215
- ...p
2504
+ ref: d,
2505
+ onChange: o,
2506
+ ...h
2216
2507
  }) => {
2217
- const m = (b) => {
2218
- const x = d(), P = o();
2219
- return b === 1 / 0 ? 100 : b === -1 / 0 ? 0 : (b - x) / (P - x) * 100;
2220
- }, o = (b = !1) => b ? i : i == 1 / 0 ? s[(s == null ? void 0 : s.length) - 1].value : i, d = (b = !1) => b ? c : c == -1 / 0 ? s[0].value : c, y = (b) => {
2221
- const x = d(!1);
2222
- return (o(!1) - x) * b / 100 + x;
2223
- }, [v, w] = S(!1), E = D(null), L = u || E, [B, N] = S(r), [I, M] = S(m(r)), [V, W] = S(!1), k = (b) => {
2224
- W(!0), w(!0), X(b);
2225
- }, g = () => {
2226
- W(!1), w(!1);
2508
+ const y = (S) => {
2509
+ const E = u(), X = a();
2510
+ return S === 1 / 0 ? 100 : S === -1 / 0 ? 0 : (S - E) / (X - E) * 100;
2511
+ }, a = (S = !1) => S ? c : c == 1 / 0 ? s[(s == null ? void 0 : s.length) - 1].value : c, u = (S = !1) => S ? i : i == -1 / 0 ? s[0].value : i, m = (S) => {
2512
+ const E = u(!1);
2513
+ return (a(!1) - E) * S / 100 + E;
2514
+ }, [b, x] = D(!1), M = B(null), g = d || M, [R, N] = D(r), [P, L] = D(y(r)), [O, F] = D(!1), C = (S) => {
2515
+ F(!0), x(!0), U(S);
2516
+ }, v = () => {
2517
+ F(!1), x(!1);
2227
2518
  };
2228
- R(() => (V ? (window.addEventListener("mouseup", g), window.addEventListener("mousemove", X), window.addEventListener("touchend", g), window.addEventListener("touchmove", X)) : (window.removeEventListener("mouseup", g), window.removeEventListener("mousemove", X), window.removeEventListener("touchend", g), window.removeEventListener("touchmove", X)), () => {
2229
- window.removeEventListener("mouseup", g), window.removeEventListener("mousemove", X), window.removeEventListener("touchend", g), window.removeEventListener("touchmove", X);
2230
- }), [V]);
2231
- const C = Ze({
2519
+ $(() => (O ? (window.addEventListener("mouseup", v), window.addEventListener("mousemove", U), window.addEventListener("touchend", v), window.addEventListener("touchmove", U)) : (window.removeEventListener("mouseup", v), window.removeEventListener("mousemove", U), window.removeEventListener("touchend", v), window.removeEventListener("touchmove", U)), () => {
2520
+ window.removeEventListener("mouseup", v), window.removeEventListener("mousemove", U), window.removeEventListener("touchend", v), window.removeEventListener("touchmove", U);
2521
+ }), [O]);
2522
+ const k = yt({
2232
2523
  className: e,
2233
- isChanging: v,
2524
+ isChanging: b,
2234
2525
  marks: s,
2235
- max: i,
2236
- min: c,
2526
+ max: c,
2527
+ min: i,
2237
2528
  name: l,
2238
2529
  step: n,
2239
- value: B,
2530
+ value: R,
2240
2531
  valueFormatter: t,
2241
- onChange: a
2242
- }), X = (b) => {
2243
- const x = L == null ? void 0 : L.current;
2244
- if (x) {
2245
- const P = x.getBoundingClientRect().left, $ = ((b.type === "touchmove" || b.type === "touchstart" ? b.touches[0].clientX : b.clientX) - P) / x.offsetWidth * 100;
2246
- q({ pourcent: $ });
2532
+ onChange: o
2533
+ }), U = (S) => {
2534
+ const E = g == null ? void 0 : g.current;
2535
+ if (E) {
2536
+ const X = E.getBoundingClientRect().left, ae = ((S.type === "touchmove" || S.type === "touchstart" ? S.touches[0].clientX : S.clientX) - X) / E.offsetWidth * 100;
2537
+ J({ percent: ae });
2247
2538
  }
2248
- }, q = ({
2249
- pourcent: b,
2250
- value: x
2539
+ }, J = ({
2540
+ percent: S,
2541
+ value: E
2251
2542
  }) => {
2252
- if (b) {
2253
- if (b >= 100) {
2254
- N(o(!0)), M(100);
2543
+ if (S) {
2544
+ if (S >= 100) {
2545
+ N(a(!0)), L(100);
2255
2546
  return;
2256
2547
  }
2257
- if (b <= 0) {
2258
- N(d(!0)), M(0);
2548
+ if (S <= 0) {
2549
+ N(u(!0)), L(0);
2259
2550
  return;
2260
2551
  }
2261
- x = y(b), x == d() && (x = d(!0)), x == o() && (x = o(!0));
2262
- } else if (x != null) {
2263
- if (x >= o()) {
2264
- N(o(!0)), M(100);
2552
+ E = m(S), E == u() && (E = u(!0)), E == a() && (E = a(!0));
2553
+ } else if (E != null) {
2554
+ if (E >= a()) {
2555
+ N(a(!0)), L(100);
2265
2556
  return;
2266
2557
  }
2267
- if (x <= d()) {
2268
- N(d(!0)), M(0);
2558
+ if (E <= u()) {
2559
+ N(u(!0)), L(0);
2269
2560
  return;
2270
2561
  }
2271
- b = m(x);
2562
+ S = y(E);
2272
2563
  } else
2273
2564
  return;
2274
- n != null ? x = Math.round((x - d()) / n) * n + d() : s && (x = s.reduce((P, F, $) => {
2275
- let O = F.value === 1 / 0 ? o() : F.value === -1 / 0 ? d() : F.value, U = P.value === 1 / 0 ? o() : P.value === -1 / 0 ? d() : P.value;
2276
- return O = Math.abs(O - x), U = Math.abs(U - x), O < U ? F : P;
2277
- }).value), x >= o() && (x = o(!0)), x <= d() && (x = d(!0)), b = m(x), N(x), M(b), a && a(x);
2278
- }, [G, Y] = S(0);
2279
- return R(() => {
2280
- const b = () => {
2281
- L.current && Y(L.current.offsetWidth);
2565
+ n != null ? E = Math.round((E - u()) / n) * n + u() : s && (E = s.reduce((X, q, ae) => {
2566
+ let de = q.value === 1 / 0 ? a() : q.value === -1 / 0 ? u() : q.value, I = X.value === 1 / 0 ? a() : X.value === -1 / 0 ? u() : X.value;
2567
+ return de = Math.abs(de - E), I = Math.abs(I - E), de < I ? q : X;
2568
+ }).value), E >= a() && (E = a(!0)), E <= u() && (E = u(!0)), S = y(E), N(E), L(S), o && o(E);
2569
+ }, [re, _] = D(0);
2570
+ return $(() => {
2571
+ const S = () => {
2572
+ g.current && _(g.current.offsetWidth);
2282
2573
  };
2283
- return b(), window.addEventListener("resize", b), () => {
2284
- window.removeEventListener("resize", b);
2574
+ return S(), window.addEventListener("resize", S), () => {
2575
+ window.removeEventListener("resize", S);
2285
2576
  };
2286
- }, []), /* @__PURE__ */ A(
2577
+ }, []), /* @__PURE__ */ Y(
2287
2578
  "div",
2288
2579
  {
2289
2580
  tabIndex: 0,
2290
- onKeyDown: (b) => {
2291
- switch (b.key) {
2581
+ onKeyDown: (S) => {
2582
+ switch (S.key) {
2292
2583
  case "ArrowRight":
2293
2584
  if (n)
2294
- q({ value: B + n });
2585
+ J({ value: R + n });
2295
2586
  else if (s) {
2296
- const x = s.find((P) => P.value > B);
2297
- x && q({ value: x.value });
2587
+ const E = s.find((X) => X.value > R);
2588
+ E && J({ value: E.value });
2298
2589
  }
2299
2590
  break;
2300
2591
  case "ArrowLeft":
2301
2592
  if (n)
2302
- q({ value: B - n });
2593
+ J({ value: R - n });
2303
2594
  else if (s) {
2304
- const x = s.slice(0).reverse().find((P, F, $) => B === 1 / 0 ? F === 1 : P.value < B);
2305
- x && q({ value: x.value });
2595
+ const E = s.slice(0).reverse().find((X, q, ae) => R === 1 / 0 ? q === 1 : X.value < R);
2596
+ E && J({ value: E.value });
2306
2597
  }
2307
2598
  break;
2308
2599
  default:
@@ -2310,30 +2601,24 @@ const Ee = ({
2310
2601
  }
2311
2602
  },
2312
2603
  role: "slider",
2313
- "aria-valuemin": d(!0),
2314
- "aria-valuemax": o(!0),
2315
- "aria-valuenow": B,
2316
- "aria-valuetext": B.toString(),
2317
- className: C.slider,
2318
- onMouseDown: k,
2319
- onClick: X,
2320
- ref: L,
2321
- onTouchStart: k,
2322
- onDragStart: (b) => b.preventDefault(),
2323
- ...p,
2604
+ "aria-valuemin": u(!0),
2605
+ "aria-valuemax": a(!0),
2606
+ "aria-valuenow": R,
2607
+ "aria-valuetext": R.toString(),
2608
+ className: k.slider,
2609
+ onMouseDown: C,
2610
+ onClick: U,
2611
+ ref: g,
2612
+ onTouchStart: C,
2613
+ onDragStart: (S) => S.preventDefault(),
2614
+ ...h,
2324
2615
  children: [
2325
- /* @__PURE__ */ f("input", { type: "hidden", name: l, value: B }),
2326
- /* @__PURE__ */ f(
2327
- "div",
2328
- {
2329
- className: C.activeTrack,
2330
- style: { flex: I / 100 }
2331
- }
2332
- ),
2333
- /* @__PURE__ */ f("div", { className: C.handle, children: /* @__PURE__ */ f(Q, { children: v && /* @__PURE__ */ f(
2334
- H.div,
2616
+ /* @__PURE__ */ f("input", { type: "hidden", name: l, value: R }),
2617
+ /* @__PURE__ */ f("div", { className: k.activeTrack, style: { flex: P / 100 } }),
2618
+ /* @__PURE__ */ f("div", { className: k.handle, children: /* @__PURE__ */ f(ue, { children: b && /* @__PURE__ */ f(
2619
+ j.div,
2335
2620
  {
2336
- className: C.valueIndicator,
2621
+ className: k.valueIndicator,
2337
2622
  initial: "hidden",
2338
2623
  animate: "visible",
2339
2624
  exit: "hidden",
@@ -2347,35 +2632,35 @@ const Ee = ({
2347
2632
  hidden: { opacity: 1, scale: 0 }
2348
2633
  },
2349
2634
  transition: { duration: 0.1 },
2350
- children: t ? t(B) : B
2635
+ children: t ? t(R) : R
2351
2636
  }
2352
2637
  ) }) }),
2353
2638
  /* @__PURE__ */ f(
2354
2639
  "div",
2355
2640
  {
2356
- className: C.inactiveTrack,
2357
- style: { flex: 1 - I / 100 }
2641
+ className: k.inactiveTrack,
2642
+ style: { flex: 1 - P / 100 }
2358
2643
  }
2359
2644
  ),
2360
2645
  /* @__PURE__ */ f(
2361
2646
  "div",
2362
2647
  {
2363
2648
  className: "w-[calc(100%-12px)] h-full absolute -translate-x-1/2 transform left-1/2",
2364
- children: s && s.map((b, x) => {
2365
- let P = null;
2366
- const F = (v ? 9 : 10) / G * 100, $ = m(b.value);
2367
- return $ <= I - F ? P = !0 : $ >= I + F && (P = !1), /* @__PURE__ */ f(
2649
+ children: s && s.map((S, E) => {
2650
+ let X = null;
2651
+ const q = (b ? 9 : 10) / re * 100, ae = y(S.value);
2652
+ return ae <= P - q ? X = !0 : ae >= P + q && (X = !1), /* @__PURE__ */ f(
2368
2653
  "div",
2369
2654
  {
2370
- className: h(C.dot, {
2371
- "bg-primary-container": P != null && P,
2372
- "bg-primary": P != null && !P
2655
+ className: p(k.dot, {
2656
+ "bg-primary-container": X != null && X,
2657
+ "bg-primary": X != null && !X
2373
2658
  }),
2374
2659
  style: {
2375
- left: `${m(b.value)}%`
2660
+ left: `${y(S.value)}%`
2376
2661
  }
2377
2662
  },
2378
- x
2663
+ E
2379
2664
  );
2380
2665
  })
2381
2666
  }
@@ -2389,156 +2674,156 @@ const Ee = ({
2389
2674
  * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
2390
2675
  * Copyright 2025 Fonticons, Inc.
2391
2676
  */
2392
- var Lt = {
2677
+ var Ut = {
2393
2678
  prefix: "fas",
2394
2679
  iconName: "circle-exclamation",
2395
2680
  icon: [512, 512, ["exclamation-circle"], "f06a", "M256 512a256 256 0 1 1 0-512 256 256 0 1 1 0 512zm0-192a32 32 0 1 0 0 64 32 32 0 1 0 0-64zm0-192c-18.2 0-32.7 15.5-31.4 33.7l7.4 104c.9 12.6 11.4 22.3 23.9 22.3 12.6 0 23-9.7 23.9-22.3l7.4-104c1.3-18.2-13.1-33.7-31.4-33.7z"]
2396
- }, de = {
2681
+ }, Ce = {
2397
2682
  prefix: "fas",
2398
2683
  iconName: "xmark",
2399
2684
  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"]
2400
- }, Nt = {
2685
+ }, Yt = {
2401
2686
  prefix: "fas",
2402
2687
  iconName: "bars",
2403
2688
  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"]
2404
2689
  };
2405
- const Kt = ({
2690
+ const mn = ({
2406
2691
  variant: e = "standard",
2407
2692
  className: t,
2408
2693
  children: n,
2409
2694
  title: l,
2410
2695
  position: r = "right",
2411
- extended: c,
2412
- divider: i,
2696
+ extended: i,
2697
+ divider: c,
2413
2698
  onExtendedChange: s,
2414
- closeIcon: u = de,
2415
- transition: a,
2416
- ...p
2699
+ closeIcon: d = Ce,
2700
+ transition: o,
2701
+ ...h
2417
2702
  }) => {
2418
- a = { duration: 0.3, ...a };
2419
- const [m, o] = S(c ?? !0), d = Je({
2420
- transition: a,
2703
+ o = { duration: 0.3, ...o };
2704
+ const [y, a] = D(i ?? !0), u = pt({
2705
+ transition: o,
2421
2706
  title: l,
2422
2707
  position: r,
2423
- closeIcon: u,
2708
+ closeIcon: d,
2424
2709
  className: t,
2425
2710
  children: n,
2426
2711
  onExtendedChange: s,
2427
- divider: i,
2428
- isExtended: m,
2429
- extended: m,
2712
+ divider: c,
2713
+ isExtended: y,
2714
+ extended: y,
2430
2715
  variant: e
2431
2716
  });
2432
- R(() => {
2433
- s == null || s(m ?? !1);
2434
- }, [m]), R(() => {
2435
- c != null && o(c);
2436
- }, [c]);
2437
- const y = {
2717
+ $(() => {
2718
+ s == null || s(y ?? !1);
2719
+ }, [y]), $(() => {
2720
+ i != null && a(i);
2721
+ }, [i]);
2722
+ const m = {
2438
2723
  close: {
2439
2724
  width: 0
2440
2725
  },
2441
2726
  open: {
2442
2727
  width: "auto"
2443
2728
  }
2444
- }, v = () => /* @__PURE__ */ A(te, { children: [
2445
- /* @__PURE__ */ f(Q, { children: e == "modal" && m && /* @__PURE__ */ f(
2446
- H.div,
2729
+ }, b = () => /* @__PURE__ */ Y(ye, { children: [
2730
+ /* @__PURE__ */ f(ue, { children: e == "modal" && y && /* @__PURE__ */ f(
2731
+ j.div,
2447
2732
  {
2448
2733
  initial: { opacity: 0 },
2449
2734
  animate: { opacity: 1 },
2450
2735
  exit: { opacity: 0 },
2451
- transition: a,
2452
- onClick: () => o(!1),
2453
- className: d.overlay
2736
+ transition: o,
2737
+ onClick: () => a(!1),
2738
+ className: u.overlay
2454
2739
  }
2455
2740
  ) }),
2456
- /* @__PURE__ */ f(Q, { children: m && /* @__PURE__ */ A(
2741
+ /* @__PURE__ */ f(ue, { children: y && /* @__PURE__ */ Y(
2457
2742
  "div",
2458
2743
  {
2459
- ...p,
2460
- className: d.slideSheet,
2461
- style: { transition: a.duration + "s" },
2744
+ ...h,
2745
+ className: u.slideSheet,
2746
+ style: { transition: o.duration + "s" },
2462
2747
  children: [
2463
- /* @__PURE__ */ A(
2464
- H.div,
2748
+ /* @__PURE__ */ Y(
2749
+ j.div,
2465
2750
  {
2466
- variants: y,
2467
- initial: c === !1 ? "open" : "close",
2751
+ variants: m,
2752
+ initial: i === !1 ? "open" : "close",
2468
2753
  animate: "open",
2469
2754
  exit: "close",
2470
- className: d.container,
2755
+ className: u.container,
2471
2756
  children: [
2472
- /* @__PURE__ */ A("div", { className: d.header, children: [
2473
- l && /* @__PURE__ */ f("p", { className: d.title, children: l }),
2757
+ /* @__PURE__ */ Y("div", { className: u.header, children: [
2758
+ l && /* @__PURE__ */ f("p", { className: u.title, children: l }),
2474
2759
  /* @__PURE__ */ f(
2475
- ue,
2760
+ $e,
2476
2761
  {
2477
2762
  size: "small",
2478
2763
  label: "close",
2479
- icon: u,
2480
- onClick: () => o(!1),
2481
- className: d.closeButton
2764
+ icon: d,
2765
+ onClick: () => a(!1),
2766
+ className: u.closeButton
2482
2767
  }
2483
2768
  )
2484
2769
  ] }),
2485
2770
  /* @__PURE__ */ f(
2486
2771
  "div",
2487
2772
  {
2488
- className: d.content,
2489
- style: { transition: a.duration + "s" },
2773
+ className: u.content,
2774
+ style: { transition: o.duration + "s" },
2490
2775
  children: n
2491
2776
  }
2492
2777
  )
2493
2778
  ]
2494
2779
  }
2495
2780
  ),
2496
- (i == null && e == "standard" ? !0 : i) && /* @__PURE__ */ f(gt, { className: d.divider, orientation: "vertical" })
2781
+ (c == null && e == "standard" ? !0 : c) && /* @__PURE__ */ f(Ht, { className: u.divider, orientation: "vertical" })
2497
2782
  ]
2498
2783
  }
2499
2784
  ) })
2500
2785
  ] });
2501
- return e == "modal" ? xe(v(), document.body) : v();
2502
- }, Gt = ({
2786
+ return e == "modal" ? Oe(b(), document.body) : b();
2787
+ }, hn = ({
2503
2788
  message: e,
2504
2789
  className: t,
2505
2790
  duration: n,
2506
- closeIcon: l = de,
2791
+ closeIcon: l = Ce,
2507
2792
  onClose: r,
2508
- ...c
2793
+ ...i
2509
2794
  }) => {
2510
- const [i, s] = S(!0), u = Qe({
2795
+ const [c, s] = D(!0), d = vt({
2511
2796
  className: t,
2512
2797
  closeIcon: l,
2513
2798
  duration: n,
2514
- isVisible: i,
2799
+ isVisible: c,
2515
2800
  onClose: r,
2516
2801
  message: e
2517
2802
  });
2518
- R(() => {
2803
+ $(() => {
2519
2804
  n && setTimeout(() => {
2520
- a();
2805
+ o();
2521
2806
  }, n);
2522
2807
  }, [n]);
2523
- const a = () => {
2808
+ const o = () => {
2524
2809
  s(!1), r == null || r();
2525
2810
  };
2526
- return /* @__PURE__ */ f(Q, { children: i && /* @__PURE__ */ f(
2527
- H.div,
2811
+ return /* @__PURE__ */ f(ue, { children: c && /* @__PURE__ */ f(
2812
+ j.div,
2528
2813
  {
2529
2814
  initial: { height: 0 },
2530
2815
  animate: { height: "auto" },
2531
2816
  exit: { height: 0 },
2532
2817
  transition: { duration: 0.1 },
2533
- className: u.snackbar,
2534
- ...c,
2535
- children: /* @__PURE__ */ A("div", { className: u.container, children: [
2536
- /* @__PURE__ */ f("p", { className: u.supportingText, children: e }),
2818
+ className: d.snackbar,
2819
+ ...i,
2820
+ children: /* @__PURE__ */ Y("div", { className: d.container, children: [
2821
+ /* @__PURE__ */ f("p", { className: d.supportingText, children: e }),
2537
2822
  /* @__PURE__ */ f(
2538
- ue,
2823
+ $e,
2539
2824
  {
2540
- onClick: () => a(),
2541
- className: u.icon,
2825
+ onClick: () => o(),
2826
+ className: d.icon,
2542
2827
  icon: l,
2543
2828
  label: "close the snackbar"
2544
2829
  }
@@ -2546,144 +2831,144 @@ const Kt = ({
2546
2831
  ] })
2547
2832
  }
2548
2833
  ) });
2549
- }, Jt = ({
2834
+ }, pn = ({
2550
2835
  selected: e = !1,
2551
2836
  className: t,
2552
2837
  activeIcon: n,
2553
2838
  disabled: l = !1,
2554
2839
  inactiveIcon: r,
2555
- onChange: c,
2556
- onClick: i,
2840
+ onChange: i,
2841
+ onClick: c,
2557
2842
  onKeyDown: s,
2558
- ref: u,
2559
- ...a
2843
+ ref: d,
2844
+ ...o
2560
2845
  }) => {
2561
- const [p, m] = S(e), o = (L) => {
2562
- l || (y(), i && i(L));
2563
- }, d = (L) => {
2564
- l || ((L.key === " " || L.key === "Enter") && (L.preventDefault(), y()), s && s(L));
2565
- }, y = () => {
2566
- m(!p), c == null || c(!p);
2567
- }, v = ze({
2846
+ const [h, y] = D(e), a = (g) => {
2847
+ l || (m(), c && c(g));
2848
+ }, u = (g) => {
2849
+ l || ((g.key === " " || g.key === "Enter") && (g.preventDefault(), m()), s && s(g));
2850
+ }, m = () => {
2851
+ y(!h), i == null || i(!h);
2852
+ }, b = wt({
2568
2853
  className: t,
2569
- isSelected: p,
2854
+ isSelected: h,
2570
2855
  activeIcon: n,
2571
2856
  inactiveIcon: r,
2572
2857
  disabled: l,
2573
- selected: p,
2574
- onChange: c
2575
- }), w = D(null), E = u || w;
2576
- return /* @__PURE__ */ A(
2577
- H.div,
2858
+ selected: h,
2859
+ onChange: i
2860
+ }), x = B(null), M = d || x;
2861
+ return /* @__PURE__ */ Y(
2862
+ j.div,
2578
2863
  {
2579
2864
  role: "switch",
2580
- "aria-checked": p,
2865
+ "aria-checked": h,
2581
2866
  tabIndex: l ? -1 : 0,
2582
- onKeyDown: d,
2583
- onClick: o,
2584
- ref: E,
2585
- className: v.switch,
2586
- ...a,
2867
+ onKeyDown: u,
2868
+ onClick: a,
2869
+ ref: M,
2870
+ className: b.switch,
2871
+ ...o,
2587
2872
  children: [
2588
- /* @__PURE__ */ f("input", { type: "hidden", value: p ? "1" : "0" }),
2589
- /* @__PURE__ */ A(
2590
- H.div,
2873
+ /* @__PURE__ */ f("input", { type: "hidden", value: h ? "1" : "0" }),
2874
+ /* @__PURE__ */ Y(
2875
+ j.div,
2591
2876
  {
2592
2877
  layout: !0,
2593
- style: { translate: p ? "50%" : "-50%" },
2878
+ style: { translate: h ? "50%" : "-50%" },
2594
2879
  transition: {
2595
2880
  type: "spring",
2596
2881
  stiffness: 700,
2597
2882
  damping: 30
2598
2883
  },
2599
- className: v.handleContainer,
2884
+ className: b.handleContainer,
2600
2885
  children: [
2601
- /* @__PURE__ */ f("div", { className: v.handle, children: (p ? n : r) && /* @__PURE__ */ f(
2602
- Z,
2886
+ /* @__PURE__ */ f("div", { className: b.handle, children: (h ? n : r) && /* @__PURE__ */ f(
2887
+ ie,
2603
2888
  {
2604
- className: v.icon,
2605
- icon: p ? n : r
2889
+ className: b.icon,
2890
+ icon: h ? n : r
2606
2891
  }
2607
2892
  ) }),
2608
- /* @__PURE__ */ f("div", { className: v.handleStateLayer })
2893
+ /* @__PURE__ */ f("div", { className: b.handleStateLayer })
2609
2894
  ]
2610
2895
  }
2611
2896
  )
2612
2897
  ]
2613
2898
  }
2614
2899
  );
2615
- }, Et = ({
2900
+ }, jt = ({
2616
2901
  className: e,
2617
2902
  onClick: t,
2618
2903
  label: n,
2619
2904
  variant: l = "primary",
2620
2905
  href: r,
2621
- icon: c,
2622
- selectedTab: i,
2906
+ icon: i,
2907
+ selectedTab: c,
2623
2908
  setSelectedTab: s,
2624
- tabsId: u,
2625
- index: a,
2626
- onTabSelected: p,
2627
- scrollable: m = !1,
2628
- selected: o = !1,
2629
- ref: d,
2630
- ...y
2909
+ tabsId: d,
2910
+ index: o,
2911
+ onTabSelected: h,
2912
+ scrollable: y = !1,
2913
+ selected: a = !1,
2914
+ ref: u,
2915
+ ...m
2631
2916
  }) => {
2632
- const v = D(null), w = d || v, [E, L] = S(o);
2633
- R(() => {
2634
- o && i == null ? L(!0) : L(i == a && a != null);
2635
- }, [i]), R(() => {
2636
- i == a && p && p({
2637
- ref: w,
2638
- index: a || 0,
2917
+ const b = B(null), x = u || b, [M, g] = D(a);
2918
+ $(() => {
2919
+ a && c == null ? g(!0) : g(c == o && o != null);
2920
+ }, [c]), $(() => {
2921
+ c == o && h && h({
2922
+ ref: x,
2923
+ index: o || 0,
2639
2924
  label: n,
2640
- icon: c
2925
+ icon: i
2641
2926
  });
2642
- }, [i]);
2643
- const B = r ? "a" : "button", N = (M) => {
2644
- s && s(a ?? null), t && t(M);
2645
- }, I = Te({
2927
+ }, [c]);
2928
+ const R = r ? "a" : "button", N = (L) => {
2929
+ s && s(o ?? null), t && t(L);
2930
+ }, P = xt({
2646
2931
  className: e,
2647
- onTabSelected: p,
2648
- scrollable: m,
2649
- selectedTab: i,
2650
- index: a,
2651
- tabsId: u,
2652
- selected: E,
2932
+ onTabSelected: h,
2933
+ scrollable: y,
2934
+ selectedTab: c,
2935
+ index: o,
2936
+ tabsId: d,
2937
+ selected: M,
2653
2938
  variant: l,
2654
- icon: c,
2939
+ icon: i,
2655
2940
  label: n,
2656
- isSelected: E,
2941
+ isSelected: M,
2657
2942
  setSelectedTab: s,
2658
2943
  href: r
2659
2944
  });
2660
- return /* @__PURE__ */ A(
2661
- B,
2945
+ return /* @__PURE__ */ Y(
2946
+ R,
2662
2947
  {
2663
- ...y,
2948
+ ...m,
2664
2949
  role: "tab",
2665
- "aria-selected": E,
2666
- ref: w,
2950
+ "aria-selected": M,
2951
+ ref: x,
2667
2952
  href: r,
2668
- className: I.tab,
2953
+ className: P.tab,
2669
2954
  onClick: N,
2670
- ...y,
2955
+ ...m,
2671
2956
  children: [
2672
- /* @__PURE__ */ f("span", { className: I.stateLayer, children: /* @__PURE__ */ f(
2673
- re,
2957
+ /* @__PURE__ */ f("span", { className: P.stateLayer, children: /* @__PURE__ */ f(
2958
+ we,
2674
2959
  {
2675
- colorName: l === "primary" && E ? "primary" : "on-surface",
2676
- triggerRef: w
2960
+ colorName: l === "primary" && M ? "primary" : "on-surface",
2961
+ triggerRef: x
2677
2962
  }
2678
2963
  ) }),
2679
- /* @__PURE__ */ A("span", { className: I.content, children: [
2680
- c && /* @__PURE__ */ f(Z, { icon: c, className: I.icon }),
2681
- /* @__PURE__ */ f("span", { className: I.label, children: n }),
2682
- E && /* @__PURE__ */ f(
2683
- H.span,
2964
+ /* @__PURE__ */ Y("span", { className: P.content, children: [
2965
+ i && /* @__PURE__ */ f(ie, { icon: i, className: P.icon }),
2966
+ /* @__PURE__ */ f("span", { className: P.label, children: n }),
2967
+ M && /* @__PURE__ */ f(
2968
+ j.span,
2684
2969
  {
2685
- layoutId: `underline-${u}`,
2686
- className: I.underline,
2970
+ layoutId: `underline-${d}`,
2971
+ className: P.underline,
2687
2972
  transition: { duration: 0.3 }
2688
2973
  }
2689
2974
  )
@@ -2691,230 +2976,230 @@ const Kt = ({
2691
2976
  ]
2692
2977
  }
2693
2978
  );
2694
- }, Zt = ({
2979
+ }, yn = ({
2695
2980
  variant: e = "primary",
2696
2981
  onTabSelected: t,
2697
2982
  children: n,
2698
2983
  className: l,
2699
2984
  selectedTab: r,
2700
- setSelectedTab: c,
2701
- scrollable: i = !1
2985
+ setSelectedTab: i,
2986
+ scrollable: c = !1
2702
2987
  }) => {
2703
- const [s, u] = S(
2988
+ const [s, d] = D(
2704
2989
  null
2705
2990
  );
2706
- let a;
2707
- r == 0 || r != null ? a = r : a = s;
2708
- const p = c || u, m = K.Children.toArray(n).filter(
2709
- (w) => K.isValidElement(w) && w.type === Et
2710
- ), o = K.useRef(null), d = (w) => {
2711
- if (t == null || t(w), i) {
2712
- const E = o.current, L = w.ref.current;
2713
- if (E && L) {
2714
- const B = L.offsetLeft + L.offsetWidth / 2 - E.offsetWidth / 2;
2715
- E.scrollTo({ left: B, behavior: "smooth" });
2991
+ let o;
2992
+ r == 0 || r != null ? o = r : o = s;
2993
+ const h = i || d, y = te.Children.toArray(n).filter(
2994
+ (x) => te.isValidElement(x) && x.type === jt
2995
+ ), a = te.useRef(null), u = (x) => {
2996
+ if (t == null || t(x), c) {
2997
+ const M = a.current, g = x.ref.current;
2998
+ if (M && g) {
2999
+ const R = g.offsetLeft + g.offsetWidth / 2 - M.offsetWidth / 2;
3000
+ M.scrollTo({ left: R, behavior: "smooth" });
2716
3001
  }
2717
3002
  }
2718
- }, y = ke(() => ie(), []), v = et({
3003
+ }, m = _e(() => Se(), []), b = gt({
2719
3004
  children: n,
2720
3005
  onTabSelected: t,
2721
- scrollable: i,
2722
- selectedTab: a,
2723
- setSelectedTab: p,
3006
+ scrollable: c,
3007
+ selectedTab: o,
3008
+ setSelectedTab: h,
2724
3009
  className: l,
2725
3010
  variant: e
2726
3011
  });
2727
- return /* @__PURE__ */ f("div", { ref: o, role: "tablist", className: v.tabs, children: m.map((w, E) => K.cloneElement(w, {
2728
- key: E,
2729
- index: E,
3012
+ return /* @__PURE__ */ f("div", { ref: a, role: "tablist", className: b.tabs, children: y.map((x, M) => te.cloneElement(x, {
3013
+ key: M,
3014
+ index: M,
2730
3015
  variant: e,
2731
- selectedTab: a,
2732
- setSelectedTab: p,
2733
- tabsId: y,
2734
- onTabSelected: d,
2735
- scrollable: i
3016
+ selectedTab: o,
3017
+ setSelectedTab: h,
3018
+ tabsId: m,
3019
+ onTabSelected: u,
3020
+ scrollable: c
2736
3021
  })) });
2737
- }, Qt = ({
3022
+ }, vn = ({
2738
3023
  variant: e = "filled",
2739
3024
  disabled: t = !1,
2740
3025
  errorText: n,
2741
3026
  placeholder: l,
2742
3027
  suffix: r,
2743
- name: c,
2744
- label: i,
3028
+ name: i,
3029
+ label: c,
2745
3030
  className: s,
2746
- supportingText: u,
2747
- trailingIcon: a,
2748
- leadingIcon: p,
2749
- type: m = "text",
2750
- textLine: o = "singleLine",
2751
- autoComplete: d = "on",
2752
- onChange: y,
2753
- value: v,
2754
- showSupportingText: w = !1,
2755
- ...E
3031
+ supportingText: d,
3032
+ trailingIcon: o,
3033
+ leadingIcon: h,
3034
+ type: y = "text",
3035
+ textLine: a = "singleLine",
3036
+ autoComplete: u = "on",
3037
+ onChange: m,
3038
+ value: b,
3039
+ showSupportingText: x = !1,
3040
+ ...M
2756
3041
  }) => {
2757
- const [L, B] = S(v ?? ""), [N, I] = S(!1), [M, V] = S(!1), [W, k] = S(
2758
- w
3042
+ const [g, R] = D(b ?? ""), [N, P] = D(!1), [L, O] = D(!1), [F, C] = D(
3043
+ x
2759
3044
  );
2760
- R(() => {
2761
- B(v ?? "");
2762
- }, [v]), R(() => {
2763
- n != null && n.length ? V(!0) : V(!1);
2764
- }, [n]), R(() => {
2765
- w ? k(w) : u != null && u.length ? k(!0) : k(!1);
2766
- }, [W, u]), R(() => {
2767
- N && V(!1);
3045
+ $(() => {
3046
+ R(b ?? "");
3047
+ }, [b]), $(() => {
3048
+ n != null && n.length ? O(!0) : O(!1);
3049
+ }, [n]), $(() => {
3050
+ x ? C(x) : d != null && d.length ? C(!0) : C(!1);
3051
+ }, [F, d]), $(() => {
3052
+ N && O(!1);
2768
3053
  }, [N]);
2769
- const g = K.useRef(null), C = () => {
2770
- g.current && !N && g.current.focus();
2771
- }, X = () => {
2772
- I(!0);
2773
- }, q = (P) => {
2774
- const F = P.target.value;
2775
- B(F), V(!1), typeof y == "function" && y(F);
2776
- }, G = () => {
2777
- I(!1);
2778
- }, Y = tt({
2779
- showSupportingText: W,
3054
+ const v = te.useRef(null), k = () => {
3055
+ v.current && !N && v.current.focus();
3056
+ }, U = () => {
3057
+ P(!0);
3058
+ }, J = (X) => {
3059
+ const q = X.target.value;
3060
+ R(q), O(!1), typeof m == "function" && m(q);
3061
+ }, re = () => {
3062
+ P(!1);
3063
+ }, _ = bt({
3064
+ showSupportingText: F,
2780
3065
  isFocused: N,
2781
- showErrorIcon: M,
3066
+ showErrorIcon: L,
2782
3067
  disabled: t,
2783
- name: c,
2784
- label: i,
2785
- autoComplete: d,
3068
+ name: i,
3069
+ label: c,
3070
+ autoComplete: u,
2786
3071
  className: s,
2787
- onChange: y,
3072
+ onChange: m,
2788
3073
  placeholder: l,
2789
- supportingText: u,
2790
- type: m,
2791
- leadingIcon: p,
2792
- trailingIcon: a,
3074
+ supportingText: d,
3075
+ type: y,
3076
+ leadingIcon: h,
3077
+ trailingIcon: o,
2793
3078
  variant: e,
2794
3079
  errorText: n,
2795
- value: L,
3080
+ value: g,
2796
3081
  suffix: r,
2797
- textLine: o
2798
- }), [z] = S(ie());
2799
- let b, x;
2800
- switch (o) {
3082
+ textLine: a
3083
+ }), [oe] = D(Se());
3084
+ let S, E;
3085
+ switch (a) {
2801
3086
  case "multiLine":
2802
- x = Ve, b = {};
3087
+ E = rt, S = {};
2803
3088
  break;
2804
3089
  case "textAreas":
2805
- x = "textarea", b = {};
3090
+ E = "textarea", S = {};
2806
3091
  break;
2807
3092
  case "singleLine":
2808
3093
  default:
2809
- x = "input", b = { type: m };
3094
+ E = "input", S = { type: y };
2810
3095
  break;
2811
3096
  }
2812
- return /* @__PURE__ */ A("div", { className: Y.textField, ...E, children: [
2813
- /* @__PURE__ */ A("fieldset", { onClick: C, className: Y.content, children: [
2814
- /* @__PURE__ */ f("div", { className: Y.stateLayer }),
2815
- p && /* @__PURE__ */ f("div", { className: Y.leadingIcon, children: K.isValidElement(p) ? p : /* @__PURE__ */ f(Z, { className: "w-5 h-5", icon: p }) }),
2816
- !(!N && !L.length || e == "filled") && /* @__PURE__ */ f(
2817
- H.legend,
3097
+ return /* @__PURE__ */ Y("div", { className: _.textField, ...M, children: [
3098
+ /* @__PURE__ */ Y("fieldset", { onClick: k, className: _.content, children: [
3099
+ /* @__PURE__ */ f("div", { className: _.stateLayer }),
3100
+ h && /* @__PURE__ */ f("div", { className: _.leadingIcon, children: te.isValidElement(h) ? h : /* @__PURE__ */ f(ie, { className: "w-5 h-5", icon: h }) }),
3101
+ !(!N && !g.length || e == "filled") && /* @__PURE__ */ f(
3102
+ j.legend,
2818
3103
  {
2819
3104
  variants: {
2820
3105
  hidden: { width: 0, padding: 0 },
2821
3106
  visible: { width: "auto", padding: "0 8px" }
2822
3107
  },
2823
3108
  initial: "hidden",
2824
- animate: !N && !L.length ? "hidden" : "visible",
3109
+ animate: !N && !g.length ? "hidden" : "visible",
2825
3110
  className: "max-w-full ml-2 px-2 text-body-small h-0",
2826
3111
  transition: { duration: 0.2 },
2827
3112
  children: /* @__PURE__ */ f("span", { className: "transform inline-flex -translate-y-1/2", children: /* @__PURE__ */ f(
2828
- H.span,
3113
+ j.span,
2829
3114
  {
2830
- className: Y.label,
3115
+ className: _.label,
2831
3116
  transition: { duration: 0.3 },
2832
- layoutId: z,
2833
- children: i
3117
+ layoutId: oe,
3118
+ children: c
2834
3119
  }
2835
3120
  ) })
2836
3121
  }
2837
3122
  ),
2838
- /* @__PURE__ */ A("div", { className: "flex-1 relative", children: [
2839
- (!N && !L.length || e == "filled") && /* @__PURE__ */ f(
2840
- H.label,
3123
+ /* @__PURE__ */ Y("div", { className: "flex-1 relative", children: [
3124
+ (!N && !g.length || e == "filled") && /* @__PURE__ */ f(
3125
+ j.label,
2841
3126
  {
2842
- htmlFor: c,
2843
- className: h(
3127
+ htmlFor: i,
3128
+ className: p(
2844
3129
  "absolute left-4 transition-all duration-300",
2845
3130
  {
2846
- "text-body-small top-2": e == "filled" && !(!N && !L.length),
2847
- "text-body-large top-1/2 transform -translate-y-1/2": !(e == "filled" && !(!N && !L.length))
3131
+ "text-body-small top-2": e == "filled" && !(!N && !g.length),
3132
+ "text-body-large top-1/2 transform -translate-y-1/2": !(e == "filled" && !(!N && !g.length))
2848
3133
  }
2849
3134
  ),
2850
3135
  transition: { duration: 0.3 },
2851
3136
  children: /* @__PURE__ */ f(
2852
- H.span,
3137
+ j.span,
2853
3138
  {
2854
- className: Y.label,
3139
+ className: _.label,
2855
3140
  transition: { duration: 0.3 },
2856
- layoutId: e == "outlined" ? z : void 0,
2857
- children: i
3141
+ layoutId: e == "outlined" ? oe : void 0,
3142
+ children: c
2858
3143
  }
2859
3144
  )
2860
3145
  }
2861
3146
  ),
2862
3147
  /* @__PURE__ */ f(
2863
- x,
3148
+ E,
2864
3149
  {
2865
- ref: g,
2866
- value: L,
2867
- onChange: q,
2868
- className: Y.input,
2869
- id: c,
2870
- name: c,
3150
+ ref: v,
3151
+ value: g,
3152
+ onChange: J,
3153
+ className: _.input,
3154
+ id: i,
3155
+ name: i,
2871
3156
  placeholder: N ? l ?? void 0 : "",
2872
- onFocus: X,
2873
- onBlur: G,
3157
+ onFocus: U,
3158
+ onBlur: re,
2874
3159
  disabled: t,
2875
- autoComplete: d,
3160
+ autoComplete: u,
2876
3161
  "aria-invalid": !!(n != null && n.length),
2877
- "aria-label": i,
2878
- ...b
3162
+ "aria-label": c,
3163
+ ...S
2879
3164
  }
2880
3165
  )
2881
3166
  ] }),
2882
- /* @__PURE__ */ f("div", { className: Y.activeIndicator }),
2883
- !M && /* @__PURE__ */ A(te, { children: [
2884
- a && /* @__PURE__ */ f(
3167
+ /* @__PURE__ */ f("div", { className: _.activeIndicator }),
3168
+ !L && /* @__PURE__ */ Y(ye, { children: [
3169
+ o && /* @__PURE__ */ f(
2885
3170
  "div",
2886
3171
  {
2887
- onClick: (P) => {
2888
- P.stopPropagation();
3172
+ onClick: (X) => {
3173
+ X.stopPropagation();
2889
3174
  },
2890
- className: Y.trailingIcon,
2891
- children: K.isValidElement(a) ? a : /* @__PURE__ */ f(Z, { className: "h-5", icon: a })
3175
+ className: _.trailingIcon,
3176
+ children: te.isValidElement(o) ? o : /* @__PURE__ */ f(ie, { className: "h-5", icon: o })
2892
3177
  }
2893
3178
  ),
2894
- !a && r && /* @__PURE__ */ f("span", { className: Y.suffix, children: r })
3179
+ !o && r && /* @__PURE__ */ f("span", { className: _.suffix, children: r })
2895
3180
  ] }),
2896
- M && /* @__PURE__ */ f(
3181
+ L && /* @__PURE__ */ f(
2897
3182
  "div",
2898
3183
  {
2899
- className: h(Y.trailingIcon, {
2900
- " absolute right-0": !a
3184
+ className: p(_.trailingIcon, {
3185
+ " absolute right-0": !o
2901
3186
  }),
2902
3187
  children: /* @__PURE__ */ f(
2903
- Z,
3188
+ ie,
2904
3189
  {
2905
3190
  className: "h-5 text-error",
2906
- icon: Lt
3191
+ icon: Ut
2907
3192
  }
2908
3193
  )
2909
3194
  }
2910
3195
  )
2911
3196
  ] }),
2912
- W && /* @__PURE__ */ f("p", { className: Y.supportingText, children: n != null && n.length ? n : u != null && u.length ? u : " " })
3197
+ F && /* @__PURE__ */ f("p", { className: _.supportingText, children: n != null && n.length ? n : d != null && d.length ? d : " " })
2913
3198
  ] });
2914
- }, It = j(
3199
+ }, qt = G(
2915
3200
  "navigationRailItem",
2916
3201
  ({ isSelected: e, icon: t, label: n, variant: l }) => ({
2917
- navigationRailItem: h(
3202
+ navigationRailItem: p(
2918
3203
  " group flex flex-col pt-1 pb-1.5 cursor-pointer",
2919
3204
  {
2920
3205
  "text-on-surface-variant": !e,
@@ -2923,7 +3208,7 @@ const Kt = ({
2923
3208
  "gap-0 h-[66px]": l == "horizontal"
2924
3209
  }
2925
3210
  ),
2926
- container: h(
3211
+ container: p(
2927
3212
  " w-fit flex justify-center relative rounded-full items-center mx-5",
2928
3213
  {
2929
3214
  "bg-secondary-container overflow-hidden": e,
@@ -2939,129 +3224,129 @@ const Kt = ({
2939
3224
  }
2940
3225
  ]
2941
3226
  ),
2942
- stateLayer: h(
3227
+ stateLayer: p(
2943
3228
  " absolute w-full rounded-full h-full left-0 top-0 ",
2944
3229
  {
2945
3230
  "group-state-on-surface": !e,
2946
3231
  "group-state-on-secondary-container": e
2947
3232
  }
2948
3233
  ),
2949
- icon: h("size-6 flex"),
2950
- label: h("w-fit mx-auto text-nowrap", {
3234
+ icon: p("size-6 flex"),
3235
+ label: p("w-fit mx-auto text-nowrap", {
2951
3236
  "text-label-large ": l == "horizontal",
2952
3237
  "text-label-medium": l == "vertical"
2953
3238
  })
2954
3239
  })
2955
- ), kt = ({ label: e }) => /* @__PURE__ */ f("div", { className: " h-9 flex items-center mx-9 mt-3", children: /* @__PURE__ */ f("p", { className: "text-label-large text-on-surface-variant", children: e }) }), St = ({
3240
+ ), Kt = ({ label: e }) => /* @__PURE__ */ f("div", { className: " h-9 flex items-center mx-9 mt-3", children: /* @__PURE__ */ f("p", { className: "text-label-large text-on-surface-variant", children: e }) }), _t = ({
2956
3241
  className: e,
2957
3242
  onClick: t,
2958
3243
  label: n,
2959
3244
  variant: l = "vertical",
2960
3245
  href: r,
2961
- icon: c,
2962
- selectedItem: i,
3246
+ icon: i,
3247
+ selectedItem: c,
2963
3248
  setSelectedItem: s,
2964
- index: u,
2965
- onItemSelected: a,
2966
- selected: p = !1,
2967
- ref: m,
2968
- transition: o,
2969
- isExtended: d,
2970
- iconSelected: y,
2971
- style: v,
2972
- extendedOnly: w,
2973
- children: E,
2974
- ...L
3249
+ index: d,
3250
+ onItemSelected: o,
3251
+ selected: h = !1,
3252
+ ref: y,
3253
+ transition: a,
3254
+ isExtended: u,
3255
+ iconSelected: m,
3256
+ style: b,
3257
+ extendedOnly: x,
3258
+ children: M,
3259
+ ...g
2975
3260
  }) => {
2976
- E && (n = E);
2977
- const B = D(null), N = m || B, [I, M] = S(p);
2978
- R(() => {
2979
- p && i == null ? M(!0) : M(i == u && u != null);
2980
- }, [i]), R(() => {
2981
- i == u && a && a({
3261
+ M && (n = M);
3262
+ const R = B(null), N = y || R, [P, L] = D(h);
3263
+ $(() => {
3264
+ h && c == null ? L(!0) : L(c == d && d != null);
3265
+ }, [c]), $(() => {
3266
+ c == d && o && o({
2982
3267
  ref: N,
2983
- index: u || 0,
3268
+ index: d || 0,
2984
3269
  label: n,
2985
- icon: c
3270
+ icon: i
2986
3271
  });
2987
- }, [i]);
2988
- const V = r ? "a" : "button", W = (g) => {
2989
- s && s(u ?? null), t && t(g);
2990
- }, k = It({
2991
- isExtended: d,
2992
- extendedOnly: w,
3272
+ }, [c]);
3273
+ const O = r ? "a" : "button", F = (v) => {
3274
+ s && s(d ?? null), t && t(v);
3275
+ }, C = qt({
3276
+ isExtended: u,
3277
+ extendedOnly: x,
2993
3278
  className: e,
2994
- onItemSelected: a,
2995
- selectedItem: i,
2996
- index: u,
2997
- transition: o,
2998
- selected: I,
3279
+ onItemSelected: o,
3280
+ selectedItem: c,
3281
+ index: d,
3282
+ transition: a,
3283
+ selected: P,
2999
3284
  variant: l,
3000
- icon: c,
3285
+ icon: i,
3001
3286
  label: n,
3002
- isSelected: I,
3287
+ isSelected: P,
3003
3288
  setSelectedItem: s,
3004
3289
  href: r,
3005
3290
  children: n,
3006
- iconSelected: y
3291
+ iconSelected: m
3007
3292
  });
3008
- return o = { duration: 0.3, ...o }, w && !d ? null : (
3293
+ return a = { duration: 0.3, ...a }, x && !u ? null : (
3009
3294
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
3010
3295
  // @ts-expect-error
3011
- /* @__PURE__ */ A(
3012
- V,
3296
+ /* @__PURE__ */ Y(
3297
+ O,
3013
3298
  {
3014
- ...L,
3299
+ ...g,
3015
3300
  role: "tab",
3016
- "aria-selected": I,
3301
+ "aria-selected": P,
3017
3302
  ref: N,
3018
3303
  href: r,
3019
- className: k.navigationRailItem,
3020
- onClick: W,
3021
- style: { transition: o.duration + "s", ...v },
3304
+ className: C.navigationRailItem,
3305
+ onClick: F,
3306
+ style: { transition: a.duration + "s", ...b },
3022
3307
  children: [
3023
- /* @__PURE__ */ A(
3024
- H.div,
3308
+ /* @__PURE__ */ Y(
3309
+ j.div,
3025
3310
  {
3026
3311
  style: {
3027
- transition: l == "horizontal" ? o.duration + `s, gap ${o.duration / 2}s ${o.duration - o.duration / 2}s` : o.duration + `s, gap ${o.duration / 3}s ${o.duration - o.duration / 3}s`
3312
+ transition: l == "horizontal" ? a.duration + `s, gap ${a.duration / 2}s ${a.duration - a.duration / 2}s` : a.duration + `s, gap ${a.duration / 3}s ${a.duration - a.duration / 3}s`
3028
3313
  },
3029
- transition: o,
3030
- className: k.container,
3314
+ transition: a,
3315
+ className: C.container,
3031
3316
  children: [
3032
- /* @__PURE__ */ f(H.div, { layout: !0, className: k.stateLayer }),
3033
- c && /* @__PURE__ */ f(
3034
- Z,
3317
+ /* @__PURE__ */ f(j.div, { layout: !0, className: C.stateLayer }),
3318
+ i && /* @__PURE__ */ f(
3319
+ ie,
3035
3320
  {
3036
- icon: I ? y : c,
3037
- className: k.icon
3321
+ icon: P ? m : i,
3322
+ className: C.icon
3038
3323
  }
3039
3324
  ),
3040
- /* @__PURE__ */ f(Q, { children: l == "horizontal" && (() => {
3041
- const g = {
3325
+ /* @__PURE__ */ f(ue, { children: l == "horizontal" && (() => {
3326
+ const v = {
3042
3327
  width: 0,
3043
3328
  opacity: 0,
3044
3329
  transition: {
3045
- ...o
3330
+ ...a
3046
3331
  }
3047
- }, C = {
3332
+ }, k = {
3048
3333
  width: "auto",
3049
3334
  opacity: 1,
3050
3335
  transition: {
3051
- ...o,
3336
+ ...a,
3052
3337
  opacity: {
3053
- duration: o.duration / 2,
3054
- delay: o.duration - o.duration / 2
3338
+ duration: a.duration / 2,
3339
+ delay: a.duration - a.duration / 2
3055
3340
  }
3056
3341
  }
3057
3342
  };
3058
3343
  return /* @__PURE__ */ f(
3059
- H.span,
3344
+ j.span,
3060
3345
  {
3061
- initial: g,
3062
- animate: C,
3063
- exit: g,
3064
- className: k.label,
3346
+ initial: v,
3347
+ animate: k,
3348
+ exit: v,
3349
+ className: C.label,
3065
3350
  children: n
3066
3351
  }
3067
3352
  );
@@ -3069,35 +3354,35 @@ const Kt = ({
3069
3354
  ]
3070
3355
  }
3071
3356
  ),
3072
- /* @__PURE__ */ f(Q, { children: l == "vertical" && (() => {
3073
- const g = {
3357
+ /* @__PURE__ */ f(ue, { children: l == "vertical" && (() => {
3358
+ const v = {
3074
3359
  height: 0,
3075
3360
  opacity: 0,
3076
3361
  transition: {
3077
- ...o,
3362
+ ...a,
3078
3363
  opacity: {
3079
3364
  duration: 0
3080
3365
  }
3081
3366
  }
3082
- }, C = {
3367
+ }, k = {
3083
3368
  height: "auto",
3084
3369
  opacity: 1,
3085
3370
  transition: {
3086
- ...o,
3371
+ ...a,
3087
3372
  opacity: {
3088
- duration: o.duration / 3,
3089
- delay: o.duration - o.duration / 3
3373
+ duration: a.duration / 3,
3374
+ delay: a.duration - a.duration / 3
3090
3375
  }
3091
3376
  }
3092
3377
  };
3093
3378
  return /* @__PURE__ */ f(
3094
- H.span,
3379
+ j.span,
3095
3380
  {
3096
- initial: C,
3097
- animate: C,
3098
- exit: g,
3099
- className: k.label,
3100
- transition: o,
3381
+ initial: k,
3382
+ animate: k,
3383
+ exit: v,
3384
+ className: C.label,
3385
+ transition: a,
3101
3386
  children: n
3102
3387
  }
3103
3388
  );
@@ -3106,180 +3391,180 @@ const Kt = ({
3106
3391
  }
3107
3392
  )
3108
3393
  );
3109
- }, $t = j(
3394
+ }, Gt = G(
3110
3395
  "navigationRail",
3111
3396
  ({ isExtended: e, alignment: t }) => ({
3112
- navigationRail: h("flex flex-col left-0 h-full top-0 pt-11", {
3397
+ navigationRail: p("flex flex-col left-0 h-full top-0 pt-11", {
3113
3398
  "w-fit max-w-24": !e,
3114
3399
  "w-fit min-w-[220px] max-w-[360px]": e,
3115
3400
  "justify-between": t == "middle",
3116
3401
  "justify-start": t == "top"
3117
3402
  }),
3118
- header: h("flex flex-col gap-1 items-start"),
3403
+ header: p("flex flex-col gap-1 items-start"),
3119
3404
  menuIcon: "mx-5",
3120
- segments: h(" flex flex-col overflow-auto min-w-full mt-10", {
3405
+ segments: p(" flex flex-col overflow-auto min-w-full mt-10", {
3121
3406
  "w-full": !e,
3122
3407
  "w-fit items-start": e
3123
3408
  })
3124
3409
  })
3125
- ), zt = ({
3410
+ ), wn = ({
3126
3411
  variant: e = "standard",
3127
3412
  onItemSelected: t,
3128
3413
  children: n,
3129
3414
  className: l,
3130
3415
  selectedItem: r,
3131
- extended: c,
3132
- alignment: i = "top",
3416
+ extended: i,
3417
+ alignment: c = "top",
3133
3418
  menu: s = {
3134
3419
  closed: {
3135
- icon: Nt,
3420
+ icon: Yt,
3136
3421
  label: "Open menu"
3137
3422
  },
3138
3423
  opened: {
3139
- icon: de,
3424
+ icon: Ce,
3140
3425
  label: "Close menu"
3141
3426
  }
3142
3427
  },
3143
- style: u,
3144
- onExtendedChange: a,
3145
- transition: p,
3146
- setSelectedItem: m
3428
+ style: d,
3429
+ onExtendedChange: o,
3430
+ transition: h,
3431
+ setSelectedItem: y
3147
3432
  }) => {
3148
- const [o, d] = S(null), [y, v] = S(c);
3149
- let w;
3150
- r == 0 || r != null ? w = r : w = o;
3151
- const E = m || d, L = D(null), B = (k) => {
3152
- t == null || t(k);
3433
+ const [a, u] = D(null), [m, b] = D(i);
3434
+ let x;
3435
+ r == 0 || r != null ? x = r : x = a;
3436
+ const M = y || u, g = B(null), R = (C) => {
3437
+ t == null || t(C);
3153
3438
  };
3154
- function N(k) {
3155
- const g = [];
3156
- return Se.forEach(k, (C) => {
3157
- ee(C) && C.type === $e ? g.push(...N(C.props.children)) : g.push(C);
3158
- }), g;
3439
+ function N(C) {
3440
+ const v = [];
3441
+ return Ge.forEach(C, (k) => {
3442
+ pe(k) && k.type === Je ? v.push(...N(k.props.children)) : v.push(k);
3443
+ }), v;
3159
3444
  }
3160
- const I = N(n), M = I.filter(
3161
- (k) => ee(k) && k.type === ge
3162
- ), V = $t({
3445
+ const P = N(n), L = P.filter(
3446
+ (C) => pe(C) && C.type === Ve
3447
+ ), O = Gt({
3163
3448
  children: n,
3164
3449
  onItemSelected: t,
3165
- selectedItem: w,
3166
- setSelectedItem: E,
3450
+ selectedItem: x,
3451
+ setSelectedItem: M,
3167
3452
  className: l,
3168
3453
  variant: e,
3169
- extended: y,
3170
- isExtended: y,
3171
- alignment: i,
3454
+ extended: m,
3455
+ isExtended: m,
3456
+ alignment: c,
3172
3457
  menu: s,
3173
- transition: p,
3174
- onExtendedChange: a
3458
+ transition: h,
3459
+ onExtendedChange: o
3175
3460
  });
3176
- p = { duration: 0.3, ...p };
3177
- const W = D(!1);
3178
- return W.current = !1, R(() => {
3179
- a == null || a(y ?? !1);
3180
- }, [y]), /* @__PURE__ */ A(
3461
+ h = { duration: 0.3, ...h };
3462
+ const F = B(!1);
3463
+ return F.current = !1, $(() => {
3464
+ o == null || o(m ?? !1);
3465
+ }, [m]), /* @__PURE__ */ Y(
3181
3466
  "div",
3182
3467
  {
3183
- style: { transition: p.duration + "s", ...u },
3184
- ref: L,
3185
- className: V.navigationRail,
3468
+ style: { transition: h.duration + "s", ...d },
3469
+ ref: g,
3470
+ className: O.navigationRail,
3186
3471
  children: [
3187
- /* @__PURE__ */ A("div", { className: V.header, children: [
3472
+ /* @__PURE__ */ Y("div", { className: O.header, children: [
3188
3473
  /* @__PURE__ */ f(
3189
- ue,
3474
+ $e,
3190
3475
  {
3191
- onClick: () => v(!y),
3192
- label: y ? s == null ? void 0 : s.opened.label : s == null ? void 0 : s.closed.label,
3193
- className: V.menuIcon,
3194
- icon: y ? s.opened.icon : s == null ? void 0 : s.closed.icon
3476
+ onClick: () => b(!m),
3477
+ label: m ? s == null ? void 0 : s.opened.label : s == null ? void 0 : s.closed.label,
3478
+ className: O.menuIcon,
3479
+ icon: m ? s.opened.icon : s == null ? void 0 : s.closed.icon
3195
3480
  }
3196
3481
  ),
3197
- M.length > 0 && oe(M[0], {
3198
- transition: p,
3199
- isExtended: y,
3200
- className: "!shadow-none mx-5 " + M[0].props.className
3482
+ L.length > 0 && be(L[0], {
3483
+ transition: h,
3484
+ isExtended: m,
3485
+ className: "!shadow-none mx-5 " + L[0].props.className
3201
3486
  })
3202
3487
  ] }),
3203
- /* @__PURE__ */ f("div", { className: V.segments, children: (() => {
3204
- let k = 0;
3205
- return I.map((g) => ee(g) && g.type === St ? oe(
3206
- g,
3488
+ /* @__PURE__ */ f("div", { className: O.segments, children: (() => {
3489
+ let C = 0;
3490
+ return P.map((v) => pe(v) && v.type === _t ? be(
3491
+ v,
3207
3492
  {
3208
- key: k,
3209
- index: k++,
3493
+ key: C,
3494
+ index: C++,
3210
3495
  // Utilise et incrémente le compteur dédié
3211
- variant: y ? "horizontal" : "vertical",
3212
- selectedItem: w,
3213
- setSelectedItem: E,
3214
- onItemSelected: B,
3215
- transition: p,
3216
- extendedOnly: W.current,
3217
- isExtended: y
3496
+ variant: m ? "horizontal" : "vertical",
3497
+ selectedItem: x,
3498
+ setSelectedItem: M,
3499
+ onItemSelected: R,
3500
+ transition: h,
3501
+ extendedOnly: F.current,
3502
+ isExtended: m
3218
3503
  }
3219
- ) : ee(g) && g.type === ge ? null : ee(g) && g.type === kt ? (W.current = !0, y ? oe(g, {}) : null) : g);
3504
+ ) : pe(v) && v.type === Ve ? null : pe(v) && v.type === Kt ? (F.current = !0, m ? be(v, {}) : null) : v);
3220
3505
  })() }),
3221
3506
  /* @__PURE__ */ f("div", { className: "flex-1 max-h-[160px]" })
3222
3507
  ]
3223
3508
  }
3224
3509
  );
3225
3510
  };
3226
- function Tt(e) {
3227
- return We({
3228
- variant: Ae.Udixio,
3511
+ function xn(e) {
3512
+ return et({
3513
+ variant: nt.Udixio,
3229
3514
  ...e,
3230
- plugins: [new Pe(e), new be(e)]
3515
+ plugins: [new tt(e), new Ue(e)]
3231
3516
  });
3232
3517
  }
3233
3518
  export {
3234
- Xt as AnimateOnScrollInit,
3235
- ht as Button,
3236
- jt as Card,
3237
- qt as Carousel,
3238
- yt as CarouselItem,
3239
- lt as CustomScroll,
3240
- gt as Divider,
3241
- ge as Fab,
3242
- Z as Icon,
3243
- ue as IconButton,
3244
- zt as NavigationRail,
3245
- St as NavigationRailItem,
3246
- kt as NavigationRailSection,
3247
- rt as ProgressIndicator,
3248
- re as RippleEffect,
3249
- Kt as SideSheet,
3250
- _t as Slider,
3251
- Ot as SmoothScroll,
3252
- Gt as Snackbar,
3253
- Jt as Switch,
3254
- st as SyncedFixedWrapper,
3255
- Et as Tab,
3256
- Zt as Tabs,
3257
- Qt as TextField,
3258
- Ut as ThemeProvider,
3259
- Ee as ToolTip,
3260
- Yt as animateOnScroll,
3261
- Ue as buttonStyle,
3262
- Xe as cardStyle,
3263
- Ye as carouselItemStyle,
3264
- je as carouselStyle,
3265
- h as classNames,
3266
- He as classnames,
3267
- ot as customScrollStyle,
3268
- j as defaultClassNames,
3269
- Tt as defineConfig,
3270
- qe as dividerStyle,
3271
- _e as fabStyle,
3272
- Oe as getClassNames,
3273
- Ke as iconButtonStyle,
3274
- Ne as initAnimateOnScroll,
3275
- pt as normalize,
3276
- Ge as progressIndicatorStyle,
3277
- Je as sideSheetStyle,
3278
- Ze as sliderStyle,
3279
- Qe as snackbarStyle,
3280
- ze as switchStyle,
3281
- Te as tabStyle,
3282
- et as tabsStyle,
3283
- tt as textFieldStyle,
3284
- nt as toolStyle
3519
+ sn as AnimateOnScrollInit,
3520
+ Bt as Button,
3521
+ un as Card,
3522
+ dn as Carousel,
3523
+ Pt as CarouselItem,
3524
+ kt as CustomScroll,
3525
+ Ht as Divider,
3526
+ Ve as Fab,
3527
+ ie as Icon,
3528
+ $e as IconButton,
3529
+ wn as NavigationRail,
3530
+ _t as NavigationRailItem,
3531
+ Kt as NavigationRailSection,
3532
+ Nt as ProgressIndicator,
3533
+ we as RippleEffect,
3534
+ mn as SideSheet,
3535
+ fn as Slider,
3536
+ ln as SmoothScroll,
3537
+ hn as Snackbar,
3538
+ pn as Switch,
3539
+ St as SyncedFixedWrapper,
3540
+ jt as Tab,
3541
+ yn as Tabs,
3542
+ vn as TextField,
3543
+ an as ThemeProvider,
3544
+ qe as ToolTip,
3545
+ cn as animateOnScroll,
3546
+ st as buttonStyle,
3547
+ ct as cardStyle,
3548
+ it as carouselItemStyle,
3549
+ ut as carouselStyle,
3550
+ p as classNames,
3551
+ ot as classnames,
3552
+ Et as customScrollStyle,
3553
+ G as defaultClassNames,
3554
+ xn as defineConfig,
3555
+ dt as dividerStyle,
3556
+ ft as fabStyle,
3557
+ at as getClassNames,
3558
+ mt as iconButtonStyle,
3559
+ je as initAnimateOnScroll,
3560
+ fe as normalize,
3561
+ ht as progressIndicatorStyle,
3562
+ pt as sideSheetStyle,
3563
+ yt as sliderStyle,
3564
+ vt as snackbarStyle,
3565
+ wt as switchStyle,
3566
+ xt as tabStyle,
3567
+ gt as tabsStyle,
3568
+ bt as textFieldStyle,
3569
+ Lt as toolStyle
3285
3570
  };