@uva-glass/component-library 1.65.0 → 2.0.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 (174) hide show
  1. package/dist/Column-BUyVh2Oo.js.map +1 -1
  2. package/dist/MultiSelectItem-D9PxdX43.js.map +1 -1
  3. package/dist/SortableProvider-BUsvniX7.js.map +1 -1
  4. package/dist/{TablePlugin-BbiBRjod.js → TablePlugin-ByeOn0Zf.js} +5 -6
  5. package/dist/{TablePlugin-BbiBRjod.js.map → TablePlugin-ByeOn0Zf.js.map} +1 -1
  6. package/dist/chunk-7R3XDUXW-C-tvzxWq.js +1685 -0
  7. package/dist/chunk-7R3XDUXW-C-tvzxWq.js.map +1 -0
  8. package/dist/components/Accordion/Accordion.js.map +1 -1
  9. package/dist/components/Accordion/Accordion.stories.js.map +1 -1
  10. package/dist/components/AccordionCard/AccordionCard.js.map +1 -1
  11. package/dist/components/AccordionCard/AccordionCard.stories.js.map +1 -1
  12. package/dist/components/ActionList/ActionList.js.map +1 -1
  13. package/dist/components/ActionList/ActionList.stories.js.map +1 -1
  14. package/dist/components/AppStatusBar/AppStatusBar.stories.js.map +1 -1
  15. package/dist/components/Attention/Attention.stories.js.map +1 -1
  16. package/dist/components/Backdrop/Backdrop.stories.js.map +1 -1
  17. package/dist/components/ButtonGroup/ButtonGroup.stories.js.map +1 -1
  18. package/dist/components/Buttons/Button.js.map +1 -1
  19. package/dist/components/Buttons/Button.stories.js +1 -1
  20. package/dist/components/Buttons/Button.stories.js.map +1 -1
  21. package/dist/components/Buttons/LinkButton.d.ts +1 -1
  22. package/dist/components/Buttons/LinkButton.js +1 -1
  23. package/dist/components/Buttons/LinkButton.js.map +1 -1
  24. package/dist/components/Buttons/LinkButton.stories.js +5 -5
  25. package/dist/components/Buttons/LinkButton.stories.js.map +1 -1
  26. package/dist/components/Buttons/MenuButton.js.map +1 -1
  27. package/dist/components/Buttons/MenuButton.stories.js +1 -1
  28. package/dist/components/Buttons/MenuButton.stories.js.map +1 -1
  29. package/dist/components/Card/Card.stories.js.map +1 -1
  30. package/dist/components/Checkbox/Checkbox.stories.js +1 -1
  31. package/dist/components/Checkbox/Checkbox.stories.js.map +1 -1
  32. package/dist/components/CheckboxButton/CheckboxButton.js.map +1 -1
  33. package/dist/components/CheckboxButton/CheckboxButton.stories.js +1 -1
  34. package/dist/components/CheckboxButton/CheckboxButton.stories.js.map +1 -1
  35. package/dist/components/CheckboxButtonBar/CheckboxButtonBar.js.map +1 -1
  36. package/dist/components/CheckboxButtonBar/CheckboxButtonBar.stories.js +1 -1
  37. package/dist/components/CheckboxButtonBar/CheckboxButtonBar.stories.js.map +1 -1
  38. package/dist/components/CheckboxTree/CheckboxTree.js +6 -7
  39. package/dist/components/CheckboxTree/CheckboxTree.js.map +1 -1
  40. package/dist/components/CheckboxTree/CheckboxTree.stories.js +1 -1
  41. package/dist/components/CheckboxTree/CheckboxTree.stories.js.map +1 -1
  42. package/dist/components/Drawer/Drawer.js.map +1 -1
  43. package/dist/components/Drawer/Drawer.stories.js +1 -1
  44. package/dist/components/Drawer/Drawer.stories.js.map +1 -1
  45. package/dist/components/EmptyStateDataDisplay/EmptyStateDataDisplay.js.map +1 -1
  46. package/dist/components/EmptyStateDataDisplay/EmptyStateDataDisplay.stories.js.map +1 -1
  47. package/dist/components/FeedbackBox/FeedbackBox.stories.js.map +1 -1
  48. package/dist/components/FieldHint/FieldHint.js.map +1 -1
  49. package/dist/components/FieldHint/FieldHint.stories.js.map +1 -1
  50. package/dist/components/Fieldset/Fieldset.stories.js.map +1 -1
  51. package/dist/components/FormField/FormField.stories.js.map +1 -1
  52. package/dist/components/FormInput/FormInput.js +8 -9
  53. package/dist/components/FormInput/FormInput.js.map +1 -1
  54. package/dist/components/FormInput/FormInput.stories.js +1 -1
  55. package/dist/components/FormInput/FormInput.stories.js.map +1 -1
  56. package/dist/components/GridRow/GridRow.js.map +1 -1
  57. package/dist/components/GridRow/GridRow.stories.js.map +1 -1
  58. package/dist/components/HorizontalList/HorizontalList.js.map +1 -1
  59. package/dist/components/HorizontalList/HorizontalList.stories.js.map +1 -1
  60. package/dist/components/Icon/Icon.stories.js.map +1 -1
  61. package/dist/components/Icon/icons/index.js.map +1 -1
  62. package/dist/components/IconButton/IconButton.js.map +1 -1
  63. package/dist/components/IconButton/IconButton.stories.js +1 -1
  64. package/dist/components/IconButton/IconButton.stories.js.map +1 -1
  65. package/dist/components/InfoMessage/InfoMessage.stories.js.map +1 -1
  66. package/dist/components/Input/Input.js.map +1 -1
  67. package/dist/components/Input/Input.stories.js.map +1 -1
  68. package/dist/components/InputField/InputField.js.map +1 -1
  69. package/dist/components/InputField/InputField.stories.js +4 -5
  70. package/dist/components/InputField/InputField.stories.js.map +1 -1
  71. package/dist/components/Label/Label.stories.js.map +1 -1
  72. package/dist/components/MenuLink/MenuLink.d.ts +1 -1
  73. package/dist/components/MenuLink/MenuLink.js +5 -5
  74. package/dist/components/MenuLink/MenuLink.js.map +1 -1
  75. package/dist/components/MenuLink/MenuLink.stories.d.ts +1 -1
  76. package/dist/components/MenuLink/MenuLink.stories.js +1 -1
  77. package/dist/components/MenuLink/MenuLink.stories.js.map +1 -1
  78. package/dist/components/MetaDataList/MetaDataList.js.map +1 -1
  79. package/dist/components/MetaDataList/MetaDataList.stories.js.map +1 -1
  80. package/dist/components/ModalDialog/ModalDialog.js.map +1 -1
  81. package/dist/components/ModalDialog/ModalDialog.stories.js +1 -1
  82. package/dist/components/ModalDialog/ModalDialog.stories.js.map +1 -1
  83. package/dist/components/MultiSelect/MultiSelect.js +1 -1
  84. package/dist/components/MultiSelect/MultiSelect.stories.js +2 -2
  85. package/dist/components/MultiSelect/MultiSelect.stories.js.map +1 -1
  86. package/dist/components/MultiSelect/components/MultiSelectHeader.js +2 -3
  87. package/dist/components/MultiSelect/components/MultiSelectHeader.js.map +1 -1
  88. package/dist/components/MultiSelect/index.js +1 -1
  89. package/dist/components/OverlayCloseButton/OverlayCloseButton.js.map +1 -1
  90. package/dist/components/OverlayCloseButton/OverlayCloseButton.stories.js +1 -1
  91. package/dist/components/OverlayCloseButton/OverlayCloseButton.stories.js.map +1 -1
  92. package/dist/components/PageOverlay/PageOverlay.js.map +1 -1
  93. package/dist/components/PageOverlay/PageOverlay.stories.js.map +1 -1
  94. package/dist/components/PeriodSelector/PeriodSelector.js +3 -4
  95. package/dist/components/PeriodSelector/PeriodSelector.js.map +1 -1
  96. package/dist/components/PeriodSelector/PeriodSelector.stories.js +1 -1
  97. package/dist/components/PeriodSelector/PeriodSelector.stories.js.map +1 -1
  98. package/dist/components/Periods/Periods.js.map +1 -1
  99. package/dist/components/Periods/Periods.stories.js.map +1 -1
  100. package/dist/components/ProgrammeCard/ProgrammeCard.js.map +1 -1
  101. package/dist/components/ProgrammeCard/ProgrammeCard.stories.js +4 -5
  102. package/dist/components/ProgrammeCard/ProgrammeCard.stories.js.map +1 -1
  103. package/dist/components/RadioButton/RadioButton.stories.js.map +1 -1
  104. package/dist/components/Repeater/Repeater.js.map +1 -1
  105. package/dist/components/Repeater/Repeater.stories.js.map +1 -1
  106. package/dist/components/RteEditor/EditorHeader/EditorHeader.js +3 -4
  107. package/dist/components/RteEditor/EditorHeader/EditorHeader.js.map +1 -1
  108. package/dist/components/RteEditor/Plugins/BlockFormatPlugin/BlockFormatPlugin.js.map +1 -1
  109. package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js +3 -4
  110. package/dist/components/RteEditor/Plugins/HistoryPlugin/HistoryPlugin.js.map +1 -1
  111. package/dist/components/RteEditor/Plugins/LinkPlugin/AddLinkForm/AddLinkFrom.js +2 -3
  112. package/dist/components/RteEditor/Plugins/LinkPlugin/AddLinkForm/AddLinkFrom.js.map +1 -1
  113. package/dist/components/RteEditor/Plugins/LinkPlugin/LinkContextMenu/LinkContextMenu.js.map +1 -1
  114. package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js +3 -4
  115. package/dist/components/RteEditor/Plugins/LinkPlugin/LinkPlugin.js.map +1 -1
  116. package/dist/components/RteEditor/Plugins/ListPlugin/ListPlugin.js.map +1 -1
  117. package/dist/components/RteEditor/Plugins/PasteHandlerPlugin/PasteHandlerPlugin.js.map +1 -1
  118. package/dist/components/RteEditor/Plugins/TablePlugin/AddTableFrom.js +2 -3
  119. package/dist/components/RteEditor/Plugins/TablePlugin/AddTableFrom.js.map +1 -1
  120. package/dist/components/RteEditor/Plugins/TablePlugin/TableCellContextMenu/TableCellContextMenu.js.map +1 -1
  121. package/dist/components/RteEditor/Plugins/TablePlugin/TablePlugin.js +2 -3
  122. package/dist/components/RteEditor/Plugins/TablePlugin/TablePlugin.js.map +1 -1
  123. package/dist/components/RteEditor/Plugins/TablePlugin/helpers.js.map +1 -1
  124. package/dist/components/RteEditor/Plugins/TablePlugin/index.js +1 -1
  125. package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js +1 -1
  126. package/dist/components/RteEditor/Plugins/ToolbarPlugin/ToolbarPlugin.js.map +1 -1
  127. package/dist/components/RteEditor/Plugins/index.js +1 -1
  128. package/dist/components/RteEditor/Providers/LanguageProvider.js.map +1 -1
  129. package/dist/components/RteEditor/RteEditor.js +3 -4
  130. package/dist/components/RteEditor/RteEditor.js.map +1 -1
  131. package/dist/components/RteEditor/RteEditor.stories.js.map +1 -1
  132. package/dist/components/RteEditor/helpers.js.map +1 -1
  133. package/dist/components/RteEditor/hooks/components/Flyout.js.map +1 -1
  134. package/dist/components/RteEditor/hooks/useFlyout.js.map +1 -1
  135. package/dist/components/RteEditor/hooks/useTranslation.js.map +1 -1
  136. package/dist/components/RteEditor/translations.js.map +1 -1
  137. package/dist/components/SectionNotification/SectionNotification.stories.js.map +1 -1
  138. package/dist/components/SelectListbox/SelectListBox.stories.js +1 -1
  139. package/dist/components/SelectListbox/SelectListBox.stories.js.map +1 -1
  140. package/dist/components/SelectListbox/SelectListbox.js.map +1 -1
  141. package/dist/components/SelectListbox/SelectProvider.js.map +1 -1
  142. package/dist/components/SelectListbox/components/SelectButton.js.map +1 -1
  143. package/dist/components/SelectListbox/components/SelectContainer.js.map +1 -1
  144. package/dist/components/SelectListbox/components/SelectOption.js.map +1 -1
  145. package/dist/components/SelectListbox/components/SelectOptionBox.js.map +1 -1
  146. package/dist/components/Sortable/Sortable.js.map +1 -1
  147. package/dist/components/Sortable/Sortable.stories.js +1 -1
  148. package/dist/components/Sortable/Sortable.stories.js.map +1 -1
  149. package/dist/components/Sortable/actions.js.map +1 -1
  150. package/dist/components/Sortable/components/SortableHandle.js.map +1 -1
  151. package/dist/components/Sortable/components/SortableItem.js.map +1 -1
  152. package/dist/components/Sortable/sortableReducer.js.map +1 -1
  153. package/dist/components/Spinner/Spinner.js.map +1 -1
  154. package/dist/components/Spinner/Spinner.stories.js.map +1 -1
  155. package/dist/components/StatusPill/StatusPill.js.map +1 -1
  156. package/dist/components/StatusPill/StatusPill.stories.js.map +1 -1
  157. package/dist/components/Tooltip/Tooltip.js.map +1 -1
  158. package/dist/components/Tooltip/Tooltip.stories.js.map +1 -1
  159. package/dist/components/hooks/useDebounce.js.map +1 -1
  160. package/dist/components/hooks/useOnClickOutside.js.map +1 -1
  161. package/dist/components/hooks/usePositionedFloaters.js.map +1 -1
  162. package/dist/components/hooks/useResponsive.js.map +1 -1
  163. package/dist/components/index.js +1 -1
  164. package/dist/index-0wq-B7do.js.map +1 -1
  165. package/dist/index-2mUSc_Ki.js.map +1 -1
  166. package/dist/index-B9BWML6P.js.map +1 -1
  167. package/dist/{index-DQyNeMuh.js → index-DWzkl4aY.js} +7 -7
  168. package/dist/{index-DQyNeMuh.js.map → index-DWzkl4aY.js.map} +1 -1
  169. package/dist/index.js +1 -1
  170. package/dist/react-18-BIqxBxbW.js.map +1 -1
  171. package/dist/storyComponents/ClipboardButton/ClipboardButton.js.map +1 -1
  172. package/dist/storyComponents/Container/Container.js.map +1 -1
  173. package/dist/storybook__react.d.js.map +1 -1
  174. package/package.json +3 -3
@@ -0,0 +1,1685 @@
1
+ import * as c from "react";
2
+ var U = {}, ae;
3
+ function be() {
4
+ if (ae) return U;
5
+ ae = 1, Object.defineProperty(U, "__esModule", { value: !0 }), U.parse = u, U.serialize = l;
6
+ const e = /^[\u0021-\u003A\u003C\u003E-\u007E]+$/, t = /^[\u0021-\u003A\u003C-\u007E]*$/, n = /^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i, i = /^[\u0020-\u003A\u003D-\u007E]*$/, r = Object.prototype.toString, a = /* @__PURE__ */ (() => {
7
+ const h = function() {
8
+ };
9
+ return h.prototype = /* @__PURE__ */ Object.create(null), h;
10
+ })();
11
+ function u(h, d) {
12
+ const f = new a(), g = h.length;
13
+ if (g < 2)
14
+ return f;
15
+ const v = (d == null ? void 0 : d.decode) || m;
16
+ let p = 0;
17
+ do {
18
+ const w = h.indexOf("=", p);
19
+ if (w === -1)
20
+ break;
21
+ const x = h.indexOf(";", p), E = x === -1 ? g : x;
22
+ if (w > E) {
23
+ p = h.lastIndexOf(";", w - 1) + 1;
24
+ continue;
25
+ }
26
+ const R = s(h, p, w), A = o(h, w, R), $ = h.slice(R, A);
27
+ if (f[$] === void 0) {
28
+ let D = s(h, w + 1, E), S = o(h, E, D);
29
+ const I = v(h.slice(D, S));
30
+ f[$] = I;
31
+ }
32
+ p = E + 1;
33
+ } while (p < g);
34
+ return f;
35
+ }
36
+ function s(h, d, f) {
37
+ do {
38
+ const g = h.charCodeAt(d);
39
+ if (g !== 32 && g !== 9)
40
+ return d;
41
+ } while (++d < f);
42
+ return f;
43
+ }
44
+ function o(h, d, f) {
45
+ for (; d > f; ) {
46
+ const g = h.charCodeAt(--d);
47
+ if (g !== 32 && g !== 9)
48
+ return d + 1;
49
+ }
50
+ return f;
51
+ }
52
+ function l(h, d, f) {
53
+ const g = (f == null ? void 0 : f.encode) || encodeURIComponent;
54
+ if (!e.test(h))
55
+ throw new TypeError(`argument name is invalid: ${h}`);
56
+ const v = g(d);
57
+ if (!t.test(v))
58
+ throw new TypeError(`argument val is invalid: ${d}`);
59
+ let p = h + "=" + v;
60
+ if (!f)
61
+ return p;
62
+ if (f.maxAge !== void 0) {
63
+ if (!Number.isInteger(f.maxAge))
64
+ throw new TypeError(`option maxAge is invalid: ${f.maxAge}`);
65
+ p += "; Max-Age=" + f.maxAge;
66
+ }
67
+ if (f.domain) {
68
+ if (!n.test(f.domain))
69
+ throw new TypeError(`option domain is invalid: ${f.domain}`);
70
+ p += "; Domain=" + f.domain;
71
+ }
72
+ if (f.path) {
73
+ if (!i.test(f.path))
74
+ throw new TypeError(`option path is invalid: ${f.path}`);
75
+ p += "; Path=" + f.path;
76
+ }
77
+ if (f.expires) {
78
+ if (!y(f.expires) || !Number.isFinite(f.expires.valueOf()))
79
+ throw new TypeError(`option expires is invalid: ${f.expires}`);
80
+ p += "; Expires=" + f.expires.toUTCString();
81
+ }
82
+ if (f.httpOnly && (p += "; HttpOnly"), f.secure && (p += "; Secure"), f.partitioned && (p += "; Partitioned"), f.priority)
83
+ switch (typeof f.priority == "string" ? f.priority.toLowerCase() : void 0) {
84
+ case "low":
85
+ p += "; Priority=Low";
86
+ break;
87
+ case "medium":
88
+ p += "; Priority=Medium";
89
+ break;
90
+ case "high":
91
+ p += "; Priority=High";
92
+ break;
93
+ default:
94
+ throw new TypeError(`option priority is invalid: ${f.priority}`);
95
+ }
96
+ if (f.sameSite)
97
+ switch (typeof f.sameSite == "string" ? f.sameSite.toLowerCase() : f.sameSite) {
98
+ case !0:
99
+ case "strict":
100
+ p += "; SameSite=Strict";
101
+ break;
102
+ case "lax":
103
+ p += "; SameSite=Lax";
104
+ break;
105
+ case "none":
106
+ p += "; SameSite=None";
107
+ break;
108
+ default:
109
+ throw new TypeError(`option sameSite is invalid: ${f.sameSite}`);
110
+ }
111
+ return p;
112
+ }
113
+ function m(h) {
114
+ if (h.indexOf("%") === -1)
115
+ return h;
116
+ try {
117
+ return decodeURIComponent(h);
118
+ } catch {
119
+ return h;
120
+ }
121
+ }
122
+ function y(h) {
123
+ return r.call(h) === "[object Date]";
124
+ }
125
+ return U;
126
+ }
127
+ be();
128
+ /**
129
+ * react-router v7.0.1
130
+ *
131
+ * Copyright (c) Remix Software Inc.
132
+ *
133
+ * This source code is licensed under the MIT license found in the
134
+ * LICENSE.md file in the root directory of this source tree.
135
+ *
136
+ * @license MIT
137
+ */
138
+ var ie = "popstate";
139
+ function Pe(e = {}) {
140
+ let { initialEntries: t = ["/"], initialIndex: n, v5Compat: i = !1 } = e, r;
141
+ r = t.map(
142
+ (d, f) => m(
143
+ d,
144
+ typeof d == "string" ? null : d.state,
145
+ f === 0 ? "default" : void 0
146
+ )
147
+ );
148
+ let a = o(
149
+ n ?? r.length - 1
150
+ ), u = "POP", s = null;
151
+ function o(d) {
152
+ return Math.min(Math.max(d, 0), r.length - 1);
153
+ }
154
+ function l() {
155
+ return r[a];
156
+ }
157
+ function m(d, f = null, g) {
158
+ let v = j(
159
+ r ? l().pathname : "/",
160
+ d,
161
+ f,
162
+ g
163
+ );
164
+ return L(
165
+ v.pathname.charAt(0) === "/",
166
+ `relative pathnames are not supported in memory history: ${JSON.stringify(
167
+ d
168
+ )}`
169
+ ), v;
170
+ }
171
+ function y(d) {
172
+ return typeof d == "string" ? d : F(d);
173
+ }
174
+ return {
175
+ get index() {
176
+ return a;
177
+ },
178
+ get action() {
179
+ return u;
180
+ },
181
+ get location() {
182
+ return l();
183
+ },
184
+ createHref: y,
185
+ createURL(d) {
186
+ return new URL(y(d), "http://localhost");
187
+ },
188
+ encodeLocation(d) {
189
+ let f = typeof d == "string" ? M(d) : d;
190
+ return {
191
+ pathname: f.pathname || "",
192
+ search: f.search || "",
193
+ hash: f.hash || ""
194
+ };
195
+ },
196
+ push(d, f) {
197
+ u = "PUSH";
198
+ let g = m(d, f);
199
+ a += 1, r.splice(a, r.length, g), i && s && s({ action: u, location: g, delta: 1 });
200
+ },
201
+ replace(d, f) {
202
+ u = "REPLACE";
203
+ let g = m(d, f);
204
+ r[a] = g, i && s && s({ action: u, location: g, delta: 0 });
205
+ },
206
+ go(d) {
207
+ u = "POP";
208
+ let f = o(a + d), g = r[f];
209
+ a = f, s && s({ action: u, location: g, delta: d });
210
+ },
211
+ listen(d) {
212
+ return s = d, () => {
213
+ s = null;
214
+ };
215
+ }
216
+ };
217
+ }
218
+ function Le(e = {}) {
219
+ function t(i, r) {
220
+ let { pathname: a, search: u, hash: s } = i.location;
221
+ return j(
222
+ "",
223
+ { pathname: a, search: u, hash: s },
224
+ // state defaults to `null` because `window.history.state` does
225
+ r.state && r.state.usr || null,
226
+ r.state && r.state.key || "default"
227
+ );
228
+ }
229
+ function n(i, r) {
230
+ return typeof r == "string" ? r : F(r);
231
+ }
232
+ return $e(
233
+ t,
234
+ n,
235
+ null,
236
+ e
237
+ );
238
+ }
239
+ function C(e, t) {
240
+ if (e === !1 || e === null || typeof e > "u")
241
+ throw new Error(t);
242
+ }
243
+ function L(e, t) {
244
+ if (!e) {
245
+ typeof console < "u" && console.warn(t);
246
+ try {
247
+ throw new Error(t);
248
+ } catch {
249
+ }
250
+ }
251
+ }
252
+ function ke() {
253
+ return Math.random().toString(36).substring(2, 10);
254
+ }
255
+ function oe(e, t) {
256
+ return {
257
+ usr: e.state,
258
+ key: e.key,
259
+ idx: t
260
+ };
261
+ }
262
+ function j(e, t, n = null, i) {
263
+ return {
264
+ pathname: typeof e == "string" ? e : e.pathname,
265
+ search: "",
266
+ hash: "",
267
+ ...typeof t == "string" ? M(t) : t,
268
+ state: n,
269
+ // TODO: This could be cleaned up. push/replace should probably just take
270
+ // full Locations now and avoid the need to run through this flow at all
271
+ // But that's a pretty big refactor to the current test suite so going to
272
+ // keep as is for the time being and just let any incoming keys take precedence
273
+ key: t && t.key || i || ke()
274
+ };
275
+ }
276
+ function F({
277
+ pathname: e = "/",
278
+ search: t = "",
279
+ hash: n = ""
280
+ }) {
281
+ return t && t !== "?" && (e += t.charAt(0) === "?" ? t : "?" + t), n && n !== "#" && (e += n.charAt(0) === "#" ? n : "#" + n), e;
282
+ }
283
+ function M(e) {
284
+ let t = {};
285
+ if (e) {
286
+ let n = e.indexOf("#");
287
+ n >= 0 && (t.hash = e.substring(n), e = e.substring(0, n));
288
+ let i = e.indexOf("?");
289
+ i >= 0 && (t.search = e.substring(i), e = e.substring(0, i)), e && (t.pathname = e);
290
+ }
291
+ return t;
292
+ }
293
+ function $e(e, t, n, i = {}) {
294
+ let { window: r = document.defaultView, v5Compat: a = !1 } = i, u = r.history, s = "POP", o = null, l = m();
295
+ l == null && (l = 0, u.replaceState({ ...u.state, idx: l }, ""));
296
+ function m() {
297
+ return (u.state || { idx: null }).idx;
298
+ }
299
+ function y() {
300
+ s = "POP";
301
+ let v = m(), p = v == null ? null : v - l;
302
+ l = v, o && o({ action: s, location: g.location, delta: p });
303
+ }
304
+ function h(v, p) {
305
+ s = "PUSH";
306
+ let w = j(g.location, v, p);
307
+ l = m() + 1;
308
+ let x = oe(w, l), E = g.createHref(w);
309
+ try {
310
+ u.pushState(x, "", E);
311
+ } catch (R) {
312
+ if (R instanceof DOMException && R.name === "DataCloneError")
313
+ throw R;
314
+ r.location.assign(E);
315
+ }
316
+ a && o && o({ action: s, location: g.location, delta: 1 });
317
+ }
318
+ function d(v, p) {
319
+ s = "REPLACE";
320
+ let w = j(g.location, v, p);
321
+ l = m();
322
+ let x = oe(w, l), E = g.createHref(w);
323
+ u.replaceState(x, "", E), a && o && o({ action: s, location: g.location, delta: 0 });
324
+ }
325
+ function f(v) {
326
+ let p = r.location.origin !== "null" ? r.location.origin : r.location.href, w = typeof v == "string" ? v : F(v);
327
+ return w = w.replace(/ $/, "%20"), C(
328
+ p,
329
+ `No window.location.(origin|href) available to create URL for href: ${w}`
330
+ ), new URL(w, p);
331
+ }
332
+ let g = {
333
+ get action() {
334
+ return s;
335
+ },
336
+ get location() {
337
+ return e(r, u);
338
+ },
339
+ listen(v) {
340
+ if (o)
341
+ throw new Error("A history only accepts one active listener");
342
+ return r.addEventListener(ie, y), o = v, () => {
343
+ r.removeEventListener(ie, y), o = null;
344
+ };
345
+ },
346
+ createHref(v) {
347
+ return t(r, v);
348
+ },
349
+ createURL: f,
350
+ encodeLocation(v) {
351
+ let p = f(v);
352
+ return {
353
+ pathname: p.pathname,
354
+ search: p.search,
355
+ hash: p.hash
356
+ };
357
+ },
358
+ push: h,
359
+ replace: d,
360
+ go(v) {
361
+ return u.go(v);
362
+ }
363
+ };
364
+ return g;
365
+ }
366
+ function ce(e, t, n = "/") {
367
+ return Ie(e, t, n, !1);
368
+ }
369
+ function Ie(e, t, n, i) {
370
+ let r = typeof t == "string" ? M(t) : t, a = T(r.pathname || "/", n);
371
+ if (a == null)
372
+ return null;
373
+ let u = fe(e);
374
+ Te(u);
375
+ let s = null;
376
+ for (let o = 0; s == null && o < u.length; ++o) {
377
+ let l = _e(a);
378
+ s = He(
379
+ u[o],
380
+ l,
381
+ i
382
+ );
383
+ }
384
+ return s;
385
+ }
386
+ function fe(e, t = [], n = [], i = "") {
387
+ let r = (a, u, s) => {
388
+ let o = {
389
+ relativePath: s === void 0 ? a.path || "" : s,
390
+ caseSensitive: a.caseSensitive === !0,
391
+ childrenIndex: u,
392
+ route: a
393
+ };
394
+ o.relativePath.startsWith("/") && (C(
395
+ o.relativePath.startsWith(i),
396
+ `Absolute route path "${o.relativePath}" nested under path "${i}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`
397
+ ), o.relativePath = o.relativePath.slice(i.length));
398
+ let l = P([i, o.relativePath]), m = n.concat(o);
399
+ a.children && a.children.length > 0 && (C(
400
+ // Our types know better, but runtime JS may not!
401
+ // @ts-expect-error
402
+ a.index !== !0,
403
+ `Index routes must not have child routes. Please remove all child routes from route path "${l}".`
404
+ ), fe(a.children, t, m, l)), !(a.path == null && !a.index) && t.push({
405
+ path: l,
406
+ score: Ue(l, a.index),
407
+ routesMeta: m
408
+ });
409
+ };
410
+ return e.forEach((a, u) => {
411
+ var s;
412
+ if (a.path === "" || !((s = a.path) != null && s.includes("?")))
413
+ r(a, u);
414
+ else
415
+ for (let o of de(a.path))
416
+ r(a, u, o);
417
+ }), t;
418
+ }
419
+ function de(e) {
420
+ let t = e.split("/");
421
+ if (t.length === 0) return [];
422
+ let [n, ...i] = t, r = n.endsWith("?"), a = n.replace(/\?$/, "");
423
+ if (i.length === 0)
424
+ return r ? [a, ""] : [a];
425
+ let u = de(i.join("/")), s = [];
426
+ return s.push(
427
+ ...u.map(
428
+ (o) => o === "" ? a : [a, o].join("/")
429
+ )
430
+ ), r && s.push(...u), s.map(
431
+ (o) => e.startsWith("/") && o === "" ? "/" : o
432
+ );
433
+ }
434
+ function Te(e) {
435
+ e.sort(
436
+ (t, n) => t.score !== n.score ? n.score - t.score : Be(
437
+ t.routesMeta.map((i) => i.childrenIndex),
438
+ n.routesMeta.map((i) => i.childrenIndex)
439
+ )
440
+ );
441
+ }
442
+ var De = /^:[\w-]+$/, Ne = 3, Ae = 2, Fe = 1, Me = 10, Oe = -2, le = (e) => e === "*";
443
+ function Ue(e, t) {
444
+ let n = e.split("/"), i = n.length;
445
+ return n.some(le) && (i += Oe), t && (i += Ae), n.filter((r) => !le(r)).reduce(
446
+ (r, a) => r + (De.test(a) ? Ne : a === "" ? Fe : Me),
447
+ i
448
+ );
449
+ }
450
+ function Be(e, t) {
451
+ return e.length === t.length && e.slice(0, -1).every((i, r) => i === t[r]) ? (
452
+ // If two routes are siblings, we should try to match the earlier sibling
453
+ // first. This allows people to have fine-grained control over the matching
454
+ // behavior by simply putting routes with identical paths in the order they
455
+ // want them tried.
456
+ e[e.length - 1] - t[t.length - 1]
457
+ ) : (
458
+ // Otherwise, it doesn't really make sense to rank non-siblings by index,
459
+ // so they sort equally.
460
+ 0
461
+ );
462
+ }
463
+ function He(e, t, n = !1) {
464
+ let { routesMeta: i } = e, r = {}, a = "/", u = [];
465
+ for (let s = 0; s < i.length; ++s) {
466
+ let o = i[s], l = s === i.length - 1, m = a === "/" ? t : t.slice(a.length) || "/", y = J(
467
+ { path: o.relativePath, caseSensitive: o.caseSensitive, end: l },
468
+ m
469
+ ), h = o.route;
470
+ if (!y && l && n && !i[i.length - 1].route.index && (y = J(
471
+ {
472
+ path: o.relativePath,
473
+ caseSensitive: o.caseSensitive,
474
+ end: !1
475
+ },
476
+ m
477
+ )), !y)
478
+ return null;
479
+ Object.assign(r, y.params), u.push({
480
+ // TODO: Can this as be avoided?
481
+ params: r,
482
+ pathname: P([a, y.pathname]),
483
+ pathnameBase: Je(
484
+ P([a, y.pathnameBase])
485
+ ),
486
+ route: h
487
+ }), y.pathnameBase !== "/" && (a = P([a, y.pathnameBase]));
488
+ }
489
+ return u;
490
+ }
491
+ function J(e, t) {
492
+ typeof e == "string" && (e = { path: e, caseSensitive: !1, end: !0 });
493
+ let [n, i] = We(
494
+ e.path,
495
+ e.caseSensitive,
496
+ e.end
497
+ ), r = t.match(n);
498
+ if (!r) return null;
499
+ let a = r[0], u = a.replace(/(.)\/+$/, "$1"), s = r.slice(1);
500
+ return {
501
+ params: i.reduce(
502
+ (l, { paramName: m, isOptional: y }, h) => {
503
+ if (m === "*") {
504
+ let f = s[h] || "";
505
+ u = a.slice(0, a.length - f.length).replace(/(.)\/+$/, "$1");
506
+ }
507
+ const d = s[h];
508
+ return y && !d ? l[m] = void 0 : l[m] = (d || "").replace(/%2F/g, "/"), l;
509
+ },
510
+ {}
511
+ ),
512
+ pathname: a,
513
+ pathnameBase: u,
514
+ pattern: e
515
+ };
516
+ }
517
+ function We(e, t = !1, n = !0) {
518
+ L(
519
+ e === "*" || !e.endsWith("*") || e.endsWith("/*"),
520
+ `Route path "${e}" will be treated as if it were "${e.replace(/\*$/, "/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/, "/*")}".`
521
+ );
522
+ let i = [], r = "^" + e.replace(/\/*\*?$/, "").replace(/^\/*/, "/").replace(/[\\.*+^${}|()[\]]/g, "\\$&").replace(
523
+ /\/:([\w-]+)(\?)?/g,
524
+ (u, s, o) => (i.push({ paramName: s, isOptional: o != null }), o ? "/?([^\\/]+)?" : "/([^\\/]+)")
525
+ );
526
+ return e.endsWith("*") ? (i.push({ paramName: "*" }), r += e === "*" || e === "/*" ? "(.*)$" : "(?:\\/(.+)|\\/*)$") : n ? r += "\\/*$" : e !== "" && e !== "/" && (r += "(?:(?=\\/|$))"), [new RegExp(r, t ? void 0 : "i"), i];
527
+ }
528
+ function _e(e) {
529
+ try {
530
+ return e.split("/").map((t) => decodeURIComponent(t).replace(/\//g, "%2F")).join("/");
531
+ } catch (t) {
532
+ return L(
533
+ !1,
534
+ `The URL path "${e}" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`
535
+ ), e;
536
+ }
537
+ }
538
+ function T(e, t) {
539
+ if (t === "/") return e;
540
+ if (!e.toLowerCase().startsWith(t.toLowerCase()))
541
+ return null;
542
+ let n = t.endsWith("/") ? t.length - 1 : t.length, i = e.charAt(n);
543
+ return i && i !== "/" ? null : e.slice(n) || "/";
544
+ }
545
+ function ze(e, t = "/") {
546
+ let {
547
+ pathname: n,
548
+ search: i = "",
549
+ hash: r = ""
550
+ } = typeof e == "string" ? M(e) : e;
551
+ return {
552
+ pathname: n ? n.startsWith("/") ? n : Ve(n, t) : t,
553
+ search: Ke(i),
554
+ hash: qe(r)
555
+ };
556
+ }
557
+ function Ve(e, t) {
558
+ let n = t.replace(/\/+$/, "").split("/");
559
+ return e.split("/").forEach((r) => {
560
+ r === ".." ? n.length > 1 && n.pop() : r !== "." && n.push(r);
561
+ }), n.length > 1 ? n.join("/") : "/";
562
+ }
563
+ function G(e, t, n, i) {
564
+ return `Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(
565
+ i
566
+ )}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`;
567
+ }
568
+ function je(e) {
569
+ return e.filter(
570
+ (t, n) => n === 0 || t.route.path && t.route.path.length > 0
571
+ );
572
+ }
573
+ function he(e) {
574
+ let t = je(e);
575
+ return t.map(
576
+ (n, i) => i === t.length - 1 ? n.pathname : n.pathnameBase
577
+ );
578
+ }
579
+ function me(e, t, n, i = !1) {
580
+ let r;
581
+ typeof e == "string" ? r = M(e) : (r = { ...e }, C(
582
+ !r.pathname || !r.pathname.includes("?"),
583
+ G("?", "pathname", "search", r)
584
+ ), C(
585
+ !r.pathname || !r.pathname.includes("#"),
586
+ G("#", "pathname", "hash", r)
587
+ ), C(
588
+ !r.search || !r.search.includes("#"),
589
+ G("#", "search", "hash", r)
590
+ ));
591
+ let a = e === "" || r.pathname === "", u = a ? "/" : r.pathname, s;
592
+ if (u == null)
593
+ s = n;
594
+ else {
595
+ let y = t.length - 1;
596
+ if (!i && u.startsWith("..")) {
597
+ let h = u.split("/");
598
+ for (; h[0] === ".."; )
599
+ h.shift(), y -= 1;
600
+ r.pathname = h.join("/");
601
+ }
602
+ s = y >= 0 ? t[y] : "/";
603
+ }
604
+ let o = ze(r, s), l = u && u !== "/" && u.endsWith("/"), m = (a || u === ".") && n.endsWith("/");
605
+ return !o.pathname.endsWith("/") && (l || m) && (o.pathname += "/"), o;
606
+ }
607
+ var P = (e) => e.join("/").replace(/\/\/+/g, "/"), Je = (e) => e.replace(/\/+$/, "").replace(/^\/*/, "/"), Ke = (e) => !e || e === "?" ? "" : e.startsWith("?") ? e : "?" + e, qe = (e) => !e || e === "#" ? "" : e.startsWith("#") ? e : "#" + e;
608
+ function Ye(e) {
609
+ return e != null && typeof e.status == "number" && typeof e.statusText == "string" && typeof e.internal == "boolean" && "data" in e;
610
+ }
611
+ var pe = [
612
+ "POST",
613
+ "PUT",
614
+ "PATCH",
615
+ "DELETE"
616
+ ];
617
+ new Set(
618
+ pe
619
+ );
620
+ var Ge = [
621
+ "GET",
622
+ ...pe
623
+ ];
624
+ new Set(Ge);
625
+ var O = c.createContext(null);
626
+ O.displayName = "DataRouter";
627
+ var K = c.createContext(null);
628
+ K.displayName = "DataRouterState";
629
+ var ge = c.createContext({
630
+ isTransitioning: !1
631
+ });
632
+ ge.displayName = "ViewTransition";
633
+ var Xe = c.createContext(
634
+ /* @__PURE__ */ new Map()
635
+ );
636
+ Xe.displayName = "Fetchers";
637
+ var Qe = c.createContext(null);
638
+ Qe.displayName = "Await";
639
+ var b = c.createContext(
640
+ null
641
+ );
642
+ b.displayName = "Navigation";
643
+ var q = c.createContext(
644
+ null
645
+ );
646
+ q.displayName = "Location";
647
+ var k = c.createContext({
648
+ outlet: null,
649
+ matches: [],
650
+ isDataRoute: !1
651
+ });
652
+ k.displayName = "Route";
653
+ var Q = c.createContext(null);
654
+ Q.displayName = "RouteError";
655
+ function Ze(e, { relative: t } = {}) {
656
+ C(
657
+ H(),
658
+ // TODO: This error is probably because they somehow have 2 versions of the
659
+ // router loaded. We can help them understand how to avoid that.
660
+ "useHref() may be used only in the context of a <Router> component."
661
+ );
662
+ let { basename: n, navigator: i } = c.useContext(b), { hash: r, pathname: a, search: u } = W(e, { relative: t }), s = a;
663
+ return n !== "/" && (s = a === "/" ? n : P([n, a])), i.createHref({ pathname: s, search: u, hash: r });
664
+ }
665
+ function H() {
666
+ return c.useContext(q) != null;
667
+ }
668
+ function N() {
669
+ return C(
670
+ H(),
671
+ // TODO: This error is probably because they somehow have 2 versions of the
672
+ // router loaded. We can help them understand how to avoid that.
673
+ "useLocation() may be used only in the context of a <Router> component."
674
+ ), c.useContext(q).location;
675
+ }
676
+ var ye = "You should call navigate() in a React.useEffect(), not when your component is first rendered.";
677
+ function ve(e) {
678
+ c.useContext(b).static || c.useLayoutEffect(e);
679
+ }
680
+ function et() {
681
+ let { isDataRoute: e } = c.useContext(k);
682
+ return e ? ht() : tt();
683
+ }
684
+ function tt() {
685
+ C(
686
+ H(),
687
+ // TODO: This error is probably because they somehow have 2 versions of the
688
+ // router loaded. We can help them understand how to avoid that.
689
+ "useNavigate() may be used only in the context of a <Router> component."
690
+ );
691
+ let e = c.useContext(O), { basename: t, navigator: n } = c.useContext(b), { matches: i } = c.useContext(k), { pathname: r } = N(), a = JSON.stringify(he(i)), u = c.useRef(!1);
692
+ return ve(() => {
693
+ u.current = !0;
694
+ }), c.useCallback(
695
+ (o, l = {}) => {
696
+ if (L(u.current, ye), !u.current) return;
697
+ if (typeof o == "number") {
698
+ n.go(o);
699
+ return;
700
+ }
701
+ let m = me(
702
+ o,
703
+ JSON.parse(a),
704
+ r,
705
+ l.relative === "path"
706
+ );
707
+ e == null && t !== "/" && (m.pathname = m.pathname === "/" ? t : P([t, m.pathname])), (l.replace ? n.replace : n.push)(
708
+ m,
709
+ l.state,
710
+ l
711
+ );
712
+ },
713
+ [
714
+ t,
715
+ n,
716
+ a,
717
+ r,
718
+ e
719
+ ]
720
+ );
721
+ }
722
+ c.createContext(null);
723
+ function W(e, { relative: t } = {}) {
724
+ let { matches: n } = c.useContext(k), { pathname: i } = N(), r = JSON.stringify(he(n));
725
+ return c.useMemo(
726
+ () => me(
727
+ e,
728
+ JSON.parse(r),
729
+ i,
730
+ t === "path"
731
+ ),
732
+ [e, r, i, t]
733
+ );
734
+ }
735
+ function nt(e, t, n, i) {
736
+ C(
737
+ H(),
738
+ // TODO: This error is probably because they somehow have 2 versions of the
739
+ // router loaded. We can help them understand how to avoid that.
740
+ "useRoutes() may be used only in the context of a <Router> component."
741
+ );
742
+ let { navigator: r } = c.useContext(b), { matches: a } = c.useContext(k), u = a[a.length - 1], s = u ? u.params : {};
743
+ u && u.pathname;
744
+ let o = u ? u.pathnameBase : "/";
745
+ u && u.route;
746
+ let l = N(), m;
747
+ m = l;
748
+ let y = m.pathname || "/", h = y;
749
+ if (o !== "/") {
750
+ let g = o.replace(/^\//, "").split("/");
751
+ h = "/" + y.replace(/^\//, "").split("/").slice(g.length).join("/");
752
+ }
753
+ let d = ce(e, { pathname: h });
754
+ return lt(
755
+ d && d.map(
756
+ (g) => Object.assign({}, g, {
757
+ params: Object.assign({}, s, g.params),
758
+ pathname: P([
759
+ o,
760
+ // Re-encode pathnames that were decoded inside matchRoutes
761
+ r.encodeLocation ? r.encodeLocation(g.pathname).pathname : g.pathname
762
+ ]),
763
+ pathnameBase: g.pathnameBase === "/" ? o : P([
764
+ o,
765
+ // Re-encode pathnames that were decoded inside matchRoutes
766
+ r.encodeLocation ? r.encodeLocation(g.pathnameBase).pathname : g.pathnameBase
767
+ ])
768
+ })
769
+ ),
770
+ a,
771
+ n,
772
+ i
773
+ );
774
+ }
775
+ function rt() {
776
+ let e = dt(), t = Ye(e) ? `${e.status} ${e.statusText}` : e instanceof Error ? e.message : JSON.stringify(e), n = e instanceof Error ? e.stack : null, r = { padding: "0.5rem", backgroundColor: "rgba(200,200,200, 0.5)" };
777
+ return /* @__PURE__ */ c.createElement(c.Fragment, null, /* @__PURE__ */ c.createElement("h2", null, "Unexpected Application Error!"), /* @__PURE__ */ c.createElement("h3", { style: { fontStyle: "italic" } }, t), n ? /* @__PURE__ */ c.createElement("pre", { style: r }, n) : null, null);
778
+ }
779
+ var at = /* @__PURE__ */ c.createElement(rt, null), it = class extends c.Component {
780
+ constructor(e) {
781
+ super(e), this.state = {
782
+ location: e.location,
783
+ revalidation: e.revalidation,
784
+ error: e.error
785
+ };
786
+ }
787
+ static getDerivedStateFromError(e) {
788
+ return { error: e };
789
+ }
790
+ static getDerivedStateFromProps(e, t) {
791
+ return t.location !== e.location || t.revalidation !== "idle" && e.revalidation === "idle" ? {
792
+ error: e.error,
793
+ location: e.location,
794
+ revalidation: e.revalidation
795
+ } : {
796
+ error: e.error !== void 0 ? e.error : t.error,
797
+ location: t.location,
798
+ revalidation: e.revalidation || t.revalidation
799
+ };
800
+ }
801
+ componentDidCatch(e, t) {
802
+ console.error(
803
+ "React Router caught the following error during render",
804
+ e,
805
+ t
806
+ );
807
+ }
808
+ render() {
809
+ return this.state.error !== void 0 ? /* @__PURE__ */ c.createElement(k.Provider, { value: this.props.routeContext }, /* @__PURE__ */ c.createElement(
810
+ Q.Provider,
811
+ {
812
+ value: this.state.error,
813
+ children: this.props.component
814
+ }
815
+ )) : this.props.children;
816
+ }
817
+ };
818
+ function ot({ routeContext: e, match: t, children: n }) {
819
+ let i = c.useContext(O);
820
+ return i && i.static && i.staticContext && (t.route.errorElement || t.route.ErrorBoundary) && (i.staticContext._deepestRenderedBoundaryId = t.route.id), /* @__PURE__ */ c.createElement(k.Provider, { value: e }, n);
821
+ }
822
+ function lt(e, t = [], n = null, i = null) {
823
+ if (e == null) {
824
+ if (!n)
825
+ return null;
826
+ if (n.errors)
827
+ e = n.matches;
828
+ else if (t.length === 0 && !n.initialized && n.matches.length > 0)
829
+ e = n.matches;
830
+ else
831
+ return null;
832
+ }
833
+ let r = e, a = n == null ? void 0 : n.errors;
834
+ if (a != null) {
835
+ let o = r.findIndex(
836
+ (l) => l.route.id && (a == null ? void 0 : a[l.route.id]) !== void 0
837
+ );
838
+ C(
839
+ o >= 0,
840
+ `Could not find a matching route for errors on route IDs: ${Object.keys(
841
+ a
842
+ ).join(",")}`
843
+ ), r = r.slice(
844
+ 0,
845
+ Math.min(r.length, o + 1)
846
+ );
847
+ }
848
+ let u = !1, s = -1;
849
+ if (n)
850
+ for (let o = 0; o < r.length; o++) {
851
+ let l = r[o];
852
+ if ((l.route.HydrateFallback || l.route.hydrateFallbackElement) && (s = o), l.route.id) {
853
+ let { loaderData: m, errors: y } = n, h = l.route.loader && !m.hasOwnProperty(l.route.id) && (!y || y[l.route.id] === void 0);
854
+ if (l.route.lazy || h) {
855
+ u = !0, s >= 0 ? r = r.slice(0, s + 1) : r = [r[0]];
856
+ break;
857
+ }
858
+ }
859
+ }
860
+ return r.reduceRight((o, l, m) => {
861
+ let y, h = !1, d = null, f = null;
862
+ n && (y = a && l.route.id ? a[l.route.id] : void 0, d = l.route.errorElement || at, u && (s < 0 && m === 0 ? (mt(
863
+ "route-fallback",
864
+ !1,
865
+ "No `HydrateFallback` element provided to render during initial hydration"
866
+ ), h = !0, f = null) : s === m && (h = !0, f = l.route.hydrateFallbackElement || null)));
867
+ let g = t.concat(r.slice(0, m + 1)), v = () => {
868
+ let p;
869
+ return y ? p = d : h ? p = f : l.route.Component ? p = /* @__PURE__ */ c.createElement(l.route.Component, null) : l.route.element ? p = l.route.element : p = o, /* @__PURE__ */ c.createElement(
870
+ ot,
871
+ {
872
+ match: l,
873
+ routeContext: {
874
+ outlet: o,
875
+ matches: g,
876
+ isDataRoute: n != null
877
+ },
878
+ children: p
879
+ }
880
+ );
881
+ };
882
+ return n && (l.route.ErrorBoundary || l.route.errorElement || m === 0) ? /* @__PURE__ */ c.createElement(
883
+ it,
884
+ {
885
+ location: n.location,
886
+ revalidation: n.revalidation,
887
+ component: d,
888
+ error: y,
889
+ children: v(),
890
+ routeContext: { outlet: null, matches: g, isDataRoute: !0 }
891
+ }
892
+ ) : v();
893
+ }, null);
894
+ }
895
+ function Z(e) {
896
+ return `${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`;
897
+ }
898
+ function ut(e) {
899
+ let t = c.useContext(O);
900
+ return C(t, Z(e)), t;
901
+ }
902
+ function st(e) {
903
+ let t = c.useContext(K);
904
+ return C(t, Z(e)), t;
905
+ }
906
+ function ct(e) {
907
+ let t = c.useContext(k);
908
+ return C(t, Z(e)), t;
909
+ }
910
+ function ee(e) {
911
+ let t = ct(e), n = t.matches[t.matches.length - 1];
912
+ return C(
913
+ n.route.id,
914
+ `${e} can only be used on routes that contain a unique "id"`
915
+ ), n.route.id;
916
+ }
917
+ function ft() {
918
+ return ee(
919
+ "useRouteId"
920
+ /* UseRouteId */
921
+ );
922
+ }
923
+ function dt() {
924
+ var i;
925
+ let e = c.useContext(Q), t = st(
926
+ "useRouteError"
927
+ /* UseRouteError */
928
+ ), n = ee(
929
+ "useRouteError"
930
+ /* UseRouteError */
931
+ );
932
+ return e !== void 0 ? e : (i = t.errors) == null ? void 0 : i[n];
933
+ }
934
+ function ht() {
935
+ let { router: e } = ut(
936
+ "useNavigate"
937
+ /* UseNavigateStable */
938
+ ), t = ee(
939
+ "useNavigate"
940
+ /* UseNavigateStable */
941
+ ), n = c.useRef(!1);
942
+ return ve(() => {
943
+ n.current = !0;
944
+ }), c.useCallback(
945
+ async (r, a = {}) => {
946
+ L(n.current, ye), n.current && (typeof r == "number" ? e.navigate(r) : await e.navigate(r, { fromRouteId: t, ...a }));
947
+ },
948
+ [e, t]
949
+ );
950
+ }
951
+ var ue = {};
952
+ function mt(e, t, n) {
953
+ ue[e] || (ue[e] = !0, L(!1, n));
954
+ }
955
+ c.memo(pt);
956
+ function pt({
957
+ routes: e,
958
+ future: t,
959
+ state: n
960
+ }) {
961
+ return nt(e, void 0, n, t);
962
+ }
963
+ function qt({
964
+ basename: e,
965
+ children: t,
966
+ initialEntries: n,
967
+ initialIndex: i
968
+ }) {
969
+ let r = c.useRef();
970
+ r.current == null && (r.current = Pe({
971
+ initialEntries: n,
972
+ initialIndex: i,
973
+ v5Compat: !0
974
+ }));
975
+ let a = r.current, [u, s] = c.useState({
976
+ action: a.action,
977
+ location: a.location
978
+ }), o = c.useCallback(
979
+ (l) => {
980
+ c.startTransition(() => s(l));
981
+ },
982
+ [s]
983
+ );
984
+ return c.useLayoutEffect(() => a.listen(o), [a, o]), /* @__PURE__ */ c.createElement(
985
+ we,
986
+ {
987
+ basename: e,
988
+ children: t,
989
+ location: u.location,
990
+ navigationType: u.action,
991
+ navigator: a
992
+ }
993
+ );
994
+ }
995
+ function we({
996
+ basename: e = "/",
997
+ children: t = null,
998
+ location: n,
999
+ navigationType: i = "POP",
1000
+ navigator: r,
1001
+ static: a = !1
1002
+ }) {
1003
+ C(
1004
+ !H(),
1005
+ "You cannot render a <Router> inside another <Router>. You should never have more than one in your app."
1006
+ );
1007
+ let u = e.replace(/^\/*/, "/"), s = c.useMemo(
1008
+ () => ({
1009
+ basename: u,
1010
+ navigator: r,
1011
+ static: a,
1012
+ future: {}
1013
+ }),
1014
+ [u, r, a]
1015
+ );
1016
+ typeof n == "string" && (n = M(n));
1017
+ let {
1018
+ pathname: o = "/",
1019
+ search: l = "",
1020
+ hash: m = "",
1021
+ state: y = null,
1022
+ key: h = "default"
1023
+ } = n, d = c.useMemo(() => {
1024
+ let f = T(o, u);
1025
+ return f == null ? null : {
1026
+ location: {
1027
+ pathname: f,
1028
+ search: l,
1029
+ hash: m,
1030
+ state: y,
1031
+ key: h
1032
+ },
1033
+ navigationType: i
1034
+ };
1035
+ }, [u, o, l, m, y, h, i]);
1036
+ return L(
1037
+ d != null,
1038
+ `<Router basename="${u}"> is not able to match the URL "${o}${l}${m}" because it does not start with the basename, so the <Router> won't render anything.`
1039
+ ), d == null ? null : /* @__PURE__ */ c.createElement(b.Provider, { value: s }, /* @__PURE__ */ c.createElement(q.Provider, { children: t, value: d }));
1040
+ }
1041
+ var z = "get", V = "application/x-www-form-urlencoded";
1042
+ function Y(e) {
1043
+ return e != null && typeof e.tagName == "string";
1044
+ }
1045
+ function gt(e) {
1046
+ return Y(e) && e.tagName.toLowerCase() === "button";
1047
+ }
1048
+ function yt(e) {
1049
+ return Y(e) && e.tagName.toLowerCase() === "form";
1050
+ }
1051
+ function vt(e) {
1052
+ return Y(e) && e.tagName.toLowerCase() === "input";
1053
+ }
1054
+ function wt(e) {
1055
+ return !!(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey);
1056
+ }
1057
+ function xt(e, t) {
1058
+ return e.button === 0 && // Ignore everything but left clicks
1059
+ (!t || t === "_self") && // Let browser handle "target=_blank" etc.
1060
+ !wt(e);
1061
+ }
1062
+ var _ = null;
1063
+ function Ct() {
1064
+ if (_ === null)
1065
+ try {
1066
+ new FormData(
1067
+ document.createElement("form"),
1068
+ // @ts-expect-error if FormData supports the submitter parameter, this will throw
1069
+ 0
1070
+ ), _ = !1;
1071
+ } catch {
1072
+ _ = !0;
1073
+ }
1074
+ return _;
1075
+ }
1076
+ var Et = /* @__PURE__ */ new Set([
1077
+ "application/x-www-form-urlencoded",
1078
+ "multipart/form-data",
1079
+ "text/plain"
1080
+ ]);
1081
+ function X(e) {
1082
+ return e != null && !Et.has(e) ? (L(
1083
+ !1,
1084
+ `"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${V}"`
1085
+ ), null) : e;
1086
+ }
1087
+ function Rt(e, t) {
1088
+ let n, i, r, a, u;
1089
+ if (yt(e)) {
1090
+ let s = e.getAttribute("action");
1091
+ i = s ? T(s, t) : null, n = e.getAttribute("method") || z, r = X(e.getAttribute("enctype")) || V, a = new FormData(e);
1092
+ } else if (gt(e) || vt(e) && (e.type === "submit" || e.type === "image")) {
1093
+ let s = e.form;
1094
+ if (s == null)
1095
+ throw new Error(
1096
+ 'Cannot submit a <button> or <input type="submit"> without a <form>'
1097
+ );
1098
+ let o = e.getAttribute("formaction") || s.getAttribute("action");
1099
+ if (i = o ? T(o, t) : null, n = e.getAttribute("formmethod") || s.getAttribute("method") || z, r = X(e.getAttribute("formenctype")) || X(s.getAttribute("enctype")) || V, a = new FormData(s, e), !Ct()) {
1100
+ let { name: l, type: m, value: y } = e;
1101
+ if (m === "image") {
1102
+ let h = l ? `${l}.` : "";
1103
+ a.append(`${h}x`, "0"), a.append(`${h}y`, "0");
1104
+ } else l && a.append(l, y);
1105
+ }
1106
+ } else {
1107
+ if (Y(e))
1108
+ throw new Error(
1109
+ 'Cannot submit element that is not <form>, <button>, or <input type="submit|image">'
1110
+ );
1111
+ n = z, i = null, r = V, u = e;
1112
+ }
1113
+ return a && r === "text/plain" && (u = a, a = void 0), { action: i, method: n.toLowerCase(), encType: r, formData: a, body: u };
1114
+ }
1115
+ function te(e, t) {
1116
+ if (e === !1 || e === null || typeof e > "u")
1117
+ throw new Error(t);
1118
+ }
1119
+ async function St(e, t) {
1120
+ if (e.id in t)
1121
+ return t[e.id];
1122
+ try {
1123
+ let n = await import(
1124
+ /* @vite-ignore */
1125
+ /* webpackIgnore: true */
1126
+ e.module
1127
+ );
1128
+ return t[e.id] = n, n;
1129
+ } catch (n) {
1130
+ return console.error(
1131
+ `Error loading route module \`${e.module}\`, reloading page...`
1132
+ ), console.error(n), window.__reactRouterContext && window.__reactRouterContext.isSpaMode, window.location.reload(), new Promise(() => {
1133
+ });
1134
+ }
1135
+ }
1136
+ function bt(e) {
1137
+ return e == null ? !1 : e.href == null ? e.rel === "preload" && typeof e.imageSrcSet == "string" && typeof e.imageSizes == "string" : typeof e.rel == "string" && typeof e.href == "string";
1138
+ }
1139
+ async function Pt(e, t, n) {
1140
+ let i = await Promise.all(
1141
+ e.map(async (r) => {
1142
+ let a = t.routes[r.route.id];
1143
+ if (a) {
1144
+ let u = await St(a, n);
1145
+ return u.links ? u.links() : [];
1146
+ }
1147
+ return [];
1148
+ })
1149
+ );
1150
+ return It(
1151
+ i.flat(1).filter(bt).filter((r) => r.rel === "stylesheet" || r.rel === "preload").map(
1152
+ (r) => r.rel === "stylesheet" ? { ...r, rel: "prefetch", as: "style" } : { ...r, rel: "prefetch" }
1153
+ )
1154
+ );
1155
+ }
1156
+ function se(e, t, n, i, r, a) {
1157
+ let u = (o, l) => n[l] ? o.route.id !== n[l].route.id : !0, s = (o, l) => {
1158
+ var m;
1159
+ return (
1160
+ // param change, /users/123 -> /users/456
1161
+ n[l].pathname !== o.pathname || // splat param changed, which is not present in match.path
1162
+ // e.g. /files/images/avatar.jpg -> files/finances.xls
1163
+ ((m = n[l].route.path) == null ? void 0 : m.endsWith("*")) && n[l].params["*"] !== o.params["*"]
1164
+ );
1165
+ };
1166
+ return a === "assets" ? t.filter(
1167
+ (o, l) => u(o, l) || s(o, l)
1168
+ ) : a === "data" ? t.filter((o, l) => {
1169
+ var y;
1170
+ let m = i.routes[o.route.id];
1171
+ if (!m || !m.hasLoader)
1172
+ return !1;
1173
+ if (u(o, l) || s(o, l))
1174
+ return !0;
1175
+ if (o.route.shouldRevalidate) {
1176
+ let h = o.route.shouldRevalidate({
1177
+ currentUrl: new URL(
1178
+ r.pathname + r.search + r.hash,
1179
+ window.origin
1180
+ ),
1181
+ currentParams: ((y = n[0]) == null ? void 0 : y.params) || {},
1182
+ nextUrl: new URL(e, window.origin),
1183
+ nextParams: o.params,
1184
+ defaultShouldRevalidate: !0
1185
+ });
1186
+ if (typeof h == "boolean")
1187
+ return h;
1188
+ }
1189
+ return !0;
1190
+ }) : [];
1191
+ }
1192
+ function Lt(e, t) {
1193
+ return kt(
1194
+ e.map((n) => {
1195
+ let i = t.routes[n.route.id];
1196
+ if (!i) return [];
1197
+ let r = [i.module];
1198
+ return i.imports && (r = r.concat(i.imports)), r;
1199
+ }).flat(1)
1200
+ );
1201
+ }
1202
+ function kt(e) {
1203
+ return [...new Set(e)];
1204
+ }
1205
+ function $t(e) {
1206
+ let t = {}, n = Object.keys(e).sort();
1207
+ for (let i of n)
1208
+ t[i] = e[i];
1209
+ return t;
1210
+ }
1211
+ function It(e, t) {
1212
+ let n = /* @__PURE__ */ new Set();
1213
+ return new Set(t), e.reduce((i, r) => {
1214
+ let a = JSON.stringify($t(r));
1215
+ return n.has(a) || (n.add(a), i.push({ key: a, link: r })), i;
1216
+ }, []);
1217
+ }
1218
+ function Tt(e) {
1219
+ let t = typeof e == "string" ? new URL(
1220
+ e,
1221
+ // This can be called during the SSR flow via PrefetchPageLinksImpl so
1222
+ // don't assume window is available
1223
+ typeof window > "u" ? "server://singlefetch/" : window.location.origin
1224
+ ) : e;
1225
+ return t.pathname === "/" ? t.pathname = "_root.data" : t.pathname = `${t.pathname.replace(/\/$/, "")}.data`, t;
1226
+ }
1227
+ function Dt() {
1228
+ let e = c.useContext(O);
1229
+ return te(
1230
+ e,
1231
+ "You must render this element inside a <DataRouterContext.Provider> element"
1232
+ ), e;
1233
+ }
1234
+ function Nt() {
1235
+ let e = c.useContext(K);
1236
+ return te(
1237
+ e,
1238
+ "You must render this element inside a <DataRouterStateContext.Provider> element"
1239
+ ), e;
1240
+ }
1241
+ var ne = c.createContext(void 0);
1242
+ ne.displayName = "FrameworkContext";
1243
+ function xe() {
1244
+ let e = c.useContext(ne);
1245
+ return te(
1246
+ e,
1247
+ "You must render this element inside a <HydratedRouter> element"
1248
+ ), e;
1249
+ }
1250
+ function At(e, t) {
1251
+ let n = c.useContext(ne), [i, r] = c.useState(!1), [a, u] = c.useState(!1), { onFocus: s, onBlur: o, onMouseEnter: l, onMouseLeave: m, onTouchStart: y } = t, h = c.useRef(null);
1252
+ c.useEffect(() => {
1253
+ if (e === "render" && u(!0), e === "viewport") {
1254
+ let g = (p) => {
1255
+ p.forEach((w) => {
1256
+ u(w.isIntersecting);
1257
+ });
1258
+ }, v = new IntersectionObserver(g, { threshold: 0.5 });
1259
+ return h.current && v.observe(h.current), () => {
1260
+ v.disconnect();
1261
+ };
1262
+ }
1263
+ }, [e]), c.useEffect(() => {
1264
+ if (i) {
1265
+ let g = setTimeout(() => {
1266
+ u(!0);
1267
+ }, 100);
1268
+ return () => {
1269
+ clearTimeout(g);
1270
+ };
1271
+ }
1272
+ }, [i]);
1273
+ let d = () => {
1274
+ r(!0);
1275
+ }, f = () => {
1276
+ r(!1), u(!1);
1277
+ };
1278
+ return n ? e !== "intent" ? [a, h, {}] : [
1279
+ a,
1280
+ h,
1281
+ {
1282
+ onFocus: B(s, d),
1283
+ onBlur: B(o, f),
1284
+ onMouseEnter: B(l, d),
1285
+ onMouseLeave: B(m, f),
1286
+ onTouchStart: B(y, d)
1287
+ }
1288
+ ] : [!1, h, {}];
1289
+ }
1290
+ function B(e, t) {
1291
+ return (n) => {
1292
+ e && e(n), n.defaultPrevented || t(n);
1293
+ };
1294
+ }
1295
+ function Ft({
1296
+ page: e,
1297
+ ...t
1298
+ }) {
1299
+ let { router: n } = Dt(), i = c.useMemo(
1300
+ () => ce(n.routes, e, n.basename),
1301
+ [n.routes, e, n.basename]
1302
+ );
1303
+ return i ? /* @__PURE__ */ c.createElement(Ot, { page: e, matches: i, ...t }) : (console.warn(`Tried to prefetch ${e} but no routes matched.`), null);
1304
+ }
1305
+ function Mt(e) {
1306
+ let { manifest: t, routeModules: n } = xe(), [i, r] = c.useState([]);
1307
+ return c.useEffect(() => {
1308
+ let a = !1;
1309
+ return Pt(e, t, n).then(
1310
+ (u) => {
1311
+ a || r(u);
1312
+ }
1313
+ ), () => {
1314
+ a = !0;
1315
+ };
1316
+ }, [e, t, n]), i;
1317
+ }
1318
+ function Ot({
1319
+ page: e,
1320
+ matches: t,
1321
+ ...n
1322
+ }) {
1323
+ let i = N(), { manifest: r, routeModules: a } = xe(), { loaderData: u, matches: s } = Nt(), o = c.useMemo(
1324
+ () => se(
1325
+ e,
1326
+ t,
1327
+ s,
1328
+ r,
1329
+ i,
1330
+ "data"
1331
+ ),
1332
+ [e, t, s, r, i]
1333
+ ), l = c.useMemo(
1334
+ () => se(
1335
+ e,
1336
+ t,
1337
+ s,
1338
+ r,
1339
+ i,
1340
+ "assets"
1341
+ ),
1342
+ [e, t, s, r, i]
1343
+ ), m = c.useMemo(() => {
1344
+ if (e === i.pathname + i.search + i.hash)
1345
+ return [];
1346
+ let d = /* @__PURE__ */ new Set(), f = !1;
1347
+ if (t.forEach((v) => {
1348
+ var w;
1349
+ let p = r.routes[v.route.id];
1350
+ !p || !p.hasLoader || (!o.some((x) => x.route.id === v.route.id) && v.route.id in u && ((w = a[v.route.id]) != null && w.shouldRevalidate) || p.hasClientLoader ? f = !0 : d.add(v.route.id));
1351
+ }), d.size === 0)
1352
+ return [];
1353
+ let g = Tt(e);
1354
+ return f && d.size > 0 && g.searchParams.set(
1355
+ "_routes",
1356
+ t.filter((v) => d.has(v.route.id)).map((v) => v.route.id).join(",")
1357
+ ), [g.pathname + g.search];
1358
+ }, [
1359
+ u,
1360
+ i,
1361
+ r,
1362
+ o,
1363
+ t,
1364
+ e,
1365
+ a
1366
+ ]), y = c.useMemo(
1367
+ () => Lt(l, r),
1368
+ [l, r]
1369
+ ), h = Mt(l);
1370
+ return /* @__PURE__ */ c.createElement(c.Fragment, null, m.map((d) => /* @__PURE__ */ c.createElement("link", { key: d, rel: "prefetch", as: "fetch", href: d, ...n })), y.map((d) => /* @__PURE__ */ c.createElement("link", { key: d, rel: "modulepreload", href: d, ...n })), h.map(({ key: d, link: f }) => (
1371
+ // these don't spread `linkProps` because they are full link descriptors
1372
+ // already with their own props
1373
+ /* @__PURE__ */ c.createElement("link", { key: d, ...f })
1374
+ )));
1375
+ }
1376
+ function Ut(...e) {
1377
+ return (t) => {
1378
+ e.forEach((n) => {
1379
+ typeof n == "function" ? n(t) : n != null && (n.current = t);
1380
+ });
1381
+ };
1382
+ }
1383
+ var Ce = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u";
1384
+ try {
1385
+ Ce && (window.__reactRouterVersion = "7.0.1");
1386
+ } catch {
1387
+ }
1388
+ function Yt({
1389
+ basename: e,
1390
+ children: t,
1391
+ window: n
1392
+ }) {
1393
+ let i = c.useRef();
1394
+ i.current == null && (i.current = Le({ window: n, v5Compat: !0 }));
1395
+ let r = i.current, [a, u] = c.useState({
1396
+ action: r.action,
1397
+ location: r.location
1398
+ }), s = c.useCallback(
1399
+ (o) => {
1400
+ c.startTransition(() => u(o));
1401
+ },
1402
+ [u]
1403
+ );
1404
+ return c.useLayoutEffect(() => r.listen(s), [r, s]), /* @__PURE__ */ c.createElement(
1405
+ we,
1406
+ {
1407
+ basename: e,
1408
+ children: t,
1409
+ location: a.location,
1410
+ navigationType: a.action,
1411
+ navigator: r
1412
+ }
1413
+ );
1414
+ }
1415
+ var Ee = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, Re = c.forwardRef(
1416
+ function({
1417
+ onClick: t,
1418
+ discover: n = "render",
1419
+ prefetch: i = "none",
1420
+ relative: r,
1421
+ reloadDocument: a,
1422
+ replace: u,
1423
+ state: s,
1424
+ target: o,
1425
+ to: l,
1426
+ preventScrollReset: m,
1427
+ viewTransition: y,
1428
+ ...h
1429
+ }, d) {
1430
+ let { basename: f } = c.useContext(b), g = typeof l == "string" && Ee.test(l), v, p = !1;
1431
+ if (typeof l == "string" && g && (v = l, Ce))
1432
+ try {
1433
+ let S = new URL(window.location.href), I = l.startsWith("//") ? new URL(S.protocol + l) : new URL(l), re = T(I.pathname, f);
1434
+ I.origin === S.origin && re != null ? l = re + I.search + I.hash : p = !0;
1435
+ } catch {
1436
+ L(
1437
+ !1,
1438
+ `<Link to="${l}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`
1439
+ );
1440
+ }
1441
+ let w = Ze(l, { relative: r }), [x, E, R] = At(
1442
+ i,
1443
+ h
1444
+ ), A = _t(l, {
1445
+ replace: u,
1446
+ state: s,
1447
+ target: o,
1448
+ preventScrollReset: m,
1449
+ relative: r,
1450
+ viewTransition: y
1451
+ });
1452
+ function $(S) {
1453
+ t && t(S), S.defaultPrevented || A(S);
1454
+ }
1455
+ let D = (
1456
+ // eslint-disable-next-line jsx-a11y/anchor-has-content
1457
+ /* @__PURE__ */ c.createElement(
1458
+ "a",
1459
+ {
1460
+ ...h,
1461
+ ...R,
1462
+ href: v || w,
1463
+ onClick: p || a ? t : $,
1464
+ ref: Ut(d, E),
1465
+ target: o,
1466
+ "data-discover": !g && n === "render" ? "true" : void 0
1467
+ }
1468
+ )
1469
+ );
1470
+ return x && !g ? /* @__PURE__ */ c.createElement(c.Fragment, null, D, /* @__PURE__ */ c.createElement(Ft, { page: w })) : D;
1471
+ }
1472
+ );
1473
+ Re.displayName = "Link";
1474
+ var Bt = c.forwardRef(
1475
+ function({
1476
+ "aria-current": t = "page",
1477
+ caseSensitive: n = !1,
1478
+ className: i = "",
1479
+ end: r = !1,
1480
+ style: a,
1481
+ to: u,
1482
+ viewTransition: s,
1483
+ children: o,
1484
+ ...l
1485
+ }, m) {
1486
+ let y = W(u, { relative: l.relative }), h = N(), d = c.useContext(K), { navigator: f, basename: g } = c.useContext(b), v = d != null && // Conditional usage is OK here because the usage of a data router is static
1487
+ // eslint-disable-next-line react-hooks/rules-of-hooks
1488
+ Kt(y) && s === !0, p = f.encodeLocation ? f.encodeLocation(y).pathname : y.pathname, w = h.pathname, x = d && d.navigation && d.navigation.location ? d.navigation.location.pathname : null;
1489
+ n || (w = w.toLowerCase(), x = x ? x.toLowerCase() : null, p = p.toLowerCase()), x && g && (x = T(x, g) || x);
1490
+ const E = p !== "/" && p.endsWith("/") ? p.length - 1 : p.length;
1491
+ let R = w === p || !r && w.startsWith(p) && w.charAt(E) === "/", A = x != null && (x === p || !r && x.startsWith(p) && x.charAt(p.length) === "/"), $ = {
1492
+ isActive: R,
1493
+ isPending: A,
1494
+ isTransitioning: v
1495
+ }, D = R ? t : void 0, S;
1496
+ typeof i == "function" ? S = i($) : S = [
1497
+ i,
1498
+ R ? "active" : null,
1499
+ A ? "pending" : null,
1500
+ v ? "transitioning" : null
1501
+ ].filter(Boolean).join(" ");
1502
+ let I = typeof a == "function" ? a($) : a;
1503
+ return /* @__PURE__ */ c.createElement(
1504
+ Re,
1505
+ {
1506
+ ...l,
1507
+ "aria-current": D,
1508
+ className: S,
1509
+ ref: m,
1510
+ style: I,
1511
+ to: u,
1512
+ viewTransition: s
1513
+ },
1514
+ typeof o == "function" ? o($) : o
1515
+ );
1516
+ }
1517
+ );
1518
+ Bt.displayName = "NavLink";
1519
+ var Ht = c.forwardRef(
1520
+ ({
1521
+ discover: e = "render",
1522
+ fetcherKey: t,
1523
+ navigate: n,
1524
+ reloadDocument: i,
1525
+ replace: r,
1526
+ state: a,
1527
+ method: u = z,
1528
+ action: s,
1529
+ onSubmit: o,
1530
+ relative: l,
1531
+ preventScrollReset: m,
1532
+ viewTransition: y,
1533
+ ...h
1534
+ }, d) => {
1535
+ let f = jt(), g = Jt(s, { relative: l }), v = u.toLowerCase() === "get" ? "get" : "post", p = typeof s == "string" && Ee.test(s), w = (x) => {
1536
+ if (o && o(x), x.defaultPrevented) return;
1537
+ x.preventDefault();
1538
+ let E = x.nativeEvent.submitter, R = (E == null ? void 0 : E.getAttribute("formmethod")) || u;
1539
+ f(E || x.currentTarget, {
1540
+ fetcherKey: t,
1541
+ method: R,
1542
+ navigate: n,
1543
+ replace: r,
1544
+ state: a,
1545
+ relative: l,
1546
+ preventScrollReset: m,
1547
+ viewTransition: y
1548
+ });
1549
+ };
1550
+ return /* @__PURE__ */ c.createElement(
1551
+ "form",
1552
+ {
1553
+ ref: d,
1554
+ method: v,
1555
+ action: g,
1556
+ onSubmit: i ? o : w,
1557
+ ...h,
1558
+ "data-discover": !p && e === "render" ? "true" : void 0
1559
+ }
1560
+ );
1561
+ }
1562
+ );
1563
+ Ht.displayName = "Form";
1564
+ function Wt(e) {
1565
+ return `${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`;
1566
+ }
1567
+ function Se(e) {
1568
+ let t = c.useContext(O);
1569
+ return C(t, Wt(e)), t;
1570
+ }
1571
+ function _t(e, {
1572
+ target: t,
1573
+ replace: n,
1574
+ state: i,
1575
+ preventScrollReset: r,
1576
+ relative: a,
1577
+ viewTransition: u
1578
+ } = {}) {
1579
+ let s = et(), o = N(), l = W(e, { relative: a });
1580
+ return c.useCallback(
1581
+ (m) => {
1582
+ if (xt(m, t)) {
1583
+ m.preventDefault();
1584
+ let y = n !== void 0 ? n : F(o) === F(l);
1585
+ s(e, {
1586
+ replace: y,
1587
+ state: i,
1588
+ preventScrollReset: r,
1589
+ relative: a,
1590
+ viewTransition: u
1591
+ });
1592
+ }
1593
+ },
1594
+ [
1595
+ o,
1596
+ s,
1597
+ l,
1598
+ n,
1599
+ i,
1600
+ t,
1601
+ e,
1602
+ r,
1603
+ a,
1604
+ u
1605
+ ]
1606
+ );
1607
+ }
1608
+ var zt = 0, Vt = () => `__${String(++zt)}__`;
1609
+ function jt() {
1610
+ let { router: e } = Se(
1611
+ "useSubmit"
1612
+ /* UseSubmit */
1613
+ ), { basename: t } = c.useContext(b), n = ft();
1614
+ return c.useCallback(
1615
+ async (i, r = {}) => {
1616
+ let { action: a, method: u, encType: s, formData: o, body: l } = Rt(
1617
+ i,
1618
+ t
1619
+ );
1620
+ if (r.navigate === !1) {
1621
+ let m = r.fetcherKey || Vt();
1622
+ await e.fetch(m, n, r.action || a, {
1623
+ preventScrollReset: r.preventScrollReset,
1624
+ formData: o,
1625
+ body: l,
1626
+ formMethod: r.method || u,
1627
+ formEncType: r.encType || s,
1628
+ flushSync: r.flushSync
1629
+ });
1630
+ } else
1631
+ await e.navigate(r.action || a, {
1632
+ preventScrollReset: r.preventScrollReset,
1633
+ formData: o,
1634
+ body: l,
1635
+ formMethod: r.method || u,
1636
+ formEncType: r.encType || s,
1637
+ replace: r.replace,
1638
+ state: r.state,
1639
+ fromRouteId: n,
1640
+ flushSync: r.flushSync,
1641
+ viewTransition: r.viewTransition
1642
+ });
1643
+ },
1644
+ [e, t, n]
1645
+ );
1646
+ }
1647
+ function Jt(e, { relative: t } = {}) {
1648
+ let { basename: n } = c.useContext(b), i = c.useContext(k);
1649
+ C(i, "useFormAction must be used inside a RouteContext");
1650
+ let [r] = i.matches.slice(-1), a = { ...W(e || ".", { relative: t }) }, u = N();
1651
+ if (e == null) {
1652
+ a.search = u.search;
1653
+ let s = new URLSearchParams(a.search), o = s.getAll("index");
1654
+ if (o.some((m) => m === "")) {
1655
+ s.delete("index"), o.filter((y) => y).forEach((y) => s.append("index", y));
1656
+ let m = s.toString();
1657
+ a.search = m ? `?${m}` : "";
1658
+ }
1659
+ }
1660
+ return (!e || e === ".") && r.route.index && (a.search = a.search ? a.search.replace(/^\?/, "?index&") : "?index"), n !== "/" && (a.pathname = a.pathname === "/" ? n : P([n, a.pathname])), F(a);
1661
+ }
1662
+ function Kt(e, t = {}) {
1663
+ let n = c.useContext(ge);
1664
+ C(
1665
+ n != null,
1666
+ "`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?"
1667
+ );
1668
+ let { basename: i } = Se(
1669
+ "useViewTransitionState"
1670
+ /* useViewTransitionState */
1671
+ ), r = W(e, { relative: t.relative });
1672
+ if (!n.isTransitioning)
1673
+ return !1;
1674
+ let a = T(n.currentLocation.pathname, i) || n.currentLocation.pathname, u = T(n.nextLocation.pathname, i) || n.nextLocation.pathname;
1675
+ return J(r.pathname, u) != null || J(r.pathname, a) != null;
1676
+ }
1677
+ new TextEncoder();
1678
+ export {
1679
+ Yt as B,
1680
+ Re as L,
1681
+ qt as M,
1682
+ Bt as N,
1683
+ N as u
1684
+ };
1685
+ //# sourceMappingURL=chunk-7R3XDUXW-C-tvzxWq.js.map