@nxgt/material 3.75.0 → 3.76.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (239) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/README.md +37 -1
  3. package/dist/{alert-dialog-BfO_ri-N.js → alert-dialog-653apk3f.js} +8 -7
  4. package/dist/{async-slice-roMAJVzG.js → async-slice-CXLbQuOc.js} +1 -1
  5. package/dist/{bubble-input-B7BVd9fX.js → bubble-input-CQwVSoU3.js} +30 -29
  6. package/dist/{button-DgenqmpS.js → button-3op3rtZh.js} +5 -4
  7. package/dist/calculator-BaSMe0SK.js +1189 -0
  8. package/dist/calculator-announce-DRd2c6Dq.js +89 -0
  9. package/dist/calculator-context-BugcKuVG.js +10 -0
  10. package/dist/calculator-field.js +172 -0
  11. package/dist/calculator-panel-announce-AZSnZUSr.js +29 -0
  12. package/dist/calculator-segment-BlJE1LaS.js +22 -0
  13. package/dist/calculator.js +2 -0
  14. package/dist/charts.js +3 -3
  15. package/dist/{chip-CiDczNxO.js → chip-MuKDwtkG.js} +2 -2
  16. package/dist/{code-editor-CohlhFsA.js → code-editor-Bp2RrdNx.js} +13 -13
  17. package/dist/code-editor.js +37 -37
  18. package/dist/{code-language-items-Cs8GLYDp.js → code-language-items-B7WR5ua_.js} +19 -24
  19. package/dist/components/base-content.css +9 -4
  20. package/dist/components/ui/collections/server-table/server-table-phone-row.css +10 -3
  21. package/dist/{components-zJdfH4im.js → components-Ci3Zo8kC.js} +15837 -17245
  22. package/dist/components.js +37 -28
  23. package/dist/conversion-variant-BDFAxqe9.js +529 -0
  24. package/dist/copy-to-clipboard-Be5Ffvs_.js +7 -0
  25. package/dist/currency-B-r3ig11.js +16 -0
  26. package/dist/currency-field-BJ9rSrif.js +285 -0
  27. package/dist/{number.utils-BG_eEt5g.js → date.utils-DUvqcjan.js} +1 -7
  28. package/dist/dialog-Bm5LvVlB.js +166 -0
  29. package/dist/dist-BZe2evxL.js +139 -0
  30. package/dist/dist-CxhKjOYm.js +28 -0
  31. package/dist/dist-DHdUUM1w.js +241 -0
  32. package/dist/{dist-C4wtXCjf.js → dist-DOK3zo5C.js} +33 -32
  33. package/dist/dist-DWZXlCZR.js +182 -0
  34. package/dist/dist-DkQbkF9T.js +33 -0
  35. package/dist/dnd.js +1 -1
  36. package/dist/{dropdown-menu-CzR6JP31.js → dropdown-menu-xlZ6NYUA.js} +160 -159
  37. package/dist/editor.js +299 -298
  38. package/dist/{empty-state-DjHGMp5F.js → empty-state-C0kviQdW.js} +2 -2
  39. package/dist/{field-blur-CdASxjL7.js → field-blur-DkiZOVNV.js} +178 -180
  40. package/dist/{field-blur-context-kZ4SD7xu.js → field-blur-context-BLGgf_3z.js} +2 -2
  41. package/dist/financial-variant-BsZEa5sF.js +459 -0
  42. package/dist/{hooks-Dqq8O3Az.js → hooks-Dg94jPRq.js} +12 -12
  43. package/dist/hooks.js +2 -2
  44. package/dist/{hover-card-BPKqte4a.js → hover-card-B1g55Hi6.js} +44 -43
  45. package/dist/i18n.js +3 -3
  46. package/dist/icon-badge-BcW66bRk.js +17 -0
  47. package/dist/{icon-button-Cr-DyDGg.js → icon-button-Cogxy1cy.js} +5 -4
  48. package/dist/{in-dialog-Vwkyp-M5.js → in-dialog-D61Yeaol.js} +2 -1
  49. package/dist/input-CC2joTjB.js +56 -0
  50. package/dist/key-layout-cR79xfGE.js +38 -0
  51. package/dist/lib/calculator/index.d.ts +16 -0
  52. package/dist/lib/calculator-field/index.d.ts +12 -0
  53. package/dist/lib/components/ui/collections/filter/use-filter-field-config.d.ts +2 -2
  54. package/dist/lib/components/ui/feedback/moment/moment-body.d.ts +17 -2
  55. package/dist/lib/components/ui/feedback/moment/moment-passive.d.ts +13 -0
  56. package/dist/lib/components/ui/feedback/moment/moment.d.ts +16 -2
  57. package/dist/lib/components/ui/fields/calculator-field/apply-calculated.d.ts +17 -0
  58. package/dist/lib/components/ui/fields/calculator-field/calculator-field-content.d.ts +16 -0
  59. package/dist/lib/components/ui/fields/calculator-field/calculator-field-trigger.d.ts +4 -0
  60. package/dist/lib/components/ui/fields/calculator-field/calculator-field.d.ts +12 -0
  61. package/dist/lib/components/ui/fields/calculator-field/calculator-field.types.d.ts +31 -0
  62. package/dist/lib/components/ui/fields/calculator-field/calculator-form-field.d.ts +4 -0
  63. package/dist/lib/components/ui/fields/calculator-field/index.d.ts +3 -0
  64. package/dist/lib/components/ui/fields/calculator-field/use-calculator-field.d.ts +15 -0
  65. package/dist/lib/components/ui/fields/contacts/placeholders.d.ts +1 -1
  66. package/dist/lib/components/ui/fields/currency-field/currency-field.d.ts +7 -1
  67. package/dist/lib/components/ui/layout/app-shell/app-sidebar-context.d.ts +4 -0
  68. package/dist/lib/components/ui/widgets/calculator/calculator-announce.d.ts +27 -0
  69. package/dist/lib/components/ui/widgets/calculator/calculator-clipboard.d.ts +19 -0
  70. package/dist/lib/components/ui/widgets/calculator/calculator-context.d.ts +49 -0
  71. package/dist/lib/components/ui/widgets/calculator/calculator-feedback.d.ts +18 -0
  72. package/dist/lib/components/ui/widgets/calculator/calculator-keyboard.d.ts +30 -0
  73. package/dist/lib/components/ui/widgets/calculator/calculator-storage.d.ts +17 -0
  74. package/dist/lib/components/ui/widgets/calculator/calculator-variant-steps.d.ts +16 -0
  75. package/dist/lib/components/ui/widgets/calculator/calculator.d.ts +11 -0
  76. package/dist/lib/components/ui/widgets/calculator/calculator.selectors.d.ts +23 -0
  77. package/dist/lib/components/ui/widgets/calculator/calculator.slice.d.ts +1881 -0
  78. package/dist/lib/components/ui/widgets/calculator/currency.d.ts +9 -0
  79. package/dist/lib/components/ui/widgets/calculator/engine.d.ts +22 -0
  80. package/dist/lib/components/ui/widgets/calculator/index.d.ts +3 -0
  81. package/dist/lib/components/ui/widgets/calculator/partials/calculator-announcer.d.ts +2 -0
  82. package/dist/lib/components/ui/widgets/calculator/partials/calculator-display.d.ts +3 -0
  83. package/dist/lib/components/ui/widgets/calculator/partials/calculator-key.d.ts +17 -0
  84. package/dist/lib/components/ui/widgets/calculator/partials/calculator-keypad.d.ts +8 -0
  85. package/dist/lib/components/ui/widgets/calculator/partials/calculator-loading.d.ts +6 -0
  86. package/dist/lib/components/ui/widgets/calculator/partials/calculator-memory.d.ts +2 -0
  87. package/dist/lib/components/ui/widgets/calculator/partials/calculator-panel-announce.d.ts +10 -0
  88. package/dist/lib/components/ui/widgets/calculator/partials/calculator-panel-body.d.ts +9 -0
  89. package/dist/lib/components/ui/widgets/calculator/partials/calculator-screen.d.ts +4 -0
  90. package/dist/lib/components/ui/widgets/calculator/partials/calculator-segment.d.ts +21 -0
  91. package/dist/lib/components/ui/widgets/calculator/partials/calculator-shell.d.ts +9 -0
  92. package/dist/lib/components/ui/widgets/calculator/partials/calculator-switcher.d.ts +5 -0
  93. package/dist/lib/components/ui/widgets/calculator/partials/calculator-tape.d.ts +4 -0
  94. package/dist/lib/components/ui/widgets/calculator/partials/calculator-tools.d.ts +4 -0
  95. package/dist/lib/components/ui/widgets/calculator/partials/keypad-navigation.d.ts +24 -0
  96. package/dist/lib/components/ui/widgets/calculator/types.d.ts +102 -0
  97. package/dist/lib/components/ui/widgets/calculator/use-calculator-clipboard.d.ts +19 -0
  98. package/dist/lib/components/ui/widgets/calculator/use-calculator-conversion.d.ts +4 -0
  99. package/dist/lib/components/ui/widgets/calculator/use-calculator-feedback.d.ts +3 -0
  100. package/dist/lib/components/ui/widgets/calculator/use-calculator-keyboard.d.ts +22 -0
  101. package/dist/lib/components/ui/widgets/calculator/use-calculator-persistence.d.ts +14 -0
  102. package/dist/lib/components/ui/widgets/calculator/use-calculator-pos.d.ts +25 -0
  103. package/dist/lib/components/ui/widgets/calculator/use-calculator-press.d.ts +26 -0
  104. package/dist/lib/components/ui/widgets/calculator/use-calculator-tape.d.ts +29 -0
  105. package/dist/lib/components/ui/widgets/calculator/use-calculator-value.d.ts +9 -0
  106. package/dist/lib/components/ui/widgets/calculator/use-calculator-variant.d.ts +23 -0
  107. package/dist/lib/components/ui/widgets/calculator/use-calculator.d.ts +10 -0
  108. package/dist/lib/components/ui/widgets/calculator/use-engine-settings.d.ts +10 -0
  109. package/dist/lib/components/ui/widgets/calculator/variants/conversion/conversion-fields.d.ts +19 -0
  110. package/dist/lib/components/ui/widgets/calculator/variants/conversion/conversion-labels.d.ts +17 -0
  111. package/dist/lib/components/ui/widgets/calculator/variants/conversion/conversion-math.d.ts +31 -0
  112. package/dist/lib/components/ui/widgets/calculator/variants/conversion/conversion-names.d.ts +4 -0
  113. package/dist/lib/components/ui/widgets/calculator/variants/conversion/conversion-panel.d.ts +7 -0
  114. package/dist/lib/components/ui/widgets/calculator/variants/conversion/conversion-rates.d.ts +29 -0
  115. package/dist/lib/components/ui/widgets/calculator/variants/conversion/conversion-result.d.ts +15 -0
  116. package/dist/lib/components/ui/widgets/calculator/variants/conversion/conversion-state.d.ts +36 -0
  117. package/dist/lib/components/ui/widgets/calculator/variants/conversion/conversion-variant.d.ts +3 -0
  118. package/dist/lib/components/ui/widgets/calculator/variants/conversion/use-conversion.d.ts +24 -0
  119. package/dist/lib/components/ui/widgets/calculator/variants/financial/financial-change.d.ts +4 -0
  120. package/dist/lib/components/ui/widgets/calculator/variants/financial/financial-figures.d.ts +43 -0
  121. package/dist/lib/components/ui/widgets/calculator/variants/financial/financial-format.d.ts +12 -0
  122. package/dist/lib/components/ui/widgets/calculator/variants/financial/financial-loan-math.d.ts +14 -0
  123. package/dist/lib/components/ui/widgets/calculator/variants/financial/financial-loan.d.ts +4 -0
  124. package/dist/lib/components/ui/widgets/calculator/variants/financial/financial-margin.d.ts +4 -0
  125. package/dist/lib/components/ui/widgets/calculator/variants/financial/financial-math.d.ts +10 -0
  126. package/dist/lib/components/ui/widgets/calculator/variants/financial/financial-panel.d.ts +7 -0
  127. package/dist/lib/components/ui/widgets/calculator/variants/financial/financial-parts.d.ts +35 -0
  128. package/dist/lib/components/ui/widgets/calculator/variants/financial/financial-table.d.ts +7 -0
  129. package/dist/lib/components/ui/widgets/calculator/variants/financial/financial-variant.d.ts +3 -0
  130. package/dist/lib/components/ui/widgets/calculator/variants/financial/financial-vat.d.ts +4 -0
  131. package/dist/lib/components/ui/widgets/calculator/variants/key-layout.d.ts +51 -0
  132. package/dist/lib/components/ui/widgets/calculator/variants/pos/pos-announce.d.ts +16 -0
  133. package/dist/lib/components/ui/widgets/calculator/variants/pos/pos-aside.d.ts +2 -0
  134. package/dist/lib/components/ui/widgets/calculator/variants/pos/pos-display.d.ts +2 -0
  135. package/dist/lib/components/ui/widgets/calculator/variants/pos/pos-fields.d.ts +2 -0
  136. package/dist/lib/components/ui/widgets/calculator/variants/pos/pos-layout.d.ts +9 -0
  137. package/dist/lib/components/ui/widgets/calculator/variants/pos/pos-line.d.ts +6 -0
  138. package/dist/lib/components/ui/widgets/calculator/variants/pos/pos-names.d.ts +2 -0
  139. package/dist/lib/components/ui/widgets/calculator/variants/pos/pos-state.d.ts +3 -0
  140. package/dist/lib/components/ui/widgets/calculator/variants/pos/pos-tender.d.ts +2 -0
  141. package/dist/lib/components/ui/widgets/calculator/variants/pos/pos-ticket-data.d.ts +41 -0
  142. package/dist/lib/components/ui/widgets/calculator/variants/pos/pos-ticket.d.ts +5 -0
  143. package/dist/lib/components/ui/widgets/calculator/variants/pos/pos-totals.d.ts +2 -0
  144. package/dist/lib/components/ui/widgets/calculator/variants/pos/pos-types.d.ts +76 -0
  145. package/dist/lib/components/ui/widgets/calculator/variants/pos/pos-variant.d.ts +3 -0
  146. package/dist/lib/components/ui/widgets/calculator/variants/pos/pos-vat.d.ts +2 -0
  147. package/dist/lib/components/ui/widgets/calculator/variants/pos/pos-view.d.ts +28 -0
  148. package/dist/lib/components/ui/widgets/calculator/variants/programmer/programmer-announce.d.ts +19 -0
  149. package/dist/lib/components/ui/widgets/calculator/variants/programmer/programmer-base.d.ts +11 -0
  150. package/dist/lib/components/ui/widgets/calculator/variants/programmer/programmer-bitpad.d.ts +14 -0
  151. package/dist/lib/components/ui/widgets/calculator/variants/programmer/programmer-display.d.ts +9 -0
  152. package/dist/lib/components/ui/widgets/calculator/variants/programmer/programmer-layout.d.ts +6 -0
  153. package/dist/lib/components/ui/widgets/calculator/variants/programmer/programmer-names.d.ts +2 -0
  154. package/dist/lib/components/ui/widgets/calculator/variants/programmer/programmer-readouts.d.ts +14 -0
  155. package/dist/lib/components/ui/widgets/calculator/variants/programmer/programmer-reduce.d.ts +29 -0
  156. package/dist/lib/components/ui/widgets/calculator/variants/programmer/programmer-state.d.ts +22 -0
  157. package/dist/lib/components/ui/widgets/calculator/variants/programmer/programmer-toolbar.d.ts +5 -0
  158. package/dist/lib/components/ui/widgets/calculator/variants/programmer/programmer-variant.d.ts +3 -0
  159. package/dist/lib/components/ui/widgets/calculator/variants/programmer/programmer-word.d.ts +15 -0
  160. package/dist/lib/components/ui/widgets/calculator/variants/registry.d.ts +21 -0
  161. package/dist/lib/components/ui/widgets/calculator/variants/scientific/scientific-layout.d.ts +3 -0
  162. package/dist/lib/components/ui/widgets/calculator/variants/scientific/scientific-names.d.ts +2 -0
  163. package/dist/lib/components/ui/widgets/calculator/variants/scientific/scientific-toolbar.d.ts +2 -0
  164. package/dist/lib/components/ui/widgets/calculator/variants/scientific/scientific-variant.d.ts +3 -0
  165. package/dist/lib/components/ui/widgets/calculator/variants/standard/standard-layout.d.ts +3 -0
  166. package/dist/lib/components/ui/widgets/calculator/variants/variant-loader.d.ts +34 -0
  167. package/dist/lib/components/ui/widgets/calculator/variants/variant-logic.d.ts +40 -0
  168. package/dist/lib/components/ui/widgets/calculator/variants/variant-types.d.ts +62 -0
  169. package/dist/lib/i18n/resources/en/en.d.ts +412 -0
  170. package/dist/lib/i18n/resources/en/material.json.d.ts +412 -0
  171. package/dist/lib/i18n/resources/fr/fr.d.ts +412 -0
  172. package/dist/lib/i18n/resources/fr/material.json.d.ts +412 -0
  173. package/dist/lib/i18n/resources/resources.d.ts +824 -0
  174. package/dist/lib/i18n/translator.d.ts +1 -1
  175. package/dist/lib.js +4 -3
  176. package/dist/main.js +50 -40
  177. package/dist/map.js +66 -65
  178. package/dist/material.css +1 -1
  179. package/dist/native-select-w_FlBLHV.js +40 -0
  180. package/dist/number.utils-CSueQZcv.js +7 -0
  181. package/dist/pdf-reader.js +1 -1
  182. package/dist/percent-field-lahyDJDG.js +14 -0
  183. package/dist/picker-surface-CV09H7Nb.js +1220 -0
  184. package/dist/popover-Cd7DkND4.js +233 -0
  185. package/dist/pos-types-DKCkOTYy.js +49 -0
  186. package/dist/pos-variant-GrUfbTTP.js +603 -0
  187. package/dist/print.js +1 -1
  188. package/dist/programmer-variant-eKJNKENL.js +501 -0
  189. package/dist/programmer-word-CNCF7DJF.js +15 -0
  190. package/dist/{public-DC9VQw4Z.js → public-y6g4ddxd.js} +895 -892
  191. package/dist/{rich-code-block-DBSL9zEN.js → rich-code-block-CRQ0iyLb.js} +5 -5
  192. package/dist/scientific-variant-2y3UxAAU.js +149 -0
  193. package/dist/{sortable-provider-C4tk5esY.js → sortable-provider-DdiI3Fwk.js} +2 -2
  194. package/dist/{spinner-B2MubVWb.js → spinner-C1QIewWv.js} +133 -159
  195. package/dist/standard-layout-BuSRr3TY.js +40 -0
  196. package/dist/tabs-DzEqMb1W.js +383 -0
  197. package/dist/{icon-badge-B9uvDoyY.js → text-field-BAdY-kpO.js} +20 -34
  198. package/dist/theme-picker.js +3 -3
  199. package/dist/{theme-toggle-BInlu21G.js → theme-toggle-C_VeiiCm.js} +2 -2
  200. package/dist/toggle-FeCCJqbg.js +40 -0
  201. package/dist/{toggle-group-DXXlqid2.js → toggle-group-CVMxEpWi.js} +1 -1
  202. package/dist/{toolbar-items-CRJSx1MU.js → toolbar-items-D310xDuM.js} +333 -554
  203. package/dist/{translate-material-pVlPJ1v4.js → translate-material-BypJJ1l5.js} +1 -1
  204. package/dist/{translator-BoYCward.js → translator-DJkf4J7t.js} +824 -0
  205. package/dist/{typography-B6YMbCge.js → typography-CYEquVeb.js} +1 -1
  206. package/dist/{use-chat-composer-BvWQogJe.js → use-chat-composer-DMXu9E1O.js} +4198 -4600
  207. package/dist/{use-heading-spy-B_Z4ArDh.js → use-heading-spy-DJR8YYm6.js} +19 -19
  208. package/dist/{use-material-translation-CIS2n3RB.js → use-material-translation-CD6QoVal.js} +1 -1
  209. package/dist/{use-return-focus-DNQtADAR.js → use-return-focus-Cevw_6yq.js} +106 -105
  210. package/dist/useLatest-C2PnQEeD.js +8 -0
  211. package/docs/README.md +1 -0
  212. package/docs/components/feedback-and-status.md +10 -1
  213. package/docs/components/form-fields.md +1 -0
  214. package/docs/components/rich-widgets.md +108 -0
  215. package/docs/getting-started.md +1 -0
  216. package/docs/guides/calculator.md +468 -0
  217. package/docs/guides/forms.md +4 -2
  218. package/docs/guides/i18n.md +5 -0
  219. package/docs/previews/rich-widgets-calculator-conversion.webp +0 -0
  220. package/docs/previews/rich-widgets-calculator-point-of-sale.webp +0 -0
  221. package/docs/previews/rich-widgets-calculator.webp +0 -0
  222. package/docs/roadmap.md +9 -3
  223. package/docs/troubleshooting.md +134 -0
  224. package/lib/components/base-content.css +9 -4
  225. package/lib/components/ui/collections/server-table/server-table-phone-row.css +10 -3
  226. package/lib/components/ui/widgets/calculator/calculator-bands.css +146 -0
  227. package/lib/components/ui/widgets/calculator/calculator-display.css +83 -0
  228. package/lib/components/ui/widgets/calculator/calculator-keys.css +118 -0
  229. package/lib/components/ui/widgets/calculator/calculator-pos-ticket.css +185 -0
  230. package/lib/components/ui/widgets/calculator/calculator-pos.css +38 -0
  231. package/lib/components/ui/widgets/calculator/calculator-tape.css +71 -0
  232. package/lib/components/ui/widgets/calculator/calculator.css +97 -0
  233. package/lib/components/ui/widgets/calculator/variants/conversion/conversion.css +98 -0
  234. package/lib/components/ui/widgets/calculator/variants/financial/financial.css +162 -0
  235. package/lib/components/ui/widgets/calculator/variants/programmer/programmer.css +162 -0
  236. package/package.json +17 -3
  237. package/dist/dialog-AGsB3bv4.js +0 -219
  238. package/dist/dist-B7RjY7SL.js +0 -158
  239. package/dist/dist-lmHmz_bu.js +0 -419
@@ -0,0 +1,1220 @@
1
+ import { t as e } from "./utils-BLfntITJ.js";
2
+ import { r as t, t as n } from "./in-dialog-D61Yeaol.js";
3
+ import { a as r, c as i, i as a, l as o, n as s, o as c, r as l, s as u, t as d, u as f } from "./use-return-focus-Cevw_6yq.js";
4
+ import { i as p, o as m, r as h, t as g } from "./popover-Cd7DkND4.js";
5
+ import { t as _ } from "./use-material-translation-CD6QoVal.js";
6
+ import { n as v, t as y } from "./icon-button-Cogxy1cy.js";
7
+ import { t as b } from "./use-ssr-media-query-C6M5m8sf.js";
8
+ import { i as x } from "./escape-owner-DpaP0lm1.js";
9
+ import * as S from "react";
10
+ import C, { createContext as ee, useContext as w, useEffect as T, useId as E, useLayoutEffect as te, useMemo as ne, useState as re } from "react";
11
+ import { Fragment as D, jsx as O, jsxs as k } from "react/jsx-runtime";
12
+ import { Calendar as ie, Pencil as A, X as ae } from "lucide-react";
13
+ //#region ../../node_modules/vaul/dist/index.mjs
14
+ var oe = C.createContext({
15
+ drawerRef: { current: null },
16
+ overlayRef: { current: null },
17
+ onPress: () => {},
18
+ onRelease: () => {},
19
+ onDrag: () => {},
20
+ onNestedDrag: () => {},
21
+ onNestedOpenChange: () => {},
22
+ onNestedRelease: () => {},
23
+ openProp: void 0,
24
+ dismissible: !1,
25
+ isOpen: !1,
26
+ isDragging: !1,
27
+ keyboardIsOpen: { current: !1 },
28
+ snapPointsOffset: null,
29
+ snapPoints: null,
30
+ handleOnly: !1,
31
+ modal: !1,
32
+ shouldFade: !1,
33
+ activeSnapPoint: null,
34
+ onOpenChange: () => {},
35
+ setActiveSnapPoint: () => {},
36
+ closeDrawer: () => {},
37
+ direction: "bottom",
38
+ shouldAnimate: { current: !0 },
39
+ shouldScaleBackground: !1,
40
+ setBackgroundColorOnScale: !0,
41
+ noBodyStyles: !1,
42
+ container: null,
43
+ autoFocus: !1
44
+ }), j = () => {
45
+ let e = C.useContext(oe);
46
+ if (!e) throw Error("useDrawerContext must be used within a Drawer.Root");
47
+ return e;
48
+ };
49
+ function se() {
50
+ let e = navigator.userAgent;
51
+ return typeof window < "u" && (/Firefox/.test(e) && /Mobile/.test(e) || /FxiOS/.test(e));
52
+ }
53
+ function ce() {
54
+ return P(/^Mac/);
55
+ }
56
+ function M() {
57
+ return P(/^iPhone/);
58
+ }
59
+ function N() {
60
+ return /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
61
+ }
62
+ function le() {
63
+ return P(/^iPad/) || ce() && navigator.maxTouchPoints > 1;
64
+ }
65
+ function ue() {
66
+ return M() || le();
67
+ }
68
+ function P(e) {
69
+ return typeof window < "u" && window.navigator != null ? e.test(window.navigator.platform) : void 0;
70
+ }
71
+ var F = 24, I = typeof window < "u" ? te : T;
72
+ function L(...e) {
73
+ return (...t) => {
74
+ for (let n of e) typeof n == "function" && n(...t);
75
+ };
76
+ }
77
+ var R = typeof document < "u" && window.visualViewport;
78
+ function z(e) {
79
+ let t = window.getComputedStyle(e);
80
+ return /(auto|scroll)/.test(t.overflow + t.overflowX + t.overflowY);
81
+ }
82
+ function B(e) {
83
+ for (z(e) && (e = e.parentElement); e && !z(e);) e = e.parentElement;
84
+ return e || document.scrollingElement || document.documentElement;
85
+ }
86
+ var de = /* @__PURE__ */ new Set([
87
+ "checkbox",
88
+ "radio",
89
+ "range",
90
+ "color",
91
+ "file",
92
+ "image",
93
+ "button",
94
+ "submit",
95
+ "reset"
96
+ ]), V = 0, H;
97
+ function fe(e = {}) {
98
+ let { isDisabled: t } = e;
99
+ I(() => {
100
+ if (!t) return V++, V === 1 && ue() && (H = pe()), () => {
101
+ V--, V === 0 && H?.();
102
+ };
103
+ }, [t]);
104
+ }
105
+ function pe() {
106
+ let e, t = 0, n = (n) => {
107
+ e = B(n.target), !(e === document.documentElement && e === document.body) && (t = n.changedTouches[0].pageY);
108
+ }, r = (n) => {
109
+ if (!e || e === document.documentElement || e === document.body) {
110
+ n.preventDefault();
111
+ return;
112
+ }
113
+ let r = n.changedTouches[0].pageY, i = e.scrollTop, a = e.scrollHeight - e.clientHeight;
114
+ a !== 0 && ((i <= 0 && r > t || i >= a && r < t) && n.preventDefault(), t = r);
115
+ }, i = (e) => {
116
+ let t = e.target;
117
+ he(t) && t !== document.activeElement && (e.preventDefault(), t.style.transform = "translateY(-2000px)", t.focus(), requestAnimationFrame(() => {
118
+ t.style.transform = "";
119
+ }));
120
+ }, a = (e) => {
121
+ let t = e.target;
122
+ he(t) && (t.style.transform = "translateY(-2000px)", requestAnimationFrame(() => {
123
+ t.style.transform = "", R && (R.height < window.innerHeight ? requestAnimationFrame(() => {
124
+ W(t);
125
+ }) : R.addEventListener("resize", () => W(t), { once: !0 }));
126
+ }));
127
+ }, o = () => {
128
+ window.scrollTo(0, 0);
129
+ }, s = window.pageXOffset, c = window.pageYOffset, l = L(me(document.documentElement, "paddingRight", `${window.innerWidth - document.documentElement.clientWidth}px`));
130
+ window.scrollTo(0, 0);
131
+ let u = L(U(document, "touchstart", n, {
132
+ passive: !1,
133
+ capture: !0
134
+ }), U(document, "touchmove", r, {
135
+ passive: !1,
136
+ capture: !0
137
+ }), U(document, "touchend", i, {
138
+ passive: !1,
139
+ capture: !0
140
+ }), U(document, "focus", a, !0), U(window, "scroll", o));
141
+ return () => {
142
+ l(), u(), window.scrollTo(s, c);
143
+ };
144
+ }
145
+ function me(e, t, n) {
146
+ let r = e.style[t];
147
+ return e.style[t] = n, () => {
148
+ e.style[t] = r;
149
+ };
150
+ }
151
+ function U(e, t, n, r) {
152
+ return e.addEventListener(t, n, r), () => {
153
+ e.removeEventListener(t, n, r);
154
+ };
155
+ }
156
+ function W(e) {
157
+ let t = document.scrollingElement || document.documentElement;
158
+ for (; e && e !== t;) {
159
+ let t = B(e);
160
+ if (t !== document.documentElement && t !== document.body && t !== e) {
161
+ let n = t.getBoundingClientRect().top, r = e.getBoundingClientRect().top;
162
+ e.getBoundingClientRect().bottom > t.getBoundingClientRect().bottom + F && (t.scrollTop += r - n);
163
+ }
164
+ e = t.parentElement;
165
+ }
166
+ }
167
+ function he(e) {
168
+ return e instanceof HTMLInputElement && !de.has(e.type) || e instanceof HTMLTextAreaElement || e instanceof HTMLElement && e.isContentEditable;
169
+ }
170
+ function ge(e, t) {
171
+ typeof e == "function" ? e(t) : e != null && (e.current = t);
172
+ }
173
+ function _e(...e) {
174
+ return (t) => e.forEach((e) => ge(e, t));
175
+ }
176
+ function G(...e) {
177
+ return S.useCallback(_e(...e), e);
178
+ }
179
+ var ve = /* @__PURE__ */ new WeakMap();
180
+ function K(e, t, n = !1) {
181
+ if (!e || !(e instanceof HTMLElement)) return;
182
+ let r = {};
183
+ Object.entries(t).forEach(([t, n]) => {
184
+ if (t.startsWith("--")) {
185
+ e.style.setProperty(t, n);
186
+ return;
187
+ }
188
+ r[t] = e.style[t], e.style[t] = n;
189
+ }), !n && ve.set(e, r);
190
+ }
191
+ function ye(e, t) {
192
+ if (!e || !(e instanceof HTMLElement)) return;
193
+ let n = ve.get(e);
194
+ n && (e.style[t] = n[t]);
195
+ }
196
+ var q = (e) => {
197
+ switch (e) {
198
+ case "top":
199
+ case "bottom": return !0;
200
+ case "left":
201
+ case "right": return !1;
202
+ default: return e;
203
+ }
204
+ };
205
+ function be(e, t) {
206
+ if (!e) return null;
207
+ let n = window.getComputedStyle(e), r = n.transform || n.webkitTransform || n.mozTransform, i = r.match(/^matrix3d\((.+)\)$/);
208
+ return i ? parseFloat(i[1].split(", ")[q(t) ? 13 : 12]) : (i = r.match(/^matrix\((.+)\)$/), i ? parseFloat(i[1].split(", ")[q(t) ? 5 : 4]) : null);
209
+ }
210
+ function xe(e) {
211
+ return 8 * (Math.log(e + 1) - 2);
212
+ }
213
+ function J(e, t) {
214
+ if (!e) return () => {};
215
+ let n = e.style.cssText;
216
+ return Object.assign(e.style, t), () => {
217
+ e.style.cssText = n;
218
+ };
219
+ }
220
+ var Y = {
221
+ DURATION: .5,
222
+ EASE: [
223
+ .32,
224
+ .72,
225
+ 0,
226
+ 1
227
+ ]
228
+ }, Se = .4, Ce = .25, we = 100, Te = 8, Ee = 16, De = 26, Oe = "vaul-dragging";
229
+ function ke(e) {
230
+ let t = C.useRef(e);
231
+ return C.useEffect(() => {
232
+ t.current = e;
233
+ }), C.useMemo(() => (...e) => t.current == null ? void 0 : t.current.call(t, ...e), []);
234
+ }
235
+ function Ae({ defaultProp: e, onChange: t }) {
236
+ let n = C.useState(e), [r] = n, i = C.useRef(r), a = ke(t);
237
+ return C.useEffect(() => {
238
+ i.current !== r && (a(r), i.current = r);
239
+ }, [
240
+ r,
241
+ i,
242
+ a
243
+ ]), n;
244
+ }
245
+ function je({ prop: e, defaultProp: t, onChange: n = () => {} }) {
246
+ let [r, i] = Ae({
247
+ defaultProp: t,
248
+ onChange: n
249
+ }), a = e !== void 0, o = a ? e : r, s = ke(n);
250
+ return [o, C.useCallback((t) => {
251
+ if (a) {
252
+ let n = typeof t == "function" ? t(e) : t;
253
+ n !== e && s(n);
254
+ } else i(t);
255
+ }, [
256
+ a,
257
+ e,
258
+ i,
259
+ s
260
+ ])];
261
+ }
262
+ function Me({ activeSnapPointProp: e, setActiveSnapPointProp: t, snapPoints: n, drawerRef: r, overlayRef: i, fadeFromIndex: a, onSnapPointChange: o, direction: s = "bottom", container: c, snapToSequentialPoint: l }) {
263
+ let [u, d] = je({
264
+ prop: e,
265
+ defaultProp: n?.[0],
266
+ onChange: t
267
+ }), [f, p] = C.useState(typeof window < "u" ? {
268
+ innerWidth: window.innerWidth,
269
+ innerHeight: window.innerHeight
270
+ } : void 0);
271
+ C.useEffect(() => {
272
+ function e() {
273
+ p({
274
+ innerWidth: window.innerWidth,
275
+ innerHeight: window.innerHeight
276
+ });
277
+ }
278
+ return window.addEventListener("resize", e), () => window.removeEventListener("resize", e);
279
+ }, []);
280
+ let m = C.useMemo(() => u === n?.[n.length - 1] || null, [n, u]), h = C.useMemo(() => n?.findIndex((e) => e === u) ?? null, [n, u]), g = n && n.length > 0 && (a || a === 0) && !Number.isNaN(a) && n[a] === u || !n, _ = C.useMemo(() => {
281
+ let e = c ? {
282
+ width: c.getBoundingClientRect().width,
283
+ height: c.getBoundingClientRect().height
284
+ } : typeof window < "u" ? {
285
+ width: window.innerWidth,
286
+ height: window.innerHeight
287
+ } : {
288
+ width: 0,
289
+ height: 0
290
+ };
291
+ return n?.map((t) => {
292
+ let n = typeof t == "string", r = 0;
293
+ if (n && (r = parseInt(t, 10)), q(s)) {
294
+ let i = n ? r : f ? t * e.height : 0;
295
+ return f ? s === "bottom" ? e.height - i : -e.height + i : i;
296
+ }
297
+ let i = n ? r : f ? t * e.width : 0;
298
+ return f ? s === "right" ? e.width - i : -e.width + i : i;
299
+ }) ?? [];
300
+ }, [
301
+ n,
302
+ f,
303
+ c
304
+ ]), v = C.useMemo(() => h === null ? null : _?.[h], [_, h]), y = C.useCallback((e) => {
305
+ let t = _?.findIndex((t) => t === e) ?? null;
306
+ o(t), K(r.current, {
307
+ transition: `transform ${Y.DURATION}s cubic-bezier(${Y.EASE.join(",")})`,
308
+ transform: q(s) ? `translate3d(0, ${e}px, 0)` : `translate3d(${e}px, 0, 0)`
309
+ }), _ && t !== _.length - 1 && a !== void 0 && t !== a && t < a ? K(i.current, {
310
+ transition: `opacity ${Y.DURATION}s cubic-bezier(${Y.EASE.join(",")})`,
311
+ opacity: "0"
312
+ }) : K(i.current, {
313
+ transition: `opacity ${Y.DURATION}s cubic-bezier(${Y.EASE.join(",")})`,
314
+ opacity: "1"
315
+ }), d(n?.[Math.max(t, 0)]);
316
+ }, [
317
+ r.current,
318
+ n,
319
+ _,
320
+ a,
321
+ i,
322
+ d
323
+ ]);
324
+ C.useEffect(() => {
325
+ if (u || e) {
326
+ let t = n?.findIndex((t) => t === e || t === u) ?? -1;
327
+ _ && t !== -1 && typeof _[t] == "number" && y(_[t]);
328
+ }
329
+ }, [
330
+ u,
331
+ e,
332
+ n,
333
+ _,
334
+ y
335
+ ]);
336
+ function b({ draggedDistance: e, closeDrawer: t, velocity: r, dismissible: o }) {
337
+ if (a === void 0) return;
338
+ let c = s === "bottom" || s === "right" ? (v ?? 0) - e : (v ?? 0) + e, u = h === a - 1, d = h === 0, f = e > 0;
339
+ if (u && K(i.current, { transition: `opacity ${Y.DURATION}s cubic-bezier(${Y.EASE.join(",")})` }), !l && r > 2 && !f) {
340
+ o ? t() : y(_[0]);
341
+ return;
342
+ }
343
+ if (!l && r > 2 && f && _ && n) {
344
+ y(_[n.length - 1]);
345
+ return;
346
+ }
347
+ let p = _?.reduce((e, t) => typeof e != "number" || typeof t != "number" ? e : Math.abs(t - c) < Math.abs(e - c) ? t : e), g = q(s) ? window.innerHeight : window.innerWidth;
348
+ if (r > Se && Math.abs(e) < g * .4) {
349
+ let e = f ? 1 : -1;
350
+ if (e > 0 && m && n) {
351
+ y(_[n.length - 1]);
352
+ return;
353
+ }
354
+ if (d && e < 0 && o && t(), h === null) return;
355
+ y(_[h + e]);
356
+ return;
357
+ }
358
+ y(p);
359
+ }
360
+ function x({ draggedDistance: e }) {
361
+ if (v === null) return;
362
+ let t = s === "bottom" || s === "right" ? v - e : v + e;
363
+ (s === "bottom" || s === "right") && t < _[_.length - 1] || (s === "top" || s === "left") && t > _[_.length - 1] || K(r.current, { transform: q(s) ? `translate3d(0, ${t}px, 0)` : `translate3d(${t}px, 0, 0)` });
364
+ }
365
+ function S(e, t) {
366
+ if (!n || typeof h != "number" || !_ || a === void 0) return null;
367
+ let r = h === a - 1;
368
+ if (h >= a && t) return 0;
369
+ if (r && !t) return 1;
370
+ if (!g && !r) return null;
371
+ let i = r ? h + 1 : h - 1, o = r ? _[i] - _[i - 1] : _[i + 1] - _[i], s = e / Math.abs(o);
372
+ return r ? 1 - s : s;
373
+ }
374
+ return {
375
+ isLastSnapPoint: m,
376
+ activeSnapPoint: u,
377
+ shouldFade: g,
378
+ getPercentageDragged: S,
379
+ setActiveSnapPoint: d,
380
+ activeSnapPointIndex: h,
381
+ onRelease: b,
382
+ onDrag: x,
383
+ snapPointsOffset: _
384
+ };
385
+ }
386
+ function X() {
387
+ let { direction: e, isOpen: t, shouldScaleBackground: n, setBackgroundColorOnScale: r, noBodyStyles: i } = j(), a = C.useRef(null), o = ne(() => document.body.style.backgroundColor, []);
388
+ function s() {
389
+ return (window.innerWidth - De) / window.innerWidth;
390
+ }
391
+ C.useEffect(() => {
392
+ if (t && n) {
393
+ a.current && clearTimeout(a.current);
394
+ let t = document.querySelector("[data-vaul-drawer-wrapper]") || document.querySelector("[vaul-drawer-wrapper]");
395
+ if (!t) return;
396
+ r && !i && J(document.body, { background: "black" }), J(t, {
397
+ transformOrigin: q(e) ? "top" : "left",
398
+ transitionProperty: "transform, border-radius",
399
+ transitionDuration: `${Y.DURATION}s`,
400
+ transitionTimingFunction: `cubic-bezier(${Y.EASE.join(",")})`
401
+ });
402
+ let n = J(t, {
403
+ borderRadius: `${Te}px`,
404
+ overflow: "hidden",
405
+ ...q(e) ? { transform: `scale(${s()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)` } : { transform: `scale(${s()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)` }
406
+ });
407
+ return () => {
408
+ n(), a.current = window.setTimeout(() => {
409
+ o ? document.body.style.background = o : document.body.style.removeProperty("background");
410
+ }, Y.DURATION * 1e3);
411
+ };
412
+ }
413
+ }, [
414
+ t,
415
+ n,
416
+ o
417
+ ]);
418
+ }
419
+ var Z = null;
420
+ function Ne({ isOpen: e, modal: t, nested: n, hasBeenOpened: r, preventScrollRestoration: i, noBodyStyles: a }) {
421
+ let [o, s] = C.useState(() => typeof window < "u" ? window.location.href : ""), c = C.useRef(0), l = C.useCallback(() => {
422
+ if (N() && Z === null && e && !a) {
423
+ Z = {
424
+ position: document.body.style.position,
425
+ top: document.body.style.top,
426
+ left: document.body.style.left,
427
+ height: document.body.style.height,
428
+ right: "unset"
429
+ };
430
+ let { scrollX: e, innerHeight: t } = window;
431
+ document.body.style.setProperty("position", "fixed", "important"), Object.assign(document.body.style, {
432
+ top: `${-c.current}px`,
433
+ left: `${-e}px`,
434
+ right: "0px",
435
+ height: "auto"
436
+ }), window.setTimeout(() => window.requestAnimationFrame(() => {
437
+ let e = t - window.innerHeight;
438
+ e && c.current >= t && (document.body.style.top = `${-(c.current + e)}px`);
439
+ }), 300);
440
+ }
441
+ }, [e]), u = C.useCallback(() => {
442
+ if (N() && Z !== null && !a) {
443
+ let e = -parseInt(document.body.style.top, 10), t = -parseInt(document.body.style.left, 10);
444
+ Object.assign(document.body.style, Z), window.requestAnimationFrame(() => {
445
+ if (i && o !== window.location.href) {
446
+ s(window.location.href);
447
+ return;
448
+ }
449
+ window.scrollTo(t, e);
450
+ }), Z = null;
451
+ }
452
+ }, [o]);
453
+ return C.useEffect(() => {
454
+ function e() {
455
+ c.current = window.scrollY;
456
+ }
457
+ return e(), window.addEventListener("scroll", e), () => {
458
+ window.removeEventListener("scroll", e);
459
+ };
460
+ }, []), C.useEffect(() => {
461
+ if (t) return () => {
462
+ typeof document > "u" || document.querySelector("[data-vaul-drawer]") || u();
463
+ };
464
+ }, [t, u]), C.useEffect(() => {
465
+ n || !r || (e ? (!window.matchMedia("(display-mode: standalone)").matches && l(), t || window.setTimeout(() => {
466
+ u();
467
+ }, 500)) : u());
468
+ }, [
469
+ e,
470
+ r,
471
+ o,
472
+ t,
473
+ n,
474
+ l,
475
+ u
476
+ ]), { restorePositionSetting: u };
477
+ }
478
+ function Pe({ open: e, onOpenChange: t, children: n, onDrag: r, onRelease: i, snapPoints: a, shouldScaleBackground: o = !1, setBackgroundColorOnScale: s = !0, closeThreshold: c = Ce, scrollLockTimeout: u = we, dismissible: d = !0, handleOnly: f = !1, fadeFromIndex: p = a && a.length - 1, activeSnapPoint: m, setActiveSnapPoint: h, fixed: g, modal: _ = !0, onClose: v, nested: y, noBodyStyles: b = !1, direction: x = "bottom", defaultOpen: S = !1, disablePreventScroll: ee = !0, snapToSequentialPoint: w = !1, preventScrollRestoration: T = !1, repositionInputs: E = !0, onAnimationEnd: te, container: ne, autoFocus: re = !1 }) {
479
+ let [D = !1, O] = je({
480
+ defaultProp: S,
481
+ prop: e,
482
+ onChange: (e) => {
483
+ t?.(e), !e && !y && Ae(), setTimeout(() => {
484
+ te?.(e);
485
+ }, Y.DURATION * 1e3), e && !_ && typeof window < "u" && window.requestAnimationFrame(() => {
486
+ document.body.style.pointerEvents = "auto";
487
+ }), e || (document.body.style.pointerEvents = "auto");
488
+ }
489
+ }), [k, ie] = C.useState(!1), [A, ae] = C.useState(!1), [j, ce] = C.useState(!1), M = C.useRef(null), N = C.useRef(null), le = C.useRef(null), P = C.useRef(null), F = C.useRef(null), I = C.useRef(!1), L = C.useRef(null), R = C.useRef(0), z = C.useRef(!1), B = C.useRef(!S), de = C.useRef(0), V = C.useRef(null), H = C.useRef(V.current?.getBoundingClientRect().height || 0), pe = C.useRef(V.current?.getBoundingClientRect().width || 0), me = C.useRef(0), { activeSnapPoint: U, activeSnapPointIndex: W, setActiveSnapPoint: ge, onRelease: _e, snapPointsOffset: G, onDrag: ve, shouldFade: J, getPercentageDragged: ke } = Me({
490
+ snapPoints: a,
491
+ activeSnapPointProp: m,
492
+ setActiveSnapPointProp: h,
493
+ drawerRef: V,
494
+ fadeFromIndex: p,
495
+ overlayRef: M,
496
+ onSnapPointChange: C.useCallback((e) => {
497
+ a && e === G.length - 1 && (N.current = /* @__PURE__ */ new Date());
498
+ }, []),
499
+ direction: x,
500
+ container: ne,
501
+ snapToSequentialPoint: w
502
+ });
503
+ fe({ isDisabled: !D || A || !_ || j || !k || !E || !ee });
504
+ let { restorePositionSetting: Ae } = Ne({
505
+ isOpen: D,
506
+ modal: _,
507
+ nested: y ?? !1,
508
+ hasBeenOpened: k,
509
+ preventScrollRestoration: T,
510
+ noBodyStyles: b
511
+ });
512
+ function X() {
513
+ return (window.innerWidth - De) / window.innerWidth;
514
+ }
515
+ function Z(e) {
516
+ !d && !a || V.current && !V.current.contains(e.target) || (H.current = V.current?.getBoundingClientRect().height || 0, pe.current = V.current?.getBoundingClientRect().width || 0, ae(!0), le.current = /* @__PURE__ */ new Date(), ue() && window.addEventListener("touchend", () => I.current = !1, { once: !0 }), e.target.setPointerCapture(e.pointerId), R.current = q(x) ? e.pageY : e.pageX);
517
+ }
518
+ function Pe(e, t) {
519
+ let n = e, r = window.getSelection()?.toString(), i = V.current ? be(V.current, x) : null, a = /* @__PURE__ */ new Date();
520
+ if (n.tagName === "SELECT" || n.hasAttribute("data-vaul-no-drag") || n.closest("[data-vaul-no-drag]")) return !1;
521
+ if (x === "right" || x === "left") return !0;
522
+ if (N.current && a.getTime() - N.current.getTime() < 500) return !1;
523
+ if (i !== null && (x === "bottom" ? i > 0 : i < 0)) return !0;
524
+ if (r && r.length > 0) return !1;
525
+ if (F.current && a.getTime() - F.current.getTime() < u && i === 0 || t) return F.current = a, !1;
526
+ for (; n;) {
527
+ if (n.scrollHeight > n.clientHeight) {
528
+ if (n.scrollTop !== 0) return F.current = /* @__PURE__ */ new Date(), !1;
529
+ if (n.getAttribute("role") === "dialog") return !0;
530
+ }
531
+ n = n.parentNode;
532
+ }
533
+ return !0;
534
+ }
535
+ function Fe(e) {
536
+ if (V.current && A) {
537
+ let t = x === "bottom" || x === "right" ? 1 : -1, n = (R.current - (q(x) ? e.pageY : e.pageX)) * t, i = n > 0, s = a && !d && !i;
538
+ if (s && W === 0) return;
539
+ let c = Math.abs(n), l = document.querySelector("[data-vaul-drawer-wrapper]"), u = c / (x === "bottom" || x === "top" ? H.current : pe.current), f = ke(c, i);
540
+ if (f !== null && (u = f), s && u >= 1 || !I.current && !Pe(e.target, i)) return;
541
+ if (V.current.classList.add(Oe), I.current = !0, K(V.current, { transition: "none" }), K(M.current, { transition: "none" }), a && ve({ draggedDistance: n }), i && !a) {
542
+ let e = xe(n), r = Math.min(e * -1, 0) * t;
543
+ K(V.current, { transform: q(x) ? `translate3d(0, ${r}px, 0)` : `translate3d(${r}px, 0, 0)` });
544
+ return;
545
+ }
546
+ let m = 1 - u;
547
+ if ((J || p && W === p - 1) && (r?.(e, u), K(M.current, {
548
+ opacity: `${m}`,
549
+ transition: "none"
550
+ }, !0)), l && M.current && o) {
551
+ let e = Math.min(X() + u * (1 - X()), 1), t = 8 - u * 8, n = Math.max(0, 14 - u * 14);
552
+ K(l, {
553
+ borderRadius: `${t}px`,
554
+ transform: q(x) ? `scale(${e}) translate3d(0, ${n}px, 0)` : `scale(${e}) translate3d(${n}px, 0, 0)`,
555
+ transition: "none"
556
+ }, !0);
557
+ }
558
+ if (!a) {
559
+ let e = c * t;
560
+ K(V.current, { transform: q(x) ? `translate3d(0, ${e}px, 0)` : `translate3d(${e}px, 0, 0)` });
561
+ }
562
+ }
563
+ }
564
+ C.useEffect(() => {
565
+ window.requestAnimationFrame(() => {
566
+ B.current = !0;
567
+ });
568
+ }, []), C.useEffect(() => {
569
+ var e;
570
+ function t() {
571
+ if (!V.current || !E) return;
572
+ let e = document.activeElement;
573
+ if (he(e) || z.current) {
574
+ let e = window.visualViewport?.height || 0, t = window.innerHeight, n = t - e, r = V.current.getBoundingClientRect().height || 0, i = r > t * .8;
575
+ me.current ||= r;
576
+ let o = V.current.getBoundingClientRect().top;
577
+ if (Math.abs(de.current - n) > 60 && (z.current = !z.current), a && a.length > 0 && G && W) {
578
+ let e = G[W] || 0;
579
+ n += e;
580
+ }
581
+ if (de.current = n, r > e || z.current) {
582
+ let t = V.current.getBoundingClientRect().height, r = t;
583
+ t > e && (r = e - (i ? o : De)), g ? V.current.style.height = `${t - Math.max(n, 0)}px` : V.current.style.height = `${Math.max(r, e - o)}px`;
584
+ } else se() || (V.current.style.height = `${me.current}px`);
585
+ a && a.length > 0 && !z.current ? V.current.style.bottom = "0px" : V.current.style.bottom = `${Math.max(n, 0)}px`;
586
+ }
587
+ }
588
+ return (e = window.visualViewport) == null || e.addEventListener("resize", t), () => window.visualViewport?.removeEventListener("resize", t);
589
+ }, [
590
+ W,
591
+ a,
592
+ G
593
+ ]);
594
+ function Q(e) {
595
+ Le(), v?.(), e || O(!1), setTimeout(() => {
596
+ a && ge(a[0]);
597
+ }, Y.DURATION * 1e3);
598
+ }
599
+ function Ie() {
600
+ if (!V.current) return;
601
+ let e = document.querySelector("[data-vaul-drawer-wrapper]"), t = be(V.current, x);
602
+ K(V.current, {
603
+ transform: "translate3d(0, 0, 0)",
604
+ transition: `transform ${Y.DURATION}s cubic-bezier(${Y.EASE.join(",")})`
605
+ }), K(M.current, {
606
+ transition: `opacity ${Y.DURATION}s cubic-bezier(${Y.EASE.join(",")})`,
607
+ opacity: "1"
608
+ }), o && t && t > 0 && D && K(e, {
609
+ borderRadius: `${Te}px`,
610
+ overflow: "hidden",
611
+ ...q(x) ? {
612
+ transform: `scale(${X()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,
613
+ transformOrigin: "top"
614
+ } : {
615
+ transform: `scale(${X()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,
616
+ transformOrigin: "left"
617
+ },
618
+ transitionProperty: "transform, border-radius",
619
+ transitionDuration: `${Y.DURATION}s`,
620
+ transitionTimingFunction: `cubic-bezier(${Y.EASE.join(",")})`
621
+ }, !0);
622
+ }
623
+ function Le() {
624
+ !A || !V.current || (V.current.classList.remove(Oe), I.current = !1, ae(!1), P.current = /* @__PURE__ */ new Date());
625
+ }
626
+ function Re(e) {
627
+ if (!A || !V.current) return;
628
+ V.current.classList.remove(Oe), I.current = !1, ae(!1), P.current = /* @__PURE__ */ new Date();
629
+ let t = be(V.current, x);
630
+ if (!e || !Pe(e.target, !1) || !t || Number.isNaN(t) || le.current === null) return;
631
+ let n = P.current.getTime() - le.current.getTime(), r = R.current - (q(x) ? e.pageY : e.pageX), o = Math.abs(r) / n;
632
+ if (o > .05 && (ce(!0), setTimeout(() => {
633
+ ce(!1);
634
+ }, 200)), a) {
635
+ _e({
636
+ draggedDistance: r * (x === "bottom" || x === "right" ? 1 : -1),
637
+ closeDrawer: Q,
638
+ velocity: o,
639
+ dismissible: d
640
+ }), i?.(e, !0);
641
+ return;
642
+ }
643
+ if (x === "bottom" || x === "right" ? r > 0 : r < 0) {
644
+ Ie(), i?.(e, !0);
645
+ return;
646
+ }
647
+ if (o > Se) {
648
+ Q(), i?.(e, !1);
649
+ return;
650
+ }
651
+ let s = Math.min(V.current.getBoundingClientRect().height ?? 0, window.innerHeight), l = Math.min(V.current.getBoundingClientRect().width ?? 0, window.innerWidth);
652
+ if (Math.abs(t) >= (x === "left" || x === "right" ? l : s) * c) {
653
+ Q(), i?.(e, !1);
654
+ return;
655
+ }
656
+ i?.(e, !0), Ie();
657
+ }
658
+ C.useEffect(() => (D && (K(document.documentElement, { scrollBehavior: "auto" }), N.current = /* @__PURE__ */ new Date()), () => {
659
+ ye(document.documentElement, "scrollBehavior");
660
+ }), [D]);
661
+ function ze(e) {
662
+ let t = e ? (window.innerWidth - Ee) / window.innerWidth : 1, n = e ? -16 : 0;
663
+ L.current && window.clearTimeout(L.current), K(V.current, {
664
+ transition: `transform ${Y.DURATION}s cubic-bezier(${Y.EASE.join(",")})`,
665
+ transform: q(x) ? `scale(${t}) translate3d(0, ${n}px, 0)` : `scale(${t}) translate3d(${n}px, 0, 0)`
666
+ }), !e && V.current && (L.current = setTimeout(() => {
667
+ let e = be(V.current, x);
668
+ K(V.current, {
669
+ transition: "none",
670
+ transform: q(x) ? `translate3d(0, ${e}px, 0)` : `translate3d(${e}px, 0, 0)`
671
+ });
672
+ }, 500));
673
+ }
674
+ function Be(e, t) {
675
+ if (t < 0) return;
676
+ let n = (window.innerWidth - Ee) / window.innerWidth, r = n + t * (1 - n), i = -16 + t * Ee;
677
+ K(V.current, {
678
+ transform: q(x) ? `scale(${r}) translate3d(0, ${i}px, 0)` : `scale(${r}) translate3d(${i}px, 0, 0)`,
679
+ transition: "none"
680
+ });
681
+ }
682
+ function $(e, t) {
683
+ let n = q(x) ? window.innerHeight : window.innerWidth, r = t ? (n - Ee) / n : 1, i = t ? -16 : 0;
684
+ t && K(V.current, {
685
+ transition: `transform ${Y.DURATION}s cubic-bezier(${Y.EASE.join(",")})`,
686
+ transform: q(x) ? `scale(${r}) translate3d(0, ${i}px, 0)` : `scale(${r}) translate3d(${i}px, 0, 0)`
687
+ });
688
+ }
689
+ return C.useEffect(() => {
690
+ _ || window.requestAnimationFrame(() => {
691
+ document.body.style.pointerEvents = "auto";
692
+ });
693
+ }, [_]), /*#__PURE__*/ C.createElement(l, {
694
+ defaultOpen: S,
695
+ onOpenChange: (e) => {
696
+ !d && !e || (e ? ie(!0) : Q(!0), O(e));
697
+ },
698
+ open: D
699
+ }, /*#__PURE__*/ C.createElement(oe.Provider, { value: {
700
+ activeSnapPoint: U,
701
+ snapPoints: a,
702
+ setActiveSnapPoint: ge,
703
+ drawerRef: V,
704
+ overlayRef: M,
705
+ onOpenChange: t,
706
+ onPress: Z,
707
+ onRelease: Re,
708
+ onDrag: Fe,
709
+ dismissible: d,
710
+ shouldAnimate: B,
711
+ handleOnly: f,
712
+ isOpen: D,
713
+ isDragging: A,
714
+ shouldFade: J,
715
+ closeDrawer: Q,
716
+ onNestedDrag: Be,
717
+ onNestedOpenChange: ze,
718
+ onNestedRelease: $,
719
+ keyboardIsOpen: z,
720
+ modal: _,
721
+ snapPointsOffset: G,
722
+ activeSnapPointIndex: W,
723
+ direction: x,
724
+ shouldScaleBackground: o,
725
+ setBackgroundColorOnScale: s,
726
+ noBodyStyles: b,
727
+ container: ne,
728
+ autoFocus: re
729
+ } }, n));
730
+ }
731
+ var Fe = /*#__PURE__*/ C.forwardRef(function({ ...e }, t) {
732
+ let { overlayRef: n, snapPoints: r, onRelease: i, shouldFade: a, isOpen: o, modal: s, shouldAnimate: c } = j(), l = G(t, n), d = r && r.length > 0;
733
+ if (!s) return null;
734
+ let f = C.useCallback((e) => i(e), [i]);
735
+ return /*#__PURE__*/ C.createElement(u, {
736
+ onMouseUp: f,
737
+ ref: l,
738
+ "data-vaul-overlay": "",
739
+ "data-vaul-snap-points": o && d ? "true" : "false",
740
+ "data-vaul-snap-points-overlay": o && a ? "true" : "false",
741
+ "data-vaul-animate": c?.current ? "true" : "false",
742
+ ...e
743
+ });
744
+ });
745
+ Fe.displayName = "Drawer.Overlay";
746
+ var Q = /*#__PURE__*/ C.forwardRef(function({ onPointerDownOutside: e, style: t, onOpenAutoFocus: n, ...i }, a) {
747
+ let { drawerRef: o, onPress: s, onRelease: c, onDrag: l, keyboardIsOpen: u, snapPointsOffset: d, activeSnapPointIndex: f, modal: p, isOpen: m, direction: h, snapPoints: g, container: _, handleOnly: v, shouldAnimate: y, autoFocus: b } = j(), [x, S] = C.useState(!1), ee = G(a, o), w = C.useRef(null), T = C.useRef(null), E = C.useRef(!1), te = g && g.length > 0;
748
+ X();
749
+ let ne = (e, t, n = 0) => {
750
+ if (E.current) return !0;
751
+ let r = Math.abs(e.y), i = Math.abs(e.x), a = i > r, o = ["bottom", "right"].includes(t) ? 1 : -1;
752
+ if (t === "left" || t === "right") {
753
+ if (!(e.x * o < 0) && i >= 0 && i <= n) return a;
754
+ } else if (!(e.y * o < 0) && r >= 0 && r <= n) return !a;
755
+ return E.current = !0, !0;
756
+ };
757
+ C.useEffect(() => {
758
+ te && window.requestAnimationFrame(() => {
759
+ S(!0);
760
+ });
761
+ }, []);
762
+ function re(e) {
763
+ w.current = null, E.current = !1, c(e);
764
+ }
765
+ return /*#__PURE__*/ C.createElement(r, {
766
+ "data-vaul-drawer-direction": h,
767
+ "data-vaul-drawer": "",
768
+ "data-vaul-delayed-snap-points": x ? "true" : "false",
769
+ "data-vaul-snap-points": m && te ? "true" : "false",
770
+ "data-vaul-custom-container": _ ? "true" : "false",
771
+ "data-vaul-animate": y?.current ? "true" : "false",
772
+ ...i,
773
+ ref: ee,
774
+ style: d && d.length > 0 ? {
775
+ "--snap-point-height": `${d[f ?? 0]}px`,
776
+ ...t
777
+ } : t,
778
+ onPointerDown: (e) => {
779
+ v || (i.onPointerDown == null || i.onPointerDown.call(i, e), w.current = {
780
+ x: e.pageX,
781
+ y: e.pageY
782
+ }, s(e));
783
+ },
784
+ onOpenAutoFocus: (e) => {
785
+ n?.(e), b || e.preventDefault();
786
+ },
787
+ onPointerDownOutside: (t) => {
788
+ if (e?.(t), !p || t.defaultPrevented) {
789
+ t.preventDefault();
790
+ return;
791
+ }
792
+ u.current &&= !1;
793
+ },
794
+ onFocusOutside: (e) => {
795
+ if (!p) {
796
+ e.preventDefault();
797
+ return;
798
+ }
799
+ },
800
+ onPointerMove: (e) => {
801
+ if (T.current = e, v || (i.onPointerMove == null || i.onPointerMove.call(i, e), !w.current)) return;
802
+ let t = e.pageY - w.current.y, n = e.pageX - w.current.x, r = e.pointerType === "touch" ? 10 : 2;
803
+ ne({
804
+ x: n,
805
+ y: t
806
+ }, h, r) ? l(e) : (Math.abs(n) > r || Math.abs(t) > r) && (w.current = null);
807
+ },
808
+ onPointerUp: (e) => {
809
+ i.onPointerUp == null || i.onPointerUp.call(i, e), w.current = null, E.current = !1, c(e);
810
+ },
811
+ onPointerOut: (e) => {
812
+ i.onPointerOut == null || i.onPointerOut.call(i, e), re(T.current);
813
+ },
814
+ onContextMenu: (e) => {
815
+ i.onContextMenu == null || i.onContextMenu.call(i, e), T.current && re(T.current);
816
+ }
817
+ });
818
+ });
819
+ Q.displayName = "Drawer.Content";
820
+ var Ie = 250, Le = 120, Re = /*#__PURE__*/ C.forwardRef(function({ preventCycle: e = !1, children: t, ...n }, r) {
821
+ let { closeDrawer: i, isDragging: a, snapPoints: o, activeSnapPoint: s, setActiveSnapPoint: c, dismissible: l, handleOnly: u, isOpen: d, onPress: f, onDrag: p } = j(), m = C.useRef(null), h = C.useRef(!1);
822
+ function g() {
823
+ if (h.current) {
824
+ y();
825
+ return;
826
+ }
827
+ window.setTimeout(() => {
828
+ _();
829
+ }, Le);
830
+ }
831
+ function _() {
832
+ if (a || e || h.current) {
833
+ y();
834
+ return;
835
+ }
836
+ if (y(), !o || o.length === 0) {
837
+ l || i();
838
+ return;
839
+ }
840
+ if (s === o[o.length - 1] && l) {
841
+ i();
842
+ return;
843
+ }
844
+ let t = o.findIndex((e) => e === s);
845
+ if (t === -1) return;
846
+ let n = o[t + 1];
847
+ c(n);
848
+ }
849
+ function v() {
850
+ m.current = window.setTimeout(() => {
851
+ h.current = !0;
852
+ }, Ie);
853
+ }
854
+ function y() {
855
+ m.current && window.clearTimeout(m.current), h.current = !1;
856
+ }
857
+ return /*#__PURE__*/ C.createElement("div", {
858
+ onClick: g,
859
+ onPointerCancel: y,
860
+ onPointerDown: (e) => {
861
+ u && f(e), v();
862
+ },
863
+ onPointerMove: (e) => {
864
+ u && p(e);
865
+ },
866
+ ref: r,
867
+ "data-vaul-drawer-visible": d ? "true" : "false",
868
+ "data-vaul-handle": "",
869
+ "aria-hidden": "true",
870
+ ...n
871
+ }, /*#__PURE__*/ C.createElement("span", {
872
+ "data-vaul-handle-hitarea": "",
873
+ "aria-hidden": "true"
874
+ }, t));
875
+ });
876
+ Re.displayName = "Drawer.Handle";
877
+ function ze({ onDrag: e, onOpenChange: t, open: n, ...r }) {
878
+ let { onNestedDrag: i, onNestedOpenChange: a, onNestedRelease: o } = j();
879
+ if (!i) throw Error("Drawer.NestedRoot must be placed in another drawer");
880
+ return /*#__PURE__*/ C.createElement(Pe, {
881
+ nested: !0,
882
+ open: n,
883
+ onClose: () => {
884
+ a(!1);
885
+ },
886
+ onDrag: (t, n) => {
887
+ i(t, n), e?.(t, n);
888
+ },
889
+ onOpenChange: (e) => {
890
+ e && a(e), t?.(e);
891
+ },
892
+ onRelease: o,
893
+ ...r
894
+ });
895
+ }
896
+ function Be(e) {
897
+ let t = j(), { container: n = t.container, ...r } = e;
898
+ return /*#__PURE__*/ C.createElement(i, {
899
+ container: n,
900
+ ...r
901
+ });
902
+ }
903
+ var $ = {
904
+ Root: Pe,
905
+ NestedRoot: ze,
906
+ Content: Q,
907
+ Overlay: Fe,
908
+ Trigger: f,
909
+ Portal: Be,
910
+ Handle: Re,
911
+ Close: a,
912
+ Title: o,
913
+ Description: c
914
+ };
915
+ //#endregion
916
+ //#region lib/components/ui/overlays/drawer/drawer-parts.tsx
917
+ function Ve({ className: t, ...n }) {
918
+ return /* @__PURE__ */ O("div", {
919
+ "data-slot": "drawer-header",
920
+ className: e("flex flex-col gap-0.5 p-4 group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center group-data-[vaul-drawer-direction=top]/drawer-content:text-center md:gap-1.5 md:text-left", t),
921
+ ...n
922
+ });
923
+ }
924
+ function He({ className: t, ...n }) {
925
+ return /* @__PURE__ */ O("div", {
926
+ "data-slot": "drawer-footer",
927
+ className: e("mt-auto flex flex-col gap-2 p-4 *:w-full", t),
928
+ ...n
929
+ });
930
+ }
931
+ function Ue({ className: t, ...n }) {
932
+ return /* @__PURE__ */ O($.Title, {
933
+ "data-slot": "drawer-title",
934
+ className: e("text-foreground text-xl/7 font-medium tracking-tight", t),
935
+ ...n
936
+ });
937
+ }
938
+ function We({ className: t, ...n }) {
939
+ return /* @__PURE__ */ O($.Description, {
940
+ "data-slot": "drawer-description",
941
+ className: e("text-muted-foreground text-sm", t),
942
+ ...n
943
+ });
944
+ }
945
+ //#endregion
946
+ //#region lib/components/ui/overlays/drawer/drawer.tsx
947
+ function Ge({ autoFocus: e = !0, ...n }) {
948
+ return /* @__PURE__ */ O(t, {
949
+ value: n.modal ?? !0,
950
+ children: /* @__PURE__ */ O($.Root, {
951
+ "data-slot": "drawer",
952
+ autoFocus: e,
953
+ ...n
954
+ })
955
+ });
956
+ }
957
+ function Ke({ ...e }) {
958
+ return /* @__PURE__ */ O($.Trigger, {
959
+ "data-slot": "drawer-trigger",
960
+ ...e
961
+ });
962
+ }
963
+ function qe({ ...e }) {
964
+ return /* @__PURE__ */ O($.Portal, {
965
+ "data-slot": "drawer-portal",
966
+ ...e
967
+ });
968
+ }
969
+ function Je({ className: t, color: n, children: r, type: i = "button", variant: a = "ghost", ...o }) {
970
+ let { t: s } = _();
971
+ return /* @__PURE__ */ O($.Close, {
972
+ "aria-label": r ? void 0 : s("material.buttons.close", "Close"),
973
+ ...o,
974
+ type: i,
975
+ className: e("absolute top-3 right-3", v({
976
+ variant: a,
977
+ color: n,
978
+ className: t
979
+ })),
980
+ "data-slot": "dialog-close",
981
+ children: r || /* @__PURE__ */ O(ae, { className: "size-4" })
982
+ });
983
+ }
984
+ function Ye({ className: t, scrim: n = "dim", ...r }) {
985
+ return /* @__PURE__ */ O($.Overlay, {
986
+ "data-slot": "drawer-overlay",
987
+ "data-scrim": n,
988
+ className: e("nxgt-scrim fixed inset-0 z-50", t),
989
+ ...r
990
+ });
991
+ }
992
+ function Xe({ className: t, children: r, onOpenAutoFocus: i, onCloseAutoFocus: a, onEscapeKeyDown: o, scrim: c, ref: l, ...u }) {
993
+ let f = d({
994
+ onOpenAutoFocus: i,
995
+ onCloseAutoFocus: a
996
+ }), p = s({
997
+ ref: l,
998
+ onEscapeKeyDown: o,
999
+ ...u
1000
+ });
1001
+ return /* @__PURE__ */ O(x, { children: /* @__PURE__ */ O(n, {
1002
+ value: !1,
1003
+ children: /* @__PURE__ */ k(qe, {
1004
+ "data-slot": "drawer-portal",
1005
+ children: [/* @__PURE__ */ O(Ye, { scrim: c }), /* @__PURE__ */ k($.Content, {
1006
+ ref: p.ref,
1007
+ "data-slot": "drawer-content",
1008
+ className: e("group/drawer-content nxgt-drawer fixed z-50 flex h-auto flex-col", "data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh]", "data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:pb-[env(safe-area-inset-bottom)] data-[vaul-drawer-direction=bottom]:sm:mx-auto data-[vaul-drawer-direction=bottom]:sm:max-w-2xl", "data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-[calc(100%-3.5rem)] data-[vaul-drawer-direction=right]:sm:max-w-sm", "data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-[calc(100%-3.5rem)] data-[vaul-drawer-direction=left]:sm:max-w-sm", t),
1009
+ onOpenAutoFocus: f.onOpenAutoFocus,
1010
+ onCloseAutoFocus: f.onCloseAutoFocus,
1011
+ onEscapeKeyDown: p.onEscapeKeyDown,
1012
+ ...u,
1013
+ ...p.outside,
1014
+ children: [/* @__PURE__ */ O("div", {
1015
+ "data-slot": "drawer-handle",
1016
+ className: "nxgt-drawer-handle hidden group-data-[vaul-drawer-direction=bottom]/drawer-content:block"
1017
+ }), r]
1018
+ })]
1019
+ })
1020
+ }) });
1021
+ }
1022
+ //#endregion
1023
+ //#region lib/components/ui/dates/picker-popover/label-clearance.ts
1024
+ var Ze = 26, Qe = "data-[side=top]:mb-[1.625rem]", $e = 8;
1025
+ function et(e, t) {
1026
+ let n = typeof document < "u" && document.getElementById(e)?.tagName === "LABEL", r = typeof t == "number" ? {
1027
+ top: t,
1028
+ right: t,
1029
+ bottom: t,
1030
+ left: t
1031
+ } : t ?? {}, i = {
1032
+ top: r.top ?? $e,
1033
+ right: r.right ?? $e,
1034
+ bottom: r.bottom ?? $e,
1035
+ left: r.left ?? $e
1036
+ };
1037
+ if (!n) return {
1038
+ collisionPadding: i,
1039
+ className: void 0
1040
+ };
1041
+ let a = i.top;
1042
+ return {
1043
+ collisionPadding: {
1044
+ ...i,
1045
+ top: a + Ze
1046
+ },
1047
+ className: Qe
1048
+ };
1049
+ }
1050
+ //#endregion
1051
+ //#region lib/components/ui/dates/picker-popover/input-mode-switch.tsx
1052
+ function tt({ typing: e, onTypingChange: t, label: n }) {
1053
+ return /* @__PURE__ */ O(y, {
1054
+ variant: "ghost",
1055
+ "aria-label": n,
1056
+ "aria-pressed": e,
1057
+ morph: "round",
1058
+ "data-slot": "picker-input-mode",
1059
+ onClick: () => t(!e),
1060
+ children: O(e ? ie : A, {})
1061
+ });
1062
+ }
1063
+ //#endregion
1064
+ //#region lib/components/ui/dates/picker-popover/roving-day.ts
1065
+ var nt = "[data-slot=\"calendar\"] [role=\"gridcell\"] button[tabindex=\"0\"]";
1066
+ function rt(e) {
1067
+ let t = e?.querySelector(nt);
1068
+ return t?.focus(), !!t;
1069
+ }
1070
+ function it(e) {
1071
+ let t = e.parentElement;
1072
+ for (; t && !t.querySelector("[data-slot=\"calendar\"]");) t = t.parentElement;
1073
+ requestAnimationFrame(() => rt(t));
1074
+ }
1075
+ //#endregion
1076
+ //#region lib/components/ui/dates/picker-popover/sheet-hero.tsx
1077
+ function at({ title: e, entry: t, typing: n, onTypingChange: r }) {
1078
+ return /* @__PURE__ */ k("div", {
1079
+ "data-slot": "picker-sheet-hero",
1080
+ className: "nxgt-picker-hero",
1081
+ children: [/* @__PURE__ */ k("div", {
1082
+ className: "flex min-h-11 items-center gap-2",
1083
+ children: [e ? /* @__PURE__ */ O(Ue, {
1084
+ className: "min-w-0 flex-1 truncate text-start text-sm/5 font-medium text-(color:--hero-label)",
1085
+ children: e
1086
+ }) : /* @__PURE__ */ O("span", { className: "flex-1" }), /* @__PURE__ */ O(tt, {
1087
+ typing: n,
1088
+ onTypingChange: r,
1089
+ label: t.label
1090
+ })]
1091
+ }), n ? t.render() : /* @__PURE__ */ O("p", {
1092
+ "data-slot": "picker-sheet-hero-text",
1093
+ className: "nxgt-picker-hero-text",
1094
+ children: t.hero
1095
+ })]
1096
+ });
1097
+ }
1098
+ //#endregion
1099
+ //#region lib/components/ui/dates/picker-popover/picker-sheet-content.tsx
1100
+ function ot(e) {
1101
+ e.target instanceof HTMLElement && e.target.querySelector("[data-slot=\"calendar\"] [role=\"gridcell\"] button[tabindex=\"0\"]") && (e.preventDefault(), rt(e.target));
1102
+ }
1103
+ function st({ labelledBy: t, title: n, entry: r, className: i, children: a, ...o }) {
1104
+ return /* @__PURE__ */ O(Xe, {
1105
+ ...n ? {} : { "aria-labelledby": t },
1106
+ "aria-describedby": void 0,
1107
+ "data-surface": "sheet",
1108
+ onOpenAutoFocus: ot,
1109
+ ...o,
1110
+ className: e("px-4 data-[vaul-drawer-direction=bottom]:pb-[max(1rem,env(safe-area-inset-bottom))]", "**:data-[slot=calendar]:bg-transparent **:data-[slot=time-picker]:bg-transparent **:data-[slot=time-picker]:shadow-none", i),
1111
+ children: /* @__PURE__ */ O(ct, {
1112
+ title: n,
1113
+ entry: r,
1114
+ children: a
1115
+ })
1116
+ });
1117
+ }
1118
+ function ct({ title: e, entry: t, children: n }) {
1119
+ let [r, i] = re(!1);
1120
+ return t?.hero === void 0 ? /* @__PURE__ */ k(D, { children: [/* @__PURE__ */ k("div", {
1121
+ className: "flex min-h-12 items-center gap-2 pt-1 pb-2",
1122
+ children: [e ? /* @__PURE__ */ O(Ue, {
1123
+ className: "min-w-0 flex-1 truncate text-start text-lg/7",
1124
+ children: e
1125
+ }) : /* @__PURE__ */ O("span", { className: "flex-1" }), t && /* @__PURE__ */ O(tt, {
1126
+ typing: r,
1127
+ onTypingChange: i,
1128
+ label: t.label
1129
+ })]
1130
+ }), /* @__PURE__ */ O("div", {
1131
+ className: "flex min-h-0 flex-col items-center overflow-y-auto",
1132
+ children: t && r ? t.render() : n
1133
+ })] }) : /* @__PURE__ */ k(D, { children: [/* @__PURE__ */ O(at, {
1134
+ title: e,
1135
+ entry: t,
1136
+ typing: r,
1137
+ onTypingChange: i
1138
+ }), /* @__PURE__ */ O("div", {
1139
+ className: "flex min-h-0 min-w-full flex-col items-center overflow-y-auto",
1140
+ children: !r && n
1141
+ })] });
1142
+ }
1143
+ //#endregion
1144
+ //#region lib/components/ui/dates/picker-popover/picker-surface.tsx
1145
+ var lt = ee({
1146
+ kind: "popover",
1147
+ open: !1
1148
+ }), ut = () => w(lt).kind;
1149
+ function dt(e = "auto") {
1150
+ let t = b("(min-width: 768px)", !0);
1151
+ return e === "auto" ? t ? "popover" : "sheet" : e;
1152
+ }
1153
+ var ft = () => {};
1154
+ function pt({ kind: e, open: n, onOpenChange: r, children: i }) {
1155
+ let a = e === "sheet";
1156
+ return /* @__PURE__ */ O(lt, {
1157
+ value: {
1158
+ kind: e,
1159
+ open: n,
1160
+ contentId: E()
1161
+ },
1162
+ children: /* @__PURE__ */ O(g, {
1163
+ open: n && !a,
1164
+ onOpenChange: a ? ft : r,
1165
+ children: /* @__PURE__ */ O(Ge, {
1166
+ open: n && a,
1167
+ onOpenChange: a ? r : ft,
1168
+ children: /* @__PURE__ */ O(t, {
1169
+ value: a,
1170
+ children: i
1171
+ })
1172
+ })
1173
+ })
1174
+ });
1175
+ }
1176
+ function mt(e) {
1177
+ let { kind: t, open: n, contentId: r } = w(lt);
1178
+ return /* @__PURE__ */ O(p, {
1179
+ asChild: !0,
1180
+ children: /* @__PURE__ */ O(Ke, {
1181
+ "data-slot": t === "sheet" ? "drawer-trigger" : "popover-trigger",
1182
+ "aria-haspopup": "dialog",
1183
+ "aria-expanded": n,
1184
+ "aria-controls": n ? r : void 0,
1185
+ "data-state": n ? "open" : "closed",
1186
+ ...e
1187
+ })
1188
+ });
1189
+ }
1190
+ function ht({ children: e }) {
1191
+ return /* @__PURE__ */ O(m, {
1192
+ asChild: !0,
1193
+ children: e
1194
+ });
1195
+ }
1196
+ function gt({ labelledBy: t, className: n, sheetClassName: r, sheetTitle: i, sheetEntry: a, placement: o, children: s, ...c }) {
1197
+ let { kind: l, contentId: u } = w(lt);
1198
+ if (l === "sheet") return /* @__PURE__ */ O(st, {
1199
+ id: u,
1200
+ labelledBy: t,
1201
+ title: i,
1202
+ entry: a,
1203
+ className: r,
1204
+ ...c,
1205
+ children: s
1206
+ });
1207
+ let d = et(t, o?.collisionPadding);
1208
+ return /* @__PURE__ */ O(h, {
1209
+ id: u,
1210
+ "aria-labelledby": t,
1211
+ "data-surface": "popover",
1212
+ ...o,
1213
+ collisionPadding: d.collisionPadding,
1214
+ ...c,
1215
+ className: e(d.className, n),
1216
+ children: s
1217
+ });
1218
+ }
1219
+ //#endregion
1220
+ export { Ue as _, dt as a, Ge as c, Ye as d, qe as f, Ve as g, He as h, mt as i, Je as l, We as m, ht as n, ut as o, Ke as p, gt as r, it as s, pt as t, Xe as u };