@udixio/ui-react 2.4.3 → 2.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/dist/index.cjs +2 -2
  3. package/dist/index.js +1712 -1437
  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/custom-scroll/custom-scroll.effect.d.ts +1 -1
  10. package/dist/lib/effects/custom-scroll/custom-scroll.effect.d.ts.map +1 -1
  11. package/dist/lib/effects/custom-scroll/custom-scroll.interface.d.ts +2 -0
  12. package/dist/lib/effects/custom-scroll/custom-scroll.interface.d.ts.map +1 -1
  13. package/dist/lib/effects/custom-scroll/custom-scroll.style.d.ts +4 -0
  14. package/dist/lib/effects/custom-scroll/custom-scroll.style.d.ts.map +1 -1
  15. package/dist/lib/interfaces/carousel-item.interface.d.ts +1 -0
  16. package/dist/lib/interfaces/carousel-item.interface.d.ts.map +1 -1
  17. package/dist/lib/interfaces/carousel.interface.d.ts +19 -1
  18. package/dist/lib/interfaces/carousel.interface.d.ts.map +1 -1
  19. package/dist/lib/styles/carousel-item.style.d.ts +2 -0
  20. package/dist/lib/styles/carousel-item.style.d.ts.map +1 -1
  21. package/dist/lib/styles/carousel.style.d.ts +5 -1
  22. package/dist/lib/styles/carousel.style.d.ts.map +1 -1
  23. package/dist/lib/styles/icon-button.style.d.ts.map +1 -1
  24. package/package.json +3 -3
  25. package/src/lib/components/Carousel.tsx +535 -52
  26. package/src/lib/components/CarouselItem.tsx +12 -6
  27. package/src/lib/components/Slider.tsx +25 -28
  28. package/src/lib/effects/custom-scroll/custom-scroll.effect.tsx +111 -2
  29. package/src/lib/effects/custom-scroll/custom-scroll.interface.ts +4 -0
  30. package/src/lib/interfaces/carousel-item.interface.ts +1 -0
  31. package/src/lib/interfaces/carousel.interface.ts +20 -1
  32. package/src/lib/styles/carousel-item.style.ts +5 -2
  33. package/src/lib/styles/carousel.style.ts +1 -3
  34. package/src/lib/styles/icon-button.style.ts +5 -15
  35. 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 He } from "clsx";
3
+ import { extendTailwindMerge as je } from "tailwind-merge";
4
+ import te, { useState as D, useEffect as $, useRef as P, useLayoutEffect as Ve, isValidElement as pe, cloneElement as be, useMemo as qe, Children as Ke, Fragment as _e } from "react";
5
+ import { motion as j, AnimatePresence as ue, useScroll as Ge, useMotionValueEvent as Re, animate as Je } from "motion/react";
6
+ import { animate as Ze } from "motion";
7
+ import { createPortal as Fe } from "react-dom";
8
+ import { loader as Qe, defineConfig as ze, FontPlugin as Te, Variants as et } from "@udixio/theme";
9
+ import { TailwindPlugin as Xe } from "@udixio/tailwind";
10
+ import tt from "react-textarea-autosize";
11
+ const Oe = je({
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) => Oe(He(e)), nt = (...e) => Oe(He(e));
38
+ function rt(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 ot = (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(rt(r)), n[r] = nt(...i);
61
60
  }), n;
62
- }, j = (e, t) => (n) => Oe({
61
+ }, G = (e, t) => (n) => ot({
63
62
  classNameList: [n.className, t],
64
63
  default: e,
65
64
  states: n
66
- }), Ue = j(
65
+ }), lt = 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
+ ), at = 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
+ ), st = 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
+ ), ct = 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
+ ), it = 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
+ ), ut = 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
+ ), dt = 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
+ ), ft = 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
+ ), mt = 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
+ ), ht = 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
+ ), pt = 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
+ ), yt = 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
+ ), vt = 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
+ ), wt = 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
+ ), gt = 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
+ }, bt = ({
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 = ft({
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
+ }, ve = ({
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
+ }, Lt = 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 Nt(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 Et = ({
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 = P(null), h = P(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((v) => {
1057
+ for (const B of v)
1058
+ B.target === o.current && a({
1059
+ width: B.contentRect.width,
1060
+ height: B.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 = P(null), m = P(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
+ }, w = () => {
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 } = Ge({
1082
+ container: o
1083
+ }), R = P(null);
1084
+ R.current || (R.current = Nt(
1085
+ c,
1086
+ (I, v) => {
1087
+ !m.current || !u.current || !o.current || (v === (t === "horizontal" ? "x" : "y") && (d == null || d(I)), l && (t === "horizontal" && v === "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" && v === "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, v) => {
1101
+ R.current && R.current(I, v);
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, v = h.current;
1107
+ if (!I || !v || typeof s != "number") return;
1108
+ const B = (H, V, le) => Math.min(le, Math.max(V, H));
1109
+ if (t === "horizontal") {
1110
+ const H = Math.max(0, (n ?? v.scrollWidth) - I.clientWidth);
1111
+ I.scrollLeft = B(s * H, 0, H);
1112
+ } else {
1113
+ const H = Math.max(0, (n ?? v.scrollHeight) - I.clientHeight);
1114
+ I.scrollTop = B(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 [A, L] = D(!1);
1122
+ Ve(() => {
1123
+ A || !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 = w();
1130
+ const [O, F] = D(!1), C = Lt({
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
+ }), [x, k] = D(0), [U, J] = D(0), re = (I) => {
1140
+ if (!i) return;
1141
+ const v = o.current;
1142
+ if (!v || x == null) return;
1143
+ const H = (I.pageX - v.offsetLeft - x) * 1.5;
1144
+ v.scrollLeft = U - H;
1145
+ }, _ = (I) => {
1146
+ const v = o.current;
1147
+ v && (F(!0), k(I.pageX - v.offsetLeft), J(v.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 = P(null);
1157
+ return $(() => () => {
1158
+ q.current && clearTimeout(q.current);
1159
+ }, []), $(() => {
1160
+ const I = o.current;
1161
+ if (!I) return;
1162
+ const v = (B) => {
1163
+ var se, ne, T, ce;
1164
+ const H = B.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", v), () => {
1197
+ I.removeEventListener("udx:customScroll:set", v);
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,48 +1244,48 @@ const Oe = (e) => {
1176
1244
  ]
1177
1245
  }
1178
1246
  );
1179
- }, at = ({
1247
+ }, It = ({
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 = P(null), r = P(0), i = P(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, w = 0;
1288
+ switch (a.key) {
1221
1289
  case "ArrowDown":
1222
1290
  w = 40;
1223
1291
  break;
@@ -1225,16 +1293,16 @@ const Oe = (e) => {
1225
1293
  w = -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
+ w = m;
1235
1303
  break;
1236
1304
  case "PageUp":
1237
- w = -y;
1305
+ w = -m;
1238
1306
  break;
1239
1307
  case "Home":
1240
1308
  w = Number.NEGATIVE_INFINITY;
@@ -1243,86 +1311,86 @@ const Oe = (e) => {
1243
1311
  w = Number.POSITIVE_INFINITY;
1244
1312
  break;
1245
1313
  case " ":
1246
- w = o.shiftKey ? -y : y;
1314
+ w = 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,
1322
+ deltaX: b,
1255
1323
  deltaY: w,
1256
- originalEvent: o
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
+ }, rn = ({
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 = P(!1), d = P(), o = P(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 = P(), y = P(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, w = o.current;
1362
+ Math.abs(b - w) < 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
+ It,
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
+ }, kt = ({
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 = P(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 ? Fe(/* @__PURE__ */ f("div", { style: n, children: t }), document.body) : null;
1346
1414
  };
1347
- function ct(e) {
1415
+ function Mt(e) {
1348
1416
  return /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(e);
1349
1417
  }
1350
- const Ut = ({
1418
+ const on = ({
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 Qe(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 = P(null), o = P(0), h = P(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 (w) => {
1440
+ await y(w);
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));
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 w = 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));
1382
1450
  }, w);
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" && !Mt(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(Xe).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 St() {
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 $t() {
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 Ct(e = document, t) {
1446
1514
  const n = Array.from(
1447
1515
  e.querySelectorAll(`[class*="${t}-"]`)
1448
1516
  ), l = /* @__PURE__ */ new Set([
@@ -1461,63 +1529,63 @@ 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 Be(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 Dt(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 Rt = [0, 0.2];
1546
+ function Ue(e = {}) {
1479
1547
  const { prefix: t = "anim", once: n = !0 } = e;
1480
- if (ut())
1548
+ if ($t())
1481
1549
  return () => {
1482
1550
  };
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);
1551
+ const l = St(), r = /* @__PURE__ */ new WeakSet(), i = new IntersectionObserver(
1552
+ (h) => {
1553
+ for (const y of h) {
1554
+ const a = y.target;
1555
+ if (!We(a)) continue;
1556
+ const u = a.classList.contains(`${t}-out`);
1557
+ !u && y.isIntersecting ? (Be(a, t, "in"), n && i.unobserve(a)) : u && !y.isIntersecting ? (Be(a, t, "out"), n && i.unobserve(a)) : n || Dt(a, t);
1490
1558
  }
1491
1559
  },
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));
1560
+ { threshold: Rt }
1561
+ ), c = (h) => {
1562
+ const y = Ct(h || document, t);
1563
+ for (const a of y)
1564
+ r.has(a) || (r.add(a), i.observe(a));
1497
1565
  };
1498
- i();
1499
- let s, u = null, a = null;
1566
+ c();
1567
+ let s, d = null, o = null;
1500
1568
  if (l)
1501
1569
  (() => {
1502
- a == null && (a = requestAnimationFrame(() => {
1503
- a = null;
1504
- const m = ae(void 0, t);
1505
- for (const o of m) le(o, t);
1570
+ o == null && (o = requestAnimationFrame(() => {
1571
+ o = null;
1572
+ const y = Ie(void 0, t);
1573
+ for (const a of y) Ee(a, t);
1506
1574
  }));
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);
1575
+ })(), d = new MutationObserver((y) => {
1576
+ for (const a of y)
1577
+ if (a.type === "attributes") {
1578
+ const u = a.target;
1579
+ u instanceof HTMLElement && (Ee(u, t), We(u) && (r.has(u) || (r.add(u), i.observe(u))));
1580
+ } else if (a.type === "childList" && a.addedNodes && a.addedNodes.length) {
1581
+ for (const u of Array.from(a.addedNodes))
1582
+ if (u instanceof HTMLElement) {
1583
+ const m = Ie(u, t);
1584
+ for (const b of m) Ee(b, t);
1585
+ c(u);
1518
1586
  }
1519
1587
  }
1520
- }), u.observe(document.documentElement, {
1588
+ }), d.observe(document.documentElement, {
1521
1589
  subtree: !0,
1522
1590
  childList: !0,
1523
1591
  attributes: !0,
@@ -1530,114 +1598,114 @@ function Ne(e = {}) {
1530
1598
  `data-${t}-run`
1531
1599
  ]
1532
1600
  }), s = () => {
1533
- a != null && cancelAnimationFrame(a), u && u.disconnect();
1601
+ o != null && cancelAnimationFrame(o), d && d.disconnect();
1534
1602
  };
1535
1603
  else {
1536
- let p;
1537
- ae(void 0, t).length > 0 && import("./scrollDriven-AP2yWhzi.js").then((o) => {
1538
- p = o.initScrollViewFallback({ once: n });
1604
+ let h;
1605
+ Ie(void 0, t).length > 0 && import("./scrollDriven-AP2yWhzi.js").then((a) => {
1606
+ h = a.initScrollViewFallback({ once: n });
1539
1607
  }), s = () => {
1540
- typeof p == "function" && p();
1608
+ typeof h == "function" && h();
1541
1609
  };
1542
1610
  }
1543
1611
  return () => {
1544
- s && s(), c.disconnect();
1612
+ s && s(), i.disconnect();
1545
1613
  };
1546
1614
  }
1547
- const Xt = Ne, Yt = Ne, ht = ({
1615
+ const ln = Ue, an = Ue, Wt = ({
1548
1616
  variant: e = "filled",
1549
1617
  disabled: t = !1,
1550
1618
  icon: n,
1551
1619
  href: l,
1552
1620
  label: r,
1553
- disableTextMargins: c,
1554
- className: i,
1621
+ disableTextMargins: i,
1622
+ className: c,
1555
1623
  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,
1624
+ loading: d = !1,
1625
+ shape: o = "rounded",
1626
+ onClick: h,
1627
+ onToggle: y,
1628
+ activated: a,
1629
+ ref: u,
1630
+ size: m = "medium",
1631
+ allowShapeTransformation: b = !0,
1564
1632
  transition: w,
1565
- children: E,
1566
- ...L
1633
+ children: M,
1634
+ ...g
1567
1635
  }) => {
1568
- if (E && (r = E), !r)
1636
+ if (M && (r = M), !r)
1569
1637
  throw new Error(
1570
1638
  "Button component requires either a label prop or children content"
1571
1639
  );
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);
1640
+ const R = l ? "a" : "button", N = P(null), A = u || N, [L, O] = te.useState(a);
1641
+ $(() => {
1642
+ O(a);
1643
+ }, [a]), w = { duration: 0.3, ...w };
1644
+ let F;
1645
+ y ? y && (F = (k) => {
1646
+ t && k.preventDefault();
1647
+ const U = !L;
1648
+ O(U), y(U);
1649
+ }) : F = (k) => {
1650
+ t && k.preventDefault(), h && h(k);
1583
1651
  };
1584
- const k = Ue({
1585
- allowShapeTransformation: v,
1586
- size: y,
1587
- disableTextMargins: c,
1588
- shape: a,
1652
+ const C = lt({
1653
+ allowShapeTransformation: b,
1654
+ size: m,
1655
+ disableTextMargins: i,
1656
+ shape: o,
1589
1657
  href: l,
1590
1658
  disabled: t,
1591
1659
  icon: n,
1592
1660
  iconPosition: s,
1593
- loading: u,
1661
+ loading: d,
1594
1662
  variant: e,
1595
1663
  transition: w,
1596
- className: i,
1597
- isActive: M ?? !1,
1598
- onToggle: m,
1599
- activated: M,
1664
+ className: c,
1665
+ isActive: L ?? !1,
1666
+ onToggle: y,
1667
+ activated: L,
1600
1668
  label: r,
1601
1669
  children: r
1602
- }), g = n ? /* @__PURE__ */ f(Z, { icon: n, className: k.icon }) : /* @__PURE__ */ f(te, {});
1603
- return /* @__PURE__ */ A(
1604
- B,
1670
+ }), x = n ? /* @__PURE__ */ f(ie, { icon: n, className: C.icon }) : /* @__PURE__ */ f(ye, {});
1671
+ return /* @__PURE__ */ Y(
1672
+ R,
1605
1673
  {
1606
- ref: I,
1674
+ ref: A,
1607
1675
  href: l,
1608
- className: k.button,
1609
- ...L,
1610
- onClick: W,
1676
+ className: C.button,
1677
+ ...g,
1678
+ onClick: F,
1611
1679
  disabled: t,
1612
- "aria-pressed": m ? M : void 0,
1680
+ "aria-pressed": y ? L : void 0,
1613
1681
  style: { transition: w.duration + "s" },
1614
1682
  children: [
1615
- /* @__PURE__ */ f("div", { className: k.touchTarget }),
1683
+ /* @__PURE__ */ f("div", { className: C.touchTarget }),
1616
1684
  /* @__PURE__ */ f(
1617
1685
  "div",
1618
1686
  {
1619
- className: k.stateLayer,
1687
+ className: C.stateLayer,
1620
1688
  style: { transition: w.duration + "s" },
1621
1689
  children: !t && /* @__PURE__ */ f(
1622
- re,
1690
+ ve,
1623
1691
  {
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
1692
+ 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" || "",
1693
+ triggerRef: A
1626
1694
  }
1627
1695
  )
1628
1696
  }
1629
1697
  ),
1630
- s === "left" && g,
1631
- u && /* @__PURE__ */ f(
1698
+ s === "left" && x,
1699
+ d && /* @__PURE__ */ f(
1632
1700
  "div",
1633
1701
  {
1634
1702
  className: "!absolute left-1/2 -translate-x-1/2 top-1/2 -translate-y-1/2",
1635
1703
  children: /* @__PURE__ */ f(
1636
- rt,
1704
+ bt,
1637
1705
  {
1638
1706
  className: () => ({
1639
1707
  progressIndicator: "h-6 w-6",
1640
- activeIndicator: h(
1708
+ activeIndicator: p(
1641
1709
  {
1642
1710
  "!stroke-primary": e === "elevated" && !t,
1643
1711
  "!stroke-on-surface/[38%]": e === "elevated" && t
@@ -1665,297 +1733,510 @@ const Xt = Ne, Yt = Ne, ht = ({
1665
1733
  )
1666
1734
  }
1667
1735
  ),
1668
- /* @__PURE__ */ f("span", { className: k.label, children: r }),
1669
- s === "right" && g
1736
+ /* @__PURE__ */ f("span", { className: C.label, children: r }),
1737
+ s === "right" && x
1670
1738
  ]
1671
1739
  }
1672
1740
  );
1673
- }, jt = ({
1741
+ }, sn = ({
1674
1742
  variant: e = "outlined",
1675
1743
  className: t,
1676
1744
  children: n,
1677
1745
  isInteractive: l = !1,
1678
1746
  ref: r,
1679
- ...c
1747
+ ...i
1680
1748
  }) => {
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 }) }),
1749
+ const c = at({ className: t, isInteractive: l, variant: e, children: n }), s = P(null), d = r || s;
1750
+ return /* @__PURE__ */ Y("div", { ...i, ref: d, className: c.card, children: [
1751
+ /* @__PURE__ */ f("div", { className: c.stateLayer, children: l && /* @__PURE__ */ f(ve, { colorName: "on-surface", triggerRef: d }) }),
1684
1752
  n
1685
1753
  ] });
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 = ({
1754
+ }, fe = (e, t, n = [0, 1]) => {
1755
+ const [l, r] = t, [i, c] = n, d = (Math.max(l, Math.min(e, r)) - l) / (r - l);
1756
+ return i + d * (c - i);
1757
+ }, Bt = ({
1690
1758
  className: e,
1691
1759
  children: t,
1692
- width: n = 1,
1760
+ width: n,
1693
1761
  index: l = 0,
1694
- ref: r,
1762
+ outputRange: r,
1763
+ ref: i,
1695
1764
  ...c
1696
1765
  }) => {
1697
- const i = D(null), s = r || i, u = Ye({
1766
+ const s = P(null), d = i || s, o = st({
1698
1767
  className: e,
1699
1768
  index: l,
1700
1769
  width: n,
1701
- children: t
1770
+ children: t,
1771
+ outputRange: r
1702
1772
  });
1703
1773
  return /* @__PURE__ */ f(
1704
- H.div,
1774
+ "div",
1705
1775
  {
1706
- ref: s,
1707
- animate: { width: n + "px" },
1776
+ ref: d,
1777
+ style: {
1778
+ width: n + "px",
1779
+ maxWidth: r[1] + "px",
1780
+ minWidth: r[0] + "px",
1781
+ willChange: "width"
1782
+ },
1708
1783
  transition: {
1709
1784
  duration: 0.5,
1710
1785
  ease: "linear"
1711
1786
  },
1712
- className: u.carouselItem,
1787
+ className: o.carouselItem,
1713
1788
  ...c,
1714
1789
  children: t
1715
1790
  }
1716
1791
  );
1717
- }, qt = ({
1792
+ }, cn = ({
1718
1793
  variant: e = "hero",
1719
1794
  className: t,
1720
1795
  children: n,
1721
1796
  ref: l,
1722
1797
  marginPourcent: r = 0,
1723
- inputRange: c = [0.21, 0.65],
1724
- outputRange: i = [42, 300],
1798
+ inputRange: i = [0.21, 0.65],
1799
+ outputRange: c = [42, 300],
1725
1800
  gap: s = 8,
1726
- onChange: u,
1727
- scrollSensitivity: a = 1.25,
1728
- ...p
1801
+ onChange: d,
1802
+ onMetricsChange: o,
1803
+ index: h,
1804
+ scrollSensitivity: y = 1.25,
1805
+ ...a
1729
1806
  }) => {
1730
- var Y, z;
1731
- const m = D(null), o = l || m, d = je({
1807
+ const u = P(null), m = l || u, [b, w] = D(0), M = ct({
1808
+ index: h,
1732
1809
  className: t,
1733
1810
  children: n,
1734
1811
  variant: e,
1735
- inputRange: c,
1736
- outputRange: i,
1812
+ inputRange: i,
1813
+ outputRange: c,
1737
1814
  marginPourcent: r,
1738
- onChange: u,
1815
+ onChange: d,
1739
1816
  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
- );
1817
+ scrollSensitivity: y
1818
+ }), g = te.Children.toArray(n).filter(
1819
+ (v) => te.isValidElement(v) && v.type === Bt
1820
+ ), R = P(null), [N, A] = D(
1821
+ {}
1822
+ ), [L, O] = D(null), F = P(0), C = P(null), x = () => {
1823
+ var we, me, xe;
1824
+ if (!R.current || !m.current || (L == null ? void 0 : L.scrollProgress) === void 0)
1825
+ return [];
1826
+ const v = (L == null ? void 0 : L.scrollVisible) ?? ((we = m.current) == null ? void 0 : we.clientWidth) ?? 0;
1827
+ function B(W, K) {
1828
+ return W.map((Z, z) => ({
1829
+ itemScrollXCenter: Z,
1830
+ relativeIndex: (Z - K) / Math.abs(W[1] - W[0]),
1831
+ index: z,
1832
+ width: 0
1833
+ }));
1751
1834
  }
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;
1835
+ const H = g.map((W, K) => {
1836
+ if (!k[K].current || !R.current) return 0;
1837
+ const z = K / (g.length - 1);
1838
+ return fe(z, [0, 1], [0, 1]);
1839
+ }), V = B(
1840
+ H,
1841
+ (L == null ? void 0 : L.scrollProgress) ?? 0
1842
+ ).sort((W, K) => W.index - K.index);
1843
+ let se = ((((me = m.current) == null ? void 0 : me.clientWidth) ?? v) + s) / (c[1] + s);
1844
+ const ne = V.sort((W, K) => Math.abs(W.relativeIndex) - Math.abs(K.relativeIndex)).map((W, K) => {
1845
+ var z;
1846
+ if (!W) return;
1847
+ K === 0 && J(W.index);
1848
+ const Z = (z = k[W.index]) == null ? void 0 : z.current;
1849
+ if (!(!m.current || !Z) && !(se <= 0))
1850
+ return W.width = c[1], --se, W;
1851
+ }).filter(Boolean).sort((W, K) => W.index - K.index);
1852
+ let T = (((xe = m.current) == null ? void 0 : xe.clientWidth) ?? v) - s;
1853
+ const ce = ne.filter((W, K, Z) => {
1854
+ let z = !1;
1855
+ return W.width == c[1] && (K === 0 || K === Z.length - 1) && (z = !0), z ? !0 : (T -= W.width + s, !1);
1856
+ });
1857
+ ce.forEach((W) => {
1858
+ if (!W) return;
1859
+ const K = fe(
1860
+ 1 - Math.abs(L.scrollProgress - W.itemScrollXCenter),
1861
+ [0, 1],
1862
+ [0, 1]
1863
+ );
1864
+ W.width = K;
1756
1865
  });
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());
1866
+ let ee = 0;
1867
+ return ce.forEach((W, K) => {
1868
+ if (W)
1869
+ if (K == 0) {
1870
+ const Z = fe(
1871
+ W == null ? void 0 : W.relativeIndex,
1872
+ [-2, W.index == 0 ? 0 : -1],
1873
+ [0, 1]
1874
+ );
1875
+ 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(
1876
+ 1 - Z,
1877
+ [0, 1],
1878
+ [0, -(c[0] + s)]
1879
+ )), T -= ee, W.width = fe(
1880
+ Z,
1881
+ [0, 1],
1882
+ [c[0], c[1]]
1883
+ ), T -= W.width;
1884
+ } else {
1885
+ let Z = W.index, z = Z == V.length - 1;
1886
+ const Le = Z == V.length - 2;
1887
+ for (; T > 0; ) {
1888
+ const he = V.filter(
1889
+ (ge) => ge.index === Z
1890
+ )[0];
1891
+ if (!he) {
1892
+ if (z)
1893
+ throw new Error("dynamicItem not found");
1894
+ z = !0;
1895
+ break;
1896
+ }
1897
+ if (ne.includes(he) || ne.push(he), he.width = fe(
1898
+ T,
1899
+ [c[0], c[1] + (s + c[0]) * 2],
1900
+ [c[0], c[1]]
1901
+ ), T -= he.width + s, (Le || z) && he.index == V.length - 1) {
1902
+ let ge = 1;
1903
+ for (; T > 0; ) {
1904
+ const Ne = ne[ge], De = fe(
1905
+ Ne.width + T,
1906
+ [c[0], c[1]],
1907
+ [c[0], c[1]]
1908
+ ) - Ne.width;
1909
+ Ne.width += De, T -= De, ge--;
1910
+ }
1911
+ break;
1912
+ } else
1913
+ Z++;
1914
+ }
1915
+ }
1916
+ }), w(ee), Object.fromEntries(
1917
+ ne.map((W) => [W.index, W.width])
1918
+ );
1919
+ }, k = P([]).current, [U, J] = D(0);
1920
+ $(() => {
1921
+ d && d(U);
1922
+ }, [U]), $(() => {
1923
+ typeof h == "number" && g.length > 0 && h !== U && oe(h);
1924
+ }, [h, g.length]), $(() => {
1925
+ _(U);
1926
+ }, [U]), k.length !== g.length && g.forEach((v, B) => {
1927
+ k[B] || (k[B] = te.createRef());
1769
1928
  });
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
1929
+ const [re, _] = D(0), oe = (v, B = {}) => {
1930
+ if (!g.length) return 0;
1931
+ const H = k[v];
1932
+ if (!H || !H.current || !R.current) return 0;
1933
+ const V = fe(
1934
+ v / Math.max(1, g.length - 1),
1935
+ [0, 1],
1936
+ [0, 1]
1937
+ );
1938
+ return _(v), R.current.dispatchEvent(
1939
+ new CustomEvent("udx:customScroll:set", {
1940
+ bubbles: !0,
1941
+ detail: {
1942
+ progress: V,
1943
+ orientation: "horizontal",
1944
+ animate: B.animate !== !1
1945
+ }
1946
+ })
1947
+ ), V;
1948
+ }, S = g.map((v, B) => {
1949
+ var se;
1950
+ const H = (se = v.props) == null ? void 0 : se.onClick, V = (ne) => {
1951
+ H == null || H(ne);
1952
+ }, le = () => _(B);
1953
+ return te.cloneElement(
1954
+ v,
1955
+ {
1956
+ width: N[B],
1957
+ outputRange: c,
1958
+ ref: k[B],
1959
+ key: B,
1960
+ index: B,
1961
+ role: "option",
1962
+ "aria-selected": U === B,
1963
+ tabIndex: U === B ? 0 : -1,
1964
+ onClick: V,
1965
+ onFocus: le
1966
+ }
1967
+ );
1968
+ }), E = (v) => {
1969
+ var B;
1970
+ if (v.scrollTotal > 0) {
1971
+ (B = C.current) == null || B.stop();
1972
+ const H = F.current ?? 0, V = v.scrollProgress ?? 0;
1973
+ C.current = Je(H, V, {
1974
+ // Spring tuning to add a bit of inertia and smoothness
1975
+ type: "spring",
1976
+ stiffness: 260,
1977
+ damping: 32,
1978
+ mass: 0.6,
1979
+ restDelta: 5e-4,
1980
+ onUpdate: (le) => {
1981
+ F.current = le, O({ ...v, scrollProgress: le });
1982
+ }
1983
+ });
1777
1984
  }
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
1985
  };
1791
- R(() => {
1792
- const b = N();
1793
- E(b);
1986
+ $(() => {
1987
+ const v = x();
1988
+ A(v);
1794
1989
  }, [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,
1990
+ const X = P(o);
1991
+ $(() => {
1992
+ X.current = o;
1993
+ }, [o]);
1994
+ const q = P(null);
1995
+ $(() => {
1996
+ var K;
1997
+ const v = X.current;
1998
+ if (!v || !(m != null && m.current)) return;
1999
+ const B = g.length;
2000
+ if (B <= 0) return;
2001
+ 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(
2002
+ Math.max(0, U),
2003
+ Math.max(0, B - 1)
2004
+ ), ee = ce > 0, we = ce < B - 1, me = {
2005
+ total: B,
2006
+ selectedIndex: ce,
2007
+ visibleApprox: se,
2008
+ visibleFull: ne,
2009
+ stepHalf: T,
2010
+ canPrev: ee,
2011
+ canNext: we,
2012
+ scrollProgress: le,
2013
+ viewportWidth: H,
2014
+ itemMaxWidth: V,
2015
+ gap: s
2016
+ }, xe = q.current;
2017
+ let W = !xe;
2018
+ if (!W) {
2019
+ for (const Z in me)
2020
+ if (me[Z] !== xe[Z]) {
2021
+ W = !0;
2022
+ break;
2023
+ }
2024
+ }
2025
+ W && (q.current = me, v(me));
2026
+ }, [m, g.length, U, L, s, c]), $(() => () => {
2027
+ var v;
2028
+ (v = C.current) == null || v.stop();
2029
+ }, []);
2030
+ const [ae, de] = D(0);
2031
+ Ve(() => {
2032
+ let v = c[1];
2033
+ L && v > L.scrollVisible && (v = L.scrollVisible);
2034
+ const B = (v + s) * S.length / y;
2035
+ de(B);
2036
+ }, [m, k, L]);
2037
+ const I = (v) => {
2038
+ if (!g.length) return;
2039
+ const B = re ?? U;
2040
+ switch (v.key) {
2041
+ case "ArrowLeft":
2042
+ v.preventDefault(), oe(Math.max(0, B - 1));
2043
+ break;
2044
+ case "ArrowRight":
2045
+ v.preventDefault(), oe(Math.min(g.length - 1, B + 1));
2046
+ break;
2047
+ case "Home":
2048
+ v.preventDefault(), oe(0);
2049
+ break;
2050
+ case "End":
2051
+ v.preventDefault(), oe(g.length - 1);
2052
+ break;
2053
+ case "Enter":
2054
+ case " ":
2055
+ v.preventDefault(), oe(B);
2056
+ break;
2057
+ }
2058
+ };
2059
+ return $(() => {
2060
+ const v = m.current;
2061
+ if (!v) return;
2062
+ const B = (H) => {
2063
+ const V = H.detail;
2064
+ V && typeof V.index == "number" && oe(V.index);
2065
+ };
2066
+ return v.addEventListener("udx:carousel:centerIndex", B), () => {
2067
+ v.removeEventListener(
2068
+ "udx:carousel:centerIndex",
2069
+ B
2070
+ );
2071
+ };
2072
+ }, [m, g.length]), /* @__PURE__ */ f(
2073
+ "div",
1803
2074
  {
1804
- draggable: !0,
1805
- orientation: "horizontal",
1806
- onScroll: X,
1807
- scrollSize: q,
2075
+ className: M.carousel,
2076
+ ref: m,
2077
+ role: "listbox",
2078
+ "aria-orientation": "horizontal",
2079
+ onKeyDown: I,
2080
+ ...a,
1808
2081
  children: /* @__PURE__ */ f(
1809
- H.div,
2082
+ Et,
1810
2083
  {
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
2084
+ draggable: !0,
2085
+ orientation: "horizontal",
2086
+ onScroll: E,
2087
+ scrollSize: ae,
2088
+ children: /* @__PURE__ */ f(
2089
+ "div",
2090
+ {
2091
+ className: M.track,
2092
+ ref: R,
2093
+ style: {
2094
+ gap: `${s}px`,
2095
+ translate: b,
2096
+ willChange: "translate"
2097
+ },
2098
+ children: S
2099
+ }
2100
+ )
1820
2101
  }
1821
2102
  )
1822
2103
  }
1823
- ) });
1824
- }, gt = ({
2104
+ );
2105
+ }, Pt = ({
1825
2106
  orientation: e = "horizontal",
1826
2107
  className: t,
1827
2108
  ...n
1828
2109
  }) => {
1829
- const l = qe({ orientation: e, className: t });
2110
+ const l = it({ orientation: e, className: t });
1830
2111
  return /* @__PURE__ */ f("hr", { className: l.divider, ...n });
1831
- }, _ = [];
2112
+ }, Q = [];
1832
2113
  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();
2114
+ Q.push((e + 256).toString(16).slice(1));
2115
+ function At(e, t = 0) {
2116
+ 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
2117
  }
1837
- let se;
1838
- const wt = new Uint8Array(16);
1839
- function xt() {
1840
- if (!se) {
2118
+ let ke;
2119
+ const Ht = new Uint8Array(16);
2120
+ function Vt() {
2121
+ if (!ke) {
1841
2122
  if (typeof crypto > "u" || !crypto.getRandomValues)
1842
2123
  throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
1843
- se = crypto.getRandomValues.bind(crypto);
2124
+ ke = crypto.getRandomValues.bind(crypto);
1844
2125
  }
1845
- return se(wt);
2126
+ return ke(Ht);
1846
2127
  }
1847
- const bt = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), ye = { randomUUID: bt };
1848
- function ie(e, t, n) {
2128
+ const Ft = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), Pe = { randomUUID: Ft };
2129
+ function Se(e, t, n) {
1849
2130
  var r;
1850
- if (ye.randomUUID && !e)
1851
- return ye.randomUUID();
2131
+ if (Pe.randomUUID && !e)
2132
+ return Pe.randomUUID();
1852
2133
  e = e || {};
1853
- const l = e.random ?? ((r = e.rng) == null ? void 0 : r.call(e)) ?? xt();
2134
+ const l = e.random ?? ((r = e.rng) == null ? void 0 : r.call(e)) ?? Vt();
1854
2135
  if (l.length < 16)
1855
2136
  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);
2137
+ return l[6] = l[6] & 15 | 64, l[8] = l[8] & 63 | 128, At(l);
1857
2138
  }
1858
- const Ee = ({
2139
+ const Ye = ({
1859
2140
  variant: e = "plain",
1860
2141
  buttons: t,
1861
2142
  className: n,
1862
2143
  children: l,
1863
2144
  title: r,
1864
- text: c,
1865
- position: i,
2145
+ text: i,
2146
+ position: c,
1866
2147
  targetRef: s,
1867
- ref: u,
1868
- trigger: a = ["hover", "focus"],
1869
- ...p
2148
+ ref: d,
2149
+ trigger: o = ["hover", "focus"],
2150
+ ...h
1870
2151
  }) => {
1871
2152
  if (!l && !s)
1872
2153
  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);
2154
+ Array.isArray(o) || (o = [o]), t && !Array.isArray(t) && (t = [t]);
2155
+ const y = P(null), a = s || y, [u, m] = D(null), [b] = D(Se()), [w, M] = D(!1), g = P(null);
2156
+ $(() => {
2157
+ const x = (k) => {
2158
+ m(k.detail);
1878
2159
  };
1879
- return document.addEventListener("tooltip-update", g), () => {
2160
+ return document.addEventListener("tooltip-update", x), () => {
1880
2161
  document.removeEventListener(
1881
2162
  "tooltip-update",
1882
- g
2163
+ x
1883
2164
  );
1884
2165
  };
1885
- }, []), R(() => {
1886
- L.current && clearTimeout(L.current), d ? E(d === v) : L.current = setTimeout(() => {
1887
- E(!1);
2166
+ }, []), $(() => {
2167
+ g.current && clearTimeout(g.current), u ? M(u === b) : g.current = setTimeout(() => {
2168
+ M(!1);
1888
2169
  }, 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);
2170
+ }, [u, b]);
2171
+ const R = () => {
2172
+ if (o.includes("hover")) {
2173
+ const x = new CustomEvent("tooltip-update", { detail: b });
2174
+ document.dispatchEvent(x);
1894
2175
  }
1895
2176
  }, N = () => {
1896
- if (a.includes("hover")) {
1897
- const g = new CustomEvent("tooltip-update", { detail: null });
1898
- document.dispatchEvent(g);
2177
+ if (o.includes("hover")) {
2178
+ const x = new CustomEvent("tooltip-update", { detail: null });
2179
+ document.dispatchEvent(x);
1899
2180
  }
1900
- }, I = () => {
1901
- if (a.includes("click")) {
1902
- const g = new CustomEvent("tooltip-update", {
1903
- detail: w ? null : v
2181
+ }, A = () => {
2182
+ if (o.includes("click")) {
2183
+ const x = new CustomEvent("tooltip-update", {
2184
+ detail: w ? null : b
1904
2185
  });
1905
- document.dispatchEvent(g);
2186
+ document.dispatchEvent(x);
1906
2187
  }
1907
- }, M = () => {
1908
- if (a.includes("focus")) {
1909
- const g = new CustomEvent("tooltip-update", { detail: v });
1910
- document.dispatchEvent(g);
2188
+ }, L = () => {
2189
+ if (o.includes("focus")) {
2190
+ const x = new CustomEvent("tooltip-update", { detail: b });
2191
+ document.dispatchEvent(x);
1911
2192
  }
1912
- }, V = () => {
1913
- if (a.includes("focus")) {
1914
- const g = new CustomEvent("tooltip-update", { detail: null });
1915
- document.dispatchEvent(g);
2193
+ }, O = () => {
2194
+ if (o.includes("focus")) {
2195
+ const x = new CustomEvent("tooltip-update", { detail: null });
2196
+ document.dispatchEvent(x);
1916
2197
  }
1917
2198
  };
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);
2199
+ $(() => {
2200
+ if (a != null && a.current) {
2201
+ const x = a.current;
2202
+ return x.addEventListener("mouseenter", R), x.addEventListener("mouseleave", N), x.addEventListener("click", A), x.addEventListener("focus", L), x.addEventListener("blur", O), () => {
2203
+ x.removeEventListener("mouseenter", R), x.removeEventListener("mouseleave", N), x.removeEventListener("click", A), x.removeEventListener("focus", L), x.removeEventListener("blur", O);
1923
2204
  };
1924
2205
  }
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");
2206
+ }, [a, o, b, w]);
2207
+ const F = !s && pe(l) ? be(l, { ref: y }) : l;
2208
+ if (!c && typeof window < "u" && a != null && a.current && !c) {
2209
+ const x = a.current.getBoundingClientRect(), k = window.innerWidth, U = window.innerHeight, J = x.left / k, re = x.top / U;
2210
+ 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
2211
  }
1931
- const k = nt({
2212
+ const C = gt({
1932
2213
  variant: e,
1933
2214
  buttons: t,
1934
2215
  className: n,
1935
2216
  title: r,
1936
- text: c,
1937
- position: i,
1938
- trigger: a,
2217
+ text: i,
2218
+ position: c,
2219
+ trigger: o,
1939
2220
  targetRef: s,
1940
2221
  children: l
1941
2222
  });
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,
2223
+ return /* @__PURE__ */ Y(ye, { children: [
2224
+ F,
2225
+ /* @__PURE__ */ f(ue, { children: w && /* @__PURE__ */ f(kt, { targetRef: a, children: /* @__PURE__ */ f(
2226
+ j.div,
1946
2227
  {
1947
- initial: { opacity: d ? 1 : 0 },
2228
+ initial: { opacity: u ? 1 : 0 },
1948
2229
  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,
2230
+ transition: { duration: u ? 0 : 0.3 },
2231
+ exit: { opacity: u ? 1 : 0 },
2232
+ className: C.toolTip,
2233
+ ...h,
2234
+ onMouseEnter: R,
1954
2235
  onMouseLeave: N,
1955
- children: /* @__PURE__ */ A(
1956
- H.div,
2236
+ children: /* @__PURE__ */ Y(
2237
+ j.div,
1957
2238
  {
1958
- className: k.container,
2239
+ className: C.container,
1959
2240
  layoutId: "tool-tip",
1960
2241
  transition: {
1961
2242
  type: "spring",
@@ -1963,16 +2244,16 @@ const Ee = ({
1963
2244
  damping: 20
1964
2245
  },
1965
2246
  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,
2247
+ r && /* @__PURE__ */ f("div", { className: C.subHead, children: r }),
2248
+ /* @__PURE__ */ f("div", { className: C.supportingText, children: i }),
2249
+ t && /* @__PURE__ */ f("div", { className: C.actions, children: Array.isArray(t) && t.map((x, k) => /* @__PURE__ */ f(
2250
+ Wt,
1970
2251
  {
1971
2252
  size: "small",
1972
2253
  variant: "text",
1973
- ...g
2254
+ ...x
1974
2255
  },
1975
- C
2256
+ k
1976
2257
  )) })
1977
2258
  ]
1978
2259
  }
@@ -1980,46 +2261,46 @@ const Ee = ({
1980
2261
  }
1981
2262
  ) }) })
1982
2263
  ] });
1983
- }, ge = ({
2264
+ }, Ae = ({
1984
2265
  className: e,
1985
2266
  label: t,
1986
2267
  variant: n = "primary",
1987
2268
  size: l = "medium",
1988
2269
  href: r,
1989
- type: c,
1990
- icon: i,
2270
+ type: i,
2271
+ icon: c,
1991
2272
  isExtended: s = !1,
1992
- ref: u,
1993
- transition: a,
1994
- children: p,
1995
- ...m
2273
+ ref: d,
2274
+ transition: o,
2275
+ children: h,
2276
+ ...y
1996
2277
  }) => {
1997
- if (p && (t = p), !t)
2278
+ if (h && (t = h), !t)
1998
2279
  throw new Error(
1999
2280
  "FAB component requires either a label prop or children content"
2000
2281
  );
2001
- const o = r ? "a" : "button", d = _e({
2282
+ const a = r ? "a" : "button", u = ut({
2002
2283
  href: r,
2003
- icon: i,
2284
+ icon: c,
2004
2285
  isExtended: s,
2005
2286
  label: t,
2006
2287
  size: l,
2007
2288
  variant: n,
2008
2289
  className: e,
2009
- transition: a,
2290
+ transition: o,
2010
2291
  children: t
2011
2292
  });
2012
- a = { duration: 0.3, ...a };
2013
- const y = D(null), v = u || y, w = {
2293
+ o = { duration: 0.3, ...o };
2294
+ const m = P(null), b = d || m, w = {
2014
2295
  visible: {
2015
2296
  width: "auto",
2016
2297
  marginLeft: 12,
2017
2298
  opacity: 1,
2018
2299
  transition: {
2019
- ...a,
2300
+ ...o,
2020
2301
  opacity: {
2021
- duration: a.duration / 2,
2022
- delay: a.duration - a.duration / 2
2302
+ duration: o.duration / 2,
2303
+ delay: o.duration - o.duration / 2
2023
2304
  }
2024
2305
  }
2025
2306
  },
@@ -2028,178 +2309,178 @@ const Ee = ({
2028
2309
  marginLeft: 0,
2029
2310
  opacity: 0,
2030
2311
  transition: {
2031
- ...a,
2312
+ ...o,
2032
2313
  marginLeft: {
2033
- duration: a.duration / 2,
2034
- delay: a.duration - a.duration / 2
2314
+ duration: o.duration / 2,
2315
+ delay: o.duration - o.duration / 2
2035
2316
  }
2036
2317
  }
2037
2318
  }
2038
2319
  };
2039
- return /* @__PURE__ */ A(
2040
- o,
2320
+ return /* @__PURE__ */ Y(
2321
+ a,
2041
2322
  {
2042
- ...m,
2043
- ref: v,
2323
+ ...y,
2324
+ ref: b,
2044
2325
  href: r,
2045
2326
  "aria-label": s ? void 0 : t,
2046
- className: d.fab,
2327
+ className: u.fab,
2047
2328
  children: [
2048
2329
  /* @__PURE__ */ f(
2049
- Ee,
2330
+ Ye,
2050
2331
  {
2051
2332
  trigger: s ? null : void 0,
2052
2333
  text: t,
2053
- targetRef: v
2334
+ targetRef: b
2054
2335
  }
2055
2336
  ),
2056
- /* @__PURE__ */ f("span", { className: d.stateLayer, children: /* @__PURE__ */ f(
2057
- re,
2337
+ /* @__PURE__ */ f("span", { className: u.stateLayer, children: /* @__PURE__ */ f(
2338
+ ve,
2058
2339
  {
2059
- colorName: h({
2340
+ colorName: p({
2060
2341
  primary: n == "surface",
2061
2342
  "on-primary-container": n == "primary",
2062
2343
  "on-secondary-container": n == "secondary",
2063
2344
  "on-tertiary-container": n == "tertiary"
2064
2345
  }),
2065
- triggerRef: v
2346
+ triggerRef: b
2066
2347
  }
2067
2348
  ) }),
2068
- /* @__PURE__ */ f(Z, { icon: i, className: d.icon }),
2069
- /* @__PURE__ */ f(Q, { children: s && /* @__PURE__ */ f(
2070
- H.span,
2349
+ /* @__PURE__ */ f(ie, { icon: c, className: u.icon }),
2350
+ /* @__PURE__ */ f(ue, { children: s && /* @__PURE__ */ f(
2351
+ j.span,
2071
2352
  {
2072
2353
  variants: w,
2073
2354
  initial: "hidden",
2074
2355
  animate: "visible",
2075
2356
  exit: "hidden",
2076
- className: d.label,
2357
+ className: u.label,
2077
2358
  children: t
2078
2359
  }
2079
2360
  ) })
2080
2361
  ]
2081
2362
  }
2082
2363
  );
2083
- }, ue = ({
2364
+ }, $e = ({
2084
2365
  variant: e = "standard",
2085
2366
  href: t,
2086
2367
  disabled: n = !1,
2087
2368
  type: l = "button",
2088
2369
  title: r,
2089
- label: c,
2090
- onToggle: i,
2370
+ label: i,
2371
+ onToggle: c,
2091
2372
  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",
2373
+ onClick: d,
2374
+ icon: o,
2375
+ size: h = "medium",
2376
+ iconSelected: y,
2377
+ className: a,
2378
+ ref: u,
2379
+ width: m = "default",
2380
+ shape: b = "rounded",
2100
2381
  allowShapeTransformation: w = !0,
2101
- transition: E,
2102
- children: L,
2103
- ...B
2382
+ transition: M,
2383
+ children: g,
2384
+ ...R
2104
2385
  }) => {
2105
- if (L && (c = L), !c)
2386
+ if (g && (i = g), !i)
2106
2387
  throw new Error(
2107
2388
  "IconButton component requires either a label prop or children content to provide an accessible aria-label"
2108
2389
  );
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);
2390
+ r || (r = i);
2391
+ const [N, A] = te.useState(s);
2392
+ let L;
2393
+ c ? c && (L = (k) => {
2394
+ n && k.preventDefault(), A(!N), c(!!N);
2395
+ }, o = N && y || o) : L = (k) => {
2396
+ n && k.preventDefault(), d && d(k);
2397
+ }, $(() => {
2398
+ A(s);
2118
2399
  }, [s]);
2119
- const V = t ? "a" : "button", W = Ke({
2120
- transition: E,
2121
- shape: v,
2400
+ const O = t ? "a" : "button", F = dt({
2401
+ transition: M,
2402
+ shape: b,
2122
2403
  allowShapeTransformation: w,
2123
- width: y,
2404
+ width: m,
2124
2405
  href: t,
2125
2406
  activated: N,
2126
- label: c,
2127
- iconSelected: m,
2407
+ label: i,
2408
+ iconSelected: y,
2128
2409
  isActive: N,
2129
- onToggle: i,
2410
+ onToggle: c,
2130
2411
  disabled: n,
2131
- icon: a,
2412
+ icon: o,
2132
2413
  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,
2414
+ className: a,
2415
+ size: h,
2416
+ children: i,
2417
+ ...R
2418
+ }), C = P(null), x = u || C;
2419
+ return M = { duration: 0.3, ...M }, /* @__PURE__ */ Y(
2420
+ O,
2140
2421
  {
2141
2422
  disabled: n,
2142
2423
  href: t,
2143
- style: { transition: E.duration + "s" },
2144
- className: W.iconButton,
2145
- "aria-label": c,
2146
- ...B,
2424
+ style: { transition: M.duration + "s" },
2425
+ className: F.iconButton,
2426
+ "aria-label": i,
2427
+ ...R,
2147
2428
  title: void 0,
2148
- onClick: M,
2149
- ref: g,
2429
+ onClick: L,
2430
+ ref: x,
2150
2431
  children: [
2151
2432
  /* @__PURE__ */ f(
2152
- Ee,
2433
+ Ye,
2153
2434
  {
2154
- targetRef: g,
2435
+ targetRef: x,
2155
2436
  trigger: n ? null : void 0,
2156
2437
  text: r
2157
2438
  }
2158
2439
  ),
2159
- /* @__PURE__ */ f("div", { className: W.touchTarget }),
2440
+ /* @__PURE__ */ f("div", { className: F.touchTarget }),
2160
2441
  /* @__PURE__ */ f(
2161
2442
  "div",
2162
2443
  {
2163
- className: W.stateLayer,
2164
- style: { transition: E.duration + "s" },
2444
+ className: F.stateLayer,
2445
+ style: { transition: M.duration + "s" },
2165
2446
  children: !n && /* @__PURE__ */ f(
2166
- re,
2447
+ ve,
2167
2448
  {
2168
- colorName: h(
2449
+ colorName: p(
2169
2450
  e === "standard" && {
2170
2451
  "on-surface-variant": !N,
2171
2452
  primary: N
2172
2453
  },
2173
2454
  e === "filled" && {
2174
- primary: !N && !!i,
2175
- "inverse-on-surface": N || !i
2455
+ primary: !N && !!c,
2456
+ "inverse-on-surface": N || !c
2176
2457
  },
2177
2458
  e === "tonal" && {
2178
- "on-surface-variant": !N && !!i,
2179
- "on-secondary-container": N || !i
2459
+ "on-surface-variant": !N && !!c,
2460
+ "on-secondary-container": N || !c
2180
2461
  },
2181
2462
  e === "outlined" && {
2182
2463
  "on-surface-variant": !N,
2183
2464
  "on-primary": N
2184
2465
  }
2185
2466
  ),
2186
- triggerRef: g
2467
+ triggerRef: x
2187
2468
  }
2188
2469
  )
2189
2470
  }
2190
2471
  ),
2191
- a && /* @__PURE__ */ f(Z, { icon: a, className: W.icon })
2472
+ o && /* @__PURE__ */ f(ie, { icon: o, className: F.icon })
2192
2473
  ]
2193
2474
  }
2194
2475
  );
2195
- }, _t = ({
2476
+ }, un = ({
2196
2477
  className: e,
2197
2478
  valueFormatter: t,
2198
2479
  step: n = 10,
2199
2480
  name: l,
2200
2481
  value: r = 0,
2201
- min: c = 0,
2202
- max: i = 100,
2482
+ min: i = 0,
2483
+ max: c = 100,
2203
2484
  marks: s = [
2204
2485
  {
2205
2486
  value: 0,
@@ -2210,99 +2491,99 @@ const Ee = ({
2210
2491
  label: "100"
2211
2492
  }
2212
2493
  ],
2213
- ref: u,
2214
- onChange: a,
2215
- ...p
2494
+ ref: d,
2495
+ onChange: o,
2496
+ ...h
2216
2497
  }) => {
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);
2498
+ const y = (S) => {
2499
+ const E = u(), X = a();
2500
+ return S === 1 / 0 ? 100 : S === -1 / 0 ? 0 : (S - E) / (X - E) * 100;
2501
+ }, 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) => {
2502
+ const E = u(!1);
2503
+ return (a(!1) - E) * S / 100 + E;
2504
+ }, [b, w] = D(!1), M = P(null), g = d || M, [R, N] = D(r), [A, L] = D(y(r)), [O, F] = D(!1), C = (S) => {
2505
+ F(!0), w(!0), U(S);
2506
+ }, x = () => {
2507
+ F(!1), w(!1);
2227
2508
  };
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({
2509
+ $(() => (O ? (window.addEventListener("mouseup", x), window.addEventListener("mousemove", U), window.addEventListener("touchend", x), window.addEventListener("touchmove", U)) : (window.removeEventListener("mouseup", x), window.removeEventListener("mousemove", U), window.removeEventListener("touchend", x), window.removeEventListener("touchmove", U)), () => {
2510
+ window.removeEventListener("mouseup", x), window.removeEventListener("mousemove", U), window.removeEventListener("touchend", x), window.removeEventListener("touchmove", U);
2511
+ }), [O]);
2512
+ const k = ht({
2232
2513
  className: e,
2233
- isChanging: v,
2514
+ isChanging: b,
2234
2515
  marks: s,
2235
- max: i,
2236
- min: c,
2516
+ max: c,
2517
+ min: i,
2237
2518
  name: l,
2238
2519
  step: n,
2239
- value: B,
2520
+ value: R,
2240
2521
  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: $ });
2522
+ onChange: o
2523
+ }), U = (S) => {
2524
+ const E = g == null ? void 0 : g.current;
2525
+ if (E) {
2526
+ const X = E.getBoundingClientRect().left, ae = ((S.type === "touchmove" || S.type === "touchstart" ? S.touches[0].clientX : S.clientX) - X) / E.offsetWidth * 100;
2527
+ J({ percent: ae });
2247
2528
  }
2248
- }, q = ({
2249
- pourcent: b,
2250
- value: x
2529
+ }, J = ({
2530
+ percent: S,
2531
+ value: E
2251
2532
  }) => {
2252
- if (b) {
2253
- if (b >= 100) {
2254
- N(o(!0)), M(100);
2533
+ if (S) {
2534
+ if (S >= 100) {
2535
+ N(a(!0)), L(100);
2255
2536
  return;
2256
2537
  }
2257
- if (b <= 0) {
2258
- N(d(!0)), M(0);
2538
+ if (S <= 0) {
2539
+ N(u(!0)), L(0);
2259
2540
  return;
2260
2541
  }
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);
2542
+ E = m(S), E == u() && (E = u(!0)), E == a() && (E = a(!0));
2543
+ } else if (E != null) {
2544
+ if (E >= a()) {
2545
+ N(a(!0)), L(100);
2265
2546
  return;
2266
2547
  }
2267
- if (x <= d()) {
2268
- N(d(!0)), M(0);
2548
+ if (E <= u()) {
2549
+ N(u(!0)), L(0);
2269
2550
  return;
2270
2551
  }
2271
- b = m(x);
2552
+ S = y(E);
2272
2553
  } else
2273
2554
  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);
2555
+ n != null ? E = Math.round((E - u()) / n) * n + u() : s && (E = s.reduce((X, q, ae) => {
2556
+ 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;
2557
+ return de = Math.abs(de - E), I = Math.abs(I - E), de < I ? q : X;
2558
+ }).value), E >= a() && (E = a(!0)), E <= u() && (E = u(!0)), S = y(E), N(E), L(S), o && o(E);
2559
+ }, [re, _] = D(0);
2560
+ return $(() => {
2561
+ const S = () => {
2562
+ g.current && _(g.current.offsetWidth);
2282
2563
  };
2283
- return b(), window.addEventListener("resize", b), () => {
2284
- window.removeEventListener("resize", b);
2564
+ return S(), window.addEventListener("resize", S), () => {
2565
+ window.removeEventListener("resize", S);
2285
2566
  };
2286
- }, []), /* @__PURE__ */ A(
2567
+ }, []), /* @__PURE__ */ Y(
2287
2568
  "div",
2288
2569
  {
2289
2570
  tabIndex: 0,
2290
- onKeyDown: (b) => {
2291
- switch (b.key) {
2571
+ onKeyDown: (S) => {
2572
+ switch (S.key) {
2292
2573
  case "ArrowRight":
2293
2574
  if (n)
2294
- q({ value: B + n });
2575
+ J({ value: R + n });
2295
2576
  else if (s) {
2296
- const x = s.find((P) => P.value > B);
2297
- x && q({ value: x.value });
2577
+ const E = s.find((X) => X.value > R);
2578
+ E && J({ value: E.value });
2298
2579
  }
2299
2580
  break;
2300
2581
  case "ArrowLeft":
2301
2582
  if (n)
2302
- q({ value: B - n });
2583
+ J({ value: R - n });
2303
2584
  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 });
2585
+ const E = s.slice(0).reverse().find((X, q, ae) => R === 1 / 0 ? q === 1 : X.value < R);
2586
+ E && J({ value: E.value });
2306
2587
  }
2307
2588
  break;
2308
2589
  default:
@@ -2310,30 +2591,24 @@ const Ee = ({
2310
2591
  }
2311
2592
  },
2312
2593
  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,
2594
+ "aria-valuemin": u(!0),
2595
+ "aria-valuemax": a(!0),
2596
+ "aria-valuenow": R,
2597
+ "aria-valuetext": R.toString(),
2598
+ className: k.slider,
2599
+ onMouseDown: C,
2600
+ onClick: U,
2601
+ ref: g,
2602
+ onTouchStart: C,
2603
+ onDragStart: (S) => S.preventDefault(),
2604
+ ...h,
2324
2605
  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,
2606
+ /* @__PURE__ */ f("input", { type: "hidden", name: l, value: R }),
2607
+ /* @__PURE__ */ f("div", { className: k.activeTrack, style: { flex: A / 100 } }),
2608
+ /* @__PURE__ */ f("div", { className: k.handle, children: /* @__PURE__ */ f(ue, { children: b && /* @__PURE__ */ f(
2609
+ j.div,
2335
2610
  {
2336
- className: C.valueIndicator,
2611
+ className: k.valueIndicator,
2337
2612
  initial: "hidden",
2338
2613
  animate: "visible",
2339
2614
  exit: "hidden",
@@ -2347,35 +2622,35 @@ const Ee = ({
2347
2622
  hidden: { opacity: 1, scale: 0 }
2348
2623
  },
2349
2624
  transition: { duration: 0.1 },
2350
- children: t ? t(B) : B
2625
+ children: t ? t(R) : R
2351
2626
  }
2352
2627
  ) }) }),
2353
2628
  /* @__PURE__ */ f(
2354
2629
  "div",
2355
2630
  {
2356
- className: C.inactiveTrack,
2357
- style: { flex: 1 - I / 100 }
2631
+ className: k.inactiveTrack,
2632
+ style: { flex: 1 - A / 100 }
2358
2633
  }
2359
2634
  ),
2360
2635
  /* @__PURE__ */ f(
2361
2636
  "div",
2362
2637
  {
2363
2638
  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(
2639
+ children: s && s.map((S, E) => {
2640
+ let X = null;
2641
+ const q = (b ? 9 : 10) / re * 100, ae = y(S.value);
2642
+ return ae <= A - q ? X = !0 : ae >= A + q && (X = !1), /* @__PURE__ */ f(
2368
2643
  "div",
2369
2644
  {
2370
- className: h(C.dot, {
2371
- "bg-primary-container": P != null && P,
2372
- "bg-primary": P != null && !P
2645
+ className: p(k.dot, {
2646
+ "bg-primary-container": X != null && X,
2647
+ "bg-primary": X != null && !X
2373
2648
  }),
2374
2649
  style: {
2375
- left: `${m(b.value)}%`
2650
+ left: `${y(S.value)}%`
2376
2651
  }
2377
2652
  },
2378
- x
2653
+ E
2379
2654
  );
2380
2655
  })
2381
2656
  }
@@ -2389,156 +2664,156 @@ const Ee = ({
2389
2664
  * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
2390
2665
  * Copyright 2025 Fonticons, Inc.
2391
2666
  */
2392
- var Lt = {
2667
+ var Xt = {
2393
2668
  prefix: "fas",
2394
2669
  iconName: "circle-exclamation",
2395
2670
  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 = {
2671
+ }, Ce = {
2397
2672
  prefix: "fas",
2398
2673
  iconName: "xmark",
2399
2674
  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 = {
2675
+ }, Ot = {
2401
2676
  prefix: "fas",
2402
2677
  iconName: "bars",
2403
2678
  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
2679
  };
2405
- const Kt = ({
2680
+ const dn = ({
2406
2681
  variant: e = "standard",
2407
2682
  className: t,
2408
2683
  children: n,
2409
2684
  title: l,
2410
2685
  position: r = "right",
2411
- extended: c,
2412
- divider: i,
2686
+ extended: i,
2687
+ divider: c,
2413
2688
  onExtendedChange: s,
2414
- closeIcon: u = de,
2415
- transition: a,
2416
- ...p
2689
+ closeIcon: d = Ce,
2690
+ transition: o,
2691
+ ...h
2417
2692
  }) => {
2418
- a = { duration: 0.3, ...a };
2419
- const [m, o] = S(c ?? !0), d = Je({
2420
- transition: a,
2693
+ o = { duration: 0.3, ...o };
2694
+ const [y, a] = D(i ?? !0), u = mt({
2695
+ transition: o,
2421
2696
  title: l,
2422
2697
  position: r,
2423
- closeIcon: u,
2698
+ closeIcon: d,
2424
2699
  className: t,
2425
2700
  children: n,
2426
2701
  onExtendedChange: s,
2427
- divider: i,
2428
- isExtended: m,
2429
- extended: m,
2702
+ divider: c,
2703
+ isExtended: y,
2704
+ extended: y,
2430
2705
  variant: e
2431
2706
  });
2432
- R(() => {
2433
- s == null || s(m ?? !1);
2434
- }, [m]), R(() => {
2435
- c != null && o(c);
2436
- }, [c]);
2437
- const y = {
2707
+ $(() => {
2708
+ s == null || s(y ?? !1);
2709
+ }, [y]), $(() => {
2710
+ i != null && a(i);
2711
+ }, [i]);
2712
+ const m = {
2438
2713
  close: {
2439
2714
  width: 0
2440
2715
  },
2441
2716
  open: {
2442
2717
  width: "auto"
2443
2718
  }
2444
- }, v = () => /* @__PURE__ */ A(te, { children: [
2445
- /* @__PURE__ */ f(Q, { children: e == "modal" && m && /* @__PURE__ */ f(
2446
- H.div,
2719
+ }, b = () => /* @__PURE__ */ Y(ye, { children: [
2720
+ /* @__PURE__ */ f(ue, { children: e == "modal" && y && /* @__PURE__ */ f(
2721
+ j.div,
2447
2722
  {
2448
2723
  initial: { opacity: 0 },
2449
2724
  animate: { opacity: 1 },
2450
2725
  exit: { opacity: 0 },
2451
- transition: a,
2452
- onClick: () => o(!1),
2453
- className: d.overlay
2726
+ transition: o,
2727
+ onClick: () => a(!1),
2728
+ className: u.overlay
2454
2729
  }
2455
2730
  ) }),
2456
- /* @__PURE__ */ f(Q, { children: m && /* @__PURE__ */ A(
2731
+ /* @__PURE__ */ f(ue, { children: y && /* @__PURE__ */ Y(
2457
2732
  "div",
2458
2733
  {
2459
- ...p,
2460
- className: d.slideSheet,
2461
- style: { transition: a.duration + "s" },
2734
+ ...h,
2735
+ className: u.slideSheet,
2736
+ style: { transition: o.duration + "s" },
2462
2737
  children: [
2463
- /* @__PURE__ */ A(
2464
- H.div,
2738
+ /* @__PURE__ */ Y(
2739
+ j.div,
2465
2740
  {
2466
- variants: y,
2467
- initial: c === !1 ? "open" : "close",
2741
+ variants: m,
2742
+ initial: i === !1 ? "open" : "close",
2468
2743
  animate: "open",
2469
2744
  exit: "close",
2470
- className: d.container,
2745
+ className: u.container,
2471
2746
  children: [
2472
- /* @__PURE__ */ A("div", { className: d.header, children: [
2473
- l && /* @__PURE__ */ f("p", { className: d.title, children: l }),
2747
+ /* @__PURE__ */ Y("div", { className: u.header, children: [
2748
+ l && /* @__PURE__ */ f("p", { className: u.title, children: l }),
2474
2749
  /* @__PURE__ */ f(
2475
- ue,
2750
+ $e,
2476
2751
  {
2477
2752
  size: "small",
2478
2753
  label: "close",
2479
- icon: u,
2480
- onClick: () => o(!1),
2481
- className: d.closeButton
2754
+ icon: d,
2755
+ onClick: () => a(!1),
2756
+ className: u.closeButton
2482
2757
  }
2483
2758
  )
2484
2759
  ] }),
2485
2760
  /* @__PURE__ */ f(
2486
2761
  "div",
2487
2762
  {
2488
- className: d.content,
2489
- style: { transition: a.duration + "s" },
2763
+ className: u.content,
2764
+ style: { transition: o.duration + "s" },
2490
2765
  children: n
2491
2766
  }
2492
2767
  )
2493
2768
  ]
2494
2769
  }
2495
2770
  ),
2496
- (i == null && e == "standard" ? !0 : i) && /* @__PURE__ */ f(gt, { className: d.divider, orientation: "vertical" })
2771
+ (c == null && e == "standard" ? !0 : c) && /* @__PURE__ */ f(Pt, { className: u.divider, orientation: "vertical" })
2497
2772
  ]
2498
2773
  }
2499
2774
  ) })
2500
2775
  ] });
2501
- return e == "modal" ? xe(v(), document.body) : v();
2502
- }, Gt = ({
2776
+ return e == "modal" ? Fe(b(), document.body) : b();
2777
+ }, fn = ({
2503
2778
  message: e,
2504
2779
  className: t,
2505
2780
  duration: n,
2506
- closeIcon: l = de,
2781
+ closeIcon: l = Ce,
2507
2782
  onClose: r,
2508
- ...c
2783
+ ...i
2509
2784
  }) => {
2510
- const [i, s] = S(!0), u = Qe({
2785
+ const [c, s] = D(!0), d = pt({
2511
2786
  className: t,
2512
2787
  closeIcon: l,
2513
2788
  duration: n,
2514
- isVisible: i,
2789
+ isVisible: c,
2515
2790
  onClose: r,
2516
2791
  message: e
2517
2792
  });
2518
- R(() => {
2793
+ $(() => {
2519
2794
  n && setTimeout(() => {
2520
- a();
2795
+ o();
2521
2796
  }, n);
2522
2797
  }, [n]);
2523
- const a = () => {
2798
+ const o = () => {
2524
2799
  s(!1), r == null || r();
2525
2800
  };
2526
- return /* @__PURE__ */ f(Q, { children: i && /* @__PURE__ */ f(
2527
- H.div,
2801
+ return /* @__PURE__ */ f(ue, { children: c && /* @__PURE__ */ f(
2802
+ j.div,
2528
2803
  {
2529
2804
  initial: { height: 0 },
2530
2805
  animate: { height: "auto" },
2531
2806
  exit: { height: 0 },
2532
2807
  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 }),
2808
+ className: d.snackbar,
2809
+ ...i,
2810
+ children: /* @__PURE__ */ Y("div", { className: d.container, children: [
2811
+ /* @__PURE__ */ f("p", { className: d.supportingText, children: e }),
2537
2812
  /* @__PURE__ */ f(
2538
- ue,
2813
+ $e,
2539
2814
  {
2540
- onClick: () => a(),
2541
- className: u.icon,
2815
+ onClick: () => o(),
2816
+ className: d.icon,
2542
2817
  icon: l,
2543
2818
  label: "close the snackbar"
2544
2819
  }
@@ -2546,144 +2821,144 @@ const Kt = ({
2546
2821
  ] })
2547
2822
  }
2548
2823
  ) });
2549
- }, Jt = ({
2824
+ }, mn = ({
2550
2825
  selected: e = !1,
2551
2826
  className: t,
2552
2827
  activeIcon: n,
2553
2828
  disabled: l = !1,
2554
2829
  inactiveIcon: r,
2555
- onChange: c,
2556
- onClick: i,
2830
+ onChange: i,
2831
+ onClick: c,
2557
2832
  onKeyDown: s,
2558
- ref: u,
2559
- ...a
2833
+ ref: d,
2834
+ ...o
2560
2835
  }) => {
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({
2836
+ const [h, y] = D(e), a = (g) => {
2837
+ l || (m(), c && c(g));
2838
+ }, u = (g) => {
2839
+ l || ((g.key === " " || g.key === "Enter") && (g.preventDefault(), m()), s && s(g));
2840
+ }, m = () => {
2841
+ y(!h), i == null || i(!h);
2842
+ }, b = yt({
2568
2843
  className: t,
2569
- isSelected: p,
2844
+ isSelected: h,
2570
2845
  activeIcon: n,
2571
2846
  inactiveIcon: r,
2572
2847
  disabled: l,
2573
- selected: p,
2574
- onChange: c
2575
- }), w = D(null), E = u || w;
2576
- return /* @__PURE__ */ A(
2577
- H.div,
2848
+ selected: h,
2849
+ onChange: i
2850
+ }), w = P(null), M = d || w;
2851
+ return /* @__PURE__ */ Y(
2852
+ j.div,
2578
2853
  {
2579
2854
  role: "switch",
2580
- "aria-checked": p,
2855
+ "aria-checked": h,
2581
2856
  tabIndex: l ? -1 : 0,
2582
- onKeyDown: d,
2583
- onClick: o,
2584
- ref: E,
2585
- className: v.switch,
2586
- ...a,
2857
+ onKeyDown: u,
2858
+ onClick: a,
2859
+ ref: M,
2860
+ className: b.switch,
2861
+ ...o,
2587
2862
  children: [
2588
- /* @__PURE__ */ f("input", { type: "hidden", value: p ? "1" : "0" }),
2589
- /* @__PURE__ */ A(
2590
- H.div,
2863
+ /* @__PURE__ */ f("input", { type: "hidden", value: h ? "1" : "0" }),
2864
+ /* @__PURE__ */ Y(
2865
+ j.div,
2591
2866
  {
2592
2867
  layout: !0,
2593
- style: { translate: p ? "50%" : "-50%" },
2868
+ style: { translate: h ? "50%" : "-50%" },
2594
2869
  transition: {
2595
2870
  type: "spring",
2596
2871
  stiffness: 700,
2597
2872
  damping: 30
2598
2873
  },
2599
- className: v.handleContainer,
2874
+ className: b.handleContainer,
2600
2875
  children: [
2601
- /* @__PURE__ */ f("div", { className: v.handle, children: (p ? n : r) && /* @__PURE__ */ f(
2602
- Z,
2876
+ /* @__PURE__ */ f("div", { className: b.handle, children: (h ? n : r) && /* @__PURE__ */ f(
2877
+ ie,
2603
2878
  {
2604
- className: v.icon,
2605
- icon: p ? n : r
2879
+ className: b.icon,
2880
+ icon: h ? n : r
2606
2881
  }
2607
2882
  ) }),
2608
- /* @__PURE__ */ f("div", { className: v.handleStateLayer })
2883
+ /* @__PURE__ */ f("div", { className: b.handleStateLayer })
2609
2884
  ]
2610
2885
  }
2611
2886
  )
2612
2887
  ]
2613
2888
  }
2614
2889
  );
2615
- }, Et = ({
2890
+ }, Ut = ({
2616
2891
  className: e,
2617
2892
  onClick: t,
2618
2893
  label: n,
2619
2894
  variant: l = "primary",
2620
2895
  href: r,
2621
- icon: c,
2622
- selectedTab: i,
2896
+ icon: i,
2897
+ selectedTab: c,
2623
2898
  setSelectedTab: s,
2624
- tabsId: u,
2625
- index: a,
2626
- onTabSelected: p,
2627
- scrollable: m = !1,
2628
- selected: o = !1,
2629
- ref: d,
2630
- ...y
2899
+ tabsId: d,
2900
+ index: o,
2901
+ onTabSelected: h,
2902
+ scrollable: y = !1,
2903
+ selected: a = !1,
2904
+ ref: u,
2905
+ ...m
2631
2906
  }) => {
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({
2907
+ const b = P(null), w = u || b, [M, g] = D(a);
2908
+ $(() => {
2909
+ a && c == null ? g(!0) : g(c == o && o != null);
2910
+ }, [c]), $(() => {
2911
+ c == o && h && h({
2637
2912
  ref: w,
2638
- index: a || 0,
2913
+ index: o || 0,
2639
2914
  label: n,
2640
- icon: c
2915
+ icon: i
2641
2916
  });
2642
- }, [i]);
2643
- const B = r ? "a" : "button", N = (M) => {
2644
- s && s(a ?? null), t && t(M);
2645
- }, I = Te({
2917
+ }, [c]);
2918
+ const R = r ? "a" : "button", N = (L) => {
2919
+ s && s(o ?? null), t && t(L);
2920
+ }, A = xt({
2646
2921
  className: e,
2647
- onTabSelected: p,
2648
- scrollable: m,
2649
- selectedTab: i,
2650
- index: a,
2651
- tabsId: u,
2652
- selected: E,
2922
+ onTabSelected: h,
2923
+ scrollable: y,
2924
+ selectedTab: c,
2925
+ index: o,
2926
+ tabsId: d,
2927
+ selected: M,
2653
2928
  variant: l,
2654
- icon: c,
2929
+ icon: i,
2655
2930
  label: n,
2656
- isSelected: E,
2931
+ isSelected: M,
2657
2932
  setSelectedTab: s,
2658
2933
  href: r
2659
2934
  });
2660
- return /* @__PURE__ */ A(
2661
- B,
2935
+ return /* @__PURE__ */ Y(
2936
+ R,
2662
2937
  {
2663
- ...y,
2938
+ ...m,
2664
2939
  role: "tab",
2665
- "aria-selected": E,
2940
+ "aria-selected": M,
2666
2941
  ref: w,
2667
2942
  href: r,
2668
- className: I.tab,
2943
+ className: A.tab,
2669
2944
  onClick: N,
2670
- ...y,
2945
+ ...m,
2671
2946
  children: [
2672
- /* @__PURE__ */ f("span", { className: I.stateLayer, children: /* @__PURE__ */ f(
2673
- re,
2947
+ /* @__PURE__ */ f("span", { className: A.stateLayer, children: /* @__PURE__ */ f(
2948
+ ve,
2674
2949
  {
2675
- colorName: l === "primary" && E ? "primary" : "on-surface",
2950
+ colorName: l === "primary" && M ? "primary" : "on-surface",
2676
2951
  triggerRef: w
2677
2952
  }
2678
2953
  ) }),
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,
2954
+ /* @__PURE__ */ Y("span", { className: A.content, children: [
2955
+ i && /* @__PURE__ */ f(ie, { icon: i, className: A.icon }),
2956
+ /* @__PURE__ */ f("span", { className: A.label, children: n }),
2957
+ M && /* @__PURE__ */ f(
2958
+ j.span,
2684
2959
  {
2685
- layoutId: `underline-${u}`,
2686
- className: I.underline,
2960
+ layoutId: `underline-${d}`,
2961
+ className: A.underline,
2687
2962
  transition: { duration: 0.3 }
2688
2963
  }
2689
2964
  )
@@ -2691,230 +2966,230 @@ const Kt = ({
2691
2966
  ]
2692
2967
  }
2693
2968
  );
2694
- }, Zt = ({
2969
+ }, hn = ({
2695
2970
  variant: e = "primary",
2696
2971
  onTabSelected: t,
2697
2972
  children: n,
2698
2973
  className: l,
2699
2974
  selectedTab: r,
2700
- setSelectedTab: c,
2701
- scrollable: i = !1
2975
+ setSelectedTab: i,
2976
+ scrollable: c = !1
2702
2977
  }) => {
2703
- const [s, u] = S(
2978
+ const [s, d] = D(
2704
2979
  null
2705
2980
  );
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" });
2981
+ let o;
2982
+ r == 0 || r != null ? o = r : o = s;
2983
+ const h = i || d, y = te.Children.toArray(n).filter(
2984
+ (w) => te.isValidElement(w) && w.type === Ut
2985
+ ), a = te.useRef(null), u = (w) => {
2986
+ if (t == null || t(w), c) {
2987
+ const M = a.current, g = w.ref.current;
2988
+ if (M && g) {
2989
+ const R = g.offsetLeft + g.offsetWidth / 2 - M.offsetWidth / 2;
2990
+ M.scrollTo({ left: R, behavior: "smooth" });
2716
2991
  }
2717
2992
  }
2718
- }, y = ke(() => ie(), []), v = et({
2993
+ }, m = qe(() => Se(), []), b = vt({
2719
2994
  children: n,
2720
2995
  onTabSelected: t,
2721
- scrollable: i,
2722
- selectedTab: a,
2723
- setSelectedTab: p,
2996
+ scrollable: c,
2997
+ selectedTab: o,
2998
+ setSelectedTab: h,
2724
2999
  className: l,
2725
3000
  variant: e
2726
3001
  });
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,
3002
+ return /* @__PURE__ */ f("div", { ref: a, role: "tablist", className: b.tabs, children: y.map((w, M) => te.cloneElement(w, {
3003
+ key: M,
3004
+ index: M,
2730
3005
  variant: e,
2731
- selectedTab: a,
2732
- setSelectedTab: p,
2733
- tabsId: y,
2734
- onTabSelected: d,
2735
- scrollable: i
3006
+ selectedTab: o,
3007
+ setSelectedTab: h,
3008
+ tabsId: m,
3009
+ onTabSelected: u,
3010
+ scrollable: c
2736
3011
  })) });
2737
- }, Qt = ({
3012
+ }, pn = ({
2738
3013
  variant: e = "filled",
2739
3014
  disabled: t = !1,
2740
3015
  errorText: n,
2741
3016
  placeholder: l,
2742
3017
  suffix: r,
2743
- name: c,
2744
- label: i,
3018
+ name: i,
3019
+ label: c,
2745
3020
  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,
3021
+ supportingText: d,
3022
+ trailingIcon: o,
3023
+ leadingIcon: h,
3024
+ type: y = "text",
3025
+ textLine: a = "singleLine",
3026
+ autoComplete: u = "on",
3027
+ onChange: m,
3028
+ value: b,
2754
3029
  showSupportingText: w = !1,
2755
- ...E
3030
+ ...M
2756
3031
  }) => {
2757
- const [L, B] = S(v ?? ""), [N, I] = S(!1), [M, V] = S(!1), [W, k] = S(
3032
+ const [g, R] = D(b ?? ""), [N, A] = D(!1), [L, O] = D(!1), [F, C] = D(
2758
3033
  w
2759
3034
  );
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);
3035
+ $(() => {
3036
+ R(b ?? "");
3037
+ }, [b]), $(() => {
3038
+ n != null && n.length ? O(!0) : O(!1);
3039
+ }, [n]), $(() => {
3040
+ w ? C(w) : d != null && d.length ? C(!0) : C(!1);
3041
+ }, [F, d]), $(() => {
3042
+ N && O(!1);
2768
3043
  }, [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,
3044
+ const x = te.useRef(null), k = () => {
3045
+ x.current && !N && x.current.focus();
3046
+ }, U = () => {
3047
+ A(!0);
3048
+ }, J = (X) => {
3049
+ const q = X.target.value;
3050
+ R(q), O(!1), typeof m == "function" && m(q);
3051
+ }, re = () => {
3052
+ A(!1);
3053
+ }, _ = wt({
3054
+ showSupportingText: F,
2780
3055
  isFocused: N,
2781
- showErrorIcon: M,
3056
+ showErrorIcon: L,
2782
3057
  disabled: t,
2783
- name: c,
2784
- label: i,
2785
- autoComplete: d,
3058
+ name: i,
3059
+ label: c,
3060
+ autoComplete: u,
2786
3061
  className: s,
2787
- onChange: y,
3062
+ onChange: m,
2788
3063
  placeholder: l,
2789
- supportingText: u,
2790
- type: m,
2791
- leadingIcon: p,
2792
- trailingIcon: a,
3064
+ supportingText: d,
3065
+ type: y,
3066
+ leadingIcon: h,
3067
+ trailingIcon: o,
2793
3068
  variant: e,
2794
3069
  errorText: n,
2795
- value: L,
3070
+ value: g,
2796
3071
  suffix: r,
2797
- textLine: o
2798
- }), [z] = S(ie());
2799
- let b, x;
2800
- switch (o) {
3072
+ textLine: a
3073
+ }), [oe] = D(Se());
3074
+ let S, E;
3075
+ switch (a) {
2801
3076
  case "multiLine":
2802
- x = Ve, b = {};
3077
+ E = tt, S = {};
2803
3078
  break;
2804
3079
  case "textAreas":
2805
- x = "textarea", b = {};
3080
+ E = "textarea", S = {};
2806
3081
  break;
2807
3082
  case "singleLine":
2808
3083
  default:
2809
- x = "input", b = { type: m };
3084
+ E = "input", S = { type: y };
2810
3085
  break;
2811
3086
  }
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,
3087
+ return /* @__PURE__ */ Y("div", { className: _.textField, ...M, children: [
3088
+ /* @__PURE__ */ Y("fieldset", { onClick: k, className: _.content, children: [
3089
+ /* @__PURE__ */ f("div", { className: _.stateLayer }),
3090
+ h && /* @__PURE__ */ f("div", { className: _.leadingIcon, children: te.isValidElement(h) ? h : /* @__PURE__ */ f(ie, { className: "w-5 h-5", icon: h }) }),
3091
+ !(!N && !g.length || e == "filled") && /* @__PURE__ */ f(
3092
+ j.legend,
2818
3093
  {
2819
3094
  variants: {
2820
3095
  hidden: { width: 0, padding: 0 },
2821
3096
  visible: { width: "auto", padding: "0 8px" }
2822
3097
  },
2823
3098
  initial: "hidden",
2824
- animate: !N && !L.length ? "hidden" : "visible",
3099
+ animate: !N && !g.length ? "hidden" : "visible",
2825
3100
  className: "max-w-full ml-2 px-2 text-body-small h-0",
2826
3101
  transition: { duration: 0.2 },
2827
3102
  children: /* @__PURE__ */ f("span", { className: "transform inline-flex -translate-y-1/2", children: /* @__PURE__ */ f(
2828
- H.span,
3103
+ j.span,
2829
3104
  {
2830
- className: Y.label,
3105
+ className: _.label,
2831
3106
  transition: { duration: 0.3 },
2832
- layoutId: z,
2833
- children: i
3107
+ layoutId: oe,
3108
+ children: c
2834
3109
  }
2835
3110
  ) })
2836
3111
  }
2837
3112
  ),
2838
- /* @__PURE__ */ A("div", { className: "flex-1 relative", children: [
2839
- (!N && !L.length || e == "filled") && /* @__PURE__ */ f(
2840
- H.label,
3113
+ /* @__PURE__ */ Y("div", { className: "flex-1 relative", children: [
3114
+ (!N && !g.length || e == "filled") && /* @__PURE__ */ f(
3115
+ j.label,
2841
3116
  {
2842
- htmlFor: c,
2843
- className: h(
3117
+ htmlFor: i,
3118
+ className: p(
2844
3119
  "absolute left-4 transition-all duration-300",
2845
3120
  {
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))
3121
+ "text-body-small top-2": e == "filled" && !(!N && !g.length),
3122
+ "text-body-large top-1/2 transform -translate-y-1/2": !(e == "filled" && !(!N && !g.length))
2848
3123
  }
2849
3124
  ),
2850
3125
  transition: { duration: 0.3 },
2851
3126
  children: /* @__PURE__ */ f(
2852
- H.span,
3127
+ j.span,
2853
3128
  {
2854
- className: Y.label,
3129
+ className: _.label,
2855
3130
  transition: { duration: 0.3 },
2856
- layoutId: e == "outlined" ? z : void 0,
2857
- children: i
3131
+ layoutId: e == "outlined" ? oe : void 0,
3132
+ children: c
2858
3133
  }
2859
3134
  )
2860
3135
  }
2861
3136
  ),
2862
3137
  /* @__PURE__ */ f(
2863
- x,
3138
+ E,
2864
3139
  {
2865
- ref: g,
2866
- value: L,
2867
- onChange: q,
2868
- className: Y.input,
2869
- id: c,
2870
- name: c,
3140
+ ref: x,
3141
+ value: g,
3142
+ onChange: J,
3143
+ className: _.input,
3144
+ id: i,
3145
+ name: i,
2871
3146
  placeholder: N ? l ?? void 0 : "",
2872
- onFocus: X,
2873
- onBlur: G,
3147
+ onFocus: U,
3148
+ onBlur: re,
2874
3149
  disabled: t,
2875
- autoComplete: d,
3150
+ autoComplete: u,
2876
3151
  "aria-invalid": !!(n != null && n.length),
2877
- "aria-label": i,
2878
- ...b
3152
+ "aria-label": c,
3153
+ ...S
2879
3154
  }
2880
3155
  )
2881
3156
  ] }),
2882
- /* @__PURE__ */ f("div", { className: Y.activeIndicator }),
2883
- !M && /* @__PURE__ */ A(te, { children: [
2884
- a && /* @__PURE__ */ f(
3157
+ /* @__PURE__ */ f("div", { className: _.activeIndicator }),
3158
+ !L && /* @__PURE__ */ Y(ye, { children: [
3159
+ o && /* @__PURE__ */ f(
2885
3160
  "div",
2886
3161
  {
2887
- onClick: (P) => {
2888
- P.stopPropagation();
3162
+ onClick: (X) => {
3163
+ X.stopPropagation();
2889
3164
  },
2890
- className: Y.trailingIcon,
2891
- children: K.isValidElement(a) ? a : /* @__PURE__ */ f(Z, { className: "h-5", icon: a })
3165
+ className: _.trailingIcon,
3166
+ children: te.isValidElement(o) ? o : /* @__PURE__ */ f(ie, { className: "h-5", icon: o })
2892
3167
  }
2893
3168
  ),
2894
- !a && r && /* @__PURE__ */ f("span", { className: Y.suffix, children: r })
3169
+ !o && r && /* @__PURE__ */ f("span", { className: _.suffix, children: r })
2895
3170
  ] }),
2896
- M && /* @__PURE__ */ f(
3171
+ L && /* @__PURE__ */ f(
2897
3172
  "div",
2898
3173
  {
2899
- className: h(Y.trailingIcon, {
2900
- " absolute right-0": !a
3174
+ className: p(_.trailingIcon, {
3175
+ " absolute right-0": !o
2901
3176
  }),
2902
3177
  children: /* @__PURE__ */ f(
2903
- Z,
3178
+ ie,
2904
3179
  {
2905
3180
  className: "h-5 text-error",
2906
- icon: Lt
3181
+ icon: Xt
2907
3182
  }
2908
3183
  )
2909
3184
  }
2910
3185
  )
2911
3186
  ] }),
2912
- W && /* @__PURE__ */ f("p", { className: Y.supportingText, children: n != null && n.length ? n : u != null && u.length ? u : " " })
3187
+ F && /* @__PURE__ */ f("p", { className: _.supportingText, children: n != null && n.length ? n : d != null && d.length ? d : " " })
2913
3188
  ] });
2914
- }, It = j(
3189
+ }, Yt = G(
2915
3190
  "navigationRailItem",
2916
3191
  ({ isSelected: e, icon: t, label: n, variant: l }) => ({
2917
- navigationRailItem: h(
3192
+ navigationRailItem: p(
2918
3193
  " group flex flex-col pt-1 pb-1.5 cursor-pointer",
2919
3194
  {
2920
3195
  "text-on-surface-variant": !e,
@@ -2923,7 +3198,7 @@ const Kt = ({
2923
3198
  "gap-0 h-[66px]": l == "horizontal"
2924
3199
  }
2925
3200
  ),
2926
- container: h(
3201
+ container: p(
2927
3202
  " w-fit flex justify-center relative rounded-full items-center mx-5",
2928
3203
  {
2929
3204
  "bg-secondary-container overflow-hidden": e,
@@ -2939,129 +3214,129 @@ const Kt = ({
2939
3214
  }
2940
3215
  ]
2941
3216
  ),
2942
- stateLayer: h(
3217
+ stateLayer: p(
2943
3218
  " absolute w-full rounded-full h-full left-0 top-0 ",
2944
3219
  {
2945
3220
  "group-state-on-surface": !e,
2946
3221
  "group-state-on-secondary-container": e
2947
3222
  }
2948
3223
  ),
2949
- icon: h("size-6 flex"),
2950
- label: h("w-fit mx-auto text-nowrap", {
3224
+ icon: p("size-6 flex"),
3225
+ label: p("w-fit mx-auto text-nowrap", {
2951
3226
  "text-label-large ": l == "horizontal",
2952
3227
  "text-label-medium": l == "vertical"
2953
3228
  })
2954
3229
  })
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 = ({
3230
+ ), jt = ({ 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 }) }), qt = ({
2956
3231
  className: e,
2957
3232
  onClick: t,
2958
3233
  label: n,
2959
3234
  variant: l = "vertical",
2960
3235
  href: r,
2961
- icon: c,
2962
- selectedItem: i,
3236
+ icon: i,
3237
+ selectedItem: c,
2963
3238
  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,
3239
+ index: d,
3240
+ onItemSelected: o,
3241
+ selected: h = !1,
3242
+ ref: y,
3243
+ transition: a,
3244
+ isExtended: u,
3245
+ iconSelected: m,
3246
+ style: b,
2972
3247
  extendedOnly: w,
2973
- children: E,
2974
- ...L
3248
+ children: M,
3249
+ ...g
2975
3250
  }) => {
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({
3251
+ M && (n = M);
3252
+ const R = P(null), N = y || R, [A, L] = D(h);
3253
+ $(() => {
3254
+ h && c == null ? L(!0) : L(c == d && d != null);
3255
+ }, [c]), $(() => {
3256
+ c == d && o && o({
2982
3257
  ref: N,
2983
- index: u || 0,
3258
+ index: d || 0,
2984
3259
  label: n,
2985
- icon: c
3260
+ icon: i
2986
3261
  });
2987
- }, [i]);
2988
- const V = r ? "a" : "button", W = (g) => {
2989
- s && s(u ?? null), t && t(g);
2990
- }, k = It({
2991
- isExtended: d,
3262
+ }, [c]);
3263
+ const O = r ? "a" : "button", F = (x) => {
3264
+ s && s(d ?? null), t && t(x);
3265
+ }, C = Yt({
3266
+ isExtended: u,
2992
3267
  extendedOnly: w,
2993
3268
  className: e,
2994
- onItemSelected: a,
2995
- selectedItem: i,
2996
- index: u,
2997
- transition: o,
2998
- selected: I,
3269
+ onItemSelected: o,
3270
+ selectedItem: c,
3271
+ index: d,
3272
+ transition: a,
3273
+ selected: A,
2999
3274
  variant: l,
3000
- icon: c,
3275
+ icon: i,
3001
3276
  label: n,
3002
- isSelected: I,
3277
+ isSelected: A,
3003
3278
  setSelectedItem: s,
3004
3279
  href: r,
3005
3280
  children: n,
3006
- iconSelected: y
3281
+ iconSelected: m
3007
3282
  });
3008
- return o = { duration: 0.3, ...o }, w && !d ? null : (
3283
+ return a = { duration: 0.3, ...a }, w && !u ? null : (
3009
3284
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
3010
3285
  // @ts-expect-error
3011
- /* @__PURE__ */ A(
3012
- V,
3286
+ /* @__PURE__ */ Y(
3287
+ O,
3013
3288
  {
3014
- ...L,
3289
+ ...g,
3015
3290
  role: "tab",
3016
- "aria-selected": I,
3291
+ "aria-selected": A,
3017
3292
  ref: N,
3018
3293
  href: r,
3019
- className: k.navigationRailItem,
3020
- onClick: W,
3021
- style: { transition: o.duration + "s", ...v },
3294
+ className: C.navigationRailItem,
3295
+ onClick: F,
3296
+ style: { transition: a.duration + "s", ...b },
3022
3297
  children: [
3023
- /* @__PURE__ */ A(
3024
- H.div,
3298
+ /* @__PURE__ */ Y(
3299
+ j.div,
3025
3300
  {
3026
3301
  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`
3302
+ 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
3303
  },
3029
- transition: o,
3030
- className: k.container,
3304
+ transition: a,
3305
+ className: C.container,
3031
3306
  children: [
3032
- /* @__PURE__ */ f(H.div, { layout: !0, className: k.stateLayer }),
3033
- c && /* @__PURE__ */ f(
3034
- Z,
3307
+ /* @__PURE__ */ f(j.div, { layout: !0, className: C.stateLayer }),
3308
+ i && /* @__PURE__ */ f(
3309
+ ie,
3035
3310
  {
3036
- icon: I ? y : c,
3037
- className: k.icon
3311
+ icon: A ? m : i,
3312
+ className: C.icon
3038
3313
  }
3039
3314
  ),
3040
- /* @__PURE__ */ f(Q, { children: l == "horizontal" && (() => {
3041
- const g = {
3315
+ /* @__PURE__ */ f(ue, { children: l == "horizontal" && (() => {
3316
+ const x = {
3042
3317
  width: 0,
3043
3318
  opacity: 0,
3044
3319
  transition: {
3045
- ...o
3320
+ ...a
3046
3321
  }
3047
- }, C = {
3322
+ }, k = {
3048
3323
  width: "auto",
3049
3324
  opacity: 1,
3050
3325
  transition: {
3051
- ...o,
3326
+ ...a,
3052
3327
  opacity: {
3053
- duration: o.duration / 2,
3054
- delay: o.duration - o.duration / 2
3328
+ duration: a.duration / 2,
3329
+ delay: a.duration - a.duration / 2
3055
3330
  }
3056
3331
  }
3057
3332
  };
3058
3333
  return /* @__PURE__ */ f(
3059
- H.span,
3334
+ j.span,
3060
3335
  {
3061
- initial: g,
3062
- animate: C,
3063
- exit: g,
3064
- className: k.label,
3336
+ initial: x,
3337
+ animate: k,
3338
+ exit: x,
3339
+ className: C.label,
3065
3340
  children: n
3066
3341
  }
3067
3342
  );
@@ -3069,35 +3344,35 @@ const Kt = ({
3069
3344
  ]
3070
3345
  }
3071
3346
  ),
3072
- /* @__PURE__ */ f(Q, { children: l == "vertical" && (() => {
3073
- const g = {
3347
+ /* @__PURE__ */ f(ue, { children: l == "vertical" && (() => {
3348
+ const x = {
3074
3349
  height: 0,
3075
3350
  opacity: 0,
3076
3351
  transition: {
3077
- ...o,
3352
+ ...a,
3078
3353
  opacity: {
3079
3354
  duration: 0
3080
3355
  }
3081
3356
  }
3082
- }, C = {
3357
+ }, k = {
3083
3358
  height: "auto",
3084
3359
  opacity: 1,
3085
3360
  transition: {
3086
- ...o,
3361
+ ...a,
3087
3362
  opacity: {
3088
- duration: o.duration / 3,
3089
- delay: o.duration - o.duration / 3
3363
+ duration: a.duration / 3,
3364
+ delay: a.duration - a.duration / 3
3090
3365
  }
3091
3366
  }
3092
3367
  };
3093
3368
  return /* @__PURE__ */ f(
3094
- H.span,
3369
+ j.span,
3095
3370
  {
3096
- initial: C,
3097
- animate: C,
3098
- exit: g,
3099
- className: k.label,
3100
- transition: o,
3371
+ initial: k,
3372
+ animate: k,
3373
+ exit: x,
3374
+ className: C.label,
3375
+ transition: a,
3101
3376
  children: n
3102
3377
  }
3103
3378
  );
@@ -3106,180 +3381,180 @@ const Kt = ({
3106
3381
  }
3107
3382
  )
3108
3383
  );
3109
- }, $t = j(
3384
+ }, Kt = G(
3110
3385
  "navigationRail",
3111
3386
  ({ isExtended: e, alignment: t }) => ({
3112
- navigationRail: h("flex flex-col left-0 h-full top-0 pt-11", {
3387
+ navigationRail: p("flex flex-col left-0 h-full top-0 pt-11", {
3113
3388
  "w-fit max-w-24": !e,
3114
3389
  "w-fit min-w-[220px] max-w-[360px]": e,
3115
3390
  "justify-between": t == "middle",
3116
3391
  "justify-start": t == "top"
3117
3392
  }),
3118
- header: h("flex flex-col gap-1 items-start"),
3393
+ header: p("flex flex-col gap-1 items-start"),
3119
3394
  menuIcon: "mx-5",
3120
- segments: h(" flex flex-col overflow-auto min-w-full mt-10", {
3395
+ segments: p(" flex flex-col overflow-auto min-w-full mt-10", {
3121
3396
  "w-full": !e,
3122
3397
  "w-fit items-start": e
3123
3398
  })
3124
3399
  })
3125
- ), zt = ({
3400
+ ), yn = ({
3126
3401
  variant: e = "standard",
3127
3402
  onItemSelected: t,
3128
3403
  children: n,
3129
3404
  className: l,
3130
3405
  selectedItem: r,
3131
- extended: c,
3132
- alignment: i = "top",
3406
+ extended: i,
3407
+ alignment: c = "top",
3133
3408
  menu: s = {
3134
3409
  closed: {
3135
- icon: Nt,
3410
+ icon: Ot,
3136
3411
  label: "Open menu"
3137
3412
  },
3138
3413
  opened: {
3139
- icon: de,
3414
+ icon: Ce,
3140
3415
  label: "Close menu"
3141
3416
  }
3142
3417
  },
3143
- style: u,
3144
- onExtendedChange: a,
3145
- transition: p,
3146
- setSelectedItem: m
3418
+ style: d,
3419
+ onExtendedChange: o,
3420
+ transition: h,
3421
+ setSelectedItem: y
3147
3422
  }) => {
3148
- const [o, d] = S(null), [y, v] = S(c);
3423
+ const [a, u] = D(null), [m, b] = D(i);
3149
3424
  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);
3425
+ r == 0 || r != null ? w = r : w = a;
3426
+ const M = y || u, g = P(null), R = (C) => {
3427
+ t == null || t(C);
3153
3428
  };
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;
3429
+ function N(C) {
3430
+ const x = [];
3431
+ return Ke.forEach(C, (k) => {
3432
+ pe(k) && k.type === _e ? x.push(...N(k.props.children)) : x.push(k);
3433
+ }), x;
3159
3434
  }
3160
- const I = N(n), M = I.filter(
3161
- (k) => ee(k) && k.type === ge
3162
- ), V = $t({
3435
+ const A = N(n), L = A.filter(
3436
+ (C) => pe(C) && C.type === Ae
3437
+ ), O = Kt({
3163
3438
  children: n,
3164
3439
  onItemSelected: t,
3165
3440
  selectedItem: w,
3166
- setSelectedItem: E,
3441
+ setSelectedItem: M,
3167
3442
  className: l,
3168
3443
  variant: e,
3169
- extended: y,
3170
- isExtended: y,
3171
- alignment: i,
3444
+ extended: m,
3445
+ isExtended: m,
3446
+ alignment: c,
3172
3447
  menu: s,
3173
- transition: p,
3174
- onExtendedChange: a
3448
+ transition: h,
3449
+ onExtendedChange: o
3175
3450
  });
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(
3451
+ h = { duration: 0.3, ...h };
3452
+ const F = P(!1);
3453
+ return F.current = !1, $(() => {
3454
+ o == null || o(m ?? !1);
3455
+ }, [m]), /* @__PURE__ */ Y(
3181
3456
  "div",
3182
3457
  {
3183
- style: { transition: p.duration + "s", ...u },
3184
- ref: L,
3185
- className: V.navigationRail,
3458
+ style: { transition: h.duration + "s", ...d },
3459
+ ref: g,
3460
+ className: O.navigationRail,
3186
3461
  children: [
3187
- /* @__PURE__ */ A("div", { className: V.header, children: [
3462
+ /* @__PURE__ */ Y("div", { className: O.header, children: [
3188
3463
  /* @__PURE__ */ f(
3189
- ue,
3464
+ $e,
3190
3465
  {
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
3466
+ onClick: () => b(!m),
3467
+ label: m ? s == null ? void 0 : s.opened.label : s == null ? void 0 : s.closed.label,
3468
+ className: O.menuIcon,
3469
+ icon: m ? s.opened.icon : s == null ? void 0 : s.closed.icon
3195
3470
  }
3196
3471
  ),
3197
- M.length > 0 && oe(M[0], {
3198
- transition: p,
3199
- isExtended: y,
3200
- className: "!shadow-none mx-5 " + M[0].props.className
3472
+ L.length > 0 && be(L[0], {
3473
+ transition: h,
3474
+ isExtended: m,
3475
+ className: "!shadow-none mx-5 " + L[0].props.className
3201
3476
  })
3202
3477
  ] }),
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,
3478
+ /* @__PURE__ */ f("div", { className: O.segments, children: (() => {
3479
+ let C = 0;
3480
+ return A.map((x) => pe(x) && x.type === qt ? be(
3481
+ x,
3207
3482
  {
3208
- key: k,
3209
- index: k++,
3483
+ key: C,
3484
+ index: C++,
3210
3485
  // Utilise et incrémente le compteur dédié
3211
- variant: y ? "horizontal" : "vertical",
3486
+ variant: m ? "horizontal" : "vertical",
3212
3487
  selectedItem: w,
3213
- setSelectedItem: E,
3214
- onItemSelected: B,
3215
- transition: p,
3216
- extendedOnly: W.current,
3217
- isExtended: y
3488
+ setSelectedItem: M,
3489
+ onItemSelected: R,
3490
+ transition: h,
3491
+ extendedOnly: F.current,
3492
+ isExtended: m
3218
3493
  }
3219
- ) : ee(g) && g.type === ge ? null : ee(g) && g.type === kt ? (W.current = !0, y ? oe(g, {}) : null) : g);
3494
+ ) : pe(x) && x.type === Ae ? null : pe(x) && x.type === jt ? (F.current = !0, m ? be(x, {}) : null) : x);
3220
3495
  })() }),
3221
3496
  /* @__PURE__ */ f("div", { className: "flex-1 max-h-[160px]" })
3222
3497
  ]
3223
3498
  }
3224
3499
  );
3225
3500
  };
3226
- function Tt(e) {
3227
- return We({
3228
- variant: Ae.Udixio,
3501
+ function xn(e) {
3502
+ return ze({
3503
+ variant: et.Udixio,
3229
3504
  ...e,
3230
- plugins: [new Pe(e), new be(e)]
3505
+ plugins: [new Te(e), new Xe(e)]
3231
3506
  });
3232
3507
  }
3233
3508
  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
3509
+ ln as AnimateOnScrollInit,
3510
+ Wt as Button,
3511
+ sn as Card,
3512
+ cn as Carousel,
3513
+ Bt as CarouselItem,
3514
+ Et as CustomScroll,
3515
+ Pt as Divider,
3516
+ Ae as Fab,
3517
+ ie as Icon,
3518
+ $e as IconButton,
3519
+ yn as NavigationRail,
3520
+ qt as NavigationRailItem,
3521
+ jt as NavigationRailSection,
3522
+ bt as ProgressIndicator,
3523
+ ve as RippleEffect,
3524
+ dn as SideSheet,
3525
+ un as Slider,
3526
+ rn as SmoothScroll,
3527
+ fn as Snackbar,
3528
+ mn as Switch,
3529
+ kt as SyncedFixedWrapper,
3530
+ Ut as Tab,
3531
+ hn as Tabs,
3532
+ pn as TextField,
3533
+ on as ThemeProvider,
3534
+ Ye as ToolTip,
3535
+ an as animateOnScroll,
3536
+ lt as buttonStyle,
3537
+ at as cardStyle,
3538
+ st as carouselItemStyle,
3539
+ ct as carouselStyle,
3540
+ p as classNames,
3541
+ nt as classnames,
3542
+ Lt as customScrollStyle,
3543
+ G as defaultClassNames,
3544
+ xn as defineConfig,
3545
+ it as dividerStyle,
3546
+ ut as fabStyle,
3547
+ ot as getClassNames,
3548
+ dt as iconButtonStyle,
3549
+ Ue as initAnimateOnScroll,
3550
+ fe as normalize,
3551
+ ft as progressIndicatorStyle,
3552
+ mt as sideSheetStyle,
3553
+ ht as sliderStyle,
3554
+ pt as snackbarStyle,
3555
+ yt as switchStyle,
3556
+ xt as tabStyle,
3557
+ vt as tabsStyle,
3558
+ wt as textFieldStyle,
3559
+ gt as toolStyle
3285
3560
  };