zudoku 0.13.5 → 0.13.7

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 (286) hide show
  1. package/dist/app/main.js +1 -1
  2. package/dist/app/main.js.map +1 -1
  3. package/dist/lib/authentication/components/CallbackHandler.js +21 -31
  4. package/dist/lib/authentication/components/CallbackHandler.js.map +1 -1
  5. package/dist/lib/errors/ErrorAlert.d.ts +1 -1
  6. package/dist/lib/errors/ErrorAlert.js +8 -3
  7. package/dist/lib/errors/ErrorAlert.js.map +1 -1
  8. package/dist/lib/plugins/api-keys/CreateApiKey.js +1 -1
  9. package/dist/lib/plugins/api-keys/CreateApiKey.js.map +1 -1
  10. package/dist/lib/plugins/openapi/Sidecar.js +2 -2
  11. package/dist/lib/plugins/openapi/playground/Playground.js +1 -1
  12. package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
  13. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js +1 -1
  14. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js.map +1 -1
  15. package/dist/lib/ui/Accordion.d.ts +7 -0
  16. package/dist/lib/ui/Accordion.js +14 -0
  17. package/dist/lib/ui/Accordion.js.map +1 -0
  18. package/dist/lib/ui/Alert.d.ts +8 -0
  19. package/dist/lib/ui/Alert.js +23 -0
  20. package/dist/lib/ui/Alert.js.map +1 -0
  21. package/dist/lib/ui/AlertDialog.d.ts +20 -0
  22. package/dist/lib/ui/AlertDialog.js +27 -0
  23. package/dist/lib/ui/AlertDialog.js.map +1 -0
  24. package/dist/lib/ui/AspectRatio.d.ts +3 -0
  25. package/dist/lib/ui/AspectRatio.js +4 -0
  26. package/dist/lib/ui/AspectRatio.js.map +1 -0
  27. package/dist/lib/ui/Badge.d.ts +9 -0
  28. package/dist/lib/ui/Badge.js +21 -0
  29. package/dist/lib/ui/Badge.js.map +1 -0
  30. package/dist/lib/ui/Breadcrumb.d.ts +19 -0
  31. package/dist/lib/ui/Breadcrumb.js +24 -0
  32. package/dist/lib/ui/Breadcrumb.js.map +1 -0
  33. package/dist/lib/ui/Button.d.ts +1 -2
  34. package/dist/lib/ui/Button.js +1 -1
  35. package/dist/lib/ui/Button.js.map +1 -1
  36. package/dist/lib/ui/Carousel.d.ts +18 -0
  37. package/dist/lib/ui/Carousel.js +99 -0
  38. package/dist/lib/ui/Carousel.js.map +1 -0
  39. package/dist/lib/ui/Checkbox.d.ts +4 -0
  40. package/dist/lib/ui/Checkbox.js +9 -0
  41. package/dist/lib/ui/Checkbox.js.map +1 -0
  42. package/dist/lib/ui/Collapsible.d.ts +5 -0
  43. package/dist/lib/ui/Collapsible.js +6 -0
  44. package/dist/lib/ui/Collapsible.js.map +1 -0
  45. package/dist/lib/{components → ui}/Dialog.js +2 -2
  46. package/dist/lib/ui/Dialog.js.map +1 -0
  47. package/dist/lib/ui/Form.d.ts +23 -0
  48. package/dist/lib/ui/Form.js +63 -0
  49. package/dist/lib/ui/Form.js.map +1 -0
  50. package/dist/lib/ui/HoverCard.d.ts +6 -0
  51. package/dist/lib/ui/HoverCard.js +10 -0
  52. package/dist/lib/ui/HoverCard.js.map +1 -0
  53. package/dist/lib/ui/Label.d.ts +5 -0
  54. package/dist/lib/ui/Label.js +10 -0
  55. package/dist/lib/ui/Label.js.map +1 -0
  56. package/dist/lib/ui/Pagination.d.ts +28 -0
  57. package/dist/lib/ui/Pagination.js +24 -0
  58. package/dist/lib/ui/Pagination.js.map +1 -0
  59. package/dist/lib/ui/Popover.d.ts +6 -0
  60. package/dist/lib/ui/Popover.js +10 -0
  61. package/dist/lib/ui/Popover.js.map +1 -0
  62. package/dist/lib/ui/Progress.d.ts +4 -0
  63. package/dist/lib/ui/Progress.js +8 -0
  64. package/dist/lib/ui/Progress.js.map +1 -0
  65. package/dist/lib/ui/RadioGroup.d.ts +5 -0
  66. package/dist/lib/ui/RadioGroup.js +15 -0
  67. package/dist/lib/ui/RadioGroup.js.map +1 -0
  68. package/dist/lib/ui/ScrollArea.d.ts +5 -0
  69. package/dist/lib/ui/ScrollArea.js +12 -0
  70. package/dist/lib/ui/ScrollArea.js.map +1 -0
  71. package/dist/lib/ui/Select.js.map +1 -0
  72. package/dist/lib/ui/Skeleton.d.ts +2 -0
  73. package/dist/lib/ui/Skeleton.js +7 -0
  74. package/dist/lib/ui/Skeleton.js.map +1 -0
  75. package/dist/lib/ui/Slider.d.ts +4 -0
  76. package/dist/lib/ui/Slider.js +8 -0
  77. package/dist/lib/ui/Slider.js.map +1 -0
  78. package/dist/lib/ui/Switch.d.ts +4 -0
  79. package/dist/lib/ui/Switch.js +8 -0
  80. package/dist/lib/ui/Switch.js.map +1 -0
  81. package/dist/lib/ui/Textarea.d.ts +4 -0
  82. package/dist/lib/ui/Textarea.js +9 -0
  83. package/dist/lib/ui/Textarea.js.map +1 -0
  84. package/dist/lib/ui/Toggle.d.ts +12 -0
  85. package/dist/lib/ui/Toggle.js +26 -0
  86. package/dist/lib/ui/Toggle.js.map +1 -0
  87. package/dist/lib/ui/ToggleGroup.d.ts +12 -0
  88. package/dist/lib/ui/ToggleGroup.js +21 -0
  89. package/dist/lib/ui/ToggleGroup.js.map +1 -0
  90. package/dist/lib/ui/Tooltip.d.ts +7 -0
  91. package/dist/lib/ui/Tooltip.js +11 -0
  92. package/dist/lib/ui/Tooltip.js.map +1 -0
  93. package/dist/lib/util/invariant.d.ts +9 -0
  94. package/dist/lib/util/invariant.js +7 -3
  95. package/dist/lib/util/invariant.js.map +1 -1
  96. package/dist/vite/plugin-component.js +17 -7
  97. package/dist/vite/plugin-component.js.map +1 -1
  98. package/lib/{AuthenticationPlugin-D1nhROkO.js → AuthenticationPlugin-Bpdes0cJ.js} +3 -3
  99. package/lib/{AuthenticationPlugin-D1nhROkO.js.map → AuthenticationPlugin-Bpdes0cJ.js.map} +1 -1
  100. package/lib/{CategoryHeading-B7TlPvuN.js → CategoryHeading-Bb9dqxD3.js} +4 -4
  101. package/lib/{CategoryHeading-B7TlPvuN.js.map → CategoryHeading-Bb9dqxD3.js.map} +1 -1
  102. package/lib/{DeveloperHint-B_QCCafl.js → DeveloperHint-DHdLXGHA.js} +2 -2
  103. package/lib/{DeveloperHint-B_QCCafl.js.map → DeveloperHint-DHdLXGHA.js.map} +1 -1
  104. package/lib/{Markdown-Y__eLG0x.js → Markdown-1BO9EA_X.js} +4265 -6649
  105. package/lib/Markdown-1BO9EA_X.js.map +1 -0
  106. package/lib/{MdxPage-B4FcPIi5.js → MdxPage-BEOcOICU.js} +28 -27
  107. package/lib/{MdxPage-B4FcPIi5.js.map → MdxPage-BEOcOICU.js.map} +1 -1
  108. package/lib/{OperationList-C2jKCTwZ.js → OperationList-Cea2Yt8e.js} +131 -128
  109. package/lib/{OperationList-C2jKCTwZ.js.map → OperationList-Cea2Yt8e.js.map} +1 -1
  110. package/lib/{Route-DWXcQzRK.js → Route-BHT-onwf.js} +3 -3
  111. package/lib/{Route-DWXcQzRK.js.map → Route-BHT-onwf.js.map} +1 -1
  112. package/lib/Select-m1aXZGAP.js +223 -0
  113. package/lib/Select-m1aXZGAP.js.map +1 -0
  114. package/lib/SlotletProvider-CPfsBw39.js +241 -0
  115. package/lib/SlotletProvider-CPfsBw39.js.map +1 -0
  116. package/lib/Spinner-C6zroowC.js +40 -0
  117. package/lib/Spinner-C6zroowC.js.map +1 -0
  118. package/lib/StaggeredRender-DDHSzQKE.js +17 -0
  119. package/lib/StaggeredRender-DDHSzQKE.js.map +1 -0
  120. package/lib/{ZudokuContext-MRoel6bS.js → ZudokuContext-D1D8Anlj.js} +20 -20
  121. package/lib/{ZudokuContext-MRoel6bS.js.map → ZudokuContext-D1D8Anlj.js.map} +1 -1
  122. package/lib/_commonjsHelpers-BkfeUUK-.js +29 -0
  123. package/lib/_commonjsHelpers-BkfeUUK-.js.map +1 -0
  124. package/lib/cn-BmFQLtkS.js +2279 -0
  125. package/lib/cn-BmFQLtkS.js.map +1 -0
  126. package/lib/hook-JSRuxV1P.js +229 -0
  127. package/lib/hook-JSRuxV1P.js.map +1 -0
  128. package/lib/index-Bn6Lc9tq.js +9 -0
  129. package/lib/{index-DJqnphbT.js.map → index-Bn6Lc9tq.js.map} +1 -1
  130. package/lib/index-BuAyrJe3.js +46 -0
  131. package/lib/index-BuAyrJe3.js.map +1 -0
  132. package/lib/{index-DFN92YJN.js → index-CRo94sKK.js} +5 -4
  133. package/lib/{index-DFN92YJN.js.map → index-CRo94sKK.js.map} +1 -1
  134. package/lib/{index-Dso_b0di.js → index-Cj-F-4ME.js} +1207 -1424
  135. package/lib/index-Cj-F-4ME.js.map +1 -0
  136. package/lib/{index-D06ATMgg.js → index-LNp6rxyU.js} +2 -2
  137. package/lib/{index-D06ATMgg.js.map → index-LNp6rxyU.js.map} +1 -1
  138. package/lib/index.esm-C5mr_sKO.js +1193 -0
  139. package/lib/index.esm-C5mr_sKO.js.map +1 -0
  140. package/lib/invariant-Caa8-XvF.js +26 -0
  141. package/lib/invariant-Caa8-XvF.js.map +1 -0
  142. package/lib/ui/Accordion.js +47 -0
  143. package/lib/ui/Accordion.js.map +1 -0
  144. package/lib/ui/Alert.js +51 -0
  145. package/lib/ui/Alert.js.map +1 -0
  146. package/lib/ui/AlertDialog.js +114 -0
  147. package/lib/ui/AlertDialog.js.map +1 -0
  148. package/lib/ui/AspectRatio.js +6 -0
  149. package/lib/ui/AspectRatio.js.map +1 -0
  150. package/lib/ui/Badge.js +27 -0
  151. package/lib/ui/Badge.js.map +1 -0
  152. package/lib/ui/Breadcrumb.js +94 -0
  153. package/lib/ui/Breadcrumb.js.map +1 -0
  154. package/lib/ui/Button.js +49 -0
  155. package/lib/ui/Button.js.map +1 -0
  156. package/lib/ui/Callout.js +77 -0
  157. package/lib/ui/Callout.js.map +1 -0
  158. package/lib/ui/Card.js +62 -0
  159. package/lib/ui/Card.js.map +1 -0
  160. package/lib/ui/Carousel.js +1410 -0
  161. package/lib/ui/Carousel.js.map +1 -0
  162. package/lib/ui/Checkbox.js +28 -0
  163. package/lib/ui/Checkbox.js.map +1 -0
  164. package/lib/ui/Collapsible.js +8 -0
  165. package/lib/ui/Collapsible.js.map +1 -0
  166. package/lib/ui/Dialog.js +101 -0
  167. package/lib/ui/Dialog.js.map +1 -0
  168. package/lib/ui/Drawer.js +1153 -0
  169. package/lib/ui/Drawer.js.map +1 -0
  170. package/lib/ui/DropdownMenu.js +145 -0
  171. package/lib/ui/DropdownMenu.js.map +1 -0
  172. package/lib/ui/Form.js +95 -0
  173. package/lib/ui/Form.js.map +1 -0
  174. package/lib/ui/HoverCard.js +24 -0
  175. package/lib/ui/HoverCard.js.map +1 -0
  176. package/lib/ui/Input.js +22 -0
  177. package/lib/ui/Input.js.map +1 -0
  178. package/lib/ui/Label.js +20 -0
  179. package/lib/ui/Label.js.map +1 -0
  180. package/lib/ui/Note.js +51 -0
  181. package/lib/ui/Note.js.map +1 -0
  182. package/lib/ui/Pagination.js +106 -0
  183. package/lib/ui/Pagination.js.map +1 -0
  184. package/lib/ui/Popover.js +24 -0
  185. package/lib/ui/Popover.js.map +1 -0
  186. package/lib/ui/Progress.js +27 -0
  187. package/lib/ui/Progress.js.map +1 -0
  188. package/lib/ui/RadioGroup.js +32 -0
  189. package/lib/ui/RadioGroup.js.map +1 -0
  190. package/lib/ui/ScrollArea.js +39 -0
  191. package/lib/ui/ScrollArea.js.map +1 -0
  192. package/lib/ui/Select.js +122 -0
  193. package/lib/ui/Select.js.map +1 -0
  194. package/lib/ui/Skeleton.js +18 -0
  195. package/lib/ui/Skeleton.js.map +1 -0
  196. package/lib/ui/Slider.js +24 -0
  197. package/lib/ui/Slider.js.map +1 -0
  198. package/lib/ui/Switch.js +28 -0
  199. package/lib/ui/Switch.js.map +1 -0
  200. package/lib/ui/Tabs.js +47 -0
  201. package/lib/ui/Tabs.js.map +1 -0
  202. package/lib/ui/Textarea.js +21 -0
  203. package/lib/ui/Textarea.js.map +1 -0
  204. package/lib/ui/Toggle.js +38 -0
  205. package/lib/ui/Toggle.js.map +1 -0
  206. package/lib/ui/ToggleGroup.js +42 -0
  207. package/lib/ui/ToggleGroup.js.map +1 -0
  208. package/lib/ui/Tooltip.js +24 -0
  209. package/lib/ui/Tooltip.js.map +1 -0
  210. package/lib/{useExposedProps-BWwxa-Hg.js → useExposedProps-B9K-9GTc.js} +2 -2
  211. package/lib/{useExposedProps-BWwxa-Hg.js.map → useExposedProps-B9K-9GTc.js.map} +1 -1
  212. package/lib/{utils-C8S3st2k.js → utils-B2yoT99j.js} +63 -63
  213. package/lib/{utils-C8S3st2k.js.map → utils-B2yoT99j.js.map} +1 -1
  214. package/lib/zudoku.auth-clerk.js +1 -1
  215. package/lib/zudoku.auth-openid.js +477 -483
  216. package/lib/zudoku.auth-openid.js.map +1 -1
  217. package/lib/zudoku.components.js +847 -2845
  218. package/lib/zudoku.components.js.map +1 -1
  219. package/lib/zudoku.openapi-worker.js +2 -2
  220. package/lib/zudoku.plugin-api-keys.js +68 -75
  221. package/lib/zudoku.plugin-api-keys.js.map +1 -1
  222. package/lib/zudoku.plugin-custom-pages.js +14 -13
  223. package/lib/zudoku.plugin-custom-pages.js.map +1 -1
  224. package/lib/zudoku.plugin-markdown.js +1 -1
  225. package/lib/zudoku.plugin-openapi.js +6 -6
  226. package/package.json +28 -6
  227. package/src/app/main.tsx +1 -1
  228. package/src/lib/authentication/components/CallbackHandler.tsx +20 -51
  229. package/src/lib/errors/ErrorAlert.tsx +18 -5
  230. package/src/lib/plugins/api-keys/CreateApiKey.tsx +2 -2
  231. package/src/lib/plugins/openapi/Sidecar.tsx +2 -2
  232. package/src/lib/plugins/openapi/playground/Playground.tsx +3 -3
  233. package/src/lib/plugins/openapi/playground/PlaygroundDialog.tsx +1 -1
  234. package/src/lib/ui/Accordion.tsx +56 -0
  235. package/src/lib/ui/Alert.tsx +59 -0
  236. package/src/lib/ui/AlertDialog.tsx +139 -0
  237. package/src/lib/ui/AspectRatio.tsx +5 -0
  238. package/src/lib/ui/Badge.tsx +36 -0
  239. package/src/lib/ui/Breadcrumb.tsx +115 -0
  240. package/src/lib/ui/Button.tsx +1 -1
  241. package/src/lib/ui/Carousel.tsx +260 -0
  242. package/src/lib/ui/Checkbox.tsx +28 -0
  243. package/src/lib/ui/Collapsible.tsx +9 -0
  244. package/src/lib/{components → ui}/Dialog.tsx +4 -3
  245. package/src/lib/ui/Form.tsx +177 -0
  246. package/src/lib/ui/HoverCard.tsx +27 -0
  247. package/src/lib/ui/Label.tsx +24 -0
  248. package/src/lib/ui/Pagination.tsx +117 -0
  249. package/src/lib/ui/Popover.tsx +29 -0
  250. package/src/lib/ui/Progress.tsx +26 -0
  251. package/src/lib/ui/RadioGroup.tsx +42 -0
  252. package/src/lib/ui/ScrollArea.tsx +46 -0
  253. package/src/lib/ui/Skeleton.tsx +15 -0
  254. package/src/lib/ui/Slider.tsx +26 -0
  255. package/src/lib/ui/Switch.tsx +27 -0
  256. package/src/lib/ui/Textarea.tsx +23 -0
  257. package/src/lib/ui/Toggle.tsx +43 -0
  258. package/src/lib/ui/ToggleGroup.tsx +59 -0
  259. package/src/lib/ui/Tooltip.tsx +28 -0
  260. package/src/lib/util/invariant.ts +15 -3
  261. package/dist/internal.d.ts +0 -1
  262. package/dist/internal.js +0 -2
  263. package/dist/internal.js.map +0 -1
  264. package/dist/lib/components/Dialog.js.map +0 -1
  265. package/dist/lib/components/Select.js.map +0 -1
  266. package/lib/ErrorPage-DqqAV1dr.js +0 -16
  267. package/lib/ErrorPage-DqqAV1dr.js.map +0 -1
  268. package/lib/Input-DrR6P3mq.js +0 -2229
  269. package/lib/Input-DrR6P3mq.js.map +0 -1
  270. package/lib/Markdown-Y__eLG0x.js.map +0 -1
  271. package/lib/SidebarBadge-C0iWtji9.js +0 -503
  272. package/lib/SidebarBadge-C0iWtji9.js.map +0 -1
  273. package/lib/SlotletProvider-DmqWiVFt.js +0 -239
  274. package/lib/SlotletProvider-DmqWiVFt.js.map +0 -1
  275. package/lib/Spinner-3cQDBVGr.js +0 -7
  276. package/lib/Spinner-3cQDBVGr.js.map +0 -1
  277. package/lib/index-Ch8VO_uX.js +0 -2867
  278. package/lib/index-Ch8VO_uX.js.map +0 -1
  279. package/lib/index-DJqnphbT.js +0 -35
  280. package/lib/index-Dso_b0di.js.map +0 -1
  281. package/lib/index-bYAqbdYl.js +0 -124
  282. package/lib/index-bYAqbdYl.js.map +0 -1
  283. /package/dist/lib/{components → ui}/Dialog.d.ts +0 -0
  284. /package/dist/lib/{components → ui}/Select.d.ts +0 -0
  285. /package/dist/lib/{components → ui}/Select.js +0 -0
  286. /package/src/lib/{components → ui}/Select.tsx +0 -0
@@ -1,176 +1,182 @@
1
- var Ha = Object.defineProperty;
2
- var pn = (e) => {
3
- throw TypeError(e);
1
+ var ut = Object.defineProperty;
2
+ var be = (t) => {
3
+ throw TypeError(t);
4
4
  };
5
- var Ua = (e, t, n) => t in e ? Ha(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
6
- var ae = (e, t, n) => Ua(e, typeof t != "symbol" ? t + "" : t, n), mn = (e, t, n) => t.has(e) || pn("Cannot " + n);
7
- var w = (e, t, n) => (mn(e, t, "read from private field"), n ? n.call(e) : t.get(e)), ce = (e, t, n) => t.has(e) ? pn("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), X = (e, t, n, r) => (mn(e, t, "write to private field"), r ? r.call(e, n) : t.set(e, n), n);
8
- var ut = (e, t, n, r) => ({
9
- set _(o) {
10
- X(e, t, o, n);
5
+ var dt = (t, e, r) => e in t ? ut(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
6
+ var g = (t, e, r) => dt(t, typeof e != "symbol" ? e + "" : e, r), ye = (t, e, r) => e.has(t) || be("Cannot " + r);
7
+ var l = (t, e, r) => (ye(t, e, "read from private field"), r ? r.call(t) : e.get(t)), b = (t, e, r) => e.has(t) ? be("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r), f = (t, e, r, s) => (ye(t, e, "write to private field"), s ? s.call(t, r) : e.set(t, r), r);
8
+ var X = (t, e, r, s) => ({
9
+ set _(n) {
10
+ f(t, e, n, r);
11
11
  },
12
12
  get _() {
13
- return w(e, t, r);
13
+ return l(t, e, s);
14
14
  }
15
15
  });
16
- import { c as In, H as kt, M as za, d as Ka, A as qa, b as Qa } from "./utils-C8S3st2k.js";
17
- import { e as Va, f as Ga, R as Wa, N as Je, L as $t, g as Ya, O as An, h as Xa, b as Za, u as Ft } from "./index-DFN92YJN.js";
18
- import { u as Ja } from "./state-CsuHT8ZO.js";
19
- import { E as kn, S as ye, a as eo, R as to } from "./SlotletProvider-DmqWiVFt.js";
16
+ import { c as Te, H as le, M as ht, d as ft, A as mt, b as gt } from "./utils-B2yoT99j.js";
17
+ import { e as pt, f as vt, R as xt, g as U, L as ce, h as bt, O as Ie, i as yt, b as jt, u as ue } from "./index-CRo94sKK.js";
18
+ import { u as wt } from "./state-CsuHT8ZO.js";
19
+ import { E as _e, S as k, a as Pt, R as Nt } from "./SlotletProvider-CPfsBw39.js";
20
20
  import { j as a } from "./jsx-runtime-B6kdoens.js";
21
- import { M as no, f as ro, c as $n, p as Fn, A as ao, d as rt, j as oo, b as I, k as so, F as io, D as lo, C as co, P as qe, i as Lt, q as uo, s as Ln, R as fo, S as ho, t as po, h as mo, r as Bn, m as go, a as gt, u as Hn, n as vt, V as Un, B as Nt } from "./index-Ch8VO_uX.js";
22
- import { a as F, c as zn, b as vo, T as wo, d as yo, V as xo, u as Bt, e as bo, C as So } from "./Markdown-Y__eLG0x.js";
23
- import * as h from "react";
24
- import p, { StrictMode as Kn, createContext as qn, Component as Co, createElement as gn, isValidElement as Mo, useState as Ie, useMemo as mt, useLayoutEffect as Ro, useEffect as Ce, useCallback as Qn, Suspense as Vn, memo as Gn, useContext as Eo, Fragment as Do, useRef as Ht, forwardRef as Po } from "react";
25
- import { a as Ut } from "./index-DJqnphbT.js";
26
- import { B as jo } from "./router-BsfSoK2j.js";
27
- import { a as Tt, R as No, T as To, C as _o } from "./index-bYAqbdYl.js";
28
- import { C as Oo } from "./ClientOnly-CVN6leDu.js";
29
- import { S as Wn, f as Yn, Q as Io, n as se, m as vn, g as wn, i as be, j as Ao, k as ko, l as $o, o as Fo, p as yn, r as xn, q as Lo, h as bn, t as Sn, v as Bo, u as Ae, b as Ho, Z as Uo, w as zo, c as Xn, x as Ko } from "./ZudokuContext-MRoel6bS.js";
30
- import { j as wt } from "./joinPath-B7kNnUX4.js";
31
- import { ChevronRightIcon as Zn, CheckIcon as qo, DotIcon as Qo, CircleXIcon as Vo, SearchIcon as Go, MenuIcon as Wo, MoonStarIcon as Yo, SunIcon as Xo, ExternalLinkIcon as Zo, PanelLeftIcon as Jo } from "lucide-react";
32
- import { c as Jn, P as bt, R as es, I as ts, O as ns, C as rs, T as as, a as os, b as ss, D as is, d as ls, e as cs, S as Mt } from "./SidebarBadge-C0iWtji9.js";
33
- import { S as us } from "./Spinner-3cQDBVGr.js";
34
- function ds({ error: e }) {
35
- return /* @__PURE__ */ a.jsx(kn, { error: e });
36
- }
37
- var at = {};
38
- const fs = /* @__PURE__ */ Ut(jo), hs = /* @__PURE__ */ Ut(Va), ps = /* @__PURE__ */ Ut(Ga);
39
- Object.defineProperty(at, "__esModule", { value: !0 });
40
- var ms = p, we = fs, zt = hs, Se = ps;
41
- function gs(e) {
42
- if (e && e.__esModule) return e;
43
- var t = /* @__PURE__ */ Object.create(null);
44
- return e && Object.keys(e).forEach(function(n) {
45
- if (n !== "default") {
46
- var r = Object.getOwnPropertyDescriptor(e, n);
47
- Object.defineProperty(t, n, r.get ? r : {
21
+ import { Button as ne } from "./ui/Button.js";
22
+ import { Callout as St } from "./ui/Callout.js";
23
+ import Ct, { StrictMode as Fe, createContext as Qe, Component as Et, createElement as je, isValidElement as kt, useState as Q, useCallback as Le, useEffect as F, Suspense as Be, memo as He, useMemo as te, useContext as Mt, Fragment as Dt, useRef as de, forwardRef as At } from "react";
24
+ import { a as he } from "./_commonjsHelpers-BkfeUUK-.js";
25
+ import { B as Ot } from "./router-BsfSoK2j.js";
26
+ import { a as ie } from "./StaggeredRender-DDHSzQKE.js";
27
+ import { C as Rt } from "./ClientOnly-CVN6leDu.js";
28
+ import { S as qe, g as ze, Q as Tt, n as v, m as we, i as Pe, j as D, k as It, l as _t, o as Ft, p as Qt, q as Ne, r as Se, t as Lt, h as Ce, v as Ee, w as Bt, u as L, e as Ht, Z as qt, x as zt, f as Ke, y as Kt } from "./ZudokuContext-D1D8Anlj.js";
29
+ import { j as G } from "./joinPath-B7kNnUX4.js";
30
+ import { M as $t, u as ee } from "./hook-JSRuxV1P.js";
31
+ import { a as Ut, T as Vt, b as Wt, V as Yt, u as fe } from "./Markdown-1BO9EA_X.js";
32
+ import { CircleXIcon as Xt, SearchIcon as Zt, MenuIcon as Jt, MoonStarIcon as Gt, SunIcon as er, ChevronRightIcon as tr, ExternalLinkIcon as rr, PanelLeftIcon as ar } from "lucide-react";
33
+ import { DropdownMenu as sr, DropdownMenuTrigger as nr, DropdownMenuContent as ir, DropdownMenuLabel as or, DropdownMenuSeparator as lr, DropdownMenuSub as cr, DropdownMenuSubTrigger as ur, DropdownMenuPortal as dr, DropdownMenuSubContent as hr, DropdownMenuItem as fr } from "./ui/DropdownMenu.js";
34
+ import { c as M } from "./cn-BmFQLtkS.js";
35
+ import { VisuallyHidden as $e } from "@radix-ui/react-visually-hidden";
36
+ import { a as Ue, c as mr } from "./index-BuAyrJe3.js";
37
+ import { Drawer as Ve, DrawerTrigger as We, DrawerContent as Ye, DrawerTitle as Xe, DrawerClose as gr } from "./ui/Drawer.js";
38
+ import { S as re, a as pr } from "./Spinner-C6zroowC.js";
39
+ import * as ae from "@radix-ui/react-collapsible";
40
+ function vr({ error: t }) {
41
+ return /* @__PURE__ */ a.jsx(_e, { error: t });
42
+ }
43
+ var W = {};
44
+ const xr = /* @__PURE__ */ he(Ot), br = /* @__PURE__ */ he(pt), yr = /* @__PURE__ */ he(vt);
45
+ Object.defineProperty(W, "__esModule", { value: !0 });
46
+ var jr = Ct, E = xr, me = br, A = yr;
47
+ function wr(t) {
48
+ if (t && t.__esModule) return t;
49
+ var e = /* @__PURE__ */ Object.create(null);
50
+ return t && Object.keys(t).forEach(function(r) {
51
+ if (r !== "default") {
52
+ var s = Object.getOwnPropertyDescriptor(t, r);
53
+ Object.defineProperty(e, r, s.get ? s : {
48
54
  enumerable: !0,
49
55
  get: function() {
50
- return e[n];
56
+ return t[r];
51
57
  }
52
58
  });
53
59
  }
54
- }), t.default = e, Object.freeze(t);
60
+ }), e.default = t, Object.freeze(e);
55
61
  }
56
- var ge = /* @__PURE__ */ gs(ms);
57
- function vs({
58
- basename: e,
59
- children: t,
60
- location: n = "/",
61
- future: r
62
+ var S = /* @__PURE__ */ wr(jr);
63
+ function Pr({
64
+ basename: t,
65
+ children: e,
66
+ location: r = "/",
67
+ future: s
62
68
  }) {
63
- typeof n == "string" && (n = Se.parsePath(n));
64
- let o = we.Action.Pop, s = {
65
- pathname: n.pathname || "/",
66
- search: n.search || "",
67
- hash: n.hash || "",
68
- state: n.state != null ? n.state : null,
69
- key: n.key || "default"
70
- }, i = er();
71
- return /* @__PURE__ */ ge.createElement(Se.Router, {
72
- basename: e,
73
- children: t,
74
- location: s,
75
- navigationType: o,
69
+ typeof r == "string" && (r = A.parsePath(r));
70
+ let n = E.Action.Pop, o = {
71
+ pathname: r.pathname || "/",
72
+ search: r.search || "",
73
+ hash: r.hash || "",
74
+ state: r.state != null ? r.state : null,
75
+ key: r.key || "default"
76
+ }, i = Ze();
77
+ return /* @__PURE__ */ S.createElement(A.Router, {
78
+ basename: t,
79
+ children: e,
80
+ location: o,
81
+ navigationType: n,
76
82
  navigator: i,
77
- future: r,
83
+ future: s,
78
84
  static: !0
79
85
  });
80
86
  }
81
- function ws({
82
- context: e,
83
- router: t,
84
- hydrate: n = !0,
85
- nonce: r
87
+ function Nr({
88
+ context: t,
89
+ router: e,
90
+ hydrate: r = !0,
91
+ nonce: s
86
92
  }) {
87
- t && e || (process.env.NODE_ENV !== "production" ? we.UNSAFE_invariant(!1, "You must provide `router` and `context` to <StaticRouterProvider>") : we.UNSAFE_invariant(!1));
88
- let o = {
89
- router: t,
90
- navigator: er(),
93
+ e && t || (process.env.NODE_ENV !== "production" ? E.UNSAFE_invariant(!1, "You must provide `router` and `context` to <StaticRouterProvider>") : E.UNSAFE_invariant(!1));
94
+ let n = {
95
+ router: e,
96
+ navigator: Ze(),
91
97
  static: !0,
92
- staticContext: e,
93
- basename: e.basename || "/"
94
- }, s = /* @__PURE__ */ new Map(), i = "";
95
- if (n !== !1) {
98
+ staticContext: t,
99
+ basename: t.basename || "/"
100
+ }, o = /* @__PURE__ */ new Map(), i = "";
101
+ if (r !== !1) {
96
102
  let u = {
97
- loaderData: e.loaderData,
98
- actionData: e.actionData,
99
- errors: xs(e.errors)
103
+ loaderData: t.loaderData,
104
+ actionData: t.actionData,
105
+ errors: Cr(t.errors)
100
106
  };
101
- i = `window.__staticRouterHydrationData = JSON.parse(${Es(JSON.stringify(JSON.stringify(u)))});`;
107
+ i = `window.__staticRouterHydrationData = JSON.parse(${Or(JSON.stringify(JSON.stringify(u)))});`;
102
108
  }
103
109
  let {
104
- state: l
105
- } = o.router;
106
- return /* @__PURE__ */ ge.createElement(ge.Fragment, null, /* @__PURE__ */ ge.createElement(Se.UNSAFE_DataRouterContext.Provider, {
110
+ state: c
111
+ } = n.router;
112
+ return /* @__PURE__ */ S.createElement(S.Fragment, null, /* @__PURE__ */ S.createElement(A.UNSAFE_DataRouterContext.Provider, {
113
+ value: n
114
+ }, /* @__PURE__ */ S.createElement(A.UNSAFE_DataRouterStateContext.Provider, {
115
+ value: c
116
+ }, /* @__PURE__ */ S.createElement(A.UNSAFE_FetchersContext.Provider, {
107
117
  value: o
108
- }, /* @__PURE__ */ ge.createElement(Se.UNSAFE_DataRouterStateContext.Provider, {
109
- value: l
110
- }, /* @__PURE__ */ ge.createElement(Se.UNSAFE_FetchersContext.Provider, {
111
- value: s
112
- }, /* @__PURE__ */ ge.createElement(Se.UNSAFE_ViewTransitionContext.Provider, {
118
+ }, /* @__PURE__ */ S.createElement(A.UNSAFE_ViewTransitionContext.Provider, {
113
119
  value: {
114
120
  isTransitioning: !1
115
121
  }
116
- }, /* @__PURE__ */ ge.createElement(Se.Router, {
117
- basename: o.basename,
118
- location: l.location,
119
- navigationType: l.historyAction,
120
- navigator: o.navigator,
121
- static: o.static,
122
+ }, /* @__PURE__ */ S.createElement(A.Router, {
123
+ basename: n.basename,
124
+ location: c.location,
125
+ navigationType: c.historyAction,
126
+ navigator: n.navigator,
127
+ static: n.static,
122
128
  future: {
123
- v7_relativeSplatPath: t.future.v7_relativeSplatPath
129
+ v7_relativeSplatPath: e.future.v7_relativeSplatPath
124
130
  }
125
- }, /* @__PURE__ */ ge.createElement(ys, {
126
- routes: t.routes,
127
- future: t.future,
128
- state: l
129
- })))))), i ? /* @__PURE__ */ ge.createElement("script", {
131
+ }, /* @__PURE__ */ S.createElement(Sr, {
132
+ routes: e.routes,
133
+ future: e.future,
134
+ state: c
135
+ })))))), i ? /* @__PURE__ */ S.createElement("script", {
130
136
  suppressHydrationWarning: !0,
131
- nonce: r,
137
+ nonce: s,
132
138
  dangerouslySetInnerHTML: {
133
139
  __html: i
134
140
  }
135
141
  }) : null);
136
142
  }
137
- function ys({
138
- routes: e,
139
- future: t,
140
- state: n
143
+ function Sr({
144
+ routes: t,
145
+ future: e,
146
+ state: r
141
147
  }) {
142
- return zt.UNSAFE_useRoutesImpl(e, void 0, n, t);
143
- }
144
- function xs(e) {
145
- if (!e) return null;
146
- let t = Object.entries(e), n = {};
147
- for (let [r, o] of t)
148
- we.isRouteErrorResponse(o) ? n[r] = {
149
- ...o,
148
+ return me.UNSAFE_useRoutesImpl(t, void 0, r, e);
149
+ }
150
+ function Cr(t) {
151
+ if (!t) return null;
152
+ let e = Object.entries(t), r = {};
153
+ for (let [s, n] of e)
154
+ E.isRouteErrorResponse(n) ? r[s] = {
155
+ ...n,
150
156
  __type: "RouteErrorResponse"
151
- } : o instanceof Error ? n[r] = {
152
- message: o.message,
157
+ } : n instanceof Error ? r[s] = {
158
+ message: n.message,
153
159
  __type: "Error",
154
160
  // If this is a subclass (i.e., ReferenceError), send up the type so we
155
161
  // can re-create the same type during hydration.
156
- ...o.name !== "Error" ? {
157
- __subType: o.name
162
+ ...n.name !== "Error" ? {
163
+ __subType: n.name
158
164
  } : {}
159
- } : n[r] = o;
160
- return n;
165
+ } : r[s] = n;
166
+ return r;
161
167
  }
162
- function er() {
168
+ function Ze() {
163
169
  return {
164
- createHref: tr,
165
- encodeLocation: nr,
166
- push(e) {
167
- throw new Error(`You cannot use navigator.push() on the server because it is a stateless environment. This error was probably triggered when you did a \`navigate(${JSON.stringify(e)})\` somewhere in your app.`);
170
+ createHref: Je,
171
+ encodeLocation: Ge,
172
+ push(t) {
173
+ throw new Error(`You cannot use navigator.push() on the server because it is a stateless environment. This error was probably triggered when you did a \`navigate(${JSON.stringify(t)})\` somewhere in your app.`);
168
174
  },
169
- replace(e) {
170
- throw new Error(`You cannot use navigator.replace() on the server because it is a stateless environment. This error was probably triggered when you did a \`navigate(${JSON.stringify(e)}, { replace: true })\` somewhere in your app.`);
175
+ replace(t) {
176
+ throw new Error(`You cannot use navigator.replace() on the server because it is a stateless environment. This error was probably triggered when you did a \`navigate(${JSON.stringify(t)}, { replace: true })\` somewhere in your app.`);
171
177
  },
172
- go(e) {
173
- throw new Error(`You cannot use navigator.go() on the server because it is a stateless environment. This error was probably triggered when you did a \`navigate(${e})\` somewhere in your app.`);
178
+ go(t) {
179
+ throw new Error(`You cannot use navigator.go() on the server because it is a stateless environment. This error was probably triggered when you did a \`navigate(${t})\` somewhere in your app.`);
174
180
  },
175
181
  back() {
176
182
  throw new Error("You cannot use navigator.back() on the server because it is a stateless environment.");
@@ -180,45 +186,45 @@ function er() {
180
186
  }
181
187
  };
182
188
  }
183
- function bs(e, t) {
184
- return we.createStaticHandler(e, {
185
- ...t,
186
- mapRouteProperties: zt.UNSAFE_mapRouteProperties
189
+ function Er(t, e) {
190
+ return E.createStaticHandler(t, {
191
+ ...e,
192
+ mapRouteProperties: me.UNSAFE_mapRouteProperties
187
193
  });
188
194
  }
189
- function Ss(e, t, n = {}) {
190
- let r = {}, o = we.UNSAFE_convertRoutesToDataRoutes(e, zt.UNSAFE_mapRouteProperties, void 0, r), s = t.matches.map((l) => {
191
- let u = r[l.route.id] || l.route;
195
+ function kr(t, e, r = {}) {
196
+ let s = {}, n = E.UNSAFE_convertRoutesToDataRoutes(t, me.UNSAFE_mapRouteProperties, void 0, s), o = e.matches.map((c) => {
197
+ let u = s[c.route.id] || c.route;
192
198
  return {
193
- ...l,
199
+ ...c,
194
200
  route: u
195
201
  };
196
- }), i = (l) => `You cannot use router.${l}() on the server because it is a stateless environment`;
202
+ }), i = (c) => `You cannot use router.${c}() on the server because it is a stateless environment`;
197
203
  return {
198
204
  get basename() {
199
- return t.basename;
205
+ return e.basename;
200
206
  },
201
207
  get future() {
202
- var l, u;
208
+ var c, u;
203
209
  return {
204
210
  v7_fetcherPersist: !1,
205
211
  v7_normalizeFormMethod: !1,
206
- v7_partialHydration: ((l = n.future) == null ? void 0 : l.v7_partialHydration) === !0,
212
+ v7_partialHydration: ((c = r.future) == null ? void 0 : c.v7_partialHydration) === !0,
207
213
  v7_prependBasename: !1,
208
- v7_relativeSplatPath: ((u = n.future) == null ? void 0 : u.v7_relativeSplatPath) === !0,
214
+ v7_relativeSplatPath: ((u = r.future) == null ? void 0 : u.v7_relativeSplatPath) === !0,
209
215
  v7_skipActionErrorRevalidation: !1
210
216
  };
211
217
  },
212
218
  get state() {
213
219
  return {
214
- historyAction: we.Action.Pop,
215
- location: t.location,
216
- matches: s,
217
- loaderData: t.loaderData,
218
- actionData: t.actionData,
219
- errors: t.errors,
220
+ historyAction: E.Action.Pop,
221
+ location: e.location,
222
+ matches: o,
223
+ loaderData: e.loaderData,
224
+ actionData: e.actionData,
225
+ errors: e.errors,
220
226
  initialized: !0,
221
- navigation: we.IDLE_NAVIGATION,
227
+ navigation: E.IDLE_NAVIGATION,
222
228
  restoreScrollPosition: null,
223
229
  preventScrollReset: !1,
224
230
  revalidation: "idle",
@@ -227,7 +233,7 @@ function Ss(e, t, n = {}) {
227
233
  };
228
234
  },
229
235
  get routes() {
230
- return o;
236
+ return n;
231
237
  },
232
238
  get window() {
233
239
  },
@@ -249,10 +255,10 @@ function Ss(e, t, n = {}) {
249
255
  revalidate() {
250
256
  throw i("revalidate");
251
257
  },
252
- createHref: tr,
253
- encodeLocation: nr,
258
+ createHref: Je,
259
+ encodeLocation: Ge,
254
260
  getFetcher() {
255
- return we.IDLE_FETCHER;
261
+ return E.IDLE_FETCHER;
256
262
  },
257
263
  deleteFetcher() {
258
264
  throw i("deleteFetcher");
@@ -261,7 +267,7 @@ function Ss(e, t, n = {}) {
261
267
  throw i("dispose");
262
268
  },
263
269
  getBlocker() {
264
- return we.IDLE_BLOCKER;
270
+ return E.IDLE_BLOCKER;
265
271
  },
266
272
  deleteBlocker() {
267
273
  throw i("deleteBlocker");
@@ -276,2730 +282,726 @@ function Ss(e, t, n = {}) {
276
282
  }
277
283
  };
278
284
  }
279
- function tr(e) {
280
- return typeof e == "string" ? e : Se.createPath(e);
285
+ function Je(t) {
286
+ return typeof t == "string" ? t : A.createPath(t);
281
287
  }
282
- function nr(e) {
283
- let t = typeof e == "string" ? e : Se.createPath(e);
284
- t = t.replace(/ $/, "%20");
285
- let n = Cs.test(t) ? new URL(t) : new URL(t, "http://localhost");
288
+ function Ge(t) {
289
+ let e = typeof t == "string" ? t : A.createPath(t);
290
+ e = e.replace(/ $/, "%20");
291
+ let r = Mr.test(e) ? new URL(e) : new URL(e, "http://localhost");
286
292
  return {
287
- pathname: n.pathname,
288
- search: n.search,
289
- hash: n.hash
293
+ pathname: r.pathname,
294
+ search: r.search,
295
+ hash: r.hash
290
296
  };
291
297
  }
292
- const Cs = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, Ms = {
298
+ const Mr = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, Dr = {
293
299
  "&": "\\u0026",
294
300
  ">": "\\u003e",
295
301
  "<": "\\u003c",
296
302
  "\u2028": "\\u2028",
297
303
  "\u2029": "\\u2029"
298
- }, Rs = /[&><\u2028\u2029]/g;
299
- function Es(e) {
300
- return e.replace(Rs, (t) => Ms[t]);
301
- }
302
- at.StaticRouter = vs;
303
- var Ds = at.StaticRouterProvider = ws;
304
- at.createStaticHandler = bs;
305
- at.createStaticRouter = Ss;
306
- const Ps = ({
307
- router: e,
308
- hydrate: t = !1
309
- }) => /* @__PURE__ */ a.jsx(Kn, { children: /* @__PURE__ */ a.jsx(In, { children: /* @__PURE__ */ a.jsx(Tt.Provider, { value: { stagger: !t }, children: /* @__PURE__ */ a.jsx(Wa, { router: e }) }) }) }), js = ({
310
- router: e,
311
- context: t,
312
- helmetContext: n
313
- }) => /* @__PURE__ */ a.jsx(Kn, { children: /* @__PURE__ */ a.jsx(In, { context: n, children: /* @__PURE__ */ a.jsx(Ds, { router: e, context: t }) }) });
314
- var ve, Tn, Ns = (Tn = class extends Wn {
315
- constructor(t = {}) {
304
+ }, Ar = /[&><\u2028\u2029]/g;
305
+ function Or(t) {
306
+ return t.replace(Ar, (e) => Dr[e]);
307
+ }
308
+ W.StaticRouter = Pr;
309
+ var Rr = W.StaticRouterProvider = Nr;
310
+ W.createStaticHandler = Er;
311
+ W.createStaticRouter = kr;
312
+ const Tr = ({
313
+ router: t,
314
+ hydrate: e = !1
315
+ }) => /* @__PURE__ */ a.jsx(Fe, { children: /* @__PURE__ */ a.jsx(Te, { children: /* @__PURE__ */ a.jsx(ie.Provider, { value: { stagger: !e }, children: /* @__PURE__ */ a.jsx(xt, { router: t }) }) }) }), Ir = ({
316
+ router: t,
317
+ context: e,
318
+ helmetContext: r
319
+ }) => /* @__PURE__ */ a.jsx(Fe, { children: /* @__PURE__ */ a.jsx(Te, { context: r, children: /* @__PURE__ */ a.jsx(Rr, { router: t, context: e }) }) });
320
+ var C, Ae, _r = (Ae = class extends qe {
321
+ constructor(e = {}) {
316
322
  super();
317
- ce(this, ve);
318
- this.config = t, X(this, ve, /* @__PURE__ */ new Map());
323
+ b(this, C);
324
+ this.config = e, f(this, C, /* @__PURE__ */ new Map());
319
325
  }
320
- build(t, n, r) {
321
- const o = n.queryKey, s = n.queryHash ?? Yn(o, n);
322
- let i = this.get(s);
323
- return i || (i = new Io({
326
+ build(e, r, s) {
327
+ const n = r.queryKey, o = r.queryHash ?? ze(n, r);
328
+ let i = this.get(o);
329
+ return i || (i = new Tt({
324
330
  cache: this,
325
- queryKey: o,
326
- queryHash: s,
327
- options: t.defaultQueryOptions(n),
328
- state: r,
329
- defaultOptions: t.getQueryDefaults(o)
331
+ queryKey: n,
332
+ queryHash: o,
333
+ options: e.defaultQueryOptions(r),
334
+ state: s,
335
+ defaultOptions: e.getQueryDefaults(n)
330
336
  }), this.add(i)), i;
331
337
  }
332
- add(t) {
333
- w(this, ve).has(t.queryHash) || (w(this, ve).set(t.queryHash, t), this.notify({
338
+ add(e) {
339
+ l(this, C).has(e.queryHash) || (l(this, C).set(e.queryHash, e), this.notify({
334
340
  type: "added",
335
- query: t
341
+ query: e
336
342
  }));
337
343
  }
338
- remove(t) {
339
- const n = w(this, ve).get(t.queryHash);
340
- n && (t.destroy(), n === t && w(this, ve).delete(t.queryHash), this.notify({ type: "removed", query: t }));
344
+ remove(e) {
345
+ const r = l(this, C).get(e.queryHash);
346
+ r && (e.destroy(), r === e && l(this, C).delete(e.queryHash), this.notify({ type: "removed", query: e }));
341
347
  }
342
348
  clear() {
343
- se.batch(() => {
344
- this.getAll().forEach((t) => {
345
- this.remove(t);
349
+ v.batch(() => {
350
+ this.getAll().forEach((e) => {
351
+ this.remove(e);
346
352
  });
347
353
  });
348
354
  }
349
- get(t) {
350
- return w(this, ve).get(t);
355
+ get(e) {
356
+ return l(this, C).get(e);
351
357
  }
352
358
  getAll() {
353
- return [...w(this, ve).values()];
359
+ return [...l(this, C).values()];
354
360
  }
355
- find(t) {
356
- const n = { exact: !0, ...t };
361
+ find(e) {
362
+ const r = { exact: !0, ...e };
357
363
  return this.getAll().find(
358
- (r) => vn(n, r)
364
+ (s) => we(r, s)
359
365
  );
360
366
  }
361
- findAll(t = {}) {
362
- const n = this.getAll();
363
- return Object.keys(t).length > 0 ? n.filter((r) => vn(t, r)) : n;
367
+ findAll(e = {}) {
368
+ const r = this.getAll();
369
+ return Object.keys(e).length > 0 ? r.filter((s) => we(e, s)) : r;
364
370
  }
365
- notify(t) {
366
- se.batch(() => {
367
- this.listeners.forEach((n) => {
368
- n(t);
371
+ notify(e) {
372
+ v.batch(() => {
373
+ this.listeners.forEach((r) => {
374
+ r(e);
369
375
  });
370
376
  });
371
377
  }
372
378
  onFocus() {
373
- se.batch(() => {
374
- this.getAll().forEach((t) => {
375
- t.onFocus();
379
+ v.batch(() => {
380
+ this.getAll().forEach((e) => {
381
+ e.onFocus();
376
382
  });
377
383
  });
378
384
  }
379
385
  onOnline() {
380
- se.batch(() => {
381
- this.getAll().forEach((t) => {
382
- t.onOnline();
386
+ v.batch(() => {
387
+ this.getAll().forEach((e) => {
388
+ e.onOnline();
383
389
  });
384
390
  });
385
391
  }
386
- }, ve = new WeakMap(), Tn), oe, nt, _n, Ts = (_n = class extends Wn {
387
- constructor(t = {}) {
392
+ }, C = new WeakMap(), Ae), p, V, Oe, Fr = (Oe = class extends qe {
393
+ constructor(e = {}) {
388
394
  super();
389
- ce(this, oe);
390
- ce(this, nt);
391
- this.config = t, X(this, oe, /* @__PURE__ */ new Map()), X(this, nt, Date.now());
395
+ b(this, p);
396
+ b(this, V);
397
+ this.config = e, f(this, p, /* @__PURE__ */ new Map()), f(this, V, Date.now());
392
398
  }
393
- build(t, n, r) {
394
- const o = new no({
399
+ build(e, r, s) {
400
+ const n = new $t({
395
401
  mutationCache: this,
396
- mutationId: ++ut(this, nt)._,
397
- options: t.defaultMutationOptions(n),
398
- state: r
402
+ mutationId: ++X(this, V)._,
403
+ options: e.defaultMutationOptions(r),
404
+ state: s
399
405
  });
400
- return this.add(o), o;
401
- }
402
- add(t) {
403
- const n = dt(t), r = w(this, oe).get(n) ?? [];
404
- r.push(t), w(this, oe).set(n, r), this.notify({ type: "added", mutation: t });
405
- }
406
- remove(t) {
407
- var r;
408
- const n = dt(t);
409
- if (w(this, oe).has(n)) {
410
- const o = (r = w(this, oe).get(n)) == null ? void 0 : r.filter((s) => s !== t);
411
- o && (o.length === 0 ? w(this, oe).delete(n) : w(this, oe).set(n, o));
406
+ return this.add(n), n;
407
+ }
408
+ add(e) {
409
+ const r = Z(e), s = l(this, p).get(r) ?? [];
410
+ s.push(e), l(this, p).set(r, s), this.notify({ type: "added", mutation: e });
411
+ }
412
+ remove(e) {
413
+ var s;
414
+ const r = Z(e);
415
+ if (l(this, p).has(r)) {
416
+ const n = (s = l(this, p).get(r)) == null ? void 0 : s.filter((o) => o !== e);
417
+ n && (n.length === 0 ? l(this, p).delete(r) : l(this, p).set(r, n));
412
418
  }
413
- this.notify({ type: "removed", mutation: t });
419
+ this.notify({ type: "removed", mutation: e });
414
420
  }
415
- canRun(t) {
416
- var r;
417
- const n = (r = w(this, oe).get(dt(t))) == null ? void 0 : r.find((o) => o.state.status === "pending");
418
- return !n || n === t;
421
+ canRun(e) {
422
+ var s;
423
+ const r = (s = l(this, p).get(Z(e))) == null ? void 0 : s.find((n) => n.state.status === "pending");
424
+ return !r || r === e;
419
425
  }
420
- runNext(t) {
421
- var r;
422
- const n = (r = w(this, oe).get(dt(t))) == null ? void 0 : r.find((o) => o !== t && o.state.isPaused);
423
- return (n == null ? void 0 : n.continue()) ?? Promise.resolve();
426
+ runNext(e) {
427
+ var s;
428
+ const r = (s = l(this, p).get(Z(e))) == null ? void 0 : s.find((n) => n !== e && n.state.isPaused);
429
+ return (r == null ? void 0 : r.continue()) ?? Promise.resolve();
424
430
  }
425
431
  clear() {
426
- se.batch(() => {
427
- this.getAll().forEach((t) => {
428
- this.remove(t);
432
+ v.batch(() => {
433
+ this.getAll().forEach((e) => {
434
+ this.remove(e);
429
435
  });
430
436
  });
431
437
  }
432
438
  getAll() {
433
- return [...w(this, oe).values()].flat();
439
+ return [...l(this, p).values()].flat();
434
440
  }
435
- find(t) {
436
- const n = { exact: !0, ...t };
441
+ find(e) {
442
+ const r = { exact: !0, ...e };
437
443
  return this.getAll().find(
438
- (r) => wn(n, r)
444
+ (s) => Pe(r, s)
439
445
  );
440
446
  }
441
- findAll(t = {}) {
442
- return this.getAll().filter((n) => wn(t, n));
447
+ findAll(e = {}) {
448
+ return this.getAll().filter((r) => Pe(e, r));
443
449
  }
444
- notify(t) {
445
- se.batch(() => {
446
- this.listeners.forEach((n) => {
447
- n(t);
450
+ notify(e) {
451
+ v.batch(() => {
452
+ this.listeners.forEach((r) => {
453
+ r(e);
448
454
  });
449
455
  });
450
456
  }
451
457
  resumePausedMutations() {
452
- const t = this.getAll().filter((n) => n.state.isPaused);
453
- return se.batch(
458
+ const e = this.getAll().filter((r) => r.state.isPaused);
459
+ return v.batch(
454
460
  () => Promise.all(
455
- t.map((n) => n.continue().catch(be))
461
+ e.map((r) => r.continue().catch(D))
456
462
  )
457
463
  );
458
464
  }
459
- }, oe = new WeakMap(), nt = new WeakMap(), _n);
460
- function dt(e) {
461
- var t;
462
- return ((t = e.options.scope) == null ? void 0 : t.id) ?? String(e.mutationId);
465
+ }, p = new WeakMap(), V = new WeakMap(), Oe);
466
+ function Z(t) {
467
+ var e;
468
+ return ((e = t.options.scope) == null ? void 0 : e.id) ?? String(t.mutationId);
463
469
  }
464
- function Cn(e) {
470
+ function ke(t) {
465
471
  return {
466
- onFetch: (t, n) => {
467
- var f, c, d, R, C;
468
- const r = t.options, o = (d = (c = (f = t.fetchOptions) == null ? void 0 : f.meta) == null ? void 0 : c.fetchMore) == null ? void 0 : d.direction, s = ((R = t.state.data) == null ? void 0 : R.pages) || [], i = ((C = t.state.data) == null ? void 0 : C.pageParams) || [];
469
- let l = { pages: [], pageParams: [] }, u = 0;
470
- const m = async () => {
471
- let g = !1;
472
- const T = (P) => {
473
- Object.defineProperty(P, "signal", {
472
+ onFetch: (e, r) => {
473
+ var x, y, m, P, N;
474
+ const s = e.options, n = (m = (y = (x = e.fetchOptions) == null ? void 0 : x.meta) == null ? void 0 : y.fetchMore) == null ? void 0 : m.direction, o = ((P = e.state.data) == null ? void 0 : P.pages) || [], i = ((N = e.state.data) == null ? void 0 : N.pageParams) || [];
475
+ let c = { pages: [], pageParams: [] }, u = 0;
476
+ const w = async () => {
477
+ let d = !1;
478
+ const O = (j) => {
479
+ Object.defineProperty(j, "signal", {
474
480
  enumerable: !0,
475
- get: () => (t.signal.aborted ? g = !0 : t.signal.addEventListener("abort", () => {
476
- g = !0;
477
- }), t.signal)
481
+ get: () => (e.signal.aborted ? d = !0 : e.signal.addEventListener("abort", () => {
482
+ d = !0;
483
+ }), e.signal)
478
484
  });
479
- }, M = Ao(t.options, t.fetchOptions), A = async (P, v, z) => {
480
- if (g)
485
+ }, lt = It(e.options, e.fetchOptions), pe = async (j, R, K) => {
486
+ if (d)
481
487
  return Promise.reject();
482
- if (v == null && P.pages.length)
483
- return Promise.resolve(P);
484
- const J = {
485
- queryKey: t.queryKey,
486
- pageParam: v,
487
- direction: z ? "backward" : "forward",
488
- meta: t.options.meta
488
+ if (R == null && j.pages.length)
489
+ return Promise.resolve(j);
490
+ const Y = {
491
+ queryKey: e.queryKey,
492
+ pageParam: R,
493
+ direction: K ? "backward" : "forward",
494
+ meta: e.options.meta
489
495
  };
490
- T(J);
491
- const b = await M(
492
- J
493
- ), { maxPages: j } = t.options, D = z ? ko : $o;
496
+ O(Y);
497
+ const ct = await lt(
498
+ Y
499
+ ), { maxPages: ve } = e.options, xe = K ? _t : Ft;
494
500
  return {
495
- pages: D(P.pages, b, j),
496
- pageParams: D(P.pageParams, v, j)
501
+ pages: xe(j.pages, ct, ve),
502
+ pageParams: xe(j.pageParams, R, ve)
497
503
  };
498
504
  };
499
- if (o && s.length) {
500
- const P = o === "backward", v = P ? _s : Mn, z = {
501
- pages: s,
505
+ if (n && o.length) {
506
+ const j = n === "backward", R = j ? Qr : Me, K = {
507
+ pages: o,
502
508
  pageParams: i
503
- }, J = v(r, z);
504
- l = await A(z, J, P);
509
+ }, Y = R(s, K);
510
+ c = await pe(K, Y, j);
505
511
  } else {
506
- const P = e ?? s.length;
512
+ const j = t ?? o.length;
507
513
  do {
508
- const v = u === 0 ? i[0] ?? r.initialPageParam : Mn(r, l);
509
- if (u > 0 && v == null)
514
+ const R = u === 0 ? i[0] ?? s.initialPageParam : Me(s, c);
515
+ if (u > 0 && R == null)
510
516
  break;
511
- l = await A(l, v), u++;
512
- } while (u < P);
517
+ c = await pe(c, R), u++;
518
+ } while (u < j);
513
519
  }
514
- return l;
520
+ return c;
515
521
  };
516
- t.options.persister ? t.fetchFn = () => {
517
- var g, T;
518
- return (T = (g = t.options).persister) == null ? void 0 : T.call(
519
- g,
520
- m,
522
+ e.options.persister ? e.fetchFn = () => {
523
+ var d, O;
524
+ return (O = (d = e.options).persister) == null ? void 0 : O.call(
525
+ d,
526
+ w,
521
527
  {
522
- queryKey: t.queryKey,
523
- meta: t.options.meta,
524
- signal: t.signal
528
+ queryKey: e.queryKey,
529
+ meta: e.options.meta,
530
+ signal: e.signal
525
531
  },
526
- n
532
+ r
527
533
  );
528
- } : t.fetchFn = m;
534
+ } : e.fetchFn = w;
529
535
  }
530
536
  };
531
537
  }
532
- function Mn(e, { pages: t, pageParams: n }) {
533
- const r = t.length - 1;
534
- return t.length > 0 ? e.getNextPageParam(
535
- t[r],
536
- t,
537
- n[r],
538
- n
538
+ function Me(t, { pages: e, pageParams: r }) {
539
+ const s = e.length - 1;
540
+ return e.length > 0 ? t.getNextPageParam(
541
+ e[s],
542
+ e,
543
+ r[s],
544
+ r
539
545
  ) : void 0;
540
546
  }
541
- function _s(e, { pages: t, pageParams: n }) {
542
- var r;
543
- return t.length > 0 ? (r = e.getPreviousPageParam) == null ? void 0 : r.call(e, t[0], t, n[0], n) : void 0;
547
+ function Qr(t, { pages: e, pageParams: r }) {
548
+ var s;
549
+ return e.length > 0 ? (s = t.getPreviousPageParam) == null ? void 0 : s.call(t, e[0], e, r[0], r) : void 0;
544
550
  }
545
- var $, Pe, je, He, Ue, Ne, ze, Ke, On, Os = (On = class {
546
- constructor(e = {}) {
547
- ce(this, $);
548
- ce(this, Pe);
549
- ce(this, je);
550
- ce(this, He);
551
- ce(this, Ue);
552
- ce(this, Ne);
553
- ce(this, ze);
554
- ce(this, Ke);
555
- X(this, $, e.queryCache || new Ns()), X(this, Pe, e.mutationCache || new Ts()), X(this, je, e.defaultOptions || {}), X(this, He, /* @__PURE__ */ new Map()), X(this, Ue, /* @__PURE__ */ new Map()), X(this, Ne, 0);
551
+ var h, T, I, B, H, _, q, z, Re, Lr = (Re = class {
552
+ constructor(t = {}) {
553
+ b(this, h);
554
+ b(this, T);
555
+ b(this, I);
556
+ b(this, B);
557
+ b(this, H);
558
+ b(this, _);
559
+ b(this, q);
560
+ b(this, z);
561
+ f(this, h, t.queryCache || new _r()), f(this, T, t.mutationCache || new Fr()), f(this, I, t.defaultOptions || {}), f(this, B, /* @__PURE__ */ new Map()), f(this, H, /* @__PURE__ */ new Map()), f(this, _, 0);
556
562
  }
557
563
  mount() {
558
- ut(this, Ne)._++, w(this, Ne) === 1 && (X(this, ze, Fo.subscribe(async (e) => {
559
- e && (await this.resumePausedMutations(), w(this, $).onFocus());
560
- })), X(this, Ke, yn.subscribe(async (e) => {
561
- e && (await this.resumePausedMutations(), w(this, $).onOnline());
564
+ X(this, _)._++, l(this, _) === 1 && (f(this, q, Qt.subscribe(async (t) => {
565
+ t && (await this.resumePausedMutations(), l(this, h).onFocus());
566
+ })), f(this, z, Ne.subscribe(async (t) => {
567
+ t && (await this.resumePausedMutations(), l(this, h).onOnline());
562
568
  })));
563
569
  }
564
570
  unmount() {
565
- var e, t;
566
- ut(this, Ne)._--, w(this, Ne) === 0 && ((e = w(this, ze)) == null || e.call(this), X(this, ze, void 0), (t = w(this, Ke)) == null || t.call(this), X(this, Ke, void 0));
571
+ var t, e;
572
+ X(this, _)._--, l(this, _) === 0 && ((t = l(this, q)) == null || t.call(this), f(this, q, void 0), (e = l(this, z)) == null || e.call(this), f(this, z, void 0));
567
573
  }
568
- isFetching(e) {
569
- return w(this, $).findAll({ ...e, fetchStatus: "fetching" }).length;
574
+ isFetching(t) {
575
+ return l(this, h).findAll({ ...t, fetchStatus: "fetching" }).length;
570
576
  }
571
- isMutating(e) {
572
- return w(this, Pe).findAll({ ...e, status: "pending" }).length;
577
+ isMutating(t) {
578
+ return l(this, T).findAll({ ...t, status: "pending" }).length;
573
579
  }
574
- getQueryData(e) {
575
- var n;
576
- const t = this.defaultQueryOptions({ queryKey: e });
577
- return (n = w(this, $).get(t.queryHash)) == null ? void 0 : n.state.data;
580
+ getQueryData(t) {
581
+ var r;
582
+ const e = this.defaultQueryOptions({ queryKey: t });
583
+ return (r = l(this, h).get(e.queryHash)) == null ? void 0 : r.state.data;
578
584
  }
579
- ensureQueryData(e) {
580
- const t = this.getQueryData(e.queryKey);
581
- if (t === void 0)
582
- return this.fetchQuery(e);
585
+ ensureQueryData(t) {
586
+ const e = this.getQueryData(t.queryKey);
587
+ if (e === void 0)
588
+ return this.fetchQuery(t);
583
589
  {
584
- const n = this.defaultQueryOptions(e), r = w(this, $).build(this, n);
585
- return e.revalidateIfStale && r.isStaleByTime(xn(n.staleTime, r)) && this.prefetchQuery(n), Promise.resolve(t);
590
+ const r = this.defaultQueryOptions(t), s = l(this, h).build(this, r);
591
+ return t.revalidateIfStale && s.isStaleByTime(Se(r.staleTime, s)) && this.prefetchQuery(r), Promise.resolve(e);
586
592
  }
587
593
  }
588
- getQueriesData(e) {
589
- return w(this, $).findAll(e).map(({ queryKey: t, state: n }) => {
590
- const r = n.data;
591
- return [t, r];
594
+ getQueriesData(t) {
595
+ return l(this, h).findAll(t).map(({ queryKey: e, state: r }) => {
596
+ const s = r.data;
597
+ return [e, s];
592
598
  });
593
599
  }
594
- setQueryData(e, t, n) {
595
- const r = this.defaultQueryOptions({ queryKey: e }), o = w(this, $).get(
596
- r.queryHash
597
- ), s = o == null ? void 0 : o.state.data, i = Lo(t, s);
600
+ setQueryData(t, e, r) {
601
+ const s = this.defaultQueryOptions({ queryKey: t }), n = l(this, h).get(
602
+ s.queryHash
603
+ ), o = n == null ? void 0 : n.state.data, i = Lt(e, o);
598
604
  if (i !== void 0)
599
- return w(this, $).build(this, r).setData(i, { ...n, manual: !0 });
605
+ return l(this, h).build(this, s).setData(i, { ...r, manual: !0 });
600
606
  }
601
- setQueriesData(e, t, n) {
602
- return se.batch(
603
- () => w(this, $).findAll(e).map(({ queryKey: r }) => [
604
- r,
605
- this.setQueryData(r, t, n)
607
+ setQueriesData(t, e, r) {
608
+ return v.batch(
609
+ () => l(this, h).findAll(t).map(({ queryKey: s }) => [
610
+ s,
611
+ this.setQueryData(s, e, r)
606
612
  ])
607
613
  );
608
614
  }
609
- getQueryState(e) {
610
- var n;
611
- const t = this.defaultQueryOptions({ queryKey: e });
612
- return (n = w(this, $).get(t.queryHash)) == null ? void 0 : n.state;
613
- }
614
- removeQueries(e) {
615
- const t = w(this, $);
616
- se.batch(() => {
617
- t.findAll(e).forEach((n) => {
618
- t.remove(n);
615
+ getQueryState(t) {
616
+ var r;
617
+ const e = this.defaultQueryOptions({ queryKey: t });
618
+ return (r = l(this, h).get(e.queryHash)) == null ? void 0 : r.state;
619
+ }
620
+ removeQueries(t) {
621
+ const e = l(this, h);
622
+ v.batch(() => {
623
+ e.findAll(t).forEach((r) => {
624
+ e.remove(r);
619
625
  });
620
626
  });
621
627
  }
622
- resetQueries(e, t) {
623
- const n = w(this, $), r = {
628
+ resetQueries(t, e) {
629
+ const r = l(this, h), s = {
624
630
  type: "active",
625
- ...e
631
+ ...t
626
632
  };
627
- return se.batch(() => (n.findAll(e).forEach((o) => {
628
- o.reset();
629
- }), this.refetchQueries(r, t)));
633
+ return v.batch(() => (r.findAll(t).forEach((n) => {
634
+ n.reset();
635
+ }), this.refetchQueries(s, e)));
630
636
  }
631
- cancelQueries(e = {}, t = {}) {
632
- const n = { revert: !0, ...t }, r = se.batch(
633
- () => w(this, $).findAll(e).map((o) => o.cancel(n))
637
+ cancelQueries(t = {}, e = {}) {
638
+ const r = { revert: !0, ...e }, s = v.batch(
639
+ () => l(this, h).findAll(t).map((n) => n.cancel(r))
634
640
  );
635
- return Promise.all(r).then(be).catch(be);
641
+ return Promise.all(s).then(D).catch(D);
636
642
  }
637
- invalidateQueries(e = {}, t = {}) {
638
- return se.batch(() => {
639
- if (w(this, $).findAll(e).forEach((r) => {
640
- r.invalidate();
641
- }), e.refetchType === "none")
643
+ invalidateQueries(t = {}, e = {}) {
644
+ return v.batch(() => {
645
+ if (l(this, h).findAll(t).forEach((s) => {
646
+ s.invalidate();
647
+ }), t.refetchType === "none")
642
648
  return Promise.resolve();
643
- const n = {
644
- ...e,
645
- type: e.refetchType ?? e.type ?? "active"
649
+ const r = {
650
+ ...t,
651
+ type: t.refetchType ?? t.type ?? "active"
646
652
  };
647
- return this.refetchQueries(n, t);
653
+ return this.refetchQueries(r, e);
648
654
  });
649
655
  }
650
- refetchQueries(e = {}, t) {
651
- const n = {
652
- ...t,
653
- cancelRefetch: (t == null ? void 0 : t.cancelRefetch) ?? !0
654
- }, r = se.batch(
655
- () => w(this, $).findAll(e).filter((o) => !o.isDisabled()).map((o) => {
656
- let s = o.fetch(void 0, n);
657
- return n.throwOnError || (s = s.catch(be)), o.state.fetchStatus === "paused" ? Promise.resolve() : s;
656
+ refetchQueries(t = {}, e) {
657
+ const r = {
658
+ ...e,
659
+ cancelRefetch: (e == null ? void 0 : e.cancelRefetch) ?? !0
660
+ }, s = v.batch(
661
+ () => l(this, h).findAll(t).filter((n) => !n.isDisabled()).map((n) => {
662
+ let o = n.fetch(void 0, r);
663
+ return r.throwOnError || (o = o.catch(D)), n.state.fetchStatus === "paused" ? Promise.resolve() : o;
658
664
  })
659
665
  );
660
- return Promise.all(r).then(be);
666
+ return Promise.all(s).then(D);
661
667
  }
662
- fetchQuery(e) {
663
- const t = this.defaultQueryOptions(e);
664
- t.retry === void 0 && (t.retry = !1);
665
- const n = w(this, $).build(this, t);
666
- return n.isStaleByTime(
667
- xn(t.staleTime, n)
668
- ) ? n.fetch(t) : Promise.resolve(n.state.data);
668
+ fetchQuery(t) {
669
+ const e = this.defaultQueryOptions(t);
670
+ e.retry === void 0 && (e.retry = !1);
671
+ const r = l(this, h).build(this, e);
672
+ return r.isStaleByTime(
673
+ Se(e.staleTime, r)
674
+ ) ? r.fetch(e) : Promise.resolve(r.state.data);
669
675
  }
670
- prefetchQuery(e) {
671
- return this.fetchQuery(e).then(be).catch(be);
676
+ prefetchQuery(t) {
677
+ return this.fetchQuery(t).then(D).catch(D);
672
678
  }
673
- fetchInfiniteQuery(e) {
674
- return e.behavior = Cn(e.pages), this.fetchQuery(e);
679
+ fetchInfiniteQuery(t) {
680
+ return t.behavior = ke(t.pages), this.fetchQuery(t);
675
681
  }
676
- prefetchInfiniteQuery(e) {
677
- return this.fetchInfiniteQuery(e).then(be).catch(be);
682
+ prefetchInfiniteQuery(t) {
683
+ return this.fetchInfiniteQuery(t).then(D).catch(D);
678
684
  }
679
- ensureInfiniteQueryData(e) {
680
- return e.behavior = Cn(e.pages), this.ensureQueryData(e);
685
+ ensureInfiniteQueryData(t) {
686
+ return t.behavior = ke(t.pages), this.ensureQueryData(t);
681
687
  }
682
688
  resumePausedMutations() {
683
- return yn.isOnline() ? w(this, Pe).resumePausedMutations() : Promise.resolve();
689
+ return Ne.isOnline() ? l(this, T).resumePausedMutations() : Promise.resolve();
684
690
  }
685
691
  getQueryCache() {
686
- return w(this, $);
692
+ return l(this, h);
687
693
  }
688
694
  getMutationCache() {
689
- return w(this, Pe);
695
+ return l(this, T);
690
696
  }
691
697
  getDefaultOptions() {
692
- return w(this, je);
698
+ return l(this, I);
693
699
  }
694
- setDefaultOptions(e) {
695
- X(this, je, e);
700
+ setDefaultOptions(t) {
701
+ f(this, I, t);
696
702
  }
697
- setQueryDefaults(e, t) {
698
- w(this, He).set(bn(e), {
699
- queryKey: e,
700
- defaultOptions: t
703
+ setQueryDefaults(t, e) {
704
+ l(this, B).set(Ce(t), {
705
+ queryKey: t,
706
+ defaultOptions: e
701
707
  });
702
708
  }
703
- getQueryDefaults(e) {
704
- const t = [...w(this, He).values()];
705
- let n = {};
706
- return t.forEach((r) => {
707
- Sn(e, r.queryKey) && (n = { ...n, ...r.defaultOptions });
708
- }), n;
709
- }
710
- setMutationDefaults(e, t) {
711
- w(this, Ue).set(bn(e), {
712
- mutationKey: e,
713
- defaultOptions: t
709
+ getQueryDefaults(t) {
710
+ const e = [...l(this, B).values()];
711
+ let r = {};
712
+ return e.forEach((s) => {
713
+ Ee(t, s.queryKey) && (r = { ...r, ...s.defaultOptions });
714
+ }), r;
715
+ }
716
+ setMutationDefaults(t, e) {
717
+ l(this, H).set(Ce(t), {
718
+ mutationKey: t,
719
+ defaultOptions: e
714
720
  });
715
721
  }
716
- getMutationDefaults(e) {
717
- const t = [...w(this, Ue).values()];
718
- let n = {};
719
- return t.forEach((r) => {
720
- Sn(e, r.mutationKey) && (n = { ...n, ...r.defaultOptions });
721
- }), n;
722
- }
723
- defaultQueryOptions(e) {
724
- if (e._defaulted)
725
- return e;
726
- const t = {
727
- ...w(this, je).queries,
728
- ...this.getQueryDefaults(e.queryKey),
729
- ...e,
722
+ getMutationDefaults(t) {
723
+ const e = [...l(this, H).values()];
724
+ let r = {};
725
+ return e.forEach((s) => {
726
+ Ee(t, s.mutationKey) && (r = { ...r, ...s.defaultOptions });
727
+ }), r;
728
+ }
729
+ defaultQueryOptions(t) {
730
+ if (t._defaulted)
731
+ return t;
732
+ const e = {
733
+ ...l(this, I).queries,
734
+ ...this.getQueryDefaults(t.queryKey),
735
+ ...t,
730
736
  _defaulted: !0
731
737
  };
732
- return t.queryHash || (t.queryHash = Yn(
733
- t.queryKey,
734
- t
735
- )), t.refetchOnReconnect === void 0 && (t.refetchOnReconnect = t.networkMode !== "always"), t.throwOnError === void 0 && (t.throwOnError = !!t.suspense), !t.networkMode && t.persister && (t.networkMode = "offlineFirst"), t.enabled !== !0 && t.queryFn === Bo && (t.enabled = !1), t;
736
- }
737
- defaultMutationOptions(e) {
738
- return e != null && e._defaulted ? e : {
739
- ...w(this, je).mutations,
740
- ...(e == null ? void 0 : e.mutationKey) && this.getMutationDefaults(e.mutationKey),
741
- ...e,
738
+ return e.queryHash || (e.queryHash = ze(
739
+ e.queryKey,
740
+ e
741
+ )), e.refetchOnReconnect === void 0 && (e.refetchOnReconnect = e.networkMode !== "always"), e.throwOnError === void 0 && (e.throwOnError = !!e.suspense), !e.networkMode && e.persister && (e.networkMode = "offlineFirst"), e.enabled !== !0 && e.queryFn === Bt && (e.enabled = !1), e;
742
+ }
743
+ defaultMutationOptions(t) {
744
+ return t != null && t._defaulted ? t : {
745
+ ...l(this, I).mutations,
746
+ ...(t == null ? void 0 : t.mutationKey) && this.getMutationDefaults(t.mutationKey),
747
+ ...t,
742
748
  _defaulted: !0
743
749
  };
744
750
  }
745
751
  clear() {
746
- w(this, $).clear(), w(this, Pe).clear();
752
+ l(this, h).clear(), l(this, T).clear();
747
753
  }
748
- }, $ = new WeakMap(), Pe = new WeakMap(), je = new WeakMap(), He = new WeakMap(), Ue = new WeakMap(), Ne = new WeakMap(), ze = new WeakMap(), Ke = new WeakMap(), On);
749
- const Is = qn(null), Rt = {
754
+ }, h = new WeakMap(), T = new WeakMap(), I = new WeakMap(), B = new WeakMap(), H = new WeakMap(), _ = new WeakMap(), q = new WeakMap(), z = new WeakMap(), Re);
755
+ const Br = Qe(null), se = {
750
756
  didCatch: !1,
751
757
  error: null
752
758
  };
753
- class As extends Co {
754
- constructor(t) {
755
- super(t), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state = Rt;
759
+ class Hr extends Et {
760
+ constructor(e) {
761
+ super(e), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state = se;
756
762
  }
757
- static getDerivedStateFromError(t) {
763
+ static getDerivedStateFromError(e) {
758
764
  return {
759
765
  didCatch: !0,
760
- error: t
766
+ error: e
761
767
  };
762
768
  }
763
769
  resetErrorBoundary() {
764
770
  const {
765
- error: t
771
+ error: e
766
772
  } = this.state;
767
- if (t !== null) {
768
- for (var n, r, o = arguments.length, s = new Array(o), i = 0; i < o; i++)
769
- s[i] = arguments[i];
770
- (n = (r = this.props).onReset) === null || n === void 0 || n.call(r, {
771
- args: s,
773
+ if (e !== null) {
774
+ for (var r, s, n = arguments.length, o = new Array(n), i = 0; i < n; i++)
775
+ o[i] = arguments[i];
776
+ (r = (s = this.props).onReset) === null || r === void 0 || r.call(s, {
777
+ args: o,
772
778
  reason: "imperative-api"
773
- }), this.setState(Rt);
779
+ }), this.setState(se);
774
780
  }
775
781
  }
776
- componentDidCatch(t, n) {
777
- var r, o;
778
- (r = (o = this.props).onError) === null || r === void 0 || r.call(o, t, n);
782
+ componentDidCatch(e, r) {
783
+ var s, n;
784
+ (s = (n = this.props).onError) === null || s === void 0 || s.call(n, e, r);
779
785
  }
780
- componentDidUpdate(t, n) {
786
+ componentDidUpdate(e, r) {
781
787
  const {
782
- didCatch: r
788
+ didCatch: s
783
789
  } = this.state, {
784
- resetKeys: o
790
+ resetKeys: n
785
791
  } = this.props;
786
- if (r && n.error !== null && ks(t.resetKeys, o)) {
787
- var s, i;
788
- (s = (i = this.props).onReset) === null || s === void 0 || s.call(i, {
789
- next: o,
790
- prev: t.resetKeys,
792
+ if (s && r.error !== null && qr(e.resetKeys, n)) {
793
+ var o, i;
794
+ (o = (i = this.props).onReset) === null || o === void 0 || o.call(i, {
795
+ next: n,
796
+ prev: e.resetKeys,
791
797
  reason: "keys"
792
- }), this.setState(Rt);
798
+ }), this.setState(se);
793
799
  }
794
800
  }
795
801
  render() {
796
802
  const {
797
- children: t,
798
- fallbackRender: n,
799
- FallbackComponent: r,
800
- fallback: o
803
+ children: e,
804
+ fallbackRender: r,
805
+ FallbackComponent: s,
806
+ fallback: n
801
807
  } = this.props, {
802
- didCatch: s,
808
+ didCatch: o,
803
809
  error: i
804
810
  } = this.state;
805
- let l = t;
806
- if (s) {
811
+ let c = e;
812
+ if (o) {
807
813
  const u = {
808
814
  error: i,
809
815
  resetErrorBoundary: this.resetErrorBoundary
810
816
  };
811
- if (typeof n == "function")
812
- l = n(u);
813
- else if (r)
814
- l = gn(r, u);
815
- else if (o === null || Mo(o))
816
- l = o;
817
+ if (typeof r == "function")
818
+ c = r(u);
819
+ else if (s)
820
+ c = je(s, u);
821
+ else if (n === null || kt(n))
822
+ c = n;
817
823
  else
818
824
  throw i;
819
825
  }
820
- return gn(Is.Provider, {
826
+ return je(Br.Provider, {
821
827
  value: {
822
- didCatch: s,
828
+ didCatch: o,
823
829
  error: i,
824
830
  resetErrorBoundary: this.resetErrorBoundary
825
831
  }
826
- }, l);
827
- }
828
- }
829
- function ks() {
830
- let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
831
- return e.length !== t.length || e.some((n, r) => !Object.is(n, t[r]));
832
- }
833
- const $s = (e) => "getProfileMenuItems" in e && typeof e.getProfileMenuItems == "function", Fs = (e) => "getRoutes" in e && typeof e.getRoutes == "function", Ls = (e) => "renderSearch" in e && typeof e.renderSearch == "function", Bs = (e) => "initialize" in e && typeof e.initialize == "function", Hs = (e) => "getHead" in e && typeof e.getHead == "function", Us = (e) => "getMdxComponents" in e && typeof e.getMdxComponents == "function", zs = (e) => "getIdentities" in e && typeof e.getIdentities == "function", rr = new Os();
834
- class Ks {
835
- constructor(t) {
836
- ae(this, "plugins");
837
- ae(this, "sidebars");
838
- ae(this, "topNavigation");
839
- ae(this, "meta");
840
- ae(this, "page");
841
- ae(this, "authentication");
842
- ae(this, "navigationPlugins");
843
- ae(this, "initialize", async () => {
832
+ }, c);
833
+ }
834
+ }
835
+ function qr() {
836
+ let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
837
+ return t.length !== e.length || t.some((r, s) => !Object.is(r, e[s]));
838
+ }
839
+ const zr = (t) => "getProfileMenuItems" in t && typeof t.getProfileMenuItems == "function", Kr = (t) => "getRoutes" in t && typeof t.getRoutes == "function", $r = (t) => "renderSearch" in t && typeof t.renderSearch == "function", Ur = (t) => "initialize" in t && typeof t.initialize == "function", Vr = (t) => "getHead" in t && typeof t.getHead == "function", Wr = (t) => "getMdxComponents" in t && typeof t.getMdxComponents == "function", Yr = (t) => "getIdentities" in t && typeof t.getIdentities == "function", et = new Lr();
840
+ class Xr {
841
+ constructor(e) {
842
+ g(this, "plugins");
843
+ g(this, "sidebars");
844
+ g(this, "topNavigation");
845
+ g(this, "meta");
846
+ g(this, "page");
847
+ g(this, "authentication");
848
+ g(this, "navigationPlugins");
849
+ g(this, "initialize", async () => {
844
850
  await Promise.all(
845
- this.plugins.filter(Bs).map((t) => {
846
- var n;
847
- return (n = t.initialize) == null ? void 0 : n.call(t, this);
851
+ this.plugins.filter(Ur).map((e) => {
852
+ var r;
853
+ return (r = e.initialize) == null ? void 0 : r.call(e, this);
848
854
  })
849
855
  );
850
856
  });
851
- ae(this, "invalidateCache", async (t) => {
852
- await rr.invalidateQueries({ queryKey: t });
857
+ g(this, "invalidateCache", async (e) => {
858
+ await et.invalidateQueries({ queryKey: e });
853
859
  });
854
- ae(this, "getApiIdentities", async () => (await Promise.all(
855
- this.plugins.filter(zs).map((n) => n.getIdentities(this))
860
+ g(this, "getApiIdentities", async () => (await Promise.all(
861
+ this.plugins.filter(Yr).map((r) => r.getIdentities(this))
856
862
  )).flat());
857
- ae(this, "getPluginSidebar", async (t) => (await Promise.all(
863
+ g(this, "getPluginSidebar", async (e) => (await Promise.all(
858
864
  this.navigationPlugins.map(
859
- (r) => {
860
- var o;
861
- return (o = r.getSidebar) == null ? void 0 : o.call(r, wt(t));
865
+ (s) => {
866
+ var n;
867
+ return (n = s.getSidebar) == null ? void 0 : n.call(s, G(e));
862
868
  }
863
869
  )
864
- )).flatMap((r) => r ?? []));
865
- ae(this, "signRequest", async (t) => {
870
+ )).flatMap((s) => s ?? []));
871
+ g(this, "signRequest", async (e) => {
866
872
  if (!this.authentication)
867
873
  throw new Error("No authentication provider configured");
868
- const n = await this.authentication.getAccessToken();
869
- return t.headers.set("Authorization", `Bearer ${n}`), t;
874
+ const r = await this.authentication.getAccessToken();
875
+ return e.headers.set("Authorization", `Bearer ${r}`), e;
870
876
  });
871
- this.plugins = t.plugins ?? [], this.topNavigation = t.topNavigation ?? [], this.sidebars = t.sidebars ?? {}, this.navigationPlugins = this.plugins.filter(Fs), this.authentication = t.authentication, this.meta = t.metadata, this.page = t.page;
872
- }
873
- }
874
- function qs({ error: e, resetErrorBoundary: t }) {
875
- return /* @__PURE__ */ a.jsx(kn, { error: e });
876
- }
877
- const ft = globalThis;
878
- (!ft.requestIdleCallback || !ft.cancelIdleCallback) && (ft.requestIdleCallback = (e) => setTimeout(e, 1), ft.cancelIdleCallback = clearTimeout);
879
- var _t = ["Enter", " "], Qs = ["ArrowDown", "PageUp", "Home"], ar = ["ArrowUp", "PageDown", "End"], Vs = [...Qs, ...ar], Gs = {
880
- ltr: [..._t, "ArrowRight"],
881
- rtl: [..._t, "ArrowLeft"]
882
- }, Ws = {
883
- ltr: ["ArrowLeft"],
884
- rtl: ["ArrowRight"]
885
- }, ot = "Menu", [et, Ys, Xs] = ro(ot), [ke, or] = $n(ot, [
886
- Xs,
887
- Fn,
888
- Jn
889
- ]), st = Fn(), sr = Jn(), [ir, Te] = ke(ot), [Zs, it] = ke(ot), lr = (e) => {
890
- const { __scopeMenu: t, open: n = !1, children: r, dir: o, onOpenChange: s, modal: i = !0 } = e, l = st(t), [u, m] = h.useState(null), f = h.useRef(!1), c = Lt(s), d = mo(o);
891
- return h.useEffect(() => {
892
- const R = () => {
893
- f.current = !0, document.addEventListener("pointerdown", C, { capture: !0, once: !0 }), document.addEventListener("pointermove", C, { capture: !0, once: !0 });
894
- }, C = () => f.current = !1;
895
- return document.addEventListener("keydown", R, { capture: !0 }), () => {
896
- document.removeEventListener("keydown", R, { capture: !0 }), document.removeEventListener("pointerdown", C, { capture: !0 }), document.removeEventListener("pointermove", C, { capture: !0 });
897
- };
898
- }, []), /* @__PURE__ */ a.jsx(Bn, { ...l, children: /* @__PURE__ */ a.jsx(
899
- ir,
900
- {
901
- scope: t,
902
- open: n,
903
- onOpenChange: c,
904
- content: u,
905
- onContentChange: m,
906
- children: /* @__PURE__ */ a.jsx(
907
- Zs,
908
- {
909
- scope: t,
910
- onClose: h.useCallback(() => c(!1), [c]),
911
- isUsingKeyboardRef: f,
912
- dir: d,
913
- modal: i,
914
- children: r
915
- }
916
- )
917
- }
918
- ) });
919
- };
920
- lr.displayName = ot;
921
- var Js = "MenuAnchor", Kt = h.forwardRef(
922
- (e, t) => {
923
- const { __scopeMenu: n, ...r } = e, o = st(n);
924
- return /* @__PURE__ */ a.jsx(ao, { ...o, ...r, ref: t });
925
- }
926
- );
927
- Kt.displayName = Js;
928
- var qt = "MenuPortal", [ei, cr] = ke(qt, {
929
- forceMount: void 0
930
- }), ur = (e) => {
931
- const { __scopeMenu: t, forceMount: n, children: r, container: o } = e, s = Te(qt, t);
932
- return /* @__PURE__ */ a.jsx(ei, { scope: t, forceMount: n, children: /* @__PURE__ */ a.jsx(bt, { present: n || s.open, children: /* @__PURE__ */ a.jsx(go, { asChild: !0, container: o, children: r }) }) });
933
- };
934
- ur.displayName = qt;
935
- var ue = "MenuContent", [ti, Qt] = ke(ue), dr = h.forwardRef(
936
- (e, t) => {
937
- const n = cr(ue, e.__scopeMenu), { forceMount: r = n.forceMount, ...o } = e, s = Te(ue, e.__scopeMenu), i = it(ue, e.__scopeMenu);
938
- return /* @__PURE__ */ a.jsx(et.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ a.jsx(bt, { present: r || s.open, children: /* @__PURE__ */ a.jsx(et.Slot, { scope: e.__scopeMenu, children: i.modal ? /* @__PURE__ */ a.jsx(ni, { ...o, ref: t }) : /* @__PURE__ */ a.jsx(ri, { ...o, ref: t }) }) }) });
939
- }
940
- ), ni = h.forwardRef(
941
- (e, t) => {
942
- const n = Te(ue, e.__scopeMenu), r = h.useRef(null), o = rt(t, r);
943
- return h.useEffect(() => {
944
- const s = r.current;
945
- if (s) return oo(s);
946
- }, []), /* @__PURE__ */ a.jsx(
947
- Vt,
948
- {
949
- ...e,
950
- ref: o,
951
- trapFocus: n.open,
952
- disableOutsidePointerEvents: n.open,
953
- disableOutsideScroll: !0,
954
- onFocusOutside: I(
955
- e.onFocusOutside,
956
- (s) => s.preventDefault(),
957
- { checkForDefaultPrevented: !1 }
958
- ),
959
- onDismiss: () => n.onOpenChange(!1)
960
- }
961
- );
962
- }
963
- ), ri = h.forwardRef((e, t) => {
964
- const n = Te(ue, e.__scopeMenu);
965
- return /* @__PURE__ */ a.jsx(
966
- Vt,
967
- {
968
- ...e,
969
- ref: t,
970
- trapFocus: !1,
971
- disableOutsidePointerEvents: !1,
972
- disableOutsideScroll: !1,
973
- onDismiss: () => n.onOpenChange(!1)
974
- }
975
- );
976
- }), Vt = h.forwardRef(
977
- (e, t) => {
978
- const {
979
- __scopeMenu: n,
980
- loop: r = !1,
981
- trapFocus: o,
982
- onOpenAutoFocus: s,
983
- onCloseAutoFocus: i,
984
- disableOutsidePointerEvents: l,
985
- onEntryFocus: u,
986
- onEscapeKeyDown: m,
987
- onPointerDownOutside: f,
988
- onFocusOutside: c,
989
- onInteractOutside: d,
990
- onDismiss: R,
991
- disableOutsideScroll: C,
992
- ...g
993
- } = e, T = Te(ue, n), M = it(ue, n), A = st(n), P = sr(n), v = Ys(n), [z, J] = h.useState(null), b = h.useRef(null), j = rt(t, b, T.onContentChange), D = h.useRef(0), B = h.useRef(""), K = h.useRef(0), W = h.useRef(null), y = h.useRef("right"), V = h.useRef(0), G = C ? fo : h.Fragment, te = C ? { as: ho, allowPinchZoom: !0 } : void 0, q = (x) => {
994
- var le, Re;
995
- const Q = B.current + x, ie = v().filter((re) => !re.disabled), de = document.activeElement, pe = (le = ie.find((re) => re.ref.current === de)) == null ? void 0 : le.textValue, Me = ie.map((re) => re.textValue), $e = mi(Me, Q, pe), xe = (Re = ie.find((re) => re.textValue === $e)) == null ? void 0 : Re.ref.current;
996
- (function re(Fe) {
997
- B.current = Fe, window.clearTimeout(D.current), Fe !== "" && (D.current = window.setTimeout(() => re(""), 1e3));
998
- })(Q), xe && setTimeout(() => xe.focus());
999
- };
1000
- h.useEffect(() => () => window.clearTimeout(D.current), []), so();
1001
- const Y = h.useCallback((x) => {
1002
- var ie, de;
1003
- return y.current === ((ie = W.current) == null ? void 0 : ie.side) && vi(x, (de = W.current) == null ? void 0 : de.area);
1004
- }, []);
1005
- return /* @__PURE__ */ a.jsx(
1006
- ti,
1007
- {
1008
- scope: n,
1009
- searchRef: B,
1010
- onItemEnter: h.useCallback(
1011
- (x) => {
1012
- Y(x) && x.preventDefault();
1013
- },
1014
- [Y]
1015
- ),
1016
- onItemLeave: h.useCallback(
1017
- (x) => {
1018
- var Q;
1019
- Y(x) || ((Q = b.current) == null || Q.focus(), J(null));
1020
- },
1021
- [Y]
1022
- ),
1023
- onTriggerLeave: h.useCallback(
1024
- (x) => {
1025
- Y(x) && x.preventDefault();
1026
- },
1027
- [Y]
1028
- ),
1029
- pointerGraceTimerRef: K,
1030
- onPointerGraceIntentChange: h.useCallback((x) => {
1031
- W.current = x;
1032
- }, []),
1033
- children: /* @__PURE__ */ a.jsx(G, { ...te, children: /* @__PURE__ */ a.jsx(
1034
- io,
1035
- {
1036
- asChild: !0,
1037
- trapped: o,
1038
- onMountAutoFocus: I(s, (x) => {
1039
- var Q;
1040
- x.preventDefault(), (Q = b.current) == null || Q.focus({ preventScroll: !0 });
1041
- }),
1042
- onUnmountAutoFocus: i,
1043
- children: /* @__PURE__ */ a.jsx(
1044
- lo,
1045
- {
1046
- asChild: !0,
1047
- disableOutsidePointerEvents: l,
1048
- onEscapeKeyDown: m,
1049
- onPointerDownOutside: f,
1050
- onFocusOutside: c,
1051
- onInteractOutside: d,
1052
- onDismiss: R,
1053
- children: /* @__PURE__ */ a.jsx(
1054
- es,
1055
- {
1056
- asChild: !0,
1057
- ...P,
1058
- dir: M.dir,
1059
- orientation: "vertical",
1060
- loop: r,
1061
- currentTabStopId: z,
1062
- onCurrentTabStopIdChange: J,
1063
- onEntryFocus: I(u, (x) => {
1064
- M.isUsingKeyboardRef.current || x.preventDefault();
1065
- }),
1066
- preventScrollOnEntryFocus: !0,
1067
- children: /* @__PURE__ */ a.jsx(
1068
- co,
1069
- {
1070
- role: "menu",
1071
- "aria-orientation": "vertical",
1072
- "data-state": Pr(T.open),
1073
- "data-radix-menu-content": "",
1074
- dir: M.dir,
1075
- ...A,
1076
- ...g,
1077
- ref: j,
1078
- style: { outline: "none", ...g.style },
1079
- onKeyDown: I(g.onKeyDown, (x) => {
1080
- const ie = x.target.closest("[data-radix-menu-content]") === x.currentTarget, de = x.ctrlKey || x.altKey || x.metaKey, pe = x.key.length === 1;
1081
- ie && (x.key === "Tab" && x.preventDefault(), !de && pe && q(x.key));
1082
- const Me = b.current;
1083
- if (x.target !== Me || !Vs.includes(x.key)) return;
1084
- x.preventDefault();
1085
- const xe = v().filter((le) => !le.disabled).map((le) => le.ref.current);
1086
- ar.includes(x.key) && xe.reverse(), hi(xe);
1087
- }),
1088
- onBlur: I(e.onBlur, (x) => {
1089
- x.currentTarget.contains(x.target) || (window.clearTimeout(D.current), B.current = "");
1090
- }),
1091
- onPointerMove: I(
1092
- e.onPointerMove,
1093
- tt((x) => {
1094
- const Q = x.target, ie = V.current !== x.clientX;
1095
- if (x.currentTarget.contains(Q) && ie) {
1096
- const de = x.clientX > V.current ? "right" : "left";
1097
- y.current = de, V.current = x.clientX;
1098
- }
1099
- })
1100
- )
1101
- }
1102
- )
1103
- }
1104
- )
1105
- }
1106
- )
1107
- }
1108
- ) })
1109
- }
1110
- );
1111
- }
1112
- );
1113
- dr.displayName = ue;
1114
- var ai = "MenuGroup", Gt = h.forwardRef(
1115
- (e, t) => {
1116
- const { __scopeMenu: n, ...r } = e;
1117
- return /* @__PURE__ */ a.jsx(qe.div, { role: "group", ...r, ref: t });
1118
- }
1119
- );
1120
- Gt.displayName = ai;
1121
- var oi = "MenuLabel", fr = h.forwardRef(
1122
- (e, t) => {
1123
- const { __scopeMenu: n, ...r } = e;
1124
- return /* @__PURE__ */ a.jsx(qe.div, { ...r, ref: t });
1125
- }
1126
- );
1127
- fr.displayName = oi;
1128
- var yt = "MenuItem", Rn = "menu.itemSelect", St = h.forwardRef(
1129
- (e, t) => {
1130
- const { disabled: n = !1, onSelect: r, ...o } = e, s = h.useRef(null), i = it(yt, e.__scopeMenu), l = Qt(yt, e.__scopeMenu), u = rt(t, s), m = h.useRef(!1), f = () => {
1131
- const c = s.current;
1132
- if (!n && c) {
1133
- const d = new CustomEvent(Rn, { bubbles: !0, cancelable: !0 });
1134
- c.addEventListener(Rn, (R) => r == null ? void 0 : r(R), { once: !0 }), po(c, d), d.defaultPrevented ? m.current = !1 : i.onClose();
1135
- }
1136
- };
1137
- return /* @__PURE__ */ a.jsx(
1138
- hr,
1139
- {
1140
- ...o,
1141
- ref: u,
1142
- disabled: n,
1143
- onClick: I(e.onClick, f),
1144
- onPointerDown: (c) => {
1145
- var d;
1146
- (d = e.onPointerDown) == null || d.call(e, c), m.current = !0;
1147
- },
1148
- onPointerUp: I(e.onPointerUp, (c) => {
1149
- var d;
1150
- m.current || (d = c.currentTarget) == null || d.click();
1151
- }),
1152
- onKeyDown: I(e.onKeyDown, (c) => {
1153
- const d = l.searchRef.current !== "";
1154
- n || d && c.key === " " || _t.includes(c.key) && (c.currentTarget.click(), c.preventDefault());
1155
- })
1156
- }
1157
- );
1158
- }
1159
- );
1160
- St.displayName = yt;
1161
- var hr = h.forwardRef(
1162
- (e, t) => {
1163
- const { __scopeMenu: n, disabled: r = !1, textValue: o, ...s } = e, i = Qt(yt, n), l = sr(n), u = h.useRef(null), m = rt(t, u), [f, c] = h.useState(!1), [d, R] = h.useState("");
1164
- return h.useEffect(() => {
1165
- const C = u.current;
1166
- C && R((C.textContent ?? "").trim());
1167
- }, [s.children]), /* @__PURE__ */ a.jsx(
1168
- et.ItemSlot,
1169
- {
1170
- scope: n,
1171
- disabled: r,
1172
- textValue: o ?? d,
1173
- children: /* @__PURE__ */ a.jsx(ts, { asChild: !0, ...l, focusable: !r, children: /* @__PURE__ */ a.jsx(
1174
- qe.div,
1175
- {
1176
- role: "menuitem",
1177
- "data-highlighted": f ? "" : void 0,
1178
- "aria-disabled": r || void 0,
1179
- "data-disabled": r ? "" : void 0,
1180
- ...s,
1181
- ref: m,
1182
- onPointerMove: I(
1183
- e.onPointerMove,
1184
- tt((C) => {
1185
- r ? i.onItemLeave(C) : (i.onItemEnter(C), C.defaultPrevented || C.currentTarget.focus({ preventScroll: !0 }));
1186
- })
1187
- ),
1188
- onPointerLeave: I(
1189
- e.onPointerLeave,
1190
- tt((C) => i.onItemLeave(C))
1191
- ),
1192
- onFocus: I(e.onFocus, () => c(!0)),
1193
- onBlur: I(e.onBlur, () => c(!1))
1194
- }
1195
- ) })
1196
- }
1197
- );
1198
- }
1199
- ), si = "MenuCheckboxItem", pr = h.forwardRef(
1200
- (e, t) => {
1201
- const { checked: n = !1, onCheckedChange: r, ...o } = e;
1202
- return /* @__PURE__ */ a.jsx(yr, { scope: e.__scopeMenu, checked: n, children: /* @__PURE__ */ a.jsx(
1203
- St,
1204
- {
1205
- role: "menuitemcheckbox",
1206
- "aria-checked": xt(n) ? "mixed" : n,
1207
- ...o,
1208
- ref: t,
1209
- "data-state": Xt(n),
1210
- onSelect: I(
1211
- o.onSelect,
1212
- () => r == null ? void 0 : r(xt(n) ? !0 : !n),
1213
- { checkForDefaultPrevented: !1 }
1214
- )
1215
- }
1216
- ) });
1217
- }
1218
- );
1219
- pr.displayName = si;
1220
- var mr = "MenuRadioGroup", [ii, li] = ke(
1221
- mr,
1222
- { value: void 0, onValueChange: () => {
1223
- } }
1224
- ), gr = h.forwardRef(
1225
- (e, t) => {
1226
- const { value: n, onValueChange: r, ...o } = e, s = Lt(r);
1227
- return /* @__PURE__ */ a.jsx(ii, { scope: e.__scopeMenu, value: n, onValueChange: s, children: /* @__PURE__ */ a.jsx(Gt, { ...o, ref: t }) });
1228
- }
1229
- );
1230
- gr.displayName = mr;
1231
- var vr = "MenuRadioItem", wr = h.forwardRef(
1232
- (e, t) => {
1233
- const { value: n, ...r } = e, o = li(vr, e.__scopeMenu), s = n === o.value;
1234
- return /* @__PURE__ */ a.jsx(yr, { scope: e.__scopeMenu, checked: s, children: /* @__PURE__ */ a.jsx(
1235
- St,
1236
- {
1237
- role: "menuitemradio",
1238
- "aria-checked": s,
1239
- ...r,
1240
- ref: t,
1241
- "data-state": Xt(s),
1242
- onSelect: I(
1243
- r.onSelect,
1244
- () => {
1245
- var i;
1246
- return (i = o.onValueChange) == null ? void 0 : i.call(o, n);
1247
- },
1248
- { checkForDefaultPrevented: !1 }
1249
- )
1250
- }
1251
- ) });
1252
- }
1253
- );
1254
- wr.displayName = vr;
1255
- var Wt = "MenuItemIndicator", [yr, ci] = ke(
1256
- Wt,
1257
- { checked: !1 }
1258
- ), xr = h.forwardRef(
1259
- (e, t) => {
1260
- const { __scopeMenu: n, forceMount: r, ...o } = e, s = ci(Wt, n);
1261
- return /* @__PURE__ */ a.jsx(
1262
- bt,
1263
- {
1264
- present: r || xt(s.checked) || s.checked === !0,
1265
- children: /* @__PURE__ */ a.jsx(
1266
- qe.span,
1267
- {
1268
- ...o,
1269
- ref: t,
1270
- "data-state": Xt(s.checked)
1271
- }
1272
- )
1273
- }
1274
- );
1275
- }
1276
- );
1277
- xr.displayName = Wt;
1278
- var ui = "MenuSeparator", br = h.forwardRef(
1279
- (e, t) => {
1280
- const { __scopeMenu: n, ...r } = e;
1281
- return /* @__PURE__ */ a.jsx(
1282
- qe.div,
1283
- {
1284
- role: "separator",
1285
- "aria-orientation": "horizontal",
1286
- ...r,
1287
- ref: t
1288
- }
1289
- );
1290
- }
1291
- );
1292
- br.displayName = ui;
1293
- var di = "MenuArrow", Sr = h.forwardRef(
1294
- (e, t) => {
1295
- const { __scopeMenu: n, ...r } = e, o = st(n);
1296
- return /* @__PURE__ */ a.jsx(uo, { ...o, ...r, ref: t });
1297
- }
1298
- );
1299
- Sr.displayName = di;
1300
- var Yt = "MenuSub", [fi, Cr] = ke(Yt), Mr = (e) => {
1301
- const { __scopeMenu: t, children: n, open: r = !1, onOpenChange: o } = e, s = Te(Yt, t), i = st(t), [l, u] = h.useState(null), [m, f] = h.useState(null), c = Lt(o);
1302
- return h.useEffect(() => (s.open === !1 && c(!1), () => c(!1)), [s.open, c]), /* @__PURE__ */ a.jsx(Bn, { ...i, children: /* @__PURE__ */ a.jsx(
1303
- ir,
1304
- {
1305
- scope: t,
1306
- open: r,
1307
- onOpenChange: c,
1308
- content: m,
1309
- onContentChange: f,
1310
- children: /* @__PURE__ */ a.jsx(
1311
- fi,
1312
- {
1313
- scope: t,
1314
- contentId: gt(),
1315
- triggerId: gt(),
1316
- trigger: l,
1317
- onTriggerChange: u,
1318
- children: n
1319
- }
1320
- )
1321
- }
1322
- ) });
1323
- };
1324
- Mr.displayName = Yt;
1325
- var Xe = "MenuSubTrigger", Rr = h.forwardRef(
1326
- (e, t) => {
1327
- const n = Te(Xe, e.__scopeMenu), r = it(Xe, e.__scopeMenu), o = Cr(Xe, e.__scopeMenu), s = Qt(Xe, e.__scopeMenu), i = h.useRef(null), { pointerGraceTimerRef: l, onPointerGraceIntentChange: u } = s, m = { __scopeMenu: e.__scopeMenu }, f = h.useCallback(() => {
1328
- i.current && window.clearTimeout(i.current), i.current = null;
1329
- }, []);
1330
- return h.useEffect(() => f, [f]), h.useEffect(() => {
1331
- const c = l.current;
1332
- return () => {
1333
- window.clearTimeout(c), u(null);
1334
- };
1335
- }, [l, u]), /* @__PURE__ */ a.jsx(Kt, { asChild: !0, ...m, children: /* @__PURE__ */ a.jsx(
1336
- hr,
1337
- {
1338
- id: o.triggerId,
1339
- "aria-haspopup": "menu",
1340
- "aria-expanded": n.open,
1341
- "aria-controls": o.contentId,
1342
- "data-state": Pr(n.open),
1343
- ...e,
1344
- ref: Ln(t, o.onTriggerChange),
1345
- onClick: (c) => {
1346
- var d;
1347
- (d = e.onClick) == null || d.call(e, c), !(e.disabled || c.defaultPrevented) && (c.currentTarget.focus(), n.open || n.onOpenChange(!0));
1348
- },
1349
- onPointerMove: I(
1350
- e.onPointerMove,
1351
- tt((c) => {
1352
- s.onItemEnter(c), !c.defaultPrevented && !e.disabled && !n.open && !i.current && (s.onPointerGraceIntentChange(null), i.current = window.setTimeout(() => {
1353
- n.onOpenChange(!0), f();
1354
- }, 100));
1355
- })
1356
- ),
1357
- onPointerLeave: I(
1358
- e.onPointerLeave,
1359
- tt((c) => {
1360
- var R, C;
1361
- f();
1362
- const d = (R = n.content) == null ? void 0 : R.getBoundingClientRect();
1363
- if (d) {
1364
- const g = (C = n.content) == null ? void 0 : C.dataset.side, T = g === "right", M = T ? -5 : 5, A = d[T ? "left" : "right"], P = d[T ? "right" : "left"];
1365
- s.onPointerGraceIntentChange({
1366
- area: [
1367
- // Apply a bleed on clientX to ensure that our exit point is
1368
- // consistently within polygon bounds
1369
- { x: c.clientX + M, y: c.clientY },
1370
- { x: A, y: d.top },
1371
- { x: P, y: d.top },
1372
- { x: P, y: d.bottom },
1373
- { x: A, y: d.bottom }
1374
- ],
1375
- side: g
1376
- }), window.clearTimeout(l.current), l.current = window.setTimeout(
1377
- () => s.onPointerGraceIntentChange(null),
1378
- 300
1379
- );
1380
- } else {
1381
- if (s.onTriggerLeave(c), c.defaultPrevented) return;
1382
- s.onPointerGraceIntentChange(null);
1383
- }
1384
- })
1385
- ),
1386
- onKeyDown: I(e.onKeyDown, (c) => {
1387
- var R;
1388
- const d = s.searchRef.current !== "";
1389
- e.disabled || d && c.key === " " || Gs[r.dir].includes(c.key) && (n.onOpenChange(!0), (R = n.content) == null || R.focus(), c.preventDefault());
1390
- })
1391
- }
1392
- ) });
1393
- }
1394
- );
1395
- Rr.displayName = Xe;
1396
- var Er = "MenuSubContent", Dr = h.forwardRef(
1397
- (e, t) => {
1398
- const n = cr(ue, e.__scopeMenu), { forceMount: r = n.forceMount, ...o } = e, s = Te(ue, e.__scopeMenu), i = it(ue, e.__scopeMenu), l = Cr(Er, e.__scopeMenu), u = h.useRef(null), m = rt(t, u);
1399
- return /* @__PURE__ */ a.jsx(et.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ a.jsx(bt, { present: r || s.open, children: /* @__PURE__ */ a.jsx(et.Slot, { scope: e.__scopeMenu, children: /* @__PURE__ */ a.jsx(
1400
- Vt,
1401
- {
1402
- id: l.contentId,
1403
- "aria-labelledby": l.triggerId,
1404
- ...o,
1405
- ref: m,
1406
- align: "start",
1407
- side: i.dir === "rtl" ? "left" : "right",
1408
- disableOutsidePointerEvents: !1,
1409
- disableOutsideScroll: !1,
1410
- trapFocus: !1,
1411
- onOpenAutoFocus: (f) => {
1412
- var c;
1413
- i.isUsingKeyboardRef.current && ((c = u.current) == null || c.focus()), f.preventDefault();
1414
- },
1415
- onCloseAutoFocus: (f) => f.preventDefault(),
1416
- onFocusOutside: I(e.onFocusOutside, (f) => {
1417
- f.target !== l.trigger && s.onOpenChange(!1);
1418
- }),
1419
- onEscapeKeyDown: I(e.onEscapeKeyDown, (f) => {
1420
- i.onClose(), f.preventDefault();
1421
- }),
1422
- onKeyDown: I(e.onKeyDown, (f) => {
1423
- var R;
1424
- const c = f.currentTarget.contains(f.target), d = Ws[i.dir].includes(f.key);
1425
- c && d && (s.onOpenChange(!1), (R = l.trigger) == null || R.focus(), f.preventDefault());
1426
- })
1427
- }
1428
- ) }) }) });
877
+ this.plugins = e.plugins ?? [], this.topNavigation = e.topNavigation ?? [], this.sidebars = e.sidebars ?? {}, this.navigationPlugins = this.plugins.filter(Kr), this.authentication = e.authentication, this.meta = e.metadata, this.page = e.page;
1429
878
  }
1430
- );
1431
- Dr.displayName = Er;
1432
- function Pr(e) {
1433
- return e ? "open" : "closed";
1434
- }
1435
- function xt(e) {
1436
- return e === "indeterminate";
1437
- }
1438
- function Xt(e) {
1439
- return xt(e) ? "indeterminate" : e ? "checked" : "unchecked";
1440
- }
1441
- function hi(e) {
1442
- const t = document.activeElement;
1443
- for (const n of e)
1444
- if (n === t || (n.focus(), document.activeElement !== t)) return;
1445
879
  }
1446
- function pi(e, t) {
1447
- return e.map((n, r) => e[(t + r) % e.length]);
880
+ function Zr({ error: t, resetErrorBoundary: e }) {
881
+ return /* @__PURE__ */ a.jsx(_e, { error: t });
1448
882
  }
1449
- function mi(e, t, n) {
1450
- const o = t.length > 1 && Array.from(t).every((m) => m === t[0]) ? t[0] : t, s = n ? e.indexOf(n) : -1;
1451
- let i = pi(e, Math.max(s, 0));
1452
- o.length === 1 && (i = i.filter((m) => m !== n));
1453
- const u = i.find(
1454
- (m) => m.toLowerCase().startsWith(o.toLowerCase())
1455
- );
1456
- return u !== n ? u : void 0;
1457
- }
1458
- function gi(e, t) {
1459
- const { x: n, y: r } = e;
1460
- let o = !1;
1461
- for (let s = 0, i = t.length - 1; s < t.length; i = s++) {
1462
- const l = t[s].x, u = t[s].y, m = t[i].x, f = t[i].y;
1463
- u > r != f > r && n < (m - l) * (r - u) / (f - u) + l && (o = !o);
1464
- }
1465
- return o;
1466
- }
1467
- function vi(e, t) {
1468
- if (!t) return !1;
1469
- const n = { x: e.clientX, y: e.clientY };
1470
- return gi(n, t);
1471
- }
1472
- function tt(e) {
1473
- return (t) => t.pointerType === "mouse" ? e(t) : void 0;
1474
- }
1475
- var wi = lr, yi = Kt, xi = ur, bi = dr, Si = Gt, Ci = fr, Mi = St, Ri = pr, Ei = gr, Di = wr, Pi = xr, ji = br, Ni = Sr, Ti = Mr, _i = Rr, Oi = Dr, Zt = "DropdownMenu", [Ii, gc] = $n(
1476
- Zt,
1477
- [or]
1478
- ), Z = or(), [Ai, jr] = Ii(Zt), Nr = (e) => {
1479
- const {
1480
- __scopeDropdownMenu: t,
1481
- children: n,
1482
- dir: r,
1483
- open: o,
1484
- defaultOpen: s,
1485
- onOpenChange: i,
1486
- modal: l = !0
1487
- } = e, u = Z(t), m = h.useRef(null), [f = !1, c] = Hn({
1488
- prop: o,
1489
- defaultProp: s,
1490
- onChange: i
1491
- });
1492
- return /* @__PURE__ */ a.jsx(
1493
- Ai,
1494
- {
1495
- scope: t,
1496
- triggerId: gt(),
1497
- triggerRef: m,
1498
- contentId: gt(),
1499
- open: f,
1500
- onOpenChange: c,
1501
- onOpenToggle: h.useCallback(() => c((d) => !d), [c]),
1502
- modal: l,
1503
- children: /* @__PURE__ */ a.jsx(wi, { ...u, open: f, onOpenChange: c, dir: r, modal: l, children: n })
1504
- }
1505
- );
1506
- };
1507
- Nr.displayName = Zt;
1508
- var Tr = "DropdownMenuTrigger", _r = h.forwardRef(
1509
- (e, t) => {
1510
- const { __scopeDropdownMenu: n, disabled: r = !1, ...o } = e, s = jr(Tr, n), i = Z(n);
1511
- return /* @__PURE__ */ a.jsx(yi, { asChild: !0, ...i, children: /* @__PURE__ */ a.jsx(
1512
- qe.button,
1513
- {
1514
- type: "button",
1515
- id: s.triggerId,
1516
- "aria-haspopup": "menu",
1517
- "aria-expanded": s.open,
1518
- "aria-controls": s.open ? s.contentId : void 0,
1519
- "data-state": s.open ? "open" : "closed",
1520
- "data-disabled": r ? "" : void 0,
1521
- disabled: r,
1522
- ...o,
1523
- ref: Ln(t, s.triggerRef),
1524
- onPointerDown: I(e.onPointerDown, (l) => {
1525
- !r && l.button === 0 && l.ctrlKey === !1 && (s.onOpenToggle(), s.open || l.preventDefault());
1526
- }),
1527
- onKeyDown: I(e.onKeyDown, (l) => {
1528
- r || (["Enter", " "].includes(l.key) && s.onOpenToggle(), l.key === "ArrowDown" && s.onOpenChange(!0), ["Enter", " ", "ArrowDown"].includes(l.key) && l.preventDefault());
1529
- })
1530
- }
1531
- ) });
1532
- }
1533
- );
1534
- _r.displayName = Tr;
1535
- var ki = "DropdownMenuPortal", Or = (e) => {
1536
- const { __scopeDropdownMenu: t, ...n } = e, r = Z(t);
1537
- return /* @__PURE__ */ a.jsx(xi, { ...r, ...n });
1538
- };
1539
- Or.displayName = ki;
1540
- var Ir = "DropdownMenuContent", Ar = h.forwardRef(
1541
- (e, t) => {
1542
- const { __scopeDropdownMenu: n, ...r } = e, o = jr(Ir, n), s = Z(n), i = h.useRef(!1);
1543
- return /* @__PURE__ */ a.jsx(
1544
- bi,
1545
- {
1546
- id: o.contentId,
1547
- "aria-labelledby": o.triggerId,
1548
- ...s,
1549
- ...r,
1550
- ref: t,
1551
- onCloseAutoFocus: I(e.onCloseAutoFocus, (l) => {
1552
- var u;
1553
- i.current || (u = o.triggerRef.current) == null || u.focus(), i.current = !1, l.preventDefault();
1554
- }),
1555
- onInteractOutside: I(e.onInteractOutside, (l) => {
1556
- const u = l.detail.originalEvent, m = u.button === 0 && u.ctrlKey === !0, f = u.button === 2 || m;
1557
- (!o.modal || f) && (i.current = !0);
1558
- }),
1559
- style: {
1560
- ...e.style,
1561
- "--radix-dropdown-menu-content-transform-origin": "var(--radix-popper-transform-origin)",
1562
- "--radix-dropdown-menu-content-available-width": "var(--radix-popper-available-width)",
1563
- "--radix-dropdown-menu-content-available-height": "var(--radix-popper-available-height)",
1564
- "--radix-dropdown-menu-trigger-width": "var(--radix-popper-anchor-width)",
1565
- "--radix-dropdown-menu-trigger-height": "var(--radix-popper-anchor-height)"
1566
- }
1567
- }
1568
- );
1569
- }
1570
- );
1571
- Ar.displayName = Ir;
1572
- var $i = "DropdownMenuGroup", Fi = h.forwardRef(
1573
- (e, t) => {
1574
- const { __scopeDropdownMenu: n, ...r } = e, o = Z(n);
1575
- return /* @__PURE__ */ a.jsx(Si, { ...o, ...r, ref: t });
1576
- }
1577
- );
1578
- Fi.displayName = $i;
1579
- var Li = "DropdownMenuLabel", kr = h.forwardRef(
1580
- (e, t) => {
1581
- const { __scopeDropdownMenu: n, ...r } = e, o = Z(n);
1582
- return /* @__PURE__ */ a.jsx(Ci, { ...o, ...r, ref: t });
1583
- }
1584
- );
1585
- kr.displayName = Li;
1586
- var Bi = "DropdownMenuItem", $r = h.forwardRef(
1587
- (e, t) => {
1588
- const { __scopeDropdownMenu: n, ...r } = e, o = Z(n);
1589
- return /* @__PURE__ */ a.jsx(Mi, { ...o, ...r, ref: t });
1590
- }
1591
- );
1592
- $r.displayName = Bi;
1593
- var Hi = "DropdownMenuCheckboxItem", Fr = h.forwardRef((e, t) => {
1594
- const { __scopeDropdownMenu: n, ...r } = e, o = Z(n);
1595
- return /* @__PURE__ */ a.jsx(Ri, { ...o, ...r, ref: t });
1596
- });
1597
- Fr.displayName = Hi;
1598
- var Ui = "DropdownMenuRadioGroup", zi = h.forwardRef((e, t) => {
1599
- const { __scopeDropdownMenu: n, ...r } = e, o = Z(n);
1600
- return /* @__PURE__ */ a.jsx(Ei, { ...o, ...r, ref: t });
1601
- });
1602
- zi.displayName = Ui;
1603
- var Ki = "DropdownMenuRadioItem", Lr = h.forwardRef((e, t) => {
1604
- const { __scopeDropdownMenu: n, ...r } = e, o = Z(n);
1605
- return /* @__PURE__ */ a.jsx(Di, { ...o, ...r, ref: t });
1606
- });
1607
- Lr.displayName = Ki;
1608
- var qi = "DropdownMenuItemIndicator", Br = h.forwardRef((e, t) => {
1609
- const { __scopeDropdownMenu: n, ...r } = e, o = Z(n);
1610
- return /* @__PURE__ */ a.jsx(Pi, { ...o, ...r, ref: t });
1611
- });
1612
- Br.displayName = qi;
1613
- var Qi = "DropdownMenuSeparator", Hr = h.forwardRef((e, t) => {
1614
- const { __scopeDropdownMenu: n, ...r } = e, o = Z(n);
1615
- return /* @__PURE__ */ a.jsx(ji, { ...o, ...r, ref: t });
1616
- });
1617
- Hr.displayName = Qi;
1618
- var Vi = "DropdownMenuArrow", Gi = h.forwardRef(
1619
- (e, t) => {
1620
- const { __scopeDropdownMenu: n, ...r } = e, o = Z(n);
1621
- return /* @__PURE__ */ a.jsx(Ni, { ...o, ...r, ref: t });
1622
- }
1623
- );
1624
- Gi.displayName = Vi;
1625
- var Wi = (e) => {
1626
- const { __scopeDropdownMenu: t, children: n, open: r, onOpenChange: o, defaultOpen: s } = e, i = Z(t), [l = !1, u] = Hn({
1627
- prop: r,
1628
- defaultProp: s,
1629
- onChange: o
1630
- });
1631
- return /* @__PURE__ */ a.jsx(Ti, { ...i, open: l, onOpenChange: u, children: n });
1632
- }, Yi = "DropdownMenuSubTrigger", Ur = h.forwardRef((e, t) => {
1633
- const { __scopeDropdownMenu: n, ...r } = e, o = Z(n);
1634
- return /* @__PURE__ */ a.jsx(_i, { ...o, ...r, ref: t });
1635
- });
1636
- Ur.displayName = Yi;
1637
- var Xi = "DropdownMenuSubContent", zr = h.forwardRef((e, t) => {
1638
- const { __scopeDropdownMenu: n, ...r } = e, o = Z(n);
1639
- return /* @__PURE__ */ a.jsx(
1640
- Oi,
1641
- {
1642
- ...o,
1643
- ...r,
1644
- ref: t,
1645
- style: {
1646
- ...e.style,
1647
- "--radix-dropdown-menu-content-transform-origin": "var(--radix-popper-transform-origin)",
1648
- "--radix-dropdown-menu-content-available-width": "var(--radix-popper-available-width)",
1649
- "--radix-dropdown-menu-content-available-height": "var(--radix-popper-available-height)",
1650
- "--radix-dropdown-menu-trigger-width": "var(--radix-popper-anchor-width)",
1651
- "--radix-dropdown-menu-trigger-height": "var(--radix-popper-anchor-height)"
1652
- }
1653
- }
1654
- );
1655
- });
1656
- zr.displayName = Xi;
1657
- var Zi = Nr, Ji = _r, Kr = Or, qr = Ar, Qr = kr, Vr = $r, Gr = Fr, Wr = Lr, Yr = Br, Xr = Hr, el = Wi, Zr = Ur, Jr = zr;
1658
- const tl = Zi, nl = Ji, rl = Kr, al = el, ea = h.forwardRef(({ className: e, inset: t, children: n, ...r }, o) => /* @__PURE__ */ a.jsxs(
1659
- Zr,
1660
- {
1661
- ref: o,
1662
- className: F(
1663
- "flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",
1664
- t && "pl-8",
1665
- e
1666
- ),
1667
- ...r,
1668
- children: [
1669
- n,
1670
- /* @__PURE__ */ a.jsx(Zn, { className: "ml-auto h-4 w-4" })
1671
- ]
1672
- }
1673
- ));
1674
- ea.displayName = Zr.displayName;
1675
- const ta = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ a.jsx(
1676
- Jr,
1677
- {
1678
- ref: n,
1679
- className: F(
1680
- "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
1681
- e
1682
- ),
1683
- ...t
1684
- }
1685
- ));
1686
- ta.displayName = Jr.displayName;
1687
- const na = h.forwardRef(({ className: e, sideOffset: t = 4, ...n }, r) => /* @__PURE__ */ a.jsx(Kr, { children: /* @__PURE__ */ a.jsx(
1688
- qr,
1689
- {
1690
- ref: r,
1691
- sideOffset: t,
1692
- className: F(
1693
- "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md",
1694
- "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
1695
- e
1696
- ),
1697
- ...n
1698
- }
1699
- ) }));
1700
- na.displayName = qr.displayName;
1701
- const ra = h.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */ a.jsx(
1702
- Vr,
1703
- {
1704
- ref: r,
1705
- className: F(
1706
- "relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
1707
- t && "pl-8",
1708
- e
1709
- ),
1710
- ...n
1711
- }
1712
- ));
1713
- ra.displayName = Vr.displayName;
1714
- const ol = h.forwardRef(({ className: e, children: t, checked: n, ...r }, o) => /* @__PURE__ */ a.jsxs(
1715
- Gr,
1716
- {
1717
- ref: o,
1718
- className: F(
1719
- "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
1720
- e
1721
- ),
1722
- checked: n,
1723
- ...r,
1724
- children: [
1725
- /* @__PURE__ */ a.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ a.jsx(Yr, { children: /* @__PURE__ */ a.jsx(qo, { className: "h-4 w-4" }) }) }),
1726
- t
1727
- ]
1728
- }
1729
- ));
1730
- ol.displayName = Gr.displayName;
1731
- const sl = h.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ a.jsxs(
1732
- Wr,
1733
- {
1734
- ref: r,
1735
- className: F(
1736
- "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
1737
- e
1738
- ),
1739
- ...n,
1740
- children: [
1741
- /* @__PURE__ */ a.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ a.jsx(Yr, { children: /* @__PURE__ */ a.jsx(Qo, { className: "h-4 w-4 fill-current" }) }) }),
1742
- t
1743
- ]
1744
- }
1745
- ));
1746
- sl.displayName = Wr.displayName;
1747
- const aa = h.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */ a.jsx(
1748
- Qr,
1749
- {
1750
- ref: r,
1751
- className: F(
1752
- "px-2 py-1.5 text-sm font-semibold",
1753
- t && "pl-8",
1754
- e
1755
- ),
1756
- ...n
1757
- }
1758
- ));
1759
- aa.displayName = Qr.displayName;
1760
- const oa = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ a.jsx(
1761
- Xr,
1762
- {
1763
- ref: n,
1764
- className: F("-mx-1 my-1 h-px bg-muted", e),
1765
- ...t
1766
- }
1767
- ));
1768
- oa.displayName = Xr.displayName;
1769
- const En = {
883
+ const J = globalThis;
884
+ (!J.requestIdleCallback || !J.cancelIdleCallback) && (J.requestIdleCallback = (t) => setTimeout(t, 1), J.cancelIdleCallback = clearTimeout);
885
+ const De = {
1770
886
  info: "bg-blue-500",
1771
887
  note: "bg-gray-500",
1772
888
  tip: "bg-green-600",
1773
889
  caution: "bg-orange-500",
1774
890
  danger: "bg-rose-500"
1775
- }, il = () => {
1776
- const { page: e } = Ae(), [t, n] = Ie(!0);
1777
- if (!(e != null && e.banner) || !t)
891
+ }, Jr = () => {
892
+ const { page: t } = L(), [e, r] = Q(!0);
893
+ if (!(t != null && t.banner) || !e)
1778
894
  return /* @__PURE__ */ a.jsx("style", { children: ":root { --banner-height: 0px; }" });
1779
- const r = e.banner.color && e.banner.color in En ? En[e.banner.color] : e.banner.color ? void 0 : "bg-primary", o = r ? {} : { backgroundColor: e.banner.color };
895
+ const s = t.banner.color && t.banner.color in De ? De[t.banner.color] : t.banner.color ? void 0 : "bg-primary", n = s ? {} : { backgroundColor: t.banner.color };
1780
896
  return /* @__PURE__ */ a.jsxs(
1781
897
  "div",
1782
898
  {
1783
- className: F(
899
+ className: M(
1784
900
  "relative text-primary-foreground text-sm font-medium px-4 py-2 flex gap-2 items-center",
1785
- r
901
+ s
1786
902
  ),
1787
- style: o,
903
+ style: n,
1788
904
  children: [
1789
- /* @__PURE__ */ a.jsx("div", { className: "w-full", children: e.banner.message }),
1790
- e.banner.dismissible && /* @__PURE__ */ a.jsx(
905
+ /* @__PURE__ */ a.jsx("div", { className: "w-full", children: t.banner.message }),
906
+ t.banner.dismissible && /* @__PURE__ */ a.jsx(
1791
907
  "button",
1792
908
  {
1793
909
  type: "button",
1794
910
  className: "md:absolute md:right-4 -m-1.5 p-1.5 hover:bg-accent-foreground/10 rounded-md",
1795
- onClick: () => n(!1),
1796
- children: /* @__PURE__ */ a.jsx(Vo, { size: 16 })
911
+ onClick: () => r(!1),
912
+ children: /* @__PURE__ */ a.jsx(Xt, { size: 16 })
1797
913
  }
1798
914
  )
1799
915
  ]
1800
916
  }
1801
917
  );
1802
- };
1803
- function ll(e) {
1804
- if (typeof document > "u") return;
1805
- let t = document.head || document.getElementsByTagName("head")[0], n = document.createElement("style");
1806
- n.type = "text/css", t.appendChild(n), n.styleSheet ? n.styleSheet.cssText = e : n.appendChild(document.createTextNode(e));
1807
- }
1808
- const sa = p.createContext({
1809
- drawerRef: {
1810
- current: null
1811
- },
1812
- overlayRef: {
1813
- current: null
1814
- },
1815
- onPress: () => {
1816
- },
1817
- onRelease: () => {
1818
- },
1819
- onDrag: () => {
1820
- },
1821
- onNestedDrag: () => {
1822
- },
1823
- onNestedOpenChange: () => {
1824
- },
1825
- onNestedRelease: () => {
1826
- },
1827
- openProp: void 0,
1828
- dismissible: !1,
1829
- isOpen: !1,
1830
- isDragging: !1,
1831
- keyboardIsOpen: {
1832
- current: !1
1833
- },
1834
- snapPointsOffset: null,
1835
- snapPoints: null,
1836
- handleOnly: !1,
1837
- modal: !1,
1838
- shouldFade: !1,
1839
- activeSnapPoint: null,
1840
- onOpenChange: () => {
1841
- },
1842
- setActiveSnapPoint: () => {
1843
- },
1844
- closeDrawer: () => {
1845
- },
1846
- direction: "bottom",
1847
- shouldAnimate: {
1848
- current: !0
1849
- },
1850
- shouldScaleBackground: !1,
1851
- setBackgroundColorOnScale: !0,
1852
- noBodyStyles: !1,
1853
- container: null,
1854
- autoFocus: !1
1855
- }), Qe = () => {
1856
- const e = p.useContext(sa);
1857
- if (!e)
1858
- throw new Error("useDrawerContext must be used within a Drawer.Root");
1859
- return e;
1860
- };
1861
- ll(`[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1);animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--initial-transform,100%),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--initial-transform,100%),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-animate=false]{animation:none!important}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true])::after{content:'';position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not(
1862
- [data-state=closed]
1863
- ){opacity:0}[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:active,[data-vaul-handle]:hover{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover:hover) and (pointer:fine){[data-vaul-drawer]{user-select:none}}@media (pointer:fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{from{transform:translate3d(0,var(--initial-transform,100%),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToBottom{to{transform:translate3d(0,var(--initial-transform,100%),0)}}@keyframes slideFromTop{from{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToTop{to{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}}@keyframes slideFromLeft{from{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToLeft{to{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}}@keyframes slideFromRight{from{transform:translate3d(var(--initial-transform,100%),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToRight{to{transform:translate3d(var(--initial-transform,100%),0,0)}}`);
1864
- function cl() {
1865
- const e = navigator.userAgent;
1866
- return typeof window < "u" && (/Firefox/.test(e) && /Mobile/.test(e) || // Android Firefox
1867
- /FxiOS/.test(e));
1868
- }
1869
- function ul() {
1870
- return Jt(/^Mac/);
1871
- }
1872
- function dl() {
1873
- return Jt(/^iPhone/);
1874
- }
1875
- function Dn() {
1876
- return /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
1877
- }
1878
- function fl() {
1879
- return Jt(/^iPad/) || // iPadOS 13 lies and says it's a Mac, but we can distinguish by detecting touch support.
1880
- ul() && navigator.maxTouchPoints > 1;
1881
- }
1882
- function ia() {
1883
- return dl() || fl();
1884
- }
1885
- function Jt(e) {
1886
- return typeof window < "u" && window.navigator != null ? e.test(window.navigator.platform) : void 0;
1887
- }
1888
- const hl = 24, pl = typeof window < "u" ? Ro : Ce;
1889
- function Pn(...e) {
1890
- return (...t) => {
1891
- for (let n of e)
1892
- typeof n == "function" && n(...t);
1893
- };
1894
- }
1895
- const Et = typeof document < "u" && window.visualViewport;
1896
- function jn(e) {
1897
- let t = window.getComputedStyle(e);
1898
- return /(auto|scroll)/.test(t.overflow + t.overflowX + t.overflowY);
1899
- }
1900
- function la(e) {
1901
- for (jn(e) && (e = e.parentElement); e && !jn(e); )
1902
- e = e.parentElement;
1903
- return e || document.scrollingElement || document.documentElement;
1904
- }
1905
- const ml = /* @__PURE__ */ new Set([
1906
- "checkbox",
1907
- "radio",
1908
- "range",
1909
- "color",
1910
- "file",
1911
- "image",
1912
- "button",
1913
- "submit",
1914
- "reset"
1915
- ]);
1916
- let ht = 0, Dt;
1917
- function gl(e = {}) {
1918
- let { isDisabled: t } = e;
1919
- pl(() => {
1920
- if (!t)
1921
- return ht++, ht === 1 && ia() && (Dt = vl()), () => {
1922
- ht--, ht === 0 && (Dt == null || Dt());
1923
- };
1924
- }, [
1925
- t
1926
- ]);
1927
- }
1928
- function vl() {
1929
- let e, t = 0, n = (c) => {
1930
- e = la(c.target), !(e === document.documentElement && e === document.body) && (t = c.changedTouches[0].pageY);
1931
- }, r = (c) => {
1932
- if (!e || e === document.documentElement || e === document.body) {
1933
- c.preventDefault();
1934
- return;
1935
- }
1936
- let d = c.changedTouches[0].pageY, R = e.scrollTop, C = e.scrollHeight - e.clientHeight;
1937
- C !== 0 && ((R <= 0 && d > t || R >= C && d < t) && c.preventDefault(), t = d);
1938
- }, o = (c) => {
1939
- let d = c.target;
1940
- Ot(d) && d !== document.activeElement && (c.preventDefault(), d.style.transform = "translateY(-2000px)", d.focus(), requestAnimationFrame(() => {
1941
- d.style.transform = "";
1942
- }));
1943
- }, s = (c) => {
1944
- let d = c.target;
1945
- Ot(d) && (d.style.transform = "translateY(-2000px)", requestAnimationFrame(() => {
1946
- d.style.transform = "", Et && (Et.height < window.innerHeight ? requestAnimationFrame(() => {
1947
- Nn(d);
1948
- }) : Et.addEventListener("resize", () => Nn(d), {
1949
- once: !0
1950
- }));
1951
- }));
1952
- }, i = () => {
1953
- window.scrollTo(0, 0);
1954
- }, l = window.pageXOffset, u = window.pageYOffset, m = Pn(wl(document.documentElement, "paddingRight", `${window.innerWidth - document.documentElement.clientWidth}px`));
1955
- window.scrollTo(0, 0);
1956
- let f = Pn(We(document, "touchstart", n, {
1957
- passive: !1,
1958
- capture: !0
1959
- }), We(document, "touchmove", r, {
1960
- passive: !1,
1961
- capture: !0
1962
- }), We(document, "touchend", o, {
1963
- passive: !1,
1964
- capture: !0
1965
- }), We(document, "focus", s, !0), We(window, "scroll", i));
1966
- return () => {
1967
- m(), f(), window.scrollTo(l, u);
1968
- };
1969
- }
1970
- function wl(e, t, n) {
1971
- let r = e.style[t];
1972
- return e.style[t] = n, () => {
1973
- e.style[t] = r;
1974
- };
1975
- }
1976
- function We(e, t, n, r) {
1977
- return e.addEventListener(t, n, r), () => {
1978
- e.removeEventListener(t, n, r);
1979
- };
1980
- }
1981
- function Nn(e) {
1982
- let t = document.scrollingElement || document.documentElement;
1983
- for (; e && e !== t; ) {
1984
- let n = la(e);
1985
- if (n !== document.documentElement && n !== document.body && n !== e) {
1986
- let r = n.getBoundingClientRect().top, o = e.getBoundingClientRect().top, s = e.getBoundingClientRect().bottom;
1987
- const i = n.getBoundingClientRect().bottom + hl;
1988
- s > i && (n.scrollTop += o - r);
1989
- }
1990
- e = n.parentElement;
1991
- }
1992
- }
1993
- function Ot(e) {
1994
- return e instanceof HTMLInputElement && !ml.has(e.type) || e instanceof HTMLTextAreaElement || e instanceof HTMLElement && e.isContentEditable;
1995
- }
1996
- function yl(e, t) {
1997
- typeof e == "function" ? e(t) : e != null && (e.current = t);
1998
- }
1999
- function xl(...e) {
2000
- return (t) => e.forEach((n) => yl(n, t));
2001
- }
2002
- function ca(...e) {
2003
- return h.useCallback(xl(...e), e);
2004
- }
2005
- const ua = /* @__PURE__ */ new WeakMap();
2006
- function H(e, t, n = !1) {
2007
- if (!e || !(e instanceof HTMLElement)) return;
2008
- let r = {};
2009
- Object.entries(t).forEach(([o, s]) => {
2010
- if (o.startsWith("--")) {
2011
- e.style.setProperty(o, s);
2012
- return;
2013
- }
2014
- r[o] = e.style[o], e.style[o] = s;
2015
- }), !n && ua.set(e, r);
2016
- }
2017
- function bl(e, t) {
2018
- if (!e || !(e instanceof HTMLElement)) return;
2019
- let n = ua.get(e);
2020
- n && (e.style[t] = n[t]);
2021
- }
2022
- const U = (e) => {
2023
- switch (e) {
2024
- case "top":
2025
- case "bottom":
2026
- return !0;
2027
- case "left":
2028
- case "right":
2029
- return !1;
2030
- default:
2031
- return e;
2032
- }
2033
- };
2034
- function pt(e, t) {
2035
- if (!e)
2036
- return null;
2037
- const n = window.getComputedStyle(e), r = (
2038
- // @ts-ignore
2039
- n.transform || n.webkitTransform || n.mozTransform
2040
- );
2041
- let o = r.match(/^matrix3d\((.+)\)$/);
2042
- return o ? parseFloat(o[1].split(", ")[U(t) ? 13 : 12]) : (o = r.match(/^matrix\((.+)\)$/), o ? parseFloat(o[1].split(", ")[U(t) ? 5 : 4]) : null);
2043
- }
2044
- function Sl(e) {
2045
- return 8 * (Math.log(e + 1) - 2);
2046
- }
2047
- function Pt(e, t) {
2048
- if (!e) return () => {
2049
- };
2050
- const n = e.style.cssText;
2051
- return Object.assign(e.style, t), () => {
2052
- e.style.cssText = n;
2053
- };
2054
- }
2055
- function Cl(...e) {
2056
- return (...t) => {
2057
- for (const n of e)
2058
- typeof n == "function" && n(...t);
2059
- };
2060
- }
2061
- const k = {
2062
- DURATION: 0.5,
2063
- EASE: [
2064
- 0.32,
2065
- 0.72,
2066
- 0,
2067
- 1
2068
- ]
2069
- }, da = 0.4, Ml = 0.25, Rl = 100, fa = 8, Oe = 16, It = 26, jt = "vaul-dragging";
2070
- function ha(e) {
2071
- const t = p.useRef(e);
2072
- return p.useEffect(() => {
2073
- t.current = e;
2074
- }), p.useMemo(() => (...n) => t.current == null ? void 0 : t.current.call(t, ...n), []);
2075
- }
2076
- function El({ defaultProp: e, onChange: t }) {
2077
- const n = p.useState(e), [r] = n, o = p.useRef(r), s = ha(t);
2078
- return p.useEffect(() => {
2079
- o.current !== r && (s(r), o.current = r);
2080
- }, [
2081
- r,
2082
- o,
2083
- s
2084
- ]), n;
2085
- }
2086
- function pa({ prop: e, defaultProp: t, onChange: n = () => {
2087
- } }) {
2088
- const [r, o] = El({
2089
- defaultProp: t,
2090
- onChange: n
2091
- }), s = e !== void 0, i = s ? e : r, l = ha(n), u = p.useCallback((m) => {
2092
- if (s) {
2093
- const c = typeof m == "function" ? m(e) : m;
2094
- c !== e && l(c);
2095
- } else
2096
- o(m);
2097
- }, [
2098
- s,
2099
- e,
2100
- o,
2101
- l
2102
- ]);
2103
- return [
2104
- i,
2105
- u
2106
- ];
2107
- }
2108
- function Dl({ activeSnapPointProp: e, setActiveSnapPointProp: t, snapPoints: n, drawerRef: r, overlayRef: o, fadeFromIndex: s, onSnapPointChange: i, direction: l = "bottom", container: u, snapToSequentialPoint: m }) {
2109
- const [f, c] = pa({
2110
- prop: e,
2111
- defaultProp: n == null ? void 0 : n[0],
2112
- onChange: t
2113
- }), [d, R] = p.useState(typeof window < "u" ? {
2114
- innerWidth: window.innerWidth,
2115
- innerHeight: window.innerHeight
2116
- } : void 0);
2117
- p.useEffect(() => {
2118
- function b() {
2119
- R({
2120
- innerWidth: window.innerWidth,
2121
- innerHeight: window.innerHeight
2122
- });
2123
- }
2124
- return window.addEventListener("resize", b), () => window.removeEventListener("resize", b);
2125
- }, []);
2126
- const C = p.useMemo(() => f === (n == null ? void 0 : n[n.length - 1]) || null, [
2127
- n,
2128
- f
2129
- ]), g = p.useMemo(() => {
2130
- var b;
2131
- return (b = n == null ? void 0 : n.findIndex((j) => j === f)) != null ? b : null;
2132
- }, [
2133
- n,
2134
- f
2135
- ]), T = n && n.length > 0 && (s || s === 0) && !Number.isNaN(s) && n[s] === f || !n, M = p.useMemo(() => {
2136
- const b = u ? {
2137
- width: u.getBoundingClientRect().width,
2138
- height: u.getBoundingClientRect().height
2139
- } : typeof window < "u" ? {
2140
- width: window.innerWidth,
2141
- height: window.innerHeight
2142
- } : {
2143
- width: 0,
2144
- height: 0
2145
- };
2146
- var j;
2147
- return (j = n == null ? void 0 : n.map((D) => {
2148
- const B = typeof D == "string";
2149
- let K = 0;
2150
- if (B && (K = parseInt(D, 10)), U(l)) {
2151
- const y = B ? K : d ? D * b.height : 0;
2152
- return d ? l === "bottom" ? b.height - y : -b.height + y : y;
2153
- }
2154
- const W = B ? K : d ? D * b.width : 0;
2155
- return d ? l === "right" ? b.width - W : -b.width + W : W;
2156
- })) != null ? j : [];
2157
- }, [
2158
- n,
2159
- d,
2160
- u
2161
- ]), A = p.useMemo(() => g !== null ? M == null ? void 0 : M[g] : null, [
2162
- M,
2163
- g
2164
- ]), P = p.useCallback((b) => {
2165
- var j;
2166
- const D = (j = M == null ? void 0 : M.findIndex((B) => B === b)) != null ? j : null;
2167
- i(D), H(r.current, {
2168
- transition: `transform ${k.DURATION}s cubic-bezier(${k.EASE.join(",")})`,
2169
- transform: U(l) ? `translate3d(0, ${b}px, 0)` : `translate3d(${b}px, 0, 0)`
2170
- }), M && D !== M.length - 1 && s !== void 0 && D !== s && D < s ? H(o.current, {
2171
- transition: `opacity ${k.DURATION}s cubic-bezier(${k.EASE.join(",")})`,
2172
- opacity: "0"
2173
- }) : H(o.current, {
2174
- transition: `opacity ${k.DURATION}s cubic-bezier(${k.EASE.join(",")})`,
2175
- opacity: "1"
2176
- }), c(n == null ? void 0 : n[Math.max(D, 0)]);
2177
- }, [
2178
- r.current,
2179
- n,
2180
- M,
2181
- s,
2182
- o,
2183
- c
2184
- ]);
2185
- p.useEffect(() => {
2186
- if (f || e) {
2187
- var b;
2188
- const j = (b = n == null ? void 0 : n.findIndex((D) => D === e || D === f)) != null ? b : -1;
2189
- M && j !== -1 && typeof M[j] == "number" && P(M[j]);
2190
- }
2191
- }, [
2192
- f,
2193
- e,
2194
- n,
2195
- M,
2196
- P
2197
- ]);
2198
- function v({ draggedDistance: b, closeDrawer: j, velocity: D, dismissible: B }) {
2199
- if (s === void 0) return;
2200
- const K = l === "bottom" || l === "right" ? (A ?? 0) - b : (A ?? 0) + b, W = g === s - 1, y = g === 0, V = b > 0;
2201
- if (W && H(o.current, {
2202
- transition: `opacity ${k.DURATION}s cubic-bezier(${k.EASE.join(",")})`
2203
- }), !m && D > 2 && !V) {
2204
- B ? j() : P(M[0]);
2205
- return;
2206
- }
2207
- if (!m && D > 2 && V && M && n) {
2208
- P(M[n.length - 1]);
918
+ }, tt = () => {
919
+ const t = L(), [e, r] = Q(!1), s = Le(() => r(!1), []);
920
+ F(() => {
921
+ if (e)
2209
922
  return;
923
+ function o(i) {
924
+ i.key === "k" && (i.metaKey || i.ctrlKey) && (i.preventDefault(), r(!0));
2210
925
  }
2211
- const G = M == null ? void 0 : M.reduce((q, Y) => typeof q != "number" || typeof Y != "number" ? q : Math.abs(Y - K) < Math.abs(q - K) ? Y : q), te = U(l) ? window.innerHeight : window.innerWidth;
2212
- if (D > da && Math.abs(b) < te * 0.4) {
2213
- const q = V ? 1 : -1;
2214
- if (q > 0 && C && n) {
2215
- P(M[n.length - 1]);
2216
- return;
2217
- }
2218
- if (y && q < 0 && B && j(), g === null) return;
2219
- P(M[g + q]);
2220
- return;
2221
- }
2222
- P(G);
2223
- }
2224
- function z({ draggedDistance: b }) {
2225
- if (A === null) return;
2226
- const j = l === "bottom" || l === "right" ? A - b : A + b;
2227
- (l === "bottom" || l === "right") && j < M[M.length - 1] || (l === "top" || l === "left") && j > M[M.length - 1] || H(r.current, {
2228
- transform: U(l) ? `translate3d(0, ${j}px, 0)` : `translate3d(${j}px, 0, 0)`
2229
- });
2230
- }
2231
- function J(b, j) {
2232
- if (!n || typeof g != "number" || !M || s === void 0) return null;
2233
- const D = g === s - 1;
2234
- if (g >= s && j)
2235
- return 0;
2236
- if (D && !j) return 1;
2237
- if (!T && !D) return null;
2238
- const K = D ? g + 1 : g - 1, W = D ? M[K] - M[K - 1] : M[K + 1] - M[K], y = b / Math.abs(W);
2239
- return D ? 1 - y : y;
2240
- }
2241
- return {
2242
- isLastSnapPoint: C,
2243
- activeSnapPoint: f,
2244
- shouldFade: T,
2245
- getPercentageDragged: J,
2246
- setActiveSnapPoint: c,
2247
- activeSnapPointIndex: g,
2248
- onRelease: v,
2249
- onDrag: z,
2250
- snapPointsOffset: M
2251
- };
2252
- }
2253
- const Pl = () => () => {
2254
- };
2255
- function jl() {
2256
- const { direction: e, isOpen: t, shouldScaleBackground: n, setBackgroundColorOnScale: r, noBodyStyles: o } = Qe(), s = p.useRef(null), i = mt(() => document.body.style.backgroundColor, []);
2257
- function l() {
2258
- return (window.innerWidth - It) / window.innerWidth;
2259
- }
2260
- p.useEffect(() => {
2261
- if (t && n) {
2262
- s.current && clearTimeout(s.current);
2263
- const u = document.querySelector("[data-vaul-drawer-wrapper]") || document.querySelector("[vaul-drawer-wrapper]");
2264
- if (!u) return;
2265
- Cl(r && !o ? Pt(document.body, {
2266
- background: "black"
2267
- }) : Pl, Pt(u, {
2268
- transformOrigin: U(e) ? "top" : "left",
2269
- transitionProperty: "transform, border-radius",
2270
- transitionDuration: `${k.DURATION}s`,
2271
- transitionTimingFunction: `cubic-bezier(${k.EASE.join(",")})`
2272
- }));
2273
- const m = Pt(u, {
2274
- borderRadius: `${fa}px`,
2275
- overflow: "hidden",
2276
- ...U(e) ? {
2277
- transform: `scale(${l()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`
2278
- } : {
2279
- transform: `scale(${l()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`
2280
- }
2281
- });
2282
- return () => {
2283
- m(), s.current = window.setTimeout(() => {
2284
- i ? document.body.style.background = i : document.body.style.removeProperty("background");
2285
- }, k.DURATION * 1e3);
2286
- };
2287
- }
2288
- }, [
2289
- t,
2290
- n,
2291
- i
2292
- ]);
2293
- }
2294
- let Ye = null;
2295
- function Nl({ isOpen: e, modal: t, nested: n, hasBeenOpened: r, preventScrollRestoration: o, noBodyStyles: s }) {
2296
- const [i, l] = p.useState(() => typeof window < "u" ? window.location.href : ""), u = p.useRef(0), m = p.useCallback(() => {
2297
- if (Dn() && Ye === null && e && !s) {
2298
- Ye = {
2299
- position: document.body.style.position,
2300
- top: document.body.style.top,
2301
- left: document.body.style.left,
2302
- height: document.body.style.height,
2303
- right: "unset"
2304
- };
2305
- const { scrollX: c, innerHeight: d } = window;
2306
- document.body.style.setProperty("position", "fixed", "important"), Object.assign(document.body.style, {
2307
- top: `${-u.current}px`,
2308
- left: `${-c}px`,
2309
- right: "0px",
2310
- height: "auto"
2311
- }), window.setTimeout(() => window.requestAnimationFrame(() => {
2312
- const R = d - window.innerHeight;
2313
- R && u.current >= d && (document.body.style.top = `${-(u.current + R)}px`);
2314
- }), 300);
2315
- }
2316
- }, [
2317
- e
2318
- ]), f = p.useCallback(() => {
2319
- if (Dn() && Ye !== null && !s) {
2320
- const c = -parseInt(document.body.style.top, 10), d = -parseInt(document.body.style.left, 10);
2321
- Object.assign(document.body.style, Ye), window.requestAnimationFrame(() => {
2322
- if (o && i !== window.location.href) {
2323
- l(window.location.href);
2324
- return;
2325
- }
2326
- window.scrollTo(d, c);
2327
- }), Ye = null;
2328
- }
2329
- }, [
2330
- i
2331
- ]);
2332
- return p.useEffect(() => {
2333
- function c() {
2334
- u.current = window.scrollY;
2335
- }
2336
- return c(), window.addEventListener("scroll", c), () => {
2337
- window.removeEventListener("scroll", c);
926
+ return window.addEventListener("keydown", o), () => {
927
+ window.removeEventListener("keydown", o);
2338
928
  };
2339
- }, []), p.useEffect(() => {
2340
- if (t)
2341
- return () => {
2342
- typeof document > "u" || document.querySelector("[data-vaul-drawer]") || f();
2343
- };
2344
- }, [
2345
- t,
2346
- f
2347
- ]), p.useEffect(() => {
2348
- n || !r || (e ? (!window.matchMedia("(display-mode: standalone)").matches && m(), t || window.setTimeout(() => {
2349
- f();
2350
- }, 500)) : f());
2351
- }, [
2352
- e,
2353
- r,
2354
- i,
2355
- t,
2356
- n,
2357
- m,
2358
- f
2359
- ]), {
2360
- restorePositionSetting: f
2361
- };
2362
- }
2363
- function ma({ open: e, onOpenChange: t, children: n, onDrag: r, onRelease: o, snapPoints: s, shouldScaleBackground: i = !1, setBackgroundColorOnScale: l = !0, closeThreshold: u = Ml, scrollLockTimeout: m = Rl, dismissible: f = !0, handleOnly: c = !1, fadeFromIndex: d = s && s.length - 1, activeSnapPoint: R, setActiveSnapPoint: C, fixed: g, modal: T = !0, onClose: M, nested: A, noBodyStyles: P = !1, direction: v = "bottom", defaultOpen: z = !1, disablePreventScroll: J = !0, snapToSequentialPoint: b = !1, preventScrollRestoration: j = !1, repositionInputs: D = !0, onAnimationEnd: B, container: K, autoFocus: W = !1 }) {
2364
- var y, V;
2365
- const [G = !1, te] = pa({
2366
- defaultProp: z,
2367
- prop: e,
2368
- onChange: (S) => {
2369
- t == null || t(S), !S && !A && Oa(), setTimeout(() => {
2370
- B == null || B(S);
2371
- }, k.DURATION * 1e3), S && !T && typeof window < "u" && window.requestAnimationFrame(() => {
2372
- document.body.style.pointerEvents = "auto";
2373
- }), S || (document.body.style.pointerEvents = "auto");
2374
- }
2375
- }), [q, Y] = p.useState(!1), [x, Q] = p.useState(!1), [ie, de] = p.useState(!1), pe = p.useRef(null), Me = p.useRef(null), $e = p.useRef(null), xe = p.useRef(null), le = p.useRef(null), Re = p.useRef(!1), re = p.useRef(null), Fe = p.useRef(0), Le = p.useRef(!1), an = p.useRef(!z), on = p.useRef(0), E = p.useRef(null), sn = p.useRef(((y = E.current) == null ? void 0 : y.getBoundingClientRect().height) || 0), ln = p.useRef(((V = E.current) == null ? void 0 : V.getBoundingClientRect().width) || 0), Ct = p.useRef(0), Pa = p.useCallback((S) => {
2376
- s && S === Ve.length - 1 && (Me.current = /* @__PURE__ */ new Date());
2377
- }, []), { activeSnapPoint: ja, activeSnapPointIndex: Be, setActiveSnapPoint: cn, onRelease: Na, snapPointsOffset: Ve, onDrag: Ta, shouldFade: un, getPercentageDragged: _a } = Dl({
2378
- snapPoints: s,
2379
- activeSnapPointProp: R,
2380
- setActiveSnapPointProp: C,
2381
- drawerRef: E,
2382
- fadeFromIndex: d,
2383
- overlayRef: pe,
2384
- onSnapPointChange: Pa,
2385
- direction: v,
2386
- container: K,
2387
- snapToSequentialPoint: b
2388
- });
2389
- gl({
2390
- isDisabled: !G || x || !T || ie || !q || !D || !J
2391
- });
2392
- const { restorePositionSetting: Oa } = Nl({
2393
- isOpen: G,
2394
- modal: T,
2395
- nested: A ?? !1,
2396
- hasBeenOpened: q,
2397
- preventScrollRestoration: j,
2398
- noBodyStyles: P
2399
- });
2400
- function lt() {
2401
- return (window.innerWidth - It) / window.innerWidth;
2402
- }
2403
- function Ia(S) {
2404
- var _, O;
2405
- !f && !s || E.current && !E.current.contains(S.target) || (sn.current = ((_ = E.current) == null ? void 0 : _.getBoundingClientRect().height) || 0, ln.current = ((O = E.current) == null ? void 0 : O.getBoundingClientRect().width) || 0, Q(!0), $e.current = /* @__PURE__ */ new Date(), ia() && window.addEventListener("touchend", () => Re.current = !1, {
2406
- once: !0
2407
- }), S.target.setPointerCapture(S.pointerId), Fe.current = U(v) ? S.pageY : S.pageX);
2408
- }
2409
- function dn(S, _) {
2410
- var O;
2411
- let N = S;
2412
- const L = (O = window.getSelection()) == null ? void 0 : O.toString(), ne = E.current ? pt(E.current, v) : null, ee = /* @__PURE__ */ new Date();
2413
- if (N.tagName === "SELECT" || N.hasAttribute("data-vaul-no-drag") || N.closest("[data-vaul-no-drag]"))
2414
- return !1;
2415
- if (v === "right" || v === "left")
2416
- return !0;
2417
- if (Me.current && ee.getTime() - Me.current.getTime() < 500)
2418
- return !1;
2419
- if (ne !== null && (v === "bottom" ? ne > 0 : ne < 0))
2420
- return !0;
2421
- if (L && L.length > 0)
2422
- return !1;
2423
- if (le.current && ee.getTime() - le.current.getTime() < m && ne === 0 || _)
2424
- return le.current = ee, !1;
2425
- for (; N; ) {
2426
- if (N.scrollHeight > N.clientHeight) {
2427
- if (N.scrollTop !== 0)
2428
- return le.current = /* @__PURE__ */ new Date(), !1;
2429
- if (N.getAttribute("role") === "dialog")
2430
- return !0;
2431
- }
2432
- N = N.parentNode;
2433
- }
2434
- return !0;
2435
- }
2436
- function Aa(S) {
2437
- if (E.current && x) {
2438
- const _ = v === "bottom" || v === "right" ? 1 : -1, O = (Fe.current - (U(v) ? S.pageY : S.pageX)) * _, N = O > 0, L = s && !f && !N;
2439
- if (L && Be === 0) return;
2440
- const ne = Math.abs(O), ee = document.querySelector("[data-vaul-drawer-wrapper]"), Ee = v === "bottom" || v === "top" ? sn.current : ln.current;
2441
- let fe = ne / Ee;
2442
- const _e = _a(ne, N);
2443
- if (_e !== null && (fe = _e), L && fe >= 1 || !Re.current && !dn(S.target, N)) return;
2444
- if (E.current.classList.add(jt), Re.current = !0, H(E.current, {
2445
- transition: "none"
2446
- }), H(pe.current, {
2447
- transition: "none"
2448
- }), s && Ta({
2449
- draggedDistance: O
2450
- }), N && !s) {
2451
- const me = Sl(O), ct = Math.min(me * -1, 0) * _;
2452
- H(E.current, {
2453
- transform: U(v) ? `translate3d(0, ${ct}px, 0)` : `translate3d(${ct}px, 0, 0)`
2454
- });
2455
- return;
2456
- }
2457
- const De = 1 - fe;
2458
- if ((un || d && Be === d - 1) && (r == null || r(S, fe), H(pe.current, {
2459
- opacity: `${De}`,
2460
- transition: "none"
2461
- }, !0)), ee && pe.current && i) {
2462
- const me = Math.min(lt() + fe * (1 - lt()), 1), ct = 8 - fe * 8, hn = Math.max(0, 14 - fe * 14);
2463
- H(ee, {
2464
- borderRadius: `${ct}px`,
2465
- transform: U(v) ? `scale(${me}) translate3d(0, ${hn}px, 0)` : `scale(${me}) translate3d(${hn}px, 0, 0)`,
2466
- transition: "none"
2467
- }, !0);
2468
- }
2469
- if (!s) {
2470
- const me = ne * _;
2471
- H(E.current, {
2472
- transform: U(v) ? `translate3d(0, ${me}px, 0)` : `translate3d(${me}px, 0, 0)`
2473
- });
2474
- }
2475
- }
2476
- }
2477
- p.useEffect(() => {
2478
- window.requestAnimationFrame(() => {
2479
- an.current = !0;
2480
- });
2481
- }, []), p.useEffect(() => {
2482
- var S;
2483
- function _() {
2484
- if (!E.current || !D) return;
2485
- const O = document.activeElement;
2486
- if (Ot(O) || Le.current) {
2487
- var N;
2488
- const L = ((N = window.visualViewport) == null ? void 0 : N.height) || 0, ne = window.innerHeight;
2489
- let ee = ne - L;
2490
- const Ee = E.current.getBoundingClientRect().height || 0, fe = Ee > ne * 0.8;
2491
- Ct.current || (Ct.current = Ee);
2492
- const _e = E.current.getBoundingClientRect().top;
2493
- if (Math.abs(on.current - ee) > 60 && (Le.current = !Le.current), s && s.length > 0 && Ve && Be) {
2494
- const De = Ve[Be] || 0;
2495
- ee += De;
2496
- }
2497
- if (on.current = ee, Ee > L || Le.current) {
2498
- const De = E.current.getBoundingClientRect().height;
2499
- let me = De;
2500
- De > L && (me = L - (fe ? _e : It)), g ? E.current.style.height = `${De - Math.max(ee, 0)}px` : E.current.style.height = `${Math.max(me, L - _e)}px`;
2501
- } else cl() || (E.current.style.height = `${Ct.current}px`);
2502
- s && s.length > 0 && !Le.current ? E.current.style.bottom = "0px" : E.current.style.bottom = `${Math.max(ee, 0)}px`;
2503
- }
2504
- }
2505
- return (S = window.visualViewport) == null || S.addEventListener("resize", _), () => {
2506
- var O;
2507
- return (O = window.visualViewport) == null ? void 0 : O.removeEventListener("resize", _);
2508
- };
2509
- }, [
2510
- Be,
2511
- s,
2512
- Ve
2513
- ]);
2514
- function Ge(S) {
2515
- ka(), M == null || M(), S || te(!1), setTimeout(() => {
2516
- s && cn(s[0]);
2517
- }, k.DURATION * 1e3);
2518
- }
2519
- function fn() {
2520
- if (!E.current) return;
2521
- const S = document.querySelector("[data-vaul-drawer-wrapper]"), _ = pt(E.current, v);
2522
- H(E.current, {
2523
- transform: "translate3d(0, 0, 0)",
2524
- transition: `transform ${k.DURATION}s cubic-bezier(${k.EASE.join(",")})`
2525
- }), H(pe.current, {
2526
- transition: `opacity ${k.DURATION}s cubic-bezier(${k.EASE.join(",")})`,
2527
- opacity: "1"
2528
- }), i && _ && _ > 0 && G && H(S, {
2529
- borderRadius: `${fa}px`,
2530
- overflow: "hidden",
2531
- ...U(v) ? {
2532
- transform: `scale(${lt()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,
2533
- transformOrigin: "top"
2534
- } : {
2535
- transform: `scale(${lt()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,
2536
- transformOrigin: "left"
2537
- },
2538
- transitionProperty: "transform, border-radius",
2539
- transitionDuration: `${k.DURATION}s`,
2540
- transitionTimingFunction: `cubic-bezier(${k.EASE.join(",")})`
2541
- }, !0);
2542
- }
2543
- function ka() {
2544
- !x || !E.current || (E.current.classList.remove(jt), Re.current = !1, Q(!1), xe.current = /* @__PURE__ */ new Date());
2545
- }
2546
- function $a(S) {
2547
- if (!x || !E.current) return;
2548
- E.current.classList.remove(jt), Re.current = !1, Q(!1), xe.current = /* @__PURE__ */ new Date();
2549
- const _ = pt(E.current, v);
2550
- if (!S || !dn(S.target, !1) || !_ || Number.isNaN(_) || $e.current === null) return;
2551
- const O = xe.current.getTime() - $e.current.getTime(), N = Fe.current - (U(v) ? S.pageY : S.pageX), L = Math.abs(N) / O;
2552
- if (L > 0.05 && (de(!0), setTimeout(() => {
2553
- de(!1);
2554
- }, 200)), s) {
2555
- Na({
2556
- draggedDistance: N * (v === "bottom" || v === "right" ? 1 : -1),
2557
- closeDrawer: Ge,
2558
- velocity: L,
2559
- dismissible: f
2560
- }), o == null || o(S, !0);
2561
- return;
2562
- }
2563
- if (v === "bottom" || v === "right" ? N > 0 : N < 0) {
2564
- fn(), o == null || o(S, !0);
2565
- return;
2566
- }
2567
- if (L > da) {
2568
- Ge(), o == null || o(S, !1);
2569
- return;
2570
- }
2571
- var ne;
2572
- const ee = Math.min((ne = E.current.getBoundingClientRect().height) != null ? ne : 0, window.innerHeight);
2573
- var Ee;
2574
- const fe = Math.min((Ee = E.current.getBoundingClientRect().width) != null ? Ee : 0, window.innerWidth), _e = v === "left" || v === "right";
2575
- if (Math.abs(_) >= (_e ? fe : ee) * u) {
2576
- Ge(), o == null || o(S, !1);
2577
- return;
2578
- }
2579
- o == null || o(S, !0), fn();
2580
- }
2581
- p.useEffect(() => (G && (H(document.documentElement, {
2582
- scrollBehavior: "auto"
2583
- }), Me.current = /* @__PURE__ */ new Date()), () => {
2584
- bl(document.documentElement, "scrollBehavior");
2585
- }), [
2586
- G
2587
- ]);
2588
- function Fa(S) {
2589
- const _ = S ? (window.innerWidth - Oe) / window.innerWidth : 1, O = S ? -Oe : 0;
2590
- re.current && window.clearTimeout(re.current), H(E.current, {
2591
- transition: `transform ${k.DURATION}s cubic-bezier(${k.EASE.join(",")})`,
2592
- transform: `scale(${_}) translate3d(0, ${O}px, 0)`
2593
- }), !S && E.current && (re.current = setTimeout(() => {
2594
- const N = pt(E.current, v);
2595
- H(E.current, {
2596
- transition: "none",
2597
- transform: U(v) ? `translate3d(0, ${N}px, 0)` : `translate3d(${N}px, 0, 0)`
2598
- });
2599
- }, 500));
2600
- }
2601
- function La(S, _) {
2602
- if (_ < 0) return;
2603
- const O = (window.innerWidth - Oe) / window.innerWidth, N = O + _ * (1 - O), L = -Oe + _ * Oe;
2604
- H(E.current, {
2605
- transform: U(v) ? `scale(${N}) translate3d(0, ${L}px, 0)` : `scale(${N}) translate3d(${L}px, 0, 0)`,
2606
- transition: "none"
2607
- });
2608
- }
2609
- function Ba(S, _) {
2610
- const O = U(v) ? window.innerHeight : window.innerWidth, N = _ ? (O - Oe) / O : 1, L = _ ? -Oe : 0;
2611
- _ && H(E.current, {
2612
- transition: `transform ${k.DURATION}s cubic-bezier(${k.EASE.join(",")})`,
2613
- transform: U(v) ? `scale(${N}) translate3d(0, ${L}px, 0)` : `scale(${N}) translate3d(${L}px, 0, 0)`
2614
- });
2615
- }
2616
- return p.useEffect(() => {
2617
- T || window.requestAnimationFrame(() => {
2618
- document.body.style.pointerEvents = "auto";
2619
- });
2620
- }, [
2621
- T
2622
- ]), /* @__PURE__ */ p.createElement(ls, {
2623
- defaultOpen: z,
2624
- onOpenChange: (S) => {
2625
- !f && !S || (S ? Y(!0) : Ge(!0), te(S));
2626
- },
2627
- open: G
2628
- }, /* @__PURE__ */ p.createElement(sa.Provider, {
2629
- value: {
2630
- activeSnapPoint: ja,
2631
- snapPoints: s,
2632
- setActiveSnapPoint: cn,
2633
- drawerRef: E,
2634
- overlayRef: pe,
2635
- onOpenChange: t,
2636
- onPress: Ia,
2637
- onRelease: $a,
2638
- onDrag: Aa,
2639
- dismissible: f,
2640
- shouldAnimate: an,
2641
- handleOnly: c,
2642
- isOpen: G,
2643
- isDragging: x,
2644
- shouldFade: un,
2645
- closeDrawer: Ge,
2646
- onNestedDrag: La,
2647
- onNestedOpenChange: Fa,
2648
- onNestedRelease: Ba,
2649
- keyboardIsOpen: Le,
2650
- modal: T,
2651
- snapPointsOffset: Ve,
2652
- activeSnapPointIndex: Be,
2653
- direction: v,
2654
- shouldScaleBackground: i,
2655
- setBackgroundColorOnScale: l,
2656
- noBodyStyles: P,
2657
- container: K,
2658
- autoFocus: W
2659
- }
2660
- }, n));
2661
- }
2662
- const ga = /* @__PURE__ */ p.forwardRef(function({ ...e }, t) {
2663
- const { overlayRef: n, snapPoints: r, onRelease: o, shouldFade: s, isOpen: i, modal: l, shouldAnimate: u } = Qe(), m = ca(t, n), f = r && r.length > 0;
2664
- if (!l)
2665
- return null;
2666
- const c = p.useCallback((d) => o(d), [
2667
- o
2668
- ]);
2669
- return /* @__PURE__ */ p.createElement(ns, {
2670
- onMouseUp: c,
2671
- ref: m,
2672
- "data-vaul-overlay": "",
2673
- "data-vaul-snap-points": i && f ? "true" : "false",
2674
- "data-vaul-snap-points-overlay": i && s ? "true" : "false",
2675
- "data-vaul-animate": u != null && u.current ? "true" : "false",
2676
- ...e
2677
- });
2678
- });
2679
- ga.displayName = "Drawer.Overlay";
2680
- const va = /* @__PURE__ */ p.forwardRef(function({ onPointerDownOutside: e, style: t, onOpenAutoFocus: n, ...r }, o) {
2681
- const { drawerRef: s, onPress: i, onRelease: l, onDrag: u, keyboardIsOpen: m, snapPointsOffset: f, activeSnapPointIndex: c, modal: d, isOpen: R, direction: C, snapPoints: g, container: T, handleOnly: M, shouldAnimate: A, autoFocus: P } = Qe(), [v, z] = p.useState(!1), J = ca(o, s), b = p.useRef(null), j = p.useRef(null), D = p.useRef(!1), B = g && g.length > 0;
2682
- jl();
2683
- const K = (y, V, G = 0) => {
2684
- if (D.current) return !0;
2685
- const te = Math.abs(y.y), q = Math.abs(y.x), Y = q > te, x = [
2686
- "bottom",
2687
- "right"
2688
- ].includes(V) ? 1 : -1;
2689
- if (V === "left" || V === "right") {
2690
- if (!(y.x * x < 0) && q >= 0 && q <= G)
2691
- return Y;
2692
- } else if (!(y.y * x < 0) && te >= 0 && te <= G)
2693
- return !Y;
2694
- return D.current = !0, !0;
2695
- };
2696
- p.useEffect(() => {
2697
- B && window.requestAnimationFrame(() => {
2698
- z(!0);
2699
- });
2700
- }, []);
2701
- function W(y) {
2702
- b.current = null, D.current = !1, l(y);
2703
- }
2704
- return /* @__PURE__ */ p.createElement(rs, {
2705
- "data-vaul-drawer-direction": C,
2706
- "data-vaul-drawer": "",
2707
- "data-vaul-delayed-snap-points": v ? "true" : "false",
2708
- "data-vaul-snap-points": R && B ? "true" : "false",
2709
- "data-vaul-custom-container": T ? "true" : "false",
2710
- "data-vaul-animate": A != null && A.current ? "true" : "false",
2711
- ...r,
2712
- ref: J,
2713
- style: f && f.length > 0 ? {
2714
- "--snap-point-height": `${f[c ?? 0]}px`,
2715
- ...t
2716
- } : t,
2717
- onPointerDown: (y) => {
2718
- M || (r.onPointerDown == null || r.onPointerDown.call(r, y), b.current = {
2719
- x: y.pageX,
2720
- y: y.pageY
2721
- }, i(y));
2722
- },
2723
- onOpenAutoFocus: (y) => {
2724
- n == null || n(y), P || y.preventDefault();
2725
- },
2726
- onPointerDownOutside: (y) => {
2727
- if (e == null || e(y), !d || y.defaultPrevented) {
2728
- y.preventDefault();
2729
- return;
2730
- }
2731
- m.current && (m.current = !1);
2732
- },
2733
- onFocusOutside: (y) => {
2734
- if (!d) {
2735
- y.preventDefault();
2736
- return;
2737
- }
2738
- },
2739
- onPointerMove: (y) => {
2740
- if (j.current = y, M || (r.onPointerMove == null || r.onPointerMove.call(r, y), !b.current)) return;
2741
- const V = y.pageY - b.current.y, G = y.pageX - b.current.x, te = y.pointerType === "touch" ? 10 : 2;
2742
- K({
2743
- x: G,
2744
- y: V
2745
- }, C, te) ? u(y) : (Math.abs(G) > te || Math.abs(V) > te) && (b.current = null);
2746
- },
2747
- onPointerUp: (y) => {
2748
- r.onPointerUp == null || r.onPointerUp.call(r, y), b.current = null, D.current = !1, l(y);
2749
- },
2750
- onPointerOut: (y) => {
2751
- r.onPointerOut == null || r.onPointerOut.call(r, y), W(j.current);
2752
- },
2753
- onContextMenu: (y) => {
2754
- r.onContextMenu == null || r.onContextMenu.call(r, y), j.current && W(j.current);
2755
- }
2756
- });
2757
- });
2758
- va.displayName = "Drawer.Content";
2759
- const Tl = 250, _l = 120, wa = /* @__PURE__ */ p.forwardRef(function({ preventCycle: e = !1, children: t, ...n }, r) {
2760
- const { closeDrawer: o, isDragging: s, snapPoints: i, activeSnapPoint: l, setActiveSnapPoint: u, dismissible: m, handleOnly: f, isOpen: c, onPress: d, onDrag: R } = Qe(), C = p.useRef(null), g = p.useRef(!1);
2761
- function T() {
2762
- if (g.current) {
2763
- P();
2764
- return;
2765
- }
2766
- window.setTimeout(() => {
2767
- M();
2768
- }, _l);
2769
- }
2770
- function M() {
2771
- if (s || e || g.current) {
2772
- P();
2773
- return;
2774
- }
2775
- if (P(), !i || i.length === 0) {
2776
- m || o();
2777
- return;
2778
- }
2779
- if (l === i[i.length - 1] && m) {
2780
- o();
2781
- return;
2782
- }
2783
- const z = i.findIndex((b) => b === l);
2784
- if (z === -1) return;
2785
- const J = i[z + 1];
2786
- u(J);
2787
- }
2788
- function A() {
2789
- C.current = window.setTimeout(() => {
2790
- g.current = !0;
2791
- }, Tl);
2792
- }
2793
- function P() {
2794
- C.current && window.clearTimeout(C.current), g.current = !1;
2795
- }
2796
- return /* @__PURE__ */ p.createElement("div", {
2797
- onClick: T,
2798
- onPointerCancel: P,
2799
- onPointerDown: (v) => {
2800
- f && d(v), A();
2801
- },
2802
- onPointerMove: (v) => {
2803
- f && R(v);
2804
- },
2805
- // onPointerUp is already handled by the content component
2806
- ref: r,
2807
- "data-vaul-drawer-visible": c ? "true" : "false",
2808
- "data-vaul-handle": "",
2809
- "aria-hidden": "true",
2810
- ...n
2811
- }, /* @__PURE__ */ p.createElement("span", {
2812
- "data-vaul-handle-hitarea": "",
2813
- "aria-hidden": "true"
2814
- }, t));
2815
- });
2816
- wa.displayName = "Drawer.Handle";
2817
- function Ol({ onDrag: e, onOpenChange: t, ...n }) {
2818
- const { onNestedDrag: r, onNestedOpenChange: o, onNestedRelease: s } = Qe();
2819
- if (!r)
2820
- throw new Error("Drawer.NestedRoot must be placed in another drawer");
2821
- return /* @__PURE__ */ p.createElement(ma, {
2822
- nested: !0,
2823
- onClose: () => {
2824
- o(!1);
2825
- },
2826
- onDrag: (i, l) => {
2827
- r(i, l), e == null || e(i, l);
2828
- },
2829
- onOpenChange: (i) => {
2830
- i && o(i);
2831
- },
2832
- onRelease: s,
2833
- ...n
2834
- });
2835
- }
2836
- function Il(e) {
2837
- const t = Qe(), { container: n = t.container, ...r } = e;
2838
- return /* @__PURE__ */ p.createElement(cs, {
2839
- container: n,
2840
- ...r
2841
- });
2842
- }
2843
- const he = {
2844
- Root: ma,
2845
- NestedRoot: Ol,
2846
- Content: va,
2847
- Overlay: ga,
2848
- Trigger: as,
2849
- Portal: Il,
2850
- Handle: wa,
2851
- Close: os,
2852
- Title: ss,
2853
- Description: is
2854
- }, en = ({
2855
- shouldScaleBackground: e = !0,
2856
- ...t
2857
- }) => /* @__PURE__ */ a.jsx(
2858
- he.Root,
2859
- {
2860
- shouldScaleBackground: e,
2861
- ...t
2862
- }
2863
- );
2864
- en.displayName = "Drawer";
2865
- const ya = he.Trigger, Al = he.Portal, kl = he.Close, xa = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ a.jsx(
2866
- he.Overlay,
2867
- {
2868
- ref: n,
2869
- className: F("fixed inset-0 z-50 bg-black/80", e),
2870
- ...t
2871
- }
2872
- ));
2873
- xa.displayName = he.Overlay.displayName;
2874
- const tn = h.forwardRef(
2875
- ({ className: e, children: t, hideBar: n = !0, ...r }, o) => /* @__PURE__ */ a.jsxs(Al, { children: [
2876
- /* @__PURE__ */ a.jsx(xa, {}),
2877
- /* @__PURE__ */ a.jsxs(
2878
- he.Content,
2879
- {
2880
- ref: o,
2881
- className: F(
2882
- "fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background",
2883
- e
2884
- ),
2885
- ...r,
2886
- children: [
2887
- !n && /* @__PURE__ */ a.jsx("div", { className: "mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted" }),
2888
- t
2889
- ]
2890
- }
2891
- )
2892
- ] })
2893
- );
2894
- tn.displayName = "DrawerContent";
2895
- const nn = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ a.jsx(
2896
- he.Title,
2897
- {
2898
- ref: n,
2899
- className: F(
2900
- "text-lg font-semibold leading-none tracking-tight",
2901
- e
2902
- ),
2903
- ...t
2904
- }
2905
- ));
2906
- nn.displayName = he.Title.displayName;
2907
- const $l = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ a.jsx(
2908
- he.Description,
2909
- {
2910
- ref: n,
2911
- className: F("text-sm text-muted-foreground", e),
2912
- ...t
2913
- }
2914
- ));
2915
- $l.displayName = he.Description.displayName;
2916
- const ba = () => {
2917
- const e = Ae(), [t, n] = Ie(!1), r = Qn(() => n(!1), []);
2918
- Ce(() => {
2919
- if (t)
2920
- return;
2921
- function s(i) {
2922
- i.key === "k" && (i.metaKey || i.ctrlKey) && (i.preventDefault(), n(!0));
2923
- }
2924
- return window.addEventListener("keydown", s), () => {
2925
- window.removeEventListener("keydown", s);
2926
- };
2927
- }, [t, n]);
2928
- const o = e.plugins.find(Ls);
2929
- return o ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
929
+ }, [e, r]);
930
+ const n = t.plugins.find($r);
931
+ return n ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
2930
932
  /* @__PURE__ */ a.jsxs(
2931
933
  "button",
2932
934
  {
2933
935
  type: "button",
2934
- onClick: () => n(!0),
936
+ onClick: () => r(!0),
2935
937
  className: "flex items-center border border-input hover:bg-accent hover:text-accent-foreground p-4 relative h-8 justify-start rounded-lg bg-background text-sm text-muted-foreground shadow-none w-full sm:w-72",
2936
938
  children: [
2937
939
  /* @__PURE__ */ a.jsxs("div", { className: "flex items-center gap-2 flex-grow", children: [
2938
- /* @__PURE__ */ a.jsx(Go, { size: 14 }),
940
+ /* @__PURE__ */ a.jsx(Zt, { size: 14 }),
2939
941
  "Search"
2940
942
  ] }),
2941
943
  /* @__PURE__ */ a.jsx("kbd", { className: "absolute right-[0.3rem] top-[0.3rem] hidden h-5 select-none items-center gap-1 rounded border bg-muted px-1.5 font-mono text-[11px] font-medium opacity-100 sm:flex", children: "⌘K" })
2942
944
  ]
2943
945
  }
2944
946
  ),
2945
- /* @__PURE__ */ a.jsx(Vn, { fallback: null, children: o.renderSearch({
2946
- isOpen: t,
2947
- onClose: r
947
+ /* @__PURE__ */ a.jsx(Be, { fallback: null, children: n.renderSearch({
948
+ isOpen: e,
949
+ onClose: s
2948
950
  }) })
2949
951
  ] }) : null;
2950
- }, Sa = (e) => (t) => t.display === "auth" && e || t.display === "anon" && !e || !t.display || t.display === "always", Fl = () => {
2951
- const { topNavigation: e } = Ae(), { isAuthenticated: t } = vt();
2952
- return e.length <= 1 ? /* @__PURE__ */ a.jsx("style", { children: ":root { --top-nav-height: 0px; }" }) : /* @__PURE__ */ a.jsx("nav", { className: "hidden lg:block border-b text-sm px-12 h-[--top-nav-height]", children: /* @__PURE__ */ a.jsx("ul", { className: "flex flex-row items-center gap-8", children: e.filter(Sa(t)).map((n) => /* @__PURE__ */ a.jsx("li", { children: /* @__PURE__ */ a.jsx(
2953
- Je,
952
+ }, rt = (t) => (e) => e.display === "auth" && t || e.display === "anon" && !t || !e.display || e.display === "always", Gr = () => {
953
+ const { topNavigation: t } = L(), { isAuthenticated: e } = ee();
954
+ return t.length <= 1 ? /* @__PURE__ */ a.jsx("style", { children: ":root { --top-nav-height: 0px; }" }) : /* @__PURE__ */ a.jsx("nav", { className: "hidden lg:block border-b text-sm px-12 h-[--top-nav-height]", children: /* @__PURE__ */ a.jsx("ul", { className: "flex flex-row items-center gap-8", children: t.filter(rt(e)).map((r) => /* @__PURE__ */ a.jsx("li", { children: /* @__PURE__ */ a.jsx(
955
+ U,
2954
956
  {
2955
- className: ({ isActive: r }) => zn(
957
+ className: ({ isActive: s }) => Ue(
2956
958
  "block py-3.5 font-medium -mb-px border-b-2",
2957
- r ? "border-primary text-foreground" : "border-transparent text-foreground/75 hover:text-foreground hover:border-accent-foreground/25"
959
+ s ? "border-primary text-foreground" : "border-transparent text-foreground/75 hover:text-foreground hover:border-accent-foreground/25"
2958
960
  ),
2959
- to: n.id,
2960
- children: n.label
961
+ to: r.id,
962
+ children: r.label
2961
963
  }
2962
- ) }, n.label)) }) });
2963
- }, Ll = () => {
2964
- const { topNavigation: e } = Ae(), { isAuthenticated: t } = vt();
2965
- return /* @__PURE__ */ a.jsxs(en, { direction: "right", children: [
2966
- /* @__PURE__ */ a.jsx("div", { className: "flex lg:hidden justify-self-end", children: /* @__PURE__ */ a.jsx(ya, { className: "lg:hidden", children: /* @__PURE__ */ a.jsx(Wo, { size: 22 }) }) }),
964
+ ) }, r.label)) }) });
965
+ }, ea = () => {
966
+ const { topNavigation: t } = L(), { isAuthenticated: e } = ee();
967
+ return /* @__PURE__ */ a.jsxs(Ve, { direction: "right", children: [
968
+ /* @__PURE__ */ a.jsx("div", { className: "flex lg:hidden justify-self-end", children: /* @__PURE__ */ a.jsx(We, { className: "lg:hidden", children: /* @__PURE__ */ a.jsx(Jt, { size: 22 }) }) }),
2967
969
  /* @__PURE__ */ a.jsxs(
2968
- tn,
970
+ Ye,
2969
971
  {
2970
972
  className: "lg:hidden h-screen right-0 left-auto w-[320px] rounded-none overflow-auto",
2971
973
  "aria-describedby": void 0,
2972
974
  children: [
2973
- /* @__PURE__ */ a.jsx(Un, { children: /* @__PURE__ */ a.jsx(nn, { children: "Navigation" }) }),
2974
- /* @__PURE__ */ a.jsx("div", { className: "flex p-4", children: /* @__PURE__ */ a.jsx(ba, {}) }),
2975
- /* @__PURE__ */ a.jsx("ul", { className: "flex flex-col items-center gap-4 p-4", children: e.filter(Sa(t)).map((n) => /* @__PURE__ */ a.jsx("li", { children: /* @__PURE__ */ a.jsx(
2976
- Je,
975
+ /* @__PURE__ */ a.jsx($e, { children: /* @__PURE__ */ a.jsx(Xe, { children: "Navigation" }) }),
976
+ /* @__PURE__ */ a.jsx("div", { className: "flex p-4", children: /* @__PURE__ */ a.jsx(tt, {}) }),
977
+ /* @__PURE__ */ a.jsx("ul", { className: "flex flex-col items-center gap-4 p-4", children: t.filter(rt(e)).map((r) => /* @__PURE__ */ a.jsx("li", { children: /* @__PURE__ */ a.jsx(
978
+ U,
2977
979
  {
2978
- className: ({ isActive: r }) => zn(
980
+ className: ({ isActive: s }) => Ue(
2979
981
  "block font-medium border-b-2",
2980
- r ? "border-primary text-foreground" : "border-transparent text-foreground/75 hover:text-foreground hover:border-accent-foreground/25"
982
+ s ? "border-primary text-foreground" : "border-transparent text-foreground/75 hover:text-foreground hover:border-accent-foreground/25"
2981
983
  ),
2982
- to: n.id,
2983
- children: /* @__PURE__ */ a.jsx(kl, { children: n.label })
984
+ to: r.id,
985
+ children: /* @__PURE__ */ a.jsx(gr, { children: r.label })
2984
986
  }
2985
- ) }, n.label)) })
987
+ ) }, r.label)) })
2986
988
  ]
2987
989
  }
2988
990
  )
2989
991
  ] });
2990
- }, Ca = ({ item: e }) => e.children ? /* @__PURE__ */ a.jsxs(al, { children: [
2991
- /* @__PURE__ */ a.jsx(ea, { children: e.label }),
2992
- /* @__PURE__ */ a.jsx(rl, { children: /* @__PURE__ */ a.jsx(ta, { children: e.children.map((t, n) => (
992
+ }, at = ({ item: t }) => t.children ? /* @__PURE__ */ a.jsxs(cr, { children: [
993
+ /* @__PURE__ */ a.jsx(ur, { children: t.label }),
994
+ /* @__PURE__ */ a.jsx(dr, { children: /* @__PURE__ */ a.jsx(hr, { children: t.children.map((e, r) => (
2993
995
  // eslint-disable-next-line react/no-array-index-key
2994
- /* @__PURE__ */ a.jsx(Ca, { item: t }, n)
996
+ /* @__PURE__ */ a.jsx(at, { item: e }, r)
2995
997
  )) }) })
2996
- ] }, e.label) : /* @__PURE__ */ a.jsx($t, { to: e.path ?? "", children: /* @__PURE__ */ a.jsx(ra, { children: e.label }, e.label) }), Ma = Gn(function() {
2997
- const t = vt(), [n, r] = vo(), { isAuthenticated: o, profile: s, isAuthEnabled: i } = vt(), l = Ae(), { page: u, plugins: m } = l, f = m.filter((d) => $s(d)).flatMap((d) => d.getProfileMenuItems(l)).map((d) => /* @__PURE__ */ a.jsx(Ca, { item: d }, d.label)), c = n ? Yo : Xo;
998
+ ] }, t.label) : /* @__PURE__ */ a.jsx(ce, { to: t.path ?? "", children: /* @__PURE__ */ a.jsx(fr, { children: t.label }, t.label) }), st = He(function() {
999
+ const e = ee(), [r, s] = Ut(), { isAuthenticated: n, profile: o, isAuthEnabled: i } = ee(), c = L(), { page: u, plugins: w } = c, x = w.filter((m) => zr(m)).flatMap((m) => m.getProfileMenuItems(c)).map((m) => /* @__PURE__ */ a.jsx(at, { item: m }, m.label)), y = r ? Gt : er;
2998
1000
  return /* @__PURE__ */ a.jsxs("header", { className: "sticky lg:top-0 z-10 bg-background/80 backdrop-blur w-full", children: [
2999
- /* @__PURE__ */ a.jsx(il, {}),
1001
+ /* @__PURE__ */ a.jsx(Jr, {}),
3000
1002
  /* @__PURE__ */ a.jsxs("div", { className: "max-w-screen-2xl mx-auto", children: [
3001
1003
  /* @__PURE__ */ a.jsxs("div", { className: "grid grid-cols-2 lg:grid-cols-[calc(var(--side-nav-width))_1fr] lg:gap-12 items-center border-b px-10 lg:px-12 h-[--top-header-height]", children: [
3002
- /* @__PURE__ */ a.jsx("div", { className: "flex", children: /* @__PURE__ */ a.jsx($t, { to: "/", children: /* @__PURE__ */ a.jsxs("div", { className: "flex items-center gap-3.5", children: [
1004
+ /* @__PURE__ */ a.jsx("div", { className: "flex", children: /* @__PURE__ */ a.jsx(ce, { to: "/", children: /* @__PURE__ */ a.jsxs("div", { className: "flex items-center gap-3.5", children: [
3003
1005
  (u == null ? void 0 : u.logo) && /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
3004
1006
  /* @__PURE__ */ a.jsx(
3005
1007
  "img",
@@ -3007,7 +1009,7 @@ const ba = () => {
3007
1009
  src: u.logo.src.light,
3008
1010
  alt: u.logo.alt ?? u.pageTitle,
3009
1011
  style: { width: u.logo.width },
3010
- className: F("h-10", n && "hidden"),
1012
+ className: M("h-10", r && "hidden"),
3011
1013
  loading: "lazy"
3012
1014
  }
3013
1015
  ),
@@ -3017,7 +1019,7 @@ const ba = () => {
3017
1019
  src: u.logo.src.dark,
3018
1020
  alt: u.logo.alt ?? u.pageTitle,
3019
1021
  style: { width: u.logo.width },
3020
- className: F("h-10", !n && "hidden"),
1022
+ className: M("h-10", !r && "hidden"),
3021
1023
  loading: "lazy"
3022
1024
  }
3023
1025
  )
@@ -3025,112 +1027,112 @@ const ba = () => {
3025
1027
  /* @__PURE__ */ a.jsx("span", { className: "font-bold text-2xl text-foreground/85 tracking-wide", children: u == null ? void 0 : u.pageTitle })
3026
1028
  ] }) }) }),
3027
1029
  /* @__PURE__ */ a.jsxs("div", { className: "grid grid-cols-1 lg:grid-cols-[--sidecar-grid-cols] items-center gap-8", children: [
3028
- /* @__PURE__ */ a.jsx("div", { className: "w-full justify-center hidden lg:flex", children: /* @__PURE__ */ a.jsx(ba, {}) }),
3029
- /* @__PURE__ */ a.jsx(Ll, {}),
1030
+ /* @__PURE__ */ a.jsx("div", { className: "w-full justify-center hidden lg:flex", children: /* @__PURE__ */ a.jsx(tt, {}) }),
1031
+ /* @__PURE__ */ a.jsx(ea, {}),
3030
1032
  /* @__PURE__ */ a.jsxs("div", { className: "hidden lg:flex items-center justify-self-end text-sm gap-2", children: [
3031
- /* @__PURE__ */ a.jsx(ye, { name: "head-navigation-start" }),
3032
- i && !o ? /* @__PURE__ */ a.jsx(Nt, { variant: "ghost", onClick: () => t.login(), children: "Login" }) : f.length > 0 && /* @__PURE__ */ a.jsxs(tl, { modal: !1, children: [
3033
- /* @__PURE__ */ a.jsx(nl, { asChild: !0, children: /* @__PURE__ */ a.jsx(Nt, { variant: "ghost", children: s != null && s.email ? `${s.email}` : "My Account" }) }),
3034
- /* @__PURE__ */ a.jsxs(na, { className: "w-56", children: [
3035
- /* @__PURE__ */ a.jsx(aa, { children: "My Account" }),
3036
- /* @__PURE__ */ a.jsx(oa, {}),
3037
- f
1033
+ /* @__PURE__ */ a.jsx(k, { name: "head-navigation-start" }),
1034
+ i && !n ? /* @__PURE__ */ a.jsx(ne, { variant: "ghost", onClick: () => e.login(), children: "Login" }) : x.length > 0 && /* @__PURE__ */ a.jsxs(sr, { modal: !1, children: [
1035
+ /* @__PURE__ */ a.jsx(nr, { asChild: !0, children: /* @__PURE__ */ a.jsx(ne, { variant: "ghost", children: o != null && o.email ? `${o.email}` : "My Account" }) }),
1036
+ /* @__PURE__ */ a.jsxs(ir, { className: "w-56", children: [
1037
+ /* @__PURE__ */ a.jsx(or, { children: "My Account" }),
1038
+ /* @__PURE__ */ a.jsx(lr, {}),
1039
+ x
3038
1040
  ] })
3039
1041
  ] }),
3040
1042
  /* @__PURE__ */ a.jsx(
3041
1043
  "button",
3042
1044
  {
3043
1045
  type: "button",
3044
- "aria-label": n ? "Switch to light mode" : "Switch to dark mode",
1046
+ "aria-label": r ? "Switch to light mode" : "Switch to dark mode",
3045
1047
  className: "cursor-pointer hover:bg-secondary p-2.5 -m-2.5 rounded-full",
3046
- onClick: r,
3047
- children: /* @__PURE__ */ a.jsx(c, { size: 18 })
1048
+ onClick: s,
1049
+ children: /* @__PURE__ */ a.jsx(y, { size: 18 })
3048
1050
  }
3049
1051
  ),
3050
- /* @__PURE__ */ a.jsx(ye, { name: "head-navigation-end" })
1052
+ /* @__PURE__ */ a.jsx(k, { name: "head-navigation-end" })
3051
1053
  ] })
3052
1054
  ] })
3053
1055
  ] }),
3054
- /* @__PURE__ */ a.jsx(ye, { name: "top-navigation-before" }),
3055
- /* @__PURE__ */ a.jsx(Fl, {}),
3056
- /* @__PURE__ */ a.jsx(ye, { name: "top-navigation-after" })
1056
+ /* @__PURE__ */ a.jsx(k, { name: "top-navigation-before" }),
1057
+ /* @__PURE__ */ a.jsx(Gr, {}),
1058
+ /* @__PURE__ */ a.jsx(k, { name: "top-navigation-after" })
3057
1059
  ] })
3058
1060
  ] });
3059
- }), Ra = {
3060
- Header: Ma
3061
- }, Bl = qn(Ra), Hl = Bl.Provider, Ul = (e) => {
3062
- const [t, n] = Ie(!1);
3063
- Ce(() => {
3064
- const s = localStorage.getItem("theme"), i = window.matchMedia("(prefers-color-scheme: dark)"), l = s === "dark" || !s && i.matches;
3065
- n(l);
3066
- }, [t]);
3067
- const r = Qn(() => {
3068
- const s = !t;
3069
- document.documentElement.classList.toggle("dark", s), localStorage.setItem("theme", s ? "dark" : "light"), n(s);
3070
- }, [t]), o = [t, r];
3071
- return /* @__PURE__ */ a.jsx(wo.Provider, { value: o, ...e });
3072
- }, zl = ({
3073
- children: e,
3074
- context: t
3075
- }) => (Ho({
3076
- queryFn: async () => (await t.initialize(), !0),
1061
+ }), nt = {
1062
+ Header: st
1063
+ }, ta = Qe(nt), ra = ta.Provider, aa = (t) => {
1064
+ const [e, r] = Q(!1);
1065
+ F(() => {
1066
+ const o = localStorage.getItem("theme"), i = window.matchMedia("(prefers-color-scheme: dark)"), c = o === "dark" || !o && i.matches;
1067
+ r(c);
1068
+ }, [e]);
1069
+ const s = Le(() => {
1070
+ const o = !e;
1071
+ document.documentElement.classList.toggle("dark", o), localStorage.setItem("theme", o ? "dark" : "light"), r(o);
1072
+ }, [e]), n = [e, s];
1073
+ return /* @__PURE__ */ a.jsx(Vt.Provider, { value: n, ...t });
1074
+ }, sa = ({
1075
+ children: t,
1076
+ context: e
1077
+ }) => (Ht({
1078
+ queryFn: async () => (await e.initialize(), !0),
3077
1079
  queryKey: ["zudoku-initialize"]
3078
- }), /* @__PURE__ */ a.jsx(Uo.Provider, { value: t, children: e })), Kl = ({
3079
- children: e,
3080
- ...t
1080
+ }), /* @__PURE__ */ a.jsx(qt.Provider, { value: e, children: t })), na = ({
1081
+ children: t,
1082
+ ...e
3081
1083
  }) => {
3082
- var c, d;
3083
- const n = mt(
3084
- () => ({ ...Ra, ...t.overrides }),
3085
- [t.overrides]
3086
- ), r = mt(() => {
3087
- var C;
1084
+ var y, m;
1085
+ const r = te(
1086
+ () => ({ ...nt, ...e.overrides }),
1087
+ [e.overrides]
1088
+ ), s = te(() => {
1089
+ var N;
3088
1090
  return {
3089
- ...(t.plugins ?? []).filter(Us).flatMap(
3090
- (g) => g.getMdxComponents ? [g.getMdxComponents()] : []
3091
- ).reduce((g, T) => ({ ...g, ...T }), {}),
3092
- ...yo,
3093
- ...(C = t.mdx) == null ? void 0 : C.components
1091
+ ...(e.plugins ?? []).filter(Wr).flatMap(
1092
+ (d) => d.getMdxComponents ? [d.getMdxComponents()] : []
1093
+ ).reduce((d, O) => ({ ...d, ...O }), {}),
1094
+ ...Wt,
1095
+ ...(N = e.mdx) == null ? void 0 : N.components
3094
1096
  };
3095
- }, [(c = t.mdx) == null ? void 0 : c.components, t.plugins]), { stagger: o } = Eo(Tt), [s, i] = Ie(!1), l = mt(
3096
- () => s ? { stagger: !0 } : { stagger: o },
3097
- [o, s]
3098
- ), u = Ya();
3099
- Ce(() => {
3100
- s || i(!0);
3101
- }, [s, u.location]);
3102
- const [m] = Ie(() => new Ks(t)), f = (d = t.plugins) == null ? void 0 : d.filter(Hs).map((R, C) => {
3103
- var g;
3104
- return /* @__PURE__ */ a.jsx(Do, { children: (g = R.getHead) == null ? void 0 : g.call(R) }, C);
1097
+ }, [(y = e.mdx) == null ? void 0 : y.components, e.plugins]), { stagger: n } = Mt(ie), [o, i] = Q(!1), c = te(
1098
+ () => o ? { stagger: !0 } : { stagger: n },
1099
+ [n, o]
1100
+ ), u = bt();
1101
+ F(() => {
1102
+ o || i(!0);
1103
+ }, [o, u.location]);
1104
+ const [w] = Q(() => new Xr(e)), x = (m = e.plugins) == null ? void 0 : m.filter(Vr).map((P, N) => {
1105
+ var d;
1106
+ return /* @__PURE__ */ a.jsx(Dt, { children: (d = P.getHead) == null ? void 0 : d.call(P) }, N);
3105
1107
  });
3106
- return /* @__PURE__ */ a.jsxs(zo, { client: rr, children: [
3107
- /* @__PURE__ */ a.jsx(kt, { children: f }),
3108
- /* @__PURE__ */ a.jsx(Tt.Provider, { value: l, children: /* @__PURE__ */ a.jsx(zl, { context: m, children: /* @__PURE__ */ a.jsx(za, { components: r, children: /* @__PURE__ */ a.jsx(Ul, { children: /* @__PURE__ */ a.jsx(Hl, { value: n, children: /* @__PURE__ */ a.jsx(eo, { slotlets: t.slotlets, children: /* @__PURE__ */ a.jsx(xo, { children: e ?? /* @__PURE__ */ a.jsx(An, {}) }) }) }) }) }) }) })
1108
+ return /* @__PURE__ */ a.jsxs(zt, { client: et, children: [
1109
+ /* @__PURE__ */ a.jsx(le, { children: x }),
1110
+ /* @__PURE__ */ a.jsx(ie.Provider, { value: c, children: /* @__PURE__ */ a.jsx(sa, { context: w, children: /* @__PURE__ */ a.jsx(ht, { components: s, children: /* @__PURE__ */ a.jsx(aa, { children: /* @__PURE__ */ a.jsx(ra, { value: r, children: /* @__PURE__ */ a.jsx(Pt, { slotlets: e.slotlets, children: /* @__PURE__ */ a.jsx(Yt, { children: t ?? /* @__PURE__ */ a.jsx(Ie, {}) }) }) }) }) }) }) })
3109
1111
  ] });
3110
- }, ql = Gn(Kl), rn = (e) => /* @__PURE__ */ a.jsx(As, { FallbackComponent: qs, children: /* @__PURE__ */ a.jsx(ql, { ...e }) });
3111
- rn.displayName = "DevPortal";
3112
- const Ql = ({
3113
- category: e,
3114
- level: t
1112
+ }, ia = He(na), ge = (t) => /* @__PURE__ */ a.jsx(Hr, { FallbackComponent: Zr, children: /* @__PURE__ */ a.jsx(ia, { ...t }) });
1113
+ ge.displayName = "DevPortal";
1114
+ const oa = ({
1115
+ category: t,
1116
+ level: e
3115
1117
  }) => {
3116
- var R, C;
3117
- const n = Xn(), r = Ka(e), [o, s] = Ie(!1), i = e.collapsible ?? !0, l = e.collapsed ?? !0, u = !!(!i || !l || r), [m, f] = Ie(u), c = Xa(wt(n == null ? void 0 : n.id, (R = e.link) == null ? void 0 : R.id));
3118
- Ce(() => {
3119
- r && f(!0);
3120
- }, [r]);
3121
- const d = i && /* @__PURE__ */ a.jsx(
1118
+ var P, N;
1119
+ const r = Ke(), s = ft(t), [n, o] = Q(!1), i = t.collapsible ?? !0, c = t.collapsed ?? !0, u = !!(!i || !c || s), [w, x] = Q(u), y = yt(G(r == null ? void 0 : r.id, (P = t.link) == null ? void 0 : P.id));
1120
+ F(() => {
1121
+ s && x(!0);
1122
+ }, [s]);
1123
+ const m = i && /* @__PURE__ */ a.jsx(
3122
1124
  "button",
3123
1125
  {
3124
1126
  type: "button",
3125
- onClick: (g) => {
3126
- g.preventDefault(), f((T) => !T), s(!0);
1127
+ onClick: (d) => {
1128
+ d.preventDefault(), x((O) => !O), o(!0);
3127
1129
  },
3128
1130
  children: /* @__PURE__ */ a.jsx(
3129
- Zn,
1131
+ tr,
3130
1132
  {
3131
1133
  size: 16,
3132
- className: F(
3133
- o && "transition",
1134
+ className: M(
1135
+ n && "transition",
3134
1136
  "shrink-0 group-data-[state=open]:rotate-90"
3135
1137
  )
3136
1138
  }
@@ -3138,86 +1140,86 @@ const Ql = ({
3138
1140
  }
3139
1141
  );
3140
1142
  return /* @__PURE__ */ a.jsxs(
3141
- No,
1143
+ ae.Root,
3142
1144
  {
3143
1145
  className: "flex flex-col",
3144
1146
  defaultOpen: u,
3145
- open: m,
3146
- onOpenChange: () => f(!0),
1147
+ open: w,
1148
+ onOpenChange: () => x(!0),
3147
1149
  children: [
3148
- /* @__PURE__ */ a.jsx(To, { className: "group", asChild: !0, disabled: !i, children: /* @__PURE__ */ a.jsxs(
1150
+ /* @__PURE__ */ a.jsx(ae.Trigger, { className: "group", asChild: !0, disabled: !i, children: /* @__PURE__ */ a.jsxs(
3149
1151
  "div",
3150
1152
  {
3151
- onClick: () => s(!0),
3152
- className: Ze({
1153
+ onClick: () => o(!0),
1154
+ className: $({
3153
1155
  isActive: !1,
3154
- isTopLevel: t === 0,
1156
+ isTopLevel: e === 0,
3155
1157
  className: [
3156
1158
  "text-start",
3157
1159
  i ? "cursor-pointer" : "cursor-default hover:bg-transparent"
3158
1160
  ]
3159
1161
  }),
3160
1162
  children: [
3161
- e.icon && /* @__PURE__ */ a.jsx(
3162
- e.icon,
1163
+ t.icon && /* @__PURE__ */ a.jsx(
1164
+ t.icon,
3163
1165
  {
3164
1166
  size: 16,
3165
- className: F(
1167
+ className: M(
3166
1168
  "align-[-0.125em] -translate-x-1",
3167
- c && "text-primary"
1169
+ y && "text-primary"
3168
1170
  )
3169
1171
  }
3170
1172
  ),
3171
- ((C = e.link) == null ? void 0 : C.type) === "doc" ? /* @__PURE__ */ a.jsx(
3172
- Je,
1173
+ ((N = t.link) == null ? void 0 : N.type) === "doc" ? /* @__PURE__ */ a.jsx(
1174
+ U,
3173
1175
  {
3174
- to: wt(n == null ? void 0 : n.id, e.link.id),
1176
+ to: G(r == null ? void 0 : r.id, t.link.id),
3175
1177
  className: "flex-1",
3176
1178
  onClick: () => {
3177
- c && !m && f(!0);
1179
+ y && !w && x(!0);
3178
1180
  },
3179
1181
  children: /* @__PURE__ */ a.jsxs(
3180
1182
  "div",
3181
1183
  {
3182
- className: F(
1184
+ className: M(
3183
1185
  "flex items-center gap-2 justify-between w-full",
3184
- c ? "text-primary" : "text-foreground/80"
1186
+ y ? "text-primary" : "text-foreground/80"
3185
1187
  ),
3186
1188
  children: [
3187
- /* @__PURE__ */ a.jsx("div", { className: "truncate", children: e.label }),
3188
- d
1189
+ /* @__PURE__ */ a.jsx("div", { className: "truncate", children: t.label }),
1190
+ m
3189
1191
  ]
3190
1192
  }
3191
1193
  )
3192
1194
  }
3193
1195
  ) : /* @__PURE__ */ a.jsxs("div", { className: "flex items-center justify-between w-full", children: [
3194
- /* @__PURE__ */ a.jsx("div", { className: "flex gap-2 truncate w-full", children: e.label }),
3195
- d
1196
+ /* @__PURE__ */ a.jsx("div", { className: "flex gap-2 truncate w-full", children: t.label }),
1197
+ m
3196
1198
  ] })
3197
1199
  ]
3198
1200
  }
3199
1201
  ) }),
3200
1202
  /* @__PURE__ */ a.jsx(
3201
- _o,
1203
+ ae.Content,
3202
1204
  {
3203
- className: F(
1205
+ className: M(
3204
1206
  // CollapsibleContent class is used to animate and it should only be applied when the user has triggered the toggle
3205
- o && "CollapsibleContent"
1207
+ n && "CollapsibleContent"
3206
1208
  ),
3207
- children: /* @__PURE__ */ a.jsx("ul", { className: "mt-1 border-l ms-0.5", children: e.items.map((g) => /* @__PURE__ */ a.jsx(
3208
- At,
1209
+ children: /* @__PURE__ */ a.jsx("ul", { className: "mt-1 border-l ms-0.5", children: t.items.map((d) => /* @__PURE__ */ a.jsx(
1210
+ oe,
3209
1211
  {
3210
- level: t + 1,
3211
- item: g
1212
+ level: e + 1,
1213
+ item: d
3212
1214
  },
3213
- ("id" in g ? g.id : "") + ("href" in g ? g.href : "") + g.label
1215
+ ("id" in d ? d.id : "") + ("href" in d ? d.href : "") + d.label
3214
1216
  )) })
3215
1217
  }
3216
1218
  )
3217
1219
  ]
3218
1220
  }
3219
1221
  );
3220
- }, Ze = bo(
1222
+ }, $ = mr(
3221
1223
  "flex items-center gap-2 px-[--padding-nav-item] py-1.5 rounded-lg hover:bg-accent transition-colors duration-300",
3222
1224
  {
3223
1225
  variants: {
@@ -3238,171 +1240,171 @@ const Ql = ({
3238
1240
  isActive: !1
3239
1241
  }
3240
1242
  }
3241
- ), Ea = "data-anchor", At = ({
3242
- item: e,
3243
- level: t = 0
1243
+ ), it = "data-anchor", oe = ({
1244
+ item: t,
1245
+ level: e = 0
3244
1246
  }) => {
3245
- var s, i;
3246
- const n = Xn(), { activeAnchor: r } = Bt(), [o] = Za();
3247
- switch (e.type) {
1247
+ var o, i;
1248
+ const r = Ke(), { activeAnchor: s } = fe(), [n] = jt();
1249
+ switch (t.type) {
3248
1250
  case "category":
3249
- return /* @__PURE__ */ a.jsx(Ql, { category: e, level: t });
1251
+ return /* @__PURE__ */ a.jsx(oa, { category: t, level: e });
3250
1252
  case "doc":
3251
1253
  return /* @__PURE__ */ a.jsxs(
3252
- Je,
1254
+ U,
3253
1255
  {
3254
- className: ({ isActive: l }) => Ze({ isActive: l, isTopLevel: t === 0 }),
3255
- to: wt(n == null ? void 0 : n.id, e.id),
1256
+ className: ({ isActive: c }) => $({ isActive: c, isTopLevel: e === 0 }),
1257
+ to: G(r == null ? void 0 : r.id, t.id),
3256
1258
  children: [
3257
- e.icon && /* @__PURE__ */ a.jsx(e.icon, { size: 16, className: "align-[-0.125em]" }),
3258
- e.badge ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
3259
- /* @__PURE__ */ a.jsx("span", { className: "truncate flex-1", title: e.label, children: e.label }),
3260
- /* @__PURE__ */ a.jsx(Mt, { ...e.badge })
3261
- ] }) : e.label
1259
+ t.icon && /* @__PURE__ */ a.jsx(t.icon, { size: 16, className: "align-[-0.125em]" }),
1260
+ t.badge ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
1261
+ /* @__PURE__ */ a.jsx("span", { className: "truncate flex-1", title: t.label, children: t.label }),
1262
+ /* @__PURE__ */ a.jsx(re, { ...t.badge })
1263
+ ] }) : t.label
3262
1264
  ]
3263
1265
  }
3264
1266
  );
3265
1267
  case "link":
3266
- return e.href.startsWith("#") ? /* @__PURE__ */ a.jsx(
3267
- qa,
1268
+ return t.href.startsWith("#") ? /* @__PURE__ */ a.jsx(
1269
+ mt,
3268
1270
  {
3269
- to: { hash: e.href, search: o.toString() },
3270
- [Ea]: e.href.slice(1),
3271
- className: Ze({
3272
- isActive: e.href.slice(1) === r,
3273
- isTopLevel: t === 0,
3274
- className: ((s = e.badge) == null ? void 0 : s.placement) !== "start" && "justify-between"
1271
+ to: { hash: t.href, search: n.toString() },
1272
+ [it]: t.href.slice(1),
1273
+ className: $({
1274
+ isActive: t.href.slice(1) === s,
1275
+ isTopLevel: e === 0,
1276
+ className: ((o = t.badge) == null ? void 0 : o.placement) !== "start" && "justify-between"
3275
1277
  }),
3276
- children: e.badge ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
3277
- /* @__PURE__ */ a.jsx("span", { className: "truncate", title: e.label, children: e.label }),
3278
- /* @__PURE__ */ a.jsx(Mt, { ...e.badge })
3279
- ] }) : /* @__PURE__ */ a.jsx("span", { className: "break-all", children: e.label })
1278
+ children: t.badge ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
1279
+ /* @__PURE__ */ a.jsx("span", { className: "truncate", title: t.label, children: t.label }),
1280
+ /* @__PURE__ */ a.jsx(re, { ...t.badge })
1281
+ ] }) : /* @__PURE__ */ a.jsx("span", { className: "break-all", children: t.label })
3280
1282
  }
3281
- ) : e.href.startsWith("http") ? /* @__PURE__ */ a.jsxs(
1283
+ ) : t.href.startsWith("http") ? /* @__PURE__ */ a.jsxs(
3282
1284
  "a",
3283
1285
  {
3284
- className: Ze({ isTopLevel: t === 0 }),
3285
- href: e.href,
1286
+ className: $({ isTopLevel: e === 0 }),
1287
+ href: t.href,
3286
1288
  target: "_blank",
3287
1289
  rel: "noopener noreferrer",
3288
1290
  children: [
3289
- /* @__PURE__ */ a.jsx("span", { className: "whitespace-normal", children: e.label }),
3290
- /* @__PURE__ */ a.jsx("span", { className: "whitespace-nowrap", children: /* @__PURE__ */ a.jsx(Zo, { className: "inline -translate-y-0.5", size: 12 }) })
1291
+ /* @__PURE__ */ a.jsx("span", { className: "whitespace-normal", children: t.label }),
1292
+ /* @__PURE__ */ a.jsx("span", { className: "whitespace-nowrap", children: /* @__PURE__ */ a.jsx(rr, { className: "inline -translate-y-0.5", size: 12 }) })
3291
1293
  ]
3292
1294
  }
3293
1295
  ) : /* @__PURE__ */ a.jsx(
3294
- Je,
1296
+ U,
3295
1297
  {
3296
- className: Ze({
3297
- className: ((i = e.badge) == null ? void 0 : i.placement) !== "start" && "justify-between"
1298
+ className: $({
1299
+ className: ((i = t.badge) == null ? void 0 : i.placement) !== "start" && "justify-between"
3298
1300
  }),
3299
- to: e.href,
3300
- children: e.badge ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
3301
- /* @__PURE__ */ a.jsx("span", { className: "truncate", title: e.label, children: e.label }),
3302
- /* @__PURE__ */ a.jsx(Mt, { ...e.badge })
3303
- ] }) : /* @__PURE__ */ a.jsx("span", { className: "break-all", children: e.label })
1301
+ to: t.href,
1302
+ children: t.badge ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
1303
+ /* @__PURE__ */ a.jsx("span", { className: "truncate", title: t.label, children: t.label }),
1304
+ /* @__PURE__ */ a.jsx(re, { ...t.badge })
1305
+ ] }) : /* @__PURE__ */ a.jsx("span", { className: "break-all", children: t.label })
3304
1306
  }
3305
1307
  );
3306
1308
  }
3307
- }, Vl = (e, t = { block: "center" }) => {
3308
- if (!e) return;
3309
- const n = e.getBoundingClientRect();
3310
- n.top >= 0 && n.left >= 0 && n.bottom <= (window.innerHeight || document.documentElement.clientHeight) && n.right <= (window.innerWidth || document.documentElement.clientWidth) || e.scrollIntoView(t);
3311
- }, Gl = () => {
3312
- const e = Ft(), { setActiveAnchor: t } = Bt();
3313
- Ce(() => {
3314
- if (!e.hash) return;
3315
- const n = decodeURIComponent(e.hash.split("/")[0].slice(1)), r = () => {
3316
- const o = document.getElementById(n), s = document.querySelector(`[${Ea}="${n}"]`);
3317
- return o ? (o.scrollIntoView(), Vl(s), requestIdleCallback(() => t(n)), !0) : !1;
1309
+ }, la = (t, e = { block: "center" }) => {
1310
+ if (!t) return;
1311
+ const r = t.getBoundingClientRect();
1312
+ r.top >= 0 && r.left >= 0 && r.bottom <= (window.innerHeight || document.documentElement.clientHeight) && r.right <= (window.innerWidth || document.documentElement.clientWidth) || t.scrollIntoView(e);
1313
+ }, ca = () => {
1314
+ const t = ue(), { setActiveAnchor: e } = fe();
1315
+ F(() => {
1316
+ if (!t.hash) return;
1317
+ const r = decodeURIComponent(t.hash.split("/")[0].slice(1)), s = () => {
1318
+ const n = document.getElementById(r), o = document.querySelector(`[${it}="${r}"]`);
1319
+ return n ? (n.scrollIntoView(), la(o), requestIdleCallback(() => e(r)), !0) : !1;
3318
1320
  };
3319
- if (!r()) {
3320
- const o = new MutationObserver((s, i) => {
3321
- r() && i.disconnect();
1321
+ if (!s()) {
1322
+ const n = new MutationObserver((o, i) => {
1323
+ s() && i.disconnect();
3322
1324
  });
3323
- return o.observe(document.body, { childList: !0, subtree: !0 }), () => o.disconnect();
1325
+ return n.observe(document.body, { childList: !0, subtree: !0 }), () => n.disconnect();
3324
1326
  }
3325
- }, [e.hash, t]);
3326
- }, Wl = () => {
3327
- const e = Ft(), t = Ht(e.pathname);
3328
- Ce(() => {
3329
- t.current !== e.pathname && (window.scrollTo(0, 0), t.current = e.pathname);
3330
- }, [e.pathname]);
3331
- }, Da = Po(({ children: e, className: t, pushMainContent: n }, r) => /* @__PURE__ */ a.jsx(
1327
+ }, [t.hash, e]);
1328
+ }, ua = () => {
1329
+ const t = ue(), e = de(t.pathname);
1330
+ F(() => {
1331
+ e.current !== t.pathname && (window.scrollTo(0, 0), e.current = t.pathname);
1332
+ }, [t.pathname]);
1333
+ }, ot = At(({ children: t, className: e, pushMainContent: r }, s) => /* @__PURE__ */ a.jsx(
3332
1334
  "nav",
3333
1335
  {
3334
- "data-navigation": String(n),
3335
- className: F(
1336
+ "data-navigation": String(r),
1337
+ className: M(
3336
1338
  "scrollbar peer hidden lg:flex flex-col fixed text-sm overflow-y-auto shrink-0",
3337
1339
  "px-[--padding-nav-item] -mx-[--padding-nav-item] pb-20 mt-[--padding-content-top]",
3338
1340
  "w-[--side-nav-width] h-[calc(100%-var(--header-height))] scroll-pt-2 gap-2",
3339
- t
1341
+ e
3340
1342
  ),
3341
- ref: r,
3342
- children: e
1343
+ ref: s,
1344
+ children: t
3343
1345
  }
3344
1346
  ));
3345
- Da.displayName = "SidebarWrapper";
3346
- const Yl = () => {
3347
- const e = Ht(null), t = Ko();
1347
+ ot.displayName = "SidebarWrapper";
1348
+ const da = () => {
1349
+ const t = de(null), e = Kt();
3348
1350
  return /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
3349
1351
  /* @__PURE__ */ a.jsxs(
3350
- Da,
1352
+ ot,
3351
1353
  {
3352
- ref: e,
3353
- pushMainContent: t.data.items.length > 0,
1354
+ ref: t,
1355
+ pushMainContent: e.data.items.length > 0,
3354
1356
  children: [
3355
- /* @__PURE__ */ a.jsx(ye, { name: "zudoku-before-navigation" }),
3356
- t.data.items.map((n) => /* @__PURE__ */ a.jsx(At, { item: n }, n.label)),
3357
- /* @__PURE__ */ a.jsx(ye, { name: "zudoku-after-navigation" })
1357
+ /* @__PURE__ */ a.jsx(k, { name: "zudoku-before-navigation" }),
1358
+ e.data.items.map((r) => /* @__PURE__ */ a.jsx(oe, { item: r }, r.label)),
1359
+ /* @__PURE__ */ a.jsx(k, { name: "zudoku-after-navigation" })
3358
1360
  ]
3359
1361
  }
3360
1362
  ),
3361
1363
  /* @__PURE__ */ a.jsxs(
3362
- tn,
1364
+ Ye,
3363
1365
  {
3364
1366
  className: "lg:hidden h-screen left-0 p-6 w-[320px] rounded-none overflow-auto",
3365
1367
  "aria-describedby": void 0,
3366
1368
  children: [
3367
- /* @__PURE__ */ a.jsx(Un, { children: /* @__PURE__ */ a.jsx(nn, { children: "Sidebar" }) }),
3368
- t.data.items.map((n) => /* @__PURE__ */ a.jsx(At, { item: n }, n.label))
1369
+ /* @__PURE__ */ a.jsx($e, { children: /* @__PURE__ */ a.jsx(Xe, { children: "Sidebar" }) }),
1370
+ e.data.items.map((r) => /* @__PURE__ */ a.jsx(oe, { item: r }, r.label))
3369
1371
  ]
3370
1372
  }
3371
1373
  )
3372
1374
  ] });
3373
- }, Xl = ({ children: e }) => {
3374
- const t = Ft(), { setActiveAnchor: n } = Bt(), { meta: r, authentication: o } = Ae();
3375
- Gl(), Wl();
3376
- const s = Ht(t.pathname);
3377
- return Ce(() => {
1375
+ }, ha = ({ children: t }) => {
1376
+ const e = ue(), { setActiveAnchor: r } = fe(), { meta: s, authentication: n } = L();
1377
+ ca(), ua();
1378
+ const o = de(e.pathname);
1379
+ return F(() => {
3378
1380
  var i;
3379
- (i = o == null ? void 0 : o.pageLoad) == null || i.call(o);
3380
- }, [o]), Ce(() => {
3381
- t.pathname !== s.current && n(""), s.current = t.pathname;
3382
- }, [t.pathname, n]), /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
1381
+ (i = n == null ? void 0 : n.pageLoad) == null || i.call(n);
1382
+ }, [n]), F(() => {
1383
+ e.pathname !== o.current && r(""), o.current = e.pathname;
1384
+ }, [e.pathname, r]), /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
3383
1385
  !1,
3384
- /* @__PURE__ */ a.jsxs(kt, { titleTemplate: r == null ? void 0 : r.title, children: [
3385
- (r == null ? void 0 : r.description) && /* @__PURE__ */ a.jsx("meta", { name: "description", content: r.description }),
3386
- (r == null ? void 0 : r.favicon) && /* @__PURE__ */ a.jsx("link", { rel: "icon", href: r.favicon })
1386
+ /* @__PURE__ */ a.jsxs(le, { titleTemplate: s == null ? void 0 : s.title, children: [
1387
+ (s == null ? void 0 : s.description) && /* @__PURE__ */ a.jsx("meta", { name: "description", content: s.description }),
1388
+ (s == null ? void 0 : s.favicon) && /* @__PURE__ */ a.jsx("link", { rel: "icon", href: s.favicon })
3387
1389
  ] }),
3388
- /* @__PURE__ */ a.jsx(ye, { name: "layout-before-head" }),
3389
- /* @__PURE__ */ a.jsx(Ma, {}),
3390
- /* @__PURE__ */ a.jsx(ye, { name: "layout-after-head" }),
1390
+ /* @__PURE__ */ a.jsx(k, { name: "layout-before-head" }),
1391
+ /* @__PURE__ */ a.jsx(st, {}),
1392
+ /* @__PURE__ */ a.jsx(k, { name: "layout-after-head" }),
3391
1393
  /* @__PURE__ */ a.jsx("div", { className: "w-full max-w-screen-2xl mx-auto px-10 lg:px-12", children: /* @__PURE__ */ a.jsx(
3392
- Vn,
1394
+ Be,
3393
1395
  {
3394
- fallback: /* @__PURE__ */ a.jsx("main", { className: "grid h-[calc(100vh-var(--header-height))] place-items-center", children: /* @__PURE__ */ a.jsx(us, {}) }),
3395
- children: /* @__PURE__ */ a.jsxs(en, { direction: "left", children: [
3396
- /* @__PURE__ */ a.jsx(Yl, {}),
1396
+ fallback: /* @__PURE__ */ a.jsx("main", { className: "grid h-[calc(100vh-var(--header-height))] place-items-center", children: /* @__PURE__ */ a.jsx(pr, {}) }),
1397
+ children: /* @__PURE__ */ a.jsxs(Ve, { direction: "left", children: [
1398
+ /* @__PURE__ */ a.jsx(da, {}),
3397
1399
  /* @__PURE__ */ a.jsx(
3398
1400
  "div",
3399
1401
  {
3400
- className: F(
1402
+ className: M(
3401
1403
  "lg:hidden -mx-10 px-10 py-2 sticky bg-background/80 backdrop-blur z-10 top-0 left-0 right-0 border-b",
3402
1404
  "peer-data-[navigation=false]:hidden"
3403
1405
  ),
3404
- children: /* @__PURE__ */ a.jsxs(ya, { className: "flex items-center gap-2", children: [
3405
- /* @__PURE__ */ a.jsx(Jo, { size: 16, strokeWidth: 1.5 }),
1406
+ children: /* @__PURE__ */ a.jsxs(We, { className: "flex items-center gap-2", children: [
1407
+ /* @__PURE__ */ a.jsx(ar, { size: 16, strokeWidth: 1.5 }),
3406
1408
  /* @__PURE__ */ a.jsx("span", { className: "text-sm", children: "Menu" })
3407
1409
  ] })
3408
1410
  }
@@ -3410,7 +1412,7 @@ const Yl = () => {
3410
1412
  /* @__PURE__ */ a.jsxs(
3411
1413
  "main",
3412
1414
  {
3413
- className: F(
1415
+ className: M(
3414
1416
  "h-full dark:border-white/10 translate-x-0",
3415
1417
  "lg:overflow-visible",
3416
1418
  // This works in tandem with the `SidebarWrapper` component
@@ -3418,9 +1420,9 @@ const Yl = () => {
3418
1420
  "lg:peer-data-[navigation=true]:translate-x-[--side-nav-width] lg:peer-data-[navigation=true]:pl-12"
3419
1421
  ),
3420
1422
  children: [
3421
- /* @__PURE__ */ a.jsx(ye, { name: "zudoku-before-content" }),
3422
- e ?? /* @__PURE__ */ a.jsx(An, {}),
3423
- /* @__PURE__ */ a.jsx(ye, { name: "zudoku-after-content" })
1423
+ /* @__PURE__ */ a.jsx(k, { name: "zudoku-before-content" }),
1424
+ t ?? /* @__PURE__ */ a.jsx(Ie, {}),
1425
+ /* @__PURE__ */ a.jsx(k, { name: "zudoku-after-content" })
3424
1426
  ]
3425
1427
  }
3426
1428
  )
@@ -3428,22 +1430,22 @@ const Yl = () => {
3428
1430
  }
3429
1431
  ) })
3430
1432
  ] });
3431
- }, vc = Qa, wc = rn, yc = Xl, xc = to, bc = ds, Sc = Ps, Cc = js, Mc = kt, Rc = Ae, Ec = Ja, Dc = rn, Pc = So, jc = Oo, Nc = Nt, Tc = $t;
1433
+ }, Fa = gt, Qa = ge, La = ha, Ba = Nt, Ha = vr, qa = Tr, za = Ir, Ka = le, $a = L, Ua = wt, Va = ge, Wa = St, Ya = Rt, Xa = ne, Za = ce;
3432
1434
  export {
3433
- Sc as Bootstrap,
3434
- Cc as BootstrapStatic,
3435
- Nc as Button,
3436
- Pc as Callout,
3437
- jc as ClientOnly,
3438
- wc as DevPortal,
3439
- Mc as Head,
3440
- yc as Layout,
3441
- Tc as Link,
3442
- xc as RouterError,
3443
- bc as ServerError,
3444
- Dc as Zudoku,
3445
- Ec as useAuth,
3446
- vc as useMDXComponents,
3447
- Rc as useZudoku
1435
+ qa as Bootstrap,
1436
+ za as BootstrapStatic,
1437
+ Xa as Button,
1438
+ Wa as Callout,
1439
+ Ya as ClientOnly,
1440
+ Qa as DevPortal,
1441
+ Ka as Head,
1442
+ La as Layout,
1443
+ Za as Link,
1444
+ Ba as RouterError,
1445
+ Ha as ServerError,
1446
+ Va as Zudoku,
1447
+ Ua as useAuth,
1448
+ Fa as useMDXComponents,
1449
+ $a as useZudoku
3448
1450
  };
3449
1451
  //# sourceMappingURL=zudoku.components.js.map