@manafishrov/ui 1.4.6 → 1.5.1

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 (241) hide show
  1. package/dist/Locale.js +1 -1
  2. package/dist/_virtual/~icons/material-symbols/calendar-month.js.map +1 -1
  3. package/dist/_virtual/~icons/material-symbols/check-circle.js.map +1 -1
  4. package/dist/_virtual/~icons/material-symbols/check.js.map +1 -1
  5. package/dist/_virtual/~icons/material-symbols/chevron-left.js.map +1 -1
  6. package/dist/_virtual/~icons/material-symbols/chevron-right.js.map +1 -1
  7. package/dist/_virtual/~icons/material-symbols/close.js.map +1 -1
  8. package/dist/_virtual/~icons/material-symbols/error.js.map +1 -1
  9. package/dist/_virtual/~icons/material-symbols/expand-less.js.map +1 -1
  10. package/dist/_virtual/~icons/material-symbols/expand-more.js.map +1 -1
  11. package/dist/_virtual/~icons/material-symbols/info.js.map +1 -1
  12. package/dist/_virtual/~icons/material-symbols/more-horiz.js.map +1 -1
  13. package/dist/_virtual/~icons/material-symbols/progress-activity.js.map +1 -1
  14. package/dist/_virtual/~icons/material-symbols/search.js.map +1 -1
  15. package/dist/_virtual/~icons/material-symbols/side-navigation.js.map +1 -1
  16. package/dist/_virtual/~icons/material-symbols/visibility-off.js.map +1 -1
  17. package/dist/_virtual/~icons/material-symbols/visibility.js.map +1 -1
  18. package/dist/_virtual/~icons/material-symbols/warning.js.map +1 -1
  19. package/dist/components/Accordion.js +2 -2
  20. package/dist/components/AlertDialog.js +2 -2
  21. package/dist/components/AspectRatio.js +1 -1
  22. package/dist/components/Avatar.js +2 -2
  23. package/dist/components/Badge.js +1 -1
  24. package/dist/components/Breadcrumb.js +1 -1
  25. package/dist/components/Button.js +1 -1
  26. package/dist/components/Card.js +1 -1
  27. package/dist/components/Carousel.js +2 -2
  28. package/dist/components/Checkbox.js +2 -2
  29. package/dist/components/Collapsible.js +2 -2
  30. package/dist/components/Combobox.js +2 -2
  31. package/dist/components/DatePicker.js +2 -2
  32. package/dist/components/Dialog.js +2 -2
  33. package/dist/components/Empty.js +1 -1
  34. package/dist/components/Field.js +3 -3
  35. package/dist/components/HoverCard.js +2 -2
  36. package/dist/components/InputGroup.js +1 -1
  37. package/dist/components/Item.js +1 -1
  38. package/dist/components/Kbd.js +1 -1
  39. package/dist/components/Link.js +1 -1
  40. package/dist/components/Menu.js +2 -2
  41. package/dist/components/MenuCombobox.js +2 -2
  42. package/dist/components/MenuComboboxList.js +1 -1
  43. package/dist/components/NavigationMenu.js +2 -2
  44. package/dist/components/NumberInput.js +2 -2
  45. package/dist/components/Pagination.js +2 -2
  46. package/dist/components/PasswordInput.js +2 -2
  47. package/dist/components/PinInput.js +2 -2
  48. package/dist/components/Popover.js +2 -2
  49. package/dist/components/Progress.js +2 -2
  50. package/dist/components/RadioGroup.js +2 -2
  51. package/dist/components/ScrollArea.js +2 -2
  52. package/dist/components/Select.js +2 -2
  53. package/dist/components/Separator.js +1 -1
  54. package/dist/components/Sheet.js +2 -2
  55. package/dist/components/Skeleton.js +1 -1
  56. package/dist/components/Slider.js +3 -3
  57. package/dist/components/Spinner.js +1 -1
  58. package/dist/components/Splitter.js +2 -2
  59. package/dist/components/Swap.js +2 -2
  60. package/dist/components/Switch.js +2 -2
  61. package/dist/components/Table.js +1 -1
  62. package/dist/components/Tabs.js +2 -2
  63. package/dist/components/TagsInput.js +2 -2
  64. package/dist/components/TextInput.js +2 -2
  65. package/dist/components/Toggle.js +3 -3
  66. package/dist/components/Tooltip.js +2 -2
  67. package/dist/components/TreeView.js +3 -3
  68. package/dist/components/Typography.js +1 -1
  69. package/dist/components/form/Form.js +1 -1
  70. package/dist/components/marquee/Marquee.js +2 -2
  71. package/dist/components/sidebar/SidebarDesktop.js +1 -1
  72. package/dist/components/sidebar/SidebarMenu.js +2 -2
  73. package/dist/components/sidebar/SidebarProvider.js +1 -1
  74. package/dist/components/sidebar/SidebarSubComponents.js +5 -5
  75. package/dist/components/sidebar/SidebarSubComponents.js.map +1 -1
  76. package/dist/components/toaster/Toaster.js +2 -2
  77. package/dist/index.js +11 -11
  78. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/24WXBTEA.js +1 -1
  79. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/24WXBTEA.js.map +1 -1
  80. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/262SJY3P.js +1 -1
  81. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/262SJY3P.js.map +1 -1
  82. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/2JT4XMQZ.js +4 -4
  83. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/2JT4XMQZ.js.map +1 -1
  84. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/3JJJT3ZB.js +4 -4
  85. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/3JJJT3ZB.js.map +1 -1
  86. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/4CRPJKY4.js +4 -4
  87. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/4CRPJKY4.js.map +1 -1
  88. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/4OJLSY6B.js +5 -5
  89. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/4OJLSY6B.js.map +1 -1
  90. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/4V5X4XYS.js +4 -4
  91. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/4V5X4XYS.js.map +1 -1
  92. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/4YNGVMW2.js.map +1 -1
  93. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/5BSMJBO7.js +2 -2
  94. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/5BSMJBO7.js.map +1 -1
  95. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/5UOOPLZE.js +4 -4
  96. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/5UOOPLZE.js.map +1 -1
  97. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/64BWQJ5X.js +4 -4
  98. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/64BWQJ5X.js.map +1 -1
  99. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/65QK7XXR.js +1 -1
  100. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/65QK7XXR.js.map +1 -1
  101. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/6P2AQNUE.js.map +1 -1
  102. package/dist/node_modules/.bun/@ark-ui_solid@5.34.1_ac9bd97bed21f560/node_modules/@ark-ui/solid/dist/chunk/6WEDGJKQ.js +7 -0
  103. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/6WEDGJKQ.js.map +1 -1
  104. package/dist/node_modules/.bun/@ark-ui_solid@5.34.1_ac9bd97bed21f560/node_modules/@ark-ui/solid/dist/chunk/7IUG3E2V.js +11 -0
  105. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/7IUG3E2V.js.map +1 -1
  106. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/AIK4SKXT.js +2 -2
  107. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/AIK4SKXT.js.map +1 -1
  108. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/BB22DOQW.js +4 -4
  109. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/BB22DOQW.js.map +1 -1
  110. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/BKN7PQAU.js +4 -4
  111. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/BKN7PQAU.js.map +1 -1
  112. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/BNSRP6TN.js +4 -4
  113. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/BNSRP6TN.js.map +1 -1
  114. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/BRHQTJMC.js +1 -1
  115. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/BRHQTJMC.js.map +1 -1
  116. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/BWUVF6ZV.js +4 -4
  117. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/BWUVF6ZV.js.map +1 -1
  118. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/BYLUEJKC.js +1 -1
  119. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/BYLUEJKC.js.map +1 -1
  120. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/EFII6TXL.js +2 -2
  121. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/EFII6TXL.js.map +1 -1
  122. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/EQKTJ63X.js +1 -1
  123. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/EQKTJ63X.js.map +1 -1
  124. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/GOIBDXMD.js +4 -4
  125. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/GOIBDXMD.js.map +1 -1
  126. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/GVJQBGKQ.js +4 -4
  127. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/GVJQBGKQ.js.map +1 -1
  128. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/H72X6NDR.js +4 -4
  129. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/H72X6NDR.js.map +1 -1
  130. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/HDGILMRT.js +1 -1
  131. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/HDGILMRT.js.map +1 -1
  132. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/HOPBYFHD.js +1 -1
  133. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/HOPBYFHD.js.map +1 -1
  134. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/JBLKWLWL.js +4 -4
  135. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/JBLKWLWL.js.map +1 -1
  136. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/JCNWK3IN.js +1 -1
  137. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/JCNWK3IN.js.map +1 -1
  138. package/dist/node_modules/.bun/@ark-ui_solid@5.34.1_ac9bd97bed21f560/node_modules/@ark-ui/solid/dist/chunk/KGOB2IMX.js +6 -0
  139. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/KGOB2IMX.js.map +1 -1
  140. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/LXG74MYL.js +1 -1
  141. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/LXG74MYL.js.map +1 -1
  142. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/MB6S2OKT.js +4 -4
  143. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/MB6S2OKT.js.map +1 -1
  144. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/MQWCA23U.js +4 -4
  145. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/MQWCA23U.js.map +1 -1
  146. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/NEU4F4NG.js +2 -2
  147. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/NEU4F4NG.js.map +1 -1
  148. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/NH3KCKN2.js +4 -4
  149. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/NH3KCKN2.js.map +1 -1
  150. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/O6MULJWC.js +4 -4
  151. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/O6MULJWC.js.map +1 -1
  152. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/OEGORBLT.js +3 -3
  153. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/OEGORBLT.js.map +1 -1
  154. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/OWH3LOUE.js +1 -1
  155. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/OWH3LOUE.js.map +1 -1
  156. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/PPH4D7AF.js +2 -2
  157. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/PPH4D7AF.js.map +1 -1
  158. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/PT2CJE3O.js +1 -1
  159. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/PT2CJE3O.js.map +1 -1
  160. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/QM5PBW35.js +4 -4
  161. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/QM5PBW35.js.map +1 -1
  162. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/QY2YSMFW.js +4 -4
  163. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/QY2YSMFW.js.map +1 -1
  164. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/RJHFA54S.js +4 -4
  165. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/RJHFA54S.js.map +1 -1
  166. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/RROG5OYX.js +4 -4
  167. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/RROG5OYX.js.map +1 -1
  168. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/SPOOGCGR.js +4 -4
  169. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/SPOOGCGR.js.map +1 -1
  170. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/TFTY2V3E.js +4 -4
  171. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/TFTY2V3E.js.map +1 -1
  172. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/TGBMUR4Z.js +4 -4
  173. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/TGBMUR4Z.js.map +1 -1
  174. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/TYHUUGLH.js +1 -1
  175. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/TYHUUGLH.js.map +1 -1
  176. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/UFYZ7HLU.js +2 -2
  177. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/UFYZ7HLU.js.map +1 -1
  178. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/UQTBTRSG.js +4 -4
  179. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/UQTBTRSG.js.map +1 -1
  180. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/UZJJWJQM.js +1 -1
  181. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/UZJJWJQM.js.map +1 -1
  182. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/VNMGX67M.js +1 -1
  183. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/VNMGX67M.js.map +1 -1
  184. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/VQPWR4W5.js +1 -1
  185. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/VQPWR4W5.js.map +1 -1
  186. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/WZBYH43M.js +4 -4
  187. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/WZBYH43M.js.map +1 -1
  188. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/XVU3GCCX.js +1 -1
  189. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/XVU3GCCX.js.map +1 -1
  190. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/Z5FQB54Q.js +4 -4
  191. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/Z5FQB54Q.js.map +1 -1
  192. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/ZLZED63N.js +4 -4
  193. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/ZLZED63N.js.map +1 -1
  194. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/ZMQW6EBL.js +1 -1
  195. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/ZMQW6EBL.js.map +1 -1
  196. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/ZW5OSILD.js +4 -4
  197. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/ZW5OSILD.js.map +1 -1
  198. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/components/navigation-menu/index.js +4 -4
  199. package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/components/navigation-menu/index.js.map +1 -1
  200. package/dist/node_modules/.bun/@internationalized_date@3.11.0/node_modules/@internationalized/date/dist/GregorianCalendar.js +1 -1
  201. package/dist/node_modules/.bun/@internationalized_date@3.11.0/node_modules/@internationalized/date/dist/GregorianCalendar.js.map +1 -1
  202. package/dist/node_modules/.bun/{@solid-primitives_keyed@1.5.3_2e1854f049906f04 → @solid-primitives_keyed@1.5.3_ac9bd97bed21f560}/node_modules/@solid-primitives/keyed/dist/index.js +1 -1
  203. package/dist/node_modules/.bun/{@solid-primitives_keyed@1.5.3_2e1854f049906f04 → @solid-primitives_keyed@1.5.3_ac9bd97bed21f560}/node_modules/@solid-primitives/keyed/dist/index.js.map +1 -1
  204. package/dist/node_modules/.bun/@zag-js_auto-resize@1.35.3/node_modules/@zag-js/auto-resize/dist/autoresize-textarea.js +10 -10
  205. package/dist/node_modules/.bun/@zag-js_auto-resize@1.35.3/node_modules/@zag-js/auto-resize/dist/autoresize-textarea.js.map +1 -1
  206. package/dist/node_modules/.bun/@zag-js_collection@1.35.3/node_modules/@zag-js/collection/dist/list-collection.js +1 -1
  207. package/dist/node_modules/.bun/@zag-js_collection@1.35.3/node_modules/@zag-js/collection/dist/list-collection.js.map +1 -1
  208. package/dist/node_modules/.bun/@zag-js_date-picker@1.35.3_ee33ebb1f804619f/node_modules/@zag-js/date-picker/dist/date-picker.machine.js +1 -1
  209. package/dist/node_modules/.bun/@zag-js_date-picker@1.35.3_ee33ebb1f804619f/node_modules/@zag-js/date-picker/dist/date-picker.machine.js.map +1 -1
  210. package/dist/node_modules/.bun/@zag-js_rect-utils@1.35.3/node_modules/@zag-js/rect-utils/dist/angle.js +1 -1
  211. package/dist/node_modules/.bun/@zag-js_rect-utils@1.35.3/node_modules/@zag-js/rect-utils/dist/angle.js.map +1 -1
  212. package/dist/node_modules/.bun/{@zag-js_solid@1.35.3_2e1854f049906f04 → @zag-js_solid@1.35.3_ac9bd97bed21f560}/node_modules/@zag-js/solid/dist/bindable.js +1 -1
  213. package/dist/node_modules/.bun/{@zag-js_solid@1.35.3_2e1854f049906f04 → @zag-js_solid@1.35.3_ac9bd97bed21f560}/node_modules/@zag-js/solid/dist/bindable.js.map +1 -1
  214. package/dist/node_modules/.bun/{@zag-js_solid@1.35.3_2e1854f049906f04 → @zag-js_solid@1.35.3_ac9bd97bed21f560}/node_modules/@zag-js/solid/dist/machine.js +1 -1
  215. package/dist/node_modules/.bun/{@zag-js_solid@1.35.3_2e1854f049906f04 → @zag-js_solid@1.35.3_ac9bd97bed21f560}/node_modules/@zag-js/solid/dist/machine.js.map +1 -1
  216. package/dist/node_modules/.bun/{@zag-js_solid@1.35.3_2e1854f049906f04 → @zag-js_solid@1.35.3_ac9bd97bed21f560}/node_modules/@zag-js/solid/dist/merge-props.js +1 -1
  217. package/dist/node_modules/.bun/{@zag-js_solid@1.35.3_2e1854f049906f04 → @zag-js_solid@1.35.3_ac9bd97bed21f560}/node_modules/@zag-js/solid/dist/merge-props.js.map +1 -1
  218. package/dist/node_modules/.bun/{@zag-js_solid@1.35.3_2e1854f049906f04 → @zag-js_solid@1.35.3_ac9bd97bed21f560}/node_modules/@zag-js/solid/dist/normalize-props.js +1 -1
  219. package/dist/node_modules/.bun/{@zag-js_solid@1.35.3_2e1854f049906f04 → @zag-js_solid@1.35.3_ac9bd97bed21f560}/node_modules/@zag-js/solid/dist/normalize-props.js.map +1 -1
  220. package/dist/node_modules/.bun/{@zag-js_solid@1.35.3_2e1854f049906f04 → @zag-js_solid@1.35.3_ac9bd97bed21f560}/node_modules/@zag-js/solid/dist/refs.js +1 -1
  221. package/dist/node_modules/.bun/{@zag-js_solid@1.35.3_2e1854f049906f04 → @zag-js_solid@1.35.3_ac9bd97bed21f560}/node_modules/@zag-js/solid/dist/refs.js.map +1 -1
  222. package/dist/node_modules/.bun/{@zag-js_solid@1.35.3_2e1854f049906f04 → @zag-js_solid@1.35.3_ac9bd97bed21f560}/node_modules/@zag-js/solid/dist/track.js +1 -1
  223. package/dist/node_modules/.bun/{@zag-js_solid@1.35.3_2e1854f049906f04 → @zag-js_solid@1.35.3_ac9bd97bed21f560}/node_modules/@zag-js/solid/dist/track.js.map +1 -1
  224. package/dist/node_modules/.bun/@zag-js_switch@1.35.3/node_modules/@zag-js/switch/dist/switch.connect.js +6 -6
  225. package/dist/node_modules/.bun/@zag-js_switch@1.35.3/node_modules/@zag-js/switch/dist/switch.connect.js.map +1 -1
  226. package/dist/node_modules/.bun/tailwind-merge@3.5.0/node_modules/tailwind-merge/dist/bundle-mjs.js +1 -1
  227. package/dist/node_modules/.bun/tailwind-merge@3.5.0/node_modules/tailwind-merge/dist/bundle-mjs.js.map +1 -1
  228. package/dist/node_modules/.bun/{tailwind-variants@3.2.2_7ac958b541464b98 → tailwind-variants@3.2.2_7ff2127c63cfd169}/node_modules/tailwind-variants/dist/chunk-LQJYWU4O.js +1 -1
  229. package/dist/node_modules/.bun/{tailwind-variants@3.2.2_7ac958b541464b98 → tailwind-variants@3.2.2_7ff2127c63cfd169}/node_modules/tailwind-variants/dist/chunk-LQJYWU4O.js.map +1 -1
  230. package/dist/node_modules/.bun/{tailwind-variants@3.2.2_7ac958b541464b98 → tailwind-variants@3.2.2_7ff2127c63cfd169}/node_modules/tailwind-variants/dist/chunk-RZF76H2U.js +1 -1
  231. package/dist/node_modules/.bun/{tailwind-variants@3.2.2_7ac958b541464b98 → tailwind-variants@3.2.2_7ff2127c63cfd169}/node_modules/tailwind-variants/dist/chunk-RZF76H2U.js.map +1 -1
  232. package/dist/node_modules/.bun/{tailwind-variants@3.2.2_7ac958b541464b98 → tailwind-variants@3.2.2_7ff2127c63cfd169}/node_modules/tailwind-variants/dist/index.js +1 -1
  233. package/dist/node_modules/.bun/{tailwind-variants@3.2.2_7ac958b541464b98 → tailwind-variants@3.2.2_7ff2127c63cfd169}/node_modules/tailwind-variants/dist/index.js.map +1 -1
  234. package/dist/theme.css +1 -1
  235. package/package.json +5 -4
  236. package/src/theme.css +5 -1
  237. package/dist/node_modules/.bun/@ark-ui_solid@5.34.1_2e1854f049906f04/node_modules/@ark-ui/solid/dist/chunk/6WEDGJKQ.js +0 -7
  238. package/dist/node_modules/.bun/@ark-ui_solid@5.34.1_2e1854f049906f04/node_modules/@ark-ui/solid/dist/chunk/7IUG3E2V.js +0 -11
  239. package/dist/node_modules/.bun/@ark-ui_solid@5.34.1_2e1854f049906f04/node_modules/@ark-ui/solid/dist/chunk/KGOB2IMX.js +0 -6
  240. /package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/4YNGVMW2.js +0 -0
  241. /package/dist/node_modules/.bun/{@ark-ui_solid@5.34.1_2e1854f049906f04 → @ark-ui_solid@5.34.1_ac9bd97bed21f560}/node_modules/@ark-ui/solid/dist/chunk/6P2AQNUE.js +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"list-collection.js","names":[],"sources":["../../../../../../../../../../node_modules/.bun/@zag-js+collection@1.35.3/node_modules/@zag-js/collection/dist/list-collection.mjs"],"sourcesContent":["import {\n __publicField\n} from \"./chunk-QZ7TP4HQ.mjs\";\n\n// src/list-collection.ts\nimport { hasProp, isEqual, isObject } from \"@zag-js/utils\";\nvar fallback = {\n itemToValue(item) {\n if (typeof item === \"string\") return item;\n if (isObject(item) && hasProp(item, \"value\")) return item.value;\n return \"\";\n },\n itemToString(item) {\n if (typeof item === \"string\") return item;\n if (isObject(item) && hasProp(item, \"label\")) return item.label;\n return fallback.itemToValue(item);\n },\n isItemDisabled(item) {\n if (isObject(item) && hasProp(item, \"disabled\")) return !!item.disabled;\n return false;\n }\n};\nvar ListCollection = class _ListCollection {\n constructor(options) {\n this.options = options;\n /**\n * The items in the collection\n */\n __publicField(this, \"items\");\n __publicField(this, \"indexMap\", null);\n /**\n * Copy the collection\n */\n __publicField(this, \"copy\", (items) => {\n return new _ListCollection({ ...this.options, items: items ?? [...this.items] });\n });\n /**\n * Check if the collection is equal to another collection\n */\n __publicField(this, \"isEqual\", (other) => {\n return isEqual(this.items, other.items);\n });\n /**\n * Function to update the collection items\n */\n __publicField(this, \"setItems\", (items) => {\n return this.copy(items);\n });\n /**\n * Returns all the values in the collection\n */\n __publicField(this, \"getValues\", (items = this.items) => {\n const values = [];\n for (const item of items) {\n const value = this.getItemValue(item);\n if (value != null) values.push(value);\n }\n return values;\n });\n /**\n * Get the item based on its value\n */\n __publicField(this, \"find\", (value) => {\n if (value == null) return null;\n const index = this.indexOf(value);\n return index !== -1 ? this.at(index) : null;\n });\n /**\n * Get the items based on its values\n */\n __publicField(this, \"findMany\", (values) => {\n const result = [];\n for (const value of values) {\n const item = this.find(value);\n if (item != null) result.push(item);\n }\n return result;\n });\n /**\n * Get the item based on its index\n */\n __publicField(this, \"at\", (index) => {\n if (!this.options.groupBy && !this.options.groupSort) {\n return this.items[index] ?? null;\n }\n let idx = 0;\n const groups = this.group();\n for (const [, items] of groups) {\n for (const item of items) {\n if (idx === index) return item;\n idx++;\n }\n }\n return null;\n });\n __publicField(this, \"sortFn\", (valueA, valueB) => {\n const indexA = this.indexOf(valueA);\n const indexB = this.indexOf(valueB);\n return (indexA ?? 0) - (indexB ?? 0);\n });\n /**\n * Sort the values based on their index\n */\n __publicField(this, \"sort\", (values) => {\n return [...values].sort(this.sortFn.bind(this));\n });\n /**\n * Convert an item to a value\n */\n __publicField(this, \"getItemValue\", (item) => {\n if (item == null) return null;\n return this.options.itemToValue?.(item) ?? fallback.itemToValue(item);\n });\n /**\n * Whether an item is disabled\n */\n __publicField(this, \"getItemDisabled\", (item) => {\n if (item == null) return false;\n return this.options.isItemDisabled?.(item) ?? fallback.isItemDisabled(item);\n });\n /**\n * Convert an item to a string\n */\n __publicField(this, \"stringifyItem\", (item) => {\n if (item == null) return null;\n return this.options.itemToString?.(item) ?? fallback.itemToString(item);\n });\n /**\n * Convert a value to a string\n */\n __publicField(this, \"stringify\", (value) => {\n if (value == null) return null;\n return this.stringifyItem(this.find(value));\n });\n /**\n * Convert an array of items to a string\n */\n __publicField(this, \"stringifyItems\", (items, separator = \", \") => {\n const strs = [];\n for (const item of items) {\n const str = this.stringifyItem(item);\n if (str != null) strs.push(str);\n }\n return strs.join(separator);\n });\n /**\n * Convert an array of items to a string\n */\n __publicField(this, \"stringifyMany\", (value, separator) => {\n return this.stringifyItems(this.findMany(value), separator);\n });\n /**\n * Whether the collection has a value\n */\n __publicField(this, \"has\", (value) => {\n return this.indexOf(value) !== -1;\n });\n /**\n * Whether the collection has an item\n */\n __publicField(this, \"hasItem\", (item) => {\n if (item == null) return false;\n return this.has(this.getItemValue(item));\n });\n /**\n * Group items by the groupBy function provided in options\n * Returns an array of [groupKey, items] tuples\n */\n __publicField(this, \"group\", () => {\n const { groupBy, groupSort } = this.options;\n if (!groupBy) return [[\"\", [...this.items]]];\n const groups = /* @__PURE__ */ new Map();\n this.items.forEach((item, index) => {\n const groupKey = groupBy(item, index);\n if (!groups.has(groupKey)) {\n groups.set(groupKey, []);\n }\n groups.get(groupKey).push(item);\n });\n let entries = Array.from(groups.entries());\n if (groupSort) {\n entries.sort(([a], [b]) => {\n if (typeof groupSort === \"function\") return groupSort(a, b);\n if (Array.isArray(groupSort)) {\n const indexA = groupSort.indexOf(a);\n const indexB = groupSort.indexOf(b);\n if (indexA === -1) return 1;\n if (indexB === -1) return -1;\n return indexA - indexB;\n }\n if (groupSort === \"asc\") return a.localeCompare(b);\n if (groupSort === \"desc\") return b.localeCompare(a);\n return 0;\n });\n }\n return entries;\n });\n /**\n * Returns the next value in the collection\n */\n __publicField(this, \"getNextValue\", (value, step = 1, clamp = false) => {\n let index = this.indexOf(value);\n if (index === -1) return null;\n index = clamp ? Math.min(index + step, this.size - 1) : index + step;\n while (index <= this.size && this.getItemDisabled(this.at(index))) index++;\n return this.getItemValue(this.at(index));\n });\n /**\n * Returns the previous value in the collection\n */\n __publicField(this, \"getPreviousValue\", (value, step = 1, clamp = false) => {\n let index = this.indexOf(value);\n if (index === -1) return null;\n index = clamp ? Math.max(index - step, 0) : index - step;\n while (index >= 0 && this.getItemDisabled(this.at(index))) index--;\n return this.getItemValue(this.at(index));\n });\n /**\n * Get the index of an item based on its key\n */\n __publicField(this, \"indexOf\", (value) => {\n if (value == null) return -1;\n if (!this.options.groupBy && !this.options.groupSort) {\n return this.items.findIndex((item) => this.getItemValue(item) === value);\n }\n if (!this.indexMap) {\n this.indexMap = /* @__PURE__ */ new Map();\n let idx = 0;\n const groups = this.group();\n for (const [, items] of groups) {\n for (const item of items) {\n const itemValue = this.getItemValue(item);\n if (itemValue != null) {\n this.indexMap.set(itemValue, idx);\n }\n idx++;\n }\n }\n }\n return this.indexMap.get(value) ?? -1;\n });\n __publicField(this, \"getByText\", (text, current) => {\n const currentIndex = current != null ? this.indexOf(current) : -1;\n const isSingleKey = text.length === 1;\n for (let i = 0; i < this.items.length; i++) {\n const item = this.items[(currentIndex + i + 1) % this.items.length];\n if (isSingleKey && this.getItemValue(item) === current) continue;\n if (this.getItemDisabled(item)) continue;\n if (match(this.stringifyItem(item), text)) return item;\n }\n return void 0;\n });\n /**\n * Search for a value based on a query\n */\n __publicField(this, \"search\", (queryString, options) => {\n const { state, currentValue, timeout = 350 } = options;\n const search = state.keysSoFar + queryString;\n const isRepeated = search.length > 1 && Array.from(search).every((char) => char === search[0]);\n const query = isRepeated ? search[0] : search;\n const item = this.getByText(query, currentValue);\n const value = this.getItemValue(item);\n function cleanup() {\n clearTimeout(state.timer);\n state.timer = -1;\n }\n function update(value2) {\n state.keysSoFar = value2;\n cleanup();\n if (value2 !== \"\") {\n state.timer = +setTimeout(() => {\n update(\"\");\n cleanup();\n }, timeout);\n }\n }\n update(search);\n return value;\n });\n /**\n * Update an item in the collection\n */\n __publicField(this, \"update\", (value, item) => {\n let index = this.indexOf(value);\n if (index === -1) return this;\n return this.copy([...this.items.slice(0, index), item, ...this.items.slice(index + 1)]);\n });\n /**\n * Update an item in the collection if it exists, otherwise append it\n */\n __publicField(this, \"upsert\", (value, item, mode = \"append\") => {\n let index = this.indexOf(value);\n if (index === -1) {\n const fn = mode === \"append\" ? this.append : this.prepend;\n return fn(item);\n }\n return this.copy([...this.items.slice(0, index), item, ...this.items.slice(index + 1)]);\n });\n /**\n * Insert items at a specific index\n */\n __publicField(this, \"insert\", (index, ...items) => {\n return this.copy(insert(this.items, index, ...items));\n });\n /**\n * Insert items before a specific value\n */\n __publicField(this, \"insertBefore\", (value, ...items) => {\n let toIndex = this.indexOf(value);\n if (toIndex === -1) {\n if (this.items.length === 0) toIndex = 0;\n else return this;\n }\n return this.copy(insert(this.items, toIndex, ...items));\n });\n /**\n * Insert items after a specific value\n */\n __publicField(this, \"insertAfter\", (value, ...items) => {\n let toIndex = this.indexOf(value);\n if (toIndex === -1) {\n if (this.items.length === 0) toIndex = 0;\n else return this;\n }\n return this.copy(insert(this.items, toIndex + 1, ...items));\n });\n /**\n * Prepend items to the collection\n */\n __publicField(this, \"prepend\", (...items) => {\n return this.copy(insert(this.items, 0, ...items));\n });\n /**\n * Append items to the collection\n */\n __publicField(this, \"append\", (...items) => {\n return this.copy(insert(this.items, this.items.length, ...items));\n });\n /**\n * Filter the collection\n */\n __publicField(this, \"filter\", (fn) => {\n const filteredItems = this.items.filter((item, index) => fn(this.stringifyItem(item), index, item));\n return this.copy(filteredItems);\n });\n /**\n * Remove items from the collection\n */\n __publicField(this, \"remove\", (...itemsOrValues) => {\n const values = itemsOrValues.map(\n (itemOrValue) => typeof itemOrValue === \"string\" ? itemOrValue : this.getItemValue(itemOrValue)\n );\n return this.copy(\n this.items.filter((item) => {\n const value = this.getItemValue(item);\n if (value == null) return false;\n return !values.includes(value);\n })\n );\n });\n /**\n * Move an item to a specific index\n */\n __publicField(this, \"move\", (value, toIndex) => {\n const fromIndex = this.indexOf(value);\n if (fromIndex === -1) return this;\n return this.copy(move(this.items, [fromIndex], toIndex));\n });\n /**\n * Move items before a specific value\n */\n __publicField(this, \"moveBefore\", (value, ...values) => {\n let toIndex = this.items.findIndex((item) => this.getItemValue(item) === value);\n if (toIndex === -1) return this;\n let indices = values.map((value2) => this.items.findIndex((item) => this.getItemValue(item) === value2)).sort((a, b) => a - b);\n return this.copy(move(this.items, indices, toIndex));\n });\n /**\n * Move items after a specific value\n */\n __publicField(this, \"moveAfter\", (value, ...values) => {\n let toIndex = this.items.findIndex((item) => this.getItemValue(item) === value);\n if (toIndex === -1) return this;\n let indices = values.map((value2) => this.items.findIndex((item) => this.getItemValue(item) === value2)).sort((a, b) => a - b);\n return this.copy(move(this.items, indices, toIndex + 1));\n });\n /**\n * Reorder items\n */\n __publicField(this, \"reorder\", (fromIndex, toIndex) => {\n return this.copy(move(this.items, [fromIndex], toIndex));\n });\n /**\n * Compare two values\n */\n __publicField(this, \"compareValue\", (a, b) => {\n const indexA = this.indexOf(a);\n const indexB = this.indexOf(b);\n if (indexA < indexB) return -1;\n if (indexA > indexB) return 1;\n return 0;\n });\n /**\n * Get the range of values between two values\n */\n __publicField(this, \"range\", (from, to) => {\n let keys = [];\n let key = from;\n while (key != null) {\n let item = this.find(key);\n if (item) keys.push(key);\n if (key === to) return keys;\n key = this.getNextValue(key);\n }\n return [];\n });\n /**\n * Get the range of values between two values\n */\n __publicField(this, \"getValueRange\", (from, to) => {\n if (from && to) {\n if (this.compareValue(from, to) <= 0) {\n return this.range(from, to);\n }\n return this.range(to, from);\n }\n return [];\n });\n /**\n * Convert the collection to a string\n */\n __publicField(this, \"toString\", () => {\n let result = \"\";\n for (const item of this.items) {\n const value = this.getItemValue(item);\n const label = this.stringifyItem(item);\n const disabled = this.getItemDisabled(item);\n const itemString = [value, label, disabled].filter(Boolean).join(\":\");\n result += itemString + \",\";\n }\n return result;\n });\n /**\n * Convert the collection to a JSON object\n */\n __publicField(this, \"toJSON\", () => {\n return {\n size: this.size,\n first: this.firstValue,\n last: this.lastValue\n };\n });\n this.items = [...options.items];\n }\n /**\n * Returns the number of items in the collection\n */\n get size() {\n return this.items.length;\n }\n /**\n * Returns the first value in the collection\n */\n get firstValue() {\n let index = 0;\n while (this.getItemDisabled(this.at(index))) index++;\n return this.getItemValue(this.at(index));\n }\n /**\n * Returns the last value in the collection\n */\n get lastValue() {\n let index = this.size - 1;\n while (this.getItemDisabled(this.at(index))) index--;\n return this.getItemValue(this.at(index));\n }\n *[Symbol.iterator]() {\n yield* this.items;\n }\n};\nvar match = (label, query) => {\n return !!label?.toLowerCase().startsWith(query.toLowerCase());\n};\nfunction isListCollection(v) {\n return v instanceof ListCollection;\n}\nfunction insert(items, index, ...values) {\n return [...items.slice(0, index), ...values, ...items.slice(index)];\n}\nfunction move(items, indices, toIndex) {\n indices = [...indices].sort((a, b) => a - b);\n const itemsToMove = indices.map((i) => items[i]);\n for (let i = indices.length - 1; i >= 0; i--) {\n items = [...items.slice(0, indices[i]), ...items.slice(indices[i] + 1)];\n }\n toIndex = Math.max(0, toIndex - indices.filter((i) => i < toIndex).length);\n return [...items.slice(0, toIndex), ...itemsToMove, ...items.slice(toIndex)];\n}\nexport {\n ListCollection,\n isListCollection\n};\n"],"x_google_ignoreList":[0],"mappings":";;;;AAMA,IAAI,IAAW;CACb,YAAY,GAAM;AAGhB,SAFI,OAAO,KAAS,WAAiB,IACjC,EAAS,EAAK,IAAI,EAAQ,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AQ,SAAS,GAAG,KAAK,GAAG,IACvC,KAAQ,CAAC,GAAG,EAAM,MAAM,GAAG,EAAQ,GAAG,EAAE,GAAG,EAAM,MAAM,EAAQ,KAAK,EAAE,CAAC;AAGzE,QADA,IAAU,KAAK,IAAI,GAAG,IAAU,EAAQ,QAAQ,MAAM,IAAI,EAAQ,CAAC,OAAO,EACnE;EAAC,GAAG,EAAM,MAAM,GAAG,EAAQ;EAAE,GAAG;EAAa,GAAG,EAAM,MAAM,EAAQ;EAAC"}
1
+ {"version":3,"file":"list-collection.js","names":[],"sources":["../../../../../../../../../../node_modules/.bun/@zag-js+collection@1.35.3/node_modules/@zag-js/collection/dist/list-collection.mjs"],"sourcesContent":["import {\n __publicField\n} from \"./chunk-QZ7TP4HQ.mjs\";\n\n// src/list-collection.ts\nimport { hasProp, isEqual, isObject } from \"@zag-js/utils\";\nvar fallback = {\n itemToValue(item) {\n if (typeof item === \"string\") return item;\n if (isObject(item) && hasProp(item, \"value\")) return item.value;\n return \"\";\n },\n itemToString(item) {\n if (typeof item === \"string\") return item;\n if (isObject(item) && hasProp(item, \"label\")) return item.label;\n return fallback.itemToValue(item);\n },\n isItemDisabled(item) {\n if (isObject(item) && hasProp(item, \"disabled\")) return !!item.disabled;\n return false;\n }\n};\nvar ListCollection = class _ListCollection {\n constructor(options) {\n this.options = options;\n /**\n * The items in the collection\n */\n __publicField(this, \"items\");\n __publicField(this, \"indexMap\", null);\n /**\n * Copy the collection\n */\n __publicField(this, \"copy\", (items) => {\n return new _ListCollection({ ...this.options, items: items ?? [...this.items] });\n });\n /**\n * Check if the collection is equal to another collection\n */\n __publicField(this, \"isEqual\", (other) => {\n return isEqual(this.items, other.items);\n });\n /**\n * Function to update the collection items\n */\n __publicField(this, \"setItems\", (items) => {\n return this.copy(items);\n });\n /**\n * Returns all the values in the collection\n */\n __publicField(this, \"getValues\", (items = this.items) => {\n const values = [];\n for (const item of items) {\n const value = this.getItemValue(item);\n if (value != null) values.push(value);\n }\n return values;\n });\n /**\n * Get the item based on its value\n */\n __publicField(this, \"find\", (value) => {\n if (value == null) return null;\n const index = this.indexOf(value);\n return index !== -1 ? this.at(index) : null;\n });\n /**\n * Get the items based on its values\n */\n __publicField(this, \"findMany\", (values) => {\n const result = [];\n for (const value of values) {\n const item = this.find(value);\n if (item != null) result.push(item);\n }\n return result;\n });\n /**\n * Get the item based on its index\n */\n __publicField(this, \"at\", (index) => {\n if (!this.options.groupBy && !this.options.groupSort) {\n return this.items[index] ?? null;\n }\n let idx = 0;\n const groups = this.group();\n for (const [, items] of groups) {\n for (const item of items) {\n if (idx === index) return item;\n idx++;\n }\n }\n return null;\n });\n __publicField(this, \"sortFn\", (valueA, valueB) => {\n const indexA = this.indexOf(valueA);\n const indexB = this.indexOf(valueB);\n return (indexA ?? 0) - (indexB ?? 0);\n });\n /**\n * Sort the values based on their index\n */\n __publicField(this, \"sort\", (values) => {\n return [...values].sort(this.sortFn.bind(this));\n });\n /**\n * Convert an item to a value\n */\n __publicField(this, \"getItemValue\", (item) => {\n if (item == null) return null;\n return this.options.itemToValue?.(item) ?? fallback.itemToValue(item);\n });\n /**\n * Whether an item is disabled\n */\n __publicField(this, \"getItemDisabled\", (item) => {\n if (item == null) return false;\n return this.options.isItemDisabled?.(item) ?? fallback.isItemDisabled(item);\n });\n /**\n * Convert an item to a string\n */\n __publicField(this, \"stringifyItem\", (item) => {\n if (item == null) return null;\n return this.options.itemToString?.(item) ?? fallback.itemToString(item);\n });\n /**\n * Convert a value to a string\n */\n __publicField(this, \"stringify\", (value) => {\n if (value == null) return null;\n return this.stringifyItem(this.find(value));\n });\n /**\n * Convert an array of items to a string\n */\n __publicField(this, \"stringifyItems\", (items, separator = \", \") => {\n const strs = [];\n for (const item of items) {\n const str = this.stringifyItem(item);\n if (str != null) strs.push(str);\n }\n return strs.join(separator);\n });\n /**\n * Convert an array of items to a string\n */\n __publicField(this, \"stringifyMany\", (value, separator) => {\n return this.stringifyItems(this.findMany(value), separator);\n });\n /**\n * Whether the collection has a value\n */\n __publicField(this, \"has\", (value) => {\n return this.indexOf(value) !== -1;\n });\n /**\n * Whether the collection has an item\n */\n __publicField(this, \"hasItem\", (item) => {\n if (item == null) return false;\n return this.has(this.getItemValue(item));\n });\n /**\n * Group items by the groupBy function provided in options\n * Returns an array of [groupKey, items] tuples\n */\n __publicField(this, \"group\", () => {\n const { groupBy, groupSort } = this.options;\n if (!groupBy) return [[\"\", [...this.items]]];\n const groups = /* @__PURE__ */ new Map();\n this.items.forEach((item, index) => {\n const groupKey = groupBy(item, index);\n if (!groups.has(groupKey)) {\n groups.set(groupKey, []);\n }\n groups.get(groupKey).push(item);\n });\n let entries = Array.from(groups.entries());\n if (groupSort) {\n entries.sort(([a], [b]) => {\n if (typeof groupSort === \"function\") return groupSort(a, b);\n if (Array.isArray(groupSort)) {\n const indexA = groupSort.indexOf(a);\n const indexB = groupSort.indexOf(b);\n if (indexA === -1) return 1;\n if (indexB === -1) return -1;\n return indexA - indexB;\n }\n if (groupSort === \"asc\") return a.localeCompare(b);\n if (groupSort === \"desc\") return b.localeCompare(a);\n return 0;\n });\n }\n return entries;\n });\n /**\n * Returns the next value in the collection\n */\n __publicField(this, \"getNextValue\", (value, step = 1, clamp = false) => {\n let index = this.indexOf(value);\n if (index === -1) return null;\n index = clamp ? Math.min(index + step, this.size - 1) : index + step;\n while (index <= this.size && this.getItemDisabled(this.at(index))) index++;\n return this.getItemValue(this.at(index));\n });\n /**\n * Returns the previous value in the collection\n */\n __publicField(this, \"getPreviousValue\", (value, step = 1, clamp = false) => {\n let index = this.indexOf(value);\n if (index === -1) return null;\n index = clamp ? Math.max(index - step, 0) : index - step;\n while (index >= 0 && this.getItemDisabled(this.at(index))) index--;\n return this.getItemValue(this.at(index));\n });\n /**\n * Get the index of an item based on its key\n */\n __publicField(this, \"indexOf\", (value) => {\n if (value == null) return -1;\n if (!this.options.groupBy && !this.options.groupSort) {\n return this.items.findIndex((item) => this.getItemValue(item) === value);\n }\n if (!this.indexMap) {\n this.indexMap = /* @__PURE__ */ new Map();\n let idx = 0;\n const groups = this.group();\n for (const [, items] of groups) {\n for (const item of items) {\n const itemValue = this.getItemValue(item);\n if (itemValue != null) {\n this.indexMap.set(itemValue, idx);\n }\n idx++;\n }\n }\n }\n return this.indexMap.get(value) ?? -1;\n });\n __publicField(this, \"getByText\", (text, current) => {\n const currentIndex = current != null ? this.indexOf(current) : -1;\n const isSingleKey = text.length === 1;\n for (let i = 0; i < this.items.length; i++) {\n const item = this.items[(currentIndex + i + 1) % this.items.length];\n if (isSingleKey && this.getItemValue(item) === current) continue;\n if (this.getItemDisabled(item)) continue;\n if (match(this.stringifyItem(item), text)) return item;\n }\n return void 0;\n });\n /**\n * Search for a value based on a query\n */\n __publicField(this, \"search\", (queryString, options) => {\n const { state, currentValue, timeout = 350 } = options;\n const search = state.keysSoFar + queryString;\n const isRepeated = search.length > 1 && Array.from(search).every((char) => char === search[0]);\n const query = isRepeated ? search[0] : search;\n const item = this.getByText(query, currentValue);\n const value = this.getItemValue(item);\n function cleanup() {\n clearTimeout(state.timer);\n state.timer = -1;\n }\n function update(value2) {\n state.keysSoFar = value2;\n cleanup();\n if (value2 !== \"\") {\n state.timer = +setTimeout(() => {\n update(\"\");\n cleanup();\n }, timeout);\n }\n }\n update(search);\n return value;\n });\n /**\n * Update an item in the collection\n */\n __publicField(this, \"update\", (value, item) => {\n let index = this.indexOf(value);\n if (index === -1) return this;\n return this.copy([...this.items.slice(0, index), item, ...this.items.slice(index + 1)]);\n });\n /**\n * Update an item in the collection if it exists, otherwise append it\n */\n __publicField(this, \"upsert\", (value, item, mode = \"append\") => {\n let index = this.indexOf(value);\n if (index === -1) {\n const fn = mode === \"append\" ? this.append : this.prepend;\n return fn(item);\n }\n return this.copy([...this.items.slice(0, index), item, ...this.items.slice(index + 1)]);\n });\n /**\n * Insert items at a specific index\n */\n __publicField(this, \"insert\", (index, ...items) => {\n return this.copy(insert(this.items, index, ...items));\n });\n /**\n * Insert items before a specific value\n */\n __publicField(this, \"insertBefore\", (value, ...items) => {\n let toIndex = this.indexOf(value);\n if (toIndex === -1) {\n if (this.items.length === 0) toIndex = 0;\n else return this;\n }\n return this.copy(insert(this.items, toIndex, ...items));\n });\n /**\n * Insert items after a specific value\n */\n __publicField(this, \"insertAfter\", (value, ...items) => {\n let toIndex = this.indexOf(value);\n if (toIndex === -1) {\n if (this.items.length === 0) toIndex = 0;\n else return this;\n }\n return this.copy(insert(this.items, toIndex + 1, ...items));\n });\n /**\n * Prepend items to the collection\n */\n __publicField(this, \"prepend\", (...items) => {\n return this.copy(insert(this.items, 0, ...items));\n });\n /**\n * Append items to the collection\n */\n __publicField(this, \"append\", (...items) => {\n return this.copy(insert(this.items, this.items.length, ...items));\n });\n /**\n * Filter the collection\n */\n __publicField(this, \"filter\", (fn) => {\n const filteredItems = this.items.filter((item, index) => fn(this.stringifyItem(item), index, item));\n return this.copy(filteredItems);\n });\n /**\n * Remove items from the collection\n */\n __publicField(this, \"remove\", (...itemsOrValues) => {\n const values = itemsOrValues.map(\n (itemOrValue) => typeof itemOrValue === \"string\" ? itemOrValue : this.getItemValue(itemOrValue)\n );\n return this.copy(\n this.items.filter((item) => {\n const value = this.getItemValue(item);\n if (value == null) return false;\n return !values.includes(value);\n })\n );\n });\n /**\n * Move an item to a specific index\n */\n __publicField(this, \"move\", (value, toIndex) => {\n const fromIndex = this.indexOf(value);\n if (fromIndex === -1) return this;\n return this.copy(move(this.items, [fromIndex], toIndex));\n });\n /**\n * Move items before a specific value\n */\n __publicField(this, \"moveBefore\", (value, ...values) => {\n let toIndex = this.items.findIndex((item) => this.getItemValue(item) === value);\n if (toIndex === -1) return this;\n let indices = values.map((value2) => this.items.findIndex((item) => this.getItemValue(item) === value2)).sort((a, b) => a - b);\n return this.copy(move(this.items, indices, toIndex));\n });\n /**\n * Move items after a specific value\n */\n __publicField(this, \"moveAfter\", (value, ...values) => {\n let toIndex = this.items.findIndex((item) => this.getItemValue(item) === value);\n if (toIndex === -1) return this;\n let indices = values.map((value2) => this.items.findIndex((item) => this.getItemValue(item) === value2)).sort((a, b) => a - b);\n return this.copy(move(this.items, indices, toIndex + 1));\n });\n /**\n * Reorder items\n */\n __publicField(this, \"reorder\", (fromIndex, toIndex) => {\n return this.copy(move(this.items, [fromIndex], toIndex));\n });\n /**\n * Compare two values\n */\n __publicField(this, \"compareValue\", (a, b) => {\n const indexA = this.indexOf(a);\n const indexB = this.indexOf(b);\n if (indexA < indexB) return -1;\n if (indexA > indexB) return 1;\n return 0;\n });\n /**\n * Get the range of values between two values\n */\n __publicField(this, \"range\", (from, to) => {\n let keys = [];\n let key = from;\n while (key != null) {\n let item = this.find(key);\n if (item) keys.push(key);\n if (key === to) return keys;\n key = this.getNextValue(key);\n }\n return [];\n });\n /**\n * Get the range of values between two values\n */\n __publicField(this, \"getValueRange\", (from, to) => {\n if (from && to) {\n if (this.compareValue(from, to) <= 0) {\n return this.range(from, to);\n }\n return this.range(to, from);\n }\n return [];\n });\n /**\n * Convert the collection to a string\n */\n __publicField(this, \"toString\", () => {\n let result = \"\";\n for (const item of this.items) {\n const value = this.getItemValue(item);\n const label = this.stringifyItem(item);\n const disabled = this.getItemDisabled(item);\n const itemString = [value, label, disabled].filter(Boolean).join(\":\");\n result += itemString + \",\";\n }\n return result;\n });\n /**\n * Convert the collection to a JSON object\n */\n __publicField(this, \"toJSON\", () => {\n return {\n size: this.size,\n first: this.firstValue,\n last: this.lastValue\n };\n });\n this.items = [...options.items];\n }\n /**\n * Returns the number of items in the collection\n */\n get size() {\n return this.items.length;\n }\n /**\n * Returns the first value in the collection\n */\n get firstValue() {\n let index = 0;\n while (this.getItemDisabled(this.at(index))) index++;\n return this.getItemValue(this.at(index));\n }\n /**\n * Returns the last value in the collection\n */\n get lastValue() {\n let index = this.size - 1;\n while (this.getItemDisabled(this.at(index))) index--;\n return this.getItemValue(this.at(index));\n }\n *[Symbol.iterator]() {\n yield* this.items;\n }\n};\nvar match = (label, query) => {\n return !!label?.toLowerCase().startsWith(query.toLowerCase());\n};\nfunction isListCollection(v) {\n return v instanceof ListCollection;\n}\nfunction insert(items, index, ...values) {\n return [...items.slice(0, index), ...values, ...items.slice(index)];\n}\nfunction move(items, indices, toIndex) {\n indices = [...indices].sort((a, b) => a - b);\n const itemsToMove = indices.map((i) => items[i]);\n for (let i = indices.length - 1; i >= 0; i--) {\n items = [...items.slice(0, indices[i]), ...items.slice(indices[i] + 1)];\n }\n toIndex = Math.max(0, toIndex - indices.filter((i) => i < toIndex).length);\n return [...items.slice(0, toIndex), ...itemsToMove, ...items.slice(toIndex)];\n}\nexport {\n ListCollection,\n isListCollection\n};\n"],"x_google_ignoreList":[0],"mappings":";;;;AAMA,IAAI,IAAW;CACb,YAAY,GAAM;AAGhB,SAFI,OAAO,KAAS,WAAiB,IACjC,EAAS,EAAK,IAAI,EAAQ,GAAM,QAAQ,GAAS,EAAK,QACnD;;CAET,aAAa,GAAM;AAGjB,SAFI,OAAO,KAAS,WAAiB,IACjC,EAAS,EAAK,IAAI,EAAQ,GAAM,QAAQ,GAAS,EAAK,QACnD,EAAS,YAAY,EAAK;;CAEnC,eAAe,GAAM;AAEnB,SADI,EAAS,EAAK,IAAI,EAAQ,GAAM,WAAW,GAAS,CAAC,CAAC,EAAK,WACxD;;CAEV,EACG,IAAiB,MAAM,EAAgB;CACzC,YAAY,GAAS;AA6anB,EA5aA,KAAK,UAAU,GAIf,EAAc,MAAM,QAAQ,EAC5B,EAAc,MAAM,YAAY,KAAK,EAIrC,EAAc,MAAM,SAAS,MACpB,IAAI,EAAgB;GAAE,GAAG,KAAK;GAAS,OAAO,KAAS,CAAC,GAAG,KAAK,MAAM;GAAE,CAAC,CAChF,EAIF,EAAc,MAAM,YAAY,MACvB,EAAQ,KAAK,OAAO,EAAM,MAAM,CACvC,EAIF,EAAc,MAAM,aAAa,MACxB,KAAK,KAAK,EAAM,CACvB,EAIF,EAAc,MAAM,cAAc,IAAQ,KAAK,UAAU;GACvD,IAAM,IAAS,EAAE;AACjB,QAA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M,CAAC,EAAE;AAC7C,SAAO,KAAK,aAAa,KAAK,GAAG,EAAM,CAAC;;CAE1C,EAAE,OAAO,YAAY;AACnB,SAAO,KAAK;;GAGZ,KAAS,GAAO,MACX,CAAC,CAAC,GAAO,aAAa,CAAC,WAAW,EAAM,aAAa,CAAC;AAK/D,SAAS,EAAO,GAAO,GAAO,GAAG,GAAQ;AACvC,QAAO;EAAC,GAAG,EAAM,MAAM,GAAG,EAAM;EAAE,GAAG;EAAQ,GAAG,EAAM,MAAM,EAAM;EAAC;;AAErE,SAAS,EAAK,GAAO,GAAS,GAAS;AACrC,KAAU,CAAC,GAAG,EAAQ,CAAC,MAAM,GAAG,MAAM,IAAI,EAAE;CAC5C,IAAM,IAAc,EAAQ,KAAK,MAAM,EAAM,GAAG;AAChD,MAAK,IAAI,IAAI,EAAQ,SAAS,GAAG,KAAK,GAAG,IACvC,KAAQ,CAAC,GAAG,EAAM,MAAM,GAAG,EAAQ,GAAG,EAAE,GAAG,EAAM,MAAM,EAAQ,KAAK,EAAE,CAAC;AAGzE,QADA,IAAU,KAAK,IAAI,GAAG,IAAU,EAAQ,QAAQ,MAAM,IAAI,EAAQ,CAAC,OAAO,EACnE;EAAC,GAAG,EAAM,MAAM,GAAG,EAAQ;EAAE,GAAG;EAAa,GAAG,EAAM,MAAM,EAAQ;EAAC"}
@@ -983,7 +983,7 @@ var Y = t({
983
983
  }), X = (e, t) => {
984
984
  let { context: n, prop: r } = e, i = n.get("view"), a = typeof t == "number" ? n.get("focusedValue").set({ [i]: t }) : t;
985
985
  return L((e) => {
986
- H(e, r("minView")) && (a = a.set({ [e]: e === "day" ? 1 : 0 }));
986
+ H(e, r("minView")) && (a = a.set({ [e]: +(e === "day") }));
987
987
  }), a;
988
988
  }, Z = (e, t) => {
989
989
  if (!e || !("hour" in e)) return t;
@@ -1 +1 @@
1
- {"version":3,"file":"date-picker.machine.js","names":["toCalendar","DateFormatter","dom.getControlEl","dom.getPositionerEl","dom.getContentEl","dom.getInputEls","dom.getTriggerEl","dom.getClearTriggerEl","dom.getMonthSelectEl","dom.getYearSelectEl","toZoned","toCalendarDateTime"],"sources":["../../../../../../../../../../node_modules/.bun/@zag-js+date-picker@1.35.3+ee33ebb1f804619f/node_modules/@zag-js/date-picker/dist/date-picker.machine.mjs"],"sourcesContent":["// src/date-picker.machine.ts\nimport {\n DateFormatter,\n toCalendar,\n toCalendarDateTime,\n toZoned\n} from \"@internationalized/date\";\nimport { createGuards, createMachine } from \"@zag-js/core\";\nimport {\n alignDate,\n constrainValue,\n formatSelectedDate,\n getAdjustedDateFn,\n getDecadeRange,\n getEndDate,\n getNextPage,\n getNextSection,\n getPreviousPage,\n getPreviousSection,\n getTodayDate,\n isDateEqual,\n isDateOutsideRange,\n isNextRangeInvalid,\n isPreviousRangeInvalid,\n parseDateString\n} from \"@zag-js/date-utils\";\nimport { trackDismissableElement } from \"@zag-js/dismissable\";\nimport { disableTextSelection, raf, restoreTextSelection, setElementValue } from \"@zag-js/dom-query\";\nimport { createLiveRegion } from \"@zag-js/live-region\";\nimport { getPlacement } from \"@zag-js/popper\";\nimport * as dom from \"./date-picker.dom.mjs\";\nimport {\n adjustStartAndEndDate,\n clampView,\n eachView,\n getNextView,\n getPreviousView,\n getVisibleRangeText,\n isAboveMinView,\n isBelowMinView,\n isValidDate,\n sortDates\n} from \"./date-picker.utils.mjs\";\nvar { and } = createGuards();\nfunction isDateArrayEqual(a, b) {\n if (a?.length !== b?.length) return false;\n const len = Math.max(a.length, b.length);\n for (let i = 0; i < len; i++) {\n if (!isDateEqual(a[i], b[i])) return false;\n }\n return true;\n}\nfunction getValueAsString(value, prop) {\n return value.map((date) => {\n if (date == null) return \"\";\n return prop(\"format\")(date, { locale: prop(\"locale\"), timeZone: prop(\"timeZone\") });\n });\n}\nvar machine = createMachine({\n props({ props }) {\n const locale = props.locale || \"en-US\";\n const timeZone = props.timeZone || \"UTC\";\n const selectionMode = props.selectionMode || \"single\";\n const numOfMonths = props.numOfMonths || 1;\n let calendar;\n if (props.createCalendar) {\n const resolved = new Intl.DateTimeFormat(locale).resolvedOptions();\n const calendarId = resolved.calendar;\n if (calendarId !== \"gregory\" && calendarId !== \"iso8601\") {\n calendar = props.createCalendar(calendarId);\n }\n }\n const toTargetCalendar = (date) => {\n if (!calendar) return date;\n if (date.calendar.identifier === calendar.identifier) return date;\n return toCalendar(date, calendar);\n };\n const defaultValue = props.defaultValue ? sortDates(props.defaultValue).map((date) => constrainValue(toTargetCalendar(date), props.min, props.max)) : void 0;\n const value = props.value ? sortDates(props.value).map((date) => constrainValue(toTargetCalendar(date), props.min, props.max)) : void 0;\n let focusedValue = props.focusedValue || props.defaultFocusedValue || value?.[0] || defaultValue?.[0] || getTodayDate(timeZone, calendar);\n focusedValue = constrainValue(toTargetCalendar(focusedValue), props.min, props.max);\n const minView = \"day\";\n const maxView = \"year\";\n const defaultView = clampView(props.view || minView, minView, maxView);\n return {\n locale,\n numOfMonths,\n timeZone,\n selectionMode,\n defaultView,\n minView,\n maxView,\n outsideDaySelectable: false,\n closeOnSelect: true,\n format(date, { locale: locale2, timeZone: timeZone2 }) {\n const formatter = new DateFormatter(locale2, {\n timeZone: timeZone2,\n day: \"2-digit\",\n month: \"2-digit\",\n year: \"numeric\",\n calendar: calendar?.identifier\n });\n return formatter.format(date.toDate(timeZone2));\n },\n parse(value2, { locale: locale2, timeZone: timeZone2 }) {\n return parseDateString(value2, locale2, timeZone2);\n },\n ...props,\n focusedValue: typeof props.focusedValue === \"undefined\" ? void 0 : focusedValue,\n defaultFocusedValue: focusedValue,\n value,\n defaultValue: defaultValue ?? [],\n positioning: {\n placement: \"bottom\",\n ...props.positioning\n }\n };\n },\n initialState({ prop }) {\n const open = prop(\"open\") || prop(\"defaultOpen\") || prop(\"inline\");\n return open ? \"open\" : \"idle\";\n },\n refs() {\n return {\n announcer: void 0\n };\n },\n context({ prop, bindable, getContext }) {\n return {\n focusedValue: bindable(() => ({\n defaultValue: prop(\"defaultFocusedValue\"),\n value: prop(\"focusedValue\"),\n isEqual: isDateEqual,\n hash: (v) => v.toString(),\n sync: true,\n onChange(focusedValue) {\n const context = getContext();\n const view = context.get(\"view\");\n const value = context.get(\"value\");\n const valueAsString = getValueAsString(value, prop);\n prop(\"onFocusChange\")?.({ value, valueAsString, view, focusedValue });\n }\n })),\n value: bindable(() => ({\n defaultValue: prop(\"defaultValue\"),\n value: prop(\"value\"),\n isEqual: isDateArrayEqual,\n hash: (v) => v.map((date) => date?.toString() ?? \"\").join(\",\"),\n onChange(value) {\n const context = getContext();\n const valueAsString = getValueAsString(value, prop);\n prop(\"onValueChange\")?.({ value, valueAsString, view: context.get(\"view\") });\n }\n })),\n inputValue: bindable(() => ({\n defaultValue: \"\"\n })),\n activeIndex: bindable(() => ({\n defaultValue: 0,\n sync: true\n })),\n hoveredValue: bindable(() => ({\n defaultValue: null,\n isEqual: isDateEqual\n })),\n view: bindable(() => ({\n defaultValue: prop(\"defaultView\"),\n value: prop(\"view\"),\n onChange(value) {\n prop(\"onViewChange\")?.({ view: value });\n }\n })),\n startValue: bindable(() => {\n const focusedValue = prop(\"focusedValue\") || prop(\"defaultFocusedValue\");\n return {\n defaultValue: alignDate(focusedValue, \"start\", { months: prop(\"numOfMonths\") }, prop(\"locale\")),\n isEqual: isDateEqual,\n hash: (v) => v.toString()\n };\n }),\n currentPlacement: bindable(() => ({\n defaultValue: void 0\n })),\n restoreFocus: bindable(() => ({\n defaultValue: false\n }))\n };\n },\n computed: {\n isInteractive: ({ prop }) => !prop(\"disabled\") && !prop(\"readOnly\"),\n visibleDuration: ({ prop }) => ({ months: prop(\"numOfMonths\") }),\n endValue: ({ context, computed }) => getEndDate(context.get(\"startValue\"), computed(\"visibleDuration\")),\n visibleRange: ({ context, computed }) => ({ start: context.get(\"startValue\"), end: computed(\"endValue\") }),\n visibleRangeText: ({ context, prop, computed }) => getVisibleRangeText({\n view: context.get(\"view\"),\n startValue: context.get(\"startValue\"),\n endValue: computed(\"endValue\"),\n locale: prop(\"locale\"),\n timeZone: prop(\"timeZone\"),\n selectionMode: prop(\"selectionMode\")\n }),\n isPrevVisibleRangeValid: ({ context, prop }) => !isPreviousRangeInvalid(context.get(\"startValue\"), prop(\"min\"), prop(\"max\")),\n isNextVisibleRangeValid: ({ prop, computed }) => !isNextRangeInvalid(computed(\"endValue\"), prop(\"min\"), prop(\"max\")),\n valueAsString: ({ context, prop }) => getValueAsString(context.get(\"value\"), prop)\n },\n effects: [\"setupLiveRegion\"],\n watch({ track, prop, context, action, computed }) {\n track([() => prop(\"locale\")], () => {\n action([\"setStartValue\", \"syncInputElement\"]);\n });\n track([() => context.hash(\"focusedValue\")], () => {\n action([\"setStartValue\", \"focusActiveCellIfNeeded\", \"setHoveredValueIfKeyboard\"]);\n });\n track([() => context.hash(\"startValue\")], () => {\n action([\"syncMonthSelectElement\", \"syncYearSelectElement\", \"invokeOnVisibleRangeChange\"]);\n });\n track([() => context.get(\"inputValue\")], () => {\n action([\"syncInputValue\"]);\n });\n track([() => context.hash(\"value\")], () => {\n action([\"syncInputElement\"]);\n });\n track([() => computed(\"valueAsString\").toString()], () => {\n action([\"announceValueText\"]);\n });\n track([() => context.get(\"view\")], () => {\n action([\"focusActiveCell\"]);\n });\n track([() => prop(\"open\")], () => {\n action([\"toggleVisibility\"]);\n });\n },\n on: {\n \"VALUE.SET\": {\n actions: [\"setDateValue\", \"setFocusedDate\"]\n },\n \"VIEW.SET\": {\n actions: [\"setView\"]\n },\n \"FOCUS.SET\": {\n actions: [\"setFocusedDate\"]\n },\n \"VALUE.CLEAR\": {\n actions: [\"clearDateValue\", \"clearFocusedDate\", \"focusFirstInputElement\"]\n },\n \"INPUT.CHANGE\": [\n {\n guard: \"isInputValueEmpty\",\n actions: [\"setInputValue\", \"clearDateValue\", \"clearFocusedDate\"]\n },\n {\n actions: [\"setInputValue\", \"focusParsedDate\"]\n }\n ],\n \"INPUT.ENTER\": {\n actions: [\"focusParsedDate\", \"selectFocusedDate\"]\n },\n \"INPUT.FOCUS\": {\n actions: [\"setActiveIndex\"]\n },\n \"INPUT.BLUR\": [\n {\n guard: \"shouldFixOnBlur\",\n actions: [\"setActiveIndexToStart\", \"selectParsedDate\"]\n },\n {\n actions: [\"setActiveIndexToStart\"]\n }\n ],\n \"PRESET.CLICK\": [\n {\n guard: \"isOpenControlled\",\n actions: [\"setDateValue\", \"setFocusedDate\", \"invokeOnClose\"]\n },\n {\n target: \"focused\",\n actions: [\"setDateValue\", \"setFocusedDate\", \"focusInputElement\"]\n }\n ],\n \"GOTO.NEXT\": [\n {\n guard: \"isYearView\",\n actions: [\"focusNextDecade\", \"announceVisibleRange\"]\n },\n {\n guard: \"isMonthView\",\n actions: [\"focusNextYear\", \"announceVisibleRange\"]\n },\n {\n actions: [\"focusNextPage\"]\n }\n ],\n \"GOTO.PREV\": [\n {\n guard: \"isYearView\",\n actions: [\"focusPreviousDecade\", \"announceVisibleRange\"]\n },\n {\n guard: \"isMonthView\",\n actions: [\"focusPreviousYear\", \"announceVisibleRange\"]\n },\n {\n actions: [\"focusPreviousPage\"]\n }\n ]\n },\n states: {\n idle: {\n tags: [\"closed\"],\n on: {\n \"CONTROLLED.OPEN\": {\n target: \"open\",\n actions: [\"focusFirstSelectedDate\", \"focusActiveCell\"]\n },\n \"TRIGGER.CLICK\": [\n {\n guard: \"isOpenControlled\",\n actions: [\"invokeOnOpen\"]\n },\n {\n target: \"open\",\n actions: [\"focusFirstSelectedDate\", \"focusActiveCell\", \"invokeOnOpen\"]\n }\n ],\n OPEN: [\n {\n guard: \"isOpenControlled\",\n actions: [\"invokeOnOpen\"]\n },\n {\n target: \"open\",\n actions: [\"focusFirstSelectedDate\", \"focusActiveCell\", \"invokeOnOpen\"]\n }\n ]\n }\n },\n focused: {\n tags: [\"closed\"],\n on: {\n \"CONTROLLED.OPEN\": {\n target: \"open\",\n actions: [\"focusFirstSelectedDate\", \"focusActiveCell\"]\n },\n \"TRIGGER.CLICK\": [\n {\n guard: \"isOpenControlled\",\n actions: [\"invokeOnOpen\"]\n },\n {\n target: \"open\",\n actions: [\"focusFirstSelectedDate\", \"focusActiveCell\", \"invokeOnOpen\"]\n }\n ],\n OPEN: [\n {\n guard: \"isOpenControlled\",\n actions: [\"invokeOnOpen\"]\n },\n {\n target: \"open\",\n actions: [\"focusFirstSelectedDate\", \"focusActiveCell\", \"invokeOnOpen\"]\n }\n ]\n }\n },\n open: {\n tags: [\"open\"],\n effects: [\"trackDismissableElement\", \"trackPositioning\"],\n exit: [\"clearHoveredDate\", \"resetView\"],\n on: {\n \"CONTROLLED.CLOSE\": [\n {\n guard: and(\"shouldRestoreFocus\", \"isInteractOutsideEvent\"),\n target: \"focused\",\n actions: [\"focusTriggerElement\"]\n },\n {\n guard: \"shouldRestoreFocus\",\n target: \"focused\",\n actions: [\"focusInputElement\"]\n },\n {\n target: \"idle\"\n }\n ],\n \"CELL.CLICK\": [\n {\n guard: \"isAboveMinView\",\n actions: [\"setFocusedValueForView\", \"setPreviousView\"]\n },\n {\n guard: and(\"isRangePicker\", \"hasSelectedRange\"),\n actions: [\"setActiveIndexToStart\", \"resetSelection\", \"setActiveIndexToEnd\"]\n },\n // === Grouped transitions (based on `closeOnSelect` and `isOpenControlled`) ===\n {\n guard: and(\"isRangePicker\", \"isSelectingEndDate\", \"closeOnSelect\", \"isOpenControlled\"),\n actions: [\n \"setFocusedDate\",\n \"setSelectedDate\",\n \"setActiveIndexToStart\",\n \"clearHoveredDate\",\n \"invokeOnClose\",\n \"setRestoreFocus\"\n ]\n },\n {\n guard: and(\"isRangePicker\", \"isSelectingEndDate\", \"closeOnSelect\"),\n target: \"focused\",\n actions: [\n \"setFocusedDate\",\n \"setSelectedDate\",\n \"setActiveIndexToStart\",\n \"clearHoveredDate\",\n \"invokeOnClose\",\n \"focusInputElement\"\n ]\n },\n {\n guard: and(\"isRangePicker\", \"isSelectingEndDate\"),\n actions: [\"setFocusedDate\", \"setSelectedDate\", \"setActiveIndexToStart\", \"clearHoveredDate\"]\n },\n // ===\n {\n guard: \"isRangePicker\",\n actions: [\"setFocusedDate\", \"setSelectedDate\", \"setActiveIndexToEnd\"]\n },\n {\n guard: and(\"isMultiPicker\", \"canSelectDate\"),\n actions: [\"setFocusedDate\", \"toggleSelectedDate\"]\n },\n {\n guard: \"isMultiPicker\",\n actions: [\"setFocusedDate\"]\n },\n // === Grouped transitions (based on `closeOnSelect` and `isOpenControlled`) ===\n {\n guard: and(\"closeOnSelect\", \"isOpenControlled\"),\n actions: [\"setFocusedDate\", \"setSelectedDate\", \"invokeOnClose\"]\n },\n {\n guard: \"closeOnSelect\",\n target: \"focused\",\n actions: [\"setFocusedDate\", \"setSelectedDate\", \"invokeOnClose\", \"focusInputElement\"]\n },\n {\n actions: [\"setFocusedDate\", \"setSelectedDate\"]\n }\n // ===\n ],\n \"CELL.POINTER_MOVE\": {\n guard: and(\"isRangePicker\", \"isSelectingEndDate\"),\n actions: [\"setHoveredDate\", \"setFocusedDate\"]\n },\n \"TABLE.POINTER_LEAVE\": {\n guard: \"isRangePicker\",\n actions: [\"clearHoveredDate\"]\n },\n \"TABLE.POINTER_DOWN\": {\n actions: [\"disableTextSelection\"]\n },\n \"TABLE.POINTER_UP\": {\n actions: [\"enableTextSelection\"]\n },\n \"TABLE.ESCAPE\": [\n {\n guard: \"isOpenControlled\",\n actions: [\"focusFirstSelectedDate\", \"invokeOnClose\"]\n },\n {\n target: \"focused\",\n actions: [\"focusFirstSelectedDate\", \"invokeOnClose\", \"focusTriggerElement\"]\n }\n ],\n \"TABLE.ENTER\": [\n {\n guard: \"isAboveMinView\",\n actions: [\"setPreviousView\"]\n },\n {\n guard: and(\"isRangePicker\", \"hasSelectedRange\"),\n actions: [\"setActiveIndexToStart\", \"clearDateValue\", \"setSelectedDate\", \"setActiveIndexToEnd\"]\n },\n // === Grouped transitions (based on `closeOnSelect` and `isOpenControlled`) ===\n {\n guard: and(\"isRangePicker\", \"isSelectingEndDate\", \"closeOnSelect\", \"isOpenControlled\"),\n actions: [\"setSelectedDate\", \"setActiveIndexToStart\", \"clearHoveredDate\", \"invokeOnClose\"]\n },\n {\n guard: and(\"isRangePicker\", \"isSelectingEndDate\", \"closeOnSelect\"),\n target: \"focused\",\n actions: [\n \"setSelectedDate\",\n \"setActiveIndexToStart\",\n \"clearHoveredDate\",\n \"invokeOnClose\",\n \"focusInputElement\"\n ]\n },\n {\n guard: and(\"isRangePicker\", \"isSelectingEndDate\"),\n actions: [\"setSelectedDate\", \"setActiveIndexToStart\", \"clearHoveredDate\"]\n },\n // ===\n {\n guard: \"isRangePicker\",\n actions: [\"setSelectedDate\", \"setActiveIndexToEnd\", \"focusNextDay\"]\n },\n {\n guard: and(\"isMultiPicker\", \"canSelectDate\"),\n actions: [\"toggleSelectedDate\"]\n },\n {\n guard: \"isMultiPicker\"\n },\n // === Grouped transitions (based on `closeOnSelect` and `isOpenControlled`) ===\n {\n guard: and(\"closeOnSelect\", \"isOpenControlled\"),\n actions: [\"selectFocusedDate\", \"invokeOnClose\"]\n },\n {\n guard: \"closeOnSelect\",\n target: \"focused\",\n actions: [\"selectFocusedDate\", \"invokeOnClose\", \"focusInputElement\"]\n },\n {\n actions: [\"selectFocusedDate\"]\n }\n // ===\n ],\n \"TABLE.ARROW_RIGHT\": [\n {\n guard: \"isMonthView\",\n actions: [\"focusNextMonth\"]\n },\n {\n guard: \"isYearView\",\n actions: [\"focusNextYear\"]\n },\n {\n actions: [\"focusNextDay\", \"setHoveredDate\"]\n }\n ],\n \"TABLE.ARROW_LEFT\": [\n {\n guard: \"isMonthView\",\n actions: [\"focusPreviousMonth\"]\n },\n {\n guard: \"isYearView\",\n actions: [\"focusPreviousYear\"]\n },\n {\n actions: [\"focusPreviousDay\"]\n }\n ],\n \"TABLE.ARROW_UP\": [\n {\n guard: \"isMonthView\",\n actions: [\"focusPreviousMonthColumn\"]\n },\n {\n guard: \"isYearView\",\n actions: [\"focusPreviousYearColumn\"]\n },\n {\n actions: [\"focusPreviousWeek\"]\n }\n ],\n \"TABLE.ARROW_DOWN\": [\n {\n guard: \"isMonthView\",\n actions: [\"focusNextMonthColumn\"]\n },\n {\n guard: \"isYearView\",\n actions: [\"focusNextYearColumn\"]\n },\n {\n actions: [\"focusNextWeek\"]\n }\n ],\n \"TABLE.PAGE_UP\": {\n actions: [\"focusPreviousSection\"]\n },\n \"TABLE.PAGE_DOWN\": {\n actions: [\"focusNextSection\"]\n },\n \"TABLE.HOME\": [\n {\n guard: \"isMonthView\",\n actions: [\"focusFirstMonth\"]\n },\n {\n guard: \"isYearView\",\n actions: [\"focusFirstYear\"]\n },\n {\n actions: [\"focusSectionStart\"]\n }\n ],\n \"TABLE.END\": [\n {\n guard: \"isMonthView\",\n actions: [\"focusLastMonth\"]\n },\n {\n guard: \"isYearView\",\n actions: [\"focusLastYear\"]\n },\n {\n actions: [\"focusSectionEnd\"]\n }\n ],\n \"TRIGGER.CLICK\": [\n {\n guard: \"isOpenControlled\",\n actions: [\"invokeOnClose\"]\n },\n {\n target: \"focused\",\n actions: [\"invokeOnClose\"]\n }\n ],\n \"VIEW.TOGGLE\": {\n actions: [\"setNextView\"]\n },\n INTERACT_OUTSIDE: [\n {\n guard: \"isOpenControlled\",\n actions: [\"setActiveIndexToStart\", \"invokeOnClose\"]\n },\n {\n guard: \"shouldRestoreFocus\",\n target: \"focused\",\n actions: [\"setActiveIndexToStart\", \"invokeOnClose\", \"focusTriggerElement\"]\n },\n {\n target: \"idle\",\n actions: [\"setActiveIndexToStart\", \"invokeOnClose\"]\n }\n ],\n CLOSE: [\n {\n guard: \"isOpenControlled\",\n actions: [\"setActiveIndexToStart\", \"invokeOnClose\"]\n },\n {\n target: \"idle\",\n actions: [\"setActiveIndexToStart\", \"invokeOnClose\"]\n }\n ]\n }\n }\n },\n implementations: {\n guards: {\n isAboveMinView: ({ context, prop }) => isAboveMinView(context.get(\"view\"), prop(\"minView\")),\n isDayView: ({ context, event }) => (event.view || context.get(\"view\")) === \"day\",\n isMonthView: ({ context, event }) => (event.view || context.get(\"view\")) === \"month\",\n isYearView: ({ context, event }) => (event.view || context.get(\"view\")) === \"year\",\n isRangePicker: ({ prop }) => prop(\"selectionMode\") === \"range\",\n hasSelectedRange: ({ context }) => context.get(\"value\").length === 2,\n isMultiPicker: ({ prop }) => prop(\"selectionMode\") === \"multiple\",\n canSelectDate: ({ context, prop, event }) => {\n const maxSelectedDates = prop(\"maxSelectedDates\");\n if (maxSelectedDates == null) return true;\n const existingValues = context.get(\"value\");\n const currentValue = event.value ?? context.get(\"focusedValue\");\n const isDeselecting = existingValues.some((date) => isDateEqual(date, currentValue));\n if (isDeselecting) return true;\n return existingValues.length < maxSelectedDates;\n },\n shouldRestoreFocus: ({ context }) => !!context.get(\"restoreFocus\"),\n isSelectingEndDate: ({ context }) => context.get(\"activeIndex\") === 1,\n closeOnSelect: ({ prop }) => !!prop(\"closeOnSelect\"),\n isOpenControlled: ({ prop }) => prop(\"open\") != void 0 || !!prop(\"inline\"),\n isInteractOutsideEvent: ({ event }) => event.previousEvent?.type === \"INTERACT_OUTSIDE\",\n isInputValueEmpty: ({ event }) => event.value.trim() === \"\",\n shouldFixOnBlur: ({ event }) => !!event.fixOnBlur\n },\n effects: {\n trackPositioning({ context, prop, scope }) {\n if (prop(\"inline\")) return;\n if (!context.get(\"currentPlacement\")) {\n context.set(\"currentPlacement\", prop(\"positioning\").placement);\n }\n const anchorEl = dom.getControlEl(scope);\n const getPositionerEl2 = () => dom.getPositionerEl(scope);\n return getPlacement(anchorEl, getPositionerEl2, {\n ...prop(\"positioning\"),\n defer: true,\n onComplete(data) {\n context.set(\"currentPlacement\", data.placement);\n }\n });\n },\n setupLiveRegion({ scope, refs }) {\n const doc = scope.getDoc();\n refs.set(\"announcer\", createLiveRegion({ level: \"assertive\", document: doc }));\n return () => refs.get(\"announcer\")?.destroy?.();\n },\n trackDismissableElement({ scope, send, context, prop }) {\n if (prop(\"inline\")) return;\n const getContentEl2 = () => dom.getContentEl(scope);\n return trackDismissableElement(getContentEl2, {\n type: \"popover\",\n defer: true,\n exclude: [...dom.getInputEls(scope), dom.getTriggerEl(scope), dom.getClearTriggerEl(scope)],\n onInteractOutside(event) {\n context.set(\"restoreFocus\", !event.detail.focusable);\n },\n onDismiss() {\n send({ type: \"INTERACT_OUTSIDE\" });\n },\n onEscapeKeyDown(event) {\n event.preventDefault();\n send({ type: \"TABLE.ESCAPE\", src: \"dismissable\" });\n }\n });\n }\n },\n actions: {\n setNextView({ context, prop }) {\n const nextView = getNextView(context.get(\"view\"), prop(\"minView\"), prop(\"maxView\"));\n context.set(\"view\", nextView);\n },\n setPreviousView({ context, prop }) {\n const prevView = getPreviousView(context.get(\"view\"), prop(\"minView\"), prop(\"maxView\"));\n context.set(\"view\", prevView);\n },\n setView({ context, event }) {\n context.set(\"view\", event.view);\n },\n setRestoreFocus({ context }) {\n context.set(\"restoreFocus\", true);\n },\n announceValueText({ context, prop, refs }) {\n const value = context.get(\"value\");\n const locale = prop(\"locale\");\n const timeZone = prop(\"timeZone\");\n let announceText;\n if (prop(\"selectionMode\") === \"range\") {\n const [startDate, endDate] = value;\n if (startDate && endDate) {\n announceText = formatSelectedDate(startDate, endDate, locale, timeZone);\n } else if (startDate) {\n announceText = formatSelectedDate(startDate, null, locale, timeZone);\n } else if (endDate) {\n announceText = formatSelectedDate(endDate, null, locale, timeZone);\n } else {\n announceText = \"\";\n }\n } else {\n announceText = value.map((date) => formatSelectedDate(date, null, locale, timeZone)).filter(Boolean).join(\",\");\n }\n refs.get(\"announcer\")?.announce(announceText, 3e3);\n },\n announceVisibleRange({ computed, refs }) {\n const { formatted } = computed(\"visibleRangeText\");\n refs.get(\"announcer\")?.announce(formatted);\n },\n disableTextSelection({ scope }) {\n disableTextSelection({ target: dom.getContentEl(scope), doc: scope.getDoc() });\n },\n enableTextSelection({ scope }) {\n restoreTextSelection({ doc: scope.getDoc(), target: dom.getContentEl(scope) });\n },\n focusFirstSelectedDate(params) {\n const { context } = params;\n if (!context.get(\"value\").length) return;\n setFocusedValue(params, context.get(\"value\")[0]);\n },\n syncInputElement({ scope, computed }) {\n raf(() => {\n const inputEls = dom.getInputEls(scope);\n inputEls.forEach((inputEl, index) => {\n setElementValue(inputEl, computed(\"valueAsString\")[index] || \"\");\n });\n });\n },\n setFocusedDate(params) {\n const { event } = params;\n const value = Array.isArray(event.value) ? event.value[0] : event.value;\n setFocusedValue(params, value);\n },\n setFocusedValueForView(params) {\n const { context, event } = params;\n setFocusedValue(params, context.get(\"focusedValue\").set({ [context.get(\"view\")]: event.value }));\n },\n focusNextMonth(params) {\n const { context } = params;\n setFocusedValue(params, context.get(\"focusedValue\").add({ months: 1 }));\n },\n focusPreviousMonth(params) {\n const { context } = params;\n setFocusedValue(params, context.get(\"focusedValue\").subtract({ months: 1 }));\n },\n setDateValue({ context, event, prop }) {\n if (!Array.isArray(event.value)) return;\n const value = event.value.map((date) => constrainValue(date, prop(\"min\"), prop(\"max\")));\n context.set(\"value\", value);\n },\n clearDateValue({ context }) {\n context.set(\"value\", []);\n },\n setSelectedDate(params) {\n const { context, event } = params;\n const values = Array.from(context.get(\"value\"));\n const activeIndex = context.get(\"activeIndex\");\n const existingValue = values[activeIndex];\n const newValue = normalizeValue(params, event.value ?? context.get(\"focusedValue\"));\n values[activeIndex] = preserveTime(existingValue, newValue);\n context.set(\"value\", adjustStartAndEndDate(values));\n },\n resetSelection(params) {\n const { context, event } = params;\n const existingValue = context.get(\"value\")[0];\n const newValue = normalizeValue(params, event.value ?? context.get(\"focusedValue\"));\n context.set(\"value\", [preserveTime(existingValue, newValue)]);\n },\n toggleSelectedDate(params) {\n const { context, event } = params;\n const currentValue = normalizeValue(params, event.value ?? context.get(\"focusedValue\"));\n const existingValues = context.get(\"value\");\n const index = existingValues.findIndex((date) => isDateEqual(date, currentValue));\n if (index === -1) {\n const values = [...existingValues, currentValue];\n context.set(\"value\", sortDates(values));\n } else {\n const values = Array.from(existingValues);\n values.splice(index, 1);\n context.set(\"value\", sortDates(values));\n }\n },\n setHoveredDate({ context, event }) {\n context.set(\"hoveredValue\", event.value);\n },\n clearHoveredDate({ context }) {\n context.set(\"hoveredValue\", null);\n },\n selectFocusedDate({ context, computed }) {\n const values = Array.from(context.get(\"value\"));\n const activeIndex = context.get(\"activeIndex\");\n const existingValue = values[activeIndex];\n const newValue = context.get(\"focusedValue\").copy();\n values[activeIndex] = preserveTime(existingValue, newValue);\n context.set(\"value\", adjustStartAndEndDate(values));\n const valueAsString = computed(\"valueAsString\");\n context.set(\"inputValue\", valueAsString[activeIndex]);\n },\n focusPreviousDay(params) {\n const { context } = params;\n const nextValue = context.get(\"focusedValue\").subtract({ days: 1 });\n setFocusedValue(params, nextValue);\n },\n focusNextDay(params) {\n const { context } = params;\n const nextValue = context.get(\"focusedValue\").add({ days: 1 });\n setFocusedValue(params, nextValue);\n },\n focusPreviousWeek(params) {\n const { context } = params;\n const nextValue = context.get(\"focusedValue\").subtract({ weeks: 1 });\n setFocusedValue(params, nextValue);\n },\n focusNextWeek(params) {\n const { context } = params;\n const nextValue = context.get(\"focusedValue\").add({ weeks: 1 });\n setFocusedValue(params, nextValue);\n },\n focusNextPage(params) {\n const { context, computed, prop } = params;\n const nextPage = getNextPage(\n context.get(\"focusedValue\"),\n context.get(\"startValue\"),\n computed(\"visibleDuration\"),\n prop(\"locale\"),\n prop(\"min\"),\n prop(\"max\")\n );\n setAdjustedValue(params, nextPage);\n },\n focusPreviousPage(params) {\n const { context, computed, prop } = params;\n const previousPage = getPreviousPage(\n context.get(\"focusedValue\"),\n context.get(\"startValue\"),\n computed(\"visibleDuration\"),\n prop(\"locale\"),\n prop(\"min\"),\n prop(\"max\")\n );\n setAdjustedValue(params, previousPage);\n },\n focusSectionStart(params) {\n const { context } = params;\n setFocusedValue(params, context.get(\"startValue\").copy());\n },\n focusSectionEnd(params) {\n const { computed } = params;\n setFocusedValue(params, computed(\"endValue\").copy());\n },\n focusNextSection(params) {\n const { context, event, computed, prop } = params;\n const nextSection = getNextSection(\n context.get(\"focusedValue\"),\n context.get(\"startValue\"),\n event.larger,\n computed(\"visibleDuration\"),\n prop(\"locale\"),\n prop(\"min\"),\n prop(\"max\")\n );\n if (!nextSection) return;\n setAdjustedValue(params, nextSection);\n },\n focusPreviousSection(params) {\n const { context, event, computed, prop } = params;\n const previousSection = getPreviousSection(\n context.get(\"focusedValue\"),\n context.get(\"startValue\"),\n event.larger,\n computed(\"visibleDuration\"),\n prop(\"locale\"),\n prop(\"min\"),\n prop(\"max\")\n );\n if (!previousSection) return;\n setAdjustedValue(params, previousSection);\n },\n focusNextYear(params) {\n const { context } = params;\n const nextValue = context.get(\"focusedValue\").add({ years: 1 });\n setFocusedValue(params, nextValue);\n },\n focusPreviousYear(params) {\n const { context } = params;\n const nextValue = context.get(\"focusedValue\").subtract({ years: 1 });\n setFocusedValue(params, nextValue);\n },\n focusNextDecade(params) {\n const { context } = params;\n const nextValue = context.get(\"focusedValue\").add({ years: 10 });\n setFocusedValue(params, nextValue);\n },\n focusPreviousDecade(params) {\n const { context } = params;\n const nextValue = context.get(\"focusedValue\").subtract({ years: 10 });\n setFocusedValue(params, nextValue);\n },\n clearFocusedDate(params) {\n const { context, prop } = params;\n const calendar = context.get(\"focusedValue\").calendar;\n setFocusedValue(params, getTodayDate(prop(\"timeZone\"), calendar));\n },\n focusPreviousMonthColumn(params) {\n const { context, event } = params;\n const nextValue = context.get(\"focusedValue\").subtract({ months: event.columns });\n setFocusedValue(params, nextValue);\n },\n focusNextMonthColumn(params) {\n const { context, event } = params;\n const nextValue = context.get(\"focusedValue\").add({ months: event.columns });\n setFocusedValue(params, nextValue);\n },\n focusPreviousYearColumn(params) {\n const { context, event } = params;\n const nextValue = context.get(\"focusedValue\").subtract({ years: event.columns });\n setFocusedValue(params, nextValue);\n },\n focusNextYearColumn(params) {\n const { context, event } = params;\n const nextValue = context.get(\"focusedValue\").add({ years: event.columns });\n setFocusedValue(params, nextValue);\n },\n focusFirstMonth(params) {\n const { context } = params;\n const focused = context.get(\"focusedValue\");\n const minMonth = focused.calendar.getMinimumMonthInYear?.(focused) ?? 1;\n setFocusedValue(params, focused.set({ month: minMonth }));\n },\n focusLastMonth(params) {\n const { context } = params;\n const focused = context.get(\"focusedValue\");\n const maxMonth = focused.calendar.getMonthsInYear(focused);\n setFocusedValue(params, focused.set({ month: maxMonth }));\n },\n focusFirstYear(params) {\n const { context } = params;\n const range = getDecadeRange(context.get(\"focusedValue\").year);\n const nextValue = context.get(\"focusedValue\").set({ year: range[0] });\n setFocusedValue(params, nextValue);\n },\n focusLastYear(params) {\n const { context } = params;\n const range = getDecadeRange(context.get(\"focusedValue\").year);\n const nextValue = context.get(\"focusedValue\").set({ year: range[range.length - 1] });\n setFocusedValue(params, nextValue);\n },\n setActiveIndex({ context, event }) {\n context.set(\"activeIndex\", event.index);\n },\n setActiveIndexToEnd({ context }) {\n context.set(\"activeIndex\", 1);\n },\n setActiveIndexToStart({ context }) {\n context.set(\"activeIndex\", 0);\n },\n focusActiveCell({ scope, context, event }) {\n if (event.src === \"input.click\") return;\n raf(() => {\n const view = context.get(\"view\");\n dom.getFocusedCell(scope, view)?.focus({ preventScroll: true });\n });\n },\n focusActiveCellIfNeeded({ scope, context, event }) {\n if (!event.focus) return;\n raf(() => {\n const view = context.get(\"view\");\n dom.getFocusedCell(scope, view)?.focus({ preventScroll: true });\n });\n },\n setHoveredValueIfKeyboard({ context, event, prop }) {\n if (!event.type.startsWith(\"TABLE.ARROW\") || prop(\"selectionMode\") !== \"range\" || context.get(\"activeIndex\") === 0)\n return;\n context.set(\"hoveredValue\", context.get(\"focusedValue\").copy());\n },\n focusTriggerElement({ scope }) {\n raf(() => {\n dom.getTriggerEl(scope)?.focus({ preventScroll: true });\n });\n },\n focusFirstInputElement({ scope, event }) {\n if (event.focus === false) return;\n raf(() => {\n const [inputEl] = dom.getInputEls(scope);\n const elementToFocus = inputEl ?? dom.getTriggerEl(scope);\n elementToFocus?.focus({ preventScroll: true });\n });\n },\n focusInputElement({ scope }) {\n raf(() => {\n const inputEls = dom.getInputEls(scope);\n if (inputEls.length === 0) {\n dom.getTriggerEl(scope)?.focus({ preventScroll: true });\n return;\n }\n const lastIndexWithValue = inputEls.findLastIndex((inputEl2) => inputEl2.value !== \"\");\n const indexToFocus = Math.max(lastIndexWithValue, 0);\n const inputEl = inputEls[indexToFocus];\n inputEl?.focus({ preventScroll: true });\n inputEl?.setSelectionRange(inputEl.value.length, inputEl.value.length);\n });\n },\n syncMonthSelectElement({ scope, context }) {\n const monthSelectEl = dom.getMonthSelectEl(scope);\n setElementValue(monthSelectEl, context.get(\"startValue\").month.toString());\n },\n syncYearSelectElement({ scope, context }) {\n const yearSelectEl = dom.getYearSelectEl(scope);\n setElementValue(yearSelectEl, context.get(\"startValue\").year.toString());\n },\n setInputValue({ context, event }) {\n if (context.get(\"activeIndex\") !== event.index) return;\n context.set(\"inputValue\", event.value);\n },\n syncInputValue({ scope, context, event }) {\n queueMicrotask(() => {\n const inputEls = dom.getInputEls(scope);\n const idx = event.index ?? context.get(\"activeIndex\");\n setElementValue(inputEls[idx], context.get(\"inputValue\"));\n });\n },\n focusParsedDate(params) {\n const { event, prop } = params;\n if (event.index == null) return;\n const parse = prop(\"parse\");\n const date = parse(event.value, { locale: prop(\"locale\"), timeZone: prop(\"timeZone\") });\n if (!date || !isValidDate(date)) return;\n setFocusedValue(params, date);\n },\n selectParsedDate({ context, event, prop }) {\n if (event.index == null) return;\n const parse = prop(\"parse\");\n let date = parse(event.value, { locale: prop(\"locale\"), timeZone: prop(\"timeZone\") });\n if (!date || !isValidDate(date)) {\n if (event.value) {\n date = context.get(\"focusedValue\").copy();\n }\n }\n if (!date) return;\n date = constrainValue(date, prop(\"min\"), prop(\"max\"));\n const values = Array.from(context.get(\"value\"));\n values[event.index] = date;\n context.set(\"value\", values);\n const valueAsString = getValueAsString(values, prop);\n context.set(\"inputValue\", valueAsString[event.index]);\n },\n resetView({ context }) {\n context.set(\"view\", context.initial(\"view\"));\n },\n setStartValue({ context, computed, prop }) {\n const focusedValue = context.get(\"focusedValue\");\n const outside = isDateOutsideRange(focusedValue, context.get(\"startValue\"), computed(\"endValue\"));\n if (!outside) return;\n const startValue = alignDate(focusedValue, \"start\", { months: prop(\"numOfMonths\") }, prop(\"locale\"));\n context.set(\"startValue\", startValue);\n },\n invokeOnOpen({ prop, context }) {\n if (prop(\"inline\")) return;\n prop(\"onOpenChange\")?.({ open: true, value: context.get(\"value\") });\n },\n invokeOnClose({ prop, context }) {\n if (prop(\"inline\")) return;\n prop(\"onOpenChange\")?.({ open: false, value: context.get(\"value\") });\n },\n invokeOnVisibleRangeChange({ prop, context, computed }) {\n prop(\"onVisibleRangeChange\")?.({\n view: context.get(\"view\"),\n visibleRange: computed(\"visibleRange\")\n });\n },\n toggleVisibility({ event, send, prop }) {\n send({ type: prop(\"open\") ? \"CONTROLLED.OPEN\" : \"CONTROLLED.CLOSE\", previousEvent: event });\n }\n }\n }\n});\nvar normalizeValue = (ctx, value) => {\n const { context, prop } = ctx;\n const view = context.get(\"view\");\n let dateValue = typeof value === \"number\" ? context.get(\"focusedValue\").set({ [view]: value }) : value;\n eachView((view2) => {\n if (isBelowMinView(view2, prop(\"minView\"))) {\n dateValue = dateValue.set({ [view2]: view2 === \"day\" ? 1 : 0 });\n }\n });\n return dateValue;\n};\nvar preserveTime = (existingDate, newDate) => {\n if (!existingDate || !(\"hour\" in existingDate)) {\n return newDate;\n }\n const isZoned = \"timeZone\" in existingDate;\n let dateWithTime = newDate;\n if (!(\"hour\" in newDate)) {\n if (isZoned) {\n dateWithTime = toZoned(toCalendarDateTime(newDate), existingDate.timeZone);\n } else {\n dateWithTime = toCalendarDateTime(newDate);\n }\n }\n return dateWithTime.set({\n hour: existingDate.hour,\n minute: existingDate.minute,\n second: existingDate.second,\n millisecond: existingDate.millisecond\n });\n};\nfunction setFocusedValue(ctx, mixedValue) {\n const { context, prop, computed } = ctx;\n if (!mixedValue) return;\n const value = normalizeValue(ctx, mixedValue);\n if (isDateEqual(context.get(\"focusedValue\"), value)) return;\n const adjustFn = getAdjustedDateFn(computed(\"visibleDuration\"), prop(\"locale\"), prop(\"min\"), prop(\"max\"));\n const adjustedValue = adjustFn({\n focusedDate: value,\n startDate: context.get(\"startValue\")\n });\n context.set(\"startValue\", adjustedValue.startDate);\n context.set(\"focusedValue\", adjustedValue.focusedDate);\n}\nfunction setAdjustedValue(ctx, value) {\n const { context } = ctx;\n context.set(\"startValue\", value.startDate);\n const focusedValue = context.get(\"focusedValue\");\n if (isDateEqual(focusedValue, value.focusedDate)) return;\n context.set(\"focusedValue\", value.focusedDate);\n}\nexport {\n machine\n};\n"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;;;;;;;;;;;AA2CA,IAAI,EAAE,WAAQ,GAAc;AAC5B,SAAS,EAAiB,GAAG,GAAG;AAC9B,KAAI,GAAG,WAAW,GAAG,OAAQ,QAAO;CACpC,IAAM,IAAM,KAAK,IAAI,EAAE,QAAQ,EAAE,OAAO;AACxC,MAAK,IAAI,IAAI,GAAG,IAAI,GAAK,IACvB,KAAI,CAAC,EAAY,EAAE,IAAI,EAAE,GAAG,CAAE,QAAO;AAEvC,QAAO;;AAET,SAAS,EAAiB,GAAO,GAAM;AACrC,QAAO,EAAM,KAAK,MACZ,KAAQ,OAAa,KAClB,EAAK,SAAS,CAAC,GAAM;EAAE,QAAQ,EAAK,SAAS;EAAE,UAAU,EAAK,WAAW;EAAE,CAAC,CACnF;;AAEJ,IAAI,IAAU,EAAc;CAC1B,MAAM,EAAE,YAAS;EACf,IAAM,IAAS,EAAM,UAAU,SACzB,IAAW,EAAM,YAAY,OAC7B,IAAgB,EAAM,iBAAiB,UACvC,IAAc,EAAM,eAAe,GACrC;AACJ,MAAI,EAAM,gBAAgB;GAExB,IAAM,IADW,IAAI,KAAK,eAAe,EAAO,CAAC,iBAAiB,CACtC;AAC5B,GAAI,MAAe,aAAa,MAAe,cAC7C,IAAW,EAAM,eAAe,EAAW;;EAG/C,IAAM,KAAoB,MACpB,CAAC,KACD,EAAK,SAAS,eAAe,EAAS,aAAmB,IACtDA,EAAW,GAAM,EA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,EAAa;EACrB,QAAQ,EAAa;EACrB,aAAa,EAAa;EAC3B,CAAC;;AAEJ,SAAS,EAAgB,GAAK,GAAY;CACxC,IAAM,EAAE,YAAS,SAAM,gBAAa;AACpC,KAAI,CAAC,EAAY;CACjB,IAAM,IAAQ,EAAe,GAAK,EAAW;AAC7C,KAAI,EAAY,EAAQ,IAAI,eAAe,EAAE,EAAM,CAAE;CAErD,IAAM,IADW,EAAkB,EAAS,kBAAkB,EAAE,EAAK,SAAS,EAAE,EAAK,MAAM,EAAE,EAAK,MAAM,CAAC,CAC1E;EAC7B,aAAa;EACb,WAAW,EAAQ,IAAI,aAAa;EACrC,CAAC;AAEF,CADA,EAAQ,IAAI,cAAc,EAAc,UAAU,EAClD,EAAQ,IAAI,gBAAgB,EAAc,YAAY;;AAExD,SAAS,EAAiB,GAAK,GAAO;CACpC,IAAM,EAAE,eAAY;AACpB,GAAQ,IAAI,cAAc,EAAM,UAAU,EAEtC,GADiB,EAAQ,IAAI,eAAe,EAClB,EAAM,YAAY,IAChD,EAAQ,IAAI,gBAAgB,EAAM,YAAY"}
1
+ {"version":3,"file":"date-picker.machine.js","names":["toCalendar","DateFormatter","dom.getControlEl","dom.getPositionerEl","dom.getContentEl","dom.getInputEls","dom.getTriggerEl","dom.getClearTriggerEl","dom.getMonthSelectEl","dom.getYearSelectEl","toZoned","toCalendarDateTime"],"sources":["../../../../../../../../../../node_modules/.bun/@zag-js+date-picker@1.35.3+ee33ebb1f804619f/node_modules/@zag-js/date-picker/dist/date-picker.machine.mjs"],"sourcesContent":["// src/date-picker.machine.ts\nimport {\n DateFormatter,\n toCalendar,\n toCalendarDateTime,\n toZoned\n} from \"@internationalized/date\";\nimport { createGuards, createMachine } from \"@zag-js/core\";\nimport {\n alignDate,\n constrainValue,\n formatSelectedDate,\n getAdjustedDateFn,\n getDecadeRange,\n getEndDate,\n getNextPage,\n getNextSection,\n getPreviousPage,\n getPreviousSection,\n getTodayDate,\n isDateEqual,\n isDateOutsideRange,\n isNextRangeInvalid,\n isPreviousRangeInvalid,\n parseDateString\n} from \"@zag-js/date-utils\";\nimport { trackDismissableElement } from \"@zag-js/dismissable\";\nimport { disableTextSelection, raf, restoreTextSelection, setElementValue } from \"@zag-js/dom-query\";\nimport { createLiveRegion } from \"@zag-js/live-region\";\nimport { getPlacement } from \"@zag-js/popper\";\nimport * as dom from \"./date-picker.dom.mjs\";\nimport {\n adjustStartAndEndDate,\n clampView,\n eachView,\n getNextView,\n getPreviousView,\n getVisibleRangeText,\n isAboveMinView,\n isBelowMinView,\n isValidDate,\n sortDates\n} from \"./date-picker.utils.mjs\";\nvar { and } = createGuards();\nfunction isDateArrayEqual(a, b) {\n if (a?.length !== b?.length) return false;\n const len = Math.max(a.length, b.length);\n for (let i = 0; i < len; i++) {\n if (!isDateEqual(a[i], b[i])) return false;\n }\n return true;\n}\nfunction getValueAsString(value, prop) {\n return value.map((date) => {\n if (date == null) return \"\";\n return prop(\"format\")(date, { locale: prop(\"locale\"), timeZone: prop(\"timeZone\") });\n });\n}\nvar machine = createMachine({\n props({ props }) {\n const locale = props.locale || \"en-US\";\n const timeZone = props.timeZone || \"UTC\";\n const selectionMode = props.selectionMode || \"single\";\n const numOfMonths = props.numOfMonths || 1;\n let calendar;\n if (props.createCalendar) {\n const resolved = new Intl.DateTimeFormat(locale).resolvedOptions();\n const calendarId = resolved.calendar;\n if (calendarId !== \"gregory\" && calendarId !== \"iso8601\") {\n calendar = props.createCalendar(calendarId);\n }\n }\n const toTargetCalendar = (date) => {\n if (!calendar) return date;\n if (date.calendar.identifier === calendar.identifier) return date;\n return toCalendar(date, calendar);\n };\n const defaultValue = props.defaultValue ? sortDates(props.defaultValue).map((date) => constrainValue(toTargetCalendar(date), props.min, props.max)) : void 0;\n const value = props.value ? sortDates(props.value).map((date) => constrainValue(toTargetCalendar(date), props.min, props.max)) : void 0;\n let focusedValue = props.focusedValue || props.defaultFocusedValue || value?.[0] || defaultValue?.[0] || getTodayDate(timeZone, calendar);\n focusedValue = constrainValue(toTargetCalendar(focusedValue), props.min, props.max);\n const minView = \"day\";\n const maxView = \"year\";\n const defaultView = clampView(props.view || minView, minView, maxView);\n return {\n locale,\n numOfMonths,\n timeZone,\n selectionMode,\n defaultView,\n minView,\n maxView,\n outsideDaySelectable: false,\n closeOnSelect: true,\n format(date, { locale: locale2, timeZone: timeZone2 }) {\n const formatter = new DateFormatter(locale2, {\n timeZone: timeZone2,\n day: \"2-digit\",\n month: \"2-digit\",\n year: \"numeric\",\n calendar: calendar?.identifier\n });\n return formatter.format(date.toDate(timeZone2));\n },\n parse(value2, { locale: locale2, timeZone: timeZone2 }) {\n return parseDateString(value2, locale2, timeZone2);\n },\n ...props,\n focusedValue: typeof props.focusedValue === \"undefined\" ? void 0 : focusedValue,\n defaultFocusedValue: focusedValue,\n value,\n defaultValue: defaultValue ?? [],\n positioning: {\n placement: \"bottom\",\n ...props.positioning\n }\n };\n },\n initialState({ prop }) {\n const open = prop(\"open\") || prop(\"defaultOpen\") || prop(\"inline\");\n return open ? \"open\" : \"idle\";\n },\n refs() {\n return {\n announcer: void 0\n };\n },\n context({ prop, bindable, getContext }) {\n return {\n focusedValue: bindable(() => ({\n defaultValue: prop(\"defaultFocusedValue\"),\n value: prop(\"focusedValue\"),\n isEqual: isDateEqual,\n hash: (v) => v.toString(),\n sync: true,\n onChange(focusedValue) {\n const context = getContext();\n const view = context.get(\"view\");\n const value = context.get(\"value\");\n const valueAsString = getValueAsString(value, prop);\n prop(\"onFocusChange\")?.({ value, valueAsString, view, focusedValue });\n }\n })),\n value: bindable(() => ({\n defaultValue: prop(\"defaultValue\"),\n value: prop(\"value\"),\n isEqual: isDateArrayEqual,\n hash: (v) => v.map((date) => date?.toString() ?? \"\").join(\",\"),\n onChange(value) {\n const context = getContext();\n const valueAsString = getValueAsString(value, prop);\n prop(\"onValueChange\")?.({ value, valueAsString, view: context.get(\"view\") });\n }\n })),\n inputValue: bindable(() => ({\n defaultValue: \"\"\n })),\n activeIndex: bindable(() => ({\n defaultValue: 0,\n sync: true\n })),\n hoveredValue: bindable(() => ({\n defaultValue: null,\n isEqual: isDateEqual\n })),\n view: bindable(() => ({\n defaultValue: prop(\"defaultView\"),\n value: prop(\"view\"),\n onChange(value) {\n prop(\"onViewChange\")?.({ view: value });\n }\n })),\n startValue: bindable(() => {\n const focusedValue = prop(\"focusedValue\") || prop(\"defaultFocusedValue\");\n return {\n defaultValue: alignDate(focusedValue, \"start\", { months: prop(\"numOfMonths\") }, prop(\"locale\")),\n isEqual: isDateEqual,\n hash: (v) => v.toString()\n };\n }),\n currentPlacement: bindable(() => ({\n defaultValue: void 0\n })),\n restoreFocus: bindable(() => ({\n defaultValue: false\n }))\n };\n },\n computed: {\n isInteractive: ({ prop }) => !prop(\"disabled\") && !prop(\"readOnly\"),\n visibleDuration: ({ prop }) => ({ months: prop(\"numOfMonths\") }),\n endValue: ({ context, computed }) => getEndDate(context.get(\"startValue\"), computed(\"visibleDuration\")),\n visibleRange: ({ context, computed }) => ({ start: context.get(\"startValue\"), end: computed(\"endValue\") }),\n visibleRangeText: ({ context, prop, computed }) => getVisibleRangeText({\n view: context.get(\"view\"),\n startValue: context.get(\"startValue\"),\n endValue: computed(\"endValue\"),\n locale: prop(\"locale\"),\n timeZone: prop(\"timeZone\"),\n selectionMode: prop(\"selectionMode\")\n }),\n isPrevVisibleRangeValid: ({ context, prop }) => !isPreviousRangeInvalid(context.get(\"startValue\"), prop(\"min\"), prop(\"max\")),\n isNextVisibleRangeValid: ({ prop, computed }) => !isNextRangeInvalid(computed(\"endValue\"), prop(\"min\"), prop(\"max\")),\n valueAsString: ({ context, prop }) => getValueAsString(context.get(\"value\"), prop)\n },\n effects: [\"setupLiveRegion\"],\n watch({ track, prop, context, action, computed }) {\n track([() => prop(\"locale\")], () => {\n action([\"setStartValue\", \"syncInputElement\"]);\n });\n track([() => context.hash(\"focusedValue\")], () => {\n action([\"setStartValue\", \"focusActiveCellIfNeeded\", \"setHoveredValueIfKeyboard\"]);\n });\n track([() => context.hash(\"startValue\")], () => {\n action([\"syncMonthSelectElement\", \"syncYearSelectElement\", \"invokeOnVisibleRangeChange\"]);\n });\n track([() => context.get(\"inputValue\")], () => {\n action([\"syncInputValue\"]);\n });\n track([() => context.hash(\"value\")], () => {\n action([\"syncInputElement\"]);\n });\n track([() => computed(\"valueAsString\").toString()], () => {\n action([\"announceValueText\"]);\n });\n track([() => context.get(\"view\")], () => {\n action([\"focusActiveCell\"]);\n });\n track([() => prop(\"open\")], () => {\n action([\"toggleVisibility\"]);\n });\n },\n on: {\n \"VALUE.SET\": {\n actions: [\"setDateValue\", \"setFocusedDate\"]\n },\n \"VIEW.SET\": {\n actions: [\"setView\"]\n },\n \"FOCUS.SET\": {\n actions: [\"setFocusedDate\"]\n },\n \"VALUE.CLEAR\": {\n actions: [\"clearDateValue\", \"clearFocusedDate\", \"focusFirstInputElement\"]\n },\n \"INPUT.CHANGE\": [\n {\n guard: \"isInputValueEmpty\",\n actions: [\"setInputValue\", \"clearDateValue\", \"clearFocusedDate\"]\n },\n {\n actions: [\"setInputValue\", \"focusParsedDate\"]\n }\n ],\n \"INPUT.ENTER\": {\n actions: [\"focusParsedDate\", \"selectFocusedDate\"]\n },\n \"INPUT.FOCUS\": {\n actions: [\"setActiveIndex\"]\n },\n \"INPUT.BLUR\": [\n {\n guard: \"shouldFixOnBlur\",\n actions: [\"setActiveIndexToStart\", \"selectParsedDate\"]\n },\n {\n actions: [\"setActiveIndexToStart\"]\n }\n ],\n \"PRESET.CLICK\": [\n {\n guard: \"isOpenControlled\",\n actions: [\"setDateValue\", \"setFocusedDate\", \"invokeOnClose\"]\n },\n {\n target: \"focused\",\n actions: [\"setDateValue\", \"setFocusedDate\", \"focusInputElement\"]\n }\n ],\n \"GOTO.NEXT\": [\n {\n guard: \"isYearView\",\n actions: [\"focusNextDecade\", \"announceVisibleRange\"]\n },\n {\n guard: \"isMonthView\",\n actions: [\"focusNextYear\", \"announceVisibleRange\"]\n },\n {\n actions: [\"focusNextPage\"]\n }\n ],\n \"GOTO.PREV\": [\n {\n guard: \"isYearView\",\n actions: [\"focusPreviousDecade\", \"announceVisibleRange\"]\n },\n {\n guard: \"isMonthView\",\n actions: [\"focusPreviousYear\", \"announceVisibleRange\"]\n },\n {\n actions: [\"focusPreviousPage\"]\n }\n ]\n },\n states: {\n idle: {\n tags: [\"closed\"],\n on: {\n \"CONTROLLED.OPEN\": {\n target: \"open\",\n actions: [\"focusFirstSelectedDate\", \"focusActiveCell\"]\n },\n \"TRIGGER.CLICK\": [\n {\n guard: \"isOpenControlled\",\n actions: [\"invokeOnOpen\"]\n },\n {\n target: \"open\",\n actions: [\"focusFirstSelectedDate\", \"focusActiveCell\", \"invokeOnOpen\"]\n }\n ],\n OPEN: [\n {\n guard: \"isOpenControlled\",\n actions: [\"invokeOnOpen\"]\n },\n {\n target: \"open\",\n actions: [\"focusFirstSelectedDate\", \"focusActiveCell\", \"invokeOnOpen\"]\n }\n ]\n }\n },\n focused: {\n tags: [\"closed\"],\n on: {\n \"CONTROLLED.OPEN\": {\n target: \"open\",\n actions: [\"focusFirstSelectedDate\", \"focusActiveCell\"]\n },\n \"TRIGGER.CLICK\": [\n {\n guard: \"isOpenControlled\",\n actions: [\"invokeOnOpen\"]\n },\n {\n target: \"open\",\n actions: [\"focusFirstSelectedDate\", \"focusActiveCell\", \"invokeOnOpen\"]\n }\n ],\n OPEN: [\n {\n guard: \"isOpenControlled\",\n actions: [\"invokeOnOpen\"]\n },\n {\n target: \"open\",\n actions: [\"focusFirstSelectedDate\", \"focusActiveCell\", \"invokeOnOpen\"]\n }\n ]\n }\n },\n open: {\n tags: [\"open\"],\n effects: [\"trackDismissableElement\", \"trackPositioning\"],\n exit: [\"clearHoveredDate\", \"resetView\"],\n on: {\n \"CONTROLLED.CLOSE\": [\n {\n guard: and(\"shouldRestoreFocus\", \"isInteractOutsideEvent\"),\n target: \"focused\",\n actions: [\"focusTriggerElement\"]\n },\n {\n guard: \"shouldRestoreFocus\",\n target: \"focused\",\n actions: [\"focusInputElement\"]\n },\n {\n target: \"idle\"\n }\n ],\n \"CELL.CLICK\": [\n {\n guard: \"isAboveMinView\",\n actions: [\"setFocusedValueForView\", \"setPreviousView\"]\n },\n {\n guard: and(\"isRangePicker\", \"hasSelectedRange\"),\n actions: [\"setActiveIndexToStart\", \"resetSelection\", \"setActiveIndexToEnd\"]\n },\n // === Grouped transitions (based on `closeOnSelect` and `isOpenControlled`) ===\n {\n guard: and(\"isRangePicker\", \"isSelectingEndDate\", \"closeOnSelect\", \"isOpenControlled\"),\n actions: [\n \"setFocusedDate\",\n \"setSelectedDate\",\n \"setActiveIndexToStart\",\n \"clearHoveredDate\",\n \"invokeOnClose\",\n \"setRestoreFocus\"\n ]\n },\n {\n guard: and(\"isRangePicker\", \"isSelectingEndDate\", \"closeOnSelect\"),\n target: \"focused\",\n actions: [\n \"setFocusedDate\",\n \"setSelectedDate\",\n \"setActiveIndexToStart\",\n \"clearHoveredDate\",\n \"invokeOnClose\",\n \"focusInputElement\"\n ]\n },\n {\n guard: and(\"isRangePicker\", \"isSelectingEndDate\"),\n actions: [\"setFocusedDate\", \"setSelectedDate\", \"setActiveIndexToStart\", \"clearHoveredDate\"]\n },\n // ===\n {\n guard: \"isRangePicker\",\n actions: [\"setFocusedDate\", \"setSelectedDate\", \"setActiveIndexToEnd\"]\n },\n {\n guard: and(\"isMultiPicker\", \"canSelectDate\"),\n actions: [\"setFocusedDate\", \"toggleSelectedDate\"]\n },\n {\n guard: \"isMultiPicker\",\n actions: [\"setFocusedDate\"]\n },\n // === Grouped transitions (based on `closeOnSelect` and `isOpenControlled`) ===\n {\n guard: and(\"closeOnSelect\", \"isOpenControlled\"),\n actions: [\"setFocusedDate\", \"setSelectedDate\", \"invokeOnClose\"]\n },\n {\n guard: \"closeOnSelect\",\n target: \"focused\",\n actions: [\"setFocusedDate\", \"setSelectedDate\", \"invokeOnClose\", \"focusInputElement\"]\n },\n {\n actions: [\"setFocusedDate\", \"setSelectedDate\"]\n }\n // ===\n ],\n \"CELL.POINTER_MOVE\": {\n guard: and(\"isRangePicker\", \"isSelectingEndDate\"),\n actions: [\"setHoveredDate\", \"setFocusedDate\"]\n },\n \"TABLE.POINTER_LEAVE\": {\n guard: \"isRangePicker\",\n actions: [\"clearHoveredDate\"]\n },\n \"TABLE.POINTER_DOWN\": {\n actions: [\"disableTextSelection\"]\n },\n \"TABLE.POINTER_UP\": {\n actions: [\"enableTextSelection\"]\n },\n \"TABLE.ESCAPE\": [\n {\n guard: \"isOpenControlled\",\n actions: [\"focusFirstSelectedDate\", \"invokeOnClose\"]\n },\n {\n target: \"focused\",\n actions: [\"focusFirstSelectedDate\", \"invokeOnClose\", \"focusTriggerElement\"]\n }\n ],\n \"TABLE.ENTER\": [\n {\n guard: \"isAboveMinView\",\n actions: [\"setPreviousView\"]\n },\n {\n guard: and(\"isRangePicker\", \"hasSelectedRange\"),\n actions: [\"setActiveIndexToStart\", \"clearDateValue\", \"setSelectedDate\", \"setActiveIndexToEnd\"]\n },\n // === Grouped transitions (based on `closeOnSelect` and `isOpenControlled`) ===\n {\n guard: and(\"isRangePicker\", \"isSelectingEndDate\", \"closeOnSelect\", \"isOpenControlled\"),\n actions: [\"setSelectedDate\", \"setActiveIndexToStart\", \"clearHoveredDate\", \"invokeOnClose\"]\n },\n {\n guard: and(\"isRangePicker\", \"isSelectingEndDate\", \"closeOnSelect\"),\n target: \"focused\",\n actions: [\n \"setSelectedDate\",\n \"setActiveIndexToStart\",\n \"clearHoveredDate\",\n \"invokeOnClose\",\n \"focusInputElement\"\n ]\n },\n {\n guard: and(\"isRangePicker\", \"isSelectingEndDate\"),\n actions: [\"setSelectedDate\", \"setActiveIndexToStart\", \"clearHoveredDate\"]\n },\n // ===\n {\n guard: \"isRangePicker\",\n actions: [\"setSelectedDate\", \"setActiveIndexToEnd\", \"focusNextDay\"]\n },\n {\n guard: and(\"isMultiPicker\", \"canSelectDate\"),\n actions: [\"toggleSelectedDate\"]\n },\n {\n guard: \"isMultiPicker\"\n },\n // === Grouped transitions (based on `closeOnSelect` and `isOpenControlled`) ===\n {\n guard: and(\"closeOnSelect\", \"isOpenControlled\"),\n actions: [\"selectFocusedDate\", \"invokeOnClose\"]\n },\n {\n guard: \"closeOnSelect\",\n target: \"focused\",\n actions: [\"selectFocusedDate\", \"invokeOnClose\", \"focusInputElement\"]\n },\n {\n actions: [\"selectFocusedDate\"]\n }\n // ===\n ],\n \"TABLE.ARROW_RIGHT\": [\n {\n guard: \"isMonthView\",\n actions: [\"focusNextMonth\"]\n },\n {\n guard: \"isYearView\",\n actions: [\"focusNextYear\"]\n },\n {\n actions: [\"focusNextDay\", \"setHoveredDate\"]\n }\n ],\n \"TABLE.ARROW_LEFT\": [\n {\n guard: \"isMonthView\",\n actions: [\"focusPreviousMonth\"]\n },\n {\n guard: \"isYearView\",\n actions: [\"focusPreviousYear\"]\n },\n {\n actions: [\"focusPreviousDay\"]\n }\n ],\n \"TABLE.ARROW_UP\": [\n {\n guard: \"isMonthView\",\n actions: [\"focusPreviousMonthColumn\"]\n },\n {\n guard: \"isYearView\",\n actions: [\"focusPreviousYearColumn\"]\n },\n {\n actions: [\"focusPreviousWeek\"]\n }\n ],\n \"TABLE.ARROW_DOWN\": [\n {\n guard: \"isMonthView\",\n actions: [\"focusNextMonthColumn\"]\n },\n {\n guard: \"isYearView\",\n actions: [\"focusNextYearColumn\"]\n },\n {\n actions: [\"focusNextWeek\"]\n }\n ],\n \"TABLE.PAGE_UP\": {\n actions: [\"focusPreviousSection\"]\n },\n \"TABLE.PAGE_DOWN\": {\n actions: [\"focusNextSection\"]\n },\n \"TABLE.HOME\": [\n {\n guard: \"isMonthView\",\n actions: [\"focusFirstMonth\"]\n },\n {\n guard: \"isYearView\",\n actions: [\"focusFirstYear\"]\n },\n {\n actions: [\"focusSectionStart\"]\n }\n ],\n \"TABLE.END\": [\n {\n guard: \"isMonthView\",\n actions: [\"focusLastMonth\"]\n },\n {\n guard: \"isYearView\",\n actions: [\"focusLastYear\"]\n },\n {\n actions: [\"focusSectionEnd\"]\n }\n ],\n \"TRIGGER.CLICK\": [\n {\n guard: \"isOpenControlled\",\n actions: [\"invokeOnClose\"]\n },\n {\n target: \"focused\",\n actions: [\"invokeOnClose\"]\n }\n ],\n \"VIEW.TOGGLE\": {\n actions: [\"setNextView\"]\n },\n INTERACT_OUTSIDE: [\n {\n guard: \"isOpenControlled\",\n actions: [\"setActiveIndexToStart\", \"invokeOnClose\"]\n },\n {\n guard: \"shouldRestoreFocus\",\n target: \"focused\",\n actions: [\"setActiveIndexToStart\", \"invokeOnClose\", \"focusTriggerElement\"]\n },\n {\n target: \"idle\",\n actions: [\"setActiveIndexToStart\", \"invokeOnClose\"]\n }\n ],\n CLOSE: [\n {\n guard: \"isOpenControlled\",\n actions: [\"setActiveIndexToStart\", \"invokeOnClose\"]\n },\n {\n target: \"idle\",\n actions: [\"setActiveIndexToStart\", \"invokeOnClose\"]\n }\n ]\n }\n }\n },\n implementations: {\n guards: {\n isAboveMinView: ({ context, prop }) => isAboveMinView(context.get(\"view\"), prop(\"minView\")),\n isDayView: ({ context, event }) => (event.view || context.get(\"view\")) === \"day\",\n isMonthView: ({ context, event }) => (event.view || context.get(\"view\")) === \"month\",\n isYearView: ({ context, event }) => (event.view || context.get(\"view\")) === \"year\",\n isRangePicker: ({ prop }) => prop(\"selectionMode\") === \"range\",\n hasSelectedRange: ({ context }) => context.get(\"value\").length === 2,\n isMultiPicker: ({ prop }) => prop(\"selectionMode\") === \"multiple\",\n canSelectDate: ({ context, prop, event }) => {\n const maxSelectedDates = prop(\"maxSelectedDates\");\n if (maxSelectedDates == null) return true;\n const existingValues = context.get(\"value\");\n const currentValue = event.value ?? context.get(\"focusedValue\");\n const isDeselecting = existingValues.some((date) => isDateEqual(date, currentValue));\n if (isDeselecting) return true;\n return existingValues.length < maxSelectedDates;\n },\n shouldRestoreFocus: ({ context }) => !!context.get(\"restoreFocus\"),\n isSelectingEndDate: ({ context }) => context.get(\"activeIndex\") === 1,\n closeOnSelect: ({ prop }) => !!prop(\"closeOnSelect\"),\n isOpenControlled: ({ prop }) => prop(\"open\") != void 0 || !!prop(\"inline\"),\n isInteractOutsideEvent: ({ event }) => event.previousEvent?.type === \"INTERACT_OUTSIDE\",\n isInputValueEmpty: ({ event }) => event.value.trim() === \"\",\n shouldFixOnBlur: ({ event }) => !!event.fixOnBlur\n },\n effects: {\n trackPositioning({ context, prop, scope }) {\n if (prop(\"inline\")) return;\n if (!context.get(\"currentPlacement\")) {\n context.set(\"currentPlacement\", prop(\"positioning\").placement);\n }\n const anchorEl = dom.getControlEl(scope);\n const getPositionerEl2 = () => dom.getPositionerEl(scope);\n return getPlacement(anchorEl, getPositionerEl2, {\n ...prop(\"positioning\"),\n defer: true,\n onComplete(data) {\n context.set(\"currentPlacement\", data.placement);\n }\n });\n },\n setupLiveRegion({ scope, refs }) {\n const doc = scope.getDoc();\n refs.set(\"announcer\", createLiveRegion({ level: \"assertive\", document: doc }));\n return () => refs.get(\"announcer\")?.destroy?.();\n },\n trackDismissableElement({ scope, send, context, prop }) {\n if (prop(\"inline\")) return;\n const getContentEl2 = () => dom.getContentEl(scope);\n return trackDismissableElement(getContentEl2, {\n type: \"popover\",\n defer: true,\n exclude: [...dom.getInputEls(scope), dom.getTriggerEl(scope), dom.getClearTriggerEl(scope)],\n onInteractOutside(event) {\n context.set(\"restoreFocus\", !event.detail.focusable);\n },\n onDismiss() {\n send({ type: \"INTERACT_OUTSIDE\" });\n },\n onEscapeKeyDown(event) {\n event.preventDefault();\n send({ type: \"TABLE.ESCAPE\", src: \"dismissable\" });\n }\n });\n }\n },\n actions: {\n setNextView({ context, prop }) {\n const nextView = getNextView(context.get(\"view\"), prop(\"minView\"), prop(\"maxView\"));\n context.set(\"view\", nextView);\n },\n setPreviousView({ context, prop }) {\n const prevView = getPreviousView(context.get(\"view\"), prop(\"minView\"), prop(\"maxView\"));\n context.set(\"view\", prevView);\n },\n setView({ context, event }) {\n context.set(\"view\", event.view);\n },\n setRestoreFocus({ context }) {\n context.set(\"restoreFocus\", true);\n },\n announceValueText({ context, prop, refs }) {\n const value = context.get(\"value\");\n const locale = prop(\"locale\");\n const timeZone = prop(\"timeZone\");\n let announceText;\n if (prop(\"selectionMode\") === \"range\") {\n const [startDate, endDate] = value;\n if (startDate && endDate) {\n announceText = formatSelectedDate(startDate, endDate, locale, timeZone);\n } else if (startDate) {\n announceText = formatSelectedDate(startDate, null, locale, timeZone);\n } else if (endDate) {\n announceText = formatSelectedDate(endDate, null, locale, timeZone);\n } else {\n announceText = \"\";\n }\n } else {\n announceText = value.map((date) => formatSelectedDate(date, null, locale, timeZone)).filter(Boolean).join(\",\");\n }\n refs.get(\"announcer\")?.announce(announceText, 3e3);\n },\n announceVisibleRange({ computed, refs }) {\n const { formatted } = computed(\"visibleRangeText\");\n refs.get(\"announcer\")?.announce(formatted);\n },\n disableTextSelection({ scope }) {\n disableTextSelection({ target: dom.getContentEl(scope), doc: scope.getDoc() });\n },\n enableTextSelection({ scope }) {\n restoreTextSelection({ doc: scope.getDoc(), target: dom.getContentEl(scope) });\n },\n focusFirstSelectedDate(params) {\n const { context } = params;\n if (!context.get(\"value\").length) return;\n setFocusedValue(params, context.get(\"value\")[0]);\n },\n syncInputElement({ scope, computed }) {\n raf(() => {\n const inputEls = dom.getInputEls(scope);\n inputEls.forEach((inputEl, index) => {\n setElementValue(inputEl, computed(\"valueAsString\")[index] || \"\");\n });\n });\n },\n setFocusedDate(params) {\n const { event } = params;\n const value = Array.isArray(event.value) ? event.value[0] : event.value;\n setFocusedValue(params, value);\n },\n setFocusedValueForView(params) {\n const { context, event } = params;\n setFocusedValue(params, context.get(\"focusedValue\").set({ [context.get(\"view\")]: event.value }));\n },\n focusNextMonth(params) {\n const { context } = params;\n setFocusedValue(params, context.get(\"focusedValue\").add({ months: 1 }));\n },\n focusPreviousMonth(params) {\n const { context } = params;\n setFocusedValue(params, context.get(\"focusedValue\").subtract({ months: 1 }));\n },\n setDateValue({ context, event, prop }) {\n if (!Array.isArray(event.value)) return;\n const value = event.value.map((date) => constrainValue(date, prop(\"min\"), prop(\"max\")));\n context.set(\"value\", value);\n },\n clearDateValue({ context }) {\n context.set(\"value\", []);\n },\n setSelectedDate(params) {\n const { context, event } = params;\n const values = Array.from(context.get(\"value\"));\n const activeIndex = context.get(\"activeIndex\");\n const existingValue = values[activeIndex];\n const newValue = normalizeValue(params, event.value ?? context.get(\"focusedValue\"));\n values[activeIndex] = preserveTime(existingValue, newValue);\n context.set(\"value\", adjustStartAndEndDate(values));\n },\n resetSelection(params) {\n const { context, event } = params;\n const existingValue = context.get(\"value\")[0];\n const newValue = normalizeValue(params, event.value ?? context.get(\"focusedValue\"));\n context.set(\"value\", [preserveTime(existingValue, newValue)]);\n },\n toggleSelectedDate(params) {\n const { context, event } = params;\n const currentValue = normalizeValue(params, event.value ?? context.get(\"focusedValue\"));\n const existingValues = context.get(\"value\");\n const index = existingValues.findIndex((date) => isDateEqual(date, currentValue));\n if (index === -1) {\n const values = [...existingValues, currentValue];\n context.set(\"value\", sortDates(values));\n } else {\n const values = Array.from(existingValues);\n values.splice(index, 1);\n context.set(\"value\", sortDates(values));\n }\n },\n setHoveredDate({ context, event }) {\n context.set(\"hoveredValue\", event.value);\n },\n clearHoveredDate({ context }) {\n context.set(\"hoveredValue\", null);\n },\n selectFocusedDate({ context, computed }) {\n const values = Array.from(context.get(\"value\"));\n const activeIndex = context.get(\"activeIndex\");\n const existingValue = values[activeIndex];\n const newValue = context.get(\"focusedValue\").copy();\n values[activeIndex] = preserveTime(existingValue, newValue);\n context.set(\"value\", adjustStartAndEndDate(values));\n const valueAsString = computed(\"valueAsString\");\n context.set(\"inputValue\", valueAsString[activeIndex]);\n },\n focusPreviousDay(params) {\n const { context } = params;\n const nextValue = context.get(\"focusedValue\").subtract({ days: 1 });\n setFocusedValue(params, nextValue);\n },\n focusNextDay(params) {\n const { context } = params;\n const nextValue = context.get(\"focusedValue\").add({ days: 1 });\n setFocusedValue(params, nextValue);\n },\n focusPreviousWeek(params) {\n const { context } = params;\n const nextValue = context.get(\"focusedValue\").subtract({ weeks: 1 });\n setFocusedValue(params, nextValue);\n },\n focusNextWeek(params) {\n const { context } = params;\n const nextValue = context.get(\"focusedValue\").add({ weeks: 1 });\n setFocusedValue(params, nextValue);\n },\n focusNextPage(params) {\n const { context, computed, prop } = params;\n const nextPage = getNextPage(\n context.get(\"focusedValue\"),\n context.get(\"startValue\"),\n computed(\"visibleDuration\"),\n prop(\"locale\"),\n prop(\"min\"),\n prop(\"max\")\n );\n setAdjustedValue(params, nextPage);\n },\n focusPreviousPage(params) {\n const { context, computed, prop } = params;\n const previousPage = getPreviousPage(\n context.get(\"focusedValue\"),\n context.get(\"startValue\"),\n computed(\"visibleDuration\"),\n prop(\"locale\"),\n prop(\"min\"),\n prop(\"max\")\n );\n setAdjustedValue(params, previousPage);\n },\n focusSectionStart(params) {\n const { context } = params;\n setFocusedValue(params, context.get(\"startValue\").copy());\n },\n focusSectionEnd(params) {\n const { computed } = params;\n setFocusedValue(params, computed(\"endValue\").copy());\n },\n focusNextSection(params) {\n const { context, event, computed, prop } = params;\n const nextSection = getNextSection(\n context.get(\"focusedValue\"),\n context.get(\"startValue\"),\n event.larger,\n computed(\"visibleDuration\"),\n prop(\"locale\"),\n prop(\"min\"),\n prop(\"max\")\n );\n if (!nextSection) return;\n setAdjustedValue(params, nextSection);\n },\n focusPreviousSection(params) {\n const { context, event, computed, prop } = params;\n const previousSection = getPreviousSection(\n context.get(\"focusedValue\"),\n context.get(\"startValue\"),\n event.larger,\n computed(\"visibleDuration\"),\n prop(\"locale\"),\n prop(\"min\"),\n prop(\"max\")\n );\n if (!previousSection) return;\n setAdjustedValue(params, previousSection);\n },\n focusNextYear(params) {\n const { context } = params;\n const nextValue = context.get(\"focusedValue\").add({ years: 1 });\n setFocusedValue(params, nextValue);\n },\n focusPreviousYear(params) {\n const { context } = params;\n const nextValue = context.get(\"focusedValue\").subtract({ years: 1 });\n setFocusedValue(params, nextValue);\n },\n focusNextDecade(params) {\n const { context } = params;\n const nextValue = context.get(\"focusedValue\").add({ years: 10 });\n setFocusedValue(params, nextValue);\n },\n focusPreviousDecade(params) {\n const { context } = params;\n const nextValue = context.get(\"focusedValue\").subtract({ years: 10 });\n setFocusedValue(params, nextValue);\n },\n clearFocusedDate(params) {\n const { context, prop } = params;\n const calendar = context.get(\"focusedValue\").calendar;\n setFocusedValue(params, getTodayDate(prop(\"timeZone\"), calendar));\n },\n focusPreviousMonthColumn(params) {\n const { context, event } = params;\n const nextValue = context.get(\"focusedValue\").subtract({ months: event.columns });\n setFocusedValue(params, nextValue);\n },\n focusNextMonthColumn(params) {\n const { context, event } = params;\n const nextValue = context.get(\"focusedValue\").add({ months: event.columns });\n setFocusedValue(params, nextValue);\n },\n focusPreviousYearColumn(params) {\n const { context, event } = params;\n const nextValue = context.get(\"focusedValue\").subtract({ years: event.columns });\n setFocusedValue(params, nextValue);\n },\n focusNextYearColumn(params) {\n const { context, event } = params;\n const nextValue = context.get(\"focusedValue\").add({ years: event.columns });\n setFocusedValue(params, nextValue);\n },\n focusFirstMonth(params) {\n const { context } = params;\n const focused = context.get(\"focusedValue\");\n const minMonth = focused.calendar.getMinimumMonthInYear?.(focused) ?? 1;\n setFocusedValue(params, focused.set({ month: minMonth }));\n },\n focusLastMonth(params) {\n const { context } = params;\n const focused = context.get(\"focusedValue\");\n const maxMonth = focused.calendar.getMonthsInYear(focused);\n setFocusedValue(params, focused.set({ month: maxMonth }));\n },\n focusFirstYear(params) {\n const { context } = params;\n const range = getDecadeRange(context.get(\"focusedValue\").year);\n const nextValue = context.get(\"focusedValue\").set({ year: range[0] });\n setFocusedValue(params, nextValue);\n },\n focusLastYear(params) {\n const { context } = params;\n const range = getDecadeRange(context.get(\"focusedValue\").year);\n const nextValue = context.get(\"focusedValue\").set({ year: range[range.length - 1] });\n setFocusedValue(params, nextValue);\n },\n setActiveIndex({ context, event }) {\n context.set(\"activeIndex\", event.index);\n },\n setActiveIndexToEnd({ context }) {\n context.set(\"activeIndex\", 1);\n },\n setActiveIndexToStart({ context }) {\n context.set(\"activeIndex\", 0);\n },\n focusActiveCell({ scope, context, event }) {\n if (event.src === \"input.click\") return;\n raf(() => {\n const view = context.get(\"view\");\n dom.getFocusedCell(scope, view)?.focus({ preventScroll: true });\n });\n },\n focusActiveCellIfNeeded({ scope, context, event }) {\n if (!event.focus) return;\n raf(() => {\n const view = context.get(\"view\");\n dom.getFocusedCell(scope, view)?.focus({ preventScroll: true });\n });\n },\n setHoveredValueIfKeyboard({ context, event, prop }) {\n if (!event.type.startsWith(\"TABLE.ARROW\") || prop(\"selectionMode\") !== \"range\" || context.get(\"activeIndex\") === 0)\n return;\n context.set(\"hoveredValue\", context.get(\"focusedValue\").copy());\n },\n focusTriggerElement({ scope }) {\n raf(() => {\n dom.getTriggerEl(scope)?.focus({ preventScroll: true });\n });\n },\n focusFirstInputElement({ scope, event }) {\n if (event.focus === false) return;\n raf(() => {\n const [inputEl] = dom.getInputEls(scope);\n const elementToFocus = inputEl ?? dom.getTriggerEl(scope);\n elementToFocus?.focus({ preventScroll: true });\n });\n },\n focusInputElement({ scope }) {\n raf(() => {\n const inputEls = dom.getInputEls(scope);\n if (inputEls.length === 0) {\n dom.getTriggerEl(scope)?.focus({ preventScroll: true });\n return;\n }\n const lastIndexWithValue = inputEls.findLastIndex((inputEl2) => inputEl2.value !== \"\");\n const indexToFocus = Math.max(lastIndexWithValue, 0);\n const inputEl = inputEls[indexToFocus];\n inputEl?.focus({ preventScroll: true });\n inputEl?.setSelectionRange(inputEl.value.length, inputEl.value.length);\n });\n },\n syncMonthSelectElement({ scope, context }) {\n const monthSelectEl = dom.getMonthSelectEl(scope);\n setElementValue(monthSelectEl, context.get(\"startValue\").month.toString());\n },\n syncYearSelectElement({ scope, context }) {\n const yearSelectEl = dom.getYearSelectEl(scope);\n setElementValue(yearSelectEl, context.get(\"startValue\").year.toString());\n },\n setInputValue({ context, event }) {\n if (context.get(\"activeIndex\") !== event.index) return;\n context.set(\"inputValue\", event.value);\n },\n syncInputValue({ scope, context, event }) {\n queueMicrotask(() => {\n const inputEls = dom.getInputEls(scope);\n const idx = event.index ?? context.get(\"activeIndex\");\n setElementValue(inputEls[idx], context.get(\"inputValue\"));\n });\n },\n focusParsedDate(params) {\n const { event, prop } = params;\n if (event.index == null) return;\n const parse = prop(\"parse\");\n const date = parse(event.value, { locale: prop(\"locale\"), timeZone: prop(\"timeZone\") });\n if (!date || !isValidDate(date)) return;\n setFocusedValue(params, date);\n },\n selectParsedDate({ context, event, prop }) {\n if (event.index == null) return;\n const parse = prop(\"parse\");\n let date = parse(event.value, { locale: prop(\"locale\"), timeZone: prop(\"timeZone\") });\n if (!date || !isValidDate(date)) {\n if (event.value) {\n date = context.get(\"focusedValue\").copy();\n }\n }\n if (!date) return;\n date = constrainValue(date, prop(\"min\"), prop(\"max\"));\n const values = Array.from(context.get(\"value\"));\n values[event.index] = date;\n context.set(\"value\", values);\n const valueAsString = getValueAsString(values, prop);\n context.set(\"inputValue\", valueAsString[event.index]);\n },\n resetView({ context }) {\n context.set(\"view\", context.initial(\"view\"));\n },\n setStartValue({ context, computed, prop }) {\n const focusedValue = context.get(\"focusedValue\");\n const outside = isDateOutsideRange(focusedValue, context.get(\"startValue\"), computed(\"endValue\"));\n if (!outside) return;\n const startValue = alignDate(focusedValue, \"start\", { months: prop(\"numOfMonths\") }, prop(\"locale\"));\n context.set(\"startValue\", startValue);\n },\n invokeOnOpen({ prop, context }) {\n if (prop(\"inline\")) return;\n prop(\"onOpenChange\")?.({ open: true, value: context.get(\"value\") });\n },\n invokeOnClose({ prop, context }) {\n if (prop(\"inline\")) return;\n prop(\"onOpenChange\")?.({ open: false, value: context.get(\"value\") });\n },\n invokeOnVisibleRangeChange({ prop, context, computed }) {\n prop(\"onVisibleRangeChange\")?.({\n view: context.get(\"view\"),\n visibleRange: computed(\"visibleRange\")\n });\n },\n toggleVisibility({ event, send, prop }) {\n send({ type: prop(\"open\") ? \"CONTROLLED.OPEN\" : \"CONTROLLED.CLOSE\", previousEvent: event });\n }\n }\n }\n});\nvar normalizeValue = (ctx, value) => {\n const { context, prop } = ctx;\n const view = context.get(\"view\");\n let dateValue = typeof value === \"number\" ? context.get(\"focusedValue\").set({ [view]: value }) : value;\n eachView((view2) => {\n if (isBelowMinView(view2, prop(\"minView\"))) {\n dateValue = dateValue.set({ [view2]: view2 === \"day\" ? 1 : 0 });\n }\n });\n return dateValue;\n};\nvar preserveTime = (existingDate, newDate) => {\n if (!existingDate || !(\"hour\" in existingDate)) {\n return newDate;\n }\n const isZoned = \"timeZone\" in existingDate;\n let dateWithTime = newDate;\n if (!(\"hour\" in newDate)) {\n if (isZoned) {\n dateWithTime = toZoned(toCalendarDateTime(newDate), existingDate.timeZone);\n } else {\n dateWithTime = toCalendarDateTime(newDate);\n }\n }\n return dateWithTime.set({\n hour: existingDate.hour,\n minute: existingDate.minute,\n second: existingDate.second,\n millisecond: existingDate.millisecond\n });\n};\nfunction setFocusedValue(ctx, mixedValue) {\n const { context, prop, computed } = ctx;\n if (!mixedValue) return;\n const value = normalizeValue(ctx, mixedValue);\n if (isDateEqual(context.get(\"focusedValue\"), value)) return;\n const adjustFn = getAdjustedDateFn(computed(\"visibleDuration\"), prop(\"locale\"), prop(\"min\"), prop(\"max\"));\n const adjustedValue = adjustFn({\n focusedDate: value,\n startDate: context.get(\"startValue\")\n });\n context.set(\"startValue\", adjustedValue.startDate);\n context.set(\"focusedValue\", adjustedValue.focusedDate);\n}\nfunction setAdjustedValue(ctx, value) {\n const { context } = ctx;\n context.set(\"startValue\", value.startDate);\n const focusedValue = context.get(\"focusedValue\");\n if (isDateEqual(focusedValue, value.focusedDate)) return;\n context.set(\"focusedValue\", value.focusedDate);\n}\nexport {\n machine\n};\n"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;;;;;;;;;;;AA2CA,IAAI,EAAE,WAAQ,GAAc;AAC5B,SAAS,EAAiB,GAAG,GAAG;AAC9B,KAAI,GAAG,WAAW,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EAAc,YAAY;;AAExD,SAAS,EAAiB,GAAK,GAAO;CACpC,IAAM,EAAE,eAAY;AACpB,GAAQ,IAAI,cAAc,EAAM,UAAU,EAEtC,GADiB,EAAQ,IAAI,eAAe,EAClB,EAAM,YAAY,IAChD,EAAQ,IAAI,gBAAgB,EAAM,YAAY"}
@@ -1,7 +1,7 @@
1
1
  //#region ../../node_modules/.bun/@zag-js+rect-utils@1.35.3/node_modules/@zag-js/rect-utils/dist/angle.mjs
2
2
  function e(e, t, n = e.center) {
3
3
  let r = t.x - n.x, i = t.y - n.y;
4
- return 360 - (Math.atan2(r, i) * (180 / Math.PI) + 180);
4
+ return 360 - (180 / Math.PI * Math.atan2(r, i) + 180);
5
5
  }
6
6
  //#endregion
7
7
  export { e as getPointAngle };
@@ -1 +1 @@
1
- {"version":3,"file":"angle.js","names":[],"sources":["../../../../../../../../../../node_modules/.bun/@zag-js+rect-utils@1.35.3/node_modules/@zag-js/rect-utils/dist/angle.mjs"],"sourcesContent":["import \"./chunk-QZ7TP4HQ.mjs\";\n\n// src/angle.ts\nfunction getPointAngle(rect, point, reference = rect.center) {\n const x = point.x - reference.x;\n const y = point.y - reference.y;\n const deg = Math.atan2(x, y) * (180 / Math.PI) + 180;\n return 360 - deg;\n}\nexport {\n getPointAngle\n};\n"],"x_google_ignoreList":[0],"mappings":";AAGA,SAAS,EAAc,GAAM,GAAO,IAAY,EAAK,QAAQ;CAC3D,IAAM,IAAI,EAAM,IAAI,EAAU,GACxB,IAAI,EAAM,IAAI,EAAU;AAE9B,QAAO,OADK,KAAK,MAAM,GAAG,EAAE,IAAI,MAAM,KAAK,MAAM"}
1
+ {"version":3,"file":"angle.js","names":[],"sources":["../../../../../../../../../../node_modules/.bun/@zag-js+rect-utils@1.35.3/node_modules/@zag-js/rect-utils/dist/angle.mjs"],"sourcesContent":["import \"./chunk-QZ7TP4HQ.mjs\";\n\n// src/angle.ts\nfunction getPointAngle(rect, point, reference = rect.center) {\n const x = point.x - reference.x;\n const y = point.y - reference.y;\n const deg = Math.atan2(x, y) * (180 / Math.PI) + 180;\n return 360 - deg;\n}\nexport {\n getPointAngle\n};\n"],"x_google_ignoreList":[0],"mappings":";AAGA,SAAS,EAAc,GAAM,GAAO,IAAY,EAAK,QAAQ;CAC3D,IAAM,IAAI,EAAM,IAAI,EAAU,GACxB,IAAI,EAAM,IAAI,EAAU;AAE9B,QAAO,OADyB,MAAM,KAAK,KAA/B,KAAK,MAAM,GAAG,EAAE,GAAqB"}
@@ -1,6 +1,6 @@
1
1
  import { isFunction as e } from "../../../../../@zag-js_utils@1.35.3/node_modules/@zag-js/utils/dist/guard.js";
2
2
  import { createEffect as t, createMemo as n, createSignal as r, onCleanup as i } from "solid-js";
3
- //#region ../../node_modules/.bun/@zag-js+solid@1.35.3+2e1854f049906f04/node_modules/@zag-js/solid/dist/bindable.mjs
3
+ //#region ../../node_modules/.bun/@zag-js+solid@1.35.3+ac9bd97bed21f560/node_modules/@zag-js/solid/dist/bindable.mjs
4
4
  function a(i) {
5
5
  let a = i().value ?? i().defaultValue, o = i().isEqual ?? Object.is, [s, c] = r(a), l = n(() => i().value != null), u = { current: s() }, d = { current: void 0 };
6
6
  t(() => {
@@ -1 +1 @@
1
- {"version":3,"file":"bindable.js","names":[],"sources":["../../../../../../../../../../node_modules/.bun/@zag-js+solid@1.35.3+2e1854f049906f04/node_modules/@zag-js/solid/dist/bindable.mjs"],"sourcesContent":["// src/bindable.ts\nimport { isFunction } from \"@zag-js/utils\";\nimport { createEffect, createMemo, createSignal, onCleanup } from \"solid-js\";\nfunction createBindable(props) {\n const initial = props().value ?? props().defaultValue;\n const eq = props().isEqual ?? Object.is;\n const [value, setValue] = createSignal(initial);\n const controlled = createMemo(() => props().value != void 0);\n const valueRef = { current: value() };\n const prevValue = { current: void 0 };\n createEffect(() => {\n const v = controlled() ? props().value : value();\n prevValue.current = v;\n valueRef.current = v;\n });\n const set = (v) => {\n const prev = prevValue.current;\n const next = isFunction(v) ? v(valueRef.current) : v;\n if (props().debug) {\n console.log(`[bindable > ${props().debug}] setValue`, { next, prev });\n }\n if (!controlled()) setValue(next);\n if (!eq(next, prev)) {\n props().onChange?.(next, prev);\n }\n };\n function get() {\n const v = controlled() ? props().value : value;\n return isFunction(v) ? v() : v;\n }\n return {\n initial,\n ref: valueRef,\n get,\n set,\n invoke(nextValue, prevValue2) {\n props().onChange?.(nextValue, prevValue2);\n },\n hash(value2) {\n return props().hash?.(value2) ?? String(value2);\n }\n };\n}\ncreateBindable.cleanup = (fn) => {\n onCleanup(() => fn());\n};\ncreateBindable.ref = (defaultValue) => {\n let value = defaultValue;\n return {\n get: () => value,\n set: (next) => {\n value = next;\n }\n };\n};\nexport {\n createBindable\n};\n"],"x_google_ignoreList":[0],"mappings":";;;AAGA,SAAS,EAAe,GAAO;CAC7B,IAAM,IAAU,GAAO,CAAC,SAAS,GAAO,CAAC,cACnC,IAAK,GAAO,CAAC,WAAW,OAAO,IAC/B,CAAC,GAAO,KAAY,EAAa,EAAQ,EACzC,IAAa,QAAiB,GAAO,CAAC,SAAS,KAAO,EACtD,IAAW,EAAE,SAAS,GAAO,EAAE,EAC/B,IAAY,EAAE,SAAS,KAAK,GAAG;AACrC,SAAmB;EACjB,IAAM,IAAI,GAAY,GAAG,GAAO,CAAC,QAAQ,GAAO;AAEhD,EADA,EAAU,UAAU,GACpB,EAAS,UAAU;GACnB;CACF,IAAM,KAAO,MAAM;EACjB,IAAM,IAAO,EAAU,SACjB,IAAO,EAAW,EAAE,GAAG,EAAE,EAAS,QAAQ,GAAG;AAKnD,EAJI,GAAO,CAAC,SACV,QAAQ,IAAI,eAAe,GAAO,CAAC,MAAM,aAAa;GAAE;GAAM;GAAM,CAAC,EAElE,GAAY,IAAE,EAAS,EAAK,EAC5B,EAAG,GAAM,EAAK,IACjB,GAAO,CAAC,WAAW,GAAM,EAAK;;CAGlC,SAAS,IAAM;EACb,IAAM,IAAI,GAAY,GAAG,GAAO,CAAC,QAAQ;AACzC,SAAO,EAAW,EAAE,GAAG,GAAG,GAAG;;AAE/B,QAAO;EACL;EACA,KAAK;EACL;EACA;EACA,OAAO,GAAW,GAAY;AAC5B,MAAO,CAAC,WAAW,GAAW,EAAW;;EAE3C,KAAK,GAAQ;AACX,UAAO,GAAO,CAAC,OAAO,EAAO,IAAI,OAAO,EAAO;;EAElD;;AAEH,EAAe,WAAW,MAAO;AAC/B,SAAgB,GAAI,CAAC;GAEvB,EAAe,OAAO,MAAiB;CACrC,IAAI,IAAQ;AACZ,QAAO;EACL,WAAW;EACX,MAAM,MAAS;AACb,OAAQ;;EAEX"}
1
+ {"version":3,"file":"bindable.js","names":[],"sources":["../../../../../../../../../../node_modules/.bun/@zag-js+solid@1.35.3+ac9bd97bed21f560/node_modules/@zag-js/solid/dist/bindable.mjs"],"sourcesContent":["// src/bindable.ts\nimport { isFunction } from \"@zag-js/utils\";\nimport { createEffect, createMemo, createSignal, onCleanup } from \"solid-js\";\nfunction createBindable(props) {\n const initial = props().value ?? props().defaultValue;\n const eq = props().isEqual ?? Object.is;\n const [value, setValue] = createSignal(initial);\n const controlled = createMemo(() => props().value != void 0);\n const valueRef = { current: value() };\n const prevValue = { current: void 0 };\n createEffect(() => {\n const v = controlled() ? props().value : value();\n prevValue.current = v;\n valueRef.current = v;\n });\n const set = (v) => {\n const prev = prevValue.current;\n const next = isFunction(v) ? v(valueRef.current) : v;\n if (props().debug) {\n console.log(`[bindable > ${props().debug}] setValue`, { next, prev });\n }\n if (!controlled()) setValue(next);\n if (!eq(next, prev)) {\n props().onChange?.(next, prev);\n }\n };\n function get() {\n const v = controlled() ? props().value : value;\n return isFunction(v) ? v() : v;\n }\n return {\n initial,\n ref: valueRef,\n get,\n set,\n invoke(nextValue, prevValue2) {\n props().onChange?.(nextValue, prevValue2);\n },\n hash(value2) {\n return props().hash?.(value2) ?? String(value2);\n }\n };\n}\ncreateBindable.cleanup = (fn) => {\n onCleanup(() => fn());\n};\ncreateBindable.ref = (defaultValue) => {\n let value = defaultValue;\n return {\n get: () => value,\n set: (next) => {\n value = next;\n }\n };\n};\nexport {\n createBindable\n};\n"],"x_google_ignoreList":[0],"mappings":";;;AAGA,SAAS,EAAe,GAAO;CAC7B,IAAM,IAAU,GAAO,CAAC,SAAS,GAAO,CAAC,cACnC,IAAK,GAAO,CAAC,WAAW,OAAO,IAC/B,CAAC,GAAO,KAAY,EAAa,EAAQ,EACzC,IAAa,QAAiB,GAAO,CAAC,SAAS,KAAO,EACtD,IAAW,EAAE,SAAS,GAAO,EAAE,EAC/B,IAAY,EAAE,SAAS,KAAK,GAAG;AACrC,SAAmB;EACjB,IAAM,IAAI,GAAY,GAAG,GAAO,CAAC,QAAQ,GAAO;AAEhD,EADA,EAAU,UAAU,GACpB,EAAS,UAAU;GACnB;CACF,IAAM,KAAO,MAAM;EACjB,IAAM,IAAO,EAAU,SACjB,IAAO,EAAW,EAAE,GAAG,EAAE,EAAS,QAAQ,GAAG;AAKnD,EAJI,GAAO,CAAC,SACV,QAAQ,IAAI,eAAe,GAAO,CAAC,MAAM,aAAa;GAAE;GAAM;GAAM,CAAC,EAElE,GAAY,IAAE,EAAS,EAAK,EAC5B,EAAG,GAAM,EAAK,IACjB,GAAO,CAAC,WAAW,GAAM,EAAK;;CAGlC,SAAS,IAAM;EACb,IAAM,IAAI,GAAY,GAAG,GAAO,CAAC,QAAQ;AACzC,SAAO,EAAW,EAAE,GAAG,GAAG,GAAG;;AAE/B,QAAO;EACL;EACA,KAAK;EACL;EACA;EACA,OAAO,GAAW,GAAY;AAC5B,MAAO,CAAC,WAAW,GAAW,EAAW;;EAE3C,KAAK,GAAQ;AACX,UAAO,GAAO,CAAC,OAAO,EAAO,IAAI,OAAO,EAAO;;EAElD;;AAEH,EAAe,WAAW,MAAO;AAC/B,SAAgB,GAAI,CAAC;GAEvB,EAAe,OAAO,MAAiB;CACrC,IAAI,IAAQ;AACZ,QAAO;EACL,WAAW;EACX,MAAM,MAAS;AACb,OAAQ;;EAEX"}
@@ -9,7 +9,7 @@ import { createBindable as m } from "./bindable.js";
9
9
  import { createRefs as h } from "./refs.js";
10
10
  import { createTrack as g } from "./track.js";
11
11
  import { createMemo as _, mergeProps as v, onCleanup as y, onMount as b, untrack as x } from "solid-js";
12
- //#region ../../node_modules/.bun/@zag-js+solid@1.35.3+2e1854f049906f04/node_modules/@zag-js/solid/dist/machine.mjs
12
+ //#region ../../node_modules/.bun/@zag-js+solid@1.35.3+ac9bd97bed21f560/node_modules/@zag-js/solid/dist/machine.mjs
13
13
  function S(S, E = {}) {
14
14
  let D = _(() => {
15
15
  let { id: e, ids: t, getRootNode: n } = w(E);
@@ -1 +1 @@
1
- {"version":3,"file":"machine.js","names":[],"sources":["../../../../../../../../../../node_modules/.bun/@zag-js+solid@1.35.3+2e1854f049906f04/node_modules/@zag-js/solid/dist/machine.mjs"],"sourcesContent":["// src/machine.ts\nimport {\n createScope,\n findTransition,\n getExitEnterStates,\n hasTag,\n INIT_STATE,\n MachineStatus,\n matchesState,\n resolveStateValue\n} from \"@zag-js/core\";\nimport { compact, isFunction, isString, toArray, warn, ensure } from \"@zag-js/utils\";\nimport { createMemo, mergeProps, onCleanup, onMount, untrack } from \"solid-js\";\nimport { createBindable } from \"./bindable.mjs\";\nimport { createRefs } from \"./refs.mjs\";\nimport { createTrack } from \"./track.mjs\";\nfunction useMachine(machine, userProps = {}) {\n const scope = createMemo(() => {\n const { id, ids, getRootNode } = access(userProps);\n return createScope({ id, ids, getRootNode });\n });\n const debug = (...args) => {\n if (machine.debug) console.log(...args);\n };\n const props = createMemo(\n () => machine.props?.({\n props: compact(access(userProps)),\n scope: scope()\n }) ?? access(userProps)\n );\n const prop = createProp(props);\n const context = machine.context?.({\n prop,\n bindable: createBindable,\n get scope() {\n return scope();\n },\n flush,\n getContext() {\n return ctx;\n },\n getComputed() {\n return computed;\n },\n getRefs() {\n return refs;\n },\n getEvent() {\n return getEvent();\n }\n });\n const ctx = {\n get(key) {\n return context?.[key].get();\n },\n set(key, value) {\n context?.[key].set(value);\n },\n initial(key) {\n return context?.[key].initial;\n },\n hash(key) {\n const current = context?.[key].get();\n return context?.[key].hash(current);\n }\n };\n const effects = { current: /* @__PURE__ */ new Map() };\n const transitionRef = { current: null };\n const previousEventRef = { current: null };\n const eventRef = { current: { type: \"\" } };\n const getEvent = () => mergeProps(eventRef.current, {\n current() {\n return eventRef.current;\n },\n previous() {\n return previousEventRef.current;\n }\n });\n const getState = () => mergeProps(state, {\n matches(...values) {\n const current = state.get();\n return values.some((value) => matchesState(current, value));\n },\n hasTag(tag) {\n const current = state.get();\n return hasTag(machine, current, tag);\n }\n });\n const refs = createRefs(machine.refs?.({ prop, context: ctx }) ?? {});\n const getParams = () => ({\n state: getState(),\n context: ctx,\n event: getEvent(),\n prop,\n send,\n action,\n guard,\n track: createTrack,\n refs,\n computed,\n flush,\n get scope() {\n return scope();\n },\n choose\n });\n const action = (keys) => {\n const strs = isFunction(keys) ? keys(getParams()) : keys;\n if (!strs) return;\n const fns = strs.map((s) => {\n const fn = machine.implementations?.actions?.[s];\n if (!fn) warn(`[zag-js] No implementation found for action \"${JSON.stringify(s)}\"`);\n return fn;\n });\n for (const fn of fns) {\n fn?.(getParams());\n }\n };\n const guard = (str) => {\n if (isFunction(str)) return str(getParams());\n return machine.implementations?.guards?.[str](getParams());\n };\n const effect = (keys) => {\n const strs = isFunction(keys) ? keys(getParams()) : keys;\n if (!strs) return;\n const fns = strs.map((s) => {\n const fn = machine.implementations?.effects?.[s];\n if (!fn) warn(`[zag-js] No implementation found for effect \"${JSON.stringify(s)}\"`);\n return fn;\n });\n const cleanups = [];\n for (const fn of fns) {\n const cleanup = fn?.(getParams());\n if (cleanup) cleanups.push(cleanup);\n }\n return () => cleanups.forEach((fn) => fn?.());\n };\n const choose = (transitions) => {\n return toArray(transitions).find((t) => {\n let result = !t.guard;\n if (isString(t.guard)) result = !!guard(t.guard);\n else if (isFunction(t.guard)) result = t.guard(getParams());\n return result;\n });\n };\n const computed = (key) => {\n ensure(machine.computed, () => `[zag-js] No computed object found on machine`);\n const fn = machine.computed[key];\n return fn({\n context: ctx,\n event: eventRef.current,\n prop,\n refs,\n scope: scope(),\n computed\n });\n };\n const state = createBindable(() => ({\n defaultValue: resolveStateValue(machine, machine.initialState({ prop })),\n onChange(nextState, prevState) {\n const { exiting, entering } = getExitEnterStates(machine, prevState, nextState, transitionRef.current?.reenter);\n exiting.forEach((item) => {\n const exitEffects = effects.current.get(item.path);\n exitEffects?.();\n effects.current.delete(item.path);\n });\n exiting.forEach((item) => {\n action(item.state?.exit);\n });\n action(transitionRef.current?.actions);\n entering.forEach((item) => {\n const cleanup = effect(item.state?.effects);\n if (cleanup) effects.current.set(item.path, cleanup);\n });\n if (prevState === INIT_STATE) {\n action(machine.entry);\n const cleanup = effect(machine.effects);\n if (cleanup) effects.current.set(INIT_STATE, cleanup);\n }\n entering.forEach((item) => {\n action(item.state?.entry);\n });\n }\n }));\n let status = MachineStatus.NotStarted;\n onMount(() => {\n const started = status === MachineStatus.Started;\n status = MachineStatus.Started;\n debug(started ? \"rehydrating...\" : \"initializing...\");\n state.invoke(state.initial, INIT_STATE);\n });\n onCleanup(() => {\n debug(\"unmounting...\");\n status = MachineStatus.Stopped;\n const fns = effects.current;\n fns.forEach((fn) => fn?.());\n effects.current = /* @__PURE__ */ new Map();\n transitionRef.current = null;\n action(machine.exit);\n });\n const send = (event) => {\n queueMicrotask(() => {\n if (status !== MachineStatus.Started) return;\n previousEventRef.current = eventRef.current;\n eventRef.current = event;\n let currentState = untrack(() => state.get());\n const { transitions, source } = findTransition(machine, currentState, event.type);\n const transition = choose(transitions);\n if (!transition) return;\n transitionRef.current = transition;\n const target = resolveStateValue(machine, transition.target ?? currentState, source);\n debug(\"transition\", event.type, transition.target || currentState, `(${transition.actions})`);\n const changed = target !== currentState;\n if (changed) {\n state.set(target);\n } else if (transition.reenter) {\n state.invoke(currentState, currentState);\n } else {\n action(transition.actions);\n }\n });\n };\n machine.watch?.(getParams());\n return {\n state: getState(),\n send,\n context: ctx,\n prop,\n get scope() {\n return scope();\n },\n refs,\n computed,\n event: getEvent(),\n getStatus: () => status\n };\n}\nfunction flush(fn) {\n fn();\n}\nfunction access(value) {\n return isFunction(value) ? value() : value;\n}\nfunction createProp(value) {\n return function get(key) {\n return value()[key];\n };\n}\nexport {\n useMachine\n};\n"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;;AAgBA,SAAS,EAAW,GAAS,IAAY,EAAE,EAAE;CAC3C,IAAM,IAAQ,QAAiB;EAC7B,IAAM,EAAE,OAAI,QAAK,mBAAgB,EAAO,EAAU;AAClD,SAAO,EAAY;GAAE;GAAI;GAAK;GAAa,CAAC;GAC5C,EACI,KAAS,GAAG,MAAS;AACzB,EAAI,EAAQ,SAAO,QAAQ,IAAI,GAAG,EAAK;IAQnC,IAAO,EANC,QACN,EAAQ,QAAQ;EACpB,OAAO,EAAQ,EAAO,EAAU,CAAC;EACjC,OAAO,GAAO;EACf,CAAC,IAAI,EAAO,EAAU,CACxB,CAC6B,EACxB,IAAU,EAAQ,UAAU;EAChC;EACA,UAAU;EACV,IAAI,QAAQ;AACV,UAAO,GAAO;;EAEhB;EACA,aAAa;AACX,UAAO;;EAET,cAAc;AACZ,UAAO;;EAET,UAAU;AACR,UAAO;;EAET,WAAW;AACT,UAAO,GAAU;;EAEpB,CAAC,EACI,IAAM;EACV,IAAI,GAAK;AACP,UAAO,IAAU,GAAK,KAAK;;EAE7B,IAAI,GAAK,GAAO;AACd,OAAU,GAAK,IAAI,EAAM;;EAE3B,QAAQ,GAAK;AACX,UAAO,IAAU,GAAK;;EAExB,KAAK,GAAK;GACR,IAAM,IAAU,IAAU,GAAK,KAAK;AACpC,UAAO,IAAU,GAAK,KAAK,EAAQ;;EAEtC,EACK,IAAU,EAAE,yBAAyB,IAAI,KAAK,EAAE,EAChD,IAAgB,EAAE,SAAS,MAAM,EACjC,IAAmB,EAAE,SAAS,MAAM,EACpC,IAAW,EAAE,SAAS,EAAE,MAAM,IAAI,EAAE,EACpC,UAAiB,E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AO,SAAa,GAAK;AACvB,SAAO,GAAO,CAAC"}
1
+ {"version":3,"file":"machine.js","names":[],"sources":["../../../../../../../../../../node_modules/.bun/@zag-js+solid@1.35.3+ac9bd97bed21f560/node_modules/@zag-js/solid/dist/machine.mjs"],"sourcesContent":["// src/machine.ts\nimport {\n createScope,\n findTransition,\n getExitEnterStates,\n hasTag,\n INIT_STATE,\n MachineStatus,\n matchesState,\n resolveStateValue\n} from \"@zag-js/core\";\nimport { compact, isFunction, isString, toArray, warn, ensure } from \"@zag-js/utils\";\nimport { createMemo, mergeProps, onCleanup, onMount, untrack } from \"solid-js\";\nimport { createBindable } from \"./bindable.mjs\";\nimport { createRefs } from \"./refs.mjs\";\nimport { createTrack } from \"./track.mjs\";\nfunction useMachine(machine, userProps = {}) {\n const scope = createMemo(() => {\n const { id, ids, getRootNode } = access(userProps);\n return createScope({ id, ids, getRootNode });\n });\n const debug = (...args) => {\n if (machine.debug) console.log(...args);\n };\n const props = createMemo(\n () => machine.props?.({\n props: compact(access(userProps)),\n scope: scope()\n }) ?? access(userProps)\n );\n const prop = createProp(props);\n const context = machine.context?.({\n prop,\n bindable: createBindable,\n get scope() {\n return scope();\n },\n flush,\n getContext() {\n return ctx;\n },\n getComputed() {\n return computed;\n },\n getRefs() {\n return refs;\n },\n getEvent() {\n return getEvent();\n }\n });\n const ctx = {\n get(key) {\n return context?.[key].get();\n },\n set(key, value) {\n context?.[key].set(value);\n },\n initial(key) {\n return context?.[key].initial;\n },\n hash(key) {\n const current = context?.[key].get();\n return context?.[key].hash(current);\n }\n };\n const effects = { current: /* @__PURE__ */ new Map() };\n const transitionRef = { current: null };\n const previousEventRef = { current: null };\n const eventRef = { current: { type: \"\" } };\n const getEvent = () => mergeProps(eventRef.current, {\n current() {\n return eventRef.current;\n },\n previous() {\n return previousEventRef.current;\n }\n });\n const getState = () => mergeProps(state, {\n matches(...values) {\n const current = state.get();\n return values.some((value) => matchesState(current, value));\n },\n hasTag(tag) {\n const current = state.get();\n return hasTag(machine, current, tag);\n }\n });\n const refs = createRefs(machine.refs?.({ prop, context: ctx }) ?? {});\n const getParams = () => ({\n state: getState(),\n context: ctx,\n event: getEvent(),\n prop,\n send,\n action,\n guard,\n track: createTrack,\n refs,\n computed,\n flush,\n get scope() {\n return scope();\n },\n choose\n });\n const action = (keys) => {\n const strs = isFunction(keys) ? keys(getParams()) : keys;\n if (!strs) return;\n const fns = strs.map((s) => {\n const fn = machine.implementations?.actions?.[s];\n if (!fn) warn(`[zag-js] No implementation found for action \"${JSON.stringify(s)}\"`);\n return fn;\n });\n for (const fn of fns) {\n fn?.(getParams());\n }\n };\n const guard = (str) => {\n if (isFunction(str)) return str(getParams());\n return machine.implementations?.guards?.[str](getParams());\n };\n const effect = (keys) => {\n const strs = isFunction(keys) ? keys(getParams()) : keys;\n if (!strs) return;\n const fns = strs.map((s) => {\n const fn = machine.implementations?.effects?.[s];\n if (!fn) warn(`[zag-js] No implementation found for effect \"${JSON.stringify(s)}\"`);\n return fn;\n });\n const cleanups = [];\n for (const fn of fns) {\n const cleanup = fn?.(getParams());\n if (cleanup) cleanups.push(cleanup);\n }\n return () => cleanups.forEach((fn) => fn?.());\n };\n const choose = (transitions) => {\n return toArray(transitions).find((t) => {\n let result = !t.guard;\n if (isString(t.guard)) result = !!guard(t.guard);\n else if (isFunction(t.guard)) result = t.guard(getParams());\n return result;\n });\n };\n const computed = (key) => {\n ensure(machine.computed, () => `[zag-js] No computed object found on machine`);\n const fn = machine.computed[key];\n return fn({\n context: ctx,\n event: eventRef.current,\n prop,\n refs,\n scope: scope(),\n computed\n });\n };\n const state = createBindable(() => ({\n defaultValue: resolveStateValue(machine, machine.initialState({ prop })),\n onChange(nextState, prevState) {\n const { exiting, entering } = getExitEnterStates(machine, prevState, nextState, transitionRef.current?.reenter);\n exiting.forEach((item) => {\n const exitEffects = effects.current.get(item.path);\n exitEffects?.();\n effects.current.delete(item.path);\n });\n exiting.forEach((item) => {\n action(item.state?.exit);\n });\n action(transitionRef.current?.actions);\n entering.forEach((item) => {\n const cleanup = effect(item.state?.effects);\n if (cleanup) effects.current.set(item.path, cleanup);\n });\n if (prevState === INIT_STATE) {\n action(machine.entry);\n const cleanup = effect(machine.effects);\n if (cleanup) effects.current.set(INIT_STATE, cleanup);\n }\n entering.forEach((item) => {\n action(item.state?.entry);\n });\n }\n }));\n let status = MachineStatus.NotStarted;\n onMount(() => {\n const started = status === MachineStatus.Started;\n status = MachineStatus.Started;\n debug(started ? \"rehydrating...\" : \"initializing...\");\n state.invoke(state.initial, INIT_STATE);\n });\n onCleanup(() => {\n debug(\"unmounting...\");\n status = MachineStatus.Stopped;\n const fns = effects.current;\n fns.forEach((fn) => fn?.());\n effects.current = /* @__PURE__ */ new Map();\n transitionRef.current = null;\n action(machine.exit);\n });\n const send = (event) => {\n queueMicrotask(() => {\n if (status !== MachineStatus.Started) return;\n previousEventRef.current = eventRef.current;\n eventRef.current = event;\n let currentState = untrack(() => state.get());\n const { transitions, source } = findTransition(machine, currentState, event.type);\n const transition = choose(transitions);\n if (!transition) return;\n transitionRef.current = transition;\n const target = resolveStateValue(machine, transition.target ?? currentState, source);\n debug(\"transition\", event.type, transition.target || currentState, `(${transition.actions})`);\n const changed = target !== currentState;\n if (changed) {\n state.set(target);\n } else if (transition.reenter) {\n state.invoke(currentState, currentState);\n } else {\n action(transition.actions);\n }\n });\n };\n machine.watch?.(getParams());\n return {\n state: getState(),\n send,\n context: ctx,\n prop,\n get scope() {\n return scope();\n },\n refs,\n computed,\n event: getEvent(),\n getStatus: () => status\n };\n}\nfunction flush(fn) {\n fn();\n}\nfunction access(value) {\n return isFunction(value) ? value() : value;\n}\nfunction createProp(value) {\n return function get(key) {\n return value()[key];\n };\n}\nexport {\n useMachine\n};\n"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;;AAgBA,SAAS,EAAW,GAAS,IAAY,EAAE,EAAE;CAC3C,IAAM,IAAQ,QAAiB;EAC7B,IAAM,EAAE,OAAI,QAAK,mBAAgB,EAA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