@mercury-fx/ui 2.4.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 (179) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +44 -0
  3. package/dist/components/actions/Button/Button.d.ts +17 -0
  4. package/dist/components/actions/Button/index.d.ts +1 -0
  5. package/dist/components/actions/IconButton/IconButton.d.ts +24 -0
  6. package/dist/components/actions/IconButton/index.d.ts +1 -0
  7. package/dist/components/actions/Link/Link.d.ts +26 -0
  8. package/dist/components/actions/Link/index.d.ts +1 -0
  9. package/dist/components/data-display/Avatar/Avatar.d.ts +8 -0
  10. package/dist/components/data-display/Avatar/index.d.ts +1 -0
  11. package/dist/components/data-display/Badge/Badge.d.ts +8 -0
  12. package/dist/components/data-display/Badge/index.d.ts +1 -0
  13. package/dist/components/data-display/Blockquote/Blockquote.d.ts +18 -0
  14. package/dist/components/data-display/Blockquote/index.d.ts +1 -0
  15. package/dist/components/data-display/Card/Card.d.ts +9 -0
  16. package/dist/components/data-display/Card/index.d.ts +1 -0
  17. package/dist/components/data-display/Chart/Chart.d.ts +41 -0
  18. package/dist/components/data-display/Chart/index.d.ts +1 -0
  19. package/dist/components/data-display/Checklist/Checklist.d.ts +14 -0
  20. package/dist/components/data-display/Checklist/index.d.ts +1 -0
  21. package/dist/components/data-display/Chip/Chip.d.ts +13 -0
  22. package/dist/components/data-display/Chip/index.d.ts +1 -0
  23. package/dist/components/data-display/Code/Code.d.ts +22 -0
  24. package/dist/components/data-display/Code/index.d.ts +1 -0
  25. package/dist/components/data-display/DataList/DataList.d.ts +27 -0
  26. package/dist/components/data-display/DataList/index.d.ts +1 -0
  27. package/dist/components/data-display/Kbd/Kbd.d.ts +14 -0
  28. package/dist/components/data-display/Kbd/index.d.ts +1 -0
  29. package/dist/components/data-display/ListRow/ListRow.d.ts +16 -0
  30. package/dist/components/data-display/ListRow/index.d.ts +1 -0
  31. package/dist/components/data-display/Stat/Stat.d.ts +16 -0
  32. package/dist/components/data-display/Stat/index.d.ts +1 -0
  33. package/dist/components/data-display/Table/Table.d.ts +14 -0
  34. package/dist/components/data-display/Table/index.d.ts +1 -0
  35. package/dist/components/data-display/Tag/Tag.d.ts +9 -0
  36. package/dist/components/data-display/Tag/index.d.ts +1 -0
  37. package/dist/components/feedback/Alert/Alert.d.ts +11 -0
  38. package/dist/components/feedback/Alert/index.d.ts +1 -0
  39. package/dist/components/feedback/Callout/Callout.d.ts +26 -0
  40. package/dist/components/feedback/Callout/index.d.ts +1 -0
  41. package/dist/components/feedback/PasswordStrength/PasswordStrength.d.ts +13 -0
  42. package/dist/components/feedback/PasswordStrength/index.d.ts +1 -0
  43. package/dist/components/feedback/Progress/Progress.d.ts +9 -0
  44. package/dist/components/feedback/Progress/index.d.ts +1 -0
  45. package/dist/components/feedback/Skeleton/Skeleton.d.ts +19 -0
  46. package/dist/components/feedback/Skeleton/index.d.ts +1 -0
  47. package/dist/components/feedback/Spinner/Spinner.d.ts +18 -0
  48. package/dist/components/feedback/Spinner/index.d.ts +1 -0
  49. package/dist/components/foundations/Divider/Divider.d.ts +11 -0
  50. package/dist/components/foundations/Divider/index.d.ts +1 -0
  51. package/dist/components/foundations/Heading/Heading.d.ts +26 -0
  52. package/dist/components/foundations/Heading/index.d.ts +1 -0
  53. package/dist/components/foundations/Icon/Icon.d.ts +9 -0
  54. package/dist/components/foundations/Icon/index.d.ts +1 -0
  55. package/dist/components/foundations/Separator/Separator.d.ts +20 -0
  56. package/dist/components/foundations/Separator/index.d.ts +1 -0
  57. package/dist/components/foundations/Text/Text.d.ts +19 -0
  58. package/dist/components/foundations/Text/index.d.ts +1 -0
  59. package/dist/components/inputs/AuthCode/AuthCode.d.ts +10 -0
  60. package/dist/components/inputs/AuthCode/index.d.ts +1 -0
  61. package/dist/components/inputs/Calendar/Calendar.d.ts +24 -0
  62. package/dist/components/inputs/Calendar/index.d.ts +1 -0
  63. package/dist/components/inputs/DateField/DateField.d.ts +25 -0
  64. package/dist/components/inputs/DateField/index.d.ts +1 -0
  65. package/dist/components/inputs/Input/Input.d.ts +9 -0
  66. package/dist/components/inputs/Input/index.d.ts +1 -0
  67. package/dist/components/inputs/Label/Label.d.ts +20 -0
  68. package/dist/components/inputs/Label/index.d.ts +1 -0
  69. package/dist/components/inputs/MoneyInput/MoneyInput.d.ts +12 -0
  70. package/dist/components/inputs/MoneyInput/index.d.ts +1 -0
  71. package/dist/components/inputs/Search/Search.d.ts +7 -0
  72. package/dist/components/inputs/Search/index.d.ts +1 -0
  73. package/dist/components/inputs/Select/Select.d.ts +14 -0
  74. package/dist/components/inputs/Select/index.d.ts +1 -0
  75. package/dist/components/inputs/Textarea/Textarea.d.ts +9 -0
  76. package/dist/components/inputs/Textarea/index.d.ts +1 -0
  77. package/dist/components/layout/AspectRatio/AspectRatio.d.ts +14 -0
  78. package/dist/components/layout/AspectRatio/index.d.ts +1 -0
  79. package/dist/components/layout/AuthLayout/AuthLayout.d.ts +30 -0
  80. package/dist/components/layout/AuthLayout/index.d.ts +1 -0
  81. package/dist/components/layout/Box/Box.d.ts +35 -0
  82. package/dist/components/layout/Box/index.d.ts +1 -0
  83. package/dist/components/layout/Center/Center.d.ts +13 -0
  84. package/dist/components/layout/Center/index.d.ts +1 -0
  85. package/dist/components/layout/Cluster/Cluster.d.ts +18 -0
  86. package/dist/components/layout/Cluster/index.d.ts +1 -0
  87. package/dist/components/layout/Collapsible/Collapsible.d.ts +26 -0
  88. package/dist/components/layout/Collapsible/index.d.ts +1 -0
  89. package/dist/components/layout/Container/Container.d.ts +19 -0
  90. package/dist/components/layout/Container/index.d.ts +1 -0
  91. package/dist/components/layout/Flex/Flex.d.ts +24 -0
  92. package/dist/components/layout/Flex/index.d.ts +1 -0
  93. package/dist/components/layout/Grid/Grid.d.ts +26 -0
  94. package/dist/components/layout/Grid/index.d.ts +1 -0
  95. package/dist/components/layout/GridItem/GridItem.d.ts +19 -0
  96. package/dist/components/layout/GridItem/index.d.ts +1 -0
  97. package/dist/components/layout/ScrollArea/ScrollArea.d.ts +22 -0
  98. package/dist/components/layout/ScrollArea/index.d.ts +1 -0
  99. package/dist/components/layout/Section/Section.d.ts +18 -0
  100. package/dist/components/layout/Section/index.d.ts +1 -0
  101. package/dist/components/layout/Sidebar/Sidebar.d.ts +21 -0
  102. package/dist/components/layout/Sidebar/index.d.ts +1 -0
  103. package/dist/components/layout/Spacer/Spacer.d.ts +15 -0
  104. package/dist/components/layout/Spacer/index.d.ts +1 -0
  105. package/dist/components/layout/Stack/Stack.d.ts +20 -0
  106. package/dist/components/layout/Stack/index.d.ts +1 -0
  107. package/dist/components/layout/scales.d.ts +20 -0
  108. package/dist/components/navigation/Accordion/Accordion.d.ts +17 -0
  109. package/dist/components/navigation/Accordion/index.d.ts +1 -0
  110. package/dist/components/navigation/Menubar/Menubar.d.ts +53 -0
  111. package/dist/components/navigation/Menubar/index.d.ts +1 -0
  112. package/dist/components/navigation/Pagination/Pagination.d.ts +14 -0
  113. package/dist/components/navigation/Pagination/index.d.ts +1 -0
  114. package/dist/components/navigation/TabNav/TabNav.d.ts +38 -0
  115. package/dist/components/navigation/TabNav/index.d.ts +1 -0
  116. package/dist/components/navigation/Tabs/Tabs.d.ts +12 -0
  117. package/dist/components/navigation/Tabs/index.d.ts +1 -0
  118. package/dist/components/overlay/AlertDialog/AlertDialog.d.ts +33 -0
  119. package/dist/components/overlay/AlertDialog/index.d.ts +1 -0
  120. package/dist/components/overlay/ContextMenu/ContextMenu.d.ts +40 -0
  121. package/dist/components/overlay/ContextMenu/index.d.ts +1 -0
  122. package/dist/components/overlay/Dialog/Dialog.d.ts +33 -0
  123. package/dist/components/overlay/Dialog/index.d.ts +1 -0
  124. package/dist/components/overlay/Dropdown/Dropdown.d.ts +48 -0
  125. package/dist/components/overlay/Dropdown/index.d.ts +1 -0
  126. package/dist/components/overlay/HoverCard/HoverCard.d.ts +35 -0
  127. package/dist/components/overlay/HoverCard/index.d.ts +1 -0
  128. package/dist/components/overlay/LinkPreview/LinkPreview.d.ts +33 -0
  129. package/dist/components/overlay/LinkPreview/index.d.ts +1 -0
  130. package/dist/components/overlay/Modal/Modal.d.ts +10 -0
  131. package/dist/components/overlay/Modal/index.d.ts +1 -0
  132. package/dist/components/overlay/Popover/Popover.d.ts +35 -0
  133. package/dist/components/overlay/Popover/index.d.ts +1 -0
  134. package/dist/components/overlay/Tooltip/Tooltip.d.ts +6 -0
  135. package/dist/components/overlay/Tooltip/index.d.ts +1 -0
  136. package/dist/components/overlay/_overlay/Portal.d.ts +14 -0
  137. package/dist/components/selection/Checkbox/Checkbox.d.ts +12 -0
  138. package/dist/components/selection/Checkbox/index.d.ts +1 -0
  139. package/dist/components/selection/CheckboxCards/CheckboxCards.d.ts +20 -0
  140. package/dist/components/selection/CheckboxCards/index.d.ts +1 -0
  141. package/dist/components/selection/CheckboxGroup/CheckboxGroup.d.ts +17 -0
  142. package/dist/components/selection/CheckboxGroup/index.d.ts +1 -0
  143. package/dist/components/selection/Radio/Radio.d.ts +11 -0
  144. package/dist/components/selection/Radio/index.d.ts +1 -0
  145. package/dist/components/selection/RadioCards/RadioCards.d.ts +20 -0
  146. package/dist/components/selection/RadioCards/index.d.ts +1 -0
  147. package/dist/components/selection/RadioGroup/RadioGroup.d.ts +18 -0
  148. package/dist/components/selection/RadioGroup/index.d.ts +1 -0
  149. package/dist/components/selection/Segmented/Segmented.d.ts +13 -0
  150. package/dist/components/selection/Segmented/index.d.ts +1 -0
  151. package/dist/components/selection/Slider/Slider.d.ts +13 -0
  152. package/dist/components/selection/Slider/index.d.ts +1 -0
  153. package/dist/components/selection/Switch/Switch.d.ts +10 -0
  154. package/dist/components/selection/Switch/index.d.ts +1 -0
  155. package/dist/components/selection/Toggle/Toggle.d.ts +36 -0
  156. package/dist/components/selection/Toggle/index.d.ts +1 -0
  157. package/dist/index.d.ts +93 -0
  158. package/dist/mercury-ui.css +1 -0
  159. package/dist/mercury-ui.js +4049 -0
  160. package/package.json +58 -0
  161. package/src/styles/additions.css +1030 -0
  162. package/src/styles/fonts/DMMono-Italic.woff2 +0 -0
  163. package/src/styles/fonts/DMMono-Light.woff2 +0 -0
  164. package/src/styles/fonts/DMMono-LightItalic.woff2 +0 -0
  165. package/src/styles/fonts/DMMono-Medium.woff2 +0 -0
  166. package/src/styles/fonts/DMMono-MediumItalic.woff2 +0 -0
  167. package/src/styles/fonts/DMMono-Regular.woff2 +0 -0
  168. package/src/styles/fonts/DMSans-Bold.woff2 +0 -0
  169. package/src/styles/fonts/DMSans-BoldItalic.woff2 +0 -0
  170. package/src/styles/fonts/DMSans-Italic.woff2 +0 -0
  171. package/src/styles/fonts/DMSans-Medium.woff2 +0 -0
  172. package/src/styles/fonts/DMSans-MediumItalic.woff2 +0 -0
  173. package/src/styles/fonts/DMSans-Regular.woff2 +0 -0
  174. package/src/styles/fonts/DMSerifDisplay-Italic.woff2 +0 -0
  175. package/src/styles/fonts/DMSerifDisplay-Regular.woff2 +0 -0
  176. package/src/styles/index.css +5 -0
  177. package/src/styles/layout.css +55 -0
  178. package/src/styles/mercury.css +676 -0
  179. package/src/styles/tokens.css +438 -0
@@ -0,0 +1,4049 @@
1
+ import { useRef as w, useEffect as P, useState as N, useMemo as E, useCallback as K, useLayoutEffect as Ot, forwardRef as j, useId as le } from "react";
2
+ import { jsxs as b, jsx as r, Fragment as C } from "react/jsx-runtime";
3
+ import { createPortal as ot } from "react-dom";
4
+ function ge(e, t) {
5
+ return e - t * Math.floor(e / t);
6
+ }
7
+ const st = 1721426;
8
+ function se(e, t, n, a) {
9
+ t = Ae(e, t);
10
+ let l = t - 1, o = -2;
11
+ return n <= 2 ? o = 0 : ue(t) && (o = -1), st - 1 + 365 * l + Math.floor(l / 4) - Math.floor(l / 100) + Math.floor(l / 400) + Math.floor((367 * n - 362) / 12 + o + a);
12
+ }
13
+ function ue(e) {
14
+ return e % 4 === 0 && (e % 100 !== 0 || e % 400 === 0);
15
+ }
16
+ function Ae(e, t) {
17
+ return e === "BC" ? 1 - t : t;
18
+ }
19
+ function Bt(e) {
20
+ let t = "AD";
21
+ return e <= 0 && (t = "BC", e = 1 - e), [
22
+ t,
23
+ e
24
+ ];
25
+ }
26
+ const Ft = {
27
+ standard: [
28
+ 31,
29
+ 28,
30
+ 31,
31
+ 30,
32
+ 31,
33
+ 30,
34
+ 31,
35
+ 31,
36
+ 30,
37
+ 31,
38
+ 30,
39
+ 31
40
+ ],
41
+ leapyear: [
42
+ 31,
43
+ 29,
44
+ 31,
45
+ 30,
46
+ 31,
47
+ 30,
48
+ 31,
49
+ 31,
50
+ 30,
51
+ 31,
52
+ 30,
53
+ 31
54
+ ]
55
+ };
56
+ class G {
57
+ fromJulianDay(t) {
58
+ let n = t, a = n - st, l = Math.floor(a / 146097), o = ge(a, 146097), c = Math.floor(o / 36524), s = ge(o, 36524), d = Math.floor(s / 1461), h = ge(s, 1461), f = Math.floor(h / 365), i = l * 400 + c * 100 + d * 4 + f + (c !== 4 && f !== 4 ? 1 : 0), [u, m] = Bt(i), y = n - se(u, m, 1, 1), p = 2;
59
+ n < se(u, m, 3, 1) ? p = 0 : ue(m) && (p = 1);
60
+ let v = Math.floor(((y + p) * 12 + 373) / 367), _ = n - se(u, m, v, 1) + 1;
61
+ return new V(u, m, v, _);
62
+ }
63
+ toJulianDay(t) {
64
+ return se(t.era, t.year, t.month, t.day);
65
+ }
66
+ getDaysInMonth(t) {
67
+ return Ft[ue(t.year) ? "leapyear" : "standard"][t.month - 1];
68
+ }
69
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
70
+ getMonthsInYear(t) {
71
+ return 12;
72
+ }
73
+ getDaysInYear(t) {
74
+ return ue(t.year) ? 366 : 365;
75
+ }
76
+ getMaximumMonthsInYear() {
77
+ return 12;
78
+ }
79
+ getMaximumDaysInMonth() {
80
+ return 31;
81
+ }
82
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
83
+ getYearsInEra(t) {
84
+ return 9999;
85
+ }
86
+ getEras() {
87
+ return [
88
+ "BC",
89
+ "AD"
90
+ ];
91
+ }
92
+ isInverseEra(t) {
93
+ return t.era === "BC";
94
+ }
95
+ balanceDate(t) {
96
+ t.year <= 0 && (t.era = t.era === "BC" ? "AD" : "BC", t.year = 1 - t.year);
97
+ }
98
+ constructor() {
99
+ this.identifier = "gregory";
100
+ }
101
+ }
102
+ const Zt = {
103
+ "001": 1,
104
+ AD: 1,
105
+ AE: 6,
106
+ AF: 6,
107
+ AI: 1,
108
+ AL: 1,
109
+ AM: 1,
110
+ AN: 1,
111
+ AR: 1,
112
+ AT: 1,
113
+ AU: 1,
114
+ AX: 1,
115
+ AZ: 1,
116
+ BA: 1,
117
+ BE: 1,
118
+ BG: 1,
119
+ BH: 6,
120
+ BM: 1,
121
+ BN: 1,
122
+ BY: 1,
123
+ CH: 1,
124
+ CL: 1,
125
+ CM: 1,
126
+ CN: 1,
127
+ CR: 1,
128
+ CY: 1,
129
+ CZ: 1,
130
+ DE: 1,
131
+ DJ: 6,
132
+ DK: 1,
133
+ DZ: 6,
134
+ EC: 1,
135
+ EE: 1,
136
+ EG: 6,
137
+ ES: 1,
138
+ FI: 1,
139
+ FJ: 1,
140
+ FO: 1,
141
+ FR: 1,
142
+ GB: 1,
143
+ GE: 1,
144
+ GF: 1,
145
+ GP: 1,
146
+ GR: 1,
147
+ HR: 1,
148
+ HU: 1,
149
+ IE: 1,
150
+ IQ: 6,
151
+ IR: 6,
152
+ IS: 1,
153
+ IT: 1,
154
+ JO: 6,
155
+ KG: 1,
156
+ KW: 6,
157
+ KZ: 1,
158
+ LB: 1,
159
+ LI: 1,
160
+ LK: 1,
161
+ LT: 1,
162
+ LU: 1,
163
+ LV: 1,
164
+ LY: 6,
165
+ MC: 1,
166
+ MD: 1,
167
+ ME: 1,
168
+ MK: 1,
169
+ MN: 1,
170
+ MQ: 1,
171
+ MV: 5,
172
+ MY: 1,
173
+ NL: 1,
174
+ NO: 1,
175
+ NZ: 1,
176
+ OM: 6,
177
+ PL: 1,
178
+ QA: 6,
179
+ RE: 1,
180
+ RO: 1,
181
+ RS: 1,
182
+ RU: 1,
183
+ SD: 6,
184
+ SE: 1,
185
+ SI: 1,
186
+ SK: 1,
187
+ SM: 1,
188
+ SY: 6,
189
+ TJ: 1,
190
+ TM: 1,
191
+ TR: 1,
192
+ UA: 1,
193
+ UY: 1,
194
+ UZ: 1,
195
+ VA: 1,
196
+ VN: 1,
197
+ XK: 1
198
+ };
199
+ function Be(e, t) {
200
+ return t = R(t, e.calendar), e.era === t.era && e.year === t.year && e.month === t.month && e.day === t.day;
201
+ }
202
+ function Ht(e, t) {
203
+ return e.isEqual?.(t) ?? t.isEqual?.(e) ?? e.identifier === t.identifier;
204
+ }
205
+ function Yt(e, t, n) {
206
+ let a = e.calendar.toJulianDay(e), l = Vt(t), o = Math.ceil(a + 1 - l) % 7;
207
+ return o < 0 && (o += 7), o;
208
+ }
209
+ function Ut(e) {
210
+ return F(Date.now(), e);
211
+ }
212
+ function Fe(e) {
213
+ return Gt(Ut(e));
214
+ }
215
+ function ct(e, t) {
216
+ return e.calendar.toJulianDay(e) - t.calendar.toJulianDay(t);
217
+ }
218
+ function it(e, t) {
219
+ return Ze(e) - Ze(t);
220
+ }
221
+ function Ze(e) {
222
+ return e.hour * 36e5 + e.minute * 6e4 + e.second * 1e3 + e.millisecond;
223
+ }
224
+ let _e = null, Kt = !1;
225
+ function ae() {
226
+ return _e == null && (_e = new Intl.DateTimeFormat().resolvedOptions().timeZone), _e;
227
+ }
228
+ function dt() {
229
+ return Kt;
230
+ }
231
+ const He = /* @__PURE__ */ new Map(), ve = /* @__PURE__ */ new Map();
232
+ function Wt(e) {
233
+ if (Intl.Locale) {
234
+ let n = He.get(e);
235
+ return n || (n = new Intl.Locale(e).maximize().region, n && He.set(e, n)), n;
236
+ }
237
+ let t = e.split("-")[1];
238
+ return t === "u" ? void 0 : t;
239
+ }
240
+ function Vt(e) {
241
+ let t = ve.get(e);
242
+ if (!t) {
243
+ if (Intl.Locale) {
244
+ let a = new Intl.Locale(e);
245
+ if ("getWeekInfo" in a && (t = a.getWeekInfo(), t))
246
+ return ve.set(e, t), t.firstDay;
247
+ }
248
+ let n = Wt(e);
249
+ if (e.includes("-fw-")) {
250
+ let a = e.split("-fw-")[1].split("-")[0];
251
+ a === "mon" ? t = {
252
+ firstDay: 1
253
+ } : a === "tue" ? t = {
254
+ firstDay: 2
255
+ } : a === "wed" ? t = {
256
+ firstDay: 3
257
+ } : a === "thu" ? t = {
258
+ firstDay: 4
259
+ } : a === "fri" ? t = {
260
+ firstDay: 5
261
+ } : a === "sat" ? t = {
262
+ firstDay: 6
263
+ } : t = {
264
+ firstDay: 0
265
+ };
266
+ } else e.includes("-ca-iso8601") ? t = {
267
+ firstDay: 1
268
+ } : t = {
269
+ firstDay: n && Zt[n] || 0
270
+ };
271
+ ve.set(e, t);
272
+ }
273
+ return t.firstDay;
274
+ }
275
+ function J(e) {
276
+ e = R(e, new G());
277
+ let t = Ae(e.era, e.year);
278
+ return ut(t, e.month, e.day, e.hour, e.minute, e.second, e.millisecond);
279
+ }
280
+ function ut(e, t, n, a, l, o, c) {
281
+ let s = /* @__PURE__ */ new Date();
282
+ return s.setUTCHours(a, l, o, c), s.setUTCFullYear(e, t - 1, n), s.getTime();
283
+ }
284
+ function De(e, t) {
285
+ if (t === "UTC") return 0;
286
+ if (e > 0 && t === ae() && !dt()) return new Date(e).getTimezoneOffset() * -6e4;
287
+ let { year: n, month: a, day: l, hour: o, minute: c, second: s } = mt(e, t);
288
+ return ut(n, a, l, o, c, s, 0) - Math.floor(e / 1e3) * 1e3;
289
+ }
290
+ const Ye = /* @__PURE__ */ new Map();
291
+ function mt(e, t) {
292
+ let n = Ye.get(t);
293
+ n || (n = new Intl.DateTimeFormat("en-US", {
294
+ timeZone: t,
295
+ hour12: !1,
296
+ era: "short",
297
+ year: "numeric",
298
+ month: "numeric",
299
+ day: "numeric",
300
+ hour: "numeric",
301
+ minute: "numeric",
302
+ second: "numeric"
303
+ }), Ye.set(t, n));
304
+ let a = n.formatToParts(new Date(e)), l = {};
305
+ for (let o of a) o.type !== "literal" && (l[o.type] = o.value);
306
+ return {
307
+ // Firefox returns B instead of BC... https://bugzilla.mozilla.org/show_bug.cgi?id=1752253
308
+ year: l.era === "BC" || l.era === "B" ? -l.year + 1 : +l.year,
309
+ month: +l.month,
310
+ day: +l.day,
311
+ hour: l.hour === "24" ? 0 : +l.hour,
312
+ minute: +l.minute,
313
+ second: +l.second
314
+ };
315
+ }
316
+ const Ue = 864e5;
317
+ function qt(e, t, n, a) {
318
+ return (n === a ? [
319
+ n
320
+ ] : [
321
+ n,
322
+ a
323
+ ]).filter((o) => zt(e, t, o));
324
+ }
325
+ function zt(e, t, n) {
326
+ let a = mt(n, t);
327
+ return e.year === a.year && e.month === a.month && e.day === a.day && e.hour === a.hour && e.minute === a.minute && e.second === a.second;
328
+ }
329
+ function B(e, t, n = "compatible") {
330
+ let a = X(e);
331
+ if (t === "UTC") return J(a);
332
+ if (t === ae() && n === "compatible" && !dt()) {
333
+ a = R(a, new G());
334
+ let d = /* @__PURE__ */ new Date(), h = Ae(a.era, a.year);
335
+ return d.setFullYear(h, a.month - 1, a.day), d.setHours(a.hour, a.minute, a.second, a.millisecond), d.getTime();
336
+ }
337
+ let l = J(a), o = De(l - Ue, t), c = De(l + Ue, t), s = qt(a, t, l - o, l - c);
338
+ if (s.length === 1) return s[0];
339
+ if (s.length > 1) switch (n) {
340
+ // 'compatible' means 'earlier' for "fall back" transitions
341
+ case "compatible":
342
+ case "earlier":
343
+ return s[0];
344
+ case "later":
345
+ return s[s.length - 1];
346
+ case "reject":
347
+ throw new RangeError("Multiple possible absolute times found");
348
+ }
349
+ switch (n) {
350
+ case "earlier":
351
+ return Math.min(l - o, l - c);
352
+ // 'compatible' means 'later' for "spring forward" transitions
353
+ case "compatible":
354
+ case "later":
355
+ return Math.max(l - o, l - c);
356
+ case "reject":
357
+ throw new RangeError("No such absolute time found");
358
+ }
359
+ }
360
+ function ht(e, t, n = "compatible") {
361
+ return new Date(B(e, t, n));
362
+ }
363
+ function F(e, t) {
364
+ let n = De(e, t), a = new Date(e + n), l = a.getUTCFullYear(), o = a.getUTCMonth() + 1, c = a.getUTCDate(), s = a.getUTCHours(), d = a.getUTCMinutes(), h = a.getUTCSeconds(), f = a.getUTCMilliseconds();
365
+ return new q(l < 1 ? "BC" : "AD", l < 1 ? -l + 1 : l, o, c, t, n, s, d, h, f);
366
+ }
367
+ function Gt(e) {
368
+ return new V(e.calendar, e.era, e.year, e.month, e.day);
369
+ }
370
+ function X(e, t) {
371
+ let n = 0, a = 0, l = 0, o = 0;
372
+ if ("timeZone" in e) ({ hour: n, minute: a, second: l, millisecond: o } = e);
373
+ else if ("hour" in e && !t) return e;
374
+ return t && ({ hour: n, minute: a, second: l, millisecond: o } = t), new Q(e.calendar, e.era, e.year, e.month, e.day, n, a, l, o);
375
+ }
376
+ function R(e, t) {
377
+ if (Ht(e.calendar, t)) return e;
378
+ let n = t.fromJulianDay(e.calendar.toJulianDay(e)), a = e.copy();
379
+ return a.calendar = t, a.era = n.era, a.year = n.year, a.month = n.month, a.day = n.day, W(a), a;
380
+ }
381
+ function Jt(e, t, n) {
382
+ if (e instanceof q)
383
+ return e.timeZone === t ? e : Qt(e, t);
384
+ let a = B(e, t, n);
385
+ return F(a, t);
386
+ }
387
+ function Xt(e) {
388
+ let t = J(e) - e.offset;
389
+ return new Date(t);
390
+ }
391
+ function Qt(e, t) {
392
+ let n = J(e) - e.offset;
393
+ return R(F(n, t), e.calendar);
394
+ }
395
+ const ne = 36e5;
396
+ function he(e, t) {
397
+ let n = e.copy(), a = "hour" in n ? xt(n, t) : 0;
398
+ Ie(n, t.years || 0), n.calendar.balanceYearMonth && n.calendar.balanceYearMonth(n, e), n.month += t.months || 0, Se(n), ft(n), n.day += (t.weeks || 0) * 7, n.day += t.days || 0, n.day += a, en(n), n.calendar.balanceDate && n.calendar.balanceDate(n), n.year < 1 && (n.year = 1, n.month = 1, n.day = 1);
399
+ let l = n.calendar.getYearsInEra(n);
400
+ if (n.year > l) {
401
+ let c = n.calendar.isInverseEra?.(n);
402
+ n.year = l, n.month = c ? 1 : n.calendar.getMonthsInYear(n), n.day = c ? 1 : n.calendar.getDaysInMonth(n);
403
+ }
404
+ n.month < 1 && (n.month = 1, n.day = 1);
405
+ let o = n.calendar.getMonthsInYear(n);
406
+ return n.month > o && (n.month = o, n.day = n.calendar.getDaysInMonth(n)), n.day = Math.max(1, Math.min(n.calendar.getDaysInMonth(n), n.day)), n;
407
+ }
408
+ function Ie(e, t) {
409
+ e.calendar.isInverseEra?.(e) && (t = -t), e.year += t;
410
+ }
411
+ function Se(e) {
412
+ for (; e.month < 1; )
413
+ Ie(e, -1), e.month += e.calendar.getMonthsInYear(e);
414
+ let t = 0;
415
+ for (; e.month > (t = e.calendar.getMonthsInYear(e)); )
416
+ e.month -= t, Ie(e, 1);
417
+ }
418
+ function en(e) {
419
+ for (; e.day < 1; )
420
+ e.month--, Se(e), e.day += e.calendar.getDaysInMonth(e);
421
+ for (; e.day > e.calendar.getDaysInMonth(e); )
422
+ e.day -= e.calendar.getDaysInMonth(e), e.month++, Se(e);
423
+ }
424
+ function ft(e) {
425
+ e.month = Math.max(1, Math.min(e.calendar.getMonthsInYear(e), e.month)), e.day = Math.max(1, Math.min(e.calendar.getDaysInMonth(e), e.day));
426
+ }
427
+ function W(e) {
428
+ e.calendar.constrainDate && e.calendar.constrainDate(e), e.year = Math.max(1, Math.min(e.calendar.getYearsInEra(e), e.year)), ft(e);
429
+ }
430
+ function Te(e) {
431
+ let t = {};
432
+ for (let n in e) typeof e[n] == "number" && (t[n] = -e[n]);
433
+ return t;
434
+ }
435
+ function pt(e, t) {
436
+ return he(e, Te(t));
437
+ }
438
+ function Ee(e, t) {
439
+ let n = e.copy();
440
+ return t.era != null && (n.era = t.era), t.year != null && (n.year = t.year), t.month != null && (n.month = t.month), t.day != null && (n.day = t.day), W(n), n;
441
+ }
442
+ function re(e, t) {
443
+ let n = e.copy();
444
+ return t.hour != null && (n.hour = t.hour), t.minute != null && (n.minute = t.minute), t.second != null && (n.second = t.second), t.millisecond != null && (n.millisecond = t.millisecond), yt(n), n;
445
+ }
446
+ function tn(e) {
447
+ e.second += Math.floor(e.millisecond / 1e3), e.millisecond = ce(e.millisecond, 1e3), e.minute += Math.floor(e.second / 60), e.second = ce(e.second, 60), e.hour += Math.floor(e.minute / 60), e.minute = ce(e.minute, 60);
448
+ let t = Math.floor(e.hour / 24);
449
+ return e.hour = ce(e.hour, 24), t;
450
+ }
451
+ function yt(e) {
452
+ e.millisecond = Math.max(0, Math.min(e.millisecond, 1e3)), e.second = Math.max(0, Math.min(e.second, 59)), e.minute = Math.max(0, Math.min(e.minute, 59)), e.hour = Math.max(0, Math.min(e.hour, 23));
453
+ }
454
+ function ce(e, t) {
455
+ let n = e % t;
456
+ return n < 0 && (n += t), n;
457
+ }
458
+ function xt(e, t) {
459
+ return e.hour += t.hours || 0, e.minute += t.minutes || 0, e.second += t.seconds || 0, e.millisecond += t.milliseconds || 0, tn(e);
460
+ }
461
+ function bt(e, t) {
462
+ let n = e.copy();
463
+ return xt(n, t), n;
464
+ }
465
+ function nn(e, t) {
466
+ return bt(e, Te(t));
467
+ }
468
+ function Re(e, t, n, a) {
469
+ let l = e.copy();
470
+ switch (t) {
471
+ case "era": {
472
+ let o = e.calendar.getEras(), c = o.indexOf(e.era);
473
+ if (c < 0) throw new Error("Invalid era: " + e.era);
474
+ c = Z(c, n, 0, o.length - 1, a?.round), l.era = o[c], W(l);
475
+ break;
476
+ }
477
+ case "year":
478
+ l.calendar.isInverseEra?.(l) && (n = -n), l.year = Z(e.year, n, -1 / 0, 9999, a?.round), l.year === -1 / 0 && (l.year = 1), l.calendar.balanceYearMonth && l.calendar.balanceYearMonth(l, e);
479
+ break;
480
+ case "month":
481
+ l.month = Z(e.month, n, 1, e.calendar.getMonthsInYear(e), a?.round);
482
+ break;
483
+ case "day":
484
+ l.day = Z(e.day, n, 1, e.calendar.getDaysInMonth(e), a?.round);
485
+ break;
486
+ default:
487
+ throw new Error("Unsupported field " + t);
488
+ }
489
+ return e.calendar.balanceDate && e.calendar.balanceDate(l), W(l), l;
490
+ }
491
+ function Le(e, t, n, a) {
492
+ let l = e.copy();
493
+ switch (t) {
494
+ case "hour": {
495
+ let o = e.hour, c = 0, s = 23;
496
+ if (a?.hourCycle === 12) {
497
+ let d = o >= 12;
498
+ c = d ? 12 : 0, s = d ? 23 : 11;
499
+ }
500
+ l.hour = Z(o, n, c, s, a?.round);
501
+ break;
502
+ }
503
+ case "minute":
504
+ l.minute = Z(e.minute, n, 0, 59, a?.round);
505
+ break;
506
+ case "second":
507
+ l.second = Z(e.second, n, 0, 59, a?.round);
508
+ break;
509
+ case "millisecond":
510
+ l.millisecond = Z(e.millisecond, n, 0, 999, a?.round);
511
+ break;
512
+ default:
513
+ throw new Error("Unsupported field " + t);
514
+ }
515
+ return l;
516
+ }
517
+ function Z(e, t, n, a, l = !1) {
518
+ if (l) {
519
+ e += Math.sign(t), e < n && (e = a);
520
+ let o = Math.abs(t);
521
+ t > 0 ? e = Math.ceil(e / o) * o : e = Math.floor(e / o) * o, e > a && (e = n);
522
+ } else
523
+ e += t, e < n ? e = a - (n - e - 1) : e > a && (e = n + (e - a - 1));
524
+ return e;
525
+ }
526
+ function gt(e, t) {
527
+ let n;
528
+ if (t.years != null && t.years !== 0 || t.months != null && t.months !== 0 || t.weeks != null && t.weeks !== 0 || t.days != null && t.days !== 0) {
529
+ let l = he(X(e), {
530
+ years: t.years,
531
+ months: t.months,
532
+ weeks: t.weeks,
533
+ days: t.days
534
+ });
535
+ n = B(l, e.timeZone);
536
+ } else
537
+ n = J(e) - e.offset;
538
+ n += t.milliseconds || 0, n += (t.seconds || 0) * 1e3, n += (t.minutes || 0) * 6e4, n += (t.hours || 0) * 36e5;
539
+ let a = F(n, e.timeZone);
540
+ return R(a, e.calendar);
541
+ }
542
+ function an(e, t) {
543
+ return gt(e, Te(t));
544
+ }
545
+ function rn(e, t, n, a) {
546
+ switch (t) {
547
+ case "hour": {
548
+ let l = 0, o = 23;
549
+ if (a?.hourCycle === 12) {
550
+ let y = e.hour >= 12;
551
+ l = y ? 12 : 0, o = y ? 23 : 11;
552
+ }
553
+ let c = X(e), s = R(re(c, {
554
+ hour: l
555
+ }), new G()), d = [
556
+ B(s, e.timeZone, "earlier"),
557
+ B(s, e.timeZone, "later")
558
+ ].filter((y) => F(y, e.timeZone).day === s.day)[0], h = R(re(c, {
559
+ hour: o
560
+ }), new G()), f = [
561
+ B(h, e.timeZone, "earlier"),
562
+ B(h, e.timeZone, "later")
563
+ ].filter((y) => F(y, e.timeZone).day === h.day).pop(), i = J(e) - e.offset, u = Math.floor(i / ne), m = i % ne;
564
+ return i = Z(u, n, Math.floor(d / ne), Math.floor(f / ne), a?.round) * ne + m, R(F(i, e.timeZone), e.calendar);
565
+ }
566
+ case "minute":
567
+ case "second":
568
+ case "millisecond":
569
+ return Le(e, t, n, a);
570
+ case "era":
571
+ case "year":
572
+ case "month":
573
+ case "day": {
574
+ let l = Re(X(e), t, n, a), o = B(l, e.timeZone);
575
+ return R(F(o, e.timeZone), e.calendar);
576
+ }
577
+ default:
578
+ throw new Error("Unsupported field " + t);
579
+ }
580
+ }
581
+ function ln(e, t, n) {
582
+ let a = X(e), l = re(Ee(a, t), t);
583
+ if (l.compare(a) === 0) return e;
584
+ let o = B(l, e.timeZone, n);
585
+ return R(F(o, e.timeZone), e.calendar);
586
+ }
587
+ function _t(e) {
588
+ return `${String(e.hour).padStart(2, "0")}:${String(e.minute).padStart(2, "0")}:${String(e.second).padStart(2, "0")}${e.millisecond ? String(e.millisecond / 1e3).slice(1) : ""}`;
589
+ }
590
+ function vt(e) {
591
+ let t = R(e, new G()), n;
592
+ return t.era === "BC" ? n = t.year === 1 ? "0000" : "-" + String(Math.abs(1 - t.year)).padStart(6, "00") : n = String(t.year).padStart(4, "0"), `${n}-${String(t.month).padStart(2, "0")}-${String(t.day).padStart(2, "0")}`;
593
+ }
594
+ function $t(e) {
595
+ return `${vt(e)}T${_t(e)}`;
596
+ }
597
+ function on(e) {
598
+ let t = Math.sign(e) < 0 ? "-" : "+";
599
+ e = Math.abs(e);
600
+ let n = Math.floor(e / 36e5), a = Math.floor(e % 36e5 / 6e4), l = Math.floor(e % 36e5 % 6e4 / 1e3), o = `${t}${String(n).padStart(2, "0")}:${String(a).padStart(2, "0")}`;
601
+ return l !== 0 && (o += `:${String(l).padStart(2, "0")}`), o;
602
+ }
603
+ function sn(e) {
604
+ return `${$t(e)}${on(e.offset)}[${e.timeZone}]`;
605
+ }
606
+ function Pe(e) {
607
+ let t = typeof e[0] == "object" ? e.shift() : new G(), n;
608
+ if (typeof e[0] == "string") n = e.shift();
609
+ else {
610
+ let c = t.getEras();
611
+ n = c[c.length - 1];
612
+ }
613
+ let a = e.shift(), l = e.shift(), o = e.shift();
614
+ return [
615
+ t,
616
+ n,
617
+ a,
618
+ l,
619
+ o
620
+ ];
621
+ }
622
+ class V {
623
+ // This prevents TypeScript from allowing other types with the same fields to match.
624
+ // i.e. a ZonedDateTime should not be be passable to a parameter that expects CalendarDate.
625
+ // If that behavior is desired, use the AnyCalendarDate interface instead.
626
+ // @ts-ignore
627
+ #e;
628
+ constructor(...t) {
629
+ let [n, a, l, o, c] = Pe(t);
630
+ this.calendar = n, this.era = a, this.year = l, this.month = o, this.day = c, W(this);
631
+ }
632
+ /** Returns a copy of this date. */
633
+ copy() {
634
+ return this.era ? new V(this.calendar, this.era, this.year, this.month, this.day) : new V(this.calendar, this.year, this.month, this.day);
635
+ }
636
+ /** Returns a new `CalendarDate` with the given duration added to it. */
637
+ add(t) {
638
+ return he(this, t);
639
+ }
640
+ /** Returns a new `CalendarDate` with the given duration subtracted from it. */
641
+ subtract(t) {
642
+ return pt(this, t);
643
+ }
644
+ /**
645
+ * Returns a new `CalendarDate` with the given fields set to the provided values. Other fields
646
+ * will be constrained accordingly.
647
+ */
648
+ set(t) {
649
+ return Ee(this, t);
650
+ }
651
+ /**
652
+ * Returns a new `CalendarDate` with the given field adjusted by a specified amount.
653
+ * When the resulting value reaches the limits of the field, it wraps around.
654
+ */
655
+ cycle(t, n, a) {
656
+ return Re(this, t, n, a);
657
+ }
658
+ /**
659
+ * Converts the date to a native JavaScript Date object, with the time set to midnight in the
660
+ * given time zone.
661
+ */
662
+ toDate(t) {
663
+ return ht(this, t);
664
+ }
665
+ /** Converts the date to an ISO 8601 formatted string. */
666
+ toString() {
667
+ return vt(this);
668
+ }
669
+ /**
670
+ * Compares this date with another. A negative result indicates that this date is before the given
671
+ * one, and a positive date indicates that it is after.
672
+ */
673
+ compare(t) {
674
+ return ct(this, t);
675
+ }
676
+ }
677
+ class je {
678
+ // This prevents TypeScript from allowing other types with the same fields to match.
679
+ // @ts-ignore
680
+ #e;
681
+ constructor(t = 0, n = 0, a = 0, l = 0) {
682
+ this.hour = t, this.minute = n, this.second = a, this.millisecond = l, yt(this);
683
+ }
684
+ /** Returns a copy of this time. */
685
+ copy() {
686
+ return new je(this.hour, this.minute, this.second, this.millisecond);
687
+ }
688
+ /** Returns a new `Time` with the given duration added to it. */
689
+ add(t) {
690
+ return bt(this, t);
691
+ }
692
+ /** Returns a new `Time` with the given duration subtracted from it. */
693
+ subtract(t) {
694
+ return nn(this, t);
695
+ }
696
+ /**
697
+ * Returns a new `Time` with the given fields set to the provided values. Other fields will be
698
+ * constrained accordingly.
699
+ */
700
+ set(t) {
701
+ return re(this, t);
702
+ }
703
+ /**
704
+ * Returns a new `Time` with the given field adjusted by a specified amount.
705
+ * When the resulting value reaches the limits of the field, it wraps around.
706
+ */
707
+ cycle(t, n, a) {
708
+ return Le(this, t, n, a);
709
+ }
710
+ /** Converts the time to an ISO 8601 formatted string. */
711
+ toString() {
712
+ return _t(this);
713
+ }
714
+ /**
715
+ * Compares this time with another. A negative result indicates that this time is before the given
716
+ * one, and a positive time indicates that it is after.
717
+ */
718
+ compare(t) {
719
+ return it(this, t);
720
+ }
721
+ }
722
+ class Q {
723
+ // This prevents TypeScript from allowing other types with the same fields to match.
724
+ // @ts-ignore
725
+ #e;
726
+ constructor(...t) {
727
+ let [n, a, l, o, c] = Pe(t);
728
+ this.calendar = n, this.era = a, this.year = l, this.month = o, this.day = c, this.hour = t.shift() || 0, this.minute = t.shift() || 0, this.second = t.shift() || 0, this.millisecond = t.shift() || 0, W(this);
729
+ }
730
+ /** Returns a copy of this date. */
731
+ copy() {
732
+ return this.era ? new Q(this.calendar, this.era, this.year, this.month, this.day, this.hour, this.minute, this.second, this.millisecond) : new Q(this.calendar, this.year, this.month, this.day, this.hour, this.minute, this.second, this.millisecond);
733
+ }
734
+ /** Returns a new `CalendarDateTime` with the given duration added to it. */
735
+ add(t) {
736
+ return he(this, t);
737
+ }
738
+ /** Returns a new `CalendarDateTime` with the given duration subtracted from it. */
739
+ subtract(t) {
740
+ return pt(this, t);
741
+ }
742
+ /**
743
+ * Returns a new `CalendarDateTime` with the given fields set to the provided values. Other fields
744
+ * will be constrained accordingly.
745
+ */
746
+ set(t) {
747
+ return Ee(re(this, t), t);
748
+ }
749
+ /**
750
+ * Returns a new `CalendarDateTime` with the given field adjusted by a specified amount.
751
+ * When the resulting value reaches the limits of the field, it wraps around.
752
+ */
753
+ cycle(t, n, a) {
754
+ switch (t) {
755
+ case "era":
756
+ case "year":
757
+ case "month":
758
+ case "day":
759
+ return Re(this, t, n, a);
760
+ default:
761
+ return Le(this, t, n, a);
762
+ }
763
+ }
764
+ /** Converts the date to a native JavaScript Date object in the given time zone. */
765
+ toDate(t, n) {
766
+ return ht(this, t, n);
767
+ }
768
+ /** Converts the date to an ISO 8601 formatted string. */
769
+ toString() {
770
+ return $t(this);
771
+ }
772
+ /**
773
+ * Compares this date with another. A negative result indicates that this date is before the given
774
+ * one, and a positive date indicates that it is after.
775
+ */
776
+ compare(t) {
777
+ let n = ct(this, t);
778
+ return n === 0 ? it(this, X(t)) : n;
779
+ }
780
+ }
781
+ class q {
782
+ // This prevents TypeScript from allowing other types with the same fields to match.
783
+ // @ts-ignore
784
+ #e;
785
+ constructor(...t) {
786
+ let [n, a, l, o, c] = Pe(t), s = t.shift(), d = t.shift();
787
+ this.calendar = n, this.era = a, this.year = l, this.month = o, this.day = c, this.timeZone = s, this.offset = d, this.hour = t.shift() || 0, this.minute = t.shift() || 0, this.second = t.shift() || 0, this.millisecond = t.shift() || 0, W(this);
788
+ }
789
+ /** Returns a copy of this date. */
790
+ copy() {
791
+ return this.era ? new q(this.calendar, this.era, this.year, this.month, this.day, this.timeZone, this.offset, this.hour, this.minute, this.second, this.millisecond) : new q(this.calendar, this.year, this.month, this.day, this.timeZone, this.offset, this.hour, this.minute, this.second, this.millisecond);
792
+ }
793
+ /** Returns a new `ZonedDateTime` with the given duration added to it. */
794
+ add(t) {
795
+ return gt(this, t);
796
+ }
797
+ /** Returns a new `ZonedDateTime` with the given duration subtracted from it. */
798
+ subtract(t) {
799
+ return an(this, t);
800
+ }
801
+ /**
802
+ * Returns a new `ZonedDateTime` with the given fields set to the provided values. Other fields
803
+ * will be constrained accordingly.
804
+ */
805
+ set(t, n) {
806
+ return ln(this, t, n);
807
+ }
808
+ /**
809
+ * Returns a new `ZonedDateTime` with the given field adjusted by a specified amount.
810
+ * When the resulting value reaches the limits of the field, it wraps around.
811
+ */
812
+ cycle(t, n, a) {
813
+ return rn(this, t, n, a);
814
+ }
815
+ /** Converts the date to a native JavaScript Date object. */
816
+ toDate() {
817
+ return Xt(this);
818
+ }
819
+ /**
820
+ * Converts the date to an ISO 8601 formatted string, including the UTC offset and time zone
821
+ * identifier.
822
+ */
823
+ toString() {
824
+ return sn(this);
825
+ }
826
+ /** Converts the date to an ISO 8601 formatted string in UTC. */
827
+ toAbsoluteString() {
828
+ return this.toDate().toISOString();
829
+ }
830
+ /**
831
+ * Compares this date with another. A negative result indicates that this date is before the given
832
+ * one, and a positive date indicates that it is after.
833
+ */
834
+ compare(t) {
835
+ return this.toDate().getTime() - Jt(t, this.timeZone).toDate().getTime();
836
+ }
837
+ }
838
+ let $e = /* @__PURE__ */ new Map();
839
+ class T {
840
+ constructor(t, n = {}) {
841
+ this.formatter = Nt(t, n), this.options = n;
842
+ }
843
+ /**
844
+ * Formats a date as a string according to the locale and format options passed to the
845
+ * constructor.
846
+ */
847
+ format(t) {
848
+ return this.formatter.format(t);
849
+ }
850
+ /** Formats a date to an array of parts such as separators, numbers, punctuation, and more. */
851
+ formatToParts(t) {
852
+ return this.formatter.formatToParts(t);
853
+ }
854
+ /** Formats a date range as a string. */
855
+ formatRange(t, n) {
856
+ if (typeof this.formatter.formatRange == "function")
857
+ return this.formatter.formatRange(t, n);
858
+ if (n < t) throw new RangeError("End date must be >= start date");
859
+ return `${this.formatter.format(t)} – ${this.formatter.format(n)}`;
860
+ }
861
+ /** Formats a date range as an array of parts. */
862
+ formatRangeToParts(t, n) {
863
+ if (typeof this.formatter.formatRangeToParts == "function")
864
+ return this.formatter.formatRangeToParts(t, n);
865
+ if (n < t) throw new RangeError("End date must be >= start date");
866
+ let a = this.formatter.formatToParts(t), l = this.formatter.formatToParts(n);
867
+ return [
868
+ ...a.map((o) => ({
869
+ ...o,
870
+ source: "startRange"
871
+ })),
872
+ {
873
+ type: "literal",
874
+ value: " – ",
875
+ source: "shared"
876
+ },
877
+ ...l.map((o) => ({
878
+ ...o,
879
+ source: "endRange"
880
+ }))
881
+ ];
882
+ }
883
+ /** Returns the resolved formatting options based on the values passed to the constructor. */
884
+ resolvedOptions() {
885
+ let t = this.formatter.resolvedOptions();
886
+ return un() && (this.resolvedHourCycle || (this.resolvedHourCycle = mn(t.locale, this.options)), t.hourCycle = this.resolvedHourCycle, t.hour12 = this.resolvedHourCycle === "h11" || this.resolvedHourCycle === "h12"), t.calendar === "ethiopic-amete-alem" && (t.calendar = "ethioaa"), t;
887
+ }
888
+ }
889
+ const cn = {
890
+ true: {
891
+ // Only Japanese uses the h11 style for 12 hour time. All others use h12.
892
+ ja: "h11"
893
+ },
894
+ false: {}
895
+ };
896
+ function Nt(e, t = {}) {
897
+ if (typeof t.hour12 == "boolean" && dn()) {
898
+ t = {
899
+ ...t
900
+ };
901
+ let l = cn[String(t.hour12)][e.split("-")[0]], o = t.hour12 ? "h12" : "h23";
902
+ t.hourCycle = l ?? o, delete t.hour12;
903
+ }
904
+ let n = e + (t ? Object.entries(t).sort((l, o) => l[0] < o[0] ? -1 : 1).join() : "");
905
+ if ($e.has(n)) return $e.get(n);
906
+ let a = new Intl.DateTimeFormat(e, t);
907
+ return $e.set(n, a), a;
908
+ }
909
+ let Ne = null;
910
+ function dn() {
911
+ return Ne == null && (Ne = new Intl.DateTimeFormat("en-US", {
912
+ hour: "numeric",
913
+ hour12: !1
914
+ }).format(new Date(2020, 2, 3, 0)) === "24"), Ne;
915
+ }
916
+ let we = null;
917
+ function un() {
918
+ return we == null && (we = new Intl.DateTimeFormat("fr", {
919
+ hour: "numeric",
920
+ hour12: !1
921
+ }).resolvedOptions().hourCycle === "h12"), we;
922
+ }
923
+ function mn(e, t) {
924
+ if (!t.timeStyle && !t.hour) return;
925
+ e = e.replace(/(-u-)?-nu-[a-zA-Z0-9]+/, ""), e += (e.includes("-u-") ? "" : "-u") + "-nu-latn";
926
+ let n = Nt(e, {
927
+ ...t,
928
+ timeZone: void 0
929
+ // use local timezone
930
+ }), a = parseInt(n.formatToParts(new Date(2020, 2, 3, 0)).find((o) => o.type === "hour").value, 10), l = parseInt(n.formatToParts(new Date(2020, 2, 3, 23)).find((o) => o.type === "hour").value, 10);
931
+ if (a === 0 && l === 23) return "h23";
932
+ if (a === 24 && l === 23) return "h24";
933
+ if (a === 0 && l === 11) return "h11";
934
+ if (a === 12 && l === 11) return "h12";
935
+ throw new Error("Unexpected hour cycle result");
936
+ }
937
+ function g(...e) {
938
+ return e.filter(Boolean).join(" ");
939
+ }
940
+ function H(e, t = ae()) {
941
+ return e instanceof q ? e.toDate() : e.toDate(t);
942
+ }
943
+ function hn(e) {
944
+ return e instanceof Q;
945
+ }
946
+ function fe(e) {
947
+ return e instanceof q;
948
+ }
949
+ function fn(e) {
950
+ return hn(e) || fe(e);
951
+ }
952
+ function pn(e) {
953
+ if (e instanceof Date) {
954
+ const t = e.getFullYear(), n = e.getMonth() + 1;
955
+ return new Date(t, n, 0).getDate();
956
+ } else
957
+ return e.set({ day: 100 }).day;
958
+ }
959
+ function yn(e, t, n) {
960
+ const a = Yt(e, n);
961
+ return t > a ? e.subtract({ days: a + 7 - t }) : t === a ? e : e.subtract({ days: a - t });
962
+ }
963
+ function Ke(e) {
964
+ return e instanceof je ? new Q(2020, 1, 1, e.hour, e.minute, e.second, e.millisecond) : e;
965
+ }
966
+ const wt = {
967
+ year: "numeric",
968
+ month: "numeric",
969
+ day: "numeric",
970
+ hour: "numeric",
971
+ minute: "numeric",
972
+ second: "numeric"
973
+ };
974
+ function xn(e) {
975
+ return typeof e == "object" && e !== null && "current" in e;
976
+ }
977
+ function me(e) {
978
+ return xn(e) ? () => e.current : () => e;
979
+ }
980
+ function kt(e) {
981
+ const t = me(e.locale), n = me(e.monthFormat ?? "long"), a = me(e.yearFormat ?? "numeric");
982
+ let l;
983
+ const o = () => l ?? t();
984
+ function c(_) {
985
+ l = _;
986
+ }
987
+ function s() {
988
+ return o();
989
+ }
990
+ function d(_, x) {
991
+ return new T(o(), x).format(_);
992
+ }
993
+ function h(_, x = !0) {
994
+ return fn(_) && x ? d(H(_), { dateStyle: "long", timeStyle: "long" }) : d(H(_), { dateStyle: "long" });
995
+ }
996
+ function f(_) {
997
+ const x = n(), $ = a();
998
+ if (typeof x != "function" && typeof $ != "function")
999
+ return new T(o(), { month: x, year: $ }).format(_);
1000
+ const k = typeof x == "function" ? x(_.getMonth() + 1) : new T(o(), { month: x }).format(_), M = typeof $ == "function" ? $(_.getFullYear()) : new T(o(), { year: $ }).format(_);
1001
+ return `${k} ${M}`;
1002
+ }
1003
+ function i(_) {
1004
+ return new T(o(), { month: "long" }).format(_);
1005
+ }
1006
+ function u(_) {
1007
+ return new T(o(), { year: "numeric" }).format(_);
1008
+ }
1009
+ function m(_, x) {
1010
+ return fe(_) ? new T(o(), { ...x, timeZone: _.timeZone }).formatToParts(
1011
+ H(_)
1012
+ ) : new T(o(), x).formatToParts(H(_));
1013
+ }
1014
+ function y(_, x = "narrow") {
1015
+ return new T(o(), { weekday: x }).format(_);
1016
+ }
1017
+ function p(_, x = void 0) {
1018
+ return new T(o(), {
1019
+ hour: "numeric",
1020
+ minute: "numeric",
1021
+ hourCycle: x === 24 ? "h23" : void 0
1022
+ }).formatToParts(_).find(($) => $.type === "dayPeriod")?.value === "PM" ? "PM" : "AM";
1023
+ }
1024
+ function v(_, x, $ = {}) {
1025
+ return m(_, { ...wt, ...$ }).find((k) => k.type === x)?.value ?? "";
1026
+ }
1027
+ return {
1028
+ setLocale: c,
1029
+ getLocale: s,
1030
+ custom: d,
1031
+ selectedDate: h,
1032
+ fullMonthAndYear: f,
1033
+ fullMonth: i,
1034
+ fullYear: u,
1035
+ toParts: m,
1036
+ dayOfWeek: y,
1037
+ dayPeriod: p,
1038
+ part: v
1039
+ };
1040
+ }
1041
+ function ga(e) {
1042
+ const t = me(e);
1043
+ let n;
1044
+ const a = () => n ?? t();
1045
+ function l(i) {
1046
+ n = i;
1047
+ }
1048
+ function o() {
1049
+ return a();
1050
+ }
1051
+ function c(i, u) {
1052
+ return new T(a(), u).format(i);
1053
+ }
1054
+ function s(i) {
1055
+ return c(H(Ke(i)), { timeStyle: "long" });
1056
+ }
1057
+ function d(i, u) {
1058
+ const m = Ke(i);
1059
+ return fe(m) ? new T(a(), {
1060
+ ...u,
1061
+ timeZone: m.timeZone
1062
+ }).formatToParts(H(m)) : new T(a(), u).formatToParts(H(m));
1063
+ }
1064
+ function h(i, u = void 0) {
1065
+ return new T(a(), {
1066
+ hour: "numeric",
1067
+ minute: "numeric",
1068
+ hourCycle: u === 24 ? "h23" : void 0
1069
+ }).formatToParts(i).find((m) => m.type === "dayPeriod")?.value === "PM" ? "PM" : "AM";
1070
+ }
1071
+ function f(i, u, m = {}) {
1072
+ return d(i, { ...wt, ...m }).find((y) => y.type === u)?.value ?? "";
1073
+ }
1074
+ return {
1075
+ setLocale: l,
1076
+ getLocale: o,
1077
+ custom: c,
1078
+ selectedTime: s,
1079
+ toParts: d,
1080
+ dayPeriod: h,
1081
+ part: f
1082
+ };
1083
+ }
1084
+ const bn = [
1085
+ "ach",
1086
+ "af",
1087
+ "am",
1088
+ "an",
1089
+ "ar",
1090
+ "ast",
1091
+ "az",
1092
+ "be",
1093
+ "bg",
1094
+ "bn",
1095
+ "br",
1096
+ "bs",
1097
+ "ca",
1098
+ "cak",
1099
+ "ckb",
1100
+ "cs",
1101
+ "cy",
1102
+ "da",
1103
+ "de",
1104
+ "dsb",
1105
+ "el",
1106
+ "en",
1107
+ "eo",
1108
+ "es",
1109
+ "et",
1110
+ "eu",
1111
+ "fa",
1112
+ "ff",
1113
+ "fi",
1114
+ "fr",
1115
+ "fy",
1116
+ "ga",
1117
+ "gd",
1118
+ "gl",
1119
+ "he",
1120
+ "hr",
1121
+ "hsb",
1122
+ "hu",
1123
+ "ia",
1124
+ "id",
1125
+ "it",
1126
+ "ja",
1127
+ "ka",
1128
+ "kk",
1129
+ "kn",
1130
+ "ko",
1131
+ "lb",
1132
+ "lo",
1133
+ "lt",
1134
+ "lv",
1135
+ "meh",
1136
+ "ml",
1137
+ "ms",
1138
+ "nl",
1139
+ "nn",
1140
+ "no",
1141
+ "oc",
1142
+ "pl",
1143
+ "pt",
1144
+ "rm",
1145
+ "ro",
1146
+ "ru",
1147
+ "sc",
1148
+ "scn",
1149
+ "sk",
1150
+ "sl",
1151
+ "sr",
1152
+ "sv",
1153
+ "szl",
1154
+ "tg",
1155
+ "th",
1156
+ "tr",
1157
+ "uk",
1158
+ "zh-CN",
1159
+ "zh-TW"
1160
+ ], gn = ["year", "month", "day"], ke = {
1161
+ ach: { year: "mwaka", month: "dwe", day: "nino" },
1162
+ af: { year: "jjjj", month: "mm", day: "dd" },
1163
+ am: { year: "ዓዓዓዓ", month: "ሚሜ", day: "ቀቀ" },
1164
+ an: { year: "aaaa", month: "mm", day: "dd" },
1165
+ ar: { year: "سنة", month: "شهر", day: "يوم" },
1166
+ ast: { year: "aaaa", month: "mm", day: "dd" },
1167
+ az: { year: "iiii", month: "aa", day: "gg" },
1168
+ be: { year: "гггг", month: "мм", day: "дд" },
1169
+ bg: { year: "гггг", month: "мм", day: "дд" },
1170
+ bn: { year: "yyyy", month: "মিমি", day: "dd" },
1171
+ br: { year: "bbbb", month: "mm", day: "dd" },
1172
+ bs: { year: "gggg", month: "mm", day: "dd" },
1173
+ ca: { year: "aaaa", month: "mm", day: "dd" },
1174
+ cak: { year: "jjjj", month: "ii", day: "q'q'" },
1175
+ ckb: { year: "ساڵ", month: "مانگ", day: "ڕۆژ" },
1176
+ cs: { year: "rrrr", month: "mm", day: "dd" },
1177
+ cy: { year: "bbbb", month: "mm", day: "dd" },
1178
+ da: { year: "åååå", month: "mm", day: "dd" },
1179
+ de: { year: "jjjj", month: "mm", day: "tt" },
1180
+ dsb: { year: "llll", month: "mm", day: "źź" },
1181
+ el: { year: "εεεε", month: "μμ", day: "ηη" },
1182
+ en: { year: "yyyy", month: "mm", day: "dd" },
1183
+ eo: { year: "jjjj", month: "mm", day: "tt" },
1184
+ es: { year: "aaaa", month: "mm", day: "dd" },
1185
+ et: { year: "aaaa", month: "kk", day: "pp" },
1186
+ eu: { year: "uuuu", month: "hh", day: "ee" },
1187
+ fa: { year: "سال", month: "ماه", day: "روز" },
1188
+ ff: { year: "hhhh", month: "ll", day: "ññ" },
1189
+ fi: { year: "vvvv", month: "kk", day: "pp" },
1190
+ fr: { year: "aaaa", month: "mm", day: "jj" },
1191
+ fy: { year: "jjjj", month: "mm", day: "dd" },
1192
+ ga: { year: "bbbb", month: "mm", day: "ll" },
1193
+ gd: { year: "bbbb", month: "mm", day: "ll" },
1194
+ gl: { year: "aaaa", month: "mm", day: "dd" },
1195
+ he: { year: "שנה", month: "חודש", day: "יום" },
1196
+ hr: { year: "gggg", month: "mm", day: "dd" },
1197
+ hsb: { year: "llll", month: "mm", day: "dd" },
1198
+ hu: { year: "éééé", month: "hh", day: "nn" },
1199
+ ia: { year: "aaaa", month: "mm", day: "dd" },
1200
+ id: { year: "tttt", month: "bb", day: "hh" },
1201
+ it: { year: "aaaa", month: "mm", day: "gg" },
1202
+ ja: { year: " 年 ", month: "月", day: "日" },
1203
+ ka: { year: "წწწწ", month: "თთ", day: "რრ" },
1204
+ kk: { year: "жжжж", month: "аа", day: "кк" },
1205
+ kn: { year: "ವವವವ", month: "ಮಿಮೀ", day: "ದಿದಿ" },
1206
+ ko: { year: "연도", month: "월", day: "일" },
1207
+ lb: { year: "jjjj", month: "mm", day: "dd" },
1208
+ lo: { year: "ປປປປ", month: "ດດ", day: "ວວ" },
1209
+ lt: { year: "mmmm", month: "mm", day: "dd" },
1210
+ lv: { year: "gggg", month: "mm", day: "dd" },
1211
+ meh: { year: "aaaa", month: "mm", day: "dd" },
1212
+ ml: { year: "വർഷം", month: "മാസം", day: "തീയതി" },
1213
+ ms: { year: "tttt", month: "mm", day: "hh" },
1214
+ nl: { year: "jjjj", month: "mm", day: "dd" },
1215
+ nn: { year: "åååå", month: "mm", day: "dd" },
1216
+ no: { year: "åååå", month: "mm", day: "dd" },
1217
+ oc: { year: "aaaa", month: "mm", day: "jj" },
1218
+ pl: { year: "rrrr", month: "mm", day: "dd" },
1219
+ pt: { year: "aaaa", month: "mm", day: "dd" },
1220
+ rm: { year: "oooo", month: "mm", day: "dd" },
1221
+ ro: { year: "aaaa", month: "ll", day: "zz" },
1222
+ ru: { year: "гггг", month: "мм", day: "дд" },
1223
+ sc: { year: "aaaa", month: "mm", day: "dd" },
1224
+ scn: { year: "aaaa", month: "mm", day: "jj" },
1225
+ sk: { year: "rrrr", month: "mm", day: "dd" },
1226
+ sl: { year: "llll", month: "mm", day: "dd" },
1227
+ sr: { year: "гггг", month: "мм", day: "дд" },
1228
+ sv: { year: "åååå", month: "mm", day: "dd" },
1229
+ szl: { year: "rrrr", month: "mm", day: "dd" },
1230
+ tg: { year: "сссс", month: "мм", day: "рр" },
1231
+ th: { year: "ปปปป", month: "ดด", day: "วว" },
1232
+ tr: { year: "yyyy", month: "aa", day: "gg" },
1233
+ uk: { year: "рррр", month: "мм", day: "дд" },
1234
+ "zh-CN": { year: "年", month: "月", day: "日" },
1235
+ "zh-TW": { year: "年", month: "月", day: "日" }
1236
+ };
1237
+ function _n(e) {
1238
+ if (We(e))
1239
+ return ke[e];
1240
+ {
1241
+ const t = wn(e);
1242
+ return We(t) ? ke[t] : ke.en;
1243
+ }
1244
+ }
1245
+ function Me(e, t, n) {
1246
+ return vn(e) ? _n(n)[e] : Nn(e) ? t : $n(e) ? "––" : "";
1247
+ }
1248
+ function We(e) {
1249
+ return bn.includes(e);
1250
+ }
1251
+ function vn(e) {
1252
+ return gn.includes(e);
1253
+ }
1254
+ function $n(e) {
1255
+ return e === "hour" || e === "minute" || e === "second";
1256
+ }
1257
+ function Nn(e) {
1258
+ return e === "era" || e === "dayPeriod";
1259
+ }
1260
+ function wn(e) {
1261
+ return Intl.Locale ? new Intl.Locale(e).language : e.split("-")[0];
1262
+ }
1263
+ const Mt = ["day", "month", "year"], kn = ["hour", "minute", "second", "dayPeriod"], Mn = ["literal", "timeZoneName"], pe = [
1264
+ ...Mt,
1265
+ ...kn
1266
+ ], Cn = [
1267
+ ...pe,
1268
+ ...Mn
1269
+ ], Dn = typeof document < "u";
1270
+ function In(e) {
1271
+ return e instanceof HTMLElement;
1272
+ }
1273
+ function Y(e) {
1274
+ return e === null;
1275
+ }
1276
+ function Ve(e, t) {
1277
+ const n = t.indexOf(e);
1278
+ if (n === t.length - 1 || n === -1) return null;
1279
+ const a = n + 1;
1280
+ return t[a];
1281
+ }
1282
+ function Sn(e, t) {
1283
+ const n = t.indexOf(e);
1284
+ if (n === 0 || n === -1) return null;
1285
+ const a = n - 1;
1286
+ return t[a];
1287
+ }
1288
+ function Ct(e) {
1289
+ return e ? Array.from(e.querySelectorAll("[data-segment]")).filter(
1290
+ (t) => {
1291
+ if (!In(t)) return !1;
1292
+ const n = t.dataset.segment;
1293
+ return n === "trigger" ? !0 : !(!Ln(n) || n === "literal");
1294
+ }
1295
+ ) : [];
1296
+ }
1297
+ let qe = 0;
1298
+ function z(e = "mx") {
1299
+ return qe += 1, `${e}-${qe.toString(36)}`;
1300
+ }
1301
+ function Dt(e) {
1302
+ const t = ["hour", "minute", "second"], n = pe.map((a) => a === "dayPeriod" ? [a, "AM"] : [a, null]).filter(([a]) => a === "literal" || a === null ? !1 : !t.includes(a));
1303
+ return Object.fromEntries(n);
1304
+ }
1305
+ function An(e) {
1306
+ const { segmentValues: t, formatter: n, locale: a, dateRef: l } = e, o = Object.keys(t).reduce((s, d) => {
1307
+ if (!It(d)) return s;
1308
+ if ("hour" in t && d === "dayPeriod") {
1309
+ const h = t[d];
1310
+ Y(h) ? s[d] = Me(d, "AM", a) : s[d] = h;
1311
+ } else
1312
+ s[d] = c(d);
1313
+ return s;
1314
+ }, {});
1315
+ function c(s) {
1316
+ if ("hour" in t) {
1317
+ const d = t[s], h = typeof d == "string" && d?.startsWith("0"), f = d !== null ? Number.parseInt(d) : null;
1318
+ if (d === "0" && s !== "year")
1319
+ return "0";
1320
+ if (!Y(d) && !Y(f)) {
1321
+ const i = n.part(l.set({ [s]: d }), s, {
1322
+ hourCycle: e.hourCycle === 24 ? "h23" : void 0
1323
+ }), u = e.hourCycle === 12 || e.hourCycle === void 0 && Pn(a) === 12;
1324
+ if (s === "hour" && u) {
1325
+ if (f > 12) {
1326
+ const m = f - 12;
1327
+ return m === 0 ? "12" : m < 10 ? `0${m}` : `${m}`;
1328
+ }
1329
+ return f === 0 ? "12" : f < 10 ? `0${f}` : `${f}`;
1330
+ }
1331
+ return s === "year" ? `${d}` : h && i.length === 1 ? `0${i}` : i;
1332
+ } else
1333
+ return Me(s, "", a);
1334
+ } else {
1335
+ if (ye(s)) {
1336
+ const d = t[s], h = typeof d == "string" && d?.startsWith("0");
1337
+ if (d === "0")
1338
+ return "0";
1339
+ if (Y(d))
1340
+ return Me(s, "", a);
1341
+ {
1342
+ const f = n.part(l.set({ [s]: d }), s);
1343
+ return s === "year" ? `${d}` : h && f.length === 1 ? `0${f}` : f;
1344
+ }
1345
+ }
1346
+ return "";
1347
+ }
1348
+ }
1349
+ return o;
1350
+ }
1351
+ function Tn(e) {
1352
+ const { granularity: t, dateRef: n, formatter: a, contentObj: l, hideTimeZone: o, hourCycle: c } = e;
1353
+ return a.toParts(n, Rn(t, c)).map((s) => ["literal", "dayPeriod", "timeZoneName", null].includes(s.type) || !It(s.type) ? {
1354
+ part: s.type,
1355
+ value: s.value
1356
+ } : {
1357
+ part: s.type,
1358
+ value: l[s.type]
1359
+ }).filter((s) => !(Y(s.part) || Y(s.value) || s.part === "timeZoneName" && (!fe(n) || o)));
1360
+ }
1361
+ function En(e) {
1362
+ const t = An(e), n = Tn({
1363
+ contentObj: t,
1364
+ ...e
1365
+ });
1366
+ return {
1367
+ obj: t,
1368
+ arr: n
1369
+ };
1370
+ }
1371
+ function Rn(e, t) {
1372
+ const n = {
1373
+ year: "numeric",
1374
+ month: "2-digit",
1375
+ day: "2-digit",
1376
+ hour: "2-digit",
1377
+ minute: "2-digit",
1378
+ second: "2-digit",
1379
+ timeZoneName: "short",
1380
+ hourCycle: t === 24 ? "h23" : void 0,
1381
+ hour12: t === 24 ? !1 : void 0
1382
+ };
1383
+ return e === "day" && (delete n.second, delete n.hour, delete n.minute, delete n.timeZoneName), e === "hour" && delete n.minute, e === "minute" && delete n.second, n;
1384
+ }
1385
+ function ye(e) {
1386
+ return Mt.includes(e);
1387
+ }
1388
+ function It(e) {
1389
+ return pe.includes(e);
1390
+ }
1391
+ function Ln(e) {
1392
+ return Cn.includes(e);
1393
+ }
1394
+ function St(e) {
1395
+ return !Dn || !e ? [] : Ct(e).map((t) => t.dataset.segment).filter((t) => pe.includes(t));
1396
+ }
1397
+ function ze(e) {
1398
+ const { segmentObj: t, fieldNode: n, dateRef: a } = e, l = St(n);
1399
+ let o = a;
1400
+ for (const c of l)
1401
+ if ("hour" in t) {
1402
+ const s = t[c];
1403
+ if (Y(s)) continue;
1404
+ o = o.set({ [c]: t[c] });
1405
+ } else if (ye(c)) {
1406
+ const s = t[c];
1407
+ if (Y(s)) continue;
1408
+ o = o.set({ [c]: t[c] });
1409
+ }
1410
+ return o;
1411
+ }
1412
+ function Ge(e, t) {
1413
+ const n = St(t);
1414
+ for (const a of n)
1415
+ if ("hour" in e) {
1416
+ if (e[a] === null)
1417
+ return !1;
1418
+ } else if (ye(a) && e[a] === null)
1419
+ return !1;
1420
+ return !0;
1421
+ }
1422
+ function Pn(e) {
1423
+ return new Intl.DateTimeFormat(e, { hour: "numeric" }).formatToParts(/* @__PURE__ */ new Date("2023-01-01T13:00:00")).find((t) => t.type === "hour")?.value === "1" ? 12 : 24;
1424
+ }
1425
+ const At = 2024;
1426
+ function Je(e) {
1427
+ return {
1428
+ ...Dt(),
1429
+ day: String(e.day),
1430
+ month: String(e.month),
1431
+ year: String(e.year)
1432
+ };
1433
+ }
1434
+ function jn(e) {
1435
+ return pn(
1436
+ new V(Number(e.year) || At, Number(e.month) || 1, 1)
1437
+ );
1438
+ }
1439
+ function Xe(e, t) {
1440
+ return e === "month" ? 12 : e === "year" ? 9999 : jn(t);
1441
+ }
1442
+ function On(e = {}) {
1443
+ const { value: t, defaultValue: n, onChange: a, locale: l = "en" } = e, o = t !== void 0, c = w(null), [s, d] = N(
1444
+ () => n !== void 0 ? Je(n) : Dt()
1445
+ ), h = E(
1446
+ () => t !== void 0 ? Je(t) : s,
1447
+ [t, s]
1448
+ ), f = E(() => kt({ locale: l }), [l]), i = E(() => new V(At, 1, 1), []), u = E(
1449
+ () => En({
1450
+ segmentValues: h,
1451
+ formatter: f,
1452
+ locale: l,
1453
+ dateRef: i,
1454
+ granularity: "day",
1455
+ hideTimeZone: !1,
1456
+ hourCycle: void 0
1457
+ }),
1458
+ [h, f, l, i]
1459
+ ), m = K(
1460
+ (_) => (x) => {
1461
+ const $ = c.current, k = Ct($), M = h[_], A = _ === "year" ? 4 : 2, O = Xe(_, h), oe = (I) => {
1462
+ const D = { ...h, [_]: I };
1463
+ o || d(D), $ && Ge(D, $) ? a?.(ze({ segmentObj: D, fieldNode: $, dateRef: i })) : a?.(void 0);
1464
+ };
1465
+ if (/^[0-9]$/.test(x.key)) {
1466
+ x.preventDefault();
1467
+ let I = (M && M.length < A ? M : "") + x.key;
1468
+ Number(I) > O && (I = x.key);
1469
+ const D = I.length >= A || Number(I) * 10 > O, jt = D && I.length < A ? I.padStart(A, "0") : I;
1470
+ oe(jt), D && Ve(x.currentTarget, k)?.focus();
1471
+ return;
1472
+ }
1473
+ if (x.key === "ArrowUp" || x.key === "ArrowDown") {
1474
+ x.preventDefault();
1475
+ const I = x.key === "ArrowUp" ? 1 : -1;
1476
+ let D = Number(M);
1477
+ !M || Number.isNaN(D) ? D = I > 0 ? 1 : O : (D += I, D > O && (D = 1), D < 1 && (D = O)), oe(_ === "year" ? String(D) : String(D).padStart(2, "0"));
1478
+ return;
1479
+ }
1480
+ if (x.key === "ArrowLeft") {
1481
+ x.preventDefault(), Sn(x.currentTarget, k)?.focus();
1482
+ return;
1483
+ }
1484
+ if (x.key === "ArrowRight") {
1485
+ x.preventDefault(), Ve(x.currentTarget, k)?.focus();
1486
+ return;
1487
+ }
1488
+ if (x.key === "Backspace")
1489
+ if (x.preventDefault(), !M)
1490
+ oe(null);
1491
+ else {
1492
+ const I = M.slice(0, -1);
1493
+ oe(I.length ? I : null);
1494
+ }
1495
+ },
1496
+ [h, o, a, i]
1497
+ ), y = K(
1498
+ (_) => ye(_) ? {
1499
+ "data-segment": _,
1500
+ role: "spinbutton",
1501
+ inputMode: "numeric",
1502
+ tabIndex: 0,
1503
+ "aria-label": _,
1504
+ "aria-valuenow": Number(h[_]) || void 0,
1505
+ "aria-valuemin": 1,
1506
+ "aria-valuemax": Xe(_, h),
1507
+ onKeyDown: m(_)
1508
+ } : { "data-segment": _ },
1509
+ [h, m]
1510
+ ), p = E(
1511
+ () => u.arr.map((_) => ({ part: _.part, value: _.value })),
1512
+ [u]
1513
+ ), v = E(() => {
1514
+ if (t !== void 0) return t;
1515
+ const _ = c.current;
1516
+ if (_ && Ge(h, _))
1517
+ return ze({ segmentObj: h, fieldNode: _, dateRef: i });
1518
+ }, [t, h, i]);
1519
+ return {
1520
+ segments: p,
1521
+ fieldProps: { ref: c, role: "group" },
1522
+ segmentProps: y,
1523
+ value: v
1524
+ };
1525
+ }
1526
+ const Bn = 42;
1527
+ function Fn(e = {}) {
1528
+ const { value: t, defaultValue: n, onChange: a, locale: l = "en", firstDayOfWeek: o = 0 } = e, c = t !== void 0, [s, d] = N(n), h = c ? t : s, [f, i] = N(
1529
+ () => (t ?? n ?? Fe(ae())).set({ day: 1 })
1530
+ ), u = E(() => kt({ locale: l }), [l]), m = E(() => Fe(ae()), []), y = E(
1531
+ () => u.fullMonthAndYear(H(f)),
1532
+ [u, f]
1533
+ ), p = E(
1534
+ () => yn(f.set({ day: 1 }), o, l),
1535
+ [f, o, l]
1536
+ ), v = E(
1537
+ () => Array.from(
1538
+ { length: 7 },
1539
+ ($, k) => u.dayOfWeek(H(p.add({ days: k })), "short")
1540
+ ),
1541
+ [u, p]
1542
+ ), _ = K(
1543
+ ($) => {
1544
+ c || d($), a?.($);
1545
+ },
1546
+ [c, a]
1547
+ ), x = E(
1548
+ () => Array.from({ length: Bn }, ($, k) => {
1549
+ const M = p.add({ days: k }), A = h != null && Be(M, h);
1550
+ return {
1551
+ date: M,
1552
+ label: String(M.day),
1553
+ isSelected: A,
1554
+ isToday: Be(M, m),
1555
+ isOutsideMonth: M.month !== f.month,
1556
+ cellProps: {
1557
+ role: "gridcell",
1558
+ "aria-selected": A,
1559
+ "aria-label": u.selectedDate(M, !1),
1560
+ tabIndex: A ? 0 : -1,
1561
+ onClick: () => _(M)
1562
+ }
1563
+ };
1564
+ }),
1565
+ [p, h, m, f, u, _]
1566
+ );
1567
+ return {
1568
+ monthLabel: y,
1569
+ weekdays: v,
1570
+ cells: x,
1571
+ gridProps: { role: "grid", "aria-label": y },
1572
+ selected: h,
1573
+ prevButtonProps: {
1574
+ onClick: () => i(($) => $.subtract({ months: 1 })),
1575
+ "aria-label": "Previous month"
1576
+ },
1577
+ nextButtonProps: {
1578
+ onClick: () => i(($) => $.add({ months: 1 })),
1579
+ "aria-label": "Next month"
1580
+ }
1581
+ };
1582
+ }
1583
+ function Zn({
1584
+ forceMount: e,
1585
+ open: t
1586
+ }) {
1587
+ return t;
1588
+ }
1589
+ const Hn = [
1590
+ "a[href]",
1591
+ "button:not([disabled])",
1592
+ "input:not([disabled])",
1593
+ "textarea:not([disabled])",
1594
+ "select:not([disabled])",
1595
+ '[tabindex]:not([tabindex="-1"])'
1596
+ ].join(",");
1597
+ function Yn(e) {
1598
+ return !!(e.offsetWidth || e.offsetHeight || e.getClientRects().length);
1599
+ }
1600
+ function Qe(e) {
1601
+ return Array.from(e.querySelectorAll(Hn)).filter((t) => Yn(t) && t.getAttribute("aria-hidden") !== "true");
1602
+ }
1603
+ function et(e) {
1604
+ return e ? "current" in e ? e.current : e : null;
1605
+ }
1606
+ function Tt(e, { active: t, returnFocusTo: n, initialFocus: a, forceMount: l = !1 }) {
1607
+ const o = w(null);
1608
+ P(() => {
1609
+ const c = Zn({ forceMount: l, open: t }), s = e.current;
1610
+ if (!c || !s) return;
1611
+ o.current = document.activeElement ?? null;
1612
+ const d = et(a), h = Qe(s).at(0) ?? null;
1613
+ (d ?? h ?? s).focus?.();
1614
+ const f = (i) => {
1615
+ if (i.key !== "Tab") return;
1616
+ const u = Qe(s);
1617
+ if (u.length === 0) {
1618
+ i.preventDefault(), s.focus?.();
1619
+ return;
1620
+ }
1621
+ const m = u[0], y = u[u.length - 1], p = document.activeElement;
1622
+ if (!p || !s.contains(p)) {
1623
+ i.preventDefault(), (i.shiftKey ? y : m)?.focus?.();
1624
+ return;
1625
+ }
1626
+ i.shiftKey && p === m ? (i.preventDefault(), y?.focus?.()) : !i.shiftKey && p === y && (i.preventDefault(), m?.focus?.());
1627
+ };
1628
+ return document.addEventListener("keydown", f, !0), () => {
1629
+ document.removeEventListener("keydown", f, !0), (et(n) ?? o.current)?.focus?.();
1630
+ };
1631
+ }, [t, l, e, n, a]);
1632
+ }
1633
+ function Un(e, t) {
1634
+ const { clientX: n, clientY: a } = e, l = t.getBoundingClientRect();
1635
+ return n < l.left || n > l.right || a < l.top || a > l.bottom;
1636
+ }
1637
+ function ee(e, t) {
1638
+ const n = w(t);
1639
+ n.current = t;
1640
+ const a = t.enabled ?? !0;
1641
+ P(() => {
1642
+ if (!a) return;
1643
+ const l = (c) => {
1644
+ const s = n.current;
1645
+ if (s.outsideClick === !1) return;
1646
+ const d = e.current;
1647
+ if (!d) return;
1648
+ const h = c.target;
1649
+ if (!(h && d.contains(h))) {
1650
+ if (s.ignore)
1651
+ for (const f of s.ignore) {
1652
+ const i = f?.current;
1653
+ if (i && h && i.contains(h)) return;
1654
+ }
1655
+ Un(c, d) && s.onDismiss();
1656
+ }
1657
+ }, o = (c) => {
1658
+ const s = n.current;
1659
+ s.escapeKey !== !1 && c.key === "Escape" && s.onDismiss();
1660
+ };
1661
+ return document.addEventListener("pointerdown", l, !0), document.addEventListener("keydown", o, !0), () => {
1662
+ document.removeEventListener("pointerdown", l, !0), document.removeEventListener("keydown", o, !0);
1663
+ };
1664
+ }, [a, e]);
1665
+ }
1666
+ function Kn(e, t) {
1667
+ const n = e.indexOf("-"), a = n === -1 ? e : e.slice(0, n), l = n === -1 ? void 0 : e.slice(n + 1);
1668
+ return { side: a, align: l ?? t ?? "center" };
1669
+ }
1670
+ function ie(e, t, n, a) {
1671
+ return a === "start" ? e : a === "end" ? t - n : e + (t - e - n) / 2;
1672
+ }
1673
+ function Wn(e, t, n, a) {
1674
+ const { side: l, align: o } = Kn(a.placement ?? "bottom-start", a.align), c = a.gap ?? 8, s = a.padding ?? 8;
1675
+ let d = 0, h = 0;
1676
+ switch (l) {
1677
+ case "top":
1678
+ d = e.top - n - c, h = ie(e.left, e.right, t, o);
1679
+ break;
1680
+ case "bottom":
1681
+ d = e.bottom + c, h = ie(e.left, e.right, t, o);
1682
+ break;
1683
+ case "left":
1684
+ h = e.left - t - c, d = ie(e.top, e.bottom, n, o);
1685
+ break;
1686
+ case "right":
1687
+ h = e.right + c, d = ie(e.top, e.bottom, n, o);
1688
+ break;
1689
+ }
1690
+ const f = Math.max(s, window.innerWidth - t - s), i = Math.max(s, window.innerHeight - n - s);
1691
+ return {
1692
+ top: Math.min(Math.max(s, d), i),
1693
+ left: Math.min(Math.max(s, h), f)
1694
+ };
1695
+ }
1696
+ function te(e, t, n = {}) {
1697
+ const a = w(n);
1698
+ a.current = n;
1699
+ const [l, o] = N({
1700
+ position: "fixed",
1701
+ top: 0,
1702
+ left: 0,
1703
+ visibility: "hidden"
1704
+ }), c = K(() => {
1705
+ const s = a.current;
1706
+ if (s.open === !1) return;
1707
+ const d = t.current;
1708
+ if (!d) return;
1709
+ const h = d.getBoundingClientRect(), f = s.width ?? h.width, i = h.height;
1710
+ let u = null;
1711
+ if (s.point)
1712
+ u = { top: s.point.y, bottom: s.point.y, left: s.point.x, right: s.point.x };
1713
+ else {
1714
+ const p = e.current;
1715
+ if (p) {
1716
+ const v = p.getBoundingClientRect();
1717
+ u = { top: v.top, bottom: v.bottom, left: v.left, right: v.right };
1718
+ }
1719
+ }
1720
+ if (!u) return;
1721
+ const { top: m, left: y } = Wn(u, f, i, s);
1722
+ o({
1723
+ position: "fixed",
1724
+ top: m,
1725
+ left: y,
1726
+ visibility: "visible",
1727
+ ...s.width != null ? { width: s.width } : {}
1728
+ });
1729
+ }, [e, t]);
1730
+ return Ot(() => {
1731
+ if (n.open !== !1)
1732
+ return c(), window.addEventListener("scroll", c, !0), window.addEventListener("resize", c), () => {
1733
+ window.removeEventListener("scroll", c, !0), window.removeEventListener("resize", c);
1734
+ };
1735
+ }, [
1736
+ n.open,
1737
+ n.placement,
1738
+ n.align,
1739
+ n.width,
1740
+ n.gap,
1741
+ n.point?.x,
1742
+ n.point?.y,
1743
+ c
1744
+ ]), { style: l, update: c };
1745
+ }
1746
+ const Vn = ["INPUT", "TEXTAREA"];
1747
+ function Oe(e, t, n, a) {
1748
+ if (!t || a.enableIgnoredElement && Vn.includes(t.nodeName))
1749
+ return null;
1750
+ const {
1751
+ arrowKeyOptions: l = "both",
1752
+ candidateSelector: o,
1753
+ itemsArray: c = [],
1754
+ loop: s = !0,
1755
+ dir: d = "ltr",
1756
+ preventScroll: h = !0,
1757
+ focus: f = !1
1758
+ } = a, [i, u, m, y, p, v] = [
1759
+ e.key === "ArrowRight",
1760
+ e.key === "ArrowLeft",
1761
+ e.key === "ArrowUp",
1762
+ e.key === "ArrowDown",
1763
+ e.key === "Home",
1764
+ e.key === "End"
1765
+ ], _ = m || y, x = i || u;
1766
+ if (!p && !v && (!_ && !x || l === "vertical" && x || l === "horizontal" && _))
1767
+ return null;
1768
+ const $ = n ? Array.from(n.querySelectorAll(o)) : c;
1769
+ if (!$.length) return null;
1770
+ h && e.preventDefault();
1771
+ let k = null;
1772
+ return x || _ ? k = Et($, t, {
1773
+ goForward: _ ? y : d === "ltr" ? i : u,
1774
+ loop: s
1775
+ }) : p ? k = $.at(0) || null : v && (k = $.at(-1) || null), f && k?.focus(), k;
1776
+ }
1777
+ function Et(e, t, { goForward: n, loop: a }, l = e.length) {
1778
+ if (--l === 0) return null;
1779
+ const o = e.indexOf(t), c = n ? o + 1 : o - 1;
1780
+ if (!a && (c < 0 || c >= e.length)) return null;
1781
+ const s = (c + e.length) % e.length, d = e[s];
1782
+ return d ? d.hasAttribute("disabled") && d.getAttribute("disabled") !== "false" ? Et(e, d, { goForward: n, loop: a }, l) : d : null;
1783
+ }
1784
+ const tt = j(function({ variant: t = "primary", size: n = "md", loading: a = !1, fullWidth: l = !1, leading: o, trailing: c, type: s = "button", className: d, children: h, disabled: f, ...i }, u) {
1785
+ return /* @__PURE__ */ b(
1786
+ "button",
1787
+ {
1788
+ ref: u,
1789
+ type: s,
1790
+ disabled: f || a,
1791
+ "aria-busy": a || void 0,
1792
+ className: g("mx-btn", `mx-btn--${t}`, `mx-btn--${n}`, l && "is-full", d),
1793
+ ...i,
1794
+ children: [
1795
+ a ? /* @__PURE__ */ r("span", { className: "mx-btn__spin", "aria-hidden": "true" }) : o ? /* @__PURE__ */ r("span", { className: "mx-btn__icon", children: o }) : null,
1796
+ h != null && /* @__PURE__ */ r("span", { className: "mx-btn__lbl", children: h }),
1797
+ c && !a ? /* @__PURE__ */ r("span", { className: "mx-btn__icon mx-btn__icon--trail", children: c }) : null
1798
+ ]
1799
+ }
1800
+ );
1801
+ });
1802
+ function _a({
1803
+ href: e,
1804
+ onClick: t,
1805
+ disabled: n = !1,
1806
+ size: a = "md",
1807
+ muted: l = !1,
1808
+ leading: o,
1809
+ trailing: c,
1810
+ type: s = "button",
1811
+ target: d,
1812
+ rel: h,
1813
+ className: f,
1814
+ children: i,
1815
+ "aria-label": u
1816
+ }) {
1817
+ const m = g("mx-link", `mx-link--${a}`, l && "mx-link--muted", n && "is-disabled", f), y = /* @__PURE__ */ b(C, { children: [
1818
+ o && /* @__PURE__ */ r("span", { className: "mx-link__icon", children: o }),
1819
+ i != null && /* @__PURE__ */ r("span", { className: "mx-link__lbl", children: i }),
1820
+ c && /* @__PURE__ */ r("span", { className: "mx-link__icon", children: c })
1821
+ ] });
1822
+ return e !== void 0 && !n ? /* @__PURE__ */ r("a", { className: m, href: e, target: d, rel: h, onClick: t, "aria-label": u, children: y }) : /* @__PURE__ */ r("button", { className: m, type: s, disabled: n, onClick: t, "aria-label": u, children: y });
1823
+ }
1824
+ const qn = {
1825
+ arrow: /* @__PURE__ */ r("path", { d: "M5 12h14M13 5l7 7-7 7" }),
1826
+ "arrow-up-right": /* @__PURE__ */ r("path", { d: "M7 17 17 7M8 7h9v9" }),
1827
+ "arrow-down-left": /* @__PURE__ */ r("path", { d: "M17 7 7 17M16 17H7V8" }),
1828
+ check: /* @__PURE__ */ r("path", { d: "M20 6 9 17l-5-5" }),
1829
+ close: /* @__PURE__ */ r("path", { d: "M18 6 6 18M6 6l12 12" }),
1830
+ plus: /* @__PURE__ */ r("path", { d: "M12 5v14M5 12h14" }),
1831
+ minus: /* @__PURE__ */ r("path", { d: "M5 12h14" }),
1832
+ search: /* @__PURE__ */ r("path", { d: "M21 21l-4.35-4.35M17 10a7 7 0 1 1-14 0 7 7 0 0 1 14 0Z" }),
1833
+ star: /* @__PURE__ */ r("path", { d: "M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01Z" }),
1834
+ bell: /* @__PURE__ */ r("path", { d: "M18 8a6 6 0 0 0-12 0c0 7-3 9-3 9h18s-3-2-3-9M13.73 21a2 2 0 0 1-3.46 0" }),
1835
+ cog: /* @__PURE__ */ b(C, { children: [
1836
+ /* @__PURE__ */ r("circle", { cx: "12", cy: "12", r: "3" }),
1837
+ /* @__PURE__ */ r("path", { d: "M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06A1.65 1.65 0 0 0 9 4.6h.09A1.65 1.65 0 0 0 10 3.09V3a2 2 0 0 1 4 0v.09A1.65 1.65 0 0 0 15 4.6a1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9v.09a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1Z" })
1838
+ ] }),
1839
+ user: /* @__PURE__ */ b(C, { children: [
1840
+ /* @__PURE__ */ r("path", { d: "M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2" }),
1841
+ /* @__PURE__ */ r("circle", { cx: "12", cy: "7", r: "4" })
1842
+ ] }),
1843
+ users: /* @__PURE__ */ r("path", { d: "M9 8a3 3 0 1 0 0-6 3 3 0 0 0 0 6ZM3 20a6 6 0 0 1 12 0M16 6a3 3 0 0 1 0 6M21 20a5 5 0 0 0-4-5" }),
1844
+ home: /* @__PURE__ */ r("path", { d: "M3 9l9-7 9 7v11a2 2 0 0 1-2 2h-4v-7H8v7H4a2 2 0 0 1-2-2Z" }),
1845
+ list: /* @__PURE__ */ r("path", { d: "M8 6h13M8 12h13M8 18h13M3 6h.01M3 12h.01M3 18h.01" }),
1846
+ mail: /* @__PURE__ */ r("path", { d: "M4 4h16c1.1 0 2 .9 2 2v12a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2ZM22 6 12 13 2 6" }),
1847
+ wallet: /* @__PURE__ */ b(C, { children: [
1848
+ /* @__PURE__ */ r("path", { d: "M19 7H5a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2Z" }),
1849
+ /* @__PURE__ */ r("path", { d: "M3 9V7a2 2 0 0 1 2-2h11M16 13h2" })
1850
+ ] }),
1851
+ "credit-card": /* @__PURE__ */ b(C, { children: [
1852
+ /* @__PURE__ */ r("rect", { x: "2", y: "5", width: "20", height: "14", rx: "2" }),
1853
+ /* @__PURE__ */ r("path", { d: "M2 10h20" })
1854
+ ] }),
1855
+ shield: /* @__PURE__ */ r("path", { d: "M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10Z" }),
1856
+ globe: /* @__PURE__ */ b(C, { children: [
1857
+ /* @__PURE__ */ r("circle", { cx: "12", cy: "12", r: "10" }),
1858
+ /* @__PURE__ */ r("path", { d: "M2 12h20M12 2a15 15 0 0 1 0 20 15 15 0 0 1 0-20Z" })
1859
+ ] }),
1860
+ "help-circle": /* @__PURE__ */ b(C, { children: [
1861
+ /* @__PURE__ */ r("circle", { cx: "12", cy: "12", r: "10" }),
1862
+ /* @__PURE__ */ r("path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3M12 17h.01" })
1863
+ ] }),
1864
+ "chevron-right": /* @__PURE__ */ r("path", { d: "M9 18l6-6-6-6" }),
1865
+ "chevron-down": /* @__PURE__ */ r("path", { d: "M6 9l6 6 6-6" }),
1866
+ alert: /* @__PURE__ */ r("path", { d: "M10.3 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0ZM12 9v4M12 17h.01" }),
1867
+ info: /* @__PURE__ */ b(C, { children: [
1868
+ /* @__PURE__ */ r("circle", { cx: "12", cy: "12", r: "10" }),
1869
+ /* @__PURE__ */ r("path", { d: "M12 16v-4M12 8h.01" })
1870
+ ] }),
1871
+ download: /* @__PURE__ */ r("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4M7 10l5 5 5-5M12 15V3" }),
1872
+ upload: /* @__PURE__ */ r("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4M17 8l-5-5-5 5M12 3v12" }),
1873
+ trash: /* @__PURE__ */ r("path", { d: "M3 6h18M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" }),
1874
+ refresh: /* @__PURE__ */ r("path", { d: "M21 12a9 9 0 1 1-2.64-6.36M21 4v4h-4" }),
1875
+ copy: /* @__PURE__ */ b(C, { children: [
1876
+ /* @__PURE__ */ r("rect", { x: "9", y: "9", width: "11", height: "11", rx: "2" }),
1877
+ /* @__PURE__ */ r("path", { d: "M5 15V5a2 2 0 0 1 2-2h8" })
1878
+ ] }),
1879
+ pause: /* @__PURE__ */ r("path", { d: "M8 5v14M16 5v14" }),
1880
+ play: /* @__PURE__ */ r("path", { d: "M6 4l14 8-14 8V4Z" }),
1881
+ repeat: /* @__PURE__ */ r("path", { d: "M17 1l4 4-4 4M3 11V9a4 4 0 0 1 4-4h14M7 23l-4-4 4-4M21 13v2a4 4 0 0 1-4 4H3" }),
1882
+ "trending-up": /* @__PURE__ */ r("path", { d: "M23 6l-9.5 9.5-5-5L1 18M17 6h6v6" }),
1883
+ bank: /* @__PURE__ */ r("path", { d: "M3 21h18M5 21V8l7-5 7 5v13M9 21v-6h6v6" }),
1884
+ bolt: /* @__PURE__ */ r("path", { d: "M13 2 4 14h6l-1 8 9-12h-6l1-8Z" }),
1885
+ flow: /* @__PURE__ */ b(C, { children: [
1886
+ /* @__PURE__ */ r("circle", { cx: "6", cy: "6", r: "2.5" }),
1887
+ /* @__PURE__ */ r("circle", { cx: "18", cy: "6", r: "2.5" }),
1888
+ /* @__PURE__ */ r("circle", { cx: "12", cy: "18", r: "2.5" }),
1889
+ /* @__PURE__ */ r("path", { d: "m7.5 7.8 3.5 7.2M17 7.8 13 15" })
1890
+ ] }),
1891
+ batch: /* @__PURE__ */ b(C, { children: [
1892
+ /* @__PURE__ */ r("rect", { x: "3", y: "4", width: "18", height: "5", rx: "1" }),
1893
+ /* @__PURE__ */ r("rect", { x: "3", y: "11", width: "18", height: "5", rx: "1" }),
1894
+ /* @__PURE__ */ r("path", { d: "M6 20h12" })
1895
+ ] })
1896
+ };
1897
+ function S({ name: e, size: t = 16, strokeWidth: n = 2, ...a }) {
1898
+ return /* @__PURE__ */ r(
1899
+ "svg",
1900
+ {
1901
+ width: t,
1902
+ height: t,
1903
+ viewBox: "0 0 24 24",
1904
+ fill: "none",
1905
+ stroke: "currentColor",
1906
+ strokeWidth: n,
1907
+ strokeLinecap: "round",
1908
+ strokeLinejoin: "round",
1909
+ "aria-hidden": "true",
1910
+ style: { flexShrink: 0, display: "block" },
1911
+ ...a,
1912
+ children: qn[e]
1913
+ }
1914
+ );
1915
+ }
1916
+ const zn = { sm: 16, md: 18, lg: 20 }, Gn = j(function({ icon: t, label: n, variant: a = "secondary", size: l = "md", shape: o = "circle", type: c = "button", className: s, ...d }, h) {
1917
+ return /* @__PURE__ */ r(
1918
+ "button",
1919
+ {
1920
+ ref: h,
1921
+ type: c,
1922
+ className: g(
1923
+ "mx-icon-btn",
1924
+ `mx-btn--${a}`,
1925
+ `mx-icon-btn--${l}`,
1926
+ `mx-icon-btn--${o}`,
1927
+ s
1928
+ ),
1929
+ ...d,
1930
+ "aria-label": n,
1931
+ title: n,
1932
+ children: /* @__PURE__ */ r(S, { name: t, size: zn[l] })
1933
+ }
1934
+ );
1935
+ });
1936
+ function va({ label: e, orientation: t = "horizontal", className: n }) {
1937
+ return t === "vertical" ? /* @__PURE__ */ r("span", { className: g("mx-divider mx-divider--v", n), role: "separator", "aria-orientation": "vertical" }) : e != null ? /* @__PURE__ */ b("div", { className: g("mx-divider mx-divider--label", n), role: "separator", children: [
1938
+ /* @__PURE__ */ r("span", { className: "mx-divider__line" }),
1939
+ /* @__PURE__ */ r("span", { className: "mx-divider__lbl", children: e }),
1940
+ /* @__PURE__ */ r("span", { className: "mx-divider__line" })
1941
+ ] }) : /* @__PURE__ */ r("hr", { className: g("mx-divider", n) });
1942
+ }
1943
+ const Jn = {
1944
+ 1: "h6",
1945
+ 2: "h6",
1946
+ 3: "h6",
1947
+ 4: "h5",
1948
+ 5: "h4",
1949
+ 6: "h3",
1950
+ 7: "h2",
1951
+ 8: "h1",
1952
+ 9: "h1"
1953
+ };
1954
+ function Rt({
1955
+ size: e = 6,
1956
+ weight: t = "bold",
1957
+ align: n,
1958
+ as: a,
1959
+ accent: l,
1960
+ truncate: o,
1961
+ className: c,
1962
+ children: s,
1963
+ ...d
1964
+ }) {
1965
+ const h = a ?? Jn[e];
1966
+ return /* @__PURE__ */ r(
1967
+ h,
1968
+ {
1969
+ className: g(
1970
+ "mx-heading",
1971
+ `mx-heading--${e}`,
1972
+ `mx-heading--w-${t}`,
1973
+ n && `mx-heading--align-${n}`,
1974
+ l && `mx-heading--accent-${l}`,
1975
+ o && "mx-heading--truncate",
1976
+ c
1977
+ ),
1978
+ ...d,
1979
+ children: s
1980
+ }
1981
+ );
1982
+ }
1983
+ const Xn = {
1984
+ display: "h1",
1985
+ h1: "h1",
1986
+ h2: "h2",
1987
+ h3: "h3",
1988
+ h4: "h4",
1989
+ lead: "p",
1990
+ body: "p",
1991
+ small: "p",
1992
+ muted: "p",
1993
+ code: "code",
1994
+ quote: "blockquote"
1995
+ };
1996
+ function $a({
1997
+ variant: e = "body",
1998
+ children: t,
1999
+ accent: n,
2000
+ italic: a,
2001
+ align: l,
2002
+ className: o,
2003
+ ...c
2004
+ }) {
2005
+ const s = Xn[e];
2006
+ return /* @__PURE__ */ r(
2007
+ s,
2008
+ {
2009
+ className: g(
2010
+ "mx-text",
2011
+ `mx-text--${e}`,
2012
+ a && "mx-text--italic",
2013
+ l && `mx-text--align-${l}`,
2014
+ n && `mx-text--accent-${n}`,
2015
+ o
2016
+ ),
2017
+ ...c,
2018
+ children: t
2019
+ }
2020
+ );
2021
+ }
2022
+ function Na({
2023
+ orientation: e = "horizontal",
2024
+ label: t,
2025
+ size: n,
2026
+ decorative: a = !0,
2027
+ className: l,
2028
+ style: o,
2029
+ ...c
2030
+ }) {
2031
+ const s = n != null ? typeof n == "number" ? `${n}px` : n : void 0, d = s ? { "--mx-sep-size": s } : void 0, h = d || o ? { ...d, ...o } : void 0, f = a ? { role: "none" } : { role: "separator", "aria-orientation": e };
2032
+ return e === "vertical" ? /* @__PURE__ */ r(
2033
+ "div",
2034
+ {
2035
+ className: g("mx-separator", "mx-separator--v", l),
2036
+ style: h,
2037
+ ...c,
2038
+ ...f
2039
+ }
2040
+ ) : t != null ? /* @__PURE__ */ b(
2041
+ "div",
2042
+ {
2043
+ className: g("mx-separator", "mx-separator--label", l),
2044
+ style: h,
2045
+ ...c,
2046
+ ...f,
2047
+ children: [
2048
+ /* @__PURE__ */ r("span", { className: "mx-separator__line" }),
2049
+ /* @__PURE__ */ r("span", { className: "mx-separator__lbl", children: t }),
2050
+ /* @__PURE__ */ r("span", { className: "mx-separator__line" })
2051
+ ]
2052
+ }
2053
+ ) : /* @__PURE__ */ r("div", { className: g("mx-separator", l), style: h, ...c, ...f });
2054
+ }
2055
+ const Qn = j(function({ label: t, hint: n, error: a, leading: l, trailing: o, id: c, className: s, required: d, disabled: h, ...f }, i) {
2056
+ const u = le(), m = c ?? u, y = a || n;
2057
+ return /* @__PURE__ */ b("label", { htmlFor: m, className: g("mx-in", a && "mx-in--err", h && "mx-in--dis", s), children: [
2058
+ t && /* @__PURE__ */ b("span", { className: "mx-in__lbl", children: [
2059
+ t,
2060
+ d && /* @__PURE__ */ r("span", { className: "mx-in__req", "aria-hidden": "true", children: " *" })
2061
+ ] }),
2062
+ /* @__PURE__ */ b("span", { className: "mx-in__field", children: [
2063
+ l && /* @__PURE__ */ r("span", { className: "mx-in__aff mx-in__aff--lead", children: l }),
2064
+ /* @__PURE__ */ r(
2065
+ "input",
2066
+ {
2067
+ ref: i,
2068
+ id: m,
2069
+ className: "mx-in__inp",
2070
+ "aria-invalid": a ? "true" : void 0,
2071
+ required: d,
2072
+ disabled: h,
2073
+ ...f
2074
+ }
2075
+ ),
2076
+ o && /* @__PURE__ */ r("span", { className: "mx-in__aff mx-in__aff--trail", children: o })
2077
+ ] }),
2078
+ y && /* @__PURE__ */ r("span", { className: g("mx-in__msg", a && "mx-in__msg--err"), children: y })
2079
+ ] });
2080
+ }), wa = j(function({ label: t, hint: n, error: a, resizable: l = !1, size: o = "md", id: c, className: s, rows: d = 4, maxLength: h, value: f, required: i, disabled: u, ...m }, y) {
2081
+ const p = le(), v = c ?? p, _ = typeof f == "string" ? f.length : 0, x = a || n;
2082
+ return /* @__PURE__ */ b("label", { htmlFor: v, className: g("mx-ta", `mx-ta--${o}`, a && "mx-ta--err", u && "mx-ta--dis", s), children: [
2083
+ t && /* @__PURE__ */ b("span", { className: "mx-ta__lbl", children: [
2084
+ t,
2085
+ i && /* @__PURE__ */ r("span", { className: "mx-ta__req", "aria-hidden": "true", children: " *" })
2086
+ ] }),
2087
+ /* @__PURE__ */ r("div", { className: g("mx-ta__field", l && "is-resize"), children: /* @__PURE__ */ r(
2088
+ "textarea",
2089
+ {
2090
+ ref: y,
2091
+ id: v,
2092
+ className: "mx-ta__inp",
2093
+ rows: d,
2094
+ maxLength: h,
2095
+ value: f,
2096
+ "aria-invalid": a ? "true" : void 0,
2097
+ required: i,
2098
+ disabled: u,
2099
+ ...m
2100
+ }
2101
+ ) }),
2102
+ /* @__PURE__ */ b("div", { className: "mx-ta__foot", children: [
2103
+ x ? /* @__PURE__ */ r("span", { className: g("mx-ta__msg", a && "mx-ta__msg--err"), children: x }) : /* @__PURE__ */ r("span", {}),
2104
+ h != null && /* @__PURE__ */ b("span", { className: g("mx-ta__count", _ >= h && "is-over"), children: [
2105
+ _,
2106
+ "/",
2107
+ h
2108
+ ] })
2109
+ ] })
2110
+ ] });
2111
+ });
2112
+ function ka({ value: e, onChange: t, onSearch: n, placeholder: a = "Search", className: l, disabled: o, ...c }) {
2113
+ return /* @__PURE__ */ b("label", { className: g("mx-sr", o && "mx-sr--dis", l), children: [
2114
+ /* @__PURE__ */ r("span", { className: "mx-sr__icon", children: /* @__PURE__ */ r(S, { name: "search", size: 14 }) }),
2115
+ /* @__PURE__ */ r(
2116
+ "input",
2117
+ {
2118
+ className: "mx-sr__inp",
2119
+ type: "search",
2120
+ value: e,
2121
+ placeholder: a,
2122
+ disabled: o,
2123
+ onChange: (s) => t?.(s.target.value),
2124
+ onKeyDown: (s) => {
2125
+ s.key === "Enter" ? n?.(e) : s.key === "Escape" && t?.("");
2126
+ },
2127
+ ...c
2128
+ }
2129
+ ),
2130
+ e && !o && /* @__PURE__ */ r("button", { type: "button", className: "mx-sr__x", "aria-label": "Clear", onClick: () => t?.(""), children: "×" })
2131
+ ] });
2132
+ }
2133
+ const Ma = j(function({ label: t, hint: n, error: a, options: l, placeholder: o, id: c, className: s, required: d, disabled: h, ...f }, i) {
2134
+ const u = le(), m = c ?? u, y = a || n;
2135
+ return /* @__PURE__ */ b("label", { htmlFor: m, className: g("mx-sl", a && "mx-sl--err", h && "mx-sl--dis", s), children: [
2136
+ t && /* @__PURE__ */ b("span", { className: "mx-sl__lbl", children: [
2137
+ t,
2138
+ d && /* @__PURE__ */ r("span", { className: "mx-sl__req", children: " *" })
2139
+ ] }),
2140
+ /* @__PURE__ */ b("div", { className: "mx-sl__field", children: [
2141
+ /* @__PURE__ */ b(
2142
+ "select",
2143
+ {
2144
+ ref: i,
2145
+ id: m,
2146
+ className: "mx-sl__sel",
2147
+ "aria-invalid": a ? "true" : void 0,
2148
+ required: d,
2149
+ disabled: h,
2150
+ ...f,
2151
+ children: [
2152
+ o && /* @__PURE__ */ r("option", { value: "", disabled: !0, hidden: !0, children: o }),
2153
+ l.map((p) => /* @__PURE__ */ r("option", { value: p.value, disabled: p.disabled, children: p.label }, p.value))
2154
+ ]
2155
+ }
2156
+ ),
2157
+ /* @__PURE__ */ r("span", { className: "mx-sl__chev", "aria-hidden": "true" })
2158
+ ] }),
2159
+ y && /* @__PURE__ */ r("span", { className: g("mx-sl__msg", a && "mx-sl__msg--err"), children: y })
2160
+ ] });
2161
+ });
2162
+ function Ca({ value: e, onChange: t, onComplete: n, length: a = 6, allow: l = "numeric", error: o, disabled: c }) {
2163
+ const s = w([]), d = l === "numeric" ? /[^0-9]/g : /[^a-zA-Z0-9]/g, h = Array.from({ length: a }, (i, u) => e[u] ?? ""), f = (i, u) => {
2164
+ const m = h.slice();
2165
+ m[i] = u;
2166
+ const y = m.join("").slice(0, a);
2167
+ t(y), y.length === a && n?.(y);
2168
+ };
2169
+ return /* @__PURE__ */ b("div", { className: g("mx-auth", o && "mx-auth--err", c && "mx-auth--dis"), children: [
2170
+ /* @__PURE__ */ r("div", { className: "mx-auth__row", children: h.map((i, u) => /* @__PURE__ */ r(
2171
+ "input",
2172
+ {
2173
+ ref: (m) => {
2174
+ (s.current ??= [])[u] = m;
2175
+ },
2176
+ className: "mx-auth__cell",
2177
+ type: "text",
2178
+ inputMode: l === "numeric" ? "numeric" : "text",
2179
+ maxLength: 1,
2180
+ value: i,
2181
+ disabled: c,
2182
+ "aria-label": `Digit ${u + 1}`,
2183
+ onChange: (m) => {
2184
+ const y = m.target.value.replace(d, "").slice(-1);
2185
+ f(u, y), y && u < a - 1 && s.current?.[u + 1]?.focus();
2186
+ },
2187
+ onKeyDown: (m) => {
2188
+ m.key === "Backspace" && !h[u] && u > 0 && (m.preventDefault(), s.current?.[u - 1]?.focus(), f(u - 1, ""));
2189
+ },
2190
+ onPaste: (m) => {
2191
+ const y = (m.clipboardData.getData("text") || "").replace(d, "");
2192
+ if (!y) return;
2193
+ m.preventDefault();
2194
+ const p = y.slice(0, a);
2195
+ t(p), s.current?.[Math.min(y.length, a - 1)]?.focus(), p.length === a && n?.(p);
2196
+ }
2197
+ },
2198
+ u
2199
+ )) }),
2200
+ o && /* @__PURE__ */ r("div", { className: "mx-auth__msg", children: o })
2201
+ ] });
2202
+ }
2203
+ const Da = j(function({ currency: t = "$", label: n, hint: a, error: l, inputMode: o = "decimal", className: c, ...s }, d) {
2204
+ return /* @__PURE__ */ r(
2205
+ Qn,
2206
+ {
2207
+ ref: d,
2208
+ className: g("mx-money", c),
2209
+ label: n,
2210
+ hint: a,
2211
+ error: l,
2212
+ inputMode: o,
2213
+ leading: /* @__PURE__ */ r("span", { className: "mx-money__ccy", children: t }),
2214
+ ...s
2215
+ }
2216
+ );
2217
+ });
2218
+ function Ia({
2219
+ children: e,
2220
+ required: t,
2221
+ optional: n,
2222
+ disabled: a,
2223
+ size: l = "md",
2224
+ accent: o = "red",
2225
+ hint: c,
2226
+ className: s,
2227
+ ...d
2228
+ }) {
2229
+ return /* @__PURE__ */ b(
2230
+ "label",
2231
+ {
2232
+ className: g(
2233
+ "mx-label",
2234
+ `mx-label--${l}`,
2235
+ `mx-label--accent-${o}`,
2236
+ a && "is-disabled",
2237
+ s
2238
+ ),
2239
+ ...d,
2240
+ children: [
2241
+ /* @__PURE__ */ b("span", { className: "mx-label__text", children: [
2242
+ e,
2243
+ t && /* @__PURE__ */ r("span", { className: "mx-label__req", "aria-hidden": "true", children: "*" }),
2244
+ n && /* @__PURE__ */ r("span", { className: "mx-label__opt", children: "(optional)" })
2245
+ ] }),
2246
+ c != null && /* @__PURE__ */ r("span", { className: "mx-label__hint", children: c })
2247
+ ]
2248
+ }
2249
+ );
2250
+ }
2251
+ function Sa({
2252
+ value: e,
2253
+ defaultValue: t,
2254
+ onChange: n,
2255
+ label: a,
2256
+ locale: l,
2257
+ disabled: o,
2258
+ className: c
2259
+ }) {
2260
+ const { segments: s, fieldProps: d, segmentProps: h } = On({ value: e, defaultValue: t, onChange: n, locale: l });
2261
+ return /* @__PURE__ */ b("label", { className: g("mx-datefield", o && "mx-datefield--disabled", c), children: [
2262
+ a != null && /* @__PURE__ */ r("span", { className: "mx-datefield__lbl", children: a }),
2263
+ /* @__PURE__ */ r("span", { ...d, className: "mx-datefield__field", children: s.map(
2264
+ (f, i) => f.part === "literal" ? /* @__PURE__ */ r("span", { className: "mx-datefield__sep", "aria-hidden": "true", children: f.value }, i) : (
2265
+ // `readOnly`: the hook drives the value via its key handler (it
2266
+ // `preventDefault`s digits), so the native input never owns it —
2267
+ // this suppresses React's controlled-without-onChange warning.
2268
+ // The per-segment `width` is a non-color dynamic inline (INV-2).
2269
+ /* @__PURE__ */ r(
2270
+ "input",
2271
+ {
2272
+ ...h(f.part),
2273
+ className: "mx-datefield__seg",
2274
+ style: { width: f.part === "year" ? 44 : 24 },
2275
+ value: f.value,
2276
+ readOnly: !0,
2277
+ disabled: o
2278
+ },
2279
+ f.part
2280
+ )
2281
+ )
2282
+ ) })
2283
+ ] });
2284
+ }
2285
+ function Aa({
2286
+ value: e,
2287
+ defaultValue: t,
2288
+ onChange: n,
2289
+ locale: a,
2290
+ firstDayOfWeek: l,
2291
+ accent: o,
2292
+ className: c
2293
+ }) {
2294
+ const { monthLabel: s, weekdays: d, cells: h, gridProps: f, prevButtonProps: i, nextButtonProps: u } = Fn({ value: e, defaultValue: t, onChange: n, locale: a, firstDayOfWeek: l });
2295
+ return /* @__PURE__ */ b("div", { className: g("mx-calendar", o && `mx-calendar--accent-${o}`, c), children: [
2296
+ /* @__PURE__ */ b("div", { className: "mx-calendar__header", children: [
2297
+ /* @__PURE__ */ r("button", { type: "button", className: "mx-calendar__nav mx-calendar__nav--prev", ...i, children: /* @__PURE__ */ r(S, { name: "chevron-right" }) }),
2298
+ /* @__PURE__ */ r("span", { className: "mx-calendar__title", children: s }),
2299
+ /* @__PURE__ */ r("button", { type: "button", className: "mx-calendar__nav mx-calendar__nav--next", ...u, children: /* @__PURE__ */ r(S, { name: "chevron-right" }) })
2300
+ ] }),
2301
+ /* @__PURE__ */ r("div", { className: "mx-calendar__weekdays", "aria-hidden": "true", children: d.map((m, y) => /* @__PURE__ */ r("span", { className: "mx-calendar__weekday", children: m }, y)) }),
2302
+ /* @__PURE__ */ r("div", { ...f, className: "mx-calendar__days", children: h.map((m) => /* @__PURE__ */ r(
2303
+ "button",
2304
+ {
2305
+ type: "button",
2306
+ ...m.cellProps,
2307
+ className: g(
2308
+ "mx-calendar__day",
2309
+ m.isSelected && "mx-calendar__day--selected",
2310
+ m.isToday && "mx-calendar__day--today",
2311
+ m.isOutsideMonth && "mx-calendar__day--outside"
2312
+ ),
2313
+ children: m.label
2314
+ },
2315
+ m.date.toString()
2316
+ )) })
2317
+ ] });
2318
+ }
2319
+ function Lt({ checked: e = !1, onChange: t, label: n, indeterminate: a = !1, disabled: l, name: o, value: c, id: s }) {
2320
+ const d = w(null);
2321
+ return P(() => {
2322
+ d.current && (d.current.indeterminate = a);
2323
+ }, [a]), /* @__PURE__ */ b("label", { className: g("mx-cb", l && "mx-cb--dis"), htmlFor: s, children: [
2324
+ /* @__PURE__ */ r(
2325
+ "input",
2326
+ {
2327
+ ref: d,
2328
+ id: s,
2329
+ type: "checkbox",
2330
+ name: o,
2331
+ value: c,
2332
+ checked: e,
2333
+ disabled: l,
2334
+ onChange: (h) => t?.(h.target.checked)
2335
+ }
2336
+ ),
2337
+ /* @__PURE__ */ r("span", { className: "mx-cb__box", "aria-hidden": "true", children: a ? /* @__PURE__ */ r("svg", { viewBox: "0 0 12 12", width: "12", height: "12", children: /* @__PURE__ */ r("path", { d: "M3 6h6", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" }) }) : e ? /* @__PURE__ */ r("svg", { viewBox: "0 0 12 12", width: "12", height: "12", children: /* @__PURE__ */ r("path", { d: "M2.5 6.2l2.3 2.3L9.5 3.8", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }) : null }),
2338
+ n != null && /* @__PURE__ */ r("span", { className: "mx-cb__lbl", children: n })
2339
+ ] });
2340
+ }
2341
+ function Pt({ checked: e = !1, onChange: t, label: n, value: a, name: l, disabled: o, id: c }) {
2342
+ return /* @__PURE__ */ b("label", { className: g("mx-rd", o && "mx-rd--dis"), htmlFor: c, children: [
2343
+ /* @__PURE__ */ r(
2344
+ "input",
2345
+ {
2346
+ id: c,
2347
+ type: "radio",
2348
+ name: l,
2349
+ value: a,
2350
+ checked: e,
2351
+ disabled: o,
2352
+ onChange: () => t?.(a)
2353
+ }
2354
+ ),
2355
+ /* @__PURE__ */ r("span", { className: "mx-rd__ring", "aria-hidden": "true", children: /* @__PURE__ */ r("span", { className: "mx-rd__dot" }) }),
2356
+ n != null && /* @__PURE__ */ r("span", { className: "mx-rd__lbl", children: n })
2357
+ ] });
2358
+ }
2359
+ function Ta({ checked: e = !1, onChange: t, label: n, disabled: a, name: l, id: o }) {
2360
+ return /* @__PURE__ */ b("label", { className: g("mx-sw", !e && "mx-sw--off", a && "mx-sw--dis"), htmlFor: o, children: [
2361
+ /* @__PURE__ */ r(
2362
+ "input",
2363
+ {
2364
+ id: o,
2365
+ type: "checkbox",
2366
+ role: "switch",
2367
+ name: l,
2368
+ checked: e,
2369
+ disabled: a,
2370
+ onChange: (c) => t?.(c.target.checked)
2371
+ }
2372
+ ),
2373
+ /* @__PURE__ */ r("span", { className: "mx-sw__track", "aria-hidden": "true", children: /* @__PURE__ */ r("span", { className: "mx-sw__thumb" }) }),
2374
+ n != null && /* @__PURE__ */ r("span", { className: "mx-sw__lbl", children: n })
2375
+ ] });
2376
+ }
2377
+ function Ea({ segments: e, value: t, onChange: n, size: a = "md", fullWidth: l = !1 }) {
2378
+ return /* @__PURE__ */ r("div", { className: g("mx-seg", `mx-seg--${a}`, l && "is-full"), role: "radiogroup", children: e.map((o) => /* @__PURE__ */ r(
2379
+ "button",
2380
+ {
2381
+ type: "button",
2382
+ role: "radio",
2383
+ "aria-checked": o.value === t,
2384
+ disabled: o.disabled,
2385
+ className: g("mx-seg__seg", o.value === t && "is-active"),
2386
+ onClick: () => !o.disabled && n?.(o.value),
2387
+ children: o.label
2388
+ },
2389
+ o.value
2390
+ )) });
2391
+ }
2392
+ function Ra({ value: e, onChange: t, min: n = 0, max: a = 100, step: l = 1, label: o, unit: c = "", showValue: s = !0, size: d = "md", disabled: h }) {
2393
+ const f = (e - n) / (a - n) * 100;
2394
+ return /* @__PURE__ */ b("div", { className: g("mx-sd", `mx-sd--${d}`, h && "mx-sd--dis"), children: [
2395
+ (o || s) && /* @__PURE__ */ b("div", { className: "mx-sd__head", children: [
2396
+ o && /* @__PURE__ */ r("span", { className: "mx-sd__lbl", children: o }),
2397
+ s && /* @__PURE__ */ b("span", { className: "mx-sd__val", children: [
2398
+ e,
2399
+ c
2400
+ ] })
2401
+ ] }),
2402
+ /* @__PURE__ */ r("div", { className: "mx-sd__track", style: { "--mx-pct": `${f}%` }, children: /* @__PURE__ */ r(
2403
+ "input",
2404
+ {
2405
+ className: "mx-sd__inp",
2406
+ type: "range",
2407
+ min: n,
2408
+ max: a,
2409
+ step: l,
2410
+ value: e,
2411
+ disabled: h,
2412
+ onChange: (i) => t?.(Number(i.target.value))
2413
+ }
2414
+ ) })
2415
+ ] });
2416
+ }
2417
+ const La = j(function({ pressed: t, defaultPressed: n = !1, onPressedChange: a, size: l = "md", className: o, children: c, disabled: s, onClick: d, ...h }, f) {
2418
+ const [i, u] = N(n), m = t ?? i;
2419
+ return /* @__PURE__ */ r(
2420
+ "button",
2421
+ {
2422
+ ref: f,
2423
+ type: "button",
2424
+ disabled: s,
2425
+ "aria-pressed": m,
2426
+ className: g("mx-tgl", `mx-tgl--${l}`, m && "is-on", o),
2427
+ onClick: (y) => {
2428
+ t == null && u((p) => !p), a?.(!m), d?.(y);
2429
+ },
2430
+ ...h,
2431
+ children: c
2432
+ }
2433
+ );
2434
+ });
2435
+ function nt(e) {
2436
+ return e == null ? [] : Array.isArray(e) ? e : e ? [e] : [];
2437
+ }
2438
+ function Pa({
2439
+ items: e,
2440
+ type: t = "single",
2441
+ value: n,
2442
+ defaultValue: a,
2443
+ onValueChange: l,
2444
+ size: o = "md",
2445
+ accent: c,
2446
+ disabled: s,
2447
+ className: d
2448
+ }) {
2449
+ const [h, f] = N(() => nt(a)), i = n != null, u = i ? nt(n) : h, m = (p) => {
2450
+ i || f(p), l?.(t === "multiple" ? p : p[0] ?? "");
2451
+ }, y = (p) => {
2452
+ const v = u.includes(p);
2453
+ m(t === "multiple" ? v ? u.filter((_) => _ !== p) : [...u, p] : v ? [] : [p]);
2454
+ };
2455
+ return /* @__PURE__ */ r("div", { className: g("mx-tgl-grp", `mx-tgl-grp--${o}`, c && `mx-tgl-grp--accent-${c}`, d), role: "group", children: e.map((p) => {
2456
+ const v = u.includes(p.value);
2457
+ return /* @__PURE__ */ b(
2458
+ "button",
2459
+ {
2460
+ type: "button",
2461
+ disabled: s || p.disabled,
2462
+ "aria-label": p.ariaLabel,
2463
+ "aria-pressed": v,
2464
+ className: g("mx-tgl", "mx-tgl--grouped", `mx-tgl--${o}`, v && "is-on"),
2465
+ onClick: () => y(p.value),
2466
+ children: [
2467
+ p.icon && /* @__PURE__ */ r("span", { className: "mx-tgl__icon", children: p.icon }),
2468
+ p.label
2469
+ ]
2470
+ },
2471
+ p.value
2472
+ );
2473
+ }) });
2474
+ }
2475
+ function ja({
2476
+ items: e,
2477
+ value: t,
2478
+ defaultValue: n,
2479
+ onChange: a,
2480
+ accent: l,
2481
+ orientation: o = "vertical",
2482
+ disabled: c
2483
+ }) {
2484
+ const [s, d] = N(n ?? []), h = t ?? s, f = (i) => {
2485
+ const u = h.includes(i) ? h.filter((m) => m !== i) : [...h, i];
2486
+ t == null && d(u), a?.(u);
2487
+ };
2488
+ return /* @__PURE__ */ r(
2489
+ "div",
2490
+ {
2491
+ className: g(
2492
+ "mx-checkbox-group",
2493
+ `mx-checkbox-group--${o}`,
2494
+ l && `mx-checkbox-group--accent-${l}`
2495
+ ),
2496
+ role: "group",
2497
+ children: e.map((i) => /* @__PURE__ */ r(
2498
+ Lt,
2499
+ {
2500
+ checked: h.includes(i.value),
2501
+ disabled: c || i.disabled,
2502
+ label: i.label,
2503
+ onChange: () => f(i.value)
2504
+ },
2505
+ i.value
2506
+ ))
2507
+ }
2508
+ );
2509
+ }
2510
+ function Oa({
2511
+ items: e,
2512
+ value: t,
2513
+ defaultValue: n,
2514
+ onChange: a,
2515
+ accent: l,
2516
+ columns: o = 1,
2517
+ size: c = "md"
2518
+ }) {
2519
+ const [s, d] = N(n ?? []), h = t ?? s, f = (i) => {
2520
+ const u = h.includes(i) ? h.filter((m) => m !== i) : [...h, i];
2521
+ t == null && d(u), a?.(u);
2522
+ };
2523
+ return /* @__PURE__ */ r(
2524
+ "div",
2525
+ {
2526
+ className: g(
2527
+ "mx-checkbox-cards",
2528
+ `mx-checkbox-cards--${c}`,
2529
+ l && `mx-checkbox-cards--accent-${l}`
2530
+ ),
2531
+ style: { gridTemplateColumns: `repeat(${o}, minmax(0, 1fr))` },
2532
+ children: e.map((i) => /* @__PURE__ */ r(
2533
+ "div",
2534
+ {
2535
+ className: g(
2536
+ "mx-checkbox-cards__card",
2537
+ h.includes(i.value) && "is-selected",
2538
+ i.disabled && "is-disabled"
2539
+ ),
2540
+ children: /* @__PURE__ */ r(
2541
+ Lt,
2542
+ {
2543
+ checked: h.includes(i.value),
2544
+ disabled: i.disabled,
2545
+ onChange: () => f(i.value),
2546
+ label: /* @__PURE__ */ b("span", { className: "mx-checkbox-cards__body", children: [
2547
+ i.icon && /* @__PURE__ */ r(S, { name: i.icon, className: "mx-checkbox-cards__icon" }),
2548
+ /* @__PURE__ */ b("span", { className: "mx-checkbox-cards__text", children: [
2549
+ i.label != null && /* @__PURE__ */ r("span", { className: "mx-checkbox-cards__label", children: i.label }),
2550
+ i.description != null && /* @__PURE__ */ r("span", { className: "mx-checkbox-cards__desc", children: i.description })
2551
+ ] })
2552
+ ] })
2553
+ }
2554
+ )
2555
+ },
2556
+ i.value
2557
+ ))
2558
+ }
2559
+ );
2560
+ }
2561
+ function Ba({
2562
+ items: e,
2563
+ value: t,
2564
+ defaultValue: n,
2565
+ onChange: a,
2566
+ name: l,
2567
+ accent: o,
2568
+ orientation: c = "vertical",
2569
+ disabled: s
2570
+ }) {
2571
+ const d = le(), h = l ?? d, [f, i] = N(n ?? ""), u = t ?? f, m = (y) => {
2572
+ t == null && i(y), a?.(y);
2573
+ };
2574
+ return /* @__PURE__ */ r(
2575
+ "div",
2576
+ {
2577
+ className: g(
2578
+ "mx-radio-group",
2579
+ `mx-radio-group--${c}`,
2580
+ o && `mx-radio-group--accent-${o}`
2581
+ ),
2582
+ role: "radiogroup",
2583
+ children: e.map((y) => /* @__PURE__ */ r(
2584
+ Pt,
2585
+ {
2586
+ value: y.value,
2587
+ name: h,
2588
+ checked: u === y.value,
2589
+ disabled: s || y.disabled,
2590
+ label: y.label,
2591
+ onChange: (p) => m(p)
2592
+ },
2593
+ y.value
2594
+ ))
2595
+ }
2596
+ );
2597
+ }
2598
+ function Fa({
2599
+ items: e,
2600
+ value: t,
2601
+ defaultValue: n,
2602
+ onChange: a,
2603
+ accent: l,
2604
+ columns: o = 1,
2605
+ size: c = "md"
2606
+ }) {
2607
+ const d = le(), [h, f] = N(n ?? ""), i = t ?? h, u = (m) => {
2608
+ t == null && f(m), a?.(m);
2609
+ };
2610
+ return /* @__PURE__ */ r(
2611
+ "div",
2612
+ {
2613
+ className: g(
2614
+ "mx-radio-cards",
2615
+ `mx-radio-cards--${c}`,
2616
+ l && `mx-radio-cards--accent-${l}`
2617
+ ),
2618
+ style: { gridTemplateColumns: `repeat(${o}, minmax(0, 1fr))` },
2619
+ children: e.map((m) => /* @__PURE__ */ r(
2620
+ "div",
2621
+ {
2622
+ className: g(
2623
+ "mx-radio-cards__card",
2624
+ i === m.value && "is-selected",
2625
+ m.disabled && "is-disabled"
2626
+ ),
2627
+ children: /* @__PURE__ */ r(
2628
+ Pt,
2629
+ {
2630
+ value: m.value,
2631
+ name: d,
2632
+ checked: i === m.value,
2633
+ disabled: m.disabled,
2634
+ onChange: (y) => u(y),
2635
+ label: /* @__PURE__ */ b("span", { className: "mx-radio-cards__body", children: [
2636
+ m.icon && /* @__PURE__ */ r(S, { name: m.icon, className: "mx-radio-cards__icon" }),
2637
+ /* @__PURE__ */ b("span", { className: "mx-radio-cards__text", children: [
2638
+ m.label != null && /* @__PURE__ */ r("span", { className: "mx-radio-cards__label", children: m.label }),
2639
+ m.description != null && /* @__PURE__ */ r("span", { className: "mx-radio-cards__desc", children: m.description })
2640
+ ] })
2641
+ ] })
2642
+ }
2643
+ )
2644
+ },
2645
+ m.value
2646
+ ))
2647
+ }
2648
+ );
2649
+ }
2650
+ const ea = { info: "i", success: "✓", warning: "!", danger: "×" };
2651
+ function Za({ tone: e = "info", title: t, children: n, dismissible: a, onDismiss: l, actions: o }) {
2652
+ return /* @__PURE__ */ b("div", { className: g("mx-alt", `mx-alt--${e}`), role: e === "danger" ? "alert" : "status", children: [
2653
+ /* @__PURE__ */ r("span", { className: "mx-alt__icon", "aria-hidden": "true", children: ea[e] }),
2654
+ /* @__PURE__ */ b("div", { className: "mx-alt__body", children: [
2655
+ t && /* @__PURE__ */ r("h4", { className: "mx-alt__h", children: t }),
2656
+ n && /* @__PURE__ */ r("div", { className: "mx-alt__msg", children: n }),
2657
+ o && /* @__PURE__ */ r("div", { className: "mx-alt__actions", children: o })
2658
+ ] }),
2659
+ a && /* @__PURE__ */ r("button", { className: "mx-alt__x", type: "button", "aria-label": "Dismiss", onClick: l, children: "×" })
2660
+ ] });
2661
+ }
2662
+ function ta({ value: e = 0, max: t = 100, variant: n = "brand", size: a = "md", indeterminate: l = !1 }) {
2663
+ const o = l ? 0 : Math.min(100, Math.max(0, e / t * 100));
2664
+ return /* @__PURE__ */ r(
2665
+ "div",
2666
+ {
2667
+ className: g("mx-pr", `mx-pr--${a}`, `mx-pr--${n}`, l && "is-indet"),
2668
+ role: "progressbar",
2669
+ "aria-valuenow": l ? void 0 : Math.round(o),
2670
+ "aria-valuemin": 0,
2671
+ "aria-valuemax": 100,
2672
+ children: /* @__PURE__ */ r("div", { className: "mx-pr__track", children: /* @__PURE__ */ r("div", { className: "mx-pr__bar", style: l ? void 0 : { width: `${o}%` } }) })
2673
+ }
2674
+ );
2675
+ }
2676
+ const na = {
2677
+ negative: "negative",
2678
+ caution: "caution",
2679
+ positive: "positive"
2680
+ };
2681
+ function Ha({ score: e, label: t, variant: n = "negative", className: a }) {
2682
+ return /* @__PURE__ */ b("div", { className: g("mx-pwstr", a), children: [
2683
+ /* @__PURE__ */ r(ta, { value: e, variant: na[n], size: "sm" }),
2684
+ t && /* @__PURE__ */ r("span", { className: g("mx-pwstr__lbl", `mx-pwstr__lbl--${n}`), children: t })
2685
+ ] });
2686
+ }
2687
+ const aa = {
2688
+ info: "info",
2689
+ brand: "info",
2690
+ positive: "check",
2691
+ caution: "alert",
2692
+ negative: "alert",
2693
+ discovery: "help-circle"
2694
+ }, ra = { sm: 16, md: 18, lg: 20 };
2695
+ function Ya({
2696
+ title: e,
2697
+ intent: t = "info",
2698
+ variant: n = "soft",
2699
+ size: a = "md",
2700
+ icon: l,
2701
+ className: o,
2702
+ children: c,
2703
+ ...s
2704
+ }) {
2705
+ const d = l !== null, h = l ?? aa[t];
2706
+ return /* @__PURE__ */ b(
2707
+ "div",
2708
+ {
2709
+ role: "note",
2710
+ className: g(
2711
+ "mx-callout",
2712
+ `mx-callout--${t}`,
2713
+ `mx-callout--${n}`,
2714
+ `mx-callout--${a}`,
2715
+ o
2716
+ ),
2717
+ ...s,
2718
+ children: [
2719
+ d && /* @__PURE__ */ r("span", { className: "mx-callout__icon", "aria-hidden": "true", children: /* @__PURE__ */ r(S, { name: h, size: ra[a] }) }),
2720
+ /* @__PURE__ */ b("div", { className: "mx-callout__body", children: [
2721
+ e && /* @__PURE__ */ r("div", { className: "mx-callout__title", children: e }),
2722
+ /* @__PURE__ */ r("div", { className: "mx-callout__msg", children: c })
2723
+ ] })
2724
+ ]
2725
+ }
2726
+ );
2727
+ }
2728
+ function Ua({ size: e = "md", accent: t, label: n = "Loading", className: a, style: l, ...o }) {
2729
+ const c = typeof e == "number", s = c ? { width: e, height: e, borderWidth: Math.max(2, Math.round(e / 10)) } : void 0;
2730
+ return /* @__PURE__ */ r(
2731
+ "span",
2732
+ {
2733
+ role: "status",
2734
+ "aria-label": n,
2735
+ className: g("mx-spinner", !c && `mx-spinner--${e}`, t && `mx-spinner--accent-${t}`, a),
2736
+ style: { ...s, ...l },
2737
+ ...o
2738
+ }
2739
+ );
2740
+ }
2741
+ const Ce = (e) => typeof e == "number" ? `${e}px` : e;
2742
+ function Ka({ width: e = "100%", height: t = 16, radius: n = 6, circle: a, className: l, style: o, ...c }) {
2743
+ const s = {
2744
+ width: Ce(e),
2745
+ height: Ce(a ? e : t),
2746
+ borderRadius: a ? "9999px" : `${n}px`
2747
+ };
2748
+ return /* @__PURE__ */ r("span", { "aria-hidden": "true", className: g("mx-skeleton", l), style: { ...s, ...o }, ...c });
2749
+ }
2750
+ function la({ children: e, variant: t = "neutral", size: n = "md", selected: a, leading: l, onRemove: o, onClick: c, className: s }) {
2751
+ return /* @__PURE__ */ b(
2752
+ "span",
2753
+ {
2754
+ className: g("mx-chip", `mx-chip--${t}`, n !== "md" && `mx-chip--${n}`, c && "mx-chip--selectable", a && "is-selected", s),
2755
+ onClick: c,
2756
+ children: [
2757
+ l,
2758
+ e,
2759
+ o && /* @__PURE__ */ r(
2760
+ "button",
2761
+ {
2762
+ type: "button",
2763
+ className: "mx-chip__x",
2764
+ "aria-label": "Remove",
2765
+ onClick: (d) => {
2766
+ d.stopPropagation(), o();
2767
+ },
2768
+ children: /* @__PURE__ */ r(S, { name: "close", size: 12, strokeWidth: 2.5 })
2769
+ }
2770
+ )
2771
+ ]
2772
+ }
2773
+ );
2774
+ }
2775
+ function Wa({ children: e, tone: t = "neutral", dot: n = !0, size: a = "sm" }) {
2776
+ return /* @__PURE__ */ r(la, { variant: t, size: a, leading: n ? /* @__PURE__ */ r("span", { style: { width: 6, height: 6, borderRadius: "50%", background: "currentColor" } }) : void 0, children: e });
2777
+ }
2778
+ function Va({ children: e, variant: t = "negative", size: n = "md" }) {
2779
+ return /* @__PURE__ */ r("span", { className: g("mx-badge", `mx-badge--${t}`, n !== "md" && `mx-badge--${n}`), children: e });
2780
+ }
2781
+ const at = ["--iris-9", "--indigo-9", "--green-9", "--orange-9", "--plum-9", "--red-9"];
2782
+ function qa({ name: e = "", src: t, size: n = 40, status: a }) {
2783
+ const l = e.split(" ").map((h) => h[0]).slice(0, 2).join("").toUpperCase(), o = [...e].reduce((h, f) => h + f.charCodeAt(0), 0), c = at[o % at.length], s = {
2784
+ background: t ? "rgb(var(--bg-tertiary))" : `rgb(var(${c}))`,
2785
+ fontSize: Math.round(n * 0.38)
2786
+ }, d = Math.round(n * 0.28);
2787
+ return /* @__PURE__ */ b("span", { className: "mx-avatar", style: { width: n, height: n }, children: [
2788
+ /* @__PURE__ */ r("span", { className: "mx-avatar__img", style: s, children: t ? /* @__PURE__ */ r("img", { src: t, alt: e }) : l }),
2789
+ a && /* @__PURE__ */ r("span", { className: "mx-avatar__status", style: { width: d, height: d, background: `rgb(var(--bg-${a}))` } })
2790
+ ] });
2791
+ }
2792
+ function za({
2793
+ variant: e = "flat",
2794
+ padding: t = 20,
2795
+ title: n,
2796
+ actions: a,
2797
+ className: l,
2798
+ style: o,
2799
+ children: c,
2800
+ ...s
2801
+ }) {
2802
+ const d = n != null || a != null;
2803
+ return /* @__PURE__ */ b("div", { className: g("mx-card", e !== "flat" && `mx-card--${e}`, l), style: { padding: t, ...o }, ...s, children: [
2804
+ d && /* @__PURE__ */ b("div", { className: "mx-card__header", children: [
2805
+ n != null && /* @__PURE__ */ r("div", { className: "mx-card__title", children: n }),
2806
+ a != null && /* @__PURE__ */ r("div", { className: "mx-card__actions", children: a })
2807
+ ] }),
2808
+ c
2809
+ ] });
2810
+ }
2811
+ function Ga({ columns: e, data: t, striped: n, getRowKey: a }) {
2812
+ return /* @__PURE__ */ r("div", { className: "mx-table-wrap", children: /* @__PURE__ */ b("table", { className: g("mx-table", n && "mx-table--striped"), children: [
2813
+ /* @__PURE__ */ r("thead", { children: /* @__PURE__ */ r("tr", { children: e.map((l) => /* @__PURE__ */ r("th", { className: g(l.align === "right" && "is-right"), children: l.label }, l.key)) }) }),
2814
+ /* @__PURE__ */ r("tbody", { children: t.map((l, o) => /* @__PURE__ */ r("tr", { children: e.map((c) => /* @__PURE__ */ r("td", { className: g(c.align === "right" && "is-right"), children: c.render ? c.render(l) : l[c.key] }, c.key)) }, a ? a(l, o) : o)) })
2815
+ ] }) });
2816
+ }
2817
+ function Ja({ label: e, value: t, delta: n, deltaTone: a = "neutral", hint: l, leading: o, align: c = "left" }) {
2818
+ return /* @__PURE__ */ b("div", { className: g("mx-stat", c === "center" && "mx-stat--center"), children: [
2819
+ /* @__PURE__ */ b("div", { className: "mx-stat__head", children: [
2820
+ o && /* @__PURE__ */ r("span", { className: "mx-stat__icon", children: o }),
2821
+ /* @__PURE__ */ r("span", { className: "mx-stat__label", children: e })
2822
+ ] }),
2823
+ /* @__PURE__ */ r("div", { className: "mx-stat__value", children: t }),
2824
+ (n || l) && /* @__PURE__ */ b("div", { className: "mx-stat__foot", children: [
2825
+ n && /* @__PURE__ */ r("span", { className: g("mx-stat__delta", `mx-stat__delta--${a}`), children: n }),
2826
+ l && /* @__PURE__ */ r("span", { className: "mx-stat__hint", children: l })
2827
+ ] })
2828
+ ] });
2829
+ }
2830
+ function Xa({
2831
+ viewBox: e,
2832
+ series: t,
2833
+ gridY: n = [],
2834
+ gridX: a = [],
2835
+ yTicks: l,
2836
+ xTicks: o,
2837
+ gradients: c = [],
2838
+ markers: s = [],
2839
+ height: d = 240,
2840
+ ariaLabel: h
2841
+ }) {
2842
+ const [, , f, i] = e.split(/\s+/).map(Number);
2843
+ return /* @__PURE__ */ b("div", { className: "mx-chart", style: { height: d }, children: [
2844
+ /* @__PURE__ */ b("svg", { className: "mx-chart__svg", viewBox: e, preserveAspectRatio: "none", role: "img", "aria-label": h, children: [
2845
+ n.map((u, m) => /* @__PURE__ */ r("line", { className: "mx-chart__grid", x1: 0, x2: f, y1: u, y2: u }, `gy${m}`)),
2846
+ a.map((u, m) => /* @__PURE__ */ r("line", { className: "mx-chart__grid", x1: u, x2: u, y1: 0, y2: i }, `gx${m}`)),
2847
+ t.map((u, m) => u.area ? /* @__PURE__ */ r("path", { d: u.area, fill: u.fillId ? `url(#${u.fillId})` : "none", stroke: "none" }, `a${m}`) : null),
2848
+ s.map((u, m) => /* @__PURE__ */ r("line", { className: g("mx-chart__marker", u.dashed === !1 && "mx-chart__marker--solid"), x1: 0, x2: f, y1: u.y, y2: u.y }, `m${m}`)),
2849
+ t.map((u, m) => /* @__PURE__ */ r(
2850
+ "path",
2851
+ {
2852
+ className: "mx-chart__line",
2853
+ d: u.d,
2854
+ stroke: u.stroke,
2855
+ strokeWidth: u.width ?? 2.5,
2856
+ strokeDasharray: u.dashed ? "6 5" : void 0,
2857
+ vectorEffect: "non-scaling-stroke"
2858
+ },
2859
+ `l${m}`
2860
+ )),
2861
+ c.length > 0 && /* @__PURE__ */ r("defs", { children: c.map((u) => /* @__PURE__ */ b("linearGradient", { id: u.id, x1: "0", x2: "0", y1: "0", y2: "1", children: [
2862
+ /* @__PURE__ */ r("stop", { offset: "0%", stopColor: u.stroke, stopOpacity: "0.28" }),
2863
+ /* @__PURE__ */ r("stop", { offset: "100%", stopColor: u.stroke, stopOpacity: "0" })
2864
+ ] }, u.id)) })
2865
+ ] }),
2866
+ l && /* @__PURE__ */ r("div", { className: "mx-chart__yaxis", children: l.map((u, m) => /* @__PURE__ */ r("span", { children: u }, m)) }),
2867
+ o && /* @__PURE__ */ r("div", { className: "mx-chart__xaxis", children: o.map((u, m) => /* @__PURE__ */ r("span", { children: u }, m)) })
2868
+ ] });
2869
+ }
2870
+ function Qa({ items: e, className: t }) {
2871
+ return /* @__PURE__ */ r("ul", { className: g("mx-checklist", t), children: e.map((n, a) => /* @__PURE__ */ b("li", { className: g("mx-checklist__item", n.met && "is-met"), children: [
2872
+ /* @__PURE__ */ r("span", { className: "mx-checklist__mark", "aria-hidden": "true", children: n.met ? "✓" : "○" }),
2873
+ /* @__PURE__ */ r("span", { children: n.label })
2874
+ ] }, a)) });
2875
+ }
2876
+ function er({ label: e, leading: t, description: n, value: a, trailing: l, onClick: o, className: c, ...s }) {
2877
+ const d = o != null, h = g("mx-listrow", d && "mx-listrow--interactive", c), f = /* @__PURE__ */ b(C, { children: [
2878
+ t != null && /* @__PURE__ */ r("span", { className: "mx-listrow__lead", children: t }),
2879
+ /* @__PURE__ */ b("span", { className: "mx-listrow__body", children: [
2880
+ /* @__PURE__ */ r("span", { className: "mx-listrow__label", children: e }),
2881
+ n != null && /* @__PURE__ */ r("span", { className: "mx-listrow__desc", children: n })
2882
+ ] }),
2883
+ a != null && /* @__PURE__ */ r("span", { className: "mx-listrow__value", children: a }),
2884
+ l != null && /* @__PURE__ */ r("span", { className: "mx-listrow__trail", children: l })
2885
+ ] });
2886
+ return d ? /* @__PURE__ */ r("button", { type: "button", className: h, onClick: o, ...s, children: f }) : /* @__PURE__ */ r("div", { className: h, ...s, children: f });
2887
+ }
2888
+ function tr({ children: e, size: t = "md", accent: n, cite: a, className: l, ...o }) {
2889
+ return /* @__PURE__ */ b(
2890
+ "blockquote",
2891
+ {
2892
+ className: g("mx-blockquote", `mx-blockquote--${t}`, n && `mx-blockquote--accent-${n}`, l),
2893
+ ...o,
2894
+ children: [
2895
+ /* @__PURE__ */ r("p", { className: "mx-blockquote__text", children: e }),
2896
+ a && /* @__PURE__ */ r("footer", { className: "mx-blockquote__cite", children: a })
2897
+ ]
2898
+ }
2899
+ );
2900
+ }
2901
+ function nr({
2902
+ items: e,
2903
+ orientation: t = "horizontal",
2904
+ size: n = "md",
2905
+ labelWidth: a = 140,
2906
+ className: l,
2907
+ ...o
2908
+ }) {
2909
+ const c = t === "horizontal";
2910
+ return /* @__PURE__ */ r(
2911
+ "dl",
2912
+ {
2913
+ className: g("mx-datalist", `mx-datalist--${t}`, `mx-datalist--${n}`, l),
2914
+ ...o,
2915
+ children: e.map((s, d) => /* @__PURE__ */ b("div", { className: "mx-datalist__row", children: [
2916
+ /* @__PURE__ */ r("dt", { className: "mx-datalist__label", style: c ? { width: a } : void 0, children: s.label }),
2917
+ /* @__PURE__ */ r("dd", { className: "mx-datalist__value", children: s.value })
2918
+ ] }, d))
2919
+ }
2920
+ );
2921
+ }
2922
+ function ar({
2923
+ children: e,
2924
+ variant: t = "soft",
2925
+ size: n = "md",
2926
+ accent: a,
2927
+ block: l = !1,
2928
+ className: o,
2929
+ ...c
2930
+ }) {
2931
+ return /* @__PURE__ */ r(
2932
+ l ? "pre" : "code",
2933
+ {
2934
+ className: g(
2935
+ "mx-code",
2936
+ `mx-code--${t}`,
2937
+ `mx-code--${n}`,
2938
+ l && "mx-code--block",
2939
+ a && `mx-code--accent-${a}`,
2940
+ o
2941
+ ),
2942
+ ...c,
2943
+ children: e
2944
+ }
2945
+ );
2946
+ }
2947
+ function rr({ children: e, size: t = "md", className: n, ...a }) {
2948
+ return /* @__PURE__ */ r("kbd", { className: g("mx-kbd", `mx-kbd--${t}`, n), ...a, children: e });
2949
+ }
2950
+ function lr({ tabs: e, value: t, onChange: n, variant: a = "underline" }) {
2951
+ return /* @__PURE__ */ r("div", { className: g("mx-tabs", a === "pills" && "mx-tabs--pills"), role: "tablist", children: e.map((l) => /* @__PURE__ */ r(
2952
+ "button",
2953
+ {
2954
+ type: "button",
2955
+ role: "tab",
2956
+ "aria-selected": l.value === t,
2957
+ disabled: l.disabled,
2958
+ className: g("mx-tab", l.value === t && "is-active"),
2959
+ onClick: () => !l.disabled && n?.(l.value),
2960
+ children: l.label
2961
+ },
2962
+ l.value
2963
+ )) });
2964
+ }
2965
+ function oa() {
2966
+ return /* @__PURE__ */ r(
2967
+ "svg",
2968
+ {
2969
+ className: "mx-acc__caret",
2970
+ width: "16",
2971
+ height: "16",
2972
+ viewBox: "0 0 24 24",
2973
+ fill: "none",
2974
+ stroke: "currentColor",
2975
+ strokeWidth: "2",
2976
+ strokeLinecap: "round",
2977
+ strokeLinejoin: "round",
2978
+ "aria-hidden": "true",
2979
+ children: /* @__PURE__ */ r("path", { d: "M6 9l6 6 6-6" })
2980
+ }
2981
+ );
2982
+ }
2983
+ const or = j(function({ items: t, type: n = "single", defaultValue: a, collapsible: l = !0, className: o, ...c }, s) {
2984
+ const [d, h] = N(
2985
+ () => a == null ? [] : Array.isArray(a) ? a : [a]
2986
+ ), f = w([]), i = (m) => {
2987
+ h((y) => {
2988
+ const p = y.includes(m);
2989
+ return n === "multiple" ? p ? y.filter((v) => v !== m) : [...y, m] : p ? l ? [] : y : [m];
2990
+ });
2991
+ }, u = (m, y) => {
2992
+ const p = t.map((x, $) => x.disabled ? -1 : $).filter((x) => x >= 0);
2993
+ if (p.length === 0) return;
2994
+ const v = p.indexOf(y);
2995
+ let _ = -1;
2996
+ m.key === "ArrowDown" ? _ = p[(v + 1) % p.length] ?? -1 : m.key === "ArrowUp" ? _ = p[(v - 1 + p.length) % p.length] ?? -1 : m.key === "Home" ? _ = p[0] ?? -1 : m.key === "End" && (_ = p[p.length - 1] ?? -1), _ >= 0 && (m.preventDefault(), f.current?.[_]?.focus());
2997
+ };
2998
+ return /* @__PURE__ */ r("div", { ref: s, className: g("mx-acc", o), ...c, children: t.map((m, y) => {
2999
+ const p = d.includes(m.value), v = `mx-acc-panel-${m.value}`;
3000
+ return /* @__PURE__ */ b(
3001
+ "div",
3002
+ {
3003
+ className: g("mx-acc__item", p && "is-open", m.disabled && "is-disabled"),
3004
+ children: [
3005
+ /* @__PURE__ */ r("h3", { className: "mx-acc__heading", children: /* @__PURE__ */ b(
3006
+ "button",
3007
+ {
3008
+ ref: (_) => {
3009
+ f.current && (f.current[y] = _);
3010
+ },
3011
+ type: "button",
3012
+ className: "mx-acc__trigger",
3013
+ "aria-expanded": p,
3014
+ "aria-controls": v,
3015
+ disabled: m.disabled,
3016
+ onClick: () => i(m.value),
3017
+ onKeyDown: (_) => u(_, y),
3018
+ children: [
3019
+ /* @__PURE__ */ r("span", { className: "mx-acc__title", children: m.title }),
3020
+ /* @__PURE__ */ r(oa, {})
3021
+ ]
3022
+ }
3023
+ ) }),
3024
+ /* @__PURE__ */ r("div", { id: v, className: "mx-acc__panel", role: "region", children: /* @__PURE__ */ r("div", { className: "mx-acc__content", children: /* @__PURE__ */ r("div", { className: "mx-acc__body", children: m.content }) }) })
3025
+ ]
3026
+ },
3027
+ m.value
3028
+ );
3029
+ }) });
3030
+ });
3031
+ function de(e, t) {
3032
+ const n = [];
3033
+ for (let a = e; a <= t; a++) n.push(a);
3034
+ return n;
3035
+ }
3036
+ function sa(e, t, n) {
3037
+ const a = n * 2 + 5;
3038
+ if (t <= a) return de(1, t);
3039
+ const l = Math.max(e - n, 1), o = Math.min(e + n, t), c = l > 2, s = o < t - 1;
3040
+ return !c && s ? [...de(1, n * 2 + 3), "dots", t] : c && !s ? [1, "dots", ...de(t - (n * 2 + 2), t)] : [1, "dots", ...de(l, o), "dots", t];
3041
+ }
3042
+ function rt({ dir: e }) {
3043
+ return /* @__PURE__ */ r("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: /* @__PURE__ */ r("path", { d: e === "left" ? "M15 18l-6-6 6-6" : "M9 18l6-6-6-6" }) });
3044
+ }
3045
+ const sr = j(function({ page: t, count: n, onPageChange: a, siblingCount: l = 1, size: o = "md", caption: c, className: s, ...d }, h) {
3046
+ const f = sa(t, n, l), i = (u) => {
3047
+ u >= 1 && u <= n && u !== t && a(u);
3048
+ };
3049
+ return /* @__PURE__ */ b("nav", { ref: h, className: g("mx-pag", `mx-pag--${o}`, s), "aria-label": "Pagination", ...d, children: [
3050
+ /* @__PURE__ */ b("ul", { className: "mx-pag__list", children: [
3051
+ /* @__PURE__ */ r("li", { children: /* @__PURE__ */ r("button", { type: "button", className: "mx-pag__btn mx-pag__btn--nav", disabled: t <= 1, "aria-label": "Previous page", onClick: () => i(t - 1), children: /* @__PURE__ */ r(rt, { dir: "left" }) }) }),
3052
+ f.map(
3053
+ (u, m) => u === "dots" ? /* @__PURE__ */ r("li", { children: /* @__PURE__ */ r("span", { className: "mx-pag__gap", "aria-hidden": "true", children: "…" }) }, `d${m}`) : /* @__PURE__ */ r("li", { children: /* @__PURE__ */ r(
3054
+ "button",
3055
+ {
3056
+ type: "button",
3057
+ className: g("mx-pag__btn", u === t && "is-active"),
3058
+ "aria-current": u === t ? "page" : void 0,
3059
+ onClick: () => i(u),
3060
+ children: u
3061
+ }
3062
+ ) }, u)
3063
+ ),
3064
+ /* @__PURE__ */ r("li", { children: /* @__PURE__ */ r("button", { type: "button", className: "mx-pag__btn mx-pag__btn--nav", disabled: t >= n, "aria-label": "Next page", onClick: () => i(t + 1), children: /* @__PURE__ */ r(rt, { dir: "right" }) }) })
3065
+ ] }),
3066
+ c != null && /* @__PURE__ */ r("div", { className: "mx-pag__caption", children: c })
3067
+ ] });
3068
+ });
3069
+ function U({ children: e }) {
3070
+ return typeof document > "u" ? null : ot(e, document.body);
3071
+ }
3072
+ const ca = '[role="menuitem"]:not([aria-disabled="true"]),[role="menuitemradio"],[role="menuitemcheckbox"]';
3073
+ function cr({ menus: e, accent: t = "iris" }) {
3074
+ const [n, a] = N(null), l = w(null), [o, c] = N(() => {
3075
+ const h = {};
3076
+ for (const f of e) for (const i of f.items) i.type === "check" && i.id && (h[i.id] = !!i.checked);
3077
+ return h;
3078
+ }), [s, d] = N(() => {
3079
+ const h = {};
3080
+ for (const f of e)
3081
+ for (const i of f.items) i.type === "radio" && i.group && i.value != null && i.checked && (h[i.group] = i.value);
3082
+ return h;
3083
+ });
3084
+ return /* @__PURE__ */ r(
3085
+ "div",
3086
+ {
3087
+ ref: l,
3088
+ role: "menubar",
3089
+ className: g("mx-menubar", `mx-menubar--accent-${t}`),
3090
+ onKeyDown: (h) => {
3091
+ if (h.key !== "ArrowRight" && h.key !== "ArrowLeft") return;
3092
+ const f = l.current;
3093
+ if (!f) return;
3094
+ const i = Array.from(f.querySelectorAll('[role="menuitem"]')), u = i.indexOf(document.activeElement);
3095
+ if (u === -1) return;
3096
+ h.preventDefault();
3097
+ const m = h.key === "ArrowRight" ? (u + 1) % i.length : (u - 1 + i.length) % i.length;
3098
+ i[m]?.focus(), a((y) => y != null ? m : y);
3099
+ },
3100
+ children: e.map((h, f) => /* @__PURE__ */ r(
3101
+ ia,
3102
+ {
3103
+ menu: h,
3104
+ accent: t,
3105
+ isOpen: n === f,
3106
+ anyOpen: n != null,
3107
+ barRef: l,
3108
+ onToggle: () => a((i) => i === f ? null : f),
3109
+ onHover: () => a(f),
3110
+ onClose: () => a(null),
3111
+ checks: o,
3112
+ radios: s,
3113
+ onToggleCheck: (i) => c((u) => ({ ...u, [i]: !u[i] })),
3114
+ onSelectRadio: (i, u) => d((m) => ({ ...m, [i]: u }))
3115
+ },
3116
+ h.label
3117
+ ))
3118
+ }
3119
+ );
3120
+ }
3121
+ function ia({
3122
+ menu: e,
3123
+ accent: t,
3124
+ isOpen: n,
3125
+ anyOpen: a,
3126
+ barRef: l,
3127
+ onToggle: o,
3128
+ onHover: c,
3129
+ onClose: s,
3130
+ checks: d,
3131
+ radios: h,
3132
+ onToggleCheck: f,
3133
+ onSelectRadio: i
3134
+ }) {
3135
+ const u = w(null), m = w(null), [y] = N(() => z("mx-menubar")), { style: p } = te(u, m, { placement: "bottom-start", open: n });
3136
+ ee(m, {
3137
+ onDismiss: s,
3138
+ outsideClick: !0,
3139
+ escapeKey: !0,
3140
+ ignore: [l],
3141
+ enabled: n
3142
+ }), P(() => {
3143
+ n && m.current?.focus?.();
3144
+ }, [n]);
3145
+ function v(x) {
3146
+ if (x.type === "check" && x.id) {
3147
+ f(x.id), x.onSelect?.();
3148
+ return;
3149
+ }
3150
+ if (x.type === "radio" && x.group && x.value != null) {
3151
+ i(x.group, x.value), x.onSelect?.();
3152
+ return;
3153
+ }
3154
+ x.onSelect?.(), s();
3155
+ }
3156
+ function _(x, $) {
3157
+ const k = x.id ?? `${x.type ?? "item"}-${$}`;
3158
+ if (x.type === "separator") return /* @__PURE__ */ r("div", { className: "mx-menubar__sep", role: "separator" }, k);
3159
+ if (x.type === "label")
3160
+ return /* @__PURE__ */ r("div", { className: "mx-menubar__label", children: x.label }, k);
3161
+ const M = x.type === "check", A = x.type === "radio", O = M && x.id ? !!d[x.id] : A && x.group && x.value != null ? h[x.group] === x.value : !1;
3162
+ return /* @__PURE__ */ b(
3163
+ "button",
3164
+ {
3165
+ type: "button",
3166
+ role: M ? "menuitemcheckbox" : A ? "menuitemradio" : "menuitem",
3167
+ "aria-checked": M || A ? O : void 0,
3168
+ className: "mx-menubar__item",
3169
+ onClick: () => v(x),
3170
+ children: [
3171
+ M && /* @__PURE__ */ r("span", { className: "mx-menubar__check", "aria-hidden": "true", children: O ? /* @__PURE__ */ r(S, { name: "check", size: 14 }) : null }),
3172
+ A && /* @__PURE__ */ r("span", { className: "mx-menubar__radio", "aria-hidden": "true", children: O ? /* @__PURE__ */ r("span", { className: "mx-menubar__radio-dot" }) : null }),
3173
+ x.icon && !M && !A && /* @__PURE__ */ r(S, { className: "mx-menubar__icon", name: x.icon, size: 15 }),
3174
+ /* @__PURE__ */ r("span", { className: "mx-menubar__text", children: x.label }),
3175
+ x.shortcut && /* @__PURE__ */ r("span", { className: "mx-menubar__shortcut", children: x.shortcut })
3176
+ ]
3177
+ },
3178
+ k
3179
+ );
3180
+ }
3181
+ return /* @__PURE__ */ b(C, { children: [
3182
+ /* @__PURE__ */ b(
3183
+ "button",
3184
+ {
3185
+ ref: u,
3186
+ type: "button",
3187
+ role: "menuitem",
3188
+ "aria-haspopup": "menu",
3189
+ "aria-expanded": n,
3190
+ "aria-controls": n ? y : void 0,
3191
+ className: g("mx-menubar__trigger", n && "mx-menubar__trigger--active"),
3192
+ onClick: o,
3193
+ onMouseEnter: () => {
3194
+ a && c();
3195
+ },
3196
+ children: [
3197
+ e.icon && /* @__PURE__ */ r(S, { name: e.icon, size: 15 }),
3198
+ e.label
3199
+ ]
3200
+ }
3201
+ ),
3202
+ n && /* @__PURE__ */ r(U, { children: /* @__PURE__ */ r(
3203
+ "div",
3204
+ {
3205
+ ref: m,
3206
+ id: y,
3207
+ role: "menu",
3208
+ tabIndex: -1,
3209
+ className: g("mx-menubar__panel", `mx-menubar--accent-${t}`),
3210
+ style: p,
3211
+ onKeyDown: (x) => {
3212
+ Oe(x.nativeEvent, document.activeElement, m.current ?? void 0, {
3213
+ candidateSelector: ca,
3214
+ focus: !0,
3215
+ arrowKeyOptions: "vertical"
3216
+ });
3217
+ },
3218
+ children: e.items.map((x, $) => _(x, $))
3219
+ }
3220
+ ) })
3221
+ ] });
3222
+ }
3223
+ function ir({ items: e, value: t, onChange: n, size: a = "md" }) {
3224
+ return /* @__PURE__ */ r("nav", { className: g("mx-tabnav", `mx-tabnav--${a}`), children: e.map((l) => {
3225
+ const o = t === l.value;
3226
+ return /* @__PURE__ */ r(
3227
+ "a",
3228
+ {
3229
+ href: l.disabled ? void 0 : l.href ?? "#",
3230
+ "aria-current": o ? "page" : void 0,
3231
+ "aria-disabled": l.disabled || void 0,
3232
+ className: g("mx-tabnav__link", o && "mx-tabnav__link--active"),
3233
+ onClick: (c) => {
3234
+ if (l.disabled) {
3235
+ c.preventDefault();
3236
+ return;
3237
+ }
3238
+ n?.(l.value);
3239
+ },
3240
+ children: l.label
3241
+ },
3242
+ l.value
3243
+ );
3244
+ }) });
3245
+ }
3246
+ function dr({ open: e, onClose: t, title: n, footer: a, size: l = "md", children: o }) {
3247
+ return P(() => {
3248
+ if (!e) return;
3249
+ const c = (s) => {
3250
+ s.key === "Escape" && t?.();
3251
+ };
3252
+ return document.addEventListener("keydown", c), () => document.removeEventListener("keydown", c);
3253
+ }, [e, t]), !e || typeof document > "u" ? null : ot(
3254
+ /* @__PURE__ */ r("div", { className: "mx-modal-backdrop", onClick: t, children: /* @__PURE__ */ b(
3255
+ "div",
3256
+ {
3257
+ className: g("mx-modal", l !== "md" && `mx-modal--${l}`),
3258
+ role: "dialog",
3259
+ "aria-modal": "true",
3260
+ onClick: (c) => c.stopPropagation(),
3261
+ children: [
3262
+ n && /* @__PURE__ */ b("div", { className: "mx-modal__head", children: [
3263
+ /* @__PURE__ */ r("h3", { className: "mx-modal__title", children: n }),
3264
+ /* @__PURE__ */ r("button", { className: "mx-modal__x", type: "button", "aria-label": "Close", onClick: t, children: /* @__PURE__ */ r("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", children: /* @__PURE__ */ r("path", { d: "M18 6 6 18M6 6l12 12" }) }) })
3265
+ ] }),
3266
+ /* @__PURE__ */ r("div", { className: "mx-modal__body", children: o }),
3267
+ a && /* @__PURE__ */ r("div", { className: "mx-modal__foot", children: a })
3268
+ ]
3269
+ }
3270
+ ) }),
3271
+ document.body
3272
+ );
3273
+ }
3274
+ function ur({ content: e, children: t }) {
3275
+ return /* @__PURE__ */ b("span", { className: "mx-tooltip-wrap", children: [
3276
+ t,
3277
+ /* @__PURE__ */ r("span", { className: "mx-tooltip", role: "tooltip", children: e })
3278
+ ] });
3279
+ }
3280
+ const mr = j(function({ open: t, onClose: n, title: a, description: l, children: o, footer: c, size: s = "md", showClose: d = !0, className: h, ...f }, i) {
3281
+ const u = w(null), [m] = N(() => z("mx-dialog-title")), [y] = N(() => z("mx-dialog-desc")), p = K(
3282
+ (_) => {
3283
+ u.current = _, typeof i == "function" ? i(_) : i && (i.current = _);
3284
+ },
3285
+ [i]
3286
+ );
3287
+ if (Tt(u, { active: t }), ee(u, {
3288
+ onDismiss: () => n?.(),
3289
+ outsideClick: !0,
3290
+ escapeKey: !0,
3291
+ enabled: t
3292
+ }), !t) return null;
3293
+ const v = a != null || l != null;
3294
+ return /* @__PURE__ */ r(U, { children: /* @__PURE__ */ r("div", { className: "mx-modal-backdrop mx-dialog-backdrop", children: /* @__PURE__ */ b(
3295
+ "div",
3296
+ {
3297
+ ref: p,
3298
+ className: g("mx-modal", "mx-dialog", s !== "md" && `mx-dialog--${s}`, h),
3299
+ ...f,
3300
+ role: "dialog",
3301
+ "aria-modal": "true",
3302
+ tabIndex: -1,
3303
+ "aria-labelledby": a != null ? m : void 0,
3304
+ "aria-describedby": l != null ? y : void 0,
3305
+ children: [
3306
+ v && /* @__PURE__ */ b("div", { className: "mx-dialog__head", children: [
3307
+ a != null && /* @__PURE__ */ r(Rt, { size: 3, as: "h2", id: m, className: "mx-dialog__title", children: a }),
3308
+ l != null && /* @__PURE__ */ r("p", { id: y, className: "mx-dialog__desc", children: l })
3309
+ ] }),
3310
+ d && /* @__PURE__ */ r(
3311
+ Gn,
3312
+ {
3313
+ icon: "close",
3314
+ label: "Close",
3315
+ variant: "ghost",
3316
+ size: "sm",
3317
+ className: "mx-dialog__close",
3318
+ onClick: n
3319
+ }
3320
+ ),
3321
+ v && /* @__PURE__ */ r("div", { className: "mx-dialog__divider" }),
3322
+ /* @__PURE__ */ r("div", { className: "mx-dialog__body", children: o }),
3323
+ c != null && /* @__PURE__ */ r("div", { className: "mx-dialog__foot", children: c })
3324
+ ]
3325
+ }
3326
+ ) }) });
3327
+ }), hr = j(function({
3328
+ open: t,
3329
+ title: n,
3330
+ description: a,
3331
+ children: l,
3332
+ confirmLabel: o = "Confirm",
3333
+ cancelLabel: c = "Cancel",
3334
+ destructive: s,
3335
+ onConfirm: d,
3336
+ onCancel: h,
3337
+ className: f,
3338
+ ...i
3339
+ }, u) {
3340
+ const m = w(null), y = w(null), [p] = N(() => z("mx-alert-title")), [v] = N(() => z("mx-alert-desc")), _ = K(
3341
+ (x) => {
3342
+ m.current = x, typeof u == "function" ? u(x) : u && (u.current = x);
3343
+ },
3344
+ [u]
3345
+ );
3346
+ return Tt(m, { active: t, initialFocus: y }), ee(m, {
3347
+ onDismiss: () => h?.(),
3348
+ outsideClick: !1,
3349
+ escapeKey: !0,
3350
+ enabled: t
3351
+ }), t ? /* @__PURE__ */ r(U, { children: /* @__PURE__ */ r("div", { className: "mx-modal-backdrop mx-alert-dialog-backdrop", children: /* @__PURE__ */ b(
3352
+ "div",
3353
+ {
3354
+ ref: _,
3355
+ className: g("mx-modal", "mx-alert-dialog", f),
3356
+ ...i,
3357
+ role: "alertdialog",
3358
+ "aria-modal": "true",
3359
+ tabIndex: -1,
3360
+ "aria-labelledby": n != null ? p : void 0,
3361
+ "aria-describedby": a != null ? v : void 0,
3362
+ children: [
3363
+ n != null && /* @__PURE__ */ r(Rt, { size: 3, as: "h2", id: p, className: "mx-alert-dialog__title", children: n }),
3364
+ a != null && /* @__PURE__ */ r("p", { id: v, className: "mx-alert-dialog__desc", children: a }),
3365
+ l != null && /* @__PURE__ */ r("div", { className: "mx-alert-dialog__extra", children: l }),
3366
+ /* @__PURE__ */ b("div", { className: "mx-alert-dialog__actions", children: [
3367
+ /* @__PURE__ */ r(tt, { variant: "secondary", onClick: h, children: c }),
3368
+ /* @__PURE__ */ r(
3369
+ tt,
3370
+ {
3371
+ ref: y,
3372
+ variant: s ? "destructive" : "primary",
3373
+ onClick: d,
3374
+ children: o
3375
+ }
3376
+ )
3377
+ ] })
3378
+ ]
3379
+ }
3380
+ ) }) }) : null;
3381
+ });
3382
+ function fr({
3383
+ trigger: e,
3384
+ children: t,
3385
+ open: n,
3386
+ defaultOpen: a = !1,
3387
+ onOpenChange: l,
3388
+ placement: o = "bottom-start",
3389
+ width: c = 280
3390
+ }) {
3391
+ const s = n != null, [d, h] = N(a), f = s ? n : d, i = w(null), u = w(null), [m] = N(() => z("mx-popover")), y = K(
3392
+ (v) => {
3393
+ s || h(v), l?.(v);
3394
+ },
3395
+ [s, l]
3396
+ ), { style: p } = te(i, u, { placement: o, width: c, open: f });
3397
+ return ee(u, {
3398
+ onDismiss: () => y(!1),
3399
+ outsideClick: !0,
3400
+ escapeKey: !0,
3401
+ ignore: [i],
3402
+ enabled: f
3403
+ }), P(() => {
3404
+ if (!f) return;
3405
+ const v = i.current;
3406
+ return u.current?.focus?.(), () => v?.focus?.();
3407
+ }, [f]), /* @__PURE__ */ b(C, { children: [
3408
+ /* @__PURE__ */ r(
3409
+ "button",
3410
+ {
3411
+ ref: i,
3412
+ type: "button",
3413
+ className: "mx-popover__trigger",
3414
+ "aria-haspopup": "dialog",
3415
+ "aria-expanded": f,
3416
+ "aria-controls": f ? m : void 0,
3417
+ onClick: () => y(!f),
3418
+ children: e
3419
+ }
3420
+ ),
3421
+ f && /* @__PURE__ */ r(U, { children: /* @__PURE__ */ r(
3422
+ "div",
3423
+ {
3424
+ ref: u,
3425
+ id: m,
3426
+ role: "dialog",
3427
+ tabIndex: -1,
3428
+ className: "mx-popover",
3429
+ style: p,
3430
+ children: t
3431
+ }
3432
+ ) })
3433
+ ] });
3434
+ }
3435
+ const da = '[role="menuitem"]:not([aria-disabled="true"]),[role="menuitemcheckbox"]:not([aria-disabled="true"])';
3436
+ function pr({ trigger: e, items: t, accent: n = "iris", align: a = "start", width: l = 220 }) {
3437
+ const [o, c] = N(!1), s = w(null), d = w(null), [h] = N(() => z("mx-dropdown")), [f, i] = N(() => {
3438
+ const p = {};
3439
+ for (const v of t) v.type === "check" && v.id && (p[v.id] = !!v.checked);
3440
+ return p;
3441
+ }), { style: u } = te(s, d, {
3442
+ placement: a === "end" ? "bottom-end" : "bottom-start",
3443
+ width: l,
3444
+ open: o
3445
+ });
3446
+ ee(d, {
3447
+ onDismiss: () => c(!1),
3448
+ outsideClick: !0,
3449
+ escapeKey: !0,
3450
+ ignore: [s],
3451
+ enabled: o
3452
+ }), P(() => {
3453
+ if (!o) return;
3454
+ const p = s.current;
3455
+ return d.current?.focus?.(), () => p?.focus?.();
3456
+ }, [o]);
3457
+ function m(p) {
3458
+ if (!p.disabled) {
3459
+ if (p.type === "check" && p.id) {
3460
+ const v = p.id;
3461
+ i((_) => ({ ..._, [v]: !_[v] })), p.onSelect?.();
3462
+ return;
3463
+ }
3464
+ p.onSelect?.(), c(!1);
3465
+ }
3466
+ }
3467
+ function y(p, v) {
3468
+ const _ = p.id ?? `${p.type ?? "item"}-${v}`;
3469
+ if (p.type === "separator") return /* @__PURE__ */ r("div", { className: "mx-dropdown__sep", role: "separator" }, _);
3470
+ if (p.type === "label")
3471
+ return /* @__PURE__ */ r("div", { className: "mx-dropdown__label", children: p.label }, _);
3472
+ const x = p.type === "check", $ = x && p.id ? f[p.id] : !1;
3473
+ return /* @__PURE__ */ b(
3474
+ "button",
3475
+ {
3476
+ type: "button",
3477
+ role: x ? "menuitemcheckbox" : "menuitem",
3478
+ "aria-checked": x ? !!$ : void 0,
3479
+ "aria-disabled": p.disabled || void 0,
3480
+ className: "mx-dropdown__item",
3481
+ onClick: () => m(p),
3482
+ children: [
3483
+ x && /* @__PURE__ */ r("span", { className: "mx-dropdown__check", "aria-hidden": "true", children: $ ? /* @__PURE__ */ r(S, { name: "check", size: 14 }) : null }),
3484
+ p.icon && !x && /* @__PURE__ */ r(S, { className: "mx-dropdown__icon", name: p.icon, size: 15 }),
3485
+ /* @__PURE__ */ r("span", { className: "mx-dropdown__text", children: p.label }),
3486
+ p.shortcut && /* @__PURE__ */ r("span", { className: "mx-dropdown__shortcut", children: p.shortcut })
3487
+ ]
3488
+ },
3489
+ _
3490
+ );
3491
+ }
3492
+ return /* @__PURE__ */ b(C, { children: [
3493
+ /* @__PURE__ */ r(
3494
+ "button",
3495
+ {
3496
+ ref: s,
3497
+ type: "button",
3498
+ className: "mx-dropdown__trigger",
3499
+ "aria-haspopup": "menu",
3500
+ "aria-expanded": o,
3501
+ "aria-controls": o ? h : void 0,
3502
+ onClick: () => c((p) => !p),
3503
+ children: e
3504
+ }
3505
+ ),
3506
+ o && /* @__PURE__ */ r(U, { children: /* @__PURE__ */ r(
3507
+ "div",
3508
+ {
3509
+ ref: d,
3510
+ id: h,
3511
+ role: "menu",
3512
+ tabIndex: -1,
3513
+ className: g("mx-dropdown", `mx-dropdown--accent-${n}`),
3514
+ style: u,
3515
+ onKeyDown: (p) => {
3516
+ Oe(p.nativeEvent, document.activeElement, d.current ?? void 0, {
3517
+ candidateSelector: da,
3518
+ focus: !0,
3519
+ arrowKeyOptions: "vertical"
3520
+ });
3521
+ },
3522
+ children: t.map((p, v) => y(p, v))
3523
+ }
3524
+ ) })
3525
+ ] });
3526
+ }
3527
+ const ua = '[role="menuitem"]:not([aria-disabled="true"])';
3528
+ function yr({ children: e, items: t, width: n = 220 }) {
3529
+ const [a, l] = N(null), o = a != null, c = w(null), s = w(null), { style: d } = te(c, s, { point: a, width: n, open: o });
3530
+ ee(s, {
3531
+ onDismiss: () => l(null),
3532
+ outsideClick: !0,
3533
+ escapeKey: !0,
3534
+ enabled: o
3535
+ }), P(() => {
3536
+ if (!o) return;
3537
+ const i = () => l(null);
3538
+ return window.addEventListener("scroll", i, !0), () => window.removeEventListener("scroll", i, !0);
3539
+ }, [o]), P(() => {
3540
+ o && s.current?.focus?.();
3541
+ }, [o]);
3542
+ function h(i) {
3543
+ i.disabled || (i.onSelect?.(), l(null));
3544
+ }
3545
+ function f(i, u) {
3546
+ const m = `${i.type ?? "item"}-${u}`;
3547
+ return i.type === "separator" ? /* @__PURE__ */ r("div", { className: "mx-ctx__sep", role: "separator" }, m) : i.type === "label" ? /* @__PURE__ */ r("div", { className: "mx-ctx__label", children: i.label }, m) : /* @__PURE__ */ b(
3548
+ "button",
3549
+ {
3550
+ type: "button",
3551
+ role: "menuitem",
3552
+ "aria-disabled": i.disabled || void 0,
3553
+ className: g("mx-ctx__item", i.danger && "mx-ctx__item--danger"),
3554
+ onClick: () => h(i),
3555
+ children: [
3556
+ i.icon && /* @__PURE__ */ r(S, { className: "mx-ctx__icon", name: i.icon, size: 15 }),
3557
+ /* @__PURE__ */ r("span", { className: "mx-ctx__text", children: i.label }),
3558
+ i.shortcut && /* @__PURE__ */ r("span", { className: "mx-ctx__shortcut", children: i.shortcut })
3559
+ ]
3560
+ },
3561
+ m
3562
+ );
3563
+ }
3564
+ return /* @__PURE__ */ b(C, { children: [
3565
+ /* @__PURE__ */ r(
3566
+ "div",
3567
+ {
3568
+ ref: c,
3569
+ className: "mx-ctx__area",
3570
+ onContextMenu: (i) => {
3571
+ i.preventDefault(), l({ x: i.clientX, y: i.clientY });
3572
+ },
3573
+ children: e
3574
+ }
3575
+ ),
3576
+ o && /* @__PURE__ */ r(U, { children: /* @__PURE__ */ r(
3577
+ "div",
3578
+ {
3579
+ ref: s,
3580
+ role: "menu",
3581
+ tabIndex: -1,
3582
+ className: "mx-ctx",
3583
+ style: d,
3584
+ onKeyDown: (i) => {
3585
+ Oe(i.nativeEvent, document.activeElement, s.current ?? void 0, {
3586
+ candidateSelector: ua,
3587
+ focus: !0,
3588
+ arrowKeyOptions: "vertical"
3589
+ });
3590
+ },
3591
+ children: t.map((i, u) => f(i, u))
3592
+ }
3593
+ ) })
3594
+ ] });
3595
+ }
3596
+ function xr({
3597
+ children: e,
3598
+ content: t,
3599
+ placement: n = "bottom",
3600
+ openDelay: a = 250,
3601
+ closeDelay: l = 150,
3602
+ width: o = 280
3603
+ }) {
3604
+ const [c, s] = N(!1), d = w(null), h = w(null), f = w(void 0), { style: i } = te(d, h, { placement: n, width: o, open: c }), u = () => {
3605
+ f.current && clearTimeout(f.current), f.current = window.setTimeout(() => s(!0), a);
3606
+ }, m = () => {
3607
+ f.current && clearTimeout(f.current), f.current = window.setTimeout(() => s(!1), l);
3608
+ };
3609
+ return P(
3610
+ () => () => {
3611
+ f.current && clearTimeout(f.current);
3612
+ },
3613
+ []
3614
+ ), /* @__PURE__ */ b(C, { children: [
3615
+ /* @__PURE__ */ r(
3616
+ "span",
3617
+ {
3618
+ ref: d,
3619
+ onMouseEnter: u,
3620
+ onMouseLeave: m,
3621
+ onFocus: u,
3622
+ onBlur: m,
3623
+ children: e
3624
+ }
3625
+ ),
3626
+ c && /* @__PURE__ */ r(U, { children: /* @__PURE__ */ r(
3627
+ "div",
3628
+ {
3629
+ ref: h,
3630
+ role: "dialog",
3631
+ className: "mx-hovercard",
3632
+ style: i,
3633
+ onMouseEnter: u,
3634
+ onMouseLeave: m,
3635
+ children: t
3636
+ }
3637
+ ) })
3638
+ ] });
3639
+ }
3640
+ function br({
3641
+ children: e,
3642
+ content: t,
3643
+ placement: n = "bottom",
3644
+ openDelay: a = 300,
3645
+ width: l = 300
3646
+ }) {
3647
+ const [o, c] = N(!1), s = w(null), d = w(null), h = w(void 0), f = w(void 0), { style: i } = te(s, d, { placement: n, width: l, open: o }), u = () => {
3648
+ f.current && clearTimeout(f.current), h.current = window.setTimeout(() => c(!0), a);
3649
+ }, m = () => {
3650
+ h.current && clearTimeout(h.current), f.current = window.setTimeout(() => c(!1), 120);
3651
+ };
3652
+ return P(
3653
+ () => () => {
3654
+ h.current && clearTimeout(h.current), f.current && clearTimeout(f.current);
3655
+ },
3656
+ []
3657
+ ), /* @__PURE__ */ b(C, { children: [
3658
+ /* @__PURE__ */ r(
3659
+ "span",
3660
+ {
3661
+ ref: s,
3662
+ onMouseEnter: u,
3663
+ onMouseLeave: m,
3664
+ onFocus: u,
3665
+ onBlur: m,
3666
+ children: e
3667
+ }
3668
+ ),
3669
+ o && /* @__PURE__ */ r(U, { children: /* @__PURE__ */ r(
3670
+ "div",
3671
+ {
3672
+ ref: d,
3673
+ role: "dialog",
3674
+ className: "mx-linkpreview",
3675
+ style: i,
3676
+ onMouseEnter: u,
3677
+ onMouseLeave: m,
3678
+ children: t
3679
+ }
3680
+ ) })
3681
+ ] });
3682
+ }
3683
+ const ma = [
3684
+ "Tokens, themes and dark mode out of the box",
3685
+ "Accessible components with sensible defaults",
3686
+ "An Effector state plug for forms and toasts"
3687
+ ], ha = /* @__PURE__ */ r("svg", { viewBox: "0 0 24 24", width: "22", height: "22", fill: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ r("path", { d: "M13 2L4 14h6l-1 8 9-12h-6z" }) });
3688
+ function gr({
3689
+ eyebrow: e,
3690
+ heading: t,
3691
+ subheading: n,
3692
+ children: a,
3693
+ footer: l,
3694
+ brand: o,
3695
+ brandName: c = "Mercury",
3696
+ brandBadge: s = "UI",
3697
+ brandLogo: d = ha,
3698
+ brandTagline: h = "The design system for your whole product.",
3699
+ brandFeatures: f = ma,
3700
+ brandStatus: i = "All systems operational",
3701
+ brandVersion: u = "v2.4.0",
3702
+ className: m
3703
+ }) {
3704
+ return /* @__PURE__ */ b("div", { className: g("mx-al", m), children: [
3705
+ /* @__PURE__ */ b("aside", { className: "mx-al__brand", children: [
3706
+ /* @__PURE__ */ b("div", { className: "mx-al__brandtop", children: [
3707
+ /* @__PURE__ */ r("span", { className: "mx-al__logo", children: d }),
3708
+ /* @__PURE__ */ r("span", { className: "mx-al__wordmark", children: c }),
3709
+ s && /* @__PURE__ */ r("span", { className: "mx-al__badge", children: s })
3710
+ ] }),
3711
+ o ?? /* @__PURE__ */ b("div", { className: "mx-al__brandmid", children: [
3712
+ /* @__PURE__ */ r("h2", { className: "mx-al__brandh", children: h }),
3713
+ /* @__PURE__ */ r("ul", { className: "mx-al__feat", children: f.map((y) => /* @__PURE__ */ b("li", { children: [
3714
+ /* @__PURE__ */ r("span", { className: "mx-al__check", "aria-hidden": "true", children: "✓" }),
3715
+ y
3716
+ ] }, y)) })
3717
+ ] }),
3718
+ /* @__PURE__ */ b("div", { className: "mx-al__brandfoot", children: [
3719
+ /* @__PURE__ */ b("span", { className: "mx-al__statline", children: [
3720
+ /* @__PURE__ */ r("span", { className: "mx-al__dot" }),
3721
+ i
3722
+ ] }),
3723
+ u && /* @__PURE__ */ r("span", { className: "mx-al__ver", children: u })
3724
+ ] }),
3725
+ /* @__PURE__ */ r("span", { className: "mx-al__glow mx-al__glow--1", "aria-hidden": "true" }),
3726
+ /* @__PURE__ */ r("span", { className: "mx-al__glow mx-al__glow--2", "aria-hidden": "true" })
3727
+ ] }),
3728
+ /* @__PURE__ */ r("main", { className: "mx-al__main", children: /* @__PURE__ */ b("div", { className: "mx-al__form", children: [
3729
+ e && /* @__PURE__ */ r("p", { className: "mx-al__eyebrow", children: e }),
3730
+ t && /* @__PURE__ */ r("h1", { className: "mx-al__h", children: t }),
3731
+ n && /* @__PURE__ */ r("p", { className: "mx-al__sub", children: n }),
3732
+ /* @__PURE__ */ r("div", { className: "mx-al__body", children: a }),
3733
+ l && /* @__PURE__ */ r("div", { className: "mx-al__foot", children: l })
3734
+ ] }) })
3735
+ ] });
3736
+ }
3737
+ function _r({
3738
+ title: e,
3739
+ children: t,
3740
+ defaultOpen: n = !1,
3741
+ open: a,
3742
+ onOpenChange: l,
3743
+ bordered: o = !0,
3744
+ accent: c = "iris",
3745
+ width: s = 360,
3746
+ className: d,
3747
+ style: h,
3748
+ ...f
3749
+ }) {
3750
+ const i = a != null, [u, m] = N(n), y = i ? a : u, p = () => {
3751
+ const v = !y;
3752
+ i || m(v), l?.(v);
3753
+ };
3754
+ return /* @__PURE__ */ b(
3755
+ "div",
3756
+ {
3757
+ className: g(
3758
+ "mx-collapsible",
3759
+ o && "mx-collapsible--bordered",
3760
+ `mx-collapsible--accent-${c}`,
3761
+ y && "is-open",
3762
+ d
3763
+ ),
3764
+ style: { width: s, ...h },
3765
+ ...f,
3766
+ children: [
3767
+ /* @__PURE__ */ b("div", { className: "mx-collapsible__header", children: [
3768
+ /* @__PURE__ */ r("span", { className: "mx-collapsible__title", children: e }),
3769
+ /* @__PURE__ */ r("button", { type: "button", className: "mx-collapsible__toggle", "aria-expanded": y, onClick: p, children: /* @__PURE__ */ r("span", { className: "mx-collapsible__chev", "aria-hidden": "true", children: /* @__PURE__ */ r(S, { name: "chevron-down", size: 15 }) }) })
3770
+ ] }),
3771
+ /* @__PURE__ */ r("div", { className: "mx-collapsible__panel", children: /* @__PURE__ */ r("div", { className: "mx-collapsible__panel-inner", children: /* @__PURE__ */ r("div", { className: "mx-collapsible__content", children: t }) }) })
3772
+ ]
3773
+ }
3774
+ );
3775
+ }
3776
+ function vr({ ratio: e = 16 / 9, children: t, className: n, style: a, ...l }) {
3777
+ return /* @__PURE__ */ r(
3778
+ "div",
3779
+ {
3780
+ className: g("mx-aspect", n),
3781
+ style: { aspectRatio: String(e), ...a },
3782
+ ...l,
3783
+ children: /* @__PURE__ */ r("div", { className: "mx-aspect__inner", children: t })
3784
+ }
3785
+ );
3786
+ }
3787
+ function $r({
3788
+ children: e,
3789
+ scrollbars: t = "vertical",
3790
+ size: n = "md",
3791
+ maxHeight: a,
3792
+ width: l,
3793
+ className: o,
3794
+ style: c,
3795
+ ...s
3796
+ }) {
3797
+ return /* @__PURE__ */ r(
3798
+ "div",
3799
+ {
3800
+ className: g("mx-scrollarea", `mx-scrollarea--${t}`, `mx-scrollarea--${n}`, o),
3801
+ style: { maxHeight: a, width: l, ...c },
3802
+ ...s,
3803
+ children: e
3804
+ }
3805
+ );
3806
+ }
3807
+ const L = (e) => `var(--space-${e})`, fa = (e) => `var(--radius-${e})`, xe = {
3808
+ start: "start",
3809
+ center: "center",
3810
+ end: "end",
3811
+ stretch: "stretch",
3812
+ baseline: "baseline"
3813
+ }, be = {
3814
+ start: "start",
3815
+ center: "center",
3816
+ end: "end",
3817
+ between: "space-between",
3818
+ around: "space-around",
3819
+ evenly: "space-evenly"
3820
+ };
3821
+ function Nr({
3822
+ as: e,
3823
+ p: t,
3824
+ px: n,
3825
+ py: a,
3826
+ pt: l,
3827
+ pr: o,
3828
+ pb: c,
3829
+ pl: s,
3830
+ bg: d,
3831
+ radius: h,
3832
+ border: f,
3833
+ shadow: i,
3834
+ className: u,
3835
+ style: m,
3836
+ ...y
3837
+ }) {
3838
+ const p = e ?? "div", v = (x, $) => {
3839
+ const k = x ?? $ ?? t;
3840
+ return k ? L(k) : void 0;
3841
+ }, _ = {
3842
+ paddingTop: v(l, a),
3843
+ paddingRight: v(o, n),
3844
+ paddingBottom: v(c, a),
3845
+ paddingLeft: v(s, n),
3846
+ background: d ? `rgb(var(--bg-${d}))` : void 0,
3847
+ borderRadius: h ? fa(h) : void 0,
3848
+ border: f ? "1px solid rgb(var(--border-secondary))" : void 0,
3849
+ boxShadow: i ? `var(--shadow-${i})` : void 0,
3850
+ ...m
3851
+ };
3852
+ return /* @__PURE__ */ r(p, { className: g("mx-box", u), style: _, ...y });
3853
+ }
3854
+ function wr({ as: e, gap: t, align: n, justify: a, className: l, style: o, ...c }) {
3855
+ return /* @__PURE__ */ r(
3856
+ e ?? "div",
3857
+ {
3858
+ className: g("mx-stack", l),
3859
+ style: {
3860
+ gap: t ? L(t) : void 0,
3861
+ alignItems: n ? xe[n] : void 0,
3862
+ justifyContent: a ? be[a] : void 0,
3863
+ ...o
3864
+ },
3865
+ ...c
3866
+ }
3867
+ );
3868
+ }
3869
+ function kr({ as: e, direction: t, gap: n, align: a, justify: l, wrap: o, className: c, style: s, ...d }) {
3870
+ return /* @__PURE__ */ r(
3871
+ e ?? "div",
3872
+ {
3873
+ className: g("mx-flex", c),
3874
+ style: {
3875
+ flexDirection: t,
3876
+ flexWrap: o ? "wrap" : void 0,
3877
+ gap: n ? L(n) : void 0,
3878
+ alignItems: a ? xe[a] : void 0,
3879
+ justifyContent: l ? be[l] : void 0,
3880
+ ...s
3881
+ },
3882
+ ...d
3883
+ }
3884
+ );
3885
+ }
3886
+ const lt = (e) => e === void 0 ? void 0 : typeof e == "number" ? `repeat(${e}, minmax(0, 1fr))` : e;
3887
+ function Mr({ as: e, cols: t, rows: n, gap: a, flow: l, align: o, justify: c, className: s, style: d, ...h }) {
3888
+ const f = e ?? "div", i = {
3889
+ gridTemplateColumns: lt(t),
3890
+ gridTemplateRows: lt(n),
3891
+ gridAutoFlow: l,
3892
+ gap: a ? L(a) : void 0,
3893
+ alignItems: o ? xe[o] : void 0,
3894
+ justifyItems: c ? be[c] : void 0,
3895
+ ...d
3896
+ };
3897
+ return /* @__PURE__ */ r(f, { className: g("mx-grid", s), style: i, ...h });
3898
+ }
3899
+ const pa = { sm: 480, md: 768, lg: 1024, xl: 1280 };
3900
+ function Cr({ as: e, size: t = "lg", padding: n, center: a = !0, className: l, style: o, ...c }) {
3901
+ const s = e ?? "div", d = {
3902
+ maxWidth: pa[t],
3903
+ marginInline: a ? "auto" : void 0,
3904
+ paddingInline: n ? L(n) : void 0,
3905
+ ...o
3906
+ };
3907
+ return /* @__PURE__ */ r(s, { className: g("mx-container", l), style: d, ...c });
3908
+ }
3909
+ function Dr({ as: e, size: t, className: n, style: a, ...l }) {
3910
+ const o = e ?? "div", c = t ? { flexGrow: 0, flexShrink: 0, flexBasis: L(t), ...a } : a;
3911
+ return /* @__PURE__ */ r(o, { className: g("mx-spacer", n), style: c, ...l });
3912
+ }
3913
+ function Ir({ as: e, colSpan: t, rowSpan: n, colStart: a, rowStart: l, className: o, style: c, ...s }) {
3914
+ const d = e ?? "div", h = {
3915
+ gridColumnStart: a,
3916
+ gridColumnEnd: t ? `span ${t}` : void 0,
3917
+ gridRowStart: l,
3918
+ gridRowEnd: n ? `span ${n}` : void 0,
3919
+ ...c
3920
+ };
3921
+ return /* @__PURE__ */ r(d, { className: g("mx-grid-item", o), style: h, ...s });
3922
+ }
3923
+ function Sr({ as: e, inline: t, className: n, style: a, ...l }) {
3924
+ const o = e ?? "div", c = {
3925
+ display: t ? "inline-grid" : void 0,
3926
+ ...a
3927
+ };
3928
+ return /* @__PURE__ */ r(o, { className: g("mx-center", n), style: c, ...l });
3929
+ }
3930
+ function Ar({
3931
+ as: e,
3932
+ aside: t,
3933
+ side: n = "left",
3934
+ sideWidth: a = 272,
3935
+ gap: l,
3936
+ children: o,
3937
+ className: c,
3938
+ style: s,
3939
+ ...d
3940
+ }) {
3941
+ const h = e ?? "div", f = typeof a == "number" ? `${a}px` : a, i = { gap: l ? L(l) : void 0, ...s }, u = t == null ? null : /* @__PURE__ */ r("div", { className: "mx-sidebar-aside", style: { flex: `0 0 ${f}` }, children: t }), m = /* @__PURE__ */ r("div", { className: "mx-sidebar-main", children: o });
3942
+ return /* @__PURE__ */ r(h, { className: g("mx-sidebar", c), style: i, ...d, children: n === "right" ? /* @__PURE__ */ b(C, { children: [
3943
+ m,
3944
+ u
3945
+ ] }) : /* @__PURE__ */ b(C, { children: [
3946
+ u,
3947
+ m
3948
+ ] }) });
3949
+ }
3950
+ function Tr({ as: e, gap: t, align: n, justify: a, className: l, style: o, ...c }) {
3951
+ const s = e ?? "div", d = {
3952
+ gap: t ? L(t) : void 0,
3953
+ alignItems: n ? xe[n] : void 0,
3954
+ justifyContent: a ? be[a] : void 0,
3955
+ ...o
3956
+ };
3957
+ return /* @__PURE__ */ r(s, { className: g("mx-cluster", l), style: d, ...c });
3958
+ }
3959
+ function Er({ as: e, gap: t, py: n, px: a, className: l, style: o, ...c }) {
3960
+ const s = e ?? "section", d = {
3961
+ gap: t ? L(t) : void 0,
3962
+ paddingBlock: n ? L(n) : void 0,
3963
+ paddingInline: a ? L(a) : void 0,
3964
+ ...o
3965
+ };
3966
+ return /* @__PURE__ */ r(s, { className: g("mx-section", l), style: d, ...c });
3967
+ }
3968
+ export {
3969
+ or as Accordion,
3970
+ Za as Alert,
3971
+ hr as AlertDialog,
3972
+ vr as AspectRatio,
3973
+ Ca as AuthCode,
3974
+ gr as AuthLayout,
3975
+ qa as Avatar,
3976
+ Va as Badge,
3977
+ tr as Blockquote,
3978
+ Nr as Box,
3979
+ tt as Button,
3980
+ Aa as Calendar,
3981
+ Ya as Callout,
3982
+ za as Card,
3983
+ Sr as Center,
3984
+ Xa as Chart,
3985
+ Lt as Checkbox,
3986
+ Oa as CheckboxCards,
3987
+ ja as CheckboxGroup,
3988
+ Qa as Checklist,
3989
+ la as Chip,
3990
+ Tr as Cluster,
3991
+ ar as Code,
3992
+ _r as Collapsible,
3993
+ Cr as Container,
3994
+ yr as ContextMenu,
3995
+ nr as DataList,
3996
+ Sa as DateField,
3997
+ mr as Dialog,
3998
+ va as Divider,
3999
+ pr as Dropdown,
4000
+ kr as Flex,
4001
+ Mr as Grid,
4002
+ Ir as GridItem,
4003
+ Rt as Heading,
4004
+ xr as HoverCard,
4005
+ S as Icon,
4006
+ Gn as IconButton,
4007
+ Qn as Input,
4008
+ rr as Kbd,
4009
+ Ia as Label,
4010
+ _a as Link,
4011
+ br as LinkPreview,
4012
+ er as ListRow,
4013
+ cr as Menubar,
4014
+ dr as Modal,
4015
+ Da as MoneyInput,
4016
+ sr as Pagination,
4017
+ Ha as PasswordStrength,
4018
+ fr as Popover,
4019
+ ta as Progress,
4020
+ Pt as Radio,
4021
+ Fa as RadioCards,
4022
+ Ba as RadioGroup,
4023
+ $r as ScrollArea,
4024
+ ka as Search,
4025
+ Er as Section,
4026
+ Ea as Segmented,
4027
+ Ma as Select,
4028
+ Na as Separator,
4029
+ Ar as Sidebar,
4030
+ Ka as Skeleton,
4031
+ Ra as Slider,
4032
+ Dr as Spacer,
4033
+ Ua as Spinner,
4034
+ wr as Stack,
4035
+ Ja as Stat,
4036
+ Ta as Switch,
4037
+ ir as TabNav,
4038
+ Ga as Table,
4039
+ lr as Tabs,
4040
+ Wa as Tag,
4041
+ $a as Text,
4042
+ wa as Textarea,
4043
+ La as Toggle,
4044
+ Pa as ToggleGroup,
4045
+ ur as Tooltip,
4046
+ kt as createFormatter,
4047
+ ga as createTimeFormatter,
4048
+ g as cx
4049
+ };